diff --git a/.ci/AppImageBuilder.yml b/.ci/AppImageBuilder.yml index 7f312baae..08d7be1ae 100644 --- a/.ci/AppImageBuilder.yml +++ b/.ci/AppImageBuilder.yml @@ -96,3 +96,4 @@ AppDir: AppImage: arch: !ENV '${arch_appimage}' file_name: !ENV '${appimage_path}' + comp: gzip diff --git a/.ci/build.sh b/.ci/build.sh index 0af94132a..d0a4857d9 100755 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -48,6 +48,13 @@ # architecture when invoking build.sh (either standalone or as part of an universal build) # - port and sed are called through sudo to manage dependencies; make sure those are configured # as NOPASSWD in /etc/sudoers if you're doing unattended builds +# - Binaries are ad-hoc signed by default; specify a keychain name in ~/86box-keychain-name.txt +# and password in ~/86box-keychain-password.txt to sign binaries with the first developer +# certificate found inside that keychain. +# - Notarization uses credentials stored in the same keychain used for signing. To save these +# credentials, you must find the keychain's file path, run notarytool store-credentials with +# --keychain pointed at that path, and specify the profile name you passed to notarytool in +# ~/86box-keychain-notarytool.txt # # Define common functions. @@ -126,6 +133,70 @@ save_buildtag() { return $? } +mac_keychain() { + keychain_name=$(cat ~/86box-keychain-name.txt) + if [ -n "$keychain_name" ] + then + echo $keychain_name + security list-keychains -d user -s $(security list-keychains -d user | grep -Fv "/$keychain_name" | sed -e s/\ \*\"//g) "$keychain_name" + security unlock-keychain -p "$(cat ~/86box-keychain-password.txt)" "$keychain_name" + return $? + fi +} +mac_signidentity() { + if keychain_name=$(mac_keychain) + then + if [ -n "$keychain_name" ] + then + cert_name=$(security find-identity -v -p codesigning "$keychain_name" | perl -nle 'print for /([0-9A-F]+) "Developer ID Application: /') + if [ -n "$cert_name" ] + then + echo [-] Using signing certificate [$cert_name] in keychain [$keychain_name] >&2 + echo "--keychain $keychain_name -s $cert_name" + return 0 + else + err="Keychain [$keychain_name] has no developer certificate" + fi + else + err="No keychain specified" + fi + else + err="Keychain [$keychain_name] failed to unlock" + fi + echo [!] $err, falling back to ad-hoc signing >&2 + echo "-s -" +} +mac_notarize() { + if keychain_name=$(mac_keychain) + then + if [ -n "$keychain_name" ] + then + keychain_profile=$(cat ~/86box-keychain-notarytool.txt) + if [ -n "$keychain_profile" ] + then + keychain_path=$(security list-keychains -d user | grep -F "/$keychain_name" | sed -e s/\ \*\"//g) + if [ -n "$keychain_path" ] + then + echo [-] Notarizing with profile [$keychain_profile] in keychain [$keychain_name] + # FIXME: needs a stapling system + xcrun notarytool submit "$1" --keychain-profile "$keychain_profile" --keychain "$keychain_path" --no-wait + return $? + else + err="File path for keychain [$keychain_name] not found" + fi + else + err="No keychain profile specified" + fi + else + err="No keychain specified" + fi + else + err="Keychain [$keychain_name] failed to unlock" + fi + echo [!] $err, skipping notarization + return 1 +} + # Set common variables. project=86Box cwd=$(pwd) @@ -472,12 +543,13 @@ then mv "archive_tmp_universal/$merge_src.app" "$app_bundle_name" # Sign final app bundle. - arch -"$(uname -m)" codesign --force --deep -s - "$app_bundle_name" + arch -"$(uname -m)" codesign --force --deep $(mac_signidentity) -o runtime --entitlements src/mac/entitlements.plist --timestamp "$app_bundle_name" # Create zip. echo [-] Creating artifact archive cd archive_tmp - zip --symlinks -r "$cwd/$package_name.zip" . + zip_name="$cwd/$package_name.zip" + zip --symlinks -r "$zip_name" . status=$? # Check if the archival succeeded. @@ -487,6 +559,9 @@ then exit 7 fi + # Notarize the compressed app bundle. + mac_notarize "$zip_name" + # All good. echo [-] Universal build of [$package_name] for [$arch] with flags [$cmake_flags] successful exit 0 @@ -603,7 +678,7 @@ else grep -q " bullseye " /etc/apt/sources.list || echo [!] WARNING: System not running the expected Debian version # Establish general dependencies. - pkgs="cmake ninja-build pkg-config git wget p7zip-full extra-cmake-modules wayland-protocols tar gzip file appstream qttranslations5-l10n" + pkgs="cmake ninja-build pkg-config git wget p7zip-full extra-cmake-modules wayland-protocols tar gzip file appstream qttranslations5-l10n python3-pip python3-venv squashfs-tools" if [ "$(dpkg --print-architecture)" = "$arch_deb" ] then pkgs="$pkgs build-essential" @@ -905,7 +980,7 @@ then fi # Sign app bundle, unless we're in an universal build. - [ $skip_archive -eq 0 ] && codesign --force --deep -s - "archive_tmp/"*".app" + [ $skip_archive -eq 0 ] && codesign --force --deep $(mac_signidentity) -o runtime --entitlements src/mac/entitlements.plist --timestamp "archive_tmp/"*".app" elif [ "$BUILD_TAG" = "precondition" ] then # Continue with no app bundle on a dry build. @@ -1104,7 +1179,8 @@ elif is_mac then # Create zip. cd archive_tmp - zip --symlinks -r "$cwd/$package_name.zip" . + zip_name="$cwd/$package_name.zip" + zip --symlinks -r "$zip_name" . status=$? else # Determine AppImage runtime architecture. @@ -1141,55 +1217,32 @@ EOF # Copy line. echo "$line" >> AppImageBuilder-generated.yml - - # Workaround for appimage-builder issues 272 and 283 (i686 and armhf are also missing) - if [ "$arch_appimage" != "x86_64" -a "$line" = " files:" ] - then - # Some mild arbitrary code execution with a dummy package... - [ ! -d /runtime ] && sudo apt-get -y -o 'DPkg::Post-Invoke::=mkdir -p /runtime; chmod 777 /runtime' install libsixel1 > /dev/null 2>&1 - - echo " include:" >> AppImageBuilder-generated.yml - for loader in "/lib/$libdir/ld-linux"*.so.* - do - for loader_copy in "$loader" "/lib/$(basename "$loader")" - do - if [ ! -e "/runtime/compat$loader_copy" ] - then - mkdir -p "/runtime/compat$(dirname "$loader_copy")" - ln -s "$loader" "/runtime/compat$loader_copy" - fi - echo " - /runtime/compat$loader_copy" >> AppImageBuilder-generated.yml - done - done - fi done < .ci/AppImageBuilder.yml # Download appimage-builder if necessary. - appimage_builder_url="https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-$(uname -m).AppImage" - appimage_builder_binary="$cache_dir/$(basename "$appimage_builder_url")" - if [ ! -e "$appimage_builder_binary" ] + appimage_builder_commit=22fefa298f9cee922a651a6f65a46fe0ccbfa34e # from issue 376 + appimage_builder_dir="$cache_dir/appimage-builder-$appimage_builder_commit" + if [ ! -x "$appimage_builder_dir/bin/appimage-builder" ] then - rm -rf "$cache_dir/"*".AppImage" # remove old versions - wget -qO "$appimage_builder_binary" "$appimage_builder_url" + rm -rf "$cache_dir/appimage-builder-"* # remove old versions + python3 -m venv "$appimage_builder_dir" # venv to solve some Debian setuptools headaches + "$appimage_builder_dir/bin/pip" install -U "git+https://github.com/AppImageCrafters/appimage-builder.git@$appimage_builder_commit" fi - # Symlink appimage-builder binary and global cache directory. + # Symlink appimage-builder global cache directory. rm -rf appimage-builder.AppImage appimage-builder-cache "$project-"*".AppImage" # also remove any dangling AppImages which may interfere with the renaming process - ln -s "$appimage_builder_binary" appimage-builder.AppImage - chmod u+x appimage-builder.AppImage mkdir -p "$cache_dir/appimage-builder-cache" ln -s "$cache_dir/appimage-builder-cache" appimage-builder-cache - # Run appimage-builder in extract-and-run mode for Docker compatibility. + # Run appimage-builder from the virtual environment created above. # --appdir is a workaround for appimage-builder issue 270 reported by us. for retry in 1 2 3 4 5 do project="$project" project_id="$project_id" project_version="$project_version" project_icon="$project_icon" arch_deb="$arch_deb" \ - arch_appimage="$arch_appimage" appimage_path="$cwd/$package_name.AppImage" APPIMAGE_EXTRACT_AND_RUN=1 ./appimage-builder.AppImage \ + arch_appimage="$arch_appimage" appimage_path="$cwd/$package_name.AppImage" "$appimage_builder_dir/bin/appimage-builder" \ --recipe AppImageBuilder-generated.yml --appdir "$(grep -oP '^\s+path: \K(.+)' AppImageBuilder-generated.yml)" status=$? [ $status -eq 0 ] && break - [ $status -eq 127 ] && rm -rf /tmp/appimage_extracted_* done # Remove appimage-builder binary on failure, just in case it's corrupted. @@ -1203,6 +1256,9 @@ then exit 7 fi +# Notarize the compressed app bundle if we're on macOS. +is_mac && mac_notarize "$zip_name" + # All good. echo [-] Build of [$package_name] for [$arch] with flags [$cmake_flags] successful exit 0 diff --git a/.github/workflows/cmake_linux.yml b/.github/workflows/cmake_linux.yml index a7206dec6..3fcd3a409 100644 --- a/.github/workflows/cmake_linux.yml +++ b/.github/workflows/cmake_linux.yml @@ -3,9 +3,7 @@ name: CMake (Linux) on: push: - branches: - - main - + branches: [ "main" ] paths: - src/** - cmake/** @@ -17,6 +15,7 @@ on: - "!**/Makefile*" pull_request: + branches: [ "main" ] paths: - src/** - cmake/** @@ -57,10 +56,12 @@ jobs: ui: - name: SDL GUI qt: off + qt6: off static: on - - name: Qt GUI + - name: Qt 5 GUI qt: on - slug: -Qt + qt6: off + slug: -Qt5 packages: >- qtbase5-dev qtbase5-private-dev @@ -68,6 +69,20 @@ jobs: qttranslations5-l10n libevdev-dev libxkbcommon-x11-dev + - name: Qt 6 GUI + qt: on + qt6: on + slug: -Qt6 + packages: >- + qt6-base-dev + qt6-base-private-dev + qt6-tools-dev + qt6-tools-dev-tools + qt6-l10n-tools + qt6-translations-l10n + libevdev-dev + libxkbcommon-x11-dev + libvulkan-dev environment: - arch: x86_64 toolchain: ./cmake/flags-gcc-x86_64.cmake @@ -113,6 +128,7 @@ jobs: -D NEW_DYNAREC=${{ matrix.dynarec.new }} -D CMAKE_INSTALL_PREFIX=./build/artifacts -D QT=${{ matrix.ui.qt }} + -D USE_QT6=${{ matrix.ui.qt6 }} - name: Build run: | diff --git a/.github/workflows/cmake_macos.yml b/.github/workflows/cmake_macos.yml index 8235b7df4..dac1fc92f 100644 --- a/.github/workflows/cmake_macos.yml +++ b/.github/workflows/cmake_macos.yml @@ -3,9 +3,7 @@ name: CMake (macos) on: push: - branches: - - main - + branches: [ "main" ] paths: - src/** - cmake/** @@ -17,6 +15,7 @@ on: - "!**/Makefile*" pull_request: + branches: [ "main" ] paths: - src/** - cmake/** diff --git a/.github/workflows/cmake_windows_msys2.yml b/.github/workflows/cmake_windows_msys2.yml index 9a7a9fb81..abfbaff34 100644 --- a/.github/workflows/cmake_windows_msys2.yml +++ b/.github/workflows/cmake_windows_msys2.yml @@ -3,9 +3,7 @@ name: CMake (Windows, msys2) on: push: - branches: - - main - + branches: [ "main" ] paths: - src/** - cmake/** @@ -17,6 +15,7 @@ on: - "!**/Makefile*" pull_request: + branches: [ "msin" ] paths: - src/** - cmake/** diff --git a/CMakeLists.txt b/CMakeLists.txt index 4dd83523f..8929c12bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,7 @@ if(MUNT_EXTERNAL) endif() project(86Box - VERSION 5.0 + VERSION 5.0.1 DESCRIPTION "Emulator of x86-based systems" HOMEPAGE_URL "https://86box.net" LANGUAGES C CXX) @@ -184,6 +184,7 @@ cmake_dependent_option(PCL "Generic PCL5e Printer" cmake_dependent_option(SIO_DETECT "Super I/O Detection Helper" ON "DEV_BRANCH" OFF) cmake_dependent_option(WACOM "Wacom Input Devices" ON "DEV_BRANCH" OFF) cmake_dependent_option(XL24 "ATI VGA Wonder XL24 (ATI-28800-6)" ON "DEV_BRANCH" OFF) +cmake_dependent_option(NETSWITCH "Network Switch Support" ON "DEV_BRANCH" OFF) # Ditto but for Qt if(QT) @@ -221,7 +222,7 @@ if(NOT EMU_BUILD_NUM) set(EMU_BUILD_NUM 0) endif() if(NOT EMU_COPYRIGHT_YEAR) - set(EMU_COPYRIGHT_YEAR 2024) + set(EMU_COPYRIGHT_YEAR 2025) endif() # Libasan @@ -230,4 +231,6 @@ if(LIBASAN) add_link_options(-fsanitize=address) endif() +set(CMAKE_TOP_LEVEL_PROCESSED TRUE) + add_subdirectory(src) diff --git a/debian/changelog b/debian/changelog index 079fba5dd..8389d4654 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -86box (5.0) UNRELEASED; urgency=medium +86box (5.0.1) UNRELEASED; urgency=medium * Bump release. - -- Jasmine Iwanek Wed, 16 Apr 2025 22:08:04 +0200 + -- Jasmine Iwanek Sun, 24 Aug 2025 15:20:01 +0200 diff --git a/src/86box.c b/src/86box.c index 71f877599..36638687a 100644 --- a/src/86box.c +++ b/src/86box.c @@ -88,7 +88,7 @@ #include <86box/scsi_device.h> #include <86box/cdrom.h> #include <86box/cdrom_interface.h> -#include <86box/zip.h> +#include <86box/rdisk.h> #include <86box/mo.h> #include <86box/scsi_disk.h> #include <86box/cdrom_image.h> @@ -161,7 +161,7 @@ int window_remember; int vid_resize; /* (C) allow resizing */ int invert_display = 0; /* (C) invert the display */ int suppress_overscan = 0; /* (C) suppress overscans */ -int lang_id = 0; /* (C) language id */ +int lang_id = 0; /* (G) language id */ int scale = 0; /* (C) screen scale factor */ int dpi_scale = 0; /* (C) DPI scaling of the emulated screen */ @@ -199,24 +199,28 @@ int cpu = 0; /* (C) cpu typ int fpu_type = 0; /* (C) fpu type */ int fpu_softfloat = 0; /* (C) fpu uses softfloat */ int time_sync = 0; /* (C) enable time sync */ -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 confirm_reset = 1; /* (G) enable reset confirmation */ +int confirm_exit = 1; /* (G) enable exit confirmation */ +int confirm_save = 1; /* (G) enable save confirmation */ int enable_discord = 0; /* (C) enable Discord integration */ int pit_mode = -1; /* (C) force setting PIT mode */ int fm_driver = 0; /* (C) select FM sound driver */ -int open_dir_usr_path = 0; /* (C) default file open dialog directory +int open_dir_usr_path = 0; /* (G) default file open dialog directory of usr_path */ int video_fullscreen_scale_maximized = 0; /* (C) Whether fullscreen scaling settings also apply when maximized. */ int do_auto_pause = 0; /* (C) Auto-pause the emulator on focus loss */ +int force_constant_mouse = 0; /* (C) Force constant updating of the mouse */ int hook_enabled = 1; /* (C) Keyboard hook is enabled */ int test_mode = 0; /* (C) Test mode */ char uuid[MAX_UUID_LEN] = { '\0' }; /* (C) UUID or machine identifier */ int sound_muted = 0; /* (C) Is sound muted? */ -int inhibit_multimedia_keys; /* (C) Inhibit multimedia keys on Windows. */ +int jumpered_internal_ecp_dma = 0; /* (C) Jumpered internal EPC DMA */ +int inhibit_multimedia_keys; /* (G) Inhibit multimedia keys on Windows. */ int force_10ms; /* (C) Force 10ms CPU frame intervals. */ +int vmm_disabled = 0; /* (G) disable built-in manager */ +char vmm_path_cfg[1024] = { '\0' }; /* (G) VMs path (unless -E is used)*/ int other_ide_present = 0; /* IDE controllers from non-IDE cards are present */ @@ -230,33 +234,50 @@ struct accelKey acc_keys[NUM_ACCELS]; // Default accelerator key values struct accelKey def_acc_keys[NUM_ACCELS] = { - { .name="send_ctrl_alt_del", .desc="Send Control+Alt+Del", - .seq="Ctrl+F12" }, - - { .name="send_ctrl_alt_esc", .desc="Send Control+Alt+Escape", - .seq="Ctrl+F10" }, - - { .name="fullscreen", .desc="Toggle fullscreen", - .seq="Ctrl+Alt+PgUp" }, - - { .name="screenshot", .desc="Screenshot", - .seq="Ctrl+F11" }, - - { .name="release_mouse", .desc="Release mouse pointer", - .seq="Ctrl+End" }, - - { .name="hard_reset", .desc="Hard reset", - .seq="Ctrl+Alt+F12" }, - - { .name="pause", .desc="Toggle pause", - .seq="Ctrl+Alt+F1" }, - - { .name="mute", .desc="Toggle mute", - .seq="Ctrl+Alt+M" } + { + .name="send_ctrl_alt_del", + .desc="Send Control+Alt+Del", + .seq="Ctrl+F12" + }, + { + .name="send_ctrl_alt_esc", + .desc="Send Control+Alt+Escape", + .seq="Ctrl+F10" + }, + { + .name="fullscreen", + .desc="Toggle fullscreen", + .seq="Ctrl+Alt+PgUp" + }, + { + .name="screenshot", + .desc="Screenshot", + .seq="Ctrl+F11" + }, + { + .name="release_mouse", + .desc="Release mouse pointer", + .seq="Ctrl+End" + }, + { + .name="hard_reset", + .desc="Hard reset", + .seq="Ctrl+Alt+F12" + }, + { + .name="pause", + .desc="Toggle pause", + .seq="Ctrl+Alt+F1" + }, + { + .name="mute", + .desc="Toggle mute", + .seq="Ctrl+Alt+M" + } }; -char vmm_path[1024] = { '\0'}; /* TEMPORARY - VM manager path to scan for VMs */ -int vmm_enabled = 0; +char vmm_path[1024] = { '\0' }; /* VM manager path to scan for VMs */ +int start_vmm = 1; /* Statistics. */ extern int mmuflush; @@ -276,6 +297,7 @@ extern double exp_pow_table[0x800]; char exe_path[2048]; /* path (dir) of executable */ char usr_path[1024]; /* path (dir) of user data */ char cfg_path[1024]; /* full path of config file */ +char global_cfg_path[1024]; /* full path of config file */ FILE *stdlog = NULL; /* file to log output to */ #if 0 int scrnsz_x = SCREEN_RES_X; /* current screen size, X */ @@ -299,9 +321,9 @@ static wchar_t mouse_msg[3][200]; static volatile atomic_int do_pause_ack = 0; static volatile atomic_int pause_ack = 0; -#ifndef RELEASE_BUILD +#define LOG_SIZE_BUFFER 8192 /* Log size buffer */ -#define LOG_SIZE_BUFFER 1024 /* Log size buffer */ +#ifndef RELEASE_BUILD static char buff[LOG_SIZE_BUFFER]; @@ -313,7 +335,7 @@ static int suppr_seen = 1; void pclog_ensure_stdlog_open(void); #endif -/* +/* Ensures STDLOG is open for pclog_ex and pclog_ex_cyclic */ void pclog_ensure_stdlog_open(void) @@ -363,8 +385,6 @@ pclog_ex(UNUSED(const char *fmt), UNUSED(va_list ap)) #endif } - - void pclog_toggle_suppr(void) { @@ -386,11 +406,35 @@ pclog(UNUSED(const char *fmt), ...) #endif } +/* Log something even in release builds. */ +void +always_log(const char *fmt, ...) +{ + char temp[LOG_SIZE_BUFFER]; + va_list ap; + + va_start(ap, fmt); + + if (stdlog == NULL) { + if (log_path[0] != '\0') { + stdlog = plat_fopen(log_path, "w"); + if (stdlog == NULL) + stdlog = stdout; + } else + stdlog = stdout; + } + + vsprintf(temp, fmt, ap); + fprintf(stdlog, "%s", temp); + fflush(stdlog); + va_end(ap); +} + /* Log a fatal error, and display a UI message before exiting. */ void fatal(const char *fmt, ...) { - char temp[1024]; + char temp[LOG_SIZE_BUFFER]; va_list ap; char *sp; @@ -438,7 +482,7 @@ fatal(const char *fmt, ...) void fatal_ex(const char *fmt, va_list ap) { - char temp[1024]; + char temp[LOG_SIZE_BUFFER]; char *sp; if (stdlog == NULL) { @@ -481,7 +525,7 @@ fatal_ex(const char *fmt, va_list ap) void warning(const char *fmt, ...) { - char temp[1024]; + char temp[LOG_SIZE_BUFFER]; va_list ap; char *sp; @@ -517,7 +561,7 @@ warning(const char *fmt, ...) void warning_ex(const char *fmt, va_list ap) { - char temp[1024]; + char temp[LOG_SIZE_BUFFER]; char *sp; if (stdlog == NULL) { @@ -594,54 +638,65 @@ extern void device_find_all_descs(void); static void pc_show_usage(char *s) { - char p[4096] = { 0 }; + char p[8192] = { 0 }; sprintf(p, "\n%sUsage: 86box [options] [cfg-file]\n\n" "Valid options are:\n\n" "-? or --help\t\t\t- show this information\n" +#ifdef SHOW_EXTRA_PARAMS "-C or --config path\t\t- set 'path' to be config file\n" +#endif #ifdef _WIN32 "-D or --debug\t\t\t- force debug output logging\n" #endif -#if 1 +#ifndef USE_SDL_UI "-E or --vmmpath\t\t- vm manager path\n" #endif "-F or --fullscreen\t\t- start in fullscreen mode\n" "-G or --lang langid\t\t- start with specified language\n" "\t\t\t\t (e.g. en-US, or system)\n" +#ifdef SHOW_EXTRA_PARAMS #ifdef _WIN32 "-H or --hwnd id,hwnd\t\t- sends back the main dialog's hwnd\n" +#endif #endif "-I or --image d:path\t\t- load 'path' as floppy image on drive d\n" #ifdef USE_INSTRUMENT "-J or --instrument name\t- set 'name' to be the profiling instrument\n" #endif - "-L or --logfile pat\t\t- set 'path' to be the logfile\n" + "-L or --logfile path\t\t- set 'path' to be the logfile\n" "-M or --missing\t\t- dump missing machines and video cards\n" "-N or --noconfirm\t\t- do not ask for confirmation on quit\n" "-P or --vmpath path\t\t- set 'path' to be root for vm\n" + "-O or --global path\t\t- set 'path' to be global config file\n" "-R or --rompath path\t\t- set 'path' to be ROM path\n" #ifndef USE_SDL_UI "-S or --settings\t\t\t- show only the settings dialog\n" #endif +#ifdef SHOW_EXTRA_PARAMS "-T or --testmode\t\t- test mode: execute the test mode entry\n" "\t\t\t\t point on init/hard reset\n" +#endif "-V or --vmname name\t\t- overrides the name of the running VM\n" +#ifdef _WIN32 "-W or --nohook\t\t- disables keyboard hook\n" - "\t\t\t\t (compatibility-only outside Windows)\n" +#else + "-W or --nohook\t\t- alters keyboard behavior\n" +#endif "-X or --clear what\t\t- clears the 'what' (cmos/flash/both)\n" +#ifdef SHOW_EXTRA_PARAMS "-Y or --donothing\t\t- do not show any UI or run the emulation\n" - "-Z or --lastvmpath\t\t- the last parameter is VM path rather\n" - "\t\t\t\t than config\n" +#endif + "-Z or --lastvmpath\t\t- the last param. is VM path rather than config\n" "\nA config file can be specified. If none is, the default file will be used.\n", - (s == NULL) ? "" : s); + s); #ifdef _WIN32 ui_msgbox(MBX_ANSI | ((s == NULL) ? MBX_INFO : MBX_WARNING), p); #else if (s == NULL) - pclog("%s", p); + always_log("%s", p); else ui_msgbox(MBX_ANSI | MBX_WARNING, p); #endif @@ -660,6 +715,7 @@ pc_init(int argc, char *argv[]) char *ppath = NULL; char *rpath = NULL; char *cfg = NULL; + char *global = NULL; char *p; char temp[2048]; char *fn[FDD_NUM] = { NULL }; @@ -670,9 +726,6 @@ pc_init(int argc, char *argv[]) time_t now; int c; int lvmp = 0; -#ifdef DEPRECATE_USAGE - int deprecated = 1; -#endif #ifdef ENABLE_NG int ng = 0; #endif @@ -693,10 +746,6 @@ pc_init(int argc, char *argv[]) p = path_get_filename(exe_path); *p = '\0'; } - if (!strncmp(exe_path, "/private/var/folders/", 21)) { - ui_msgbox_header(MBX_FATAL, L"App Translocation", EMU_NAME_W L" cannot determine the emulated machine's location due to a macOS security feature. Please move the " EMU_NAME_W L" app to another folder (not /Applications), or make a copy of it and open that copy instead."); - return 0; - } #elif !defined(_WIN32) /* Grab the actual path if we are an AppImage. */ p = getenv("APPIMAGE"); @@ -730,7 +779,7 @@ usage: } } - pc_show_usage(NULL); + pc_show_usage(""); return 0; } else if (!strcasecmp(argv[c], "--lastvmpath") || !strcasecmp(argv[c], "-Z")) { lvmp = 1; @@ -738,7 +787,7 @@ usage: } else if (!strcasecmp(argv[c], "--debug") || !strcasecmp(argv[c], "-D")) { force_debug = 1; #endif -//#ifdef ENABLE_NG +#ifndef USE_SDL_UI } else if (!strcasecmp(argv[c], "--vmmpath") || !strcasecmp(argv[c], "-E")) { /* Using this variable for vm manager path @@ -749,7 +798,7 @@ usage: memcpy(vmm_path, vp, sizeof(vmm_path)); else memcpy(vmm_path, vp, strlen(vp) + 1); - //#endif +#endif } else if (!strcasecmp(argv[c], "--fullscreen") || !strcasecmp(argv[c], "-F")) { start_in_fullscreen = 1; } else if (!strcasecmp(argv[c], "--logfile") || !strcasecmp(argv[c], "-L")) { @@ -762,9 +811,7 @@ usage: goto usage; ppath = argv[++c]; -#ifdef DEPRECATE_USAGE - deprecated = 0; -#endif + start_vmm = 0; } else if (!strcasecmp(argv[c], "--rompath") || !strcasecmp(argv[c], "-R")) { if ((c + 1) == argc) goto usage; @@ -776,9 +823,12 @@ usage: goto usage; cfg = argv[++c]; -#ifdef DEPRECATE_USAGE - deprecated = 0; -#endif + start_vmm = 0; + } else if (!strcasecmp(argv[c], "--global") || !strcasecmp(argv[c], "-O")) { + if ((c + 1) == argc || plat_dir_check(argv[c + 1])) + goto usage; + + global = argv[++c]; } else if (!strcasecmp(argv[c], "--image") || !strcasecmp(argv[c], "-I")) { if ((c + 1) == argc) goto usage; @@ -851,7 +901,7 @@ usage: lang_init = plat_language_code(argv[++c]); if (!lang_init) - printf("\nWarning: Invalid language code, ignoring --lang parameter.\n\n"); + always_log("\nWarning: Invalid language code, ignoring --lang parameter.\n\n"); // The return value of 0 only means that the code is invalid, // not related to that translation is exists or not for the @@ -882,21 +932,12 @@ usage: else cfg = argv[c++]; -#ifdef DEPRECATE_USAGE - deprecated = 0; -#endif + start_vmm = 0; } if (c != argc) goto usage; -#ifdef DEPRECATE_USAGE - if (deprecated) - pc_show_usage("Running 86Box without a specified VM path and/or configuration\n" - "file has been deprected. Please specify one or use a manager\n" - "(Avalonia 86 is recommended).\n\n"); -#endif - path_slash(usr_path); path_slash(rom_path); @@ -1010,6 +1051,14 @@ usage: /* At this point, we can safely create the full path name. */ path_append_filename(cfg_path, usr_path, p); + /* Build the global configuration file path. */ + if (global == NULL) { + plat_get_global_config_dir(global_cfg_path, sizeof(global_cfg_path)); + path_append_filename(global_cfg_path, global_cfg_path, GLOBAL_CONFIG_FILE); + } else { + strncpy(global_cfg_path, global, sizeof(global_cfg_path) - 1); + } + /* * Get the current directory's name * @@ -1033,6 +1082,8 @@ usage: #ifdef _WIN32 if (localtime_s(&time_buf, &now) == 0) info = &time_buf; + else + info = NULL; #else info = localtime_r(&now, &time_buf); #endif @@ -1044,59 +1095,92 @@ usage: pclog("#\n# %ls v%ls logfile, created %s\n#\n", EMU_NAME_W, EMU_VERSION_FULL_W, temp); - pclog("# VM: %s\n#\n", vm_name); + pclog("# Emulator path: %s\n", exe_path); - pclog("# Userfiles path: %s\n", usr_path); - for (rom_path_t *rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) { - pclog("# ROM path: %s\n", rom_path->path); + pclog("# Global configuration file: %s\n", global_cfg_path); + + /* Load the global configuration file. */ + config_load_global(); + config_save_global(); // hack + + /* Determine whether to start the VM manager. */ +#ifndef USE_SDL_UI + if (vmm_disabled && start_vmm) +#endif + { + start_vmm = 0; +#ifdef __APPLE__ + if (!strncmp(exe_path, "/private/var/folders/", 21)) { + ui_msgbox_header(MBX_FATAL, L"App Translocation", EMU_NAME_W L" cannot determine the emulated machine's location due to a macOS security feature. Please move the " EMU_NAME_W L" app to another folder (not /Applications), or make a copy of it and open that copy instead."); + return 0; + } +#endif } - pclog("# Configuration file: %s\n#\n\n", cfg_path); +#ifndef USE_SDL_UI if (strlen(vmm_path) != 0) { - vmm_enabled = 1; + /* -E specified on the command line. */ + start_vmm = 1; + } else { + strncpy(vmm_path, vmm_path_cfg, sizeof(vmm_path) - 1); + } + + if (start_vmm) { pclog("# VM Manager enabled. Path: %s\n", vmm_path); - } - /* - * We are about to read the configuration file, which MAY - * put data into global variables (the hard- and floppy - * disks are an example) so we have to initialize those - * modules before we load the config.. - */ - hdd_init(); - network_init(); - mouse_init(); - cdrom_global_init(); - zip_global_init(); - mo_global_init(); + strncpy(usr_path, vmm_path, sizeof(usr_path) - 1); + } else +#endif + { + pclog("# VM: %s\n#\n", vm_name); + pclog("# Configuration file: %s\n#\n\n", cfg_path); + pclog("# Userfiles path: %s\n", usr_path); - /* Initialize the keyboard accelerator list with default values */ - for (int x = 0; x < NUM_ACCELS; x++) { - strcpy(acc_keys[x].name, def_acc_keys[x].name); - strcpy(acc_keys[x].desc, def_acc_keys[x].desc); - strcpy(acc_keys[x].seq, def_acc_keys[x].seq); - } + for (rom_path_t *rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) { + pclog("# ROM path: %s\n", rom_path->path); + } - /* Load the configuration file. */ - config_load(); + /* + * We are about to read the configuration file, which MAY + * put data into global variables (the hard- and floppy + * disks are an example) so we have to initialize those + * modules before we load the config.. + */ + hdd_init(); + network_init(); + mouse_init(); + cdrom_global_init(); + rdisk_global_init(); + mo_global_init(); - /* Clear the CMOS and/or BIOS flash file, if we were started with - the relevant parameter(s). */ - if (clear_cmos) { - delete_nvr_file(0); - clear_cmos = 0; - } + /* Initialize the keyboard accelerator list with default values */ + for (int x = 0; x < NUM_ACCELS; x++) { + strcpy(acc_keys[x].name, def_acc_keys[x].name); + strcpy(acc_keys[x].desc, def_acc_keys[x].desc); + strcpy(acc_keys[x].seq, def_acc_keys[x].seq); + } - if (clear_flash) { - delete_nvr_file(1); - clear_flash = 0; - } + /* Load the configuration file. */ + config_load(); - for (uint8_t i = 0; i < FDD_NUM; i++) { - if (fn[i] != NULL) { - if (strlen(fn[i]) <= 511) - strncpy(floppyfns[i], fn[i], 511); - free(fn[i]); - fn[i] = NULL; + /* Clear the CMOS and/or BIOS flash file, if we were started with + the relevant parameter(s). */ + if (clear_cmos) { + delete_nvr_file(0); + clear_cmos = 0; + } + + if (clear_flash) { + delete_nvr_file(1); + clear_flash = 0; + } + + for (uint8_t i = 0; i < FDD_NUM; i++) { + if (fn[i] != NULL) { + if (strlen(fn[i]) <= 511) + strncpy(floppyfns[i], fn[i], 511); + free(fn[i]); + fn[i] = NULL; + } } } @@ -1131,11 +1215,10 @@ pc_full_speed(void) /* Initialize modules, ran once, after pc_init. */ int -pc_init_modules(void) +pc_init_roms(void) { int c; int m; - wchar_t temp[512]; char tempc[512]; if (dump_missing) { @@ -1174,6 +1257,16 @@ pc_init_modules(void) } pc_log("A total of %d ROM sets have been loaded.\n", c); + return 1; +} + +int +pc_init_modules(void) +{ + int c; + wchar_t temp[512]; + char tempc[512]; + /* Load the ROMs for the selected machine. */ if (!machine_available(machine)) { swprintf(temp, sizeof_w(temp), plat_get_string(STRING_HW_NOT_AVAILABLE_MACHINE), machine_getname()); @@ -1262,6 +1355,11 @@ pc_init_modules(void) machine_status_init(); + serial_set_next_inst(0); + + lpt_set_3bc_used(0); + lpt_set_next_inst(0); + for (c = 0; c <= 0x7ff; c++) { int64_t exp = c - 1023; /* 1023 = BIAS64 */ exp_pow_table[c] = pow(2.0, (double) exp); @@ -1376,10 +1474,6 @@ pc_reset_hard_close(void) lpt_devices_close(); -#ifdef UNCOMMENT_LATER - lpt_close(); -#endif - nvr_save(); nvr_close(); @@ -1395,7 +1489,7 @@ pc_reset_hard_close(void) cdrom_close(); - zip_close(); + rdisk_close(); mo_close(); @@ -1408,6 +1502,9 @@ pc_reset_hard_close(void) cpu_close(); serial_set_next_inst(0); + + lpt_set_3bc_used(0); + lpt_set_next_inst(0); } /* @@ -1446,6 +1543,8 @@ pc_reset_hard_init(void) scsi_reset(); scsi_device_init(); + ide_hard_reset(); + /* Initialize the actual machine and its basic modules. */ machine_init(); @@ -1467,6 +1566,7 @@ pc_reset_hard_init(void) /* Initialize parallel devices. */ /* note: PLIP LPT side has to be initialized before the network side */ + lpt_standalone_init(); lpt_devices_init(); /* Reset and reconfigure the serial ports. */ @@ -1489,9 +1589,6 @@ pc_reset_hard_init(void) fdd_reset(); - /* Reset the CD-ROM Controller module. */ - cdrom_interface_reset(); - /* Reset and reconfigure the SCSI layer. */ scsi_card_init(); @@ -1499,9 +1596,12 @@ pc_reset_hard_init(void) cdrom_hard_reset(); + /* Reset the CD-ROM Controller module. */ + cdrom_interface_reset(); + mo_hard_reset(); - zip_hard_reset(); + rdisk_hard_reset(); /* Reset any ISA ROM cards. */ @@ -1514,8 +1614,9 @@ pc_reset_hard_init(void) the chances of the SCSI controller ending up on the bridge. */ video_voodoo_init(); - if (joystick_type) - gameport_update_joystick_type(); /* installs game port if no device provides one, must be late */ + /* installs first game port if no device provides one, must be late */ + if (joystick_type[0]) + gameport_update_joystick_type(0); ui_sb_update_panes(); @@ -1664,7 +1765,7 @@ pc_close(UNUSED(thread_t *ptr)) cdrom_close(); - zip_close(); + rdisk_close(); mo_close(); @@ -1723,7 +1824,7 @@ pc_run(void) #ifdef USE_GDBSTUB /* avoid a KBC FIFO overflow when CPU emulation is stalled */ } #endif - joystick_process(); + joystick_process(0); // Gameport 0 endblit(); /* Done with this frame, update statistics. */ @@ -1928,13 +2029,11 @@ do_pause(int p) // Helper to find an accelerator key and return it's index in acc_keys int FindAccelerator(const char *name) { - for(int x=0;xregs.gporeg[i] = dev->gporeg_default[i]; if (dev->vendor == VEN_VIA_596B) { dev->regs.gpo_val = 0x7fffffff; - /* FIC VA-503A: - - Bit 11: ATX power (active high) - - Bit 4: 80-conductor cable on primary IDE channel (active low) - - Bit 3: 80-conductor cable on secondary IDE channel (active low) - - Bit 2: password cleared (active low) - ASUS P3V4X: - - Bit 15: 80-conductor cable on secondary IDE channel (active low) - - Bit 5: 80-conductor cable on primary IDE channel (active low) - BCM GT694VA: - - Bit 19: 80-conductor cable on secondary IDE channel (active low) - - Bit 17: 80-conductor cable on primary IDE channel (active low) - ASUS CUV4X-LS: - - Bit 2: 80-conductor cable on secondary IDE channel (active low) - - Bit 1: 80-conductor cable on primary IDE channel (active low) - Acorp 6VIA90AP: - - Bit 3: 80-conductor cable on secondary IDE channel (active low) - - Bit 1: 80-conductor cable on primary IDE channel (active low) */ + /* + - FIC VA-503A: + - Bit 11: ATX power (active high); + - Bit 4: 80-conductor cable on primary IDE channel (active low); + - Bit 3: 80-conductor cable on secondary IDE channel (active low); + - Bit 2: password cleared (active low). + - ASUS P3V4X: + - Bit 15: 80-conductor cable on secondary IDE channel (active low); + - Bit 5: 80-conductor cable on primary IDE channel (active low). + - BCM GT694VA: + - Bit 19: 80-conductor cable on secondary IDE channel (active low); + - Bit 17: 80-conductor cable on primary IDE channel (active low). + - ASUS CUV4X-LS: + - Bit 2: 80-conductor cable on secondary IDE channel (active low); + - Bit 1: 80-conductor cable on primary IDE channel (active low). + - Acorp 6VIA90AP: + - Bit 3: 80-conductor cable on secondary IDE channel (active low); + - Bit 1: 80-conductor cable on primary IDE channel (active low). + - FIC KA-6130: + - Bit 19: password cleared (active low). + */ dev->regs.gpi_val = 0xfff57fc1; if (!strcmp(machine_get_internal_name(), "ficva503a") || !strcmp(machine_get_internal_name(), "6via90ap")) dev->regs.gpi_val |= 0x00000004; + else if (!strcmp(machine_get_internal_name(), "ficka6130")) + dev->regs.gpi_val |= 0x00080000; /* TriGem Delhi-III second GPI word: - Bit 7 = Save CMOS (must be set); diff --git a/src/cdrom/CMakeLists.txt b/src/cdrom/CMakeLists.txt index 621b069b0..4d5f947ca 100644 --- a/src/cdrom/CMakeLists.txt +++ b/src/cdrom/CMakeLists.txt @@ -23,7 +23,11 @@ add_library(cdrom OBJECT cdrom.c cdrom_image.c cdrom_image_viso.c + cdrom_mke.c ) +if(NOT WIN32) + target_include_directories(86Box PRIVATE PkgConfig::SNDFILE) +endif() target_link_libraries(86Box PkgConfig::SNDFILE) if(CDROM_MITSUMI) diff --git a/src/cdrom/cdrom.c b/src/cdrom/cdrom.c index 9f6966d24..ffccbdcb4 100644 --- a/src/cdrom/cdrom.c +++ b/src/cdrom/cdrom.c @@ -32,6 +32,7 @@ #ifdef USE_CDROM_MITSUMI #include <86box/cdrom_mitsumi.h> #endif +#include <86box/cdrom_mke.h> #include <86box/log.h> #include <86box/plat.h> #include <86box/plat_cdrom_ioctl.h> @@ -121,8 +122,10 @@ static const struct { // clang-format off { &cdrom_interface_none_device }, #ifdef USE_CDROM_MITSUMI - { &mitsumi_cdrom_device }, + { &mitsumi_cdrom_device }, #endif + { &mke_cdrom_noncreative_device }, + { &mke_cdrom_device }, { NULL } // clang-format on }; @@ -292,10 +295,80 @@ msf_to_bcd(int *m, int *s, int *f) *f = bin2bcd(*f); } -static int -read_data(cdrom_t *dev, const uint32_t lba) +void +cdrom_compute_ecc_block(cdrom_t *dev, uint8_t *parity, const uint8_t *data, + uint32_t major_count, uint32_t minor_count, + uint32_t major_mult, uint32_t minor_inc, int m2f1) { - int ret = 1; + uint32_t size = major_count * minor_count; + + for (uint32_t major = 0; major < major_count; ++major) { + uint32_t index = (major >> 1) * major_mult + (major & 1); + + uint8_t ecc_a = 0; + uint8_t ecc_b = 0; + + for (uint32_t minor = 0; minor < minor_count; ++minor) { + uint8_t temp = data[index]; + + if (m2f1 && (index < 4)) + temp = 0x00; + + index += minor_inc; + + if (index >= size) + index -= size; + + ecc_a ^= temp; + ecc_b ^= temp; + ecc_a = dev->_F_LUT[ecc_a]; + } + + parity[major] = dev->_B_LUT[dev->_F_LUT[ecc_a] ^ ecc_b]; + parity[major + major_count] = parity[major] ^ ecc_b; + } +} + +static void +cdrom_generate_ecc_data(cdrom_t *dev, const uint8_t *data, int m2f1) +{ + /* Compute ECC P code. */ + cdrom_compute_ecc_block(dev, dev->p_parity, data, 86, 24, 2, 86, m2f1); + + /* Compute ECC Q code. */ + cdrom_compute_ecc_block(dev, dev->q_parity, data, 52, 43, 86, 88, m2f1); +} + +static int +cdrom_is_sector_good(cdrom_t *dev, const uint8_t *b, const uint8_t mode2, const uint8_t form) +{ + int ret = 1; + + if (!mode2 || (form != 1)) { + if (mode2 && (form == 1)) { + const uint32_t crc = cdrom_crc32(0xffffffff, &(b[16]), 2056) ^ 0xffffffff; + + ret = ret && (crc == (*(uint32_t *) &(b[2072]))); + } else if (!mode2) { + const uint32_t crc = cdrom_crc32(0xffffffff, b, 2064) ^ 0xffffffff; + + ret = ret && (crc == (*(uint32_t *) &(b[2064]))); + } + + cdrom_generate_ecc_data(dev, &(b[12]), mode2 && (form == 1)); + + ret = ret && !memcmp(dev->p_parity, &(b[2076]), 172); + ret = ret && !memcmp(dev->q_parity, &(b[2248]), 104); + } + + return ret; +} + +static int +read_data(cdrom_t *dev, const uint32_t lba, int check) +{ + int ret = 1; + int form = 0; if (dev->cached_sector != lba) { dev->cached_sector = lba; @@ -303,6 +376,25 @@ read_data(cdrom_t *dev, const uint32_t lba) ret = dev->ops->read_sector(dev->local, dev->raw_buffer[dev->cur_buf ^ 1], lba); + if ((ret > 0) && check) { + if (dev->mode2) { + if (dev->raw_buffer[dev->cur_buf ^ 1][0x000f] == 0x01) + /* + Use Mode 1, since evidently specification-violating + discs exist. + */ + dev->mode2 = 0; + else if (dev->raw_buffer[dev->cur_buf ^ 1][0x0012] == + dev->raw_buffer[dev->cur_buf ^ 1][0x0016]) + form = ((dev->raw_buffer[dev->cur_buf ^ 1][0x0012] & + 0x20) >> 5) + 1; + } else if (dev->raw_buffer[dev->cur_buf ^ 1][0x000f] == 0x02) + dev->mode2 = 1; + + if (!cdrom_is_sector_good(dev, dev->raw_buffer[dev->cur_buf ^ 1], dev->mode2, form)) + ret = -1; + } + if (ret <= 0) { memset(dev->raw_buffer[dev->cur_buf ^ 1], 0x00, 2448); dev->cached_sector = -1; @@ -322,7 +414,7 @@ cdrom_get_subchannel(cdrom_t *dev, const uint32_t lba, if (lba != dev->cached_sector) dev->cached_sector = -1; - (void) read_data(dev, lba); + (void) read_data(dev, lba, 0); for (int i = 0; i < 12; i++) for (int j = 0; j < 8; j++) @@ -679,7 +771,7 @@ track_type_is_valid(UNUSED(const cdrom_t *dev), const int type, const int flags, static int read_audio(cdrom_t *dev, const uint32_t lba, uint8_t *b) { - const int ret = read_data(dev, lba); + const int ret = read_data(dev, lba, 0); memcpy(b, dev->raw_buffer[dev->cur_buf], 2352); @@ -1100,6 +1192,12 @@ cdrom_is_early(const int type) return (cdrom_drive_types[type].scsi_std == 1); } +int +cdrom_is_dvd(const int type) +{ + return (cdrom_drive_types[type].is_dvd == 1); +} + int cdrom_is_generic(const int type) { @@ -1151,6 +1249,26 @@ cdrom_get_type_count(void) return count; } +void +cdrom_generate_name_mke(const int type, char *name) +{ + char elements[2][512] = { 0 }; + + memcpy(elements[0], cdrom_drive_types[type].model, + strlen(cdrom_drive_types[type].model) + 1); + char *s = strstr(elements[0], " "); + if (s != NULL) + s[0] = 0x00; + + memcpy(elements[1], cdrom_drive_types[type].revision, + strlen(cdrom_drive_types[type].revision) + 1); + s = strstr(elements[1], " "); + if (s != NULL) + s[0] = 0x00; + + sprintf(name, "%s%s", elements[0], elements[1]); +} + void cdrom_get_identify_model(const int type, char *name, const int id) { @@ -1589,7 +1707,7 @@ cdrom_audio_track_search(cdrom_t *dev, const uint32_t pos, dev->seek_pos = MSFtoLBA(ti.m, ti.s, ti.f) - 150; else { cdrom_log(dev->log, "Unable to get the starting position for " - "track %08X\n", ismsf & 0xff); + "track %08X\n", pos2 & 0xff); cdrom_stop(dev); } break; @@ -1707,7 +1825,7 @@ cdrom_audio_play_toshiba(cdrom_t *dev, const uint32_t pos, const int type) dev->cd_end = MSFtoLBA(ti.m, ti.s, ti.f) - 150; else { cdrom_log(dev->log, "Unable to get the starting position for " - "track %08X\n", ismsf & 0xff); + "track %08X\n", pos2 & 0xff); cdrom_stop(dev); } break; @@ -1740,7 +1858,7 @@ cdrom_audio_scan(cdrom_t *dev, const uint32_t pos) uint8_t ret = 0; if (dev->cd_status & CD_STATUS_HAS_AUDIO) { - cdrom_log(dev->log, "Audio Scan: MSF = %06x, type = %02x\n", pos, type); + cdrom_log(dev->log, "Audio Scan: MSF = %06x\n", pos); if (pos == 0xffffffff) { cdrom_log(dev->log, "(Type 0) Search from current position\n"); @@ -2009,9 +2127,10 @@ cdrom_get_current_subcodeq_playstatus(cdrom_t *dev, uint8_t *b) cdrom_get_current_subcodeq(dev, b); switch (dev->cd_status) { - default: case CD_STATUS_EMPTY: - case CD_STATUS_DATA_ONLY: case CD_STATUS_DVD: - case CD_STATUS_STOPPED: case CD_STATUS_PLAYING_COMPLETED: + default: case CD_STATUS_EMPTY: + case CD_STATUS_DATA_ONLY: case CD_STATUS_DVD: + case CD_STATUS_STOPPED: case CD_STATUS_PLAYING_COMPLETED: + case CD_STATUS_DVD_REJECTED: ret = 0x03; break; case CD_STATUS_HOLD: @@ -2360,7 +2479,7 @@ cdrom_readsector_raw(cdrom_t *dev, uint8_t *buffer, const int sector, const int ecc_diff = 0; } - if (dev->cd_status != CD_STATUS_EMPTY) { + if ((dev->cd_status != CD_STATUS_EMPTY) && (dev->cd_status != CD_STATUS_DVD_REJECTED)) { uint8_t *temp_b; uint8_t *b = temp_b = buffer; int audio = 0; @@ -2379,6 +2498,8 @@ cdrom_readsector_raw(cdrom_t *dev, uint8_t *buffer, const int sector, const int if (dm != CD_TRACK_NORMAL) mode2 = 1; + dev->mode2 = mode2; + memset(dev->extra_buffer, 0, 296); if ((cdrom_sector_flags & 0xf8) == 0x08) { @@ -2405,7 +2526,7 @@ cdrom_readsector_raw(cdrom_t *dev, uint8_t *buffer, const int sector, const int else ret = read_audio(dev, lba, temp_b); } else { - ret = read_data(dev, lba); + ret = read_data(dev, lba, 1); /* Return with error if we had one. */ if (ret > 0) { @@ -2800,7 +2921,7 @@ cdrom_read_track_information(cdrom_t *dev, const uint8_t *cdb, uint8_t *buffer) } if (track->adr_ctl & 0x04) { - ret = read_data(dev, start); + ret = read_data(dev, start, 0); mode = dev->raw_buffer[dev->cur_buf][3]; } } else if (track->point != 0xa2) @@ -2829,9 +2950,9 @@ uint8_t cdrom_get_current_mode(cdrom_t *dev) { if (dev->cached_sector == -1) - (void) read_data(dev, dev->seek_pos); + (void) read_data(dev, dev->seek_pos, 0); else - (void) read_data(dev, dev->cached_sector); + (void) read_data(dev, dev->cached_sector, 0); return dev->raw_buffer[dev->cur_buf][3]; } @@ -2864,7 +2985,7 @@ cdrom_update_status(cdrom_t *dev) dev->cached_sector = -1; dev->cdrom_capacity = dev->ops->get_last_block(dev->local); - if (dev->cd_status != CD_STATUS_EMPTY) { + if ((dev->cd_status != CD_STATUS_EMPTY) && (dev->cd_status != CD_STATUS_DVD_REJECTED)) { /* Signal media change to the emulated machine. */ cdrom_insert(dev->id); @@ -2906,9 +3027,14 @@ cdrom_load(cdrom_t *dev, const char *fn, const int skip_insert) if ((dev->ops->is_empty != NULL) && dev->ops->is_empty(dev->local)) dev->cd_status = CD_STATUS_EMPTY; - else if (dev->ops->is_dvd(dev->local)) - dev->cd_status = CD_STATUS_DVD; - else + else if (dev->ops->is_dvd(dev->local)) { + if (cdrom_is_dvd(dev->type)) + dev->cd_status = CD_STATUS_DVD; + else { + warning("DVD image \"%s\" in a CD-only drive, reporting as empty\n", fn); + dev->cd_status = CD_STATUS_DVD_REJECTED; + } + } else dev->cd_status = dev->ops->has_audio(dev->local) ? CD_STATUS_STOPPED : CD_STATUS_DATA_ONLY; @@ -2922,7 +3048,7 @@ cdrom_load(cdrom_t *dev, const char *fn, const int skip_insert) cdrom_toc_dump(dev); #endif - if (!skip_insert && (dev->cd_status != CD_STATUS_EMPTY)) { + if (!skip_insert && (dev->cd_status != CD_STATUS_EMPTY) && (dev->cd_status != CD_STATUS_DVD_REJECTED)) { /* Signal media change to the emulated machine. */ cdrom_insert(dev->id); @@ -3011,6 +3137,11 @@ cdrom_hard_reset(void) cdrom_load(dev, dev->image_path, 0); } + + for (uint32_t j = 0; j < _LUT_SIZE; ++j) { + dev->_F_LUT[j] = (j << 1) ^ (j & 0x80 ? 0x11d : 0); + dev->_B_LUT[j ^ dev->_F_LUT[j]] = j; + } } } diff --git a/src/cdrom/cdrom_image.c b/src/cdrom/cdrom_image.c index 6bc284fd3..ac4d067b5 100644 --- a/src/cdrom/cdrom_image.c +++ b/src/cdrom/cdrom_image.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #ifndef _WIN32 # include @@ -84,17 +85,148 @@ typedef struct track_t { track_index_t idx[3]; } track_t; +/* + MDS for DVD has the disc structure table - 4 byte pointer to BCA, + followed by the copyright, DMI, and layer pages. +*/ +#pragma pack(push, 1) +typedef struct +{ + uint8_t f1[4]; + uint8_t f4[2048]; + uint8_t f0[2048]; +} layer_t; + +typedef struct +{ + layer_t layers[2]; +} mds_disc_struct_t; +#pragma pack(pop) + +#define dstruct_t mds_disc_struct_t + typedef struct cd_image_t { cdrom_t *dev; void *log; int is_dvd; int has_audio; + int has_dstruct; int32_t tracks_num; uint32_t bad_sectors_num; track_t *tracks; uint32_t *bad_sectors; + dstruct_t dstruct; } cd_image_t; +typedef enum +{ + CD = 0x00, /* CD-ROM */ + CD_R = 0x01, /* CD-R */ + CD_RW = 0x02, /* CD-RW */ + DVD = 0x10, /* DVD-ROM */ + DVD_MINUS_R = 0x12 /* DVD-R */ +} mds_medium_type_t; + +typedef enum +{ + UNKNOWN = 0x00, + AUDIO = 0xa9, /* sector size = 2352 */ + MODE1 = 0xaa, /* sector size = 2048 */ + MODE2 = 0xab, /* sector size = 2336 */ + MODE2_FORM1 = 0xac, /* sector size = 2048 */ + MODE2_FORM2 = 0xad /* sector size = 2324 (+4) */ +} mds_trk_mode_t; + +typedef enum +{ + NONE = 0x00, /* no subchannel */ + PW_INTERLEAVED = 0x08 /* 96-byte PW subchannel, interleaved */ +} mds_subch_mode_t; + +#pragma pack(push, 1) +typedef struct +{ + uint8_t file_sig[16]; + uint8_t file_ver[2]; + uint16_t medium_type; + uint16_t sess_num; + uint16_t pad[2]; + uint16_t bca_data_len; + uint32_t pad0[2]; + uint32_t bca_data_offs_offs; + uint32_t pad1[6]; + uint32_t disc_struct_offs; + uint32_t pad2[3]; + uint32_t sess_blocks_offs; + uint32_t dpm_blocks_offs; +} mds_hdr_t; /* 88 bytes */ + +typedef struct +{ + int32_t sess_start; + int32_t sess_end; + uint16_t sess_id; + uint8_t all_blocks_num; + uint8_t non_track_blocks_num; + uint16_t first_trk; + uint16_t last_trk; + uint32_t pad; + uint32_t trk_blocks_offs; +} mds_sess_block_t; /* 24 bytes */ + +typedef struct +{ + uint8_t trk_mode; + /* DiscImageCreator says this is the number of subchannels. */ + uint8_t subch_mode; + uint8_t adr_ctl; + uint8_t track_id; + uint8_t point; + uint8_t m; + uint8_t s; + uint8_t f; + uint8_t zero; + uint8_t pm; + uint8_t ps; + uint8_t pf; + /* DiscImageCreator calls this the index offset. */ + uint32_t ex_offs; + uint16_t sector_len; + /* DiscImageCreator says unknown1 followed by 17x zero. */ + uint8_t pad0[18]; + uint32_t start_sect; + uint64_t start_offs; + uint32_t files_num; + uint32_t footer_offs; + uint8_t pad1[24]; +} mds_trk_block_t; /* 80 bytes */ + +/* + DiscImageCreator's interpretation here makes sense and essentially + matches libmirage's - Index 0 sectors followed by Index 1 sectors. + */ +typedef struct +{ + uint32_t pregap; + uint32_t trk_sectors; +} mds_trk_ex_block_t; /* 8 bytes */ + +typedef struct +{ + uint32_t fn_offs; + uint32_t fn_is_wide; + uint32_t pad; + uint32_t pad0; +} mds_footer_t; /* 16 bytes */ + +typedef struct +{ + uint32_t type; + uint32_t pad[2]; + uint32_t entries; +} mds_dpm_block_t; +#pragma pack(pop) + #ifdef ENABLE_IMAGE_LOG int image_do_log = ENABLE_IMAGE_LOG; @@ -284,6 +416,9 @@ bin_close(void *priv) memset(tf->fn, 0x00, sizeof(tf->fn)); + log_close(tf->log); + tf->log = NULL; + free(priv); } @@ -298,6 +433,11 @@ bin_init(const uint8_t id, const char *filename, int *error) return NULL; } + char n[1024] = { 0 }; + + sprintf(n, "CD-ROM %i Bin ", id + 1); + tf->log = log_open(n); + memset(tf->fn, 0x00, sizeof(tf->fn)); strncpy(tf->fn, filename, sizeof(tf->fn) - 1); tf->fp = plat_fopen64(tf->fn, "rb"); @@ -314,11 +454,6 @@ bin_init(const uint8_t id, const char *filename, int *error) tf->read = bin_read; tf->get_length = bin_get_length; tf->close = bin_close; - - char n[1024] = { 0 }; - - sprintf(n, "CD-ROM %i Bin ", id + 1); - tf->log = log_open(n); } else { /* From the check above, error may still be non-zero if opening a directory. * The error is set for viso to try and open the directory following this function. @@ -326,8 +461,12 @@ bin_init(const uint8_t id, const char *filename, int *error) if ((tf->fp != NULL) && ((stats.st_mode & S_IFMT) == S_IFDIR)) { /* tf is freed by bin_close */ bin_close(tf); - } else + } else { + log_close(tf->log); + tf->log = NULL; + free(tf); + } tf = NULL; } @@ -1183,7 +1322,7 @@ image_process(cd_image_t *img) ct->point, j, cit[ci->type + 2], ci->file_start * ct->sector_size); image_log(img->log, " TOC data: %02X %02X %02X " - "%%02X %02X %02X %02X 02X %02X %02X %02X\n", + "%02X %02X %02X %02X %02X %02X %02X %02X\n", ct->session, ct->attr, ct->tno, ct->point, ct->extra[0], ct->extra[1], ct->extra[2], ct->extra[3], (uint32_t) ((ci->start / 75) / 60), @@ -1208,12 +1347,12 @@ image_set_track_subch_type(track_t *ct) static int image_load_iso(cd_image_t *img, const char *filename) { - track_t *ct = NULL; - track_index_t *ci = NULL; - track_file_t *tf = NULL; - int success = 1; - int error = 1; - int is_viso = 0; + track_t *ct = NULL; + track_index_t *ci = NULL; + track_file_t *tf = NULL; + int success = 1; + int error = 1; + int is_viso = 0; int sector_sizes[8] = { 2448, 2368, RAW_SECTOR_SIZE, 2336, 2332, 2328, 2324, COOKED_SECTOR_SIZE }; @@ -1308,8 +1447,12 @@ image_load_iso(cd_image_t *img, const char *filename) if (success) image_process(img); else { - image_log(img->log, " [ISO ] Unable to open image or folder \"%s\"\n", - filename); +#ifdef ENABLE_IMAGE_LOG + log_warning(img->log, "Unable to open image or folder \"%s\"\n", + filename); +#else + warning("Unable to open image or folder \"%s\"\n", filename); +#endif return 0; } @@ -1446,9 +1589,9 @@ image_load_cue(cd_image_t *img, const char *cuefile) if (last_t != -1) { /* Important: This has to be done like this because pointers - change due to realloc. + change due to realloc. */ - ct = &(img->tracks[t]); + ct = &(img->tracks[img->tracks_num - 1]); for (int i = 2; i >= 0; i--) { if (ct->idx[i].file == NULL) @@ -1654,11 +1797,434 @@ image_load_cue(cd_image_t *img, const char *cuefile) if (success) image_process(img); - else { - image_log(img->log, " [CUE ] Unable to open Cue sheet \"%s\"\n", cuefile); + else +#ifdef ENABLE_IMAGE_LOG + log_warning(img->log, " [CUE ] Unable to open Cue sheet \"%s\"\n", cuefile); +#else + warning("Unable to open Cue sheet \"%s\"\n", cuefile); +#endif + + return success; +} + +// Converts UTF-16 string into UTF-8 string. +// If destination string is NULL returns total number of symbols that would've +// been written (without null terminator). However, when actually writing into +// destination string, it does include it. So, be sure to allocate extra byte +// for destination string. +// Params: +// u16_str - source UTF-16 string +// u16_str_len - length of source UTF-16 string +// u8_str - destination UTF-8 string +// u8_str_size - size of destination UTF-8 string in bytes +// Return value: +// 0 on success, -1 if encountered invalid surrogate pair, -2 if +// encountered buffer overflow or length of destination UTF-8 string in bytes +// (without including the null terminator). +long int utf16_to_utf8(const uint16_t *u16_str, size_t u16_str_len, + uint8_t *u8_str, size_t u8_str_size) +{ + size_t i = 0, j = 0; + + if (!u8_str) { + u8_str_size = u16_str_len * 4; + } + + while (i < u16_str_len) { + uint32_t codepoint = u16_str[i++]; + + // check for surrogate pair + if (codepoint >= 0xD800 && codepoint <= 0xDBFF) { + uint16_t high_surr = codepoint; + uint16_t low_surr = u16_str[i++]; + + if (low_surr < 0xDC00 || low_surr > 0xDFFF) + return -1; + + codepoint = ((high_surr - 0xD800) << 10) + + (low_surr - 0xDC00) + 0x10000; + } + + if (codepoint < 0x80) { + if (j + 1 > u8_str_size) return -2; + + if (u8_str) u8_str[j] = (char)codepoint; + + j++; + } else if (codepoint < 0x800) { + if (j + 2 > u8_str_size) return -2; + + if (u8_str) { + u8_str[j + 0] = 0xC0 | (codepoint >> 6); + u8_str[j + 1] = 0x80 | (codepoint & 0x3F); + } + + j += 2; + } else if (codepoint < 0x10000) { + if (j + 3 > u8_str_size) return -2; + + if (u8_str) { + u8_str[j + 0] = 0xE0 | (codepoint >> 12); + u8_str[j + 1] = 0x80 | ((codepoint >> 6) & 0x3F); + u8_str[j + 2] = 0x80 | (codepoint & 0x3F); + } + + j += 3; + } else { + if (j + 4 > u8_str_size) return -2; + + if (u8_str) { + u8_str[j + 0] = 0xF0 | (codepoint >> 18); + u8_str[j + 1] = 0x80 | ((codepoint >> 12) & 0x3F); + u8_str[j + 2] = 0x80 | ((codepoint >> 6) & 0x3F); + u8_str[j + 3] = 0x80 | (codepoint & 0x3F); + } + + j += 4; + } + } + + if (u8_str) { + if (j >= u8_str_size) return -2; + u8_str[j] = '\0'; + } + + return (long int)j; +} + +static int +image_load_mds(cd_image_t *img, const char *mdsfile) +{ + track_t *ct = NULL; + track_index_t *ci = NULL; + track_file_t *tf = NULL; + int is_viso = 0; + int last_t = -1; + int error; + char pathname[MAX_FILENAME_LENGTH]; + char ofn[2048] = { 0 }; + + mds_hdr_t mds_hdr = { 0 }; + mds_sess_block_t mds_sess_block = { 0 }; + mds_trk_block_t mds_trk_block = { 0 }; + mds_trk_ex_block_t mds_trk_ex_block = { 0 }; + mds_footer_t mds_footer = { 0 }; + mds_dpm_block_t mds_dpm_block = { 0 }; + uint32_t mds_dpm_blocks_num = 0x00000000; + uint32_t mds_dpm_block_offs = 0x00000000; + + img->tracks = NULL; + img->tracks_num = 0; + + /* Get a copy of the filename into pathname, we need it later. */ + memset(pathname, 0, MAX_FILENAME_LENGTH * sizeof(char)); + path_get_dirname(pathname, mdsfile); + + /* Open the file. */ + FILE *fp = plat_fopen(mdsfile, "rb"); + if (fp == NULL) + return 0; + + int success = 0; + + /* + Pass 1 - loading the MDS sheet. + */ + image_log(img->log, "Pass 1 (loading the Media Descriptor Sheet)...\n"); + img->tracks_num = 0; + success = 2; + + fseek(fp, 0, SEEK_SET); + fread(&mds_hdr, 1, sizeof(mds_hdr_t), fp); + + if (memcmp(mds_hdr.file_sig, "MEDIA DESCRIPTOR", 16)) { +#ifdef ENABLE_IMAGE_LOG + log_warning(img->log, " [MDS ] \"%s\"\n is not an actual MDF file", + mdsfile); +#else + warning("\"%s\"\n is not an actual MDF file", mdsfile); +#endif + fclose(fp); return 0; } + if (mds_hdr.file_ver[0] == 0x02) { +#ifdef ENABLE_IMAGE_LOG + log_warning(img->log, " [MDS ] \"%s\" is a Daemon Tools encrypted MDS which is not supported\n", + mdsfile); +#else + warning("\"%s\" is a Daemon Tools encrypted MDS which is not supported\n", mdsfile); +#endif + fclose(fp); + return 0; + } + + img->is_dvd = (mds_hdr.medium_type >= 0x10); + + if (img->is_dvd) { + if (mds_hdr.disc_struct_offs != 0x00) { + fseek(fp, mds_hdr.disc_struct_offs, SEEK_SET); + fread(&(img->dstruct.layers[0]), 1, sizeof(layer_t), fp); + img->has_dstruct = 1; + + if (((img->dstruct.layers[0].f0[2] & 0x60) >> 4) == 0x01) { + fseek(fp, mds_hdr.disc_struct_offs, SEEK_SET); + fread(&(img->dstruct.layers[1]), 1, sizeof(layer_t), fp); + img->has_dstruct++; + } + } + + for (int t = 0; t < 3; t++) { + ct = image_insert_track(img, 1, 0xa0 + t); + + ct->attr = DATA_TRACK; + ct->mode = 0; + ct->form = 0; + ct->tno = 0; + ct->subch_type = 0; + memset(ct->extra, 0x00, 4); + + for (int i = 0; i < 3; i++) { + ci = &(ct->idx[i]); + ci->type = INDEX_NONE; + ci->start = 0; + ci->length = 0; + ci->file_start = 0; + ci->file_length = 0; + ci->file = NULL; + } + + ci = &(ct->idx[1]); + + if (t < 2) + ci->start = (0x01 * 60 * 75) + (0 * 75) + 0; + } + } + + if (mds_hdr.dpm_blocks_offs != 0x00) { + fseek(fp, mds_hdr.dpm_blocks_offs, SEEK_SET); + fread(&mds_dpm_blocks_num, 1, sizeof(uint32_t), fp); + + if (mds_dpm_blocks_num > 0) for (int b = 0; b < mds_dpm_blocks_num; b++) { + fseek(fp, mds_hdr.dpm_blocks_offs + 4 + (b * 4), SEEK_SET); + fread(&mds_dpm_block_offs, 1, sizeof(uint32_t), fp); + + fseek(fp, mds_dpm_block_offs, SEEK_SET); + fread(&mds_dpm_block, 1, sizeof(mds_dpm_block_t), fp); + + /* We currently only support the bad sectors block and not (yet) actual DPM. */ + if (mds_dpm_block.type == 0x00000002) { + /* Bad sectors. */ + img->bad_sectors_num = mds_dpm_block.entries; + img->bad_sectors = (uint32_t *) malloc(img->bad_sectors_num * sizeof(uint32_t)); + fseek(fp, mds_dpm_block_offs + sizeof(mds_dpm_block_t), SEEK_SET); + fread(img->bad_sectors, 1, img->bad_sectors_num * sizeof(uint32_t), fp); + break; + } + } + } + + for (int s = 0; s < mds_hdr.sess_num; s++) { + fseek(fp, mds_hdr.sess_blocks_offs + (s * sizeof(mds_sess_block_t)), SEEK_SET); + fread(&mds_sess_block, 1, sizeof(mds_sess_block_t), fp); + + for (int t = 0; t < mds_sess_block.all_blocks_num; t++) { + fseek(fp, mds_sess_block.trk_blocks_offs + (t * sizeof(mds_trk_block_t)), SEEK_SET); + fread(&mds_trk_block, 1, sizeof(mds_trk_block_t), fp); + + if (last_t != -1) { + /* + Important: This has to be done like this because pointers + change due to realloc. + */ + ct = &(img->tracks[img->tracks_num - 1]); + + for (int i = 2; i >= 0; i--) { + if (ct->idx[i].file == NULL) + ct->idx[i].file = tf; + else + break; + } + } + + last_t = mds_trk_block.point; + ct = image_insert_track(img, mds_sess_block.sess_id, mds_trk_block.point); + + if (img->is_dvd) { + /* DVD images have no extra block - the extra block offset is the track length. */ + memset(&mds_trk_ex_block, 0x00, sizeof(mds_trk_ex_block_t)); + mds_trk_ex_block.pregap = 0x00000000; + mds_trk_ex_block.trk_sectors = mds_trk_block.ex_offs; + } else if (mds_trk_block.ex_offs != 0ULL) { + fseek(fp, mds_trk_block.ex_offs, SEEK_SET); + fread(&mds_trk_ex_block, 1, sizeof(mds_trk_ex_block), fp); + } + + uint32_t astart = mds_trk_block.start_sect - mds_trk_ex_block.pregap; + uint32_t aend = astart + mds_trk_ex_block.pregap; + uint32_t aend2 = aend + mds_trk_ex_block.trk_sectors; + uint32_t astart2 = mds_trk_block.start_sect + mds_trk_ex_block.trk_sectors; + + if (mds_trk_block.footer_offs != 0ULL) for (uint32_t ff = 0; ff < mds_trk_block.files_num; ff++) { + fseek(fp, mds_trk_block.footer_offs + (ff * sizeof(mds_footer_t)), SEEK_SET); + fread(&mds_footer, 1, sizeof(mds_footer_t), fp); + + uint16_t wfn[2048] = { 0 }; + char fn[2048] = { 0 }; + fseek(fp, mds_footer.fn_offs, SEEK_SET); + if (mds_footer.fn_is_wide) { + for (int i = 0; i < 256; i++) { + fread(&(wfn[i]), 1, 2, fp); + if (wfn[i] == 0x0000) + break; + } + (void) utf16_to_utf8(wfn, 2048, (uint8_t *) fn, 2048); + } else for (int i = 0; i < 512; i++) { + fread(&fn[i], 1, 1, fp); + if (fn[i] == 0x00) + break; + } + + if (!stricmp(fn, "*.mdf")) { + strcpy(fn, mdsfile); + fn[strlen(mdsfile) - 3] = 'm'; + fn[strlen(mdsfile) - 2] = 'd'; + fn[strlen(mdsfile) - 1] = 'f'; + } + + char filename[2048] = { 0 }; + if (!path_abs(fn)) + path_append_filename(filename, pathname, fn); + else + strcpy(filename, fn); + + if (strcmp(ofn, filename) != 0) { + tf = index_file_init(img->dev->id, filename, &error, &is_viso); + strcpy(ofn, filename); + } + } + + ct->sector_size = mds_trk_block.sector_len; + ct->form = 0; + ct->tno = mds_trk_block.track_id; + ct->subch_type = mds_trk_block.subch_mode; + ct->extra[0] = mds_trk_block.m; + ct->extra[1] = mds_trk_block.s; + ct->extra[2] = mds_trk_block.f; + ct->extra[3] = mds_trk_block.zero; + /* + Note from DiscImageCreator: + + I hexedited the track mode field with various values and fed it to Alchohol; + it seemed that high part of byte had no effect at all; only the lower one + affected the mode, in the following manner: + 00: Mode 2, 01: Audio, 02: Mode 1, 03: Mode 2, 04: Mode 2 Form 1, + 05: Mode 2 Form 2, 06: UKNONOWN, 07: Mode 2 + 08: Mode 2, 09: Audio, 0A: Mode 1, 0B: Mode 2, 0C: Mode 2 Form 1, + 0D: Mode 2 Form 2, 0E: UKNONOWN, 0F: Mode 2 + */ + ct->attr = ((mds_trk_block.trk_mode & 0x07) == 0x01) ? + AUDIO_TRACK : DATA_TRACK; + ct->mode = 0; + ct->form = 0; + if (((mds_trk_block.trk_mode & 0x07) != 0x01) && + ((mds_trk_block.trk_mode & 0x07) != 0x06)) + ct->mode = ((mds_trk_block.trk_mode & 0x07) != 0x02) + 1; + if ((mds_trk_block.trk_mode & 0x06) == 0x04) + ct->form = (mds_trk_block.trk_mode & 0x07) - 0x03; + if (ct->attr == AUDIO_TRACK) + success = 1; + + if (((ct->sector_size == 2336) || (ct->sector_size == 2332)) && (ct->mode == 2) && (ct->form == 1)) + ct->skip = 8; + + ci = &(ct->idx[0]); + if (ct->point < 0xa0) { + ci->start = astart + 150; + ci->length = mds_trk_ex_block.pregap; + } + ci->type = (ci->length > 0) ? INDEX_ZERO : INDEX_NONE; + ci->file_start = 0; + ci->file_length = 0; + ci->file = NULL; + + ci = &(ct->idx[1]); + if ((mds_trk_block.point >= 1) && (mds_trk_block.point <= 99)) { + ci->start = aend + 150; + ci->length = mds_trk_ex_block.trk_sectors; + ci->type = INDEX_NORMAL; + ci->file_start = mds_trk_block.start_offs / ct->sector_size; + ci->file_length = ci->length; + ci->file = tf; + } else { + ci->start = (mds_trk_block.pm * 60 * 75) + (mds_trk_block.ps * 75) + mds_trk_block.pf; + ci->type = INDEX_NONE; + ci->file_start = 0; + ci->file_length = 0; + ci->file = NULL; + } + + ci = &(ct->idx[2]); + if (ct->point < 0xa0) { + ci->start = aend2 + 150; + ci->length = astart2 - aend2; + } + ci->type = (ci->length > 0) ? INDEX_ZERO : INDEX_NONE; + ci->file_start = 0; + ci->file_length = 0; + ci->file = NULL; + + if (img->is_dvd) { + ci = &(ct->idx[1]); + uint32_t total = ci->start + ci->length; + + ci = &(img->tracks[2].idx[1]); + ci->start = total; + } + } + + for (int i = 2; i >= 0; i--) { + if (ct->point >= 0xa0) + ci->type = INDEX_SPECIAL; + + if (ct->idx[i].file == NULL) + ct->idx[i].file = tf; + else + break; + } + } + + tf = NULL; + + fclose(fp); + + if (success) { +#ifdef ENABLE_IMAGE_LOG + image_log(img->log, "Final tracks list:\n"); + for (int i = 0; i < img->tracks_num; i++) { + ct = &(img->tracks[i]); + for (int j = 0; j < 3; j++) { + ci = &(ct->idx[j]); + image_log(img->log, " [TRACK ] %02X INDEX %02X: [%8s, %016" PRIX64 "]\n", + ct->point, j, + cit[ci->type + 2], ci->file_start * ct->sector_size); + image_log(img->log, " TOC data: %02X %02X %02X " + "%02X %02X %02X %02X %02X %02X %02X %02X\n", + ct->session, ct->attr, ct->tno, ct->point, + ct->extra[0], ct->extra[1], ct->extra[2], ct->extra[3], + (uint32_t) ((ci->start / 75) / 60), + (uint32_t) ((ci->start / 75) % 60), + (uint32_t) (ci->start % 75)); + } + } +#endif + } else +#ifdef ENABLE_IMAGE_LOG + log_warning(img->log, " [MDS ] Unable to open MDS sheet \"%s\"\n", mdsfile); +#else + warning("Unable to open MDS sheet \"%s\"\n", mdsfile); +#endif + return success; } @@ -1713,8 +2279,8 @@ image_get_track_info(const void *local, const uint32_t track, } if (ct != NULL) { - const uint32_t pos = end ? ct->idx[1].start : - (ct->idx[1].start + ct->idx[1].length); + const uint32_t pos = end ? (ct->idx[1].start + ct->idx[1].length) : + ct->idx[1].start; ti->number = ct->point; ti->attr = ct->attr; @@ -1784,6 +2350,7 @@ image_read_sector(const void *local, uint8_t *buffer, const uint32_t sector) { const cd_image_t *img = (const cd_image_t *) local; + cdrom_t *dev = (cdrom_t *) img->dev; int m = 0; int s = 0; int f = 0; @@ -1792,6 +2359,7 @@ image_read_sector(const void *local, uint8_t *buffer, int track; int index; uint8_t q[16] = { 0x00 }; + uint8_t *buf = buffer; if (sector == 0xffffffff) lba = img->dev->seek_pos; @@ -1851,6 +2419,26 @@ image_read_sector(const void *local, uint8_t *buffer, /* Index is not in the file, no read to fail here. */ ret = 1; + if ((ret > 0) && (trk->attr & 0x04) && ((idx->type < INDEX_NORMAL) || !track_is_raw)) { + uint32_t crc; + + if ((trk->mode == 2) && (trk->form == 1)) { + crc = cdrom_crc32(0xffffffff, &(buf[16]), 2056) ^ 0xffffffff; + memcpy(&(buf[2072]), &crc, 4); + } else { + crc = cdrom_crc32(0xffffffff, buf, 2064) ^ 0xffffffff; + memcpy(&(buf[2064]), &crc, 4); + } + + int m2f1 = (trk->mode == 2) && (trk->form == 1); + + /* Compute ECC P code. */ + cdrom_compute_ecc_block(dev, &(buf[2076]), &(buf[12]), 86, 24, 2, 86, m2f1); + + /* Compute ECC Q code. */ + cdrom_compute_ecc_block(dev, &(buf[2248]), &(buf[12]), 52, 43, 86, 88, m2f1); + } + if ((ret > 0) && ((idx->type < INDEX_NORMAL) || (trk->subch_type != 0x08))) { buffer -= offset; @@ -1945,7 +2533,27 @@ static int image_read_dvd_structure(const void *local, const uint8_t layer, const uint8_t format, uint8_t *buffer, uint32_t *info) { - return 0; + const cd_image_t *img = (const cd_image_t *) local; + int ret = 0; + + if ((img->has_dstruct > 0) && ((layer + 1) > img->has_dstruct)) { + switch (format) { + case 0x00: + memcpy(buffer + 4, img->dstruct.layers[layer].f0, 2048); + ret = 2048 + 2; + break; + case 0x01: + memcpy(buffer + 4, img->dstruct.layers[layer].f1, 4); + ret = 4 + 2; + break; + case 0x04: + memcpy(buffer + 4, img->dstruct.layers[layer].f4, 2048); + ret = 2048 + 2; + break; + } + } + + return ret; } static int @@ -1977,6 +2585,9 @@ image_close(void *local) log_close(img->log); img->log = NULL; + if (img->bad_sectors != NULL) + free(img->bad_sectors); + free(img); } } @@ -2005,40 +2616,54 @@ image_open(cdrom_t *dev, const char *path) if (img != NULL) { int ret; - const int is_cue = ((ext == 4) && !stricmp(path + strlen(path) - ext + 1, "CUE")); + const int is_cue = ((ext == 4) && !stricmp(path + strlen(path) - ext + 1, "CUE")); + const int is_mds = ((ext == 4) && !stricmp(path + strlen(path) - ext + 1, "MDS")); + char n[1024] = { 0 }; - img->dev = dev; + sprintf(n, "CD-ROM %i Image", dev->id + 1); + img->log = log_open(n); - if (is_cue) { + img->dev = dev; + + if (is_mds) { + ret = image_load_mds(img, path); + + if (ret >= 2) + img->has_audio = 0; + else if (ret) + img->has_audio = 1; + } else if (is_cue) { ret = image_load_cue(img, path); if (ret >= 2) img->has_audio = 0; else if (ret) img->has_audio = 1; - else { - image_close(img); - img = NULL; - } + + if (ret >= 1) + img->is_dvd = 2; } else { ret = image_load_iso(img, path); - if (!ret) { - image_close(img); - img = NULL; - } else + if (ret) { img->has_audio = 0; + img->is_dvd = 2; + } } - if (ret) { - char n[1024] = { 0 }; - - sprintf(n, "CD-ROM %i Image", dev->id + 1); - img->log = log_open(n); + if (ret > 0) { + if (img->is_dvd == 2) { + uint32_t lb = image_get_last_block(img); /* Should be safer than previous way of doing it? */ + img->is_dvd = (lb >= 524287); /* Minimum 1 GB total capacity as threshold for DVD. */ + } dev->ops = &image_ops; - } else - warning("Unable to load CD-ROM image: %s\n", path); + } else { + log_warning(img->log, "Unable to load CD-ROM image: %s\n", path); + + image_close(img); + img = NULL; + } } return img; diff --git a/src/cdrom/cdrom_mitsumi.c b/src/cdrom/cdrom_mitsumi.c index e27faab94..47501c25c 100644 --- a/src/cdrom/cdrom_mitsumi.c +++ b/src/cdrom/cdrom_mitsumi.c @@ -8,11 +8,11 @@ * * Mitsumi CD-ROM emulation for the ISA bus. * - * - * * Authors: Miran Grca, + * Jasmine Iwanek, * - * Copyright 2022 Miran Grca. + * Copyright 2022 Miran Grca. + * Copyright 2024-2025 Jasmine Iwanek. */ #include #include @@ -33,10 +33,6 @@ #include <86box/plat.h> #include <86box/sound.h> -#define MCD_DEFAULT_IOPORT 0x310 -#define MCD_DEFAULT_IRQ 5 -#define MCD_DEFAULT_DMA 5 - #define RAW_SECTOR_SIZE 2352 #define COOKED_SECTOR_SIZE 2048 @@ -116,6 +112,8 @@ typedef struct mcd_t { int cur_toc_track; int pos; int newstat; + + cdrom_t *cdrom_dev; } mcd_t; #define CD_BCD(x) (((x) % 10) | (((x) / 10) << 4)) @@ -140,17 +138,15 @@ mitsumi_cdrom_log(const char *fmt, ...) #endif static int -mitsumi_cdrom_is_ready(const cdrom_t *dev) +mitsumi_cdrom_is_ready(const mcd_t *dev) { - return (dev->image_path[0] != 0x00); + return (dev->cdrom_dev->image_path[0] != 0x00); } static void mitsumi_cdrom_reset(mcd_t *dev) { - cdrom_t *cdrom = calloc(1, sizeof(cdrom_t)); - - dev->stat = mitsumi_cdrom_is_ready(cdrom) ? (STAT_READY | STAT_CHANGE) : 0; + dev->stat = mitsumi_cdrom_is_ready(dev) ? (STAT_READY | STAT_CHANGE) : 0; dev->cmdrd_count = 0; dev->cmdbuf_count = 0; dev->buf_count = 0; @@ -168,12 +164,11 @@ mitsumi_cdrom_reset(mcd_t *dev) static int mitsumi_cdrom_read_sector(mcd_t *dev, int first) { - cdrom_t *cdrom = calloc(1, sizeof(cdrom_t)); uint8_t status; int ret = 0; if (dev->drvmode == DRV_MODE_CDDA) { - status = cdrom_mitsumi_audio_play(cdrom, dev->readmsf, dev->readcount); + status = cdrom_mitsumi_audio_play(dev->cdrom_dev, dev->readmsf, dev->readcount); if (status == 1) return status; else @@ -187,15 +182,15 @@ mitsumi_cdrom_read_sector(mcd_t *dev, int first) dev->data = 0; return 0; } - cdrom_stop(cdrom); - ret = cdrom_readsector_raw(cdrom, dev->buf, cdrom->seek_pos, 0, 2, 0x10, (int *) &dev->readcount, 0); + cdrom_stop(dev->cdrom_dev); + ret = cdrom_readsector_raw(dev->cdrom_dev, dev->buf, dev->cdrom_dev->seek_pos, 0, 2, 0x10, (int *) &dev->readcount, 0); if (ret <= 0) return 0; if (dev->mode & 0x40) { dev->buf[12] = CD_BCD((dev->readmsf >> 16) & 0xff); dev->buf[13] = CD_BCD((dev->readmsf >> 8) & 0xff); } - dev->readmsf = cdrom_lba_to_msf_accurate(cdrom->seek_pos + 1); + dev->readmsf = cdrom_lba_to_msf_accurate(dev->cdrom_dev->seek_pos + 1); dev->buf_count = dev->dmalen + 1; dev->buf_idx = 0; dev->data = 1; @@ -258,7 +253,6 @@ static void mitsumi_cdrom_out(uint16_t port, uint8_t val, void *priv) { mcd_t *dev = (mcd_t *) priv; - cdrom_t *cdrom = calloc(1, sizeof(cdrom_t)); pclog("Mitsumi CD-ROM OUT=%03x, val=%02x\n", port, val); switch (port & 1) { @@ -340,19 +334,19 @@ mitsumi_cdrom_out(uint16_t port, uint8_t val, void *priv) break; } if (!dev->cmdrd_count) - dev->stat = mitsumi_cdrom_is_ready(cdrom) ? (STAT_READY | (dev->change ? STAT_CHANGE : 0)) : 0; + dev->stat = mitsumi_cdrom_is_ready(dev) ? (STAT_READY | (dev->change ? STAT_CHANGE : 0)) : 0; return; } dev->cmd = val; dev->cmdbuf_idx = 0; dev->cmdrd_count = 0; dev->cmdbuf_count = 1; - dev->cmdbuf[0] = mitsumi_cdrom_is_ready(cdrom) ? (STAT_READY | (dev->change ? STAT_CHANGE : 0)) : 0; + dev->cmdbuf[0] = mitsumi_cdrom_is_ready(dev) ? (STAT_READY | (dev->change ? STAT_CHANGE : 0)) : 0; dev->data = 0; switch (val) { case CMD_GET_INFO: - if (mitsumi_cdrom_is_ready(cdrom)) { - cdrom_get_track_buffer(cdrom, &(dev->cmdbuf[1])); + if (mitsumi_cdrom_is_ready(dev)) { + cdrom_get_track_buffer(dev->cdrom_dev, &(dev->cmdbuf[1])); dev->cmdbuf_count = 10; dev->readcount = 0; } else { @@ -361,7 +355,7 @@ mitsumi_cdrom_out(uint16_t port, uint8_t val, void *priv) } break; case CMD_GET_Q: - if (mitsumi_cdrom_is_ready(cdrom)) { + if (mitsumi_cdrom_is_ready(dev)) { cdrom_get_q(cdrom, &(dev->cmdbuf[1]), &dev->cur_toc_track, dev->mode & MODE_GET_TOC); dev->cmdbuf_count = 11; dev->readcount = 0; @@ -378,7 +372,7 @@ mitsumi_cdrom_out(uint16_t port, uint8_t val, void *priv) break; case CMD_STOPCDDA: case CMD_STOP: - cdrom_stop(cdrom); + cdrom_stop(dev->cdrom_dev); dev->drvmode = DRV_MODE_STOP; dev->cur_toc_track = 0; break; @@ -387,7 +381,7 @@ mitsumi_cdrom_out(uint16_t port, uint8_t val, void *priv) break; case CMD_READ1X: case CMD_READ2X: - if (mitsumi_cdrom_is_ready(cdrom)) { + if (mitsumi_cdrom_is_ready(dev)) { dev->readcount = 0; dev->drvmode = (val == CMD_READ1X) ? DRV_MODE_CDDA : DRV_MODE_READ; dev->cmdrd_count = 6; @@ -403,7 +397,7 @@ mitsumi_cdrom_out(uint16_t port, uint8_t val, void *priv) dev->cmdbuf_count = 3; break; case CMD_EJECT: - cdrom_stop(cdrom); + cdrom_stop(dev->cdrom_dev); cdrom_eject(0); dev->readcount = 0; break; @@ -434,10 +428,23 @@ mitsumi_cdrom_init(UNUSED(const device_t *info)) { mcd_t *dev = calloc(1, sizeof(mcd_t)); - dev->irq = MCD_DEFAULT_IRQ; - dev->dma = MCD_DEFAULT_DMA; + for (uint8_t i = 0; i < CDROM_NUM; i++) { + if (cdrom[i].bus_type == CDROM_BUS_MITSUMI) { + dev->cdrom_dev = &cdrom[i]; + break; + } + } - io_sethandler(MCD_DEFAULT_IOPORT, 3, + if (!dev->cdrom_dev) + return NULL; + + dev->cdrom_dev->priv = &dev; + + uint16_t base = device_get_config_hex16("base"); + dev->irq = device_get_config_int("irq"); + dev->dma = device_get_config_int("dma"); + + io_sethandler(base, 3, mitsumi_cdrom_in, NULL, NULL, mitsumi_cdrom_out, NULL, NULL, dev); mitsumi_cdrom_reset(dev); @@ -456,6 +463,64 @@ mitsumi_cdrom_close(void *priv) } } +static const device_config_t mitsumi_config[] = { + // clang-format off + { + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = NULL, + .default_int = 0x310, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "300H", .value = 0x300 }, + { .description = "310H", .value = 0x310 }, + { .description = "320H", .value = 0x320 }, + { .description = "340H", .value = 0x340 }, + { .description = "350H", .value = 0x350 }, + { NULL } + }, + .bios = { { 0 } } + }, + { + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 5, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "IRQ 9", .value = 9 }, + { .description = "IRQ 10", .value = 10 }, + { .description = "IRQ 11", .value = 11 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "dma", + .description = "DMA", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 5, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "DMA 5", .value = 5 }, + { .description = "DMA 6", .value = 6 }, + { .description = "DMA 7", .value = 7 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +// clang-format off +}; + const device_t mitsumi_cdrom_device = { .name = "Mitsumi CD-ROM interface", .internal_name = "mcd", @@ -467,5 +532,5 @@ const device_t mitsumi_cdrom_device = { .available = NULL, .speed_changed = NULL, .force_redraw = NULL, - .config = NULL + .config = mitsumi_config }; diff --git a/src/cdrom/cdrom_mke.c b/src/cdrom/cdrom_mke.c new file mode 100644 index 000000000..98ae6c057 --- /dev/null +++ b/src/cdrom/cdrom_mke.c @@ -0,0 +1,1078 @@ +/* + * 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. + * + * Panasonic/MKE CD-ROM emulation for the ISA bus. + * + * Authors: Miran Grca, + * Kevin Moonlight, + * Cacodemon345 + * + * Copyright (C) 2025 Miran Grca. + * Copyright (C) 2025 Cacodemon345. + * Copyright (C) 2024 Kevin Moonlight. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include <86box/device.h> +#include <86box/io.h> +#include <86box/pic.h> +#include <86box/dma.h> +#include <86box/cdrom.h> +#include <86box/cdrom_interface.h> +#include <86box/cdrom_mke.h> +#include <86box/plat.h> +#include <86box/ui.h> +#include <86box/sound.h> +#include <86box/fifo8.h> +#include <86box/timer.h> +#ifdef ENABLE_MKE_LOG +#include "cpu.h" +#endif + +/* +https://elixir.bootlin.com/linux/2.0.29/source/include/linux/sbpcd.h +CR-562-B is classified as Family1 in this driver, so uses the CMD1_ prefix. +*/ +#define CDROM_STATUS_DOOR 0x80 +#define CDROM_STATUS_DISC_IN 0x40 +#define CDROM_STATUS_SPIN_UP 0x20 +#define CDROM_STATUS_ERROR 0x10 +#define CDROM_STATUS_DOUBLE_SPEED 0x02 +#define CDROM_STATUS_READY 0x01 + +// Status returned from device +#define STAT_READY 0x01 +#define STAT_PLAY 0x08 +#define STAT_ERROR 0x10 +#define STAT_DISK 0x40 +#define STAT_TRAY 0x80 // Seems Correct + +#define CMD1_PAUSERESUME 0x0D +#define CMD1_RESET 0x0a +#define CMD1_LOCK_CTL 0x0c +#define CMD1_TRAY_CTL 0x07 +#define CMD1_MULTISESS 0x8d +#define CMD1_SUBCHANINF 0x11 +#define CMD1_ABORT 0x08 +// #define CMD1_PATH_CHECK 0x??? +#define CMD1_SEEK 0x01 +#define CMD1_READ 0x10 +#define CMD1_SPINUP 0x02 +#define CMD1_SPINDOWN 0x06 +#define CMD1_READ_UPC 0x88 +// #define CMD1_PLAY 0x??? +#define CMD1_PLAY_MSF 0x0e +#define CMD1_PLAY_TI 0x0f +#define CMD1_STATUS 0x05 +#define CMD1_READ_ERR 0x82 +#define CMD1_READ_VER 0x83 +#define CMD1_SETMODE 0x09 +#define CMD1_GETMODE 0x84 +#define CMD1_CAPACITY 0x85 +#define CMD1_READSUBQ 0x87 +#define CMD1_DISKINFO 0x8b +#define CMD1_READTOC 0x8c +#define CMD1_PAU_RES 0x0d +#define CMD1_PACKET 0x8e +#define CMD1_SESSINFO 0x8d + +typedef struct mke_t { + bool present; + bool tray_open; + + uint8_t command_buffer[7]; + uint8_t command_buffer_pending; + + uint8_t medium_changed; + + uint8_t vol0, vol1, patch0, patch1; + uint8_t mode_select[5]; + + uint8_t media_selected; // temporary hack + + Fifo8 data_fifo; + Fifo8 info_fifo; + + cdrom_t * cdrom_dev; + + uint32_t sector_type; + uint32_t sector_flags; + + uint32_t unit_attention; + + uint8_t cdbuffer[624240 * 2]; + + uint32_t data_to_push; + + pc_timer_t timer; + + char ver[512]; + + uint8_t is_error; + uint8_t sense[8]; + + uint8_t temp_buf[65536]; +} mke_t; + +typedef struct mke_interface_t { + mke_t mke[4]; + + uint8_t is_sb; + + uint8_t drvsel; + uint8_t data_select; +} mke_interface_t; + +#ifdef ENABLE_MKE_LOG +int mke_do_log = ENABLE_MKE_LOG; + +static void +mke_log(const char *fmt, ...) +{ + va_list ap; + + if (mke_do_log) { + va_start(ap, fmt); + pclog_ex(fmt, ap); + va_end(ap); + } +} +#else +# define mke_log(fmt, ...) +#endif + +#define CHECK_READY() \ + { \ + if (!mke_pre_execution_check(mke)) \ + return; \ + } + +#define REPORT_IF_NOT_READY() \ + { \ + if (!mke_pre_execution_check(mke)) { \ + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); \ + } \ + } + +#define CHECK_READY_READ() \ + { \ + if (!mke_pre_execution_check(mke)) { \ + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); \ + return; \ + } \ + } + +static void +mke_update_sense(mke_t *mke, uint8_t error) +{ + /* FreeBSD calls this addrval, but what is it? */ + mke->sense[0] = 0x00; + mke->sense[1] = mke->command_buffer[0]; + mke->sense[2] = error; + + mke->is_error = 1; +} + +static void +mke_cdrom_insert(void *priv) +{ + mke_t *dev = (mke_t *) priv; + + if ((dev == NULL) || (dev->cdrom_dev == NULL)) + return; + + if (dev->cdrom_dev->ops == NULL) { + dev->medium_changed = 0; + dev->cdrom_dev->cd_status = CD_STATUS_EMPTY; + if (timer_is_enabled(&dev->timer)) { + timer_disable(&dev->timer); + dev->data_to_push = 0; + } + mke_log("Media removal\n"); + } else if (dev->cdrom_dev->cd_status & CD_STATUS_TRANSITION) { + dev->medium_changed = 1; + /* Turn off the medium changed status. */ + dev->cdrom_dev->cd_status &= ~CD_STATUS_TRANSITION; + mke_log("Media insert\n"); + } else { + dev->medium_changed = 0; + dev->cdrom_dev->cd_status |= CD_STATUS_TRANSITION; + mke_log("Media transition\n"); + } +} + +static int +mke_pre_execution_check(mke_t *mke) +{ + int ready = 1; + + if ((mke->cdrom_dev->cd_status == CD_STATUS_PLAYING) || + (mke->cdrom_dev->cd_status == CD_STATUS_PAUSED)) { + ready = 1; + goto skip_ready_check; + } + + if (mke->cdrom_dev->cd_status & CD_STATUS_TRANSITION) { + if (mke->command_buffer[0] == 0x82) + ready = 0; + else { + mke_cdrom_insert(mke); + + ready = ((mke->cdrom_dev->cd_status != CD_STATUS_EMPTY) && (mke->cdrom_dev->cd_status != CD_STATUS_DVD_REJECTED)); + } + } else + ready = ((mke->cdrom_dev->cd_status != CD_STATUS_EMPTY) && (mke->cdrom_dev->cd_status != CD_STATUS_DVD_REJECTED)); + +skip_ready_check: + /* + If the drive is not ready, there is no reason to keep the + UNIT ATTENTION condition present, as we only use it to mark + disc changes. + */ + if (!ready && (mke->medium_changed > 0)) + mke->medium_changed = 0; + + /* + If the UNIT ATTENTION condition is set and the command does not allow + execution under it, error out and report the condition. + */ + if (mke->medium_changed == 1) { + /* + Only increment the unit attention phase if the command can + not pass through it. + */ + mke_log("Unit attention now 2\n"); + mke->medium_changed++; + mke_update_sense(mke, 0x11); \ + return 0; + } else if (mke->medium_changed == 2) { + if (mke->command_buffer[0] != 0x82) { + mke_log("Unit attention now 0\n"); + mke->medium_changed = 0; + } + } + + /* + Unless the command is REQUEST SENSE, clear the sense. This will *NOT* clear + the UNIT ATTENTION condition if it's set. + */ + if (mke->command_buffer[0] != 0x82) { + memset(mke->sense, 0x00, 8); + mke->is_error = 0; + } + + if (!ready && (mke->command_buffer[0] != 0x05)) { + mke_log("Not ready (%02X)\n", mke->command_buffer[0]); + mke_update_sense(mke, 0x03); + return 0; + } + + return 1; +} + +uint8_t +mke_cdrom_status(cdrom_t *dev, mke_t *mke) +{ + uint8_t status = 0; + /* + This bit seems to always be set? + Bit 4 never set? + */ + status |= 2; + if (dev->cd_status == CD_STATUS_PLAYING) + status |= STAT_PLAY; + if (dev->cd_status == CD_STATUS_PAUSED) + status |= STAT_PLAY; + if (mke->is_error) + status |= 0x10; + /* Always set? */ + status |= 0x20; + status |= STAT_TRAY; + if (mke->cdrom_dev->cd_status != CD_STATUS_EMPTY) { + status |= STAT_DISK; + status |= STAT_READY; + } + + return status; +} + +void +mke_get_subq(mke_t *mke, uint8_t *b) +{ + cdrom_t *dev = mke->cdrom_dev; + + cdrom_get_current_subchannel_sony(dev, mke->temp_buf, 1); + /* ? */ + b[0] = 0x80; + b[1] = ((mke->temp_buf[0] & 0xf) << 4) | ((mke->temp_buf[0] & 0xf0) >> 4); + b[2] = mke->temp_buf[1]; + b[3] = mke->temp_buf[2]; + b[4] = mke->temp_buf[6]; + b[5] = mke->temp_buf[7]; + b[6] = mke->temp_buf[8]; + b[7] = mke->temp_buf[3]; + b[8] = mke->temp_buf[4]; + b[9] = mke->temp_buf[5]; + /* ? */ + b[10] = 0; + mke_log("mke_get_subq: 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X\n", + b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8], b[9], b[10]); +} + +/* Lifted from FreeBSD */ +static void +blk_to_msf(int blk, unsigned char *msf) +{ + blk = blk + 150; /* 2 seconds skip required to + reach ISO data */ + msf[0] = blk / 4500; + blk = blk % 4500; + msf[1] = blk / 75; + msf[2] = blk % 75; + + return; +} + +uint8_t +mke_read_toc(mke_t *mke, unsigned char *b, uint8_t track) { + cdrom_t *dev = mke->cdrom_dev; +#if 0 + track_info_t ti; + int last_track; +#endif + const raw_track_info_t *trti = (raw_track_info_t *) mke->temp_buf; + int num = 0; + int ret = 0; + + dev->ops->get_raw_track_info(dev->local, &num, mke->temp_buf); + + if (num > 0) { + if (track == 0xaa) + track = 0xa2; + + int trk = - 1; + + for (int i = (num - 1); i >= 0; i--) { + if (trti[i].point == track) { + trk = i; + break; + } + } + + if (trk != -1) { + b[0] = 0; + b[1] = trti[trk].adr_ctl; + b[2] = (trti[trk].point == 0xa2) ? 0xaa : trti[trk].point; + b[3] = 0; + b[4] = trti[trk].pm; + b[5] = trti[trk].ps; + b[6] = trti[trk].pf; + b[7] = 0; + + ret = 1; + } + + mke_log("mke_read_toc: 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X\n", + b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7]); + } + + return ret; +} + + +uint8_t +mke_disc_info(mke_t *mke, unsigned char *b) +{ + cdrom_t *dev = mke->cdrom_dev; + uint8_t disc_type_buf[34]; + int first_track; + int last_track; + + cdrom_read_toc(dev, mke->temp_buf, CD_TOC_NORMAL, 0, 2 << 8, 65536); + cdrom_read_disc_information(dev, disc_type_buf); + first_track = mke->temp_buf[2]; + last_track = mke->temp_buf[3]; + + b[0] = disc_type_buf[8]; + b[1] = first_track; + b[2] = last_track; + b[3] = 0; + b[4] = 0; + b[5] = 0; + blk_to_msf(dev->cdrom_capacity, &b[3]); + mke_log("mke_disc_info: 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X\n", + b[0], b[1], b[2], b[3], b[4], b[5]); + return 1; +} + +uint8_t +mke_disc_capacity(cdrom_t *dev, unsigned char *b) +{ + b[0] = 0x00; + b[1] = 0x00; + b[2] = 0x00; + b[3] = 0x08; + b[4] = 0x00; + + blk_to_msf(dev->cdrom_capacity, &b[0]); + mke_log("mke_disc_capacity: 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X\n", + b[0], b[1], b[2], b[3], b[4]); + return 1; +} + +void +mke_read_multisess(mke_t *mke) +{ + cdrom_t *dev = mke->cdrom_dev; + uint8_t *b = (uint8_t *) &(mke->temp_buf[32768]); + const raw_track_info_t *trti = (raw_track_info_t *) mke->temp_buf; + int num = 0; + int first_sess = 0; + int last_sess = 0; + + dev->ops->get_raw_track_info(dev->local, &num, mke->temp_buf); + + if (num > 0) { + int trk = - 1; + + for (int i = 0; i < num; i++) { + if (trti[i].point == 0xa2) { + first_sess = trti[i].session; + break; + } + } + + for (int i = (num - 1); i >= 0; i--) { + if (trti[i].point == 0xa2) { + last_sess = trti[i].session; + break; + } + } + + for (int i = 0; i < num; i++) { + if ((trti[i].point >= 1) && (trti[i].point >= 99) && + (trti[i].session == last_sess)) { + trk = i; + break; + } + } + + if ((first_sess > 0) && (last_sess < 0) && (trk != -1)) { + b[0] = (first_sess == last_sess) ? 0x00 : 0x80; + b[1] = trti[trk].pm; + b[2] = trti[trk].ps; + b[3] = trti[trk].pf; + b[4] = 0; + b[5] = 0; + } + + fifo8_push_all(&mke->info_fifo, b, 6); + + mke_log("mke_read_multisess: 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X\n", + b[0], b[1], b[2], b[3], b[4], b[5]); + } else { + memset(b, 0x00, 6); + fifo8_push_all(&mke->info_fifo, b, 6); + } +} + +static void +mke_reset(mke_t *mke) +{ + cdrom_stop(mke->cdrom_dev); + timer_disable(&mke->timer); + mke->sector_type = 0x08 | (1 << 4); + mke->sector_flags = 0x10; + memset(mke->mode_select, 0, 5); + mke->mode_select[2] = 0x08; + mke->patch0 = 0x01; + mke->patch1 = 0x02; + mke->vol0 = 255; + mke->vol1 = 255; + mke->cdrom_dev->sector_size = 2048; +} + +void +mke_command_callback(void *priv) +{ + mke_t *mke = (mke_t *) priv; + + switch (mke->command_buffer[0]) { + case CMD1_SEEK: { + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + } + case CMD1_READ: { + fifo8_push_all(&mke->data_fifo, mke->cdbuffer, mke->data_to_push); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + mke->data_to_push = 0; + ui_sb_update_icon(SB_CDROM | mke->cdrom_dev->id, 0); + break; + } + } +} + +void +mke_command(mke_t *mke, uint8_t value) +{ + uint16_t i; + /* This is wasteful handling of buffers for compatibility, but will optimize later. */ + uint8_t x[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + int old_cd_status; + + if (mke->command_buffer_pending) { + mke->command_buffer[6 - mke->command_buffer_pending + 1] = value; + mke->command_buffer_pending--; + } + + if (mke->command_buffer[0] == CMD1_ABORT) { + mke_log("CMD_ABORT\n"); + fifo8_reset(&mke->info_fifo); + fifo8_reset(&mke->data_fifo); + timer_disable(&mke->timer); + mke->command_buffer[0] = 0; + mke->command_buffer_pending = 7; + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + } + + if (!mke->command_buffer_pending && mke->command_buffer[0]) { + mke->command_buffer_pending = 7; + mke_log("mke_command: 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X\n", + mke->command_buffer[0], mke->command_buffer[1], + mke->command_buffer[2], mke->command_buffer[3], + mke->command_buffer[4], mke->command_buffer[5], + mke->command_buffer[6]); + switch (mke->command_buffer[0]) { + case 0x03: + fifo8_reset(&mke->info_fifo); + cdrom_stop(mke->cdrom_dev); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + case 0x06: + fifo8_reset(&mke->info_fifo); + cdrom_stop(mke->cdrom_dev); + cdrom_eject(mke->cdrom_dev->id); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + case 0x07: + fifo8_reset(&mke->info_fifo); + cdrom_reload(mke->cdrom_dev->id); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + case CMD1_RESET: + mke_reset(mke); + break; + case CMD1_READ: { + uint32_t count = mke->command_buffer[6]; + uint8_t *buf = mke->cdbuffer; + int res = 0; + uint64_t lba = MSFtoLBA(mke->command_buffer[1], mke->command_buffer[2], + mke->command_buffer[3]) - 150; + int len __attribute__((unused)) = 0; + + CHECK_READY_READ(); + mke->data_to_push = 0; + + while (count) { + if ((res = cdrom_readsector_raw(mke->cdrom_dev, buf, lba, 0, + mke->sector_type, mke->sector_flags, &len, 0)) > 0) { + lba++; + buf += mke->cdrom_dev->sector_size; + mke->data_to_push += mke->cdrom_dev->sector_size; + } else { + mke_update_sense(mke, (res == 0) ? 0x10 : 0x05); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + } + count--; + } + if (count != 0) { + fifo8_reset(&mke->data_fifo); + mke->data_to_push = 0; + } else { + ui_sb_update_icon(SB_CDROM | mke->cdrom_dev->id, 1); + timer_on_auto(&mke->timer, (1000000.0 / (176400.0 * 2.)) * mke->data_to_push); + } + break; + } case CMD1_READSUBQ: + if (mke_pre_execution_check(mke)) { + mke_get_subq(mke, (uint8_t *) &x); + } + fifo8_reset(&mke->info_fifo); + fifo8_push_all(&mke->info_fifo, x, 11); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + case CMD1_SETMODE: + /* Returns 1 */ + fifo8_reset(&mke->info_fifo); + mke_log("CMD: SET MODE:"); + for (i = 0; i < 6; i++) { + mke_log("%02x ", mke->command_buffer[i + 1]); + } + mke_log("\n"); + switch (mke->command_buffer[1]) { + case 0: + switch (mke->command_buffer[2]) { + case 0x00: /* Cooked */ + mke->sector_type = 0x08 | (1 << 4); + mke->sector_flags = 0x10; + mke->cdrom_dev->sector_size = 2048; + break; + case 0x81: /* XA */ + case 0x01: /* User */ { + uint32_t sector_size = (mke->command_buffer[3] << 8) | + mke->command_buffer[4]; + + if (!sector_size) { + mke_update_sense(mke, 0x0e); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + return; + } else { + switch (sector_size) { + case 2048: + mke->sector_type = 0x08 | (1 << 4); + mke->sector_flags = 0x10; + mke->cdrom_dev->sector_size = 2048; + break; + case 2052: + mke->sector_type = 0x18; + mke->sector_flags = 0x30; + mke->cdrom_dev->sector_size = 2052; + break; + case 2324: + mke->sector_type = 0x1b; + mke->sector_flags = 0x18; + mke->cdrom_dev->sector_size = 2324; + break; + case 2336: + mke->sector_type = 0x1c; + mke->sector_flags = 0x58; + mke->cdrom_dev->sector_size = 2336; + break; + case 2340: + mke->sector_type = 0x18; + mke->sector_flags = 0x78; + mke->cdrom_dev->sector_size = 2340; + break; + case 2352: + mke->sector_type = 0x00; + mke->sector_flags = 0xf8; + mke->cdrom_dev->sector_size = 2352; + break; + default: + mke_update_sense(mke, 0x0e); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + return; + } + } + break; + } case 0x82: /* DA */ + mke->sector_type = 0x00; + mke->sector_flags = 0xf8; + mke->cdrom_dev->sector_size = 2352; + break; + default: + mke_update_sense(mke, 0x0e); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + return; + } + + memcpy(mke->mode_select, &mke->command_buffer[2], 5); + break; + case 5: + mke->vol0 = mke->command_buffer[4]; + mke->vol1 = mke->command_buffer[6]; + mke->patch0 = mke->command_buffer[3]; + mke->patch1 = mke->command_buffer[5]; + break; + } + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + case CMD1_GETMODE: + /* 6 */ + mke_log("GET MODE\n"); + if (mke->command_buffer[1] == 5) { + uint8_t volsettings[5] = { 0, mke->patch0, mke->vol0, mke->patch1, mke->vol1 }; + fifo8_push_all(&mke->info_fifo, volsettings, 5); + } else + fifo8_push_all(&mke->info_fifo, mke->mode_select, 5); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + case CMD1_PAUSERESUME: + CHECK_READY_READ(); + cdrom_audio_pause_resume(mke->cdrom_dev, mke->command_buffer[1] >> 7); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + case CMD1_CAPACITY: + /* 6 */ + mke_log("DISK CAPACITY\n"); + if (mke_pre_execution_check(mke)) + mke_disc_capacity(mke->cdrom_dev, (uint8_t *) &x); + fifo8_push_all(&mke->info_fifo, x, 5); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + case CMD1_DISKINFO: + /* 7 */ + mke_log("DISK INFO\n"); + fifo8_reset(&mke->info_fifo); + if (mke_pre_execution_check(mke)) + mke_disc_info(mke, (uint8_t *) &x); + fifo8_push_all(&mke->info_fifo, x, 6); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + case CMD1_READTOC: + fifo8_reset(&mke->info_fifo); + if (mke_pre_execution_check(mke)) + mke_read_toc(mke, (uint8_t *) &x, mke->command_buffer[2]); + fifo8_push_all(&mke->info_fifo, x, 8); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + case CMD1_PLAY_TI: + /* Index is ignored for now. */ + fifo8_reset(&mke->info_fifo); + CHECK_READY_READ(); + if (!cdrom_audio_play(mke->cdrom_dev, mke->command_buffer[1], mke->command_buffer[3], 2)) + mke_update_sense(mke, 0x10); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + case CMD1_PLAY_MSF: + fifo8_reset(&mke->info_fifo); + CHECK_READY_READ(); + mke_log("PLAY MSF:"); + for (i = 0; i < 6; i++) { + mke_log("%02x ", mke->command_buffer[i + 1]); + } + mke_log("\n"); + { + int msf = 1; + int pos = (mke->command_buffer[1] << 16) | (mke->command_buffer[2] << 8) | + mke->command_buffer[3]; + int len = (mke->command_buffer[4] << 16) | (mke->command_buffer[5] << 8) | + mke->command_buffer[6]; + if (!cdrom_audio_play(mke->cdrom_dev, pos, len, msf)){ + mke_update_sense(mke, 0x10); + } + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + } + break; + case CMD1_SEEK: + old_cd_status = mke->cdrom_dev->cd_status; + fifo8_reset(&mke->info_fifo); + CHECK_READY_READ(); + /* TODO: DOES THIS IMPACT CURRENT PLAY LENGTH? */ + mke_log("SEEK MSF:"); + for (i = 0; i < 6; i++) { + mke_log("%02x ", mke->command_buffer[i + 1]); + } + + cdrom_stop(mke->cdrom_dev); + /* Note for self: Panasonic/MKE drives send seek commands in MSF format. */ + cdrom_seek(mke->cdrom_dev, MSFtoLBA(mke->command_buffer[1], mke->command_buffer[2], + mke->command_buffer[3]) - 150, 0); + if ((old_cd_status == CD_STATUS_PLAYING) || (old_cd_status == CD_STATUS_PAUSED)) { + cdrom_audio_play(mke->cdrom_dev, mke->cdrom_dev->seek_pos, -1, 0); + cdrom_audio_pause_resume(mke->cdrom_dev, old_cd_status == CD_STATUS_PLAYING); + } + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + case CMD1_SESSINFO: + fifo8_reset(&mke->info_fifo); + mke_log("CMD: READ SESSION INFO\n"); + if (mke_pre_execution_check(mke)) + mke_read_multisess(mke); + else + fifo8_push_all(&mke->info_fifo, x, 6); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + case CMD1_READ_UPC: + fifo8_reset(&mke->info_fifo); + mke_log("CMD: READ UPC\n"); + uint8_t upc[8] = { [0] = 80 }; + fifo8_push_all(&mke->info_fifo, upc, 8); + REPORT_IF_NOT_READY(); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + case CMD1_READ_ERR: + fifo8_reset(&mke->info_fifo); + mke_log("CMD: READ ERR\n"); + mke_log("ERROR: %02X %02X %02X %02X %02X %02X %02X %02X\n", + mke->sense[0], mke->sense[1], mke->sense[2], mke->sense[3], + mke->sense[4], mke->sense[5], mke->sense[6], mke->sense[7]); + { + uint8_t temp[8]; + memset(temp, mke->sense[2], 8); + fifo8_push_all(&mke->info_fifo, mke->sense, 8); + } + mke->is_error = 0; + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + case CMD1_READ_VER: + /* SB2CD Expects 12 bytes, but drive only returns 11. */ + fifo8_reset(&mke->info_fifo); + fifo8_push_all(&mke->info_fifo, (uint8_t *) mke->ver, 10); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + case CMD1_STATUS: + fifo8_reset(&mke->info_fifo); + CHECK_READY_READ(); + fifo8_push(&mke->info_fifo, mke_cdrom_status(mke->cdrom_dev, mke)); + break; + default: + mke_log("MKE: Unknown Commnad [%02x]\n", mke->command_buffer[0]); + break; + } + } else if (!mke->command_buffer_pending) { + /* + We are done but not in a command. + Should we make sure it is a valid command here? + */ + mke->command_buffer[0] = value; + mke->command_buffer_pending = 6; + } +} + +void +mke_write(uint16_t port, uint8_t val, void *priv) +{ + mke_interface_t *mki = (mke_interface_t *) priv; + mke_t *mke = &(mki->mke[mki->drvsel & 0x03]); + uint8_t sb[8] = { 0x00, 0x02, 0x01, 0x03 }; + + mke_log("[%04X:%08X] [W] %04X = %02X\n", CS, cpu_state.pc, port, val); + + /* if (mke->present || ((port & 0x0003) == 0x0003)) */ switch (port & 0x0003) { + case 0: + if (mke->present) + mke_command(mke, val); + break; + case 1: + if (mki->is_sb) + mki->data_select = val; + break; + case 2: + if (mke->present) + mke_reset(mke); + break; + case 3: + if (mki->is_sb) + mki->drvsel = (val & 0xfc) | sb[val & 0x03]; + else + mki->drvsel = val; + break; + default: + break; + } +} + +uint8_t +mke_read(uint16_t port, void *priv) +{ + mke_interface_t *mki = (mke_interface_t *) priv; + mke_t *mke = &(mki->mke[mki->drvsel & 0x03]); + uint8_t ret = 0x00; + + if (mke->present) switch (port & 0x0003) { + case 0: + /* Info */ + if (mki->is_sb && mki->data_select) + ret = fifo8_num_used(&mke->data_fifo) ? fifo8_pop(&mke->data_fifo) : 0x00; + else + ret = fifo8_num_used(&mke->info_fifo) ? fifo8_pop(&mke->info_fifo) : 0x00; + break; + case 1: + /* + Status: + - 1 = Status Change; + - 2 = Data Ready; + - 4 = Response Ready; + - 8 = Attention / Issue? + */ + ret = 0xff; + if (fifo8_num_used(&mke->data_fifo)) + /* Data FIFO */ + ret ^= 2; + if (fifo8_num_used(&mke->info_fifo)) + /* Status FIFO */ + ret ^= 4; + if (mke->is_error) + ret ^= 8; + break; + case 2: + /* Data */ + if (!mki->is_sb) + ret = fifo8_num_used(&mke->data_fifo) ? fifo8_pop(&mke->data_fifo) : 0x00; + break; + default: + mke_log("MKE Unknown Read Port: %04X\n", port); + ret = 0xff; + break; + } else if ((port & 0x0003) == 0x0003) + /* This is needed for the Windows 95 built-in driver to function correctly. */ + ret = 0xff; + + mke_log("[%04X:%08X] [R] %04X = %02X\n", CS, cpu_state.pc, port, ret); + + return ret; +} + +uint32_t +mke_get_volume(void *priv, int channel) +{ + mke_t *dev = (mke_t *) priv; + + return channel == 0 ? dev->vol0 : dev->vol1; +} + +uint32_t +mke_get_channel(void *priv, int channel) +{ + mke_t *dev = (mke_t *) priv; + + return channel == 0 ? dev->patch0 : dev->patch1; +} + +void +mke_close(void *priv) +{ + mke_interface_t *mki = (mke_interface_t *) calloc(1, sizeof(mke_interface_t)); + + for (uint8_t i = 0; i < 4; i++) { + mke_t *mke = &(mki->mke[i]); + + if (mke->present) { + timer_disable(&mke->timer); + + fifo8_destroy(&mke->data_fifo); + fifo8_destroy(&mke->info_fifo); + } + } + + free(mki); +} + +void * +mke_init(const device_t *info) +{ + mke_interface_t *mki = (mke_interface_t *) calloc(1, sizeof(mke_interface_t)); + int num = 0; + + for (uint8_t i = 0; i < CDROM_NUM; i++) { + if (cdrom[i].bus_type == CDROM_BUS_MKE) { + cdrom_t *dev = &cdrom[i]; + + mke_t *mke = &(mki->mke[dev->mke_channel]); + + mke->present = 1; + + memset(mke->ver, 0x00, 512); + cdrom_generate_name_mke(dev->type, mke->ver); + mke->ver[10] = 0x00; + + fifo8_create(&mke->info_fifo, 128); + fifo8_create(&mke->data_fifo, 624240 * 2); + fifo8_reset(&mke->info_fifo); + fifo8_reset(&mke->data_fifo); + mke->cdrom_dev = dev; + mke->command_buffer_pending = 7; + mke->sector_type = 0x08 | (1 << 4); + mke->sector_flags = 0x10; + mke->mode_select[2] = 0x08; + mke->patch0 = 0x01; + mke->patch1 = 0x02; + mke->vol0 = 255; + mke->vol1 = 255; + dev->sector_size = 2048; + + dev->priv = mke; + dev->insert = mke_cdrom_insert; + dev->get_volume = mke_get_volume; + dev->get_channel = mke_get_channel; + dev->cached_sector = -1; + + timer_add(&mke->timer, mke_command_callback, mke, 0); + + num++; + + if (num == 4) + break; + } + } + + mki->is_sb = info->local; + + uint16_t base = device_get_config_hex16("base"); + io_sethandler(base, 4, mke_read, NULL, NULL, mke_write, NULL, NULL, mki); + + return mki; +} + +static const device_config_t mke_config[] = { + // clang-format off + { + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = NULL, + .default_int = 0x250, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "220H", .value = 0x220 }, + { .description = "230H", .value = 0x230 }, + { .description = "250H", .value = 0x250 }, + { .description = "260H", .value = 0x260 }, + { .description = "270H", .value = 0x270 }, + { .description = "290H", .value = 0x290 }, + { .description = "300H", .value = 0x300 }, + { .description = "310H", .value = 0x310 }, + { .description = "320H", .value = 0x320 }, + { .description = "330H", .value = 0x330 }, + { .description = "340H", .value = 0x340 }, + { NULL } + }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +// clang-format off +}; + +const device_t mke_cdrom_device = { + .name = "Panasonic/MKE CD-ROM interface (Creative)", + .internal_name = "mkecd", + .flags = DEVICE_ISA, + .local = 1, + .init = mke_init, + .close = mke_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = mke_config +}; + +const device_t mke_cdrom_noncreative_device = { + .name = "Panasonic/MKE CD-ROM interface", + .internal_name = "mkecd_normal", + .flags = DEVICE_ISA, + .local = 0, + .init = mke_init, + .close = mke_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = mke_config +}; diff --git a/src/chipset/CMakeLists.txt b/src/chipset/CMakeLists.txt index d61b5c53d..9ccba8dc6 100644 --- a/src/chipset/CMakeLists.txt +++ b/src/chipset/CMakeLists.txt @@ -30,12 +30,15 @@ add_library(chipset OBJECT ali1621.c ali6117.c ali1409.c - headland.c - ims8848.c - intel_82335.c + compaq.c compaq_386.c contaq_82c59x.c cs4031.c + grid1520.c + gc100.c + headland.c + ims8848.c + intel_82335.c intel_420ex.c intel_4x0.c intel_i450kx.c @@ -43,6 +46,7 @@ add_library(chipset OBJECT intel_piix.c isa486c.c ../ioapic.c + laserxt.c neat.c olivetti_eva.c opti283.c @@ -55,6 +59,8 @@ add_library(chipset OBJECT opti822.c opti895.c opti5x7.c + philips.c + sanyo.c scamp.c scat.c sis_85c310.c @@ -77,10 +83,9 @@ add_library(chipset OBJECT sis_5595_pmu.c sis_55xx.c sl82c461.c + stpc.c via_vt82c49x.c via_vt82c505.c - gc100.c - stpc.c umc_8886.c umc_hb4.c umc_8890.c diff --git a/src/chipset/compaq.c b/src/chipset/compaq.c new file mode 100644 index 000000000..7a52c9d36 --- /dev/null +++ b/src/chipset/compaq.c @@ -0,0 +1,135 @@ +/* + * 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. + * + * Emulation of the Compaq 386 memory controller. + * + * Authors: Miran Grca, + * + * Copyright 2023 Miran Grca. + */ +#include +#include +#include +#include +#include +#include +#include <86box/86box.h> +#include "cpu.h" +#include <86box/io.h> +#include <86box/timer.h> +#include <86box/pit.h> +#include <86box/mem.h> +#include <86box/rom.h> +#include <86box/device.h> +#include <86box/keyboard.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/machine.h> +#include <86box/video.h> +#include <86box/vid_cga.h> +#include <86box/vid_cga_comp.h> +#include <86box/plat_unused.h> +#include <86box/chipset.h> + +/* Compaq Deskpro 386 remaps RAM from 0xA0000-0xFFFFF to 0xFA0000-0xFFFFFF */ +typedef struct cpq_t { + mem_mapping_t ram_mapping; +} cpq_t; + +static uint8_t +read_ram(uint32_t addr, UNUSED(void *priv)) +{ + addr = (addr & 0x7ffff) + 0x80000; + addreadlookup(mem_logical_addr, addr); + + return (ram[addr]); +} + +static uint16_t +read_ramw(uint32_t addr, UNUSED(void *priv)) +{ + addr = (addr & 0x7ffff) + 0x80000; + addreadlookup(mem_logical_addr, addr); + + return (*(uint16_t *) &ram[addr]); +} + +static uint32_t +read_raml(uint32_t addr, UNUSED(void *priv)) +{ + addr = (addr & 0x7ffff) + 0x80000; + addreadlookup(mem_logical_addr, addr); + + return (*(uint32_t *) &ram[addr]); +} + +static void +write_ram(uint32_t addr, uint8_t val, UNUSED(void *priv)) +{ + addr = (addr & 0x7ffff) + 0x80000; + addwritelookup(mem_logical_addr, addr); + + mem_write_ramb_page(addr, val, &pages[addr >> 12]); +} + +static void +write_ramw(uint32_t addr, uint16_t val, UNUSED(void *priv)) +{ + addr = (addr & 0x7ffff) + 0x80000; + addwritelookup(mem_logical_addr, addr); + + mem_write_ramw_page(addr, val, &pages[addr >> 12]); +} + +static void +write_raml(uint32_t addr, uint32_t val, UNUSED(void *priv)) +{ + addr = (addr & 0x7ffff) + 0x80000; + addwritelookup(mem_logical_addr, addr); + + mem_write_raml_page(addr, val, &pages[addr >> 12]); +} + +static void +compaq_close(void *priv) +{ + cpq_t *dev = (cpq_t *) priv; + + free(dev); +} + +static void * +compaq_init(UNUSED(const device_t *info)) +{ + cpq_t *dev = (cpq_t *) calloc(1, sizeof(cpq_t)); + + mem_remap_top(384); + mem_mapping_add(&dev->ram_mapping, 0xfa0000, 0x60000, + read_ram, read_ramw, read_raml, + write_ram, write_ramw, write_raml, + 0xa0000 + ram, MEM_MAPPING_INTERNAL, NULL); + + return dev; +} + +const device_t compaq_device = { + .name = "Compaq Memory Control", + .internal_name = "compaq", + .flags = 0, + .local = 0, + .init = compaq_init, + .close = compaq_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/machine/m_at_grid.c b/src/chipset/grid1520.c similarity index 94% rename from src/machine/m_at_grid.c rename to src/chipset/grid1520.c index 03b7288b9..ce8b1e2a9 100644 --- a/src/machine/m_at_grid.c +++ b/src/chipset/grid1520.c @@ -39,6 +39,7 @@ #include <86box/rom.h> #include <86box/vid_cga.h> #include <86box/plat_unused.h> +#include <86box/chipset.h> #define GRID_APPROM_SELECT 0x440 #define GRID_APPROM_ENABLE 0x405 @@ -317,7 +318,7 @@ static void grid_reset(void *priv) { dev->grid_rom_select = 0; } -const device_t grid_device = { +const device_t grid1520_device = { .name = "GRiDcase 1520 chipset", .internal_name = "grid1520", .flags = 0, @@ -330,26 +331,3 @@ const device_t grid_device = { .force_redraw = NULL, .config = NULL }; - -int machine_at_grid1520_init(const machine_t *model) { - int ret = 0; - - ret = bios_load_linear("roms/machines/grid1520/grid1520_891025.rom", - 0x000f8000, 0x8000, 0); - if (bios_only || !ret) - return ret; - - machine_at_common_ide_init(model); - mem_remap_top(384); - - device_add(&keyboard_at_device); - // for now just select CGA with amber monitor - //device_add(&cga_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&grid_device); - - return ret; -} diff --git a/src/chipset/intel_piix.c b/src/chipset/intel_piix.c index e0d80f348..5d0c18441 100644 --- a/src/chipset/intel_piix.c +++ b/src/chipset/intel_piix.c @@ -47,6 +47,7 @@ #include <86box/hdc_ide.h> #include <86box/hdc_ide_sff8038i.h> #include <86box/usb.h> +#include <86box/lpt.h> #include <86box/machine.h> #include <86box/smbus.h> #include <86box/chipset.h> @@ -618,6 +619,13 @@ piix_write(int func, int addr, uint8_t val, void *priv) } break; case 0x76: + if (dev->type > 1) + fregs[addr] = val & 0x87; + else if (dev->type <= 4) + fregs[addr] = val & 0x8f; + if ((dev->type == 1) && machine_has_jumpered_ecp_dma(machine, MACHINE_DMA_USE_MBDMA)) + lpt1_dma(((val & 0x08) || ((val & 0x07) == 0x04)) ? 0xff : (val & 0x07)); + break; case 0x77: if (dev->type > 1) fregs[addr] = val & 0x87; diff --git a/src/machine/m_xt_laserxt.c b/src/chipset/laserxt.c similarity index 92% rename from src/machine/m_xt_laserxt.c rename to src/chipset/laserxt.c index 7a6cab5e3..a5308e2f0 100644 --- a/src/machine/m_xt_laserxt.c +++ b/src/chipset/laserxt.c @@ -1,4 +1,23 @@ -/*This is the chipset used in the LaserXT series model*/ +/* + * 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. + * + * Implementation of the VTech LaserXT chipset. + * + * Authors: Sarah Walker, + * Miran Grca, + * Fred N. van Kempen, + * Jasmine Iwanek, + * + * Copyright 2008-2025 Sarah Walker. + * Copyright 2016-2025 Miran Grca. + * Copyright 2017-2025 Fred N. van Kempen. + * Copyright 2025 Jasmine Iwanek. + */ #include #include #include @@ -452,53 +471,3 @@ const device_t lxt3_device = { .force_redraw = NULL, .config = lxt3_config }; - -static void -machine_xt_laserxt_common_init(const machine_t *model,int is_lxt3) -{ - machine_common_init(model); - - pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_xt_device); - - nmi_init(); - standalone_gameport_type = &gameport_device; - - device_add(is_lxt3 ? &lxt3_device : &laserxt_device); - - device_add(&keyboard_xt_lxt3_device); -} - -int -machine_xt_laserxt_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ltxt/27c64.bin", - 0x000fe000, 8192, 0); - - if (bios_only || !ret) - return ret; - - machine_xt_laserxt_common_init(model, 0); - - return ret; -} - -int -machine_xt_lxt3_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/lxt3/27c64d.bin", - 0x000fe000, 8192, 0); - - if (bios_only || !ret) - return ret; - - machine_xt_laserxt_common_init(model, 1); - - return ret; -} diff --git a/src/machine/m_xt_philips.c b/src/chipset/philips.c similarity index 74% rename from src/machine/m_xt_philips.c rename to src/chipset/philips.c index eed54e07f..d6f56c3c5 100644 --- a/src/machine/m_xt_philips.c +++ b/src/chipset/philips.c @@ -8,11 +8,9 @@ * * Emulation of the Philips XT-compatible machines. * - * - * * Authors: EngiNerd * - * Copyright 2020-2021 EngiNerd. + * Copyright 2020-2025 EngiNerd. */ #include #include @@ -148,60 +146,3 @@ const device_t philips_device = { .force_redraw = NULL, .config = NULL }; - -void -machine_xt_philips_common_init(const machine_t *model) -{ - machine_common_init(model); - - pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - - nmi_init(); - - standalone_gameport_type = &gameport_device; - - device_add(&keyboard_pc_device); - - device_add(&philips_device); - - device_add(&xta_hd20_device); -} - -int -machine_xt_p3105_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p3105/philipsnms9100.bin", - 0x000fc000, 16384, 0); - - if (bios_only || !ret) - return ret; - - machine_xt_philips_common_init(model); - - /* On-board FDC cannot be disabled */ - device_add(&fdc_xt_device); - - return ret; -} - -int -machine_xt_p3120_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p3120/philips_p3120.bin", - 0x000f8000, 32768, 0); - - if (bios_only || !ret) - return ret; - - machine_xt_philips_common_init(model); - - device_add(&gc100a_device); - - device_add(&fdc_at_device); - - return ret; -} diff --git a/src/chipset/sanyo.c b/src/chipset/sanyo.c new file mode 100644 index 000000000..68d6dac9b --- /dev/null +++ b/src/chipset/sanyo.c @@ -0,0 +1,123 @@ +/* + * 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. + * + * Emulation of the Philips XT-compatible machines. + * + * Authors: EngiNerd + * + * Copyright 2020-2025 EngiNerd. + */ +#include +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include <86box/nmi.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/pit.h> +#include <86box/mem.h> +#include <86box/device.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/hdc.h> +#include <86box/gameport.h> +#include <86box/ibm_5161.h> +#include <86box/keyboard.h> +#include <86box/rom.h> +#include <86box/machine.h> +#include <86box/chipset.h> +#include <86box/io.h> +#include <86box/video.h> +#include <86box/plat_unused.h> + +typedef struct sanyo_t { + uint8_t reg; +} sanyo_t; + +#ifdef ENABLE_SANYO_LOG +int sanyo_do_log = ENABLE_SANYO_LOG; + +static void +sanyo_log(const char *fmt, ...) +{ + va_list ap; + + if (sanyo_do_log) { + va_start(ap, fmt); + pclog_ex(fmt, ap); + va_end(ap); + } +} +#else +# define sanyo_log(fmt, ...) +#endif + +static void +sanyo_write(uint16_t port, uint8_t val, void *priv) +{ + sanyo_t *dev = (sanyo_t *) priv; + + dev->reg = val; + + cpu_waitstates = !(val & 0x01); + cpu_update_waitstates(); + + sanyo_log("Sanyo MBC-17 Mainboard: Write %02x at %02x\n", val, port); +} + +static uint8_t +sanyo_read(uint16_t port, void *priv) +{ + const sanyo_t *dev = (sanyo_t *) priv; + uint8_t ret = 0xff; + + ret = dev->reg; + + sanyo_log("Sanyo MBC-17 Mainboard: Read %02x at %02x\n", ret, port); + + return ret; +} + +static void +sanyo_close(void *priv) +{ + sanyo_t *dev = (sanyo_t *) priv; + + free(dev); +} + +static void * +sanyo_init(UNUSED(const device_t *info)) +{ + sanyo_t *dev = (sanyo_t *) calloc(1, sizeof(sanyo_t)); + + dev->reg = cpu_waitstates ? 0x00 : 0x01; + + io_sethandler(0x0063, 0x01, sanyo_read, NULL, NULL, sanyo_write, NULL, NULL, dev); + + return dev; +} + +const device_t sanyo_device = { + .name = "Sanyo MBC-17 Mainboard", + .internal_name = "sanyo", + .flags = 0, + .local = 0, + .init = sanyo_init, + .close = sanyo_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/chipset/scamp.c b/src/chipset/scamp.c index 855175dcd..7ad7b3db2 100644 --- a/src/chipset/scamp.c +++ b/src/chipset/scamp.c @@ -840,7 +840,7 @@ recalc_sltptr(scamp_t *dev) recalc_ems(dev); } } else { - for (uint8_t i = 0; i < (sltptr / EMS_PGSIZE); i++) + for (uint32_t i = 0; i < (sltptr / EMS_PGSIZE); i++) scamp_mem_update_state(dev, i * EMS_PGSIZE, EMS_PGSIZE, 0x00, MEM_FMASK_SLOTBUS); for (uint8_t i = (sltptr / EMS_PGSIZE); i < 40; i++) diff --git a/src/chipset/sis_5513_p2i.c b/src/chipset/sis_5513_p2i.c index b2346bbc4..ac160f337 100644 --- a/src/chipset/sis_5513_p2i.c +++ b/src/chipset/sis_5513_p2i.c @@ -24,8 +24,9 @@ #include <86box/io.h> #include "cpu.h" #include <86box/timer.h> - #include <86box/dma.h> +#include <86box/lpt.h> +#include <86box/machine.h> #include <86box/mem.h> #include <86box/nvr.h> #include <86box/hdd.h> @@ -319,6 +320,8 @@ sis_5513_00_pci_to_isa_write(int addr, uint8_t val, sis_5513_pci_to_isa_t *dev) case 0x62: /* On-board Device DMA Control Register */ dev->pci_conf[addr] = val; + if (machine_has_jumpered_ecp_dma(machine, MACHINE_DMA_USE_MBDMA)) + lpt1_dma(((val & 0x08) || ((val & 0x07) == 0x04)) ? 0xff : (val & 0x07)); break; case 0x63: /* IDEIRQ Remapping Control Register */ diff --git a/src/chipset/sis_5571.c b/src/chipset/sis_5571.c index 3980704fd..02e86a98a 100644 --- a/src/chipset/sis_5571.c +++ b/src/chipset/sis_5571.c @@ -27,6 +27,7 @@ #include <86box/nvr.h> #include <86box/apm.h> #include <86box/acpi.h> +#include <86box/keyboard.h> #include <86box/hdd.h> #include <86box/hdc.h> #include <86box/hdc_ide.h> @@ -166,6 +167,8 @@ sis_5571_init(UNUSED(const device_t *info)) dev->ide = device_add_linked(&sis_5572_ide_device, dev->sis); dev->usb = device_add_linked(&sis_5572_usb_device, dev->sis); + device_add_params(&kbc_at_device, (void *) KBC_VEN_SIS); + return dev; } diff --git a/src/chipset/sis_5581.c b/src/chipset/sis_5581.c index 998ac5350..525fe6598 100644 --- a/src/chipset/sis_5581.c +++ b/src/chipset/sis_5581.c @@ -27,6 +27,7 @@ #include <86box/nvr.h> #include <86box/apm.h> #include <86box/acpi.h> +#include <86box/keyboard.h> #include <86box/hdd.h> #include <86box/hdc.h> #include <86box/hdc_ide.h> @@ -166,6 +167,8 @@ sis_5581_init(UNUSED(const device_t *info)) dev->ide = device_add_linked(&sis_5582_ide_device, dev->sis); dev->usb = device_add_linked(&sis_5582_usb_device, dev->sis); + device_add_params(&kbc_at_device, (void *) KBC_VEN_SIS); + return dev; } diff --git a/src/chipset/sis_5591.c b/src/chipset/sis_5591.c index 3cb11cb5b..d814e0f74 100644 --- a/src/chipset/sis_5591.c +++ b/src/chipset/sis_5591.c @@ -27,6 +27,7 @@ #include <86box/nvr.h> #include <86box/apm.h> #include <86box/acpi.h> +#include <86box/keyboard.h> #include <86box/hdd.h> #include <86box/hdc.h> #include <86box/hdc_ide.h> @@ -178,6 +179,8 @@ sis_5591_init(UNUSED(const device_t *info)) else dev->pmu = device_add_linked(&sis_5595_pmu_device, dev->sis); + device_add_params(&kbc_at_device, (void *) KBC_VEN_SIS); + return dev; } diff --git a/src/chipset/sis_5600.c b/src/chipset/sis_5600.c index 1ed7f9ad0..564243c68 100644 --- a/src/chipset/sis_5600.c +++ b/src/chipset/sis_5600.c @@ -27,6 +27,7 @@ #include <86box/nvr.h> #include <86box/apm.h> #include <86box/acpi.h> +#include <86box/keyboard.h> #include <86box/hdd.h> #include <86box/hdc.h> #include <86box/hdc_ide.h> @@ -178,6 +179,8 @@ sis_5600_init(UNUSED(const device_t *info)) else dev->pmu = device_add_linked(&sis_5595_pmu_device, dev->sis); + device_add_params(&kbc_at_device, (void *) KBC_VEN_SIS); + return dev; } diff --git a/src/chipset/sis_85c4xx.c b/src/chipset/sis_85c4xx.c index be5bd668e..49d0418ce 100644 --- a/src/chipset/sis_85c4xx.c +++ b/src/chipset/sis_85c4xx.c @@ -596,15 +596,6 @@ sis_85c4xx_out(uint16_t port, uint8_t val, void *priv) switch (rel_reg) { case 0x00: - if (dev->is_471) { - if (val & 0x01) { - kbc_at_set_fast_reset(0); - cpu_cpurst_on_sr = 1; - } else { - kbc_at_set_fast_reset(1); - cpu_cpurst_on_sr = 0; - } - } break; case 0x01: diff --git a/src/chipset/stpc.c b/src/chipset/stpc.c index 13dbd97e9..f3075323a 100644 --- a/src/chipset/stpc.c +++ b/src/chipset/stpc.c @@ -80,10 +80,12 @@ typedef struct stpc_serial_t { } stpc_serial_t; typedef struct stpc_lpt_t { - uint8_t unlocked; - uint8_t offset; - uint8_t reg1; - uint8_t reg4; + uint8_t unlocked; + uint8_t offset; + uint8_t reg1; + uint8_t reg4; + + lpt_t *lpt; } stpc_lpt_t; #ifdef ENABLE_STPC_LOG @@ -977,22 +979,22 @@ stpc_lpt_handlers(stpc_lpt_t *dev, uint8_t val) { const uint8_t new_addr = (val & 0x03); - lpt1_remove(); + lpt_port_remove(dev->lpt); switch (new_addr) { case 0x1: stpc_log("STPC: Remapping parallel port to LPT3\n"); - lpt1_setup(LPT_MDA_ADDR); + lpt_port_setup(dev->lpt, LPT_MDA_ADDR); break; case 0x2: stpc_log("STPC: Remapping parallel port to LPT1\n"); - lpt1_setup(LPT1_ADDR); + lpt_port_setup(dev->lpt, LPT1_ADDR); break; case 0x3: stpc_log("STPC: Remapping parallel port to LPT2\n"); - lpt1_setup(LPT2_ADDR); + lpt_port_setup(dev->lpt, LPT2_ADDR); break; default: @@ -1063,6 +1065,8 @@ stpc_lpt_init(UNUSED(const device_t *info)) stpc_lpt_t *dev = (stpc_lpt_t *) calloc(1, sizeof(stpc_lpt_t)); + dev->lpt = device_add_inst(&lpt_port_device, 1); + stpc_lpt_reset(dev); io_sethandler(0x3f0, 2, diff --git a/src/chipset/umc_8886.c b/src/chipset/umc_8886.c index 0ed062450..29e2d46da 100644 --- a/src/chipset/umc_8886.c +++ b/src/chipset/umc_8886.c @@ -419,6 +419,9 @@ umc_8886_init(const device_t *info) device_add(&ide_um8673f_device); } + if (machine_get_kbc_device(machine) == NULL) + device_add_params(&kbc_at_device, (void *) KBC_VEN_UMC); + umc_8886_reset(dev); return dev; diff --git a/src/chipset/via_pipc.c b/src/chipset/via_pipc.c index 248664983..7915b199e 100644 --- a/src/chipset/via_pipc.c +++ b/src/chipset/via_pipc.c @@ -43,6 +43,7 @@ #include <86box/hdc.h> #include <86box/hdc_ide.h> #include <86box/hdc_ide_sff8038i.h> +#include <86box/keyboard.h> #include <86box/usb.h> #include <86box/machine.h> #include <86box/smbus.h> @@ -1774,6 +1775,38 @@ pipc_init(const device_t *info) acpi_set_irq_mode(dev->acpi, 0); } + uint32_t kbc_params = 0x00424600; + /* + 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. + */ + switch (dev->local) { + /* 596A, 596B, 686B, and 8231 are guesses because we have no probes yet. */ + case VIA_PIPC_586A: case VIA_PIPC_596A: + kbc_params = 0x00434600; + break; + case VIA_PIPC_586B: case VIA_PIPC_596B: + kbc_params = 0x00444600; + break; + case VIA_PIPC_686A: case VIA_PIPC_686B: + case VIA_PIPC_8231: + kbc_params = 0x00454600; + break; + } + + kbc_params |= KBC_VEN_VIA; + + if (machine_get_kbc_device(machine) == NULL) + device_add_params(&kbc_at_device, (void *) (uintptr_t) kbc_params); + return dev; } diff --git a/src/chipset/via_vt82c49x.c b/src/chipset/via_vt82c49x.c index f8a5bb593..3a7bbfdda 100644 --- a/src/chipset/via_vt82c49x.c +++ b/src/chipset/via_vt82c49x.c @@ -193,6 +193,8 @@ vt82c49x_recalc(vt82c49x_t *dev) default: break; } + + flushmmucache_nopc(); } static void diff --git a/src/chipset/wd76c10.c b/src/chipset/wd76c10.c index 48bb56483..ddde7626e 100644 --- a/src/chipset/wd76c10.c +++ b/src/chipset/wd76c10.c @@ -81,7 +81,9 @@ typedef struct { typedef struct { uint8_t ep, p92; + uint8_t addr_sel; + uint8_t addr_regs[8]; uint8_t vbios_states[4]; uint8_t bios_states[8]; uint8_t high_bios_states[8]; @@ -100,6 +102,7 @@ typedef struct }; uint16_t ems_page_regs[40]; + uint16_t lpt_base; int locked; @@ -113,9 +116,9 @@ typedef struct mem_mapping_t ram_mapping; nvr_t *nvr; - - fdc_t *fdc; - serial_t *uart[2]; + fdc_t *fdc; + serial_t *uart[2]; + lpt_t *lpt; } wd76c10_t; static uint32_t bank_sizes[4] = { 0x00020000, /* 64 Kbit X 16 = 1024 Kbit = 128 kB, 8x 8 */ @@ -841,7 +844,7 @@ wd76c10_pf_loc_recalc(wd76c10_t *dev) uint8_t ems_page; uint32_t base; - for (uint8_t i = (0x031 + pf_loc); i <= (0x037 + pf_loc); i++) { + for (uint16_t i = (0x031 + pf_loc); i <= (0x037 + pf_loc); i++) { ems_page = (i - 0x10) & 0xf7; dev->mem_pages[i] = ems_page; base = ((uint32_t) i) << 14; @@ -873,6 +876,92 @@ wd76c10_low_pages_recalc(wd76c10_t *dev) } } +static void +wd73c30_reset(wd76c10_t *dev) +{ + dev->addr_sel = 0x00; + + dev->addr_regs[0x00] = 0x00; + dev->addr_regs[0x01] = 0x00; + dev->addr_regs[0x05] = 0x00; + + serial_set_type(dev->uart[0], SERIAL_16450); + serial_set_type(dev->uart[1], SERIAL_16450); + + serial_set_clock_src(dev->uart[1], 1843200.0); + serial_set_clock_src(dev->uart[0], 1843200.0); + + lpt_set_ext(dev->lpt, 0); +} + +static void +wd76c30_write(uint16_t port, uint8_t val, void *priv) +{ + wd76c10_t *dev = (wd76c10_t *) priv; + + switch (port & 0x0007) { + case 0x0003: + dev->addr_sel = val; + switch (val & 0x60) { + case 0x00: + serial_set_clock_src(dev->uart[1], 1843200.0); + break; + case 0x20: + serial_set_clock_src(dev->uart[1], 3072000.0); + break; + case 0x40: + serial_set_clock_src(dev->uart[1], 6000000.0); /* What is MSTRX1? */ + break; + case 0x60: + serial_set_clock_src(dev->uart[1], 8000000.0); + break; + } + switch (val & 0x18) { + case 0x00: + serial_set_clock_src(dev->uart[0], 1843200.0); + break; + case 0x08: + serial_set_clock_src(dev->uart[0], 3072000.0); + break; + case 0x10: + serial_set_clock_src(dev->uart[0], 6000000.0); /* What is MSTRX1? */ + break; + case 0x18: + serial_set_clock_src(dev->uart[0], 8000000.0); + break; + } + break; + case 0x0007: + dev->addr_regs[dev->addr_sel & 0x07] = val; + switch (dev->addr_sel & 0x07) { + case 0x05: + lpt_set_ext(dev->lpt, !!(val & 0x02)); + serial_set_type(dev->uart[0], (val & 0x01) ? SERIAL_16550 : SERIAL_16450); + serial_set_type(dev->uart[1], (val & 0x01) ? SERIAL_16550 : SERIAL_16450); + break; + } + break; + } +} + +static uint8_t +wd76c30_read(uint16_t port, void *priv) +{ + wd76c10_t *dev = (wd76c10_t *) priv; + uint8_t ret = 0xff; + + switch (port & 0x0007) { + case 0x0003: + ret = dev->addr_sel; + break; + case 0x0007: + ret = dev->addr_regs[dev->addr_sel & 0x07]; + break; + } + + return ret; +} + static void wd76c10_ser_par_cs_recalc(wd76c10_t *dev) { @@ -911,21 +1000,24 @@ wd76c10_ser_par_cs_recalc(wd76c10_t *dev) } /* LPT */ - lpt1_remove(); + lpt_port_remove(dev->lpt); + if (dev->lpt_base != 0x0000) + io_removehandler(dev->lpt_base, 0x0008, wd76c30_read, NULL, NULL, wd76c30_write, NULL, NULL, dev); + dev->lpt_base = 0x0000; switch ((dev->ser_par_cs >> 9) & 0x03) { case 1: - lpt1_setup(LPT_MDA_ADDR); - lpt1_irq(LPT1_IRQ); + dev->lpt_base = LPT_MDA_ADDR; break; case 2: - lpt1_setup(LPT1_ADDR); - lpt1_irq(LPT1_IRQ); + dev->lpt_base = LPT1_ADDR; break; case 3: - lpt1_setup(LPT2_ADDR); - lpt1_irq(LPT1_IRQ); + dev->lpt_base = LPT2_ADDR; break; } + io_sethandler(dev->lpt_base, 0x0008, wd76c30_read, NULL, NULL, wd76c30_write, NULL, NULL, dev); + lpt_port_setup(dev->lpt, dev->lpt_base); + lpt_port_irq(dev->lpt, LPT1_IRQ); } static void @@ -1173,8 +1265,8 @@ wd76c10_inw(uint16_t port, void *priv) case 0xd072: ret = (serial_read(0x0002, dev->uart[0]) & 0xc0) << 8; ret |= (serial_read(0x0002, dev->uart[1]) & 0xc0) << 6; - ret |= (lpt_read_port(0, 0x0002) & 0x0f) << 8; - ret |= lpt_read_port(0, 0x0000); + ret |= (lpt_read_port(dev->lpt, 0x0002) & 0x0f) << 8; + ret |= lpt_read_port(dev->lpt, 0x0000); break; case 0xe072: @@ -1188,7 +1280,7 @@ wd76c10_inw(uint16_t port, void *priv) break; case 0xfc72: - ret = ((lpt_read_status(0) & 0x20) >> 2); + ret = ((lpt_read_status(dev->lpt) & 0x20) >> 2); ret |= (((uint16_t) dma_m) << 4); ret |= dev->toggle; dev->toggle ^= 0x8000; @@ -1239,6 +1331,8 @@ wd76c10_reset(void *priv) nvr_lock_set(0x38, 0x08, 0x00, dev->nvr); + wd73c30_reset(dev); + wd76c10_banks_recalc(dev); wd76c10_split_recalc(dev); wd76c10_dis_mem_recalc(dev); @@ -1303,6 +1397,7 @@ wd76c10_init(UNUSED(const device_t *info)) dev->nvr = device_add(&amstrad_megapc_nvr_device); dev->uart[0] = device_add_inst(&ns16450_device, 1); dev->uart[1] = device_add_inst(&ns16450_device, 2); + dev->lpt = device_add_inst(&lpt_port_device, 1); dev->fdc = device_add(&fdc_at_device); device_add(&ide_isa_device); diff --git a/src/codegen/codegen_ops_x86-64.h b/src/codegen/codegen_ops_x86-64.h index 129d9a740..5d6a62c7a 100644 --- a/src/codegen/codegen_ops_x86-64.h +++ b/src/codegen/codegen_ops_x86-64.h @@ -3875,19 +3875,31 @@ FP_LOAD_IMM_Q(uint64_t v) static __inline void FP_FCHS(void) { + addbyte(0x48); /* MOVABS RAX, 0x8000000000000000 */ + addbyte(0xb8); + addquad(0x8000000000000000); + addbyte(0x66); /* MOVQ XMM15, RAX */ + addbyte(0x4c); + addbyte(0x0f); + addbyte(0x6e); + addbyte(0xf8); + addbyte(0x48); /* XOR RAX, RAX */ + addbyte(0x31); + addbyte(0xc0); addbyte(0x8b); /*MOV EAX, TOP*/ addbyte(0x45); addbyte((uint8_t) cpu_state_offset(TOP)); - addbyte(0xf2); /*SUBSD XMM0, XMM0*/ + addbyte(0xf3); /*MOVQ XMM0, ST[EAX*8]*/ addbyte(0x0f); - addbyte(0x5c); - addbyte(0xc0); - addbyte(0xf2); /*SUBSD XMM0, ST[EAX*8]*/ - addbyte(0x0f); - addbyte(0x5c); + addbyte(0x7e); addbyte(0x44); addbyte(0xc5); addbyte((uint8_t) cpu_state_offset(ST)); + addbyte(0x66); /* PXOR XMM0, XMM15 */ + addbyte(0x41); + addbyte(0x0F); + addbyte(0xEF); + addbyte(0xC7); addbyte(0x80); /*AND tag[EAX], ~TAG_UINT64*/ addbyte(0x64); addbyte(0x05); diff --git a/src/codegen_new/codegen_backend_x86-64_uops.c b/src/codegen_new/codegen_backend_x86-64_uops.c index 6b68434a0..356c8bcde 100644 --- a/src/codegen_new/codegen_backend_x86-64_uops.c +++ b/src/codegen_new/codegen_backend_x86-64_uops.c @@ -636,9 +636,10 @@ codegen_FCHS(codeblock_t *block, uop_t *uop) int src_size_a = IREG_GET_SIZE(uop->src_reg_a_real); if (REG_IS_D(dest_size) && REG_IS_D(src_size_a)) { - host_x86_MOVQ_XREG_XREG(block, REG_XMM_TEMP, src_reg_a); - host_x86_PXOR_XREG_XREG(block, dest_reg, dest_reg); - host_x86_SUBSD_XREG_XREG(block, dest_reg, REG_XMM_TEMP); + host_x86_MOVQ_XREG_XREG(block, dest_reg, src_reg_a); + host_x86_MOV64_REG_IMM(block, REG_RCX, 0x8000000000000000); + host_x86_MOVQ_XREG_REG(block, REG_XMM_TEMP, REG_RCX); + host_x86_PXOR_XREG_XREG(block, dest_reg, REG_XMM_TEMP); } # ifdef RECOMPILER_DEBUG else diff --git a/src/config.c b/src/config.c index acfbec758..345e2a483 100644 --- a/src/config.c +++ b/src/config.c @@ -56,6 +56,7 @@ #include <86box/fdd.h> #include <86box/fdc_ext.h> #include <86box/gameport.h> +#include <86box/keyboard.h> #include <86box/serial_passthrough.h> #include <86box/machine.h> #include <86box/mouse.h> @@ -65,7 +66,7 @@ #include <86box/scsi_device.h> #include <86box/cdrom.h> #include <86box/cdrom_interface.h> -#include <86box/zip.h> +#include <86box/rdisk.h> #include <86box/mo.h> #include <86box/sound.h> #include <86box/midi.h> @@ -89,6 +90,7 @@ static int cy; static int cw; static int ch; static ini_t config; +static ini_t global; #ifdef ENABLE_CONFIG_LOG int config_do_log = ENABLE_CONFIG_LOG; @@ -108,6 +110,41 @@ config_log(const char *fmt, ...) # define config_log(fmt, ...) #endif +/* Load global configuration */ +static void +load_global(void) +{ + ini_section_t cat = ini_find_section(global, ""); + char *p; + + p = ini_section_get_string(cat, "language", NULL); + if (p != NULL) + lang_id = plat_language_code(p); + else + lang_id = plat_language_code(DEFAULT_LANGUAGE); + + open_dir_usr_path = ini_section_get_int(cat, "open_dir_usr_path", 0); + + confirm_reset = ini_section_get_int(cat, "confirm_reset", 1); + confirm_exit = ini_section_get_int(cat, "confirm_exit", 1); + confirm_save = ini_section_get_int(cat, "confirm_save", 1); + + inhibit_multimedia_keys = ini_section_get_int(cat, "inhibit_multimedia_keys", 0); + + mouse_sensitivity = ini_section_get_double(cat, "mouse_sensitivity", 1.0); + if (mouse_sensitivity < 0.1) + mouse_sensitivity = 0.1; + else if (mouse_sensitivity > 2.0) + mouse_sensitivity = 2.0; + + vmm_disabled = ini_section_get_int(cat, "vmm_disabled", 0); + + p = ini_section_get_string(cat, "vmm_path", NULL); + if (p != NULL) + strncpy(vmm_path_cfg, p, sizeof(vmm_path_cfg) - 1); + else + plat_get_vmm_dir(vmm_path_cfg, sizeof(vmm_path_cfg)); +} /* Load "General" section. */ static void @@ -131,8 +168,6 @@ load_general(void) video_filter_method = ini_section_get_int(cat, "video_filter_method", 1); - inhibit_multimedia_keys = ini_section_get_int(cat, "inhibit_multimedia_keys", 0); - force_43 = !!ini_section_get_int(cat, "force_43", 0); scale = ini_section_get_int(cat, "scale", 1); if (scale > 9) @@ -180,26 +215,8 @@ load_general(void) hide_tool_bar = ini_section_get_int(cat, "hide_tool_bar", 0); sound_muted = ini_section_get_int(cat, "sound_muted", 0); - confirm_reset = ini_section_get_int(cat, "confirm_reset", 1); - confirm_exit = ini_section_get_int(cat, "confirm_exit", 1); - confirm_save = ini_section_get_int(cat, "confirm_save", 1); - - p = ini_section_get_string(cat, "language", NULL); - if (p != NULL) - lang_id = plat_language_code(p); - else - lang_id = plat_language_code(DEFAULT_LANGUAGE); - - mouse_sensitivity = ini_section_get_double(cat, "mouse_sensitivity", 1.0); - if (mouse_sensitivity < 0.1) - mouse_sensitivity = 0.1; - else if (mouse_sensitivity > 2.0) - mouse_sensitivity = 2.0; - enable_discord = !!ini_section_get_int(cat, "enable_discord", 0); - open_dir_usr_path = ini_section_get_int(cat, "open_dir_usr_path", 0); - video_framerate = ini_section_get_int(cat, "video_gl_framerate", -1); video_vsync = ini_section_get_int(cat, "video_gl_vsync", 0); @@ -215,6 +232,7 @@ load_general(void) } do_auto_pause = ini_section_get_int(cat, "do_auto_pause", 0); + force_constant_mouse = ini_section_get_int(cat, "force_constant_mouse", 0); p = ini_section_get_string(cat, "uuid", NULL); if (p != NULL) @@ -453,9 +471,6 @@ load_video(void) if (((gfxcard[0] == VID_INTERNAL) && machine_has_flags(machine, MACHINE_VIDEO_8514A)) || video_card_get_flags(gfxcard[0]) == VIDEO_FLAG_TYPE_8514) ini_section_delete_var(cat, "8514a"); - if (((gfxcard[0] == VID_INTERNAL) && machine_has_flags(machine, MACHINE_VIDEO_XGA)) || - video_card_get_flags(gfxcard[0]) == VIDEO_FLAG_TYPE_XGA) - ini_section_delete_var(cat, "xga"); voodoo_enabled = !!ini_section_get_int(cat, "voodoo", 0); ibm8514_standalone_enabled = !!ini_section_get_int(cat, "8514a", 0); @@ -466,6 +481,12 @@ load_video(void) show_second_monitors = !!ini_section_get_int(cat, "show_second_monitors", 1); video_fullscreen_scale_maximized = !!ini_section_get_int(cat, "video_fullscreen_scale_maximized", 0); + vid_cga_comp_brightness = ini_section_get_int(cat, "vid_cga_comp_brightness", 0); + vid_cga_comp_sharpness = ini_section_get_int(cat, "vid_cga_comp_sharpness", 0); + vid_cga_comp_contrast = ini_section_get_int(cat, "vid_cga_comp_contrast", 100); + vid_cga_comp_hue = ini_section_get_int(cat, "vid_cga_comp_hue", 0); + vid_cga_comp_saturation = ini_section_get_int(cat, "vid_cga_comp_saturation", 100); + // TODO for (uint8_t i = 1; i < GFXCARD_MAX; i ++) { p = ini_section_get_string(cat, "gfxcard_2", NULL); @@ -483,68 +504,88 @@ load_input_devices(void) char temp[512]; char *p; + p = ini_section_get_string(cat, "keyboard_type", NULL); + if (p != NULL) + keyboard_type = keyboard_get_from_internal_name(p); + else if (strstr(machine_get_internal_name(), "pc5086")) + keyboard_type = KEYBOARD_TYPE_PC_XT; + else if (machine_has_bus(machine, MACHINE_BUS_PS2_PORTS)) { + if (machine_has_flags(machine, MACHINE_KEYBOARD_JIS)) + keyboard_type = KEYBOARD_TYPE_PS55; + else + keyboard_type = KEYBOARD_TYPE_PS2; + } else if (machine_has_bus(machine, MACHINE_BUS_ISA16) || + machine_has_bus(machine, MACHINE_BUS_PCI)) { + if (machine_has_flags(machine, MACHINE_KEYBOARD_JIS)) + keyboard_type = KEYBOARD_TYPE_AX; + else + keyboard_type = KEYBOARD_TYPE_AT; + } else + keyboard_type = KEYBOARD_TYPE_PC_XT; + p = ini_section_get_string(cat, "mouse_type", NULL); if (p != NULL) mouse_type = mouse_get_from_internal_name(p); else mouse_type = 0; + uint8_t joy_insn = 0; p = ini_section_get_string(cat, "joystick_type", NULL); if (p != NULL) { - joystick_type = joystick_get_from_internal_name(p); + joystick_type[joy_insn] = joystick_get_from_internal_name(p); - if (!joystick_type) { + if (!joystick_type[joy_insn]) { /* Try to read an integer for backwards compatibility with old configs */ if (!strcmp(p, "0")) /* Workaround for ini_section_get_int returning 0 on non-integer data */ - joystick_type = joystick_get_from_internal_name("2axis_2button"); + joystick_type[joy_insn] = joystick_get_from_internal_name("2axis_2button"); else { int js = ini_section_get_int(cat, "joystick_type", 8); switch (js) { case JS_TYPE_2AXIS_4BUTTON: - joystick_type = joystick_get_from_internal_name("2axis_4button"); + joystick_type[joy_insn] = joystick_get_from_internal_name("2axis_4button"); break; case JS_TYPE_2AXIS_6BUTTON: - joystick_type = joystick_get_from_internal_name("2axis_6button"); + joystick_type[joy_insn] = joystick_get_from_internal_name("2axis_6button"); break; case JS_TYPE_2AXIS_8BUTTON: - joystick_type = joystick_get_from_internal_name("2axis_8button"); + joystick_type[joy_insn] = joystick_get_from_internal_name("2axis_8button"); break; case JS_TYPE_4AXIS_4BUTTON: - joystick_type = joystick_get_from_internal_name("4axis_4button"); + joystick_type[joy_insn] = joystick_get_from_internal_name("4axis_4button"); break; case JS_TYPE_CH_FLIGHTSTICK_PRO: - joystick_type = joystick_get_from_internal_name("ch_flightstick_pro"); + joystick_type[joy_insn] = joystick_get_from_internal_name("ch_flightstick_pro"); break; case JS_TYPE_SIDEWINDER_PAD: - joystick_type = joystick_get_from_internal_name("sidewinder_pad"); + joystick_type[joy_insn] = joystick_get_from_internal_name("sidewinder_pad"); break; case JS_TYPE_THRUSTMASTER_FCS: - joystick_type = joystick_get_from_internal_name("thrustmaster_fcs"); + joystick_type[joy_insn] = joystick_get_from_internal_name("thrustmaster_fcs"); break; default: - joystick_type = JS_TYPE_NONE; + joystick_type[joy_insn] = JS_TYPE_NONE; break; } } } } else - joystick_type = JS_TYPE_NONE; + joystick_type[joy_insn] = JS_TYPE_NONE; - for (int js = 0; js < joystick_get_max_joysticks(joystick_type); js++) { + for (int js = 0; js < joystick_get_max_joysticks(joystick_type[joy_insn]); js++) { sprintf(temp, "joystick_%i_nr", js); joystick_state[0][js].plat_joystick_nr = ini_section_get_int(cat, temp, 0); if (joystick_state[0][js].plat_joystick_nr) { - for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type); axis_nr++) { + for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type[joy_insn]); axis_nr++) { sprintf(temp, "joystick_%i_axis_%i", js, axis_nr); joystick_state[0][js].axis_mapping[axis_nr] = ini_section_get_int(cat, temp, axis_nr); } - for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type); button_nr++) { + for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type[joy_insn]); button_nr++) { sprintf(temp, "joystick_%i_button_%i", js, button_nr); joystick_state[0][js].button_mapping[button_nr] = ini_section_get_int(cat, temp, button_nr); } - for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type); pov_nr++) { + for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type[joy_insn]); pov_nr++) { sprintf(temp, "joystick_%i_pov_%i", js, pov_nr); p = ini_section_get_string(cat, temp, "0, 0"); joystick_state[0][js].pov_mapping[pov_nr][0] = joystick_state[0][js].pov_mapping[pov_nr][1] = 0; @@ -666,6 +707,10 @@ load_network(void) nc->net_type = NET_TYPE_VDE; else if (!strcmp(p, "tap") || !strcmp(p, "4")) nc->net_type = NET_TYPE_TAP; + else if (!strcmp(p, "nmswitch") || !strcmp(p, "5")) + nc->net_type = NET_TYPE_NMSWITCH; + else if (!strcmp(p, "nrswitch") || !strcmp(p, "6")) + nc->net_type = NET_TYPE_NRSWITCH; else nc->net_type = NET_TYPE_NONE; } else @@ -714,6 +759,10 @@ load_network(void) nc->net_type = NET_TYPE_VDE; else if (!strcmp(p, "tap") || !strcmp(p, "4")) nc->net_type = NET_TYPE_TAP; + else if (!strcmp(p, "nmswitch") || !strcmp(p, "5")) + nc->net_type = NET_TYPE_NMSWITCH; + else if (!strcmp(p, "nrswitch") || !strcmp(p, "6")) + nc->net_type = NET_TYPE_NRSWITCH; else nc->net_type = NET_TYPE_NONE; } else @@ -735,6 +784,19 @@ load_network(void) } else strcpy(nc->host_dev_name, "none"); + sprintf(temp, "net_%02i_switch_group", c + 1); + net_cards_conf[c].switch_group = ini_section_get_int(cat, temp, 0); + + sprintf(temp, "net_%02i_promisc", c + 1); + net_cards_conf[c].promisc_mode = ini_section_get_int(cat, temp, 0); + + sprintf(temp, "net_%02i_nrs_host", c + 1); + p = ini_section_get_string(cat, temp, NULL); + if (p != NULL) + strncpy(net_cards_conf[c].nrs_hostname, p, sizeof(net_cards_conf[c].nrs_hostname) - 1); + else + strncpy(net_cards_conf[c].nrs_hostname, "", sizeof(net_cards_conf[c].nrs_hostname) - 1); + sprintf(temp, "net_%02i_link", c + 1); nc->link_state = ini_section_get_int(cat, temp, (NET_LINK_10_HD | NET_LINK_10_FD | @@ -752,6 +814,14 @@ load_ports(void) char temp[512]; memset(temp, 0, sizeof(temp)); + int has_jumpers = machine_has_jumpered_ecp_dma(machine, DMA_ANY); + int def_jumper = machine_get_default_jumpered_ecp_dma(machine); + + jumpered_internal_ecp_dma = ini_section_get_int(cat, "jumpered_internal_ecp_dma", def_jumper); + + if (!has_jumpers || (jumpered_internal_ecp_dma == def_jumper)) + ini_section_delete_var(cat, "jumpered_internal_ecp_dma"); + for (int c = 0; c < (SERIAL_MAX - 1); c++) { sprintf(temp, "serial%d_enabled", c + 1); com_ports[c].enabled = !!ini_section_get_int(cat, temp, (c >= 2) ? 0 : 1); @@ -768,8 +838,8 @@ load_ports(void) lpt_ports[c].enabled = !!ini_section_get_int(cat, temp, (c == 0) ? 1 : 0); sprintf(temp, "lpt%d_device", c + 1); - p = ini_section_get_string(cat, temp, "none"); - lpt_ports[c].device = lpt_device_get_from_internal_name(p); + p = ini_section_get_string(cat, temp, "none"); + lpt_ports[c].device = lpt_device_get_from_internal_name(p); } #if 0 @@ -795,6 +865,37 @@ load_ports(void) #endif } +static int +load_image_file(char *dest, char *p, uint8_t *ui_wp) +{ + char *prefix = ""; + int ret = 0; + + if (strstr(p, "wp://") == p) { + p += 5; + prefix = "wp://"; + if (ui_wp != NULL) + *ui_wp = 1; + } else if ((ui_wp != NULL) && *ui_wp) + prefix = "wp://"; + + if (path_abs(p)) { + if ((strlen(prefix) + strlen(p)) > (MAX_IMAGE_PATH_LEN - 11)) + ret = 1; + else + snprintf(dest, MAX_IMAGE_PATH_LEN, "%s%s", prefix, p); + } else { + if ((strlen(prefix) + strlen(usr_path) + strlen(path_get_slash(usr_path)) + strlen(p)) > (MAX_IMAGE_PATH_LEN - 11)) + ret = 1; + else + snprintf(dest, MAX_IMAGE_PATH_LEN, "%s%s%s%s", prefix, usr_path, path_get_slash(usr_path), p); + } + + path_normalize(dest); + + return ret; +} + /* Load "Storage Controllers" section. */ static void load_storage_controllers(void) @@ -804,7 +905,6 @@ load_storage_controllers(void) char *p; char temp[512]; int min = 0; - int free_p = 0; for (int c = min; c < SCSI_CARD_MAX; c++) { sprintf(temp, "scsicard_%d", c + 1); @@ -823,6 +923,8 @@ load_storage_controllers(void) else fdc_current[0] = FDC_INTERNAL; #else + int free_p = 0; + if (p == NULL) { if (machine_has_flags(machine, MACHINE_FDC)) { p = (char *) malloc((strlen("internal") + 1) * sizeof(char)); @@ -843,65 +945,70 @@ load_storage_controllers(void) } #endif - p = ini_section_get_string(cat, "hdc", NULL); - if (p == NULL) { - if (machine_has_flags(machine, MACHINE_HDC)) { - p = (char *) malloc((strlen("internal") + 1) * sizeof(char)); - strcpy(p, "internal"); - } else { - p = (char *) malloc((strlen("none") + 1) * sizeof(char)); - strcpy(p, "none"); - } - free_p = 1; - } - /* Migrate renamed and merged cards. */ - if (!strcmp(p, "xtide_plus")) { - hdc_current[0] = hdc_get_from_internal_name("xtide"); - migration_cat = ini_find_or_create_section(config, "PC/XT XTIDE"); - ini_section_set_string(migration_cat, "bios", "xt_plus"); - } else if (!strcmp(p, "xtide_at_386")) { - hdc_current[0] = hdc_get_from_internal_name("xtide_at"); - migration_cat = ini_find_or_create_section(config, "PC/AT XTIDE"); - ini_section_set_string(migration_cat, "bios", "at_386"); - } else - hdc_current[0] = hdc_get_from_internal_name(p); + for (int c = min; c < HDC_MAX; c++) { + sprintf(temp, "hdc_%d", c + 1); - if (free_p) { - free(p); - p = NULL; + p = ini_section_get_string(cat, temp, NULL); + if (p != NULL) + hdc_current[c] = hdc_get_from_internal_name(p); + else + hdc_current[c] = 0; } + /* Backwards compatibility for single HDC and standalone tertiary/quaternary IDE from v4.2 and older. */ + const char *legacy_cards[] = { NULL, "ide_ter", "ide_qua" }; + p = ini_section_get_string(cat, "hdc", NULL); + for (int i = !(p || machine_has_flags(machine, MACHINE_HDC)), j = 0; i < (sizeof(legacy_cards) / sizeof(legacy_cards[0])); i++) { + if (!legacy_cards[i] || (ini_section_get_int(cat, legacy_cards[i], 0) == 1)) { + /* Migrate to the first available HDC slot. */ + for (; j < (sizeof(hdc_current) / sizeof(hdc_current[0])); j++) { + if (!hdc_current[j]) { + if (!legacy_cards[i]) { + if (!p) { + hdc_current[j] = hdc_get_from_internal_name("internal"); + } else if (!strcmp(p, "xtide_plus")) { + hdc_current[j] = hdc_get_from_internal_name("xtide"); + sprintf(temp, "PC/XT XTIDE #%i", j + 1); + migration_cat = ini_find_or_create_section(config, temp); + ini_section_set_string(migration_cat, "bios", "xt_plus"); + } else if (!strcmp(p, "xtide_at_386")) { + hdc_current[j] = hdc_get_from_internal_name("xtide_at"); + sprintf(temp, "PC/AT XTIDE #%i", j + 1); + migration_cat = ini_find_or_create_section(config, temp); + ini_section_set_string(migration_cat, "bios", "at_386"); + } else { + hdc_current[j] = hdc_get_from_internal_name(p); + } + } else { + hdc_current[j] = hdc_get_from_internal_name(legacy_cards[i]); + } + break; + } + } + } + } + ini_section_delete_var(cat, "hdc"); + p = ini_section_get_string(cat, "cdrom_interface", NULL); if (p != NULL) cdrom_interface_current = cdrom_interface_get_from_internal_name(p); - if (free_p) { - free(p); - p = NULL; - } - - ide_ter_enabled = !!ini_section_get_int(cat, "ide_ter", 0); - ide_qua_enabled = !!ini_section_get_int(cat, "ide_qua", 0); - if (machine_has_bus(machine, MACHINE_BUS_CASSETTE)) cassette_enable = !!ini_section_get_int(cat, "cassette_enabled", 0); else cassette_enable = 0; + cassette_ui_writeprot = !!ini_section_get_int(cat, "cassette_writeprot", 0); + ini_section_delete_var(cat, "cassette_writeprot"); + p = ini_section_get_string(cat, "cassette_file", ""); if (!strcmp(p, usr_path)) p[0] = 0x00; if (p[0] != 0x00) { - if (path_abs(p)) { - if (strlen(p) > 511) - fatal("Configuration: Length of cassette_file is more than 511\n"); - else - strncpy(cassette_fname, p, 511); - } else - path_append_filename(cassette_fname, usr_path, p); - path_normalize(cassette_fname); + if (load_image_file(cassette_fname, p, (uint8_t *) &cassette_ui_writeprot)) + fatal("Configuration: Length of cassette_file is more than 511\n"); } p = ini_section_get_string(cat, "cassette_mode", "load"); @@ -915,16 +1022,9 @@ load_storage_controllers(void) sprintf(temp, "cassette_image_history_%02i", i + 1); p = ini_section_get_string(cat, temp, NULL); if (p) { - if (path_abs(p)) { - if (strlen(p) > (MAX_IMAGE_PATH_LEN - 1)) - fatal("Configuration: Length of cassette_image_history_%02i is more " - "than %i\n", i + 1, MAX_IMAGE_PATH_LEN - 1); - else - snprintf(cassette_image_history[i], MAX_IMAGE_PATH_LEN, "%s", p); - } else - snprintf(cassette_image_history[i], MAX_IMAGE_PATH_LEN, "%s%s%s", usr_path, - path_get_slash(usr_path), p); - path_normalize(cassette_image_history[i]); + if (load_image_file(cassette_image_history[i], p, NULL)) + fatal("Configuration: Length of cassette_image_history_%02i is more " + "than %i\n", i + 1, MAX_IMAGE_PATH_LEN - 1); } } cassette_pos = ini_section_get_int(cat, "cassette_position", 0); @@ -939,9 +1039,6 @@ load_storage_controllers(void) cassette_pcm = ini_section_get_int(cat, "cassette_pcm", 0); if (!cassette_pcm) ini_section_delete_var(cat, "cassette_pcm"); - cassette_ui_writeprot = !!ini_section_get_int(cat, "cassette_writeprot", 0); - if (!cassette_ui_writeprot) - ini_section_delete_var(cat, "cassette_writeprot"); if (!cassette_enable) { ini_section_delete_var(cat, "cassette_file"); @@ -1227,6 +1324,11 @@ load_floppy_and_cdrom_drives(void) if (fdd_get_type(c) > 13) fdd_set_type(c, 13); + sprintf(temp, "fdd_%02i_writeprot", c + 1); + ui_writeprot[c] = !!ini_section_get_int(cat, temp, 0); + if (ui_writeprot[c] == 0) + ini_section_delete_var(cat, temp); + sprintf(temp, "fdd_%02i_fn", c + 1); p = ini_section_get_string(cat, temp, ""); @@ -1234,22 +1336,14 @@ load_floppy_and_cdrom_drives(void) p[0] = 0x00; if (p[0] != 0x00) { - if (path_abs(p)) { - if (strlen(p) > 511) - fatal("Configuration: Length of fdd_%02i_fn is more than 511\n", c + 1); - else - strncpy(floppyfns[c], p, 511); - } else - path_append_filename(floppyfns[c], usr_path, p); - path_normalize(floppyfns[c]); + if (load_image_file(floppyfns[c], p, (uint8_t *) &(ui_writeprot[c]))) + fatal("Configuration: Length of fdd_%02i_fn is more than 511\n", c + 1); } #if defined(ENABLE_CONFIG_LOG) && (ENABLE_CONFIG_LOG == 2) if (*p != '\0') config_log("Floppy%d: %ls\n", c, floppyfns[c]); #endif - sprintf(temp, "fdd_%02i_writeprot", c + 1); - ui_writeprot[c] = !!ini_section_get_int(cat, temp, 0); sprintf(temp, "fdd_%02i_turbo", c + 1); fdd_set_turbo(c, !!ini_section_get_int(cat, temp, 0)); sprintf(temp, "fdd_%02i_check_bpb", c + 1); @@ -1265,10 +1359,6 @@ load_floppy_and_cdrom_drives(void) sprintf(temp, "fdd_%02i_fn", c + 1); ini_section_delete_var(cat, temp); } - if (ui_writeprot[c] == 0) { - sprintf(temp, "fdd_%02i_writeprot", c + 1); - ini_section_delete_var(cat, temp); - } if (fdd_get_turbo(c) == 0) { sprintf(temp, "fdd_%02i_turbo", c + 1); ini_section_delete_var(cat, temp); @@ -1282,16 +1372,9 @@ load_floppy_and_cdrom_drives(void) sprintf(temp, "fdd_%02i_image_history_%02i", c + 1, i + 1); p = ini_section_get_string(cat, temp, NULL); if (p) { - if (path_abs(p)) { - if (strlen(p) > (MAX_IMAGE_PATH_LEN - 1)) - fatal("Configuration: Length of fdd_%02i_image_history_%02i is more " - "than %i\n", c + 1, i + 1, MAX_IMAGE_PATH_LEN - 1); - else - snprintf(fdd_image_history[c][i], MAX_IMAGE_PATH_LEN, "%s", p); - } else - snprintf(fdd_image_history[c][i], MAX_IMAGE_PATH_LEN, "%s%s%s", usr_path, - path_get_slash(usr_path), p); - path_normalize(fdd_image_history[c][i]); + if (load_image_file(fdd_image_history[c][i], p, NULL)) + fatal("Configuration: Length of fdd_%02i_image_history_%02i is more " + "than %i\n", c + 1, i + 1, MAX_IMAGE_PATH_LEN - 1); } } } @@ -1318,7 +1401,7 @@ load_floppy_and_cdrom_drives(void) cdrom[c].speed = ini_section_get_int(cat, temp, 8); sprintf(temp, "cdrom_%02i_type", c + 1); - p = ini_section_get_string(cat, temp, "86cd"); + p = ini_section_get_string(cat, temp, cdrom[c].bus_type == CDROM_BUS_MKE ? "cr563" : "86cd"); /* TODO: Configuration migration, remove when no longer needed. */ int cdrom_type = cdrom_get_from_internal_name(p); if (cdrom_type == -1) { @@ -1335,11 +1418,23 @@ load_floppy_and_cdrom_drives(void) ini_section_delete_var(cat, temp); /* Default values, needed for proper operation of the Settings dialog. */ - cdrom[c].ide_channel = cdrom[c].scsi_device_id = c + 2; + cdrom[c].mke_channel = cdrom[c].ide_channel = cdrom[c].scsi_device_id = c & 3; - if (cdrom[c].bus_type == CDROM_BUS_ATAPI) { + if (cdrom[c].bus_type == CDROM_BUS_MKE) { + char *type = cdrom_get_internal_name(cdrom_get_type(c)); + + if (strstr(type, "cr56") == NULL) + cdrom_set_type(c, cdrom_get_from_internal_name("cr563_075")); + + sprintf(temp, "cdrom_%02i_mke_channel", c + 1); + cdrom[c].mke_channel = ini_section_get_int(cat, temp, c & 3); + + if (cdrom[c].mke_channel > 3) + cdrom[c].mke_channel = 3; + + } else if (cdrom[c].bus_type == CDROM_BUS_ATAPI) { sprintf(temp, "cdrom_%02i_ide_channel", c + 1); - sprintf(tmp2, "%01u:%01u", (c + 2) >> 1, (c + 2) & 1); + sprintf(tmp2, "%01u:%01u", (c & 3) >> 1, (c & 3) & 1); p = ini_section_get_string(cat, temp, tmp2); sscanf(p, "%01u:%01u", &board, &dev); board &= 3; @@ -1350,13 +1445,13 @@ load_floppy_and_cdrom_drives(void) cdrom[c].ide_channel = 7; } else if (cdrom[c].bus_type == CDROM_BUS_SCSI) { sprintf(temp, "cdrom_%02i_scsi_location", c + 1); - sprintf(tmp2, "%01u:%02u", SCSI_BUS_MAX, c + 2); + sprintf(tmp2, "%01u:%02u", SCSI_BUS_MAX, c & 3); p = ini_section_get_string(cat, temp, tmp2); sscanf(p, "%01u:%02u", &board, &dev); if (board >= SCSI_BUS_MAX) { /* Invalid bus - check legacy ID */ sprintf(temp, "cdrom_%02i_scsi_id", c + 1); - cdrom[c].scsi_device_id = ini_section_get_int(cat, temp, c + 2); + cdrom[c].scsi_device_id = ini_section_get_int(cat, temp, c & 3); if (cdrom[c].scsi_device_id > 15) cdrom[c].scsi_device_id = 15; @@ -1367,6 +1462,11 @@ load_floppy_and_cdrom_drives(void) } } + if (cdrom[c].bus_type != CDROM_BUS_MKE) { + sprintf(temp, "cdrom_%02i_mke_channel", c + 1); + ini_section_delete_var(cat, temp); + } + if (cdrom[c].bus_type != CDROM_BUS_ATAPI) { sprintf(temp, "cdrom_%02i_ide_channel", c + 1); ini_section_delete_var(cat, temp); @@ -1458,32 +1558,35 @@ load_other_removable_devices(void) unsigned int board = 0; unsigned int dev = 0; int c; + int legacy_zip_drives = 0; memset(temp, 0x00, sizeof(temp)); - for (c = 0; c < ZIP_NUM; c++) { + for (c = 0; c < RDISK_NUM; c++) { sprintf(temp, "zip_%02i_parameters", c + 1); p = ini_section_get_string(cat, temp, NULL); - if (p != NULL) - sscanf(p, "%01u, %s", &zip_drives[c].is_250, s); - else - sscanf("0, none", "%01u, %s", &zip_drives[c].is_250, s); - zip_drives[c].bus_type = hdd_string_to_bus(s, 1); + if (p != NULL) { + sscanf(p, "%01u, %s", &rdisk_drives[c].type, s); + legacy_zip_drives++; + } else + sscanf("0, none", "%01u, %s", &rdisk_drives[c].type, s); + rdisk_drives[c].type++; + rdisk_drives[c].bus_type = hdd_string_to_bus(s, 1); /* Default values, needed for proper operation of the Settings dialog. */ - zip_drives[c].ide_channel = zip_drives[c].scsi_device_id = c + 2; + rdisk_drives[c].ide_channel = rdisk_drives[c].scsi_device_id = c + 2; - if (zip_drives[c].bus_type == ZIP_BUS_ATAPI) { + if (rdisk_drives[c].bus_type == RDISK_BUS_ATAPI) { sprintf(temp, "zip_%02i_ide_channel", c + 1); sprintf(tmp2, "%01u:%01u", (c + 2) >> 1, (c + 2) & 1); p = ini_section_get_string(cat, temp, tmp2); sscanf(p, "%01u:%01u", &board, &dev); board &= 3; dev &= 1; - zip_drives[c].ide_channel = (board << 1) + dev; + rdisk_drives[c].ide_channel = (board << 1) + dev; - if (zip_drives[c].ide_channel > 7) - zip_drives[c].ide_channel = 7; - } else if (zip_drives[c].bus_type == ZIP_BUS_SCSI) { + if (rdisk_drives[c].ide_channel > 7) + rdisk_drives[c].ide_channel = 7; + } else if (rdisk_drives[c].bus_type == RDISK_BUS_SCSI) { sprintf(temp, "zip_%02i_scsi_location", c + 1); sprintf(tmp2, "%01u:%02u", SCSI_BUS_MAX, c + 2); p = ini_section_get_string(cat, temp, tmp2); @@ -1491,23 +1594,23 @@ load_other_removable_devices(void) if (board >= SCSI_BUS_MAX) { /* Invalid bus - check legacy ID */ sprintf(temp, "zip_%02i_scsi_id", c + 1); - zip_drives[c].scsi_device_id = ini_section_get_int(cat, temp, c + 2); + rdisk_drives[c].scsi_device_id = ini_section_get_int(cat, temp, c + 2); - if (zip_drives[c].scsi_device_id > 15) - zip_drives[c].scsi_device_id = 15; + if (rdisk_drives[c].scsi_device_id > 15) + rdisk_drives[c].scsi_device_id = 15; } else { board %= SCSI_BUS_MAX; dev &= 15; - zip_drives[c].scsi_device_id = (board << 4) + dev; + rdisk_drives[c].scsi_device_id = (board << 4) + dev; } } - if (zip_drives[c].bus_type != ZIP_BUS_ATAPI) { + if (rdisk_drives[c].bus_type != RDISK_BUS_ATAPI) { sprintf(temp, "zip_%02i_ide_channel", c + 1); ini_section_delete_var(cat, temp); } - if (zip_drives[c].bus_type != ZIP_BUS_SCSI) { + if (rdisk_drives[c].bus_type != RDISK_BUS_SCSI) { sprintf(temp, "zip_%02i_scsi_location", c + 1); ini_section_delete_var(cat, temp); } @@ -1517,60 +1620,156 @@ load_other_removable_devices(void) sprintf(temp, "zip_%02i_image_path", c + 1); p = ini_section_get_string(cat, temp, ""); + + sprintf(temp, "zip_%02i_writeprot", c + 1); + rdisk_drives[c].read_only = ini_section_get_int(cat, temp, 0); + ini_section_delete_var(cat, temp); if (!strcmp(p, usr_path)) p[0] = 0x00; if (p[0] != 0x00) { - if (path_abs(p)) { - if (strlen(p) > 511) - fatal("Configuration: Length of zip_%02i_image_path is more than 511\n", c + 1); - else - strncpy(zip_drives[c].image_path, p, 511); - } else - path_append_filename(zip_drives[c].image_path, usr_path, p); - path_normalize(zip_drives[c].image_path); + if (load_image_file(rdisk_drives[c].image_path, p, &(rdisk_drives[c].read_only))) + fatal("Configuration: Length of zip_%02i_image_path is more than 511\n", c + 1); } for (int i = 0; i < MAX_PREV_IMAGES; i++) { - zip_drives[c].image_history[i] = (char *) calloc((MAX_IMAGE_PATH_LEN + 1) << 1, sizeof(char)); + rdisk_drives[c].image_history[i] = (char *) calloc((MAX_IMAGE_PATH_LEN + 1) << 1, sizeof(char)); sprintf(temp, "zip_%02i_image_history_%02i", c + 1, i + 1); p = ini_section_get_string(cat, temp, NULL); if (p) { - if (path_abs(p)) { - if (strlen(p) > (MAX_IMAGE_PATH_LEN - 1)) - fatal("Configuration: Length of zip_%02i_image_history_%02i is more than %i\n", - c + 1, i + 1, MAX_IMAGE_PATH_LEN - 1); - else - snprintf(zip_drives[c].image_history[i], MAX_IMAGE_PATH_LEN, "%s", p); - } else - snprintf(zip_drives[c].image_history[i], MAX_IMAGE_PATH_LEN, "%s%s%s", usr_path, - path_get_slash(usr_path), p); - path_normalize(zip_drives[c].image_history[i]); + if (load_image_file(rdisk_drives[c].image_history[i], p, NULL)) + fatal("Configuration: Length of zip_%02i_image_history_%02i is more than %i\n", + c + 1, i + 1, MAX_IMAGE_PATH_LEN - 1); } } - /* If the ZIP drive is disabled, delete all its variables. */ - if (zip_drives[c].bus_type == ZIP_BUS_DISABLED) { - sprintf(temp, "zip_%02i_parameters", c + 1); + sprintf(temp, "zip_%02i_parameters", c + 1); + ini_section_delete_var(cat, temp); + + sprintf(temp, "zip_%02i_ide_channel", c + 1); + ini_section_delete_var(cat, temp); + + sprintf(temp, "zip_%02i_scsi_location", c + 1); + ini_section_delete_var(cat, temp); + + sprintf(temp, "zip_%02i_image_path", c + 1); + ini_section_delete_var(cat, temp); + + for (int i = 0; i < MAX_PREV_IMAGES; i++) { + sprintf(temp, "zip_%02i_image_history_%02i", c + 1, i + 1); + ini_section_delete_var(cat, temp); + } + } + + if (legacy_zip_drives > 0) + goto go_to_mo; + + memset(temp, 0x00, sizeof(temp)); + for (c = 0; c < RDISK_NUM; c++) { + sprintf(temp, "rdisk_%02i_parameters", c + 1); + p = ini_section_get_string(cat, temp, NULL); + if (p != NULL) { + sscanf(p, "%01u, %s", &rdisk_drives[c].type, s); + legacy_zip_drives++; + } else + sscanf("0, none", "%01u, %s", &rdisk_drives[c].type, s); + rdisk_drives[c].bus_type = hdd_string_to_bus(s, 1); + + /* Default values, needed for proper operation of the Settings dialog. */ + rdisk_drives[c].ide_channel = rdisk_drives[c].scsi_device_id = c + 2; + + if (rdisk_drives[c].bus_type == RDISK_BUS_ATAPI) { + sprintf(temp, "rdisk_%02i_ide_channel", c + 1); + sprintf(tmp2, "%01u:%01u", (c + 2) >> 1, (c + 2) & 1); + p = ini_section_get_string(cat, temp, tmp2); + sscanf(p, "%01u:%01u", &board, &dev); + board &= 3; + dev &= 1; + rdisk_drives[c].ide_channel = (board << 1) + dev; + + if (rdisk_drives[c].ide_channel > 7) + rdisk_drives[c].ide_channel = 7; + } else if (rdisk_drives[c].bus_type == RDISK_BUS_SCSI) { + sprintf(temp, "rdisk_%02i_scsi_location", c + 1); + sprintf(tmp2, "%01u:%02u", SCSI_BUS_MAX, c + 2); + p = ini_section_get_string(cat, temp, tmp2); + sscanf(p, "%01u:%02u", &board, &dev); + if (board >= SCSI_BUS_MAX) { + /* Invalid bus - check legacy ID */ + sprintf(temp, "rdisk_%02i_scsi_id", c + 1); + rdisk_drives[c].scsi_device_id = ini_section_get_int(cat, temp, c + 2); + + if (rdisk_drives[c].scsi_device_id > 15) + rdisk_drives[c].scsi_device_id = 15; + } else { + board %= SCSI_BUS_MAX; + dev &= 15; + rdisk_drives[c].scsi_device_id = (board << 4) + dev; + } + } + + if (rdisk_drives[c].bus_type != RDISK_BUS_ATAPI) { + sprintf(temp, "rdisk_%02i_ide_channel", c + 1); + ini_section_delete_var(cat, temp); + } + + if (rdisk_drives[c].bus_type != RDISK_BUS_SCSI) { + sprintf(temp, "rdisk_%02i_scsi_location", c + 1); + ini_section_delete_var(cat, temp); + } + + sprintf(temp, "rdisk_%02i_scsi_id", c + 1); + ini_section_delete_var(cat, temp); + + sprintf(temp, "rdisk_%02i_image_path", c + 1); + p = ini_section_get_string(cat, temp, ""); + + sprintf(temp, "rdisk_%02i_writeprot", c + 1); + rdisk_drives[c].read_only = ini_section_get_int(cat, temp, 0); + ini_section_delete_var(cat, temp); + + if (!strcmp(p, usr_path)) + p[0] = 0x00; + + if (p[0] != 0x00) { + if (load_image_file(rdisk_drives[c].image_path, p, &(rdisk_drives[c].read_only))) + fatal("Configuration: Length of rdisk_%02i_image_path is more than 511\n", c + 1); + } + + for (int i = 0; i < MAX_PREV_IMAGES; i++) { + rdisk_drives[c].image_history[i] = (char *) calloc((MAX_IMAGE_PATH_LEN + 1) << 1, sizeof(char)); + sprintf(temp, "rdisk_%02i_image_history_%02i", c + 1, i + 1); + p = ini_section_get_string(cat, temp, NULL); + if (p) { + if (load_image_file(rdisk_drives[c].image_history[i], p, NULL)) + fatal("Configuration: Length of rdisk_%02i_image_history_%02i is more than %i\n", + c + 1, i + 1, MAX_IMAGE_PATH_LEN - 1); + } + } + + /* If the removable disk drive is disabled, delete all its variables. */ + if (rdisk_drives[c].bus_type == RDISK_BUS_DISABLED) { + sprintf(temp, "rdisk_%02i_parameters", c + 1); ini_section_delete_var(cat, temp); - sprintf(temp, "zip_%02i_ide_channel", c + 1); + sprintf(temp, "rdisk_%02i_ide_channel", c + 1); ini_section_delete_var(cat, temp); - sprintf(temp, "zip_%02i_scsi_location", c + 1); + sprintf(temp, "rdisk_%02i_scsi_location", c + 1); ini_section_delete_var(cat, temp); - sprintf(temp, "zip_%02i_image_path", c + 1); + sprintf(temp, "rdisk_%02i_image_path", c + 1); ini_section_delete_var(cat, temp); for (int i = 0; i < MAX_PREV_IMAGES; i++) { - sprintf(temp, "zip_%02i_image_history_%02i", c + 1, i + 1); + sprintf(temp, "rdisk_%02i_image_history_%02i", c + 1, i + 1); ini_section_delete_var(cat, temp); } } } +go_to_mo: memset(temp, 0x00, sizeof(temp)); for (c = 0; c < MO_NUM; c++) { sprintf(temp, "mo_%02i_parameters", c + 1); @@ -1630,18 +1829,16 @@ load_other_removable_devices(void) sprintf(temp, "mo_%02i_image_path", c + 1); p = ini_section_get_string(cat, temp, ""); + sprintf(temp, "mo_%02i_writeprot", c + 1); + mo_drives[c].read_only = ini_section_get_int(cat, temp, 0); + ini_section_delete_var(cat, temp); + if (!strcmp(p, usr_path)) p[0] = 0x00; if (p[0] != 0x00) { - if (path_abs(p)) { - if (strlen(p) > 511) - fatal("Configuration: Length of mo_%02i_image_path is more than 511\n", c + 1); - else - strncpy(mo_drives[c].image_path, p, 511); - } else - path_append_filename(mo_drives[c].image_path, usr_path, p); - path_normalize(mo_drives[c].image_path); + if (load_image_file(mo_drives[c].image_path, p, &(mo_drives[c].read_only))) + fatal("Configuration: Length of mo_%02i_image_path is more than 511\n", c + 1); } for (int i = 0; i < MAX_PREV_IMAGES; i++) { @@ -1649,16 +1846,9 @@ load_other_removable_devices(void) sprintf(temp, "mo_%02i_image_history_%02i", c + 1, i + 1); p = ini_section_get_string(cat, temp, NULL); if (p) { - if (path_abs(p)) { - if (strlen(p) > (MAX_IMAGE_PATH_LEN - 1)) - fatal("Configuration: Length of mo_%02i_image_history_%02i is more than %i\n", - c + 1, i + 1, MAX_IMAGE_PATH_LEN - 1); - else - snprintf(mo_drives[c].image_history[i], MAX_IMAGE_PATH_LEN, "%s", p); - } else - snprintf(mo_drives[c].image_history[i], MAX_IMAGE_PATH_LEN, "%s%s%s", usr_path, - path_get_slash(usr_path), p); - path_normalize(mo_drives[c].image_history[i]); + if (load_image_file(mo_drives[c].image_history[i], p, NULL)) + fatal("Configuration: Length of mo_%02i_image_history_%02i is more than %i\n", + c + 1, i + 1, MAX_IMAGE_PATH_LEN - 1); } } @@ -1824,6 +2014,22 @@ load_keybinds(void) } } +void +config_load_global(void) +{ + config_log("Loading global config file '%s'...\n", global_cfg_path); + + global = ini_read(global_cfg_path); + + if (global == NULL) { + global = ini_new(); + + config_log("Global config file not present or invalid!\n"); + } + + load_global(); +} + /* Load the specified or a default configuration file. */ void config_load(void) @@ -1831,31 +2037,31 @@ config_load(void) int i; ini_section_t c; - config_log("Loading config file '%s'..\n", cfg_path); + config_log("Loading VM config file '%s'...\n", cfg_path); memset(hdd, 0, sizeof(hard_disk_t)); memset(cdrom, 0, sizeof(cdrom_t) * CDROM_NUM); #ifdef USE_IOCTL memset(cdrom_ioctl, 0, sizeof(cdrom_ioctl_t) * CDROM_NUM); #endif - memset(zip_drives, 0, sizeof(zip_drive_t)); + memset(rdisk_drives, 0, sizeof(rdisk_drive_t)); config = ini_read(cfg_path); if (config == NULL) { - config = ini_new(); - config_changed = 1; + config = ini_new(); cpu_f = (cpu_family_t *) &cpu_families[0]; cpu = 0; - kbd_req_capture = 0; - hide_status_bar = 0; - hide_tool_bar = 0; - scale = 1; - machine = machine_get_machine_from_internal_name("ibmpc"); - dpi_scale = 1; - do_auto_pause = 0; + kbd_req_capture = 0; + hide_status_bar = 0; + hide_tool_bar = 0; + scale = 1; + machine = machine_get_machine_from_internal_name("ibmpc"); + dpi_scale = 1; + do_auto_pause = 0; + force_constant_mouse = 0; cpu_override_interpreter = 0; @@ -1865,7 +2071,13 @@ config_load(void) vid_resize = 0; video_fullscreen_scale = 1; time_sync = TIME_SYNC_ENABLED; - hdc_current[0] = hdc_get_from_internal_name("none"); + + keyboard_type = KEYBOARD_TYPE_PC_XT; + + for (int i = 0; i < HDC_MAX; i++) + hdc_current[i] = hdc_get_from_internal_name("none"); + + jumpered_internal_ecp_dma = -1; com_ports[0].enabled = 1; com_ports[1].enabled = 1; @@ -1905,9 +2117,7 @@ config_load(void) cassette_pcm = 0; cassette_ui_writeprot = 0; - lang_id = plat_language_code(DEFAULT_LANGUAGE); - - config_log("Config file not present or invalid!\n"); + config_log("VM config file not present or invalid!\n"); } else { load_general(); /* General */ for (i = 0; i < MONITORS_NUM; i++) @@ -1945,22 +2155,76 @@ config_load(void) if (c != NULL) ini_rename_section(c, "3Dfx Voodoo Banshee"); - /* Mark the configuration as changed. */ - config_changed = 1; - - config_log("Config loaded.\n\n"); + config_log("VM config loaded.\n\n"); } + /* Mark the configuration as changed. */ + config_changed = 1; + video_copy = (video_grayscale || invert_display) ? video_transform_copy : memcpy; } +/* Save global configuration */ +static void +save_global(void) +{ + ini_section_t cat = ini_find_or_create_section(global, ""); + char buffer[512] = { 0 }; + + if (lang_id == plat_language_code(DEFAULT_LANGUAGE)) + ini_section_delete_var(cat, "language"); + else { + plat_language_code_r(lang_id, buffer, 511); + ini_section_set_string(cat, "language", buffer); + } + + if (open_dir_usr_path) + ini_section_set_int(cat, "open_dir_usr_path", open_dir_usr_path); + else + ini_section_delete_var(cat, "open_dir_usr_path"); + + if (confirm_reset != 1) + ini_section_set_int(cat, "confirm_reset", confirm_reset); + else + ini_section_delete_var(cat, "confirm_reset"); + + if (confirm_exit != 1) + ini_section_set_int(cat, "confirm_exit", confirm_exit); + else + ini_section_delete_var(cat, "confirm_exit"); + + if (confirm_save != 1) + ini_section_set_int(cat, "confirm_save", confirm_save); + else + ini_section_delete_var(cat, "confirm_save"); + + if (inhibit_multimedia_keys == 1) + ini_section_set_int(cat, "inhibit_multimedia_keys", inhibit_multimedia_keys); + else + ini_section_delete_var(cat, "inhibit_multimedia_keys"); + + if (mouse_sensitivity != 1.0) + ini_section_set_double(cat, "mouse_sensitivity", mouse_sensitivity); + else + ini_section_delete_var(cat, "mouse_sensitivity"); + + if (vmm_disabled != 0) + ini_section_set_int(cat, "vmm_disabled", vmm_disabled); + else + ini_section_delete_var(cat, "vmm_disabled"); + + if (vmm_path_cfg[0] != 0) + ini_section_set_string(cat, "vmm_path", vmm_path_cfg); + else + ini_section_delete_var(cat, "vmm_path"); +} + /* Save "General" section. */ static void save_general(void) { ini_section_t cat = ini_find_or_create_section(config, "General"); char temp[512]; - char buffer[512] = { 0 }; const char *va_name; @@ -1968,10 +2232,6 @@ save_general(void) if (force_10ms == 0) ini_section_delete_var(cat, "force_10ms"); - ini_section_set_int(cat, "inhibit_multimedia_keys", inhibit_multimedia_keys); - if (inhibit_multimedia_keys == 0) - ini_section_delete_var(cat, "inhibit_multimedia_keys"); - ini_section_set_int(cat, "sound_muted", sound_muted); if (sound_muted == 0) ini_section_delete_var(cat, "sound_muted"); @@ -2072,43 +2332,11 @@ save_general(void) else ini_section_delete_var(cat, "hide_tool_bar"); - if (confirm_reset != 1) - ini_section_set_int(cat, "confirm_reset", confirm_reset); - else - ini_section_delete_var(cat, "confirm_reset"); - - if (confirm_exit != 1) - ini_section_set_int(cat, "confirm_exit", confirm_exit); - else - ini_section_delete_var(cat, "confirm_exit"); - - if (confirm_save != 1) - ini_section_set_int(cat, "confirm_save", confirm_save); - else - ini_section_delete_var(cat, "confirm_save"); - - if (mouse_sensitivity != 1.0) - ini_section_set_double(cat, "mouse_sensitivity", mouse_sensitivity); - else - ini_section_delete_var(cat, "mouse_sensitivity"); - - if (lang_id == plat_language_code(DEFAULT_LANGUAGE)) - ini_section_delete_var(cat, "language"); - else { - plat_language_code_r(lang_id, buffer, 511); - ini_section_set_string(cat, "language", buffer); - } - if (enable_discord) ini_section_set_int(cat, "enable_discord", enable_discord); else ini_section_delete_var(cat, "enable_discord"); - if (open_dir_usr_path) - ini_section_set_int(cat, "open_dir_usr_path", open_dir_usr_path); - else - ini_section_delete_var(cat, "open_dir_usr_path"); - if (video_framerate != -1) ini_section_set_int(cat, "video_gl_framerate", video_framerate); else @@ -2123,6 +2351,11 @@ save_general(void) else ini_section_delete_var(cat, "do_auto_pause"); + if (force_constant_mouse) + ini_section_set_int(cat, "force_constant_mouse", force_constant_mouse); + else + ini_section_delete_var(cat, "force_constant_mouse"); + char cpu_buf[128] = { 0 }; plat_get_cpu_string(cpu_buf, 128); ini_section_set_string(cat, "host_cpu", cpu_buf); @@ -2241,6 +2474,32 @@ save_video(void) ini_section_set_string(cat, "gfxcard", video_get_internal_name(gfxcard[0])); + + if (vid_cga_comp_brightness) + ini_section_set_int(cat, "vid_cga_comp_brightness", vid_cga_comp_brightness); + else + ini_section_delete_var(cat, "vid_cga_comp_brightness"); + + if (vid_cga_comp_sharpness) + ini_section_set_int(cat, "vid_cga_comp_sharpness", vid_cga_comp_sharpness); + else + ini_section_delete_var(cat, "vid_cga_comp_sharpness"); + + if (vid_cga_comp_contrast != 100) + ini_section_set_int(cat, "vid_cga_comp_contrast", vid_cga_comp_contrast); + else + ini_section_delete_var(cat, "vid_cga_comp_contrast"); + + if (vid_cga_comp_hue) + ini_section_set_int(cat, "vid_cga_comp_hue", vid_cga_comp_hue); + else + ini_section_delete_var(cat, "vid_cga_comp_hue"); + + if (vid_cga_comp_saturation != 100) + ini_section_set_int(cat, "vid_cga_comp_saturation", vid_cga_comp_saturation); + else + ini_section_delete_var(cat, "vid_cga_comp_saturation"); + if (voodoo_enabled == 0) ini_section_delete_var(cat, "voodoo"); else @@ -2290,9 +2549,12 @@ save_input_devices(void) char temp[512]; char tmp2[512]; + ini_section_set_string(cat, "keyboard_type", keyboard_get_internal_name(keyboard_type)); + ini_section_set_string(cat, "mouse_type", mouse_get_internal_name(mouse_type)); - if (!joystick_type) { + uint8_t joy_insn = 0; + if (!joystick_type[joy_insn]) { ini_section_delete_var(cat, "joystick_type"); for (int js = 0; js < MAX_PLAT_JOYSTICKS; js++) { @@ -2313,22 +2575,22 @@ save_input_devices(void) } } } else { - ini_section_set_string(cat, "joystick_type", joystick_get_internal_name(joystick_type)); + ini_section_set_string(cat, "joystick_type", joystick_get_internal_name(joystick_type[joy_insn])); - for (int js = 0; js < joystick_get_max_joysticks(joystick_type); js++) { + for (int js = 0; js < joystick_get_max_joysticks(joystick_type[joy_insn]); js++) { sprintf(tmp2, "joystick_%i_nr", js); ini_section_set_int(cat, tmp2, joystick_state[0][js].plat_joystick_nr); if (joystick_state[0][js].plat_joystick_nr) { - for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type); axis_nr++) { + for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type[joy_insn]); axis_nr++) { sprintf(tmp2, "joystick_%i_axis_%i", js, axis_nr); ini_section_set_int(cat, tmp2, joystick_state[0][js].axis_mapping[axis_nr]); } - for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type); button_nr++) { + for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type[joy_insn]); button_nr++) { sprintf(tmp2, "joystick_%i_button_%i", js, button_nr); ini_section_set_int(cat, tmp2, joystick_state[0][js].button_mapping[button_nr]); } - for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type); pov_nr++) { + for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type[joy_insn]); pov_nr++) { sprintf(tmp2, "joystick_%i_pov_%i", js, pov_nr); sprintf(temp, "%i, %i", joystick_state[0][js].pov_mapping[pov_nr][0], joystick_state[0][js].pov_mapping[pov_nr][1]); @@ -2460,6 +2722,12 @@ save_network(void) case NET_TYPE_TAP: ini_section_set_string(cat, temp, "tap"); break; + case NET_TYPE_NMSWITCH: + ini_section_set_string(cat, temp, "nmswitch"); + break; + case NET_TYPE_NRSWITCH: + ini_section_set_string(cat, temp, "nrswitch"); + break; default: break; } @@ -2480,6 +2748,28 @@ save_network(void) ini_section_delete_var(cat, temp); else ini_section_set_int(cat, temp, nc->link_state); + + sprintf(temp, "net_%02i_switch_group", c + 1); + if (nc->device_num == 0) + ini_section_delete_var(cat, temp); + else + ini_section_set_int(cat, temp, net_cards_conf[c].switch_group); + + sprintf(temp, "net_%02i_promisc", c + 1); + if (nc->device_num == 0) + ini_section_delete_var(cat, temp); + else + ini_section_set_int(cat, temp, net_cards_conf[c].promisc_mode); + + sprintf(temp, "net_%02i_nrs_host", c + 1); + if (nc->device_num == 0) + ini_section_delete_var(cat, temp); + else { + if (nc->nrs_hostname[0] != '\0') + ini_section_set_string(cat, temp, net_cards_conf[c].nrs_hostname); + else + ini_section_delete_var(cat, temp); + } } ini_delete_section_if_empty(config, cat); @@ -2492,6 +2782,14 @@ save_ports(void) ini_section_t cat = ini_find_or_create_section(config, "Ports (COM & LPT)"); char temp[512]; + int has_jumpers = machine_has_jumpered_ecp_dma(machine, DMA_ANY); + int def_jumper = machine_get_default_jumpered_ecp_dma(machine); + + if (!has_jumpers || (jumpered_internal_ecp_dma == def_jumper)) + ini_section_delete_var(cat, "jumpered_internal_ecp_dma"); + else + ini_section_set_int(cat, "jumpered_internal_ecp_dma", jumpered_internal_ecp_dma); + for (int c = 0; c < (SERIAL_MAX - 1); c++) { sprintf(temp, "serial%d_enabled", c + 1); if (((c < 2) && com_ports[c].enabled) || ((c >= 2) && !com_ports[c].enabled)) @@ -2518,8 +2816,7 @@ save_ports(void) if (lpt_ports[c].device == 0) ini_section_delete_var(cat, temp); else - ini_section_set_string(cat, temp, - lpt_device_get_internal_name(lpt_ports[c].device)); + ini_section_set_string(cat, temp, lpt_device_get_internal_name(lpt_ports[c].device)); } #if 0 @@ -2573,6 +2870,27 @@ save_keybinds(void) ini_delete_section_if_empty(config, cat); } +static void +save_image_file(char *cat, char *var, char *src) +{ + char temp[2048] = { 0 }; + char *prefix = ""; + + path_normalize(src); + + if (strstr(src, "wp://") == src) { + src += 5; + prefix = "wp://"; + } + + if (!strnicmp(src, usr_path, strlen(usr_path))) + sprintf(temp, "%s%s", prefix, &src[strlen(usr_path)]); + else + sprintf(temp, "%s%s", prefix, src); + + ini_section_set_string(cat, var, temp); +} + /* Save "Storage Controllers" section. */ static void save_storage_controllers(void) @@ -2600,16 +2918,39 @@ save_storage_controllers(void) ini_section_set_string(cat, "fdc", fdc_card_get_internal_name(fdc_current[0])); - if (machine_has_flags(machine, MACHINE_HDC)) - def_hdc = "internal"; - else - def_hdc = "none"; + ini_section_delete_var(cat, "hdc"); - if (!strcmp(hdc_get_internal_name(hdc_current[0]), def_hdc)) - ini_section_delete_var(cat, "hdc"); - else - ini_section_set_string(cat, "hdc", - hdc_get_internal_name(hdc_current[0])); + for (c = 0; c < HDC_MAX; c++) { + sprintf(temp, "hdc_%d", c + 1); + + if ((c == 0) && machine_has_flags(machine, MACHINE_HDC)) + def_hdc = "internal"; + else + def_hdc = "none"; + + if (!strcmp(hdc_get_internal_name(hdc_current[c]), def_hdc)) + ini_section_delete_var(cat, temp); + else + ini_section_set_string(cat, temp, + hdc_get_internal_name(hdc_current[c])); + } + + /* Downgrade compatibility for standalone tertiary/quaternary IDE from v4.2 and older. */ + const char *legacy_cards[] = { "ide_ter", "ide_qua" }; + for (int i = 0; i < (sizeof(legacy_cards) / sizeof(legacy_cards[0])); i++) { + int card_id = hdc_get_from_internal_name(legacy_cards[i]); + for (int j = 0; j < (sizeof(sound_card_current) / sizeof(sound_card_current[0])); j++) { + if (hdc_current[j] == card_id) { + /* A special value of 2 still enables the cards on older versions, + but lets newer versions know that they've already been migrated. */ + ini_section_set_int(cat, legacy_cards[i], 2); + card_id = 0; /* mark as found */ + break; + } + } + if (card_id > 0) /* not found */ + ini_section_delete_var(cat, legacy_cards[i]); + } if (cdrom_interface_current == 0) ini_section_delete_var(cat, "cdrom_interface"); @@ -2617,16 +2958,6 @@ save_storage_controllers(void) ini_section_set_string(cat, "cdrom_interface", cdrom_interface_get_internal_name(cdrom_interface_current)); - if (ide_ter_enabled == 0) - ini_section_delete_var(cat, "ide_ter"); - else - ini_section_set_int(cat, "ide_ter", ide_ter_enabled); - - if (ide_qua_enabled == 0) - ini_section_delete_var(cat, "ide_qua"); - else - ini_section_set_int(cat, "ide_qua", ide_qua_enabled); - if (cassette_enable == 0) ini_section_delete_var(cat, "cassette_enabled"); else @@ -2634,13 +2965,8 @@ save_storage_controllers(void) if (strlen(cassette_fname) == 0) ini_section_delete_var(cat, "cassette_file"); - else { - path_normalize(cassette_fname); - if (!strnicmp(cassette_fname, usr_path, strlen(usr_path))) - ini_section_set_string(cat, "cassette_file", &cassette_fname[strlen(usr_path)]); - else - ini_section_set_string(cat, "cassette_file", cassette_fname); - } + else + save_image_file(cat, "cassette_file", cassette_fname); if (!strcmp(cassette_mode, "load")) ini_section_delete_var(cat, "cassette_mode"); @@ -2651,13 +2977,8 @@ save_storage_controllers(void) sprintf(temp, "cassette_image_history_%02i", i + 1); if ((cassette_image_history[i] == 0) || strlen(cassette_image_history[i]) == 0) ini_section_delete_var(cat, temp); - else { - path_normalize(cassette_image_history[i]); - if (!strnicmp(cassette_image_history[i], usr_path, strlen(usr_path))) - ini_section_set_string(cat, temp, &cassette_image_history[i][strlen(usr_path)]); - else - ini_section_set_string(cat, temp, cassette_image_history[i]); - } + else + save_image_file(cat, temp, cassette_image_history[i]); } if (cassette_pos == 0) @@ -2680,10 +3001,7 @@ save_storage_controllers(void) else ini_section_set_int(cat, "cassette_pcm", cassette_pcm); - if (cassette_ui_writeprot == 0) - ini_section_delete_var(cat, "cassette_writeprot"); - else - ini_section_set_int(cat, "cassette_writeprot", cassette_ui_writeprot); + ini_section_delete_var(cat, "cassette_writeprot"); for (c = 0; c < 2; c++) { sprintf(temp, "cartridge_%02i_fn", c + 1); @@ -2938,19 +3256,11 @@ save_floppy_and_cdrom_drives(void) sprintf(temp, "fdd_%02i_writeprot", c + 1); ini_section_delete_var(cat, temp); - } else { - path_normalize(floppyfns[c]); - if (!strnicmp(floppyfns[c], usr_path, strlen(usr_path))) - ini_section_set_string(cat, temp, &floppyfns[c][strlen(usr_path)]); - else - ini_section_set_string(cat, temp, floppyfns[c]); - } + } else + save_image_file(cat, temp, floppyfns[c]); sprintf(temp, "fdd_%02i_writeprot", c + 1); - if (ui_writeprot[c] == 0) - ini_section_delete_var(cat, temp); - else - ini_section_set_int(cat, temp, ui_writeprot[c]); + ini_section_delete_var(cat, temp); sprintf(temp, "fdd_%02i_turbo", c + 1); if (fdd_get_turbo(c) == 0) @@ -2968,13 +3278,8 @@ save_floppy_and_cdrom_drives(void) sprintf(temp, "fdd_%02i_image_history_%02i", c + 1, i + 1); if ((fdd_image_history[c][i] == 0) || strlen(fdd_image_history[c][i]) == 0) ini_section_delete_var(cat, temp); - else { - path_normalize(fdd_image_history[c][i]); - if (!strnicmp(fdd_image_history[c][i], usr_path, strlen(usr_path))) - ini_section_set_string(cat, temp, &fdd_image_history[c][i][strlen(usr_path)]); - else - ini_section_set_string(cat, temp, fdd_image_history[c][i]); - } + else + save_image_file(cat, temp, fdd_image_history[c][i]); } } @@ -2990,8 +3295,7 @@ save_floppy_and_cdrom_drives(void) sprintf(temp, "cdrom_%02i_type", c + 1); char *tn = cdrom_get_internal_name(cdrom_get_type(c)); - if ((cdrom[c].bus_type == 0) || (cdrom[c].bus_type == CDROM_BUS_MITSUMI) || - !strcmp(tn, "86cd")) + if ((cdrom[c].bus_type == 0) || (cdrom[c].bus_type == CDROM_BUS_MITSUMI) || !strcmp(tn, "86cd")) ini_section_delete_var(cat, temp); else ini_section_set_string(cat, temp, tn); @@ -3010,6 +3314,13 @@ save_floppy_and_cdrom_drives(void) ini_section_set_string(cat, temp, tmp2); } + sprintf(temp, "cdrom_%02i_mke_channel", c + 1); + if (cdrom[c].bus_type != CDROM_BUS_MKE) + ini_section_delete_var(cat, temp); + else { + ini_section_set_int(cat, temp, cdrom[c].mke_channel); + } + sprintf(temp, "cdrom_%02i_ide_channel", c + 1); if (cdrom[c].bus_type != CDROM_BUS_ATAPI) ini_section_delete_var(cat, temp); @@ -3068,59 +3379,52 @@ save_other_removable_devices(void) char tmp2[512]; int c; - for (c = 0; c < ZIP_NUM; c++) { - sprintf(temp, "zip_%02i_parameters", c + 1); - if (zip_drives[c].bus_type == 0) { + for (c = 0; c < RDISK_NUM; c++) { + sprintf(temp, "rdisk_%02i_parameters", c + 1); + if (rdisk_drives[c].bus_type == 0) { ini_section_delete_var(cat, temp); } else { - sprintf(tmp2, "%u, %s", zip_drives[c].is_250, - hdd_bus_to_string(zip_drives[c].bus_type, 1)); + sprintf(tmp2, "%u, %s", rdisk_drives[c].type, + hdd_bus_to_string(rdisk_drives[c].bus_type, 1)); ini_section_set_string(cat, temp, tmp2); } - sprintf(temp, "zip_%02i_ide_channel", c + 1); - if (zip_drives[c].bus_type != ZIP_BUS_ATAPI) + sprintf(temp, "rdisk_%02i_ide_channel", c + 1); + if (rdisk_drives[c].bus_type != RDISK_BUS_ATAPI) ini_section_delete_var(cat, temp); else { - sprintf(tmp2, "%01u:%01u", zip_drives[c].ide_channel >> 1, - zip_drives[c].ide_channel & 1); + sprintf(tmp2, "%01u:%01u", rdisk_drives[c].ide_channel >> 1, + rdisk_drives[c].ide_channel & 1); ini_section_set_string(cat, temp, tmp2); } - sprintf(temp, "zip_%02i_scsi_id", c + 1); + sprintf(temp, "rdisk_%02i_scsi_id", c + 1); ini_section_delete_var(cat, temp); - sprintf(temp, "zip_%02i_scsi_location", c + 1); - if (zip_drives[c].bus_type != ZIP_BUS_SCSI) + sprintf(temp, "rdisk_%02i_writeprot", c + 1); + ini_section_delete_var(cat, temp); + + sprintf(temp, "rdisk_%02i_scsi_location", c + 1); + if (rdisk_drives[c].bus_type != RDISK_BUS_SCSI) ini_section_delete_var(cat, temp); else { - sprintf(tmp2, "%01u:%02u", zip_drives[c].scsi_device_id >> 4, - zip_drives[c].scsi_device_id & 15); + sprintf(tmp2, "%01u:%02u", rdisk_drives[c].scsi_device_id >> 4, + rdisk_drives[c].scsi_device_id & 15); ini_section_set_string(cat, temp, tmp2); } - sprintf(temp, "zip_%02i_image_path", c + 1); - if ((zip_drives[c].bus_type == 0) || (strlen(zip_drives[c].image_path) == 0)) + sprintf(temp, "rdisk_%02i_image_path", c + 1); + if ((rdisk_drives[c].bus_type == 0) || (strlen(rdisk_drives[c].image_path) == 0)) ini_section_delete_var(cat, temp); - else { - path_normalize(zip_drives[c].image_path); - if (!strnicmp(zip_drives[c].image_path, usr_path, strlen(usr_path))) - ini_section_set_string(cat, temp, &zip_drives[c].image_path[strlen(usr_path)]); - else - ini_section_set_string(cat, temp, zip_drives[c].image_path); - } + else + save_image_file(cat, temp, rdisk_drives[c].image_path); for (int i = 0; i < MAX_PREV_IMAGES; i++) { - sprintf(temp, "zip_%02i_image_history_%02i", c + 1, i + 1); - if ((zip_drives[c].image_history[i] == 0) || strlen(zip_drives[c].image_history[i]) == 0) + sprintf(temp, "rdisk_%02i_image_history_%02i", c + 1, i + 1); + if ((rdisk_drives[c].image_history[i] == 0) || strlen(rdisk_drives[c].image_history[i]) == 0) ini_section_delete_var(cat, temp); - else { - path_normalize(zip_drives[c].image_history[i]); - if (!strnicmp(zip_drives[c].image_history[i], usr_path, strlen(usr_path))) - ini_section_set_string(cat, temp, &zip_drives[c].image_history[i][strlen(usr_path)]); - else - ini_section_set_string(cat, temp, zip_drives[c].image_history[i]); - } + else + save_image_file(cat, temp, rdisk_drives[c].image_history[i]); } } @@ -3146,6 +3450,9 @@ save_other_removable_devices(void) sprintf(temp, "mo_%02i_scsi_id", c + 1); ini_section_delete_var(cat, temp); + sprintf(temp, "mo_%02i_writeprot", c + 1); + ini_section_delete_var(cat, temp); + sprintf(temp, "mo_%02i_scsi_location", c + 1); if (mo_drives[c].bus_type != MO_BUS_SCSI) ini_section_delete_var(cat, temp); @@ -3158,31 +3465,29 @@ save_other_removable_devices(void) sprintf(temp, "mo_%02i_image_path", c + 1); if ((mo_drives[c].bus_type == 0) || (strlen(mo_drives[c].image_path) == 0)) ini_section_delete_var(cat, temp); - else { - path_normalize(mo_drives[c].image_path); - if (!strnicmp(mo_drives[c].image_path, usr_path, strlen(usr_path))) - ini_section_set_string(cat, temp, &mo_drives[c].image_path[strlen(usr_path)]); - else - ini_section_set_string(cat, temp, mo_drives[c].image_path); - } + else + save_image_file(cat, temp, mo_drives[c].image_path); for (int i = 0; i < MAX_PREV_IMAGES; i++) { sprintf(temp, "mo_%02i_image_history_%02i", c + 1, i + 1); if ((mo_drives[c].image_history[i] == 0) || strlen(mo_drives[c].image_history[i]) == 0) ini_section_delete_var(cat, temp); - else { - path_normalize(mo_drives[c].image_history[i]); - if (!strnicmp(mo_drives[c].image_history[i], usr_path, strlen(usr_path))) - ini_section_set_string(cat, temp, &mo_drives[c].image_history[i][strlen(usr_path)]); - else - ini_section_set_string(cat, temp, mo_drives[c].image_history[i]); - } + else + save_image_file(cat, temp, mo_drives[c].image_history[i]); } } ini_delete_section_if_empty(config, cat); } +void +config_save_global(void) +{ + save_global(); /* Global */ + + ini_write(global, global_cfg_path); +} + void config_save(void) { @@ -3206,6 +3511,8 @@ config_save(void) save_keybinds(); /* Key bindings */ ini_write(config, cfg_path); + + config_save_global(); } ini_t diff --git a/src/cpu/808x.c b/src/cpu/808x.c index edab16567..14e56f23a 100644 --- a/src/cpu/808x.c +++ b/src/cpu/808x.c @@ -539,10 +539,9 @@ pfq_write(void) static uint8_t pfq_read(void) { - uint8_t temp, i; + uint8_t temp = pfq[0]; - temp = pfq[0]; - for (i = 0; i < (pfq_size - 1); i++) + for (int i = 0; i < (pfq_size - 1); i++) pfq[i] = pfq[i + 1]; pfq_pos--; cpu_state.pc = (cpu_state.pc + 1) & 0xffff; diff --git a/src/cpu/x86.c b/src/cpu/x86.c index 1b0de661b..1090f22a1 100644 --- a/src/cpu/x86.c +++ b/src/cpu/x86.c @@ -283,7 +283,7 @@ reset_common(int hard) cr0 = 1 << 30; else cr0 = 0; - if (is386 && !is486 && (fpu_type == FPU_387)) + if (is386 && !is486 && ((fpu_type == FPU_387) || (fpu_type == FPU_NONE))) cr0 |= 0x10; cpu_cache_int_enabled = 0; cpu_update_waitstates(); diff --git a/src/device.c b/src/device.c index 910ff4ff9..07e193ead 100644 --- a/src/device.c +++ b/src/device.c @@ -349,12 +349,6 @@ device_reset_all(uint32_t match_flags) devices[c]->reset(device_priv[c]); } } - -#ifdef UNCOMMENT_LATER - /* TODO: Actually convert the LPT devices to device_t's. */ - if ((match_flags == DEVICE_ALL) || (match_flags == DEVICE_PCI)) - lpt_reset(); -#endif } void * @@ -469,7 +463,6 @@ device_get_bios_local(const device_t *dev, const char *internal_name) (bios->name != NULL) && (bios->internal_name != NULL) && (bios->files_no != 0)) { - printf("Internal name was: %s", internal_name); if (!strcmp(internal_name, bios->internal_name)) return bios->local; bios++; @@ -666,9 +659,9 @@ device_get_name(const device_t *dev, int bus, char *name) fbus = strstr(tname, sbus); if (fbus == tname) strcat(name, tname + strlen(sbus) + 1); - /* Special case to not strip the "oPCI" from "Ensoniq AudioPCI" or - the "-ISA" from "AMD PCnet-ISA". */ - else if ((fbus == NULL) || (*(fbus - 1) == 'o') || (*(fbus - 1) == '-') || (*(fbus - 2) == 'r')) + /* Special case to not strip the "oPCI" from "Ensoniq AudioPCI", + the "-ISA" from "AMD PCnet-ISA" or the " PCI" from "CMD PCI-064x". */ + else if ((fbus == NULL) || (*(fbus - 1) == 'o') || (*(fbus - 1) == '-') || (*(fbus - 2) == 'r') || ((fbus[0] == 'P') && (fbus[1] == 'C') && (fbus[2] == 'I') && (fbus[3] == '-'))) strcat(name, tname); else { strncat(name, tname, fbus - tname - 1); diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt index 999b83aeb..12835e909 100644 --- a/src/device/CMakeLists.txt +++ b/src/device/CMakeLists.txt @@ -38,6 +38,7 @@ add_library(dev OBJECT isapnp.c kbc_at.c kbc_at_dev.c + kbc_xt.c keyboard.c keyboard_at.c keyboard_xt.c @@ -47,11 +48,13 @@ add_library(dev OBJECT mouse_microtouch_touchscreen.c mouse_ps2.c mouse_serial.c + mouse_upc.c nec_mate_unk.c novell_cardkey.c pci_bridge.c phoenix_486_jumper.c postcard.c + radisys_config.c serial.c serial_passthrough.c smbus_ali7101.c @@ -59,6 +62,7 @@ add_library(dev OBJECT smbus_sis5595.c tulip_jumper.c unittester.c + zenith_scratchpad.c ) if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT MSVC) diff --git a/src/device/cassette.c b/src/device/cassette.c index 5cde2fbd0..0577ae06f 100644 --- a/src/device/cassette.c +++ b/src/device/cassette.c @@ -152,10 +152,11 @@ pc_cas_del(pc_cassette_t *cas) } int -pc_cas_set_fname(pc_cassette_t *cas, const char *fname) +pc_cas_set_fname(pc_cassette_t *cas, char *fname) { unsigned n; const char *ext; + int offs = 0; if (cas->close) fclose(cas->fp); @@ -176,6 +177,13 @@ pc_cas_set_fname(pc_cassette_t *cas, const char *fname) return 0; } + if (strstr(fname, "wp://") == fname) { + offs = 5; + cassette_ui_writeprot = 1; + } + + fname += offs; + cas->fp = plat_fopen(fname, "r+b"); if (cas->fp == NULL) @@ -197,10 +205,10 @@ pc_cas_set_fname(pc_cassette_t *cas, const char *fname) n = strlen(fname); - cas->fname = malloc((n + 1) * sizeof(char)); + cas->fname = malloc((n + offs + 1) * sizeof(char)); if (cas->fname != NULL) - memcpy(cas->fname, fname, (n + 1) * sizeof(char)); + memcpy(cas->fname, fname - offs, (n + offs + 1) * sizeof(char)); if (n > 4) { ext = fname + (n - 4); @@ -216,6 +224,8 @@ pc_cas_set_fname(pc_cassette_t *cas, const char *fname) pc_cas_set_pcm(cas, 0); } + ui_sb_update_icon_wp(SB_CASSETTE, cassette_ui_writeprot); + return 0; } diff --git a/src/device/hasp.c b/src/device/hasp.c index 53228c2a0..12dc6f2d1 100644 --- a/src/device/hasp.c +++ b/src/device/hasp.c @@ -28,8 +28,8 @@ #define HAVE_STDARG_H #include <86box/86box.h> #include <86box/timer.h> -#include <86box/lpt.h> #include <86box/device.h> +#include <86box/lpt.h> #define HASP_BYTEARRAY(...) \ { \ diff --git a/src/device/isamem.c b/src/device/isamem.c index b1095da1f..1e2e92470 100644 --- a/src/device/isamem.c +++ b/src/device/isamem.c @@ -107,6 +107,7 @@ #define ISAMEM_BRAT_CARD 14 #define ISAMEM_EV165A_CARD 15 #define ISAMEM_LOTECH_EMS_CARD 16 +#define ISAMEM_MPLUS2_CARD 17 #define ISAMEM_DEBUG 0 @@ -495,6 +496,7 @@ isamem_init(const device_t *info) case ISAMEM_SYSTEMCARD_CARD: /* Microsoft SystemCard */ case ISAMEM_P5PAK_CARD: /* Paradise Systems 5-PAK */ case ISAMEM_A6PAK_CARD: /* AST SixPakPlus */ + case ISAMEM_MPLUS2_CARD: /* AST MegaPlus II */ dev->total_size = device_get_config_int("size"); dev->start_addr = device_get_config_int("start"); tot = dev->total_size; @@ -1391,10 +1393,10 @@ static const device_config_t ems5150_config[] = { .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 = "208H", .value = 0x0208 }, + { .description = "20AH", .value = 0x020a }, + { .description = "20CH", .value = 0x020c }, + { .description = "20EH", .value = 0x020e }, { .description = "" } }, .bios = { { 0 } } @@ -2094,6 +2096,54 @@ static const device_t iab_device = { }; #endif /* USE_ISAMEM_IAB */ +static const device_config_t mplus2_config[] = { + // clang-format off + { + .name = "size", + .description = "Memory Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 64, + .file_filter = "", + .spinner = { + .min = 0, + .max = 512, + .step = 64 + }, + .selection = { { 0 } } + }, + { + .name = "start", + .description = "Start Address", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 256, + .file_filter = "", + .spinner = { + .min = 64, + .max = 576, + .step = 64 + }, + .selection = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +static const device_t mplus2_device = { + .name = "AST MegaPlus II", + .internal_name = "mplus2", + .flags = DEVICE_ISA, + .local = ISAMEM_MPLUS2_CARD, + .init = isamem_init, + .close = isamem_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = mplus2_config +}; + static const struct { const device_t *dev; } boards[] = { @@ -2127,6 +2177,7 @@ static const struct { { &iab_device }, #endif /* USE_ISAMEM_IAB */ { &lotech_ems_device }, + { &mplus2_device }, { NULL } // clang-format on }; diff --git a/src/device/isapnp.c b/src/device/isapnp.c index 1ee8be040..ce8f7817f 100644 --- a/src/device/isapnp.c +++ b/src/device/isapnp.c @@ -1117,13 +1117,17 @@ isapnp_enable_card(void *priv, uint8_t enable) /* Enable or disable the card. */ if (!!enable ^ !!card->enable) card->state = (enable == ISAPNP_CARD_FORCE_CONFIG) ? PNP_STATE_CONFIG : PNP_STATE_WAIT_FOR_KEY; + int old_enable = card->enable; card->enable = enable; /* Invalidate other references if we're disabling this card. */ - if (!card->enable) { + if ((card->enable) && (dev->current_ld_card != NULL) && (dev->current_ld_card != card)) { + dev->current_ld = NULL; + dev->current_ld_card = NULL; + } if (!card->enable) { if (dev->isolated_card == card) dev->isolated_card = NULL; - if (dev->current_ld_card == card) { + if ((dev->current_ld_card == card) && (old_enable != ISAPNP_CARD_FORCE_CONFIG)) { dev->current_ld = NULL; dev->current_ld_card = NULL; } diff --git a/src/device/isarom.c b/src/device/isarom.c index 823bfcbe1..bfdaecacf 100644 --- a/src/device/isarom.c +++ b/src/device/isarom.c @@ -248,7 +248,7 @@ static const device_config_t isarom_config[] = { }, { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0x00000, @@ -557,7 +557,7 @@ static const device_config_t isarom_quad_config[] = { static const device_config_t lba_enhancer_config[] = { { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xc8000, diff --git a/src/device/isartc.c b/src/device/isartc.c index 0540dc1f0..664793db3 100644 --- a/src/device/isartc.c +++ b/src/device/isartc.c @@ -89,10 +89,11 @@ #define ISARTC_P5PAK 2 #define ISARTC_A6PAK 3 #define ISARTC_VENDEX 4 +#define ISARTC_MPLUS2 5 #define ISARTC_MM58167 10 -#define ISARTC_ROM_MM58167_1 "roms/rtc/glatick/GLaTICK_0.8.5_NS_RP.ROM" -#define ISARTC_ROM_MM58167_2 "roms/rtc/glatick/GLaTICK_0.8.5_86B.ROM" +#define ISARTC_ROM_MM58167_1 "roms/rtc/glatick/GLaTICK_0.8.8_NS_86B.ROM" /* Generic 58167, AST or EV-170 */ +#define ISARTC_ROM_MM58167_2 "roms/rtc/glatick/GLaTICK_0.8.8_NS_86B2.ROM" /* PII-147 */ #define ISARTC_DEBUG 0 @@ -409,6 +410,7 @@ mm67_read(uint16_t port, void *priv) break; case MM67_AL_MSEC: + case MM67_MSEC: ret = dev->nvr.regs[reg] & 0xf0; break; @@ -416,6 +418,10 @@ mm67_read(uint16_t port, void *priv) ret = dev->nvr.regs[reg] & 0x0f; break; + case MM67_DOW: + ret = dev->nvr.regs[reg] & 0x07; + break; + default: ret = dev->nvr.regs[reg]; break; @@ -563,8 +569,9 @@ isartc_init(const device_t *info) dev->year = MM67_AL_HUNTEN; /* year, NON STANDARD */ break; - case ISARTC_P5PAK: /* Paradise Systems 5PAK */ - case ISARTC_A6PAK: /* AST SixPakPlus */ + case ISARTC_P5PAK: /* Paradise Systems 5PAK */ + case ISARTC_A6PAK: /* AST SixPakPlus */ + case ISARTC_MPLUS2: /* AST MegaPlus II */ dev->flags |= FLAG_YEAR80; dev->base_addr = 0x02c0; dev->base_addrsz = 32; @@ -786,6 +793,42 @@ static const device_t a6pak_device = { .config = a6pak_config }; +static const device_config_t mplus2_config[] = { + // clang-format off + { + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = -1, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { "Disabled", -1 }, + { "IRQ2", 2 }, + { "IRQ3", 3 }, + { "IRQ5", 5 }, + { "" } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +static const device_t mplus2_device = { + .name = "AST MegaPlus II", + .internal_name = "mplus2", + .flags = DEVICE_ISA, + .local = ISARTC_MPLUS2, + .init = isartc_init, + .close = isartc_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = mplus2_config +}; + static const device_config_t mm58167_config[] = { // clang-format off { @@ -823,7 +866,7 @@ static const device_config_t mm58167_config[] = { }, { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xcc000, @@ -897,6 +940,7 @@ static const struct { { &pii147_device }, { &p5pak_device }, { &a6pak_device }, + { &mplus2_device }, { &mm58167_device }, { NULL } // clang-format on diff --git a/src/device/kbc_at.c b/src/device/kbc_at.c index d19b08f84..4c0ea4155 100644 --- a/src/device/kbc_at.c +++ b/src/device/kbc_at.c @@ -8,13 +8,11 @@ * * Intel 8042 (AT keyboard controller) emulation. * - * - * * Authors: Miran Grca, * EngiNerd, * - * Copyright 2023 Miran Grca. - * Copyright 2023 EngiNerd. + * Copyright 2023-2025 Miran Grca. + * Copyright 2023-2025 EngiNerd. */ #include #include @@ -29,24 +27,19 @@ #include <86box/timer.h> #include <86box/io.h> #include <86box/pic.h> -#include <86box/pit.h> #include <86box/plat_fallthrough.h> #include <86box/plat_unused.h> -#include <86box/ppi.h> #include <86box/mem.h> #include <86box/device.h> +#include <86box/dma.h> #include <86box/machine.h> #include <86box/m_at_t3100e.h> #include <86box/fdd.h> #include <86box/fdc.h> -#include <86box/sound.h> -#include <86box/snd_speaker.h> +#include <86box/pci.h> #include <86box/video.h> #include <86box/keyboard.h> -#include <86box/dma.h> -#include <86box/pci.h> - #define STAT_PARITY 0x80 #define STAT_RTIMEOUT 0x40 #define STAT_TTIMEOUT 0x20 @@ -69,30 +62,6 @@ #define CCB_MASK 0x68 #define MODE_MASK 0x6c -#define KBC_TYPE_ISA 0x00 /* AT ISA-based chips */ -#define KBC_TYPE_PS2_1 0x01 /* PS2 on PS/2, type 1 */ -#define KBC_TYPE_PS2_2 0x02 /* PS2 on PS/2, type 2 */ -#define KBC_TYPE_GREEN 0x03 /* PS2 green controller */ -#define KBC_TYPE_MASK 0x03 - -#define KBC_VEN_GENERIC 0x00 -#define KBC_VEN_IBM_PS1 0x04 -#define KBC_VEN_TOSHIBA 0x08 -#define KBC_VEN_OLIVETTI 0x0c -#define KBC_VEN_AMI 0x10 -#define KBC_VEN_TRIGEM_AMI 0x14 -#define KBC_VEN_QUADTEL 0x18 -#define KBC_VEN_PHOENIX 0x1c -#define KBC_VEN_ACER 0x20 -#define KBC_VEN_NCR 0x24 -#define KBC_VEN_ALI 0x28 -#define KBC_VEN_SIEMENS 0x2c -#define KBC_VEN_COMPAQ 0x30 -#define KBC_VEN_IBM 0x34 -#define KBC_VEN_MASK 0x7c - -#define KBC_FLAG_IS_ASIC 0x80000000 - #define FLAG_CLOCK 0x01 #define FLAG_CACHE 0x02 #define FLAG_PS2 0x04 @@ -138,7 +107,9 @@ typedef struct atkbc_t { uint8_t irq_state; uint8_t do_irq; uint8_t is_asic; - uint8_t pad; + uint8_t is_green; + uint8_t kblock_switch; + uint8_t is_type2; uint8_t mem[0x100]; @@ -174,8 +145,14 @@ typedef struct atkbc_t { /* Keyboard controller ports. */ kbc_at_port_t *kbc_at_ports[2] = { NULL, NULL }; -static uint8_t kbc_ami_revision = '8'; -static uint8_t kbc_award_revision = 0x42; +static uint8_t kbc_ami_revision = '8'; +static uint8_t kbc_ami_is_clone = 0; + +static uint8_t kbc_award_revision = 0x42; + +static uint8_t kbc_chips_revision = 0xa6; + +static uint16_t kbc_phoenix_version = 0x0416; static void (*kbc_at_do_poll)(atkbc_t *dev); @@ -267,7 +244,7 @@ kbc_translate(atkbc_t *dev, uint8_t val) { int xt_mode = (dev->mem[0x20] & 0x20) && !(dev->misc_flags & FLAG_PS2); /* The IBM AT keyboard controller firmware does not apply translation in XT mode. */ - int translate = !xt_mode && ((dev->mem[0x20] & 0x40) || ((dev->flags & KBC_TYPE_MASK) == KBC_TYPE_PS2_2)); + int translate = !xt_mode && ((dev->mem[0x20] & 0x40) || (dev->is_type2)); uint8_t kbc_ven = dev->flags & KBC_VEN_MASK; int ret = - 1; @@ -397,7 +374,8 @@ kbc_send_to_ob(atkbc_t *dev, uint8_t val, uint8_t channel, uint8_t stat_hi) if (temp == -1) return; - if ((kbc_ven == KBC_VEN_AMI) || (kbc_ven == KBC_VEN_TRIGEM_AMI) || + if ((kbc_ven == KBC_VEN_AMI) || (kbc_ven == KBC_VEN_AMI_TRIGEM) || + (kbc_ven == KBC_VEN_HOLTEK) || (kbc_ven == KBC_VEN_UMC) || (dev->misc_flags & FLAG_PS2)) stat_hi |= ((dev->p1 & 0x80) ? 0x10 : 0x00); else @@ -423,10 +401,7 @@ kbc_send_to_ob(atkbc_t *dev, uint8_t val, uint8_t channel, uint8_t stat_hi) if (dev->irq[0] != 0xffff) picintlevel(1 << dev->irq[0], &dev->irq_state); -#ifdef WRONG_CONDITION - if ((dev->channel > 0) || dev->is_asic || (kbc_ven == KBC_VEN_IBM_PS1) || (kbc_ven == KBC_VEN_IBM)) -#endif - kbc_do_irq(dev); + kbc_do_irq(dev); dev->ob = temp; } @@ -912,7 +887,7 @@ write_cmd(atkbc_t *dev, uint8_t val) kbc_at_log("ATkbc: write command byte: %02X (old: %02X)\n", val, dev->mem[0x20]); /* PS/2 type 2 keyboard controllers always force the XLAT bit to 0. */ - if ((dev->flags & KBC_TYPE_MASK) == KBC_TYPE_PS2_2) { + if (dev->is_type2) { val &= ~CCB_TRANSLATE; dev->mem[0x20] &= ~CCB_TRANSLATE; } else if (!(dev->misc_flags & FLAG_PS2)) { @@ -952,6 +927,26 @@ pulse_poll(void *priv) write_p2(dev, dev->p2 | dev->old_p2); } +static uint8_t +write_cmd_acer(void *priv, uint8_t val) +{ + atkbc_t *dev = (atkbc_t *) priv; + uint8_t ret = 1; + + switch (val) { + default: + break; + + case 0xaf: + kbc_at_log("ATkbc: ??? - appears in the probes of the real controller\n"); + kbc_delay_to_ob(dev, 0x00, 0, 0x00); + ret = 0; + break; + } + + return ret; +} + static uint8_t write_cmd_data_ami(void *priv, uint8_t val) { @@ -1008,7 +1003,7 @@ write_cmd_data_ami(void *priv, uint8_t val) void kbc_at_set_ps2(void *priv, const uint8_t ps2) { - atkbc_t *dev = (atkbc_t *) priv; + atkbc_t *dev = (atkbc_t *) priv; dev->ami_flags = (dev->ami_flags & 0xfe) | (!!ps2); dev->misc_flags &= ~FLAG_PS2; @@ -1028,6 +1023,8 @@ write_cmd_ami(void *priv, uint8_t val) atkbc_t *dev = (atkbc_t *) priv; uint8_t kbc_ven = dev->flags & KBC_VEN_MASK; uint8_t ret = 1; + char *copr = NULL; + int coprlen = 0; switch (val) { default: @@ -1047,8 +1044,45 @@ write_cmd_ami(void *priv, uint8_t val) break; case 0xa0: /* copyright message */ - kbc_at_queue_add(dev, 0x28); - kbc_at_queue_add(dev, 0x00); + switch (kbc_ami_revision) { + case 0x35: + copr = "(C)1994 AMI"; + coprlen = strlen(copr) + 1; + break; + case 0x38: + case 0x42: case 0x44: + case 0x45: + copr = "(C) AMERICAN MEGATRENDS INC."; + coprlen = strlen(copr); /* No trailing zero. */ + break; + case 0x46: + copr = "(C)1990 AMERICAN MEGATRENDS INC"; + coprlen = strlen(copr) + 1; + break; + case 0x48: + copr = "(C)1992 AMERICAN MEGATRENDS INC"; + coprlen = strlen(copr) + 1; + break; + case 0x50: case 0x52: + copr = "(C)1993 AMI"; + coprlen = strlen(copr) + 1; + break; + case 0x5a: + if (dev->is_green) + /* + ( C ) 1 9 9 0 A M I + But TriGem forgot to reencrypt it. + */ + copr = "\xFA\x97\xDA\xD9\xD8\xD8\xF9\xFB\xD7\x56\xD6"; + else + copr = "(C)1990 AMERICAN MEGATRENDS INC"; + coprlen = strlen(copr) + 1; + break; + } + + for (int i = 0; i < coprlen; i++) + kbc_at_queue_add(dev, copr[i]); + ret = 0; break; @@ -1223,6 +1257,12 @@ write_cmd_ami(void *priv, uint8_t val) ret = 0; break; + case 0xca: /* read keyboard mode */ + kbc_at_log("ATkbc: AMI - read keyboard mode\n"); + kbc_delay_to_ob(dev, dev->ami_flags, 0, 0x00); + ret = 0; + break; + case 0xcb: /* set keyboard mode */ kbc_at_log("ATkbc: AMI - set keyboard mode\n"); dev->wantdata = 1; @@ -1257,11 +1297,464 @@ write_cmd_ami(void *priv, uint8_t val) } static uint8_t -write_cmd_data_phoenix(void *priv, uint8_t val) +write_cmd_data_sis(void *priv, uint8_t val) +{ + atkbc_t *dev = (atkbc_t *) priv; + + switch (dev->command) { + /* 0x40 - 0x5F are aliases for 0x60-0x7F */ + case 0x40 ... 0x5f: + kbc_at_log("ATkbc: SIS - alias write to %02X\n", dev->command & 0x1f); + dev->mem[(dev->command & 0x1f) + 0x20] = val; + if (dev->command == 0x60) + write_cmd(dev, val); + return 0; + + case 0xcb: /* set keyboard mode */ + kbc_at_log("ATkbc: SIS - set keyboard mode\n"); + dev->ami_flags = val; + dev->misc_flags &= ~FLAG_PS2; + if (val & 0x01) { + kbc_at_log("ATkbc: SIS: Emulate PS/2 keyboard\n"); + dev->misc_flags |= FLAG_PS2; + kbc_at_do_poll = kbc_at_poll_ps2; + } else { + kbc_at_log("ATkbc: SIS: Emulate AT keyboard\n"); + kbc_at_do_poll = kbc_at_poll_at; + } + return 0; + + default: + break; + } + + return 1; +} + +static uint8_t +write_cmd_sis(void *priv, uint8_t val) { atkbc_t *dev = (atkbc_t *) priv; uint8_t ret = 1; + switch (val) { + default: + break; + + case 0x00 ... 0x1f: + kbc_at_log("ATkbc: SIS - alias read from %08X\n", val); + kbc_delay_to_ob(dev, dev->mem[val + 0x20], 0, 0x00); + ret = 0; + break; + + case 0x40 ... 0x5f: + kbc_at_log("ATkbc: SIS - alias write to %08X\n", dev->command); + dev->wantdata = 1; + dev->state = STATE_KBC_PARAM; + ret = 0; + break; + + case 0xa0: /* copyright message */ + kbc_at_queue_add(dev, 0x28); + kbc_at_queue_add(dev, 0x00); + ret = 0; + break; + + case 0xa1: /* get controller version */ + kbc_at_log("ATkbc: SIS - get controller version\n"); + kbc_delay_to_ob(dev, 'H', 0, 0x00); + ret = 0; + break; + + case 0xa4: /* write clock = low */ + if (!(dev->misc_flags & FLAG_PS2)) { + kbc_at_log("ATkbc: SIS - write clock = low\n"); + dev->misc_flags &= ~FLAG_CLOCK; + ret = 0; + } + break; + + case 0xa5: /* write clock = high */ + if (!(dev->misc_flags & FLAG_PS2)) { + kbc_at_log("ATkbc: SIS - write clock = high\n"); + dev->misc_flags |= FLAG_CLOCK; + ret = 0; + } + break; + + case 0xa6: /* read clock */ + if (!(dev->misc_flags & FLAG_PS2)) { + kbc_at_log("ATkbc: SIS - read clock\n"); + kbc_delay_to_ob(dev, (dev->misc_flags & FLAG_CLOCK) ? 0xff : 0x00, 0, 0x00); + ret = 0; + } + break; + + case 0xa7: /* write cache bad */ + if (!(dev->misc_flags & FLAG_PS2)) { + kbc_at_log("ATkbc: SIS - write cache bad\n"); + dev->misc_flags &= FLAG_CACHE; + ret = 0; + } + break; + + case 0xa8: /* write cache good */ + if (!(dev->misc_flags & FLAG_PS2)) { + kbc_at_log("ATkbc: SIS - write cache good\n"); + dev->misc_flags |= FLAG_CACHE; + ret = 0; + } + break; + + case 0xa9: /* read cache */ + if (!(dev->misc_flags & FLAG_PS2)) { + kbc_at_log("ATkbc: SIS - read cache\n"); + kbc_delay_to_ob(dev, (dev->misc_flags & FLAG_CACHE) ? 0xff : 0x00, 0, 0x00); + ret = 0; + } + break; + + case 0xb0 ... 0xb1: + /* set KBC lines P10-P11 (P1 bits 0-1) low */ + if (!(dev->misc_flags & FLAG_PS2)) { + kbc_at_log("ATkbc: set KBC lines P10-P11 (P1 bits 0-3) low\n"); + dev->p1 &= ~(1 << (val & 0x03)); + kbc_delay_to_ob(dev, dev->ob, 0, 0x00); + dev->pending++; + ret = 0; + } + break; + + case 0xb8 ... 0xb9: + /* set KBC lines P10-P11 (P1 bits 0-1) high */ + kbc_at_log("ATkbc: set KBC lines P10-P11 (P1 bits 0-3) high\n"); + if (!(dev->misc_flags & FLAG_PS2)) { + dev->p1 |= (1 << (val & 0x03)); + kbc_delay_to_ob(dev, dev->ob, 0, 0x00); + dev->pending++; + } + ret = 0; + break; + + case 0xc1: /* set port P17 to 0 & KBLOCK disabled */ + kbc_at_log("ATkbc: SIS - set port P17 to 0 & KBLOCK disabled\n"); + if (!dev->kblock_switch) + dev->p1 &= 0x7f; + ret = 0; + break; + case 0xc7: /* set port P17 to 1 */ + kbc_at_log("ATkbc: SIS - set port P17 to 1\n"); + if (!dev->kblock_switch) + dev->p1 |= 0x80; + ret = 0; + break; + + case 0xca: /* read keyboard mode */ + kbc_at_log("ATkbc: AMI - read keyboard mode\n"); + kbc_delay_to_ob(dev, dev->ami_flags, 0, 0x00); + ret = 0; + break; + + case 0xcb: /* set keyboard mode */ + kbc_at_log("ATkbc: AMI - set keyboard mode\n"); + dev->wantdata = 1; + dev->state = STATE_KBC_PARAM; + ret = 0; + break; + + case 0xd6: /* enable KBLOCK switch */ + kbc_at_log("ATkbc: SIS - enable KBLOCK switch\n"); + dev->kblock_switch = 1; + ret = 0; + break; + case 0xd7: /* disable KBLOCK switch */ + kbc_at_log("ATkbc: SIS - disable KBLOCK switch\n"); + dev->kblock_switch = 0; + ret = 0; + break; + } + + return ret; +} + +static uint8_t +write_cmd_umc(void *priv, uint8_t val) +{ + atkbc_t *dev = (atkbc_t *) priv; + uint8_t ret = 1; + + switch (val) { + default: + break; + + case 0xa0: /* copyright message */ + kbc_at_queue_add(dev, 0x28); + kbc_at_queue_add(dev, 0x28); + kbc_at_queue_add(dev, 0x28); + kbc_at_queue_add(dev, 0x00); + ret = 0; + break; + + case 0xa1: /* get controller version */ + kbc_at_log("ATkbc: UMC - get controller version\n"); + kbc_delay_to_ob(dev, kbc_ami_revision, 0, 0x00); + ret = 0; + break; + } + + return ret; +} + +static uint8_t +write_cmd_data_award(void *priv, uint8_t val) +{ + atkbc_t *dev = (atkbc_t *) priv; + uint8_t ret = 1; + + switch (val) { + default: + break; + + case 0xcb: /* set keyboard mode */ + kbc_at_log("ATkbc: AMI - set keyboard mode\n"); + dev->ami_flags = val; + dev->misc_flags &= ~FLAG_PS2; + if (val & 0x01) { + kbc_at_log("ATkbc: AMI: Emulate PS/2 keyboard\n"); + dev->misc_flags |= FLAG_PS2; + kbc_at_do_poll = kbc_at_poll_ps2; + } else { + kbc_at_log("ATkbc: AMI: Emulate AT keyboard\n"); + kbc_at_do_poll = kbc_at_poll_at; + } + ret = 0; + break; + } + + return ret; +} + +static uint8_t +write_cmd_award(void *priv, uint8_t val) +{ + atkbc_t *dev = (atkbc_t *) priv; + uint8_t ret = 1; + + switch (val) { + default: + break; + + case 0x90 ... 0x9f: /* Write low nibble to (Port13-Port10) */ + kbc_at_log("ATkbc: Award - write low nibble to (Port13-Port10)\n"); + dev->p1 = (dev->p1 & 0xf0) | (val & 0x0f); + ret = 0; + break; + + case 0xa1: /* get controller version */ + kbc_at_log("ATkbc: AMI - get controller version\n"); + kbc_delay_to_ob(dev, kbc_ami_revision, 0, 0x00); + ret = 0; + break; + + case 0xa4: /* check if password installed */ + kbc_at_log("ATkbc: check if password installed\n"); + kbc_delay_to_ob(dev, 0xf1, 0, 0x00); + ret = 0; + break; + + case 0xa5: /* do nothing */ + kbc_at_log("ATkbc: do nothing\n"); + ret = 0; + break; + + /* TODO: Make this command do nothing on the Regional HT6542, + or else, Efflixi's Award OPTi 495 BIOS gets a stuck key + in Norton Commander 3.0. */ + case 0xaf: /* read keyboard version */ + kbc_at_log("ATkbc: read keyboard version\n"); + kbc_delay_to_ob(dev, kbc_award_revision, 0, 0x00); + ret = 0; + break; + + case 0xb0 ... 0xb3: + /* set KBC lines P10-P13 (P1 bits 0-3) low */ + kbc_at_log("ATkbc: set KBC lines P10-P13 (P1 bits 0-3) low\n"); + dev->p1 &= ~(1 << (val & 0x03)); + kbc_delay_to_ob(dev, dev->ob, 0, 0x00); + ret = 0; + break; + + /* TODO: The ICS SB486PV sends command B4 but expects to read *TWO* bytes. */ + case 0xb4: case 0xb5: + /* set KBC lines P22-P23 (P2 bits 2-3) low */ + kbc_at_log("ATkbc: set KBC lines P22-P23 (P2 bits 2-3) low\n"); + write_p2(dev, dev->p2 & ~(4 << (val & 0x01))); + kbc_delay_to_ob(dev, dev->ob, 0, 0x00); + ret = 0; + break; + + case 0xb6 ... 0xb7: + /* set KBC lines P14-P15 (P1 bits 4-5) low */ + kbc_at_log("ATkbc: set KBC lines P14-P15 (P1 bits 4-5) low\n"); + dev->p1 &= ~(0x10 << (val & 0x01)); + kbc_delay_to_ob(dev, dev->ob, 0, 0x00); + ret = 0; + break; + + case 0xb8 ... 0xbb: + /* set KBC lines P10-P13 (P1 bits 0-3) high */ + kbc_at_log("ATkbc: set KBC lines P10-P13 (P1 bits 0-3) high\n"); + dev->p1 |= (1 << (val & 0x03)); + kbc_delay_to_ob(dev, dev->ob, 0, 0x00); + ret = 0; + break; + + case 0xbc: case 0xbd: + /* set KBC lines P22-P23 (P2 bits 2-3) high */ + kbc_at_log("ATkbc: set KBC lines P22-P23 (P2 bits 2-3) high\n"); + write_p2(dev, dev->p2 | (4 << (val & 0x01))); + kbc_delay_to_ob(dev, dev->ob, 0, 0x00); + ret = 0; + break; + + case 0xbe ... 0xbf: + /* set KBC lines P14-P15 (P1 bits 4-5) high */ + kbc_at_log("ATkbc: set KBC lines P14-P15 (P1 bits 4-5) high\n"); + dev->p1 |= (0x10 << (val & 0x01)); + kbc_delay_to_ob(dev, dev->ob, 0, 0x00); + ret = 0; + break; + + case 0xc8: + /* + * unblock KBC lines P22/P23 + * (allow command D1 to change bits 2/3 of P2) + */ + kbc_at_log("ATkbc: AMI - unblock KBC lines P22 and P23\n"); + dev->ami_flags &= 0xfb; + ret = 0; + break; + + case 0xc9: + /* + * block KBC lines P22/P23 + * (disallow command D1 from changing bits 2/3 of the port) + */ + kbc_at_log("ATkbc: AMI - block KBC lines P22 and P23\n"); + dev->ami_flags |= 0x04; + ret = 0; + break; + + case 0xca: /* read keyboard mode */ + kbc_at_log("ATkbc: AMI - read keyboard mode\n"); + kbc_delay_to_ob(dev, dev->ami_flags, 0, 0x00); + ret = 0; + break; + + case 0xcb: /* set keyboard mode */ + kbc_at_log("ATkbc: AMI - set keyboard mode\n"); + dev->wantdata = 1; + dev->state = STATE_KBC_PARAM; + ret = 0; + break; + + case 0xe1 ... 0xef: /* Active output ports */ + kbc_at_log("ATkbc: Award - active output ports\n"); + write_p2(dev, (dev->p2 & 0xf1) | (val & 0x0e)); + ret = 0; + break; + } + + return ret; +} + +static uint8_t +write_cmd_data_chips(void *priv, uint8_t val) +{ + atkbc_t *dev = (atkbc_t *) priv; + uint8_t ret = 1; + + switch (val) { + default: + break; + + case 0xa1: /* CHIPS extensions */ + kbc_at_log("ATkbc: C&T - CHIPS extensions\n"); + if (dev->command_phase == 1) { + switch (val) { + default: + break; + case 0x00: /* return ID */ + kbc_at_log("ATkbc: C&T - return ID\n"); + kbc_delay_to_ob(dev, kbc_chips_revision, 0, 0x00); + break; + case 0x02: /* write input port */ + kbc_at_log("ATkbc: C&T - write input port\n"); + dev->mem_addr = val; + dev->wantdata = 1; + dev->state = STATE_KBC_PARAM; + dev->command_phase = 2; + break; + case 0x04: /* select turbo switch input */ + kbc_at_log("ATkbc: C&T - select turbo switch input\n"); + dev->mem_addr = val; + dev->wantdata = 1; + dev->state = STATE_KBC_PARAM; + dev->command_phase = 2; + break; + case 0x05: /* select turbo LED output */ + kbc_at_log("ATkbc: Cselect turbo LED output\n"); + dev->mem_addr = val; + dev->wantdata = 1; + dev->state = STATE_KBC_PARAM; + dev->command_phase = 2; + break; + } + } else if (dev->command_phase == 2) { + switch (dev->mem_addr) { + default: + break; + case 0x02: /* write input port */ + kbc_at_log("ATkbc: C&T - write iput port\n"); + dev->p1 = val; + break; + } + dev->command_phase = 0; + } + ret = 0; + break; + } + + return ret; +} + +static uint8_t +write_cmd_chips(void *priv, uint8_t val) +{ + atkbc_t *dev = (atkbc_t *) priv; + uint8_t ret = 1; + + switch (val) { + default: + break; + + case 0xa1: /* CHIPS extensions */ + kbc_at_log("ATkbc: C&T - CHIPS extensions\n"); + dev->wantdata = 1; + dev->state = STATE_KBC_PARAM; + ret = 0; + break; + } + + return ret; +} + +static uint8_t +write_cmd_data_phoenix(void *priv, uint8_t val) +{ + atkbc_t *dev = (atkbc_t *) priv; + uint8_t ret = 1; + switch (dev->command) { default: break; @@ -1459,18 +1952,8 @@ write_cmd_phoenix(void *priv, uint8_t val) revision level and proper CPU bits. */ case 0xd5: /* Read MultiKey code revision level */ kbc_at_log("ATkbc: Phoenix - Read MultiKey code revision level\n"); - if (dev->misc_flags & FLAG_PS2) { - if (dev->flags & DEVICE_PCI) { - kbc_at_queue_add(dev, 0x04); - kbc_at_queue_add(dev, 0x16); - } else { - kbc_at_queue_add(dev, 0x01); - kbc_at_queue_add(dev, 0x38); - } - } else { - kbc_at_queue_add(dev, 0x01); - kbc_at_queue_add(dev, 0x29); - } + kbc_at_queue_add(dev, kbc_phoenix_version >> 8); + kbc_at_queue_add(dev, kbc_phoenix_version & 0xff); ret = 0; break; @@ -1503,44 +1986,18 @@ write_cmd_phoenix(void *priv, uint8_t val) } ret = 0; break; - } - return ret; -} - -static uint8_t -write_cmd_siemens(void *priv, uint8_t val) -{ - atkbc_t *dev = (atkbc_t *) priv; - uint8_t ret = 1; - - switch (val) { - default: - ret = write_cmd_ami(dev, val); - break; - - case 0x92: /*Siemens Award - 92 sent by PCD-2L BIOS*/ - kbc_at_log("Siemens Award - 92 sent by PCD-2L BIOS\n"); - ret = 0; - break; - - case 0x94: /*Siemens Award - 94 sent by PCD-2L BIOS*/ - kbc_at_log("Siemens Award - 94 sent by PCD-2L BIOS\n"); - ret = 0; - break; - - case 0x9a: /*Siemens Award - 9A sent by PCD-2L BIOS*/ - kbc_at_log("Siemens Award - 9A sent by PCD-2L BIOS\n"); - ret = 0; - break; - - case 0x9c: /*Siemens Award - 9C sent by PCD-2L BIOS*/ - kbc_at_log("Siemens Award - 9C sent by PCD-2L BIOS\n"); - ret = 0; - break; - - case 0xa9: /*Siemens Award - A9 sent by PCD-2L BIOS*/ - kbc_at_log("Siemens Award - A9 sent by PCD-2L BIOS\n"); + /* NOTE: The MultiKey/42i reference does not document these at all. + The ADI 386SX BIOS uses these commands but it also uses + commands B8 and BB with a parameters, which clearly indicates a + Phoenix KBC. So either these are undocumented or were present + in an early Phoenix MultiKey variant but later removed - the + MultiKey/42i reference does say a number of features were + removed, so these may have been among them, and we have no + earlier MultiKey reference to look at. */ + case 0xe1 ... 0xef: /* Active output ports */ + kbc_at_log("ATkbc: Phoenix - active output ports\n"); + write_p2(dev, (dev->p2 & 0xf1) | (val & 0x0e)); ret = 0; break; } @@ -1747,11 +2204,6 @@ write_cmd_toshiba(void *priv, uint8_t val) static uint8_t read_p1(atkbc_t *dev) { - uint8_t kbc_ven = dev->flags & KBC_VEN_MASK; - uint8_t ret = 0xff; - uint8_t current_drive; - uint8_t fixed_bits; - /* P1 bits: 76543210 ----------------- @@ -1817,92 +2269,9 @@ read_p1(atkbc_t *dev) Compaq: Reserved; NCR: DMA mode. */ - fixed_bits = 4; + uint8_t ret = machine_get_p1(dev->p1) | (dev->p1 & 0x03); - /* The SMM handlers of Intel AMI Pentium BIOS'es expect bit 6 to be set. */ - if ((kbc_ven == KBC_VEN_AMI) && ((dev->flags & KBC_TYPE_MASK) == KBC_TYPE_GREEN)) - fixed_bits |= 0x40; - - if (!strcmp(machine_get_internal_name(), "dells333sl")) - /* - Dell System 333s/L: - - Bit 5: Stuck in reboot loop if clear. - */ - ret = 0x20 | (video_is_mda() ? 0x40 : 0x00); - else if (kbc_ven == KBC_VEN_IBM_PS1) { - current_drive = fdc_get_current_drive(); - /* (B0 or F0) | (fdd_is_525(current_drive) on bit 6) */ - ret = dev->p1 | fixed_bits | (fdd_is_525(current_drive) ? 0x40 : 0x00); - } else if (kbc_ven == KBC_VEN_NCR) { - /* Switch settings: - - Bit 7: Keyboard disable; - - Bit 6: Display type (0 color, 1 mono); - - Bit 5: Power-on default speed (0 high, 1 low); - - Bit 4: Sense RAM size (0 unsupported, 1 512k on system board); - - Bit 3: Coprocessor detect; - - Bit 2: Unused; - - Bit 1: High/Auto speed; - - Bit 0: DMA mode. - - (B0 or F0) | 0x04 | (display on bit 6) | (fpu on bit 3) - */ - ret = (dev->p1 | fixed_bits | (video_is_mda() ? 0x40 : 0x00) | - (hasfpu ? 0x08 : 0x00)) & 0xdf; - } else if (kbc_ven == KBC_VEN_TRIGEM_AMI) { - /* Switch settings: - - Bit 3, 2: - - 1, 1: TriGem logo; - - 1, 0: Garbled logo; - - 0, 1: Epson logo; - - 0, 0: Generic AMI logo. - */ - if (dev->misc_flags & FLAG_PCI) - fixed_bits |= 8; - - /* (B0 or F0) | (0x04 or 0x0c) */ - ret = dev->p1 | fixed_bits; - } else if (((dev->flags & KBC_TYPE_MASK) >= KBC_TYPE_PS2_1) && - ((dev->flags & KBC_TYPE_MASK) < KBC_TYPE_GREEN)) { - if (!strcmp(machine_get_internal_name(), "dell466np")) - /* - Dell 466/NP: - - Bit 2: Keyboard fuse (must be set); - - Bit 4: Password disable jumper (must be clear); - - Bit 5: Manufacturing jumper (must be set). - */ - ret = 0x24; - else if (!strcmp(machine_get_internal_name(), "optiplex_gxl")) - /* - Dell OptiPlex GXL/GXM: - - Bit 3: Password disable jumper (must be clear); - - Bit 4: Keyboard fuse (must be set); - - Bit 5: Manufacturing jumper (must be set). - */ - ret = 0x30; - else if (!strcmp(machine_get_internal_name(), "dellplato") || - !strcmp(machine_get_internal_name(), "dellhannibalp") || - !strcmp(machine_get_internal_name(), "dellxp60")) - /* - Dell Dimension XPS Pxxx & Pxxxa/Mxxxa: - - Bit 3: Password disable jumper (must be clear); - - Bit 4: Clear CMOS jumper (must be set). - */ - ret = 0x10; - else { - /* (B0 or F0) | (0x08 or 0x0c) */ - ret = ((dev->p1 | fixed_bits) & 0xf0) | - (((dev->flags & KBC_VEN_MASK) == KBC_VEN_ACER) ? 0x08 : 0x0c); - - if (!strcmp(machine_get_internal_name(), "alfredo")) - ret &= 0xef; - } - } else if (kbc_ven == KBC_VEN_COMPAQ) - ret = dev->p1 | (hasfpu ? 0x00 : 0x04); - else - /* (B0 or F0) | (0x04 or 0x44) */ - ret = dev->p1 | fixed_bits; - - dev->p1 = ((dev->p1 + 1) & 3) | (dev->p1 & 0xfc); + dev->p1 = ((dev->p1 + 1) & 0x03) | (dev->p1 & 0xfc); return ret; } @@ -1997,17 +2366,10 @@ kbc_at_process_cmd(void *priv) case 0xaa: /* self-test */ kbc_at_log("ATkbc: self-test\n"); - if ((dev->flags & KBC_TYPE_MASK) >= KBC_TYPE_PS2_1) { + if (machine_has_flags_ex(MACHINE_PS2_KBC)) { if (dev->state != STATE_RESET) { kbc_at_log("ATkbc: self-test reinitialization\n"); - /* - Yes, the firmware has an OR, but we need to make sure - to keep any forcibly lowered bytes lowered. - - TODO: Proper P1 implementation, with OR and AND flags - in the machine table. - */ - dev->p1 = dev->p1 & 0xff; + dev->p1 |= 0xff; write_p2(dev, 0x4b); if (dev->irq[1] != 0xffff) picintc(1 << dev->irq[1]); @@ -2027,14 +2389,7 @@ kbc_at_process_cmd(void *priv) } else { if (dev->state != STATE_RESET) { kbc_at_log("ATkbc: self-test reinitialization\n"); - /* - Yes, the firmware has an OR, but we need to make sure - to keep any forcibly lowered bytes lowered. - - TODO: Proper P1 implementation, with OR and AND flags - in the machine table. - */ - dev->p1 = dev->p1 & 0xff; + dev->p1 |= 0xff; write_p2(dev, 0xcf); if (dev->irq[0] != 0xffff) picintclevel(1 << dev->irq[0], &dev->irq_state); @@ -2097,14 +2452,6 @@ kbc_at_process_cmd(void *priv) set_enable_kbd(dev, 1); break; - /* TODO: Make this command do nothing on the Regional HT6542, - or else, Efflixi's Award OPTi 495 BIOS gets a stuck key - in Norton Commander 3.0. */ - case 0xaf: /* read keyboard version */ - kbc_at_log("ATkbc: read keyboard version\n"); - kbc_delay_to_ob(dev, kbc_award_revision, 0, 0x00); - break; - case 0xc0: /* read P1 */ kbc_at_log("ATkbc: read P1\n"); kbc_delay_to_ob(dev, read_p1(dev), 0, 0x00); @@ -2126,11 +2473,6 @@ kbc_at_process_cmd(void *priv) } break; - case 0xca: /* read keyboard mode */ - kbc_at_log("ATkbc: AMI - read keyboard mode\n"); - kbc_delay_to_ob(dev, dev->ami_flags, 0, 0x00); - break; - case 0xd0: /* read P2 */ kbc_at_log("ATkbc: read P2\n"); mask = 0xff; @@ -2391,7 +2733,7 @@ kbc_at_port_1_read(uint16_t port, void *priv) atkbc_t *dev = (atkbc_t *) priv; uint8_t ret = 0xff; - if ((dev->flags & KBC_TYPE_MASK) >= KBC_TYPE_PS2_1) + if (machine_has_flags_ex(MACHINE_PS2_KBC)) cycles -= ISA_CYCLES(8); ret = dev->ob; @@ -2416,7 +2758,7 @@ kbc_at_port_2_read(uint16_t port, void *priv) atkbc_t *dev = (atkbc_t *) priv; uint8_t ret = 0xff; - if ((dev->flags & KBC_TYPE_MASK) >= KBC_TYPE_PS2_1) + if (machine_has_flags_ex(MACHINE_PS2_KBC)) cycles -= ISA_CYCLES(8); ret = dev->status; @@ -2452,10 +2794,10 @@ kbc_at_reset(void *priv) dev->sc_or = 0; - dev->ami_flags = ((dev->flags & KBC_TYPE_MASK) >= KBC_TYPE_PS2_1) ? 0x01 : 0x00; + dev->ami_flags = (machine_has_flags_ex(MACHINE_PS2_KBC)) ? 0x01 : 0x00; dev->misc_flags &= FLAG_PCI; - if ((dev->flags & KBC_TYPE_MASK) >= KBC_TYPE_PS2_1) { + if (machine_has_flags_ex(MACHINE_PS2_KBC)) { dev->misc_flags |= FLAG_PS2; kbc_at_do_poll = kbc_at_poll_ps2; if (dev->irq[1] != 0xffff) @@ -2472,7 +2814,7 @@ kbc_at_reset(void *priv) dev->misc_flags |= FLAG_CACHE; dev->p2 = 0xcd; - if ((dev->flags & KBC_TYPE_MASK) >= KBC_TYPE_PS2_1) { + if (machine_has_flags_ex(MACHINE_PS2_KBC)) { write_p2(dev, 0x4b); } else { /* The real thing writes CF and then AND's it with BF. */ @@ -2488,7 +2830,7 @@ kbc_at_close(void *priv) { atkbc_t *dev = (atkbc_t *) priv; #ifdef OLD_CODE - int max_ports = ((dev->flags & KBC_TYPE_MASK) >= KBC_TYPE_PS2_1) ? 2 : 1; + int max_ports = machine_has_flags_ex(MACHINE_PS2_KBC) ? 2 : 1; #else int max_ports = 2; #endif @@ -2539,7 +2881,7 @@ kbc_at_set_irq(int num, uint16_t irq, void *priv) atkbc_t *dev = (atkbc_t *) priv; if (dev->irq[num] != 0xffff) { - if ((num == 0) && ((dev->flags & KBC_TYPE_MASK) < KBC_TYPE_PS2_1)) + if ((num == 0) && !machine_has_flags_ex(MACHINE_PS2_KBC)) picintclevel(1 << dev->irq[num], &dev->irq_state); else picintc(1 << dev->irq[num]); @@ -2556,9 +2898,12 @@ kbc_at_init(const device_t *info) dev = (atkbc_t *) calloc(1, sizeof(atkbc_t)); + dev->kblock_switch = 1; + dev->flags = info->local; - dev->is_asic = !!(info->local & KBC_FLAG_IS_ASIC); + dev->is_asic = !!(info->local & KBC_FLAG_IS_ASIC); + dev->is_type2 = !!(info->local & KBC_FLAG_IS_TYPE2); video_reset(gfxcard[0]); kbc_at_reset(dev); @@ -2580,20 +2925,32 @@ kbc_at_init(const device_t *info) timer_add(&dev->kbc_dev_poll_timer, kbc_at_dev_poll, dev, 1); dev->write_cmd_data_ven = NULL; - dev->write_cmd_ven = NULL; + dev->write_cmd_ven = NULL; - kbc_ami_revision = '8'; - kbc_award_revision = 0x42; + kbc_ami_revision = '8'; + kbc_award_revision = 0x42; + + kbc_chips_revision = 0xa6; + + kbc_phoenix_version = 0x0416; switch (dev->flags & KBC_VEN_MASK) { default: break; case KBC_VEN_SIEMENS: - kbc_ami_revision = '8'; - kbc_award_revision = 0x42; - dev->write_cmd_data_ven = write_cmd_data_ami; - dev->write_cmd_ven = write_cmd_siemens; + case KBC_VEN_AWARD: + case KBC_VEN_VIA: + if ((info->local & 0xff00) != 0x0000) + kbc_ami_revision = (info->local >> 8) & 0xff; + if ((info->local & 0xff0000) != 0x000000) + kbc_award_revision = (info->local >> 16) & 0xff; + dev->write_cmd_data_ven = write_cmd_data_award; + dev->write_cmd_ven = write_cmd_award; + break; + + case KBC_VEN_ACER: + dev->write_cmd_ven = write_cmd_acer; break; case KBC_VEN_OLIVETTI: @@ -2607,37 +2964,51 @@ kbc_at_init(const device_t *info) dev->write_cmd_ven = write_cmd_ami; break; - case KBC_VEN_TRIGEM_AMI: + case KBC_VEN_AMI_TRIGEM: + dev->is_green = !!(info->local & KBC_FLAG_IS_GREEN); kbc_ami_revision = 'Z'; dev->write_cmd_data_ven = write_cmd_data_ami; dev->write_cmd_ven = write_cmd_ami; break; case KBC_VEN_AMI: - if ((dev->flags & KBC_TYPE_MASK) == KBC_TYPE_GREEN) - kbc_ami_revision = '5'; - else if ((dev->flags & KBC_TYPE_MASK) >= KBC_TYPE_PS2_1) { - if (cpu_64bitbus) - kbc_ami_revision = 'R'; - else if (is486) - kbc_ami_revision = 'P'; - else - kbc_ami_revision = 'H'; - } else if (is386 && !is486) { - if (cpu_16bitbus) - kbc_ami_revision = 'D'; - else - kbc_ami_revision = 'B'; - } else if (!is386) - kbc_ami_revision = '8'; - else - kbc_ami_revision = 'F'; + case KBC_VEN_HOLTEK: + kbc_ami_is_clone = !!(info->local & KBC_FLAG_IS_CLONE); + kbc_ami_revision = (info->local >> 8) & 0xff; dev->write_cmd_data_ven = write_cmd_data_ami; dev->write_cmd_ven = write_cmd_ami; break; + case KBC_VEN_UMC: + if ((info->local & 0xff00) != 0x0000) + kbc_ami_revision = (info->local >> 8) & 0xff; + else + kbc_ami_revision = 0x48; + + dev->write_cmd_ven = write_cmd_umc; + break; + + case KBC_VEN_SIS: + if ((info->local & 0xff00) != 0x0000) + kbc_ami_revision = (info->local >> 8) & 0xff; + else + kbc_ami_revision = 0x48; + + dev->write_cmd_data_ven = write_cmd_data_sis; + dev->write_cmd_ven = write_cmd_sis; + break; + + case KBC_VEN_CHIPS: + if ((info->local & 0xff00) != 0x0000) + kbc_chips_revision = (info->local >> 8) & 0xff; + dev->write_cmd_data_ven = write_cmd_data_chips; + dev->write_cmd_ven = write_cmd_chips; + break; + case KBC_VEN_PHOENIX: + if ((info->local & 0xffff00) != 0x000000) + kbc_phoenix_version = (info->local >> 8) & 0xffff; dev->write_cmd_data_ven = write_cmd_data_phoenix; dev->write_cmd_ven = write_cmd_phoenix; break; @@ -2653,11 +3024,7 @@ kbc_at_init(const device_t *info) break; } -#ifdef OLD_CODE - max_ports = ((dev->flags & KBC_TYPE_MASK) >= KBC_TYPE_PS2_1) ? 2 : 1; -#else max_ports = 2; -#endif for (int i = 0; i < max_ports; i++) { kbc_at_ports[i] = (kbc_at_port_t *) calloc(1, sizeof(kbc_at_port_t)); @@ -2668,7 +3035,15 @@ kbc_at_init(const device_t *info) dev->ports[1] = kbc_at_ports[1]; /* The actual keyboard. */ - device_add(&keyboard_at_generic_device); + if (keyboard_type == KEYBOARD_TYPE_INTERNAL) { + if (machine_has_flags(machine, MACHINE_KEYBOARD_JIS)) + device_add(machine_has_flags_ex(MACHINE_PS2_KBC) ? &keyboard_ps55_device : + &keyboard_ax_device); + else + device_add_params(&keyboard_at_generic_device, (void *) (uintptr_t) + (machine_has_flags_ex(MACHINE_PS2_KBC) ? FLAG_PS2_KBD : 0x00)); + } else + keyboard_add_device(); fast_reset = 0x00; @@ -2677,389 +3052,11 @@ kbc_at_init(const device_t *info) return dev; } -const device_t keyboard_at_device = { - .name = "PC/AT Keyboard", - .internal_name = "keyboard_at", +const device_t kbc_at_device = { + .name = "PC/AT Keyboard Controller", + .internal_name = "kbc_at", .flags = DEVICE_KBC, - .local = KBC_TYPE_ISA | KBC_VEN_GENERIC, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_at_siemens_device = { - .name = "PC/AT Keyboard", - .internal_name = "keyboard_at", - .flags = DEVICE_KBC, - .local = KBC_TYPE_ISA | KBC_VEN_SIEMENS, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_at_ami_device = { - .name = "PC/AT Keyboard (AMI)", - .internal_name = "keyboard_at_ami", - .flags = DEVICE_KBC, - .local = KBC_TYPE_ISA | KBC_VEN_AMI, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_at_tg_ami_device = { - .name = "PC/AT Keyboard (TriGem AMI)", - .internal_name = "keyboard_at_tg_ami", - .flags = DEVICE_KBC, - .local = KBC_TYPE_ISA | KBC_VEN_TRIGEM_AMI, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_at_toshiba_device = { - .name = "PC/AT Keyboard (Toshiba)", - .internal_name = "keyboard_at_toshiba", - .flags = DEVICE_KBC, - .local = KBC_TYPE_ISA | KBC_VEN_TOSHIBA, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_at_olivetti_device = { - .name = "PC/AT Keyboard (Olivetti)", - .internal_name = "keyboard_at_olivetti", - .flags = DEVICE_KBC, - .local = KBC_TYPE_ISA | KBC_VEN_OLIVETTI, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_at_ncr_device = { - .name = "PC/AT Keyboard (NCR)", - .internal_name = "keyboard_at_ncr", - .flags = DEVICE_KBC, - .local = KBC_TYPE_ISA | KBC_VEN_NCR, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_at_compaq_device = { - .name = "PC/AT Keyboard (Compaq)", - .internal_name = "keyboard_at_compaq", - .flags = DEVICE_KBC, - .local = KBC_TYPE_ISA | KBC_VEN_COMPAQ, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_at_phoenix_device = { - .name = "PC/AT Keyboard (Phoenix)", - .internal_name = "keyboard_at_phoenix", - .flags = DEVICE_KBC, - .local = KBC_TYPE_ISA | KBC_VEN_PHOENIX, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_device = { - .name = "PS/2 Keyboard", - .internal_name = "keyboard_ps2", - .flags = DEVICE_KBC, - .local = KBC_TYPE_PS2_1 | KBC_VEN_GENERIC, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_ps1_device = { - .name = "PS/2 Keyboard (IBM PS/1)", - .internal_name = "keyboard_ps2_ps1", - .flags = DEVICE_KBC, - .local = KBC_TYPE_PS2_1 | KBC_VEN_IBM_PS1, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_ps1_pci_device = { - .name = "PS/2 Keyboard (IBM PS/1)", - .internal_name = "keyboard_ps2_ps1_pci", - .flags = DEVICE_KBC | DEVICE_PCI, - .local = KBC_TYPE_PS2_1 | KBC_VEN_IBM_PS1, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_xi8088_device = { - .name = "PS/2 Keyboard (Xi8088)", - .internal_name = "keyboard_ps2_xi8088", - .flags = DEVICE_KBC, - .local = KBC_TYPE_PS2_1 | KBC_VEN_GENERIC, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_ami_device = { - .name = "PS/2 Keyboard (AMI)", - .internal_name = "keyboard_ps2_ami", - .flags = DEVICE_KBC, - .local = KBC_TYPE_PS2_1 | KBC_VEN_AMI, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_compaq_device = { - .name = "PS/2 Keyboard (Compaq)", - .internal_name = "keyboard_at_compaq", - .flags = DEVICE_KBC, - .local = KBC_TYPE_PS2_1 | KBC_VEN_COMPAQ, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_holtek_device = { - .name = "PS/2 Keyboard (Holtek)", - .internal_name = "keyboard_ps2_holtek", - .flags = DEVICE_KBC, - .local = KBC_TYPE_PS2_1 | KBC_VEN_AMI | KBC_FLAG_IS_ASIC, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_phoenix_device = { - .name = "PS/2 Keyboard (Phoenix)", - .internal_name = "keyboard_ps2_phoenix", - .flags = DEVICE_KBC, - .local = KBC_TYPE_PS2_1 | KBC_VEN_PHOENIX, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_tg_ami_device = { - .name = "PS/2 Keyboard (TriGem AMI)", - .internal_name = "keyboard_ps2_tg_ami", - .flags = DEVICE_KBC, - .local = KBC_TYPE_PS2_1 | KBC_VEN_TRIGEM_AMI, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_mca_1_device = { - .name = "PS/2 Keyboard (IBM PS/2 MCA Type 1)", - .internal_name = "keyboard_ps2_mca_1", - .flags = DEVICE_KBC, - .local = KBC_TYPE_PS2_1 | KBC_VEN_IBM, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_mca_2_device = { - .name = "PS/2 Keyboard (IBM PS/2 MCA Type 2)", - .internal_name = "keyboard_ps2_mca_2", - .flags = DEVICE_KBC, - .local = KBC_TYPE_PS2_2 | KBC_VEN_IBM, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_quadtel_device = { - .name = "PS/2 Keyboard (Quadtel/MegaPC)", - .internal_name = "keyboard_ps2_quadtel", - .flags = DEVICE_KBC, - .local = KBC_TYPE_PS2_1 | KBC_VEN_QUADTEL, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_pci_device = { - .name = "PS/2 Keyboard", - .internal_name = "keyboard_ps2_pci", - .flags = DEVICE_KBC | DEVICE_PCI, - .local = KBC_TYPE_PS2_1 | KBC_VEN_GENERIC, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_ami_pci_device = { - .name = "PS/2 Keyboard (AMI)", - .internal_name = "keyboard_ps2_ami_pci", - .flags = DEVICE_KBC | DEVICE_PCI, - .local = KBC_TYPE_PS2_1 | KBC_VEN_AMI, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_ali_pci_device = { - .name = "PS/2 Keyboard (ALi M5123/M1543C)", - .internal_name = "keyboard_ps2_ali_pci", - .flags = DEVICE_KBC | DEVICE_PCI, - .local = KBC_TYPE_PS2_1 | KBC_VEN_ALI, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_intel_ami_pci_device = { - .name = "PS/2 Keyboard (AMI)", - .internal_name = "keyboard_ps2_intel_ami_pci", - .flags = DEVICE_KBC | DEVICE_PCI, - .local = KBC_TYPE_GREEN | KBC_VEN_AMI, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_tg_ami_pci_device = { - .name = "PS/2 Keyboard (TriGem AMI)", - .internal_name = "keyboard_ps2_tg_ami_pci", - .flags = DEVICE_KBC | DEVICE_PCI, - .local = KBC_TYPE_PS2_1 | KBC_VEN_TRIGEM_AMI, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_acer_pci_device = { - .name = "PS/2 Keyboard (Acer 90M002A)", - .internal_name = "keyboard_ps2_acer_pci", - .flags = DEVICE_KBC | DEVICE_PCI, - .local = KBC_TYPE_PS2_1 | KBC_VEN_ACER, - .init = kbc_at_init, - .close = kbc_at_close, - .reset = kbc_at_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_ps2_phoenix_pci_device = { - .name = "PS/2 Keyboard (Phoenix)", - .internal_name = "keyboard_ps2_phoenix_pci", - .flags = DEVICE_KBC | DEVICE_PCI, - .local = KBC_TYPE_PS2_1 | KBC_VEN_PHOENIX, + .local = KBC_VEN_GENERIC, .init = kbc_at_init, .close = kbc_at_close, .reset = kbc_at_reset, diff --git a/src/device/kbc_at_dev.c b/src/device/kbc_at_dev.c index b20e38860..81ab0aee9 100644 --- a/src/device/kbc_at_dev.c +++ b/src/device/kbc_at_dev.c @@ -8,11 +8,9 @@ * * AT / PS/2 attached device emulation. * - * - * * Authors: Miran Grca, * - * Copyright 2023 Miran Grca. + * Copyright 2023-2025 Miran Grca. */ #include #include @@ -22,23 +20,9 @@ #define HAVE_STDARG_H #include #include <86box/86box.h> -#include "cpu.h" -#include <86box/timer.h> -#include <86box/io.h> -#include <86box/pic.h> -#include <86box/pit.h> -#include <86box/ppi.h> -#include <86box/mem.h> #include <86box/device.h> -#include <86box/machine.h> -#include <86box/m_at_t3100e.h> -#include <86box/fdd.h> -#include <86box/fdc.h> -#include <86box/sound.h> -#include <86box/snd_speaker.h> -#include <86box/video.h> -#include <86box/keyboard.h> #include <86box/plat_fallthrough.h> +#include <86box/keyboard.h> #ifdef ENABLE_KBC_AT_DEV_LOG int kbc_at_dev_do_log = ENABLE_KBC_AT_DEV_LOG; diff --git a/src/device/kbc_xt.c b/src/device/kbc_xt.c new file mode 100644 index 000000000..176f1df43 --- /dev/null +++ b/src/device/kbc_xt.c @@ -0,0 +1,903 @@ +/* + * 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. + * + * Implementation of the XT-style keyboard. + * + * + * + * Authors: Sarah Walker, + * Miran Grca, + * Fred N. van Kempen, + * EngiNerd, + * + * Copyright 2008-2019 Sarah Walker. + * Copyright 2016-2019 Miran Grca. + * Copyright 2017-2019 Fred N. van kempen. + * Copyright 2020 EngiNerd. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include +#include <86box/86box.h> +#include <86box/device.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/fdd.h> +#include <86box/machine.h> +#include <86box/m_xt_t1000.h> +#include <86box/cassette.h> +#include <86box/io.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/ppi.h> +#include <86box/mem.h> +#include <86box/rom.h> +#include <86box/sound.h> +#include <86box/snd_speaker.h> +#include <86box/video.h> +#include <86box/keyboard.h> + +#define STAT_PARITY 0x80 +#define STAT_RTIMEOUT 0x40 +#define STAT_TTIMEOUT 0x20 +#define STAT_LOCK 0x10 +#define STAT_CD 0x08 +#define STAT_SYSFLAG 0x04 +#define STAT_IFULL 0x02 +#define STAT_OFULL 0x01 + +/* Keyboard Types */ +enum { + KBD_TYPE_PC81 = 0, + KBD_TYPE_PC82, + KBD_TYPE_XT82, + KBD_TYPE_XT86, + KBD_TYPE_COMPAQ, + KBD_TYPE_TANDY, + KBD_TYPE_TOSHIBA, + KBD_TYPE_VTECH, + KBD_TYPE_OLIVETTI, + KBD_TYPE_ZENITH, + KBD_TYPE_PRAVETZ, + KBD_TYPE_HYUNDAI, + KBD_TYPE_FE2010, + KBD_TYPE_XTCLONE +}; + +typedef struct xtkbd_t { + int want_irq; + int blocked; + int tandy; + + uint8_t pa; + uint8_t pb; + uint8_t pd; + uint8_t cfg; + uint8_t clock; + uint8_t key_waiting; + uint8_t type; + uint8_t pravetz_flags; + uint8_t cpu_speed; + + pc_timer_t send_delay_timer; +} xtkbd_t; + +static uint8_t key_queue[16]; +static int key_queue_start = 0; +static int key_queue_end = 0; +static int is_tandy = 0; +static int is_t1x00 = 0; +static int is_amstrad = 0; + +#ifdef ENABLE_KEYBOARD_XT_LOG +int keyboard_xt_do_log = ENABLE_KEYBOARD_XT_LOG; + +static void +kbd_log(const char *fmt, ...) +{ + va_list ap; + + if (keyboard_xt_do_log) { + va_start(ap, fmt); + pclog_ex(fmt, ap); + va_end(ap); + } +} +#else +# define kbd_log(fmt, ...) +#endif + +static uint8_t +get_fdd_switch_settings(void) +{ + + uint8_t fdd_count = 0; + + for (uint8_t i = 0; i < FDD_NUM; i++) { + if (fdd_get_flags(i)) + fdd_count++; + } + + if (!fdd_count) + return 0x00; + else + return ((fdd_count - 1) << 6) | 0x01; +} + +static uint8_t +get_videomode_switch_settings(void) +{ + + if (video_is_mda()) + return 0x30; + else if (video_is_cga()) + return 0x20; /* 0x10 would be 40x25 */ + else + return 0x00; +} + +static void +kbd_poll(void *priv) +{ + xtkbd_t *kbd = (xtkbd_t *) priv; + + timer_advance_u64(&kbd->send_delay_timer, 1000 * TIMER_USEC); + + if (!(kbd->pb & 0x40) && (kbd->type != KBD_TYPE_TANDY)) + return; + + if (kbd->want_irq) { + kbd->want_irq = 0; + kbd->pa = kbd->key_waiting; + kbd->blocked = 1; + picint(2); +#ifdef ENABLE_KEYBOARD_XT_LOG + kbd_log("XTkbd: kbd_poll(): keyboard_xt : take IRQ\n"); +#endif + } + + if ((key_queue_start != key_queue_end) && !kbd->blocked) { + kbd->key_waiting = key_queue[key_queue_start]; + kbd_log("XTkbd: reading %02X from the key queue at %i\n", + kbd->key_waiting, key_queue_start); + key_queue_start = (key_queue_start + 1) & 0x0f; + kbd->want_irq = 1; + } +} + +static void +kbd_adddata(uint16_t val) +{ + /* Test for T1000 'Fn' key (Right Alt / Right Ctrl) */ + if (is_t1x00) { + if (keyboard_recv(0x138) || keyboard_recv(0x11d)) { /* 'Fn' pressed */ + t1000_syskey(0x00, 0x04, 0x00); /* Set 'Fn' indicator */ + switch (val) { + case 0x45: /* Num Lock => toggle numpad */ + t1000_syskey(0x00, 0x00, 0x10); + break; + case 0x47: /* Home => internal display */ + t1000_syskey(0x40, 0x00, 0x00); + break; + case 0x49: /* PgDn => turbo on */ + t1000_syskey(0x80, 0x00, 0x00); + break; + case 0x4D: /* Right => toggle LCD font */ + t1000_syskey(0x00, 0x00, 0x20); + break; + case 0x4F: /* End => external display */ + t1000_syskey(0x00, 0x40, 0x00); + break; + case 0x51: /* PgDn => turbo off */ + t1000_syskey(0x00, 0x80, 0x00); + break; + case 0x54: /* SysRQ => toggle window */ + t1000_syskey(0x00, 0x00, 0x08); + break; + + default: + break; + } + } else + t1000_syskey(0x04, 0x00, 0x00); /* Reset 'Fn' indicator */ + } + + key_queue[key_queue_end] = val; + kbd_log("XTkbd: %02X added to key queue at %i\n", + val, key_queue_end); + key_queue_end = (key_queue_end + 1) & 0x0f; +} + +void +kbd_adddata_process(uint16_t val, void (*adddata)(uint16_t val)) +{ + uint8_t num_lock = 0; + uint8_t shift_states = 0; + + if (!adddata) + return; + + keyboard_get_states(NULL, &num_lock, NULL, NULL); + shift_states = keyboard_get_shift() & STATE_LSHIFT; + + if (is_amstrad) + num_lock = !num_lock; + + /* If NumLock is on, invert the left shift state so we can always check for + the the same way flag being set (and with NumLock on that then means it + is actually *NOT* set). */ + if (num_lock) + shift_states ^= STATE_LSHIFT; + + switch (val) { + case FAKE_LSHIFT_ON: + /* If NumLock is on, fake shifts are sent when shift is *NOT* presed, + if NumLock is off, fake shifts are sent when shift is pressed. */ + if (shift_states) { + /* Send fake shift. */ + adddata(num_lock ? 0x2a : 0xaa); + } + break; + case FAKE_LSHIFT_OFF: + if (shift_states) { + /* Send fake shift. */ + adddata(num_lock ? 0xaa : 0x2a); + } + break; + default: + adddata(val); + break; + } +} + +static void +kbd_adddata_ex(uint16_t val) +{ + kbd_adddata_process(val, kbd_adddata); +} + +static void +kbd_write(uint16_t port, uint8_t val, void *priv) +{ + xtkbd_t *kbd = (xtkbd_t *) priv; + uint8_t bit; + uint8_t set; + uint8_t new_clock; + + switch (port) { + case 0x61: /* Keyboard Control Register (aka Port B) */ + if (!(val & 0x80) || (kbd->type == KBD_TYPE_HYUNDAI)) { + new_clock = !!(val & 0x40); + if (!kbd->clock && new_clock) { + key_queue_start = key_queue_end = 0; + kbd->want_irq = 0; + kbd->blocked = 0; + kbd_adddata(0xaa); + } + } + + kbd->pb = val; + if (!(kbd->pb & 0x80) || (kbd->type == KBD_TYPE_HYUNDAI)) + kbd->clock = !!(kbd->pb & 0x40); + ppi.pb = val; + + timer_process(); + + if (((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || + (kbd->type == KBD_TYPE_PRAVETZ)) && (cassette != NULL)) + pc_cas_set_motor(cassette, (kbd->pb & 0x08) == 0); + + speaker_update(); + + speaker_gated = val & 1; + speaker_enable = val & 2; + + if (speaker_enable) + was_speaker_enable = 1; + pit_devs[0].set_gate(pit_devs[0].data, 2, val & 1); + + if (val & 0x80) { + kbd->pa = 0; + kbd->blocked = 0; + picintc(2); + } + +#ifdef ENABLE_KEYBOARD_XT_LOG + if ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || (kbd->type == KBD_TYPE_PRAVETZ)) + kbd_log("XTkbd: Cassette motor is %s\n", !(val & 0x08) ? "ON" : "OFF"); +#endif + break; + + case 0x62: /* Switch Register (aka Port C) */ +#ifdef ENABLE_KEYBOARD_XT_LOG + if ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || (kbd->type == KBD_TYPE_PRAVETZ)) + kbd_log("XTkbd: Cassette IN is %i\n", !!(val & 0x10)); +#endif + if (kbd->type == KBD_TYPE_FE2010) { + kbd_log("XTkbd: Switch register in is %02X\n", val); + if (!(kbd->cfg & 0x08)) + kbd->pd = (kbd->pd & 0x30) | (val & 0xcf); + } + break; + + case 0x63: + if (kbd->type == KBD_TYPE_FE2010) { + kbd_log("XTkbd: Configuration register in is %02X\n", val); + if (!(kbd->cfg & 0x08)) + kbd->cfg = val; + } + break; + + case 0xc0 ... 0xcf: /* Pravetz Flags */ + kbd_log("XTkbd: Port %02X out: %02X\n", port, val); + if (kbd->type == KBD_TYPE_PRAVETZ) { + bit = (port >> 1) & 0x07; + set = (port & 0x01) << bit; + kbd->pravetz_flags = (kbd->pravetz_flags & ~(1 << bit)) | set; + } + break; + + case 0x1f0: + kbd_log("XTkbd: Port %04X out: %02X\n", port, val); + if (kbd->type == KBD_TYPE_VTECH) { + kbd->cpu_speed = val; + cpu_dynamic_switch(kbd->cpu_speed >> 7); + } + break; + + default: + break; + } +} + +static uint8_t +kbd_read(uint16_t port, void *priv) +{ + const xtkbd_t *kbd = (xtkbd_t *) priv; + uint8_t ret = 0xff; + + switch (port) { + case 0x60: /* Keyboard Data Register (aka Port A) */ + if ((kbd->pb & 0x80) && ((kbd->type == KBD_TYPE_PC81) || + (kbd->type == KBD_TYPE_PC82) || (kbd->type == KBD_TYPE_PRAVETZ) || + (kbd->type == KBD_TYPE_XT82) || (kbd->type == KBD_TYPE_XT86) || + (kbd->type == KBD_TYPE_XTCLONE) || (kbd->type == KBD_TYPE_COMPAQ) || + (kbd->type == KBD_TYPE_ZENITH) || (kbd->type == KBD_TYPE_HYUNDAI) || + (kbd->type == KBD_TYPE_VTECH))) { + if ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || + (kbd->type == KBD_TYPE_XTCLONE) || (kbd->type == KBD_TYPE_COMPAQ) || + (kbd->type == KBD_TYPE_PRAVETZ) || (kbd->type == KBD_TYPE_HYUNDAI)) + ret = (kbd->pd & ~0x02) | (hasfpu ? 0x02 : 0x00); + else if ((kbd->type == KBD_TYPE_XT82) || (kbd->type == KBD_TYPE_XT86) || + (kbd->type == KBD_TYPE_VTECH)) + /* According to Ruud on the PCem forum, this is supposed to + return 0xFF on the XT. */ + ret = 0xff; + else if (kbd->type == KBD_TYPE_ZENITH) { + /* Zenith Data Systems Z-151 + * SW1 switch settings: + * bits 6-7: floppy drive number + * bits 4-5: video mode + * bit 2-3: base memory size + * bit 1: fpu enable + * bit 0: fdc enable + */ + ret = get_fdd_switch_settings(); + + ret |= get_videomode_switch_settings(); + + /* Base memory size should always be 64k */ + ret |= 0x0c; + + if (hasfpu) + ret |= 0x02; + } + } else + ret = kbd->pa; + break; + + case 0x61: /* Keyboard Control Register (aka Port B) */ + ret = kbd->pb; + break; + + case 0x62: /* Switch Register (aka Port C) */ + if (kbd->type == KBD_TYPE_FE2010) { + if (kbd->pb & 0x04) /* PB2 */ + ret = (kbd->pd & 0x0d) | (hasfpu ? 0x02 : 0x00); + else + ret = kbd->pd >> 4; + } else if ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || + (kbd->type == KBD_TYPE_PRAVETZ)) { + if (kbd->pb & 0x04) /* PB2 */ + switch (mem_size + isa_mem_size) { + case 64: + case 48: + case 32: + case 16: + ret = 0x00; + break; + default: + ret = (((mem_size + isa_mem_size) - 64) / 32) & 0x0f; + break; + } + else + ret = (((mem_size + isa_mem_size) - 64) / 32) >> 4; + } else if ((kbd->type == KBD_TYPE_OLIVETTI) || + (kbd->type == KBD_TYPE_ZENITH)) { + /* Olivetti M19 or Zenith Data Systems Z-151 */ + if (kbd->pb & 0x04) /* PB2 */ + ret = kbd->pd & 0xbf; + else + ret = kbd->pd >> 4; + } else { + if (kbd->pb & 0x08) /* PB3 */ + ret = kbd->pd >> 4; + else + ret = (kbd->pd & 0x0d) | (hasfpu ? 0x02 : 0x00); + } + ret |= (ppispeakon ? 0x20 : 0); + + /* This is needed to avoid error 131 (cassette error). + This is serial read: bit 5 = clock, bit 4 = data, cassette header is 256 x 0xff. */ + if ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || + (kbd->type == KBD_TYPE_PRAVETZ)) { + if (cassette == NULL) + ret |= (ppispeakon ? 0x10 : 0); + else + ret |= (pc_cas_get_inp(cassette) ? 0x10 : 0); + } + + if (kbd->type == KBD_TYPE_TANDY) + ret |= (tandy1k_eeprom_read() ? 0x10 : 0); + break; + + case 0x63: /* Keyboard Configuration Register (aka Port D) */ + if ((kbd->type == KBD_TYPE_XT82) || (kbd->type == KBD_TYPE_XT86) || + (kbd->type == KBD_TYPE_XTCLONE) || (kbd->type == KBD_TYPE_COMPAQ) || + (kbd->type == KBD_TYPE_TOSHIBA) || (kbd->type == KBD_TYPE_HYUNDAI) || + (kbd->type == KBD_TYPE_VTECH)) + ret = kbd->pd; + break; + + case 0xc0: /* Pravetz Flags */ + if (kbd->type == KBD_TYPE_PRAVETZ) + ret = kbd->pravetz_flags; + kbd_log("XTkbd: Port %02X in : %02X\n", port, ret); + break; + + case 0x1f0: + if (kbd->type == KBD_TYPE_VTECH) + ret = kbd->cpu_speed; + kbd_log("XTkbd: Port %04X in : %02X\n", port, ret); + break; + + default: + break; + } + + return ret; +} + +static void +kbd_reset(void *priv) +{ + xtkbd_t *kbd = (xtkbd_t *) priv; + + kbd->want_irq = 0; + kbd->blocked = 0; + kbd->pa = 0x00; + kbd->pb = 0x00; + kbd->pravetz_flags = 0x00; + + keyboard_scan = 1; + + key_queue_start = 0; + key_queue_end = 0; +} + +void +keyboard_set_is_amstrad(int ams) +{ + is_amstrad = ams; +} + +static void * +kbd_init(const device_t *info) +{ + xtkbd_t *kbd; + + kbd = (xtkbd_t *) calloc(1, sizeof(xtkbd_t)); + + io_sethandler(0x0060, 4, + kbd_read, NULL, NULL, kbd_write, NULL, NULL, kbd); + keyboard_send = kbd_adddata_ex; + kbd->type = info->local; + if (kbd->type == KBD_TYPE_VTECH) + kbd->cpu_speed = (!!cpu) << 2; + kbd_reset(kbd); + if (kbd->type == KBD_TYPE_PRAVETZ) + io_sethandler(0x00c0, 16, + kbd_read, NULL, NULL, kbd_write, NULL, NULL, kbd); + if (kbd->type == KBD_TYPE_VTECH) + io_sethandler(0x01f0, 1, + kbd_read, NULL, NULL, kbd_write, NULL, NULL, kbd); + + key_queue_start = key_queue_end = 0; + + video_reset(gfxcard[0]); + + if ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || + (kbd->type == KBD_TYPE_PRAVETZ) || (kbd->type == KBD_TYPE_XT82) || + (kbd->type <= KBD_TYPE_XT86) || (kbd->type == KBD_TYPE_XTCLONE) || + (kbd->type == KBD_TYPE_COMPAQ) || (kbd->type == KBD_TYPE_TOSHIBA) || + (kbd->type == KBD_TYPE_OLIVETTI) || (kbd->type == KBD_TYPE_HYUNDAI) || + (kbd->type == KBD_TYPE_VTECH) || (kbd->type == KBD_TYPE_FE2010)) { + /* DIP switch readout: bit set = OFF, clear = ON. */ + if (kbd->type == KBD_TYPE_OLIVETTI) + /* Olivetti M19 + * Jumpers J1, J2 - monitor type. + * 01 - mono (high-res) + * 10 - color (low-res, disables 640x400x2 mode) + * 00 - autoswitching + */ + kbd->pd |= 0x00; + else + /* Switches 7, 8 - floppy drives. */ + kbd->pd = get_fdd_switch_settings(); + + /* Switches 5, 6 - video card type */ + kbd->pd |= get_videomode_switch_settings(); + + /* Switches 3, 4 - memory size. */ + if ((kbd->type == KBD_TYPE_XT86) || (kbd->type == KBD_TYPE_XTCLONE) || + (kbd->type == KBD_TYPE_HYUNDAI) || (kbd->type == KBD_TYPE_COMPAQ) || + (kbd->type == KBD_TYPE_TOSHIBA) || (kbd->type == KBD_TYPE_FE2010)) { + switch (mem_size) { + case 256: + kbd->pd |= 0x00; + break; + case 512: + kbd->pd |= 0x04; + break; + case 576: + kbd->pd |= 0x08; + break; + case 640: + default: + kbd->pd |= 0x0c; + break; + } + } else if ((kbd->type == KBD_TYPE_XT82) || (kbd->type == KBD_TYPE_VTECH)) { + switch (mem_size) { + case 64: /* 1x64k */ + kbd->pd |= 0x00; + break; + case 128: /* 2x64k */ + kbd->pd |= 0x04; + break; + case 192: /* 3x64k */ + kbd->pd |= 0x08; + break; + case 256: /* 4x64k */ + default: + kbd->pd |= 0x0c; + break; + } + } else if (kbd->type == KBD_TYPE_PC82) { + switch (mem_size) { +#ifdef PC82_192K_3BANK + case 192: /* 3x64k, not supported by stock BIOS due to bugs */ + kbd->pd |= 0x08; + break; +#else + case 192: /* 2x64k + 2x32k */ +#endif + case 64: /* 4x16k */ + case 96: /* 2x32k + 2x16k */ + case 128: /* 4x32k */ + case 160: /* 2x64k + 2x16k */ + case 224: /* 3x64k + 1x32k */ + case 256: /* 4x64k */ + default: + kbd->pd |= 0x0c; + break; + } + } else { /* really just the PC '81 */ + switch (mem_size) { + case 16: /* 1x16k */ + kbd->pd |= 0x00; + break; + case 32: /* 2x16k */ + kbd->pd |= 0x04; + break; + case 48: /* 3x16k */ + kbd->pd |= 0x08; + break; + case 64: /* 4x16k */ + default: + kbd->pd |= 0x0c; + break; + } + } + + /* Switch 2 - 8087 FPU. */ + if (hasfpu) + kbd->pd |= 0x02; + } else if (kbd->type == KBD_TYPE_ZENITH) { + /* Zenith Data Systems Z-151 + * SW2 switch settings: + * bit 7: monitor frequency + * bits 5-6: autoboot (00-11 resident monitor, 10 hdd, 01 fdd) + * bits 0-4: installed memory + */ + kbd->pd = 0x20; + switch (mem_size) { + case 128: + kbd->pd |= 0x02; + break; + case 192: + kbd->pd |= 0x04; + break; + case 256: + kbd->pd |= 0x06; + break; + case 320: + kbd->pd |= 0x08; + break; + case 384: + kbd->pd |= 0x0a; + break; + case 448: + kbd->pd |= 0x0c; + break; + case 512: + kbd->pd |= 0x0e; + break; + case 576: + kbd->pd |= 0x10; + break; + case 640: + default: + kbd->pd |= 0x12; + break; + } + } + + timer_add(&kbd->send_delay_timer, kbd_poll, kbd, 1); + + is_tandy = (kbd->type == KBD_TYPE_TANDY); + is_t1x00 = (kbd->type == KBD_TYPE_TOSHIBA); + + if (keyboard_type == KEYBOARD_TYPE_INTERNAL) + keyboard_set_table(scancode_xt); + else + keyboard_add_device(); + + is_amstrad = 0; + + return kbd; +} + +static void +kbd_close(void *priv) +{ + xtkbd_t *kbd = (xtkbd_t *) priv; + + /* Stop the timer. */ + timer_disable(&kbd->send_delay_timer); + + /* Disable scanning. */ + keyboard_scan = 0; + + keyboard_send = NULL; + + io_removehandler(0x0060, 4, + kbd_read, NULL, NULL, kbd_write, NULL, NULL, kbd); + + free(kbd); +} + +const device_t kbc_pc_device = { + .name = "IBM PC Keyboard Controller (1981)", + .internal_name = "kbc_pc", + .flags = 0, + .local = KBD_TYPE_PC81, + .init = kbd_init, + .close = kbd_close, + .reset = kbd_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t kbc_pc82_device = { + .name = "IBM PC Keyboard Controller (1982)", + .internal_name = "kbc_pc82", + .flags = 0, + .local = KBD_TYPE_PC82, + .init = kbd_init, + .close = kbd_close, + .reset = kbd_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t kbc_pravetz_device = { + .name = "Pravetz Keyboard Controller", + .internal_name = "kbc_pravetz", + .flags = 0, + .local = KBD_TYPE_PRAVETZ, + .init = kbd_init, + .close = kbd_close, + .reset = kbd_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t kbc_xt_device = { + .name = "XT (1982) Keyboard Controller", + .internal_name = "kbc_xt", + .flags = 0, + .local = KBD_TYPE_XT82, + .init = kbd_init, + .close = kbd_close, + .reset = kbd_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t kbc_xt86_device = { + .name = "XT (1986) Keyboard Controller", + .internal_name = "kbc_xt86", + .flags = 0, + .local = KBD_TYPE_XT86, + .init = kbd_init, + .close = kbd_close, + .reset = kbd_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t kbc_xt_compaq_device = { + .name = "Compaq Portable Keyboard Controller", + .internal_name = "kbc_xt_compaq", + .flags = 0, + .local = KBD_TYPE_COMPAQ, + .init = kbd_init, + .close = kbd_close, + .reset = kbd_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t kbc_tandy_device = { + .name = "Tandy 1000 Keyboard Controller", + .internal_name = "kbc_tandy", + .flags = 0, + .local = KBD_TYPE_TANDY, + .init = kbd_init, + .close = kbd_close, + .reset = kbd_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t kbc_xt_t1x00_device = { + .name = "Toshiba T1x00 Keyboard Controller", + .internal_name = "kbc_xt_t1x00", + .flags = 0, + .local = KBD_TYPE_TOSHIBA, + .init = kbd_init, + .close = kbd_close, + .reset = kbd_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t kbc_xt_lxt3_device = { + .name = "VTech Laser Turbo XT Keyboard Controller", + .internal_name = "kbc_xt_lxt", + .flags = 0, + .local = KBD_TYPE_VTECH, + .init = kbd_init, + .close = kbd_close, + .reset = kbd_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t kbc_xt_olivetti_device = { + .name = "Olivetti XT Keyboard Controller", + .internal_name = "kbc_xt_olivetti", + .flags = 0, + .local = KBD_TYPE_OLIVETTI, + .init = kbd_init, + .close = kbd_close, + .reset = kbd_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t kbc_xt_zenith_device = { + .name = "Zenith XT Keyboard Controller", + .internal_name = "kbc_xt_zenith", + .flags = 0, + .local = KBD_TYPE_ZENITH, + .init = kbd_init, + .close = kbd_close, + .reset = kbd_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t kbc_xt_hyundai_device = { + .name = "Hyundai XT Keyboard Controller", + .internal_name = "kbc_xt_hyundai", + .flags = 0, + .local = KBD_TYPE_HYUNDAI, + .init = kbd_init, + .close = kbd_close, + .reset = kbd_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t kbc_xt_fe2010_device = { + .name = "Faraday FE2010 XT Keyboard Controller", + .internal_name = "kbc_xt_fe2010", + .flags = 0, + .local = KBD_TYPE_FE2010, + .init = kbd_init, + .close = kbd_close, + .reset = kbd_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t kbc_xtclone_device = { + .name = "XT (Clone) Keyboard Controller", + .internal_name = "kbc_xtclone", + .flags = 0, + .local = KBD_TYPE_XTCLONE, + .init = kbd_init, + .close = kbd_close, + .reset = kbd_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/device/keyboard.c b/src/device/keyboard.c index 16904fe3b..0acc93505 100644 --- a/src/device/keyboard.c +++ b/src/device/keyboard.c @@ -27,6 +27,7 @@ #define HAVE_STDARG_H #include <86box/86box.h> #include <86box/machine.h> +#include <86box/device.h> #include <86box/keyboard.h> #include <86box/plat.h> @@ -36,6 +37,38 @@ uint16_t scancode_map[768] = { 0 }; int keyboard_scan; +typedef struct keyboard_t { + const device_t *device; +} keyboard_t; + +int keyboard_type = 0; + +static const device_t keyboard_internal_device = { + .name = "Internal", + .internal_name = "internal", + .flags = 0, + .local = KEYBOARD_TYPE_INTERNAL, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +static keyboard_t keyboard_devices[] = { + // clang-format off + { &keyboard_internal_device }, + { &keyboard_pc_xt_device }, + { &keyboard_at_device }, + { &keyboard_ax_device }, + { &keyboard_ps2_device }, + { &keyboard_ps55_device }, + { NULL } + // clang-format on +}; + #ifdef ENABLE_KBC_AT_LOG int kbc_at_do_log = ENABLE_KBC_AT_LOG; @@ -516,3 +549,57 @@ convert_scan_code(uint16_t scan_code) return scan_code; } + +const char * +keyboard_get_name(int keyboard) +{ + return (keyboard_devices[keyboard].device->name); +} + +const char * +keyboard_get_internal_name(int keyboard) +{ + return device_get_internal_name(keyboard_devices[keyboard].device); +} + +int +keyboard_get_from_internal_name(char *s) +{ + int c = 0; + + while (keyboard_devices[c].device != NULL) { + if (!strcmp((char *) keyboard_devices[c].device->internal_name, s)) + return c; + c++; + } + + return 0; +} + +int +keyboard_has_config(int keyboard) +{ + if (keyboard_devices[keyboard].device == NULL) + return 0; + + return (keyboard_devices[keyboard].device->config ? 1 : 0); +} + +const device_t * +keyboard_get_device(int keyboard) +{ + return (keyboard_devices[keyboard].device); +} + +/* Return number of MOUSE types we know about. */ +int +keyboard_get_ndev(void) +{ + return ((sizeof(keyboard_devices) / sizeof(keyboard_t)) - 1); +} + +void +keyboard_add_device(void) +{ + device_add(keyboard_devices[keyboard_type].device); +} diff --git a/src/device/keyboard_at.c b/src/device/keyboard_at.c index 7fa2b9706..d6fdaf4b7 100644 --- a/src/device/keyboard_at.c +++ b/src/device/keyboard_at.c @@ -27,41 +27,37 @@ #include <86box/mouse.h> #include <86box/machine.h> -#define FLAG_PS2 0x08 /* dev is AT or PS/2 */ -#define FLAG_AT 0x00 /* dev is AT or PS/2 */ -#define FLAG_TYPE_MASK 0x07 /* mask for type */ - #define FIFO_SIZE 16 #define BAT_COUNT 1000 -enum { - KBD_84_KEY = 0, - KBD_101_KEY, - KBD_102_KEY, - KBD_JIS, - KBD_KOREAN -}; - #define FLAG_ENABLED 0x10 /* dev is enabled for use */ #define FLAG_CTRLDAT 0x08 /* ctrl or data mode */ -const uint8_t id_bytes[16][4] = { { 0x00, 0x00, 0x00, 0x00 }, /* AT 84-key */ - { 0x00, 0x00, 0x00, 0x00 }, /* AT 101/102/106-key */ +const uint8_t id_bytes[24][4] = { { 0x00, 0x00, 0x00, 0x00 }, /* XT 83-key */ + { 0x00, 0x00, 0x00, 0x00 }, /* AT 84-key */ + { 0xab, 0x83, 0x00, 0x00 }, /* XT/AT 101-key */ + { 0xab, 0x83, 0x00, 0x00 }, /* XT/AT 101-key */ + { 0xab, 0x90, 0x00, 0x00 }, /* XT/AT 106-key JIS */ + { 0xab, 0x90, 0x00, 0x00 }, /* AT KSC */ + { 0xab, 0x83, 0x00, 0x00 }, /* AT ABNT2 */ { 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00 }, /* AT Korean */ + { 0x00, 0x00, 0x00, 0x00 }, /* FLAG_AX = 0x08 */ { 0x00, 0x00, 0x00, 0x00 }, { 0x00, 0x00, 0x00, 0x00 }, { 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00 }, /* FLAG_PS2 = 0x08 */ + { 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00 }, /* FLAG_PS2_KBD = 0x10 */ + { 0x00, 0x00, 0x00, 0x00 }, { 0xab, 0x83, 0x00, 0x00 }, /* PS/2 101-key */ { 0xab, 0x83, 0x00, 0x00 }, /* PS/2 102-key */ { 0xab, 0x90, 0x00, 0x00 }, /* PS/55 106-key JIS (IBM-J 5576-002) */ /* Japanese keyboard ID - TODO: Find the actual Korean one. */ - { 0xab, 0x90, 0x00, 0x00 }, /* PS/2 Korean */ - { 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00 }, + { 0xab, 0x90, 0x00, 0x00 }, /* PS/2 KSC */ + { 0xab, 0x83, 0x00, 0x00 }, /* PS/2 ABNT2 */ { 0x00, 0x00, 0x00, 0x00 } }; /* Global keyboard flags for scan code set 3: @@ -78,9 +74,2079 @@ static atkbc_dev_t *SavedKbd = NULL; static uint8_t inv_cmd_response = 0xfa; +static int is_special = 0; + static uint16_t bat_counter = 0; -static const scancode scancode_set1[512] = { +const scancode scancode_set1_at[512] = { + // clang-format off + { .mk = { 0 }, .brk = { 0 } }, /* 000 */ + { .mk = { 0x01, 0 }, .brk = { 0x81, 0 } }, /* 001 */ + { .mk = { 0x02, 0 }, .brk = { 0x82, 0 } }, /* 002 */ + { .mk = { 0x03, 0 }, .brk = { 0x83, 0 } }, /* 003 */ + { .mk = { 0x04, 0 }, .brk = { 0x84, 0 } }, /* 004 */ + { .mk = { 0x05, 0 }, .brk = { 0x85, 0 } }, /* 005 */ + { .mk = { 0x06, 0 }, .brk = { 0x86, 0 } }, /* 006 */ + { .mk = { 0x07, 0 }, .brk = { 0x87, 0 } }, /* 007 */ + { .mk = { 0x08, 0 }, .brk = { 0x88, 0 } }, /* 008 */ + { .mk = { 0x09, 0 }, .brk = { 0x89, 0 } }, /* 009 */ + { .mk = { 0x0a, 0 }, .brk = { 0x8a, 0 } }, /* 00a */ + { .mk = { 0x0b, 0 }, .brk = { 0x8b, 0 } }, /* 00b */ + { .mk = { 0x0c, 0 }, .brk = { 0x8c, 0 } }, /* 00c */ + { .mk = { 0x0d, 0 }, .brk = { 0x8d, 0 } }, /* 00d */ + { .mk = { 0x0e, 0 }, .brk = { 0x8e, 0 } }, /* 00e */ + { .mk = { 0x0f, 0 }, .brk = { 0x8f, 0 } }, /* 00f */ + { .mk = { 0x10, 0 }, .brk = { 0x90, 0 } }, /* 010 */ + { .mk = { 0x11, 0 }, .brk = { 0x91, 0 } }, /* 011 */ + { .mk = { 0x12, 0 }, .brk = { 0x92, 0 } }, /* 012 */ + { .mk = { 0x13, 0 }, .brk = { 0x93, 0 } }, /* 013 */ + { .mk = { 0x14, 0 }, .brk = { 0x94, 0 } }, /* 014 */ + { .mk = { 0x15, 0 }, .brk = { 0x95, 0 } }, /* 015 */ + { .mk = { 0x16, 0 }, .brk = { 0x96, 0 } }, /* 016 */ + { .mk = { 0x17, 0 }, .brk = { 0x97, 0 } }, /* 017 */ + { .mk = { 0x18, 0 }, .brk = { 0x98, 0 } }, /* 018 */ + { .mk = { 0x19, 0 }, .brk = { 0x99, 0 } }, /* 019 */ + { .mk = { 0x1a, 0 }, .brk = { 0x9a, 0 } }, /* 01a */ + { .mk = { 0x1b, 0 }, .brk = { 0x9b, 0 } }, /* 01b */ + { .mk = { 0x1c, 0 }, .brk = { 0x9c, 0 } }, /* 01c */ + { .mk = { 0x1d, 0 }, .brk = { 0x9d, 0 } }, /* 01d */ + { .mk = { 0x1e, 0 }, .brk = { 0x9e, 0 } }, /* 01e */ + { .mk = { 0x1f, 0 }, .brk = { 0x9f, 0 } }, /* 01f */ + { .mk = { 0x20, 0 }, .brk = { 0xa0, 0 } }, /* 020 */ + { .mk = { 0x21, 0 }, .brk = { 0xa1, 0 } }, /* 021 */ + { .mk = { 0x22, 0 }, .brk = { 0xa2, 0 } }, /* 022 */ + { .mk = { 0x23, 0 }, .brk = { 0xa3, 0 } }, /* 023 */ + { .mk = { 0x24, 0 }, .brk = { 0xa4, 0 } }, /* 024 */ + { .mk = { 0x25, 0 }, .brk = { 0xa5, 0 } }, /* 025 */ + { .mk = { 0x26, 0 }, .brk = { 0xa6, 0 } }, /* 026 */ + { .mk = { 0x27, 0 }, .brk = { 0xa7, 0 } }, /* 027 */ + { .mk = { 0x28, 0 }, .brk = { 0xa8, 0 } }, /* 028 */ + { .mk = { 0x29, 0 }, .brk = { 0xa9, 0 } }, /* 029 */ + { .mk = { 0x2a, 0 }, .brk = { 0xaa, 0 } }, /* 02a */ + { .mk = { 0x2b, 0 }, .brk = { 0xab, 0 } }, /* 02b */ + { .mk = { 0x2c, 0 }, .brk = { 0xac, 0 } }, /* 02c */ + { .mk = { 0x2d, 0 }, .brk = { 0xad, 0 } }, /* 02d */ + { .mk = { 0x2e, 0 }, .brk = { 0xae, 0 } }, /* 02e */ + { .mk = { 0x2f, 0 }, .brk = { 0xaf, 0 } }, /* 02f */ + { .mk = { 0x30, 0 }, .brk = { 0xb0, 0 } }, /* 030 */ + { .mk = { 0x31, 0 }, .brk = { 0xb1, 0 } }, /* 031 */ + { .mk = { 0x32, 0 }, .brk = { 0xb2, 0 } }, /* 032 */ + { .mk = { 0x33, 0 }, .brk = { 0xb3, 0 } }, /* 033 */ + { .mk = { 0x34, 0 }, .brk = { 0xb4, 0 } }, /* 034 */ + { .mk = { 0x35, 0 }, .brk = { 0xb5, 0 } }, /* 035 */ + { .mk = { 0x36, 0 }, .brk = { 0xb6, 0 } }, /* 036 */ + { .mk = { 0x37, 0 }, .brk = { 0xb7, 0 } }, /* 037 */ + { .mk = { 0x38, 0 }, .brk = { 0xb8, 0 } }, /* 038 */ + { .mk = { 0x39, 0 }, .brk = { 0xb9, 0 } }, /* 039 */ + { .mk = { 0x3a, 0 }, .brk = { 0xba, 0 } }, /* 03a */ + { .mk = { 0x3b, 0 }, .brk = { 0xbb, 0 } }, /* 03b */ + { .mk = { 0x3c, 0 }, .brk = { 0xbc, 0 } }, /* 03c */ + { .mk = { 0x3d, 0 }, .brk = { 0xbd, 0 } }, /* 03d */ + { .mk = { 0x3e, 0 }, .brk = { 0xbe, 0 } }, /* 03e */ + { .mk = { 0x3f, 0 }, .brk = { 0xbf, 0 } }, /* 03f */ + { .mk = { 0x40, 0 }, .brk = { 0xc0, 0 } }, /* 040 */ + { .mk = { 0x41, 0 }, .brk = { 0xc1, 0 } }, /* 041 */ + { .mk = { 0x42, 0 }, .brk = { 0xc2, 0 } }, /* 042 */ + { .mk = { 0x43, 0 }, .brk = { 0xc3, 0 } }, /* 043 */ + { .mk = { 0x44, 0 }, .brk = { 0xc4, 0 } }, /* 044 */ + { .mk = { 0x45, 0 }, .brk = { 0xc5, 0 } }, /* 045 */ + { .mk = { 0x46, 0 }, .brk = { 0xc6, 0 } }, /* 046 */ + { .mk = { 0x47, 0 }, .brk = { 0xc7, 0 } }, /* 047 */ + { .mk = { 0x48, 0 }, .brk = { 0xc8, 0 } }, /* 048 */ + { .mk = { 0x49, 0 }, .brk = { 0xc9, 0 } }, /* 049 */ + { .mk = { 0x4a, 0 }, .brk = { 0xca, 0 } }, /* 04a */ + { .mk = { 0x4b, 0 }, .brk = { 0xcb, 0 } }, /* 04b */ + { .mk = { 0x4c, 0 }, .brk = { 0xcc, 0 } }, /* 04c */ + { .mk = { 0x4d, 0 }, .brk = { 0xcd, 0 } }, /* 04d */ + { .mk = { 0x4e, 0 }, .brk = { 0xce, 0 } }, /* 04e */ + { .mk = { 0x4f, 0 }, .brk = { 0xcf, 0 } }, /* 04f */ + { .mk = { 0x50, 0 }, .brk = { 0xd0, 0 } }, /* 050 */ + { .mk = { 0x51, 0 }, .brk = { 0xd1, 0 } }, /* 051 */ + { .mk = { 0x52, 0 }, .brk = { 0xd2, 0 } }, /* 052 */ + { .mk = { 0x53, 0 }, .brk = { 0xd3, 0 } }, /* 053 */ + { .mk = { 0x54, 0 }, .brk = { 0xd4, 0 } }, /* 054 */ + { .mk = { 0 }, .brk = { 0 } }, /* 055 */ + { .mk = { 0x56, 0 }, .brk = { 0xd6, 0 } }, /* 054 */ + { .mk = { 0 }, .brk = { 0 } }, /* 057 */ + { .mk = { 0 }, .brk = { 0 } }, /* 058 */ + { .mk = { 0 }, .brk = { 0 } }, /* 059 */ + { .mk = { 0 }, .brk = { 0 } }, /* 05a */ + { .mk = { 0 }, .brk = { 0 } }, /* 05b */ + { .mk = { 0x5c, 0 }, .brk = { 0xdc, 0 } }, /* 054 */ + { .mk = { 0 }, .brk = { 0 } }, /* 05d */ + { .mk = { 0 }, .brk = { 0 } }, /* 05e */ + { .mk = { 0 }, .brk = { 0 } }, /* 05f */ + { .mk = { 0x60, 0 }, .brk = { 0xe0, 0 } }, /* 060 */ + { .mk = { 0x61, 0 }, .brk = { 0xe1, 0 } }, /* 061 */ + { .mk = { 0x62, 0 }, .brk = { 0xe2, 0 } }, /* 062 */ + { .mk = { 0x63, 0 }, .brk = { 0xe3, 0 } }, /* 063 */ + { .mk = { 0x64, 0 }, .brk = { 0xe4, 0 } }, /* 064 */ + { .mk = { 0x65, 0 }, .brk = { 0xe5, 0 } }, /* 065 */ + { .mk = { 0x66, 0 }, .brk = { 0xe6, 0 } }, /* 066 */ + { .mk = { 0x67, 0 }, .brk = { 0xe7, 0 } }, /* 067 */ + { .mk = { 0x68, 0 }, .brk = { 0xe8, 0 } }, /* 068 */ + { .mk = { 0x69, 0 }, .brk = { 0xe9, 0 } }, /* 069 */ + { .mk = { 0x6a, 0 }, .brk = { 0xea, 0 } }, /* 06a */ + { .mk = { 0x6b, 0 }, .brk = { 0xeb, 0 } }, /* 06b */ + { .mk = { 0x6c, 0 }, .brk = { 0xec, 0 } }, /* 06c */ + { .mk = { 0x6d, 0 }, .brk = { 0xed, 0 } }, /* 06d */ + { .mk = { 0x6e, 0 }, .brk = { 0xee, 0 } }, /* 06e */ + { .mk = { 0x6f, 0 }, .brk = { 0xef, 0 } }, /* 06f */ + { .mk = { 0x70, 0 }, .brk = { 0xf0, 0 } }, /* 070 */ + { .mk = { 0x71, 0 }, .brk = { 0xf1, 0 } }, /* 071 */ + { .mk = { 0x72, 0 }, .brk = { 0xf2, 0 } }, /* 072 */ + { .mk = { 0x73, 0 }, .brk = { 0xf3, 0 } }, /* 073 */ + { .mk = { 0x74, 0 }, .brk = { 0xf4, 0 } }, /* 074 */ + { .mk = { 0x75, 0 }, .brk = { 0xf5, 0 } }, /* 075 */ + { .mk = { 0x76, 0 }, .brk = { 0xf6, 0 } }, /* 076 */ + { .mk = { 0x77, 0 }, .brk = { 0xf7, 0 } }, /* 077 */ + { .mk = { 0x78, 0 }, .brk = { 0xf8, 0 } }, /* 078 */ + { .mk = { 0x79, 0 }, .brk = { 0xf9, 0 } }, /* 079 */ + { .mk = { 0x7a, 0 }, .brk = { 0xfa, 0 } }, /* 07a */ + { .mk = { 0x7b, 0 }, .brk = { 0xfb, 0 } }, /* 07b */ + { .mk = { 0x7c, 0 }, .brk = { 0xfc, 0 } }, /* 07c */ + { .mk = { 0x7d, 0 }, .brk = { 0xfd, 0 } }, /* 07d */ + { .mk = { 0x7e, 0 }, .brk = { 0xfe, 0 } }, /* 07e */ + { .mk = { 0x7f, 0 }, .brk = { 0xff, 0 } }, /* 07f */ + { .mk = { 0 }, .brk = { 0 } }, /* 080 */ + { .mk = { 0 }, .brk = { 0 } }, /* 081 */ + { .mk = { 0 }, .brk = { 0 } }, /* 082 */ + { .mk = { 0 }, .brk = { 0 } }, /* 083 */ + { .mk = { 0 }, .brk = { 0 } }, /* 084 */ + { .mk = { 0 }, .brk = { 0 } }, /* 085 */ + { .mk = { 0 }, .brk = { 0 } }, /* 086 */ + { .mk = { 0 }, .brk = { 0 } }, /* 087 */ + { .mk = { 0 }, .brk = { 0 } }, /* 088 */ + { .mk = { 0 }, .brk = { 0 } }, /* 089 */ + { .mk = { 0 }, .brk = { 0 } }, /* 08a */ + { .mk = { 0 }, .brk = { 0 } }, /* 08b */ + { .mk = { 0 }, .brk = { 0 } }, /* 08c */ + { .mk = { 0 }, .brk = { 0 } }, /* 08d */ + { .mk = { 0 }, .brk = { 0 } }, /* 08e */ + { .mk = { 0 }, .brk = { 0 } }, /* 08f */ + { .mk = { 0 }, .brk = { 0 } }, /* 090 */ + { .mk = { 0 }, .brk = { 0 } }, /* 091 */ + { .mk = { 0 }, .brk = { 0 } }, /* 092 */ + { .mk = { 0 }, .brk = { 0 } }, /* 093 */ + { .mk = { 0 }, .brk = { 0 } }, /* 094 */ + { .mk = { 0 }, .brk = { 0 } }, /* 095 */ + { .mk = { 0 }, .brk = { 0 } }, /* 096 */ + { .mk = { 0 }, .brk = { 0 } }, /* 097 */ + { .mk = { 0 }, .brk = { 0 } }, /* 098 */ + { .mk = { 0 }, .brk = { 0 } }, /* 099 */ + { .mk = { 0 }, .brk = { 0 } }, /* 09a */ + { .mk = { 0 }, .brk = { 0 } }, /* 09b */ + { .mk = { 0 }, .brk = { 0 } }, /* 09c */ + { .mk = { 0 }, .brk = { 0 } }, /* 09d */ + { .mk = { 0 }, .brk = { 0 } }, /* 09e */ + { .mk = { 0 }, .brk = { 0 } }, /* 09f */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0aa */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ab */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ac */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ad */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ae */ + { .mk = { 0 }, .brk = { 0 } }, /* 0af */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ba */ + { .mk = { 0 }, .brk = { 0 } }, /* 0bb */ + { .mk = { 0 }, .brk = { 0 } }, /* 0bc */ + { .mk = { 0 }, .brk = { 0 } }, /* 0bd */ + { .mk = { 0 }, .brk = { 0 } }, /* 0be */ + { .mk = { 0 }, .brk = { 0 } }, /* 0bf */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ca */ + { .mk = { 0 }, .brk = { 0 } }, /* 0cb */ + { .mk = { 0 }, .brk = { 0 } }, /* 0cc */ + { .mk = { 0 }, .brk = { 0 } }, /* 0cd */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ce */ + { .mk = { 0 }, .brk = { 0 } }, /* 0cf */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0da */ + { .mk = { 0 }, .brk = { 0 } }, /* 0db */ + { .mk = { 0 }, .brk = { 0 } }, /* 0dc */ + { .mk = { 0 }, .brk = { 0 } }, /* 0dd */ + { .mk = { 0 }, .brk = { 0 } }, /* 0de */ + { .mk = { 0 }, .brk = { 0 } }, /* 0df */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ea */ + { .mk = { 0 }, .brk = { 0 } }, /* 0eb */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ec */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ed */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ee */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ef */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f0 */ + { .mk = { 0xf1, 0 }, .brk = { 0 } }, /* 0f1 */ + { .mk = { 0xf2, 0 }, .brk = { 0 } }, /* 0f2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fa */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fb */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fc */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fd */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fe */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ff */ + { .mk = { 0 }, .brk = { 0 } }, /* 100 */ + { .mk = { 0 }, .brk = { 0 } }, /* 101 */ + { .mk = { 0 }, .brk = { 0 } }, /* 102 */ + { .mk = { 0 }, .brk = { 0 } }, /* 103 */ + { .mk = { 0 }, .brk = { 0 } }, /* 104 */ + { .mk = { 0 }, .brk = { 0 } }, /* 105 */ + { .mk = { 0 }, .brk = { 0 } }, /* 106 */ + { .mk = { 0 }, .brk = { 0 } }, /* 107 */ + { .mk = { 0 }, .brk = { 0 } }, /* 108 */ + { .mk = { 0 }, .brk = { 0 } }, /* 109 */ + { .mk = { 0 }, .brk = { 0 } }, /* 10a */ + { .mk = { 0 }, .brk = { 0 } }, /* 10b */ + { .mk = { 0 }, .brk = { 0 } }, /* 10c */ + { .mk = { 0 }, .brk = { 0 } }, /* 10d */ + { .mk = { 0 }, .brk = { 0 } }, /* 10e */ + { .mk = { 0 }, .brk = { 0 } }, /* 10f */ + { .mk = { 0 }, .brk = { 0 } }, /* 110 */ + { .mk = { 0 }, .brk = { 0 } }, /* 111 */ + { .mk = { 0 }, .brk = { 0 } }, /* 112 */ + { .mk = { 0 }, .brk = { 0 } }, /* 113 */ + { .mk = { 0 }, .brk = { 0 } }, /* 114 */ + { .mk = { 0 }, .brk = { 0 } }, /* 115 */ + { .mk = { 0 }, .brk = { 0 } }, /* 116 */ + { .mk = { 0 }, .brk = { 0 } }, /* 117 */ + { .mk = { 0 }, .brk = { 0 } }, /* 118 */ + { .mk = { 0 }, .brk = { 0 } }, /* 119 */ + { .mk = { 0 }, .brk = { 0 } }, /* 11a */ + { .mk = { 0 }, .brk = { 0 } }, /* 11b */ + { .mk = { 0x1c, 0 }, .brk = { 0x9c, 0 } }, /* 11c */ + { .mk = { 0x1d, 0 }, .brk = { 0x9d, 0 } }, /* 11d */ + { .mk = { 0 }, .brk = { 0 } }, /* 11e */ + { .mk = { 0 }, .brk = { 0 } }, /* 11f */ + { .mk = { 0 }, .brk = { 0 } }, /* 120 */ + { .mk = { 0 }, .brk = { 0 } }, /* 121 */ + { .mk = { 0 }, .brk = { 0 } }, /* 122 */ + { .mk = { 0 }, .brk = { 0 } }, /* 123 */ + { .mk = { 0 }, .brk = { 0 } }, /* 124 */ + { .mk = { 0 }, .brk = { 0 } }, /* 125 */ + { .mk = { 0 }, .brk = { 0 } }, /* 126 */ + { .mk = { 0 }, .brk = { 0 } }, /* 127 */ + { .mk = { 0 }, .brk = { 0 } }, /* 128 */ + { .mk = { 0 }, .brk = { 0 } }, /* 129 */ + { .mk = { 0 }, .brk = { 0 } }, /* 12a */ + { .mk = { 0 }, .brk = { 0 } }, /* 12b */ + { .mk = { 0 }, .brk = { 0 } }, /* 12c */ + { .mk = { 0 }, .brk = { 0 } }, /* 12d */ + { .mk = { 0 }, .brk = { 0 } }, /* 12e */ + { .mk = { 0 }, .brk = { 0 } }, /* 12f */ + { .mk = { 0 }, .brk = { 0 } }, /* 130 */ + { .mk = { 0 }, .brk = { 0 } }, /* 131 */ + { .mk = { 0 }, .brk = { 0 } }, /* 132 */ + { .mk = { 0 }, .brk = { 0 } }, /* 133 */ + { .mk = { 0 }, .brk = { 0 } }, /* 134 */ + { .mk = { 0x35, 0 }, .brk = { 0xb5, 0 } }, /* 135 */ + { .mk = { 0 }, .brk = { 0 } }, /* 136 */ + { .mk = { 0x37, 0 }, .brk = { 0xb7, 0 } }, /* 137 */ + { .mk = { 0x38, 0 }, .brk = { 0xb8, 0 } }, /* 138 */ + { .mk = { 0 }, .brk = { 0 } }, /* 139 */ + { .mk = { 0 }, .brk = { 0 } }, /* 13a */ + { .mk = { 0 }, .brk = { 0 } }, /* 13b */ + { .mk = { 0 }, .brk = { 0 } }, /* 13c */ + { .mk = { 0 }, .brk = { 0 } }, /* 13d */ + { .mk = { 0 }, .brk = { 0 } }, /* 13e */ + { .mk = { 0 }, .brk = { 0 } }, /* 13f */ + { .mk = { 0 }, .brk = { 0 } }, /* 140 */ + { .mk = { 0 }, .brk = { 0 } }, /* 141 */ + { .mk = { 0 }, .brk = { 0 } }, /* 142 */ + { .mk = { 0 }, .brk = { 0 } }, /* 143 */ + { .mk = { 0 }, .brk = { 0 } }, /* 144 */ + { .mk = { 0 }, .brk = { 0 } }, /* 145 */ + { .mk = { 0x46, 0 }, .brk = { 0xc6, 0 } }, /* 146 */ + { .mk = { 0x47, 0 }, .brk = { 0xc7, 0 } }, /* 147 */ + { .mk = { 0x48, 0 }, .brk = { 0xc8, 0 } }, /* 148 */ + { .mk = { 0x49, 0 }, .brk = { 0xc9, 0 } }, /* 149 */ + { .mk = { 0 }, .brk = { 0 } }, /* 14a */ + { .mk = { 0x4b, 0 }, .brk = { 0xcb, 0 } }, /* 14b */ + { .mk = { 0 }, .brk = { 0 } }, /* 14c */ + { .mk = { 0x4d, 0 }, .brk = { 0xcd, 0 } }, /* 14d */ + { .mk = { 0 }, .brk = { 0 } }, /* 14e */ + { .mk = { 0x4f, 0 }, .brk = { 0xcf, 0 } }, /* 14f */ + { .mk = { 0x50, 0 }, .brk = { 0xd0, 0 } }, /* 150 */ + { .mk = { 0x51, 0 }, .brk = { 0xd1, 0 } }, /* 151 */ + { .mk = { 0x52, 0 }, .brk = { 0xd2, 0 } }, /* 152 */ + { .mk = { 0x53, 0 }, .brk = { 0xd3, 0 } }, /* 153 */ + { .mk = { 0 }, .brk = { 0 } }, /* 154 */ + { .mk = { 0 }, .brk = { 0 } }, /* 155 */ + { .mk = { 0 }, .brk = { 0 } }, /* 156 */ + { .mk = { 0 }, .brk = { 0 } }, /* 157 */ + { .mk = { 0 }, .brk = { 0 } }, /* 158 */ + { .mk = { 0 }, .brk = { 0 } }, /* 159 */ + { .mk = { 0 }, .brk = { 0 } }, /* 15a */ + { .mk = { 0x56, 0 }, .brk = { 0xd6, 0 } }, /* 15b */ + { .mk = { 0 }, .brk = { 0 } }, /* 15c */ + { .mk = { 0 }, .brk = { 0 } }, /* 15d */ + { .mk = { 0 }, .brk = { 0 } }, /* 15e */ + { .mk = { 0 }, .brk = { 0 } }, /* 15f */ + { .mk = { 0 }, .brk = { 0 } }, /* 160 */ + { .mk = { 0 }, .brk = { 0 } }, /* 161 */ + { .mk = { 0 }, .brk = { 0 } }, /* 162 */ + { .mk = { 0 }, .brk = { 0 } }, /* 163 */ + { .mk = { 0 }, .brk = { 0 } }, /* 164 */ + { .mk = { 0 }, .brk = { 0 } }, /* 165 */ + { .mk = { 0 }, .brk = { 0 } }, /* 166 */ + { .mk = { 0 }, .brk = { 0 } }, /* 167 */ + { .mk = { 0 }, .brk = { 0 } }, /* 168 */ + { .mk = { 0 }, .brk = { 0 } }, /* 169 */ + { .mk = { 0 }, .brk = { 0 } }, /* 16a */ + { .mk = { 0 }, .brk = { 0 } }, /* 16b */ + { .mk = { 0 }, .brk = { 0 } }, /* 16c */ + { .mk = { 0 }, .brk = { 0 } }, /* 16d */ + { .mk = { 0 }, .brk = { 0 } }, /* 16e */ + { .mk = { 0 }, .brk = { 0 } }, /* 16f */ + { .mk = { 0 }, .brk = { 0 } }, /* 170 */ + { .mk = { 0 }, .brk = { 0 } }, /* 171 */ + { .mk = { 0 }, .brk = { 0 } }, /* 172 */ + { .mk = { 0 }, .brk = { 0 } }, /* 173 */ + { .mk = { 0 }, .brk = { 0 } }, /* 174 */ + { .mk = { 0 }, .brk = { 0 } }, /* 175 */ + { .mk = { 0 }, .brk = { 0 } }, /* 176 */ + { .mk = { 0 }, .brk = { 0 } }, /* 177 */ + { .mk = { 0 }, .brk = { 0 } }, /* 178 */ + { .mk = { 0 }, .brk = { 0 } }, /* 179 */ + { .mk = { 0 }, .brk = { 0 } }, /* 17a */ + { .mk = { 0 }, .brk = { 0 } }, /* 17b */ + { .mk = { 0 }, .brk = { 0 } }, /* 17c */ + { .mk = { 0 }, .brk = { 0 } }, /* 17d */ + { .mk = { 0 }, .brk = { 0 } }, /* 17e */ + { .mk = { 0 }, .brk = { 0 } }, /* 17f */ + { .mk = { 0 }, .brk = { 0 } }, /* 180 */ + { .mk = { 0 }, .brk = { 0 } }, /* 181 */ + { .mk = { 0 }, .brk = { 0 } }, /* 182 */ + { .mk = { 0 }, .brk = { 0 } }, /* 183 */ + { .mk = { 0 }, .brk = { 0 } }, /* 184 */ + { .mk = { 0 }, .brk = { 0 } }, /* 185 */ + { .mk = { 0 }, .brk = { 0 } }, /* 186 */ + { .mk = { 0 }, .brk = { 0 } }, /* 187 */ + { .mk = { 0 }, .brk = { 0 } }, /* 188 */ + { .mk = { 0 }, .brk = { 0 } }, /* 189 */ + { .mk = { 0 }, .brk = { 0 } }, /* 18a */ + { .mk = { 0 }, .brk = { 0 } }, /* 18b */ + { .mk = { 0 }, .brk = { 0 } }, /* 18c */ + { .mk = { 0 }, .brk = { 0 } }, /* 18d */ + { .mk = { 0 }, .brk = { 0 } }, /* 18e */ + { .mk = { 0 }, .brk = { 0 } }, /* 18f */ + { .mk = { 0 }, .brk = { 0 } }, /* 190 */ + { .mk = { 0 }, .brk = { 0 } }, /* 191 */ + { .mk = { 0 }, .brk = { 0 } }, /* 192 */ + { .mk = { 0 }, .brk = { 0 } }, /* 193 */ + { .mk = { 0 }, .brk = { 0 } }, /* 194 */ + { .mk = { 0 }, .brk = { 0 } }, /* 195 */ + { .mk = { 0 }, .brk = { 0 } }, /* 196 */ + { .mk = { 0 }, .brk = { 0 } }, /* 197 */ + { .mk = { 0 }, .brk = { 0 } }, /* 198 */ + { .mk = { 0 }, .brk = { 0 } }, /* 199 */ + { .mk = { 0 }, .brk = { 0 } }, /* 19a */ + { .mk = { 0 }, .brk = { 0 } }, /* 19b */ + { .mk = { 0 }, .brk = { 0 } }, /* 19c */ + { .mk = { 0 }, .brk = { 0 } }, /* 19d */ + { .mk = { 0 }, .brk = { 0 } }, /* 19e */ + { .mk = { 0 }, .brk = { 0 } }, /* 19f */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1aa */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ab */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ac */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ad */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ae */ + { .mk = { 0 }, .brk = { 0 } }, /* 1af */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ba */ + { .mk = { 0 }, .brk = { 0 } }, /* 1bb */ + { .mk = { 0 }, .brk = { 0 } }, /* 1bc */ + { .mk = { 0 }, .brk = { 0 } }, /* 1bd */ + { .mk = { 0 }, .brk = { 0 } }, /* 1be */ + { .mk = { 0 }, .brk = { 0 } }, /* 1bf */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ca */ + { .mk = { 0 }, .brk = { 0 } }, /* 1cb */ + { .mk = { 0 }, .brk = { 0 } }, /* 1cc */ + { .mk = { 0 }, .brk = { 0 } }, /* 1cd */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ce */ + { .mk = { 0 }, .brk = { 0 } }, /* 1cf */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1da */ + { .mk = { 0 }, .brk = { 0 } }, /* 1db */ + { .mk = { 0 }, .brk = { 0 } }, /* 1dc */ + { .mk = { 0 }, .brk = { 0 } }, /* 1dd */ + { .mk = { 0 }, .brk = { 0 } }, /* 1de */ + { .mk = { 0 }, .brk = { 0 } }, /* 1df */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ea */ + { .mk = { 0 }, .brk = { 0 } }, /* 1eb */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ec */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ed */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ee */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ef */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fa */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fb */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fc */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fd */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fe */ + { .mk = { 0 }, .brk = { 0 } } /* 1ff */ + // clang-format on +}; + +const scancode scancode_set2_at[512] = { + // clang-format off + { .mk = { 0 }, .brk = { 0 } }, /* 000 */ + { .mk = { 0x76, 0 }, .brk = { 0xF0, 0x76, 0 } }, /* 001 */ + { .mk = { 0x16, 0 }, .brk = { 0xF0, 0x16, 0 } }, /* 002 */ + { .mk = { 0x1E, 0 }, .brk = { 0xF0, 0x1E, 0 } }, /* 003 */ + { .mk = { 0x26, 0 }, .brk = { 0xF0, 0x26, 0 } }, /* 004 */ + { .mk = { 0x25, 0 }, .brk = { 0xF0, 0x25, 0 } }, /* 005 */ + { .mk = { 0x2E, 0 }, .brk = { 0xF0, 0x2E, 0 } }, /* 006 */ + { .mk = { 0x36, 0 }, .brk = { 0xF0, 0x36, 0 } }, /* 007 */ + { .mk = { 0x3D, 0 }, .brk = { 0xF0, 0x3D, 0 } }, /* 008 */ + { .mk = { 0x3E, 0 }, .brk = { 0xF0, 0x3E, 0 } }, /* 009 */ + { .mk = { 0x46, 0 }, .brk = { 0xF0, 0x46, 0 } }, /* 00a */ + { .mk = { 0x45, 0 }, .brk = { 0xF0, 0x45, 0 } }, /* 00b */ + { .mk = { 0x4E, 0 }, .brk = { 0xF0, 0x4E, 0 } }, /* 00c */ + { .mk = { 0x55, 0 }, .brk = { 0xF0, 0x55, 0 } }, /* 00d */ + { .mk = { 0x66, 0 }, .brk = { 0xF0, 0x66, 0 } }, /* 00e */ + { .mk = { 0x0D, 0 }, .brk = { 0xF0, 0x0D, 0 } }, /* 00f */ + { .mk = { 0x15, 0 }, .brk = { 0xF0, 0x15, 0 } }, /* 010 */ + { .mk = { 0x1D, 0 }, .brk = { 0xF0, 0x1D, 0 } }, /* 011 */ + { .mk = { 0x24, 0 }, .brk = { 0xF0, 0x24, 0 } }, /* 012 */ + { .mk = { 0x2D, 0 }, .brk = { 0xF0, 0x2D, 0 } }, /* 013 */ + { .mk = { 0x2C, 0 }, .brk = { 0xF0, 0x2C, 0 } }, /* 014 */ + { .mk = { 0x35, 0 }, .brk = { 0xF0, 0x35, 0 } }, /* 015 */ + { .mk = { 0x3C, 0 }, .brk = { 0xF0, 0x3C, 0 } }, /* 016 */ + { .mk = { 0x43, 0 }, .brk = { 0xF0, 0x43, 0 } }, /* 017 */ + { .mk = { 0x44, 0 }, .brk = { 0xF0, 0x44, 0 } }, /* 018 */ + { .mk = { 0x4D, 0 }, .brk = { 0xF0, 0x4D, 0 } }, /* 019 */ + { .mk = { 0x54, 0 }, .brk = { 0xF0, 0x54, 0 } }, /* 01a */ + { .mk = { 0x5B, 0 }, .brk = { 0xF0, 0x5B, 0 } }, /* 01b */ + { .mk = { 0x5A, 0 }, .brk = { 0xF0, 0x5A, 0 } }, /* 01c */ + { .mk = { 0x14, 0 }, .brk = { 0xF0, 0x14, 0 } }, /* 01d */ + { .mk = { 0x1C, 0 }, .brk = { 0xF0, 0x1C, 0 } }, /* 01e */ + { .mk = { 0x1B, 0 }, .brk = { 0xF0, 0x1B, 0 } }, /* 01f */ + { .mk = { 0x23, 0 }, .brk = { 0xF0, 0x23, 0 } }, /* 020 */ + { .mk = { 0x2B, 0 }, .brk = { 0xF0, 0x2B, 0 } }, /* 021 */ + { .mk = { 0x34, 0 }, .brk = { 0xF0, 0x34, 0 } }, /* 022 */ + { .mk = { 0x33, 0 }, .brk = { 0xF0, 0x33, 0 } }, /* 023 */ + { .mk = { 0x3B, 0 }, .brk = { 0xF0, 0x3B, 0 } }, /* 024 */ + { .mk = { 0x42, 0 }, .brk = { 0xF0, 0x42, 0 } }, /* 025 */ + { .mk = { 0x4B, 0 }, .brk = { 0xF0, 0x4B, 0 } }, /* 026 */ + { .mk = { 0x4C, 0 }, .brk = { 0xF0, 0x4C, 0 } }, /* 027 */ + { .mk = { 0x52, 0 }, .brk = { 0xF0, 0x52, 0 } }, /* 028 */ + { .mk = { 0x0E, 0 }, .brk = { 0xF0, 0x0E, 0 } }, /* 029 */ + { .mk = { 0x12, 0 }, .brk = { 0xF0, 0x12, 0 } }, /* 02a */ + { .mk = { 0x5D, 0 }, .brk = { 0xF0, 0x5D, 0 } }, /* 02b */ + { .mk = { 0x1A, 0 }, .brk = { 0xF0, 0x1A, 0 } }, /* 02c */ + { .mk = { 0x22, 0 }, .brk = { 0xF0, 0x22, 0 } }, /* 02d */ + { .mk = { 0x21, 0 }, .brk = { 0xF0, 0x21, 0 } }, /* 02e */ + { .mk = { 0x2A, 0 }, .brk = { 0xF0, 0x2A, 0 } }, /* 02f */ + { .mk = { 0x32, 0 }, .brk = { 0xF0, 0x32, 0 } }, /* 030 */ + { .mk = { 0x31, 0 }, .brk = { 0xF0, 0x31, 0 } }, /* 031 */ + { .mk = { 0x3A, 0 }, .brk = { 0xF0, 0x3A, 0 } }, /* 032 */ + { .mk = { 0x41, 0 }, .brk = { 0xF0, 0x41, 0 } }, /* 033 */ + { .mk = { 0x49, 0 }, .brk = { 0xF0, 0x49, 0 } }, /* 034 */ + { .mk = { 0x4A, 0 }, .brk = { 0xF0, 0x4A, 0 } }, /* 035 */ + { .mk = { 0x59, 0 }, .brk = { 0xF0, 0x59, 0 } }, /* 036 */ + { .mk = { 0x7C, 0 }, .brk = { 0xF0, 0x7C, 0 } }, /* 037 */ + { .mk = { 0x11, 0 }, .brk = { 0xF0, 0x11, 0 } }, /* 038 */ + { .mk = { 0x29, 0 }, .brk = { 0xF0, 0x29, 0 } }, /* 039 */ + { .mk = { 0x58, 0 }, .brk = { 0xF0, 0x58, 0 } }, /* 03a */ + { .mk = { 0x05, 0 }, .brk = { 0xF0, 0x05, 0 } }, /* 03b */ + { .mk = { 0x06, 0 }, .brk = { 0xF0, 0x06, 0 } }, /* 03c */ + { .mk = { 0x04, 0 }, .brk = { 0xF0, 0x04, 0 } }, /* 03d */ + { .mk = { 0x0C, 0 }, .brk = { 0xF0, 0x0C, 0 } }, /* 03e */ + { .mk = { 0x03, 0 }, .brk = { 0xF0, 0x03, 0 } }, /* 03f */ + { .mk = { 0x0B, 0 }, .brk = { 0xF0, 0x0B, 0 } }, /* 040 */ + { .mk = { 0x83, 0 }, .brk = { 0xF0, 0x83, 0 } }, /* 041 */ + { .mk = { 0x0A, 0 }, .brk = { 0xF0, 0x0A, 0 } }, /* 042 */ + { .mk = { 0x01, 0 }, .brk = { 0xF0, 0x01, 0 } }, /* 043 */ + { .mk = { 0x09, 0 }, .brk = { 0xF0, 0x09, 0 } }, /* 044 */ + { .mk = { 0x77, 0 }, .brk = { 0xF0, 0x77, 0 } }, /* 045 */ + { .mk = { 0x7E, 0 }, .brk = { 0xF0, 0x7E, 0 } }, /* 046 */ + { .mk = { 0x6C, 0 }, .brk = { 0xF0, 0x6C, 0 } }, /* 047 */ + { .mk = { 0x75, 0 }, .brk = { 0xF0, 0x75, 0 } }, /* 048 */ + { .mk = { 0x7D, 0 }, .brk = { 0xF0, 0x7D, 0 } }, /* 049 */ + { .mk = { 0x7B, 0 }, .brk = { 0xF0, 0x7B, 0 } }, /* 04a */ + { .mk = { 0x6B, 0 }, .brk = { 0xF0, 0x6B, 0 } }, /* 04b */ + { .mk = { 0x73, 0 }, .brk = { 0xF0, 0x73, 0 } }, /* 04c */ + { .mk = { 0x74, 0 }, .brk = { 0xF0, 0x74, 0 } }, /* 04d */ + { .mk = { 0x79, 0 }, .brk = { 0xF0, 0x79, 0 } }, /* 04e */ + { .mk = { 0x69, 0 }, .brk = { 0xF0, 0x69, 0 } }, /* 04f */ + { .mk = { 0x72, 0 }, .brk = { 0xF0, 0x72, 0 } }, /* 050 */ + { .mk = { 0x7A, 0 }, .brk = { 0xF0, 0x7A, 0 } }, /* 051 */ + { .mk = { 0x70, 0 }, .brk = { 0xF0, 0x70, 0 } }, /* 052 */ + { .mk = { 0x71, 0 }, .brk = { 0xF0, 0x71, 0 } }, /* 053 */ + { .mk = { 0x84, 0 }, .brk = { 0xF0, 0x84, 0 } }, /* 054 */ + { .mk = { 0 }, .brk = { 0 } }, /* 055 */ + { .mk = { 0x61, 0 }, .brk = { 0xF0, 0x61, 0 } }, /* 056 */ + { .mk = { 0 }, .brk = { 0 } }, /* 057 */ + { .mk = { 0 }, .brk = { 0 } }, /* 058 */ + { .mk = { 0 }, .brk = { 0 } }, /* 059 */ + { .mk = { 0 }, .brk = { 0 } }, /* 05a */ + { .mk = { 0 }, .brk = { 0 } }, /* 05b */ + { .mk = { 0x27, 0 }, .brk = { 0xF0, 0x27, 0 } }, /* 05c */ + { .mk = { 0 }, .brk = { 0 } }, /* 05d */ + { .mk = { 0 }, .brk = { 0 } }, /* 05e */ + { .mk = { 0 }, .brk = { 0 } }, /* 05f */ + { .mk = { 0x47, 0 }, .brk = { 0xF0, 0x47, 0 } }, /* 060 */ + { .mk = { 0x4F, 0 }, .brk = { 0xF0, 0x4F, 0 } }, /* 061 */ + { .mk = { 0x56, 0 }, .brk = { 0xF0, 0x56, 0 } }, /* 062 */ + { .mk = { 0x5E, 0 }, .brk = { 0xF0, 0x5E, 0 } }, /* 063 */ + { .mk = { 0x08, 0 }, .brk = { 0xF0, 0x08, 0 } }, /* 064 */ + { .mk = { 0x10, 0 }, .brk = { 0xF0, 0x10, 0 } }, /* 065 */ + { .mk = { 0x18, 0 }, .brk = { 0xF0, 0x18, 0 } }, /* 066 */ + { .mk = { 0x20, 0 }, .brk = { 0xF0, 0x20, 0 } }, /* 067 */ + { .mk = { 0x28, 0 }, .brk = { 0xF0, 0x28, 0 } }, /* 068 */ + { .mk = { 0x30, 0 }, .brk = { 0xF0, 0x30, 0 } }, /* 069 */ + { .mk = { 0x38, 0 }, .brk = { 0xF0, 0x38, 0 } }, /* 06a */ + { .mk = { 0x40, 0 }, .brk = { 0xF0, 0x40, 0 } }, /* 06b */ + { .mk = { 0x48, 0 }, .brk = { 0xF0, 0x48, 0 } }, /* 06c */ + { .mk = { 0x50, 0 }, .brk = { 0xF0, 0x50, 0 } }, /* 06d */ + { .mk = { 0x57, 0 }, .brk = { 0xF0, 0x57, 0 } }, /* 06e */ + { .mk = { 0x6F, 0 }, .brk = { 0xF0, 0x6F, 0 } }, /* 06f */ + { .mk = { 0x13, 0 }, .brk = { 0xF0, 0x13, 0 } }, /* 070 */ + { .mk = { 0x19, 0 }, .brk = { 0xF0, 0x19, 0 } }, /* 071 */ + { .mk = { 0x39, 0 }, .brk = { 0xF0, 0x39, 0 } }, /* 072 */ + { .mk = { 0x51, 0 }, .brk = { 0xF0, 0x51, 0 } }, /* 073 */ + { .mk = { 0x53, 0 }, .brk = { 0xF0, 0x53, 0 } }, /* 074 */ + { .mk = { 0x5C, 0 }, .brk = { 0xF0, 0x5C, 0 } }, /* 075 */ + { .mk = { 0x5F, 0 }, .brk = { 0xF0, 0x5F, 0 } }, /* 076 */ + { .mk = { 0x62, 0 }, .brk = { 0xF0, 0x62, 0 } }, /* 077 */ + { .mk = { 0x63, 0 }, .brk = { 0xF0, 0x63, 0 } }, /* 078 */ + { .mk = { 0x64, 0 }, .brk = { 0xF0, 0x64, 0 } }, /* 079 */ + { .mk = { 0x65, 0 }, .brk = { 0xF0, 0x65, 0 } }, /* 07a */ + { .mk = { 0x67, 0 }, .brk = { 0xF0, 0x67, 0 } }, /* 07b */ + { .mk = { 0x68, 0 }, .brk = { 0xF0, 0x68, 0 } }, /* 07c */ + { .mk = { 0x6A, 0 }, .brk = { 0xF0, 0x6A, 0 } }, /* 07d */ + { .mk = { 0x6D, 0 }, .brk = { 0xF0, 0x6D, 0 } }, /* 07e */ + { .mk = { 0x6E, 0 }, .brk = { 0xF0, 0x6E, 0 } }, /* 07f */ + { .mk = { 0 }, .brk = { 0 } }, /* 080 */ + { .mk = { 0 }, .brk = { 0 } }, /* 081 */ + { .mk = { 0 }, .brk = { 0 } }, /* 082 */ + { .mk = { 0 }, .brk = { 0 } }, /* 083 */ + { .mk = { 0 }, .brk = { 0 } }, /* 084 */ + { .mk = { 0 }, .brk = { 0 } }, /* 085 */ + { .mk = { 0 }, .brk = { 0 } }, /* 086 */ + { .mk = { 0 }, .brk = { 0 } }, /* 087 */ + { .mk = { 0 }, .brk = { 0 } }, /* 088 */ + { .mk = { 0 }, .brk = { 0 } }, /* 089 */ + { .mk = { 0 }, .brk = { 0 } }, /* 08a */ + { .mk = { 0 }, .brk = { 0 } }, /* 08b */ + { .mk = { 0 }, .brk = { 0 } }, /* 08c */ + { .mk = { 0 }, .brk = { 0 } }, /* 08d */ + { .mk = { 0 }, .brk = { 0 } }, /* 08e */ + { .mk = { 0 }, .brk = { 0 } }, /* 08f */ + { .mk = { 0 }, .brk = { 0 } }, /* 090 */ + { .mk = { 0 }, .brk = { 0 } }, /* 091 */ + { .mk = { 0 }, .brk = { 0 } }, /* 092 */ + { .mk = { 0 }, .brk = { 0 } }, /* 093 */ + { .mk = { 0 }, .brk = { 0 } }, /* 094 */ + { .mk = { 0 }, .brk = { 0 } }, /* 095 */ + { .mk = { 0 }, .brk = { 0 } }, /* 096 */ + { .mk = { 0 }, .brk = { 0 } }, /* 097 */ + { .mk = { 0 }, .brk = { 0 } }, /* 098 */ + { .mk = { 0 }, .brk = { 0 } }, /* 099 */ + { .mk = { 0 }, .brk = { 0 } }, /* 09a */ + { .mk = { 0 }, .brk = { 0 } }, /* 09b */ + { .mk = { 0 }, .brk = { 0 } }, /* 09c */ + { .mk = { 0 }, .brk = { 0 } }, /* 09d */ + { .mk = { 0 }, .brk = { 0 } }, /* 09e */ + { .mk = { 0 }, .brk = { 0 } }, /* 09f */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0aa */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ab */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ac */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ad */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ae */ + { .mk = { 0 }, .brk = { 0 } }, /* 0af */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ba */ + { .mk = { 0 }, .brk = { 0 } }, /* 0bb */ + { .mk = { 0 }, .brk = { 0 } }, /* 0bc */ + { .mk = { 0 }, .brk = { 0 } }, /* 0bd */ + { .mk = { 0 }, .brk = { 0 } }, /* 0be */ + { .mk = { 0 }, .brk = { 0 } }, /* 0bf */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ca */ + { .mk = { 0 }, .brk = { 0 } }, /* 0cb */ + { .mk = { 0 }, .brk = { 0 } }, /* 0cc */ + { .mk = { 0 }, .brk = { 0 } }, /* 0cd */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ce */ + { .mk = { 0 }, .brk = { 0 } }, /* 0cf */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0da */ + { .mk = { 0 }, .brk = { 0 } }, /* 0db */ + { .mk = { 0 }, .brk = { 0 } }, /* 0dc */ + { .mk = { 0 }, .brk = { 0 } }, /* 0dd */ + { .mk = { 0 }, .brk = { 0 } }, /* 0de */ + { .mk = { 0 }, .brk = { 0 } }, /* 0df */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ea */ + { .mk = { 0 }, .brk = { 0 } }, /* 0eb */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ec */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ed */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ee */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ef */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f0 */ + { .mk = { 0xf1, 0 }, .brk = { 0xf0, 0xf1, 0 } }, /* 0f1 */ + { .mk = { 0xf2, 0 }, .brk = { 0xf0, 0xf2, 0 } }, /* 0f2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fa */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fb */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fc */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fd */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fe */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ff */ + { .mk = { 0 }, .brk = { 0 } }, /* 100 */ + { .mk = { 0 }, .brk = { 0 } }, /* 101 */ + { .mk = { 0 }, .brk = { 0 } }, /* 102 */ + { .mk = { 0 }, .brk = { 0 } }, /* 103 */ + { .mk = { 0 }, .brk = { 0 } }, /* 104 */ + { .mk = { 0 }, .brk = { 0 } }, /* 105 */ + { .mk = { 0 }, .brk = { 0 } }, /* 106 */ + { .mk = { 0 }, .brk = { 0 } }, /* 107 */ + { .mk = { 0 }, .brk = { 0 } }, /* 108 */ + { .mk = { 0 }, .brk = { 0 } }, /* 109 */ + { .mk = { 0 }, .brk = { 0 } }, /* 10a */ + { .mk = { 0 }, .brk = { 0 } }, /* 10b */ + { .mk = { 0 }, .brk = { 0 } }, /* 10c */ + { .mk = { 0 }, .brk = { 0 } }, /* 10d */ + { .mk = { 0 }, .brk = { 0 } }, /* 10e */ + { .mk = { 0 }, .brk = { 0 } }, /* 10f */ + { .mk = { 0 }, .brk = { 0 } }, /* 110 */ + { .mk = { 0 }, .brk = { 0 } }, /* 111 */ + { .mk = { 0 }, .brk = { 0 } }, /* 112 */ + { .mk = { 0 }, .brk = { 0 } }, /* 113 */ + { .mk = { 0 }, .brk = { 0 } }, /* 114 */ + { .mk = { 0 }, .brk = { 0 } }, /* 115 */ + { .mk = { 0 }, .brk = { 0 } }, /* 116 */ + { .mk = { 0 }, .brk = { 0 } }, /* 117 */ + { .mk = { 0 }, .brk = { 0 } }, /* 118 */ + { .mk = { 0 }, .brk = { 0 } }, /* 119 */ + { .mk = { 0 }, .brk = { 0 } }, /* 11a */ + { .mk = { 0 }, .brk = { 0 } }, /* 11b */ + { .mk = { 0x5A, 0 }, .brk = { 0xF0, 0x5A, 0 } }, /* 11c */ + { .mk = { 0x14, 0 }, .brk = { 0xF0, 0x14, 0 } }, /* 11d */ + { .mk = { 0 }, .brk = { 0 } }, /* 11e */ + { .mk = { 0 }, .brk = { 0 } }, /* 11f */ + { .mk = { 0 }, .brk = { 0 } }, /* 120 */ + { .mk = { 0 }, .brk = { 0 } }, /* 121 */ + { .mk = { 0 }, .brk = { 0 } }, /* 122 */ + { .mk = { 0 }, .brk = { 0 } }, /* 123 */ + { .mk = { 0 }, .brk = { 0 } }, /* 124 */ + { .mk = { 0 }, .brk = { 0 } }, /* 125 */ + { .mk = { 0 }, .brk = { 0 } }, /* 126 */ + { .mk = { 0 }, .brk = { 0 } }, /* 127 */ + { .mk = { 0 }, .brk = { 0 } }, /* 128 */ + { .mk = { 0 }, .brk = { 0 } }, /* 129 */ + { .mk = { 0 }, .brk = { 0 } }, /* 12a */ + { .mk = { 0 }, .brk = { 0 } }, /* 12b */ + { .mk = { 0 }, .brk = { 0 } }, /* 12c */ + { .mk = { 0 }, .brk = { 0 } }, /* 12d */ + { .mk = { 0 }, .brk = { 0 } }, /* 12e */ + { .mk = { 0 }, .brk = { 0 } }, /* 12f */ + { .mk = { 0 }, .brk = { 0 } }, /* 130 */ + { .mk = { 0 }, .brk = { 0 } }, /* 131 */ + { .mk = { 0 }, .brk = { 0 } }, /* 132 */ + { .mk = { 0 }, .brk = { 0 } }, /* 133 */ + { .mk = { 0 }, .brk = { 0 } }, /* 134 */ + { .mk = { 0x4A, 0 }, .brk = { 0xF0, 0x4A, 0 } }, /* 135 */ + { .mk = { 0 }, .brk = { 0 } }, /* 136 */ + { .mk = { 0x7C, 0 }, .brk = { 0xF0, 0x7C, 0 } }, /* 137 */ + { .mk = { 0x11, 0 }, .brk = { 0xF0, 0x11, 0 } }, /* 138 */ + { .mk = { 0 }, .brk = { 0 } }, /* 139 */ + { .mk = { 0 }, .brk = { 0 } }, /* 13a */ + { .mk = { 0 }, .brk = { 0 } }, /* 13b */ + { .mk = { 0 }, .brk = { 0 } }, /* 13c */ + { .mk = { 0 }, .brk = { 0 } }, /* 13d */ + { .mk = { 0 }, .brk = { 0 } }, /* 13e */ + { .mk = { 0 }, .brk = { 0 } }, /* 13f */ + { .mk = { 0 }, .brk = { 0 } }, /* 140 */ + { .mk = { 0 }, .brk = { 0 } }, /* 141 */ + { .mk = { 0 }, .brk = { 0 } }, /* 142 */ + { .mk = { 0 }, .brk = { 0 } }, /* 143 */ + { .mk = { 0 }, .brk = { 0 } }, /* 144 */ + { .mk = { 0 }, .brk = { 0 } }, /* 145 */ + { .mk = { 0x7E, 0 }, .brk = { 0xF0, 0x7E, 0 } }, /* 146 */ + { .mk = { 0x6C, 0 }, .brk = { 0xF0, 0x6C, 0 } }, /* 147 */ + { .mk = { 0x75, 0 }, .brk = { 0xF0, 0x75, 0 } }, /* 148 */ + { .mk = { 0x7D, 0 }, .brk = { 0xF0, 0x7D, 0 } }, /* 149 */ + { .mk = { 0 }, .brk = { 0 } }, /* 14a */ + { .mk = { 0x6B, 0 }, .brk = { 0xF0, 0x6B, 0 } }, /* 14b */ + { .mk = { 0 }, .brk = { 0 } }, /* 14c */ + { .mk = { 0x74, 0 }, .brk = { 0xF0, 0x74, 0 } }, /* 14d */ + { .mk = { 0 }, .brk = { 0 } }, /* 14e */ + { .mk = { 0x69, 0 }, .brk = { 0xF0, 0x69, 0 } }, /* 14f */ + { .mk = { 0x72, 0 }, .brk = { 0xF0, 0x72, 0 } }, /* 150 */ + { .mk = { 0x7A, 0 }, .brk = { 0xF0, 0x7A, 0 } }, /* 151 */ + { .mk = { 0x70, 0 }, .brk = { 0xF0, 0x70, 0 } }, /* 152 */ + { .mk = { 0x71, 0 }, .brk = { 0xF0, 0x71, 0 } }, /* 153 */ + { .mk = { 0 }, .brk = { 0 } }, /* 154 */ + { .mk = { 0 }, .brk = { 0 } }, /* 155 */ + { .mk = { 0 }, .brk = { 0 } }, /* 156 */ + { .mk = { 0 }, .brk = { 0 } }, /* 157 */ + { .mk = { 0 }, .brk = { 0 } }, /* 158 */ + { .mk = { 0 }, .brk = { 0 } }, /* 159 */ + { .mk = { 0 }, .brk = { 0 } }, /* 15a */ + { .mk = { 0x61, 0 }, .brk = { 0xF0, 0x61, 0 } }, /* 15b */ + { .mk = { 0 }, .brk = { 0 } }, /* 15c */ + { .mk = { 0 }, .brk = { 0 } }, /* 15d */ + { .mk = { 0 }, .brk = { 0 } }, /* 15e */ + { .mk = { 0 }, .brk = { 0 } }, /* 15f */ + { .mk = { 0 }, .brk = { 0 } }, /* 160 */ + { .mk = { 0 }, .brk = { 0 } }, /* 161 */ + { .mk = { 0 }, .brk = { 0 } }, /* 162 */ + { .mk = { 0 }, .brk = { 0 } }, /* 163 */ + { .mk = { 0 }, .brk = { 0 } }, /* 164 */ + { .mk = { 0 }, .brk = { 0 } }, /* 165 */ + { .mk = { 0 }, .brk = { 0 } }, /* 166 */ + { .mk = { 0 }, .brk = { 0 } }, /* 167 */ + { .mk = { 0 }, .brk = { 0 } }, /* 168 */ + { .mk = { 0 }, .brk = { 0 } }, /* 169 */ + { .mk = { 0 }, .brk = { 0 } }, /* 16a */ + { .mk = { 0 }, .brk = { 0 } }, /* 16b */ + { .mk = { 0 }, .brk = { 0 } }, /* 16c */ + { .mk = { 0 }, .brk = { 0 } }, /* 16d */ + { .mk = { 0 }, .brk = { 0 } }, /* 16e */ + { .mk = { 0 }, .brk = { 0 } }, /* 16f */ + { .mk = { 0 }, .brk = { 0 } }, /* 170 */ + { .mk = { 0 }, .brk = { 0 } }, /* 171 */ + { .mk = { 0 }, .brk = { 0 } }, /* 172 */ + { .mk = { 0 }, .brk = { 0 } }, /* 173 */ + { .mk = { 0 }, .brk = { 0 } }, /* 174 */ + { .mk = { 0 }, .brk = { 0 } }, /* 175 */ + { .mk = { 0 }, .brk = { 0 } }, /* 176 */ + { .mk = { 0 }, .brk = { 0 } }, /* 177 */ + { .mk = { 0 }, .brk = { 0 } }, /* 178 */ + { .mk = { 0 }, .brk = { 0 } }, /* 179 */ + { .mk = { 0 }, .brk = { 0 } }, /* 17a */ + { .mk = { 0 }, .brk = { 0 } }, /* 17b */ + { .mk = { 0 }, .brk = { 0 } }, /* 17c */ + { .mk = { 0 }, .brk = { 0 } }, /* 17d */ + { .mk = { 0 }, .brk = { 0 } }, /* 17e */ + { .mk = { 0 }, .brk = { 0 } }, /* 17f */ + { .mk = { 0 }, .brk = { 0 } }, /* 180 */ + { .mk = { 0 }, .brk = { 0 } }, /* 181 */ + { .mk = { 0 }, .brk = { 0 } }, /* 182 */ + { .mk = { 0 }, .brk = { 0 } }, /* 183 */ + { .mk = { 0 }, .brk = { 0 } }, /* 184 */ + { .mk = { 0 }, .brk = { 0 } }, /* 185 */ + { .mk = { 0 }, .brk = { 0 } }, /* 186 */ + { .mk = { 0 }, .brk = { 0 } }, /* 187 */ + { .mk = { 0 }, .brk = { 0 } }, /* 188 */ + { .mk = { 0 }, .brk = { 0 } }, /* 189 */ + { .mk = { 0 }, .brk = { 0 } }, /* 18a */ + { .mk = { 0 }, .brk = { 0 } }, /* 18b */ + { .mk = { 0 }, .brk = { 0 } }, /* 18c */ + { .mk = { 0 }, .brk = { 0 } }, /* 18d */ + { .mk = { 0 }, .brk = { 0 } }, /* 18e */ + { .mk = { 0 }, .brk = { 0 } }, /* 18f */ + { .mk = { 0 }, .brk = { 0 } }, /* 190 */ + { .mk = { 0 }, .brk = { 0 } }, /* 191 */ + { .mk = { 0 }, .brk = { 0 } }, /* 192 */ + { .mk = { 0 }, .brk = { 0 } }, /* 193 */ + { .mk = { 0 }, .brk = { 0 } }, /* 194 */ + { .mk = { 0 }, .brk = { 0 } }, /* 195 */ + { .mk = { 0 }, .brk = { 0 } }, /* 196 */ + { .mk = { 0 }, .brk = { 0 } }, /* 197 */ + { .mk = { 0 }, .brk = { 0 } }, /* 198 */ + { .mk = { 0 }, .brk = { 0 } }, /* 199 */ + { .mk = { 0 }, .brk = { 0 } }, /* 19a */ + { .mk = { 0 }, .brk = { 0 } }, /* 19b */ + { .mk = { 0 }, .brk = { 0 } }, /* 19c */ + { .mk = { 0 }, .brk = { 0 } }, /* 19d */ + { .mk = { 0 }, .brk = { 0 } }, /* 19e */ + { .mk = { 0 }, .brk = { 0 } }, /* 19f */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1aa */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ab */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ac */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ad */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ae */ + { .mk = { 0 }, .brk = { 0 } }, /* 1af */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ba */ + { .mk = { 0 }, .brk = { 0 } }, /* 1bb */ + { .mk = { 0 }, .brk = { 0 } }, /* 1bc */ + { .mk = { 0 }, .brk = { 0 } }, /* 1bd */ + { .mk = { 0 }, .brk = { 0 } }, /* 1be */ + { .mk = { 0 }, .brk = { 0 } }, /* 1bf */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ca */ + { .mk = { 0 }, .brk = { 0 } }, /* 1cb */ + { .mk = { 0 }, .brk = { 0 } }, /* 1cc */ + { .mk = { 0 }, .brk = { 0 } }, /* 1cd */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ce */ + { .mk = { 0 }, .brk = { 0 } }, /* 1cf */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1da */ + { .mk = { 0 }, .brk = { 0 } }, /* 1db */ + { .mk = { 0 }, .brk = { 0 } }, /* 1dc */ + { .mk = { 0 }, .brk = { 0 } }, /* 1dd */ + { .mk = { 0 }, .brk = { 0 } }, /* 1de */ + { .mk = { 0 }, .brk = { 0 } }, /* 1df */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ea */ + { .mk = { 0 }, .brk = { 0 } }, /* 1eb */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ec */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ed */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ee */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ef */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fa */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fb */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fc */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fd */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fe */ + { .mk = { 0 }, .brk = { 0 } } /* 1ff */ + // clang-format on +}; + +const scancode scancode_set1_ax[512] = { + // clang-format off + { .mk = { 0 }, .brk = { 0 } }, /* 000 */ + { .mk = { 0x01, 0 }, .brk = { 0x81, 0 } }, /* 001 */ + { .mk = { 0x02, 0 }, .brk = { 0x82, 0 } }, /* 002 */ + { .mk = { 0x03, 0 }, .brk = { 0x83, 0 } }, /* 003 */ + { .mk = { 0x04, 0 }, .brk = { 0x84, 0 } }, /* 004 */ + { .mk = { 0x05, 0 }, .brk = { 0x85, 0 } }, /* 005 */ + { .mk = { 0x06, 0 }, .brk = { 0x86, 0 } }, /* 006 */ + { .mk = { 0x07, 0 }, .brk = { 0x87, 0 } }, /* 007 */ + { .mk = { 0x08, 0 }, .brk = { 0x88, 0 } }, /* 008 */ + { .mk = { 0x09, 0 }, .brk = { 0x89, 0 } }, /* 009 */ + { .mk = { 0x0a, 0 }, .brk = { 0x8a, 0 } }, /* 00a */ + { .mk = { 0x0b, 0 }, .brk = { 0x8b, 0 } }, /* 00b */ + { .mk = { 0x0c, 0 }, .brk = { 0x8c, 0 } }, /* 00c */ + { .mk = { 0x0d, 0 }, .brk = { 0x8d, 0 } }, /* 00d */ + { .mk = { 0x0e, 0 }, .brk = { 0x8e, 0 } }, /* 00e */ + { .mk = { 0x0f, 0 }, .brk = { 0x8f, 0 } }, /* 00f */ + { .mk = { 0x10, 0 }, .brk = { 0x90, 0 } }, /* 010 */ + { .mk = { 0x11, 0 }, .brk = { 0x91, 0 } }, /* 011 */ + { .mk = { 0x12, 0 }, .brk = { 0x92, 0 } }, /* 012 */ + { .mk = { 0x13, 0 }, .brk = { 0x93, 0 } }, /* 013 */ + { .mk = { 0x14, 0 }, .brk = { 0x94, 0 } }, /* 014 */ + { .mk = { 0x15, 0 }, .brk = { 0x95, 0 } }, /* 015 */ + { .mk = { 0x16, 0 }, .brk = { 0x96, 0 } }, /* 016 */ + { .mk = { 0x17, 0 }, .brk = { 0x97, 0 } }, /* 017 */ + { .mk = { 0x18, 0 }, .brk = { 0x98, 0 } }, /* 018 */ + { .mk = { 0x19, 0 }, .brk = { 0x99, 0 } }, /* 019 */ + { .mk = { 0x1a, 0 }, .brk = { 0x9a, 0 } }, /* 01a */ + { .mk = { 0x1b, 0 }, .brk = { 0x9b, 0 } }, /* 01b */ + { .mk = { 0x1c, 0 }, .brk = { 0x9c, 0 } }, /* 01c */ + { .mk = { 0x1d, 0 }, .brk = { 0x9d, 0 } }, /* 01d */ + { .mk = { 0x1e, 0 }, .brk = { 0x9e, 0 } }, /* 01e */ + { .mk = { 0x1f, 0 }, .brk = { 0x9f, 0 } }, /* 01f */ + { .mk = { 0x20, 0 }, .brk = { 0xa0, 0 } }, /* 020 */ + { .mk = { 0x21, 0 }, .brk = { 0xa1, 0 } }, /* 021 */ + { .mk = { 0x22, 0 }, .brk = { 0xa2, 0 } }, /* 022 */ + { .mk = { 0x23, 0 }, .brk = { 0xa3, 0 } }, /* 023 */ + { .mk = { 0x24, 0 }, .brk = { 0xa4, 0 } }, /* 024 */ + { .mk = { 0x25, 0 }, .brk = { 0xa5, 0 } }, /* 025 */ + { .mk = { 0x26, 0 }, .brk = { 0xa6, 0 } }, /* 026 */ + { .mk = { 0x27, 0 }, .brk = { 0xa7, 0 } }, /* 027 */ + { .mk = { 0x28, 0 }, .brk = { 0xa8, 0 } }, /* 028 */ + { .mk = { 0x2b, 0 }, .brk = { 0xab, 0 } }, /* 029 */ + { .mk = { 0x2a, 0 }, .brk = { 0xaa, 0 } }, /* 02a */ + { .mk = { 0x29, 0 }, .brk = { 0xa9, 0 } }, /* 02b */ + { .mk = { 0x2c, 0 }, .brk = { 0xac, 0 } }, /* 02c */ + { .mk = { 0x2d, 0 }, .brk = { 0xad, 0 } }, /* 02d */ + { .mk = { 0x2e, 0 }, .brk = { 0xae, 0 } }, /* 02e */ + { .mk = { 0x2f, 0 }, .brk = { 0xaf, 0 } }, /* 02f */ + { .mk = { 0x30, 0 }, .brk = { 0xb0, 0 } }, /* 030 */ + { .mk = { 0x31, 0 }, .brk = { 0xb1, 0 } }, /* 031 */ + { .mk = { 0x32, 0 }, .brk = { 0xb2, 0 } }, /* 032 */ + { .mk = { 0x33, 0 }, .brk = { 0xb3, 0 } }, /* 033 */ + { .mk = { 0x34, 0 }, .brk = { 0xb4, 0 } }, /* 034 */ + { .mk = { 0x35, 0 }, .brk = { 0xb5, 0 } }, /* 035 */ + { .mk = { 0x36, 0 }, .brk = { 0xb6, 0 } }, /* 036 */ + { .mk = { 0x37, 0 }, .brk = { 0xb7, 0 } }, /* 037 */ + { .mk = { 0x38, 0 }, .brk = { 0xb8, 0 } }, /* 038 */ + { .mk = { 0x39, 0 }, .brk = { 0xb9, 0 } }, /* 039 */ + { .mk = { 0x3a, 0 }, .brk = { 0xba, 0 } }, /* 03a */ + { .mk = { 0x3b, 0 }, .brk = { 0xbb, 0 } }, /* 03b */ + { .mk = { 0x3c, 0 }, .brk = { 0xbc, 0 } }, /* 03c */ + { .mk = { 0x3d, 0 }, .brk = { 0xbd, 0 } }, /* 03d */ + { .mk = { 0x3e, 0 }, .brk = { 0xbe, 0 } }, /* 03e */ + { .mk = { 0x3f, 0 }, .brk = { 0xbf, 0 } }, /* 03f */ + { .mk = { 0x40, 0 }, .brk = { 0xc0, 0 } }, /* 040 */ + { .mk = { 0x41, 0 }, .brk = { 0xc1, 0 } }, /* 041 */ + { .mk = { 0x42, 0 }, .brk = { 0xc2, 0 } }, /* 042 */ + { .mk = { 0x43, 0 }, .brk = { 0xc3, 0 } }, /* 043 */ + { .mk = { 0x44, 0 }, .brk = { 0xc4, 0 } }, /* 044 */ + { .mk = { 0x45, 0 }, .brk = { 0xc5, 0 } }, /* 045 */ + { .mk = { 0x46, 0 }, .brk = { 0xc6, 0 } }, /* 046 */ + { .mk = { 0x47, 0 }, .brk = { 0xc7, 0 } }, /* 047 */ + { .mk = { 0x48, 0 }, .brk = { 0xc8, 0 } }, /* 048 */ + { .mk = { 0x49, 0 }, .brk = { 0xc9, 0 } }, /* 049 */ + { .mk = { 0x4a, 0 }, .brk = { 0xca, 0 } }, /* 04a */ + { .mk = { 0x4b, 0 }, .brk = { 0xcb, 0 } }, /* 04b */ + { .mk = { 0x4c, 0 }, .brk = { 0xcc, 0 } }, /* 04c */ + { .mk = { 0x4d, 0 }, .brk = { 0xcd, 0 } }, /* 04d */ + { .mk = { 0x4e, 0 }, .brk = { 0xce, 0 } }, /* 04e */ + { .mk = { 0x4f, 0 }, .brk = { 0xcf, 0 } }, /* 04f */ + { .mk = { 0x50, 0 }, .brk = { 0xd0, 0 } }, /* 050 */ + { .mk = { 0x51, 0 }, .brk = { 0xd1, 0 } }, /* 051 */ + { .mk = { 0x52, 0 }, .brk = { 0xd2, 0 } }, /* 052 */ + { .mk = { 0x53, 0 }, .brk = { 0xd3, 0 } }, /* 053 */ + { .mk = { 0x54, 0 }, .brk = { 0xd4, 0 } }, /* 054 */ + { .mk = { 0 }, .brk = { 0 } }, /* 055 */ + { .mk = { 0x56, 0 }, .brk = { 0xd6, 0 } }, /* 054 */ + { .mk = { 0 }, .brk = { 0 } }, /* 057 */ + { .mk = { 0 }, .brk = { 0 } }, /* 058 */ + { .mk = { 0 }, .brk = { 0 } }, /* 059 */ + { .mk = { 0 }, .brk = { 0 } }, /* 05a */ + { .mk = { 0 }, .brk = { 0 } }, /* 05b */ + { .mk = { 0x5c, 0 }, .brk = { 0xdc, 0 } }, /* 05c */ + { .mk = { 0 }, .brk = { 0 } }, /* 05d */ + { .mk = { 0 }, .brk = { 0 } }, /* 05e */ + { .mk = { 0 }, .brk = { 0 } }, /* 05f */ + { .mk = { 0x60, 0 }, .brk = { 0xe0, 0 } }, /* 060 */ + { .mk = { 0x61, 0 }, .brk = { 0xe1, 0 } }, /* 061 */ + { .mk = { 0x62, 0 }, .brk = { 0xe2, 0 } }, /* 062 */ + { .mk = { 0x63, 0 }, .brk = { 0xe3, 0 } }, /* 063 */ + { .mk = { 0x64, 0 }, .brk = { 0xe4, 0 } }, /* 064 */ + { .mk = { 0x65, 0 }, .brk = { 0xe5, 0 } }, /* 065 */ + { .mk = { 0x66, 0 }, .brk = { 0xe6, 0 } }, /* 066 */ + { .mk = { 0x67, 0 }, .brk = { 0xe7, 0 } }, /* 067 */ + { .mk = { 0x68, 0 }, .brk = { 0xe8, 0 } }, /* 068 */ + { .mk = { 0x69, 0 }, .brk = { 0xe9, 0 } }, /* 069 */ + { .mk = { 0x6a, 0 }, .brk = { 0xea, 0 } }, /* 06a */ + { .mk = { 0x6b, 0 }, .brk = { 0xeb, 0 } }, /* 06b */ + { .mk = { 0x6c, 0 }, .brk = { 0xec, 0 } }, /* 06c */ + { .mk = { 0x6d, 0 }, .brk = { 0xed, 0 } }, /* 06d */ + { .mk = { 0x6e, 0 }, .brk = { 0xee, 0 } }, /* 06e */ + { .mk = { 0x6f, 0 }, .brk = { 0xef, 0 } }, /* 06f */ + { .mk = { 0x70, 0 }, .brk = { 0xf0, 0 } }, /* 070 */ + { .mk = { 0x71, 0 }, .brk = { 0xf1, 0 } }, /* 071 */ + { .mk = { 0x72, 0 }, .brk = { 0xf2, 0 } }, /* 072 */ + { .mk = { 0x56, 0 }, .brk = { 0xd6, 0 } }, /* 054 */ + { .mk = { 0x74, 0 }, .brk = { 0xf4, 0 } }, /* 074 */ + { .mk = { 0x75, 0 }, .brk = { 0xf5, 0 } }, /* 075 */ + { .mk = { 0x76, 0 }, .brk = { 0xf6, 0 } }, /* 076 */ + { .mk = { 0x77, 0 }, .brk = { 0xf7, 0 } }, /* 077 */ + { .mk = { 0x78, 0 }, .brk = { 0xf8, 0 } }, /* 078 */ + { .mk = { 0x79, 0 }, .brk = { 0xf9, 0 } }, /* 079 */ + { .mk = { 0x7a, 0 }, .brk = { 0xfa, 0 } }, /* 07a */ + { .mk = { 0x7b, 0 }, .brk = { 0xfb, 0 } }, /* 07b */ + { .mk = { 0x7c, 0 }, .brk = { 0xfc, 0 } }, /* 07c */ + { .mk = { 0x2b, 0 }, .brk = { 0xab, 0 } }, /* 07d */ + { .mk = { 0x7e, 0 }, .brk = { 0xfe, 0 } }, /* 07e */ + { .mk = { 0x7f, 0 }, .brk = { 0xff, 0 } }, /* 07f */ + { .mk = { 0 }, .brk = { 0 } }, /* 080 */ + { .mk = { 0 }, .brk = { 0 } }, /* 081 */ + { .mk = { 0 }, .brk = { 0 } }, /* 082 */ + { .mk = { 0 }, .brk = { 0 } }, /* 083 */ + { .mk = { 0 }, .brk = { 0 } }, /* 084 */ + { .mk = { 0 }, .brk = { 0 } }, /* 085 */ + { .mk = { 0 }, .brk = { 0 } }, /* 086 */ + { .mk = { 0 }, .brk = { 0 } }, /* 087 */ + { .mk = { 0 }, .brk = { 0 } }, /* 088 */ + { .mk = { 0 }, .brk = { 0 } }, /* 089 */ + { .mk = { 0 }, .brk = { 0 } }, /* 08a */ + { .mk = { 0 }, .brk = { 0 } }, /* 08b */ + { .mk = { 0 }, .brk = { 0 } }, /* 08c */ + { .mk = { 0 }, .brk = { 0 } }, /* 08d */ + { .mk = { 0 }, .brk = { 0 } }, /* 08e */ + { .mk = { 0 }, .brk = { 0 } }, /* 08f */ + { .mk = { 0 }, .brk = { 0 } }, /* 090 */ + { .mk = { 0 }, .brk = { 0 } }, /* 091 */ + { .mk = { 0 }, .brk = { 0 } }, /* 092 */ + { .mk = { 0 }, .brk = { 0 } }, /* 093 */ + { .mk = { 0 }, .brk = { 0 } }, /* 094 */ + { .mk = { 0 }, .brk = { 0 } }, /* 095 */ + { .mk = { 0 }, .brk = { 0 } }, /* 096 */ + { .mk = { 0 }, .brk = { 0 } }, /* 097 */ + { .mk = { 0 }, .brk = { 0 } }, /* 098 */ + { .mk = { 0 }, .brk = { 0 } }, /* 099 */ + { .mk = { 0 }, .brk = { 0 } }, /* 09a */ + { .mk = { 0 }, .brk = { 0 } }, /* 09b */ + { .mk = { 0 }, .brk = { 0 } }, /* 09c */ + { .mk = { 0 }, .brk = { 0 } }, /* 09d */ + { .mk = { 0 }, .brk = { 0 } }, /* 09e */ + { .mk = { 0 }, .brk = { 0 } }, /* 09f */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0aa */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ab */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ac */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ad */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ae */ + { .mk = { 0 }, .brk = { 0 } }, /* 0af */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ba */ + { .mk = { 0 }, .brk = { 0 } }, /* 0bb */ + { .mk = { 0 }, .brk = { 0 } }, /* 0bc */ + { .mk = { 0 }, .brk = { 0 } }, /* 0bd */ + { .mk = { 0 }, .brk = { 0 } }, /* 0be */ + { .mk = { 0 }, .brk = { 0 } }, /* 0bf */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ca */ + { .mk = { 0 }, .brk = { 0 } }, /* 0cb */ + { .mk = { 0 }, .brk = { 0 } }, /* 0cc */ + { .mk = { 0 }, .brk = { 0 } }, /* 0cd */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ce */ + { .mk = { 0 }, .brk = { 0 } }, /* 0cf */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0da */ + { .mk = { 0 }, .brk = { 0 } }, /* 0db */ + { .mk = { 0 }, .brk = { 0 } }, /* 0dc */ + { .mk = { 0 }, .brk = { 0 } }, /* 0dd */ + { .mk = { 0 }, .brk = { 0 } }, /* 0de */ + { .mk = { 0 }, .brk = { 0 } }, /* 0df */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ea */ + { .mk = { 0 }, .brk = { 0 } }, /* 0eb */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ec */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ed */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ee */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ef */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f0 */ + { .mk = { 0xf1, 0 }, .brk = { 0 } }, /* 0f1 */ + { .mk = { 0xf2, 0 }, .brk = { 0 } }, /* 0f2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fa */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fb */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fc */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fd */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fe */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ff */ + { .mk = { 0 }, .brk = { 0 } }, /* 100 */ + { .mk = { 0 }, .brk = { 0 } }, /* 101 */ + { .mk = { 0 }, .brk = { 0 } }, /* 102 */ + { .mk = { 0 }, .brk = { 0 } }, /* 103 */ + { .mk = { 0 }, .brk = { 0 } }, /* 104 */ + { .mk = { 0 }, .brk = { 0 } }, /* 105 */ + { .mk = { 0 }, .brk = { 0 } }, /* 106 */ + { .mk = { 0 }, .brk = { 0 } }, /* 107 */ + { .mk = { 0 }, .brk = { 0 } }, /* 108 */ + { .mk = { 0 }, .brk = { 0 } }, /* 109 */ + { .mk = { 0 }, .brk = { 0 } }, /* 10a */ + { .mk = { 0 }, .brk = { 0 } }, /* 10b */ + { .mk = { 0 }, .brk = { 0 } }, /* 10c */ + { .mk = { 0 }, .brk = { 0 } }, /* 10d */ + { .mk = { 0 }, .brk = { 0 } }, /* 10e */ + { .mk = { 0 }, .brk = { 0 } }, /* 10f */ + { .mk = { 0 }, .brk = { 0 } }, /* 110 */ + { .mk = { 0 }, .brk = { 0 } }, /* 111 */ + { .mk = { 0 }, .brk = { 0 } }, /* 112 */ + { .mk = { 0 }, .brk = { 0 } }, /* 113 */ + { .mk = { 0 }, .brk = { 0 } }, /* 114 */ + { .mk = { 0 }, .brk = { 0 } }, /* 115 */ + { .mk = { 0 }, .brk = { 0 } }, /* 116 */ + { .mk = { 0 }, .brk = { 0 } }, /* 117 */ + { .mk = { 0 }, .brk = { 0 } }, /* 118 */ + { .mk = { 0 }, .brk = { 0 } }, /* 119 */ + { .mk = { 0 }, .brk = { 0 } }, /* 11a */ + { .mk = { 0 }, .brk = { 0 } }, /* 11b */ + { .mk = { 0x1c, 0 }, .brk = { 0x9c, 0 } }, /* 11c */ + { .mk = { 0x1d, 0 }, .brk = { 0x9d, 0 } }, /* 11d */ + { .mk = { 0 }, .brk = { 0 } }, /* 11e */ + { .mk = { 0 }, .brk = { 0 } }, /* 11f */ + { .mk = { 0 }, .brk = { 0 } }, /* 120 */ + { .mk = { 0 }, .brk = { 0 } }, /* 121 */ + { .mk = { 0 }, .brk = { 0 } }, /* 122 */ + { .mk = { 0 }, .brk = { 0 } }, /* 123 */ + { .mk = { 0 }, .brk = { 0 } }, /* 124 */ + { .mk = { 0 }, .brk = { 0 } }, /* 125 */ + { .mk = { 0 }, .brk = { 0 } }, /* 126 */ + { .mk = { 0 }, .brk = { 0 } }, /* 127 */ + { .mk = { 0 }, .brk = { 0 } }, /* 128 */ + { .mk = { 0 }, .brk = { 0 } }, /* 129 */ + { .mk = { 0 }, .brk = { 0 } }, /* 12a */ + { .mk = { 0 }, .brk = { 0 } }, /* 12b */ + { .mk = { 0 }, .brk = { 0 } }, /* 12c */ + { .mk = { 0 }, .brk = { 0 } }, /* 12d */ + { .mk = { 0 }, .brk = { 0 } }, /* 12e */ + { .mk = { 0 }, .brk = { 0 } }, /* 12f */ + { .mk = { 0 }, .brk = { 0 } }, /* 130 */ + { .mk = { 0 }, .brk = { 0 } }, /* 131 */ + { .mk = { 0 }, .brk = { 0 } }, /* 132 */ + { .mk = { 0 }, .brk = { 0 } }, /* 133 */ + { .mk = { 0 }, .brk = { 0 } }, /* 134 */ + { .mk = { 0x35, 0 }, .brk = { 0xb5, 0 } }, /* 135 */ + { .mk = { 0 }, .brk = { 0 } }, /* 136 */ + { .mk = { 0x37, 0 }, .brk = { 0xb7, 0 } }, /* 137 */ + { .mk = { 0x38, 0 }, .brk = { 0xb8, 0 } }, /* 138 */ + { .mk = { 0 }, .brk = { 0 } }, /* 139 */ + { .mk = { 0 }, .brk = { 0 } }, /* 13a */ + { .mk = { 0 }, .brk = { 0 } }, /* 13b */ + { .mk = { 0 }, .brk = { 0 } }, /* 13c */ + { .mk = { 0 }, .brk = { 0 } }, /* 13d */ + { .mk = { 0 }, .brk = { 0 } }, /* 13e */ + { .mk = { 0 }, .brk = { 0 } }, /* 13f */ + { .mk = { 0 }, .brk = { 0 } }, /* 140 */ + { .mk = { 0 }, .brk = { 0 } }, /* 141 */ + { .mk = { 0 }, .brk = { 0 } }, /* 142 */ + { .mk = { 0 }, .brk = { 0 } }, /* 143 */ + { .mk = { 0 }, .brk = { 0 } }, /* 144 */ + { .mk = { 0 }, .brk = { 0 } }, /* 145 */ + { .mk = { 0x46, 0 }, .brk = { 0xc6, 0 } }, /* 146 */ + { .mk = { 0x47, 0 }, .brk = { 0xc7, 0 } }, /* 147 */ + { .mk = { 0x48, 0 }, .brk = { 0xc8, 0 } }, /* 148 */ + { .mk = { 0x49, 0 }, .brk = { 0xc9, 0 } }, /* 149 */ + { .mk = { 0 }, .brk = { 0 } }, /* 14a */ + { .mk = { 0x4b, 0 }, .brk = { 0xcb, 0 } }, /* 14b */ + { .mk = { 0 }, .brk = { 0 } }, /* 14c */ + { .mk = { 0x4d, 0 }, .brk = { 0xcd, 0 } }, /* 14d */ + { .mk = { 0 }, .brk = { 0 } }, /* 14e */ + { .mk = { 0x4f, 0 }, .brk = { 0xcf, 0 } }, /* 14f */ + { .mk = { 0x50, 0 }, .brk = { 0xd0, 0 } }, /* 150 */ + { .mk = { 0x51, 0 }, .brk = { 0xd1, 0 } }, /* 151 */ + { .mk = { 0x52, 0 }, .brk = { 0xd2, 0 } }, /* 152 */ + { .mk = { 0x53, 0 }, .brk = { 0xd3, 0 } }, /* 153 */ + { .mk = { 0 }, .brk = { 0 } }, /* 154 */ + { .mk = { 0 }, .brk = { 0 } }, /* 155 */ + { .mk = { 0 }, .brk = { 0 } }, /* 156 */ + { .mk = { 0 }, .brk = { 0 } }, /* 157 */ + { .mk = { 0 }, .brk = { 0 } }, /* 158 */ + { .mk = { 0 }, .brk = { 0 } }, /* 159 */ + { .mk = { 0 }, .brk = { 0 } }, /* 15a */ + { .mk = { 0x5c, 0 }, .brk = { 0xdc, 0 } }, /* 15b */ + { .mk = { 0 }, .brk = { 0 } }, /* 15c */ + { .mk = { 0 }, .brk = { 0 } }, /* 15d */ + { .mk = { 0 }, .brk = { 0 } }, /* 15e */ + { .mk = { 0 }, .brk = { 0 } }, /* 15f */ + { .mk = { 0 }, .brk = { 0 } }, /* 160 */ + { .mk = { 0 }, .brk = { 0 } }, /* 161 */ + { .mk = { 0 }, .brk = { 0 } }, /* 162 */ + { .mk = { 0 }, .brk = { 0 } }, /* 163 */ + { .mk = { 0 }, .brk = { 0 } }, /* 164 */ + { .mk = { 0 }, .brk = { 0 } }, /* 165 */ + { .mk = { 0 }, .brk = { 0 } }, /* 166 */ + { .mk = { 0 }, .brk = { 0 } }, /* 167 */ + { .mk = { 0 }, .brk = { 0 } }, /* 168 */ + { .mk = { 0 }, .brk = { 0 } }, /* 169 */ + { .mk = { 0 }, .brk = { 0 } }, /* 16a */ + { .mk = { 0 }, .brk = { 0 } }, /* 16b */ + { .mk = { 0 }, .brk = { 0 } }, /* 16c */ + { .mk = { 0 }, .brk = { 0 } }, /* 16d */ + { .mk = { 0 }, .brk = { 0 } }, /* 16e */ + { .mk = { 0 }, .brk = { 0 } }, /* 16f */ + { .mk = { 0 }, .brk = { 0 } }, /* 170 */ + { .mk = { 0 }, .brk = { 0 } }, /* 171 */ + { .mk = { 0 }, .brk = { 0 } }, /* 172 */ + { .mk = { 0 }, .brk = { 0 } }, /* 173 */ + { .mk = { 0 }, .brk = { 0 } }, /* 174 */ + { .mk = { 0 }, .brk = { 0 } }, /* 175 */ + { .mk = { 0 }, .brk = { 0 } }, /* 176 */ + { .mk = { 0 }, .brk = { 0 } }, /* 177 */ + { .mk = { 0 }, .brk = { 0 } }, /* 178 */ + { .mk = { 0 }, .brk = { 0 } }, /* 179 */ + { .mk = { 0 }, .brk = { 0 } }, /* 17a */ + { .mk = { 0 }, .brk = { 0 } }, /* 17b */ + { .mk = { 0 }, .brk = { 0 } }, /* 17c */ + { .mk = { 0 }, .brk = { 0 } }, /* 17d */ + { .mk = { 0 }, .brk = { 0 } }, /* 17e */ + { .mk = { 0 }, .brk = { 0 } }, /* 17f */ + { .mk = { 0 }, .brk = { 0 } }, /* 180 */ + { .mk = { 0 }, .brk = { 0 } }, /* 181 */ + { .mk = { 0 }, .brk = { 0 } }, /* 182 */ + { .mk = { 0 }, .brk = { 0 } }, /* 183 */ + { .mk = { 0 }, .brk = { 0 } }, /* 184 */ + { .mk = { 0 }, .brk = { 0 } }, /* 185 */ + { .mk = { 0 }, .brk = { 0 } }, /* 186 */ + { .mk = { 0 }, .brk = { 0 } }, /* 187 */ + { .mk = { 0 }, .brk = { 0 } }, /* 188 */ + { .mk = { 0 }, .brk = { 0 } }, /* 189 */ + { .mk = { 0 }, .brk = { 0 } }, /* 18a */ + { .mk = { 0 }, .brk = { 0 } }, /* 18b */ + { .mk = { 0 }, .brk = { 0 } }, /* 18c */ + { .mk = { 0 }, .brk = { 0 } }, /* 18d */ + { .mk = { 0 }, .brk = { 0 } }, /* 18e */ + { .mk = { 0 }, .brk = { 0 } }, /* 18f */ + { .mk = { 0 }, .brk = { 0 } }, /* 190 */ + { .mk = { 0 }, .brk = { 0 } }, /* 191 */ + { .mk = { 0 }, .brk = { 0 } }, /* 192 */ + { .mk = { 0 }, .brk = { 0 } }, /* 193 */ + { .mk = { 0 }, .brk = { 0 } }, /* 194 */ + { .mk = { 0 }, .brk = { 0 } }, /* 195 */ + { .mk = { 0 }, .brk = { 0 } }, /* 196 */ + { .mk = { 0 }, .brk = { 0 } }, /* 197 */ + { .mk = { 0 }, .brk = { 0 } }, /* 198 */ + { .mk = { 0 }, .brk = { 0 } }, /* 199 */ + { .mk = { 0 }, .brk = { 0 } }, /* 19a */ + { .mk = { 0 }, .brk = { 0 } }, /* 19b */ + { .mk = { 0 }, .brk = { 0 } }, /* 19c */ + { .mk = { 0 }, .brk = { 0 } }, /* 19d */ + { .mk = { 0 }, .brk = { 0 } }, /* 19e */ + { .mk = { 0 }, .brk = { 0 } }, /* 19f */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1aa */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ab */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ac */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ad */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ae */ + { .mk = { 0 }, .brk = { 0 } }, /* 1af */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ba */ + { .mk = { 0 }, .brk = { 0 } }, /* 1bb */ + { .mk = { 0 }, .brk = { 0 } }, /* 1bc */ + { .mk = { 0 }, .brk = { 0 } }, /* 1bd */ + { .mk = { 0 }, .brk = { 0 } }, /* 1be */ + { .mk = { 0 }, .brk = { 0 } }, /* 1bf */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ca */ + { .mk = { 0 }, .brk = { 0 } }, /* 1cb */ + { .mk = { 0 }, .brk = { 0 } }, /* 1cc */ + { .mk = { 0 }, .brk = { 0 } }, /* 1cd */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ce */ + { .mk = { 0 }, .brk = { 0 } }, /* 1cf */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1da */ + { .mk = { 0 }, .brk = { 0 } }, /* 1db */ + { .mk = { 0 }, .brk = { 0 } }, /* 1dc */ + { .mk = { 0 }, .brk = { 0 } }, /* 1dd */ + { .mk = { 0 }, .brk = { 0 } }, /* 1de */ + { .mk = { 0 }, .brk = { 0 } }, /* 1df */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ea */ + { .mk = { 0 }, .brk = { 0 } }, /* 1eb */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ec */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ed */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ee */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ef */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fa */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fb */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fc */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fd */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fe */ + { .mk = { 0 }, .brk = { 0 } } /* 1ff */ + // clang-format on +}; + +const scancode scancode_set2_ax[512] = { + // clang-format off + { .mk = { 0 }, .brk = { 0 } }, /* 000 */ + { .mk = { 0x76, 0 }, .brk = { 0xF0, 0x76, 0 } }, /* 001 */ + { .mk = { 0x16, 0 }, .brk = { 0xF0, 0x16, 0 } }, /* 002 */ + { .mk = { 0x1E, 0 }, .brk = { 0xF0, 0x1E, 0 } }, /* 003 */ + { .mk = { 0x26, 0 }, .brk = { 0xF0, 0x26, 0 } }, /* 004 */ + { .mk = { 0x25, 0 }, .brk = { 0xF0, 0x25, 0 } }, /* 005 */ + { .mk = { 0x2E, 0 }, .brk = { 0xF0, 0x2E, 0 } }, /* 006 */ + { .mk = { 0x36, 0 }, .brk = { 0xF0, 0x36, 0 } }, /* 007 */ + { .mk = { 0x3D, 0 }, .brk = { 0xF0, 0x3D, 0 } }, /* 008 */ + { .mk = { 0x3E, 0 }, .brk = { 0xF0, 0x3E, 0 } }, /* 009 */ + { .mk = { 0x46, 0 }, .brk = { 0xF0, 0x46, 0 } }, /* 00a */ + { .mk = { 0x45, 0 }, .brk = { 0xF0, 0x45, 0 } }, /* 00b */ + { .mk = { 0x4E, 0 }, .brk = { 0xF0, 0x4E, 0 } }, /* 00c */ + { .mk = { 0x55, 0 }, .brk = { 0xF0, 0x55, 0 } }, /* 00d */ + { .mk = { 0x66, 0 }, .brk = { 0xF0, 0x66, 0 } }, /* 00e */ + { .mk = { 0x0D, 0 }, .brk = { 0xF0, 0x0D, 0 } }, /* 00f */ + { .mk = { 0x15, 0 }, .brk = { 0xF0, 0x15, 0 } }, /* 010 */ + { .mk = { 0x1D, 0 }, .brk = { 0xF0, 0x1D, 0 } }, /* 011 */ + { .mk = { 0x24, 0 }, .brk = { 0xF0, 0x24, 0 } }, /* 012 */ + { .mk = { 0x2D, 0 }, .brk = { 0xF0, 0x2D, 0 } }, /* 013 */ + { .mk = { 0x2C, 0 }, .brk = { 0xF0, 0x2C, 0 } }, /* 014 */ + { .mk = { 0x35, 0 }, .brk = { 0xF0, 0x35, 0 } }, /* 015 */ + { .mk = { 0x3C, 0 }, .brk = { 0xF0, 0x3C, 0 } }, /* 016 */ + { .mk = { 0x43, 0 }, .brk = { 0xF0, 0x43, 0 } }, /* 017 */ + { .mk = { 0x44, 0 }, .brk = { 0xF0, 0x44, 0 } }, /* 018 */ + { .mk = { 0x4D, 0 }, .brk = { 0xF0, 0x4D, 0 } }, /* 019 */ + { .mk = { 0x54, 0 }, .brk = { 0xF0, 0x54, 0 } }, /* 01a */ + { .mk = { 0x5B, 0 }, .brk = { 0xF0, 0x5B, 0 } }, /* 01b */ + { .mk = { 0x5A, 0 }, .brk = { 0xF0, 0x5A, 0 } }, /* 01c */ + { .mk = { 0x14, 0 }, .brk = { 0xF0, 0x14, 0 } }, /* 01d */ + { .mk = { 0x1C, 0 }, .brk = { 0xF0, 0x1C, 0 } }, /* 01e */ + { .mk = { 0x1B, 0 }, .brk = { 0xF0, 0x1B, 0 } }, /* 01f */ + { .mk = { 0x23, 0 }, .brk = { 0xF0, 0x23, 0 } }, /* 020 */ + { .mk = { 0x2B, 0 }, .brk = { 0xF0, 0x2B, 0 } }, /* 021 */ + { .mk = { 0x34, 0 }, .brk = { 0xF0, 0x34, 0 } }, /* 022 */ + { .mk = { 0x33, 0 }, .brk = { 0xF0, 0x33, 0 } }, /* 023 */ + { .mk = { 0x3B, 0 }, .brk = { 0xF0, 0x3B, 0 } }, /* 024 */ + { .mk = { 0x42, 0 }, .brk = { 0xF0, 0x42, 0 } }, /* 025 */ + { .mk = { 0x4B, 0 }, .brk = { 0xF0, 0x4B, 0 } }, /* 026 */ + { .mk = { 0x4C, 0 }, .brk = { 0xF0, 0x4C, 0 } }, /* 027 */ + { .mk = { 0x52, 0 }, .brk = { 0xF0, 0x52, 0 } }, /* 028 */ + { .mk = { 0x5D, 0 }, .brk = { 0xF0, 0x5D, 0 } }, /* 029 */ + { .mk = { 0x12, 0 }, .brk = { 0xF0, 0x12, 0 } }, /* 02a */ + { .mk = { 0x0E, 0 }, .brk = { 0xF0, 0x0E, 0 } }, /* 02b */ + { .mk = { 0x1A, 0 }, .brk = { 0xF0, 0x1A, 0 } }, /* 02c */ + { .mk = { 0x22, 0 }, .brk = { 0xF0, 0x22, 0 } }, /* 02d */ + { .mk = { 0x21, 0 }, .brk = { 0xF0, 0x21, 0 } }, /* 02e */ + { .mk = { 0x2A, 0 }, .brk = { 0xF0, 0x2A, 0 } }, /* 02f */ + { .mk = { 0x32, 0 }, .brk = { 0xF0, 0x32, 0 } }, /* 030 */ + { .mk = { 0x31, 0 }, .brk = { 0xF0, 0x31, 0 } }, /* 031 */ + { .mk = { 0x3A, 0 }, .brk = { 0xF0, 0x3A, 0 } }, /* 032 */ + { .mk = { 0x41, 0 }, .brk = { 0xF0, 0x41, 0 } }, /* 033 */ + { .mk = { 0x49, 0 }, .brk = { 0xF0, 0x49, 0 } }, /* 034 */ + { .mk = { 0x4A, 0 }, .brk = { 0xF0, 0x4A, 0 } }, /* 035 */ + { .mk = { 0x59, 0 }, .brk = { 0xF0, 0x59, 0 } }, /* 036 */ + { .mk = { 0x7C, 0 }, .brk = { 0xF0, 0x7C, 0 } }, /* 037 */ + { .mk = { 0x11, 0 }, .brk = { 0xF0, 0x11, 0 } }, /* 038 */ + { .mk = { 0x29, 0 }, .brk = { 0xF0, 0x29, 0 } }, /* 039 */ + { .mk = { 0x58, 0 }, .brk = { 0xF0, 0x58, 0 } }, /* 03a */ + { .mk = { 0x05, 0 }, .brk = { 0xF0, 0x05, 0 } }, /* 03b */ + { .mk = { 0x06, 0 }, .brk = { 0xF0, 0x06, 0 } }, /* 03c */ + { .mk = { 0x04, 0 }, .brk = { 0xF0, 0x04, 0 } }, /* 03d */ + { .mk = { 0x0C, 0 }, .brk = { 0xF0, 0x0C, 0 } }, /* 03e */ + { .mk = { 0x03, 0 }, .brk = { 0xF0, 0x03, 0 } }, /* 03f */ + { .mk = { 0x0B, 0 }, .brk = { 0xF0, 0x0B, 0 } }, /* 040 */ + { .mk = { 0x83, 0 }, .brk = { 0xF0, 0x83, 0 } }, /* 041 */ + { .mk = { 0x0A, 0 }, .brk = { 0xF0, 0x0A, 0 } }, /* 042 */ + { .mk = { 0x01, 0 }, .brk = { 0xF0, 0x01, 0 } }, /* 043 */ + { .mk = { 0x09, 0 }, .brk = { 0xF0, 0x09, 0 } }, /* 044 */ + { .mk = { 0x77, 0 }, .brk = { 0xF0, 0x77, 0 } }, /* 045 */ + { .mk = { 0x7E, 0 }, .brk = { 0xF0, 0x7E, 0 } }, /* 046 */ + { .mk = { 0x6C, 0 }, .brk = { 0xF0, 0x6C, 0 } }, /* 047 */ + { .mk = { 0x75, 0 }, .brk = { 0xF0, 0x75, 0 } }, /* 048 */ + { .mk = { 0x7D, 0 }, .brk = { 0xF0, 0x7D, 0 } }, /* 049 */ + { .mk = { 0x7B, 0 }, .brk = { 0xF0, 0x7B, 0 } }, /* 04a */ + { .mk = { 0x6B, 0 }, .brk = { 0xF0, 0x6B, 0 } }, /* 04b */ + { .mk = { 0x73, 0 }, .brk = { 0xF0, 0x73, 0 } }, /* 04c */ + { .mk = { 0x74, 0 }, .brk = { 0xF0, 0x74, 0 } }, /* 04d */ + { .mk = { 0x79, 0 }, .brk = { 0xF0, 0x79, 0 } }, /* 04e */ + { .mk = { 0x69, 0 }, .brk = { 0xF0, 0x69, 0 } }, /* 04f */ + { .mk = { 0x72, 0 }, .brk = { 0xF0, 0x72, 0 } }, /* 050 */ + { .mk = { 0x7A, 0 }, .brk = { 0xF0, 0x7A, 0 } }, /* 051 */ + { .mk = { 0x70, 0 }, .brk = { 0xF0, 0x70, 0 } }, /* 052 */ + { .mk = { 0x71, 0 }, .brk = { 0xF0, 0x71, 0 } }, /* 053 */ + { .mk = { 0x84, 0 }, .brk = { 0xF0, 0x84, 0 } }, /* 054 */ + { .mk = { 0 }, .brk = { 0 } }, /* 055 */ + { .mk = { 0x61, 0 }, .brk = { 0xF0, 0x61, 0 } }, /* 056 */ + { .mk = { 0 }, .brk = { 0 } }, /* 057 */ + { .mk = { 0 }, .brk = { 0 } }, /* 058 */ + { .mk = { 0 }, .brk = { 0 } }, /* 059 */ + { .mk = { 0 }, .brk = { 0 } }, /* 05a */ + { .mk = { 0 }, .brk = { 0 } }, /* 05b */ + { .mk = { 0x27, 0 }, .brk = { 0xF0, 0x27, 0 } }, /* 05c */ + { .mk = { 0 }, .brk = { 0 } }, /* 05d */ + { .mk = { 0 }, .brk = { 0 } }, /* 05e */ + { .mk = { 0 }, .brk = { 0 } }, /* 05f */ + { .mk = { 0x47, 0 }, .brk = { 0xF0, 0x47, 0 } }, /* 060 */ + { .mk = { 0x4F, 0 }, .brk = { 0xF0, 0x4F, 0 } }, /* 061 */ + { .mk = { 0x56, 0 }, .brk = { 0xF0, 0x56, 0 } }, /* 062 */ + { .mk = { 0x5E, 0 }, .brk = { 0xF0, 0x5E, 0 } }, /* 063 */ + { .mk = { 0x08, 0 }, .brk = { 0xF0, 0x08, 0 } }, /* 064 */ + { .mk = { 0x10, 0 }, .brk = { 0xF0, 0x10, 0 } }, /* 065 */ + { .mk = { 0x18, 0 }, .brk = { 0xF0, 0x18, 0 } }, /* 066 */ + { .mk = { 0x20, 0 }, .brk = { 0xF0, 0x20, 0 } }, /* 067 */ + { .mk = { 0x28, 0 }, .brk = { 0xF0, 0x28, 0 } }, /* 068 */ + { .mk = { 0x30, 0 }, .brk = { 0xF0, 0x30, 0 } }, /* 069 */ + { .mk = { 0x38, 0 }, .brk = { 0xF0, 0x38, 0 } }, /* 06a */ + { .mk = { 0x40, 0 }, .brk = { 0xF0, 0x40, 0 } }, /* 06b */ + { .mk = { 0x48, 0 }, .brk = { 0xF0, 0x48, 0 } }, /* 06c */ + { .mk = { 0x50, 0 }, .brk = { 0xF0, 0x50, 0 } }, /* 06d */ + { .mk = { 0x57, 0 }, .brk = { 0xF0, 0x57, 0 } }, /* 06e */ + { .mk = { 0x6F, 0 }, .brk = { 0xF0, 0x6F, 0 } }, /* 06f */ + { .mk = { 0x13, 0 }, .brk = { 0xF0, 0x13, 0 } }, /* 070 */ + { .mk = { 0x19, 0 }, .brk = { 0xF0, 0x19, 0 } }, /* 071 */ + { .mk = { 0x39, 0 }, .brk = { 0xF0, 0x39, 0 } }, /* 072 */ + { .mk = { 0x5D, 0 }, .brk = { 0xF0, 0x5D, 0 } }, /* 073 */ + { .mk = { 0x53, 0 }, .brk = { 0xF0, 0x53, 0 } }, /* 074 */ + { .mk = { 0x5C, 0 }, .brk = { 0xF0, 0x5C, 0 } }, /* 075 */ + { .mk = { 0x5F, 0 }, .brk = { 0xF0, 0x5F, 0 } }, /* 076 */ + { .mk = { 0x62, 0 }, .brk = { 0xF0, 0x62, 0 } }, /* 077 */ + { .mk = { 0x63, 0 }, .brk = { 0xF0, 0x63, 0 } }, /* 078 */ + { .mk = { 0x64, 0 }, .brk = { 0xF0, 0x64, 0 } }, /* 079 */ + { .mk = { 0x65, 0 }, .brk = { 0xF0, 0x65, 0 } }, /* 07a */ + { .mk = { 0x67, 0 }, .brk = { 0xF0, 0x67, 0 } }, /* 07b */ + { .mk = { 0x68, 0 }, .brk = { 0xF0, 0x68, 0 } }, /* 07c */ + { .mk = { 0x61, 0 }, .brk = { 0xF0, 0x61, 0 } }, /* 07d */ + { .mk = { 0x6D, 0 }, .brk = { 0xF0, 0x6D, 0 } }, /* 07e */ + { .mk = { 0x6E, 0 }, .brk = { 0xF0, 0x6E, 0 } }, /* 07f */ + { .mk = { 0 }, .brk = { 0 } }, /* 080 */ + { .mk = { 0 }, .brk = { 0 } }, /* 081 */ + { .mk = { 0 }, .brk = { 0 } }, /* 082 */ + { .mk = { 0 }, .brk = { 0 } }, /* 083 */ + { .mk = { 0 }, .brk = { 0 } }, /* 084 */ + { .mk = { 0 }, .brk = { 0 } }, /* 085 */ + { .mk = { 0 }, .brk = { 0 } }, /* 086 */ + { .mk = { 0 }, .brk = { 0 } }, /* 087 */ + { .mk = { 0 }, .brk = { 0 } }, /* 088 */ + { .mk = { 0 }, .brk = { 0 } }, /* 089 */ + { .mk = { 0 }, .brk = { 0 } }, /* 08a */ + { .mk = { 0 }, .brk = { 0 } }, /* 08b */ + { .mk = { 0 }, .brk = { 0 } }, /* 08c */ + { .mk = { 0 }, .brk = { 0 } }, /* 08d */ + { .mk = { 0 }, .brk = { 0 } }, /* 08e */ + { .mk = { 0 }, .brk = { 0 } }, /* 08f */ + { .mk = { 0 }, .brk = { 0 } }, /* 090 */ + { .mk = { 0 }, .brk = { 0 } }, /* 091 */ + { .mk = { 0 }, .brk = { 0 } }, /* 092 */ + { .mk = { 0 }, .brk = { 0 } }, /* 093 */ + { .mk = { 0 }, .brk = { 0 } }, /* 094 */ + { .mk = { 0 }, .brk = { 0 } }, /* 095 */ + { .mk = { 0 }, .brk = { 0 } }, /* 096 */ + { .mk = { 0 }, .brk = { 0 } }, /* 097 */ + { .mk = { 0 }, .brk = { 0 } }, /* 098 */ + { .mk = { 0 }, .brk = { 0 } }, /* 099 */ + { .mk = { 0 }, .brk = { 0 } }, /* 09a */ + { .mk = { 0 }, .brk = { 0 } }, /* 09b */ + { .mk = { 0 }, .brk = { 0 } }, /* 09c */ + { .mk = { 0 }, .brk = { 0 } }, /* 09d */ + { .mk = { 0 }, .brk = { 0 } }, /* 09e */ + { .mk = { 0 }, .brk = { 0 } }, /* 09f */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0a9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0aa */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ab */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ac */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ad */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ae */ + { .mk = { 0 }, .brk = { 0 } }, /* 0af */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0b9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ba */ + { .mk = { 0 }, .brk = { 0 } }, /* 0bb */ + { .mk = { 0 }, .brk = { 0 } }, /* 0bc */ + { .mk = { 0 }, .brk = { 0 } }, /* 0bd */ + { .mk = { 0 }, .brk = { 0 } }, /* 0be */ + { .mk = { 0 }, .brk = { 0 } }, /* 0bf */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0c9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ca */ + { .mk = { 0 }, .brk = { 0 } }, /* 0cb */ + { .mk = { 0 }, .brk = { 0 } }, /* 0cc */ + { .mk = { 0 }, .brk = { 0 } }, /* 0cd */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ce */ + { .mk = { 0 }, .brk = { 0 } }, /* 0cf */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0d9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0da */ + { .mk = { 0 }, .brk = { 0 } }, /* 0db */ + { .mk = { 0 }, .brk = { 0 } }, /* 0dc */ + { .mk = { 0 }, .brk = { 0 } }, /* 0dd */ + { .mk = { 0 }, .brk = { 0 } }, /* 0de */ + { .mk = { 0 }, .brk = { 0 } }, /* 0df */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0e9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ea */ + { .mk = { 0 }, .brk = { 0 } }, /* 0eb */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ec */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ed */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ee */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ef */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f0 */ + { .mk = { 0xf1, 0 }, .brk = { 0xf0, 0xf1, 0 } }, /* 0f1 */ + { .mk = { 0xf2, 0 }, .brk = { 0xf0, 0xf2, 0 } }, /* 0f2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0f9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fa */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fb */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fc */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fd */ + { .mk = { 0 }, .brk = { 0 } }, /* 0fe */ + { .mk = { 0 }, .brk = { 0 } }, /* 0ff */ + { .mk = { 0 }, .brk = { 0 } }, /* 100 */ + { .mk = { 0 }, .brk = { 0 } }, /* 101 */ + { .mk = { 0 }, .brk = { 0 } }, /* 102 */ + { .mk = { 0 }, .brk = { 0 } }, /* 103 */ + { .mk = { 0 }, .brk = { 0 } }, /* 104 */ + { .mk = { 0 }, .brk = { 0 } }, /* 105 */ + { .mk = { 0 }, .brk = { 0 } }, /* 106 */ + { .mk = { 0 }, .brk = { 0 } }, /* 107 */ + { .mk = { 0 }, .brk = { 0 } }, /* 108 */ + { .mk = { 0 }, .brk = { 0 } }, /* 109 */ + { .mk = { 0 }, .brk = { 0 } }, /* 10a */ + { .mk = { 0 }, .brk = { 0 } }, /* 10b */ + { .mk = { 0 }, .brk = { 0 } }, /* 10c */ + { .mk = { 0 }, .brk = { 0 } }, /* 10d */ + { .mk = { 0 }, .brk = { 0 } }, /* 10e */ + { .mk = { 0 }, .brk = { 0 } }, /* 10f */ + { .mk = { 0 }, .brk = { 0 } }, /* 110 */ + { .mk = { 0 }, .brk = { 0 } }, /* 111 */ + { .mk = { 0 }, .brk = { 0 } }, /* 112 */ + { .mk = { 0 }, .brk = { 0 } }, /* 113 */ + { .mk = { 0 }, .brk = { 0 } }, /* 114 */ + { .mk = { 0 }, .brk = { 0 } }, /* 115 */ + { .mk = { 0 }, .brk = { 0 } }, /* 116 */ + { .mk = { 0 }, .brk = { 0 } }, /* 117 */ + { .mk = { 0 }, .brk = { 0 } }, /* 118 */ + { .mk = { 0 }, .brk = { 0 } }, /* 119 */ + { .mk = { 0 }, .brk = { 0 } }, /* 11a */ + { .mk = { 0 }, .brk = { 0 } }, /* 11b */ + { .mk = { 0x5A, 0 }, .brk = { 0xF0, 0x5A, 0 } }, /* 11c */ + { .mk = { 0x14, 0 }, .brk = { 0xF0, 0x14, 0 } }, /* 11d */ + { .mk = { 0 }, .brk = { 0 } }, /* 11e */ + { .mk = { 0 }, .brk = { 0 } }, /* 11f */ + { .mk = { 0 }, .brk = { 0 } }, /* 120 */ + { .mk = { 0 }, .brk = { 0 } }, /* 121 */ + { .mk = { 0 }, .brk = { 0 } }, /* 122 */ + { .mk = { 0 }, .brk = { 0 } }, /* 123 */ + { .mk = { 0 }, .brk = { 0 } }, /* 124 */ + { .mk = { 0 }, .brk = { 0 } }, /* 125 */ + { .mk = { 0 }, .brk = { 0 } }, /* 126 */ + { .mk = { 0 }, .brk = { 0 } }, /* 127 */ + { .mk = { 0 }, .brk = { 0 } }, /* 128 */ + { .mk = { 0 }, .brk = { 0 } }, /* 129 */ + { .mk = { 0 }, .brk = { 0 } }, /* 12a */ + { .mk = { 0 }, .brk = { 0 } }, /* 12b */ + { .mk = { 0 }, .brk = { 0 } }, /* 12c */ + { .mk = { 0 }, .brk = { 0 } }, /* 12d */ + { .mk = { 0 }, .brk = { 0 } }, /* 12e */ + { .mk = { 0 }, .brk = { 0 } }, /* 12f */ + { .mk = { 0 }, .brk = { 0 } }, /* 130 */ + { .mk = { 0 }, .brk = { 0 } }, /* 131 */ + { .mk = { 0 }, .brk = { 0 } }, /* 132 */ + { .mk = { 0 }, .brk = { 0 } }, /* 133 */ + { .mk = { 0 }, .brk = { 0 } }, /* 134 */ + { .mk = { 0x4A, 0 }, .brk = { 0xF0, 0x4A, 0 } }, /* 135 */ + { .mk = { 0 }, .brk = { 0 } }, /* 136 */ + { .mk = { 0x7C, 0 }, .brk = { 0xF0, 0x7C, 0 } }, /* 137 */ + { .mk = { 0x11, 0 }, .brk = { 0xF0, 0x11, 0 } }, /* 138 */ + { .mk = { 0 }, .brk = { 0 } }, /* 139 */ + { .mk = { 0 }, .brk = { 0 } }, /* 13a */ + { .mk = { 0 }, .brk = { 0 } }, /* 13b */ + { .mk = { 0 }, .brk = { 0 } }, /* 13c */ + { .mk = { 0 }, .brk = { 0 } }, /* 13d */ + { .mk = { 0 }, .brk = { 0 } }, /* 13e */ + { .mk = { 0 }, .brk = { 0 } }, /* 13f */ + { .mk = { 0 }, .brk = { 0 } }, /* 140 */ + { .mk = { 0 }, .brk = { 0 } }, /* 141 */ + { .mk = { 0 }, .brk = { 0 } }, /* 142 */ + { .mk = { 0 }, .brk = { 0 } }, /* 143 */ + { .mk = { 0 }, .brk = { 0 } }, /* 144 */ + { .mk = { 0 }, .brk = { 0 } }, /* 145 */ + { .mk = { 0x7E, 0 }, .brk = { 0xF0, 0x7E, 0 } }, /* 146 */ + { .mk = { 0x6C, 0 }, .brk = { 0xF0, 0x6C, 0 } }, /* 147 */ + { .mk = { 0x75, 0 }, .brk = { 0xF0, 0x75, 0 } }, /* 148 */ + { .mk = { 0x7D, 0 }, .brk = { 0xF0, 0x7D, 0 } }, /* 149 */ + { .mk = { 0 }, .brk = { 0 } }, /* 14a */ + { .mk = { 0x6B, 0 }, .brk = { 0xF0, 0x6B, 0 } }, /* 14b */ + { .mk = { 0 }, .brk = { 0 } }, /* 14c */ + { .mk = { 0x74, 0 }, .brk = { 0xF0, 0x74, 0 } }, /* 14d */ + { .mk = { 0 }, .brk = { 0 } }, /* 14e */ + { .mk = { 0x69, 0 }, .brk = { 0xF0, 0x69, 0 } }, /* 14f */ + { .mk = { 0x72, 0 }, .brk = { 0xF0, 0x72, 0 } }, /* 150 */ + { .mk = { 0x7A, 0 }, .brk = { 0xF0, 0x7A, 0 } }, /* 151 */ + { .mk = { 0x70, 0 }, .brk = { 0xF0, 0x70, 0 } }, /* 152 */ + { .mk = { 0x71, 0 }, .brk = { 0xF0, 0x71, 0 } }, /* 153 */ + { .mk = { 0 }, .brk = { 0 } }, /* 154 */ + { .mk = { 0 }, .brk = { 0 } }, /* 155 */ + { .mk = { 0 }, .brk = { 0 } }, /* 156 */ + { .mk = { 0 }, .brk = { 0 } }, /* 157 */ + { .mk = { 0 }, .brk = { 0 } }, /* 158 */ + { .mk = { 0 }, .brk = { 0 } }, /* 159 */ + { .mk = { 0 }, .brk = { 0 } }, /* 15a */ + { .mk = { 0x27, 0 }, .brk = { 0xF0, 0x27, 0 } }, /* 15b */ + { .mk = { 0 }, .brk = { 0 } }, /* 15c */ + { .mk = { 0 }, .brk = { 0 } }, /* 15d */ + { .mk = { 0 }, .brk = { 0 } }, /* 15e */ + { .mk = { 0 }, .brk = { 0 } }, /* 15f */ + { .mk = { 0 }, .brk = { 0 } }, /* 160 */ + { .mk = { 0 }, .brk = { 0 } }, /* 161 */ + { .mk = { 0 }, .brk = { 0 } }, /* 162 */ + { .mk = { 0 }, .brk = { 0 } }, /* 163 */ + { .mk = { 0 }, .brk = { 0 } }, /* 164 */ + { .mk = { 0 }, .brk = { 0 } }, /* 165 */ + { .mk = { 0 }, .brk = { 0 } }, /* 166 */ + { .mk = { 0 }, .brk = { 0 } }, /* 167 */ + { .mk = { 0 }, .brk = { 0 } }, /* 168 */ + { .mk = { 0 }, .brk = { 0 } }, /* 169 */ + { .mk = { 0 }, .brk = { 0 } }, /* 16a */ + { .mk = { 0 }, .brk = { 0 } }, /* 16b */ + { .mk = { 0 }, .brk = { 0 } }, /* 16c */ + { .mk = { 0 }, .brk = { 0 } }, /* 16d */ + { .mk = { 0 }, .brk = { 0 } }, /* 16e */ + { .mk = { 0 }, .brk = { 0 } }, /* 16f */ + { .mk = { 0 }, .brk = { 0 } }, /* 170 */ + { .mk = { 0 }, .brk = { 0 } }, /* 171 */ + { .mk = { 0 }, .brk = { 0 } }, /* 172 */ + { .mk = { 0 }, .brk = { 0 } }, /* 173 */ + { .mk = { 0 }, .brk = { 0 } }, /* 174 */ + { .mk = { 0 }, .brk = { 0 } }, /* 175 */ + { .mk = { 0 }, .brk = { 0 } }, /* 176 */ + { .mk = { 0 }, .brk = { 0 } }, /* 177 */ + { .mk = { 0 }, .brk = { 0 } }, /* 178 */ + { .mk = { 0 }, .brk = { 0 } }, /* 179 */ + { .mk = { 0 }, .brk = { 0 } }, /* 17a */ + { .mk = { 0 }, .brk = { 0 } }, /* 17b */ + { .mk = { 0 }, .brk = { 0 } }, /* 17c */ + { .mk = { 0 }, .brk = { 0 } }, /* 17d */ + { .mk = { 0 }, .brk = { 0 } }, /* 17e */ + { .mk = { 0 }, .brk = { 0 } }, /* 17f */ + { .mk = { 0 }, .brk = { 0 } }, /* 180 */ + { .mk = { 0 }, .brk = { 0 } }, /* 181 */ + { .mk = { 0 }, .brk = { 0 } }, /* 182 */ + { .mk = { 0 }, .brk = { 0 } }, /* 183 */ + { .mk = { 0 }, .brk = { 0 } }, /* 184 */ + { .mk = { 0 }, .brk = { 0 } }, /* 185 */ + { .mk = { 0 }, .brk = { 0 } }, /* 186 */ + { .mk = { 0 }, .brk = { 0 } }, /* 187 */ + { .mk = { 0 }, .brk = { 0 } }, /* 188 */ + { .mk = { 0 }, .brk = { 0 } }, /* 189 */ + { .mk = { 0 }, .brk = { 0 } }, /* 18a */ + { .mk = { 0 }, .brk = { 0 } }, /* 18b */ + { .mk = { 0 }, .brk = { 0 } }, /* 18c */ + { .mk = { 0 }, .brk = { 0 } }, /* 18d */ + { .mk = { 0 }, .brk = { 0 } }, /* 18e */ + { .mk = { 0 }, .brk = { 0 } }, /* 18f */ + { .mk = { 0 }, .brk = { 0 } }, /* 190 */ + { .mk = { 0 }, .brk = { 0 } }, /* 191 */ + { .mk = { 0 }, .brk = { 0 } }, /* 192 */ + { .mk = { 0 }, .brk = { 0 } }, /* 193 */ + { .mk = { 0 }, .brk = { 0 } }, /* 194 */ + { .mk = { 0 }, .brk = { 0 } }, /* 195 */ + { .mk = { 0 }, .brk = { 0 } }, /* 196 */ + { .mk = { 0 }, .brk = { 0 } }, /* 197 */ + { .mk = { 0 }, .brk = { 0 } }, /* 198 */ + { .mk = { 0 }, .brk = { 0 } }, /* 199 */ + { .mk = { 0 }, .brk = { 0 } }, /* 19a */ + { .mk = { 0 }, .brk = { 0 } }, /* 19b */ + { .mk = { 0 }, .brk = { 0 } }, /* 19c */ + { .mk = { 0 }, .brk = { 0 } }, /* 19d */ + { .mk = { 0 }, .brk = { 0 } }, /* 19e */ + { .mk = { 0 }, .brk = { 0 } }, /* 19f */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1a9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1aa */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ab */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ac */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ad */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ae */ + { .mk = { 0 }, .brk = { 0 } }, /* 1af */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1b9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ba */ + { .mk = { 0 }, .brk = { 0 } }, /* 1bb */ + { .mk = { 0 }, .brk = { 0 } }, /* 1bc */ + { .mk = { 0 }, .brk = { 0 } }, /* 1bd */ + { .mk = { 0 }, .brk = { 0 } }, /* 1be */ + { .mk = { 0 }, .brk = { 0 } }, /* 1bf */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1c9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ca */ + { .mk = { 0 }, .brk = { 0 } }, /* 1cb */ + { .mk = { 0 }, .brk = { 0 } }, /* 1cc */ + { .mk = { 0 }, .brk = { 0 } }, /* 1cd */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ce */ + { .mk = { 0 }, .brk = { 0 } }, /* 1cf */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1d9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1da */ + { .mk = { 0 }, .brk = { 0 } }, /* 1db */ + { .mk = { 0 }, .brk = { 0 } }, /* 1dc */ + { .mk = { 0 }, .brk = { 0 } }, /* 1dd */ + { .mk = { 0 }, .brk = { 0 } }, /* 1de */ + { .mk = { 0 }, .brk = { 0 } }, /* 1df */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1e9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ea */ + { .mk = { 0 }, .brk = { 0 } }, /* 1eb */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ec */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ed */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ee */ + { .mk = { 0 }, .brk = { 0 } }, /* 1ef */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f0 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f1 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f2 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f3 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f4 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f5 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f6 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f7 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f8 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1f9 */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fa */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fb */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fc */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fd */ + { .mk = { 0 }, .brk = { 0 } }, /* 1fe */ + { .mk = { 0 }, .brk = { 0 } } /* 1ff */ + // clang-format on +}; + +const scancode scancode_set1[512] = { // clang-format off { .mk = { 0 }, .brk = { 0 } }, /* 000 */ { .mk = { 0x01, 0 }, .brk = { 0x81, 0 } }, /* 001 */ @@ -1159,7 +3225,7 @@ static const scancode scancode_set3[512] = { { .mk = { 0x52, 0 }, .brk = { 0xf0, 0x52, 0 } }, /* 028 */ { .mk = { 0x0E, 0 }, .brk = { 0xf0, 0x0E, 0 } }, /* 029 */ { .mk = { 0x12, 0 }, .brk = { 0xf0, 0x12, 0 } }, /* 02a */ - { .mk = { 0x5C, 0 }, .brk = { 0xf0, 0x5C, 0 } }, /* 02b */ + { .mk = {0x8c, 0x2B, 0 }, .brk = { 0xf0, 0x8c, 0x2B, 0 } }, /* 02b */ { .mk = { 0x1A, 0 }, .brk = { 0xf0, 0x1A, 0 } }, /* 02c */ { .mk = { 0x22, 0 }, .brk = { 0xf0, 0x22, 0 } }, /* 02d */ { .mk = { 0x21, 0 }, .brk = { 0xf0, 0x21, 0 } }, /* 02e */ @@ -1202,7 +3268,7 @@ static const scancode scancode_set3[512] = { { .mk = { 0x71, 0 }, .brk = { 0xf0, 0x71, 0 } }, /* 053 */ { .mk = { 0x57, 0 }, .brk = { 0xf0, 0x57, 0 } }, /* 054 */ { .mk = { 0x60, 0 }, .brk = { 0xf0, 0x60, 0 } }, /* 055 */ - { .mk = { 0 }, .brk = { 0 } }, /* 056 */ + { .mk = {0x8c, 0x56, 0 }, .brk = { 0xf0, 0x8c, 0x56, 0 } }, /* 056 */ { .mk = { 0x56, 0 }, .brk = { 0xf0, 0x56, 0 } }, /* 057 */ { .mk = { 0x5E, 0 }, .brk = { 0xf0, 0x5E, 0 } }, /* 058 */ { .mk = { 0 }, .brk = { 0 } }, /* 059 */ @@ -1228,20 +3294,20 @@ static const scancode scancode_set3[512] = { { .mk = { 0x50, 0 }, .brk = { 0xf0, 0x50, 0 } }, /* 06d */ { .mk = { 0 }, .brk = { 0 } }, /* 06e */ { .mk = { 0 }, .brk = { 0 } }, /* 06f */ - { .mk = { 0x87, 0 }, .brk = { 0xf0, 0x87, 0 } }, /* 070 */ + { .mk = {0x8c, 0x70, 0 }, .brk = { 0xf0, 0x8c, 0x70, 0 } }, /* 07d */ { .mk = { 0 }, .brk = { 0 } }, /* 071 */ { .mk = { 0 }, .brk = { 0 } }, /* 072 */ - { .mk = { 0x51, 0 }, .brk = { 0xf0, 0x51, 0 } }, /* 073 */ + { .mk = {0x8c, 0x73, 0 }, .brk = { 0xf0, 0x8c, 0x73, 0 } }, /* 073 */ { .mk = { 0x53, 0 }, .brk = { 0xf0, 0x53, 0 } }, /* 074 */ { .mk = { 0x5C, 0 }, .brk = { 0xf0, 0x5C, 0 } }, /* 075 */ { .mk = { 0 }, .brk = { 0 } }, /* 076 */ { .mk = { 0x62, 0 }, .brk = { 0xf0, 0x62, 0 } }, /* 077 */ { .mk = { 0x63, 0 }, .brk = { 0xf0, 0x63, 0 } }, /* 078 */ - { .mk = { 0x86, 0 }, .brk = { 0xf0, 0x86, 0 } }, /* 079 */ + { .mk = {0x8c, 0x79, 0 }, .brk = { 0xf0, 0x8c, 0x79, 0 } }, /* 079 */ { .mk = { 0 }, .brk = { 0 } }, /* 07a */ - { .mk = { 0x85, 0 }, .brk = { 0xf0, 0x85, 0 } }, /* 07b */ + { .mk = {0x8c, 0x7b, 0 }, .brk = { 0xf0, 0x8c, 0x7b, 0 } }, /* 07b */ { .mk = { 0x68, 0 }, .brk = { 0xf0, 0x68, 0 } }, /* 07c */ - { .mk = { 0x13, 0 }, .brk = { 0xf0, 0x13, 0 } }, /* 07d */ + { .mk = {0x8c, 0x7d, 0 }, .brk = { 0xf0, 0x8c, 0x7d, 0 } }, /* 07d */ { .mk = { 0 }, .brk = { 0 } }, /* 07e */ { .mk = { 0 }, .brk = { 0 } }, /* 07f */ { .mk = { 0x80, 0 }, .brk = { 0xf0, 0x80, 0 } }, /* 080 */ @@ -3229,16 +5295,26 @@ keyboard_at_log(const char *fmt, ...) #endif static void -keyboard_at_set_scancode_set(void) +keyboard_at_set_scancode_set(atkbc_dev_t *dev) { switch (keyboard_mode) { default: case 0x01: - keyboard_set_table(scancode_set1); + if (dev->type & FLAG_AX) + keyboard_set_table(scancode_set1_ax); + else if ((dev->type & FLAG_TYPE_MASK) > KBD_84_KEY) + keyboard_set_table(scancode_set1); + else + keyboard_set_table(scancode_set1_at); break; case 0x02: - keyboard_set_table(scancode_set2); + if (dev->type & FLAG_AX) + keyboard_set_table(scancode_set2_ax); + else if ((dev->type & FLAG_TYPE_MASK) > KBD_84_KEY) + keyboard_set_table(scancode_set2); + else + keyboard_set_table(scancode_set2_at); break; case 0x03: @@ -3274,6 +5350,89 @@ add_data_kbd(uint16_t val) uint8_t num_lock = 0; uint8_t shift_states = 0; + if ((keyboard_mode == 0x03) && (val == 0x8c)) { + is_special = 1; + return; + } else if (is_special) { + uint8_t keys = (dev->type & FLAG_TYPE_MASK); + + switch (val) { + case 0x2b: + switch (keys) { + default: + val = 0x5c; + break; + case KBD_102_KEY: case KBD_JIS: + case KBD_ABNT2: + val = 0x53; + break; + } + break; + case 0x56: + switch (keys) { + default: + val = 0x12; + break; + case KBD_102_KEY: case KBD_ABNT2: + val = 0x13; + break; + } + break; + case 0x70: + switch (keys) { + default: + val = 0x29; + break; + case KBD_JIS: + val = 0x87; + break; + } + break; + case 0x73: + switch (keys) { + default: + val = 0x59; + break; + case KBD_JIS: case KBD_ABNT2: + val = 0x5c; + break; + } + break; + case 0x79: + switch (keys) { + default: + val = 0x29; + break; + case KBD_JIS: + val = 0x86; + break; + } + break; + case 0x7b: + switch (keys) { + default: + val = 0x29; + break; + case KBD_JIS: + val = 0x85; + break; + } + break; + case 0x7d: + switch (keys) { + default: + val = 0x66; + break; + case KBD_JIS: + val = 0x13; + break; + } + break; + } + + is_special = 0; + } + dev->ignore = 1; keyboard_get_states(NULL, &num_lock, NULL, NULL); @@ -3463,7 +5622,9 @@ keyboard_at_set_defaults(atkbc_dev_t *dev) memset(keyboard_set3_flags, 0, 512); keyboard_mode = 0x02; - keyboard_at_set_scancode_set(); + keyboard_at_set_scancode_set(dev); + + is_special = 0; } static void @@ -3530,8 +5691,9 @@ keyboard_at_write(void *priv) case 0x8a: kbc_at_dev_queue_add(dev, 0xfa, 0); /* ACK */ keyboard_mode = val; + is_special = 0; keyboard_at_log("%s: Set scan code set [%02X]\n", dev->name, keyboard_mode); - keyboard_at_set_scancode_set(); + keyboard_at_set_scancode_set(dev); break; default: /* Fatal so any instance of anything attempting to set scan code > 3 can be reported to us. */ @@ -3599,7 +5761,7 @@ keyboard_at_write(void *priv) break; case 0xf0: /* get/set scan code set */ - if (dev->type & FLAG_PS2) { + if (dev->type & FLAG_PS2_KBD) { dev->command = val; keyboard_at_log("%s: scan code set\n", dev->name); dev->flags |= FLAG_CTRLDAT; @@ -3659,11 +5821,11 @@ keyboard_at_write(void *priv) memset(keyboard_set3_flags, 0, 512); keyboard_mode = 0x02; - keyboard_at_set_scancode_set(); + keyboard_at_set_scancode_set(dev); break; case 0xf7: /* set all keys to repeat */ - if (dev->type & FLAG_PS2) { + if (dev->type & FLAG_PS2_KBD) { keyboard_at_log("%s: set all keys to repeat\n", dev->name); kbc_at_dev_queue_add(dev, 0xfa, 0); keyboard_set3_all_break = 1; @@ -3672,7 +5834,7 @@ keyboard_at_write(void *priv) break; case 0xf8: /* set all keys to give make/break codes */ - if (dev->type & FLAG_PS2) { + if (dev->type & FLAG_PS2_KBD) { keyboard_at_log("%s: set all keys to give make/break codes\n", dev->name); kbc_at_dev_queue_add(dev, 0xfa, 0); keyboard_set3_all_break = 1; @@ -3681,7 +5843,7 @@ keyboard_at_write(void *priv) break; case 0xf9: /* set all keys to give make codes only */ - if (dev->type & FLAG_PS2) { + if (dev->type & FLAG_PS2_KBD) { keyboard_at_log("%s: set all keys to give make codes only\n", dev->name); kbc_at_dev_queue_add(dev, 0xfa, 0); keyboard_set3_all_break = 0; @@ -3690,7 +5852,7 @@ keyboard_at_write(void *priv) break; case 0xfa: /* set all keys to repeat and give make/break codes */ - if (dev->type & FLAG_PS2) { + if (dev->type & FLAG_PS2_KBD) { keyboard_at_log("%s: set all keys to repeat and give make/break codes\n", dev->name); kbc_at_dev_queue_add(dev, 0xfa, 0); keyboard_set3_all_repeat = 1; @@ -3791,14 +5953,13 @@ keyboard_at_init(const device_t *info) Key 63 = Japanese key between right Ctrl and right Alt, scan code: 86 (Henkan/Zenkouho 79); Key 65? = Japanese key between right Ctrl and right Alt, scan code: 87 (Hiragana/Katakana 70). */ - dev->type = FLAG_PS2 | KBD_102_KEY /* device_get_config_int("type") */; + dev->type = info->local | device_get_config_int("keys"); + /* We assume that the IBM PS/55 machine uses the 5576-002 keyboard (JP/CN layout) here. This is not smart but suitable for supporting a keyboard ID that is rarely used in standard PCs. At least, the Taiwanese PS/55 uses the same keyboard ID and scancode set. The Korean one is unknown. */ - if (!!strstr(machine_getname(), "PS/55")) - dev->type = FLAG_PS2 | KBD_JIS; keyboard_at_log("%s: type=%d\n", dev->name, dev->type); @@ -3818,7 +5979,9 @@ keyboard_at_init(const device_t *info) SavedKbd = dev; keyboard_update_states(0, 0, 0, 0); - inv_cmd_response = (dev->type & FLAG_PS2) ? 0xfe : 0xfa; + inv_cmd_response = (dev->type & FLAG_PS2_KBD) ? 0xfe : 0xfa; + + is_special = 0; #ifdef SCAN_CODE_TABLES_COMPARISON pclog_toggle_suppr(); @@ -3977,22 +6140,20 @@ keyboard_at_close(void *priv) static const device_config_t keyboard_at_config[] = { // clang-format off { - .name = "type", - .description = "Type", + .name = "keys", + .description = "Keys", .type = CONFIG_SELECTION, .default_string = NULL, - .default_int = 1, + .default_int = KBD_101_KEY, .file_filter = NULL, .spinner = { 0 }, .selection = { - { .description = "AT 84-key", .value = FLAG_AT | KBD_84_KEY }, - { .description = "AT 101/102/106-key", .value = FLAG_AT | KBD_101_KEY }, - { .description = "AT Korean", .value = FLAG_AT | KBD_KOREAN }, - { .description = "PS/2 101-key", .value = FLAG_PS2 | KBD_101_KEY }, - { .description = "PS/2 102-key", .value = FLAG_PS2 | KBD_102_KEY }, - { .description = "PS/2 106-key JIS", .value = FLAG_PS2 | KBD_JIS }, - { .description = "PS/2 Korean", .value = FLAG_PS2 | KBD_KOREAN }, - { .description = "" } + { .description = "84", .value = KBD_84_KEY }, + { .description = "101 (ANSI)", .value = KBD_101_KEY }, + { .description = "102 (ISO)", .value = KBD_102_KEY }, + { .description = "106 (JIS)", .value = KBD_JIS }, + { .description = "103 (KSC)", .value = KBD_KSC }, + { .description = "104 (ABNT2)", .value = KBD_ABNT2 } }, .bios = { { 0 } } }, @@ -4002,12 +6163,36 @@ static const device_config_t keyboard_at_config[] = { // clang-format on }; -/* TODO: Add more keyboard types. */ -const device_t keyboard_at_generic_device = { - .name = "Standard AT or PS/2 Keyboard", - .internal_name = "ps2", - .flags = DEVICE_PS2_KBC, - .local = 0, +static const device_config_t keyboard_ps2_config[] = { + // clang-format off + { + .name = "keys", + .description = "Keys", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = KBD_101_KEY, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "101 (ANSI)", .value = KBD_101_KEY }, + { .description = "102 (ISO)", .value = KBD_102_KEY }, + { .description = "106 (JIS)", .value = KBD_JIS }, + { .description = "103 (KSC)", .value = KBD_KSC }, + { .description = "104 (ABNT2)", .value = KBD_ABNT2 } + }, + .bios = { { 0 } } + }, + { + .name = "", .description = "", .type = CONFIG_END + } + // clang-format on +}; + +const device_t keyboard_at_device = { + .name = "AT Keyboard", + .internal_name = "keyboard_at", + .flags = DEVICE_AT_KBC, + .local = FLAG_AT, .init = keyboard_at_init, .close = keyboard_at_close, .reset = NULL, @@ -4016,3 +6201,60 @@ const device_t keyboard_at_generic_device = { .force_redraw = NULL, .config = keyboard_at_config }; + +const device_t keyboard_ax_device = { + .name = "AX Keyboard", + .internal_name = "keyboard_ax", + .flags = DEVICE_AT_KBC, + .local = FLAG_AX | KBD_JIS, + .init = keyboard_at_init, + .close = keyboard_at_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t keyboard_ps2_device = { + .name = "PS/2 Keyboard", + .internal_name = "keyboard_ps2", + .flags = DEVICE_AT_KBC | DEVICE_PS2_KBC, + .local = FLAG_PS2_KBD, + .init = keyboard_at_init, + .close = keyboard_at_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = keyboard_ps2_config +}; + +const device_t keyboard_ps55_device = { + .name = "PS/55 Keyboard", + .internal_name = "keyboard_ps55", + .flags = DEVICE_AT_KBC | DEVICE_PS2_KBC, + .local = FLAG_PS2_KBD | KBD_JIS, + .init = keyboard_at_init, + .close = keyboard_at_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t keyboard_at_generic_device = { + .name = "AT/PS/2 Keyboard", + .internal_name = "keyboard_at", + .flags = DEVICE_AT_KBC, + .local = KBD_102_KEY, + .init = keyboard_at_init, + .close = keyboard_at_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = keyboard_at_config +}; + diff --git a/src/device/keyboard_xt.c b/src/device/keyboard_xt.c index 5190de839..2936868b0 100644 --- a/src/device/keyboard_xt.c +++ b/src/device/keyboard_xt.c @@ -35,62 +35,8 @@ #include <86box/machine.h> #include <86box/m_xt_t1000.h> #include <86box/cassette.h> -#include <86box/io.h> -#include <86box/pic.h> -#include <86box/pit.h> -#include <86box/ppi.h> -#include <86box/mem.h> -#include <86box/rom.h> -#include <86box/sound.h> -#include <86box/snd_speaker.h> -#include <86box/video.h> #include <86box/keyboard.h> -#define STAT_PARITY 0x80 -#define STAT_RTIMEOUT 0x40 -#define STAT_TTIMEOUT 0x20 -#define STAT_LOCK 0x10 -#define STAT_CD 0x08 -#define STAT_SYSFLAG 0x04 -#define STAT_IFULL 0x02 -#define STAT_OFULL 0x01 - -/* Keyboard Types */ -enum { - KBD_TYPE_PC81 = 0, - KBD_TYPE_PC82, - KBD_TYPE_XT82, - KBD_TYPE_XT86, - KBD_TYPE_COMPAQ, - KBD_TYPE_TANDY, - KBD_TYPE_TOSHIBA, - KBD_TYPE_VTECH, - KBD_TYPE_OLIVETTI, - KBD_TYPE_ZENITH, - KBD_TYPE_PRAVETZ, - KBD_TYPE_HYUNDAI, - KBD_TYPE_FE2010, - KBD_TYPE_XTCLONE -}; - -typedef struct xtkbd_t { - int want_irq; - int blocked; - int tandy; - - uint8_t pa; - uint8_t pb; - uint8_t pd; - uint8_t cfg; - uint8_t clock; - uint8_t key_waiting; - uint8_t type; - uint8_t pravetz_flags; - uint8_t cpu_speed; - - pc_timer_t send_delay_timer; -} xtkbd_t; - /*XT keyboard has no escape scancodes, and no scancodes beyond 53*/ const scancode scancode_xt[512] = { // clang-format off @@ -609,810 +555,66 @@ const scancode scancode_xt[512] = { // clang-format on }; -static uint8_t key_queue[16]; -static int key_queue_start = 0; -static int key_queue_end = 0; -static int is_tandy = 0; -static int is_t1x00 = 0; -static int is_amstrad = 0; - -#ifdef ENABLE_KEYBOARD_XT_LOG -int keyboard_xt_do_log = ENABLE_KEYBOARD_XT_LOG; - -static void -kbd_log(const char *fmt, ...) -{ - va_list ap; - - if (keyboard_xt_do_log) { - va_start(ap, fmt); - pclog_ex(fmt, ap); - va_end(ap); - } -} -#else -# define kbd_log(fmt, ...) -#endif - -static uint8_t -get_fdd_switch_settings(void) -{ - - uint8_t fdd_count = 0; - - for (uint8_t i = 0; i < FDD_NUM; i++) { - if (fdd_get_flags(i)) - fdd_count++; - } - - if (!fdd_count) - return 0x00; - else - return ((fdd_count - 1) << 6) | 0x01; -} - -static uint8_t -get_videomode_switch_settings(void) -{ - - if (video_is_mda()) - return 0x30; - else if (video_is_cga()) - return 0x20; /* 0x10 would be 40x25 */ - else - return 0x00; -} - -static void -kbd_poll(void *priv) -{ - xtkbd_t *kbd = (xtkbd_t *) priv; - - timer_advance_u64(&kbd->send_delay_timer, 1000 * TIMER_USEC); - - if (!(kbd->pb & 0x40) && (kbd->type != KBD_TYPE_TANDY)) - return; - - if (kbd->want_irq) { - kbd->want_irq = 0; - kbd->pa = kbd->key_waiting; - kbd->blocked = 1; - picint(2); -#ifdef ENABLE_KEYBOARD_XT_LOG - kbd_log("XTkbd: kbd_poll(): keyboard_xt : take IRQ\n"); -#endif - } - - if ((key_queue_start != key_queue_end) && !kbd->blocked) { - kbd->key_waiting = key_queue[key_queue_start]; - kbd_log("XTkbd: reading %02X from the key queue at %i\n", - kbd->key_waiting, key_queue_start); - key_queue_start = (key_queue_start + 1) & 0x0f; - kbd->want_irq = 1; - } -} - -static void -kbd_adddata(uint16_t val) -{ - /* Test for T1000 'Fn' key (Right Alt / Right Ctrl) */ - if (is_t1x00) { - if (keyboard_recv(0x138) || keyboard_recv(0x11d)) { /* 'Fn' pressed */ - t1000_syskey(0x00, 0x04, 0x00); /* Set 'Fn' indicator */ - switch (val) { - case 0x45: /* Num Lock => toggle numpad */ - t1000_syskey(0x00, 0x00, 0x10); - break; - case 0x47: /* Home => internal display */ - t1000_syskey(0x40, 0x00, 0x00); - break; - case 0x49: /* PgDn => turbo on */ - t1000_syskey(0x80, 0x00, 0x00); - break; - case 0x4D: /* Right => toggle LCD font */ - t1000_syskey(0x00, 0x00, 0x20); - break; - case 0x4F: /* End => external display */ - t1000_syskey(0x00, 0x40, 0x00); - break; - case 0x51: /* PgDn => turbo off */ - t1000_syskey(0x00, 0x80, 0x00); - break; - case 0x54: /* SysRQ => toggle window */ - t1000_syskey(0x00, 0x00, 0x08); - break; - - default: - break; - } - } else - t1000_syskey(0x04, 0x00, 0x00); /* Reset 'Fn' indicator */ - } - - key_queue[key_queue_end] = val; - kbd_log("XTkbd: %02X added to key queue at %i\n", - val, key_queue_end); - key_queue_end = (key_queue_end + 1) & 0x0f; -} - -void -kbd_adddata_process(uint16_t val, void (*adddata)(uint16_t val)) -{ - uint8_t num_lock = 0; - uint8_t shift_states = 0; - - if (!adddata) - return; - - keyboard_get_states(NULL, &num_lock, NULL, NULL); - shift_states = keyboard_get_shift() & STATE_LSHIFT; - - if (is_amstrad) - num_lock = !num_lock; - - /* If NumLock is on, invert the left shift state so we can always check for - the the same way flag being set (and with NumLock on that then means it - is actually *NOT* set). */ - if (num_lock) - shift_states ^= STATE_LSHIFT; - - switch (val) { - case FAKE_LSHIFT_ON: - /* If NumLock is on, fake shifts are sent when shift is *NOT* presed, - if NumLock is off, fake shifts are sent when shift is pressed. */ - if (shift_states) { - /* Send fake shift. */ - adddata(num_lock ? 0x2a : 0xaa); - } - break; - case FAKE_LSHIFT_OFF: - if (shift_states) { - /* Send fake shift. */ - adddata(num_lock ? 0xaa : 0x2a); - } - break; - default: - adddata(val); - break; - } -} - -static void -kbd_adddata_ex(uint16_t val) -{ - kbd_adddata_process(val, kbd_adddata); -} - -static void -kbd_write(uint16_t port, uint8_t val, void *priv) -{ - xtkbd_t *kbd = (xtkbd_t *) priv; - uint8_t bit; - uint8_t set; - uint8_t new_clock; - - switch (port) { - case 0x61: /* Keyboard Control Register (aka Port B) */ - if (!(val & 0x80) || (kbd->type == KBD_TYPE_HYUNDAI)) { - new_clock = !!(val & 0x40); - if (!kbd->clock && new_clock) { - key_queue_start = key_queue_end = 0; - kbd->want_irq = 0; - kbd->blocked = 0; - kbd_adddata(0xaa); - } - } - - kbd->pb = val; - if (!(kbd->pb & 0x80) || (kbd->type == KBD_TYPE_HYUNDAI)) - kbd->clock = !!(kbd->pb & 0x40); - ppi.pb = val; - - timer_process(); - - if (((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || - (kbd->type == KBD_TYPE_PRAVETZ)) && (cassette != NULL)) - pc_cas_set_motor(cassette, (kbd->pb & 0x08) == 0); - - speaker_update(); - - speaker_gated = val & 1; - speaker_enable = val & 2; - - if (speaker_enable) - was_speaker_enable = 1; - pit_devs[0].set_gate(pit_devs[0].data, 2, val & 1); - - if (val & 0x80) { - kbd->pa = 0; - kbd->blocked = 0; - picintc(2); - } - -#ifdef ENABLE_KEYBOARD_XT_LOG - if ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || (kbd->type == KBD_TYPE_PRAVETZ)) - kbd_log("XTkbd: Cassette motor is %s\n", !(val & 0x08) ? "ON" : "OFF"); -#endif - break; - - case 0x62: /* Switch Register (aka Port C) */ -#ifdef ENABLE_KEYBOARD_XT_LOG - if ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || (kbd->type == KBD_TYPE_PRAVETZ)) - kbd_log("XTkbd: Cassette IN is %i\n", !!(val & 0x10)); -#endif - if (kbd->type == KBD_TYPE_FE2010) { - kbd_log("XTkbd: Switch register in is %02X\n", val); - if (!(kbd->cfg & 0x08)) - kbd->pd = (kbd->pd & 0x30) | (val & 0xcf); - } - break; - - case 0x63: - if (kbd->type == KBD_TYPE_FE2010) { - kbd_log("XTkbd: Configuration register in is %02X\n", val); - if (!(kbd->cfg & 0x08)) - kbd->cfg = val; - } - break; - - case 0xc0 ... 0xcf: /* Pravetz Flags */ - kbd_log("XTkbd: Port %02X out: %02X\n", port, val); - if (kbd->type == KBD_TYPE_PRAVETZ) { - bit = (port >> 1) & 0x07; - set = (port & 0x01) << bit; - kbd->pravetz_flags = (kbd->pravetz_flags & ~(1 << bit)) | set; - } - break; - - case 0x1f0: - kbd_log("XTkbd: Port %04X out: %02X\n", port, val); - if (kbd->type == KBD_TYPE_VTECH) { - kbd->cpu_speed = val; - cpu_dynamic_switch(kbd->cpu_speed >> 7); - } - break; - - default: - break; - } -} - -static uint8_t -kbd_read(uint16_t port, void *priv) -{ - const xtkbd_t *kbd = (xtkbd_t *) priv; - uint8_t ret = 0xff; - - switch (port) { - case 0x60: /* Keyboard Data Register (aka Port A) */ - if ((kbd->pb & 0x80) && ((kbd->type == KBD_TYPE_PC81) || - (kbd->type == KBD_TYPE_PC82) || (kbd->type == KBD_TYPE_PRAVETZ) || - (kbd->type == KBD_TYPE_XT82) || (kbd->type == KBD_TYPE_XT86) || - (kbd->type == KBD_TYPE_XTCLONE) || (kbd->type == KBD_TYPE_COMPAQ) || - (kbd->type == KBD_TYPE_ZENITH) || (kbd->type == KBD_TYPE_HYUNDAI) || - (kbd->type == KBD_TYPE_VTECH))) { - if ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || - (kbd->type == KBD_TYPE_XTCLONE) || (kbd->type == KBD_TYPE_COMPAQ) || - (kbd->type == KBD_TYPE_PRAVETZ) || (kbd->type == KBD_TYPE_HYUNDAI)) - ret = (kbd->pd & ~0x02) | (hasfpu ? 0x02 : 0x00); - else if ((kbd->type == KBD_TYPE_XT82) || (kbd->type == KBD_TYPE_XT86) || - (kbd->type == KBD_TYPE_VTECH)) - /* According to Ruud on the PCem forum, this is supposed to - return 0xFF on the XT. */ - ret = 0xff; - else if (kbd->type == KBD_TYPE_ZENITH) { - /* Zenith Data Systems Z-151 - * SW1 switch settings: - * bits 6-7: floppy drive number - * bits 4-5: video mode - * bit 2-3: base memory size - * bit 1: fpu enable - * bit 0: fdc enable - */ - ret = get_fdd_switch_settings(); - - ret |= get_videomode_switch_settings(); - - /* Base memory size should always be 64k */ - ret |= 0x0c; - - if (hasfpu) - ret |= 0x02; - } - } else - ret = kbd->pa; - break; - - case 0x61: /* Keyboard Control Register (aka Port B) */ - ret = kbd->pb; - break; - - case 0x62: /* Switch Register (aka Port C) */ - if (kbd->type == KBD_TYPE_FE2010) { - if (kbd->pb & 0x04) /* PB2 */ - ret = (kbd->pd & 0x0d) | (hasfpu ? 0x02 : 0x00); - else - ret = kbd->pd >> 4; - } else if ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || - (kbd->type == KBD_TYPE_PRAVETZ)) { - if (kbd->pb & 0x04) /* PB2 */ - switch (mem_size + isa_mem_size) { - case 64: - case 48: - case 32: - case 16: - ret = 0x00; - break; - default: - ret = (((mem_size + isa_mem_size) - 64) / 32) & 0x0f; - break; - } - else - ret = (((mem_size + isa_mem_size) - 64) / 32) >> 4; - } else if ((kbd->type == KBD_TYPE_OLIVETTI) || - (kbd->type == KBD_TYPE_ZENITH)) { - /* Olivetti M19 or Zenith Data Systems Z-151 */ - if (kbd->pb & 0x04) /* PB2 */ - ret = kbd->pd & 0xbf; - else - ret = kbd->pd >> 4; - } else { - if (kbd->pb & 0x08) /* PB3 */ - ret = kbd->pd >> 4; - else - ret = (kbd->pd & 0x0d) | (hasfpu ? 0x02 : 0x00); - } - ret |= (ppispeakon ? 0x20 : 0); - - /* This is needed to avoid error 131 (cassette error). - This is serial read: bit 5 = clock, bit 4 = data, cassette header is 256 x 0xff. */ - if ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || - (kbd->type == KBD_TYPE_PRAVETZ)) { - if (cassette == NULL) - ret |= (ppispeakon ? 0x10 : 0); - else - ret |= (pc_cas_get_inp(cassette) ? 0x10 : 0); - } - - if (kbd->type == KBD_TYPE_TANDY) - ret |= (tandy1k_eeprom_read() ? 0x10 : 0); - break; - - case 0x63: /* Keyboard Configuration Register (aka Port D) */ - if ((kbd->type == KBD_TYPE_XT82) || (kbd->type == KBD_TYPE_XT86) || - (kbd->type == KBD_TYPE_XTCLONE) || (kbd->type == KBD_TYPE_COMPAQ) || - (kbd->type == KBD_TYPE_TOSHIBA) || (kbd->type == KBD_TYPE_HYUNDAI) || - (kbd->type == KBD_TYPE_VTECH)) - ret = kbd->pd; - break; - - case 0xc0: /* Pravetz Flags */ - if (kbd->type == KBD_TYPE_PRAVETZ) - ret = kbd->pravetz_flags; - kbd_log("XTkbd: Port %02X in : %02X\n", port, ret); - break; - - case 0x1f0: - if (kbd->type == KBD_TYPE_VTECH) - ret = kbd->cpu_speed; - kbd_log("XTkbd: Port %04X in : %02X\n", port, ret); - break; - - default: - break; - } - - return ret; -} - -static void -kbd_reset(void *priv) -{ - xtkbd_t *kbd = (xtkbd_t *) priv; - - kbd->want_irq = 0; - kbd->blocked = 0; - kbd->pa = 0x00; - kbd->pb = 0x00; - kbd->pravetz_flags = 0x00; - - keyboard_scan = 1; - - key_queue_start = 0; - key_queue_end = 0; -} - -void -keyboard_set_is_amstrad(int ams) -{ - is_amstrad = ams; -} +typedef struct { + int type; +} kbd_t; static void * kbd_init(const device_t *info) { - xtkbd_t *kbd; + kbd_t *dev = (kbd_t *) calloc(1, sizeof(kbd_t)); - kbd = (xtkbd_t *) calloc(1, sizeof(xtkbd_t)); + dev->type = info->local; - io_sethandler(0x0060, 4, - kbd_read, NULL, NULL, kbd_write, NULL, NULL, kbd); - keyboard_send = kbd_adddata_ex; - kbd->type = info->local; - if (kbd->type == KBD_TYPE_VTECH) - kbd->cpu_speed = (!!cpu) << 2; - kbd_reset(kbd); - if (kbd->type == KBD_TYPE_PRAVETZ) - io_sethandler(0x00c0, 16, - kbd_read, NULL, NULL, kbd_write, NULL, NULL, kbd); - if (kbd->type == KBD_TYPE_VTECH) - io_sethandler(0x01f0, 1, - kbd_read, NULL, NULL, kbd_write, NULL, NULL, kbd); + if (dev->type == KBD_83_KEY) + keyboard_set_table(scancode_xt); + else + keyboard_set_table(scancode_set1); - key_queue_start = key_queue_end = 0; - - video_reset(gfxcard[0]); - - if ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || - (kbd->type == KBD_TYPE_PRAVETZ) || (kbd->type == KBD_TYPE_XT82) || - (kbd->type <= KBD_TYPE_XT86) || (kbd->type == KBD_TYPE_XTCLONE) || - (kbd->type == KBD_TYPE_COMPAQ) || (kbd->type == KBD_TYPE_TOSHIBA) || - (kbd->type == KBD_TYPE_OLIVETTI) || (kbd->type == KBD_TYPE_HYUNDAI) || - (kbd->type == KBD_TYPE_VTECH) || (kbd->type == KBD_TYPE_FE2010)) { - /* DIP switch readout: bit set = OFF, clear = ON. */ - if (kbd->type == KBD_TYPE_OLIVETTI) - /* Olivetti M19 - * Jumpers J1, J2 - monitor type. - * 01 - mono (high-res) - * 10 - color (low-res, disables 640x400x2 mode) - * 00 - autoswitching - */ - kbd->pd |= 0x00; - else - /* Switches 7, 8 - floppy drives. */ - kbd->pd = get_fdd_switch_settings(); - - /* Switches 5, 6 - video card type */ - kbd->pd |= get_videomode_switch_settings(); - - /* Switches 3, 4 - memory size. */ - if ((kbd->type == KBD_TYPE_XT86) || (kbd->type == KBD_TYPE_XTCLONE) || - (kbd->type == KBD_TYPE_HYUNDAI) || (kbd->type == KBD_TYPE_COMPAQ) || - (kbd->type == KBD_TYPE_TOSHIBA) || (kbd->type == KBD_TYPE_FE2010)) { - switch (mem_size) { - case 256: - kbd->pd |= 0x00; - break; - case 512: - kbd->pd |= 0x04; - break; - case 576: - kbd->pd |= 0x08; - break; - case 640: - default: - kbd->pd |= 0x0c; - break; - } - } else if ((kbd->type == KBD_TYPE_XT82) || (kbd->type == KBD_TYPE_VTECH)) { - switch (mem_size) { - case 64: /* 1x64k */ - kbd->pd |= 0x00; - break; - case 128: /* 2x64k */ - kbd->pd |= 0x04; - break; - case 192: /* 3x64k */ - kbd->pd |= 0x08; - break; - case 256: /* 4x64k */ - default: - kbd->pd |= 0x0c; - break; - } - } else if (kbd->type == KBD_TYPE_PC82) { - switch (mem_size) { -#ifdef PC82_192K_3BANK - case 192: /* 3x64k, not supported by stock BIOS due to bugs */ - kbd->pd |= 0x08; - break; -#else - case 192: /* 2x64k + 2x32k */ -#endif - case 64: /* 4x16k */ - case 96: /* 2x32k + 2x16k */ - case 128: /* 4x32k */ - case 160: /* 2x64k + 2x16k */ - case 224: /* 3x64k + 1x32k */ - case 256: /* 4x64k */ - default: - kbd->pd |= 0x0c; - break; - } - } else { /* really just the PC '81 */ - switch (mem_size) { - case 16: /* 1x16k */ - kbd->pd |= 0x00; - break; - case 32: /* 2x16k */ - kbd->pd |= 0x04; - break; - case 48: /* 3x16k */ - kbd->pd |= 0x08; - break; - case 64: /* 4x16k */ - default: - kbd->pd |= 0x0c; - break; - } - } - - /* Switch 2 - 8087 FPU. */ - if (hasfpu) - kbd->pd |= 0x02; - } else if (kbd->type == KBD_TYPE_ZENITH) { - /* Zenith Data Systems Z-151 - * SW2 switch settings: - * bit 7: monitor frequency - * bits 5-6: autoboot (00-11 resident monitor, 10 hdd, 01 fdd) - * bits 0-4: installed memory - */ - kbd->pd = 0x20; - switch (mem_size) { - case 128: - kbd->pd |= 0x02; - break; - case 192: - kbd->pd |= 0x04; - break; - case 256: - kbd->pd |= 0x06; - break; - case 320: - kbd->pd |= 0x08; - break; - case 384: - kbd->pd |= 0x0a; - break; - case 448: - kbd->pd |= 0x0c; - break; - case 512: - kbd->pd |= 0x0e; - break; - case 576: - kbd->pd |= 0x10; - break; - case 640: - default: - kbd->pd |= 0x12; - break; - } - } - - timer_add(&kbd->send_delay_timer, kbd_poll, kbd, 1); - - keyboard_set_table(scancode_xt); - - is_tandy = (kbd->type == KBD_TYPE_TANDY); - is_t1x00 = (kbd->type == KBD_TYPE_TOSHIBA); - - is_amstrad = 0; - - return kbd; + return dev; } static void kbd_close(void *priv) { - xtkbd_t *kbd = (xtkbd_t *) priv; - - /* Stop the timer. */ - timer_disable(&kbd->send_delay_timer); - - /* Disable scanning. */ - keyboard_scan = 0; - - keyboard_send = NULL; - - io_removehandler(0x0060, 4, - kbd_read, NULL, NULL, kbd_write, NULL, NULL, kbd); + kbd_t *kbd = (kbd_t *) priv; free(kbd); } -const device_t keyboard_pc_device = { - .name = "IBM PC Keyboard (1981)", - .internal_name = "keyboard_pc", - .flags = 0, - .local = KBD_TYPE_PC81, - .init = kbd_init, - .close = kbd_close, - .reset = kbd_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL +static const device_config_t keyboard_pc_xt_config[] = { + // clang-format off + { + .name = "keys", + .description = "Keys", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = KBD_83_KEY, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "83", .value = KBD_83_KEY }, + { .description = "101 (ANSI)", .value = KBD_101_KEY }, + { .description = "102 (ISO)", .value = KBD_102_KEY } + }, + .bios = { { 0 } } + }, + { + .name = "", .description = "", .type = CONFIG_END + } + // clang-format on }; -const device_t keyboard_pc82_device = { - .name = "IBM PC Keyboard (1982)", - .internal_name = "keyboard_pc82", - .flags = 0, - .local = KBD_TYPE_PC82, +const device_t keyboard_pc_xt_device = { + .name = "PC/XT Keyboard", + .internal_name = "keyboard_pc_xt", + .flags = DEVICE_XT_KBC, + .local = 0, .init = kbd_init, .close = kbd_close, - .reset = kbd_reset, + .reset = NULL, .available = NULL, .speed_changed = NULL, .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_pravetz_device = { - .name = "Pravetz Keyboard", - .internal_name = "keyboard_pravetz", - .flags = 0, - .local = KBD_TYPE_PRAVETZ, - .init = kbd_init, - .close = kbd_close, - .reset = kbd_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_xt_device = { - .name = "XT (1982) Keyboard", - .internal_name = "keyboard_xt", - .flags = 0, - .local = KBD_TYPE_XT82, - .init = kbd_init, - .close = kbd_close, - .reset = kbd_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_xt86_device = { - .name = "XT (1986) Keyboard", - .internal_name = "keyboard_xt86", - .flags = 0, - .local = KBD_TYPE_XT86, - .init = kbd_init, - .close = kbd_close, - .reset = kbd_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_xt_compaq_device = { - .name = "Compaq Portable Keyboard", - .internal_name = "keyboard_xt_compaq", - .flags = 0, - .local = KBD_TYPE_COMPAQ, - .init = kbd_init, - .close = kbd_close, - .reset = kbd_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_tandy_device = { - .name = "Tandy 1000 Keyboard", - .internal_name = "keyboard_tandy", - .flags = 0, - .local = KBD_TYPE_TANDY, - .init = kbd_init, - .close = kbd_close, - .reset = kbd_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_xt_t1x00_device = { - .name = "Toshiba T1x00 Keyboard", - .internal_name = "keyboard_xt_t1x00", - .flags = 0, - .local = KBD_TYPE_TOSHIBA, - .init = kbd_init, - .close = kbd_close, - .reset = kbd_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_xt_lxt3_device = { - .name = "VTech Laser Turbo XT Keyboard", - .internal_name = "keyboard_xt_lxt", - .flags = 0, - .local = KBD_TYPE_VTECH, - .init = kbd_init, - .close = kbd_close, - .reset = kbd_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_xt_olivetti_device = { - .name = "Olivetti XT Keyboard", - .internal_name = "keyboard_xt_olivetti", - .flags = 0, - .local = KBD_TYPE_OLIVETTI, - .init = kbd_init, - .close = kbd_close, - .reset = kbd_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_xt_zenith_device = { - .name = "Zenith XT Keyboard", - .internal_name = "keyboard_xt_zenith", - .flags = 0, - .local = KBD_TYPE_ZENITH, - .init = kbd_init, - .close = kbd_close, - .reset = kbd_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_xt_hyundai_device = { - .name = "Hyundai XT Keyboard", - .internal_name = "keyboard_xt_hyundai", - .flags = 0, - .local = KBD_TYPE_HYUNDAI, - .init = kbd_init, - .close = kbd_close, - .reset = kbd_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_xt_fe2010_device = { - .name = "Faraday FE2010 XT Keyboard", - .internal_name = "keyboard_xt_fe2010", - .flags = 0, - .local = KBD_TYPE_FE2010, - .init = kbd_init, - .close = kbd_close, - .reset = kbd_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t keyboard_xtclone_device = { - .name = "XT (Clone) Keyboard", - .internal_name = "keyboard_xtclone", - .flags = 0, - .local = KBD_TYPE_XTCLONE, - .init = kbd_init, - .close = kbd_close, - .reset = kbd_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL + .config = keyboard_pc_xt_config }; diff --git a/src/device/lpt.c b/src/device/lpt.c index 4c5578490..1466ea021 100644 --- a/src/device/lpt.c +++ b/src/device/lpt.c @@ -2,15 +2,18 @@ see COPYING for more details */ #include -#include #include +#include +#include #include #include #define HAVE_STDARG_H #include <86box/86box.h> +#include <86box/device.h> #include <86box/io.h> #include <86box/fifo.h> #include <86box/timer.h> +#include <86box/device.h> #include <86box/dma.h> #include <86box/lpt.h> #include <86box/pic.h> @@ -20,8 +23,16 @@ #include <86box/device.h> #include <86box/machine.h> #include <86box/network.h> +#include <86box/plat_fallthrough.h> -lpt_port_t lpt_ports[PARALLEL_MAX]; +static int next_inst = 0; +static int lpt_3bc_used = 0; + +static lpt_t *lpt1; + +lpt_port_t lpt_ports[PARALLEL_MAX]; + +lpt_device_t lpt_devs[PARALLEL_MAX]; const lpt_device_t lpt_none_device = { .name = "None", @@ -35,23 +46,22 @@ const lpt_device_t lpt_none_device = { }; static const struct { - const char *internal_name; const lpt_device_t *device; } lpt_devices[] = { // clang-format off - {"none", &lpt_none_device }, - {"dss", &dss_device }, - {"lpt_dac", &lpt_dac_device }, - {"lpt_dac_stereo", &lpt_dac_stereo_device }, - {"text_prt", &lpt_prt_text_device }, - {"dot_matrix", &lpt_prt_escp_device }, - {"postscript", &lpt_prt_ps_device }, + { &lpt_none_device }, + { &dss_device }, + { &lpt_dac_device }, + { &lpt_dac_stereo_device }, + { &lpt_prt_text_device }, + { &lpt_prt_escp_device }, + { &lpt_prt_ps_device }, #ifdef USE_PCL - {"pcl", &lpt_prt_pcl_device }, + { &lpt_prt_pcl_device }, #endif - {"plip", &lpt_plip_device }, - {"dongle_savquest", &lpt_hasp_savquest_device }, - {"", NULL } + { &lpt_plip_device }, + { &lpt_hasp_savquest_device }, + { NULL } // clang-format on }; @@ -73,31 +83,59 @@ lpt_log(const char *fmt, ...) # define lpt_log(fmt, ...) #endif +const device_t * +lpt_device_getdevice(const int id) +{ + return (device_t *) lpt_devices[id].device->cfgdevice; +} + +int +lpt_device_has_config(const int id) +{ + int c = 0; + const device_t *dev = (device_t *) lpt_devices[id].device->cfgdevice; + const device_config_t *config; + if (dev == NULL) + return 0; + + if (dev->config == NULL) + return 0; + + config = dev->config; + + while (config->type != CONFIG_END) { + c++; + config++; + } + + return (c > 0) ? 1 : 0; +} + const char * lpt_device_get_name(const int id) { - if (strlen(lpt_devices[id].internal_name) == 0) - return NULL; if (lpt_devices[id].device == NULL) - return "None"; + return NULL; + return lpt_devices[id].device->name; } const char * lpt_device_get_internal_name(const int id) { - if (strlen(lpt_devices[id].internal_name) == 0) + if (lpt_devices[id].device == NULL) return NULL; - return lpt_devices[id].internal_name; + + return lpt_devices[id].device->internal_name; } int -lpt_device_get_from_internal_name(const char *s) +lpt_device_get_from_internal_name(const char *str) { int c = 0; - while (strlen(lpt_devices[c].internal_name) != 0) { - if (strcmp(lpt_devices[c].internal_name, s) == 0) + while (lpt_devices[c].device != NULL) { + if (!strcmp(lpt_devices[c].device->internal_name, str)) return c; c++; } @@ -109,10 +147,17 @@ void lpt_devices_init(void) { for (uint8_t i = 0; i < PARALLEL_MAX; i++) { - lpt_ports[i].dt = (lpt_device_t *) lpt_devices[lpt_ports[i].device].device; + lpt_t *dev = lpt_devs[i].lpt; - if (lpt_ports[i].dt && lpt_ports[i].dt->init) - lpt_ports[i].priv = lpt_ports[i].dt->init(&lpt_ports[i]); + if (lpt_devices[lpt_ports[i].device].device != NULL) { + memcpy(&(lpt_devs[i]), (lpt_device_t *) lpt_devices[lpt_ports[i].device].device, sizeof(lpt_device_t)); + + if (lpt_devs[i].init) + lpt_devs[i].priv = lpt_devs[i].init(dev); + } else + memset(&(lpt_devs[i]), 0x00, sizeof(lpt_device_t)); + + lpt_devs[i].lpt = dev; } } @@ -120,22 +165,20 @@ void lpt_devices_close(void) { for (uint8_t i = 0; i < PARALLEL_MAX; i++) { - lpt_port_t *dev = &lpt_ports[i]; + if (lpt_devs[i].close) + lpt_devs[i].close(lpt_devs[i].priv); - if (lpt_ports[i].dt && lpt_ports[i].dt->close) - dev->dt->close(dev->priv); - - dev->dt = NULL; + memset(&(lpt_devs[i]), 0x00, sizeof(lpt_device_t)); } } static uint8_t -lpt_get_ctrl_raw(const lpt_port_t *dev) +lpt_get_ctrl_raw(const lpt_t *dev) { uint8_t ret; - if (dev->dt && dev->dt->read_ctrl && dev->priv) - ret = (dev->dt->read_ctrl(dev->priv) & 0xef) | dev->enable_irq; + if (dev->dt && dev->dt->read_ctrl && dev->dt->priv) + ret = (dev->dt->read_ctrl(dev->dt->priv) & 0xef) | dev->enable_irq; else ret = 0xc0 | dev->ctrl | dev->enable_irq; @@ -143,13 +186,13 @@ lpt_get_ctrl_raw(const lpt_port_t *dev) } static uint8_t -lpt_is_epp(const lpt_port_t *dev) +lpt_is_epp(const lpt_t *dev) { return (dev->epp || ((dev->ecp) && ((dev->ecr & 0xe0) == 0x80))); } static uint8_t -lpt_get_ctrl(const lpt_port_t *dev) +lpt_get_ctrl(const lpt_t *dev) { uint8_t ret = lpt_get_ctrl_raw(dev); @@ -160,7 +203,7 @@ lpt_get_ctrl(const lpt_port_t *dev) } static void -lpt_write_fifo(lpt_port_t *dev, const uint8_t val, const uint8_t tag) +lpt_write_fifo(lpt_t *dev, const uint8_t val, const uint8_t tag) { if (!fifo_get_full(dev->fifo)) { fifo_write_evt_tagged(tag, val, dev->fifo); @@ -171,7 +214,7 @@ lpt_write_fifo(lpt_port_t *dev, const uint8_t val, const uint8_t tag) } static void -lpt_ecp_update_irq(lpt_port_t *dev) +lpt_ecp_update_irq(lpt_t *dev) { if (!(dev->ecr & 0x04) && ((dev->fifo_stat | dev->dma_stat) & 0x04)) picintlevel(1 << dev->irq, &dev->irq_state); @@ -180,19 +223,19 @@ lpt_ecp_update_irq(lpt_port_t *dev) } static void -lpt_autofeed(lpt_port_t *dev, const uint8_t val) +lpt_autofeed(lpt_t *dev, const uint8_t val) { - if (dev->dt && dev->dt->autofeed && dev->priv) - dev->dt->autofeed(val, dev->priv); + if (dev->dt && dev->dt->autofeed && dev->dt->priv) + dev->dt->autofeed(val, dev->dt->priv); dev->autofeed = val; } static void -lpt_strobe(lpt_port_t *dev, const uint8_t val) +lpt_strobe(lpt_t *dev, const uint8_t val) { - if (dev->dt && dev->dt->strobe && dev->priv) - dev->dt->strobe(dev->strobe, val, dev->priv); + if (dev->dt && dev->dt->strobe && dev->dt->priv) + dev->dt->strobe(dev->strobe, val, dev->dt->priv); dev->strobe = val; } @@ -200,7 +243,7 @@ lpt_strobe(lpt_port_t *dev, const uint8_t val) static void lpt_fifo_out_callback(void *priv) { - lpt_port_t *dev = (lpt_port_t *) priv; + lpt_t *dev = (lpt_t *) priv; switch (dev->state) { default: @@ -241,8 +284,8 @@ lpt_fifo_out_callback(void *priv) /* We do not currently support sending commands. */ if (tag == 0x01) { - if (dev->dt && dev->dt->write_data && dev->priv) - dev->dt->write_data(val, dev->priv); + if (dev->dt && dev->dt->write_data && dev->dt->priv) + dev->dt->write_data(val, dev->dt->priv); lpt_strobe(dev, 1); lpt_strobe(dev, 0); @@ -278,10 +321,10 @@ lpt_fifo_out_callback(void *priv) void lpt_write(const uint16_t port, const uint8_t val, void *priv) { - lpt_port_t *dev = (lpt_port_t *) priv; + lpt_t *dev = (lpt_t *) priv; uint16_t mask = 0x0407; - lpt_log("[W] %04X = %02X\n", port, val); + lpt_log("[W] %04X = %02X (ECR = %02X)\n", port, val, dev->ecr); /* This is needed so the parallel port at 3BC works. */ if (dev->addr & 0x0004) @@ -294,15 +337,15 @@ lpt_write(const uint16_t port, const uint8_t val, void *priv) /* AFIFO */ lpt_write_fifo(dev, val, 0x00); else if (!(dev->ecr & 0xc0) && (!(dev->ecr & 0x20) || !(lpt_get_ctrl_raw(dev) & 0x20)) && - dev->dt && dev->dt->write_data && dev->priv) + dev->dt && dev->dt->write_data && dev->dt->priv) /* DATAR */ - dev->dt->write_data(val, dev->priv); + dev->dt->write_data(val, dev->dt->priv); dev->dat = val; } else { /* DTR */ if ((!dev->ext || !(lpt_get_ctrl_raw(dev) & 0x20)) && dev->dt && - dev->dt->write_data && dev->priv) - dev->dt->write_data(val, dev->priv); + dev->dt->write_data && dev->dt->priv) + dev->dt->write_data(val, dev->dt->priv); dev->dat = val; } break; @@ -311,11 +354,11 @@ lpt_write(const uint16_t port, const uint8_t val, void *priv) break; case 0x0002: - if (dev->dt && dev->dt->write_ctrl && dev->priv) { - if (dev->ecp) - dev->dt->write_ctrl((val & 0xfc) | dev->autofeed | dev->strobe, dev->priv); + if (dev->dt && dev->dt->write_ctrl && dev->dt->priv) { + if (dev->ecp && ((dev->ecr & 0xe0) >= 0x20)) + dev->dt->write_ctrl((val & 0xfc) | dev->autofeed | dev->strobe, dev->dt->priv); else - dev->dt->write_ctrl(val, dev->priv); + dev->dt->write_ctrl(val, dev->dt->priv); } dev->ctrl = val; dev->enable_irq = val & 0x10; @@ -326,19 +369,48 @@ lpt_write(const uint16_t port, const uint8_t val, void *priv) case 0x0003: if (lpt_is_epp(dev)) { - if (dev->dt && dev->dt->epp_write_data && dev->priv) - dev->dt->epp_write_data(1, val, dev->priv); + if (dev->dt && dev->dt->epp_write_data && dev->dt->priv) + dev->dt->epp_write_data(1, val, dev->dt->priv); } break; case 0x0004 ... 0x0007: if (lpt_is_epp(dev)) { - if (dev->dt && dev->dt->epp_write_data && dev->priv) - dev->dt->epp_write_data(0, val, dev->priv); + if (dev->dt && dev->dt->epp_write_data && dev->dt->priv) + dev->dt->epp_write_data(0, val, dev->dt->priv); } break; - case 0x0400: case 0x0404: + case 0x0404: + if (dev->cfg_regs_enabled) { + switch (dev->eir) { + case 0x00: + dev->ext_regs[0x00] = val & 0x31; + break; + case 0x02: + dev->ext_regs[0x02] = val & 0xd0; + if (dev->ext_regs[0x02] & 0x80) + dev->ecr = dev->ret_ecr; + else switch (dev->ret_ecr & 0xe0) { + case 0x00: case 0x20: + case 0x80: + dev->ecr = (dev->ret_ecr & 0x1f) | 0x60; + break; + } + break; + case 0x04: + dev->ext_regs[0x00] = val & 0x37; + break; + case 0x05: + dev->ext_regs[0x00] = val; + dev->cnfga_readout = (val & 0x80) ? 0x1c : 0x14; + dev->cnfgb_readout = (dev->cnfgb_readout & 0xc0) | (val & 0x3b); + break; + } + break; + } else + fallthrough; + case 0x0400: switch (dev->ecr >> 5) { default: break; @@ -384,10 +456,23 @@ lpt_write(const uint16_t port, const uint8_t val, void *priv) dev->state = LPT_STATE_IDLE; } - dev->ecr = val; + if (dev->ext_regs[0x02] & 0x80) + dev->ecr = val; + else switch (val & 0xe0) { + case 0x00: case 0x20: + case 0x80: + dev->ecr = (val & 0x1f) | 0x60; + break; + } + dev->ret_ecr = val; lpt_ecp_update_irq(dev); break; + case 0x0403: case 0x0407: + if (dev->cfg_regs_enabled) + dev->eir = val & 0x07; + break; + default: break; } @@ -396,7 +481,7 @@ lpt_write(const uint16_t port, const uint8_t val, void *priv) static void lpt_fifo_d_ready_evt(void *priv) { - lpt_port_t *dev = (lpt_port_t *) priv; + lpt_t *dev = (lpt_t *) priv; if (!(dev->ecr & 0x08)) { if (lpt_get_ctrl_raw(dev) & 0x20) @@ -411,7 +496,7 @@ lpt_fifo_d_ready_evt(void *priv) void lpt_write_to_fifo(void *priv, const uint8_t val) { - lpt_port_t *dev = (lpt_port_t *) priv; + lpt_t *dev = (lpt_t *) priv; if (dev->ecp) { if (((dev->ecr & 0xe0) == 0x20) && (lpt_get_ctrl_raw(dev) & 0x20)) @@ -435,13 +520,13 @@ lpt_write_to_fifo(void *priv, const uint8_t val) void lpt_write_to_dat(void *priv, const uint8_t val) { - lpt_port_t *dev = (lpt_port_t *) priv; + lpt_t *dev = (lpt_t *) priv; dev->dat = val; } static uint8_t -lpt_read_fifo(const lpt_port_t *dev) +lpt_read_fifo(const lpt_t *dev) { uint8_t ret = 0xff; @@ -452,9 +537,8 @@ lpt_read_fifo(const lpt_port_t *dev) } uint8_t -lpt_read_status(const int port) +lpt_read_status(lpt_t *dev) { - lpt_port_t *dev = &lpt_ports[port]; uint8_t low_bits = 0x07; uint8_t ret; @@ -472,20 +556,26 @@ lpt_read_status(const int port) low_bits |= 0x04; } - if (dev->dt && dev->dt->read_status && dev->priv) - ret = (dev->dt->read_status(dev->priv) & 0xf8) | low_bits; + if (dev->dt && dev->dt->read_status && dev->dt->priv) + ret = (dev->dt->read_status(dev->dt->priv) & 0xf8) | low_bits; else ret = 0xd8 | low_bits; return ret; } +uint8_t +lpt_read_ecp_mode(lpt_t *dev) +{ + return ((dev->ret_ecr & 0xe0) == 0x60) ? 0x60 : 0x00; +} + uint8_t lpt_read(const uint16_t port, void *priv) { - const lpt_port_t *dev = (lpt_port_t *) priv; - uint16_t mask = 0x0407; - uint8_t ret = 0xff; + lpt_t *dev = (lpt_t *) priv; + uint16_t mask = 0x0407; + uint8_t ret = 0xff; /* This is needed so the parallel port at 3BC works. */ if (dev->addr & 0x0004) @@ -503,7 +593,7 @@ lpt_read(const uint16_t port, void *priv) break; case 0x0001: - ret = lpt_read_status(dev->id); + ret = lpt_read_status(dev); break; case 0x0002: @@ -514,21 +604,35 @@ lpt_read(const uint16_t port, void *priv) case 0x0003: if (lpt_is_epp(dev)) { - if (dev->dt && dev->dt->epp_request_read && dev->priv) - dev->dt->epp_request_read(1, dev->priv); + if (dev->dt && dev->dt->epp_request_read && dev->dt->priv) + dev->dt->epp_request_read(1, dev->dt->priv); ret = dev->dat; } break; case 0x0004 ... 0x0007: if (lpt_is_epp(dev)) { - if (dev->dt && dev->dt->epp_request_read && dev->priv) - dev->dt->epp_request_read(0, dev->priv); + if (dev->dt && dev->dt->epp_request_read && dev->dt->priv) + dev->dt->epp_request_read(0, dev->dt->priv); ret = dev->dat; } break; - case 0x0400: case 0x0404: + case 0x0404: + if (dev->cfg_regs_enabled) { + switch (dev->eir) { + default: + ret = 0xff; + break; + case 0x00: case 0x02: + case 0x04: case 0x05: + ret = dev->ext_regs[dev->eir]; + break; + } + break; + } else + fallthrough; + case 0x0400: switch (dev->ecr >> 5) { default: break; @@ -543,28 +647,35 @@ lpt_read(const uint16_t port, void *priv) break; case 7: /* CNFGA */ - ret = 0x14; + ret = dev->cnfga_readout; break; } break; - case 0x0401: case 0x0405: + case 0x0405: + if (dev->cfg_regs_enabled) { + ret = 0x00; + break; + } else + fallthrough; + case 0x0401: if ((dev->ecr & 0xe0) == 0xe0) { /* CNFGB */ - ret = 0x08; - ret |= (dev->irq_state ? 0x40 : 0x00); - ret |= ((dev->irq == 0x05) ? 0x30 : 0x00); - if ((dev->dma >= 1) && (dev->dma <= 3)) - ret |= dev->dma; + ret = dev->cnfgb_readout | (dev->irq_state ? 0x40 : 0x00); } break; case 0x0402: case 0x0406: - ret = dev->ecr | dev->fifo_stat | (dev->dma_stat & 0x04); + ret = dev->ret_ecr | dev->fifo_stat | (dev->dma_stat & 0x04); ret |= (fifo_get_full(dev->fifo) ? 0x02 : 0x00); ret |= (fifo_get_empty(dev->fifo) ? 0x01 : 0x00); break; + case 0x0403: case 0x0407: + if (dev->cfg_regs_enabled) + ret = dev->eir; + break; + default: break; } @@ -575,17 +686,15 @@ lpt_read(const uint16_t port, void *priv) } uint8_t -lpt_read_port(const int port, const uint16_t reg) +lpt_read_port(lpt_t *dev, const uint16_t reg) { - lpt_port_t *dev = &(lpt_ports[port]); - return lpt_read(reg, dev); } void lpt_irq(void *priv, const int raise) { - lpt_port_t *dev = (lpt_port_t *) priv; + lpt_t *dev = (lpt_t *) priv; if (dev->enable_irq) { if (dev->irq != 0xff) { @@ -617,79 +726,163 @@ lpt_irq(void *priv, const int raise) } void -lpt_set_ext(const int port, const uint8_t ext) +lpt_set_ext(lpt_t *dev, const uint8_t ext) { - if (lpt_ports[port].enabled) - lpt_ports[port].ext = ext; + if (lpt_ports[dev->id].enabled) + dev->ext = ext; } void -lpt_set_ecp(const int port, const uint8_t ecp) +lpt_set_ecp(lpt_t *dev, const uint8_t ecp) { - if (lpt_ports[port].enabled) - lpt_ports[port].ecp = ecp; + if (lpt_ports[dev->id].enabled) + dev->ecp = ecp; } void -lpt_set_epp(const int port, const uint8_t epp) +lpt_set_epp(lpt_t *dev, const uint8_t epp) { - if (lpt_ports[port].enabled) - lpt_ports[port].epp = epp; + if (lpt_ports[dev->id].enabled) + dev->epp = epp; } void -lpt_set_lv2(const int port, const uint8_t lv2) +lpt_set_lv2(lpt_t *dev, const uint8_t lv2) { - if (lpt_ports[port].enabled) - lpt_ports[port].lv2 = lv2; + if (lpt_ports[dev->id].enabled) + dev->lv2 = lv2; } void -lpt_set_fifo_threshold(const int port, const int threshold) +lpt_set_fifo_threshold(lpt_t *dev, const int threshold) { - if (lpt_ports[port].enabled) - fifo_set_trigger_len(lpt_ports[port].fifo, threshold); + if (lpt_ports[dev->id].enabled) + fifo_set_trigger_len(dev->fifo, threshold); } void -lpt_close(void) +lpt_set_cfg_regs_enabled(lpt_t *dev, const uint8_t cfg_regs_enabled) { - for (uint8_t i = 0; i < PARALLEL_MAX; i++) { - if (lpt_ports[i].enabled) { - fifo_close(lpt_ports[i].fifo); - lpt_ports[i].fifo = NULL; + if (lpt_ports[dev->id].enabled) + dev->cfg_regs_enabled = cfg_regs_enabled; +} - timer_disable(&lpt_ports[i].fifo_out_timer); +void +lpt_set_cnfga_readout(lpt_t *dev, const uint8_t cnfga_readout) +{ + if (lpt_ports[dev->id].enabled) + dev->cnfga_readout = cnfga_readout; +} + +void +lpt_set_cnfgb_readout(lpt_t *dev, const uint8_t cnfgb_readout) +{ + if (lpt_ports[dev->id].enabled) + dev->cnfgb_readout = (dev->cnfgb_readout & 0xc0) | (cnfgb_readout & 0x3f); +} + +void +lpt_port_setup(lpt_t *dev, const uint16_t port) +{ + if (lpt_ports[dev->id].enabled) { + if ((dev->addr != 0x0000) && (dev->addr != 0xffff)) { + io_removehandler(dev->addr, 0x0007, lpt_read, NULL, NULL, lpt_write, NULL, NULL, dev); + io_removehandler(dev->addr + 0x0400, 0x0007, lpt_read, NULL, NULL, lpt_write, NULL, NULL, dev); } + if ((port != 0x0000) && (port != 0xffff)) { + lpt_log("Set handler: %04X-%04X\n", port, port + 0x0003); + io_sethandler(port, 0x0003, lpt_read, NULL, NULL, lpt_write, NULL, NULL, dev); + if (dev->epp) + io_sethandler(port + 0x0003, 0x0005, lpt_read, NULL, NULL, lpt_write, NULL, NULL, dev); + if (dev->ecp || dev->lv2) { + io_sethandler(port + 0x0400, 0x0003, lpt_read, NULL, NULL, lpt_write, NULL, NULL, dev); + if (dev->epp) + io_sethandler(port + 0x0404, 0x0003, lpt_read, NULL, NULL, lpt_write, NULL, NULL, dev); + } + } + dev->addr = port; + } else + dev->addr = 0xffff; +} + +void +lpt_port_irq(lpt_t *dev, const uint8_t irq) +{ + if (lpt_ports[dev->id].enabled) + dev->irq = irq; + else + dev->irq = 0xff; + + lpt_log("Port %i IRQ = %02X\n", dev->id, irq); +} + +void +lpt_port_dma(lpt_t *dev, const uint8_t dma) +{ + if (lpt_ports[dev->id].enabled) + dev->dma = dma; + else + dev->dma = 0xff; + + lpt_log("Port %i DMA = %02X\n", dev->id, dma); +} + +void +lpt1_dma(const uint8_t dma) +{ + if (lpt1 != NULL) + lpt_port_dma(lpt1, dma); +} + +void +lpt_port_remove(lpt_t *dev) +{ + if (lpt_ports[dev->id].enabled && (dev->addr != 0xffff)) { + io_removehandler(dev->addr, 0x0007, lpt_read, NULL, NULL, lpt_write, NULL, NULL, dev); + io_removehandler(dev->addr + 0x0400, 0x0007, lpt_read, NULL, NULL, lpt_write, NULL, NULL, dev); + + dev->addr = 0xffff; } } void -lpt_port_zero(lpt_port_t *dev) +lpt1_remove_ams(lpt_t *dev) { - lpt_port_t temp = { 0 }; + if (dev->enabled) + io_removehandler(dev->addr + 1, 0x0002, lpt_read, NULL, NULL, lpt_write, NULL, NULL, dev); +} + +void +lpt_speed_changed(void *priv) +{ + lpt_t *dev = (lpt_t *) priv; + + if (timer_is_enabled(&dev->fifo_out_timer)) { + timer_disable(&dev->fifo_out_timer); + timer_set_delay_u64(&dev->fifo_out_timer, (uint64_t) ((1000000.0 / 2500000.0) * (double) TIMER_USEC)); + } +} + +void +lpt_port_zero(lpt_t *dev) +{ + lpt_t temp = { 0 }; temp.irq = dev->irq; temp.id = dev->id; - temp.device = dev->device; temp.dt = dev->dt; - temp.priv = dev->priv; - temp.enabled = dev->enabled; temp.fifo = dev->fifo; temp.fifo_out_timer = dev->fifo_out_timer; - if (dev->enabled) - lpt_port_remove(dev->id); + if (lpt_ports[dev->id].enabled) + lpt_port_remove(dev); - memset(dev, 0x00, sizeof(lpt_port_t)); + memset(dev, 0x00, sizeof(lpt_t)); dev->addr = 0xffff; dev->irq = temp.irq; dev->id = temp.id; - dev->device = temp.device; dev->dt = temp.dt; - dev->priv = temp.priv; - dev->enabled = temp.enabled; dev->fifo = temp.fifo; dev->fifo_out_timer = temp.fifo_out_timer; @@ -697,138 +890,171 @@ lpt_port_zero(lpt_port_t *dev) dev->ext = 1; } -void -lpt_reset(void) +static void +lpt_close(void *priv) { - for (uint8_t i = 0; i < PARALLEL_MAX; i++) { - if (lpt_ports[i].enabled) - if (timer_is_enabled(&lpt_ports[i].fifo_out_timer)) - timer_disable(&lpt_ports[i].fifo_out_timer); + lpt_t *dev = (lpt_t *) priv; - lpt_port_zero(&(lpt_ports[i])); + if (lpt_ports[dev->id].enabled) { + fifo_close(dev->fifo); + dev->fifo = NULL; - if (lpt_ports[i].enabled) { - if (lpt_ports[i].irq_state) { - if (lpt_ports[i].irq == 0xff) - lpt_ports[i].irq_state = 0x00; - else { - picintclevel(lpt_ports[i].irq, &lpt_ports[i].irq_state); - picintc(lpt_ports[i].irq); - } + timer_disable(&dev->fifo_out_timer); + + } + + if (lpt1 == dev) + lpt1 = NULL; + + free(dev); +} + +static void +lpt_reset(void *priv) +{ + lpt_t *dev = (lpt_t *) priv; + + if (lpt_ports[dev->id].enabled) + if (timer_is_enabled(&dev->fifo_out_timer)) + timer_disable(&dev->fifo_out_timer); + + lpt_port_zero(dev); + + if (lpt_ports[dev->id].enabled) { + if (dev->irq_state) { + if (dev->irq == 0xff) + dev->irq_state = 0x00; + else { + picintclevel(dev->irq, &dev->irq_state); + picintc(dev->irq); } - - lpt_ports[i].enable_irq = 0x00; - lpt_ports[i].ext = !!(machine_has_bus(machine, MACHINE_BUS_MCA)); - lpt_ports[i].epp = 0; - lpt_ports[i].ecp = 0; - lpt_ports[i].ecr = 0x15; - lpt_ports[i].dat = 0xff; - lpt_ports[i].fifo_stat = 0x00; - lpt_ports[i].dma_stat = 0x00; } + + dev->enable_irq = 0x00; + dev->cfg_regs_enabled = 0; + dev->ext = !!(machine_has_bus(machine, MACHINE_BUS_MCA)); + dev->epp = 0; + dev->ecp = 0; + dev->ecr = 0x15; + dev->ret_ecr = 0x15; + dev->dat = 0xff; + dev->fifo_stat = 0x00; + dev->dma_stat = 0x00; + + memset(dev->ext_regs, 0x00, 8); + dev->ext_regs[0x02] = 0x80; + dev->ext_regs[0x04] = 0x07; + dev->cnfga_readout &= 0xf7; } } -void -lpt_init(void) +static void * +lpt_init(const device_t *info) { + lpt_t *dev = (lpt_t *) calloc(1, sizeof(lpt_t)); + int orig_inst = next_inst; + const uint16_t default_ports[PARALLEL_MAX] = { LPT1_ADDR, LPT2_ADDR, LPT_MDA_ADDR, LPT4_ADDR }; const uint8_t default_irqs[PARALLEL_MAX] = { LPT1_IRQ, LPT2_IRQ, LPT_MDA_IRQ, LPT4_IRQ }; - for (uint8_t i = 0; i < PARALLEL_MAX; i++) { - lpt_ports[i].id = i; - lpt_ports[i].dt = NULL; - lpt_ports[i].priv = NULL; - lpt_ports[i].fifo = NULL; - memset(&lpt_ports[i].fifo_out_timer, 0x00, sizeof(pc_timer_t)); + if (info->local & 0xFFF00000) + next_inst = PARALLEL_MAX - 1; - lpt_port_zero(&(lpt_ports[i])); + dev->id = next_inst; - lpt_ports[i].addr = 0xffff; - lpt_ports[i].irq = 0xff; - lpt_ports[i].dma = 0xff; - lpt_ports[i].enable_irq = 0x00; - lpt_ports[i].ext = 0; - lpt_ports[i].epp = 0; - lpt_ports[i].ecp = 0; - lpt_ports[i].ecr = 0x15; + if (lpt_ports[next_inst].enabled || (info->local & 0xFFF00000)) { + lpt_log("Adding parallel port %i...\n", next_inst); + dev->dt = &(lpt_devs[next_inst]); + dev->dt->lpt = dev; - if (lpt_ports[i].enabled) { - lpt_port_setup(i, default_ports[i]); - lpt_port_irq(i, default_irqs[i]); + dev->fifo = NULL; + memset(&dev->fifo_out_timer, 0x00, sizeof(pc_timer_t)); - lpt_ports[i].fifo = fifo16_init(); + lpt_port_zero(dev); - fifo_set_trigger_len(lpt_ports[i].fifo, 8); + dev->addr = 0xffff; + dev->irq = 0xff; + if ((jumpered_internal_ecp_dma >= 0) && (jumpered_internal_ecp_dma != 4)) + dev->dma = jumpered_internal_ecp_dma; + else + dev->dma = 0xff; + dev->enable_irq = 0x00; + dev->cfg_regs_enabled = 0; + dev->ext = 0; + dev->epp = 0; + dev->ecp = 0; + dev->ecr = 0x15; + dev->ret_ecr = 0x15; + dev->cnfga_readout = 0x10; + dev->cnfgb_readout = 0x00; - fifo_set_d_ready_evt(lpt_ports[i].fifo, lpt_fifo_d_ready_evt); - fifo_set_priv(lpt_ports[i].fifo, &lpt_ports[i]); + memset(dev->ext_regs, 0x00, 8); + dev->ext_regs[0x02] = 0x80; - timer_add(&lpt_ports[i].fifo_out_timer, lpt_fifo_out_callback, &lpt_ports[i], 0); - } - } -} - -void -lpt_port_setup(const int i, const uint16_t port) -{ - if (lpt_ports[i].enabled) { - if ((lpt_ports[i].addr != 0x0000) && (lpt_ports[i].addr != 0xffff)) { - io_removehandler(lpt_ports[i].addr, 0x0007, lpt_read, NULL, NULL, lpt_write, NULL, NULL, &lpt_ports[i]); - io_removehandler(lpt_ports[i].addr + 0x0400, 0x0007, lpt_read, NULL, NULL, lpt_write, NULL, NULL, &lpt_ports[i]); - } - if ((port != 0x0000) && (port != 0xffff)) { - lpt_log("Set handler: %04X-%04X\n", port, port + 0x0003); - io_sethandler(port, 0x0003, lpt_read, NULL, NULL, lpt_write, NULL, NULL, &lpt_ports[i]); - if (lpt_ports[i].epp) - io_sethandler(port + 0x0003, 0x0005, lpt_read, NULL, NULL, lpt_write, NULL, NULL, &lpt_ports[i]); - if (lpt_ports[i].ecp || lpt_ports[i].lv2) { - io_sethandler(port + 0x0400, 0x0003, lpt_read, NULL, NULL, lpt_write, NULL, NULL, &lpt_ports[i]); - if (lpt_ports[i].epp) - io_sethandler(port + 0x0404, 0x0003, lpt_read, NULL, NULL, lpt_write, NULL, NULL, &lpt_ports[i]); + if (lpt_ports[dev->id].enabled) { + if (info->local & 0xfff00000) { + lpt_port_setup(dev, info->local >> 20); + lpt_port_irq(dev, (info->local >> 16) & 0xF); + next_inst = orig_inst; + } else { + if ((dev->id == 2) && (lpt_3bc_used)) { + lpt_port_setup(dev, LPT1_ADDR); + lpt_port_irq(dev, LPT1_IRQ); + } else { + lpt_port_setup(dev, default_ports[dev->id]); + lpt_port_irq(dev, default_irqs[dev->id]); + } } + + dev->fifo = fifo16_init(); + + fifo_set_trigger_len(dev->fifo, 8); + + fifo_set_d_ready_evt(dev->fifo, lpt_fifo_d_ready_evt); + fifo_set_priv(dev->fifo, dev); + + timer_add(&dev->fifo_out_timer, lpt_fifo_out_callback, dev, 0); } - lpt_ports[i].addr = port; - } else - lpt_ports[i].addr = 0xffff; -} - -void -lpt_port_irq(const int i, const uint8_t irq) -{ - if (lpt_ports[i].enabled) - lpt_ports[i].irq = irq; - else - lpt_ports[i].irq = 0xff; - - lpt_log("Port %i IRQ = %02X\n", i, irq); -} - -void -lpt_port_dma(const int i, const uint8_t dma) -{ - if (lpt_ports[i].enabled) - lpt_ports[i].dma = dma; - else - lpt_ports[i].dma = 0xff; - - lpt_log("Port %i DMA = %02X\n", i, dma); -} - -void -lpt_port_remove(const int i) -{ - if (lpt_ports[i].enabled && (lpt_ports[i].addr != 0xffff)) { - io_removehandler(lpt_ports[i].addr, 0x0007, lpt_read, NULL, NULL, lpt_write, NULL, NULL, &lpt_ports[i]); - io_removehandler(lpt_ports[i].addr + 0x0400, 0x0007, lpt_read, NULL, NULL, lpt_write, NULL, NULL, &lpt_ports[i]); - - lpt_ports[i].addr = 0xffff; } + + if (!(info->local & 0xfff00000)) + next_inst++; + + if (lpt1 == NULL) + lpt1 = dev; + + return dev; } void -lpt1_remove_ams(void) +lpt_set_next_inst(int ni) { - if (lpt_ports[0].enabled) - io_removehandler(lpt_ports[0].addr + 1, 0x0002, lpt_read, NULL, NULL, lpt_write, NULL, NULL, &lpt_ports[0]); + next_inst = ni; } + +void +lpt_set_3bc_used(int is_3bc_used) +{ + lpt_3bc_used = is_3bc_used; +} + +void +lpt_standalone_init(void) +{ + while (next_inst < (PARALLEL_MAX - 1)) + device_add_inst(&lpt_port_device, next_inst + 1); +}; + +const device_t lpt_port_device = { + .name = "Parallel Port", + .internal_name = "lpt", + .flags = 0, + .local = 0, + .init = lpt_init, + .close = lpt_close, + .reset = lpt_reset, + .available = NULL, + .speed_changed = lpt_speed_changed, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/device/mouse.c b/src/device/mouse.c index 2337c041f..fb7fd020f 100644 --- a/src/device/mouse.c +++ b/src/device/mouse.c @@ -90,12 +90,16 @@ static mouse_t mouse_devices[] = { #ifdef USE_GENIBUS { &mouse_genibus_device }, #endif + { &mouse_mssystems_device }, { &mouse_mssystems_bus_device }, { &mouse_msserial_device }, { &mouse_msserial_ballpoint_device }, { &mouse_ltserial_device }, { &mouse_ps2_device }, +#ifdef USE_STANDALONE_QUICKPORT + { &mouse_upc_standalone_device }, +#endif #ifdef USE_WACOM { &mouse_wacom_device }, { &mouse_wacom_artpad_device }, @@ -555,7 +559,7 @@ mouse_get_buttons_ex(void) void mouse_set_sample_rate(double new_rate) { - mouse_timed = (new_rate > 0.0); + mouse_timed = !force_constant_mouse && (new_rate > 0.0); timer_stop(&mouse_timer); @@ -564,6 +568,12 @@ mouse_set_sample_rate(double new_rate) timer_on_auto(&mouse_timer, 1000000.0 / sample_rate); } +void +mouse_update_sample_rate(void) +{ + mouse_set_sample_rate(sample_rate); +} + /* Callback from the hardware driver. */ void mouse_set_buttons(int buttons) @@ -672,8 +682,7 @@ mouse_reset(void) /* Clear local data. */ mouse_clear_coords(); mouse_clear_buttons(); - mouse_input_mode = 0; - mouse_timed = 1; + mouse_input_mode = 0; /* If no mouse configured, we're done. */ if (mouse_type == 0) @@ -682,8 +691,7 @@ mouse_reset(void) timer_add(&mouse_timer, mouse_timer_poll, NULL, 0); /* Poll at 100 Hz, the default of a PS/2 mouse. */ - sample_rate = 100.0; - timer_on_auto(&mouse_timer, 1000000.0 / sample_rate); + mouse_set_sample_rate(100.0); if ((mouse_type > 1) && (mouse_devices[mouse_type].device != NULL)) mouse_priv = device_add(mouse_devices[mouse_type].device); diff --git a/src/device/mouse_bus.c b/src/device/mouse_bus.c index c81bc6aba..dd71ef11e 100644 --- a/src/device/mouse_bus.c +++ b/src/device/mouse_bus.c @@ -508,7 +508,7 @@ bm_poll(void *priv) dev->mouse_buttons |= 0x40; /* Set bits 3-5 according to button state changes. */ - xor = ((dev->current_b ^ mouse_get_buttons_ex()) & 0x07) << 3; + xor = ((dev->current_b ^ dev->mouse_buttons) & 0x07) << 3; dev->mouse_buttons |= xor; } diff --git a/src/device/mouse_ps2.c b/src/device/mouse_ps2.c index 2c1722f51..80d9f3876 100644 --- a/src/device/mouse_ps2.c +++ b/src/device/mouse_ps2.c @@ -10,7 +10,7 @@ * * Authors: Miran Grca, * - * Copyright 2023 Miran Grca. + * Copyright 2023-2025 Miran Grca. */ #include #include @@ -21,7 +21,6 @@ #include #define HAVE_STDARG_H #include <86box/86box.h> -#include "cpu.h" #include <86box/device.h> #include <86box/keyboard.h> #include <86box/mouse.h> @@ -353,6 +352,9 @@ mouse_ps2_init(const device_t *info) atkbc_dev_t *dev = kbc_at_dev_init(DEV_AUX); int i; + if (info->local & MOUSE_TYPE_QPORT) + device_context(&mouse_upc_standalone_device); + dev->name = info->name; dev->type = info->local; @@ -382,6 +384,9 @@ mouse_ps2_init(const device_t *info) mouse_set_poll(ps2_poll, dev); + if (info->local & MOUSE_TYPE_QPORT) + device_context_restore(); + /* Return our private data to the I/O layer. */ return dev; } diff --git a/src/device/mouse_serial.c b/src/device/mouse_serial.c index 341ddefe7..45750ef09 100644 --- a/src/device/mouse_serial.c +++ b/src/device/mouse_serial.c @@ -480,7 +480,7 @@ ltsermouse_update_report_period(mouse_t *dev) } static void -ltsermouse_switch_baud_rate(mouse_t *dev, int next_state) +ltsermouse_switch_baud_rate(mouse_t *dev, int next_state, int prompt_off) { double word_lens[FORMATS_NUM] = { [FORMAT_BP1_ABS] = 7.0 + 1.0, /* 7 data bits + even parity */ @@ -517,7 +517,7 @@ ltsermouse_switch_baud_rate(mouse_t *dev, int next_state) ltsermouse_set_report_period(dev, dev->rps); if (!dev->continuous && (next_state != STATE_BAUD_RATE)) { - if (dev->prompt) + if (dev->prompt && prompt_off) ltsermouse_set_prompt_mode(dev, 0); sermouse_transmit_report(dev, 0); @@ -569,7 +569,7 @@ ltsermouse_process_command(mouse_t *dev) dev->buf[0] = 0x06; sermouse_transmit(dev, 1, 0, 0); - ltsermouse_switch_baud_rate(dev, STATE_BAUD_RATE); + ltsermouse_switch_baud_rate(dev, STATE_BAUD_RATE, 0); break; case 0x4a: /* Report Rate Selection commands */ @@ -614,7 +614,7 @@ ltsermouse_process_command(mouse_t *dev) case 0x58: /* Microsoft Compatible Format (3+1 byte 3-button, from the FreeBSD source code) */ if ((dev->rev >= 0x02) && ((dev->command != 0x58) || (dev->rev > 0x04))) { dev->format = dev->command & 0x1f; - ltsermouse_switch_baud_rate(dev, sermouse_next_state(dev)); + ltsermouse_switch_baud_rate(dev, sermouse_next_state(dev), 0); } break; @@ -706,7 +706,7 @@ ltsermouse_process_data(mouse_t *dev) dev->bps = 9600; break; } - ltsermouse_switch_baud_rate(dev, (dev->prompt || dev->continuous) ? STATE_IDLE : STATE_TRANSMIT_REPORT); + ltsermouse_switch_baud_rate(dev, (dev->prompt || dev->continuous) ? STATE_IDLE : STATE_TRANSMIT_REPORT, 0); break; default: dev->state = STATE_IDLE; @@ -744,7 +744,7 @@ sermouse_reset(mouse_t *dev, int callback) break; } - ltsermouse_switch_baud_rate(dev, callback ? STATE_TRANSMIT : STATE_IDLE); + ltsermouse_switch_baud_rate(dev, callback ? STATE_TRANSMIT : STATE_IDLE, 1); } static void @@ -900,9 +900,11 @@ sermouse_init(const device_t *info) dev->status = 0x0f; dev->id_len = 1; dev->id[0] = 'M'; - if (info->local == 1) // Logitech Serial Mouse + if (info->local == 1) { + /* Logitech Serial Mouse */ dev->rev = device_get_config_int("revision"); dev->default_bps = device_get_config_int("default_baud"); + } switch (dev->but) { default: case 2: diff --git a/src/device/mouse_upc.c b/src/device/mouse_upc.c new file mode 100644 index 000000000..9f55c9214 --- /dev/null +++ b/src/device/mouse_upc.c @@ -0,0 +1,446 @@ +/* + * 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. + * + * Implementation of the Chips & Technologies F82C710 Universal + * Peripheral Controller (UPC) PS/2 mouse port. + * + * Authors: Miran Grca, + * + * Copyright 2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include +#include <86box/86box.h> +#include "cpu.h" +#include "x86seg.h" +#include <86box/device.h> +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/pic.h> +#include <86box/keyboard.h> +#include <86box/mouse.h> + +#define STAT_DEV_IDLE 0x01 +#define STAT_RX_FULL 0x02 +#define STAT_TX_IDLE 0x04 +#define STAT_RESET 0x08 +#define STAT_INTS_ON 0x10 +#define STAT_ERROR_FLAG 0x20 +#define STAT_CLEAR 0x40 +#define STAT_ENABLE 0x80 + +typedef struct mouse_upc_t { + uint8_t status; + uint8_t ib; + uint8_t ob; + uint8_t state; + uint8_t ctrl_queue_start; + uint8_t ctrl_queue_end; + + uint8_t handler_enable[2]; + + uint16_t mdata_addr; + uint16_t mstat_addr; + + uint16_t irq; + + uint16_t base_addr[2]; + + /* Local copies of the pointers to both ports for easier swapping (AMI '5' MegaKey). */ + kbc_at_port_t *port; + + /* Main timers. */ + pc_timer_t poll_timer; + pc_timer_t dev_poll_timer; + + struct { + uint8_t (*read)(uint16_t port, void *priv); + void (*write)(uint16_t port, uint8_t val, void *priv); + } handlers[2]; + + void *mouse_ps2; +} mouse_upc_t; + +enum { + STATE_MAIN_IBF, /* UPC checking if the input buffer is full. */ + STATE_MAIN, /* UPC checking if the auxiliary has anything to send. */ + STATE_OUT, /* UPC is sending multiple bytes. */ + STATE_SEND, /* UPC is sending command to the auxiliary device. */ + STATE_SCAN /* UPC is waiting for the auxiliary command response. */ +}; + +#ifdef ENABLE_MOUSE_UPC_LOG +int mouse_upc_do_log = ENABLE_MOUSE_UPC_LOG; + +static void +mouse_upc_log(const char *fmt, ...) +{ + va_list ap; + + if (mouse_upc_do_log) { + va_start(ap, fmt); + pclog_ex(fmt, ap); + va_end(ap); + } +} +#else +# define mouse_upc_log(fmt, ...) +#endif + +static void +mouse_upc_send_to_ob(mouse_upc_t *dev, uint8_t val) +{ + dev->status = (dev->status & ~STAT_DEV_IDLE) | STAT_RX_FULL; + + if (dev->status & STAT_INTS_ON) { + picint_common(1 << dev->irq, 0, 0, NULL); + picint_common(1 << dev->irq, 0, 1, NULL); + } + + dev->ob = val; +} + +static void +set_enable_aux(mouse_upc_t *dev, uint8_t enable) +{ + dev->status &= ~STAT_ENABLE; + dev->status |= (enable ? STAT_ENABLE : 0x00); +} + +static void +mouse_upc_ibf_process(mouse_upc_t *dev) +{ + /* IBF set, process both commands and data. */ + dev->status |= STAT_TX_IDLE; + dev->state = STATE_MAIN_IBF; + + set_enable_aux(dev, 1); + + if (dev->port != NULL) { + dev->port->wantcmd = 1; + dev->port->dat = dev->ib; + dev->state = STATE_SEND; + } +} + +/* + Correct Procedure: + 1. Controller asks the device (keyboard or auxiliary device) for a byte. + 2. The device, unless it's in the reset or command states, sees if there's anything to give it, + and if yes, begins the transfer. + 3. The controller checks if there is a transfer, if yes, transfers the byte and sends it to the host, + otherwise, checks the next device, or if there is no device left to check, checks if IBF is full + and if yes, processes it. + */ +static int +mouse_upc_scan(mouse_upc_t *dev) +{ + if ((dev->port != NULL) && (dev->port->out_new != -1)) { + mouse_upc_log("UPC Mouse: %02X coming\n", dev->port->out_new & 0xff); + mouse_upc_send_to_ob(dev, dev->port->out_new); + dev->port->out_new = -1; + dev->state = STATE_MAIN_IBF; + return 1; + } + + return 0; +} + +static void +mouse_upc_poll(void *priv) +{ + mouse_upc_t *dev = (mouse_upc_t *) priv; + + timer_advance_u64(&dev->poll_timer, (100ULL * TIMER_USEC)); + + switch (dev->state) { + case STATE_MAIN_IBF: + default: + if (!(dev->status & STAT_TX_IDLE)) + mouse_upc_ibf_process(dev); + else if (!(dev->status & STAT_RX_FULL)) { + if (dev->status & STAT_ENABLE) + dev->state = STATE_MAIN; + } + break; + case STATE_MAIN: + if (!(dev->status & STAT_TX_IDLE)) + mouse_upc_ibf_process(dev); + else { + (void) mouse_upc_scan(dev); + dev->state = STATE_MAIN_IBF; + } + break; + case STATE_SEND: + if (!dev->port->wantcmd) + dev->state = STATE_SCAN; + break; + case STATE_SCAN: + (void) mouse_upc_scan(dev); + break; + } +} + +static void +mouse_upc_dev_poll(void *priv) +{ + mouse_upc_t *dev = (mouse_upc_t *) priv; + + timer_advance_u64(&dev->dev_poll_timer, (100ULL * TIMER_USEC)); + + if ((dev->port != NULL) && (dev->port->priv != NULL)) + dev->port->poll(dev->port->priv); +} + +static void +mouse_upc_port_1_write(uint16_t port, uint8_t val, void *priv) +{ + mouse_upc_t *dev = (mouse_upc_t *) priv; + + mouse_upc_log("UPC Mouse: [%04X:%08X] write(%04X) = %02X\n", CS, cpu_state.pc, port, val); + + if ((dev->status & STAT_TX_IDLE) && (dev->status & STAT_ENABLE)) { + dev->ib = val; + dev->status &= ~STAT_TX_IDLE; + } +} + +static void +mouse_upc_port_2_write(uint16_t port, uint8_t val, void *priv) +{ + mouse_upc_t *dev = (mouse_upc_t *) priv; + + mouse_upc_log("UPC Mouse: [%04X:%08X] write(%04X) = %02X\n", CS, cpu_state.pc, port, val); + + dev->status = (dev->status & 0x27) | (val & 0xd8); + + if (dev->status & (STAT_CLEAR | STAT_RESET)) { + /* TODO: Silently reset the mouse. */ + dev->status &= ~STAT_RX_FULL; + dev->status |= (STAT_DEV_IDLE | STAT_TX_IDLE); + } +} + +static uint8_t +mouse_upc_port_1_read(uint16_t port, void *priv) +{ + mouse_upc_t *dev = (mouse_upc_t *) priv; + uint8_t ret = 0xff; + + cycles -= ISA_CYCLES(8); + + ret = dev->ob; + dev->ob = 0xff; + dev->status &= ~STAT_RX_FULL; + dev->status |= STAT_DEV_IDLE; + + mouse_upc_log("UPC Mouse: [%04X:%08X] read (%04X) = %02X\n", CS, cpu_state.pc, port, ret); + + return ret; +} + +static uint8_t +mouse_upc_port_2_read(uint16_t port, void *priv) +{ + mouse_upc_t *dev = (mouse_upc_t *) priv; + uint8_t ret = 0xff; + + cycles -= ISA_CYCLES(8); + + ret = dev->status; + + mouse_upc_log("UPC Mouse: [%04X:%08X] read (%04X) = %02X\n", CS, cpu_state.pc, port, ret); + + return ret; +} + +static void +mouse_upc_reset(void *priv) +{ + mouse_upc_t *dev = (mouse_upc_t *) priv; + + dev->status = STAT_DEV_IDLE | STAT_TX_IDLE; + dev->ob = 0xff; + + dev->state = STATE_MAIN_IBF; +} + +static void +mouse_upc_close(void *priv) +{ + mouse_upc_t *dev = (mouse_upc_t *) priv; + + /* Stop timers. */ + timer_disable(&dev->dev_poll_timer); + timer_disable(&dev->poll_timer); + + if (kbc_at_ports[1] != NULL) { + free(kbc_at_ports[1]); + kbc_at_ports[1] = NULL; + } + + free(dev); +} + +void +mouse_upc_port_handler(int num, int set, uint16_t port, void *priv) +{ + mouse_upc_t *dev = (mouse_upc_t *) priv; + + if (dev->handler_enable[num] && (dev->base_addr[num] != 0x0000)) + io_removehandler(dev->base_addr[num], 1, + dev->handlers[num].read, NULL, NULL, + dev->handlers[num].write, NULL, NULL, priv); + + dev->handler_enable[num] = set; + dev->base_addr[num] = port; + + if (dev->handler_enable[num] && (dev->base_addr[num] != 0x0000)) + io_sethandler(dev->base_addr[num], 1, + dev->handlers[num].read, NULL, NULL, + dev->handlers[num].write, NULL, NULL, priv); +} + +void +mouse_upc_handler(int set, uint16_t port, void *priv) +{ + mouse_upc_port_handler(0, set, port, priv); + mouse_upc_port_handler(1, set, port + 0x0001, priv); +} + +void +mouse_upc_set_irq(int num, uint16_t irq, void *priv) +{ + mouse_upc_t *dev = (mouse_upc_t *) priv; + + if (dev->irq != 0xffff) + picintc(1 << dev->irq); + + dev->irq = irq; +} + +static void * +mouse_upc_init_common(int standalone, int irq) +{ + mouse_upc_t *dev; + + dev = (mouse_upc_t *) calloc(1, sizeof(mouse_upc_t)); + + mouse_upc_reset(dev); + + dev->handlers[0].read = mouse_upc_port_1_read; + dev->handlers[0].write = mouse_upc_port_1_write; + dev->handlers[1].read = mouse_upc_port_2_read; + dev->handlers[1].write = mouse_upc_port_2_write; + + dev->irq = irq; + + if (kbc_at_ports[1] == NULL) { + kbc_at_ports[1] = (kbc_at_port_t *) calloc(1, sizeof(kbc_at_port_t)); + kbc_at_ports[1]->out_new = -1; + } + + dev->port = kbc_at_ports[1]; + + timer_add(&dev->poll_timer, mouse_upc_poll, dev, 1); + timer_add(&dev->dev_poll_timer, mouse_upc_dev_poll, dev, 1); + + if (standalone) { + mouse_upc_handler(1, 0x02d4, dev); + dev->mouse_ps2 = device_add_params(&mouse_ps2_device, (void *) (uintptr_t) MOUSE_TYPE_PS2_QPORT); + } + + return dev; +} + +static void * +mouse_upc_init(const device_t *info) +{ + void *dev = NULL; + + if (info->local == 1) + dev = mouse_upc_init_common(1, device_get_config_int("irq")); + else + dev = mouse_upc_init_common(0, info->local); + + return dev; +} + +static const device_config_t upc_config[] = { + // clang-format off + { + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 12, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "IRQ 12", .value = 12 }, + { .description = "IRQ 2/9", .value = 2 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "buttons", + .description = "Buttons", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 2, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "Two", .value = 2 }, + { .description = "Three", .value = 3 }, + { .description = "Wheel", .value = 4 }, + { .description = "Five + Wheel", .value = 5 }, + { .description = "Five + 2 Wheels", .value = 6 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "", .description = "", .type = CONFIG_END + } + // clang-format on +}; + +const device_t mouse_upc_device = { + .name = "PS/2 QuickPort Mouse (F82C710)", + .internal_name = "mouse_upc", + .flags = DEVICE_ISA, + .local = 0, + .init = mouse_upc_init, + .close = mouse_upc_close, + .reset = mouse_upc_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t mouse_upc_standalone_device = { + .name = "PS/2 QuickPort Mouse", + .internal_name = "mouse_upc_standalone", + .flags = DEVICE_ISA, + .local = 1, + .init = mouse_upc_init, + .close = mouse_upc_close, + .reset = mouse_upc_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = upc_config +}; diff --git a/src/device/radisys_config.c b/src/device/radisys_config.c new file mode 100644 index 000000000..67f577de4 --- /dev/null +++ b/src/device/radisys_config.c @@ -0,0 +1,89 @@ +/* + * 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. + * + * Implementation of the Radisys EPC-2012 Configuration registers. + * + * Authors: Miran Grca, + * + * Copyright 2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/machine.h> +#include <86box/lpt.h> +#include <86box/machine.h> +#include <86box/chipset.h> +#include <86box/plat_unused.h> + +typedef struct radisys_config_t { + uint8_t regs[2]; +} radisys_config_t; + +static uint8_t +radisys_config_read(uint16_t port, void *priv) +{ + radisys_config_t *dev = (radisys_config_t *) priv; + uint8_t ret = dev->regs[port & 0x0001]; + + return ret; +} + +static void +radisys_config_write(uint16_t port, uint8_t val, void *priv) +{ + radisys_config_t *dev = (radisys_config_t *) priv; + + dev->regs[port & 0x0001] = val; + + if (!(port & 0x0001) && machine_has_jumpered_ecp_dma(machine, MACHINE_DMA_USE_CONFIG)) + lpt1_dma((val & 0x02) ? 3 : 1); +} + +static void +radisys_config_close(void *priv) +{ + radisys_config_t *dev = (radisys_config_t *) priv; + + free(dev); +} + +static void * +radisys_config_init(UNUSED(const device_t *info)) +{ + /* We have to return something non-NULL. */ + radisys_config_t *dev = (radisys_config_t *) calloc(1, sizeof(radisys_config_t)); + + /* 370h is also supported. */ + io_sethandler(0x0270, 0x0002, radisys_config_read, NULL, NULL, radisys_config_write, NULL, NULL, dev); + + return dev; +} + +const device_t radisys_config_device = { + .name = "Radisys EPC-2012 Configuration", + .internal_name = "radisys_config", + .flags = 0, + .local = 0, + .init = radisys_config_init, + .close = radisys_config_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/device/serial.c b/src/device/serial.c index 71be924c1..ad9abfe5d 100644 --- a/src/device/serial.c +++ b/src/device/serial.c @@ -475,6 +475,12 @@ serial_set_clock_src(serial_t *dev, double clock_src) serial_update_speed(dev); } +void +serial_set_type(serial_t *dev, uint8_t type) +{ + dev->type = type; +} + void serial_write(uint16_t addr, uint8_t val, void *priv) { @@ -746,6 +752,14 @@ serial_read(uint16_t addr, void *priv) return ret; } +uint8_t +serial_get_shadow(serial_t *dev) +{ + uint8_t ret = dev->fcr; + + return ret; +} + void serial_remove(serial_t *dev) { diff --git a/src/machine/m_xt_zenith.c b/src/device/zenith_scratchpad.c similarity index 56% rename from src/machine/m_xt_zenith.c rename to src/device/zenith_scratchpad.c index 2159c18e5..0db40c3f0 100644 --- a/src/machine/m_xt_zenith.c +++ b/src/device/zenith_scratchpad.c @@ -47,6 +47,7 @@ #include <86box/io.h> #include <86box/video.h> #include <86box/plat_unused.h> +#include <86box/chipset.h> typedef struct { mem_mapping_t scratchpad_mapping; @@ -94,7 +95,7 @@ zenith_scratchpad_close(void *priv) free(dev); } -static const device_t zenith_scratchpad_device = { +const device_t zenith_scratchpad_device = { .name = "Zenith scratchpad RAM", .internal_name = "zenith_scratchpad", .flags = 0, @@ -107,99 +108,3 @@ static const device_t zenith_scratchpad_device = { .force_redraw = NULL, .config = NULL }; - -void -machine_zenith_init(const machine_t *model) -{ - machine_common_init(model); - - device_add(&zenith_scratchpad_device); - - pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - - device_add(&keyboard_xt_zenith_device); - - nmi_init(); -} - -/* - * Current bugs and limitations: - * - missing NVRAM implementation - */ -int -machine_xt_z184_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/zdsupers/z184m v3.1d.10d", - 0x000f8000, 32768, 0); - - if (bios_only || !ret) - return ret; - - machine_zenith_init(model); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_xt_device); - - lpt1_remove(); /* only one parallel port */ - lpt2_remove(); - lpt1_setup(LPT2_ADDR); - device_add(&ns8250_device); - /* So that serial_standalone_init() won't do anything. */ - serial_set_next_inst(SERIAL_MAX - 1); - - device_add(&cga_device); - - return ret; -} - -int -machine_xt_z151_init(const machine_t *model) -{ - int ret; - ret = bios_load_linear("roms/machines/zdsz151/444-229-18.bin", - 0x000fc000, 32768, 0); - if (ret) { - bios_load_aux_linear("roms/machines/zdsz151/444-260-18.bin", - 0x000f8000, 16384, 0); - } - - if (bios_only || !ret) - return ret; - - machine_zenith_init(model); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_xt_tandy_device); - - return ret; -} - -/* - * Current bugs and limitations: - * - Memory board support for EMS currently missing - */ -int -machine_xt_z159_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/zdsz159/z159m v2.9e.10d", - 0x000f8000, 32768, 0); - - if (bios_only || !ret) - return ret; - - machine_zenith_init(model); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_xt_tandy_device); - - /* parallel port is on the memory board */ - lpt1_remove(); /* only one parallel port */ - lpt2_remove(); - lpt1_setup(LPT2_ADDR); - - return ret; -} diff --git a/src/disk/CMakeLists.txt b/src/disk/CMakeLists.txt index 48d9e61ff..9b8d72f54 100644 --- a/src/disk/CMakeLists.txt +++ b/src/disk/CMakeLists.txt @@ -23,6 +23,7 @@ add_library(hdd OBJECT hdc_st506_xt.c hdc_st506_at.c hdc_xta.c + hdc_xta_ps1.c hdc_esdi_at.c hdc_esdi_mca.c hdc_xtide.c @@ -37,7 +38,7 @@ add_library(hdd OBJECT hdc_ide_w83769f.c ) -add_library(zip OBJECT zip.c) +add_library(rdisk OBJECT rdisk.c) add_library(mo OBJECT mo.c) diff --git a/src/disk/hdc.c b/src/disk/hdc.c index ecd609476..135528401 100644 --- a/src/disk/hdc.c +++ b/src/disk/hdc.c @@ -63,6 +63,7 @@ static const struct { { &xtide_device }, { &st506_xt_st11_m_device }, { &st506_xt_st11_r_device }, + { &xta_st50x_device }, { &st506_xt_victor_v86p_device }, { &st506_xt_wd1002a_27x_device }, { &st506_xt_wd1002a_wx1_device }, @@ -78,6 +79,8 @@ static const struct { { &xtide_at_2ch_device }, { &xtide_at_ps2_device }, { &xtide_at_ps2_2ch_device }, + { &ide_ter_device }, + { &ide_qua_device }, { &st506_at_wd1003_device }, { &esdi_at_wd1007vse1_device }, /* MCA */ @@ -88,6 +91,9 @@ static const struct { { &ide_vlb_device }, { &ide_vlb_2ch_device }, /* PCI */ + { &ide_cmd646_ter_qua_device }, + { &ide_cmd648_ter_qua_device }, + { &ide_cmd649_ter_qua_device }, { &ide_pci_device }, { &ide_pci_2ch_device }, { NULL } @@ -108,18 +114,14 @@ hdc_init(void) void hdc_reset(void) { - hdc_log("HDC: reset(current=%d, internal=%d)\n", - hdc_current[0], (machines[machine].flags & MACHINE_HDC) ? 1 : 0); + for (int i = 0; i < HDC_MAX; i++) { + hdc_log("HDC %i: reset(current=%d, internal=%d)\n", i, + hdc_current[i], hdc_current[i] == HDC_INTERNAL); - /* If we have a valid controller, add its device. */ - if (hdc_current[0] > HDC_INTERNAL) - device_add(controllers[hdc_current[0]].device); - - /* Now, add the tertiary and/or quaternary IDE controllers. */ - if (ide_ter_enabled) - device_add(&ide_ter_device); - if (ide_qua_enabled) - device_add(&ide_qua_device); + /* If we have a valid controller, add its device. */ + if (hdc_current[i] > HDC_INTERNAL) + device_add_inst(controllers[hdc_current[i]].device, i + 1); + } } const char * @@ -129,7 +131,7 @@ hdc_get_internal_name(int hdc) } int -hdc_get_from_internal_name(char *s) +hdc_get_from_internal_name(const char *s) { int c = 0; diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index d725b2ace..b034fa3e3 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -46,7 +46,7 @@ #include <86box/hdc.h> #include <86box/hdc_ide.h> #include <86box/hdd.h> -#include <86box/zip.h> +#include <86box/rdisk.h> #include <86box/version.h> /* Bits of 'atastat' */ @@ -234,9 +234,7 @@ static uint8_t ide_qua_pnp_rom[] = { 0x79, 0x00 }; -ide_t *ide_drives[IDE_NUM]; -int ide_ter_enabled = 0; -int ide_qua_enabled = 0; +ide_t *ide_drives[IDE_NUM] = { 0 }; static void ide_atapi_callback(ide_t *ide); static void ide_callback(void *priv); @@ -482,7 +480,7 @@ static int ide_get_max(const ide_t *ide, const int type) { const int ata_4 = ide_is_ata4(ide_boards[ide->board]); - const int max[2][4] = { { 0, -1, -1, -1 }, { 4, 2, 2, 5 } }; + const int max[2][4] = { { 3, -1, -1, -1 }, { 4, 2, 2, 5 } }; int ret; if (ide->type == IDE_ATAPI) @@ -497,7 +495,7 @@ static int ide_get_timings(const ide_t *ide, const int type) { const int ata_4 = ide_is_ata4(ide_boards[ide->board]); - const int timings[2][3] = { { 0, 0, 0 }, { 120, 120, 0 } }; + const int timings[2][3] = { { 0, 240, 180 }, { 120, 120, 120 } }; int ret; if (ide->type == IDE_ATAPI) @@ -668,8 +666,9 @@ ide_identify(ide_t *ide) ide->buffer[88] = 0x0000; if (max_pio >= 3) { + ide->buffer[49] |= 0x0c00; ide->buffer[53] |= 0x0002; - ide->buffer[67] = ide_get_timings(ide, TIMINGS_PIO); + ide->buffer[67] = ide_get_timings(ide, TIMINGS_PIO_FC); ide->buffer[68] = ide_get_timings(ide, TIMINGS_PIO_FC); for (i = 3; i <= max_pio; i++) ide->buffer[64] |= (1 << (i - 3)); @@ -712,12 +711,8 @@ ide_identify(ide_t *ide) } if (ide->mdma_mode != -1) { - d = (ide->mdma_mode & 0xff); - d <<= 8; - if ((ide->mdma_mode & 0x300) == 0x000) { - if ((ide->mdma_mode & 0xff) >= 3) - ide->buffer[64] |= d; - } else if ((ide->mdma_mode & 0x300) == 0x100) + d = (ide->mdma_mode & 0xff) << 8; + if ((ide->mdma_mode & 0x300) == 0x100) ide->buffer[62] |= d; else if ((ide->mdma_mode & 0x300) == 0x200) ide->buffer[63] |= d; @@ -831,6 +826,7 @@ ide_set_features(ide_t *ide) int mode; int submode; int max; + int max_pio_submode; features = ide->tf->cylprecomp; features_data = ide->tf->secount; @@ -846,9 +842,10 @@ ide_set_features(ide_t *ide) switch (mode) { case 0x00: /* PIO default */ - if (submode != 0) + max = ide_get_max(ide, TYPE_PIO); + max_pio_submode = (max >= 3) ? 1 : 0; + if (submode > max_pio_submode) return 0; - max = ide_get_max(ide, TYPE_PIO); ide->mdma_mode = (1 << max); ide_log("IDE %02X: Setting DPIO mode: %02X, %08X\n", ide->channel, submode, ide->mdma_mode); @@ -2828,20 +2825,23 @@ ide_board_close(int board) ide_log("ide_board_close(%i)\n", board); - if ((ide_boards[board] == NULL) || !ide_boards[board]->inited) + if (ide_boards[board] == NULL) return; ide_log("IDE: Closing board %i...\n", board); - timer_stop(&ide_boards[board]->timer); + if (ide_boards[board]->inited) { + timer_stop(&ide_boards[board]->timer); - ide_clear_bus_master(board); + ide_clear_bus_master(board); + } /* Close hard disk image files (if previously open) */ for (uint8_t d = 0; d < 2; d++) { c = (board << 1) + d; - ide_boards[board]->ide[d] = NULL; + if (ide_boards[board]->inited) + ide_boards[board]->ide[d] = NULL; dev = ide_drives[c]; @@ -3265,6 +3265,16 @@ ide_close(UNUSED(void *priv)) } } +void +ide_hard_reset(void) +{ + for (int i = 0; i < IDE_BUS_MAX; i++) + ide_boards[i] = NULL; + + for (int i = 0; i < IDE_NUM; i++) + ide_drives[i] = NULL; +} + static uint8_t mcide_mca_read(const int port, void *priv) { diff --git a/src/disk/hdc_ide_cmd640.c b/src/disk/hdc_ide_cmd640.c index 84a40efa4..dbdf32dcf 100644 --- a/src/disk/hdc_ide_cmd640.c +++ b/src/disk/hdc_ide_cmd640.c @@ -34,7 +34,7 @@ #include <86box/hdc.h> #include <86box/hdc_ide.h> #include <86box/hdc_ide_sff8038i.h> -#include <86box/zip.h> +#include <86box/rdisk.h> #include <86box/mo.h> typedef struct cmd640_t { @@ -45,7 +45,7 @@ typedef struct cmd640_t { uint8_t pci; uint8_t irq_state; uint8_t pci_slot; - uint8_t pad0; + uint8_t force_on; uint8_t regs[256]; uint32_t local; int irq_mode[2]; @@ -143,7 +143,7 @@ cmd640_ide_handlers(cmd640_t *dev) ide_set_base(0, main); ide_set_side(0, side); - if (dev->regs[0x04] & 0x01) + if ((dev->regs[0x04] & 0x01) || dev->force_on) ide_pri_enable(); } @@ -161,7 +161,7 @@ cmd640_ide_handlers(cmd640_t *dev) ide_set_base(1, main); ide_set_side(1, side); - if ((dev->regs[0x04] & 0x01) && (dev->regs[0x51] & 0x08)) + if (((dev->regs[0x04] & 0x01) || dev->force_on) && (dev->regs[0x51] & 0x08)) ide_sec_enable(); } } @@ -417,10 +417,10 @@ cmd640_reset(void *priv) (cdrom[i].ide_channel <= max_channel) && cdrom[i].priv) scsi_cdrom_reset((scsi_common_t *) cdrom[i].priv); } - for (i = 0; i < ZIP_NUM; i++) { - if ((zip_drives[i].bus_type == ZIP_BUS_ATAPI) && (zip_drives[i].ide_channel >= min_channel) && - (zip_drives[i].ide_channel <= max_channel) && zip_drives[i].priv) - zip_reset((scsi_common_t *) zip_drives[i].priv); + for (i = 0; i < RDISK_NUM; i++) { + if ((rdisk_drives[i].bus_type == RDISK_BUS_ATAPI) && (rdisk_drives[i].ide_channel >= min_channel) && + (rdisk_drives[i].ide_channel <= max_channel) && rdisk_drives[i].priv) + rdisk_reset((scsi_common_t *) rdisk_drives[i].priv); } for (i = 0; i < MO_NUM; i++) { if ((mo_drives[i].bus_type == MO_BUS_ATAPI) && (mo_drives[i].ide_channel >= min_channel) && @@ -512,6 +512,7 @@ cmd640_init(const device_t *info) dev->local = info->local; dev->channels = ((info->local & 0x60000) >> 17) & 0x03; + dev->force_on = !!(info->local & 0x100000); if (info->flags & DEVICE_PCI) { device_add(&ide_pci_2ch_device); @@ -667,7 +668,7 @@ const device_t ide_cmd640_pci_legacy_only_device = { }; const device_t ide_cmd640_pci_single_channel_device = { - .name = "CMD PCI-0640B PCI", + .name = "CMD PCI-0640B PCI (Single Channel)", .internal_name = "ide_cmd640_pci_single_channel", .flags = DEVICE_PCI, .local = 0x2000a, @@ -681,7 +682,7 @@ const device_t ide_cmd640_pci_single_channel_device = { }; const device_t ide_cmd640_pci_single_channel_sec_device = { - .name = "CMD PCI-0640B PCI", + .name = "CMD PCI-0640B PCI (Single Channel, Secondary)", .internal_name = "ide_cmd640_pci_single_channel_sec", .flags = DEVICE_PCI, .local = 0x4000a, diff --git a/src/disk/hdc_ide_cmd646.c b/src/disk/hdc_ide_cmd646.c index a60962ba8..7aa920e22 100644 --- a/src/disk/hdc_ide_cmd646.c +++ b/src/disk/hdc_ide_cmd646.c @@ -34,8 +34,26 @@ #include <86box/hdc.h> #include <86box/hdc_ide.h> #include <86box/hdc_ide_sff8038i.h> -#include <86box/zip.h> +#include <86box/rdisk.h> +#include <86box/rom.h> +#include <86box/hdd.h> +#include <86box/scsi_disk.h> #include <86box/mo.h> +#include "cpu.h" +#include "x86.h" + +#define CMD_TYPE_646 0x0000000 +#define CMD_TYPE_648 0x0100000 +#define CMD_TYPE_649 0x0200000 + +#define CMD648_JP7 0x0400000 /* Reload subsystem ID on reset. */ +#define CMD648_RAID 0x0800000 + +#define CMD64X_ONBOARD 0x1000000 + +#define CMD648_BIOS_FILE "roms/hdd/ide/648_1910.bin" +#define CMD649_REV_1914_BIOS_FILE "roms/hdd/ide/649_1914.bin" +#define CMD649_REV_2301_BIOS_FILE "roms/hdd/ide/649_2301.bin" typedef struct cmd646_t { uint8_t vlb_idx; @@ -46,11 +64,17 @@ typedef struct cmd646_t { uint8_t regs[256]; uint32_t local; + uint32_t rom_addr; + uint32_t rom_addr_size; + uint32_t rom_addr_mask; int irq_pin; + int has_bios; int irq_mode[2]; + rom_t bios_rom; + sff8038i_t *bm[2]; } cmd646_t; @@ -80,7 +104,8 @@ cmd646_set_irq_0(uint8_t status, void *priv) if (!(dev->regs[0x50] & 0x04) || (status & 0x04)) dev->regs[0x50] = (dev->regs[0x50] & ~0x04) | status; - sff_bus_master_set_irq(status, dev->bm[0]); + if (!(dev->local & CMD_TYPE_648) || !(dev->regs[0x71] & 0x10)) + sff_bus_master_set_irq(status, dev->bm[0]); } static void @@ -91,7 +116,8 @@ cmd646_set_irq_1(uint8_t status, void *priv) if (!(dev->regs[0x57] & 0x10) || (status & 0x04)) dev->regs[0x57] = (dev->regs[0x57] & ~0x10) | (status << 2); - sff_bus_master_set_irq(status, dev->bm[1]); + if (!(dev->local & CMD_TYPE_648) || !(dev->regs[0x71] & 0x20)) + sff_bus_master_set_irq(status, dev->bm[1]); } static int @@ -116,13 +142,24 @@ cmd646_ide_handlers(cmd646_t *dev) uint16_t main; uint16_t side; int irq_mode[2] = { IRQ_MODE_LEGACY, IRQ_MODE_LEGACY }; + int first = 0; + int reg09 = dev->regs[0x09]; + int reg50 = dev->regs[0x50]; + + if ((dev->local & CMD_TYPE_648) && (dev->local & CMD648_RAID)) { + reg09 = 0xff; + reg50 |= 0x40; + } + + if (dev->local & 0x80000) + first += 2; sff_set_slot(dev->bm[0], dev->pci_slot); sff_set_slot(dev->bm[1], dev->pci_slot); - ide_pri_disable(); + ide_handlers(first, 0); - if ((dev->regs[0x09] & 0x01) && (dev->regs[0x50] & 0x40)) { + if ((reg09 & 0x01) && (reg50 & 0x40)) { main = (dev->regs[0x11] << 8) | (dev->regs[0x10] & 0xf8); side = ((dev->regs[0x15] << 8) | (dev->regs[0x14] & 0xfc)) + 2; } else { @@ -130,23 +167,28 @@ cmd646_ide_handlers(cmd646_t *dev) side = 0x3f6; } - ide_set_base(0, main); - ide_set_side(0, side); + ide_set_base(first, main); + ide_set_side(first, side); - if (dev->regs[0x09] & 0x01) + if (reg09 & 0x01) irq_mode[0] = IRQ_MODE_PCI_IRQ_PIN; sff_set_irq_mode(dev->bm[0], irq_mode[0]); + cmd646_log("IDE %i: %04X, %04X, %i\n", first, main, side, irq_mode[0]); - if (dev->regs[0x04] & 0x01) - ide_pri_enable(); + int pri_enabled = (dev->regs[0x04] & 0x01); + if (dev->local & CMD_TYPE_648) + pri_enabled = pri_enabled && (dev->regs[0x51] & 0x04); + + if (pri_enabled) + ide_handlers(first, 1); if (dev->single_channel) return; - ide_sec_disable(); + ide_handlers(first + 1, 0); - if ((dev->regs[0x09] & 0x04) && (dev->regs[0x50] & 0x40)) { + if ((reg09 & 0x04) && (reg50 & 0x40)) { main = (dev->regs[0x19] << 8) | (dev->regs[0x18] & 0xf8); side = ((dev->regs[0x1d] << 8) | (dev->regs[0x1c] & 0xfc)) + 2; } else { @@ -154,16 +196,17 @@ cmd646_ide_handlers(cmd646_t *dev) side = 0x376; } - ide_set_base(1, main); - ide_set_side(1, side); + ide_set_base(first + 1, main); + ide_set_side(first + 1, side); - if (dev->regs[0x09] & 0x04) - irq_mode[1] = 1; + if (reg09 & 0x04) + irq_mode[1] = IRQ_MODE_PCI_IRQ_PIN; sff_set_irq_mode(dev->bm[1], irq_mode[1]); + cmd646_log("IDE %i: %04X, %04X, %i\n", first + 1, main, side, irq_mode[1]); if ((dev->regs[0x04] & 0x01) && (dev->regs[0x51] & 0x08)) - ide_sec_enable(); + ide_handlers(first + 1, 1); } static void @@ -175,74 +218,176 @@ cmd646_ide_bm_handlers(cmd646_t *dev) sff_bus_master_handler(dev->bm[1], (dev->regs[0x04] & 1), base + 8); } +uint8_t +cmd646_bm_write(uint16_t port, uint8_t val, void *priv) +{ + cmd646_t *dev = (cmd646_t *) priv; + uint8_t ret = val; + + switch (port & 0x000f) { + case 0x0001: + dev->regs[(port & 0x000f) | 0x70] = val & 0xf0; + if (val & 0x04) + dev->regs[0x50] &= ~0x04; + if (val & 0x08) + dev->regs[0x57] &= ~0x10; + ret &= 0x03; + break; + case 0x0003: + dev->regs[0x73] = val; + break; + case 0x0009: + dev->regs[(port & 0x000f) | 0x70] = (dev->regs[(port & 0x000f) | 0x70] & 0x0f) | (val & 0xf0); + ret &= 0x03; + break; + case 0x000b: + dev->regs[0x7b] = val; + break; + } + + return ret; +} + +uint8_t +cmd646_bm_read(uint16_t port, uint8_t val, void *priv) +{ + cmd646_t *dev = (cmd646_t *) priv; + uint8_t ret = val; + + switch (port & 0x000f) { + case 0x0001: + ret = (dev->regs[(port & 0x000f) | 0x70] & 0xf3) | (dev->regs[0x50] & 0x04) | ((dev->regs[0x57] & 0x10) >> 1); + break; + case 0x0002: case 0x000a: + ret |= 0x08; + break; + case 0x0003: + ret = dev->regs[0x73]; + break; + case 0x0009: + ret = dev->regs[(port & 0x000f) | 0x70]; + break; + case 0x000b: + ret = dev->regs[0x7b]; + break; + } + + return ret; +} + +static void +cmd646_bios_handler(cmd646_t *dev) +{ + if ((dev->local & CMD_TYPE_648) && dev->has_bios) { + uint32_t *addr = (uint32_t *) &(dev->regs[0x30]); + + *addr &= (~dev->rom_addr_mask) | 0x00000001; + dev->rom_addr = *addr & 0xfffffff0; + + cmd646_log("ROM address now: %08X\n", dev->rom_addr); + + if ((dev->regs[0x04] & 0x02) && (*addr & 0x00000001)) + mem_mapping_set_addr(&dev->bios_rom.mapping, dev->rom_addr, dev->rom_addr_size); + else + mem_mapping_disable(&dev->bios_rom.mapping); + } +} + static void cmd646_pci_write(int func, int addr, uint8_t val, void *priv) { - cmd646_t *dev = (cmd646_t *) priv; + cmd646_t *dev = (cmd646_t *) priv; + int reg50 = dev->regs[0x50]; + + if ((dev->local & CMD_TYPE_648) && (dev->regs[0x0a] == 0x04) && (dev->regs[0x0b] == 0x01)) + reg50 |= 0x40; cmd646_log("[%04X:%08X] (%08X) cmd646_pci_write(%i, %02X, %02X)\n", CS, cpu_state.pc, ESI, func, addr, val); if (func == 0x00) switch (addr) { case 0x04: - dev->regs[addr] = (val & 0x45); + if (dev->has_bios) + dev->regs[addr] = (val & 0x47); + else + dev->regs[addr] = (val & 0x45); + cmd646_ide_handlers(dev); + cmd646_ide_bm_handlers(dev); + + cmd646_bios_handler(dev); + break; + case 0x05: + if (dev->local & CMD_TYPE_648) + dev->regs[addr] = (dev->regs[addr] & 0x7e) | (val & 0x01); break; case 0x07: - dev->regs[addr] &= ~(val & 0xb1); + if (dev->local & CMD_TYPE_648) + dev->regs[addr] = ((dev->regs[addr] & ~(val & 0xb9)) & 0xbf) | (val & 0x40); + else + dev->regs[addr] &= ~(val & 0xb1); break; case 0x09: - if ((dev->regs[addr] & 0x0a) == 0x0a) { - dev->regs[addr] = (dev->regs[addr] & 0x0a) | (val & 0x05); - dev->irq_mode[0] = !!(val & 0x01); - dev->irq_mode[1] = !!(val & 0x04); + if (!(dev->local & CMD_TYPE_648) || + ((dev->regs[0x0a] == 0x01) && (dev->regs[0x0b] == 0x01))) { + if ((dev->regs[addr] & 0x0a) == 0x0a) { + dev->regs[addr] = (dev->regs[addr] & 0x8a) | (val & 0x05); + dev->irq_mode[0] = !!(val & 0x01); + dev->irq_mode[1] = !!(val & 0x04); + cmd646_ide_handlers(dev); + } + } + break; + case 0x0a: case 0x0b: + if ((dev->local & CMD_TYPE_648) && (dev->regs[0x4f] & 0x04)) { + dev->regs[addr] = val; cmd646_ide_handlers(dev); } break; case 0x10: - if (dev->regs[0x50] & 0x40) { + if (reg50 & 0x40) { dev->regs[0x10] = (val & 0xf8) | 1; cmd646_ide_handlers(dev); } break; case 0x11: - if (dev->regs[0x50] & 0x40) { + if (reg50 & 0x40) { dev->regs[0x11] = val; cmd646_ide_handlers(dev); } break; case 0x14: - if (dev->regs[0x50] & 0x40) { + if (reg50 & 0x40) { dev->regs[0x14] = (val & 0xfc) | 1; cmd646_ide_handlers(dev); } break; case 0x15: - if (dev->regs[0x50] & 0x40) { + if (reg50 & 0x40) { dev->regs[0x15] = val; cmd646_ide_handlers(dev); } break; case 0x18: - if (dev->regs[0x50] & 0x40) { + if (reg50 & 0x40) { dev->regs[0x18] = (val & 0xf8) | 1; cmd646_ide_handlers(dev); } break; case 0x19: - if (dev->regs[0x50] & 0x40) { + if (reg50 & 0x40) { dev->regs[0x19] = val; cmd646_ide_handlers(dev); } break; case 0x1c: - if (dev->regs[0x50] & 0x40) { + if (reg50 & 0x40) { dev->regs[0x1c] = (val & 0xfc) | 1; cmd646_ide_handlers(dev); } break; case 0x1d: - if (dev->regs[0x50] & 0x40) { + if (reg50 & 0x40) { dev->regs[0x1d] = val; cmd646_ide_handlers(dev); } @@ -255,18 +400,42 @@ cmd646_pci_write(int func, int addr, uint8_t val, void *priv) dev->regs[0x21] = val; cmd646_ide_bm_handlers(dev); break; + case 0x2c ... 0x2f: + case 0x8c ... 0x8f: + if (dev->local & CMD_TYPE_648) + dev->regs[(addr & 0x0f) | 0x20] = val; + break; + case 0x30 ... 0x33: + if ((dev->local & CMD_TYPE_648) && dev->has_bios) { + dev->regs[addr] = val; + cmd646_bios_handler(dev); + } + break; + case 0x3c: + dev->regs[0x3c] = val; + break; + case 0x4f: + if (dev->local & CMD_TYPE_648) + dev->regs[addr] = (dev->regs[addr] & 0xfa) | (val & 0x05); + break; case 0x51: - dev->regs[addr] = val & 0xc8; + if (dev->local & CMD_TYPE_648) + dev->regs[addr] = val & 0xcc; + else + dev->regs[addr] = val & 0xc8; cmd646_ide_handlers(dev); break; case 0x52: case 0x54: case 0x56: case 0x58: - case 0x59: case 0x5b: dev->regs[addr] = val; break; + case 0x59: + if ((dev->local & CMD_TYPE_649) || !(dev->local & CMD_TYPE_648)) + dev->regs[addr] = val; + break; case 0x53: case 0x55: dev->regs[addr] = val & 0xc0; @@ -274,10 +443,32 @@ cmd646_pci_write(int func, int addr, uint8_t val, void *priv) case 0x57: dev->regs[addr] = (dev->regs[addr] & 0x10) | (val & 0xcc); break; - case 0x70 ... 0x77: + case 0x64: + if (dev->local & CMD_TYPE_648) + dev->regs[addr] = (dev->regs[addr] & 0xfc) | (val & 0x03); + break; + case 0x65: + if (dev->local & CMD_TYPE_648) + dev->regs[addr] = (dev->regs[addr] & 0x7f) | (val & 0x80); + break; + case 0x71: + if (dev->local & CMD_TYPE_648) + sff_bus_master_write(addr & 0x0f, val, dev->bm[0]); + else + sff_bus_master_write(addr & 0x0f, val & 0x03, dev->bm[0]); + break; + case 0x70: + case 0x72 ... 0x77: sff_bus_master_write(addr & 0x0f, val, dev->bm[0]); break; - case 0x78 ... 0x7f: + case 0x79: + if (dev->local & CMD_TYPE_648) + sff_bus_master_write(addr & 0x0f, val, dev->bm[1]); + else + sff_bus_master_write(addr & 0x0f, val & 0x03, dev->bm[1]); + break; + case 0x78: + case 0x7a ... 0x7f: sff_bus_master_write(addr & 0x0f, val, dev->bm[1]); break; @@ -295,14 +486,18 @@ cmd646_pci_read(int func, int addr, void *priv) if (func == 0x00) { ret = dev->regs[addr]; - if (addr == 0x50) + if ((addr == 0x09) && (dev->local & CMD_TYPE_648) && (dev->regs[0x0a] == 0x04)) + ret = 0x00; + else if (addr == 0x50) dev->regs[0x50] &= ~0x04; else if (addr == 0x57) dev->regs[0x57] &= ~0x10; else if ((addr >= 0x70) && (addr <= 0x77)) ret = sff_bus_master_read(addr & 0x0f, dev->bm[0]); else if ((addr >= 0x78) && (addr <= 0x7f)) - ret = sff_bus_master_read(addr & 0x0f, dev->bm[0]); + ret = sff_bus_master_read(addr & 0x0f, dev->bm[1]); + else if ((dev->local & CMD_TYPE_648) && (addr >= 0x8c) && (addr <= 0x8f)) + ret = dev->regs[(addr & 0x0f) | 0x20]; } cmd646_log("[%04X:%08X] (%08X) cmd646_pci_read(%i, %02X, %02X)\n", CS, cpu_state.pc, ESI, func, addr, ret); @@ -310,22 +505,44 @@ cmd646_pci_read(int func, int addr, void *priv) return ret; } +static int +check_ch(cmd646_t *dev, int channel) +{ + int ret = 0; + int min = 0; + int max = dev->single_channel ? 1 : 3; + + if (dev->local & 0x80000) { + min += 4; + max += 4; + } + + if ((channel >= min) && (channel <= max)) + ret = 1; + + return ret; +} + static void cmd646_reset(void *priv) { cmd646_t *dev = (cmd646_t *) priv; int i = 0; + for (i = 0; i < HDD_NUM; i++) { + if ((hdd[i].bus_type == HDD_BUS_ATAPI) && check_ch(dev, hdd[i].ide_channel) && hdd[i].priv) + scsi_disk_reset((scsi_common_t *) hdd[i].priv); + } for (i = 0; i < CDROM_NUM; i++) { - if ((cdrom[i].bus_type == CDROM_BUS_ATAPI) && (cdrom[i].ide_channel < 4) && cdrom[i].priv) + if ((cdrom[i].bus_type == CDROM_BUS_ATAPI) && check_ch(dev, cdrom[i].ide_channel) && cdrom[i].priv) scsi_cdrom_reset((scsi_common_t *) cdrom[i].priv); } - for (i = 0; i < ZIP_NUM; i++) { - if ((zip_drives[i].bus_type == ZIP_BUS_ATAPI) && (zip_drives[i].ide_channel < 4) && zip_drives[i].priv) - zip_reset((scsi_common_t *) zip_drives[i].priv); + for (i = 0; i < RDISK_NUM; i++) { + if ((rdisk_drives[i].bus_type == RDISK_BUS_ATAPI) && check_ch(dev, rdisk_drives[i].ide_channel) && rdisk_drives[i].priv) + rdisk_reset((scsi_common_t *) rdisk_drives[i].priv); } for (i = 0; i < MO_NUM; i++) { - if ((mo_drives[i].bus_type == MO_BUS_ATAPI) && (mo_drives[i].ide_channel < 4) && mo_drives[i].priv) + if ((mo_drives[i].bus_type == MO_BUS_ATAPI) && check_ch(dev, mo_drives[i].ide_channel) && mo_drives[i].priv) mo_reset((scsi_common_t *) mo_drives[i].priv); } @@ -336,16 +553,40 @@ cmd646_reset(void *priv) dev->regs[0x00] = 0x95; /* CMD */ dev->regs[0x01] = 0x10; - dev->regs[0x02] = 0x46; /* PCI-0646 */ + if (dev->local & CMD_TYPE_649) + dev->regs[0x02] = 0x49; /* PCI-0649 */ + else if (dev->local & CMD_TYPE_648) + dev->regs[0x02] = 0x48; /* PCI-0648 */ + else + dev->regs[0x02] = 0x46; /* PCI-0646 */ dev->regs[0x03] = 0x06; dev->regs[0x04] = 0x00; - dev->regs[0x06] = 0x80; dev->regs[0x07] = 0x02; /* DEVSEL timing: 01 medium */ dev->regs[0x09] = dev->local; /* Programming interface */ - dev->regs[0x0a] = 0x01; /* IDE controller */ + if ((dev->local & CMD_TYPE_648) && (dev->local & CMD648_RAID)) { + dev->regs[0x06] = 0x90; + dev->regs[0x08] = 0x02; + dev->regs[0x0a] = 0x04; /* RAID controller */ + + dev->regs[0x50] = 0x40; /* Enable Base address register R/W; + If 0, they return 0 and are read-only 8 */ + + /* Blank base addresses */ + dev->regs[0x10] = 0x01; + dev->regs[0x14] = 0x01; + dev->regs[0x18] = 0x01; + dev->regs[0x1c] = 0x01; + } else { + dev->regs[0x06] = 0x80; + dev->regs[0x0a] = 0x01; /* IDE controller */ + } dev->regs[0x0b] = 0x01; /* Mass storage controller */ - if ((dev->local & 0xffff) == 0x8a) { + if ((dev->local & CMD_TYPE_648) && (dev->local & CMD648_JP7)) + for (int i = 0; i < 4; i++) + dev->regs[0x2c + i] = dev->regs[i]; + + if ((dev->regs[0x0a] == 0x01) && ((dev->regs[0x09] & 0x8a) == 0x8a)) { dev->regs[0x50] = 0x40; /* Enable Base address register R/W; If 0, they return 0 and are read-only 8 */ @@ -371,13 +612,47 @@ cmd646_reset(void *priv) dev->regs[0x51] = 0x08; dev->regs[0x57] = 0x0c; - dev->regs[0x59] = 0x40; - dev->irq_mode[0] = dev->irq_mode[1] = 0; + if (dev->local & CMD_TYPE_648) { + dev->regs[0x34] = 0x60; + + dev->regs[0x4f] = (dev->local & CMD648_JP7) ? 0x02 : 0x00; + dev->regs[0x51] |= 0x04; + + if (dev->local & CMD_TYPE_649) { + dev->regs[0x57] |= 0x80; + dev->regs[0x59] = 0x40; + } else + dev->regs[0x57] |= 0xc0; + + dev->regs[0x60] = 0x01; + dev->regs[0x62] = 0x21; + dev->regs[0x63] = 0x06; + dev->regs[0x65] = 0x60; + dev->regs[0x67] = 0xf0; + + /* 80-pin stuff. */ + dev->regs[0x72] = 0x08; + dev->regs[0x7a] = 0x08; + dev->regs[0x79] = 0x83; + } else + dev->regs[0x59] = 0x40; + dev->irq_pin = PCI_INTA; + if ((dev->local & CMD_TYPE_648) && (dev->local & CMD648_RAID)) + dev->irq_mode[0] = dev->irq_mode[1] = IRQ_MODE_PCI_IRQ_PIN; + else { + dev->irq_mode[0] = (dev->regs[0x09] & 0x01) ? IRQ_MODE_PCI_IRQ_PIN : IRQ_MODE_LEGACY; + dev->irq_mode[1] = (dev->regs[0x09] & 0x04) ? IRQ_MODE_PCI_IRQ_PIN : IRQ_MODE_LEGACY; + } + + dev->irq_pin = PCI_INTA; + cmd646_ide_handlers(dev); cmd646_ide_bm_handlers(dev); + + cmd646_bios_handler(dev); } static void @@ -391,42 +666,147 @@ cmd646_close(void *priv) static void * cmd646_init(const device_t *info) { - cmd646_t *dev = (cmd646_t *) calloc(1, sizeof(cmd646_t)); + cmd646_t *dev = (cmd646_t *) calloc(1, sizeof(cmd646_t)); + int first = 0; dev->local = info->local; device_add(&ide_pci_2ch_device); - if (info->local & 0x80000) - pci_add_card(PCI_ADD_NORMAL, cmd646_pci_read, cmd646_pci_write, dev, &dev->pci_slot); - else + if (info->local & 0x80000) { + first = 2; + device_add(&ide_pci_ter_qua_2ch_device); + } else + device_add(&ide_pci_2ch_device); + + if (info->local & CMD64X_ONBOARD) pci_add_card(PCI_ADD_IDE, cmd646_pci_read, cmd646_pci_write, dev, &dev->pci_slot); + else + pci_add_card(PCI_ADD_NORMAL, cmd646_pci_read, cmd646_pci_write, dev, &dev->pci_slot); dev->single_channel = !!(info->local & 0x20000); - dev->bm[0] = device_add_inst(&sff8038i_device, 1); + dev->bm[0] = device_add_inst(&sff8038i_device, first + 1); if (!dev->single_channel) - dev->bm[1] = device_add_inst(&sff8038i_device, 2); + dev->bm[1] = device_add_inst(&sff8038i_device, first + 2); - ide_set_bus_master(0, cmd646_bus_master_dma_0, cmd646_set_irq_0, dev); + ide_set_bus_master(first, cmd646_bus_master_dma_0, cmd646_set_irq_0, dev); if (!dev->single_channel) - ide_set_bus_master(1, cmd646_bus_master_dma_1, cmd646_set_irq_1, dev); + ide_set_bus_master(first + 1, cmd646_bus_master_dma_1, cmd646_set_irq_1, dev); sff_set_irq_mode(dev->bm[0], IRQ_MODE_LEGACY); if (!dev->single_channel) sff_set_irq_mode(dev->bm[1], IRQ_MODE_LEGACY); + sff_set_slot(dev->bm[0], dev->pci_slot); + sff_set_slot(dev->bm[1], dev->pci_slot); + + if (dev->local & CMD_TYPE_648) { + sff_set_ven_handlers(dev->bm[0], cmd646_bm_write, cmd646_bm_read, dev); + sff_set_ven_handlers(dev->bm[1], cmd646_bm_write, cmd646_bm_read, dev); + + dev->has_bios = device_get_config_int("bios"); + + if (dev->has_bios) { + char *fn = NULL; + + if (dev->local & CMD_TYPE_649) { + const char *bios_rev = (char *) device_get_config_bios("bios_rev"); + fn = (char *) device_get_bios_file(info, bios_rev, 0); + + dev->rom_addr_size = device_get_bios_file_size(info, bios_rev); + } else { + fn = CMD648_BIOS_FILE; + + dev->rom_addr_size = 0x00004000; + } + + dev->rom_addr_mask = dev->rom_addr_size - 1; + + rom_init(&dev->bios_rom, fn, + 0x000d0000, dev->rom_addr_size, dev->rom_addr_mask, 0, MEM_MAPPING_EXTERNAL); + + mem_mapping_disable(&dev->bios_rom.mapping); + } + } + cmd646_reset(dev); + if (dev->local & CMD_TYPE_648) + for (int i = 0; i < 4; i++) + dev->regs[0x2c + i] = dev->regs[i]; + return dev; } +static const device_config_t cmd648_config[] = { + { + .name = "bios", + .description = "Enable BIOS", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +}; +// clang-format on + +static const device_config_t cmd649_config[] = { + { + .name = "bios", + .description = "Enable BIOS", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, + { + .name = "bios_rev", + .description = "BIOS Revision", + .type = CONFIG_BIOS, + .default_string = "rev_2301", + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .bios = { + { + .name = "Revision 1.9.14", + .internal_name = "rev_1914", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 16384, + .files = { CMD649_REV_2301_BIOS_FILE, "" } + }, + { + .name = "Revision 2.3.01", + .internal_name = "rev_2301", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 65536, + .files = { CMD649_REV_2301_BIOS_FILE, "" } + }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } +}; +// clang-format on + const device_t ide_cmd646_device = { .name = "CMD PCI-0646", .internal_name = "ide_cmd646", .flags = DEVICE_PCI, - .local = 0x8a, + .local = 0x000008a | CMD64X_ONBOARD, .init = cmd646_init, .close = cmd646_close, .reset = cmd646_reset, @@ -440,7 +820,7 @@ const device_t ide_cmd646_legacy_only_device = { .name = "CMD PCI-0646 (Legacy Mode Only)", .internal_name = "ide_cmd646_legacy_only", .flags = DEVICE_PCI, - .local = 0x80, + .local = 0x0000080 | CMD64X_ONBOARD, .init = cmd646_init, .close = cmd646_close, .reset = cmd646_reset, @@ -451,10 +831,10 @@ const device_t ide_cmd646_legacy_only_device = { }; const device_t ide_cmd646_single_channel_device = { - .name = "CMD PCI-0646", + .name = "CMD PCI-0646 (Single Channel)", .internal_name = "ide_cmd646_single_channel", .flags = DEVICE_PCI, - .local = 0x2008a, + .local = 0x002008a | CMD64X_ONBOARD, .init = cmd646_init, .close = cmd646_close, .reset = cmd646_reset, @@ -463,3 +843,59 @@ const device_t ide_cmd646_single_channel_device = { .force_redraw = NULL, .config = NULL }; + +const device_t ide_cmd646_ter_qua_device = { + .name = "CMD PCI-0646 (Tertiary and Quaternary)", + .internal_name = "ide_cmd646_ter_qua", + .flags = DEVICE_PCI, + .local = 0x008008f, + .init = cmd646_init, + .close = cmd646_close, + .reset = cmd646_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t ide_cmd648_ter_qua_device = { + .name = "CMD PCI-0648 (Tertiary and Quaternary)", + .internal_name = "ide_cmd648_ter_qua", + .flags = DEVICE_PCI, + .local = 0x0d8008f, + .init = cmd646_init, + .close = cmd646_close, + .reset = cmd646_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = cmd648_config +}; + +const device_t ide_cmd648_ter_qua_onboard_device = { + .name = "CMD PCI-0648 (Tertiary and Quaternary) On-Board", + .internal_name = "ide_cmd648_ter_qua_onboard", + .flags = DEVICE_PCI, + .local = 0x0d8008f | CMD64X_ONBOARD, + .init = cmd646_init, + .close = cmd646_close, + .reset = cmd646_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t ide_cmd649_ter_qua_device = { + .name = "CMD PCI-0649 (Tertiary and Quaternary)", + .internal_name = "ide_cmd649_ter_qua", + .flags = DEVICE_PCI, + .local = 0x0f8008f, + .init = cmd646_init, + .close = cmd646_close, + .reset = cmd646_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = cmd649_config +}; diff --git a/src/disk/hdc_ide_rz1000.c b/src/disk/hdc_ide_rz1000.c index 06586b267..8e664dd92 100644 --- a/src/disk/hdc_ide_rz1000.c +++ b/src/disk/hdc_ide_rz1000.c @@ -34,7 +34,7 @@ #include <86box/hdc.h> #include <86box/hdc_ide.h> #include <86box/hdc_ide_sff8038i.h> -#include <86box/zip.h> +#include <86box/rdisk.h> #include <86box/mo.h> typedef struct rz1000_t { @@ -182,10 +182,10 @@ rz1000_reset(void *priv) (cdrom[i].ide_channel <= max_channel) && cdrom[i].priv) scsi_cdrom_reset((scsi_common_t *) cdrom[i].priv); } - for (i = 0; i < ZIP_NUM; i++) { - if ((zip_drives[i].bus_type == ZIP_BUS_ATAPI) && (zip_drives[i].ide_channel >= min_channel) && - (zip_drives[i].ide_channel <= max_channel) && zip_drives[i].priv) - zip_reset((scsi_common_t *) zip_drives[i].priv); + for (i = 0; i < RDISK_NUM; i++) { + if ((rdisk_drives[i].bus_type == RDISK_BUS_ATAPI) && (rdisk_drives[i].ide_channel >= min_channel) && + (rdisk_drives[i].ide_channel <= max_channel) && rdisk_drives[i].priv) + rdisk_reset((scsi_common_t *) rdisk_drives[i].priv); } for (i = 0; i < MO_NUM; i++) { if ((mo_drives[i].bus_type == MO_BUS_ATAPI) && (mo_drives[i].ide_channel >= min_channel) && @@ -275,7 +275,7 @@ const device_t ide_rz1000_pci_device = { }; const device_t ide_rz1000_pci_single_channel_device = { - .name = "PC Technology RZ-1000 PCI", + .name = "PC Technology RZ-1000 PCI (Single Channel)", .internal_name = "ide_rz1000_pci_single_channel", .flags = DEVICE_PCI, .local = 0x20000, diff --git a/src/disk/hdc_ide_sff8038i.c b/src/disk/hdc_ide_sff8038i.c index 7ded4372f..50deac38a 100644 --- a/src/disk/hdc_ide_sff8038i.c +++ b/src/disk/hdc_ide_sff8038i.c @@ -42,7 +42,7 @@ #include <86box/hdc.h> #include <86box/hdc_ide.h> #include <86box/hdc_ide_sff8038i.h> -#include <86box/zip.h> +#include <86box/rdisk.h> #include <86box/mo.h> #include <86box/plat_unused.h> @@ -118,6 +118,9 @@ sff_bus_master_write(uint16_t port, uint8_t val, void *priv) sff_log("SFF-8038i Bus master BYTE write: %04X %02X\n", port, val); + if (dev->ven_write != NULL) + val = dev->ven_write(port, val, dev->priv); + switch (port & 7) { case 0: sff_log("sff Cmd : val = %02X, old = %02X\n", val, dev->command); @@ -255,6 +258,9 @@ sff_bus_master_read(uint16_t port, void *priv) break; } + if (dev->ven_read != NULL) + ret= dev->ven_read(port, ret, dev->priv); + sff_log("SFF-8038i Bus master BYTE read : %04X %02X\n", port, ret); return ret; @@ -489,10 +495,10 @@ sff_reset(void *priv) cdrom[i].priv) scsi_cdrom_reset((scsi_common_t *) cdrom[i].priv); } - for (uint8_t i = 0; i < ZIP_NUM; i++) { - if ((zip_drives[i].bus_type == ZIP_BUS_ATAPI) && (zip_drives[i].ide_channel < 4) && - zip_drives[i].priv) - zip_reset((scsi_common_t *) zip_drives[i].priv); + for (uint8_t i = 0; i < RDISK_NUM; i++) { + if ((rdisk_drives[i].bus_type == RDISK_BUS_ATAPI) && (rdisk_drives[i].ide_channel < 4) && + rdisk_drives[i].priv) + rdisk_reset((scsi_common_t *) rdisk_drives[i].priv); } for (uint8_t i = 0; i < MO_NUM; i++) { if ((mo_drives[i].bus_type == MO_BUS_ATAPI) && (mo_drives[i].ide_channel < 4) && @@ -569,6 +575,16 @@ sff_set_mirq(sff8038i_t *dev, uint8_t mirq) dev->mirq = mirq; } +void +sff_set_ven_handlers(sff8038i_t *dev, uint8_t (*ven_write)(uint16_t port, uint8_t val, void *priv), + uint8_t (*ven_read)(uint16_t port, uint8_t val, void *priv), void *priv) +{ + dev->ven_write = ven_write; + dev->ven_read = ven_read; + + dev->priv = priv; +} + static void sff_close(void *priv) { diff --git a/src/disk/hdc_ide_w83769f.c b/src/disk/hdc_ide_w83769f.c index 7829c5b92..25ee16d10 100644 --- a/src/disk/hdc_ide_w83769f.c +++ b/src/disk/hdc_ide_w83769f.c @@ -34,7 +34,7 @@ #include <86box/hdc.h> #include <86box/hdc_ide.h> #include <86box/hdc_ide_sff8038i.h> -#include <86box/zip.h> +#include <86box/rdisk.h> #include <86box/mo.h> typedef struct w83769f_t { @@ -297,10 +297,10 @@ w83769f_reset(void *priv) (cdrom[i].ide_channel <= max_channel) && cdrom[i].priv) scsi_cdrom_reset((scsi_common_t *) cdrom[i].priv); } - for (i = 0; i < ZIP_NUM; i++) { - if ((zip_drives[i].bus_type == ZIP_BUS_ATAPI) && (zip_drives[i].ide_channel >= min_channel) && - (zip_drives[i].ide_channel <= max_channel) && zip_drives[i].priv) - zip_reset((scsi_common_t *) zip_drives[i].priv); + for (i = 0; i < RDISK_NUM; i++) { + if ((rdisk_drives[i].bus_type == RDISK_BUS_ATAPI) && (rdisk_drives[i].ide_channel >= min_channel) && + (rdisk_drives[i].ide_channel <= max_channel) && rdisk_drives[i].priv) + rdisk_reset((scsi_common_t *) rdisk_drives[i].priv); } for (i = 0; i < MO_NUM; i++) { if ((mo_drives[i].bus_type == MO_BUS_ATAPI) && (mo_drives[i].ide_channel >= min_channel) && diff --git a/src/disk/hdc_st506_xt.c b/src/disk/hdc_st506_xt.c index b3a07fa5a..a7313ca63 100644 --- a/src/disk/hdc_st506_xt.c +++ b/src/disk/hdc_st506_xt.c @@ -1915,7 +1915,7 @@ victor_v86p_available(void) static const device_config_t dtc_config[] = { { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xc8000, @@ -1969,7 +1969,7 @@ static const device_config_t st11_config[] = { }, { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xc8000, @@ -2006,7 +2006,7 @@ static const device_config_t st11_config[] = { static const device_config_t wd_config[] = { { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xc8000, @@ -2089,7 +2089,7 @@ static const device_config_t wd_nobios_config[] = { static const device_config_t wd_rll_config[] = { { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xc8000, @@ -2153,7 +2153,7 @@ static const device_config_t wd_rll_config[] = { static const device_config_t wd1004a_config[] = { { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xc8000, @@ -2202,7 +2202,7 @@ static const device_config_t wd1004a_config[] = { static const device_config_t wd1004_rll_config[] = { { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xc8000, diff --git a/src/disk/hdc_xta.c b/src/disk/hdc_xta.c index d54f6ab0c..8c60caad2 100644 --- a/src/disk/hdc_xta.c +++ b/src/disk/hdc_xta.c @@ -82,6 +82,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include #include @@ -101,11 +102,15 @@ #include <86box/ui.h> #include <86box/hdc.h> #include <86box/hdd.h> +#include "cpu.h" #define HDC_TIME (250 * TIMER_USEC) #define WD_REV_1_BIOS_FILE "roms/hdd/xta/idexywd2.bin" #define WD_REV_2_BIOS_FILE "roms/hdd/xta/infowdbios.rom" +#define PC3086_BIOS_FILE "roms/machines/pc3086/c800.bin" +#define ST50X_BIOS_FILE "roms/hdd/xta/ST05XBIO.BIN" +#define PC5086_BIOS_FILE "roms/machines/pc5086/c800.bin" enum { STATE_IDLE = 0, @@ -236,6 +241,7 @@ typedef struct hdc_t { const char *name; /* controller name */ uint16_t base; /* controller base I/O address */ + uint8_t sw; /* controller switches */ int8_t irq; /* controller IRQ channel */ int8_t dma; /* controller DMA channel */ int8_t type; /* controller type ID */ @@ -269,6 +275,10 @@ typedef struct hdc_t { uint8_t sector_buf[512]; /* sector buffer */ } hdc_t; +typedef struct hdc_dual_t { + hdc_t *hdc[2]; +} hdc_dual_t; + #ifdef ENABLE_XTA_LOG int xta_do_log = ENABLE_XTA_LOG; @@ -882,7 +892,7 @@ hdc_read(uint16_t port, void *priv) hdc_t *dev = (hdc_t *) priv; uint8_t ret = 0xff; - switch (port & 7) { + switch (port & 3) { case 0: /* DATA register */ dev->status &= ~STAT_IRQ; @@ -915,7 +925,7 @@ hdc_read(uint16_t port, void *priv) break; case 2: /* "read option jumpers" */ - ret = 0xff; /* all switches off */ + ret = dev->sw; break; default: @@ -931,7 +941,7 @@ hdc_write(uint16_t port, uint8_t val, void *priv) { hdc_t *dev = (hdc_t *) priv; - switch (port & 7) { + switch (port & 3) { case 0: /* DATA register */ if (dev->state == STATE_RDATA) { if (!(dev->status & STAT_REQ)) { @@ -989,38 +999,92 @@ hdc_write(uint16_t port, uint8_t val, void *priv) } } +void +xta_handler(void *priv, int set) +{ + hdc_t *dev = (hdc_t *) priv; + + io_handler(set, dev->base, 4, + hdc_read, NULL, NULL, hdc_write, NULL, NULL, dev); +} + static void * -xta_init(const device_t *info) +xta_init_common(const device_t *info, int type) { drive_t *drive; const char *bios_rev = NULL; const char *fn = NULL; hdc_t *dev; int c; - int max = XTA_NUM; + int min = 0; + int max = XTA_NUM; /* Allocate and initialize device block. */ dev = calloc(1, sizeof(hdc_t)); - dev->type = info->local; + + dev->sw = 0xff; /* all switches off */ + dev->type = type; /* Do per-controller-type setup. */ switch (dev->type) { case 0: /* WDXT-150, with BIOS */ dev->name = "WDXT-150"; + bios_rev = (char *) device_get_config_bios("bios_rev"); + fn = (char *) device_get_bios_file(info, bios_rev, 0); + /* Revision 2 actually supports 2 drives using drive select. */ + if (!strcmp(bios_rev, "rev_1")) + max = 1; +#ifdef SELECTABLE_BASE dev->base = device_get_config_hex16("base"); +#else + dev->base = 0x0320; +#endif dev->irq = device_get_config_int("irq"); dev->rom_addr = device_get_config_hex20("bios_addr"); dev->dma = 3; - bios_rev = (char *) device_get_config_bios("bios_rev"); - fn = (char *) device_get_bios_file(info, bios_rev, 0); - max = 1; + case 1: /* Amstrad PC3086 */ + dev->name = "WDXT-150 PC3086"; + dev->rom_addr = 0xc8000; + fn = PC3086_BIOS_FILE; + dev->base = 0x0320; + dev->irq = 5; + dev->dma = 3; break; - case 1: /* EuroPC */ - dev->name = "HD20"; - dev->base = 0x0320; - dev->irq = 5; - dev->dma = 3; + case 2: /* EuroPC */ + case 5: /* Amstrad PC5086 */ + switch (dev->type) { + case 2: + dev->name = "HD20"; + break; + case 5: + dev->name = "ST-50X PC5086"; + dev->rom_addr = 0xc8000; + fn = PC5086_BIOS_FILE; + max = 1; + break; + } + dev->base = 0x0320; + dev->irq = 5; + dev->dma = 3; + break; + case 3: /* Seagate ST-05X Standalone */ + case 4: /* Seagate ST-05X Standalone secondary device */ + switch (dev->type) { + case 3: + dev->name = "ST-50X PRI"; + dev->rom_addr = device_get_config_hex20("bios_addr"); + fn = ST50X_BIOS_FILE; + max = 1; + break; + case 4: + dev->name = "ST-50X SEC"; + min = 1; + break; + } + dev->base = 0x0320 + (dev->type & 4); + dev->irq = 5; + dev->dma = 3; break; default: @@ -1031,14 +1095,16 @@ xta_init(const device_t *info) dev->name, dev->base, dev->irq, dev->dma); if (dev->rom_addr != 0x000000) xta_log(", BIOS=%06X", dev->rom_addr); - xta_log(")\n"); /* Load any disks for this device class. */ c = 0; for (uint8_t i = 0; i < HDD_NUM; i++) { - if ((hdd[i].bus_type == HDD_BUS_XTA) && (hdd[i].xta_channel < max)) { - drive = &dev->drives[hdd[i].xta_channel]; + if ((hdd[i].bus_type == HDD_BUS_XTA) && (hdd[i].xta_channel >= min) && (hdd[i].xta_channel < max)) { + if (dev->type == 4) + drive = &dev->drives[0]; + else + drive = &dev->drives[hdd[i].xta_channel]; if (!hdd_image_load(i)) { drive->present = 0; @@ -1058,6 +1124,156 @@ xta_init(const device_t *info) drive->hpc = drive->cfg_hpc; drive->tracks = drive->cfg_tracks; + if (dev->type == 0) { + if (!strcmp(bios_rev, "rev_1")) { + /* + WDXT-150, Revision 1 switches: + - Bit 6: 1 = IBM (INT 13h), 0 = Tandy (INT 0Ah). + - Bit 5: 1 = 17 sectors per track, 0 = 27 sectors per track. + - Drive 0, bits 1,0: + - With bit 4 set: + - 0,0 = 820/4/17; + - 0,1 = 615/4/17; + - 1,0 = 782/4/17; + - 1,1 = 782/2/17. + - With bit 4 clear: + - 0,0 = 1024/4/17; + - 0,1 = 940/4/17; + - 1,0 = 1024/4/17; + - 1,1 = 1024/2/17. + - Drive 1, bits 3,2: + - With bit 4 set: + - 0,0 = 820/4/17; + - 0,1 = 615/4/17; + - 1,0 = 782/4/17; + - 1,1 = 782/2/17. + - With bit 4 clear: + - 0,0 = 1024/4/17; + - 0,1 = 940/4/17; + - 1,0 = 1024/4/17; + - 1,1 = 1024/2/17. + */ + if (drive->tracks == 940) + dev->sw = ((dev->sw & 0xef) & (c ? 0xf3 : 0xfc)) | (0x01 << (c << 1)); + else if (drive->tracks == 1024) { + if (drive->hpc == 4) + dev->sw = ((dev->sw & 0xef) & (c ? 0xf3 : 0xfc)) | (0x00 << (c << 1)); + else + dev->sw = ((dev->sw & 0xef) & (c ? 0xf3 : 0xfc)) | (0x03 << (c << 1)); + } else if (drive->tracks == 782) { + if (drive->hpc == 4) + dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x02 << (c << 1)); + else + dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x03 << (c << 1)); + } else if (drive->tracks == 820) + dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x00 << (c << 1)); + else + dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x01 << (c << 1)); + } else { + /* + WDXT-150, Revision 2 switches: + - Drive 0, bits 1,0: + - With bit 4 set: + - 0,0 = 612/4/17; + - 0,1 = 615/6/17; + - 1,0 = 977/5/17; + - 1,1 = 615/4/17. + - With bit 4 clear: + - 0,0 = 976/4/17; + - 0,1 = 1024/3/17; + - 1,0 = 1024/4/17; + - 1,1 = 1024/2/17. + - Drive 1, bits 3,2: + - With bit 4 set: + - 0,0 = 612/4/17; + - 0,1 = 615/6/17; + - 1,0 = 977/5/17; + - 1,1 = 615/4/17. + - With bit 4 clear: + - 0,0 = 976/4/17; + - 0,1 = 1024/3/17; + - 1,0 = 1024/4/17; + - 1,1 = 1024/2/17. + */ + if (drive->tracks == 976) + dev->sw = ((dev->sw & 0xef) & (c ? 0xf3 : 0xfc)) | (0x00 << (c << 1)); + else if (drive->tracks == 1024) { + if (drive->hpc == 3) + dev->sw = ((dev->sw & 0xef) & (c ? 0xf3 : 0xfc)) | (0x01 << (c << 1)); + else if (drive->hpc == 4) + dev->sw = ((dev->sw & 0xef) & (c ? 0xf3 : 0xfc)) | (0x02 << (c << 1)); + else + dev->sw = ((dev->sw & 0xef) & (c ? 0xf3 : 0xfc)) | (0x03 << (c << 1)); + } else if (drive->tracks == 615) { + if (drive->hpc == 6) + dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x01 << (c << 1)); + else + dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x03 << (c << 1)); + } else if (drive->tracks == 612) + dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x00 << (c << 1)); + else + dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x02 << (c << 1)); + } + } else if (dev->type == 1) { + /* + WDXT-150, Revision 3 (Amstrad PC3086) switches: + - Drive 0, bits 1,0: + - With bit 4 set: + - 0,0 = 612/4/17; + - 0,1 = 615/6/17; + - 1,0 = 977/5/17; + - 1,1 = 615/4/17. + - With bit 4 clear: + - 0,0 = 971/4/17; + - 0,1 = 976/6/17; + - 1,0 = 1024/5/17; + - 1,1 = 976/4/17. + - Drive 1, bits 3,2: + - With bit 4 set: + - 0,0 = 612/4/17; + - 0,1 = 615/6/17; + - 1,0 = 977/5/17; + - 1,1 = 615/4/17. + - With bit 4 clear: + - 0,0 = 971/4/17; + - 0,1 = 976/6/17; + - 1,0 = 1024/5/17; + - 1,1 = 976/4/17. + */ + if (drive->tracks == 971) + dev->sw = ((dev->sw & 0xef) & (c ? 0xf3 : 0xfc)) | (0x00 << (c << 1)); + else if (drive->tracks == 976) { + if (drive->hpc == 6) + dev->sw = ((dev->sw & 0xef) & (c ? 0xf3 : 0xfc)) | (0x01 << (c << 1)); + else + dev->sw = ((dev->sw & 0xef) & (c ? 0xf3 : 0xfc)) | (0x03 << (c << 1)); + } else if (drive->tracks == 1024) + dev->sw = ((dev->sw & 0xef) & (c ? 0xf3 : 0xfc)) | (0x02 << (c << 1)); + else if (drive->tracks == 615) { + if (drive->hpc == 6) + dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x01 << (c << 1)); + else + dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x03 << (c << 1)); + } else if (drive->tracks == 612) + dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x00 << (c << 1)); + else + dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x02 << (c << 1)); + } else if ((dev->type >= 3) && (dev->type <= 5)) { + /* + Bits 1, 0: + - 1, 1 = 615/4/17 (20 MB); + - 1, 0 or 0, 0 = 980/5/17 (40 MB); + - 0, 1 = 615/6/17 (30 MB). + - 0, 0 is actually no hard disk present - switch port supposed to be readable always? + */ + if (drive->tracks == 980) + dev->sw = 0xfe; + else if (drive->hpc == 6) + dev->sw = 0xfd; + else + dev->sw = 0xff; + } + xta_log("%s: drive%d (cyl=%d,hd=%d,spt=%d), disk %d\n", dev->name, hdd[i].xta_channel, drive->tracks, drive->hpc, drive->spt, i); @@ -1083,6 +1299,23 @@ xta_init(const device_t *info) return dev; } +static void * +xta_init(const device_t *info) +{ + return xta_init_common(info, info->local); +} + +static void * +xta_st50x_init(const device_t *info) +{ + hdc_dual_t *dev = (hdc_dual_t *) calloc(1, sizeof(hdc_dual_t)); + + dev->hdc[0] = xta_init_common(info, info->local); + dev->hdc[1] = xta_init_common(info, 4); + + return dev; +} + static void xta_close(void *priv) { @@ -1104,6 +1337,21 @@ xta_close(void *priv) free(dev); } +static void +xta_st50x_close(void *priv) +{ + hdc_dual_t *dev = (hdc_dual_t *) priv; + + xta_close(dev->hdc[1]); + xta_close(dev->hdc[0]); +} + +static int +st50x_available(void) +{ + return (rom_present(ST50X_BIOS_FILE)); +} + static const device_config_t wdxt150_config[] = { // clang-format off { @@ -1136,6 +1384,7 @@ static const device_config_t wdxt150_config[] = { { .files_no = 0 } }, }, +#ifdef SELECTABLE_BASE { .name = "base", .description = "Address", @@ -1151,6 +1400,7 @@ static const device_config_t wdxt150_config[] = { }, .bios = { { 0 } } }, +#endif { .name = "irq", .description = "IRQ", @@ -1168,7 +1418,28 @@ static const device_config_t wdxt150_config[] = { }, { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", + .type = CONFIG_HEX20, + .default_string = NULL, + .default_int = 0xc8000, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "C800H", .value = 0xc8000 }, + { .description = "CA00H", .value = 0xca000 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +// clang-format off +}; + +static const device_config_t st50x_config[] = { + // clang-format off + { + .name = "bios_addr", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xc8000, @@ -1199,11 +1470,53 @@ const device_t xta_wdxt150_device = { .config = wdxt150_config }; +const device_t xta_wdxt150_pc3086_device = { + .name = "WDXT-150 XTA Fixed Disk Controller (PC3086)", + .internal_name = "xta_wdxt150", + .flags = DEVICE_ISA, + .local = 1, + .init = xta_init, + .close = xta_close, + .reset = NULL, + .available = NULL /*xta_available*/, + .speed_changed = NULL, + .force_redraw = NULL, + .config = wdxt150_config +}; + const device_t xta_hd20_device = { .name = "EuroPC HD20 Fixed Disk Controller", .internal_name = "xta_hd20", .flags = DEVICE_ISA, - .local = 1, + .local = 2, + .init = xta_init, + .close = xta_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t xta_st50x_device = { + .name = "ST-50X Fixed Disk Controller", + .internal_name = "xta_st50x", + .flags = DEVICE_ISA, + .local = 3, + .init = xta_st50x_init, + .close = xta_st50x_close, + .reset = NULL, + .available = st50x_available, + .speed_changed = NULL, + .force_redraw = NULL, + .config = st50x_config +}; + +const device_t xta_st50x_pc5086_device = { + .name = "ST-50X Fixed Disk Controller (PC5086)", + .internal_name = "xta_st50x_pc5086", + .flags = DEVICE_ISA, + .local = 5, .init = xta_init, .close = xta_close, .reset = NULL, diff --git a/src/machine/m_ps1_hdc.c b/src/disk/hdc_xta_ps1.c similarity index 100% rename from src/machine/m_ps1_hdc.c rename to src/disk/hdc_xta_ps1.c diff --git a/src/disk/hdc_xtide.c b/src/disk/hdc_xtide.c index 9a122f595..63067f579 100644 --- a/src/disk/hdc_xtide.c +++ b/src/disk/hdc_xtide.c @@ -341,7 +341,7 @@ static const device_config_t xtide_config[] = { }, { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xd0000, diff --git a/src/disk/hdd.c b/src/disk/hdd.c index e051cc841..e48af6b20 100644 --- a/src/disk/hdd.c +++ b/src/disk/hdd.c @@ -78,6 +78,12 @@ no_cdrom: if (!strcmp(str, "scsi")) return HDD_BUS_SCSI; + + if (!strcmp(str, "mitsumi")) + return CDROM_BUS_MITSUMI; + + if (!strcmp(str, "mke")) + return CDROM_BUS_MKE; return 0; } @@ -89,6 +95,17 @@ hdd_bus_to_string(int bus, UNUSED(int cdrom)) switch (bus) { default: + if (cdrom) { + switch (bus) { + case CDROM_BUS_MITSUMI: + s = "mitsumi"; + break; + case CDROM_BUS_MKE: + s = "mke"; + break; + } + break; + } case HDD_BUS_DISABLED: break; @@ -143,8 +160,12 @@ hdd_seek_get_time(hard_disk_t *hdd, uint32_t dst_addr, uint8_t operation, uint8_ const hdd_zone_t *zone = NULL; if (hdd->num_zones <= 0) { +#ifdef DO_FATAL fatal("hdd_seek_get_time(): hdd->num_zones < 0)\n"); return 0.0; +#else + return 1000.0; +#endif } for (uint32_t i = 0; i < hdd->num_zones; i++) { zone = &hdd->zones[i]; diff --git a/src/disk/mo.c b/src/disk/mo.c index 1a2db0443..b287f68a0 100644 --- a/src/disk/mo.c +++ b/src/disk/mo.c @@ -152,6 +152,14 @@ mo_load(const mo_t *dev, const char *fn, const int skip_insert) { const int was_empty = mo_is_empty(dev->id); int ret = 0; + int offs = 0; + + if (strstr(fn, "wp://") == fn) { + offs = 5; + dev->drv->read_only = 1; + } + + fn += offs; if (dev->drv == NULL) mo_eject(dev->id); @@ -202,7 +210,7 @@ mo_load(const mo_t *dev, const char *fn, const int skip_insert) log_fatal(dev->log, "mo_load(): Error seeking to the beginning of " "the file\n"); - strncpy(dev->drv->image_path, fn, sizeof(dev->drv->image_path) - 1); + strncpy(dev->drv->image_path, fn - offs, sizeof(dev->drv->image_path) - 1); ret = 1; } else @@ -218,6 +226,9 @@ mo_load(const mo_t *dev, const char *fn, const int skip_insert) if (was_empty) mo_insert((mo_t *) dev); } + + if (ret) + ui_sb_update_icon_wp(SB_MO | dev->id, dev->drv->read_only); } void @@ -2005,7 +2016,7 @@ mo_get_max(UNUSED(const ide_t *ide), const int ide_has_dma, const int type) switch (type) { case TYPE_PIO: - ret = ide_has_dma ? 3 : 0; + ret = 3; break; case TYPE_SDMA: default: @@ -2032,10 +2043,10 @@ mo_get_timings(UNUSED(const ide_t *ide), const int ide_has_dma, const int type) ret = ide_has_dma ? 0x96 : 0; break; case TIMINGS_PIO: - ret = ide_has_dma ? 0xb4 : 0; + ret = 0xf0; break; case TIMINGS_PIO_FC: - ret = ide_has_dma ? 0xb4 : 0; + ret = 0xb4; break; default: ret = 0; diff --git a/src/disk/zip.c b/src/disk/rdisk.c similarity index 65% rename from src/disk/zip.c rename to src/disk/rdisk.c index 55cf901a4..b51dc4e66 100644 --- a/src/disk/zip.c +++ b/src/disk/rdisk.c @@ -13,7 +13,7 @@ * * Copyright 2018-2025 Miran Grca. */ -#ifdef ENABLE_ZIP_LOG +#ifdef ENABLE_RDISK_LOG #include #endif #include @@ -31,18 +31,19 @@ #include <86box/plat.h> #include <86box/ui.h> #include <86box/hdc_ide.h> -#include <86box/zip.h> +#include <86box/rdisk.h> +#include <86box/version.h> #define IDE_ATAPI_IS_EARLY id->sc->pad0 -zip_drive_t zip_drives[ZIP_NUM]; +rdisk_drive_t rdisk_drives[RDISK_NUM]; // clang-format off /* Table of all SCSI commands and their flags, needed for the new disc change / not ready handler. */ -const uint8_t zip_command_flags[0x100] = { +const uint8_t rdisk_command_flags[0x100] = { [0x00] = IMPLEMENTED | CHECK_READY, [0x01] = IMPLEMENTED | ALLOW_UA | SCSI_ONLY, [0x03] = IMPLEMENTED | ALLOW_UA, @@ -139,35 +140,35 @@ static const mode_sense_pages_t zip_250_mode_sense_pages_changeable = { }; // clang-format on -static void zip_command_complete(zip_t *dev); -static void zip_init(zip_t *dev); +static void rdisk_command_complete(rdisk_t *dev); +static void rdisk_init(rdisk_t *dev); -#ifdef ENABLE_ZIP_LOG -int zip_do_log = ENABLE_ZIP_LOG; +#ifdef ENABLE_RDISK_LOG +int rdisk_do_log = ENABLE_RDISK_LOG; static void -zip_log(void *priv, const char *fmt, ...) +rdisk_log(void *priv, const char *fmt, ...) { va_list ap; - if (zip_do_log) { + if (rdisk_do_log) { va_start(ap, fmt); log_out(priv, fmt, ap); va_end(ap); } } #else -# define zip_log(priv, fmt, ...) +# define rdisk_log(priv, fmt, ...) #endif static int -zip_load_abort(const zip_t *dev) +rdisk_load_abort(const rdisk_t *dev) { if (dev->drv->fp) fclose(dev->drv->fp); dev->drv->fp = NULL; dev->drv->medium_size = 0; - zip_eject(dev->id); /* Make sure the host OS knows we've rejected (and ejected) the image. */ + rdisk_eject(dev->id); /* Make sure the host OS knows we've rejected (and ejected) the image. */ return 0; } @@ -178,9 +179,9 @@ image_is_zdi(const char *s) } int -zip_is_empty(const uint8_t id) +rdisk_is_empty(const uint8_t id) { - const zip_t *dev = (const zip_t *) zip_drives[id].priv; + const rdisk_t *dev = (const rdisk_t *) rdisk_drives[id].priv; int ret = 0; if ((dev->drv == NULL) || (dev->drv->fp == NULL)) @@ -190,13 +191,21 @@ zip_is_empty(const uint8_t id) } void -zip_load(const zip_t *dev, const char *fn, const int skip_insert) +rdisk_load(const rdisk_t *dev, const char *fn, const int skip_insert) { - const int was_empty = zip_is_empty(dev->id); + const int was_empty = rdisk_is_empty(dev->id); int ret = 0; + int offs = 0; + + if (strstr(fn, "wp://") == fn) { + offs = 5; + dev->drv->read_only = 1; + } + + fn += offs; if (dev->drv == NULL) - zip_eject(dev->id); + rdisk_eject(dev->id); else { const int is_zdi = image_is_zdi(fn); @@ -207,11 +216,11 @@ zip_load(const zip_t *dev, const char *fn, const int skip_insert) if (!dev->drv->read_only) { dev->drv->fp = plat_fopen(fn, "rb"); if (dev->drv->fp == NULL) - ret = zip_load_abort(dev); + ret = rdisk_load_abort(dev); else dev->drv->read_only = 1; } else - ret = zip_load_abort(dev); + ret = rdisk_load_abort(dev); } if (ret) { @@ -225,17 +234,17 @@ zip_load(const zip_t *dev, const char *fn, const int skip_insert) } else dev->drv->base = 0; - if (dev->drv->is_250) { + if (dev->drv->type != RDISK_TYPE_ZIP_100) { if ((size != (ZIP_250_SECTORS << 9)) && (size != (ZIP_SECTORS << 9))) { - zip_log(dev->log, "File is incorrect size for a ZIP image\n"); - zip_log(dev->log, "Must be exactly %i or %i bytes\n", + rdisk_log(dev->log, "File is incorrect size for a RDISK image\n"); + rdisk_log(dev->log, "Must be exactly %i or %i bytes\n", ZIP_250_SECTORS << 9, ZIP_SECTORS << 9); - ret = zip_load_abort(dev); + ret = rdisk_load_abort(dev); } } else if (size != (ZIP_SECTORS << 9)) { - zip_log(dev->log, "File is incorrect size for a ZIP image\n"); - zip_log(dev->log, "Must be exactly %i bytes\n", ZIP_SECTORS << 9); - ret = zip_load_abort(dev); + rdisk_log(dev->log, "File is incorrect size for a RDISK image\n"); + rdisk_log(dev->log, "Must be exactly %i bytes\n", ZIP_SECTORS << 9); + ret = rdisk_load_abort(dev); } if (ret) @@ -244,10 +253,10 @@ zip_load(const zip_t *dev, const char *fn, const int skip_insert) if (ret) { if (fseek(dev->drv->fp, dev->drv->base, SEEK_SET) == -1) - log_fatal(dev->log, "zip_load(): Error seeking to the beginning of " + log_fatal(dev->log, "rdisk_load(): Error seeking to the beginning of " "the file\n"); - strncpy(dev->drv->image_path, fn, sizeof(dev->drv->image_path) - 1); + strncpy(dev->drv->image_path, fn - offs, sizeof(dev->drv->image_path) - 1); /* After using strncpy, dev->drv->image_path needs to be explicitly null terminated to make gcc happy. @@ -264,23 +273,26 @@ zip_load(const zip_t *dev, const char *fn, const int skip_insert) if (ret && !skip_insert) { /* Signal media change to the emulated machine. */ - zip_insert((zip_t *) dev); + rdisk_insert((rdisk_t *) dev); /* The drive was previously empty, transition directly to UNIT ATTENTION. */ if (was_empty) - zip_insert((zip_t *) dev); + rdisk_insert((rdisk_t *) dev); } + + if (ret) + ui_sb_update_icon_wp(SB_RDISK | dev->id, dev->drv->read_only); } void -zip_disk_reload(const zip_t *dev) +rdisk_disk_reload(const rdisk_t *dev) { if (strlen(dev->drv->prev_image_path) != 0) - (void) zip_load(dev, dev->drv->prev_image_path, 0); + (void) rdisk_load(dev, dev->drv->prev_image_path, 0); } static void -zip_disk_unload(const zip_t *dev) +rdisk_disk_unload(const rdisk_t *dev) { if ((dev->drv != NULL) && (dev->drv->fp != NULL)) { fclose(dev->drv->fp); @@ -289,10 +301,10 @@ zip_disk_unload(const zip_t *dev) } void -zip_disk_close(const zip_t *dev) +rdisk_disk_close(const rdisk_t *dev) { if ((dev->drv != NULL) && (dev->drv->fp != NULL)) { - zip_disk_unload(dev); + rdisk_disk_unload(dev); memcpy(dev->drv->prev_image_path, dev->drv->image_path, sizeof(dev->drv->prev_image_path)); @@ -300,68 +312,68 @@ zip_disk_close(const zip_t *dev) dev->drv->medium_size = 0; - zip_insert((zip_t *) dev); + rdisk_insert((rdisk_t *) dev); } } static void -zip_set_callback(const zip_t *dev) +rdisk_set_callback(const rdisk_t *dev) { - if (dev->drv->bus_type != ZIP_BUS_SCSI) + if (dev->drv->bus_type != RDISK_BUS_SCSI) ide_set_callback(ide_drives[dev->drv->ide_channel], dev->callback); } static void -zip_init(zip_t *dev) +rdisk_init(rdisk_t *dev) { - if (dev->id < ZIP_NUM) { + if (dev->id < RDISK_NUM) { dev->requested_blocks = 1; dev->sense[0] = 0xf0; dev->sense[7] = 10; dev->drv->bus_mode = 0; - if (dev->drv->bus_type >= ZIP_BUS_ATAPI) + if (dev->drv->bus_type >= RDISK_BUS_ATAPI) dev->drv->bus_mode |= 2; - if (dev->drv->bus_type < ZIP_BUS_SCSI) + if (dev->drv->bus_type < RDISK_BUS_SCSI) dev->drv->bus_mode |= 1; - zip_log(dev->log, "Bus type %i, bus mode %i\n", dev->drv->bus_type, dev->drv->bus_mode); - if (dev->drv->bus_type < ZIP_BUS_SCSI) { + rdisk_log(dev->log, "Bus type %i, bus mode %i\n", dev->drv->bus_type, dev->drv->bus_mode); + if (dev->drv->bus_type < RDISK_BUS_SCSI) { dev->tf->phase = 1; dev->tf->request_length = 0xEB14; } dev->tf->status = READY_STAT | DSC_STAT; dev->tf->pos = 0; dev->packet_status = PHASE_NONE; - zip_sense_key = zip_asc = zip_ascq = dev->unit_attention = dev->transition = 0; - zip_info = 0x00000000; + rdisk_sense_key = rdisk_asc = rdisk_ascq = dev->unit_attention = dev->transition = 0; + rdisk_info = 0x00000000; } } static int -zip_supports_pio(const zip_t *dev) +rdisk_supports_pio(const rdisk_t *dev) { return (dev->drv->bus_mode & 1); } static int -zip_supports_dma(const zip_t *dev) +rdisk_supports_dma(const rdisk_t *dev) { return (dev->drv->bus_mode & 2); } /* Returns: 0 for none, 1 for PIO, 2 for DMA. */ static int -zip_current_mode(const zip_t *dev) +rdisk_current_mode(const rdisk_t *dev) { - if (!zip_supports_pio(dev) && !zip_supports_dma(dev)) + if (!rdisk_supports_pio(dev) && !rdisk_supports_dma(dev)) return 0; - if (zip_supports_pio(dev) && !zip_supports_dma(dev)) { - zip_log(dev->log, "Drive does not support DMA, setting to PIO\n"); + if (rdisk_supports_pio(dev) && !rdisk_supports_dma(dev)) { + rdisk_log(dev->log, "Drive does not support DMA, setting to PIO\n"); return 1; } - if (!zip_supports_pio(dev) && zip_supports_dma(dev)) + if (!rdisk_supports_pio(dev) && rdisk_supports_dma(dev)) return 2; - if (zip_supports_pio(dev) && zip_supports_dma(dev)) { - zip_log(dev->log, "Drive supports both, setting to %s\n", + if (rdisk_supports_pio(dev) && rdisk_supports_dma(dev)) { + rdisk_log(dev->log, "Drive supports both, setting to %s\n", (dev->tf->features & 1) ? "DMA" : "PIO"); return (dev->tf->features & 1) ? 2 : 1; } @@ -370,80 +382,81 @@ zip_current_mode(const zip_t *dev) } static void -zip_mode_sense_load(zip_t *dev) +rdisk_mode_sense_load(rdisk_t *dev) { char fn[512] = { 0 }; memset(&dev->ms_pages_saved, 0, sizeof(mode_sense_pages_t)); - if (dev->drv->is_250) { - if (zip_drives[dev->id].bus_type == ZIP_BUS_SCSI) - memcpy(&dev->ms_pages_saved, &zip_250_mode_sense_pages_default_scsi, sizeof(mode_sense_pages_t)); - else - memcpy(&dev->ms_pages_saved, &zip_250_mode_sense_pages_default, sizeof(mode_sense_pages_t)); - } else { - if (zip_drives[dev->id].bus_type == ZIP_BUS_SCSI) + + if (dev->drv->type == RDISK_TYPE_ZIP_100) { + if (rdisk_drives[dev->id].bus_type == RDISK_BUS_SCSI) memcpy(&dev->ms_pages_saved, &zip_mode_sense_pages_default_scsi, sizeof(mode_sense_pages_t)); else memcpy(&dev->ms_pages_saved, &zip_mode_sense_pages_default, sizeof(mode_sense_pages_t)); + } else { + if (rdisk_drives[dev->id].bus_type == RDISK_BUS_SCSI) + memcpy(&dev->ms_pages_saved, &zip_250_mode_sense_pages_default_scsi, sizeof(mode_sense_pages_t)); + else + memcpy(&dev->ms_pages_saved, &zip_250_mode_sense_pages_default, sizeof(mode_sense_pages_t)); } - if (dev->drv->bus_type == ZIP_BUS_SCSI) - sprintf(fn, "scsi_zip_%02i_mode_sense_bin", dev->id); + if (dev->drv->bus_type == RDISK_BUS_SCSI) + sprintf(fn, "scsi_rdisk_%02i_mode_sense_bin", dev->id); else - sprintf(fn, "zip_%02i_mode_sense_bin", dev->id); + sprintf(fn, "rdisk_%02i_mode_sense_bin", dev->id); FILE *fp = plat_fopen(nvr_path(fn), "rb"); if (fp) { - /* Nothing to read, not used by ZIP. */ + /* Nothing to read, not used by RDISK. */ fclose(fp); } } static void -zip_mode_sense_save(const zip_t *dev) +rdisk_mode_sense_save(const rdisk_t *dev) { char fn[512] = { 0 }; - if (dev->drv->bus_type == ZIP_BUS_SCSI) - sprintf(fn, "scsi_zip_%02i_mode_sense_bin", dev->id); + if (dev->drv->bus_type == RDISK_BUS_SCSI) + sprintf(fn, "scsi_rdisk_%02i_mode_sense_bin", dev->id); else - sprintf(fn, "zip_%02i_mode_sense_bin", dev->id); + sprintf(fn, "rdisk_%02i_mode_sense_bin", dev->id); FILE *fp = plat_fopen(nvr_path(fn), "wb"); if (fp) { - /* Nothing to write, not used by ZIP. */ + /* Nothing to write, not used by RDISK. */ fclose(fp); } } /* SCSI Mode Sense 6/10. */ static uint8_t -zip_mode_sense_read(const zip_t *dev, const uint8_t pgctl, +zip_mode_sense_read(const rdisk_t *dev, const uint8_t pgctl, const uint8_t page, const uint8_t pos) { switch (pgctl) { case 0: case 3: - if (dev->drv->is_250 && (page == 5) && (pos == 9) && + if ((dev->drv->type != RDISK_TYPE_ZIP_100) && (page == 5) && (pos == 9) && (dev->drv->medium_size == ZIP_SECTORS)) return 0x60; return dev->ms_pages_saved.pages[page][pos]; case 1: - if (dev->drv->is_250) - return zip_250_mode_sense_pages_changeable.pages[page][pos]; - else + if (dev->drv->type == RDISK_TYPE_ZIP_100) return zip_mode_sense_pages_changeable.pages[page][pos]; + else + return zip_250_mode_sense_pages_changeable.pages[page][pos]; case 2: - if (dev->drv->is_250) { - if ((page == 5) && (pos == 9) && (dev->drv->medium_size == ZIP_SECTORS)) - return 0x60; - if (dev->drv->bus_type == ZIP_BUS_SCSI) - return zip_250_mode_sense_pages_default_scsi.pages[page][pos]; - else - return zip_250_mode_sense_pages_default.pages[page][pos]; - } else { - if (dev->drv->bus_type == ZIP_BUS_SCSI) + if (dev->drv->type == RDISK_TYPE_ZIP_100) { + if (dev->drv->bus_type == RDISK_BUS_SCSI) return zip_mode_sense_pages_default_scsi.pages[page][pos]; else return zip_mode_sense_pages_default.pages[page][pos]; + } else { + if ((page == 5) && (pos == 9) && (dev->drv->medium_size == ZIP_SECTORS)) + return 0x60; + if (dev->drv->bus_type == RDISK_BUS_SCSI) + return zip_250_mode_sense_pages_default_scsi.pages[page][pos]; + else + return zip_250_mode_sense_pages_default.pages[page][pos]; } default: @@ -454,16 +467,16 @@ zip_mode_sense_read(const zip_t *dev, const uint8_t pgctl, } static uint32_t -zip_mode_sense(const zip_t *dev, uint8_t *buf, uint32_t pos, +rdisk_mode_sense(const rdisk_t *dev, uint8_t *buf, uint32_t pos, uint8_t page, const uint8_t block_descriptor_len) { uint64_t pf; const uint8_t pgctl = (page >> 6) & 3; - if (dev->drv->is_250) - pf = zip_250_mode_sense_page_flags; - else + if (dev->drv->type == RDISK_TYPE_ZIP_100) pf = zip_mode_sense_page_flags; + else + pf = zip_250_mode_sense_page_flags; page &= 0x3f; @@ -484,7 +497,7 @@ zip_mode_sense(const zip_t *dev, uint8_t *buf, uint32_t pos, const uint8_t msplen = zip_mode_sense_read(dev, pgctl, i, 1); buf[pos++] = zip_mode_sense_read(dev, pgctl, i, 0); buf[pos++] = msplen; - zip_log(dev->log, "MODE SENSE: Page [%02X] length %i\n", i, msplen); + rdisk_log(dev->log, "MODE SENSE: Page [%02X] length %i\n", i, msplen); for (uint8_t j = 0; j < msplen; j++) buf[pos++] = zip_mode_sense_read(dev, pgctl, i, 2 + j); } @@ -495,7 +508,7 @@ zip_mode_sense(const zip_t *dev, uint8_t *buf, uint32_t pos, } static void -zip_update_request_length(zip_t *dev, int len, int block_len) +rdisk_update_request_length(rdisk_t *dev, int len, int block_len) { int bt; int min_len = 0; @@ -563,7 +576,7 @@ zip_update_request_length(zip_t *dev, int len, int block_len) } static double -zip_bus_speed(zip_t *dev) +rdisk_bus_speed(rdisk_t *dev) { double ret = -1.0; @@ -580,68 +593,68 @@ zip_bus_speed(zip_t *dev) } static void -zip_command_common(zip_t *dev) +rdisk_command_common(rdisk_t *dev) { dev->tf->status = BUSY_STAT; dev->tf->phase = 1; dev->tf->pos = 0; if (dev->packet_status == PHASE_COMPLETE) dev->callback = 0.0; - else if (dev->drv->bus_type == ZIP_BUS_SCSI) + else if (dev->drv->bus_type == RDISK_BUS_SCSI) dev->callback = -1.0; /* Speed depends on SCSI controller */ else - dev->callback = zip_bus_speed(dev) * (double) (dev->packet_len); + dev->callback = rdisk_bus_speed(dev) * (double) (dev->packet_len); - zip_set_callback(dev); + rdisk_set_callback(dev); } static void -zip_command_complete(zip_t *dev) +rdisk_command_complete(rdisk_t *dev) { dev->packet_status = PHASE_COMPLETE; - zip_command_common(dev); + rdisk_command_common(dev); } static void -zip_command_read(zip_t *dev) +rdisk_command_read(rdisk_t *dev) { dev->packet_status = PHASE_DATA_IN; - zip_command_common(dev); + rdisk_command_common(dev); } static void -zip_command_read_dma(zip_t *dev) +rdisk_command_read_dma(rdisk_t *dev) { dev->packet_status = PHASE_DATA_IN_DMA; - zip_command_common(dev); + rdisk_command_common(dev); } static void -zip_command_write(zip_t *dev) +rdisk_command_write(rdisk_t *dev) { dev->packet_status = PHASE_DATA_OUT; - zip_command_common(dev); + rdisk_command_common(dev); } static void -zip_command_write_dma(zip_t *dev) +rdisk_command_write_dma(rdisk_t *dev) { dev->packet_status = PHASE_DATA_OUT_DMA; - zip_command_common(dev); + rdisk_command_common(dev); } /* - dev = Pointer to current ZIP device; + dev = Pointer to current RDISK device; len = Total transfer length; block_len = Length of a single block (why does it matter?!); alloc_len = Allocated transfer length; direction = Transfer direction (0 = read from host, 1 = write to host). */ static void -zip_data_command_finish(zip_t *dev, int len, const int block_len, +rdisk_data_command_finish(rdisk_t *dev, int len, const int block_len, const int alloc_len, const int direction) { - zip_log(dev->log, "Finishing command (%02X): %i, %i, %i, %i, %i\n", + rdisk_log(dev->log, "Finishing command (%02X): %i, %i, %i, %i, %i\n", dev->current_cdb[0], len, block_len, alloc_len, direction, dev->tf->request_length); dev->tf->pos = 0; @@ -649,256 +662,256 @@ zip_data_command_finish(zip_t *dev, int len, const int block_len, if (alloc_len < len) len = alloc_len; } - if ((len == 0) || (zip_current_mode(dev) == 0)) { - if (dev->drv->bus_type != ZIP_BUS_SCSI) + if ((len == 0) || (rdisk_current_mode(dev) == 0)) { + if (dev->drv->bus_type != RDISK_BUS_SCSI) dev->packet_len = 0; - zip_command_complete(dev); + rdisk_command_complete(dev); } else { - if (zip_current_mode(dev) == 2) { - if (dev->drv->bus_type != ZIP_BUS_SCSI) + if (rdisk_current_mode(dev) == 2) { + if (dev->drv->bus_type != RDISK_BUS_SCSI) dev->packet_len = alloc_len; if (direction == 0) - zip_command_read_dma(dev); + rdisk_command_read_dma(dev); else - zip_command_write_dma(dev); + rdisk_command_write_dma(dev); } else { - zip_update_request_length(dev, len, block_len); - if ((dev->drv->bus_type != ZIP_BUS_SCSI) && + rdisk_update_request_length(dev, len, block_len); + if ((dev->drv->bus_type != RDISK_BUS_SCSI) && (dev->tf->request_length == 0)) - zip_command_complete(dev); + rdisk_command_complete(dev); else if (direction == 0) - zip_command_read(dev); + rdisk_command_read(dev); else - zip_command_write(dev); + rdisk_command_write(dev); } } - zip_log(dev->log, "Status: %i, cylinder %i, packet length: %i, position: %i, phase: %i\n", + rdisk_log(dev->log, "Status: %i, cylinder %i, packet length: %i, position: %i, phase: %i\n", dev->packet_status, dev->tf->request_length, dev->packet_len, dev->tf->pos, dev->tf->phase); } static void -zip_sense_clear(zip_t *dev, UNUSED(int command)) +rdisk_sense_clear(rdisk_t *dev, UNUSED(int command)) { - zip_sense_key = zip_asc = zip_ascq = 0; - zip_info = 0x00000000; + rdisk_sense_key = rdisk_asc = rdisk_ascq = 0; + rdisk_info = 0x00000000; } static void -zip_set_phase(const zip_t *dev, const uint8_t phase) +rdisk_set_phase(const rdisk_t *dev, const uint8_t phase) { const uint8_t scsi_bus = (dev->drv->scsi_device_id >> 4) & 0x0f; const uint8_t scsi_id = dev->drv->scsi_device_id & 0x0f; - if (dev->drv->bus_type == ZIP_BUS_SCSI) + if (dev->drv->bus_type == RDISK_BUS_SCSI) scsi_devices[scsi_bus][scsi_id].phase = phase; } static void -zip_cmd_error(zip_t *dev) +rdisk_cmd_error(rdisk_t *dev) { - zip_set_phase(dev, SCSI_PHASE_STATUS); - dev->tf->error = ((zip_sense_key & 0xf) << 4) | ABRT_ERR; + rdisk_set_phase(dev, SCSI_PHASE_STATUS); + dev->tf->error = ((rdisk_sense_key & 0xf) << 4) | ABRT_ERR; dev->tf->status = READY_STAT | ERR_STAT; dev->tf->phase = 3; dev->tf->pos = 0; dev->packet_status = PHASE_ERROR; - dev->callback = 50.0 * ZIP_TIME; - zip_set_callback(dev); - ui_sb_update_icon(SB_ZIP | dev->id, 0); - ui_sb_update_icon_write(SB_ZIP | dev->id, 0); - zip_log(dev->log, "[%02X] ERROR: %02X/%02X/%02X\n", dev->current_cdb[0], zip_sense_key, - zip_asc, zip_ascq); + dev->callback = 50.0 * RDISK_TIME; + rdisk_set_callback(dev); + ui_sb_update_icon(SB_RDISK | dev->id, 0); + ui_sb_update_icon_write(SB_RDISK | dev->id, 0); + rdisk_log(dev->log, "[%02X] ERROR: %02X/%02X/%02X\n", dev->current_cdb[0], rdisk_sense_key, + rdisk_asc, rdisk_ascq); } static void -zip_unit_attention(zip_t *dev) +rdisk_unit_attention(rdisk_t *dev) { - zip_set_phase(dev, SCSI_PHASE_STATUS); + rdisk_set_phase(dev, SCSI_PHASE_STATUS); dev->tf->error = (SENSE_UNIT_ATTENTION << 4) | ABRT_ERR; dev->tf->status = READY_STAT | ERR_STAT; dev->tf->phase = 3; dev->tf->pos = 0; dev->packet_status = PHASE_ERROR; - dev->callback = 50.0 * ZIP_TIME; - zip_set_callback(dev); - ui_sb_update_icon(SB_ZIP | dev->id, 0); - ui_sb_update_icon_write(SB_ZIP | dev->id, 0); - zip_log(dev->log, "UNIT ATTENTION\n", dev->id); + dev->callback = 50.0 * RDISK_TIME; + rdisk_set_callback(dev); + ui_sb_update_icon(SB_RDISK | dev->id, 0); + ui_sb_update_icon_write(SB_RDISK | dev->id, 0); + rdisk_log(dev->log, "UNIT ATTENTION\n", dev->id); } static void -zip_buf_alloc(zip_t *dev, const uint32_t len) +rdisk_buf_alloc(rdisk_t *dev, const uint32_t len) { - zip_log(dev->log, "Allocated buffer length: %i\n", len); + rdisk_log(dev->log, "Allocated buffer length: %i\n", len); if (dev->buffer == NULL) dev->buffer = (uint8_t *) malloc(len); } static void -zip_buf_free(zip_t *dev) +rdisk_buf_free(rdisk_t *dev) { if (dev->buffer != NULL) { - zip_log(dev->log, "ZIP %i: Freeing buffer...\n"); + rdisk_log(dev->log, "Removable Disk %i: Freeing buffer...\n"); free(dev->buffer); dev->buffer = NULL; } } static void -zip_bus_master_error(scsi_common_t *sc) +rdisk_bus_master_error(scsi_common_t *sc) { - zip_t *dev = (zip_t *) sc; + rdisk_t *dev = (rdisk_t *) sc; - zip_buf_free(dev); - zip_sense_key = zip_asc = zip_ascq = 0; - zip_info = (dev->sector_pos >> 24) | + rdisk_buf_free(dev); + rdisk_sense_key = rdisk_asc = rdisk_ascq = 0; + rdisk_info = (dev->sector_pos >> 24) | ((dev->sector_pos >> 16) << 8) | ((dev->sector_pos >> 8) << 16) | ( dev->sector_pos << 24); - zip_cmd_error(dev); + rdisk_cmd_error(dev); } static void -zip_not_ready(zip_t *dev) +rdisk_not_ready(rdisk_t *dev) { - zip_sense_key = SENSE_NOT_READY; - zip_asc = ASC_MEDIUM_NOT_PRESENT; - zip_ascq = 0; - zip_info = 0x00000000; - zip_cmd_error(dev); + rdisk_sense_key = SENSE_NOT_READY; + rdisk_asc = ASC_MEDIUM_NOT_PRESENT; + rdisk_ascq = 0; + rdisk_info = 0x00000000; + rdisk_cmd_error(dev); } static void -zip_write_protected(zip_t *dev) +rdisk_write_protected(rdisk_t *dev) { - zip_sense_key = SENSE_UNIT_ATTENTION; - zip_asc = ASC_WRITE_PROTECTED; - zip_ascq = 0; - zip_info = (dev->sector_pos >> 24) | + rdisk_sense_key = SENSE_UNIT_ATTENTION; + rdisk_asc = ASC_WRITE_PROTECTED; + rdisk_ascq = 0; + rdisk_info = (dev->sector_pos >> 24) | ((dev->sector_pos >> 16) << 8) | ((dev->sector_pos >> 8) << 16) | ( dev->sector_pos << 24); - zip_cmd_error(dev); + rdisk_cmd_error(dev); } static void -zip_write_error(zip_t *dev) +rdisk_write_error(rdisk_t *dev) { - zip_sense_key = SENSE_MEDIUM_ERROR; - zip_asc = ASC_WRITE_ERROR; - zip_ascq = 0; - zip_info = (dev->sector_pos >> 24) | + rdisk_sense_key = SENSE_MEDIUM_ERROR; + rdisk_asc = ASC_WRITE_ERROR; + rdisk_ascq = 0; + rdisk_info = (dev->sector_pos >> 24) | ((dev->sector_pos >> 16) << 8) | ((dev->sector_pos >> 8) << 16) | ( dev->sector_pos << 24); - zip_cmd_error(dev); + rdisk_cmd_error(dev); } static void -zip_read_error(zip_t *dev) +rdisk_read_error(rdisk_t *dev) { - zip_sense_key = SENSE_MEDIUM_ERROR; - zip_asc = ASC_UNRECOVERED_READ_ERROR; - zip_ascq = 0; - zip_info = (dev->sector_pos >> 24) | + rdisk_sense_key = SENSE_MEDIUM_ERROR; + rdisk_asc = ASC_UNRECOVERED_READ_ERROR; + rdisk_ascq = 0; + rdisk_info = (dev->sector_pos >> 24) | ((dev->sector_pos >> 16) << 8) | ((dev->sector_pos >> 8) << 16) | ( dev->sector_pos << 24); - zip_cmd_error(dev); + rdisk_cmd_error(dev); } static void -zip_invalid_lun(zip_t *dev, const uint8_t lun) +rdisk_invalid_lun(rdisk_t *dev, const uint8_t lun) { - zip_sense_key = SENSE_ILLEGAL_REQUEST; - zip_asc = ASC_INV_LUN; - zip_ascq = 0; - zip_info = lun << 24; - zip_cmd_error(dev); + rdisk_sense_key = SENSE_ILLEGAL_REQUEST; + rdisk_asc = ASC_INV_LUN; + rdisk_ascq = 0; + rdisk_info = lun << 24; + rdisk_cmd_error(dev); } static void -zip_illegal_opcode(zip_t *dev, const uint8_t opcode) +rdisk_illegal_opcode(rdisk_t *dev, const uint8_t opcode) { - zip_sense_key = SENSE_ILLEGAL_REQUEST; - zip_asc = ASC_ILLEGAL_OPCODE; - zip_ascq = 0; - zip_info = opcode << 24; - zip_cmd_error(dev); + rdisk_sense_key = SENSE_ILLEGAL_REQUEST; + rdisk_asc = ASC_ILLEGAL_OPCODE; + rdisk_ascq = 0; + rdisk_info = opcode << 24; + rdisk_cmd_error(dev); } static void -zip_lba_out_of_range(zip_t *dev) +rdisk_lba_out_of_range(rdisk_t *dev) { - zip_sense_key = SENSE_ILLEGAL_REQUEST; - zip_asc = ASC_LBA_OUT_OF_RANGE; - zip_ascq = 0; - zip_info = (dev->sector_pos >> 24) | + rdisk_sense_key = SENSE_ILLEGAL_REQUEST; + rdisk_asc = ASC_LBA_OUT_OF_RANGE; + rdisk_ascq = 0; + rdisk_info = (dev->sector_pos >> 24) | ((dev->sector_pos >> 16) << 8) | ((dev->sector_pos >> 8) << 16) | ( dev->sector_pos << 24); - zip_cmd_error(dev); + rdisk_cmd_error(dev); } static void -zip_invalid_field(zip_t *dev, const uint32_t field) +rdisk_invalid_field(rdisk_t *dev, const uint32_t field) { - zip_sense_key = SENSE_ILLEGAL_REQUEST; - zip_asc = ASC_INV_FIELD_IN_CMD_PACKET; - zip_ascq = 0; - zip_info = (field >> 24) | + rdisk_sense_key = SENSE_ILLEGAL_REQUEST; + rdisk_asc = ASC_INV_FIELD_IN_CMD_PACKET; + rdisk_ascq = 0; + rdisk_info = (field >> 24) | ((field >> 16) << 8) | ((field >> 8) << 16) | ( field << 24); - zip_cmd_error(dev); + rdisk_cmd_error(dev); dev->tf->status = 0x53; } static void -zip_invalid_field_pl(zip_t *dev, const uint32_t field) +rdisk_invalid_field_pl(rdisk_t *dev, const uint32_t field) { - zip_sense_key = SENSE_ILLEGAL_REQUEST; - zip_asc = ASC_INV_FIELD_IN_PARAMETER_LIST; - zip_ascq = 0; - zip_info = (field >> 24) | + rdisk_sense_key = SENSE_ILLEGAL_REQUEST; + rdisk_asc = ASC_INV_FIELD_IN_PARAMETER_LIST; + rdisk_ascq = 0; + rdisk_info = (field >> 24) | ((field >> 16) << 8) | ((field >> 8) << 16) | ( field << 24); - zip_cmd_error(dev); + rdisk_cmd_error(dev); dev->tf->status = 0x53; } static void -zip_data_phase_error(zip_t *dev, const uint32_t info) +rdisk_data_phase_error(rdisk_t *dev, const uint32_t info) { - zip_sense_key = SENSE_ILLEGAL_REQUEST; - zip_asc = ASC_DATA_PHASE_ERROR; - zip_ascq = 0; - zip_info = (info >> 24) | + rdisk_sense_key = SENSE_ILLEGAL_REQUEST; + rdisk_asc = ASC_DATA_PHASE_ERROR; + rdisk_ascq = 0; + rdisk_info = (info >> 24) | ((info >> 16) << 8) | ((info >> 8) << 16) | ( info << 24); - zip_cmd_error(dev); + rdisk_cmd_error(dev); } static int -zip_blocks(zip_t *dev, int32_t *len, const int out) +rdisk_blocks(rdisk_t *dev, int32_t *len, const int out) { int ret = 1; *len = 0; if (dev->sector_len > 0) { - zip_log(dev->log, "%sing %i blocks starting from %i...\n", out ? "Writ" : "Read", + rdisk_log(dev->log, "%sing %i blocks starting from %i...\n", out ? "Writ" : "Read", dev->requested_blocks, dev->sector_pos); if (dev->sector_pos >= dev->drv->medium_size) { - zip_log(dev->log, "Trying to %s beyond the end of disk\n", + rdisk_log(dev->log, "Trying to %s beyond the end of disk\n", out ? "write" : "read"); - zip_lba_out_of_range(dev); + rdisk_lba_out_of_range(dev); ret = 0; } else { *len = dev->requested_blocks << 9; @@ -907,9 +920,9 @@ zip_blocks(zip_t *dev, int32_t *len, const int out) if (fseek(dev->drv->fp, dev->drv->base + (dev->sector_pos << 9), SEEK_SET) == -1) { if (out) - zip_write_error(dev); + rdisk_write_error(dev); else - zip_read_error(dev); + rdisk_read_error(dev); ret = -1; } else { if (feof(dev->drv->fp)) @@ -918,15 +931,15 @@ zip_blocks(zip_t *dev, int32_t *len, const int out) if (out) { if (fwrite(dev->buffer + (i << 9), 1, 512, dev->drv->fp) != 512) { - zip_log(dev->log, "zip_blocks(): Error writing data\n"); - zip_write_error(dev); + rdisk_log(dev->log, "rdisk_blocks(): Error writing data\n"); + rdisk_write_error(dev); ret = -1; } else fflush(dev->drv->fp); } else if (fread(dev->buffer + (i << 9), 1, 512, dev->drv->fp) != 512) { - zip_log(dev->log, "zip_blocks(): Error reading data\n"); - zip_read_error(dev); + rdisk_log(dev->log, "rdisk_blocks(): Error reading data\n"); + rdisk_read_error(dev); ret = -1; } } @@ -938,14 +951,14 @@ zip_blocks(zip_t *dev, int32_t *len, const int out) } if (ret == 1) { - zip_log(dev->log, "%s %i bytes of blocks...\n", out ? "Written" : + rdisk_log(dev->log, "%s %i bytes of blocks...\n", out ? "Written" : "Read", *len); dev->sector_len -= dev->requested_blocks; } } } else { - zip_command_complete(dev); + rdisk_command_complete(dev); ret = 0; } @@ -953,61 +966,61 @@ zip_blocks(zip_t *dev, int32_t *len, const int out) } void -zip_insert(zip_t *dev) +rdisk_insert(rdisk_t *dev) { if ((dev != NULL) && (dev->drv != NULL)) { if (dev->drv->fp == NULL) { dev->unit_attention = 0; dev->transition = 0; - zip_log(dev->log, "Media removal\n"); + rdisk_log(dev->log, "Media removal\n"); } else if (dev->transition) { dev->unit_attention = 1; /* Turn off the medium changed status. */ dev->transition = 0; - zip_log(dev->log, "Media insert\n"); + rdisk_log(dev->log, "Media insert\n"); } else { dev->unit_attention = 0; dev->transition = 1; - zip_log(dev->log, "Media transition\n"); + rdisk_log(dev->log, "Media transition\n"); } } } static int -zip_pre_execution_check(zip_t *dev, const uint8_t *cdb) +rdisk_pre_execution_check(rdisk_t *dev, const uint8_t *cdb) { int ready; if ((cdb[0] != GPCMD_REQUEST_SENSE) && (dev->cur_lun == SCSI_LUN_USE_CDB) && (cdb[1] & 0xe0)) { - zip_log(dev->log, "Attempting to execute a unknown command targeted at SCSI LUN %i\n", + rdisk_log(dev->log, "Attempting to execute a unknown command targeted at SCSI LUN %i\n", ((dev->tf->request_length >> 5) & 7)); - zip_invalid_lun(dev, cdb[1] >> 5); + rdisk_invalid_lun(dev, cdb[1] >> 5); return 0; } - if (!(zip_command_flags[cdb[0]] & IMPLEMENTED)) { - zip_log(dev->log, "Attempting to execute unknown command %02X over %s\n", - cdb[0], (dev->drv->bus_type == ZIP_BUS_SCSI) ? + if (!(rdisk_command_flags[cdb[0]] & IMPLEMENTED)) { + rdisk_log(dev->log, "Attempting to execute unknown command %02X over %s\n", + cdb[0], (dev->drv->bus_type == RDISK_BUS_SCSI) ? "SCSI" : "ATAPI"); - zip_illegal_opcode(dev, cdb[0]); + rdisk_illegal_opcode(dev, cdb[0]); return 0; } - if ((dev->drv->bus_type < ZIP_BUS_SCSI) && - (zip_command_flags[cdb[0]] & SCSI_ONLY)) { - zip_log(dev->log, "Attempting to execute SCSI-only command %02X " + if ((dev->drv->bus_type < RDISK_BUS_SCSI) && + (rdisk_command_flags[cdb[0]] & SCSI_ONLY)) { + rdisk_log(dev->log, "Attempting to execute SCSI-only command %02X " "over ATAPI\n", cdb[0]); - zip_illegal_opcode(dev, cdb[0]); + rdisk_illegal_opcode(dev, cdb[0]); return 0; } - if ((dev->drv->bus_type == ZIP_BUS_SCSI) && - (zip_command_flags[cdb[0]] & ATAPI_ONLY)) { - zip_log(dev->log, "Attempting to execute ATAPI-only command %02X " + if ((dev->drv->bus_type == RDISK_BUS_SCSI) && + (rdisk_command_flags[cdb[0]] & ATAPI_ONLY)) { + rdisk_log(dev->log, "Attempting to execute ATAPI-only command %02X " "over SCSI\n", cdb[0]); - zip_illegal_opcode(dev, cdb[0]); + rdisk_illegal_opcode(dev, cdb[0]); return 0; } @@ -1015,9 +1028,9 @@ zip_pre_execution_check(zip_t *dev, const uint8_t *cdb) if ((cdb[0] == GPCMD_TEST_UNIT_READY) || (cdb[0] == GPCMD_REQUEST_SENSE)) ready = 0; else { - if (!(zip_command_flags[cdb[0]] & ALLOW_UA)) { - zip_log(dev->log, "(ext_medium_changed != 0): zip_insert()\n"); - zip_insert((void *) dev); + if (!(rdisk_command_flags[cdb[0]] & ALLOW_UA)) { + rdisk_log(dev->log, "(ext_medium_changed != 0): rdisk_insert()\n"); + rdisk_insert((void *) dev); } ready = (dev->drv->fp != NULL); @@ -1042,17 +1055,17 @@ zip_pre_execution_check(zip_t *dev, const uint8_t *cdb) Only increment the unit attention phase if the command can not pass through it. */ - if (!(zip_command_flags[cdb[0]] & ALLOW_UA)) { - zip_log(dev->log, "Unit attention now 2\n"); + if (!(rdisk_command_flags[cdb[0]] & ALLOW_UA)) { + rdisk_log(dev->log, "Unit attention now 2\n"); dev->unit_attention++; - zip_log(dev->log, "UNIT ATTENTION: Command %02X not allowed to pass through\n", + rdisk_log(dev->log, "UNIT ATTENTION: Command %02X not allowed to pass through\n", cdb[0]); - zip_unit_attention(dev); + rdisk_unit_attention(dev); return 0; } } else if (dev->unit_attention == 2) { if (cdb[0] != GPCMD_REQUEST_SENSE) { - zip_log(dev->log, "Unit attention now 0\n"); + rdisk_log(dev->log, "Unit attention now 0\n"); dev->unit_attention = 0; } } @@ -1062,51 +1075,51 @@ zip_pre_execution_check(zip_t *dev, const uint8_t *cdb) the UNIT ATTENTION condition if it's set. */ if (cdb[0] != GPCMD_REQUEST_SENSE) - zip_sense_clear(dev, cdb[0]); + rdisk_sense_clear(dev, cdb[0]); - if (!ready && (zip_command_flags[cdb[0]] & CHECK_READY)) { - zip_log(dev->log, "Not ready (%02X)\n", cdb[0]); - zip_not_ready(dev); + if (!ready && (rdisk_command_flags[cdb[0]] & CHECK_READY)) { + rdisk_log(dev->log, "Not ready (%02X)\n", cdb[0]); + rdisk_not_ready(dev); return 0; } - zip_log(dev->log, "Continuing with command %02X\n", cdb[0]); + rdisk_log(dev->log, "Continuing with command %02X\n", cdb[0]); return 1; } static void -zip_seek(zip_t *dev, const uint32_t pos) +rdisk_seek(rdisk_t *dev, const uint32_t pos) { dev->sector_pos = pos; } static void -zip_rezero(zip_t *dev) +rdisk_rezero(rdisk_t *dev) { dev->sector_pos = dev->sector_len = 0; - zip_seek(dev, 0); + rdisk_seek(dev, 0); } void -zip_reset(scsi_common_t *sc) +rdisk_reset(scsi_common_t *sc) { - zip_t *dev = (zip_t *) sc; + rdisk_t *dev = (rdisk_t *) sc; - zip_rezero(dev); + rdisk_rezero(dev); dev->tf->status = 0; dev->callback = 0.0; - zip_set_callback(dev); + rdisk_set_callback(dev); dev->tf->phase = 1; dev->tf->request_length = 0xEB14; dev->packet_status = PHASE_NONE; dev->unit_attention = 0; dev->cur_lun = SCSI_LUN_USE_CDB; - zip_sense_key = zip_asc = zip_ascq = dev->unit_attention = dev->transition = 0; - zip_info = 0x00000000; + rdisk_sense_key = rdisk_asc = rdisk_ascq = dev->unit_attention = dev->transition = 0; + rdisk_info = 0x00000000; } static void -zip_request_sense(zip_t *dev, uint8_t *buffer, const uint8_t alloc_length, const int desc) +rdisk_request_sense(rdisk_t *dev, uint8_t *buffer, const uint8_t alloc_length, const int desc) { /*Will return 18 bytes of 0*/ if (alloc_length != 0) { @@ -1114,9 +1127,9 @@ zip_request_sense(zip_t *dev, uint8_t *buffer, const uint8_t alloc_length, const if (!desc) memcpy(buffer, dev->sense, alloc_length); else { - buffer[1] = zip_sense_key; - buffer[2] = zip_asc; - buffer[3] = zip_ascq; + buffer[1] = rdisk_sense_key; + buffer[2] = rdisk_asc; + buffer[3] = rdisk_ascq; } } @@ -1124,13 +1137,13 @@ zip_request_sense(zip_t *dev, uint8_t *buffer, const uint8_t alloc_length, const if (!desc) buffer[7] = 10; - if (dev->unit_attention && (zip_sense_key == 0)) { + if (dev->unit_attention && (rdisk_sense_key == 0)) { buffer[desc ? 1 : 2] = SENSE_UNIT_ATTENTION; buffer[desc ? 2 : 12] = ASC_MEDIUM_MAY_HAVE_CHANGED; buffer[desc ? 3 : 13] = 0; } - zip_log(dev->log, "Reporting sense: %02X %02X %02X\n", buffer[2], + rdisk_log(dev->log, "Reporting sense: %02X %02X %02X\n", buffer[2], buffer[12], buffer[13]); if (buffer[desc ? 1 : 2] == SENSE_UNIT_ATTENTION) { @@ -1140,18 +1153,18 @@ zip_request_sense(zip_t *dev, uint8_t *buffer, const uint8_t alloc_length, const } /* Clear the sense stuff as per the spec. */ - zip_sense_clear(dev, GPCMD_REQUEST_SENSE); + rdisk_sense_clear(dev, GPCMD_REQUEST_SENSE); if (dev->transition) { - zip_log(dev->log, "ZIP_TRANSITION: zip_insert()\n"); - zip_insert((void *) dev); + rdisk_log(dev->log, "Removable Disk_TRANSITION: rdisk_insert()\n"); + rdisk_insert((void *) dev); } } static void -zip_request_sense_for_scsi(scsi_common_t *sc, uint8_t *buffer, const uint8_t alloc_length) +rdisk_request_sense_for_scsi(scsi_common_t *sc, uint8_t *buffer, const uint8_t alloc_length) { - zip_t *dev = (zip_t *) sc; + rdisk_t *dev = (rdisk_t *) sc; const int ready = (dev->drv->fp != NULL); if (!ready && dev->unit_attention) { @@ -1163,32 +1176,33 @@ zip_request_sense_for_scsi(scsi_common_t *sc, uint8_t *buffer, const uint8_t all } /* Do *NOT* advance the unit attention phase. */ - zip_request_sense(dev, buffer, alloc_length, 0); + rdisk_request_sense(dev, buffer, alloc_length, 0); } static void -zip_set_buf_len(const zip_t *dev, int32_t *BufLen, int32_t *src_len) +rdisk_set_buf_len(const rdisk_t *dev, int32_t *BufLen, int32_t *src_len) { - if (dev->drv->bus_type == ZIP_BUS_SCSI) { + if (dev->drv->bus_type == RDISK_BUS_SCSI) { if (*BufLen == -1) *BufLen = *src_len; else { *BufLen = MIN(*src_len, *BufLen); *src_len = *BufLen; } - zip_log(dev->log, "Actual transfer length: %i\n", *BufLen); + rdisk_log(dev->log, "Actual transfer length: %i\n", *BufLen); } } static void -zip_command(scsi_common_t *sc, const uint8_t *cdb) +rdisk_command(scsi_common_t *sc, const uint8_t *cdb) { - zip_t *dev = (zip_t *) sc; - const uint8_t scsi_bus = (dev->drv->scsi_device_id >> 4) & 0x0f; - const uint8_t scsi_id = dev->drv->scsi_device_id & 0x0f; - int pos = 0; - int idx = 0; - int32_t blen = 0; + rdisk_t *dev = (rdisk_t *) sc; + char device_identify[9] = { '8', '6', 'B', '_', 'R', 'D', '0', '0', 0 }; + const uint8_t scsi_bus = (dev->drv->scsi_device_id >> 4) & 0x0f; + const uint8_t scsi_id = dev->drv->scsi_device_id & 0x0f; + int pos = 0; + int idx = 0; + int32_t blen = 0; uint32_t i; unsigned preamble_len; int32_t len; @@ -1198,7 +1212,7 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) int size_idx; int32_t * BufLen; - if (dev->drv->bus_type == ZIP_BUS_SCSI) { + if (dev->drv->bus_type == RDISK_BUS_SCSI) { BufLen = &scsi_devices[scsi_bus][scsi_id].buffer_length; dev->tf->status &= ~ERR_STAT; } else { @@ -1209,15 +1223,17 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) dev->packet_len = 0; dev->request_pos = 0; + device_identify[7] = dev->id + 0x30; + memcpy(dev->current_cdb, cdb, 12); if (cdb[0] != 0) { - zip_log(dev->log, "Command 0x%02X, Sense Key %02X, Asc %02X, Ascq %02X, " + rdisk_log(dev->log, "Command 0x%02X, Sense Key %02X, Asc %02X, Ascq %02X, " "Unit attention: %i\n", - cdb[0], zip_sense_key, zip_asc, zip_ascq, dev->unit_attention); - zip_log(dev->log, "Request length: %04X\n", dev->tf->request_length); + cdb[0], rdisk_sense_key, rdisk_asc, rdisk_ascq, dev->unit_attention); + rdisk_log(dev->log, "Request length: %04X\n", dev->tf->request_length); - zip_log(dev->log, "CDB: %02X %02X %02X %02X %02X %02X %02X %02X " + rdisk_log(dev->log, "CDB: %02X %02X %02X %02X %02X %02X %02X %02X " "%02X %02X %02X %02X\n", cdb[0], cdb[1], cdb[2], cdb[3], cdb[4], cdb[5], cdb[6], cdb[7], cdb[8], cdb[9], cdb[10], cdb[11]); @@ -1225,43 +1241,43 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) dev->sector_len = 0; - zip_set_phase(dev, SCSI_PHASE_STATUS); + rdisk_set_phase(dev, SCSI_PHASE_STATUS); /* This handles the Not Ready/Unit Attention check if it has to be handled at this point. */ - if (zip_pre_execution_check(dev, cdb) == 0) + if (rdisk_pre_execution_check(dev, cdb) == 0) return; switch (cdb[0]) { case GPCMD_SEND_DIAGNOSTIC: if (!(cdb[1] & (1 << 2))) { - zip_invalid_field(dev, cdb[1]); + rdisk_invalid_field(dev, cdb[1]); return; } fallthrough; case GPCMD_SCSI_RESERVE: case GPCMD_SCSI_RELEASE: case GPCMD_TEST_UNIT_READY: - zip_set_phase(dev, SCSI_PHASE_STATUS); - zip_command_complete(dev); + rdisk_set_phase(dev, SCSI_PHASE_STATUS); + rdisk_command_complete(dev); break; case GPCMD_FORMAT_UNIT: if (dev->drv->read_only) - zip_write_protected(dev); + rdisk_write_protected(dev); else { - zip_set_phase(dev, SCSI_PHASE_STATUS); - zip_command_complete(dev); + rdisk_set_phase(dev, SCSI_PHASE_STATUS); + rdisk_command_complete(dev); } break; case GPCMD_IOMEGA_SENSE: - zip_set_phase(dev, SCSI_PHASE_DATA_IN); + rdisk_set_phase(dev, SCSI_PHASE_DATA_IN); max_len = cdb[4]; - zip_buf_alloc(dev, 256); - zip_set_buf_len(dev, BufLen, &max_len); + rdisk_buf_alloc(dev, 256); + rdisk_set_buf_len(dev, BufLen, &max_len); memset(dev->buffer, 0, 256); if (cdb[2] == 1) { /* @@ -1283,17 +1299,17 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) for (i = 0x00; i < 0x27; i++) dev->buffer[i + 0x16] = 0x00; } else { - zip_invalid_field(dev, cdb[2]); - zip_buf_free(dev); + rdisk_invalid_field(dev, cdb[2]); + rdisk_buf_free(dev); return; } - zip_data_command_finish(dev, 18, 18, cdb[4], 0); + rdisk_data_command_finish(dev, 18, 18, cdb[4], 0); break; case GPCMD_REZERO_UNIT: dev->sector_pos = dev->sector_len = 0; - zip_seek(dev, 0); - zip_set_phase(dev, SCSI_PHASE_STATUS); + rdisk_seek(dev, 0); + rdisk_set_phase(dev, SCSI_PHASE_STATUS); break; case GPCMD_REQUEST_SENSE: @@ -1302,41 +1318,41 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) standalone REQUEST SENSE should forget about the not ready, and report unit attention straight away. */ - zip_set_phase(dev, SCSI_PHASE_DATA_IN); + rdisk_set_phase(dev, SCSI_PHASE_DATA_IN); max_len = cdb[4]; if (!max_len) { - zip_set_phase(dev, SCSI_PHASE_STATUS); + rdisk_set_phase(dev, SCSI_PHASE_STATUS); dev->packet_status = PHASE_COMPLETE; - dev->callback = 20.0 * ZIP_TIME; - zip_set_callback(dev); + dev->callback = 20.0 * RDISK_TIME; + rdisk_set_callback(dev); break; } - zip_buf_alloc(dev, 256); - zip_set_buf_len(dev, BufLen, &max_len); + rdisk_buf_alloc(dev, 256); + rdisk_set_buf_len(dev, BufLen, &max_len); len = (cdb[1] & 1) ? 8 : 18; - zip_request_sense(dev, dev->buffer, max_len, cdb[1] & 1); - zip_data_command_finish(dev, len, len, cdb[4], 0); + rdisk_request_sense(dev, dev->buffer, max_len, cdb[1] & 1); + rdisk_data_command_finish(dev, len, len, cdb[4], 0); break; case GPCMD_MECHANISM_STATUS: - zip_set_phase(dev, SCSI_PHASE_DATA_IN); + rdisk_set_phase(dev, SCSI_PHASE_DATA_IN); len = (cdb[8] << 8) | cdb[9]; - zip_buf_alloc(dev, 8); - zip_set_buf_len(dev, BufLen, &len); + rdisk_buf_alloc(dev, 8); + rdisk_set_buf_len(dev, BufLen, &len); memset(dev->buffer, 0, 8); dev->buffer[5] = 1; - zip_data_command_finish(dev, 8, 8, len, 0); + rdisk_data_command_finish(dev, 8, 8, len, 0); break; case GPCMD_READ_6: case GPCMD_READ_10: case GPCMD_READ_12: - zip_set_phase(dev, SCSI_PHASE_DATA_IN); + rdisk_set_phase(dev, SCSI_PHASE_DATA_IN); alloc_length = 512; switch (cdb[0]) { @@ -1350,13 +1366,13 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) dev->sector_len = 256; dev->sector_pos = ((((uint32_t) cdb[1]) & 0x1f) << 16) | (((uint32_t) cdb[2]) << 8) | ((uint32_t) cdb[3]); - zip_log(dev->log, "Length: %i, LBA: %i\n", dev->sector_len, dev->sector_pos); + rdisk_log(dev->log, "Length: %i, LBA: %i\n", dev->sector_len, dev->sector_pos); break; case GPCMD_READ_10: dev->sector_len = (cdb[7] << 8) | cdb[8]; dev->sector_pos = (cdb[2] << 24) | (cdb[3] << 16) | (cdb[4] << 8) | cdb[5]; - zip_log(dev->log, "Length: %i, LBA: %i\n", dev->sector_len, dev->sector_pos); + rdisk_log(dev->log, "Length: %i, LBA: %i\n", dev->sector_len, dev->sector_pos); break; case GPCMD_READ_12: dev->sector_len = (((uint32_t) cdb[6]) << 24) | @@ -1372,41 +1388,41 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) } if (dev->sector_pos >= dev->drv->medium_size) - zip_lba_out_of_range(dev); + rdisk_lba_out_of_range(dev); else if (dev->sector_len) { max_len = dev->sector_len; dev->requested_blocks = max_len; dev->packet_len = max_len * alloc_length; - zip_buf_alloc(dev, dev->packet_len); + rdisk_buf_alloc(dev, dev->packet_len); - const int ret = zip_blocks(dev, &alloc_length, 0); + const int ret = rdisk_blocks(dev, &alloc_length, 0); alloc_length = dev->requested_blocks * 512; if (ret > 0) { dev->requested_blocks = max_len; dev->packet_len = alloc_length; - zip_set_buf_len(dev, BufLen, (int32_t *) &dev->packet_len); + rdisk_set_buf_len(dev, BufLen, (int32_t *) &dev->packet_len); - zip_data_command_finish(dev, alloc_length, 512, + rdisk_data_command_finish(dev, alloc_length, 512, alloc_length, 0); - ui_sb_update_icon(SB_ZIP | dev->id, + ui_sb_update_icon(SB_RDISK | dev->id, dev->packet_status != PHASE_COMPLETE); } else { - zip_set_phase(dev, SCSI_PHASE_STATUS); + rdisk_set_phase(dev, SCSI_PHASE_STATUS); dev->packet_status = (ret < 0) ? PHASE_ERROR : PHASE_COMPLETE; - dev->callback = 20.0 * ZIP_TIME; - zip_set_callback(dev); - zip_buf_free(dev); + dev->callback = 20.0 * RDISK_TIME; + rdisk_set_callback(dev); + rdisk_buf_free(dev); } } else { - zip_set_phase(dev, SCSI_PHASE_STATUS); - /* zip_log(dev->log, "All done - callback set\n"); */ + rdisk_set_phase(dev, SCSI_PHASE_STATUS); + /* rdisk_log(dev->log, "All done - callback set\n"); */ dev->packet_status = PHASE_COMPLETE; - dev->callback = 20.0 * ZIP_TIME; - zip_set_callback(dev); + dev->callback = 20.0 * RDISK_TIME; + rdisk_set_callback(dev); break; } break; @@ -1415,8 +1431,8 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) case GPCMD_VERIFY_10: case GPCMD_VERIFY_12: if (!(cdb[1] & 2)) { - zip_set_phase(dev, SCSI_PHASE_STATUS); - zip_command_complete(dev); + rdisk_set_phase(dev, SCSI_PHASE_STATUS); + rdisk_command_complete(dev); break; } fallthrough; @@ -1425,11 +1441,11 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) case GPCMD_WRITE_AND_VERIFY_10: case GPCMD_WRITE_12: case GPCMD_WRITE_AND_VERIFY_12: - zip_set_phase(dev, SCSI_PHASE_DATA_OUT); + rdisk_set_phase(dev, SCSI_PHASE_DATA_OUT); alloc_length = 512; if (dev->drv->read_only) { - zip_write_protected(dev); + rdisk_write_protected(dev); break; } @@ -1452,7 +1468,7 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) dev->sector_len = (cdb[7] << 8) | cdb[8]; dev->sector_pos = (cdb[2] << 24) | (cdb[3] << 16) | (cdb[4] << 8) | cdb[5]; - zip_log(dev->log, "Length: %i, LBA: %i\n", + rdisk_log(dev->log, "Length: %i, LBA: %i\n", dev->sector_len, dev->sector_pos); break; case GPCMD_VERIFY_12: @@ -1471,71 +1487,71 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) } if (dev->sector_pos >= dev->drv->medium_size) - zip_lba_out_of_range(dev); + rdisk_lba_out_of_range(dev); if (dev->sector_len) { max_len = dev->sector_len; dev->requested_blocks = max_len; dev->packet_len = max_len * alloc_length; - zip_buf_alloc(dev, dev->packet_len); + rdisk_buf_alloc(dev, dev->packet_len); dev->requested_blocks = max_len; dev->packet_len = max_len << 9; - zip_set_buf_len(dev, BufLen, (int32_t *) &dev->packet_len); + rdisk_set_buf_len(dev, BufLen, (int32_t *) &dev->packet_len); - zip_data_command_finish(dev, dev->packet_len, 512, + rdisk_data_command_finish(dev, dev->packet_len, 512, dev->packet_len, 1); - ui_sb_update_icon_write(SB_ZIP | dev->id, + ui_sb_update_icon_write(SB_RDISK | dev->id, dev->packet_status != PHASE_COMPLETE); } else { - zip_set_phase(dev, SCSI_PHASE_STATUS); - /* zip_log(dev->log, "All done - callback set\n"); */ + rdisk_set_phase(dev, SCSI_PHASE_STATUS); + /* rdisk_log(dev->log, "All done - callback set\n"); */ dev->packet_status = PHASE_COMPLETE; - dev->callback = 20.0 * ZIP_TIME; - zip_set_callback(dev); + dev->callback = 20.0 * RDISK_TIME; + rdisk_set_callback(dev); } break; case GPCMD_WRITE_SAME_10: - zip_set_phase(dev, SCSI_PHASE_DATA_OUT); + rdisk_set_phase(dev, SCSI_PHASE_DATA_OUT); alloc_length = 512; if ((cdb[1] & 6) == 6) - zip_invalid_field(dev, cdb[1]); + rdisk_invalid_field(dev, cdb[1]); else { if (dev->drv->read_only) - zip_write_protected(dev); + rdisk_write_protected(dev); else { dev->sector_len = (cdb[7] << 8) | cdb[8]; dev->sector_pos = (cdb[2] << 24) | (cdb[3] << 16) | (cdb[4] << 8) | cdb[5]; if (dev->sector_pos >= dev->drv->medium_size) - zip_lba_out_of_range(dev); + rdisk_lba_out_of_range(dev); else if (dev->sector_len) { - zip_buf_alloc(dev, alloc_length); - zip_set_buf_len(dev, BufLen, (int32_t *) &dev->packet_len); + rdisk_buf_alloc(dev, alloc_length); + rdisk_set_buf_len(dev, BufLen, (int32_t *) &dev->packet_len); max_len = 1; dev->requested_blocks = 1; dev->packet_len = alloc_length; - zip_set_phase(dev, SCSI_PHASE_DATA_OUT); + rdisk_set_phase(dev, SCSI_PHASE_DATA_OUT); - zip_data_command_finish(dev, 512, 512, + rdisk_data_command_finish(dev, 512, 512, alloc_length, 1); - ui_sb_update_icon_write(SB_ZIP | dev->id, + ui_sb_update_icon_write(SB_RDISK | dev->id, dev->packet_status != PHASE_COMPLETE); } else { - zip_set_phase(dev, SCSI_PHASE_STATUS); - /* zip_log(dev->log, "All done - callback set\n"); */ + rdisk_set_phase(dev, SCSI_PHASE_STATUS); + /* rdisk_log(dev->log, "All done - callback set\n"); */ dev->packet_status = PHASE_COMPLETE; - dev->callback = 20.0 * ZIP_TIME; - zip_set_callback(dev); + dev->callback = 20.0 * RDISK_TIME; + rdisk_set_callback(dev); } } } @@ -1543,19 +1559,19 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) case GPCMD_MODE_SENSE_6: case GPCMD_MODE_SENSE_10: - zip_set_phase(dev, SCSI_PHASE_DATA_IN); + rdisk_set_phase(dev, SCSI_PHASE_DATA_IN); - if (dev->drv->bus_type == ZIP_BUS_SCSI) + if (dev->drv->bus_type == RDISK_BUS_SCSI) block_desc = ((cdb[1] >> 3) & 1) ? 0 : 1; else block_desc = 0; if (cdb[0] == GPCMD_MODE_SENSE_6) { len = cdb[4]; - zip_buf_alloc(dev, 256); + rdisk_buf_alloc(dev, 256); } else { len = (cdb[8] | (cdb[7] << 8)); - zip_buf_alloc(dev, 65536); + rdisk_buf_alloc(dev, 65536); } if (zip_mode_sense_page_flags & (1LL << (uint64_t) (cdb[2] & 0x3f))) { @@ -1563,16 +1579,16 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) alloc_length = len; if (cdb[0] == GPCMD_MODE_SENSE_6) { - len = zip_mode_sense(dev, dev->buffer, 4, cdb[2], - block_desc); + len = rdisk_mode_sense(dev, dev->buffer, 4, cdb[2], + block_desc); len = MIN(len, alloc_length); dev->buffer[0] = len - 1; dev->buffer[1] = 0; if (block_desc) dev->buffer[3] = 8; } else { - len = zip_mode_sense(dev, dev->buffer, 8, cdb[2], - block_desc); + len = rdisk_mode_sense(dev, dev->buffer, 8, cdb[2], + block_desc); len = MIN(len, alloc_length); dev->buffer[0] = (len - 2) >> 8; dev->buffer[1] = (len - 2) & 255; @@ -1583,70 +1599,70 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) } } - zip_set_buf_len(dev, BufLen, &len); + rdisk_set_buf_len(dev, BufLen, &len); - zip_log(dev->log, "Reading mode page: %02X...\n", cdb[2]); + rdisk_log(dev->log, "Reading mode page: %02X...\n", cdb[2]); - zip_data_command_finish(dev, len, len, alloc_length, 0); + rdisk_data_command_finish(dev, len, len, alloc_length, 0); } else { - zip_invalid_field(dev, cdb[2]); - zip_buf_free(dev); + rdisk_invalid_field(dev, cdb[2]); + rdisk_buf_free(dev); } break; case GPCMD_MODE_SELECT_6: case GPCMD_MODE_SELECT_10: - zip_set_phase(dev, SCSI_PHASE_DATA_OUT); + rdisk_set_phase(dev, SCSI_PHASE_DATA_OUT); if (cdb[0] == GPCMD_MODE_SELECT_6) { len = cdb[4]; - zip_buf_alloc(dev, 256); + rdisk_buf_alloc(dev, 256); } else { len = (cdb[7] << 8) | cdb[8]; - zip_buf_alloc(dev, 65536); + rdisk_buf_alloc(dev, 65536); } - zip_set_buf_len(dev, BufLen, &len); + rdisk_set_buf_len(dev, BufLen, &len); dev->total_length = len; dev->do_page_save = cdb[1] & 1; - zip_data_command_finish(dev, len, len, len, 1); + rdisk_data_command_finish(dev, len, len, len, 1); return; case GPCMD_START_STOP_UNIT: - zip_set_phase(dev, SCSI_PHASE_STATUS); + rdisk_set_phase(dev, SCSI_PHASE_STATUS); switch (cdb[4] & 3) { case 0: /* Stop the disc. */ - zip_eject(dev->id); /* The Iomega Windows 9x drivers require this. */ + rdisk_eject(dev->id); /* The Iomega Windows 9x drivers require this. */ break; case 1: /* Start the disc and read the TOC. */ break; case 2: /* Eject the disc if possible. */ #if 0 - zip_eject(dev->id); + rdisk_eject(dev->id); #endif break; case 3: /* Load the disc (close tray). */ - zip_reload(dev->id); + rdisk_reload(dev->id); break; default: break; } - zip_command_complete(dev); + rdisk_command_complete(dev); break; case GPCMD_INQUIRY: - zip_set_phase(dev, SCSI_PHASE_DATA_IN); + rdisk_set_phase(dev, SCSI_PHASE_DATA_IN); max_len = cdb[3]; max_len <<= 8; max_len |= cdb[4]; - zip_buf_alloc(dev, 65536); + rdisk_buf_alloc(dev, 65536); if (cdb[1] & 1) { preamble_len = 4; @@ -1665,8 +1681,8 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) break; case 0x83: if (idx + 24 > max_len) { - zip_data_phase_error(dev, cdb[2]); - zip_buf_free(dev); + rdisk_data_phase_error(dev, cdb[2]); + rdisk_buf_free(dev); return; } @@ -1684,21 +1700,26 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) dev->buffer[idx++] = 0x00; dev->buffer[idx++] = 68; /* Vendor */ - ide_padstr8(dev->buffer + idx, 8, "IOMEGA "); + if (dev->drv->type >= RDISK_TYPE_ZIP_100) + ide_padstr8(dev->buffer + idx, 8, "IOMEGA "); + else + ide_padstr8(dev->buffer + 8, 8, EMU_NAME); /* Vendor */ idx += 8; /* Product */ - if (dev->drv->is_250) + if (dev->drv->type == RDISK_TYPE_ZIP_250) ide_padstr8(dev->buffer + idx, 40, "ZIP 250 "); - else + else if (dev->drv->type == RDISK_TYPE_ZIP_100) ide_padstr8(dev->buffer + idx, 40, "ZIP 100 "); + else + ide_padstr8(dev->buffer + 16, 40, device_identify); /* Product */ idx += 40; ide_padstr8(dev->buffer + idx, 20, "53R141"); idx += 20; break; default: - zip_log(dev->log, "INQUIRY: Invalid page: %02X\n", cdb[2]); - zip_invalid_field(dev, cdb[2]); - zip_buf_free(dev); + rdisk_log(dev->log, "INQUIRY: Invalid page: %02X\n", cdb[2]); + rdisk_invalid_field(dev, cdb[2]); + rdisk_buf_free(dev); return; } } else { @@ -1712,20 +1733,20 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) dev->buffer[0] = 0x00; /* Hard disk */ dev->buffer[1] = 0x80; /* Removable */ /* SCSI-2 compliant */ - dev->buffer[2] = (dev->drv->bus_type == ZIP_BUS_SCSI) ? 0x02 : 0x00; - dev->buffer[3] = (dev->drv->bus_type == ZIP_BUS_SCSI) ? 0x02 : 0x21; + dev->buffer[2] = (dev->drv->bus_type == RDISK_BUS_SCSI) ? 0x02 : 0x00; + dev->buffer[3] = (dev->drv->bus_type == RDISK_BUS_SCSI) ? 0x02 : 0x21; #if 0 dev->buffer[4] = 31; #endif dev->buffer[4] = 0; - if (dev->drv->bus_type == ZIP_BUS_SCSI) { + if (dev->drv->bus_type == RDISK_BUS_SCSI) { dev->buffer[6] = 1; /* 16-bit transfers supported */ dev->buffer[7] = 0x20; /* Wide bus supported */ } dev->buffer[7] |= 0x02; ide_padstr8(dev->buffer + 8, 8, "IOMEGA "); /* Vendor */ - if (dev->drv->is_250) { + if (dev->drv->type == RDISK_TYPE_ZIP_250) { /* Product */ ide_padstr8(dev->buffer + 16, 16, "ZIP 250 "); /* Revision */ @@ -1735,11 +1756,18 @@ zip_command(scsi_common_t *sc, const uint8_t *cdb) ide_padstr8(dev->buffer + 36, 8, "08/08/01"); if (max_len >= 122) ide_padstr8(dev->buffer + 96, 26, "(c) Copyright IOMEGA 2000 "); /* Copyright string */ - } else { + } else if (dev->drv->type == RDISK_TYPE_ZIP_100) { /* Product */ ide_padstr8(dev->buffer + 16, 16, "ZIP 100 "); /* Revision */ ide_padstr8(dev->buffer + 32, 4, "E.08"); + } else { + ide_padstr8(dev->buffer + 8, 8, + EMU_NAME); /* Vendor */ + ide_padstr8(dev->buffer + 16, 16, + device_identify); /* Product */ + ide_padstr8(dev->buffer + 32, 4, + EMU_VERSION_EX); /* Revision */ } idx = 36; @@ -1757,19 +1785,19 @@ atapi_out: len = idx; len = MIN(len, max_len); - zip_set_buf_len(dev, BufLen, &len); + rdisk_set_buf_len(dev, BufLen, &len); - zip_data_command_finish(dev, len, len, max_len, 0); + rdisk_data_command_finish(dev, len, len, max_len, 0); break; case GPCMD_PREVENT_REMOVAL: - zip_set_phase(dev, SCSI_PHASE_STATUS); - zip_command_complete(dev); + rdisk_set_phase(dev, SCSI_PHASE_STATUS); + rdisk_command_complete(dev); break; case GPCMD_SEEK_6: case GPCMD_SEEK_10: - zip_set_phase(dev, SCSI_PHASE_STATUS); + rdisk_set_phase(dev, SCSI_PHASE_STATUS); switch (cdb[0]) { case GPCMD_SEEK_6: @@ -1782,14 +1810,14 @@ atapi_out: default: break; } - zip_seek(dev, pos); - zip_command_complete(dev); + rdisk_seek(dev, pos); + rdisk_command_complete(dev); break; case GPCMD_READ_CDROM_CAPACITY: - zip_set_phase(dev, SCSI_PHASE_DATA_IN); + rdisk_set_phase(dev, SCSI_PHASE_DATA_IN); - zip_buf_alloc(dev, 8); + rdisk_buf_alloc(dev, 8); /* IMPORTANT: What's returned is the last LBA block. */ max_len = dev->drv->medium_size - 1; @@ -1801,21 +1829,21 @@ atapi_out: dev->buffer[6] = 2; /* 512 = 0x0200 */ len = 8; - zip_set_buf_len(dev, BufLen, &len); + rdisk_set_buf_len(dev, BufLen, &len); - zip_data_command_finish(dev, len, len, len, 0); + rdisk_data_command_finish(dev, len, len, len, 0); break; case GPCMD_IOMEGA_EJECT: - zip_set_phase(dev, SCSI_PHASE_STATUS); - zip_eject(dev->id); - zip_command_complete(dev); + rdisk_set_phase(dev, SCSI_PHASE_STATUS); + rdisk_eject(dev->id); + rdisk_command_complete(dev); break; case GPCMD_READ_FORMAT_CAPACITIES: len = (cdb[7] << 8) | cdb[8]; - zip_buf_alloc(dev, len); + rdisk_buf_alloc(dev, len); memset(dev->buffer, 0, len); pos = 0; @@ -1830,7 +1858,18 @@ atapi_out: dev->buffer[pos++] = 8; /* Current/Maximum capacity header */ - if (dev->drv->is_250) { + if (dev->drv->type == RDISK_TYPE_ZIP_100) { + /* ZIP 100 only supports ZIP 100 media as well, so we always return + the ZIP 100 size. */ + dev->buffer[pos++] = (ZIP_SECTORS >> 24) & 0xff; + dev->buffer[pos++] = (ZIP_SECTORS >> 16) & 0xff; + dev->buffer[pos++] = (ZIP_SECTORS >> 8) & 0xff; + dev->buffer[pos++] = ZIP_SECTORS & 0xff; + if (dev->drv->fp != NULL) + dev->buffer[pos++] = 2; + else + dev->buffer[pos++] = 3; + } else { /* ZIP 250 also supports ZIP 100 media, so if the medium is inserted, we return the inserted medium's size, otherwise, the ZIP 250 size. */ if (dev->drv->fp != NULL) { @@ -1846,17 +1885,6 @@ atapi_out: dev->buffer[pos++] = ZIP_250_SECTORS & 0xff; dev->buffer[pos++] = 3; /* Maximum medium capacity */ } - } else { - /* ZIP 100 only supports ZIP 100 media as well, so we always return - the ZIP 100 size. */ - dev->buffer[pos++] = (ZIP_SECTORS >> 24) & 0xff; - dev->buffer[pos++] = (ZIP_SECTORS >> 16) & 0xff; - dev->buffer[pos++] = (ZIP_SECTORS >> 8) & 0xff; - dev->buffer[pos++] = ZIP_SECTORS & 0xff; - if (dev->drv->fp != NULL) - dev->buffer[pos++] = 2; - else - dev->buffer[pos++] = 3; } dev->buffer[pos++] = 512 >> 16; @@ -1875,39 +1903,39 @@ atapi_out: dev->buffer[pos++] = 512 & 0xff; } - zip_set_buf_len(dev, BufLen, &len); + rdisk_set_buf_len(dev, BufLen, &len); - zip_data_command_finish(dev, len, len, len, 0); + rdisk_data_command_finish(dev, len, len, len, 0); break; default: - zip_illegal_opcode(dev, cdb[0]); + rdisk_illegal_opcode(dev, cdb[0]); break; } #if 0 - zip_log(dev->log, "Phase: %02X, request length: %i\n", + rdisk_log(dev->log, "Phase: %02X, request length: %i\n", dev->tf->phase, dev->tf->request_length); #endif if ((dev->packet_status == PHASE_COMPLETE) || (dev->packet_status == PHASE_ERROR)) - zip_buf_free(dev); + rdisk_buf_free(dev); } static void -zip_command_stop(scsi_common_t *sc) +rdisk_command_stop(scsi_common_t *sc) { - zip_t *dev = (zip_t *) sc; + rdisk_t *dev = (rdisk_t *) sc; - zip_command_complete(dev); - zip_buf_free(dev); + rdisk_command_complete(dev); + rdisk_buf_free(dev); } /* The command second phase function, needed for Mode Select. */ static uint8_t -zip_phase_data_out(scsi_common_t *sc) +rdisk_phase_data_out(scsi_common_t *sc) { - zip_t *dev = (zip_t *) sc; + rdisk_t *dev = (rdisk_t *) sc; int len = 0; uint8_t error = 0; uint32_t last_to_write; @@ -1929,7 +1957,7 @@ zip_phase_data_out(scsi_common_t *sc) case GPCMD_WRITE_12: case GPCMD_WRITE_AND_VERIFY_12: if (dev->requested_blocks > 0) - zip_blocks(dev, &len, 1); + rdisk_blocks(dev, &len, 1); break; case GPCMD_WRITE_SAME_10: if (!dev->current_cdb[7] && !dev->current_cdb[8]) { @@ -1944,7 +1972,7 @@ zip_phase_data_out(scsi_common_t *sc) dev->buffer[2] = (i >> 8) & 0xff; dev->buffer[3] = i & 0xff; } else if (dev->current_cdb[1] & 4) { - /* CHS are 96, 1, 2048 (ZIP 100) and 239, 1, 2048 (ZIP 250) */ + /* CHS are 96, 1, 2048 (RDISK 100) and 239, 1, 2048 (RDISK 250) */ const uint32_t s = (i % 2048); const uint32_t h = ((i - s) / 2048) % 1; const uint32_t c = ((i - s) / 2048) / 1; @@ -1959,9 +1987,9 @@ zip_phase_data_out(scsi_common_t *sc) } if (fseek(dev->drv->fp, dev->drv->base + (i << 9), SEEK_SET) == -1) - log_fatal(dev->log, "zip_phase_data_out(): Error seeking\n"); + log_fatal(dev->log, "rdisk_phase_data_out(): Error seeking\n"); if (fwrite(dev->buffer, 1, 512, dev->drv->fp) != 512) - log_fatal(dev->log, "zip_phase_data_out(): Error writing data\n"); + log_fatal(dev->log, "rdisk_phase_data_out(): Error writing data\n"); } fflush(dev->drv->fp); @@ -1978,7 +2006,7 @@ zip_phase_data_out(scsi_common_t *sc) param_list_len = dev->current_cdb[4]; } - if (dev->drv->bus_type == ZIP_BUS_SCSI) { + if (dev->drv->bus_type == RDISK_BUS_SCSI) { if (dev->current_cdb[0] == GPCMD_MODE_SELECT_6) { block_desc_len = dev->buffer[2]; block_desc_len <<= 8; @@ -1995,7 +2023,7 @@ zip_phase_data_out(scsi_common_t *sc) while (1) { if (pos >= param_list_len) { - zip_log(dev->log, "Buffer has only block descriptor\n"); + rdisk_log(dev->log, "Buffer has only block descriptor\n"); break; } @@ -2015,26 +2043,26 @@ zip_phase_data_out(scsi_common_t *sc) dev->ms_pages_saved.pages[page][i + 2] = val; else { error |= 1; - zip_invalid_field_pl(dev, val); + rdisk_invalid_field_pl(dev, val); } } } pos += page_len; - if (dev->drv->bus_type == ZIP_BUS_SCSI) + if (dev->drv->bus_type == RDISK_BUS_SCSI) val = zip_mode_sense_pages_default_scsi.pages[page][0] & 0x80; else val = zip_mode_sense_pages_default.pages[page][0] & 0x80; if (dev->do_page_save && val) - zip_mode_sense_save(dev); + rdisk_mode_sense_save(dev); if (pos >= dev->total_length) break; } if (error) { - zip_buf_free(dev); + rdisk_buf_free(dev); return 0; } break; @@ -2043,26 +2071,26 @@ zip_phase_data_out(scsi_common_t *sc) break; } - zip_command_stop((scsi_common_t *) dev); + rdisk_command_stop((scsi_common_t *) dev); return 1; } /* Peform a master init on the entire module. */ void -zip_global_init(void) +rdisk_global_init(void) { /* Clear the global data. */ - memset(zip_drives, 0x00, sizeof(zip_drives)); + memset(rdisk_drives, 0x00, sizeof(rdisk_drives)); } static int -zip_get_max(UNUSED(const ide_t *ide), const int ide_has_dma, const int type) +rdisk_get_max(UNUSED(const ide_t *ide), const int ide_has_dma, const int type) { int ret; switch (type) { case TYPE_PIO: - ret = ide_has_dma ? 3 : 0; + ret = 3; break; case TYPE_SDMA: default: @@ -2080,7 +2108,7 @@ zip_get_max(UNUSED(const ide_t *ide), const int ide_has_dma, const int type) } static int -zip_get_timings(UNUSED(const ide_t *ide), const int ide_has_dma, const int type) +rdisk_get_timings(UNUSED(const ide_t *ide), const int ide_has_dma, const int type) { int ret; @@ -2089,10 +2117,10 @@ zip_get_timings(UNUSED(const ide_t *ide), const int ide_has_dma, const int type) ret = ide_has_dma ? 0x96 : 0; break; case TIMINGS_PIO: - ret = ide_has_dma ? 0xb4 : 0; + ret = 0xf0; break; case TIMINGS_PIO_FC: - ret = ide_has_dma ? 0xb4 : 0; + ret = 0xb4; break; default: ret = 0; @@ -2103,14 +2131,14 @@ zip_get_timings(UNUSED(const ide_t *ide), const int ide_has_dma, const int type) } static void -zip_100_identify(const ide_t *ide) +rdisk_zip_100_identify(const ide_t *ide) { ide_padstr((char *) (ide->buffer + 23), "E.08", 8); /* Firmware */ ide_padstr((char *) (ide->buffer + 27), "IOMEGA ZIP 100 ATAPI", 40); /* Model */ } static void -zip_250_identify(const ide_t *ide, const int ide_has_dma) +rdisk_zip_250_identify(const ide_t *ide, const int ide_has_dma) { /* Firmware */ ide_padstr((char *) (ide->buffer + 23), "42.S", 8); @@ -2125,14 +2153,31 @@ zip_250_identify(const ide_t *ide, const int ide_has_dma) } static void -zip_identify(const ide_t *ide, const int ide_has_dma) +rdisk_generic_identify(const ide_t *ide, const int ide_has_dma, const rdisk_t *rdisk) { - const zip_t *zip = (zip_t *) ide->sc; + char model[40]; + + memset(model, 0, 40); + snprintf(model, 40, "%s %s%02i", EMU_NAME, "86B_RD", rdisk->id); + ide_padstr((char *) (ide->buffer + 23), EMU_VERSION_EX, 8); /* Firmware */ + ide_padstr((char *) (ide->buffer + 27), model, 40); /* Model */ + + if (ide_has_dma) { + ide->buffer[80] = 0x70; /* Supported ATA versions : ATA/ATAPI-4 ATA/ATAPI-6 */ + /* Maximum ATA revision supported : ATA/ATAPI-6 T13 1410D revision 3a */ + ide->buffer[81] = 0x19; + } +} + +static void +rdisk_identify(const ide_t *ide, const int ide_has_dma) +{ + const rdisk_t *rdisk = (rdisk_t *) ide->sc; /* ATAPI device, direct-access device, removable media, interrupt DRQ: - Using (2 << 5) below makes the ASUS P/I-P54TP4XE misdentify the ZIP drive + Using (2 << 5) below makes the ASUS P/I-P54TP4XE misdentify the RDISK drive as a LS-120. */ ide->buffer[0] = 0x8000 | (0 << 8) | 0x80 | (1 << 5); @@ -2141,50 +2186,52 @@ zip_identify(const ide_t *ide, const int ide_has_dma) /* Interpret zero byte count limit as maximum length */ ide->buffer[126] = 0xfffe; - if (zip_drives[zip->id].is_250) - zip_250_identify(ide, ide_has_dma); + if (rdisk_drives[rdisk->id].type == RDISK_TYPE_ZIP_250) + rdisk_zip_250_identify(ide, ide_has_dma); + else if (rdisk_drives[rdisk->id].type == RDISK_TYPE_ZIP_100) + rdisk_zip_100_identify(ide); else - zip_100_identify(ide); + rdisk_generic_identify(ide, ide_has_dma, rdisk); } static void -zip_drive_reset(const int c) +rdisk_drive_reset(const int c) { - const uint8_t scsi_bus = (zip_drives[c].scsi_device_id >> 4) & 0x0f; - const uint8_t scsi_id = zip_drives[c].scsi_device_id & 0x0f; + const uint8_t scsi_bus = (rdisk_drives[c].scsi_device_id >> 4) & 0x0f; + const uint8_t scsi_id = rdisk_drives[c].scsi_device_id & 0x0f; - if (zip_drives[c].priv == NULL) { - zip_drives[c].priv = (zip_t *) calloc(1, sizeof(zip_t)); - zip_t *dev = (zip_t *) zip_drives[c].priv; + if (rdisk_drives[c].priv == NULL) { + rdisk_drives[c].priv = (rdisk_t *) calloc(1, sizeof(rdisk_t)); + rdisk_t *dev = (rdisk_t *) rdisk_drives[c].priv; char n[1024] = { 0 }; - sprintf(n, "ZIP %i", c + 1); + sprintf(n, "Removable Disk %i", c + 1); dev->log = log_open(n); } - zip_t *dev = (zip_t *) zip_drives[c].priv; + rdisk_t *dev = (rdisk_t *) rdisk_drives[c].priv; dev->id = c; dev->cur_lun = SCSI_LUN_USE_CDB; - if (zip_drives[c].bus_type == ZIP_BUS_SCSI) { + if (rdisk_drives[c].bus_type == RDISK_BUS_SCSI) { if (dev->tf == NULL) dev->tf = (ide_tf_t *) calloc(1, sizeof(ide_tf_t)); - /* SCSI ZIP, attach to the SCSI bus. */ + /* SCSI RDISK, attach to the SCSI bus. */ scsi_device_t *sd = &scsi_devices[scsi_bus][scsi_id]; sd->sc = (scsi_common_t *) dev; - sd->command = zip_command; - sd->request_sense = zip_request_sense_for_scsi; - sd->reset = zip_reset; - sd->phase_data_out = zip_phase_data_out; - sd->command_stop = zip_command_stop; + sd->command = rdisk_command; + sd->request_sense = rdisk_request_sense_for_scsi; + sd->reset = rdisk_reset; + sd->phase_data_out = rdisk_phase_data_out; + sd->command_stop = rdisk_command_stop; sd->type = SCSI_REMOVABLE_DISK; - } else if (zip_drives[c].bus_type == ZIP_BUS_ATAPI) { + } else if (rdisk_drives[c].bus_type == RDISK_BUS_ATAPI) { /* ATAPI CD-ROM, attach to the IDE bus. */ - ide_t *id = ide_get_drive(zip_drives[c].ide_channel); + ide_t *id = ide_get_drive(rdisk_drives[c].ide_channel); /* If the IDE channel is initialized, we attach to it, otherwise, we do nothing - it's going to be a drive that's not attached to anything. */ @@ -2192,15 +2239,15 @@ zip_drive_reset(const int c) id->sc = (scsi_common_t *) dev; dev->tf = id->tf; IDE_ATAPI_IS_EARLY = 0; - id->get_max = zip_get_max; - id->get_timings = zip_get_timings; - id->identify = zip_identify; + id->get_max = rdisk_get_max; + id->get_timings = rdisk_get_timings; + id->identify = rdisk_identify; id->stop = NULL; - id->packet_command = zip_command; - id->device_reset = zip_reset; - id->phase_data_out = zip_phase_data_out; - id->command_stop = zip_command_stop; - id->bus_master_error = zip_bus_master_error; + id->packet_command = rdisk_command; + id->device_reset = rdisk_reset; + id->phase_data_out = rdisk_phase_data_out; + id->command_stop = rdisk_command_stop; + id->bus_master_error = rdisk_bus_master_error; id->interrupt_drq = 1; ide_atapi_attach(id); @@ -2209,85 +2256,85 @@ zip_drive_reset(const int c) } void -zip_hard_reset(void) +rdisk_hard_reset(void) { - for (uint8_t c = 0; c < ZIP_NUM; c++) { - if ((zip_drives[c].bus_type == ZIP_BUS_ATAPI) || (zip_drives[c].bus_type == ZIP_BUS_SCSI)) { + for (uint8_t c = 0; c < RDISK_NUM; c++) { + if ((rdisk_drives[c].bus_type == RDISK_BUS_ATAPI) || (rdisk_drives[c].bus_type == RDISK_BUS_SCSI)) { - if (zip_drives[c].bus_type == ZIP_BUS_SCSI) { - const uint8_t scsi_bus = (zip_drives[c].scsi_device_id >> 4) & 0x0f; - const uint8_t scsi_id = zip_drives[c].scsi_device_id & 0x0f; + if (rdisk_drives[c].bus_type == RDISK_BUS_SCSI) { + const uint8_t scsi_bus = (rdisk_drives[c].scsi_device_id >> 4) & 0x0f; + const uint8_t scsi_id = rdisk_drives[c].scsi_device_id & 0x0f; - /* Make sure to ignore any SCSI ZIP drive that has an out of range SCSI bus. */ + /* Make sure to ignore any SCSI RDISK drive that has an out of range SCSI bus. */ if (scsi_bus >= SCSI_BUS_MAX) continue; - /* Make sure to ignore any SCSI ZIP drive that has an out of range ID. */ + /* Make sure to ignore any SCSI RDISK drive that has an out of range ID. */ if (scsi_id >= SCSI_ID_MAX) continue; } - /* Make sure to ignore any ATAPI ZIP drive that has an out of range IDE channel. */ - if ((zip_drives[c].bus_type == ZIP_BUS_ATAPI) && (zip_drives[c].ide_channel > 7)) + /* Make sure to ignore any ATAPI RDISK drive that has an out of range IDE channel. */ + if ((rdisk_drives[c].bus_type == RDISK_BUS_ATAPI) && (rdisk_drives[c].ide_channel > 7)) continue; - zip_drive_reset(c); + rdisk_drive_reset(c); - zip_t *dev = (zip_t *) zip_drives[c].priv; + rdisk_t *dev = (rdisk_t *) rdisk_drives[c].priv; - zip_log(dev->log, "ZIP hard_reset drive=%d\n", c); + rdisk_log(dev->log, "Removable Disk hard_reset drive=%d\n", c); if (dev->tf == NULL) continue; dev->id = c; - dev->drv = &zip_drives[c]; + dev->drv = &rdisk_drives[c]; - zip_init(dev); + rdisk_init(dev); - if (strlen(zip_drives[c].image_path)) - zip_load(dev, zip_drives[c].image_path, 0); + if (strlen(rdisk_drives[c].image_path)) + rdisk_load(dev, rdisk_drives[c].image_path, 0); - zip_mode_sense_load(dev); + rdisk_mode_sense_load(dev); - if (zip_drives[c].bus_type == ZIP_BUS_SCSI) - zip_log(dev->log, "SCSI ZIP drive %i attached to SCSI ID %i\n", - c, zip_drives[c].scsi_device_id); - else if (zip_drives[c].bus_type == ZIP_BUS_ATAPI) - zip_log(dev->log, "ATAPI ZIP drive %i attached to IDE channel %i\n", - c, zip_drives[c].ide_channel); + if (rdisk_drives[c].bus_type == RDISK_BUS_SCSI) + rdisk_log(dev->log, "SCSI RDISK drive %i attached to SCSI ID %i\n", + c, rdisk_drives[c].scsi_device_id); + else if (rdisk_drives[c].bus_type == RDISK_BUS_ATAPI) + rdisk_log(dev->log, "ATAPI RDISK drive %i attached to IDE channel %i\n", + c, rdisk_drives[c].ide_channel); } } } void -zip_close(void) +rdisk_close(void) { - for (uint8_t c = 0; c < ZIP_NUM; c++) { - if (zip_drives[c].bus_type == ZIP_BUS_SCSI) { - const uint8_t scsi_bus = (zip_drives[c].scsi_device_id >> 4) & 0x0f; - const uint8_t scsi_id = zip_drives[c].scsi_device_id & 0x0f; + for (uint8_t c = 0; c < RDISK_NUM; c++) { + if (rdisk_drives[c].bus_type == RDISK_BUS_SCSI) { + const uint8_t scsi_bus = (rdisk_drives[c].scsi_device_id >> 4) & 0x0f; + const uint8_t scsi_id = rdisk_drives[c].scsi_device_id & 0x0f; memset(&scsi_devices[scsi_bus][scsi_id], 0x00, sizeof(scsi_device_t)); } - zip_t *dev = (zip_t *) zip_drives[c].priv; + rdisk_t *dev = (rdisk_t *) rdisk_drives[c].priv; if (dev) { - zip_disk_unload(dev); + rdisk_disk_unload(dev); if (dev->tf) free(dev->tf); if (dev->log != NULL) { - zip_log(dev->log, "Log closed\n"); + rdisk_log(dev->log, "Log closed\n"); log_close(dev->log); dev->log = NULL; } free(dev); - zip_drives[c].priv = NULL; + rdisk_drives[c].priv = NULL; } } } diff --git a/src/floppy/fdc.c b/src/floppy/fdc.c index 523ae6948..9d68365d2 100644 --- a/src/floppy/fdc.c +++ b/src/floppy/fdc.c @@ -335,14 +335,18 @@ fdc_int(fdc_t *fdc, int set_fintr) { int ienable = 0; - if (!(fdc->flags & FDC_FLAG_PCJR)) + if (fdc->flags & FDC_FLAG_PS2_MCA) + ienable = 1; + else if (!(fdc->flags & FDC_FLAG_PCJR)) ienable = !!(fdc->dor & 8); - if (ienable) - picint(1 << fdc->irq); + if (ienable) { + if (fdc->irq != 0xff) + picint(1 << fdc->irq); - if (set_fintr) - fdc->fintr = 1; + if (set_fintr) + fdc->fintr = 1; + } fdc_log("fdc_int(%i): fdc->fintr = %i\n", set_fintr, fdc->fintr); } @@ -355,7 +359,7 @@ fdc_watchdog_poll(void *priv) if (fdc->watchdog_count) timer_advance_u64(&fdc->watchdog_timer, 1000 * TIMER_USEC); else { - if (fdc->dor & 0x20) + if ((fdc->dor & 0x20) && (fdc->irq != 0xff)) picint(1 << fdc->irq); } } @@ -435,6 +439,44 @@ fdc_set_media_id(fdc_t *fdc, int id, int set) fdc->media_id = (fdc->media_id & ~(1 << id)) | (set << id); } +void +fdc_set_flags(fdc_t *fdc, int flags) +{ + fdc->flags |= flags; +} + +void +fdc_clear_flags(fdc_t *fdc, int flags) +{ + fdc->flags &= ~flags; +} + +void +fdc_set_fdd_changed(int drive, int changed) +{ + if (changed) + fdd_changed[drive] = 1; +} + +uint8_t +fdc_get_fdd_changed(int drive) +{ + uint8_t ret = !!fdd_changed[drive]; + + return ret; +} + +uint8_t +fdc_get_shadow(fdc_t *fdc) +{ + uint8_t ret = (fdc->rate & 0x03) | + ((fdc->pretrk & 0x07) << 2) | + (fdc->power_down ? 0x40 : 0x00) | + ((fdc_read(0x03f2, fdc) & 0x04) ? 0x80 : 0x00); + + return ret; +} + int fdc_get_boot_drive(fdc_t *fdc) { @@ -762,9 +804,17 @@ fdc_write(uint16_t addr, uint8_t val, void *priv) fdc->st0 &= ~0x07; fdc->st0 |= (fdd_get_head(0) ? 4 : 0); } else { - if (!(val & 8) && (fdc->dor & 8)) { - fdc->tc = 1; - fdc_int(fdc, 1); + /* + Writing this bit to logic "1" will enable the DRQ, + nDACK, TC and FINTR outputs. This bit being a + logic "0" will disable the nDACK and TC inputs, and + hold the DRQ and FINTR outputs in a high + impedance state. + */ + if (!(val & 8) && (fdc->dor & 8) && !(fdc->flags & FDC_FLAG_PS2_MCA)) { + fdc->tc = 1; + fdc->fintr = 0; + picintc(1 << fdc->irq); } if (!(val & 4)) { fdd_stop(real_drive(fdc, val & 3)); diff --git a/src/floppy/fdc_magitronic.c b/src/floppy/fdc_magitronic.c index 17e556e0f..a1ee922da 100644 --- a/src/floppy/fdc_magitronic.c +++ b/src/floppy/fdc_magitronic.c @@ -110,7 +110,7 @@ static const device_config_t b215_config[] = { // clang-format off { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xca000, diff --git a/src/floppy/fdc_monster.c b/src/floppy/fdc_monster.c index 04536520f..38ad9e2ed 100644 --- a/src/floppy/fdc_monster.c +++ b/src/floppy/fdc_monster.c @@ -162,7 +162,7 @@ static const device_config_t monster_fdc_config[] = { #endif { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xc8000, diff --git a/src/floppy/fdc_pii15xb.c b/src/floppy/fdc_pii15xb.c index 4e6a8367c..4c8c589e4 100644 --- a/src/floppy/fdc_pii15xb.c +++ b/src/floppy/fdc_pii15xb.c @@ -123,7 +123,7 @@ static const device_config_t pii_config[] = { // clang-format off { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xce000, diff --git a/src/floppy/fdd.c b/src/floppy/fdd.c index 1623f932a..8bc946388 100644 --- a/src/floppy/fdd.c +++ b/src/floppy/fdd.c @@ -459,11 +459,17 @@ fdd_load(int drive, char *fn) int size; const char *p; FILE *fp; + int offs = 0; fdd_log("FDD: loading drive %d with '%s'\n", drive, fn); if (!fn) return; + if (strstr(fn, "wp://") == fn) { + offs = 5; + ui_writeprot[drive] = 1; + } + fn += offs; p = path_get_extension(fn); if (!p) return; @@ -476,13 +482,14 @@ fdd_load(int drive, char *fn) while (loaders[c].ext) { if (!strcasecmp(p, (char *) loaders[c].ext) && (size == loaders[c].size || loaders[c].size == -1)) { driveloaders[drive] = c; - if (floppyfns[drive] != fn) - strcpy(floppyfns[drive], fn); + if (floppyfns[drive] != (fn - offs)) + strcpy(floppyfns[drive], fn - offs); d86f_setup(drive); - loaders[c].load(drive, floppyfns[drive]); + loaders[c].load(drive, floppyfns[drive] + offs); drive_empty[drive] = 0; fdd_forced_seek(drive, 0); fdd_changed[drive] = 1; + ui_sb_update_icon_wp(SB_FLOPPY | drive, ui_writeprot[drive]); return; } c++; @@ -532,7 +539,7 @@ fdd_hole(int drive) static __inline uint64_t fdd_byteperiod(int drive) { - if (!fdd_get_turbo(drive) && drives[drive].byteperiod) + if (drives[drive].byteperiod) return drives[drive].byteperiod(drive); else return 32ULL * TIMER_USEC; diff --git a/src/floppy/fdd_86f.c b/src/floppy/fdd_86f.c index 24fde57b1..f210bf4fd 100644 --- a/src/floppy/fdd_86f.c +++ b/src/floppy/fdd_86f.c @@ -758,36 +758,43 @@ d86f_get_encoding(int drive) uint64_t d86f_byteperiod(int drive) { - double dusec = (double) TIMER_USEC; - double p = 2.0; + d86f_t *dev = d86f[drive]; + uint64_t ret = 32ULL * TIMER_USEC; - switch (d86f_track_flags(drive) & 0x0f) { - case 0x02: /* 125 kbps, FM */ - p = 4.0; - break; - case 0x01: /* 150 kbps, FM */ - p = 20.0 / 6.0; - break; - case 0x0a: /* 250 kbps, MFM */ - case 0x00: /* 250 kbps, FM */ - default: - p = 2.0; - break; - case 0x09: /* 300 kbps, MFM */ - p = 10.0 / 6.0; - break; - case 0x08: /* 500 kbps, MFM */ - p = 1.0; - break; - case 0x0b: /* 1000 kbps, MFM */ - p = 0.5; - break; - case 0x0d: /* 2000 kbps, MFM */ - p = 0.25; - break; + if (!fdd_get_turbo(drive) || (dev->version != 0x0063) || (dev->state == STATE_SECTOR_NOT_FOUND)) { + double dusec = (double) TIMER_USEC; + double p = 2.0; + + switch (d86f_track_flags(drive) & 0x0f) { + case 0x02: /* 125 kbps, FM */ + p = 4.0; + break; + case 0x01: /* 150 kbps, FM */ + p = 20.0 / 6.0; + break; + case 0x0a: /* 250 kbps, MFM */ + case 0x00: /* 250 kbps, FM */ + default: + p = 2.0; + break; + case 0x09: /* 300 kbps, MFM */ + p = 10.0 / 6.0; + break; + case 0x08: /* 500 kbps, MFM */ + p = 1.0; + break; + case 0x0b: /* 1000 kbps, MFM */ + p = 0.5; + break; + case 0x0d: /* 2000 kbps, MFM */ + p = 0.25; + break; + } + + ret = (uint64_t) (p * dusec); } - return (uint64_t) (p * dusec); + return ret; } int @@ -2463,16 +2470,17 @@ d86f_poll(int drive) dev->state = STATE_SECTOR_NOT_FOUND; } - if (fdd_get_turbo(drive) && (dev->version == 0x0063)) { - d86f_turbo_poll(drive, side); - return; - } - if ((dev->state != STATE_IDLE) && (dev->state != STATE_SECTOR_NOT_FOUND) && ((dev->state & 0xF8) != 0xE8)) { if (!d86f_can_read_address(drive)) dev->state = STATE_SECTOR_NOT_FOUND; } + /* Do normal poll if DENSEL is wrong, because Windows 95 is very strict about timings there. */ + if (fdd_get_turbo(drive) && (dev->version == 0x0063) && (dev->state != STATE_SECTOR_NOT_FOUND)) { + d86f_turbo_poll(drive, side); + return; + } + if ((dev->state != STATE_02_SPIN_TO_INDEX) && (dev->state != STATE_0D_SPIN_TO_INDEX)) d86f_get_bit(drive, side ^ 1); @@ -2577,12 +2585,6 @@ d86f_poll(int drive) d86f_advance_bit(drive, side); - if (d86f_wrong_densel(drive) && (dev->state != STATE_IDLE)) { - dev->state = STATE_IDLE; - fdc_noidam(d86f_fdc); - return; - } - if ((dev->index_count == 2) && (dev->state != STATE_IDLE)) { switch (dev->state) { case STATE_0A_FIND_ID: @@ -3277,7 +3279,12 @@ d86f_readsector(int drive, int sector, int track, int side, int rate, int sector if (!ret) return; - if (sector == SECTOR_FIRST) + if (d86f_wrong_densel(drive)) { + dev->state = STATE_SECTOR_NOT_FOUND; + + if (fdd_get_turbo(drive)) + dev->track_pos = 0; + } else if (sector == SECTOR_FIRST) dev->state = STATE_02_SPIN_TO_INDEX; else if (sector == SECTOR_NEXT) dev->state = STATE_02_FIND_ID; @@ -3302,7 +3309,13 @@ d86f_writesector(int drive, int sector, int track, int side, int rate, int secto if (!ret) return; - dev->state = fdc_is_deleted(d86f_fdc) ? STATE_09_FIND_ID : STATE_05_FIND_ID; + if (d86f_wrong_densel(drive)) { + dev->state = STATE_SECTOR_NOT_FOUND; + + if (fdd_get_turbo(drive)) + dev->track_pos = 0; + } else + dev->state = fdc_is_deleted(d86f_fdc) ? STATE_09_FIND_ID : STATE_05_FIND_ID; } void @@ -3315,7 +3328,13 @@ d86f_comparesector(int drive, int sector, int track, int side, int rate, int sec if (!ret) return; - dev->state = STATE_11_FIND_ID; + if (d86f_wrong_densel(drive)) { + dev->state = STATE_SECTOR_NOT_FOUND; + + if (fdd_get_turbo(drive)) + dev->track_pos = 0; + } else + dev->state = STATE_11_FIND_ID; } void @@ -3336,7 +3355,13 @@ d86f_readaddress(int drive, UNUSED(int side), UNUSED(int rate)) dev->id_found = 0; dev->dma_over = 0; - dev->state = STATE_0A_FIND_ID; + if (d86f_wrong_densel(drive)) { + dev->state = STATE_SECTOR_NOT_FOUND; + + if (fdd_get_turbo(drive)) + dev->track_pos = 0; + } else + dev->state = STATE_0A_FIND_ID; } void @@ -3438,7 +3463,13 @@ d86f_common_format(int drive, int side, UNUSED(int rate), uint8_t fill, int prox dev->index_count = dev->error_condition = dev->satisfying_bytes = dev->sector_count = 0; dev->dma_over = 0; - dev->state = STATE_0D_SPIN_TO_INDEX; + if (d86f_wrong_densel(drive) && !proxy) { + dev->state = STATE_SECTOR_NOT_FOUND; + + if (fdd_get_turbo(drive)) + dev->track_pos = 0; + } else + dev->state = STATE_0D_SPIN_TO_INDEX; } void diff --git a/src/game/gameport.c b/src/game/gameport.c index 3025ee5eb..f17e39efe 100644 --- a/src/game/gameport.c +++ b/src/game/gameport.c @@ -61,13 +61,13 @@ typedef struct _joystick_instance_ { uint8_t state; g_axis_t axis[4]; - const joystick_if_t *intf; - void *dat; + const joystick_t *intf; + void *dat; } joystick_instance_t; -int joystick_type = JS_TYPE_NONE; +int joystick_type[GAMEPORT_MAX] = { JS_TYPE_NONE, JS_TYPE_NONE }; -static const joystick_if_t joystick_none = { +static const joystick_t joystick_none = { .name = "None", .internal_name = "none", .init = NULL, @@ -86,7 +86,7 @@ static const joystick_if_t joystick_none = { }; static const struct { - const joystick_if_t *joystick; + const joystick_t *joystick; } joysticks[] = { { &joystick_none }, { &joystick_2axis_2button }, @@ -100,7 +100,7 @@ static const struct { { &joystick_3axis_2button }, { &joystick_2button_yoke_throttle }, { &joystick_3axis_4button }, - { &joystick_win95_steering_wheel }, // Temp + { &joystick_win95_steering_wheel }, { &joystick_4button_yoke_throttle }, { &joystick_4axis_4button }, { &joystick_ch_flightstick_pro }, @@ -114,24 +114,39 @@ static const struct { static joystick_instance_t *joystick_instance[GAMEPORT_MAX] = { NULL, NULL }; static uint8_t gameport_pnp_rom[] = { - 0x09, 0xf8, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, /* BOX0002, dummy checksum (filled in by isapnp_add_card) */ - 0x0a, 0x10, 0x10, /* PnP version 1.0, vendor version 1.0 */ - 0x82, 0x09, 0x00, 'G', 'a', 'm', 'e', ' ', 'P', 'o', 'r', 't', /* ANSI identifier */ + /* BOX0002, serial 0, dummy checksum (filled in by isapnp_add_card) */ + 0x09, 0xf8, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + /* PnP version 1.0, vendor version 1.0 */ + 0x0a, 0x10, 0x10, + /* ANSI identifier */ + 0x82, 0x09, 0x00, 'G', 'a', 'm', 'e', ' ', 'P', 'o', 'r', 't', - 0x15, 0x09, 0xf8, 0x00, 0x02, 0x01, /* logical device BOX0002, can participate in boot */ - 0x1c, 0x41, 0xd0, 0xb0, 0x2f, /* compatible device PNPB02F */ - 0x31, 0x00, /* start dependent functions, preferred */ - 0x47, 0x01, 0x00, 0x02, 0x00, 0x02, 0x08, 0x08, /* I/O 0x200, decodes 16-bit, 8-byte alignment, 8 addresses */ - 0x30, /* start dependent functions, acceptable */ - 0x47, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x08, /* I/O 0x208, decodes 16-bit, 8-byte alignment, 8 addresses */ - 0x31, 0x02, /* start dependent functions, sub-optimal */ - 0x47, 0x01, 0x00, 0x01, 0xf8, 0xff, 0x08, 0x08, /* I/O 0x100-0xFFF8, decodes 16-bit, 8-byte alignment, 8 addresses */ - 0x38, /* end dependent functions */ + /* Logical device BOX0002, can participate in boot */ + 0x15, 0x09, 0xf8, 0x00, 0x02, 0x01, + /* Compatible device PNPB02F */ + 0x1c, 0x41, 0xd0, 0xb0, 0x2f, + /* Start dependent functions, preferred */ + 0x31, 0x00, + /* I/O 0x200, decodes 16-bit, 8-byte alignment, 8 addresses */ + 0x47, 0x01, 0x00, 0x02, 0x00, 0x02, 0x08, 0x08, + /* Start dependent functions, acceptable */ + 0x30, + /* I/O 0x208, decodes 16-bit, 8-byte alignment, 8 addresses */ + 0x47, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x08, + /* Start dependent functions, sub-optimal */ + 0x31, 0x02, + /* I/O 0x100-0xFFF8, decodes 16-bit, 8-byte alignment, 8 addresses */ + 0x47, 0x01, 0x00, 0x01, 0xf8, 0xff, 0x08, 0x08, + /* End dependent functions */ + 0x38, - 0x79, 0x00 /* end tag, dummy checksum (filled in by isapnp_add_card) */ + /* End tag, dummy checksum (filled in by isapnp_add_card) */ + 0x79, 0x00 }; + static const isapnp_device_config_t gameport_pnp_defaults[] = { - {.activate = 1, + { + .activate = 1, .io = { { .base = 0x200 }, } @@ -244,10 +259,8 @@ gameport_write(UNUSED(uint16_t addr), UNUSED(uint8_t val), void *priv) /* Read all axes. */ joystick->state |= 0x0f; - gameport_time(joystick, 0, joystick->intf->read_axis(joystick->dat, 0)); - gameport_time(joystick, 1, joystick->intf->read_axis(joystick->dat, 1)); - gameport_time(joystick, 2, joystick->intf->read_axis(joystick->dat, 2)); - gameport_time(joystick, 3, joystick->intf->read_axis(joystick->dat, 3)); + for (uint8_t i = 0; i < 4; i++) + gameport_time(joystick, i, joystick->intf->read_axis(joystick->dat, i)); /* Notify the interface. */ joystick->intf->write(joystick->dat); @@ -286,17 +299,17 @@ timer_over(void *priv) } void -gameport_update_joystick_type(void) +gameport_update_joystick_type(uint8_t gp) { /* Add a standalone game port if a joystick is enabled but no other game ports exist. */ if (standalone_gameport_type) gameport_add(standalone_gameport_type); /* Reset the joystick interface. */ - if (joystick_instance[0]) { - joystick_instance[0]->intf->close(joystick_instance[0]->dat); - joystick_instance[0]->intf = joysticks[joystick_type].joystick; - joystick_instance[0]->dat = joystick_instance[0]->intf->init(); + if (joystick_instance[gp]) { + joystick_instance[gp]->intf->close(joystick_instance[gp]->dat); + joystick_instance[gp]->intf = joysticks[joystick_type[gp]].joystick; + joystick_instance[gp]->dat = joystick_instance[gp]->intf->init(); } } @@ -380,37 +393,34 @@ gameport_init(const device_t *info) { gameport_t *dev = calloc(1, sizeof(gameport_t)); + // TODO: Later we'll actually support more than one gameport + uint8_t joy_insn = 0; + /* Allocate global instance. */ - if (!joystick_instance[0] && joystick_type) { - joystick_instance[0] = calloc(1, sizeof(joystick_instance_t)); + if (!joystick_instance[joy_insn] && joystick_type[joy_insn]) { + joystick_instance[joy_insn] = calloc(1, sizeof(joystick_instance_t)); - joystick_instance[0]->axis[0].joystick = joystick_instance[0]; - joystick_instance[0]->axis[1].joystick = joystick_instance[0]; - joystick_instance[0]->axis[2].joystick = joystick_instance[0]; - joystick_instance[0]->axis[3].joystick = joystick_instance[0]; + // For each analog joystick axis + for (uint8_t i = 0; i < 4; i++) { + joystick_instance[joy_insn]->axis[i].joystick = joystick_instance[joy_insn]; - joystick_instance[0]->axis[0].axis_nr = 0; - joystick_instance[0]->axis[1].axis_nr = 1; - joystick_instance[0]->axis[2].axis_nr = 2; - joystick_instance[0]->axis[3].axis_nr = 3; + joystick_instance[joy_insn]->axis[i].axis_nr = i; - timer_add(&joystick_instance[0]->axis[0].timer, timer_over, &joystick_instance[0]->axis[0], 0); - timer_add(&joystick_instance[0]->axis[1].timer, timer_over, &joystick_instance[0]->axis[1], 0); - timer_add(&joystick_instance[0]->axis[2].timer, timer_over, &joystick_instance[0]->axis[2], 0); - timer_add(&joystick_instance[0]->axis[3].timer, timer_over, &joystick_instance[0]->axis[3], 0); + timer_add(&joystick_instance[joy_insn]->axis[i].timer, timer_over, &joystick_instance[joy_insn]->axis[i], 0); + } - joystick_instance[0]->intf = joysticks[joystick_type].joystick; - joystick_instance[0]->dat = joystick_instance[0]->intf->init(); + joystick_instance[joy_insn]->intf = joysticks[joystick_type[joy_insn]].joystick; + joystick_instance[joy_insn]->dat = joystick_instance[joy_insn]->intf->init(); } - dev->joystick = joystick_instance[0]; + dev->joystick = joystick_instance[joy_insn]; /* Map game port to the default address. Not applicable on PnP-only ports. */ dev->len = (info->local >> 16) & 0xff; gameport_remap(dev, info->local & 0xffff); - /* Register ISAPnP if this is a standard game port card. */ - if ((info->local & 0xffff) == 0x200) + /* Register ISAPnP if this is a PNP game port card. */ + if (info->local & GAMEPORT_PNPROM) isapnp_set_device_defaults(isapnp_add_card(gameport_pnp_rom, sizeof(gameport_pnp_rom), gameport_pnp_config_changed, NULL, NULL, NULL, dev), 0, gameport_pnp_defaults); return dev; @@ -468,24 +478,41 @@ gameport_close(void *priv) { gameport_t *dev = (gameport_t *) priv; + // TODO: Later we'll actually support more than one gameport + uint8_t joy_insn = 0; + /* If this port was active, remove it from the active ports list. */ gameport_remap(dev, 0); /* Free the global instance here, if it wasn't already freed. */ - if (joystick_instance[0]) { - joystick_instance[0]->intf->close(joystick_instance[0]->dat); + if (joystick_instance[joy_insn]) { + joystick_instance[joy_insn]->intf->close(joystick_instance[joy_insn]->dat); - free(joystick_instance[0]); - joystick_instance[0] = NULL; + free(joystick_instance[joy_insn]); + joystick_instance[joy_insn] = NULL; } free(dev); } const device_t gameport_device = { - .name = "Game port", + .name = "86Box PNP Game port", .internal_name = "gameport", .flags = 0, + .local = GAMEPORT_PNPROM | GAMEPORT_8ADDR | 0x0200, + .init = gameport_init, + .close = gameport_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t gameport_200_device = { + .name = "Game port (Port 200h-207h)", + .internal_name = "gameport_200", + .flags = 0, .local = GAMEPORT_8ADDR | 0x0200, .init = gameport_init, .close = gameport_close, @@ -736,7 +763,7 @@ const device_t gameport_sio_device = { const device_t gameport_sio_1io_device = { .name = "Game port (Super I/O, 1 I/O port)", - .internal_name = "gameport_sio", + .internal_name = "gameport_sio_1io", .flags = 0, .local = GAMEPORT_SIO | GAMEPORT_1ADDR, .init = gameport_init, @@ -751,6 +778,7 @@ const device_t gameport_sio_1io_device = { static const GAMEPORT gameports[] = { { &device_none }, { &device_internal }, + { &gameport_200_device }, { &gameport_device }, { &gameport_208_device }, { &gameport_pnp_device }, @@ -771,7 +799,7 @@ gameport_available(int port) /* UI */ const device_t * -gameports_getdevice(int port) +gameport_get_device(int port) { return (gameports[port].device); } diff --git a/src/game/joystick_ch_flightstick_pro.c b/src/game/joystick_ch_flightstick_pro.c index 5b240f3f4..b3d4e0ef5 100644 --- a/src/game/joystick_ch_flightstick_pro.c +++ b/src/game/joystick_ch_flightstick_pro.c @@ -8,8 +8,6 @@ * * Implementation of the Flight Stick Pro. * - * - * * Authors: Miran Grca, * Sarah Walker, * @@ -138,7 +136,7 @@ ch_flightstick_pro_a0_over(UNUSED(void *priv)) // } -const joystick_if_t joystick_ch_flightstick_pro = { +const joystick_t joystick_ch_flightstick_pro = { .name = "CH Flightstick Pro", .internal_name = "ch_flightstick_pro", .init = ch_flightstick_pro_init, @@ -156,7 +154,7 @@ const joystick_if_t joystick_ch_flightstick_pro = { .pov_names = { "POV" } }; -const joystick_if_t joystick_ch_flightstick_pro_ch_pedals = { +const joystick_t joystick_ch_flightstick_pro_ch_pedals = { .name = "CH Flightstick Pro + CH Pedals", .internal_name = "ch_flightstick_pro_ch_pedals", .init = ch_flightstick_pro_init, diff --git a/src/game/joystick_standard.c b/src/game/joystick_standard.c index 8136935ea..fa83826da 100644 --- a/src/game/joystick_standard.c +++ b/src/game/joystick_standard.c @@ -274,7 +274,7 @@ joystick_standard_a0_over(UNUSED(void *priv)) // } -const joystick_if_t joystick_2axis_2button = { +const joystick_t joystick_2axis_2button = { .name = "2-axis, 2-button joystick(s)", .internal_name = "2axis_2button", .init = joystick_standard_init, @@ -292,7 +292,7 @@ const joystick_if_t joystick_2axis_2button = { .pov_names = { NULL } }; -const joystick_if_t joystick_2button_gamepad = { +const joystick_t joystick_2button_gamepad = { .name = "2-button gamepad(s)", .internal_name = "2button_gamepad", .init = joystick_standard_init, @@ -310,7 +310,7 @@ const joystick_if_t joystick_2button_gamepad = { .pov_names = { NULL } }; -const joystick_if_t joystick_2button_flight_yoke = { +const joystick_t joystick_2button_flight_yoke = { .name = "2-button flight yoke", .internal_name = "2button_flight_yoke", .init = joystick_standard_init, @@ -328,7 +328,7 @@ const joystick_if_t joystick_2button_flight_yoke = { .pov_names = { NULL } }; -const joystick_if_t joystick_2axis_4button = { +const joystick_t joystick_2axis_4button = { .name = "2-axis, 4-button joystick", .internal_name = "2axis_4button", .init = joystick_standard_init, @@ -346,7 +346,7 @@ const joystick_if_t joystick_2axis_4button = { .pov_names = { NULL } }; -const joystick_if_t joystick_4button_gamepad = { +const joystick_t joystick_4button_gamepad = { .name = "4-button gamepad", .internal_name = "4button_gamepad", .init = joystick_standard_init, @@ -364,7 +364,7 @@ const joystick_if_t joystick_4button_gamepad = { .pov_names = { NULL } }; -const joystick_if_t joystick_4button_flight_yoke = { +const joystick_t joystick_4button_flight_yoke = { .name = "4-button flight yoke", .internal_name = "4button_flight_yoke", .init = joystick_standard_init, @@ -382,7 +382,7 @@ const joystick_if_t joystick_4button_flight_yoke = { .pov_names = { NULL } }; -const joystick_if_t joystick_3axis_2button = { +const joystick_t joystick_3axis_2button = { .name = "3-axis, 2-button joystick", .internal_name = "3axis_2button", .init = joystick_standard_init, @@ -400,7 +400,7 @@ const joystick_if_t joystick_3axis_2button = { .pov_names = { NULL } }; -const joystick_if_t joystick_2button_yoke_throttle = { +const joystick_t joystick_2button_yoke_throttle = { .name = "2-button flight yoke with throttle", .internal_name = "2button_yoke_throttle", .init = joystick_standard_init, @@ -418,7 +418,7 @@ const joystick_if_t joystick_2button_yoke_throttle = { .pov_names = { NULL } }; -const joystick_if_t joystick_3axis_4button = { +const joystick_t joystick_3axis_4button = { .name = "3-axis, 4-button joystick", .internal_name = "3axis_4button", .init = joystick_standard_init, @@ -436,7 +436,7 @@ const joystick_if_t joystick_3axis_4button = { .pov_names = { NULL } }; -const joystick_if_t joystick_4button_yoke_throttle = { +const joystick_t joystick_4button_yoke_throttle = { .name = "4-button flight yoke with throttle", .internal_name = "4button_yoke_throttle", .init = joystick_standard_init, @@ -454,7 +454,7 @@ const joystick_if_t joystick_4button_yoke_throttle = { .pov_names = { NULL } }; -const joystick_if_t joystick_win95_steering_wheel = { +const joystick_t joystick_win95_steering_wheel = { .name = "Win95 Steering Wheel (3-axis, 4-button)", .internal_name = "win95_steering_wheel", .init = joystick_standard_init, @@ -472,7 +472,7 @@ const joystick_if_t joystick_win95_steering_wheel = { .pov_names = { NULL } }; -const joystick_if_t joystick_4axis_4button = { +const joystick_t joystick_4axis_4button = { .name = "4-axis, 4-button joystick", .internal_name = "4axis_4button", .init = joystick_standard_init, @@ -490,7 +490,7 @@ const joystick_if_t joystick_4axis_4button = { .pov_names = { NULL } }; -const joystick_if_t joystick_2axis_6button = { +const joystick_t joystick_2axis_6button = { .name = "2-axis, 6-button joystick", .internal_name = "2axis_6button", .init = joystick_standard_init, @@ -508,7 +508,7 @@ const joystick_if_t joystick_2axis_6button = { .pov_names = { NULL } }; -const joystick_if_t joystick_2axis_8button = { +const joystick_t joystick_2axis_8button = { .name = "2-axis, 8-button joystick", .internal_name = "2axis_8button", .init = joystick_standard_init, diff --git a/src/game/joystick_sw_pad.c b/src/game/joystick_sw_pad.c index bfdc0e025..7c1d4910b 100644 --- a/src/game/joystick_sw_pad.c +++ b/src/game/joystick_sw_pad.c @@ -29,8 +29,6 @@ * - Some DOS stuff will write to 0x201 while a packet is * being transferred. This seems to be ignored. * - * - * * Authors: Miran Grca, * Sarah Walker, * @@ -244,7 +242,7 @@ sw_a0_over(void *priv) timer_set_delay_u64(&sw->trigger_timer, TIMER_USEC * 10000); } -const joystick_if_t joystick_sw_pad = { +const joystick_t joystick_sw_pad = { .name = "Microsoft SideWinder Pad", .internal_name = "sidewinder_pad", .init = sw_init, diff --git a/src/game/joystick_tm_fcs.c b/src/game/joystick_tm_fcs.c index 52d77d8fb..6c1176a42 100644 --- a/src/game/joystick_tm_fcs.c +++ b/src/game/joystick_tm_fcs.c @@ -8,8 +8,6 @@ * * Implementation of Thrust Master Flight Control System. * - * - * * Authors: Miran Grca, * Sarah Walker, * @@ -148,7 +146,7 @@ tm_fcs_a0_over(UNUSED(void *priv)) // } -const joystick_if_t joystick_tm_fcs = { +const joystick_t joystick_tm_fcs = { .name = "Thrustmaster Flight Control System", .internal_name = "thrustmaster_fcs", .init = tm_fcs_init, @@ -166,7 +164,7 @@ const joystick_if_t joystick_tm_fcs = { .pov_names = { "POV" } }; -const joystick_if_t joystick_tm_fcs_rcs = { +const joystick_t joystick_tm_fcs_rcs = { .name = "Thrustmaster FCS + Rudder Control System", .internal_name = "thrustmaster_fcs_rcs", .init = tm_fcs_init, diff --git a/src/include/86box/86box.h b/src/include/86box/86box.h index 4494290d6..175b5b302 100644 --- a/src/include/86box/86box.h +++ b/src/include/86box/86box.h @@ -25,6 +25,11 @@ #include #endif +#if defined(__HAIKU__) +/* Doesn't compile on Haiku without this include */ +#include +#endif + /* Configuration values. */ #define GFXCARD_MAX 2 #define SERIAL_MAX 8 @@ -33,9 +38,10 @@ #define SCREEN_RES_Y 480 /* Filename and pathname info. */ -#define CONFIG_FILE "86box.cfg" -#define NVR_PATH "nvr" -#define SCREENSHOT_PATH "screenshots" +#define CONFIG_FILE "86box.cfg" +#define GLOBAL_CONFIG_FILE "86box_global.cfg" +#define NVR_PATH "nvr" +#define SCREENSHOT_PATH "screenshots" /* Recently used images */ #define MAX_PREV_IMAGES 10 @@ -110,16 +116,21 @@ extern uint64_t instru_run_ms; #define window_y monitor_settings[0].mon_window_y #define window_w monitor_settings[0].mon_window_w #define window_h monitor_settings[0].mon_window_h -extern int inhibit_multimedia_keys; /* (C) Inhibit multimedia keys on Windows. */ +extern int inhibit_multimedia_keys; /* (G) Inhibit multimedia keys on Windows. */ extern int window_remember; extern int vid_resize; /* (C) allow resizing */ extern int invert_display; /* (C) invert the display */ extern int suppress_overscan; /* (C) suppress overscans */ -extern int lang_id; /* (C) language id */ +extern int lang_id; /* (G) language id */ extern int scale; /* (C) screen scale factor */ extern int dpi_scale; /* (C) DPI scaling of the emulated screen */ extern int vid_api; /* (C) video renderer */ extern int vid_cga_contrast; /* (C) video */ +extern int vid_cga_comp_brightness; /* (C) CGA composite brightness */ +extern int vid_cga_comp_sharpness; /* (C) CGA composite sharpness */ +extern int vid_cga_comp_hue; /* (C) CGA composite hue */ +extern int vid_cga_comp_saturation; /* (C) CGA composite saturation */ +extern int vid_cga_comp_contrast; /* (C) CGA composite saturation */ extern int video_fullscreen; /* (C) video */ extern int video_fullscreen_scale; /* (C) video */ extern int enable_overscan; /* (C) video */ @@ -149,11 +160,12 @@ extern int fpu_type; /* (C) fpu type */ extern int fpu_softfloat; /* (C) fpu uses softfloat */ extern int time_sync; /* (C) enable time sync */ extern int hdd_format_type; /* (C) hard disk file format */ -extern int confirm_reset; /* (C) enable reset confirmation */ -extern int confirm_exit; /* (C) enable exit confirmation */ -extern int confirm_save; /* (C) enable save confirmation */ +extern int confirm_reset; /* (G) enable reset confirmation */ +extern int confirm_exit; /* (G) enable exit confirmation */ +extern int confirm_save; /* (G) enable save confirmation */ extern int enable_discord; /* (C) enable Discord integration */ extern int force_10ms; /* (C) force 10ms CPU frame interval */ +extern int jumpered_internal_ecp_dma; /* (C) Jumpered internal EPC DMA */ extern int other_ide_present; /* IDE controllers from non-IDE cards are present */ extern int other_scsi_present; /* SCSI controllers from non-SCSI cards are present */ extern int is_pcjr; /* The current machine is PCjr. */ @@ -164,7 +176,8 @@ extern int fixed_size_y; extern int sound_muted; /* (C) Is sound muted? */ extern int do_auto_pause; /* (C) Auto-pause the emulator on focus loss */ extern int auto_paused; -extern double mouse_sensitivity; /* (C) Mouse sensitivity scale */ +extern int force_constant_mouse; /* (C) Force constant updating of the mouse */ +extern double mouse_sensitivity; /* (G) Mouse sensitivity scale */ #ifdef _Atomic extern _Atomic double mouse_x_error; /* Mouse error accumulator - Y */ extern _Atomic double mouse_y_error; /* Mouse error accumulator - Y */ @@ -172,14 +185,17 @@ extern _Atomic double mouse_y_error; /* Mouse error accumulator - Y */ extern int pit_mode; /* (C) force setting PIT mode */ extern int fm_driver; /* (C) select FM sound driver */ extern int hook_enabled; /* (C) Keyboard hook is enabled */ +extern int vmm_disabled; /* (G) disable built-in manager */ +extern char vmm_path_cfg[1024]; /* (G) VMs path (unless -E is used) */ extern char exe_path[2048]; /* path (dir) of executable */ extern char usr_path[1024]; /* path (dir) of user data */ extern char cfg_path[1024]; /* full path of config file */ +extern char global_cfg_path[1024]; /* full path of global config file */ extern int open_dir_usr_path; /* default file open dialog directory of usr_path */ extern char uuid[MAX_UUID_LEN]; /* UUID or machine identifier */ -extern char vmm_path[1024]; /* VM Manager path to scan (temporary) */ -extern int vmm_enabled; +extern char vmm_path[1024]; /* VM Manager path to scan */ +extern int start_vmm; #ifndef USE_NEW_DYNAREC extern FILE *stdlog; /* file to log output to */ #endif @@ -195,6 +211,7 @@ extern void warning_ex(const char *fmt, va_list ap); #endif extern void pclog_toggle_suppr(void); extern void pclog(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); +extern void always_log(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); extern void fatal(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); extern void warning(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); extern void set_screen_size(int x, int y); @@ -206,6 +223,7 @@ extern void update_mouse_msg(void); #if 0 extern void pc_reload(wchar_t *fn); #endif +extern int pc_init_roms(void); extern int pc_init_modules(void); extern int pc_init(int argc, char *argv[]); extern void pc_close(void *threadid); diff --git a/src/include/86box/cassette.h b/src/include/86box/cassette.h index 168d82099..dc85bfc26 100644 --- a/src/include/86box/cassette.h +++ b/src/include/86box/cassette.h @@ -75,7 +75,7 @@ void pc_cas_del(pc_cassette_t *cas); * @short Set the cassette file * @return True on error, false otherwise *****************************************************************************/ -int pc_cas_set_fname(pc_cassette_t *cas, const char *fname); +int pc_cas_set_fname(pc_cassette_t *cas, char *fname); /*!*************************************************************************** * @short Get the cassette mode diff --git a/src/include/86box/cdrom.h b/src/include/86box/cdrom.h index a962a8635..f98b60983 100644 --- a/src/include/86box/cdrom.h +++ b/src/include/86box/cdrom.h @@ -29,8 +29,9 @@ #define CD_STATUS_STOPPED 6 #define CD_STATUS_PLAYING_COMPLETED 7 #define CD_STATUS_HOLD 8 +#define CD_STATUS_DVD_REJECTED 16 #define CD_STATUS_HAS_AUDIO 0xc -#define CD_STATUS_MASK 0xf +#define CD_STATUS_MASK 0x1f /* Medium changed flag. */ #define CD_STATUS_TRANSITION 0x40 @@ -69,6 +70,8 @@ #define CD_FPS 75 +#define _LUT_SIZE 0x100 + #define FRAMES_TO_MSF(f, M, S, F) \ { \ uint64_t value = f; \ @@ -91,13 +94,19 @@ extern "C" { #endif enum { - CDROM_BUS_DISABLED = 0, - CDROM_BUS_ATAPI = 5, - CDROM_BUS_SCSI = 6, - CDROM_BUS_MITSUMI = 7, - CDROM_BUS_USB = 8 + CDROM_BUS_DISABLED = 0, + CDROM_BUS_PHILIPS = 1, + CDROM_BUS_SONY = 2, + CDROM_BUS_HITACHI = 3, + CDROM_BUS_MKE = 4, + CDROM_BUS_MITSUMI = 5, + CDROM_BUS_LPT = 6, + CDROM_BUS_ATAPI = 8, + CDROM_BUS_SCSI = 9, + CDROM_BUS_USB = 10 }; +#define BUS_TYPE_MKE CDROM_BUS_MKE #define BUS_TYPE_IDE CDROM_BUS_ATAPI #define BUS_TYPE_SCSI CDROM_BUS_SCSI #define BUS_TYPE_BOTH -2 @@ -116,107 +125,112 @@ static const struct cdrom_drive_types_s { const int speed; const int inquiry_len; const int caddy; + const int is_dvd; const int transfer_max[4]; } cdrom_drive_types[] = { - { EMU_NAME, "86B_CD", CDV, "86cd", BUS_TYPE_BOTH, 2, -1, 36, 0, { 4, 2, 2, 5 } }, + { EMU_NAME, "86B_CD", CDV, "86cd", BUS_TYPE_BOTH, 2, -1, 36, 0, 0, { 4, 2, 2, 5 } }, /* SCSI-1 / early ATAPI generic - second on purpose so the later variant is the default. */ - { EMU_NAME, "86B_CD", "1.00", "86cd100", BUS_TYPE_BOTH, 1, -1, 36, 1, { 0, -1, -1, -1 } }, + { EMU_NAME, "86B_CD", "1.00", "86cd100", BUS_TYPE_BOTH, 1, -1, 36, 1, 0, { 0, -1, -1, -1 } }, /* No difference from 86BOX CD-ROM, other than name - but enough people have requested such a name to warrant it. */ - { EMU_NAME, "86B_DVD", "4.30", "86dvd", BUS_TYPE_BOTH, 2, -1, 36, 0, { 4, 2, 2, 5 } }, - { "ASUS", "CD-S500/A", "1.41", "asus_500", BUS_TYPE_IDE, 0, 50, 36, 0, { 4, 2, 2, 2 } }, - { "ASUS", "CD-S520/A4", "1.32", "asus_520", BUS_TYPE_IDE, 0, 52, 36, 0, { 4, 2, 2, 2 } }, - { "AZT", "CDA46802I", "1.15", "azt_cda", BUS_TYPE_IDE, 0, 4, 36, 0, { 3, 0, 0, 0 } }, - { "BTC", "CD-ROM BCD36XH", "U1.0", "btc_36xh", BUS_TYPE_IDE, 0, 36, 36, 0, { 4, 2, 2, -1 } }, - { "GOLDSTAR", "CRD-8160B", "3.14", "goldstar", BUS_TYPE_IDE, 0, 16, 36, 0, { 4, 2, 2, -1 } }, + { EMU_NAME, "86B_DVD", "5.00", "86dvd", BUS_TYPE_BOTH, 2, -1, 36, 0, 1, { 4, 2, 2, 5 } }, + { "ASUS", "CD-S500/A", "1.41", "asus_500", BUS_TYPE_IDE, 0, 50, 36, 0, 0, { 4, 2, 2, 2 } }, + { "ASUS", "CD-S520/A4", "1.32", "asus_520", BUS_TYPE_IDE, 0, 52, 36, 0, 0, { 4, 2, 2, 2 } }, + { "AZT", "CDA46802I", "1.15", "azt_cda", BUS_TYPE_IDE, 0, 4, 36, 0, 0, { 3, 0, 0, 0 } }, + { "BTC", "CD-ROM BCD36XH", "U1.0", "btc_36xh", BUS_TYPE_IDE, 0, 36, 36, 0, 0, { 4, 2, 2, -1 } }, + { "GOLDSTAR", "CRD-8160B", "3.14", "goldstar", BUS_TYPE_IDE, 0, 16, 36, 0, 0, { 4, 2, 2, -1 } }, /* TODO: Find an IDENTIFY and/or INQUIRY dump. */ - { "GOLDSTAR", "GCD-R560B", "1.00", "goldstar", BUS_TYPE_IDE, 0, 6, 36, 0, { 4, 2, 2, -1 } }, - { "HITACHI", "CDR-8130", "0020", "hitachi_r8130", BUS_TYPE_IDE, 0, 16, 36, 0, { 4, 2, 2, -1 } }, - { "HITACHI", "GD-7500", "A1 ", "hitachi_7500", BUS_TYPE_IDE, 0, 40, 36, 0, { 4, 2, 2, 2 } }, /* DVD. */ - { "HL-DT-ST", "CD-ROM GCR-8526B", "1.01", "hldtst_8526b", BUS_TYPE_IDE, 0, 52, 36, 0, { 4, 2, 2, 2 } }, - { "HL-DT-ST", "DVDRAM GSA-4160", "A302", "hldtst_4160", BUS_TYPE_IDE, 0, 40, 36, 0, { 4, 2, 2, 2 } }, - { "KENWOOD", "CD-ROM UCR-421", "208E", "kenwood_421", BUS_TYPE_IDE, 0, 72, 36, 0, { 4, 2, 2, 4 } }, + { "GOLDSTAR", "GCD-R560B", "1.00", "goldstar", BUS_TYPE_IDE, 0, 6, 36, 0, 0, { 4, 2, 2, -1 } }, + { "HITACHI", "CDR-8130", "0020", "hitachi_r8130", BUS_TYPE_IDE, 0, 16, 36, 0, 0, { 4, 2, 2, -1 } }, + { "HITACHI", "GD-7500", "A1 ", "hitachi_7500", BUS_TYPE_IDE, 0, 40, 36, 0, 0, { 4, 2, 2, 2 } }, /* DVD. */ + { "HL-DT-ST", "CD-ROM GCR-8526B", "1.01", "hldtst_8526b", BUS_TYPE_IDE, 0, 52, 36, 0, 0, { 4, 2, 2, 2 } }, + { "HL-DT-ST", "DVDRAM GSA-4160", "A302", "hldtst_4160", BUS_TYPE_IDE, 0, 40, 36, 0, 0, { 4, 2, 2, 2 } }, + { "KENWOOD", "CD-ROM UCR-421", "208E", "kenwood_421", BUS_TYPE_IDE, 0, 72, 36, 0, 0, { 4, 2, 2, 4 } }, /* This is a laptop/notebook drive, as is also evident from the name: CRN = Notebook, CRD = Desktop. */ - { "LG", "CD-ROM CRN-8245B", "1.30", "lg_8245b", BUS_TYPE_IDE, 0, 24, 36, 0, { 4, 2, 2, -1 } }, - { "LG", "CD-ROM CRD-8322B", "1.06", "lg_8322b", BUS_TYPE_IDE, 0, 32, 36, 0, { 4, 2, 2, -1 } }, + { "LG", "CD-ROM CRN-8245B", "1.30", "lg_8245b", BUS_TYPE_IDE, 0, 24, 36, 0, 0, { 4, 2, 2, -1 } }, + { "LG", "CD-ROM CRD-8322B", "1.06", "lg_8322b", BUS_TYPE_IDE, 0, 32, 36, 0, 0, { 4, 2, 2, -1 } }, /* Nothing on Google, deduced 48x from the name. */ - { "LITE-ON", "LTN48125S", "1S07", "liteon_48125s", BUS_TYPE_IDE, 0, 48, 36, 0, { 4, 2, 2, 2 } }, + { "LITE-ON", "LTN48125S", "1S07", "liteon_48125s", BUS_TYPE_IDE, 0, 48, 36, 0, 0, { 4, 2, 2, 2 } }, /* Confirmed to be 52x, was the basis for deducing the other one's speed. */ - { "LITE-ON", "LTN526D", "YSR5", "liteon_526d", BUS_TYPE_IDE, 0, 52, 36, 0, { 4, 2, 2, 2 } }, - { "MATSHITA", "CD-ROM CR-583", "1.07", "matshita_583", BUS_TYPE_IDE, 0, 8, 36, 0, { 4, 2, 2, -1 } }, - { "MATSHITA", "CD-ROM CR-585", "Z18P", "matshita_585", BUS_TYPE_IDE, 0, 24, 36, 0, { 4, 2, 2, -1 } }, - { "MATSHITA", "CD-ROM CR-587", "7S13", "matshita_587", BUS_TYPE_IDE, 0, 24, 36, 0, { 4, 2, 2, -1 } }, - { "MATSHITA", "CD-ROM CR-588", "LS15", "matshita_588", BUS_TYPE_IDE, 0, 32, 36, 0, { 4, 2, 2, -1 } }, - { "MATSHITA", "CR-571", "1.0e", "matshita_571", BUS_TYPE_IDE, 0, 2, 36, 0, { 0, -1, -1, -1 } }, - { "MATSHITA", "CR-572", "1.0j", "matshita_572", BUS_TYPE_IDE, 0, 4, 36, 0, { 0, -1, -1, -1 } }, - { "MITSUMI", "CRMC-FX4820T", "D02A", "mitsumi_4820t", BUS_TYPE_IDE, 0, 48, 36, 0, { 4, 2, 2, 2 } }, + { "LITE-ON", "LTN526D", "YSR5", "liteon_526d", BUS_TYPE_IDE, 0, 52, 36, 0, 0, { 4, 2, 2, 2 } }, + { "MATSHITA", "CD-ROM CR-583", "1.07", "matshita_583", BUS_TYPE_IDE, 0, 8, 36, 0, 0, { 4, 2, 2, -1 } }, + { "MATSHITA", "CD-ROM CR-585", "Z18P", "matshita_585", BUS_TYPE_IDE, 0, 24, 36, 0, 0, { 4, 2, 2, -1 } }, + { "MATSHITA", "CD-ROM CR-587", "7S13", "matshita_587", BUS_TYPE_IDE, 0, 24, 36, 0, 0, { 4, 2, 2, -1 } }, + { "MATSHITA", "CD-ROM CR-588", "LS15", "matshita_588", BUS_TYPE_IDE, 0, 32, 36, 0, 0, { 4, 2, 2, -1 } }, + { "MATSHITA", "CR-571", "1.0e", "matshita_571", BUS_TYPE_IDE, 0, 2, 36, 0, 0, { 0, -1, -1, -1 } }, + { "MATSHITA", "CR-572", "1.0j", "matshita_572", BUS_TYPE_IDE, 0, 4, 36, 0, 0, { 0, -1, -1, -1 } }, + { "MITSUMI", "CRMC-FX4820T", "D02A", "mitsumi_4820t", BUS_TYPE_IDE, 0, 48, 36, 0, 0, { 4, 2, 2, 2 } }, /* TODO: Find an IDENTIFY and/or INQUIRY dump. */ - { "MITSUMI", "CRMC-FX810T4", "????", "mitsumi_810t4", BUS_TYPE_IDE, 0, 8, 36, 0, { 4, 2, 2, -1 } }, - { "NEC", "CD-ROM DRIVE:260", "1.00", "nec_260_early", BUS_TYPE_IDE, 1, 2, 36, 1, { 0, -1, -1, -1 } }, - { "NEC", "CD-ROM DRIVE:260", "1.01", "nec_260", BUS_TYPE_IDE, 1, 4, 36, 1, { 0, -1, -1, -1 } }, - { "NEC", "CD-ROM DRIVE:273", "4.20", "nec_273", BUS_TYPE_IDE, 0, 4, 36, 0, { 0, -1, -1, -1 } }, - { "NEC", "CD-ROM DRIVE:280", "1.05", "nec_280_early", BUS_TYPE_IDE, 0, 6, 36, 1, { 4, 2, 2, -1 } }, - { "NEC", "CD-ROM DRIVE:280", "3.08", "nec_280", BUS_TYPE_IDE, 0, 8, 36, 1, { 4, 2, 2, -1 } }, - { "NEC", "CDR-1300A", "1.05", "nec_1300a", BUS_TYPE_IDE, 0, 6, 36, 0, { 4, 2, 2, -1 } }, - { "NEC", "CDR-1900A", "1.00", "nec_1900a", BUS_TYPE_IDE, 0, 32, 36, 0, { 4, 2, 2, -1 } }, - { "PHILIPS", "CD-ROM PCA403CD", "U31P", "philips_403", BUS_TYPE_IDE, 0, 40, 36, 0, { 4, 2, 2, -1 } }, - { "SONY", "CD-ROM CDU76", "1.0i", "sony_76", BUS_TYPE_IDE, 0, 4, 36, 0, { 2, -1, -1, -1 } }, - { "SONY", "CD-ROM CDU311", "3.0h", "sony_311", BUS_TYPE_IDE, 0, 8, 36, 0, { 3, 2, 1, -1 } }, - { "SONY", "CD-ROM CDU5225", "NYS4", "sony_5225", BUS_TYPE_IDE, 0, 52, 36, 0, { 4, 2, 2, 4 } }, - { "TEAC", "CD-516E", "1.0G", "teac_516e", BUS_TYPE_IDE, 0, 16, 36, 0, { 3, 2, 2, -1 } }, - { "TEAC", "CD-524EA", "3.0D", "teac_524ea", BUS_TYPE_IDE, 0, 24, 36, 0, { 3, 2, 2, -1 } }, - { "TEAC", "CD-532E", "2.0A", "teac_532e", BUS_TYPE_IDE, 0, 32, 36, 0, { 3, 2, 2, -1 } }, - { "TOSHIBA", "CD-ROM XM-5302TA", "0305", "toshiba_5302ta", BUS_TYPE_IDE, 0, 4, 96, 0, { 0, -1, -1, -1 } }, - { "TOSHIBA", "CD-ROM XM-5702B", "TA70", "toshiba_5702b", BUS_TYPE_IDE, 0, 12, 96, 0, { 3, 2, 1, -1 } }, - { "TOSHIBA", "CD-ROM XM-6202B", "1512", "toshiba_6202b", BUS_TYPE_IDE, 0, 32, 96, 0, { 4, 2, 2, -1 } }, - { "TOSHIBA", "CD-ROM XM-6402B", "1008", "toshiba_6402b", BUS_TYPE_IDE, 0, 32, 96, 0, { 4, 2, 2, 2 } }, - { "TOSHIBA", "CD-ROM XM-6702B", "1007", "toshiba_6720b", BUS_TYPE_IDE, 0, 48, 96, 0, { 4, 2, 2, 2 } }, - { "TOSHIBA", "DVD-ROM SD-M1802", "1051", "toshiba_m1802", BUS_TYPE_IDE, 0, 48, 96, 0, { 4, 2, 2, 2 } }, - { "CHINON", "CD-ROM CDS-431", "H42 ", "chinon_431", BUS_TYPE_SCSI, 1, 1, 36, 1, { -1, -1, -1, -1 } }, - { "CHINON", "CD-ROM CDX-435", "M62 ", "chinon_435", BUS_TYPE_SCSI, 1, 2, 36, 1, { -1, -1, -1, -1 } }, - { "DEC", "RRD45 (C) DEC", "0436", "dec_45", BUS_TYPE_SCSI, 1, 4, 36, 0, { -1, -1, -1, -1 } }, - { "MATSHITA", "CD-ROM CR-501", "1.0b", "matshita_501", BUS_TYPE_SCSI, 1, 1, 36, 1, { -1, -1, -1, -1 } }, - { "NEC", "CD-ROM DRIVE:25", "1.0a", "nec_25", BUS_TYPE_SCSI, 1, 2, 36, 0, { -1, -1, -1, -1 } }, - { "NEC", "CD-ROM DRIVE:38", "1.00", "nec_38", BUS_TYPE_SCSI, 2, 1, 36, 0, { -1, -1, -1, -1 } }, + { "MITSUMI", "CRMC-FX810T4", "????", "mitsumi_810t4", BUS_TYPE_IDE, 0, 8, 36, 0, 0, { 4, 2, 2, -1 } }, + { "NEC", "CD-ROM DRIVE:260", "1.00", "nec_260_early", BUS_TYPE_IDE, 1, 2, 36, 1, 0, { 0, -1, -1, -1 } }, + { "NEC", "CD-ROM DRIVE:260", "1.01", "nec_260", BUS_TYPE_IDE, 1, 4, 36, 1, 0, { 0, -1, -1, -1 } }, + { "NEC", "CD-ROM DRIVE:273", "4.20", "nec_273", BUS_TYPE_IDE, 0, 4, 36, 0, 0, { 0, -1, -1, -1 } }, + { "NEC", "CD-ROM DRIVE:280", "1.05", "nec_280_early", BUS_TYPE_IDE, 0, 6, 36, 1, 0, { 4, 2, 2, -1 } }, + { "NEC", "CD-ROM DRIVE:280", "3.08", "nec_280", BUS_TYPE_IDE, 0, 8, 36, 1, 0, { 4, 2, 2, -1 } }, + { "NEC", "CDR-1300A", "1.05", "nec_1300a", BUS_TYPE_IDE, 0, 6, 36, 0, 0, { 4, 2, 2, -1 } }, + { "NEC", "CDR-1900A", "1.00", "nec_1900a", BUS_TYPE_IDE, 0, 32, 36, 0, 0, { 4, 2, 2, -1 } }, + { "PHILIPS", "CD-ROM PCA403CD", "U31P", "philips_403", BUS_TYPE_IDE, 0, 40, 36, 0, 0, { 4, 2, 2, -1 } }, + { "SONY", "CD-ROM CDU76", "1.0i", "sony_76", BUS_TYPE_IDE, 0, 4, 36, 0, 0, { 2, -1, -1, -1 } }, + { "SONY", "CD-ROM CDU311", "3.0h", "sony_311", BUS_TYPE_IDE, 0, 8, 36, 0, 0, { 3, 2, 1, -1 } }, + { "SONY", "CD-ROM CDU5225", "NYS4", "sony_5225", BUS_TYPE_IDE, 0, 52, 36, 0, 0, { 4, 2, 2, 4 } }, + { "TEAC", "CD-516E", "1.0G", "teac_516e", BUS_TYPE_IDE, 0, 16, 36, 0, 0, { 3, 2, 2, -1 } }, + { "TEAC", "CD-524EA", "3.0D", "teac_524ea", BUS_TYPE_IDE, 0, 24, 36, 0, 0, { 3, 2, 2, -1 } }, + { "TEAC", "CD-532E", "2.0A", "teac_532e", BUS_TYPE_IDE, 0, 32, 36, 0, 0, { 3, 2, 2, -1 } }, + { "TOSHIBA", "CD-ROM XM-5302TA", "0305", "toshiba_5302ta", BUS_TYPE_IDE, 0, 4, 96, 0, 0, { 0, -1, -1, -1 } }, + { "TOSHIBA", "CD-ROM XM-5702B", "TA70", "toshiba_5702b", BUS_TYPE_IDE, 0, 12, 96, 0, 0, { 3, 2, 1, -1 } }, + { "TOSHIBA", "CD-ROM XM-6202B", "1512", "toshiba_6202b", BUS_TYPE_IDE, 0, 32, 96, 0, 0, { 4, 2, 2, -1 } }, + { "TOSHIBA", "CD-ROM XM-6402B", "1008", "toshiba_6402b", BUS_TYPE_IDE, 0, 32, 96, 0, 0, { 4, 2, 2, 2 } }, + { "TOSHIBA", "CD-ROM XM-6702B", "1007", "toshiba_6720b", BUS_TYPE_IDE, 0, 48, 96, 0, 0, { 4, 2, 2, 2 } }, + { "TOSHIBA", "DVD-ROM SD-M1802", "1051", "toshiba_m1802", BUS_TYPE_IDE, 0, 48, 96, 0, 1, { 4, 2, 2, 2 } }, + { "CHINON", "CD-ROM CDS-431", "H42 ", "chinon_431", BUS_TYPE_SCSI, 1, 1, 36, 1, 0, { -1, -1, -1, -1 } }, + { "CHINON", "CD-ROM CDX-435", "M62 ", "chinon_435", BUS_TYPE_SCSI, 1, 2, 36, 1, 0, { -1, -1, -1, -1 } }, + { "DEC", "RRD45 (C) DEC", "0436", "dec_45", BUS_TYPE_SCSI, 1, 4, 36, 0, 0, { -1, -1, -1, -1 } }, + { "MATSHITA", "CD-ROM CR-501", "1.0b", "matshita_501", BUS_TYPE_SCSI, 1, 1, 36, 1, 0, { -1, -1, -1, -1 } }, + { "NEC", "CD-ROM DRIVE:25", "1.0a", "nec_25", BUS_TYPE_SCSI, 1, 2, 36, 0, 0, { -1, -1, -1, -1 } }, + { "NEC", "CD-ROM DRIVE:38", "1.00", "nec_38", BUS_TYPE_SCSI, 2, 1, 36, 0, 0, { -1, -1, -1, -1 } }, /* The speed of the following two is guesswork based on the CDR-74. */ - { "NEC", "CD-ROM DRIVE:75", "1.03", "nec_75", BUS_TYPE_SCSI, 1, 1, 36, 1, { -1, -1, -1, -1 } }, - { "NEC", "CD-ROM DRIVE:77", "1.06", "nec_77", BUS_TYPE_SCSI, 1, 1, 36, 1, { -1, -1, -1, -1 } }, - { "NEC", "CD-ROM DRIVE:211", "1.00", "nec_211", BUS_TYPE_SCSI, 2, 3, 36, 0, { -1, -1, -1, -1 } }, + { "NEC", "CD-ROM DRIVE:75", "1.03", "nec_75", BUS_TYPE_SCSI, 1, 1, 36, 1, 0, { -1, -1, -1, -1 } }, + { "NEC", "CD-ROM DRIVE:77", "1.06", "nec_77", BUS_TYPE_SCSI, 1, 1, 36, 1, 0, { -1, -1, -1, -1 } }, + { "NEC", "CD-ROM DRIVE:211", "1.00", "nec_211", BUS_TYPE_SCSI, 2, 3, 36, 0, 0, { -1, -1, -1, -1 } }, /* The speed of the following two is guesswork based on the CDR-400. */ - { "NEC", "CD-ROM DRIVE:464", "1.05", "nec_464", BUS_TYPE_SCSI, 2, 3, 36, 0, { -1, -1, -1, -1 } }, + { "NEC", "CD-ROM DRIVE:464", "1.05", "nec_464", BUS_TYPE_SCSI, 2, 3, 36, 0, 0, { -1, -1, -1, -1 } }, /* The speed of the following two is guesswork based on the name. */ - { "ShinaKen", "CD-ROM DM-3x1S", "1.04", "shinaken_3x1s", BUS_TYPE_SCSI, 1, 3, 36, 0, { -1, -1, -1, -1 } }, - { "SONY", "CD-ROM CDU-541", "1.0i", "sony_541", BUS_TYPE_SCSI, 1, 1, 36, 1, { -1, -1, -1, -1 } }, - { "SONY", "CD-ROM CDU-561", "1.8k", "sony_561", BUS_TYPE_SCSI, 2, 2, 36, 1, { -1, -1, -1, -1 } }, - { "SONY", "CD-ROM CDU-76S", "1.00", "sony_76s", BUS_TYPE_SCSI, 2, 4, 36, 0, { -1, -1, -1, -1 } }, - { "PHILIPS", "CDD2600", "1.07", "philips_2600", BUS_TYPE_SCSI, 2, 6, 36, 0, { -1, -1, -1, -1 } }, + { "ShinaKen", "CD-ROM DM-3x1S", "1.04", "shinaken_3x1s", BUS_TYPE_SCSI, 1, 3, 36, 0, 0, { -1, -1, -1, -1 } }, + { "SONY", "CD-ROM CDU-541", "1.0i", "sony_541", BUS_TYPE_SCSI, 1, 1, 36, 1, 0, { -1, -1, -1, -1 } }, + { "SONY", "CD-ROM CDU-561", "1.8k", "sony_561", BUS_TYPE_SCSI, 2, 2, 36, 1, 0, { -1, -1, -1, -1 } }, + { "SONY", "CD-ROM CDU-76S", "1.00", "sony_76s", BUS_TYPE_SCSI, 2, 4, 36, 0, 0, { -1, -1, -1, -1 } }, + { "PHILIPS", "CDD2600", "1.07", "philips_2600", BUS_TYPE_SCSI, 2, 6, 36, 0, 0, { -1, -1, -1, -1 } }, /* NOTE: The real thing is a CD changer drive! */ - { "PIONEER", "CD-ROM DRM-604X", "2403", "pioneer_604x", BUS_TYPE_SCSI, 2, 4, 47, 0, { -1, -1, -1, -1 } }, - { "PLEXTOR", "CD-ROM PX-32TS", "1.03", "plextor_32ts", BUS_TYPE_SCSI, 2, 32, 36, 0, { -1, -1, -1, -1 } }, + { "PIONEER", "CD-ROM DRM-604X", "2403", "pioneer_604x", BUS_TYPE_SCSI, 2, 4, 47, 0, 0, { -1, -1, -1, -1 } }, + { "PLEXTOR", "CD-ROM PX-32TS", "1.03", "plextor_32ts", BUS_TYPE_SCSI, 2, 32, 36, 0, 0, { -1, -1, -1, -1 } }, /* The speed of the following two is guesswork based on the R55S. */ - { "TEAC", "CD 50", "1.00", "teac_50", BUS_TYPE_SCSI, 2, 4, 36, 1, { -1, -1, -1, -1 } }, - { "TEAC", "CD-ROM R55S", "1.0R", "teac_55s", BUS_TYPE_SCSI, 2, 4, 36, 0, { -1, -1, -1, -1 } }, + { "TEAC", "CD 50", "1.00", "teac_50", BUS_TYPE_SCSI, 2, 4, 36, 1, 0, { -1, -1, -1, -1 } }, + { "TEAC", "CD-ROM R55S", "1.0R", "teac_55s", BUS_TYPE_SCSI, 2, 4, 36, 0, 0, { -1, -1, -1, -1 } }, /* Texel is Plextor according to Plextor's own EU website. */ - { "TEXEL", "CD-ROM DM-3024", "1.00", "texel_3024", BUS_TYPE_SCSI, 2, 2, 36, 1, { -1, -1, -1, -1 } }, + { "TEXEL", "CD-ROM DM-3024", "1.00", "texel_3024", BUS_TYPE_SCSI, 2, 2, 36, 1, 0, { -1, -1, -1, -1 } }, /* Unusual 2.23x according to Google, I'm rounding it upwards to 3x. Assumed caddy based on the DM-3024. */ - { "TEXEL", "CD-ROM DM-3028", "1.06", "texel_3028", BUS_TYPE_SCSI, 2, 3, 36, 1, { -1, -1, -1, -1 } }, /* Caddy. */ + { "TEXEL", "CD-ROM DM-3028", "1.06", "texel_3028", BUS_TYPE_SCSI, 2, 3, 36, 1, 0, { -1, -1, -1, -1 } }, /* Caddy. */ /* The characteristics are a complete guesswork because I can't find this one on Google. Also, INQUIRY length is always 96 on these Toshiba drives. */ - { "TOSHIBA", "CD-ROM DRIVE:XM", "3433", "toshiba_xm", BUS_TYPE_SCSI, 2, 2, 96, 0, { -1, -1, -1, -1 } }, /* Tray. */ - { "TOSHIBA", "CD-ROM XM-3201B", "3232", "toshiba_3201b", BUS_TYPE_SCSI, 1, 1, 96, 1, { -1, -1, -1, -1 } }, /* Caddy. */ - { "TOSHIBA", "CD-ROM XM-3301TA", "0272", "toshiba_3301ta", BUS_TYPE_SCSI, 2, 2, 96, 0, { -1, -1, -1, -1 } }, /* Tray. */ - { "TOSHIBA", "CD-ROM XM-5701TA", "3136", "toshiba_5701a", BUS_TYPE_SCSI, 2, 12, 96, 0, { -1, -1, -1, -1 } }, /* Tray. */ - { "TOSHIBA", "DVD-ROM SD-M1401", "1008", "toshiba_m1401", BUS_TYPE_SCSI, 2, 40, 96, 0, { -1, -1, -1, -1 } }, /* Tray. */ - { "", "", "", "", BUS_TYPE_NONE, 0, -1, 0, 0, { -1, -1, -1, -1 } } + { "TOSHIBA", "CD-ROM DRIVE:XM", "3433", "toshiba_xm", BUS_TYPE_SCSI, 2, 2, 96, 0, 0, { -1, -1, -1, -1 } }, /* Tray. */ + { "TOSHIBA", "CD-ROM XM-3201B", "3232", "toshiba_3201b", BUS_TYPE_SCSI, 1, 1, 96, 1, 0, { -1, -1, -1, -1 } }, /* Caddy. */ + { "TOSHIBA", "CD-ROM XM-3301TA", "0272", "toshiba_3301ta", BUS_TYPE_SCSI, 2, 2, 96, 0, 0, { -1, -1, -1, -1 } }, /* Tray. */ + { "TOSHIBA", "CD-ROM XM-5701TA", "3136", "toshiba_5701a", BUS_TYPE_SCSI, 2, 12, 96, 0, 0, { -1, -1, -1, -1 } }, /* Tray. */ + { "TOSHIBA", "DVD-ROM SD-M1401", "1008", "toshiba_m1401", BUS_TYPE_SCSI, 2, 40, 96, 0, 1, { -1, -1, -1, -1 } }, /* Tray. */ + { "MATSHITA", "CR-562", "0.75", "cr562", BUS_TYPE_MKE , 0, 2, 0, 0, 0, { -1, -1, -1, -1 } }, + { "MATSHITA", "CR-562", "0.80", "cr562_080", BUS_TYPE_MKE , 0, 2, 0, 0, 0, { -1, -1, -1, -1 } }, + { "MATSHITA", "CR-563", "0.75", "cr563", BUS_TYPE_MKE , 0, 2, 0, 0, 0, { -1, -1, -1, -1 } }, + { "MATSHITA", "CR-563", "0.80", "cr563_080", BUS_TYPE_MKE , 0, 2, 0, 0, 0, { -1, -1, -1, -1 } }, + { "", "", "", "", BUS_TYPE_NONE, 0, -1, 0, 0, 0, { -1, -1, -1, -1 } } }; /* To shut up the GCC compilers. */ @@ -283,7 +297,7 @@ typedef struct cdrom { union { uint8_t res; uint8_t res0; /* Reserved for other ID's. */ - uint8_t res1; + uint8_t mke_channel; uint8_t ide_channel; uint8_t scsi_device_id; }; @@ -351,6 +365,13 @@ typedef struct cdrom { /* Only used on Windows hosts for disc change notifications. */ uint8_t host_letter; + uint8_t mode2; + + uint8_t _F_LUT[_LUT_SIZE]; + uint8_t _B_LUT[_LUT_SIZE]; + + uint8_t p_parity[172]; + uint8_t q_parity[104]; } cdrom_t; extern cdrom_t cdrom[CDROM_NUM]; @@ -374,6 +395,7 @@ extern void cdrom_get_model(const int type, char *name, const int id) extern char *cdrom_get_revision(const int type); extern int cdrom_get_scsi_std(const int type); extern int cdrom_is_early(const int type); +extern int cdrom_is_dvd(const int type); extern int cdrom_is_generic(const int type); extern int cdrom_is_caddy(const int type); extern int cdrom_get_speed(const int type); @@ -381,6 +403,7 @@ extern int cdrom_get_inquiry_len(const int type); extern int cdrom_has_dma(const int type); extern int cdrom_get_transfer_max(const int type, const int mode); extern int cdrom_get_type_count(void); +extern void cdrom_generate_name_mke(const int type, char *name); extern void cdrom_get_identify_model(const int type, char *name, const int id); extern void cdrom_get_name(const int type, char *name); extern char *cdrom_get_internal_name(const int type); @@ -448,6 +471,12 @@ extern int cdrom_is_empty(const uint8_t id); extern void cdrom_eject(const uint8_t id); extern void cdrom_reload(const uint8_t id); +extern void cdrom_compute_ecc_block(cdrom_t *dev, uint8_t *parity, const uint8_t *data, + uint32_t major_count, uint32_t minor_count, + uint32_t major_mult, uint32_t minor_inc, int m2f1); +extern unsigned long cdrom_crc32(unsigned long crc, const unsigned char *buf, + size_t len); + extern int cdrom_assigned_letters; #ifdef __cplusplus diff --git a/src/include/86box/cdrom_mitsumi.h b/src/include/86box/cdrom_mitsumi.h index 0b8a3a250..01c549c0b 100644 --- a/src/include/86box/cdrom_mitsumi.h +++ b/src/include/86box/cdrom_mitsumi.h @@ -8,11 +8,11 @@ * * Mitsumi CD-ROM emulation for the ISA bus. * - * - * * Authors: Miran Grca, + * Jasmine Iwanek, * - * Copyright 2022 Miran Grca. + * Copyright 2022 Miran Grca. + * Copyright 2024-2025 Jasmine Iwanek. */ #ifndef CDROM_MITSUMI_H #define CDROM_MITSUMI_H diff --git a/src/include/86box/cdrom_mke.h b/src/include/86box/cdrom_mke.h new file mode 100644 index 000000000..659e084e3 --- /dev/null +++ b/src/include/86box/cdrom_mke.h @@ -0,0 +1,24 @@ +/* + * 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. + * + * Panasonic/MKE CD-ROM emulation for the ISA bus. + * + * Authors: Miran Grca, + * Cacodemon345 + * + * Copyright 2022-2025 Miran Grca. + * Copyright 2025 Cacodemon345. + */ + +#ifndef CDROM_MKE_H +#define CDROM_MKE_H + +extern const device_t mke_cdrom_device; +extern const device_t mke_cdrom_noncreative_device; + +#endif /*CDROM_MKE_H*/ diff --git a/src/include/86box/chipset.h b/src/include/86box/chipset.h index 7ee8182ea..9cd037d1f 100644 --- a/src/include/86box/chipset.h +++ b/src/include/86box/chipset.h @@ -42,6 +42,8 @@ extern const device_t amd640_device; extern const device_t isa486c_device; /* Compaq */ +extern const device_t compaq_device; + extern const device_t compaq_386_device; extern const device_t compaq_genoa_device; @@ -64,6 +66,9 @@ extern const device_t cs4031_device; extern const device_t gc100_device; extern const device_t gc100a_device; +/* GRiDcase */ +extern const device_t grid1520_device; + /* Headland */ extern const device_t headland_gc10x_device; extern const device_t headland_gc113_device; @@ -114,6 +119,10 @@ extern const device_t slc90e66_device; extern const device_t ioapic_device; +/* VTech */ +extern const device_t laserxt_device; +extern const device_t lxt3_device; + /* Olivetti */ extern const device_t olivetti_eva_device; @@ -126,6 +135,7 @@ extern const device_t opti481_device; extern const device_t opti493_device; extern const device_t opti495slc_device; extern const device_t opti495sx_device; +extern const device_t opti496_device; extern const device_t opti498_device; extern const device_t opti499_device; extern const device_t opti601_device; @@ -138,6 +148,12 @@ extern const device_t opti895_device; extern const device_t opti5x7_device; extern const device_t opti5x7_pci_device; +/* Philips */ +extern const device_t philips_device; + +/* Sanyo */ +extern const device_t sanyo_device; + /* SiS */ extern const device_t rabbit_device; extern const device_t sis_85c401_device; @@ -212,4 +228,8 @@ extern const device_t nec_mate_unk_device; extern const device_t phoenix_486_jumper_device; extern const device_t phoenix_486_jumper_pci_device; + +extern const device_t radisys_config_device; + +extern const device_t zenith_scratchpad_device; #endif /*EMU_CHIPSET_H*/ diff --git a/src/include/86box/config.h b/src/include/86box/config.h index 34447266b..507c506f0 100644 --- a/src/include/86box/config.h +++ b/src/include/86box/config.h @@ -133,11 +133,13 @@ typedef struct config_t { /* Other removable devices category */ storage_cfg_t cdrom[CDROM_NUM]; /* CD-ROM drives */ - storage_cfg_t rdisk[ZIP_NUM]; /* Removable disk drives */ + storage_cfg_t rdisk[RDISK_NUM]; /* Removable disk drives */ } config_t; #endif +extern void config_load_global(void); extern void config_load(void); +extern void config_save_global(void); extern void config_save(void); #ifdef EMU_INI_H diff --git a/src/include/86box/fdc.h b/src/include/86box/fdc.h index c98a03f67..cd1e58db7 100644 --- a/src/include/86box/fdc.h +++ b/src/include/86box/fdc.h @@ -223,6 +223,11 @@ extern uint8_t fdc_get_diswr(fdc_t *fdc); extern void fdc_set_diswr(fdc_t *fdc, uint8_t diswr); extern uint8_t fdc_get_swap(fdc_t *fdc); extern void fdc_set_swap(fdc_t *fdc, uint8_t swap); +extern void fdc_set_flags(fdc_t *fdc, int flags); +extern void fdc_clear_flags(fdc_t *fdc, int flags); +extern void fdc_set_fdd_changed(int drive, int changed); +extern uint8_t fdc_get_fdd_changed(int drive); +extern uint8_t fdc_get_shadow(fdc_t *fdc); extern void fdc_finishcompare(fdc_t *fdc, int satisfying); extern void fdc_finishread(fdc_t *fdc); diff --git a/src/include/86box/gameport.h b/src/include/86box/gameport.h index 655eea942..f9d7810e0 100644 --- a/src/include/86box/gameport.h +++ b/src/include/86box/gameport.h @@ -51,8 +51,9 @@ #define GAMEPORT_6ADDR 0x060000 #define GAMEPORT_8ADDR 0x080000 #define GAMEPORT_SIO 0x1000000 +#define GAMEPORT_PNPROM 0x2000000 -typedef struct joystick_if_t { +typedef struct joystick_t { const char *name; const char *internal_name; @@ -70,9 +71,9 @@ typedef struct joystick_if_t { const char *axis_names[MAX_JOY_AXES]; const char *button_names[MAX_JOY_BUTTONS]; const char *pov_names[MAX_JOY_POVS]; -} joystick_if_t; +} joystick_t; -typedef struct plat_joystick_t { +typedef struct plat_joystick_state_t { char name[260]; int a[MAX_JOY_AXES]; @@ -97,9 +98,9 @@ typedef struct plat_joystick_t { int nr_axes; int nr_buttons; int nr_povs; -} plat_joystick_t; +} plat_joystick_state_t; -typedef struct joystick_t { +typedef struct joystick_state_t { int axis[MAX_JOY_AXES]; int button[MAX_JOY_BUTTONS]; int pov[MAX_JOY_POVS]; @@ -108,7 +109,7 @@ typedef struct joystick_t { int axis_mapping[MAX_JOY_AXES]; int button_mapping[MAX_JOY_BUTTONS]; int pov_mapping[MAX_JOY_POVS][2]; -} joystick_t; +} joystick_state_t; extern device_t game_ports[GAMEPORT_MAX]; @@ -118,7 +119,7 @@ extern "C" { extern int gameport_available(int port); #ifdef EMU_DEVICE_H -extern const device_t *gameport_getdevice(int port); +extern const device_t *gameport_get_device(int port); #endif extern int gameport_has_config(int port); extern const char *gameport_get_internal_name(int port); @@ -126,6 +127,7 @@ extern int gameport_get_from_internal_name(const char *str); #ifdef EMU_DEVICE_H extern const device_t gameport_device; +extern const device_t gameport_200_device; extern const device_t gameport_201_device; extern const device_t gameport_203_device; extern const device_t gameport_205_device; @@ -144,16 +146,16 @@ extern const device_t gameport_sio_1io_device; extern const device_t *standalone_gameport_type; #endif -extern int gameport_instance_id; -extern plat_joystick_t plat_joystick_state[MAX_PLAT_JOYSTICKS]; -extern joystick_t joystick_state[GAMEPORT_MAX][MAX_JOYSTICKS]; -extern int joysticks_present; +extern int gameport_instance_id; +extern plat_joystick_state_t plat_joystick_state[MAX_PLAT_JOYSTICKS]; +extern joystick_state_t joystick_state[GAMEPORT_MAX][MAX_JOYSTICKS]; +extern int joysticks_present; -extern int joystick_type; +extern int joystick_type[GAMEPORT_MAX]; extern void joystick_init(void); extern void joystick_close(void); -extern void joystick_process(void); +extern void joystick_process(uint8_t gp); extern const char *joystick_get_name(int js); extern const char *joystick_get_internal_name(int js); @@ -166,32 +168,32 @@ extern const char *joystick_get_axis_name(int js, int id); extern const char *joystick_get_button_name(int js, int id); extern const char *joystick_get_pov_name(int js, int id); -extern void gameport_update_joystick_type(void); +extern void gameport_update_joystick_type(uint8_t gp); extern void gameport_remap(void *priv, uint16_t address); extern void *gameport_add(const device_t *gameport_type); -extern const joystick_if_t joystick_2axis_2button; -extern const joystick_if_t joystick_2button_gamepad; -extern const joystick_if_t joystick_2button_flight_yoke; -extern const joystick_if_t joystick_2axis_4button; -extern const joystick_if_t joystick_4button_gamepad; -extern const joystick_if_t joystick_4button_flight_yoke; -extern const joystick_if_t joystick_3axis_2button; -extern const joystick_if_t joystick_2button_yoke_throttle; -extern const joystick_if_t joystick_3axis_4button; -extern const joystick_if_t joystick_4button_yoke_throttle; -extern const joystick_if_t joystick_win95_steering_wheel; -extern const joystick_if_t joystick_4axis_4button; -extern const joystick_if_t joystick_2axis_6button; -extern const joystick_if_t joystick_2axis_8button; +extern const joystick_t joystick_2axis_2button; +extern const joystick_t joystick_2button_gamepad; +extern const joystick_t joystick_2button_flight_yoke; +extern const joystick_t joystick_2axis_4button; +extern const joystick_t joystick_4button_gamepad; +extern const joystick_t joystick_4button_flight_yoke; +extern const joystick_t joystick_3axis_2button; +extern const joystick_t joystick_2button_yoke_throttle; +extern const joystick_t joystick_3axis_4button; +extern const joystick_t joystick_4button_yoke_throttle; +extern const joystick_t joystick_win95_steering_wheel; +extern const joystick_t joystick_4axis_4button; +extern const joystick_t joystick_2axis_6button; +extern const joystick_t joystick_2axis_8button; -extern const joystick_if_t joystick_ch_flightstick_pro; -extern const joystick_if_t joystick_ch_flightstick_pro_ch_pedals; +extern const joystick_t joystick_ch_flightstick_pro; +extern const joystick_t joystick_ch_flightstick_pro_ch_pedals; -extern const joystick_if_t joystick_sw_pad; +extern const joystick_t joystick_sw_pad; -extern const joystick_if_t joystick_tm_fcs; -extern const joystick_if_t joystick_tm_fcs_rcs; +extern const joystick_t joystick_tm_fcs; +extern const joystick_t joystick_tm_fcs_rcs; #ifdef __cplusplus } diff --git a/src/include/86box/hdc.h b/src/include/86box/hdc.h index ca020b4b2..26fed9b0a 100644 --- a/src/include/86box/hdc.h +++ b/src/include/86box/hdc.h @@ -27,7 +27,7 @@ #define HDC_NONE 0 #define HDC_INTERNAL 1 -#define HDC_MAX 2 +#define HDC_MAX 4 extern int hdc_current[HDC_MAX]; @@ -79,6 +79,9 @@ extern const device_t ide_cmd646_device; /* CMD PCI-646 * extern const device_t ide_cmd646_legacy_only_device; /* CMD PCI-646 (Legacy Mode Only) */ extern const device_t ide_cmd646_single_channel_device; /* CMD PCI-646 (Only primary channel) */ extern const device_t ide_cmd646_ter_qua_device; /* CMD PCI-646 (Tertiary and quaternary channels) */ +extern const device_t ide_cmd648_ter_qua_device; /* CMD PCI-648 (Tertiary and quaternary channels) */ +extern const device_t ide_cmd648_ter_qua_onboard_device; /* CMD PCI-648 (Tertiary and quaternary channels, on-board) */ +extern const device_t ide_cmd649_ter_qua_device; /* CMD PCI-649 (Tertiary and quaternary channels) */ extern const device_t ide_opti611_vlb_device; /* OPTi 82c611/611A VLB */ extern const device_t ide_opti611_vlb_sec_device; /* OPTi 82c611/611A VLB (Secondary channel) */ @@ -102,8 +105,11 @@ extern const device_t ide_qua_pnp_device; extern const device_t mcide_device; -extern const device_t xta_wdxt150_device; /* xta_wdxt150 */ -extern const device_t xta_hd20_device; /* EuroPC internal */ +extern const device_t xta_wdxt150_device; /* xta_wdxt150 */ +extern const device_t xta_wdxt150_pc3086_device; /* xta_wdxt150 (PC3086) */ +extern const device_t xta_hd20_device; /* EuroPC internal */ +extern const device_t xta_st50x_device; /* ST-50X */ +extern const device_t xta_st50x_pc5086_device; /* ST-50X (PC5086) */ extern const device_t xtide_device; /* xtide_xt */ extern const device_t xtide_at_device; /* xtide_at */ @@ -116,10 +122,12 @@ extern void hdc_init(void); extern void hdc_reset(void); extern const char *hdc_get_internal_name(int hdc); -extern int hdc_get_from_internal_name(char *s); +extern int hdc_get_from_internal_name(const char *s); extern int hdc_has_config(int hdc); extern const device_t *hdc_get_device(int hdc); extern int hdc_get_flags(int hdc); extern int hdc_available(int hdc); +extern void xta_handler(void *priv, int set); + #endif /*EMU_HDC_H*/ diff --git a/src/include/86box/hdc_ide.h b/src/include/86box/hdc_ide.h index 41fb7703e..3fd589f9c 100644 --- a/src/include/86box/hdc_ide.h +++ b/src/include/86box/hdc_ide.h @@ -178,9 +178,6 @@ enum { TIMINGS_PIO_FC = 2 }; -extern int ide_ter_enabled; -extern int ide_qua_enabled; - #ifdef SCSI_DEVICE_H extern ide_t *ide_get_drive(int ch); extern void ide_irq(ide_t *ide, int set, int log); @@ -230,6 +227,8 @@ extern void ide_padstr8(uint8_t *buf, int buf_size, const char *src); extern uint8_t ide_read_ali_75(void); extern uint8_t ide_read_ali_76(void); +extern void ide_hard_reset(void); + /* Legacy #define's. */ #define ide_irq_raise(ide) ide_irq(ide, 1, 1) #define ide_irq_lower(ide) ide_irq(ide, 0, 1) diff --git a/src/include/86box/hdc_ide_sff8038i.h b/src/include/86box/hdc_ide_sff8038i.h index 79075b8b2..901cdb325 100644 --- a/src/include/86box/hdc_ide_sff8038i.h +++ b/src/include/86box/hdc_ide_sff8038i.h @@ -56,6 +56,11 @@ typedef struct sff8038i_t int irq_level; int irq_pin; int pci_irq_line; + + uint8_t (*ven_write)(uint16_t port, uint8_t val, void *priv); + uint8_t (*ven_read)(uint16_t port, uint8_t val, void *priv); + + void *priv; } sff8038i_t; extern const device_t sff8038i_device; @@ -78,4 +83,7 @@ extern void sff_set_irq_pin(sff8038i_t *dev, int irq_pin); extern void sff_set_irq_level(sff8038i_t *dev, int irq_level); extern void sff_set_mirq(sff8038i_t *dev, uint8_t mirq); +extern void sff_set_ven_handlers(sff8038i_t *dev, uint8_t (*ven_write)(uint16_t port, uint8_t val, void *priv), + uint8_t (*ven_read)(uint16_t port, uint8_t val, void *priv), void *priv); + #endif /*EMU_HDC_IDE_SFF8038I_H*/ diff --git a/src/include/86box/hdd.h b/src/include/86box/hdd.h index 53514740d..597059e4f 100644 --- a/src/include/86box/hdd.h +++ b/src/include/86box/hdd.h @@ -67,14 +67,15 @@ enum { }; #else enum { - HDD_BUS_DISABLED = 0, - HDD_BUS_MFM = 1, - HDD_BUS_XTA = 2, - HDD_BUS_ESDI = 3, - HDD_BUS_IDE = 4, - HDD_BUS_ATAPI = 5, - HDD_BUS_SCSI = 6, - HDD_BUS_USB = 7 + HDD_BUS_DISABLED = 0, + HDD_BUS_MFM = 1, + HDD_BUS_XTA = 2, + HDD_BUS_ESDI = 3, + HDD_BUS_LPT = 6, + HDD_BUS_IDE = 7, + HDD_BUS_ATAPI = 8, + HDD_BUS_SCSI = 9, + HDD_BUS_USB = 10 }; #endif diff --git a/src/include/86box/keyboard.h b/src/include/86box/keyboard.h index 62938fae4..8220799fc 100644 --- a/src/include/86box/keyboard.h +++ b/src/include/86box/keyboard.h @@ -22,6 +22,21 @@ #ifndef EMU_KEYBOARD_H #define EMU_KEYBOARD_H +#define FLAG_AT 0x00 /* dev is AT */ +#define FLAG_PS2_KBD 0x10 /* dev is AT or PS/2 */ +#define FLAG_AX 0x08 /* dev is AX */ +#define FLAG_TYPE_MASK 0x07 /* mask for type */ + +enum { + KBD_83_KEY = 0, + KBD_84_KEY, + KBD_101_KEY, + KBD_102_KEY, + KBD_JIS, + KBD_KSC, + KBD_ABNT2 +}; + enum { DEV_KBD = 0, DEV_AUX = 1 @@ -38,6 +53,15 @@ enum { DEV_STATE_MAIN_WANT_EXECUTE_BAT = 7 }; +enum { + KEYBOARD_TYPE_INTERNAL = 0, + KEYBOARD_TYPE_PC_XT, + KEYBOARD_TYPE_AT, + KEYBOARD_TYPE_AX, + KEYBOARD_TYPE_PS2, + KEYBOARD_TYPE_PS55 +}; + /* Used by the AT / PS/2 keyboard controller, common device, keyboard, and mouse. */ typedef struct kbc_at_port_t { uint8_t wantcmd; @@ -94,106 +118,49 @@ typedef struct scancode { const uint8_t brk[4]; } scancode; -#define STATE_SHIFT_MASK 0x22 -#define STATE_RSHIFT 0x20 -#define STATE_LSHIFT 0x02 +#define STATE_SHIFT_MASK 0x22 +#define STATE_RSHIFT 0x20 +#define STATE_LSHIFT 0x02 -#define FAKE_LSHIFT_ON 0x100 -#define FAKE_LSHIFT_OFF 0x101 -#define LSHIFT_ON 0x102 -#define LSHIFT_OFF 0x103 -#define RSHIFT_ON 0x104 -#define RSHIFT_OFF 0x105 +#define FAKE_LSHIFT_ON 0x100 +#define FAKE_LSHIFT_OFF 0x101 +#define LSHIFT_ON 0x102 +#define LSHIFT_OFF 0x103 +#define RSHIFT_ON 0x104 +#define RSHIFT_OFF 0x105 -/* KBC #define's */ -/* IBM-style controllers */ -#define KBC_IBM_PC_XT 0x0000 /* IBM PC/XT */ -#define KBC_IBM_PCJR 0x0001 /* IBM PCjr */ -#define KBC_IBM_TYPE_1 0x0002 /* IBM AT / PS/2 Type 1 */ -#define KBC_IBM_TYPE_2 0x0003 /* IBM PS/2 Type 2 */ -#define KBC_AMI_ACCESS_METHODS 0x0004 /* Access Methods AMI */ -#define KBC_JU_JET 0x0005 /* Ju-Jet */ -/* OEM proprietary */ -#define KBC_TANDY 0x0011 /* Tandy 1000/1000HX */ -#define KBC_TANDY_SL2 0x0012 /* Tandy 1000SL2 */ -#define KBC_AMSTRAD 0x0013 /* Amstrad */ -#define KBC_OLIVETTI_XT 0x0014 /* Olivetti XT */ -#define KBC_OLIVETTI 0x0015 /* Olivetti AT */ -#define KBC_TOSHIBA 0x0016 /* Toshiba AT */ -#define KBC_COMPAQ 0x0017 /* Compaq */ -#define KBC_NCR 0x0018 /* NCR */ -#define KBC_QUADTEL 0x0019 /* Quadtel */ -#define KBC_SIEMENS 0x001A /* Siemens */ -/* Phoenix MultiKey/42 */ -#define PHOENIX_MK42_105 0x0521 /* Phoenix MultiKey/42 1.05 */ -#define PHOENIX_MK42_129 0x2921 /* Phoenix MultiKey/42 1.29 */ -#define PHOENIX_MK42_138 0x3821 /* Phoenix MultiKey/42 1.38 */ -#define PHOENIX_MK42_140 0x3821 /* Phoenix MultiKey/42 1.40 */ -#define PHOENIX_MKC42_214 0x1422 /* Phoenix MultiKey/C42 2.14 */ -#define PHOENIX_MK42I_416 0x1624 /* Phoenix MultiKey/42i 4.16 */ -#define PHOENIX_MK42I_419 0x1924 /* Phoenix MultiKey/42i 4.19 */ -/* AMI 0x3x */ -#define KBC_ACER_V30 0x0030 /* Acer (0xA1 returns nothing, 0xAF returns 0x00) */ -#define KBC_AMI_MEGAKEY_SUPER_IO 0x0035 /* AMI '5' MegaKey 1994 NSC (and SM(S)C?) */ -#define KBC_AMI_8 0x0038 /* AMI '8' */ -/* AMI 0x4x */ -#define KBC_AMI_B 0x0042 /* AMI 'B' */ -#define KBC_AMI_D 0x0044 /* AMI 'D' */ -#define KBC_AMI_E 0x0045 /* AMI 'E' */ -#define KBC_AMIKEY 0x0046 /* AMI 'F'/AMIKEY */ -#define KBC_AMIKEY_2 0x0048 /* AMI 'H'/AMIEY-2 */ -#define KBC_MR 0x004D /* MR 'M' - Temporary classification until we get a dump */ -/* AMI 0x5x */ -#define KBC_AMI_MEGAKEY_1993 0x0050 /* AMI 'P' MegaKey 1993 */ -#define KBC_AMI_MEGAKEY_1994 0x0052 /* AMI 'R' MegaKey 1994 - 0xA0 returns 1993 copyright */ -#define KBC_AMI_TRIGEM 0x005A /* TriGem AMI 'Z' (1990 AMI copyright) */ -/* AMI 0x6x */ -#define KBC_TANDON 0x0061 /* Tandon 'a' - Temporary classification until we get a dump */ -/* Holtek */ -#define KBC_HT_REGIONAL_6542 0x1046 /* Holtek 'F' (Regional 6542) */ -#define KBC_HT_HT6542B_BESTKEY 0x1048 /* Holtek 'H' (Holtek HT6542B, BestKey) */ -/* AMI 0x0x clone without command 0xA0 */ -#define KBC_UNK_00 0x2000 /* Unknown 0x00 */ -#define KBC_UNK_01 0x2001 /* Unknown 0x01 */ -/* AMI 0x3x clone without command 0xA0 */ -#define KBC_UNK_7 0x2037 /* Unknown '7' - Temporary classification until we get a dump */ -#define KBC_UNK_9 0x2037 /* Unknown '9' - Temporary classification until we get a dump */ -#define KBC_JETKEY_NO_VER 0x2038 /* No-version JetKey '8' */ -/* AMI 0x4x clone without command 0xA0 */ -#define KBC_UNK_A 0x2041 /* Unknown 'A' - Temporary classification until we get a dump */ -#define KBC_JETKEY_5_W83C42 0x2046 /* JetKey 5.0 'F' and Winbond W83C42 */ -#define KBC_UNK_G 0x2047 /* Unknown 'G' - Temporary classification until we get a dump */ -#define KBC_MB_300E_SIS 0x2048 /* MB-300E Non-VIA 'H' and SiS 5582/559x */ -#define KBC_UNK_L 0x204C /* Unknown 'L' - Temporary classification until we get a dump */ -/* AMI 0x0x clone with command 0xA0 (Get Copyright String) only returning 0x00 */ -#define KBC_VPC_2007 0x3000 /* Microsoft Virtual PC 2007 - everything returns 0x00 */ -/* AMI 0x4x clone with command 0xA0 (Get Copyright String) only returning 0x00 */ -#define KBC_ALI_M148X 0x3045 /* ALi M148x 'E'/'U' (0xA1 actually returns 'F' but BIOS shows 'E' or 'U') */ -#define KBC_LANCE_UTRON 0x3046 /* Lance LT38C41 'F', Utron */ -/* AMI 0x5x clone with command 0xA0 (Get Copyright String) only returning 0x00 */ -#define KBC_SARC_6042 0x3055 /* SARC 6042 'U' */ -/* Award and clones */ -#define KBC_AWARD 0x4200 /* Award (0xA1 returns 0x00) - Temporary classification until we get \ - the real 0xAF return */ -#define KBC_VIA_VT82C4XN 0x4246 /* VIA VT82C41N, VT82C4N (0xA1 returns 'F') */ -#define KBC_VIA_VT82C586A 0x4346 /* VIA VT82C586A (0xA1 returns 'F') */ -#define KBC_VIA_VT82C586B 0x4446 /* VIA VT82C586B (0xA1 returns 'F') */ -#define KBC_VIA_VT82C686B 0x4546 /* VIA VT82C686B (0xA1 returns 'F') */ -/* UMC */ -#define KBC_UMC_UM8886 0x5048 /* UMC UM8886 'H' */ -/* IBM-style controllers with inverted P1 video type bit polarity */ -#define KBC_IBM_TYPE_1_XI8088 0x8000 /* Xi8088: IBM Type 1 */ -/* AMI (this is the 0xA1 revision byte) with inverted P1 video type bit polarity */ -#define KBC_ACER_V30_INV 0x8030 /* Acer (0xA1 returns nothing, 0xAF returns 0x00) */ -/* Holtek with inverted P1 video type bit polarity */ -#define KBC_HT_HT6542B_XI8088 0x9048 /* Xi8088: Holtek 'H' (Holtek HT6542B, BestKey) */ -/* Award and clones with inverted P1 video type bit polarity */ -#define KBC_VIA_VT82C4XN_XI8088 0xC246 /* Xi8088: VIA VT82C41N, VT82C4N (0xA1 returns 'F') */ +#define KBC_VEN_GENERIC 0x00 +#define KBC_VEN_ACER 0x01 +#define KBC_VEN_ALI 0x02 +#define KBC_VEN_AMI 0x03 +#define KBC_VEN_AMI_TRIGEM 0x04 +#define KBC_VEN_AWARD 0x05 +#define KBC_VEN_CHIPS 0x06 +#define KBC_VEN_COMPAQ 0x07 +#define KBC_VEN_HOLTEK 0x08 +#define KBC_VEN_IBM 0x09 +#define KBC_VEN_NCR 0x0a +#define KBC_VEN_OLIVETTI 0x0b +#define KBC_VEN_QUADTEL 0x0c +#define KBC_VEN_PHOENIX 0x0d +#define KBC_VEN_SIEMENS 0x0e +#define KBC_VEN_TOSHIBA 0x0f +#define KBC_VEN_VIA 0x10 +#define KBC_VEN_UMC 0x11 +#define KBC_VEN_SIS 0x12 +#define KBC_VEN_MASK 0x1f + +#define KBC_FLAG_IS_ASIC 0x80000000 +#define KBC_FLAG_IS_CLONE 0x40000000 +#define KBC_FLAG_IS_GREEN 0x20000000 +#define KBC_FLAG_IS_TYPE2 0x10000000 #ifdef __cplusplus extern "C" { #endif +extern int keyboard_type; + extern uint8_t keyboard_mode; extern int keyboard_scan; @@ -216,51 +183,28 @@ extern int mouse_scan; extern kbc_at_port_t *kbc_at_ports[2]; #ifdef EMU_DEVICE_H -extern const device_t keyboard_pc_device; -extern const device_t keyboard_pc82_device; -extern const device_t keyboard_pravetz_device; -extern const device_t keyboard_xt_device; -extern const device_t keyboard_xt86_device; -extern const device_t keyboard_xt_compaq_device; -extern const device_t keyboard_xt_t1x00_device; -extern const device_t keyboard_tandy_device; -extern const device_t keyboard_xt_lxt3_device; -extern const device_t keyboard_xt_olivetti_device; -extern const device_t keyboard_xt_zenith_device; -extern const device_t keyboard_xt_hyundai_device; -extern const device_t keyboard_xt_fe2010_device; -extern const device_t keyboard_xtclone_device; -extern const device_t keyboard_at_device; -extern const device_t keyboard_at_ami_device; -extern const device_t keyboard_at_compaq_device; -extern const device_t keyboard_at_phoenix_device; -extern const device_t keyboard_at_ncr_device; -extern const device_t keyboard_at_olivetti_device; -extern const device_t keyboard_at_siemens_device; -extern const device_t keyboard_at_tg_ami_device; -extern const device_t keyboard_at_toshiba_device; -extern const device_t keyboard_ps2_device; -extern const device_t keyboard_ps2_ps1_device; -extern const device_t keyboard_ps2_ps1_pci_device; -extern const device_t keyboard_ps2_xi8088_device; -extern const device_t keyboard_ps2_ami_device; -extern const device_t keyboard_ps2_compaq_device; -extern const device_t keyboard_ps2_holtek_device; -extern const device_t keyboard_ps2_mca_1_device; -extern const device_t keyboard_ps2_mca_2_device; -extern const device_t keyboard_ps2_olivetti_device; -extern const device_t keyboard_ps2_phoenix_device; -extern const device_t keyboard_ps2_quadtel_device; -extern const device_t keyboard_ps2_tg_ami_device; -extern const device_t keyboard_ps2_tg_ami_green_device; -extern const device_t keyboard_ps2_pci_device; -extern const device_t keyboard_ps2_ami_pci_device; -extern const device_t keyboard_ps2_intel_ami_pci_device; -extern const device_t keyboard_ps2_acer_pci_device; -extern const device_t keyboard_ps2_ali_pci_device; -extern const device_t keyboard_ps2_phoenix_pci_device; -extern const device_t keyboard_ps2_tg_ami_pci_device; +extern const device_t kbc_pc_device; +extern const device_t kbc_pc82_device; +extern const device_t kbc_pravetz_device; +extern const device_t kbc_xt_device; +extern const device_t kbc_xt86_device; +extern const device_t kbc_xt_compaq_device; +extern const device_t kbc_xt_t1x00_device; +extern const device_t kbc_tandy_device; +extern const device_t kbc_xt_lxt3_device; +extern const device_t kbc_xt_olivetti_device; +extern const device_t kbc_xt_zenith_device; +extern const device_t kbc_xt_hyundai_device; +extern const device_t kbc_xt_fe2010_device; +extern const device_t kbc_xtclone_device; +extern const device_t kbc_at_device; + +extern const device_t keyboard_pc_xt_device; +extern const device_t keyboard_at_device; +extern const device_t keyboard_ax_device; +extern const device_t keyboard_ps2_device; +extern const device_t keyboard_ps55_device; extern const device_t keyboard_at_generic_device; #endif /*EMU_DEVICE_H*/ @@ -303,6 +247,18 @@ extern atkbc_dev_t *kbc_at_dev_init(uint8_t inst); passed on incorrectly. */ extern uint16_t convert_scan_code(uint16_t scan_code); +extern const char * keyboard_get_name(int mouse); +extern const char * keyboard_get_internal_name(int mouse); +extern int keyboard_get_from_internal_name(char *s); +extern int keyboard_has_config(int mouse); +#ifdef EMU_DEVICE_H +extern const device_t *keyboard_get_device(int mouse); +#endif +extern int keyboard_get_ndev(void); +extern void keyboard_add_device(void); + +extern const scancode scancode_set1[512]; + #ifdef __cplusplus } #endif diff --git a/src/include/86box/log.h b/src/include/86box/log.h index 80ed6d108..e9fb70dc1 100644 --- a/src/include/86box/log.h +++ b/src/include/86box/log.h @@ -29,7 +29,7 @@ extern "C" { #include #endif -#define LOG_SIZE_BUFFER 1024 /* Log size buffer */ +#define LOG_SIZE_BUFFER 8192 /* Log size buffer */ #define LOG_SIZE_BUFFER_CYCLIC_LINES 32 /* Cyclic log size buffer (number of lines that should be cehcked) */ #define LOG_MINIMUM_REPEAT_ORDER 4 /* Minimum repeat size */ diff --git a/src/include/86box/lpt.h b/src/include/86box/lpt.h index b3e4d070b..037c31a44 100644 --- a/src/include/86box/lpt.h +++ b/src/include/86box/lpt.h @@ -17,66 +17,32 @@ #define LPT6_IRQ 5 #endif -typedef struct lpt_device_t { - const char *name; - const char *internal_name; +typedef struct lpt_device_s { + const char *name; + const char *internal_name; - void *(*init)(void *lpt); - void (*close)(void *priv); - void (*write_data)(uint8_t val, void *priv); - void (*write_ctrl)(uint8_t val, void *priv); - void (*autofeed)(uint8_t val,void *priv); - void (*strobe)(uint8_t old, uint8_t val,void *priv); - uint8_t (*read_status)(void *priv); - uint8_t (*read_ctrl)(void *priv); - void (*epp_write_data)(uint8_t is_addr, uint8_t val, void *priv); - void (*epp_request_read)(uint8_t is_addr, void *priv); + void *(*init)(void *lpt); + void (*close)(void *priv); + void (*write_data)(uint8_t val, void *priv); + void (*write_ctrl)(uint8_t val, void *priv); + void (*autofeed)(uint8_t val,void *priv); + void (*strobe)(uint8_t old, uint8_t val,void *priv); + uint8_t (*read_status)(void *priv); + uint8_t (*read_ctrl)(void *priv); + void (*epp_write_data)(uint8_t is_addr, uint8_t val, void *priv); + void (*epp_request_read)(uint8_t is_addr, void *priv); + + void *priv; + struct lpt_t *lpt; +//#ifdef EMU_DEVICE_H +// struct device_t *cfgdevice; +//#else + void *cfgdevice; +//#endif } lpt_device_t; -extern void lpt_set_ext(int port, uint8_t ext); -extern void lpt_set_ecp(int port, uint8_t ecp); -extern void lpt_set_epp(int port, uint8_t epp); -extern void lpt_set_lv2(int port, uint8_t lv2); -extern void lpt_set_fifo_threshold(int port, int threshold); -extern void lpt_reset(void); -extern void lpt_close(void); -extern void lpt_init(void); -extern void lpt_port_setup(int i, uint16_t port); -extern void lpt_port_irq(int i, uint8_t irq); -extern void lpt_port_dma(int i, uint8_t dma); -extern void lpt_port_remove(int i); -extern void lpt1_remove_ams(void); - -#define lpt1_setup(a) lpt_port_setup(0, a) -#define lpt1_irq(a) lpt_port_irq(0, a) -#define lpt1_remove() lpt_port_remove(0) - -#define lpt2_setup(a) lpt_port_setup(1, a) -#define lpt2_irq(a) lpt_port_irq(1, a) -#define lpt2_remove() lpt_port_remove(1) - -#define lpt3_setup(a) lpt_port_setup(2, a) -#define lpt3_irq(a) lpt_port_irq(2, a) -#define lpt3_remove() lpt_port_remove(2) - -#define lpt4_setup(a) lpt_port_setup(3, a) -#define lpt4_irq(a) lpt_port_irq(3, a) -#define lpt4_remove() lpt_port_remove(3) - -#if 0 -#define lpt5_setup(a) lpt_port_setup(4, a) -#define lpt5_irq(a) lpt_port_irq(4, a) -#define lpt5_remove() lpt_port_remove(4) - -#define lpt6_setup(a) lpt_port_setup(5, a) -#define lpt6_irq(a) lpt_port_irq(5, a) -#define lpt6_remove() lpt_port_remove(5) -#endif - -void lpt_devices_init(void); -void lpt_devices_close(void); - -typedef struct lpt_port_t { +#ifdef _TIMER_H_ +typedef struct lpt_t { uint8_t enabled; uint8_t irq; uint8_t irq_state; @@ -87,6 +53,7 @@ typedef struct lpt_port_t { uint8_t epp; uint8_t ecp; uint8_t ecr; + uint8_t ret_ecr; uint8_t in_dat; uint8_t fifo_stat; uint8_t dma_stat; @@ -94,52 +61,96 @@ typedef struct lpt_port_t { uint8_t autofeed; uint8_t strobe; uint8_t lv2; - uint8_t pad[7]; + uint8_t cnfga_readout; + uint8_t cnfgb_readout; + uint8_t cfg_regs_enabled; + uint8_t inst; + uint8_t eir; + uint8_t pad; + uint8_t ext_regs[8]; uint16_t addr; uint16_t id; uint16_t pad0[2]; - int device; int enable_irq; lpt_device_t *dt; #ifdef FIFO_H - fifo16_t *fifo; + fifo16_t * fifo; #else - void *fifo; + void * fifo; #endif - void *priv; pc_timer_t fifo_out_timer; +} lpt_t; +#endif /* _TIMER_H_ */ + +typedef struct lpt_port_s { + uint8_t enabled; + + int device; } lpt_port_t; +extern lpt_port_t lpt_ports[PARALLEL_MAX]; + typedef enum { LPT_STATE_IDLE = 0, LPT_STATE_READ_DMA, LPT_STATE_WRITE_FIFO } lpt_state_t; -extern lpt_port_t lpt_ports[PARALLEL_MAX]; +extern void lpt_write(uint16_t port, uint8_t val, void *priv); -extern void lpt_write(uint16_t port, uint8_t val, void *priv); +extern void lpt_write_to_fifo(void *priv, uint8_t val); -extern void lpt_write_to_fifo(void *priv, uint8_t val); +extern uint8_t lpt_read(uint16_t port, void *priv); -extern uint8_t lpt_read(uint16_t port, void *priv); +extern uint8_t lpt_read_port(lpt_t *dev, uint16_t reg); -extern uint8_t lpt_read_port(int port, uint16_t reg); +extern uint8_t lpt_read_status(lpt_t *dev); +extern uint8_t lpt_read_ecp_mode(lpt_t *dev); -extern uint8_t lpt_read_status(int port); -extern void lpt_irq(void *priv, int raise); +extern void lpt_irq(void *priv, int raise); -extern int lpt_device_get_from_internal_name(const char *s); +extern int lpt_device_get_from_internal_name(const char *str); -extern const char *lpt_device_get_name(int id); -extern const char *lpt_device_get_internal_name(int id); +extern const char *lpt_device_get_name(int id); +extern const char *lpt_device_get_internal_name(int id); -extern const lpt_device_t lpt_dac_device; -extern const lpt_device_t lpt_dac_stereo_device; +#ifdef EMU_DEVICE_H +extern const device_t *lpt_device_getdevice(const int id); +#endif -extern const lpt_device_t dss_device; +extern int lpt_device_has_config(const int id); -extern const lpt_device_t lpt_hasp_savquest_device; +extern const lpt_device_t lpt_dac_device; +extern const lpt_device_t lpt_dac_stereo_device; + +extern const lpt_device_t dss_device; + +extern const lpt_device_t lpt_hasp_savquest_device; + +extern void lpt_set_ext(lpt_t *dev, uint8_t ext); +extern void lpt_set_ecp(lpt_t *dev, uint8_t ecp); +extern void lpt_set_epp(lpt_t *dev, uint8_t epp); +extern void lpt_set_lv2(lpt_t *dev, uint8_t lv2); +extern void lpt_set_cfg_regs_enabled(lpt_t *dev, uint8_t cfg_regs_enabled); +extern void lpt_set_fifo_threshold(lpt_t *dev, int threshold); +extern void lpt_set_cnfga_readout(lpt_t *dev, const uint8_t cnfga_readout); +extern void lpt_set_cnfgb_readout(lpt_t *dev, const uint8_t cnfgb_readout); +extern void lpt_port_setup(lpt_t *dev, uint16_t port); +extern void lpt_port_irq(lpt_t *dev, uint8_t irq); +extern void lpt_port_dma(lpt_t *dev, uint8_t dma); +extern void lpt1_dma(const uint8_t dma); +extern void lpt_port_remove(lpt_t *dev); +extern void lpt1_remove_ams(lpt_t *dev); + +extern void lpt_devices_init(void); +extern void lpt_devices_close(void); + +extern void lpt_set_next_inst(int ni); +extern void lpt_set_3bc_used(int is_3bc_used); + +extern void lpt_standalone_init(void); + +extern const device_t lpt_port_device; #endif /*EMU_LPT_H*/ diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 93080538b..acba9cd45 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -8,15 +8,15 @@ * * Handling of the emulated machines. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, + * Jasmine Iwanek, * * Copyright 2008-2020 Sarah Walker. - * Copyright 2016-2020 Miran Grca. + * Copyright 2016-2025 Miran Grca. * Copyright 2017-2020 Fred N. van Kempen. + * Copyright 2025 Jasmine Iwanek. */ #ifndef EMU_MACHINE_H @@ -85,23 +85,24 @@ #define MACHINE_SOFTFLOAT_ONLY 0x00000001 /* sys requires SoftFloat FPU */ #define MACHINE_VIDEO 0x00000002 /* sys has int video */ #define MACHINE_VIDEO_8514A 0x00000004 /* sys has int video */ -#define MACHINE_VIDEO_XGA 0x00000008 /* sys has int video */ -#define MACHINE_VIDEO_ONLY 0x00000010 /* sys has fixed video */ -#define MACHINE_MOUSE 0x00000020 /* sys has int mouse */ -#define MACHINE_FDC 0x00000040 /* sys has int FDC */ -#define MACHINE_LPT_PRI 0x00000080 /* sys has int pri LPT */ -#define MACHINE_LPT_SEC 0x00000100 /* sys has int sec LPT */ -#define MACHINE_LPT_TER 0x00000200 /* sys has int ter LPT */ -#define MACHINE_PS2_KBC 0x00000400 /* sys has a PS/2 keyboard controller */ +#define MACHINE_VIDEO_ONLY 0x00000008 /* sys has fixed video */ +#define MACHINE_KEYBOARD 0x00000010 /* sys has int keyboard */ +#define MACHINE_AX 0x00000020 /* sys adheres to Japanese AX standard */ +#define MACHINE_KEYBOARD_JIS 0x00000020 /* sys has int keyboard which is Japanese (AX or PS/55) */ +#define MACHINE_MOUSE 0x00000040 /* sys has int mouse */ +#define MACHINE_FDC 0x00000080 /* sys has int FDC */ +#define MACHINE_LPT_PRI 0x00000100 /* sys has int pri LPT */ +#define MACHINE_LPT_SEC 0x00000200 /* sys has int sec LPT */ +#define MACHINE_LPT_TER 0x00000400 /* sys has int ter LPT */ +#define MACHINE_PS2_KBC 0x00000800 /* sys has a PS/2 keyboard controller */ /* this is separate from having PS/2 ports */ -#define MACHINE_UART_PRI 0x00000800 /* sys has int pri UART */ -#define MACHINE_UART_SEC 0x00001000 /* sys has int sec UART */ -#define MACHINE_UART_TER 0x00002000 /* sys has int ter UART */ -#define MACHINE_UART_QUA 0x00004000 /* sys has int qua UART */ -#define MACHINE_GAMEPORT 0x00008000 /* sys has int game port */ -#define MACHINE_SOUND 0x00010000 /* sys has int sound */ -#define MACHINE_NIC 0x00020000 /* sys has int NIC */ -#define MACHINE_AX 0x00040000 /* sys adheres to Japanese AX standard */ +#define MACHINE_UART_PRI 0x00010800 /* sys has int pri UART */ +#define MACHINE_UART_SEC 0x00002000 /* sys has int sec UART */ +#define MACHINE_UART_TER 0x00004000 /* sys has int ter UART */ +#define MACHINE_UART_QUA 0x00008000 /* sys has int qua UART */ +#define MACHINE_GAMEPORT 0x00010000 /* sys has int game port */ +#define MACHINE_SOUND 0x00020000 /* sys has int sound */ +#define MACHINE_NIC 0x00040000 /* sys has int NIC */ /* Feature flags for advanced devices. */ #define MACHINE_APM 0x00080000 /* sys has APM */ #define MACHINE_ACPI 0x00100000 /* sys has ACPI */ @@ -142,6 +143,24 @@ #define MACHINE_PIIX3 (MACHINE_PIIX | MACHINE_USB) #define MACHINE_PIIX4 (MACHINE_PIIX3 | MACHINE_ACPI) +#define MACHINE_DMA_0 0x00000001 +#define MACHINE_DMA_1 0x00000002 +#define MACHINE_DMA_2 0x00000004 +#define MACHINE_DMA_3 0x00000008 +#define MACHINE_DMA_DISABLED 0x00000010 +#define MACHINE_DMA_5 0x00000020 +#define MACHINE_DMA_6 0x00000040 +#define MACHINE_DMA_7 0x00000080 +#define MACHINE_DMA_JUMPERS_MASK (MACHINE_DMA_0 | MACHINE_DMA_1 | MACHINE_DMA_2 | MACHINE_DMA_3 | \ + MACHINE_DMA_DISABLED | MACHINE_DMA_5 | MACHINE_DMA_6 | MACHINE_DMA_7) +#define MACHINE_DMA_USE_MBDMA 0x00000100 +#define MACHINE_DMA_USE_CONFIG 0x00000200 +#define MACHINE_DMA_EXT_CONFIG (MACHINE_DMA_USE_MBDMA | MACHINE_DMA_USE_CONFIG) + +#define DMA_DISABLED 4 +#define DMA_NONE -1 +#define DMA_ANY -1 + #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) @@ -163,31 +182,33 @@ enum { MACHINE_TYPE_NONE = 0, - MACHINE_TYPE_8088 = 1, - MACHINE_TYPE_8086 = 2, - MACHINE_TYPE_286 = 3, - MACHINE_TYPE_386SX = 4, - MACHINE_TYPE_486SLC = 5, - MACHINE_TYPE_386DX = 6, - MACHINE_TYPE_386DX_486 = 7, - MACHINE_TYPE_486 = 8, - MACHINE_TYPE_486_S2 = 9, - MACHINE_TYPE_486_S3 = 10, - MACHINE_TYPE_486_S3_PCI = 11, - MACHINE_TYPE_486_MISC = 12, - MACHINE_TYPE_SOCKET4 = 13, - MACHINE_TYPE_SOCKET5 = 14, - MACHINE_TYPE_SOCKET7_3V = 15, - MACHINE_TYPE_SOCKET7 = 16, - MACHINE_TYPE_SOCKETS7 = 17, - MACHINE_TYPE_SOCKET8 = 18, - MACHINE_TYPE_SLOT1 = 19, - MACHINE_TYPE_SLOT1_2 = 20, - MACHINE_TYPE_SLOT1_370 = 21, - MACHINE_TYPE_SLOT2 = 22, - MACHINE_TYPE_SOCKET370 = 23, - MACHINE_TYPE_MISC = 24, - MACHINE_TYPE_MAX = 25 + MACHINE_TYPE_8088, + MACHINE_TYPE_8086, + MACHINE_TYPE_286, + MACHINE_TYPE_386SX, + MACHINE_TYPE_M6117, + MACHINE_TYPE_486SLC, + MACHINE_TYPE_386DX, + MACHINE_TYPE_386DX_486, + MACHINE_TYPE_486, + MACHINE_TYPE_486_S2, + MACHINE_TYPE_486_S3, + MACHINE_TYPE_486_S3_PCI, + MACHINE_TYPE_486_MISC, + MACHINE_TYPE_SOCKET4, + MACHINE_TYPE_SOCKET4_5, + MACHINE_TYPE_SOCKET5, + MACHINE_TYPE_SOCKET7_3V, + MACHINE_TYPE_SOCKET7, + MACHINE_TYPE_SOCKETS7, + MACHINE_TYPE_SOCKET8, + MACHINE_TYPE_SLOT1, + MACHINE_TYPE_SLOT1_2, + MACHINE_TYPE_SLOT1_370, + MACHINE_TYPE_SLOT2, + MACHINE_TYPE_SOCKET370, + MACHINE_TYPE_MISC, + MACHINE_TYPE_MAX }; enum { @@ -243,6 +264,7 @@ enum { MACHINE_CHIPSET_OPTI_493, MACHINE_CHIPSET_OPTI_495SLC, MACHINE_CHIPSET_OPTI_495SX, + MACHINE_CHIPSET_OPTI_496, MACHINE_CHIPSET_OPTI_498, MACHINE_CHIPSET_OPTI_499, MACHINE_CHIPSET_OPTI_895_802G, @@ -316,7 +338,7 @@ typedef struct _machine_ { uint32_t type; uintptr_t chipset; int (*init)(const struct _machine_ *); - uint8_t (*p1_handler)(uint8_t write, uint8_t val); + uint8_t (*p1_handler)(void); uint32_t (*gpio_handler)(uint8_t write, uint32_t val); uintptr_t available_flag; uint32_t (*gpio_acpi_handler)(uint8_t write, uint32_t val); @@ -326,6 +348,8 @@ typedef struct _machine_ { const machine_memory_t ram; int ram_granularity; int nvrmask; + int jumpered_ecp_dma; + int default_jumpered_ecp_dma; #ifdef EMU_DEVICE_H const device_t *kbc_device; #else @@ -338,6 +362,7 @@ typedef struct _machine_ { uint32_t gpio_acpi; #ifdef EMU_DEVICE_H const device_t *device; + const device_t *kbd_device; const device_t *fdc_device; const device_t *sio_device; const device_t *vid_device; @@ -345,6 +370,7 @@ typedef struct _machine_ { const device_t *net_device; #else void *device; + void *kbd_device; void *fdc_device; void *sio_device; void *vid_device; @@ -362,14 +388,14 @@ extern int machine; extern void * machine_snd; /* Core functions. */ -extern int machine_count(void); -extern int machine_available(int m); -extern const char *machine_getname(void); -extern const char *machine_getname_ex(int m); -extern const char *machine_get_internal_name(void); -extern const char *machine_get_nvr_name(void); -extern int machine_get_machine_from_internal_name(const char *s); -extern void machine_init(void); +extern int machine_count(void); +extern int machine_available(int m); +extern const char * machine_getname(void); +extern const char * machine_getname_ex(int m); +extern const char * machine_get_internal_name(void); +extern const char * machine_get_nvr_name(void); +extern int machine_get_machine_from_internal_name(const char *s); +extern void machine_init(void); #ifdef EMU_DEVICE_H extern const device_t *machine_get_kbc_device(int m); extern const device_t *machine_get_device(int m); @@ -379,647 +405,938 @@ extern const device_t *machine_get_vid_device(int m); extern const device_t *machine_get_snd_device(int m); extern const device_t *machine_get_net_device(int m); #endif -extern const char *machine_get_internal_name_ex(int m); -extern const char *machine_get_nvr_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 int machine_get_chipset(int m); -extern void machine_close(void); -extern int machine_has_mouse(void); -extern int machine_is_sony(void); +extern const char * machine_get_internal_name_ex(int m); +extern const char * machine_get_nvr_name_ex(int m); +extern int machine_get_nvrmask(int m); +extern int machine_has_flags(int m, int flags); +extern void machine_set_ps2(void); +extern void machine_force_ps2(int is_ps2); +extern int machine_has_flags_ex(int flags); +extern int machine_has_bus(int m, int bus_flags); +extern int machine_has_cartridge(int m); +extern int machine_has_jumpered_ecp_dma(int m, int dma); +extern int machine_get_default_jumpered_ecp_dma(int m); +extern int machine_map_jumpered_ecp_dma(int dma); +extern const char * machine_get_jumpered_ecp_dma_name(int dma); +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 int machine_get_chipset(int m); +extern void machine_close(void); +extern int machine_has_mouse(void); +extern int machine_is_sony(void); -extern uint8_t machine_get_p1_default(void); -extern uint8_t machine_get_p1(void); -extern void machine_set_p1_default(uint8_t val); -extern void machine_set_p1(uint8_t val); -extern void machine_and_p1(uint8_t val); -extern void machine_init_p1(void); -extern uint8_t machine_handle_p1(uint8_t write, uint8_t val); -extern uint32_t machine_get_gpio_default(void); -extern uint32_t machine_get_gpio(void); -extern void machine_set_gpio_default(uint32_t val); -extern void machine_set_gpio(uint32_t val); -extern void machine_and_gpio(uint32_t val); -extern void machine_init_gpio(void); -extern uint32_t machine_handle_gpio(uint8_t write, uint32_t val); -extern uint32_t machine_get_gpio_acpi_default(void); -extern uint32_t machine_get_gpio_acpi(void); -extern void machine_set_gpio_acpi_default(uint32_t val); -extern void machine_set_gpio_acpi(uint32_t val); -extern void machine_and_gpio_acpi(uint32_t val); -extern void machine_init_gpio_acpi(void); -extern uint32_t machine_handle_gpio_acpi(uint8_t write, uint32_t val); +extern uint8_t machine_compaq_p1_handler(void); +extern uint8_t machine_generic_p1_handler(void); +extern uint8_t machine_ncr_p1_handler(void); +extern uint8_t machine_ps1_p1_handler(void); +extern uint8_t machine_t3100e_p1_handler(void); + +extern uint8_t machine_get_p1_default(void); +extern void machine_set_p1_default(uint8_t val); +extern void machine_set_p1(uint8_t val); +extern void machine_and_p1(uint8_t val); +extern void machine_init_p1(void); +extern uint8_t machine_handle_p1(uint8_t write, uint8_t val); +extern uint8_t machine_get_p1(uint8_t kbc_p1); +extern uint32_t machine_get_gpio_default(void); +extern uint32_t machine_get_gpio(void); +extern void machine_set_gpio_default(uint32_t val); +extern void machine_set_gpio(uint32_t val); +extern void machine_and_gpio(uint32_t val); +extern void machine_init_gpio(void); +extern uint32_t machine_handle_gpio(uint8_t write, uint32_t val); +extern uint32_t machine_get_gpio_acpi_default(void); +extern uint32_t machine_get_gpio_acpi(void); +extern void machine_set_gpio_acpi_default(uint32_t val); +extern void machine_set_gpio_acpi(uint32_t val); +extern void machine_and_gpio_acpi(uint32_t val); +extern void machine_init_gpio_acpi(void); +extern uint32_t machine_handle_gpio_acpi(uint8_t write, uint32_t val); /* Initialization functions for boards and systems. */ -extern void machine_common_init(const machine_t *); +extern void machine_common_init(const machine_t *); /* m_amstrad.c */ -extern int machine_pc1512_init(const machine_t *); -extern int machine_pc1640_init(const machine_t *); -extern int machine_pc200_init(const machine_t *); -extern int machine_ppc512_init(const machine_t *); -extern int machine_pc2086_init(const machine_t *); -extern int machine_pc3086_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t vid_1512_device; +#endif +extern int machine_pc1512_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t vid_1640_device; +#endif +extern int machine_pc1640_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t vid_200_device; +#endif +extern int machine_pc200_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t vid_ppc512_device; +#endif +extern int machine_ppc512_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t vid_pc2086_device; +#endif +extern int machine_pc2086_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t vid_pc3086_device; +#endif +extern int machine_pc3086_init(const machine_t *); -/* m_at.c */ -extern void machine_at_common_init_ex(const machine_t *, int type); -extern void machine_at_common_init(const machine_t *); -extern void machine_at_init(const machine_t *); -extern void machine_at_ps2_init(const machine_t *); -extern void machine_at_common_ide_init(const machine_t *); -extern void machine_at_ibm_common_ide_init(const machine_t *); -extern void machine_at_ide_init(const machine_t *); -extern void machine_at_ps2_ide_init(const machine_t *); +/* m_at_286.c */ +/* ISA */ +#ifdef EMU_DEVICE_H +extern const device_t ibmat_device; +#endif +extern int machine_at_ibmat_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t ibmxt286_device; +#endif +extern int machine_at_ibmxt286_init(const machine_t *); +/* IBM AT with AMI BIOS */ +extern int machine_at_ibmatami_init(const machine_t *); +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_grid1520_init(const machine_t *); +extern int machine_at_mr286_init(const machine_t *); +extern int machine_at_pc8_init(const machine_t *); +extern int machine_at_m290_init(const machine_t *); +/* IBM AT with Phoenix BIOS */ +extern int machine_at_ibmatpx_init(const machine_t *); +/* IBM AT with Quadtel BIOS */ +extern int machine_at_ibmatquadtel_init(const machine_t *); +extern int machine_at_pb286_init(const machine_t *); +extern int machine_at_mbc17_init(const machine_t *); +extern int machine_at_ax286_init(const machine_t *); +/* Siemens PCD-2L. N82330 discrete machine. It segfaults in some places */ +extern int machine_at_siemens_init(const machine_t *); -extern int machine_at_ibm_init(const machine_t *); +/* C&T PC/AT */ +extern int machine_at_dells200_init(const machine_t *); +extern int machine_at_super286c_init(const machine_t *); +extern int machine_at_at122_init(const machine_t *); +extern int machine_at_tuliptc7_init(const machine_t *); -// IBM AT with custom BIOS -extern int machine_at_ibmatami_init(const machine_t *); // IBM AT with AMI BIOS -extern int machine_at_ibmatpx_init(const machine_t *); // IBM AT with Phoenix BIOS -extern int machine_at_ibmatquadtel_init(const machine_t *); // IBM AT with Quadtel BIOS +/* GC103 */ +extern int machine_at_quadt286_init(const machine_t *); +extern void machine_at_headland_common_init(const machine_t *model, int type); +extern int machine_at_tg286m_init(const machine_t *); +/* Wells American A*Star with custom award BIOS. */ +extern int machine_at_wellamerastar_init(const machine_t *); -extern int machine_at_ibmxt286_init(const machine_t *); +/* NEAT */ +extern int machine_at_ataripc4_init(const machine_t *); +extern int machine_at_neat_ami_init(const machine_t *); +extern int machine_at_3302_init(const machine_t *); +extern int machine_at_px286_init(const machine_t *); -extern int machine_at_pb286_init(const machine_t *); +/* SCAMP */ +extern int machine_at_pc7286_init(const machine_t *); -extern int machine_at_siemens_init(const machine_t *); // Siemens PCD-2L. N82330 discrete machine. It segfaults in some places +/* SCAT */ +extern int machine_at_pc5286_init(const machine_t *); +extern int machine_at_gw286ct_init(const machine_t *); +extern int machine_at_gdc212m_init(const machine_t *); +extern int machine_at_award286_init(const machine_t *); +extern int machine_at_super286tr_init(const machine_t *); +extern int machine_at_drsm35286_init(const machine_t *); +extern int machine_at_deskmaster286_init(const machine_t *); +extern int machine_at_spc4200p_init(const machine_t *); +extern int machine_at_spc4216p_init(const machine_t *); +extern int machine_at_spc4620p_init(const machine_t *); +extern int machine_at_senor_scat286_init(const machine_t *); -extern int machine_at_wellamerastar_init(const machine_t *); // Wells American A*Star with custom award BIOS +/* m_at_386sx.c */ +/* ISA */ +extern int machine_at_pc916sx_init(const machine_t *); +extern int machine_at_quadt386sx_init(const machine_t *); -/* m_at_286_386sx.c */ -extern int machine_at_tg286m_init(const machine_t *); -extern int machine_at_ama932j_init(const machine_t *); -extern int machine_at_px286_init(const machine_t *); -extern int machine_at_quadt286_init(const machine_t *); -extern int machine_at_mr286_init(const machine_t *); +/* ACC 2036 */ +#ifdef EMU_DEVICE_H +extern const device_t pbl300sx_device; +#endif +extern int machine_at_pbl300sx_init(const machine_t *); -extern int machine_at_pbl300sx_init(const machine_t *); -extern int machine_at_neat_init(const machine_t *); -extern int machine_at_neat_ami_init(const machine_t *); -extern int machine_at_ataripc4_init(const machine_t *); +/* ALi M1217 */ +extern int machine_at_arb1374_init(const machine_t *); +extern int machine_at_sbc350a_init(const machine_t *); +extern int machine_at_flytech386_init(const machine_t *); +extern int machine_at_325ax_init(const machine_t *); +extern int machine_at_mr1217_init(const machine_t *); -extern int machine_at_quadt386sx_init(const machine_t *); +/* ALi M1409 */ +extern int machine_at_acer100t_init(const machine_t *); -extern int machine_at_award286_init(const machine_t *); -extern int machine_at_gdc212m_init(const machine_t *); -extern int machine_at_gw286ct_init(const machine_t *); -extern int machine_at_drsm35286_init(const machine_t *); -extern int machine_at_senor_scat286_init(const machine_t *); -extern int machine_at_super286c_init(const machine_t *); -extern int machine_at_super286tr_init(const machine_t *); -extern int machine_at_spc4200p_init(const machine_t *); -extern int machine_at_spc4216p_init(const machine_t *); -extern int machine_at_spc4620p_init(const machine_t *); -extern int machine_at_kmxc02_init(const machine_t *); -extern int machine_at_deskmaster286_init(const machine_t *); +/* HT18 */ +extern int machine_at_ama932j_init(const machine_t *); -extern int machine_at_dells200_init(const machine_t *); -extern int machine_at_at122_init(const machine_t *); -extern int machine_at_tuliptc7_init(const machine_t *); +/* Intel 82335 */ +extern int machine_at_adi386sx_init(const machine_t *); +extern int machine_at_shuttle386sx_init(const machine_t *); -extern int machine_at_pc8_init(const machine_t *); -extern int machine_at_3302_init(const machine_t *); +/* NEAT */ +extern int machine_at_cmdsl386sx16_init(const machine_t *); +extern int machine_at_neat_init(const machine_t *); -extern int machine_at_m290_init(const machine_t *); +/* NEATsx */ +extern int machine_at_if386sx_init(const machine_t *); -extern int machine_at_shuttle386sx_init(const machine_t *); -extern int machine_at_adi386sx_init(const machine_t *); -extern int machine_at_cmdsl386sx16_init(const machine_t *); -extern int machine_at_cmdsl386sx25_init(const machine_t *); -extern int machine_at_dataexpert386sx_init(const machine_t *); -extern int machine_at_dells333sl_init(const machine_t *); -extern int machine_at_if386sx_init(const machine_t *); -extern int machine_at_spc6033p_init(const machine_t *); -extern int machine_at_wd76c10_init(const machine_t *); -extern int machine_at_arb1374_init(const machine_t *); -extern int machine_at_sbc350a_init(const machine_t *); -extern int machine_at_flytech386_init(const machine_t *); -extern int machine_at_325ax_init(const machine_t *); -extern int machine_at_mr1217_init(const machine_t *); -extern int machine_at_pja511m_init(const machine_t *); -extern int machine_at_prox1332_init(const machine_t *); -extern int machine_at_acer100t_init(const machine_t *); +/* OPTi 283 */ +extern int machine_at_svc386sxp1_init(const machine_t *); -extern int machine_at_awardsx_init(const machine_t *); +/* OPTi 291 */ +extern int machine_at_awardsx_init(const machine_t *); -extern int machine_at_pc916sx_init(const machine_t *); +/* SCAMP */ +extern int machine_at_cmdsl386sx25_init(const machine_t *); +extern int machine_at_dataexpert386sx_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t dells333sl_device; +#endif +extern int machine_at_dells333sl_init(const machine_t *); +extern int machine_at_spc6033p_init(const machine_t *); + +/* SCATsx */ +extern int machine_at_kmxc02_init(const machine_t *); + +/* WD76C10 */ +extern int machine_at_wd76c10_init(const machine_t *); + +/* m_at_m6117.c */ +/* ALi M6117D */ +extern int machine_at_pja511m_init(const machine_t *); +extern int machine_at_prox1332_init(const machine_t *); + +/* m_at_386dx.c */ +/* ISA */ +extern int machine_at_deskpro386_init(const machine_t *); +extern int machine_at_deskpro386_05_1988_init(const machine_t *); +extern int machine_at_portableiii386_init(const machine_t *); +extern int machine_at_micronics386_init(const machine_t *); +extern int machine_at_micronics386px_init(const machine_t *); + +/* ACC 2168 */ +extern int machine_at_acc386_init(const machine_t *); + +/* C&T 386/AT */ +extern int machine_at_ecs386_init(const machine_t *); +extern int machine_at_spc6000a_init(const machine_t *); +extern int machine_at_tandy4000_init(const machine_t *); + +/* ALi M1429 */ +extern int machine_at_ecs386v_init(const machine_t *); + +/* OPTi 391 */ +extern int machine_at_dataexpert386wb_init(const machine_t *); + +/* OPTi 495SLC */ +extern int machine_at_opti495_init(const machine_t *); + +/* SiS 310 */ +extern int machine_at_asus3863364k_init(const machine_t *); +extern int machine_at_asus386_init(const machine_t *); + +/* m_at_486slc.c */ +/* OPTi 283 */ +extern int machine_at_rycleopardlx_init(const machine_t *); /* m_at_386dx_486.c */ -/* Note to jriwanek: When merging this into my branch, please make - sure this appear here (and in the .c file) in the order and position - in which they appear in the machine table. */ -extern int machine_at_dataexpert386wb_init(const machine_t *); -extern int machine_at_isa486c_init(const machine_t *); -extern int machine_at_genoa486_init(const machine_t *); -extern int machine_at_ga486l_init(const machine_t *); -extern int machine_at_cobalt_init(const machine_t *); -extern int machine_at_cougar_init(const machine_t *); +/* ALi M1429G */ +extern int machine_at_exp4349_init(const machine_t *); -extern int machine_at_acc386_init(const machine_t *); -extern int machine_at_asus3863364k_init(const machine_t *); -extern int machine_at_asus386_init(const machine_t *); -extern int machine_at_ecs386_init(const machine_t *); -extern int machine_at_spc6000a_init(const machine_t *); -extern int machine_at_micronics386_init(const machine_t *); -extern int machine_at_micronics386px_init(const machine_t *); -extern int machine_at_ecs386v_init(const machine_t *); -extern int machine_at_tandy4000_init(const machine_t *); +/* OPTi 495SX */ +extern int machine_at_c747_init(const machine_t *); +extern int machine_at_opti495_ami_init(const machine_t *); +extern int machine_at_opti495_mr_init(const machine_t *); -extern int machine_at_rycleopardlx_init(const machine_t *); +/* m_at_common.c */ +extern void machine_at_common_init_ex(const machine_t *, int type); +extern void machine_at_common_init(const machine_t *); +extern void machine_at_init(const machine_t *); +extern void machine_at_ps2_init(const machine_t *); +extern void machine_at_common_ide_init(const machine_t *); +extern void machine_at_ibm_common_ide_init(const machine_t *); +extern void machine_at_ide_init(const machine_t *); +extern void machine_at_ps2_ide_init(const machine_t *); -extern int machine_at_486vchd_init(const machine_t *); +/* m_at_socket1.c */ +/* CS4031 */ +extern int machine_at_cs4031_init(const machine_t *); -extern int machine_at_cs4031_init(const machine_t *); +/* OPTi 381 */ +extern int machine_at_ga486l_init(const machine_t *); -extern int machine_at_pb410a_init(const machine_t *); +/* OPTi 493 */ +extern int machine_at_svc486wb_init(const machine_t *); -extern int machine_at_decpclpv_init(const machine_t *); -extern int machine_at_dell466np_init(const machine_t *); +/* OPTi 498 */ +extern int machine_at_mvi486_init(const machine_t *); -extern int machine_at_acerv10_init(const machine_t *); +/* SiS 401 */ +extern int machine_at_isa486_init(const machine_t *); +extern int machine_at_sis401_init(const machine_t *); -extern int machine_at_acera1g_init(const machine_t *); -extern int machine_at_ali1429_init(const machine_t *); -extern int machine_at_winbios1429_init(const machine_t *); +/* SiS 460 */ +extern int machine_at_av4_init(const machine_t *); -extern int machine_at_opti495_init(const machine_t *); -extern int machine_at_opti495_ami_init(const machine_t *); -extern int machine_at_opti495_mr_init(const machine_t *); -extern int machine_at_c747_init(const machine_t *); -extern int machine_at_exp4349_init(const machine_t *); +/* SiS 471 */ +extern int machine_at_advantage40xxd_init(const machine_t *); -extern int machine_at_vect486vl_init(const machine_t *); -extern int machine_at_d824_init(const machine_t *); -extern int machine_at_tuliptc38_init(const machine_t *); -extern int machine_at_martin_init(const machine_t *); +/* Symphony SL42C460 */ +extern int machine_at_dtk461_init(const machine_t *); -extern int machine_at_403tg_init(const machine_t *); -extern int machine_at_403tg_d_init(const machine_t *); -extern int machine_at_403tg_d_mr_init(const machine_t *); -extern int machine_at_pb450_init(const machine_t *); -extern int machine_at_pb450_init(const machine_t *); -extern int machine_at_aptiva510_init(const machine_t *); -extern int machine_at_pc330_6573_init(const machine_t *); -extern int machine_at_mvi486_init(const machine_t *); +/* VIA VT82C495 */ +extern int machine_at_486vchd_init(const machine_t *); -extern int machine_at_dtk461_init(const machine_t *); -extern int machine_at_sis401_init(const machine_t *); -extern int machine_at_isa486_init(const machine_t *); -extern int machine_at_av4_init(const machine_t *); -extern int machine_at_advantage40xxd_init(const machine_t *); -extern int machine_at_valuepoint433_init(const machine_t *); +/* VLSI 82C480 */ +extern int machine_at_vect486vl_init(const machine_t *); -extern int machine_at_vli486sv2g_init(const machine_t *); -extern int machine_at_ami471_init(const machine_t *); -extern int machine_at_dtk486_init(const machine_t *); -extern int machine_at_px471_init(const machine_t *); -extern int machine_at_win471_init(const machine_t *); -extern int machine_at_pci400ca_init(const machine_t *); -extern int machine_at_vi15g_init(const machine_t *); -extern int machine_at_greenb_init(const machine_t *); -extern int machine_at_4gpv5_init(const machine_t *); +/* VLSI 82C481 */ +extern int machine_at_d824_init(const machine_t *); -extern int machine_at_r418_init(const machine_t *); -extern int machine_at_ls486e_init(const machine_t *); -extern int machine_at_4dps_init(const machine_t *); -extern int machine_at_ms4144_init(const machine_t *); -extern int machine_at_acerp3_init(const machine_t *); -extern int machine_at_4saw2_init(const machine_t *); -extern int machine_at_m4li_init(const machine_t *); -extern int machine_at_alfredo_init(const machine_t *); -extern int machine_at_amis76_init(const machine_t *); -extern int machine_at_ninja_init(const machine_t *); -extern int machine_at_bat4ip3e_init(const machine_t *); -extern int machine_at_486pi_init(const machine_t *); -extern int machine_at_sb486p_init(const machine_t *); -extern int machine_at_486sp3_init(const machine_t *); -extern int machine_at_486sp3c_init(const machine_t *); -extern int machine_at_486sp3g_init(const machine_t *); -extern int machine_at_sb486pv_init(const machine_t *); -extern int machine_at_486ap4_init(const machine_t *); -extern int machine_at_g486vpa_init(const machine_t *); -extern int machine_at_486vipio2_init(const machine_t *); -extern int machine_at_abpb4_init(const machine_t *); -extern int machine_at_win486pci_init(const machine_t *); -extern int machine_at_ms4145_init(const machine_t *); -extern int machine_at_sbc490_init(const machine_t *); -extern int machine_at_tf486_init(const machine_t *); -extern int machine_at_arb1476_init(const machine_t *); +/* VLSI 82C486 */ +extern int machine_at_tuliptc38_init(const machine_t *); -extern int machine_at_pci400cb_init(const machine_t *); -extern int machine_at_g486ip_init(const machine_t *); +/* ZyMOS Poach */ +extern int machine_at_isa486c_init(const machine_t *); +extern int machine_at_genoa486_init(const machine_t *); -extern int machine_at_itoxstar_init(const machine_t *); -extern int machine_at_arb1423c_init(const machine_t *); -extern int machine_at_arb1479_init(const machine_t *); -extern int machine_at_iach488_init(const machine_t *); -extern int machine_at_pcm9340_init(const machine_t *); -extern int machine_at_pcm5330_init(const machine_t *); +/* m_at_socket2.c */ +/* ACC 2168 */ +extern int machine_at_pb410a_init(const machine_t *); -extern int machine_at_84xxuuda_init(const machine_t *); -extern int machine_at_ecs486_init(const machine_t *); -extern int machine_at_hot433a_init(const machine_t *); -extern int machine_at_pl4600c_init(const machine_t *); -extern int machine_at_atc1415_init(const machine_t *); -extern int machine_at_actionpc2600_init(const machine_t *); -extern int machine_at_actiontower8400_init(const machine_t *); -extern int machine_at_m919_init(const machine_t *); -extern int machine_at_spc7700plw_init(const machine_t *); -extern int machine_at_ms4134_init(const machine_t *); -extern int machine_at_tg486gp_init(const machine_t *); -extern int machine_at_tg486g_init(const machine_t *); -extern int machine_at_dvent4xx_init(const machine_t *); -extern int machine_at_ecsal486_init(const machine_t *); -extern int machine_at_ap4100aa_init(const machine_t *); -extern int machine_at_atc1762_init(const machine_t *); +/* ALi M1429G */ +extern int machine_at_acera1g_init(const machine_t *); +extern int machine_at_winbios1429_init(const machine_t *); +extern int machine_at_ali1429_init(const machine_t *); -/* m_at_commodore.c */ -extern int machine_at_cmdpc_init(const machine_t *); +/* i420TX */ +extern int machine_at_pci400ca_init(const machine_t *); -/* m_at_compaq.c */ -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 *); -extern int machine_at_deskpro386_init(const machine_t *); -extern int machine_at_deskpro386_05_1988_init(const machine_t *); +/* IMS 8848 */ +extern int machine_at_g486ip_init(const machine_t *); + +/* OPTi 499 */ +extern int machine_at_cobalt_init(const machine_t *); +extern int machine_at_cougar_init(const machine_t *); + +/* SiS 461 */ +extern int machine_at_decpclpv_init(const machine_t *); +extern int machine_at_dell466np_init(const machine_t *); +extern int machine_at_valuepoint433_init(const machine_t *); + +/* VLSI 82C480 */ +extern int machine_at_martin_init(const machine_t *); + +/* m_at_socket3.c */ +/* ALi M1429G */ +extern int machine_at_atc1762_init(const machine_t *); +extern int machine_at_ecsal486_init(const machine_t *); +extern int machine_at_ap4100aa_init(const machine_t *); + +/* Contaq 82C596A */ +extern int machine_at_4gpv5_init(const machine_t *); + +/* Contaq 82C597 */ +extern int machine_at_greenb_init(const machine_t *); + +/* OPTi 895 */ +extern int machine_at_403tg_init(const machine_t *); +extern int machine_at_403tg_d_init(const machine_t *); +extern int machine_at_403tg_d_mr_init(const machine_t *); + +/* SiS 461 */ +extern int machine_at_acerv10_init(const machine_t *); + +/* SiS 471 */ +extern int machine_at_win471_init(const machine_t *); +extern int machine_at_vi15g_init(const machine_t *); +extern int machine_at_vli486sv2g_init(const machine_t *); +extern int machine_at_dvent4xx_init(const machine_t *); +extern int machine_at_dtk486_init(const machine_t *); +extern int machine_at_ami471_init(const machine_t *); +extern int machine_at_px471_init(const machine_t *); +extern int machine_at_tg486g_init(const machine_t *); + +/* m_at_socket3_pci.c */ +/* ALi M1429G */ +extern int machine_at_ms4134_init(const machine_t *); +extern int machine_at_tg486gp_init(const machine_t *); + +/* ALi M1489 */ +extern int machine_at_sbc490_init(const machine_t *); +extern int machine_at_abpb4_init(const machine_t *); +extern int machine_at_arb1476_init(const machine_t *); +extern int machine_at_win486pci_init(const machine_t *); +extern int machine_at_tf486_init(const machine_t *); +extern int machine_at_ms4145_init(const machine_t *); + +/* OPTi 802G */ +extern int machine_at_aptiva510_init(const machine_t *); +extern int machine_at_pc330_6573_init(const machine_t *); + +/* OPTi 895 */ +#ifdef EMU_DEVICE_H +extern const device_t pb450_device; +#endif +extern int machine_at_pb450_init(const machine_t *); + +/* i420EX */ +extern int machine_at_486pi_init(const machine_t *); +extern int machine_at_bat4ip3e_init(const machine_t *); +extern int machine_at_486ap4_init(const machine_t *); +extern int machine_at_ninja_init(const machine_t *); +extern int machine_at_sb486p_init(const machine_t *); + +/* i420TX */ +extern int machine_at_amis76_init(const machine_t *); +extern int machine_at_486sp3_init(const machine_t *); +extern int machine_at_alfredo_init(const machine_t *); + +/* i420ZX */ +extern int machine_at_486sp3g_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t sb486pv_device; +#endif +extern int machine_at_sb486pv_init(const machine_t *); + +/* IMS 8848 */ +extern int machine_at_pci400cb_init(const machine_t *); + +/* SiS 496 */ +extern int machine_at_acerp3_init(const machine_t *); +extern int machine_at_486sp3c_init(const machine_t *); +extern int machine_at_ls486e_init(const machine_t *); +extern int machine_at_m4li_init(const machine_t *); +extern int machine_at_ms4144_init(const machine_t *); +extern int machine_at_r418_init(const machine_t *); +extern int machine_at_4saw2_init(const machine_t *); +extern int machine_at_4dps_init(const machine_t *); + +/* UMC 8881 */ +extern int machine_at_atc1415_init(const machine_t *); +extern int machine_at_84xxuuda_init(const machine_t *); +extern int machine_at_pl4600c_init(const machine_t *); +extern int machine_at_ecs486_init(const machine_t *); +extern int machine_at_actionpc2600_init(const machine_t *); +extern int machine_at_actiontower8400_init(const machine_t *); +extern int machine_at_m919_init(const machine_t *); +extern int machine_at_spc7700plw_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t hot433a_device; +#endif +extern int machine_at_hot433a_init(const machine_t *); + +/* VIA VT82C496G */ +extern int machine_at_g486vpa_init(const machine_t *); +extern int machine_at_486vipio2_init(const machine_t *); + +/* m_at_486_misc.c */ +/* STPC Client */ +extern int machine_at_itoxstar_init(const machine_t *); + +/* STPC Consumer-II */ +extern int machine_at_arb1423c_init(const machine_t *); +extern int machine_at_arb1479_init(const machine_t *); +extern int machine_at_iach488_init(const machine_t *); + +/* STPC Elite */ +extern int machine_at_pcm9340_init(const machine_t *); + +/* STPC Atlas */ +extern int machine_at_pcm5330_init(const machine_t *); /* m_at_socket4.c */ -extern void machine_at_premiere_common_init(const machine_t *, int); -extern void machine_at_award_common_init(const machine_t *); +/* i430LX */ +#ifdef EMU_DEVICE_H +extern const device_t v12p_device; +#endif +extern int machine_at_v12p_init(const machine_t *); +extern int machine_at_ambradp60_init(const machine_t *); +extern int machine_at_excaliburpci_init(const machine_t *); +extern int machine_at_p5mp3_init(const machine_t *); +extern int machine_at_dellxp60_init(const machine_t *); +extern int machine_at_opti560l_init(const machine_t *); +extern void machine_at_award_common_init(const machine_t *); +extern int machine_at_586is_init(const machine_t *); +extern int machine_at_valuepointp60_init(const machine_t *); +extern void machine_at_premiere_common_init(const machine_t *, int); +extern int machine_at_revenge_init(const machine_t *); +extern int machine_at_m5pi_init(const machine_t *); +extern int machine_at_pb520r_init(const machine_t *); -extern void machine_at_sp4_common_init(const machine_t *model); +/* OPTi 597 */ +extern int machine_at_excalibur_init(const machine_t *); +extern int machine_at_globalyst330_p5_init(const machine_t *); +extern int machine_at_p5vl_init(const machine_t *); -extern int machine_at_v12p_init(const machine_t *); -extern int machine_at_excaliburpci_init(const machine_t *); -extern int machine_at_p5mp3_init(const machine_t *); -extern int machine_at_dellxp60_init(const machine_t *); -extern int machine_at_opti560l_init(const machine_t *); -extern int machine_at_ambradp60_init(const machine_t *); -extern int machine_at_valuepointp60_init(const machine_t *); -extern int machine_at_revenge_init(const machine_t *); -extern int machine_at_586is_init(const machine_t *); -extern int machine_at_pb520r_init(const machine_t *); -extern int machine_at_m5pi_init(const machine_t *); +/* SiS 501 */ +extern int machine_at_excaliburpci2_init(const machine_t *); +extern void machine_at_sp4_common_init(const machine_t *model); +extern int machine_at_p5sp4_init(const machine_t *); +extern int machine_at_ecs50x_init(const machine_t *); -extern int machine_at_excalibur_init(const machine_t *); - -extern int machine_at_globalyst330_p5_init(const machine_t *); -extern int machine_at_p5vl_init(const machine_t *); - -extern int machine_at_excaliburpci2_init(const machine_t *); -extern int machine_at_p5sp4_init(const machine_t *); +/* m_at_socket4_5.c */ +/* OPTi 597 */ +extern int machine_at_pci56001_init(const machine_t *); /* m_at_socket5.c */ -extern int machine_at_plato_init(const machine_t *); -extern int machine_at_dellplato_init(const machine_t *); -extern int machine_at_d842_init(const machine_t *); -extern int machine_at_ambradp90_init(const machine_t *); -extern int machine_at_p54np4_init(const machine_t *); -extern int machine_at_586ip_init(const machine_t *); -extern int machine_at_tek932_init(const machine_t *); +/* i430NX */ +extern int machine_at_ambradp90_init(const machine_t *); +extern int machine_at_p54np4_init(const machine_t *); +extern int machine_at_dellplato_init(const machine_t *); +extern int machine_at_586ip_init(const machine_t *); +extern int machine_at_plato_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t d842_device; +#endif +extern int machine_at_d842_init(const machine_t *); +extern int machine_at_tek932_init(const machine_t *); -extern int machine_at_acerv30_init(const machine_t *); -extern int machine_at_apollo_init(const machine_t *); -extern int machine_at_optiplexgxl_init(const machine_t *); -extern int machine_at_zappa_init(const machine_t *); -extern int machine_at_powermatev_init(const machine_t *); -extern int machine_at_hawk_init(const machine_t *); -extern int machine_at_pt2000_init(const machine_t *); +/* i430FX */ +extern int machine_at_acerv30_init(const machine_t *); +extern int machine_at_apollo_init(const machine_t *); +extern int machine_at_optiplexgxl_init(const machine_t *); +extern int machine_at_pt2000_init(const machine_t *); +extern int machine_at_zappa_init(const machine_t *); +extern int machine_at_powermatev_init(const machine_t *); +extern int machine_at_hawk_init(const machine_t *); -extern int machine_at_pat54pv_init(const machine_t *); +/* OPTi 597 */ +extern int machine_at_ncselp90_init(const machine_t *); +extern int machine_at_hot543_init(const machine_t *); +extern int machine_at_pat54pv_init(const machine_t *); -extern int machine_at_hot543_init(const machine_t *); -extern int machine_at_ncselp90_init(const machine_t *); +/* SiS 501 */ +extern int machine_at_p54sp4_init(const machine_t *); +extern int machine_at_sq588_init(const machine_t *); +extern int machine_at_p54sps_init(const machine_t *); +extern int machine_at_ms5109_init(const machine_t *); -extern int machine_at_p54sp4_init(const machine_t *); -extern int machine_at_sq588_init(const machine_t *); -extern int machine_at_p54sps_init(const machine_t *); +/* SiS 5501 */ +extern int machine_at_torino_init(const machine_t *); -extern int machine_at_ms5109_init(const machine_t *); -extern int machine_at_torino_init(const machine_t *); - -extern int machine_at_hot539_init(const machine_t *); +/* UMC 889x */ +extern int machine_at_hot539_init(const machine_t *); /* m_at_socket7_3v.c */ -extern int machine_at_p54tp4xe_init(const machine_t *); -extern int machine_at_p54tp4xe_mr_init(const machine_t *); -extern int machine_at_exp8551_init(const machine_t *); -extern int machine_at_gw2katx_init(const machine_t *); -extern int machine_at_thor_init(const machine_t *); -extern int machine_at_mrthor_init(const machine_t *); -extern uint32_t machine_at_endeavor_gpio_handler(uint8_t write, uint32_t val); -extern int machine_at_endeavor_init(const machine_t *); -extern int machine_at_ms5119_init(const machine_t *); -extern int machine_at_pb640_init(const machine_t *); -extern int machine_at_mb500n_init(const machine_t *); -extern int machine_at_fmb_init(const machine_t *); +/* i430FX */ +extern int machine_at_p54tp4xe_init(const machine_t *); +extern int machine_at_p54tp4xe_mr_init(const machine_t *); +extern int machine_at_exp8551_init(const machine_t *); +extern int machine_at_gw2katx_init(const machine_t *); +extern int machine_at_vectra54_init(const machine_t *); +extern int machine_at_thor_init(const machine_t *); +extern int machine_at_mrthor_init(const machine_t *); +extern uint32_t machine_at_endeavor_gpio_handler(uint8_t write, uint32_t val); +extern int machine_at_endeavor_init(const machine_t *); +extern int machine_at_ms5119_init(const machine_t *); +extern int machine_at_pb640_init(const machine_t *); +extern int machine_at_mb500n_init(const machine_t *); +extern int machine_at_fmb_init(const machine_t *); -extern int machine_at_acerm3a_init(const machine_t *); -extern int machine_at_ap53_init(const machine_t *); -extern int machine_at_8500tuc_init(const machine_t *); -extern int machine_at_d943_init(const machine_t *); -extern int machine_at_p55t2s_init(const machine_t *); +/* i430HX */ +extern int machine_at_acerv35n_init(const machine_t *); +extern int machine_at_ap53_init(const machine_t *); +extern int machine_at_8500tuc_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t d943_device; +#endif +extern int machine_at_d943_init(const machine_t *); -extern int machine_at_p5vxb_init(const machine_t *); -extern int machine_at_gw2kma_init(const machine_t *); +/* i430VX */ +extern int machine_at_gw2kma_init(const machine_t *); -extern int machine_at_ap5s_init(const machine_t *); -extern int machine_at_pc140_6260_init(const machine_t *); -extern int machine_at_ms5124_init(const machine_t *); -extern int machine_at_amis727_init(const machine_t *); -extern int machine_at_vectra54_init(const machine_t *); +/* SiS 5501 */ +#ifdef EMU_DEVICE_H +extern const device_t c5sbm2_device; +#endif +extern int machine_at_5sbm2_init(const machine_t *); -extern int machine_at_5sbm2_init(const machine_t *); +/* SiS 5511 */ +extern int machine_at_amis727_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t ap5s_device; +#endif +extern int machine_at_ap5s_init(const machine_t *); +extern int machine_at_pc140_6260_init(const machine_t *); +extern int machine_at_ms5124_init(const machine_t *); /* m_at_socket7.c */ -extern void machine_at_optiplex_21152_init(void); +/* i430HX */ +extern int machine_at_acerm3a_init(const machine_t *); +extern int machine_at_p55t2p4_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern void machine_at_p65up5_common_init(const machine_t *, const device_t *northbridge); +#endif +extern int machine_at_p65up5_cp55t2d_init(const machine_t *); +extern int machine_at_cu430hx_init(const machine_t *); +extern int machine_at_tc430hx_init(const machine_t *); +extern int machine_at_m7shi_init(const machine_t *); +extern int machine_at_epc2102_init(const machine_t *); +extern int machine_at_pcv90_init(const machine_t *); +extern int machine_at_p55t2s_init(const machine_t *); +extern int machine_at_equium5200_init(const machine_t *); +extern int machine_at_infinia7200_init(const machine_t *); -extern int machine_at_acerv35n_init(const machine_t *); -extern int machine_at_p55t2p4_init(const machine_t *); -extern int machine_at_m7shi_init(const machine_t *); -extern int machine_at_tc430hx_init(const machine_t *); -extern int machine_at_infinia7200_init(const machine_t *); -extern int machine_at_cu430hx_init(const machine_t *); -extern int machine_at_equium5200_init(const machine_t *); -extern int machine_at_pcv90_init(const machine_t *); -extern int machine_at_p65up5_cp55t2d_init(const machine_t *); -extern int machine_at_epc2102_init(const machine_t *); +/* i430VX */ +extern int machine_at_ap5vm_init(const machine_t *); +extern int machine_at_p55tvp4_init(const machine_t *); +extern int machine_at_5ivg_init(const machine_t *); +extern int machine_at_8500tvxa_init(const machine_t *); +extern int machine_at_presario2240_init(const machine_t *); +extern int machine_at_presario4500_init(const machine_t *); +extern int machine_at_dellhannibalp_init(const machine_t *); +extern int machine_at_p5vxb_init(const machine_t *); +extern int machine_at_p55va_init(const machine_t *); +extern int machine_at_gw2kte_init(const machine_t *); +extern int machine_at_brio80xx_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t lgibmx52_device; +#endif +extern int machine_at_lgibmx52_init(const machine_t *); +extern int machine_at_pb680_init(const machine_t *); +extern int machine_at_pb810_init(const machine_t *); +extern int machine_at_mb520n_init(const machine_t *); +extern int machine_at_i430vx_init(const machine_t *); -extern int machine_at_ap5vm_init(const machine_t *); -extern int machine_at_p55tvp4_init(const machine_t *); -extern int machine_at_5ivg_init(const machine_t *); -extern int machine_at_8500tvxa_init(const machine_t *); -extern int machine_at_presario2240_init(const machine_t *); -extern int machine_at_presario4500_init(const machine_t *); -extern int machine_at_dellhannibalp_init(const machine_t *); -extern int machine_at_p55va_init(const machine_t *); -extern int machine_at_brio80xx_init(const machine_t *); -extern int machine_at_pb680_init(const machine_t *); -extern int machine_at_pb810_init(const machine_t *); -extern int machine_at_mb520n_init(const machine_t *); -extern int machine_at_i430vx_init(const machine_t *); -extern int machine_at_gw2kte_init(const machine_t *); +/* i430TX */ +extern int machine_at_nupro592_init(const machine_t *); +extern int machine_at_tx97_init(const machine_t *); +extern void machine_at_optiplex_21152_init(void); +extern int machine_at_optiplexgn_init(const machine_t *); +extern int machine_at_tomahawk_init(const machine_t *); +extern int machine_at_ym430tx_init(const machine_t *); +extern int machine_at_thunderbolt_init(const machine_t *); +extern int machine_at_ma23c_init(const machine_t *); +extern int machine_at_an430tx_init(const machine_t *); +extern int machine_at_mb540n_init(const machine_t *); +extern int machine_at_56a5_init(const machine_t *); +extern int machine_at_p5mms98_init(const machine_t *); +extern int machine_at_richmond_init(const machine_t *); -extern int machine_at_ma23c_init(const machine_t *); -extern int machine_at_nupro592_init(const machine_t *); -extern int machine_at_tx97_init(const machine_t *); -extern int machine_at_optiplexgn_init(const machine_t *); -extern int machine_at_ym430tx_init(const machine_t *); -extern int machine_at_thunderbolt_init(const machine_t *); -extern int machine_at_an430tx_init(const machine_t *); -extern int machine_at_mb540n_init(const machine_t *); -extern int machine_at_56a5_init(const machine_t *); -extern int machine_at_p5mms98_init(const machine_t *); -extern int machine_at_richmond_init(const machine_t *); -extern int machine_at_tomahawk_init(const machine_t *); +/* VIA VPX */ +extern int machine_at_ficva502_init(const machine_t *); -extern int machine_at_ficva502_init(const machine_t *); +/* VIA VP3 */ +extern int machine_at_ficpa2012_init(const machine_t *); +extern int machine_at_via809ds_init(const machine_t *); -extern int machine_at_ficpa2012_init(const machine_t *); -extern int machine_at_via809ds_init(const machine_t *); +/* SiS 5571 */ +extern int machine_at_cb52xsi_init(const machine_t *); +extern int machine_at_ms5146_init(const machine_t *); +extern int machine_at_r534f_init(const machine_t *); -extern int machine_at_r534f_init(const machine_t *); -extern int machine_at_ms5146_init(const machine_t *); -extern int machine_at_cb52xsi_init(const machine_t *); +/* SiS 5581 */ +extern int machine_at_sp97xv_init(const machine_t *); +extern int machine_at_sq578_init(const machine_t *); -extern int machine_at_m560_init(const machine_t *); -extern int machine_at_ms5164_init(const machine_t *); +/* SiS 5591 */ +extern int machine_at_ms5172_init(const machine_t *); -extern int machine_at_sp97xv_init(const machine_t *); -extern int machine_at_sq578_init(const machine_t *); - -extern int machine_at_ms5172_init(const machine_t *); +/* ALi ALADDiN IV+ */ +extern int machine_at_m5ata_init(const machine_t *); +extern int machine_at_ms5164_init(const machine_t *); +extern int machine_at_m560_init(const machine_t *); /* m_at_sockets7.c */ -extern int machine_at_p5a_init(const machine_t *); -extern int machine_at_m579_init(const machine_t *); -extern int machine_at_gwlucas_init(const machine_t *); -extern int machine_at_5aa_init(const machine_t *); -extern int machine_at_5ax_init(const machine_t *); +/* ALi ALADDiN V */ +extern int machine_at_p5a_init(const machine_t *); +extern int machine_at_m579_init(const machine_t *); +extern int machine_at_gwlucas_init(const machine_t *); +extern int machine_at_5aa_init(const machine_t *); +extern int machine_at_5ax_init(const machine_t *); -extern int machine_at_ax59pro_init(const machine_t *); -extern int machine_at_mvp3_init(const machine_t *); -extern int machine_at_ficva503a_init(const machine_t *); -extern int machine_at_5emapro_init(const machine_t *); -extern int machine_at_delhi3_init(const machine_t *); +/* VIA MVP3 */ +extern int machine_at_ax59pro_init(const machine_t *); +extern int machine_at_delhi3_init(const machine_t *); +extern int machine_at_mvp3_init(const machine_t *); +extern int machine_at_ficva503a_init(const machine_t *); +extern int machine_at_5emapro_init(const machine_t *); -extern int machine_at_5sg100_init(const machine_t *); +/* SiS 5591 */ +extern int machine_at_5sg100_init(const machine_t *); /* m_at_socket8.c */ -extern int machine_at_ap61_init(const machine_t *); -extern int machine_at_p6rp4_init(const machine_t *); - -extern int machine_at_686nx_init(const machine_t *); -extern int machine_at_acerv60n_init(const machine_t *); -extern int machine_at_lgibmx61_init(const machine_t *); -extern int machine_at_vs440fx_init(const machine_t *); -extern int machine_at_dellvenus_init(const machine_t *); -extern int machine_at_gw2kvenus_init(const machine_t *); -extern int machine_at_ap440fx_init(const machine_t *); -extern int machine_at_mb600n_init(const machine_t *); -extern int machine_at_8600ttc_init(const machine_t *); -extern int machine_at_m6mi_init(const machine_t *); +/* i450KX */ +extern int machine_at_ap61_init(const machine_t *); #ifdef EMU_DEVICE_H -extern void machine_at_p65up5_common_init(const machine_t *, const device_t *northbridge); +extern const device_t ficpo6000_device; #endif -extern int machine_at_p65up5_cp6nd_init(const machine_t *); +extern int machine_at_p6rp4_init(const machine_t *); +extern int machine_at_ficpo6000_init(const machine_t *); + +/* i440FX */ +extern int machine_at_acerv60n_init(const machine_t *); +extern int machine_at_p65up5_cp6nd_init(const machine_t *); +extern int machine_at_8600ttc_init(const machine_t *); +extern int machine_at_dellvenus_init(const machine_t *); +extern int machine_at_gw2kvenus_init(const machine_t *); +extern int machine_at_686nx_init(const machine_t *); +extern int machine_at_ap440fx_init(const machine_t *); +extern int machine_at_vs440fx_init(const machine_t *); +extern int machine_at_lgibmx61_init(const machine_t *); +extern int machine_at_m6mi_init(const machine_t *); +extern int machine_at_mb600n_init(const machine_t *); /* m_at_slot1.c */ -extern int machine_at_m729_init(const machine_t *); +/* ALi ALADDiN-PRO II */ +extern int machine_at_m729_init(const machine_t *); -extern int machine_at_acerv62x_init(const machine_t *); -extern int machine_at_p65up5_cpknd_init(const machine_t *); -extern int machine_at_kn97_init(const machine_t *); +/* i440FX */ +extern int machine_at_acerv62x_init(const machine_t *); +extern int machine_at_p65up5_cpknd_init(const machine_t *); +extern int machine_at_kn97_init(const machine_t *); -extern int machine_at_lx6_init(const machine_t *); -extern int machine_at_optiplexgxa_init(const machine_t *); -extern int machine_at_spitfire_init(const machine_t *); -extern int machine_at_ma30d_init(const machine_t *); +/* i440LX */ +extern int machine_at_lx6_init(const machine_t *); +extern int machine_at_optiplexgxa_init(const machine_t *); +extern int machine_at_spitfire_init(const machine_t *); +extern int machine_at_ma30d_init(const machine_t *); -extern int machine_at_p6i440e2_init(const machine_t *); +/* i440EX */ +extern int machine_at_p6i440e2_init(const machine_t *); -extern int machine_at_p2bls_init(const machine_t *); -extern int machine_at_lgibmx7g_init(const machine_t *); -extern int machine_at_p3bf_init(const machine_t *); -extern int machine_at_bf6_init(const machine_t *); -extern int machine_at_bx6_init(const machine_t *); -extern int machine_at_ax6bc_init(const machine_t *); -extern int machine_at_atc6310bxii_init(const machine_t *); -extern int machine_at_686bx_init(const machine_t *); -extern int machine_at_s1846_init(const machine_t *); -extern int machine_at_p6sba_init(const machine_t *); -extern int machine_at_ficka6130_init(const machine_t *); -extern int machine_at_p3v133_init(const machine_t *); -extern int machine_at_p3v4x_init(const machine_t *); -extern int machine_at_gt694va_init(const machine_t *); +/* i440BX */ +extern int machine_at_bf6_init(const machine_t *); +extern int machine_at_bx6_init(const machine_t *); +extern int machine_at_ax6bc_init(const machine_t *); +extern int machine_at_p2bls_init(const machine_t *); +extern int machine_at_p3bf_init(const machine_t *); +extern int machine_at_686bx_init(const machine_t *); +extern int machine_at_lgibmx7g_init(const machine_t *); +extern int machine_at_p6sba_init(const machine_t *); +extern int machine_at_s1846_init(const machine_t *); -extern int machine_at_vei8_init(const machine_t *); +/* i440ZX */ +extern int machine_at_vei8_init(const machine_t *); +extern int machine_at_ms6168_init(const machine_t *); +extern int machine_at_borapro_init(const machine_t *); -extern int machine_at_borapro_init(const machine_t *); -extern int machine_at_ms6168_init(const machine_t *); +/* SMSC VictoryBX-66 */ +extern int machine_at_atc6310bxii_init(const machine_t *); -extern int machine_at_p6f99_init(const machine_t *); -extern int machine_at_m747_init(const machine_t *); +/* VIA Apollo Pro */ +extern int machine_at_ficka6130_init(const machine_t *); + +/* VIA Apollo Pro 133 */ +extern int machine_at_p3v133_init(const machine_t *); + +/* VIA Apollo Pro 133A */ +extern int machine_at_p3v4x_init(const machine_t *); +extern int machine_at_gt694va_init(const machine_t *); + +/* SiS 5600 */ +extern int machine_at_p6f99_init(const machine_t *); +extern int machine_at_m747_init(const machine_t *); + +/* m_at_slot1_2.c */ +/* i440GX */ +extern int machine_at_fw6400gx_init(const machine_t *); + +/* m_at_slot1_socket370.c */ +/* i440BX */ +extern int machine_at_prosignias31x_bx_init(const machine_t *); +extern int machine_at_s1857_init(const machine_t *); + +/* VIA Apollo Pro 133 */ +extern int machine_at_p6bat_init(const machine_t *); /* m_at_slot2.c */ -extern int machine_at_6gxu_init(const machine_t *); -extern int machine_at_s2dge_init(const machine_t *); -extern int machine_at_fw6400gx_init(const machine_t *); +/* i440GX */ +extern int machine_at_6gxu_init(const machine_t *); +extern int machine_at_s2dge_init(const machine_t *); /* m_at_socket370.c */ -extern int machine_at_s370slm_init(const machine_t *); +/* i440LX */ +extern int machine_at_s370slm_init(const machine_t *); -extern int machine_at_cubx_init(const machine_t *); -extern int machine_at_atc7020bxii_init(const machine_t *); -extern int machine_at_m773_init(const machine_t *); -extern int machine_at_ambx133_init(const machine_t *); -extern int machine_at_awo671r_init(const machine_t *); -extern int machine_at_63a1_init(const machine_t *); -extern int machine_at_s370sba_init(const machine_t *); -extern int machine_at_apas3_init(const machine_t *); -extern int machine_at_cuv4xls_init(const machine_t *); -extern int machine_at_6via90ap_init(const machine_t *); -extern int machine_at_s1857_init(const machine_t *); -extern int machine_at_p6bap_init(const machine_t *); -extern int machine_at_p6bat_init(const machine_t *); -extern int machine_at_prosignias31x_bx_init(const machine_t *); -extern int machine_at_7sbb_init(const machine_t *); +/* i440BX */ +extern int machine_at_awo671r_init(const machine_t *); +extern int machine_at_ambx133_init(const machine_t *); +extern int machine_at_cubx_init(const machine_t *); + +/* i440ZX */ +extern int machine_at_63a1_init(const machine_t *); + +/* SMSC VictoryBX-66 */ +extern int machine_at_atc7020bxii_init(const machine_t *); +extern int machine_at_m773_init(const machine_t *); + +/* VIA Apollo Pro */ +extern int machine_at_apas3_init(const machine_t *); + +/* VIA Apollo Pro 133 */ +extern int machine_at_p6bap_init(const machine_t *); + +/* VIA Apollo Pro 133A */ +extern int machine_at_6via90ap_init(const machine_t *); +extern int machine_at_cuv4xls_init(const machine_t *); + +/* SiS 600 */ +extern int machine_at_7sbb_init(const machine_t *); /* m_at_misc.c */ -extern int machine_at_vpc2007_init(const machine_t *); +extern int machine_at_vpc2007_init(const machine_t *); /* m_at_t3100e.c */ -extern int machine_at_t3100e_init(const machine_t *); - -/* m_at_grid.c */ -extern int machine_at_grid1520_init(const machine_t *); +extern int machine_at_t3100e_init(const machine_t *); /* m_elt.c */ extern int machine_elt_init(const machine_t *); /* m_europc.c */ -extern int machine_europc_init(const machine_t *); #ifdef EMU_DEVICE_H -extern const device_t europc_device; +extern const device_t europc_device; #endif +extern int machine_europc_init(const machine_t *); /* m_xt_olivetti.c */ -extern int machine_xt_m24_init(const machine_t *); -extern int machine_xt_m240_init(const machine_t *); -extern int machine_xt_m19_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t m19_vid_device; +#endif +extern int machine_xt_m19_init(const machine_t *); +extern int machine_xt_m24_init(const machine_t *); +extern int machine_xt_m240_init(const machine_t *); /* m_pcjr.c */ -extern int machine_pcjr_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t pcjr_device; +#endif +extern int machine_pcjr_init(const machine_t *); /* m_ps1.c */ -extern int machine_ps1_m2011_init(const machine_t *); -extern int machine_ps1_m2121_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t ps1_2011_device; +#endif +extern int machine_ps1_m2011_init(const machine_t *); +extern int machine_ps1_m2121_init(const machine_t *); /* m_ps1_hdc.c */ #ifdef EMU_DEVICE_H -extern void ps1_hdc_inform(void *, uint8_t *); -extern const device_t ps1_hdc_device; +extern void ps1_hdc_inform(void *, uint8_t *); +extern const device_t ps1_hdc_device; #endif /* m_ps2_isa.c */ -extern int machine_ps2_m30_286_init(const machine_t *); +extern int machine_ps2_m30_286_init(const machine_t *); /* m_ps2_mca.c */ -extern int machine_ps2_model_50_init(const machine_t *); -extern int machine_ps2_model_60_init(const machine_t *); -extern int machine_ps2_model_55sx_init(const machine_t *); -extern int machine_ps2_model_65sx_init(const machine_t *); -extern int machine_ps2_model_70_type3_init(const machine_t *); -extern int machine_ps2_model_80_init(const machine_t *); -extern int machine_ps2_model_80_axx_init(const machine_t *); -extern int machine_ps2_model_70_type4_init(const machine_t *); -extern int machine_ps55_model_50t_init(const machine_t*); -extern int machine_ps55_model_50v_init(const machine_t*); +extern int machine_ps2_model_50_init(const machine_t *); +extern int machine_ps2_model_60_init(const machine_t *); +extern int machine_ps2_model_55sx_init(const machine_t *); +extern int machine_ps2_model_65sx_init(const machine_t *); +extern int machine_ps2_model_70_type3_init(const machine_t *); +extern int machine_ps2_model_80_init(const machine_t *); +extern int machine_ps2_model_80_axx_init(const machine_t *); +extern int machine_ps2_model_70_type4_init(const machine_t *); +extern int machine_ps55_model_50t_init(const machine_t*); +extern int machine_ps55_model_50v_init(const machine_t*); /* m_tandy.c */ extern int tandy1k_eeprom_read(void); -extern int machine_tandy1000sx_init(const machine_t *); -extern int machine_tandy1000hx_init(const machine_t *); -extern int machine_tandy1000sl2_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t tandy_1000sx_video_device; +#endif +extern int machine_tandy1000sx_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t tandy_1000hx_video_device; +#endif +extern int machine_tandy1000hx_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t tandy_1000sl_video_device; +#endif +extern int machine_tandy1000sl2_init(const machine_t *); /* m_v86p.c */ -extern int machine_v86p_init(const machine_t *); +extern int machine_v86p_init(const machine_t *); /* m_xt.c */ -extern int machine_pc_init(const machine_t *); -extern int machine_pc82_init(const machine_t *); - -extern int machine_xt_init(const machine_t *); -extern int machine_genxt_init(const machine_t *); - -extern int machine_xt86_init(const machine_t *); - -extern int machine_xt_americxt_init(const machine_t *); -extern int machine_xt_amixt_init(const machine_t *); -extern int machine_xt_ataripc3_init(const machine_t *); -extern int machine_xt_dtk_init(const machine_t *); -extern int machine_xt_jukopc_init(const machine_t *); -extern int machine_xt_openxt_init(const machine_t *); -extern int machine_xt_pcxt_init(const machine_t *); -extern int machine_xt_pxxt_init(const machine_t *); -extern int machine_xt_pc4i_init(const machine_t *); -extern int machine_xt_mpc1600_init(const machine_t *); -extern int machine_xt_pcspirit_init(const machine_t *); -extern int machine_xt_pc700_init(const machine_t *); -extern int machine_xt_pc500_init(const machine_t *); -extern int machine_xt_vendex_init(const machine_t *); -extern int machine_xt_znic_init(const machine_t *); -extern int machine_xt_glabios_init(const machine_t *); -extern int machine_xt_super16t_init(const machine_t *); -extern int machine_xt_super16te_init(const machine_t *); -extern int machine_xt_top88_init(const machine_t *); -extern int machine_xt_kaypropc_init(const machine_t *); -extern int machine_xt_sansx16_init(const machine_t *); -extern int machine_xt_bw230_init(const machine_t *); -extern int machine_xt_pb8810_init(const machine_t *); -extern int machine_xt_tuliptc8_init(const machine_t *); - -extern int machine_xt_v20xt_init(const machine_t *); - -extern int machine_xt_iskra3104_init(const machine_t *); -extern int machine_xt_pravetz16_imko4_init(const machine_t *); -extern int machine_xt_pravetz16s_cpu12p_init(const machine_t *); -extern int machine_xt_micoms_xl7turbo_init(const machine_t *); -extern int machine_xt_maz1016_init(const machine_t *); - -/* m_xt_compaq.c */ -extern int machine_xt_compaq_deskpro_init(const machine_t *); -extern int machine_xt_compaq_portable_init(const machine_t *); - -/* m_xt_laserxt.c */ -extern int machine_xt_laserxt_init(const machine_t *); +/* 8088 */ #ifdef EMU_DEVICE_H -extern const device_t laserxt_device; +extern const device_t ibmpc_device; #endif -extern int machine_xt_lxt3_init(const machine_t *); +extern int machine_ibmpc_init(const machine_t *); #ifdef EMU_DEVICE_H -extern const device_t lxt3_device; +extern const device_t ibmpc82_device; #endif +extern int machine_ibmpc82_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t ibmxt_device; +#endif +extern int machine_ibmxt_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t ibmxt86_device; +#endif +extern int machine_ibmxt86_init(const machine_t *); +extern int machine_xt_americxt_init(const machine_t *); +extern int machine_xt_amixt_init(const machine_t *); +extern int machine_xt_ataripc3_init(const machine_t *); +extern int machine_xt_bw230_init(const machine_t *); +extern int machine_xt_mpc1600_init(const machine_t *); +extern int machine_xt_compaq_portable_init(const machine_t *); +extern int machine_xt_dtk_init(const machine_t *); +extern int machine_xt_pcspirit_init(const machine_t *); +extern int machine_genxt_init(const machine_t *); +extern int machine_xt_glabios_init(const machine_t *); +extern int machine_xt_top88_init(const machine_t *); +extern int machine_xt_super16t_init(const machine_t *); +extern int machine_xt_super16te_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t jukopc_device; +#endif +extern int machine_xt_jukopc_init(const machine_t *); +extern int machine_xt_kaypropc_init(const machine_t *); +extern int machine_xt_micoms_xl7turbo_init(const machine_t *); +extern int machine_xt_pc500_init(const machine_t *); +extern int machine_xt_pc700_init(const machine_t *); +extern int machine_xt_pc4i_init(const machine_t *); +extern int machine_xt_openxt_init(const machine_t *); +extern int machine_xt_p3105_init(const machine_t *); +extern int machine_xt_pxxt_init(const machine_t *); +extern int machine_xt_pravetz16_imko4_init(const machine_t *); +extern int machine_xt_pravetz16s_cpu12p_init(const machine_t *); +extern int machine_xt_pb8810_init(const machine_t *); +extern int machine_xt_sansx16_init(const machine_t *); +extern int machine_xt_pcxt_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t vendex_device; +#endif +extern int machine_xt_vendex_init(const machine_t *); +extern int machine_xt_laserxt_init(const machine_t *); +extern int machine_xt_znic_init(const machine_t *); +extern int machine_xt_z151_init(const machine_t *); +extern int machine_xt_z159_init(const machine_t *); +extern int machine_xt_z184_init(const machine_t *); + +/* GC100A */ +extern int machine_xt_p3120_init(const machine_t *); + +/* V20 */ +extern int machine_xt_v20xt_init(const machine_t *); +extern int machine_xt_tuliptc8_init(const machine_t *); + +/* 8086 */ +extern int machine_xt_pc5086_init(const machine_t *); +extern int machine_xt_maz1016_init(const machine_t *); +extern int machine_xt_iskra3104_init(const machine_t *); +extern int machine_xt_lxt3_init(const machine_t *); +extern int machine_xt_compaq_deskpro_init(const machine_t *); -/* m_xt_philips.c */ -extern int machine_xt_p3105_init(const machine_t *); -extern int machine_xt_p3120_init(const machine_t *); /* m_xt_t1000.c */ -extern int machine_xt_t1000_init(const machine_t *); -extern int machine_xt_t1200_init(const machine_t *); - -/* m_xt_zenith.c */ -extern int machine_xt_z184_init(const machine_t *); -extern int machine_xt_z151_init(const machine_t *); -extern int machine_xt_z159_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t t1000_video_device; +extern const device_t t1200_video_device; +#endif +extern int machine_xt_t1000_init(const machine_t *); +extern int machine_xt_t1200_init(const machine_t *); /* m_xt_xi8088.c */ -extern int machine_xt_xi8088_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t xi8088_device; +#endif +extern int machine_xt_xi8088_init(const machine_t *); #endif /*EMU_MACHINE_H*/ diff --git a/src/include/86box/machine_status.h b/src/include/86box/machine_status.h index e6e9e6acd..c5640ac08 100644 --- a/src/include/86box/machine_status.h +++ b/src/include/86box/machine_status.h @@ -5,6 +5,7 @@ typedef struct dev_status_empty_active_t { atomic_bool_t empty; atomic_bool_t active; atomic_bool_t write_active; + atomic_bool_t write_prot; } dev_status_empty_active_t; typedef struct dev_status_active_t { @@ -19,7 +20,7 @@ typedef struct dev_status_empty_t { typedef struct machine_status_t { dev_status_empty_active_t fdd[FDD_NUM]; dev_status_empty_active_t cdrom[CDROM_NUM]; - dev_status_empty_active_t zip[ZIP_NUM]; + dev_status_empty_active_t rdisk[RDISK_NUM]; dev_status_empty_active_t mo[MO_NUM]; dev_status_empty_active_t cassette; dev_status_active_t hdd[HDD_BUS_USB]; diff --git a/src/include/86box/mo.h b/src/include/86box/mo.h index fc297ffbb..6d308adb8 100644 --- a/src/include/86box/mo.h +++ b/src/include/86box/mo.h @@ -84,10 +84,11 @@ static const mo_drive_type_t mo_drive_types[KNOWN_MO_DRIVE_TYPES] = { }; enum { - MO_BUS_DISABLED = 0, - MO_BUS_ATAPI = 5, - MO_BUS_SCSI = 6, - MO_BUS_USB = 7 + MO_BUS_DISABLED = 0, + MO_BUS_LPT = 6, + MO_BUS_ATAPI = 8, + MO_BUS_SCSI = 9, + MO_BUS_USB = 10 }; typedef struct mo_drive_t { diff --git a/src/include/86box/mouse.h b/src/include/86box/mouse.h index 79325edef..9745de444 100644 --- a/src/include/86box/mouse.h +++ b/src/include/86box/mouse.h @@ -26,7 +26,7 @@ #endif #define MOUSE_TYPE_NONE 0 /* no mouse configured */ -#define MOUSE_TYPE_INTERNAL 1 /* achine has internal mouse */ +#define MOUSE_TYPE_INTERNAL 1 /* machine has internal mouse */ #define MOUSE_TYPE_LOGIBUS 2 /* Logitech/ATI Bus Mouse */ #define MOUSE_TYPE_INPORT 3 /* Microsoft InPort Mouse */ #if 0 @@ -43,7 +43,9 @@ #define MOUSE_TYPE_WACOMARTP 13 /* WACOM tablet (ArtPad) */ #define MOUSE_TYPE_MSYSTEMSB 14 /* Mouse Systems bus mouse */ #define MOUSE_TYPE_MSBPOINT 15 /* Microsoft Serial BallPoint mouse */ +#define MOUSE_TYPE_PS2_QPORT 27 /* PS/2 QuickPort series Bus Mouse */ +#define MOUSE_TYPE_QPORT 0x40 /* Mouse is an on-board version of one of the above. */ #define MOUSE_TYPE_ONBOARD 0x80 /* Mouse is an on-board version of one of the above. */ @@ -75,6 +77,8 @@ extern const device_t mouse_msserial_device; extern const device_t mouse_msserial_ballpoint_device; extern const device_t mouse_ltserial_device; extern const device_t mouse_ps2_device; +extern const device_t mouse_upc_device; +extern const device_t mouse_upc_standalone_device; # ifdef USE_WACOM extern const device_t mouse_wacom_device; extern const device_t mouse_wacom_artpad_device; @@ -110,6 +114,7 @@ extern void mouse_subtract_w(int *delta_w, int min, int max, int inve extern void mouse_set_buttons_ex(int b); extern int mouse_get_buttons_ex(void); extern void mouse_set_sample_rate(double new_rate); +extern void mouse_update_sample_rate(void); extern void mouse_set_buttons(int buttons); extern void mouse_get_abs_coords(double *x_abs, double *y_abs); extern void mouse_process(void); @@ -131,6 +136,11 @@ extern void mouse_init(void); extern void mouse_bus_set_irq(void *priv, int irq); +extern void mouse_upc_port_handler(int num, int set, uint16_t port, void *priv); +extern void mouse_upc_handler(int set, uint16_t port, void *priv); + +extern void mouse_upc_set_irq(int num, uint16_t irq, void *priv); + #ifdef __cplusplus } #endif diff --git a/src/include/86box/network.h b/src/include/86box/network.h index a0d1bc3cb..01454c6f9 100644 --- a/src/include/86box/network.h +++ b/src/include/86box/network.h @@ -48,11 +48,13 @@ #include /* Network provider types. */ -#define NET_TYPE_NONE 0 /* use the null network driver */ -#define NET_TYPE_SLIRP 1 /* use the SLiRP port forwarder */ -#define NET_TYPE_PCAP 2 /* use the (Win)Pcap API */ -#define NET_TYPE_VDE 3 /* use the VDE plug API */ -#define NET_TYPE_TAP 4 /* use a linux TAP device */ +#define NET_TYPE_NONE 0 /* use the null network driver */ +#define NET_TYPE_SLIRP 1 /* use the SLiRP port forwarder */ +#define NET_TYPE_PCAP 2 /* use the (Win)Pcap API */ +#define NET_TYPE_VDE 3 /* use the VDE plug API */ +#define NET_TYPE_TAP 4 /* use a linux TAP device */ +#define NET_TYPE_NMSWITCH 5 /* use the network multicast switch provider */ +#define NET_TYPE_NRSWITCH 6 /* use the network remote switch provider */ #define NET_MAX_FRAME 1518 /* Queue size must be a power of 2 */ @@ -96,6 +98,9 @@ typedef struct netcard_conf_t { int net_type; char host_dev_name[128]; uint32_t link_state; + uint8_t switch_group; + uint8_t promisc_mode; + char nrs_hostname[128]; } netcard_conf_t; extern netcard_conf_t net_cards_conf[NET_CARD_MAX]; @@ -129,6 +134,7 @@ extern const netdrv_t net_slirp_drv; extern const netdrv_t net_vde_drv; extern const netdrv_t net_tap_drv; extern const netdrv_t net_null_drv; +extern const netdrv_t net_netswitch_drv; struct _netcard_t { const device_t *device; @@ -194,6 +200,7 @@ extern int network_dev_available(int); extern int network_dev_to_id(char *); extern int network_card_available(int); extern int network_card_has_config(int); +extern int network_type_has_config(int); extern const char *network_card_get_internal_name(int); extern int network_card_get_from_internal_name(char *); #ifdef EMU_DEVICE_H diff --git a/src/include/86box/plat.h b/src/include/86box/plat.h index e6a366f4c..7b8a34857 100644 --- a/src/include/86box/plat.h +++ b/src/include/86box/plat.h @@ -143,9 +143,10 @@ extern int plat_getcwd(char *bufp, int max); 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_get_global_config_dir(char *outbuf, uint8_t len); -extern void plat_get_global_data_dir(char *outbuf, uint8_t len); +extern void plat_get_global_config_dir(char *outbuf, size_t len); +extern void plat_get_global_data_dir(char *outbuf, size_t len); extern void plat_get_temp_dir(char *outbuf, uint8_t len); +extern void plat_get_vmm_dir(char *outbuf, size_t len); extern void plat_init_rom_paths(void); extern int plat_dir_check(char *path); extern int plat_dir_create(char *path); @@ -185,9 +186,9 @@ extern void floppy_mount(uint8_t id, char *fn, uint8_t wp); extern void floppy_eject(uint8_t id); extern void cdrom_mount(uint8_t id, char *fn); extern void plat_cdrom_ui_update(uint8_t id, uint8_t reload); -extern void zip_eject(uint8_t id); -extern void zip_mount(uint8_t id, char *fn, uint8_t wp); -extern void zip_reload(uint8_t id); +extern void rdisk_eject(uint8_t id); +extern void rdisk_mount(uint8_t id, char *fn, uint8_t wp); +extern void rdisk_reload(uint8_t id); extern void mo_eject(uint8_t id); extern void mo_mount(uint8_t id, char *fn, uint8_t wp); extern void mo_reload(uint8_t id); diff --git a/src/include/86box/prt_devs.h b/src/include/86box/prt_devs.h index 1379c8fa8..d136d9d93 100644 --- a/src/include/86box/prt_devs.h +++ b/src/include/86box/prt_devs.h @@ -2,10 +2,14 @@ #define EMU_PRT_DEVS_H extern const lpt_device_t lpt_prt_text_device; +extern const device_t prt_text_device; extern const lpt_device_t lpt_prt_escp_device; +extern const device_t prt_escp_device; extern const lpt_device_t lpt_prt_ps_device; +extern const device_t prt_ps_device; #ifdef USE_PCL extern const lpt_device_t lpt_prt_pcl_device; +extern const device_t prt_pcl_device; #endif #endif /*EMU_PRT_DEVS_H*/ diff --git a/src/include/86box/prt_papersizes.h b/src/include/86box/prt_papersizes.h new file mode 100644 index 000000000..c45c74568 --- /dev/null +++ b/src/include/86box/prt_papersizes.h @@ -0,0 +1,50 @@ +/* + * 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. + * + * Define the various paper sizes for printers. + * + * Authors: Jasmine Iwanek, + * + * Copyright 2025 Jasmine Iwanek + */ +#ifndef EMU_PRT_PAPERSIZES_H +#define EMU_PRT_PAPERSIZES_H + +/* Standard U.S. Letter */ +#define LETTER_PAGE_WIDTH 8.5 +#define LETTER_PAGE_HEIGHT 11.0 + +/* Standard U.S. Legal */ +#define LEGAL_PAGE_WIDTH 8.5 +#define LEGAL_PAGE_HEIGHT 14.0 + +/* Standard U.S. Ledger */ +#define LEDGER_PAGE_WIDTH 11.0 +#define LEDGER_PAGE_HEIGHT 17.0 + +/* Standard A0 */ +#define A0_PAGE_WIDTH 33.125 +#define A0_PAGE_HEIGHT 46.75 + +/* Standard A1 */ +#define A1_PAGE_WIDTH 23.375 +#define A1_PAGE_HEIGHT 33.125 + +/* Standard A2 */ +#define A2_PAGE_WIDTH 16.5 +#define A2_PAGE_HEIGHT 23.375 + +/* Standard A3 */ +#define A3_PAGE_WIDTH 11.75 +#define A3_PAGE_HEIGHT 16.5 + +/* Standard A4 */ +#define A4_PAGE_WIDTH 8.25 +#define A4_PAGE_HEIGHT 11.75 + +#endif /*EMU_PLAT_FALLTHROUGH_H*/ diff --git a/src/include/86box/zip.h b/src/include/86box/rdisk.h similarity index 52% rename from src/include/86box/zip.h rename to src/include/86box/rdisk.h index 969ce27f5..df48ba703 100644 --- a/src/include/86box/zip.h +++ b/src/include/86box/rdisk.h @@ -16,29 +16,62 @@ * Copyright 2018-2025 Miran Grca. */ -#ifndef EMU_ZIP_H -#define EMU_ZIP_H +#ifndef EMU_RDISK_H +#define EMU_RDISK_H -#define ZIP_NUM 4 +#define RDISK_NUM 4 -#define BUF_SIZE 32768 +#define BUF_SIZE 32768 -#define ZIP_TIME 10.0 +#define RDISK_TIME 10.0 -#define ZIP_SECTORS (96 * 2048) +#define ZIP_SECTORS (96 * 2048) -#define ZIP_250_SECTORS (489532) +#define ZIP_250_SECTORS (489532) -#define ZIP_IMAGE_HISTORY 10 +#define RDISK_IMAGE_HISTORY 10 enum { - ZIP_BUS_DISABLED = 0, - ZIP_BUS_ATAPI = 5, - ZIP_BUS_SCSI = 6, - ZIP_BUS_USB = 7 + RDISK_TYPE_GENERIC = 0, + RDISK_TYPE_ZIP_100, + RDISK_TYPE_ZIP_250 }; -typedef struct zip_drive_t { +typedef struct rdisk_type_t { + uint32_t sectors; + uint16_t bytes_per_sector; +} rdisk_type_t; + +#define KNOWN_RDISK_TYPES 2 +static const rdisk_type_t rdisk_types[KNOWN_RDISK_TYPES] = { + { ZIP_SECTORS, 512 }, + { ZIP_250_SECTORS, 512 }, +}; + +typedef struct rdisk_drive_type_t { + const char *vendor; + const char *model; + const char *revision; + int8_t supported_media[KNOWN_RDISK_TYPES]; +} rdisk_drive_type_t; + +#define KNOWN_RDISK_DRIVE_TYPES 3 +static const rdisk_drive_type_t rdisk_drive_types[KNOWN_RDISK_DRIVE_TYPES] = { + { "86BOX", "REMOVABLE DISK", "5.00", { 1, 1 }}, + { "IOMEGA", "ZIP 100", "E.08", { 1, 0 }}, + { "IOMEGA", "ZIP 250", "42.S", { 1, 1 }} +}; + +enum { + RDISK_BUS_DISABLED = 0, + RDISK_BUS_LPT = 6, + RDISK_BUS_IDE = 7, + RDISK_BUS_ATAPI = 8, + RDISK_BUS_SCSI = 9, + RDISK_BUS_USB = 10 +}; + +typedef struct rdisk_drive_t { uint8_t id; union { @@ -64,17 +97,17 @@ typedef struct zip_drive_t { char image_path[1024]; char prev_image_path[1024]; - char *image_history[ZIP_IMAGE_HISTORY]; + char *image_history[RDISK_IMAGE_HISTORY]; - uint32_t is_250; + uint32_t type; uint32_t medium_size; uint32_t base; -} zip_drive_t; +} rdisk_drive_t; -typedef struct zip_t { +typedef struct rdisk_t { mode_sense_pages_t ms_pages_saved; - zip_drive_t *drv; + rdisk_drive_t *drv; #ifdef EMU_IDE_H ide_tf_t *tf; #else @@ -113,37 +146,37 @@ typedef struct zip_t { double callback; uint8_t (*ven_cmd)(void *sc, uint8_t *cdb, int32_t *BufLen); -} zip_t; +} rdisk_t; -extern zip_t *zip[ZIP_NUM]; -extern zip_drive_t zip_drives[ZIP_NUM]; -extern uint8_t atapi_zip_drives[8]; -extern uint8_t scsi_zip_drives[16]; +extern rdisk_t *rdisk[RDISK_NUM]; +extern rdisk_drive_t rdisk_drives[RDISK_NUM]; +extern uint8_t atapi_rdisk_drives[8]; +extern uint8_t scsi_rdisk_drives[16]; -#define zip_sense_error dev->sense[0] -#define zip_sense_key dev->sense[2] -#define zip_info *(uint32_t *) &(dev->sense[3]) -#define zip_asc dev->sense[12] -#define zip_ascq dev->sense[13] +#define rdisk_sense_error dev->sense[0] +#define rdisk_sense_key dev->sense[2] +#define rdisk_info *(uint32_t *) &(dev->sense[3]) +#define rdisk_asc dev->sense[12] +#define rdisk_ascq dev->sense[13] #ifdef __cplusplus extern "C" { #endif -extern void zip_disk_close(const zip_t *dev); -extern void zip_disk_reload(const zip_t *dev); -extern void zip_insert(zip_t *dev); +extern void rdisk_disk_close(const rdisk_t *dev); +extern void rdisk_disk_reload(const rdisk_t *dev); +extern void rdisk_insert(rdisk_t *dev); -extern void zip_global_init(void); -extern void zip_hard_reset(void); +extern void rdisk_global_init(void); +extern void rdisk_hard_reset(void); -extern void zip_reset(scsi_common_t *sc); -extern int zip_is_empty(const uint8_t id); -extern void zip_load(const zip_t *dev, const char *fn, const int skip_insert); -extern void zip_close(void); +extern void rdisk_reset(scsi_common_t *sc); +extern int rdisk_is_empty(const uint8_t id); +extern void rdisk_load(const rdisk_t *dev, const char *fn, const int skip_insert); +extern void rdisk_close(void); #ifdef __cplusplus } #endif -#endif /*EMU_ZIP_H*/ +#endif /*EMU_RDISK_H*/ diff --git a/src/include/86box/scsi_pcscsi.h b/src/include/86box/scsi_pcscsi.h index 8547aba25..c4dbedeff 100644 --- a/src/include/86box/scsi_pcscsi.h +++ b/src/include/86box/scsi_pcscsi.h @@ -26,6 +26,7 @@ #define SCSI_PCSCSI_H extern const device_t am53c974_pci_device; +extern const device_t am53c974a_pci_device; extern const device_t dc390_pci_device; extern const device_t ncr53c90a_mca_device; diff --git a/src/include/86box/serial.h b/src/include/86box/serial.h index 31c77ce5a..c6389a262 100644 --- a/src/include/86box/serial.h +++ b/src/include/86box/serial.h @@ -135,7 +135,6 @@ extern serial_t *serial_attach_ex_2(int port, serial_attach_ex(port, rcr_callback, dev_write, NULL, NULL, priv); extern void serial_remove(serial_t *dev); -extern void serial_set_type(serial_t *dev, int type); extern void serial_setup(serial_t *dev, uint16_t addr, uint8_t irq); extern void serial_irq(serial_t *dev, uint8_t irq); extern void serial_clear_fifo(serial_t *dev); @@ -143,6 +142,7 @@ extern void serial_write_fifo(serial_t *dev, uint8_t dat); extern void serial_set_next_inst(int ni); extern void serial_standalone_init(void); extern void serial_set_clock_src(serial_t *dev, double clock_src); +extern void serial_set_type(serial_t *dev, uint8_t type); extern void serial_reset_port(serial_t *dev); extern uint8_t serial_read(uint16_t addr, void *priv); extern void serial_device_timeout(void *priv); @@ -151,6 +151,7 @@ extern void serial_set_dsr(serial_t *dev, uint8_t enabled); extern void serial_set_dcd(serial_t *dev, uint8_t enabled); extern void serial_set_ri(serial_t *dev, uint8_t enabled); extern int serial_get_ri(serial_t *dev); +extern uint8_t serial_get_shadow(serial_t *dev); extern const device_t ns8250_device; extern const device_t ns8250_pcjr_device; diff --git a/src/include/86box/sio.h b/src/include/86box/sio.h index 72878ff46..2bae49ae1 100644 --- a/src/include/86box/sio.h +++ b/src/include/86box/sio.h @@ -26,97 +26,121 @@ extern const device_t ali5123_device; extern const device_t f82c606_device; extern const device_t f82c710_device; +extern const device_t f82c710_pc5086_device; +/* Commodore */ +extern const device_t cbm_io_device; + +/* Dataworld 90C50 (COMBAT) */ +#define DW90C50_IDE 0x00001 + +extern const device_t dw90c50_device; + +extern const device_t pc87310_device; /* SM(S)C */ -extern const device_t fdc37c651_device; -extern const device_t fdc37c651_ide_device; -extern const device_t fdc37c661_device; -extern const device_t fdc37c661_ide_device; -extern const device_t fdc37c661_ide_sec_device; -extern const device_t fdc37c663_device; -extern const device_t fdc37c663_ide_device; -extern const device_t fdc37c665_device; -extern const device_t fdc37c665_ide_device; -extern const device_t fdc37c665_ide_pri_device; -extern const device_t fdc37c665_ide_sec_device; -extern const device_t fdc37c666_device; +#define FDC37C651 0x00051 +#define FDC37C661 0x00061 +#define FDC37C663 0x00063 +#define FDC37C665 0x00065 +#define FDC37C666 0x00066 + +#define FDC37C6XX_IDE_PRI 0x00100 +#define FDC37C6XX_IDE_SEC 0x00200 + +#define FDC37C6XX_370 0x00400 + +extern const device_t fdc37c6xx_device; extern const device_t fdc37c669_device; -extern const device_t fdc37c669_370_device; -extern const device_t fdc37c67x_device; +#define FDC37C93X_NORMAL 0x00002 +#define FDC37C93X_FR 0x00003 +#define FDC37C93X_APM 0x00030 +#define FDC37C93X_CHIP_ID 0x000ff -#define FDC37C93X_NORMAL 0x0002 -#define FDC37C93X_FR 0x0003 -#define FDC37C93X_APM 0x0030 -#define FDC37C93X_CHIP_ID 0x00ff +#define FDC37XXX1 0x00100 /* Compaq KBC firmware and configuration registers on GPIO ports. */ +#define FDC37XXX2 0x00200 /* AMI '5' Megakey KBC firmware. */ +#define FDC37XXX3 0x00300 /* IBM KBC firmware. */ +#define FDC37XXX5 0x00500 /* Phoenix Multikey/42 1.38 KBC firmware. */ +#define FDC37XXX7 0x00700 /* Phoenix Multikey/42i 4.16 KBC firmware. */ +#define FDC37XXXX_KBC 0x00f00 -#define FDC37C931 0x0100 /* Compaq KBC firmware and configuration registers on GPIO ports. */ -#define FDC37C932 0x0200 /* AMI '5' Megakey KBC firmware. */ -#define FDC37C933 0x0300 /* IBM KBC firmware. */ -#define FDC37C935 0x0500 /* Phoenix Multikey/42 1.38 KBC firmware. */ -#define FDC37C937 0x0700 /* Phoenix Multikey/42i 4.16 KBC firmware. */ -#define FDC37C93X_KBC 0x0f00 - -#define FDC37C93X_NO_NVR 0x1000 -#define FDC37C93X_370 0x2000 +#define FDC37C93X_NO_NVR 0x01000 +#define FDC37XXXX_370 0x02000 extern const device_t fdc37c93x_device; extern const device_t fdc37m60x_device; -extern const device_t fdc37m60x_370_device; + +extern const device_t fdc37c67x_device; /* ITE */ extern const device_t it8661f_device; extern const device_t it8671f_device; /* Intel */ +#define I82091AA_022 0x00000 /* Default. */ +#define I82091AA_024 0x00008 +#define I82091AA_26E 0x00100 +#define I82091AA_398 0x00108 + +#define I82091AA_IDE_PRI 0x00200 +#define I82091AA_IDE_SEC 0x00400 + extern const device_t i82091aa_device; -extern const device_t i82091aa_26e_device; -extern const device_t i82091aa_398_device; -extern const device_t i82091aa_ide_pri_device; -extern const device_t i82091aa_ide_device; /* National Semiconductors PC87310 / ALi M5105 */ -#define PC87310_IDE 0x0001 -#define PC87310_ALI 0x0002 +#define PCX73XX_IDE 0x00001 + +#define PCX73XX_IDE_PRI PCX73XX_IDE +#define PCX73XX_IDE_SEC 0x00002 + +#define PCX73XX_FDC_ON 0x10000 + +#define PC87310_ALI 0x00004 +#define PC87332 PC87310_ALI extern const device_t pc87310_device; /* National Semiconductors */ +#define PCX7307_PC87307 0x000c0 +#define PCX7307_PC97307 0x000cf + +#define PC87309_PC87309 0x000e0 + +#define PCX730X_CHIP_ID 0x000ff + +#define PCX730X_AMI 0x00200 /* AMI '5' Megakey KBC firmware. */ +#define PCX730X_PHOENIX_42 0x00500 /* Phoenix Multikey/42 1.37 KBC firmware. */ +#define PCX730X_PHOENIX_42I 0x00700 /* Phoenix Multikey/42i 4.16 KBC firmware. */ +#define PCX730X_KBC 0x00f00 + +#define PCX730X_398 0x00000 +#define PCX730X_26E 0x01000 +#define PCX730X_15C 0x02000 +#define PCX730X_02E 0x03000 +#define PCX730X_BADDR 0x03000 +#define PCX730X_BADDR_SHIFT 12 + extern const device_t pc87306_device; -extern const device_t pc87311_device; -extern const device_t pc87311_ide_device; -extern const device_t pc87332_device; -extern const device_t pc87332_398_device; -extern const device_t pc87332_398_ide_device; -extern const device_t pc87332_398_ide_sec_device; -extern const device_t pc87332_398_ide_fdcon_device; + +extern const device_t pc873xx_device; /* National Semiconductors PC87307 / PC87309 */ -#define PCX7307_PC87307 0x00c0 -#define PCX7307_PC97307 0x00cf - -#define PC87309_PC87309 0x00e0 - -#define PCX730X_CHIP_ID 0x00ff - -#define PCX730X_AMI 0x0200 /* AMI '5' Megakey KBC firmware. */ -#define PCX730X_PHOENIX_42 0x0500 /* Phoenix Multikey/42 1.37 KBC firmware. */ -#define PCX730X_PHOENIX_42I 0x0700 /* Phoenix Multikey/42i 4.16 KBC firmware. */ -#define PCX730X_KBC 0x0f00 - -#define PCX730X_15C 0x2000 - extern const device_t pc87307_device; extern const device_t pc87309_device; /* LG Prime */ -extern const device_t prime3b_device; -extern const device_t prime3b_ide_device; -extern const device_t prime3c_device; -extern const device_t prime3c_ide_device; +#define GM82C803A 0x00000 +#define GM82C803B 0x00001 + +#define GM82C803_IDE_PRI 0x00100 +#define GM82C803_IDE_SEC 0x00200 + +extern const device_t gm82c803ab_device; + +extern const device_t gm82c803c_device; /* IBM PS/1 */ extern const device_t ps1_m2133_sio; @@ -127,20 +151,17 @@ extern const device_t sio_detect_device; #endif /* USE_SIO_DETECT */ /* UMC */ -extern const device_t um82c862f_device; -extern const device_t um82c862f_ide_device; -extern const device_t um82c863f_device; -extern const device_t um82c863f_ide_device; -extern const device_t um8663af_device; -extern const device_t um8663af_ide_device; -extern const device_t um8663af_sec_device; -extern const device_t um8663bf_device; -extern const device_t um8663bf_ide_device; -extern const device_t um8663bf_sec_device; +#define UM82C862F 0x00000 +#define UM82C863F 0x0c100 +#define UM8663AF 0x0c300 +#define UM8663BF 0x0c400 + +#define UM866X_IDE_PRI 0x00001 +#define UM866X_IDE_SEC 0x00002 + +extern const device_t um866x_device; extern const device_t um8669f_device; -extern const device_t um8669f_ide_device; -extern const device_t um8669f_ide_sec_device; /* VIA */ extern void vt82c686_sio_write(uint8_t addr, uint8_t val, void *priv); @@ -151,26 +172,43 @@ extern const device_t via_vt82c686_sio_device; extern const device_t vl82c113_device; /* Winbond */ -extern const device_t w83787f_88h_device; -extern const device_t w83787f_device; -extern const device_t w83787f_ide_device; -extern const device_t w83787f_ide_en_device; -extern const device_t w83787f_ide_sec_device; +#define W83777F 0x00007 +#define W83787F 0x00008 +#define W83787IF 0x00009 -extern const device_t w83877f_device; -extern const device_t w83877f_president_device; -extern const device_t w83877tf_device; -extern const device_t w83877tf_acorp_device; +#define W837X7_KEY_88 0x00000 +#define W837X7_KEY_89 0x00020 -#define TYPE_W83977EF 0x52F0 -#define TYPE_W83977F 0x9771 -#define TYPE_W83977TF 0x9773 -#define TYPE_W83977ATF 0x9774 +#define W837X7_IDE_START 0x00040 -extern const device_t w83977f_device; -extern const device_t w83977f_370_device; -extern const device_t w83977tf_device; -extern const device_t w83977ef_device; -extern const device_t w83977ef_370_device; +#define W83XX7_IDE_PRI 0x10000 +#define W83XX7_IDE_SEC 0x20000 + +extern const device_t w837x7_device; + +#define W83877F 0x00a00 +#define W83877TF 0x00c00 +#define W83877_3F0 0x00005 +#define W83877_250 0x00004 + +extern const device_t w83877_device; + +#define W83977F 0x977100 +#define W83977TF 0x977300 +#define W83977EF 0x52f000 +#define W83977_TYPE 0xffff00 +#define W83977_TYPE_SHIFT 8 + +#define W83977_3F0 0x00000 +#define W83977_370 0x00001 + +#define W83977_NO_NVR 0x00002 + +#define W83977_AMI 0x00010 /* AMI 'H' KBC firmware. */ +#define W83977_PHOENIX 0x00020 /* Unknown Phoenix Multikey KBC firmware. */ + +#define W83977_KBC 0x000f0 + +extern const device_t w83977_device; #endif /*EMU_SIO_H*/ diff --git a/src/include/86box/sound.h b/src/include/86box/sound.h index 985abe777..5f91ec9d0 100644 --- a/src/include/86box/sound.h +++ b/src/include/86box/sound.h @@ -12,9 +12,11 @@ * * Authors: Sarah Walker, * Miran Grca, + * Jasmine Iwanek, * * Copyright 2008-2018 Sarah Walker. - * Copyright 2016-2018 Miran Grca. + * Copyright 2016-2025 Miran Grca. + * Copyright 2024-2025 Jasmine Iwanek. */ #ifndef EMU_SOUND_H @@ -132,6 +134,12 @@ extern const device_t cmi8738_device; extern const device_t cmi8738_onboard_device; extern const device_t cmi8738_6ch_onboard_device; +/* Covox ISA */ +extern const device_t voicemasterkey_device; +extern const device_t soundmasterplus_device; +extern const device_t isadacr0_device; +extern const device_t isadacr1_device; + /* Creative Labs Game Blaster */ extern const device_t cms_device; @@ -214,6 +222,9 @@ extern const device_t pasplus_device; extern const device_t pas16_device; extern const device_t pas16d_device; +/* Rainbow Arts PC-Soundman */ +extern const device_t soundman_device; + /* Tandy PSSJ */ extern const device_t pssj_device; extern const device_t pssj_isa_device; diff --git a/src/include/86box/ui.h b/src/include/86box/ui.h index 783400ebc..63243a666 100644 --- a/src/include/86box/ui.h +++ b/src/include/86box/ui.h @@ -49,7 +49,7 @@ extern int ui_msgbox_header(int flags, void *header, void *message); #define SB_CARTRIDGE 0x10 #define SB_FLOPPY 0x20 #define SB_CDROM 0x30 -#define SB_ZIP 0x40 +#define SB_RDISK 0x40 #define SB_MO 0x50 #define SB_HDD 0x60 #define SB_NETWORK 0x70 @@ -67,6 +67,7 @@ extern void ui_sb_update_tip(int meaning); extern void ui_sb_update_icon(int tag, int active); extern void ui_sb_update_icon_write(int tag, int write); extern void ui_sb_update_icon_state(int tag, int state); +extern void ui_sb_update_icon_wp(int tag, int state); extern void ui_sb_set_text_w(wchar_t *wstr); extern void ui_sb_set_text(char *str); extern void ui_sb_bugui(char *str); diff --git a/src/include/86box/vid_8514a.h b/src/include/86box/vid_8514a.h index 5aa8927e0..6e8528325 100644 --- a/src/include/86box/vid_8514a.h +++ b/src/include/86box/vid_8514a.h @@ -67,8 +67,6 @@ typedef union { typedef struct ibm8514_t { rom_t bios_rom; - rom_t bios_rom2; - mem_mapping_t bios_mapping; uint8_t *rom1; uint8_t *rom2; hwcursor8514_t hwcursor; @@ -107,6 +105,8 @@ typedef struct ibm8514_t { uint64_t dispofftime; struct { + uint16_t scratch0; + uint16_t scratch1; uint16_t subsys_cntl; uint16_t setup_md; uint16_t advfunc_cntl; @@ -253,6 +253,7 @@ typedef struct ibm8514_t { int vdisp; int vdisp2; int disp_cntl; + int disp_cntl_2; int interlace; uint16_t subsys_cntl; uint8_t subsys_stat; @@ -277,6 +278,7 @@ typedef struct ibm8514_t { int _8514on; int _8514crt; PALETTE _8514pal; + uint8_t ven_clock; latch8514_t latch; diff --git a/src/include/86box/vid_ati_mach8.h b/src/include/86box/vid_ati_mach8.h index ad5281ac3..e6fd124de 100644 --- a/src/include/86box/vid_ati_mach8.h +++ b/src/include/86box/vid_ati_mach8.h @@ -109,6 +109,7 @@ typedef struct mach_t { uint16_t src_y; int16_t bres_count; uint16_t clock_sel; + uint16_t clock_sel_mode; uint16_t crt_pitch; uint16_t ge_pitch; uint16_t src_pitch; diff --git a/src/include/86box/vid_cga_comp.h b/src/include/86box/vid_cga_comp.h index 609e6d813..94051b5e5 100644 --- a/src/include/86box/vid_cga_comp.h +++ b/src/include/86box/vid_cga_comp.h @@ -21,11 +21,13 @@ #ifndef VIDEO_CGA_COMP_H #define VIDEO_CGA_COMP_H +#include + #define Bitu unsigned int -#define bool uint8_t void update_cga16_color(uint8_t cgamode); void cga_comp_init(int revision); +void cga_comp_reload(int new_brightness, int new_saturation, int new_sharpness, int new_hue, int new_contrast); uint32_t *Composite_Process(uint8_t cgamode, uint8_t border, uint32_t blocks /*, bool doublewidth*/, uint32_t *TempLine); #endif /*VIDEO_CGA_COMP_H*/ diff --git a/src/include/86box/vid_colorplus.h b/src/include/86box/vid_colorplus.h index 5acd4c8a2..8716f72fb 100644 --- a/src/include/86box/vid_colorplus.h +++ b/src/include/86box/vid_colorplus.h @@ -4,6 +4,8 @@ typedef struct colorplus_t { cga_t cga; uint8_t control; + + lpt_t * lpt; } colorplus_t; void colorplus_init(colorplus_t *colorplus); diff --git a/src/include/86box/vid_hercules.h b/src/include/86box/vid_hercules.h index 1d62bee67..05f2673a5 100644 --- a/src/include/86box/vid_hercules.h +++ b/src/include/86box/vid_hercules.h @@ -60,6 +60,7 @@ typedef struct { int cols[256][2][2]; + lpt_t *lpt; uint8_t *vram; int monitor_index; int prev_monitor_index; diff --git a/src/include/86box/vid_mda.h b/src/include/86box/vid_mda.h index 13aa70594..2443e0ccc 100644 --- a/src/include/86box/vid_mda.h +++ b/src/include/86box/vid_mda.h @@ -119,7 +119,8 @@ typedef struct mda_t { int32_t prev_monitor_index; int32_t monitor_type; // Used for MDA Colour support (REV0 u64) - uint8_t *vram; + uint8_t *vram; + lpt_t *lpt; } mda_t; #define VIDEO_MONITOR_PROLOGUE() \ diff --git a/src/include/86box/vid_svga.h b/src/include/86box/vid_svga.h index 14f3c933a..ffe4f5808 100644 --- a/src/include/86box/vid_svga.h +++ b/src/include/86box/vid_svga.h @@ -138,9 +138,9 @@ typedef struct svga_t { int ps_bit_bug; int ati_4color; int vblankend; - int panning_blank; int render_line_offset; int start_retrace_latch; + int vga_mode; /*The three variables below allow us to implement memory maps like that seen on a 1MB Trio64 : 0MB-1MB - VRAM @@ -348,6 +348,8 @@ extern void ati8514_out(uint16_t addr, uint8_t val, void *priv); extern uint8_t ati8514_in(uint16_t addr, void *priv); extern void ati8514_recalctimings(svga_t *svga); extern uint8_t ati8514_mca_read(int port, void *priv); +extern uint8_t ati8514_rom_readb(uint32_t addr, void *priv); +extern uint16_t ati8514_rom_readw(uint32_t addr, void *priv); extern void ati8514_mca_write(int port, uint8_t val, void *priv); extern void ati8514_pos_write(uint16_t port, uint8_t val, void *priv); extern void ati8514_init(svga_t *svga, void *ext8514, void *dev8514); @@ -498,9 +500,12 @@ extern const device_t bt485a_ramdac_device; extern const device_t gendac_ramdac_device; extern const device_t ibm_rgb528_ramdac_device; extern const device_t ics2494an_305_device; -extern const device_t ati18810_device; -extern const device_t ati18811_0_device; -extern const device_t ati18811_1_device; +extern const device_t ati18810_28800_device; +extern const device_t ati18811_0_28800_device; +extern const device_t ati18811_1_28800_device; +extern const device_t ati18810_mach32_device; +extern const device_t ati18811_0_mach32_device; +extern const device_t ati18811_1_mach32_device; extern const device_t ics2595_device; extern const device_t icd2061_device; extern const device_t ics9161_device; diff --git a/src/include/86box/vid_v6355.h b/src/include/86box/vid_v6355.h new file mode 100644 index 000000000..f8fd11519 --- /dev/null +++ b/src/include/86box/vid_v6355.h @@ -0,0 +1,72 @@ +/* + * 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. + * + * Emulation of the old and new IBM CGA graphics cards. + * + * Authors: Sarah Walker, + * Miran Grca, + * Connor Hyde / starfrost, + * + * Copyright 2008-2018 Sarah Walker. + * Copyright 2016-2018 Miran Grca. + * Copyright 2025 starfrost (refactoring). + */ + +#ifndef VIDEO_V6355_H +#define VIDEO_V6355_H + +typedef struct v6355_t { + mem_mapping_t mapping; + + uint8_t cgastat; + uint8_t cgamode; + uint8_t cgacol; + + uint8_t pad[3]; + uint8_t crtc[32]; + uint8_t v6355data[106]; + uint8_t charbuffer[256]; + + uint16_t ma; + uint16_t maback; + + /* The V6355 has its own set of registers, as well as the emulated MC6845 */ + int v6355reg; + int crtcreg; + int fontbase; + int linepos; + int displine; + int sc; + int vc; + int cgadispon; + int con; + int coff; + int cursoron; + int cgablink; + int vsynctime; + int vadj; + int oddeven; + int display_type; + int firstline; + int lastline; + int drawcursor; + int revision; + int rgb_type; + int double_type; + + uint32_t v6355pal[16]; + + uint64_t dispontime; + uint64_t dispofftime; + + pc_timer_t timer; + + uint8_t * vram; +} v6355_t; + +#endif /*VIDEO_V6355_H*/ diff --git a/src/include/86box/vid_xga.h b/src/include/86box/vid_xga.h index 8a4867a96..9aac43b9f 100644 --- a/src/include/86box/vid_xga.h +++ b/src/include/86box/vid_xga.h @@ -19,8 +19,8 @@ #include <86box/rom.h> -#define INT_START_BLKNK_ENAB (1 << 0) -#define INT_MASK 0xf +#define XGA_INT_START_BLKNK_ENAB (1 << 0) +#define XGA_INT_MASK 0xf typedef struct xga_hwcursor_t { int ena; @@ -152,10 +152,9 @@ typedef struct xga_t { int cursor_data_on; int pal_test; int a5_test; + int test_stage; int type; int bus; - int src_reverse_order; - int dst_reverse_order; uint32_t linear_base; uint32_t linear_size; @@ -175,6 +174,7 @@ typedef struct xga_t { uint32_t px_map_base; uint32_t pallook[512]; uint32_t bios_diag; + uint32_t mapping_base; PALETTE xgapal; diff --git a/src/include/86box/video.h b/src/include/86box/video.h index 62fea0b9a..a284d12fa 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -130,6 +130,8 @@ typedef struct monitor_t { int mon_force_resize; int mon_fullchange; int mon_changeframecount; + int mon_renderedframes; + atomic_int mon_actualrenderedframes; atomic_int mon_screenshots; uint32_t *mon_pal_lookup; int *mon_cga_palette; @@ -137,6 +139,8 @@ typedef struct monitor_t { int mon_cga_palette_static; /* Whether it should not be freed by the API. */ const video_timings_t *mon_vid_timings; int mon_vid_type; + atomic_bool mon_interlace; + atomic_bool mon_composite; struct blit_data_struct *mon_blit_data_ptr; } monitor_t; @@ -399,11 +403,10 @@ extern const device_t gd5446_pci_device; extern const device_t gd5446_stb_pci_device; extern const device_t gd5480_pci_device; - -/* IBM CGA*/ +/* IBM CGA */ extern const device_t cga_device; -/* pravetz CGA */ +/* Pravetz CGA */ extern const device_t cga_pravetz_device; /* Compaq CGA */ @@ -573,7 +576,6 @@ extern const device_t s3_diamond_stealth_2000pro_pci_device; extern const device_t s3_virge_385_pci_device; extern const device_t s3_virge_357_pci_device; extern const device_t s3_virge_357_agp_device; -extern const device_t s3_diamond_stealth_4000_pci_device; extern const device_t s3_diamond_stealth_4000_agp_device; extern const device_t s3_trio3d2x_pci_device; extern const device_t s3_trio3d2x_agp_device; @@ -628,6 +630,9 @@ extern const device_t velocity_200_agp_device; /* Wyse 700 */ extern const device_t wy700_device; +/* Yamaha V6355 */ +extern const device_t v6355d_device; + /* Tandy */ extern const device_t tandy_1000_video_device; extern const device_t tandy_1000hx_video_device; diff --git a/src/mac/CMakeLists.txt b/src/mac/CMakeLists.txt index 0562ca01d..c88ddf097 100644 --- a/src/mac/CMakeLists.txt +++ b/src/mac/CMakeLists.txt @@ -52,4 +52,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) +#set(XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${CMAKE_CURRENT_SOURCE_DIR}/mac/entitlements.plist) diff --git a/src/mac/entitlements.plist b/src/mac/entitlements.plist new file mode 100644 index 000000000..59a80495d --- /dev/null +++ b/src/mac/entitlements.plist @@ -0,0 +1,10 @@ + + + + + com.apple.security.cs.allow-jit + + com.apple.security.cs.disable-library-validation + + + diff --git a/src/machine/CMakeLists.txt b/src/machine/CMakeLists.txt index f91eeb17d..816c9d38c 100644 --- a/src/machine/CMakeLists.txt +++ b/src/machine/CMakeLists.txt @@ -19,12 +19,8 @@ add_library(mch OBJECT machine.c machine_table.c m_xt.c - m_xt_compaq.c - m_xt_laserxt.c - m_xt_philips.c m_xt_t1000.c m_xt_xi8088.c - m_xt_zenith.c m_pcjr.c m_amstrad.c m_europc.c @@ -32,24 +28,32 @@ add_library(mch OBJECT m_xt_olivetti.c m_tandy.c m_v86p.c - m_at.c - m_at_commodore.c - m_at_grid.c m_at_t3100e.c m_ps1.c - m_ps1_hdc.c m_ps2_isa.c m_ps2_mca.c - m_at_compaq.c - m_at_286_386sx.c + m_at_common.c + m_at_286.c + m_at_386sx.c + m_at_m6117.c + m_at_386dx.c + m_at_486slc.c m_at_386dx_486.c + m_at_socket1.c + m_at_socket2.c + m_at_socket3.c + m_at_socket3_pci.c + m_at_486_misc.c m_at_socket4.c + m_at_socket4_5.c m_at_socket5.c m_at_socket7_3v.c m_at_socket7.c m_at_sockets7.c m_at_socket8.c m_at_slot1.c + m_at_slot1_2.c + m_at_slot1_socket370.c m_at_slot2.c m_at_socket370.c m_at_misc.c diff --git a/src/machine/m_amstrad.c b/src/machine/m_amstrad.c index d42807b4d..389185e60 100644 --- a/src/machine/m_amstrad.c +++ b/src/machine/m_amstrad.c @@ -66,6 +66,7 @@ #include <86box/lpt.h> #include <86box/fdd.h> #include <86box/fdc.h> +#include <86box/hdc.h> #include <86box/sound.h> #include <86box/snd_speaker.h> #include <86box/video.h> @@ -155,7 +156,9 @@ typedef struct amstrad_t { /* Video stuff. */ amsvid_t *vid; + fdc_t *fdc; + lpt_t *lpt; } amstrad_t; uint32_t amstrad_latch; @@ -2245,7 +2248,7 @@ ams_write(uint16_t port, uint8_t val, void *priv) case 0x0378: case 0x0379: case 0x037a: - lpt_write(port, val, &lpt_ports[0]); + lpt_write(port, val, ams->lpt); break; case 0xdead: @@ -2265,7 +2268,7 @@ ams_read(uint16_t port, void *priv) switch (port) { case 0x0378: - ret = lpt_read(port, &lpt_ports[0]); + ret = lpt_read(port, ams->lpt); break; case 0x0379: /* printer control, also set LK1-3. @@ -2279,11 +2282,11 @@ ams_read(uint16_t port, void *priv) * 1 Italian Language. * 0 Diagnostic Mode. */ - ret = (lpt_read(port, &lpt_ports[0]) & 0xf8) | ams->language; + ret = (lpt_read(port, ams->lpt) & 0xf8) | ams->language; break; case 0x037a: /* printer status */ - ret = lpt_read(port, &lpt_ports[0]) & 0x1f; + ret = lpt_read(port, ams->lpt) & 0x1f; switch (ams->type) { case AMS_PC1512: @@ -2884,8 +2887,10 @@ machine_amstrad_init(const machine_t *model, int type) nmi_init(); - lpt1_remove_ams(); - lpt2_remove(); + ams->lpt = device_add_inst(&lpt_port_device, 1); + + lpt1_remove_ams(ams->lpt); + lpt_set_next_inst(255); io_sethandler(0x0378, 3, ams_read, NULL, NULL, ams_write, NULL, NULL, ams); @@ -2962,6 +2967,7 @@ machine_amstrad_init(const machine_t *model, int type) device_context(&vid_pc3086_device); ams->language = device_get_config_int("language"); device_context_restore(); + device_add(&xta_wdxt150_pc3086_device); device_add(¶dise_pvga1a_pc3086_device); break; @@ -2997,7 +3003,7 @@ machine_amstrad_init(const machine_t *model, int type) mouse_set_poll(ms_poll, ams); } - standalone_gameport_type = &gameport_device; + standalone_gameport_type = &gameport_200_device; } int diff --git a/src/machine/m_at.c b/src/machine/m_at.c deleted file mode 100644 index d2c4b99a2..000000000 --- a/src/machine/m_at.c +++ /dev/null @@ -1,426 +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. - * - * Standard PC/AT implementation. - * - * - * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Sarah Walker, - * Jasmine Iwanek, - * - * Copyright 2017-2020 Fred N. van Kempen. - * Copyright 2016-2020 Miran Grca. - * Copyright 2008-2020 Sarah Walker. - * Copyright 2025 Jasmine Iwanek. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the: - * - * Free Software Foundation, Inc. - * 59 Temple Place - Suite 330 - * Boston, MA 02111-1307 - * USA. - */ -#include -#include -#include -#include -#include <86box/86box.h> -#include <86box/timer.h> -#include <86box/pic.h> -#include <86box/pit.h> -#include <86box/dma.h> -#include <86box/mem.h> -#include <86box/device.h> -#include <86box/fdd.h> -#include <86box/fdc.h> -#include <86box/fdc_ext.h> -#include <86box/nvr.h> -#include <86box/gameport.h> -#include <86box/ibm_5161.h> -#include <86box/keyboard.h> -#include <86box/lpt.h> -#include <86box/rom.h> -#include <86box/hdc.h> -#include <86box/port_6x.h> -#include <86box/machine.h> - -void -machine_at_common_init_ex(const machine_t *model, int type) -{ - machine_common_init(model); - - refresh_at_enable = 1; - pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_at); - pic2_init(); - dma16_init(); - - if (!(type & 4)) - device_add(&port_6x_device); - type &= 3; - - if (type == 1) - device_add(&ibmat_nvr_device); - else if (type == 0) - device_add(&at_nvr_device); - - standalone_gameport_type = &gameport_device; -} - -void -machine_at_common_init(const machine_t *model) -{ - machine_at_common_init_ex(model, 0); -} - -void -machine_at_init(const machine_t *model) -{ - machine_at_common_init(model); - - device_add(&keyboard_at_device); -} - -static void -machine_at_ibm_common_init(const machine_t *model) -{ - machine_at_common_init_ex(model, 1); - - device_add(&keyboard_at_device); - - mem_remap_top(384); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); -} - -void -machine_at_ps2_init(const machine_t *model) -{ - machine_at_common_init(model); - - device_add(&keyboard_ps2_device); -} - -void -machine_at_common_ide_init(const machine_t *model) -{ - machine_at_common_init(model); - - device_add(&ide_isa_device); -} - -void -machine_at_ibm_common_ide_init(const machine_t *model) -{ - machine_at_common_init_ex(model, 1); - - device_add(&ide_isa_device); -} - -void -machine_at_ide_init(const machine_t *model) -{ - machine_at_init(model); - - device_add(&ide_isa_device); -} - -void -machine_at_ps2_ide_init(const machine_t *model) -{ - machine_at_ps2_init(model); - - device_add(&ide_isa_device); -} - -static const device_config_t ibmat_config[] = { - // clang-format off - { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, - .default_string = "ibm5170_111585", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { - .name = "62X082x (11/15/85)", - .internal_name = "ibm5170_111585", - .bios_type = BIOS_NORMAL, - .files_no = 2, - .local = 0, - .size = 65536, - .files = { "roms/machines/ibmat/BIOS_5170_15NOV85_U27.BIN", "roms/machines/ibmat/BIOS_5170_15NOV85_U47.BIN", "" } - }, - { - .name = "61X9266 (11/15/85) (Alt)", - .internal_name = "ibm5170_111585_alt", - .bios_type = BIOS_NORMAL, - .files_no = 2, - .local = 0, - .size = 65536, - .files = { "roms/machines/ibmat/BIOS_5170_15NOV85_U27_61X9266.BIN", "roms/machines/ibmat/BIOS_5170_15NOV85_U47_61X9265.BIN", "" } - }, - { - .name = "648009x (06/10/85)", - .internal_name = "ibm5170_061085", - .bios_type = BIOS_NORMAL, - .files_no = 2, - .local = 0, - .size = 65536, - .files = { "roms/machines/ibmat/BIOS_5170_10JUN85_U27.BIN", "roms/machines/ibmat/BIOS_5170_10JUN85_U47.BIN", "" } - }, - { - .name = "618102x (01/10/84)", - .internal_name = "ibm5170_011084", - .bios_type = BIOS_NORMAL, - .files_no = 2, - .local = 0, - .size = 65536, - .files = { "roms/machines/ibmat/BIOS_5170_10JAN84_U27.BIN", "roms/machines/ibmat/BIOS_5170_10JAN84_U47.BIN", "" } - }, - // The following are Diagnostic ROMs. - { - .name = "Supersoft Diagnostics", - .internal_name = "diag_supersoft", - .bios_type = BIOS_NORMAL, - .files_no = 2, - .local = 2, - .size = 65536, - .files = { "roms/machines/diagnostic/5170_EVEN_LOW_U27_27256.bin", "roms/machines/diagnostic/5170_ODD_HIGH_U47_27256.bin", "" } - }, - - { .files_no = 0 } - }, - }, - { - .name = "enable_5161", - .description = "IBM 5161 Expansion Unit", - .type = CONFIG_BINARY, - .default_int = 0 - }, - { .name = "", .description = "", .type = CONFIG_END } - // clang-format on -}; - -const device_t ibmat_device = { - .name = "IBM AT", - .internal_name = "ibmat_device", - .flags = 0, - .local = 0, - .init = NULL, - .close = NULL, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = ibmat_config -}; - -int -machine_at_ibm_init(const machine_t *model) -{ - int ret = 0; - uint8_t enable_5161; - const char *fn[2]; - - /* No ROMs available. */ - if (!device_available(model->device)) - return ret; - - device_context(model->device); - enable_5161 = machine_get_config_int("enable_5161"); - fn[0] = device_get_bios_file(model->device, device_get_config_bios("bios"), 0); - fn[1] = device_get_bios_file(model->device, device_get_config_bios("bios"), 1); - ret = bios_load_interleaved(fn[0], fn[1], 0x000f0000, 65536, 0); - device_context_restore(); - - if (bios_only || !ret) - return ret; - - machine_at_ibm_common_init(model); - - if (enable_5161) - device_add(&ibm_5161_device); - - return ret; -} - -/* IBM AT machines with custom BIOSes */ -int -machine_at_ibmatquadtel_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/ibmatquadtel/BIOS_30MAR90_U27_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN", - "roms/machines/ibmatquadtel/BIOS_30MAR90_U47_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ibm_common_init(model); - - return ret; -} - -int -machine_at_ibmatami_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/ibmatami/BIOS_5170_30APR89_U27_AMI_27256.BIN", - "roms/machines/ibmatami/BIOS_5170_30APR89_U47_AMI_27256.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ibm_common_init(model); - - return ret; -} - -int -machine_at_ibmatpx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Even.bin", - "roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Odd.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ibm_common_init(model); - - return ret; -} - -static const device_config_t ibmxt286_config[] = { - // clang-format off - { - .name = "enable_5161", - .description = "IBM 5161 Expansion Unit", - .type = CONFIG_BINARY, - .default_int = 0 - }, - { .name = "", .description = "", .type = CONFIG_END } - // clang-format on -}; - -const device_t ibmxt286_device = { - .name = "IBM XT Model 286", - .internal_name = "ibmxt286_device", - .flags = 0, - .local = 0, - .init = NULL, - .close = NULL, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = ibmxt286_config -}; - -int -machine_at_ibmxt286_init(const machine_t *model) -{ - int ret; - uint8_t enable_5161; - - device_context(model->device); - enable_5161 = machine_get_config_int("enable_5161"); - device_context_restore(); - - ret = bios_load_interleaved("roms/machines/ibmxt286/bios_5162_21apr86_u34_78x7460_27256.bin", - "roms/machines/ibmxt286/bios_5162_21apr86_u35_78x7461_27256.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ibm_common_init(model); - - if (enable_5161) - device_add(&ibm_5161_device); - - return ret; -} - -int -machine_at_pb286_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/pb286/LB_V332P.BIN", - "roms/machines/pb286/HB_V332P.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ibm_common_init(model); - - return ret; -} - -int -machine_at_siemens_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/siemens/286BIOS.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 1); - - device_add(&keyboard_at_siemens_device); - - mem_remap_top(384); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_wellamerastar_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/wellamerastar/W_3.031_L.BIN", - "roms/machines/wellamerastar/W_3.031_H.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ibm_common_init(model); - - return ret; -} diff --git a/src/machine/m_at_286.c b/src/machine/m_at_286.c new file mode 100644 index 000000000..c85c392b8 --- /dev/null +++ b/src/machine/m_at_286.c @@ -0,0 +1,1084 @@ +/* + * 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. + * + * Implementation of 286 machines. + * + * Authors: Miran Grca, + * EngiNerd + * + * Copyright 2016-2025 Miran Grca. + * Copyright 2020-2025 EngiNerd. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/keyboard.h> +#include <86box/mem.h> +#include <86box/rom.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/hdc.h> +#include <86box/ibm_5161.h> +#include <86box/nvr.h> +#include <86box/port_6x.h> +#define USE_SIO_DETECT +#include <86box/sio.h> +#include <86box/serial.h> +#include <86box/video.h> +#include <86box/vid_cga.h> +#include <86box/vid_cga_comp.h> +#include <86box/flash.h> +#include <86box/machine.h> + +/* ISA */ +static const device_config_t ibmat_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "ibm5170_111585", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { + .name = "62X082x (11/15/85)", + .internal_name = "ibm5170_111585", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 65536, + .files = { "roms/machines/ibmat/BIOS_5170_15NOV85_U27.BIN", "roms/machines/ibmat/BIOS_5170_15NOV85_U47.BIN", "" } + }, + { + .name = "61X9266 (11/15/85) (Alt)", + .internal_name = "ibm5170_111585_alt", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 65536, + .files = { "roms/machines/ibmat/BIOS_5170_15NOV85_U27_61X9266.BIN", "roms/machines/ibmat/BIOS_5170_15NOV85_U47_61X9265.BIN", "" } + }, + { + .name = "648009x (06/10/85)", + .internal_name = "ibm5170_061085", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 65536, + .files = { "roms/machines/ibmat/BIOS_5170_10JUN85_U27.BIN", "roms/machines/ibmat/BIOS_5170_10JUN85_U47.BIN", "" } + }, + { + .name = "618102x (01/10/84)", + .internal_name = "ibm5170_011084", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 65536, + .files = { "roms/machines/ibmat/BIOS_5170_10JAN84_U27.BIN", "roms/machines/ibmat/BIOS_5170_10JAN84_U47.BIN", "" } + }, + // The following are Diagnostic ROMs. + { + .name = "Supersoft Diagnostics", + .internal_name = "diag_supersoft", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 2, + .size = 65536, + .files = { "roms/machines/diagnostic/5170_EVEN_LOW_U27_27256.bin", "roms/machines/diagnostic/5170_ODD_HIGH_U47_27256.bin", "" } + }, + + { .files_no = 0 } + }, + }, + { + .name = "enable_5161", + .description = "IBM 5161 Expansion Unit", + .type = CONFIG_BINARY, + .default_int = 0 + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t ibmat_device = { + .name = "IBM AT", + .internal_name = "ibmat_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ibmat_config +}; + +static void +machine_at_ibm_common_init(const machine_t *model) +{ + machine_at_common_init_ex(model, 1); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + mem_remap_top(384); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); +} + +int +machine_at_ibmat_init(const machine_t *model) +{ + int ret = 0; + uint8_t enable_5161; + const char *fn[2]; + + /* No ROMs available. */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + enable_5161 = machine_get_config_int("enable_5161"); + fn[0] = device_get_bios_file(model->device, device_get_config_bios("bios"), 0); + fn[1] = device_get_bios_file(model->device, device_get_config_bios("bios"), 1); + ret = bios_load_interleaved(fn[0], fn[1], 0x000f0000, 65536, 0); + device_context_restore(); + + if (bios_only || !ret) + return ret; + + machine_at_ibm_common_init(model); + + if (enable_5161) + device_add(&ibm_5161_device); + + return ret; +} + +static const device_config_t ibmxt286_config[] = { + // clang-format off + { + .name = "enable_5161", + .description = "IBM 5161 Expansion Unit", + .type = CONFIG_BINARY, + .default_int = 0 + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t ibmxt286_device = { + .name = "IBM XT Model 286", + .internal_name = "ibmxt286_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ibmxt286_config +}; + +int +machine_at_ibmxt286_init(const machine_t *model) +{ + int ret; + uint8_t enable_5161; + + device_context(model->device); + enable_5161 = machine_get_config_int("enable_5161"); + device_context_restore(); + + ret = bios_load_interleaved("roms/machines/ibmxt286/bios_5162_21apr86_u34_78x7460_27256.bin", + "roms/machines/ibmxt286/bios_5162_21apr86_u35_78x7461_27256.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ibm_common_init(model); + + if (enable_5161) + device_add(&ibm_5161_device); + + return ret; +} + +int +machine_at_ibmatami_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/ibmatami/BIOS_5170_30APR89_U27_AMI_27256.BIN", + "roms/machines/ibmatami/BIOS_5170_30APR89_U47_AMI_27256.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ibm_common_init(model); + + return ret; +} + +int +machine_at_cmdpc_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/cmdpc30/commodore pc 30 iii even.bin", + "roms/machines/cmdpc30/commodore pc 30 iii odd.bin", + 0x000f8000, 32768, 0); + + if (bios_only || !ret) + return ret; + + machine_at_init(model); + + mem_remap_top(384); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&cbm_io_device); + + return ret; +} + +int +machine_at_portableii_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleavedr("roms/machines/portableii/109740-001.rom", + "roms/machines/portableii/109739-001.rom", + 0x000f8000, 65536, 0); + + if (bios_only || !ret) + return ret; + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + video_reset(gfxcard[0]); + + device_add(&compaq_device); + + machine_at_common_init(model); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_portableiii_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linearr("roms/machines/portableiii/K Combined.bin", + 0x000f8000, 65536, 0); + + + if (bios_only || !ret) + return ret; + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + video_reset(gfxcard[0]); + + if (hdc_current[0] == HDC_INTERNAL) + device_add(&ide_isa_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&compaq_plasma_device); + + device_add(&compaq_device); + + machine_at_common_init(model); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_grid1520_init(const machine_t *model) { + int ret = 0; + + ret = bios_load_linear("roms/machines/grid1520/grid1520_891025.rom", + 0x000f8000, 0x8000, 0); + if (bios_only || !ret) + return ret; + + machine_at_common_ide_init(model); + mem_remap_top(384); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + // for now just select CGA with amber monitor + //device_add(&cga_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&grid1520_device); + + return ret; +} + +int +machine_at_mr286_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/mr286/V000B200-1", + "roms/machines/mr286/V000B200-2", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_ide_init(model); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +uint8_t +machine_ncr_p1_handler(void) +{ + /* switch settings + * bit 7: keyboard disable + * bit 6: display type (0 color, 1 mono) + * bit 5: power-on default speed (0 high, 1 low) + * bit 4: sense RAM size (0 unsupported, 1 512k on system board) + * bit 3: coprocessor detect + * bit 2: unused + * bit 1: high/auto speed + * bit 0: dma mode + */ + /* (B0 or F0) | 0x04 | (display on bit 6) | (fpu on bit 3) */ + return (video_is_mda() ? 0x40 : 0x00) | (hasfpu ? 0x08 : 0x00) | 0x90; +} + +/* + * Current bugs: + * - ctrl-alt-del produces an 8042 error + */ +int +machine_at_pc8_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/pc8/ncr_35117_u127_vers.4-2.bin", + "roms/machines/pc8/ncr_35116_u113_vers.4-2.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_m290_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/m290/m290_pep3_1.25.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 6); + device_add(&amstrad_megapc_nvr_device); + + device_add(&olivetti_eva_device); + device_add(&port_6x_olivetti_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_ibmatpx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Even.bin", + "roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Odd.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ibm_common_init(model); + + return ret; +} + +int +machine_at_ibmatquadtel_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/ibmatquadtel/BIOS_30MAR90_U27_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN", + "roms/machines/ibmatquadtel/BIOS_30MAR90_U47_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ibm_common_init(model); + + return ret; +} + +int +machine_at_pb286_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/pb286/LB_V332P.BIN", + "roms/machines/pb286/HB_V332P.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ibm_common_init(model); + + return ret; +} + +int +machine_at_mbc17_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/mbc17/SAT200C_U45EVEN_FB3H2.bin", + "roms/machines/mbc17/SAT200C_U44ODD_FB3J2.bin", + 0x000f8000, 32768, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_ide_init(model); + device_add(&sanyo_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_ax286_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/ax286/AM27C512@DIP28_even.BIN", + "roms/machines/ax286/AM27C512@DIP28_odd.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_ide_init(model); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_siemens_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/siemens/286BIOS.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 1); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + mem_remap_top(384); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* C&T PC/AT */ +static void +machine_at_ctat_common_init(const machine_t *model) +{ + machine_at_common_init(model); + + device_add(&cs8220_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); +} + +int +machine_at_dells200_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/dells200/dellL200256_LO_@DIP28.BIN", + "roms/machines/dells200/Dell200256_HI_@DIP28.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ctat_common_init(model); + + return ret; +} + +int +machine_at_super286c_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/super286c/hyundai_award286.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&cs8220_device); + + return ret; +} + +int +machine_at_at122_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/at122/FINAL.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ctat_common_init(model); + + return ret; +} + +int +machine_at_tuliptc7_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleavedr("roms/machines/tuliptc7/tc7be.bin", + "roms/machines/tuliptc7/tc7bo.bin", + 0x000f8000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ctat_common_init(model); + + return ret; +} + +int +machine_at_wellamerastar_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/wellamerastar/W_3.031_L.BIN", + "roms/machines/wellamerastar/W_3.031_H.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ctat_common_init(model); + + return ret; +} + +/* GC103 */ +int +machine_at_quadt286_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/quadt286/QUADT89L.ROM", + "roms/machines/quadt286/QUADT89H.ROM", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&headland_gc10x_device); + + return ret; +} + +void +machine_at_headland_common_init(const machine_t *model, int type) +{ + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if ((type != 2) && (fdc_current[0] == FDC_INTERNAL)) + device_add(&fdc_at_device); + + if (type == 2) + device_add(&headland_ht18b_device); + else if (type == 1) + device_add(&headland_gc113_device); + else + device_add(&headland_gc10x_device); +} + +int +machine_at_tg286m_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/tg286m/ami.bin", + 0x000f0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_ide_init(model); + + machine_at_headland_common_init(model, 1); + + return ret; +} + +// TODO +// Onboard Paradise PVGA1A-JK VGA Graphics +// Data Technology Corporation DTC7187 RLL Controller (Optional) +int +machine_at_ataripc4_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/ataripc4/AMI_PC4X_1.7_EVEN.BIN", + "roms/machines/ataripc4/AMI_PC4X_1.7_ODD.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&neat_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_neat_ami_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ami286/AMIC206.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&neat_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_3302_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/3302/f000-flex_drive_test.bin", + 0x000f0000, 65536, 0); + + if (ret) { + ret &= bios_load_aux_linear("roms/machines/3302/f800-setup_ncr3.5-013190.bin", + 0x000f8000, 32768, 0); + } + + if (bios_only || !ret) + return ret; + + machine_at_common_ide_init(model); + device_add(&neat_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_px286_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/px286/KENITEC.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&neat_device); + + return ret; +} + +/* SCAMP */ +int +machine_at_pc7286_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pc7286/PC7286 BIOS (AM27C010@DIP32).BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&gd5401_onboard_device); + + device_add_params(&dw90c50_device, (void *) DW90C50_IDE); + device_add(&vl82c113_device); /* The keyboard controller is part of the VL82c113. */ + + device_add(&vlsi_scamp_device); + + return ret; +} + +/* SCAT */ +static void +machine_at_scat_init(const machine_t *model, int is_v4, int is_ami) +{ + machine_at_common_init(model); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (is_v4) + device_add(&scat_4_device); + else + device_add(&scat_device); +} + +int +machine_at_pc5286_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pc5286/PC5286", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + /* Patch the checksum to avoid checksum error. */ + if (rom[0xffff] == 0x2c) + rom[0xffff] = 0x2b; + + machine_at_scat_init(model, 1, 0); + + device_add(&f82c710_device); + + device_add(&ide_isa_device); + + return ret; +} + +int +machine_at_gw286ct_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/gw286ct/2ctc001.bin", + 0x000f0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_scat_init(model, 1, 0); + + device_add(&f82c710_device); + + device_add(&ide_isa_device); + + return ret; +} + +int +machine_at_gdc212m_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/gdc212m/gdc212m_72h.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_scat_init(model, 0, 1); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&ide_isa_device); + + return ret; +} + +int +machine_at_award286_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/award286/award.bin", + 0x000f0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_scat_init(model, 0, 1); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&ide_isa_device); + + return ret; +} + +int +machine_at_super286tr_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/super286tr/hyundai_award286.bin", + 0x000f0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_scat_init(model, 0, 1); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_drsm35286_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/drsm35286/syab04-665821fb81363428830424.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + device_add(&ide_isa_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI)); + + machine_at_scat_init(model, 1, 0); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + return ret; +} + +int +machine_at_deskmaster286_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/deskmaster286/SAMSUNG-DESKMASTER-28612-ROM.BIN", + 0x000f0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_scat_init(model, 0, 1); + + device_add(&f82c710_device); + + device_add(&ide_isa_device); + + return ret; +} + +int +machine_at_spc4200p_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/spc4200p/u8.01", + 0x000f0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_scat_init(model, 0, 1); + + device_add(&f82c710_device); + + device_add(&ide_isa_device); + + return ret; +} + +int +machine_at_spc4216p_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/spc4216p/7101.U8", + "roms/machines/spc4216p/AC64.U10", + 0x000f0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_scat_init(model, 1, 1); + + device_add(&f82c710_device); + + return ret; +} + +int +machine_at_spc4620p_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/spc4620p/31005h.u8", + "roms/machines/spc4620p/31005h.u10", + 0x000f0000, 131072, 0x8000); + + if (bios_only || !ret) + return ret; + + if (gfxcard[0] == VID_INTERNAL) + device_add(&ati28800k_spc4620p_device); + + machine_at_scat_init(model, 1, 1); + + device_add(&f82c710_device); + + device_add(&ide_isa_device); + + return ret; +} + +int +machine_at_senor_scat286_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/senor286/AMI-DSC2-1115-061390-K8.rom", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_scat_init(model, 0, 1); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} diff --git a/src/machine/m_at_386dx.c b/src/machine/m_at_386dx.c new file mode 100644 index 000000000..90461d554 --- /dev/null +++ b/src/machine/m_at_386dx.c @@ -0,0 +1,395 @@ +/* + * 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. + * + * Implementation of 386DX machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/keyboard.h> +#include <86box/mem.h> +#include <86box/nvr.h> +#include <86box/pci.h> +#include <86box/dma.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/gameport.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/rom.h> +#include <86box/sio.h> +#include <86box/hdc.h> +#include <86box/port_6x.h> +#include <86box/port_92.h> +#include <86box/video.h> +#include <86box/vid_cga.h> +#include <86box/vid_cga_comp.h> +#include <86box/flash.h> +#include <86box/scsi_ncr53c8xx.h> +#include <86box/hwm.h> +#include <86box/machine.h> +#include <86box/plat_unused.h> +#include <86box/sound.h> + +/* ISA */ +uint8_t +machine_compaq_p1_handler(void) +{ + return machine_generic_p1_handler() | (hasfpu ? 0x00 : 0x04); +} + +static void +machine_at_deskpro386_common_init(const machine_t *model) +{ + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + video_reset(gfxcard[0]); + + device_add(&compaq_386_device); + + machine_at_common_init(model); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); +} + +int +machine_at_deskpro386_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linearr("roms/machines/deskpro386/1986-09-04-HI.json.bin", + 0x000f8000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_deskpro386_common_init(model); + + return ret; +} + +int +machine_at_deskpro386_05_1988_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linearr("roms/machines/deskpro386/1988-05-10.json.bin", + 0x000f8000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_deskpro386_common_init(model); + + return ret; +} + +int +machine_at_portableiii386_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linearr("roms/machines/portableiii/P.2 Combined.bin", + 0x000f0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + video_reset(gfxcard[0]); + + if (hdc_current[0] == HDC_INTERNAL) + device_add(&ide_isa_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&compaq_plasma_device); + + device_add(&compaq_386_device); + + machine_at_common_init(model); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_micronics386_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/micronics386/386-Micronics-09-00021-EVEN.BIN", + "roms/machines/micronics386/386-Micronics-09-00021-ODD.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_init(model); + + device_add(&port_92_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_micronics386px_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/micronics386/386-Micronics-09-00021-LO.BIN", + "roms/machines/micronics386/386-Micronics-09-00021-HI.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_init(model); + + device_add(&port_92_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* ACC 2168 */ +int +machine_at_acc386_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/acc386/acc386.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&acc2168_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* C&T 386/AT */ +int +machine_at_ecs386_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/ecs386/AMI BIOS for ECS-386_32 motherboard - L chip.bin", + "roms/machines/ecs386/AMI BIOS for ECS-386_32 motherboard - H chip.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&cs8230_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_spc6000a_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/spc6000a/3c80.u27", + "roms/machines/spc6000a/9f80.u26", + 0x000f8000, 32768, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 1); + + device_add(&cs8230_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_tandy4000_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/tandy4000/BIOS Tandy 4000 v1.03.01.bin", + 0x000f8000, 32768, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&cs8230_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* ALi M1429 */ +int +machine_at_ecs386v_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ecs386v/PANDA_386V.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&ali1429_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* OPTi 391 */ +int +machine_at_dataexpert386wb_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/dataexpert386wb/st0386-wb-ver2-0-618f078c738cb397184464.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&opti391_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* OPTi 495SLC */ +int +machine_at_opti495_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/award495/opt495s.awa", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&opti495slc_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* SiS 310 */ +int +machine_at_asus3863364k_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/asus3863364k/am27c512dip28-64b53c26be3d8160533563.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&rabbit_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_asus386_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/asus386/ASUS_ISA-386C_BIOS.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&rabbit_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index 731b1e2bd..f4fb1f713 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -6,13 +6,11 @@ * * This file is part of the 86Box distribution. * - * Implementation of 386DX and 486 machines. - * - * + * Implementation of 386DX/486 machines. * * Authors: Miran Grca, * - * Copyright 2016-2020 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -50,272 +48,13 @@ #include <86box/plat_unused.h> #include <86box/sound.h> -/* 386DX */ +/* ALi M1429G */ int -machine_at_acc386_init(const machine_t *model) +machine_at_exp4349_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/acc386/acc386.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&acc2168_device); - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_asus3863364k_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/asus3863364k/am27c512dip28-64b53c26be3d8160533563.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&rabbit_device); - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_asus386_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/asus386/ASUS_ISA-386C_BIOS.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&rabbit_device); - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_tandy4000_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/tandy4000/BIOS Tandy 4000 v1.03.01.bin", - 0x000f8000, 32768, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&keyboard_at_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_dtk461_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/dtk461/DTK.BIO", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&sl82c461_device); - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -static void -machine_at_sis401_common_init(const machine_t *model) -{ - machine_at_common_init(model); - device_add(&sis_85c401_device); - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); -} - -int -machine_at_sis401_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/sis401/SIS401-2.AMI", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_sis401_common_init(model); - - return ret; -} - -int -machine_at_isa486_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/isa486/ISA-486.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_sis401_common_init(model); - - return ret; -} - -int -machine_at_av4_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/av4/amibios_486dx_isa_bios_aa4025963.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&sis_85c460_device); - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_valuepoint433_init(const machine_t *model) // hangs without the PS/2 mouse -{ - int ret; - - ret = bios_load_linear("roms/machines/valuepoint433/$IMAGEP.FLH", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_ide_init(model); - device_add(&sis_85c461_device); - if (gfxcard[0] == VID_INTERNAL) - device_add(&et4000w32_onboard_device); - - device_add(&keyboard_ps2_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_ecs386_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/ecs386/AMI BIOS for ECS-386_32 motherboard - L chip.bin", - "roms/machines/ecs386/AMI BIOS for ECS-386_32 motherboard - H chip.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&cs8230_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&keyboard_at_ami_device); - - return ret; -} - -int -machine_at_spc6000a_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/spc6000a/3c80.u27", - "roms/machines/spc6000a/9f80.u26", - 0x000f8000, 32768, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 1); - device_add(&cs8230_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&keyboard_at_ami_device); - - return ret; -} - -int -machine_at_ecs386v_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ecs386v/PANDA_386V.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&ali1429_device); - device_add(&keyboard_ps2_intel_ami_pci_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_rycleopardlx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/rycleopardlx/486-RYC-Leopard-LX.BIN", + ret = bios_load_linear("roms/machines/exp4349/biosdump.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -323,240 +62,9 @@ machine_at_rycleopardlx_init(const machine_t *model) machine_at_common_init(model); - device_add(&opti283_device); - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_486vchd_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/486vchd/486-4386-VC-HD.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&via_vt82c49x_device); - device_add(&keyboard_at_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_cs4031_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/cs4031/CHIPS_1.AMI", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&cs4031_device); - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_pb410a_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pb410a/pb410a.080337.4abf.u25.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ibm_common_ide_init(model); - - device_add(&keyboard_ps2_device); - - device_add(&acc3221_device); - device_add(&acc2168_device); - - device_add(&phoenix_486_jumper_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - return ret; -} - -int -machine_at_vect486vl_init(const machine_t *model) // has HDC problems -{ - int ret; - - ret = bios_load_linear("roms/machines/vect486vl/aa0500.ami", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - machine_at_common_init_ex(model, 2); - - device_add(&vl82c480_device); - - device_add(&vl82c113_device); - - device_add(&ide_isa_device); - device_add(&fdc37c651_ide_device); - - return ret; -} - -int -machine_at_d824_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/d824/fts-biosupdated824noflashbiosepromv320-320334-160.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - machine_at_common_init_ex(model, 2); - - device_add(&vl82c480_device); - - /* - Technically, it should be the VL82C114 but we do not have - a proper datasheet of it that tells us the registers. - */ - device_add(&vl82c113_device); - - device_add(&ide_isa_device); - device_add(&fdc37c651_device); - - return ret; -} - -int -machine_at_tuliptc38_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/tuliptc38/TULIP1.BIN", - 0x000f0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - device_add(&vl82c486_device); - device_add(&tulip_jumper_device); - - device_add(&vl82c113_device); - - device_add(&ide_isa_device); - device_add(&fdc37c651_ide_device); - - if (gfxcard[0] == VID_INTERNAL) { - bios_load_aux_linear("roms/machines/tuliptc38/VBIOS.BIN", - 0x000c0000, 32768, 0); - - device_add(machine_get_vid_device(machine)); - } else for (uint16_t i = 0; i < 32768; i++) - rom[i] = mem_readb_phys(0x000c0000 + i); - - mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000); - mem_mapping_set_exec(&bios_mapping, rom); - - return ret; -} - -int -machine_at_martin_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/martin/NONSCSI.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - device_add(&vl82c480_device); - device_add(&vl82c113_device); - - device_add(&ide_vlb_device); - device_add(&fdc37c651_ide_device); - - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_acera1g_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/acera1g/4alo001.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); device_add(&ali1429g_device); - if (gfxcard[0] == VID_INTERNAL) - device_add(&gd5428_onboard_device); - - device_add(&keyboard_ps2_acer_pci_device); - - device_add_params(&pc87310_device, (void *) (PC87310_ALI)); - device_add(&ide_ali5213_device); - - return ret; -} - -int -machine_at_acerv10_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/acerv10/ALL.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&sis_85c461_device); - device_add(&keyboard_ps2_acer_pci_device); - device_add(&ide_isa_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); @@ -564,117 +72,13 @@ machine_at_acerv10_init(const machine_t *model) return ret; } +/* OPTi 495SX */ int -machine_at_decpclpv_init(const machine_t *model) +machine_at_c747_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/decpclpv/bios.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&sis_85c461_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&keyboard_ps2_phoenix_pci_device); - - device_add(&ide_isa_2ch_device); - device_add(&fdc37c663_ide_device); - - return ret; -} - -int -machine_at_dell466np_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/dell466np/466np.bin", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&sis_85c461_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - else { - for (uint16_t i = 0; i < 32768; i++) - rom[i] = mem_readb_phys(0x000c0000 + i); - } - mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000); - mem_mapping_set_exec(&bios_mapping, rom); - - device_add(&keyboard_ps2_phoenix_pci_device); - - device_add(&ide_isa_device); - device_add(&fdc37c661_ide_device); - - return ret; -} - -static void -machine_at_ali1429_common_init(const machine_t *model, int is_green) -{ - machine_at_common_init(model); - - if (is_green) - device_add(&ali1429g_device); - else - device_add(&ali1429_device); - - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); -} - -int -machine_at_ali1429_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ali1429/ami486.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ali1429_common_init(model, 0); - - return ret; -} - -int -machine_at_winbios1429_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/win486/ali1429g.amw", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ali1429_common_init(model, 1); - - return ret; -} - -int -machine_at_opti495_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/award495/opt495s.awa", + ret = bios_load_linear("roms/machines/c747/486-C747 Tandon.BIN", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -682,12 +86,16 @@ machine_at_opti495_init(const machine_t *model) machine_at_common_init(model); - device_add(&opti495slc_device); + /* The EFAR chipset is a rebrand of the OPTi 495SX. */ + device_add(&opti495sx_device); - device_add(&keyboard_at_device); + /* + No idea what KBC it actually has but this produces the + desired behavior: command A9 does absolutely nothing. + */ + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); + device_add_params(&um866x_device, (void *) (UM82C862F | UM866X_IDE_PRI)); return ret; } @@ -699,7 +107,7 @@ machine_at_opti495_ami_common_init(const machine_t *model) device_add(&opti495sx_device); - device_add(&keyboard_at_ami_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); @@ -736,2228 +144,3 @@ machine_at_opti495_mr_init(const machine_t *model) return ret; } - -int -machine_at_c747_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/c747/486-C747 Tandon.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - /* The EFAR chipset is a rebrand of the OPTi 495SX. */ - device_add(&opti495sx_device); - - /* - No idea what KBC it actually has but this produces the - desired behavior: command A9 does absolutely nothing. - */ - device_add(&keyboard_at_siemens_device); - device_add(&um82c862f_ide_device); - - return ret; -} - -int -machine_at_exp4349_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/exp4349/biosdump.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&ali1429g_device); - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - return ret; -} - -static void -machine_at_403tg_common_init(const machine_t *model, int nvr_hack) -{ - if (nvr_hack) { - machine_at_common_init_ex(model, 2); - device_add(&ami_1994_nvr_device); - } else - machine_at_common_init(model); - - device_add(&opti895_device); - - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); -} - -int -machine_at_403tg_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/403tg/403TG.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_403tg_common_init(model, 0); - - return ret; -} - -int -machine_at_403tg_d_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/403tg_d/J403TGRevD.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_403tg_common_init(model, 1); - - return ret; -} - -int -machine_at_403tg_d_mr_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/403tg_d/MRBiosOPT895.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_403tg_common_init(model, 0); - - return ret; -} - -static const device_config_t pb450_config[] = { - // clang-format off - { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, - .default_string = "pb450a", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "PhoenixBIOS 4.03 - Revision PCI 1.0A", .internal_name = "pb450a_pci10a" /*"pci10a"*/, .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pb450/OPTI802.bin", "" } }, - { .name = "PhoenixBIOS 4.03 - Revision PNP 1.1A", .internal_name = "pb450a", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pb450/PNP11A.bin", "" } }, - { .name = "PhoenixBIOS 4.05 - Revision P4HS20 (by Micro Firmware)", .internal_name = "pb450a_p4hs20", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pb450/p4hs20.bin", "" } }, - { .files_no = 0 } - }, - }, - { .name = "", .description = "", .type = CONFIG_END } - // clang-format on -}; - -const device_t pb450_device = { - .name = "Packard Bell PB450", - .internal_name = "pb450_device", - .flags = 0, - .local = 0, - .init = NULL, - .close = NULL, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = pb450_config -}; - -int -machine_at_pb450_init(const machine_t *model) -{ - int ret = 0; - const char* fn; - - /* No ROMs available */ - if (!device_available(model->device)) - return ret; - - device_context(model->device); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); - ret = bios_load_linear(fn, 0x000e0000, 131072, 0); - device_context_restore(); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - device_add(&ide_vlb_2ch_device); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x12, PCI_CARD_NORMAL, 5, 6, 7, 8); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&opti895_device); - device_add(&opti602_device); - device_add(&opti822_device); - device_add(&keyboard_ps2_phoenix_device); - device_add(&fdc37c665_ide_device); - device_add(&ide_opti611_vlb_sec_device); - device_add(&intel_flash_bxt_device); - device_add(&phoenix_486_jumper_pci_device); - - return ret; -} - -static void -machine_at_pc330_6573_common_init(const machine_t *model) -{ - machine_at_common_init_ex(model, 2); - device_add(&ide_vlb_2ch_device); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 5, 6, 7, 8); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 9, 10, 11, 12); - /* This is a guess because the BIOS always gives it a video BIOS - and never gives it an IRQ, so it is impossible to known for - certain until we obtain PCI readouts from the real machine. */ - pci_register_slot(0x0E, PCI_CARD_VIDEO, 13, 14, 15, 16); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&opti602_device); - device_add(&opti802g_device); - device_add(&opti822_device); - device_add(&keyboard_ps2_ami_device); - device_add(&fdc37c665_ide_device); - device_add(&ide_opti611_vlb_device); - device_add(&intel_flash_bxt_device); -} - -int -machine_at_aptiva510_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/aptiva510/$IMAGES.USF", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_pc330_6573_common_init(model); - - return ret; -} - -int -machine_at_pc330_6573_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pc330_6573/$IMAGES.USF", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_pc330_6573_common_init(model); - - return ret; -} - -int -machine_at_mvi486_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/mvi486/MVI627.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&opti498_device); - - device_add(&keyboard_at_device); - device_add(&pc87311_ide_device); - - return ret; -} - -static void -machine_at_sis_85c471_common_init(const machine_t *model) -{ - machine_at_common_init(model); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&sis_85c471_device); -} - -int -machine_at_ami471_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ami471/SIS471BE.AMI", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_sis_85c471_common_init(model); - device_add(&keyboard_at_ami_device); - - return ret; -} - -int -machine_at_advantage40xxd_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/advantage40xxd/AST101.09A", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&sis_85c471_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&keyboard_ps2_phoenix_device); - device_add(&um82c863f_ide_device); - - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_vli486sv2g_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/vli486sv2g/0402.001", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_sis_85c471_common_init(model); - device_add(&keyboard_ps2_ami_device); - - return ret; -} - -int -machine_at_dtk486_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/dtk486/4siw005.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_sis_85c471_common_init(model); - device_add(&keyboard_at_device); - - return ret; -} - -int -machine_at_px471_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/px471/SIS471A1.PHO", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_sis_85c471_common_init(model); - device_add(&ide_vlb_device); - device_add(&keyboard_at_device); - - return ret; -} - -int -machine_at_win471_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/win471/486-SiS_AC0360136.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_sis_85c471_common_init(model); - device_add(&keyboard_at_ami_device); - - return ret; -} - -int -machine_at_pci400ca_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pci400ca/486-AA008851.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SCSI, 1, 2, 3, 4); - pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&keyboard_at_ami_device); - device_add(&sio_device); - device_add(&intel_flash_bxt_ami_device); - - device_add(&i420tx_device); - device_add(&ncr53c810_onboard_pci_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_vi15g_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/vi15g/vi15gr23.rom", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_sis_85c471_common_init(model); - device_add(&keyboard_at_ami_device); - - return ret; -} - -int -machine_at_greenb_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/greenb/4gpv31-ami-1993-8273517.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&contaq_82c597_device); - - device_add(&keyboard_at_ami_device); - - return ret; -} - -int -machine_at_4gpv5_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/4gpv5/4GPV5.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&contaq_82c596a_device); - - device_add(&keyboard_at_device); - - return ret; -} - -static void -machine_at_sis_85c496_common_init(UNUSED(const machine_t *model)) -{ - device_add(&ide_pci_2ch_device); - - pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); - pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - - pci_set_irq_routing(PCI_INTA, PCI_IRQ_DISABLED); - pci_set_irq_routing(PCI_INTB, PCI_IRQ_DISABLED); - pci_set_irq_routing(PCI_INTC, PCI_IRQ_DISABLED); - pci_set_irq_routing(PCI_INTD, PCI_IRQ_DISABLED); -} - -int -machine_at_r418_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/r418/r418i.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - machine_at_sis_85c496_common_init(model); - device_add(&sis_85c496_device); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x07, PCI_CARD_NORMAL, 4, 1, 2, 3); - - device_add(&fdc37c665_device); - device_add(&keyboard_ps2_pci_device); - - return ret; -} - -int -machine_at_m4li_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/m4li/M4LI.04S", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - machine_at_sis_85c496_common_init(model); - device_add(&sis_85c496_device); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x07, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add(&fdc37c665_device); - device_add(&keyboard_ps2_pci_device); - - return ret; -} - -int -machine_at_ls486e_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ls486e/LS486E RevC.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - machine_at_sis_85c496_common_init(model); - device_add(&sis_85c496_ls486e_device); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); - - device_add(&fdc37c665_device); - device_add(&keyboard_ps2_ami_pci_device); - - return ret; -} - -int -machine_at_4dps_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/4dps/4DPS172G.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - machine_at_sis_85c496_common_init(model); - device_add(&sis_85c496_device); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x07, PCI_CARD_NORMAL, 4, 1, 2, 3); - - device_add(&w83787f_device); - device_add(&keyboard_ps2_ami_device); - - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_ms4144_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ms4144/ms-4144-1.4.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - machine_at_sis_85c496_common_init(model); - device_add(&sis_85c496_ls486e_device); - pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add(&w83787f_device); - device_add(&keyboard_at_ami_device); - - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_acerp3_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/acerp3/Acer Mate 600 P3 BIOS U13 V2.0R02-J3 ACR8DE00-S00-950911-R02-J3.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - machine_at_sis_85c496_common_init(model); - device_add(&sis_85c496_device); - pci_register_slot(0x09, PCI_CARD_VIDEO, 0, 0, 0, 0); - pci_register_slot(0x0A, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); - - device_add(&fdc37c665_ide_device); - device_add(&keyboard_ps2_acer_pci_device); - device_add(&ide_cmd640_pci_legacy_only_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(&gd5434_onboard_pci_device); - - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_486sp3c_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/486sp3c/SI4I0306.AWD", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - machine_at_sis_85c496_common_init(model); - device_add(&sis_85c496_device); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add(&fdc37c665_device); - device_add(&keyboard_ps2_ami_pci_device); - - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_4saw2_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/4saw2/4saw0911.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - machine_at_sis_85c496_common_init(model); - device_add(&sis_85c496_device); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); - - device_add(&w83787f_device); - device_add(&keyboard_ps2_pci_device); - - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_alfredo_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/alfredo/1010AQ0_.BIO", - "roms/machines/alfredo/1010AQ0_.BI1", 0x1c000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - device_add(&amstrad_megapc_nvr_device); - device_add(&ide_pci_device); - - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&keyboard_ps2_phoenix_device); - device_add(&sio_device); - device_add(&fdc37c663_device); - device_add(&intel_flash_bxt_ami_device); - - device_add(&i420tx_device); - - return ret; -} - -int -machine_at_ninja_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/ninja/1008AY0_.BIO", - "roms/machines/ninja/1008AY0_.BI1", 0x1c000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - device_add(&amstrad_megapc_nvr_device); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 2, 1); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 1, 2, 1); - device_add(&keyboard_ps2_phoenix_device); - device_add(&intel_flash_bxt_ami_device); - - device_add(&i420ex_device); - device_add(&i82091aa_device); - - return ret; -} - -int -machine_at_bat4ip3e_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/bat4ip3e/404C.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_IDE, 0xfe, 0xff, 0, 0); - pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 1, 2); - pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 1, 2, 1); - pci_register_slot(0x0a, PCI_CARD_NORMAL, 1, 2, 1, 2); - - device_add(&phoenix_486_jumper_pci_device); - device_add(&keyboard_ps2_pci_device); - device_add(&i420ex_device); - device_add(&ide_cmd640_pci_device); - device_add(&fdc37c665_device); - - return ret; -} - -int -machine_at_486pi_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/486pi/486pi.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_NORMAL, 1, 2, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 2, 1); - pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 1, 2); - - device_add(&keyboard_ps2_ami_pci_device); - device_add(&fdc37c665_device); - device_add(&i420ex_device); - - return ret; -} - -int -machine_at_sb486p_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/sb486p/amiboot.rom", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 2, 1); - - device_add(&keyboard_ps2_ami_pci_device); - device_add(&i82091aa_device); - device_add(&i420ex_device); - - return ret; -} - -int -machine_at_486sp3_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/486sp3/awsi2737.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&ide_isa_device); - - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SCSI, 1, 2, 3, 4); /* 01 = SCSI */ - pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 03 = Slot 1 */ - pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */ - pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 05 = Slot 3 */ - pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 06 = Slot 4 */ - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&keyboard_at_ami_device); /* Uses the AMIKEY KBC */ - device_add(&sio_device); - device_add(&fdc37c663_ide_device); - device_add(&sst_flash_29ee010_device); - - device_add(&i420tx_device); - device_add(&ncr53c810_onboard_pci_device); - - return ret; -} - -int -machine_at_amis76_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_inverted("roms/machines/s76p/S76P.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - // pci_register_slot(0x01, PCI_CARD_IDE, 1, 2, 3 ,4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&sio_device); - device_add(&fdc37c665_device); - device_add(&intel_flash_bxt_ami_device); - - device_add(&i420tx_device); - // device_add(&ide_cmd640_pci_device); /* is this actually cmd640? is it single channel? */ - device_add(&ide_pci_device); - - return ret; -} - -int -machine_at_pci400cb_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pci400cb/032295.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - device_add(&ami_1994_nvr_device); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 3, 2, 1); /* 0F = Slot 1 */ - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 0E = Slot 2 */ - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 0D = Slot 3 */ - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 0C = Slot 4 */ - device_add(&keyboard_ps2_ami_pci_device); /* Assume AMI Megakey 1993 standalone ('P') - because of the Tekram machine below. */ - - device_add(&ims8848_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_g486ip_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/g486ip/G486IP.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - device_add(&ami_1992_nvr_device); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 03 = Slot 1 */ - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */ - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 05 = Slot 3 */ - device_add(&keyboard_ps2_ami_pci_device); /* AMI Megakey 1993 stanalone ('P') */ - - device_add(&ims8848_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_486sp3g_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/486sp3g/PCI-I-486SP3G_0306.001 (Beta).bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&ide_isa_device); - - pci_init(PCI_CONFIG_TYPE_2); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SCSI, 1, 2, 3, 4); /* 01 = SCSI */ - pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 06 = Slot 1 */ - pci_register_slot(0x05, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 05 = Slot 2 */ - pci_register_slot(0x04, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 04 = Slot 3 */ - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&keyboard_ps2_ami_pci_device); /* Uses the AMIKEY KBC */ - device_add(&sio_zb_device); - device_add(&pc87332_398_ide_device); - device_add(&sst_flash_29ee010_device); - - device_add(&i420zx_device); - device_add(&ncr53c810_onboard_pci_device); - - return ret; -} - -static const device_config_t sb486pv_config[] = { - // clang-format off - { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, - .default_string = "sb486pv", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "AMI WinBIOS (062594) - Revision 0108", .internal_name = "sb486pv_0108", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/sb486pv/41-0108-062594-SATURN2.rom", "" } }, - { .name = "AMI WinBIOS (062594) - Revision 0301", .internal_name = "sb486pv_0301", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/sb486pv/0301-062594-SATURN2.rom", "" } }, - { .name = "AMIBIOS 6 (071595) - Revision 1301", .internal_name = "sb486pv", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/sb486pv/amiboot.rom", "" } }, - { .files_no = 0 } - }, - }, - { .name = "", .description = "", .type = CONFIG_END } - // clang-format on -}; - -const device_t sb486pv_device = { - .name = "ICS SB486PV", - .internal_name = "sb486pv_device", - .flags = 0, - .local = 0, - .init = NULL, - .close = NULL, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = sb486pv_config -}; - -int -machine_at_sb486pv_init(const machine_t *model) -{ - int ret = 0; - const char* fn; - - /* No ROMs available */ - if (!device_available(model->device)) - return ret; - - device_context(model->device); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); - if (!strcmp(fn, "roms/machines/sb486pv/amiboot.rom")) - ret = bios_load_linear(fn, 0x000e0000, 131072, 0); - else - ret = bios_load_linear_inverted(fn, 0x000e0000, 131072, 0); - device_context_restore(); - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_2); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0e, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x0f, PCI_CARD_VIDEO, 1, 2, 3, 4); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&keyboard_ps2_ami_pci_device); - device_add(&sio_zb_device); - device_add(&ide_rz1000_pci_single_channel_device); - device_add(&i82091aa_26e_device); - if (!strcmp(fn, "roms/machines/sb486pv/amiboot.rom")) - device_add(&intel_flash_bxt_device); - else - device_add(&intel_flash_bxt_ami_device); - - device_add(&i420zx_device); - - return ret; -} - -int -machine_at_486ap4_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/486ap4/0205.002", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - /* Excluded: 5, 6, 7, 8 */ - pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 09 = Slot 1 */ - pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 0a = Slot 2 */ - pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 0b = Slot 3 */ - pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 0c = Slot 4 */ - device_add(&keyboard_ps2_ami_pci_device); /* Uses the AMIKEY KBC */ - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&i420ex_device); - - return ret; -} - -int -machine_at_g486vpa_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/g486vpa/3.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); - - device_add(&via_vt82c49x_pci_ide_device); - device_add(&via_vt82c505_device); - device_add(&pc87332_398_ide_sec_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_486vipio2_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/486vipio2/1175G701.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); - - device_add(&via_vt82c49x_pci_ide_device); - device_add(&via_vt82c505_device); - device_add(&w83787f_ide_sec_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_abpb4_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/abpb4/486-AB-PB4.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CAN_SWITCH_TYPE); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add(&ali1489_device); - device_add(&w83787f_device); - device_add(&keyboard_at_device); -#if 0 - device_add(&intel_flash_bxt_device); -#endif - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_win486pci_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/win486pci/v1hj3.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add(&ali1489_device); - device_add(&prime3b_device); - device_add(&keyboard_at_ami_device); - - return ret; -} - -int -machine_at_ms4145_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ms4145/AG56S.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); - - device_add(&ali1489_device); - device_add(&w83787f_device); - device_add(&keyboard_at_ami_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_sbc490_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/sbc490/07159589.rom", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x01, PCI_CARD_VIDEO, 4, 1, 2, 3); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&ali1489_device); - device_add(&fdc37c665_device); - device_add(&keyboard_ps2_ami_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_tf486_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/tf486/tf486v10.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - - device_add(&ali1489_device); - device_add(&w83977ef_device); - device_add(&keyboard_at_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_arb1476_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/arb1476/w1476b.v21", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - - device_add(&ali1489_device); - device_add(&fdc37c669_device); - device_add(&keyboard_ps2_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_itoxstar_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/itoxstar/STARA.ROM", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x1F, PCI_CARD_NORMAL, 1, 2, 3, 4); - device_add(&w83977f_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&stpc_client_device); - device_add(&sst_flash_29ee020_device); - device_add(&w83781d_device); /* fans: Chassis, CPU, unused; temperatures: Chassis, CPU, unused */ - hwm_values.fans[2] = 0; /* unused */ - hwm_values.temperatures[2] = 0; /* unused */ - hwm_values.voltages[0] = 0; /* Vcore unused */ - - return ret; -} - -int -machine_at_arb1423c_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/arb1423c/A1423C.v12", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x1F, PCI_CARD_NORMAL, 1, 0, 0, 0); - pci_register_slot(0x1E, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x1D, PCI_CARD_NORMAL, 3, 4, 1, 2); - device_add(&w83977f_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&stpc_consumer2_device); - device_add(&winbond_flash_w29c020_device); - - return ret; -} - -int -machine_at_arb1479_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/arb1479/1479A.rom", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x1F, PCI_CARD_NORMAL, 1, 0, 0, 0); - pci_register_slot(0x1E, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x1D, PCI_CARD_NORMAL, 3, 4, 1, 2); - device_add(&w83977f_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&stpc_consumer2_device); - device_add(&winbond_flash_w29c020_device); - - return ret; -} - -int -machine_at_iach488_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/iach488/FH48800B.980", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&w83977f_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&stpc_consumer2_device); - device_add(&sst_flash_29ee020_device); - - return ret; -} - -int -machine_at_pcm9340_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pcm9340/9340v110.bin", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x1D, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x1E, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x1F, PCI_CARD_NORMAL, 2, 3, 4, 1); - device_add_inst(&w83977f_device, 1); - device_add_inst(&w83977f_device, 2); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&stpc_elite_device); - device_add(&sst_flash_29ee020_device); - - return ret; -} - -int -machine_at_pcm5330_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pcm5330/5330_13b.bin", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_SOUTHBRIDGE_IDE, 0, 0, 0, 0); - pci_register_slot(0x0E, PCI_CARD_SOUTHBRIDGE_USB, 1, 2, 3, 4); - pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); - device_add(&stpc_serial_device); - device_add(&w83977f_370_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&stpc_atlas_device); - device_add(&sst_flash_29ee020_device); - - return ret; -} - -int -machine_at_ecs486_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ecs486/8810AIO.32J", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add(&umc_hb4_device); - device_add(&umc_8886f_device); - device_add(&ide_cmd640_pci_legacy_only_device); - device_add(&fdc37c665_device); - device_add(&intel_flash_bxt_device); - device_add(&keyboard_ps2_ami_device); - - return ret; -} - -static const device_config_t hot433a_config[] = { - // clang-format off - { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, - .default_string = "hot433a", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "AMIBIOS 5 (101094) - Revision 433AUS33", .internal_name = "hot433a", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/hot433/433AUS33.ROM", "" } }, - { .name = "AwardBIOS v4.51PG - Revision 2.5 (by eSupport)", .internal_name = "hot433a_v451pg", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/hot433/2A4X5H21.BIN", "" } }, - { .files_no = 0 } - }, - }, - { .name = "", .description = "", .type = CONFIG_END } - // clang-format on -}; - -const device_t hot433a_device = { - .name = "Shuttle HOT-433A", - .internal_name = "hot433a_device", - .flags = 0, - .local = 0, - .init = NULL, - .close = NULL, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = hot433a_config -}; - -int -machine_at_hot433a_init(const machine_t *model) -{ - int ret = 0; - const char* fn; - - /* No ROMs available */ - if (!device_available(model->device)) - return ret; - - device_context(model->device); - int is_award = !strcmp(device_get_config_bios("bios"), "hot433a_award"); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); - ret = bios_load_linear(fn, 0x000e0000, 131072, 0); - device_context_restore(); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - if (is_award) - device_add(&amstrad_megapc_nvr_device); - else - device_add(&ami_1994_nvr_device); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); - - device_add(&umc_hb4_device); - device_add(&umc_8886bf_device); - if (is_award) - device_add(&um8663af_device); - else - device_add(&um8669f_device); - device_add(&winbond_flash_w29c010_device); - if (is_award) - device_add(&keyboard_ps2_ami_device); - else - device_add(&keyboard_at_ami_device); - - pic_toggle_latch(is_award); - - return ret; -} - -int -machine_at_84xxuuda_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/84xxuuda/uud0520s.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add(&umc_hb4_device); - device_add(&umc_8886bf_device); - device_add(&um8663bf_device); - device_add(&winbond_flash_w29c010_device); - device_add(&keyboard_ps2_ami_device); - - return ret; -} - -int -machine_at_pl4600c_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pl4600c/SST29EE010.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); /* Slot 01 */ - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); /* Slot 02 */ - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); /* Onboard */ - pci_register_slot(0x13, PCI_CARD_VIDEO, 0, 0, 0, 0); /* Onboard */ - - - device_add(&umc_hb4_device); - device_add(&umc_8886af_device); - device_add(&um8663af_device); - device_add(&sst_flash_29ee010_device); - device_add(&keyboard_ps2_ami_pci_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(&gd5430_onboard_pci_device); - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(&ess_1688_device); - - if (fdc_current[0] == FDC_INTERNAL){ - fdd_set_turbo(0, 1); - fdd_set_turbo(1, 1); - } - - return ret; -} - -int -machine_at_atc1415_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/atc1415/1415V330.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x14, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add(&umc_hb4_device); - device_add(&umc_8886bf_device); - device_add(&intel_flash_bxt_device); - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_actionpc2600_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/actionpc2600/action2600.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 3); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0E, PCI_CARD_VIDEO, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - - device_add(&umc_hb4_device); - device_add(&umc_8886bf_device); - device_add(&fdc37c665_device); - device_add(&intel_flash_bxt_device); - device_add(&keyboard_ps2_tg_ami_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - return ret; -} - -int -machine_at_actiontower8400_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/actiontower8400/V31C.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x15, PCI_CARD_VIDEO, 0, 0, 0, 0); - pci_register_slot(0x16, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x14, PCI_CARD_NORMAL, 2, 3, 4, 1); - - device_add(&umc_hb4_device); - device_add(&umc_8886f_device); - device_add(&fdc37c665_device); - device_add(&ide_cmd640_pci_device); - device_add(&intel_flash_bxt_device); // The ActionPC 2600 has this so I'm gonna assume this does too. - device_add(&keyboard_ps2_ami_pci_device); - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - return ret; -} - -int -machine_at_m919_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/m919/9190914s.rom", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add(&umc_hb4_device); - device_add(&umc_8886af_device); /* AF is correct - the BIOS does IDE writes to ports 108h and 109h. */ - device_add(&um8663bf_device); - device_add(&sst_flash_29ee010_device); - device_add(&keyboard_at_ami_device); - - return ret; -} - -int -machine_at_spc7700plw_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/spc7700plw/77LW13FH.P24", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add(&umc_hb4_device); - device_add(&umc_8886af_device); - device_add(&fdc37c665_device); - device_add(&intel_flash_bxt_device); - device_add(&keyboard_ps2_ami_device); - - return ret; -} - -int -machine_at_ms4134_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ms4134/4alm001.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_ide_init(model); - - device_add(&ali1429g_device); - - device_add(&fdc37c665_ide_pri_device); - - pci_init(FLAG_MECHANISM_1 | FLAG_MECHANISM_2 | PCI_ALWAYS_EXPOSE_DEV0); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - - pci_register_slot(0x0B, PCI_CARD_SCSI, 4, 1, 2, 3); - pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); - - device_add(&ali1435_device); - device_add(&sst_flash_29ee010_device); - - device_add(&keyboard_ps2_ami_device); - - return ret; -} - -int -machine_at_tg486gp_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/tg486gp/tg486gp.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_ide_init(model); - - device_add(&ali1429g_device); - - device_add(&fdc37c665_ide_pri_device); - - pci_init(FLAG_MECHANISM_1 | FLAG_MECHANISM_2 | PCI_ALWAYS_EXPOSE_DEV0); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - - pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); - - device_add(&ali1435_device); - device_add(&sst_flash_29ee010_device); - - device_add(&keyboard_ps2_tg_ami_device); - - return ret; -} - -int -machine_at_tg486g_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/tg486g/tg486g.bin", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - device_add(&amstrad_megapc_nvr_device); - device_add(&sis_85c471_device); - device_add(&ide_isa_device); - device_add(&fdc37c651_ide_device); - device_add(&keyboard_ps2_tg_ami_pci_device); - - if (gfxcard[0] != VID_INTERNAL) { - for (uint16_t i = 0; i < 32768; i++) - rom[i] = mem_readb_phys(0x000c0000 + i); - } - mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000); - mem_mapping_set_exec(&bios_mapping, rom); - - return ret; -} - -int -machine_at_dvent4xx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/dvent4xx/Venturis466_BIOS.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&sis_85c471_device); - device_add(&ide_cmd640_vlb_pri_device); - device_add(&fdc37c665_ide_device); - device_add(&keyboard_ps2_phoenix_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - return ret; -} - -int -machine_at_ecsal486_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ecsal486/ECS_AL486.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&ali1429g_device); - device_add(&keyboard_ps2_ami_pci_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_ap4100aa_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ap4100aa/M27C512DIP28.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - device_add(&ami_1994_nvr_device); - device_add(&ali1429g_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&ide_vlb_device); - device_add(&um8663bf_device); - - return ret; -} - -int -machine_at_atc1762_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/atc1762/atc1762.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&ali1429g_device); - device_add(&keyboard_ps2_ami_pci_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_dataexpert386wb_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/dataexpert386wb/st0386-wb-ver2-0-618f078c738cb397184464.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&opti391_device); - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_isa486c_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/isa486c/asus-isa-486c-401a0-040591-657e2c17a0218417632602.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&isa486c_device); - device_add(&port_92_key_device); - - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_genoa486_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/genoa486/AMI486.BIO", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&compaq_genoa_device); - device_add(&port_92_key_device); - - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_ga486l_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ga486l/ga-486l_bios.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&opti381_device); - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_cobalt_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/cobalt/Cobalt_2.3.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&opti499_device); - device_add(&ide_opti611_vlb_device); - device_add(&ide_isa_sec_device); - device_add(&fdc37c665_device); - - device_add(&keyboard_ps2_ami_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - return ret; -} - -int -machine_at_cougar_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/cougar/COUGRMRB.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&ide_vlb_device); - - device_add(&opti499_device); - device_add(&fdc37c665_ide_pri_device); - - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_micronics386_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/micronics386/386-Micronics-09-00021-EVEN.BIN", - "roms/machines/micronics386/386-Micronics-09-00021-ODD.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_init(model); - device_add(&port_92_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_micronics386px_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/micronics386/386-Micronics-09-00021-LO.BIN", - "roms/machines/micronics386/386-Micronics-09-00021-HI.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_init(model); - device_add(&port_92_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} diff --git a/src/machine/m_at_286_386sx.c b/src/machine/m_at_386sx.c similarity index 53% rename from src/machine/m_at_286_386sx.c rename to src/machine/m_at_386sx.c index 8a1cadbb7..4aed9f0b1 100644 --- a/src/machine/m_at_286_386sx.c +++ b/src/machine/m_at_386sx.c @@ -6,15 +6,13 @@ * * This file is part of the 86Box distribution. * - * Implementation of 286 and 386SX machines. - * - * + * Implementation of 386SX machines. * * Authors: Miran Grca, * EngiNerd * - * Copyright 2016-2019 Miran Grca. - * Copyright 2020 EngiNerd. + * Copyright 2016-2025 Miran Grca. + * Copyright 2020-2025 EngiNerd. */ #include #include @@ -45,104 +43,31 @@ #include <86box/flash.h> #include <86box/machine.h> +/* ISA */ +/* + * Current bugs: + * - soft-reboot after saving CMOS settings/pressing ctrl-alt-del produces an 8042 error + */ int -machine_at_mr286_init(const machine_t *model) +machine_at_pc916sx_init(const machine_t *model) { int ret; - ret = bios_load_interleaved("roms/machines/mr286/V000B200-1", - "roms/machines/mr286/V000B200-2", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_ide_init(model); - device_add(&keyboard_at_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -static void -machine_at_headland_common_init(const machine_t *model, int type) -{ - device_add(&keyboard_at_ami_device); - - if ((type != 2) && (fdc_current[0] == FDC_INTERNAL)) - device_add(&fdc_at_device); - - if (type == 2) - device_add(&headland_ht18b_device); - else if (type == 1) - device_add(&headland_gc113_device); - else - device_add(&headland_gc10x_device); -} - -int -machine_at_tg286m_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/tg286m/ami.bin", - 0x000f0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_ide_init(model); - - machine_at_headland_common_init(model, 1); - - return ret; -} - -int -machine_at_ama932j_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ama932j/ami.bin", - 0x000f0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_ide_init(model); - - if (gfxcard[0] == VID_INTERNAL) - device_add(&oti067_ama932j_device); - - machine_at_headland_common_init(model, 2); - - device_add_params(&pc87310_device, (void *) (PC87310_ALI)); - - return ret; -} - -int -machine_at_quadt286_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/quadt286/QUADT89L.ROM", - "roms/machines/quadt286/QUADT89H.ROM", + ret = bios_load_interleaved("roms/machines/pc916sx/ncr_386sx_u46-17_7.3.bin", + "roms/machines/pc916sx/ncr_386sx_u12-19_7.3.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) return ret; machine_at_common_init(model); - device_add(&keyboard_at_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + mem_remap_top(384); if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); - device_add(&headland_gc10x_device); - return ret; } @@ -159,7 +84,7 @@ machine_at_quadt386sx_init(const machine_t *model) return ret; machine_at_common_init(model); - device_add(&keyboard_at_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); @@ -169,6 +94,7 @@ machine_at_quadt386sx_init(const machine_t *model) return ret; } +/* ACC2036 */ static const device_config_t pbl300sx_config[] = { // clang-format off { @@ -226,8 +152,8 @@ machine_at_pbl300sx_init(const machine_t *model) machine_at_common_init(model); device_add(&acc2036_device); - device_add(&keyboard_ps2_phoenix_device); - device_add(&um82c862f_ide_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&um866x_device, (void *) (UM82C862F | UM866X_IDE_PRI)); if (gfxcard[0] == VID_INTERNAL) device_add(machine_get_vid_device(machine)); @@ -235,6 +161,242 @@ machine_at_pbl300sx_init(const machine_t *model) return ret; } +/* ALi M1217 */ +int +machine_at_arb1374_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/arb1374/1374s.rom", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&ali1217_device); + device_add(&ide_isa_device); + device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0 | W83XX7_IDE_PRI)); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_sbc350a_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/sbc350a/350a.rom", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&ali1217_device); + device_add(&ide_isa_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_flytech386_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/flytech386/FLYTECH.BIO", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&ali1217_device); + device_add(&ide_isa_device); + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89 | W83XX7_IDE_PRI | W837X7_IDE_START)); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&tvga8900d_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_325ax_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/325ax/M27C512.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&ali1217_device); + device_add(&fdc_at_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_mr1217_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/mr1217/mrbios.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&ali1217_device); + device_add(&fdc_at_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +/* ALi M1409 */ +int +machine_at_acer100t_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/acer100t/acer386.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ps2_ide_init(model); + + device_add(&ali1409_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&oti077_acer100t_device); + + device_add_params(&pc87310_device, (void *) (PC87310_ALI)); + + return ret; +} + +/* HT18 */ +int +machine_at_ama932j_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ama932j/ami.bin", + 0x000f0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_ide_init(model); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&oti067_ama932j_device); + + machine_at_headland_common_init(model, 2); + + device_add_params(&pc87310_device, (void *) (PC87310_ALI)); + + return ret; +} + +/* Intel 82335 */ +int +machine_at_adi386sx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/adi386sx/3iip001l.bin", + "roms/machines/adi386sx/3iip001h.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + device_add(&amstrad_megapc_nvr_device); /* NVR that is initialized to all 0x00's. */ + + device_add(&intel_82335_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_shuttle386sx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/shuttle386sx/386-Shuttle386SX-Even.BIN", + "roms/machines/shuttle386sx/386-Shuttle386SX-Odd.BIN", + 0x000f0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&intel_82335_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* NEAT */ +int +machine_at_cmdsl386sx16_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/cmdsl386sx16/cbm-sl386sx-bios-lo-v1.04-390914-04.bin", + "roms/machines/cmdsl386sx16/cbm-sl386sx-bios-hi-v1.04-390915-04.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&neat_device); + /* Two serial ports - on the real hardware SL386SX-16, they are on the single UMC UM82C452. */ + device_add_inst(&ns16450_device, 1); + device_add_inst(&ns16450_device, 2); + + return ret; +} + int machine_at_neat_init(const machine_t *model) { @@ -256,523 +418,7 @@ machine_at_neat_init(const machine_t *model) return ret; } -int -machine_at_neat_ami_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ami286/AMIC206.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&neat_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&keyboard_at_ami_device); - - return ret; -} - -// TODO -// Onboard Paradise PVGA1A-JK VGA Graphics -// Data Technology Corporation DTC7187 RLL Controller (Optional) -int -machine_at_ataripc4_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/ataripc4/AMI_PC4X_1.7_EVEN.BIN", - "roms/machines/ataripc4/AMI_PC4X_1.7_ODD.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&neat_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&keyboard_at_ami_device); - - return ret; -} - -int -machine_at_px286_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/px286/KENITEC.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&keyboard_at_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&neat_device); - - return ret; -} - -static void -machine_at_ctat_common_init(const machine_t *model) -{ - machine_at_common_init(model); - - device_add(&cs8220_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&keyboard_at_phoenix_device); -} - -int -machine_at_dells200_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/dells200/dellL200256_LO_@DIP28.BIN", - "roms/machines/dells200/Dell200256_HI_@DIP28.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ctat_common_init(model); - - return ret; -} - -int -machine_at_at122_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/at122/FINAL.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ctat_common_init(model); - - return ret; -} - -int -machine_at_tuliptc7_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleavedr("roms/machines/tuliptc7/tc7be.bin", - "roms/machines/tuliptc7/tc7bo.bin", - 0x000f8000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ctat_common_init(model); - - return ret; -} - -static void -machine_at_scat_init(const machine_t *model, int is_v4, int is_ami) -{ - machine_at_common_init(model); - - if (machines[machine].bus_flags & MACHINE_BUS_PS2) { - if (is_ami) - device_add(&keyboard_ps2_ami_device); - else - device_add(&keyboard_ps2_device); - } else { - if (is_ami) - device_add(&keyboard_at_ami_device); - else - device_add(&keyboard_at_device); - } - - if (is_v4) - device_add(&scat_4_device); - else - device_add(&scat_device); -} - -static void -machine_at_scatsx_init(const machine_t *model) -{ - machine_at_common_init(model); - - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&scat_sx_device); -} - -int -machine_at_award286_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/award286/award.bin", - 0x000f0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_scat_init(model, 0, 1); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&ide_isa_device); - - return ret; -} - -int -machine_at_gdc212m_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/gdc212m/gdc212m_72h.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_scat_init(model, 0, 1); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&ide_isa_device); - - return ret; -} - -int -machine_at_gw286ct_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/gw286ct/2ctc001.bin", - 0x000f0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - device_add(&f82c710_device); - - machine_at_scat_init(model, 1, 0); - - device_add(&ide_isa_device); - - return ret; -} - -int -machine_at_drsm35286_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/drsm35286/syab04-665821fb81363428830424.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - device_add(&ide_isa_device); - device_add(&fdc37c651_ide_device); - - machine_at_scat_init(model, 1, 0); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - return ret; -} - -int -machine_at_senor_scat286_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/senor286/AMI-DSC2-1115-061390-K8.rom", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_scat_init(model, 0, 1); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_super286c_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/super286c/hyundai_award286.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&neat_device); - - return ret; -} - -int -machine_at_super286tr_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/super286tr/hyundai_award286.bin", - 0x000f0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_scat_init(model, 0, 1); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_spc4200p_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/spc4200p/u8.01", - 0x000f0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_scat_init(model, 0, 1); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&ide_isa_device); - - return ret; -} - -int -machine_at_spc4216p_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/spc4216p/7101.U8", - "roms/machines/spc4216p/AC64.U10", - 0x000f0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_scat_init(model, 1, 1); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_spc4620p_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/spc4620p/31005h.u8", - "roms/machines/spc4620p/31005h.u10", - 0x000f0000, 131072, 0x8000); - - if (bios_only || !ret) - return ret; - - if (gfxcard[0] == VID_INTERNAL) - device_add(&ati28800k_spc4620p_device); - - machine_at_scat_init(model, 1, 1); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&ide_isa_device); - - return ret; -} - -int -machine_at_kmxc02_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/kmxc02/3ctm005.bin", - 0x000f0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_scatsx_init(model); - - return ret; -} - -int -machine_at_deskmaster286_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/deskmaster286/SAMSUNG-DESKMASTER-28612-ROM.BIN", - 0x000f0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_scat_init(model, 0, 1); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&ide_isa_device); - - return ret; -} - -int -machine_at_shuttle386sx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/shuttle386sx/386-Shuttle386SX-Even.BIN", - "roms/machines/shuttle386sx/386-Shuttle386SX-Odd.BIN", - 0x000f0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&intel_82335_device); - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_adi386sx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/adi386sx/3iip001l.bin", - "roms/machines/adi386sx/3iip001h.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - device_add(&amstrad_megapc_nvr_device); /* NVR that is initialized to all 0x00's. */ - - device_add(&intel_82335_device); - device_add(&keyboard_at_ami_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_wd76c10_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/megapc/41651-bios lo.u18", - "roms/machines/megapc/211253-bios hi.u19", - 0x000f0000, 65536, 0x08000); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - if (gfxcard[0] == VID_INTERNAL) - device_add(¶dise_wd90c11_megapc_device); - - device_add(&keyboard_ps2_quadtel_device); - - device_add(&wd76c10_device); - - return ret; -} - -int -machine_at_cmdsl386sx16_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/cmdsl386sx16/cbm-sl386sx-bios-lo-v1.04-390914-04.bin", - "roms/machines/cmdsl386sx16/cbm-sl386sx-bios-hi-v1.04-390915-04.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&keyboard_ps2_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&neat_device); - /* Two serial ports - on the real hardware SL386SX-16, they are on the single UMC UM82C452. */ - device_add_inst(&ns16450_device, 1); - device_add_inst(&ns16450_device, 2); - - return ret; -} - +/* NEATsx */ int machine_at_if386sx_init(const machine_t *model) { @@ -788,7 +434,7 @@ machine_at_if386sx_init(const machine_t *model) machine_at_common_init_ex(model, 2); device_add(&amstrad_megapc_nvr_device); /* NVR that is initialized to all 0x00's. */ - device_add(&keyboard_at_phoenix_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&neat_sx_device); @@ -806,22 +452,52 @@ machine_at_if386sx_init(const machine_t *model) return ret; } -static void -machine_at_scamp_common_init(const machine_t *model, int is_ps2) +/* OPTi 283 */ +int +machine_at_svc386sxp1_init(const machine_t *model) { - machine_at_common_ide_init(model); + int ret; - if (is_ps2) - device_add(&keyboard_ps2_ami_device); - else - device_add(&keyboard_at_ami_device); + ret = bios_load_linear("roms/machines/svc386sxp1/svc-386sx-am27c512dip28-6468c04f09d89320349795.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&opti283_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); - device_add(&vlsi_scamp_device); + return ret; } +/* OPTi 291 */ +int +machine_at_awardsx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/awardsx/Unknown 386SX OPTi291 - Award (original).BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_init(model); + + device_add(&opti291_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* SCAMP */ int machine_at_cmdsl386sx25_init(const machine_t *model) { @@ -848,6 +524,35 @@ machine_at_cmdsl386sx25_init(const machine_t *model) return ret; } +static void +machine_at_scamp_common_init(const machine_t *model, int is_ps2) +{ + machine_at_common_ide_init(model); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&vlsi_scamp_device); +} + +int +machine_at_dataexpert386sx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/dataexpert386sx/5e9f20e5ef967717086346.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_scamp_common_init(model, 0); + + return ret; +} + static const device_config_t dells333sl_config[] = { // clang-format off { @@ -909,7 +614,7 @@ machine_at_dells333sl_init(const machine_t *model) device_add(&ide_isa_device); - device_add(&pc87311_device); + device_add_params(&pc873xx_device, (void *) (PCX73XX_IDE_PRI | PCX730X_26E)); device_add(&vl82c113_device); /* The keyboard controller is part of the VL82c113. */ device_add(&vlsi_scamp_device); @@ -917,22 +622,6 @@ machine_at_dells333sl_init(const machine_t *model) return ret; } -int -machine_at_dataexpert386sx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/dataexpert386sx/5e9f20e5ef967717086346.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_scamp_common_init(model, 0); - - return ret; -} - int machine_at_spc6033p_init(const machine_t *model) { @@ -952,301 +641,57 @@ machine_at_spc6033p_init(const machine_t *model) return ret; } -int -machine_at_awardsx_init(const machine_t *model) +/* SCATsx */ +static void +machine_at_scatsx_init(const machine_t *model) { - int ret; + machine_at_common_init(model); - ret = bios_load_linear("roms/machines/awardsx/Unknown 386SX OPTi291 - Award (original).BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_init(model); - - device_add(&opti291_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); - return ret; + device_add(&scat_sx_device); } int -machine_at_acer100t_init(const machine_t *model) +machine_at_kmxc02_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/acer100t/acer386.BIN", - 0x000f0000, 65536, 0); + ret = bios_load_linear("roms/machines/kmxc02/3ctm005.bin", + 0x000f0000, 131072, 0); if (bios_only || !ret) return ret; - machine_at_ps2_ide_init(model); - - device_add(&ali1409_device); - if (gfxcard[0] == VID_INTERNAL) - device_add(&oti077_acer100t_device); - - device_add_params(&pc87310_device, (void *) (PC87310_ALI)); - - return ret; -} - - -int -machine_at_arb1374_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/arb1374/1374s.rom", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&ali1217_device); - device_add(&w83787f_ide_en_device); - device_add(&keyboard_ps2_ami_device); + machine_at_scatsx_init(model); return ret; } +/* WD76C10 */ int -machine_at_sbc350a_init(const machine_t *model) +machine_at_wd76c10_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/sbc350a/350a.rom", - 0x000f0000, 65536, 0); + ret = bios_load_interleaved("roms/machines/megapc/41651-bios lo.u18", + "roms/machines/megapc/211253-bios hi.u19", + 0x000f0000, 65536, 0x08000); if (bios_only || !ret) return ret; - machine_at_common_init(model); - - device_add(&ali1217_device); - device_add(&ide_isa_device); - device_add(&fdc37c665_ide_pri_device); - device_add(&keyboard_ps2_ami_device); - - return ret; -} - -int -machine_at_flytech386_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/flytech386/FLYTECH.BIO", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&ali1217_device); - device_add(&w83787f_ide_en_device); + machine_at_common_init_ex(model, 2); if (gfxcard[0] == VID_INTERNAL) - device_add(&tvga8900d_device); + device_add(¶dise_wd90c11_megapc_device); - device_add(&keyboard_at_ami_device); - - return ret; -} - -int -machine_at_325ax_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/325ax/M27C512.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&ali1217_device); - device_add(&fdc_at_device); - device_add(&keyboard_at_ami_device); - - return ret; -} - -int -machine_at_mr1217_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/mr1217/mrbios.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&ali1217_device); - device_add(&fdc_at_device); - device_add(&keyboard_at_ami_device); - - return ret; -} - -int -machine_at_pja511m_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pja511m/2006915102435734.rom", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add_inst(&fdc37c669_device, 1); - device_add_inst(&fdc37c669_device, 2); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&ali6117d_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_prox1332_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/prox1332/D30B3AC1.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&fdc37c669_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&ali6117d_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -/* - * Current bugs: - * - ctrl-alt-del produces an 8042 error - */ -int -machine_at_pc8_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/pc8/ncr_35117_u127_vers.4-2.bin", - "roms/machines/pc8/ncr_35116_u113_vers.4-2.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - device_add(&keyboard_at_ncr_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_3302_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/3302/f000-flex_drive_test.bin", - 0x000f0000, 65536, 0); - - if (ret) { - ret &= bios_load_aux_linear("roms/machines/3302/f800-setup_ncr3.5-013190.bin", - 0x000f8000, 32768, 0); - } - - if (bios_only || !ret) - return ret; - - machine_at_common_ide_init(model); - device_add(&neat_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&keyboard_at_ncr_device); - - return ret; -} - -/* - * Current bugs: - * - soft-reboot after saving CMOS settings/pressing ctrl-alt-del produces an 8042 error - */ -int -machine_at_pc916sx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/pc916sx/ncr_386sx_u46-17_7.3.bin", - "roms/machines/pc916sx/ncr_386sx_u12-19_7.3.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&keyboard_at_ncr_device); - mem_remap_top(384); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - return ret; -} - -int -machine_at_m290_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/m290/m290_pep3_1.25.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 6); - device_add(&amstrad_megapc_nvr_device); - - device_add(&olivetti_eva_device); - device_add(&port_6x_olivetti_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&keyboard_at_olivetti_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&wd76c10_device); return ret; } diff --git a/src/machine/m_at_486_misc.c b/src/machine/m_at_486_misc.c new file mode 100644 index 000000000..9eb8f8d4c --- /dev/null +++ b/src/machine/m_at_486_misc.c @@ -0,0 +1,210 @@ +/* + * 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. + * + * Implementation of 486 Miscellaneous machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/keyboard.h> +#include <86box/mem.h> +#include <86box/nvr.h> +#include <86box/pci.h> +#include <86box/dma.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/gameport.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/rom.h> +#include <86box/sio.h> +#include <86box/hdc.h> +#include <86box/port_6x.h> +#include <86box/port_92.h> +#include <86box/video.h> +#include <86box/flash.h> +#include <86box/scsi_ncr53c8xx.h> +#include <86box/hwm.h> +#include <86box/machine.h> +#include <86box/plat_unused.h> +#include <86box/sound.h> + +/* STPC Client */ +int +machine_at_itoxstar_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/itoxstar/STARA.ROM", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x1F, PCI_CARD_NORMAL, 1, 2, 3, 4); + device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI)); + device_add(&stpc_client_device); + device_add(&sst_flash_29ee020_device); + device_add(&w83781d_device); /* fans: Chassis, CPU, unused; temperatures: Chassis, CPU, unused */ + hwm_values.fans[2] = 0; /* unused */ + hwm_values.temperatures[2] = 0; /* unused */ + hwm_values.voltages[0] = 0; /* Vcore unused */ + + return ret; +} + +/* STPC Consumer-II */ +int +machine_at_arb1423c_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/arb1423c/A1423C.v12", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x1F, PCI_CARD_NORMAL, 1, 0, 0, 0); + pci_register_slot(0x1E, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x1D, PCI_CARD_NORMAL, 3, 4, 1, 2); + device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI)); + device_add(&stpc_consumer2_device); + device_add(&winbond_flash_w29c020_device); + + return ret; +} + +int +machine_at_arb1479_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/arb1479/1479A.rom", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x1F, PCI_CARD_NORMAL, 1, 0, 0, 0); + pci_register_slot(0x1E, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x1D, PCI_CARD_NORMAL, 3, 4, 1, 2); + device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI)); + device_add(&stpc_consumer2_device); + device_add(&winbond_flash_w29c020_device); + + return ret; +} + +int +machine_at_iach488_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/iach488/FH48800B.980", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI)); + device_add(&stpc_consumer2_device); + device_add(&sst_flash_29ee020_device); + + return ret; +} + +/* STPC Elite */ +int +machine_at_pcm9340_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pcm9340/9340v110.bin", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x1D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x1E, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x1F, PCI_CARD_NORMAL, 2, 3, 4, 1); + device_add_inst_params(&w83977_device, 1, (void *) (W83977F | W83977_AMI)); + device_add_inst_params(&w83977_device, 2, (void *) W83977F); + device_add(&stpc_elite_device); + device_add(&sst_flash_29ee020_device); + + return ret; +} + +/* STPC Atlas */ +int +machine_at_pcm5330_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pcm5330/5330_13b.bin", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_SOUTHBRIDGE_IDE, 0, 0, 0, 0); + pci_register_slot(0x0E, PCI_CARD_SOUTHBRIDGE_USB, 1, 2, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); + device_add(&stpc_serial_device); + device_add_params(&w83977_device, (void *) (W83977F | W83977_370 | W83977_AMI)); + device_add(&stpc_atlas_device); + device_add(&sst_flash_29ee020_device); + + return ret; +} diff --git a/src/machine/m_at_486slc.c b/src/machine/m_at_486slc.c new file mode 100644 index 000000000..156eae16b --- /dev/null +++ b/src/machine/m_at_486slc.c @@ -0,0 +1,72 @@ +/* + * 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. + * + * Implementation of 486SLC machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/keyboard.h> +#include <86box/mem.h> +#include <86box/nvr.h> +#include <86box/pci.h> +#include <86box/dma.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/gameport.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/rom.h> +#include <86box/sio.h> +#include <86box/hdc.h> +#include <86box/port_6x.h> +#include <86box/port_92.h> +#include <86box/video.h> +#include <86box/flash.h> +#include <86box/scsi_ncr53c8xx.h> +#include <86box/hwm.h> +#include <86box/machine.h> +#include <86box/plat_unused.h> +#include <86box/sound.h> + +/* OPTi 283 */ +int +machine_at_rycleopardlx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/rycleopardlx/486-RYC-Leopard-LX.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&opti283_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} diff --git a/src/machine/m_at_commodore.c b/src/machine/m_at_commodore.c deleted file mode 100644 index b9615c064..000000000 --- a/src/machine/m_at_commodore.c +++ /dev/null @@ -1,123 +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. - * - * Implementation of the Commodore PC3 system. - * - * - * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Sarah Walker, - * - * Copyright 2017-2018 Fred N. van Kempen. - * Copyright 2016-2018 Miran Grca. - * Copyright 2008-2018 Sarah Walker. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the: - * - * Free Software Foundation, Inc. - * 59 Temple Place - Suite 330 - * Boston, MA 02111-1307 - * USA. - */ -#include -#include -#include -#include -#include <86box/86box.h> -#include <86box/device.h> -#include <86box/timer.h> -#include <86box/io.h> -#include <86box/mem.h> -#include <86box/fdc_ext.h> -#include <86box/lpt.h> -#include <86box/rom.h> -#include <86box/serial.h> -#include <86box/fdd.h> -#include <86box/fdc.h> -#include <86box/machine.h> -#include <86box/plat_unused.h> - -static serial_t *cmd_uart; - -static void -cbm_io_write(UNUSED(uint16_t port), uint8_t val, UNUSED(void *priv)) -{ - lpt1_remove(); - lpt2_remove(); - - switch (val & 3) { - case 1: - lpt1_setup(LPT_MDA_ADDR); - break; - case 2: - lpt1_setup(LPT1_ADDR); - break; - case 3: - lpt1_setup(LPT2_ADDR); - break; - - default: - break; - } - - switch (val & 0xc) { - case 0x4: - serial_setup(cmd_uart, COM2_ADDR, COM2_IRQ); - break; - case 0x8: - serial_setup(cmd_uart, COM1_ADDR, COM1_IRQ); - break; - - default: - break; - } -} - -static void -cbm_io_init(void) -{ - io_sethandler(0x0230, 0x0001, NULL, NULL, NULL, cbm_io_write, NULL, NULL, NULL); -} - -int -machine_at_cmdpc_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/cmdpc30/commodore pc 30 iii even.bin", - "roms/machines/cmdpc30/commodore pc 30 iii odd.bin", - 0x000f8000, 32768, 0); - - if (bios_only || !ret) - return ret; - - machine_at_init(model); - - mem_remap_top(384); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - cmd_uart = device_add(&ns8250_device); - - cbm_io_init(); - - return ret; -} diff --git a/src/machine/m_at_common.c b/src/machine/m_at_common.c new file mode 100644 index 000000000..9526c7749 --- /dev/null +++ b/src/machine/m_at_common.c @@ -0,0 +1,139 @@ +/* + * 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. + * + * Implementation of the common initialization functions for + * the PC/AT and copatible machines. + * + * Authors: Miran Grca, + * Sarah Walker, + * Jasmine Iwanek, + * Fred N. van Kempen, + * + * Copyright 2016-2025 Miran Grca. + * Copyright 2008-2025 Sarah Walker. + * Copyright 2025 Jasmine Iwanek. + * Copyright 2017-2025 Fred N. van Kempen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the: + * + * Free Software Foundation, Inc. + * 59 Temple Place - Suite 330 + * Boston, MA 02111-1307 + * USA. + */ +#include +#include +#include +#include +#include <86box/86box.h> +#include <86box/timer.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/dma.h> +#include <86box/mem.h> +#include <86box/device.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/nvr.h> +#include <86box/gameport.h> +#include <86box/keyboard.h> +#include <86box/lpt.h> +#include <86box/rom.h> +#include <86box/hdc.h> +#include <86box/port_6x.h> +#include <86box/machine.h> + +void +machine_at_common_init_ex(const machine_t *model, int type) +{ + machine_common_init(model); + + refresh_at_enable = 1; + pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_at); + pic2_init(); + dma16_init(); + + if (!(type & 4)) + device_add(&port_6x_device); + type &= 3; + + if (type == 1) + device_add(&ibmat_nvr_device); + else if (type == 0) + device_add(&at_nvr_device); + + standalone_gameport_type = &gameport_device; +} + +void +machine_at_common_init(const machine_t *model) +{ + machine_at_common_init_ex(model, 0); +} + +void +machine_at_init(const machine_t *model) +{ + machine_at_common_init(model); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); +} + +void +machine_at_ps2_init(const machine_t *model) +{ + machine_at_common_init(model); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); +} + +void +machine_at_common_ide_init(const machine_t *model) +{ + machine_at_common_init(model); + + device_add(&ide_isa_device); +} + +void +machine_at_ibm_common_ide_init(const machine_t *model) +{ + machine_at_common_init_ex(model, 1); + + device_add(&ide_isa_device); +} + +void +machine_at_ide_init(const machine_t *model) +{ + machine_at_init(model); + + device_add(&ide_isa_device); +} + +void +machine_at_ps2_ide_init(const machine_t *model) +{ + machine_at_ps2_init(model); + + device_add(&ide_isa_device); +} + + diff --git a/src/machine/m_at_compaq.c b/src/machine/m_at_compaq.c deleted file mode 100644 index 2fbfed0ff..000000000 --- a/src/machine/m_at_compaq.c +++ /dev/null @@ -1,251 +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. - * - * Emulation of various Compaq PC's. - * - * - * - * Authors: Sarah Walker, - * Miran Grca, - * TheCollector1995, - * - * Copyright 2008-2018 Sarah Walker. - * Copyright 2016-2018 Miran Grca. - */ -#include -#include -#include -#include -#include -#include -#include <86box/86box.h> -#include "cpu.h" -#include <86box/io.h> -#include <86box/timer.h> -#include <86box/pit.h> -#include <86box/mem.h> -#include <86box/rom.h> -#include <86box/device.h> -#include <86box/chipset.h> -#include <86box/keyboard.h> -#include <86box/fdd.h> -#include <86box/fdc.h> -#include <86box/fdc_ext.h> -#include <86box/hdc.h> -#include <86box/hdc_ide.h> -#include <86box/machine.h> -#include <86box/video.h> -#include <86box/vid_cga.h> -#include <86box/vid_cga_comp.h> -#include <86box/plat_unused.h> - -enum { - COMPAQ_PORTABLEII = 0, - COMPAQ_PORTABLEIII, - COMPAQ_PORTABLEIII386, - COMPAQ_DESKPRO386, - COMPAQ_DESKPRO386_05_1988 -}; - -static int compaq_machine_type = 0; - -/* Compaq Deskpro 386 remaps RAM from 0xA0000-0xFFFFF to 0xFA0000-0xFFFFFF */ -static mem_mapping_t ram_mapping; - - -static uint8_t -read_ram(uint32_t addr, UNUSED(void *priv)) -{ - addr = (addr & 0x7ffff) + 0x80000; - addreadlookup(mem_logical_addr, addr); - - return (ram[addr]); -} - -static uint16_t -read_ramw(uint32_t addr, UNUSED(void *priv)) -{ - addr = (addr & 0x7ffff) + 0x80000; - addreadlookup(mem_logical_addr, addr); - - return (*(uint16_t *) &ram[addr]); -} - -static uint32_t -read_raml(uint32_t addr, UNUSED(void *priv)) -{ - addr = (addr & 0x7ffff) + 0x80000; - addreadlookup(mem_logical_addr, addr); - - return (*(uint32_t *) &ram[addr]); -} - -static void -write_ram(uint32_t addr, uint8_t val, UNUSED(void *priv)) -{ - addr = (addr & 0x7ffff) + 0x80000; - addwritelookup(mem_logical_addr, addr); - - mem_write_ramb_page(addr, val, &pages[addr >> 12]); -} - -static void -write_ramw(uint32_t addr, uint16_t val, UNUSED(void *priv)) -{ - addr = (addr & 0x7ffff) + 0x80000; - addwritelookup(mem_logical_addr, addr); - - mem_write_ramw_page(addr, val, &pages[addr >> 12]); -} - -static void -write_raml(uint32_t addr, uint32_t val, UNUSED(void *priv)) -{ - addr = (addr & 0x7ffff) + 0x80000; - addwritelookup(mem_logical_addr, addr); - - mem_write_raml_page(addr, val, &pages[addr >> 12]); -} - -static void -machine_at_compaq_init(const machine_t *model, int type) -{ - compaq_machine_type = type; - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - if (type < COMPAQ_PORTABLEIII386) { - mem_remap_top(384); - mem_mapping_add(&ram_mapping, 0xfa0000, 0x60000, - read_ram, read_ramw, read_raml, - write_ram, write_ramw, write_raml, - 0xa0000 + ram, MEM_MAPPING_INTERNAL, NULL); - } - - video_reset(gfxcard[0]); - - switch (type) { - case COMPAQ_PORTABLEII: - machine_at_common_init(model); - device_add(&keyboard_at_compaq_device); - break; - - case COMPAQ_PORTABLEIII: - if (hdc_current[0] == HDC_INTERNAL) - device_add(&ide_isa_device); - if (gfxcard[0] == VID_INTERNAL) - device_add(&compaq_plasma_device); - - machine_at_common_init(model); - device_add(&keyboard_at_compaq_device); - break; - - case COMPAQ_PORTABLEIII386: - if (hdc_current[0] == HDC_INTERNAL) - device_add(&ide_isa_device); - if (gfxcard[0] == VID_INTERNAL) - device_add(&compaq_plasma_device); - device_add(&compaq_386_device); - machine_at_common_init(model); - device_add(&keyboard_at_compaq_device); - break; - - case COMPAQ_DESKPRO386: - case COMPAQ_DESKPRO386_05_1988: - device_add(&compaq_386_device); - machine_at_common_init(model); - device_add(&keyboard_at_compaq_device); - break; - - default: - break; - } -} - -int -machine_at_portableii_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleavedr("roms/machines/portableii/109740-001.rom", - "roms/machines/portableii/109739-001.rom", - 0x000f8000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_compaq_init(model, COMPAQ_PORTABLEII); - - return ret; -} - -int -machine_at_portableiii_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linearr("roms/machines/portableiii/K Combined.bin", - 0x000f8000, 65536, 0); - - - if (bios_only || !ret) - return ret; - - machine_at_compaq_init(model, COMPAQ_PORTABLEIII); - - return ret; -} - -int -machine_at_portableiii386_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linearr("roms/machines/portableiii/P.2 Combined.bin", - 0x000f0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_compaq_init(model, COMPAQ_PORTABLEIII386); - - return ret; -} - -int -machine_at_deskpro386_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linearr("roms/machines/deskpro386/1986-09-04-HI.json.bin", - 0x000f8000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_compaq_init(model, COMPAQ_DESKPRO386); - - return ret; -} - -int -machine_at_deskpro386_05_1988_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linearr("roms/machines/deskpro386/1988-05-10.json.bin", - 0x000f8000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_compaq_init(model, COMPAQ_DESKPRO386_05_1988); - - return ret; -} diff --git a/src/machine/m_at_m6117.c b/src/machine/m_at_m6117.c new file mode 100644 index 000000000..2d8116b12 --- /dev/null +++ b/src/machine/m_at_m6117.c @@ -0,0 +1,88 @@ +/* + * 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. + * + * Implementation of 386SX machines. + * + * Authors: Miran Grca, + * EngiNerd + * + * Copyright 2016-2025 Miran Grca. + * Copyright 2020-2025 EngiNerd. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/keyboard.h> +#include <86box/mem.h> +#include <86box/rom.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/hdc.h> +#include <86box/nvr.h> +#include <86box/port_6x.h> +#define USE_SIO_DETECT +#include <86box/sio.h> +#include <86box/serial.h> +#include <86box/video.h> +#include <86box/vid_cga.h> +#include <86box/flash.h> +#include <86box/machine.h> + +/* ALi M6117D */ +int +machine_at_pja511m_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pja511m/2006915102435734.rom", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add_inst_params(&fdc37c669_device, 1, (void *) FDC37C6XX_IDE_PRI); + device_add_inst_params(&fdc37c669_device, 2, (void *) 0); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&ali6117d_device); + device_add(&sst_flash_29ee010_device); + + return ret; +} + +int +machine_at_prox1332_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/prox1332/D30B3AC1.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add_params(&fdc37c669_device, (void *) FDC37C6XX_370); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&ali6117d_device); + device_add(&sst_flash_29ee010_device); + + return ret; +} diff --git a/src/machine/m_at_misc.c b/src/machine/m_at_misc.c index d4264f07e..268cf7f7d 100644 --- a/src/machine/m_at_misc.c +++ b/src/machine/m_at_misc.c @@ -8,11 +8,9 @@ * * Implementation of Miscellaneous, Fake, Hypervisor machines. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2019 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -65,8 +63,7 @@ machine_at_vpc2007_init(const machine_t *model) pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); device_add(&i440bx_no_agp_device); device_add(&piix4e_device); - device_add(&w83977f_370_device); - device_add(&keyboard_ps2_ami_pci_device); + device_add_params(&w83977_device, (void *) (W83977F | W83977_370 | W83977_AMI | W83977_NO_NVR)); device_add(&intel_flash_bxt_device); spd_register(SPD_TYPE_SDRAM, 0xF, 256); /* real VPC provides invalid SPD data */ diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index 2ac805bee..12fd9861f 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -8,11 +8,9 @@ * * Implementation of Slot 1 machines. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2019 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -40,6 +38,39 @@ #include <86box/clock.h> #include <86box/snd_ac97.h> +/* ALi ALADDiN-PRO II */ +int +machine_at_m729_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/m729/M729NEW.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE_IDE, 1, 2, 3, 4); + pci_register_slot(0x03, PCI_CARD_SOUTHBRIDGE_PMU, 1, 2, 3, 4); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE_USB, 1, 2, 3, 4); + pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x10, PCI_CARD_NORMAL, 3, 4, 1, 2); + device_add(&ali1621_device); + device_add(&ali1543c_device); /* +0 */ + device_add(&winbond_flash_w29c010_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 512); + + return ret; +} + +/* i440FX */ int machine_at_acerv62x_init(const machine_t *model) { @@ -63,7 +94,7 @@ machine_at_acerv62x_init(const machine_t *model) pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); device_add(&i440fx_device); device_add(&piix3_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37C935 | FDC37C93X_APM)); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_APM)); device_add(&sst_flash_29ee020_device); spd_register(SPD_TYPE_SDRAM, 0x7, 128); @@ -109,8 +140,8 @@ machine_at_kn97_init(const machine_t *model) pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&i440fx_device); device_add(&piix3_device); - device_add(&keyboard_ps2_pci_device); - device_add(&w83877f_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0)); device_add(&intel_flash_bxt_device); device_add(&lm78_device); /* fans: Chassis, CPU, Power; temperature: MB */ for (uint8_t i = 0; i < 3; i++) @@ -119,6 +150,7 @@ machine_at_kn97_init(const machine_t *model) return ret; } +/* i440LX */ int machine_at_lx6_init(const machine_t *model) { @@ -142,8 +174,7 @@ machine_at_lx6_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&i440lx_device); device_add(&piix4e_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83977tf_device); + device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); device_add(&sst_flash_29ee010_device); spd_register(SPD_TYPE_SDRAM, 0xF, 256); @@ -208,7 +239,7 @@ machine_at_spitfire_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&i440lx_device); device_add(&piix4e_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37C935 | FDC37C93X_NORMAL | FDC37C93X_NO_NVR)); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL | FDC37C93X_NO_NVR)); device_add(&intel_flash_bxt_device); spd_register(SPD_TYPE_SDRAM, 0xF, 256); device_add(&lm78_device); /* no reporting in BIOS */ @@ -244,14 +275,14 @@ machine_at_ma30d_init(const machine_t *model) device_add(&i440lx_device); device_add(&piix4e_device); device_add(&nec_mate_unk_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&fdc37c67x_device); + device_add_params(&fdc37c67x_device, (void *) (FDC37XXX2 | FDC37XXXX_370)); device_add(&intel_flash_bxt_device); spd_register(SPD_TYPE_SDRAM, 0x7, 256); return ret; } +/* i440EX */ int machine_at_p6i440e2_init(const machine_t *model) { @@ -273,8 +304,7 @@ machine_at_p6i440e2_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&i440ex_device); device_add(&piix4_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83977tf_device); + device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); device_add(&sst_flash_29ee010_device); spd_register(SPD_TYPE_SDRAM, 0x03, 256); device_add(&w83781d_device); /* fans: CPU, CHS, PS; temperatures: unused, CPU, System */ @@ -284,112 +314,7 @@ machine_at_p6i440e2_init(const machine_t *model) return ret; } -int -machine_at_p2bls_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p2bls/1014ls.003", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x04, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x06, PCI_CARD_SCSI, 4, 1, 2, 3); - pci_register_slot(0x07, PCI_CARD_NETWORK, 3, 4, 1, 2); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440bx_device); - device_add(&piix4e_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83977ef_device); -#if 0 - device_add(ics9xxx_get(ICS9150_08)); /* setting proper speeds requires some interaction with the AS97127F ASIC */ -#endif - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0xF, 256); - device_add(&w83781d_device); /* fans: Chassis, CPU, Power; temperatures: MB, unused, CPU */ - hwm_values.temperatures[1] = 0; /* unused */ - hwm_values.temperatures[2] -= 3; /* CPU offset */ - - return ret; -} - -int -machine_at_lgibmx7g_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/lgibmx7g/ms6119.331", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440bx_device); - device_add(&piix4e_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83977tf_device); - device_add(&winbond_flash_w29c020_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 256); - - return ret; -} - -int -machine_at_p3bf_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p3bf/1008f.004", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x04, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440bx_device); - device_add(&piix4e_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83977ef_device); - device_add(ics9xxx_get(ICS9250_08)); - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0xF, 256); - device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */ - hwm_values.voltages[4] = hwm_values.voltages[5]; /* +12V reading not in line with other boards; appears to be close to the -12V reading */ - - return ret; -} - +/* i440BX */ int machine_at_bf6_init(const machine_t *model) { @@ -416,8 +341,7 @@ machine_at_bf6_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&i440bx_device); device_add(&piix4e_device); - device_add(&keyboard_ps2_pci_device); - device_add(&w83977ef_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); device_add(&sst_flash_39sf020_device); spd_register(SPD_TYPE_SDRAM, 0x7, 256); @@ -447,14 +371,86 @@ machine_at_bx6_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&i440bx_device); device_add(&piix4e_device); - device_add(&keyboard_ps2_pci_device); - device_add(&w83977f_device); + device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); device_add(&sst_flash_29ee010_device); spd_register(SPD_TYPE_SDRAM, 0xF, 256); return ret; } +int +machine_at_p2bls_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/p2bls/1014ls.003", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x04, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x06, PCI_CARD_SCSI, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_NETWORK, 3, 4, 1, 2); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440bx_device); + device_add(&piix4e_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); +#if 0 + device_add(ics9xxx_get(ICS9150_08)); /* setting proper speeds requires some interaction with the AS97127F ASIC */ +#endif + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0xF, 256); + device_add(&w83781d_device); /* fans: Chassis, CPU, Power; temperatures: MB, unused, CPU */ + hwm_values.temperatures[1] = 0; /* unused */ + hwm_values.temperatures[2] -= 3; /* CPU offset */ + + return ret; +} + +int +machine_at_p3bf_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/p3bf/1008f.004", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x04, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440bx_device); + device_add(&piix4e_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(ics9xxx_get(ICS9250_08)); + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0xF, 256); + device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */ + hwm_values.voltages[4] = hwm_values.voltages[5]; /* +12V reading not in line with other boards; appears to be close to the -12V reading */ + + return ret; +} + int machine_at_ax6bc_init(const machine_t *model) { @@ -479,8 +475,7 @@ machine_at_ax6bc_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&i440bx_device); device_add(&piix4e_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83977tf_device); + device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); device_add(&sst_flash_29ee020_device); spd_register(SPD_TYPE_SDRAM, 0x7, 256); device_add(&gl518sm_2d_device); /* fans: System, CPU; temperature: CPU; no reporting in BIOS */ @@ -488,37 +483,6 @@ machine_at_ax6bc_init(const machine_t *model) return ret; } -int -machine_at_atc6310bxii_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/atc6310bxii/6310s102.bin", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440bx_device); - device_add(&slc90e66_device); - device_add(&keyboard_ps2_pci_device); - device_add(&w83977ef_device); - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 256); - - return ret; -} - int machine_at_686bx_init(const machine_t *model) { @@ -542,8 +506,7 @@ machine_at_686bx_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&i440bx_device); device_add(&piix4e_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83977tf_device); + device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); device_add(&intel_flash_bxt_device); spd_register(SPD_TYPE_SDRAM, 0xF, 256); device_add(&w83781d_device); /* fans: CPU, unused, unused; temperatures: unused, CPU, unused */ @@ -556,6 +519,36 @@ machine_at_686bx_init(const machine_t *model) return ret; } +int +machine_at_lgibmx7g_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/lgibmx7g/ms6119.331", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440bx_device); + device_add(&piix4e_device); + device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); + device_add(&winbond_flash_w29c020_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); + + return ret; +} + int machine_at_p6sba_init(const machine_t *model) { @@ -581,8 +574,7 @@ machine_at_p6sba_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&i440bx_device); device_add(&piix4e_device); - device_add(&w83977tf_device); - device_add(&keyboard_ps2_ami_pci_device); + device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); device_add(&intel_flash_bxt_device); spd_register(SPD_TYPE_SDRAM, 0x7, 256); device_add(&w83781d_device); /* fans: CPU1, CPU2, Thermal Control; temperatures: unused, CPU1, CPU2? */ @@ -631,6 +623,131 @@ machine_at_s1846_init(const machine_t *model) return ret; } +/* i440ZX */ +int +machine_at_vei8_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/vei8/QHW1001.BIN", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440zx_device); + device_add(&piix4e_device); + device_add_params(&fdc37m60x_device, (void *) (FDC37XXX2 | FDC37XXXX_370)); + device_add(ics9xxx_get(ICS9250_08)); + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0x3, 512); + device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */ + + return ret; +} + +static void +machine_at_ms6168_common_init(const machine_t *model) +{ + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x14, PCI_CARD_SOUND, 3, 4, 1, 2); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440zx_device); + device_add(&piix4e_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&voodoo_3_2000_agp_onboard_8m_device); + + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&intel_flash_bxt_device); + spd_register(SPD_TYPE_SDRAM, 0x3, 256); + + if (sound_card_current[0] == SOUND_INTERNAL) { + device_add(machine_get_snd_device(machine)); + device_add(&cs4297_device); + } +} + +int +machine_at_ms6168_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ms6168/w6168ims.130", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ms6168_common_init(model); + + return ret; +} + +int +machine_at_borapro_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/borapro/MS6168V2.50", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ms6168_common_init(model); + + return ret; +} + +/* SMSC VictoryBX-66 */ +int +machine_at_atc6310bxii_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/atc6310bxii/6310s102.bin", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440bx_device); + device_add(&slc90e66_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); + + return ret; +} + +/* VIA Apollo Pro */ int machine_at_ficka6130_init(const machine_t *model) { @@ -654,14 +771,14 @@ machine_at_ficka6130_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&via_apro_device); device_add(&via_vt82c596a_device); - device_add(&w83877tf_device); - device_add(&keyboard_ps2_ami_pci_device); + device_add_params(&w83877_device, (void *) (W83877TF | W83877_3F0)); device_add(&sst_flash_29ee020_device); spd_register(SPD_TYPE_SDRAM, 0x7, 256); return ret; } +/* VIA Apollo Pro 133 */ int machine_at_p3v133_init(const machine_t *model) { @@ -687,8 +804,7 @@ machine_at_p3v133_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&via_apro133_device); device_add(&via_vt82c596b_device); - device_add(&w83977ef_device); - device_add(&keyboard_ps2_ami_pci_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); device_add(ics9xxx_get(ICS9248_39)); device_add(&sst_flash_39sf020_device); spd_register(SPD_TYPE_SDRAM, 0x7, 512); @@ -699,6 +815,7 @@ machine_at_p3v133_init(const machine_t *model) return ret; } +/* VIA Apollo Pro 133A */ int machine_at_p3v4x_init(const machine_t *model) { @@ -724,8 +841,7 @@ machine_at_p3v4x_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&via_apro133a_device); device_add(&via_vt82c596b_device); - device_add(&w83977ef_device); - device_add(&keyboard_ps2_ami_pci_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); device_add(ics9xxx_get(ICS9250_18)); device_add(&sst_flash_39sf020_device); spd_register(SPD_TYPE_SDRAM, 0xF, 512); @@ -757,8 +873,7 @@ machine_at_gt694va_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&via_apro133a_device); device_add(&via_vt82c596b_device); - device_add(&w83977ef_device); - device_add(&keyboard_ps2_ami_pci_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); device_add(&sst_flash_39sf020_device); spd_register(SPD_TYPE_SDRAM, 0x7, 1024); device_add(&w83782d_device); /* fans: CPU, unused, unused; temperatures: System, CPU1, unused */ @@ -776,131 +891,7 @@ machine_at_gt694va_init(const machine_t *model) return ret; } -int -machine_at_vei8_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/vei8/QHW1001.BIN", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440bx_device); - device_add(&piix4e_device); - device_add(&fdc37m60x_370_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(ics9xxx_get(ICS9250_08)); - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 512); - device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */ - - return ret; -} - -static void -machine_at_ms6168_common_init(const machine_t *model) -{ - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x14, PCI_CARD_SOUND, 3, 4, 1, 2); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440zx_device); - device_add(&piix4e_device); - device_add(&w83977ef_device); - - if (gfxcard[0] == VID_INTERNAL) - device_add(&voodoo_3_2000_agp_onboard_8m_device); - - device_add(&keyboard_ps2_ami_pci_device); - device_add(&intel_flash_bxt_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 256); - - if (sound_card_current[0] == SOUND_INTERNAL) { - device_add(machine_get_snd_device(machine)); - device_add(&cs4297_device); - } -} - -int -machine_at_borapro_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/borapro/MS6168V2.50", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ms6168_common_init(model); - - return ret; -} - -int -machine_at_ms6168_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ms6168/w6168ims.130", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ms6168_common_init(model); - - return ret; -} - -int -machine_at_m729_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/m729/M729NEW.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE_IDE, 1, 2, 3, 4); - pci_register_slot(0x03, PCI_CARD_SOUTHBRIDGE_PMU, 1, 2, 3, 4); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE_USB, 1, 2, 3, 4); - pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x10, PCI_CARD_NORMAL, 3, 4, 1, 2); - device_add(&ali1621_device); - device_add(&ali1543c_device); /* +0 */ - device_add(&winbond_flash_w29c010_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 512); - - return ret; -} - +/* SiS 5600 */ int machine_at_p6f99_init(const machine_t *model) { @@ -924,7 +915,6 @@ machine_at_p6f99_init(const machine_t *model) pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x02, PCI_CARD_AGPBRIDGE, 0, 0, 0, 0); device_add(&sis_5600_device); - device_add(&keyboard_ps2_ami_pci_device); device_add(&it8661f_device); device_add(&winbond_flash_w29c020_device); @@ -957,7 +947,6 @@ machine_at_m747_init(const machine_t *model) pci_register_slot(0x0D, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x02, PCI_CARD_AGPBRIDGE, 0, 0, 0, 0); device_add(&sis_5600_device); - device_add(&keyboard_ps2_ami_pci_device); device_add(&it8661f_device); device_add(&winbond_flash_w29c020_device); diff --git a/src/machine/m_at_slot1_2.c b/src/machine/m_at_slot1_2.c new file mode 100644 index 000000000..2c8151abe --- /dev/null +++ b/src/machine/m_at_slot1_2.c @@ -0,0 +1,78 @@ +/* + * 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. + * + * Implementation of Slot 1/2 machines. + * + * Slot 2 is quite a rare type of Slot. Used mostly by Pentium + * II and III Xeons. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#include <86box/86box.h> +#include <86box/mem.h> +#include <86box/io.h> +#include <86box/rom.h> +#include <86box/pci.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/keyboard.h> +#include <86box/flash.h> +#include <86box/sio.h> +#include <86box/hwm.h> +#include <86box/spd.h> +#include <86box/video.h> +#include <86box/clock.h> +#include "cpu.h" +#include <86box/machine.h> + +/* i440GX */ +int +machine_at_fw6400gx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/fw6400gx/FWGX1211.ROM", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 4); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0); + + device_add(&i440gx_device); + device_add(&piix4e_device); + device_add_params(&pc87309_device, (void *) (PCX730X_15C | PCX730X_AMI | PC87309_PC87309)); + device_add(ics9xxx_get(ICS9250_08)); + device_add(&sst_flash_29ee020_device); + spd_register(SPD_TYPE_SDRAM, 0xF, 512); + device_add(&w83781d_device); /* fans: Chassis, Power, CPU; temperatures: System, CPU, unused */ + hwm_values.temperatures[3] = 0; /* unused */ + hwm_values.voltages[1] = 1500; /* Vtt */ + + return ret; +} diff --git a/src/machine/m_at_slot1_socket370.c b/src/machine/m_at_slot1_socket370.c new file mode 100644 index 000000000..c52885965 --- /dev/null +++ b/src/machine/m_at_slot1_socket370.c @@ -0,0 +1,151 @@ +/* + * 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. + * + * Implementation of Slot 1/Socket 370 machines machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#include <86box/86box.h> +#include <86box/mem.h> +#include <86box/io.h> +#include <86box/rom.h> +#include <86box/pci.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/keyboard.h> +#include <86box/flash.h> +#include <86box/sio.h> +#include <86box/hwm.h> +#include <86box/spd.h> +#include <86box/video.h> +#include "cpu.h" +#include <86box/machine.h> +#include <86box/clock.h> +#include <86box/sound.h> +#include <86box/snd_ac97.h> + +/* i440BX */ +int +machine_at_prosignias31x_bx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/prosignias31x_bx/p6bxt-ap-092600.bin", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0d, PCI_CARD_SOUND, 4, 3, 2, 1); /* assumed */ + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440bx_device); + device_add(&piix4e_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&winbond_flash_w29c020_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); + device_add(&gl520sm_2d_device); /* fans: CPU, Chassis; temperature: System */ + hwm_values.temperatures[0] += 2; /* System offset */ + hwm_values.temperatures[1] += 2; /* CPU offset */ + hwm_values.voltages[0] = 3300; /* Vcore and 3.3V are swapped */ + hwm_values.voltages[2] = hwm_get_vcore(); + + if (sound_card_current[0] == SOUND_INTERNAL) + device_add(&cmi8738_onboard_device); + + return ret; +} + +int +machine_at_s1857_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/s1857/BX57200A.ROM", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0F, PCI_CARD_SOUND, 1, 0, 0, 0); + pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440bx_device); + device_add(&piix4e_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&intel_flash_bxt_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); + + if (sound_card_current[0] == SOUND_INTERNAL) { + device_add(machine_get_snd_device(machine)); + device_add(&cs4297_device); /* no good pictures, but the marking looks like CS4297 from a distance */ + } + + return ret; +} + +/* VIA Apollo Pro 133 */ +int +machine_at_p6bat_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/p6bat/bata+56.BIN", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0d, PCI_CARD_NORMAL, 4, 3, 2, 1); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&via_apro133_device); + device_add(&via_vt82c596b_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); + + if (sound_card_current[0] == SOUND_INTERNAL) + device_add(&cmi8738_onboard_device); + + return ret; +} diff --git a/src/machine/m_at_slot2.c b/src/machine/m_at_slot2.c index 7bf412823..20b5f05f7 100644 --- a/src/machine/m_at_slot2.c +++ b/src/machine/m_at_slot2.c @@ -10,11 +10,9 @@ * * Slot 2 is quite a rare type of Slot. Used mostly by Pentium II & III Xeons * - * - * * Authors: Miran Grca, * - * Copyright 2016-2019 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -40,6 +38,7 @@ #include "cpu.h" #include <86box/machine.h> +/* i440GX */ int machine_at_6gxu_init(const machine_t *model) { @@ -65,8 +64,7 @@ machine_at_6gxu_init(const machine_t *model) device_add(&i440gx_device); device_add(&piix4e_device); - device_add(&keyboard_ps2_pci_device); - device_add(&w83977ef_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); device_add(&sst_flash_39sf020_device); spd_register(SPD_TYPE_SDRAM, 0xF, 512); device_add(&w83782d_device); /* fans: CPU, Power, System; temperatures: System, CPU, unused */ @@ -102,8 +100,7 @@ machine_at_s2dge_init(const machine_t *model) device_add(&i440gx_device); device_add(&piix4e_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83977tf_device); + device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); device_add(&intel_flash_bxt_device); spd_register(SPD_TYPE_SDRAM, 0xF, 512); device_add(&w83781d_device); /* fans: CPU1, CPU2, Thermal Control; temperatures: unused, CPU1, CPU2? */ @@ -113,40 +110,3 @@ machine_at_s2dge_init(const machine_t *model) return ret; } - -int -machine_at_fw6400gx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/fw6400gx/FWGX1211.ROM", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 4); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0); - - device_add(&i440gx_device); - device_add(&piix4e_device); - device_add_params(&pc87309_device, (void *) (PCX730X_15C | PCX730X_AMI | PC87309_PC87309)); - device_add(ics9xxx_get(ICS9250_08)); - device_add(&sst_flash_29ee020_device); - spd_register(SPD_TYPE_SDRAM, 0xF, 512); - device_add(&w83781d_device); /* fans: Chassis, Power, CPU; temperatures: System, CPU, unused */ - hwm_values.temperatures[3] = 0; /* unused */ - hwm_values.voltages[1] = 1500; /* Vtt */ - - return ret; -} diff --git a/src/machine/m_at_socket1.c b/src/machine/m_at_socket1.c new file mode 100644 index 000000000..4357a1b42 --- /dev/null +++ b/src/machine/m_at_socket1.c @@ -0,0 +1,428 @@ +/* + * 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. + * + * Implementation of Socket 168 and 1 machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/keyboard.h> +#include <86box/mem.h> +#include <86box/nvr.h> +#include <86box/pci.h> +#include <86box/dma.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/gameport.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/rom.h> +#include <86box/sio.h> +#include <86box/hdc.h> +#include <86box/port_6x.h> +#include <86box/port_92.h> +#include <86box/video.h> +#include <86box/flash.h> +#include <86box/scsi_ncr53c8xx.h> +#include <86box/hwm.h> +#include <86box/machine.h> +#include <86box/plat_unused.h> +#include <86box/sound.h> + +/* CS4031 */ +int +machine_at_cs4031_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/cs4031/CHIPS_1.AMI", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&cs4031_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* OPTi 381 */ +int +machine_at_ga486l_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ga486l/ga-486l_bios.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&opti381_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* OPTi 493 */ +int +machine_at_svc486wb_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/svc486wb/svc486wb-AM27C512DIP28.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&opti493_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&ide_isa_device); + + return ret; +} + +/* OPTi 498 */ +int +machine_at_mvi486_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/mvi486/MVI627.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&opti498_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&ide_isa_device); + device_add_params(&pc873xx_device, (void *) (PCX73XX_IDE_PRI | PCX730X_398)); + + return ret; +} + +/* SiS 401 */ +static void +machine_at_sis401_common_init(const machine_t *model) +{ + machine_at_common_init(model); + + device_add(&sis_85c401_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); +} + +int +machine_at_isa486_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/isa486/ISA-486.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_sis401_common_init(model); + + return ret; +} + +int +machine_at_sis401_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/sis401/SIS401-2.AMI", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_sis401_common_init(model); + + return ret; +} + +/* SiS 460 */ +int +machine_at_av4_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/av4/amibios_486dx_isa_bios_aa4025963.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&sis_85c460_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* SiS 471 */ +int +machine_at_advantage40xxd_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/advantage40xxd/AST101.09A", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&sis_85c471_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&um866x_device, (void *) (UM82C863F | UM866X_IDE_PRI)); + + device_add(&intel_flash_bxt_device); + + return ret; +} + +/* Symphony SL42C460 */ +int +machine_at_dtk461_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/dtk461/DTK.BIO", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&sl82c461_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* VIA VT82C495 */ +int +machine_at_486vchd_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/486vchd/486-4386-VC-HD.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&via_vt82c49x_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* VLSI 82C480 */ +int +machine_at_vect486vl_init(const machine_t *model) // has HDC problems +{ + int ret; + + ret = bios_load_linear("roms/machines/vect486vl/aa0500.ami", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + machine_at_common_init_ex(model, 2); + + device_add(&vl82c480_device); + + device_add(&vl82c113_device); + + device_add(&ide_isa_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI)); + + return ret; +} + +/* VLSI 82C481 */ +int +machine_at_d824_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/d824/fts-biosupdated824noflashbiosepromv320-320334-160.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + machine_at_common_init_ex(model, 2); + + device_add(&vl82c480_device); + + /* + Technically, it should be the VL82C114 but we do not have + a proper datasheet of it that tells us the registers. + */ + device_add(&vl82c113_device); + + device_add(&ide_isa_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C651); + + return ret; +} + +/* VLSI 82C486 */ +int +machine_at_tuliptc38_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/tuliptc38/TULIP1.BIN", + 0x000f0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + device_add(&vl82c486_device); + device_add(&tulip_jumper_device); + + device_add(&vl82c113_device); + + device_add(&ide_isa_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI)); + + if (gfxcard[0] == VID_INTERNAL) { + bios_load_aux_linear("roms/machines/tuliptc38/VBIOS.BIN", + 0x000c0000, 32768, 0); + + device_add(machine_get_vid_device(machine)); + } else for (uint16_t i = 0; i < 32768; i++) + rom[i] = mem_readb_phys(0x000c0000 + i); + + mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000); + mem_mapping_set_exec(&bios_mapping, rom); + + return ret; +} + +/* ZyMOS Poach */ +int +machine_at_isa486c_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/isa486c/asus-isa-486c-401a0-040591-657e2c17a0218417632602.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&isa486c_device); + device_add(&port_92_key_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_genoa486_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/genoa486/AMI486.BIO", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&compaq_genoa_device); + device_add(&port_92_key_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} diff --git a/src/machine/m_at_socket2.c b/src/machine/m_at_socket2.c new file mode 100644 index 000000000..6c24070ba --- /dev/null +++ b/src/machine/m_at_socket2.c @@ -0,0 +1,379 @@ +/* + * 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. + * + * Implementation of Socket 2 machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/keyboard.h> +#include <86box/mem.h> +#include <86box/nvr.h> +#include <86box/pci.h> +#include <86box/dma.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/gameport.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/rom.h> +#include <86box/sio.h> +#include <86box/hdc.h> +#include <86box/port_6x.h> +#include <86box/port_92.h> +#include <86box/video.h> +#include <86box/flash.h> +#include <86box/scsi_ncr53c8xx.h> +#include <86box/hwm.h> +#include <86box/machine.h> +#include <86box/plat_unused.h> +#include <86box/sound.h> + +/* ACC 2168 */ +int +machine_at_pb410a_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pb410a/pb410a.080337.4abf.u25.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ibm_common_ide_init(model); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&acc3221_device); + device_add(&acc2168_device); + + device_add(&phoenix_486_jumper_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + return ret; +} + +/* ALi M1429G */ +int +machine_at_acera1g_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/acera1g/4alo001.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&ali1429g_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&gd5428_onboard_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add_params(&pc87310_device, (void *) (PC87310_ALI)); + device_add(&ide_ali5213_device); + + return ret; +} + +static void +machine_at_ali1429_common_init(const machine_t *model, int is_green) +{ + machine_at_common_init(model); + + if (is_green) + device_add(&ali1429g_device); + else + device_add(&ali1429_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); +} + +int +machine_at_winbios1429_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/win486/ali1429g.amw", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ali1429_common_init(model, 1); + + return ret; +} + +int +machine_at_ali1429_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ali1429/ami486.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ali1429_common_init(model, 0); + + return ret; +} + +/* i420TX */ +int +machine_at_pci400ca_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pci400ca/486-AA008851.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SCSI, 1, 2, 3, 4); + pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&sio_device); + + device_add(&intel_flash_bxt_ami_device); + + device_add(&i420tx_device); + device_add(&ncr53c810_onboard_pci_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* IMS 8848 */ +int +machine_at_g486ip_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/g486ip/G486IP.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + device_add(&ami_1992_nvr_device); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 03 = Slot 1 */ + pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */ + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 05 = Slot 3 */ + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&ims8848_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* OPTi 499 */ +int +machine_at_cobalt_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/cobalt/Cobalt_2.3.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&opti499_device); + device_add(&ide_opti611_vlb_device); + device_add(&ide_isa_sec_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + return ret; +} + +int +machine_at_cougar_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/cougar/COUGRMRB.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&ide_vlb_device); + + device_add(&opti499_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* SiS 461 */ +int +machine_at_decpclpv_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/decpclpv/bios.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&sis_85c461_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&ide_isa_2ch_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C663 | FDC37C6XX_IDE_PRI)); + + return ret; +} + +int +machine_at_dell466np_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/dell466np/466np.bin", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&sis_85c461_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + else { + for (uint16_t i = 0; i < 32768; i++) + rom[i] = mem_readb_phys(0x000c0000 + i); + } + mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000); + mem_mapping_set_exec(&bios_mapping, rom); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&ide_isa_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C661 | FDC37C6XX_IDE_PRI)); + + return ret; +} + +int +machine_at_valuepoint433_init(const machine_t *model) // hangs without the PS/2 mouse +{ + int ret; + + ret = bios_load_linear("roms/machines/valuepoint433/$IMAGEP.FLH", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_ide_init(model); + device_add(&sis_85c461_device); + if (gfxcard[0] == VID_INTERNAL) + device_add(&et4000w32_onboard_device); + + device_add_params(&fdc37c6xx_device, (void *) (FDC37C661 | FDC37C6XX_IDE_PRI)); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* VLSI 82C480 */ +int +machine_at_martin_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/martin/NONSCSI.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + device_add(&vl82c480_device); + device_add(&vl82c113_device); + + device_add(&ide_vlb_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI)); + + device_add(&intel_flash_bxt_device); + + return ret; +} diff --git a/src/machine/m_at_socket3.c b/src/machine/m_at_socket3.c new file mode 100644 index 000000000..1d46ebe18 --- /dev/null +++ b/src/machine/m_at_socket3.c @@ -0,0 +1,434 @@ +/* + * 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. + * + * Implementation of Socket 3 machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/keyboard.h> +#include <86box/mem.h> +#include <86box/nvr.h> +#include <86box/pci.h> +#include <86box/dma.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/gameport.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/rom.h> +#include <86box/sio.h> +#include <86box/hdc.h> +#include <86box/port_6x.h> +#include <86box/port_92.h> +#include <86box/video.h> +#include <86box/flash.h> +#include <86box/scsi_ncr53c8xx.h> +#include <86box/hwm.h> +#include <86box/machine.h> +#include <86box/plat_unused.h> +#include <86box/sound.h> + +/* ALi M1429G */ +int +machine_at_atc1762_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/atc1762/atc1762.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&ali1429g_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_ecsal486_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ecsal486/ECS_AL486.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&ali1429g_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_ap4100aa_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ap4100aa/M27C512DIP28.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + device_add(&ami_1994_nvr_device); + device_add(&ali1429g_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&ide_vlb_device); + device_add_params(&um866x_device, (void *) UM8663BF); + + return ret; +} + +/* Contaq 82C596A */ +int +machine_at_4gpv5_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/4gpv5/4GPV5.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&contaq_82c596a_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +/* Contaq 82C597 */ +int +machine_at_greenb_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/greenb/4gpv31-ami-1993-8273517.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&contaq_82c597_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +/* OPTi 895 */ +static void +machine_at_403tg_common_init(const machine_t *model, int nvr_hack) +{ + if (nvr_hack) { + machine_at_common_init_ex(model, 2); + device_add(&ami_1994_nvr_device); + } else + machine_at_common_init(model); + + device_add(&opti895_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); +} + +int +machine_at_403tg_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/403tg/403TG.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_403tg_common_init(model, 0); + + return ret; +} + +int +machine_at_403tg_d_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/403tg_d/J403TGRevD.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_403tg_common_init(model, 1); + + return ret; +} + +int +machine_at_403tg_d_mr_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/403tg_d/MRBiosOPT895.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_403tg_common_init(model, 0); + + return ret; +} + +/* SiS 461 */ +int +machine_at_acerv10_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/acerv10/ALL.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&sis_85c461_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&ide_isa_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* SiS 471 */ +static void +machine_at_sis_85c471_common_init(const machine_t *model) +{ + machine_at_common_init(model); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&sis_85c471_device); +} + +int +machine_at_win471_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/win471/486-SiS_AC0360136.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_sis_85c471_common_init(model); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_vi15g_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/vi15g/vi15gr23.rom", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_sis_85c471_common_init(model); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_vli486sv2g_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/vli486sv2g/0402.001", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_sis_85c471_common_init(model); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_dvent4xx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/dvent4xx/Venturis466_BIOS.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&sis_85c471_device); + device_add(&ide_cmd640_vlb_pri_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + return ret; +} + +int +machine_at_dtk486_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/dtk486/4siw005.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_sis_85c471_common_init(model); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_ami471_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ami471/SIS471BE.AMI", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_sis_85c471_common_init(model); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_px471_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/px471/SIS471A1.PHO", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_sis_85c471_common_init(model); + + device_add(&ide_vlb_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_tg486g_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/tg486g/tg486g.bin", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + device_add(&amstrad_megapc_nvr_device); + device_add(&sis_85c471_device); + device_add(&ide_isa_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI)); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (gfxcard[0] != VID_INTERNAL) { + for (uint16_t i = 0; i < 32768; i++) + rom[i] = mem_readb_phys(0x000c0000 + i); + } + mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000); + mem_mapping_set_exec(&bios_mapping, rom); + + return ret; +} diff --git a/src/machine/m_at_socket370.c b/src/machine/m_at_socket370.c index ff299ee50..1094e59f5 100644 --- a/src/machine/m_at_socket370.c +++ b/src/machine/m_at_socket370.c @@ -6,13 +6,11 @@ * * This file is part of the 86Box distribution. * - * Implementation of Socket 370(PGA370) machines. - * - * + * Implementation of Socket 370 (PGA370) machines. * * Authors: Miran Grca, * - * Copyright 2016-2019 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -40,6 +38,7 @@ #include <86box/sound.h> #include <86box/snd_ac97.h> +/* i440LX */ int machine_at_s370slm_init(const machine_t *model) { @@ -63,8 +62,7 @@ machine_at_s370slm_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&i440lx_device); device_add(&piix4e_device); - device_add(&w83977tf_device); - device_add(&keyboard_ps2_ami_pci_device); + device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); device_add(&intel_flash_bxt_device); spd_register(SPD_TYPE_SDRAM, 0x7, 256); device_add(&w83781d_device); /* fans: CPU, Fan 2, Chassis; temperatures: unused, CPU, unused */ @@ -74,12 +72,13 @@ machine_at_s370slm_init(const machine_t *model) return ret; } +/* i440BX */ int -machine_at_prosignias31x_bx_init(const machine_t *model) +machine_at_awo671r_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/prosignias31x_bx/p6bxt-ap-092600.bin", + ret = bios_load_linear("roms/machines/awo671r/a08139c.bin", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -90,74 +89,30 @@ machine_at_prosignias31x_bx_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0d, PCI_CARD_SOUND, 4, 3, 2, 1); /* assumed */ - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440bx_device); - device_add(&piix4e_device); - device_add(&w83977ef_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&winbond_flash_w29c020_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 256); - device_add(&gl520sm_2d_device); /* fans: CPU, Chassis; temperature: System */ - hwm_values.temperatures[0] += 2; /* System offset */ - hwm_values.temperatures[1] += 2; /* CPU offset */ - hwm_values.voltages[0] = 3300; /* Vcore and 3.3V are swapped */ - hwm_values.voltages[2] = hwm_get_vcore(); - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(&cmi8738_onboard_device); - - return ret; -} - -int -machine_at_s1857_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/s1857/BX57200A.ROM", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_SOUND, 1, 0, 0, 0); - pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0D, PCI_CARD_VIDEO, 2, 3, 4, 1); pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&i440bx_device); device_add(&piix4e_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83977ef_device); - device_add(&intel_flash_bxt_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 256); - - if (sound_card_current[0] == SOUND_INTERNAL) { - device_add(machine_get_snd_device(machine)); - device_add(&cs4297_device); /* no good pictures, but the marking looks like CS4297 from a distance */ - } + device_add_inst_params(&w83977_device, 1, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add_inst_params(&w83977_device, 2, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&sst_flash_39sf020_device); + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + spd_register(SPD_TYPE_SDRAM, 0x3, 256); return ret; } int -machine_at_p6bap_init(const machine_t *model) +machine_at_ambx133_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/p6bap/bapa14a.BIN", + ret = bios_load_linear("roms/machines/ambx133/mkbx2vg2.bin", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -167,57 +122,22 @@ machine_at_p6bap_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0d, PCI_CARD_NORMAL, 4, 3, 2, 1); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&via_apro133a_device); /* Rebranded as ET82C693A */ - device_add(&via_vt82c596b_device); /* Rebranded as ET82C696B */ - device_add(&w83977ef_device); - device_add(&keyboard_ps2_ami_pci_device); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440bx_device); + device_add(&piix4e_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); device_add(&sst_flash_39sf020_device); spd_register(SPD_TYPE_SDRAM, 0x7, 256); - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(&cmi8738_onboard_device); - - return ret; -} - -int -machine_at_p6bat_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p6bat/bata+56.BIN", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0d, PCI_CARD_NORMAL, 4, 3, 2, 1); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&via_apro133_device); - device_add(&via_vt82c596b_device); - device_add(&w83977ef_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 256); - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(&cmi8738_onboard_device); + device_add(&gl518sm_2d_device); /* fans: CPUFAN1, CPUFAN2; temperature: CPU */ + hwm_values.fans[1] += 500; + hwm_values.temperatures[0] += 4; /* CPU offset */ + hwm_values.voltages[1] = RESISTOR_DIVIDER(12000, 10, 2); /* different 12V divider in BIOS (10K/2K?) */ return ret; } @@ -248,8 +168,8 @@ machine_at_cubx_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&i440bx_device); device_add(&piix4e_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83977ef_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&ide_cmd648_ter_qua_onboard_device); device_add(ics9xxx_get(ICS9250_08)); device_add(&sst_flash_39sf020_device); spd_register(SPD_TYPE_SDRAM, 0xF, 256); @@ -258,6 +178,39 @@ machine_at_cubx_init(const machine_t *model) return ret; } +/* i440ZX */ +int +machine_at_63a1_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/63a1/63a-q3.bin", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); /* Integrated Sound? */ + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440zx_device); + device_add(&piix4e_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&intel_flash_bxt_device); + spd_register(SPD_TYPE_SDRAM, 0x3, 256); + + return ret; +} + +/* SMSC VictoryBX-66 */ int machine_at_atc7020bxii_init(const machine_t *model) { @@ -282,8 +235,7 @@ machine_at_atc7020bxii_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&i440bx_device); device_add(&slc90e66_device); - device_add(&keyboard_ps2_pci_device); - device_add(&w83977ef_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); device_add(&sst_flash_39sf020_device); spd_register(SPD_TYPE_SDRAM, 0xF, 256); @@ -314,7 +266,6 @@ machine_at_m773_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&i440bx_device); device_add(&slc90e66_device); - device_add(&keyboard_ps2_ami_pci_device); device_add(&it8671f_device); device_add(&sst_flash_39sf020_device); spd_register(SPD_TYPE_SDRAM, 0x3, 256); @@ -330,109 +281,7 @@ machine_at_m773_init(const machine_t *model) return ret; } -int -machine_at_ambx133_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ambx133/mkbx2vg2.bin", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440bx_device); - device_add(&piix4e_device); - device_add(&w83977ef_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 256); - device_add(&gl518sm_2d_device); /* fans: CPUFAN1, CPUFAN2; temperature: CPU */ - hwm_values.fans[1] += 500; - hwm_values.temperatures[0] += 4; /* CPU offset */ - hwm_values.voltages[1] = RESISTOR_DIVIDER(12000, 10, 2); /* different 12V divider in BIOS (10K/2K?) */ - - return ret; -} - -int -machine_at_awo671r_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/awo671r/a08139c.bin", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0D, PCI_CARD_VIDEO, 2, 3, 4, 1); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440bx_device); - device_add(&piix4e_device); - device_add_inst(&w83977ef_device, 1); - device_add_inst(&w83977ef_device, 2); - device_add(&keyboard_ps2_pci_device); - device_add(&sst_flash_39sf020_device); - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - spd_register(SPD_TYPE_SDRAM, 0x3, 256); - - return ret; -} - -int -machine_at_63a1_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/63a1/63a-q3.bin", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); /* Integrated Sound? */ - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&i440zx_device); - device_add(&piix4e_device); - device_add(&w83977tf_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&intel_flash_bxt_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 256); - - return ret; -} - +/* VIA Apollo Pro */ int machine_at_apas3_init(const machine_t *model) { @@ -456,14 +305,86 @@ machine_at_apas3_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&via_apro_device); device_add(&via_vt82c586b_device); - device_add(&fdc37c669_device); - device_add(&keyboard_ps2_ami_pci_device); + device_add_params(&fdc37c669_device, (void *) 0); device_add(&sst_flash_39sf020_device); spd_register(SPD_TYPE_SDRAM, 0x7, 256); return ret; } +/* VIA Apollo Pro 133 */ +int +machine_at_p6bap_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/p6bap/bapa14a.BIN", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0d, PCI_CARD_NORMAL, 4, 3, 2, 1); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&via_apro133a_device); /* Rebranded as ET82C693A */ + device_add(&via_vt82c596b_device); /* Rebranded as ET82C696B */ + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); + + if (sound_card_current[0] == SOUND_INTERNAL) + device_add(&cmi8738_onboard_device); + + return ret; +} + +/* VIA Apollo Pro 133A */ +int +machine_at_6via90ap_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/6via90ap/90ap10.bin", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&via_apro133a_device); + device_add(&via_vt82c686b_device); /* fans: CPU1, CPU2; temperatures: CPU, System, unused */ + device_add(ics9xxx_get(ICS9250_18)); + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 1024); + hwm_values.temperatures[0] += 2; /* CPU offset */ + hwm_values.temperatures[1] += 2; /* System offset */ + hwm_values.temperatures[2] = 0; /* unused */ + + if (sound_card_current[0] == SOUND_INTERNAL) + device_add(&alc100_device); /* ALC100P identified on similar Acorp boards (694TA, 6VIA90A1) */ + + return ret; +} + int machine_at_cuv4xls_init(const machine_t *model) { @@ -491,7 +412,6 @@ machine_at_cuv4xls_init(const machine_t *model) pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&via_apro133a_device); device_add(&via_vt82c686b_device); - device_add(&keyboard_ps2_ami_pci_device); device_add(ics9xxx_get(ICS9250_18)); device_add(&sst_flash_39sf020_device); spd_register(SPD_TYPE_SDRAM, 0xF, 1024); @@ -503,44 +423,7 @@ machine_at_cuv4xls_init(const machine_t *model) return ret; } -int -machine_at_6via90ap_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/6via90ap/90ap10.bin", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&via_apro133a_device); - device_add(&via_vt82c686b_device); /* fans: CPU1, CPU2; temperatures: CPU, System, unused */ - device_add(&keyboard_ps2_ami_pci_device); - device_add(ics9xxx_get(ICS9250_18)); - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 1024); - hwm_values.temperatures[0] += 2; /* CPU offset */ - hwm_values.temperatures[1] += 2; /* System offset */ - hwm_values.temperatures[2] = 0; /* unused */ - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(&alc100_device); /* ALC100P identified on similar Acorp boards (694TA, 6VIA90A1) */ - - return ret; -} - +/* SiS 600 */ int machine_at_7sbb_init(const machine_t *model) { @@ -562,7 +445,6 @@ machine_at_7sbb_init(const machine_t *model) pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x02, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); device_add(&sis_5600_device); - device_add(&keyboard_ps2_ami_pci_device); device_add(&it8661f_device); device_add(&sst_flash_29ee020_device); /* assumed */ diff --git a/src/machine/m_at_socket3_pci.c b/src/machine/m_at_socket3_pci.c new file mode 100644 index 000000000..77563f3cb --- /dev/null +++ b/src/machine/m_at_socket3_pci.c @@ -0,0 +1,1470 @@ +/* + * 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. + * + * Implementation of Socket 3 PCI machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/timer.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/keyboard.h> +#include <86box/mem.h> +#include <86box/nvr.h> +#include <86box/pci.h> +#include <86box/dma.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/fdc_ext.h> +#include <86box/gameport.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/rom.h> +#include <86box/sio.h> +#include <86box/hdc.h> +#include <86box/port_6x.h> +#include <86box/port_92.h> +#include <86box/video.h> +#include <86box/flash.h> +#include <86box/scsi_ncr53c8xx.h> +#include <86box/hwm.h> +#include <86box/machine.h> +#include <86box/plat_unused.h> +#include <86box/sound.h> + +/* ALi M1429G */ +int +machine_at_ms4134_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ms4134/4alm001.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_ide_init(model); + + device_add(&ali1429g_device); + + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); + + pci_init(FLAG_MECHANISM_1 | FLAG_MECHANISM_2 | PCI_ALWAYS_EXPOSE_DEV0); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + + pci_register_slot(0x0B, PCI_CARD_SCSI, 4, 1, 2, 3); + pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); + + device_add(&ali1435_device); + device_add(&sst_flash_29ee010_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_tg486gp_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/tg486gp/tg486gp.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_ide_init(model); + + device_add(&ali1429g_device); + + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); + + pci_init(FLAG_MECHANISM_1 | FLAG_MECHANISM_2 | PCI_ALWAYS_EXPOSE_DEV0); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + + pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); + + device_add(&ali1435_device); + device_add(&sst_flash_29ee010_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +/* ALi M1489 */ +int +machine_at_sbc490_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/sbc490/07159589.rom", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x01, PCI_CARD_VIDEO, 4, 1, 2, 3); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add(&ali1489_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&sst_flash_29ee010_device); + + return ret; +} + +int +machine_at_abpb4_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/abpb4/486-AB-PB4.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CAN_SWITCH_TYPE); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add(&ali1489_device); + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&sst_flash_29ee010_device); + + return ret; +} + +int +machine_at_arb1476_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/arb1476/w1476b.v21", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + + device_add(&ali1489_device); + device_add_params(&fdc37c669_device, (void *) 0); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&sst_flash_29ee010_device); + + return ret; +} + +int +machine_at_win486pci_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/win486pci/v1hj3.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add(&ali1489_device); + device_add_params(&gm82c803ab_device, (void *) GM82C803B); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_tf486_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/tf486/tf486v10.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + + device_add(&ali1489_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add_params(&w83977_device, (void *) (W83977EF | W83977_NO_NVR)); + device_add(&sst_flash_29ee010_device); + + return ret; +} + +int +machine_at_ms4145_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ms4145/AG56S.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); + + device_add(&ali1489_device); + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&sst_flash_29ee010_device); + + return ret; +} + +/* OPTi 802G */ +static void +machine_at_pc330_6573_common_init(const machine_t *model) +{ + machine_at_common_init_ex(model, 2); + device_add(&ide_vlb_2ch_device); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 5, 6, 7, 8); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 9, 10, 11, 12); + /* This is a guess because the BIOS always gives it a video BIOS + and never gives it an IRQ, so it is impossible to known for + certain until we obtain PCI readouts from the real machine. */ + pci_register_slot(0x0E, PCI_CARD_VIDEO, 13, 14, 15, 16); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add(&opti602_device); + device_add(&opti802g_device); + device_add(&opti822_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); + device_add(&ide_opti611_vlb_device); + device_add(&intel_flash_bxt_device); +} + +int +machine_at_aptiva510_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/aptiva510/$IMAGES.USF", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_pc330_6573_common_init(model); + + return ret; +} + +int +machine_at_pc330_6573_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pc330_6573/$IMAGES.USF", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_pc330_6573_common_init(model); + + return ret; +} + +/* OPTi 895 */ +static const device_config_t pb450_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "pb450a", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "PhoenixBIOS 4.03 - Revision PCI 1.0A", .internal_name = "pb450a_pci10a" /*"pci10a"*/, .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pb450/OPTI802.bin", "" } }, + { .name = "PhoenixBIOS 4.03 - Revision PNP 1.1A", .internal_name = "pb450a", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pb450/PNP11A.bin", "" } }, + { .name = "PhoenixBIOS 4.05 - Revision P4HS20 (by Micro Firmware)", .internal_name = "pb450a_p4hs20", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pb450/p4hs20.bin", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t pb450_device = { + .name = "Packard Bell PB450", + .internal_name = "pb450_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = pb450_config +}; + +int +machine_at_pb450_init(const machine_t *model) +{ + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + device_add(&ide_vlb_2ch_device); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 5, 6, 7, 8); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add(&opti895_device); + device_add(&opti602_device); + device_add(&opti822_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); + device_add(&ide_opti611_vlb_device); + device_add(&intel_flash_bxt_device); + device_add(&phoenix_486_jumper_pci_device); + + return ret; +} + +/* i420EX */ +int +machine_at_486pi_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/486pi/486pi.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_NORMAL, 1, 2, 1, 2); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 2, 1); + pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 1, 2); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&i420ex_device); + + return ret; +} + +int +machine_at_bat4ip3e_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/bat4ip3e/404C.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_IDE, 0xfe, 0xff, 0, 0); + pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 1, 2); + pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 1, 2, 1); + pci_register_slot(0x0a, PCI_CARD_NORMAL, 1, 2, 1, 2); + + device_add(&phoenix_486_jumper_pci_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&i420ex_device); + device_add(&ide_cmd640_pci_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + + return ret; +} + +int +machine_at_486ap4_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/486ap4/0205.002", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + /* Excluded: 5, 6, 7, 8 */ + pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 09 = Slot 1 */ + pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 0a = Slot 2 */ + pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 0b = Slot 3 */ + pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 0c = Slot 4 */ + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&i420ex_device); + + return ret; +} + +int +machine_at_ninja_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined("roms/machines/ninja/1008AY0_.BIO", + "roms/machines/ninja/1008AY0_.BI1", 0x1c000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + device_add(&amstrad_megapc_nvr_device); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 1, 2); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 2, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 1, 2, 1); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&intel_flash_bxt_ami_device); + + device_add(&i420ex_device); + device_add_params(&i82091aa_device, (void *) I82091AA_022); + + return ret; +} + +int +machine_at_sb486p_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/sb486p/amiboot.rom", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 1, 2); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 2, 1); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add_params(&i82091aa_device, (void *) I82091AA_022); + device_add(&i420ex_device); + + return ret; +} + +/* i420TX */ +int +machine_at_amis76_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_inverted("roms/machines/s76p/S76P.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + // pci_register_slot(0x01, PCI_CARD_IDE, 1, 2, 3 ,4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&sio_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&intel_flash_bxt_ami_device); + + device_add(&i420tx_device); + // device_add(&ide_cmd640_pci_device); /* is this actually cmd640? is it single channel? */ + device_add(&ide_pci_device); + + return ret; +} + +int +machine_at_486sp3_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/486sp3/awsi2737.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&ide_isa_device); + + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SCSI, 1, 2, 3, 4); /* 01 = SCSI */ + pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 03 = Slot 1 */ + pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */ + pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 05 = Slot 3 */ + pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 06 = Slot 4 */ + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&sio_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C663 | FDC37C6XX_IDE_PRI)); + device_add(&sst_flash_29ee010_device); + + device_add(&i420tx_device); + device_add(&ncr53c810_onboard_pci_device); + + return ret; +} + +int +machine_at_alfredo_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined("roms/machines/alfredo/1010AQ0_.BIO", + "roms/machines/alfredo/1010AQ0_.BI1", 0x1c000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + device_add(&amstrad_megapc_nvr_device); + device_add(&ide_pci_device); + + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); + pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&sio_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C663); + device_add(&intel_flash_bxt_ami_device); + + device_add(&i420tx_device); + + return ret; +} + +/* i420ZX */ +int +machine_at_486sp3g_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/486sp3g/PCI-I-486SP3G_0306.001 (Beta).bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&ide_isa_device); + + pci_init(PCI_CONFIG_TYPE_2); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SCSI, 1, 2, 3, 4); /* 01 = SCSI */ + pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 06 = Slot 1 */ + pci_register_slot(0x05, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 05 = Slot 2 */ + pci_register_slot(0x04, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 04 = Slot 3 */ + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&sio_zb_device); + device_add_params(&pc873xx_device, (void *) (PC87332 | PCX73XX_IDE_PRI | PCX730X_398)); + device_add(&sst_flash_29ee010_device); + + device_add(&i420zx_device); + device_add(&ncr53c810_onboard_pci_device); + + return ret; +} + +static const device_config_t sb486pv_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "sb486pv", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "AMI WinBIOS (062594) - Revision 0108", .internal_name = "sb486pv_0108", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/sb486pv/41-0108-062594-SATURN2.rom", "" } }, + { .name = "AMI WinBIOS (062594) - Revision 0301", .internal_name = "sb486pv_0301", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/sb486pv/0301-062594-SATURN2.rom", "" } }, + { .name = "AMIBIOS 6 (071595) - Revision 1301", .internal_name = "sb486pv", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/sb486pv/amiboot.rom", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t sb486pv_device = { + .name = "ICS SB486PV", + .internal_name = "sb486pv_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = sb486pv_config +}; + +int +machine_at_sb486pv_init(const machine_t *model) +{ + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + if (!strcmp(fn, "roms/machines/sb486pv/amiboot.rom")) + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + else + ret = bios_load_linear_inverted(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_2); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0e, PCI_CARD_IDE, 0, 0, 0, 0); + pci_register_slot(0x0f, PCI_CARD_VIDEO, 1, 2, 3, 4); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&sio_zb_device); + device_add(&ide_rz1000_pci_single_channel_device); + device_add_params(&i82091aa_device, (void *) I82091AA_26E); + if (!strcmp(fn, "roms/machines/sb486pv/amiboot.rom")) + device_add(&intel_flash_bxt_device); + else + device_add(&intel_flash_bxt_ami_device); + + device_add(&i420zx_device); + + return ret; +} + +/* IMS 8848 */ +int +machine_at_pci400cb_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pci400cb/032295.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + device_add(&ami_1994_nvr_device); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 3, 2, 1); /* 0F = Slot 1 */ + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 0E = Slot 2 */ + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 0D = Slot 3 */ + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 0C = Slot 4 */ + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&ims8848_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +/* SiS 496 */ +static void +machine_at_sis_85c496_common_init(UNUSED(const machine_t *model)) +{ + device_add(&ide_pci_2ch_device); + + pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); + pci_register_slot(0x05, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + + pci_set_irq_routing(PCI_INTA, PCI_IRQ_DISABLED); + pci_set_irq_routing(PCI_INTB, PCI_IRQ_DISABLED); + pci_set_irq_routing(PCI_INTC, PCI_IRQ_DISABLED); + pci_set_irq_routing(PCI_INTD, PCI_IRQ_DISABLED); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); +} + +int +machine_at_acerp3_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/acerp3/Acer Mate 600 P3 BIOS U13 V2.0R02-J3 ACR8DE00-S00-950911-R02-J3.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + machine_at_sis_85c496_common_init(model); + device_add(&sis_85c496_device); + pci_register_slot(0x09, PCI_CARD_VIDEO, 0, 0, 0, 0); + pci_register_slot(0x0A, PCI_CARD_IDE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&ide_cmd640_pci_legacy_only_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&gd5434_onboard_pci_device); + + device_add(&intel_flash_bxt_device); + + return ret; +} + +int +machine_at_486sp3c_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/486sp3c/SI4I0306.AWD", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + machine_at_sis_85c496_common_init(model); + device_add(&sis_85c496_device); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&intel_flash_bxt_device); + + return ret; +} + +int +machine_at_ls486e_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ls486e/LS486E RevC.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + machine_at_sis_85c496_common_init(model); + device_add(&sis_85c496_ls486e_device); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); + + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_m4li_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/m4li/M4LI.04S", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + machine_at_sis_85c496_common_init(model); + device_add(&sis_85c496_device); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x07, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_ms4144_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ms4144/ms-4144-1.4.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + machine_at_sis_85c496_common_init(model); + device_add(&sis_85c496_ls486e_device); + pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&sst_flash_29ee010_device); + + return ret; +} + +int +machine_at_r418_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/r418/r418i.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + machine_at_sis_85c496_common_init(model); + device_add(&sis_85c496_device); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x07, PCI_CARD_NORMAL, 4, 1, 2, 3); + + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_4saw2_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/4saw2/4saw0911.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + machine_at_sis_85c496_common_init(model); + device_add(&sis_85c496_device); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); + + device_add_params(&w837x7_device, (void *) (W83777F | W837X7_KEY_89)); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&intel_flash_bxt_device); + + return ret; +} + +int +machine_at_4dps_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/4dps/4DPS172G.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + machine_at_sis_85c496_common_init(model); + device_add(&sis_85c496_device); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x07, PCI_CARD_NORMAL, 4, 1, 2, 3); + + device_add_params(&w837x7_device, (void *) (W83787IF | W837X7_KEY_89)); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&intel_flash_bxt_device); + + return ret; +} + +/* UMC 8881 */ +int +machine_at_atc1415_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/atc1415/1415V330.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x14, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add(&umc_hb4_device); + device_add(&umc_8886bf_device); + device_add(&intel_flash_bxt_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} + +int +machine_at_84xxuuda_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/84xxuuda/uud0520s.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add(&umc_hb4_device); + device_add(&umc_8886bf_device); + device_add_params(&um866x_device, (void *) UM8663BF); + device_add(&winbond_flash_w29c010_device); + + return ret; +} + +int +machine_at_pl4600c_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pl4600c/SST29EE010.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); /* Slot 01 */ + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); /* Slot 02 */ + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); /* Onboard */ + pci_register_slot(0x13, PCI_CARD_VIDEO, 0, 0, 0, 0); /* Onboard */ + + + device_add(&umc_hb4_device); + device_add(&umc_8886af_device); + device_add_params(&um866x_device, (void *) UM8663AF); + device_add(&sst_flash_29ee010_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&gd5430_onboard_pci_device); + + if (sound_card_current[0] == SOUND_INTERNAL) + device_add(&ess_1688_device); + + if (fdc_current[0] == FDC_INTERNAL){ + fdd_set_turbo(0, 1); + fdd_set_turbo(1, 1); + } + + return ret; +} + +int +machine_at_ecs486_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ecs486/8810AIO.32J", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0F, PCI_CARD_IDE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add(&umc_hb4_device); + device_add(&umc_8886f_device); + device_add(&ide_cmd640_pci_legacy_only_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&intel_flash_bxt_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +int +machine_at_actionpc2600_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/actionpc2600/action2600.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 3); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0E, PCI_CARD_VIDEO, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + + device_add(&umc_hb4_device); + device_add(&umc_8886bf_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&intel_flash_bxt_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + return ret; +} + +int +machine_at_actiontower8400_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/actiontower8400/V31C.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x15, PCI_CARD_VIDEO, 0, 0, 0, 0); + pci_register_slot(0x16, PCI_CARD_IDE, 0, 0, 0, 0); + pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x14, PCI_CARD_NORMAL, 2, 3, 4, 1); + + device_add(&umc_hb4_device); + device_add(&umc_8886f_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&ide_cmd640_pci_device); + device_add(&intel_flash_bxt_device); // The ActionPC 2600 has this so I'm gonna assume this does too. + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + return ret; +} + +int +machine_at_m919_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/m919/9190914s.rom", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add(&umc_hb4_device); + device_add(&umc_8886af_device); /* AF is correct - the BIOS does IDE writes to ports 108h and 109h. */ + device_add_params(&um866x_device, (void *) UM8663BF); + device_add(&sst_flash_29ee010_device); + + return ret; +} + +int +machine_at_spc7700plw_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/spc7700plw/77LW13FH.P24", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add(&umc_hb4_device); + device_add(&umc_8886af_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&intel_flash_bxt_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + return ret; +} + +static const device_config_t hot433a_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "hot433a", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "AMIBIOS 5 (101094) - Revision 433AUS33", .internal_name = "hot433a", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/hot433/433AUS33.ROM", "" } }, + { .name = "AwardBIOS v4.51PG - Revision 2.5 (by eSupport)", .internal_name = "hot433a_v451pg", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/hot433/2A4X5H21.BIN", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t hot433a_device = { + .name = "Shuttle HOT-433A", + .internal_name = "hot433a_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = hot433a_config +}; + +int +machine_at_hot433a_init(const machine_t *model) +{ + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + int is_award = !strcmp(device_get_config_bios("bios"), "hot433a_award"); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + if (is_award) + device_add(&amstrad_megapc_nvr_device); + else + device_add(&ami_1994_nvr_device); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); + + device_add(&umc_hb4_device); + device_add(&umc_8886bf_device); + if (is_award) + device_add_params(&um866x_device, (void *) UM8663AF); + else + device_add_params(&um8669f_device, (void *) 0); + device_add(&winbond_flash_w29c010_device); + if (is_award) + machine_force_ps2(1); + else + machine_force_ps2(0); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + pic_toggle_latch(is_award); + + return ret; +} + +/* VIA VT82C496G */ +int +machine_at_g486vpa_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/g486vpa/3.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); + + device_add(&via_vt82c49x_pci_ide_device); + device_add(&via_vt82c505_device); + device_add_params(&pc873xx_device, (void *) (PC87332 | PCX73XX_IDE_SEC | PCX730X_398)); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&sst_flash_29ee010_device); + + return ret; +} + +int +machine_at_486vipio2_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/486vipio2/1175G701.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); + + device_add(&via_vt82c49x_pci_ide_device); + device_add(&via_vt82c505_device); + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + device_add(&winbond_flash_w29c010_device); + + return ret; +} diff --git a/src/machine/m_at_socket4.c b/src/machine/m_at_socket4.c index c101fb95a..2e5768cbc 100644 --- a/src/machine/m_at_socket4.c +++ b/src/machine/m_at_socket4.c @@ -8,11 +8,9 @@ * * Implementation of Socket 4 machines. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2019 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -41,41 +39,7 @@ #include <86box/video.h> #include <86box/machine.h> -int -machine_at_v12p_init(const machine_t *model) - -{ - int ret = 0; - const char* fn; - - /* No ROMs available */ - if (!device_available(model->device)) - return ret; - - device_context(model->device); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); - ret = bios_load_linear(fn, 0x000e0000, 131072, 0); - device_context_restore(); - - machine_at_common_init(model); - - device_add(&ide_isa_device); - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SCSI, 1, 4, 3, 2); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 2, 1, 4, 3); - pci_register_slot(0x03, PCI_CARD_NORMAL, 3, 2, 1, 4); - pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 0, 0, 0); - pci_register_slot(0x05, PCI_CARD_NORMAL, 0, 0, 0, 0); - device_add(&i430lx_device); - device_add(&keyboard_ps2_acer_pci_device); - device_add(&sio_zb_device); - device_add_params(&pc87310_device, (void *) (PC87310_ALI)); - device_add(&amd_am28f010_flash_device); - - return ret; -} - +/* i430LX */ static const device_config_t v12p_config[] = { // clang-format off { @@ -112,49 +76,72 @@ const device_t v12p_device = { .config = v12p_config }; -void -machine_at_premiere_common_init(const machine_t *model, int pci_switch) +int +machine_at_v12p_init(const machine_t *model) { + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + machine_at_common_init(model); + + device_add(&ide_isa_device); + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SCSI, 1, 4, 3, 2); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 2, 1, 4, 3); + pci_register_slot(0x03, PCI_CARD_NORMAL, 3, 2, 1, 4); + pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 0, 0, 0); + pci_register_slot(0x05, PCI_CARD_NORMAL, 0, 0, 0, 0); + device_add(&i430lx_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&sio_zb_device); + device_add_params(&pc87310_device, (void *) (PC87310_ALI)); + device_add(&amd_am28f010_flash_device); + + return ret; +} + +int +machine_at_ambradp60_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined("roms/machines/ambradp60/1004AF1P.BIO", + "roms/machines/ambradp60/1004AF1P.BI1", + 0x1c000, 128); + + if (bios_only || !ret) + return ret; + machine_at_common_init_ex(model, 2); device_add(&amstrad_megapc_nvr_device); - device_add(&ide_pci_2ch_device); + device_add(&ide_pci_device); - pci_init(PCI_CONFIG_TYPE_2 | pci_switch); + pci_init(PCI_CONFIG_TYPE_2); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4); pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&keyboard_ps2_phoenix_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&sio_zb_device); - device_add(&ide_rz1000_pci_single_channel_device); - device_add(&fdc37c665_ide_sec_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); device_add(&intel_flash_bxt_ami_device); -} -void -machine_at_sp4_common_init(const machine_t *model) -{ - machine_at_common_init(model); + device_add(&i430lx_device); - pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - /* Excluded: 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F, 10, 11, 12, 13, 14 */ - pci_register_slot(0x0D, PCI_CARD_IDE, 1, 2, 3, 4); - /* Excluded: 02, 03*, 04*, 05*, 06*, 07*, 08* */ - /* Slots: 09 (04), 0A (03), 0B (02), 0C (07) */ - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); - device_add(&sis_85c50x_device); - device_add(&ide_cmd640_pci_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&fdc37c665_device); - device_add(&intel_flash_bxt_device); + return ret; } int @@ -177,8 +164,8 @@ machine_at_excaliburpci_init(const machine_t *model) pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x0D, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&fdc37c665_device); - device_add(&keyboard_ps2_ami_pci_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&ide_cmd640_pci_legacy_only_device); device_add(&i430lx_device); @@ -208,11 +195,11 @@ machine_at_p5mp3_init(const machine_t *model) pci_register_slot(0x03, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 03 = Slot 3 */ pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); device_add(&fdc_at_device); - device_add(&keyboard_ps2_pci_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&i430lx_device); device_add(&sio_zb_device); device_add(&catalyst_flash_device); - device_add(&i430lx_device); return ret; } @@ -243,9 +230,9 @@ machine_at_dellxp60_init(const machine_t *model) pci_register_slot(0x06, PCI_CARD_NORMAL, 2, 1, 3, 4); pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); device_add(&i430lx_device); - device_add(&keyboard_ps2_phoenix_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&sio_zb_device); - device_add(&fdc37c665_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); device_add(&intel_flash_bxt_ami_device); return ret; @@ -274,42 +261,48 @@ machine_at_opti560l_init(const machine_t *model) pci_register_slot(0x08, PCI_CARD_NORMAL, 2, 1, 3, 4); pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); device_add(&i430lx_device); - device_add(&keyboard_ps2_phoenix_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&sio_zb_device); - device_add(&i82091aa_device); + device_add_params(&i82091aa_device, (void *) I82091AA_022); device_add(&intel_flash_bxt_ami_device); return ret; } +void +machine_at_award_common_init(const machine_t *model) +{ + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 03 = Slot 1 */ + pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */ + pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 05 = Slot 3 */ + pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 06 = Slot 4 */ + pci_register_slot(0x07, PCI_CARD_SCSI, 1, 2, 3, 4); /* 07 = SCSI */ + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&sio_zb_device); + device_add(&intel_flash_bxt_device); +} + int -machine_at_ambradp60_init(const machine_t *model) +machine_at_586is_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined("roms/machines/ambradp60/1004AF1P.BIO", - "roms/machines/ambradp60/1004AF1P.BI1", - 0x1c000, 128); + ret = bios_load_linear("roms/machines/586is/IS.34", + 0x000e0000, 131072, 0); if (bios_only || !ret) return ret; - machine_at_common_init_ex(model, 2); - - device_add(&amstrad_megapc_nvr_device); - device_add(&ide_pci_device); - - pci_init(PCI_CONFIG_TYPE_2); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&keyboard_ps2_phoenix_device); - device_add(&sio_zb_device); - device_add(&fdc37c665_ide_pri_device); - device_add(&intel_flash_bxt_ami_device); + machine_at_award_common_init(model); device_add(&i430lx_device); @@ -339,9 +332,9 @@ machine_at_valuepointp60_init(const machine_t *model) pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&keyboard_ps2_ps1_pci_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&sio_device); - device_add(&fdc37c665_ide_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); device_add(&intel_flash_bxt_ami_device); device_add(&i430lx_device); @@ -352,6 +345,28 @@ machine_at_valuepointp60_init(const machine_t *model) return ret; } +void +machine_at_premiere_common_init(const machine_t *model, int pci_switch) +{ + machine_at_common_init_ex(model, 2); + + device_add(&amstrad_megapc_nvr_device); + device_add(&ide_pci_2ch_device); + + pci_init(PCI_CONFIG_TYPE_2 | pci_switch); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); + pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&sio_zb_device); + device_add(&ide_rz1000_pci_single_channel_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); + device_add(&intel_flash_bxt_ami_device); +} + int machine_at_revenge_init(const machine_t *model) { @@ -371,42 +386,32 @@ machine_at_revenge_init(const machine_t *model) return ret; } -void -machine_at_award_common_init(const machine_t *model) -{ - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 03 = Slot 1 */ - pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */ - pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 05 = Slot 3 */ - pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 06 = Slot 4 */ - pci_register_slot(0x07, PCI_CARD_SCSI, 1, 2, 3, 4); /* 07 = SCSI */ - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - device_add(&keyboard_at_ami_device); - device_add(&sio_zb_device); - device_add(&intel_flash_bxt_device); -} - int -machine_at_586is_init(const machine_t *model) +machine_at_m5pi_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/586is/IS.34", + ret = bios_load_linear_inverted("roms/machines/m5pi/M5PI10R.BIN", 0x000e0000, 131072, 0); if (bios_only || !ret) return ret; - machine_at_award_common_init(model); + machine_at_common_init(model); - device_add(&i430lx_device); + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); + pci_register_slot(0x0f, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0c, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&i430lx_device); + device_add(&sio_zb_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&ide_w83769f_pci_single_channel_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); + device_add(&intel_flash_bxt_ami_device); return ret; } @@ -439,40 +444,32 @@ machine_at_pb520r_init(const machine_t *model) if (gfxcard[0] == VID_INTERNAL) device_add(&gd5434_onboard_pci_device); - device_add(&keyboard_ps2_pci_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&sio_zb_device); - device_add(&i82091aa_ide_device); + device_add_params(&i82091aa_device, (void *) (I82091AA_022 | I82091AA_IDE_PRI)); device_add(&intel_flash_bxt_ami_device); return ret; } +/* OPTi 597 */ int -machine_at_m5pi_init(const machine_t *model) +machine_at_excalibur_init(const machine_t *model) { int ret; - ret = bios_load_linear_inverted("roms/machines/m5pi/M5PI10R.BIN", - 0x000e0000, 131072, 0); + ret = bios_load_linear_inverted("roms/machines/excalibur/S75P.ROM", + 0x000e0000, 131072, 0); if (bios_only || !ret) return ret; machine_at_common_init(model); - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x0f, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0c, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&i430lx_device); - device_add(&sio_zb_device); - device_add(&keyboard_ps2_phoenix_device); - device_add(&ide_w83769f_pci_single_channel_device); - device_add(&fdc37c665_ide_sec_device); - device_add(&intel_flash_bxt_ami_device); + device_add(&opti5x7_device); + device_add(&ide_opti611_vlb_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C661); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); return ret; } @@ -500,7 +497,7 @@ machine_at_globalyst330_p5_init(const machine_t *model) device_add(&opti5x7_pci_device); device_add(&opti822_device); device_add(&sst_flash_29ee010_device); - device_add(&keyboard_at_ami_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); @@ -508,27 +505,6 @@ machine_at_globalyst330_p5_init(const machine_t *model) return ret; } -int -machine_at_excalibur_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_inverted("roms/machines/excalibur/S75P.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&opti5x7_device); - device_add(&ide_opti611_vlb_device); - device_add(&fdc37c661_device); - device_add(&keyboard_ps2_intel_ami_pci_device); - - return ret; -} - int machine_at_p5vl_init(const machine_t *model) { @@ -544,7 +520,6 @@ machine_at_p5vl_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x12, PCI_CARD_NORMAL, 5, 6, 7, 8); pci_register_slot(0x13, PCI_CARD_NORMAL, 9, 10, 11, 12); @@ -553,7 +528,7 @@ machine_at_p5vl_init(const machine_t *model) device_add(&opti5x7_pci_device); device_add(&opti822_device); device_add(&sst_flash_29ee010_device); - device_add(&keyboard_at_ami_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); @@ -561,6 +536,7 @@ machine_at_p5vl_init(const machine_t *model) return ret; } +/* SiS 501 */ int machine_at_excaliburpci2_init(const machine_t *model) { @@ -583,8 +559,8 @@ machine_at_excaliburpci2_init(const machine_t *model) pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x0C, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - device_add(&fdc37c665_device); - device_add(&keyboard_ps2_ami_pci_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&ide_cmd640_pci_legacy_only_device); device_add(&sis_85c50x_device); @@ -593,6 +569,29 @@ machine_at_excaliburpci2_init(const machine_t *model) return ret; } +void +machine_at_sp4_common_init(const machine_t *model) +{ + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + /* Excluded: 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F, 10, 11, 12, 13, 14 */ + pci_register_slot(0x0D, PCI_CARD_IDE, 1, 2, 3, 4); + /* Excluded: 02, 03*, 04*, 05*, 06*, 07*, 08* */ + /* Slots: 09 (04), 0A (03), 0B (02), 0C (07) */ + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); + device_add(&sis_85c50x_device); + device_add(&ide_cmd640_pci_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&intel_flash_bxt_device); +} + int machine_at_p5sp4_init(const machine_t *model) { @@ -608,3 +607,33 @@ machine_at_p5sp4_init(const machine_t *model) return ret; } + +int +machine_at_ecs50x_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ecs50x/ECSSi5piaio.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x02, PCI_CARD_IDE, 1, 2, 3, 4); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); + device_add(&sis_85c50x_device); + device_add_params(&ide_cmd640_pci_device, (void *) 0x100000); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&intel_flash_bxt_device); + + return ret; +} diff --git a/src/machine/m_at_socket4_5.c b/src/machine/m_at_socket4_5.c new file mode 100644 index 000000000..368f8397f --- /dev/null +++ b/src/machine/m_at_socket4_5.c @@ -0,0 +1,72 @@ +/* + * 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. + * + * Implementation of Socket 4/5 machines. + * + * Authors: Miran Grca, + * + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#include <86box/86box.h> +#include <86box/mem.h> +#include <86box/io.h> +#include <86box/rom.h> +#include <86box/pci.h> +#include <86box/device.h> +#include <86box/chipset.h> +#include <86box/fdc_ext.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/timer.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/keyboard.h> +#include <86box/flash.h> +#include <86box/nvr.h> +#include <86box/scsi_ncr53c8xx.h> +#include <86box/sio.h> +#include <86box/timer.h> +#include <86box/video.h> +#include <86box/machine.h> + +/* OPTi 597 */ +int +machine_at_pci56001_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pci56001/AWARD_ISA_PCI_586_non_PNP_SN_013870745_1994.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 5, 6, 7, 8); + pci_register_slot(0x13, PCI_CARD_NORMAL, 9, 10, 11, 12); + pci_register_slot(0x14, PCI_CARD_NORMAL, 13, 14, 15, 16); + + device_add(&opti5x7_pci_device); + device_add(&opti822_device); + device_add(&sst_flash_29ee010_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + return ret; +} diff --git a/src/machine/m_at_socket5.c b/src/machine/m_at_socket5.c index a4bb77a55..a078dd626 100644 --- a/src/machine/m_at_socket5.c +++ b/src/machine/m_at_socket5.c @@ -8,11 +8,9 @@ * * Implementation of Socket 5 machines. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2019 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -42,13 +40,14 @@ #include <86box/machine.h> #include <86box/sound.h> +/* i430NX */ int -machine_at_plato_init(const machine_t *model) +machine_at_ambradp90_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined("roms/machines/plato/1016ax1_.bio", - "roms/machines/plato/1016ax1_.bi1", + ret = bios_load_linear_combined("roms/machines/ambradp90/1002AX1P.BIO", + "roms/machines/ambradp90/1002AX1P.BI1", 0x1d000, 128); if (bios_only || !ret) @@ -61,6 +60,36 @@ machine_at_plato_init(const machine_t *model) return ret; } +int +machine_at_p54np4_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/p54np4/asus-642accdebcb75833703472.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&ide_vlb_2ch_device); + + pci_init(PCI_CONFIG_TYPE_2 | PCI_CAN_SWITCH_TYPE); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 07 = Slot 1 */ + pci_register_slot(0x06, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 06 = Slot 2 */ + pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 05 = Slot 3 */ + pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 04 = Slot 4 */ + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&i430nx_device); + device_add(&sio_zb_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); + device_add(&intel_flash_bxt_device); + + return ret; +} + int machine_at_dellplato_init(const machine_t *model) { @@ -81,36 +110,38 @@ machine_at_dellplato_init(const machine_t *model) } int -machine_at_d842_init(const machine_t *model) - +machine_at_586ip_init(const machine_t *model) { - int ret = 0; - const char* fn; + int ret; - /* No ROMs available */ - if (!device_available(model->device)) + ret = bios_load_linear("roms/machines/586ip/IP.20", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) return ret; - device_context(model->device); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); - ret = bios_load_linear(fn, 0x000e0000, 131072, 0); - device_context_restore(); + machine_at_award_common_init(model); + + device_add(&i430nx_device); + + return ret; +} + +int +machine_at_plato_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined("roms/machines/plato/1016ax1_.bio", + "roms/machines/plato/1016ax1_.bi1", + 0x1d000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_premiere_common_init(model, PCI_CAN_SWITCH_TYPE); - machine_at_common_init(model); - - device_add(&ide_pci_2ch_device); - pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); /* Onboard */ - pci_register_slot(0x03, PCI_CARD_VIDEO, 4, 0, 0, 0); /* Onboard */ - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); /* Slot 01 */ - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); /* Slot 02 */ - - device_add(&keyboard_ps2_pci_device); device_add(&i430nx_device); - device_add(&sio_zb_device); - device_add(&fdc37c665_device); - device_add(&intel_flash_bxt_device); return ret; } @@ -160,72 +191,39 @@ const device_t d842_device = { }; int -machine_at_ambradp90_init(const machine_t *model) +machine_at_d842_init(const machine_t *model) { - int ret; + int ret = 0; + const char* fn; - ret = bios_load_linear_combined("roms/machines/ambradp90/1002AX1P.BIO", - "roms/machines/ambradp90/1002AX1P.BI1", - 0x1d000, 128); - - if (bios_only || !ret) + /* No ROMs available */ + if (!device_available(model->device)) return ret; - machine_at_premiere_common_init(model, PCI_CAN_SWITCH_TYPE); - - device_add(&i430nx_device); - - return ret; -} - -int -machine_at_p54np4_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p54np4/asus-642accdebcb75833703472.bin", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); machine_at_common_init(model); - device_add(&ide_vlb_2ch_device); - pci_init(PCI_CONFIG_TYPE_2 | PCI_CAN_SWITCH_TYPE); + device_add(&ide_pci_2ch_device); + pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 07 = Slot 1 */ - pci_register_slot(0x06, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 06 = Slot 2 */ - pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 05 = Slot 3 */ - pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 04 = Slot 4 */ - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); /* Onboard */ + pci_register_slot(0x03, PCI_CARD_VIDEO, 4, 0, 0, 0); /* Onboard */ + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); /* Slot 01 */ + pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); /* Slot 02 */ + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&i430nx_device); device_add(&sio_zb_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&fdc37c665_ide_pri_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); device_add(&intel_flash_bxt_device); return ret; } -int -machine_at_586ip_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/586ip/IP.20", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_award_common_init(model); - - device_add(&i430nx_device); - - return ret; -} - int machine_at_tek932_init(const machine_t *model) { @@ -246,16 +244,17 @@ machine_at_tek932_init(const machine_t *model) pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); - device_add(&keyboard_ps2_intel_ami_pci_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&i430nx_device); device_add(&sio_zb_device); device_add(&ide_vlb_device); - device_add(&fdc37c665_ide_pri_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); device_add(&intel_flash_bxt_ami_device); return ret; } +/* i430FX */ int machine_at_acerv30_init(const machine_t *model) { @@ -278,8 +277,8 @@ machine_at_acerv30_init(const machine_t *model) pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&i430fx_device); device_add(&piix_device); - device_add(&keyboard_ps2_acer_pci_device); - device_add(&fdc37c665_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); device_add(&sst_flash_29ee010_device); @@ -307,10 +306,10 @@ machine_at_apollo_init(const machine_t *model) pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&keyboard_ps2_ami_pci_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&i430fx_device); device_add(&piix_device); - device_add(&pc87332_398_device); + device_add_params(&pc873xx_device, (void *) (PC87332 | PCX730X_398)); device_add(&intel_flash_bxt_device); return ret; @@ -343,10 +342,10 @@ machine_at_optiplexgxl_init(const machine_t *model) if (sound_card_current[0] == SOUND_INTERNAL) machine_snd = device_add(machine_get_snd_device(machine)); - device_add(&keyboard_ps2_phoenix_pci_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&i430fx_device); device_add(&piix_device); - device_add(&pc87332_device); + device_add_params(&pc873xx_device, (void *) (PC87332 | PCX730X_02E)); device_add(&dell_jumper_device); device_add(&intel_flash_bxt_device); @@ -386,6 +385,35 @@ machine_at_zappa_gpio_init(void) machine_set_gpio_default(gpio); } +int +machine_at_pt2000_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ficpt2000/PT2000_v1.01.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&i430fx_device); + device_add(&piix_device); + device_add_params(&pc873xx_device, (void *) (PC87332 | PCX730X_398)); + device_add(&intel_flash_bxt_device); + + return ret; +} + int machine_at_zappa_init(const machine_t *model) { @@ -407,10 +435,9 @@ machine_at_zappa_init(const machine_t *model) pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&keyboard_ps2_intel_ami_pci_device); device_add(&i430fx_device); device_add(&piix_device); - device_add(&pc87306_device); + device_add_params(&pc87306_device, (void *) PCX730X_AMI); device_add(&intel_flash_bxt_ami_device); return ret; @@ -435,10 +462,10 @@ machine_at_powermatev_init(const machine_t *model) pci_register_slot(0x08, PCI_CARD_NORMAL, 0, 0, 0, 0); pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); - device_add(&keyboard_ps2_ami_pci_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&i430fx_device); device_add(&piix_device); - device_add(&fdc37c665_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); device_add(&intel_flash_bxt_device); return ret; @@ -464,22 +491,22 @@ machine_at_hawk_init(const machine_t *model) pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&keyboard_ps2_tg_ami_pci_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&i430fx_device); device_add(&piix_device); - device_add(&fdc37c665_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); device_add(&intel_flash_bxt_device); return ret; } - +/* OPTi 597 */ int -machine_at_pt2000_init(const machine_t *model) +machine_at_ncselp90_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/ficpt2000/PT2000_v1.01.BIN", + ret = bios_load_linear("roms/machines/ncselp90/elegancep90.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -488,40 +515,18 @@ machine_at_pt2000_init(const machine_t *model) machine_at_common_init(model); pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - /* Should be VIA, but we do not emulate that yet. */ - device_add(&keyboard_ps2_holtek_device); - device_add(&i430fx_device); - device_add(&piix_device); - device_add(&pc87332_398_device); - device_add(&intel_flash_bxt_device); + pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); - return ret; -} - -int -machine_at_pat54pv_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pat54pv/PAT54PV.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - device_add(&opti5x7_device); - device_add(&keyboard_ps2_intel_ami_pci_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); + device_add(&opti5x7_pci_device); + device_add(&opti822_device); + device_add(&sst_flash_29ee010_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&ide_opti611_vlb_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); + device_add(&ide_vlb_2ch_device); return ret; } @@ -548,7 +553,7 @@ machine_at_hot543_init(const machine_t *model) device_add(&opti5x7_pci_device); device_add(&opti822_device); device_add(&sst_flash_29ee010_device); - device_add(&keyboard_at_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); @@ -557,35 +562,28 @@ machine_at_hot543_init(const machine_t *model) } int -machine_at_ncselp90_init(const machine_t *model) +machine_at_pat54pv_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/ncselp90/elegancep90.bin", - 0x000e0000, 131072, 0); + ret = bios_load_linear("roms/machines/pat54pv/PAT54PV.bin", + 0x000f0000, 65536, 0); if (bios_only || !ret) return ret; machine_at_common_init(model); - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); + device_add(&opti5x7_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); - device_add(&opti5x7_pci_device); - device_add(&opti822_device); - device_add(&sst_flash_29ee010_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&ide_opti611_vlb_device); - device_add(&fdc37c665_ide_sec_device); - device_add(&ide_vlb_2ch_device); + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); return ret; } +/* SiS 501 */ int machine_at_p54sp4_init(const machine_t *model) { @@ -626,8 +624,8 @@ machine_at_sq588_init(const machine_t *model) pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&sis_85c50x_device); device_add(&ide_cmd640_pci_single_channel_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&fdc37c665_ide_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); device_add(&sst_flash_29ee010_device); return ret; @@ -655,8 +653,8 @@ machine_at_p54sps_init(const machine_t *model) pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&sis_85c50x_device); device_add(&ide_pci_2ch_device); - device_add(&keyboard_at_ami_device); - device_add(&w83787f_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); device_add(&sst_flash_29ee010_device); return ret; @@ -686,13 +684,14 @@ machine_at_ms5109_init(const machine_t *model) pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&sis_550x_85c503_device); device_add(&ide_w83769f_pci_device); - device_add(&keyboard_ps2_ami_device); - device_add(&w83787f_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); device_add(&sst_flash_29ee010_device); return ret; } +/* SiS 5501 */ int machine_at_torino_init(const machine_t *model) { @@ -720,13 +719,14 @@ machine_at_torino_init(const machine_t *model) device_add(&sis_550x_85c503_device); device_add(&ide_um8673f_device); - device_add(&keyboard_ps2_tg_ami_device); - device_add(&fdc37c665_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); device_add(&intel_flash_bxt_ami_device); return ret; } +/* UMC 889x */ int machine_at_hot539_init(const machine_t *model) { @@ -752,8 +752,8 @@ machine_at_hot539_init(const machine_t *model) device_add(&umc_8890_device); device_add(&umc_8886af_device); device_add(&sst_flash_29ee010_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&um8663af_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&um866x_device, (void *) UM8663AF); return ret; } diff --git a/src/machine/m_at_socket7.c b/src/machine/m_at_socket7.c index 46c7b7623..d44758564 100644 --- a/src/machine/m_at_socket7.c +++ b/src/machine/m_at_socket7.c @@ -8,12 +8,9 @@ * * Implementation of Socket 7 (Dual Voltage) machines. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2020 Miran Grca. - * + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -46,21 +43,13 @@ #include <86box/network.h> #include <86box/pci.h> -void -machine_at_optiplex_21152_init(void) -{ - uint8_t bus_index = pci_bridge_get_bus_index(device_add(&dec21152_device)); - pci_register_bus_slot(bus_index, 0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_bus_slot(bus_index, 0x0a, PCI_CARD_NORMAL, 4, 2, 1, 3); - pci_register_bus_slot(bus_index, 0x0b, PCI_CARD_NORMAL, 1, 3, 4, 2); -} - +/* i430HX */ int -machine_at_acerv35n_init(const machine_t *model) +machine_at_acerm3a_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/acerv35n/v35nd1s1.bin", + ret = bios_load_linear("roms/machines/acerm3a/r01-b3.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -71,54 +60,20 @@ machine_at_acerv35n_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x10, PCI_CARD_VIDEO, 4, 0, 0, 0); device_add(&i430hx_device); device_add(&piix3_device); - /* The chip is not marked FR but the BIOS accesses register 06h of GPIO. */ - device_add_params(&fdc37c93x_device, (void *) (FDC37C935 | FDC37C93X_FR)); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL)); + device_add(&sst_flash_29ee010_device); return ret; } -int -machine_at_ap5vm_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ap5vm/AP5V270.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - /* It seems there were plans for an on-board NCR 53C810 according to some clues - left in the manual, but were latter scrapped. The BIOS still support that - PCI device, though, so why not. */ - pci_register_slot(0x06, PCI_CARD_SCSI, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&i430vx_device); - device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&fdc37c665_device); - device_add(&ncr53c810_onboard_pci_device); - device_add(&intel_flash_bxt_device); - - return ret; -} - int machine_at_p55t2p4_init(const machine_t *model) { @@ -141,48 +96,125 @@ machine_at_p55t2p4_init(const machine_t *model) pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); device_add(&i430hx_device); device_add(&piix3_device); - device_add(&keyboard_ps2_pci_device); - device_add(&w83877f_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0)); device_add(&intel_flash_bxt_device); return ret; } +void +machine_at_p65up5_common_init(const machine_t *model, const device_t *northbridge) +{ + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + device_add(northbridge); + device_add(&piix3_ioapic_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0)); + device_add(&sst_flash_29ee010_device); + device_add(&ioapic_device); +} + int -machine_at_m7shi_init(const machine_t *model) +machine_at_p65up5_cp55t2d_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/m7shi/m7shi2n.rom", - 0x000c0000, 262144, 0); + ret = bios_load_linear("roms/machines/p65up5/TD5I0201.AWD", + 0x000e0000, 131072, 0); if (bios_only || !ret) return ret; - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - device_add(&i430hx_device); - device_add(&piix3_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37C935 | FDC37C93X_NORMAL)); - device_add(&intel_flash_bxt_device); + machine_at_p65up5_common_init(model, &i430hx_device); return ret; } -/* The Sony VAIO is an AG430HX, I'm assuming it has the same configuration bits - as the TC430HX, hence the #define. */ -#define machine_at_ag430hx_gpio_init machine_at_tc430hx_gpio_init +static void +machine_at_cu430hx_gpio_init(void) +{ + uint32_t gpio = 0xffffe1ff; -/* The PB680 is a NV430VX, I'm assuming it has the same configuration bits as - the TC430HX, hence the #define. */ -#define machine_at_nv430vx_gpio_init machine_at_tc430hx_gpio_init + /* Register 0x0079: */ + /* Bit 7: 0 = Clear password, 1 = Keep password. */ + /* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */ + /* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */ + /* Bit 4: External CPU clock (Switch 8). */ + /* Bit 3: External CPU clock (Switch 7). */ + /* 50 MHz: Switch 7 = Off, Switch 8 = Off. */ + /* 60 MHz: Switch 7 = On, Switch 8 = Off. */ + /* 66 MHz: Switch 7 = Off, Switch 8 = On. */ + /* Bit 2: 0 = On-board audio absent, 1 = On-board audio present. */ + /* Bit 1: 0 = Soft-off capable power supply present, 1 = Soft-off capable power supply absent. */ + /* Bit 0: 0 = Reserved. */ + /* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */ + if (cpu_busspeed <= 50000000) + gpio |= 0xffff10ff; + else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000)) + gpio |= 0xffff18ff; + else if (cpu_busspeed > 60000000) + gpio |= 0xffff00ff; + + if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)->available()) + gpio |= 0xffff04ff; + + machine_set_gpio_default(gpio); +} + +static void +machine_at_cu430hx_common_init(const machine_t *model) +{ + machine_at_common_init_ex(model, 2); + machine_at_cu430hx_gpio_init(); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); // ATI VGA Graphics + pci_register_slot(0x0C, PCI_CARD_NETWORK, 4, 0, 0, 0); // Intel 82557 Ethernet Network + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 0, 0, 0); // riser + + if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)->available()) + machine_snd = device_add(machine_get_snd_device(machine)); + + device_add(&i430hx_device); + device_add(&piix3_device); + device_add_params(&pc87306_device, (void *) PCX730X_AMI); + device_add(&intel_flash_bxt_ami_device); +} + +int +machine_at_cu430hx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined2("roms/machines/cu430hx/1006DK0_.BIO", + "roms/machines/cu430hx/1006DK0_.BI1", + "roms/machines/cu430hx/1006DK0_.BI2", + "roms/machines/cu430hx/1006DK0_.BI3", + "roms/machines/cu430hx/1006DK0_.RCV", + 0x3a000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_cu430hx_common_init(model); + + return ret; +} static void machine_at_tc430hx_gpio_init(void) @@ -244,13 +276,157 @@ machine_at_tc430hx_init(const machine_t *model) device_add(&i430hx_device); device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&pc87306_device); + device_add_params(&pc87306_device, (void *) PCX730X_AMI); device_add(&intel_flash_bxt_ami_device); return ret; } +int +machine_at_m7shi_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/m7shi/m7shi2n.rom", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + device_add(&i430hx_device); + device_add(&piix3_device); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL)); + device_add(&intel_flash_bxt_device); + + return ret; +} + +int +machine_at_epc2102_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/epc2102/P5000HX.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + device_add_params(&at_nvr_device, (void *) 0x20); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&i430hx_device); + device_add(&piix3_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&i82091aa_device, (void *) I82091AA_022); + device_add(&radisys_config_device); + device_add(&sst_flash_39sf010_device); + + return ret; +} + +/* The Sony VAIO is an AG430HX, I'm assuming it has the same configuration bits + as the TC430HX, hence the #define. */ +#define machine_at_ag430hx_gpio_init machine_at_tc430hx_gpio_init + +int +machine_at_pcv90_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined2("roms/machines/pcv90/1010DD04.BIO", + "roms/machines/pcv90/1010DD04.BI1", + "roms/machines/pcv90/1010DD04.BI2", + "roms/machines/pcv90/1010DD04.BI3", + "roms/machines/pcv90/1010DD04.RCV", + 0x3a000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + machine_at_ag430hx_gpio_init(); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&i430hx_device); + device_add(&piix3_device); + device_add_params(&pc87306_device, (void *) PCX730X_AMI); + device_add(&intel_flash_bxt_ami_device); + + return ret; +} + +int +machine_at_p55t2s_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/p55t2s/s6y08t.rom", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x12, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x14, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&i430hx_device); + device_add(&piix3_device); + device_add_params(&pc87306_device, (void *) PCX730X_AMI); + device_add(&intel_flash_bxt_device); + + return ret; +} + +int +machine_at_equium5200_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined2("roms/machines/equium5200/1003DK08.BIO", + "roms/machines/equium5200/1003DK08.BI1", + "roms/machines/equium5200/1003DK08.BI2", + "roms/machines/equium5200/1003DK08.BI3", + "roms/machines/equium5200/1003DK08.RCV", + 0x3a000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_cu430hx_common_init(model); + + return ret; +} + int machine_at_infinia7200_init(const machine_t *model) { @@ -283,187 +459,43 @@ machine_at_infinia7200_init(const machine_t *model) device_add(&i430hx_device); device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&pc87306_device); + device_add_params(&pc87306_device, (void *) PCX730X_AMI); device_add(&intel_flash_bxt_ami_device); return ret; } -static void -machine_at_cu430hx_gpio_init(void) +/* i430VX */ +int +machine_at_ap5vm_init(const machine_t *model) { - uint32_t gpio = 0xffffe1ff; + int ret; - /* Register 0x0079: */ - /* Bit 7: 0 = Clear password, 1 = Keep password. */ - /* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */ - /* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */ - /* Bit 4: External CPU clock (Switch 8). */ - /* Bit 3: External CPU clock (Switch 7). */ - /* 50 MHz: Switch 7 = Off, Switch 8 = Off. */ - /* 60 MHz: Switch 7 = On, Switch 8 = Off. */ - /* 66 MHz: Switch 7 = Off, Switch 8 = On. */ - /* Bit 2: 0 = On-board audio absent, 1 = On-board audio present. */ - /* Bit 1: 0 = Soft-off capable power supply present, 1 = Soft-off capable power supply absent. */ - /* Bit 0: 0 = Reserved. */ - /* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */ - if (cpu_busspeed <= 50000000) - gpio |= 0xffff10ff; - else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000)) - gpio |= 0xffff18ff; - else if (cpu_busspeed > 60000000) - gpio |= 0xffff00ff; + ret = bios_load_linear("roms/machines/ap5vm/AP5V270.ROM", + 0x000e0000, 131072, 0); - if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)->available()) - gpio |= 0xffff04ff; + if (bios_only || !ret) + return ret; - machine_set_gpio_default(gpio); -} - -static void -machine_at_cu430hx_common_init(const machine_t *model) -{ - machine_at_common_init_ex(model, 2); - machine_at_cu430hx_gpio_init(); + machine_at_common_init(model); pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); // ATI VGA Graphics - pci_register_slot(0x0C, PCI_CARD_NETWORK, 4, 0, 0, 0); // Intel 82557 Ethernet Network - pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); + /* It seems there were plans for an on-board NCR 53C810 according to some clues + left in the manual, but were latter scrapped. The BIOS still support that + PCI device, though, so why not. */ + pci_register_slot(0x06, PCI_CARD_SCSI, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 0, 0, 0); // riser - - if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)->available()) - machine_snd = device_add(machine_get_snd_device(machine)); - - device_add(&i430hx_device); + device_add(&i430vx_device); device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&pc87306_device); - device_add(&intel_flash_bxt_ami_device); -} - -int -machine_at_cu430hx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/cu430hx/1006DK0_.BIO", - "roms/machines/cu430hx/1006DK0_.BI1", - "roms/machines/cu430hx/1006DK0_.BI2", - "roms/machines/cu430hx/1006DK0_.BI3", - "roms/machines/cu430hx/1006DK0_.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_cu430hx_common_init(model); - - return ret; -} - -int -machine_at_equium5200_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/equium5200/1003DK08.BIO", - "roms/machines/equium5200/1003DK08.BI1", - "roms/machines/equium5200/1003DK08.BI2", - "roms/machines/equium5200/1003DK08.BI3", - "roms/machines/equium5200/1003DK08.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_cu430hx_common_init(model); - - return ret; -} - -int -machine_at_pcv90_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/pcv90/1010DD04.BIO", - "roms/machines/pcv90/1010DD04.BI1", - "roms/machines/pcv90/1010DD04.BI2", - "roms/machines/pcv90/1010DD04.BI3", - "roms/machines/pcv90/1010DD04.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - machine_at_ag430hx_gpio_init(); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&i430hx_device); - device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&pc87306_device); - device_add(&intel_flash_bxt_ami_device); - - return ret; -} - -int -machine_at_p65up5_cp55t2d_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p65up5/TD5I0201.AWD", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_p65up5_common_init(model, &i430hx_device); - - return ret; -} - -int -machine_at_epc2102_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/epc2102/P5000HX.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - device_add_params(&at_nvr_device, (void *) 0x20); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&i430hx_device); - device_add(&piix3_device); - device_add(&keyboard_ps2_intel_ami_pci_device); - device_add(&i82091aa_device); - device_add(&sst_flash_39sf010_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&ncr53c810_onboard_pci_device); + device_add(&intel_flash_bxt_device); return ret; } @@ -490,8 +522,8 @@ machine_at_p55tvp4_init(const machine_t *model) pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); device_add(&i430vx_device); device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); // It uses the AMIKEY KBC - device_add(&w83877f_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0)); device_add(&intel_flash_bxt_device); return ret; @@ -518,8 +550,8 @@ machine_at_5ivg_init(const machine_t *model) pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); device_add(&i430vx_device); device_add(&piix3_device); - device_add(&keyboard_ps2_pci_device); - device_add(&prime3c_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&gm82c803c_device, (void *) 0); device_add(&intel_flash_bxt_device); return ret; @@ -547,8 +579,8 @@ machine_at_8500tvxa_init(const machine_t *model) pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 3, 2, 1); device_add(&i430vx_device); device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&um8669f_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&um8669f_device, (void *) 0); device_add(&sst_flash_29ee010_device); return ret; @@ -578,7 +610,7 @@ machine_at_presario2240_init(const machine_t *model) device_add(&i430vx_device); device_add(&piix3_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37C932 | FDC37C93X_NORMAL)); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_NORMAL)); device_add(&sst_flash_29ee020_device); return ret; @@ -608,7 +640,7 @@ machine_at_presario4500_init(const machine_t *model) device_add(&i430vx_device); device_add(&piix3_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37C931 | FDC37C93X_APM)); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX1 | FDC37C93X_APM)); device_add(&sst_flash_29ee020_device); return ret; @@ -641,12 +673,41 @@ machine_at_dellhannibalp_init(const machine_t *model) pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 4); device_add(&i430vx_device); device_add(&piix3_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37C932 | FDC37C93X_FR)); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_FR)); device_add(&intel_flash_bxt_ami_device); return ret; } +int +machine_at_p5vxb_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/p5vxb/P5VXB10.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x05, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x06, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x08, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 4); + device_add(&i430vx_device); + device_add(&piix3_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0)); + device_add(&sst_flash_29ee010_device); + + return ret; +} + int machine_at_p55va_init(const machine_t *model) { @@ -669,162 +730,7 @@ machine_at_p55va_init(const machine_t *model) pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); device_add(&i430vx_device); device_add(&piix3_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37C932 | FDC37C93X_FR)); - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_brio80xx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/brio80xx/Hf0705.rom", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x14, PCI_CARD_VIDEO, 4, 0, 0, 0); - pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - device_add(&i430vx_device); - device_add(&piix3_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37C935 | FDC37C93X_NORMAL | FDC37C93X_370)); - device_add(&sst_flash_29ee020_device); - - return ret; -} - -int -machine_at_pb680_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/pb680/1012DN0R.BIO", - "roms/machines/pb680/1012DN0R.BI1", - "roms/machines/pb680/1012DN0R.BI2", - "roms/machines/pb680/1012DN0R.BI3", - "roms/machines/pb680/1012DN0R.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - machine_at_nv430vx_gpio_init(); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); - pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&i430vx_device); - device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&pc87306_device); - device_add(&intel_flash_bxt_ami_device); - - return ret; -} - -int -machine_at_pb810_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pb810/G400125I.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 3, 4); - pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 3, 2, 4); - pci_register_slot(0x0b, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(&cs4237b_device); - - device_add(&i430vx_device); - device_add(&piix3_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37C935 | FDC37C93X_NORMAL | FDC37C93X_370)); - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_mb520n_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/mb520n/520n503s.rom", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&i430vx_device); - device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&fdc37c669_device); - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_i430vx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/430vx/55XWUQ0E.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x12, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x14, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&i430vx_device); - device_add(&piix3_device); - device_add(&keyboard_ps2_pci_device); - device_add(&um8669f_device); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_FR)); device_add(&intel_flash_bxt_device); return ret; @@ -861,18 +767,18 @@ machine_at_gw2kte_init(const machine_t *model) device_add(&i430vx_device); device_add(&piix3_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37C932 | FDC37C93X_FR)); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_FR)); device_add(&intel_flash_bxt_ami_device); return ret; } int -machine_at_ma23c_init(const machine_t *model) +machine_at_brio80xx_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/ma23c/BIOS.ROM", + ret = bios_load_linear("roms/machines/brio80xx/Hf0705.rom", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -881,23 +787,220 @@ machine_at_ma23c_init(const machine_t *model) machine_at_common_init_ex(model, 2); pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x14, PCI_CARD_VIDEO, 4, 0, 0, 0); + pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_VIDEO, 3, 4, 1, 2); - device_add(&i430tx_device); - device_add(&piix4_device); - device_add(&nec_mate_unk_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&fdc37c67x_device); - device_add(&intel_flash_bxt_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 256); + pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + device_add(&i430vx_device); + device_add(&piix3_device); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL | FDC37XXXX_370)); + device_add(&sst_flash_29ee020_device); return ret; } +static const device_config_t lgibmx52_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "lgibmx52", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "08/21/97", .internal_name = "lgibmx52_082197", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/lgibmx52/BIOS.ROM", "" } }, + { .name = "03/26/99", .internal_name = "lgibmx52", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/lgibmx52/MS5136 LG IBM OEM.ROM", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t lgibmx52_device = { + .name = "LG IBM Multinet x52 (MSI MS-5136)", + .internal_name = "lgibmx52_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = lgibmx52_config +}; + +int +machine_at_lgibmx52_init(const machine_t *model) +{ + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&i430vx_device); + device_add(&piix3_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0)); + device_add(&winbond_flash_w29c010_device); + + return ret; +} + +/* The PB680 is a NV430VX, I'm assuming it has the same configuration bits as + the TC430HX, hence the #define. */ +#define machine_at_nv430vx_gpio_init machine_at_tc430hx_gpio_init + +int +machine_at_pb680_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_combined2("roms/machines/pb680/1012DN0R.BIO", + "roms/machines/pb680/1012DN0R.BI1", + "roms/machines/pb680/1012DN0R.BI2", + "roms/machines/pb680/1012DN0R.BI3", + "roms/machines/pb680/1012DN0R.RCV", + 0x3a000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + machine_at_nv430vx_gpio_init(); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add(&i430vx_device); + device_add(&piix3_device); + device_add_params(&pc87306_device, (void *) PCX730X_AMI); + device_add(&intel_flash_bxt_ami_device); + + return ret; +} + +int +machine_at_pb810_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pb810/G400125I.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 3, 4); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 3, 2, 4); + pci_register_slot(0x0b, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + + if (sound_card_current[0] == SOUND_INTERNAL) + device_add(&cs4237b_device); + + device_add(&i430vx_device); + device_add(&piix3_device); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL | FDC37XXXX_370)); + device_add(&intel_flash_bxt_device); + + return ret; +} + +int +machine_at_mb520n_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/mb520n/520n503s.rom", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&i430vx_device); + device_add(&piix3_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c669_device, (void *) 0); + device_add(&intel_flash_bxt_device); + + return ret; +} + +int +machine_at_i430vx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/430vx/55XWUQ0E.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x12, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x14, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&i430vx_device); + device_add(&piix3_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&um8669f_device, (void *) 0); + device_add(&intel_flash_bxt_device); + + return ret; +} + +/* i430TX */ int machine_at_nupro592_init(const machine_t *model) { @@ -926,8 +1029,7 @@ machine_at_nupro592_init(const machine_t *model) device_add(&i430tx_device); device_add(&piix4_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83977ef_device); + device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); device_add(&intel_flash_bxt_device); spd_register(SPD_TYPE_SDRAM, 0x3, 128); device_add(&w83781d_device); /* fans: CPU1, unused, unused; temperatures: System, CPU1, unused */ @@ -963,8 +1065,8 @@ machine_at_tx97_init(const machine_t *model) pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); device_add(&i430tx_device); device_add(&piix4_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83877tf_acorp_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&w83877_device, (void *) (W83877TF | W83877_3F0)); device_add(&intel_flash_bxt_device); spd_register(SPD_TYPE_SDRAM, 0x3, 128); device_add(&w83781d_device); /* fans: Chassis, CPU, Power; temperatures: MB, unused, CPU */ @@ -978,6 +1080,15 @@ machine_at_tx97_init(const machine_t *model) return ret; } +void +machine_at_optiplex_21152_init(void) +{ + uint8_t bus_index = pci_bridge_get_bus_index(device_add(&dec21152_device)); + pci_register_bus_slot(bus_index, 0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_bus_slot(bus_index, 0x0a, PCI_CARD_NORMAL, 4, 2, 1, 3); + pci_register_bus_slot(bus_index, 0x0b, PCI_CARD_NORMAL, 1, 3, 4, 2); +} + int machine_at_optiplexgn_init(const machine_t *model) { @@ -1016,6 +1127,137 @@ machine_at_optiplexgn_init(const machine_t *model) return ret; } +int +machine_at_tomahawk_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/tomahawk/0AAGT046.ROM", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); /* PIIX4 */ + pci_register_slot(0x0D, PCI_CARD_VIDEO, 3, 0, 0, 0); + pci_register_slot(0x0E, PCI_CARD_NETWORK, 4, 0, 0, 0); + pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x07, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x08, PCI_CARD_NORMAL, 3, 4, 1, 2); + device_add(&i430tx_device); + device_add(&piix4_device); + device_add_params(&fdc37c67x_device, (void *) (FDC37XXX2 | FDC37XXXX_370)); + device_add(&amd_flash_29f020a_device); + spd_register(SPD_TYPE_SDRAM, 0x3, 128); + device_add(&lm78_device); /* fans: Thermal, CPU, Chassis; temperature: unused */ + device_add(&lm75_1_4a_device); /* temperature: CPU */ + + if ((gfxcard[0] == VID_INTERNAL) && machine_get_vid_device(machine)) + device_add(machine_get_vid_device(machine)); + + if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)) + device_add(machine_get_snd_device(machine)); + + if ((net_cards_conf[0].device_num == NET_INTERNAL) && machine_get_net_device(machine)) + device_add(machine_get_net_device(machine)); + + return ret; +} + +int +machine_at_ym430tx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ym430tx/YM430TX.003", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); /* PIIX4 */ + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); + device_add(&i430tx_device); + device_add(&piix4_device); + device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); + device_add(&intel_flash_bxt_device); + spd_register(SPD_TYPE_SDRAM, 0x3, 128); + + return ret; +} + +int +machine_at_thunderbolt_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/thunderbolt/tbolt-01.rom", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 1, 2, 3); /* PIIX4 */ + pci_register_slot(0x11, PCI_CARD_NORMAL, 0, 1, 2, 3); + pci_register_slot(0x12, PCI_CARD_NORMAL, 1, 2, 3, 0); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 0, 1); + pci_register_slot(0x14, PCI_CARD_NORMAL, 3, 0, 1, 2); + device_add(&i430tx_device); + device_add(&piix4_device); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL | FDC37C93X_NO_NVR)); + device_add(&intel_flash_bxt_device); + spd_register(SPD_TYPE_SDRAM, 0x3, 128); + + return ret; +} + +int +machine_at_ma23c_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ma23c/BIOS.ROM", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_VIDEO, 3, 4, 1, 2); + device_add(&i430tx_device); + device_add(&piix4_device); + device_add(&nec_mate_unk_device); + device_add_params(&fdc37c67x_device, (void *) (FDC37XXX2 | FDC37XXXX_370)); + device_add(&intel_flash_bxt_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); + + return ret; +} + int machine_at_an430tx_init(const machine_t *model) { @@ -1055,38 +1297,6 @@ machine_at_an430tx_init(const machine_t *model) return ret; } -int -machine_at_ym430tx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ym430tx/YM430TX.003", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); /* PIIX4 */ - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); - device_add(&i430tx_device); - device_add(&piix4_device); - device_add(&keyboard_ps2_pci_device); - device_add(&w83977tf_device); - device_add(&intel_flash_bxt_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 128); - - return ret; -} - int machine_at_mb540n_init(const machine_t *model) { @@ -1109,8 +1319,8 @@ machine_at_mb540n_init(const machine_t *model) pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); /* PIIX4 */ device_add(&i430tx_device); device_add(&piix4_device); - device_add(&keyboard_ps2_pci_device); - device_add(&um8669f_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&um8669f_device, (void *) 0); device_add(&sst_flash_29ee010_device); spd_register(SPD_TYPE_SDRAM, 0x3, 128); @@ -1140,8 +1350,8 @@ machine_at_56a5_init(const machine_t *model) pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); device_add(&i430tx_device); device_add(&piix4_device); - device_add(&keyboard_ps2_pci_device); - device_add(&w83877f_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0)); device_add(&sst_flash_29ee010_device); spd_register(SPD_TYPE_SDRAM, 0x3, 128); @@ -1170,8 +1380,8 @@ machine_at_p5mms98_init(const machine_t *model) pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&i430tx_device); device_add(&piix4_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83977tf_device); + /* This actually has the Winbond W83967AF, for which I can not find any datasheet at all. */ + device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI | W83977_NO_NVR)); device_add(&intel_flash_bxt_device); spd_register(SPD_TYPE_SDRAM, 0x3, 128); device_add(&lm78_device); /* fans: Thermal, CPU, Chassis; temperature: unused */ @@ -1202,7 +1412,7 @@ machine_at_richmond_init(const machine_t *model) pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&i430tx_device); device_add(&piix4_device); - device_add(&keyboard_ps2_ami_pci_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&it8671f_device); device_add(&intel_flash_bxt_device); spd_register(SPD_TYPE_SDRAM, 0x3, 128); @@ -1212,48 +1422,7 @@ machine_at_richmond_init(const machine_t *model) return ret; } -int -machine_at_tomahawk_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/tomahawk/0AAGT046.ROM", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); /* PIIX4 */ - pci_register_slot(0x0D, PCI_CARD_VIDEO, 3, 0, 0, 0); - pci_register_slot(0x0E, PCI_CARD_NETWORK, 4, 0, 0, 0); - pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x07, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x08, PCI_CARD_NORMAL, 3, 4, 1, 2); - device_add(&i430tx_device); - device_add(&piix4_device); - device_add(&keyboard_ps2_intel_ami_pci_device); - device_add(&fdc37c67x_device); - device_add(&amd_flash_29f020a_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 128); - device_add(&lm78_device); /* fans: Thermal, CPU, Chassis; temperature: unused */ - device_add(&lm75_1_4a_device); /* temperature: CPU */ - - if ((gfxcard[0] == VID_INTERNAL) && machine_get_vid_device(machine)) - device_add(machine_get_vid_device(machine)); - - if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)) - device_add(machine_get_snd_device(machine)); - - if ((net_cards_conf[0].device_num == NET_INTERNAL) && machine_get_net_device(machine)) - device_add(machine_get_net_device(machine)); - - return ret; -} - +/* VIA VPX */ int machine_at_ficva502_init(const machine_t *model) { @@ -1276,14 +1445,14 @@ machine_at_ficva502_init(const machine_t *model) pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); device_add(&via_vpx_device); device_add(&via_vt82c586b_device); - device_add(&keyboard_ps2_pci_device); - device_add(&fdc37c669_370_device); + device_add_params(&fdc37c669_device, (void *) FDC37C6XX_370); device_add(&sst_flash_29ee010_device); spd_register(SPD_TYPE_SDRAM, 0x3, 256); return ret; } +/* VIA VP3 */ int machine_at_ficpa2012_init(const machine_t *model) { @@ -1308,8 +1477,7 @@ machine_at_ficpa2012_init(const machine_t *model) device_add(&via_vp3_device); device_add(&via_vt82c586b_device); - device_add(&keyboard_ps2_pci_device); - device_add(&w83877f_device); + device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0)); device_add(&sst_flash_29ee010_device); spd_register(SPD_TYPE_SDRAM, 0x7, 512); @@ -1340,20 +1508,20 @@ machine_at_via809ds_init(const machine_t *model) device_add(&via_vp3_device); device_add(&via_vt82c586b_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&fdc37c669_device); + device_add_params(&fdc37c669_device, (void *) 0); device_add(&intel_flash_bxt_device); spd_register(SPD_TYPE_SDRAM, 0x7, 512); return ret; } +/* SiS 5571 */ int -machine_at_r534f_init(const machine_t *model) +machine_at_cb52xsi_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/r534f/r534f008.bin", + ret = bios_load_linear("roms/machines/cb52xsi/CD5205S.ROM", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -1364,14 +1532,13 @@ machine_at_r534f_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&sis_5571_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83877f_device); + device_add_params(&fdc37c669_device, (void *) FDC37C6XX_370); device_add(&sst_flash_29ee010_device); return ret; @@ -1399,19 +1566,18 @@ machine_at_ms5146_init(const machine_t *model) pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&sis_5571_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83877f_device); + device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0)); device_add(&sst_flash_29ee010_device); return ret; } int -machine_at_cb52xsi_init(const machine_t *model) +machine_at_r534f_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/cb52xsi/CD5205S.ROM", + ret = bios_load_linear("roms/machines/r534f/r534f008.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -1422,19 +1588,19 @@ machine_at_cb52xsi_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x07, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&sis_5571_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&fdc37c669_370_device); + device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0)); device_add(&sst_flash_29ee010_device); return ret; } +/* SiS 5581 */ int machine_at_sp97xv_init(const machine_t *model) { @@ -1457,8 +1623,7 @@ machine_at_sp97xv_init(const machine_t *model) pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); pci_register_slot(0x13, PCI_CARD_VIDEO, 1, 2, 3, 4); /* On-chip SiS graphics, absent here. */ device_add(&sis_5581_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83877f_device); + device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0)); device_add(&sst_flash_29ee010_device); return ret; @@ -1484,13 +1649,13 @@ machine_at_sq578_init(const machine_t *model) pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); device_add(&sis_5581_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83877tf_device); + device_add_params(&w83877_device, (void *) (W83877TF | W83877_3F0)); device_add(&sst_flash_29ee010_device); return ret; } +/* SiS 5591 */ int machine_at_ms5172_init(const machine_t *model) { @@ -1512,19 +1677,19 @@ machine_at_ms5172_init(const machine_t *model) pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); device_add(&sis_5591_1997_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83877tf_device); + device_add_params(&w83877_device, (void *) (W83877TF | W83877_3F0)); device_add(&sst_flash_29ee010_device); return ret; } +/* ALi ALADDiN IV+ */ int -machine_at_m560_init(const machine_t *model) +machine_at_m5ata_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/m560/5600410s.ami", + ret = bios_load_linear("roms/machines/m5ata/ATA1223.BIN", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -1533,19 +1698,17 @@ machine_at_m560_init(const machine_t *model) machine_at_common_init_ex(model, 2); pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 1, 2, 3, 4); pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); pci_register_slot(0x0B, PCI_CARD_SOUTHBRIDGE_IDE, 1, 2, 3, 4); - pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE_PMU, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE_USB, 1, 2, 3, 4); pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); + device_add(&ali1531_device); device_add(&ali1543_device); /* -5 */ - device_add(&sst_flash_29ee010_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 256); + spd_register(SPD_TYPE_SDRAM, 0x3, 64); return ret; } @@ -1584,30 +1747,32 @@ machine_at_ms5164_init(const machine_t *model) } int -machine_at_thunderbolt_init(const machine_t *model) +machine_at_m560_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/thunderbolt/tbolt-01.rom", - 0x000c0000, 262144, 0); + ret = bios_load_linear("roms/machines/m560/5600410s.ami", + 0x000e0000, 131072, 0); if (bios_only || !ret) return ret; - machine_at_common_init(model); + machine_at_common_init_ex(model, 2); pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 1, 2, 3); /* PIIX4 */ - pci_register_slot(0x11, PCI_CARD_NORMAL, 0, 1, 2, 3); - pci_register_slot(0x12, PCI_CARD_NORMAL, 1, 2, 3, 0); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 0, 1); - pci_register_slot(0x14, PCI_CARD_NORMAL, 3, 0, 1, 2); - device_add(&i430tx_device); - device_add(&piix4_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37C935 | FDC37C93X_NORMAL | FDC37C93X_NO_NVR)); - device_add(&intel_flash_bxt_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 128); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_SOUTHBRIDGE_IDE, 1, 2, 3, 4); + pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE_PMU, 1, 2, 3, 4); + pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE_USB, 1, 2, 3, 4); + pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); + device_add(&ali1531_device); + device_add(&ali1543_device); /* -5 */ + device_add(&sst_flash_29ee010_device); + spd_register(SPD_TYPE_SDRAM, 0x3, 256); return ret; } diff --git a/src/machine/m_at_socket7_3v.c b/src/machine/m_at_socket7_3v.c index 0dea19a18..1166173f2 100644 --- a/src/machine/m_at_socket7_3v.c +++ b/src/machine/m_at_socket7_3v.c @@ -8,11 +8,9 @@ * * Implementation of Socket 7 (Single Voltage) machines. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2020 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -43,6 +41,87 @@ #include <86box/plat_unused.h> #include <86box/sound.h> +/* i430FX */ +static void +machine_at_p54tp4xe_common_init(const machine_t *model) +{ + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&i430fx_device); + device_add(&piix_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&intel_flash_bxt_device); +} + +int +machine_at_p54tp4xe_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/p54tp4xe/t15i0302.awd", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_p54tp4xe_common_init(model); + + return ret; +} + +int +machine_at_p54tp4xe_mr_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/p54tp4xe/TRITON.BIO", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_p54tp4xe_common_init(model); + + return ret; +} + +int +machine_at_exp8551_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/exp8551/AMI20.BIO", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&i430fx_device); + device_add(&piix_device); + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); + device_add(&sst_flash_29ee010_device); + + return ret; +} + static void machine_at_thor_gpio_init(void) { @@ -106,93 +185,12 @@ machine_at_thor_common_init(const machine_t *model, int has_video) if (has_video && (gfxcard[0] == VID_INTERNAL)) device_add(machine_get_vid_device(machine)); - device_add(&keyboard_ps2_intel_ami_pci_device); device_add(&i430fx_device); device_add(&piix_device); - device_add(&pc87306_device); + device_add_params(&pc87306_device, (void *) PCX730X_AMI); device_add(&intel_flash_bxt_ami_device); } -static void -machine_at_p54tp4xe_common_init(const machine_t *model) -{ - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&i430fx_device); - device_add(&piix_device); - device_add(&fdc37c665_device); - device_add(&intel_flash_bxt_device); -} - -int -machine_at_p54tp4xe_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p54tp4xe/t15i0302.awd", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_p54tp4xe_common_init(model); - - return ret; -} - -int -machine_at_p54tp4xe_mr_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p54tp4xe/TRITON.BIO", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_p54tp4xe_common_init(model); - - return ret; -} - -int -machine_at_exp8551_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/exp8551/AMI20.BIO", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&i430fx_device); - device_add(&piix_device); - device_add(&w83787f_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - int machine_at_gw2katx_init(const machine_t *model) { @@ -210,6 +208,38 @@ machine_at_gw2katx_init(const machine_t *model) return ret; } +int +machine_at_vectra54_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/vectra54/GT0724.22", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_VIDEO, 0, 0, 0, 0); + pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x07, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x08, PCI_CARD_NORMAL, 3, 4, 1, 2); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&s3_phoenix_trio64_onboard_pci_device); + + device_add(&i430fx_device); + device_add(&piix_device); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_NORMAL)); + device_add(&sst_flash_29ee010_device); + + return ret; +} + int machine_at_thor_init(const machine_t *model) { @@ -359,10 +389,9 @@ machine_at_endeavor_init(const machine_t *model) if (sound_card_current[0] == SOUND_INTERNAL) machine_snd = device_add(machine_get_snd_device(machine)); - device_add(&keyboard_ps2_intel_ami_pci_device); device_add(&i430fx_device); device_add(&piix_device); - device_add(&pc87306_device); + device_add_params(&pc87306_device, (void *) PCX730X_AMI); device_add(&intel_flash_bxt_ami_device); return ret; @@ -390,8 +419,8 @@ machine_at_ms5119_init(const machine_t *model) device_add(&i430fx_device); device_add(&piix_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83787f_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); device_add(&sst_flash_29ee010_device); return ret; @@ -457,8 +486,7 @@ machine_at_pb640_init(const machine_t *model) if (gfxcard[0] == VID_INTERNAL) device_add(machine_get_vid_device(machine)); - device_add(&keyboard_ps2_intel_ami_pci_device); - device_add(&pc87306_device); + device_add_params(&pc87306_device, (void *) PCX730X_AMI); device_add(&intel_flash_bxt_ami_device); return ret; @@ -484,10 +512,10 @@ machine_at_mb500n_init(const machine_t *model) pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&keyboard_ps2_pci_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&i430fx_device); device_add(&piix_no_mirq_device); - device_add(&fdc37c665_device); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); device_add(&intel_flash_bxt_device); return ret; @@ -516,19 +544,19 @@ machine_at_fmb_init(const machine_t *model) device_add(&i430fx_device); device_add(&piix_no_mirq_device); - device_add(&keyboard_at_ami_device); - device_add(&w83787f_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); device_add(&intel_flash_bxt_device); return ret; } int -machine_at_acerm3a_init(const machine_t *model) +machine_at_acerv35n_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/acerm3a/r01-b3.bin", + ret = bios_load_linear("roms/machines/acerv35n/v35nd1s1.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -539,15 +567,15 @@ machine_at_acerm3a_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x10, PCI_CARD_VIDEO, 4, 0, 0, 0); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); device_add(&i430hx_device); device_add(&piix3_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37C935 | FDC37C93X_NORMAL)); - + /* The chip is not marked FR but the BIOS accesses register 06h of GPIO. */ + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_FR)); device_add(&sst_flash_29ee010_device); return ret; @@ -576,8 +604,8 @@ machine_at_ap53_init(const machine_t *model) pci_register_slot(0x06, PCI_CARD_VIDEO, 1, 2, 3, 4); device_add(&i430hx_device); device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&fdc37c669_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c669_device, (void *) 0); device_add(&intel_flash_bxt_device); return ret; @@ -605,55 +633,13 @@ machine_at_8500tuc_init(const machine_t *model) pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); device_add(&i430hx_device); device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&um8669f_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&um8669f_device, (void *) 0); device_add(&intel_flash_bxt_device); return ret; } -int -machine_at_d943_init(const machine_t *model) - -{ - int ret = 0; - const char* fn; - - /* No ROMs available */ - if (!device_available(model->device)) - return ret; - - device_context(model->device); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); - ret = bios_load_linear(fn, 0x000e0000, 131072, 0); - device_context_restore(); - - machine_at_common_init_ex(model, 2); - device_add(&amstrad_megapc_nvr_device); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); - pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 2, 4, 1); - pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 1, 3, 4); - pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 3, 2, 4); - device_add(&i430hx_device); - device_add(&piix3_device); - device_add(&keyboard_ps2_pci_device); - device_add(&fdc37c665_device); - device_add(&intel_flash_bxt_device); - spd_register(SPD_TYPE_EDO, 0x7, 256); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - if (sound_card_current[0] == SOUND_INTERNAL) - machine_snd = device_add(machine_get_snd_device(machine)); - - return ret; -} - static const device_config_t d943_config[] = { // clang-format off { @@ -680,8 +666,6 @@ static const device_config_t d943_config[] = { // clang-format on }; - - const device_t d943_device = { .name = "Siemens-Nixdorf D943", .internal_name = "d943_device", @@ -697,63 +681,47 @@ const device_t d943_device = { }; int -machine_at_p55t2s_init(const machine_t *model) +machine_at_d943_init(const machine_t *model) { - int ret; + int ret = 0; + const char* fn; - ret = bios_load_linear("roms/machines/p55t2s/s6y08t.rom", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) + /* No ROMs available */ + if (!device_available(model->device)) return ret; + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + machine_at_common_init_ex(model, 2); + device_add(&amstrad_megapc_nvr_device); pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x12, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x14, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); + pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 2, 4, 1); + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 1, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 3, 2, 4); device_add(&i430hx_device); device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&pc87306_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); device_add(&intel_flash_bxt_device); + spd_register(SPD_TYPE_EDO, 0x7, 256); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + if (sound_card_current[0] == SOUND_INTERNAL) + machine_snd = device_add(machine_get_snd_device(machine)); return ret; } -int -machine_at_p5vxb_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p5vxb/P5VXB10.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x05, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x06, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x08, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 4); - device_add(&i430vx_device); - device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83877f_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - +/* i430VX */ int machine_at_gw2kma_init(const machine_t *model) { @@ -784,12 +752,116 @@ machine_at_gw2kma_init(const machine_t *model) device_add(&i430vx_device); device_add(&piix3_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37C932 | FDC37C93X_FR)); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_FR)); device_add(&intel_flash_bxt_ami_device); return ret; } +/* SiS 5501 */ +static const device_config_t c5sbm2_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "5sbm2", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "AwardBIOS v4.50GP - Revision 07/17/1995", .internal_name = "5sbm2_v450gp", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/5SBM0717.BIN", "" } }, + { .name = "AwardBIOS v4.50PG - Revision 03/26/1996", .internal_name = "5sbm2", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/5SBM0326.BIN", "" } }, + { .name = "AwardBIOS v4.51PG - Revision 2.2 (by Unicore Software)", .internal_name = "5sbm2_451pg", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/2A5ICC3A.BIN", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t c5sbm2_device = { + .name = "Chaintech 5SBM/5SBM2 (M103)", + .internal_name = "5sbm2_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = c5sbm2_config +}; + +int +machine_at_5sbm2_init(const machine_t *model) +{ + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); + + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&sis_550x_device); + device_add_params(&um866x_device, (void *) UM8663AF); + device_add(&sst_flash_29ee010_device); + + return ret; +} + +/* SiS 5511 */ +int +machine_at_amis727_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/amis727/S727p.rom", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0xFE, 0xFF, 0, 0); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + + device_add(&sis_5511_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&intel_flash_bxt_device); + + return ret; +} + static const device_config_t ap5s_config[] = { // clang-format off { @@ -854,171 +926,8 @@ machine_at_ap5s_init(const machine_t *model) pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&sis_5511_device); - device_add(&keyboard_ps2_ami_device); - device_add(&fdc37c665_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_ms5124_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ms5124/AG77.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0xFE, 0xFF, 0, 0); - pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); - - device_add(&sis_5511_device); - device_add(&keyboard_ps2_ami_device); - device_add(&w83787f_88h_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_amis727_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/amis727/S727p.rom", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0xFE, 0xFF, 0, 0); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - - device_add(&sis_5511_device); - device_add(&keyboard_ps2_intel_ami_pci_device); - device_add(&fdc37c665_device); - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_vectra54_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/vectra54/GT0724.22", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_VIDEO, 0, 0, 0, 0); - pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x07, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x08, PCI_CARD_NORMAL, 3, 4, 1, 2); - - if (gfxcard[0] == VID_INTERNAL) - device_add(&s3_phoenix_trio64_onboard_pci_device); - - device_add(&i430fx_device); - device_add(&piix_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37C932 | FDC37C93X_NORMAL)); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -static const device_config_t c5sbm2_config[] = { - // clang-format off - { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, - .default_string = "5sbm2", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "AwardBIOS v4.50GP - Revision 07/17/1995", .internal_name = "5sbm2_v450gp", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/5SBM0717.BIN", "" } }, - { .name = "AwardBIOS v4.50PG - Revision 03/26/1996", .internal_name = "5sbm2", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/5SBM0326.BIN", "" } }, - { .name = "AwardBIOS v4.51PG - Revision 2.2 (by Unicore Software)", .internal_name = "5sbm2_451pg", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/2A5ICC3A.BIN", "" } }, - { .files_no = 0 } - }, - }, - { .name = "", .description = "", .type = CONFIG_END } - // clang-format on -}; - -const device_t c5sbm2_device = { - .name = "Chaintech 5SBM/5SBM2 (M103)", - .internal_name = "5sbm2_device", - .flags = 0, - .local = 0, - .init = NULL, - .close = NULL, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = c5sbm2_config -}; - -int -machine_at_5sbm2_init(const machine_t *model) -{ - int ret = 0; - const char* fn; - - /* No ROMs available */ - if (!device_available(model->device)) - return ret; - - device_context(model->device); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); - ret = bios_load_linear(fn, 0x000e0000, 131072, 0); - device_context_restore(); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); - - device_add(&keyboard_at_ami_device); - device_add(&sis_550x_device); - device_add(&um8663af_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); device_add(&sst_flash_29ee010_device); return ret; @@ -1048,8 +957,37 @@ machine_at_pc140_6260_init(const machine_t *model) device_add(&gd5436_onboard_pci_device); device_add(&sis_5511_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&fdc37c669_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c669_device, (void *) 0); + device_add(&sst_flash_29ee010_device); + + return ret; +} + +int +machine_at_ms5124_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ms5124/AG77.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0xFE, 0xFF, 0, 0); + pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); + + device_add(&sis_5511_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_88)); device_add(&sst_flash_29ee010_device); return ret; diff --git a/src/machine/m_at_socket8.c b/src/machine/m_at_socket8.c index d81b41502..bcbf6ba18 100644 --- a/src/machine/m_at_socket8.c +++ b/src/machine/m_at_socket8.c @@ -8,11 +8,9 @@ * * Implementation of Socket 8 machines. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2019 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -40,6 +38,7 @@ #include "cpu.h" #include <86box/machine.h> +/* i450KX */ int machine_at_ap61_init(const machine_t *model) { @@ -65,10 +64,9 @@ machine_at_ap61_init(const machine_t *model) device_add(&i450kx_device); device_add(&sio_zb_device); device_add(&ide_cmd646_device); - device_add(&keyboard_ps2_acer_pci_device); - device_add(&fdc37c665_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); device_add(&sst_flash_29ee010_device); - // device_add(&intel_flash_bxt_device); return ret; } @@ -100,71 +98,86 @@ machine_at_p6rp4_init(const machine_t *model) device_add(&sio_zb_device); device_add(&ide_cmd646_device); /* Input port bit 2 must be 1 or CMOS Setup is disabled. */ - device_add(&keyboard_ps2_ami_pci_device); - device_add(&fdc37c665_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); device_add(&intel_flash_bxt_device); return ret; } +static const device_config_t ficpo6000_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "405F03C", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, /*W1*/ + .bios = { + { .name = "PhoenixBIOS 4.05 - Revision 405F03C (CD-ROM Boot support)", .internal_name = "405F03C", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/ficpo6000/405F03C.ROM", "" } }, + { .name = "PhoenixBIOS 4.05 - Revision 405F05C (No CD-ROM Boot support)", .internal_name = "405F05C", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/ficpo6000/405F05C.ROM", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t ficpo6000_device = { + .name = "FIC PO-6000", + .internal_name = "ficpo6000_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ficpo6000_config +}; + int -machine_at_686nx_init(const machine_t *model) +machine_at_ficpo6000_init(const machine_t *model) { - int ret; + int ret = 0; + const char* fn; - ret = bios_load_linear("roms/machines/686nx/6nx.140", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) + /* No ROMs available */ + if (!device_available(model->device)) return ret; - machine_at_common_init(model); + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + machine_at_common_init_ex(model, 2); pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); - device_add(&i440fx_device); - device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); // Uses the AMIKEY keyboard controller - device_add(&um8669f_device); - device_add(&intel_flash_bxt_device); - - return ret; -} - -int -machine_at_mb600n_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/mb600n/60915cs.rom", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3); - device_add(&i440fx_device); - device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&fdc37c669_device); + pci_register_slot(0x19, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x14, PCI_CARD_NORTHBRIDGE_SEC, 0, 0, 0, 0); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0c, PCI_CARD_IDE, 0, 0, 0, 0); + device_add(&i450kx_device); + device_add(&sio_zb_device); + device_add(&ide_cmd646_device); + /* Input port bit 2 must be 1 or CMOS Setup is disabled. */ + device_add_params(&pc87306_device, (void *) PCX730X_PHOENIX_42); device_add(&intel_flash_bxt_device); return ret; } +/* i440FX */ int machine_at_acerv60n_init(const machine_t *model) { @@ -188,7 +201,7 @@ machine_at_acerv60n_init(const machine_t *model) pci_register_slot(0x0C, PCI_CARD_NORMAL, 2, 3, 4, 1); device_add(&i440fx_device); device_add(&piix3_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37C935 | FDC37C93X_NORMAL)); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL)); device_add(&sst_flash_29ee010_device); spd_register(SPD_TYPE_SDRAM, 0x7, 128); @@ -196,11 +209,27 @@ machine_at_acerv60n_init(const machine_t *model) } int -machine_at_lgibmx61_init(const machine_t *model) +machine_at_p65up5_cp6nd_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/lgibmx61/bios.rom", + ret = bios_load_linear("roms/machines/p65up5/ND6I0218.AWD", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_p65up5_common_init(model, &i440fx_device); + + return ret; +} + +int +machine_at_8600ttc_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/8600ttc/TTC0715B.ROM", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -211,51 +240,15 @@ machine_at_lgibmx61_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&i440fx_device); device_add(&piix3_device); - device_add(&keyboard_ps2_ami_device); - device_add(&w83877f_president_device); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_vs440fx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/vs440fx/1018CS1_.BIO", - "roms/machines/vs440fx/1018CS1_.BI1", - "roms/machines/vs440fx/1018CS1_.BI2", - "roms/machines/vs440fx/1018CS1_.BI3", - "roms/machines/vs440fx/1018CS1_.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&i440fx_device); - device_add(&piix3_device); - device_add_params(&pc87307_device, (void *) (PCX730X_AMI | PCX7307_PC87307)); - - device_add(&intel_flash_bxt_ami_device); - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(machine_get_snd_device(machine)); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c669_device, (void *) 0); + device_add(&intel_flash_bxt_device); return ret; } @@ -332,6 +325,35 @@ machine_at_gw2kvenus_init(const machine_t *model) return ret; } +int +machine_at_686nx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/686nx/6nx.140", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); + device_add(&i440fx_device); + device_add(&piix3_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&um8669f_device, (void *) 0); + device_add(&intel_flash_bxt_device); + + return ret; +} + int machine_at_ap440fx_init(const machine_t *model) { @@ -371,11 +393,47 @@ machine_at_ap440fx_init(const machine_t *model) } int -machine_at_8600ttc_init(const machine_t *model) +machine_at_vs440fx_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/8600ttc/TTC0715B.ROM", + ret = bios_load_linear_combined2("roms/machines/vs440fx/1018CS1_.BIO", + "roms/machines/vs440fx/1018CS1_.BI1", + "roms/machines/vs440fx/1018CS1_.BI2", + "roms/machines/vs440fx/1018CS1_.BI3", + "roms/machines/vs440fx/1018CS1_.RCV", + 0x3a000, 128); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&i440fx_device); + device_add(&piix3_device); + device_add_params(&pc87307_device, (void *) (PCX730X_AMI | PCX7307_PC87307)); + + device_add(&intel_flash_bxt_ami_device); + + if (sound_card_current[0] == SOUND_INTERNAL) + device_add(machine_get_snd_device(machine)); + + return ret; +} + +int +machine_at_lgibmx61_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/lgibmx61/bios.rom", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -386,15 +444,15 @@ machine_at_8600ttc_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&i440fx_device); device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&fdc37c669_device); - device_add(&intel_flash_bxt_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&w83877_device, (void *) (W83877F | W83877_250)); + device_add(&sst_flash_29ee010_device); return ret; } @@ -421,45 +479,37 @@ machine_at_m6mi_init(const machine_t *model) pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&i440fx_device); device_add(&piix3_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37C935 | FDC37C93X_NORMAL)); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL)); device_add(&intel_flash_bxt_device); return ret; } -void -machine_at_p65up5_common_init(const machine_t *model, const device_t *northbridge) -{ - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - device_add(northbridge); - device_add(&piix3_ioapic_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83877f_device); - device_add(&sst_flash_29ee010_device); - device_add(&ioapic_device); -} - int -machine_at_p65up5_cp6nd_init(const machine_t *model) +machine_at_mb600n_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/p65up5/ND6I0218.AWD", + ret = bios_load_linear("roms/machines/mb600n/60915cs.rom", 0x000e0000, 131072, 0); if (bios_only || !ret) return ret; - machine_at_p65up5_common_init(model, &i440fx_device); + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3); + device_add(&i440fx_device); + device_add(&piix3_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c669_device, (void *) 0); + device_add(&intel_flash_bxt_device); return ret; } diff --git a/src/machine/m_at_sockets7.c b/src/machine/m_at_sockets7.c index b7ffc03b3..a39b2cef4 100644 --- a/src/machine/m_at_sockets7.c +++ b/src/machine/m_at_sockets7.c @@ -8,11 +8,9 @@ * * Implementation of Super Socket 7 machines. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2020 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -40,6 +38,7 @@ #include <86box/snd_ac97.h> #include <86box/clock.h> +/* ALi ALADDiN V */ int machine_at_p5a_init(const machine_t *model) { @@ -207,6 +206,7 @@ machine_at_5ax_init(const machine_t *model) return ret; } +/* VIA MVP3 */ int machine_at_ax59pro_init(const machine_t *model) { @@ -231,14 +231,44 @@ machine_at_ax59pro_init(const machine_t *model) device_add(&via_mvp3_device); device_add(&via_vt82c586b_device); - device_add(&keyboard_ps2_pci_device); - device_add(&w83877tf_device); + device_add_params(&w83877_device, (void *) (W83877TF | W83877_250)); device_add(&sst_flash_39sf020_device); spd_register(SPD_TYPE_SDRAM, 0x7, 256); return ret; } +int +machine_at_delhi3_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/delhi3/DELHI3.ROM", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); + + device_add(&via_mvp3_device); + device_add(&via_vt82c596a_device); + device_add_params(&w83877_device, (void *) (W83877TF | W83877_250)); + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0x3, 256); + + if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)) + device_add(machine_get_snd_device(machine)); + + return ret; +} + int machine_at_mvp3_init(const machine_t *model) { @@ -262,8 +292,7 @@ machine_at_mvp3_init(const machine_t *model) device_add(&via_mvp3_device); device_add(&via_vt82c586b_device); - device_add(&keyboard_ps2_pci_device); - device_add(&w83877tf_acorp_device); + device_add_params(&w83877_device, (void *) (W83877TF | W83877_3F0)); device_add(&sst_flash_39sf010_device); spd_register(SPD_TYPE_SDRAM, 0x3, 256); @@ -294,7 +323,6 @@ machine_at_ficva503a_init(const machine_t *model) device_add(&via_mvp3_device); device_add(&via_vt82c686a_device); /* fans: CPU1, Chassis; temperatures: CPU, System, unused */ - device_add(&keyboard_ps2_ami_pci_device); device_add(&sst_flash_39sf020_device); spd_register(SPD_TYPE_SDRAM, 0x7, 256); hwm_values.temperatures[0] += 2; /* CPU offset */ @@ -332,7 +360,6 @@ machine_at_5emapro_init(const machine_t *model) device_add(&via_mvp3_device); /* Rebranded as EQ82C6638 */ device_add(&via_vt82c686a_device); - device_add(&keyboard_ps2_ami_pci_device); device_add(&sst_flash_39sf010_device); spd_register(SPD_TYPE_SDRAM, 0x7, 256); device_add(&via_vt82c686_hwm_device); /* fans: CPU1, Chassis; temperatures: CPU, System, unused */ @@ -343,38 +370,7 @@ machine_at_5emapro_init(const machine_t *model) return ret; } -int -machine_at_delhi3_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/delhi3/DELHI3.ROM", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); - - device_add(&via_mvp3_device); - device_add(&via_vt82c596a_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83877tf_device); - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 256); - - if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)) - device_add(machine_get_snd_device(machine)); - - return ret; -} - +/* SiS 5591 */ int machine_at_5sg100_init(const machine_t *model) { @@ -397,8 +393,7 @@ machine_at_5sg100_init(const machine_t *model) pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); pci_register_slot(0x02, PCI_CARD_AGPBRIDGE, 0, 0, 0, 0); device_add(&sis_5591_1997_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&w83877tf_device); + device_add_params(&w83877_device, (void *) (W83877TF | W83877_3F0)); device_add(&sst_flash_29ee010_device); return ret; diff --git a/src/machine/m_at_t3100e.c b/src/machine/m_at_t3100e.c index 3c83b0cce..4919f4975 100644 --- a/src/machine/m_at_t3100e.c +++ b/src/machine/m_at_t3100e.c @@ -117,15 +117,13 @@ * bit 2 set for single-pixel LCD font * bits 0,1 for display font * - * - * - * Authors: Fred N. van Kempen, + * Authors: John Elliott, + * Fred N. van Kempen, * Miran Grca, - * John Elliott, * - * Copyright 2017-2018 Fred N. van Kempen. - * Copyright 2016-2018 Miran Grca. - * Copyright 2008-2018 John Elliott. + * Copyright 2008-2025 John Elliott. + * Copyright 2017-2025 Fred N. van Kempen. + * Copyright 2016-2025 Miran Grca. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -796,6 +794,12 @@ upper_write_raml(uint32_t addr, uint32_t val, void *priv) *(uint32_t *) &ram[addr] = val; } +uint8_t +machine_t3100e_p1_handler(void) +{ + return (t3100e_mono_get() & 1) ? 0xff : 0xbf; +} + int machine_at_t3100e_init(const machine_t *model) { @@ -813,11 +817,10 @@ machine_at_t3100e_init(const machine_t *model) machine_at_common_ide_init(model); - device_add(&keyboard_at_toshiba_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); - if (fdc_current[0] == FDC_INTERNAL) { + if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); - } /* Hook up system control port */ io_sethandler(0x8084, 0x0001, diff --git a/src/machine/m_elt.c b/src/machine/m_elt.c index 628333aba..2c807782c 100644 --- a/src/machine/m_elt.c +++ b/src/machine/m_elt.c @@ -190,7 +190,7 @@ machine_elt_init(const machine_t *model) /* Keyboard goes after the video, because on XT compatibles it's dealt * with by the same PPI as the config switches and we need them to * indicate the correct display type */ - device_add(&keyboard_xt_device); + device_add(&kbc_xt_device); device_add(&elt_nvr_device); diff --git a/src/machine/m_europc.c b/src/machine/m_europc.c index 7fc990a45..d85563241 100644 --- a/src/machine/m_europc.c +++ b/src/machine/m_europc.c @@ -625,7 +625,7 @@ europc_boot(UNUSED(const device_t *info)) mouse_bus_set_irq(sys->mouse, 2); /* Configure the port for (Bus Mouse Compatible) Mouse. */ b |= 0x01; - } else if (joystick_type) + } else if (joystick_type[0]) b |= 0x02; /* enable port as joysticks */ sys->nvr.regs[MRTC_CONF_C] = b; @@ -651,7 +651,7 @@ europc_boot(UNUSED(const device_t *info)) jim_read, NULL, NULL, jim_write, NULL, NULL, sys); /* Only after JIM has been initialized. */ - (void) device_add(&keyboard_xt_device); + (void) device_add(&kbc_xt_device); /* Enable and set up the FDC. */ (void) device_add(&fdc_xt_device); diff --git a/src/machine/m_ps1.c b/src/machine/m_ps1.c index c22463de4..c8973cbb1 100644 --- a/src/machine/m_ps1.c +++ b/src/machine/m_ps1.c @@ -82,6 +82,7 @@ typedef struct { uint8_t ps1_e0_regs[256]; serial_t *uart; + lpt_t *lpt; } ps1_t; static void @@ -135,7 +136,7 @@ ps1_write(uint16_t port, uint8_t val, void *priv) case 0x0102: if (!(ps->ps1_94 & 0x80)) { - lpt1_remove(); + lpt_port_remove(ps->lpt); serial_remove(ps->uart); if (val & 0x04) { if (val & 0x08) @@ -146,13 +147,13 @@ ps1_write(uint16_t port, uint8_t val, void *priv) if (val & 0x10) { switch ((val >> 5) & 3) { case 0: - lpt1_setup(LPT_MDA_ADDR); + lpt_port_setup(ps->lpt, LPT_MDA_ADDR); break; case 1: - lpt1_setup(LPT1_ADDR); + lpt_port_setup(ps->lpt, LPT1_ADDR); break; case 2: - lpt1_setup(LPT2_ADDR); + lpt_port_setup(ps->lpt, LPT2_ADDR); break; default: @@ -314,9 +315,9 @@ ps1_setup(int model) ps1_read, NULL, NULL, ps1_write, NULL, NULL, ps); ps->uart = device_add_inst(&ns16450_device, 1); - - lpt1_remove(); - lpt1_setup(LPT_MDA_ADDR); + ps->lpt = device_add_inst(&lpt_port_device, 1); + lpt_port_remove(ps->lpt); + lpt_port_setup(ps->lpt, LPT_MDA_ADDR); mem_remap_top(384); @@ -345,7 +346,7 @@ ps1_setup(int model) 0xfc0000, 0x40000, 0x3ffff, 0, MEM_MAPPING_EXTERNAL); } - lpt2_remove(); + lpt_set_next_inst(255); device_add(&ps1snd_device); @@ -394,13 +395,22 @@ ps1_common_init(const machine_t *model) dma16_init(); pic2_init(); - device_add(&keyboard_ps2_ps1_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&port_6x_device); /* Audio uses ports 200h and 202-207h, so only initialize gameport on 201h. */ standalone_gameport_type = &gameport_201_device; } +uint8_t +machine_ps1_p1_handler(void) +{ + const uint8_t current_drive = fdc_get_current_drive(); + + /* (B0 or F0) | (fdd_is_525(current_drive) on bit 6) */ + return 0xb0 | (fdd_is_525(current_drive) ? 0x40 : 0x00); +} + int machine_ps1_m2011_init(const machine_t *model) { diff --git a/src/machine/m_ps2_isa.c b/src/machine/m_ps2_isa.c index 8a2760f15..d768975d5 100644 --- a/src/machine/m_ps2_isa.c +++ b/src/machine/m_ps2_isa.c @@ -39,6 +39,7 @@ typedef struct { ps2_190; serial_t *uart; + lpt_t *lpt; } ps2_isa_t; static void @@ -53,7 +54,7 @@ ps2_write(uint16_t port, uint8_t val, void *priv) case 0x0102: if (!(ps2->ps2_94 & 0x80)) { - lpt1_remove(); + lpt_port_remove(ps2->lpt); serial_remove(ps2->uart); if (val & 0x04) { if (val & 0x08) @@ -64,13 +65,13 @@ ps2_write(uint16_t port, uint8_t val, void *priv) if (val & 0x10) { switch ((val >> 5) & 3) { case 0: - lpt1_setup(LPT_MDA_ADDR); + lpt_port_setup(ps2->lpt, LPT_MDA_ADDR); break; case 1: - lpt1_setup(LPT1_ADDR); + lpt_port_setup(ps2->lpt, LPT1_ADDR); break; case 2: - lpt1_setup(LPT2_ADDR); + lpt_port_setup(ps2->lpt, LPT2_ADDR); break; default: @@ -166,8 +167,11 @@ ps2_isa_setup(int model, int cpu_type) ps2->uart = device_add_inst(&ns16450_device, 1); - lpt1_remove(); - lpt1_setup(LPT_MDA_ADDR); + ps2->lpt = device_add_inst(&lpt_port_device, 1); + lpt_set_ext(ps2->lpt, 1); + + lpt_port_remove(ps2->lpt); + lpt_port_setup(ps2->lpt, LPT_MDA_ADDR); device_add(&port_92_device); @@ -197,7 +201,7 @@ ps2_isa_common_init(const machine_t *model) dma16_init(); pic2_init(); - device_add(&keyboard_ps2_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&port_6x_ps2_device); } diff --git a/src/machine/m_ps2_mca.c b/src/machine/m_ps2_mca.c index d3f881b24..e8be93038 100644 --- a/src/machine/m_ps2_mca.c +++ b/src/machine/m_ps2_mca.c @@ -105,6 +105,7 @@ static struct ps2_t { int pending_cache_miss; serial_t *uart; + lpt_t *lpt; vga_t* mb_vga; int has_e0000_hole; @@ -477,7 +478,7 @@ model_50_write(uint16_t port, uint8_t val) { switch (port) { case 0x102: - lpt1_remove(); + lpt_port_remove(ps2.lpt); serial_remove(ps2.uart); if (val & 0x04) { if (val & 0x08) @@ -488,13 +489,13 @@ model_50_write(uint16_t port, uint8_t val) if (val & 0x10) { switch ((val >> 5) & 3) { case 0: - lpt1_setup(LPT_MDA_ADDR); + lpt_port_setup(ps2.lpt, LPT_MDA_ADDR); break; case 1: - lpt1_setup(LPT1_ADDR); + lpt_port_setup(ps2.lpt, LPT1_ADDR); break; case 2: - lpt1_setup(LPT2_ADDR); + lpt_port_setup(ps2.lpt, LPT2_ADDR); break; default: @@ -609,7 +610,7 @@ model_55sx_write(uint16_t port, uint8_t val) { switch (port) { case 0x102: - lpt1_remove(); + lpt_port_remove(ps2.lpt); serial_remove(ps2.uart); if (val & 0x04) { if (val & 0x08) @@ -620,13 +621,13 @@ model_55sx_write(uint16_t port, uint8_t val) if (val & 0x10) { switch ((val >> 5) & 3) { case 0: - lpt1_setup(LPT_MDA_ADDR); + lpt_port_setup(ps2.lpt, LPT_MDA_ADDR); break; case 1: - lpt1_setup(LPT1_ADDR); + lpt_port_setup(ps2.lpt, LPT1_ADDR); break; case 2: - lpt1_setup(LPT2_ADDR); + lpt_port_setup(ps2.lpt, LPT2_ADDR); break; default: @@ -668,7 +669,7 @@ model_70_type3_write(uint16_t port, uint8_t val) { switch (port) { case 0x102: - lpt1_remove(); + lpt_port_remove(ps2.lpt); serial_remove(ps2.uart); if (val & 0x04) { if (val & 0x08) @@ -679,13 +680,13 @@ model_70_type3_write(uint16_t port, uint8_t val) if (val & 0x10) { switch ((val >> 5) & 3) { case 0: - lpt1_setup(LPT_MDA_ADDR); + lpt_port_setup(ps2.lpt, LPT_MDA_ADDR); break; case 1: - lpt1_setup(LPT1_ADDR); + lpt_port_setup(ps2.lpt, LPT1_ADDR); break; case 2: - lpt1_setup(LPT2_ADDR); + lpt_port_setup(ps2.lpt, LPT2_ADDR); break; default: @@ -722,7 +723,7 @@ model_80_write(uint16_t port, uint8_t val) { switch (port) { case 0x102: - lpt1_remove(); + lpt_port_remove(ps2.lpt); serial_remove(ps2.uart); if (val & 0x04) { if (val & 0x08) @@ -733,13 +734,13 @@ model_80_write(uint16_t port, uint8_t val) if (val & 0x10) { switch ((val >> 5) & 3) { case 0: - lpt1_setup(LPT_MDA_ADDR); + lpt_port_setup(ps2.lpt, LPT_MDA_ADDR); break; case 1: - lpt1_setup(LPT1_ADDR); + lpt_port_setup(ps2.lpt, LPT1_ADDR); break; case 2: - lpt1_setup(LPT2_ADDR); + lpt_port_setup(ps2.lpt, LPT2_ADDR); break; default: @@ -775,7 +776,7 @@ ps55_model_50tv_write(uint16_t port, uint8_t val) ps2_mca_log(" Write SysBrd %04X %02X %04X:%04X\n", port, val, cs >> 4, cpu_state.pc); switch (port) { case 0x102: - lpt1_remove(); + lpt_port_remove(ps2.lpt); serial_remove(ps2.uart); if (val & 0x04) { if (val & 0x08) @@ -786,13 +787,13 @@ ps55_model_50tv_write(uint16_t port, uint8_t val) if (val & 0x10) { switch ((val >> 5) & 3) { case 0: - lpt1_setup(LPT_MDA_ADDR); + lpt_port_setup(ps2.lpt, LPT_MDA_ADDR); break; case 1: - lpt1_setup(LPT1_ADDR); + lpt_port_setup(ps2.lpt, LPT1_ADDR); break; case 2: - lpt1_setup(LPT2_ADDR); + lpt_port_setup(ps2.lpt, LPT2_ADDR); break; default: break; @@ -1032,7 +1033,7 @@ ps2_mca_board_common_init(void) ps2.setup = 0xff; - lpt1_setup(LPT_MDA_ADDR); + lpt_port_setup(ps2.lpt, LPT_MDA_ADDR); } static uint8_t @@ -1159,7 +1160,6 @@ ps2_mca_board_model_50_init(void) mem_remap_top(384); mca_init(4); - device_add(&keyboard_ps2_mca_2_device); ps2.planar_read = model_50_read; ps2.planar_write = model_50_write; @@ -1180,7 +1180,6 @@ ps2_mca_board_model_60_init(void) mem_remap_top(384); mca_init(8); - device_add(&keyboard_ps2_mca_2_device); ps2.planar_read = model_50_read; ps2.planar_write = model_50_write; @@ -1240,7 +1239,6 @@ ps2_mca_board_model_55sx_init(int has_sec_nvram, int slots) } mca_init(slots); - device_add(&keyboard_ps2_mca_1_device); if (has_sec_nvram) device_add(&ps2_nvr_55ls_device); @@ -1419,7 +1417,6 @@ ps2_mca_board_model_70_type34_init(int is_type4, int slots) ps2.split_addr = mem_size * 1024; mca_init(slots); - device_add(&keyboard_ps2_mca_1_device); ps2.planar_read = model_70_type3_read; ps2.planar_write = model_70_type3_write; @@ -1512,7 +1509,6 @@ ps2_mca_board_model_80_type2_init(void) ps2.split_addr = mem_size * 1024; mca_init(8); - device_add(&keyboard_ps2_mca_1_device); ps2.planar_read = model_80_read; ps2.planar_write = model_80_write; @@ -1601,6 +1597,9 @@ machine_ps2_common_init(const machine_t *model) ps2.uart = device_add_inst(&ns16550_device, 1); + ps2.lpt = device_add_inst(&lpt_port_device, 1); + lpt_set_ext(ps2.lpt, 1); + ps2.has_e0000_hole = 0; } @@ -1624,6 +1623,8 @@ machine_ps2_model_50_init(const machine_t *model) ps2.planar_id = 0xfbff; ps2_mca_board_model_50_init(); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + return ret; } @@ -1647,6 +1648,8 @@ machine_ps2_model_60_init(const machine_t *model) ps2.planar_id = 0xf7ff; ps2_mca_board_model_60_init(); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + return ret; } @@ -1667,6 +1670,8 @@ machine_ps2_model_55sx_init(const machine_t *model) ps2.planar_id = 0xfbff; ps2_mca_board_model_55sx_init(0, 4); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + return ret; } @@ -1687,6 +1692,8 @@ machine_ps2_model_65sx_init(const machine_t *model) ps2.planar_id = 0xe3ff; ps2_mca_board_model_55sx_init(1, 8); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + return ret; } @@ -1707,6 +1714,8 @@ machine_ps2_model_70_type3_init(const machine_t *model) ps2.planar_id = 0xf9ff; ps2_mca_board_model_70_type34_init(0, 4); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + return ret; } @@ -1727,6 +1736,8 @@ machine_ps2_model_80_init(const machine_t *model) ps2.planar_id = 0xfdff; ps2_mca_board_model_80_type2_init(); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + return ret; } @@ -1747,6 +1758,8 @@ machine_ps2_model_80_axx_init(const machine_t *model) ps2.planar_id = 0xfff9; ps2_mca_board_model_70_type34_init(0, 8); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + return ret; } @@ -1767,6 +1780,8 @@ machine_ps2_model_70_type4_init(const machine_t *model) ps2.planar_id = 0xf9ff; ps2_mca_board_model_70_type34_init(1, 4); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + return ret; } @@ -1778,7 +1793,6 @@ ps55_mca_board_model_50t_init(void) ps2.split_addr = mem_size * 1024; /* The slot 5 is reserved for the Integrated Fixed Disk II (an internal ESDI hard drive). */ mca_init(5); - device_add(&keyboard_ps2_mca_1_device); ps2.planar_read = ps55_model_50t_read; ps2.planar_write = ps55_model_50tv_write; @@ -1822,7 +1836,6 @@ ps55_mca_board_model_50v_init(void) ps2.split_addr = mem_size * 1024; /* The slot 5 is reserved for the Integrated Fixed Disk II (an internal ESDI hard drive). */ mca_init(5); - device_add(&keyboard_ps2_mca_1_device); ps2.planar_read = ps55_model_50v_read; ps2.planar_write = ps55_model_50tv_write; @@ -1874,7 +1887,7 @@ ps55_mca_board_model_50v_init(void) } int -machine_ps55_model_50t_init(const machine_t* model) +machine_ps55_model_50t_init(const machine_t *model) { int ret; @@ -1899,11 +1912,13 @@ machine_ps55_model_50t_init(const machine_t* model) ps2.planar_id = 0xffee; ps55_mca_board_model_50t_init(); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + return ret; } int -machine_ps55_model_50v_init(const machine_t* model) +machine_ps55_model_50v_init(const machine_t *model) { int ret; @@ -1924,5 +1939,7 @@ machine_ps55_model_50v_init(const machine_t* model) ps2.planar_id = 0xf1ff; ps55_mca_board_model_50v_init(); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + return ret; } diff --git a/src/machine/m_tandy.c b/src/machine/m_tandy.c index 69200febe..1c7061d8a 100644 --- a/src/machine/m_tandy.c +++ b/src/machine/m_tandy.c @@ -945,7 +945,7 @@ machine_tandy1k_init(const machine_t *model, int type) MEM_MAPPING_INTERNAL, dev); mem_mapping_set_addr(&ram_low_mapping, 0, dev->base); - device_add(&keyboard_tandy_device); + device_add(&kbc_tandy_device); if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_xt_tandy_device); @@ -995,7 +995,7 @@ machine_tandy1k_init(const machine_t *model, int type) break; } - standalone_gameport_type = &gameport_device; + standalone_gameport_type = &gameport_200_device; eep_data_out = 0x0000; } diff --git a/src/machine/m_v86p.c b/src/machine/m_v86p.c index f152383d1..fbe7296f8 100644 --- a/src/machine/m_v86p.c +++ b/src/machine/m_v86p.c @@ -86,7 +86,7 @@ machine_v86p_init(const machine_t *model) device_add(&ct_82c100_device); device_add(&f82c606_device); - device_add(&keyboard_xt_device); + device_add(&kbc_xt_device); if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_xt_device); diff --git a/src/machine/m_xt.c b/src/machine/m_xt.c index c94549463..954483d62 100644 --- a/src/machine/m_xt.c +++ b/src/machine/m_xt.c @@ -6,18 +6,16 @@ * * This file is part of the 86Box distribution. * - * Standard PC/AT implementation. + * Implementation of PC and XT machines. * - * - * - * Authors: Fred N. van Kempen, + * Authors: Sarah Walker, * Miran Grca, - * Sarah Walker, + * Fred N. van Kempen, * Jasmine Iwanek, * - * Copyright 2017-2020 Fred N. van Kempen. - * Copyright 2016-2020 Miran Grca. - * Copyright 2008-2020 Sarah Walker. + * Copyright 2008-2025 Sarah Walker. + * Copyright 2016-2025 Miran Grca. + * Copyright 2017-2025 Fred N. van Kempen. * Copyright 2025 Jasmine Iwanek. */ #include @@ -33,8 +31,11 @@ #include <86box/fdd.h> #include <86box/fdc.h> #include <86box/fdc_ext.h> +#include <86box/lpt.h> #include <86box/hdc.h> #include <86box/gameport.h> +#include <86box/serial.h> +#include <86box/sio.h> #include <86box/ibm_5161.h> #include <86box/keyboard.h> #include <86box/rom.h> @@ -46,6 +47,7 @@ extern const device_t vendex_xt_rtc_onboard_device; +/* 8088 */ static void machine_xt_common_init(const machine_t *model, int fixed_floppy) { @@ -57,7 +59,7 @@ machine_xt_common_init(const machine_t *model, int fixed_floppy) pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); nmi_init(); - standalone_gameport_type = &gameport_device; + standalone_gameport_type = &gameport_200_device; } static const device_config_t ibmpc_config[] = { @@ -76,11 +78,11 @@ static const device_config_t ibmpc_config[] = { { .name = "5700051 (04/24/81)", .internal_name = "ibm5150_5700051", .bios_type = BIOS_NORMAL, .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/ibmpc/BIOS_IBM5150_24APR81_5700051_U33.BIN", "" } }, - // GlaBIOS for IBM PC - { .name = "GlaBIOS 0.2.5 (8088)", .internal_name = "glabios_025_8088", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/glabios/GLABIOS_0.2.5_8P.ROM", "" } }, - { .name = "GlaBIOS 0.2.5 (V20)", .internal_name = "glabios_025_v20", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/glabios/GLABIOS_0.2.5_VP.ROM", "" } }, + // GLaBIOS for IBM PC + { .name = "GLaBIOS 0.4.0 (8088)", .internal_name = "glabios_040_8088", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/glabios/GLABIOS_0.4.0_8P.ROM", "" } }, + { .name = "GLaBIOS 0.4.0 (V20)", .internal_name = "glabios_040_v20", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/glabios/GLABIOS_0.4.0_VP.ROM", "" } }, // The following are Diagnostic ROMs. { .name = "Supersoft Diagnostics", .internal_name = "diag_supersoft", .bios_type = BIOS_NORMAL, @@ -123,7 +125,7 @@ const device_t ibmpc_device = { }; int -machine_pc_init(const machine_t *model) +machine_ibmpc_init(const machine_t *model) { int ret = 0; int ret2; @@ -160,7 +162,7 @@ machine_pc_init(const machine_t *model) if (bios_only || !ret) return ret; - device_add(&keyboard_pc_device); + device_add(&kbc_pc_device); machine_xt_common_init(model, 0); @@ -186,11 +188,11 @@ static const device_config_t ibmpc82_config[] = { { .name = "5000024 (08/16/82)", .internal_name = "ibm5150_5000024", .bios_type = BIOS_NORMAL, .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/ibmpc82/BIOS_5150_16AUG82_5000024_U33.BIN", "" } }, - // GlaBIOS for IBM PC - { .name = "GlaBIOS 0.2.5 (8088)", .internal_name = "glabios_025_8088", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/glabios/GLABIOS_0.2.5_8P.ROM", "" } }, - { .name = "GlaBIOS 0.2.5 (V20)", .internal_name = "glabios_025_v20", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/glabios/GLABIOS_0.2.5_VP.ROM", "" } }, + // GLaBIOS for IBM PC + { .name = "GLaBIOS 0.4.0 (8088)", .internal_name = "glabios_040_8088", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/glabios/GLABIOS_0.4.0_8P.ROM", "" } }, + { .name = "GLaBIOS 0.4.0 (V20)", .internal_name = "glabios_040_v20", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/glabios/GLABIOS_0.4.0_VP.ROM", "" } }, // The following are Diagnostic ROMs. { .name = "Supersoft Diagnostics", .internal_name = "diag_supersoft", .bios_type = BIOS_NORMAL, @@ -233,7 +235,7 @@ const device_t ibmpc82_device = { }; int -machine_pc82_init(const machine_t *model) +machine_ibmpc82_init(const machine_t *model) { int ret = 0; int ret2; @@ -270,7 +272,7 @@ machine_pc82_init(const machine_t *model) if (bios_only || !ret) return ret; - device_add(&keyboard_pc82_device); + device_add(&kbc_pc82_device); machine_xt_common_init(model, 0); @@ -319,24 +321,24 @@ static const device_config_t ibmxt_config[] = { .files = { "roms/machines/ibmxt/BIOS_5160_16AUG82_U18_5000026.BIN", "roms/machines/ibmxt/BIOS_5160_16AUG82_U19_5000027.BIN", "" } }, - // GlaBIOS for IBM XT + // GLaBIOS for IBM XT { - .name = "GlaBIOS 0.2.5 (8088)", - .internal_name = "glabios_025_8088", + .name = "GLaBIOS 0.4.0 (8088)", + .internal_name = "glabios_040_8088", .bios_type = BIOS_NORMAL, .files_no = 2, .local = 1, .size = 40960, - .files = { "roms/machines/glabios/GLABIOS_0.2.5_8X.ROM", "roms/machines/ibmxt/BIOS_5160_08NOV82_U19_5000027.BIN", "" } + .files = { "roms/machines/glabios/GLABIOS_0.4.0_8X.ROM", "roms/machines/ibmxt/BIOS_5160_08NOV82_U19_5000027.BIN", "" } }, { - .name = "GlaBIOS 0.2.5 (V20)", - .internal_name = "glabios_025_v20", + .name = "GLaBIOS 0.4.0 (V20)", + .internal_name = "glabios_040_v20", .bios_type = BIOS_NORMAL, .files_no = 2, .local = 1, .size = 40960, - .files = { "roms/machines/glabios/GLABIOS_0.2.5_VX.ROM", "roms/machines/ibmxt/BIOS_5160_08NOV82_U19_5000027.BIN", "" } + .files = { "roms/machines/glabios/GLABIOS_0.4.0_VX.ROM", "roms/machines/ibmxt/BIOS_5160_08NOV82_U19_5000027.BIN", "" } }, // The following are Diagnostic ROMs. @@ -401,7 +403,7 @@ const device_t ibmxt_device = { }; int -machine_xt_init(const machine_t *model) +machine_ibmxt_init(const machine_t *model) { int ret = 0; uint8_t enable_5161; @@ -441,7 +443,7 @@ machine_xt_init(const machine_t *model) if (bios_only || !ret) return ret; - device_add(&keyboard_xt_device); + device_add(&kbc_xt_device); machine_xt_common_init(model, 0); @@ -451,24 +453,6 @@ machine_xt_init(const machine_t *model) return ret; } -int -machine_genxt_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/genxt/pcxt.rom", - 0x000fe000, 8192, 0); - - if (bios_only || !ret) - return ret; - - device_add(&keyboard_xt_device); - - machine_xt_common_init(model, 0); - - return ret; -} - static const device_config_t ibmxt86_config[] = { // clang-format off { @@ -508,24 +492,24 @@ static const device_config_t ibmxt86_config[] = { .files = { "roms/machines/ibmxt86/BIOS_5160_10JAN86_U18_62X0852_27256_F800.BIN", "roms/machines/ibmxt86/BIOS_5160_10JAN86_U19_62X0853_27256_F000.BIN", "" } }, - // GlaBIOS for IBM XT + // GLaBIOS for IBM XT { - .name = "GlaBIOS 0.2.5 (8088)", - .internal_name = "glabios_025_8088", + .name = "GLaBIOS 0.4.0 (8088)", + .internal_name = "glabios_040_8088", .bios_type = BIOS_NORMAL, .files_no = 2, .local = 1, .size = 65536, - .files = { "roms/machines/glabios/GLABIOS_0.2.5_8X.ROM", "roms/machines/ibmxt86/BIOS_5160_09MAY86_U19_62X0819_68X4370_27256_F000.BIN", "" } + .files = { "roms/machines/glabios/GLABIOS_0.4.0_8X.ROM", "roms/machines/ibmxt86/BIOS_5160_09MAY86_U19_62X0819_68X4370_27256_F000.BIN", "" } }, { - .name = "GlaBIOS 0.2.5 (V20)", - .internal_name = "glabios_025_v20", + .name = "GLaBIOS 0.4.0 (V20)", + .internal_name = "glabios_040_v20", .bios_type = BIOS_NORMAL, .files_no = 2, .local = 1, .size = 65536, - .files = { "roms/machines/glabios/GLABIOS_0.2.5_VX.ROM", "roms/machines/ibmxt86/BIOS_5160_09MAY86_U19_62X0819_68X4370_27256_F000.BIN", "" } + .files = { "roms/machines/glabios/GLABIOS_0.4.0_VX.ROM", "roms/machines/ibmxt86/BIOS_5160_09MAY86_U19_62X0819_68X4370_27256_F000.BIN", "" } }, // The following are Diagnostic ROMs. @@ -585,7 +569,7 @@ const device_t ibmxt86_device = { }; int -machine_xt86_init(const machine_t *model) +machine_ibmxt86_init(const machine_t *model) { int ret = 0; uint8_t enable_5161; @@ -619,7 +603,7 @@ machine_xt86_init(const machine_t *model) if (bios_only || !ret) return ret; - device_add(&keyboard_xt86_device); + device_add(&kbc_xt86_device); machine_xt_common_init(model, 0); @@ -632,7 +616,7 @@ machine_xt86_init(const machine_t *model) static void machine_xt_clone_init(const machine_t *model, int fixed_floppy) { - device_add(&keyboard_xtclone_device); + device_add(&kbc_xtclone_device); machine_xt_common_init(model, fixed_floppy); } @@ -669,39 +653,14 @@ machine_xt_amixt_init(const machine_t *model) return ret; } -int -machine_xt_tuliptc8_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/tuliptc8/tulip-bios_xt_compact_2.bin", - 0x000fc000, 16384, 0); - - if (bios_only || !ret) - return ret; - - device_add(&keyboard_xt_fe2010_device); - - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); - - machine_common_init(model); - - pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - - nmi_init(); - standalone_gameport_type = &gameport_device; - - device_add(&amstrad_megapc_nvr_device); - - return ret; -} - -// TODO -// Onboard EGA Graphics (NSI Logic EVC315-S on early boards STMicroelectronics EGA on later revisions) -// RTC -// Adaptec ACB-2072 RLL Controller Card (Optional) -// Atari PCM1 Mouse Support +/* + TODO: + - Onboard EGA Graphics (NSI Logic EVC315-S on early boards + STMicroelectronics EGA on later revisions); + - RTC; + - Adaptec ACB-2072 RLL Controller Card (Optional); + - Atari PCM1 Mouse Support. + */ int machine_xt_ataripc3_init(const machine_t *model) { @@ -723,11 +682,11 @@ machine_xt_ataripc3_init(const machine_t *model) } int -machine_xt_znic_init(const machine_t *model) +machine_xt_bw230_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/znic/ibmzen.rom", + ret = bios_load_linear("roms/machines/bw230/bondwell.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -738,6 +697,53 @@ machine_xt_znic_init(const machine_t *model) return ret; } +int +machine_xt_mpc1600_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/mpc1600/mpc4.34_merged.bin", + 0x000fc000, 16384, 0); + + if (bios_only || !ret) + return ret; + + device_add(&kbc_pc82_device); + + machine_xt_common_init(model, 0); + + return ret; +} + +int +machine_xt_compaq_portable_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/portable/compaq portable plus 100666-001 rev c u47.bin", + 0x000fe000, 8192, 0); + + if (bios_only || !ret) + return ret; + + machine_common_init(model); + + pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); + + device_add(&kbc_xt_compaq_device); + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_xt_device); + nmi_init(); + if (joystick_type[0]) + device_add(&gameport_200_device); + + lpt_t *lpt = device_add_inst(&lpt_port_device, 1); + lpt_port_setup(lpt, LPT_MDA_ADDR); + lpt_set_3bc_used(1); + + return ret; +} + int machine_xt_dtk_init(const machine_t *model) { @@ -754,6 +760,124 @@ machine_xt_dtk_init(const machine_t *model) return ret; } +int +machine_xt_pcspirit_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pcspirit/u1101.bin", + 0x000fe000, 16384, 0); + + if (ret) { + bios_load_aux_linear("roms/machines/pcspirit/u1103.bin", + 0x000fc000, 8192, 0); + } + + if (bios_only || !ret) + return ret; + + device_add(&kbc_pc82_device); + + machine_xt_common_init(model, 0); + + return ret; +} + +int +machine_genxt_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/genxt/pcxt.rom", + 0x000fe000, 8192, 0); + + if (bios_only || !ret) + return ret; + + device_add(&kbc_xt_device); + + machine_xt_common_init(model, 0); + + return ret; +} + +int +machine_xt_glabios_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/glabios/GLABIOS_0.4.0_8X.ROM", + 0x000fe000, 8192, 0); + + if (bios_only || !ret) + return ret; + + device_add(&kbc_xt_device); + + machine_xt_common_init(model, 0); + + return ret; +} + +int +machine_xt_top88_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/top88/Hyosung Topstar 88T - BIOS version 3.0.bin", + 0x000fc000, 16384, 0); + + if (bios_only || !ret) + return ret; + + /* On-board FDC cannot be disabled */ + machine_xt_clone_init(model, 1); + + return ret; +} + +static void +machine_xt_hyundai_common_init(const machine_t *model, int fixed_floppy) +{ + device_add(&kbc_xt_hyundai_device); + + machine_xt_common_init(model, fixed_floppy); +} + +int +machine_xt_super16t_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/super16t/Hyundai SUPER-16T - System BIOS HEA v1.12Ta (16k)(MBM27128)(1986).BIN", + 0x000fc000, 16384, 0); + + if (bios_only || !ret) + return ret; + + /* On-board FDC cannot be disabled */ + machine_xt_hyundai_common_init(model, 1); + + return ret; +} + +int +machine_xt_super16te_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/super16te/Hyundai SUPER-16TE - System BIOS v2.00Id (16k)(D27128A)(1989).BIN", + 0x000fc000, 16384, 0); + + if (bios_only || !ret) + return ret; + + /* On-board FDC cannot be disabled */ + machine_xt_hyundai_common_init(model, 1); + + return ret; +} + static const device_config_t jukopc_config[] = { // clang-format off { @@ -767,11 +891,11 @@ static const device_config_t jukopc_config[] = { .bios = { { .name = "Bios 2.30", .internal_name = "jukost", .bios_type = BIOS_NORMAL, .files_no = 1, .local = 0, .size = 8192, .files = { "roms/machines/jukopc/000o001.bin", "" } }, - // GlaBIOS for Juko ST - { .name = "GlaBIOS 0.2.5 (8088)", .internal_name = "glabios_025_8088", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 8192, .files = { "roms/machines/glabios/GLABIOS_0.2.5_8S_2.ROM", "" } }, - { .name = "GlaBIOS 0.2.5 (V20)", .internal_name = "glabios_025_v20", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 8192, .files = { "roms/machines/glabios/GLABIOS_0.2.5_VS_2.ROM", "" } }, + // GLaBIOS for Juko ST + { .name = "GLaBIOS 0.4.0 (8088)", .internal_name = "glabios_040_8088", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 8192, .files = { "roms/machines/glabios/GLABIOS_0.4.0_8S.ROM", "" } }, + { .name = "GLaBIOS 0.4.0 (V20)", .internal_name = "glabios_040_v20", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 8192, .files = { "roms/machines/glabios/GLABIOS_0.4.0_VS.ROM", "" } }, { .files_no = 0 } }, }, @@ -816,6 +940,92 @@ machine_xt_jukopc_init(const machine_t *model) return ret; } +int +machine_xt_kaypropc_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/kaypropc/Kaypro_v2.03K.bin", + 0x000fe000, 8192, 0); + + if (bios_only || !ret) + return ret; + + machine_xt_clone_init(model, 0); + + return ret; +} + +int +machine_xt_micoms_xl7turbo_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/mxl7t/XL7_TURBO.BIN", + 0x000fe000, 8192, 0); + + if (bios_only || !ret) + return ret; + + device_add(&kbc_xt_device); + + machine_xt_common_init(model, 0); + + return ret; +} + +int +machine_xt_pc500_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pc500/rom404.bin", + 0x000f8000, 32768, 0); + + if (bios_only || !ret) + return ret; + + device_add(&kbc_pc_device); + + machine_xt_common_init(model, 0); + + return ret; +} + +int +machine_xt_pc700_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pc700/multitech pc-700 3.1.bin", + 0x000fe000, 8192, 0); + + if (bios_only || !ret) + return ret; + + device_add(&kbc_pc_device); + + machine_xt_common_init(model, 0); + + return ret; +} + +int +machine_xt_pc4i_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pc4i/NCR_PC4i_BIOSROM_1985.BIN", + 0x000fc000, 16384, 0); + + if (bios_only || !ret) + return ret; + + machine_xt_clone_init(model, 0); + + return ret; +} + int machine_xt_openxt_init(const machine_t *model) { @@ -832,22 +1042,39 @@ machine_xt_openxt_init(const machine_t *model) return ret; } +static void +machine_xt_philips_common_init(const machine_t *model) +{ + machine_common_init(model); + + pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); + + nmi_init(); + + standalone_gameport_type = &gameport_200_device; + + device_add(&kbc_pc_device); + + device_add(&philips_device); + + device_add(&xta_hd20_device); +} + int -machine_xt_pcxt_init(const machine_t *model) +machine_xt_p3105_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/pcxt/u18.rom", - 0x000f8000, 65536, 0); - if (ret) { - bios_load_aux_linear("roms/machines/pcxt/u19.rom", - 0x000f0000, 32768, 0); - } + ret = bios_load_linear("roms/machines/p3105/philipsnms9100.bin", + 0x000fc000, 16384, 0); if (bios_only || !ret) return ret; - machine_xt_clone_init(model, 0); + machine_xt_philips_common_init(model); + + /* On-board FDC cannot be disabled */ + device_add(&fdc_xt_device); return ret; } @@ -863,59 +1090,13 @@ machine_xt_pxxt_init(const machine_t *model) if (bios_only || !ret) return ret; - device_add(&keyboard_xt_device); + device_add(&kbc_xt_device); machine_xt_common_init(model, 0); return ret; } -int -machine_xt_iskra3104_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/iskra3104/198.bin", - "roms/machines/iskra3104/199.bin", - 0x000fc000, 16384, 0); - - if (bios_only || !ret) - return ret; - - machine_xt_clone_init(model, 0); - - return ret; -} - -int -machine_xt_maz1016_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/maz1016/e1.bin", - "roms/machines/maz1016/e4.bin", - 0x000fc000, 49152, 0); - - if (ret) { - bios_load_aux_interleaved("roms/machines/maz1016/e2.bin", - "roms/machines/maz1016/e5.bin", - 0x000f8000, 16384, 0); - - bios_load_aux_interleaved("roms/machines/maz1016/e3.bin", - "roms/machines/maz1016/e6b.bin", - 0x000f4000, 16384, 0); - } - - if (bios_only || !ret) - return ret; - - loadfont("roms/machines/maz1016/crt-8.bin", 0); - - machine_xt_clone_init(model, 0); - - return ret; -} - int machine_xt_pravetz16_imko4_init(const machine_t *model) { @@ -943,7 +1124,7 @@ machine_xt_pravetz16_imko4_init(const machine_t *model) if (bios_only || !ret) return ret; - device_add(&keyboard_pravetz_device); + device_add(&kbc_pravetz_device); machine_xt_common_init(model, 0); @@ -961,7 +1142,7 @@ machine_xt_pravetz16s_cpu12p_init(const machine_t *model) if (bios_only || !ret) return ret; - device_add(&keyboard_xt_device); + device_add(&kbc_xt_device); machine_xt_common_init(model, 0); @@ -969,29 +1150,11 @@ machine_xt_pravetz16s_cpu12p_init(const machine_t *model) } int -machine_xt_micoms_xl7turbo_init(const machine_t *model) +machine_xt_pb8810_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/mxl7t/XL7_TURBO.BIN", - 0x000fe000, 8192, 0); - - if (bios_only || !ret) - return ret; - - device_add(&keyboard_xt_device); - - machine_xt_common_init(model, 0); - - return ret; -} - -int -machine_xt_pc4i_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pc4i/NCR_PC4i_BIOSROM_1985.BIN", + ret = bios_load_linear("roms/machines/pb8810/pb8088-8810-633acc631aba0345517682.bin", 0x000fc000, 16384, 0); if (bios_only || !ret) @@ -1003,78 +1166,38 @@ machine_xt_pc4i_init(const machine_t *model) } int -machine_xt_mpc1600_init(const machine_t *model) +machine_xt_sansx16_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/mpc1600/mpc4.34_merged.bin", + ret = bios_load_linear("roms/machines/sansx16/tmm27128ad.bin.bin", 0x000fc000, 16384, 0); if (bios_only || !ret) return ret; - device_add(&keyboard_pc82_device); - - machine_xt_common_init(model, 0); + /* On-board FDC cannot be disabled */ + machine_xt_clone_init(model, 1); return ret; } int -machine_xt_pcspirit_init(const machine_t *model) +machine_xt_pcxt_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/pcspirit/u1101.bin", - 0x000fe000, 16384, 0); - + ret = bios_load_linear("roms/machines/pcxt/u18.rom", + 0x000f8000, 65536, 0); if (ret) { - bios_load_aux_linear("roms/machines/pcspirit/u1103.bin", - 0x000fc000, 8192, 0); + bios_load_aux_linear("roms/machines/pcxt/u19.rom", + 0x000f0000, 32768, 0); } if (bios_only || !ret) return ret; - device_add(&keyboard_pc82_device); - - machine_xt_common_init(model, 0); - - return ret; -} - -int -machine_xt_pc700_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pc700/multitech pc-700 3.1.bin", - 0x000fe000, 8192, 0); - - if (bios_only || !ret) - return ret; - - device_add(&keyboard_pc_device); - - machine_xt_common_init(model, 0); - - return ret; -} - -int -machine_xt_pc500_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pc500/rom404.bin", - 0x000f8000, 32768, 0); - - if (bios_only || !ret) - return ret; - - device_add(&keyboard_pc_device); - - machine_xt_common_init(model, 0); + machine_xt_clone_init(model, 0); return ret; } @@ -1092,11 +1215,11 @@ static const device_config_t vendex_config[] = { .bios = { { .name = "Bios 2.03C", .internal_name = "vendex", .bios_type = BIOS_NORMAL, .files_no = 1, .local = 0, .size = 16384, .files = { "roms/machines/vendex/Vendex Turbo 888 XT - ROM BIOS - VER 2.03C.bin", "" } }, - // GlaBIOS for Juko ST - { .name = "GlaBIOS 0.2.5 (8088)", .internal_name = "glabios_025_8088", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 16384, .files = { "roms/machines/glabios/GLABIOS_0.2.5_8TV.ROM", "" } }, - { .name = "GlaBIOS 0.2.5 (V20)", .internal_name = "glabios_025_v20", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 16384, .files = { "roms/machines/glabios/GLABIOS_0.2.5_VTV.ROM", "" } }, + // GLaBIOS for Vendex + { .name = "GLaBIOS 0.4.0 (8088)", .internal_name = "glabios_040_8088", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 16384, .files = { "roms/machines/glabios/GLABIOS_0.4.0_8TV.ROM", "" } }, + { .name = "GLaBIOS 0.4.0 (V20)", .internal_name = "glabios_040_v20", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 16384, .files = { "roms/machines/glabios/GLABIOS_0.4.0_VTV.ROM", "" } }, { .files_no = 0 } }, }, @@ -1144,70 +1267,45 @@ machine_xt_vendex_init(const machine_t *model) } static void -machine_xt_hyundai_common_init(const machine_t *model, int fixed_floppy) +machine_xt_laserxt_common_init(const machine_t *model,int is_lxt3) { - device_add(&keyboard_xt_hyundai_device); + machine_common_init(model); - machine_xt_common_init(model, fixed_floppy); + pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_xt_device); + + nmi_init(); + standalone_gameport_type = &gameport_200_device; + + device_add(is_lxt3 ? &lxt3_device : &laserxt_device); + + device_add(&kbc_xt_lxt3_device); } int -machine_xt_super16t_init(const machine_t *model) +machine_xt_laserxt_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/super16t/Hyundai SUPER-16T - System BIOS HEA v1.12Ta (16k)(MBM27128)(1986).BIN", - 0x000fc000, 16384, 0); + ret = bios_load_linear("roms/machines/ltxt/27c64.bin", + 0x000fe000, 8192, 0); if (bios_only || !ret) return ret; - /* On-board FDC cannot be disabled */ - machine_xt_hyundai_common_init(model, 1); + machine_xt_laserxt_common_init(model, 0); return ret; } int -machine_xt_super16te_init(const machine_t *model) +machine_xt_znic_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/super16te/Hyundai SUPER-16TE - System BIOS v2.00Id (16k)(D27128A)(1989).BIN", - 0x000fc000, 16384, 0); - - if (bios_only || !ret) - return ret; - - /* On-board FDC cannot be disabled */ - machine_xt_hyundai_common_init(model, 1); - - return ret; -} - -int -machine_xt_top88_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/top88/Hyosung Topstar 88T - BIOS version 3.0.bin", - 0x000fc000, 16384, 0); - - if (bios_only || !ret) - return ret; - - /* On-board FDC cannot be disabled */ - machine_xt_clone_init(model, 1); - - return ret; -} - -int -machine_xt_kaypropc_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/kaypropc/Kaypro_v2.03K.bin", + ret = bios_load_linear("roms/machines/znic/ibmzen.rom", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -1218,39 +1316,129 @@ machine_xt_kaypropc_init(const machine_t *model) return ret; } +static void +machine_zenith_common_init(const machine_t *model) +{ + machine_common_init(model); + + device_add(&zenith_scratchpad_device); + + pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); + + device_add(&kbc_xt_zenith_device); + + nmi_init(); +} + int -machine_xt_sansx16_init(const machine_t *model) +machine_xt_z151_init(const machine_t *model) { int ret; - - ret = bios_load_linear("roms/machines/sansx16/tmm27128ad.bin.bin", - 0x000fc000, 16384, 0); + ret = bios_load_linear("roms/machines/zdsz151/444-229-18.bin", + 0x000fc000, 32768, 0); + if (ret) { + bios_load_aux_linear("roms/machines/zdsz151/444-260-18.bin", + 0x000f8000, 16384, 0); + } if (bios_only || !ret) return ret; - /* On-board FDC cannot be disabled */ - machine_xt_clone_init(model, 1); + machine_zenith_common_init(model); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_xt_tandy_device); return ret; } +/* + * Current bugs and limitations: + * - Memory board support for EMS currently missing + */ int -machine_xt_bw230_init(const machine_t *model) +machine_xt_z159_init(const machine_t *model) { - int ret; + lpt_t *lpt = NULL; + int ret; - ret = bios_load_linear("roms/machines/bw230/bondwell.bin", - 0x000fe000, 8192, 0); + ret = bios_load_linear("roms/machines/zdsz159/z159m v2.9e.10d", + 0x000f8000, 32768, 0); if (bios_only || !ret) return ret; - machine_xt_clone_init(model, 0); + machine_zenith_common_init(model); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_xt_tandy_device); + + /* parallel port is on the memory board */ + lpt = device_add_inst(&lpt_port_device, 1); + lpt_port_remove(lpt); + lpt_port_setup(lpt, LPT2_ADDR); + lpt_set_next_inst(255); return ret; } +/* + * Current bugs and limitations: + * - missing NVRAM implementation + */ +int +machine_xt_z184_init(const machine_t *model) +{ + lpt_t *lpt = NULL; + int ret; + + ret = bios_load_linear("roms/machines/zdsupers/z184m v3.1d.10d", + 0x000f8000, 32768, 0); + + if (bios_only || !ret) + return ret; + + machine_zenith_common_init(model); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_xt_device); + + lpt = device_add_inst(&lpt_port_device, 1); + lpt_port_remove(lpt); + lpt_port_setup(lpt, LPT2_ADDR); + lpt_set_next_inst(255); + + device_add(&ns8250_device); + /* So that serial_standalone_init() won't do anything. */ + serial_set_next_inst(SERIAL_MAX - 1); + + device_add(&cga_device); + + return ret; +} + +/* GC100A */ +int +machine_xt_p3120_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/p3120/philips_p3120.bin", + 0x000f8000, 32768, 0); + + if (bios_only || !ret) + return ret; + + machine_xt_philips_common_init(model); + + device_add(&gc100a_device); + + device_add(&fdc_at_device); + + return ret; +} + +/* V20 */ int machine_xt_v20xt_init(const machine_t *model) { @@ -1268,35 +1456,143 @@ machine_xt_v20xt_init(const machine_t *model) } int -machine_xt_pb8810_init(const machine_t *model) +machine_xt_tuliptc8_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/pb8810/pb8088-8810-633acc631aba0345517682.bin", + ret = bios_load_linear("roms/machines/tuliptc8/tulip-bios_xt_compact_2.bin", 0x000fc000, 16384, 0); if (bios_only || !ret) return ret; + device_add(&kbc_xt_fe2010_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + machine_common_init(model); + + pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); + + nmi_init(); + standalone_gameport_type = &gameport_200_device; + + device_add(&amstrad_megapc_nvr_device); + + return ret; +} + +/* 8086 */ +int +machine_xt_compaq_deskpro_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/deskpro/Compaq - BIOS - Revision J - 106265-002.bin", + 0x000fe000, 8192, 0); + + if (bios_only || !ret) + return ret; + + machine_common_init(model); + + pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); + + device_add(&kbc_xt_compaq_device); + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_xt_device); + nmi_init(); + standalone_gameport_type = &gameport_200_device; + + lpt_t *lpt = device_add_inst(&lpt_port_device, 1); + lpt_port_setup(lpt, LPT_MDA_ADDR); + lpt_set_3bc_used(1); + + return ret; +} + +int +machine_xt_pc5086_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pc5086/sys_rom.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_common_init(model); + + device_add(&ct_82c100_device); + device_add(&f82c710_pc5086_device); + + device_add(&kbc_xt_device); + + device_add(&amstrad_megapc_nvr_device); /* NVR that is initialized to all 0x00's. */ + + return ret; +} + +int +machine_xt_maz1016_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/maz1016/e1.bin", + "roms/machines/maz1016/e4.bin", + 0x000fc000, 49152, 0); + + if (ret) { + bios_load_aux_interleaved("roms/machines/maz1016/e2.bin", + "roms/machines/maz1016/e5.bin", + 0x000f8000, 16384, 0); + + bios_load_aux_interleaved("roms/machines/maz1016/e3.bin", + "roms/machines/maz1016/e6b.bin", + 0x000f4000, 16384, 0); + } + + if (bios_only || !ret) + return ret; + + loadfont("roms/machines/maz1016/crt-8.bin", 0); + + machine_xt_clone_init(model, 0); + + return ret; +} + +int +machine_xt_iskra3104_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/iskra3104/198.bin", + "roms/machines/iskra3104/199.bin", + 0x000fc000, 16384, 0); + + if (bios_only || !ret) + return ret; + machine_xt_clone_init(model, 0); return ret; } int -machine_xt_glabios_init(const machine_t *model) +machine_xt_lxt3_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/glabios/GLABIOS_0.2.6_8X_012324.ROM", + ret = bios_load_linear("roms/machines/lxt3/27c64d.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) return ret; - device_add(&keyboard_xt_device); - - machine_xt_common_init(model, 0); + machine_xt_laserxt_common_init(model, 1); return ret; } diff --git a/src/machine/m_xt_compaq.c b/src/machine/m_xt_compaq.c deleted file mode 100644 index f8c0b6a19..000000000 --- a/src/machine/m_xt_compaq.c +++ /dev/null @@ -1,93 +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. - * - * Emulation of various Compaq XT-class PC's. - * - * - * - * Authors: Sarah Walker, - * Miran Grca, - * TheCollector1995, - * - * Copyright 2008-2019 Sarah Walker. - * Copyright 2016-2019 Miran Grca. - */ -#include -#include -#include -#include -#include <86box/86box.h> -#include "cpu.h" -#include <86box/nmi.h> -#include <86box/timer.h> -#include <86box/pit.h> -#include <86box/mem.h> -#include <86box/rom.h> -#include <86box/device.h> -#include <86box/fdd.h> -#include <86box/fdc.h> -#include <86box/fdc_ext.h> -#include <86box/gameport.h> -#include <86box/keyboard.h> -#include <86box/lpt.h> -#include <86box/machine.h> - -int -machine_xt_compaq_deskpro_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/deskpro/Compaq - BIOS - Revision J - 106265-002.bin", - 0x000fe000, 8192, 0); - - if (bios_only || !ret) - return ret; - - machine_common_init(model); - - pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - - device_add(&keyboard_xt_compaq_device); - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_xt_device); - nmi_init(); - standalone_gameport_type = &gameport_device; - - lpt1_remove(); - lpt1_setup(LPT_MDA_ADDR); - - return ret; -} - -int -machine_xt_compaq_portable_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/portable/compaq portable plus 100666-001 rev c u47.bin", - 0x000fe000, 8192, 0); - - if (bios_only || !ret) - return ret; - - machine_common_init(model); - - pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - - device_add(&keyboard_xt_compaq_device); - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_xt_device); - nmi_init(); - if (joystick_type) - device_add(&gameport_device); - - lpt1_remove(); - lpt1_setup(LPT_MDA_ADDR); - - return ret; -} diff --git a/src/machine/m_xt_olivetti.c b/src/machine/m_xt_olivetti.c index 8e37dce1f..079cd4555 100644 --- a/src/machine/m_xt_olivetti.c +++ b/src/machine/m_xt_olivetti.c @@ -39,6 +39,7 @@ #include <86box/nmi.h> #include <86box/mem.h> #include <86box/device.h> +#include <86box/lpt.h> #include <86box/nvr.h> #include <86box/keyboard.h> #include <86box/mouse.h> @@ -2325,7 +2326,7 @@ machine_xt_m24_init(const machine_t *model) /* Address 66-67 = mainboard dip-switch settings */ io_sethandler(0x0065, 3, m24_read, NULL, NULL, NULL, NULL, NULL, NULL); - standalone_gameport_type = &gameport_device; + standalone_gameport_type = &gameport_200_device; nmi_init(); @@ -2396,8 +2397,8 @@ machine_xt_m240_init(const machine_t *model) if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); /* io.c logs clearly show it using port 3F7 */ - if (joystick_type) - device_add(&gameport_device); + if (joystick_type[0]) + device_add(&gameport_200_device); nmi_init(); @@ -2451,7 +2452,7 @@ machine_xt_m19_init(const machine_t *model) m19_vid_init(vid); device_add_ex(&m19_vid_device, vid); - device_add(&keyboard_xt_olivetti_device); + device_add(&kbc_xt_olivetti_device); pit_set_clock((uint32_t) 14318184.0); diff --git a/src/machine/m_xt_t1000.c b/src/machine/m_xt_t1000.c index 5a787292f..080a03d19 100644 --- a/src/machine/m_xt_t1000.c +++ b/src/machine/m_xt_t1000.c @@ -899,7 +899,7 @@ machine_xt_t1000_init(const machine_t *model) machine_common_init(model); pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - device_add(&keyboard_xt_t1x00_device); + device_add(&kbc_xt_t1x00_device); t1000.fdc = device_add(&fdc_xt_device); nmi_init(); @@ -957,7 +957,7 @@ machine_xt_t1200_init(const machine_t *model) NULL, MEM_MAPPING_EXTERNAL, &t1000); pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - device_add(&keyboard_xt_t1x00_device); + device_add(&kbc_xt_t1x00_device); t1000.fdc = device_add(&fdc_xt_t1x00_device); nmi_init(); diff --git a/src/machine/m_xt_xi8088.c b/src/machine/m_xt_xi8088.c index 886c1be6e..756432405 100644 --- a/src/machine/m_xt_xi8088.c +++ b/src/machine/m_xt_xi8088.c @@ -110,11 +110,11 @@ static const device_config_t xi8088_config[] = { .type = CONFIG_SELECTION, .selection = { { - .description = "64 kB starting from F0000", + .description = "64 KB starting from F0000", .value = 0 }, { - .description = "128 kB starting from E0000 (address MSB inverted, last 64KB first)", + .description = "128 KB starting from E0000 (address MSB inverted, last 64 KB first)", .value = 1 } }, @@ -204,12 +204,12 @@ machine_xt_xi8088_init(const machine_t *model) if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); - device_add(&keyboard_ps2_xi8088_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&port_6x_xi8088_device); nmi_init(); device_add(&ibmat_nvr_device); pic2_init(); - standalone_gameport_type = &gameport_device; + standalone_gameport_type = &gameport_200_device; device_add(&sst_flash_39sf010_device); return ret; diff --git a/src/machine/machine.c b/src/machine/machine.c index 66bffdbd2..50b0bb150 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -98,8 +98,6 @@ machine_init_ex(int m) mem_reset(); smbase = is_am486dxl ? 0x00060000 : 0x00030000; - lpt_init(); - if (cassette_enable) device_add(&cassette_device); @@ -141,6 +139,10 @@ void machine_init(void) { bios_only = 0; + + machine_set_p1_default(machines[machine].kbc_p1); + machine_set_ps2(); + (void) machine_init_ex(machine); } diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 86b75dc39..2b4b1f4b7 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -25,54 +25,19 @@ #include <86box/mem.h> #include <86box/rom.h> #include <86box/device.h> -#include <86box/machine.h> +#include <86box/chipset.h> #include <86box/timer.h> #include <86box/fdd.h> #include <86box/fdc.h> #include <86box/keyboard.h> +#include <86box/sio.h> #include <86box/sound.h> #include <86box/video.h> +#include <86box/vid_cga.h> #include <86box/plat_unused.h> #include <86box/thread.h> #include <86box/network.h> - -// Temporarily here till we move everything out into the right files -extern const device_t pcjr_device; -extern const device_t m19_vid_device; -extern const device_t tandy_1000_video_device; -extern const device_t tandy_1000hx_video_device; -extern const device_t tandy_1000sl_video_device; - -extern const device_t t1000_video_device; -extern const device_t xi8088_device; -extern const device_t cga_device; -extern const device_t vid_1512_device; -extern const device_t vid_1640_device; -extern const device_t vid_pc2086_device; -extern const device_t vid_pc3086_device; -extern const device_t vid_200_device; -extern const device_t vid_ppc512_device; -extern const device_t t1200_video_device; -extern const device_t compaq_plasma_device; -extern const device_t ps1_2011_device; -extern const device_t ibmpc_device; -extern const device_t ibmpc82_device; -extern const device_t ibmxt_device; -extern const device_t ibmxt86_device; -extern const device_t ibmat_device; -extern const device_t ibmxt286_device; -extern const device_t pb450_device; -extern const device_t jukopc_device; -extern const device_t vendex_device; -extern const device_t c5sbm2_device; -extern const device_t sb486pv_device; -extern const device_t ap5s_device; -extern const device_t d842_device; -extern const device_t d943_device; -extern const device_t dells333sl_device; -extern const device_t hot433a_device; -extern const device_t pbl300sx_device; -extern const device_t v12p_device; +#include <86box/machine.h> const machine_filter_t machine_types[] = { { "None", MACHINE_TYPE_NONE }, @@ -80,6 +45,7 @@ const machine_filter_t machine_types[] = { { "[1978] 8086", MACHINE_TYPE_8086 }, { "[1982] 80286", MACHINE_TYPE_286 }, { "[1988] i386SX", MACHINE_TYPE_386SX }, + { "[1988] ALi M6117", MACHINE_TYPE_M6117 }, { "[1992] 486SLC", MACHINE_TYPE_486SLC }, { "[1985] i386DX", MACHINE_TYPE_386DX }, { "[1989] i386DX/i486", MACHINE_TYPE_386DX_486 }, @@ -89,6 +55,7 @@ const machine_filter_t machine_types[] = { { "[1994] i486 (Socket 3 PCI)", MACHINE_TYPE_486_S3_PCI }, { "[1992] i486 (Miscellaneous)", MACHINE_TYPE_486_MISC }, { "[1993] Socket 4", MACHINE_TYPE_SOCKET4 }, + { "[1994] Socket 4/5", MACHINE_TYPE_SOCKET4_5 }, { "[1994] Socket 5", MACHINE_TYPE_SOCKET5 }, { "[1995] Socket 7 (Single Voltage)", MACHINE_TYPE_SOCKET7_3V }, { "[1996] Socket 7 (Dual Voltage)", MACHINE_TYPE_SOCKET7 }, @@ -155,6 +122,7 @@ const machine_filter_t machine_chipsets[] = { { "OPTi 493", MACHINE_CHIPSET_OPTI_493 }, { "OPTi 495SLC", MACHINE_CHIPSET_OPTI_495SLC }, { "OPTi 495SX", MACHINE_CHIPSET_OPTI_495SX }, + { "OPTi 496", MACHINE_CHIPSET_OPTI_496 }, { "OPTi 498", MACHINE_CHIPSET_OPTI_498 }, { "OPTi 499", MACHINE_CHIPSET_OPTI_499 }, { "OPTi 895/802G", MACHINE_CHIPSET_OPTI_895_802G }, @@ -198,10 +166,7 @@ const machine_filter_t machine_chipsets[] = { { "WD76C10", MACHINE_CHIPSET_WD76C10 } }; -/* Machines to add before machine freeze: - - TMC Mycomp PCI54ST; - - 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 @@ -216,16 +181,6 @@ const machine_filter_t machine_chipsets[] = { 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. - 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 @@ -241,7 +196,7 @@ const machine_t machines[] = { .internal_name = "ibmpc", .type = MACHINE_TYPE_8088, .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_pc_init, + .init = machine_ibmpc_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -264,11 +219,15 @@ const machine_t machines[] = { .step = 16 }, .nvrmask = 0, - .kbc_device = &keyboard_pc_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_pc_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &ibmpc_device, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -280,7 +239,7 @@ const machine_t machines[] = { .internal_name = "ibmpc82", .type = MACHINE_TYPE_8088, .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_pc82_init, + .init = machine_ibmpc82_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -303,11 +262,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_pc82_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_pc82_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &ibmpc82_device, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -335,18 +298,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PCJR, - .flags = MACHINE_VIDEO_FIXED | MACHINE_CARTRIDGE, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_CARTRIDGE, .ram = { .min = 64, .max = 640, .step = 64 }, .nvrmask = 0, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, /* TODO: No specific kbd_device yet */ + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &pcjr_device, @@ -358,7 +325,7 @@ const machine_t machines[] = { .internal_name = "ibmxt", .type = MACHINE_TYPE_8088, .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_init, + .init = machine_ibmxt_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -381,11 +348,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xt_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &ibmxt_device, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -397,7 +368,7 @@ const machine_t machines[] = { .internal_name = "ibmxt86", .type = MACHINE_TYPE_8088, .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt86_init, + .init = machine_ibmxt86_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -420,11 +391,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xt86_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt86_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &ibmxt86_device, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -459,11 +434,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -498,11 +477,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -530,19 +513,23 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FDC, + .flags = MACHINE_FDC, /* Machine has internal video: NSI EVC315-S EGA */ .ram = { .min = 64, .max = 640, .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, - .fdc_device = NULL, //&fdc_xt_device, + .kbd_device = &keyboard_pc_xt_device, + .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, @@ -576,11 +563,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -615,11 +606,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_pc82_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_pc82_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -647,18 +642,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, + .flags = MACHINE_KEYBOARD, .ram = { .min = 128, .max = 640, .step = 128 }, .nvrmask = 0, - .kbc_device = &keyboard_xt_compaq_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_compaq_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -693,11 +692,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -732,11 +735,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_pc82_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_pc82_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -771,11 +778,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xt_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -810,11 +821,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xt_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -842,19 +857,23 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, + .flags = MACHINE_FDC, /* Machine has internal video: Paradise PVC2 */ .ram = { .min = 128, .max = 640, .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, - .fdc_device = NULL, + .kbd_device = &keyboard_pc_xt_device, + .fdc_device = &fdc_xt_device, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, @@ -881,19 +900,23 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, + .flags = MACHINE_FDC, .ram = { .min = 128, .max = 640, .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, - .fdc_device = NULL, + .kbd_device = &keyboard_pc_xt_device, + .fdc_device = &fdc_xt_device, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, @@ -920,19 +943,23 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, + .flags = MACHINE_FDC, .ram = { .min = 128, .max = 640, .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, - .fdc_device = NULL, + .kbd_device = &keyboard_pc_xt_device, + .fdc_device = &fdc_xt_device, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, @@ -966,11 +993,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &jukopc_device, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1005,11 +1036,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1017,7 +1052,7 @@ const machine_t machines[] = { .net_device = NULL }, { - .name = "[8088] Micoms XL-7 Turbo", + .name = "[8088] Micoms XL-7 Turbo/Pravetz-16ES", .internal_name = "mxl7t", .type = MACHINE_TYPE_8088, .chipset = MACHINE_CHIPSET_DISCRETE, @@ -1044,11 +1079,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xt_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1083,11 +1122,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_pc_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_pc_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1122,11 +1165,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_pc_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_pc_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1161,11 +1208,15 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1193,18 +1244,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO_FIXED, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD, .ram = { .min = 256, .max = 640, .step = 128 }, .nvrmask = 0, - .kbc_device = &keyboard_xt_olivetti_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_olivetti_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &m19_vid_device, @@ -1239,50 +1294,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - { - .name = "[8088] Packard Bell PB8810", - .internal_name = "pb8810", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_pb8810_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_8088, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 640, - .step = 128 - }, - .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1317,11 +1337,15 @@ const machine_t machines[] = { .step = 256 }, .nvrmask = 0, - .kbc_device = &keyboard_pc_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_pc_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1356,11 +1380,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1395,11 +1423,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_pravetz_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_pravetz_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1434,11 +1466,58 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 0, - .kbc_device = &keyboard_xt_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + { + .name = "[8088] Samsung SPC-3000V/Packard Bell PB500/PB8810", + .internal_name = "pb8810", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_pb8810_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_8088, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PC, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 640, + .step = 128 + }, + .nvrmask = 0, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1466,19 +1545,23 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, + .flags = MACHINE_FDC, .ram = { .min = 256, .max = 640, .step = 128 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, - .fdc_device = NULL, + .kbd_device = &keyboard_pc_xt_device, + .fdc_device = &fdc_xt_device, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, @@ -1505,18 +1588,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_XTA | MACHINE_MOUSE, + .flags = MACHINE_XTA | MACHINE_KEYBOARD | MACHINE_MOUSE, /* Machine has internal video: Paradise PVC4 */ .ram = { .min = 512, .max = 640, .step = 128 }, .nvrmask = 15, - .kbc_device = &keyboard_xt_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1551,11 +1638,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1583,18 +1674,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO_FIXED, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD, .ram = { .min = 384, .max = 640, .step = 128 }, .nvrmask = 0, - .kbc_device = &keyboard_tandy_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_tandy_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &tandy_1000_video_device, @@ -1622,18 +1717,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO_FIXED, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD, .ram = { .min = 256, .max = 640, .step = 128 }, .nvrmask = 0, - .kbc_device = &keyboard_tandy_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_tandy_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &tandy_1000hx_video_device, @@ -1661,18 +1760,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD, .ram = { .min = 512, .max = 1280, .step = 768 }, .nvrmask = 63, - .kbc_device = &keyboard_xt_t1x00_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_t1x00_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &t1000_video_device, @@ -1700,19 +1803,23 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, + .flags = MACHINE_FDC, .ram = { .min = 256, .max = 768, .step = 256 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &vendex_device, - .fdc_device = NULL, + .kbd_device = &keyboard_pc_xt_device, + .fdc_device = &fdc_xt_device, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, @@ -1746,11 +1853,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xt_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &laserxt_device, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1764,7 +1875,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_8088, .chipset = MACHINE_CHIPSET_DISCRETE, .init = machine_xt_xi8088_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -1786,11 +1897,14 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = &keyboard_ps2_xi8088_device, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_p1 = 0x00400cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &xi8088_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1825,11 +1939,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1864,11 +1982,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xt_zenith_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_zenith_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1903,11 +2025,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xt_zenith_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_zenith_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -1942,11 +2068,15 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 0, - .kbc_device = &keyboard_xt_zenith_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_zenith_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = &cga_device, @@ -1981,11 +2111,15 @@ const machine_t machines[] = { .step = 256 }, .nvrmask = 0, - .kbc_device = &keyboard_pc_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_pc_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -2020,11 +2154,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -2059,11 +2197,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 63, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -2093,18 +2235,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO_FIXED | MACHINE_MOUSE, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_MOUSE, .ram = { .min = 512, .max = 640, .step = 128 }, .nvrmask = 63, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL /* TODO: No specific kbd_device yet */, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &vid_1512_device, @@ -2132,18 +2278,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO | MACHINE_MOUSE, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MOUSE, .ram = { .min = 640, .max = 640, .step = 640 }, .nvrmask = 63, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL /* TODO: No specific kbd_device yet */, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &vid_1640_device, @@ -2171,18 +2321,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO_FIXED | MACHINE_MOUSE, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_MOUSE, .ram = { .min = 640, .max = 640, .step = 640 }, .nvrmask = 63, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL /* TODO: No specific kbd_device yet */, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &vid_pc2086_device, @@ -2210,18 +2364,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO_FIXED | MACHINE_MOUSE, + .flags = MACHINE_XTA | MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_MOUSE, .ram = { .min = 640, .max = 640, .step = 640 }, .nvrmask = 63, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL /* TODO: No specific kbd_device yet */, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &vid_pc3086_device, @@ -2249,24 +2407,71 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO | MACHINE_MOUSE, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MOUSE, .ram = { .min = 512, .max = 640, .step = 128 }, .nvrmask = 63, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL /* TODO: No specific kbd_device yet */, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &vid_200_device, .snd_device = NULL, .net_device = NULL }, + { + .name = "[8086] Amstrad PC5086", + .internal_name = "pc5086", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_xt_pc5086_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_8086, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PC | MACHINE_BUS_PS2, + .flags = MACHINE_XTA, + .ram = { + .min = 512, + .max = 640, + .step = 128 + }, + .nvrmask = 63, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &f82c710_pc5086_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, { .name = "[8086] Amstrad PPC512/640", .internal_name = "ppc512", @@ -2288,18 +2493,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO | MACHINE_MOUSE, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MOUSE, .ram = { .min = 512, .max = 640, .step = 128 }, .nvrmask = 63, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL /* TODO: No specific kbd_device yet */, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &vid_ppc512_device, @@ -2334,11 +2543,15 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 0, - .kbc_device = &keyboard_xt_compaq_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_compaq_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -2373,11 +2586,15 @@ const machine_t machines[] = { .step = 640 }, .nvrmask = 0x3f, - .kbc_device = &keyboard_xt_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -2412,11 +2629,14 @@ const machine_t machines[] = { .step = 384 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -2444,18 +2664,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO | MACHINE_MOUSE | MACHINE_MFM, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MOUSE | MACHINE_MFM, .ram = { .min = 128, .max = 640, .step = 128 }, .nvrmask = 15, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL /* TODO: No specific kbd_device yet */, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &ogc_m24_device, @@ -2484,18 +2708,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_MFM, + .flags = MACHINE_KEYBOARD | MACHINE_MFM, .ram = { .min = 128, .max = 640, .step = 128 }, .nvrmask = 15, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL /* TODO: No specific kbd_device yet */, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -2530,11 +2758,15 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 0, - .kbc_device = &keyboard_xtclone_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -2562,18 +2794,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO_FIXED, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD, .ram = { .min = 512, .max = 768, .step = 128 }, .nvrmask = 0, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL /* TODO: No specific kbd_device yet */, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &tandy_1000sl_video_device, @@ -2601,18 +2837,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO | MACHINE_MFM, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MFM, .ram = { .min = 1024, .max = 2048, .step = 1024 }, .nvrmask = 63, - .kbc_device = &keyboard_xt_t1x00_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_t1x00_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &t1200_video_device, @@ -2640,18 +2880,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO | MACHINE_MFM, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MFM, .ram = { .min = 512, .max = 1024, .step = 128 }, .nvrmask = 127, - .kbc_device = &keyboard_xt_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -2686,11 +2930,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 0, - .kbc_device = &keyboard_xt_lxt3_device, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_xt_lxt3_device, + .kbc_params = 0x00000000, .kbc_p1 = 0xff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &lxt3_device, + .kbd_device = &keyboard_pc_xt_device, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -2705,8 +2953,8 @@ const machine_t machines[] = { .internal_name = "ibmat", .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_ibm_init, - .p1_handler = NULL, + .init = machine_at_ibmat_init, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -2728,11 +2976,15 @@ const machine_t machines[] = { .step = 256 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &ibmat_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -2746,7 +2998,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_PROPRIETARY, .init = machine_ps1_m2011_init, - .p1_handler = NULL, + .p1_handler = machine_ps1_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -2768,11 +3020,15 @@ const machine_t machines[] = { .step = 512 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &ps1_2011_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -2786,7 +3042,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_PROPRIETARY, .init = machine_ps2_m30_286_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -2808,11 +3064,15 @@ const machine_t machines[] = { .step = 512 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -2826,7 +3086,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_DISCRETE, .init = machine_at_ibmxt286_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -2848,11 +3108,15 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &ibmxt286_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -2866,7 +3130,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_DISCRETE, .init = machine_at_ibmatami_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -2888,8 +3152,11 @@ const machine_t machines[] = { .step = 256 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, @@ -2905,9 +3172,9 @@ const machine_t machines[] = { .name = "[ISA] Commodore PC 30 III", .internal_name = "cmdpc30", .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_PROPRIETARY, + .chipset = MACHINE_CHIPSET_PROPRIETARY, /* Machine has chipset: Faraday FE3400B */ .init = machine_at_cmdpc_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -2929,11 +3196,15 @@ const machine_t machines[] = { .step = 64 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -2947,7 +3218,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_PROPRIETARY, .init = machine_at_portableii_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -2962,18 +3233,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, + .flags = MACHINE_KEYBOARD, .ram = { .min = 640, .max = 16384, .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -2987,7 +3262,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_PROPRIETARY, .init = machine_at_portableiii_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3002,24 +3277,71 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE | MACHINE_VIDEO, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_KEYBOARD, .ram = { .min = 640, .max = 16384, .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &compaq_plasma_device, .snd_device = NULL, .net_device = NULL }, + { + .name = "[ISA] GRiD GRiDcase 1520", + .internal_name = "grid1520", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_PROPRIETARY, /* Machine has chipset: Faraday FE3400B */ + .init = machine_at_grid1520_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 6000000, + .max_bus = 10000000, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_IDE /*| MACHINE_VIDEO_FIXED*/ | MACHINE_KEYBOARD, + .ram = { + .min = 1024, + .max = 8192, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Has IBM AT KBC firmware. */ { .name = "[ISA] MR BIOS 286 clone", @@ -3027,7 +3349,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_DISCRETE, .init = machine_at_mr286_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3049,11 +3371,15 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -3067,7 +3393,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_DISCRETE, .init = machine_at_pc8_init, - .p1_handler = NULL, + .p1_handler = machine_ncr_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3089,51 +3415,15 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has Chips & Technologies KBC firmware. */ - { - .name = "[ISA] Wells American A*Star", - .internal_name = "wellamerastar", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_wellamerastar_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_286, - .block = CPU_BLOCK_NONE, - .min_bus = 6000000, - .max_bus = 14000000, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 512, - .max = 1024, - .step = 512 - }, - .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_NCR, + .kbc_p1 = 0x000004df, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -3145,9 +3435,9 @@ const machine_t machines[] = { .name = "[ISA] Olivetti M290/AT&T 6286 WGS", .internal_name = "m290", .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_PROPRIETARY, + .chipset = MACHINE_CHIPSET_PROPRIETARY, /* Yes, it's M290 with 98/86 gate array, not M290-30 with VLSI TOPCAT chipset. */ .init = machine_at_m290_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3169,11 +3459,15 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_OLIVETTI, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -3187,7 +3481,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_DISCRETE, .init = machine_at_ibmatpx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3209,11 +3503,15 @@ const machine_t machines[] = { .step = 256 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -3227,7 +3525,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_DISCRETE, .init = machine_at_ibmatquadtel_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3249,11 +3547,15 @@ const machine_t machines[] = { .step = 256 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_QUADTEL, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -3268,7 +3570,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_DISCRETE, .init = machine_at_pb286_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3290,11 +3592,104 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has unknown KBC firmware. */ + { + .name = "[ISA] Sanyo MBC-17PLUS", + .internal_name = "mbc17", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_mbc17_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 12000000, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_IDE, + .ram = { + .min = 512, + .max = 16384, + .step = 128 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has unknown KBC firmware. */ + { + .name = "[ISA] Sharp AX286D", + .internal_name = "ax286", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_ax286_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_IDE, + .ram = { + .min = 512, + .max = 16384, + .step = 128 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + /* The version number is a guess - we have no probe of this machine's controller. */ + .kbc_params = KBC_VEN_PHOENIX | 0x00010500, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -3308,7 +3703,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_DISCRETE, .init = machine_at_siemens_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3330,11 +3725,15 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_SIEMENS, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -3348,7 +3747,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_PROPRIETARY, .init = machine_at_t3100e_init, - .p1_handler = NULL, + .p1_handler = machine_t3100e_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3363,57 +3762,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE | MACHINE_VIDEO_FIXED, + .flags = MACHINE_IDE | MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD, .ram = { .min = 1024, .max = 5120, .step = 256 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - { - .name = "[ISA] GRiD GRiDcase 1520", - .internal_name = "grid1520", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_at_grid1520_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_286, - .block = CPU_BLOCK_NONE, - .min_bus = 6000000, - .max_bus = 10000000, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE /*| MACHINE_VIDEO_FIXED*/, - .ram = { - .min = 1024, - .max = 8192, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_TOSHIBA, + .kbc_p1 = 0x0000bfff, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -3428,7 +3792,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_CT_AT, .init = machine_at_dells200_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3450,252 +3814,15 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* No proper pictures of the KBC exist, though it seems to have the IBM AT KBC - firmware. */ - { - .name = "[C&T PC/AT] PC's Limited (Dell) 28608L/AT122", - .internal_name = "at122", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_CT_AT, - .init = machine_at_at122_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_286, - .block = CPU_BLOCK_NONE, - .min_bus = 6000000, - .max_bus = 12000000, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 640, - .max = 16384, - .step = 128 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* No proper pictures of the KBC exist, though it seems to have the IBM AT KBC - firmware. */ - { - .name = "[C&T PC/AT] Tulip AT Compact", - .internal_name = "tuliptc7", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_CT_AT, - .init = machine_at_tuliptc7_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_286, - .block = CPU_BLOCK_NONE, - .min_bus = 6000000, - .max_bus = 12000000, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 640, - .max = 16384, - .step = 128 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has Quadtel KBC firmware. */ - { - .name = "[GC103] Quadtel 286 clone", - .internal_name = "quadt286", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_GC103, - .init = machine_at_quadt286_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_286, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_SOFTFLOAT_ONLY, - .ram = { - .min = 512, - .max = 16384, - .step = 128 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Most likely has AMI 'F' KBC firmware. */ - { - .name = "[GC103] TriGem 286M", - .internal_name = "tg286m", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_GC103, - .init = machine_at_tg286m_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_286, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE, - .ram = { - .min = 512, - .max = 8192, - .step = 128 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - { - .name = "[NEAT] Atari PC 4", - .internal_name = "ataripc4", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_NEAT, - .init = machine_at_ataripc4_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_286, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_FDC, - .ram = { - .min = 512, - .max = 8192, - .step = 128 - }, - .nvrmask = 127, - .kbc_device = &keyboard_at_ami_device, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, //&fdc_at_device, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* This has "AMI KEYBOARD BIOS", most likely 'F'. */ - { - .name = "[NEAT] DataExpert 286", - .internal_name = "ami286", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_NEAT, - .init = machine_at_neat_ami_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_286, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 512, - .max = 8192, - .step = 128 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -3709,7 +3836,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_NEAT, .init = machine_at_super286c_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3731,8 +3858,11 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AWARD | 0x00424600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, @@ -3742,14 +3872,148 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Has IBM AT KBC firmware. */ + /* No proper pictures of the KBC exist, though it seems to have the IBM AT KBC + firmware. */ { - .name = "[NEAT] NCR 3302", - .internal_name = "3302", + .name = "[C&T PC/AT] PC's Limited (Dell) 28608L/AT122", + .internal_name = "at122", .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_NEAT, - .init = machine_at_3302_init, - .p1_handler = NULL, + .chipset = MACHINE_CHIPSET_CT_AT, + .init = machine_at_at122_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 6000000, + .max_bus = 12000000, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 640, + .max = 16384, + .step = 128 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* No proper pictures of the KBC exist, though it seems to have the IBM AT KBC + firmware. */ + { + .name = "[C&T PC/AT] Tulip AT Compact", + .internal_name = "tuliptc7", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_CT_AT, + .init = machine_at_tuliptc7_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 6000000, + .max_bus = 12000000, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 640, + .max = 16384, + .step = 128 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has Chips & Technologies KBC firmware. */ + { + .name = "[C&T PC/AT] Wells American A*Star", + .internal_name = "wellamerastar", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_CT_AT, + .init = machine_at_wellamerastar_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 6000000, + .max_bus = 14000000, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 512, + .max = 1024, + .step = 512 + }, + .nvrmask = 63, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_CHIPS | 0x0000a600, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has Quadtel KBC firmware. */ + { + .name = "[GC103] Quadtel 286 clone", + .internal_name = "quadt286", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_GC103, + .init = machine_at_quadt286_init, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3764,32 +4028,124 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE | MACHINE_VIDEO, + .flags = MACHINE_SOFTFLOAT_ONLY, .ram = { .min = 512, - .max = 5120, + .max = 16384, .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_QUADTEL, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, - .vid_device = ¶dise_pvga1a_ncr3302_device, + .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has IBM AT KBC firmware. */ + /* Has AMI 'B' KBC firmware. */ { - .name = "[NEAT] Arche AMA-2010", - .internal_name = "px286", + .name = "[GC103] TriGem 286M", + .internal_name = "tg286m", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_GC103, + .init = machine_at_tg286m_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_IDE, + .ram = { + .min = 512, + .max = 8192, + .step = 128 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004200, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Most likely has Chips & Technologies KBC firmware. */ + { + .name = "[NEAT] Atari PC 4", + .internal_name = "ataripc4", .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_NEAT, - .init = machine_at_px286_init, - .p1_handler = NULL, + .init = machine_at_ataripc4_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_FDC, /* Machine has video: Paradise PVGA1A */ + .ram = { + .min = 512, + .max = 8192, + .step = 128 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_CHIPS | 0x0000a600, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* This has an AMIKey-2, which is 'H'. */ + { + .name = "[NEAT] DataExpert 286", + .internal_name = "ami286", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_NEAT, + .init = machine_at_neat_ami_init, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3811,11 +4167,191 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has NCR KBC firmware. */ + { + .name = "[NEAT] NCR 3302", + .internal_name = "3302", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_NEAT, + .init = machine_at_3302_init, + .p1_handler = machine_ncr_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_IDE | MACHINE_VIDEO, + .ram = { + .min = 512, + .max = 5120, + .step = 128 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_NCR, + .kbc_p1 = 0x000004df, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = ¶dise_pvga1a_ncr3302_device, + .snd_device = NULL, + .net_device = NULL + }, + /* Has Phoenix MultiKey/42 KBC firmware. */ + { + .name = "[NEAT] Arche AMA-2010", + .internal_name = "px286", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_NEAT, + .init = machine_at_px286_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 512, + .max = 8192, + .step = 128 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + /* The version number is a guess - we have no probe of this machine's controller. */ + .kbc_params = KBC_VEN_PHOENIX | 0x00010500, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has the VLSI 82C113 with on-chip KBC. */ + { + .name = "[SCAMP] Amstrad PC7286", + .internal_name = "pc7286", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_VLSI_SCAMP, + .init = machine_at_pc7286_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2, + .flags = MACHINE_IDE | MACHINE_VIDEO, + .ram = { + .min = 1024, + .max = 32768, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has unknown KBC firmware. */ + { + .name = "[SCAT] Amstrad PC5286", + .internal_name = "pc5286", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_SCAT, + .init = machine_at_pc5286_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT | MACHINE_BUS_PS2, + .flags = MACHINE_IDE, + .ram = { + .min = 512, + .max = 16384, + .step = 128 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &f82c710_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -3829,7 +4365,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_SCAT, .init = machine_at_gw286ct_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3851,25 +4387,31 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_CHIPS | 0x0000a600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &f82c710_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has IBM PS/2 Type 1 KBC firmware. */ + /* Has IBM PS/2 Type 1 KBC firmware - that's actually a guess since we + do not currently have a picture of the motherboard. + In the code, we actually give it the AMI PS/2 controller. */ { .name = "[SCAT] Goldstar GDC-212M", .internal_name = "gdc212m", .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_SCAT, .init = machine_at_gdc212m_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3891,11 +4433,15 @@ const machine_t machines[] = { .step = 512 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -3909,7 +4455,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_SCAT, .init = machine_at_award286_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3926,16 +4472,20 @@ const machine_t machines[] = { .bus_flags = MACHINE_AT, .flags = MACHINE_IDE, .ram = { - .min = 512, + .min = 640, .max = 8192, .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -3949,7 +4499,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_SCAT, .init = machine_at_super286tr_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -3966,16 +4516,20 @@ const machine_t machines[] = { .bus_flags = MACHINE_AT, .flags = MACHINE_FLAGS_NONE, .ram = { - .min = 512, + .min = 640, .max = 8192, .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -3988,7 +4542,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_SCAT, .init = machine_at_drsm35286_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4003,32 +4557,81 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO, + .flags = MACHINE_IDE | MACHINE_VIDEO, /* Machine has Super I/O: C&T F82C711 */ .ram = { .min = 512, .max = 5120, .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5401_onboard_device, .snd_device = NULL, .net_device = NULL }, - /* Has IBM PS/2 Type 1 KBC firmware. */ + /* Has IBM AT KBC firmware. */ + { + .name = "[SCAT] Samsung Deskmaster 286", + .internal_name = "deskmaster286", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_SCAT, + .init = machine_at_deskmaster286_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2, + .flags = MACHINE_IDE, /* Has internal video: C&T VGA 411 */ + .ram = { + .min = 512, + .max = 8192, + .step = 128 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has a Samsung (SEC) V1.4 KBC firmware. */ + /* TODO: Do kbc_at.c logging to see if the BIOS sends any proprietary commands. */ { .name = "[SCAT] Samsung SPC-4200P", .internal_name = "spc4200p", .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_SCAT, .init = machine_at_spc4200p_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4050,25 +4653,29 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has IBM PS/2 Type 1 KBC firmware. */ + /* Most likely has a Samsung (SEC) V1.4 KBC firmware like the SPC-4200P above. */ { .name = "[SCAT] Samsung SPC-4216P", .internal_name = "spc4216p", .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_SCAT, .init = machine_at_spc4216p_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4090,25 +4697,29 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has IBM PS/2 Type 1 KBC firmware. */ + /* Most likely has a Samsung (SEC) V1.4 KBC firmware like the SPC-4200P above. */ { .name = "[SCAT] Samsung SPC-4620P", .internal_name = "spc4620p", .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_SCAT, .init = machine_at_spc4620p_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4130,65 +4741,29 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has IBM AT KBC firmware. */ - { - .name = "[SCAT] Samsung Deskmaster 286", - .internal_name = "deskmaster286", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_SCAT, - .init = machine_at_deskmaster286_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_286, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE, /* Has internal video: C&T VGA 411 */ - .ram = { - .min = 512, - .max = 8192, - .step = 128 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - + /* Has AMI '8' KBC firmware. */ { .name = "[SCAT] Senor Science Co. SCAT-286-003", .internal_name = "senorscat286", .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_SCAT, .init = machine_at_senor_scat286_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4210,11 +4785,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00003800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -4229,7 +4808,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_PROPRIETARY, .init = machine_ps2_model_50_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4251,11 +4830,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_IBM | KBC_FLAG_IS_TYPE2, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -4269,7 +4852,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_PROPRIETARY, .init = machine_ps2_model_60_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4291,11 +4874,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_IBM | KBC_FLAG_IS_TYPE2, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -4312,7 +4899,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_PROPRIETARY, .init = machine_ps1_m2121_init, - .p1_handler = NULL, + .p1_handler = machine_ps1_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4334,8 +4921,11 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, @@ -4345,14 +4935,14 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Has IBM AT KBC firmware. */ + /* Has NCR KBC firmware. */ { .name = "[ISA] NCR PC916SX", .internal_name = "pc916sx", .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_DISCRETE, + .chipset = MACHINE_CHIPSET_DISCRETE, /* Machine has chipset: TI TACT82000 */ .init = machine_at_pc916sx_init, - .p1_handler = NULL, + .p1_handler = machine_ncr_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4374,11 +4964,15 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_NCR, + .kbc_p1 = 0x000004df, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -4390,9 +4984,9 @@ const machine_t machines[] = { .name = "[ISA] QTC-SXM KT X20T02/HI", .internal_name = "quadt386sx", .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_DISCRETE, + .chipset = MACHINE_CHIPSET_DISCRETE, /* Machine has chipset: VLSI TOPCAT */ .init = machine_at_quadt386sx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4414,11 +5008,15 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_QUADTEL, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -4432,7 +5030,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_ACC_2036, .init = machine_at_pbl300sx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4454,25 +5052,30 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + /* The version number is a guess - we have no probe of this machine's controller. */ + .kbc_params = KBC_VEN_PHOENIX | 0x00010500, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &pbl300sx_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &oti037_pbl300sx_device, .snd_device = NULL, .net_device = NULL }, - /* This has an AMIKey-2, which is an updated version of type 'H'. */ + /* This has a Holtek keyboard controller which clones AMI 'H'. */ { .name = "[ALi M1217] Acrosser AR-B1374", .internal_name = "arb1374", .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_ALI_M1217, .init = machine_at_arb1374_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4494,25 +5097,30 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_HOLTEK | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has the AMIKey-2 KBC. */ + /* Has the AMIKey-2 KBC - that's actually a guess since we + do not currently have a picture of the motherboard. */ { .name = "[ALi M1217] AAEON SBC-350A", .internal_name = "sbc350a", .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_ALI_M1217, .init = machine_at_sbc350a_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4534,11 +5142,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -4552,7 +5164,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_ALI_M1217, .init = machine_at_flytech386_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4574,25 +5186,29 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &tvga8900d_device, .snd_device = NULL, .net_device = NULL }, - /* Has a JetKey KBC without version, shows up as a 'H'. */ + /* Has a JetKey KBC without version, which is a clone of AMI '8'. */ { .name = "[ALi M1217] Chaintech 325AX", .internal_name = "325ax", .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_ALI_M1217, .init = machine_at_325ax_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4614,25 +5230,29 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00003800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has a JetKey KBC without version, shows up as a 'H'. */ + /* Has a JetKey KBC without version, which is a clone of AMI '8'. */ { .name = "[ALi M1217] Chaintech 325AX (MR BIOS)", .internal_name = "mr1217", .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_ALI_M1217, .init = machine_at_mr1217_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4654,24 +5274,30 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00003800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - { + /* Uses a NEC/Acer 90M002A. + This is a strange one - it has command AF but it returns 0x00. */ + { .name = "[ALi M1409] Acer 100T", .internal_name = "acer100t", .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_ALI_M1409, .init = machine_at_acer100t_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4684,7 +5310,6 @@ const machine_t machines[] = { .max_voltage = 0, .min_multi = 0, .max_multi = 0, - }, .bus_flags = MACHINE_PS2, .flags = MACHINE_IDE | MACHINE_VIDEO , /* Machine has internal OTI 077 Video card*/ @@ -4694,97 +5319,21 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_ACER, + .kbc_p1 = 0x004008f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &oti077_acer100t_device, .snd_device = NULL, .net_device = NULL }, - /* Has IBM PS/2 Type 1 KBC firmware. */ - { - .name = "[ALi M6117] Acrosser PJ-A511M", - .internal_name = "pja511m", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_ALI_M6117, - .init = machine_at_pja511m_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_M6117, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE, - .ram = { - .min = 1024, - .max = 32768, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has IBM PS/2 Type 1 KBC firmware. */ - { - .name = "[ALi M6117] Protech ProX-1332", - .internal_name = "prox1332", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_ALI_M6117, - .init = machine_at_prox1332_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_M6117, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE, - .ram = { - .min = 1024, - .max = 32768, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = 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. */ @@ -4794,7 +5343,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_HT18, .init = machine_at_ama932j_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4816,27 +5365,29 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &oti067_ama932j_device, .snd_device = NULL, .net_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. */ + /* Most likely has a Phoenix MultiKey/42 keyboard controller. */ { .name = "[Intel 82335] ADI 386SX", .internal_name = "adi386sx", .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_INTEL_82335, .init = machine_at_adi386sx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4858,11 +5409,15 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00010500, /* Guess. */ + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -4875,7 +5430,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_INTEL_82335, .init = machine_at_shuttle386sx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4897,11 +5452,15 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004400, /* Guess. */ + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -4917,7 +5476,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_NEAT, .init = machine_at_cmdsl386sx16_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4932,18 +5491,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_FLAGS_NONE, + .flags = MACHINE_IDE, .ram = { .min = 1024, .max = 8192, .step = 512 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -4957,7 +5520,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_NEAT, .init = machine_at_neat_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -4979,11 +5542,15 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -4995,7 +5562,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_NEAT_SX, .init = machine_at_if386sx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5010,18 +5577,67 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_VIDEO_FIXED | MACHINE_AX, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_KEYBOARD_JIS | MACHINE_AX, .ram = { .min = 1024, .max = 4096, .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + /* The version number is a guess - we have no probe of this machine's controller. */ + .kbc_params = KBC_VEN_PHOENIX | 0x00010500, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has AMI KBC firmware of uknown revision, maybe '8'. */ + { + .name = "[OPTi 283] Silicon Valley Computer SVC386SX/P1", + .internal_name = "svc386sxp1", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_OPTI_283, + .init = machine_at_svc386sxp1_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_386SX, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00003800, /* Guess. */ + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -5035,7 +5651,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_OPTI_291, .init = machine_at_awardsx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5057,11 +5673,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -5077,7 +5697,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_VLSI_SCAMP, .init = machine_at_cmdsl386sx25_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5099,11 +5719,15 @@ const machine_t machines[] = { .step = 512 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, /* The keyboard controller is part of the VL82c113. */ + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5402_onboard_device, @@ -5119,7 +5743,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_VLSI_SCAMP, .init = machine_at_dataexpert386sx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5141,11 +5765,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004400, /* Guess. */ + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -5160,7 +5788,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_VLSI_SCAMP, .init = machine_at_dells333sl_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5182,25 +5810,30 @@ const machine_t machines[] = { .step = 128 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00002020, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &dells333sl_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5420_onboard_device, .snd_device = NULL, .net_device = NULL }, - /* Has IBM PS/2 Type 1 KBC firmware. */ + /* The only photo we have is too blurry to read the marking on the + the keyboard controller, but it's possibly a Phoenix. */ { .name = "[SCAMP] Samsung SPC-6033P", .internal_name = "spc6033p", .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_VLSI_SCAMP, .init = machine_at_spc6033p_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5222,11 +5855,15 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, /* Possibly. */ + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess. */ + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &ati28800k_spc6033p_device, @@ -5241,7 +5878,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_SCAT_SX, .init = machine_at_kmxc02_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5263,11 +5900,15 @@ const machine_t machines[] = { .step = 512 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, /* Possibly. */ + .kbc_params = KBC_VEN_AMI | 0x00004600, /* Guess. */ + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -5281,7 +5922,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_WD76C10, .init = machine_at_wd76c10_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5303,11 +5944,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_QUADTEL, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -5323,7 +5968,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_PROPRIETARY, .init = machine_ps2_model_55sx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5345,11 +5990,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_IBM, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -5363,7 +6012,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386SX, .chipset = MACHINE_CHIPSET_PROPRIETARY, .init = machine_ps2_model_65sx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5385,8 +6034,9 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_IBM, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, @@ -5397,6 +6047,96 @@ const machine_t machines[] = { .net_device = NULL }, + /* ALi M6117 machines */ + /* Has IBM PS/2 Type 1 KBC firmware. */ + { + .name = "[ALi M6117] Acrosser PJ-A511M", + .internal_name = "pja511m", + .type = MACHINE_TYPE_M6117, + .chipset = MACHINE_CHIPSET_ALI_M6117, + .init = machine_at_pja511m_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_M6117, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2, + .flags = MACHINE_IDE, + .ram = { + .min = 1024, + .max = 32768, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has IBM PS/2 Type 1 KBC firmware. */ + { + .name = "[ALi M6117] Protech ProX-1332", + .internal_name = "prox1332", + .type = MACHINE_TYPE_M6117, + .chipset = MACHINE_CHIPSET_ALI_M6117, + .init = machine_at_prox1332_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_M6117, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2, + .flags = MACHINE_IDE, + .ram = { + .min = 1024, + .max = 32768, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* 486SLC machines */ /* 486SLC machines with just the ISA slot */ /* Has AMIKey H KBC firmware. */ @@ -5406,7 +6146,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486SLC, .chipset = MACHINE_CHIPSET_OPTI_283, .init = machine_at_rycleopardlx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5428,11 +6168,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -5441,14 +6185,235 @@ const machine_t machines[] = { }, /* 386DX machines */ - /* Has a Jetkey V3, which identifies as a 'B'. */ + /* Uses Compaq KBC firmware. */ + { + .name = "[ISA] Compaq Deskpro 386 (September 1986)", + .internal_name = "deskpro386", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_deskpro386_init, + .p1_handler = machine_compaq_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_386DX_DESKPRO386, + .block = CPU_BLOCK(CPU_486DLC, CPU_RAPIDCAD), + .min_bus = 16000000, + .max_bus = 25000000, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 1024, + .max = 16384, + .step = 1024 + }, + .nvrmask = 63, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_COMPAQ, + .kbc_p1 = 0x000000f4, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Uses Compaq KBC firmware. */ + { + .name = "[ISA] Compaq Deskpro 386 (May 1988)", + .internal_name = "deskpro386_05_1988", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_deskpro386_05_1988_init, + .p1_handler = machine_compaq_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_386DX_DESKPRO386, + .block = CPU_BLOCK(CPU_486DLC, CPU_RAPIDCAD), + .min_bus = 16000000, + .max_bus = 25000000, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 1024, + .max = 16384, + .step = 1024 + }, + .nvrmask = 63, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_COMPAQ, + .kbc_p1 = 0x000000f4, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Uses Compaq KBC firmware. */ + { + .name = "[ISA] Compaq Portable III (386)", + .internal_name = "portableiii386", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_portableiii386_init, + .p1_handler = machine_compaq_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_386DX, + .block = CPU_BLOCK_NONE, + .min_bus = 20000000, + .max_bus = 20000000, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_KEYBOARD, + .ram = { + .min = 1024, + .max = 14336, + .step = 1024 + }, + .nvrmask = 63, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_COMPAQ, + .kbc_p1 = 0x000000f4, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &compaq_plasma_device, + .snd_device = NULL, + .net_device = NULL + }, + /* Has Phoenix MultiKey/42 KBC firmware. */ + { + .name = "[ISA] Micronics 09-00021 (Tandon BIOS)", + .internal_name = "micronics386", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_micronics386_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_386DX, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_APM, + .ram = { + .min = 512, + .max = 8192, + .step = 128 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess. */ + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has IBM AT KBC firmware. */ + { + .name = "[ISA] Micronics 09-00021 (Phoenix BIOS)", + .internal_name = "micronics386px", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_micronics386px_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_386DX, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_APM, + .ram = { + .min = 512, + .max = 8192, + .step = 128 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has a Jetkey V3, which we currently lack a probe of, but an + old test by Carlos showed it as being 'F'. */ { .name = "[ACC 2168] Juko AT046DX3", .internal_name = "acc386", .type = MACHINE_TYPE_386DX, .chipset = MACHINE_CHIPSET_ACC_2168, .init = machine_at_acc386_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5470,11 +6435,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -5488,7 +6457,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386DX, .chipset = MACHINE_CHIPSET_CT_386, .init = machine_at_ecs386_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5510,25 +6479,29 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00003800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has IBM AT KBC firmware. */ + /* Unknown - we give it an AT Award keyboard controller. */ { .name = "[C&T 386/AT] Samsung SPC-6000A", .internal_name = "spc6000a", .type = MACHINE_TYPE_386DX, .chipset = MACHINE_CHIPSET_CT_386, .init = machine_at_spc6000a_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5550,223 +6523,30 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AWARD | 0x00424600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Uses Compaq KBC firmware. */ + /* I found one board picture of it and I can't really read the + keyboard controller markings from it, but it may be Phoenix. */ { - .name = "[ISA] Compaq Deskpro 386 (September 1986)", - .internal_name = "deskpro386", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_deskpro386_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX_DESKPRO386, - .block = CPU_BLOCK(CPU_486DLC, CPU_RAPIDCAD), - .min_bus = 16000000, - .max_bus = 25000000, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 1024, - .max = 16384, - .step = 1024 - }, - .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - { - .name = "[ISA] Compaq Deskpro 386 (May 1988)", - .internal_name = "deskpro386_05_1988", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_deskpro386_05_1988_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX_DESKPRO386, - .block = CPU_BLOCK(CPU_486DLC, CPU_RAPIDCAD), - .min_bus = 16000000, - .max_bus = 25000000, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 1024, - .max = 16384, - .step = 1024 - }, - .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - { - .name = "[ISA] Compaq Portable III (386)", - .internal_name = "portableiii386", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_portableiii386_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX, - .block = CPU_BLOCK_NONE, - .min_bus = 20000000, - .max_bus = 20000000, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE | MACHINE_VIDEO, - .ram = { - .min = 1024, - .max = 14336, - .step = 1024 - }, - .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &compaq_plasma_device, - .snd_device = NULL, - .net_device = NULL - }, - /* Has IBM AT KBC firmware. */ - { - .name = "[ISA] Micronics 09-00021 (Tandon BIOS)", - .internal_name = "micronics386", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_micronics386_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 512, - .max = 8192, - .step = 128 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has IBM AT KBC firmware. */ - { - .name = "[ISA] Micronics 09-00021 (Phoenix BIOS)", - .internal_name = "micronics386px", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_micronics386px_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 512, - .max = 8192, - .step = 128 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has IBM AT KBC firmware. */ - { - .name = "[ISA] Tandy 4000", + .name = "[C&T 386/AT] Tandy 4000", .internal_name = "tandy4000", .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_DISCRETE, + .chipset = MACHINE_CHIPSET_CT_386, .init = machine_at_tandy4000_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5788,25 +6568,29 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess. */ + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has a Lance LT38C41 with AMI Megakey P KBC firmware */ + /* Has a Lance LT38C41 that clones an AMIKEY ('F'). */ { .name = "[ALi M1429] ECS Panda 386V", .internal_name = "ecs386v", .type = MACHINE_TYPE_386DX, .chipset = MACHINE_CHIPSET_ALI_M1429, .init = machine_at_ecs386v_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5828,8 +6612,11 @@ const machine_t machines[] = { .step = 1024, }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, /* TODO: Lance LT38C41. */ + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, @@ -5844,7 +6631,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386DX, .chipset = MACHINE_CHIPSET_OPTI_391, .init = machine_at_dataexpert386wb_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5866,11 +6653,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | KBC_FLAG_IS_CLONE | 0x00004600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -5886,7 +6677,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386DX, .chipset = MACHINE_CHIPSET_OPTI_495SLC, .init = machine_at_opti495_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5908,11 +6699,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess. */ + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -5926,7 +6721,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386DX, .chipset = MACHINE_CHIPSET_SIS_310, .init = machine_at_asus3863364k_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5948,11 +6743,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AWARD | 0x00424600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -5966,7 +6765,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386DX, .chipset = MACHINE_CHIPSET_SIS_310, .init = machine_at_asus386_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -5988,11 +6787,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -6008,7 +6811,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386DX, .chipset = MACHINE_CHIPSET_PROPRIETARY, .init = machine_ps2_model_80_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6030,11 +6833,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_IBM, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -6048,7 +6855,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386DX, .chipset = MACHINE_CHIPSET_PROPRIETARY, .init = machine_ps55_model_50t_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6063,18 +6870,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PS2_MCA, - .flags = MACHINE_VIDEO | MACHINE_APM, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD_JIS | MACHINE_APM, .ram = { .min = 2048, .max = 16384, .step = 2048 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_IBM, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -6088,7 +6899,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386DX, .chipset = MACHINE_CHIPSET_PROPRIETARY, .init = machine_ps55_model_50v_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6103,18 +6914,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PS2_MCA, - .flags = MACHINE_VIDEO | MACHINE_APM, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD_JIS | MACHINE_APM, .ram = { .min = 4096, .max = 16384, .step = 4096 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_IBM, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -6123,6 +6938,50 @@ const machine_t machines[] = { }, /* 386DX/486 machines */ + /* Winbond W83C42 - ASIC that clones AMI 'F'. */ + { + .name = "[ALi M1429G] DataExpert EXP4349", + .internal_name = "exp4349", + .type = MACHINE_TYPE_386DX_486, + .chipset = MACHINE_CHIPSET_ALI_M1429G, + .init = machine_at_exp4349_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_386DX | CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_VLB, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00021400, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Has AMIKey F KBC firmware. The EFAR chipst is a rebrand of OPTi 495SX. */ { .name = "[OPTi 495SX] CAF Technology C747", @@ -6130,7 +6989,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386DX_486, .chipset = MACHINE_CHIPSET_OPTI_495SX, .init = machine_at_c747_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6152,25 +7011,30 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_SIEMENS, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has AMIKey F KBC firmware. */ + /* Has AMIKey 'F' or MR BIOS 'M' KBC firmware, we give it the latter + for the sake of keyboard controller diversity. */ { .name = "[OPTi 495SX] DataExpert SX495", .internal_name = "ami495", .type = MACHINE_TYPE_386DX_486, .chipset = MACHINE_CHIPSET_OPTI_495SX, .init = machine_at_opti495_ami_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6192,25 +7056,30 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004d00, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has AMIKey F KBC firmware (it's just the MR BIOS for the above machine). */ + /* Has AMIKey 'F' or MR BIOS 'M' KBC firmware + (it's just the MR BIOS for the above machine). */ { .name = "[OPTi 495SX] DataExpert SX495 (MR BIOS)", .internal_name = "mr495", .type = MACHINE_TYPE_386DX_486, .chipset = MACHINE_CHIPSET_OPTI_495SX, .init = machine_at_opti495_mr_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6232,51 +7101,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Winbond W83C42 with unknown firmware. */ - { - .name = "[ALi M1429G] DataExpert EXP4349", - .internal_name = "exp4349", - .type = MACHINE_TYPE_386DX_486, - .chipset = MACHINE_CHIPSET_ALI_M1429G, - .init = machine_at_exp4349_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX | CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 49152, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004d00, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -6290,7 +7123,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386DX_486, .chipset = MACHINE_CHIPSET_PROPRIETARY, .init = machine_ps2_model_70_type3_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6312,11 +7145,15 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_IBM, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -6330,7 +7167,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_386DX_486, .chipset = MACHINE_CHIPSET_PROPRIETARY, .init = machine_ps2_model_80_axx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6352,11 +7189,15 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_IBM, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -6365,136 +7206,15 @@ const machine_t machines[] = { }, /* 486 machines - Socket 1 */ - /* Has Award KBC firmware. */ - { - .name = "[ZyMOS Poach] ASUS ISA-486C", - .internal_name = "isa486c", - .type = MACHINE_TYPE_486, - .chipset = MACHINE_CHIPSET_ZYMOS_POACH, - .init = machine_at_isa486c_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET1, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 16384, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has AMI KF KBC firmware. */ - { - .name = "[ZyMOS Poach] Genoa Unknown 486", - .internal_name = "genoa486", - .type = MACHINE_TYPE_486, - .chipset = MACHINE_CHIPSET_ZYMOS_POACH, - .init = machine_at_genoa486_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET1, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 16384, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has AMI KF KBC firmware. */ - { - .name = "[OPTi 381] Gigabyte GA-486L", - .internal_name = "ga486l", - .type = MACHINE_TYPE_486, - .chipset = MACHINE_CHIPSET_OPTI_381, - .init = machine_at_ga486l_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET1, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 16384, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = 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. */ + /* Has JetKey V5 KBC Firmware - we now have a photo of the board and its POST + screen, so we can match JetKey V5 to 'F'. */ { .name = "[CS4031] AMI 486 CS4031", .internal_name = "cs4031", .type = MACHINE_TYPE_486, .chipset = MACHINE_CHIPSET_CT_CS4031, .init = machine_at_cs4031_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6516,11 +7236,103 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has AMI KF KBC firmware. */ + { + .name = "[OPTi 381] Gigabyte GA-486L", + .internal_name = "ga486l", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_OPTI_381, + .init = machine_at_ga486l_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET1, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Uses the AMIKey 'F' keyboard controller firmware. */ + { + .name = "[OPTi 493] Silicon Valley Computer 486WB", + .internal_name = "svc486wb", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_OPTI_493, + .init = machine_at_svc486wb_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET1, + .block = CPU_BLOCK_NONE, + .min_bus = 20000000, + .max_bus = 33333333, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 2.0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 1024, + .max = 32768, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -6535,7 +7347,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486, .chipset = MACHINE_CHIPSET_OPTI_498, .init = machine_at_mvi486_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6557,11 +7369,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess. */ + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -6575,7 +7391,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486, .chipset = MACHINE_CHIPSET_SIS_401, .init = machine_at_isa486_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6597,25 +7413,30 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has AMIKey H KBC firmware, per the screenshot in "How computers & MS-DOS work". */ + /* Has AMIKey H KBC firmware, per the screenshot in "How computers & MS-DOS work". + Also seen with an AMI 'F'. */ { .name = "[SiS 401] Chaintech 433SC", .internal_name = "sis401", .type = MACHINE_TYPE_486, .chipset = MACHINE_CHIPSET_SIS_401, .init = machine_at_sis401_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6637,26 +7458,29 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has AMIKey F KBC firmware, per a photo of a monitor with the BIOS screen on - eBay. */ + /* Seen with both AMIKey F and AMIKey-2 H KBC firmwares. */ { .name = "[SiS 460] ABIT AV4", .internal_name = "av4", .type = MACHINE_TYPE_486, .chipset = MACHINE_CHIPSET_SIS_460, .init = machine_at_av4_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6678,11 +7502,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -6696,7 +7524,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486, .chipset = MACHINE_CHIPSET_SIS_471, .init = machine_at_advantage40xxd_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6718,11 +7546,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess. */ + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5424_onboard_device, @@ -6736,7 +7568,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486, .chipset = MACHINE_CHIPSET_SYMPHONY_SL82C460, .init = machine_at_dtk461_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6758,11 +7590,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -6772,14 +7608,15 @@ const machine_t machines[] = { /* 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. */ + this must have some form of AMIKey. + This is also seen with a genuine AMI 'F' (one of the photos on TheRetroWeb). */ { .name = "[VIA VT82C495] FIC 486-VC-HD", .internal_name = "486vchd", .type = MACHINE_TYPE_486, .chipset = MACHINE_CHIPSET_VIA_VT82C495, .init = machine_at_486vchd_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6801,11 +7638,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -6819,7 +7660,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486, .chipset = MACHINE_CHIPSET_VLSI_VL82C480, .init = machine_at_vect486vl_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6841,25 +7682,29 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, /* The keyboard controller is part of the VL82c113. */ + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, /*Has SIO (sorta): VLSI VL82C113A SCAMP Combination I/O*/ .vid_device = &gd5428_onboard_device, .snd_device = NULL, .net_device = NULL }, - /* Has a VLSI VL82C114 Combination I/O which holds the KBC. */ + /* Has a standard IBM PS/2 KBC firmware or a clone thereof. */ { .name = "[VLSI 82C481] Siemens Nixdorf D824", .internal_name = "d824", .type = MACHINE_TYPE_486, .chipset = MACHINE_CHIPSET_VLSI_VL82C481, .init = machine_at_d824_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6881,11 +7726,15 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5428_onboard_device, @@ -6899,7 +7748,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486, .chipset = MACHINE_CHIPSET_VLSI_VL82C486, .init = machine_at_tuliptc38_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6921,17 +7770,109 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, /*Has SIO (sorta): VLSI VL82C113A SCAMP Combination I/O*/ .vid_device = &gd5426_onboard_device, .snd_device = NULL, .net_device = NULL }, + /* Has Award KBC firmware. */ + { + .name = "[ZyMOS Poach] ASUS ISA-486C", + .internal_name = "isa486c", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_ZYMOS_POACH, + .init = machine_at_isa486c_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET1, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AWARD | 0x00424600, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has AMI KF KBC firmware. */ + { + .name = "[ZyMOS Poach] Genoa Unknown 486", + .internal_name = "genoa486", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_ZYMOS_POACH, + .init = machine_at_genoa486_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET1, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Has IBM PS/2 Type 1 KBC firmware. */ { .name = "[MCA] IBM PS/2 model 70 (type 4)", @@ -6939,7 +7880,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486, .chipset = MACHINE_CHIPSET_PROPRIETARY, .init = machine_ps2_model_70_type4_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -6961,11 +7902,15 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 63, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_IBM, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -6982,7 +7927,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S2, .chipset = MACHINE_CHIPSET_ACC_2168, .init = machine_at_pb410a_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -7004,11 +7949,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900 /* Guess. */, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &ht216_32_pb410a_device, @@ -7022,7 +7971,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S2, .chipset = MACHINE_CHIPSET_ALI_M1429G, .init = machine_at_acera1g_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -7044,11 +7993,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_ACER, + .kbc_p1 = 0x004008f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5428_onboard_device, @@ -7062,7 +8015,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S2, .chipset = MACHINE_CHIPSET_ALI_M1429G, .init = machine_at_winbios1429_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -7084,29 +8037,30 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has JetKey 5 KBC Firmware which looks like it is a clone of AMIKey type F. - It also has those Ex commands also seen on the VIA VT82C42N (the BIOS - supposedly sends command EF. - The board was also seen in 2003 with a -H string - perhaps someone swapped - the KBC? */ + /* Has JetKey V5.0 KBC Firmware which clones an AMI 'H'. + The board was also seen 2003 with a -F string. */ { .name = "[ALi M1429] Olystar LIL1429", .internal_name = "ali1429", .type = MACHINE_TYPE_486_S2, .chipset = MACHINE_CHIPSET_ALI_M1429, .init = machine_at_ali1429_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -7128,25 +8082,29 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has AMI MegaKey KBC. */ + /* Has AMI 'H' KBC. */ { .name = "[i420TX] J-Bond PCI400C-A", .internal_name = "pci400ca", .type = MACHINE_TYPE_486_S2, .chipset = MACHINE_CHIPSET_INTEL_420TX, .init = machine_at_pci400ca_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -7168,11 +8126,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = &keyboard_at_ami_device, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -7186,7 +8148,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S2, .chipset = MACHINE_CHIPSET_IMS_8848, .init = machine_at_g486ip_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -7208,24 +8170,29 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00005000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, + /* Has AMIKey-2 'H' KBC firmware. */ { .name = "[OPTi 499] Alaris Cobalt LPX", .internal_name = "cobalt", .type = MACHINE_TYPE_486_S2, .chipset = MACHINE_CHIPSET_OPTI_499, .init = machine_at_cobalt_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -7247,11 +8214,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5428_vlb_onboard_device, @@ -7265,7 +8236,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S2, .chipset = MACHINE_CHIPSET_OPTI_499, .init = machine_at_cougar_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -7280,18 +8251,22 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, + .flags = MACHINE_APM, /* Machine has IDE with controller: Appian ADI/2 */ .ram = { .min = 1024, .max = 65536, .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -7305,7 +8280,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S2, .chipset = MACHINE_CHIPSET_SIS_461, .init = machine_at_decpclpv_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -7327,11 +8302,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess. */ + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &s3_86c805_onboard_vlb_device, @@ -7345,7 +8324,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S2, .chipset = MACHINE_CHIPSET_SIS_461, .init = machine_at_dell466np_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -7367,11 +8346,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess. */ + .kbc_p1 = 0x00002420, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5428_onboard_vlb_device, @@ -7386,7 +8369,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S2, .chipset = MACHINE_CHIPSET_SIS_461, .init = machine_at_valuepoint433_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -7408,11 +8391,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -7426,7 +8413,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S2, .chipset = MACHINE_CHIPSET_VLSI_VL82C480, .init = machine_at_martin_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -7448,11 +8435,15 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -7462,256 +8453,14 @@ const machine_t machines[] = { /* 486 machines - Socket 3 */ /* 486 machines with just the ISA slot */ - /* Has a Fujitsu MBL8042H KBC. */ + /* JETKey V5.0 */ { - .name = "[Contaq 82C596A] A-Trend 4GPV5", - .internal_name = "4gpv5", + .name = "[ALi M1429G] A-Trend ATC-1762", + .internal_name = "atc1762", .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_CONTAQ_82C596, - .init = machine_at_4gpv5_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has AMI MegaKey KBC firmware. */ - { - .name = "[Contaq 82C597] Visionex Green-B", - .internal_name = "greenb", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_CONTAQ_82C597, - .init = machine_at_greenb_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Version 1.0 has an AMIKEY-2, version 2.0 has a VIA VT82C42N KBC. */ - { - .name = "[OPTi 895] Jetway J-403TG", - .internal_name = "403tg", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_OPTI_895_802G, - .init = machine_at_403tg_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has JetKey 5 KBC Firmware which looks like it is a clone of AMIKey type F. */ - { - .name = "[OPTi 895] Jetway J-403TG Rev D", - .internal_name = "403tg_d", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_OPTI_895_802G, - .init = machine_at_403tg_d_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has JetKey 5 KBC Firmware which looks like it is a clone of AMIKey type F. */ - { - .name = "[OPTi 895] Jetway J-403TG Rev D (MR BIOS)", - .internal_name = "403tg_d_mr", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_OPTI_895_802G, - .init = machine_at_403tg_d_mr_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Uses an NEC 90M002A (UPD82C42C, 8042 clone) with unknown firmware. */ - { - .name = "[SiS 461] Acer V10", - .internal_name = "acerv10", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_SIS_461, - .init = machine_at_acerv10_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2_VLB, - .flags = MACHINE_IDE | MACHINE_APM, /* Machine has internal SCSI: Adaptec AIC-6360 */ - .ram = { - .min = 1024, - .max = 32768, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = 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. */ - { - .name = "[SiS 471] ABIT AB-AH4", - .internal_name = "win471", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_SIS_471, - .init = machine_at_win471_init, - .p1_handler = NULL, + .chipset = MACHINE_CHIPSET_ALI_M1429G, + .init = machine_at_atc1762_init, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -7733,297 +8482,21 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | KBC_FLAG_IS_CLONE | KBC_FLAG_IS_ASIC | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has AMIKey-2 'H' keyboard BIOS. */ - { - .name = "[SiS 471] AOpen Vi15G", - .internal_name = "vi15g", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_SIS_471, - .init = machine_at_vi15g_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { - .name = "[SiS 471] ASUS VL/I-486SV2GX4", - .internal_name = "vli486sv2g", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_SIS_471, - .init = machine_at_vli486sv2g_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has JetKey 5 KBC Firmware which looks like it is a clone of AMIKey type F. */ - { - .name = "[SiS 471] DTK PKM-0038S E-2", - .internal_name = "dtk486", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_SIS_471, - .init = machine_at_dtk486_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has a Lance LT38C41L with AMIKey F keyboard BIOS. */ - { - .name = "[SiS 471] Epox GXA486SG", - .internal_name = "ami471", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_SIS_471, - .init = machine_at_ami471_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has MR (!) KBC firmware, which is a clone of the standard IBM PS/2 KBC firmware. */ - { - .name = "[SiS 471] SiS VL-BUS 471 REV. A1", - .internal_name = "px471", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_SIS_471, - .init = machine_at_px471_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* TriGem AMIBIOS Pre-Color with TriGem AMI 'Z' keyboard controller */ - { - .name = "[SiS 471] TriGem 486G", - .internal_name = "tg486g", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_SIS_471, - .init = machine_at_tg486g_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2_VLB, - .flags = MACHINE_IDE | MACHINE_APM, /* Has internal video: Western Digital WD90C33-ZZ */ - .ram = { - .min = 4096, - .max = 40960, - .step = 4096 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Unknown revision phoenix 1993 multikey */ - { - .name = "[SiS 471] DEC Venturis 4xx", - .internal_name = "dvent4xx", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_SIS_471, - .init = machine_at_dvent4xx_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE_DUAL | MACHINE_SUPER_IO | MACHINE_APM | MACHINE_VIDEO, - .ram = { - .min = 4096, - .max = 69632, - .step = 4096 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &s3_phoenix_trio32_onboard_vlb_device, - .snd_device = NULL, - .net_device = NULL - }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ { .name = "[ALi M1429G] ECS AL486", @@ -8031,7 +8504,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3, .chipset = MACHINE_CHIPSET_ALI_M1429G, .init = machine_at_ecsal486_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8053,25 +8526,30 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* This uses a VIA VT82C42N KBC, which is a clone of type 'F' with additional commands */ + /* This uses a VIA VT82C42N KBC, which is a clone of type 'F' with additional commands. + It's really an ASIC clone of the Award KBC, which is itself an extended clone of AMI 'F'. */ { .name = "[ALi M1429G] Lanner Electronics AP-4100AA", .internal_name = "ap4100aa", .type = MACHINE_TYPE_486_S3, .chipset = MACHINE_CHIPSET_ALI_M1429G, .init = machine_at_ap4100aa_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8089,29 +8567,33 @@ const machine_t machines[] = { .flags = MACHINE_SUPER_IO | MACHINE_IDE | MACHINE_APM, .ram = { .min = 1024, - .max = 32768, + .max = 131072, .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* JETKey V5.0 */ + /* Has a Fujitsu MBL8042H KBC. */ { - .name = "[ALi M1429G] A-Trend ATC-1762", - .internal_name = "atc1762", + .name = "[Contaq 82C596A] A-Trend 4GPV5", + .internal_name = "4gpv5", .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_ALI_M1429G, - .init = machine_at_atc1762_init, - .p1_handler = NULL, + .chipset = MACHINE_CHIPSET_CONTAQ_82C596, + .init = machine_at_4gpv5_init, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8129,15 +8611,594 @@ const machine_t machines[] = { .flags = MACHINE_APM, .ram = { .min = 1024, - .max = 40960, + .max = 65536, .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has AMI MegaKey 'P' KBC firmware. */ + { + .name = "[Contaq 82C597] Visionex Green-B", + .internal_name = "greenb", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_CONTAQ_82C597, + .init = machine_at_greenb_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_VLB, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00005000, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Version 1.0 has an AMIKEY-2, version 2.0 has a VIA VT82C42N KBC. */ + { + .name = "[OPTi 895] Jetway J-403TG", + .internal_name = "403tg", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_OPTI_895_802G, + .init = machine_at_403tg_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_VLB, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* This is Version 2.0 - it has a VIA VT82C42N KBC. */ + { + .name = "[OPTi 895] Jetway J-403TG Rev D", + .internal_name = "403tg_d", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_OPTI_895_802G, + .init = machine_at_403tg_d_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_VLB, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has JetKey 5 KBC Firmware which looks like it is a clone of AMIKey type F. */ + { + .name = "[OPTi 895] Jetway J-403TG Rev D (MR BIOS)", + .internal_name = "403tg_d_mr", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_OPTI_895_802G, + .init = machine_at_403tg_d_mr_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_VLB, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Uses an Acer 90M002A. + This is a strange one - it has command AF but it returns 0x00. */ + { + .name = "[SiS 461] Acer V10", + .internal_name = "acerv10", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_SIS_461, + .init = machine_at_acerv10_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2_VLB, + .flags = MACHINE_IDE | MACHINE_APM, /* Machine has internal SCSI: Adaptec AIC-6360 */ + .ram = { + .min = 1024, + .max = 32768, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_ACER, + .kbc_p1 = 0x004008f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = 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. */ + { + .name = "[SiS 471] ABIT AB-AH4", + .internal_name = "win471", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_SIS_471, + .init = machine_at_win471_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_VLB, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has AMIKey-2 'H' keyboard BIOS. */ + { + .name = "[SiS 471] AOpen Vi15G", + .internal_name = "vi15g", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_SIS_471, + .init = machine_at_vi15g_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_VLB, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* This has an AMIKey-2, which is an updated version of type 'H'. */ + { + .name = "[SiS 471] ASUS VL/I-486SV2GX4", + .internal_name = "vli486sv2g", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_SIS_471, + .init = machine_at_vli486sv2g_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2_VLB, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has an Intel 82C42PE with Phoenix MultiKey/C42 KBC firmware, copyrighted 1993. */ + { + .name = "[SiS 471] DEC Venturis 4xx", + .internal_name = "dvent4xx", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_SIS_471, + .init = machine_at_dvent4xx_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2, + .flags = MACHINE_IDE_DUAL | MACHINE_SUPER_IO | MACHINE_APM | MACHINE_VIDEO, + .ram = { + .min = 4096, + .max = 69632, + .step = 4096 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED, + .default_jumpered_ecp_dma = 4, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00021400, /* Guess. */ + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &s3_phoenix_trio32_onboard_vlb_device, + .snd_device = NULL, + .net_device = NULL + }, + /* Has JetKey v5.0G KBC Firmware which is a clone of AMIKey type F. */ + { + .name = "[SiS 471] DTK PKM-0038S E-2", + .internal_name = "dtk486", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_SIS_471, + .init = machine_at_dtk486_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_VLB, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | KBC_FLAG_IS_CLONE | KBC_FLAG_IS_ASIC | 0x00004600, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has a Lance LT38C41L with AMIKey F keyboard BIOS. */ + { + .name = "[SiS 471] Epox GXA486SG", + .internal_name = "ami471", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_SIS_471, + .init = machine_at_ami471_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_VLB, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | KBC_FLAG_IS_CLONE | KBC_FLAG_IS_ASIC | 0x00004600, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has MR BIOS V307UT KBC firmware, which, bizarrely enough, is actually a genuine AMI 'H'. */ + { + .name = "[SiS 471] SiS VL-BUS 471 REV. A1", + .internal_name = "px471", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_SIS_471, + .init = machine_at_px471_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_VLB, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* TriGem AMIBIOS Pre-Color with TriGem AMI 'Z' keyboard controller */ + { + .name = "[SiS 471] TriGem 486G (Olympia-K)", + .internal_name = "tg486g", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_SIS_471, + .init = machine_at_tg486g_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2_VLB, + .flags = MACHINE_IDE | MACHINE_APM, /* Has internal video: Western Digital WD90C33-ZZ */ + .ram = { + .min = 4096, + .max = 40960, + .step = 4096 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI_TRIGEM | 0x00005a00, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -8145,16 +9206,17 @@ const machine_t machines[] = { .net_device = NULL }, + /* 486 machines - Socket 3 PCI */ /* 486 machines which utilize the PCI bus */ /* Machine with ALi M1429G chipset and M1435 southbridge */ - /* Has an AMIKEY-2 KBC. */ + /* Has an AMIKEY-2 KBC which is type 'H'. */ { .name = "[ALi M1429G] MSI MS-4134", .internal_name = "ms4134", .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_ALI_M1429G, .init = machine_at_ms4134_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8176,11 +9238,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -8189,12 +9255,12 @@ const machine_t machines[] = { }, /* TriGem machine with M1429G and PhoenixBIOS */ { - .name = "[ALi M1429G] TriGem 486GP", + .name = "[ALi M1429G] TriGem 486GP (Talent)", .internal_name = "tg486gp", .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_ALI_M1429G, .init = machine_at_tg486gp_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8216,11 +9282,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI_TRIGEM | 0x00005a00, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -8234,7 +9304,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_ALI_M1489, .init = machine_at_sbc490_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8256,11 +9326,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_0 | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &tgui9440_onboard_pci_device, @@ -8275,7 +9349,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_ALI_M1489, .init = machine_at_abpb4_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8297,11 +9371,59 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_ALI | 0x00004600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has an ALi M5042 with phoenix firmware like the ESA TF-486. */ + { + .name = "[ALi M1489] Acrosser AR-B1476", + .internal_name = "arb1476", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_ALI_M1489, + .init = machine_at_arb1476_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2, + .flags = MACHINE_SUPER_IO | MACHINE_IDE | MACHINE_APM, /* Has onboard video: C&T F65545 */ + .ram = { + .min = 8192, + .max = 73728, + .step = 1024 + }, + .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00014000, /* Guess. */ + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -8319,7 +9441,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_ALI_M1489, .init = machine_at_win486pci_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8341,11 +9463,59 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00005500, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has an ALi M5042 keyboard controller with Phoenix MultiKey/42 v1.40 firmware. */ + { + .name = "[ALi M1489] ESA TF-486", + .internal_name = "tf486", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_ALI_M1489, + .init = machine_at_tf486_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, + .step = 1024 + }, + .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00014000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -8363,7 +9533,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_ALI_M1489, .init = machine_at_ms4145_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8385,91 +9555,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has an ALi M5042 keyboard controller with Phoenix MultiKey/42 v1.40 firmware. */ - { - .name = "[ALi M1489] ESA TF-486", - .internal_name = "tf486", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_ALI_M1489, - .init = machine_at_tf486_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has an ALi M5042 with phoenix firmware like the ESA TF-486. */ - { - .name = "[ALi M1489] Acrosser AR-B1476", - .internal_name = "arb1476", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_ALI_M1489, - .init = machine_at_arb1476_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2, - .flags = MACHINE_SUPER_IO | MACHINE_IDE | MACHINE_APM, /* Has onboard video: C&T F65545 */ - .ram = { - .min = 1024, - .max = 32768, - .step = 1024 - }, - .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_ALI | 0x00004600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -8483,7 +9577,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_OPTI_895_802G, .init = machine_at_aptiva510_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8505,11 +9599,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5430_onboard_vlb_device, @@ -8523,7 +9621,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_OPTI_895_802G, .init = machine_at_pc330_6573_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8545,11 +9643,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5430_onboard_vlb_device, @@ -8563,7 +9665,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_OPTI_895_802G, .init = machine_at_pb450_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8585,11 +9687,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00021400, /* Guess. */ + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &pb450_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5428_vlb_onboard_device, @@ -8597,133 +9703,13 @@ const machine_t machines[] = { .net_device = NULL }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { - .name = "[i420EX] ASUS PVI-486AP4", - .internal_name = "486ap4", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_INTEL_420EX, - .init = machine_at_486ap4_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2_PCIV, - .flags = MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* This has the Phoenix MultiKey KBC firmware. */ - { - .name = "[i420EX] Intel Classic/PCI ED", - .internal_name = "ninja", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_INTEL_420EX, - .init = machine_at_ninja_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PCI, - .flags = MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has Phoenix Multikey/42 PS/2 KBC, but unknown version */ - { - .name = "[i420EX] Anigma BAT4IP3e", - .internal_name = "bat4ip3e", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_INTEL_420EX, - .init = machine_at_bat4ip3e_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_SUPER_IO | MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* This has an AMIKey-2, which is an updated version of type 'H'. */ { .name = "[i420EX] Advanced Integration Research 486PI", .internal_name = "486pi", .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_INTEL_420EX, .init = machine_at_486pi_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8745,11 +9731,147 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has Phoenix Multikey/42 PS/2 KBC, but unknown version */ + { + .name = "[i420EX] Anigma BAT4IP3e", + .internal_name = "bat4ip3e", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_INTEL_420EX, + .init = machine_at_bat4ip3e_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_SUPER_IO | MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00021400, /* Guess. */ + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* This has an AMIKey-2, which is an updated version of type 'H'. */ + { + .name = "[i420EX] ASUS PVI-486AP4", + .internal_name = "486ap4", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_INTEL_420EX, + .init = machine_at_486ap4_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2_PCIV, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* This has the Phoenix MultiKey KBC firmware. */ + { + .name = "[i420EX] Intel Classic/PCI ED (Ninja)", + .internal_name = "ninja", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_INTEL_420EX, + .init = machine_at_ninja_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PCI, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED, + .default_jumpered_ecp_dma = 4, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess. */ + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -8763,7 +9885,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_INTEL_420EX, .init = machine_at_sb486p_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8785,94 +9907,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* - This has an AMIKey (and an on-board NCR 53C810 PCI SCSI controller), thanks, eBay! - The keyboard port is AT. - */ - { - .name = "[i420TX] ASUS PCI/I-486SP3", - .internal_name = "486sp3", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_INTEL_420TX, - .init = machine_at_486sp3_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PCI, - .flags = MACHINE_IDE | MACHINE_SCSI | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, - .step = 1024 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* This has the Phoenix MultiKey KBC firmware. */ - { - .name = "[i420TX] Intel Classic/PCI", - .internal_name = "alfredo", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_INTEL_420TX, - .init = machine_at_alfredo_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, - .step = 2048 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00005200, /* Guess. */ + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -8886,7 +9929,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_INTEL_420TX, .init = machine_at_amis76_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8908,11 +9951,106 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* + This has an AMIKey (and an on-board NCR 53C810 PCI SCSI controller), thanks, eBay! + The keyboard port is AT. + */ + { + .name = "[i420TX] ASUS PCI/I-486SP3", + .internal_name = "486sp3", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_INTEL_420TX, + .init = machine_at_486sp3_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PCI, + .flags = MACHINE_IDE | MACHINE_SCSI | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, /* Guess. */ + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* This has the Phoenix MultiKey KBC firmware. */ + { + .name = "[i420TX] Intel Classic/PCI (Alfredo)", + .internal_name = "alfredo", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_INTEL_420TX, + .init = machine_at_alfredo_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, + .step = 2048 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess. */ + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -8927,7 +10065,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_INTEL_420ZX, .init = machine_at_486sp3g_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8949,11 +10087,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -8967,7 +10109,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_INTEL_420ZX, .init = machine_at_sb486pv_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -8990,11 +10132,15 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00005000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &sb486pv_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5436_onboard_pci_device, @@ -9008,7 +10154,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_IMS_8848, .init = machine_at_pci400cb_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9030,24 +10176,29 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00005000, /* Guess. */ + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, + /* Has Acer KBC firmware. */ { .name = "[SiS 496] Acer P3", .internal_name = "acerp3", .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_SIS_496, .init = machine_at_acerp3_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9069,25 +10220,29 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_ACER | 0x00004200, + .kbc_p1 = 0x004008f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5434_onboard_pci_device, .snd_device = NULL, .net_device = NULL }, - /* This has an AMIKey-2, which is an updated version of type 'H'. */ + /* This has an AMIKey-2, which is type 'H'. */ { .name = "[SiS 496] ASUS PVI-486SP3C", .internal_name = "486sp3c", .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_SIS_496, .init = machine_at_486sp3c_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9109,11 +10264,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -9127,7 +10286,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_SIS_496, .init = machine_at_ls486e_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9149,11 +10308,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -9167,7 +10330,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_SIS_496, .init = machine_at_m4li_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9189,133 +10352,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Revision 1 has a Lance LT38C41L, revision 2 has a Holtek HT6542B. Another variant with a Bestkey KBC might exist as well. */ - { - .name = "[SiS 496] Rise Computer R418", - .internal_name = "r418", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_SIS_496, - .init = machine_at_r418_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PCI, - .flags = MACHINE_PS2_KBC | MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 261120, - .step = 1024 - }, - .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* This has a Holtek HT6542B 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. */ - { - .name = "[SiS 496] Soyo 4SAW2", - .internal_name = "4saw2", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_SIS_496, - .init = machine_at_4saw2_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK(CPU_i486SX, CPU_i486DX, CPU_Am486SX, CPU_Am486DX), - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2_PCIV, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 2048, - .max = 261120, - .step = 1024 - }, - .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* According to MrKsoft, his real 4DPS has an AMIKey-2, which is an updated version - of type 'H'. There are other variants of the board with Holtek HT6542B KBCs. */ - { - .name = "[SiS 496] Zida Tomato 4DP", - .internal_name = "4dps", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_SIS_496, - .init = machine_at_4dps_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT, - .ram = { - .min = 2048, - .max = 261120, - .step = 1024 - }, - .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -9329,7 +10374,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_SIS_496, .init = machine_at_ms4144_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9351,11 +10396,150 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Revision 1 has a Lance LT38C41L, revision 2 has a Holtek HT6542B. + Another variant with a Bestkey KBC might exist as well. */ + { + .name = "[SiS 496] Rise Computer R418", + .internal_name = "r418", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_SIS_496, + .init = machine_at_r418_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PCI, + .flags = MACHINE_PS2_KBC | MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 261120, + .step = 1024 + }, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_HOLTEK | 0x00004800, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* This has a Holtek HT6542B KBC and the BIOS does not send a single non-standard KBC command. + The Holtek is an ASIC clone of AMI 'H' with a Holtek copyright string. */ + { + .name = "[SiS 496] Soyo 4SAW2", + .internal_name = "4saw2", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_SIS_496, + .init = machine_at_4saw2_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK(CPU_i486SX, CPU_i486DX, CPU_Am486SX, CPU_Am486DX), + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2_PCIV, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 2048, + .max = 261120, + .step = 1024 + }, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_HOLTEK | 0x00004800, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* According to MrKsoft, his real 4DPS has an AMIKey-2, which is an updated version + of type 'H'. There are other variants of the board with Holtek HT6542B KBCs. */ + { + .name = "[SiS 496] Zida Tomato 4DP", + .internal_name = "4dps", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_SIS_496, + .init = machine_at_4dps_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT, + .ram = { + .min = 2048, + .max = 261120, + .step = 1024 + }, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -9369,7 +10553,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_UMC_UM8881, .init = machine_at_atc1415_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9391,11 +10575,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, /* UMC UM8886 on-chip KBC. */ + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -9410,7 +10598,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_UMC_UM8881, .init = machine_at_84xxuuda_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9432,17 +10620,66 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, + /* Compaq Presario 7100 / 7200 Series, using MiTAC/Trigon PL4600C (486). */ + /* Has a VIA VT82C42N KBC. */ + { + .name = "[UMC 8881] Compaq Presario 7100/7200 Series 486", + .internal_name = "pl4600c", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_UMC_UM8881, + .init = machine_at_pl4600c_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND | MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, + .step = 1024 + }, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &gd5430_onboard_pci_device, + .snd_device = &ess_1688_device, + .net_device = NULL + }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ { .name = "[UMC 8881] ECS Elite UM8810P-AIO", @@ -9450,7 +10687,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_UMC_UM8881, .init = machine_at_ecs486_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9472,11 +10709,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -9490,7 +10731,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_UMC_UM8881, .init = machine_at_actionpc2600_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9512,11 +10753,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI_TRIGEM | 0x00005a00, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &tgui9440_onboard_pci_device, @@ -9531,7 +10776,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_UMC_UM8881, .init = machine_at_actiontower8400_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9553,11 +10798,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI_TRIGEM | 0x00005a00, /* Guess. */ + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5430_onboard_pci_device, @@ -9572,7 +10821,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_UMC_UM8881, .init = machine_at_m919_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9594,11 +10843,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, /* UMC UM8886 on-chip KBC. */ + .kbc_params = 0x00004800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -9612,7 +10865,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_UMC_UM8881, .init = machine_at_spc7700plw_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9634,11 +10887,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, /* UMC UM8886 on-chip KBC. */ + .kbc_params = 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -9652,7 +10909,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_UMC_UM8881, .init = machine_at_hot433a_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9674,58 +10931,21 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_HOLTEK | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &hot433a_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Compaq Presario 7100 / 7200 Series, using MiTAC/Trigon PL4600C (486). */ - /* Has a VIA VT82C42N KBC. */ - { - .name = "[UMC 8881] Compaq Presario 7100/7200 Series 486", - .internal_name = "pl4600c", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_UMC_UM8881, - .init = machine_at_pl4600c_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND | MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &gd5430_onboard_pci_device, - .snd_device = &ess_1688_device, - .net_device = NULL - }, /* Has a VIA VT82C406 KBC+RTC that likely has identical commands to the VT82C42N. */ { .name = "[VIA VT82C496G] DFI G486VPA", @@ -9733,7 +10953,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_VIA_VT82C496G, .init = machine_at_g486vpa_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9755,11 +10975,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -9773,7 +10997,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_VIA_VT82C496G, .init = machine_at_486vipio2_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9795,11 +11019,15 @@ const machine_t machines[] = { .step = 1024 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -9817,7 +11045,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_MISC, .chipset = MACHINE_CHIPSET_STPC_CLIENT, .init = machine_at_itoxstar_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9832,18 +11060,22 @@ const machine_t machines[] = { .max_multi = 1.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, /* Machine has internal video: ST STPC Atlas */ .ram = { .min = 8192, .max = 131072, .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -9858,7 +11090,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_MISC, .chipset = MACHINE_CHIPSET_STPC_CONSUMER_II, .init = machine_at_arb1423c_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9880,11 +11112,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -9899,7 +11135,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_MISC, .chipset = MACHINE_CHIPSET_STPC_CONSUMER_II, .init = machine_at_arb1479_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9921,11 +11157,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -9940,7 +11180,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_MISC, .chipset = MACHINE_CHIPSET_STPC_CONSUMER_II, .init = machine_at_iach488_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9962,11 +11202,15 @@ const machine_t machines[] = { .step = 32768 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -9981,7 +11225,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_MISC, .chipset = MACHINE_CHIPSET_STPC_ELITE, .init = machine_at_pcm9340_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -9996,18 +11240,22 @@ const machine_t machines[] = { .max_multi = 2.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_PCI_INTERNAL, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_PCI_INTERNAL, /* Machine has internal video: SMI LynxEM+ 712 */ .ram = { .min = 32768, .max = 98304, .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -10022,7 +11270,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_486_MISC, .chipset = MACHINE_CHIPSET_STPC_ATLAS, .init = machine_at_pcm5330_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10037,18 +11285,22 @@ const machine_t machines[] = { .max_multi = 2.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_PCI_INTERNAL, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_PCI_INTERNAL, /* Machine has internal video: ST STPC Atlas */ .ram = { .min = 32768, .max = 131072, .step = 32768 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -10058,13 +11310,14 @@ const machine_t machines[] = { /* Socket 4 machines */ /* 430LX */ + /* Hacer Acer 90M002A V4.10H KBC. */ { .name = "[i430LX] Acer V12P", .internal_name = "v12p", .type = MACHINE_TYPE_SOCKET4, .chipset = MACHINE_CHIPSET_INTEL_430LX, .init = machine_at_v12p_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10086,11 +11339,61 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_ACER | 0x00000000, + .kbc_p1 = 0x004008f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &v12p_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* This has the Phoenix MultiKey KBC firmware. + This is basically an Intel Batman (*NOT* Batman's Revenge) with a fancier + POST screen */ + { + .name = "[i430LX] AMBRA DP60 PCI", + .internal_name = "ambradp60", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_INTEL_430LX, + .init = machine_at_ambradp60_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET4, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, + .min_voltage = 5000, + .max_voltage = 5000, + .min_multi = MACHINE_MULTIPLIER_FIXED, + .max_multi = MACHINE_MULTIPLIER_FIXED + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, + .step = 2048 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -10108,7 +11411,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET4, .chipset = MACHINE_CHIPSET_INTEL_430LX, .init = machine_at_excaliburpci_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10130,11 +11433,15 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -10148,7 +11455,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET4, .chipset = MACHINE_CHIPSET_INTEL_430LX, .init = machine_at_p5mp3_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10170,11 +11477,15 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -10188,7 +11499,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET4, .chipset = MACHINE_CHIPSET_INTEL_430LX, .init = machine_at_dellxp60_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10210,11 +11521,15 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, + .kbc_p1 = 0x00001010, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -10228,7 +11543,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET4, .chipset = MACHINE_CHIPSET_INTEL_430LX, .init = machine_at_opti560l_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10250,27 +11565,29 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* This has the Phoenix MultiKey KBC firmware. - This is basically an Intel Batman (*NOT* Batman's Revenge) with a fancier - POST screen */ + /* Has AMI MegaKey 'H' KBC firmware. */ { - .name = "[i430LX] AMBRA DP60 PCI", - .internal_name = "ambradp60", + .name = "[i430LX] Gigabyte GA-586IS", + .internal_name = "586is", .type = MACHINE_TYPE_SOCKET4, .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_ambradp60_init, - .p1_handler = NULL, + .init = machine_at_586is_init, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10284,19 +11601,23 @@ const machine_t machines[] = { .min_multi = MACHINE_MULTIPLIER_FIXED, .max_multi = MACHINE_MULTIPLIER_FIXED }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE | MACHINE_APM, + .bus_flags = MACHINE_PCI, + .flags = MACHINE_APM, .ram = { .min = 2048, .max = 131072, .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -10310,7 +11631,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET4, .chipset = MACHINE_CHIPSET_INTEL_430LX, .init = machine_at_valuepointp60_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10332,11 +11653,15 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &mach32_onboard_pci_device, @@ -10345,12 +11670,12 @@ const machine_t machines[] = { }, /* This has the Phoenix MultiKey KBC firmware. */ { - .name = "[i430LX] Intel Premiere/PCI", + .name = "[i430LX] Intel Premiere/PCI (Batman's Revenge)", .internal_name = "revenge", .type = MACHINE_TYPE_SOCKET4, .chipset = MACHINE_CHIPSET_INTEL_430LX, .init = machine_at_revenge_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10372,25 +11697,29 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has AMI MegaKey 'H' KBC firmware. */ + /* The M5Pi appears to have a Phoenix MultiKey KBC firmware according to photos. */ { - .name = "[i430LX] Gigabyte GA-586IS", - .internal_name = "586is", + .name = "[i430LX] Micronics M5Pi", + .internal_name = "m5pi", .type = MACHINE_TYPE_SOCKET4, .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_586is_init, - .p1_handler = NULL, + .init = machine_at_m5pi_init, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10405,18 +11734,22 @@ const machine_t machines[] = { .max_multi = MACHINE_MULTIPLIER_FIXED }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_APM, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, .ram = { .min = 2048, .max = 131072, .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess. */ + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -10430,7 +11763,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET4, .chipset = MACHINE_CHIPSET_INTEL_430LX, .init = machine_at_pb520r_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10452,57 +11785,21 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5434_onboard_pci_device, .snd_device = NULL, .net_device = NULL }, - /* The M5Pi appears to have a Phoenix MultiKey KBC firmware according to photos. */ - { - .name = "[i430LX] Micronics M5Pi", - .internal_name = "m5pi", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_m5pi_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET4, - .block = CPU_BLOCK_NONE, - .min_bus = 60000000, - .max_bus = 66666667, - .min_voltage = 5000, - .max_voltage = 5000, - .min_multi = MACHINE_MULTIPLIER_FIXED, - .max_multi = MACHINE_MULTIPLIER_FIXED - }, - .bus_flags = MACHINE_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, - .step = 2048 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* OPTi 596/597 */ /* This uses an AMI KBC firmware in PS/2 mode (it sends command A5 with the @@ -10514,7 +11811,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET4, .chipset = MACHINE_CHIPSET_OPTI_547_597, .init = machine_at_excalibur_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10536,11 +11833,15 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00005000, /* Guess. */ + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -10556,7 +11857,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET4, .chipset = MACHINE_CHIPSET_OPTI_547_597, .init = machine_at_globalyst330_p5_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10578,11 +11879,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -10596,7 +11901,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET4, .chipset = MACHINE_CHIPSET_OPTI_547_597, .init = machine_at_p5vl_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10618,11 +11923,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -10638,7 +11947,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET4, .chipset = MACHINE_CHIPSET_SIS_501, .init = machine_at_excaliburpci2_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10660,25 +11969,29 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_0 | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00005200, /* Guess. */ + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* This has an AMIKey-2, which is an updated version of type 'H'. */ + /* This has an AMIKey-2, which is type 'H'. */ { .name = "[SiS 501] ASUS PCI/I-P5SP4", .internal_name = "p5sp4", .type = MACHINE_TYPE_SOCKET4, .chipset = MACHINE_CHIPSET_SIS_501, .init = machine_at_p5sp4_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10700,93 +12013,59 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Socket 5 machines */ - /* 430NX */ - /* This has the Phoenix MultiKey KBC firmware. */ + /* This has an AMIKey-2, which is type 'H'. */ { - .name = "[i430NX] Intel Premiere/PCI II", - .internal_name = "plato", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430NX, - .init = machine_at_plato_init, - .p1_handler = NULL, + .name = "[SiS 501] ECS SI5PI AIO", + .internal_name = "ecs50x", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_SIS_501, + .init = machine_at_ecs50x_init, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), - .min_bus = 50000000, + .package = CPU_PKG_SOCKET4, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, .max_bus = 66666667, - .min_voltage = 3520, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 1.5 + .min_voltage = 5000, + .max_voltage = 5000, + .min_multi = MACHINE_MULTIPLIER_FIXED, + .max_multi = MACHINE_MULTIPLIER_FIXED }, .bus_flags = MACHINE_PS2_PCI, .flags = MACHINE_IDE_DUAL | MACHINE_APM, .ram = { - .min = 2048, + .min = 8192, .max = 131072, - .step = 2048 + .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Same as Intel Premiere PCI/II, but with a Dell OEM BIOS */ - { - .name = "[i430NX] Dell Dimension XPS Pxxx", - .internal_name = "dellplato", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430NX, - .init = machine_at_dellplato_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3520, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 1.5 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, - .step = 2048 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -10794,45 +12073,55 @@ const machine_t machines[] = { .net_device = NULL }, + /* Socket 4/5 machines */ + /* OPTi 596/597 */ + /* This has AMIKey-2 'H' KBC firmware. */ { - .name = "[i430NX] Siemens-Nixdorf D842", - .internal_name = "d842", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430NX, - .init = machine_at_d842_init, - .p1_handler = NULL, + .name = "[OPTi 597] Taken PCI560-01", + .internal_name = "pci56001", + .type = MACHINE_TYPE_SOCKET4_5, + .chipset = MACHINE_CHIPSET_OPTI_547_597, + .init = machine_at_pci56001_init, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, .cpu = { - .package = CPU_PKG_SOCKET5_7, + .package = CPU_PKG_SOCKET4 | CPU_PKG_SOCKET5_7, .block = CPU_BLOCK_NONE, .min_bus = 50000000, .max_bus = 66666667, - .min_voltage = 3380, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 2.0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .min_voltage = 3520, + .max_voltage = 5000, + .min_multi = 1.0, + .max_multi = 1.5 + }, + .bus_flags = MACHINE_PCI, + .flags = MACHINE_APM, .ram = { - .min = 2048, + .min = 8192, .max = 131072, - .step = 2048 + .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = &d842_device, + .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, + + /* Socket 5 machines */ + /* 430NX */ /* This has the Phoenix MultiKey KBC firmware. This is basically an Intel Premiere/PCI II with a fancier POST screen. */ { @@ -10841,7 +12130,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_INTEL_430NX, .init = machine_at_ambradp90_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10863,11 +12152,15 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -10881,7 +12174,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_INTEL_430NX, .init = machine_at_p54np4_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10903,11 +12196,59 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Same as Intel Premiere PCI/II, but with a Dell OEM BIOS */ + { + .name = "[i430NX] Dell Dimension XPS Pxxx", + .internal_name = "dellplato", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430NX, + .init = machine_at_dellplato_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 3520, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 1.5 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, + .step = 2048 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, + .kbc_p1 = 0x00001010, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -10921,7 +12262,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_INTEL_430NX, .init = machine_at_586ip_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10943,11 +12284,103 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* This has the Phoenix MultiKey KBC firmware. */ + { + .name = "[i430NX] Intel Premiere/PCI II (Plato)", + .internal_name = "plato", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430NX, + .init = machine_at_plato_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 3520, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 1.5 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, + .step = 2048 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has unknown KBC firmware. */ + { + .name = "[i430NX] Siemens-Nixdorf D842", + .internal_name = "d842", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430NX, + .init = machine_at_d842_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 3380, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 2.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, /* Machine has onboard video: TLI ET4000/w32p */ + .ram = { + .min = 2048, + .max = 131072, + .step = 2048 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &d842_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -10961,7 +12394,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_INTEL_430NX, .init = machine_at_tek932_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -10983,11 +12416,15 @@ const machine_t machines[] = { .step = 2048 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00005200, /* Guess. */ + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -11003,7 +12440,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_acerv30_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11025,11 +12462,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_ACER | 0x00000000, + .kbc_p1 = 0x004008f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -11043,7 +12484,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_apollo_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11065,25 +12506,29 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_USE_MBDMA, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has a National Semiconductor PC87332VLJ Super I/O with AMIKey 'F' KBC firmware. */ + /* Has Dell KBC firmware. */ { .name = "[i430FX] Dell OptiPlex GXL/GXM", .internal_name = "optiplexgxl", .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_optiplexgxl_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11105,27 +12550,75 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &s3_phoenix_trio64vplus_onboard_pci_device, .snd_device = &sb_vibra16s_onboard_device, .net_device = NULL /* not yet emulated */ }, + /* KBC On-Chip the VT82C406MV. */ + { + .name = "[i430FX] FIC PT-2000", + .internal_name = "pt2000", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_pt2000_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 3380, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 2.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, + .step = 8192 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_USE_MBDMA, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_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 . */ { - .name = "[i430FX] Intel Advanced/ZP", + .name = "[i430FX] Intel Advanced/ZP (Zappa)", .internal_name = "zappa", .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_zappa_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11147,11 +12640,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -11165,7 +12662,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_powermatev_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11187,11 +12684,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_USE_MBDMA, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -11205,7 +12706,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_hawk_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11227,51 +12728,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* KBC On-Chip the VT82C406MV. */ - { - .name = "[i430FX] FIC PT-2000", - .internal_name = "pt2000", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_pt2000_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK_NONE, - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3380, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 2.0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, - .step = 8192 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_USE_MBDMA, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI_TRIGEM | KBC_FLAG_IS_GREEN | 0x00005a00, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -11280,96 +12745,14 @@ const machine_t machines[] = { }, /* 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. */ - { - .name = "[OPTi 597] TMC PAT54PV", - .internal_name = "pat54pv", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_OPTI_547_597, - .init = machine_at_pat54pv_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3520, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 1.5 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 2048, - .max = 65536, - .step = 2048 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - - /* OPTi 596/597/822 */ - { - .name = "[OPTi 597] Shuttle HOT-543", - .internal_name = "hot543", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_OPTI_547_597, - .init = machine_at_hot543_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK_NONE, - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3520, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 2.0 - }, - .bus_flags = MACHINE_PCIV, - .flags = MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, - .step = 8192 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, + /* Has unknown KBC firmware. */ { .name = "[OPTi 597] Northgate Computer Systems Elegance Pentium 90", .internal_name = "ncselp90", .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_OPTI_547_597, .init = machine_at_ncselp90_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11391,11 +12774,105 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004d00, /* Guess */ + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has unknown KBC firmware. */ + { + .name = "[OPTi 597] Shuttle HOT-543", + .internal_name = "hot543", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_OPTI_547_597, + .init = machine_at_hot543_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 3520, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 2.0 + }, + .bus_flags = MACHINE_PCIV, + .flags = MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, + .step = 8192 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* 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. */ + { + .name = "[OPTi 597] TMC PAT54PV", + .internal_name = "pat54pv", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_OPTI_547_597, + .init = machine_at_pat54pv_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86), + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 3520, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 1.5 + }, + .bus_flags = MACHINE_VLB, + .flags = MACHINE_APM, + .ram = { + .min = 2048, + .max = 65536, + .step = 2048 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00005000, /* Guess. */ + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -11404,14 +12881,14 @@ const machine_t machines[] = { }, /* SiS 85C50x */ - /* This has an AMIKey-2, which is an updated version of type 'H'. */ + /* This has an AMIKey-2, which is type 'H'. */ { .name = "[SiS 501] ASUS PCI/I-P54SP4", .internal_name = "p54sp4", .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_SIS_501, .init = machine_at_p54sp4_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11433,25 +12910,29 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* This has an AMIKey-2, which is an updated version of type 'H'. */ + /* This has an AMIKey-2, which is type 'H'. */ { .name = "[SiS 501] BCM SQ-588", .internal_name = "sq588", .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_SIS_501, .init = machine_at_sq588_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11473,11 +12954,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -11491,7 +12976,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_SIS_501, .init = machine_at_p54sps_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11513,25 +12998,29 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = &keyboard_at_ami_device, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00021400, /* Guess. */ + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* This has an AMIKey-2, which is an updated version of type 'H'. */ + /* This has an AMIKey-2, which is type 'H'. */ { .name = "[SiS 5501] MSI MS-5109", .internal_name = "ms5109", .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_SIS_5501, .init = machine_at_ms5109_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11553,11 +13042,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_0 | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -11566,12 +13059,12 @@ const machine_t machines[] = { }, /* Has AMIKey Z(!) KBC firmware. */ { - .name = "[SiS 5501] TriGem Torino", + .name = "[SiS 5501] Olivetti (TriGem) Torino", .internal_name = "torino", .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_SIS_5501, .init = machine_at_torino_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11593,11 +13086,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI_TRIGEM | KBC_FLAG_IS_GREEN | 0x00005a00, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &tgui9660_onboard_pci_device, @@ -11606,14 +13103,14 @@ const machine_t machines[] = { }, /* UMC 889x */ - /* This has an AMIKey-2, which is an updated version of type 'H'. */ + /* This has an AMIKey-2, which is type 'H'. */ { .name = "[UMC 889x] Shuttle HOT-539", .internal_name = "hot539", .type = MACHINE_TYPE_SOCKET5, .chipset = MACHINE_CHIPSET_UMC_UM8890BF, .init = machine_at_hot539_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11635,11 +13132,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -11649,7 +13150,7 @@ const machine_t machines[] = { /* Socket 7 (Single Voltage) machines */ /* 430FX */ - /* This has an AMIKey-2, which is an updated version of type 'H'. + /* This has an AMIKey-2, which is type 'H'. This also seems to be revision 2.1 with the FDC37C665 SIO. */ { .name = "[i430FX] ASUS P/I-P55TP4XE", @@ -11657,7 +13158,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_p54tp4xe_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11679,11 +13180,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_USE_MBDMA, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -11697,7 +13202,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_p54tp4xe_mr_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11719,11 +13224,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -11737,7 +13246,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_exp8551_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11759,11 +13268,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -11779,7 +13292,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_gw2katx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11794,18 +13307,22 @@ const machine_t machines[] = { .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT, /* Machine has optional onboard sound: Crystal CS4232-KQ */ .ram = { .min = 8192, .max = 131072, .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -11820,7 +13337,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_vectra54_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11842,11 +13359,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &s3_phoenix_trio64_onboard_pci_device, @@ -11857,12 +13378,12 @@ const machine_t machines[] = { PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ { - .name = "[i430FX] Intel Advanced/ATX", + .name = "[i430FX] Intel Advanced/ATX (Thor)", .internal_name = "thor", .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_thor_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11877,18 +13398,22 @@ const machine_t machines[] = { .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM | MACHINE_GAMEPORT, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM | MACHINE_GAMEPORT, /* Machine has optional onboard sound: Crystal CS4232-KQ */ .ram = { .min = 8192, .max = 131072, .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &s3_phoenix_trio64vplus_onboard_pci_device, @@ -11899,12 +13424,12 @@ const machine_t machines[] = { PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ { - .name = "[i430FX] Intel Advanced/ATX (MR BIOS)", + .name = "[i430FX] Intel Advanced/ATX (Thor) (MR BIOS)", .internal_name = "mrthor", .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_mrthor_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11919,18 +13444,22 @@ const machine_t machines[] = { .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT, /* Machine has optional onboard video: S3 Trio64V+ and optional onboard sound: Crystal CS4232-KQ */ .ram = { .min = 8192, .max = 131072, .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -11941,12 +13470,12 @@ const machine_t machines[] = { PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ { - .name = "[i430FX] Intel Advanced/EV", + .name = "[i430FX] Intel Advanced/EV (Endeavor)", .internal_name = "endeavor", .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_endeavor_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = machine_at_endeavor_gpio_handler, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -11968,25 +13497,29 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &s3_phoenix_trio64_onboard_pci_device, .snd_device = &sb_vibra16s_onboard_device, .net_device = NULL }, - /* This has an AMIKey-2, which is an updated version of type 'H'. */ + /* This has an AMIKey-2, which is type 'H'. */ { .name = "[i430FX] MSI MS-5119", .internal_name = "ms5119", .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_ms5119_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12008,11 +13541,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_USE_MBDMA, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -12027,7 +13564,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_pb640_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12049,11 +13586,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5440_onboard_pci_device, @@ -12067,7 +13608,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_mb500n_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12089,25 +13630,29 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_0 | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has an AMI MegaKey 'H' KBC firmware (1992). */ + /* Has an AMIKEY-2 'H' KBC firmware (1992). */ { .name = "[i430FX] QDI FMB", .internal_name = "fmb", .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430FX, .init = machine_at_fmb_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12129,11 +13674,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -12151,7 +13700,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430HX, .init = machine_at_acerv35n_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12173,11 +13722,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -12191,7 +13744,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430HX, .init = machine_at_ap53_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12213,25 +13766,29 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* [TEST] Has a VIA 82C42N KBC, with AMIKey F KBC firmware. */ + /* [TEST] Has a VIA 82C42N KBC that emulates the AMIKey F KBC firmware. */ { .name = "[i430HX] Biostar MB-8500TUC", .internal_name = "8500tuc", .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430HX, .init = machine_at_8500tuc_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12253,25 +13810,29 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - + /* It possible has AMIKEY-2 'H' KBC firmware. */ { .name = "[i430HX] Siemens-Nixdorf D943", .internal_name = "d943", .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430HX, .init = machine_at_d943_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12293,11 +13854,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 511, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &d943_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5436_onboard_pci_device, @@ -12314,7 +13879,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_INTEL_430VX, .init = machine_at_gw2kma_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12329,18 +13894,22 @@ const machine_t machines[] = { .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, /* Machine has internal video: ATI Mach64GT-B 3D Rage II */ .ram = { .min = 8192, .max = 131072, .step = 4096 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -12356,7 +13925,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_SIS_5501, .init = machine_at_5sbm2_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12378,11 +13947,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &c5sbm2_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -12391,14 +13964,14 @@ const machine_t machines[] = { }, /* SiS 5511 */ - /* Has AMIKey H KBC firmware (AMIKey-2). */ + /* Has Megakey 'R' KBC */ { - .name = "[SiS 5511] AOpen AP5S", - .internal_name = "ap5s", + .name = "[SiS 5511] AMI Atlas PCI-II", + .internal_name = "amis727", .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_SIS_5511, - .init = machine_at_ap5s_init, - .p1_handler = NULL, + .init = machine_at_amis727_init, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12420,11 +13993,59 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00005200, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has AMIKey H KBC firmware (AMIKey-2). */ + { + .name = "[SiS 5511] AOpen AP5S", + .internal_name = "ap5s", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_SIS_5511, + .init = machine_at_ap5s_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 3380, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 3.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 524288, + .step = 8192 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = &ap5s_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -12438,7 +14059,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_SIS_5511, .init = machine_at_pc140_6260_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12460,11 +14081,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, /* Guess. */ + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &gd5436_onboard_pci_device, @@ -12478,7 +14103,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7_3V, .chipset = MACHINE_CHIPSET_SIS_5511, .init = machine_at_ms5124_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12500,51 +14125,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has Megakey 'R' KBC */ - { - .name = "[SiS 5511] AMI Atlas PCI-II", - .internal_name = "amis727", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_SIS_5511, - .init = machine_at_amis727_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK_NONE, - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3380, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 8192, - .max = 524288, - .step = 8192 - }, - .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_USE_MBDMA, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -12562,7 +14151,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430HX, .init = machine_at_acerm3a_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12584,11 +14173,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -12602,7 +14195,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430HX, .init = machine_at_p55t2p4_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12611,7 +14204,7 @@ const machine_t machines[] = { .block = CPU_BLOCK_NONE, .min_bus = 50000000, .max_bus = 75000000, - .min_voltage = 2500, + .min_voltage = 2100, .max_voltage = 3520, .min_multi = 1.5, .max_multi = 4.0 @@ -12624,25 +14217,29 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* The base board has a Holtek HT6542B with the AMIKey-2 (updated 'H') KBC firmware. */ + /* The base board has a Holtek HT6542B which emulates the AMIKey-2 ('H') KBC firmware. */ { .name = "[i430HX] ASUS P/I-P65UP5 (C-P55T2D)", .internal_name = "p65up5_cp55t2d", .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430HX, .init = machine_at_p65up5_cp55t2d_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12664,17 +14261,113 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_HOLTEK | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, + /* OEM-only Intel CU430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ + { + .name = "[i430HX] Intel CU430HX (Cumberland)", + .internal_name = "cu430hx", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430HX, + .init = machine_at_cu430hx_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, + CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 2800, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 3.5 + }, + .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_USB, /* Machine has internal video: ATI Mach64GT 3D Rage and internal NIC: Intel 82557 */ + .ram = { + .min = 8192, + .max = 524288, + .step = 4096 + }, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = &sb_vibra16c_onboard_device, + .net_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 . */ + { + .name = "[i430HX] Intel TC430HX (Tucson)", + .internal_name = "tc430hx", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430HX, + .init = machine_at_tc430hx_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, + CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 2800, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 3.5 + }, + .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, + .flags = MACHINE_VIDEO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, /* Has internal sound: Yamaha YMF701-S */ + .ram = { + .min = 8192, + .max = 524288, + .step = 4096 + }, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &s3_virge_375_pci_device, + .snd_device = NULL, + .net_device = NULL + }, /* Has a SM(S)C FDC37C935 Super I/O chip with on-chip KBC with Phoenix MultiKey/42 (version 1.38) KBC firmware. */ { @@ -12683,7 +14376,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430HX, .init = machine_at_m7shi_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12705,183 +14398,21 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_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 . */ - { - .name = "[i430HX] Intel TC430HX (Tucson)", - .internal_name = "tc430hx", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_tc430hx_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, - CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 2800, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_VIDEO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, /* Has internal sound: Yamaha YMF701-S */ - .ram = { - .min = 8192, - .max = 524288, - .step = 4096 - }, - .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &s3_virge_375_pci_device, - .snd_device = NULL, - .net_device = NULL - }, - /* OEM version of Intel TC430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ - { - .name = "[i430HX] Toshiba Infinia 7201", - .internal_name = "infinia7200", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_infinia7200_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, - CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 2800, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_VIDEO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, /* Has internal sound: Yamaha YMF701-S */ - .ram = { - .min = 8192, - .max = 524288, - .step = 4096 - }, - .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &s3_virge_375_pci_device, - .snd_device = NULL, - .net_device = NULL - }, - /* OEM-only Intel CU430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ - { - .name = "[i430HX] Intel CU430HX (Cumberland)", - .internal_name = "cu430hx", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_cu430hx_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, - CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 2800, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, - .step = 4096 - }, - .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = &sb_vibra16c_onboard_device, - .net_device = NULL - }, - /* OEM-only Intel CU430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ - { - .name = "[i430HX] Toshiba Equium 5200D", - .internal_name = "equium5200", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_equium5200_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, - CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 2800, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, - .step = 4096 - }, - .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = &sb_vibra16c_onboard_device, - .net_device = NULL - }, /* Unknown PS/2 KBC. */ { .name = "[i430HX] Radisys EPC-2102", @@ -12889,7 +14420,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430HX, .init = machine_at_epc2102_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12911,11 +14442,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_USE_CONFIG, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00005200, /* Guess. */ + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -12932,7 +14467,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430HX, .init = machine_at_pcv90_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12948,18 +14483,22 @@ const machine_t machines[] = { .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, /* Machine has internal video: ATI Mach64GT-B 3D Rage II */ .ram = { .min = 8192, .max = 524288, .step = 4096 }, .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -12974,7 +14513,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430HX, .init = machine_at_p55t2s_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -12996,17 +14535,111 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, + /* OEM-only Intel CU430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ + { + .name = "[i430HX] Toshiba Equium 5200D", + .internal_name = "equium5200", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430HX, + .init = machine_at_equium5200_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, + CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 2800, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 3.5 + }, + .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_USB, /* Machine has internal video: ATI Mach64GT 3D Rage and internal NIC: Intel 82557 */ + .ram = { + .min = 8192, + .max = 524288, + .step = 4096 + }, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = &sb_vibra16c_onboard_device, + .net_device = NULL + }, + /* OEM version of Intel TC430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ + { + .name = "[i430HX] Toshiba Infinia 7201", + .internal_name = "infinia7200", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430HX, + .init = machine_at_infinia7200_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, + CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 2800, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 3.5 + }, + .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, + .flags = MACHINE_VIDEO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, /* Has internal sound: Yamaha YMF701-S */ + .ram = { + .min = 8192, + .max = 524288, + .step = 4096 + }, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &s3_virge_375_pci_device, + .snd_device = NULL, + .net_device = NULL + }, /* 430VX */ /* This has the VIA VT82C42N or Holtek HT6542B KBC. */ @@ -13016,7 +14649,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430VX, .init = machine_at_ap5vm_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13038,11 +14671,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -13056,7 +14693,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430VX, .init = machine_at_p55tvp4_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13078,11 +14715,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -13097,7 +14738,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430VX, .init = machine_at_5ivg_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13119,25 +14760,29 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, /* Guess. */ + .kbc_params = KBC_VEN_AMI | 0x00004800, /* Guess. */ + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* [TEST] Has AMIKey 'F' KBC firmware on a VIA VT82C42N KBC. */ + /* [TEST] Has a VIA VT82C42N KBC. */ { .name = "[i430VX] Biostar MB-8500TVX-A", .internal_name = "8500tvxa", .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430VX, .init = machine_at_8500tvxa_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13159,11 +14804,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -13178,7 +14827,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430VX, .init = machine_at_presario2240_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13200,11 +14849,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &s3_trio64v2_dx_onboard_pci_device, @@ -13219,7 +14872,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430VX, .init = machine_at_presario4500_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13241,11 +14894,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &s3_trio64v2_dx_onboard_pci_device, @@ -13260,7 +14917,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430VX, .init = machine_at_dellhannibalp_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13276,18 +14933,22 @@ const machine_t machines[] = { .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, /* Machine has internal video: S3 Trio64V+ */ .ram = { .min = 8192, .max = 131072, .step = 4096 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -13301,7 +14962,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430VX, .init = machine_at_p5vxb_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13323,11 +14984,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -13342,7 +15007,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430VX, .init = machine_at_p55va_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13364,11 +15029,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -13383,7 +15052,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430VX, .init = machine_at_gw2kte_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13406,11 +15075,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -13425,7 +15098,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430VX, .init = machine_at_brio80xx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13440,18 +15113,66 @@ const machine_t machines[] = { .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, /* Machine has internal video: S3 Trio64V2/DX */ .ram = { .min = 8192, .max = 131072, .step = 4096 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has the AMIKey-2 ('H') KBC firmware. */ + { + .name = "[i430VX] LG IBM Multinet x52 (MSI MS-5136)", + .internal_name = "lgibmx52", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430VX, + .init = machine_at_lgibmx52_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 75000000, + .min_voltage = 2100, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 4.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, + .step = 4096 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &lgibmx52_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -13462,12 +15183,12 @@ const machine_t machines[] = { PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ { - .name = "[i430VX] Packard Bell Multimedia C110", + .name = "[i430VX] Packard Bell Multimedia C110 (PB680/PB682/PB685)", .internal_name = "pb680", .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430VX, .init = machine_at_pb680_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13490,11 +15211,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &s3_phoenix_trio64vplus_onboard_pci_device, @@ -13504,12 +15229,12 @@ const machine_t machines[] = { /* Has a SM(S)C FDC37C935 Super I/O chip with on-chip KBC with Phoenix MultiKey/42 (version 1.38) KBC firmware. */ { - .name = "[i430VX] Packard Bell Multimedia M415", + .name = "[i430VX] Packard Bell Multimedia M415 (PB810)", .internal_name = "pb810", .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430VX, .init = machine_at_pb810_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13524,18 +15249,22 @@ const machine_t machines[] = { .max_multi = 4.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM, /* Machine has internal video: S3 Trio64V2/DX */ .ram = { .min = 4096, .max = 131072, .step = 4096 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -13550,7 +15279,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430VX, .init = machine_at_mb520n_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13572,11 +15301,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -13591,7 +15324,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430VX, .init = machine_at_i430vx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13613,11 +15346,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -13633,7 +15370,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430TX, .init = machine_at_nupro592_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13655,25 +15392,29 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &chips_69000_onboard_device, .snd_device = NULL, .net_device = NULL }, - /* This has the AMIKey KBC firmware, which is an updated 'F' type (YM430TX is based on the TX97). */ + /* This has the AMIKey KBC firmware, which is type 'F' (YM430TX is based on the TX97). */ { .name = "[i430TX] ASUS TX97", .internal_name = "tx97", .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430TX, .init = machine_at_tx97_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13682,7 +15423,7 @@ const machine_t machines[] = { .block = CPU_BLOCK_NONE, .min_bus = 50000000, .max_bus = 75000000, - .min_voltage = 2500, + .min_voltage = 2100, .max_voltage = 3520, .min_multi = 1.5, .max_multi = 3.5 @@ -13695,11 +15436,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -13721,7 +15466,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430TX, .init = machine_at_optiplexgn_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13744,11 +15489,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, /* Stop-gap measure until the Trio64V2/GX is emulated, as both use the same VBIOS. */ @@ -13763,7 +15512,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430TX, .init = machine_at_tomahawk_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13785,25 +15534,29 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &s3_trio64v2_dx_onboard_pci_device, .snd_device = &cs4236b_device, .net_device = &pcnet_am79c973_onboard_device }, - /* This has the AMIKey KBC firmware, which is an updated 'F' type. */ + /* This has the Winbond W83977 Super I/O Chip with AMIKey-2 KBC firmware, which is type 'H'. */ { .name = "[i430TX] Intel YM430TX (Yamamoto)", .internal_name = "ym430tx", .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430TX, .init = machine_at_ym430tx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13826,11 +15579,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -13850,7 +15607,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430TX, .init = machine_at_thunderbolt_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13873,11 +15630,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -13885,14 +15646,14 @@ const machine_t machines[] = { .net_device = NULL }, /* Has a SM(S)C FDC37C67x Super I/O chip with on-chip KBC with Phoenix or - AMIKey-2 KBC firmware. */ + AMI MEGAKEY '5' KBC firmware. */ { .name = "[i430TX] NEC Mate NX MA23C", .internal_name = "ma23c", .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430TX, .init = machine_at_ma23c_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13906,33 +15667,37 @@ const machine_t machines[] = { .min_multi = 1.5, .max_multi = 3.5 }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .bus_flags = MACHINE_PS2_PCIONLY | MACHINE_BUS_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, /* Machine has internal video: Cirrus Logic CL-GD5465 and internal sound: Yamaha YMF715 */ .ram = { .min = 8192, .max = 262144, .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* This has the Phoenix MultiKey KBC firmware. */ + /* This has the Phoenix MultiKey KBC firmware on the NSC Suepr I/O chip. */ { .name = "[i430TX] Packard Bell PB790", .internal_name = "an430tx", .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430TX, .init = machine_at_an430tx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13948,18 +15713,22 @@ const machine_t machines[] = { .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI, /* Machine has internal video: ATI Mach64GT-B 3D Rage II */ .ram = { .min = 8192, .max = 262144, .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -13974,7 +15743,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430TX, .init = machine_at_mb540n_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -13996,11 +15765,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14014,7 +15787,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430TX, .init = machine_at_56a5_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14036,25 +15809,29 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* [TEST] Has AMIKey 'H' KBC firmware. */ + /* [TEST] Has AMIKey 'H' KBC firmware on the Winbond W83967 Super I/O chip. */ { .name = "[i430TX] Supermicro P5MMS98", .internal_name = "p5mms98", .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430TX, .init = machine_at_p5mms98_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14076,11 +15853,15 @@ const machine_t machines[] = { .step = 4096 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14094,7 +15875,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_INTEL_430TX, .init = machine_at_richmond_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14116,11 +15897,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14137,7 +15922,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_VIA_APOLLO_VPX, .init = machine_at_ficva502_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14159,11 +15944,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14180,7 +15969,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_VIA_APOLLO_VP3, .init = machine_at_ficpa2012_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14202,11 +15991,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14221,7 +16014,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_VIA_APOLLO_VP3, .init = machine_at_via809ds_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14243,18 +16036,22 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - + /* SiS 5571 */ /* Has the SiS 5571 chipset with on-chip KBC. */ { @@ -14263,7 +16060,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_SIS_5571, .init = machine_at_cb52xsi_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14285,11 +16082,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14303,7 +16104,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_SIS_5571, .init = machine_at_ms5146_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14325,11 +16126,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14343,7 +16148,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_SIS_5571, .init = machine_at_r534f_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14365,11 +16170,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14385,7 +16194,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_SIS_5581, .init = machine_at_sp97xv_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14407,11 +16216,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14425,7 +16238,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_SIS_5581, .init = machine_at_sq578_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14447,11 +16260,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14467,7 +16284,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_SIS_5591, .init = machine_at_ms5172_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14489,11 +16306,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14503,13 +16324,57 @@ const machine_t machines[] = { /* ALi ALADDiN IV+ */ /* Has the ALi M1543 southbridge with on-chip KBC. */ + { + .name = "[ALi ALADDiN IV+] Biostar M5ATA", + .internal_name = "m5ata", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_ALI_ALADDIN_IV_PLUS, + .init = machine_at_m5ata_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, + .min_voltage = 2100, + .max_voltage = 3500, + .min_multi = 1.5, + .max_multi = 4.5 + }, + .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 8192, + .max = 262144, + .step = 8192 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has the ALi M1543 southbridge with on-chip KBC. */ { .name = "[ALi ALADDiN IV+] MSI MS-5164", .internal_name = "ms5164", .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_ALI_ALADDIN_IV_PLUS, .init = machine_at_ms5164_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14531,11 +16396,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14549,7 +16418,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET7, .chipset = MACHINE_CHIPSET_ALI_ALADDIN_IV_PLUS, .init = machine_at_m560_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14558,7 +16427,7 @@ const machine_t machines[] = { .block = CPU_BLOCK_NONE, .min_bus = 50000000, .max_bus = 83333333, - .min_voltage = 2500, + .min_voltage = 2100, .max_voltage = 3520, .min_multi = 1.5, .max_multi = 3.0 @@ -14571,11 +16440,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14592,7 +16465,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKETS7, .chipset = MACHINE_CHIPSET_ALI_ALADDIN_V, .init = machine_at_p5a_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14607,18 +16480,22 @@ const machine_t machines[] = { .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, /* Machine has internal sound: ESS Solo-1 */ .ram = { .min = 8192, .max = 1572864, .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14633,7 +16510,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKETS7, .chipset = MACHINE_CHIPSET_ALI_ALADDIN_V, .init = machine_at_m579_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14648,18 +16525,22 @@ const machine_t machines[] = { .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, /* Machine has internal sound: C-Media CMI8330 */ .ram = { .min = 8192, .max = 1572864, .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14673,7 +16554,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKETS7, .chipset = MACHINE_CHIPSET_ALI_ALADDIN_V, .init = machine_at_gwlucas_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14695,11 +16576,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14713,7 +16598,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKETS7, .chipset = MACHINE_CHIPSET_ALI_ALADDIN_V, .init = machine_at_5aa_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14735,11 +16620,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14753,7 +16642,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKETS7, .chipset = MACHINE_CHIPSET_ALI_ALADDIN_V, .init = machine_at_5ax_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14775,11 +16664,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14796,7 +16689,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKETS7, .chipset = MACHINE_CHIPSET_VIA_APOLLO_MVP3, .init = machine_at_ax59pro_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14818,17 +16711,66 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, + /* Has the VIA VT82C596A southbridge with on-chip KBC identical to the VIA + VT82C42N. Sadly likely abuses cache on Cyrix 6x86MX and MII CPUs (Cyrix MII being what most socket 7 eMachines PCs used) , so they are blocked and it's thus named after the only known eMachines with an AMD K6-2 CPU here */ + { + .name = "[VIA MVP3] eMachines eTower 300k", + .internal_name = "delhi3", + .type = MACHINE_TYPE_SOCKETS7, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_MVP3, + .init = machine_at_delhi3_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_Cx6x86MX), + .min_bus = 66666667, + .max_bus = 124242424, + .min_voltage = 2000, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 5.5 + }, + .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, /* Has internal video: ATI 3D Rage IIc AGP (Rage 2) */ + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_SOUND | MACHINE_USB, + .ram = { + .min = 8192, + .max = 524288, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = &cs4235_onboard_device, + .net_device = NULL + }, /* Has the VIA VT82C586B southbridge with on-chip KBC identical to the VIA VT82C42N. */ { @@ -14837,7 +16779,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKETS7, .chipset = MACHINE_CHIPSET_VIA_APOLLO_MVP3, .init = machine_at_mvp3_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14859,11 +16801,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14878,7 +16824,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKETS7, .chipset = MACHINE_CHIPSET_VIA_APOLLO_MVP3, .init = machine_at_ficva503a_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14900,11 +16846,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -14919,7 +16869,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKETS7, .chipset = MACHINE_CHIPSET_VIA_APOLLO_MVP3, .init = machine_at_5emapro_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -14941,58 +16891,21 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has the VIA VT82C596A southbridge with on-chip KBC identical to the VIA - VT82C42N. */ - { - .name = "[VIA MVP3] eMachines eTower 3xxc", - .internal_name = "delhi3", - .type = MACHINE_TYPE_SOCKETS7, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_MVP3, - .init = machine_at_delhi3_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 124242424, - .min_voltage = 2000, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 5.5 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, /* Has internal video: ATI 3D Rage IIc AGP (Rage 2) */ - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_SOUND | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, - .step = 8192 - }, - .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = &cs4235_onboard_device, - .net_device = NULL - }, /* SiS 5591 */ /* Has the SiS 5591 chipset with on-chip KBC. */ @@ -15002,7 +16915,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKETS7, .chipset = MACHINE_CHIPSET_SIS_5591, .init = machine_at_5sg100_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15024,11 +16937,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -15038,14 +16955,14 @@ const machine_t machines[] = { /* Socket 8 machines */ /* 450KX */ - /* This has an AMIKey-2, which is an updated version of type 'H'. */ + /* This has an AMIKey-2, which is type 'H'. */ { .name = "[i450KX] AOpen AP61", .internal_name = "ap61", .type = MACHINE_TYPE_SOCKET8, .chipset = MACHINE_CHIPSET_INTEL_450KX, .init = machine_at_ap61_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15067,25 +16984,29 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000008f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* This has an AMIKey-2, which is an updated version of type 'H'. */ + /* This has an AMIKey-2, which is type 'H'. */ { .name = "[i450KX] ASUS P/I-P6RP4", .internal_name = "p6rp4", .type = MACHINE_TYPE_SOCKET8, .chipset = MACHINE_CHIPSET_INTEL_450KX, .init = machine_at_p6rp4_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15107,11 +17028,59 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = MACHINE_DMA_1, + .default_jumpered_ecp_dma = 1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* This has a PC87306 with unknown keyboard controller firmware (Phoenix?). */ + { + .name = "[i450KX] FIC PO-6000", + .internal_name = "ficpo6000", + .type = MACHINE_TYPE_SOCKET8, + .chipset = MACHINE_CHIPSET_INTEL_450KX, + .init = machine_at_ficpo6000_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET8, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, + .min_voltage = 2100, + .max_voltage = 3500, + .min_multi = 1.5, + .max_multi = 8.0 + }, + .bus_flags = MACHINE_PS2_PCI, /* Machine has AMB */ + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 524288, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_1, + .default_jumpered_ecp_dma = 1, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &ficpo6000_device, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -15128,7 +17097,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET8, .chipset = MACHINE_CHIPSET_INTEL_440FX, .init = machine_at_acerv60n_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15150,25 +17119,29 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* The base board has a Holtek HT6542B with AMIKey-2 (updated 'H') KBC firmware. */ + /* The base board has a Holtek HT6542B with AMIKey-2 ('H') KBC firmware. */ { .name = "[i440FX] ASUS P/I-P65UP5 (C-P6ND)", .internal_name = "p65up5_cp6nd", .type = MACHINE_TYPE_SOCKET8, .chipset = MACHINE_CHIPSET_INTEL_440FX, .init = machine_at_p65up5_cp6nd_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15190,25 +17163,29 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_HOLTEK | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has a VIA VT82C42N with likely AMIKey 'F' KBC firmware. */ + /* Has a VIA VT82C42N KBC. */ { .name = "[i440FX] Biostar MB-8600TTC", .internal_name = "8600ttc", .type = MACHINE_TYPE_SOCKET8, .chipset = MACHINE_CHIPSET_INTEL_440FX, .init = machine_at_8600ttc_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15230,11 +17207,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -15248,7 +17229,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET8, .chipset = MACHINE_CHIPSET_INTEL_440FX, .init = machine_at_dellvenus_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15270,11 +17251,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -15288,7 +17273,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET8, .chipset = MACHINE_CHIPSET_INTEL_440FX, .init = machine_at_gw2kvenus_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15310,25 +17295,29 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = &cs4236_onboard_device, .net_device = NULL }, - /* Has the AMIKey-2 (updated 'H') KBC firmware. */ + /* Has the AMIKey-2 ('H') KBC firmware. */ { .name = "[i440FX] Gigabyte GA-686NX", .internal_name = "686nx", .type = MACHINE_TYPE_SOCKET8, .chipset = MACHINE_CHIPSET_INTEL_440FX, .init = machine_at_686nx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15350,11 +17339,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -15365,12 +17358,12 @@ const machine_t machines[] = { PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ { - .name = "[i440FX] Intel AP440FX", + .name = "[i440FX] Intel AP440FX (Apollo)", .internal_name = "ap440fx", .type = MACHINE_TYPE_SOCKET8, .chipset = MACHINE_CHIPSET_INTEL_440FX, .init = machine_at_ap440fx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15392,11 +17385,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &s3_virge_325_onboard_pci_device, @@ -15407,12 +17404,12 @@ const machine_t machines[] = { PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ { - .name = "[i440FX] Intel VS440FX", + .name = "[i440FX] Intel VS440FX (Venus)", .internal_name = "vs440fx", .type = MACHINE_TYPE_SOCKET8, .chipset = MACHINE_CHIPSET_INTEL_440FX, .init = machine_at_vs440fx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15434,25 +17431,29 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = &cs4236_onboard_device, .net_device = NULL }, - /* Has the AMIKey-2 (updated 'H') KBC firmware. */ + /* Has the AMIKey-2 ('H') KBC firmware. */ { .name = "[i440FX] LG IBM Multinet x61 (MSI MS-6106)", .internal_name = "lgibmx61", .type = MACHINE_TYPE_SOCKET8, .chipset = MACHINE_CHIPSET_INTEL_440FX, .init = machine_at_lgibmx61_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15467,18 +17468,22 @@ const machine_t machines[] = { .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, /* Machine has internal SCSI: Adaptec AIC-78xx */ + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, /* Machine has internal SCSI: Adaptec AIC-7880U */ .ram = { .min = 40960, .max = 524288, .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -15493,7 +17498,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET8, .chipset = MACHINE_CHIPSET_INTEL_440FX, .init = machine_at_m6mi_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15508,32 +17513,36 @@ const machine_t machines[] = { .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, /* Machine has internal sound: Creative Vibra 16C */ .ram = { .min = 8192, .max = 786432, .step = 8192 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has a VIA VT82C42N KBC with likely AMI MegaKey firmware. */ + /* Has a VIA VT82C42N KBC. */ { .name = "[i440FX] PC Partner MB600N", .internal_name = "mb600n", .type = MACHINE_TYPE_SOCKET8, .chipset = MACHINE_CHIPSET_INTEL_440FX, .init = machine_at_mb600n_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15555,11 +17564,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -15568,7 +17581,7 @@ const machine_t machines[] = { }, /* Slot 1 machines */ - /* ALi ALADDiN V */ + /* ALi ALADDiN-PRO II */ /* Has the ALi M1543C southbridge with on-chip KBC. */ { .name = "[ALi ALADDiN-PRO II] PC Chips M729", @@ -15576,7 +17589,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_ALI_ALADDIN_PRO_II, .init = machine_at_m729_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15598,11 +17611,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -15619,7 +17636,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440FX, .init = machine_at_acerv62x_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15641,25 +17658,29 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* The base board has a Holtek HT6542B KBC with AMIKey-2 (updated 'H') KBC firmware. */ + /* The base board has a Holtek HT6542B KBC which emulates the AMIKEY-2 'H' KBC firmware. */ { .name = "[i440FX] ASUS P/I-P65UP5 (C-PKND)", .internal_name = "p65up5_cpknd", .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440FX, .init = machine_at_p65up5_cpknd_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15681,26 +17702,29 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_HOLTEK | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = 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. */ + /* This has a Holtek KBC. */ { .name = "[i440FX] ASUS KN97", .internal_name = "kn97", .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440FX, .init = machine_at_kn97_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15722,11 +17746,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 127, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_HOLTEK | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -15743,7 +17771,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440LX, .init = machine_at_lx6_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15765,11 +17793,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -15784,7 +17816,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440LX, .init = machine_at_optiplexgxa_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15798,7 +17830,7 @@ const machine_t machines[] = { .min_multi = 1.5, .max_multi = 5.0 }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, + .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, /* Video: ATi 3D Rage Pro, Network: 3Com 3C905, Sound: Crystal CS4236B */ .ram = { .min = 8192, @@ -15806,11 +17838,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, /* not yet emulated */ @@ -15825,7 +17861,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440LX, .init = machine_at_spitfire_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15840,18 +17876,22 @@ const machine_t machines[] = { .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, /* Machine has internal sound: Yamaha YMF701 */ .ram = { .min = 8192, .max = 1048576, .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -15866,7 +17906,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440LX, .init = machine_at_ma30d_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15880,7 +17920,7 @@ const machine_t machines[] = { .min_multi = 1.5, .max_multi = 8.0 }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, /* Has internal video: SGS Thompson Riva 128 AGP, network: NEC PK-UG-X006 (Intel 82558B chip) and sound: OAK Audia 3D (OTI-610) */ + .bus_flags = MACHINE_PS2_PCIONLY | MACHINE_BUS_USB, /* Has internal video: SGS Thompson Riva 128 AGP, network: NEC PK-UG-X006 (Intel 82558B chip) and sound: OAK Audia 3D (OTI-610) for MA23D or YAMAHA YMF724 for MA30D */ .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, .ram = { .min = 8192, @@ -15888,11 +17928,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x0000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -15909,7 +17953,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440EX, .init = machine_at_p6i440e2_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -15931,11 +17975,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -15947,53 +17995,12 @@ const machine_t machines[] = { /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[i440BX] ASUS P2B-LS", - .internal_name = "p2bls", + .name = "[i440BX] ABIT BF6", + .internal_name = "bf6", .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_p2bls_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SLOT1, - .block = CPU_BLOCK_NONE, - .min_bus = 50000000, - .max_bus = 112121212, - .min_voltage = 1300, - .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 - }, - .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, /* Machine has internal SCSI: Adaptec AIC-7890AB */ - .ram = { - .min = 8192, - .max = 1048576, - .step = 8192 - }, - .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC - firmware. */ - { - .name = "[i440BX] ASUS P3B-F", - .internal_name = "p3bf", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_p3bf_init, - .p1_handler = NULL, + .init = machine_at_bf6_init, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16001,8 +18008,8 @@ const machine_t machines[] = { .package = CPU_PKG_SLOT1, .block = CPU_BLOCK_NONE, .min_bus = 66666667, - .max_bus = 150000000, - .min_voltage = 1300, + .max_bus = 133333333, + .min_voltage = 1800, .max_voltage = 3500, .min_multi = 1.5, .max_multi = 8.0 @@ -16011,31 +18018,34 @@ const machine_t machines[] = { .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, .ram = { .min = 8192, - .max = 1048576, + .max = 786432, .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC + /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - -{ + { .name = "[i440BX] ABIT BX6", .internal_name = "bx6", .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440BX, .init = machine_at_bx6_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16057,51 +18067,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - - { - .name = "[i440BX] ABIT BF6", - .internal_name = "bf6", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_bf6_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SLOT1, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 133333333, - .min_voltage = 1800, - .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 - }, - .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 786432, - .step = 8192 - }, - .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16116,7 +18090,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440BX, .init = machine_at_ax6bc_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16138,11 +18112,105 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC + firmware. */ + { + .name = "[i440BX] ASUS P2B-LS", + .internal_name = "p2bls", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_p2bls_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 112121212, + .min_voltage = 1300, + .max_voltage = 3500, + .min_multi = 1.5, + .max_multi = 8.0 + }, + .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, /* Machine has internal SCSI: Adaptec AIC-7890AB */ + .ram = { + .min = 8192, + .max = 1048576, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC + firmware. */ + { + .name = "[i440BX] ASUS P3B-F", + .internal_name = "p3bf", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_p3bf_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 150000000, + .min_voltage = 1300, + .max_voltage = 3500, + .min_multi = 1.5, + .max_multi = 8.0 + }, + .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1048576, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16157,7 +18225,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440BX, .init = machine_at_686bx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16179,52 +18247,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has a SM(S)C FDC37M60x Super I/O chip with on-chip KBC with most likely - AMIKey-2 KBC firmware. */ - { - .name = "[i440BX] HP Vectra VEi 8", - .internal_name = "vei8", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_vei8_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SLOT1, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 100000000, - .min_voltage = 1800, - .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, /* Machine has internal video: Matrox MGA-G200 and sound: Crystal CS4820 */ - .ram = { - .min = 8192, - .max = 524288, - .step = 8192 - }, - .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16238,7 +18269,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440BX, .init = machine_at_lgibmx7g_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16260,11 +18291,60 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC + firmware. */ + { + .name = "[i440BX] Supermicro P6SBA", + .internal_name = "p6sba", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_p6sba_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 100000000, + .min_voltage = 1800, + .max_voltage = 3500, + .min_multi = 1.5, + .max_multi = 8.0 + }, + .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16279,7 +18359,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440BX, .init = machine_at_s1846_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16301,26 +18381,32 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = &es1371_onboard_device, .net_device = NULL }, - /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC - firmware. */ + + /* 440ZX */ + /* Has a SM(S)C FDC37M60x Super I/O chip with on-chip KBC with most likely + AMIKey-2 KBC firmware. */ { - .name = "[i440BX] Supermicro P6SBA", - .internal_name = "p6sba", + .name = "[i440ZX] HP Vectra VEi 8", + .internal_name = "vei8", .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_p6sba_init, - .p1_handler = NULL, + .chipset = MACHINE_CHIPSET_INTEL_440ZX, + .init = machine_at_vei8_init, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16334,27 +18420,29 @@ const machine_t machines[] = { .min_multi = 1.5, .max_multi = 8.0 }, - .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, /* Machine has internal video: Matrox MGA-G200 and sound: Crystal CS4820 */ .ram = { .min = 8192, - .max = 786432, + .max = 524288, .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, .snd_device = NULL, .net_device = NULL }, - - /* 440ZX */ /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { @@ -16363,7 +18451,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440ZX, .init = machine_at_ms6168_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16385,11 +18473,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &voodoo_3_2000_agp_onboard_8m_device, @@ -16399,12 +18491,12 @@ const machine_t machines[] = { /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[i440ZX] Packard Bell Bora Pro", + .name = "[i440ZX] Packard Bell Bora Pro (MSI MS-6168)", .internal_name = "borapro", .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_INTEL_440ZX, .init = machine_at_borapro_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16426,11 +18518,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &voodoo_3_2000_agp_onboard_8m_device, @@ -16447,7 +18543,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_SMSC_VICTORYBX_66, .init = machine_at_atc6310bxii_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16469,11 +18565,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16490,7 +18590,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO, .init = machine_at_ficka6130_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16512,11 +18612,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16531,7 +18635,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133, .init = machine_at_p3v133_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16553,11 +18657,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16572,7 +18680,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, .init = machine_at_p3v4x_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16594,11 +18702,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16613,7 +18725,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, .init = machine_at_gt694va_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16635,11 +18747,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16655,7 +18771,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_SIS_5600, .init = machine_at_p6f99_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16677,11 +18793,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16695,7 +18815,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1, .chipset = MACHINE_CHIPSET_SIS_5600, .init = machine_at_m747_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16710,18 +18830,22 @@ const machine_t machines[] = { .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, /* Machine has internal video: SiS 6326 and internal sound: C-Media CMI8330 */ .ram = { .min = 8192, .max = 1572864, .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16739,7 +18863,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1_2, .chipset = MACHINE_CHIPSET_INTEL_440GX, .init = machine_at_fw6400gx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16761,11 +18885,15 @@ const machine_t machines[] = { .step = 16384 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16776,14 +18904,14 @@ const machine_t machines[] = { /* Slot 1/Socket 370 machines */ /* 440BX */ /* OEM version of ECS P6BXT-A+ REV 1.3x/2.2x. Has a Winbond W83977EF Super - I/O chip with on-chip KBC with AMIKey-2 KBC firmware.*/ + I/O chip with on-chip KBC with AMIKey-2 KBC firmware.*/ { .name = "[i440BX] Compaq ProSignia S316/318 (Intel)", .internal_name = "prosignias31x_bx", .type = MACHINE_TYPE_SLOT1_370, .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133, .init = machine_at_prosignias31x_bx_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16805,11 +18933,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16824,7 +18956,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1_370, .chipset = MACHINE_CHIPSET_INTEL_440BX, .init = machine_at_s1857_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16846,11 +18978,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16866,7 +19002,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT1_370, .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133, .init = machine_at_p6bat_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16888,11 +19024,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16910,7 +19050,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT2, .chipset = MACHINE_CHIPSET_INTEL_440GX, .init = machine_at_6gxu_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16932,11 +19072,15 @@ const machine_t machines[] = { .step = 16384 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16951,7 +19095,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SLOT2, .chipset = MACHINE_CHIPSET_INTEL_440GX, .init = machine_at_s2dge_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -16973,11 +19117,15 @@ const machine_t machines[] = { .step = 16384 }, .nvrmask = 511, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -16995,7 +19143,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET370, .chipset = MACHINE_CHIPSET_INTEL_440LX, .init = machine_at_s370slm_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -17017,11 +19165,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -17038,7 +19190,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET370, .chipset = MACHINE_CHIPSET_INTEL_440BX, .init = machine_at_awo671r_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -17061,58 +19213,21 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = &chips_69000_onboard_device, .snd_device = NULL, .net_device = NULL }, - /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC - firmware. */ - { - .name = "[i440BX] ASUS CUBX", - .internal_name = "cubx", - .type = MACHINE_TYPE_SOCKET370, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_cubx_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET370, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 150000000, - .min_voltage = 1300, - .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 - }, - .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, /* Machine has quad channel IDE with internal controller: CMD PCI-0648 */ - .ram = { - .min = 8192, - .max = 1048576, - .step = 8192 - }, - .nvrmask = 255, - .kbc_device = NULL, - .kbc_p1 = 0xff, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { @@ -17121,7 +19236,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET370, .chipset = MACHINE_CHIPSET_INTEL_440BX, .init = machine_at_ambx133_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -17143,11 +19258,60 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC + firmware. */ + { + .name = "[i440BX] ASUS CUBX", + .internal_name = "cubx", + .type = MACHINE_TYPE_SOCKET370, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_cubx_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET370, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 150000000, + .min_voltage = 1300, + .max_voltage = 3500, + .min_multi = 1.5, + .max_multi = 8.0 + }, + .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, + .flags = MACHINE_IDE_QUAD | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, /* Machine has quad channel IDE with internal controller: CMD PCI-0648 */ + .ram = { + .min = 8192, + .max = 1048576, + .step = 8192 + }, + .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -17164,7 +19328,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET370, .chipset = MACHINE_CHIPSET_INTEL_440ZX, .init = machine_at_63a1_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -17186,11 +19350,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -17207,7 +19375,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET370, .chipset = MACHINE_CHIPSET_SMSC_VICTORYBX_66, .init = machine_at_atc7020bxii_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -17229,11 +19397,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -17248,7 +19420,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET370, .chipset = MACHINE_CHIPSET_SMSC_VICTORYBX_66, .init = machine_at_m773_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -17270,11 +19442,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -17291,7 +19467,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET370, .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO, .init = machine_at_apas3_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -17306,18 +19482,22 @@ const machine_t machines[] = { .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, /* Machine has internal video: Creative Vibra 16XV */ .ram = { .min = 8192, .max = 786432, .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -17332,7 +19512,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET370, .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133, .init = machine_at_p6bap_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -17354,11 +19534,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -17373,7 +19557,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET370, .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, .init = machine_at_6via90ap_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -17395,11 +19579,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -17414,7 +19602,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET370, .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, .init = machine_at_cuv4xls_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -17436,11 +19624,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -17456,7 +19648,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_SOCKET370, .chipset = MACHINE_CHIPSET_SIS_5600, .init = machine_at_7sbb_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -17478,11 +19670,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -17499,7 +19695,7 @@ const machine_t machines[] = { .type = MACHINE_TYPE_MISC, .chipset = MACHINE_CHIPSET_INTEL_440BX, .init = machine_at_vpc2007_init, - .p1_handler = NULL, + .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, @@ -17521,11 +19717,15 @@ const machine_t machines[] = { .step = 8192 }, .nvrmask = 255, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -17561,11 +19761,15 @@ const machine_t machines[] = { .step = 0 }, .nvrmask = 0, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, .kbc_device = NULL, - .kbc_p1 = 0xff, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000000, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, + .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, .vid_device = NULL, @@ -17575,6 +19779,10 @@ const machine_t machines[] = { // clang-format on }; +/* This is so Disabled comes first. */ +static const int dma_mapping[9] = { DMA_NONE, DMA_DISABLED, 0, 1, 2, 3, 5, 6, 7 }; +static const char *dma_names[9] = { "None", "Disabled", "0", "1", "2", "3", "5", "6", "7" }; + /* Saved copies - jumpers get applied to these. We use also machine_gpio to store IBM PC/XT jumpers as they need more than one byte. */ static uint32_t machine_p1_default; @@ -17586,6 +19794,8 @@ static uint32_t machine_gpio; static uint32_t machine_gpio_acpi_default; static uint32_t machine_gpio_acpi; +static int machine_is_ps2 = 0; + void *machine_snd = NULL; uint8_t @@ -17594,12 +19804,6 @@ machine_get_p1_default(void) return machine_p1_default; } -uint8_t -machine_get_p1(void) -{ - return machine_p1; -} - void machine_set_p1_default(uint8_t val) { @@ -17619,18 +19823,29 @@ machine_and_p1(uint8_t val) } uint8_t -machine_handle_p1(uint8_t write, uint8_t val) +machine_generic_p1_handler(void) { - uint8_t ret = 0xff; + return video_is_mda() ? 0xf0 : 0xb0; +} + +uint8_t +machine_get_p1(uint8_t kbc_p1) +{ + uint8_t low_bits = ((machine_p1 >> 8) + 1) & 0x03; + uint8_t ret = 0xff; if (machines[machine].p1_handler) - ret = machines[machine].p1_handler(write, val); - else { - if (write) - machine_p1 = machine_p1_default & val; - else - ret = machine_p1; - } + ret = machines[machine].p1_handler(); + + ret &= (machine_p1 & 0xff); + + ret |= ((machine_p1 >> 8) & 0xff); + + ret ^= ((machine_p1 >> 16) & 0xff); + + ret &= kbc_p1; + + machine_p1 = (machine_p1 & 0xfffffcff) | (low_bits << 8); return ret; } @@ -17859,6 +20074,36 @@ machine_has_flags(int m, int flags) return ret; } +void +machine_set_ps2(void) +{ + if (machines[machine].bus_flags & MACHINE_BUS_PS2_PORTS) + machine_is_ps2 = 1; + else + machine_is_ps2 = 0; +} + +void +machine_force_ps2(int is_ps2) +{ + machine_is_ps2 = is_ps2; +} + +int +machine_has_flags_ex(int flags) +{ + int ret = machine_has_flags(machine, flags); + + if (flags & MACHINE_PS2_KBC) { + if (machine_is_ps2) + ret |= MACHINE_PS2_KBC; + else + ret &= ~MACHINE_PS2_KBC; + } + + return ret; +} + int machine_has_bus(int m, int bus_flags) { @@ -17867,13 +20112,19 @@ machine_has_bus(int m, int bus_flags) /* TODO: Move the KBD flags to the machine table! */ if ((bus_flags & MACHINE_BUS_XT_KBD) && !(machines[m].bus_flags & MACHINE_BUS_ISA16) && - !(machines[m].bus_flags & MACHINE_BUS_PS2_PORTS)) + (!(machines[m].bus_flags & MACHINE_BUS_PS2_PORTS) || + !(strcmp(machine_get_internal_name(), "pc5086")))) ret |= MACHINE_BUS_XT_KBD; +#ifdef ONLY_AT_KBD_ON_AT_KBC if ((bus_flags & MACHINE_BUS_AT_KBD) && (IS_AT(m)) && !(machines[m].bus_flags & MACHINE_BUS_PS2_PORTS)) ret |= MACHINE_BUS_AT_KBD; +#else + if ((bus_flags & MACHINE_BUS_AT_KBD) && (IS_AT(m))) + ret |= MACHINE_BUS_AT_KBD; +#endif return ret; } @@ -17884,6 +20135,33 @@ machine_has_cartridge(int m) return (machine_has_flags(m, MACHINE_CARTRIDGE) ? 1 : 0); } +int +machine_has_jumpered_ecp_dma(int m, int dma) +{ + if (dma == DMA_ANY) + return !!(machines[m].jumpered_ecp_dma & MACHINE_DMA_JUMPERS_MASK); + else + return !!(machines[m].jumpered_ecp_dma & (1 << dma)); +} + +int +machine_get_default_jumpered_ecp_dma(int m) +{ + return machines[m].default_jumpered_ecp_dma; +} + +int +machine_map_jumpered_ecp_dma(int dma) +{ + return dma_mapping[dma]; +} + +const char * +machine_get_jumpered_ecp_dma_name(int dma) +{ + return dma_names[dma]; +} + int machine_get_min_ram(int m) { diff --git a/src/machine_status.c b/src/machine_status.c index 3eb2762bc..c1396975d 100644 --- a/src/machine_status.c +++ b/src/machine_status.c @@ -16,7 +16,7 @@ #include <86box/cartridge.h> #include <86box/cassette.h> #include <86box/cdrom.h> -#include <86box/zip.h> +#include <86box/rdisk.h> #include <86box/mo.h> #include <86box/hdd.h> #include <86box/thread.h> @@ -36,9 +36,9 @@ machine_status_init(void) machine_status.cdrom[i].empty = (strlen(cdrom[i].image_path) == 0); machine_status.cdrom[i].active = false; } - for (size_t i = 0; i < ZIP_NUM; i++) { - machine_status.zip[i].empty = (strlen(zip_drives[i].image_path) == 0); - machine_status.zip[i].active = false; + for (size_t i = 0; i < RDISK_NUM; i++) { + machine_status.rdisk[i].empty = (strlen(rdisk_drives[i].image_path) == 0); + machine_status.rdisk[i].active = false; } for (size_t i = 0; i < MO_NUM; i++) { machine_status.mo[i].empty = (strlen(mo_drives[i].image_path) == 0); diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt index 9d6b2efeb..82d332e20 100644 --- a/src/network/CMakeLists.txt +++ b/src/network/CMakeLists.txt @@ -58,6 +58,18 @@ if(WIN32) target_link_libraries(86Box ws2_32) endif() +if(NETSWITCH) + add_compile_definitions(USE_NETSWITCH) + list(APPEND net_sources + net_netswitch.c + netswitch.c + pb_common.c + pb_encode.c + pb_decode.c + networkmessage.pb.c + ) +endif() + if (UNIX) find_path(HAS_VDE "libvdeplug.h" PATHS ${VDE_INCLUDE_DIR} "/usr/include /usr/local/include" "/opt/homebrew/include" ) if(HAS_VDE) diff --git a/src/network/net_3c503.c b/src/network/net_3c503.c index 0eba8a382..ea64633bc 100644 --- a/src/network/net_3c503.c +++ b/src/network/net_3c503.c @@ -721,7 +721,7 @@ static const device_config_t threec503_config[] = { }, { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xCC000, diff --git a/src/network/net_ne2000.c b/src/network/net_ne2000.c index 4b9ef4a19..0174ef098 100644 --- a/src/network/net_ne2000.c +++ b/src/network/net_ne2000.c @@ -1412,7 +1412,7 @@ static const device_config_t ne2000_config[] = { }, { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0, @@ -1510,7 +1510,7 @@ static const device_config_t ne2000_compat_config[] = { }, { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0, @@ -1602,7 +1602,7 @@ static const device_config_t ne2000_compat_8bit_config[] = { }, { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0, diff --git a/src/network/net_netswitch.c b/src/network/net_netswitch.c new file mode 100644 index 000000000..336895dc6 --- /dev/null +++ b/src/network/net_netswitch.c @@ -0,0 +1,500 @@ +/* +* 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. +* +* Network Switch network driver +* +* +* +* Authors: cold-brewed +* +* Copyright 2024 cold-brewed + */ + + +#include +#include +#include +#include +#include +#include +#include +#ifdef _WIN32 +# define WIN32_LEAN_AND_MEAN +# include +# include +#else +# include +#endif + +#define HAVE_STDARG_H +#include <86box/86box.h> +#include <86box/device.h> +#include <86box/thread.h> +#include <86box/timer.h> +#include <86box/network.h> +#include <86box/net_event.h> +#include "netswitch.h" +#include "networkmessage.pb.h" + +enum { + NET_EVENT_STOP = 0, + NET_EVENT_TX, + NET_EVENT_RX, + NET_EVENT_SWITCH, + NET_EVENT_MAX +}; + +/* Special define for the windows portion. We only need to poll up to + * NET_EVENT_SWITCH. NET_EVENT_SWITCH gives us a different NET_EVENT_MAX + * excluding the others, and windows does not like polling events that + * do not exist. */ +#define NET_EVENT_WIN_MAX NET_EVENT_SWITCH + +#define SWITCH_PKT_BATCH NET_QUEUE_LEN +/* In µs, how often to send a keepalive and perform connection maintenance */ +#define SWITCH_KEEPALIVE_INTERVAL 5000000 +/* In ms, how long until we consider a connection gone? */ +#define SWITCH_MAX_INTERVAL 10000 + +typedef struct { + void *nsconn; + uint8_t mac_addr[6]; + netcard_t *card; + thread_t *poll_tid; + net_evt_t tx_event; + net_evt_t stop_event; + netpkt_t pktv[SWITCH_PKT_BATCH]; + pc_timer_t stats_timer; + pc_timer_t maintenance_timer; + ns_rx_packet_t rx_packet; + char switch_type[16]; +#ifdef _WIN32 + HANDLE sock_event; +#endif +} net_netswitch_t; + +// Used for debugging, needs to be moved to an official location +void print_packet(const netpkt_t netpkt) { +#ifdef NET_SWITCH_LOG + if(netpkt.len == 0) { + net_switch_log("Something is wrong, len is %d\n", netpkt.len); + return; + } + /* Temporarily disable log suppression for packet dumping to allow specific formatting */ + pclog_toggle_suppr(); + uint8_t linebuff[17] = "\0"; + char src_mac_buf[32] = ""; + char dst_mac_buf[32] = ""; + for(int m_i=0; m_i < 6; m_i++) { + char src_octet[4]; + char dst_octet[4]; + snprintf(src_octet, sizeof(src_octet), "%02X%s", netpkt.data[m_i+6], m_i < 5 ? ":" : ""); + strncat(src_mac_buf, src_octet, sizeof (src_mac_buf) - 1); + + snprintf(dst_octet, sizeof(dst_octet), "%02X%s", netpkt.data[m_i], m_i < 5 ? ":" : ""); + strncat(dst_mac_buf, dst_octet, sizeof (dst_mac_buf) - 1); + } + net_switch_log("%s -> %s\n\n", src_mac_buf, dst_mac_buf); + + // Payload length (bytes 12-13 with zero index) + uint16_t payload_length = (netpkt.data[12] & 0xFF) << 8; + payload_length |= (netpkt.data[13] & 0xFF); + const uint16_t actual_length = netpkt.len - 14; + if(payload_length <= 1500) { + // 802.3 / 802.2 + net_switch_log("Payload length according to frame: %i\n", payload_length); + // remaining length of packet (len - 14) to calculate padding + net_switch_log("Actual payload length: %i\n", actual_length); + if(payload_length <=46 ) { + net_switch_log("Likely has %d bytes padding\n", actual_length - payload_length); + } + } else { + // Type II + net_switch_log("EtherType: 0x%04X\n", payload_length); + } + // actual packet size + net_switch_log("Full frame size: %i\n", netpkt.len); + net_switch_log("\n"); + + for(int i=0; i< netpkt.len; i++) { + + net_switch_log("%02x ", netpkt.data[i]); + if ((netpkt.data[i] < 0x20) || (netpkt.data[i] > 0x7e)) { + linebuff[i % 16] = '.'; + } else { + linebuff[i % 16] = netpkt.data[i]; + } + + if( (i+1) % 8 == 0) { + net_switch_log(" "); + } + + if( (i+1) % 16 == 0) { + net_switch_log("| %s |\n", (char *)linebuff); + linebuff[0] = '\0'; + } + + // last char? + if(i+1 == netpkt.len) { + const int togo = 16 - (i % 16); + for(int remaining = 0; remaining < togo-1; remaining++) { + // This would represent the byte display and the space + net_switch_log(" "); + } + // spacing between byte groupings + if(togo > 8) { + net_switch_log(" "); + } + linebuff[(i % 16) +1] = '\0'; + net_switch_log(" | %s", (char *)linebuff); + + for(int remaining = 0; remaining < togo-1; remaining++) { + // This would represent the remaining bytes on the right + net_switch_log(" "); + } + net_switch_log(" |\n"); + } + } + net_switch_log("\n"); + pclog_toggle_suppr(); +#endif /* NET_SWITCH_LOG*/ +} + +#ifdef ENABLE_NET_SWITCH_STATS +static void +stats_timer(void *priv) +{ + /* Get the device state structure. */ + net_netswitch_t *netswitch = priv; + const NSCONN *nsconn = netswitch->nsconn; + net_switch_log("Max (frame / packet) TX (%zu/%zu) RX (%zu/%zu)\n", + nsconn->stats.max_tx_frame, nsconn->stats.max_tx_packet, + nsconn->stats.max_rx_frame, nsconn->stats.max_rx_packet); + net_switch_log("Last ethertype (TX/RX) (%02x%02x/%02x%02x)\n", nsconn->stats.last_tx_ethertype[0], nsconn->stats.last_tx_ethertype[1], + nsconn->stats.last_rx_ethertype[0], nsconn->stats.last_rx_ethertype[1]); + net_switch_log("Packet totals (all/tx/rx/would fragment/max vec) (%zu/%zu/%zu/%zu/%i)\n", nsconn->stats.total_tx_packets + nsconn->stats.total_rx_packets, + nsconn->stats.total_tx_packets, nsconn->stats.total_rx_packets, nsconn->stats.total_fragments, nsconn->stats.max_vec); + net_switch_log("---\n"); + /* Restart the timer */ + timer_on_auto(&netswitch->stats_timer, 60000000); +} +#endif + +static void +maintenance_timer(void *priv) +{ + /* Get the device state structure. */ + net_netswitch_t *netswitch = (net_netswitch_t *) priv; + NSCONN *nsconn = (NSCONN *) netswitch->nsconn; + if (!ns_send_control(nsconn, MessageType_MESSAGE_TYPE_KEEPALIVE)) { + net_switch_log("Failed to send keepalive packet\n"); + } + const int64_t interval = ns_get_current_millis() - nsconn->last_packet_stamp; +// net_switch_log("Last packet time: %lld ago\n", interval); +// net_switch_log("Last packet time: %lld ago\n", interval); + + /* A timeout has likely occurred, try to fix the connection if type is REMOTE */ + if((interval > SWITCH_MAX_INTERVAL) && nsconn->switch_type == SWITCH_TYPE_REMOTE) { + /* FIXME: This is really rough, needs moar logic */ + nsconn->client_state = CONNECTING; + net_switch_log("We appear to be disconnected, attempting to reconnect\n"); + /* TODO: Proper connect function! This is duplicated code */ + if(!ns_send_control(nsconn, MessageType_MESSAGE_TYPE_CONNECT_REQUEST)) { + /* TODO: Failure */ + } + } + /* Restart the timer */ + timer_on_auto(&netswitch->maintenance_timer, SWITCH_KEEPALIVE_INTERVAL); +} + +/* Lots of #ifdef madness here thanks to the polling differences on windows */ +static void +net_netswitch_thread(void *priv) +{ + net_netswitch_t *net_netswitch = (net_netswitch_t *) priv; + NSCONN *nsconn = (NSCONN *) net_netswitch->nsconn; + bool status; + char switch_type[32]; + snprintf(switch_type, sizeof(switch_type), "%s", nsconn->switch_type == SWITCH_TYPE_REMOTE ? "Remote" : "Local"); + + net_switch_log("%s Net Switch: polling started.\n", switch_type); + +#ifdef _WIN32 + WSAEventSelect(ns_pollfd(net_netswitch->nsconn), net_netswitch->sock_event, FD_READ); + + HANDLE events[NET_EVENT_MAX]; + events[NET_EVENT_STOP] = net_event_get_handle(&net_netswitch->stop_event); + events[NET_EVENT_TX] = net_event_get_handle(&net_netswitch->tx_event); + events[NET_EVENT_RX] = net_netswitch->sock_event; + + bool run = true; +#else + struct pollfd pfd[NET_EVENT_MAX]; + pfd[NET_EVENT_STOP].fd = net_event_get_fd(&net_netswitch->stop_event); + pfd[NET_EVENT_STOP].events = POLLIN | POLLPRI; + + pfd[NET_EVENT_TX].fd = net_event_get_fd(&net_netswitch->tx_event); + pfd[NET_EVENT_TX].events = POLLIN | POLLPRI; + + pfd[NET_EVENT_RX].fd = ns_pollfd(net_netswitch->nsconn); + pfd[NET_EVENT_RX].events = POLLIN | POLLPRI; +#endif + +#ifdef _WIN32 + while (run) { + int ret = WaitForMultipleObjects(NET_EVENT_WIN_MAX, events, FALSE, INFINITE); + + switch (ret - WAIT_OBJECT_0) { +#else + while (1) { + poll(pfd, NET_EVENT_MAX, -1); +#endif + +#ifdef _WIN32 + case NET_EVENT_STOP: + net_event_clear(&net_netswitch->stop_event); + run = false; + break; + case NET_EVENT_TX: +#else + if (pfd[NET_EVENT_STOP].revents & POLLIN) { + net_event_clear(&net_netswitch->stop_event); + break; + } + if (pfd[NET_EVENT_TX].revents & POLLIN) { +#endif + net_event_clear(&net_netswitch->tx_event); + + const int packets = network_tx_popv(net_netswitch->card, net_netswitch->pktv, SWITCH_PKT_BATCH); + if (packets > nsconn->stats.max_vec) { + nsconn->stats.max_vec = packets; + } + for (int i = 0; i < packets; i++) { + // net_switch_log("%d packet(s) to send\n", packets); +#if defined(NET_PRINT_PACKET_TX) || defined(NET_PRINT_PACKET_ALL) + data_packet_info_t packet_info = get_data_packet_info(&net_netswitch->pktv[i], net_netswitch->mac_addr); + /* Temporarily disable log suppression for packet logging */ + pclog_toggle_suppr(); + net_switch_log("%s Net Switch: TX: %s\n", switch_type, packet_info.printable); + pclog_toggle_suppr(); + print_packet(net_netswitch->pktv[i]); +#endif + /* Only send if we're in a connected state (always true for local) */ + if(ns_connected(net_netswitch->nsconn)) { + const ssize_t nc = ns_send_pb(net_netswitch->nsconn, &net_netswitch->pktv[i], 0); + if (nc < 1) { + perror("Got"); + net_switch_log("%s Net Switch: Problem, no bytes sent. Got back %i\n", switch_type, nc); + } + } + } +#ifdef _WIN32 + break; + case NET_EVENT_RX: +#else + } + if (pfd[NET_EVENT_RX].revents & POLLIN) { +#endif + + /* Packets are available for reading */ + status = ns_recv_pb(net_netswitch->nsconn, &net_netswitch->rx_packet, NET_MAX_FRAME, 0); + if (!status) { + net_switch_log("Receive packet failed. Skipping.\n"); + continue; + } + + /* These types are handled in the backend and don't need to be considered */ + if (is_control_packet(&net_netswitch->rx_packet) || is_fragment_packet(&net_netswitch->rx_packet)) { + continue; + } + data_packet_info_t packet_info = get_data_packet_info(&net_netswitch->rx_packet.pkt, net_netswitch->mac_addr); +#if defined(NET_PRINT_PACKET_RX) || defined(NET_PRINT_PACKET_ALL) + print_packet(net_netswitch->rx_packet.pkt); +#endif + /* + * Accept packets that are + * Unicast for us + * Broadcasts that are not from us + * All other packets *if* promiscuous mode is enabled (excluding our own) + */ + if (packet_info.is_packet_for_me || (packet_info.is_broadcast && !packet_info.is_packet_from_me)) { + /* Temporarily disable log suppression for packet logging */ + pclog_toggle_suppr(); + net_switch_log("%s Net Switch: RX: %s\n", switch_type, packet_info.printable); + pclog_toggle_suppr(); + network_rx_put_pkt(net_netswitch->card, &net_netswitch->rx_packet.pkt); + } else if (packet_info.is_packet_from_me) { + net_switch_log("%s Net Switch: Got my own packet... ignoring\n", switch_type); + } else { + /* Not our packet. Pass it along if promiscuous mode is enabled. */ + if (ns_flags(net_netswitch->nsconn) & FLAGS_PROMISC) { + net_switch_log("%s Net Switch: Got packet from %s (not mine, promiscuous is set, getting)\n", switch_type, packet_info.src_mac_h); + network_rx_put_pkt(net_netswitch->card, &net_netswitch->rx_packet.pkt); + } else { + net_switch_log("%s Net Switch: RX: %s (not mine, dest %s != %s, promiscuous not set, ignoring)\n", switch_type, packet_info.printable, packet_info.dest_mac_h, packet_info.my_mac_h); + } + } +#ifdef _WIN32 + break; + } +#else + } +#endif + } + + net_switch_log("%s Net Switch: polling stopped.\n", switch_type); +} + +void +net_netswitch_error(char *errbuf, const char *message) { + strncpy(errbuf, message, NET_DRV_ERRBUF_SIZE); + net_switch_log("Net Switch: %s\n", message); +} + +void * +net_netswitch_init(const netcard_t *card, const uint8_t *mac_addr, void *priv, char *netdrv_errbuf) +{ + net_switch_log("Net Switch: Init\n"); + + netcard_conf_t *netcard = (netcard_conf_t *) priv; + + ns_flags_t flags = FLAGS_NONE; + ns_type_t switch_type; + + const int net_type = netcard->net_type; + if(net_type == NET_TYPE_NRSWITCH) { + net_switch_log("Switch type: Remote\n"); + switch_type = SWITCH_TYPE_REMOTE; + } else if (net_type == NET_TYPE_NMSWITCH) { + net_switch_log("Switch type: Local Multicast\n"); + switch_type = SWITCH_TYPE_LOCAL; + if(netcard->promisc_mode) { + flags |= FLAGS_PROMISC; + } + } else { + net_switch_log("Failed: Unknown net switch type %d\n", net_type); + return NULL; + } + + // FIXME: Only here during dev. This would be an error otherwise (hostname not specified) + if(strlen(netcard->nrs_hostname) == 0) { + strncpy(netcard->nrs_hostname, "127.0.0.1", 128 - 1); + } + + net_netswitch_t *net_netswitch = calloc(1, sizeof(net_netswitch_t)); + net_netswitch->card = (netcard_t *) card; + memcpy(net_netswitch->mac_addr, mac_addr, sizeof(net_netswitch->mac_addr)); + snprintf(net_netswitch->switch_type, sizeof(net_netswitch->switch_type), "%s", net_type == NET_TYPE_NRSWITCH ? "Remote" : "Local"); + +// net_switch_log("%s Net Switch: mode: %d, group %d, hostname %s len %lu\n", net_netswitch->switch_type, netcard->promisc_mode, netcard->switch_group, netcard->nrs_hostname, strlen(netcard->nrs_hostname)); + + struct ns_open_args ns_args; + ns_args.type = switch_type; + /* Setting FLAGS_PROMISC here lets all packets through except the ones from us */ + ns_args.flags = flags; + /* This option sets which switch group you want to be a part of. + * Functionally equivalent to being plugged into a different switch */ + ns_args.group = netcard->switch_group; + /* You could also set the client_id here. If 0, it will be generated. */ + ns_args.client_id = 0; + memcpy(ns_args.mac_addr, net_netswitch->mac_addr, 6); + /* The remote switch hostname */ + strncpy(ns_args.nrs_hostname, netcard->nrs_hostname, sizeof(ns_args.nrs_hostname) - 1); + + net_switch_log("%s Net Switch: Starting up virtual switch with group %d, flags %d\n", net_netswitch->switch_type, ns_args.group, ns_args.flags); + + if ((net_netswitch->nsconn = ns_open(&ns_args)) == NULL) { + char buf[NET_DRV_ERRBUF_SIZE]; + /* We're using some errnos for our own purposes */ + switch (errno) { + case EFAULT: + snprintf(buf, NET_DRV_ERRBUF_SIZE, "Unable to open switch group %d: Cannot resolve remote switch hostname %s", ns_args.group, ns_args.nrs_hostname); + break; + default: + snprintf(buf, NET_DRV_ERRBUF_SIZE, "Unable to open switch group %d (%s)", ns_args.group, strerror(errno)); + break; + + } + net_netswitch_error(netdrv_errbuf, buf); + free(net_netswitch); + return NULL; + } + + for (int i = 0; i < SWITCH_PKT_BATCH; i++) { + net_netswitch->pktv[i].data = calloc(1, NET_MAX_FRAME); + } + net_netswitch->rx_packet.pkt.data = calloc(1, NET_MAX_FRAME); + + net_event_init(&net_netswitch->tx_event); + net_event_init(&net_netswitch->stop_event); +#ifdef _WIN32 + net_netswitch->sock_event = CreateEvent(NULL, FALSE, FALSE, NULL); +#endif + net_netswitch->poll_tid = thread_create(net_netswitch_thread, net_netswitch); + + /* Add the timers */ +#ifdef ENABLE_NET_SWITCH_STATS + timer_add(&net_netswitch->stats_timer, stats_timer, net_netswitch, 0); + timer_on_auto(&net_netswitch->stats_timer, 5000000); +#endif + timer_add(&net_netswitch->maintenance_timer, maintenance_timer, net_netswitch, 0); + timer_on_auto(&net_netswitch->maintenance_timer, SWITCH_KEEPALIVE_INTERVAL); + + /* Send join message. Return status not checked here. */ + ns_send_control(net_netswitch->nsconn, MessageType_MESSAGE_TYPE_JOIN); + + return net_netswitch; +} + +void +net_netswitch_in_available(void *priv) +{ + net_netswitch_t *net_netswitch = (net_netswitch_t *) priv; + net_event_set(&net_netswitch->tx_event); +} + +void +net_netswitch_close(void *priv) +{ + if (priv == NULL) + return; + + net_netswitch_t *net_netswitch = (net_netswitch_t *) priv; + + net_switch_log("%s Net Switch: closing.\n", net_netswitch->switch_type); + + /* Tell the thread to terminate. */ + net_event_set(&net_netswitch->stop_event); + + /* Wait for the thread to finish. */ + net_switch_log("%s Net Switch: waiting for thread to end...\n", net_netswitch->switch_type); + thread_wait(net_netswitch->poll_tid); + net_switch_log("%s Net Switch: thread ended\n", net_netswitch->switch_type); + + for (int i = 0; i < SWITCH_PKT_BATCH; i++) { + free(net_netswitch->pktv[i].data); + } + free(net_netswitch->rx_packet.pkt.data); + + net_event_close(&net_netswitch->tx_event); + net_event_close(&net_netswitch->stop_event); + +#ifdef _WIN32 + WSACleanup(); +#endif + + ns_close(net_netswitch->nsconn); + free(net_netswitch); +} + +const netdrv_t net_netswitch_drv = { + .notify_in = &net_netswitch_in_available, + .init = &net_netswitch_init, + .close = &net_netswitch_close, + .priv = NULL, +}; diff --git a/src/network/net_plip.c b/src/network/net_plip.c index ac8ab2850..c45ad5527 100644 --- a/src/network/net_plip.c +++ b/src/network/net_plip.c @@ -27,10 +27,10 @@ #define HAVE_STDARG_H #include <86box/86box.h> #include <86box/timer.h> +#include <86box/device.h> #include <86box/lpt.h> #include <86box/timer.h> #include <86box/pit.h> -#include <86box/device.h> #include <86box/thread.h> #include <86box/network.h> #include <86box/plat_unused.h> @@ -499,7 +499,9 @@ const lpt_device_t lpt_plip_device = { .read_status = plip_read_status, .read_ctrl = NULL, .epp_write_data = NULL, - .epp_request_read = NULL + .epp_request_read = NULL, + .priv = NULL, + .lpt = NULL }; const device_t plip_device = { diff --git a/src/network/netswitch.c b/src/network/netswitch.c new file mode 100644 index 000000000..54815a682 --- /dev/null +++ b/src/network/netswitch.c @@ -0,0 +1,973 @@ +/* +* 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. +* +* Network Switch backend +* +* +* +* Authors: cold-brewed +* +* Copyright 2024 cold-brewed +*/ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef _WIN32 +# define WIN32_LEAN_AND_MEAN +# include +# include +#else +# include +# include +#endif + +#define HAVE_STDARG_H +#include <86box/86box.h> +#include <86box/device.h> +#include <86box/thread.h> +#include <86box/timer.h> +#include <86box/network.h> +#include <86box/net_event.h> +#include <86box/random.h> +#include +#include "netswitch.h" +#include "pb_encode.h" +#include "pb_decode.h" + +#include "networkmessage.pb.h" + +bool ns_socket_setup(NSCONN *conn) { + + if(conn == NULL) { + errno=EINVAL; + return false; + } + +#ifdef _WIN32 + // Initialize Windows Socket API with the given version. + WSADATA wsaData; + if (WSAStartup(MAKEWORD(2, 0), &wsaData)) { + perror("WSAStartup"); + return false; + } +#endif + + /* Create the "main" socket + * Local mode: the listener socket for multicast packets + * Remote mode: the "main" socket for send and receive */ + conn->fddata = socket(AF_INET, SOCK_DGRAM, 0); + if (conn->fddata < 0) { + perror("socket"); + return false; + } + + /* Here things diverge depending on local or remote type */ + if(conn->switch_type == SWITCH_TYPE_LOCAL) { + + /* Set socket options - allow multiple sockets to use the same address */ + u_int on = 1; + if (setsockopt(conn->fddata, SOL_SOCKET, SO_REUSEADDR, (char *) &on, sizeof(on)) < 0) { + perror("Reusing ADDR failed"); + return false; + } +#ifndef _WIN32 + /* ... and same port number + * Not needed on windows because SO_REUSEPORT doesn't exist there. However, the same + * functionality comes along with SO_REUSEADDR. */ + if (setsockopt(conn->fddata, SOL_SOCKET, SO_REUSEPORT, (char *) &on, sizeof(on)) < 0) { + perror("Reusing PORT failed"); + return false; + } +#endif + + memset(&conn->addr, 0, sizeof(conn->addr)); + conn->addr.sin_family = AF_INET; + conn->addr.sin_addr.s_addr = htonl(INADDR_ANY); + conn->addr.sin_port = htons(conn->local_multicast_port); + + /* Bind to receive address */ + if (bind(conn->fddata, (struct sockaddr *) &conn->addr, sizeof(conn->addr)) < 0) { + perror("bind"); + return false; + } + + /* Request to join multicast group */ + /*** NOTE: intermittent airplane (non-connected wifi) failures with 239.255.86.86 - needs more investigation */ + struct ip_mreq mreq; + mreq.imr_multiaddr.s_addr = inet_addr(conn->mcast_group); + mreq.imr_interface.s_addr = htonl(INADDR_ANY); + if (setsockopt(conn->fddata, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *) &mreq, sizeof(mreq)) < 0) { + perror("setsockopt"); + return false; + } + + /* Now create the outgoing data socket */ + conn->fdout = socket(AF_INET, SOCK_DGRAM, 0); + if (conn->fdout < 0) { + perror("out socket"); + return false; + } + + /* Set up destination address */ + memset(&conn->outaddr, 0, sizeof(conn->outaddr)); + conn->outaddr.sin_family = AF_INET; + conn->outaddr.sin_addr.s_addr = inet_addr(conn->mcast_group); + conn->outaddr.sin_port = htons(conn->local_multicast_port); + } else if (conn->switch_type == SWITCH_TYPE_REMOTE) { + /* Remote switch path */ + int status; + struct addrinfo hints; + struct addrinfo *servinfo; + char connect_ip[128] = "\0"; + + memset(&hints, 0, sizeof hints); + hints.ai_family = AF_INET; + hints.ai_socktype = SOCK_DGRAM; + hints.ai_flags = AI_PASSIVE; // not sure? + + if((status = getaddrinfo(conn->nrs_hostname, NULL, &hints, &servinfo)) != 0) { + net_switch_log("getaddrinfo error: %s\n", gai_strerror(status)); + errno=EFAULT; + return false; + } + + for(const struct addrinfo *p = servinfo; p != NULL; p = p->ai_next) { // NOLINT (only want the first result) + /* Take the first result, ipv4 since AF_INET was set in the hints */ + const struct sockaddr_in *ipv4 = (struct sockaddr_in *) p->ai_addr; + const void *addr = &(ipv4->sin_addr); + inet_ntop(p->ai_family, addr, connect_ip, sizeof connect_ip); + break; + } + freeaddrinfo(servinfo); + + if(strlen(connect_ip) == 0) { + /* Couldn't look up the hostname */ + net_switch_log("Hostname lookup failure?\n"); + errno=EFAULT; + return false; + } + + /* Set up local socket address and port */ + memset(&conn->addr, 0, sizeof(conn->addr)); + conn->addr.sin_family = AF_INET; + conn->addr.sin_addr.s_addr = htonl(INADDR_ANY); + conn->addr.sin_port = htons(conn->remote_source_port); + + /* Bind to receive address. Try the first 100 ports to allow the use of multiple systems simultaneously */ + for(int i=0; i<100; i++) { + if(i==99) { + net_switch_log("Unable to find an available port to bind\n"); + return false; + } + if (bind(conn->fddata, (struct sockaddr *) &conn->addr, sizeof(conn->addr)) < 0) { + net_switch_log("local port %d unavailable, trying next..\n", conn->remote_source_port); + conn->remote_source_port += 1; + conn->addr.sin_port = htons(conn->remote_source_port); + continue ; + } else { + net_switch_log("** Local port for net remote switch is %d\n", conn->remote_source_port); + break; + } + + } + + + /* Set up remote address and port */ + memset(&conn->outaddr, 0, sizeof(conn->outaddr)); + conn->outaddr.sin_family = AF_INET; + conn->outaddr.sin_addr.s_addr = inet_addr(connect_ip); + conn->outaddr.sin_port = htons(conn->remote_network_port); + + /* In remote mode the file descriptor for send (fdout) is the same as receive */ + conn->fdout = conn->fddata; + + } else { + errno=EINVAL; + return false; + } + + return true; +} + +NSCONN * +ns_open(struct ns_open_args *open_args) { + struct nsconn *conn=NULL; + + /* Each "group" is really just the base port + group number + * A different group effectively gets you a different switch + * Clamp the group at MAX_SWITCH_GROUP */ + if(open_args->group > MAX_SWITCH_GROUP) { + open_args->group = MAX_SWITCH_GROUP; + } + // FIXME: hardcoded for testing + char *mcast_group = "239.255.86.86"; // Admin scope + // char *mcast_group = "224.0.0.86"; // Local scope + + if ( (conn=calloc(1,sizeof(struct nsconn)))==NULL) { + errno=ENOMEM; + return NULL; + } + + /* Type */ + conn->switch_type = open_args->type; + + /* Allocate the fragment buffer */ + for (int i = 0; i < FRAGMENT_BUFFER_LENGTH; i++) { + conn->fragment_buffer[i] = calloc(1, sizeof(ns_fragment_t)); + /* Set the default size to 0 and null data buffer to indicate it is unused. + * The data buffer will be allocated as needed. */ + conn->fragment_buffer[i]->size = 0; + conn->fragment_buffer[i]->data = NULL; + } +// net_switch_log("Fragment buffers: %d total, %d each\n", FRAGMENT_BUFFER_LENGTH, MAX_FRAME_SEND_SIZE); + + snprintf(conn->mcast_group, MAX_MCAST_GROUP_LEN, "%s", mcast_group); + conn->flags = open_args->flags; + + /* Increment the multicast port by the switch group number. Each group is + * just a different port. */ + conn->local_multicast_port = open_args->group + NET_SWITCH_MULTICAST_PORT; + conn->remote_network_port = NET_SWITCH_REMOTE_PORT; + /* Source ports for remote switch will start here and be incremented until an available port is found */ + conn->remote_source_port = NET_SWITCH_REMOTE_PORT + NET_SWITCH_RECV_PORT_OFFSET; + + /* Remote switch hostname */ + strncpy(conn->nrs_hostname, open_args->nrs_hostname, sizeof(conn->nrs_hostname) - 1); + + /* Switch type */ + if(conn->switch_type == SWITCH_TYPE_REMOTE) { + net_switch_log("Connecting to remote %s:%d, initial local port %d, group %d\n", conn->nrs_hostname, conn->remote_network_port, conn->remote_source_port, open_args->group); + } else { + net_switch_log("Opening IP %s, port %d, group %d\n", mcast_group, conn->local_multicast_port, open_args->group); + } + + /* Client state, disconnected by default. + * Primarily used in remote mode */ + conn->client_state = DISCONNECTED; + + /* Client ID. Generate the ID if set to zero. */ + if(open_args->client_id == 0) { + conn->client_id = ns_gen_client_id(); + } + + /* MAC address is set from the emulated card */ + memcpy(conn->mac_addr, open_args->mac_addr, PB_MAC_ADDR_SIZE); + + /* Protocol version */ + conn->version = NS_PROTOCOL_VERSION; + + if(!ns_socket_setup(conn)) { + goto fail; + } + + if (conn->switch_type == SWITCH_TYPE_REMOTE) { + /* Perhaps one day do the entire handshake process here */ + if(!ns_send_control(conn, MessageType_MESSAGE_TYPE_CONNECT_REQUEST)) { + goto fail; + } + conn->client_state = CONNECTING; + net_switch_log("Client state is now CONNECTING\n"); + } else { + conn->client_state = LOCAL; + } + + /* Initialize sequence numbers */ + conn->sequence = 1; + conn->remote_sequence = 1; + + /* Initialize stats */ + conn->stats.max_tx_frame = 0; + conn->stats.max_tx_packet = 0; + conn->stats.max_rx_frame = 0; + conn->stats.max_rx_packet = 0; + conn->stats.total_rx_packets = 0; + conn->stats.total_tx_packets = 0; + conn->stats.total_fragments = 0; + conn->stats.max_vec = 0; + memcpy(conn->stats.last_tx_ethertype, (uint8_t []) { 0, 0}, sizeof(conn->stats.last_tx_ethertype)); + memcpy(conn->stats.last_rx_ethertype, (uint8_t []) { 0, 0}, sizeof(conn->stats.last_rx_ethertype)); + + /* Assuming all went well we have our sockets */ + return conn; + + /* Cleanup */ +fail: + for (int i = 0; i < FRAGMENT_BUFFER_LENGTH; i++) { + free(conn->fragment_buffer[i]); + } + return NULL; +} + +int +ns_pollfd(const NSCONN *conn) { + if (conn->fddata != 0) + return conn->fddata; + else { + errno=EBADF; + return -1; + } +} + +ssize_t +ns_sock_recv(const NSCONN *conn,void *buf, const size_t len, const int flags) { + if (fd_valid(conn->fddata)) + return recv(conn->fddata,buf,len,0); + else { + errno=EBADF; + return -1; + } +} + +ssize_t +ns_sock_send(NSCONN *conn,const void *buf, const size_t len, const int flags) { + if (fd_valid(conn->fddata)) { + /* Use the outgoing socket for sending, set elsewhere: + * Remote mode: same as sending + * Local mode: different from sending */ + return sendto(conn->fdout, buf, len, 0, (struct sockaddr *) &conn->outaddr, sizeof(conn->outaddr)); + } else { + errno=EBADF; + return -1; + } +} + +ssize_t +ns_send_pb(NSCONN *conn, const netpkt_t *packet,int flags) { + + NetworkMessage network_message = NetworkMessage_init_zero; + uint8_t fragment_count; + + /* Do we need to fragment? First, determine how many packets we will be sending */ + if(packet->len <= MAX_FRAME_SEND_SIZE) { + fragment_count = 1; +// net_switch_log("No Fragmentation. Frame size %d is less than max size %d\n", packet->len, MAX_FRAME_SEND_SIZE); + } else { + /* Since we're using integer math and the remainder is + * discarded we'll add one to the result *unless* the result can be evenly divided. */ + const uint8_t extra = (packet->len % MAX_FRAME_SEND_SIZE) == 0 ? 0 : 1; + fragment_count = (packet->len / MAX_FRAME_SEND_SIZE) + extra; +// net_switch_log("Fragmentation required, frame size %d exceeds max size %d\n", packet->len, MAX_FRAME_SEND_SIZE); + } + + /* Loop here for each fragment. Send each fragment. In the even that the packet is *not* a fragment (regular data packet) + * this will only execute once. */ + const uint32_t fragment_sequence = conn->sequence; + const int64_t packet_timestamp = ns_get_current_millis(); + for (uint8_t fragment_index = 0; fragment_index < fragment_count; fragment_index++) { + uint8_t buffer[NET_SWITCH_BUFFER_LENGTH]; + pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); +#ifdef ENABLE_NET_SWITCH_PB_FILE_DEBUG + uint8_t file_buffer[NET_SWITCH_BUFFER_LENGTH]; + /* file_stream used for debugging and writing the message to a file */ + pb_ostream_t file_stream = pb_ostream_from_buffer(file_buffer, sizeof(file_buffer)); +#endif + /* Single frame is type DATA, fragments are FRAGMENT */ + network_message.message_type = fragment_count > 1 ? MessageType_MESSAGE_TYPE_FRAGMENT : MessageType_MESSAGE_TYPE_DATA; + network_message.client_id = conn->client_id; + network_message.timestamp = packet_timestamp; + network_message.version = conn->version; + + /* Need some additional data if we're a fragment */ + if(fragment_count > 1) { + network_message.fragment.total = fragment_count; + network_message.fragment.id = fragment_sequence; + network_message.fragment.sequence = fragment_index + 1; + network_message.has_fragment = true; + } + + /* TODO: Better / real ack logic. Needs its own function. Currently just putting in dummy data. */ + network_message.ack.id = 1; + network_message.ack.history = 1; + network_message.has_ack = true; + network_message.sequence = conn->sequence; + + /* Frame data must be allocated */ + network_message.frame = calloc(1, PB_BYTES_ARRAY_T_ALLOCSIZE(packet->len)); + + /* Calculate offsets based on our position in the fragment. + * For anything other than the *last* packet, we'll have a max frame size */ + uint16_t copy_length; + const uint16_t copy_offset = fragment_index * MAX_FRAME_SEND_SIZE; + if(fragment_index == (fragment_count - 1)) { + copy_length = packet->len % MAX_FRAME_SEND_SIZE == 0 ? MAX_FRAME_SEND_SIZE : packet->len % MAX_FRAME_SEND_SIZE; + } else { + copy_length = MAX_FRAME_SEND_SIZE; + } + if(fragment_count > 1) { +// net_switch_log("Fragment %d/%d, %d bytes\n", fragment_index + 1, fragment_count, copy_length); + } + network_message.frame->size = copy_length; + memcpy(network_message.frame->bytes, packet->data + copy_offset, copy_length); + + /* mac address must be allocated */ + network_message.mac = calloc(1, PB_BYTES_ARRAY_T_ALLOCSIZE(PB_MAC_ADDR_SIZE)); + network_message.mac->size = PB_MAC_ADDR_SIZE; + memcpy(network_message.mac->bytes, conn->mac_addr, PB_MAC_ADDR_SIZE); + + /* Encode the protobuf message */ + if (!pb_encode_ex(&stream, NetworkMessage_fields, &network_message,PB_ENCODE_DELIMITED)) { + net_switch_log("Encoding failed: %s\n", PB_GET_ERROR(&stream)); + errno = EBADF; + return -1; + } + + /* Send on the socket */ + const ssize_t nc = ns_sock_send(conn, buffer, stream.bytes_written, 0); + if(!nc) { + net_switch_log("Error sending data on the socket\n"); + errno=EBADF; + pb_release(NetworkMessage_fields, &network_message); + return -1; + } +#ifdef ENABLE_NET_SWITCH_PB_FILE_DEBUG + /* File writing for troubleshooting when needed */ + FILE *f = fopen("/var/tmp/pbuf", "wb"); + if (f) { + if (!pb_encode(&file_stream, NetworkMessage_fields, &network_message)) { + net_switch_log("File encoding failed: %s\n", PB_GET_ERROR(&file_stream)); + } + fwrite(file_buffer, file_stream.bytes_written, 1, f); + fclose(f); + } else { + net_switch_log("file open failed\n"); + } +#endif + + /* Stats */ + if(network_message.frame->size > conn->stats.max_tx_frame) { + conn->stats.max_tx_frame = network_message.frame->size; + } + if(nc > conn->stats.max_tx_packet) { + conn->stats.max_tx_packet = nc; + } + if(nc > MAX_FRAME_SEND_SIZE) { + conn->stats.total_fragments = fragment_count > 1 ? conn->stats.total_fragments + fragment_count : conn->stats.total_fragments; + } + conn->stats.total_tx_packets++; + memcpy(conn->stats.last_tx_ethertype, &packet->data[12], 2); + + /* Increment the sequence number */ + seq_increment(conn); + + /* nanopb will free all the allocated entries for us */ + pb_release(NetworkMessage_fields, &network_message); + + } + + return packet->len; +} + +bool store_fragment(const NSCONN *conn, const NetworkMessage *network_message) { + + if(conn == NULL || network_message == NULL) { + return false; + } + + /* The fragment sequence indicates which fragment this is in the overall fragment + * collection. This is used to index the fragments while being stored for reassembly + * (zero indexed locally) */ + const uint32_t fragment_index = network_message->fragment.sequence - 1; + const uint32_t fragment_size = network_message->frame->size; + + /* Make sure the fragments aren't too small + * (see header notes about size requirements for MIN_FRAG_RECV_SIZE and FRAGMENT_BUFFER_LENGTH) + * NOTE: The last packet is exempt from this rule because it can have a smaller amount. + * This is primarily to ensure there's enough space to fit all the fragments. */ + if(network_message->fragment.sequence != network_message->fragment.total) { + if (network_message->frame->size < MIN_FRAG_RECV_SIZE) { + net_switch_log("size: %d < %d\n", network_message->frame->size, MIN_FRAG_RECV_SIZE); + return false; + } + } + + /* Make sure we can handle the amount of incoming fragments */ + if (network_message->fragment.total > FRAGMENT_BUFFER_LENGTH) { + net_switch_log("buflen: %d > %d\n", network_message->fragment.total, FRAGMENT_BUFFER_LENGTH); + return false; + } + + /* Allocate or reallocate as needed. + * size > 0 indicates this buffer has already been allocated. */ + if(conn->fragment_buffer[fragment_index]->size > 0) { + conn->fragment_buffer[fragment_index]->data = realloc(conn->fragment_buffer[fragment_index]->data, sizeof(char) * fragment_size); + } else { + conn->fragment_buffer[fragment_index]->data = calloc(1, sizeof(char) * fragment_size); + } + + if (conn->fragment_buffer[fragment_index]->data == NULL) { + net_switch_log("Failed to allocate / reallocate fragment buffer space\n"); + return false; + } + + /* Each fragment will belong to a particular ID. All members will have the same ID, + * which is generally set to the sequence number of the first fragment */ + conn->fragment_buffer[fragment_index]->id = network_message->fragment.id; + /* The sequence here is set to the index of the packet in the total fragment collection + * (network_message->fragment.sequence) */ + conn->fragment_buffer[fragment_index]->sequence = fragment_index; + /* Total number of fragments in this set */ + conn->fragment_buffer[fragment_index]->total = network_message->fragment.total; + /* The sequence number from the packet that contained the fragment */ + conn->fragment_buffer[fragment_index]->packet_sequence = network_message->sequence; + /* Copy the fragment data and size */ + /* The size of fragment_buffer[fragment_index]->data is checked against MAX_FRAME_SEND_SIZE above */ + memcpy(conn->fragment_buffer[fragment_index]->data, network_message->frame->bytes, fragment_size); + conn->fragment_buffer[fragment_index]->size = fragment_size; + /* 10 seconds for a TTL */ + conn->fragment_buffer[fragment_index]->ttl = ns_get_current_millis() + 10000; + + return true; +} + +bool +reassemble_fragment(const NSCONN *conn, netpkt_t *pkt, const uint32_t packet_count) +{ + uint32_t total = 0; + + /* Make sure the reassembled packet doesn't exceed NET_MAX_FRAME */ +// if (packet_count * MAX_FRAME_SEND_SIZE > NET_MAX_FRAME) { +// return false; +// } + + /* Too many packets! */ + if (packet_count > FRAGMENT_BUFFER_LENGTH) { + return false; + } + + // TODO: Check fragment ID + // TODO: Check TTL + + /* Get the fragment size from the first entry. All fragments in a particular + * set must be of the same size except the last fragment, which may be smaller. + * The fragment size will be used to determine the offset. */ + const uint16_t fragment_size = conn->fragment_buffer[0]->size; + +// net_switch_log("Reassembling %d fragments\n", packet_count); + + for(int i = 0; i < packet_count; i++) { + /* Size of zero means we're trying to assemble from a bad fragment */ + if(conn->fragment_buffer[i]->size == 0) { + net_switch_log("Fragment size 0 when trying to reassemble (id %i/index %i/seq %i/ total %i)\n",conn->fragment_buffer[i]->id, i, conn->fragment_buffer[i]->sequence, conn->fragment_buffer[i]->total); + return false; + } + if(conn->fragment_buffer[i]->data == NULL) { + net_switch_log("Missing fragment data when trying to reassemble\n"); + return false; + } + + memcpy(pkt->data + (fragment_size * i), conn->fragment_buffer[i]->data, conn->fragment_buffer[i]->size); + total += conn->fragment_buffer[i]->size; + + /* Zero out the size to indicate the slot is unused */ + conn->fragment_buffer[i]->size = 0; + free(conn->fragment_buffer[i]->data); + conn->fragment_buffer[i]->data = NULL; + } + + /* Set the size, must cast due to netpkt_t (len is int) */ + pkt->len = (int) total; +// net_switch_log("%d bytes reassembled and converted to data packet.\n", pkt->len); + + return true; +} + +bool +ns_recv_pb(NSCONN *conn, ns_rx_packet_t *packet,size_t len,int flags) { + NetworkMessage network_message = NetworkMessage_init_zero; + ns_rx_packet_t *ns_packet = packet; + + uint8_t buffer[NET_SWITCH_BUFFER_LENGTH]; + + /* TODO: Use the passed len? Most likely not needed */ + const ssize_t nc = ns_sock_recv(conn, buffer, NET_SWITCH_BUFFER_LENGTH, 0); + if(!nc) { + net_switch_log("Error receiving data on the socket\n"); + errno=EBADF; + return false; + } + pb_istream_t stream = pb_istream_from_buffer(buffer, sizeof(buffer)); + + if (!pb_decode_delimited(&stream, NetworkMessage_fields, &network_message)) { + /* Decode failed */ + net_switch_log("PB decoding failed: %s\n", PB_GET_ERROR(&stream)); + /* Allocated fields are automatically released upon failure */ + return false; + } + + /* Basic checks for validity */ + if(network_message.mac == NULL || network_message.message_type == MessageType_MESSAGE_TYPE_UNSPECIFIED || + network_message.client_id == 0) { + net_switch_log("Invalid packet received! Skipping..\n"); + goto fail; + } + + /* These fields should always be set. Start copying into our packet structure. */ + ns_packet->client_id = network_message.client_id; + ns_packet->type = network_message.message_type; + memcpy(ns_packet->mac, network_message.mac->bytes, PB_MAC_ADDR_SIZE); + ns_packet->timestamp = network_message.timestamp; + ns_packet->version = network_message.version; + conn->remote_sequence = network_message.sequence; + conn->last_packet_stamp = network_message.timestamp; + + /* Control messages take a different path */ + if(network_message.message_type != MessageType_MESSAGE_TYPE_DATA && + network_message.message_type != MessageType_MESSAGE_TYPE_FRAGMENT) { + process_control_packet(conn, ns_packet); + pb_release(NetworkMessage_fields, &network_message); + return true; + } + + /* All packets should be DATA or FRAGMENT at this point and have a frame */ + if(network_message.frame == NULL) { + net_switch_log("Invalid data packet received! Frame is null. Skipping..\n"); + goto fail; + } + + /* Fragment path first */ + if(network_message.message_type == MessageType_MESSAGE_TYPE_FRAGMENT) { + + /* Store fragment */ + if(!store_fragment(conn, &network_message)) { + net_switch_log("Failed to store fragment\n"); + goto fail; + } + + /* Is this the last fragment? If not, return */ + if(network_message.fragment.sequence != network_message.fragment.total) { + // FIXME: Really dumb, needs to be smarter + pb_release(NetworkMessage_fields, &network_message); + return true; + } + + /* This is the last fragment. Attempt to reassemble */ + if(!reassemble_fragment(conn, &ns_packet->pkt, network_message.fragment.total)) { + net_switch_log("Failed to reassemble fragment\n"); + goto fail; + } + /* Change the type to DATA */ + ns_packet->type = MessageType_MESSAGE_TYPE_DATA; + + } else { + /* Standard DATA packet path. Copy frame from the message */ + memcpy(ns_packet->pkt.data, network_message.frame->bytes, network_message.frame->size); + ns_packet->pkt.len = network_message.frame->size; + } + + /* Stats */ + if(network_message.frame->size > conn->stats.max_rx_frame) { + conn->stats.max_rx_frame = network_message.frame->size; + } + if(nc > conn->stats.max_rx_packet) { + conn->stats.max_rx_packet = nc; + } + memcpy(conn->stats.last_rx_ethertype, &packet->pkt.data[12], 2); + conn->stats.total_rx_packets++; + /* End Stats */ + + /* nanopb allocates the necessary fields while serializing. + They need to be manually released once you are done with the message */ + pb_release(NetworkMessage_fields, &network_message); + return true; +fail: + pb_release(NetworkMessage_fields, &network_message); + return false; +} + +bool process_control_packet(NSCONN *conn, const ns_rx_packet_t *packet) { + + control_packet_info_t packet_info = get_control_packet_info(*packet, conn->mac_addr); +// net_switch_log("Last timestamp: %lld\n", ns_get_current_millis()); +// net_switch_log("(%lld ms) [%03d] ", ns_get_current_millis() - packet_info.timestamp, conn->sequence); + + /* I probably want to eventually differentiate between local and remote here, kind of basic now */ + if(!packet_info.is_packet_from_me) { /* in case of local mode */ + switch (packet_info.type) { + case MessageType_MESSAGE_TYPE_JOIN: + net_switch_log("Client ID 0x%08llx (MAC %s) has joined the chat\n", packet_info.client_id, packet_info.src_mac_h); + break; + case MessageType_MESSAGE_TYPE_LEAVE: + net_switch_log("Client ID 0x%08llx (MAC %s) has left us\n", packet_info.client_id, packet_info.src_mac_h); + break; + case MessageType_MESSAGE_TYPE_KEEPALIVE: +// net_switch_log("Client ID 0x%08llx (MAC %s) is still alive\n", packet_info.client_id, packet_info.src_mac_h); + break; + case MessageType_MESSAGE_TYPE_ACK: +// net_switch_log("Client ID 0x%08llx (MAC %s) has sent an ACK\n", packet_info.client_id, packet_info.src_mac_h); + break; + case MessageType_MESSAGE_TYPE_CONNECT_REPLY: + conn->client_state = CONNECTED; + net_switch_log("Client ID 0x%08llx (MAC %s) has sent a connection reply\n", packet_info.client_id, packet_info.src_mac_h); + net_switch_log("Client state is now CONNECTED\n"); + break; + case MessageType_MESSAGE_TYPE_FRAGMENT: + net_switch_log("Client ID 0x%08llx (MAC %s) has sent a fragment\n", packet_info.client_id, packet_info.src_mac_h); + break; + default: + net_switch_log("Client ID 0x%08llx (MAC %s) has sent a message that we don't understand (type %d)\n", packet_info.client_id, packet_info.src_mac_h, packet_info.type); + break; + } + } + return true; + +} + +bool +ns_send_control(NSCONN *conn, const MessageType type) { + + NetworkMessage network_message = NetworkMessage_init_zero; + uint8_t buffer[NET_SWITCH_BUFFER_LENGTH]; + + pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); + network_message.message_type = type; + network_message.client_id = conn->client_id; + + /* No frame data so we only need to allocate mac address */ + network_message.mac = calloc(1, PB_BYTES_ARRAY_T_ALLOCSIZE(PB_MAC_ADDR_SIZE)); + network_message.mac->size = PB_MAC_ADDR_SIZE; + memcpy(network_message.mac->bytes, conn->mac_addr, PB_MAC_ADDR_SIZE); + + network_message.timestamp = ns_get_current_millis(); + network_message.version = conn->version; + network_message.sequence = conn->sequence; + + if (!pb_encode_ex(&stream, NetworkMessage_fields, &network_message, PB_ENCODE_DELIMITED)) { + net_switch_log("Encoding failed: %s\n", PB_GET_ERROR(&stream)); + errno = EBADF; + return false; + } + + const ssize_t nc = ns_sock_send(conn, buffer, stream.bytes_written, 0); + if(!nc) { + net_switch_log("Error sending control message on the socket\n"); + errno=EBADF; + pb_release(NetworkMessage_fields, &network_message); + return -1; + } + /* Increment the sequence number */ + seq_increment(conn); + + /* Stats */ + conn->stats.total_tx_packets++; + + /* Must release allocated data */ + pb_release(NetworkMessage_fields, &network_message); + + return true; +} + +uint32_t +ns_gen_client_id(void) { + uint32_t msb; + do { + msb = random_generate(); + } while (msb < 0x10); + return ( random_generate() | (random_generate() << 8) | (random_generate() << 16) | (msb << 24)); +} + +const char * +ns_printable_message_type(const MessageType type) +{ + switch (type) { + case MessageType_MESSAGE_TYPE_DATA: + return "Data"; + case MessageType_MESSAGE_TYPE_JOIN: + return "Join"; + case MessageType_MESSAGE_TYPE_LEAVE: + return "Leave"; + case MessageType_MESSAGE_TYPE_KEEPALIVE: + return "Keepalive"; + case MessageType_MESSAGE_TYPE_FRAGMENT: + return "Fragment"; + case MessageType_MESSAGE_TYPE_ACK: + return "Ack"; + case MessageType_MESSAGE_TYPE_UNSPECIFIED: + return "Unspecified (shouldn't get this)"; + default: + return "Unknown message type - probably hasn't been added yet!"; + } +} + +int64_t +ns_get_current_millis(void) { + struct timeval time; + gettimeofday(&time, NULL); + /* Windows won't properly promote integers so this is necessary */ + const int64_t seconds = (int64_t) time.tv_sec * 1000; + + return seconds + (time.tv_usec / 1000); +} + +int +ns_flags(const NSCONN *conn) { + return conn->flags; +} + +int +ns_close(NSCONN *conn) { + if(conn->switch_type == SWITCH_TYPE_REMOTE) { + /* TBD */ + } + /* No need to check the return here as we're closing out */ + ns_send_control(conn, MessageType_MESSAGE_TYPE_LEAVE); + for (int i = 0; i < FRAGMENT_BUFFER_LENGTH; i++) { + if (conn->fragment_buffer[i]->size > 0) { + free(conn->fragment_buffer[i]->data); + conn->fragment_buffer[i]->data = NULL; + } + free(conn->fragment_buffer[i]); + } + close(conn->fddata); + close(conn->fdout); + return 0; +} + +bool is_control_packet(const ns_rx_packet_t *packet) { + return packet->type != MessageType_MESSAGE_TYPE_DATA; +} + +bool is_fragment_packet(const ns_rx_packet_t *packet) { + return packet->type == MessageType_MESSAGE_TYPE_FRAGMENT; +} + +bool ns_connected(const NSCONN *conn) { + if(conn->switch_type == SWITCH_TYPE_LOCAL) { + return true; + } + + if(conn->switch_type == SWITCH_TYPE_REMOTE) { + if(conn->client_state == CONNECTED) { + return true; + } + } + + return false; +} + +char* formatted_mac(uint8_t mac_addr[6]) +{ + char *mac_h = calloc(1, sizeof(char)* 32); + for(int i=0; i < 6; i++) { + char octet[4]; + snprintf(octet, sizeof(octet), "%02X%s", mac_addr[i], i < 5 ? ":" : ""); + strncat(mac_h, octet, sizeof(mac_h) - 1); + } + return mac_h; +} + +control_packet_info_t get_control_packet_info(const ns_rx_packet_t packet, const uint8_t *my_mac) +{ + control_packet_info_t packet_info; + + packet_info.src_mac_h[0] = '\0'; + packet_info.printable[0] = '\0'; + packet_info.client_id = packet.client_id; + memcpy(packet_info.src_mac, &packet.mac, 6); + packet_info.type = packet.type; + packet_info.is_packet_from_me = (memcmp(my_mac, packet_info.src_mac, sizeof(uint8_t) * 6) == 0); + char *formatted_mac_h = formatted_mac(packet_info.src_mac); + strncpy(packet_info.src_mac_h, formatted_mac_h, MAX_PRINTABLE_MAC); + free(formatted_mac_h); + snprintf(packet_info.printable, sizeof(packet_info.printable), "%s", ns_printable_message_type(packet_info.type)); + packet_info.timestamp = packet.timestamp; + + return packet_info; +} + +data_packet_info_t +get_data_packet_info(const netpkt_t *packet, const uint8_t *my_mac) { + data_packet_info_t packet_info; + + packet_info.src_mac_h[0] = '\0'; + packet_info.dest_mac_h[0] = '\0'; + packet_info.my_mac_h[0] = '\0'; + packet_info.printable[0] = '\0'; + + memcpy(packet_info.dest_mac,&packet->data[0], 6); + memcpy(packet_info.src_mac, &packet->data[6], 6); + + /* Broadcast and multicast are treated the same at L2 and both will have the + * least significant bit of 1 in the first transmitted byte. + * The below test matches 0xFF for standard broadcast along with 0x01 and 0x33 for multicast */ + packet_info.is_broadcast = ((packet->data[0] & 1) == 1); + packet_info.is_packet_for_me = (memcmp(my_mac, packet_info.dest_mac, sizeof(uint8_t) * 6) == 0); + packet_info.is_packet_from_me = (memcmp(my_mac, packet_info.src_mac, sizeof(uint8_t) * 6) == 0); + packet_info.is_data_packet = packet->len > 0; + packet_info.size = packet->len; + + /* Since this function is applied to every packet, only enable the pretty formatting below + * if logging is specifically enabled. */ +#ifdef ENABLE_NET_SWITCH_LOG + /* Pretty formatting for hardware addresses */ + for(int i=0; i < 6; i++) { + char octet[4]; + snprintf(octet, sizeof(octet), "%02X%s", packet_info.src_mac[i], i < 5 ? ":" : ""); + strncat(packet_info.src_mac_h, octet, sizeof (packet_info.src_mac_h) - 1); + + snprintf(octet, sizeof(octet), "%02X%s", packet_info.dest_mac[i], i < 5 ? ":" : ""); + strncat(packet_info.dest_mac_h, octet, sizeof (packet_info.dest_mac_h) - 1); + + snprintf(octet, sizeof(octet), "%02X%s", my_mac[i], i < 5 ? ":" : ""); + strncat(packet_info.my_mac_h, octet, sizeof (packet_info.my_mac_h) - 1); + } + + /* Printable output formatting */ + if(packet_info.is_broadcast) { + if(packet_info.is_packet_from_me) { + snprintf(packet_info.printable, sizeof(packet_info.printable), "(broadcast)"); + } else { + snprintf(packet_info.printable, sizeof(packet_info.printable), "%s (broadcast)", packet_info.src_mac_h); + } + } else { + snprintf(packet_info.printable, sizeof(packet_info.printable), "%s%s -> %s%s", packet_info.src_mac_h, packet_info.is_packet_from_me ? " (me)" : " ", + packet_info.dest_mac_h, packet_info.is_packet_for_me ? " (me)" : ""); + } +#endif + return packet_info; +} + +bool +fd_valid(const int fd) +{ +#ifdef _WIN32 + int error_code; + int error_code_size = sizeof(error_code); + getsockopt(fd, SOL_SOCKET, SO_ERROR, (char *) &error_code, &error_code_size); + if (error_code == WSAENOTSOCK) { + return false; + } + return true; +#else + if (fcntl(fd, F_GETFD) == -1) { + return false; + } + /* All other values will be a valid fd */ + return true; +#endif +} + +bool +seq_increment(NSCONN *conn) +{ + if(conn == NULL) { + return false; + } + conn->sequence++; + if (conn->sequence == 0) { + conn->sequence = 1; + } + return true; +} diff --git a/src/network/netswitch.h b/src/network/netswitch.h new file mode 100644 index 000000000..02534ff30 --- /dev/null +++ b/src/network/netswitch.h @@ -0,0 +1,298 @@ +/* +* 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. +* +* Network Switch backend +* +* +* +* Authors: cold-brewed +* +* Copyright 2024 cold-brewed +*/ + +#ifndef NET_SWITCH_H +#define NET_SWITCH_H + +#ifdef _WIN32 +#include // before Windows.h, else Winsock 1 conflict +#include // needed for ip_mreq definition for multicast +#include +#else +#include +#include +#include +#include +#include +#endif +#include +#include "pb.h" +#include "networkmessage.pb.h" + +/* Local switch multicast port */ +#define NET_SWITCH_MULTICAST_PORT 8086 +/* Remote switch connect port */ +#define NET_SWITCH_REMOTE_PORT 8088 +/* Remove switch. This offset is where the local source ports will begin. */ +#define NET_SWITCH_RECV_PORT_OFFSET 198 +/* Multicast group (IP Address) maximum length. String representation. */ +#define MAX_MCAST_GROUP_LEN 32 +/* The buffer length used for both receiving on sockets and protobuf serialize / deserialize */ +#define NET_SWITCH_BUFFER_LENGTH 2048 + +/* Any frame above this size gets fragmented */ +#define MAX_FRAME_SEND_SIZE 1200 +/* Minimum fragment size we'll accept */ +#define MIN_FRAG_RECV_SIZE 12 +/* + Size of the fragment buffer - how many can we hold? + Note: FRAGMENT_BUFFER_LENGTH * MIN_FRAG_RECV_SIZE *must* be greater + than NET_MAX_FRAME or bad things will happen with large packets! +*/ +#define FRAGMENT_BUFFER_LENGTH 128 +/* Maximum number of switch groups */ +#define MAX_SWITCH_GROUP 31 +/* Size of a mac address in bytes. Used for the protobuf serializing / deserializing */ +#define PB_MAC_ADDR_SIZE 6 +/* This will define the version in use and the minimum required for communication */ +#define NS_PROTOCOL_VERSION 1 +/* Maximum string size for a printable (formatted) mac address */ +#define MAX_PRINTABLE_MAC 32 +/* Maximum hostname length for a remote switch host */ +#define MAX_HOSTNAME 128 + +typedef enum { + FLAGS_NONE = 0, + FLAGS_PROMISC = 1 << 0, +} ns_flags_t; + +typedef enum { + SWITCH_TYPE_LOCAL = 0, + SWITCH_TYPE_REMOTE, +} ns_type_t; + +typedef enum { + DISCONNECTED, + CONNECTING, + CONNECTED, + LOCAL, +} ns_client_state_t; + +struct ns_open_args { + uint8_t group; + ns_flags_t flags; + ns_type_t type; + char *client_id; + uint8_t mac_addr[6]; + char nrs_hostname[MAX_HOSTNAME]; +}; + +struct nsconn; + +typedef struct nsconn NSCONN; + +struct ns_stats { + size_t max_tx_frame; + size_t max_tx_packet; + size_t max_rx_frame; + size_t max_rx_packet; + uint8_t last_tx_ethertype[2]; + uint8_t last_rx_ethertype[2]; + u_long total_rx_packets; + u_long total_tx_packets; + u_long total_fragments; + uint8_t max_vec; +}; + +typedef struct { + /* The ID of the fragment. All fragments in a set should have the same ID. */ + uint32_t id; + /* The fragment index in the sequence of fragments. NOTE: one indexed, not zero! + * Example: the first fragment of three would be 1 in the sequence */ + uint32_t sequence; + /* Total number of fragments for the collection */ + uint32_t total; + /* The sequence number of the packet that delivered the fragment. Not the same as fragment sequence above! */ + uint32_t packet_sequence; + /* Frame data */ + char *data; + /* Frame size. A size of zero indicates an unused fragment slot and unallocated data field. */ + uint32_t size; + /* Epoch time (in ms) that the fragment is valid until */ + uint64_t ttl; +} ns_fragment_t; + +struct nsconn { + uint16_t flags; + int fdctl; + int fddata; + int fdout; + char mcast_group[MAX_MCAST_GROUP_LEN]; + struct sockaddr_in addr; + struct sockaddr_in outaddr; + size_t outlen; + struct sockaddr *sock; + struct sockaddr *outsock; + struct ns_stats stats; + uint32_t client_id; + uint8_t mac_addr[6]; + uint16_t sequence; + uint16_t remote_sequence; + uint8_t version; + uint8_t switch_type; + ns_client_state_t client_state; + int64_t last_packet_stamp; + /* Remote switch hostname */ + char nrs_hostname[MAX_HOSTNAME]; + /* Remote connect port for remote network switch */ + uint16_t remote_network_port; + /* Local multicast port for the local network switch */ + uint16_t local_multicast_port; + /* + * The source port to receive packets. Only applies to remote mode. + * This will also be the source port for sent packets in order to aid + * NAT + */ + uint16_t remote_source_port; + ns_fragment_t *fragment_buffer[FRAGMENT_BUFFER_LENGTH]; +}; + +typedef struct { + uint32_t id; + uint32_t history; +} ns_ack_t; + +typedef struct { + uint32_t id; + uint32_t sequence; + uint32_t total; +} ns_fragment_info_t; + +typedef struct { + netpkt_t pkt; + MessageType type; + uint32_t client_id; + uint8_t mac[6]; + uint32_t flags; + int64_t timestamp; + ns_ack_t ack; + ns_fragment_info_t fragment; + uint32_t version; +} ns_rx_packet_t; + +typedef struct { + size_t size; + char src_mac_h[MAX_PRINTABLE_MAC]; + char dest_mac_h[MAX_PRINTABLE_MAC]; + char my_mac_h[MAX_PRINTABLE_MAC]; + uint8_t src_mac[6]; + uint8_t dest_mac[6]; + bool is_packet_from_me; + bool is_broadcast; + bool is_packet_for_me; + bool is_data_packet; + char printable[128]; +} data_packet_info_t; + +typedef struct { + uint8_t src_mac[6]; + char src_mac_h[MAX_PRINTABLE_MAC]; + bool is_packet_from_me; + MessageType type; + char printable[128]; + uint64_t client_id; + int64_t timestamp; +} control_packet_info_t; + +/* Initializes and opens the Net Multicast Switch */ +NSCONN *ns_open(struct ns_open_args *open_args); + +/* Returns the flags */ +int ns_flags(const NSCONN *conn); + +/* Returns the file descriptor for polling */ +int ns_pollfd(const NSCONN *conn); + +/* This should be used to receive serialized protobuf packets + * and have the output placed in the packet struct */ +bool ns_recv_pb(NSCONN *conn, ns_rx_packet_t *packet,size_t len,int flags); + +/* Do not call directly! Used internally */ +ssize_t ns_sock_recv(const NSCONN *conn,void *buf,size_t len,int flags); + +/* This should be used to send serialized protobuf packets +* and have the output placed in the packet struct */ +ssize_t ns_send_pb(NSCONN *conn, const netpkt_t *packet,int flags); + +/* Send control messages */ +bool ns_send_control(NSCONN *conn, MessageType type); + +const char* ns_printable_message_type(MessageType type); + +/* Do not call directly! Used internally */ +ssize_t ns_sock_send(NSCONN *conn,const void *buf,size_t len,int flags); + +uint32_t ns_gen_client_id(void); + +/* Closes and cleans up */ +int ns_close(NSCONN *conn); + +/* Return current time in milliseconds */ +int64_t ns_get_current_millis(void); + +/* Is the packet a control packet? + * Any type other than DATA is a control packet, including fragments */ +bool is_control_packet(const ns_rx_packet_t *packet); + +/* Logic for handling control packets */ +bool process_control_packet(NSCONN *conn, const ns_rx_packet_t *packet); + +/* Is the packet a fragment packet? */ +bool is_fragment_packet(const ns_rx_packet_t *packet); + +/* Store a fragment in the fragment buffer */ +bool store_fragment(const NSCONN *conn, const NetworkMessage *network_message); + +/* Reassemble a fragment from the fragment buffer */ +bool reassemble_fragment(const NSCONN *conn, netpkt_t *pkt, uint32_t packet_count); + +/* Set up the socket. Accounts for the differences between local and remote modes */ +bool ns_socket_setup(NSCONN *conn); + +/* Is the switch in a connected state? Always returns true in local mode */ +bool ns_connected(const NSCONN *conn); + +/* Return a string with a properly formatted mac address. + * Note: Caller must free! */ +char* formatted_mac(uint8_t mac_addr[6]); + +/* Used for control packet info and logic */ +control_packet_info_t get_control_packet_info(ns_rx_packet_t packet, const uint8_t *my_mac); + +/* Used for data packet info and logic */ +data_packet_info_t get_data_packet_info(const netpkt_t *packet, const uint8_t *my_mac); + +/* Checks for a valid file descriptor */ +bool fd_valid(int fd); + +/* Wrapping increment for the sequence number */ +bool seq_increment(NSCONN *conn); + +#ifdef ENABLE_NET_SWITCH_LOG +static void +net_switch_log(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + pclog_ex(fmt, ap); + va_end(ap); +} +#else +# define net_switch_log(fmt, ...) +#endif + +#endif \ No newline at end of file diff --git a/src/network/network.c b/src/network/network.c index 0372a57fc..9b56515e8 100644 --- a/src/network/network.c +++ b/src/network/network.c @@ -503,6 +503,13 @@ network_attach(void *card_drv, uint8_t *mac, NETRXCB rx, NETSETLINKSTATE set_lin card->host_drv.priv = card->host_drv.init(card, mac, net_cards_conf[net_card_current].host_dev_name, net_drv_error); break; #endif +#ifdef USE_NETSWITCH + case NET_TYPE_NMSWITCH: + case NET_TYPE_NRSWITCH: + card->host_drv = net_netswitch_drv; + card->host_drv.priv = card->host_drv.init(card, mac, &net_cards_conf[net_card_current], net_drv_error); + break; +#endif /* USE_NETSWITCH */ default: card->host_drv.priv = NULL; break; @@ -514,6 +521,14 @@ network_attach(void *card_drv, uint8_t *mac, NETRXCB rx, NETSETLINKSTATE set_lin if (!card->host_drv.priv) { if(net_cards_conf[net_card_current].net_type != NET_TYPE_NONE) { +#ifdef USE_NETSWITCH + // FIXME: Hardcoded during dev + // FIXME: Remove when done! + if((net_cards_conf[net_card_current].net_type == NET_TYPE_NMSWITCH) || + (net_cards_conf[net_card_current].net_type == NET_TYPE_NRSWITCH)) + fatal("%s", net_drv_error); +#endif /* USE_NETSWITCH */ + // We're here because of a failure swprintf(tempmsg, sizeof_w(tempmsg), L"%ls:\n\n%s\n\n%ls", plat_get_string(STRING_NET_ERROR), net_drv_error, plat_get_string(STRING_NET_ERROR_DESC)); ui_msgbox(MBX_ERROR, tempmsg); diff --git a/src/network/networkmessage.pb.c b/src/network/networkmessage.pb.c new file mode 100644 index 000000000..c15f03e01 --- /dev/null +++ b/src/network/networkmessage.pb.c @@ -0,0 +1,19 @@ +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.4.8-dev */ + +#include "networkmessage.pb.h" +#if PB_PROTO_HEADER_VERSION != 40 +#error Regenerate this file with the current version of nanopb generator. +#endif + +PB_BIND(Fragment, Fragment, AUTO) + + +PB_BIND(Ack, Ack, AUTO) + + +PB_BIND(NetworkMessage, NetworkMessage, AUTO) + + + + diff --git a/src/network/networkmessage.pb.h b/src/network/networkmessage.pb.h new file mode 100644 index 000000000..0a74e55b9 --- /dev/null +++ b/src/network/networkmessage.pb.h @@ -0,0 +1,140 @@ +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.4.8-dev */ + +#ifndef PB_NETWORKMESSAGE_PB_H_INCLUDED +#define PB_NETWORKMESSAGE_PB_H_INCLUDED +#include "pb.h" + +#if PB_PROTO_HEADER_VERSION != 40 +#error Regenerate this file with the current version of nanopb generator. +#endif + +/* Enum definitions */ +typedef enum _MessageType { + MessageType_MESSAGE_TYPE_UNSPECIFIED = 0, + MessageType_MESSAGE_TYPE_DATA = 1, + MessageType_MESSAGE_TYPE_JOIN = 2, + MessageType_MESSAGE_TYPE_LEAVE = 3, + MessageType_MESSAGE_TYPE_KEEPALIVE = 4, + MessageType_MESSAGE_TYPE_FRAGMENT = 5, + MessageType_MESSAGE_TYPE_ACK = 6, + MessageType_MESSAGE_TYPE_CONNECT_REQUEST = 7, + MessageType_MESSAGE_TYPE_CONNECT_REPLY = 8 +} MessageType; + +/* Struct definitions */ +typedef struct _Fragment { + uint32_t id; + uint32_t sequence; + uint32_t total; +} Fragment; + +typedef struct _Ack { + uint32_t id; + uint32_t history; +} Ack; + +typedef struct _NetworkMessage { + MessageType message_type; + uint32_t client_id; + pb_bytes_array_t *mac; + pb_bytes_array_t *frame; + uint32_t flags; + uint32_t version; + bool has_ack; + Ack ack; + bool has_fragment; + Fragment fragment; + int64_t timestamp; + uint32_t sequence; +} NetworkMessage; + + +#ifdef __cplusplus +extern "C" { +#endif + +/* Helper constants for enums */ +#define _MessageType_MIN MessageType_MESSAGE_TYPE_UNSPECIFIED +#define _MessageType_MAX MessageType_MESSAGE_TYPE_CONNECT_REPLY +#define _MessageType_ARRAYSIZE ((MessageType)(MessageType_MESSAGE_TYPE_CONNECT_REPLY+1)) + + + +#define NetworkMessage_message_type_ENUMTYPE MessageType + + +/* Initializer values for message structs */ +#define Fragment_init_default {0, 0, 0} +#define Ack_init_default {0, 0} +#define NetworkMessage_init_default {_MessageType_MIN, 0, NULL, NULL, 0, 0, false, Ack_init_default, false, Fragment_init_default, 0, 0} +#define Fragment_init_zero {0, 0, 0} +#define Ack_init_zero {0, 0} +#define NetworkMessage_init_zero {_MessageType_MIN, 0, NULL, NULL, 0, 0, false, Ack_init_zero, false, Fragment_init_zero, 0, 0} + +/* Field tags (for use in manual encoding/decoding) */ +#define Fragment_id_tag 1 +#define Fragment_sequence_tag 2 +#define Fragment_total_tag 3 +#define Ack_id_tag 1 +#define Ack_history_tag 2 +#define NetworkMessage_message_type_tag 1 +#define NetworkMessage_client_id_tag 2 +#define NetworkMessage_mac_tag 3 +#define NetworkMessage_frame_tag 4 +#define NetworkMessage_flags_tag 5 +#define NetworkMessage_version_tag 6 +#define NetworkMessage_ack_tag 7 +#define NetworkMessage_fragment_tag 8 +#define NetworkMessage_timestamp_tag 9 +#define NetworkMessage_sequence_tag 10 + +/* Struct field encoding specification for nanopb */ +#define Fragment_FIELDLIST(X, a) \ +X(a, STATIC, SINGULAR, UINT32, id, 1) \ +X(a, STATIC, SINGULAR, UINT32, sequence, 2) \ +X(a, STATIC, SINGULAR, UINT32, total, 3) +#define Fragment_CALLBACK NULL +#define Fragment_DEFAULT NULL + +#define Ack_FIELDLIST(X, a) \ +X(a, STATIC, SINGULAR, UINT32, id, 1) \ +X(a, STATIC, SINGULAR, UINT32, history, 2) +#define Ack_CALLBACK NULL +#define Ack_DEFAULT NULL + +#define NetworkMessage_FIELDLIST(X, a) \ +X(a, STATIC, SINGULAR, UENUM, message_type, 1) \ +X(a, STATIC, SINGULAR, UINT32, client_id, 2) \ +X(a, POINTER, SINGULAR, BYTES, mac, 3) \ +X(a, POINTER, SINGULAR, BYTES, frame, 4) \ +X(a, STATIC, SINGULAR, UINT32, flags, 5) \ +X(a, STATIC, SINGULAR, UINT32, version, 6) \ +X(a, STATIC, OPTIONAL, MESSAGE, ack, 7) \ +X(a, STATIC, OPTIONAL, MESSAGE, fragment, 8) \ +X(a, STATIC, SINGULAR, INT64, timestamp, 9) \ +X(a, STATIC, SINGULAR, UINT32, sequence, 10) +#define NetworkMessage_CALLBACK NULL +#define NetworkMessage_DEFAULT NULL +#define NetworkMessage_ack_MSGTYPE Ack +#define NetworkMessage_fragment_MSGTYPE Fragment + +extern const pb_msgdesc_t Fragment_msg; +extern const pb_msgdesc_t Ack_msg; +extern const pb_msgdesc_t NetworkMessage_msg; + +/* Defines for backwards compatibility with code written before nanopb-0.4.0 */ +#define Fragment_fields &Fragment_msg +#define Ack_fields &Ack_msg +#define NetworkMessage_fields &NetworkMessage_msg + +/* Maximum encoded size of messages (where known) */ +/* NetworkMessage_size depends on runtime parameters */ +#define Ack_size 12 +#define Fragment_size 18 + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/src/network/networkmessage.proto.txt b/src/network/networkmessage.proto.txt new file mode 100644 index 000000000..9511f17c8 --- /dev/null +++ b/src/network/networkmessage.proto.txt @@ -0,0 +1,38 @@ +syntax = "proto3"; +import "nanopb.proto"; + +enum MessageType { + MESSAGE_TYPE_UNSPECIFIED = 0; + MESSAGE_TYPE_DATA = 1; + MESSAGE_TYPE_JOIN = 2; + MESSAGE_TYPE_LEAVE = 3; + MESSAGE_TYPE_KEEPALIVE = 4; + MESSAGE_TYPE_FRAGMENT = 5; + MESSAGE_TYPE_ACK = 6; + MESSAGE_TYPE_CONNECT_REQUEST = 7; + MESSAGE_TYPE_CONNECT_REPLY = 8; +} + +message Fragment { + uint32 id = 1; + uint32 sequence = 2; + uint32 total = 3; +} + +message Ack { + uint32 id = 1; + uint32 history = 2; +} + +message NetworkMessage { + MessageType message_type = 1; + uint32 client_id = 2; + bytes mac = 3 [(nanopb).type = FT_POINTER]; + bytes frame = 4 [(nanopb).type = FT_POINTER]; + uint32 flags = 5; + uint32 version = 6; + Ack ack = 7; + Fragment fragment = 8; + int64 timestamp = 9; + uint32 sequence = 10; +} \ No newline at end of file diff --git a/src/network/pb.h b/src/network/pb.h new file mode 100644 index 000000000..7433ac24b --- /dev/null +++ b/src/network/pb.h @@ -0,0 +1,917 @@ +/* Common parts of the nanopb library. Most of these are quite low-level + * stuff. For the high-level interface, see pb_encode.h and pb_decode.h. + */ + +#ifndef PB_H_INCLUDED +#define PB_H_INCLUDED + +/***************************************************************** + * Nanopb compilation time options. You can change these here by * + * uncommenting the lines, or on the compiler command line. * + *****************************************************************/ + +/* Enable support for dynamically allocated fields */ +#define PB_ENABLE_MALLOC 1 + +/* Define this if your CPU / compiler combination does not support + * unaligned memory access to packed structures. Note that packed + * structures are only used when requested in .proto options. */ +/* #define PB_NO_PACKED_STRUCTS 1 */ + +/* Increase the number of required fields that are tracked. + * A compiler warning will tell if you need this. */ +/* #define PB_MAX_REQUIRED_FIELDS 256 */ + +/* Add support for tag numbers > 65536 and fields larger than 65536 bytes. */ +/* #define PB_FIELD_32BIT 1 */ + +/* Disable support for error messages in order to save some code space. */ +/* #define PB_NO_ERRMSG 1 */ + +/* Disable support for custom streams (support only memory buffers). */ +#define PB_BUFFER_ONLY 1 + +/* Disable support for 64-bit datatypes, for compilers without int64_t + or to save some code space. */ +/* #define PB_WITHOUT_64BIT 1 */ + +/* Don't encode scalar arrays as packed. This is only to be used when + * the decoder on the receiving side cannot process packed scalar arrays. + * Such example is older protobuf.js. */ +/* #define PB_ENCODE_ARRAYS_UNPACKED 1 */ + +/* Enable conversion of doubles to floats for platforms that do not + * support 64-bit doubles. Most commonly AVR. */ +/* #define PB_CONVERT_DOUBLE_FLOAT 1 */ + +/* Check whether incoming strings are valid UTF-8 sequences. Slows down + * the string processing slightly and slightly increases code size. */ +/* #define PB_VALIDATE_UTF8 1 */ + +/* This can be defined if the platform is little-endian and has 8-bit bytes. + * Normally it is automatically detected based on __BYTE_ORDER__ macro. */ +/* #define PB_LITTLE_ENDIAN_8BIT 1 */ + +/* Configure static assert mechanism. Instead of changing these, set your + * compiler to C11 standard mode if possible. */ +/* #define PB_C99_STATIC_ASSERT 1 */ +/* #define PB_NO_STATIC_ASSERT 1 */ + +/****************************************************************** + * You usually don't need to change anything below this line. * + * Feel free to look around and use the defined macros, though. * + ******************************************************************/ + + +/* Version of the nanopb library. Just in case you want to check it in + * your own program. */ +#define NANOPB_VERSION "nanopb-0.4.8-dev" + +/* Include all the system headers needed by nanopb. You will need the + * definitions of the following: + * - strlen, memcpy, memset functions + * - [u]int_least8_t, uint_fast8_t, [u]int_least16_t, [u]int32_t, [u]int64_t + * - size_t + * - bool + * + * If you don't have the standard header files, you can instead provide + * a custom header that defines or includes all this. In that case, + * define PB_SYSTEM_HEADER to the path of this file. + */ +#ifdef PB_SYSTEM_HEADER +#include PB_SYSTEM_HEADER +#else +#include +#include +#include +#include +#include + +#ifdef PB_ENABLE_MALLOC +#include +#endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Macro for defining packed structures (compiler dependent). + * This just reduces memory requirements, but is not required. + */ +#if defined(PB_NO_PACKED_STRUCTS) + /* Disable struct packing */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed +#elif defined(__GNUC__) || defined(__clang__) + /* For GCC and clang */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed __attribute__((packed)) +#elif defined(__ICCARM__) || defined(__CC_ARM) + /* For IAR ARM and Keil MDK-ARM compilers */ +# define PB_PACKED_STRUCT_START _Pragma("pack(push, 1)") +# define PB_PACKED_STRUCT_END _Pragma("pack(pop)") +# define pb_packed +#elif defined(_MSC_VER) && (_MSC_VER >= 1500) + /* For Microsoft Visual C++ */ +# define PB_PACKED_STRUCT_START __pragma(pack(push, 1)) +# define PB_PACKED_STRUCT_END __pragma(pack(pop)) +# define pb_packed +#else + /* Unknown compiler */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed +#endif + +/* Detect endianness */ +#ifndef PB_LITTLE_ENDIAN_8BIT +#if ((defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) || \ + (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) || \ + defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) || \ + defined(__THUMBEL__) || defined(__AARCH64EL__) || defined(_MIPSEL) || \ + defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM)) \ + && CHAR_BIT == 8 +#define PB_LITTLE_ENDIAN_8BIT 1 +#endif +#endif + +/* Handly macro for suppressing unreferenced-parameter compiler warnings. */ +#ifndef PB_UNUSED +#define PB_UNUSED(x) (void)(x) +#endif + +/* Harvard-architecture processors may need special attributes for storing + * field information in program memory. */ +#ifndef PB_PROGMEM +#ifdef __AVR__ +#include +#define PB_PROGMEM PROGMEM +#define PB_PROGMEM_READU32(x) pgm_read_dword(&x) +#else +#define PB_PROGMEM +#define PB_PROGMEM_READU32(x) (x) +#endif +#endif + +/* Compile-time assertion, used for checking compatible compilation options. + * If this does not work properly on your compiler, use + * #define PB_NO_STATIC_ASSERT to disable it. + * + * But before doing that, check carefully the error message / place where it + * comes from to see if the error has a real cause. Unfortunately the error + * message is not always very clear to read, but you can see the reason better + * in the place where the PB_STATIC_ASSERT macro was called. + */ +#ifndef PB_NO_STATIC_ASSERT +# ifndef PB_STATIC_ASSERT +# if defined(__ICCARM__) + /* IAR has static_assert keyword but no _Static_assert */ +# define PB_STATIC_ASSERT(COND,MSG) static_assert(COND,#MSG); +# elif defined(_MSC_VER) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112) + /* MSVC in C89 mode supports static_assert() keyword anyway */ +# define PB_STATIC_ASSERT(COND,MSG) static_assert(COND,#MSG); +# elif defined(PB_C99_STATIC_ASSERT) + /* Classic negative-size-array static assert mechanism */ +# define PB_STATIC_ASSERT(COND,MSG) typedef char PB_STATIC_ASSERT_MSG(MSG, __LINE__, __COUNTER__)[(COND)?1:-1]; +# define PB_STATIC_ASSERT_MSG(MSG, LINE, COUNTER) PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) +# define PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) pb_static_assertion_##MSG##_##LINE##_##COUNTER +# elif defined(__cplusplus) + /* C++11 standard static_assert mechanism */ +# define PB_STATIC_ASSERT(COND,MSG) static_assert(COND,#MSG); +# else + /* C11 standard _Static_assert mechanism */ +# define PB_STATIC_ASSERT(COND,MSG) _Static_assert(COND,#MSG); +# endif +# endif +#else + /* Static asserts disabled by PB_NO_STATIC_ASSERT */ +# define PB_STATIC_ASSERT(COND,MSG) +#endif + +/* Test that PB_STATIC_ASSERT works + * If you get errors here, you may need to do one of these: + * - Enable C11 standard support in your compiler + * - Define PB_C99_STATIC_ASSERT to enable C99 standard support + * - Define PB_NO_STATIC_ASSERT to disable static asserts altogether + */ +PB_STATIC_ASSERT(1, STATIC_ASSERT_IS_NOT_WORKING) + +/* Number of required fields to keep track of. */ +#ifndef PB_MAX_REQUIRED_FIELDS +#define PB_MAX_REQUIRED_FIELDS 64 +#endif + +#if PB_MAX_REQUIRED_FIELDS < 64 +#error You should not lower PB_MAX_REQUIRED_FIELDS from the default value (64). +#endif + +#ifdef PB_WITHOUT_64BIT +#ifdef PB_CONVERT_DOUBLE_FLOAT +/* Cannot use doubles without 64-bit types */ +#undef PB_CONVERT_DOUBLE_FLOAT +#endif +#endif + +/* List of possible field types. These are used in the autogenerated code. + * Least-significant 4 bits tell the scalar type + * Most-significant 4 bits specify repeated/required/packed etc. + */ + +typedef uint_least8_t pb_type_t; + +/**** Field data types ****/ + +/* Numeric types */ +#define PB_LTYPE_BOOL 0x00U /* bool */ +#define PB_LTYPE_VARINT 0x01U /* int32, int64, enum, bool */ +#define PB_LTYPE_UVARINT 0x02U /* uint32, uint64 */ +#define PB_LTYPE_SVARINT 0x03U /* sint32, sint64 */ +#define PB_LTYPE_FIXED32 0x04U /* fixed32, sfixed32, float */ +#define PB_LTYPE_FIXED64 0x05U /* fixed64, sfixed64, double */ + +/* Marker for last packable field type. */ +#define PB_LTYPE_LAST_PACKABLE 0x05U + +/* Byte array with pre-allocated buffer. + * data_size is the length of the allocated PB_BYTES_ARRAY structure. */ +#define PB_LTYPE_BYTES 0x06U + +/* String with pre-allocated buffer. + * data_size is the maximum length. */ +#define PB_LTYPE_STRING 0x07U + +/* Submessage + * submsg_fields is pointer to field descriptions */ +#define PB_LTYPE_SUBMESSAGE 0x08U + +/* Submessage with pre-decoding callback + * The pre-decoding callback is stored as pb_callback_t right before pSize. + * submsg_fields is pointer to field descriptions */ +#define PB_LTYPE_SUBMSG_W_CB 0x09U + +/* Extension pseudo-field + * The field contains a pointer to pb_extension_t */ +#define PB_LTYPE_EXTENSION 0x0AU + +/* Byte array with inline, pre-allocated byffer. + * data_size is the length of the inline, allocated buffer. + * This differs from PB_LTYPE_BYTES by defining the element as + * pb_byte_t[data_size] rather than pb_bytes_array_t. */ +#define PB_LTYPE_FIXED_LENGTH_BYTES 0x0BU + +/* Number of declared LTYPES */ +#define PB_LTYPES_COUNT 0x0CU +#define PB_LTYPE_MASK 0x0FU + +/**** Field repetition rules ****/ + +#define PB_HTYPE_REQUIRED 0x00U +#define PB_HTYPE_OPTIONAL 0x10U +#define PB_HTYPE_SINGULAR 0x10U +#define PB_HTYPE_REPEATED 0x20U +#define PB_HTYPE_FIXARRAY 0x20U +#define PB_HTYPE_ONEOF 0x30U +#define PB_HTYPE_MASK 0x30U + +/**** Field allocation types ****/ + +#define PB_ATYPE_STATIC 0x00U +#define PB_ATYPE_POINTER 0x80U +#define PB_ATYPE_CALLBACK 0x40U +#define PB_ATYPE_MASK 0xC0U + +#define PB_ATYPE(x) ((x) & PB_ATYPE_MASK) +#define PB_HTYPE(x) ((x) & PB_HTYPE_MASK) +#define PB_LTYPE(x) ((x) & PB_LTYPE_MASK) +#define PB_LTYPE_IS_SUBMSG(x) (PB_LTYPE(x) == PB_LTYPE_SUBMESSAGE || \ + PB_LTYPE(x) == PB_LTYPE_SUBMSG_W_CB) + +/* Data type used for storing sizes of struct fields + * and array counts. + */ +#if defined(PB_FIELD_32BIT) + typedef uint32_t pb_size_t; + typedef int32_t pb_ssize_t; +#else + typedef uint_least16_t pb_size_t; + typedef int_least16_t pb_ssize_t; +#endif +#define PB_SIZE_MAX ((pb_size_t)-1) + +/* Data type for storing encoded data and other byte streams. + * This typedef exists to support platforms where uint8_t does not exist. + * You can regard it as equivalent on uint8_t on other platforms. + */ +typedef uint_least8_t pb_byte_t; + +/* Forward declaration of struct types */ +typedef struct pb_istream_s pb_istream_t; +typedef struct pb_ostream_s pb_ostream_t; +typedef struct pb_field_iter_s pb_field_iter_t; + +/* This structure is used in auto-generated constants + * to specify struct fields. + */ +typedef struct pb_msgdesc_s pb_msgdesc_t; +struct pb_msgdesc_s { + const uint32_t *field_info; + const pb_msgdesc_t * const * submsg_info; + const pb_byte_t *default_value; + + bool (*field_callback)(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_iter_t *field); + + pb_size_t field_count; + pb_size_t required_field_count; + pb_size_t largest_tag; +}; + +/* Iterator for message descriptor */ +struct pb_field_iter_s { + const pb_msgdesc_t *descriptor; /* Pointer to message descriptor constant */ + void *message; /* Pointer to start of the structure */ + + pb_size_t index; /* Index of the field */ + pb_size_t field_info_index; /* Index to descriptor->field_info array */ + pb_size_t required_field_index; /* Index that counts only the required fields */ + pb_size_t submessage_index; /* Index that counts only submessages */ + + pb_size_t tag; /* Tag of current field */ + pb_size_t data_size; /* sizeof() of a single item */ + pb_size_t array_size; /* Number of array entries */ + pb_type_t type; /* Type of current field */ + + void *pField; /* Pointer to current field in struct */ + void *pData; /* Pointer to current data contents. Different than pField for arrays and pointers. */ + void *pSize; /* Pointer to count/has field */ + + const pb_msgdesc_t *submsg_desc; /* For submessage fields, pointer to field descriptor for the submessage. */ +}; + +/* For compatibility with legacy code */ +typedef pb_field_iter_t pb_field_t; + +/* Make sure that the standard integer types are of the expected sizes. + * Otherwise fixed32/fixed64 fields can break. + * + * If you get errors here, it probably means that your stdint.h is not + * correct for your platform. + */ +#ifndef PB_WITHOUT_64BIT +PB_STATIC_ASSERT(sizeof(int64_t) == 2 * sizeof(int32_t), INT64_T_WRONG_SIZE) +PB_STATIC_ASSERT(sizeof(uint64_t) == 2 * sizeof(uint32_t), UINT64_T_WRONG_SIZE) +#endif + +/* This structure is used for 'bytes' arrays. + * It has the number of bytes in the beginning, and after that an array. + * Note that actual structs used will have a different length of bytes array. + */ +#define PB_BYTES_ARRAY_T(n) struct { pb_size_t size; pb_byte_t bytes[n]; } +#define PB_BYTES_ARRAY_T_ALLOCSIZE(n) ((size_t)n + offsetof(pb_bytes_array_t, bytes)) + +struct pb_bytes_array_s { + pb_size_t size; + pb_byte_t bytes[1]; +}; +typedef struct pb_bytes_array_s pb_bytes_array_t; + +/* This structure is used for giving the callback function. + * It is stored in the message structure and filled in by the method that + * calls pb_decode. + * + * The decoding callback will be given a limited-length stream + * If the wire type was string, the length is the length of the string. + * If the wire type was a varint/fixed32/fixed64, the length is the length + * of the actual value. + * The function may be called multiple times (especially for repeated types, + * but also otherwise if the message happens to contain the field multiple + * times.) + * + * The encoding callback will receive the actual output stream. + * It should write all the data in one call, including the field tag and + * wire type. It can write multiple fields. + * + * The callback can be null if you want to skip a field. + */ +typedef struct pb_callback_s pb_callback_t; +struct pb_callback_s { + /* Callback functions receive a pointer to the arg field. + * You can access the value of the field as *arg, and modify it if needed. + */ + union { + bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void **arg); + bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, void * const *arg); + } funcs; + + /* Free arg for use by callback */ + void *arg; +}; + +extern bool pb_default_field_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_t *field); + +/* Wire types. Library user needs these only in encoder callbacks. */ +typedef enum { + PB_WT_VARINT = 0, + PB_WT_64BIT = 1, + PB_WT_STRING = 2, + PB_WT_32BIT = 5, + PB_WT_PACKED = 255 /* PB_WT_PACKED is internal marker for packed arrays. */ +} pb_wire_type_t; + +/* Structure for defining the handling of unknown/extension fields. + * Usually the pb_extension_type_t structure is automatically generated, + * while the pb_extension_t structure is created by the user. However, + * if you want to catch all unknown fields, you can also create a custom + * pb_extension_type_t with your own callback. + */ +typedef struct pb_extension_type_s pb_extension_type_t; +typedef struct pb_extension_s pb_extension_t; +struct pb_extension_type_s { + /* Called for each unknown field in the message. + * If you handle the field, read off all of its data and return true. + * If you do not handle the field, do not read anything and return true. + * If you run into an error, return false. + * Set to NULL for default handler. + */ + bool (*decode)(pb_istream_t *stream, pb_extension_t *extension, + uint32_t tag, pb_wire_type_t wire_type); + + /* Called once after all regular fields have been encoded. + * If you have something to write, do so and return true. + * If you do not have anything to write, just return true. + * If you run into an error, return false. + * Set to NULL for default handler. + */ + bool (*encode)(pb_ostream_t *stream, const pb_extension_t *extension); + + /* Free field for use by the callback. */ + const void *arg; +}; + +struct pb_extension_s { + /* Type describing the extension field. Usually you'll initialize + * this to a pointer to the automatically generated structure. */ + const pb_extension_type_t *type; + + /* Destination for the decoded data. This must match the datatype + * of the extension field. */ + void *dest; + + /* Pointer to the next extension handler, or NULL. + * If this extension does not match a field, the next handler is + * automatically called. */ + pb_extension_t *next; + + /* The decoder sets this to true if the extension was found. + * Ignored for encoding. */ + bool found; +}; + +#define pb_extension_init_zero {NULL,NULL,NULL,false} + +/* Memory allocation functions to use. You can define pb_realloc and + * pb_free to custom functions if you want. */ +#ifdef PB_ENABLE_MALLOC +# ifndef pb_realloc +# define pb_realloc(ptr, size) realloc(ptr, size) +# endif +# ifndef pb_free +# define pb_free(ptr) free(ptr) +# endif +#endif + +/* This is used to inform about need to regenerate .pb.h/.pb.c files. */ +#define PB_PROTO_HEADER_VERSION 40 + +/* These macros are used to declare pb_field_t's in the constant array. */ +/* Size of a structure member, in bytes. */ +#define pb_membersize(st, m) (sizeof ((st*)0)->m) +/* Number of entries in an array. */ +#define pb_arraysize(st, m) (pb_membersize(st, m) / pb_membersize(st, m[0])) +/* Delta from start of one member to the start of another member. */ +#define pb_delta(st, m1, m2) ((int)offsetof(st, m1) - (int)offsetof(st, m2)) + +/* Force expansion of macro value */ +#define PB_EXPAND(x) x + +/* Binding of a message field set into a specific structure */ +#define PB_BIND(msgname, structname, width) \ + const uint32_t structname ## _field_info[] PB_PROGMEM = \ + { \ + msgname ## _FIELDLIST(PB_GEN_FIELD_INFO_ ## width, structname) \ + 0 \ + }; \ + const pb_msgdesc_t* const structname ## _submsg_info[] = \ + { \ + msgname ## _FIELDLIST(PB_GEN_SUBMSG_INFO, structname) \ + NULL \ + }; \ + const pb_msgdesc_t structname ## _msg = \ + { \ + structname ## _field_info, \ + structname ## _submsg_info, \ + msgname ## _DEFAULT, \ + msgname ## _CALLBACK, \ + 0 msgname ## _FIELDLIST(PB_GEN_FIELD_COUNT, structname), \ + 0 msgname ## _FIELDLIST(PB_GEN_REQ_FIELD_COUNT, structname), \ + 0 msgname ## _FIELDLIST(PB_GEN_LARGEST_TAG, structname), \ + }; \ + msgname ## _FIELDLIST(PB_GEN_FIELD_INFO_ASSERT_ ## width, structname) + +#define PB_GEN_FIELD_COUNT(structname, atype, htype, ltype, fieldname, tag) +1 +#define PB_GEN_REQ_FIELD_COUNT(structname, atype, htype, ltype, fieldname, tag) \ + + (PB_HTYPE_ ## htype == PB_HTYPE_REQUIRED) +#define PB_GEN_LARGEST_TAG(structname, atype, htype, ltype, fieldname, tag) \ + * 0 + tag + +/* X-macro for generating the entries in struct_field_info[] array. */ +#define PB_GEN_FIELD_INFO_1(structname, atype, htype, ltype, fieldname, tag) \ + PB_FIELDINFO_1(tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \ + PB_DATA_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_DATA_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_SIZE_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_ARRAY_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname)) + +#define PB_GEN_FIELD_INFO_2(structname, atype, htype, ltype, fieldname, tag) \ + PB_FIELDINFO_2(tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \ + PB_DATA_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_DATA_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_SIZE_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_ARRAY_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname)) + +#define PB_GEN_FIELD_INFO_4(structname, atype, htype, ltype, fieldname, tag) \ + PB_FIELDINFO_4(tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \ + PB_DATA_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_DATA_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_SIZE_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_ARRAY_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname)) + +#define PB_GEN_FIELD_INFO_8(structname, atype, htype, ltype, fieldname, tag) \ + PB_FIELDINFO_8(tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \ + PB_DATA_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_DATA_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_SIZE_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_ARRAY_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname)) + +#define PB_GEN_FIELD_INFO_AUTO(structname, atype, htype, ltype, fieldname, tag) \ + PB_FIELDINFO_AUTO2(PB_FIELDINFO_WIDTH_AUTO(_PB_ATYPE_ ## atype, _PB_HTYPE_ ## htype, _PB_LTYPE_ ## ltype), \ + tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \ + PB_DATA_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_DATA_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_SIZE_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_ARRAY_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname)) + +#define PB_FIELDINFO_AUTO2(width, tag, type, data_offset, data_size, size_offset, array_size) \ + PB_FIELDINFO_AUTO3(width, tag, type, data_offset, data_size, size_offset, array_size) + +#define PB_FIELDINFO_AUTO3(width, tag, type, data_offset, data_size, size_offset, array_size) \ + PB_FIELDINFO_ ## width(tag, type, data_offset, data_size, size_offset, array_size) + +/* X-macro for generating asserts that entries fit in struct_field_info[] array. + * The structure of macros here must match the structure above in PB_GEN_FIELD_INFO_x(), + * but it is not easily reused because of how macro substitutions work. */ +#define PB_GEN_FIELD_INFO_ASSERT_1(structname, atype, htype, ltype, fieldname, tag) \ + PB_FIELDINFO_ASSERT_1(tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \ + PB_DATA_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_DATA_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_SIZE_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_ARRAY_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname)) + +#define PB_GEN_FIELD_INFO_ASSERT_2(structname, atype, htype, ltype, fieldname, tag) \ + PB_FIELDINFO_ASSERT_2(tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \ + PB_DATA_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_DATA_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_SIZE_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_ARRAY_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname)) + +#define PB_GEN_FIELD_INFO_ASSERT_4(structname, atype, htype, ltype, fieldname, tag) \ + PB_FIELDINFO_ASSERT_4(tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \ + PB_DATA_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_DATA_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_SIZE_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_ARRAY_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname)) + +#define PB_GEN_FIELD_INFO_ASSERT_8(structname, atype, htype, ltype, fieldname, tag) \ + PB_FIELDINFO_ASSERT_8(tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \ + PB_DATA_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_DATA_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_SIZE_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_ARRAY_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname)) + +#define PB_GEN_FIELD_INFO_ASSERT_AUTO(structname, atype, htype, ltype, fieldname, tag) \ + PB_FIELDINFO_ASSERT_AUTO2(PB_FIELDINFO_WIDTH_AUTO(_PB_ATYPE_ ## atype, _PB_HTYPE_ ## htype, _PB_LTYPE_ ## ltype), \ + tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \ + PB_DATA_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_DATA_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_SIZE_OFFSET_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname), \ + PB_ARRAY_SIZE_ ## atype(_PB_HTYPE_ ## htype, structname, fieldname)) + +#define PB_FIELDINFO_ASSERT_AUTO2(width, tag, type, data_offset, data_size, size_offset, array_size) \ + PB_FIELDINFO_ASSERT_AUTO3(width, tag, type, data_offset, data_size, size_offset, array_size) + +#define PB_FIELDINFO_ASSERT_AUTO3(width, tag, type, data_offset, data_size, size_offset, array_size) \ + PB_FIELDINFO_ASSERT_ ## width(tag, type, data_offset, data_size, size_offset, array_size) + +#define PB_DATA_OFFSET_STATIC(htype, structname, fieldname) PB_DO ## htype(structname, fieldname) +#define PB_DATA_OFFSET_POINTER(htype, structname, fieldname) PB_DO ## htype(structname, fieldname) +#define PB_DATA_OFFSET_CALLBACK(htype, structname, fieldname) PB_DO ## htype(structname, fieldname) +#define PB_DO_PB_HTYPE_REQUIRED(structname, fieldname) offsetof(structname, fieldname) +#define PB_DO_PB_HTYPE_SINGULAR(structname, fieldname) offsetof(structname, fieldname) +#define PB_DO_PB_HTYPE_ONEOF(structname, fieldname) offsetof(structname, PB_ONEOF_NAME(FULL, fieldname)) +#define PB_DO_PB_HTYPE_OPTIONAL(structname, fieldname) offsetof(structname, fieldname) +#define PB_DO_PB_HTYPE_REPEATED(structname, fieldname) offsetof(structname, fieldname) +#define PB_DO_PB_HTYPE_FIXARRAY(structname, fieldname) offsetof(structname, fieldname) + +#define PB_SIZE_OFFSET_STATIC(htype, structname, fieldname) PB_SO ## htype(structname, fieldname) +#define PB_SIZE_OFFSET_POINTER(htype, structname, fieldname) PB_SO_PTR ## htype(structname, fieldname) +#define PB_SIZE_OFFSET_CALLBACK(htype, structname, fieldname) PB_SO_CB ## htype(structname, fieldname) +#define PB_SO_PB_HTYPE_REQUIRED(structname, fieldname) 0 +#define PB_SO_PB_HTYPE_SINGULAR(structname, fieldname) 0 +#define PB_SO_PB_HTYPE_ONEOF(structname, fieldname) PB_SO_PB_HTYPE_ONEOF2(structname, PB_ONEOF_NAME(FULL, fieldname), PB_ONEOF_NAME(UNION, fieldname)) +#define PB_SO_PB_HTYPE_ONEOF2(structname, fullname, unionname) PB_SO_PB_HTYPE_ONEOF3(structname, fullname, unionname) +#define PB_SO_PB_HTYPE_ONEOF3(structname, fullname, unionname) pb_delta(structname, fullname, which_ ## unionname) +#define PB_SO_PB_HTYPE_OPTIONAL(structname, fieldname) pb_delta(structname, fieldname, has_ ## fieldname) +#define PB_SO_PB_HTYPE_REPEATED(structname, fieldname) pb_delta(structname, fieldname, fieldname ## _count) +#define PB_SO_PB_HTYPE_FIXARRAY(structname, fieldname) 0 +#define PB_SO_PTR_PB_HTYPE_REQUIRED(structname, fieldname) 0 +#define PB_SO_PTR_PB_HTYPE_SINGULAR(structname, fieldname) 0 +#define PB_SO_PTR_PB_HTYPE_ONEOF(structname, fieldname) PB_SO_PB_HTYPE_ONEOF(structname, fieldname) +#define PB_SO_PTR_PB_HTYPE_OPTIONAL(structname, fieldname) 0 +#define PB_SO_PTR_PB_HTYPE_REPEATED(structname, fieldname) PB_SO_PB_HTYPE_REPEATED(structname, fieldname) +#define PB_SO_PTR_PB_HTYPE_FIXARRAY(structname, fieldname) 0 +#define PB_SO_CB_PB_HTYPE_REQUIRED(structname, fieldname) 0 +#define PB_SO_CB_PB_HTYPE_SINGULAR(structname, fieldname) 0 +#define PB_SO_CB_PB_HTYPE_ONEOF(structname, fieldname) PB_SO_PB_HTYPE_ONEOF(structname, fieldname) +#define PB_SO_CB_PB_HTYPE_OPTIONAL(structname, fieldname) 0 +#define PB_SO_CB_PB_HTYPE_REPEATED(structname, fieldname) 0 +#define PB_SO_CB_PB_HTYPE_FIXARRAY(structname, fieldname) 0 + +#define PB_ARRAY_SIZE_STATIC(htype, structname, fieldname) PB_AS ## htype(structname, fieldname) +#define PB_ARRAY_SIZE_POINTER(htype, structname, fieldname) PB_AS_PTR ## htype(structname, fieldname) +#define PB_ARRAY_SIZE_CALLBACK(htype, structname, fieldname) 1 +#define PB_AS_PB_HTYPE_REQUIRED(structname, fieldname) 1 +#define PB_AS_PB_HTYPE_SINGULAR(structname, fieldname) 1 +#define PB_AS_PB_HTYPE_OPTIONAL(structname, fieldname) 1 +#define PB_AS_PB_HTYPE_ONEOF(structname, fieldname) 1 +#define PB_AS_PB_HTYPE_REPEATED(structname, fieldname) pb_arraysize(structname, fieldname) +#define PB_AS_PB_HTYPE_FIXARRAY(structname, fieldname) pb_arraysize(structname, fieldname) +#define PB_AS_PTR_PB_HTYPE_REQUIRED(structname, fieldname) 1 +#define PB_AS_PTR_PB_HTYPE_SINGULAR(structname, fieldname) 1 +#define PB_AS_PTR_PB_HTYPE_OPTIONAL(structname, fieldname) 1 +#define PB_AS_PTR_PB_HTYPE_ONEOF(structname, fieldname) 1 +#define PB_AS_PTR_PB_HTYPE_REPEATED(structname, fieldname) 1 +#define PB_AS_PTR_PB_HTYPE_FIXARRAY(structname, fieldname) pb_arraysize(structname, fieldname[0]) + +#define PB_DATA_SIZE_STATIC(htype, structname, fieldname) PB_DS ## htype(structname, fieldname) +#define PB_DATA_SIZE_POINTER(htype, structname, fieldname) PB_DS_PTR ## htype(structname, fieldname) +#define PB_DATA_SIZE_CALLBACK(htype, structname, fieldname) PB_DS_CB ## htype(structname, fieldname) +#define PB_DS_PB_HTYPE_REQUIRED(structname, fieldname) pb_membersize(structname, fieldname) +#define PB_DS_PB_HTYPE_SINGULAR(structname, fieldname) pb_membersize(structname, fieldname) +#define PB_DS_PB_HTYPE_OPTIONAL(structname, fieldname) pb_membersize(structname, fieldname) +#define PB_DS_PB_HTYPE_ONEOF(structname, fieldname) pb_membersize(structname, PB_ONEOF_NAME(FULL, fieldname)) +#define PB_DS_PB_HTYPE_REPEATED(structname, fieldname) pb_membersize(structname, fieldname[0]) +#define PB_DS_PB_HTYPE_FIXARRAY(structname, fieldname) pb_membersize(structname, fieldname[0]) +#define PB_DS_PTR_PB_HTYPE_REQUIRED(structname, fieldname) pb_membersize(structname, fieldname[0]) +#define PB_DS_PTR_PB_HTYPE_SINGULAR(structname, fieldname) pb_membersize(structname, fieldname[0]) +#define PB_DS_PTR_PB_HTYPE_OPTIONAL(structname, fieldname) pb_membersize(structname, fieldname[0]) +#define PB_DS_PTR_PB_HTYPE_ONEOF(structname, fieldname) pb_membersize(structname, PB_ONEOF_NAME(FULL, fieldname)[0]) +#define PB_DS_PTR_PB_HTYPE_REPEATED(structname, fieldname) pb_membersize(structname, fieldname[0]) +#define PB_DS_PTR_PB_HTYPE_FIXARRAY(structname, fieldname) pb_membersize(structname, fieldname[0][0]) +#define PB_DS_CB_PB_HTYPE_REQUIRED(structname, fieldname) pb_membersize(structname, fieldname) +#define PB_DS_CB_PB_HTYPE_SINGULAR(structname, fieldname) pb_membersize(structname, fieldname) +#define PB_DS_CB_PB_HTYPE_OPTIONAL(structname, fieldname) pb_membersize(structname, fieldname) +#define PB_DS_CB_PB_HTYPE_ONEOF(structname, fieldname) pb_membersize(structname, PB_ONEOF_NAME(FULL, fieldname)) +#define PB_DS_CB_PB_HTYPE_REPEATED(structname, fieldname) pb_membersize(structname, fieldname) +#define PB_DS_CB_PB_HTYPE_FIXARRAY(structname, fieldname) pb_membersize(structname, fieldname) + +#define PB_ONEOF_NAME(type, tuple) PB_EXPAND(PB_ONEOF_NAME_ ## type tuple) +#define PB_ONEOF_NAME_UNION(unionname,membername,fullname) unionname +#define PB_ONEOF_NAME_MEMBER(unionname,membername,fullname) membername +#define PB_ONEOF_NAME_FULL(unionname,membername,fullname) fullname + +#define PB_GEN_SUBMSG_INFO(structname, atype, htype, ltype, fieldname, tag) \ + PB_SUBMSG_INFO_ ## htype(_PB_LTYPE_ ## ltype, structname, fieldname) + +#define PB_SUBMSG_INFO_REQUIRED(ltype, structname, fieldname) PB_SI ## ltype(structname ## _ ## fieldname ## _MSGTYPE) +#define PB_SUBMSG_INFO_SINGULAR(ltype, structname, fieldname) PB_SI ## ltype(structname ## _ ## fieldname ## _MSGTYPE) +#define PB_SUBMSG_INFO_OPTIONAL(ltype, structname, fieldname) PB_SI ## ltype(structname ## _ ## fieldname ## _MSGTYPE) +#define PB_SUBMSG_INFO_ONEOF(ltype, structname, fieldname) PB_SUBMSG_INFO_ONEOF2(ltype, structname, PB_ONEOF_NAME(UNION, fieldname), PB_ONEOF_NAME(MEMBER, fieldname)) +#define PB_SUBMSG_INFO_ONEOF2(ltype, structname, unionname, membername) PB_SUBMSG_INFO_ONEOF3(ltype, structname, unionname, membername) +#define PB_SUBMSG_INFO_ONEOF3(ltype, structname, unionname, membername) PB_SI ## ltype(structname ## _ ## unionname ## _ ## membername ## _MSGTYPE) +#define PB_SUBMSG_INFO_REPEATED(ltype, structname, fieldname) PB_SI ## ltype(structname ## _ ## fieldname ## _MSGTYPE) +#define PB_SUBMSG_INFO_FIXARRAY(ltype, structname, fieldname) PB_SI ## ltype(structname ## _ ## fieldname ## _MSGTYPE) +#define PB_SI_PB_LTYPE_BOOL(t) +#define PB_SI_PB_LTYPE_BYTES(t) +#define PB_SI_PB_LTYPE_DOUBLE(t) +#define PB_SI_PB_LTYPE_ENUM(t) +#define PB_SI_PB_LTYPE_UENUM(t) +#define PB_SI_PB_LTYPE_FIXED32(t) +#define PB_SI_PB_LTYPE_FIXED64(t) +#define PB_SI_PB_LTYPE_FLOAT(t) +#define PB_SI_PB_LTYPE_INT32(t) +#define PB_SI_PB_LTYPE_INT64(t) +#define PB_SI_PB_LTYPE_MESSAGE(t) PB_SUBMSG_DESCRIPTOR(t) +#define PB_SI_PB_LTYPE_MSG_W_CB(t) PB_SUBMSG_DESCRIPTOR(t) +#define PB_SI_PB_LTYPE_SFIXED32(t) +#define PB_SI_PB_LTYPE_SFIXED64(t) +#define PB_SI_PB_LTYPE_SINT32(t) +#define PB_SI_PB_LTYPE_SINT64(t) +#define PB_SI_PB_LTYPE_STRING(t) +#define PB_SI_PB_LTYPE_UINT32(t) +#define PB_SI_PB_LTYPE_UINT64(t) +#define PB_SI_PB_LTYPE_EXTENSION(t) +#define PB_SI_PB_LTYPE_FIXED_LENGTH_BYTES(t) +#define PB_SUBMSG_DESCRIPTOR(t) &(t ## _msg), + +/* The field descriptors use a variable width format, with width of either + * 1, 2, 4 or 8 of 32-bit words. The two lowest bytes of the first byte always + * encode the descriptor size, 6 lowest bits of field tag number, and 8 bits + * of the field type. + * + * Descriptor size is encoded as 0 = 1 word, 1 = 2 words, 2 = 4 words, 3 = 8 words. + * + * Formats, listed starting with the least significant bit of the first word. + * 1 word: [2-bit len] [6-bit tag] [8-bit type] [8-bit data_offset] [4-bit size_offset] [4-bit data_size] + * + * 2 words: [2-bit len] [6-bit tag] [8-bit type] [12-bit array_size] [4-bit size_offset] + * [16-bit data_offset] [12-bit data_size] [4-bit tag>>6] + * + * 4 words: [2-bit len] [6-bit tag] [8-bit type] [16-bit array_size] + * [8-bit size_offset] [24-bit tag>>6] + * [32-bit data_offset] + * [32-bit data_size] + * + * 8 words: [2-bit len] [6-bit tag] [8-bit type] [16-bit reserved] + * [8-bit size_offset] [24-bit tag>>6] + * [32-bit data_offset] + * [32-bit data_size] + * [32-bit array_size] + * [32-bit reserved] + * [32-bit reserved] + * [32-bit reserved] + */ + +#define PB_FIELDINFO_1(tag, type, data_offset, data_size, size_offset, array_size) \ + (0 | (((tag) << 2) & 0xFF) | ((type) << 8) | (((uint32_t)(data_offset) & 0xFF) << 16) | \ + (((uint32_t)(size_offset) & 0x0F) << 24) | (((uint32_t)(data_size) & 0x0F) << 28)), + +#define PB_FIELDINFO_2(tag, type, data_offset, data_size, size_offset, array_size) \ + (1 | (((tag) << 2) & 0xFF) | ((type) << 8) | (((uint32_t)(array_size) & 0xFFF) << 16) | (((uint32_t)(size_offset) & 0x0F) << 28)), \ + (((uint32_t)(data_offset) & 0xFFFF) | (((uint32_t)(data_size) & 0xFFF) << 16) | (((uint32_t)(tag) & 0x3c0) << 22)), + +#define PB_FIELDINFO_4(tag, type, data_offset, data_size, size_offset, array_size) \ + (2 | (((tag) << 2) & 0xFF) | ((type) << 8) | (((uint32_t)(array_size) & 0xFFFF) << 16)), \ + ((uint32_t)(int_least8_t)(size_offset) | (((uint32_t)(tag) << 2) & 0xFFFFFF00)), \ + (data_offset), (data_size), + +#define PB_FIELDINFO_8(tag, type, data_offset, data_size, size_offset, array_size) \ + (3 | (((tag) << 2) & 0xFF) | ((type) << 8)), \ + ((uint32_t)(int_least8_t)(size_offset) | (((uint32_t)(tag) << 2) & 0xFFFFFF00)), \ + (data_offset), (data_size), (array_size), 0, 0, 0, + +/* These assertions verify that the field information fits in the allocated space. + * The generator tries to automatically determine the correct width that can fit all + * data associated with a message. These asserts will fail only if there has been a + * problem in the automatic logic - this may be worth reporting as a bug. As a workaround, + * you can increase the descriptor width by defining PB_FIELDINFO_WIDTH or by setting + * descriptorsize option in .options file. + */ +#define PB_FITS(value,bits) ((uint32_t)(value) < ((uint32_t)1<2GB messages with nanopb anyway. + */ +#define PB_FIELDINFO_ASSERT_4(tag, type, data_offset, data_size, size_offset, array_size) \ + PB_STATIC_ASSERT(PB_FITS(tag,30) && PB_FITS(data_offset,31) && PB_FITS(size_offset,8) && PB_FITS(data_size,31) && PB_FITS(array_size,16), FIELDINFO_DOES_NOT_FIT_width4_field ## tag) + +#define PB_FIELDINFO_ASSERT_8(tag, type, data_offset, data_size, size_offset, array_size) \ + PB_STATIC_ASSERT(PB_FITS(tag,30) && PB_FITS(data_offset,31) && PB_FITS(size_offset,8) && PB_FITS(data_size,31) && PB_FITS(array_size,31), FIELDINFO_DOES_NOT_FIT_width8_field ## tag) +#endif + + +/* Automatic picking of FIELDINFO width: + * Uses width 1 when possible, otherwise resorts to width 2. + * This is used when PB_BIND() is called with "AUTO" as the argument. + * The generator will give explicit size argument when it knows that a message + * structure grows beyond 1-word format limits. + */ +#define PB_FIELDINFO_WIDTH_AUTO(atype, htype, ltype) PB_FI_WIDTH ## atype(htype, ltype) +#define PB_FI_WIDTH_PB_ATYPE_STATIC(htype, ltype) PB_FI_WIDTH ## htype(ltype) +#define PB_FI_WIDTH_PB_ATYPE_POINTER(htype, ltype) PB_FI_WIDTH ## htype(ltype) +#define PB_FI_WIDTH_PB_ATYPE_CALLBACK(htype, ltype) 2 +#define PB_FI_WIDTH_PB_HTYPE_REQUIRED(ltype) PB_FI_WIDTH ## ltype +#define PB_FI_WIDTH_PB_HTYPE_SINGULAR(ltype) PB_FI_WIDTH ## ltype +#define PB_FI_WIDTH_PB_HTYPE_OPTIONAL(ltype) PB_FI_WIDTH ## ltype +#define PB_FI_WIDTH_PB_HTYPE_ONEOF(ltype) PB_FI_WIDTH ## ltype +#define PB_FI_WIDTH_PB_HTYPE_REPEATED(ltype) 2 +#define PB_FI_WIDTH_PB_HTYPE_FIXARRAY(ltype) 2 +#define PB_FI_WIDTH_PB_LTYPE_BOOL 1 +#define PB_FI_WIDTH_PB_LTYPE_BYTES 2 +#define PB_FI_WIDTH_PB_LTYPE_DOUBLE 1 +#define PB_FI_WIDTH_PB_LTYPE_ENUM 1 +#define PB_FI_WIDTH_PB_LTYPE_UENUM 1 +#define PB_FI_WIDTH_PB_LTYPE_FIXED32 1 +#define PB_FI_WIDTH_PB_LTYPE_FIXED64 1 +#define PB_FI_WIDTH_PB_LTYPE_FLOAT 1 +#define PB_FI_WIDTH_PB_LTYPE_INT32 1 +#define PB_FI_WIDTH_PB_LTYPE_INT64 1 +#define PB_FI_WIDTH_PB_LTYPE_MESSAGE 2 +#define PB_FI_WIDTH_PB_LTYPE_MSG_W_CB 2 +#define PB_FI_WIDTH_PB_LTYPE_SFIXED32 1 +#define PB_FI_WIDTH_PB_LTYPE_SFIXED64 1 +#define PB_FI_WIDTH_PB_LTYPE_SINT32 1 +#define PB_FI_WIDTH_PB_LTYPE_SINT64 1 +#define PB_FI_WIDTH_PB_LTYPE_STRING 2 +#define PB_FI_WIDTH_PB_LTYPE_UINT32 1 +#define PB_FI_WIDTH_PB_LTYPE_UINT64 1 +#define PB_FI_WIDTH_PB_LTYPE_EXTENSION 1 +#define PB_FI_WIDTH_PB_LTYPE_FIXED_LENGTH_BYTES 2 + +/* The mapping from protobuf types to LTYPEs is done using these macros. */ +#define PB_LTYPE_MAP_BOOL PB_LTYPE_BOOL +#define PB_LTYPE_MAP_BYTES PB_LTYPE_BYTES +#define PB_LTYPE_MAP_DOUBLE PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_ENUM PB_LTYPE_VARINT +#define PB_LTYPE_MAP_UENUM PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_FIXED32 PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_FIXED64 PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_FLOAT PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_INT32 PB_LTYPE_VARINT +#define PB_LTYPE_MAP_INT64 PB_LTYPE_VARINT +#define PB_LTYPE_MAP_MESSAGE PB_LTYPE_SUBMESSAGE +#define PB_LTYPE_MAP_MSG_W_CB PB_LTYPE_SUBMSG_W_CB +#define PB_LTYPE_MAP_SFIXED32 PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_SFIXED64 PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_SINT32 PB_LTYPE_SVARINT +#define PB_LTYPE_MAP_SINT64 PB_LTYPE_SVARINT +#define PB_LTYPE_MAP_STRING PB_LTYPE_STRING +#define PB_LTYPE_MAP_UINT32 PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_UINT64 PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_EXTENSION PB_LTYPE_EXTENSION +#define PB_LTYPE_MAP_FIXED_LENGTH_BYTES PB_LTYPE_FIXED_LENGTH_BYTES + +/* These macros are used for giving out error messages. + * They are mostly a debugging aid; the main error information + * is the true/false return value from functions. + * Some code space can be saved by disabling the error + * messages if not used. + * + * PB_SET_ERROR() sets the error message if none has been set yet. + * msg must be a constant string literal. + * PB_GET_ERROR() always returns a pointer to a string. + * PB_RETURN_ERROR() sets the error and returns false from current + * function. + */ +#ifdef PB_NO_ERRMSG +#define PB_SET_ERROR(stream, msg) PB_UNUSED(stream) +#define PB_GET_ERROR(stream) "(errmsg disabled)" +#else +#define PB_SET_ERROR(stream, msg) (stream->errmsg = (stream)->errmsg ? (stream)->errmsg : (msg)) +#define PB_GET_ERROR(stream) ((stream)->errmsg ? (stream)->errmsg : "(none)") +#endif + +#define PB_RETURN_ERROR(stream, msg) return PB_SET_ERROR(stream, msg), false + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#ifdef __cplusplus +#if __cplusplus >= 201103L +#define PB_CONSTEXPR constexpr +#else // __cplusplus >= 201103L +#define PB_CONSTEXPR +#endif // __cplusplus >= 201103L + +#if __cplusplus >= 201703L +#define PB_INLINE_CONSTEXPR inline constexpr +#else // __cplusplus >= 201703L +#define PB_INLINE_CONSTEXPR PB_CONSTEXPR +#endif // __cplusplus >= 201703L + +extern "C++" +{ +namespace nanopb { +// Each type will be partially specialized by the generator. +template struct MessageDescriptor; +} // namespace nanopb +} +#endif /* __cplusplus */ + +#endif diff --git a/src/network/pb_common.c b/src/network/pb_common.c new file mode 100644 index 000000000..6aee76b1e --- /dev/null +++ b/src/network/pb_common.c @@ -0,0 +1,388 @@ +/* pb_common.c: Common support functions for pb_encode.c and pb_decode.c. + * + * 2014 Petteri Aimonen + */ + +#include "pb_common.h" + +static bool load_descriptor_values(pb_field_iter_t *iter) +{ + uint32_t word0; + uint32_t data_offset; + int_least8_t size_offset; + + if (iter->index >= iter->descriptor->field_count) + return false; + + word0 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index]); + iter->type = (pb_type_t)((word0 >> 8) & 0xFF); + + switch(word0 & 3) + { + case 0: { + /* 1-word format */ + iter->array_size = 1; + iter->tag = (pb_size_t)((word0 >> 2) & 0x3F); + size_offset = (int_least8_t)((word0 >> 24) & 0x0F); + data_offset = (word0 >> 16) & 0xFF; + iter->data_size = (pb_size_t)((word0 >> 28) & 0x0F); + break; + } + + case 1: { + /* 2-word format */ + uint32_t word1 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index + 1]); + + iter->array_size = (pb_size_t)((word0 >> 16) & 0x0FFF); + iter->tag = (pb_size_t)(((word0 >> 2) & 0x3F) | ((word1 >> 28) << 6)); + size_offset = (int_least8_t)((word0 >> 28) & 0x0F); + data_offset = word1 & 0xFFFF; + iter->data_size = (pb_size_t)((word1 >> 16) & 0x0FFF); + break; + } + + case 2: { + /* 4-word format */ + uint32_t word1 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index + 1]); + uint32_t word2 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index + 2]); + uint32_t word3 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index + 3]); + + iter->array_size = (pb_size_t)(word0 >> 16); + iter->tag = (pb_size_t)(((word0 >> 2) & 0x3F) | ((word1 >> 8) << 6)); + size_offset = (int_least8_t)(word1 & 0xFF); + data_offset = word2; + iter->data_size = (pb_size_t)word3; + break; + } + + default: { + /* 8-word format */ + uint32_t word1 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index + 1]); + uint32_t word2 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index + 2]); + uint32_t word3 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index + 3]); + uint32_t word4 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index + 4]); + + iter->array_size = (pb_size_t)word4; + iter->tag = (pb_size_t)(((word0 >> 2) & 0x3F) | ((word1 >> 8) << 6)); + size_offset = (int_least8_t)(word1 & 0xFF); + data_offset = word2; + iter->data_size = (pb_size_t)word3; + break; + } + } + + if (!iter->message) + { + /* Avoid doing arithmetic on null pointers, it is undefined */ + iter->pField = NULL; + iter->pSize = NULL; + } + else + { + iter->pField = (char*)iter->message + data_offset; + + if (size_offset) + { + iter->pSize = (char*)iter->pField - size_offset; + } + else if (PB_HTYPE(iter->type) == PB_HTYPE_REPEATED && + (PB_ATYPE(iter->type) == PB_ATYPE_STATIC || + PB_ATYPE(iter->type) == PB_ATYPE_POINTER)) + { + /* Fixed count array */ + iter->pSize = &iter->array_size; + } + else + { + iter->pSize = NULL; + } + + if (PB_ATYPE(iter->type) == PB_ATYPE_POINTER && iter->pField != NULL) + { + iter->pData = *(void**)iter->pField; + } + else + { + iter->pData = iter->pField; + } + } + + if (PB_LTYPE_IS_SUBMSG(iter->type)) + { + iter->submsg_desc = iter->descriptor->submsg_info[iter->submessage_index]; + } + else + { + iter->submsg_desc = NULL; + } + + return true; +} + +static void advance_iterator(pb_field_iter_t *iter) +{ + iter->index++; + + if (iter->index >= iter->descriptor->field_count) + { + /* Restart */ + iter->index = 0; + iter->field_info_index = 0; + iter->submessage_index = 0; + iter->required_field_index = 0; + } + else + { + /* Increment indexes based on previous field type. + * All field info formats have the following fields: + * - lowest 2 bits tell the amount of words in the descriptor (2^n words) + * - bits 2..7 give the lowest bits of tag number. + * - bits 8..15 give the field type. + */ + uint32_t prev_descriptor = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index]); + pb_type_t prev_type = (prev_descriptor >> 8) & 0xFF; + pb_size_t descriptor_len = (pb_size_t)(1 << (prev_descriptor & 3)); + + /* Add to fields. + * The cast to pb_size_t is needed to avoid -Wconversion warning. + * Because the data is is constants from generator, there is no danger of overflow. + */ + iter->field_info_index = (pb_size_t)(iter->field_info_index + descriptor_len); + iter->required_field_index = (pb_size_t)(iter->required_field_index + (PB_HTYPE(prev_type) == PB_HTYPE_REQUIRED)); + iter->submessage_index = (pb_size_t)(iter->submessage_index + PB_LTYPE_IS_SUBMSG(prev_type)); + } +} + +bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_msgdesc_t *desc, void *message) +{ + memset(iter, 0, sizeof(*iter)); + + iter->descriptor = desc; + iter->message = message; + + return load_descriptor_values(iter); +} + +bool pb_field_iter_begin_extension(pb_field_iter_t *iter, pb_extension_t *extension) +{ + const pb_msgdesc_t *msg = (const pb_msgdesc_t*)extension->type->arg; + bool status; + + uint32_t word0 = PB_PROGMEM_READU32(msg->field_info[0]); + if (PB_ATYPE(word0 >> 8) == PB_ATYPE_POINTER) + { + /* For pointer extensions, the pointer is stored directly + * in the extension structure. This avoids having an extra + * indirection. */ + status = pb_field_iter_begin(iter, msg, &extension->dest); + } + else + { + status = pb_field_iter_begin(iter, msg, extension->dest); + } + + iter->pSize = &extension->found; + return status; +} + +bool pb_field_iter_next(pb_field_iter_t *iter) +{ + advance_iterator(iter); + (void)load_descriptor_values(iter); + return iter->index != 0; +} + +bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag) +{ + if (iter->tag == tag) + { + return true; /* Nothing to do, correct field already. */ + } + else if (tag > iter->descriptor->largest_tag) + { + return false; + } + else + { + pb_size_t start = iter->index; + uint32_t fieldinfo; + + if (tag < iter->tag) + { + /* Fields are in tag number order, so we know that tag is between + * 0 and our start position. Setting index to end forces + * advance_iterator() call below to restart from beginning. */ + iter->index = iter->descriptor->field_count; + } + + do + { + /* Advance iterator but don't load values yet */ + advance_iterator(iter); + + /* Do fast check for tag number match */ + fieldinfo = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index]); + + if (((fieldinfo >> 2) & 0x3F) == (tag & 0x3F)) + { + /* Good candidate, check further */ + (void)load_descriptor_values(iter); + + if (iter->tag == tag && + PB_LTYPE(iter->type) != PB_LTYPE_EXTENSION) + { + /* Found it */ + return true; + } + } + } while (iter->index != start); + + /* Searched all the way back to start, and found nothing. */ + (void)load_descriptor_values(iter); + return false; + } +} + +bool pb_field_iter_find_extension(pb_field_iter_t *iter) +{ + if (PB_LTYPE(iter->type) == PB_LTYPE_EXTENSION) + { + return true; + } + else + { + pb_size_t start = iter->index; + uint32_t fieldinfo; + + do + { + /* Advance iterator but don't load values yet */ + advance_iterator(iter); + + /* Do fast check for field type */ + fieldinfo = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index]); + + if (PB_LTYPE((fieldinfo >> 8) & 0xFF) == PB_LTYPE_EXTENSION) + { + return load_descriptor_values(iter); + } + } while (iter->index != start); + + /* Searched all the way back to start, and found nothing. */ + (void)load_descriptor_values(iter); + return false; + } +} + +static void *pb_const_cast(const void *p) +{ + /* Note: this casts away const, in order to use the common field iterator + * logic for both encoding and decoding. The cast is done using union + * to avoid spurious compiler warnings. */ + union { + void *p1; + const void *p2; + } t; + t.p2 = p; + return t.p1; +} + +bool pb_field_iter_begin_const(pb_field_iter_t *iter, const pb_msgdesc_t *desc, const void *message) +{ + return pb_field_iter_begin(iter, desc, pb_const_cast(message)); +} + +bool pb_field_iter_begin_extension_const(pb_field_iter_t *iter, const pb_extension_t *extension) +{ + return pb_field_iter_begin_extension(iter, (pb_extension_t*)pb_const_cast(extension)); +} + +bool pb_default_field_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_t *field) +{ + if (field->data_size == sizeof(pb_callback_t)) + { + pb_callback_t *pCallback = (pb_callback_t*)field->pData; + + if (pCallback != NULL) + { + if (istream != NULL && pCallback->funcs.decode != NULL) + { + return pCallback->funcs.decode(istream, field, &pCallback->arg); + } + + if (ostream != NULL && pCallback->funcs.encode != NULL) + { + return pCallback->funcs.encode(ostream, field, &pCallback->arg); + } + } + } + + return true; /* Success, but didn't do anything */ + +} + +#ifdef PB_VALIDATE_UTF8 + +/* This function checks whether a string is valid UTF-8 text. + * + * Algorithm is adapted from https://www.cl.cam.ac.uk/~mgk25/ucs/utf8_check.c + * Original copyright: Markus Kuhn 2005-03-30 + * Licensed under "Short code license", which allows use under MIT license or + * any compatible with it. + */ + +bool pb_validate_utf8(const char *str) +{ + const pb_byte_t *s = (const pb_byte_t*)str; + while (*s) + { + if (*s < 0x80) + { + /* 0xxxxxxx */ + s++; + } + else if ((s[0] & 0xe0) == 0xc0) + { + /* 110XXXXx 10xxxxxx */ + if ((s[1] & 0xc0) != 0x80 || + (s[0] & 0xfe) == 0xc0) /* overlong? */ + return false; + else + s += 2; + } + else if ((s[0] & 0xf0) == 0xe0) + { + /* 1110XXXX 10Xxxxxx 10xxxxxx */ + if ((s[1] & 0xc0) != 0x80 || + (s[2] & 0xc0) != 0x80 || + (s[0] == 0xe0 && (s[1] & 0xe0) == 0x80) || /* overlong? */ + (s[0] == 0xed && (s[1] & 0xe0) == 0xa0) || /* surrogate? */ + (s[0] == 0xef && s[1] == 0xbf && + (s[2] & 0xfe) == 0xbe)) /* U+FFFE or U+FFFF? */ + return false; + else + s += 3; + } + else if ((s[0] & 0xf8) == 0xf0) + { + /* 11110XXX 10XXxxxx 10xxxxxx 10xxxxxx */ + if ((s[1] & 0xc0) != 0x80 || + (s[2] & 0xc0) != 0x80 || + (s[3] & 0xc0) != 0x80 || + (s[0] == 0xf0 && (s[1] & 0xf0) == 0x80) || /* overlong? */ + (s[0] == 0xf4 && s[1] > 0x8f) || s[0] > 0xf4) /* > U+10FFFF? */ + return false; + else + s += 4; + } + else + { + return false; + } + } + + return true; +} + +#endif + diff --git a/src/network/pb_common.h b/src/network/pb_common.h new file mode 100644 index 000000000..58aa90f76 --- /dev/null +++ b/src/network/pb_common.h @@ -0,0 +1,49 @@ +/* pb_common.h: Common support functions for pb_encode.c and pb_decode.c. + * These functions are rarely needed by applications directly. + */ + +#ifndef PB_COMMON_H_INCLUDED +#define PB_COMMON_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Initialize the field iterator structure to beginning. + * Returns false if the message type is empty. */ +bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_msgdesc_t *desc, void *message); + +/* Get a field iterator for extension field. */ +bool pb_field_iter_begin_extension(pb_field_iter_t *iter, pb_extension_t *extension); + +/* Same as pb_field_iter_begin(), but for const message pointer. + * Note that the pointers in pb_field_iter_t will be non-const but shouldn't + * be written to when using these functions. */ +bool pb_field_iter_begin_const(pb_field_iter_t *iter, const pb_msgdesc_t *desc, const void *message); +bool pb_field_iter_begin_extension_const(pb_field_iter_t *iter, const pb_extension_t *extension); + +/* Advance the iterator to the next field. + * Returns false when the iterator wraps back to the first field. */ +bool pb_field_iter_next(pb_field_iter_t *iter); + +/* Advance the iterator until it points at a field with the given tag. + * Returns false if no such field exists. */ +bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag); + +/* Find a field with type PB_LTYPE_EXTENSION, or return false if not found. + * There can be only one extension range field per message. */ +bool pb_field_iter_find_extension(pb_field_iter_t *iter); + +#ifdef PB_VALIDATE_UTF8 +/* Validate UTF-8 text string */ +bool pb_validate_utf8(const char *s); +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif + diff --git a/src/network/pb_decode.c b/src/network/pb_decode.c new file mode 100644 index 000000000..788998eb9 --- /dev/null +++ b/src/network/pb_decode.c @@ -0,0 +1,1727 @@ +/* pb_decode.c -- decode a protobuf using minimal resources + * + * 2011 Petteri Aimonen + */ + +/* Use the GCC warn_unused_result attribute to check that all return values + * are propagated correctly. On other compilers and gcc before 3.4.0 just + * ignore the annotation. + */ +#if !defined(__GNUC__) || ( __GNUC__ < 3) || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) + #define checkreturn +#else + #define checkreturn __attribute__((warn_unused_result)) +#endif + +#include "pb.h" +#include "pb_decode.h" +#include "pb_common.h" + +/************************************** + * Declarations internal to this file * + **************************************/ + +static bool checkreturn buf_read(pb_istream_t *stream, pb_byte_t *buf, size_t count); +static bool checkreturn pb_decode_varint32_eof(pb_istream_t *stream, uint32_t *dest, bool *eof); +static bool checkreturn read_raw_value(pb_istream_t *stream, pb_wire_type_t wire_type, pb_byte_t *buf, size_t *size); +static bool checkreturn decode_basic_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field); +static bool checkreturn decode_static_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field); +static bool checkreturn decode_pointer_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field); +static bool checkreturn decode_callback_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field); +static bool checkreturn decode_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field); +static bool checkreturn default_extension_decoder(pb_istream_t *stream, pb_extension_t *extension, uint32_t tag, pb_wire_type_t wire_type); +static bool checkreturn decode_extension(pb_istream_t *stream, uint32_t tag, pb_wire_type_t wire_type, pb_extension_t *extension); +static bool pb_field_set_to_default(pb_field_iter_t *field); +static bool pb_message_set_to_defaults(pb_field_iter_t *iter); +static bool checkreturn pb_dec_bool(pb_istream_t *stream, const pb_field_iter_t *field); +static bool checkreturn pb_dec_varint(pb_istream_t *stream, const pb_field_iter_t *field); +static bool checkreturn pb_dec_bytes(pb_istream_t *stream, const pb_field_iter_t *field); +static bool checkreturn pb_dec_string(pb_istream_t *stream, const pb_field_iter_t *field); +static bool checkreturn pb_dec_submessage(pb_istream_t *stream, const pb_field_iter_t *field); +static bool checkreturn pb_dec_fixed_length_bytes(pb_istream_t *stream, const pb_field_iter_t *field); +static bool checkreturn pb_skip_varint(pb_istream_t *stream); +static bool checkreturn pb_skip_string(pb_istream_t *stream); + +#ifdef PB_ENABLE_MALLOC +static bool checkreturn allocate_field(pb_istream_t *stream, void *pData, size_t data_size, size_t array_size); +static void initialize_pointer_field(void *pItem, pb_field_iter_t *field); +static bool checkreturn pb_release_union_field(pb_istream_t *stream, pb_field_iter_t *field); +static void pb_release_single_field(pb_field_iter_t *field); +#endif + +#ifdef PB_WITHOUT_64BIT +#define pb_int64_t int32_t +#define pb_uint64_t uint32_t +#else +#define pb_int64_t int64_t +#define pb_uint64_t uint64_t +#endif + +typedef struct { + uint32_t bitfield[(PB_MAX_REQUIRED_FIELDS + 31) / 32]; +} pb_fields_seen_t; + +/******************************* + * pb_istream_t implementation * + *******************************/ + +static bool checkreturn buf_read(pb_istream_t *stream, pb_byte_t *buf, size_t count) +{ + const pb_byte_t *source = (const pb_byte_t*)stream->state; + stream->state = (pb_byte_t*)stream->state + count; + + if (buf != NULL) + { + memcpy(buf, source, count * sizeof(pb_byte_t)); + } + + return true; +} + +bool checkreturn pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count) +{ + if (count == 0) + return true; + +#ifndef PB_BUFFER_ONLY + if (buf == NULL && stream->callback != buf_read) + { + /* Skip input bytes */ + pb_byte_t tmp[16]; + while (count > 16) + { + if (!pb_read(stream, tmp, 16)) + return false; + + count -= 16; + } + + return pb_read(stream, tmp, count); + } +#endif + + if (stream->bytes_left < count) + PB_RETURN_ERROR(stream, "end-of-stream"); + +#ifndef PB_BUFFER_ONLY + if (!stream->callback(stream, buf, count)) + PB_RETURN_ERROR(stream, "io error"); +#else + if (!buf_read(stream, buf, count)) + return false; +#endif + + if (stream->bytes_left < count) + stream->bytes_left = 0; + else + stream->bytes_left -= count; + + return true; +} + +/* Read a single byte from input stream. buf may not be NULL. + * This is an optimization for the varint decoding. */ +static bool checkreturn pb_readbyte(pb_istream_t *stream, pb_byte_t *buf) +{ + if (stream->bytes_left == 0) + PB_RETURN_ERROR(stream, "end-of-stream"); + +#ifndef PB_BUFFER_ONLY + if (!stream->callback(stream, buf, 1)) + PB_RETURN_ERROR(stream, "io error"); +#else + *buf = *(const pb_byte_t*)stream->state; + stream->state = (pb_byte_t*)stream->state + 1; +#endif + + stream->bytes_left--; + + return true; +} + +pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t msglen) +{ + pb_istream_t stream; + /* Cast away the const from buf without a compiler error. We are + * careful to use it only in a const manner in the callbacks. + */ + union { + void *state; + const void *c_state; + } state; +#ifdef PB_BUFFER_ONLY + stream.callback = NULL; +#else + stream.callback = &buf_read; +#endif + state.c_state = buf; + stream.state = state.state; + stream.bytes_left = msglen; +#ifndef PB_NO_ERRMSG + stream.errmsg = NULL; +#endif + return stream; +} + +/******************** + * Helper functions * + ********************/ + +static bool checkreturn pb_decode_varint32_eof(pb_istream_t *stream, uint32_t *dest, bool *eof) +{ + pb_byte_t byte; + uint32_t result; + + if (!pb_readbyte(stream, &byte)) + { + if (stream->bytes_left == 0) + { + if (eof) + { + *eof = true; + } + } + + return false; + } + + if ((byte & 0x80) == 0) + { + /* Quick case, 1 byte value */ + result = byte; + } + else + { + /* Multibyte case */ + uint_fast8_t bitpos = 7; + result = byte & 0x7F; + + do + { + if (!pb_readbyte(stream, &byte)) + return false; + + if (bitpos >= 32) + { + /* Note: The varint could have trailing 0x80 bytes, or 0xFF for negative. */ + pb_byte_t sign_extension = (bitpos < 63) ? 0xFF : 0x01; + bool valid_extension = ((byte & 0x7F) == 0x00 || + ((result >> 31) != 0 && byte == sign_extension)); + + if (bitpos >= 64 || !valid_extension) + { + PB_RETURN_ERROR(stream, "varint overflow"); + } + } + else if (bitpos == 28) + { + if ((byte & 0x70) != 0 && (byte & 0x78) != 0x78) + { + PB_RETURN_ERROR(stream, "varint overflow"); + } + result |= (uint32_t)(byte & 0x0F) << bitpos; + } + else + { + result |= (uint32_t)(byte & 0x7F) << bitpos; + } + bitpos = (uint_fast8_t)(bitpos + 7); + } while (byte & 0x80); + } + + *dest = result; + return true; +} + +bool checkreturn pb_decode_varint32(pb_istream_t *stream, uint32_t *dest) +{ + return pb_decode_varint32_eof(stream, dest, NULL); +} + +#ifndef PB_WITHOUT_64BIT +bool checkreturn pb_decode_varint(pb_istream_t *stream, uint64_t *dest) +{ + pb_byte_t byte; + uint_fast8_t bitpos = 0; + uint64_t result = 0; + + do + { + if (!pb_readbyte(stream, &byte)) + return false; + + if (bitpos >= 63 && (byte & 0xFE) != 0) + PB_RETURN_ERROR(stream, "varint overflow"); + + result |= (uint64_t)(byte & 0x7F) << bitpos; + bitpos = (uint_fast8_t)(bitpos + 7); + } while (byte & 0x80); + + *dest = result; + return true; +} +#endif + +bool checkreturn pb_skip_varint(pb_istream_t *stream) +{ + pb_byte_t byte; + do + { + if (!pb_read(stream, &byte, 1)) + return false; + } while (byte & 0x80); + return true; +} + +bool checkreturn pb_skip_string(pb_istream_t *stream) +{ + uint32_t length; + if (!pb_decode_varint32(stream, &length)) + return false; + + if ((size_t)length != length) + { + PB_RETURN_ERROR(stream, "size too large"); + } + + return pb_read(stream, NULL, (size_t)length); +} + +bool checkreturn pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof) +{ + uint32_t temp; + *eof = false; + *wire_type = (pb_wire_type_t) 0; + *tag = 0; + + if (!pb_decode_varint32_eof(stream, &temp, eof)) + { + return false; + } + + *tag = temp >> 3; + *wire_type = (pb_wire_type_t)(temp & 7); + return true; +} + +bool checkreturn pb_skip_field(pb_istream_t *stream, pb_wire_type_t wire_type) +{ + switch (wire_type) + { + case PB_WT_VARINT: return pb_skip_varint(stream); + case PB_WT_64BIT: return pb_read(stream, NULL, 8); + case PB_WT_STRING: return pb_skip_string(stream); + case PB_WT_32BIT: return pb_read(stream, NULL, 4); + default: PB_RETURN_ERROR(stream, "invalid wire_type"); + } +} + +/* Read a raw value to buffer, for the purpose of passing it to callback as + * a substream. Size is maximum size on call, and actual size on return. + */ +static bool checkreturn read_raw_value(pb_istream_t *stream, pb_wire_type_t wire_type, pb_byte_t *buf, size_t *size) +{ + size_t max_size = *size; + switch (wire_type) + { + case PB_WT_VARINT: + *size = 0; + do + { + (*size)++; + if (*size > max_size) + PB_RETURN_ERROR(stream, "varint overflow"); + + if (!pb_read(stream, buf, 1)) + return false; + } while (*buf++ & 0x80); + return true; + + case PB_WT_64BIT: + *size = 8; + return pb_read(stream, buf, 8); + + case PB_WT_32BIT: + *size = 4; + return pb_read(stream, buf, 4); + + case PB_WT_STRING: + /* Calling read_raw_value with a PB_WT_STRING is an error. + * Explicitly handle this case and fallthrough to default to avoid + * compiler warnings. + */ + + default: PB_RETURN_ERROR(stream, "invalid wire_type"); + } +} + +/* Decode string length from stream and return a substream with limited length. + * Remember to close the substream using pb_close_string_substream(). + */ +bool checkreturn pb_make_string_substream(pb_istream_t *stream, pb_istream_t *substream) +{ + uint32_t size; + if (!pb_decode_varint32(stream, &size)) + return false; + + *substream = *stream; + if (substream->bytes_left < size) + PB_RETURN_ERROR(stream, "parent stream too short"); + + substream->bytes_left = (size_t)size; + stream->bytes_left -= (size_t)size; + return true; +} + +bool checkreturn pb_close_string_substream(pb_istream_t *stream, pb_istream_t *substream) +{ + if (substream->bytes_left) { + if (!pb_read(substream, NULL, substream->bytes_left)) + return false; + } + + stream->state = substream->state; + +#ifndef PB_NO_ERRMSG + stream->errmsg = substream->errmsg; +#endif + return true; +} + +/************************* + * Decode a single field * + *************************/ + +static bool checkreturn decode_basic_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field) +{ + switch (PB_LTYPE(field->type)) + { + case PB_LTYPE_BOOL: + if (wire_type != PB_WT_VARINT && wire_type != PB_WT_PACKED) + PB_RETURN_ERROR(stream, "wrong wire type"); + + return pb_dec_bool(stream, field); + + case PB_LTYPE_VARINT: + case PB_LTYPE_UVARINT: + case PB_LTYPE_SVARINT: + if (wire_type != PB_WT_VARINT && wire_type != PB_WT_PACKED) + PB_RETURN_ERROR(stream, "wrong wire type"); + + return pb_dec_varint(stream, field); + + case PB_LTYPE_FIXED32: + if (wire_type != PB_WT_32BIT && wire_type != PB_WT_PACKED) + PB_RETURN_ERROR(stream, "wrong wire type"); + + return pb_decode_fixed32(stream, field->pData); + + case PB_LTYPE_FIXED64: + if (wire_type != PB_WT_64BIT && wire_type != PB_WT_PACKED) + PB_RETURN_ERROR(stream, "wrong wire type"); + +#ifdef PB_CONVERT_DOUBLE_FLOAT + if (field->data_size == sizeof(float)) + { + return pb_decode_double_as_float(stream, (float*)field->pData); + } +#endif + +#ifdef PB_WITHOUT_64BIT + PB_RETURN_ERROR(stream, "invalid data_size"); +#else + return pb_decode_fixed64(stream, field->pData); +#endif + + case PB_LTYPE_BYTES: + if (wire_type != PB_WT_STRING) + PB_RETURN_ERROR(stream, "wrong wire type"); + + return pb_dec_bytes(stream, field); + + case PB_LTYPE_STRING: + if (wire_type != PB_WT_STRING) + PB_RETURN_ERROR(stream, "wrong wire type"); + + return pb_dec_string(stream, field); + + case PB_LTYPE_SUBMESSAGE: + case PB_LTYPE_SUBMSG_W_CB: + if (wire_type != PB_WT_STRING) + PB_RETURN_ERROR(stream, "wrong wire type"); + + return pb_dec_submessage(stream, field); + + case PB_LTYPE_FIXED_LENGTH_BYTES: + if (wire_type != PB_WT_STRING) + PB_RETURN_ERROR(stream, "wrong wire type"); + + return pb_dec_fixed_length_bytes(stream, field); + + default: + PB_RETURN_ERROR(stream, "invalid field type"); + } +} + +static bool checkreturn decode_static_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field) +{ + switch (PB_HTYPE(field->type)) + { + case PB_HTYPE_REQUIRED: + return decode_basic_field(stream, wire_type, field); + + case PB_HTYPE_OPTIONAL: + if (field->pSize != NULL) + *(bool*)field->pSize = true; + return decode_basic_field(stream, wire_type, field); + + case PB_HTYPE_REPEATED: + if (wire_type == PB_WT_STRING + && PB_LTYPE(field->type) <= PB_LTYPE_LAST_PACKABLE) + { + /* Packed array */ + bool status = true; + pb_istream_t substream; + pb_size_t *size = (pb_size_t*)field->pSize; + field->pData = (char*)field->pField + field->data_size * (*size); + + if (!pb_make_string_substream(stream, &substream)) + return false; + + while (substream.bytes_left > 0 && *size < field->array_size) + { + if (!decode_basic_field(&substream, PB_WT_PACKED, field)) + { + status = false; + break; + } + (*size)++; + field->pData = (char*)field->pData + field->data_size; + } + + if (substream.bytes_left != 0) + PB_RETURN_ERROR(stream, "array overflow"); + if (!pb_close_string_substream(stream, &substream)) + return false; + + return status; + } + else + { + /* Repeated field */ + pb_size_t *size = (pb_size_t*)field->pSize; + field->pData = (char*)field->pField + field->data_size * (*size); + + if ((*size)++ >= field->array_size) + PB_RETURN_ERROR(stream, "array overflow"); + + return decode_basic_field(stream, wire_type, field); + } + + case PB_HTYPE_ONEOF: + if (PB_LTYPE_IS_SUBMSG(field->type) && + *(pb_size_t*)field->pSize != field->tag) + { + /* We memset to zero so that any callbacks are set to NULL. + * This is because the callbacks might otherwise have values + * from some other union field. + * If callbacks are needed inside oneof field, use .proto + * option submsg_callback to have a separate callback function + * that can set the fields before submessage is decoded. + * pb_dec_submessage() will set any default values. */ + memset(field->pData, 0, (size_t)field->data_size); + + /* Set default values for the submessage fields. */ + if (field->submsg_desc->default_value != NULL || + field->submsg_desc->field_callback != NULL || + field->submsg_desc->submsg_info[0] != NULL) + { + pb_field_iter_t submsg_iter; + if (pb_field_iter_begin(&submsg_iter, field->submsg_desc, field->pData)) + { + if (!pb_message_set_to_defaults(&submsg_iter)) + PB_RETURN_ERROR(stream, "failed to set defaults"); + } + } + } + *(pb_size_t*)field->pSize = field->tag; + + return decode_basic_field(stream, wire_type, field); + + default: + PB_RETURN_ERROR(stream, "invalid field type"); + } +} + +#ifdef PB_ENABLE_MALLOC +/* Allocate storage for the field and store the pointer at iter->pData. + * array_size is the number of entries to reserve in an array. + * Zero size is not allowed, use pb_free() for releasing. + */ +static bool checkreturn allocate_field(pb_istream_t *stream, void *pData, size_t data_size, size_t array_size) +{ + void *ptr = *(void**)pData; + + if (data_size == 0 || array_size == 0) + PB_RETURN_ERROR(stream, "invalid size"); + +#ifdef __AVR__ + /* Workaround for AVR libc bug 53284: http://savannah.nongnu.org/bugs/?53284 + * Realloc to size of 1 byte can cause corruption of the malloc structures. + */ + if (data_size == 1 && array_size == 1) + { + data_size = 2; + } +#endif + + /* Check for multiplication overflows. + * This code avoids the costly division if the sizes are small enough. + * Multiplication is safe as long as only half of bits are set + * in either multiplicand. + */ + { + const size_t check_limit = (size_t)1 << (sizeof(size_t) * 4); + if (data_size >= check_limit || array_size >= check_limit) + { + const size_t size_max = (size_t)-1; + if (size_max / array_size < data_size) + { + PB_RETURN_ERROR(stream, "size too large"); + } + } + } + + /* Allocate new or expand previous allocation */ + /* Note: on failure the old pointer will remain in the structure, + * the message must be freed by caller also on error return. */ + ptr = pb_realloc(ptr, array_size * data_size); + if (ptr == NULL) + PB_RETURN_ERROR(stream, "realloc failed"); + + *(void**)pData = ptr; + return true; +} + +/* Clear a newly allocated item in case it contains a pointer, or is a submessage. */ +static void initialize_pointer_field(void *pItem, pb_field_iter_t *field) +{ + if (PB_LTYPE(field->type) == PB_LTYPE_STRING || + PB_LTYPE(field->type) == PB_LTYPE_BYTES) + { + *(void**)pItem = NULL; + } + else if (PB_LTYPE_IS_SUBMSG(field->type)) + { + /* We memset to zero so that any callbacks are set to NULL. + * Default values will be set by pb_dec_submessage(). */ + memset(pItem, 0, field->data_size); + } +} +#endif + +static bool checkreturn decode_pointer_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field) +{ +#ifndef PB_ENABLE_MALLOC + PB_UNUSED(wire_type); + PB_UNUSED(field); + PB_RETURN_ERROR(stream, "no malloc support"); +#else + switch (PB_HTYPE(field->type)) + { + case PB_HTYPE_REQUIRED: + case PB_HTYPE_OPTIONAL: + case PB_HTYPE_ONEOF: + if (PB_LTYPE_IS_SUBMSG(field->type) && *(void**)field->pField != NULL) + { + /* Duplicate field, have to release the old allocation first. */ + /* FIXME: Does this work correctly for oneofs? */ + pb_release_single_field(field); + } + + if (PB_HTYPE(field->type) == PB_HTYPE_ONEOF) + { + *(pb_size_t*)field->pSize = field->tag; + } + + if (PB_LTYPE(field->type) == PB_LTYPE_STRING || + PB_LTYPE(field->type) == PB_LTYPE_BYTES) + { + /* pb_dec_string and pb_dec_bytes handle allocation themselves */ + field->pData = field->pField; + return decode_basic_field(stream, wire_type, field); + } + else + { + if (!allocate_field(stream, field->pField, field->data_size, 1)) + return false; + + field->pData = *(void**)field->pField; + initialize_pointer_field(field->pData, field); + return decode_basic_field(stream, wire_type, field); + } + + case PB_HTYPE_REPEATED: + if (wire_type == PB_WT_STRING + && PB_LTYPE(field->type) <= PB_LTYPE_LAST_PACKABLE) + { + /* Packed array, multiple items come in at once. */ + bool status = true; + pb_size_t *size = (pb_size_t*)field->pSize; + size_t allocated_size = *size; + pb_istream_t substream; + + if (!pb_make_string_substream(stream, &substream)) + return false; + + while (substream.bytes_left) + { + if (*size == PB_SIZE_MAX) + { +#ifndef PB_NO_ERRMSG + stream->errmsg = "too many array entries"; +#endif + status = false; + break; + } + + if ((size_t)*size + 1 > allocated_size) + { + /* Allocate more storage. This tries to guess the + * number of remaining entries. Round the division + * upwards. */ + size_t remain = (substream.bytes_left - 1) / field->data_size + 1; + if (remain < PB_SIZE_MAX - allocated_size) + allocated_size += remain; + else + allocated_size += 1; + + if (!allocate_field(&substream, field->pField, field->data_size, allocated_size)) + { + status = false; + break; + } + } + + /* Decode the array entry */ + field->pData = *(char**)field->pField + field->data_size * (*size); + if (field->pData == NULL) + { + /* Shouldn't happen, but satisfies static analyzers */ + status = false; + break; + } + initialize_pointer_field(field->pData, field); + if (!decode_basic_field(&substream, PB_WT_PACKED, field)) + { + status = false; + break; + } + + (*size)++; + } + if (!pb_close_string_substream(stream, &substream)) + return false; + + return status; + } + else + { + /* Normal repeated field, i.e. only one item at a time. */ + pb_size_t *size = (pb_size_t*)field->pSize; + + if (*size == PB_SIZE_MAX) + PB_RETURN_ERROR(stream, "too many array entries"); + + if (!allocate_field(stream, field->pField, field->data_size, (size_t)(*size + 1))) + return false; + + field->pData = *(char**)field->pField + field->data_size * (*size); + (*size)++; + initialize_pointer_field(field->pData, field); + return decode_basic_field(stream, wire_type, field); + } + + default: + PB_RETURN_ERROR(stream, "invalid field type"); + } +#endif +} + +static bool checkreturn decode_callback_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field) +{ + if (!field->descriptor->field_callback) + return pb_skip_field(stream, wire_type); + + if (wire_type == PB_WT_STRING) + { + pb_istream_t substream; + size_t prev_bytes_left; + + if (!pb_make_string_substream(stream, &substream)) + return false; + + do + { + prev_bytes_left = substream.bytes_left; + if (!field->descriptor->field_callback(&substream, NULL, field)) + { + PB_SET_ERROR(stream, substream.errmsg ? substream.errmsg : "callback failed"); + return false; + } + } while (substream.bytes_left > 0 && substream.bytes_left < prev_bytes_left); + + if (!pb_close_string_substream(stream, &substream)) + return false; + + return true; + } + else + { + /* Copy the single scalar value to stack. + * This is required so that we can limit the stream length, + * which in turn allows to use same callback for packed and + * not-packed fields. */ + pb_istream_t substream; + pb_byte_t buffer[10]; + size_t size = sizeof(buffer); + + if (!read_raw_value(stream, wire_type, buffer, &size)) + return false; + substream = pb_istream_from_buffer(buffer, size); + + return field->descriptor->field_callback(&substream, NULL, field); + } +} + +static bool checkreturn decode_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field) +{ +#ifdef PB_ENABLE_MALLOC + /* When decoding an oneof field, check if there is old data that must be + * released first. */ + if (PB_HTYPE(field->type) == PB_HTYPE_ONEOF) + { + if (!pb_release_union_field(stream, field)) + return false; + } +#endif + + switch (PB_ATYPE(field->type)) + { + case PB_ATYPE_STATIC: + return decode_static_field(stream, wire_type, field); + + case PB_ATYPE_POINTER: + return decode_pointer_field(stream, wire_type, field); + + case PB_ATYPE_CALLBACK: + return decode_callback_field(stream, wire_type, field); + + default: + PB_RETURN_ERROR(stream, "invalid field type"); + } +} + +/* Default handler for extension fields. Expects to have a pb_msgdesc_t + * pointer in the extension->type->arg field, pointing to a message with + * only one field in it. */ +static bool checkreturn default_extension_decoder(pb_istream_t *stream, + pb_extension_t *extension, uint32_t tag, pb_wire_type_t wire_type) +{ + pb_field_iter_t iter; + + if (!pb_field_iter_begin_extension(&iter, extension)) + PB_RETURN_ERROR(stream, "invalid extension"); + + if (iter.tag != tag || !iter.message) + return true; + + extension->found = true; + return decode_field(stream, wire_type, &iter); +} + +/* Try to decode an unknown field as an extension field. Tries each extension + * decoder in turn, until one of them handles the field or loop ends. */ +static bool checkreturn decode_extension(pb_istream_t *stream, + uint32_t tag, pb_wire_type_t wire_type, pb_extension_t *extension) +{ + size_t pos = stream->bytes_left; + + while (extension != NULL && pos == stream->bytes_left) + { + bool status; + if (extension->type->decode) + status = extension->type->decode(stream, extension, tag, wire_type); + else + status = default_extension_decoder(stream, extension, tag, wire_type); + + if (!status) + return false; + + extension = extension->next; + } + + return true; +} + +/* Initialize message fields to default values, recursively */ +static bool pb_field_set_to_default(pb_field_iter_t *field) +{ + pb_type_t type; + type = field->type; + + if (PB_LTYPE(type) == PB_LTYPE_EXTENSION) + { + pb_extension_t *ext = *(pb_extension_t* const *)field->pData; + while (ext != NULL) + { + pb_field_iter_t ext_iter; + if (pb_field_iter_begin_extension(&ext_iter, ext)) + { + ext->found = false; + if (!pb_message_set_to_defaults(&ext_iter)) + return false; + } + ext = ext->next; + } + } + else if (PB_ATYPE(type) == PB_ATYPE_STATIC) + { + bool init_data = true; + if (PB_HTYPE(type) == PB_HTYPE_OPTIONAL && field->pSize != NULL) + { + /* Set has_field to false. Still initialize the optional field + * itself also. */ + *(bool*)field->pSize = false; + } + else if (PB_HTYPE(type) == PB_HTYPE_REPEATED || + PB_HTYPE(type) == PB_HTYPE_ONEOF) + { + /* REPEATED: Set array count to 0, no need to initialize contents. + ONEOF: Set which_field to 0. */ + *(pb_size_t*)field->pSize = 0; + init_data = false; + } + + if (init_data) + { + if (PB_LTYPE_IS_SUBMSG(field->type) && + (field->submsg_desc->default_value != NULL || + field->submsg_desc->field_callback != NULL || + field->submsg_desc->submsg_info[0] != NULL)) + { + /* Initialize submessage to defaults. + * Only needed if it has default values + * or callback/submessage fields. */ + pb_field_iter_t submsg_iter; + if (pb_field_iter_begin(&submsg_iter, field->submsg_desc, field->pData)) + { + if (!pb_message_set_to_defaults(&submsg_iter)) + return false; + } + } + else + { + /* Initialize to zeros */ + memset(field->pData, 0, (size_t)field->data_size); + } + } + } + else if (PB_ATYPE(type) == PB_ATYPE_POINTER) + { + /* Initialize the pointer to NULL. */ + *(void**)field->pField = NULL; + + /* Initialize array count to 0. */ + if (PB_HTYPE(type) == PB_HTYPE_REPEATED || + PB_HTYPE(type) == PB_HTYPE_ONEOF) + { + *(pb_size_t*)field->pSize = 0; + } + } + else if (PB_ATYPE(type) == PB_ATYPE_CALLBACK) + { + /* Don't overwrite callback */ + } + + return true; +} + +static bool pb_message_set_to_defaults(pb_field_iter_t *iter) +{ + pb_istream_t defstream = PB_ISTREAM_EMPTY; + uint32_t tag = 0; + pb_wire_type_t wire_type = PB_WT_VARINT; + bool eof; + + if (iter->descriptor->default_value) + { + defstream = pb_istream_from_buffer(iter->descriptor->default_value, (size_t)-1); + if (!pb_decode_tag(&defstream, &wire_type, &tag, &eof)) + return false; + } + + do + { + if (!pb_field_set_to_default(iter)) + return false; + + if (tag != 0 && iter->tag == tag) + { + /* We have a default value for this field in the defstream */ + if (!decode_field(&defstream, wire_type, iter)) + return false; + if (!pb_decode_tag(&defstream, &wire_type, &tag, &eof)) + return false; + + if (iter->pSize) + *(bool*)iter->pSize = false; + } + } while (pb_field_iter_next(iter)); + + return true; +} + +/********************* + * Decode all fields * + *********************/ + +static bool checkreturn pb_decode_inner(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct, unsigned int flags) +{ + uint32_t extension_range_start = 0; + pb_extension_t *extensions = NULL; + + /* 'fixed_count_field' and 'fixed_count_size' track position of a repeated fixed + * count field. This can only handle _one_ repeated fixed count field that + * is unpacked and unordered among other (non repeated fixed count) fields. + */ + pb_size_t fixed_count_field = PB_SIZE_MAX; + pb_size_t fixed_count_size = 0; + pb_size_t fixed_count_total_size = 0; + + pb_fields_seen_t fields_seen = {{0, 0}}; + const uint32_t allbits = ~(uint32_t)0; + pb_field_iter_t iter; + + if (pb_field_iter_begin(&iter, fields, dest_struct)) + { + if ((flags & PB_DECODE_NOINIT) == 0) + { + if (!pb_message_set_to_defaults(&iter)) + PB_RETURN_ERROR(stream, "failed to set defaults"); + } + } + + while (stream->bytes_left) + { + uint32_t tag; + pb_wire_type_t wire_type; + bool eof; + + if (!pb_decode_tag(stream, &wire_type, &tag, &eof)) + { + if (eof) + break; + else + return false; + } + + if (tag == 0) + { + if (flags & PB_DECODE_NULLTERMINATED) + { + break; + } + else + { + PB_RETURN_ERROR(stream, "zero tag"); + } + } + + if (!pb_field_iter_find(&iter, tag) || PB_LTYPE(iter.type) == PB_LTYPE_EXTENSION) + { + /* No match found, check if it matches an extension. */ + if (extension_range_start == 0) + { + if (pb_field_iter_find_extension(&iter)) + { + extensions = *(pb_extension_t* const *)iter.pData; + extension_range_start = iter.tag; + } + + if (!extensions) + { + extension_range_start = (uint32_t)-1; + } + } + + if (tag >= extension_range_start) + { + size_t pos = stream->bytes_left; + + if (!decode_extension(stream, tag, wire_type, extensions)) + return false; + + if (pos != stream->bytes_left) + { + /* The field was handled */ + continue; + } + } + + /* No match found, skip data */ + if (!pb_skip_field(stream, wire_type)) + return false; + continue; + } + + /* If a repeated fixed count field was found, get size from + * 'fixed_count_field' as there is no counter contained in the struct. + */ + if (PB_HTYPE(iter.type) == PB_HTYPE_REPEATED && iter.pSize == &iter.array_size) + { + if (fixed_count_field != iter.index) { + /* If the new fixed count field does not match the previous one, + * check that the previous one is NULL or that it finished + * receiving all the expected data. + */ + if (fixed_count_field != PB_SIZE_MAX && + fixed_count_size != fixed_count_total_size) + { + PB_RETURN_ERROR(stream, "wrong size for fixed count field"); + } + + fixed_count_field = iter.index; + fixed_count_size = 0; + fixed_count_total_size = iter.array_size; + } + + iter.pSize = &fixed_count_size; + } + + if (PB_HTYPE(iter.type) == PB_HTYPE_REQUIRED + && iter.required_field_index < PB_MAX_REQUIRED_FIELDS) + { + uint32_t tmp = ((uint32_t)1 << (iter.required_field_index & 31)); + fields_seen.bitfield[iter.required_field_index >> 5] |= tmp; + } + + if (!decode_field(stream, wire_type, &iter)) + return false; + } + + /* Check that all elements of the last decoded fixed count field were present. */ + if (fixed_count_field != PB_SIZE_MAX && + fixed_count_size != fixed_count_total_size) + { + PB_RETURN_ERROR(stream, "wrong size for fixed count field"); + } + + /* Check that all required fields were present. */ + { + pb_size_t req_field_count = iter.descriptor->required_field_count; + + if (req_field_count > 0) + { + pb_size_t i; + + if (req_field_count > PB_MAX_REQUIRED_FIELDS) + req_field_count = PB_MAX_REQUIRED_FIELDS; + + /* Check the whole words */ + for (i = 0; i < (req_field_count >> 5); i++) + { + if (fields_seen.bitfield[i] != allbits) + PB_RETURN_ERROR(stream, "missing required field"); + } + + /* Check the remaining bits (if any) */ + if ((req_field_count & 31) != 0) + { + if (fields_seen.bitfield[req_field_count >> 5] != + (allbits >> (uint_least8_t)(32 - (req_field_count & 31)))) + { + PB_RETURN_ERROR(stream, "missing required field"); + } + } + } + } + + return true; +} + +bool checkreturn pb_decode_ex(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct, unsigned int flags) +{ + bool status; + + if ((flags & PB_DECODE_DELIMITED) == 0) + { + status = pb_decode_inner(stream, fields, dest_struct, flags); + } + else + { + pb_istream_t substream; + if (!pb_make_string_substream(stream, &substream)) + return false; + + status = pb_decode_inner(&substream, fields, dest_struct, flags); + + if (!pb_close_string_substream(stream, &substream)) + return false; + } + +#ifdef PB_ENABLE_MALLOC + if (!status) + pb_release(fields, dest_struct); +#endif + + return status; +} + +bool checkreturn pb_decode(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct) +{ + bool status; + + status = pb_decode_inner(stream, fields, dest_struct, 0); + +#ifdef PB_ENABLE_MALLOC + if (!status) + pb_release(fields, dest_struct); +#endif + + return status; +} + +#ifdef PB_ENABLE_MALLOC +/* Given an oneof field, if there has already been a field inside this oneof, + * release it before overwriting with a different one. */ +static bool pb_release_union_field(pb_istream_t *stream, pb_field_iter_t *field) +{ + pb_field_iter_t old_field = *field; + pb_size_t old_tag = *(pb_size_t*)field->pSize; /* Previous which_ value */ + pb_size_t new_tag = field->tag; /* New which_ value */ + + if (old_tag == 0) + return true; /* Ok, no old data in union */ + + if (old_tag == new_tag) + return true; /* Ok, old data is of same type => merge */ + + /* Release old data. The find can fail if the message struct contains + * invalid data. */ + if (!pb_field_iter_find(&old_field, old_tag)) + PB_RETURN_ERROR(stream, "invalid union tag"); + + pb_release_single_field(&old_field); + + if (PB_ATYPE(field->type) == PB_ATYPE_POINTER) + { + /* Initialize the pointer to NULL to make sure it is valid + * even in case of error return. */ + *(void**)field->pField = NULL; + field->pData = NULL; + } + + return true; +} + +static void pb_release_single_field(pb_field_iter_t *field) +{ + pb_type_t type; + type = field->type; + + if (PB_HTYPE(type) == PB_HTYPE_ONEOF) + { + if (*(pb_size_t*)field->pSize != field->tag) + return; /* This is not the current field in the union */ + } + + /* Release anything contained inside an extension or submsg. + * This has to be done even if the submsg itself is statically + * allocated. */ + if (PB_LTYPE(type) == PB_LTYPE_EXTENSION) + { + /* Release fields from all extensions in the linked list */ + pb_extension_t *ext = *(pb_extension_t**)field->pData; + while (ext != NULL) + { + pb_field_iter_t ext_iter; + if (pb_field_iter_begin_extension(&ext_iter, ext)) + { + pb_release_single_field(&ext_iter); + } + ext = ext->next; + } + } + else if (PB_LTYPE_IS_SUBMSG(type) && PB_ATYPE(type) != PB_ATYPE_CALLBACK) + { + /* Release fields in submessage or submsg array */ + pb_size_t count = 1; + + if (PB_ATYPE(type) == PB_ATYPE_POINTER) + { + field->pData = *(void**)field->pField; + } + else + { + field->pData = field->pField; + } + + if (PB_HTYPE(type) == PB_HTYPE_REPEATED) + { + count = *(pb_size_t*)field->pSize; + + if (PB_ATYPE(type) == PB_ATYPE_STATIC && count > field->array_size) + { + /* Protect against corrupted _count fields */ + count = field->array_size; + } + } + + if (field->pData) + { + for (; count > 0; count--) + { + pb_release(field->submsg_desc, field->pData); + field->pData = (char*)field->pData + field->data_size; + } + } + } + + if (PB_ATYPE(type) == PB_ATYPE_POINTER) + { + if (PB_HTYPE(type) == PB_HTYPE_REPEATED && + (PB_LTYPE(type) == PB_LTYPE_STRING || + PB_LTYPE(type) == PB_LTYPE_BYTES)) + { + /* Release entries in repeated string or bytes array */ + void **pItem = *(void***)field->pField; + pb_size_t count = *(pb_size_t*)field->pSize; + for (; count > 0; count--) + { + pb_free(*pItem); + *pItem++ = NULL; + } + } + + if (PB_HTYPE(type) == PB_HTYPE_REPEATED) + { + /* We are going to release the array, so set the size to 0 */ + *(pb_size_t*)field->pSize = 0; + } + + /* Release main pointer */ + pb_free(*(void**)field->pField); + *(void**)field->pField = NULL; + } +} + +void pb_release(const pb_msgdesc_t *fields, void *dest_struct) +{ + pb_field_iter_t iter; + + if (!dest_struct) + return; /* Ignore NULL pointers, similar to free() */ + + if (!pb_field_iter_begin(&iter, fields, dest_struct)) + return; /* Empty message type */ + + do + { + pb_release_single_field(&iter); + } while (pb_field_iter_next(&iter)); +} +#else +void pb_release(const pb_msgdesc_t *fields, void *dest_struct) +{ + /* Nothing to release without PB_ENABLE_MALLOC. */ + PB_UNUSED(fields); + PB_UNUSED(dest_struct); +} +#endif + +/* Field decoders */ + +bool pb_decode_bool(pb_istream_t *stream, bool *dest) +{ + uint32_t value; + if (!pb_decode_varint32(stream, &value)) + return false; + + *(bool*)dest = (value != 0); + return true; +} + +bool pb_decode_svarint(pb_istream_t *stream, pb_int64_t *dest) +{ + pb_uint64_t value; + if (!pb_decode_varint(stream, &value)) + return false; + + if (value & 1) + *dest = (pb_int64_t)(~(value >> 1)); + else + *dest = (pb_int64_t)(value >> 1); + + return true; +} + +bool pb_decode_fixed32(pb_istream_t *stream, void *dest) +{ + union { + uint32_t fixed32; + pb_byte_t bytes[4]; + } u; + + if (!pb_read(stream, u.bytes, 4)) + return false; + +#if defined(PB_LITTLE_ENDIAN_8BIT) && PB_LITTLE_ENDIAN_8BIT == 1 + /* fast path - if we know that we're on little endian, assign directly */ + *(uint32_t*)dest = u.fixed32; +#else + *(uint32_t*)dest = ((uint32_t)u.bytes[0] << 0) | + ((uint32_t)u.bytes[1] << 8) | + ((uint32_t)u.bytes[2] << 16) | + ((uint32_t)u.bytes[3] << 24); +#endif + return true; +} + +#ifndef PB_WITHOUT_64BIT +bool pb_decode_fixed64(pb_istream_t *stream, void *dest) +{ + union { + uint64_t fixed64; + pb_byte_t bytes[8]; + } u; + + if (!pb_read(stream, u.bytes, 8)) + return false; + +#if defined(PB_LITTLE_ENDIAN_8BIT) && PB_LITTLE_ENDIAN_8BIT == 1 + /* fast path - if we know that we're on little endian, assign directly */ + *(uint64_t*)dest = u.fixed64; +#else + *(uint64_t*)dest = ((uint64_t)u.bytes[0] << 0) | + ((uint64_t)u.bytes[1] << 8) | + ((uint64_t)u.bytes[2] << 16) | + ((uint64_t)u.bytes[3] << 24) | + ((uint64_t)u.bytes[4] << 32) | + ((uint64_t)u.bytes[5] << 40) | + ((uint64_t)u.bytes[6] << 48) | + ((uint64_t)u.bytes[7] << 56); +#endif + return true; +} +#endif + +static bool checkreturn pb_dec_bool(pb_istream_t *stream, const pb_field_iter_t *field) +{ + return pb_decode_bool(stream, (bool*)field->pData); +} + +static bool checkreturn pb_dec_varint(pb_istream_t *stream, const pb_field_iter_t *field) +{ + if (PB_LTYPE(field->type) == PB_LTYPE_UVARINT) + { + pb_uint64_t value, clamped; + if (!pb_decode_varint(stream, &value)) + return false; + + /* Cast to the proper field size, while checking for overflows */ + if (field->data_size == sizeof(pb_uint64_t)) + clamped = *(pb_uint64_t*)field->pData = value; + else if (field->data_size == sizeof(uint32_t)) + clamped = *(uint32_t*)field->pData = (uint32_t)value; + else if (field->data_size == sizeof(uint_least16_t)) + clamped = *(uint_least16_t*)field->pData = (uint_least16_t)value; + else if (field->data_size == sizeof(uint_least8_t)) + clamped = *(uint_least8_t*)field->pData = (uint_least8_t)value; + else + PB_RETURN_ERROR(stream, "invalid data_size"); + + if (clamped != value) + PB_RETURN_ERROR(stream, "integer too large"); + + return true; + } + else + { + pb_uint64_t value; + pb_int64_t svalue; + pb_int64_t clamped; + + if (PB_LTYPE(field->type) == PB_LTYPE_SVARINT) + { + if (!pb_decode_svarint(stream, &svalue)) + return false; + } + else + { + if (!pb_decode_varint(stream, &value)) + return false; + + /* See issue 97: Google's C++ protobuf allows negative varint values to + * be cast as int32_t, instead of the int64_t that should be used when + * encoding. Nanopb versions before 0.2.5 had a bug in encoding. In order to + * not break decoding of such messages, we cast <=32 bit fields to + * int32_t first to get the sign correct. + */ + if (field->data_size == sizeof(pb_int64_t)) + svalue = (pb_int64_t)value; + else + svalue = (int32_t)value; + } + + /* Cast to the proper field size, while checking for overflows */ + if (field->data_size == sizeof(pb_int64_t)) + clamped = *(pb_int64_t*)field->pData = svalue; + else if (field->data_size == sizeof(int32_t)) + clamped = *(int32_t*)field->pData = (int32_t)svalue; + else if (field->data_size == sizeof(int_least16_t)) + clamped = *(int_least16_t*)field->pData = (int_least16_t)svalue; + else if (field->data_size == sizeof(int_least8_t)) + clamped = *(int_least8_t*)field->pData = (int_least8_t)svalue; + else + PB_RETURN_ERROR(stream, "invalid data_size"); + + if (clamped != svalue) + PB_RETURN_ERROR(stream, "integer too large"); + + return true; + } +} + +static bool checkreturn pb_dec_bytes(pb_istream_t *stream, const pb_field_iter_t *field) +{ + uint32_t size; + size_t alloc_size; + pb_bytes_array_t *dest; + + if (!pb_decode_varint32(stream, &size)) + return false; + + if (size > PB_SIZE_MAX) + PB_RETURN_ERROR(stream, "bytes overflow"); + + alloc_size = PB_BYTES_ARRAY_T_ALLOCSIZE(size); + if (size > alloc_size) + PB_RETURN_ERROR(stream, "size too large"); + + if (PB_ATYPE(field->type) == PB_ATYPE_POINTER) + { +#ifndef PB_ENABLE_MALLOC + PB_RETURN_ERROR(stream, "no malloc support"); +#else + if (stream->bytes_left < size) + PB_RETURN_ERROR(stream, "end-of-stream"); + + if (!allocate_field(stream, field->pData, alloc_size, 1)) + return false; + dest = *(pb_bytes_array_t**)field->pData; +#endif + } + else + { + if (alloc_size > field->data_size) + PB_RETURN_ERROR(stream, "bytes overflow"); + dest = (pb_bytes_array_t*)field->pData; + } + + dest->size = (pb_size_t)size; + return pb_read(stream, dest->bytes, (size_t)size); +} + +static bool checkreturn pb_dec_string(pb_istream_t *stream, const pb_field_iter_t *field) +{ + uint32_t size; + size_t alloc_size; + pb_byte_t *dest = (pb_byte_t*)field->pData; + + if (!pb_decode_varint32(stream, &size)) + return false; + + if (size == (uint32_t)-1) + PB_RETURN_ERROR(stream, "size too large"); + + /* Space for null terminator */ + alloc_size = (size_t)(size + 1); + + if (alloc_size < size) + PB_RETURN_ERROR(stream, "size too large"); + + if (PB_ATYPE(field->type) == PB_ATYPE_POINTER) + { +#ifndef PB_ENABLE_MALLOC + PB_RETURN_ERROR(stream, "no malloc support"); +#else + if (stream->bytes_left < size) + PB_RETURN_ERROR(stream, "end-of-stream"); + + if (!allocate_field(stream, field->pData, alloc_size, 1)) + return false; + dest = *(pb_byte_t**)field->pData; +#endif + } + else + { + if (alloc_size > field->data_size) + PB_RETURN_ERROR(stream, "string overflow"); + } + + dest[size] = 0; + + if (!pb_read(stream, dest, (size_t)size)) + return false; + +#ifdef PB_VALIDATE_UTF8 + if (!pb_validate_utf8((const char*)dest)) + PB_RETURN_ERROR(stream, "invalid utf8"); +#endif + + return true; +} + +static bool checkreturn pb_dec_submessage(pb_istream_t *stream, const pb_field_iter_t *field) +{ + bool status = true; + bool submsg_consumed = false; + pb_istream_t substream; + + if (!pb_make_string_substream(stream, &substream)) + return false; + + if (field->submsg_desc == NULL) + PB_RETURN_ERROR(stream, "invalid field descriptor"); + + /* Submessages can have a separate message-level callback that is called + * before decoding the message. Typically it is used to set callback fields + * inside oneofs. */ + if (PB_LTYPE(field->type) == PB_LTYPE_SUBMSG_W_CB && field->pSize != NULL) + { + /* Message callback is stored right before pSize. */ + pb_callback_t *callback = (pb_callback_t*)field->pSize - 1; + if (callback->funcs.decode) + { + status = callback->funcs.decode(&substream, field, &callback->arg); + + if (substream.bytes_left == 0) + { + submsg_consumed = true; + } + } + } + + /* Now decode the submessage contents */ + if (status && !submsg_consumed) + { + unsigned int flags = 0; + + /* Static required/optional fields are already initialized by top-level + * pb_decode(), no need to initialize them again. */ + if (PB_ATYPE(field->type) == PB_ATYPE_STATIC && + PB_HTYPE(field->type) != PB_HTYPE_REPEATED) + { + flags = PB_DECODE_NOINIT; + } + + status = pb_decode_inner(&substream, field->submsg_desc, field->pData, flags); + } + + if (!pb_close_string_substream(stream, &substream)) + return false; + + return status; +} + +static bool checkreturn pb_dec_fixed_length_bytes(pb_istream_t *stream, const pb_field_iter_t *field) +{ + uint32_t size; + + if (!pb_decode_varint32(stream, &size)) + return false; + + if (size > PB_SIZE_MAX) + PB_RETURN_ERROR(stream, "bytes overflow"); + + if (size == 0) + { + /* As a special case, treat empty bytes string as all zeros for fixed_length_bytes. */ + memset(field->pData, 0, (size_t)field->data_size); + return true; + } + + if (size != field->data_size) + PB_RETURN_ERROR(stream, "incorrect fixed length bytes size"); + + return pb_read(stream, (pb_byte_t*)field->pData, (size_t)field->data_size); +} + +#ifdef PB_CONVERT_DOUBLE_FLOAT +bool pb_decode_double_as_float(pb_istream_t *stream, float *dest) +{ + uint_least8_t sign; + int exponent; + uint32_t mantissa; + uint64_t value; + union { float f; uint32_t i; } out; + + if (!pb_decode_fixed64(stream, &value)) + return false; + + /* Decompose input value */ + sign = (uint_least8_t)((value >> 63) & 1); + exponent = (int)((value >> 52) & 0x7FF) - 1023; + mantissa = (value >> 28) & 0xFFFFFF; /* Highest 24 bits */ + + /* Figure if value is in range representable by floats. */ + if (exponent == 1024) + { + /* Special value */ + exponent = 128; + mantissa >>= 1; + } + else + { + if (exponent > 127) + { + /* Too large, convert to infinity */ + exponent = 128; + mantissa = 0; + } + else if (exponent < -150) + { + /* Too small, convert to zero */ + exponent = -127; + mantissa = 0; + } + else if (exponent < -126) + { + /* Denormalized */ + mantissa |= 0x1000000; + mantissa >>= (-126 - exponent); + exponent = -127; + } + + /* Round off mantissa */ + mantissa = (mantissa + 1) >> 1; + + /* Check if mantissa went over 2.0 */ + if (mantissa & 0x800000) + { + exponent += 1; + mantissa &= 0x7FFFFF; + mantissa >>= 1; + } + } + + /* Combine fields */ + out.i = mantissa; + out.i |= (uint32_t)(exponent + 127) << 23; + out.i |= (uint32_t)sign << 31; + + *dest = out.f; + return true; +} +#endif diff --git a/src/network/pb_decode.h b/src/network/pb_decode.h new file mode 100644 index 000000000..ae1d3ccf2 --- /dev/null +++ b/src/network/pb_decode.h @@ -0,0 +1,193 @@ +/* pb_decode.h: Functions to decode protocol buffers. Depends on pb_decode.c. + * The main function is pb_decode. You also need an input stream, and the + * field descriptions created by nanopb_generator.py. + */ + +#ifndef PB_DECODE_H_INCLUDED +#define PB_DECODE_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Structure for defining custom input streams. You will need to provide + * a callback function to read the bytes from your storage, which can be + * for example a file or a network socket. + * + * The callback must conform to these rules: + * + * 1) Return false on IO errors. This will cause decoding to abort. + * 2) You can use state to store your own data (e.g. buffer pointer), + * and rely on pb_read to verify that no-body reads past bytes_left. + * 3) Your callback may be used with substreams, in which case bytes_left + * is different than from the main stream. Don't use bytes_left to compute + * any pointers. + */ +struct pb_istream_s +{ +#ifdef PB_BUFFER_ONLY + /* Callback pointer is not used in buffer-only configuration. + * Having an int pointer here allows binary compatibility but + * gives an error if someone tries to assign callback function. + */ + int *callback; +#else + bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count); +#endif + + void *state; /* Free field for use by callback implementation */ + size_t bytes_left; + +#ifndef PB_NO_ERRMSG + const char *errmsg; +#endif +}; + +#ifndef PB_NO_ERRMSG +#define PB_ISTREAM_EMPTY {0,0,0,0} +#else +#define PB_ISTREAM_EMPTY {0,0,0} +#endif + +/*************************** + * Main decoding functions * + ***************************/ + +/* Decode a single protocol buffers message from input stream into a C structure. + * Returns true on success, false on any failure. + * The actual struct pointed to by dest must match the description in fields. + * Callback fields of the destination structure must be initialized by caller. + * All other fields will be initialized by this function. + * + * Example usage: + * MyMessage msg = {}; + * uint8_t buffer[64]; + * pb_istream_t stream; + * + * // ... read some data into buffer ... + * + * stream = pb_istream_from_buffer(buffer, count); + * pb_decode(&stream, MyMessage_fields, &msg); + */ +bool pb_decode(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct); + +/* Extended version of pb_decode, with several options to control + * the decoding process: + * + * PB_DECODE_NOINIT: Do not initialize the fields to default values. + * This is slightly faster if you do not need the default + * values and instead initialize the structure to 0 using + * e.g. memset(). This can also be used for merging two + * messages, i.e. combine already existing data with new + * values. + * + * PB_DECODE_DELIMITED: Input message starts with the message size as varint. + * Corresponds to parseDelimitedFrom() in Google's + * protobuf API. + * + * PB_DECODE_NULLTERMINATED: Stop reading when field tag is read as 0. This allows + * reading null terminated messages. + * NOTE: Until nanopb-0.4.0, pb_decode() also allows + * null-termination. This behaviour is not supported in + * most other protobuf implementations, so PB_DECODE_DELIMITED + * is a better option for compatibility. + * + * Multiple flags can be combined with bitwise or (| operator) + */ +#define PB_DECODE_NOINIT 0x01U +#define PB_DECODE_DELIMITED 0x02U +#define PB_DECODE_NULLTERMINATED 0x04U +bool pb_decode_ex(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct, unsigned int flags); + +/* Defines for backwards compatibility with code written before nanopb-0.4.0 */ +#define pb_decode_noinit(s,f,d) pb_decode_ex(s,f,d, PB_DECODE_NOINIT) +#define pb_decode_delimited(s,f,d) pb_decode_ex(s,f,d, PB_DECODE_DELIMITED) +#define pb_decode_delimited_noinit(s,f,d) pb_decode_ex(s,f,d, PB_DECODE_DELIMITED | PB_DECODE_NOINIT) +#define pb_decode_nullterminated(s,f,d) pb_decode_ex(s,f,d, PB_DECODE_NULLTERMINATED) + +/* Release any allocated pointer fields. If you use dynamic allocation, you should + * call this for any successfully decoded message when you are done with it. If + * pb_decode() returns with an error, the message is already released. + */ +void pb_release(const pb_msgdesc_t *fields, void *dest_struct); + +/************************************** + * Functions for manipulating streams * + **************************************/ + +/* Create an input stream for reading from a memory buffer. + * + * msglen should be the actual length of the message, not the full size of + * allocated buffer. + * + * Alternatively, you can use a custom stream that reads directly from e.g. + * a file or a network socket. + */ +pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t msglen); + +/* Function to read from a pb_istream_t. You can use this if you need to + * read some custom header data, or to read data in field callbacks. + */ +bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count); + + +/************************************************ + * Helper functions for writing field callbacks * + ************************************************/ + +/* Decode the tag for the next field in the stream. Gives the wire type and + * field tag. At end of the message, returns false and sets eof to true. */ +bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof); + +/* Skip the field payload data, given the wire type. */ +bool pb_skip_field(pb_istream_t *stream, pb_wire_type_t wire_type); + +/* Decode an integer in the varint format. This works for enum, int32, + * int64, uint32 and uint64 field types. */ +#ifndef PB_WITHOUT_64BIT +bool pb_decode_varint(pb_istream_t *stream, uint64_t *dest); +#else +#define pb_decode_varint pb_decode_varint32 +#endif + +/* Decode an integer in the varint format. This works for enum, int32, + * and uint32 field types. */ +bool pb_decode_varint32(pb_istream_t *stream, uint32_t *dest); + +/* Decode a bool value in varint format. */ +bool pb_decode_bool(pb_istream_t *stream, bool *dest); + +/* Decode an integer in the zig-zagged svarint format. This works for sint32 + * and sint64. */ +#ifndef PB_WITHOUT_64BIT +bool pb_decode_svarint(pb_istream_t *stream, int64_t *dest); +#else +bool pb_decode_svarint(pb_istream_t *stream, int32_t *dest); +#endif + +/* Decode a fixed32, sfixed32 or float value. You need to pass a pointer to + * a 4-byte wide C variable. */ +bool pb_decode_fixed32(pb_istream_t *stream, void *dest); + +#ifndef PB_WITHOUT_64BIT +/* Decode a fixed64, sfixed64 or double value. You need to pass a pointer to + * a 8-byte wide C variable. */ +bool pb_decode_fixed64(pb_istream_t *stream, void *dest); +#endif + +#ifdef PB_CONVERT_DOUBLE_FLOAT +/* Decode a double value into float variable. */ +bool pb_decode_double_as_float(pb_istream_t *stream, float *dest); +#endif + +/* Make a limited-length substream for reading a PB_WT_STRING field. */ +bool pb_make_string_substream(pb_istream_t *stream, pb_istream_t *substream); +bool pb_close_string_substream(pb_istream_t *stream, pb_istream_t *substream); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/src/network/pb_encode.c b/src/network/pb_encode.c new file mode 100644 index 000000000..7f5620125 --- /dev/null +++ b/src/network/pb_encode.c @@ -0,0 +1,1000 @@ +/* pb_encode.c -- encode a protobuf using minimal resources + * + * 2011 Petteri Aimonen + */ + +#include "pb.h" +#include "pb_encode.h" +#include "pb_common.h" + +/* Use the GCC warn_unused_result attribute to check that all return values + * are propagated correctly. On other compilers and gcc before 3.4.0 just + * ignore the annotation. + */ +#if !defined(__GNUC__) || ( __GNUC__ < 3) || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) + #define checkreturn +#else + #define checkreturn __attribute__((warn_unused_result)) +#endif + +/************************************** + * Declarations internal to this file * + **************************************/ +static bool checkreturn buf_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); +static bool checkreturn encode_array(pb_ostream_t *stream, pb_field_iter_t *field); +static bool checkreturn pb_check_proto3_default_value(const pb_field_iter_t *field); +static bool checkreturn encode_basic_field(pb_ostream_t *stream, const pb_field_iter_t *field); +static bool checkreturn encode_callback_field(pb_ostream_t *stream, const pb_field_iter_t *field); +static bool checkreturn encode_field(pb_ostream_t *stream, pb_field_iter_t *field); +static bool checkreturn encode_extension_field(pb_ostream_t *stream, const pb_field_iter_t *field); +static bool checkreturn default_extension_encoder(pb_ostream_t *stream, const pb_extension_t *extension); +static bool checkreturn pb_encode_varint_32(pb_ostream_t *stream, uint32_t low, uint32_t high); +static bool checkreturn pb_enc_bool(pb_ostream_t *stream, const pb_field_iter_t *field); +static bool checkreturn pb_enc_varint(pb_ostream_t *stream, const pb_field_iter_t *field); +static bool checkreturn pb_enc_fixed(pb_ostream_t *stream, const pb_field_iter_t *field); +static bool checkreturn pb_enc_bytes(pb_ostream_t *stream, const pb_field_iter_t *field); +static bool checkreturn pb_enc_string(pb_ostream_t *stream, const pb_field_iter_t *field); +static bool checkreturn pb_enc_submessage(pb_ostream_t *stream, const pb_field_iter_t *field); +static bool checkreturn pb_enc_fixed_length_bytes(pb_ostream_t *stream, const pb_field_iter_t *field); + +#ifdef PB_WITHOUT_64BIT +#define pb_int64_t int32_t +#define pb_uint64_t uint32_t +#else +#define pb_int64_t int64_t +#define pb_uint64_t uint64_t +#endif + +/******************************* + * pb_ostream_t implementation * + *******************************/ + +static bool checkreturn buf_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count) +{ + pb_byte_t *dest = (pb_byte_t*)stream->state; + stream->state = dest + count; + + memcpy(dest, buf, count * sizeof(pb_byte_t)); + + return true; +} + +pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize) +{ + pb_ostream_t stream; +#ifdef PB_BUFFER_ONLY + /* In PB_BUFFER_ONLY configuration the callback pointer is just int*. + * NULL pointer marks a sizing field, so put a non-NULL value to mark a buffer stream. + */ + static const int marker = 0; + stream.callback = ▮ +#else + stream.callback = &buf_write; +#endif + stream.state = buf; + stream.max_size = bufsize; + stream.bytes_written = 0; +#ifndef PB_NO_ERRMSG + stream.errmsg = NULL; +#endif + return stream; +} + +bool checkreturn pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count) +{ + if (count > 0 && stream->callback != NULL) + { + if (stream->bytes_written + count < stream->bytes_written || + stream->bytes_written + count > stream->max_size) + { + PB_RETURN_ERROR(stream, "stream full"); + } + +#ifdef PB_BUFFER_ONLY + if (!buf_write(stream, buf, count)) + PB_RETURN_ERROR(stream, "io error"); +#else + if (!stream->callback(stream, buf, count)) + PB_RETURN_ERROR(stream, "io error"); +#endif + } + + stream->bytes_written += count; + return true; +} + +/************************* + * Encode a single field * + *************************/ + +/* Read a bool value without causing undefined behavior even if the value + * is invalid. See issue #434 and + * https://stackoverflow.com/questions/27661768/weird-results-for-conditional + */ +static bool safe_read_bool(const void *pSize) +{ + const char *p = (const char *)pSize; + size_t i; + for (i = 0; i < sizeof(bool); i++) + { + if (p[i] != 0) + return true; + } + return false; +} + +/* Encode a static array. Handles the size calculations and possible packing. */ +static bool checkreturn encode_array(pb_ostream_t *stream, pb_field_iter_t *field) +{ + pb_size_t i; + pb_size_t count; +#ifndef PB_ENCODE_ARRAYS_UNPACKED + size_t size; +#endif + + count = *(pb_size_t*)field->pSize; + + if (count == 0) + return true; + + if (PB_ATYPE(field->type) != PB_ATYPE_POINTER && count > field->array_size) + PB_RETURN_ERROR(stream, "array max size exceeded"); + +#ifndef PB_ENCODE_ARRAYS_UNPACKED + /* We always pack arrays if the datatype allows it. */ + if (PB_LTYPE(field->type) <= PB_LTYPE_LAST_PACKABLE) + { + if (!pb_encode_tag(stream, PB_WT_STRING, field->tag)) + return false; + + /* Determine the total size of packed array. */ + if (PB_LTYPE(field->type) == PB_LTYPE_FIXED32) + { + size = 4 * (size_t)count; + } + else if (PB_LTYPE(field->type) == PB_LTYPE_FIXED64) + { + size = 8 * (size_t)count; + } + else + { + pb_ostream_t sizestream = PB_OSTREAM_SIZING; + void *pData_orig = field->pData; + for (i = 0; i < count; i++) + { + if (!pb_enc_varint(&sizestream, field)) + PB_RETURN_ERROR(stream, PB_GET_ERROR(&sizestream)); + field->pData = (char*)field->pData + field->data_size; + } + field->pData = pData_orig; + size = sizestream.bytes_written; + } + + if (!pb_encode_varint(stream, (pb_uint64_t)size)) + return false; + + if (stream->callback == NULL) + return pb_write(stream, NULL, size); /* Just sizing.. */ + + /* Write the data */ + for (i = 0; i < count; i++) + { + if (PB_LTYPE(field->type) == PB_LTYPE_FIXED32 || PB_LTYPE(field->type) == PB_LTYPE_FIXED64) + { + if (!pb_enc_fixed(stream, field)) + return false; + } + else + { + if (!pb_enc_varint(stream, field)) + return false; + } + + field->pData = (char*)field->pData + field->data_size; + } + } + else /* Unpacked fields */ +#endif + { + for (i = 0; i < count; i++) + { + /* Normally the data is stored directly in the array entries, but + * for pointer-type string and bytes fields, the array entries are + * actually pointers themselves also. So we have to dereference once + * more to get to the actual data. */ + if (PB_ATYPE(field->type) == PB_ATYPE_POINTER && + (PB_LTYPE(field->type) == PB_LTYPE_STRING || + PB_LTYPE(field->type) == PB_LTYPE_BYTES)) + { + bool status; + void *pData_orig = field->pData; + field->pData = *(void* const*)field->pData; + + if (!field->pData) + { + /* Null pointer in array is treated as empty string / bytes */ + status = pb_encode_tag_for_field(stream, field) && + pb_encode_varint(stream, 0); + } + else + { + status = encode_basic_field(stream, field); + } + + field->pData = pData_orig; + + if (!status) + return false; + } + else + { + if (!encode_basic_field(stream, field)) + return false; + } + field->pData = (char*)field->pData + field->data_size; + } + } + + return true; +} + +/* In proto3, all fields are optional and are only encoded if their value is "non-zero". + * This function implements the check for the zero value. */ +static bool checkreturn pb_check_proto3_default_value(const pb_field_iter_t *field) +{ + pb_type_t type = field->type; + + if (PB_ATYPE(type) == PB_ATYPE_STATIC) + { + if (PB_HTYPE(type) == PB_HTYPE_REQUIRED) + { + /* Required proto2 fields inside proto3 submessage, pretty rare case */ + return false; + } + else if (PB_HTYPE(type) == PB_HTYPE_REPEATED) + { + /* Repeated fields inside proto3 submessage: present if count != 0 */ + return *(const pb_size_t*)field->pSize == 0; + } + else if (PB_HTYPE(type) == PB_HTYPE_ONEOF) + { + /* Oneof fields */ + return *(const pb_size_t*)field->pSize == 0; + } + else if (PB_HTYPE(type) == PB_HTYPE_OPTIONAL && field->pSize != NULL) + { + /* Proto2 optional fields inside proto3 message, or proto3 + * submessage fields. */ + return safe_read_bool(field->pSize) == false; + } + else if (field->descriptor->default_value) + { + /* Proto3 messages do not have default values, but proto2 messages + * can contain optional fields without has_fields (generator option 'proto3'). + * In this case they must always be encoded, to make sure that the + * non-zero default value is overwritten. + */ + return false; + } + + /* Rest is proto3 singular fields */ + if (PB_LTYPE(type) <= PB_LTYPE_LAST_PACKABLE) + { + /* Simple integer / float fields */ + pb_size_t i; + const char *p = (const char*)field->pData; + for (i = 0; i < field->data_size; i++) + { + if (p[i] != 0) + { + return false; + } + } + + return true; + } + else if (PB_LTYPE(type) == PB_LTYPE_BYTES) + { + const pb_bytes_array_t *bytes = (const pb_bytes_array_t*)field->pData; + return bytes->size == 0; + } + else if (PB_LTYPE(type) == PB_LTYPE_STRING) + { + return *(const char*)field->pData == '\0'; + } + else if (PB_LTYPE(type) == PB_LTYPE_FIXED_LENGTH_BYTES) + { + /* Fixed length bytes is only empty if its length is fixed + * as 0. Which would be pretty strange, but we can check + * it anyway. */ + return field->data_size == 0; + } + else if (PB_LTYPE_IS_SUBMSG(type)) + { + /* Check all fields in the submessage to find if any of them + * are non-zero. The comparison cannot be done byte-per-byte + * because the C struct may contain padding bytes that must + * be skipped. Note that usually proto3 submessages have + * a separate has_field that is checked earlier in this if. + */ + pb_field_iter_t iter; + if (pb_field_iter_begin(&iter, field->submsg_desc, field->pData)) + { + do + { + if (!pb_check_proto3_default_value(&iter)) + { + return false; + } + } while (pb_field_iter_next(&iter)); + } + return true; + } + } + else if (PB_ATYPE(type) == PB_ATYPE_POINTER) + { + return field->pData == NULL; + } + else if (PB_ATYPE(type) == PB_ATYPE_CALLBACK) + { + if (PB_LTYPE(type) == PB_LTYPE_EXTENSION) + { + const pb_extension_t *extension = *(const pb_extension_t* const *)field->pData; + return extension == NULL; + } + else if (field->descriptor->field_callback == pb_default_field_callback) + { + pb_callback_t *pCallback = (pb_callback_t*)field->pData; + return pCallback->funcs.encode == NULL; + } + else + { + return field->descriptor->field_callback == NULL; + } + } + + return false; /* Not typically reached, safe default for weird special cases. */ +} + +/* Encode a field with static or pointer allocation, i.e. one whose data + * is available to the encoder directly. */ +static bool checkreturn encode_basic_field(pb_ostream_t *stream, const pb_field_iter_t *field) +{ + if (!field->pData) + { + /* Missing pointer field */ + return true; + } + + if (!pb_encode_tag_for_field(stream, field)) + return false; + + switch (PB_LTYPE(field->type)) + { + case PB_LTYPE_BOOL: + return pb_enc_bool(stream, field); + + case PB_LTYPE_VARINT: + case PB_LTYPE_UVARINT: + case PB_LTYPE_SVARINT: + return pb_enc_varint(stream, field); + + case PB_LTYPE_FIXED32: + case PB_LTYPE_FIXED64: + return pb_enc_fixed(stream, field); + + case PB_LTYPE_BYTES: + return pb_enc_bytes(stream, field); + + case PB_LTYPE_STRING: + return pb_enc_string(stream, field); + + case PB_LTYPE_SUBMESSAGE: + case PB_LTYPE_SUBMSG_W_CB: + return pb_enc_submessage(stream, field); + + case PB_LTYPE_FIXED_LENGTH_BYTES: + return pb_enc_fixed_length_bytes(stream, field); + + default: + PB_RETURN_ERROR(stream, "invalid field type"); + } +} + +/* Encode a field with callback semantics. This means that a user function is + * called to provide and encode the actual data. */ +static bool checkreturn encode_callback_field(pb_ostream_t *stream, const pb_field_iter_t *field) +{ + if (field->descriptor->field_callback != NULL) + { + if (!field->descriptor->field_callback(NULL, stream, field)) + PB_RETURN_ERROR(stream, "callback error"); + } + return true; +} + +/* Encode a single field of any callback, pointer or static type. */ +static bool checkreturn encode_field(pb_ostream_t *stream, pb_field_iter_t *field) +{ + /* Check field presence */ + if (PB_HTYPE(field->type) == PB_HTYPE_ONEOF) + { + if (*(const pb_size_t*)field->pSize != field->tag) + { + /* Different type oneof field */ + return true; + } + } + else if (PB_HTYPE(field->type) == PB_HTYPE_OPTIONAL) + { + if (field->pSize) + { + if (safe_read_bool(field->pSize) == false) + { + /* Missing optional field */ + return true; + } + } + else if (PB_ATYPE(field->type) == PB_ATYPE_STATIC) + { + /* Proto3 singular field */ + if (pb_check_proto3_default_value(field)) + return true; + } + } + + if (!field->pData) + { + if (PB_HTYPE(field->type) == PB_HTYPE_REQUIRED) + PB_RETURN_ERROR(stream, "missing required field"); + + /* Pointer field set to NULL */ + return true; + } + + /* Then encode field contents */ + if (PB_ATYPE(field->type) == PB_ATYPE_CALLBACK) + { + return encode_callback_field(stream, field); + } + else if (PB_HTYPE(field->type) == PB_HTYPE_REPEATED) + { + return encode_array(stream, field); + } + else + { + return encode_basic_field(stream, field); + } +} + +/* Default handler for extension fields. Expects to have a pb_msgdesc_t + * pointer in the extension->type->arg field, pointing to a message with + * only one field in it. */ +static bool checkreturn default_extension_encoder(pb_ostream_t *stream, const pb_extension_t *extension) +{ + pb_field_iter_t iter; + + if (!pb_field_iter_begin_extension_const(&iter, extension)) + PB_RETURN_ERROR(stream, "invalid extension"); + + return encode_field(stream, &iter); +} + + +/* Walk through all the registered extensions and give them a chance + * to encode themselves. */ +static bool checkreturn encode_extension_field(pb_ostream_t *stream, const pb_field_iter_t *field) +{ + const pb_extension_t *extension = *(const pb_extension_t* const *)field->pData; + + while (extension) + { + bool status; + if (extension->type->encode) + status = extension->type->encode(stream, extension); + else + status = default_extension_encoder(stream, extension); + + if (!status) + return false; + + extension = extension->next; + } + + return true; +} + +/********************* + * Encode all fields * + *********************/ + +bool checkreturn pb_encode(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct) +{ + pb_field_iter_t iter; + if (!pb_field_iter_begin_const(&iter, fields, src_struct)) + return true; /* Empty message type */ + + do { + if (PB_LTYPE(iter.type) == PB_LTYPE_EXTENSION) + { + /* Special case for the extension field placeholder */ + if (!encode_extension_field(stream, &iter)) + return false; + } + else + { + /* Regular field */ + if (!encode_field(stream, &iter)) + return false; + } + } while (pb_field_iter_next(&iter)); + + return true; +} + +bool checkreturn pb_encode_ex(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct, unsigned int flags) +{ + if ((flags & PB_ENCODE_DELIMITED) != 0) + { + return pb_encode_submessage(stream, fields, src_struct); + } + else if ((flags & PB_ENCODE_NULLTERMINATED) != 0) + { + const pb_byte_t zero = 0; + + if (!pb_encode(stream, fields, src_struct)) + return false; + + return pb_write(stream, &zero, 1); + } + else + { + return pb_encode(stream, fields, src_struct); + } +} + +bool pb_get_encoded_size(size_t *size, const pb_msgdesc_t *fields, const void *src_struct) +{ + pb_ostream_t stream = PB_OSTREAM_SIZING; + + if (!pb_encode(&stream, fields, src_struct)) + return false; + + *size = stream.bytes_written; + return true; +} + +/******************** + * Helper functions * + ********************/ + +/* This function avoids 64-bit shifts as they are quite slow on many platforms. */ +static bool checkreturn pb_encode_varint_32(pb_ostream_t *stream, uint32_t low, uint32_t high) +{ + size_t i = 0; + pb_byte_t buffer[10]; + pb_byte_t byte = (pb_byte_t)(low & 0x7F); + low >>= 7; + + while (i < 4 && (low != 0 || high != 0)) + { + byte |= 0x80; + buffer[i++] = byte; + byte = (pb_byte_t)(low & 0x7F); + low >>= 7; + } + + if (high) + { + byte = (pb_byte_t)(byte | ((high & 0x07) << 4)); + high >>= 3; + + while (high) + { + byte |= 0x80; + buffer[i++] = byte; + byte = (pb_byte_t)(high & 0x7F); + high >>= 7; + } + } + + buffer[i++] = byte; + + return pb_write(stream, buffer, i); +} + +bool checkreturn pb_encode_varint(pb_ostream_t *stream, pb_uint64_t value) +{ + if (value <= 0x7F) + { + /* Fast path: single byte */ + pb_byte_t byte = (pb_byte_t)value; + return pb_write(stream, &byte, 1); + } + else + { +#ifdef PB_WITHOUT_64BIT + return pb_encode_varint_32(stream, value, 0); +#else + return pb_encode_varint_32(stream, (uint32_t)value, (uint32_t)(value >> 32)); +#endif + } +} + +bool checkreturn pb_encode_svarint(pb_ostream_t *stream, pb_int64_t value) +{ + pb_uint64_t zigzagged; + pb_uint64_t mask = ((pb_uint64_t)-1) >> 1; /* Satisfy clang -fsanitize=integer */ + if (value < 0) + zigzagged = ~(((pb_uint64_t)value & mask) << 1); + else + zigzagged = (pb_uint64_t)value << 1; + + return pb_encode_varint(stream, zigzagged); +} + +bool checkreturn pb_encode_fixed32(pb_ostream_t *stream, const void *value) +{ +#if defined(PB_LITTLE_ENDIAN_8BIT) && PB_LITTLE_ENDIAN_8BIT == 1 + /* Fast path if we know that we're on little endian */ + return pb_write(stream, (const pb_byte_t*)value, 4); +#else + uint32_t val = *(const uint32_t*)value; + pb_byte_t bytes[4]; + bytes[0] = (pb_byte_t)(val & 0xFF); + bytes[1] = (pb_byte_t)((val >> 8) & 0xFF); + bytes[2] = (pb_byte_t)((val >> 16) & 0xFF); + bytes[3] = (pb_byte_t)((val >> 24) & 0xFF); + return pb_write(stream, bytes, 4); +#endif +} + +#ifndef PB_WITHOUT_64BIT +bool checkreturn pb_encode_fixed64(pb_ostream_t *stream, const void *value) +{ +#if defined(PB_LITTLE_ENDIAN_8BIT) && PB_LITTLE_ENDIAN_8BIT == 1 + /* Fast path if we know that we're on little endian */ + return pb_write(stream, (const pb_byte_t*)value, 8); +#else + uint64_t val = *(const uint64_t*)value; + pb_byte_t bytes[8]; + bytes[0] = (pb_byte_t)(val & 0xFF); + bytes[1] = (pb_byte_t)((val >> 8) & 0xFF); + bytes[2] = (pb_byte_t)((val >> 16) & 0xFF); + bytes[3] = (pb_byte_t)((val >> 24) & 0xFF); + bytes[4] = (pb_byte_t)((val >> 32) & 0xFF); + bytes[5] = (pb_byte_t)((val >> 40) & 0xFF); + bytes[6] = (pb_byte_t)((val >> 48) & 0xFF); + bytes[7] = (pb_byte_t)((val >> 56) & 0xFF); + return pb_write(stream, bytes, 8); +#endif +} +#endif + +bool checkreturn pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number) +{ + pb_uint64_t tag = ((pb_uint64_t)field_number << 3) | wiretype; + return pb_encode_varint(stream, tag); +} + +bool pb_encode_tag_for_field ( pb_ostream_t* stream, const pb_field_iter_t* field ) +{ + pb_wire_type_t wiretype; + switch (PB_LTYPE(field->type)) + { + case PB_LTYPE_BOOL: + case PB_LTYPE_VARINT: + case PB_LTYPE_UVARINT: + case PB_LTYPE_SVARINT: + wiretype = PB_WT_VARINT; + break; + + case PB_LTYPE_FIXED32: + wiretype = PB_WT_32BIT; + break; + + case PB_LTYPE_FIXED64: + wiretype = PB_WT_64BIT; + break; + + case PB_LTYPE_BYTES: + case PB_LTYPE_STRING: + case PB_LTYPE_SUBMESSAGE: + case PB_LTYPE_SUBMSG_W_CB: + case PB_LTYPE_FIXED_LENGTH_BYTES: + wiretype = PB_WT_STRING; + break; + + default: + PB_RETURN_ERROR(stream, "invalid field type"); + } + + return pb_encode_tag(stream, wiretype, field->tag); +} + +bool checkreturn pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size) +{ + if (!pb_encode_varint(stream, (pb_uint64_t)size)) + return false; + + return pb_write(stream, buffer, size); +} + +bool checkreturn pb_encode_submessage(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct) +{ + /* First calculate the message size using a non-writing substream. */ + pb_ostream_t substream = PB_OSTREAM_SIZING; + size_t size; + bool status; + + if (!pb_encode(&substream, fields, src_struct)) + { +#ifndef PB_NO_ERRMSG + stream->errmsg = substream.errmsg; +#endif + return false; + } + + size = substream.bytes_written; + + if (!pb_encode_varint(stream, (pb_uint64_t)size)) + return false; + + if (stream->callback == NULL) + return pb_write(stream, NULL, size); /* Just sizing */ + + if (stream->bytes_written + size > stream->max_size) + PB_RETURN_ERROR(stream, "stream full"); + + /* Use a substream to verify that a callback doesn't write more than + * what it did the first time. */ + substream.callback = stream->callback; + substream.state = stream->state; + substream.max_size = size; + substream.bytes_written = 0; +#ifndef PB_NO_ERRMSG + substream.errmsg = NULL; +#endif + + status = pb_encode(&substream, fields, src_struct); + + stream->bytes_written += substream.bytes_written; + stream->state = substream.state; +#ifndef PB_NO_ERRMSG + stream->errmsg = substream.errmsg; +#endif + + if (substream.bytes_written != size) + PB_RETURN_ERROR(stream, "submsg size changed"); + + return status; +} + +/* Field encoders */ + +static bool checkreturn pb_enc_bool(pb_ostream_t *stream, const pb_field_iter_t *field) +{ + uint32_t value = safe_read_bool(field->pData) ? 1 : 0; + PB_UNUSED(field); + return pb_encode_varint(stream, value); +} + +static bool checkreturn pb_enc_varint(pb_ostream_t *stream, const pb_field_iter_t *field) +{ + if (PB_LTYPE(field->type) == PB_LTYPE_UVARINT) + { + /* Perform unsigned integer extension */ + pb_uint64_t value = 0; + + if (field->data_size == sizeof(uint_least8_t)) + value = *(const uint_least8_t*)field->pData; + else if (field->data_size == sizeof(uint_least16_t)) + value = *(const uint_least16_t*)field->pData; + else if (field->data_size == sizeof(uint32_t)) + value = *(const uint32_t*)field->pData; + else if (field->data_size == sizeof(pb_uint64_t)) + value = *(const pb_uint64_t*)field->pData; + else + PB_RETURN_ERROR(stream, "invalid data_size"); + + return pb_encode_varint(stream, value); + } + else + { + /* Perform signed integer extension */ + pb_int64_t value = 0; + + if (field->data_size == sizeof(int_least8_t)) + value = *(const int_least8_t*)field->pData; + else if (field->data_size == sizeof(int_least16_t)) + value = *(const int_least16_t*)field->pData; + else if (field->data_size == sizeof(int32_t)) + value = *(const int32_t*)field->pData; + else if (field->data_size == sizeof(pb_int64_t)) + value = *(const pb_int64_t*)field->pData; + else + PB_RETURN_ERROR(stream, "invalid data_size"); + + if (PB_LTYPE(field->type) == PB_LTYPE_SVARINT) + return pb_encode_svarint(stream, value); +#ifdef PB_WITHOUT_64BIT + else if (value < 0) + return pb_encode_varint_32(stream, (uint32_t)value, (uint32_t)-1); +#endif + else + return pb_encode_varint(stream, (pb_uint64_t)value); + + } +} + +static bool checkreturn pb_enc_fixed(pb_ostream_t *stream, const pb_field_iter_t *field) +{ +#ifdef PB_CONVERT_DOUBLE_FLOAT + if (field->data_size == sizeof(float) && PB_LTYPE(field->type) == PB_LTYPE_FIXED64) + { + return pb_encode_float_as_double(stream, *(float*)field->pData); + } +#endif + + if (field->data_size == sizeof(uint32_t)) + { + return pb_encode_fixed32(stream, field->pData); + } +#ifndef PB_WITHOUT_64BIT + else if (field->data_size == sizeof(uint64_t)) + { + return pb_encode_fixed64(stream, field->pData); + } +#endif + else + { + PB_RETURN_ERROR(stream, "invalid data_size"); + } +} + +static bool checkreturn pb_enc_bytes(pb_ostream_t *stream, const pb_field_iter_t *field) +{ + const pb_bytes_array_t *bytes = NULL; + + bytes = (const pb_bytes_array_t*)field->pData; + + if (bytes == NULL) + { + /* Treat null pointer as an empty bytes field */ + return pb_encode_string(stream, NULL, 0); + } + + if (PB_ATYPE(field->type) == PB_ATYPE_STATIC && + bytes->size > field->data_size - offsetof(pb_bytes_array_t, bytes)) + { + PB_RETURN_ERROR(stream, "bytes size exceeded"); + } + + return pb_encode_string(stream, bytes->bytes, (size_t)bytes->size); +} + +static bool checkreturn pb_enc_string(pb_ostream_t *stream, const pb_field_iter_t *field) +{ + size_t size = 0; + size_t max_size = (size_t)field->data_size; + const char *str = (const char*)field->pData; + + if (PB_ATYPE(field->type) == PB_ATYPE_POINTER) + { + max_size = (size_t)-1; + } + else + { + /* pb_dec_string() assumes string fields end with a null + * terminator when the type isn't PB_ATYPE_POINTER, so we + * shouldn't allow more than max-1 bytes to be written to + * allow space for the null terminator. + */ + if (max_size == 0) + PB_RETURN_ERROR(stream, "zero-length string"); + + max_size -= 1; + } + + + if (str == NULL) + { + size = 0; /* Treat null pointer as an empty string */ + } + else + { + const char *p = str; + + /* strnlen() is not always available, so just use a loop */ + while (size < max_size && *p != '\0') + { + size++; + p++; + } + + if (*p != '\0') + { + PB_RETURN_ERROR(stream, "unterminated string"); + } + } + +#ifdef PB_VALIDATE_UTF8 + if (!pb_validate_utf8(str)) + PB_RETURN_ERROR(stream, "invalid utf8"); +#endif + + return pb_encode_string(stream, (const pb_byte_t*)str, size); +} + +static bool checkreturn pb_enc_submessage(pb_ostream_t *stream, const pb_field_iter_t *field) +{ + if (field->submsg_desc == NULL) + PB_RETURN_ERROR(stream, "invalid field descriptor"); + + if (PB_LTYPE(field->type) == PB_LTYPE_SUBMSG_W_CB && field->pSize != NULL) + { + /* Message callback is stored right before pSize. */ + pb_callback_t *callback = (pb_callback_t*)field->pSize - 1; + if (callback->funcs.encode) + { + if (!callback->funcs.encode(stream, field, &callback->arg)) + return false; + } + } + + return pb_encode_submessage(stream, field->submsg_desc, field->pData); +} + +static bool checkreturn pb_enc_fixed_length_bytes(pb_ostream_t *stream, const pb_field_iter_t *field) +{ + return pb_encode_string(stream, (const pb_byte_t*)field->pData, (size_t)field->data_size); +} + +#ifdef PB_CONVERT_DOUBLE_FLOAT +bool pb_encode_float_as_double(pb_ostream_t *stream, float value) +{ + union { float f; uint32_t i; } in; + uint_least8_t sign; + int exponent; + uint64_t mantissa; + + in.f = value; + + /* Decompose input value */ + sign = (uint_least8_t)((in.i >> 31) & 1); + exponent = (int)((in.i >> 23) & 0xFF) - 127; + mantissa = in.i & 0x7FFFFF; + + if (exponent == 128) + { + /* Special value (NaN etc.) */ + exponent = 1024; + } + else if (exponent == -127) + { + if (!mantissa) + { + /* Zero */ + exponent = -1023; + } + else + { + /* Denormalized */ + mantissa <<= 1; + while (!(mantissa & 0x800000)) + { + mantissa <<= 1; + exponent--; + } + mantissa &= 0x7FFFFF; + } + } + + /* Combine fields */ + mantissa <<= 29; + mantissa |= (uint64_t)(exponent + 1023) << 52; + mantissa |= (uint64_t)sign << 63; + + return pb_encode_fixed64(stream, &mantissa); +} +#endif diff --git a/src/network/pb_encode.h b/src/network/pb_encode.h new file mode 100644 index 000000000..891368322 --- /dev/null +++ b/src/network/pb_encode.h @@ -0,0 +1,185 @@ +/* pb_encode.h: Functions to encode protocol buffers. Depends on pb_encode.c. + * The main function is pb_encode. You also need an output stream, and the + * field descriptions created by nanopb_generator.py. + */ + +#ifndef PB_ENCODE_H_INCLUDED +#define PB_ENCODE_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Structure for defining custom output streams. You will need to provide + * a callback function to write the bytes to your storage, which can be + * for example a file or a network socket. + * + * The callback must conform to these rules: + * + * 1) Return false on IO errors. This will cause encoding to abort. + * 2) You can use state to store your own data (e.g. buffer pointer). + * 3) pb_write will update bytes_written after your callback runs. + * 4) Substreams will modify max_size and bytes_written. Don't use them + * to calculate any pointers. + */ +struct pb_ostream_s +{ +#ifdef PB_BUFFER_ONLY + /* Callback pointer is not used in buffer-only configuration. + * Having an int pointer here allows binary compatibility but + * gives an error if someone tries to assign callback function. + * Also, NULL pointer marks a 'sizing stream' that does not + * write anything. + */ + const int *callback; +#else + bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); +#endif + void *state; /* Free field for use by callback implementation. */ + size_t max_size; /* Limit number of output bytes written (or use SIZE_MAX). */ + size_t bytes_written; /* Number of bytes written so far. */ + +#ifndef PB_NO_ERRMSG + const char *errmsg; +#endif +}; + +/*************************** + * Main encoding functions * + ***************************/ + +/* Encode a single protocol buffers message from C structure into a stream. + * Returns true on success, false on any failure. + * The actual struct pointed to by src_struct must match the description in fields. + * All required fields in the struct are assumed to have been filled in. + * + * Example usage: + * MyMessage msg = {}; + * uint8_t buffer[64]; + * pb_ostream_t stream; + * + * msg.field1 = 42; + * stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); + * pb_encode(&stream, MyMessage_fields, &msg); + */ +bool pb_encode(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct); + +/* Extended version of pb_encode, with several options to control the + * encoding process: + * + * PB_ENCODE_DELIMITED: Prepend the length of message as a varint. + * Corresponds to writeDelimitedTo() in Google's + * protobuf API. + * + * PB_ENCODE_NULLTERMINATED: Append a null byte to the message for termination. + * NOTE: This behaviour is not supported in most other + * protobuf implementations, so PB_ENCODE_DELIMITED + * is a better option for compatibility. + */ +#define PB_ENCODE_DELIMITED 0x02U +#define PB_ENCODE_NULLTERMINATED 0x04U +bool pb_encode_ex(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct, unsigned int flags); + +/* Defines for backwards compatibility with code written before nanopb-0.4.0 */ +#define pb_encode_delimited(s,f,d) pb_encode_ex(s,f,d, PB_ENCODE_DELIMITED) +#define pb_encode_nullterminated(s,f,d) pb_encode_ex(s,f,d, PB_ENCODE_NULLTERMINATED) + +/* Encode the message to get the size of the encoded data, but do not store + * the data. */ +bool pb_get_encoded_size(size_t *size, const pb_msgdesc_t *fields, const void *src_struct); + +/************************************** + * Functions for manipulating streams * + **************************************/ + +/* Create an output stream for writing into a memory buffer. + * The number of bytes written can be found in stream.bytes_written after + * encoding the message. + * + * Alternatively, you can use a custom stream that writes directly to e.g. + * a file or a network socket. + */ +pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize); + +/* Pseudo-stream for measuring the size of a message without actually storing + * the encoded data. + * + * Example usage: + * MyMessage msg = {}; + * pb_ostream_t stream = PB_OSTREAM_SIZING; + * pb_encode(&stream, MyMessage_fields, &msg); + * printf("Message size is %d\n", stream.bytes_written); + */ +#ifndef PB_NO_ERRMSG +#define PB_OSTREAM_SIZING {0,0,0,0,0} +#else +#define PB_OSTREAM_SIZING {0,0,0,0} +#endif + +/* Function to write into a pb_ostream_t stream. You can use this if you need + * to append or prepend some custom headers to the message. + */ +bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); + + +/************************************************ + * Helper functions for writing field callbacks * + ************************************************/ + +/* Encode field header based on type and field number defined in the field + * structure. Call this from the callback before writing out field contents. */ +bool pb_encode_tag_for_field(pb_ostream_t *stream, const pb_field_iter_t *field); + +/* Encode field header by manually specifying wire type. You need to use this + * if you want to write out packed arrays from a callback field. */ +bool pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number); + +/* Encode an integer in the varint format. + * This works for bool, enum, int32, int64, uint32 and uint64 field types. */ +#ifndef PB_WITHOUT_64BIT +bool pb_encode_varint(pb_ostream_t *stream, uint64_t value); +#else +bool pb_encode_varint(pb_ostream_t *stream, uint32_t value); +#endif + +/* Encode an integer in the zig-zagged svarint format. + * This works for sint32 and sint64. */ +#ifndef PB_WITHOUT_64BIT +bool pb_encode_svarint(pb_ostream_t *stream, int64_t value); +#else +bool pb_encode_svarint(pb_ostream_t *stream, int32_t value); +#endif + +/* Encode a string or bytes type field. For strings, pass strlen(s) as size. */ +bool pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size); + +/* Encode a fixed32, sfixed32 or float value. + * You need to pass a pointer to a 4-byte wide C variable. */ +bool pb_encode_fixed32(pb_ostream_t *stream, const void *value); + +#ifndef PB_WITHOUT_64BIT +/* Encode a fixed64, sfixed64 or double value. + * You need to pass a pointer to a 8-byte wide C variable. */ +bool pb_encode_fixed64(pb_ostream_t *stream, const void *value); +#endif + +#ifdef PB_CONVERT_DOUBLE_FLOAT +/* Encode a float value so that it appears like a double in the encoded + * message. */ +bool pb_encode_float_as_double(pb_ostream_t *stream, float value); +#endif + +/* Encode a submessage field. + * You need to pass the pb_field_t array and pointer to struct, just like + * with pb_encode(). This internally encodes the submessage twice, first to + * calculate message size and then to actually write it out. + */ +bool pb_encode_submessage(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/src/pic.c b/src/pic.c index 4b8993322..446ea1361 100644 --- a/src/pic.c +++ b/src/pic.c @@ -693,6 +693,13 @@ picint_common(uint16_t num, int level, int set, uint8_t *irq_state) uint16_t lines = level ? 0x0000 : num; pic_t *dev; + /* + Do this because some emulated cards will, for whatever reason, attempt to + raise an IRQ at init when the PIC has not yet been properly initialized. + */ + if (update_pending == NULL) + return; + /* Make sure to ignore all slave IRQ's, and in case of AT+, translate IRQ 2 to IRQ 9. */ for (uint8_t i = 0; i < 8; i++) { diff --git a/src/printer/prt_escp.c b/src/printer/prt_escp.c index 1855df380..e4f9c81ee 100644 --- a/src/printer/prt_escp.c +++ b/src/printer/prt_escp.c @@ -57,6 +57,7 @@ #include FT_FREETYPE_H #define HAVE_STDARG_H #include <86box/86box.h> +#include <86box/device.h> #include "cpu.h" #include <86box/machine.h> #include <86box/timer.h> @@ -71,15 +72,18 @@ #include <86box/png_struct.h> #include <86box/printer.h> #include <86box/prt_devs.h> +#include <86box/prt_papersizes.h> /* Default page values (for now.) */ #define COLOR_BLACK 7 << 5 -#define PAGE_WIDTH 8.5 /* standard U.S. Letter */ -#define PAGE_HEIGHT 11.0 +#define PAGE_WIDTH LETTER_PAGE_WIDTH +#define PAGE_HEIGHT LETTER_PAGE_HEIGHT +#if 0 #define PAGE_LMARGIN 0.0 #define PAGE_RMARGIN PAGE_WIDTH #define PAGE_TMARGIN 0.0 #define PAGE_BMARGIN PAGE_HEIGHT +#endif #define PAGE_DPI 360 #define PAGE_CPI 10.0 /* standard 10 cpi */ #define PAGE_LPI 6.0 /* standard 6 lpi */ @@ -2096,8 +2100,49 @@ escp_close(void *priv) free(dev); } +// clang-format off +#if 0 +static const device_config_t lpt_prt_escp_config[] = { + { + .name = "paper_size", + .description = "Paper Size", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "Letter", .value = 0 }, + { .description = "A4", .value = 1 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +}; +#endif +// clang-format on + +const device_t prt_escp_device = { + .name = "Generic ESC/P Dot-Matrix Printer", + .internal_name = "dot_matrix", + .flags = DEVICE_LPT, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, +#if 0 + .config = lpt_prt_escp_config +#else + .config = NULL +#endif +}; + const lpt_device_t lpt_prt_escp_device = { - .name = "Generic ESC/P Dot-Matrix", + .name = "Generic ESC/P Dot-Matrix Printer", .internal_name = "dot_matrix", .init = escp_init, .close = escp_close, @@ -2108,5 +2153,8 @@ const lpt_device_t lpt_prt_escp_device = { .read_status = read_status, .read_ctrl = read_ctrl, .epp_write_data = NULL, - .epp_request_read = NULL + .epp_request_read = NULL, + .priv = NULL, + .lpt = NULL, + .cfgdevice = (device_t *) &prt_escp_device }; diff --git a/src/printer/prt_ps.c b/src/printer/prt_ps.c index b8f3b20b9..c7183ec3f 100644 --- a/src/printer/prt_ps.c +++ b/src/printer/prt_ps.c @@ -26,7 +26,9 @@ #include #include #include <86box/86box.h> +#include <86box/device.h> #include <86box/timer.h> +#include <86box/device.h> #include <86box/lpt.h> #include <86box/pit.h> #include <86box/path.h> @@ -536,7 +538,9 @@ const lpt_device_t lpt_prt_ps_device = { .read_status = ps_read_status, .read_ctrl = NULL, .epp_write_data = NULL, - .epp_request_read = NULL + .epp_request_read = NULL, + .priv = NULL, + .lpt = NULL }; #ifdef USE_PCL @@ -552,6 +556,8 @@ const lpt_device_t lpt_prt_pcl_device = { .read_status = ps_read_status, .read_ctrl = NULL, .epp_write_data = NULL, - .epp_request_read = NULL + .epp_request_read = NULL, + .priv = NULL, + .lpt = NULL }; #endif diff --git a/src/printer/prt_text.c b/src/printer/prt_text.c index 3acccf830..a9808845f 100644 --- a/src/printer/prt_text.c +++ b/src/printer/prt_text.c @@ -64,12 +64,13 @@ #include <86box/printer.h> #include <86box/prt_devs.h> #include "cpu.h" +#include <86box/prt_papersizes.h> #define FULL_PAGE 1 /* set if no top/bot margins */ /* Default page values (for now.) */ -#define PAGE_WIDTH 8.5 /* standard U.S. Letter */ -#define PAGE_HEIGHT 11 +#define PAGE_WIDTH LETTER_PAGE_WIDTH +#define PAGE_HEIGHT LETTER_PAGE_HEIGHT #define PAGE_LMARGIN 0.25 /* 0.25" left and right */ #define PAGE_RMARGIN 0.25 #if FULL_PAGE @@ -513,6 +514,47 @@ prnt_close(void *priv) free(dev); } +// clang-format off +#if 0 +static const device_config_t lpt_prt_text_config[] = { + { + .name = "paper_size", + .description = "Paper Size", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "Letter", .value = 0 }, + { .description = "A4", .value = 1 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +}; +#endif +// clang-format on + +const device_t prt_text_device = { + .name = "Generic Text Printer", + .internal_name = "text_prt", + .flags = DEVICE_LPT, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, +#if 0 + .config = lpt_prt_text_config +#else + .config = NULL +#endif +}; + const lpt_device_t lpt_prt_text_device = { .name = "Generic Text Printer", .internal_name = "text_prt", @@ -525,5 +567,8 @@ const lpt_device_t lpt_prt_text_device = { .read_status = read_status, .read_ctrl = NULL, .epp_write_data = NULL, - .epp_request_read = NULL + .epp_request_read = NULL, + .priv = NULL, + .lpt = NULL, + .cfgdevice = (device_t *) &prt_text_device }; diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index c71273af8..1a004d958 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -62,6 +62,26 @@ if(APPLE AND USE_QT6) find_package(Qt6Gui/Qt6QICNSPlugin REQUIRED) endif() +if (UNIX) + find_path(HAS_VDE "libvdeplug.h" PATHS ${VDE_INCLUDE_DIR} "/usr/include /usr/local/include" "/opt/homebrew/include" ) + if(HAS_VDE) + find_library(VDE_LIB vdeplug) + if (NOT VDE_LIB) + message(WARNING "Could not find VDE. The library will not be bundled and any related features will be disabled.") + else() + add_compile_definitions(HAS_VDE) + endif() + endif() +endif() +if (UNIX AND NOT APPLE) # Support for TAP on Linux and BSD, supposedly. + find_path(HAS_TAP "linux/if_tun.h" PATHS ${TAP_INCLUDE_DIR} "/usr/include /usr/local/include" "/opt/homebrew/include" ) + if(HAS_TAP) + add_compile_definitions(HAS_TAP) + else() + message(WARNING "TAP support not available. Are you on some BSD?") + endif() +endif() + add_library(plat STATIC qt.c qt_main.cpp @@ -88,6 +108,8 @@ add_library(ui STATIC qt_openglrenderer.cpp qt_openglrenderer.hpp qt_glsl_parser.cpp + qt_about.cpp + qt_about.hpp qt_settings.cpp qt_settings.hpp @@ -187,14 +209,6 @@ add_library(ui STATIC qt_mediahistorymanager.cpp qt_mediahistorymanager.hpp - qt_updatecheck.cpp - qt_updatecheck.hpp - qt_updatecheckdialog.cpp - qt_updatecheckdialog.hpp - qt_updatecheckdialog.ui - qt_updatedetails.cpp - qt_updatedetails.hpp - qt_updatedetails.ui qt_downloader.cpp qt_downloader.hpp @@ -243,8 +257,26 @@ add_library(ui STATIC qt_iconindicators.hpp qt_iconindicators.cpp + qt_cgasettingsdialog.hpp qt_cgasettingsdialog.cpp qt_cgasettingsdialog.ui ) +if(EMU_BUILD_NUM) + target_sources(ui PRIVATE + qt_updatecheck.cpp + qt_updatecheck.hpp + qt_updatecheckdialog.cpp + qt_updatecheckdialog.hpp + qt_updatecheckdialog.ui + qt_updatedetails.cpp + qt_updatedetails.hpp + qt_updatedetails.ui + ) +endif() + +if(NETSWITCH) + target_compile_definitions(ui PRIVATE USE_NETSWITCH) +endif() + if(RTMIDI) target_compile_definitions(ui PRIVATE USE_RTMIDI) endif() @@ -284,6 +316,15 @@ if(WIN32 AND NOT SDL_JOYSTICK) target_sources(plat PRIVATE win_joystick_rawinput.c) target_link_libraries(86Box hid) else() + find_package(SDL2 REQUIRED) + include_directories(${SDL2_INCLUDE_DIRS}) + if(STATIC_BUILD AND TARGET SDL2::SDL2-static) + target_link_libraries(86Box SDL2::SDL2-static) + elseif(TARGET SDL2::SDL2) + target_link_libraries(86Box SDL2::SDL2) + else() + target_link_libraries(86Box ${SDL2_LIBRARIES}) + endif() target_sources(plat PRIVATE sdl_joystick.c) endif() @@ -333,6 +374,8 @@ if (WIN32) target_sources(ui PRIVATE qt_winrawinputfilter.hpp qt_winrawinputfilter.cpp + qt_vmmanager_windarkmodefilter.hpp + qt_vmmanager_windarkmodefilter.cpp qt_winmanagerfilter.hpp qt_winmanagerfilter.cpp ) @@ -535,7 +578,6 @@ foreach(po_file ${po_files}) string(REGEX MATCH "[A-Z]+$" PO_COUNTRY ${PO_FILE_NAME}) # Find the base Qt translation for the language and country - set(qt_translation_file_dest "qt_${PO_LANGUAGE}_${PO_COUNTRY}.qm") if (EXISTS "${QT_TRANSLATIONS_DIR}/qtbase_${PO_LANGUAGE}_${PO_COUNTRY}.qm") set(qt_translation_file "qtbase_${PO_LANGUAGE}_${PO_COUNTRY}.qm") # Fall back to just the language if country isn't found @@ -554,13 +596,9 @@ foreach(po_file ${po_files}) # Copy the translation file to the build directory if (qt_translation_file) file(COPY "${QT_TRANSLATIONS_DIR}/${qt_translation_file}" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) - if (NOT (qt_translation_file STREQUAL qt_translation_file_dest)) - # Rename the file for consistency - file(RENAME "${CMAKE_CURRENT_BINARY_DIR}/${qt_translation_file}" "${CMAKE_CURRENT_BINARY_DIR}/${qt_translation_file_dest}") - endif() # Add the file to the translations list - string(APPEND QT_TRANSLATIONS_LIST " ${qt_translation_file_dest}\n") - list(APPEND QM_FILES "${CMAKE_CURRENT_BINARY_DIR}/${qt_translation_file_dest}") + string(APPEND QT_TRANSLATIONS_LIST " ${qt_translation_file}\n") + list(APPEND QM_FILES "${CMAKE_CURRENT_BINARY_DIR}/${qt_translation_file}") endif() endif() diff --git a/src/qt/assets/addvm-logo.png b/src/qt/assets/addvm-logo.png new file mode 100644 index 000000000..926daf342 Binary files /dev/null and b/src/qt/assets/addvm-logo.png differ diff --git a/src/qt/assets/addvm-logo.svg b/src/qt/assets/addvm-logo.svg new file mode 100644 index 000000000..ab7a032ea --- /dev/null +++ b/src/qt/assets/addvm-logo.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/qt/assets/addvm-watermark.png b/src/qt/assets/addvm-watermark.png new file mode 100644 index 000000000..8d8983342 Binary files /dev/null and b/src/qt/assets/addvm-watermark.png differ diff --git a/src/qt/assets/addvm-watermark.svg b/src/qt/assets/addvm-watermark.svg new file mode 100644 index 000000000..e46171186 --- /dev/null +++ b/src/qt/assets/addvm-watermark.svg @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/qt/icons/browse.ico b/src/qt/icons/browse.ico new file mode 100644 index 000000000..8a947ae9d Binary files /dev/null and b/src/qt/icons/browse.ico differ diff --git a/src/qt/icons/cartridge_image.ico b/src/qt/icons/cartridge_image.ico new file mode 100644 index 000000000..4f01aa1a9 Binary files /dev/null and b/src/qt/icons/cartridge_image.ico differ diff --git a/src/qt/icons/cassette_image.ico b/src/qt/icons/cassette_image.ico new file mode 100644 index 000000000..fa6358050 Binary files /dev/null and b/src/qt/icons/cassette_image.ico differ diff --git a/src/qt/icons/cdrom_nomedia.ico b/src/qt/icons/cdrom_nomedia.ico new file mode 100644 index 000000000..ca3c58920 Binary files /dev/null and b/src/qt/icons/cdrom_nomedia.ico differ diff --git a/src/qt/icons/eject.ico b/src/qt/icons/eject.ico new file mode 100644 index 000000000..1bfead4d6 Binary files /dev/null and b/src/qt/icons/eject.ico differ diff --git a/src/qt/icons/export.ico b/src/qt/icons/export.ico new file mode 100644 index 000000000..5076182dc Binary files /dev/null and b/src/qt/icons/export.ico differ diff --git a/src/qt/icons/fast_forward.ico b/src/qt/icons/fast_forward.ico new file mode 100644 index 000000000..6bc5eeaff Binary files /dev/null and b/src/qt/icons/fast_forward.ico differ diff --git a/src/qt/icons/floppy_35_image.ico b/src/qt/icons/floppy_35_image.ico new file mode 100644 index 000000000..d27b4be02 Binary files /dev/null and b/src/qt/icons/floppy_35_image.ico differ diff --git a/src/qt/icons/floppy_525_image.ico b/src/qt/icons/floppy_525_image.ico new file mode 100644 index 000000000..ae3a4d8a4 Binary files /dev/null and b/src/qt/icons/floppy_525_image.ico differ diff --git a/src/qt/icons/mo_image.ico b/src/qt/icons/mo_image.ico new file mode 100644 index 000000000..c445ce385 Binary files /dev/null and b/src/qt/icons/mo_image.ico differ diff --git a/src/qt/icons/new.ico b/src/qt/icons/new.ico new file mode 100644 index 000000000..b3e0c16b0 Binary files /dev/null and b/src/qt/icons/new.ico differ diff --git a/src/qt/icons/zip.ico b/src/qt/icons/rdisk.ico similarity index 100% rename from src/qt/icons/zip.ico rename to src/qt/icons/rdisk.ico diff --git a/src/qt/icons/zip_disabled.ico b/src/qt/icons/rdisk_disabled.ico similarity index 100% rename from src/qt/icons/zip_disabled.ico rename to src/qt/icons/rdisk_disabled.ico diff --git a/src/qt/icons/rdisk_image.ico b/src/qt/icons/rdisk_image.ico new file mode 100644 index 000000000..82fd868fd Binary files /dev/null and b/src/qt/icons/rdisk_image.ico differ diff --git a/src/qt/icons/record.ico b/src/qt/icons/record.ico new file mode 100644 index 000000000..357563594 Binary files /dev/null and b/src/qt/icons/record.ico differ diff --git a/src/qt/icons/rewind.ico b/src/qt/icons/rewind.ico new file mode 100644 index 000000000..b18c1a66d Binary files /dev/null and b/src/qt/icons/rewind.ico differ diff --git a/src/qt/icons/run.ico b/src/qt/icons/run.ico index 90a7f2886..c088eb59d 100644 Binary files a/src/qt/icons/run.ico and b/src/qt/icons/run.ico differ diff --git a/src/qt/icons/superdisk.ico b/src/qt/icons/superdisk.ico new file mode 100644 index 000000000..ac5cc5fb0 Binary files /dev/null and b/src/qt/icons/superdisk.ico differ diff --git a/src/qt/icons/superdisk_disabled.ico b/src/qt/icons/superdisk_disabled.ico new file mode 100644 index 000000000..e4fa80370 Binary files /dev/null and b/src/qt/icons/superdisk_disabled.ico differ diff --git a/src/qt/icons/superdisk_image.ico b/src/qt/icons/superdisk_image.ico new file mode 100644 index 000000000..b8c854fd2 Binary files /dev/null and b/src/qt/icons/superdisk_image.ico differ diff --git a/src/qt/icons/write_protected.ico b/src/qt/icons/write_protected.ico new file mode 100644 index 000000000..f4ba2aa7a Binary files /dev/null and b/src/qt/icons/write_protected.ico differ diff --git a/src/qt/languages/86box.pot b/src/qt/languages/86box.pot index ac379b171..bcce43afd 100644 --- a/src/qt/languages/86box.pot +++ b/src/qt/languages/86box.pot @@ -27,7 +27,13 @@ msgstr "" msgid "&Pause" msgstr "" -msgid "E&xit..." +msgid "Pause" +msgstr "" + +msgid "Re&sume" +msgstr "" + +msgid "E&xit" msgstr "" msgid "&View" @@ -51,19 +57,16 @@ msgstr "" msgid "&Qt (Software)" msgstr "" -msgid "Qt (&OpenGL)" -msgstr "" - msgid "Open&GL (3.0 Core)" msgstr "" msgid "&VNC" msgstr "" -msgid "Specify dimensions..." +msgid "Specify &dimensions..." msgstr "" -msgid "F&orce 4:3 display ratio" +msgid "Force &4:3 display ratio" msgstr "" msgid "&Window scale factor" @@ -99,7 +102,7 @@ msgstr "" msgid "&8x" msgstr "" -msgid "Filter method" +msgid "Fi<er method" msgstr "" msgid "&Nearest" @@ -132,7 +135,7 @@ msgstr "" msgid "4:&3 Integer scale" msgstr "" -msgid "E&GA/(S)VGA settings" +msgid "EGA/(S)&VGA settings" msgstr "" msgid "&Inverted VGA monitor" @@ -144,9 +147,15 @@ msgstr "" msgid "RGB &Color" msgstr "" +msgid "RGB (no brown)" +msgstr "" + msgid "&RGB Grayscale" msgstr "" +msgid "Generic RGBI color monitor" +msgstr "" + msgid "&Amber monitor" msgstr "" @@ -183,6 +192,9 @@ msgstr "" msgid "&Settings..." msgstr "" +msgid "Settings..." +msgstr "" + msgid "&Update status bar icons" msgstr "" @@ -348,6 +360,9 @@ msgstr "" msgid "Configure" msgstr "" +msgid "CPU:" +msgstr "" + msgid "CPU type:" msgstr "" @@ -384,6 +399,15 @@ msgstr "" msgid "Dynamic Recompiler" msgstr "" +msgid "CPU frame size" +msgstr "" + +msgid "Larger frames (less smooth)" +msgstr "" + +msgid "Smaller frames (smoother)" +msgstr "" + msgid "Video:" msgstr "" @@ -399,12 +423,27 @@ msgstr "" msgid "XGA Graphics" msgstr "" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "" + +msgid "Keyboard:" +msgstr "" + +msgid "Keyboard" +msgstr "" + msgid "Mouse:" msgstr "" +msgid "Mouse" +msgstr "" + msgid "Joystick:" msgstr "" +msgid "Joystick" +msgstr "" + msgid "Joystick 1..." msgstr "" @@ -435,6 +474,9 @@ msgstr "" msgid "MIDI In Device:" msgstr "" +msgid "MIDI Out:" +msgstr "" + msgid "Standalone MPU-401" msgstr "" @@ -474,6 +516,9 @@ msgstr "" msgid "LPT4 Device:" msgstr "" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "" @@ -498,10 +543,10 @@ msgstr "" msgid "Parallel port 4" msgstr "" -msgid "HD Controller:" +msgid "FD Controller:" msgstr "" -msgid "FD Controller:" +msgid "CD-ROM Controller:" msgstr "" msgid "Tertiary IDE Controller" @@ -510,6 +555,9 @@ msgstr "" msgid "Quaternary IDE Controller" msgstr "" +msgid "Hard disk" +msgstr "" + msgid "SCSI" msgstr "" @@ -531,6 +579,9 @@ msgstr "" msgid "Hard disks:" msgstr "" +msgid "Firmware Version" +msgstr "" + msgid "&New..." msgstr "" @@ -588,7 +639,13 @@ msgstr "" msgid "MO drives:" msgstr "" -msgid "ZIP drives:" +msgid "MO:" +msgstr "" + +msgid "Removable disks:" +msgstr "" + +msgid "Removable disk drives:" msgstr "" msgid "ZIP 250" @@ -600,6 +657,9 @@ msgstr "" msgid "ISA Memory Expansion" msgstr "" +msgid "ISA ROM Cards" +msgstr "" + msgid "Card 1:" msgstr "" @@ -612,6 +672,15 @@ msgstr "" msgid "Card 4:" msgstr "" +msgid "Generic ISA ROM Board" +msgstr "" + +msgid "Generic Dual ISA ROM Board" +msgstr "" + +msgid "Generic Quad ISA ROM Board" +msgstr "" + msgid "ISABugger device" msgstr "" @@ -633,10 +702,16 @@ msgstr "" msgid "Speed" msgstr "" -msgid "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" msgstr "" -msgid "ZIP images" +msgid "&Removable disk %1 (%2): %3" +msgstr "" + +msgid "Removable disk images" +msgstr "" + +msgid "Image %1" msgstr "" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." @@ -696,12 +771,30 @@ msgstr "" msgid "Ports (COM & LPT)" msgstr "" +msgid "Ports" +msgstr "" + +msgid "Serial ports:" +msgstr "" + +msgid "Parallel ports:" +msgstr "" + msgid "Storage controllers" msgstr "" msgid "Hard disks" msgstr "" +msgid "Disks:" +msgstr "" + +msgid "Floppy:" +msgstr "" + +msgid "Controllers:" +msgstr "" + msgid "Floppy & CD-ROM drives" msgstr "" @@ -711,6 +804,9 @@ msgstr "" msgid "Other peripherals" msgstr "" +msgid "Other devices" +msgstr "" + msgid "Click to capture mouse" msgstr "" @@ -777,12 +873,39 @@ msgstr "" msgid "CH Flightstick Pro" msgstr "" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "" + msgid "Microsoft SideWinder Pad" msgstr "" msgid "Thrustmaster Flight Control System" msgstr "" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "" + +msgid "2-button gamepad(s)" +msgstr "" + +msgid "2-button flight yoke" +msgstr "" + +msgid "4-button gamepad" +msgstr "" + +msgid "4-button flight yoke" +msgstr "" + +msgid "2-button flight yoke with throttle" +msgstr "" + +msgid "4-button flight yoke with throttle" +msgstr "" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "" + msgid "None" msgstr "" @@ -792,6 +915,9 @@ msgstr "" msgid "Floppy %1 (%2): %3" msgstr "" +msgid "&Floppy %1 (%2): %3" +msgstr "" + msgid "Advanced sector images" msgstr "" @@ -813,6 +939,9 @@ msgstr "" msgid "MO %1 (%2): %3" msgstr "" +msgid "&MO %1 (%2): %3" +msgstr "" + msgid "MO images" msgstr "" @@ -822,6 +951,15 @@ msgstr "" msgid "Internal device" msgstr "" +msgid "&File" +msgstr "" + +msgid "&New machine..." +msgstr "" + +msgid "&Check for updates..." +msgstr "" + msgid "Exit" msgstr "" @@ -897,12 +1035,18 @@ msgstr "" msgid "Cassette: %1" msgstr "" +msgid "C&assette: %1" +msgstr "" + msgid "Cassette images" msgstr "" msgid "Cartridge %1: %2" msgstr "" +msgid "Car&tridge %1: %2" +msgstr "" + msgid "Cartridge images" msgstr "" @@ -912,6 +1056,9 @@ msgstr "" msgid "Pause execution" msgstr "" +msgid "Ctrl+Alt+Del" +msgstr "" + msgid "Press Ctrl+Alt+Del" msgstr "" @@ -921,9 +1068,279 @@ msgstr "" msgid "Hard reset" msgstr "" +msgid "Force shutdown" +msgstr "" + +msgid "Start" +msgstr "" + +msgid "Not running" +msgstr "" + +msgid "Running" +msgstr "" + +msgid "Paused" +msgstr "" + +msgid "Waiting" +msgstr "" + +msgid "Powered Off" +msgstr "" + +msgid "%n running" +msgstr "" + +msgid "%n paused" +msgstr "" + +msgid "%n waiting" +msgstr "" + +msgid "%1 total" +msgstr "" + +msgid "VMs: %1" +msgstr "" + +msgid "System Directory:" +msgstr "" + +msgid "Choose directory" +msgstr "" + +msgid "Choose configuration file" +msgstr "" + +msgid "86Box configuration files (86box.cfg)" +msgstr "" + +msgid "Configuration read failed" +msgstr "" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "" + +msgid "Use regular expressions in search box" +msgstr "" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "" + +msgid "Add new system wizard" +msgstr "" + +msgid "Introduction" +msgstr "" + +msgid "This will help you add a new system to 86Box." +msgstr "" + +msgid "New configuration" +msgstr "" + +msgid "Complete" +msgstr "" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "" + +msgid "Use existing configuration" +msgstr "" + +msgid "Type some notes here" +msgstr "" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "" + +msgid "Load configuration from file" +msgstr "" + +msgid "System name" +msgstr "" + +msgid "System name:" +msgstr "" + +msgid "System name cannot contain certain characters" +msgstr "" + +msgid "System name already exists" +msgstr "" + +msgid "Please enter a directory for the system" +msgstr "" + +msgid "Directory does not exist" +msgstr "" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "" + +msgid "System location:" +msgstr "" + +msgid "System name and location" +msgstr "" + +msgid "Enter the name of the system and choose the location" +msgstr "" + +msgid "Enter the name of the system" +msgstr "" + +msgid "Please enter a system name" +msgstr "" + +msgid "Display name (optional):" +msgstr "" + +msgid "Display name:" +msgstr "" + +msgid "Set display name" +msgstr "" + +msgid "Enter the new display name (blank to reset)" +msgstr "" + +msgid "Change &display name..." +msgstr "" + +msgid "Context Menu" +msgstr "" + +msgid "&Open folder..." +msgstr "" + +msgid "Open p&rinter tray..." +msgstr "" + +msgid "Set &icon..." +msgstr "" + +msgid "Select an icon" +msgstr "" + +msgid "C&lone..." +msgstr "" + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "" + +msgid "Directory %1 already exists" +msgstr "" + +msgid "You cannot use the following characters in the name: %1" +msgstr "" + +msgid "Clone" +msgstr "" + +msgid "Failed to create directory for cloned VM" +msgstr "" + +msgid "Failed to clone VM." +msgstr "" + +msgid "Directory in use" +msgstr "" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "" + +msgid "Create directory failed" +msgstr "" + +msgid "Unable to create the directory for the new system" +msgstr "" + +msgid "Configuration write failed" +msgstr "" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "" + +msgid "Error adding system" +msgstr "" + +msgid "Remove directory failed" +msgstr "" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "" + +msgid "Build" +msgstr "" + +msgid "Version" +msgstr "" + +msgid "An update to 86Box is available: %1 %2" +msgstr "" + +msgid "An error has occurred while checking for updates: %1" +msgstr "" + +msgid "An update to 86Box is available!" +msgstr "" + +msgid "Warning" +msgstr "" + +msgid "&Kill" +msgstr "" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "" + +msgid "&Delete" +msgstr "" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "" + +msgid "Show &config file" +msgstr "" + +msgid "No screenshot" +msgstr "" + +msgid "Search" +msgstr "" + +msgid "Searching for VMs..." +msgstr "" + +msgid "Found %1" +msgstr "" + +msgid "System" +msgstr "" + +msgid "Storage" +msgstr "" + +msgid "Disk %1: " +msgstr "" + +msgid "No disks" +msgstr "" + +msgid "Audio" +msgstr "" + +msgid "Audio:" +msgstr "" + msgid "ACPI shutdown" msgstr "" +msgid "ACP&I shutdown" +msgstr "" + msgid "Hard disk (%1)" msgstr "" @@ -1071,6 +1488,9 @@ msgstr "" msgid "CD-ROM %1 (%2): %3" msgstr "" +msgid "&CD-ROM %1 (%2): %3" +msgstr "" + msgid "160 KB" msgstr "" @@ -1209,40 +1629,37 @@ msgstr "" msgid "List of MCA devices:" msgstr "" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "" -msgid "Qt (OpenGL &ES)" +msgid "About &Qt" msgstr "" -msgid "About Qt" +msgid "&MCA devices..." msgstr "" -msgid "MCA devices..." +msgid "Show non-&primary monitors" msgstr "" -msgid "Show non-primary monitors" +msgid "Open screenshots &folder..." msgstr "" -msgid "Open screenshots folder..." +msgid "Appl&y fullscreen stretch mode when maximized" msgstr "" -msgid "Apply fullscreen stretch mode when maximized" +msgid "&Cursor/Puck" msgstr "" -msgid "Cursor/Puck" +msgid "&Pen" msgstr "" -msgid "Pen" -msgstr "" - -msgid "Host CD/DVD Drive (%1:)" +msgid "&Host CD/DVD Drive (%1:)" msgstr "" msgid "&Connected" msgstr "" -msgid "Clear image history" +msgid "Clear image &history" msgstr "" msgid "Create..." @@ -1257,9 +1674,15 @@ msgstr "" msgid "Null Driver" msgstr "" +msgid "NIC:" +msgstr "" + msgid "NIC %1 (%2) %3" msgstr "" +msgid "&NIC %1 (%2) %3" +msgstr "" + msgid "Render behavior" msgstr "" @@ -1323,6 +1746,9 @@ msgstr "" msgid "MiB" msgstr "" +msgid "GiB" +msgstr "" + msgid "Network Card #1" msgstr "" @@ -1365,7 +1791,25 @@ msgstr "" msgid "Serial port passthrough 4" msgstr "" -msgid "Renderer options..." +msgid "Renderer &options..." +msgstr "" + +msgid "PC/XT Keyboard" +msgstr "" + +msgid "AT Keyboard" +msgstr "" + +msgid "AX Keyboard" +msgstr "" + +msgid "PS/2 Keyboard" +msgstr "" + +msgid "PS/55 Keyboard" +msgstr "" + +msgid "Keys" msgstr "" msgid "Logitech/Microsoft Bus Mouse" @@ -1377,18 +1821,30 @@ msgstr "" msgid "Mouse Systems Serial Mouse" msgstr "" +msgid "Mouse Systems Bus Mouse" +msgstr "" + msgid "Microsoft Serial Mouse" msgstr "" +msgid "Microsoft Serial BallPoint" +msgstr "" + msgid "Logitech Serial Mouse" msgstr "" msgid "PS/2 Mouse" msgstr "" +msgid "PS/2 QuickPort Mouse" +msgstr "" + msgid "3M MicroTouch (Serial)" msgstr "" +msgid "Default Baud rate" +msgstr "" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "" @@ -1413,21 +1869,81 @@ msgstr "" msgid "MIDI Input Device" msgstr "" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "" + +msgid "BIOS file (ROM #1)" +msgstr "" + +msgid "BIOS file (ROM #2)" +msgstr "" + +msgid "BIOS file (ROM #3)" +msgstr "" + +msgid "BIOS file (ROM #4)" +msgstr "" + +msgid "BIOS address" +msgstr "" + +msgid "BIOS address (ROM #1)" +msgstr "" + +msgid "BIOS address (ROM #2)" +msgstr "" + +msgid "BIOS address (ROM #3)" +msgstr "" + +msgid "BIOS address (ROM #4)" msgstr "" msgid "Enable BIOS extension ROM Writes" msgstr "" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "" + +msgid "Linear framebuffer base" +msgstr "" + msgid "Address" msgstr "" msgid "IRQ" msgstr "" +msgid "Serial port IRQ" +msgstr "" + +msgid "Parallel port IRQ" +msgstr "" + msgid "BIOS Revision" msgstr "" +msgid "BIOS Version" +msgstr "" + +msgid "BIOS Language" +msgstr "" + +msgid "IBM 5161 Expansion Unit" +msgstr "" + +msgid "IBM Cassette Basic" +msgstr "" + msgid "Translate 26 -> 17" msgstr "" @@ -1443,6 +1959,18 @@ msgstr "" msgid "BIOS size" msgstr "" +msgid "BIOS size (ROM #1)" +msgstr "" + +msgid "BIOS size (ROM #2)" +msgstr "" + +msgid "BIOS size (ROM #3)" +msgstr "" + +msgid "BIOS size (ROM #4)" +msgstr "" + msgid "Map C0000-C7FFF as UMB" msgstr "" @@ -1518,6 +2046,9 @@ msgstr "" msgid "Interpolation Method" msgstr "" +msgid "Dynamic Sample Loading" +msgstr "" + msgid "Reverb Output Gain" msgstr "" @@ -1605,6 +2136,12 @@ msgstr "" msgid "Enable Game port" msgstr "" +msgid "SID Model" +msgstr "" + +msgid "SID Filter Strength" +msgstr "" + msgid "Surround module" msgstr "" @@ -1617,6 +2154,12 @@ msgstr "" msgid "SB Address" msgstr "" +msgid "Adlib Address" +msgstr "" + +msgid "Use EEPROM setting" +msgstr "" + msgid "WSS IRQ" msgstr "" @@ -1701,9 +2244,15 @@ msgstr "" msgid "Blend" msgstr "" +msgid "Font" +msgstr "" + msgid "Bilinear filtering" msgstr "" +msgid "Video chroma-keying" +msgstr "" + msgid "Dithering" msgstr "" @@ -1746,6 +2295,33 @@ msgstr "" msgid "EMS mode" msgstr "" +msgid "EMS Address" +msgstr "" + +msgid "EMS 1 Address" +msgstr "" + +msgid "EMS 2 Address" +msgstr "" + +msgid "EMS Memory Size" +msgstr "" + +msgid "EMS 1 Memory Size" +msgstr "" + +msgid "EMS 2 Memory Size" +msgstr "" + +msgid "Enable EMS" +msgstr "" + +msgid "Enable EMS 1" +msgstr "" + +msgid "Enable EMS 2" +msgstr "" + msgid "Address for > 2 MB" msgstr "" @@ -1764,10 +2340,10 @@ msgstr "" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "" -msgid "64 kB starting from F0000" +msgid "64 KB starting from F0000" msgstr "" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" msgstr "" msgid "Sine" @@ -1869,6 +2445,9 @@ msgstr "" msgid "Composite" msgstr "" +msgid "True color" +msgstr "" + msgid "Old" msgstr "" @@ -1902,6 +2481,15 @@ msgstr "" msgid "Linear interpolation" msgstr "" +msgid "Has secondary 8x8 character set" +msgstr "" + +msgid "Has Quadcolor II daughter board" +msgstr "" + +msgid "Alternate monochrome contrast" +msgstr "" + msgid "128 KB" msgstr "" @@ -1935,6 +2523,9 @@ msgstr "" msgid "Gray" msgstr "" +msgid "Grayscale" +msgstr "" + msgid "Color" msgstr "" @@ -1950,6 +2541,12 @@ msgstr "" msgid "Bochs latest" msgstr "" +msgid "Apply overscan deltas" +msgstr "" + +msgid "Mono Interlaced" +msgstr "" + msgid "Mono Non-Interlaced" msgstr "" @@ -1962,6 +2559,9 @@ msgstr "" msgid "3Dfx Voodoo Graphics" msgstr "" +msgid "3Dfx Voodoo 2" +msgstr "" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "" @@ -2031,6 +2631,9 @@ msgstr "" msgid "Named Pipe (Server)" msgstr "" +msgid "Named Pipe (Client)" +msgstr "" + msgid "Host Serial Passthrough" msgstr "" @@ -2153,3 +2756,201 @@ msgstr "" msgid "Could not load file %1" msgstr "" + +msgid "Key Bindings:" +msgstr "" + +msgid "Action" +msgstr "" + +msgid "Keybind" +msgstr "" + +msgid "Clear binding" +msgstr "" + +msgid "Bind" +msgstr "" + +msgid "Bind Key" +msgstr "" + +msgid "Enter key combo:" +msgstr "" + +msgid "Bind conflict" +msgstr "" + +msgid "This key combo is already in use." +msgstr "" + +msgid "Send Control+Alt+Del" +msgstr "" + +msgid "Send Control+Alt+Escape" +msgstr "" + +msgid "Toggle fullscreen" +msgstr "" + +msgid "Screenshot" +msgstr "" + +msgid "Release mouse pointer" +msgstr "" + +msgid "Toggle pause" +msgstr "" + +msgid "Toggle mute" +msgstr "" + +msgid "Text files" +msgstr "" + +msgid "ROM files" +msgstr "" + +msgid "SoundFont files" +msgstr "" + +msgid "Local Switch" +msgstr "" + +msgid "Remote Switch" +msgstr "" + +msgid "Switch:" +msgstr "" + +msgid "Hub Mode" +msgstr "" + +msgid "Hostname:" +msgstr "" + +msgid "ISA RAM:" +msgstr "" + +msgid "ISA ROM:" +msgstr "" + +msgid "&Wipe NVRAM" +msgstr "" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "" + +msgid "Success" +msgstr "" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "" + +msgid "%1 VM Manager" +msgstr "" + +msgid "%n disk(s)" +msgstr "" + +msgid "Unknown Status" +msgstr "" + +msgid "No Machines Found!" +msgstr "" + +msgid "Check for updates on startup" +msgstr "" + +msgid "Unable to determine release information" +msgstr "" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "" + +msgid "Update check complete" +msgstr "" + +msgid "stable" +msgstr "" + +msgid "beta" +msgstr "" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "" + +msgid "version" +msgstr "" + +msgid "build" +msgstr "" + +msgid "You are currently running version %1." +msgstr "" + +msgid "Version %1 is now available." +msgstr "" + +msgid "You are currently running build %1." +msgstr "" + +msgid "Build %1 is now available." +msgstr "" + +msgid "Would you like to visit the download page?" +msgstr "" + +msgid "Visit download page" +msgstr "" + +msgid "Update check" +msgstr "" + +msgid "Checking for updates..." +msgstr "" + +msgid "86Box Update" +msgstr "" + +msgid "Release notes:" +msgstr "" + +msgid "%1 Hz" +msgstr "" + +msgid "Virtual machine crash" +msgstr "" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "" + +msgid "The system will not be added." +msgstr "" + +msgid "&Update mouse every CPU frame" +msgstr "" + +msgid "Hue" +msgstr "" + +msgid "Saturation" +msgstr "" + +msgid "Contrast" +msgstr "" + +msgid "Brightness" +msgstr "" + +msgid "Sharpness" +msgstr "" + +msgid "&CGA composite settings..." +msgstr "" + +msgid "CGA composite settings" +msgstr "" diff --git a/src/qt/languages/ca-ES.po b/src/qt/languages/ca-ES.po deleted file mode 100644 index c9fc9bd82..000000000 --- a/src/qt/languages/ca-ES.po +++ /dev/null @@ -1,2149 +0,0 @@ -msgid "" -msgstr "" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Language: ca_ES\n" -"X-Source-Language: en_US\n" - -msgid "&Action" -msgstr "&Acció" - -msgid "&Keyboard requires capture" -msgstr "&Teclat requereix captura" - -msgid "&Right CTRL is left ALT" -msgstr "CTRL &dret és ALT esquerre" - -msgid "&Hard Reset..." -msgstr "&Reinicialització completa ..." - -msgid "&Ctrl+Alt+Del" -msgstr "&Ctrl+Alt+Del" - -msgid "Ctrl+Alt+&Esc" -msgstr "Ctrl+Alt+&Esc" - -msgid "&Pause" -msgstr "&Pausa" - -msgid "E&xit..." -msgstr "&Sortir ..." - -msgid "&View" -msgstr "&Vista" - -msgid "&Hide status bar" -msgstr "&Amagar barra d'estat" - -msgid "Hide &toolbar" -msgstr "Amagar &barra d'eines" - -msgid "&Resizeable window" -msgstr "&Finestra redimensionable" - -msgid "R&emember size && position" -msgstr "&Recordar grandària i posició" - -msgid "Re&nderer" -msgstr "Re&nderitzador" - -msgid "&Qt (Software)" -msgstr "&Qt (Software)" - -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - -msgid "Open&GL (3.0 Core)" -msgstr "Open&GL (3.0 Core)" - -msgid "&VNC" -msgstr "&VNC" - -msgid "Specify dimensions..." -msgstr "E&specificar dimensions ..." - -msgid "F&orce 4:3 display ratio" -msgstr "F&orçar ràtio 4:3" - -msgid "&Window scale factor" -msgstr "&Factor d'escalat de finestra" - -msgid "&0.5x" -msgstr "&0.5x" - -msgid "&1x" -msgstr "&1x" - -msgid "1.&5x" -msgstr "1.&5x" - -msgid "&2x" -msgstr "&2x" - -msgid "&3x" -msgstr "&3x" - -msgid "&4x" -msgstr "&4x" - -msgid "&5x" -msgstr "&5x" - -msgid "&6x" -msgstr "&6x" - -msgid "&7x" -msgstr "&7x" - -msgid "&8x" -msgstr "&8x" - -msgid "Filter method" -msgstr "&Mètode de filtrat" - -msgid "&Nearest" -msgstr "&Més proper" - -msgid "&Linear" -msgstr "&Lineal" - -msgid "Hi&DPI scaling" -msgstr "&Escalat alta densitat" - -msgid "&Fullscreen" -msgstr "&Pantalla completa" - -msgid "Fullscreen &stretch mode" -msgstr "Escalat pantalla completa" - -msgid "&Full screen stretch" -msgstr "&Estirar" - -msgid "&4:3" -msgstr "&4:3" - -msgid "&Square pixels (Keep ratio)" -msgstr "&Píxels quadrats (Mant. aspecte)" - -msgid "&Integer scale" -msgstr "&Escala de valor enter" - -msgid "4:&3 Integer scale" -msgstr "Escala de valor enter 4:&3" - -msgid "E&GA/(S)VGA settings" -msgstr "&Ajustaments EGA/(S)VGA" - -msgid "&Inverted VGA monitor" -msgstr "&Monitor VGA invertit" - -msgid "VGA screen &type" -msgstr "&Tipus de pantalla VGA" - -msgid "RGB &Color" -msgstr "RGB &Color" - -msgid "&RGB Grayscale" -msgstr "RGB &Grisos" - -msgid "&Amber monitor" -msgstr "Monitor & Ambre" - -msgid "&Green monitor" -msgstr "Monitor &Verd" - -msgid "&White monitor" -msgstr "Monitor &Blanc" - -msgid "Grayscale &conversion type" -msgstr "&Conversió a grisos" - -msgid "BT&601 (NTSC/PAL)" -msgstr "BT&601 (NTSC/PAL)" - -msgid "BT&709 (HDTV)" -msgstr "BT&709 (HDTV)" - -msgid "&Average" -msgstr "&Mitjana" - -msgid "CGA/PCjr/Tandy/E&GA/(S)VGA overscan" -msgstr "&Overscan CGA/PCjr/Tandy/EGA/(S)VGA" - -msgid "Change contrast for &monochrome display" -msgstr "Canviar contrast per a pantalla &monocroma" - -msgid "&Media" -msgstr "&Mitjans" - -msgid "&Tools" -msgstr "&Eines" - -msgid "&Settings..." -msgstr "&Ajustaments ..." - -msgid "&Update status bar icons" -msgstr "&Actualitzar icones a la barra d'estat" - -msgid "Take s&creenshot" -msgstr "Prendre c&aptura" - -msgid "S&ound" -msgstr "S&o" - -msgid "&Preferences..." -msgstr "&Preferències ..." - -msgid "Enable &Discord integration" -msgstr "Activar la integració amb el &Discord" - -msgid "Sound &gain..." -msgstr "&Guany de so ..." - -msgid "Begin trace" -msgstr "Començar traça" - -msgid "End trace" -msgstr "Acabar traça" - -msgid "&Help" -msgstr "&Ajuda" - -msgid "&Documentation..." -msgstr "&Documentació ..." - -msgid "&About 86Box..." -msgstr "&Quant a 86Box ..." - -msgid "&New image..." -msgstr "&Nova imatge ..." - -msgid "&Existing image..." -msgstr "Imatge &Existent ..." - -msgid "Existing image (&Write-protected)..." -msgstr "Imatge Existent (&Només-lectura) ..." - -msgid "&Record" -msgstr "&Gravar" - -msgid "&Play" -msgstr "&Reproduir" - -msgid "&Rewind to the beginning" -msgstr "&Rebobinar a l'inici" - -msgid "&Fast forward to the end" -msgstr "&Avanç ràpid al final" - -msgid "E&ject" -msgstr "E&xtreure" - -msgid "&Image..." -msgstr "&Imatge ..." - -msgid "E&xport to 86F..." -msgstr "E&xportar a 86F ..." - -msgid "&Mute" -msgstr "&Silenciar" - -msgid "E&mpty" -msgstr "E&xtreure disc" - -msgid "Reload previous image" -msgstr "Recarregar imatge anterior" - -msgid "&Folder..." -msgstr "&Carpeta ..." - -msgid "Target &framerate" -msgstr "objectiu de &taxa de refresc" - -msgid "&Sync with video" -msgstr "&Sincronitzar amb vídeo" - -msgid "&25 fps" -msgstr "&25 fotogrames/s" - -msgid "&30 fps" -msgstr "&30 fotogrames/s" - -msgid "&50 fps" -msgstr "&50 fotogrames/s" - -msgid "&60 fps" -msgstr "&60 fotogrames/s" - -msgid "&75 fps" -msgstr "&75 fotogrames/s" - -msgid "&VSync" -msgstr "&VSync" - -msgid "&Select shader..." -msgstr "&Seleccionar shader ..." - -msgid "&Remove shader" -msgstr "S&upressió de shader" - -msgid "Preferences" -msgstr "Preferències" - -msgid "Sound Gain" -msgstr "Guany de So" - -msgid "New Image" -msgstr "Nova Imatge" - -msgid "Settings" -msgstr "Ajustaments" - -msgid "Specify Main Window Dimensions" -msgstr "Especificar Dimensions de la Finestra Principal" - -msgid "OK" -msgstr "D'acord" - -msgid "Cancel" -msgstr "Anuŀlació" - -msgid "&Default" -msgstr "&Per defecte" - -msgid "Language:" -msgstr "Idioma:" - -msgid "Gain" -msgstr "Guany" - -msgid "File name:" -msgstr "Nom del fitxer:" - -msgid "Disk size:" -msgstr "Grandària de disc:" - -msgid "RPM mode:" -msgstr "Mode RPM:" - -msgid "Progress:" -msgstr "Progrés:" - -msgid "Width:" -msgstr "Amplada:" - -msgid "Height:" -msgstr "Alçada:" - -msgid "Lock to this size" -msgstr "Bloquejar aquesta grandària" - -msgid "Machine type:" -msgstr "Tipus de màquina:" - -msgid "Machine:" -msgstr "Màquina:" - -msgid "Configure" -msgstr "Configurar" - -msgid "CPU type:" -msgstr "Tipus de CPU:" - -msgid "Speed:" -msgstr "Velocitat:" - -msgid "Frequency:" -msgstr "Freqüència:" - -msgid "FPU:" -msgstr "FPU:" - -msgid "Wait states:" -msgstr "Estats en espera:" - -msgid "MB" -msgstr "MB" - -msgid "Memory:" -msgstr "Memòria:" - -msgid "Time synchronization" -msgstr "Sincronització horària" - -msgid "Disabled" -msgstr "Deshabilitat" - -msgid "Enabled (local time)" -msgstr "Activat (hora local)" - -msgid "Enabled (UTC)" -msgstr "Activat (UTC)" - -msgid "Dynamic Recompiler" -msgstr "Recopilador Dinàmic" - -msgid "Video:" -msgstr "Vídeo:" - -msgid "Video #2:" -msgstr "Vídeo 2:" - -msgid "Voodoo 1 or 2 Graphics" -msgstr "Gràfics Voodoo 1 o 2" - -msgid "IBM 8514/A Graphics" -msgstr "Gràfics IBM 8514/A" - -msgid "XGA Graphics" -msgstr "Gràfics XGA" - -msgid "Mouse:" -msgstr "Ratolí:" - -msgid "Joystick:" -msgstr "Joystick:" - -msgid "Joystick 1..." -msgstr "Joystick 1 ..." - -msgid "Joystick 2..." -msgstr "Joystick 2 ..." - -msgid "Joystick 3..." -msgstr "Joystick 3 ..." - -msgid "Joystick 4..." -msgstr "Joystick 4 ..." - -msgid "Sound card #1:" -msgstr "Targeta de so 1:" - -msgid "Sound card #2:" -msgstr "Targeta de so 2:" - -msgid "Sound card #3:" -msgstr "Targeta de so 3:" - -msgid "Sound card #4:" -msgstr "Targeta de so 4:" - -msgid "MIDI Out Device:" -msgstr "Dispositiu de sortida MIDI:" - -msgid "MIDI In Device:" -msgstr "Dispositiu d'entrada MIDI:" - -msgid "Standalone MPU-401" -msgstr "MPU-401 autònom" - -msgid "Use FLOAT32 sound" -msgstr "Usar so FLOAT32" - -msgid "FM synth driver" -msgstr "Manejador de sintet. FM" - -msgid "Nuked (more accurate)" -msgstr "Nuked (més acurat)" - -msgid "YMFM (faster)" -msgstr "YMFM (més ràpid)" - -msgid "COM1 Device:" -msgstr "Dispositiu COM1:" - -msgid "COM2 Device:" -msgstr "Dispositiu COM2:" - -msgid "COM3 Device:" -msgstr "Dispositiu COM3:" - -msgid "COM4 Device:" -msgstr "Dispositiu COM4:" - -msgid "LPT1 Device:" -msgstr "Dispositiu LPT1:" - -msgid "LPT2 Device:" -msgstr "Dispositiu LPT2:" - -msgid "LPT3 Device:" -msgstr "Dispositiu LPT3:" - -msgid "LPT4 Device:" -msgstr "Dispositiu LPT4:" - -msgid "Serial port 1" -msgstr "Port sèrie 1" - -msgid "Serial port 2" -msgstr "Port sèrie 2" - -msgid "Serial port 3" -msgstr "Port sèrie 3" - -msgid "Serial port 4" -msgstr "Port sèrie 4" - -msgid "Parallel port 1" -msgstr "Port paral·lel 1" - -msgid "Parallel port 2" -msgstr "Port paral·lel 2" - -msgid "Parallel port 3" -msgstr "Port paral·lel 3" - -msgid "Parallel port 4" -msgstr "Port paral·lel 4" - -msgid "HD Controller:" -msgstr "Controlador de HD:" - -msgid "FD Controller:" -msgstr "Controlador de FD:" - -msgid "Tertiary IDE Controller" -msgstr "Controlador IDE terciari" - -msgid "Quaternary IDE Controller" -msgstr "Controlador IDE quaternari" - -msgid "SCSI" -msgstr "SCSI" - -msgid "Controller 1:" -msgstr "Controlador 1:" - -msgid "Controller 2:" -msgstr "Controlador 2:" - -msgid "Controller 3:" -msgstr "Controlador 3:" - -msgid "Controller 4:" -msgstr "Controlador 4:" - -msgid "Cassette" -msgstr "Casset" - -msgid "Hard disks:" -msgstr "Discs durs:" - -msgid "&New..." -msgstr "&Nou ..." - -msgid "&Existing..." -msgstr "&Existent ..." - -msgid "&Remove" -msgstr "S&upressió" - -msgid "Bus:" -msgstr "Bus:" - -msgid "Channel:" -msgstr "Canal:" - -msgid "ID:" -msgstr "ID:" - -msgid "&Specify..." -msgstr "E&specificar ..." - -msgid "Sectors:" -msgstr "Sectors:" - -msgid "Heads:" -msgstr "Caps:" - -msgid "Cylinders:" -msgstr "Cilindres:" - -msgid "Size (MB):" -msgstr "Grandària (MB):" - -msgid "Type:" -msgstr "Tipus:" - -msgid "Image Format:" -msgstr "Format d'imatge:" - -msgid "Block Size:" -msgstr "Grandària del bloc:" - -msgid "Floppy drives:" -msgstr "Unitats de disquet:" - -msgid "Turbo timings" -msgstr "Temps turbo" - -msgid "Check BPB" -msgstr "Comprovar BPB" - -msgid "CD-ROM drives:" -msgstr "Unitats de CD-ROM:" - -msgid "MO drives:" -msgstr "Unitats MO:" - -msgid "ZIP drives:" -msgstr "Unitats ZIP:" - -msgid "ZIP 250" -msgstr "ZIP 250" - -msgid "ISA RTC:" -msgstr "ISA RTC:" - -msgid "ISA Memory Expansion" -msgstr "Expansió de memòria ISA" - -msgid "Card 1:" -msgstr "Targeta 1:" - -msgid "Card 2:" -msgstr "Targeta 2:" - -msgid "Card 3:" -msgstr "Targeta 3:" - -msgid "Card 4:" -msgstr "Targeta 4:" - -msgid "ISABugger device" -msgstr "Dispositiu ISABugger" - -msgid "POST card" -msgstr "Targeta POST" - -msgid "86Box" -msgstr "86Box" - -msgid "Error" -msgstr "Error" - -msgid "Fatal error" -msgstr "Error fatal" - -msgid " - PAUSED" -msgstr " - EN PAUSA" - -msgid "Speed" -msgstr "Velocitat" - -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" - -msgid "ZIP images" -msgstr "Imatges ZIP" - -msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." -msgstr "86Box no ha pogut trobar cap imatge ROM utilitzable.\n\nSi us plau, descarregueu un conjunt de ROM i extreu-lo al directori \"roms\"." - -msgid "(empty)" -msgstr "(buit)" - -msgid "All files" -msgstr "Tots els fitxers" - -msgid "Turbo" -msgstr "Turbo" - -msgid "On" -msgstr "On" - -msgid "Off" -msgstr "Off" - -msgid "All images" -msgstr "Totes les imatges" - -msgid "Basic sector images" -msgstr "Imatges sectorials bàsiques" - -msgid "Surface images" -msgstr "Imatges superficials" - -msgid "Machine \"%hs\" is not available due to missing ROMs in the roms/machines directory. Switching to an available machine." -msgstr "La màquina \"%hs\" no està disponible perquè falten ROM al directori roms/machines. Canvi a una màquina disponible." - -msgid "Video card \"%hs\" is not available due to missing ROMs in the roms/video directory. Switching to an available video card." -msgstr "La targeta de vídeo \"%hs\" no està disponible perquè falten ROM al directori roms/video. Canvi a una targeta de vídeo disponible." - -msgid "Video card #2 \"%hs\" is not available due to missing ROMs in the roms/video directory. Disabling the second video card." -msgstr "La targeta de vídeo 2 \"%hs\" no està disponible perquè falten ROM al directori roms/video. Deshabilitant la segona targeta de vídeo." - -msgid "Device \"%hs\" is not available due to missing ROMs. Ignoring the device." -msgstr "El dispositiu \"%hs\" no està disponible perquè falten ROM. Ignorant el dispositiu." - -msgid "Machine" -msgstr "Màquina" - -msgid "Display" -msgstr "Vídeo" - -msgid "Input devices" -msgstr "Dispositius d'entrada" - -msgid "Sound" -msgstr "So" - -msgid "Network" -msgstr "Xarxa" - -msgid "Ports (COM & LPT)" -msgstr "Ports (COM i LPT)" - -msgid "Storage controllers" -msgstr "Controladors d'emmagatzematge" - -msgid "Hard disks" -msgstr "Discs durs" - -msgid "Floppy & CD-ROM drives" -msgstr "Unitats de disquet i CD-ROM" - -msgid "Other removable devices" -msgstr "Altres dispositius extraïbles" - -msgid "Other peripherals" -msgstr "Altres perifèrics" - -msgid "Click to capture mouse" -msgstr "Feu clic per capturar el ratolí" - -msgid "Press %1 to release mouse" -msgstr "Premeu %1 per alliberar el ratolí" - -msgid "Press %1 or middle button to release mouse" -msgstr "Premeu %1 o el botó central per alliberar el ratolí" - -msgid "Bus" -msgstr "Bus" - -msgid "File" -msgstr "Fitxer" - -msgid "C" -msgstr "C" - -msgid "H" -msgstr "H" - -msgid "S" -msgstr "S" - -msgid "KB" -msgstr "KB" - -msgid "Default" -msgstr "Per defecte" - -msgid "%1 Wait state(s)" -msgstr "%1 estado(s) de Espera" - -msgid "Type" -msgstr "Tipus" - -msgid "No PCap devices found" -msgstr "No s'han trobat dispositius PCap" - -msgid "Invalid PCap device" -msgstr "El dispositiu PCap no és vàlid" - -msgid "2-axis, 2-button joystick(s)" -msgstr "Joystick(s) de 2 eixes, 2 botons" - -msgid "2-axis, 4-button joystick" -msgstr "Joystick de 2 eixes, 4 botons" - -msgid "2-axis, 6-button joystick" -msgstr "Joystick de 2 eixes, 6 botons" - -msgid "2-axis, 8-button joystick" -msgstr "Joystick de 2 eixes, 8 botons" - -msgid "3-axis, 2-button joystick" -msgstr "Joystick de 3 eixes, 2 botons" - -msgid "3-axis, 4-button joystick" -msgstr "Joystick de 3 eixes, 4 botons" - -msgid "4-axis, 4-button joystick" -msgstr "Joystick de 4 eixes, 4 botons" - -msgid "CH Flightstick Pro" -msgstr "CH Flightstick Pro" - -msgid "Microsoft SideWinder Pad" -msgstr "Microsoft SideWinder Pad" - -msgid "Thrustmaster Flight Control System" -msgstr "Thrustmaster Flight Control System" - -msgid "None" -msgstr "Cap" - -msgid "%1 MB (CHS: %2, %3, %4)" -msgstr "%1 MB (CHS: %2, %3, %4)" - -msgid "Floppy %1 (%2): %3" -msgstr "Disquet %1 (%2): %3" - -msgid "Advanced sector images" -msgstr "Imatges avançates del sector" - -msgid "Flux images" -msgstr "Imatges de flux" - -msgid "Are you sure you want to hard reset the emulated machine?" -msgstr "Esteu segur que voleu restablir la màquina emulada?" - -msgid "Are you sure you want to exit 86Box?" -msgstr "Esteu segur que voleu sortir de 86Box?" - -msgid "Unable to initialize Ghostscript" -msgstr "No es pot inicialitzar Ghostscript" - -msgid "Unable to initialize GhostPCL" -msgstr "No es pot inicialitzar GhostPCL" - -msgid "MO %1 (%2): %3" -msgstr "MO %1 (%2): %3" - -msgid "MO images" -msgstr "Imatges MO" - -msgid "Welcome to 86Box!" -msgstr "Benvingut a 86Box!" - -msgid "Internal device" -msgstr "Dispositiu intern" - -msgid "Exit" -msgstr "Sortir" - -msgid "No ROMs found" -msgstr "No s'ha trobat cap ROM" - -msgid "Do you want to save the settings?" -msgstr "Voleu desar les configuracions?" - -msgid "This will hard reset the emulated machine." -msgstr "Es farà una reinicialització completa de la màquina emulada." - -msgid "Save" -msgstr "Desar" - -msgid "About 86Box" -msgstr "Quant a 86Box" - -msgid "86Box v" -msgstr "86Box v" - -msgid "An emulator of old computers\n\nAuthors: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n\nWith previous core contributions from Sarah Walker, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information." -msgstr "Un emulador d'ordinadors antics\n\nAutors: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne i altres.\n\nAmb contribucions bàsiques anteriors de Sarah Walker, Leilei, JohnElliott, greatpsycho i altres.\n\nAlliberat sota la GNU General Public License versió 2 o posterior. Veure LLICENSE per a més informació." - -msgid "Hardware not available" -msgstr "Maquinari no disponible" - -msgid "Make sure %1 is installed and that you are on a %1-compatible network connection." -msgstr "Assegureu-vos que el %1 està instal·lat i que està en una connexió de xarxa compatible amb %1." - -msgid "Invalid configuration" -msgstr "Configuració invàlida" - -msgid "%1 is required for automatic conversion of PostScript files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as PostScript (.ps) files." -msgstr "%1 és necessària per a la conversió automàtica de fitxers PostScript a PDF.\n\nQualsevol document enviat a la impressora genèrica PostScript es desarà com a fitxer PostScript (.ps)." - -msgid "%1 is required for automatic conversion of PCL files to PDF.\n\nAny documents sent to the generic PCL printer will be saved as Printer Command Language (.pcl) files." -msgstr "%1 és necessària per a la conversió automàtica de fitxers PCL a PDF.\n\nQualsevol document enviat a la impressora genèrica PCL es desarà com a fitxer Printer Command Language (.pcl)." - -msgid "Don't show this message again" -msgstr "No mostreu més aquest missatge" - -msgid "Don't exit" -msgstr "No sortir" - -msgid "Reset" -msgstr "Resetejar" - -msgid "Don't reset" -msgstr "No resetejar" - -msgid "CD-ROM images" -msgstr "Imatges de CD-ROM" - -msgid "%1 Device Configuration" -msgstr "Configuració de Dispositiu %1" - -msgid "Monitor in sleep mode" -msgstr "Monitor en mode estalvi" - -msgid "GLSL shaders" -msgstr "Shaders GLSL" - -msgid "You are loading an unsupported configuration" -msgstr "S'està carregant una configuració no suportada" - -msgid "CPU type filtering based on selected machine is disabled for this emulated machine.\n\nThis makes it possible to choose a CPU that is otherwise incompatible with the selected machine. However, you may run into incompatibilities with the machine BIOS or other software.\n\nEnabling this setting is not officially supported and any bug reports filed may be closed as invalid." -msgstr "El Filtratge de tipus de CPU basat en màquina seleccionada està deshabilitat per a aquesta màquina.\n\nAixò fa possible seleccionar una CPU que sigui incompatible amb aquesta màquina. Per això, poden aparèixer incompatibilitat amb la BIOS de la màquina o un altre programari.\n\nActivar aquest ajustament no està oficialment suportat i qualsevol informe de fallada pot ser tancat com a invàlid." - -msgid "Continue" -msgstr "Continuar" - -msgid "Cassette: %1" -msgstr "Casset: %1" - -msgid "Cassette images" -msgstr "Imatges de casset" - -msgid "Cartridge %1: %2" -msgstr "Cartutx %1: %2" - -msgid "Cartridge images" -msgstr "Imatges de cartutx" - -msgid "Resume execution" -msgstr "Reprendre l'execució" - -msgid "Pause execution" -msgstr "Pausar l'execució" - -msgid "Press Ctrl+Alt+Del" -msgstr "Pulsar Ctrl+Alt+Supr" - -msgid "Press Ctrl+Alt+Esc" -msgstr "Pulsar Ctrl+Alt+Esc" - -msgid "Hard reset" -msgstr "Reinicialització completa" - -msgid "ACPI shutdown" -msgstr "Apagada ACPI" - -msgid "Hard disk (%1)" -msgstr "Disc dur (%1)" - -msgid "MFM/RLL or ESDI CD-ROM drives never existed" -msgstr "Les unitats de CD-ROM MFM/RLL o ESDI no van existir mai" - -msgid "Custom..." -msgstr "Personalitzat ..." - -msgid "Custom (large)..." -msgstr "Personalitzat (gran) ..." - -msgid "Add New Hard Disk" -msgstr "Afegir disc dur nou" - -msgid "Add Existing Hard Disk" -msgstr "Afegir disc dur existent" - -msgid "HDI disk images cannot be larger than 4 GB." -msgstr "Les imatges de disc HDI no poden superar els 4 GB." - -msgid "Disk images cannot be larger than 127 GB." -msgstr "Les imatges del disc no poden superar els 127 GB." - -msgid "Hard disk images" -msgstr "Imatges del disc dur" - -msgid "Unable to read file" -msgstr "No has estat possible llegir el fitxer" - -msgid "Unable to write file" -msgstr "No has estat possible escriure el fitxer" - -msgid "HDI or HDX images with a sector size other than 512 are not supported." -msgstr "Les imatges HDI o HDX amb una grandària de sector diferent de 512 no s'admeten." - -msgid "Disk image file already exists" -msgstr "El fitxer d'imatge de disc ja existeix" - -msgid "Please specify a valid file name." -msgstr "Especifiqueu un nom de fitxer vàlid." - -msgid "Disk image created" -msgstr "La imatge de disc ha estat creada" - -msgid "Make sure the file exists and is readable." -msgstr "Assegureu-vos que el fitxer existeix i és llegible." - -msgid "Make sure the file is being saved to a writable directory." -msgstr "Assegureu-vos que el fitxer s'està desant en un directori que es pugui escriure." - -msgid "Disk image too large" -msgstr "La imatge del disc és massa gran" - -msgid "Remember to partition and format the newly-created drive." -msgstr "Recordeu particionar i formatar la unitat de nova creació." - -msgid "The selected file will be overwritten. Are you sure you want to use it?" -msgstr "El fitxer seleccionat se sobreescriurà. Esteu segur que voleu utilitzar-lo?" - -msgid "Unsupported disk image" -msgstr "Imatge de disc no compatible" - -msgid "Overwrite" -msgstr "Sobreescriure" - -msgid "Don't overwrite" -msgstr "No sobreescriure" - -msgid "Raw image" -msgstr "Imatge crua" - -msgid "HDI image" -msgstr "Imatge HDI" - -msgid "HDX image" -msgstr "Imatge HDX" - -msgid "Fixed-size VHD" -msgstr "VHD de grandària fixa" - -msgid "Dynamic-size VHD" -msgstr "VHD de grandària dinàmica" - -msgid "Differencing VHD" -msgstr "VHD diferencial" - -msgid "(N/A)" -msgstr "(Cap)" - -msgid "Raw image (.img)" -msgstr "Imatge crua (.img)" - -msgid "HDI image (.hdi)" -msgstr "Imatge HDI (.hdi)" - -msgid "HDX image (.hdx)" -msgstr "Imatge HDX (.hdx)" - -msgid "Fixed-size VHD (.vhd)" -msgstr "VHD de grandària fixa (.vhd)" - -msgid "Dynamic-size VHD (.vhd)" -msgstr "VHD de grandària dinàmica (.vhd)" - -msgid "Differencing VHD (.vhd)" -msgstr "VHD diferencial (.vhd)" - -msgid "Large blocks (2 MB)" -msgstr "Blocs grans (2 MB)" - -msgid "Small blocks (512 KB)" -msgstr "Blocs petits (512 KB)" - -msgid "VHD files" -msgstr "Fitxers VHD" - -msgid "Select the parent VHD" -msgstr "Seleccioneu el VHD pare" - -msgid "This could mean that the parent image was modified after the differencing image was created.\n\nIt can also happen if the image files were moved or copied, or by a bug in the program that created this disk.\n\nDo you want to fix the timestamps?" -msgstr "Això pot ser perquè la imatge pare es va modificar després que la imatge diferencial es creés.\n\nTambé pot passar si les imatges van ser mogudes o copiades, o per una fallada al programa que va crear aquest disc.\n\n¿ Voleu corregir els registres de temps?" - -msgid "Parent and child disk timestamps do not match" -msgstr "Les marques de temps del pare i el fill no coincideixen" - -msgid "Could not fix VHD timestamp." -msgstr "No has estat possible corregir la marca de temps del VHD." - -msgid "MFM/RLL" -msgstr "MFM/RLL" - -msgid "XTA" -msgstr "XTA" - -msgid "ESDI" -msgstr "ESDI" - -msgid "IDE" -msgstr "IDE" - -msgid "ATAPI" -msgstr "ATAPI" - -msgid "CD-ROM %1 (%2): %3" -msgstr "CD-ROM %1 (%2): %3" - -msgid "160 KB" -msgstr "160 KB" - -msgid "180 KB" -msgstr "180 KB" - -msgid "320 KB" -msgstr "320 KB" - -msgid "360 KB" -msgstr "360 KB" - -msgid "640 KB" -msgstr "640 KB" - -msgid "720 KB" -msgstr "720 KB" - -msgid "1.2 MB" -msgstr "1.2 MB" - -msgid "1.25 MB" -msgstr "1.25 MB" - -msgid "1.44 MB" -msgstr "1.44 MB" - -msgid "DMF (cluster 1024)" -msgstr "DMF (clúster 1024)" - -msgid "DMF (cluster 2048)" -msgstr "DMF (clúster 2048)" - -msgid "2.88 MB" -msgstr "2.88 MB" - -msgid "ZIP 100" -msgstr "ZIP 100" - -msgid "3.5\" 128 MB (ISO 10090)" -msgstr "3.5\" 128 MB (ISO 10090)" - -msgid "3.5\" 230 MB (ISO 13963)" -msgstr "3.5\" 230 MB (ISO 13963)" - -msgid "3.5\" 540 MB (ISO 15498)" -msgstr "3.5\" 540 MB (ISO 15498)" - -msgid "3.5\" 640 MB (ISO 15498)" -msgstr "3.5\" 640 MB (ISO 15498)" - -msgid "3.5\" 1.3 GB (GigaMO)" -msgstr "3.5\" 1.3 GB (GigaMO)" - -msgid "3.5\" 2.3 GB (GigaMO 2)" -msgstr "3.5\" 2.3 GB (GigaMO 2)" - -msgid "5.25\" 600 MB" -msgstr "5.25\" 600 MB" - -msgid "5.25\" 650 MB" -msgstr "5.25\" 650 MB" - -msgid "5.25\" 1 GB" -msgstr "5.25\" 1 GB" - -msgid "5.25\" 1.3 GB" -msgstr "5.25\" 1.3 GB" - -msgid "Perfect RPM" -msgstr "RPM perfectes" - -msgid "1% below perfect RPM" -msgstr "1% per sota de RPM perfectes" - -msgid "1.5% below perfect RPM" -msgstr "1.5% per sota de RPM perfectes" - -msgid "2% below perfect RPM" -msgstr "2% per sota de RPM perfectes" - -msgid "(System Default)" -msgstr "(Per defecte del sistema)" - -msgid "Failed to initialize network driver" -msgstr "No has estat possible inicialitzar el controlador de xarxa" - -msgid "The network configuration will be switched to the null driver" -msgstr "La configuració de la xarxa es canviarà al controlador nul" - -msgid "Mouse sensitivity:" -msgstr "Sensibilitat del ratolí:" - -msgid "Select media images from program working directory" -msgstr "Seleccioneu imatges multimèdia del directori de treball del programa" - -msgid "PIT mode:" -msgstr "Mode PIT:" - -msgid "Auto" -msgstr "Automàtic" - -msgid "Slow" -msgstr "Lent" - -msgid "Fast" -msgstr "Ràpid" - -msgid "&Auto-pause on focus loss" -msgstr "&Pausa automàtica en la pèrdua del focus" - -msgid "WinBox is no longer supported" -msgstr "Winbox ja no és compatible" - -msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." -msgstr "El desenvolupament del gerent de Winbox es va aturar el 2022 per falta de mantenidors. A mesura que dirigim els nostres esforços cap a la millora de 86Box, hem pres la decisió de deixar de donar suport a Winbox com a gerent.\n\nNo es proporcionaran més actualitzacions a través de Winbox i és possible que es trobi amb un comportament incorrecte si continueu utilitzant -lo amb versions més recents de 86Box. Qualsevol informe d'errors relacionat amb el comportament de WinBox es tancarà com a no vàlid.\n\nVés a 86box.net per obtenir una llista d’altres gestors que puguis utilitzar." - -msgid "Generate" -msgstr "Generar" - -msgid "Joystick configuration" -msgstr "Configuració del joystick" - -msgid "Device" -msgstr "Dispositiu" - -msgid "%1 (X axis)" -msgstr "%1 (eix X)" - -msgid "%1 (Y axis)" -msgstr "%1 (eix Y)" - -msgid "MCA devices" -msgstr "Dispositius MCA" - -msgid "List of MCA devices:" -msgstr "Lista de dispositius MCA:" - -msgid "Tablet tool" -msgstr "Eina de tauleta" - -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" - -msgid "About Qt" -msgstr "Quant a Qt" - -msgid "MCA devices..." -msgstr "Dispositius MCA ..." - -msgid "Show non-primary monitors" -msgstr "Mostrar monitors no primaris" - -msgid "Open screenshots folder..." -msgstr "Obrir la carpeta de captures de pantalla ..." - -msgid "Apply fullscreen stretch mode when maximized" -msgstr "Apliqueu el mode d’estirament de pantalla completa en màxima" - -msgid "Cursor/Puck" -msgstr "Cursor/Puck" - -msgid "Pen" -msgstr "Ploma" - -msgid "Host CD/DVD Drive (%1:)" -msgstr "Unitat CD/DVD d'amfitrió (%1:)" - -msgid "&Connected" -msgstr "&Connectat" - -msgid "Clear image history" -msgstr "Esborrar la història de imatges" - -msgid "Create..." -msgstr "Crear ..." - -msgid "Host CD/DVD Drive (%1)" -msgstr "Unitat CD/DVD d'amfitrió (%1)" - -msgid "Unknown Bus" -msgstr "Bus desconegut" - -msgid "Null Driver" -msgstr "Controlador nul" - -msgid "NIC %1 (%2) %3" -msgstr "NIC %1 (%2) %3" - -msgid "Render behavior" -msgstr "Comportament del renderitzador" - -msgid "Use target framerate:" -msgstr "Utilitzeu el objectiu de la velocitat:" - -msgid " fps" -msgstr " fotogrames/s" - -msgid "VSync" -msgstr "VSync" - -msgid "Synchronize with video" -msgstr "Sincronitzar amb vídeo" - -msgid "Shaders" -msgstr "Shaders" - -msgid "Remove" -msgstr "Supressió" - -msgid "Browse..." -msgstr "Navegació..." - -msgid "Couldn't create OpenGL context." -msgstr "No has estat possible crear un context d'OpenGL." - -msgid "Couldn't switch to OpenGL context." -msgstr "No has estat possible canviar al context d'OpenGL." - -msgid "OpenGL version 3.0 or greater is required. Current version is %1.%2" -msgstr "Es requereix la versió 3.0 o superior d'OpenGL. La versió actual és %1.%2" - -msgid "Error initializing OpenGL" -msgstr "Error en inicialitzar OpenGL" - -msgid "\nFalling back to software rendering." -msgstr "\nTornant al renderitzador software." - -msgid "

When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.

" -msgstr "

Quan seleccioneu imatges de suports (CD-ROM, disquet, etc.), el diàleg obert s’iniciarà al mateix directori que el fitxer de configuració 86Box. Aquesta configuració només farà una diferència en les macOS.

" - -msgid "This machine might have been moved or copied." -msgstr "Aquesta màquina podria haver estat moguda o copiada." - -msgid "In order to ensure proper networking functionality, 86Box needs to know if this machine was moved or copied.\n\nSelect \"I Copied It\" if you are not sure." -msgstr "Per tal d’assegurar una funcionalitat adequada de xarxa, 86box ha de saber si aquesta màquina es va moure o copiar.\n\nSeleccioneu \"Ho he copiat\" si no esteu segurs." - -msgid "I Moved It" -msgstr "Ho vaig moure" - -msgid "I Copied It" -msgstr "Ho he copiat" - -msgid "86Box Monitor #" -msgstr "Monitor de 86Box " - -msgid "No MCA devices." -msgstr "No s'han trobat dispositius MCA." - -msgid "MiB" -msgstr "MiB" - -msgid "Network Card #1" -msgstr "Targeta de xarxa 1" - -msgid "Network Card #2" -msgstr "Targeta de xarxa 2" - -msgid "Network Card #3" -msgstr "Targeta de xarxa 3" - -msgid "Network Card #4" -msgstr "Targeta de xarxa 4" - -msgid "Mode:" -msgstr "Mode:" - -msgid "Interface:" -msgstr "Interfície:" - -msgid "Adapter:" -msgstr "Adaptador:" - -msgid "VDE Socket:" -msgstr "Socket de VDE:" - -msgid "86Box Unit Tester" -msgstr "Test de la unitat de 86 Box" - -msgid "Novell NetWare 2.x Key Card" -msgstr "Targeta de clau de Novell Netware 2.x" - -msgid "Serial port passthrough 1" -msgstr "Pas del port sèrie 1" - -msgid "Serial port passthrough 2" -msgstr "Pas del port sèrie 2" - -msgid "Serial port passthrough 3" -msgstr "Pas del port sèrie 3" - -msgid "Serial port passthrough 4" -msgstr "Pas del port sèrie 4" - -msgid "Renderer options..." -msgstr "Opcions del renderitzador ..." - -msgid "Logitech/Microsoft Bus Mouse" -msgstr "Ratolí bus Logitech/Microsoft" - -msgid "Microsoft Bus Mouse (InPort)" -msgstr "Ratolí bus Microsoft (InPort)" - -msgid "Mouse Systems Serial Mouse" -msgstr "Ratolí sèrie Mouse Systems" - -msgid "Microsoft Serial Mouse" -msgstr "Ratolí sèrie Microsoft" - -msgid "Logitech Serial Mouse" -msgstr "Ratolí sèrie Logitech" - -msgid "PS/2 Mouse" -msgstr "Ratolí PS/2" - -msgid "3M MicroTouch (Serial)" -msgstr "3M MicroTouch (sèrie)" - -msgid "[COM] Standard Hayes-compliant Modem" -msgstr "[COM] Mòdem estàndard, complint els Hayes" - -msgid "Roland MT-32 Emulation" -msgstr "Emulació de Roland MT-32" - -msgid "Roland MT-32 (New) Emulation" -msgstr "Emulació de Roland MT-32 (nou)" - -msgid "Roland CM-32L Emulation" -msgstr "Emulació de Roland CM-32L" - -msgid "Roland CM-32LN Emulation" -msgstr "Emulació de Roland CM-32LN" - -msgid "OPL4-ML Daughterboard" -msgstr "Placa filla OPL4-ML" - -msgid "System MIDI" -msgstr "MIDI de sistema" - -msgid "MIDI Input Device" -msgstr "Dispositiu d'entrada MIDI" - -msgid "BIOS Address" -msgstr "Adreça de BIOS" - -msgid "Enable BIOS extension ROM Writes" -msgstr "Activar les escrits a la ROM extensor de BIOS" - -msgid "Address" -msgstr "Adreça" - -msgid "IRQ" -msgstr "IRQ" - -msgid "BIOS Revision" -msgstr "Revisió de la BIOS" - -msgid "Translate 26 -> 17" -msgstr "Traduir 26 -> 17" - -msgid "Language" -msgstr "Idioma" - -msgid "Enable backlight" -msgstr "Activar la llum posterior" - -msgid "Invert colors" -msgstr "Colors invertits" - -msgid "BIOS size" -msgstr "Grandària de la BIOS" - -msgid "Map C0000-C7FFF as UMB" -msgstr "Mapa C0000-C7FFF com UMB" - -msgid "Map C8000-CFFFF as UMB" -msgstr "Mapa C8000-CFFFF com UMB" - -msgid "Map D0000-D7FFF as UMB" -msgstr "Mapa D0000-D7FFF com UMB" - -msgid "Map D8000-DFFFF as UMB" -msgstr "Mapa D8000-DFFFF com UMB" - -msgid "Map E0000-E7FFF as UMB" -msgstr "Mapa E0000-E7FFF com UMB" - -msgid "Map E8000-EFFFF as UMB" -msgstr "Mapa E8000-EFFFF com UMB" - -msgid "JS9 Jumper (JIM)" -msgstr "Jumper JS9 (JIM)" - -msgid "MIDI Output Device" -msgstr "Dispositiu de sortida MIDI" - -msgid "MIDI Real time" -msgstr "MIDI en temps real" - -msgid "MIDI Thru" -msgstr "Pas de l’entrada MIDI" - -msgid "MIDI Clockout" -msgstr "Rellotge MIDI" - -msgid "SoundFont" -msgstr "SoundFont" - -msgid "Output Gain" -msgstr "Guany de sortida" - -msgid "Chorus" -msgstr "Cor" - -msgid "Chorus Voices" -msgstr "Veus de cor" - -msgid "Chorus Level" -msgstr "Nivell de cor" - -msgid "Chorus Speed" -msgstr "Velocitat del cor" - -msgid "Chorus Depth" -msgstr "Profunditat de cor" - -msgid "Chorus Waveform" -msgstr "Forma d'ona del cor" - -msgid "Reverb" -msgstr "Reverberació" - -msgid "Reverb Room Size" -msgstr "Grandària del loc de reveberació" - -msgid "Reverb Damping" -msgstr "Amortiment de reverberació" - -msgid "Reverb Width" -msgstr "Amplada de reverberació" - -msgid "Reverb Level" -msgstr "Nivell de reverberació" - -msgid "Interpolation Method" -msgstr "Mètode d'interpolació" - -msgid "Reverb Output Gain" -msgstr "Guany de sortida de reverberació" - -msgid "Reversed stereo" -msgstr "Estèreo invertit" - -msgid "Nice ramp" -msgstr "Rampa bonica" - -msgid "Hz" -msgstr "Hz" - -msgid "Buttons" -msgstr "Botons" - -msgid "Serial Port" -msgstr "Port sèrie" - -msgid "RTS toggle" -msgstr "Commutació RTS" - -msgid "Revision" -msgstr "Revisió" - -msgid "Controller" -msgstr "Controlador" - -msgid "Show Crosshair" -msgstr "Mostra el cursor de creuers" - -msgid "DMA" -msgstr "DMA" - -msgid "MAC Address" -msgstr "Adreça MAC" - -msgid "MAC Address OUI" -msgstr "OUI de adreça MAC" - -msgid "Enable BIOS" -msgstr "Activar BIOS" - -msgid "Baud Rate" -msgstr "Taxa de baud" - -msgid "TCP/IP listening port" -msgstr "Port d'escolta TCP/IP" - -msgid "Phonebook File" -msgstr "Arxiu de la llibreta de telèfon" - -msgid "Telnet emulation" -msgstr "Emulació de telnet" - -msgid "RAM Address" -msgstr "Adreça de RAM" - -msgid "RAM size" -msgstr "Grandària de RAM" - -msgid "Initial RAM size" -msgstr "Grandària inicial de RAMu" - -msgid "Serial Number" -msgstr "Número de sèrie" - -msgid "Host ID" -msgstr "Identificador d'amfitrió" - -msgid "FDC Address" -msgstr "Adreça del FDC" - -msgid "MPU-401 Address" -msgstr "Adreça del MPU-401" - -msgid "MPU-401 IRQ" -msgstr "IRQ MPU-401" - -msgid "Receive MIDI input" -msgstr "Rebre l'entrada MIDI" - -msgid "Low DMA" -msgstr "DMA baix" - -msgid "Enable Game port" -msgstr "Activar port de joc" - -msgid "Surround module" -msgstr "Mòdul Surround" - -msgid "CODEC" -msgstr "CODEC" - -msgid "Raise CODEC interrupt on CODEC setup (needed by some drivers)" -msgstr "Activar la interrupció del codec en la configuració del CODEC (necessari per alguns controladors)" - -msgid "SB Address" -msgstr "Adreça de SB" - -msgid "WSS IRQ" -msgstr "IRQ de WSS" - -msgid "WSS DMA" -msgstr "DMA de WSS" - -msgid "Enable OPL" -msgstr "Activar OPL" - -msgid "Receive MIDI input (MPU-401)" -msgstr "Rebre l'entrada MIDI (MPU-401)" - -msgid "SB low DMA" -msgstr "DMA baix del SB" - -msgid "6CH variant (6-channel)" -msgstr "Variant de 6Ch (6 canals)" - -msgid "Enable CMS" -msgstr "Activar CMS" - -msgid "Mixer" -msgstr "Mescadora" - -msgid "High DMA" -msgstr "DMA alt" - -msgid "Control PC speaker" -msgstr "Controlar l'altaveu del PC" - -msgid "Memory size" -msgstr "Grandària de memòria" - -msgid "EMU8000 Address" -msgstr "Adreça de EMU8000" - -msgid "IDE Controller" -msgstr "Controlador IDE" - -msgid "Codec" -msgstr "Codec" - -msgid "GUS type" -msgstr "Tipus de GUS" - -msgid "Enable 0x04 \"Exit 86Box\" command" -msgstr "Activar comanda 0x04 \"Sortir de 86Box\"" - -msgid "Display type" -msgstr "Tipus de pantalla" - -msgid "Composite type" -msgstr "Tipus de pantalla composta" - -msgid "RGB type" -msgstr "Tipus de pantalla RGB" - -msgid "Line doubling type" -msgstr "Tipus de doblatge de línia" - -msgid "Snow emulation" -msgstr "Emulació de neu" - -msgid "Monitor type" -msgstr "Tipus de moitor" - -msgid "Character set" -msgstr "Conjunt de caràcters" - -msgid "XGA type" -msgstr "Tipus de XGA" - -msgid "Instance" -msgstr "Instància" - -msgid "MMIO Address" -msgstr "Adreça de MMIO" - -msgid "RAMDAC type" -msgstr "Tipus de RAMDAC" - -msgid "Blend" -msgstr "Barrejar" - -msgid "Bilinear filtering" -msgstr "Filtratge bilineal" - -msgid "Dithering" -msgstr "Dithering" - -msgid "Enable NMI for CGA emulation" -msgstr "Activar NMI per a emulació CGA" - -msgid "Voodoo type" -msgstr "Tipus de targeta Voodoo" - -msgid "Framebuffer memory size" -msgstr "Grandària de memòria framebuffer" - -msgid "Texture memory size" -msgstr "Grandària de memòria de textura" - -msgid "Dither subtraction" -msgstr "Sibtracció de dither" - -msgid "Screen Filter" -msgstr "Filtre de pantalla" - -msgid "Render threads" -msgstr "Fils de renderització" - -msgid "SLI" -msgstr "SLI" - -msgid "Start Address" -msgstr "Adreça inicial" - -msgid "Contiguous Size" -msgstr "Grandària contigua" - -msgid "I/O Width" -msgstr "Amplada de E/S" - -msgid "Transfer Speed" -msgstr "Velocitat de transferència" - -msgid "EMS mode" -msgstr "Mode EMS" - -msgid "Address for > 2 MB" -msgstr "Adreça per a > 2 MB" - -msgid "Frame Address" -msgstr "Adreça de marc" - -msgid "USA" -msgstr "Estats Units" - -msgid "Danish" -msgstr "Danès" - -msgid "Always at selected speed" -msgstr "Sempre a la velocitat seleccionada" - -msgid "BIOS setting + Hotkeys (off during POST)" -msgstr "Configuració de la BIOS + Hotkeys (desactivat durant el POST)" - -msgid "64 kB starting from F0000" -msgstr "64 kB a partir de F0000" - -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB a partir de E0000 (MSB de adreça invertit, els darrers 64KB primer)" - -msgid "Sine" -msgstr "Sinusoidal" - -msgid "Triangle" -msgstr "Triangular" - -msgid "Linear" -msgstr "Lineal" - -msgid "4th Order" -msgstr "Del 4t ordre" - -msgid "7th Order" -msgstr "Del 7è ordre" - -msgid "Non-timed (original)" -msgstr "No cronometrat (original)" - -msgid "45 Hz (JMP2 not populated)" -msgstr "45 Hz (JMP2 no poblat)" - -msgid "Two" -msgstr "Dos" - -msgid "Three" -msgstr "Tres" - -msgid "Wheel" -msgstr "Roda" - -msgid "Five + Wheel" -msgstr "Cinc + roda" - -msgid "Five + 2 Wheels" -msgstr "" - -msgid "A3 - SMT2 Serial / SMT3(R)V" -msgstr "A3 - SMT2 sèrie / SMT3(R)V" - -msgid "Q1 - SMT3(R) Serial" -msgstr "Q1 - SMT3(R) sèrie" - -msgid "8 KB" -msgstr "8 KB" - -msgid "32 KB" -msgstr "32 KB" - -msgid "16 KB" -msgstr "16 KB" - -msgid "64 KB" -msgstr "64 KB" - -msgid "Disable BIOS" -msgstr "Desactivar la BIOS" - -msgid "512 KB" -msgstr "512 KB" - -msgid "2 MB" -msgstr "2 MB" - -msgid "8 MB" -msgstr "8 MB" - -msgid "28 MB" -msgstr "28 MB" - -msgid "1 MB" -msgstr "1 MB" - -msgid "4 MB" -msgstr "4 MB" - -msgid "12 MB" -msgstr "12 MB" - -msgid "16 MB" -msgstr "16 MB" - -msgid "20 MB" -msgstr "20 MB" - -msgid "24 MB" -msgstr "24 MB" - -msgid "SigmaTel STAC9721T (stereo)" -msgstr "SigmaTel STAC9721T (estèreo)" - -msgid "Classic" -msgstr "Clàssic" - -msgid "256 KB" -msgstr "256 KB" - -msgid "Composite" -msgstr "Compost" - -msgid "Old" -msgstr "Vella" - -msgid "New" -msgstr "Nova" - -msgid "Color (generic)" -msgstr "Color (genèric)" - -msgid "Green Monochrome" -msgstr "Moncorom verd" - -msgid "Amber Monochrome" -msgstr "Monocrom ambre" - -msgid "Gray Monochrome" -msgstr "Monocrom gris" - -msgid "Color (no brown)" -msgstr "Color (sense marró)" - -msgid "Color (IBM 5153)" -msgstr "Color (IBM 5153)" - -msgid "Simple doubling" -msgstr "Doble simple" - -msgid "sRGB interpolation" -msgstr "Interpolació sRGB" - -msgid "Linear interpolation" -msgstr "Interpolació lineal" - -msgid "128 KB" -msgstr "128 KB" - -msgid "Monochrome (5151/MDA) (white)" -msgstr "Monocrom (5151/MDA) (blanc)" - -msgid "Monochrome (5151/MDA) (green)" -msgstr "Monocrom (5151/MDA) (verd)" - -msgid "Monochrome (5151/MDA) (amber)" -msgstr "Monocrom (5151/MDA) (ambre)" - -msgid "Color 40x25 (5153/CGA)" -msgstr "Color 40x25 (5153/CGA)" - -msgid "Color 80x25 (5153/CGA)" -msgstr "Color 80x25 (5153/CGA)" - -msgid "Enhanced Color - Normal Mode (5154/ECD)" -msgstr "Color millorat - mode normal (5154/ECD)" - -msgid "Enhanced Color - Enhanced Mode (5154/ECD)" -msgstr "Color millorat - mode millorat (5154/ECD)" - -msgid "Green" -msgstr "Verd" - -msgid "Amber" -msgstr "Ambre" - -msgid "Gray" -msgstr "Gris" - -msgid "Color" -msgstr "Color" - -msgid "U.S. English" -msgstr "Anglès dels EUA" - -msgid "Scandinavian" -msgstr "Escandinau" - -msgid "Other languages" -msgstr "Altres idiomes" - -msgid "Bochs latest" -msgstr "Bochs més recent" - -msgid "Mono Non-Interlaced" -msgstr "Monocrom no interlat" - -msgid "Color Interlaced" -msgstr "Color interlat" - -msgid "Color Non-Interlaced" -msgstr "Color no interlat" - -msgid "3Dfx Voodoo Graphics" -msgstr "Gràfics 3dfx Voodoo" - -msgid "Obsidian SB50 + Amethyst (2 TMUs)" -msgstr "Obsidian SB50 + Amethyst (2 unitats TMU)" - -msgid "8-bit" -msgstr "8 bits" - -msgid "16-bit" -msgstr "16 bits" - -msgid "Standard (150ns)" -msgstr "Estàndard (150ns)" - -msgid "High-Speed (120ns)" -msgstr "Alta velocitat (120ns)" - -msgid "Enabled" -msgstr "Activada" - -msgid "Standard" -msgstr "Estàndard" - -msgid "High-Speed" -msgstr "Alta velocitat" - -msgid "Stereo LPT DAC" -msgstr "DAC LPT estèreo" - -msgid "Generic Text Printer" -msgstr "Impressora de text genèrica" - -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Impressora de matriu de punts ESC/P genèrica" - -msgid "Generic PostScript Printer" -msgstr "Impressora PostScript genèrica" - -msgid "Generic PCL5e Printer" -msgstr "Impressora PCL5e genèrica" - -msgid "Parallel Line Internet Protocol" -msgstr "Protocol d'Internet de línia paraŀlela" - -msgid "Protection Dongle for Savage Quest" -msgstr "Dispositiu de protecció per a Savage Quest" - -msgid "Serial Passthrough Device" -msgstr "Dispositiu de pas de sèrie" - -msgid "Passthrough Mode" -msgstr "Mode de pas" - -msgid "Host Serial Device" -msgstr "Dispositiu de sèrie amfitrió" - -msgid "Name of pipe" -msgstr "Nom de la canonada" - -msgid "Data bits" -msgstr "Bits de dades" - -msgid "Stop bits" -msgstr "Bits de aturada" - -msgid "Baud Rate of Passthrough" -msgstr "Taxa de baud de pas" - -msgid "Named Pipe (Server)" -msgstr "Pipe anomenat (servidor)" - -msgid "Host Serial Passthrough" -msgstr "Pas del port sèrie amfitrió" - -msgid "E&ject %1" -msgstr "E&xtreure %1" - -msgid "&Unmute" -msgstr "&Saver" - -msgid "Softfloat FPU" -msgstr "FPU Softfloat" - -msgid "High performance impact" -msgstr "Alt impact en el rendiment" - -msgid "[Generic] RAM Disk (max. speed)" -msgstr "[Generic] Disc RAM (velocitat màxima)" - -msgid "[Generic] 1989 (3500 RPM)" -msgstr "" - -msgid "[Generic] 1992 (3600 RPM)" -msgstr "" - -msgid "[Generic] 1994 (4500 RPM)" -msgstr "" - -msgid "[Generic] 1996 (5400 RPM)" -msgstr "" - -msgid "[Generic] 1997 (5400 RPM)" -msgstr "" - -msgid "[Generic] 1998 (5400 RPM)" -msgstr "" - -msgid "[Generic] 2000 (7200 RPM)" -msgstr "" - -msgid "IBM 8514/A clone (ISA)" -msgstr "Clon IBM 8514/A (ISA)" - -msgid "Vendor" -msgstr "Frabricant" - -msgid "Generic PC/XT Memory Expansion" -msgstr "Expansió de memòria genèrica PC/XT" - -msgid "Generic PC/AT Memory Expansion" -msgstr "Expansió de memòria genèrica PC/AT" - -msgid "Unable to find Dot-Matrix fonts" -msgstr "No es pot trobar tipus de lletra de matriu de punts" - -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "Els tipus de lletra TrueType al directori \"roms/printer/fonts\" són necessaris per a l'emulació de la impressora de matriu de punts ESC/P genèrica." - -msgid "Inhibit multimedia keys" -msgstr "" - -msgid "Ask for confirmation before saving settings" -msgstr "" - -msgid "Ask for confirmation before hard resetting" -msgstr "" - -msgid "Ask for confirmation before quitting" -msgstr "" - -msgid "Options" -msgstr "" - -msgid "Model" -msgstr "" - -msgid "Model:" -msgstr "" - -msgid "Failed to initialize Vulkan renderer." -msgstr "" - -msgid "GLSL Error" -msgstr "" - -msgid "Could not load shader: %1" -msgstr "" - -msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" -msgstr "" - -msgid "Could not load texture: %1" -msgstr "" - -msgid "Could not compile shader:\n\n%1" -msgstr "" - -msgid "Program not linked:\n\n%1" -msgstr "" - -msgid "Shader Manager" -msgstr "" - -msgid "Shader Configuration" -msgstr "" - -msgid "Add" -msgstr "" - -msgid "Move up" -msgstr "" - -msgid "Move down" -msgstr "" - -msgid "Could not load file %1" -msgstr "" diff --git a/src/qt/languages/cs-CZ.po b/src/qt/languages/cs-CZ.po index cd726832d..a0a072866 100644 --- a/src/qt/languages/cs-CZ.po +++ b/src/qt/languages/cs-CZ.po @@ -10,7 +10,7 @@ msgid "&Action" msgstr "&Akce" msgid "&Keyboard requires capture" -msgstr "&Klávesnice vyžaduje záběr" +msgstr "&Klávesnice vyžaduje záběr myši" msgid "&Right CTRL is left ALT" msgstr "&Pravý Ctrl je levý Alt" @@ -27,7 +27,13 @@ msgstr "Ctrl+Alt+&Esc" msgid "&Pause" msgstr "P&ozastavit" -msgid "E&xit..." +msgid "Pause" +msgstr "Pozastavit" + +msgid "Re&sume" +msgstr "&Obnovit" + +msgid "E&xit" msgstr "&Ukončit" msgid "&View" @@ -51,20 +57,17 @@ msgstr "&Renderer" msgid "&Qt (Software)" msgstr "&Qt (Software)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" msgstr "Open&GL (3.0 Core)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." +msgid "Specify &dimensions..." msgstr "&Zadat velikost..." -msgid "F&orce 4:3 display ratio" -msgstr "&Dodržovat poměr stran 4:3" +msgid "Force &4:3 display ratio" +msgstr "Dodržovat poměr stran &4:3" msgid "&Window scale factor" msgstr "&Násobek zvětšení okna" @@ -99,7 +102,7 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" +msgid "Fi<er method" msgstr "Metoda &filtrování" msgid "&Nearest" @@ -132,8 +135,8 @@ msgstr "&Celočíselné škálování" msgid "4:&3 Integer scale" msgstr "4:&3 Celočíselné škálování" -msgid "E&GA/(S)VGA settings" -msgstr "Nastavení pro E&GA a (S)VGA" +msgid "EGA/(S)&VGA settings" +msgstr "Nastavení pro EGA a (S)&VGA" msgid "&Inverted VGA monitor" msgstr "&Převrátit barvy" @@ -144,17 +147,23 @@ msgstr "&Typ VGA monitoru" msgid "RGB &Color" msgstr "RGB &barevný" +msgid "RGB (no brown)" +msgstr "RGB (bez hnědé)" + msgid "&RGB Grayscale" msgstr "&Odstíny šedi" +msgid "Generic RGBI color monitor" +msgstr "Obecný RGBI barevný monitor" + msgid "&Amber monitor" -msgstr "&Jantarová obrazovka" +msgstr "&Jantarový monitor" msgid "&Green monitor" -msgstr "&Zelená obrazovka" +msgstr "&Zelený monitor" msgid "&White monitor" -msgstr "&Bílá obrazovka" +msgstr "&Bílý monitor" msgid "Grayscale &conversion type" msgstr "Převod na &odstíny šedi" @@ -183,6 +192,9 @@ msgstr "&Nástroje" msgid "&Settings..." msgstr "&Nastavení..." +msgid "Settings..." +msgstr "Nastavení..." + msgid "&Update status bar icons" msgstr "&Aktualizovat ikony stavového řádku" @@ -348,9 +360,12 @@ msgstr "Počítač:" msgid "Configure" msgstr "Nastavit" -msgid "CPU type:" +msgid "CPU:" msgstr "Procesor:" +msgid "CPU type:" +msgstr "Typ procesoru:" + msgid "Speed:" msgstr "Rychlost:" @@ -384,6 +399,15 @@ msgstr "Zapnuta (UTC)" msgid "Dynamic Recompiler" msgstr "Dynamický překladač" +msgid "CPU frame size" +msgstr "Velikost CPU rámců" + +msgid "Larger frames (less smooth)" +msgstr "Větší rámce (méně plynulé)" + +msgid "Smaller frames (smoother)" +msgstr "Menší rámce (plynulejší)" + msgid "Video:" msgstr "Grafika:" @@ -399,12 +423,27 @@ msgstr "Grafika IBM 8514/A" msgid "XGA Graphics" msgstr "Grafika XGA" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "Grafika zobrazovacího adaptéru IBM PS/55" + +msgid "Keyboard:" +msgstr "Klávesnice:" + +msgid "Keyboard" +msgstr "Klávesnice" + msgid "Mouse:" msgstr "Myš:" +msgid "Mouse" +msgstr "Myš" + msgid "Joystick:" msgstr "Joystick:" +msgid "Joystick" +msgstr "Joystick" + msgid "Joystick 1..." msgstr "Joystick 1..." @@ -430,10 +469,13 @@ msgid "Sound card #4:" msgstr "Zvuková karta 4:" msgid "MIDI Out Device:" -msgstr "MIDI výstup:" +msgstr "Zařízení pro MIDI výstup:" msgid "MIDI In Device:" -msgstr "MIDI vstup:" +msgstr "Zařízení pro MIDI vstup:" + +msgid "MIDI Out:" +msgstr "MIDI výstup:" msgid "Standalone MPU-401" msgstr "Samostatný MPU-401" @@ -474,6 +516,9 @@ msgstr "Zařízení na LPT3:" msgid "LPT4 Device:" msgstr "Zařízení na LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "DMA kanál ECP interního LPT portu:" + msgid "Serial port 1" msgstr "Povolit port COM1" @@ -498,18 +543,21 @@ msgstr "Povolit port LPT3" msgid "Parallel port 4" msgstr "Povolit port LPT4" -msgid "HD Controller:" -msgstr "Řadič disku:" - msgid "FD Controller:" msgstr "Disketový řadič:" +msgid "CD-ROM Controller:" +msgstr "Řadič CD-ROM:" + msgid "Tertiary IDE Controller" msgstr "Třetí řadič IDE" msgid "Quaternary IDE Controller" msgstr "Čtvrtý řadič IDE" +msgid "Hard disk" +msgstr "Pevný disk" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "Kazeta" msgid "Hard disks:" msgstr "Pevné disky:" +msgid "Firmware Version" +msgstr "Verze firmware" + msgid "&New..." msgstr "&Nový..." @@ -588,8 +639,14 @@ msgstr "Mechaniky CD-ROM:" msgid "MO drives:" msgstr "Magnetooptické mechaniky:" -msgid "ZIP drives:" -msgstr "Mechaniky ZIP:" +msgid "MO:" +msgstr "Magnetooptické jednotky:" + +msgid "Removable disks:" +msgstr "Vyměnitelné disky:" + +msgid "Removable disk drives:" +msgstr "Mechaniky vyměnitelných disků:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "ISA hodiny:" msgid "ISA Memory Expansion" msgstr "ISA rozšíření paměti" +msgid "ISA ROM Cards" +msgstr "ISA karty s pamětí ROM" + msgid "Card 1:" msgstr "Karta 1:" @@ -612,6 +672,15 @@ msgstr "Karta 3:" msgid "Card 4:" msgstr "Karta 4:" +msgid "Generic ISA ROM Board" +msgstr "Obecná ISA karta s pamětí ROM" + +msgid "Generic Dual ISA ROM Board" +msgstr "Obecná ISA karta se dvěmi pamětmi ROM" + +msgid "Generic Quad ISA ROM Board" +msgstr "Obecná ISA karta se čtyřmi pamětmi ROM" + msgid "ISABugger device" msgstr "Zařízení ISABugger" @@ -633,14 +702,20 @@ msgstr " - POZASTAVENO" msgid "Speed" msgstr "Rychlost" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Vyměnitelný disk %1 (%2): %3" -msgid "ZIP images" -msgstr "Obrazy ZIP disků" +msgid "&Removable disk %1 (%2): %3" +msgstr "&Vyměnitelný disk %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Obrazy vyměnitelných disků" + +msgid "Image %1" +msgstr "Obraz %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." -msgstr "86Box nenalezl žádné použitelné image pamětí ROM.\n\nStáhněte sadu obrazů ROM a extrahujte ji do složky \"roms\"." +msgstr "86Box nenalezl žádné použitelné obrazy pamětí ROM.\n\nStáhněte sadu obrazů ROM a extrahujte ji do složky \"roms\"." msgid "(empty)" msgstr "(prázdné)" @@ -696,12 +771,30 @@ msgstr "Síť" msgid "Ports (COM & LPT)" msgstr "COM a LPT porty" +msgid "Ports" +msgstr "Porty" + +msgid "Serial ports:" +msgstr "Sériové porty:" + +msgid "Parallel ports:" +msgstr "Paralelní porty:" + msgid "Storage controllers" msgstr "Řadiče úložiště" msgid "Hard disks" msgstr "Pevné disky" +msgid "Disks:" +msgstr "Disky:" + +msgid "Floppy:" +msgstr "Disketové jednotky:" + +msgid "Controllers:" +msgstr "Řadiče:" + msgid "Floppy & CD-ROM drives" msgstr "Disketové a CD-ROM mechaniky" @@ -711,6 +804,9 @@ msgstr "Další vyměnitelná zařízení" msgid "Other peripherals" msgstr "Jiné příslušenství" +msgid "Other devices" +msgstr "Jiná zařízení" + msgid "Click to capture mouse" msgstr "Klikněte pro zabraní myši" @@ -754,35 +850,62 @@ msgid "Invalid PCap device" msgstr "Neplatné PCap zařízení" msgid "2-axis, 2-button joystick(s)" -msgstr "2osový, 2tlačítkový joystick" +msgstr "Joystick s 2 osami a 2 tlačítky" msgid "2-axis, 4-button joystick" -msgstr "2osový, 4tlačítkový joystick" +msgstr "Joystick s 2 osami a 4 tlačítky" msgid "2-axis, 6-button joystick" -msgstr "2osový, 6tlačítkový joystick" +msgstr "Joystick s 2 osami a 6 tlačítky" msgid "2-axis, 8-button joystick" -msgstr "2osový, 8tlačítkový joystick" +msgstr "Joystick s 2 osami a 8 tlačítky" msgid "3-axis, 2-button joystick" -msgstr "3osový, 2tlačítkový joystick" +msgstr "Joystick s 3 osami a 2 tlačítky" msgid "3-axis, 4-button joystick" -msgstr "3osový, 4tlačítkový joystick" +msgstr "Joystick s 3 osami a 4 tlačítky" msgid "4-axis, 4-button joystick" -msgstr "4osový, 4tlačítkový joystick" +msgstr "Joystick s 4 osami a 4 tlačítky" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Pedals" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Thrustmaster Flight Control System" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Rudder Control System" + +msgid "2-button gamepad(s)" +msgstr "Ovladač se 2 tlačítky" + +msgid "2-button flight yoke" +msgstr "Letecký knipl se 2 tlačítky" + +msgid "4-button gamepad" +msgstr "Ovladač se 4 tlačítky" + +msgid "4-button flight yoke" +msgstr "Letecký knipl se 4 tlačítky" + +msgid "2-button flight yoke with throttle" +msgstr "Letecký knipl s 2 tlačítky a pákou" + +msgid "4-button flight yoke with throttle" +msgstr "Letecký knipl s 4 tlačítky a pákou" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Volant pro Windows 95 (3 osy, 4 tlačítka)" + msgid "None" msgstr "Žadné" @@ -792,6 +915,9 @@ msgstr "%1 MB (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Disketová mechanika %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Disketová mechanika %1 (%2): %3" + msgid "Advanced sector images" msgstr "Rozšířené sektorové obrazy" @@ -813,6 +939,9 @@ msgstr "Nastala chyba při inicializaci knihovny GhostPCL" msgid "MO %1 (%2): %3" msgstr "MO %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&MO %1 (%2): %3" + msgid "MO images" msgstr "Obrazy MO" @@ -822,6 +951,15 @@ msgstr "Vítejte v programu 86Box!" msgid "Internal device" msgstr "Vestavěné zařízení" +msgid "&File" +msgstr "&Soubor" + +msgid "&New machine..." +msgstr "&Nový počítač..." + +msgid "&Check for updates..." +msgstr "&Zkontrolovat aktualizace..." + msgid "Exit" msgstr "Ukončit" @@ -897,12 +1035,18 @@ msgstr "Pokračovat" msgid "Cassette: %1" msgstr "Kazeta: %1" +msgid "C&assette: %1" +msgstr "K&azeta: %1" + msgid "Cassette images" msgstr "Kazetové nahrávky" msgid "Cartridge %1: %2" msgstr "Cartridge %1: %2" +msgid "Car&tridge %1: %2" +msgstr "Car&tridge %1: %2" + msgid "Cartridge images" msgstr "Obrazy cartridge" @@ -912,6 +1056,9 @@ msgstr "Obnovit" msgid "Pause execution" msgstr "Pozastavit" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Stisknout Ctrl+Alt+Delete" @@ -921,9 +1068,279 @@ msgstr "Stisknout Ctrl+Alt+Esc" msgid "Hard reset" msgstr "Resetovat" +msgid "Force shutdown" +msgstr "Vynutit vypnutí" + +msgid "Start" +msgstr "Spustit" + +msgid "Not running" +msgstr "Neběží" + +msgid "Running" +msgstr "Běží" + +msgid "Paused" +msgstr "Pozastaveno" + +msgid "Waiting" +msgstr "Čeká" + +msgid "Powered Off" +msgstr "Vypnuto" + +msgid "%n running" +msgstr "%n běžících" + +msgid "%n paused" +msgstr "%n pozastavených" + +msgid "%n waiting" +msgstr "%n čekajících" + +msgid "%1 total" +msgstr "%1 celkem" + +msgid "VMs: %1" +msgstr "Počet virtuálních počítačů: %1" + +msgid "System Directory:" +msgstr "Systémový adresář:" + +msgid "Choose directory" +msgstr "Vyberte adresář" + +msgid "Choose configuration file" +msgstr "Vyberte konfigurační soubor" + +msgid "86Box configuration files (86box.cfg)" +msgstr "Konfigurační soubory 86Box (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Čtení konfigurace selhalo" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Nebylo možné otevřít vybraný konfigurační soubor pro čtení: %1" + +msgid "Use regular expressions in search box" +msgstr "Použít ve vyhledávacím poli regulární výrazy" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 počítač(ů) je stále aktivních. Opravdu chcete ukončit správce virtuálních počítačů?" + +msgid "Add new system wizard" +msgstr "Průvodce přidáním nového systému" + +msgid "Introduction" +msgstr "Úvod" + +msgid "This will help you add a new system to 86Box." +msgstr "Tento průvodce vám pomůže přidat nový systém do programu 86Box." + +msgid "New configuration" +msgstr "Nová konfigurace" + +msgid "Complete" +msgstr "Závěr" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "Průvodce nyní spustí konfiguraci nového systému." + +msgid "Use existing configuration" +msgstr "Použít existující konfiguraci" + +msgid "Type some notes here" +msgstr "Zde zadejte nějaké poznámky" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Vložte obsah stávajícího konfiguračního souboru do pole níže." + +msgid "Load configuration from file" +msgstr "Načíst konfiguraci ze souboru" + +msgid "System name" +msgstr "Název systému" + +msgid "System name:" +msgstr "Název systému:" + +msgid "System name cannot contain certain characters" +msgstr "Název systému nesmí obsahovat určité znaky" + +msgid "System name already exists" +msgstr "Název systému již existuje" + +msgid "Please enter a directory for the system" +msgstr "Zadejte adresář pro systém" + +msgid "Directory does not exist" +msgstr "Adresář neexistuje" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "Pro tento systém bude vytvořen nový adresář ve výše zvoleném adresáři." + +msgid "System location:" +msgstr "Umístění systému:" + +msgid "System name and location" +msgstr "Název systému a umístění" + +msgid "Enter the name of the system and choose the location" +msgstr "Zadejte název systému a vyberte umístění" + +msgid "Enter the name of the system" +msgstr "Zadejte název systému" + +msgid "Please enter a system name" +msgstr "Zadejte název systému" + +msgid "Display name (optional):" +msgstr "Zobrazované jméno (volitelné):" + +msgid "Display name:" +msgstr "Zobrazované jméno:" + +msgid "Set display name" +msgstr "Nastavit zobrazované jméno" + +msgid "Enter the new display name (blank to reset)" +msgstr "Zadejte nové zobrazované jméno (prázdné pole pro vymazání)" + +msgid "Change &display name..." +msgstr "Změnit &zobrazované jméno..." + +msgid "Context Menu" +msgstr "Kontextová nabídka" + +msgid "&Open folder..." +msgstr "&Otevřít složku..." + +msgid "Open p&rinter tray..." +msgstr "Otevřít zásobník &tiskárny..." + +msgid "Set &icon..." +msgstr "Nastavit &ikonu..." + +msgid "Select an icon" +msgstr "Vyberte ikonu" + +msgid "C&lone..." +msgstr "K&lonovat..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "Virtuální počítač \"%1\" (%2) bude naklonován do:" + +msgid "Directory %1 already exists" +msgstr "Adresář %1 již existuje." + +msgid "You cannot use the following characters in the name: %1" +msgstr "V názvu nelze použít následující znaky: %1" + +msgid "Clone" +msgstr "Klonovat" + +msgid "Failed to create directory for cloned VM" +msgstr "Nepodařilo se vytvořit adresář pro klonovaný virtuální počítač" + +msgid "Failed to clone VM." +msgstr "Klonování virtuálního počítače se nezdařilo." + +msgid "Directory in use" +msgstr "Adresář se již používá" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "Vybraný adresář je již používán. Vyberte prosím jiný adresář." + +msgid "Create directory failed" +msgstr "Vytvoření adresáře se nezdařilo" + +msgid "Unable to create the directory for the new system" +msgstr "Nelze vytvořit adresář pro nový systém" + +msgid "Configuration write failed" +msgstr "Selhal zápis konfigurace" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Nebylo možné otevřít konfigurační soubor %1 pro zápis" + +msgid "Error adding system" +msgstr "Chyba při přidávání systému" + +msgid "Remove directory failed" +msgstr "Odstranění adresáře se nezdařilo" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Některé soubory v adresáři zařízení nebylo možné odstranit. Odstraňte je prosím ručně." + +msgid "Build" +msgstr "Build" + +msgid "Version" +msgstr "Verze" + +msgid "An update to 86Box is available: %1 %2" +msgstr "Je k dispozici aktualizace pro 86Box: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Při kontrole aktualizací došlo k chybě: %1" + +msgid "An update to 86Box is available!" +msgstr "Je k dispozici aktualizace pro 86Box!" + +msgid "Warning" +msgstr "Varování" + +msgid "&Kill" +msgstr "Vynutit &ukončení" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Ukončení virtuálního počítače může způsobit ztrátu dat. Proveďte to pouze v případě, že proces programu 86Box zamrzne.\n\nOpravdu chcete ukončit virtuální počítač \"%1\"?" + +msgid "&Delete" +msgstr "&Odstranit" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Opravdu chcete odstranit virtuální počítač \"%1\" a všechny jeho soubory? Tuto akci nelze vrátit zpět!" + +msgid "Show &config file" +msgstr "Zobrazit &konfigurační soubor" + +msgid "No screenshot" +msgstr "Žádný snímek obrazovky" + +msgid "Search" +msgstr "Hledat" + +msgid "Searching for VMs..." +msgstr "Hledání virtuálních počítačů..." + +msgid "Found %1" +msgstr "Nalezeno %1" + +msgid "System" +msgstr "Systém" + +msgid "Storage" +msgstr "Úložiště" + +msgid "Disk %1: " +msgstr "Disk %1: " + +msgid "No disks" +msgstr "Žádné disky" + +msgid "Audio" +msgstr "Zvuk" + +msgid "Audio:" +msgstr "Zvuk:" + msgid "ACPI shutdown" msgstr "Vypnout skrze rozhraní ACPI" +msgid "ACP&I shutdown" +msgstr "Vypnout skrze rozhraní ACP&I" + msgid "Hard disk (%1)" msgstr "Pevný disk (%1)" @@ -943,10 +1360,10 @@ msgid "Add Existing Hard Disk" msgstr "Přidat existující pevný disk" msgid "HDI disk images cannot be larger than 4 GB." -msgstr "Obraz disku formátu HDI nemůžou být větší než 4 GB." +msgstr "Obrazy disku formátu HDI nemůžou být větší než 4 GB." msgid "Disk images cannot be larger than 127 GB." -msgstr "Obraz disku nemůžou být větší než 127 GB." +msgstr "Obrazy disku nemůžou být větší než 127 GB." msgid "Hard disk images" msgstr "Obrazy pevného disku" @@ -958,7 +1375,7 @@ msgid "Unable to write file" msgstr "Nebylo možné zapisovat do souboru" msgid "HDI or HDX images with a sector size other than 512 are not supported." -msgstr "Obraz disku ve formátu HDI nebo HDX s velikostí sektoru jinou než 512 bajtů nejsou podporovány." +msgstr "Obrazy disku ve formátu HDI nebo HDX s velikostí sektoru jinou než 512 bajtů nejsou podporovány." msgid "Disk image file already exists" msgstr "Soubor obrazu disku již existuje" @@ -1042,16 +1459,16 @@ msgid "VHD files" msgstr "Soubory VHD" msgid "Select the parent VHD" -msgstr "Vyberte nadřazený virtuální disk" +msgstr "Vyberte nadřazený VHD disk" msgid "This could mean that the parent image was modified after the differencing image was created.\n\nIt can also happen if the image files were moved or copied, or by a bug in the program that created this disk.\n\nDo you want to fix the timestamps?" -msgstr "To může znamenat, že se obsahy nadřazeného disku změnily po vytvoření rozdílového disku.\n\nTato chyba také může nastat, pokud byl obraz disku kopírován nebo přesunut, nebo kvůli chybě v programu, který jej vytvořil.\n\nChcete časová razítka opravit?" +msgstr "Toto může znamenat, že se obsahy nadřazeného disku změnily po vytvoření rozdílového disku.\n\nTato chyba také může nastat, pokud byl obraz disku kopírován nebo přesunut, nebo kvůli chybě v programu, který jej vytvořil.\n\nChcete časová razítka opravit?" msgid "Parent and child disk timestamps do not match" msgstr "Časová razítka nadřazeného a podřazeného disku nesouhlasí" msgid "Could not fix VHD timestamp." -msgstr "Nebylo možné opravit časové razítko VHD." +msgstr "Nebylo možné opravit časové razítko VHD disku." msgid "MFM/RLL" msgstr "MFM/RLL" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 KB" @@ -1186,10 +1606,10 @@ msgid "WinBox is no longer supported" msgstr "WinBox již není podporován" msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." -msgstr "Vývoj správce WinBox byl zastaven v roce 2022 z důvodu nedostatku správců. Vzhledem k tomu, že naše úsilí směřujeme k tomu, abychom 86Box ještě vylepšili, rozhodli jsme se WinBox jako správce již nepodporovat.\n\nProstřednictvím WinBoxu nebudou poskytovány žádné další aktualizace a pokud jej budete nadále používat s novějšími verzemi 86Boxu, můžete se setkat s nesprávným chováním. Veškerá hlášení o chybách souvisejících s chováním WinBoxu budou uzavřena jako neplatná.\n\nSeznam dalších správců, které můžete používat, najdete na webu 86box.net." +msgstr "Vývoj manažéru WinBox skončil v roce 2022 kvůli nedostatku vývojářů. Jelikož směřujeme naše úsilí k tomu, abychom udělali 86Box ještě lepší, rozhodli jsme se dále nepodporovat WinBox jakožto manažér.\n\nŽádné další aktualizace nebudou skrze WinBox nabízeny a můžete se setkat s nesprávným chováním při běhu s novejšími verzemi emulátoru 86Box. Jakékoliv nahlášené chyby související s manažérem WinBox budou řešeny jako neplatné.\n\nVizte 86box.net pro seznam jiných manažérů, které můžete používat." msgid "Generate" -msgstr "Vytvoř" +msgstr "Generovat" msgid "Joystick configuration" msgstr "Konfigurace joysticku" @@ -1209,44 +1629,41 @@ msgstr "Zařízení MCA" msgid "List of MCA devices:" msgstr "Seznam zařízení MCA:" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Nástroj pro tablety" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "O platformě &Qt" -msgid "About Qt" -msgstr "O programu Qt" - -msgid "MCA devices..." +msgid "&MCA devices..." msgstr "Zařízení MCA ..." -msgid "Show non-primary monitors" +msgid "Show non-&primary monitors" msgstr "Zobrazit neprimární monitory" -msgid "Open screenshots folder..." -msgstr "Otevři složku screenshots..." +msgid "Open screenshots &folder..." +msgstr "Otevřít složku se snímky obrazovky" -msgid "Apply fullscreen stretch mode when maximized" -msgstr "Použití režimu roztá&hnutí při celé obrazovce při maximalizaci" +msgid "Appl&y fullscreen stretch mode when maximized" +msgstr "Použít režim roztá&hnutí při celé obrazovce pro maximalizované okno" -msgid "Cursor/Puck" -msgstr "Kurzor/Puk" +msgid "&Cursor/Puck" +msgstr "&Kurzor/Puk" -msgid "Pen" -msgstr "Pero" +msgid "&Pen" +msgstr "&Pero" -msgid "Host CD/DVD Drive (%1:)" -msgstr "Jednotka CD/DVD hostitele (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "&Jednotka CD/DVD hostitele (%1:)" msgid "&Connected" msgstr "&Připojeno" -msgid "Clear image history" -msgstr "Vymaž historie snímků" +msgid "Clear image &history" +msgstr "Vymaž &historie snímků" msgid "Create..." -msgstr "Vytvoř..." +msgstr "Vytvořit..." msgid "Host CD/DVD Drive (%1)" msgstr "Jednotka CD/DVD hostitele (%1)" @@ -1257,14 +1674,20 @@ msgstr "Neznámá sběrnice" msgid "Null Driver" msgstr "Nulový ovladač" +msgid "NIC:" +msgstr "Síťový adaptér:" + msgid "NIC %1 (%2) %3" -msgstr "NIC %1 (%2) %3" +msgstr "Síťový adaptér %1 (%2) %3" + +msgid "&NIC %1 (%2) %3" +msgstr "&Síťový adaptér %1 (%2) %3" msgid "Render behavior" msgstr "Chování vykreslování" msgid "Use target framerate:" -msgstr "Použij cílovou snímkovou frekvenci:" +msgstr "Použít cílovou snímkovou frekvenci:" msgid " fps" msgstr " fps" @@ -1279,10 +1702,10 @@ msgid "Shaders" msgstr "Shadery" msgid "Remove" -msgstr "Odstraň" +msgstr "Odstranit" msgid "Browse..." -msgstr "Prohlížejte..." +msgstr "Browse..." msgid "Couldn't create OpenGL context." msgstr "Nepodařilo se vytvořit kontext OpenGL." @@ -1306,13 +1729,13 @@ msgid "This machine might have been moved or copied." msgstr "Tento počítač mohl být přemístěn nebo zkopírován." msgid "In order to ensure proper networking functionality, 86Box needs to know if this machine was moved or copied.\n\nSelect \"I Copied It\" if you are not sure." -msgstr "Pro zajištění správné funkce sítě potřebuje 86Box vědět, zda byl tento počítač přesunut nebo zkopírován.\n\nJestliže si nejste jisti, zvolte \"Zkopíroval jsem ho\"." +msgstr "Pro zajištění správné funkce sítě potřebuje 86Box vědět, zda byl tento počítač přesunut nebo zkopírován.\n\nJestliže si nejste jisti, zvolte možnost \"Zkopíroval jsem jej\"." msgid "I Moved It" -msgstr "Přesunul jsem ho" +msgstr "Přesunul jsem jej" msgid "I Copied It" -msgstr "Zkopíroval jsem ho" +msgstr "Zkopíroval jsem jej" msgid "86Box Monitor #" msgstr "86Box Monitor " @@ -1323,17 +1746,20 @@ msgstr "Žádné zařízení MCA." msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" -msgstr "Síťová karta 1" +msgstr "Síťový adaptér 1" msgid "Network Card #2" -msgstr "Síťová karta 2" +msgstr "Síťový adaptér 2" msgid "Network Card #3" -msgstr "Síťová karta 3" +msgstr "Síťový adaptér 3" msgid "Network Card #4" -msgstr "Síťová karta 4" +msgstr "Síťový adaptér 4" msgid "Mode:" msgstr "Režim:" @@ -1351,7 +1777,7 @@ msgid "86Box Unit Tester" msgstr "86Box Unit Tester" msgid "Novell NetWare 2.x Key Card" -msgstr "Klíčová karta Novell NetWare 2.x" +msgstr "Karta s klíčem pro Novell NetWare 2.x" msgid "Serial port passthrough 1" msgstr "Průchod sériového portu 1" @@ -1365,8 +1791,26 @@ msgstr "Průchod sériového portu 3" msgid "Serial port passthrough 4" msgstr "Průchod sériového portu 4" -msgid "Renderer options..." -msgstr "Možnosti vykreslovače..." +msgid "Renderer &options..." +msgstr "Možnosti rendereru..." + +msgid "PC/XT Keyboard" +msgstr "PC/XT klávesnice" + +msgid "AT Keyboard" +msgstr "AT klávesnice" + +msgid "AX Keyboard" +msgstr "AX klávesnice" + +msgid "PS/2 Keyboard" +msgstr "PS/2 klávesnice" + +msgid "PS/55 Keyboard" +msgstr "PS/55 klávesnice" + +msgid "Keys" +msgstr "Klávesy" msgid "Logitech/Microsoft Bus Mouse" msgstr "Sběrnicová myš Logitech/Microsoft" @@ -1377,18 +1821,30 @@ msgstr "Sběrnicová myš Microsoft (InPort)" msgid "Mouse Systems Serial Mouse" msgstr "Sériová myš Mouse Systems" +msgid "Mouse Systems Bus Mouse" +msgstr "Sběrnicová myš Mouse Systems" + msgid "Microsoft Serial Mouse" msgstr "Sériová myš Microsoft" +msgid "Microsoft Serial BallPoint" +msgstr "Sériová myš Microsoft BallPoint" + msgid "Logitech Serial Mouse" msgstr "Sériová myš Logitech" msgid "PS/2 Mouse" -msgstr "Myš PS/2" +msgstr "PS/2 myš" + +msgid "PS/2 QuickPort Mouse" +msgstr "PS/2 myš QuickPort" msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (sériová)" +msgid "Default Baud rate" +msgstr "Výchozí přenosová rychlost" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Modem kompatibilní se standardem Hayes" @@ -1405,7 +1861,7 @@ msgid "Roland CM-32LN Emulation" msgstr "Emulace Roland CM-32LN" msgid "OPL4-ML Daughterboard" -msgstr "Dceřiná deska OPL4-ML" +msgstr "Dceřinná deska OPL4-ML" msgid "System MIDI" msgstr "Systémové MIDI" @@ -1413,11 +1869,53 @@ msgstr "Systémové MIDI" msgid "MIDI Input Device" msgstr "Vstupní zařízení MIDI" -msgid "BIOS Address" -msgstr "Adresa BIOSu" +msgid "BIOS file" +msgstr "Soubor BIOS" + +msgid "BIOS file (ROM #1)" +msgstr "Soubor BIOS (ROM 1)" + +msgid "BIOS file (ROM #2)" +msgstr "Soubor BIOS (ROM 2)" + +msgid "BIOS file (ROM #3)" +msgstr "Soubor BIOS (ROM 3)" + +msgid "BIOS file (ROM #4)" +msgstr "Soubor BIOS (ROM 4)" + +msgid "BIOS address" +msgstr "Adresa BIOS" + +msgid "BIOS address (ROM #1)" +msgstr "Adresa BIOS (ROM 4)" + +msgid "BIOS address (ROM #2)" +msgstr "Adresa BIOS (ROM 4)" + +msgid "BIOS address (ROM #3)" +msgstr "Adresa BIOS (ROM 4)" + +msgid "BIOS address (ROM #4)" +msgstr "Adresa BIOS (ROM 4)" msgid "Enable BIOS extension ROM Writes" -msgstr "Povolení zápisu do rozšiřující paměti ROM systému BIOS" +msgstr "Povolit zápis do paměti ROM s rozšířením BIOS" + +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "Povolit zápis do paměti ROM s rozšířením BIOS (ROM 1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "Povolit zápis do paměti ROM s rozšířením BIOS (ROM 2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "Povolit zápis do paměti ROM s rozšířením BIOS (ROM 3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "Povolit zápis do paměti ROM s rozšířením BIOS (ROM 4)" + +msgid "Linear framebuffer base" +msgstr "Začátek lineárního framebufferu" msgid "Address" msgstr "Adresa" @@ -1425,11 +1923,29 @@ msgstr "Adresa" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "Přerušení sériového portu" + +msgid "Parallel port IRQ" +msgstr "Přerušení paralelního portu" + msgid "BIOS Revision" -msgstr "Revize BIOSu" +msgstr "Revize BIOS" + +msgid "BIOS Version" +msgstr "Verze BIOS" + +msgid "BIOS Language" +msgstr "Jazyk BIOS" + +msgid "IBM 5161 Expansion Unit" +msgstr "Rozšiřující jednotka IBM 5161" + +msgid "IBM Cassette Basic" +msgstr "Kazetový Basic IBM" msgid "Translate 26 -> 17" -msgstr "Přeložit 26 -> 17" +msgstr "Překládat 26 -> 17" msgid "Language" msgstr "Jazyk" @@ -1438,31 +1954,43 @@ msgid "Enable backlight" msgstr "Povolit podsvícení" msgid "Invert colors" -msgstr "Invertování barev" +msgstr "Převrátit barvy" msgid "BIOS size" -msgstr "Velikost BIOSu" +msgstr "Velikost BIOS" + +msgid "BIOS size (ROM #1)" +msgstr "Velikost BIOS (ROM 1)" + +msgid "BIOS size (ROM #2)" +msgstr "Velikost BIOS (ROM 2)" + +msgid "BIOS size (ROM #3)" +msgstr "Velikost BIOS (ROM 3)" + +msgid "BIOS size (ROM #4)" +msgstr "Velikost BIOS (ROM 4)" msgid "Map C0000-C7FFF as UMB" -msgstr "Mapovat C0000-C7FFF jako UMB" +msgstr "Namapovat C0000-C7FFF jako UMB" msgid "Map C8000-CFFFF as UMB" -msgstr "Mapovat C8000-CFFFF jako UMB" +msgstr "Namapovat C8000-CFFFF jako UMB" msgid "Map D0000-D7FFF as UMB" -msgstr "Mapovat D0000-D7FFF jako UMB" +msgstr "Namapovat D0000-D7FFF jako UMB" msgid "Map D8000-DFFFF as UMB" -msgstr "Mapovat D8000-DFFFF jako UMB" +msgstr "Namapovat D8000-DFFFF jako UMB" msgid "Map E0000-E7FFF as UMB" -msgstr "Mapovat E0000-E7FFF jako UMB" +msgstr "Namapovat E0000-E7FFF jako UMB" msgid "Map E8000-EFFFF as UMB" -msgstr "Mapovat E8000-EFFFF jako UMB" +msgstr "Namapovat E8000-EFFFF jako UMB" msgid "JS9 Jumper (JIM)" -msgstr "JS9 propojka (JIM)" +msgstr "Jumper JS9 (JIM)" msgid "MIDI Output Device" msgstr "Výstupní zařízení MIDI" @@ -1471,10 +1999,10 @@ msgid "MIDI Real time" msgstr "MIDI v reálném čase" msgid "MIDI Thru" -msgstr "Průchozí vstupu MIDI" +msgstr "Průchod vstupu MIDI" msgid "MIDI Clockout" -msgstr "Odbíjení hodin MIDI" +msgstr "Výstup MIDI hodin" msgid "SoundFont" msgstr "SoundFont" @@ -1518,6 +2046,9 @@ msgstr "Úroveň dozvuku" msgid "Interpolation Method" msgstr "Metoda interpolace" +msgid "Dynamic Sample Loading" +msgstr "Dynamické načítání vzorků" + msgid "Reverb Output Gain" msgstr "Zesílení výstupu dozvuku" @@ -1546,10 +2077,10 @@ msgid "Controller" msgstr "Řadič" msgid "Show Crosshair" -msgstr "Zobrazení křížového ukazatele" +msgstr "Zobrazit zaměřovací kříž" msgid "DMA" -msgstr "DMA" +msgstr "DMA kanál" msgid "MAC Address" msgstr "Adresa MAC" @@ -1567,7 +2098,7 @@ msgid "TCP/IP listening port" msgstr "Naslouchací port TCP/IP" msgid "Phonebook File" -msgstr "Soubor telefonního seznamu" +msgstr "Soubor s telefonním seznamem" msgid "Telnet emulation" msgstr "Emulace Telnetu" @@ -1579,7 +2110,7 @@ msgid "RAM size" msgstr "Velikost RAMu" msgid "Initial RAM size" -msgstr "Počáteční velikost RAMu" +msgstr "Počáteční velikost RAM" msgid "Serial Number" msgstr "Sériové číslo" @@ -1588,23 +2119,29 @@ msgid "Host ID" msgstr "ID hostitele" msgid "FDC Address" -msgstr "Adresa FDCu" +msgstr "Adresa FDC" msgid "MPU-401 Address" msgstr "Adresa MPU-401" msgid "MPU-401 IRQ" -msgstr "IRQ MPU-401" +msgstr "Přerušení MPU-401" msgid "Receive MIDI input" -msgstr "Příjem vstupu MIDI" +msgstr "Přijímat vstup MIDI" msgid "Low DMA" -msgstr "Nízký DMA" +msgstr "Nízký DMA kanál" msgid "Enable Game port" msgstr "Povolit herní port" +msgid "SID Model" +msgstr "Model SID" + +msgid "SID Filter Strength" +msgstr "Síla filtru SID" + msgid "Surround module" msgstr "Modul Surround" @@ -1612,16 +2149,22 @@ msgid "CODEC" msgstr "CODEC" msgid "Raise CODEC interrupt on CODEC setup (needed by some drivers)" -msgstr "Vyvolání přerušení CODEC při nastavení CODEC (potřebují některé ovladače)" +msgstr "Vyvolát přerušení CODEC při nastavení CODEC (potřebují některé ovladače)" msgid "SB Address" msgstr "Adresa SB" +msgid "Adlib Address" +msgstr "Adresa Adlib" + +msgid "Use EEPROM setting" +msgstr "Použít nastavení EEPROM" + msgid "WSS IRQ" msgstr "IRQ WSS" msgid "WSS DMA" -msgstr "DMA WSS" +msgstr "DMA kanál WSS" msgid "Enable OPL" msgstr "Povolit OPL" @@ -1630,7 +2173,7 @@ msgid "Receive MIDI input (MPU-401)" msgstr "Příjem vstupu MIDI (MPU-401)" msgid "SB low DMA" -msgstr "Nízký DMA SB" +msgstr "Nízký DMA kanál SB" msgid "6CH variant (6-channel)" msgstr "Varianta 6CH (6 kanálů)" @@ -1639,13 +2182,13 @@ msgid "Enable CMS" msgstr "Povolit CMS" msgid "Mixer" -msgstr "Směšovač" +msgstr "Mixér" msgid "High DMA" -msgstr "Vysoký DMA" +msgstr "Vysoký DMA kanál" msgid "Control PC speaker" -msgstr "Ovládát reproduktoru PC" +msgstr "Ovládat PC Speaker" msgid "Memory size" msgstr "Velikost pamĕti" @@ -1696,14 +2239,20 @@ msgid "MMIO Address" msgstr "Adresa MMIO" msgid "RAMDAC type" -msgstr "Typ RAMDACu" +msgstr "Typ RAMDAC" msgid "Blend" -msgstr "Směs" +msgstr "Smísit" + +msgid "Font" +msgstr "Písmo" msgid "Bilinear filtering" msgstr "Bilineární filtrování" +msgid "Video chroma-keying" +msgstr "Barevné klíčování obrazu" + msgid "Dithering" msgstr "Dithering" @@ -1744,13 +2293,40 @@ msgid "Transfer Speed" msgstr "Rychlost přenosu" msgid "EMS mode" -msgstr "Režím EMS" +msgstr "Režim EMS" + +msgid "EMS Address" +msgstr "Adresa EMS" + +msgid "EMS 1 Address" +msgstr "Adresa EMS 1" + +msgid "EMS 2 Address" +msgstr "Adresa EMS 2" + +msgid "EMS Memory Size" +msgstr "Velikost paměti EMS" + +msgid "EMS 1 Memory Size" +msgstr "Velikost paměti EMS 1" + +msgid "EMS 2 Memory Size" +msgstr "Velikost paměti EMS 2" + +msgid "Enable EMS" +msgstr "Povolit EMS" + +msgid "Enable EMS 1" +msgstr "Povolit EMS 1" + +msgid "Enable EMS 2" +msgstr "Povolit EMS 2" msgid "Address for > 2 MB" msgstr "Adresa pro > 2 MB" msgid "Frame Address" -msgstr "Rámcová adresa" +msgstr "Adresa rámce" msgid "USA" msgstr "Spojené státy" @@ -1764,11 +2340,11 @@ msgstr "Vždy při zvolené rychlosti" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "Nastavení BIOS + klávesové zkratky (vypnuto během POST)" -msgid "64 kB starting from F0000" -msgstr "64 kB od F0000" +msgid "64 KB starting from F0000" +msgstr "64 KB od F0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB od E0000 (invertovaný MSB adresy, nejprve posledních 64 kB)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KB od E0000 (invertovaný MSB adresy, nejprve posledních 64 KB)" msgid "Sine" msgstr "Sinusový" @@ -1789,7 +2365,7 @@ msgid "Non-timed (original)" msgstr "Bez časování (originální)" msgid "45 Hz (JMP2 not populated)" -msgstr "45 Hz (JMP2 není vyplněn)" +msgstr "45 Hz (JMP2 není osazen)" msgid "Two" msgstr "Dvě" @@ -1801,10 +2377,10 @@ msgid "Wheel" msgstr "Kolečko" msgid "Five + Wheel" -msgstr "Pět + kolečko" +msgstr "Pět s kolečkem" msgid "Five + 2 Wheels" -msgstr "" +msgstr "Pět se 2 kolečky" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 sériová / SMT3(R)V" @@ -1867,7 +2443,10 @@ msgid "256 KB" msgstr "256 KB" msgid "Composite" -msgstr "Kompozitný" +msgstr "Kompozitní" + +msgid "True color" +msgstr "True Color" msgid "Old" msgstr "Starý" @@ -1902,6 +2481,15 @@ msgstr "Interpolace sRGB" msgid "Linear interpolation" msgstr "Lineární interpolace" +msgid "Has secondary 8x8 character set" +msgstr "Má druhou sadu 8x8 znaků" + +msgid "Has Quadcolor II daughter board" +msgstr "Má dceřinnou desků Quadcolor II" + +msgid "Alternate monochrome contrast" +msgstr "Alternativní monochromatický kontrast" + msgid "128 KB" msgstr "128 KB" @@ -1935,6 +2523,9 @@ msgstr "Jantarový" msgid "Gray" msgstr "Šedý" +msgid "Grayscale" +msgstr "Odstíny šedi" + msgid "Color" msgstr "Barevný" @@ -1948,13 +2539,19 @@ msgid "Other languages" msgstr "Ostatní jazyky" msgid "Bochs latest" -msgstr "Bochs nejnovější" +msgstr "Nejnovější Bochs" + +msgid "Apply overscan deltas" +msgstr "Použít delty přesahu" + +msgid "Mono Interlaced" +msgstr "Monochromatický s prokládaním" msgid "Mono Non-Interlaced" msgstr "Monochromatický bez prokládání" msgid "Color Interlaced" -msgstr "Barevný prokládaný" +msgstr "Barevný s prokládaním" msgid "Color Non-Interlaced" msgstr "Barevný bez prokládání" @@ -1962,6 +2559,9 @@ msgstr "Barevný bez prokládání" msgid "3Dfx Voodoo Graphics" msgstr "Grafický akcelerátor 3dfx Voodoo" +msgid "3Dfx Voodoo 2" +msgstr "Grafický akcelerátor 3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 jednotky TMU)" @@ -2017,7 +2617,7 @@ msgid "Host Serial Device" msgstr "Hostitelské sériové zařízení" msgid "Name of pipe" -msgstr "Název potrubí" +msgstr "Název pojmenované roury" msgid "Data bits" msgstr "Datové bity" @@ -2029,7 +2629,10 @@ msgid "Baud Rate of Passthrough" msgstr "Přenosová rychlost průchodu" msgid "Named Pipe (Server)" -msgstr "Pojmenované potrubí (server)" +msgstr "Pojmenovaná roura (server)" + +msgid "Named Pipe (Client)" +msgstr "Pojmenovaná roura (klient)" msgid "Host Serial Passthrough" msgstr "Průchod sériového portu hostitele" @@ -2038,7 +2641,7 @@ msgid "E&ject %1" msgstr "&Vyjmout %1" msgid "&Unmute" -msgstr "&Roztišit" +msgstr "&Zrušit ztišení" msgid "Softfloat FPU" msgstr "Softfloat FPU" @@ -2047,28 +2650,28 @@ msgid "High performance impact" msgstr "Vysoký dopad na výkon" msgid "[Generic] RAM Disk (max. speed)" -msgstr "[Generic] Disk RAM (max. rychlost)" +msgstr "[Obecný] Disk RAM (max. rychlost)" msgid "[Generic] 1989 (3500 RPM)" -msgstr "" +msgstr "[Obecný] 1989 (3500 ot./m)" msgid "[Generic] 1992 (3600 RPM)" -msgstr "" +msgstr "[Obecný] 1992 (3600 ot./m)" msgid "[Generic] 1994 (4500 RPM)" -msgstr "" +msgstr "[Obecný] 1994 (4500 ot./m)" msgid "[Generic] 1996 (5400 RPM)" -msgstr "" +msgstr "[Obecný] 1996 (5400 ot./m)" msgid "[Generic] 1997 (5400 RPM)" -msgstr "" +msgstr "[Obecný] 1997 (5400 ot./m)" msgid "[Generic] 1998 (5400 RPM)" -msgstr "" +msgstr "[Obecný] 1998 (5400 ot./m)" msgid "[Generic] 2000 (7200 RPM)" -msgstr "" +msgstr "[Obecný] 2000 (7200 ot./m)" msgid "IBM 8514/A clone (ISA)" msgstr "Klon IBM 8514/A (ISA)" @@ -2076,6 +2679,12 @@ msgstr "Klon IBM 8514/A (ISA)" msgid "Vendor" msgstr "Výrobce" +msgid "30 Hz (JMP2 = 1)" +msgstr "30 Hz (JMP2 = 1)" + +msgid "60 Hz (JMP2 = 2)" +msgstr "60 Hz (JMP2 = 2)" + msgid "Generic PC/XT Memory Expansion" msgstr "Obecné rozšíření paměti PC/XT" @@ -2083,67 +2692,265 @@ msgid "Generic PC/AT Memory Expansion" msgstr "Obecné rozšíření paměti PC/AT" msgid "Unable to find Dot-Matrix fonts" -msgstr "Nastala chyba při nachození jehličkových písem" +msgstr "Nebylo možné nalézt písma pro jehličkovou tiskárnu" msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." msgstr "Pro emulaci obecné jehličkové tiskárny ESC/P jsou vyžadována písma TrueType ve složce \"roms/printer/fonts\"." msgid "Inhibit multimedia keys" -msgstr "" +msgstr "Potlačit stisk multimediálních kláves" msgid "Ask for confirmation before saving settings" -msgstr "" +msgstr "Vyžadovat potvrzení před uložením nastavení" msgid "Ask for confirmation before hard resetting" -msgstr "" +msgstr "Vyžadovat potvrzení před resetováním" msgid "Ask for confirmation before quitting" -msgstr "" +msgstr "Vyžadovat potvrzení před ukončením" msgid "Options" -msgstr "" +msgstr "Možnosti" msgid "Model" -msgstr "" +msgstr "Model" msgid "Model:" -msgstr "" +msgstr "Model:" msgid "Failed to initialize Vulkan renderer." -msgstr "" +msgstr "Selhala inicializace rendereru Vulkan." msgid "GLSL Error" -msgstr "" +msgstr "Chyba GLSL" msgid "Could not load shader: %1" -msgstr "" +msgstr "Nebylo možné načíst shader: %1" msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" -msgstr "" +msgstr "Je vyžadováno OpenGL verze 3.0 nebo větší. Současná verze GLSL je %1.%2" msgid "Could not load texture: %1" -msgstr "" +msgstr "Nebylo možné načíst texturu: %1" msgid "Could not compile shader:\n\n%1" -msgstr "" +msgstr "Nebylo možné zkompilovat shader:\n\n%1" msgid "Program not linked:\n\n%1" -msgstr "" +msgstr "Program nebyl spojen:\n\n%1" msgid "Shader Manager" -msgstr "" +msgstr "Správce shaderů" msgid "Shader Configuration" -msgstr "" +msgstr "Konfigurace shaderu" msgid "Add" -msgstr "" +msgstr "Přidat" msgid "Move up" -msgstr "" +msgstr "Posunout výš" msgid "Move down" -msgstr "" +msgstr "Posunout níž" msgid "Could not load file %1" -msgstr "" +msgstr "Nebylo možné načíst soubor %1" + +msgid "Key Bindings:" +msgstr "Nastavení kláves" + +msgid "Action" +msgstr "Akce" + +msgid "Keybind" +msgstr "Klávesy" + +msgid "Clear binding" +msgstr "Smazat nastavení" + +msgid "Bind" +msgstr "Nastavit" + +msgid "Bind Key" +msgstr "Nastavit klávesu" + +msgid "Enter key combo:" +msgstr "Zadejte kombinaci kláves" + +msgid "Bind conflict" +msgstr "Konflikt nastavení" + +msgid "This key combo is already in use." +msgstr "Tato kombinace kláves je již použita." + +msgid "Send Control+Alt+Del" +msgstr "Stisknout Ctrl+Alt+Del" + +msgid "Send Control+Alt+Escape" +msgstr "Stisknout Ctrl+Alt+Esc" + +msgid "Toggle fullscreen" +msgstr "Přepnout režim celé obrazovky" + +msgid "Screenshot" +msgstr "Pořídit snímek obrazovky" + +msgid "Release mouse pointer" +msgstr "Uvolnit kurzor myši" + +msgid "Toggle pause" +msgstr "Pozastavit nebo obnovit" + +msgid "Toggle mute" +msgstr "Přepnout ztišení" + +msgid "Text files" +msgstr "Textové soubory" + +msgid "ROM files" +msgstr "Soubory ROM" + +msgid "SoundFont files" +msgstr "Soubory SoundFont" + +msgid "Local Switch" +msgstr "Lokální switch" + +msgid "Remote Switch" +msgstr "Vzdálený switch" + +msgid "Switch:" +msgstr "Switch:" + +msgid "Hub Mode" +msgstr "Režim hubu" + +msgid "Hostname:" +msgstr "Hostitelské jméno" + +msgid "ISA RAM:" +msgstr "ISA paměť RAM:" + +msgid "ISA ROM:" +msgstr "ISA paměť ROM:" + +msgid "&Wipe NVRAM" +msgstr "&Vymazat NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Tímto se smažou všechny soubory NVRAM (a související soubory) virtuálního počítače umístěné v podadresáři \"nvr\". V případě potřeby budete muset znovu nakonfigurovat nastavení systému BIOS (a případně i dalších zařízení uvnitř virtuálního počítače).\n\nOpravdu chcete smazat veškerý obsah NVRAM virtuálního počítače \"%1\"?" + +msgid "Success" +msgstr "Úspěch" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Úspěšně vymazán obsah NVRAM virtuálního počítače \"%1\"" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Při pokusu o vymazání obsahu NVRAM virtuálního počítače \"%1\" došlo k chybě" + +msgid "%1 VM Manager" +msgstr "Správce virtuálních počítačů %1" + +msgid "%n disk(s)" +msgstr "%n disk(ů)" + +msgid "Unknown Status" +msgstr "Neznámý stav" + +msgid "No Machines Found!" +msgstr "Žádné počítače nebyly nalezeny!" + +msgid "Check for updates on startup" +msgstr "Zkontrolovat aktualizace při spuštění" + +msgid "Unable to determine release information" +msgstr "Nebylo možné zjistit informace o vydání" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Při kontrole aktualizací došlo k chybě:\n\n%1\n\nZkuste to prosím znovu později." + +msgid "Update check complete" +msgstr "Kontrola aktualizací dokončena" + +msgid "stable" +msgstr "stabilní" + +msgid "beta" +msgstr "beta" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Používáte nejnovější %1 verzi 86Boxu: %2" + +msgid "version" +msgstr "verze" + +msgid "build" +msgstr "build" + +msgid "You are currently running version %1." +msgstr "Právě používáte verzi %1." + +msgid "Version %1 is now available." +msgstr "K dispozici je nyní verze %1." + +msgid "You are currently running build %1." +msgstr "Právě používáte build %1." + +msgid "Build %1 is now available." +msgstr "K dispozici je nyní build %1." + +msgid "Would you like to visit the download page?" +msgstr "Chcete navštívit stránku pro stažení?" + +msgid "Visit download page" +msgstr "Navštívit stránku pro stažení" + +msgid "Update check" +msgstr "Kontrola aktualizací" + +msgid "Checking for updates..." +msgstr "Probíhá kontrola aktualizací..." + +msgid "86Box Update" +msgstr "Aktualizace 86Box" + +msgid "Release notes:" +msgstr "Poznámky k vydání:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Havárie virtuálního počítače" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "Proces virtuálního počítače \"%1\" byl neočekávaně ukončen s kódem ukončení %2." + +msgid "The system will not be added." +msgstr "Systém nebude přidán." + +msgid "&Update mouse every CPU frame" +msgstr "&Aktualizovat myš při každém CPU rámci" + +msgid "Hue" +msgstr "Odstín" + +msgid "Saturation" +msgstr "Sytost" + +msgid "Contrast" +msgstr "Kontrast" + +msgid "Brightness" +msgstr "Jas" + +msgid "Sharpness" +msgstr "Ostrost" + +msgid "&CGA composite settings..." +msgstr "Nastavení kompozitního výstupu &CGA..." + +msgid "CGA composite settings" +msgstr "Nastavení kompozitního výstupu CGA" diff --git a/src/qt/languages/de-DE.po b/src/qt/languages/de-DE.po index 267e4b13e..28caf0d71 100644 --- a/src/qt/languages/de-DE.po +++ b/src/qt/languages/de-DE.po @@ -13,7 +13,7 @@ msgid "&Keyboard requires capture" msgstr "&Tastatur benötigt das Einfangen des Mauszeigers" msgid "&Right CTRL is left ALT" -msgstr "&Die rechte Strg-Taste ist die Linke Alt-Taste" +msgstr "&Die rechte Strg-Taste ist die linke Alt-Taste" msgid "&Hard Reset..." msgstr "&Kaltstart..." @@ -25,13 +25,19 @@ msgid "Ctrl+Alt+&Esc" msgstr "Strg+Alt+&Esc" msgid "&Pause" -msgstr "&Pause" +msgstr "&Pausieren" -msgid "E&xit..." -msgstr "Be&enden..." +msgid "Pause" +msgstr "Pausieren" + +msgid "Re&sume" +msgstr "&Fortsetzen" + +msgid "E&xit" +msgstr "&Beenden" msgid "&View" -msgstr "&Ansicht" +msgstr "A&nsicht" msgid "&Hide status bar" msgstr "&Statusleiste ausblenden" @@ -40,10 +46,10 @@ msgid "Hide &toolbar" msgstr "&Werkzeugleiste ausblenden" msgid "&Resizeable window" -msgstr "&Größenverstellbares Fenster" +msgstr "G&rößenverstellbares Fenster" msgid "R&emember size && position" -msgstr "&Größe && Position merken" +msgstr "Größe && &Position merken" msgid "Re&nderer" msgstr "Re&nderer" @@ -51,19 +57,16 @@ msgstr "Re&nderer" msgid "&Qt (Software)" msgstr "&Qt (Software)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" -msgstr "Open&GL (3.0-Kern)" +msgstr "Open&GL (3.0 Core)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." -msgstr "Fenstergröße einstellen..." +msgid "Specify &dimensions..." +msgstr "Fenstergröße &einstellen..." -msgid "F&orce 4:3 display ratio" +msgid "Force &4:3 display ratio" msgstr "&4:3-Seitenverhältnis erzwingen" msgid "&Window scale factor" @@ -99,8 +102,8 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" -msgstr "Filterungsmethode" +msgid "Fi<er method" +msgstr "Filterungsmet&hode" msgid "&Nearest" msgstr "&Nächster Nachbar" @@ -112,10 +115,10 @@ msgid "Hi&DPI scaling" msgstr "Hi&DPI-Skalierung" msgid "&Fullscreen" -msgstr "&Vollbild" +msgstr "Vo&llbild" msgid "Fullscreen &stretch mode" -msgstr "&Vollbild-Skalierungsmodus" +msgstr "Vollbild-S&kalierungsmodus" msgid "&Full screen stretch" msgstr "&Vollbild-Streckung" @@ -132,8 +135,8 @@ msgstr "&Integer-Skalierung" msgid "4:&3 Integer scale" msgstr "4:&3 Integer-Skalierung" -msgid "E&GA/(S)VGA settings" -msgstr "E&GA/(S)VGA-Einstellungen" +msgid "EGA/(S)&VGA settings" +msgstr "EGA/(S)&VGA-Einstellungen" msgid "&Inverted VGA monitor" msgstr "&Invertierte VGA-Anzeige" @@ -142,11 +145,17 @@ msgid "VGA screen &type" msgstr "&VGA-Bildschirmtyp" msgid "RGB &Color" -msgstr "&RGB-Farbe" +msgstr "RGB-&Farbe" + +msgid "RGB (no brown)" +msgstr "RGB (ohne Braun)" msgid "&RGB Grayscale" msgstr "&RGB-Graustufen" +msgid "Generic RGBI color monitor" +msgstr "Generischer RGBI-Farbmonitor" + msgid "&Amber monitor" msgstr "&Bernstein-Monitor" @@ -183,6 +192,9 @@ msgstr "&Werkzeuge" msgid "&Settings..." msgstr "&Optionen..." +msgid "Settings..." +msgstr "Einstellungen..." + msgid "&Update status bar icons" msgstr "&Statusleistenicons aktualisieren" @@ -190,7 +202,7 @@ msgid "Take s&creenshot" msgstr "S&creenshot aufnehmen" msgid "S&ound" -msgstr "S&ound" +msgstr "&Ton" msgid "&Preferences..." msgstr "&Einstellungen..." @@ -241,7 +253,7 @@ msgid "E&ject" msgstr "A&uswerfen" msgid "&Image..." -msgstr "&Cartridgeabbild..." +msgstr "&Abbild..." msgid "E&xport to 86F..." msgstr "&In das 86F-Format e&xportieren..." @@ -346,10 +358,13 @@ msgid "Machine:" msgstr "System:" msgid "Configure" -msgstr "Einstellen" +msgstr "Konfigurieren" + +msgid "CPU:" +msgstr "Prozessor:" msgid "CPU type:" -msgstr "CPU-Typ:" +msgstr "Prozessor-Typ:" msgid "Speed:" msgstr "Geschwindigkeit:" @@ -373,7 +388,7 @@ msgid "Time synchronization" msgstr "Zeitsynchronisierung" msgid "Disabled" -msgstr "Ausgeschaltet" +msgstr "Ohne" msgid "Enabled (local time)" msgstr "Eingeschaltet (Lokale Uhrzeit)" @@ -384,11 +399,20 @@ msgstr "Eingeschaltet (UTC)" msgid "Dynamic Recompiler" msgstr "Dynamischer Recompiler" +msgid "CPU frame size" +msgstr "CPU-Framegröße" + +msgid "Larger frames (less smooth)" +msgstr "Größere Frames (weniger flüssig)" + +msgid "Smaller frames (smoother)" +msgstr "Kleinere Frames (flüssiger)" + msgid "Video:" -msgstr "Videokarte:" +msgstr "Grafikkarte:" msgid "Video #2:" -msgstr "Videokarte 2:" +msgstr "Grafikkarte 2:" msgid "Voodoo 1 or 2 Graphics" msgstr "Voodoo 1 oder 2 Grafik" @@ -399,12 +423,27 @@ msgstr "IBM 8514/A-Grafik" msgid "XGA Graphics" msgstr "XGA-Grafik" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "IBM PS/55 Grafik-Adapter" + +msgid "Keyboard:" +msgstr "Tastatur:" + +msgid "Keyboard" +msgstr "Tastatur" + msgid "Mouse:" msgstr "Maus:" +msgid "Mouse" +msgstr "Maus" + msgid "Joystick:" msgstr "Joystick:" +msgid "Joystick" +msgstr "Joystick" + msgid "Joystick 1..." msgstr "Joystick 1..." @@ -435,6 +474,9 @@ msgstr "MIDI Ausgabegerät:" msgid "MIDI In Device:" msgstr "MIDI Eingabegerät:" +msgid "MIDI Out:" +msgstr "" + msgid "Standalone MPU-401" msgstr "Eigenständiges-MPU-401-Gerät" @@ -474,6 +516,9 @@ msgstr "LPT3-Gerät:" msgid "LPT4 Device:" msgstr "LPT4-Gerät:" +msgid "Internal LPT ECP DMA:" +msgstr "" + msgid "Serial port 1" msgstr "Serielle Schnittstelle 1" @@ -498,11 +543,11 @@ msgstr "Parallelport 3" msgid "Parallel port 4" msgstr "Parallelport 4" -msgid "HD Controller:" -msgstr "HDD-Controller:" - msgid "FD Controller:" -msgstr "FD-Controller:" +msgstr "Disketten-Controller:" + +msgid "CD-ROM Controller:" +msgstr "CD-ROM-Controller:" msgid "Tertiary IDE Controller" msgstr "Tertiärer IDE-Controller" @@ -510,6 +555,9 @@ msgstr "Tertiärer IDE-Controller" msgid "Quaternary IDE Controller" msgstr "Quartärer IDE-Controller" +msgid "Hard disk" +msgstr "Festplatte" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "Kassette" msgid "Hard disks:" msgstr "Festplatten:" +msgid "Firmware Version" +msgstr "Firmware-Version" + msgid "&New..." msgstr "&Neu..." @@ -588,8 +639,14 @@ msgstr "CD-ROM-Laufwerke:" msgid "MO drives:" msgstr "MO-Laufwerke:" -msgid "ZIP drives:" -msgstr "ZIP-Laufwerke:" +msgid "MO:" +msgstr "" + +msgid "Removable disks:" +msgstr "Wechseldatenträger:" + +msgid "Removable disk drives:" +msgstr "Wechseldatenträger:" msgid "ZIP 250" msgstr "ZIP 250" @@ -598,7 +655,10 @@ msgid "ISA RTC:" msgstr "ISA-Echtzeituhr:" msgid "ISA Memory Expansion" -msgstr "ISA-Speichererweiterung:" +msgstr "ISA-Speichererweiterung" + +msgid "ISA ROM Cards" +msgstr "ISA-ROM-Karte" msgid "Card 1:" msgstr "Steckkarte 1:" @@ -612,6 +672,15 @@ msgstr "Steckkarte 3:" msgid "Card 4:" msgstr "Steckkarte 4:" +msgid "Generic ISA ROM Board" +msgstr "Generische ISA-ROM-Platine" + +msgid "Generic Dual ISA ROM Board" +msgstr "Generische Dual-ISA-ROM-Platine" + +msgid "Generic Quad ISA ROM Board" +msgstr "Generische Quad-ISA-ROM-Platine" + msgid "ISABugger device" msgstr "ISABugger-Gerät" @@ -633,14 +702,20 @@ msgstr " - PAUSIERT" msgid "Speed" msgstr "Geschwindigkeit" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Wechseldatenträger %1 (%2): %3" -msgid "ZIP images" -msgstr "ZIP-Abbilder" +msgid "&Removable disk %1 (%2): %3" +msgstr "&Wechseldatenträger %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Wechseldatenträgerabbilder" + +msgid "Image %1" +msgstr "Abbild %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." -msgstr "86Box konnte keine nutzbaren ROM-Dateien finden.\n\nBitte besuchen Sie download, laden ein ROM-Set herunter und extrahieren dies in das \"roms\"-Verzeichnis." +msgstr "86Box konnte keine nutzbaren ROM-Dateien finden.\n\nBitte besuchen Sie die Download-Seite, laden ein ROM-Set herunter und extrahieren es in das \"roms\"-Verzeichnis." msgid "(empty)" msgstr "(leer)" @@ -688,7 +763,7 @@ msgid "Input devices" msgstr "Eingabegeräte" msgid "Sound" -msgstr "Sound" +msgstr "Ton" msgid "Network" msgstr "Netzwerk" @@ -696,14 +771,32 @@ msgstr "Netzwerk" msgid "Ports (COM & LPT)" msgstr "Anschlüsse (COM + LPT)" +msgid "Ports" +msgstr "Anschlüsse" + +msgid "Serial ports:" +msgstr "Serielle Anschlüsse:" + +msgid "Parallel ports:" +msgstr "Parallele Anschlüsse:" + msgid "Storage controllers" msgstr "Speichercontroller" msgid "Hard disks" msgstr "Festplatten" +msgid "Disks:" +msgstr "" + +msgid "Floppy:" +msgstr "Diskette:" + +msgid "Controllers:" +msgstr "Controller:" + msgid "Floppy & CD-ROM drives" -msgstr "Disketten- + CD-ROM-Laufwerke" +msgstr "Disketten- & CD-ROM-Laufwerke" msgid "Other removable devices" msgstr "Andere Wechsellaufwerke" @@ -711,6 +804,9 @@ msgstr "Andere Wechsellaufwerke" msgid "Other peripherals" msgstr "Andere Peripheriegeräte" +msgid "Other devices" +msgstr "Andere Geräte" + msgid "Click to capture mouse" msgstr "Klicken zum Einfangen des Mauszeigers" @@ -777,12 +873,39 @@ msgstr "4-Achsen-, 4-Tasten-Joystick" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Pedale" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Thrustmaster Flight Control System" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Rudder Control System" + +msgid "2-button gamepad(s)" +msgstr "2-Tasten-Gamepad(s)" + +msgid "2-button flight yoke" +msgstr "2-Tasten-Steuerhorn" + +msgid "4-button gamepad" +msgstr "4-Tasten-Gamepad" + +msgid "4-button flight yoke" +msgstr "4-Tasten-Steuerhorn" + +msgid "2-button flight yoke with throttle" +msgstr "2-Tasten-Steuerhorn mit Schubregler" + +msgid "4-button flight yoke with throttle" +msgstr "4-Tasten-Steuerhorn mit Schubregler" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Win95 Lenkrad (3-Achsen, 4-Tasten)" + msgid "None" msgstr "Ohne" @@ -792,6 +915,9 @@ msgstr "%1 MB (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Diskette %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Diskette %1 (%2): %3" + msgid "Advanced sector images" msgstr "Fortgeschrittene Sektorabbilder" @@ -813,6 +939,9 @@ msgstr "GhostPCL konnte nicht initialisiert werden" msgid "MO %1 (%2): %3" msgstr "MO %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&MO %1 (%2): %3" + msgid "MO images" msgstr "MO-Abbilder" @@ -820,7 +949,16 @@ msgid "Welcome to 86Box!" msgstr "Willkommen bei 86Box!" msgid "Internal device" -msgstr "Interne Gerät" +msgstr "Internes Gerät" + +msgid "&File" +msgstr "&Datei" + +msgid "&New machine..." +msgstr "&Neue Maschine" + +msgid "&Check for updates..." +msgstr "&Auf Aktualisierungen prüfen..." msgid "Exit" msgstr "Beenden" @@ -841,7 +979,7 @@ msgid "About 86Box" msgstr "Über 86Box" msgid "86Box v" -msgstr "86Box Version " +msgstr "86Box v" msgid "An emulator of old computers\n\nAuthors: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n\nWith previous core contributions from Sarah Walker, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information." msgstr "Ein Emulator für alte Computer\n\nAutoren: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne sowie andere.\n\nMit früheren Kernbeiträgen von Sarah Walker, leilei, JohnElliott, greatpsycho sowie andere.\n\nÜbersetzt von: dob205\n\nVeröffentlicht unter der GNU General Public License in der Version 2 oder neuer. Siehe LICENSE für mehr Informationen." @@ -889,7 +1027,7 @@ msgid "You are loading an unsupported configuration" msgstr "Zur Zeit wird eine nicht unterstützte Konfiguration geladen" msgid "CPU type filtering based on selected machine is disabled for this emulated machine.\n\nThis makes it possible to choose a CPU that is otherwise incompatible with the selected machine. However, you may run into incompatibilities with the machine BIOS or other software.\n\nEnabling this setting is not officially supported and any bug reports filed may be closed as invalid." -msgstr "Das Filtern der CPU-Typen basierend auf dem ausgewählten System ist für dieses System deaktiviert.\n\nDies ermöglicht es, dass man eine sonst nicht mit dem ausgewählten System inkompatible CPU auswählen kann. Allerdings kann dies zu Inkompatiblilitäten mit dem BIOS des Systems oder anderen Programmen kommen.\n\nDas Aktivieren dieser Einstellung wird nicht unterstützt und sämtliche Bugreports können als \"ungültig\" geschlossen werden." +msgstr "Das Filtern der CPU-Typen basierend auf dem ausgewählten System ist für dieses System deaktiviert.\n\nDies ermöglicht es, eine mit dem ausgewählten System inkompatible CPU auszuwählen. Allerdings kann dies zu Inkompatiblilitäten mit dem BIOS des Systems oder anderen Programmen kommen.\n\nDas Aktivieren dieser Einstellung wird nicht unterstützt und sämtliche Bugreports können als \"ungültig\" geschlossen werden." msgid "Continue" msgstr "Fortfahren" @@ -897,12 +1035,18 @@ msgstr "Fortfahren" msgid "Cassette: %1" msgstr "Kassette: %1" +msgid "C&assette: %1" +msgstr "K&assette: %1" + msgid "Cassette images" msgstr "Kassettenabbilder" msgid "Cartridge %1: %2" msgstr "Cartridge %1: %2" +msgid "Car&tridge %1: %2" +msgstr "Car&tridge %1: %2" + msgid "Cartridge images" msgstr "Cartridgeabbilder" @@ -912,6 +1056,9 @@ msgstr "Fortsetzen" msgid "Pause execution" msgstr "Pausieren" +msgid "Ctrl+Alt+Del" +msgstr "Strg+Alt+Entf" + msgid "Press Ctrl+Alt+Del" msgstr "Strg+Alt+Entf drücken" @@ -921,20 +1068,290 @@ msgstr "Strg+Alt+Esc drücken" msgid "Hard reset" msgstr "Kaltstart" +msgid "Force shutdown" +msgstr "Abschaltung erzwingen" + +msgid "Start" +msgstr "Einschalten" + +msgid "Not running" +msgstr "Läuft nicht" + +msgid "Running" +msgstr "Läuft" + +msgid "Paused" +msgstr "Pausiert" + +msgid "Waiting" +msgstr "Wartend" + +msgid "Powered Off" +msgstr "Ausgeschaltet" + +msgid "%n running" +msgstr "%n laufend" + +msgid "%n paused" +msgstr "%n pausiert" + +msgid "%n waiting" +msgstr "%n wartend" + +msgid "%1 total" +msgstr "%1 insgesamt" + +msgid "VMs: %1" +msgstr "" + +msgid "System Directory:" +msgstr "Systemverzeichnis" + +msgid "Choose directory" +msgstr "Verzeichnis auswählen" + +msgid "Choose configuration file" +msgstr "Konfigurationsdatei auswählen" + +msgid "86Box configuration files (86box.cfg)" +msgstr "86Box Konfigurationsdateien (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Lesen der Konfiguration fehlgeschlagen" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Die ausgewählte Konfigurationsdatei konnte nicht eingelesen werden: %1" + +msgid "Use regular expressions in search box" +msgstr "Benutze reguläre Ausdrücke in der Suche" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 Maschinen sind aktuell aktiv. Bist du sicher, dass du den VM Manager trotzdem schließen möchtest?" + +msgid "Add new system wizard" +msgstr "Assistent für ein neues System" + +msgid "Introduction" +msgstr "Einleitung" + +msgid "This will help you add a new system to 86Box." +msgstr "Hilft dir ein neues System zu 86Box hinzuzufügen" + +msgid "New configuration" +msgstr "Neue Konfiguration" + +msgid "Complete" +msgstr "Abgeschlossen" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "Der Assistent wird nun die Konfiguration für das neue System starten." + +msgid "Use existing configuration" +msgstr "Vorhande Konfiguration benutzen" + +msgid "Type some notes here" +msgstr "Trage hier Notizen ein" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Füge den Inhalt einer bereits existierenden Konfigurationsdatei in das untere Feld ein." + +msgid "Load configuration from file" +msgstr "Lade Konfiguration aus Datei" + +msgid "System name" +msgstr "Systemname" + +msgid "System name:" +msgstr "Systemname:" + +msgid "System name cannot contain certain characters" +msgstr "Der Name des Systems darf bestimmte Zeichen nicht enthalten" + +msgid "System name already exists" +msgstr "Das System existiert bereits" + +msgid "Please enter a directory for the system" +msgstr "Bitte gebe ein Verzeichnis für das System ein" + +msgid "Directory does not exist" +msgstr "Das Verzeichnis existiert nicht" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "Ein neues Systemverzeichnis wird in dem oben angegebenen Verzeichnis erstellt werden" + +msgid "System location:" +msgstr "Systemverzeichnis:" + +msgid "System name and location" +msgstr "Systemname und Verzeichnis" + +msgid "Enter the name of the system and choose the location" +msgstr "Gebe einen Namen für das System ein und wähle ein Verzeichnis" + +msgid "Enter the name of the system" +msgstr "Gebe den Namen des Systems ein" + +msgid "Please enter a system name" +msgstr "Bitte gebe einen Systemnamen ein" + +msgid "Display name (optional):" +msgstr "Anzeigename (optional):" + +msgid "Display name:" +msgstr "Anzeigename:" + +msgid "Set display name" +msgstr "Anzeigename festlegen" + +msgid "Enter the new display name (blank to reset)" +msgstr "Gebe den neuen Anzeigenamen ein (leer lassen zum Zurücksetzen)" + +msgid "Change &display name..." +msgstr "&Anzeigename ändern" + +msgid "Context Menu" +msgstr "Kontextmenü" + +msgid "&Open folder..." +msgstr "&Ordner öffnen" + +msgid "Open p&rinter tray..." +msgstr "D&ruckerausgabe öffnen..." + +msgid "Set &icon..." +msgstr "&Symbol setzen" + +msgid "Select an icon" +msgstr "Wähle ein Symbol aus" + +msgid "C&lone..." +msgstr "K&lonen..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "Virtuelle Maschine \"%1\" (%2) wird geklont werden nach:" + +msgid "Directory %1 already exists" +msgstr "Das Verzeichnis %1 existiert bereits" + +msgid "You cannot use the following characters in the name: %1" +msgstr "Folgene Zeichen können nicht für den Namen verwendet werden: %1" + +msgid "Clone" +msgstr "Klonen" + +msgid "Failed to create directory for cloned VM" +msgstr "Fehler bei Erstellung des Verzeichnisses für die zu klonende VM" + +msgid "Failed to clone VM." +msgstr "Klonen der VM fehlgeschlagen." + +msgid "Directory in use" +msgstr "Verzeichnis bereits in Benutzung" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "Das ausgewählte Verzeichnis wird bereits benutzt. Bitte wähle ein anderes Verzeichnis." + +msgid "Create directory failed" +msgstr "Erstellung des Verzeichnisses fehlgeschlagen" + +msgid "Unable to create the directory for the new system" +msgstr "Das Verzeichnis für das neue System könnte nicht erstellt werden" + +msgid "Configuration write failed" +msgstr "Schreiben der Konfiguration fehlgeschlagen" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Die Konfigurationsdatei %1 konnte nicht zum Schreiben geöffnet werden" + +msgid "Error adding system" +msgstr "Fehler beim Hinzufügen des Systems" + +msgid "Remove directory failed" +msgstr "Fehler beim Entfernen des Verzeichnisses" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Eine Dateien im Verzeichnis der Maschine konnten nicht gelöscht werden, bitte lösche diese manuell." + +msgid "Build" +msgstr "" + +msgid "Version" +msgstr "" + +msgid "An update to 86Box is available: %1 %2" +msgstr "Eine Aktualisierung für 86Box is verfügbar: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Bei der Suche nach Aktualisierungen trat ein fehler auf: %1" + +msgid "An update to 86Box is available!" +msgstr "Eine Aktualisierung für 86Box ist verfügbar!" + +msgid "Warning" +msgstr "Warnung" + +msgid "&Kill" +msgstr "&Beenden erzwingen" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Das Erzwingen des Beendens einer virtuellen Maschine kann zu Datenverlust führen. Führe dies nur durch wenn der 86Box sich aufgehangen hat.\n\nBist du sicher das du das Beenden der virtuellen Maschine erzwingen möchtest \"%1\"?" + +msgid "&Delete" +msgstr "&Löschen" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Bist du sicher das du die virtuelle Maschine inklusive all ihrer Dateien löschen möchtest? Diese Aktion kann nicht rückgängig gemacht werden!" + +msgid "Show &config file" +msgstr "&Konfigurationsdatei anzeigen" + +msgid "No screenshot" +msgstr "Keine Bildschirmaufnahme" + +msgid "Search" +msgstr "Suche" + +msgid "Searching for VMs..." +msgstr "Suche nach VMs..." + +msgid "Found %1" +msgstr "Gefunden %1" + +msgid "System" +msgstr "" + +msgid "Storage" +msgstr "Speicherplatz" + +msgid "Disk %1: " +msgstr "" + +msgid "No disks" +msgstr "Keine Disks" + +msgid "Audio" +msgstr "" + +msgid "Audio:" +msgstr "" + msgid "ACPI shutdown" -msgstr "ACPI basiertes Herunterfahren" +msgstr "Über ACPI herunterfahren" + +msgid "ACP&I shutdown" +msgstr "Über ACP&I herunterfahren" msgid "Hard disk (%1)" msgstr "Festplatte (%1)" msgid "MFM/RLL or ESDI CD-ROM drives never existed" -msgstr "MFM/RLL- oder ESDI CD-ROM-Laufwerke existieren nicht" +msgstr "MFM/RLL- oder ESDI-CD-ROM-Laufwerke existieren nicht" msgid "Custom..." msgstr "Angepasst..." msgid "Custom (large)..." -msgstr "Angepasst (Groß)..." +msgstr "Angepasst (groß)..." msgid "Add New Hard Disk" msgstr "Neue Festplatte hinzufügen" @@ -943,10 +1360,10 @@ msgid "Add Existing Hard Disk" msgstr "Bestehende Festplatte hinzufügen" msgid "HDI disk images cannot be larger than 4 GB." -msgstr "HDI-Abbilder können nicht größer als 4 GB groß sein." +msgstr "HDI-Abbilder können nicht größer als 4 GB sein." msgid "Disk images cannot be larger than 127 GB." -msgstr "Festplattenabbilder können nicht größer als 127 GB groß sein." +msgstr "Festplattenabbilder können nicht größer als 127 GB sein." msgid "Hard disk images" msgstr "Festplattenabbilder" @@ -970,10 +1387,10 @@ msgid "Disk image created" msgstr "Disk-Abbild wurde erstellt" msgid "Make sure the file exists and is readable." -msgstr "Stell sicher, dass die Datei existiert und lesbar ist." +msgstr "Stelle sicher, dass die Datei existiert und lesbar ist." msgid "Make sure the file is being saved to a writable directory." -msgstr "Stell sicher, dass die Datei in ein Verzeichnis mit Schreibberechtigungen gespeichert wird." +msgstr "Stelle sicher, dass die Datei in ein Verzeichnis mit Schreibberechtigungen gespeichert wird." msgid "Disk image too large" msgstr "Das Festplattenabbild ist zu groß" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 KB" @@ -1209,41 +1629,38 @@ msgstr "MCA-Geräte" msgid "List of MCA devices:" msgstr "Liste die MCA-Geräte:" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Tablet-Werkzeug" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "Über &Qt" -msgid "About Qt" -msgstr "Über Qt" - -msgid "MCA devices..." +msgid "&MCA devices..." msgstr "MCA-Geräte..." -msgid "Show non-primary monitors" +msgid "Show non-&primary monitors" msgstr "Nicht-primäre Monitore anzeigen" -msgid "Open screenshots folder..." -msgstr "Ordner „screenshots“ öffnen..." +msgid "Open screenshots &folder..." +msgstr "Ordner „screenshots“ ö&ffnen..." -msgid "Apply fullscreen stretch mode when maximized" -msgstr "Vollbild-Streckmodus aktivieren, wenn das Fenster maximiert ist" +msgid "Appl&y fullscreen stretch mode when maximized" +msgstr "Vollbild-S&treckmodus aktivieren, wenn das Fenster maximiert ist" -msgid "Cursor/Puck" -msgstr "Mauszeiger/Puck" +msgid "&Cursor/Puck" +msgstr "&Mauszeiger/Puck" -msgid "Pen" -msgstr "Stift" +msgid "&Pen" +msgstr "&Stift" -msgid "Host CD/DVD Drive (%1:)" -msgstr "Host-CD/DVD-Laufwerk (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "&Host-CD/DVD-Laufwerk (%1:)" msgid "&Connected" msgstr "&Verbunden" -msgid "Clear image history" -msgstr "Abbildverlauf löschen" +msgid "Clear image &history" +msgstr "&Abbildverlauf löschen" msgid "Create..." msgstr "Erstellen..." @@ -1257,8 +1674,14 @@ msgstr "Unbekannter Bus" msgid "Null Driver" msgstr "Nulltreiber" +msgid "NIC:" +msgstr "Netzwerkkarte:" + msgid "NIC %1 (%2) %3" -msgstr "NIC %1 (%2) %3" +msgstr "Netzwerkkarte %1 (%2) %3" + +msgid "&NIC %1 (%2) %3" +msgstr "&Netzwerkkarte %1 (%2) %3" msgid "Render behavior" msgstr "Rendering-Verhalten" @@ -1315,7 +1738,7 @@ msgid "I Copied It" msgstr "Ich habe es kopiert" msgid "86Box Monitor #" -msgstr "86Box Monitor " +msgstr "86Box-Monitor #" msgid "No MCA devices." msgstr "Keine MCA-Geräte." @@ -1323,6 +1746,9 @@ msgstr "Keine MCA-Geräte." msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" msgstr "Netzwerkkarte 1" @@ -1345,7 +1771,7 @@ msgid "Adapter:" msgstr "Adapter:" msgid "VDE Socket:" -msgstr "VDE Port:" +msgstr "VDE Anschluss:" msgid "86Box Unit Tester" msgstr "86Box-Gerätetester" @@ -1354,19 +1780,37 @@ msgid "Novell NetWare 2.x Key Card" msgstr "Novell NetWare 2.x Schlüsselkarte" msgid "Serial port passthrough 1" -msgstr "Durchreichung der Serielle Schnittstelle 1" +msgstr "Serielle Schnittstelle 1 durchreichen" msgid "Serial port passthrough 2" -msgstr "Durchreichung der Serielle Schnittstelle 2" +msgstr "Serielle Schnittstelle 2 durchreichen" msgid "Serial port passthrough 3" -msgstr "Durchreichung der Serielle Schnittstelle 3" +msgstr "Serielle Schnittstelle 3 durchreichen" msgid "Serial port passthrough 4" -msgstr "Durchreichung der Serielle Schnittstelle 4" +msgstr "Serielle Schnittstelle 4 durchreichen" -msgid "Renderer options..." -msgstr "Renderer-Optionen..." +msgid "Renderer &options..." +msgstr "Renderer-&Optionen..." + +msgid "PC/XT Keyboard" +msgstr "PC/XT-Tastatur" + +msgid "AT Keyboard" +msgstr "AT-Tastatur" + +msgid "AX Keyboard" +msgstr "AX-Tastatur" + +msgid "PS/2 Keyboard" +msgstr "PS/2-Tastatur" + +msgid "PS/55 Keyboard" +msgstr "PS/55-Tastatur" + +msgid "Keys" +msgstr "Tasten" msgid "Logitech/Microsoft Bus Mouse" msgstr "Logitech/Microsoft Bus-Maus" @@ -1377,18 +1821,30 @@ msgstr "Microsoft Bus-Maus (InPort)" msgid "Mouse Systems Serial Mouse" msgstr "Mouse Systems Serielle Maus" +msgid "Mouse Systems Bus Mouse" +msgstr "Mouse Systems Bus-Maus" + msgid "Microsoft Serial Mouse" msgstr "Microsoft Serielle Maus" +msgid "Microsoft Serial BallPoint" +msgstr "Microsoft Serial BallPoint" + msgid "Logitech Serial Mouse" msgstr "Logitech Serielle Maus" msgid "PS/2 Mouse" msgstr "PS/2-Maus" +msgid "PS/2 QuickPort Mouse" +msgstr "PS/2-QuickPort-Maus" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (Seriell)" +msgid "Default Baud rate" +msgstr "Standard-Baudrate" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Standard Hayes-kompatibles Modem" @@ -1413,21 +1869,81 @@ msgstr "System MIDI" msgid "MIDI Input Device" msgstr "MIDI-Eingabegerät" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "BIOS-Datei" + +msgid "BIOS file (ROM #1)" +msgstr "BIOS-Datei (ROM #1)" + +msgid "BIOS file (ROM #2)" +msgstr "BIOS-Datei (ROM #2)" + +msgid "BIOS file (ROM #3)" +msgstr "BIOS-Datei (ROM #3)" + +msgid "BIOS file (ROM #4)" +msgstr "BIOS-Datei (ROM #4)" + +msgid "BIOS address" msgstr "BIOS-Adresse" +msgid "BIOS address (ROM #1)" +msgstr "BIOS-Adresse (ROM #1)" + +msgid "BIOS address (ROM #2)" +msgstr "BIOS-Adresse (ROM #2)" + +msgid "BIOS address (ROM #3)" +msgstr "BIOS-Adresse (ROM #3)" + +msgid "BIOS address (ROM #4)" +msgstr "BIOS-Adresse (ROM #4)" + msgid "Enable BIOS extension ROM Writes" msgstr "Schreiben in BIOS Erweiterungs ROMs zulassen" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "Schreiben in BIOS-Erweiterungs-ROMs (ROM #1) zulassen" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "Schreiben in BIOS-Erweiterungs-ROMs (ROM #2) zulassen" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "Schreiben in BIOS-Erweiterungs-ROMs (ROM #3) zulassen" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "Schreiben in BIOS-Erweiterungs-ROMs (ROM #4) zulassen" + +msgid "Linear framebuffer base" +msgstr "Lineare Framebuffer-Basis" + msgid "Address" msgstr "Adresse" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "IRQ des seriellen Ports" + +msgid "Parallel port IRQ" +msgstr "IRQ des parallelen Ports" + msgid "BIOS Revision" msgstr "BIOS-Revision" +msgid "BIOS Version" +msgstr "BIOS-Version" + +msgid "BIOS Language" +msgstr "BIOS-Sprache" + +msgid "IBM 5161 Expansion Unit" +msgstr "IBM 5161 Erweiterungseinheit" + +msgid "IBM Cassette Basic" +msgstr "IBM Kassetten-Basic" + msgid "Translate 26 -> 17" msgstr "Übersetzen 26 -> 17" @@ -1443,6 +1959,18 @@ msgstr "Farben invertieren" msgid "BIOS size" msgstr "BIOS-Größe" +msgid "BIOS size (ROM #1)" +msgstr "BIOS-Größe (ROM #1)" + +msgid "BIOS size (ROM #2)" +msgstr "BIOS-Größe (ROM #2)" + +msgid "BIOS size (ROM #3)" +msgstr "BIOS-Größe (ROM #3)" + +msgid "BIOS size (ROM #4)" +msgstr "BIOS-Größe (ROM #4)" + msgid "Map C0000-C7FFF as UMB" msgstr "C0000-C7FFF als UMB zuordnen" @@ -1518,6 +2046,9 @@ msgstr "Nachhall-Pegel" msgid "Interpolation Method" msgstr "Interpolationsmethode" +msgid "Dynamic Sample Loading" +msgstr "Dynamisches Sample-Laden" + msgid "Reverb Output Gain" msgstr "Nachhall-Ausgangsverstärkung" @@ -1605,6 +2136,12 @@ msgstr "Niedrige DMA" msgid "Enable Game port" msgstr "Game-Port einschalten" +msgid "SID Model" +msgstr "SID-Modell" + +msgid "SID Filter Strength" +msgstr "SID-Filterstärke" + msgid "Surround module" msgstr "Surround-Modul" @@ -1617,6 +2154,12 @@ msgstr "CODEC-Interrupt bei CODEC-Einrichtung auslösen (wird von einigen Treibe msgid "SB Address" msgstr "SB-Adresse" +msgid "Adlib Address" +msgstr "Adlib-Adresse" + +msgid "Use EEPROM setting" +msgstr "EEPROM-Einstellung verwenden" + msgid "WSS IRQ" msgstr "WSS-IRQ" @@ -1701,9 +2244,15 @@ msgstr "RAMDAC-Typ" msgid "Blend" msgstr "Mischung" +msgid "Font" +msgstr "Schriftart" + msgid "Bilinear filtering" msgstr "Bilineare Filterung" +msgid "Video chroma-keying" +msgstr "Video-Chroma-Keying" + msgid "Dithering" msgstr "Dithering" @@ -1746,6 +2295,33 @@ msgstr "Übertragungsgeschwindigkeit" msgid "EMS mode" msgstr "EMS-Modus" +msgid "EMS Address" +msgstr "EMS-Adresse" + +msgid "EMS 1 Address" +msgstr "EMS 1-Adresse" + +msgid "EMS 2 Address" +msgstr "EMS 2-Adresse" + +msgid "EMS Memory Size" +msgstr "EMS-Speichergröße" + +msgid "EMS 1 Memory Size" +msgstr "EMS 1-Speichergröße" + +msgid "EMS 2 Memory Size" +msgstr "EMS 2-Speichergröße" + +msgid "Enable EMS" +msgstr "EMS einschalten" + +msgid "Enable EMS 1" +msgstr "EMS 1 einschalten" + +msgid "Enable EMS 2" +msgstr "EMS 2 einschalten" + msgid "Address for > 2 MB" msgstr "Adresse für > 2 MB" @@ -1764,11 +2340,11 @@ msgstr "Immer mit der gewählten Geschwindigkeit" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "BIOS-Einstellung + Hotkeys (aus während POST)" -msgid "64 kB starting from F0000" -msgstr "64 kB ab F0000" +msgid "64 KB starting from F0000" +msgstr "64 KB ab F0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB ab E0000 (MSB der Adresse invertiert, letzte 64KB zuerst)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KB ab E0000 (MSB der Adresse invertiert, letzte 64 KB zuerst)" msgid "Sine" msgstr "Sinus" @@ -1804,7 +2380,7 @@ msgid "Five + Wheel" msgstr "Fünf + Rad" msgid "Five + 2 Wheels" -msgstr "" +msgstr "Fünf + 2 Räder" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 Seriell / SMT3(R)V" @@ -1869,6 +2445,9 @@ msgstr "256 KB" msgid "Composite" msgstr "Composite" +msgid "True color" +msgstr "True color" + msgid "Old" msgstr "Alt" @@ -1902,6 +2481,15 @@ msgstr "sRGB-Interpolation" msgid "Linear interpolation" msgstr "Lineare Interpolation" +msgid "Has secondary 8x8 character set" +msgstr "Hat sekundären 8x8-Zeichensatz" + +msgid "Has Quadcolor II daughter board" +msgstr "Hat Quadcolor II-Tochterplatine" + +msgid "Alternate monochrome contrast" +msgstr "Alternativer Monochrom-Kontrast" + msgid "128 KB" msgstr "128 KB" @@ -1935,6 +2523,9 @@ msgstr "Bernsteinfarben" msgid "Gray" msgstr "Graues" +msgid "Grayscale" +msgstr "Graustufen" + msgid "Color" msgstr "Farbe" @@ -1950,6 +2541,12 @@ msgstr "Andere Sprachen" msgid "Bochs latest" msgstr "Bochs neueste" +msgid "Apply overscan deltas" +msgstr "Overscan-Deltas anwenden" + +msgid "Mono Interlaced" +msgstr "Monochrom (Mit Zeilensprungverfahren)" + msgid "Mono Non-Interlaced" msgstr "Monochrom (Kein Zeilensprungverfahren)" @@ -1962,6 +2559,9 @@ msgstr "Farbe (Kein Zeilensprungverfahren)" msgid "3Dfx Voodoo Graphics" msgstr "3Dfx Voodoo Grafik" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 TMUs)" @@ -2008,13 +2608,13 @@ msgid "Protection Dongle for Savage Quest" msgstr "Kopierschutz-Dongle für Savage Quest" msgid "Serial Passthrough Device" -msgstr "Gerät der Durchreichung der Serielle Schnittstelle" +msgstr "Serielles Gerät durchreichen" msgid "Passthrough Mode" -msgstr "Modus der Durchreichung" +msgstr "Durchreich-Modus" msgid "Host Serial Device" -msgstr "Host Serielles Gerät" +msgstr "Serielles Gerät des Hosts" msgid "Name of pipe" msgstr "Name der Pipe" @@ -2026,16 +2626,19 @@ msgid "Stop bits" msgstr "Stoppbits" msgid "Baud Rate of Passthrough" -msgstr "Baudrate der Durchreichung" +msgstr "Durchreich-Baudrate" msgid "Named Pipe (Server)" -msgstr "Benanntes Pipe (Server)" +msgstr "Benannte Pipe (Server)" + +msgid "Named Pipe (Client)" +msgstr "Benannte Pipe (Client)" msgid "Host Serial Passthrough" -msgstr "Durchreichung der seriellen Schnittstelle des Hosts" +msgstr "Serielle Schnittstelle des Hosts durchreichen" msgid "E&ject %1" -msgstr "A&uswerfen %1" +msgstr "%1 a&uswerfen" msgid "&Unmute" msgstr "&Ton einschalten" @@ -2047,28 +2650,28 @@ msgid "High performance impact" msgstr "Hohe Auswirkung auf die Leistung" msgid "[Generic] RAM Disk (max. speed)" -msgstr "[Generic] RAM-Diskette (maximale Geschwindigkeit)" +msgstr "[Generisch] RAM-Disk (maximale Geschwindigkeit)" msgid "[Generic] 1989 (3500 RPM)" -msgstr "" +msgstr "[Generisch] 1989 (3500 U/min)" msgid "[Generic] 1992 (3600 RPM)" -msgstr "" +msgstr "[Generisch] 1992 (3600 U/min)" msgid "[Generic] 1994 (4500 RPM)" -msgstr "" +msgstr "[Generisch] 1994 (4500 U/min)" msgid "[Generic] 1996 (5400 RPM)" -msgstr "" +msgstr "[Generisch] 1996 (5400 U/min)" msgid "[Generic] 1997 (5400 RPM)" -msgstr "" +msgstr "[Generisch] 1997 (5400 U/min)" msgid "[Generic] 1998 (5400 RPM)" -msgstr "" +msgstr "[Generisch] 1998 (5400 U/min)" msgid "[Generic] 2000 (7200 RPM)" -msgstr "" +msgstr "[Generisch] 2000 (7200 U/min)" msgid "IBM 8514/A clone (ISA)" msgstr "IBM 8514/A-Klon (ISA)" @@ -2076,6 +2679,12 @@ msgstr "IBM 8514/A-Klon (ISA)" msgid "Vendor" msgstr "Hersteller" +msgid "30 Hz (JMP2 = 1)" +msgstr "30 Hz (JMP2 = 1)" + +msgid "60 Hz (JMP2 = 2)" +msgstr "60 Hz (JMP2 = 2)" + msgid "Generic PC/XT Memory Expansion" msgstr "Generische PC/XT-Speichererweiterung" @@ -2089,61 +2698,259 @@ msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for t msgstr "TrueType-Schriften in das \"roms/printer/fonts\"-Verzeichnis sind für die Allgemeines ESC/P Nadel-Druckers erforderlich." msgid "Inhibit multimedia keys" -msgstr "" +msgstr "Multimedia-Tasten unterdrücken" msgid "Ask for confirmation before saving settings" -msgstr "" +msgstr "Vor dem Speichern der Einstellungen um Bestätigung bitten" msgid "Ask for confirmation before hard resetting" -msgstr "" +msgstr "Vor dem Kaltstart um Bestätigung bitten" msgid "Ask for confirmation before quitting" -msgstr "" +msgstr "Vor dem Beenden um Bestätigung bitten" msgid "Options" -msgstr "" +msgstr "Optionen" msgid "Model" -msgstr "" +msgstr "Modell" msgid "Model:" -msgstr "" +msgstr "Modell:" msgid "Failed to initialize Vulkan renderer." -msgstr "" +msgstr "Fehler bei der Initialisierung des Vulkan-Renderers." msgid "GLSL Error" -msgstr "" +msgstr "GLSL-Fehler" msgid "Could not load shader: %1" -msgstr "" +msgstr "Shader konnte nicht geladen werden: %1" msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" -msgstr "" +msgstr "OpenGL-Version 3.0 oder höher ist erforderlich. Die aktuelle GLSL-Version ist %1.%2" msgid "Could not load texture: %1" -msgstr "" +msgstr "Textur konnte nicht geladen werden: %1" msgid "Could not compile shader:\n\n%1" -msgstr "" +msgstr "Shader konnte nicht kompiliert werden:\n\n%1" msgid "Program not linked:\n\n%1" -msgstr "" +msgstr "Programm nicht verknüpft:\n\n%1" msgid "Shader Manager" -msgstr "" +msgstr "Shader-Manager" msgid "Shader Configuration" -msgstr "" +msgstr "Shader-Konfiguration" msgid "Add" -msgstr "" +msgstr "Hinzufügen" msgid "Move up" -msgstr "" +msgstr "Nach oben verschieben" msgid "Move down" -msgstr "" +msgstr "Nach unten verschieben" msgid "Could not load file %1" +msgstr "Datei %1 konnte nicht geladen werden" + +msgid "Key Bindings:" +msgstr "Tastenbelegungen:" + +msgid "Action" +msgstr "Aktion" + +msgid "Keybind" +msgstr "Tastenbelegung" + +msgid "Clear binding" +msgstr "Belegung löschen" + +msgid "Bind" +msgstr "Belegen" + +msgid "Bind Key" +msgstr "Taste belegen" + +msgid "Enter key combo:" +msgstr "Tastenkombination eingeben:" + +msgid "Bind conflict" +msgstr "Belegungskonflikt" + +msgid "This key combo is already in use." +msgstr "Diese Tastenkombination wird bereits verwendet." + +msgid "Send Control+Alt+Del" +msgstr "Strg+Alt+Entf senden" + +msgid "Send Control+Alt+Escape" +msgstr "Strg+Alt+Esc senden" + +msgid "Toggle fullscreen" +msgstr "Vollbild umschalten" + +msgid "Screenshot" +msgstr "Bildschirmaufnahme" + +msgid "Release mouse pointer" +msgstr "Mauszeiger freigeben" + +msgid "Toggle pause" +msgstr "Pause umschalten" + +msgid "Toggle mute" +msgstr "Stummschaltung umschalten" + +msgid "Text files" +msgstr "Textdateien" + +msgid "ROM files" +msgstr "ROM-Dateien" + +msgid "SoundFont files" +msgstr "SoundFont-Dateien" + +msgid "Local Switch" +msgstr "Lokaler Schalter" + +msgid "Remote Switch" +msgstr "Entfernter Schalter" + +msgid "Switch:" +msgstr "Schalter:" + +msgid "Hub Mode" +msgstr "Hub-Modus" + +msgid "Hostname:" +msgstr "Hostname:" + +msgid "ISA RAM:" msgstr "" + +msgid "ISA ROM:" +msgstr "" + +msgid "&Wipe NVRAM" +msgstr "NVRAM leeren" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Dadurch werden alle NVRAM-Dateien (und zugehörige Dateien) der virtuellen Maschine im Unterverzeichnis \"nvr\" werden gelöscht. Gegebenenfalls müssen die BIOS-Einstellungen (und möglicherweise auch die Einstellungen anderer Geräte innerhalb der VM) erneut konfiguriert werden. Möchtest du wirklich den gesamten NVRAM-Inhalt der virtuellen Maschine \"%1\" löschen?" + +msgid "Success" +msgstr "Erfolgreich" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Der NVRAM-Inhlat der virtuellen Maschine wurde erfolgreich geleert \"%1\"" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Beim Leeren des NVRAMs der virtuellen Maschine ist ein Fehler aufgetreten \"%1\"" + +msgid "%1 VM Manager" +msgstr "" + +msgid "%n disk(s)" +msgstr "" + +msgid "Unknown Status" +msgstr "Unbekannter Status" + +msgid "No Machines Found!" +msgstr "Keine Maschinen gefunden!" + +msgid "Check for updates on startup" +msgstr "Beim Programmstart auf Aktualisierungen prüfen" + +msgid "Unable to determine release information" +msgstr "Die Veröffentlichungsinformationen können nicht ermittelt werden." + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Bei der Prüfung auf Aktualisierungen trat ein Fehler auf:\n\n%1\n\nBitte versuche es später erneut." + +msgid "Update check complete" +msgstr "Prüfung auf Aktualisierungen abgeschlossen" + +msgid "stable" +msgstr "Stabil" + +msgid "beta" +msgstr "Beta" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Du nutzt bereits die aktuelleste %1 Version von 86Box: %2" + +msgid "version" +msgstr "Version" + +msgid "build" +msgstr "Build" + +msgid "You are currently running version %1." +msgstr "Du nutzt bereits die aktuelleste version %1." + +msgid "Version %1 is now available." +msgstr "Version %1 ist nun verfügbar." + +msgid "You are currently running build %1." +msgstr "Du nutzt aktuell Build %1." + +msgid "Build %1 is now available." +msgstr "Build %1 ist nun verfügbar." + +msgid "Would you like to visit the download page?" +msgstr "Möchtest du die Download-Webseite besuchen?" + +msgid "Visit download page" +msgstr "Download-Webseite besuchen" + +msgid "Update check" +msgstr "Aktualisierungsprüfung" + +msgid "Checking for updates..." +msgstr "Prüfe auf Aktualisierungen..." + +msgid "86Box Update" +msgstr "86Box Aktualisierung" + +msgid "Release notes:" +msgstr "Versionshinweise:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Absturz der virtuellen Maschine" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "Der Prozess der virtuellen Maschine \"%1\" wurde unerwartet mit dem Exit-Code %2 beendet." + +msgid "The system will not be added." +msgstr "Das System wird nicht hinzugefügt werden." + +msgid "&Update mouse every CPU frame" +msgstr "&Maus bei jedem CPU-Frame aktualisieren" + +msgid "Hue" +msgstr "Farbton" + +msgid "Saturation" +msgstr "Sättigung" + +msgid "Contrast" +msgstr "Kontrast" + +msgid "Brightness" +msgstr "Helligkeit" + +msgid "Sharpness" +msgstr "Schärfe" + +msgid "&CGA composite settings..." +msgstr "Optionen des &CGA-Composite-Modus..." + +msgid "CGA composite settings" +msgstr "Optionen des CGA-Composite-Modus" diff --git a/src/qt/languages/en-GB.po b/src/qt/languages/en-GB.po index 550bc3ab4..ba9f30421 100644 --- a/src/qt/languages/en-GB.po +++ b/src/qt/languages/en-GB.po @@ -24,8 +24,8 @@ msgstr "Unable to initialise GhostPCL" msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." msgstr "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behaviour will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." -msgid "Apply fullscreen stretch mode when maximized" -msgstr "Apply fullscreen stretch mode when maximised" +msgid "Appl&y fullscreen stretch mode when maximized" +msgstr "Appl&y fullscreen stretch mode when maximised" msgid "Failed to initialize network driver" msgstr "Failed to initialise network driver" @@ -74,3 +74,6 @@ msgstr "Colour" msgid "Failed to initialize Vulkan renderer." msgstr "Failed to initialise Vulkan renderer." + +msgid "True color" +msgstr "True colour" diff --git a/src/qt/languages/es-ES.po b/src/qt/languages/es-ES.po index 5454ab1de..021cc36ab 100644 --- a/src/qt/languages/es-ES.po +++ b/src/qt/languages/es-ES.po @@ -27,8 +27,14 @@ msgstr "Ctrl+Alt+&Esc" msgid "&Pause" msgstr "&Pausa" -msgid "E&xit..." -msgstr "&Salir..." +msgid "Pause" +msgstr "Pausa" + +msgid "Re&sume" +msgstr "Co&ntinuar" + +msgid "E&xit" +msgstr "&Salir" msgid "&View" msgstr "&Vista" @@ -40,7 +46,7 @@ msgid "Hide &toolbar" msgstr "Ocultar &barra de herramientas" msgid "&Resizeable window" -msgstr "&Ventana redimensionable" +msgstr "Ven&tana redimensionable" msgid "R&emember size && position" msgstr "&Recordar tamaño y posición" @@ -51,20 +57,17 @@ msgstr "Re&nderizador" msgid "&Qt (Software)" msgstr "&Qt (Software)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" msgstr "Open&GL (3.0 Core)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." +msgid "Specify &dimensions..." msgstr "E&specificar dimensiones..." -msgid "F&orce 4:3 display ratio" -msgstr "F&orzar ratio 4:3" +msgid "Force &4:3 display ratio" +msgstr "Forzar ratio &4:3" msgid "&Window scale factor" msgstr "&Factor de escalado de ventana" @@ -99,7 +102,7 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" +msgid "Fi<er method" msgstr "&Método de filtrado" msgid "&Nearest" @@ -115,7 +118,7 @@ msgid "&Fullscreen" msgstr "&Pantalla completa" msgid "Fullscreen &stretch mode" -msgstr "Escalado pantalla completa" +msgstr "Esca&lado pantalla completa" msgid "&Full screen stretch" msgstr "&Estirar" @@ -132,8 +135,8 @@ msgstr "&Escalado valor entero" msgid "4:&3 Integer scale" msgstr "Escalado valor entero 4:&3" -msgid "E&GA/(S)VGA settings" -msgstr "&Configuraciones EGA/(S)VGA" +msgid "EGA/(S)&VGA settings" +msgstr "Configuraciones EGA/(S)&VGA" msgid "&Inverted VGA monitor" msgstr "&Monitor VGA invertido" @@ -144,11 +147,17 @@ msgstr "&Tipo de pantalla VGA" msgid "RGB &Color" msgstr "RGB &Color" +msgid "RGB (no brown)" +msgstr "RGB (sin marrón)" + msgid "&RGB Grayscale" msgstr "RGB &Grises" +msgid "Generic RGBI color monitor" +msgstr "Monitor a colores RGBI genérico" + msgid "&Amber monitor" -msgstr "Monitor &Ámbar" +msgstr "Monitor Ámb&ar" msgid "&Green monitor" msgstr "Monitor &Verde" @@ -169,7 +178,7 @@ msgid "&Average" msgstr "&Media" msgid "CGA/PCjr/Tandy/E&GA/(S)VGA overscan" -msgstr "&Overscan CGA/PCjr/Tandy/EGA/(S)VGA" +msgstr "Overscan CGA/PCjr/Tandy/E&GA/(S)VGA" msgid "Change contrast for &monochrome display" msgstr "Cambiar contraste para pantalla &monocroma" @@ -183,11 +192,14 @@ msgstr "&Herramientas" msgid "&Settings..." msgstr "&Configuraciones..." +msgid "Settings..." +msgstr "Configuraciones..." + msgid "&Update status bar icons" msgstr "&Actualizar iconos en barra de estado" msgid "Take s&creenshot" -msgstr "Tomar c&aptura" +msgstr "Tomar cap&tura" msgid "S&ound" msgstr "S&onido" @@ -208,7 +220,7 @@ msgid "End trace" msgstr "Terminar traza" msgid "&Help" -msgstr "&Ayuda" +msgstr "Ay&uda" msgid "&Documentation..." msgstr "&Documentación..." @@ -348,6 +360,9 @@ msgstr "Máquina:" msgid "Configure" msgstr "Configurar" +msgid "CPU:" +msgstr "CPU:" + msgid "CPU type:" msgstr "Tipo de CPU:" @@ -384,6 +399,15 @@ msgstr "Habilitado (UTC)" msgid "Dynamic Recompiler" msgstr "Recompilador Dinámico" +msgid "CPU frame size" +msgstr "Tamaño de blocos de CPU" + +msgid "Larger frames (less smooth)" +msgstr "Blocos más grandes (menos suave)" + +msgid "Smaller frames (smoother)" +msgstr "Blocos más pequeños (más suave)" + msgid "Video:" msgstr "Vídeo:" @@ -399,12 +423,27 @@ msgstr "Gráficos IBM 8514/A" msgid "XGA Graphics" msgstr "Gráficos XGA" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "Adaptador de gráficos de pantalla IBM PS/55" + +msgid "Keyboard:" +msgstr "Teclado:" + +msgid "Keyboard" +msgstr "Teclado" + msgid "Mouse:" msgstr "Ratón:" +msgid "Mouse" +msgstr "Ratón" + msgid "Joystick:" msgstr "Mando:" +msgid "Joystick" +msgstr "Mando" + msgid "Joystick 1..." msgstr "Mando 1..." @@ -435,6 +474,9 @@ msgstr "Dispositivo MIDI de salida:" msgid "MIDI In Device:" msgstr "Dispositivo MIDI de entrada:" +msgid "MIDI Out:" +msgstr "Salida MIDI" + msgid "Standalone MPU-401" msgstr "MPU-401 independiente" @@ -474,6 +516,9 @@ msgstr "Dispositivo LPT3:" msgid "LPT4 Device:" msgstr "Dispositivo LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "DMA de ECP del LPT interno:" + msgid "Serial port 1" msgstr "Puerto serie 1" @@ -498,18 +543,21 @@ msgstr "Puerto paralelo 3" msgid "Parallel port 4" msgstr "Puerto paralelo 4" -msgid "HD Controller:" -msgstr "Controladora HD:" - msgid "FD Controller:" msgstr "Controladora FD:" +msgid "CD-ROM Controller:" +msgstr "Controladora CD-ROM:" + msgid "Tertiary IDE Controller" msgstr "Tercera controladora IDE" msgid "Quaternary IDE Controller" msgstr "Cuarta controladora IDE" +msgid "Hard disk" +msgstr "Disco duro" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "Cassette" msgid "Hard disks:" msgstr "Discos duros:" +msgid "Firmware Version" +msgstr "Versión de firmware" + msgid "&New..." msgstr "&Nuevo..." @@ -556,7 +607,7 @@ msgid "Sectors:" msgstr "Sectores:" msgid "Heads:" -msgstr "Cabezas:" +msgstr "Cabezales:" msgid "Cylinders:" msgstr "Cilindros:" @@ -588,8 +639,14 @@ msgstr "Unidades de CD-ROM:" msgid "MO drives:" msgstr "Unidades MO:" -msgid "ZIP drives:" -msgstr "Unidades ZIP:" +msgid "MO:" +msgstr "MO:" + +msgid "Removable disks:" +msgstr "Discos removibles:" + +msgid "Removable disk drives:" +msgstr "Unidades de disco removible:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "ISA RTC:" msgid "ISA Memory Expansion" msgstr "Expansión de Memoria ISA" +msgid "ISA ROM Cards" +msgstr "Tarjetas ROM ISA" + msgid "Card 1:" msgstr "Tarjeta 1:" @@ -612,6 +672,15 @@ msgstr "Tarjeta 3:" msgid "Card 4:" msgstr "Tarjeta 4:" +msgid "Generic ISA ROM Board" +msgstr "Tarjeta ROM ISA genérica" + +msgid "Generic Dual ISA ROM Board" +msgstr "Tarjeta ROM ISA genérica doble" + +msgid "Generic Quad ISA ROM Board" +msgstr "Tarjeta ROM ISA genérica cuádruple" + msgid "ISABugger device" msgstr "Dispositivo ISABugger" @@ -633,11 +702,17 @@ msgstr " - EN PAUSA" msgid "Speed" msgstr "Velocidad" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Disco removible %1 (%2): %3" -msgid "ZIP images" -msgstr "Imagenes ZIP" +msgid "&Removable disk %1 (%2): %3" +msgstr "&Disco removible %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Imagenes de disco removible" + +msgid "Image %1" +msgstr "Imagen %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "86Box no pudo encontrar ninguna imagen ROM usable.\n\nPor favor descargue un conjunte de ROMs y extráigalo en el directorio \"roms\"." @@ -696,12 +771,30 @@ msgstr "Red" msgid "Ports (COM & LPT)" msgstr "Puertos (COM y LPT)" +msgid "Ports" +msgstr "Puertos" + +msgid "Serial ports:" +msgstr "Puertos serie:" + +msgid "Parallel ports:" +msgstr "Puertos paralelos:" + msgid "Storage controllers" msgstr "Controladoras de Almacenamiento" msgid "Hard disks" msgstr "Discos Duros" +msgid "Disks:" +msgstr "Discos:" + +msgid "Floppy:" +msgstr "Disquete:" + +msgid "Controllers:" +msgstr "Controladoras:" + msgid "Floppy & CD-ROM drives" msgstr "Disquetes y unidades de CD-ROM" @@ -711,6 +804,9 @@ msgstr "Otros dispositivos extraíbles" msgid "Other peripherals" msgstr "Otros periféricos" +msgid "Other devices" +msgstr "Otros dispositivos" + msgid "Click to capture mouse" msgstr "Haga click para capturar el ratón" @@ -777,12 +873,39 @@ msgstr "Mando de 4 ejes, 4 botones" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Pedals" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Thrustmaster Flight Control System" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Rudder Control System" + +msgid "2-button gamepad(s)" +msgstr "Mando(s) de juegos de 2 botones" + +msgid "2-button flight yoke" +msgstr "Yugo de vuelo de 2 botones" + +msgid "4-button gamepad" +msgstr "Mando de juegos de 4 botones" + +msgid "4-button flight yoke" +msgstr "Yugo de vuelo de 4 botones" + +msgid "2-button flight yoke with throttle" +msgstr "Yugo de vuelo de 2 botones con acelerador" + +msgid "4-button flight yoke with throttle" +msgstr "Yugo de vuelo de 4 botones con acelerador" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Volante Win95 (de 3 ejes, 4 botones)" + msgid "None" msgstr "Ninguno" @@ -792,6 +915,9 @@ msgstr "%1 MB (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Disquete %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Disquete %1 (%2): %3" + msgid "Advanced sector images" msgstr "Imágenes avanzadas de sector" @@ -813,6 +939,9 @@ msgstr "No fué posible inicializar GhostPCL" msgid "MO %1 (%2): %3" msgstr "MO %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&MO %1 (%2): %3" + msgid "MO images" msgstr "Imágenes de MO" @@ -822,6 +951,15 @@ msgstr "¡Bienvenido a 86Box!" msgid "Internal device" msgstr "Dispositivo interno" +msgid "&File" +msgstr "&Archivo" + +msgid "&New machine..." +msgstr "&Nueva máquina..." + +msgid "&Check for updates..." +msgstr "&Verifica actualizaciones..." + msgid "Exit" msgstr "Salir" @@ -897,12 +1035,18 @@ msgstr "Continuar" msgid "Cassette: %1" msgstr "Cassette: %1" +msgid "C&assette: %1" +msgstr "C&assette: %1" + msgid "Cassette images" msgstr "Imágenes de Cassette" msgid "Cartridge %1: %2" msgstr "Cartucho %1: %2" +msgid "Car&tridge %1: %2" +msgstr "Car&tucho %1: %2" + msgid "Cartridge images" msgstr "Imágenes de Cartucho" @@ -912,6 +1056,9 @@ msgstr "Retomar la ejecución" msgid "Pause execution" msgstr "Pausar la ejecución" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Pulsar Ctrl+Alt+Supr" @@ -921,9 +1068,279 @@ msgstr "Pulsar Ctrl+Alt+Esc" msgid "Hard reset" msgstr "Hard reset" +msgid "Force shutdown" +msgstr "Apagqar forzadamente" + +msgid "Start" +msgstr "Iniciar" + +msgid "Not running" +msgstr "No en ejecución" + +msgid "Running" +msgstr "En ejeución" + +msgid "Paused" +msgstr "En pausa" + +msgid "Waiting" +msgstr "En espera" + +msgid "Powered Off" +msgstr "Apagado" + +msgid "%n running" +msgstr "%n en ejecución" + +msgid "%n paused" +msgstr "%n en pausa" + +msgid "%n waiting" +msgstr "%n en espera" + +msgid "%1 total" +msgstr "%1 total" + +msgid "VMs: %1" +msgstr "MV: %1" + +msgid "System Directory:" +msgstr "Directório de sistema:" + +msgid "Choose directory" +msgstr "Escoger disctorio" + +msgid "Choose configuration file" +msgstr "Escoger archivo de configuración" + +msgid "86Box configuration files (86box.cfg)" +msgstr "Archivos de configuración de 86Box (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Error al leer" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "No fúe posible abrir el archivo de configuración seleccionado para leer: %1" + +msgid "Use regular expressions in search box" +msgstr "Utilizar expresiones regulares en la caja de búsqueda" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 máquina(s) son activas en este momento. ¿Está seguro de que quiere salir del administrador de MV?" + +msgid "Add new system wizard" +msgstr "Asistente para la adición de un nuevo sistema" + +msgid "Introduction" +msgstr "Introducción" + +msgid "This will help you add a new system to 86Box." +msgstr "Esto le ayudará a añadir un nuevo sistema a 86Box." + +msgid "New configuration" +msgstr "Nueva configuración" + +msgid "Complete" +msgstr "Completar" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "El asistente agora ejecutará la configuración para el nuevo sistema." + +msgid "Use existing configuration" +msgstr "Utilizar configuración existente" + +msgid "Type some notes here" +msgstr "Escribir algunas notas aquí" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Pegar el contenido del archivo de configuración existente en el cuadro que aparece a continuación." + +msgid "Load configuration from file" +msgstr "Cargar la configuración desde un archivo" + +msgid "System name" +msgstr "Nombre del sistema" + +msgid "System name:" +msgstr "Nombre del sistema:" + +msgid "System name cannot contain certain characters" +msgstr "El nombre del sistema no puede contener algunos carácteres" + +msgid "System name already exists" +msgstr "El nombre del sistema ya existe" + +msgid "Please enter a directory for the system" +msgstr "Por favor, escriba un directório para el sistema" + +msgid "Directory does not exist" +msgstr "El directório no existe" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "Un nuevo directório para el sistema será creado en el directório escogido en cima" + +msgid "System location:" +msgstr "Ubicación del sistema:" + +msgid "System name and location" +msgstr "Nombre y ubicaciónd el sistema" + +msgid "Enter the name of the system and choose the location" +msgstr "Escribir el nombre del sistema y escoger la ubicación" + +msgid "Enter the name of the system" +msgstr "Escribir el nombre del sistema" + +msgid "Please enter a system name" +msgstr "Por favor, entre un nome del sistema" + +msgid "Display name (optional):" +msgstr "Nombre mostrado (opcional):" + +msgid "Display name:" +msgstr "Nombre mostrado:" + +msgid "Set display name" +msgstr "Establecer nombre mostrado" + +msgid "Enter the new display name (blank to reset)" +msgstr "Escribir el nuevo nombre mostrado (vacío para restablecer)" + +msgid "Change &display name..." +msgstr "Cambiar nombre &mostrado..." + +msgid "Context Menu" +msgstr "Menú de contexto" + +msgid "&Open folder..." +msgstr "&Abrir carpeta..." + +msgid "Open p&rinter tray..." +msgstr "Abrir bandeja de la &impresora..." + +msgid "Set &icon..." +msgstr "Establecer &icono..." + +msgid "Select an icon" +msgstr "Escoger un icono" + +msgid "C&lone..." +msgstr "C&lonar" + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "La máquina virtual \"%1\" (%2) será clonada para:" + +msgid "Directory %1 already exists" +msgstr "El directório %1 ya existe" + +msgid "You cannot use the following characters in the name: %1" +msgstr "No se puede usar los siguientes carácteres en el nombre: %1" + +msgid "Clone" +msgstr "Cloner" + +msgid "Failed to create directory for cloned VM" +msgstr "Error al crear el directório para la MV clonada" + +msgid "Failed to clone VM." +msgstr "Error al clonar la VM." + +msgid "Directory in use" +msgstr "Directório en uso" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "El directório escogido ya está en uso. Por favor, seleccione otro directório." + +msgid "Create directory failed" +msgstr "Error al crear el directório" + +msgid "Unable to create the directory for the new system" +msgstr "No fué posible crear el directório para el nuevo sistema" + +msgid "Configuration write failed" +msgstr "Error al escrbir la configuración" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "No fué posible abrir el archivo de configuración en %1 para escribir" + +msgid "Error adding system" +msgstr "Error al añadir el sistema" + +msgid "Remove directory failed" +msgstr "Error al remover el directório" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "No fué posible borrar algunos archivos en el directório de la máquina. Por favor, borrelos manualmente." + +msgid "Build" +msgstr "Compilación" + +msgid "Version" +msgstr "Versión" + +msgid "An update to 86Box is available: %1 %2" +msgstr "Está disponible una actualización para 86Box: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Ha ocurrido un error al verificar las actualizacioens: %1" + +msgid "An update to 86Box is available!" +msgstr "¡Una actualización para 86Box está disponible!" + +msgid "Warning" +msgstr "Advertencia" + +msgid "&Kill" +msgstr "&Terminar forzadamente" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Terminar forzadamente a la máquina virtual puede cusar la pérdida de datos. Lo haga solamente si el processo de 86Box se bloqueó.\n\n¿De verdad quiere terminar forzadamente a la máquina virtual \"%1\"?" + +msgid "&Delete" +msgstr "&Borrar" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "¿De verdad quiere borrar la máquina virtual \"%1\" y todos sus archivos? ¡Esta acción no se puede deshacer!" + +msgid "Show &config file" +msgstr "Mostrar archivo de &configuración" + +msgid "No screenshot" +msgstr "Sin captura de pantalla" + +msgid "Search" +msgstr "Buscar" + +msgid "Searching for VMs..." +msgstr "Buscar para MV..." + +msgid "Found %1" +msgstr "%1 encontrada" + +msgid "System" +msgstr "Sistema" + +msgid "Storage" +msgstr "Almacenamiento" + +msgid "Disk %1: " +msgstr "Disco" + +msgid "No disks" +msgstr "Sin disco" + +msgid "Audio" +msgstr "Sonido" + +msgid "Audio:" +msgstr "Sonido:" + msgid "ACPI shutdown" msgstr "Parada ACPI" +msgid "ACP&I shutdown" +msgstr "Parada ACP&I" + msgid "Hard disk (%1)" msgstr "Disco duro (%1)" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 KB" @@ -1180,15 +1600,16 @@ msgid "Fast" msgstr "Rápida" msgid "&Auto-pause on focus loss" -msgstr "&Pausa automática al perder el foco" +msgstr "Pa&usa automática al perder el foco" msgid "WinBox is no longer supported" msgstr "WinBox ya no recibe soporte" msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." msgstr "El desarrollo del gestor WinBox se detuvo en 2022 debido a la falta de mantenedores. Como dirigimos nuestros esfuerzos a hacer 86Box aún mejor, hemos tomado la decisión de dejar de dar soporte a WinBox como gestor.\n\nNo se proporcionarán más actualizaciones a través de WinBox, y puede encontrar un comportamiento incorrecto si continúa usándolo con versiones más nuevas de 86Box. Cualquier informe de error relacionado con el comportamiento de WinBox será cerrado como inválido.\n\nVaya a 86box.net para una lista de otros gestores que puede utilizar." + msgid "Generate" -msgstr "Vytvoř" +msgstr "Generar" msgid "Joystick configuration" msgstr "Configuración del mando" @@ -1208,41 +1629,38 @@ msgstr "Dispositivos MCA" msgid "List of MCA devices:" msgstr "Lista de dispositivos MCA:" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Herramienta de tableta" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "Acerca de &Qt" -msgid "About Qt" -msgstr "Acerca de Qt" - -msgid "MCA devices..." +msgid "&MCA devices..." msgstr "Dispositivos MCA ..." -msgid "Show non-primary monitors" -msgstr "Mostrar monitores no primarios" +msgid "Show non-&primary monitors" +msgstr "Mostrar monitores no prim&arios" -msgid "Open screenshots folder..." -msgstr "Abrir la carpeta screenshots..." +msgid "Open screenshots &folder..." +msgstr "Abrir la ca&rpeta screenshots..." -msgid "Apply fullscreen stretch mode when maximized" -msgstr "Usar escalado pantalla completa en modalidad maximizada" +msgid "Appl&y fullscreen stretch mode when maximized" +msgstr "&Usar escalado pantalla completa en modalidad maximizada" -msgid "Cursor/Puck" -msgstr "Cursor/Puck" +msgid "&Cursor/Puck" +msgstr "&Cursor/Puck" -msgid "Pen" -msgstr "Bolígrafo" +msgid "&Pen" +msgstr "&Bolígrafo" -msgid "Host CD/DVD Drive (%1:)" -msgstr "Unidad de CD/DVD anfitriona (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "&Unidad de CD/DVD anfitriona (%1:)" msgid "&Connected" msgstr "&Conectrado" -msgid "Clear image history" -msgstr "Eliminar historia de imágenes" +msgid "Clear image &history" +msgstr "Eliminar &historia de imágenes" msgid "Create..." msgstr "Crear..." @@ -1256,9 +1674,15 @@ msgstr "Bus desconocido" msgid "Null Driver" msgstr "Controlador nulo" +msgid "NIC:" +msgstr "NIC:" + msgid "NIC %1 (%2) %3" msgstr "NIC %1 (%2) %3" +msgid "&NIC %1 (%2) %3" +msgstr "&NIC %1 (%2) %3" + msgid "Render behavior" msgstr "Comportamiento del renderizador" @@ -1322,6 +1746,9 @@ msgstr "No hay dispositovos MCA." msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" msgstr "Tarjeta de red 1" @@ -1364,8 +1791,26 @@ msgstr "Paso de puerto serie 3" msgid "Serial port passthrough 4" msgstr "Paso de puerto serie 4" -msgid "Renderer options..." -msgstr "Opciones del renderizador..." +msgid "Renderer &options..." +msgstr "Opc&iones del renderizador..." + +msgid "PC/XT Keyboard" +msgstr "Teclado PC/XT" + +msgid "AT Keyboard" +msgstr "Teclado AT" + +msgid "AX Keyboard" +msgstr "Teclado AX" + +msgid "PS/2 Keyboard" +msgstr "Teclado PS/2" + +msgid "PS/55 Keyboard" +msgstr "Teclado PS/55" + +msgid "Keys" +msgstr "Teclas" msgid "Logitech/Microsoft Bus Mouse" msgstr "Ratón de bus Logitech/Microsoft" @@ -1376,18 +1821,30 @@ msgstr "Ratón de bus Microsoft (InPort)" msgid "Mouse Systems Serial Mouse" msgstr "Ratón serie Mouse Systems" +msgid "Mouse Systems Bus Mouse" +msgstr "Ratón de bus Mouse Systems" + msgid "Microsoft Serial Mouse" msgstr "Ratón serie Microsoft" +msgid "Microsoft Serial BallPoint" +msgstr "Ratón serie Microsoft BallPoint" + msgid "Logitech Serial Mouse" msgstr "Ratón serie Logitech" msgid "PS/2 Mouse" msgstr "Ratón PS/2" +msgid "PS/2 QuickPort Mouse" +msgstr "Ratón PS/2 QuickPort" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (serie)" +msgid "Default Baud rate" +msgstr "Velocidad de transmisión pretederminada" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Módem estándar compatible con Hayes" @@ -1412,21 +1869,81 @@ msgstr "MIDI del sistema" msgid "MIDI Input Device" msgstr "Dispositivo de entrada MIDI" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "Archivo de BIOS" + +msgid "BIOS file (ROM #1)" +msgstr "Archivo de BIOS (ROM no. 1)" + +msgid "BIOS file (ROM #2)" +msgstr "Archivo de BIOS (ROM no. 2)" + +msgid "BIOS file (ROM #3)" +msgstr "Archivo de BIOS (ROM no. 3)" + +msgid "BIOS file (ROM #4)" +msgstr "Archivo de BIOS (ROM no. 4)" + +msgid "BIOS address" msgstr "Dirección de BIOS" +msgid "BIOS address (ROM #1)" +msgstr "Dirección de BIOS (ROM no. 1)" + +msgid "BIOS address (ROM #2)" +msgstr "Dirección de BIOS (ROM no. 2)" + +msgid "BIOS address (ROM #3)" +msgstr "Dirección de BIOS (ROM no. 3)" + +msgid "BIOS address (ROM #4)" +msgstr "Dirección de BIOS (ROM no. 4)" + msgid "Enable BIOS extension ROM Writes" msgstr "Habilitar escrituras para el ROM de extensión de BIOS" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "Habilitar escrituras para el ROM de extensión de BIOS (ROM no. 1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "Habilitar escrituras para el ROM de extensión de BIOS (ROM no. 2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "Habilitar escrituras para el ROM de extensión de BIOS (ROM no. 3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "Habilitar escrituras para el ROM de extensión de BIOS (ROM no. 4)" + +msgid "Linear framebuffer base" +msgstr "Base del búfer de trama lineal" + msgid "Address" msgstr "Dirección" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "IRQ del puerto serie" + +msgid "Parallel port IRQ" +msgstr "IRQ del puerto paralelo" + msgid "BIOS Revision" msgstr "Revisión de BIOS" +msgid "BIOS Version" +msgstr "Versión de BIOS" + +msgid "BIOS Language" +msgstr "Idioma de BIOS" + +msgid "IBM 5161 Expansion Unit" +msgstr "Unidad de expansión IBM 5161" + +msgid "IBM Cassette Basic" +msgstr "BASIC de casete IBM" + msgid "Translate 26 -> 17" msgstr "Traducir 26 -> 17" @@ -1442,6 +1959,18 @@ msgstr "Invertir colores" msgid "BIOS size" msgstr "Tamaño de BIOS" +msgid "BIOS size (ROM #1)" +msgstr "Tamaño de BIOS (ROM no. 1)" + +msgid "BIOS size (ROM #2)" +msgstr "Tamaño de BIOS (ROM no. 2)" + +msgid "BIOS size (ROM #3)" +msgstr "Tamaño de BIOS (ROM no. 3)" + +msgid "BIOS size (ROM #4)" +msgstr "Tamaño de BIOS (ROM no. 4)" + msgid "Map C0000-C7FFF as UMB" msgstr "Mapear a C0000-C7FFF como UMB" @@ -1517,6 +2046,9 @@ msgstr "Nível de reverberación" msgid "Interpolation Method" msgstr "Método de interpolación" +msgid "Dynamic Sample Loading" +msgstr "Carga dinámica de muestras" + msgid "Reverb Output Gain" msgstr "Ganancia de salida de reverberación" @@ -1604,6 +2136,12 @@ msgstr "DMA bajo" msgid "Enable Game port" msgstr "Habilitar puerto de juegos" +msgid "SID Model" +msgstr "Modelo de SID" + +msgid "SID Filter Strength" +msgstr "Fuerza del filtro de SID" + msgid "Surround module" msgstr "Módulo Surround" @@ -1616,6 +2154,12 @@ msgstr "Activar la interrupción CODEC en la configuración CODEC (necesario par msgid "SB Address" msgstr "Dirección del SB" +msgid "Adlib Address" +msgstr "Dirección del Adlib" + +msgid "Use EEPROM setting" +msgstr "Uitilizar la configuración del EEPROM" + msgid "WSS IRQ" msgstr "IRQ de WSS" @@ -1700,9 +2244,15 @@ msgstr "Tipo de RAMDAC" msgid "Blend" msgstr "Mezclar" +msgid "Font" +msgstr "Fuente" + msgid "Bilinear filtering" msgstr "Filtrado bilineal" +msgid "Video chroma-keying" +msgstr "Clave cromática para vídeo" + msgid "Dithering" msgstr "Dithering" @@ -1745,6 +2295,33 @@ msgstr "Velocidad de transferencia" msgid "EMS mode" msgstr "Modo EMS" +msgid "EMS Address" +msgstr "Dirección de EMS" + +msgid "EMS 1 Address" +msgstr "Dirección de EMS 1" + +msgid "EMS 2 Address" +msgstr "Dirección de EMS 2" + +msgid "EMS Memory Size" +msgstr "Dirección de EMS" + +msgid "EMS 1 Memory Size" +msgstr "Dirección de EMS 1" + +msgid "EMS 2 Memory Size" +msgstr "Dirección de EMS 2" + +msgid "Enable EMS" +msgstr "Habilitar EMS" + +msgid "Enable EMS 1" +msgstr "Habilitar EMS 1" + +msgid "Enable EMS 2" +msgstr "Habilitar EMS 2" + msgid "Address for > 2 MB" msgstr "Dirección para > 2 MB" @@ -1763,11 +2340,11 @@ msgstr "Siempre a la velocidad seleccionada" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "Configuración de la BIOS + Teclas de acceso rápido (desactivadas durante la POST)" -msgid "64 kB starting from F0000" -msgstr "64 kB desde F0000" +msgid "64 KB starting from F0000" +msgstr "64 KB desde F0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB desde E0000 (MSB de dirección invertido, últimas 64KB primero)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KB desde E0000 (MSB de dirección invertido, últimas 64 KB primero)" msgid "Sine" msgstr "Sinusoidal" @@ -1803,7 +2380,7 @@ msgid "Five + Wheel" msgstr "Cinco + rueda" msgid "Five + 2 Wheels" -msgstr "" +msgstr "Cinco + 2 ruedas" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 serie / SMT3(R)V" @@ -1868,6 +2445,9 @@ msgstr "256 KB" msgid "Composite" msgstr "Compuesto" +msgid "True color" +msgstr "Verdadero color" + msgid "Old" msgstr "Viejo" @@ -1901,6 +2481,15 @@ msgstr "Interpolación sRGB" msgid "Linear interpolation" msgstr "Interpolación lineare" +msgid "Has secondary 8x8 character set" +msgstr "Tiene conjunto de carácteres 8x8 secundário" + +msgid "Has Quadcolor II daughter board" +msgstr "Tiene tarjeta hija Quadcolor II" + +msgid "Alternate monochrome contrast" +msgstr "Contraste monocromo alternativo" + msgid "128 KB" msgstr "128 KB" @@ -1934,6 +2523,9 @@ msgstr "Ámbar" msgid "Gray" msgstr "Gris" +msgid "Grayscale" +msgstr "Escala de gris" + msgid "Color" msgstr "Color" @@ -1949,6 +2541,12 @@ msgstr "Otros idiomas" msgid "Bochs latest" msgstr "Bochs más nuevo" +msgid "Apply overscan deltas" +msgstr "Aplicar deltas de overscan" + +msgid "Mono Interlaced" +msgstr "Monocromo entrelazado" + msgid "Mono Non-Interlaced" msgstr "Monocromo no entrelazado" @@ -1961,6 +2559,9 @@ msgstr "Color no entrelazado" msgid "3Dfx Voodoo Graphics" msgstr "Gráficos 3dfx Voodoo" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 unidades TMU)" @@ -2030,6 +2631,9 @@ msgstr "Tasa de baudios de paso" msgid "Named Pipe (Server)" msgstr "Tubería con nombre (servidor)" +msgid "Named Pipe (Client)" +msgstr "Tubería con nombre (cliente)" + msgid "Host Serial Passthrough" msgstr "Paso del puerto serie del host" @@ -2046,28 +2650,28 @@ msgid "High performance impact" msgstr "Alto impact en el rendimiento" msgid "[Generic] RAM Disk (max. speed)" -msgstr "[Generic] Disco RAM (velocidad máxima)" +msgstr "[Genérico] Disco RAM (velocidad máxima)" msgid "[Generic] 1989 (3500 RPM)" -msgstr "" +msgstr "[Genérico] 1989 (3500 RPM)" msgid "[Generic] 1992 (3600 RPM)" -msgstr "" +msgstr "[Genérico] 1992 (3600 RPM)" msgid "[Generic] 1994 (4500 RPM)" -msgstr "" +msgstr "[Genérico] 1994 (4500 RPM)" msgid "[Generic] 1996 (5400 RPM)" -msgstr "" +msgstr "[Genérico] 1996 (5400 RPM)" msgid "[Generic] 1997 (5400 RPM)" -msgstr "" +msgstr "[Genérico] 1997 (5400 RPM)" msgid "[Generic] 1998 (5400 RPM)" -msgstr "" +msgstr "[Genérico] 1998 (5400 RPM)" msgid "[Generic] 2000 (7200 RPM)" -msgstr "" +msgstr "[Genérico] 2000 (7200 RPM)" msgid "IBM 8514/A clone (ISA)" msgstr "Clon IBM 8514/A (ISA)" @@ -2075,6 +2679,12 @@ msgstr "Clon IBM 8514/A (ISA)" msgid "Vendor" msgstr "Fabricante" +msgid "30 Hz (JMP2 = 1)" +msgstr "30 Hz (JMP2 = 1)" + +msgid "60 Hz (JMP2 = 2)" +msgstr "60 Hz (JMP2 = 2)" + msgid "Generic PC/XT Memory Expansion" msgstr "Expansión de Memoria Generica PC/XT" @@ -2088,61 +2698,259 @@ msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for t msgstr "Las fuentes TrueType en el directorio \"roms/printer/fonts\" son necesarias para la emulación de la impresora matricial ESC/P genérica." msgid "Inhibit multimedia keys" -msgstr "" +msgstr "Inhibir teclas multimedia" msgid "Ask for confirmation before saving settings" -msgstr "" +msgstr "Pedir confirmación antes de guardar la configuración" msgid "Ask for confirmation before hard resetting" -msgstr "" +msgstr "Pedir confirmación antes del hard reset" msgid "Ask for confirmation before quitting" -msgstr "" +msgstr "Pedir confirmación antes de salir" msgid "Options" -msgstr "" +msgstr "Opciones" msgid "Model" -msgstr "" +msgstr "Modelo" msgid "Model:" -msgstr "" +msgstr "Modelo:" msgid "Failed to initialize Vulkan renderer." -msgstr "" +msgstr "Error al inicializar el renderizador Vulkan." msgid "GLSL Error" -msgstr "" +msgstr "Error de GLSL" msgid "Could not load shader: %1" -msgstr "" +msgstr "No fué posible cargar el shader: %1" msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" -msgstr "" +msgstr "Se requiere la versión 3.0 o superior de OpenGL. La versión actual de GLSL es %1.%2" msgid "Could not load texture: %1" -msgstr "" +msgstr "Error al cargar la textura: %1" msgid "Could not compile shader:\n\n%1" -msgstr "" +msgstr "Error al compilar el shader:\n\n%1" msgid "Program not linked:\n\n%1" -msgstr "" +msgstr "Programa no vinculado:\n\n%1" msgid "Shader Manager" -msgstr "" +msgstr "Administrador de shaders" msgid "Shader Configuration" -msgstr "" +msgstr "Configuración de shaders" msgid "Add" -msgstr "" +msgstr "Añadir" msgid "Move up" -msgstr "" +msgstr "Mover para arriba" msgid "Move down" -msgstr "" +msgstr "Mover para abajo" msgid "Could not load file %1" -msgstr "" +msgstr "Error al cargar el archivo %1" + +msgid "Key Bindings:" +msgstr "Atajos de teclado:" + +msgid "Action" +msgstr "Acción" + +msgid "Keybind" +msgstr "Atajo" + +msgid "Clear binding" +msgstr "Limpiar atajo" + +msgid "Bind" +msgstr "Vincular" + +msgid "Bind Key" +msgstr "Vincular tecla" + +msgid "Enter key combo:" +msgstr "Escribir combinación de teclas:" + +msgid "Bind conflict" +msgstr "Conflicto entre atajos" + +msgid "This key combo is already in use." +msgstr "Esta combinación de teclas ya está en uso." + +msgid "Send Control+Alt+Del" +msgstr "Enviar Control+Alt+Del" + +msgid "Send Control+Alt+Escape" +msgstr "Enviar Control+Alt+Escape" + +msgid "Toggle fullscreen" +msgstr "Alternar pantalla completa" + +msgid "Screenshot" +msgstr "Captura de pantalla" + +msgid "Release mouse pointer" +msgstr "Soltar el puntero del ratón" + +msgid "Toggle pause" +msgstr "Alternar pausa" + +msgid "Toggle mute" +msgstr "Alternar silencio" + +msgid "Text files" +msgstr "Archivos de texto" + +msgid "ROM files" +msgstr "Archivos de ROM" + +msgid "SoundFont files" +msgstr "Archivos SoundFont" + +msgid "Local Switch" +msgstr "Conmutador local" + +msgid "Remote Switch" +msgstr "Conmutador remoto" + +msgid "Switch:" +msgstr "Conmutador:" + +msgid "Hub Mode" +msgstr "Modo de concentrador" + +msgid "Hostname:" +msgstr "Nombre de host:" + +msgid "ISA RAM:" +msgstr "RAM ISA:" + +msgid "ISA ROM:" +msgstr "ROM ISA:" + +msgid "&Wipe NVRAM" +msgstr "&Limpiar el NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Estó borrará todos los archivos de NVRAM (y relacionados) de la máquina virtual ubicados en el subdirectório \"nvr\". Tendrá que reconifigurar la definiciones del BIOS (y talvez de otros dispositivoes dentro de la MV) otra vez si aplicable.\n\n¿Está seguro de que quierere limpiar todos los contenidos de la NVRAM de la máquina virtual \"%1\"?" + +msgid "Success" +msgstr "Éxito" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Los contenidos de la NVRAM de la máquina virtual \"%1\" han sido limpiadas con éxito" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Ha ocurrido un error al intentar de limpiar los contenidos de la NVRAM de la máquina virtual \"%1\"" + +msgid "%1 VM Manager" +msgstr "Administrador de MV de %1" + +msgid "%n disk(s)" +msgstr "%n disco(s)" + +msgid "Unknown Status" +msgstr "Estado desconocido" + +msgid "No Machines Found!" +msgstr "¡No fueron encontradas máquinas!" + +msgid "Check for updates on startup" +msgstr "Contorlar actualizaciones al iniciar" + +msgid "Unable to determine release information" +msgstr "No fué posible determinar informaciones de la versión" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Ha ocurrido un error al verificar actualizaciones:\n\n%1\n\nPor favor, intente otra vez más tarde." + +msgid "Update check complete" +msgstr "Verificación de actualizaciones completada" + +msgid "stable" +msgstr "estable" + +msgid "beta" +msgstr "beta" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Está ejecutando la última versión %1 de 86Box: %2" + +msgid "version" +msgstr "versión" + +msgid "build" +msgstr "compilación" + +msgid "You are currently running version %1." +msgstr "Actualmente está a ejecutar la versión %1." + +msgid "Version %1 is now available." +msgstr "La versión %1 está ahora disponible." + +msgid "You are currently running build %1." +msgstr "Actualmente está a ejecutar la compialación %1." + +msgid "Build %1 is now available." +msgstr "La compilación %1 está ahora disponible." + +msgid "Would you like to visit the download page?" +msgstr "¿Quería visitar a la página de descargas?" + +msgid "Visit download page" +msgstr "Visitar a la página de descargas" + +msgid "Update check" +msgstr "Verificación de actualizaciones" + +msgid "Checking for updates..." +msgstr "Verificando las actualizaciones..." + +msgid "86Box Update" +msgstr "Actualización de 86Box" + +msgid "Release notes:" +msgstr "Notas de versión:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Terminación inesperada de la máquina virtual" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "El proceso de la máquina virtual \"%1\" terminó inesperadamente con el código de salida %2." + +msgid "The system will not be added." +msgstr "El sistema no será añadido." + +msgid "&Update mouse every CPU frame" +msgstr "&Actualiza el estado del ratón en cada bloco de CPU" + +msgid "Hue" +msgstr "Tono" + +msgid "Saturation" +msgstr "Saturación" + +msgid "Contrast" +msgstr "Contraste" + +msgid "Brightness" +msgstr "Brillo" + +msgid "Sharpness" +msgstr "Nitidez" + +msgid "&CGA composite settings..." +msgstr "Configuración del modo compuesto &CGA..." + +msgid "CGA composite settings" +msgstr "Configuración del modo compuesto CGA" diff --git a/src/qt/languages/fi-FI.po b/src/qt/languages/fi-FI.po index ae4f78bb5..9aa64a0da 100644 --- a/src/qt/languages/fi-FI.po +++ b/src/qt/languages/fi-FI.po @@ -27,8 +27,14 @@ msgstr "Ctrl+Alt+&Esc" msgid "&Pause" msgstr "&Tauko" -msgid "E&xit..." -msgstr "&Poistu..." +msgid "Pause" +msgstr "" + +msgid "Re&sume" +msgstr "" + +msgid "E&xit" +msgstr "&Poistu" msgid "&View" msgstr "&Näytä" @@ -51,20 +57,17 @@ msgstr "&Renderöijä" msgid "&Qt (Software)" msgstr "&Qt (ohjelmistopohjainen)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" msgstr "Open&GL (3.0 Core)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." +msgid "Specify &dimensions..." msgstr "&Määritä koko..." -msgid "F&orce 4:3 display ratio" -msgstr "Pakota 4:3-näyttösuhde" +msgid "Force &4:3 display ratio" +msgstr "Pakota &4:3-kuvasuhde" msgid "&Window scale factor" msgstr "&Ikkunan kokokerroin" @@ -99,7 +102,7 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" +msgid "Fi<er method" msgstr "&Suodatusmetodi" msgid "&Nearest" @@ -132,7 +135,7 @@ msgstr "&Kokonaislukuskaalaus" msgid "4:&3 Integer scale" msgstr "4:&3 Kokonaislukuskaalaus" -msgid "E&GA/(S)VGA settings" +msgid "EGA/(S)&VGA settings" msgstr "&EGA/(S)VGA-asetukset" msgid "&Inverted VGA monitor" @@ -144,9 +147,15 @@ msgstr "VGA-näytön &tyyppi" msgid "RGB &Color" msgstr "RGB, &värit" +msgid "RGB (no brown)" +msgstr "RGB (ei ruskeaa)" + msgid "&RGB Grayscale" msgstr "&RGB, harmaasävy" +msgid "Generic RGBI color monitor" +msgstr "" + msgid "&Amber monitor" msgstr "&Meripihkanvärinen" @@ -169,7 +178,7 @@ msgid "&Average" msgstr "&Keskiarvo" msgid "CGA/PCjr/Tandy/E&GA/(S)VGA overscan" -msgstr "CGA/PCjr/Tandy/E&GA/(S)VGA &yliskannaus" +msgstr "CGA/PCjr/Tandy/E&GA/(S)VGA-&yliskannaus" msgid "Change contrast for &monochrome display" msgstr "&Muuta harmaavärinäytön kontrastia" @@ -181,7 +190,10 @@ msgid "&Tools" msgstr "Työ&kalut" msgid "&Settings..." -msgstr "&Kokoonpano..." +msgstr "&Asetukset..." + +msgid "Settings..." +msgstr "Asetukset..." msgid "&Update status bar icons" msgstr "&Päivitä tilapalkin kuvakkeita" @@ -196,7 +208,7 @@ msgid "&Preferences..." msgstr "&Sovellusasetukset..." msgid "Enable &Discord integration" -msgstr "Käytä &Discord-integraatiota" +msgstr "&Discord-integraatio" msgid "Sound &gain..." msgstr "&Äänitasot..." @@ -217,13 +229,13 @@ msgid "&About 86Box..." msgstr "&Tietoja 86Boxista..." msgid "&New image..." -msgstr "&Uusi kasettikuva..." +msgstr "&Uusi levykuva..." msgid "&Existing image..." -msgstr "&Olemassaoleva kasettikuva..." +msgstr "&Olemassaoleva levykuva..." msgid "Existing image (&Write-protected)..." -msgstr "Olemassaoleva kasettikuva (&kirjoitussuojattu)..." +msgstr "Olemassaoleva levykuva (&kirjoitussuojattu)..." msgid "&Record" msgstr "&Nauhoita" @@ -238,10 +250,10 @@ msgid "&Fast forward to the end" msgstr "Kelaa &loppuun" msgid "E&ject" -msgstr "&Poista kasettipesästä" +msgstr "&Irrota" msgid "&Image..." -msgstr "&ROM-moduulikuva..." +msgstr "&Levykuva..." msgid "E&xport to 86F..." msgstr "&Vie 86F-tiedostoon..." @@ -348,6 +360,9 @@ msgstr "Tietokone:" msgid "Configure" msgstr "Määritys" +msgid "CPU:" +msgstr "" + msgid "CPU type:" msgstr "Suorittimen tyyppi:" @@ -384,11 +399,20 @@ msgstr "Käytössä (UTC)" msgid "Dynamic Recompiler" msgstr "Dynaaminen uudelleenkääntäjä" +msgid "CPU frame size" +msgstr "CPU frame-koko" + +msgid "Larger frames (less smooth)" +msgstr "Suuret framet (vähemmän sulava)" + +msgid "Smaller frames (smoother)" +msgstr "Pienemmät framet (sulavampi)" + msgid "Video:" msgstr "Näytönohjain:" msgid "Video #2:" -msgstr "Näytönohjain 2:" +msgstr "Toinen näytönohjain:" msgid "Voodoo 1 or 2 Graphics" msgstr "Voodoo 1 tai 2-grafiikkasuoritin" @@ -399,12 +423,27 @@ msgstr "IBM 8514/A-grafiikkasuoritin" msgid "XGA Graphics" msgstr "XGA-grafiikkasuoritin" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "IBM PS/55-näyttöadapteri" + +msgid "Keyboard:" +msgstr "Näppäimistö:" + +msgid "Keyboard" +msgstr "Näppäimistö" + msgid "Mouse:" msgstr "Hiiri:" +msgid "Mouse" +msgstr "" + msgid "Joystick:" msgstr "Peliohjain:" +msgid "Joystick" +msgstr "" + msgid "Joystick 1..." msgstr "Peliohjain 1..." @@ -435,6 +474,9 @@ msgstr "MIDI-ulostulo:" msgid "MIDI In Device:" msgstr "MIDI-sisääntulo:" +msgid "MIDI Out:" +msgstr "MIDI-ulostulo:" + msgid "Standalone MPU-401" msgstr "Erillinen MPU-401" @@ -474,6 +516,9 @@ msgstr "LPT3-laite:" msgid "LPT4 Device:" msgstr "LPT4-laite:" +msgid "Internal LPT ECP DMA:" +msgstr "Sisäisen LPT:n ECP DMA:" + msgid "Serial port 1" msgstr "Sarjaportti 1" @@ -498,18 +543,21 @@ msgstr "Rinnakkaisportti 3" msgid "Parallel port 4" msgstr "Rinnakkaisportti 4" -msgid "HD Controller:" -msgstr "Kiintolevyohjain:" - msgid "FD Controller:" msgstr "Levykeohjain:" +msgid "CD-ROM Controller:" +msgstr "CD-ohjain:" + msgid "Tertiary IDE Controller" msgstr "Kolmas IDE-ohjain" msgid "Quaternary IDE Controller" msgstr "Neljäs IDE-ohjain" +msgid "Hard disk" +msgstr "Kiintolevy" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "Kasettiasema" msgid "Hard disks:" msgstr "Kiintolevyt:" +msgid "Firmware Version" +msgstr "Laiteohjelmiston versio" + msgid "&New..." msgstr "&Uusi..." @@ -588,8 +639,14 @@ msgstr "CD-ROM-asemat:" msgid "MO drives:" msgstr "Magneettisoptiset asemat (MO):" -msgid "ZIP drives:" -msgstr "ZIP-asemat:" +msgid "MO:" +msgstr "" + +msgid "Removable disks:" +msgstr "Irrotettavat levyt:" + +msgid "Removable disk drives:" +msgstr "Irrotettavat levyasemat:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "ISA-RTC (kello):" msgid "ISA Memory Expansion" msgstr "ISA-muistilaajennus" +msgid "ISA ROM Cards" +msgstr "ISA ROM-kortit" + msgid "Card 1:" msgstr "Kortti 1:" @@ -612,6 +672,15 @@ msgstr "Kortti 3:" msgid "Card 4:" msgstr "Kortti 4:" +msgid "Generic ISA ROM Board" +msgstr "" + +msgid "Generic Dual ISA ROM Board" +msgstr "" + +msgid "Generic Quad ISA ROM Board" +msgstr "" + msgid "ISABugger device" msgstr "ISABugger-laite" @@ -633,11 +702,17 @@ msgstr " - TAUKO" msgid "Speed" msgstr "Nopeus" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Irrotettava levy %1 (%2): %3" -msgid "ZIP images" -msgstr "ZIP-levykuvat" +msgid "&Removable disk %1 (%2): %3" +msgstr "&Irrotettava levy %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Irrotettavat levykuvat" + +msgid "Image %1" +msgstr "Levykuva %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "86Box ei löytänyt käyttökelpoisia ROM-tiedostoja.\n\nVoit ladata ROM-paketin ja purkaa sen \"roms\"-hakemistoon." @@ -667,16 +742,16 @@ msgid "Surface images" msgstr "Pintalevykuvat" msgid "Machine \"%hs\" is not available due to missing ROMs in the roms/machines directory. Switching to an available machine." -msgstr "Konetta \"%hs\" ei voi käyttää, koska roms/machines-hakemistosta puuttuvien ROM-tiedostojen vuoksi. Vaihdetaan käyttökelpoiseen koneeseen." +msgstr "Konetta \"%hs\" ei voida käyttää, koska roms/machines-hakemistosta puuttuu ROM-tiedostoja. Vaihdetaan käyttökelpoiseen koneeseen." msgid "Video card \"%hs\" is not available due to missing ROMs in the roms/video directory. Switching to an available video card." -msgstr "Näytönohjainta \"%hs\" ei voi käyttää, koska roms/machines-hakemistosta puuttuvien ROM-tiedostojen vuoksi. Vaihdetaan käyttökelpoiseen näytönohjaimeen." +msgstr "Näytönohjainta \"%hs\" ei voida käyttää, koska roms/video-hakemistosta puuttuu ROM-tiedostoja. Vaihdetaan käyttökelpoiseen näytönohjaimeen." -msgid "Video card #2 \"%hs\" is not available due to missing ROMs in the roms/video directory. Switching to an available video card." -msgstr "Näytönohjainta 2 \"%hs\" ei voi käyttää, koska roms/machines-hakemistosta puuttuvien ROM-tiedostojen vuoksi. Toisen näytönohjaimen poistaminen käytöstä." +msgid "Video card #2 \"%hs\" is not available due to missing ROMs in the roms/video directory. Disabling the second video card." +msgstr "Toista näytönohjainta \"%hs\" ei voida käyttää, koska roms/video-hakemistosta puuttuu ROM-tiedostoja. Toinen näytönohjain poistetaan käytöstä." msgid "Device \"%hs\" is not available due to missing ROMs. Ignoring the device." -msgstr "Laite \"%hs\" ei voi käyttää puuttuvien ROM-tiedostojen vuoksi. Laitteen huomiotta jättäminen." +msgstr "Laitetta \"%hs\" ei voida käyttää puuttuvien ROM-tiedostojen vuoksi. Laite jätetään huomiotta." msgid "Machine" msgstr "Tietokone" @@ -696,21 +771,42 @@ msgstr "Verkko" msgid "Ports (COM & LPT)" msgstr "Portit (COM & LPT)" +msgid "Ports" +msgstr "Portit" + +msgid "Serial ports" +msgstr "Sarjaportit" + +msgid "Parallel ports" +msgstr "Rinnakkaisportit" + msgid "Storage controllers" msgstr "Tallennusohjaimet" msgid "Hard disks" msgstr "Kiintolevyt" +msgid "Disks:" +msgstr "Levyt:" + +msgid "Floppy:" +msgstr "Levyke:" + +msgid "Controllers:" +msgstr "Ohjaimet:" + msgid "Floppy & CD-ROM drives" -msgstr "Levyke ja CD-ROM" +msgstr "Levyke- ja CD-ROM-asemat" msgid "Other removable devices" -msgstr "Muut tallennuslaitteet" +msgstr "Muut irrotettavat laitteet" msgid "Other peripherals" msgstr "Muut oheislaitteet" +msgid "Other devices" +msgstr "Muut laitteet" + msgid "Click to capture mouse" msgstr "Kaappaa hiiri klikkaamalla" @@ -754,7 +850,7 @@ msgid "Invalid PCap device" msgstr "Virheellinen PCap-laite" msgid "2-axis, 2-button joystick(s)" -msgstr "2-akselinen 2-painikkeinen peliohjain/-ohjaimet" +msgstr "2-akseliset 2-painikkeiset peliohjaimet" msgid "2-axis, 4-button joystick" msgstr "2-akselinen 4-painikkeinen peliohjain" @@ -777,12 +873,39 @@ msgstr "4-akselinen 4-painikkeinen peliohjain" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Thrustmaster Flight Control System" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "" + +msgid "2-button gamepad(s)" +msgstr "2-painikkeiset peliohjaimet" + +msgid "2-button flight yoke" +msgstr "2-painikkeinen lento-ohjain" + +msgid "4-button gamepad" +msgstr "4-painikkeinen peliohjain" + +msgid "4-button flight yoke" +msgstr "4-painikkeinen lento-ohjain" + +msgid "2-button flight yoke with throttle" +msgstr "2-painikkeinen lento-ohjain kaasuvivulla" + +msgid "4-button flight yoke with throttle" +msgstr "4-painikkeinen lento-ohjain kaasuvivulla" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Win95-ratti (3-akselinen, 4-painikkeinen)" + msgid "None" msgstr "Ei mikään" @@ -792,6 +915,9 @@ msgstr "%1 Mt (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Levyke %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Levyke %1 (%2): %3" + msgid "Advanced sector images" msgstr "Kehittyneet sektorilevykuvat" @@ -813,6 +939,9 @@ msgstr "GhostPCLin alustus epäonnistui" msgid "MO %1 (%2): %3" msgstr "MO %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&MO %1 (%2): %3" + msgid "MO images" msgstr "MO-levykuvat" @@ -822,6 +951,15 @@ msgstr "Tervetuloa 86Boxiin!" msgid "Internal device" msgstr "Sisäinen laite" +msgid "&File" +msgstr "&Tiedosto" + +msgid "&New machine..." +msgstr "&Uusi kone..." + +msgid "&Check for updates..." +msgstr "T&arkista päivitykset..." + msgid "Exit" msgstr "Poistu" @@ -844,7 +982,7 @@ msgid "86Box v" msgstr "86Box v" msgid "An emulator of old computers\n\nAuthors: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n\nWith previous core contributions from Sarah Walker, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information." -msgstr "Vanhojen tietokoneiden emulaattori\n\nTekijät: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne ja muut.\n\nSarah Walkerin, leilein, JohnElliottin, greatpsychon ja muiden aiemmat keskeiset panokset.\n\nJulkaistu GNU General Public License 2. version tai myöhemmän alaisena. Tarkempia tietoja LICENSE-tiedostossa." +msgstr "Vanhojen tietokoneiden emulaattori\n\nTekijät: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne ja muut.\n\nSisältää Sarah Walkerin, leilein, JohnElliottin, greatpsychon ja muiden aiemmat keskeiset työpanokset.\n\nJulkaistu GNU General Public License 2. version tai myöhemmän alaisena. Tarkempia tietoja LICENSE-tiedostossa." msgid "Hardware not available" msgstr "Laitteisto ei ole saatavilla" @@ -853,7 +991,7 @@ msgid "Make sure %1 is installed and that you are on a %1-compatible network con msgstr "Varmista, että %1 on asennettu ja että verkkoyhteytesi on %1-yhteensopiva." msgid "Invalid configuration" -msgstr "Virheelliset määritykset" +msgstr "Virheellinen määritys" msgid "%1 is required for automatic conversion of PostScript files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as PostScript (.ps) files." msgstr "%1 vaaditaan PostScript-tiedostojen automaattiseen muuntamiseen PDF-tiedostoiksi.\n\nKaikki geneeriselle PostScript-tulostimelle lähetetyt asiakirjat tallennetaan PostScript (.ps) -tiedostoina." @@ -886,7 +1024,7 @@ msgid "GLSL shaders" msgstr "GLSL-varjostinohjelmat" msgid "You are loading an unsupported configuration" -msgstr "Olet lataamassa ei-tuettuja määrittelyjä" +msgstr "Olet lataamassa ei-tuettua määritystä" msgid "CPU type filtering based on selected machine is disabled for this emulated machine.\n\nThis makes it possible to choose a CPU that is otherwise incompatible with the selected machine. However, you may run into incompatibilities with the machine BIOS or other software.\n\nEnabling this setting is not officially supported and any bug reports filed may be closed as invalid." msgstr "Valittuun tietokoneeseen perustuva suoritintyypin suodatus ei ole käytössä tällä emuloidulla koneella.\n\nTämä mahdollistaa muutoin yhteensopimattoman suorittimen valinnan kyseisen tietokoneen kanssa. Voit kuitenkin kohdata ongelmia tietokoneen BIOS:in tai muun ohjelmiston kanssa.\n\nTämän asetuksen käyttö ei ole virallisesti tuettua ja kaikki tehdyt virheraportit voidaan sulkea epäpätevinä." @@ -897,12 +1035,18 @@ msgstr "Jatka" msgid "Cassette: %1" msgstr "Kasetti: %1" +msgid "C&assette: %1" +msgstr "K&asetti: %1" + msgid "Cassette images" msgstr "Kasettitiedostot" msgid "Cartridge %1: %2" msgstr "ROM-moduuli %1: %2" +msgid "Car&tridge %1: %2" +msgstr "R&OM-moduuli %1: %2" + msgid "Cartridge images" msgstr "ROM-moduulikuvat" @@ -912,6 +1056,9 @@ msgstr "Jatka suoritusta" msgid "Pause execution" msgstr "Pysäytä suoritus" +msgid "Ctrl+Alt+Del" +msgstr "" + msgid "Press Ctrl+Alt+Del" msgstr "Paina Ctrl+Alt+Del" @@ -921,9 +1068,279 @@ msgstr "Paina Ctrl+Alt+Esc" msgid "Hard reset" msgstr "Kylmä uudelleenkäynnistys" +msgid "Force shutdown" +msgstr "Pakota sammutus" + +msgid "Start" +msgstr "Käynnistä" + +msgid "Not running" +msgstr "Ei käynnissä" + +msgid "Running" +msgstr "Käynnissä" + +msgid "Paused" +msgstr "Pysäytetty" + +msgid "Waiting" +msgstr "Odottaa" + +msgid "Powered Off" +msgstr "Sammutettu" + +msgid "%n running" +msgstr "%n käynnissä" + +msgid "%n paused" +msgstr "%n pysäytetty" + +msgid "%n waiting" +msgstr "%n odottaa" + +msgid "%1 total" +msgstr "yhteensä %1" + +msgid "VMs: %1" +msgstr "Virtuaalikoneita: %1" + +msgid "System Directory:" +msgstr "Konekansio:" + +msgid "Choose directory" +msgstr "Valitse kansio" + +msgid "Choose configuration file" +msgstr "Valitse konemääritystiedosto" + +msgid "86Box configuration files (86box.cfg)" +msgstr "86Box-konemääritystiedostot (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Määrityksen lukeminen epäonnistui" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Valittua määritystä ei voitu avata: %1" + +msgid "Use regular expressions in search box" +msgstr "Käytä säännöllisiä lausekkeita (regex) hakukentässä" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 konetta on tällä hetkellä aktiivisena. Haluatko silti sulkea virtuaalikoneiden hallinnan?" + +msgid "Add new system wizard" +msgstr "Koneenlisäysohjelma" + +msgid "Introduction" +msgstr "Johdanto" + +msgid "This will help you add a new system to 86Box." +msgstr "Tämä ohjelma auttaa sinua lisäämään uuden koneen 86Boxiin." + +msgid "New configuration" +msgstr "Uusi määritys" + +msgid "Complete" +msgstr "Valmis" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "Ohjelma käynnistää koneen määrityksen." + +msgid "Use existing configuration" +msgstr "Käytä olemassaolevaa määritystä" + +msgid "Type some notes here" +msgstr "Kirjoita muistiinpanoja" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Liitä olemassaolevan määrityksen sisälto alla olevaan tekstikenttään." + +msgid "Load configuration from file" +msgstr "Lataa määritys tiedostosta" + +msgid "System name" +msgstr "Koneen nimi" + +msgid "System name:" +msgstr "Koneen nimi:" + +msgid "System name cannot contain certain characters" +msgstr "Koneen nimi ei voi sisältää joitakin merkkejä" + +msgid "System name already exists" +msgstr "Koneen nimi on jo olemassa" + +msgid "Please enter a directory for the system" +msgstr "Anna kansio koneelle" + +msgid "Directory does not exist" +msgstr "Kansiota ei ole olemassa" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "Koneelle luodaan uusi kansio valittuun kansioon" + +msgid "System location:" +msgstr "Koneen sijainti:" + +msgid "System name and location" +msgstr "Koneen nimi ja sijainti:" + +msgid "Enter the name of the system and choose the location" +msgstr "Anna koneen nimi ja valitse sijainti" + +msgid "Enter the name of the system" +msgstr "Kirjoita koneen nimi" + +msgid "Please enter a system name" +msgstr "Anna koneelle nimi" + +msgid "Display name (optional):" +msgstr "Valinnainen näyttönimi:" + +msgid "Display name:" +msgstr "Näyttönimi:" + +msgid "Set display name" +msgstr "Aseta näyttönimi" + +msgid "Enter the new display name (blank to reset)" +msgstr "Anna uusi näyttönimi tai poista se" + +msgid "Change &display name..." +msgstr "Vaihda &näyttönimi" + +msgid "Context Menu" +msgstr "Kontekstivalikko" + +msgid "&Open folder..." +msgstr "&Avaa kansio..." + +msgid "Open p&rinter tray..." +msgstr "Avaa &tulostimen lokero..." + +msgid "Set &icon..." +msgstr "Aseta &kuvake..." + +msgid "Select an icon" +msgstr "Valitse kuvake" + +msgid "C&lone..." +msgstr "K&loonaa..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "Virtuaalikone \"%1\" (%2) kloonataan tänne:" + +msgid "Directory %1 already exists" +msgstr "Hakemisto %1 on jo olemassa" + +msgid "You cannot use the following characters in the name: %1" +msgstr "Et voi käyttää seuraavia merkkejä nimessä: %1" + +msgid "Clone" +msgstr "Kloonaa" + +msgid "Failed to create directory for cloned VM" +msgstr "Kloonatulle virtuaalikoneelle ei voitu luoda hakemistoa" + +msgid "Failed to clone VM." +msgstr "Virtuaalikoneen kloonaus epäonnistui." + +msgid "Directory in use" +msgstr "Hakemisto käytössä" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "Valittu hakemisto on jo käytössä. Valitse toinen hakemisto." + +msgid "Create directory failed" +msgstr "Hakemiston luominen epäonnistui" + +msgid "Unable to create the directory for the new system" +msgstr "Uudelle koneelle ei voitu luoda hakemistoa" + +msgid "Configuration write failed" +msgstr "Määrityksen kirjoitus epäonnistui" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Asetustiedostoa %1 ei voitu avata kirjoittamista varten" + +msgid "Error adding system" +msgstr "Koneenlisäysvirhe" + +msgid "Remove directory failed" +msgstr "Hakemiston poistaminen epäonnistui" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Joitakin konehakemiston tiedostoista ei voitu poistaa. Poista ne käsin." + +msgid "Build" +msgstr "Käännös" + +msgid "Version" +msgstr "Versio" + +msgid "An update to 86Box is available: %1 %2" +msgstr "86Box-päivitys on saatavilla: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Päivityksiä ei voitu tarkistaa: %1" + +msgid "An update to 86Box is available!" +msgstr "86Box-päivitys on saatavilla!" + +msgid "Warning" +msgstr "Varoitus" + +msgid "&Kill" +msgstr "P&akkopysäytä" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Virtuaalikoneen pakkopysäytys saattaa johtaa datan menettämiseen. Tee niin ainoastaan jos 86Box-prosessi on jumissa.\n\nHaluatko varmasti pakkopysäyttää \"%1\"-virtuaalikoneen?" + +msgid "&Delete" +msgstr "&Poista" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Haluatko varmasti poistaa \"%1\"-virtuaalikoneen ja kaikki sen tiedostot? Poistamista ei voi perua!" + +msgid "Show &config file" +msgstr "Näytä &määritystiedosto" + +msgid "No screenshot" +msgstr "Ei kuvakaappausta" + +msgid "Search" +msgstr "Hae" + +msgid "Searching for VMs..." +msgstr "Haetaan virtuaalikoneita..." + +msgid "Found %1" +msgstr "%1 löydetty" + +msgid "System" +msgstr "Kone" + +msgid "Storage" +msgstr "Tallennus" + +msgid "Disk %1: " +msgstr "Levy %1: " + +msgid "No disks" +msgstr "Ei levyjä" + +msgid "Audio" +msgstr "Ääni" + +msgid "Audio:" +msgstr "Ääni:" + msgid "ACPI shutdown" msgstr "ACPI-sammutus" +msgid "ACP&I shutdown" +msgstr "ACP&I-sammutus" + msgid "Hard disk (%1)" msgstr "Kiintolevy (%1)" @@ -952,10 +1369,10 @@ msgid "Hard disk images" msgstr "Kiintolevykuvat" msgid "Unable to read file" -msgstr "Tiedostoa ei voi lukea" +msgstr "Tiedostoa ei voitu lukea" msgid "Unable to write file" -msgstr "Tiedostoon ei voi kirjoittaa" +msgstr "Tiedostoa ei voitu kirjoittaa" msgid "HDI or HDX images with a sector size other than 512 are not supported." msgstr "HDI- ja HDX-levykuvien ainoa tuettu sektorikoko on 512" @@ -973,7 +1390,7 @@ msgid "Make sure the file exists and is readable." msgstr "Varmista, että tiedosto on olemassa ja lukukelpoinen" msgid "Make sure the file is being saved to a writable directory." -msgstr "Varmista, että tiedoston tallennuskansioon on kirjoitusoikeus" +msgstr "Varmista, että tiedoston tallennuskansioon pystyy kirjoittamaan." msgid "Disk image too large" msgstr "Liian suuri levykuva" @@ -1051,7 +1468,7 @@ msgid "Parent and child disk timestamps do not match" msgstr "Ylä- ja alatason levyjen aikaleimat eivät täsmää" msgid "Could not fix VHD timestamp." -msgstr "VHD aikaleimaa ei pystytty korjaamaan." +msgstr "VHD:n aikaleimaa ei pystytty korjaamaan." msgid "MFM/RLL" msgstr "MFM/RLL" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 Kt" @@ -1165,7 +1585,7 @@ msgid "Mouse sensitivity:" msgstr "Hiiren herkkyys:" msgid "Select media images from program working directory" -msgstr "Valitse mediakuvat ohjelman työhakemistosta" +msgstr "Valitse levykuvat ohjelman työhakemistosta" msgid "PIT mode:" msgstr "PIT-tila:" @@ -1186,13 +1606,13 @@ msgid "WinBox is no longer supported" msgstr "WinBoxia ei enää tueta" msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." -msgstr "WinBox-managerin kehitys lopetettiin vuonna 2022, koska ylläpitäjiä ei ollut riittävästi. Koska suuntaamme ponnistuksemme 86Boxin parantamiseen entisestään, olemme päättäneet olla enää tukematta WinBoxia managerina.\n\nWinBoxin kautta ei enää toimiteta päivityksiä, ja saatat kohdata virheellistä käyttäytymistä, jos jatkat sen käyttöä 86Boxin uudemmissa versioissa. Kaikki WinBoxin käyttäytymiseen liittyvät vikailmoitukset suljetaan virheellisinä.\n\nSiirry osoitteeseen 86box.net saadaksesi luettelon muista käyttämistäsi hallintaohjelmista." +msgstr "WinBox-managerin kehitys lopetettiin vuonna 2022, koska ylläpitäjiä ei ollut riittävästi. Koska suuntaamme ponnistuksemme 86Boxin parantamiseen entisestään, olemme päättäneet olla enää tukematta WinBoxia managerina.\n\nWinBoxin kautta ei enää toimiteta päivityksiä, ja saatat kohdata virheellistä käyttäytymistä, jos jatkat sen käyttöä 86Boxin uudemmissa versioissa. Kaikki WinBoxin käyttäytymiseen liittyvät vikailmoitukset suljetaan virheellisinä.\n\nSiirry osoitteeseen 86box.net saadaksesi luettelon muista hallintaohjelmista." msgid "Generate" msgstr "Luo" msgid "Joystick configuration" -msgstr "Peliohjainin kokoonpano" +msgstr "Peliohjaimen määritys" msgid "Device" msgstr "Laite" @@ -1209,47 +1629,44 @@ msgstr "MCA-laitteet" msgid "List of MCA devices:" msgstr "Luettelo MCA-laitteista:" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Tablettityökalu" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "Tietoja &Qt:sta" -msgid "About Qt" -msgstr "Tietoja Qt:sta" - -msgid "MCA devices..." +msgid "&MCA devices..." msgstr "MCA-laitteet..." -msgid "Show non-primary monitors" -msgstr "Näytä muut kuin ensisijaiset monitorit" +msgid "Show non-&primary monitors" +msgstr "Näytä muut kuin ensisijaiset näytöt" -msgid "Open screenshots folder..." +msgid "Open screenshots &folder..." msgstr "Avaa kuvakaappaukset-kansio..." -msgid "Apply fullscreen stretch mode when maximized" -msgstr "Sovelletaan koko näytön venytystilaa maksimoidessa" +msgid "Appl&y fullscreen stretch mode when maximized" +msgstr "Sovella koko näytön venytystilaa maksimoidessa" -msgid "Cursor/Puck" -msgstr "Kursori/Kiekko" +msgid "&Cursor/Puck" +msgstr "&Kursori/Kiekko" -msgid "Pen" -msgstr "Kynä" +msgid "&Pen" +msgstr "K&ynä" -msgid "Host CD/DVD Drive (%1:)" -msgstr "Isäntä CD/DVD-asema (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "&Isäntä CD/DVD-asema (%1:)" msgid "&Connected" msgstr "&Yhdistetty" -msgid "Clear image history" -msgstr "Tyhjennä kuvahistoria" +msgid "Clear image &history" +msgstr "Tyhjennä levykuva&historia" msgid "Create..." msgstr "Luo..." msgid "Host CD/DVD Drive (%1)" -msgstr "Isäntä CD/DVD-asema (%1)" +msgstr "Isännän CD/DVD-asema (%1)" msgid "Unknown Bus" msgstr "Tuntematon väylä" @@ -1257,14 +1674,20 @@ msgstr "Tuntematon väylä" msgid "Null Driver" msgstr "Nolla-ajuri" +msgid "NIC:" +msgstr "Verkkokortti:" + msgid "NIC %1 (%2) %3" -msgstr "NIC %1 (%2) %3" +msgstr "Verkkokortti %1 (%2) %3" + +msgid "&NIC %1 (%2) %3" +msgstr "&Verkkokortti %1 (%2) %3" msgid "Render behavior" msgstr "Renderöintikäyttäytyminen" msgid "Use target framerate:" -msgstr "Käytä kuvataajuustavoitetta:" +msgstr "Kuvataajuustavoite:" msgid " fps" msgstr " ruutua/s" @@ -1281,9 +1704,6 @@ msgstr "Varjostinohjelmat" msgid "Remove" msgstr "Poista" -msgid "No shader selected" -msgstr "Ei valittu varjostinohjelmatta" - msgid "Browse..." msgstr "Selaa..." @@ -1300,16 +1720,16 @@ msgid "Error initializing OpenGL" msgstr "Virhe OpenGL:n alustamisessa" msgid "\nFalling back to software rendering." -msgstr "\nPaluu ohjelmistoalustusöintiin." +msgstr "\nPalataan ohjelmistopohjaiseen renderöintiin." msgid "

When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.

" -msgstr "

Kun valitset mediakuvia (CD-ROM, levykkeet jne.), avausikkuna käynnistyy samaan hakemistoon kuin 86Boxin konfigurointitiedosto. Tällä asetuksella on todennäköisesti merkitystä vain macOS-käyttöjärjestelmässä.

" +msgstr "

Kun valitset levykuvia (CD-ROM, levykkeet jne.), avausikkuna aukeaa 86Boxin määritystiedoston hakemistoon. Tällä asetuksella on todennäköisesti merkitystä vain macOS-käyttöjärjestelmässä.

" msgid "This machine might have been moved or copied." msgstr "Kone on saatettu siirtää tai kopioida." msgid "In order to ensure proper networking functionality, 86Box needs to know if this machine was moved or copied.\n\nSelect \"I Copied It\" if you are not sure." -msgstr "Varmistaakseen asianmukaisen verkkotoiminnon 86Boxin on tiedettävä, onko tämä kone siirretty vai kopioitu.\n\nValitse \"Kopioin sen\", jos et ole varma." +msgstr "Varmistaakseen asianmukaisen verkkotoiminnan 86Boxin on tiedettävä, onko tämä kone siirretty vai kopioitu.\n\nValitse \"Kopioin sen\", jos et ole varma." msgid "I Moved It" msgstr "Siirsin sen" @@ -1324,7 +1744,10 @@ msgid "No MCA devices." msgstr "Ei MCA-laitteita." msgid "MiB" -msgstr "Mit" +msgstr "" + +msgid "GiB" +msgstr "" msgid "Network Card #1" msgstr "Verkkokortti 1" @@ -1348,13 +1771,13 @@ msgid "Adapter:" msgstr "Sovitin:" msgid "VDE Socket:" -msgstr "VDE-pistorasia:" +msgstr "VDE-socket:" msgid "86Box Unit Tester" msgstr "86Box Unit Tester" msgid "Novell NetWare 2.x Key Card" -msgstr "Novell NetWare 2.x -avainkortti" +msgstr "Novell NetWare 2.x-avainkortti" msgid "Serial port passthrough 1" msgstr "Sarjaportin läpivienti 1" @@ -1368,8 +1791,26 @@ msgstr "Sarjaportin läpivienti 3" msgid "Serial port passthrough 4" msgstr "Sarjaportin läpivienti 4" -msgid "Renderer options..." -msgstr "Alustusasetukset..." +msgid "Renderer &options..." +msgstr "Renderöijän &asetukset..." + +msgid "PC/XT Keyboard" +msgstr "PC/XT-näppäimistö" + +msgid "AT Keyboard" +msgstr "AT-näppäimistö" + +msgid "AX Keyboard" +msgstr "AX-näppäimistö" + +msgid "PS/2 Keyboard" +msgstr "PS/2-näppäimistö" + +msgid "PS/55 Keyboard" +msgstr "PS/55-näppäimistö" + +msgid "Keys" +msgstr "Näppäimet" msgid "Logitech/Microsoft Bus Mouse" msgstr "Logitech/Microsoft-väylähiiri" @@ -1380,18 +1821,30 @@ msgstr "Microsoft-väylähiiri (InPort)" msgid "Mouse Systems Serial Mouse" msgstr "Mouse Systems-sarjahiiri" +msgid "Mouse Systems Bus Mouse" +msgstr "" + msgid "Microsoft Serial Mouse" msgstr "Microsoft-sarjahiiri" +msgid "Microsoft Serial BallPoint" +msgstr "" + msgid "Logitech Serial Mouse" msgstr "Logitech-sarjahiiri" msgid "PS/2 Mouse" -msgstr "PS/2 hiiri" +msgstr "PS/2-hiiri" + +msgid "PS/2 QuickPort Mouse" +msgstr "PS/2 QuickPort-hiiri" msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (sarja)" +msgid "Default Baud rate" +msgstr "Oletussiirtonopeus" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Tavallinen Hayes-yhteensopiva modeemi" @@ -1416,11 +1869,53 @@ msgstr "Järjestelmän MIDI" msgid "MIDI Input Device" msgstr "MIDI-syöttölaite" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "BIOS-tiedosto" + +msgid "BIOS file (ROM #1)" +msgstr "BIOS-tiedosto (ROM #1)" + +msgid "BIOS file (ROM #2)" +msgstr "BIOS-tiedosto (ROM #2)" + +msgid "BIOS file (ROM #3)" +msgstr "BIOS-tiedosto (ROM #3)" + +msgid "BIOS file (ROM #4)" +msgstr "BIOS-tiedosto (ROM #4)" + +msgid "BIOS address" msgstr "BIOS-osoite" +msgid "BIOS address (ROM #1)" +msgstr "BIOS-osoite (ROM #1)" + +msgid "BIOS address (ROM #2)" +msgstr "BIOS-osoite (ROM #2)" + +msgid "BIOS address (ROM #3)" +msgstr "BIOS-osoite (ROM #3)" + +msgid "BIOS address (ROM #4)" +msgstr "BIOS-osoite (ROM #4)" + msgid "Enable BIOS extension ROM Writes" -msgstr "Käytä BIOS-laajennuksen ROM-kirjoitusten" +msgstr "Salli BIOS-laajennuksen ROM-kirjoitukset" + +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "Salli BIOS-laajennuksen ROM-kirjoitukset (ROM #1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "Salli BIOS-laajennuksen ROM-kirjoitukset (ROM #2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "Salli BIOS-laajennuksen ROM-kirjoitukset (ROM #3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "Salli BIOS-laajennuksen ROM-kirjoitukset (ROM #4)" + +msgid "Linear framebuffer base" +msgstr "" msgid "Address" msgstr "Osoite" @@ -1428,53 +1923,83 @@ msgstr "Osoite" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "Sarjaportin IRQ" + +msgid "Parallel port IRQ" +msgstr "Rinnakkaisportin IRQ" + msgid "BIOS Revision" -msgstr "BIOS-tarkistus" +msgstr "BIOS-versio" + +msgid "BIOS Version" +msgstr "BIOS-versio" + +msgid "BIOS Language" +msgstr "BIOS-kieli" + +msgid "IBM 5161 Expansion Unit" +msgstr "IBM 5161-laajennusyksikkö" + +msgid "IBM Cassette Basic" +msgstr "" msgid "Translate 26 -> 17" -msgstr "Käännä 26 -> 17" +msgstr "Muunna 26 -> 17" msgid "Language" msgstr "Kieli" msgid "Enable backlight" -msgstr "Käytä taustavalota" +msgstr "Taustavalo" msgid "Invert colors" -msgstr "Käännä värit" +msgstr "Käänteiset värit" msgid "BIOS size" -msgstr "BIOS-koko" +msgstr "BIOS:in koko" + +msgid "BIOS size (ROM #1)" +msgstr "BIOS:in koko (ROM #1)" + +msgid "BIOS size (ROM #2)" +msgstr "BIOS:in koko (ROM #2)" + +msgid "BIOS size (ROM #3)" +msgstr "BIOS:in koko (ROM #3)" + +msgid "BIOS size (ROM #4)" +msgstr "BIOS:in koko (ROM #4)" msgid "Map C0000-C7FFF as UMB" -msgstr "Kartta C0000-C7FFF UMB:nä" +msgstr "Kartoita C0000-C7FFF UMB:nä" msgid "Map C8000-CFFFF as UMB" -msgstr "Kartta C8000-CFFFF UMB:nä" +msgstr "Kartoita C8000-CFFFF UMB:nä" msgid "Map D0000-D7FFF as UMB" -msgstr "Kartta D0000-D7FFF UMB:nä" +msgstr "Kartoita D0000-D7FFF UMB:nä" msgid "Map D8000-DFFFF as UMB" -msgstr "Kartta D8000-DFFFF UMB:nä" +msgstr "Kartoita D8000-DFFFF UMB:nä" msgid "Map E0000-E7FFF as UMB" -msgstr "Kartta E0000-E7FFF UMB:nä" +msgstr "Kartoita E0000-E7FFF UMB:nä" msgid "Map E8000-EFFFF as UMB" -msgstr "Kartta E8000-EFFFF UMB:nä" +msgstr "Kartoita E8000-EFFFF UMB:nä" msgid "JS9 Jumper (JIM)" -msgstr "JS9 Jumpperi (JIM)" +msgstr "JS9-jumpperi (JIM)" msgid "MIDI Output Device" msgstr "MIDI-lähtölaite" msgid "MIDI Real time" -msgstr "MIDI reaaliajassa" +msgstr "Reaaliaikainen MIDI" msgid "MIDI Thru" -msgstr "MIDI-tulon läpivienti" +msgstr "MIDI-läpivienti" msgid "MIDI Clockout" msgstr "MIDI-kellon ulostulo" @@ -1486,49 +2011,52 @@ msgid "Output Gain" msgstr "Lähtötaso" msgid "Chorus" -msgstr "Kuoro" +msgstr "" msgid "Chorus Voices" -msgstr "Kuoron äänet" +msgstr "" msgid "Chorus Level" -msgstr "Kuorotaso" +msgstr "" msgid "Chorus Speed" -msgstr "Kuronopeus" +msgstr "" msgid "Chorus Depth" -msgstr "Kuorosyvyys" +msgstr "" msgid "Chorus Waveform" -msgstr "Kuoroaaltomuoto" +msgstr "" msgid "Reverb" msgstr "Jälkikaiunta" msgid "Reverb Room Size" -msgstr "Jälkikaiuntahuoneen koko" +msgstr "" msgid "Reverb Damping" -msgstr "Jälkikaiunta vaimennus" +msgstr "" msgid "Reverb Width" -msgstr "Jälkikaiunnan leveys" +msgstr "" msgid "Reverb Level" -msgstr "Jälkikaiunnan taso" +msgstr "" msgid "Interpolation Method" msgstr "Interpolointimenetelmä" +msgid "Dynamic Sample Loading" +msgstr "Dynaaminen näytteiden lataus" + msgid "Reverb Output Gain" -msgstr "Jälkikaiunta lähtötaso" +msgstr "Jälkikaiunnan lähtötaso" msgid "Reversed stereo" msgstr "Käänteinen stereo" msgid "Nice ramp" -msgstr "Hieno ramppi" +msgstr "" msgid "Hz" msgstr "Hz" @@ -1540,16 +2068,16 @@ msgid "Serial Port" msgstr "Sarjaportti" msgid "RTS toggle" -msgstr "RTS-vaihtokytkin" +msgstr "" msgid "Revision" -msgstr "Tarkistus" +msgstr "Versio" msgid "Controller" msgstr "Ohjain" msgid "Show Crosshair" -msgstr "Näytä ristikko" +msgstr "Näytä tähtäin" msgid "DMA" msgstr "DMA" @@ -1561,7 +2089,7 @@ msgid "MAC Address OUI" msgstr "MAC-osoitteen OUI" msgid "Enable BIOS" -msgstr "Käytä BIOS:ta" +msgstr "BIOS" msgid "Baud Rate" msgstr "Baudinopeus" @@ -1582,7 +2110,7 @@ msgid "RAM size" msgstr "RAM-koko" msgid "Initial RAM size" -msgstr "Alkuperäinen RAM-koko" +msgstr "RAM-muistin alkukoko" msgid "Serial Number" msgstr "Sarjanumero" @@ -1606,7 +2134,13 @@ msgid "Low DMA" msgstr "Matala DMA" msgid "Enable Game port" -msgstr "Käytä peliporttita" +msgstr "Peliportti" + +msgid "SID Model" +msgstr "SID-malli" + +msgid "SID Filter Strength" +msgstr "SID-filtterin vahvuus" msgid "Surround module" msgstr "Surround-moduuli" @@ -1615,11 +2149,17 @@ msgid "CODEC" msgstr "CODEC" msgid "Raise CODEC interrupt on CODEC setup (needed by some drivers)" -msgstr "CODEC-keskeytyksen nostaminen CODEC-asennuksen yhteydessä (jotkut ohjaimet tarvitsevat sitä)" +msgstr "CODEC-keskeytys CODEC-asennuksen yhteydessä (jotkut ohjaimet tarvitsevat sitä)" msgid "SB Address" msgstr "SB-osoite" +msgid "Adlib Address" +msgstr "Adlib-osoite" + +msgid "Use EEPROM setting" +msgstr "Käytä EEPROM-asetusta" + msgid "WSS IRQ" msgstr "WSS-IRQ" @@ -1627,7 +2167,7 @@ msgid "WSS DMA" msgstr "WSS-DMA" msgid "Enable OPL" -msgstr "Käytä OPL:ta" +msgstr "OPL" msgid "Receive MIDI input (MPU-401)" msgstr "Vastaanota MIDI-tulo (MPU-401)" @@ -1636,10 +2176,10 @@ msgid "SB low DMA" msgstr "Matala SB-DMA" msgid "6CH variant (6-channel)" -msgstr "6CH-muunnos (6-kanavainen)" +msgstr "6CH-versio (6-kanavainen)" msgid "Enable CMS" -msgstr "Käytä CMS:ta" +msgstr "CMS" msgid "Mixer" msgstr "Mikseri" @@ -1648,7 +2188,7 @@ msgid "High DMA" msgstr "Korkea DMA" msgid "Control PC speaker" -msgstr "Ohjaus PC-kaiutin" +msgstr "Ohjaa PC-kaiutinta" msgid "Memory size" msgstr "Muistin koko" @@ -1660,13 +2200,13 @@ msgid "IDE Controller" msgstr "IDE-ohjain" msgid "Codec" -msgstr "Codec" +msgstr "Koodekki" msgid "GUS type" msgstr "GUS-tyyppi" msgid "Enable 0x04 \"Exit 86Box\" command" -msgstr "Käytä komentota 0x04 \"Poistuminen 86Box\"" +msgstr "Salli 0x04-komento \"Sulje 86Box\"" msgid "Display type" msgstr "Näytön tyyppi" @@ -1681,10 +2221,10 @@ msgid "Line doubling type" msgstr "Linjan kaksinkertaistamistyyppi" msgid "Snow emulation" -msgstr "Lumi-emulointi" +msgstr "Lumiemulointi" msgid "Monitor type" -msgstr "Monitorityyppi" +msgstr "Näytön tyyppi" msgid "Character set" msgstr "Merkistö" @@ -1702,31 +2242,37 @@ msgid "RAMDAC type" msgstr "RAMDAC-tyyppi" msgid "Blend" -msgstr "Sekoitus" +msgstr "Sekoita" + +msgid "Font" +msgstr "Fontti" msgid "Bilinear filtering" msgstr "Bilineaarinen suodatus" +msgid "Video chroma-keying" +msgstr "Videon väriavainnus" + msgid "Dithering" -msgstr "Dithering" +msgstr "Sekoitussävytys" msgid "Enable NMI for CGA emulation" -msgstr "Käytä NMI:ta CGA-emulointia varten" +msgstr "NMI CGA-emulointia varten" msgid "Voodoo type" msgstr "Voodoo-tyyppi" msgid "Framebuffer memory size" -msgstr "Kehyspuskurin muistin koko" +msgstr "Framebuffer-muistin koko" msgid "Texture memory size" msgstr "Tekstuurimuistin koko" msgid "Dither subtraction" -msgstr "Ditherin vähennys" +msgstr "Sekoitussävytyksen vähennys" msgid "Screen Filter" -msgstr "Seulasuodatin" +msgstr "Näyttösuodatin" msgid "Render threads" msgstr "Renderöintisäikeet" @@ -1749,8 +2295,35 @@ msgstr "Siirtonopeus" msgid "EMS mode" msgstr "EMS-tila" +msgid "EMS Address" +msgstr "EMS-osoite" + +msgid "EMS 1 Address" +msgstr "EMS 1-osoite" + +msgid "EMS 2 Address" +msgstr "EMS 2-osoite" + +msgid "EMS Memory Size" +msgstr "EMS-muistin koko" + +msgid "EMS 1 Memory Size" +msgstr "EMS 1-muistin koko" + +msgid "EMS 2 Memory Size" +msgstr "EMS 2-muistin koko" + +msgid "Enable EMS" +msgstr "EMS" + +msgid "Enable EMS 1" +msgstr "EMS 1" + +msgid "Enable EMS 2" +msgstr "EMS 2" + msgid "Address for > 2 MB" -msgstr "Osoite > 2 Mt" +msgstr "> 2 Mt-osoite" msgid "Frame Address" msgstr "Kehyksen osoite" @@ -1765,13 +2338,13 @@ msgid "Always at selected speed" msgstr "Aina valitulla nopeudella" msgid "BIOS setting + Hotkeys (off during POST)" -msgstr "BIOS-asetus + pikanäppäimet (pois päältä POSTin aikana)" +msgstr "BIOS-asetus + pikanäppäimet (pois päältä POST:in aikana)" -msgid "64 kB starting from F0000" -msgstr "64 kB alkaen F0000:sta" +msgid "64 KB starting from F0000" +msgstr "64 Kt alkaen F0000:sta" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB alkaen E0000:sta (osoitteen käänteinen MSB, viimeiset 64 kB ensin)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 Kt alkaen E0000:sta (osoitteen käänteinen MSB, viimeiset 64 Kt ensin)" msgid "Sine" msgstr "Sini" @@ -1783,10 +2356,10 @@ msgid "Linear" msgstr "Lineaarinen" msgid "4th Order" -msgstr "4. kertaluvun" +msgstr "" msgid "7th Order" -msgstr "7. kertaluvun" +msgstr "" msgid "Non-timed (original)" msgstr "Ajastamaton (alkuperäinen)" @@ -1801,13 +2374,13 @@ msgid "Three" msgstr "Kolme" msgid "Wheel" -msgstr "Pyörä" +msgstr "Rulla" msgid "Five + Wheel" -msgstr "Viisi + pyörä" +msgstr "Viisi + rulla" msgid "Five + 2 Wheels" -msgstr "" +msgstr "Viisi + kaksi rullaa" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 sarja / SMT3(R)V" @@ -1837,7 +2410,7 @@ msgid "2 MB" msgstr "2 Mt" msgid "8 MB" -msgstr " 8 Mt" +msgstr "8 Mt" msgid "28 MB" msgstr "28 Mt" @@ -1872,6 +2445,9 @@ msgstr "256 Kt" msgid "Composite" msgstr "Komposiitti" +msgid "True color" +msgstr "" + msgid "Old" msgstr "Vanha" @@ -1885,13 +2461,13 @@ msgid "Green Monochrome" msgstr "Vihreä yksivärinen" msgid "Amber Monochrome" -msgstr "Keltainen yksivärinen" +msgstr "Meripihkan värinen yksivärinen" msgid "Gray Monochrome" msgstr "Harmaa yksivärinen" msgid "Color (no brown)" -msgstr "Väri (ei ruskea)" +msgstr "Väri (ei ruskeaa)" msgid "Color (IBM 5153)" msgstr "Väri (IBM 5153)" @@ -1905,6 +2481,15 @@ msgstr "sRGB-interpolointi" msgid "Linear interpolation" msgstr "Lineaarinen interpolointi" +msgid "Has secondary 8x8 character set" +msgstr "" + +msgid "Has Quadcolor II daughter board" +msgstr "" + +msgid "Alternate monochrome contrast" +msgstr "Vaihtoehtoinen yksivärikontrasti" + msgid "128 KB" msgstr "128 Kt" @@ -1933,16 +2518,19 @@ msgid "Green" msgstr "Vihreä" msgid "Amber" -msgstr "Keltainen" +msgstr "Meripihka" msgid "Gray" msgstr "Harmaa" +msgid "Grayscale" +msgstr "Harmaasävy" + msgid "Color" msgstr "Väri" msgid "U.S. English" -msgstr "Yhdysvaltain englanti" +msgstr "Amerikanenglanti" msgid "Scandinavian" msgstr "Skandinaavinen" @@ -1951,20 +2539,29 @@ msgid "Other languages" msgstr "Muut kielet" msgid "Bochs latest" -msgstr "Bochs uusin" +msgstr "Uusin Bochs" + +msgid "Apply overscan deltas" +msgstr "" + +msgid "Mono Interlaced" +msgstr "Lomitettu yksivärinen" msgid "Mono Non-Interlaced" -msgstr "Yksivärinen ei-välitetyt" +msgstr "Ei-lomitettu yksivärinen" msgid "Color Interlaced" -msgstr "Väri välitetyt" +msgstr "Lomitettu väri" msgid "Color Non-Interlaced" -msgstr "Väri ei-välitetyt" +msgstr "Ei-lomitettu väri" msgid "3Dfx Voodoo Graphics" msgstr "3dfx Voodoo-grafiikkasuoritin" +msgid "3Dfx Voodoo 2" +msgstr "" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 TMU:ta)" @@ -2034,44 +2631,47 @@ msgstr "Läpiviennin baudinopeus" msgid "Named Pipe (Server)" msgstr "Nimetty putki (palvelin)" +msgid "Named Pipe (Client)" +msgstr "Nimettu putki (päätelaite)" + msgid "Host Serial Passthrough" msgstr "Isännän sarjaportin läpivienti" msgid "E&ject %1" -msgstr "&Poista kasettipesästä %1" +msgstr "&Poista %1" msgid "&Unmute" msgstr "&Poista mykistys" msgid "Softfloat FPU" -msgstr "Softfloat FPU" +msgstr "Softfloat-FPU" msgid "High performance impact" -msgstr "Suuri vaikutus suorituskykyyn" +msgstr "Merkittävä vaikutus suorituskykyyn" msgid "[Generic] RAM Disk (max. speed)" -msgstr "[Generic] RAM-levy (maksiminopeus)" +msgstr "[Yleinen] RAM-levy (maksiminopeus)" msgid "[Generic] 1989 (3500 RPM)" -msgstr "" +msgstr "[Yleinen] 1989 (3500 RPM)" msgid "[Generic] 1992 (3600 RPM)" -msgstr "" +msgstr "[Yleinen] 1992 (3600 RPM)" msgid "[Generic] 1994 (4500 RPM)" -msgstr "" +msgstr "[Yleinen] 1994 (4500 RPM)" msgid "[Generic] 1996 (5400 RPM)" -msgstr "" +msgstr "[Yleinen] 1996 (5400 RPM)" msgid "[Generic] 1997 (5400 RPM)" -msgstr "" +msgstr "[Yleinen] 1997 (5400 RPM)" msgid "[Generic] 1998 (5400 RPM)" -msgstr "" +msgstr "[Yleinen] 1998 (5400 RPM)" msgid "[Generic] 2000 (7200 RPM)" -msgstr "" +msgstr "[Yleinen] 2000 (7200 RPM)" msgid "IBM 8514/A clone (ISA)" msgstr "IBM 8514/A-klooni (ISA)" @@ -2079,6 +2679,12 @@ msgstr "IBM 8514/A-klooni (ISA)" msgid "Vendor" msgstr "Valmistaja" +msgid "30 Hz (JMP2 = 1)" +msgstr "" + +msgid "60 Hz (JMP2 = 2)" +msgstr "" + msgid "Generic PC/XT Memory Expansion" msgstr "Yleinen PC/XT-muistilaajennus" @@ -2089,64 +2695,265 @@ msgid "Unable to find Dot-Matrix fonts" msgstr "Pistematriisifontteja ei löydy" msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "TrueType-fontteja kansiossa \"roms/printer/fonts\"-hakemistoon yleinen ESC/P pistematriisitulostin emulointiin." +msgstr "\"roms/printer/fonts\"-hakemiston TrueType-fontteja vaaditaan ESC/P-pistematriisitulostimen emulointiin." msgid "Inhibit multimedia keys" -msgstr "" +msgstr "Estä multimedianäppäimet" msgid "Ask for confirmation before saving settings" -msgstr "" +msgstr "Kysy varmistusta ennen asetusten tallentamista" msgid "Ask for confirmation before hard resetting" -msgstr "" +msgstr "Kysy varmistusta ennen uudelleenkäynnistystä" msgid "Ask for confirmation before quitting" -msgstr "" +msgstr "Kysy varmistusta ennen lopettamista" msgid "Options" -msgstr "" +msgstr "Asetukset" msgid "Model" -msgstr "" +msgstr "Malli" msgid "Model:" -msgstr "" +msgstr "Malli:" msgid "Failed to initialize Vulkan renderer." -msgstr "" +msgstr "Vulkan-rendereriä ei voitu alustaa." msgid "GLSL Error" -msgstr "" +msgstr "GLSL-virhe" msgid "Could not load shader: %1" -msgstr "" +msgstr "Varjostinta %1 ei voitu ladata" msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" -msgstr "" +msgstr "Vähintään OpenGL-versio 3.0 vaaditaan. Tämänhetkinen GLSL-versio on %1.%2" msgid "Could not load texture: %1" -msgstr "" +msgstr "Tekstuuria ei voitu ladata: %1" msgid "Could not compile shader:\n\n%1" -msgstr "" +msgstr "Varjostinta ei voitu kääntää:\n\n%1" msgid "Program not linked:\n\n%1" -msgstr "" +msgstr "Ohjelmaa ei linkitetty:\n\n%1" msgid "Shader Manager" -msgstr "" +msgstr "Varjostinhallinta" msgid "Shader Configuration" -msgstr "" +msgstr "Varjostinasetukset" msgid "Add" -msgstr "" +msgstr "Lisää" msgid "Move up" -msgstr "" +msgstr "Siirrä ylös" msgid "Move down" -msgstr "" +msgstr "Siirrä alas" msgid "Could not load file %1" +msgstr "Tiedostoa %1 ei voitu ladata" + +msgid "Key Bindings:" +msgstr "Pikanäppäimet:" + +msgid "Action" +msgstr "Toiminto" + +msgid "Keybind" +msgstr "Pikanäppäin" + +msgid "Clear binding" +msgstr "Tyhjennä pikanäppäin" + +msgid "Bind" +msgstr "Määritä" + +msgid "Bind Key" +msgstr "Määritä pikanäppäin" + +msgid "Enter key combo:" +msgstr "Anna näppäinyhdistelmä:" + +msgid "Bind conflict" +msgstr "Pikanäppäinkonflikti" + +msgid "This key combo is already in use." +msgstr "Näppäinyhdistelmä on jo käytössä." + +msgid "Send Control+Alt+Del" +msgstr "Läheta Control+Alt+Del" + +msgid "Send Control+Alt+Escape" +msgstr "Lähetä Control+Alt+Escape" + +msgid "Toggle fullscreen" +msgstr "Koko näyttö" + +msgid "Screenshot" +msgstr "Kuvakaappaus" + +msgid "Release mouse pointer" +msgstr "Vapauta hiiren osoitin" + +msgid "Toggle pause" +msgstr "Pysäytä" + +msgid "Toggle mute" +msgstr "Mykistä" + +msgid "Text files" +msgstr "Tekstitiedostot" + +msgid "ROM files" +msgstr "ROM-tiedostot" + +msgid "SoundFont files" +msgstr "SoundFont-tiedostot" + +msgid "Local Switch" +msgstr "Paikallinen kytkin" + +msgid "Remote Switch" +msgstr "Etäkytkin" + +msgid "Switch:" +msgstr "Kytkin:" + +msgid "Hub Mode" +msgstr "Hubitila" + +msgid "Isäntänimi:" msgstr "" + +msgid "ISA RTC" +msgstr "" + +msgid "ISA RAM" +msgstr "" + +msgid "ISA ROM" +msgstr "" + +msgid "&Wipe NVRAM" +msgstr "&Tyhjennä NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Tämä poistaa kaikki NVRAM:iin liittyvät tiedostot \"nvr\"-kansiossa. Joudut määrittämään BIOS:in ja mahdollisesti muut laitteet uudelleen.\n\nHaluatko varmasti tyhjentää \"%1\"-virtuaalikoneen kaiken NVRAM-sisällön?" + +msgid "Success" +msgstr "Onnistui" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "\"%1\"-virtuaalikoneen NVRAM-sisällön tyhjentäminen onnistui" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "\"%1\"-virtuaalikoneen NVRAM-sisällön tyhjentäminen epäonnistui" + +msgid "%1 VM Manager" +msgstr "%1 - virtuaalikoneiden hallinta" + +msgid "%n disk(s)" +msgstr "%n levy(ä)" + +msgid "Unknown Status" +msgstr "Tuntematon tila" + +msgid "No Machines Found!" +msgstr "Koneita ei löytynyt!" + +msgid "Check for updates on startup" +msgstr "Tarkista päivitykset käynnistyksen yhteydessä" + +msgid "Unable to determine release information" +msgstr "Julkaisutietoja ei voitu hakea" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Päivitystenhakuvirhe:\n\n%1\n\nYritä uudelleen myöhemmin." + +msgid "Update check complete" +msgstr "Päivitystarkastus on valmis" + +msgid "stable" +msgstr "vakaa" + +msgid "beta" +msgstr "" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Sinulla on käytössä uusin %1-versio 86Boxista: %2" + +msgid "version" +msgstr "versio" + +msgid "build" +msgstr "käännös" + +msgid "You are currently running version %1." +msgstr "Käytät versiota %1." + +msgid "Version %1 is now available." +msgstr "Versio %1 on nyt saatavilla." + +msgid "You are currently running build %1." +msgstr "Käytät käännöstä %1" + +msgid "Build %1 is now available." +msgstr "Käännös %1 on nyt saatavilla." + +msgid "Would you like to visit the download page?" +msgstr "Haluatko siirtyä lataussivulle?" + +msgid "Visit download page" +msgstr "Siirry lataussivulle" + +msgid "Update check" +msgstr "Päivitystarkistus" + +msgid "Checking for updates..." +msgstr "Tarkistetaan päivityksiä..." + +msgid "86Box Update" +msgstr "86Box-päivitys" + +msgid "Release notes:" +msgstr "Julkaisutiedot:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Virtuaalikone kaatui" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "\"%1\"-virtuaalikoneen prosessi kaatui yllättäen. Poistumiskoodi %2." + +msgid "The system will not be added." +msgstr "Konetta ei lisätä." + +msgid "&Update mouse every CPU frame" +msgstr "&Päivitä hiiri jokaisen CPU framen yhteydessä" + +msgid "Hue" +msgstr "Sävy" + +msgid "Saturation" +msgstr "Värikylläisyys" + +msgid "Contrast" +msgstr "Kontrasti" + +msgid "Brightness" +msgstr "Kirkkaus" + +msgid "Sharpness" +msgstr "Terävyys" + +msgid "&CGA composite settings..." +msgstr "&CGA:n komposiittiasetukset..." + +msgid "CGA composite settings" +msgstr "CGA:n komposiittiasetukset" diff --git a/src/qt/languages/fr-FR.po b/src/qt/languages/fr-FR.po index 87530590a..08e927f04 100644 --- a/src/qt/languages/fr-FR.po +++ b/src/qt/languages/fr-FR.po @@ -10,7 +10,7 @@ msgid "&Action" msgstr "&Action" msgid "&Keyboard requires capture" -msgstr "&Capturer le clavier" +msgstr "C&apturer le clavier" msgid "&Right CTRL is left ALT" msgstr "CTRL &Droite devient ALT Gauche" @@ -27,47 +27,50 @@ msgstr "Ctrl+Alt+&Esc" msgid "&Pause" msgstr "&Pause" -msgid "E&xit..." -msgstr "&Quitter..." +msgid "Pause" +msgstr "Pause" + +msgid "Re&sume" +msgstr "Re&prendre" + +msgid "E&xit" +msgstr "&Quitter" msgid "&View" msgstr "&Vue" msgid "&Hide status bar" -msgstr "&Masquer la barre de status" +msgstr "Masquer &la barre de status" msgid "Hide &toolbar" msgstr "Masquer la &barre d'outils" msgid "&Resizeable window" -msgstr "Fenêtre &Redimensionnable" +msgstr "Fenêtre &redimensionnable" msgid "R&emember size && position" msgstr "S&auvegarder taille && position" msgid "Re&nderer" -msgstr "Moteur de &rendu vidéo" +msgstr "Moteur de re&ndu vidéo" msgid "&Qt (Software)" msgstr "&Qt (Logiciel)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" msgstr "Open&GL (3.0 Core)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." -msgstr "Spécifier dimensions..." +msgid "Specify &dimensions..." +msgstr "Spécifier dimen&sions..." -msgid "F&orce 4:3 display ratio" -msgstr "F&orcer 4:3" +msgid "Force &4:3 display ratio" +msgstr "Forcer le ratio &4:3" msgid "&Window scale factor" -msgstr "&Echelle facteur" +msgstr "Facteur d'&Echelle" msgid "&0.5x" msgstr "&0.5x" @@ -99,8 +102,8 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" -msgstr "Méthode Filtre" +msgid "Fi<er method" +msgstr "Mét&hode de Filtre" msgid "&Nearest" msgstr "&Plus proche" @@ -112,10 +115,10 @@ msgid "Hi&DPI scaling" msgstr "Mise à l'échelle Hi&DPI" msgid "&Fullscreen" -msgstr "&Plein Ecran" +msgstr "&Plein écran" msgid "Fullscreen &stretch mode" -msgstr "Mode &Elargi plein écran" +msgstr "Mode plein écran é&tiré" msgid "&Full screen stretch" msgstr "&Plein écran étiré" @@ -124,28 +127,34 @@ msgid "&4:3" msgstr "&4:3" msgid "&Square pixels (Keep ratio)" -msgstr "Pixels &carrés (Keep ratio)" +msgstr "Pixels &carrés (Conserver le ratio)" msgid "&Integer scale" -msgstr "Echelle &Entière" +msgstr "&Echelle entière" msgid "4:&3 Integer scale" -msgstr "Echelle Entière 4:&3" +msgstr "Echelle entière 4:&3" -msgid "E&GA/(S)VGA settings" -msgstr "Réglages E&GA/(S)VGA" +msgid "EGA/(S)&VGA settings" +msgstr "Réglages EGA/(S)&VGA" msgid "&Inverted VGA monitor" msgstr "Moniteur VGA &Inversé" msgid "VGA screen &type" -msgstr "&Type Ecran VGA" +msgstr "&Type d'écran VGA" msgid "RGB &Color" -msgstr "RGB &Couleur" +msgstr "&Couleurs RVB" + +msgid "RGB (no brown)" +msgstr "RVB (sans brun)" msgid "&RGB Grayscale" -msgstr "&RGB Ton de Gris" +msgstr "Niveau de Gris &RVB" + +msgid "Generic RGBI color monitor" +msgstr "Moniteur couleur RVB générique" msgid "&Amber monitor" msgstr "Moniteur &Ambre" @@ -157,7 +166,7 @@ msgid "&White monitor" msgstr "Moniteur &Blanc" msgid "Grayscale &conversion type" -msgstr "Mode &Conversion tons de gris" +msgstr "Type de &conversion du niveau de Gris" msgid "BT&601 (NTSC/PAL)" msgstr "BT&601 (NTSC/PAL)" @@ -166,16 +175,16 @@ msgid "BT&709 (HDTV)" msgstr "BT&709 (HDTV)" msgid "&Average" -msgstr "&Moyenne" +msgstr "&Moyen" msgid "CGA/PCjr/Tandy/E&GA/(S)VGA overscan" -msgstr "Overscan CGA/PCjr/Tandy/E&GA/(S)VGA" +msgstr "CGA/PCjr/Tandy/E&GA/(S)VGA overscan" msgid "Change contrast for &monochrome display" -msgstr "Modifier contraste affichage &monochrome" +msgstr "Modifier le contraste de l'affichage &monochrome" msgid "&Media" -msgstr "&Media" +msgstr "&Média" msgid "&Tools" msgstr "Ou&tils" @@ -183,11 +192,14 @@ msgstr "Ou&tils" msgid "&Settings..." msgstr "&Réglages..." +msgid "Settings..." +msgstr "Réglages..." + msgid "&Update status bar icons" msgstr "Mettre à jour la barre de stat&us" msgid "Take s&creenshot" -msgstr "Copie &Ecran" +msgstr "Copie d'é&cran" msgid "S&ound" msgstr "S&on" @@ -196,7 +208,7 @@ msgid "&Preferences..." msgstr "&Préférences..." msgid "Enable &Discord integration" -msgstr "Activer intégration &Discord" +msgstr "Activer l'intégration &Discord" msgid "Sound &gain..." msgstr "&Gain Son..." @@ -208,7 +220,7 @@ msgid "End trace" msgstr "Arrêter traces" msgid "&Help" -msgstr "&Aide" +msgstr "Ai&de" msgid "&Documentation..." msgstr "&Documentation..." @@ -235,7 +247,7 @@ msgid "&Rewind to the beginning" msgstr "&Revenir au debut" msgid "&Fast forward to the end" -msgstr "Aller à la &Fin" +msgstr "Avance rapide jusqu'à la &Fin" msgid "E&ject" msgstr "É&jecter" @@ -244,13 +256,13 @@ msgid "&Image..." msgstr "&Image..." msgid "E&xport to 86F..." -msgstr "E&xporter vers 86F..." +msgstr "E&xport vers 86F..." msgid "&Mute" msgstr "&Couper" msgid "E&mpty" -msgstr "E&jecter" +msgstr "V&ide" msgid "Reload previous image" msgstr "Recharger image précedente" @@ -280,7 +292,7 @@ msgid "&75 fps" msgstr "&75 images par seconde" msgid "&VSync" -msgstr "Synchronisation &verticale" +msgstr "Synchronisation &Verticale" msgid "&Select shader..." msgstr "Sé&lectionnez le shader..." @@ -328,7 +340,7 @@ msgid "RPM mode:" msgstr "Mode RPM:" msgid "Progress:" -msgstr "Progrès:" +msgstr "Progression:" msgid "Width:" msgstr "Largeur:" @@ -348,6 +360,9 @@ msgstr "Machine:" msgid "Configure" msgstr "Configurer" +msgid "CPU:" +msgstr "Processeur:" + msgid "CPU type:" msgstr "Type de processeur:" @@ -384,6 +399,15 @@ msgstr "Activé (UTC)" msgid "Dynamic Recompiler" msgstr "Recompilateur dynamique" +msgid "CPU frame size" +msgstr "Taille du bloc de processeur" + +msgid "Larger frames (less smooth)" +msgstr "Blocs plus grands (moins fluide)" + +msgid "Smaller frames (smoother)" +msgstr "Blocs plus petits (plus fluide)" + msgid "Video:" msgstr "Vidéo:" @@ -399,12 +423,27 @@ msgstr "Graphique IBM 8514/A" msgid "XGA Graphics" msgstr "Graphique XGA" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "Graphique du adaptateur IBM PS/55" + +msgid "Keyboard:" +msgstr "Clavier:" + +msgid "Keyboard" +msgstr "Clavier" + msgid "Mouse:" msgstr "Souris:" +msgid "Mouse" +msgstr "Souris" + msgid "Joystick:" msgstr "Manette:" +msgid "Joystick" +msgstr "Joystick" + msgid "Joystick 1..." msgstr "Manette 1..." @@ -435,6 +474,9 @@ msgstr "Sortie MIDI:" msgid "MIDI In Device:" msgstr "Entrée MIDI:" +msgid "MIDI Out:" +msgstr "Sortie MIDI:" + msgid "Standalone MPU-401" msgstr "MPU-401 autonome" @@ -474,6 +516,9 @@ msgstr "Dispositif LPT3:" msgid "LPT4 Device:" msgstr "Dispositif LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "DMA de l'ECP du LPT interne:" + msgid "Serial port 1" msgstr "Port série 1" @@ -498,17 +543,20 @@ msgstr "Port parallèle 3" msgid "Parallel port 4" msgstr "Port parallèle 4" -msgid "HD Controller:" -msgstr "Contrôleur HD:" - msgid "FD Controller:" msgstr "Contrôleur FD:" +msgid "CD-ROM Controller:" +msgstr "Contrôleur CD-ROM:" + msgid "Tertiary IDE Controller" -msgstr "Contrôleur IDE tertiaire" +msgstr "Troisième contrôleur IDE" msgid "Quaternary IDE Controller" -msgstr "Contrôleur IDE quaternair" +msgstr "Quatrième contrôleur IDE" + +msgid "Hard disk" +msgstr "Disque dur" msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "Cassette" msgid "Hard disks:" msgstr "Disques durs:" +msgid "Firmware Version" +msgstr "Version du micrologiciel" + msgid "&New..." msgstr "&Nouveau..." @@ -583,13 +634,19 @@ msgid "Check BPB" msgstr "Vérifier BPB" msgid "CD-ROM drives:" -msgstr "Lecterus CD-ROM:" +msgstr "Lecteurs CD-ROM:" msgid "MO drives:" msgstr "Lecteurs magnéto-optiques:" -msgid "ZIP drives:" -msgstr "Lecteurs ZIP:" +msgid "MO:" +msgstr "Magnéto-optiques:" + +msgid "Removable disks:" +msgstr "Disques amovibles:" + +msgid "Removable disk drives:" +msgstr "Lecteurs de disques amovibles:" msgid "ZIP 250" msgstr "ZIP 250" @@ -598,7 +655,10 @@ msgid "ISA RTC:" msgstr "Horloge temps réel ISA:" msgid "ISA Memory Expansion" -msgstr "Extension de mémoire ISA" +msgstr "Extension de la mémoire ISA" + +msgid "ISA ROM Cards" +msgstr "Cartes ROM ISA" msgid "Card 1:" msgstr "Carte 1:" @@ -612,6 +672,15 @@ msgstr "Carte 3:" msgid "Card 4:" msgstr "Carte 4:" +msgid "Generic ISA ROM Board" +msgstr "Carte ROM ISA générique" + +msgid "Generic Dual ISA ROM Board" +msgstr "Carte ROM ISA double générique" + +msgid "Generic Quad ISA ROM Board" +msgstr "Carte ROM ISA quadruple générique" + msgid "ISABugger device" msgstr "Dispositif ISABugger" @@ -633,11 +702,17 @@ msgstr " - EN PAUSE" msgid "Speed" msgstr "Vitesse" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Disque amovible %1 (%2): %3" -msgid "ZIP images" -msgstr "Images ZIP" +msgid "&Removable disk %1 (%2): %3" +msgstr "&Disque amovible %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Imges de disque amovible" + +msgid "Image %1" +msgstr "Image %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "86Box n'a pas pu trouver d'images ROM utilisables.\n\nS'il vous plait, téléchargez un ensemble ROM et extrayez-le dans le répertoire \"roms\"." @@ -661,7 +736,7 @@ msgid "All images" msgstr "Toutes les images" msgid "Basic sector images" -msgstr "Images basiques du secteur" +msgstr "Images secteur basique" msgid "Surface images" msgstr "Images de la surface" @@ -696,12 +771,30 @@ msgstr "Réseau" msgid "Ports (COM & LPT)" msgstr "Ports (COM et LPT)" +msgid "Ports" +msgstr "Ports" + +msgid "Serial ports:" +msgstr "Ports série:" + +msgid "Parallel ports:" +msgstr "Ports parallèles:" + msgid "Storage controllers" msgstr "Contrôleurs de stockage" msgid "Hard disks" msgstr "Disques durs" +msgid "Disks:" +msgstr "Disques:" + +msgid "Floppy:" +msgstr "Disquettes:" + +msgid "Controllers:" +msgstr "Contrôleurs:" + msgid "Floppy & CD-ROM drives" msgstr "Lecteurs de disquette et CD-ROM" @@ -709,7 +802,10 @@ msgid "Other removable devices" msgstr "Autres dispositifs amovibles" msgid "Other peripherals" -msgstr "Autres périfériques" +msgstr "Autres périphériques" + +msgid "Other devices" +msgstr "Autres dispositifs" msgid "Click to capture mouse" msgstr "Cliquer pour capturer la souris" @@ -724,7 +820,7 @@ msgid "Bus" msgstr "Bus" msgid "File" -msgstr "File" +msgstr "Fichier" msgid "C" msgstr "C" @@ -751,7 +847,7 @@ msgid "No PCap devices found" msgstr "Aucun dispositif PCap trouvé" msgid "Invalid PCap device" -msgstr "Dispositif PCap non valide" +msgstr "Dispositif PCap invalide" msgid "2-axis, 2-button joystick(s)" msgstr "Manette(s) avec 2 axes, 2 boutons" @@ -777,12 +873,39 @@ msgstr "Manette avec 4 axes, 4 boutons" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Pedals" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Système de contrôle de vol Thrustmaster" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "SCV Thrustmaster + Système de commande de gouvernail" + +msgid "2-button gamepad(s)" +msgstr "Manette(s) de jeu à 2 boutons" + +msgid "2-button flight yoke" +msgstr "Manette de vol à 2 boutons" + +msgid "4-button gamepad" +msgstr "Manette de jeu à 2 boutons" + +msgid "4-button flight yoke" +msgstr "Manette de vol à 4 boutons" + +msgid "2-button flight yoke with throttle" +msgstr "Manette de vol à 2 boutons avec manette des gaz" + +msgid "4-button flight yoke with throttle" +msgstr "Manette de vol à 4 boutons avec manette des gaz" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Volant Win95 (3 axes, 4 boutons)" + msgid "None" msgstr "Aucun" @@ -792,11 +915,14 @@ msgstr "%1 Mo (CTS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Disquette %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Disquette %1 (%2): %3" + msgid "Advanced sector images" -msgstr "Images du secteur avancés" +msgstr "Images secteur avancé" msgid "Flux images" -msgstr "Images du flux" +msgstr "Images Flux" msgid "Are you sure you want to hard reset the emulated machine?" msgstr "Etes-vous sûr de vouloir réinitialiser la machine émulée ?" @@ -813,6 +939,9 @@ msgstr "Impossible d'initialiser GhostPCL" msgid "MO %1 (%2): %3" msgstr "Magnéto-optique %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&Magnéto-optique %1 (%2): %3" + msgid "MO images" msgstr "Images magnéto-optiques" @@ -822,6 +951,15 @@ msgstr "Bienvenue dans 86Box !" msgid "Internal device" msgstr "Dispositif interne" +msgid "&File" +msgstr "&Fichier" + +msgid "&New machine..." +msgstr "&Nouvelle machine..." + +msgid "&Check for updates..." +msgstr "&Vérifier les mises à jour..." + msgid "Exit" msgstr "Sortir" @@ -844,7 +982,7 @@ msgid "86Box v" msgstr "86Box v" msgid "An emulator of old computers\n\nAuthors: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n\nWith previous core contributions from Sarah Walker, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information." -msgstr "Un émulateur de vieux ordinateurs\n\nAuteurs: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n\nAvec les contributions de Sarah Walker, leilei, JohnElliott, greatpsycho et d'autres.\n\nLibéré sous la licence GNU General Public License version 2 ou ultérieure. Pour plus d'informations, voir le fichier LICENSE." +msgstr "Un émulateur d'ordinateurs du passé\n\nAuteurs: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n\nAvec les contributions de Sarah Walker, leilei, JohnElliott, greatpsycho et d'autres.\n\nLibéré sous la licence GNU General Public License version 2 ou ultérieure. Pour plus d'informations, voir le fichier LICENSE." msgid "Hardware not available" msgstr "Matériel non disponible" @@ -853,7 +991,7 @@ msgid "Make sure %1 is installed and that you are on a %1-compatible network con msgstr "Assurez-vous que %1 est installé et que vous utilisez une connexion réseau compatible avec %1." msgid "Invalid configuration" -msgstr "Configuration non valide" +msgstr "Configuration invalide" msgid "%1 is required for automatic conversion of PostScript files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as PostScript (.ps) files." msgstr "%1 est nécessaire pour la conversion automatique des fichiers PostScript en PDF.\n\nTous les documents envoyés à l'imprimante générique PostScript seront sauvés en tant que fichiers PostScript (.ps)." @@ -889,7 +1027,7 @@ msgid "You are loading an unsupported configuration" msgstr "Vous chargez une configuration non prise en charge" msgid "CPU type filtering based on selected machine is disabled for this emulated machine.\n\nThis makes it possible to choose a CPU that is otherwise incompatible with the selected machine. However, you may run into incompatibilities with the machine BIOS or other software.\n\nEnabling this setting is not officially supported and any bug reports filed may be closed as invalid." -msgstr "Le filtrage du type du processeur sur la base de la machine sélectionnée est désactivé pur cette machine émulée.\n\nCela permet de sélectionner un processeur qui est sinon incompatible avec la machine sélectionné. Cependant, il pourrait y avoir des incompatibilités avec le BIOS de la machine ou autres logiciels.\n\nL'activation de cette configuration non officiellement prise en charge implique que tout rapport de bogue peut être fermé comme étant invalide." +msgstr "Le filtre du type du processeur basé par rapport à la machine sélectionnée est désactivé pour cette machine émulée.\n\nCela permet de sélectionner un processeur qui est de base incompatible avec la machine sélectionnée. Cependant, il pourrait y avoir des incompatibilités avec le BIOS de la machine ou autres logiciels.\n\nL'activation de cette configuration non officiellement prise en charge implique que tout rapport de bogue peut être fermé étant considéré comme invalide." msgid "Continue" msgstr "Continuer" @@ -897,12 +1035,18 @@ msgstr "Continuer" msgid "Cassette: %1" msgstr "Cassette: %1" +msgid "C&assette: %1" +msgstr "C&assette: %1" + msgid "Cassette images" msgstr "Images cassette" msgid "Cartridge %1: %2" msgstr "Cartouche %1: %2" +msgid "Car&tridge %1: %2" +msgstr "Car&touche %1: %2" + msgid "Cartridge images" msgstr "Images cartouche" @@ -912,6 +1056,9 @@ msgstr "Reprendre l'exécution" msgid "Pause execution" msgstr "Pause de l'exécution" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Appuyer sur Ctrl+Alt+Suppr" @@ -921,9 +1068,279 @@ msgstr "Appuyer sur Ctrl+Alt+Esc" msgid "Hard reset" msgstr "Hard reset" +msgid "Force shutdown" +msgstr "Arrêt forcé" + +msgid "Start" +msgstr "Démarrer" + +msgid "Not running" +msgstr "Inactive" + +msgid "Running" +msgstr "Active" + +msgid "Paused" +msgstr "En pause" + +msgid "Waiting" +msgstr "En attente" + +msgid "Powered Off" +msgstr "Éteinte" + +msgid "%n running" +msgstr "%n démarrée" + +msgid "%n paused" +msgstr "%n en pause" + +msgid "%n waiting" +msgstr "%n en attente" + +msgid "%1 total" +msgstr "%1 total" + +msgid "VMs: %1" +msgstr "Machines virtuelles: %1" + +msgid "System Directory:" +msgstr "Répertoire du système:" + +msgid "Choose directory" +msgstr "Sélectionner le répertoire" + +msgid "Choose configuration file" +msgstr "Sélectionner le fichier de configuration" + +msgid "86Box configuration files (86box.cfg)" +msgstr "Fichiers de configuration 86Box (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Échec de la lecture de la configuration" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Impossible d'ouvrir le fichier de configuration sélectionné pour lecture : %1" + +msgid "Use regular expressions in search box" +msgstr "Utilisez des expressions régulières dans le champ de recherche" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 machine(s) sont actuellement actives. Êtes-vous sûr de vouloir quitter le gestionnaire de machines virtuelles malgré tout ?" + +msgid "Add new system wizard" +msgstr "Assistant pour ajouter un nouveau système" + +msgid "Introduction" +msgstr "Introduction" + +msgid "This will help you add a new system to 86Box." +msgstr "Cela vous aidera à ajouter un nouveau système à 86Box." + +msgid "New configuration" +msgstr "Nouvelle configuration" + +msgid "Complete" +msgstr "Terminer" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "L'assistant va maintenant lancer la configuration du nouveau système." + +msgid "Use existing configuration" +msgstr "Utiliser la configuration existante" + +msgid "Type some notes here" +msgstr "Tapez vos notes ici" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Collez le contenu du fichier de configuration existant dans la zone ci-dessous." + +msgid "Load configuration from file" +msgstr "Charger la configuration à partir du fichier" + +msgid "System name" +msgstr "Nom du système" + +msgid "System name:" +msgstr "Nom du système:" + +msgid "System name cannot contain certain characters" +msgstr "Le nom du système ne peut pas contenir certains caractères" + +msgid "System name already exists" +msgstr "Le nom du système existe déjà" + +msgid "Please enter a directory for the system" +msgstr "Veuillez saisir un répertoire pour le système" + +msgid "Directory does not exist" +msgstr "Le répertoire n'existe pas" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "Un nouveau répertoire pour le système sera créé dans le répertoire sélectionné ci-dessus" + +msgid "System location:" +msgstr "Emplacement du système:" + +msgid "System name and location" +msgstr "Nom et emplacement du système" + +msgid "Enter the name of the system and choose the location" +msgstr "Entrez le nom du système et choisissez l'emplacement" + +msgid "Enter the name of the system" +msgstr "Entrez le nom du système" + +msgid "Please enter a system name" +msgstr "Veuillez entrer un nom de système" + +msgid "Display name (optional):" +msgstr "Nom d'affichage (facultatif):" + +msgid "Display name:" +msgstr "Nom d'affichage:" + +msgid "Set display name" +msgstr "Définir le nom d'affichage" + +msgid "Enter the new display name (blank to reset)" +msgstr "Entrez le nouveau nom d'affichage (laissez vide pour réinitialiser)" + +msgid "Change &display name..." +msgstr "Modifier le nom &d'affichage..." + +msgid "Context Menu" +msgstr "Menu contextuel" + +msgid "&Open folder..." +msgstr "&Ouvrir le dossier..." + +msgid "Open p&rinter tray..." +msgstr "Ouvrez le bac de l'&imprimante..." + +msgid "Set &icon..." +msgstr "Définir l'&icône..." + +msgid "Select an icon" +msgstr "Sélectionnez une icône" + +msgid "C&lone..." +msgstr "C&loner..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "La machine virtuelle \"%1\" (%2) sera clonée dans :" + +msgid "Directory %1 already exists" +msgstr "Le répertoire %1 existe déjà" + +msgid "You cannot use the following characters in the name: %1" +msgstr "Vous ne pouvez pas utiliser les caractères suivants dans le nom : %1" + +msgid "Clone" +msgstr "Cloner" + +msgid "Failed to create directory for cloned VM" +msgstr "Échec de la création du répertoire pour la machine virtuelle clonée" + +msgid "Failed to clone VM." +msgstr "Échec du clonage de la machine virtuelle." + +msgid "Directory in use" +msgstr "Répertoire utilisé" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "Le répertoire sélectionné est déjà utilisé. Veuillez sélectionner un autre répertoire." + +msgid "Create directory failed" +msgstr "Échec de la création du répertoire" + +msgid "Unable to create the directory for the new system" +msgstr "Impossible de créer le répertoire pour le nouveau système" + +msgid "Configuration write failed" +msgstr "Échec de l'écriture de la configuration" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Impossible d'ouvrir le fichier de configuration à l'emplacement %1 pour l'écriture" + +msgid "Error adding system" +msgstr "Erreur lors de l'ajout du système" + +msgid "Remove directory failed" +msgstr "Échec de la suppression du répertoire" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Certains fichiers du répertoire de la machine n'ont pas pu être supprimés. Veuillez les supprimer manuellement." + +msgid "Build" +msgstr "Build" + +msgid "Version" +msgstr "Version" + +msgid "An update to 86Box is available: %1 %2" +msgstr "Une mise à jour de 86Box est disponible : %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Une erreur s'est produite lors de la vérification des mises à jour : %1" + +msgid "An update to 86Box is available!" +msgstr "Une mise à jour de 86Box est disponible !" + +msgid "Warning" +msgstr "Avertissement" + +msgid "&Kill" +msgstr "Fo&rcer Extinction" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "La fermeture forcée d'une machine virtuelle peut entraîner une perte de données. Ne procédez ainsi que si le processus 86Box est bloqué.\n\nVoulez-vous vraiment fermer la machine virtuelle \"%1\" ?" + +msgid "&Delete" +msgstr "&Supprimer" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Voulez-vous vraiment supprimer la machine virtuelle \"%1\" et tous ses fichiers ? Cette action ne peut pas être annulée !" + +msgid "Show &config file" +msgstr "Afficher le fichier de &configuration" + +msgid "No screenshot" +msgstr "Pas de capture d'écran" + +msgid "Search" +msgstr "Rechercher" + +msgid "Searching for VMs..." +msgstr "Recherche de machines virtuelles..." + +msgid "Found %1" +msgstr "Trouvé %1" + +msgid "System" +msgstr "Système" + +msgid "Storage" +msgstr "Stockage" + +msgid "Disk %1: " +msgstr "Disque %1: " + +msgid "No disks" +msgstr "Pas de disques" + +msgid "Audio" +msgstr "Audio" + +msgid "Audio:" +msgstr "Audio:" + msgid "ACPI shutdown" msgstr "Arrêt ACPI" +msgid "ACP&I shutdown" +msgstr "Arrêt ACP&I" + msgid "Hard disk (%1)" msgstr "Disque dur (%1)" @@ -982,7 +1399,7 @@ msgid "Remember to partition and format the newly-created drive." msgstr "N'oubliez pas de partitionner et de formater le nouveau disque créé." msgid "The selected file will be overwritten. Are you sure you want to use it?" -msgstr "Le fichier sélectionné sera écrasé. Etes-vous sûr de vouloir l'utiliser?" +msgstr "Le fichier sélectionné sera écrasé. Etes-vous sûr de vouloir l'utiliser ?" msgid "Unsupported disk image" msgstr "Image disque non prise en charge" @@ -1003,13 +1420,13 @@ msgid "HDX image" msgstr "Image HDX" msgid "Fixed-size VHD" -msgstr "VHD à taille fixe" +msgstr "VHD de taille fixe" msgid "Dynamic-size VHD" -msgstr "VHD à taille dynamique" +msgstr "VHD de taille dynamique" msgid "Differencing VHD" -msgstr "VHD à différenciation" +msgstr "VHD différentiel" msgid "(N/A)" msgstr "(N.D.)" @@ -1024,13 +1441,13 @@ msgid "HDX image (.hdx)" msgstr "Image HDX (.hdx)" msgid "Fixed-size VHD (.vhd)" -msgstr "VHD à taille fixe (.vhd)" +msgstr "VHD de taille fixe (.vhd)" msgid "Dynamic-size VHD (.vhd)" -msgstr "VHD à taille dynamique (.vhd)" +msgstr "VHD de taille dynamique (.vhd)" msgid "Differencing VHD (.vhd)" -msgstr "VHD à différenciation (.vhd)" +msgstr "VHD différentiel (.vhd)" msgid "Large blocks (2 MB)" msgstr "Grands Blocs (2 Mo)" @@ -1045,7 +1462,7 @@ msgid "Select the parent VHD" msgstr "Sélectionnez le VHD parent" msgid "This could mean that the parent image was modified after the differencing image was created.\n\nIt can also happen if the image files were moved or copied, or by a bug in the program that created this disk.\n\nDo you want to fix the timestamps?" -msgstr "Il est possible que l'image parente ai été modifiée après la création de l'image à différenciation.\n\nIl est même possible que les fichiers de l’image ont été déplacés ou copiés ou il existe un bogue dans le programme qui a créé ce disque.\n\nVoulez-vous réparer l'horodatage?" +msgstr "Il est possible que l'image parente ai été modifiée après la création de l'image différentielle.\n\nIl est même possible que les fichiers de l’image ont été déplacés ou copiés ou il existe un bogue dans le programme qui a créé ce disque.\n\nVoulez-vous réparer l'horodatage ?" msgid "Parent and child disk timestamps do not match" msgstr "Les horodatages des disques parents et enfants ne correspondent pas" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 Ko" @@ -1180,13 +1600,13 @@ msgid "Fast" msgstr "Rapide" msgid "&Auto-pause on focus loss" -msgstr "&Pause automatique à perte de focus" +msgstr "Pa&use automatique à perte de focus" msgid "WinBox is no longer supported" msgstr "WinBox n'est plus pris en charge" msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." -msgstr "Le développement du gestionnaire WinBox s'est arrêté en 2022 en raison d'un manque de mainteneurs. Comme nous concentrons nos efforts sur l'amélioration de 86Box, nous avons pris la décision de ne plus supporter WinBox en tant que gestionnaire.\n\nAucune mise à jour ne sera fournie par WinBox, et vous pourriez rencontrer des comportements incorrects si vous continuez à l'utiliser avec des versions plus récentes de 86Box. Tous les rapports de bogues relatifs au comportement de WinBox seront classés comme non valides.\n\nAllez sur 86box.net pour une liste d'autres gestionnaires que vous pouvez utiliser." +msgstr "Le développement du gestionnaire WinBox s'est arrêté en 2022 en raison d'un manque de mainteneurs. Comme nous concentrons nos efforts sur l'amélioration de 86Box, nous avons pris la décision de ne plus supporter WinBox en tant que gestionnaire.\n\nAucune mise à jour ne sera fournie par WinBox et vous pourriez rencontrer des comportements incorrects si vous continuez à l'utiliser avec des versions plus récentes de 86Box. Tous les rapports de bogues relatifs au comportement de WinBox seront classés comme non valides.\n\nAllez sur 86box.net pour une liste d'autres gestionnaires que vous pouvez utiliser." msgid "Generate" msgstr "Générer" @@ -1209,41 +1629,38 @@ msgstr "Dispositifs MCA" msgid "List of MCA devices:" msgstr "Liste des dispositifs MCA :" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Outil Tablette" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "A propos de &Qt" -msgid "About Qt" -msgstr "A propos de Qt" - -msgid "MCA devices..." +msgid "&MCA devices..." msgstr "Dispositifs MCA..." -msgid "Show non-primary monitors" -msgstr "Afficher les moniteurs non primaires" +msgid "Show non-&primary monitors" +msgstr "Afficher les moniteurs non pr&imaires" -msgid "Open screenshots folder..." -msgstr "Ouvrir le dossier des captures d'écran..." +msgid "Open screenshots &folder..." +msgstr "Ouvrir le do&ssier des captures d'écran..." -msgid "Apply fullscreen stretch mode when maximized" -msgstr "Appliquer le mode elargi plein écran lorsque l'écran est maximisé" +msgid "Appl&y fullscreen stretch mode when maximized" +msgstr "Appli&quer le mode élargi plein écran lorsque la fenêtre est maximisée" -msgid "Cursor/Puck" -msgstr "Curseur/Palette" +msgid "&Cursor/Puck" +msgstr "&Curseur/Palette" -msgid "Pen" -msgstr "Stylo" +msgid "&Pen" +msgstr "&Stylo" -msgid "Host CD/DVD Drive (%1:)" -msgstr "Lecteur CD/DVD hôte (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "&Lecteur CD/DVD hôte (%1:)" msgid "&Connected" msgstr "&Connecté" -msgid "Clear image history" -msgstr "Effacer l'historique de l'image" +msgid "Clear image &history" +msgstr "Effacer l'&historique de l'image" msgid "Create..." msgstr "Créer..." @@ -1257,11 +1674,17 @@ msgstr "Bus inconnu" msgid "Null Driver" msgstr "Pilote NULL" +msgid "NIC:" +msgstr "NIC:" + msgid "NIC %1 (%2) %3" msgstr "NIC %1 (%2) %3" +msgid "&NIC %1 (%2) %3" +msgstr "&NIC %1 (%2) %3" + msgid "Render behavior" -msgstr "Comportement de rendu" +msgstr "Comportement du rendu" msgid "Use target framerate:" msgstr "Utiliser le taux de rafraîchissement cible:" @@ -1297,7 +1720,7 @@ msgid "Error initializing OpenGL" msgstr "Erreur d'initialisation d'OpenGL" msgid "\nFalling back to software rendering." -msgstr "\nSe rabattre sur le rendu logiciel." +msgstr "\nRevenir au rendu logiciel." msgid "

When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.

" msgstr "

Lors de la sélection d'images multimédia (CD-ROM, disquette, etc.), la boîte de dialogue d'ouverture démarrera dans le même répertoire que le fichier de configuration de 86Box. Ce paramètre ne fera probablement une différence que sur macOS.

" @@ -1323,6 +1746,9 @@ msgstr "Pas de dispositifs MCA." msgid "MiB" msgstr "Mio" +msgid "GiB" +msgstr "Gio" + msgid "Network Card #1" msgstr "Carte réseau 1" @@ -1354,19 +1780,37 @@ msgid "Novell NetWare 2.x Key Card" msgstr "Carte clé Novell NetWare 2.x" msgid "Serial port passthrough 1" -msgstr "Passage du port série 1" +msgstr "Transfert du port série 1" msgid "Serial port passthrough 2" -msgstr "Passage du port série 2" +msgstr "Transfert du port série 2" msgid "Serial port passthrough 3" -msgstr "Passage du port série 3" +msgstr "Transfert du port série 3" msgid "Serial port passthrough 4" -msgstr "Passage du port série 4" +msgstr "Transfert du port série 4" -msgid "Renderer options..." -msgstr "Options de rendu..." +msgid "Renderer &options..." +msgstr "&Options du rendu..." + +msgid "PC/XT Keyboard" +msgstr "Clavier PC/XT" + +msgid "AT Keyboard" +msgstr "Clavier AT" + +msgid "AX Keyboard" +msgstr "Clavier AX" + +msgid "PS/2 Keyboard" +msgstr "Clavier PS/2" + +msgid "PS/55 Keyboard" +msgstr "Clavier PS/55" + +msgid "Keys" +msgstr "Touches" msgid "Logitech/Microsoft Bus Mouse" msgstr "Souris bus Logitech/Microsoft" @@ -1377,18 +1821,30 @@ msgstr "Souris bus Microsoft (InPort)" msgid "Mouse Systems Serial Mouse" msgstr "Souris série Mouse Systems" +msgid "Mouse Systems Bus Mouse" +msgstr "Souris bus Mouse Systems" + msgid "Microsoft Serial Mouse" msgstr "Souris série Microsoft" +msgid "Microsoft Serial BallPoint" +msgstr "Souris série Microsoft BallPoint" + msgid "Logitech Serial Mouse" msgstr "Souris série Logitech" msgid "PS/2 Mouse" msgstr "Souris PS/2" +msgid "PS/2 QuickPort Mouse" +msgstr "Souris PS/2 QuickPort" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (série)" +msgid "Default Baud rate" +msgstr "Vitesse de transmission par défaut" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Modem standard conforme à la norme Hayes" @@ -1408,31 +1864,91 @@ msgid "OPL4-ML Daughterboard" msgstr "Carte fille OPL4-ML" msgid "System MIDI" -msgstr "MIDI de système" +msgstr "Système MIDI" msgid "MIDI Input Device" msgstr "Dispositif d'entrée MIDI" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "Fichier BIOS" + +msgid "BIOS file (ROM #1)" +msgstr "Fichier BIOS (ROM 1)" + +msgid "BIOS file (ROM #2)" +msgstr "Fichier BIOS (ROM 2)" + +msgid "BIOS file (ROM #3)" +msgstr "Fichier BIOS (ROM 3)" + +msgid "BIOS file (ROM #4)" +msgstr "Fichier BIOS (ROM 4)" + +msgid "BIOS address" msgstr "Adresse BIOS" +msgid "BIOS address (ROM #1)" +msgstr "Adresse BIOS (ROM 1)" + +msgid "BIOS address (ROM #2)" +msgstr "Adresse BIOS (ROM 2)" + +msgid "BIOS address (ROM #3)" +msgstr "Adresse BIOS (ROM 3)" + +msgid "BIOS address (ROM #4)" +msgstr "Adresse BIOS (ROM 4)" + msgid "Enable BIOS extension ROM Writes" msgstr "Activer les écritures au ROM d'extension du BIOS" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "Activer les écritures au ROM d'extension du BIOS (ROM 1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "Activer les écritures au ROM d'extension du BIOS (ROM 2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "Activer les écritures au ROM d'extension du BIOS (ROM 3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "Activer les écritures au ROM d'extension du BIOS (ROM 4)" + +msgid "Linear framebuffer base" +msgstr "Base du tampon graphique linéaire" + msgid "Address" msgstr "Adresse" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "IRQ du port série" + +msgid "Parallel port IRQ" +msgstr "IRQ du port parallèle" + msgid "BIOS Revision" -msgstr "Révision BIOS" +msgstr "Révision du BIOS" + +msgid "BIOS Version" +msgstr "Version du BIOS" + +msgid "BIOS Language" +msgstr "Langue du BIOS" + +msgid "IBM 5161 Expansion Unit" +msgstr "Unité d'extension IBM 5161" + +msgid "IBM Cassette Basic" +msgstr "BASIC Cassette IBM" msgid "Translate 26 -> 17" msgstr "Traduire 26 -> 17" msgid "Language" -msgstr "Language" +msgstr "Langage" msgid "Enable backlight" msgstr "Activer le rétro-éclairage" @@ -1443,6 +1959,18 @@ msgstr "Inversion des couleurs" msgid "BIOS size" msgstr "Taille du BIOS" +msgid "BIOS size (ROM #1)" +msgstr "Taille du BIOS (ROM 1)" + +msgid "BIOS size (ROM #2)" +msgstr "Taille du BIOS (ROM 2)" + +msgid "BIOS size (ROM #3)" +msgstr "Taille du BIOS (ROM 3)" + +msgid "BIOS size (ROM #4)" +msgstr "Taille du BIOS (ROM 4)" + msgid "Map C0000-C7FFF as UMB" msgstr "Mapper C0000-C7FFF en tant qu'UMB" @@ -1471,7 +1999,7 @@ msgid "MIDI Real time" msgstr "MIDI en temps réel" msgid "MIDI Thru" -msgstr "Passage de la entrée MIDI" +msgstr "Transfert MIDI" msgid "MIDI Clockout" msgstr "Horloge MIDI" @@ -1486,10 +2014,10 @@ msgid "Chorus" msgstr "Chœur" msgid "Chorus Voices" -msgstr "Voix de chœur" +msgstr "Voix du chœur" msgid "Chorus Level" -msgstr "Niveau de chœur" +msgstr "Niveau du chœur" msgid "Chorus Speed" msgstr "Vitesse du chœur" @@ -1518,8 +2046,11 @@ msgstr "Niveau de réverbération" msgid "Interpolation Method" msgstr "Méthode d'interpolation" +msgid "Dynamic Sample Loading" +msgstr "Chargement dynamique des échantillons" + msgid "Reverb Output Gain" -msgstr "Gain de sortie de réverbération" +msgstr "Gain de sortie réverbération" msgid "Reversed stereo" msgstr "Stéréo inversée" @@ -1555,7 +2086,7 @@ msgid "MAC Address" msgstr "Adresse MAC" msgid "MAC Address OUI" -msgstr "OUI de adresse MAC" +msgstr "Adresse MAC OUI" msgid "Enable BIOS" msgstr "Activer BIOS" @@ -1567,10 +2098,10 @@ msgid "TCP/IP listening port" msgstr "Port d'écoute TCP/IP" msgid "Phonebook File" -msgstr "Fichier de répertoire" +msgstr "Fichier d'annuaire" msgid "Telnet emulation" -msgstr "Émulation de Telnet" +msgstr "Émulation Telnet" msgid "RAM Address" msgstr "Adresse RAM" @@ -1605,6 +2136,12 @@ msgstr "DMA bas" msgid "Enable Game port" msgstr "Activer le port de jeu" +msgid "SID Model" +msgstr "Modèle SID" + +msgid "SID Filter Strength" +msgstr "Intensité du filtre SID" + msgid "Surround module" msgstr "Module Surround" @@ -1617,6 +2154,12 @@ msgstr "Lever l'interruption CODEC lors de la configuration du CODEC (nécessair msgid "SB Address" msgstr "Adresse SB" +msgid "Adlib Address" +msgstr "Adresse Adlib" + +msgid "Use EEPROM setting" +msgstr "Utilisez le paramètre de l'EEPROM" + msgid "WSS IRQ" msgstr "IRQ WSS" @@ -1645,10 +2188,10 @@ msgid "High DMA" msgstr "DMA haut" msgid "Control PC speaker" -msgstr "Contrôler l'haut-parleur du PC" +msgstr "Contrôler le haut-parleur du PC" msgid "Memory size" -msgstr "Taille de mémoire" +msgstr "Taille mémoire" msgid "EMU8000 Address" msgstr "Adresse EMU8000" @@ -1701,9 +2244,15 @@ msgstr "Type de RAMDAC" msgid "Blend" msgstr "Mélanger" +msgid "Font" +msgstr "Police" + msgid "Bilinear filtering" msgstr "Filtrage bilinéaire" +msgid "Video chroma-keying" +msgstr "Incrustation vidéo par chrominance" + msgid "Dithering" msgstr "Tramage" @@ -1714,10 +2263,10 @@ msgid "Voodoo type" msgstr "Type de Voodoo" msgid "Framebuffer memory size" -msgstr "Taille de la mémoire du tampon d'images" +msgstr "Taille mémoire du tampon d'images" msgid "Texture memory size" -msgstr "Taille de la mémoire des textures" +msgstr "Taille mémoire des textures" msgid "Dither subtraction" msgstr "Soustraction de tramage" @@ -1726,7 +2275,7 @@ msgid "Screen Filter" msgstr "Filtre d'écran" msgid "Render threads" -msgstr "Fils de rendu" +msgstr "Tâches du rendu" msgid "SLI" msgstr "SLI" @@ -1746,6 +2295,33 @@ msgstr "Vitesse de transfert" msgid "EMS mode" msgstr "Mode EMS" +msgid "EMS Address" +msgstr "Adresse EMS" + +msgid "EMS 1 Address" +msgstr "Adresse EMS 1" + +msgid "EMS 2 Address" +msgstr "Adresse EMS 2" + +msgid "EMS Memory Size" +msgstr "Taille de la mémoire EMS" + +msgid "EMS 1 Memory Size" +msgstr "Taille de la mémoire EMS 1" + +msgid "EMS 2 Memory Size" +msgstr "Taille de la mémoire EMS 2" + +msgid "Enable EMS" +msgstr "Activer EMS" + +msgid "Enable EMS 1" +msgstr "Activer EMS 1" + +msgid "Enable EMS 2" +msgstr "Activer EMS 2" + msgid "Address for > 2 MB" msgstr "Adresse pour > 2 MB" @@ -1764,11 +2340,11 @@ msgstr "Toujours à la vitesse sélectionnée" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "Paramètres du BIOS + touches de raccourci (désactivées pendant le POST)" -msgid "64 kB starting from F0000" -msgstr "64 ko à partir de F0000" +msgid "64 KB starting from F0000" +msgstr "64 Ko à partir de F0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 ko à partir de E0000 (adresse MSB inversée, derniers 64KB en premier)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 Ko à partir de E0000 (adresse MSB inversée, derniers 64 Ko en premier)" msgid "Sine" msgstr "Sinusoïdale" @@ -1780,10 +2356,10 @@ msgid "Linear" msgstr "Linéaire" msgid "4th Order" -msgstr "Du 4e ordre" +msgstr "4e ordre" msgid "7th Order" -msgstr "Du 7e ordre" +msgstr "7e ordre" msgid "Non-timed (original)" msgstr "Non temporisé (original)" @@ -1804,7 +2380,7 @@ msgid "Five + Wheel" msgstr "Cinq + molette" msgid "Five + 2 Wheels" -msgstr "" +msgstr "Cinq + 2 molettes" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 série / SMT3(R)V" @@ -1869,6 +2445,9 @@ msgstr "256 Ko" msgid "Composite" msgstr "Composite" +msgid "True color" +msgstr "Couleur réelle" + msgid "Old" msgstr "Ancien" @@ -1900,7 +2479,16 @@ msgid "sRGB interpolation" msgstr "Interpolation sRVB" msgid "Linear interpolation" -msgstr "Interpolation linéairee" +msgstr "Interpolation linéaire" + +msgid "Has secondary 8x8 character set" +msgstr "Dispose d'un jeu de caractères secondaire 8x8" + +msgid "Has Quadcolor II daughter board" +msgstr "Dispose d'une carte fille Quadcolor II" + +msgid "Alternate monochrome contrast" +msgstr "Contraste monochrome alternatif" msgid "128 KB" msgstr "128 Ko" @@ -1915,7 +2503,7 @@ msgid "Monochrome (5151/MDA) (amber)" msgstr "Monochrome (5151/MDA) (ambre)" msgid "Color 40x25 (5153/CGA)" -msgstr "Couler 40x25 (5153/CGA)" +msgstr "Couleur 40x25 (5153/CGA)" msgid "Color 80x25 (5153/CGA)" msgstr "Couleur 80x25 (5153/CGA)" @@ -1935,6 +2523,9 @@ msgstr "Ambre" msgid "Gray" msgstr "Gris" +msgid "Grayscale" +msgstr "Niveaux de gris" + msgid "Color" msgstr "Couleur" @@ -1950,11 +2541,17 @@ msgstr "Autres langues" msgid "Bochs latest" msgstr "Bochs dernière" +msgid "Apply overscan deltas" +msgstr "Appliquer les deltas d'overscan" + +msgid "Mono Interlaced" +msgstr "Monochrome entrelacé" + msgid "Mono Non-Interlaced" msgstr "Monochrome non entrelacé" msgid "Color Interlaced" -msgstr "Couler entrelacé" +msgstr "Couleur entrelacé" msgid "Color Non-Interlaced" msgstr "Couleur non entrelacé" @@ -1962,6 +2559,9 @@ msgstr "Couleur non entrelacé" msgid "3Dfx Voodoo Graphics" msgstr "Graphique 3dfx Voodoo" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 unités TMU)" @@ -1990,7 +2590,7 @@ msgid "Stereo LPT DAC" msgstr "Convertisseur numérique stéréo LPT" msgid "Generic Text Printer" -msgstr "Imprimante Texte générique" +msgstr "Imprimante texte générique" msgid "Generic ESC/P Dot-Matrix Printer" msgstr "Imprimante matricielle générique ESC/P" @@ -2008,16 +2608,16 @@ msgid "Protection Dongle for Savage Quest" msgstr "Clé de protection pour Savage Quest" msgid "Serial Passthrough Device" -msgstr "Dispositif de passage du port série" +msgstr "Dispositif de transfert du port série" msgid "Passthrough Mode" -msgstr "Mode de passage" +msgstr "Mode de transfert" msgid "Host Serial Device" -msgstr "Dispositif sériel de l'hôte" +msgstr "Dispositif série de l'hôte" msgid "Name of pipe" -msgstr "Nom du tuyau" +msgstr "Nom du pipeline" msgid "Data bits" msgstr "Bits de données" @@ -2026,13 +2626,16 @@ msgid "Stop bits" msgstr "Bits d'arrêt" msgid "Baud Rate of Passthrough" -msgstr "Taux de bauds du passage" +msgstr "Taux de bauds du transfert" msgid "Named Pipe (Server)" -msgstr "Tuyau nommé (serveur)" +msgstr "Pipeline nommé (serveur)" + +msgid "Named Pipe (Client)" +msgstr "Pipeline nommé (client)" msgid "Host Serial Passthrough" -msgstr "Passage du port série de l'hôte" +msgstr "Transfert du port série de l'hôte" msgid "E&ject %1" msgstr "É&jecter %1" @@ -2076,11 +2679,17 @@ msgstr "Clone IBM 8514/A (ISA)" msgid "Vendor" msgstr "Fabricant" +msgid "30 Hz (JMP2 = 1)" +msgstr "30 Hz (JMP2 = 1)" + +msgid "60 Hz (JMP2 = 2)" +msgstr "60 Hz (JMP2 = 2)" + msgid "Generic PC/XT Memory Expansion" -msgstr "Extension de mémoire générique PC/XT" +msgstr "Extension mémoire générique PC/XT" msgid "Generic PC/AT Memory Expansion" -msgstr "Extension de mémoire générique PC/AT" +msgstr "Extension mémoire générique PC/AT" msgid "Unable to find Dot-Matrix fonts" msgstr "Impossible de trouver les polices matricielles" @@ -2116,10 +2725,10 @@ msgid "GLSL Error" msgstr "Erreur GLSL" msgid "Could not load shader: %1" -msgstr "Impossible de charger le shaker %1" +msgstr "Impossible de charger le shader %1" msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" -msgstr "OpenGL version 3.0 ou supérieur requis. Version installée: %1.%2" +msgstr "OpenGL version 3.0 ou supérieure requis. Version installée: %1.%2" msgid "Could not load texture: %1" msgstr "Impossible de charger la texture %1" @@ -2147,3 +2756,201 @@ msgstr "Descendre" msgid "Could not load file %1" msgstr "Impossible de charger le fichier %1" + +msgid "Key Bindings:" +msgstr "Raccourcis clavier:" + +msgid "Action" +msgstr "Action" + +msgid "Keybind" +msgstr "Raccourci clavier" + +msgid "Clear binding" +msgstr "Supprimer le raccourci" + +msgid "Bind" +msgstr "Lier" + +msgid "Bind Key" +msgstr "Lier touche" + +msgid "Enter key combo:" +msgstr "Entrez la combinaison de touches:" + +msgid "Bind conflict" +msgstr "Conflit de raccourci" + +msgid "This key combo is already in use." +msgstr "Cette combinaison de touches est déjà utilisée." + +msgid "Send Control+Alt+Del" +msgstr "Envoyer Ctrl+Alt+Suppr" + +msgid "Send Control+Alt+Escape" +msgstr "Envoyer Ctrl+Alt+Échap" + +msgid "Toggle fullscreen" +msgstr "Activer/désactiver le mode plein écran" + +msgid "Screenshot" +msgstr "Capture d'écran" + +msgid "Release mouse pointer" +msgstr "Relâcher le pointeur de la souris" + +msgid "Toggle pause" +msgstr "Activer/désactiver la pause" + +msgid "Toggle mute" +msgstr "Activer/désactiver le mode silencieux" + +msgid "Text files" +msgstr "Fichiers texte" + +msgid "ROM files" +msgstr "Fichiers ROM" + +msgid "SoundFont files" +msgstr "Fichiers SoundFont" + +msgid "Local Switch" +msgstr "Commutateur local" + +msgid "Remote Switch" +msgstr "Commutateur distant" + +msgid "Switch:" +msgstr "Commutateur:" + +msgid "Hub Mode" +msgstr "Mode concentrateur" + +msgid "Hostname:" +msgstr "Nom d'hôte:" + +msgid "ISA RAM:" +msgstr "RAM ISA:" + +msgid "ISA ROM:" +msgstr "ROM ISA:" + +msgid "&Wipe NVRAM" +msgstr "&Effacer la mémoire NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Cela supprimera tous les fichiers NVRAM (et associés) de la machine virtuelle situés dans le sous-répertoire \"nvr\". Vous devrez reconfigurer les paramètres du BIOS (et éventuellement d'autres périphériques à l'intérieur de la machine virtuelle) si nécessaire. \n\nÊtes-vous sûr de vouloir effacer tout le contenu NVRAM de la machine virtuelle \"%1\" ?" + +msgid "Success" +msgstr "Succès" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Le contenu de la NVRAM de la machine virtuelle \"%1\" a été effacé avec succès" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Une erreur s'est produite lors de la tentative d'effacement du contenu NVRAM de la machine virtuelle \"%1\"" + +msgid "%1 VM Manager" +msgstr "Gestionnaire de machines virtuelles de %1" + +msgid "%n disk(s)" +msgstr "%n disque(s)" + +msgid "Unknown Status" +msgstr "Statut inconnu" + +msgid "No Machines Found!" +msgstr "Aucune machine trouvée !" + +msgid "Check for updates on startup" +msgstr "Vérifier les mises à jour au démarrage" + +msgid "Unable to determine release information" +msgstr "Impossible de déterminer les informations relatives à la version" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Une erreur s'est produite lors de la vérification des mises à jour :\n\n%1\n\nVeuillez réessayer plus tard." + +msgid "Update check complete" +msgstr "Vérification des mises à jour terminée" + +msgid "stable" +msgstr "stable" + +msgid "beta" +msgstr "bêta" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Vous utilisez la dernière version %1 de 86Box : %2" + +msgid "version" +msgstr "version" + +msgid "build" +msgstr "build" + +msgid "You are currently running version %1." +msgstr "Vous utilisez actuellement la version %1." + +msgid "Version %1 is now available." +msgstr "La version %1 est désormais disponible." + +msgid "You are currently running build %1." +msgstr "Vous exécutez actuellement le build %1." + +msgid "Build %1 is now available." +msgstr "Le Build %1 est désormais disponible." + +msgid "Would you like to visit the download page?" +msgstr "Souhaitez-vous visiter la page de téléchargement ?" + +msgid "Visit download page" +msgstr "Visiter la page de téléchargement" + +msgid "Update check" +msgstr "Vérification des mises à jour" + +msgid "Checking for updates..." +msgstr "Recherche de mises à jour..." + +msgid "86Box Update" +msgstr "Mise à jour de 86Box" + +msgid "Release notes:" +msgstr "Notes de mise à jour :" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Panne de la machine virtuelle" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "Le processus de la machine virtuelle \"%1\" s'est arrêté de manière inattendue avec le code de sortie %2." + +msgid "The system will not be added." +msgstr "Le système ne sera pas ajouté." + +msgid "&Update mouse every CPU frame" +msgstr "&Mettre à jour le statut souris à chaque frame CPU" + +msgid "Hue" +msgstr "Teinte" + +msgid "Saturation" +msgstr "Saturation" + +msgid "Contrast" +msgstr "Contraste" + +msgid "Brightness" +msgstr "Luminosité" + +msgid "Sharpness" +msgstr "Netteté" + +msgid "&CGA composite settings..." +msgstr "Réglages du mode composite &CGA..." + +msgid "CGA composite settings" +msgstr "Réglages du mode composite CGA" diff --git a/src/qt/languages/hr-HR.po b/src/qt/languages/hr-HR.po index 0330cd59a..bdb980839 100644 --- a/src/qt/languages/hr-HR.po +++ b/src/qt/languages/hr-HR.po @@ -27,8 +27,14 @@ msgstr "Ctrl+Alt+&Esc" msgid "&Pause" msgstr "&Pauza" -msgid "E&xit..." -msgstr "Iz&laz..." +msgid "Pause" +msgstr "Pauza" + +msgid "Re&sume" +msgstr "Na&stavi" + +msgid "E&xit" +msgstr "Iz&laz" msgid "&View" msgstr "&Pogled" @@ -51,19 +57,16 @@ msgstr "&Renderer" msgid "&Qt (Software)" msgstr "&Qt (Softver)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" msgstr "Open&GL (3.0 jezgra)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." +msgid "Specify &dimensions..." msgstr "Odrediti veličinu..." -msgid "F&orce 4:3 display ratio" +msgid "Force &4:3 display ratio" msgstr "&4:3 omjer prikaza" msgid "&Window scale factor" @@ -99,7 +102,7 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" +msgid "Fi<er method" msgstr "Metoda filtriranja" msgid "&Nearest" @@ -132,8 +135,8 @@ msgstr "&Cijelobrojno skaliranje" msgid "4:&3 Integer scale" msgstr "4:&3 Cijelobrojno skaliranje" -msgid "E&GA/(S)VGA settings" -msgstr "E&GA/(S)VGA postavke" +msgid "EGA/(S)&VGA settings" +msgstr "EGA/(S)&VGA postavke" msgid "&Inverted VGA monitor" msgstr "&Obrni boje zaslona VGA" @@ -144,9 +147,15 @@ msgstr "&Tip zaslona VGA" msgid "RGB &Color" msgstr "RGB u &boji" +msgid "RGB (no brown)" +msgstr "RGB (bez smeđe)" + msgid "&RGB Grayscale" msgstr "&RGB u nijansama sive boje" +msgid "Generic RGBI color monitor" +msgstr "Generični RGBI monitor u boji" + msgid "&Amber monitor" msgstr "&Jantarni zaslon" @@ -183,6 +192,9 @@ msgstr "&Alati" msgid "&Settings..." msgstr "&Opcije..." +msgid "Settings..." +msgstr "Opcije..." + msgid "&Update status bar icons" msgstr "&Ažuriraj ikone statusnog redka" @@ -208,7 +220,7 @@ msgid "End trace" msgstr "&Svrši praćenje" msgid "&Help" -msgstr "&Pomoć" +msgstr "P&omoć" msgid "&Documentation..." msgstr "&Dokumentacija..." @@ -348,6 +360,9 @@ msgstr "Sistem:" msgid "Configure" msgstr "Namjesti" +msgid "CPU:" +msgstr "Procesor:" + msgid "CPU type:" msgstr "Tip procesora:" @@ -384,6 +399,15 @@ msgstr "Uključeno (UTC)" msgid "Dynamic Recompiler" msgstr "Dinamički rekompilator" +msgid "CPU frame size" +msgstr "Veličina blokova procesora" + +msgid "Larger frames (less smooth)" +msgstr "Veći blokovi (manje glatko)" + +msgid "Smaller frames (smoother)" +msgstr "Manji blokovi (glatkije)" + msgid "Video:" msgstr "Video:" @@ -399,12 +423,27 @@ msgstr "IBM 8514/A grafika" msgid "XGA Graphics" msgstr "XGA grafika" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "Grafika adaptera za prikaz IBM PS/55" + +msgid "Keyboard:" +msgstr "Tipkovinca:" + +msgid "Keyboard" +msgstr "Tipkovnica" + msgid "Mouse:" msgstr "Miš:" +msgid "Mouse" +msgstr "Miš" + msgid "Joystick:" msgstr "Palica za igru:" +msgid "Joystick" +msgstr "Palica za igru" + msgid "Joystick 1..." msgstr "Palica za igru 1..." @@ -435,6 +474,9 @@ msgstr "Izlazni uređaj MIDI:" msgid "MIDI In Device:" msgstr "Ulazni uređaj MIDI:" +msgid "MIDI Out:" +msgstr "Izlaz MIDI:" + msgid "Standalone MPU-401" msgstr "Samostalni MPU-401" @@ -474,6 +516,9 @@ msgstr "Uređaj LPT3:" msgid "LPT4 Device:" msgstr "Uređaj LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "DMA ECP unutrašnjeg LPT-a:" + msgid "Serial port 1" msgstr "Serijska vrata 1" @@ -498,18 +543,21 @@ msgstr "Paralelna vrata 3" msgid "Parallel port 4" msgstr "Paralelna vrata 4" -msgid "HD Controller:" -msgstr "Kontroler tvrdog diska:" - msgid "FD Controller:" msgstr "Kontroler diskete:" +msgid "CD-ROM Controller:" +msgstr "Kontroler CD-ROM:" + msgid "Tertiary IDE Controller" msgstr "Tercijarni IDE kontroler" msgid "Quaternary IDE Controller" msgstr "Kvaternarni IDE kontroler" +msgid "Hard disk" +msgstr "Tvrdi disk" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "Audio kaseta" msgid "Hard disks:" msgstr "Tvrdi diskovi:" +msgid "Firmware Version" +msgstr "Verzija firmvera" + msgid "&New..." msgstr "&Novi..." @@ -588,8 +639,14 @@ msgstr "CD-ROM pogoni:" msgid "MO drives:" msgstr "MO pogoni:" -msgid "ZIP drives:" -msgstr "ZIP pogoni:" +msgid "MO:" +msgstr "MO:" + +msgid "Removable disks:" +msgstr "Izmjenjivi diskovi:" + +msgid "Removable disk drives:" +msgstr "Pogoni izmjenjivih diskova:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "Sat stvarnog vremena (RTC):" msgid "ISA Memory Expansion" msgstr "Proširenje memorije ISA" +msgid "ISA ROM Cards" +msgstr "Kartice ISA sa ROM-om" + msgid "Card 1:" msgstr "Kartica 1:" @@ -612,6 +672,15 @@ msgstr "Kartica 3:" msgid "Card 4:" msgstr "Kartica 4:" +msgid "Generic ISA ROM Board" +msgstr "Generična kartica ISA s ROM-om" + +msgid "Generic Dual ISA ROM Board" +msgstr "Generična kartica ISA s dva ROM-a" + +msgid "Generic Quad ISA ROM Board" +msgstr "Generična kartica ISA s četiri ROM-a" + msgid "ISABugger device" msgstr "Uređaj ISABugger" @@ -633,11 +702,17 @@ msgstr " - ZASTAO" msgid "Speed" msgstr "Brzina" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Izmjenjivi disk %1 (%2): %3" -msgid "ZIP images" -msgstr "ZIP slike" +msgid "&Removable disk %1 (%2): %3" +msgstr "&Izmjenjivi disk %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Slike izmjenjivih diskova" + +msgid "Image %1" +msgstr "Slika %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "86Box nije mogao pronaći upotrebljive ROM datoteke.\n\nMolimte posjetite sknite paket s ROM datotekama i ekstrahirajte paket u mapu \"roms\"." @@ -696,12 +771,30 @@ msgstr "Mreža" msgid "Ports (COM & LPT)" msgstr "Vrata (COM & LPT)" +msgid "Ports" +msgstr "Vrata" + +msgid "Serial ports:" +msgstr "Serijska vrata:" + +msgid "Parallel ports:" +msgstr "Paralelna vrata:" + msgid "Storage controllers" msgstr "Kontroleri za diskove" msgid "Hard disks" msgstr "Tvrdi diskovi" +msgid "Disks:" +msgstr "Diskovi:" + +msgid "Floppy:" +msgstr "Diskete:" + +msgid "Controllers:" +msgstr "Kontroleri:" + msgid "Floppy & CD-ROM drives" msgstr "Floppy & CD-ROM pogoni" @@ -711,6 +804,9 @@ msgstr "Ostali uklonjivi uređaji" msgid "Other peripherals" msgstr "Ostali periferni uređaji" +msgid "Other devices" +msgstr "Ostali uređaji" + msgid "Click to capture mouse" msgstr "Kliknite da uhvatite miš" @@ -765,7 +861,7 @@ msgstr "Palica za igru s 2 osi, 6 tipke" msgid "2-axis, 8-button joystick" msgstr "Palica za igru s 2 osi, 8 tipke" -msgid "3-axis, 2-button joystick(s)" +msgid "3-axis, 2-button joystick" msgstr "Palica za igru s 3 osi, 2 tipke" msgid "3-axis, 4-button joystick" @@ -777,12 +873,39 @@ msgstr "Palica za igru s 4 osi, 4 tipke" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Pedals" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Thrustmaster Flight Control System" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Rudder Control System" + +msgid "2-button gamepad(s)" +msgstr "Gamepad(ovi) s 2 tipke" + +msgid "2-button flight yoke" +msgstr "Jaram za letenje s 2 tipke" + +msgid "4-button gamepad" +msgstr "Gamepad s 4 tipke" + +msgid "4-button flight yoke" +msgstr "Jaram za letenje s 4 tipke" + +msgid "2-button flight yoke with throttle" +msgstr "Jaram za letenje s 2 tipke i gasom" + +msgid "4-button flight yoke with throttle" +msgstr "Jaram za letenje s 4 tipke i gasom" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Volan Win95 (3 osi, 4 tipke)" + msgid "None" msgstr "Bez" @@ -792,6 +915,9 @@ msgstr "%1 MB (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Disketa %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Disketa %1 (%2): %3" + msgid "Advanced sector images" msgstr "Napredne sektorske slike" @@ -813,6 +939,9 @@ msgstr "Nije moguće inicijalizirati GhostPCL" msgid "MO %1 (%2): %3" msgstr "MO %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&MO %1 (%2): %3" + msgid "MO images" msgstr "MO slike" @@ -822,6 +951,15 @@ msgstr "Dobrodošli u 86Box!" msgid "Internal device" msgstr "Uunutarnji uređaj" +msgid "&File" +msgstr "&Datoteka" + +msgid "&New machine..." +msgstr "&Novi sistem..." + +msgid "&Check for updates..." +msgstr "&Provjeri ažuriranja..." + msgid "Exit" msgstr "Izlazi" @@ -897,12 +1035,18 @@ msgstr "Nastavi" msgid "Cassette: %1" msgstr "Audio kaseta: %1" +msgid "C&assette: %1" +msgstr "&Audio kaseta: %1" + msgid "Cassette images" msgstr "Slike audio kasete" msgid "Cartridge %1: %2" msgstr "Kaseta %1: %2" +msgid "Car&tridge %1: %2" +msgstr "&Kaseta %1: %2" + msgid "Cartridge images" msgstr "Slike kasete" @@ -912,6 +1056,9 @@ msgstr "Nastavi" msgid "Pause execution" msgstr "Pauziraj" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Stisni Ctrl+Alt+Del" @@ -921,9 +1068,279 @@ msgstr "Stisni Ctrl+Alt+Esc" msgid "Hard reset" msgstr "Ponovno pokretanje" +msgid "Force shutdown" +msgstr "Prisilno isključi" + +msgid "Start" +msgstr "Pokreni" + +msgid "Not running" +msgstr "Se ne pokreće" + +msgid "Running" +msgstr "Se pokreće" + +msgid "Paused" +msgstr "Pauziran" + +msgid "Waiting" +msgstr "Čeka" + +msgid "Powered Off" +msgstr "Isključen" + +msgid "%n running" +msgstr "%n se ppokreće" + +msgid "%n paused" +msgstr "%n pauziranih" + +msgid "%n waiting" +msgstr "%n čeka" + +msgid "%1 total" +msgstr "%1 ukupno" + +msgid "VMs: %1" +msgstr "Virtualnih sistema: %1" + +msgid "System Directory:" +msgstr "Sistemski direktorij:" + +msgid "Choose directory" +msgstr "Odaberite direktorij" + +msgid "Choose configuration file" +msgstr "Odaberite datoteku s konfiguracijom" + +msgid "86Box configuration files (86box.cfg)" +msgstr "Konfiguracijske datoteke programa 86Box (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Čitanje konfiguracije nije uspjelo" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Nije moguće otvoriti odabranu konfiguracijsku datoteku za čitanje: %1" + +msgid "Use regular expressions in search box" +msgstr "U polju za pretraživanje koristite regularne izraze" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "Broj trenutno aktivnih računala je %1. Jeste li sigurni da ipak želite izaći iz upravitelja virtualnih sistema?" + +msgid "Add new system wizard" +msgstr "Čarobnjak za dodavanje novog sistema" + +msgid "Introduction" +msgstr "Uvod" + +msgid "This will help you add a new system to 86Box." +msgstr "Ovo će vam pomoći da dodate novi sistem u 86Box." + +msgid "New configuration" +msgstr "Nova konfiguracija" + +msgid "Complete" +msgstr "Završi" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "Čarobnjak će sada pokrenuti konfiguraciju za novi sustav." + +msgid "Use existing configuration" +msgstr "Koristi postojeću konfiguraciju" + +msgid "Type some notes here" +msgstr "Ovdje upišite neke bilješke" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Zalijepite sadržaj postojeće konfiguracijske datoteke u okvir ispod." + +msgid "Load configuration from file" +msgstr "Učitaj konfiguraciju iz datoteke" + +msgid "System name" +msgstr "Naziv sistema" + +msgid "System name:" +msgstr "Naziv sistema:" + +msgid "System name cannot contain certain characters" +msgstr "Naziv sistema ne može sadržavati određene znakove" + +msgid "System name already exists" +msgstr "Naziv sistema već postoji" + +msgid "Please enter a directory for the system" +msgstr "Molimo unesite direktorij za sistem" + +msgid "Directory does not exist" +msgstr "Direktorij ne postoji" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "Novi direktorij za sistem bit će kreiran u odabranom direktoriju iznad" + +msgid "System location:" +msgstr "Lokacija sistema:" + +msgid "System name and location" +msgstr "Naziv i lokacija sistema" + +msgid "Enter the name of the system and choose the location" +msgstr "Unesite naziv sistema i odaberite lokaciju" + +msgid "Enter the name of the system" +msgstr "Unesite naziv sistema" + +msgid "Please enter a system name" +msgstr "Unesite naziv sistema" + +msgid "Display name (optional):" +msgstr "Prikazno ime (neobavezno):" + +msgid "Display name:" +msgstr "Prikazno ime:" + +msgid "Set display name" +msgstr "Postavi prikazno ime" + +msgid "Enter the new display name (blank to reset)" +msgstr "Unesite novo prikazno ime (prazno za ponovo postaviti)" + +msgid "Change &display name..." +msgstr "Promijeni &prikazno ime..." + +msgid "Context Menu" +msgstr "Kontekstni izbornik" + +msgid "&Open folder..." +msgstr "&Otvori mapu..." + +msgid "Open p&rinter tray..." +msgstr "Otvori ladicu &pisača..." + +msgid "Set &icon..." +msgstr "Postavi &ikonu..." + +msgid "Select an icon" +msgstr "Odaberite ikonu" + +msgid "C&lone..." +msgstr "K&loniraj..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "Virtualni sistem \"%1\" (%2) bit će kloniran u:" + +msgid "Directory %1 already exists" +msgstr "Direktorij %1 već postoji" + +msgid "You cannot use the following characters in the name: %1" +msgstr "U nazivu ne možete koristiti sljedeće znakove: %1" + +msgid "Clone" +msgstr "Kloniraj" + +msgid "Failed to create directory for cloned VM" +msgstr "Nije uspjelo stvaranje direktorija za klonirani VM" + +msgid "Failed to clone VM." +msgstr "Kloniranje virtualnog stroja nije uspjelo." + +msgid "Directory in use" +msgstr "Direktorij u uporebi" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "Odabrani direktorij je već u upotrebi. Molimo odaberite drugi direktorij." + +msgid "Create directory failed" +msgstr "Izrada direktorija nije uspjela" + +msgid "Unable to create the directory for the new system" +msgstr "Nije moguće stvoriti direktorij za novi sustav" + +msgid "Configuration write failed" +msgstr "Pisanje konfiguracije nije uspjelo" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Nije moguće otvoriti konfiguracijsku datoteku na %1 za pisanje" + +msgid "Error adding system" +msgstr "Pogreška pri dodavanju sistema" + +msgid "Remove directory failed" +msgstr "Uklanjanje direktorija nije uspjelo" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Neke datoteke u direktoriju sistema nisu mogle biti izbrisane. Izbrišite ih ručno." + +msgid "Build" +msgstr "Build" + +msgid "Version" +msgstr "Verzija" + +msgid "An update to 86Box is available: %1 %2" +msgstr "Dostupno je ažuriranje za 86Box: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Došlo je do greške prilikom provjere ažuriranja: %1" + +msgid "An update to 86Box is available!" +msgstr "Dostupno je ažuriranje za 86Box!" + +msgid "Warning" +msgstr "Upozorenje" + +msgid "&Kill" +msgstr "&Prisilno prekini" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Prisilno prekidanje virtualnog stroja može uzrokovati gubitak podataka. Učinite to samo ako se 86Box proces zaglavi.\n\nŽelite li zaista ubiti virtualni stroj \"%1\"?" + +msgid "&Delete" +msgstr "&Izbriši" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Želite li zaista izbrisati virtualni stroj \"%1\" i sve njegove datoteke? Ovu radnju nije moguće poništiti!" + +msgid "Show &config file" +msgstr "Prikaži &konfiguracijsku datoteku" + +msgid "No screenshot" +msgstr "Nema snimke zaslona" + +msgid "Search" +msgstr "Pretraživanje" + +msgid "Searching for VMs..." +msgstr "Traženje virtualnih sistema..." + +msgid "Found %1" +msgstr "Pronađeno %1" + +msgid "System" +msgstr "Sistem" + +msgid "Storage" +msgstr "Diskovi" + +msgid "Disk %1: " +msgstr "Disk %1: " + +msgid "No disks" +msgstr "Nema diskova" + +msgid "Audio" +msgstr "Zvuk" + +msgid "Audio:" +msgstr "Zvuk:" + msgid "ACPI shutdown" msgstr "ACPI bazirano gašenje" +msgid "ACP&I shutdown" +msgstr "ACP&I bazirano gašenje" + msgid "Hard disk (%1)" msgstr "Tvrdi disk (%1)" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 KB" @@ -1209,41 +1629,38 @@ msgstr "Uređaji MCA" msgid "List of MCA devices:" msgstr "Spisak uređaja MCA:" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Alat za tablet" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "O programu &Qt" -msgid "About Qt" -msgstr "O programu Qt" - -msgid "MCA devices..." +msgid "&MCA devices..." msgstr "Uređaji MCA ..." -msgid "Show non-primary monitors" +msgid "Show non-&primary monitors" msgstr "Prikaži neprimarne monitore" -msgid "Open screenshots folder..." +msgid "Open screenshots &folder..." msgstr "Otvori mapu snimaka zaslona..." -msgid "Apply fullscreen stretch mode when maximized" +msgid "Appl&y fullscreen stretch mode when maximized" msgstr "Primijeni način cijelozaslonskog rastezanja u maksimiziranom načinu" -msgid "Cursor/Puck" -msgstr "Kursor/Pak" +msgid "&Cursor/Puck" +msgstr "&Kursor/Pak" -msgid "Pen" -msgstr "Olovka" +msgid "&Pen" +msgstr "&Olovka" -msgid "Host CD/DVD Drive (%1:)" -msgstr "CD/DVD pogon nositelja (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "CD/DVD pogon &nositelja (%1:)" msgid "&Connected" msgstr "&Povezan" -msgid "Clear image history" -msgstr "Očisti povijest slika" +msgid "Clear image &history" +msgstr "Očisti &povijest slika" msgid "Create..." msgstr "Stvori..." @@ -1257,8 +1674,14 @@ msgstr "Nepoznata sabirnica" msgid "Null Driver" msgstr "Nulti upravljački program" +msgid "NIC:" +msgstr "Mrežna kartica:" + msgid "NIC %1 (%2) %3" -msgstr "NIC %1 (%2) %3" +msgstr "Mrežna kartica %1 (%2) %3" + +msgid "&NIC %1 (%2) %3" +msgstr "&Mrežna kartica %1 (%2) %3" msgid "Render behavior" msgstr "Ponašanje rendera" @@ -1323,6 +1746,9 @@ msgstr "Nema uređaja MCA." msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" msgstr "Mrežna kartica 1" @@ -1365,9 +1791,27 @@ msgstr "Prolaz serijskih vrata 3" msgid "Serial port passthrough 4" msgstr "Prolaz serijskih vrata 4" -msgid "Renderer options..." +msgid "Renderer &options..." msgstr "Opcije rendera..." +msgid "PC/XT Keyboard" +msgstr "Tipkovnica PC/XT" + +msgid "AT Keyboard" +msgstr "Tipkovnica AT" + +msgid "AX Keyboard" +msgstr "Tipkovnica AX" + +msgid "PS/2 Keyboard" +msgstr "Tipkovnica PS/2" + +msgid "PS/55 Keyboard" +msgstr "Tipkovnica PS/55" + +msgid "Keys" +msgstr "Tipke" + msgid "Logitech/Microsoft Bus Mouse" msgstr "Sabirnički miš Logitech/Microsoft" @@ -1377,18 +1821,30 @@ msgstr "Sabirnički miš Microsoft (InPort)" msgid "Mouse Systems Serial Mouse" msgstr "Serijski miš Mouse Systems" +msgid "Mouse Systems Bus Mouse" +msgstr "Sabirnički miš Mouse Systems" + msgid "Microsoft Serial Mouse" msgstr "Serijski miš Microsoft" +msgid "Microsoft Serial BallPoint" +msgstr "Serijski miš Microsoft BallPoint" + msgid "Logitech Serial Mouse" msgstr "Serijski miš Logitech" msgid "PS/2 Mouse" msgstr "Miš PS/2" +msgid "PS/2 QuickPort Mouse" +msgstr "Miš PS/2 QuickPort" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (serijski)" +msgid "Default Baud rate" +msgstr "Zadana brzina prijenosa podataka" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Standardni modem, usklađen s standardom Hayesom" @@ -1413,21 +1869,81 @@ msgstr "Sistemski MIDI" msgid "MIDI Input Device" msgstr "Ulazni uređaj MIDI" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "Datoteka BIOS-a" + +msgid "BIOS file (ROM #1)" +msgstr "Datoteka BIOS-a (ROM 1)" + +msgid "BIOS file (ROM #2)" +msgstr "Datoteka BIOS-a (ROM 2)" + +msgid "BIOS file (ROM #3)" +msgstr "Datoteka BIOS-a (ROM 3)" + +msgid "BIOS file (ROM #4)" +msgstr "Datoteka BIOS-a (ROM 4)" + +msgid "BIOS address" msgstr "Adresa BIOS-a" +msgid "BIOS address (ROM #1)" +msgstr "Adresa BIOS-a (ROM 1)" + +msgid "BIOS address (ROM #2)" +msgstr "Adresa BIOS-a (ROM 2)" + +msgid "BIOS address (ROM #3)" +msgstr "Adresa BIOS-a (ROM 3)" + +msgid "BIOS address (ROM #4)" +msgstr "Adresa BIOS-a (ROM 4)" + msgid "Enable BIOS extension ROM Writes" msgstr "Omogući pisanje u ROM proširenja BIOS-a" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "Omogući pisanje u ROM proširenja BIOS-a (ROM 1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "Omogući pisanje u ROM proširenja BIOS-a (ROM 2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "Omogući pisanje u ROM proširenja BIOS-a (ROM 3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "Omogući pisanje u ROM proširenja BIOS-a (ROM 4)" + +msgid "Linear framebuffer base" +msgstr "Osnovna adresa linearnog framebuffera" + msgid "Address" msgstr "Adresa" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "IRQ serijskih vrata" + +msgid "Parallel port IRQ" +msgstr "IRQ paralelnih vrata" + msgid "BIOS Revision" msgstr "Revizija BIOS-a" +msgid "BIOS Version" +msgstr "Verzija BIOS-a" + +msgid "BIOS Language" +msgstr "Jezik BIOS-a" + +msgid "IBM 5161 Expansion Unit" +msgstr "Jedinica za proširenj IBM 5161" + +msgid "IBM Cassette Basic" +msgstr "Kasetni BASIC IBM" + msgid "Translate 26 -> 17" msgstr "Prevedi 26 -> 17" @@ -1443,6 +1959,18 @@ msgstr "Invertiraj boje" msgid "BIOS size" msgstr "Veličina BIOS-a" +msgid "BIOS size (ROM #1)" +msgstr "Veličina BIOS-a (ROM 1)" + +msgid "BIOS size (ROM #2)" +msgstr "Veličina BIOS-a (ROM 2)" + +msgid "BIOS size (ROM #3)" +msgstr "Veličina BIOS-a (ROM 3)" + +msgid "BIOS size (ROM #4)" +msgstr "Veličina BIOS-a (ROM 4)" + msgid "Map C0000-C7FFF as UMB" msgstr "Mapiraj C0000-C7FFF kao UMB" @@ -1518,6 +2046,9 @@ msgstr "Nivo odjeka" msgid "Interpolation Method" msgstr "Metoda interpolacije" +msgid "Dynamic Sample Loading" +msgstr "Dinamičko učitavanje uzoraka" + msgid "Reverb Output Gain" msgstr "Pojačavanje izlaza odjeka" @@ -1605,6 +2136,12 @@ msgstr "Niski DMA" msgid "Enable Game port" msgstr "Omogoći vrata za igru" +msgid "SID Model" +msgstr "Model SID-a" + +msgid "SID Filter Strength" +msgstr "Jačina filtra SID-a" + msgid "Surround module" msgstr "Modul Surround" @@ -1617,6 +2154,12 @@ msgstr "Podigni prekid CODEC na postavljanju CODEC-a (potrebno nekim upravljačk msgid "SB Address" msgstr "Adresa SB-a" +msgid "Adlib Address" +msgstr "Adresa Adlib" + +msgid "Use EEPROM setting" +msgstr "Koristi postavku iz EEPROM-a" + msgid "WSS IRQ" msgstr "IRQ WSS-a" @@ -1701,9 +2244,15 @@ msgstr "Vrsta RAMDAC-a" msgid "Blend" msgstr "Miješaj" +msgid "Font" +msgstr "Font" + msgid "Bilinear filtering" msgstr "Bilinearno filtriranje" +msgid "Video chroma-keying" +msgstr "Kroma ključanje prikaza" + msgid "Dithering" msgstr "Podrhtavanje" @@ -1746,6 +2295,33 @@ msgstr "Brzina prijenosa" msgid "EMS mode" msgstr "Načina EMS" +msgid "EMS Address" +msgstr "Adresa EMS" + +msgid "EMS 1 Address" +msgstr "Adresa EMS 1" + +msgid "EMS 2 Address" +msgstr "Adresa EMS 2" + +msgid "EMS Memory Size" +msgstr "Veličina memorije EMS" + +msgid "EMS 1 Memory Size" +msgstr "Veličina memorije EMS 1" + +msgid "EMS 2 Memory Size" +msgstr "Veličina memorije EMS 2" + +msgid "Enable EMS" +msgstr "Omogući EMS" + +msgid "Enable EMS 1" +msgstr "Omogući EMS 1" + +msgid "Enable EMS 2" +msgstr "Omogući EMS 2" + msgid "Address for > 2 MB" msgstr "Adresa za > 2 MB" @@ -1764,11 +2340,11 @@ msgstr "Uvijek na odabranoj brzini" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "Konfiguracija BIOS-a + Tipkovni prečaci (onemogućeni tekom POST-a)" -msgid "64 kB starting from F0000" -msgstr "64 kB od F0000" +msgid "64 KB starting from F0000" +msgstr "64 KB od F0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB od E0000 (MSB adrese invertiran, poslednjih 64KB prvo)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KB od E0000 (MSB adrese invertiran, poslednjih 64 KB prvo)" msgid "Sine" msgstr "Sinusni" @@ -1804,7 +2380,7 @@ msgid "Five + Wheel" msgstr "Pet + kotač" msgid "Five + 2 Wheels" -msgstr "" +msgstr "Pet + 2 kotača" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 serijski / SMT3(R)V" @@ -1869,6 +2445,9 @@ msgstr "256 KB" msgid "Composite" msgstr "Kompozitni" +msgid "True color" +msgstr "Prave boje" + msgid "Old" msgstr "Stara" @@ -1902,17 +2481,26 @@ msgstr "Interpolacija sRGB" msgid "Linear interpolation" msgstr "Linearna interpolacija" +msgid "Has secondary 8x8 character set" +msgstr "Ima sekundarni skup znakova 8x8" + +msgid "Has Quadcolor II daughter board" +msgstr "Ima kćerinsku ploču Quadcolor II" + +msgid "Alternate monochrome contrast" +msgstr "Alternativni crno-bijeli kontrast" + msgid "128 KB" msgstr "128 KB" msgid "Monochrome (5151/MDA) (white)" -msgstr "Crno-biljeli (5151/MDA) (bijeli)" +msgstr "Crno-bijeli (5151/MDA) (bijeli)" msgid "Monochrome (5151/MDA) (green)" -msgstr "Crno-biljeli (5151/MDA) (zeleni)" +msgstr "Crno-bijeli (5151/MDA) (zeleni)" msgid "Monochrome (5151/MDA) (amber)" -msgstr "Crno-biljeli (5151/MDA) (jantarni)" +msgstr "Crno-bijeli (5151/MDA) (jantarni)" msgid "Color 40x25 (5153/CGA)" msgstr "Bojni 40x25 (5153/CGA)" @@ -1935,6 +2523,9 @@ msgstr "Jantarna" msgid "Gray" msgstr "Siva" +msgid "Grayscale" +msgstr "Nijanse sive" + msgid "Color" msgstr "Bojna" @@ -1950,8 +2541,14 @@ msgstr "Ostali jezici" msgid "Bochs latest" msgstr "Bochs poslednji" +msgid "Apply overscan deltas" +msgstr "Primijeni delte viška slike" + +msgid "Mono Interlaced" +msgstr "Crno-bijeli s preplitanjem" + msgid "Mono Non-Interlaced" -msgstr "Crno-biljeli bez preplitanja" +msgstr "Crno-bijeli bez preplitanja" msgid "Color Interlaced" msgstr "Bojni s preplitanjem" @@ -1962,6 +2559,9 @@ msgstr "Bojni bez preplitanja" msgid "3Dfx Voodoo Graphics" msgstr "3dfx Voodoo grafika" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 jednote TMU)" @@ -2031,6 +2631,9 @@ msgstr "Baudova brzina prolaza" msgid "Named Pipe (Server)" msgstr "Imenovani vod (server)" +msgid "Named Pipe (Client)" +msgstr "Imenovani vod (klijent)" + msgid "Host Serial Passthrough" msgstr "Prolaz serijskih vrata nositelja" @@ -2047,28 +2650,28 @@ msgid "High performance impact" msgstr "Visoki učinak na brzinu izvršavanja" msgid "[Generic] RAM Disk (max. speed)" -msgstr "[Generic] Disk RAM (najviša brzina)" +msgstr "[Generični] Disk RAM (najviša brzina)" msgid "[Generic] 1989 (3500 RPM)" -msgstr "" +msgstr "[Generični] 1989 (3500 okr./min)" msgid "[Generic] 1992 (3600 RPM)" -msgstr "" +msgstr "[Generični] 1992 (3600 okr./min)" msgid "[Generic] 1994 (4500 RPM)" -msgstr "" +msgstr "[Generični] 1994 (4500 okr./min)" msgid "[Generic] 1996 (5400 RPM)" -msgstr "" +msgstr "[Generični] (5400 okr./min)" msgid "[Generic] 1997 (5400 RPM)" -msgstr "" +msgstr "[Generični] (5400 okr./min)" msgid "[Generic] 1998 (5400 RPM)" -msgstr "" +msgstr "[Generični] (5400 okr./min)" msgid "[Generic] 2000 (7200 RPM)" -msgstr "" +msgstr "[Generični] (7200 okr./min)" msgid "IBM 8514/A clone (ISA)" msgstr "Klon IBM 8514/A (ISA)" @@ -2076,6 +2679,12 @@ msgstr "Klon IBM 8514/A (ISA)" msgid "Vendor" msgstr "Proizvođać" +msgid "30 Hz (JMP2 = 1)" +msgstr "30 Hz (JMP2 = 1)" + +msgid "60 Hz (JMP2 = 2)" +msgstr "60 Hz (JMP2 = 2)" + msgid "Generic PC/XT Memory Expansion" msgstr "Generičko proširenje memorije PC/XT" @@ -2089,61 +2698,259 @@ msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for t msgstr "TrueType fontovi u mapi \"roms/printer/fonts\" potrebni su za emulaciju generičnog matričnog pisača ESC/P." msgid "Inhibit multimedia keys" -msgstr "" +msgstr "Blokiraj multimedijske tipke" msgid "Ask for confirmation before saving settings" -msgstr "" +msgstr "Zatraži potvrdu prije spremanja opcija" msgid "Ask for confirmation before hard resetting" -msgstr "" +msgstr "Zatraži potvrdu prije ponovnog pokretanja" msgid "Ask for confirmation before quitting" -msgstr "" +msgstr "Zatraži potvrdu prije izlaza" msgid "Options" -msgstr "" +msgstr "Opcije" msgid "Model" -msgstr "" +msgstr "Model" msgid "Model:" -msgstr "" +msgstr "Model:" msgid "Failed to initialize Vulkan renderer." -msgstr "" +msgstr "Nije uspjelo inicijaliziranje renderera Vulkan." msgid "GLSL Error" -msgstr "" +msgstr "Greška GLSL" msgid "Could not load shader: %1" -msgstr "" +msgstr "Nije moguće učitati shader: %1" msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" -msgstr "" +msgstr "Potrebna je OpenGL verzija 3.0 ili novija. Trenutna GLSL verzija je %1.%2" msgid "Could not load texture: %1" -msgstr "" +msgstr "Nije moguće učitati teksturu: %1" msgid "Could not compile shader:\n\n%1" -msgstr "" +msgstr "Nije moguće kompajlirati shader:\n\n%1" msgid "Program not linked:\n\n%1" -msgstr "" +msgstr "Program nije povezan:\n\n%1" msgid "Shader Manager" -msgstr "" +msgstr "Upravitelj shadera" msgid "Shader Configuration" -msgstr "" +msgstr "Konfiguracija shadera" msgid "Add" -msgstr "" +msgstr "Dodaj" msgid "Move up" -msgstr "" +msgstr "Pomakni gore" msgid "Move down" -msgstr "" +msgstr "Pomakni dolje" msgid "Could not load file %1" -msgstr "" +msgstr "Nije moguće učitati datoteku %1" + +msgid "Key Bindings:" +msgstr "Veze tipki:" + +msgid "Action" +msgstr "Akcija" + +msgid "Keybind" +msgstr "Povezivanje tipki" + +msgid "Clear binding" +msgstr "Očisti vezivanje" + +msgid "Bind" +msgstr "Poveži" + +msgid "Bind Key" +msgstr "Poveži tipku" + +msgid "Enter key combo:" +msgstr "Unesite kombinaciju tipki:" + +msgid "Bind conflict" +msgstr "Sukob vezanja" + +msgid "This key combo is already in use." +msgstr "Ova kombinacija tipki je već u upotrebi." + +msgid "Send Control+Alt+Del" +msgstr "Pošalji Control+Alt+Del" + +msgid "Send Control+Alt+Escape" +msgstr "Pošalji Control+Alt+Escape" + +msgid "Toggle fullscreen" +msgstr "Uključi/isključi cijelozaslonski način" + +msgid "Screenshot" +msgstr "Snimka zaslona" + +msgid "Release mouse pointer" +msgstr "Otpusti pokazivač miša" + +msgid "Toggle pause" +msgstr "Uključi/isključi pauzu" + +msgid "Toggle mute" +msgstr "Uključi/isključi zvuk" + +msgid "Text files" +msgstr "Tekstualne datoteke" + +msgid "ROM files" +msgstr "Datoteke ROM" + +msgid "SoundFont files" +msgstr "Datoteke SoundFont" + +msgid "Local Switch" +msgstr "Lokalni prekidač" + +msgid "Remote Switch" +msgstr "Udaljeni prekidač" + +msgid "Switch:" +msgstr "Prekidač:" + +msgid "Hub Mode" +msgstr "Način čvorišta" + +msgid "Hostname:" +msgstr "Naziv hosta:" + +msgid "ISA RAM:" +msgstr "RAM ISA:" + +msgid "ISA ROM:" +msgstr "ROM ISA:" + +msgid "&Wipe NVRAM" +msgstr "&Obriši NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Ovim će se izbrisati sve NVRAM (i povezane) datoteke virtualnog sistema koji se nalazi u poddirektoriju \"nvr\". Morat ćete ponovno konfigurirati postavke BIOS-a (i eventualno drugih uređaja unutar virtualnog sistema) ako je primjenjivo.\n\nJeste li sigurni da želite izbrisati sav NVRAM sadržaj virtualnog sistema \"%1\"?" + +msgid "Success" +msgstr "Uspjeh" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Uspješno obrisan sadržaj NVRAM-a virtualnog sistema \"%1\"" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Došlo je do pogreške pri pokušaju brisanja NVRAM sadržaja virtualnog sistema \"%1\"" + +msgid "%1 VM Manager" +msgstr "Upravitelj virtualnih sistema programa %1" + +msgid "%n disk(s)" +msgstr "%n disk(ova)" + +msgid "Unknown Status" +msgstr "Nepoznat status" + +msgid "No Machines Found!" +msgstr "Nisu pronađeni sistemovi!" + +msgid "Check for updates on startup" +msgstr "Provjeri ažuriranja pri pokretanju" + +msgid "Unable to determine release information" +msgstr "Nije moguće utvrditi informacije o izdanju" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Došlo je do pogreške prilikom provjere ažuriranja:\n\n%1\n\nMolimo pokušajte ponovno kasnije." + +msgid "Update check complete" +msgstr "Provjera ažuriranja dovršena" + +msgid "stable" +msgstr "stabilnu" + +msgid "beta" +msgstr "beta" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Koristite najnoviju %1 verziju programa 86Box: %2" + +msgid "version" +msgstr "verzija" + +msgid "build" +msgstr "build" + +msgid "You are currently running version %1." +msgstr "Trenutno koristite verziju %1." + +msgid "Version %1 is now available." +msgstr "Verzija %1 je sada dostupna." + +msgid "You are currently running build %1." +msgstr "Trenutno koristite build %1." + +msgid "Build %1 is now available." +msgstr "Build %1 je sada dostupan." + +msgid "Would you like to visit the download page?" +msgstr "Želite li posjetiti stranicu za preuzimanje?" + +msgid "Visit download page" +msgstr "Posjetiti stranicu za preuzimanje" + +msgid "Update check" +msgstr "Provjera ažuriranja" + +msgid "Checking for updates..." +msgstr "Provjera ažuriranja..." + +msgid "86Box Update" +msgstr "Ažuriranje programa 86Box" + +msgid "Release notes:" +msgstr "Bilješke o izdanju:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Neočekivani prekid rada virtualnog sistema" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "Proces virtualnog sistema \"%1\" neočekivano je završio s izlaznim kodom %2." + +msgid "The system will not be added." +msgstr "Sistem neće biti dodan." + +msgid "&Update mouse every CPU frame" +msgstr "&Ažuriraj status miša kod skavog bloka procesora" + +msgid "Hue" +msgstr "Boja" + +msgid "Saturation" +msgstr "Zasićenost" + +msgid "Contrast" +msgstr "Konstrast" + +msgid "Brightness" +msgstr "Svjetlina" + +msgid "Sharpness" +msgstr "Oštrina" + +msgid "&CGA composite settings..." +msgstr "Opcije kompozitnog načina &CGA..." + +msgid "CGA composite settings" +msgstr "Opcije kompozitnog načina CGA" diff --git a/src/qt/languages/hu-HU.po b/src/qt/languages/hu-HU.po deleted file mode 100644 index 981edad71..000000000 --- a/src/qt/languages/hu-HU.po +++ /dev/null @@ -1,2149 +0,0 @@ -msgid "" -msgstr "" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Language: hu_HU\n" -"X-Source-Language: en_US\n" - -msgid "&Action" -msgstr "&Művelet" - -msgid "&Keyboard requires capture" -msgstr "A &billentyűzet elfogást igényel" - -msgid "&Right CTRL is left ALT" -msgstr "A &jobb oldali CTRL a bal ALT" - -msgid "&Hard Reset..." -msgstr "Hardveres &újraindítás..." - -msgid "&Ctrl+Alt+Del" -msgstr "&Ctrl+Alt+Del" - -msgid "Ctrl+Alt+&Esc" -msgstr "Ctrl+Alt+&Esc" - -msgid "&Pause" -msgstr "&Szüneteltetés" - -msgid "E&xit..." -msgstr "&Kilépés..." - -msgid "&View" -msgstr "&Nézet" - -msgid "&Hide status bar" -msgstr "Állapotsor &elrejtése" - -msgid "Hide &toolbar" -msgstr "Hide &toolbar" - -msgid "&Resizeable window" -msgstr "&Átméretezhető ablak" - -msgid "R&emember size && position" -msgstr "Méret és pozíció &megjegyzése" - -msgid "Re&nderer" -msgstr "&Megjelenítő" - -msgid "&Qt (Software)" -msgstr "&Qt (Szoftveres)" - -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - -msgid "Open&GL (3.0 Core)" -msgstr "Open&GL (3.0 Core)" - -msgid "&VNC" -msgstr "&VNC" - -msgid "Specify dimensions..." -msgstr "Méretek kézi megadása..." - -msgid "F&orce 4:3 display ratio" -msgstr "&Rögzített 4:3 képarány" - -msgid "&Window scale factor" -msgstr "&Ablak méretezési tényező" - -msgid "&0.5x" -msgstr "&0,5x" - -msgid "&1x" -msgstr "&1x" - -msgid "1.&5x" -msgstr "1,&5x" - -msgid "&2x" -msgstr "&2x" - -msgid "&3x" -msgstr "&3x" - -msgid "&4x" -msgstr "&4x" - -msgid "&5x" -msgstr "&5x" - -msgid "&6x" -msgstr "&6x" - -msgid "&7x" -msgstr "&7x" - -msgid "&8x" -msgstr "&8x" - -msgid "Filter method" -msgstr "Szűrési mód" - -msgid "&Nearest" -msgstr "&Szomszédos" - -msgid "&Linear" -msgstr "&Lineáris" - -msgid "Hi&DPI scaling" -msgstr "Hi&DPI méretezés" - -msgid "&Fullscreen" -msgstr "&Teljes képernyő" - -msgid "Fullscreen &stretch mode" -msgstr "Teljes képernyős &méretezés" - -msgid "&Full screen stretch" -msgstr "&Nyújtás a teljes képernyőre" - -msgid "&4:3" -msgstr "&4:3" - -msgid "&Square pixels (Keep ratio)" -msgstr "&Négyzetes képpontok (aránytartás)" - -msgid "&Integer scale" -msgstr "&Egész tényezős nagyítás" - -msgid "4:&3 Integer scale" -msgstr "4:&3 Egész tényezős nagyítás" - -msgid "E&GA/(S)VGA settings" -msgstr "E&GA/(S)VGA beállítások" - -msgid "&Inverted VGA monitor" -msgstr "&Invertált VGA kijelző" - -msgid "VGA screen &type" -msgstr "VGA képernyő &típusa" - -msgid "RGB &Color" -msgstr "RGB &színes" - -msgid "&RGB Grayscale" -msgstr "&RGB szürkeárnyalatos" - -msgid "&Amber monitor" -msgstr "&Gyömbér kijelző" - -msgid "&Green monitor" -msgstr "&Zöld kijelző" - -msgid "&White monitor" -msgstr "&Fehér kijelző" - -msgid "Grayscale &conversion type" -msgstr "Szürkéskála &konzerziós eljárás" - -msgid "BT&601 (NTSC/PAL)" -msgstr "BT&601 (NTSC/PAL)" - -msgid "BT&709 (HDTV)" -msgstr "BT&709 (HDTV)" - -msgid "&Average" -msgstr "&Átlag szerint" - -msgid "CGA/PCjr/Tandy/E&GA/(S)VGA overscan" -msgstr "CGA/PCjr/Tandy/E&GA/(S)VGA túlpásztázás" - -msgid "Change contrast for &monochrome display" -msgstr "Kontraszt illesztése &monokróm kijelzőhöz" - -msgid "&Media" -msgstr "&Média" - -msgid "&Tools" -msgstr "&Eszközök" - -msgid "&Settings..." -msgstr "&Konfigurálás..." - -msgid "&Update status bar icons" -msgstr "Állapotsori ikonok &frissítése" - -msgid "Take s&creenshot" -msgstr "&Képernyőkép készítése" - -msgid "S&ound" -msgstr "&Hang" - -msgid "&Preferences..." -msgstr "&Beállítások..." - -msgid "Enable &Discord integration" -msgstr "&Discord integráció engedélyezése" - -msgid "Sound &gain..." -msgstr "&Hangerőszabályzó..." - -msgid "Begin trace" -msgstr "Nyomkövetés megkezdése" - -msgid "End trace" -msgstr "Nyomkövetés befejezése" - -msgid "&Help" -msgstr "&Súgó" - -msgid "&Documentation..." -msgstr "&Dokumentáció..." - -msgid "&About 86Box..." -msgstr "A 86Box &névjegye..." - -msgid "&New image..." -msgstr "&Új képfájl létrehozása..." - -msgid "&Existing image..." -msgstr "Meglévő képfájl &megnyitása..." - -msgid "Existing image (&Write-protected)..." -msgstr "Meglévő képfájl megnyitása (&írásvédett)..." - -msgid "&Record" -msgstr "&Felvétel" - -msgid "&Play" -msgstr "&Lejátszás" - -msgid "&Rewind to the beginning" -msgstr "&Visszatekerés az elejére" - -msgid "&Fast forward to the end" -msgstr "&Előretekerés a végére" - -msgid "E&ject" -msgstr "&Kiadás" - -msgid "&Image..." -msgstr "Kép&fájl..." - -msgid "E&xport to 86F..." -msgstr "E&xportálás 86F formátumba..." - -msgid "&Mute" -msgstr "&Némítás" - -msgid "E&mpty" -msgstr "&Kiadás" - -msgid "Reload previous image" -msgstr "Előző képfájl újratöltése" - -msgid "&Folder..." -msgstr "&Mappa..." - -msgid "Target &framerate" -msgstr "Cél &képkockasebesség" - -msgid "&Sync with video" -msgstr "&Szinkronizálás a videóval" - -msgid "&25 fps" -msgstr "&25 fps" - -msgid "&30 fps" -msgstr "&30 fps" - -msgid "&50 fps" -msgstr "&50 fps" - -msgid "&60 fps" -msgstr "&60 fps" - -msgid "&75 fps" -msgstr "&75 fps" - -msgid "&VSync" -msgstr "&VSync" - -msgid "&Select shader..." -msgstr "Shader &kiválasztása..." - -msgid "&Remove shader" -msgstr "Shader &eltávolítása" - -msgid "Preferences" -msgstr "Beállítások" - -msgid "Sound Gain" -msgstr "Hangerőszabályzó" - -msgid "New Image" -msgstr "Új képfájl létrehozása" - -msgid "Settings" -msgstr "Konfigurálás" - -msgid "Specify Main Window Dimensions" -msgstr "Főablak méreteinek megadása" - -msgid "OK" -msgstr "OK" - -msgid "Cancel" -msgstr "Mégse" - -msgid "&Default" -msgstr "&Alapértelmezett" - -msgid "Language:" -msgstr "Nyelv:" - -msgid "Gain" -msgstr "Hangerő" - -msgid "File name:" -msgstr "Fájlnév:" - -msgid "Disk size:" -msgstr "Méret:" - -msgid "RPM mode:" -msgstr "RPM-mód:" - -msgid "Progress:" -msgstr "Folyamat:" - -msgid "Width:" -msgstr "Szélesség:" - -msgid "Height:" -msgstr "Magasság:" - -msgid "Lock to this size" -msgstr "Rögzítés a megadott méretre" - -msgid "Machine type:" -msgstr "Géptípus:" - -msgid "Machine:" -msgstr "Számítógép:" - -msgid "Configure" -msgstr "Beállítások..." - -msgid "CPU type:" -msgstr "Processzor:" - -msgid "Speed:" -msgstr "Seb.:" - -msgid "Frequency:" -msgstr "Frekvencia:" - -msgid "FPU:" -msgstr "FPU-egység:" - -msgid "Wait states:" -msgstr "Várak. ciklusok:" - -msgid "MB" -msgstr "MB" - -msgid "Memory:" -msgstr "Memória:" - -msgid "Time synchronization" -msgstr "Idő szinkronizáció" - -msgid "Disabled" -msgstr "Letiltva" - -msgid "Enabled (local time)" -msgstr "Engedélyezve (helyi idő)" - -msgid "Enabled (UTC)" -msgstr "Engedélyezve (UTC)" - -msgid "Dynamic Recompiler" -msgstr "Dinamikus újrafordítás" - -msgid "Video:" -msgstr "Videokártya:" - -msgid "Video #2:" -msgstr "Videokártya 2:" - -msgid "Voodoo 1 or 2 Graphics" -msgstr "Voodoo 1 vagy 2-gyorsítókártya" - -msgid "IBM 8514/A Graphics" -msgstr "IBM 8514/A-gyorsítókártya" - -msgid "XGA Graphics" -msgstr "XGA-gyorsítókártya" - -msgid "Mouse:" -msgstr "Egér:" - -msgid "Joystick:" -msgstr "Játékvezérlő:" - -msgid "Joystick 1..." -msgstr "Játékvez. 1..." - -msgid "Joystick 2..." -msgstr "Játékvez. 2..." - -msgid "Joystick 3..." -msgstr "Játékvez. 3..." - -msgid "Joystick 4..." -msgstr "Játékvez. 4..." - -msgid "Sound card #1:" -msgstr "Hangkártya 1:" - -msgid "Sound card #2:" -msgstr "Hangkártya 2:" - -msgid "Sound card #3:" -msgstr "Hangkártya 3:" - -msgid "Sound card #4:" -msgstr "Hangkártya 4:" - -msgid "MIDI Out Device:" -msgstr "MIDI-kimenet:" - -msgid "MIDI In Device:" -msgstr "MIDI-bemenet:" - -msgid "Standalone MPU-401" -msgstr "Különálló MPU-401" - -msgid "Use FLOAT32 sound" -msgstr "FLOAT32 használata" - -msgid "FM synth driver" -msgstr "FM szintetizátor meghajtó" - -msgid "Nuked (more accurate)" -msgstr "Nuked (pontosabb)" - -msgid "YMFM (faster)" -msgstr "YMFM (gyorsabb)" - -msgid "COM1 Device:" -msgstr "COM1 eszköz:" - -msgid "COM2 Device:" -msgstr "COM2 eszköz:" - -msgid "COM3 Device:" -msgstr "COM3 eszköz:" - -msgid "COM4 Device:" -msgstr "COM4 eszköz:" - -msgid "LPT1 Device:" -msgstr "LPT1 eszköz:" - -msgid "LPT2 Device:" -msgstr "LPT2 eszköz:" - -msgid "LPT3 Device:" -msgstr "LPT3 eszköz:" - -msgid "LPT4 Device:" -msgstr "LPT4 eszköz:" - -msgid "Serial port 1" -msgstr "Soros port 1" - -msgid "Serial port 2" -msgstr "Soros port 2" - -msgid "Serial port 3" -msgstr "Soros port 3" - -msgid "Serial port 4" -msgstr "Soros port 4" - -msgid "Parallel port 1" -msgstr "Párhuzamos port 1" - -msgid "Parallel port 2" -msgstr "Párhuzamos port 2" - -msgid "Parallel port 3" -msgstr "Párhuzamos port 3" - -msgid "Parallel port 4" -msgstr "Párhuzamos port 4" - -msgid "HD Controller:" -msgstr "Merevl.-vezérlő:" - -msgid "FD Controller:" -msgstr "Floppy-vezérlő:" - -msgid "Tertiary IDE Controller" -msgstr "Harmadlagos IDE-vezérlő" - -msgid "Quaternary IDE Controller" -msgstr "Negyedleges IDE-vezérlő" - -msgid "SCSI" -msgstr "SCSI" - -msgid "Controller 1:" -msgstr "Gazdaadapt. 1:" - -msgid "Controller 2:" -msgstr "Gazdaadapt. 2:" - -msgid "Controller 3:" -msgstr "Gazdaadapt. 3:" - -msgid "Controller 4:" -msgstr "Gazdaadapt. 4:" - -msgid "Cassette" -msgstr "Magnókazetta" - -msgid "Hard disks:" -msgstr "Merevlemezek:" - -msgid "&New..." -msgstr "&Új..." - -msgid "&Existing..." -msgstr "&Megnyitás..." - -msgid "&Remove" -msgstr "&Eltávolítás" - -msgid "Bus:" -msgstr "Busz:" - -msgid "Channel:" -msgstr "Csatorna:" - -msgid "ID:" -msgstr "ID:" - -msgid "&Specify..." -msgstr "&Kiválasztás..." - -msgid "Sectors:" -msgstr "Szektor:" - -msgid "Heads:" -msgstr "Fej:" - -msgid "Cylinders:" -msgstr "Cilinder:" - -msgid "Size (MB):" -msgstr "Méret (MB):" - -msgid "Type:" -msgstr "Típus:" - -msgid "Image Format:" -msgstr "Formátum:" - -msgid "Block Size:" -msgstr "Blokkméret:" - -msgid "Floppy drives:" -msgstr "Floppy-meghajtók:" - -msgid "Turbo timings" -msgstr "Turbó időzítés" - -msgid "Check BPB" -msgstr "BPB ellenőrzés" - -msgid "CD-ROM drives:" -msgstr "CD-ROM meghajtók:" - -msgid "MO drives:" -msgstr "MO-meghajtók:" - -msgid "ZIP drives:" -msgstr "ZIP-meghajtók:" - -msgid "ZIP 250" -msgstr "ZIP 250" - -msgid "ISA RTC:" -msgstr "ISA RTC (óra):" - -msgid "ISA Memory Expansion" -msgstr "ISA memóriabővítők" - -msgid "Card 1:" -msgstr "Kártya 1:" - -msgid "Card 2:" -msgstr "Kártya 2:" - -msgid "Card 3:" -msgstr "Kártya 3:" - -msgid "Card 4:" -msgstr "Kártya 4:" - -msgid "ISABugger device" -msgstr "ISABugger eszköz" - -msgid "POST card" -msgstr "POST kártya" - -msgid "86Box" -msgstr "86Box" - -msgid "Error" -msgstr "Hiba" - -msgid "Fatal error" -msgstr "Végzetes hiba" - -msgid " - PAUSED" -msgstr " - SZÜNETELT" - -msgid "Speed" -msgstr "Sebesség" - -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" - -msgid "ZIP images" -msgstr "ZIP-lemezképek" - -msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." -msgstr "A 86Box nem talált használható ROM-képeket\n\nKérem töltse le a ROM készletet és bontsa ki a \"roms\" könyvtárba." - -msgid "(empty)" -msgstr "(üres)" - -msgid "All files" -msgstr "Minden fájl" - -msgid "Turbo" -msgstr "Turbó" - -msgid "On" -msgstr "Bekapcsolva" - -msgid "Off" -msgstr "Kikapcsolva" - -msgid "All images" -msgstr "Minden képfájl" - -msgid "Basic sector images" -msgstr "Alapvető szektor képfájlok" - -msgid "Surface images" -msgstr "Felületi képfájlok" - -msgid "Machine \"%hs\" is not available due to missing ROMs in the roms/machines directory. Switching to an available machine." -msgstr "A számítógép \"%hs\" nem elérhető a \"roms/machines\" mappából hiányzó ROM-képek miatt. Ehelyett egy másik gép kerül futtatásra." - -msgid "Video card \"%hs\" is not available due to missing ROMs in the roms/video directory. Switching to an available video card." -msgstr "A videokártya \"%hs\" nem elérhető a \"roms/video\" mappából hiányzó ROM-képek miatt. Ehelyett egy másik kártya kerül futtatásra." - -msgid "Video card #2 \"%hs\" is not available due to missing ROMs in the roms/video directory. Disabling the second video card." -msgstr "A videokártya 2 \"%hs\" nem elérhető a \"roms/video\" mappából hiányzó ROM-képek miatt. A második videokártya kerül letiltásra." - -msgid "Device \"%hs\" is not available due to missing ROMs. Ignoring the device." -msgstr "Az eszköz \"%hs\" nem elérhető a hiányzó ROM-képek miatt. Az eszköz figyelmen kívül marad." - -msgid "Machine" -msgstr "Számítógép" - -msgid "Display" -msgstr "Megjelenítő" - -msgid "Input devices" -msgstr "Beviteli eszközök" - -msgid "Sound" -msgstr "Hang" - -msgid "Network" -msgstr "Hálózat" - -msgid "Ports (COM & LPT)" -msgstr "Portok (COM és LPT)" - -msgid "Storage controllers" -msgstr "Tárolóvezérlők" - -msgid "Hard disks" -msgstr "Merevlemezek" - -msgid "Floppy & CD-ROM drives" -msgstr "Floppy és CD-ROM meghajtók" - -msgid "Other removable devices" -msgstr "Egyéb cserélhető tárolók" - -msgid "Other peripherals" -msgstr "Egyéb perifériák" - -msgid "Click to capture mouse" -msgstr "Kattintson az egér elfogásához" - -msgid "Press %1 to release mouse" -msgstr "Nyomja meg az %1-t az egér elengédéséhez" - -msgid "Press %1 or middle button to release mouse" -msgstr "Nyomja meg az %1-t vagy a középső gombot az egér elengédéséhez" - -msgid "Bus" -msgstr "Busz" - -msgid "File" -msgstr "Fájl" - -msgid "C" -msgstr "C" - -msgid "H" -msgstr "H" - -msgid "S" -msgstr "S" - -msgid "KB" -msgstr "KB" - -msgid "Default" -msgstr "Alapértelmezett" - -msgid "%1 Wait state(s)" -msgstr "%1 várakozási ciklus(ok)" - -msgid "Type" -msgstr "Típus" - -msgid "No PCap devices found" -msgstr "Nem találhatóak PCap eszközök" - -msgid "Invalid PCap device" -msgstr "Érvénytelen PCap eszköz" - -msgid "2-axis, 2-button joystick(s)" -msgstr "2-tengelyes, 2-gombos játékvezérlő(k)" - -msgid "2-axis, 4-button joystick" -msgstr "2-tengelyes, 4-gombos játékvezérlő" - -msgid "2-axis, 6-button joystick" -msgstr "2-tengelyes, 6-gombos játékvezérlő" - -msgid "2-axis, 8-button joystick" -msgstr "2-tengelyes, 8-gombos játékvezérlő" - -msgid "3-axis, 2-button joystick(s)" -msgstr "3-tengelyes, 2-gombos játékvezérlő(k)" - -msgid "3-axis, 4-button joystick" -msgstr "3-tengelyes, 4-gombos játékvezérlő" - -msgid "4-axis, 4-button joystick" -msgstr "4-tengelyes, 4-gombos játékvezérlő" - -msgid "CH Flightstick Pro" -msgstr "CH Flightstick Pro" - -msgid "Microsoft SideWinder Pad" -msgstr "Microsoft SideWinder Pad" - -msgid "Thrustmaster Flight Control System" -msgstr "Thrustmaster Flight Control System" - -msgid "None" -msgstr "Nincs" - -msgid "%1 MB (CHS: %2, %3, %4)" -msgstr "%1 MB (CHS: %2, %3, %4)" - -msgid "Floppy %1 (%2): %3" -msgstr "Floppy %1 (%2): %3" - -msgid "Advanced sector images" -msgstr "Továbbfejlesztett szektor képek" - -msgid "Flux images" -msgstr "Flux képekfájlok" - -msgid "Are you sure you want to hard reset the emulated machine?" -msgstr "Biztosan szeretné újraindítani az emulált gépet?" - -msgid "Are you sure you want to exit 86Box?" -msgstr "Biztos benne, hogy ki szeretne lépni a 86Box-ból?" - -msgid "Unable to initialize Ghostscript" -msgstr "Nem sikerült inicializálni a Ghostscript-et" - -msgid "Unable to initialize GhostPCL" -msgstr "Nem sikerült inicializálni a GhostPCL-et" - -msgid "MO %1 (%2): %3" -msgstr "MO %1 (%2): %3" - -msgid "MO images" -msgstr "MO-képfájlok" - -msgid "Welcome to 86Box!" -msgstr "Üdvözli önt az 86Box!" - -msgid "Internal device" -msgstr "Integrált eszköz" - -msgid "Exit" -msgstr "Kilépés" - -msgid "No ROMs found" -msgstr "Nem találhatóak meg a ROM-képek" - -msgid "Do you want to save the settings?" -msgstr "Szeretné menteni a beállításokat?" - -msgid "This will hard reset the emulated machine." -msgstr "Ezzel hardveresen újraindítja az emulált gépet." - -msgid "Save" -msgstr "Mentés" - -msgid "About 86Box" -msgstr "A 86Box névjegye" - -msgid "86Box v" -msgstr "86Box v" - -msgid "An emulator of old computers\n\nAuthors: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n\nWith previous core contributions from Sarah Walker, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information." -msgstr "Régi számítógépek emulátora\n\nFejlesztők: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n\nSarah Walker, leilei, JohnElliott, greatpsycho és mások korábbi alapvető hozzájárulásával.\n\nFordította: Laci bá'\n\nMegjelent a GNU General Public License v2 vagy újabb alatt. További információért lásd a LICENSE fájlt." - -msgid "Hardware not available" -msgstr "Hardver nem elérhető" - -msgid "Make sure %1 is installed and that you are on a %1-compatible network connection." -msgstr "Győződjön meg hogy a(z) %1 telepítve van és jelenleg a %1-kompatibilis kapcsolatot használja." - -msgid "Invalid configuration" -msgstr "Érvénytelen konfiguráció" - -msgid "%1 is required for automatic conversion of PostScript files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as PostScript (.ps) files." -msgstr "%1 szükséges a PostScript fájlok PDF formátumba való automatikus konvertálásához.\n\nAz általános PostScript nyomtatóra küldött dokumentumok PostScript (.ps) fájlként kerülnek mentésre." - -msgid "%1 is required for automatic conversion of PCL files to PDF.\n\nAny documents sent to the generic PCL printer will be saved as Printer Command Lnaugage (.pcl) files." -msgstr "%1 szükséges a PCL fájlok PDF formátumba való automatikus konvertálásához.\n\nAz általános PCL nyomtatóra küldött dokumentumok Printer Command Language (.pcl) fájlként kerülnek mentésre." - -msgid "Don't show this message again" -msgstr "Ne jelenítse meg újra ezt az üzenetet " - -msgid "Don't exit" -msgstr "Ne lépjen ki" - -msgid "Reset" -msgstr "Újraindítás" - -msgid "Don't reset" -msgstr "Ne indítsa újra" - -msgid "CD-ROM images" -msgstr "CD-ROM-képek" - -msgid "%1 Device Configuration" -msgstr "%1 eszközkonfiguráció" - -msgid "Monitor in sleep mode" -msgstr "Képernyő alvó módban" - -msgid "GLSL shaders" -msgstr "GLSL shaderek" - -msgid "You are loading an unsupported configuration" -msgstr "Egy nem támogatott konfigurációt tölt be" - -msgid "CPU type filtering based on selected machine is disabled for this emulated machine.\n\nThis makes it possible to choose a CPU that is otherwise incompatible with the selected machine. However, you may run into incompatibilities with the machine BIOS or other software.\n\nEnabling this setting is not officially supported and any bug reports filed may be closed as invalid." -msgstr "A kiválasztott gépen alapuló CPU-típusszűrés le van tiltva ezen az emulált gépen.\n\nEz lehetővé teszi olyan CPU kiválasztását, amely egyébként nem kompatibilis a kiválasztott géppel. Előfordulhat azonban, hogy nem kompatibilis a gép BIOS-ával vagy más szoftverekkel.\n\nA beállítás engedélyezése hivatalosan nem támogatott, és a benyújtott hibajelentéseket érvénytelenként lezárhatjuk." - -msgid "Continue" -msgstr "Folytatás" - -msgid "Cassette: %1" -msgstr "Magnókazetta: %1" - -msgid "Cassette images" -msgstr "Magnókazetta-képek" - -msgid "Cartridge %1: %2" -msgstr "ROM-kazetta %1: %2" - -msgid "Cartridge images" -msgstr "ROM-kazetta képek" - -msgid "Resume execution" -msgstr "Folytassa a végrehajtást" - -msgid "Pause execution" -msgstr "Kivitelezés szüneteltetése" - -msgid "Press Ctrl+Alt+Del" -msgstr "Nyomja meg a Ctrl+Alt+Del" - -msgid "Press Ctrl+Alt+Esc" -msgstr "Nyomja meg a Ctrl+Alt+Esc" - -msgid "Hard reset" -msgstr "Hardveres újraindítás" - -msgid "ACPI shutdown" -msgstr "ACPI leállítás" - -msgid "Hard disk (%1)" -msgstr "Merevlemez (%1)" - -msgid "MFM/RLL or ESDI CD-ROM drives never existed" -msgstr "MFM/RLL vagy ESDI CD-ROM meghajtók soha nem léteztek" - -msgid "Custom..." -msgstr "Egyéni..." - -msgid "Custom (large)..." -msgstr "Egyéni (nagy)..." - -msgid "Add New Hard Disk" -msgstr "Új merevlemez hozzáadása" - -msgid "Add Existing Hard Disk" -msgstr "Meglévő merevlemez hozzáadása" - -msgid "HDI disk images cannot be larger than 4 GB." -msgstr "A HDI lemezképek nem lehetnek nagyobbak 4 GB-nál." - -msgid "Disk images cannot be larger than 127 GB." -msgstr "A lemezképek mérete nem haladhatja meg a 127 GB-ot." - -msgid "Hard disk images" -msgstr "Merevlemez-képfájlok" - -msgid "Unable to read file" -msgstr "A fájl nem olvasható" - -msgid "Unable to write file" -msgstr "A fájl nem írható" - -msgid "HDI or HDX images with a sector size other than 512 are not supported." -msgstr "Az 512-től eltérő szektorméretű HDI vagy HDX képek nem támogatottak." - -msgid "Disk image file already exists" -msgstr "A lemezképfájl már létezik" - -msgid "Please specify a valid file name." -msgstr "Adjon meg egy érvényes fájlnevet." - -msgid "Disk image created" -msgstr "A lemezképfájl létrehozásra került" - -msgid "Make sure the file exists and is readable." -msgstr "Győződjön meg arról, hogy a fájl létezik és olvasható." - -msgid "Make sure the file is being saved to a writable directory." -msgstr "Győződjön meg arról, hogy a fájlt egy írható könyvtárba menti." - -msgid "Disk image too large" -msgstr "A lemezképfájl túl nagy" - -msgid "Remember to partition and format the newly-created drive." -msgstr "Ne felejtse el particionálni és formázni az újonnan létrehozott meghajtót." - -msgid "The selected file will be overwritten. Are you sure you want to use it?" -msgstr "A kiválasztott fájl felülírásra kerül. Biztos, hogy ezt kívánja használni?" - -msgid "Unsupported disk image" -msgstr "Nem támogatott lemezkép" - -msgid "Overwrite" -msgstr "Felülírás" - -msgid "Don't overwrite" -msgstr "Ne írja felül" - -msgid "Raw image" -msgstr "Nyers lemezkép" - -msgid "HDI image" -msgstr "HDI-lemezkép" - -msgid "HDX image" -msgstr "HDX-lemezkép" - -msgid "Fixed-size VHD" -msgstr "Rögzített méretű VHD" - -msgid "Dynamic-size VHD" -msgstr "Dinamikusan bővülő VHD" - -msgid "Differencing VHD" -msgstr "Különbség-VHD" - -msgid "(N/A)" -msgstr "(Nincs)" - -msgid "Raw image (.img)" -msgstr "Nyers lemezkép (.img)" - -msgid "HDI image (.hdi)" -msgstr "HDI-lemezkép (.hdi)" - -msgid "HDX image (.hdx)" -msgstr "HDX-lemezkép (.hdx)" - -msgid "Fixed-size VHD (.vhd)" -msgstr "Rögzített méretű VHD (.vhd)" - -msgid "Dynamic-size VHD (.vhd)" -msgstr "Dinamikusan bővülő VHD (.vhd)" - -msgid "Differencing VHD (.vhd)" -msgstr "Különbség-VHD (.vhd)" - -msgid "Large blocks (2 MB)" -msgstr "Nagy blokkméret (2 MB)" - -msgid "Small blocks (512 KB)" -msgstr "Kis blokkméret (512 KB)" - -msgid "VHD files" -msgstr "VHD fájlok" - -msgid "Select the parent VHD" -msgstr "Válassza ki a szülő VHD-t" - -msgid "This could mean that the parent image was modified after the differencing image was created.\n\nIt can also happen if the image files were moved or copied, or by a bug in the program that created this disk.\n\nDo you want to fix the timestamps?" -msgstr "Ez azt jelentheti, hogy a szülőkép módosult az eltérő kép létrehozása után.\n\nEz akkor is előfordulhat, ha a képfájlokat áthelyezték vagy másolták, vagy a lemezt létrehozó program hibája miatt.\n\nSzeretné kijavítani az időbélyegeket?" - -msgid "Parent and child disk timestamps do not match" -msgstr "A szülő- és a gyermeklemez időbélyegei nem egyeznek" - -msgid "Could not fix VHD timestamp." -msgstr "Nem sikerült kijavítani a VHD időbélyegét." - -msgid "MFM/RLL" -msgstr "MFM/RLL" - -msgid "XTA" -msgstr "XTA" - -msgid "ESDI" -msgstr "ESDI" - -msgid "IDE" -msgstr "IDE" - -msgid "ATAPI" -msgstr "ATAPI" - -msgid "CD-ROM %1 (%2): %3" -msgstr "CD-ROM %1 (%2): %3" - -msgid "160 KB" -msgstr "160 KB" - -msgid "180 KB" -msgstr "180 KB" - -msgid "320 KB" -msgstr "320 KB" - -msgid "360 KB" -msgstr "360 KB" - -msgid "640 KB" -msgstr "640 KB" - -msgid "720 KB" -msgstr "720 KB" - -msgid "1.2 MB" -msgstr "1.2 MB" - -msgid "1.25 MB" -msgstr "1.25 MB" - -msgid "1.44 MB" -msgstr "1.44 MB" - -msgid "DMF (cluster 1024)" -msgstr "DMF (1024 klaszter)" - -msgid "DMF (cluster 2048)" -msgstr "DMF (2048 klaszter)" - -msgid "2.88 MB" -msgstr "2.88 MB" - -msgid "ZIP 100" -msgstr "ZIP 100" - -msgid "3.5\" 128 MB (ISO 10090)" -msgstr "3.5\" 128 MB (ISO 10090)" - -msgid "3.5\" 230 MB (ISO 13963)" -msgstr "3.5\" 230 MB (ISO 13963)" - -msgid "3.5\" 540 MB (ISO 15498)" -msgstr "3.5\" 540 MB (ISO 15498)" - -msgid "3.5\" 640 MB (ISO 15498)" -msgstr "3.5\" 640 MB (ISO 15498)" - -msgid "3.5\" 1.3 GB (GigaMO)" -msgstr "3.5\" 1.3 GB (GigaMO)" - -msgid "3.5\" 2.3 GB (GigaMO 2)" -msgstr "3.5\" 2.3 GB (GigaMO 2)" - -msgid "5.25\" 600 MB" -msgstr "5.25\" 600 MB" - -msgid "5.25\" 650 MB" -msgstr "5.25\" 650 MB" - -msgid "5.25\" 1 GB" -msgstr "5.25\" 1 GB" - -msgid "5.25\" 1.3 GB" -msgstr "5.25\" 1.3 GB" - -msgid "Perfect RPM" -msgstr "Tökéletes RPM" - -msgid "1% below perfect RPM" -msgstr "1%-kal a tökéletes RPM alatt" - -msgid "1.5% below perfect RPM" -msgstr "1.5%-kal a tökéletes RPM alatt" - -msgid "2% below perfect RPM" -msgstr "2%-kal a tökéletes RPM alatt" - -msgid "(System Default)" -msgstr "(A rendszer nyelve)" - -msgid "Failed to initialize network driver" -msgstr "Nem sikerült inicializálni a hálózati illesztőprogramot" - -msgid "The network configuration will be switched to the null driver" -msgstr "A hálózati konfiguráció átvált a null illesztőprogramra" - -msgid "Mouse sensitivity:" -msgstr "Egér érzékenység:" - -msgid "Select media images from program working directory" -msgstr "Médiaképek kiválasztása a program munkakönyvtárából" - -msgid "PIT mode:" -msgstr "PIT üzemmód:" - -msgid "Auto" -msgstr "Automatikus" - -msgid "Slow" -msgstr "Lassú" - -msgid "Fast" -msgstr "Gyors" - -msgid "&Auto-pause on focus loss" -msgstr "&Automatikus szünet fókuszvesztéskor" - -msgid "WinBox is no longer supported" -msgstr "A WinBox már nem támogatott" - -msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." -msgstr "A WinBox menedzser fejlesztése 2022-ben leállt karbantartók hiányában. Mivel erőfeszítéseinket a 86Box még jobbá tételére irányítjuk, úgy döntöttünk, hogy a WinBox-ot mint menedzsert nem támogatjuk tovább.\n\nA WinBoxon keresztül nem lesznek további frissítések, és hibás viselkedéssel találkozhat, ha továbbra is a 86Box újabb verzióival használja. A WinBox viselkedésével kapcsolatos hibajelentéseket érvénytelennek nyilvánítjuk.\n\nA 86box.net oldalon talál egy listát más kezelőkről, amelyeket használhat." - -msgid "Generate" -msgstr "Generálja" - -msgid "Joystick configuration" -msgstr "Joystick konfiguráció" - -msgid "Device" -msgstr "Eszköz" - -msgid "%1 (X axis)" -msgstr "%1 (X tengely)" - -msgid "%1 (Y axis)" -msgstr "%1 (Y tengely)" - -msgid "MCA devices" -msgstr "MCA eszközök" - -msgid "List of MCA devices:" -msgstr "Az MCA-eszközök listája:" - -msgid "Tablet tool" -msgstr "Tablet eszköz" - -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" - -msgid "About Qt" -msgstr "A Qt-ről" - -msgid "MCA devices..." -msgstr "MCA eszközök..." - -msgid "Show non-primary monitors" -msgstr "Nem elsődleges monitorok megjelenítése" - -msgid "Open screenshots folder..." -msgstr "Nyissa meg a képernyőképek mappát..." - -msgid "Apply fullscreen stretch mode when maximized" -msgstr "Teljes képernyős méretezés alkalmazása maximalizáláskor" - -msgid "Cursor/Puck" -msgstr "Cursor/Puck" - -msgid "Pen" -msgstr "Toll" - -msgid "Host CD/DVD Drive (%1:)" -msgstr "Gazdag CD/DVD-meghajtó (%1:)" - -msgid "&Connected" -msgstr "" - -msgid "Clear image history" -msgstr "Törölje a kép előzményeit" - -msgid "Create..." -msgstr "Hozzon létre..." - -msgid "Host CD/DVD Drive (%1)" -msgstr "Gazdag CD/DVD-meghajtó (%1)" - -msgid "Unknown Bus" -msgstr "Ismeretlen busz" - -msgid "Null Driver" -msgstr "Null Driver" - -msgid "NIC %1 (%2) %3" -msgstr "NIC %1 (%2) %3" - -msgid "Render behavior" -msgstr "Renderelési viselkedés" - -msgid "Use target framerate:" -msgstr "Cél képkockasebesség használata:" - -msgid " fps" -msgstr " fps" - -msgid "VSync" -msgstr "VSync" - -msgid "Synchronize with video" -msgstr "Szinkronizálás a videóval" - -msgid "Shaders" -msgstr "Shaderek" - -msgid "Remove" -msgstr "Távolítsa el a" - -msgid "Browse..." -msgstr "Böngésszen..." - -msgid "Couldn't create OpenGL context." -msgstr "Nem sikerült OpenGL-kontextust létrehozni." - -msgid "Couldn't switch to OpenGL context." -msgstr "Nem tudott OpenGL-kontextusra váltani." - -msgid "OpenGL version 3.0 or greater is required. Current version is %1.%2" -msgstr "Az OpenGL 3.0 vagy magasabb verziója szükséges. Az aktuális verzió %1.%2" - -msgid "Error initializing OpenGL" -msgstr "Hiba az OpenGL inicializálásában" - -msgid "\nFalling back to software rendering." -msgstr "\nVisszatérés a szoftveres rendereléshez." - -msgid "

When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.

" -msgstr "

A médiaképek (CD-ROM, floppy stb.) kiválasztásakor a megnyitási párbeszédpanel ugyanabban a könyvtárban indul, mint a 86Box konfigurációs fájl. Ez a beállítás valószínűleg csak a macOS rendszerben jelent különbséget.

" - -msgid "This machine might have been moved or copied." -msgstr "Lehet, hogy ezt a gépet áthelyezték vagy lemásolták." - -msgid "In order to ensure proper networking functionality, 86Box needs to know if this machine was moved or copied.\n\nSelect \"I Copied It\" if you are not sure." -msgstr "A megfelelő hálózati működés biztosítása érdekében a 86Box-nak tudnia kell, hogy a gépet áthelyezték vagy másolták-e.\n\nVálassza a \"Lemásoltam\" lehetőséget, ha nem biztos benne." - -msgid "I Moved It" -msgstr "Elmozdítottam" - -msgid "I Copied It" -msgstr "Lemásoltam" - -msgid "86Box Monitor #" -msgstr "86Box Monitor " - -msgid "No MCA devices." -msgstr "Nincsenek MCA eszközök." - -msgid "MiB" -msgstr "MiB" - -msgid "Network Card #1" -msgstr "Hálózati kártya 1" - -msgid "Network Card #2" -msgstr "Hálózati kártya 2" - -msgid "Network Card #3" -msgstr "Hálózati kártya 3" - -msgid "Network Card #4" -msgstr "Hálózati kártya 4" - -msgid "Mode:" -msgstr "Mód:" - -msgid "Interface:" -msgstr "Interfész:" - -msgid "Adapter:" -msgstr "Adapter:" - -msgid "VDE Socket:" -msgstr "VDE aljzat:" - -msgid "86Box Unit Tester" -msgstr "86Box Unit Tester" - -msgid "Novell NetWare 2.x Key Card" -msgstr "Novell NetWare 2.x kulcskártya" - -msgid "Serial port passthrough 1" -msgstr "Soros port áthaladás 1" - -msgid "Serial port passthrough 2" -msgstr "Soros port áthaladás 2" - -msgid "Serial port passthrough 3" -msgstr "Soros port áthaladás 3" - -msgid "Serial port passthrough 4" -msgstr "Soros port áthaladás 4" - -msgid "Renderer options..." -msgstr "Renderer opciók..." - -msgid "Logitech/Microsoft Bus Mouse" -msgstr "Logitech/Microsoft busz egér" - -msgid "Microsoft Bus Mouse (InPort)" -msgstr "Microsoft buszos egér (InPort)" - -msgid "Mouse Systems Serial Mouse" -msgstr "Egérrendszerek Soros egér" - -msgid "Microsoft Serial Mouse" -msgstr "Microsoft soros egér" - -msgid "Logitech Serial Mouse" -msgstr "Logitech soros egér" - -msgid "PS/2 Mouse" -msgstr "PS/2 egér" - -msgid "3M MicroTouch (Serial)" -msgstr "3M MicroTouch (soros)" - -msgid "[COM] Standard Hayes-compliant Modem" -msgstr "[COM] Szabványos Hayes-kompatibilis modem" - -msgid "Roland MT-32 Emulation" -msgstr "Roland MT-32 emuláció" - -msgid "Roland MT-32 (New) Emulation" -msgstr "Roland MT-32 (Új) Emuláció" - -msgid "Roland CM-32L Emulation" -msgstr "Roland CM-32L emuláció" - -msgid "Roland CM-32LN Emulation" -msgstr "Roland CM-32LN emuláció" - -msgid "OPL4-ML Daughterboard" -msgstr "OPL4-ML alaplap" - -msgid "System MIDI" -msgstr "Rendszer MIDI" - -msgid "MIDI Input Device" -msgstr "MIDI bemeneti eszköz" - -msgid "BIOS Address" -msgstr "BIOS cím" - -msgid "Enable BIOS extension ROM Writes" -msgstr "BIOS bővítés ROM írások engedélyezése" - -msgid "Address" -msgstr "Cím:" - -msgid "IRQ" -msgstr "IRQ" - -msgid "BIOS Revision" -msgstr "BIOS felülvizsgálata" - -msgid "Translate 26 -> 17" -msgstr "Fordítsd le 26 -> 17" - -msgid "Language" -msgstr "Nyelv" - -msgid "Enable backlight" -msgstr "Háttérvilágítás engedélyezése" - -msgid "Invert colors" -msgstr "Invertált színek" - -msgid "BIOS size" -msgstr "BIOS mérete" - -msgid "Map C0000-C7FFF as UMB" -msgstr "C0000-C7FFF mint UMB leképezése" - -msgid "Map C8000-CFFFF as UMB" -msgstr "C8000-CFFFF mint UMB leképezése" - -msgid "Map D0000-D7FFF as UMB" -msgstr "D0000-D7FFF mint UMB leképezése" - -msgid "Map D8000-DFFFF as UMB" -msgstr "D8000-DFFFF mint UMB leképezése" - -msgid "Map E0000-E7FFF as UMB" -msgstr "E0000-E7FFF mint UMB leképezése" - -msgid "Map E8000-EFFFF as UMB" -msgstr "E8000-EFFFF mint UMB leképezése" - -msgid "JS9 Jumper (JIM)" -msgstr "JS9 Jumper (JIM)" - -msgid "MIDI Output Device" -msgstr "MIDI kimeneti eszköz" - -msgid "MIDI Real time" -msgstr "MIDI valós időben" - -msgid "MIDI Thru" -msgstr "A MIDI bemenet átmenete" - -msgid "MIDI Clockout" -msgstr "A MIDI óra kimenete" - -msgid "SoundFont" -msgstr "SoundFont" - -msgid "Output Gain" -msgstr "Kimeneti erősítés" - -msgid "Chorus" -msgstr "Kórus" - -msgid "Chorus Voices" -msgstr "Kórus hangok" - -msgid "Chorus Level" -msgstr "Kórus szint" - -msgid "Chorus Speed" -msgstr "Kórus sebesség" - -msgid "Chorus Depth" -msgstr "Kórus mélység" - -msgid "Chorus Waveform" -msgstr "Kórus hullámforma" - -msgid "Reverb" -msgstr "Visszhang" - -msgid "Reverb Room Size" -msgstr "Visszhangterem mérete" - -msgid "Reverb Damping" -msgstr "Visszhang csillapítás" - -msgid "Reverb Width" -msgstr "Visszhang szélessége" - -msgid "Reverb Level" -msgstr "Visszhang szint" - -msgid "Interpolation Method" -msgstr "Interpolációs módszer" - -msgid "Reverb Output Gain" -msgstr "Visszhang kimenetének erősítése" - -msgid "Reversed stereo" -msgstr "Fordított sztereó" - -msgid "Nice ramp" -msgstr "Szép rámpa" - -msgid "Hz" -msgstr "Hz" - -msgid "Buttons" -msgstr "Gombok" - -msgid "Serial Port" -msgstr "Soros port" - -msgid "RTS toggle" -msgstr "RTS kapcsoló" - -msgid "Revision" -msgstr "Felülvizsgálat" - -msgid "Controller" -msgstr "Vezérlő" - -msgid "Show Crosshair" -msgstr "Keresztmetszet megjelenítése" - -msgid "DMA" -msgstr "DMA" - -msgid "MAC Address" -msgstr "MAC cím" - -msgid "MAC Address OUI" -msgstr "MAC cím OUI" - -msgid "Enable BIOS" -msgstr "BIOS engedélyezése" - -msgid "Baud Rate" -msgstr "Baud-ráta" - -msgid "TCP/IP listening port" -msgstr "TCP/IP figyelő port" - -msgid "Phonebook File" -msgstr "Telefonkönyv fájl" - -msgid "Telnet emulation" -msgstr "Telnet emuláció" - -msgid "RAM Address" -msgstr "RAM cím" - -msgid "RAM size" -msgstr "RAM mérete" - -msgid "Initial RAM size" -msgstr "RAM kezdeti mérete" - -msgid "Serial Number" -msgstr "Sorszám" - -msgid "Host ID" -msgstr "Host azonosító" - -msgid "FDC Address" -msgstr "FDC cím" - -msgid "MPU-401 Address" -msgstr "MPU-401 cím" - -msgid "MPU-401 IRQ" -msgstr "MPU-401 IRQ" - -msgid "Receive MIDI input" -msgstr "MIDI bemenet fogadása" - -msgid "Low DMA" -msgstr "Alacsony DMA" - -msgid "Enable Game port" -msgstr "Játékport engedélyezése" - -msgid "Surround module" -msgstr "Surround modul" - -msgid "CODEC" -msgstr "CODEC" - -msgid "Raise CODEC interrupt on CODEC setup (needed by some drivers)" -msgstr "CODEC megszakítás felemelése CODEC beállításakor (néhány illesztőprogramnak szükséges)" - -msgid "SB Address" -msgstr "SB cím" - -msgid "WSS IRQ" -msgstr "WSS IRQ" - -msgid "WSS DMA" -msgstr "WSS DMA" - -msgid "Enable OPL" -msgstr "OPL engedélyezése" - -msgid "Receive MIDI input (MPU-401)" -msgstr "MIDI bemenet fogadása (MPU-401)" - -msgid "SB low DMA" -msgstr "SB alacsony DMA" - -msgid "6CH variant (6-channel)" -msgstr "6CH változat (6 csatornás)" - -msgid "Enable CMS" -msgstr "CMS engedélyezése" - -msgid "Mixer" -msgstr "Keverő" - -msgid "High DMA" -msgstr "Magas DMA" - -msgid "Control PC speaker" -msgstr "Control PC hangszóró" - -msgid "Memory size" -msgstr "Memória mérete" - -msgid "EMU8000 Address" -msgstr "EMU8000 cím" - -msgid "IDE Controller" -msgstr "IDE vezérlő" - -msgid "Codec" -msgstr "Codec" - -msgid "GUS type" -msgstr "GUS típus" - -msgid "Enable 0x04 \"Exit 86Box\" command" -msgstr "A 0x04 parancs engedélyezése \"Lépni a 86Box-ból\"" - -msgid "Display type" -msgstr "Megjelenítés típusa" - -msgid "Composite type" -msgstr "Összetett típus" - -msgid "RGB type" -msgstr "RGB típus" - -msgid "Line doubling type" -msgstr "Vonal megduplázásának típusa" - -msgid "Snow emulation" -msgstr "Hó emulációja" - -msgid "Monitor type" -msgstr "Monitor típusa" - -msgid "Character set" -msgstr "Karakterkészlet" - -msgid "XGA type" -msgstr "XGA típus" - -msgid "Instance" -msgstr "Példa" - -msgid "MMIO Address" -msgstr "MMIO cím" - -msgid "RAMDAC type" -msgstr "RAMDAC típus" - -msgid "Blend" -msgstr "Blend" - -msgid "Bilinear filtering" -msgstr "Bilineáris szűrés" - -msgid "Dithering" -msgstr "Dithering" - -msgid "Enable NMI for CGA emulation" -msgstr "NMI engedélyezése a CGA emulációhoz" - -msgid "Voodoo type" -msgstr "Voodoo típus" - -msgid "Framebuffer memory size" -msgstr "A keretpuffer memória mérete" - -msgid "Texture memory size" -msgstr "Textúra memória mérete" - -msgid "Dither subtraction" -msgstr "Dither kivonás" - -msgid "Screen Filter" -msgstr "Szűrő szűrő" - -msgid "Render threads" -msgstr "Renderelési szálak" - -msgid "SLI" -msgstr "SLI" - -msgid "Start Address" -msgstr "Kezdeti cím" - -msgid "Contiguous Size" -msgstr "Összefüggő méret" - -msgid "I/O Width" -msgstr "I/O szélesség" - -msgid "Transfer Speed" -msgstr "Átviteli sebesség" - -msgid "EMS mode" -msgstr "EMS üzemmód" - -msgid "Address for > 2 MB" -msgstr "Cím > 2 MB" - -msgid "Frame Address" -msgstr "Keret címe" - -msgid "USA" -msgstr "USA" - -msgid "Danish" -msgstr "Dán" - -msgid "Always at selected speed" -msgstr "Mindig a kiválasztott sebességen" - -msgid "BIOS setting + Hotkeys (off during POST)" -msgstr "BIOS beállítás + gyorsbillentyűk (kikapcsolva POST alatt)" - -msgid "64 kB starting from F0000" -msgstr "64 kB F0000-től kezdődően" - -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB E0000-től kezdődően (cím MSB invertálva, először az utolsó 64KB)" - -msgid "Sine" -msgstr "Szinuszos" - -msgid "Triangle" -msgstr "Háromszög" - -msgid "Linear" -msgstr "Lineáris" - -msgid "4th Order" -msgstr "4. rendű" - -msgid "7th Order" -msgstr "7. rendű" - -msgid "Non-timed (original)" -msgstr "Időzítő nélkül (eredeti)" - -msgid "45 Hz (JMP2 not populated)" -msgstr "45 Hz (nincs jumper a JMP2-nél)" - -msgid "Two" -msgstr "Két" - -msgid "Three" -msgstr "Három" - -msgid "Wheel" -msgstr "Kerék" - -msgid "Five + Wheel" -msgstr "Öt + kerék" - -msgid "Five + 2 Wheels" -msgstr "" - -msgid "A3 - SMT2 Serial / SMT3(R)V" -msgstr "A3 - SMT2 soros / SMT3(R)V" - -msgid "Q1 - SMT3(R) Serial" -msgstr "Q1 - SMT3(R) soros" - -msgid "8 KB" -msgstr "8 KB" - -msgid "32 KB" -msgstr "32 KB" - -msgid "16 KB" -msgstr "16 KB" - -msgid "64 KB" -msgstr "64 KB" - -msgid "Disable BIOS" -msgstr "BIOS letiltása" - -msgid "512 KB" -msgstr "512 KB" - -msgid "2 MB" -msgstr "2 MB" - -msgid "8 MB" -msgstr "8 MB" - -msgid "28 MB" -msgstr "28 MB" - -msgid "1 MB" -msgstr "1 MB" - -msgid "4 MB" -msgstr "4 MB" - -msgid "12 MB" -msgstr "12 MB" - -msgid "16 MB" -msgstr "16 MB" - -msgid "20 MB" -msgstr "20 MB" - -msgid "24 MB" -msgstr "24 MB" - -msgid "SigmaTel STAC9721T (stereo)" -msgstr "SigmaTel STAC9721T (sztereó)" - -msgid "Classic" -msgstr "Klasszikus" - -msgid "256 KB" -msgstr "256 KB" - -msgid "Composite" -msgstr "Összetett" - -msgid "Old" -msgstr "Régi" - -msgid "New" -msgstr "Új" - -msgid "Color (generic)" -msgstr "Szín (általános)" - -msgid "Green Monochrome" -msgstr "Zöld monokróm" - -msgid "Amber Monochrome" -msgstr "Sárga monokróm" - -msgid "Gray Monochrome" -msgstr "Szürke monokróm" - -msgid "Color (no brown)" -msgstr "Szín (nem barna)" - -msgid "Color (IBM 5153)" -msgstr "Színes (IBM 5153)" - -msgid "Simple doubling" -msgstr "Egyszerű duplázás" - -msgid "sRGB interpolation" -msgstr "sRGB interpoláció" - -msgid "Linear interpolation" -msgstr "Lineáris interpoláció" - -msgid "128 KB" -msgstr "128 KB" - -msgid "Monochrome (5151/MDA) (white)" -msgstr "Monokróm (5151/MDA) (fehér)" - -msgid "Monochrome (5151/MDA) (green)" -msgstr "Monokróm (5151/MDA) (zöld)" - -msgid "Monochrome (5151/MDA) (amber)" -msgstr "Monokróm (5151/MDA) (sárga)" - -msgid "Color 40x25 (5153/CGA)" -msgstr "Színes 40x25 (5153/CGA)" - -msgid "Color 80x25 (5153/CGA)" -msgstr "Színes 80x25 (5153/CGA)" - -msgid "Enhanced Color - Normal Mode (5154/ECD)" -msgstr "Fokozott szín - normál üzemmód (5154/ECD)" - -msgid "Enhanced Color - Enhanced Mode (5154/ECD)" -msgstr "Továbbfejlesztett szín - továbbfejlesztett üzemmód (5154/ECD)" - -msgid "Green" -msgstr "Zöld" - -msgid "Amber" -msgstr "Sárga" - -msgid "Gray" -msgstr "Szürke" - -msgid "Color" -msgstr "Színes" - -msgid "U.S. English" -msgstr "Amerikai angol" - -msgid "Scandinavian" -msgstr "Skandináv" - -msgid "Other languages" -msgstr "Egyéb nyelvek" - -msgid "Bochs latest" -msgstr "Bochs legújabb" - -msgid "Mono Non-Interlaced" -msgstr "Monokróm nem átlapolt" - -msgid "Color Interlaced" -msgstr "Színes átlapolt" - -msgid "Color Non-Interlaced" -msgstr "Színes nem átlapolt" - -msgid "3Dfx Voodoo Graphics" -msgstr "3dfx Voodoo-gyorsítókártya" - -msgid "Obsidian SB50 + Amethyst (2 TMUs)" -msgstr "Obsidian SB50 + Amethyst (2 TMU)" - -msgid "8-bit" -msgstr "8 bites" - -msgid "16-bit" -msgstr "16 bites" - -msgid "Standard (150ns)" -msgstr "Standard (150ns)" - -msgid "High-Speed (120ns)" -msgstr "Nagy sebességű (120ns)" - -msgid "Enabled" -msgstr "Engedélyezve" - -msgid "Standard" -msgstr "Standard" - -msgid "High-Speed" -msgstr "Nagy sebességű" - -msgid "Stereo LPT DAC" -msgstr "Sztereó LPT DAC" - -msgid "Generic Text Printer" -msgstr "Általános szövegnyomtató" - -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Általános ESC/P pontmátrixnyomtató" - -msgid "Generic PostScript Printer" -msgstr "Általános PostScript nyomtató" - -msgid "Generic PCL5e Printer" -msgstr "Általános PCL5e nyomtató" - -msgid "Parallel Line Internet Protocol" -msgstr "Párhuzamos vonalas internetprotokoll" - -msgid "Protection Dongle for Savage Quest" -msgstr "Védelmi dongle a Savage Questhez" - -msgid "Serial Passthrough Device" -msgstr "Soros port áthaladó eszköz" - -msgid "Passthrough Mode" -msgstr "Áthaladó mód" - -msgid "Host Serial Device" -msgstr "Host soros eszköz" - -msgid "Name of pipe" -msgstr "A cső neve" - -msgid "Data bits" -msgstr "Adat bitek" - -msgid "Stop bits" -msgstr "Stop bitek" - -msgid "Baud Rate of Passthrough" -msgstr "Az átmenő átviteli sebesség Baud-rátája" - -msgid "Named Pipe (Server)" -msgstr "Megnevezett cső (kiszolgáló)" - -msgid "Host Serial Passthrough" -msgstr "Az állomás soros portjának áthaladása" - -msgid "E&ject %1" -msgstr "%1 &kiadás" - -msgid "&Unmute" -msgstr "&Hang újra bekapcsolása" - -msgid "Softfloat FPU" -msgstr "Softfloat FPU" - -msgid "High performance impact" -msgstr "Nagy hatással van a teljesítményre" - -msgid "[Generic] RAM Disk (max. speed)" -msgstr "[Generic] RAM lemez (max. sebesség)" - -msgid "[Generic] 1989 (3500 RPM)" -msgstr "" - -msgid "[Generic] 1992 (3600 RPM)" -msgstr "" - -msgid "[Generic] 1994 (4500 RPM)" -msgstr "" - -msgid "[Generic] 1996 (5400 RPM)" -msgstr "" - -msgid "[Generic] 1997 (5400 RPM)" -msgstr "" - -msgid "[Generic] 1998 (5400 RPM)" -msgstr "" - -msgid "[Generic] 2000 (7200 RPM)" -msgstr "" - -msgid "IBM 8514/A clone (ISA)" -msgstr "IBM 8514/A klón (ISA)" - -msgid "Vendor" -msgstr "Gyártó" - -msgid "Generic PC/XT Memory Expansion" -msgstr "Általános PC/XT memóriabővítők" - -msgid "Generic PC/AT Memory Expansion" -msgstr "Általános PC/AT memóriabővítők" - -msgid "Unable to find Dot-Matrix fonts" -msgstr "Nem találja a Dot-Matrix betűtípusokat" - -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "Az általános ESC/P pontmátrixnyomtató emulációjához a \"roms/printer/fonts\" könyvtárban található TrueType betűtípusok szükségesek." - -msgid "Inhibit multimedia keys" -msgstr "" - -msgid "Ask for confirmation before saving settings" -msgstr "" - -msgid "Ask for confirmation before hard resetting" -msgstr "" - -msgid "Ask for confirmation before quitting" -msgstr "" - -msgid "Options" -msgstr "" - -msgid "Model" -msgstr "" - -msgid "Model:" -msgstr "" - -msgid "Failed to initialize Vulkan renderer." -msgstr "" - -msgid "GLSL Error" -msgstr "" - -msgid "Could not load shader: %1" -msgstr "" - -msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" -msgstr "" - -msgid "Could not load texture: %1" -msgstr "" - -msgid "Could not compile shader:\n\n%1" -msgstr "" - -msgid "Program not linked:\n\n%1" -msgstr "" - -msgid "Shader Manager" -msgstr "" - -msgid "Shader Configuration" -msgstr "" - -msgid "Add" -msgstr "" - -msgid "Move up" -msgstr "" - -msgid "Move down" -msgstr "" - -msgid "Could not load file %1" -msgstr "" diff --git a/src/qt/languages/it-IT.po b/src/qt/languages/it-IT.po index 877032c85..43fe84461 100644 --- a/src/qt/languages/it-IT.po +++ b/src/qt/languages/it-IT.po @@ -13,13 +13,13 @@ msgid "&Keyboard requires capture" msgstr "&Tastiera richiede la cattura" msgid "&Right CTRL is left ALT" -msgstr "&CTRL destro è ALT sinistro" +msgstr "CTRL &destro è ALT sinistro" msgid "&Hard Reset..." msgstr "&Riavvia..." msgid "&Ctrl+Alt+Del" -msgstr "&Ctrl+Alt+Del" +msgstr "&Ctrl+Alt+Canc" msgid "Ctrl+Alt+&Esc" msgstr "Ctrl+Alt+&Esc" @@ -27,14 +27,20 @@ msgstr "Ctrl+Alt+&Esc" msgid "&Pause" msgstr "&Pausa" -msgid "E&xit..." -msgstr "E&sci..." +msgid "Pause" +msgstr "Pausa" + +msgid "Re&sume" +msgstr "R&iprendi" + +msgid "E&xit" +msgstr "E&sci" msgid "&View" msgstr "&Visualizza" msgid "&Hide status bar" -msgstr "&Nascondi barra di stato" +msgstr "Nascondi ba&rra di stato" msgid "Hide &toolbar" msgstr "Nascondi &barra degli strumenti" @@ -46,37 +52,34 @@ msgid "R&emember size && position" msgstr "R&icorda dimensioni e posizione" msgid "Re&nderer" -msgstr "Re&nderer" +msgstr "Re&nderizzatore" msgid "&Qt (Software)" msgstr "&Qt (Software)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" msgstr "Open&GL (3.0 Core)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." -msgstr "Specifica dimensioni..." +msgid "Specify &dimensions..." +msgstr "Specifica dim&ensioni..." -msgid "F&orce 4:3 display ratio" -msgstr "F&orza display 4:3" +msgid "Force &4:3 display ratio" +msgstr "Forza rapporto d'aspetto &4:3" msgid "&Window scale factor" -msgstr "&Fattore scalare della finestra" +msgstr "Fa&ttore di scala della finestra" msgid "&0.5x" -msgstr "&0.5x" +msgstr "&0,5x" msgid "&1x" msgstr "&1x" msgid "1.&5x" -msgstr "1.&5x" +msgstr "1,&5x" msgid "&2x" msgstr "&2x" @@ -99,11 +102,11 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" -msgstr "Metodo filtro" +msgid "Fi<er method" +msgstr "Metodo fi<ro" msgid "&Nearest" -msgstr "&Dal più vicino" +msgstr "&Più vicino" msgid "&Linear" msgstr "&Lineare" @@ -115,7 +118,7 @@ msgid "&Fullscreen" msgstr "&Schermo intero" msgid "Fullscreen &stretch mode" -msgstr "Modalità adattamento &schermo intero" +msgstr "Modalità &adattamento schermo intero" msgid "&Full screen stretch" msgstr "&Adatta a schermo intero" @@ -124,7 +127,7 @@ msgid "&4:3" msgstr "&4:3" msgid "&Square pixels (Keep ratio)" -msgstr "&Pixel quadrati (mantiene l'aspetto)" +msgstr "&Pixel quadrati (mantieni proporzioni)" msgid "&Integer scale" msgstr "&Scala intera" @@ -132,32 +135,38 @@ msgstr "&Scala intera" msgid "4:&3 Integer scale" msgstr "Scala intera 4:&3" -msgid "E&GA/(S)VGA settings" -msgstr "Impostazioni E&GA/(S)VGA" +msgid "EGA/(S)&VGA settings" +msgstr "Impostazioni EGA/(S)&VGA" msgid "&Inverted VGA monitor" -msgstr "&Invertire monitor VGA" +msgstr "&Monitor VGA invertito" msgid "VGA screen &type" -msgstr "Schermi VGA &" +msgstr "Schermi &VGA" msgid "RGB &Color" -msgstr "RGB &Color" +msgstr "RGB a &Colori" + +msgid "RGB (no brown)" +msgstr "RGB (senza marrone)" msgid "&RGB Grayscale" -msgstr "&RGB Monocroma" +msgstr "&RGB a Scala di grigi" + +msgid "Generic RGBI color monitor" +msgstr "Monitor a colori RGBI generico" msgid "&Amber monitor" -msgstr "&Monitor ambra" +msgstr "Monitor &ambra" msgid "&Green monitor" -msgstr "&Monitor verde" +msgstr "Monitor &verde" msgid "&White monitor" -msgstr "&Monitor bianco" +msgstr "Monitor &bianco" msgid "Grayscale &conversion type" -msgstr "Conversione &scala grigia" +msgstr "Conversione &scala di grigi" msgid "BT&601 (NTSC/PAL)" msgstr "BT&601 (NTSC/PAL)" @@ -166,13 +175,13 @@ msgid "BT&709 (HDTV)" msgstr "BT&709 (HDTV)" msgid "&Average" -msgstr "&AMedia" +msgstr "&Media" msgid "CGA/PCjr/Tandy/E&GA/(S)VGA overscan" msgstr "Sovrascansione CGA/PCjr/Tandy/E&GA/(S)VGA" msgid "Change contrast for &monochrome display" -msgstr "Cambia il contrasto per &display monocromatici" +msgstr "Modifica il contrasto per schermi &monocromatici" msgid "&Media" msgstr "&Dispositivi" @@ -183,11 +192,14 @@ msgstr "&Strumenti" msgid "&Settings..." msgstr "&Impostazioni..." +msgid "Settings..." +msgstr "Impostazioni..." + msgid "&Update status bar icons" msgstr "&Aggiorna icone della barra di stato" msgid "Take s&creenshot" -msgstr "Cattura schermata" +msgstr "&Cattura schermata" msgid "S&ound" msgstr "A&udio" @@ -196,19 +208,19 @@ msgid "&Preferences..." msgstr "&Preferenze..." msgid "Enable &Discord integration" -msgstr "Abilita &integrazione Discord" +msgstr "Abilita integrazione &Discord" msgid "Sound &gain..." msgstr "Guadagno &suono..." msgid "Begin trace" -msgstr "Inizia traccia" +msgstr "Inizio traccia" msgid "End trace" -msgstr "Ferma traccia" +msgstr "Fine traccia" msgid "&Help" -msgstr "&?" +msgstr "Ai&uto" msgid "&Documentation..." msgstr "&Documentazione..." @@ -235,7 +247,7 @@ msgid "&Rewind to the beginning" msgstr "Ri&avvolgi all'inizio" msgid "&Fast forward to the end" -msgstr "A&vanti veloce alla fine" +msgstr "A&vanti veloce fino alla fine" msgid "E&ject" msgstr "&Espelli" @@ -280,7 +292,7 @@ msgid "&75 fps" msgstr "&75 FPS" msgid "&VSync" -msgstr "&VSync" +msgstr "Sincronizzazione &verticale" msgid "&Select shader..." msgstr "&Seleziona shader..." @@ -292,7 +304,7 @@ msgid "Preferences" msgstr "Preferenze" msgid "Sound Gain" -msgstr "Guadagno del suono" +msgstr "Guadagno suono" msgid "New Image" msgstr "Nuova immagine" @@ -337,22 +349,25 @@ msgid "Height:" msgstr "Altezza:" msgid "Lock to this size" -msgstr "Blocca in queste dimensioni" +msgstr "Blocca su questa dimensione" msgid "Machine type:" -msgstr "Tipo di piastra madre:" +msgstr "Tipo di macchina:" msgid "Machine:" -msgstr "Piastra madre:" +msgstr "Macchina:" msgid "Configure" msgstr "Configura" +msgid "CPU:" +msgstr "CPU:" + msgid "CPU type:" -msgstr "Tipo del CPU:" +msgstr "Tipo di CPU:" msgid "Speed:" -msgstr "Veloc.:" +msgstr "Velocità:" msgid "Frequency:" msgstr "Frequenza:" @@ -373,38 +388,62 @@ msgid "Time synchronization" msgstr "Sincronizzazione dell'ora" msgid "Disabled" -msgstr "Disabilitata" +msgstr "Disabilitato" msgid "Enabled (local time)" -msgstr "Abilitata (ora locale)" +msgstr "Abilitato (ora locale)" msgid "Enabled (UTC)" -msgstr "Abilitata (UTC)" +msgstr "Abilitato (UTC)" msgid "Dynamic Recompiler" msgstr "Ricompilatore dinamico" +msgid "CPU frame size" +msgstr "Dimensione blocchi CPU" + +msgid "Larger frames (less smooth)" +msgstr "Blocchi più grandi (meno fluido)" + +msgid "Smaller frames (smoother)" +msgstr "Blocchi più piccoli (più fluido)" + msgid "Video:" msgstr "Video:" msgid "Video #2:" -msgstr "Video 2:" +msgstr "Video #2:" msgid "Voodoo 1 or 2 Graphics" -msgstr "Grafica Voodoo 1 o 2" +msgstr "Scheda grafica Voodoo 1 o 2" msgid "IBM 8514/A Graphics" -msgstr "Grafica IBM 8514/A" +msgstr "Scheda grafica IBM 8514/A" msgid "XGA Graphics" -msgstr "Grafica XGA" +msgstr "Scheda grafica XGA" + +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "Scheda grafica IBM PS/55 Display Adapter" + +msgid "Keyboard:" +msgstr "Tastiera:" + +msgid "Keyboard" +msgstr "Tastiera" msgid "Mouse:" msgstr "Mouse:" +msgid "Mouse" +msgstr "Mouse" + msgid "Joystick:" msgstr "Joystick:" +msgid "Joystick" +msgstr "Joystick" + msgid "Joystick 1..." msgstr "Joystick 1..." @@ -418,25 +457,28 @@ msgid "Joystick 4..." msgstr "Joystick 4..." msgid "Sound card #1:" -msgstr "Scheda audio 1:" +msgstr "Scheda audio #1:" msgid "Sound card #2:" -msgstr "Scheda audio 2:" +msgstr "Scheda audio #2:" msgid "Sound card #3:" -msgstr "Scheda audio 3:" +msgstr "Scheda audio #3:" msgid "Sound card #4:" -msgstr "Scheda audio 4:" +msgstr "Scheda audio #4:" msgid "MIDI Out Device:" -msgstr "Uscita MIDI:" +msgstr "Dispositivo uscita MIDI:" msgid "MIDI In Device:" -msgstr "Entrata MIDI:" +msgstr "Dispositivo ingresso MIDI:" + +msgid "MIDI Out:" +msgstr "Uscita MIDI:" msgid "Standalone MPU-401" -msgstr "MPU-401 autonomo" +msgstr "Scheda dedicata MPU-401" msgid "Use FLOAT32 sound" msgstr "Usa suono FLOAT32" @@ -474,6 +516,9 @@ msgstr "Dispositivo LPT3:" msgid "LPT4 Device:" msgstr "Dispositivo LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "DMA LPT ECP interna" + msgid "Serial port 1" msgstr "Porta seriale 1" @@ -498,18 +543,21 @@ msgstr "Porta parallela 3" msgid "Parallel port 4" msgstr "Porta parallela 4" -msgid "HD Controller:" -msgstr "Controller HD:" - msgid "FD Controller:" msgstr "Controller FD:" +msgid "CD-ROM Controller:" +msgstr "Controller CD-ROM:" + msgid "Tertiary IDE Controller" msgstr "Controller IDE terziario" msgid "Quaternary IDE Controller" msgstr "Controller IDE quaternario" +msgid "Hard disk" +msgstr "Disco rigido" + msgid "SCSI" msgstr "SCSI" @@ -529,7 +577,10 @@ msgid "Cassette" msgstr "Cassetta" msgid "Hard disks:" -msgstr "Hard disk:" +msgstr "Dischi rigidi:" + +msgid "Firmware Version" +msgstr "Versione firmware" msgid "&New..." msgstr "&Nuovo..." @@ -538,7 +589,7 @@ msgid "&Existing..." msgstr "&Esistente..." msgid "&Remove" -msgstr "&Rimouvi" +msgstr "&Rimuovi" msgid "Bus:" msgstr "Bus:" @@ -588,8 +639,14 @@ msgstr "Unità CD-ROM:" msgid "MO drives:" msgstr "Unità magneto-ottiche:" -msgid "ZIP drives:" -msgstr "Unità ZIP:" +msgid "MO:" +msgstr "Magneto-ottiche:" + +msgid "Removable disks:" +msgstr "Dischi rimovibili:" + +msgid "Removable disk drives:" +msgstr "Unità disco rimovibili:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "RTC ISA:" msgid "ISA Memory Expansion" msgstr "Espansione memoria ISA" +msgid "ISA ROM Cards" +msgstr "Schede ROM ISA" + msgid "Card 1:" msgstr "Scheda 1:" @@ -612,11 +672,20 @@ msgstr "Scheda 3:" msgid "Card 4:" msgstr "Scheda 4:" +msgid "Generic ISA ROM Board" +msgstr "Scheda ROM ISA generica" + +msgid "Generic Dual ISA ROM Board" +msgstr "Scheda Dual ROM ISA generica" + +msgid "Generic Quad ISA ROM Board" +msgstr "Scheda Quad ROM ISA generica" + msgid "ISABugger device" msgstr "Dispositivo ISABugger" msgid "POST card" -msgstr "Scheda POST" +msgstr "Scheda di diagnostica" msgid "86Box" msgstr "86Box" @@ -633,17 +702,23 @@ msgstr " - IN PAUSA" msgid "Speed" msgstr "Velocità" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Disco rimovibile %1 (%2): %3" -msgid "ZIP images" -msgstr "Immagini ZIP" +msgid "&Removable disk %1 (%2): %3" +msgstr "&Disco rimovibile %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Immagini dischi rimovibili" + +msgid "Image %1" +msgstr "Immagine %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." -msgstr "86Box non può trovare immagini ROM utilizzabili.\n\nSi prega di scaricare un set di ROM ed estrarlo nella directory \"roms\"." +msgstr "86Box non è in grado di trovare immagini ROM utilizzabili.\n\nSi prega di scaricare un set di ROM ed estrarlo nella cartella \"roms\"." msgid "(empty)" -msgstr "(empty)" +msgstr "(vuoto)" msgid "All files" msgstr "Tutti i file" @@ -667,25 +742,25 @@ msgid "Surface images" msgstr "Immagini di superficie" msgid "Machine \"%hs\" is not available due to missing ROMs in the roms/machines directory. Switching to an available machine." -msgstr "La macchina \"%hs\" non è disponibile a causa di immagini ROM mancanti nella directory roms/machines. Cambiando ad una macchina disponibile." +msgstr "La macchina \"%hs\" non è disponibile a causa di immagini ROM mancanti nella directory roms/machines. Passaggio ad una macchina disponibile." msgid "Video card \"%hs\" is not available due to missing ROMs in the roms/video directory. Switching to an available video card." -msgstr "La scheda video \"%hs\" non è disponibile a causa di immagini ROM mancanti nella directory roms/video. Cambiando ad una scheda video disponibile." +msgstr "La scheda video \"%hs\" non è disponibile a causa di immagini ROM mancanti nella directory roms/video. Passaggio ad una scheda video disponibile." msgid "Video card #2 \"%hs\" is not available due to missing ROMs in the roms/video directory. Disabling the second video card." -msgstr "La scheda video 2 \"%hs\" non è disponibile a causa di immagini ROM mancanti nella directory roms/video. Disabilitando la seconda scheda video." +msgstr "La scheda video 2 \"%hs\" non è disponibile a causa di immagini ROM mancanti nella directory roms/video. Disabilitazione della seconda scheda video." msgid "Device \"%hs\" is not available due to missing ROMs. Ignoring the device." -msgstr "Il dispositivo \"%hs\" non è disponibile a causa di immagini ROM mancanti. Ignorando il dispositivo." +msgstr "Il dispositivo \"%hs\" non è disponibile a causa di immagini ROM mancanti. Dispositivo ignorato." msgid "Machine" -msgstr "Piastra madre" +msgstr "Macchina" msgid "Display" msgstr "Schermo" msgid "Input devices" -msgstr "Dispositivi di entrata" +msgstr "Dispositivi di ingresso" msgid "Sound" msgstr "Audio" @@ -694,25 +769,46 @@ msgid "Network" msgstr "Rete" msgid "Ports (COM & LPT)" -msgstr "Porte (COM & LPT)" +msgstr "Porte (COM e LPT)" + +msgid "Ports" +msgstr "Porte" + +msgid "Serial ports:" +msgstr "Porte seriali:" + +msgid "Parallel ports:" +msgstr "Porte parallele:" msgid "Storage controllers" -msgstr "Controller memoria" +msgstr "Controller di archiviazione" msgid "Hard disks" -msgstr "Hard disk" +msgstr "Dischi rigidi" + +msgid "Disks:" +msgstr "Dischi:" + +msgid "Floppy:" +msgstr "Floppy:" + +msgid "Controllers:" +msgstr "Controller:" msgid "Floppy & CD-ROM drives" msgstr "Unità CD-ROM e Floppy" msgid "Other removable devices" -msgstr "Altri dispositivi rimuovibili" +msgstr "Altri dispositivi rimovibili" msgid "Other peripherals" msgstr "Altre periferiche" +msgid "Other devices" +msgstr "Altri dispositivi" + msgid "Click to capture mouse" -msgstr "Fare clic per catturare mouse" +msgstr "Fare clic per catturare il mouse" msgid "Press %1 to release mouse" msgstr "Premi %1 per rilasciare il mouse" @@ -730,7 +826,7 @@ msgid "C" msgstr "C" msgid "H" -msgstr "H" +msgstr "T" msgid "S" msgstr "S" @@ -742,7 +838,7 @@ msgid "Default" msgstr "Predefinito" msgid "%1 Wait state(s)" -msgstr "%1 stati d'attesa" +msgstr "%1 stato/i d'attesa" msgid "Type" msgstr "Tipo" @@ -751,52 +847,82 @@ msgid "No PCap devices found" msgstr "Nessun dispositivo PCap trovato" msgid "Invalid PCap device" -msgstr "Dispositivo PCap invalido" +msgstr "Dispositivo PCap non valido" msgid "2-axis, 2-button joystick(s)" -msgstr "Joystick da 2 assi, 2 pulsanti" +msgstr "Joystick a 2 assi, 2 pulsanti" msgid "2-axis, 4-button joystick" -msgstr "Joystick da 2 assi, 4 pulsanti" +msgstr "Joystick a 2 assi, 4 pulsanti" msgid "2-axis, 6-button joystick" -msgstr "Joystick da 2 assi, 6 pulsanti" +msgstr "Joystick a 2 assi, 6 pulsanti" msgid "2-axis, 8-button joystick" -msgstr "Joystick da 2 assi, 8 pulsanti" +msgstr "Joystick a 2 assi, 8 pulsanti" msgid "3-axis, 2-button joystick" -msgstr "Joystick da 3 assi, 2 pulsanti" +msgstr "Joystick a 3 assi, 2 pulsanti" msgid "3-axis, 4-button joystick" -msgstr "Joystick da 3 assi, 4 pulsanti" +msgstr "Joystick a 3 assi, 4 pulsanti" msgid "4-axis, 4-button joystick" -msgstr "Joystick da 4 assi, 4 pulsanti" +msgstr "Joystick a 4 assi, 4 pulsanti" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + Pedali CH" + msgid "Microsoft SideWinder Pad" -msgstr "Microsoft SideWinder Pad" +msgstr "Microsoft SideWinder" msgid "Thrustmaster Flight Control System" -msgstr "Thrustmaster Flight Control System" +msgstr "Sistema di controllo Thrustmaster Flight" + +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Sistema di controllo timone" + +msgid "2-button gamepad(s)" +msgstr "Gamepad a 2 pulsanti" + +msgid "2-button flight yoke" +msgstr "Barra di comando a 2 pulsanti" + +msgid "4-button gamepad" +msgstr "Gamepad a 4 pulsanti" + +msgid "4-button flight yoke" +msgstr "Barra di comando a 4 pulsanti" + +msgid "2-button flight yoke with throttle" +msgstr "Barra di comando a 2 pulsanti con acceleratore" + +msgid "4-button flight yoke with throttle" +msgstr "Barra di comando a 4 pulsanti con acceleratore" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Volante Win95 (3 assi, 4 pulsanti)" msgid "None" msgstr "Nessuno" msgid "%1 MB (CHS: %2, %3, %4)" -msgstr "%1 MB (CHS: %2, %3, %4)" +msgstr "%1 MB (CTS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Floppy %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Floppy %1 (%2): %3" + msgid "Advanced sector images" -msgstr "Immagini da settori avanzati" +msgstr "Immagini di settore avanzate" msgid "Flux images" -msgstr "Immagini flusso" +msgstr "Immagini di flusso" msgid "Are you sure you want to hard reset the emulated machine?" msgstr "Sei sicuro di voler riavviare la macchina emulata?" @@ -811,10 +937,13 @@ msgid "Unable to initialize GhostPCL" msgstr "Impossibile inizializzare GhostPCL" msgid "MO %1 (%2): %3" -msgstr "MO %1 (%2): %3" +msgstr "magneto-ottico %1 (%2): %3" + +msgid "&MO %1 (%2): %3" +msgstr "&magneto-ottico %1 (%2): %3" msgid "MO images" -msgstr "Immagini MO" +msgstr "Immagini magneto-ottiche" msgid "Welcome to 86Box!" msgstr "Benvenuti in 86Box!" @@ -822,14 +951,23 @@ msgstr "Benvenuti in 86Box!" msgid "Internal device" msgstr "Dispositivo integrato" +msgid "&File" +msgstr "&File" + +msgid "&New machine..." +msgstr "&Nuova macchina..." + +msgid "&Check for updates..." +msgstr "&Controlla gli aggiornamenti..." + msgid "Exit" msgstr "Esci" msgid "No ROMs found" -msgstr "Nessune immagini ROM trovate" +msgstr "Nessuna ROM trovata" msgid "Do you want to save the settings?" -msgstr "Vuole salvare queste impostazioni?" +msgstr "Vuoi salvare le impostazioni?" msgid "This will hard reset the emulated machine." msgstr "Questo riavvierà la macchina emulata." @@ -844,22 +982,22 @@ msgid "86Box v" msgstr "86Box v" msgid "An emulator of old computers\n\nAuthors: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n\nWith previous core contributions from Sarah Walker, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information." -msgstr "Un emulatore di computer vecchi\n\nAutori: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n\nCon i precedenti contributi al nucleo di Sarah Walker, leilei, JohnElliott, greatpsycho e altri.\n\nTradotto da: explorerdotexe\n\nRilasciato sotto la Licenza Pubblica GNU versione 2 o dopo. Vedi LICENSE per maggior informazioni." +msgstr "Un emulatore di vecchi computer\n\nAutori: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne e altri.\n\nCon i precedenti contributi fondamentali di Sarah Walker, leilei, JohnElliott, greatpsycho e altri.\n\nRilasciato sotto la Licenza Pubblica Generale GNU versione 2 o successiva. Per ulteriori informazioni, consultare il file LICENSE." msgid "Hardware not available" msgstr "Hardware non disponibile" msgid "Make sure %1 is installed and that you are on a %1-compatible network connection." -msgstr "Controllare se %1 è installato e che tu sia connesso ad una connessione %1 compatibile." +msgstr "Assicurati che %1 sia installato e che la connessione di rete sia compatibile con %1." msgid "Invalid configuration" -msgstr "Configurazione invalida" +msgstr "Configurazione non valida" msgid "%1 is required for automatic conversion of PostScript files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as PostScript (.ps) files." -msgstr "%1 è richiesto per la conversione automatica di file PostScript a file PDF.\n\nQualsiasi documento mandato alla stampante generica PostScript sarà salvato come file PostScript (.ps)." +msgstr "%1 è richiesto per la conversione automatica di file PostScript in PDF.\n\nQualsiasi documento inviato alla stampante PostScript generica verrà salvato come file PostScript (.ps)." -msgid "%1 is required for automatic conversion of PCL files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as Printer Command Language (.pcl) files." -msgstr "%1 è richiesto per la conversione automatica di file PCL a file PDF.\n\nQualsiasi documento mandato alla stampante generica PCL sarà salvato come file Printer Command Language (.cl)." +msgid "%1 is required for automatic conversion of PCL files to PDF.\n\nAny documents sent to the generic PCL printer will be saved as Printer Command Language (.pcl) files." +msgstr "%1 è richiesto per la conversione automatica di file PCL in PDF.\n\nQualsiasi documento inviato alla stampante PCL generica verrà salvato come file Printer Command Language (.pcl)." msgid "Don't show this message again" msgstr "Non mostrare più questo messaggio" @@ -889,7 +1027,7 @@ msgid "You are loading an unsupported configuration" msgstr "Stai caricando una configurazione non supportata" msgid "CPU type filtering based on selected machine is disabled for this emulated machine.\n\nThis makes it possible to choose a CPU that is otherwise incompatible with the selected machine. However, you may run into incompatibilities with the machine BIOS or other software.\n\nEnabling this setting is not officially supported and any bug reports filed may be closed as invalid." -msgstr "Il filtraggio della tipologia di CPU è disabilitato per la macchina selezionata.\n\nQuesto lo rende possibile scegliere un CPU che è altrimenti incompatibile con la macchina selezionata. Tuttavia, portresti incorrere in incompatibilità con il BIOS della macchina o altri programmi. \n\nL'abilitare di questa impostazione non è ufficialmente supportato e tutte le segnalazioni di errori saranno considerate invalide." +msgstr "Il filtro del tipo di CPU in base alla macchina selezionata è disabilitato.\n\nCiò consente di scegliere una CPU altrimenti incompatibile con la macchina selezionata. Tuttavia, potrebbero verificarsi incompatibilità con il BIOS della macchina o con altri programmi. \n\nL'abilitazione di questa impostazione non è ufficialmente supportata e qualsiasi segnalazione di errore potrebbe essere chiusa come non valida." msgid "Continue" msgstr "Continua" @@ -897,20 +1035,29 @@ msgstr "Continua" msgid "Cassette: %1" msgstr "Cassetta: %1" +msgid "C&assette: %1" +msgstr "C&assetta: %1" + msgid "Cassette images" msgstr "Immagini cassetta" msgid "Cartridge %1: %2" msgstr "Cartuccia %1: %2" +msgid "Car&tridge %1: %2" +msgstr "Car&tuccia %1: %2" + msgid "Cartridge images" msgstr "Immagini cartuccia" msgid "Resume execution" -msgstr "Riprendere l'esecuzione" +msgstr "Riprendi l'esecuzione" msgid "Pause execution" -msgstr "Sospendere l'esecuzione" +msgstr "Sospendi l'esecuzione" + +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Canc" msgid "Press Ctrl+Alt+Del" msgstr "Premere Ctrl+Alt+Canc" @@ -921,14 +1068,284 @@ msgstr "Premere Ctrl+Alt+Esc" msgid "Hard reset" msgstr "Riavvia" +msgid "Force shutdown" +msgstr "Forza arresto" + +msgid "Start" +msgstr "Avvia" + +msgid "Not running" +msgstr "Inattivo" + +msgid "Running" +msgstr "In esecuzione" + +msgid "Paused" +msgstr "In pausa" + +msgid "Waiting" +msgstr "In attesa" + +msgid "Powered Off" +msgstr "Spento" + +msgid "%n running" +msgstr "%n in esecuzione" + +msgid "%n paused" +msgstr "%n in pausa" + +msgid "%n waiting" +msgstr "%n in attesa" + +msgid "%1 total" +msgstr "%1 totale" + +msgid "VMs: %1" +msgstr "Macchine virtuali: %1" + +msgid "System Directory:" +msgstr "Directory Sistema:" + +msgid "Choose directory" +msgstr "Scegli la directory" + +msgid "Choose configuration file" +msgstr "Scegli il file di configurazione" + +msgid "86Box configuration files (86box.cfg)" +msgstr "File di configurazione di 86Box (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Lettura del file di configurazione non riuscita" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Impossibile aprire il file di configurazione selezionato per la lettura: %1" + +msgid "Use regular expressions in search box" +msgstr "Utilizza espressioni regolari nella casella di ricerca" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "Sono attualmente attive %1 macchina/e. Vuoi comunque uscire dal gestore delle macchine virtuali?" + +msgid "Add new system wizard" +msgstr "Procedura guidata nuovo sistema" + +msgid "Introduction" +msgstr "Introduzione" + +msgid "This will help you add a new system to 86Box." +msgstr "Questo ti aiuterà ad aggiungere un nuovo sistema ad 86Box." + +msgid "New configuration" +msgstr "Nuova configurazione" + +msgid "Complete" +msgstr "Completamento" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "La procedura guidata avvierà ora la configurazione del nuovo sistema." + +msgid "Use existing configuration" +msgstr "Utilizza configurazione esistente" + +msgid "Type some notes here" +msgstr "Scrivi qui alcune note" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Incolla il contenuto del file di configurazione esistente nella casella sottostante." + +msgid "Load configuration from file" +msgstr "Carica configurazione da file" + +msgid "System name" +msgstr "Nome sistema" + +msgid "System name:" +msgstr "Nome sistema:" + +msgid "System name cannot contain certain characters" +msgstr "Il nome del sistema non può contenere determinati caratteri" + +msgid "System name already exists" +msgstr "Il nome del sistema esiste già" + +msgid "Please enter a directory for the system" +msgstr "Inserisci una directory per il sistema" + +msgid "Directory does not exist" +msgstr "La directory non esiste" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "Verrà creata una nuova cartella per il sistema nella directory selezionata sopra" + +msgid "System location:" +msgstr "Posizione sistema:" + +msgid "System name and location" +msgstr "Nome e posizione del sistema" + +msgid "Enter the name of the system and choose the location" +msgstr "Inserisci il nome del sistema e scegli la posizione" + +msgid "Enter the name of the system" +msgstr "Inserisci il nome del sistema" + +msgid "Please enter a system name" +msgstr "Inserisci il nome del sistema" + +msgid "Display name (optional):" +msgstr "Nome visualizzato (opzionale):" + +msgid "Display name:" +msgstr "Nome visualizzato:" + +msgid "Set display name" +msgstr "Imposta il nome da visualizzare" + +msgid "Enter the new display name (blank to reset)" +msgstr "Inserisci il nuovo nome da visualizzare (vuoto per reimpostarlo)" + +msgid "Change &display name..." +msgstr "Modifica &nome visualizzato..." + +msgid "Context Menu" +msgstr "Menu contestuale" + +msgid "&Open folder..." +msgstr "&Apri cartella..." + +msgid "Open p&rinter tray..." +msgstr "Apri vassoio &stampante..." + +msgid "Set &icon..." +msgstr "Imposta &icona..." + +msgid "Select an icon" +msgstr "Seleziona un'icona" + +msgid "C&lone..." +msgstr "C&lona..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "La macchina virtuale \"%1\" (%2) sarà clonata in:" + +msgid "Directory %1 already exists" +msgstr "La directory %1 esiste già" + +msgid "You cannot use the following characters in the name: %1" +msgstr "Non è possibile utilizzare i seguenti caratteri nel nome: %1" + +msgid "Clone" +msgstr "Clona" + +msgid "Failed to create directory for cloned VM" +msgstr "Impossibile creare la directory per la macchina virtuale clonata" + +msgid "Failed to clone VM." +msgstr "Impossibile clonare la macchina virtuale." + +msgid "Directory in use" +msgstr "Directory in uso" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "La directory selezionata è già in uso. Selezionane una diversa." + +msgid "Create directory failed" +msgstr "Creazione directory non riuscita" + +msgid "Unable to create the directory for the new system" +msgstr "Impossibile creare la directory per il nuovo sistema" + +msgid "Configuration write failed" +msgstr "Scrittura del file di configurazione non riuscita" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Impossibile aprire il file di configurazione in %1 per la scrittura" + +msgid "Error adding system" +msgstr "Errore durante l'aggiunta del sistema" + +msgid "Remove directory failed" +msgstr "Rimozione directory non riuscita" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Non è stato possibile eliminare alcuni file nella directory della macchina. Sarà necessario eliminarli manualmente." + +msgid "Build" +msgstr "Build" + +msgid "Version" +msgstr "Versione" + +msgid "An update to 86Box is available: %1 %2" +msgstr "È disponibile un aggiornamento per 86Box: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Si è verificato un errore durante la ricerca degli aggiornamenti: %1" + +msgid "An update to 86Box is available!" +msgstr "È disponibile un aggiornamento per 86Box!" + +msgid "Warning" +msgstr "Avviso" + +msgid "&Kill" +msgstr "&Forza chiusura" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Forzare la chiusura di una macchina virtuale può causare la perdita di dati. Eseguire questa operazione solo se il processo di 86Box si blocca.\n\nDesideri davvero forzare la chiusura della macchina virtuale \"%1\"?" + +msgid "&Delete" +msgstr "&Elimina" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Vuoi davvero eliminare la macchina virtuale \"%1\" e tutti i suoi file? Questa operazione è irreversibile!" + +msgid "Show &config file" +msgstr "Mostra file di &configurazione" + +msgid "No screenshot" +msgstr "Nessuna istantanea dello schermo" + +msgid "Search" +msgstr "Cerca" + +msgid "Searching for VMs..." +msgstr "Ricerca delle macchine virtuali..." + +msgid "Found %1" +msgstr "Trovato %1" + +msgid "System" +msgstr "Sistema" + +msgid "Storage" +msgstr "Archiviazione" + +msgid "Disk %1: " +msgstr "Disco %1: " + +msgid "No disks" +msgstr "Nessun disco" + +msgid "Audio" +msgstr "Audio" + +msgid "Audio:" +msgstr "Audio:" + msgid "ACPI shutdown" msgstr "Arresto ACPI" +msgid "ACP&I shutdown" +msgstr "Arresto ACP&I" + msgid "Hard disk (%1)" -msgstr "Hard disk (%1)" +msgstr "Disco rigido (%1)" msgid "MFM/RLL or ESDI CD-ROM drives never existed" -msgstr "Le unità CD-ROM MFM/RLL o ESDI non sono mai esistite." +msgstr "Le unità CD-ROM MFM/RLL o ESDI non sono mai esistite" msgid "Custom..." msgstr "Personalizzata..." @@ -943,10 +1360,10 @@ msgid "Add Existing Hard Disk" msgstr "Aggiungi un disco rigido esistente" msgid "HDI disk images cannot be larger than 4 GB." -msgstr "Le immagini HDI non possono essere più grandi di 4 GB." +msgstr "Le immagini disco HDI non possono essere più grandi di 4 GB." msgid "Disk images cannot be larger than 127 GB." -msgstr "Le immmagini disco non possono essere più grandi di 127 GB." +msgstr "Le immagini disco non possono essere più grandi di 127 GB." msgid "Hard disk images" msgstr "Immagini disco rigido" @@ -955,13 +1372,13 @@ msgid "Unable to read file" msgstr "Impossibile leggere il file" msgid "Unable to write file" -msgstr "Impossibile scrivere al file" +msgstr "Impossibile scrivere il file" msgid "HDI or HDX images with a sector size other than 512 are not supported." msgstr "Le immagini HDI o HDX con settori di dimensioni diverse da 512 non sono supportati." msgid "Disk image file already exists" -msgstr "Immagine disco già esiste" +msgstr "L'immagine disco esiste già" msgid "Please specify a valid file name." msgstr "Specifica un nome file valido." @@ -970,10 +1387,10 @@ msgid "Disk image created" msgstr "Immagine disco creata" msgid "Make sure the file exists and is readable." -msgstr "Controlla che il file esiste e che sia leggibile." +msgstr "Assicurarsi che il file esista e sia leggibile." msgid "Make sure the file is being saved to a writable directory." -msgstr "Controlla che il file viene salvato ad un percorso con diritti di scrittura" +msgstr "Assicurarsi che il file venga salvato in un percorso con permessi di scrittura." msgid "Disk image too large" msgstr "Immagine disco troppo grande" @@ -982,7 +1399,7 @@ msgid "Remember to partition and format the newly-created drive." msgstr "Ricordati di partizionare e formattare il disco appena creato." msgid "The selected file will be overwritten. Are you sure you want to use it?" -msgstr "Il file selezionato sarà sovrascritto, sei sicuro di volerlo usare?" +msgstr "Il file selezionato verrà sovrascritto. Sei sicuro di volerlo usare?" msgid "Unsupported disk image" msgstr "Immagine disco non supportata" @@ -994,7 +1411,7 @@ msgid "Don't overwrite" msgstr "Non sovrascrivere" msgid "Raw image" -msgstr "Immagine raw" +msgstr "Immagine RAW" msgid "HDI image" msgstr "Immagine HDI" @@ -1015,7 +1432,7 @@ msgid "(N/A)" msgstr "(N/D)" msgid "Raw image (.img)" -msgstr "Immagine raw (.img)" +msgstr "Immagine RAW (.img)" msgid "HDI image (.hdi)" msgstr "Immagine HDI (.hdi)" @@ -1042,16 +1459,16 @@ msgid "VHD files" msgstr "File VHD" msgid "Select the parent VHD" -msgstr "Seleziona il VHD padre." +msgstr "Seleziona il VHD padre" msgid "This could mean that the parent image was modified after the differencing image was created.\n\nIt can also happen if the image files were moved or copied, or by a bug in the program that created this disk.\n\nDo you want to fix the timestamps?" -msgstr "Questo potrebbe significare che l'immagine padre sia stata modificata dopo la creazione dell'immagine di differenziazione.\n\nPuò anche succedere se i file immagini sono stati spostati o copiati, o da un errore nel programma che ha creato questo disco.\n\nVuoi aggiustare le marcature di tempo?" +msgstr "Ciò potrebbe significare che l'immagine padre è stata modificata dopo la creazione dell'immagine di differenziazione.\n\nPuò verificarsi anche se i file immagine sono stati spostati o copiati, oppure a causa di un errore del programma che ha creato il disco.\n\nVuoi correggere la marca temporale?" msgid "Parent and child disk timestamps do not match" -msgstr "Le marcature di tempo padre e figlio non corrispondono" +msgstr "Le marche temporali del disco padre e figlio non corrispondono" msgid "Could not fix VHD timestamp." -msgstr "Impossibile aggiustare marcature di tempo VHD." +msgstr "Impossibile correggere la marca temporale VHD." msgid "MFM/RLL" msgstr "MFM/RLL" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 KB" @@ -1141,16 +1561,16 @@ msgid "5.25\" 1.3 GB" msgstr "5.25\" 1.3 GB" msgid "Perfect RPM" -msgstr "RPM perfette" +msgstr "RPM ideale" msgid "1% below perfect RPM" -msgstr "RPM 1% sotto perfezione" +msgstr "1% al di sotto di RPM ideale" msgid "1.5% below perfect RPM" -msgstr "RPM 1.5% sotto perfezione" +msgstr "1,5% al di sotto di RPM ideale" msgid "2% below perfect RPM" -msgstr "RPM 2% sotto perfezione" +msgstr "2% al di sotto di RPM ideale" msgid "(System Default)" msgstr "(Predefinito del sistema)" @@ -1159,13 +1579,13 @@ msgid "Failed to initialize network driver" msgstr "Impossibile inizializzare il driver di rete" msgid "The network configuration will be switched to the null driver" -msgstr "La configurazione di rete verrà commutata sul driver nullo" +msgstr "La configurazione di rete verrà commutata sul driver Null" msgid "Mouse sensitivity:" -msgstr "Sensitività del mouse:" +msgstr "Sensibilità del mouse:" msgid "Select media images from program working directory" -msgstr "Seleziona le immagini media dalla directory di lavoro del programma" +msgstr "Seleziona le immagini dalla directory di lavoro del programma" msgid "PIT mode:" msgstr "Modalità PIT:" @@ -1180,16 +1600,16 @@ msgid "Fast" msgstr "Veloce" msgid "&Auto-pause on focus loss" -msgstr "&Pausa automatica alla perdita della messa a fuoco" +msgstr "Pa&usa automatica se in secondo piano" msgid "WinBox is no longer supported" msgstr "WinBox non è più supportato" msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." -msgstr "Lo sviluppo del gestore WinBox si è interrotto nel 2022 per mancanza di manutentori. Poiché i nostri sforzi sono rivolti a rendere 86Box ancora migliore, abbiamo deciso di non supportare più WinBox come gestore.\n\nNon saranno forniti ulteriori aggiornamenti tramite WinBox e si potrebbe riscontrare un comportamento non corretto se si continua a utilizzarlo con versioni più recenti di 86Box. Tutte le segnalazioni di bug relative al comportamento di WinBox saranno chiuse in quanto non valide.\n\nPer un elenco di altri gestori utilizzabili, visitare 86box.net." +msgstr "Lo sviluppo del gestore WinBox si è interrotto nel 2022 per mancanza di manutentori. Poiché i nostri sforzi sono rivolti a rendere 86Box ancora migliore, abbiamo deciso di non supportare più WinBox come gestore.\n\nNon saranno forniti ulteriori aggiornamenti tramite WinBox e si potrebbe riscontrare un comportamento non corretto se si continua a utilizzarlo con le versioni più recenti di 86Box. Tutte le segnalazioni di errori relative al comportamento di WinBox saranno chiuse in quanto non valide.\n\nPer un elenco di altri gestori utilizzabili, visitare 86box.net." msgid "Generate" -msgstr "Generare" +msgstr "Genera" msgid "Joystick configuration" msgstr "Configurazione del joystick" @@ -1209,44 +1629,41 @@ msgstr "Dispositivi MCA" msgid "List of MCA devices:" msgstr "Elenco dei dispositivi MCA:" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Strumento tablet" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "Informazioni su &Qt" -msgid "About Qt" -msgstr "Informazioni su Qt" - -msgid "MCA devices..." +msgid "&MCA devices..." msgstr "Dispositivi MCA..." -msgid "Show non-primary monitors" -msgstr "Mostra i monitor non primari" +msgid "Show non-&primary monitors" +msgstr "Mostra i monitor non &primari" -msgid "Open screenshots folder..." -msgstr "Aprire la cartella screenshot..." +msgid "Open screenshots &folder..." +msgstr "Apri la ca&rtella screenshots..." -msgid "Apply fullscreen stretch mode when maximized" -msgstr "Applica la modalità adattamento schermo intero in modalità massimizzata" +msgid "Appl&y fullscreen stretch mode when maximized" +msgstr "Applica adattamento sc&hermo intero in modalità massimizzata" -msgid "Cursor/Puck" -msgstr "Cursore/Puck" +msgid "&Cursor/Puck" +msgstr "&Cursore/Puck" -msgid "Pen" -msgstr "Penna" +msgid "&Pen" +msgstr "&Penna" -msgid "Host CD/DVD Drive (%1:)" -msgstr "Unità CD/DVD host (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "&Unità CD/DVD host (%1:)" msgid "&Connected" msgstr "&Connesso" -msgid "Clear image history" -msgstr "Cancella la cronologia delle immagini" +msgid "Clear image &history" +msgstr "Cancella la cr&onologia delle immagini" msgid "Create..." -msgstr "Creare..." +msgstr "Crea..." msgid "Host CD/DVD Drive (%1)" msgstr "Unità CD/DVD host (%1)" @@ -1255,13 +1672,19 @@ msgid "Unknown Bus" msgstr "Bus sconosciuto" msgid "Null Driver" -msgstr "Driver nullo" +msgstr "Driver Null" + +msgid "NIC:" +msgstr "Scheda di rete:" msgid "NIC %1 (%2) %3" -msgstr "NIC %1 (%2) %3" +msgstr "Scheda di rete %1 (%2) %3" + +msgid "&NIC %1 (%2) %3" +msgstr "&Scheda di rete %1 (%2) %3" msgid "Render behavior" -msgstr "Comportamento di rendering" +msgstr "Comportamento renderizzazione" msgid "Use target framerate:" msgstr "Utilizza l'obiettivo &fotogrammi:" @@ -1270,7 +1693,7 @@ msgid " fps" msgstr " fps" msgid "VSync" -msgstr "VSync" +msgstr "Sincronizzazione verticale" msgid "Synchronize with video" msgstr "Sincronizza col video" @@ -1279,13 +1702,13 @@ msgid "Shaders" msgstr "Shader" msgid "Remove" -msgstr "Rimuovere" +msgstr "Rimuovi" msgid "Browse..." msgstr "Sfoglia..." msgid "Couldn't create OpenGL context." -msgstr "Impossibile creare un contesto OpenGL." +msgstr "Impossibile creare il contesto OpenGL." msgid "Couldn't switch to OpenGL context." msgstr "Impossibile passare al contesto OpenGL." @@ -1297,22 +1720,22 @@ msgid "Error initializing OpenGL" msgstr "Errore nell'inizializzazione di OpenGL" msgid "\nFalling back to software rendering." -msgstr "\nRicaduta sul rendering software." +msgstr "\nPassaggio alla renderizzazione software." msgid "

When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.

" -msgstr "

Quando si selezionano immagini multimediali (CD-ROM, floppy, ecc.) la finestra di dialogo di apertura si avvia nella stessa directory del file di configurazione di 86Box. Questa impostazione probabilmente farà la differenza solo su macOS.

" +msgstr "

Quando si selezionano le immagini (CD-ROM, floppy, ecc.), la finestra di dialogo di apertura si avvia nella stessa directory del file di configurazione di 86Box. Questa impostazione probabilmente farà la differenza solo su MacOS.

" msgid "This machine might have been moved or copied." msgstr "Questa macchina potrebbe essere stata spostata o copiata." msgid "In order to ensure proper networking functionality, 86Box needs to know if this machine was moved or copied.\n\nSelect \"I Copied It\" if you are not sure." -msgstr "Per garantire la corretta funzionalità di rete, 86Box deve sapere se la macchina è stata spostata o copiata.\"nSelezionare \"L'ho copiata\" se non si è sicuri." +msgstr "Per garantire la corretta funzionalità di rete, 86Box deve sapere se la macchina è stata spostata o copiata.\n\nSelezionare \"L'ho copiata\" se non si è sicuri." msgid "I Moved It" -msgstr "L'ho spostato" +msgstr "L'ho spostata" msgid "I Copied It" -msgstr "L'ho copiato" +msgstr "L'ho copiata" msgid "86Box Monitor #" msgstr "Monitor 86Box #" @@ -1323,17 +1746,20 @@ msgstr "Nessun dispositivo MCA." msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" -msgstr "Scheda di rete n. 1" +msgstr "Scheda di rete #1" msgid "Network Card #2" -msgstr "Scheda di rete n. 2" +msgstr "Scheda di rete #2" msgid "Network Card #3" -msgstr "Scheda di rete n. 3" +msgstr "Scheda di rete #3" msgid "Network Card #4" -msgstr "Scheda di rete n. 4" +msgstr "Scheda di rete #4" msgid "Mode:" msgstr "Modalità:" @@ -1351,22 +1777,40 @@ msgid "86Box Unit Tester" msgstr "Tester di unità 86Box" msgid "Novell NetWare 2.x Key Card" -msgstr "Scheda chiave Novell NetWare 2.x" +msgstr "Chiave magnetica Novell NetWare 2.x" msgid "Serial port passthrough 1" -msgstr "Passaggio della porta seriale 1" +msgstr "Porta seriale passante 1" msgid "Serial port passthrough 2" -msgstr "Passaggio della porta seriale 2" +msgstr "Porta seriale passante 2" msgid "Serial port passthrough 3" -msgstr "Passaggio della porta seriale 3" +msgstr "Porta seriale passante 3" msgid "Serial port passthrough 4" -msgstr "Passaggio della porta seriale 4" +msgstr "Porta seriale passante 4" -msgid "Renderer options..." -msgstr "Opzioni del renderer..." +msgid "Renderer &options..." +msgstr "&Opzioni renderizzatore..." + +msgid "PC/XT Keyboard" +msgstr "Tastiera PC/XT" + +msgid "AT Keyboard" +msgstr "Tastiera AT" + +msgid "AX Keyboard" +msgstr "Tastiera AX" + +msgid "PS/2 Keyboard" +msgstr "Tastiera PS/2" + +msgid "PS/55 Keyboard" +msgstr "Tastiera PS/55" + +msgid "Keys" +msgstr "Tasti" msgid "Logitech/Microsoft Bus Mouse" msgstr "Mouse bus Logitech/Microsoft" @@ -1377,18 +1821,30 @@ msgstr "Mouse bus Microsoft (InPort)" msgid "Mouse Systems Serial Mouse" msgstr "Mouse seriale Mouse Systems" +msgid "Mouse Systems Bus Mouse" +msgstr "Mouse bus Mouse Systems" + msgid "Microsoft Serial Mouse" msgstr "Mouse seriale Microsoft" +msgid "Microsoft Serial BallPoint" +msgstr "Mouse seriale Microsoft BallPoint" + msgid "Logitech Serial Mouse" msgstr "Mouse seriale Logitech" msgid "PS/2 Mouse" msgstr "Mouse PS/2" +msgid "PS/2 QuickPort Mouse" +msgstr "Mouse PS/2 QuickPort" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (seriale)" +msgid "Default Baud rate" +msgstr "Velocità di trasmissione predefinita" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Modem standard conforme a Hayes" @@ -1413,11 +1869,53 @@ msgstr "MIDI di sistema" msgid "MIDI Input Device" msgstr "Dispositivo di ingresso MIDI" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "File BIOS" + +msgid "BIOS file (ROM #1)" +msgstr "File BIOS (ROM #1)" + +msgid "BIOS file (ROM #2)" +msgstr "File BIOS (ROM #2)" + +msgid "BIOS file (ROM #3)" +msgstr "File BIOS (ROM #3)" + +msgid "BIOS file (ROM #4)" +msgstr "File BIOS (ROM #4)" + +msgid "BIOS address" msgstr "Indirizzo BIOS" +msgid "BIOS address (ROM #1)" +msgstr "Indirizzo BIOS (ROM #1)" + +msgid "BIOS address (ROM #2)" +msgstr "Indirizzo BIOS (ROM #2)" + +msgid "BIOS address (ROM #3)" +msgstr "Indirizzo BIOS (ROM #3)" + +msgid "BIOS address (ROM #4)" +msgstr "Indirizzo BIOS (ROM #4)" + msgid "Enable BIOS extension ROM Writes" -msgstr "Abilita scrittura al ROM dell'estensione del BIOS" +msgstr "Abilita scritture ROM di espansione del BIOS" + +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "Abilita scritture ROM di espansione del BIOS (ROM #1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "Abilita scritture ROM di espansione del BIOS (ROM #2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "Abilita scritture ROM di espansione del BIOS (ROM #3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "Abilita scritture ROM di espansione del BIOS (ROM #4)" + +msgid "Linear framebuffer base" +msgstr "Base del framebuffer lineare" msgid "Address" msgstr "Indirizzo" @@ -1425,8 +1923,26 @@ msgstr "Indirizzo" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "IRQ porta seriale" + +msgid "Parallel port IRQ" +msgstr "IRQ porta parallela" + msgid "BIOS Revision" -msgstr "Revisione del BIOS" +msgstr "Revisione BIOS" + +msgid "BIOS Version" +msgstr "Versione BIOS" + +msgid "BIOS Language" +msgstr "Lingua BIOS" + +msgid "IBM 5161 Expansion Unit" +msgstr "Unità di espansione IBM 5161" + +msgid "IBM Cassette Basic" +msgstr "Cassetta Basic IBM" msgid "Translate 26 -> 17" msgstr "Tradurre 26 -> 17" @@ -1438,10 +1954,22 @@ msgid "Enable backlight" msgstr "Abilita la retroilluminazione" msgid "Invert colors" -msgstr "Invertire i colori" +msgstr "Inverti i colori" msgid "BIOS size" -msgstr "Dimensione del BIOS" +msgstr "Dimensione BIOS" + +msgid "BIOS size (ROM #1)" +msgstr "Dimensione BIOS (ROM #1)" + +msgid "BIOS size (ROM #2)" +msgstr "Dimensione BIOS (ROM #2)" + +msgid "BIOS size (ROM #3)" +msgstr "Dimensione BIOS (ROM #3)" + +msgid "BIOS size (ROM #4)" +msgstr "Dimensione BIOS (ROM #4)" msgid "Map C0000-C7FFF as UMB" msgstr "Mappa C0000-C7FFF come UMB" @@ -1462,70 +1990,73 @@ msgid "Map E8000-EFFFF as UMB" msgstr "Mappa E8000-EFFFF come UMB" msgid "JS9 Jumper (JIM)" -msgstr "JS9 ponticello (JIM)" +msgstr "Ponticello JS9 (JIM)" msgid "MIDI Output Device" msgstr "Dispositivo di uscita MIDI" msgid "MIDI Real time" -msgstr "MIDI in empo reale" +msgstr "MIDI in tempo reale" msgid "MIDI Thru" -msgstr "Passaggio dell'ingresso MIDI" +msgstr "Ingresso passante MIDI" msgid "MIDI Clockout" -msgstr "Uscita del clock MIDI" +msgstr "Sincronizzazione MIDI" msgid "SoundFont" msgstr "SoundFont" msgid "Output Gain" -msgstr "Guadagno di uscita" +msgstr "Guadagno uscita" msgid "Chorus" msgstr "Coro" msgid "Chorus Voices" -msgstr "Voci del coro" +msgstr "Voci coro" msgid "Chorus Level" -msgstr "Livello del coro" +msgstr "Livello coro" msgid "Chorus Speed" -msgstr "Velocità del coro" +msgstr "Velocità coro" msgid "Chorus Depth" -msgstr "Profondità del coro" +msgstr "Profondità coro" msgid "Chorus Waveform" -msgstr "Forma d'onda del coro" +msgstr "Forma d'onda coro" msgid "Reverb" msgstr "Riverbero" msgid "Reverb Room Size" -msgstr "Dimensioni della sala di riverbero" +msgstr "Dimensioni stanza riverbero" msgid "Reverb Damping" -msgstr "Smorzamento del riverbero" +msgstr "Smorzamento riverbero" msgid "Reverb Width" -msgstr "Larghezza del riverbero" +msgstr "Ampiezza riverbero" msgid "Reverb Level" -msgstr "Livello di riverbero" +msgstr "Livello riverbero" msgid "Interpolation Method" msgstr "Metodo di interpolazione" +msgid "Dynamic Sample Loading" +msgstr "Caricamento dinamico dei campioni" + msgid "Reverb Output Gain" -msgstr "Guadagno dell'uscita del riverbero" +msgstr "Guadagno uscita riverbero" msgid "Reversed stereo" msgstr "Stereo invertito" msgid "Nice ramp" -msgstr "Bella rampa" +msgstr "Rampa di ampl. migliorata" msgid "Hz" msgstr "Hz" @@ -1543,7 +2074,7 @@ msgid "Revision" msgstr "Revisione" msgid "Controller" -msgstr "Controllore" +msgstr "Controller" msgid "Show Crosshair" msgstr "Mostra mirino" @@ -1567,7 +2098,7 @@ msgid "TCP/IP listening port" msgstr "Porta di ascolto TCP/IP" msgid "Phonebook File" -msgstr "File rubrica" +msgstr "File di rubrica" msgid "Telnet emulation" msgstr "Emulazione Telnet" @@ -1576,10 +2107,10 @@ msgid "RAM Address" msgstr "Indirizzo RAM" msgid "RAM size" -msgstr "Dimensione della RAM" +msgstr "Dimensione RAM" msgid "Initial RAM size" -msgstr "Dimensione iniziale della RAM" +msgstr "Dimensione iniziale RAM" msgid "Serial Number" msgstr "Numero di serie" @@ -1605,6 +2136,12 @@ msgstr "DMA basso" msgid "Enable Game port" msgstr "Abilita la porta giochi" +msgid "SID Model" +msgstr "Modello SID" + +msgid "SID Filter Strength" +msgstr "Intensità filtro SID" + msgid "Surround module" msgstr "Modulo surround" @@ -1612,40 +2149,46 @@ msgid "CODEC" msgstr "CODEC" msgid "Raise CODEC interrupt on CODEC setup (needed by some drivers)" -msgstr "Solleva l'interrupt del CODEC all'impostazione del CODEC (necessario per alcuni driver)" +msgstr "Incrementa l'interrupt CODEC nella configurazione CODEC (necessario per alcuni driver)" msgid "SB Address" msgstr "Indirizzo SB" +msgid "Adlib Address" +msgstr "Indirizzo Adlib" + +msgid "Use EEPROM setting" +msgstr "Utilizza impostazione EEPROM" + msgid "WSS IRQ" msgstr "IRQ WSS" msgid "WSS DMA" -msgstr "WSS DMA" +msgstr "DMA WSS" msgid "Enable OPL" -msgstr "Abilita l'OPL" +msgstr "Abilita OPL" msgid "Receive MIDI input (MPU-401)" msgstr "Ricezione dell'ingresso MIDI (MPU-401)" msgid "SB low DMA" -msgstr "SB basso DMA" +msgstr "DMA basso SB" msgid "6CH variant (6-channel)" msgstr "Variante 6CH (6 canali)" msgid "Enable CMS" -msgstr "Abilita il CMS" +msgstr "Abilita CMS" msgid "Mixer" -msgstr "Miscelatore" +msgstr "Mixer" msgid "High DMA" msgstr "DMA alto" msgid "Control PC speaker" -msgstr "Altoparlante del PC di controllo" +msgstr "Controlla l'altoparlante del PC" msgid "Memory size" msgstr "Dimensione della memoria" @@ -1654,31 +2197,31 @@ msgid "EMU8000 Address" msgstr "Indirizzo EMU8000" msgid "IDE Controller" -msgstr "Controllore IDE" +msgstr "Controller IDE" msgid "Codec" msgstr "Codec" msgid "GUS type" -msgstr "Tipo GUS" +msgstr "Tipo di GUS" msgid "Enable 0x04 \"Exit 86Box\" command" msgstr "Abilita il comando 0x04 \"Esci da 86Box\"" msgid "Display type" -msgstr "Tipo di display" +msgstr "Tipo di schermo" msgid "Composite type" -msgstr "Tipo composito" +msgstr "Tipo di composito" msgid "RGB type" -msgstr "Tipo RGB" +msgstr "Tipo di RGB" msgid "Line doubling type" msgstr "Tipo di raddoppio della linea" msgid "Snow emulation" -msgstr "Emulazione della neve" +msgstr "Emulazione effetto neve CGA" msgid "Monitor type" msgstr "Tipo di monitor" @@ -1687,7 +2230,7 @@ msgid "Character set" msgstr "Set di caratteri" msgid "XGA type" -msgstr "Tipo XGA" +msgstr "Tipo di XGA" msgid "Instance" msgstr "Istanza" @@ -1701,32 +2244,38 @@ msgstr "Tipo di RAMDAC" msgid "Blend" msgstr "Miscela" +msgid "Font" +msgstr "Carattere" + msgid "Bilinear filtering" -msgstr "Filtraggio bilineare" +msgstr "Filtro bilineare" + +msgid "Video chroma-keying" +msgstr "Chiave cromatica video" msgid "Dithering" -msgstr "Dithering" +msgstr "Retinatura" msgid "Enable NMI for CGA emulation" msgstr "Abilita l'NMI per l'emulazione CGA" msgid "Voodoo type" -msgstr "Tipo Voodoo" +msgstr "Tipo di scheda Voodoo" msgid "Framebuffer memory size" -msgstr "Dimensione della memoria del framebuffer" +msgstr "Dimensione memoria framebuffer" msgid "Texture memory size" -msgstr "Dimensione della memoria della texture" +msgstr "Dimensione memoria texture" msgid "Dither subtraction" -msgstr "Sottrazione della retinatura" +msgstr "Sottrazione retinatura" msgid "Screen Filter" msgstr "Filtro a schermo" msgid "Render threads" -msgstr "Fili di rendering" +msgstr "Thread di renderizzazione" msgid "SLI" msgstr "SLI" @@ -1746,11 +2295,38 @@ msgstr "Velocità di trasferimento" msgid "EMS mode" msgstr "Modalità EMS" +msgid "EMS Address" +msgstr "Indirizzo EMS" + +msgid "EMS 1 Address" +msgstr "Indirizzo EMS 1" + +msgid "EMS 2 Address" +msgstr "Indirizzo EMS 2" + +msgid "EMS Memory Size" +msgstr "Dimensione memoria EMS" + +msgid "EMS 1 Memory Size" +msgstr "Dimensione memoria EMS 1" + +msgid "EMS 2 Memory Size" +msgstr "Dimensione memoria EMS 2" + +msgid "Enable EMS" +msgstr "Abilita EMS" + +msgid "Enable EMS 1" +msgstr "Abilita EMS 1" + +msgid "Enable EMS 2" +msgstr "Abilita EMS 2" + msgid "Address for > 2 MB" msgstr "Indirizzo per > 2 MB" msgid "Frame Address" -msgstr "Indirizzo del frame" +msgstr "Indirizzo frame" msgid "USA" msgstr "Stati Uniti" @@ -1764,11 +2340,11 @@ msgstr "Sempre alla velocità selezionata" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "Impostazione BIOS + Tasti di scelta rapida (disattivati durante il POST)" -msgid "64 kB starting from F0000" -msgstr "64 kB a partire da F0000" +msgid "64 KB starting from F0000" +msgstr "64 KB a partire da F0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB a partire da E0000 (indirizzo MSB invertito, prima gli ultimi 64KB)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KB a partire da E0000 (indirizzo MSB invertito, prima gli ultimi 64 KB)" msgid "Sine" msgstr "Sinusoidale" @@ -1786,7 +2362,7 @@ msgid "7th Order" msgstr "Del 7° ordine" msgid "Non-timed (original)" -msgstr "Senza timer (originale)" +msgstr "Non temporizzato (originale)" msgid "45 Hz (JMP2 not populated)" msgstr "45 Hz (nessun ponticello su JMP2)" @@ -1798,13 +2374,13 @@ msgid "Three" msgstr "Tre" msgid "Wheel" -msgstr "Ruota" +msgstr "Rotellina" msgid "Five + Wheel" -msgstr "Cinque + ruota" +msgstr "Cinque + Rotellina" msgid "Five + 2 Wheels" -msgstr "" +msgstr "Cinque + 2 Rotelline" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 seriale / SMT3(R)V" @@ -1825,7 +2401,7 @@ msgid "64 KB" msgstr "64 KB" msgid "Disable BIOS" -msgstr "Disattivare il BIOS" +msgstr "Disabilita BIOS" msgid "512 KB" msgstr "512 KB" @@ -1869,6 +2445,9 @@ msgstr "256 KB" msgid "Composite" msgstr "Composito" +msgid "True color" +msgstr "Milioni di colori" + msgid "Old" msgstr "Vecchio" @@ -1879,16 +2458,16 @@ msgid "Color (generic)" msgstr "Colore (generico)" msgid "Green Monochrome" -msgstr "Verde Monocromatico" +msgstr "Monocromatico verde" msgid "Amber Monochrome" -msgstr "Ambra monocromatica" +msgstr "Monocromatico ambra" msgid "Gray Monochrome" -msgstr "Grigio monocromatico" +msgstr "Monocromatico grigio" msgid "Color (no brown)" -msgstr "Colore (no marrone)" +msgstr "Colore (senza marrone)" msgid "Color (IBM 5153)" msgstr "Colore (IBM 5153)" @@ -1902,6 +2481,15 @@ msgstr "Interpolazione sRGB" msgid "Linear interpolation" msgstr "Interpolazione lineare" +msgid "Has secondary 8x8 character set" +msgstr "Ha un set di caratteri 8x8 secondario" + +msgid "Has Quadcolor II daughter board" +msgstr "Ha una scheda figlia Quadcolor II" + +msgid "Alternate monochrome contrast" +msgstr "Contrasto monocromatico alternativo" + msgid "128 KB" msgstr "128 KB" @@ -1921,10 +2509,10 @@ msgid "Color 80x25 (5153/CGA)" msgstr "Colore 80x25 (5153/CGA)" msgid "Enhanced Color - Normal Mode (5154/ECD)" -msgstr "Colore avanzato - Modalità normale (5154/ECD)" +msgstr "Colore migliorato - Modalità normale (5154/ECD)" msgid "Enhanced Color - Enhanced Mode (5154/ECD)" -msgstr "Colore migliorato - Modalità migliorata (5154/ECD)" +msgstr "Colore migliorato - Modalità avanzata (5154/ECD)" msgid "Green" msgstr "Verde" @@ -1935,6 +2523,9 @@ msgstr "Ambra" msgid "Gray" msgstr "Grigio" +msgid "Grayscale" +msgstr "Scala di grigi" + msgid "Color" msgstr "Colore" @@ -1948,20 +2539,29 @@ msgid "Other languages" msgstr "Altre lingue" msgid "Bochs latest" -msgstr "Bochs ultima versione" +msgstr "Ultima versione di Bochs" + +msgid "Apply overscan deltas" +msgstr "Applicare delta di sovrascansione" + +msgid "Mono Interlaced" +msgstr "Monocromatico interlacciato" msgid "Mono Non-Interlaced" -msgstr "Mono non interlacciato" +msgstr "Monocromatico non interlacciato" msgid "Color Interlaced" -msgstr "Colore interlacciato" +msgstr "A colori interlacciato" msgid "Color Non-Interlaced" -msgstr "Colore non interlacciato" +msgstr "A colori non interlacciato" msgid "3Dfx Voodoo Graphics" msgstr "Grafica 3Dfx Voodoo" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 TMU)" @@ -2002,22 +2602,22 @@ msgid "Generic PCL5e Printer" msgstr "Stampante PCL5e generica" msgid "Parallel Line Internet Protocol" -msgstr "Linea parallela Protocollo Internet" +msgstr "Protocollo Internet a linea parallela" msgid "Protection Dongle for Savage Quest" -msgstr "Dongle di protezione per Savage Quest" +msgstr "Supporto di protezione per Savage Quest" msgid "Serial Passthrough Device" -msgstr "Dispositivo del passaggio della porta seriale" +msgstr "Dispositivo passaggio porta seriale" msgid "Passthrough Mode" -msgstr "Modalità del passaggio" +msgstr "Modalità passaggio" msgid "Host Serial Device" msgstr "Dispositivo seriale host" msgid "Name of pipe" -msgstr "Nome del tubo" +msgstr "Nome pipe" msgid "Data bits" msgstr "Bit di dati" @@ -2029,10 +2629,13 @@ msgid "Baud Rate of Passthrough" msgstr "Velocità di trasmissione in baud del passaggio" msgid "Named Pipe (Server)" -msgstr "Tubo denominato (Server)" +msgstr "Pipe denominata (Server)" + +msgid "Named Pipe (Client)" +msgstr "Pipe denominata (Client)" msgid "Host Serial Passthrough" -msgstr "Passaggio della porta seriale host" +msgstr "Passaggio porta seriale host" msgid "E&ject %1" msgstr "&Espelli %1" @@ -2044,106 +2647,310 @@ msgid "Softfloat FPU" msgstr "FPU Softfloat" msgid "High performance impact" -msgstr "Impatto elevato sulla prestazione" +msgstr "Impatto elevato sulle prestazioni" msgid "[Generic] RAM Disk (max. speed)" -msgstr "[Generic] Disco RAM (velocità massima)" +msgstr "[Generico] Disco RAM (velocità massima)" msgid "[Generic] 1989 (3500 RPM)" -msgstr "" +msgstr "[Generico] 1989 (3500 RPM)" msgid "[Generic] 1992 (3600 RPM)" -msgstr "" +msgstr "[Generico] 1992 (3600 RPM)" msgid "[Generic] 1994 (4500 RPM)" -msgstr "" +msgstr "[Generico] 1994 (4500 RPM)" msgid "[Generic] 1996 (5400 RPM)" -msgstr "" +msgstr "[Generico] 1996 (5400 RPM)" msgid "[Generic] 1997 (5400 RPM)" -msgstr "" +msgstr "[Generico] 1997 (5400 RPM)" msgid "[Generic] 1998 (5400 RPM)" -msgstr "" +msgstr "[Generico] 1998 (5400 RPM)" msgid "[Generic] 2000 (7200 RPM)" -msgstr "" +msgstr "[Generico] 2000 (7200 RPM)" msgid "IBM 8514/A clone (ISA)" msgstr "Clone IBM 8514/A (ISA)" msgid "Vendor" -msgstr "Fabricante" +msgstr "Produttore" + +msgid "30 Hz (JMP2 = 1)" +msgstr "30 Hz (JMP2 = 1)" + +msgid "60 Hz (JMP2 = 2)" +msgstr "60 Hz (JMP2 = 2)" msgid "Generic PC/XT Memory Expansion" -msgstr "Espansione di memoria generica PC/XT" +msgstr "Espansione di memoria PC/XT generica" msgid "Generic PC/AT Memory Expansion" -msgstr "Espansione di memoria generica PC/AT" +msgstr "Espansione di memoria PC/AT generica" msgid "Unable to find Dot-Matrix fonts" -msgstr "Impossibile trovare i font a matrice di punti" +msgstr "Impossibile trovare i caratteri a matrice di punti" msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "I font TrueType presenti nella directory \"roms/printer/fonts\" sono necessari per l'emulazione della stampante a matrice di punti ESC/P generica." +msgstr "I caratteri TrueType presenti nella directory \"roms/printer/fonts\" sono necessari per l'emulazione della stampante a matrice di punti ESC/P generica." msgid "Inhibit multimedia keys" -msgstr "" +msgstr "Inibisci i tasti multimediali" msgid "Ask for confirmation before saving settings" -msgstr "" +msgstr "Chiedi conferma prima di salvare le impostazioni" msgid "Ask for confirmation before hard resetting" -msgstr "" +msgstr "Chiedi conferma prima di riavviare" msgid "Ask for confirmation before quitting" -msgstr "" +msgstr "Chiedi conferma prima di uscire" msgid "Options" -msgstr "" +msgstr "Opzioni" msgid "Model" -msgstr "" +msgstr "Modello" msgid "Model:" -msgstr "" +msgstr "Modello:" msgid "Failed to initialize Vulkan renderer." -msgstr "" +msgstr "Impossibile inizializzare il renderizzatore Vulkan." msgid "GLSL Error" -msgstr "" +msgstr "Errore GLSL" msgid "Could not load shader: %1" -msgstr "" +msgstr "Impossibile caricare lo shader: %1" msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" -msgstr "" +msgstr "È richiesta la versione 3.0 di OpenGL o successiva. La versione GLSL corrente è %1.%2" msgid "Could not load texture: %1" -msgstr "" +msgstr "Impossibile caricare la texture: %1" msgid "Could not compile shader:\n\n%1" -msgstr "" +msgstr "Impossibile compilare lo shader:\n\n%1" msgid "Program not linked:\n\n%1" -msgstr "" +msgstr "Programma non collegato:\n\n%1" msgid "Shader Manager" -msgstr "" +msgstr "Gestore shader" msgid "Shader Configuration" -msgstr "" +msgstr "Configurazione shader" msgid "Add" -msgstr "" +msgstr "Aggiungi" msgid "Move up" -msgstr "" +msgstr "Sposta su" msgid "Move down" -msgstr "" +msgstr "Sposta giù" msgid "Could not load file %1" -msgstr "" +msgstr "Impossibile caricare il file %1" + +msgid "Key Bindings:" +msgstr "Associazione dei tasti:" + +msgid "Action" +msgstr "Azione" + +msgid "Keybind" +msgstr "Tasto associato" + +msgid "Clear binding" +msgstr "Rimuovi associazione" + +msgid "Bind" +msgstr "Associa" + +msgid "Bind Key" +msgstr "Associa tasto" + +msgid "Enter key combo:" +msgstr "Inserisci combinazione tasti:" + +msgid "Bind conflict" +msgstr "Associazione in conflitto" + +msgid "This key combo is already in use." +msgstr "Questa combinazione di tasti è già in uso." + +msgid "Send Control+Alt+Del" +msgstr "Invia Ctrl+Alt+Canc" + +msgid "Send Control+Alt+Escape" +msgstr "Invia Ctrl+Alt+Esc" + +msgid "Toggle fullscreen" +msgstr "Attiva/disattiva schermo intero" + +msgid "Screenshot" +msgstr "Istantanea dello schermo" + +msgid "Release mouse pointer" +msgstr "Rilascia il puntatore del mouse" + +msgid "Toggle pause" +msgstr "Attiva/disattiva pausa" + +msgid "Toggle mute" +msgstr "Attiva/disattiva audio" + +msgid "Text files" +msgstr "File di testo" + +msgid "ROM files" +msgstr "File ROM" + +msgid "SoundFont files" +msgstr "File SoundFont" + +msgid "Local Switch" +msgstr "Commutatore locale" + +msgid "Remote Switch" +msgstr "Commutatore remoto" + +msgid "Switch:" +msgstr "Commutatore:" + +msgid "Hub Mode" +msgstr "Modalità Hub" + +msgid "Hostname:" +msgstr "Nome host:" + +msgid "ISA RAM:" +msgstr "RAM ISA:" + +msgid "ISA ROM:" +msgstr "ROM ISA:" + +msgid "&Wipe NVRAM" +msgstr "&Cancella NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Questa operazione eliminerà tutti i file NVRAM (e correlati) della macchina virtuale situati nella sottodirectory \"nvr\". Sarà necessario riconfigurare nuovamente le impostazioni del BIOS e, eventualmente, di altri dispositivi all'interno della macchina virtuale.\n\nSei sicuro di voler cancellare tutto il contenuto della NVRAM della macchina virtuale \"%1\"?" + +msgid "Success" +msgstr "Successo" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Contenuto della NVRAM della macchina virtuale \"%1\" cancellato con successo" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Si è verificato un errore durante il tentativo di cancellare il contenuto della NVRAM della macchina virtuale \"%1\"" + +msgid "%1 VM Manager" +msgstr "Gestore macchine virtuali di %1" + +msgid "%n disk(s)" +msgstr "%n disco/i" + +msgid "Unknown Status" +msgstr "Stato sconosciuto" + +msgid "No Machines Found!" +msgstr "Nessuna macchina trovata!" + +msgid "Check for updates on startup" +msgstr "Verifica la disponibilità degli aggiornamenti all'avvio" + +msgid "Unable to determine release information" +msgstr "Impossibile determinare le informazioni sulla versione" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Si è verificato un errore durante la verifica degli aggiornamenti:\n\n%1\n\nRiprova più tardi." + +msgid "Update check complete" +msgstr "Ricerca degli aggiornamenti completata" + +msgid "stable" +msgstr "stabile" + +msgid "beta" +msgstr "beta" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Stai utilizzando l'ultima versione %1 di 86Box: %2" + +msgid "version" +msgstr "versione" + +msgid "build" +msgstr "build" + +msgid "You are currently running version %1." +msgstr "Stai attualmente utilizzando la versione %1." + +msgid "Version %1 is now available." +msgstr "La versione %1 è ora disponibile." + +msgid "You are currently running build %1." +msgstr "Stai attualmente utilizzando la build %1." + +msgid "Build %1 is now available." +msgstr "La build %1 è ora disponibile." + +msgid "Would you like to visit the download page?" +msgstr "Vuoi visitare la pagina per scaricare la nuova versione?" + +msgid "Visit download page" +msgstr "Visita la pagina" + +msgid "Update check" +msgstr "Verifica disponibilità degli aggiornamenti" + +msgid "Checking for updates..." +msgstr "Ricerca degli aggiornamenti..." + +msgid "86Box Update" +msgstr "Aggiornamento di 86Box" + +msgid "Release notes:" +msgstr "Note di rilascio:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Arresto anomalo della macchina virtuale" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "Il processo della macchina virtuale \"%1\" è terminato inaspettatamente con il codice di uscita %2." + +msgid "The system will not be added." +msgstr "Il sistema non verrà aggiunto." + +msgid "&Update mouse every CPU frame" +msgstr "&Aggiorna stato del mouse ad ogni blocco della CPU" + +msgid "Hue" +msgstr "Tinta" + +msgid "Saturation" +msgstr "Saturazione" + +msgid "Contrast" +msgstr "Contrasto" + +msgid "Brightness" +msgstr "Luminosità" + +msgid "Sharpness" +msgstr "Nitidezza" + +msgid "&CGA composite settings..." +msgstr "Impostazioni video composito &CGA..." + +msgid "CGA composite settings" +msgstr "Impostazioni video composito CGA" diff --git a/src/qt/languages/ja-JP.po b/src/qt/languages/ja-JP.po index 5efd599ed..149170ae0 100644 --- a/src/qt/languages/ja-JP.po +++ b/src/qt/languages/ja-JP.po @@ -27,8 +27,14 @@ msgstr "Ctrl+Alt+Esc(&E)" msgid "&Pause" msgstr "一時停止(&P)" -msgid "E&xit..." -msgstr "終了(&X)..." +msgid "Pause" +msgstr "一時停止" + +msgid "Re&sume" +msgstr "再開する(&S)" + +msgid "E&xit" +msgstr "終了(&X)" msgid "&View" msgstr "表示(&V)" @@ -51,20 +57,17 @@ msgstr "レンダラー(&N)" msgid "&Qt (Software)" msgstr "Qt (ソフトウェア)(&Q)" -msgid "Qt (&OpenGL)" -msgstr "Qt (OpenGL)(&O)" - msgid "Open&GL (3.0 Core)" msgstr "OpenGL (3.0 Core)(&G)" msgid "&VNC" msgstr "VNC(&V)" -msgid "Specify dimensions..." -msgstr "ディメンションを指定..." +msgid "Specify &dimensions..." +msgstr "ディメンションを指定...(&D)" -msgid "F&orce 4:3 display ratio" -msgstr "4:3の縦横比を強制表示(&O)" +msgid "Force &4:3 display ratio" +msgstr "4:3の縦横比を強制表示(&4)" msgid "&Window scale factor" msgstr "ウィンドウの表示倍率(&W)" @@ -99,8 +102,8 @@ msgstr "7x(&7)" msgid "&8x" msgstr "8x(&8)" -msgid "Filter method" -msgstr "フィルター方式" +msgid "Fi<er method" +msgstr "フィルター方式(&L)" msgid "&Nearest" msgstr "最近傍補間(&N)" @@ -132,8 +135,8 @@ msgstr "整数倍(&I)" msgid "4:&3 Integer scale" msgstr "4:3 整数倍(&3)" -msgid "E&GA/(S)VGA settings" -msgstr "E&GA/(S)VGAの設定" +msgid "EGA/(S)&VGA settings" +msgstr "EGA/(S)&VGAの設定" msgid "&Inverted VGA monitor" msgstr "色反転(&I)" @@ -144,9 +147,15 @@ msgstr "画面タイプ(&T)" msgid "RGB &Color" msgstr "RGB(カラー)(&C)" +msgid "RGB (no brown)" +msgstr "RGB(茶色なし)" + msgid "&RGB Grayscale" msgstr "RGB(グレースケール)(&R)" +msgid "Generic RGBI color monitor" +msgstr "汎用RGBIカラーモニター" + msgid "&Amber monitor" msgstr "モニター(黄色)(&A)" @@ -183,6 +192,9 @@ msgstr "ツール(&T)" msgid "&Settings..." msgstr "設定(&S)..." +msgid "Settings..." +msgstr "設定..." + msgid "&Update status bar icons" msgstr "ステータスバーのアイコンを更新(&U)" @@ -348,6 +360,9 @@ msgstr "マシン:" msgid "Configure" msgstr "設定" +msgid "CPU:" +msgstr "CPU:" + msgid "CPU type:" msgstr "CPUタイプ:" @@ -384,6 +399,15 @@ msgstr "有効(UTC)" msgid "Dynamic Recompiler" msgstr "動的再コンパイル" +msgid "CPU frame size" +msgstr "CPUフレームサイズ" + +msgid "Larger frames (less smooth)" +msgstr "より大きなフレーム(滑らかさが劣る)" + +msgid "Smaller frames (smoother)" +msgstr "より小さなフレーム(より滑らか)" + msgid "Video:" msgstr "ビデオカード:" @@ -399,12 +423,27 @@ msgstr "IBM 8514/Aグラフィック" msgid "XGA Graphics" msgstr "XGAグラフィック" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "IBM PS/55ディスプレイアダプターグラフィックス" + +msgid "Keyboard:" +msgstr "キーボード:" + +msgid "Keyboard" +msgstr "キーボード" + msgid "Mouse:" msgstr "マウス:" +msgid "Mouse" +msgstr "マウス" + msgid "Joystick:" msgstr "ジョイスティック:" +msgid "Joystick" +msgstr "ジョイスティック" + msgid "Joystick 1..." msgstr "ジョイスティック1..." @@ -435,6 +474,9 @@ msgstr "MIDI出力デバイス:" msgid "MIDI In Device:" msgstr "MIDI入力デバイス:" +msgid "MIDI Out:" +msgstr "MIDI出力" + msgid "Standalone MPU-401" msgstr "独立型MPU-401" @@ -474,6 +516,9 @@ msgstr "LPT3デバイス:" msgid "LPT4 Device:" msgstr "LPT4デバイス:" +msgid "Internal LPT ECP DMA:" +msgstr "内部LPTのECPのDMA:" + msgid "Serial port 1" msgstr "シリアルポート1" @@ -498,18 +543,21 @@ msgstr "パラレルポート3" msgid "Parallel port 4" msgstr "パラレルポート4" -msgid "HD Controller:" -msgstr "HDDコントローラー:" - msgid "FD Controller:" msgstr "FDDコントローラー:" +msgid "CD-ROM Controller:" +msgstr "CD-ROMコントローラー:" + msgid "Tertiary IDE Controller" msgstr "第三IDEコントローラー" msgid "Quaternary IDE Controller" msgstr "第四IDEコントローラー" +msgid "Hard disk" +msgstr "ハードディスク" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "カセット" msgid "Hard disks:" msgstr "ハード ディスク:" +msgid "Firmware Version" +msgstr "ファームウェアバージョン" + msgid "&New..." msgstr "新規(&N)..." @@ -588,8 +639,14 @@ msgstr "CD-ROMドライブ:" msgid "MO drives:" msgstr "光磁気ドライブ:" -msgid "ZIP drives:" -msgstr "ZIPドライブ:" +msgid "MO:" +msgstr "光磁気:" + +msgid "Removable disks:" +msgstr "取り外し可能なディスク:" + +msgid "Removable disk drives:" +msgstr "取り外し可能なディスクドライブ:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "ISA RTCカード:" msgid "ISA Memory Expansion" msgstr "ISAメモリ拡張カード" +msgid "ISA ROM Cards" +msgstr "ISA ROMカード" + msgid "Card 1:" msgstr "カード1:" @@ -612,6 +672,15 @@ msgstr "カード3:" msgid "Card 4:" msgstr "カード4:" +msgid "Generic ISA ROM Board" +msgstr "汎用ISA ROMボード" + +msgid "Generic Dual ISA ROM Board" +msgstr "汎用デュアルISA ROMボード" + +msgid "Generic Quad ISA ROM Board" +msgstr "汎用クアッドISA ROMボード" + msgid "ISABugger device" msgstr "ISABuggerデバイス" @@ -633,11 +702,17 @@ msgstr " - 一時停止" msgid "Speed" msgstr "速度" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "取り外し可能なディスク %1 (%2): %3" -msgid "ZIP images" -msgstr "ZIPイメージ" +msgid "&Removable disk %1 (%2): %3" +msgstr "取り外し可能なディスク(&R) %1 (%2): %3" + +msgid "Removable disk images" +msgstr "取り外し可能なディスクイメージ" + +msgid "Image %1" +msgstr "イメージ %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "86Boxで使用可能なROMイメージが見つかりません。\n\nROMセットをダウンロードして、roms ディレクトリに解凍してください。" @@ -696,12 +771,30 @@ msgstr "ネットワーク" msgid "Ports (COM & LPT)" msgstr "ポート (COM/LPT)" +msgid "Ports" +msgstr "ポート" + +msgid "Serial ports:" +msgstr "シリアルポート:" + +msgid "Parallel ports:" +msgstr "パラレルポート:" + msgid "Storage controllers" msgstr "ストレージコントローラ" msgid "Hard disks" msgstr "ハードディスク" +msgid "Disks:" +msgstr "ディスク:" + +msgid "Floppy:" +msgstr "フロッピー:" + +msgid "Controllers:" +msgstr "コントローラ:" + msgid "Floppy & CD-ROM drives" msgstr "フロッピー/CD-ROMドライブ" @@ -711,6 +804,9 @@ msgstr "他のリムーバブルデバイス" msgid "Other peripherals" msgstr "他の周辺デバイス" +msgid "Other devices" +msgstr "他のデバイス" + msgid "Click to capture mouse" msgstr "左クリックでマウスをキャプチャします" @@ -777,21 +873,51 @@ msgstr "ジョイスティック(4軸、4ボタン)" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Pedals" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinderパッド" msgid "Thrustmaster Flight Control System" -msgstr "Thrustmaster飛行制御システム" +msgstr "Thrustmaster Flight Control System" + +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Rudder Control System" + +msgid "2-button gamepad(s)" +msgstr "2ボタン式ゲームパッド" + +msgid "2-button flight yoke" +msgstr "2ボタン式操縦桿" + +msgid "4-button gamepad" +msgstr "4ボタン式ゲームパッド" + +msgid "4-button flight yoke" +msgstr "4ボタン式操縦桿" + +msgid "2-button flight yoke with throttle" +msgstr "2ボタン式フライトヨーク(スロットル付き)" + +msgid "4-button flight yoke with throttle" +msgstr "4ボタン式フライトヨーク(スロットル付き)" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Win95 ステアリングホイール(3軸、4ボタン)" msgid "None" msgstr "なし" msgid "%1 MB (CHS: %2, %3, %4)" -msgstr "%u MB (CHS値: %i、%i、%i)" +msgstr "%1 MB (CHS値: %2、%3、%4)" msgid "Floppy %1 (%2): %3" msgstr "フロッピー %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "フロッピー %1 (%2): %3(&F)" + msgid "Advanced sector images" msgstr "アドバンスドセクターイメージ" @@ -813,6 +939,9 @@ msgstr "GhostPCLが初期化できません" msgid "MO %1 (%2): %3" msgstr "光磁気 %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "光磁気 %1 (%2): %3(&M)" + msgid "MO images" msgstr "光磁気イメージ" @@ -822,6 +951,15 @@ msgstr "86Boxへようこそ!" msgid "Internal device" msgstr "内蔵デバイス" +msgid "&File" +msgstr "ファイル(&F)" + +msgid "&New machine..." +msgstr "新しいマシン(&N)" + +msgid "&Check for updates..." +msgstr "アップデートを確認中(&C)..." + msgid "Exit" msgstr "終了" @@ -897,12 +1035,18 @@ msgstr "続行" msgid "Cassette: %1" msgstr "カセット: %1" +msgid "C&assette: %1" +msgstr "カセット: %1(&A)" + msgid "Cassette images" msgstr "カセットイメージ" msgid "Cartridge %1: %2" msgstr "カートリッジ %1: %2" +msgid "Car&tridge %1: %2" +msgstr "カートリッジ %1: %2(&T)" + msgid "Cartridge images" msgstr "カートリッジイメージ" @@ -912,6 +1056,9 @@ msgstr "実行を再開" msgid "Pause execution" msgstr "実行を一時停止" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Ctrl+Alt+DELを押す" @@ -921,9 +1068,279 @@ msgstr "Ctrl+Alt+Escを押す" msgid "Hard reset" msgstr "ハードリセット" +msgid "Force shutdown" +msgstr "強制終了" + +msgid "Start" +msgstr "スタート" + +msgid "Not running" +msgstr "停止した" + +msgid "Running" +msgstr "実行中" + +msgid "Paused" +msgstr "一時停止中" + +msgid "Waiting" +msgstr "待機中" + +msgid "Powered Off" +msgstr "電源オフ" + +msgid "%n running" +msgstr "%n 実行中" + +msgid "%n paused" +msgstr "%n 停止した" + +msgid "%n waiting" +msgstr "%n 待機中" + +msgid "%1 total" +msgstr "%1 は総数です" + +msgid "VMs: %1" +msgstr "仮想マシン: %1" + +msgid "System Directory:" +msgstr "システムディレクトリ:" + +msgid "Choose directory" +msgstr "ディレクトリを選択する" + +msgid "Choose configuration file" +msgstr "設定ファイルを選択する" + +msgid "86Box configuration files (86box.cfg)" +msgstr "86Box 設定ファイル (86box.cfg)" + +msgid "Configuration read failed" +msgstr "設定の読み込みに失敗しました" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "選択した設定ファイルを読み込むことができませんでした: %1" + +msgid "Use regular expressions in search box" +msgstr "検索ボックスで正規表現を使用する" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "現在、%1台の仮想マシンがアクティブです。それでもVMマネージャーを終了しますか?" + +msgid "Add new system wizard" +msgstr "新しいシステムを追加するためのウィザード" + +msgid "Introduction" +msgstr "序文" + +msgid "This will help you add a new system to 86Box." +msgstr "これにより、86Boxに新しいシステムを追加することができます。" + +msgid "New configuration" +msgstr "新しい構成" + +msgid "Complete" +msgstr "完了" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "ウィザードは、新しいシステムの構成を開始します。" + +msgid "Use existing configuration" +msgstr "既存の設定を使用する" + +msgid "Type some notes here" +msgstr "ここにメモを入力してください" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "既存の設定ファイルの内容を、以下のボックスに貼り付けてください。" + +msgid "Load configuration from file" +msgstr "ファイルから設定を読み込む" + +msgid "System name" +msgstr "システム名" + +msgid "System name:" +msgstr "システム名:" + +msgid "System name cannot contain certain characters" +msgstr "システム名には特定の文字を含めることはできません" + +msgid "System name already exists" +msgstr "システム名が既に存在しています" + +msgid "Please enter a directory for the system" +msgstr "システム用のディレクトリを入力してください" + +msgid "Directory does not exist" +msgstr "ディレクトリが存在しません" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "選択したディレクトリ上に、システム用の新しいディレクトリが作成されます" + +msgid "System location:" +msgstr "システム場所:" + +msgid "System name and location" +msgstr "システム名と場所" + +msgid "Enter the name of the system and choose the location" +msgstr "システムの名前を入力し、場所を選択してください" + +msgid "Enter the name of the system" +msgstr "システムの名前を入力してください" + +msgid "Please enter a system name" +msgstr "システムの名前を入力してください" + +msgid "Display name (optional):" +msgstr "表示名(任意):" + +msgid "Display name:" +msgstr "表示名:" + +msgid "Set display name" +msgstr "表示名を設定する" + +msgid "Enter the new display name (blank to reset)" +msgstr "新しい表示名を入力してください(空白にするとリセットされます)" + +msgid "Change &display name..." +msgstr "表示名を変更(&D)..." + +msgid "Context Menu" +msgstr "コンテキストメニュー" + +msgid "&Open folder..." +msgstr "フォルダーを開く(&O)..." + +msgid "Open p&rinter tray..." +msgstr "プリンタートレイを開く(&R)..." + +msgid "Set &icon..." +msgstr "アイコンを設定(&I)..." + +msgid "Select an icon" +msgstr "アイコンを選択してください" + +msgid "C&lone..." +msgstr "クローン(&L)..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "仮想マシン\"%1\" (%2)は、以下の場所にクローンされます:" + +msgid "Directory %1 already exists" +msgstr "ディレクトリ %1 は既に存在します" + +msgid "You cannot use the following characters in the name: %1" +msgstr "名前には以下の文字を使用できません: %1" + +msgid "Clone" +msgstr "クローン" + +msgid "Failed to create directory for cloned VM" +msgstr "クローンされたVM用のディレクトリを作成できませんでした" + +msgid "Failed to clone VM." +msgstr "仮想マシンのクローン作成に失敗しました。" + +msgid "Directory in use" +msgstr "使用中のディレクトリ" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "選択したディレクトリは既に使用中です。別のディレクトリを選択してください。" + +msgid "Create directory failed" +msgstr "ディレクトリの作成に失敗しました" + +msgid "Unable to create the directory for the new system" +msgstr "新しいシステム用のディレクトリを作成できませんでした" + +msgid "Configuration write failed" +msgstr "設定の書き込みに失敗しました" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "%1 の設定ファイルを書き込み用に開くことができません" + +msgid "Error adding system" +msgstr "システム追加エラー" + +msgid "Remove directory failed" +msgstr "ディレクトリの削除に失敗しました" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "マシンのディレクトリ内のいくつかのファイルが削除できませんでした。手動で削除してください。" + +msgid "Build" +msgstr "ビルド" + +msgid "Version" +msgstr "バージョン" + +msgid "An update to 86Box is available: %1 %2" +msgstr "86Boxのアップデートが利用可能です: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "アップデートの確認中にエラーが発生しました: %1" + +msgid "An update to 86Box is available!" +msgstr "86Boxのアップデートが利用可能になりました!" + +msgid "Warning" +msgstr "警告" + +msgid "&Kill" +msgstr "強制的に終了する(&K)" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "仮想マシンを強制終了すると、データが失われる可能性があります。86Boxプロセスが応答しなくなった場合のみ、この操作を行ってください。\n\n本当に仮想マシン\"%1\"を終了しますか?" + +msgid "&Delete" +msgstr "削除(&D)" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "本当に仮想マシン\"%1\"とそのすべてのファイルを削除しますか? この操作は元に戻せません!" + +msgid "Show &config file" +msgstr "設定ファイルを表示する(&C)" + +msgid "No screenshot" +msgstr "スクリーンショットなし" + +msgid "Search" +msgstr "検索" + +msgid "Searching for VMs..." +msgstr "仮想マシンを検索中..." + +msgid "Found %1" +msgstr "%1が見つかりました" + +msgid "System" +msgstr "システム" + +msgid "Storage" +msgstr "ストレージ" + +msgid "Disk %1: " +msgstr "ディスク %1:" + +msgid "No disks" +msgstr "ディスクなし" + +msgid "Audio" +msgstr "音声" + +msgid "Audio:" +msgstr "音声:" + msgid "ACPI shutdown" msgstr "ACPIシャットダウン" +msgid "ACP&I shutdown" +msgstr "ACP&Iシャットダウン" + msgid "Hard disk (%1)" msgstr "ハードディスク (%1)" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 KB" @@ -1209,41 +1629,38 @@ msgstr "MCAデバイス" msgid "List of MCA devices:" msgstr "MCAデバイスのリスト:" -msgid "Tablet tool" -msgstr "タブレットツール" +msgid "&Tablet tool" +msgstr "タブレットツール(&T)" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "&Qtについて" -msgid "About Qt" -msgstr "Qtについて" +msgid "&MCA devices..." +msgstr "&MCAデバイス..." -msgid "MCA devices..." -msgstr "MCAデバイス..." +msgid "Show non-&primary monitors" +msgstr "プライマリーモニター以外のモニターを表示する(&P)" -msgid "Show non-primary monitors" -msgstr "プライマリーモニター以外のモニターを表示する" +msgid "Open screenshots &folder..." +msgstr "スクリーンショットフォルダを開く(&F)" -msgid "Open screenshots folder..." -msgstr "スクリーンショットフォルダを開く" +msgid "Appl&y fullscreen stretch mode when maximized" +msgstr "最大化時にフルスクリーンストレッチモードを適用(&Y)" -msgid "Apply fullscreen stretch mode when maximized" -msgstr "最大化時にフルスクリーンストレッチモードを適用" +msgid "&Cursor/Puck" +msgstr "カーソル/パック(&C)" -msgid "Cursor/Puck" -msgstr "カーソル/パック" +msgid "&Pen" +msgstr "ペン(&P)" -msgid "Pen" -msgstr "ペン" - -msgid "Host CD/DVD Drive (%1:)" -msgstr "ホスト CD/DVD ドライブ (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "ホスト CD/DVD ドライブ (%1:) (&H)" msgid "&Connected" msgstr "コネクテッド" -msgid "Clear image history" -msgstr "クリア画像履歴" +msgid "Clear image &history" +msgstr "クリア画像履歴(&H)" msgid "Create..." msgstr "作成..." @@ -1257,9 +1674,15 @@ msgstr "不明なバス" msgid "Null Driver" msgstr "ヌル・ドライバー" +msgid "NIC:" +msgstr "NIC:" + msgid "NIC %1 (%2) %3" msgstr "NIC %1 (%2) %3" +msgid "&NIC %1 (%2) %3" +msgstr "&NIC %1 (%2) %3" + msgid "Render behavior" msgstr "レンダリング動作" @@ -1323,6 +1746,9 @@ msgstr "MCAデバイスはない。" msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" msgstr "ネットワークカード 1" @@ -1365,8 +1791,26 @@ msgstr "シリアル・ポート・パススルー 3" msgid "Serial port passthrough 4" msgstr "シリアル・ポート・パススルー 4" -msgid "Renderer options..." -msgstr "レンダラー設定..." +msgid "Renderer &options..." +msgstr "レンダラー設定...(&O)" + +msgid "PC/XT Keyboard" +msgstr "PC/XT キーボード" + +msgid "AT Keyboard" +msgstr "AT キーボード" + +msgid "AX Keyboard" +msgstr "AX キーボード" + +msgid "PS/2 Keyboard" +msgstr "PS/2 キーボード" + +msgid "PS/55 Keyboard" +msgstr "PS/55 キーボード" + +msgid "Keys" +msgstr "キー" msgid "Logitech/Microsoft Bus Mouse" msgstr "Logitech/Microsoft バスマウス" @@ -1377,18 +1821,30 @@ msgstr "Microsoft バスマウス(InPort)" msgid "Mouse Systems Serial Mouse" msgstr "Mouse Systems シリアルマウス" +msgid "Mouse Systems Bus Mouse" +msgstr "Mouse Systems バスマウス" + msgid "Microsoft Serial Mouse" msgstr "Microsoft シリアルマウス" +msgid "Microsoft Serial BallPoint" +msgstr "Microsoft BallPoint シリアルマウス" + msgid "Logitech Serial Mouse" msgstr "Logitech シリアルマウス" msgid "PS/2 Mouse" msgstr "PS/2マウス" +msgid "PS/2 QuickPort Mouse" +msgstr "PS/2 QuickPortマウス" + msgid "3M MicroTouch (Serial)" msgstr "3Mマイクロタッチ(シリアル)" +msgid "Default Baud rate" +msgstr "デフォルトのボーレート" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] 標準ヘイズ準拠モデム" @@ -1413,21 +1869,81 @@ msgstr "システムMIDI" msgid "MIDI Input Device" msgstr "MIDI入力デバイス" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "BIOSファイル" + +msgid "BIOS file (ROM #1)" +msgstr "BIOSファイル (ROM 1)" + +msgid "BIOS file (ROM #2)" +msgstr "BIOSファイル (ROM 2)" + +msgid "BIOS file (ROM #3)" +msgstr "BIOSファイル (ROM 3)" + +msgid "BIOS file (ROM #4)" +msgstr "BIOSファイル (ROM 4)" + +msgid "BIOS address" msgstr "BIOSアドレス" +msgid "BIOS address (ROM #1)" +msgstr "BIOSアドレス (ROM 1)" + +msgid "BIOS address (ROM #2)" +msgstr "BIOSアドレス (ROM 2)" + +msgid "BIOS address (ROM #3)" +msgstr "BIOSアドレス (ROM 3)" + +msgid "BIOS address (ROM #4)" +msgstr "BIOSアドレス (ROM 4)" + msgid "Enable BIOS extension ROM Writes" msgstr "BIOS拡張ROM書き込みを有効にする" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "BIOS拡張ROM書き込みを有効にする (ROM 1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "BIOS拡張ROM書き込みを有効にする (ROM 2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "BIOS拡張ROM書き込みを有効にする (ROM 3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "BIOS拡張ROM書き込みを有効にする (ROM 4)" + +msgid "Linear framebuffer base" +msgstr "線形フレームバッファのベースアドレス" + msgid "Address" msgstr "アドレス" msgid "IRQ" msgstr "割り込み要求" +msgid "Serial port IRQ" +msgstr "シリアルポートのIRQ" + +msgid "Parallel port IRQ" +msgstr "パラレルポートのIRQ" + msgid "BIOS Revision" msgstr "BIOSリビジョン" +msgid "BIOS Version" +msgstr "BIOSバージョン" + +msgid "BIOS Language" +msgstr "BIOS言語" + +msgid "IBM 5161 Expansion Unit" +msgstr "IBM 5161拡張ユニット" + +msgid "IBM Cassette Basic" +msgstr "IBM カセット BASIC" + msgid "Translate 26 -> 17" msgstr "26→17を翻訳" @@ -1443,6 +1959,18 @@ msgstr "色の反転" msgid "BIOS size" msgstr "BIOSサイズ" +msgid "BIOS size (ROM #1)" +msgstr "BIOSサイズ (ROM 1)" + +msgid "BIOS size (ROM #2)" +msgstr "BIOSサイズ (ROM 2)" + +msgid "BIOS size (ROM #3)" +msgstr "BIOSサイズ (ROM 3)" + +msgid "BIOS size (ROM #4)" +msgstr "BIOSサイズ (ROM 4)" + msgid "Map C0000-C7FFF as UMB" msgstr "C0000-C7FFFをUMBとしてマップ" @@ -1518,6 +2046,9 @@ msgstr "リバーブ・レベル" msgid "Interpolation Method" msgstr "補間法" +msgid "Dynamic Sample Loading" +msgstr "サンプルの動的ロード" + msgid "Reverb Output Gain" msgstr "リバーブ出力のゲイン" @@ -1605,6 +2136,12 @@ msgstr "低DMA" msgid "Enable Game port" msgstr "ゲームポートを有効にする" +msgid "SID Model" +msgstr "SIDモデル" + +msgid "SID Filter Strength" +msgstr "SIDフィルターの強度" + msgid "Surround module" msgstr "サラウンド・モジュール" @@ -1617,6 +2154,12 @@ msgstr "CODECセットアップ時にCODEC割り込みを発生させる(一部 msgid "SB Address" msgstr "SBアドレス" +msgid "Adlib Address" +msgstr "Adlibアドレス" + +msgid "Use EEPROM setting" +msgstr "EEPROMの設定を使用する" + msgid "WSS IRQ" msgstr "WSS IRQ" @@ -1701,9 +2244,15 @@ msgstr "RAMDACタイプ" msgid "Blend" msgstr "ブレンド" +msgid "Font" +msgstr "フォント" + msgid "Bilinear filtering" msgstr "バイリニア・フィルタリング" +msgid "Video chroma-keying" +msgstr "ビデオのクロマキー処理" + msgid "Dithering" msgstr "ディザリング" @@ -1746,6 +2295,33 @@ msgstr "転送速度" msgid "EMS mode" msgstr "EMSモード" +msgid "EMS Address" +msgstr "EMSアドレス" + +msgid "EMS 1 Address" +msgstr "EMS 1アドレス" + +msgid "EMS 2 Address" +msgstr "EMS 2アドレス" + +msgid "EMS Memory Size" +msgstr "EMSメモリ容量" + +msgid "EMS 1 Memory Size" +msgstr "EMS 1メモリ容量" + +msgid "EMS 2 Memory Size" +msgstr "EMS 2メモリ容量" + +msgid "Enable EMS" +msgstr "EMSを有効にする" + +msgid "Enable EMS 1" +msgstr "EMS 1を有効にする" + +msgid "Enable EMS 2" +msgstr "EMS 2を有効にする" + msgid "Address for > 2 MB" msgstr "2MB以上のアドレス" @@ -1764,10 +2340,10 @@ msgstr "常に選択された速度" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "BIOS設定+ホットキー(POST中はオフ)" -msgid "64 kB starting from F0000" +msgid "64 KB starting from F0000" msgstr "F0000から始まる64キロバイト" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" msgstr "E0000から始まる128キロバイト(アドレスMSBが反転、最後の64キロバイトが最初)" msgid "Sine" @@ -1804,7 +2380,7 @@ msgid "Five + Wheel" msgstr "五つ+ホイール" msgid "Five + 2 Wheels" -msgstr "" +msgstr "五つ+2輪のホイール" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 シリアル / SMT3(R)V" @@ -1869,6 +2445,9 @@ msgstr "256 KB" msgid "Composite" msgstr "コンポジット" +msgid "True color" +msgstr "真の色" + msgid "Old" msgstr "古い" @@ -1902,6 +2481,15 @@ msgstr "sRGB補間" msgid "Linear interpolation" msgstr "線形補間" +msgid "Has secondary 8x8 character set" +msgstr "8×8のセカンダリ文字セット" + +msgid "Has Quadcolor II daughter board" +msgstr "Quadcolor IIの拡張ボード" + +msgid "Alternate monochrome contrast" +msgstr "代替モノクロームコントラスト" + msgid "128 KB" msgstr "128 KB" @@ -1935,6 +2523,9 @@ msgstr "鼈甲色" msgid "Gray" msgstr "ねずみ色" +msgid "Grayscale" +msgstr "グレイスケール" + msgid "Color" msgstr "カラー" @@ -1950,6 +2541,12 @@ msgstr "その他の言語" msgid "Bochs latest" msgstr "Bochs latest" +msgid "Apply overscan deltas" +msgstr "オーバースキャンデルタを適用する" + +msgid "Mono Interlaced" +msgstr "モノラル・インターレース" + msgid "Mono Non-Interlaced" msgstr "モノラル・ノンインターレース" @@ -1962,6 +2559,9 @@ msgstr "カラー・ノンインターレース" msgid "3Dfx Voodoo Graphics" msgstr "3dfx Voodooグラフィック" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst(2 TMU単位)" @@ -2029,7 +2629,10 @@ msgid "Baud Rate of Passthrough" msgstr "パススルーのボーレート" msgid "Named Pipe (Server)" -msgstr "名前付きパイプ(サーバー)" +msgstr "名前付きパイプ(サーバー)" + +msgid "Named Pipe (Client)" +msgstr "名前付きパイプ(クライアント)" msgid "Host Serial Passthrough" msgstr "ホストシリアルポートのパススルー" @@ -2047,28 +2650,28 @@ msgid "High performance impact" msgstr "パフォーマンスへの影響が大きい" msgid "[Generic] RAM Disk (max. speed)" -msgstr "[Generic] RAMディスク(最高速度)" +msgstr "[汎用] RAMディスク(最高速度)" msgid "[Generic] 1989 (3500 RPM)" -msgstr "" +msgstr "[汎用] 1989 (3500 RPM)" msgid "[Generic] 1992 (3600 RPM)" -msgstr "" +msgstr "[汎用] 1992 (3600 RPM)" msgid "[Generic] 1994 (4500 RPM)" -msgstr "" +msgstr "[汎用] 1994 (4500 RPM)" msgid "[Generic] 1996 (5400 RPM)" -msgstr "" +msgstr "[汎用] 1996 (5400 RPM)" msgid "[Generic] 1997 (5400 RPM)" -msgstr "" +msgstr "[汎用] 1997 (5400 RPM)" msgid "[Generic] 1998 (5400 RPM)" -msgstr "" +msgstr "[汎用] 1998 (5400 RPM)" msgid "[Generic] 2000 (7200 RPM)" -msgstr "" +msgstr "[汎用] 2000 (7200 RPM)" msgid "IBM 8514/A clone (ISA)" msgstr "IBM 8514/A クローン(ISA)" @@ -2076,6 +2679,12 @@ msgstr "IBM 8514/A クローン(ISA)" msgid "Vendor" msgstr "業者" +msgid "30 Hz (JMP2 = 1)" +msgstr "30 Hz (JMP2 = 1)" + +msgid "60 Hz (JMP2 = 2)" +msgstr "60 Hz (JMP2 = 2)" + msgid "Generic PC/XT Memory Expansion" msgstr "汎用PC/XTメモリ拡張カード" @@ -2089,61 +2698,259 @@ msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for t msgstr "汎用ESC/Pドットマトリクスプリンタのエミュレーションには、roms/printer/fontsディレクトリ内のTrueTypeフォントが必要です。" msgid "Inhibit multimedia keys" -msgstr "" +msgstr "マルチメディアキーを無効にする" msgid "Ask for confirmation before saving settings" -msgstr "" +msgstr "設定を保存する前に確認を求めます" msgid "Ask for confirmation before hard resetting" -msgstr "" +msgstr "ハードリセットを行う前に確認を求めます" msgid "Ask for confirmation before quitting" -msgstr "" +msgstr "終了する前に確認を求めます" msgid "Options" -msgstr "" +msgstr "オプション" msgid "Model" -msgstr "" +msgstr "モデル" msgid "Model:" -msgstr "" +msgstr "モデル:" msgid "Failed to initialize Vulkan renderer." -msgstr "" +msgstr "Vulkanレンダラーの初期化に失敗しました。" msgid "GLSL Error" -msgstr "" +msgstr "GLSLエラー" msgid "Could not load shader: %1" -msgstr "" +msgstr "シェーダーを読み込めませんでした: %1" msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" -msgstr "" +msgstr "OpenGLバージョン 3.0 以上が必要です。現在のGLSLバージョンは %1.%2 です。" msgid "Could not load texture: %1" -msgstr "" +msgstr "テクスチャを読み込めませんでした: %1" msgid "Could not compile shader:\n\n%1" -msgstr "" +msgstr "シェーダーをコンパイルできませんでした:\n\n%1" msgid "Program not linked:\n\n%1" -msgstr "" +msgstr "プログラムがリンクされていません:\n\n%1" msgid "Shader Manager" -msgstr "" +msgstr "シェーダーマネージャー" msgid "Shader Configuration" -msgstr "" +msgstr "シェーダー設定" msgid "Add" -msgstr "" +msgstr "追加" msgid "Move up" -msgstr "" +msgstr "昇進する" msgid "Move down" -msgstr "" +msgstr "下に移動する" msgid "Could not load file %1" -msgstr "" +msgstr "ファイル %1 をロードできませんでした" + +msgid "Key Bindings:" +msgstr "キーバインド:" + +msgid "Action" +msgstr "アクション" + +msgid "Keybind" +msgstr "キーバインド" + +msgid "Clear binding" +msgstr "バインドを解除する" + +msgid "Bind" +msgstr "バインド" + +msgid "Bind Key" +msgstr "キーのバインド" + +msgid "Enter key combo:" +msgstr "キーの組み合わせを入力してください:" + +msgid "Bind conflict" +msgstr "バインド競合" + +msgid "This key combo is already in use." +msgstr "このキーの組み合わせは既に使用中です。" + +msgid "Send Control+Alt+Del" +msgstr "Ctrl+Alt+Delを送信" + +msgid "Send Control+Alt+Escape" +msgstr "Ctrl+Alt+Escを送信" + +msgid "Toggle fullscreen" +msgstr "フルスクリーン表示を切り替える" + +msgid "Screenshot" +msgstr "スクリーンショット" + +msgid "Release mouse pointer" +msgstr "マウスポインターを解放する" + +msgid "Toggle pause" +msgstr "一時停止を切り替える" + +msgid "Toggle mute" +msgstr "ミュートを切り替える" + +msgid "Text files" +msgstr "テキストファイル" + +msgid "ROM files" +msgstr "ROMファイル" + +msgid "SoundFont files" +msgstr "SoundFontファイル" + +msgid "Local Switch" +msgstr "ローカルスイッチ" + +msgid "Remote Switch" +msgstr "リモートスイッチ" + +msgid "Switch:" +msgstr "スイッチ:" + +msgid "Hub Mode" +msgstr "ハブモード" + +msgid "Hostname:" +msgstr "ホスト名:" + +msgid "ISA RAM:" +msgstr "ISA RAM:" + +msgid "ISA ROM:" +msgstr "ISA ROM:" + +msgid "&Wipe NVRAM" +msgstr "NVRAMを消去する(&W)" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "これによって、仮想マシン内の\"nvr\"サブディレクトリに格納されているすべてのNVRAM(および関連)ファイルが削除されます。必要に応じて、BIOSの設定(および仮想マシン内の他のデバイス設定)を再構成する必要があります。\n\n仮想マシン\"%1\"のすべてのNVRAM内容を削除してもよろしいですか?" + +msgid "Success" +msgstr "成功" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "仮想マシン\"%1\"のNVRAMの内容を正常に消去しました" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "仮想マシン\"%1\"のNVRAMの内容を消去しようとした際にエラーが発生しました" + +msgid "%1 VM Manager" +msgstr "%1 VMマネージャー" + +msgid "%n disk(s)" +msgstr "%n ディスク" + +msgid "Unknown Status" +msgstr "不明な状態" + +msgid "No Machines Found!" +msgstr "マシンが検出されません!" + +msgid "Check for updates on startup" +msgstr "起動時にアップデートを確認する" + +msgid "Unable to determine release information" +msgstr "リリース情報を確認できません" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "アップデートの確認中にエラーが発生しました:\n\n%1\n\n後ほどもう一度お試しください。" + +msgid "Update check complete" +msgstr "アップデートチェック完了" + +msgid "stable" +msgstr "安定" + +msgid "beta" +msgstr "ベータ" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "あなたは最新の%1版の86Boxを実行しています: %2" + +msgid "version" +msgstr "バージョン" + +msgid "build" +msgstr "ビルド" + +msgid "You are currently running version %1." +msgstr "現在、バージョン%1を実行中です。" + +msgid "Version %1 is now available." +msgstr "バージョン %1 が現在利用可能です。" + +msgid "You are currently running build %1." +msgstr "現在、ビルド%1を実行中です。" + +msgid "Build %1 is now available." +msgstr "ビルド %1 が現在利用可能です。" + +msgid "Would you like to visit the download page?" +msgstr "ダウンロードページをご覧になりたいですか?" + +msgid "Visit download page" +msgstr "ダウンロードページをご覧ください" + +msgid "Update check" +msgstr "アップデートチェック" + +msgid "Checking for updates..." +msgstr "アップデートを確認中..." + +msgid "86Box Update" +msgstr "86Box アップデート" + +msgid "Release notes:" +msgstr "リリースノート:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "仮想マシンの予期せぬ終了" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "仮想マシン\"%1\"のプロセスが、終了コード %2 で予期せず終了しました。" + +msgid "The system will not be added." +msgstr "システムは追加されません。" + +msgid "&Update mouse every CPU frame" +msgstr "マウスをCPUフレームごとに更新(&U)" + +msgid "Hue" +msgstr "色相" + +msgid "Saturation" +msgstr "飽和" + +msgid "Contrast" +msgstr "対比" + +msgid "Brightness" +msgstr "明るさ" + +msgid "Sharpness" +msgstr "シャープネス" + +msgid "&CGA composite settings..." +msgstr "CGA複合モードの設定...(&C)" + +msgid "CGA composite settings" +msgstr "CGA複合モードの設定" diff --git a/src/qt/languages/ko-KR.po b/src/qt/languages/ko-KR.po index 89dbf5809..066b8a3f8 100644 --- a/src/qt/languages/ko-KR.po +++ b/src/qt/languages/ko-KR.po @@ -27,8 +27,14 @@ msgstr "Ctrl+Alt+Esc(&E)" msgid "&Pause" msgstr "일시정지(&P)" -msgid "E&xit..." -msgstr "끝내기(&X)..." +msgid "Pause" +msgstr "일시정지" + +msgid "Re&sume" +msgstr "상태에서 재개" + +msgid "E&xit" +msgstr "끝내기(&X)" msgid "&View" msgstr "표시(&V)" @@ -51,20 +57,17 @@ msgstr "렌더러(&N)" msgid "&Qt (Software)" msgstr "Qt (소프트웨어)(&Q)" -msgid "Qt (&OpenGL)" -msgstr "Qt (OpenGL)(&O)" - msgid "Open&GL (3.0 Core)" msgstr "OpenGL (3.0 Core)(&G)" msgid "&VNC" msgstr "VNC(&V)" -msgid "Specify dimensions..." -msgstr "창 크기 지정하기..." +msgid "Specify &dimensions..." +msgstr "창 크기 지정하기...(&D)" -msgid "F&orce 4:3 display ratio" -msgstr "화면 비율을 4:3으로 맞추기(&O)" +msgid "Force &4:3 display ratio" +msgstr "화면 비율을 4:3으로 맞추기(&4)" msgid "&Window scale factor" msgstr "창 표시 배율(&W)" @@ -99,8 +102,8 @@ msgstr "7배(&7)" msgid "&8x" msgstr "8배(&8)" -msgid "Filter method" -msgstr "필터 형식" +msgid "Fi<er method" +msgstr "필터 형식(&L)" msgid "&Nearest" msgstr "최근방 이웃 보간법(&N)" @@ -132,8 +135,8 @@ msgstr "정수배 확대(&I)" msgid "4:&3 Integer scale" msgstr "4:3 정수배 확대(&3)" -msgid "E&GA/(S)VGA settings" -msgstr "E&GA/(S)VGA 설정" +msgid "EGA/(S)&VGA settings" +msgstr "EGA/(S)&VGA 설정" msgid "&Inverted VGA monitor" msgstr "색상 반전된 VGA 모니터(&I)" @@ -144,9 +147,15 @@ msgstr "VGA 화면 종류(&T)" msgid "RGB &Color" msgstr "RGB 천연색(&C)" +msgid "RGB (no brown)" +msgstr "RGB (갈색 없음)" + msgid "&RGB Grayscale" msgstr "RGB 회색조(&R)" +msgid "Generic RGBI color monitor" +msgstr "일반 RGBI 컬러 모니터" + msgid "&Amber monitor" msgstr "주황색 모니터(&A)" @@ -183,6 +192,9 @@ msgstr "도구(&T)" msgid "&Settings..." msgstr "설정(&S)..." +msgid "Settings..." +msgstr "설정..." + msgid "&Update status bar icons" msgstr "상태 바 아이콘 갱신하기(&U)" @@ -348,6 +360,9 @@ msgstr "기종:" msgid "Configure" msgstr "설정" +msgid "CPU:" +msgstr "CPU:" + msgid "CPU type:" msgstr "CPU 종류:" @@ -384,10 +399,19 @@ msgstr "사용 (UTC)" msgid "Dynamic Recompiler" msgstr "동적 재컴파일" +msgid "CPU frame size" +msgstr "CPU 프레임 크기" + +msgid "Larger frames (less smooth)" +msgstr "더 큰 프레임 (덜 부드럽음)" + +msgid "Smaller frames (smoother)" +msgstr "더 작은 프레임 (더 부드러운)" + msgid "Video:" msgstr "비디오 카드:" -msgid "Video 2:" +msgid "Video #2:" msgstr "비디오 카드 2:" msgid "Voodoo 1 or 2 Graphics" @@ -399,12 +423,27 @@ msgstr "IBM 8514/A 그래픽" msgid "XGA Graphics" msgstr "XGA 그래픽" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "IBM PS/55 디스플레이 어댑터 그래픽스" + +msgid "Keyboard:" +msgstr "키보드:" + +msgid "Keyboard" +msgstr "키보드" + msgid "Mouse:" msgstr "마우스:" +msgid "Mouse" +msgstr "마우스" + msgid "Joystick:" msgstr "조이스틱:" +msgid "Joystick" +msgstr "조이스틱" + msgid "Joystick 1..." msgstr "조이스틱 1..." @@ -435,6 +474,9 @@ msgstr "MIDI 출력 장치:" msgid "MIDI In Device:" msgstr "MIDI 입력 장치:" +msgid "MIDI Out:" +msgstr "MIDI 출력:" + msgid "Standalone MPU-401" msgstr "MPU-401 단독 사용" @@ -474,6 +516,9 @@ msgstr "LPT3 장치:" msgid "LPT4 Device:" msgstr "LPT4 장치:" +msgid "Internal LPT ECP DMA:" +msgstr "내부 LPT의 ECP의 DMA:" + msgid "Serial port 1" msgstr "직렬 포트 1" @@ -498,18 +543,21 @@ msgstr "병렬 포트 3" msgid "Parallel port 4" msgstr "병렬 포트 4" -msgid "HD Controller:" -msgstr "HD 컨트롤러:" - msgid "FD Controller:" msgstr "FD 컨트롤러:" +msgid "CD-ROM Controller:" +msgstr "CD-ROM 컨트롤러:" + msgid "Tertiary IDE Controller" msgstr "제3의 IDE 컨트롤러" msgid "Quaternary IDE Controller" msgstr "제4의 IDE 컨트롤러" +msgid "Hard disk" +msgstr "하드 디스크" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "카세트 테이프" msgid "Hard disks:" msgstr "하드 디스크:" +msgid "Firmware Version" +msgstr "펌웨어 버전" + msgid "&New..." msgstr "새로 만들기(&N)..." @@ -588,8 +639,14 @@ msgstr "CD-ROM 드라이브:" msgid "MO drives:" msgstr "광자기 드라이브:" -msgid "ZIP drives:" -msgstr "ZIP 드라이브:" +msgid "MO:" +msgstr "광자기:" + +msgid "Removable disks:" +msgstr "제거 가능한 디스크:" + +msgid "Removable disk drives:" +msgstr "제거 가능한 디스크 드라이브:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "ISA RTC 카드:" msgid "ISA Memory Expansion" msgstr "ISA 메모리 확장 카드" +msgid "ISA ROM Cards" +msgstr "ISA ROM 카드" + msgid "Card 1:" msgstr "카드 1:" @@ -612,6 +672,15 @@ msgstr "카드 3:" msgid "Card 4:" msgstr "카드 4:" +msgid "Generic ISA ROM Board" +msgstr "일반 ISA ROM 보드" + +msgid "Generic Dual ISA ROM Board" +msgstr "일반 듀얼 ISA ROM 보드" + +msgid "Generic Quad ISA ROM Board" +msgstr "일반 쿼드 ISA ROM 보드" + msgid "ISABugger device" msgstr "ISABugger 장치" @@ -633,11 +702,17 @@ msgstr " - 일시 중지됨" msgid "Speed" msgstr "속도" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "제거 가능한 디스크 %1 (%2): %3" -msgid "ZIP images" -msgstr "ZIP 이미지" +msgid "&Removable disk %1 (%2): %3" +msgstr "제거 가능한 디스크(&R) %1 (%2): %3" + +msgid "Removable disk images" +msgstr "제거 가능한 디스크 이미지" + +msgid "Image %1" +msgstr "이미지 %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "86Box에서 사용 가능한 ROM 이미지를 찾을 수 없습니다.\n\nROM 세트를다운로드 후 \"roms\" 디렉토리에 압축을 풀어 주세요." @@ -696,12 +771,30 @@ msgstr "네트워크" msgid "Ports (COM & LPT)" msgstr "포트 (COM & LPT)" +msgid "Ports" +msgstr "포트" + +msgid "Serial ports:" +msgstr "시리얼 포트:" + +msgid "Parallel ports:" +msgstr "병렬 포트:" + msgid "Storage controllers" msgstr "장치 컨트롤러" msgid "Hard disks" msgstr "하드 디스크" +msgid "Disks:" +msgstr "디스크:" + +msgid "Floppy:" +msgstr "플로피:" + +msgid "Controllers:" +msgstr "컨트롤러:" + msgid "Floppy & CD-ROM drives" msgstr "플로피 / CD-ROM" @@ -711,6 +804,9 @@ msgstr "기타 이동식 저장장치" msgid "Other peripherals" msgstr "기타 주변기기" +msgid "Other devices" +msgstr "기타 저장장치" + msgid "Click to capture mouse" msgstr "이 창을 클릭하면 마우스를 사용합니다" @@ -777,12 +873,39 @@ msgstr "4축, 4버튼 조이스틱" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Pedals" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Thrustmaster Flight Control System" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Rudder Control System" + +msgid "2-button gamepad(s)" +msgstr "2버튼 게임패드" + +msgid "2-button flight yoke" +msgstr "2버튼 비행 조종간" + +msgid "4-button gamepad" +msgstr "4버튼 게임패드" + +msgid "4-button flight yoke" +msgstr "4버튼 비행 조종간" + +msgid "2-button flight yoke with throttle" +msgstr "2버튼 비행 조종간과 스로틀" + +msgid "4-button flight yoke with throttle" +msgstr "4버튼 비행 조종간과 스로틀" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Win95 조타륜 (3축, 4버튼)" + msgid "None" msgstr "없음" @@ -792,6 +915,9 @@ msgstr "%1 MB (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "플로피 %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "플로피 %1 (%2): %3(&F)" + msgid "Advanced sector images" msgstr "어드밴스드 섹터 이미지" @@ -813,6 +939,9 @@ msgstr "GhostPCL를 초기화할 수 없습니다" msgid "MO %1 (%2): %3" msgstr "광자기 %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "광자기 %1 (%2): %3(&M)" + msgid "MO images" msgstr "광자기 이미지" @@ -822,6 +951,15 @@ msgstr "86Box에 어서오세요!" msgid "Internal device" msgstr "내부 장치" +msgid "&File" +msgstr "파일(&F)" + +msgid "&New machine..." +msgstr "새로운 기계(&N)..." + +msgid "&Check for updates..." +msgstr "업데이트 확인 중(&C)..." + msgid "Exit" msgstr "끝내기" @@ -897,12 +1035,18 @@ msgstr "계속" msgid "Cassette: %1" msgstr "카세트: %1" +msgid "C&assette: %1" +msgstr "카세트: %1(&A)" + msgid "Cassette images" msgstr "카세트 이미지" msgid "Cartridge %1: %2" msgstr "카트리지 %1: %2" +msgid "Car&tridge %1: %2" +msgstr "카트리지 %1: %2(&T)" + msgid "Cartridge images" msgstr "카트리지 이미지" @@ -912,6 +1056,9 @@ msgstr "실행 재개" msgid "Pause execution" msgstr "실행 일시 중지" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Ctrl+Alt+Del" @@ -921,9 +1068,279 @@ msgstr "Ctrl+Alt+Esc" msgid "Hard reset" msgstr "재시작" +msgid "Force shutdown" +msgstr "강제 종료" + +msgid "Start" +msgstr "시작" + +msgid "Not running" +msgstr "실행 중이 아닙니다" + +msgid "Running" +msgstr "실행 중입니다" + +msgid "Paused" +msgstr "일시 중지되었습니다" + +msgid "Waiting" +msgstr "대기 중입니다" + +msgid "Powered Off" +msgstr "전원이 꺼져 있습니다" + +msgid "%n running" +msgstr "%n 실행 중입니다" + +msgid "%n paused" +msgstr "%n 일시 중지되었습니다" + +msgid "%n waiting" +msgstr "%n 대기 중입니다" + +msgid "%1 total" +msgstr "%1 총계" + +msgid "VMs: %1" +msgstr "가상 머신: %1" + +msgid "System Directory:" +msgstr "시스템 디렉토리:" + +msgid "Choose directory" +msgstr "디렉토리 선택" + +msgid "Choose configuration file" +msgstr "구성 파일 선택" + +msgid "86Box configuration files (86box.cfg)" +msgstr "86Box 구성 파일 (86box.cfg)" + +msgid "Configuration read failed" +msgstr "구성 읽기 실패" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "선택한 구성 파일을 읽기 위해 열 수 없습니다: %1" + +msgid "Use regular expressions in search box" +msgstr "검색 상자에 정규 표현식 사용" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "현재 %1대의 머신이 활성화되어 있습니다. 가상 머신 관리자를 종료하시겠습니까?" + +msgid "Add new system wizard" +msgstr "새로운 시스템을 추가하는 마법사" + +msgid "Introduction" +msgstr "서론" + +msgid "This will help you add a new system to 86Box." +msgstr "이것은 86Box에 새로운 시스템을 추가하는 데 도움이 될 것입니다." + +msgid "New configuration" +msgstr "새로운 구성" + +msgid "Complete" +msgstr "완료" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "마법사가 이제 새로운 시스템의 설정을 시작합니다." + +msgid "Use existing configuration" +msgstr "기존 구성 사용" + +msgid "Type some notes here" +msgstr "여기 메모를 입력하세요" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "기존 구성 파일의 내용을 아래 상자에 붙여넣으세요." + +msgid "Load configuration from file" +msgstr "파일에서 구성 로드" + +msgid "System name" +msgstr "시스템 이름" + +msgid "System name:" +msgstr "시스템 이름:" + +msgid "System name cannot contain certain characters" +msgstr "시스템 이름에는 특정 문자를 포함할 수 없습니다" + +msgid "System name already exists" +msgstr "시스템 이름이 이미 존재합니다" + +msgid "Please enter a directory for the system" +msgstr "시스템을 위한 디렉토리를 입력해 주세요" + +msgid "Directory does not exist" +msgstr "디렉토리가 존재하지 않습니다" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "위에서 선택한 디렉토리에 시스템용 새로운 디렉토리가 생성됩니다" + +msgid "System location:" +msgstr "시스템 위치:" + +msgid "System name and location" +msgstr "시스템 이름 및 위치" + +msgid "Enter the name of the system and choose the location" +msgstr "시스템 이름을 입력하고 위치를 선택하세요" + +msgid "Enter the name of the system" +msgstr "시스템 이름을 입력하세요" + +msgid "Please enter a system name" +msgstr "시스템 이름을 입력해 주세요" + +msgid "Display name (optional):" +msgstr "표시 이름 (선택 사항):" + +msgid "Display name:" +msgstr "표시 이름:" + +msgid "Set display name" +msgstr "표시 이름 설정" + +msgid "Enter the new display name (blank to reset)" +msgstr "새 표시 이름을 입력하세요 (비워두면 초기화됩니다)" + +msgid "Change &display name..." +msgstr "표시 이름 변경(&D)..." + +msgid "Context Menu" +msgstr "컨텍스트 메뉴" + +msgid "&Open folder..." +msgstr "폴더 열기(&O)..." + +msgid "Open p&rinter tray..." +msgstr "프린터 트레이를 열기(&R)..." + +msgid "Set &icon..." +msgstr "아이콘 설정(&I)..." + +msgid "Select an icon" +msgstr "아이콘을 선택하세요" + +msgid "C&lone..." +msgstr "클론(&L)..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "가상 머신 \"%1\" (%2)는 다음으로 복제됩니다:" + +msgid "Directory %1 already exists" +msgstr "%1 디렉토리가 이미 존재합니다" + +msgid "You cannot use the following characters in the name: %1" +msgstr "이름에 다음 문자를 사용할 수 없습니다: %1" + +msgid "Clone" +msgstr "클론" + +msgid "Failed to create directory for cloned VM" +msgstr "클론된 가상 머신을 위한 디렉토리를 생성하지 못했습니다" + +msgid "Failed to clone VM." +msgstr "가상 머신 복제에 실패했습니다." + +msgid "Directory in use" +msgstr "사용 중인 디렉토리" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "선택한 디렉토리가 이미 사용 중입니다. 다른 디렉토리를 선택해 주시기 바랍니다." + +msgid "Create directory failed" +msgstr "디렉토리 생성 실패" + +msgid "Unable to create the directory for the new system" +msgstr "새 시스템용 디렉토리를 생성할 수 없습니다" + +msgid "Configuration write failed" +msgstr "구성 쓰기 실패" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "%1에서 구성 파일을 쓰기 위해 열 수 없습니다" + +msgid "Error adding system" +msgstr "시스템 추가 오류" + +msgid "Remove directory failed" +msgstr "디렉토리 제거에 실패했습니다" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "기계 디렉토리 내의 일부 파일이 삭제되지 않았습니다. 해당 파일을 수동으로 삭제해 주시기 바랍니다." + +msgid "Build" +msgstr "빌드" + +msgid "Version" +msgstr "버전" + +msgid "An update to 86Box is available: %1 %2" +msgstr "86Box의 업데이트가 가능합니다: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "업데이트 확인 중 오류가 발생했습니다: %1" + +msgid "An update to 86Box is available!" +msgstr "86Box의 업데이트가 제공됩니다!" + +msgid "Warning" +msgstr "경고" + +msgid "&Kill" +msgstr "강제 종료(&K)" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "가상 머신을 강제 종료하면 데이터 손실이 발생할 수 있습니다. 86Box 프로세스가 멈춘 경우에만 이 작업을 수행하십시오.\n\n가상 머신 \"%1\"을 정말로 종료하시겠습니까?" + +msgid "&Delete" +msgstr "삭제(&D)" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "정말 가상 머신 \"%1\"과 모든 파일을 삭제하시겠습니까? 이 작업은 되돌릴 수 없습니다!" + +msgid "Show &config file" +msgstr "구성 파일 표시(&C)" + +msgid "No screenshot" +msgstr "스크린샷 없음" + +msgid "Search" +msgstr "검색" + +msgid "Searching for VMs..." +msgstr "가상 머신을 검색 중입니다..." + +msgid "Found %1" +msgstr "%1 발견됨" + +msgid "System" +msgstr "시스템" + +msgid "Storage" +msgstr "장치" + +msgid "Disk %1: " +msgstr "디스크 %1: " + +msgid "No disks" +msgstr "디스크 없음" + +msgid "Audio" +msgstr "오디오" + +msgid "Audio:" +msgstr "오디오:" + msgid "ACPI shutdown" msgstr "ACPI 종료" +msgid "ACP&I shutdown" +msgstr "ACP&I 종료" + msgid "Hard disk (%1)" msgstr "하드 디스크 (%1)" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "CD-ROM(&C) %1 (%2): %3" + msgid "160 KB" msgstr "160 KB" @@ -1209,41 +1629,38 @@ msgstr "MCA 장치" msgid "List of MCA devices:" msgstr "MCA 장치 목록:" -msgid "Tablet tool" -msgstr "태블릿 도구" +msgid "&Tablet tool" +msgstr "태블릿 도구(&T)" -msgid "Qt (OpenGL &ES)" -msgstr "Qt(OpenGL &ES)" +msgid "About &Qt" +msgstr "&Qt 소개" -msgid "About Qt" -msgstr "Qt 소개" +msgid "&MCA devices..." +msgstr "&MCA 장치..." -msgid "MCA devices..." -msgstr "MCA 장치..." +msgid "Show non-&primary monitors" +msgstr "기본 모니터가 아닌 모니터 표시(&P)" -msgid "Show non-primary monitors" -msgstr "기본 모니터가 아닌 모니터 표시" +msgid "Open screenshots &folder..." +msgstr "스크린샷 폴더 열기...(&F)" -msgid "Open screenshots folder..." -msgstr "스크린샷 폴더 열기..." +msgid "Appl&y fullscreen stretch mode when maximized" +msgstr "최대화 시 전체 화면 비율 적용(&Y)" -msgid "Apply fullscreen stretch mode when maximized" -msgstr "최대화 시 전체 화면 비율 적용" +msgid "&Cursor/Puck" +msgstr "커서/퍽(&P)" -msgid "Cursor/Puck" -msgstr "커서/퍽" +msgid "&Pen" +msgstr "펜(&P)" -msgid "Pen" -msgstr "펜" - -msgid "Host CD/DVD Drive (%1:)" -msgstr "호스트 CD/DVD 드라이브(%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "호스트 CD/DVD 드라이브(%1:) (&H)" msgid "&Connected" msgstr "&커넥티드" -msgid "Clear image history" -msgstr "이미지 기록 지우기" +msgid "Clear image &history" +msgstr "이미지 기록 지우기(&H)" msgid "Create..." msgstr "만들기..." @@ -1257,9 +1674,15 @@ msgstr "알 수 없는 버스" msgid "Null Driver" msgstr "Null 드라이버" +msgid "NIC:" +msgstr "NIC:" + msgid "NIC %1 (%2) %3" msgstr "NIC %1 (%2) %3" +msgid "&NIC %1 (%2) %3" +msgstr "&NIC %1 (%2) %3" + msgid "Render behavior" msgstr "렌더링 동작" @@ -1323,6 +1746,9 @@ msgstr "MCA 장치가 없습니다." msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" msgstr "네트워크 카드 1" @@ -1365,8 +1791,26 @@ msgstr "직렬 포트 패스스루 3" msgid "Serial port passthrough 4" msgstr "직렬 포트 패스스루 4" -msgid "Renderer options..." -msgstr "렌더러 옵션..." +msgid "Renderer &options..." +msgstr "렌더러 옵션...(&O)" + +msgid "PC/XT Keyboard" +msgstr "PC/XT 키보드" + +msgid "AT Keyboard" +msgstr "AT 키보드" + +msgid "AX Keyboard" +msgstr "AX 키보드" + +msgid "PS/2 Keyboard" +msgstr "PS/2 키보드" + +msgid "PS/55 Keyboard" +msgstr "PS/55 키보드" + +msgid "Keys" +msgstr "키" msgid "Logitech/Microsoft Bus Mouse" msgstr "로지텍/마이크로소프트 버스 마우스" @@ -1377,18 +1821,30 @@ msgstr "마이크로소프트 버스 마우스(인포트)" msgid "Mouse Systems Serial Mouse" msgstr "마우스 시스템 시리얼 마우스" +msgid "Mouse Systems Bus Mouse" +msgstr "마우스 시스템 버스 마우스" + msgid "Microsoft Serial Mouse" -msgstr "마이크로소프트 직렬 마우스" +msgstr "마이크로소프트 시리얼 마우스" + +msgid "Microsoft Serial BallPoint" +msgstr "마이크로소프트 볼펜 시리얼 마우스" msgid "Logitech Serial Mouse" -msgstr "로지텍 직렬 마우스" +msgstr "로지텍 시리얼 마우스" msgid "PS/2 Mouse" msgstr "PS/2 마우스" +msgid "PS/2 QuickPort Mouse" +msgstr "PS/2 QuickPort 마우스" + msgid "3M MicroTouch (Serial)" msgstr "3M 마이크로터치(직렬)" +msgid "Default Baud rate" +msgstr "기본 보드 속도" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] 표준 헤이즈 호환 모뎀" @@ -1413,21 +1869,81 @@ msgstr "시스템 미디" msgid "MIDI Input Device" msgstr "미디 입력 장치" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "BIOS 파일" + +msgid "BIOS file (ROM #1)" +msgstr "BIOS 파일 (ROM 1)" + +msgid "BIOS file (ROM #2)" +msgstr "BIOS 파일 (ROM 2)" + +msgid "BIOS file (ROM #3)" +msgstr "BIOS 파일 (ROM 3)" + +msgid "BIOS file (ROM #4)" +msgstr "BIOS 파일 (ROM 4)" + +msgid "BIOS address" msgstr "BIOS 주소" +msgid "BIOS address (ROM #1)" +msgstr "BIOS 주소 (ROM 1)" + +msgid "BIOS address (ROM #2)" +msgstr "BIOS 주소 (ROM 2)" + +msgid "BIOS address (ROM #3)" +msgstr "BIOS 주소 (ROM 3)" + +msgid "BIOS address (ROM #4)" +msgstr "BIOS 주소 (ROM 4)" + msgid "Enable BIOS extension ROM Writes" msgstr "BIOS 확장 ROM 쓰기 활성화" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "BIOS 확장 ROM 쓰기 활성화 (ROM 1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "BIOS 확장 ROM 쓰기 활성화 (ROM 2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "BIOS 확장 ROM 쓰기 활성화 (ROM 3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "BIOS 확장 ROM 쓰기 활성화 (ROM 4)" + +msgid "Linear framebuffer base" +msgstr "선형 프레임버퍼의 기본 주소" + msgid "Address" msgstr "주소" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "시리얼 포트 IRQ" + +msgid "Parallel port IRQ" +msgstr "병렬 포트 IRQ" + msgid "BIOS Revision" msgstr "BIOS 개정" +msgid "BIOS Version" +msgstr "BIOS 버전" + +msgid "BIOS Language" +msgstr "BIOS 언어" + +msgid "IBM 5161 Expansion Unit" +msgstr "IBM 5161 확장 유닛" + +msgid "IBM Cassette Basic" +msgstr "IBM 카세트 베이직" + msgid "Translate 26 -> 17" msgstr "번역 26 -> 17" @@ -1443,6 +1959,18 @@ msgstr "색상 반전" msgid "BIOS size" msgstr "BIOS 크기" +msgid "BIOS size (ROM #1)" +msgstr "BIOS 크기 (ROM 1)" + +msgid "BIOS size (ROM #2)" +msgstr "BIOS 크기 (ROM 2)" + +msgid "BIOS size (ROM #3)" +msgstr "BIOS 크기 (ROM 3)" + +msgid "BIOS size (ROM #4)" +msgstr "BIOS 크기 (ROM 4)" + msgid "Map C0000-C7FFF as UMB" msgstr "C0000-C7FFF를 UMB로 매핑하기" @@ -1518,6 +2046,9 @@ msgstr "리버브 레벨" msgid "Interpolation Method" msgstr "보간 방법" +msgid "Dynamic Sample Loading" +msgstr "샘플의 동적 로딩" + msgid "Reverb Output Gain" msgstr "리버브 출력의 게인" @@ -1605,6 +2136,12 @@ msgstr "낮은 DMA" msgid "Enable Game port" msgstr "게임 포트 사용" +msgid "SID Model" +msgstr "SID 모델" + +msgid "SID Filter Strength" +msgstr "SID 필터 강도" + msgid "Surround module" msgstr "서라운드 모듈" @@ -1617,6 +2154,12 @@ msgstr "코덱 설정 시 코덱 인터럽트 올리기(일부 드라이버에 msgid "SB Address" msgstr "SB 주소" +msgid "Adlib Address" +msgstr "Adlib 주소" + +msgid "Use EEPROM setting" +msgstr "EEPROM 설정 사용" + msgid "WSS IRQ" msgstr "WSS IRQ" @@ -1701,9 +2244,15 @@ msgstr "램닥 유형" msgid "Blend" msgstr "블렌드" +msgid "Font" +msgstr "폰트" + msgid "Bilinear filtering" msgstr "이중선형 필터링" +msgid "Video chroma-keying" +msgstr "비디오 크로마 키잉" + msgid "Dithering" msgstr "디더링" @@ -1746,6 +2295,33 @@ msgstr "전송 속도" msgid "EMS mode" msgstr "EMS 모드" +msgid "EMS Address" +msgstr "EMS 주소" + +msgid "EMS 1 Address" +msgstr "EMS 1 주소" + +msgid "EMS 2 Address" +msgstr "EMS 2 주소" + +msgid "EMS Memory Size" +msgstr "EMS 메모리 용량" + +msgid "EMS 1 Memory Size" +msgstr "EMS 1 메모리 용량" + +msgid "EMS 2 Memory Size" +msgstr "EMS 2 메모리 용량" + +msgid "Enable EMS" +msgstr "EMS 활성화" + +msgid "Enable EMS 1" +msgstr "EMS 1 활성화" + +msgid "Enable EMS 2" +msgstr "EMS 2 활성화" + msgid "Address for > 2 MB" msgstr "2MB 이상의 주소" @@ -1764,11 +2340,11 @@ msgstr "항상 선택한 속도로" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "BIOS 설정 + 핫키(POST 중 꺼짐)" -msgid "64 kB starting from F0000" -msgstr "64kB부터 F0000" +msgid "64 KB starting from F0000" +msgstr "64 KB부터 F0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "E0000에서 시작하는 128kB(주소 MSB 반전, 마지막 64KB 먼저)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "E0000에서 시작하는 128KB(주소 MSB 반전, 마지막 64 KB 먼저)" msgid "Sine" msgstr "사인" @@ -1804,7 +2380,7 @@ msgid "Five + Wheel" msgstr "5개 + 휠" msgid "Five + 2 Wheels" -msgstr "" +msgstr "5개 + 2휠" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 직렬/SMT3(R)V" @@ -1869,6 +2445,9 @@ msgstr "256 KB" msgid "Composite" msgstr "합성" +msgid "True color" +msgstr "진정한 색상" + msgid "Old" msgstr "Old" @@ -1902,6 +2481,15 @@ msgstr "sRGB 보간" msgid "Linear interpolation" msgstr "선형 보간" +msgid "Has secondary 8x8 character set" +msgstr "8x8 보조 문자 집합" + +msgid "Has Quadcolor II daughter board" +msgstr "쿼드컬러 II 딸보드" + +msgid "Alternate monochrome contrast" +msgstr "대체 단색 대비" + msgid "128 KB" msgstr "128 KB" @@ -1935,6 +2523,9 @@ msgstr "Amber" msgid "Gray" msgstr "회색" +msgid "Grayscale" +msgstr "그레이스케일" + msgid "Color" msgstr "색상" @@ -1950,6 +2541,12 @@ msgstr "기타 언어" msgid "Bochs latest" msgstr "Bochs 최신 정보" +msgid "Apply overscan deltas" +msgstr "오버스캔 델타 적용" + +msgid "Mono Interlaced" +msgstr "모노 인터레이스" + msgid "Mono Non-Interlaced" msgstr "모노 비인터레이스" @@ -1957,11 +2554,14 @@ msgid "Color Interlaced" msgstr "컬러 인터레이스" msgid "Color Non-Interlaced" -msgstr "비인터레이스 컬러" +msgstr "컬러 비인터레이스" msgid "3Dfx Voodoo Graphics" msgstr "3Dfx 부두 그래픽" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "옵시디언 SB50 + 자수정(TMU 2개)" @@ -2031,6 +2631,9 @@ msgstr "통과 속도" msgid "Named Pipe (Server)" msgstr "네임드 파이프(서버)" +msgid "Named Pipe (Client)" +msgstr "네임드 파이프(클라이언트)" + msgid "Host Serial Passthrough" msgstr "호스트 직렬 포트 패스스루" @@ -2047,28 +2650,28 @@ msgid "High performance impact" msgstr "성능에 미치는 영향" msgid "[Generic] RAM Disk (max. speed)" -msgstr "[Generic] RAM 디스크(최대 속도)" +msgstr "[일반] RAM 디스크(최대 속도)" msgid "[Generic] 1989 (3500 RPM)" -msgstr "" +msgstr "[일반] 1989 (3500 RPM)" msgid "[Generic] 1992 (3600 RPM)" -msgstr "" +msgstr "[일반] 1992 (3600 RPM)" msgid "[Generic] 1994 (4500 RPM)" -msgstr "" +msgstr "[일반] 1994 (4500 RPM)" msgid "[Generic] 1996 (5400 RPM)" -msgstr "" +msgstr "[일반] 1996 (5400 RPM)" msgid "[Generic] 1997 (5400 RPM)" -msgstr "" +msgstr "[일반] 1997 (5400 RPM)" msgid "[Generic] 1998 (5400 RPM)" -msgstr "" +msgstr "[일반] 1998 (5400 RPM)" msgid "[Generic] 2000 (7200 RPM)" -msgstr "" +msgstr "[일반] 2000 (7200 RPM)" msgid "IBM 8514/A clone (ISA)" msgstr "IBM 8514/A 클론(ISA)" @@ -2076,6 +2679,12 @@ msgstr "IBM 8514/A 클론(ISA)" msgid "Vendor" msgstr "제조사" +msgid "30 Hz (JMP2 = 1)" +msgstr "30 Hz (JMP2 = 1)" + +msgid "60 Hz (JMP2 = 2)" +msgstr "60 Hz (JMP2 = 2)" + msgid "Generic PC/XT Memory Expansion" msgstr "일반 PC/XT 메모리 확장 카드" @@ -2089,61 +2698,259 @@ msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for t msgstr "일반 ESC/P 도트 매트릭스 프린터의 에뮬레이션을 사용하려면 \"roms/printer/fonts\" 디렉터리에 있는 트루타입 글꼴이 필요합니다." msgid "Inhibit multimedia keys" -msgstr "" +msgstr "멀티미디어 키 사용 금지" msgid "Ask for confirmation before saving settings" -msgstr "" +msgstr "설정을 저장하기 전에 확인을 요청합니다" msgid "Ask for confirmation before hard resetting" -msgstr "" +msgstr "하드 리셋을 실행하기 전에 확인을 요청합니다" msgid "Ask for confirmation before quitting" -msgstr "" +msgstr "종료하기 전에 확인을 요청합니다" msgid "Options" -msgstr "" +msgstr "옵션" msgid "Model" -msgstr "" +msgstr "모델" msgid "Model:" -msgstr "" +msgstr "모델:" msgid "Failed to initialize Vulkan renderer." -msgstr "" +msgstr "Vulkan 렌더러 초기화 실패." msgid "GLSL Error" -msgstr "" +msgstr "GLSL 오류" msgid "Could not load shader: %1" -msgstr "" +msgstr "셰이더를 로드할 수 없습니다: %1" msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" -msgstr "" +msgstr "OpenGL 버전 3.0 이상이 필요합니다. 현재 GLSL 버전은 %1.%2입니다" msgid "Could not load texture: %1" -msgstr "" +msgstr "텍스처를 로드할 수 없습니다: %1" msgid "Could not compile shader:\n\n%1" -msgstr "" +msgstr "셰이더를 컴파일할 수 없습니다:\n\n%1" msgid "Program not linked:\n\n%1" -msgstr "" +msgstr "프로그램이 연결되지 않았습니다:\n\n%1" msgid "Shader Manager" -msgstr "" +msgstr "셰이더 관리자" msgid "Shader Configuration" -msgstr "" +msgstr "셰이더 구성" msgid "Add" -msgstr "" +msgstr "추가" msgid "Move up" -msgstr "" +msgstr "위쪽으로 이동" msgid "Move down" -msgstr "" +msgstr "아래로 이동" msgid "Could not load file %1" -msgstr "" +msgstr "파일 %1을 로드할 수 없습니다" + +msgid "Key Bindings:" +msgstr "키 바인딩:" + +msgid "Action" +msgstr "행동" + +msgid "Keybind" +msgstr "키 바인딩" + +msgid "Clear binding" +msgstr "바인딩 해제" + +msgid "Bind" +msgstr "묶습니다" + +msgid "Bind Key" +msgstr "키를 묶습니다" + +msgid "Enter key combo:" +msgstr "키 조합을 입력하세요:" + +msgid "Bind conflict" +msgstr "바인딩 충돌" + +msgid "This key combo is already in use." +msgstr "이 키 조합은 이미 사용 중입니다." + +msgid "Send Control+Alt+Del" +msgstr "Ctrl+Alt+Del 보내기" + +msgid "Send Control+Alt+Escape" +msgstr "Ctrl+Alt+Esc 보내기" + +msgid "Toggle fullscreen" +msgstr "전체 화면 모드 전환" + +msgid "Screenshot" +msgstr "스크린샷" + +msgid "Release mouse pointer" +msgstr "마우스 포인터를 해제합니다" + +msgid "Toggle pause" +msgstr "일시정지 토글" + +msgid "Toggle mute" +msgstr "음소거 켜기/끄기" + +msgid "Text files" +msgstr "텍스트 파일" + +msgid "ROM files" +msgstr "ROM 파일" + +msgid "SoundFont files" +msgstr "SoundFont 파일" + +msgid "Local Switch" +msgstr "로컬 스위치" + +msgid "Remote Switch" +msgstr "원격 스위치" + +msgid "Switch:" +msgstr "스위치:" + +msgid "Hub Mode" +msgstr "허브 모드" + +msgid "Hostname:" +msgstr "호스트 이름:" + +msgid "ISA RAM:" +msgstr "ISA RAM:" + +msgid "ISA ROM:" +msgstr "ISA ROM:" + +msgid "&Wipe NVRAM" +msgstr "NVRAM 지우기(&W)" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "이 작업은 가상 머신에 위치한 \"nvr\" 하위 디렉토리 내의 모든 NVRAM(및 관련) 파일을 삭제합니다. 해당 가상 머신의 BIOS 설정(및 가상 머신 내의 다른 장치 설정)을 다시 구성해야 할 수 있습니다.\n\n가상 머신 \"%1\"의 모든 NVRAM 내용을 삭제하시겠습니까?" + +msgid "Success" +msgstr "성공" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "가상 머신 \"%1\"의 NVRAM 내용을 성공적으로 지웠습니다" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "가상 머신 \"%1\"의 NVRAM 내용을 지우려고 시도하는 과정에서 오류가 발생했습니다" + +msgid "%1 VM Manager" +msgstr "%1 가상 머신 관리자" + +msgid "%n disk(s)" +msgstr "%n 디스크" + +msgid "Unknown Status" +msgstr "알 수 없는 상태" + +msgid "No Machines Found!" +msgstr "기계가 없습니다!" + +msgid "Check for updates on startup" +msgstr "시작 시 업데이트 확인" + +msgid "Unable to determine release information" +msgstr "출시 정보를 확인할 수 없습니다" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "업데이트 확인 중 오류가 발생했습니다:\n\n%1\n\n나중에 다시 시도해 주시기 바랍니다." + +msgid "Update check complete" +msgstr "업데이트 확인 완료" + +msgid "stable" +msgstr "안정" + +msgid "beta" +msgstr "베타" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "현재 86Box의 최신 %1 버전을 실행 중입니다: %2" + +msgid "version" +msgstr "버전" + +msgid "build" +msgstr "빌드" + +msgid "You are currently running version %1." +msgstr "현재 %1 버전을 실행 중입니다." + +msgid "Version %1 is now available." +msgstr "버전 %1이 이제 사용 가능합니다." + +msgid "You are currently running build %1." +msgstr "현재 %1 빌드를 실행 중입니다." + +msgid "Build %1 is now available." +msgstr "빌드 %1이 이제 사용 가능합니다." + +msgid "Would you like to visit the download page?" +msgstr "다운로드 페이지로 이동하시겠습니까?" + +msgid "Visit download page" +msgstr "다운로드 페이지 방문" + +msgid "Update check" +msgstr "업데이트 확인" + +msgid "Checking for updates..." +msgstr "업데이트 확인 중..." + +msgid "86Box Update" +msgstr "86Box 업데이트" + +msgid "Release notes:" +msgstr "릴리스 노트:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "가상 머신의 예상치 못한 종료" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "가상 머신 \"%1\"의 프로세스가 예상치 않게 종료되었으며 종료 코드는 %2입니다." + +msgid "The system will not be added." +msgstr "시스템은 추가되지 않을 것입니다." + +msgid "&Update mouse every CPU frame" +msgstr "마우스를 각 CPU 프레임마다 업데이트합니다(&U)" + +msgid "Hue" +msgstr "색조" + +msgid "Saturation" +msgstr "포화도" + +msgid "Contrast" +msgstr "대조" + +msgid "Brightness" +msgstr "밝기" + +msgid "Sharpness" +msgstr "선명도" + +msgid "&CGA composite settings..." +msgstr "CGA 복합 모드의 설정...(&C)" + +msgid "CGA composite settings" +msgstr "CGA 복합 모드의 설정" diff --git a/src/qt/languages/nb-NO.po b/src/qt/languages/nb-NO.po new file mode 100644 index 000000000..cde1d942e --- /dev/null +++ b/src/qt/languages/nb-NO.po @@ -0,0 +1,2956 @@ +msgid "" +msgstr "" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Language: nb_NO\n" +"X-Source-Language: en_US\n" + +msgid "&Action" +msgstr "&Handling" + +msgid "&Keyboard requires capture" +msgstr "&Tastatur krever opptak" + +msgid "&Right CTRL is left ALT" +msgstr "&Høyre CTRL er venstre ALT" + +msgid "&Hard Reset..." +msgstr "&Hard tilbakestilling..." + +msgid "&Ctrl+Alt+Del" +msgstr "&Ctrl+Alt+Del" + +msgid "Ctrl+Alt+&Esc" +msgstr "Ctrl+Alt+&Esc" + +msgid "&Pause" +msgstr "&Pause" + +msgid "Pause" +msgstr "&Pause" + +msgid "Re&sume" +msgstr "Fo&rtsett" + +msgid "E&xit" +msgstr "A&vslutt" + +msgid "&View" +msgstr "&Vis" + +msgid "&Hide status bar" +msgstr "&Skjul statuslinje" + +msgid "Hide &toolbar" +msgstr "Skjul &verktøylinje" + +msgid "&Resizeable window" +msgstr "&Justerbart vindu" + +msgid "R&emember size && position" +msgstr "H&usk størrelse &og plassering" + +msgid "Re&nderer" +msgstr "Re&nderer" + +msgid "&Qt (Software)" +msgstr "&Qt (Programvare)" + +msgid "Open&GL (3.0 Core)" +msgstr "Open&GL (3.0 Core)" + +msgid "&VNC" +msgstr "&VNC" + +msgid "Specify &dimensions..." +msgstr "Angi &dimensjoner..." + +msgid "Force &4:3 display ratio" +msgstr "Tving &4:3-bildeforhold" + +msgid "&Window scale factor" +msgstr "&Vinduets skaleringsfaktor" + +msgid "&0.5x" +msgstr "&0,5x" + +msgid "&1x" +msgstr "&1x" + +msgid "1.&5x" +msgstr "1,&5x" + +msgid "&2x" +msgstr "&2x" + +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + +msgid "Fi<er method" +msgstr "Fi<reringsmetode" + +msgid "&Nearest" +msgstr "&Nærmeste" + +msgid "&Linear" +msgstr "&Lineær" + +msgid "Hi&DPI scaling" +msgstr "Hi&DPI-skalert" + +msgid "&Fullscreen" +msgstr "&Fullskjerm" + +msgid "Fullscreen &stretch mode" +msgstr "Fullskjerm&strekkmodus" + +msgid "&Full screen stretch" +msgstr "&Fullskjermstrekk" + +msgid "&4:3" +msgstr "&4:3" + +msgid "&Square pixels (Keep ratio)" +msgstr "&Kvadratiske piksler (Behold forhold)" + +msgid "&Integer scale" +msgstr "Heltallsskala" + +msgid "4:&3 Integer scale" +msgstr "4:&3 Heltallsskala" + +msgid "EGA/(S)&VGA settings" +msgstr "EGA/(S)&VGA-innstillinger" + +msgid "&Inverted VGA monitor" +msgstr "&Invertert VGA-skjerm" + +msgid "VGA screen &type" +msgstr "VGA-skjerm&type" + +msgid "RGB &Color" +msgstr "RGB-&farger" + +msgid "RGB (no brown)" +msgstr "RGB (uten brun)" + +msgid "&RGB Grayscale" +msgstr "&RGB-gråskala" + +msgid "Generic RGBI color monitor" +msgstr "Generisk RGBI-fargeskjerm" + +msgid "&Amber monitor" +msgstr "&Amber-skjerm" + +msgid "&Green monitor" +msgstr "&Grønn-skjerm" + +msgid "&White monitor" +msgstr "&Hvit-skjerm" + +msgid "Grayscale &conversion type" +msgstr "Gråskala-&konverteringsmetode" + +msgid "BT&601 (NTSC/PAL)" +msgstr "BT&601 (NTSC/PAL)" + +msgid "BT&709 (HDTV)" +msgstr "BT&709 (HDTV)" + +msgid "&Average" +msgstr "&Gjennomsnitt" + +msgid "CGA/PCjr/Tandy/E&GA/(S)VGA overscan" +msgstr "CGA/PCjr/Tandy/E&GA/(S)VGA-overscan" + +msgid "Change contrast for &monochrome display" +msgstr "Endre kontrast for &monokrom skjerm" + +msgid "&Media" +msgstr "&Medie" + +msgid "&Tools" +msgstr "&Verktøy" + +msgid "&Settings..." +msgstr "&Innstillinger..." + +msgid "Settings..." +msgstr "Innstillinger..." + +msgid "&Update status bar icons" +msgstr "&Oppdater statuslinjeikoner" + +msgid "Take s&creenshot" +msgstr "Ta s&kjermbilde" + +msgid "S&ound" +msgstr "L&yd" + +msgid "&Preferences..." +msgstr "&Valg..." + +msgid "Enable &Discord integration" +msgstr "Aktiver &Discord-integrasjon" + +msgid "Sound &gain..." +msgstr "Lyd&forsterkning..." + +msgid "Begin trace" +msgstr "Start sporing" + +msgid "End trace" +msgstr "Stopp sporing" + +msgid "&Help" +msgstr "&Hjelp" + +msgid "&Documentation..." +msgstr "&Dokumentasjon..." + +msgid "&About 86Box..." +msgstr "&Om 86Box..." + +msgid "&New image..." +msgstr "&Ny diskfil..." + +msgid "&Existing image..." +msgstr "&Eksisterende diskfil..." + +msgid "Existing image (&Write-protected)..." +msgstr "Eksisterende diskfil (&skrivbeskyttet)..." + +msgid "&Record" +msgstr "&Spill inn" + +msgid "&Play" +msgstr "&Spill av" + +msgid "&Rewind to the beginning" +msgstr "&Spol tilbake til starten" + +msgid "&Fast forward to the end" +msgstr "&Spol frem til slutten" + +msgid "E&ject" +msgstr "M&at ut" + +msgid "&Image..." +msgstr "&Diskfil..." + +msgid "E&xport to 86F..." +msgstr "E&ksporter til 86F..." + +msgid "&Mute" +msgstr "&Demp" + +msgid "E&mpty" +msgstr "T&øm" + +msgid "Reload previous image" +msgstr "Last inn forrige diskfil" + +msgid "&Folder..." +msgstr "&Mappe..." + +msgid "Target &framerate" +msgstr "Mål-&bildefrekvens" + +msgid "&Sync with video" +msgstr "&Synkroniser med video" + +msgid "&25 fps" +msgstr "&25 fps" + +msgid "&30 fps" +msgstr "&30 fps" + +msgid "&50 fps" +msgstr "&50 fps" + +msgid "&60 fps" +msgstr "&60 fps" + +msgid "&75 fps" +msgstr "&75 fps" + +msgid "&VSync" +msgstr "&VSync" + +msgid "&Select shader..." +msgstr "&Velg shader..." + +msgid "&Remove shader" +msgstr "&Fjern shader" + +msgid "Preferences" +msgstr "Valg" + +msgid "Sound Gain" +msgstr "Lydforsterkning" + +msgid "New Image" +msgstr "Ny diskfil" + +msgid "Settings" +msgstr "Innstillinger" + +msgid "Specify Main Window Dimensions" +msgstr "Angi hovedvinduets dimensjoner" + +msgid "OK" +msgstr "OK" + +msgid "Cancel" +msgstr "Avbryt" + +msgid "&Default" +msgstr "&Standard" + +msgid "Language:" +msgstr "Språk" + +msgid "Gain" +msgstr "Forsterkning" + +msgid "File name:" +msgstr "Filnavn:" + +msgid "Disk size:" +msgstr "Diskstørrelse:" + +msgid "RPM mode:" +msgstr "RPM-modus:" + +msgid "Progress:" +msgstr "Fremdrift:" + +msgid "Width:" +msgstr "Bredde:" + +msgid "Height:" +msgstr "Høyde:" + +msgid "Lock to this size" +msgstr "Lås til denne størrelsen" + +msgid "Machine type:" +msgstr "Maskintype:" + +msgid "Machine:" +msgstr "Maskin:" + +msgid "Configure" +msgstr "Konfigurer" + +msgid "CPU:" +msgstr "CPU:" + +msgid "CPU type:" +msgstr "CPU-type:" + +msgid "Speed:" +msgstr "Hastighet:" + +msgid "Frequency:" +msgstr "Frekvens:" + +msgid "FPU:" +msgstr "FPU:" + +msgid "Wait states:" +msgstr "Ventetilstander:" + +msgid "MB" +msgstr "MB" + +msgid "Memory:" +msgstr "Minne:" + +msgid "Time synchronization" +msgstr "Tids-synkronisering" + +msgid "Disabled" +msgstr "Deaktivert" + +msgid "Enabled (local time)" +msgstr "Aktivert (lokal tid)" + +msgid "Enabled (UTC)" +msgstr "Aktivert (UTC)" + +msgid "Dynamic Recompiler" +msgstr "Dynamisk recompilator" + +msgid "CPU frame size" +msgstr "CPU-rammestørrelse" + +msgid "Larger frames (less smooth)" +msgstr "Større rammer (mindre jevn)" + +msgid "Smaller frames (smoother)" +msgstr "Mindre rammer (jevnere)" + +msgid "Video:" +msgstr "Video:" + +msgid "Video #2:" +msgstr "Video #2:" + +msgid "Voodoo 1 or 2 Graphics" +msgstr "Voodoo 1- eller 2-grafikk" + +msgid "IBM 8514/A Graphics" +msgstr "IBM 8514/A-grafikk" + +msgid "XGA Graphics" +msgstr "XGA-grafikk" + +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "IBM PS/55 skjermadapter-grafikk" + +msgid "Keyboard:" +msgstr "Tastatur:" + +msgid "Keyboard" +msgstr "Tastatur" + +msgid "Mouse:" +msgstr "Mus:" + +msgid "Mouse" +msgstr "Mus" + +msgid "Joystick:" +msgstr "Styrespak:" + +msgid "Joystick" +msgstr "Styrespak" + +msgid "Joystick 1..." +msgstr "Styrespak 1..." + +msgid "Joystick 2..." +msgstr "Styrespak 2..." + +msgid "Joystick 3..." +msgstr "Styrespak 3..." + +msgid "Joystick 4..." +msgstr "Styrespak 4..." + +msgid "Sound card #1:" +msgstr "Lydkort #1:" + +msgid "Sound card #2:" +msgstr "Lydkort #2:" + +msgid "Sound card #3:" +msgstr "Lydkort #3:" + +msgid "Sound card #4:" +msgstr "Lydkort #4:" + +msgid "MIDI Out Device:" +msgstr "MIDI-ut-enhet:" + +msgid "MIDI In Device:" +msgstr "MIDI-in-enhet:" + +msgid "MIDI Out:" +msgstr "MIDI-ut:" + +msgid "Standalone MPU-401" +msgstr "Selvstendig MPU-401" + +msgid "Use FLOAT32 sound" +msgstr "Bruk FLOAT32-lyd" + +msgid "FM synth driver" +msgstr "FM-synth-driver" + +msgid "Nuked (more accurate)" +msgstr "Nuked (mer nøyaktig)" + +msgid "YMFM (faster)" +msgstr "YMFM (raskere)" + +msgid "COM1 Device:" +msgstr "COM1-enhet:" + +msgid "COM2 Device:" +msgstr "COM2-enhet:" + +msgid "COM3 Device:" +msgstr "COM3-enhet:" + +msgid "COM4 Device:" +msgstr "COM4-enhet:" + +msgid "LPT1 Device:" +msgstr "LPT1-enhet:" + +msgid "LPT2 Device:" +msgstr "LPT2-enhet:" + +msgid "LPT3 Device:" +msgstr "LPT3-enhet:" + +msgid "LPT4 Device:" +msgstr "LPT4-enhet:" + +msgid "Internal LPT ECP DMA:" +msgstr "Intern LPT ECP DMA:" + +msgid "Serial port 1" +msgstr "Seriell port 1" + +msgid "Serial port 2" +msgstr "Seriell port 2" + +msgid "Serial port 3" +msgstr "Seriell port 3" + +msgid "Serial port 4" +msgstr "Seriell port 4" + +msgid "Parallel port 1" +msgstr "Parallellport 1" + +msgid "Parallel port 2" +msgstr "Parallellport 2" + +msgid "Parallel port 3" +msgstr "Parallellport 3" + +msgid "Parallel port 4" +msgstr "Parallellport 4" + +msgid "FD Controller:" +msgstr "FD-kontroller:" + +msgid "CD-ROM Controller:" +msgstr "CD-ROM-kontroller:" + +msgid "Tertiary IDE Controller" +msgstr "Tertiær IDE-kontroller" + +msgid "Quaternary IDE Controller" +msgstr "Kvartær IDE-kontroller" + +msgid "Hard disk" +msgstr "Harddisk" + +msgid "SCSI" +msgstr "SCSI" + +msgid "Controller 1:" +msgstr "Kontroller 1:" + +msgid "Controller 2:" +msgstr "Kontroller 2:" + +msgid "Controller 3:" +msgstr "Kontroller 3:" + +msgid "Controller 4:" +msgstr "Kontroller 4:" + +msgid "Cassette" +msgstr "Kassett" + +msgid "Hard disks:" +msgstr "Harddisker:" + +msgid "Firmware Version" +msgstr "Firmware-versjon" + +msgid "&New..." +msgstr "&Ny..." + +msgid "&Existing..." +msgstr "&Eksisterende..." + +msgid "&Remove" +msgstr "&Fjern" + +msgid "Bus:" +msgstr "Buss:" + +msgid "Channel:" +msgstr "Kanal:" + +msgid "ID:" +msgstr "ID:" + +msgid "&Specify..." +msgstr "&Angi..." + +msgid "Sectors:" +msgstr "Sektorer:" + +msgid "Heads:" +msgstr "Hoder:" + +msgid "Cylinders:" +msgstr "Sylindre:" + +msgid "Size (MB):" +msgstr "Størrelse (MB):" + +msgid "Type:" +msgstr "Type:" + +msgid "Image Format:" +msgstr "Image-format:" + +msgid "Block Size:" +msgstr "Blokkstørrelse:" + +msgid "Floppy drives:" +msgstr "Diskettstasjoner:" + +msgid "Turbo timings" +msgstr "Turbo-timing" + +msgid "Check BPB" +msgstr "Sjekk BPB" + +msgid "CD-ROM drives:" +msgstr "CD-ROM-stasjoner:" + +msgid "MO drives:" +msgstr "MO-stasjoner:" + +msgid "MO:" +msgstr "MO:" + +msgid "Removable disks:" +msgstr "Flyttbare disker:" + +msgid "Removable disk drives:" +msgstr "Flyttbare stasjoner:" + +msgid "ZIP 250" +msgstr "ZIP 250" + +msgid "ISA RTC:" +msgstr "ISA RTC:" + +msgid "ISA Memory Expansion" +msgstr "ISA-minneutvidelse" + +msgid "ISA ROM Cards" +msgstr "ISA ROM-kort" + +msgid "Card 1:" +msgstr "Kort 1:" + +msgid "Card 2:" +msgstr "Kort 2:" + +msgid "Card 3:" +msgstr "Kort 3:" + +msgid "Card 4:" +msgstr "Kort 4:" + +msgid "Generic ISA ROM Board" +msgstr "Generisk ISA ROM-kort" + +msgid "Generic Dual ISA ROM Board" +msgstr "Generisk dobbel ISA ROM-kort" + +msgid "Generic Quad ISA ROM Board" +msgstr "Generisk kvart ISA ROM-kort" + +msgid "ISABugger device" +msgstr "ISABugger-enhet" + +msgid "POST card" +msgstr "POST-kort" + +msgid "86Box" +msgstr "86Box" + +msgid "Error" +msgstr "Feil" + +msgid "Fatal error" +msgstr "Kritisk feil" + +msgid " - PAUSED" +msgstr " - PAUSERT" + +msgid "Speed" +msgstr "Hastighet" + +msgid "Removable disk %1 (%2): %3" +msgstr "Flyttbar disk %1 (%2): %3" + +msgid "&Removable disk %1 (%2): %3" +msgstr "&Flyttbar disk %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Flyttbare diskfiler" + +msgid "Image %1" +msgstr "Diskfil %1" + +msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." +msgstr "86Box fant ingen brukbare ROM-filer.\n\nVennligst last ned et ROM-sett og pakk det ut i \"roms\"-mappen." + +msgid "(empty)" +msgstr "(tom)" + +msgid "All files" +msgstr "Alle filer" + +msgid "Turbo" +msgstr "Turbo" + +msgid "On" +msgstr "På" + +msgid "Off" +msgstr "Av" + +msgid "All images" +msgstr "Alle diskfiler" + +msgid "Basic sector images" +msgstr "Basis sektorfiler" + +msgid "Surface images" +msgstr "Surface-diskfiler" + +msgid "Machine \"%hs\" is not available due to missing ROMs in the roms/machines directory. Switching to an available machine." +msgstr "Maskin \"%hs\" er ikke tilgjengelig på grunn av manglende ROM-er i roms/machines-mappen. Bytter til en tilgjengelig maskin." + +msgid "Video card \"%hs\" is not available due to missing ROMs in the roms/video directory. Switching to an available video card." +msgstr "Grafikkort \"%hs\" er ikke tilgjengelig på grunn av manglende ROM-er i roms/video-mappen. Bytter til et tilgjengelig grafikkort." + +msgid "Video card #2 \"%hs\" is not available due to missing ROMs in the roms/video directory. Disabling the second video card." +msgstr "Grafikkort #2 \"%hs\" er ikke tilgjengelig på grunn av manglende ROM-er i roms/video-mappen. Deaktiverer det andre grafikkortet." + +msgid "Device \"%hs\" is not available due to missing ROMs. Ignoring the device." +msgstr "Enhet \"%hs\" er ikke tilgjengelig på grunn av manglende ROM-er. Ignorerer enheten." + +msgid "Machine" +msgstr "Maskin" + +msgid "Display" +msgstr "Skjerm" + +msgid "Input devices" +msgstr "Inndataenheter" + +msgid "Sound" +msgstr "Lyd" + +msgid "Network" +msgstr "Nettverk" + +msgid "Ports (COM & LPT)" +msgstr "Porter (COM & LPT)" + +msgid "Ports" +msgstr "Porter" + +msgid "Serial ports:" +msgstr "Seriellporter:" + +msgid "Parallel ports:" +msgstr "Parallellporter:" + +msgid "Storage controllers" +msgstr "Lagringskontrollere" + +msgid "Hard disks" +msgstr "Harddisker" + +msgid "Disks:" +msgstr "Disker:" + +msgid "Floppy:" +msgstr "Diskett:" + +msgid "Controllers:" +msgstr "Kontrollere:" + +msgid "Floppy & CD-ROM drives" +msgstr "Diskett- og CD-ROM-stasjoner" + +msgid "Other removable devices" +msgstr "Andre flyttbare enheter" + +msgid "Other peripherals" +msgstr "Andre eksterne enheter" + +msgid "Other devices" +msgstr "Andre enheter" + +msgid "Click to capture mouse" +msgstr "Klikk for å fange mus" + +msgid "Press %1 to release mouse" +msgstr "Trykk %1 for å slippe mus" + +msgid "Press %1 or middle button to release mouse" +msgstr "Trykk %1 eller midtknappen for å slippe mus" + +msgid "Bus" +msgstr "Buss" + +msgid "File" +msgstr "Fil" + +msgid "C" +msgstr "C" + +msgid "H" +msgstr "H" + +msgid "S" +msgstr "S" + +msgid "KB" +msgstr "KB" + +msgid "Default" +msgstr "Standard" + +msgid "%1 Wait state(s)" +msgstr "%1 ventetilstand(er)" + +msgid "Type" +msgstr "Type" + +msgid "No PCap devices found" +msgstr "Ingen PCap-enheter funnet" + +msgid "Invalid PCap device" +msgstr "Ugyldig PCap-enhet" + +msgid "2-axis, 2-button joystick(s)" +msgstr "2-akset, 2-knapps styrespak(er)" + +msgid "2-axis, 4-button joystick" +msgstr "2-akset, 4-knapps styrespak" + +msgid "2-axis, 6-button joystick" +msgstr "2-akset, 6-knapps styrespak" + +msgid "2-axis, 8-button joystick" +msgstr "2-akset, 8-knapps styrespak" + +msgid "3-axis, 2-button joystick" +msgstr "3-akset, 2-knapps styrespak" + +msgid "3-axis, 4-button joystick" +msgstr "3-akset, 4-knapps styrespak" + +msgid "4-axis, 4-button joystick" +msgstr "4-akset, 4-knapps styrespak" + +msgid "CH Flightstick Pro" +msgstr "CH Flightstick Pro" + +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Pedaler" + +msgid "Microsoft SideWinder Pad" +msgstr "Microsoft SideWinder Pad" + +msgid "Thrustmaster Flight Control System" +msgstr "Thrustmaster Flight Control System" + +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Ror-kontrollsystem" + +msgid "2-button gamepad(s)" +msgstr "2-knapps gamepad(er)" + +msgid "2-button flight yoke" +msgstr "2-knapps flystyre" + +msgid "4-button gamepad" +msgstr "4-knapps gamepad" + +msgid "4-button flight yoke" +msgstr "4-knapps flystyre" + +msgid "2-button flight yoke with throttle" +msgstr "2-knapps flystyre med gass" + +msgid "4-button flight yoke with throttle" +msgstr "4-knapps flystyre med gass" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Win95 Ratt (3-akset, 4-knapps)" + +msgid "None" +msgstr "Ingen" + +msgid "%1 MB (CHS: %2, %3, %4)" +msgstr "%1 MB (CHS: %2, %3, %4)" + +msgid "Floppy %1 (%2): %3" +msgstr "Diskett %1 (%2): %3" + +msgid "&Floppy %1 (%2): %3" +msgstr "&Diskett %1 (%2): %3" + +msgid "Advanced sector images" +msgstr "Avanserte sektorfiler" + +msgid "Flux images" +msgstr "Flux-diskfiler" + +msgid "Are you sure you want to hard reset the emulated machine?" +msgstr "Er du sikker på at du vil utføre en hard tilbakestilling på den emulerte maskinen?" + +msgid "Are you sure you want to exit 86Box?" +msgstr "Er du sikker på at du vil avslutte 86Box?" + +msgid "Unable to initialize Ghostscript" +msgstr "Kan ikke initialisere Ghostscript" + +msgid "Unable to initialize GhostPCL" +msgstr "Kan ikke initialisere GhostPCL" + +msgid "MO %1 (%2): %3" +msgstr "MO %1 (%2): %3" + +msgid "&MO %1 (%2): %3" +msgstr "&MO %1 (%2): %3" + +msgid "MO images" +msgstr "MO-filer" + +msgid "Welcome to 86Box!" +msgstr "Velkommen til 86Box!" + +msgid "Internal device" +msgstr "Intern enhet" + +msgid "&File" +msgstr "&Fil" + +msgid "&New machine..." +msgstr "&Ny maskin..." + +msgid "&Check for updates..." +msgstr "&Sjekk etter oppdateringer..." + +msgid "Exit" +msgstr "Avslutt" + +msgid "No ROMs found" +msgstr "Ingen ROM-er funnet" + +msgid "Do you want to save the settings?" +msgstr "Vil du lagre innstillingene?" + +msgid "This will hard reset the emulated machine." +msgstr "Dette vil hard-resette den emulerte maskinen." + +msgid "Save" +msgstr "Lagre" + +msgid "About 86Box" +msgstr "Om 86Box" + +msgid "86Box v" +msgstr "86Box v" + +msgid "An emulator of old computers\n\nAuthors: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n\nWith previous core contributions from Sarah Walker, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information." +msgstr "En emulator for gamle datamaskiner\n\nForfattere: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne og andre.\n\nMed tidligere kjernebidrag fra Sarah Walker, leilei, JohnElliott, greatpsycho og andre.\n\nUtgitt under GNU General Public License versjon 2 eller senere. Se LICENSE for mer informasjon." + +msgid "Hardware not available" +msgstr "Maskinvare ikke tilgjengelig" + +msgid "Make sure %1 is installed and that you are on a %1-compatible network connection." +msgstr "Sørg for at %1 er installert og at du er på en %1-kompatibel nettverkstilkobling." + +msgid "Invalid configuration" +msgstr "Ugyldig konfigurasjon" + +msgid "%1 is required for automatic conversion of PostScript files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as PostScript (.ps) files." +msgstr "%1 kreves for automatisk konvertering av PostScript-filer til PDF.\n\nDokumenter sendt til den generiske PostScript-skriveren vil lagres som PostScript (.ps)-filer." + +msgid "%1 is required for automatic conversion of PCL files to PDF.\n\nAny documents sent to the generic PCL printer will be saved as Printer Command Language (.pcl) files." +msgstr "%1 kreves for automatisk konvertering av PCL-filer til PDF.\n\nDokumenter sendt til den generiske PCL-skriveren vil lagres som Printer Command Language (.pcl)-filer." + +msgid "Don't show this message again" +msgstr "Ikke vis denne meldingen igjen" + +msgid "Don't exit" +msgstr "Ikke avslutt" + +msgid "Reset" +msgstr "Nullstill" + +msgid "Don't reset" +msgstr "Ikke nullstill" + +msgid "CD-ROM images" +msgstr "CD-ROM-filer" + +msgid "%1 Device Configuration" +msgstr "%1 Enhetskonfigurasjon" + +msgid "Monitor in sleep mode" +msgstr "Skjerm i hvilemodus" + +msgid "GLSL shaders" +msgstr "GLSL-shadere" + +msgid "You are loading an unsupported configuration" +msgstr "Du laster en ikke-støttet konfigurasjon" + +msgid "CPU type filtering based on selected machine is disabled for this emulated machine.\n\nThis makes it possible to choose a CPU that is otherwise incompatible with the selected machine. However, you may run into incompatibilities with the machine BIOS or other software.\n\nEnabling this setting is not officially supported and any bug reports filed may be closed as invalid." +msgstr "CPU-typefiltrering basert på valgt maskin er deaktivert for denne emulerte maskinen.\n\nDette gjør det mulig å velge en CPU som ellers er inkompatibel med den valgte maskinen. Du kan imidlertid støte på inkompatibilitet med maskinens BIOS eller annen programvare.\n\nAktivering av denne innstillingen er ikke offisielt støttet, og eventuelle innsendte feilrapporter kan bli avvist som ugyldige." + +msgid "Continue" +msgstr "Fortsett" + +msgid "Cassette: %1" +msgstr "Kassett: %1" + +msgid "C&assette: %1" +msgstr "K&assett: %1" + +msgid "Cassette images" +msgstr "Kassettfiler" + +msgid "Cartridge %1: %2" +msgstr "Kassett %1: %2" + +msgid "Car&tridge %1: %2" +msgstr "Kas&sett %1: %2" + +msgid "Cartridge images" +msgstr "Kassettfiler" + +msgid "Resume execution" +msgstr "Fortsett kjøring" + +msgid "Pause execution" +msgstr "Pause kjøring" + +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + +msgid "Press Ctrl+Alt+Del" +msgstr "Trykk Ctrl+Alt+Del" + +msgid "Press Ctrl+Alt+Esc" +msgstr "Trykk Ctrl+Alt+Esc" + +msgid "Hard reset" +msgstr "Hard-tilbakestilling" + +msgid "Force shutdown" +msgstr "Tvangsavslutt" + +msgid "Start" +msgstr "Start" + +msgid "Not running" +msgstr "Ikke kjørende" + +msgid "Running" +msgstr "Kjører" + +msgid "Paused" +msgstr "Satt på pause" + +msgid "Waiting" +msgstr "Venter" + +msgid "Powered Off" +msgstr "Slått av" + +msgid "%n running" +msgstr "%n kjørende" + +msgid "%n paused" +msgstr "%n satt på pause" + +msgid "%n waiting" +msgstr "%n venter" + +msgid "%1 total" +msgstr "%1 totalt" + +msgid "VMs: %1" +msgstr "VM-er: %1" + +msgid "System Directory:" +msgstr "Systemmappe:" + +msgid "Choose directory" +msgstr "Velg mappe" + +msgid "Choose configuration file" +msgstr "Velg konfigurasjonsfil" + +msgid "86Box configuration files (86box.cfg)" +msgstr "86Box konfigurasjonsfiler (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Lesing av konfigurasjon mislyktes" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Kan ikke åpne valgt konfigurasjonsfil for lesing: %1" + +msgid "Use regular expressions in search box" +msgstr "Bruk regulære uttrykk i søkeboksen" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 maskin(er) er for øyeblikket aktive. Er du sikker på at du vil avslutte VM-administratoren uansett?" + +msgid "Add new system wizard" +msgstr "Legg til ny system-veiviser" + +msgid "Introduction" +msgstr "Introduksjon" + +msgid "This will help you add a new system to 86Box." +msgstr "Dette vil hjelpe deg med å legge til et nytt system i 86Box." + +msgid "New configuration" +msgstr "Ny konfigurasjon" + +msgid "Complete" +msgstr "Fullfør" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "Veiviseren vil nå starte konfigurasjonen for det nye systemet." + +msgid "Use existing configuration" +msgstr "Bruk eksisterende konfigurasjon" + +msgid "Type some notes here" +msgstr "Skriv noen notater her" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Lim inn innholdet fra den eksisterende konfigurasjonsfilen i boksen nedenfor." + +msgid "Load configuration from file" +msgstr "Last konfigurasjon fra fil" + +msgid "System name" +msgstr "Systemnavn" + +msgid "System name:" +msgstr "Systemnavn:" + +msgid "System name cannot contain certain characters" +msgstr "Systemnavnet kan ikke inneholde visse tegn" + +msgid "System name already exists" +msgstr "Systemnavnet finnes allerede" + +msgid "Please enter a directory for the system" +msgstr "Vennligst skriv inn en mappe for systemet" + +msgid "Directory does not exist" +msgstr "Mappen eksisterer ikke" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "En ny mappe for systemet vil bli opprettet i den valgte mappen ovenfor" + +msgid "System location:" +msgstr "Systemplassering:" + +msgid "System name and location" +msgstr "Systemnavn og plassering" + +msgid "Enter the name of the system and choose the location" +msgstr "Skriv inn systemets navn og velg plassering" + +msgid "Enter the name of the system" +msgstr "Skriv inn systemnavnet" + +msgid "Please enter a system name" +msgstr "Vennligst skriv inn et systemnavn" + +msgid "Display name (optional):" +msgstr "Visningsnavn (valgfritt):" + +msgid "Display name:" +msgstr "Visningsnavn:" + +msgid "Set display name" +msgstr "Angi visningsnavn" + +msgid "Enter the new display name (blank to reset)" +msgstr "Skriv inn nytt visningsnavn (tomt for å tilbakestille)" + +msgid "Change &display name..." +msgstr "Endre &visningsnavn..." + +msgid "Context Menu" +msgstr "Kontekstmeny" + +msgid "&Open folder..." +msgstr "&Åpne mappe..." + +msgid "Open p&rinter tray..." +msgstr "Åpne p&rinter-skuff..." + +msgid "Set &icon..." +msgstr "Angi &ikon..." + +msgid "Select an icon" +msgstr "Velg et ikon" + +msgid "C&lone..." +msgstr "K&lon..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "Virtuell maskin \"%1\" (%2) vil bli klonet til:" + +msgid "Directory %1 already exists" +msgstr "Mappen %1 finnes allerede" + +msgid "You cannot use the following characters in the name: %1" +msgstr "Du kan ikke bruke følgende tegn i navnet: %1" + +msgid "Clone" +msgstr "Klon" + +msgid "Failed to create directory for cloned VM" +msgstr "Kunne ikke opprette mappe for klonet VM" + +msgid "Failed to clone VM." +msgstr "Kloning av VM mislyktes." + +msgid "Directory in use" +msgstr "Mappe i bruk" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "Den valgte mappen er allerede i bruk. Vennligst velg en annen mappe." + +msgid "Create directory failed" +msgstr "Oppretting av mappe mislyktes" + +msgid "Unable to create the directory for the new system" +msgstr "Kunne ikke opprette mappe for det nye systemet" + +msgid "Configuration write failed" +msgstr "Skriving av konfigurasjon mislyktes" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Kunne ikke åpne konfigurasjonsfilen på %1 for skriving" + +msgid "Error adding system" +msgstr "Feil ved legg til system" + +msgid "Remove directory failed" +msgstr "Fjerning av mappe mislyktes" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Noen filer i maskinens mappe kunne ikke slettes. Vennligst slett dem manuelt." + +msgid "Build" +msgstr "Bygg" + +msgid "Version" +msgstr "Versjon" + +msgid "An update to 86Box is available: %1 %2" +msgstr "En oppdatering til 86Box er tilgjengelig: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "En feil oppstod under sjekking av oppdateringer: %1" + +msgid "An update to 86Box is available!" +msgstr "En oppdatering til 86Box er tilgjengelig!" + +msgid "Warning" +msgstr "Advarsel" + +msgid "&Kill" +msgstr "&Avslutt prosess" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Å avslutte en virtuell maskin kan føre til datatap. Gjør dette kun hvis 86Box-prosessen henger.\n\nVil du virkelig avslutte den virtuelle maskinen \"%1\"?" + +msgid "&Delete" +msgstr "&Slett" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Vil du virkelig slette den virtuelle maskinen \"%1\" og alle dens filer? Denne handlingen kan ikke angres!" + +msgid "Show &config file" +msgstr "Vis &konfigurasjonsfil" + +msgid "No screenshot" +msgstr "Ingen skjermbilde" + +msgid "Search" +msgstr "Søk" + +msgid "Searching for VMs..." +msgstr "Søker etter VMer..." + +msgid "Found %1" +msgstr "Fant %1" + +msgid "System" +msgstr "System" + +msgid "Storage" +msgstr "Lagring" + +msgid "Disk %1: " +msgstr "Disk %1:" + +msgid "No disks" +msgstr "Ingen disker" + +msgid "Audio" +msgstr "Lyd" + +msgid "Audio:" +msgstr "Lyd:" + +msgid "ACPI shutdown" +msgstr "ACPI-avstenging" + +msgid "ACP&I shutdown" +msgstr "ACP&I-avstenging" + +msgid "Hard disk (%1)" +msgstr "Harddisk (%1)" + +msgid "MFM/RLL or ESDI CD-ROM drives never existed" +msgstr "MFM/RLL eller ESDI CD-ROM-stasjoner eksisterte aldri" + +msgid "Custom..." +msgstr "Tilpasset..." + +msgid "Custom (large)..." +msgstr "Tilpasset (stor)..." + +msgid "Add New Hard Disk" +msgstr "Legg til ny harddisk" + +msgid "Add Existing Hard Disk" +msgstr "Legg til eksisterende harddisk" + +msgid "HDI disk images cannot be larger than 4 GB." +msgstr "HDI-diskbilder kan ikke være større enn 4 GB." + +msgid "Disk images cannot be larger than 127 GB." +msgstr "Diskbilder kan ikke være større enn 127 GB." + +msgid "Hard disk images" +msgstr "Harddiskbilder" + +msgid "Unable to read file" +msgstr "Kunne ikke lese fil" + +msgid "Unable to write file" +msgstr "Kunne ikke skrive fil" + +msgid "HDI or HDX images with a sector size other than 512 are not supported." +msgstr "HDI- eller HDX-bilder med en sektorstørrelse annen enn 512 støttes ikke." + +msgid "Disk image file already exists" +msgstr "Diskbildefilen finnes allerede" + +msgid "Please specify a valid file name." +msgstr "Vennligst spesifiser et gyldig filnavn." + +msgid "Disk image created" +msgstr "Diskbilde opprettet" + +msgid "Make sure the file exists and is readable." +msgstr "Sørg for at filen eksisterer og kan leses." + +msgid "Make sure the file is being saved to a writable directory." +msgstr "Sørg for at filen lagres i en skrivbar mappe." + +msgid "Disk image too large" +msgstr "Diskbilde for stort" + +msgid "Remember to partition and format the newly-created drive." +msgstr "Husk å partisjonere og formatere den nyopprettede disken." + +msgid "The selected file will be overwritten. Are you sure you want to use it?" +msgstr "Den valgte filen vil bli overskrevet. Er du sikker på at du vil bruke den?" + +msgid "Unsupported disk image" +msgstr "Ustøttet diskbilde" + +msgid "Overwrite" +msgstr "Overskriv" + +msgid "Don't overwrite" +msgstr "Ikke overskriv" + +msgid "Raw image" +msgstr "Råbilde" + +msgid "HDI image" +msgstr "HDI-bilde" + +msgid "HDX image" +msgstr "HDX-bilde" + +msgid "Fixed-size VHD" +msgstr "VHD med fast størrelse" + +msgid "Dynamic-size VHD" +msgstr "VHD med dynamisk størrelse" + +msgid "Differencing VHD" +msgstr "Differensierende VHD" + +msgid "(N/A)" +msgstr "(N/A)" + +msgid "Raw image (.img)" +msgstr "Råbilde (.img)" + +msgid "HDI image (.hdi)" +msgstr "HDI-bilde (.hdi)" + +msgid "HDX image (.hdx)" +msgstr "HDX-bilde (.hdx)" + +msgid "Fixed-size VHD (.vhd)" +msgstr "VHD med fast størrelse (.vhd)" + +msgid "Dynamic-size VHD (.vhd)" +msgstr "VHD med dynamisk størrelse (.vhd)" + +msgid "Differencing VHD (.vhd)" +msgstr "Differensierende VHD (.vhd)" + +msgid "Large blocks (2 MB)" +msgstr "Store blokker (2 MB)" + +msgid "Small blocks (512 KB)" +msgstr "Små blokker (512 KB)" + +msgid "VHD files" +msgstr "VHD-filer" + +msgid "Select the parent VHD" +msgstr "Velg overordnet VHD" + +msgid "This could mean that the parent image was modified after the differencing image was created.\n\nIt can also happen if the image files were moved or copied, or by a bug in the program that created this disk.\n\nDo you want to fix the timestamps?" +msgstr "Dette kan bety at det overordnede bildet ble endret etter at differansebildet ble opprettet.\n\nDet kan også skje hvis bildefilene ble flyttet eller kopiert, eller på grunn av en feil i programmet som opprettet denne disken.\n\nVil du rette tidsstemplene?" + +msgid "Parent and child disk timestamps do not match" +msgstr "Tidsstemplene til overordnet og underordnet disk samsvarer ikke" + +msgid "Could not fix VHD timestamp." +msgstr "Kunne ikke rette VHD-tidsstempel." + +msgid "MFM/RLL" +msgstr "MFM/RLL" + +msgid "XTA" +msgstr "XTA" + +msgid "ESDI" +msgstr "ESDI" + +msgid "IDE" +msgstr "IDE" + +msgid "ATAPI" +msgstr "ATAPI" + +msgid "CD-ROM %1 (%2): %3" +msgstr "CD-ROM %1 (%2): %3" + +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + +msgid "160 KB" +msgstr "160 KB" + +msgid "180 KB" +msgstr "180 KB" + +msgid "320 KB" +msgstr "320 KB" + +msgid "360 KB" +msgstr "360 KB" + +msgid "640 KB" +msgstr "640 KB" + +msgid "720 KB" +msgstr "720 KB" + +msgid "1.2 MB" +msgstr "1,2 MB" + +msgid "1.25 MB" +msgstr "1,25 MB" + +msgid "1.44 MB" +msgstr "1,44 MB" + +msgid "DMF (cluster 1024)" +msgstr "DMF (klynge 1024)" + +msgid "DMF (cluster 2048)" +msgstr "DMF (klynge 2048)" + +msgid "2.88 MB" +msgstr "2,88 MB" + +msgid "ZIP 100" +msgstr "ZIP 100" + +msgid "3.5\" 128 MB (ISO 10090)" +msgstr "3,5\" 128 MB (ISO 10090)" + +msgid "3.5\" 230 MB (ISO 13963)" +msgstr "3,5\" 230 MB (ISO 13963)" + +msgid "3.5\" 540 MB (ISO 15498)" +msgstr "3,5\" 540 MB (ISO 15498)" + +msgid "3.5\" 640 MB (ISO 15498)" +msgstr "3,5\" 640 MB (ISO 15498)" + +msgid "3.5\" 1.3 GB (GigaMO)" +msgstr "3,5\" 1,3 GB (GigaMO)" + +msgid "3.5\" 2.3 GB (GigaMO 2)" +msgstr "3,5\" 2,3 GB (GigaMO 2)" + +msgid "5.25\" 600 MB" +msgstr "5,25\" 600 MB" + +msgid "5.25\" 650 MB" +msgstr "5,25\" 650 MB" + +msgid "5.25\" 1 GB" +msgstr "5,25\" 1 GB" + +msgid "5.25\" 1.3 GB" +msgstr "5,25\" 1,3 GB" + +msgid "Perfect RPM" +msgstr "Perfekt RPM" + +msgid "1% below perfect RPM" +msgstr "1 % under perfekt RPM" + +msgid "1.5% below perfect RPM" +msgstr "1,5 % under perfekt RPM" + +msgid "2% below perfect RPM" +msgstr "2 % under perfekt RPM" + +msgid "(System Default)" +msgstr "(Systemstandard)" + +msgid "Failed to initialize network driver" +msgstr "Kunne ikke initialisere nettverksdriver" + +msgid "The network configuration will be switched to the null driver" +msgstr "Nettverkskonfigurasjonen vil bli byttet til null-driver" + +msgid "Mouse sensitivity:" +msgstr "Musesensitivitet:" + +msgid "Select media images from program working directory" +msgstr "Velg mediebilder fra programmets arbeidsmappe" + +msgid "PIT mode:" +msgstr "PIT-modus:" + +msgid "Auto" +msgstr "Auto" + +msgid "Slow" +msgstr "Sakte" + +msgid "Fast" +msgstr "Rask" + +msgid "&Auto-pause on focus loss" +msgstr "&Automatisk pause ved tap av fokus" + +msgid "WinBox is no longer supported" +msgstr "WinBox støttes ikke lenger" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "Utviklingen av WinBox-behandleren ble stoppet i 2022 på grunn av mangel på vedlikeholdere. Siden vi fokuserer på å gjøre 86Box enda bedre, har vi besluttet å ikke lenger støtte WinBox som behandler.\n\nIngen flere oppdateringer vil bli gitt gjennom WinBox, og du kan oppleve feil oppførsel hvis du fortsetter å bruke den med nyere versjoner av 86Box. Feilrapporter relatert til WinBox vil bli lukket som ugyldige.\n\nGå til 86box.net for en liste over andre behandlere du kan bruke." + +msgid "Generate" +msgstr "Generer" + +msgid "Joystick configuration" +msgstr "Styrespak-konfigurasjon" + +msgid "Device" +msgstr "Enhet" + +msgid "%1 (X axis)" +msgstr "%1 (X-akse)" + +msgid "%1 (Y axis)" +msgstr "%1 (Y-akse)" + +msgid "MCA devices" +msgstr "MCA-enheter" + +msgid "List of MCA devices:" +msgstr "Liste over MCA-enheter:" + +msgid "&Tablet tool" +msgstr "&Tegnebrettverktøy" + +msgid "About &Qt" +msgstr "Om &Qt" + +msgid "&MCA devices..." +msgstr "&MCA-enheter..." + +msgid "Show non-&primary monitors" +msgstr "Vis ikke-&primære skjermer" + +msgid "Open screenshots &folder..." +msgstr "Åpne skjermbilde&mappe..." + +msgid "Appl&y fullscreen stretch mode when maximized" +msgstr "Bruk fullskjerms&strekkmodus ved maksimering" + +msgid "&Cursor/Puck" +msgstr "&Markør/pekeplate" + +msgid "&Pen" +msgstr "&Penn" + +msgid "&Host CD/DVD Drive (%1:)" +msgstr "&Vert CD/DVD-stasjon (%1:)" + +msgid "&Connected" +msgstr "&Koblet til" + +msgid "Clear image &history" +msgstr "Tøm bilde&historikk" + +msgid "Create..." +msgstr "Opprett..." + +msgid "Host CD/DVD Drive (%1)" +msgstr "Vert CD/DVD-stasjon (%1)" + +msgid "Unknown Bus" +msgstr "Ukjent buss" + +msgid "Null Driver" +msgstr "Null-driver" + +msgid "NIC:" +msgstr "Nettverkskort:" + +msgid "NIC %1 (%2) %3" +msgstr "Nettverkskort %1 (%2) %3" + +msgid "&NIC %1 (%2) %3" +msgstr "&Nettverkskort %1 (%2) %3" + +msgid "Render behavior" +msgstr "Gjengivelsesatferd" + +msgid "Use target framerate:" +msgstr "Bruk mål-bilderate:" + +msgid " fps" +msgstr " bps" + +msgid "VSync" +msgstr "VSync" + +msgid "Synchronize with video" +msgstr "Synkroniser med video" + +msgid "Shaders" +msgstr "Shader-programmer" + +msgid "Remove" +msgstr "Fjern" + +msgid "Browse..." +msgstr "Bla gjennom..." + +msgid "Couldn't create OpenGL context." +msgstr "Kunne ikke opprette OpenGL-kontekst." + +msgid "Couldn't switch to OpenGL context." +msgstr "Kunne ikke bytte til OpenGL-kontekst." + +msgid "OpenGL version 3.0 or greater is required. Current version is %1.%2" +msgstr "OpenGL versjon 3.0 eller høyere kreves. Nåværende versjon er %1.%2" + +msgid "Error initializing OpenGL" +msgstr "Feil ved initialisering av OpenGL" + +msgid "\nFalling back to software rendering." +msgstr "\nFaller tilbake til programvaregjengivelse." + +msgid "

When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.

" +msgstr "

Når du velger mediebilder (CD-ROM, diskett osv.), vil åpningsdialogen starte i samme mappe som 86Box-konfigurasjonsfilen. Denne innstillingen vil sannsynligvis bare ha betydning på macOS.

" + +msgid "This machine might have been moved or copied." +msgstr "Denne maskinen kan ha blitt flyttet eller kopiert." + +msgid "In order to ensure proper networking functionality, 86Box needs to know if this machine was moved or copied.\n\nSelect \"I Copied It\" if you are not sure." +msgstr "For å sikre korrekt nettverksfunksjonalitet, må 86Box vite om denne maskinen ble flyttet eller kopiert.\n\nVelg \"Jeg kopierte den\" hvis du er usikker." + +msgid "I Moved It" +msgstr "Jeg flyttet den" + +msgid "I Copied It" +msgstr "Jeg kopierte den" + +msgid "86Box Monitor #" +msgstr "86Box-skjerm #" + +msgid "No MCA devices." +msgstr "Ingen MCA-enheter." + +msgid "MiB" +msgstr "MiB" + +msgid "GiB" +msgstr "GiB" + +msgid "Network Card #1" +msgstr "Nettverkskort #1" + +msgid "Network Card #2" +msgstr "Nettverkskort #2" + +msgid "Network Card #3" +msgstr "Nettverkskort #3" + +msgid "Network Card #4" +msgstr "Nettverkskort #4" + +msgid "Mode:" +msgstr "Modus:" + +msgid "Interface:" +msgstr "Grensesnitt:" + +msgid "Adapter:" +msgstr "Adapter:" + +msgid "VDE Socket:" +msgstr "VDE-kontakt:" + +msgid "86Box Unit Tester" +msgstr "86Box-enhetstester" + +msgid "Novell NetWare 2.x Key Card" +msgstr "Novell NetWare 2.x nøkkelkort" + +msgid "Serial port passthrough 1" +msgstr "Seriell port-gjennomkobling 1" + +msgid "Serial port passthrough 2" +msgstr "Seriell port-gjennomkobling 2" + +msgid "Serial port passthrough 3" +msgstr "Seriell port-gjennomkobling 3" + +msgid "Serial port passthrough 4" +msgstr "Seriell port-gjennomkobling 4" + +msgid "Renderer &options..." +msgstr "Gjengivelses&alternativer..." + +msgid "PC/XT Keyboard" +msgstr "PC/XT-tastatur" + +msgid "AT Keyboard" +msgstr "AT-tastatur" + +msgid "AX Keyboard" +msgstr "AX-tastatur" + +msgid "PS/2 Keyboard" +msgstr "PS/2-tastatur" + +msgid "PS/55 Keyboard" +msgstr "PS/55-tastatur" + +msgid "Keys" +msgstr "Taster" + +msgid "Logitech/Microsoft Bus Mouse" +msgstr "Logitech/Microsoft-bussmus" + +msgid "Microsoft Bus Mouse (InPort)" +msgstr "Microsoft-bussmus (InPort)" + +msgid "Mouse Systems Serial Mouse" +msgstr "Mouse Systems-seriell mus" + +msgid "Mouse Systems Bus Mouse" +msgstr "Mouse Systems-bussmus" + +msgid "Microsoft Serial Mouse" +msgstr "Microsoft-seriell mus" + +msgid "Microsoft Serial BallPoint" +msgstr "Microsoft-seriell BallPoint" + +msgid "Logitech Serial Mouse" +msgstr "Logitech-seriell mus" + +msgid "PS/2 Mouse" +msgstr "PS/2-mus" + +msgid "PS/2 QuickPort Mouse" +msgstr "PS/2 QuickPort-mus" + +msgid "3M MicroTouch (Serial)" +msgstr "3M MicroTouch (seriell)" + +msgid "Default Baud rate" +msgstr "Standard baudrate" + +msgid "[COM] Standard Hayes-compliant Modem" +msgstr "[COM] Standard Hayes-kompatibelt modem" + +msgid "Roland MT-32 Emulation" +msgstr "Roland MT-32-emulering" + +msgid "Roland MT-32 (New) Emulation" +msgstr "Roland MT-32 (Ny)-emulering" + +msgid "Roland CM-32L Emulation" +msgstr "Roland CM-32L-emulering" + +msgid "Roland CM-32LN Emulation" +msgstr "Roland CM-32LN-emulering" + +msgid "OPL4-ML Daughterboard" +msgstr "OPL4-ML-tilleggskort" + +msgid "System MIDI" +msgstr "System-MIDI" + +msgid "MIDI Input Device" +msgstr "MIDI-inngangsenhet" + +msgid "BIOS file" +msgstr "BIOS-fil" + +msgid "BIOS file (ROM #1)" +msgstr "BIOS-fil (ROM #1)" + +msgid "BIOS file (ROM #2)" +msgstr "BIOS-fil (ROM #2)" + +msgid "BIOS file (ROM #3)" +msgstr "BIOS-fil (ROM #3)" + +msgid "BIOS file (ROM #4)" +msgstr "BIOS-fil (ROM #4)" + +msgid "BIOS address" +msgstr "BIOS-adresse" + +msgid "BIOS address (ROM #1)" +msgstr "BIOS-adresse (ROM #1)" + +msgid "BIOS address (ROM #2)" +msgstr "BIOS-adresse (ROM #2)" + +msgid "BIOS address (ROM #3)" +msgstr "BIOS-adresse (ROM #3)" + +msgid "BIOS address (ROM #4)" +msgstr "BIOS-adresse (ROM #4)" + +msgid "Enable BIOS extension ROM Writes" +msgstr "Aktiver skriving til BIOS-utvidelses-ROM" + +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "Aktiver skriving til BIOS-utvidelses-ROM (ROM #1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "Aktiver skriving til BIOS-utvidelses-ROM (ROM #2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "Aktiver skriving til BIOS-utvidelses-ROM (ROM #3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "Aktiver skriving til BIOS-utvidelses-ROM (ROM #4)" + +msgid "Linear framebuffer base" +msgstr "Grunnadresse for lineært framebuffer" + +msgid "Address" +msgstr "Adresse" + +msgid "IRQ" +msgstr "IRQ" + +msgid "Serial port IRQ" +msgstr "Serieport-IRQ" + +msgid "Parallel port IRQ" +msgstr "Parallellport-IRQ" + +msgid "BIOS Revision" +msgstr "BIOS-revisjon" + +msgid "BIOS Version" +msgstr "BIOS-versjon" + +msgid "BIOS Language" +msgstr "BIOS-språk" + +msgid "IBM 5161 Expansion Unit" +msgstr "IBM 5161-utvidelsesenhet" + +msgid "IBM Cassette Basic" +msgstr "IBM Kassett-Basic" + +msgid "Translate 26 -> 17" +msgstr "Oversett 26 -> 17" + +msgid "Language" +msgstr "Språk" + +msgid "Enable backlight" +msgstr "Aktiver bakgrunnsbelysning" + +msgid "Invert colors" +msgstr "Inverter farger" + +msgid "BIOS size" +msgstr "BIOS-størrelse" + +msgid "BIOS size (ROM #1)" +msgstr "BIOS-størrelse (ROM #1)" + +msgid "BIOS size (ROM #2)" +msgstr "BIOS-størrelse (ROM #2)" + +msgid "BIOS size (ROM #3)" +msgstr "BIOS-størrelse (ROM #3)" + +msgid "BIOS size (ROM #4)" +msgstr "BIOS-størrelse (ROM #4)" + +msgid "Map C0000-C7FFF as UMB" +msgstr "Kartlegg C0000-C7FFF som UMB" + +msgid "Map C8000-CFFFF as UMB" +msgstr "Kartlegg C8000-CFFFF som UMB" + +msgid "Map D0000-D7FFF as UMB" +msgstr "Kartlegg D0000-D7FFF som UMB" + +msgid "Map D8000-DFFFF as UMB" +msgstr "Kartlegg D8000-DFFFF som UMB" + +msgid "Map E0000-E7FFF as UMB" +msgstr "Kartlegg E0000-E7FFF som UMB" + +msgid "Map E8000-EFFFF as UMB" +msgstr "Kartlegg E8000-EFFFF som UMB" + +msgid "JS9 Jumper (JIM)" +msgstr "JS9-bygel (JIM)" + +msgid "MIDI Output Device" +msgstr "MIDI-utgangsenhet" + +msgid "MIDI Real time" +msgstr "MIDI sanntid" + +msgid "MIDI Thru" +msgstr "MIDI gjennom" + +msgid "MIDI Clockout" +msgstr "MIDI-klokkeutgang" + +msgid "SoundFont" +msgstr "SoundFont" + +msgid "Output Gain" +msgstr "Utgangsforsterkning" + +msgid "Chorus" +msgstr "Chorus" + +msgid "Chorus Voices" +msgstr "Chorus-stemmer" + +msgid "Chorus Level" +msgstr "Chorus-nivå" + +msgid "Chorus Speed" +msgstr "Chorus-hastighet" + +msgid "Chorus Depth" +msgstr "Chorus-dybde" + +msgid "Chorus Waveform" +msgstr "Chorus-bølgeform" + +msgid "Reverb" +msgstr "Reverb" + +msgid "Reverb Room Size" +msgstr "Reverb-romstørrelse" + +msgid "Reverb Damping" +msgstr "Reverb-demping" + +msgid "Reverb Width" +msgstr "Reverb-bredde" + +msgid "Reverb Level" +msgstr "Reverb-nivå" + +msgid "Interpolation Method" +msgstr "Interpolasjonsmetode" + +msgid "Dynamic Sample Loading" +msgstr "Dynamisk sample-lasting" + +msgid "Reverb Output Gain" +msgstr "Reverb-utgangsforsterkning" + +msgid "Reversed stereo" +msgstr "Omvendt stereo" + +msgid "Nice ramp" +msgstr "Myk overgang" + +msgid "Hz" +msgstr "Hz" + +msgid "Buttons" +msgstr "Knapper" + +msgid "Serial Port" +msgstr "Serieport" + +msgid "RTS toggle" +msgstr "RTS-veksling" + +msgid "Revision" +msgstr "Revisjon" + +msgid "Controller" +msgstr "Kontroller" + +msgid "Show Crosshair" +msgstr "Vis siktekorn" + +msgid "DMA" +msgstr "DMA" + +msgid "MAC Address" +msgstr "MAC-adresse" + +msgid "MAC Address OUI" +msgstr "MAC-adresse OUI" + +msgid "Enable BIOS" +msgstr "Aktiver BIOS" + +msgid "Baud Rate" +msgstr "Baudrate" + +msgid "TCP/IP listening port" +msgstr "TCP/IP-lytteport" + +msgid "Phonebook File" +msgstr "Telefonbokfil" + +msgid "Telnet emulation" +msgstr "Telnet-emulering" + +msgid "RAM Address" +msgstr "RAM-adresse" + +msgid "RAM size" +msgstr "RAM-størrelse" + +msgid "Initial RAM size" +msgstr "Opprinnelig RAM-størrelse" + +msgid "Serial Number" +msgstr "Serienummer" + +msgid "Host ID" +msgstr "Vert-ID" + +msgid "FDC Address" +msgstr "FDC-adresse" + +msgid "MPU-401 Address" +msgstr "MPU-401-adresse" + +msgid "MPU-401 IRQ" +msgstr "MPU-401-IRQ" + +msgid "Receive MIDI input" +msgstr "Motta MIDI-inngang" + +msgid "Low DMA" +msgstr "Lav DMA" + +msgid "Enable Game port" +msgstr "Aktiver spillport" + +msgid "SID Model" +msgstr "SID-modell" + +msgid "SID Filter Strength" +msgstr "SID-filterstyrke" + +msgid "Surround module" +msgstr "Surround-modul" + +msgid "CODEC" +msgstr "Kodek" + +msgid "Raise CODEC interrupt on CODEC setup (needed by some drivers)" +msgstr "Generer kodek-avbrudd ved kodek-oppsett (nødvendig for noen drivere)" + +msgid "SB Address" +msgstr "SB-adresse" + +msgid "Adlib Address" +msgstr "Adlib-adresse" + +msgid "Use EEPROM setting" +msgstr "Bruk EEPROM-innstilling" + +msgid "WSS IRQ" +msgstr "WSS-IRQ" + +msgid "WSS DMA" +msgstr "WSS-DMA" + +msgid "Enable OPL" +msgstr "Aktiver OPL" + +msgid "Receive MIDI input (MPU-401)" +msgstr "Motta MIDI-inngang (MPU-401)" + +msgid "SB low DMA" +msgstr "SB lav DMA" + +msgid "6CH variant (6-channel)" +msgstr "6CH-variant (6-kanals)" + +msgid "Enable CMS" +msgstr "Aktiver CMS" + +msgid "Mixer" +msgstr "Mikser" + +msgid "High DMA" +msgstr "Høy DMA" + +msgid "Control PC speaker" +msgstr "Kontroller PC-høyttaler" + +msgid "Memory size" +msgstr "Minnestørrelse" + +msgid "EMU8000 Address" +msgstr "EMU8000-adresse" + +msgid "IDE Controller" +msgstr "IDE-kontroller" + +msgid "Codec" +msgstr "Kodek" + +msgid "GUS type" +msgstr "GUS-type" + +msgid "Enable 0x04 \"Exit 86Box\" command" +msgstr "Aktiver 0x04-kommandoen \"Avslutt 86Box\"" + +msgid "Display type" +msgstr "Skjermtype" + +msgid "Composite type" +msgstr "Kompositt-type" + +msgid "RGB type" +msgstr "RGB-type" + +msgid "Line doubling type" +msgstr "Linjefordoblingstype" + +msgid "Snow emulation" +msgstr "Snøeffekt-emulering" + +msgid "Monitor type" +msgstr "Skjermtype" + +msgid "Character set" +msgstr "Tegnsett" + +msgid "XGA type" +msgstr "XGA-type" + +msgid "Instance" +msgstr "Forekomst" + +msgid "MMIO Address" +msgstr "MMIO-adresse" + +msgid "RAMDAC type" +msgstr "RAMDAC-type" + +msgid "Blend" +msgstr "Blanding" + +msgid "Font" +msgstr "Skrifttype" + +msgid "Bilinear filtering" +msgstr "Bilineær filtrering" + +msgid "Video chroma-keying" +msgstr "Video chroma-key" + +msgid "Dithering" +msgstr "Dithering" + +msgid "Enable NMI for CGA emulation" +msgstr "Aktiver NMI for CGA-emulering" + +msgid "Voodoo type" +msgstr "Voodoo-type" + +msgid "Framebuffer memory size" +msgstr "Framebuffer-minnestørrelse" + +msgid "Texture memory size" +msgstr "Teksturminnestørrelse" + +msgid "Dither subtraction" +msgstr "Dither-subtraksjon" + +msgid "Screen Filter" +msgstr "Skjermfilter" + +msgid "Render threads" +msgstr "Render-tråder" + +msgid "SLI" +msgstr "SLI" + +msgid "Start Address" +msgstr "Startadresse" + +msgid "Contiguous Size" +msgstr "Sammenhengende størrelse" + +msgid "I/O Width" +msgstr "I/U-bredde" + +msgid "Transfer Speed" +msgstr "Overføringshastighet" + +msgid "EMS mode" +msgstr "EMS-modus" + +msgid "EMS Address" +msgstr "EMS-adresse" + +msgid "EMS 1 Address" +msgstr "EMS 1-adresse" + +msgid "EMS 2 Address" +msgstr "EMS 2-adresse" + +msgid "EMS Memory Size" +msgstr "EMS-minnestørrelse" + +msgid "EMS 1 Memory Size" +msgstr "EMS 1-minnestørrelse" + +msgid "EMS 2 Memory Size" +msgstr "EMS 2-minnestørrelse" + +msgid "Enable EMS" +msgstr "Aktiver EMS" + +msgid "Enable EMS 1" +msgstr "Aktiver EMS 1" + +msgid "Enable EMS 2" +msgstr "Aktiver EMS 2" + +msgid "Address for > 2 MB" +msgstr "Adresse for > 2 MB" + +msgid "Frame Address" +msgstr "Rammeadresse" + +msgid "USA" +msgstr "USA" + +msgid "Danish" +msgstr "Dansk" + +msgid "Always at selected speed" +msgstr "Alltid på valgt hastighet" + +msgid "BIOS setting + Hotkeys (off during POST)" +msgstr "BIOS-innstilling + hurtigtaster (av under POST)" + +msgid "64 KB starting from F0000" +msgstr "64 KB fra F0000" + +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KB fra E0000 (adresse-MSB invertert, siste 64 KB først)" + +msgid "Sine" +msgstr "Sinus" + +msgid "Triangle" +msgstr "Trekant" + +msgid "Linear" +msgstr "Lineær" + +msgid "4th Order" +msgstr "4. orden" + +msgid "7th Order" +msgstr "7. orden" + +msgid "Non-timed (original)" +msgstr "Ikke-timet (original)" + +msgid "45 Hz (JMP2 not populated)" +msgstr "45 Hz (JMP2 ikke koblet)" + +msgid "Two" +msgstr "To" + +msgid "Three" +msgstr "Tre" + +msgid "Wheel" +msgstr "Hjul" + +msgid "Five + Wheel" +msgstr "Fem + hjul" + +msgid "Five + 2 Wheels" +msgstr "Fem + 2 hjul" + +msgid "A3 - SMT2 Serial / SMT3(R)V" +msgstr "A3 - SMT2-seriell / SMT3(R)V" + +msgid "Q1 - SMT3(R) Serial" +msgstr "Q1 - SMT3(R)-seriell" + +msgid "8 KB" +msgstr "8 KB" + +msgid "32 KB" +msgstr "32 KB" + +msgid "16 KB" +msgstr "16 KB" + +msgid "64 KB" +msgstr "64 KB" + +msgid "Disable BIOS" +msgstr "Deaktiver BIOS" + +msgid "512 KB" +msgstr "512 KB" + +msgid "2 MB" +msgstr "2 MB" + +msgid "8 MB" +msgstr "8 MB" + +msgid "28 MB" +msgstr "28 MB" + +msgid "1 MB" +msgstr "1 MB" + +msgid "4 MB" +msgstr "4 MB" + +msgid "12 MB" +msgstr "12 MB" + +msgid "16 MB" +msgstr "16 MB" + +msgid "20 MB" +msgstr "20 MB" + +msgid "24 MB" +msgstr "24 MB" + +msgid "SigmaTel STAC9721T (stereo)" +msgstr "SigmaTel STAC9721T (stereo)" + +msgid "Classic" +msgstr "Klassisk" + +msgid "256 KB" +msgstr "256 KB" + +msgid "Composite" +msgstr "Kompositt" + +msgid "True color" +msgstr "Ekte farger" + +msgid "Old" +msgstr "Gammel" + +msgid "New" +msgstr "Ny" + +msgid "Color (generic)" +msgstr "Farge (generisk)" + +msgid "Green Monochrome" +msgstr "Grønn monokrom" + +msgid "Amber Monochrome" +msgstr "Ravgul monokrom" + +msgid "Gray Monochrome" +msgstr "Grå monokrom" + +msgid "Color (no brown)" +msgstr "Farge (ingen brun)" + +msgid "Color (IBM 5153)" +msgstr "Farge (IBM 5153)" + +msgid "Simple doubling" +msgstr "Enkel dobling" + +msgid "sRGB interpolation" +msgstr "sRGB-interpolering" + +msgid "Linear interpolation" +msgstr "Lineær interpolering" + +msgid "Has secondary 8x8 character set" +msgstr "Har sekundært 8x8-tegnsett" + +msgid "Has Quadcolor II daughter board" +msgstr "Har Quadcolor II-datterkort" + +msgid "Alternate monochrome contrast" +msgstr "Alternativ monokrom kontrast" + +msgid "128 KB" +msgstr "128 KB" + +msgid "Monochrome (5151/MDA) (white)" +msgstr "Monokrom (5151/MDA) (hvit)" + +msgid "Monochrome (5151/MDA) (green)" +msgstr "Monokrom (5151/MDA) (grønn)" + +msgid "Monochrome (5151/MDA) (amber)" +msgstr "Monokrom (5151/MDA) (ravgul)" + +msgid "Color 40x25 (5153/CGA)" +msgstr "Farge 40x25 (5153/CGA)" + +msgid "Color 80x25 (5153/CGA)" +msgstr "Farge 80x25 (5153/CGA)" + +msgid "Enhanced Color - Normal Mode (5154/ECD)" +msgstr "Forbedret farge – normalmodus (5154/ECD)" + +msgid "Enhanced Color - Enhanced Mode (5154/ECD)" +msgstr "Forbedret farge – forbedret modus (5154/ECD)" + +msgid "Green" +msgstr "Grønn" + +msgid "Amber" +msgstr "Ravgul" + +msgid "Gray" +msgstr "Grå" + +msgid "Grayscale" +msgstr "Gråtoner" + +msgid "Color" +msgstr "Farge" + +msgid "U.S. English" +msgstr "Amerikansk engelsk" + +msgid "Scandinavian" +msgstr "Skandinavisk" + +msgid "Other languages" +msgstr "Andre språk" + +msgid "Bochs latest" +msgstr "Bochs nyeste" + +msgid "Apply overscan deltas" +msgstr "Bruk overskann-endringer" + +msgid "Mono Interlaced" +msgstr "Mono-flettet" + +msgid "Mono Non-Interlaced" +msgstr "Mono-ikke-flettet" + +msgid "Color Interlaced" +msgstr "Farge-flettet" + +msgid "Color Non-Interlaced" +msgstr "Farge-ikke-flettet" + +msgid "3Dfx Voodoo Graphics" +msgstr "3Dfx Voodoo-grafikk" + +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + +msgid "Obsidian SB50 + Amethyst (2 TMUs)" +msgstr "Obsidian SB50 + Amethyst (2 TMU-er)" + +msgid "8-bit" +msgstr "8-bit" + +msgid "16-bit" +msgstr "16-bit" + +msgid "Standard (150ns)" +msgstr "Standard (150 ns)" + +msgid "High-Speed (120ns)" +msgstr "Høyhastighet (120 ns)" + +msgid "Enabled" +msgstr "Aktivert" + +msgid "Standard" +msgstr "Standard" + +msgid "High-Speed" +msgstr "Høyhastighet" + +msgid "Stereo LPT DAC" +msgstr "Stereo LPT-DAC" + +msgid "Generic Text Printer" +msgstr "Generisk tekstskriver" + +msgid "Generic ESC/P Dot-Matrix Printer" +msgstr "Generisk ESC/P-matriseskriver" + +msgid "Generic PostScript Printer" +msgstr "Generisk PostScript-skriver" + +msgid "Generic PCL5e Printer" +msgstr "Generisk PCL5e-skriver" + +msgid "Parallel Line Internet Protocol" +msgstr "Parallell linje-internettprotokoll" + +msgid "Protection Dongle for Savage Quest" +msgstr "Beskyttelsesdongle for Savage Quest" + +msgid "Serial Passthrough Device" +msgstr "Seriell gjennomkoblingsenhet" + +msgid "Passthrough Mode" +msgstr "Gjennomkoblingsmodus" + +msgid "Host Serial Device" +msgstr "Verts-seriellenhet" + +msgid "Name of pipe" +msgstr "Navn på pipe" + +msgid "Data bits" +msgstr "Databiter" + +msgid "Stop bits" +msgstr "Stoppbiter" + +msgid "Baud Rate of Passthrough" +msgstr "Baudrate for gjennomkobling" + +msgid "Named Pipe (Server)" +msgstr "Navngitt pipe (server)" + +msgid "Named Pipe (Client)" +msgstr "Navngitt pipe (klient)" + +msgid "Host Serial Passthrough" +msgstr "Verts-seriell gjennomkobling" + +msgid "E&ject %1" +msgstr "M&at ut %1" + +msgid "&Unmute" +msgstr "&Slå på lyd" + +msgid "Softfloat FPU" +msgstr "Softfloat FPU" + +msgid "High performance impact" +msgstr "Høy ytelsespåvirkning" + +msgid "[Generic] RAM Disk (max. speed)" +msgstr "[Generisk] RAM-disk (maks hastighet)" + +msgid "[Generic] 1989 (3500 RPM)" +msgstr "[Generisk] 1989 (3500 RPM)" + +msgid "[Generic] 1992 (3600 RPM)" +msgstr "[Generisk] 1992 (3600 RPM)" + +msgid "[Generic] 1994 (4500 RPM)" +msgstr "[Generisk] 1994 (4500 RPM)" + +msgid "[Generic] 1996 (5400 RPM)" +msgstr "[Generisk] 1996 (5400 RPM)" + +msgid "[Generic] 1997 (5400 RPM)" +msgstr "[Generisk] 1997 (5400 RPM)" + +msgid "[Generic] 1998 (5400 RPM)" +msgstr "[Generisk] 1998 (5400 RPM)" + +msgid "[Generic] 2000 (7200 RPM)" +msgstr "[Generisk] 2000 (7200 RPM)" + +msgid "IBM 8514/A clone (ISA)" +msgstr "IBM 8514/A-klone (ISA)" + +msgid "Vendor" +msgstr "Leverandør" + +msgid "30 Hz (JMP2 = 1)" +msgstr "30 Hz (JMP2 = 1)" + +msgid "60 Hz (JMP2 = 2)" +msgstr "60 Hz (JMP2 = 2)" + +msgid "Generic PC/XT Memory Expansion" +msgstr "Generisk PC/XT-minneutvidelse" + +msgid "Generic PC/AT Memory Expansion" +msgstr "Generisk PC/AT-minneutvidelse" + +msgid "Unable to find Dot-Matrix fonts" +msgstr "Kan ikke finne matriseskriver-fonter" + +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." +msgstr "TrueType-fonter i mappen \"roms/printer/fonts\" kreves for emulering av generisk ESC/P-matriseskriver." + +msgid "Inhibit multimedia keys" +msgstr "Deaktiver multimedietaster" + +msgid "Ask for confirmation before saving settings" +msgstr "Be om bekreftelse før innstillingene lagres" + +msgid "Ask for confirmation before hard resetting" +msgstr "Be om bekreftelse før hard reset" + +msgid "Ask for confirmation before quitting" +msgstr "Be om bekreftelse før avslutning" + +msgid "Options" +msgstr "Alternativer" + +msgid "Model" +msgstr "Modell" + +msgid "Model:" +msgstr "Modell:" + +msgid "Failed to initialize Vulkan renderer." +msgstr "Kunne ikke initialisere Vulkan-gjengiver." + +msgid "GLSL Error" +msgstr "GLSL-feil" + +msgid "Could not load shader: %1" +msgstr "Kunne ikke laste shader: %1" + +msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" +msgstr "OpenGL versjon 3.0 eller høyere kreves. Nåværende GLSL-versjon er %1.%2" + +msgid "Could not load texture: %1" +msgstr "Kunne ikke laste tekstur: %1" + +msgid "Could not compile shader:\n\n%1" +msgstr "Kunne ikke kompilere shader:\n\n%1" + +msgid "Program not linked:\n\n%1" +msgstr "Program ikke koblet:\n\n%1" + +msgid "Shader Manager" +msgstr "Shader-håndtering" + +msgid "Shader Configuration" +msgstr "Shader-konfigurasjon" + +msgid "Add" +msgstr "Legg til" + +msgid "Move up" +msgstr "Flytt opp" + +msgid "Move down" +msgstr "Flytt ned" + +msgid "Could not load file %1" +msgstr "Kunne ikke laste fil %1" + +msgid "Key Bindings:" +msgstr "Tastebindinger:" + +msgid "Action" +msgstr "Handling" + +msgid "Keybind" +msgstr "Tastebinding" + +msgid "Clear binding" +msgstr "Fjern binding" + +msgid "Bind" +msgstr "Bind" + +msgid "Bind Key" +msgstr "Bind tast" + +msgid "Enter key combo:" +msgstr "Skriv inn tastekombinasjon:" + +msgid "Bind conflict" +msgstr "Bindingkonflikt" + +msgid "This key combo is already in use." +msgstr "Denne tastekombinasjonen er allerede i bruk." + +msgid "Send Control+Alt+Del" +msgstr "Send Control+Alt+Del" + +msgid "Send Control+Alt+Escape" +msgstr "Send Control+Alt+Escape" + +msgid "Toggle fullscreen" +msgstr "Veksle fullskjerm" + +msgid "Screenshot" +msgstr "Skjermbilde" + +msgid "Release mouse pointer" +msgstr "Frigi musepeker" + +msgid "Toggle pause" +msgstr "Veksle pause" + +msgid "Toggle mute" +msgstr "Veksle lyd av/på" + +msgid "Text files" +msgstr "Tekstfiler" + +msgid "ROM files" +msgstr "ROM-filer" + +msgid "SoundFont files" +msgstr "SoundFont-filer" + +msgid "Local Switch" +msgstr "Lokal svitsj" + +msgid "Remote Switch" +msgstr "Ekstern svitsj" + +msgid "Switch:" +msgstr "Svitsj:" + +msgid "Hub Mode" +msgstr "Hub-modus" + +msgid "Hostname:" +msgstr "Vertsnavn:" + +msgid "ISA RAM:" +msgstr "ISA-RAM:" + +msgid "ISA ROM:" +msgstr "ISA-ROM:" + +msgid "&Wipe NVRAM" +msgstr "&Tøm NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Dette vil slette all NVRAM (og relaterte) filer for den virtuelle maskinen som ligger i undermappen «nvr». Du må konfigurere BIOS (og eventuelt andre enheter i VM-en) på nytt om nødvendig.\n\nEr du sikker på at du vil tømme alt innhold i NVRAM for den virtuelle maskinen «%1»?" + +msgid "Success" +msgstr "Vellykket" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Tømming av NVRAM-innholdet for den virtuelle maskinen «%1» var vellykket" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "En feil oppstod under tømming av NVRAM-innholdet for den virtuelle maskinen «%1»" + +msgid "%1 VM Manager" +msgstr "%1 VM-håndtering" + +msgid "%n disk(s)" +msgstr "%n disk(er)" + +msgid "Unknown Status" +msgstr "Ukjent status" + +msgid "No Machines Found!" +msgstr "Ingen maskiner funnet!" + +msgid "Check for updates on startup" +msgstr "Se etter oppdateringer ved oppstart" + +msgid "Unable to determine release information" +msgstr "Kunne ikke fastslå versjonsinformasjon" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Det oppstod en feil ved søk etter oppdateringer:\n\n%1\n\nPrøv igjen senere." + +msgid "Update check complete" +msgstr "Oppdateringssjekk fullført" + +msgid "stable" +msgstr "stabil" + +msgid "beta" +msgstr "beta" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Du kjører den nyeste %1-versjonen av 86Box: %2" + +msgid "version" +msgstr "versjon" + +msgid "build" +msgstr "bygg" + +msgid "You are currently running version %1." +msgstr "Du kjører for øyeblikket versjon %1." + +msgid "Version %1 is now available." +msgstr "Versjon %1 er nå tilgjengelig." + +msgid "You are currently running build %1." +msgstr "Du kjører for øyeblikket bygg %1." + +msgid "Build %1 is now available." +msgstr "Bygg %1 er nå tilgjengelig." + +msgid "Would you like to visit the download page?" +msgstr "Vil du besøke nedlastingssiden?" + +msgid "Visit download page" +msgstr "Besøk nedlastingssiden" + +msgid "Update check" +msgstr "Oppdateringssjekk" + +msgid "Checking for updates..." +msgstr "Ser etter oppdateringer..." + +msgid "86Box Update" +msgstr "86Box-oppdatering" + +msgid "Release notes:" +msgstr "Versjonsnotater:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Virtuell maskin krasjet" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "Prosessen til den virtuelle maskinen «%1» ble uventet avsluttet med avslutningskode %2." + +msgid "The system will not be added." +msgstr "Systemet vil ikke bli lagt til." + +msgid "&Update mouse every CPU frame" +msgstr "&Oppdater musen for hver CPU-ramme" + +msgid "Hue" +msgstr "Fargetone" + +msgid "Saturation" +msgstr "Metning" + +msgid "Contrast" +msgstr "Kontrast" + +msgid "Brightness" +msgstr "Lysstyrke" + +msgid "Sharpness" +msgstr "Skarphet" + +msgid "&CGA composite settings..." +msgstr "&CGA-komposittinnstillinger..." + +msgid "CGA composite settings" +msgstr "CGA-komposittinnstillinger" diff --git a/src/qt/languages/nl-NL.po b/src/qt/languages/nl-NL.po index aa87cd37d..6408cf21c 100644 --- a/src/qt/languages/nl-NL.po +++ b/src/qt/languages/nl-NL.po @@ -27,8 +27,14 @@ msgstr "Ctrl+Alt+&Esc" msgid "&Pause" msgstr "&Pauze" -msgid "E&xit..." -msgstr "&Afsluiten..." +msgid "Pause" +msgstr "Pauze" + +msgid "Re&sume" +msgstr "He&rvatten" + +msgid "E&xit" +msgstr "&Afsluiten" msgid "&View" msgstr "&Beeld" @@ -51,20 +57,17 @@ msgstr "Re&nderer" msgid "&Qt (Software)" msgstr "&Qt (software)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" msgstr "Open&GL (3.0 Core)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." +msgid "Specify &dimensions..." msgstr "Afmetingen opgeven..." -msgid "F&orce 4:3 display ratio" -msgstr "F&orceer 4:3 beeldverhouding" +msgid "Force &4:3 display ratio" +msgstr "Forceer &4:3 beeldverhouding" msgid "&Window scale factor" msgstr "&Venster schaalfactor" @@ -99,7 +102,7 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" +msgid "Fi<er method" msgstr "Filtermethode" msgid "&Nearest" @@ -132,8 +135,8 @@ msgstr "&Integerschaal" msgid "4:&3 Integer scale" msgstr "4:&3 integerschaal" -msgid "E&GA/(S)VGA settings" -msgstr "E&GA/(S)VGA-instellingen" +msgid "EGA/(S)&VGA settings" +msgstr "EGA/(S)&VGA-instellingen" msgid "&Inverted VGA monitor" msgstr "Ge&ïnverteerde VGA-monitor" @@ -144,9 +147,15 @@ msgstr "VGA-scherm &type" msgid "RGB &Color" msgstr "RGB &Kleur" +msgid "RGB (no brown)" +msgstr "RGN (geen bruin)" + msgid "&RGB Grayscale" msgstr "&RGB grijstinten" +msgid "Generic RGBI color monitor" +msgstr "Generieke RGBI kleuren monitor" + msgid "&Amber monitor" msgstr "&Amber monitor" @@ -183,6 +192,9 @@ msgstr "&Tools" msgid "&Settings..." msgstr "&Instellingen..." +msgid "Settings..." +msgstr "Instellingen..." + msgid "&Update status bar icons" msgstr "&Statusbalkpictogrammen bijwerken" @@ -348,6 +360,9 @@ msgstr "Machine:" msgid "Configure" msgstr "Configureren" +msgid "CPU:" +msgstr "CPU:" + msgid "CPU type:" msgstr "CPU type:" @@ -384,6 +399,15 @@ msgstr "Ingeschakeld (UTC)" msgid "Dynamic Recompiler" msgstr "Dynamische Recompiler" +msgid "CPU frame size" +msgstr "CPU frame grootte" + +msgid "Larger frames (less smooth)" +msgstr "Groter frames (minder vloeiend)" + +msgid "Smaller frames (smoother)" +msgstr "Kleinere frames (vloeiender)" + msgid "Video:" msgstr "Video:" @@ -399,12 +423,27 @@ msgstr "IBM 8514/A-graphics" msgid "XGA Graphics" msgstr "XGA Graphics" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "IBM PS/55 Display Adapter Graphics" + +msgid "Keyboard:" +msgstr "Toetsenbord" + +msgid "Keyboard" +msgstr "Toetsenbord" + msgid "Mouse:" msgstr "Muis:" +msgid "Mouse" +msgstr "Muis" + msgid "Joystick:" msgstr "Joystick:" +msgid "Joystick" +msgstr "Joystick" + msgid "Joystick 1..." msgstr "Joystick 1..." @@ -435,6 +474,9 @@ msgstr "MIDI Out-apparaat:" msgid "MIDI In Device:" msgstr "MIDI In-apparaat:" +msgid "MIDI Out:" +msgstr "Midi Out:" + msgid "Standalone MPU-401" msgstr "Standalone MPU-401" @@ -474,6 +516,9 @@ msgstr "LPT3-apparaat:" msgid "LPT4 Device:" msgstr "LPT4-apparaat:" +msgid "Internal LPT ECP DMA:" +msgstr "Interne LPT ECP DMA:" + msgid "Serial port 1" msgstr "Seriële poort 1" @@ -498,18 +543,21 @@ msgstr "Parallelle poort 3" msgid "Parallel port 4" msgstr "Parallelle poort 4" -msgid "HD Controller:" -msgstr "HD-controller:" - msgid "FD Controller:" msgstr "FD-Controller:" +msgid "CD-ROM Controller:" +msgstr "CD-ROM controller" + msgid "Tertiary IDE Controller" msgstr "Tertiaire IDE-controller" msgid "Quaternary IDE Controller" msgstr "Quaternaire IDE-controller" +msgid "Hard disk" +msgstr "Harde schijf" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "Cassette" msgid "Hard disks:" msgstr "Harde schijven:" +msgid "Firmware Version" +msgstr "Firmware Versie" + msgid "&New..." msgstr "&Nieuw..." @@ -588,8 +639,14 @@ msgstr "CD-ROM-stations:" msgid "MO drives:" msgstr "MO-schijven:" -msgid "ZIP drives:" -msgstr "ZIP-schijven:" +msgid "MO:" +msgstr "MO:" + +msgid "Removable disks:" +msgstr "Verwisselbare schijven:" + +msgid "Removable disk drives:" +msgstr "Verwisselbare schijfstations" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "ISA RTC:" msgid "ISA Memory Expansion" msgstr "ISA-geheugenuitbreiding" +msgid "ISA ROM Cards" +msgstr "ISA ROM-kaart" + msgid "Card 1:" msgstr "Kaart 1:" @@ -612,6 +672,15 @@ msgstr "Kaart 3:" msgid "Card 4:" msgstr "Kaart 4:" +msgid "Generic ISA ROM Board" +msgstr "Generieke ISA ROM-kaart" + +msgid "Generic Dual ISA ROM Board" +msgstr "Generieke Dubbele ISA ROM-kaart" + +msgid "Generic Quad ISA ROM Board" +msgstr "Generieke Viervoudige ISA ROM-kaart" + msgid "ISABugger device" msgstr "ISABugger-apparaat" @@ -633,11 +702,17 @@ msgstr " - GEPAUZEERD" msgid "Speed" msgstr "Snelheid" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Verwijderbare schijf %1 (%2): %3" -msgid "ZIP images" -msgstr "ZIP-images" +msgid "&Removable disk %1 (%2): %3" +msgstr "&Verwijderbare schijf %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Verwijderbare schijf image" + +msgid "Image %1" +msgstr "Image %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "86Box kon geen bruikbare ROM images vinden.\n\nDownload een ROM set en pak deze uit in de map \"roms\"." @@ -696,12 +771,30 @@ msgstr "Netwerk" msgid "Ports (COM & LPT)" msgstr "Poorten (COM & LPT)" +msgid "Ports" +msgstr "Poorten" + +msgid "Serial ports:" +msgstr "Seriële poorten:" + +msgid "Parallel ports:" +msgstr "Parallelle poorten:" + msgid "Storage controllers" msgstr "Opslagcontrollers" msgid "Hard disks" msgstr "Harde schijven" +msgid "Disks:" +msgstr "Schijven:" + +msgid "Floppy:" +msgstr "Floppy:" + +msgid "Controllers:" +msgstr "Controllers:" + msgid "Floppy & CD-ROM drives" msgstr "Floppy- en CD-ROM-stations" @@ -711,6 +804,9 @@ msgstr "Andere verwijderbare apparaten" msgid "Other peripherals" msgstr "Andere randapparatuur" +msgid "Other devices" +msgstr "Andere apparaten" + msgid "Click to capture mouse" msgstr "Klik om muis vast te leggen" @@ -777,12 +873,39 @@ msgstr "Joystick met 4 assen en 4 knoppen" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Pedalen" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Thrustmaster Flight Control systeem" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Roer Control Systeem" + +msgid "2-button gamepad(s)" +msgstr "2-knops gamepad(s)" + +msgid "2-button flight yoke" +msgstr "2-knops stuurknuppel" + +msgid "4-button gamepad" +msgstr "4-knops gamepad" + +msgid "4-button flight yoke" +msgstr "4-knops stuurknuppel" + +msgid "2-button flight yoke with throttle" +msgstr "2-kops stuurknuppel met gashendel " + +msgid "4-button flight yoke with throttle" +msgstr "2-kops stuurknuppel met gashendel" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Win95 Stuurwiel (3 assen, 4 knoppen)" + msgid "None" msgstr "Geen" @@ -792,6 +915,9 @@ msgstr "%1 MB (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Floppy %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Floppy %1 (%2): %3" + msgid "Advanced sector images" msgstr "Geavanceerde sector-images" @@ -813,6 +939,9 @@ msgstr "Kan GhostPCL niet initialiseren" msgid "MO %1 (%2): %3" msgstr "MO %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&MO %1 (%2): %3" + msgid "MO images" msgstr "MO-images" @@ -822,6 +951,15 @@ msgstr "Welkom bij 86Box!" msgid "Internal device" msgstr "Intern apparaat" +msgid "&File" +msgstr "&Bestand" + +msgid "&New machine..." +msgstr "&Nieuwe machine..." + +msgid "&Check for updates..." +msgstr "&Controleren op updates..." + msgid "Exit" msgstr "&Afsluiten" @@ -897,12 +1035,18 @@ msgstr "Doorgaan" msgid "Cassette: %1" msgstr "Cassette: %1" +msgid "C&assette: %1" +msgstr "C&assette: %1" + msgid "Cassette images" msgstr "Cassette-images" msgid "Cartridge %1: %2" msgstr "Cartridge %1: %2" +msgid "Car&tridge %1: %2" +msgstr "Car&tridge %1: %2" + msgid "Cartridge images" msgstr "Cartridge-images" @@ -912,6 +1056,9 @@ msgstr "Hervat executie" msgid "Pause execution" msgstr "Pauze executie" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Druk op Ctrl+Alt+Del" @@ -921,9 +1068,279 @@ msgstr "Druk op Ctrl+Alt+Esc" msgid "Hard reset" msgstr "Harde reset" +msgid "Force shutdown" +msgstr "Forceer afsluiten" + +msgid "Start" +msgstr "Start" + +msgid "Not running" +msgstr "Niet actied" + +msgid "Running" +msgstr "Actief" + +msgid "Paused" +msgstr "Gepauzeerd" + +msgid "Waiting" +msgstr "aan het wachtend" + +msgid "Powered Off" +msgstr "Sluit af" + +msgid "%n running" +msgstr "%n actief" + +msgid "%n paused" +msgstr "%n gepauzeerd" + +msgid "%n waiting" +msgstr "%n aan het wachten" + +msgid "%1 total" +msgstr "%1 totaal" + +msgid "VMs: %1" +msgstr "VMs: %1" + +msgid "System Directory:" +msgstr "Systeemmap:" + +msgid "Choose directory" +msgstr "Kies map" + +msgid "Choose configuration file" +msgstr "Kies configuratiebestand" + +msgid "86Box configuration files (86box.cfg)" +msgstr "86Box configuratiebestanden (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Lezen configuratie mislukt" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Openen van geselecteerd configuratiebestand voor lezen niet mogelijk: %1" + +msgid "Use regular expressions in search box" +msgstr "Gebruik reguliere expressies in zoekveld" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 machine(s) zijn nu actief. Weet je zeker dat je de VM manager wil afsluiten?" + +msgid "Add new system wizard" +msgstr "Assistent voor toevoegen van nieuw systeem" + +msgid "Introduction" +msgstr "Introductie" + +msgid "This will help you add a new system to 86Box." +msgstr "Dit helpt je een nieuw systeem toe te voegen aan 86Box." + +msgid "New configuration" +msgstr "Nieuwe configuratie" + +msgid "Complete" +msgstr "Compleet" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "De assistent zal nu de configuratie van het nieuwe systeem starten." + +msgid "Use existing configuration" +msgstr "Gebruik bestaande configuratie" + +msgid "Type some notes here" +msgstr "Ruimte voor notities" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Plak de inhoud van het bestaande configuratiebestand in het vak hieronder." + +msgid "Load configuration from file" +msgstr "Laad configuratie van bestand" + +msgid "System name" +msgstr "Systeemnaam" + +msgid "System name:" +msgstr "Systeemnaam:" + +msgid "System name cannot contain certain characters" +msgstr "Systeemnaam mag bepaalde tekens niet bevatten" + +msgid "System name already exists" +msgstr "Systeemnaam bestaat al" + +msgid "Please enter a directory for the system" +msgstr "Geef een map op voor het systeem" + +msgid "Directory does not exist" +msgstr "Map bestaat niet" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "Een nieuwe map voor het systeem wordt aangemaakt in de boven geselecteerde map" + +msgid "System location:" +msgstr "Systeemlocatie:" + +msgid "System name and location" +msgstr "Systeemnaam en -locatie" + +msgid "Enter the name of the system and choose the location" +msgstr "Voer de naam in van het systeem en kies een locatie" + +msgid "Enter the name of the system" +msgstr "Voer de naam in van het systeem" + +msgid "Please enter a system name" +msgstr "Voer een naam in van het systeem" + +msgid "Display name (optional):" +msgstr "Weergavenaam (optioneel):" + +msgid "Display name:" +msgstr "Weergavenaam:" + +msgid "Set display name" +msgstr "Weergavenaam instellen" + +msgid "Enter the new display name (blank to reset)" +msgstr "Voer een nieuwe weergavenaam in (laat leeg om te herstellen)" + +msgid "Change &display name..." +msgstr "Pas &weergavenaam aan..." + +msgid "Context Menu" +msgstr "Contextmenu" + +msgid "&Open folder..." +msgstr "&Open map..." + +msgid "Open p&rinter tray..." +msgstr "Open &papierlade..." + +msgid "Set &icon..." +msgstr "Stel &icoon in..." + +msgid "Select an icon" +msgstr "Selecteer een icoon" + +msgid "C&lone..." +msgstr "K&lonen..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "Virtuele machine \"%1\" (%2) zal gekloond worden naar:" + +msgid "Directory %1 already exists" +msgstr "Map %1 bestaat al" + +msgid "You cannot use the following characters in the name: %1" +msgstr "De volgende tekens mogen niet gebruikt worden in de naam: %1" + +msgid "Clone" +msgstr "Klonen" + +msgid "Failed to create directory for cloned VM" +msgstr "Map aanmaken voor gekloonde VM mislukt" + +msgid "Failed to clone VM." +msgstr "Kolen van VM mislukt." + +msgid "Directory in use" +msgstr "Map in gebruik" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "De geselecteerde map is al in gebruik. Selecteer een andere map." + +msgid "Create directory failed" +msgstr "Map aanmaken mislukt" + +msgid "Unable to create the directory for the new system" +msgstr "Map aanmaken voor het nieuwe systeem niet mogelijk" + +msgid "Configuration write failed" +msgstr "Wegschrijven configuratie mislukt" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Openen van configuratiebestand %1 voor wegschrijven niet mogelijk" + +msgid "Error adding system" +msgstr "Fout bij toevoegen van systeem" + +msgid "Remove directory failed" +msgstr "Verwijderen map mislukt" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Enkele bestanden in de machinemap konden niet verwijderd worden. Verwijder deze handmatig." + +msgid "Build" +msgstr "Build" + +msgid "Version" +msgstr "Versie" + +msgid "An update to 86Box is available: %1 %2" +msgstr "Een update van 86Box is beschikbaar: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Er is een fout opgetreden tijdens het controleren op updates: %1" + +msgid "An update to 86Box is available!" +msgstr " Een update van 86Box is beschikbaar!" + +msgid "Warning" +msgstr "Waarschuwing" + +msgid "&Kill" +msgstr "&Gedwongen beëindigen" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Gedwongen beëindiging van een virtuele machine kan dataverlies veroorzaken. Doe dit alleen wanneer het 86Box process is vast gelopen.\n\nWeet je zeker dat je de virtuele machine \"%1\" wil beëindigen?" + +msgid "&Delete" +msgstr "&Verwijderen" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Weet je zeker dat je de virtuele machine \"%1\" en al haar bestanden wil verwijderen? Deze actie kan niet ongedaan gemaakt worden!" + +msgid "Show &config file" +msgstr "Toon &configuratiebestand" + +msgid "No screenshot" +msgstr "Geen schermafbeelding" + +msgid "Search" +msgstr "Zoeken" + +msgid "Searching for VMs..." +msgstr "Zoeken naar VMs..." + +msgid "Found %1" +msgstr "Gevonden %1" + +msgid "System" +msgstr "Systeem" + +msgid "Storage" +msgstr "Opslag" + +msgid "Disk %1: " +msgstr "Schijf %1: " + +msgid "No disks" +msgstr "Geen schijven" + +msgid "Audio" +msgstr "Audio" + +msgid "Audio:" +msgstr "Audio:" + msgid "ACPI shutdown" msgstr "ACPI uitschakeling" +msgid "ACP&I shutdown" +msgstr "ACP&I uitschakeling" + msgid "Hard disk (%1)" msgstr "Harde schijf (%1)" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 KB" @@ -1209,41 +1629,38 @@ msgstr "MCA-apparaten" msgid "List of MCA devices:" msgstr "Lijst van MCA-apparaten:" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Tablet-hulpmiddel" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "Over &Qt" -msgid "About Qt" -msgstr "Over Qt" - -msgid "MCA devices..." +msgid "&MCA devices..." msgstr "MCA-apparaten..." -msgid "Show non-primary monitors" +msgid "Show non-&primary monitors" msgstr "Toon niet-primaire monitors" -msgid "Open screenshots folder..." +msgid "Open screenshots &folder..." msgstr "Map met schermafbeeldingen openen..." -msgid "Apply fullscreen stretch mode when maximized" +msgid "Appl&y fullscreen stretch mode when maximized" msgstr "Schakel de volledig scherm-uitrekmodus in bij maximaliseren" -msgid "Cursor/Puck" -msgstr "Cursor/Puck" +msgid "&Cursor/Puck" +msgstr "&Cursor/Puck" -msgid "Pen" -msgstr "Pen" +msgid "&Pen" +msgstr "&Pen" -msgid "Host CD/DVD Drive (%1:)" -msgstr "Host cd/dvd-station (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "&Host cd/dvd-station (%1:)" msgid "&Connected" msgstr "&Verbonden" -msgid "Clear image history" -msgstr "Imagegeschiedenis verwijderen" +msgid "Clear image &history" +msgstr "Imagegeschiedenis verwijderen(&H)" msgid "Create..." msgstr "Creëer..." @@ -1257,9 +1674,15 @@ msgstr "Onbekende bus" msgid "Null Driver" msgstr "Null Driver" +msgid "NIC:" +msgstr "NIC:" + msgid "NIC %1 (%2) %3" msgstr "NIC %1 (%2) %3" +msgid "&NIC %1 (%2) %3" +msgstr "&NIC %1 (%2) %3" + msgid "Render behavior" msgstr "Rendergedrag" @@ -1323,6 +1746,9 @@ msgstr "Geen MCA-apparaten." msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" msgstr "Netwerkkaart #1" @@ -1365,9 +1791,27 @@ msgstr "Seriële poort doorvoer 3" msgid "Serial port passthrough 4" msgstr "Seriële poort doorvoer 4" -msgid "Renderer options..." +msgid "Renderer &options..." msgstr "Renderer-opties..." +msgid "PC/XT Keyboard" +msgstr "PC/XT Toetsenbord" + +msgid "AT Keyboard" +msgstr "AT Toetsenbord" + +msgid "AX Keyboard" +msgstr "AX Toetsenbord" + +msgid "PS/2 Keyboard" +msgstr "PS/2 Toetsenbord" + +msgid "PS/55 Keyboard" +msgstr "PS/55Toetsenbord" + +msgid "Keys" +msgstr "Toetsen" + msgid "Logitech/Microsoft Bus Mouse" msgstr "Logitech/Microsoft busmuis" @@ -1377,8 +1821,14 @@ msgstr "Microsoft busmuis (InPort)" msgid "Mouse Systems Serial Mouse" msgstr "Mouse Systems seriële muis" +msgid "Mouse Systems Bus Mouse" +msgstr "Mouse Systems busmuis" + msgid "Microsoft Serial Mouse" -msgstr "Microsoft seriële muis" +msgstr "Microsoft Seriële muis" + +msgid "Microsoft Serial BallPoint" +msgstr "Microsoft seriële balmuis" msgid "Logitech Serial Mouse" msgstr "Logitech seriële muis" @@ -1386,9 +1836,15 @@ msgstr "Logitech seriële muis" msgid "PS/2 Mouse" msgstr "PS/2-muis" +msgid "PS/2 QuickPort Mouse" +msgstr "PS/2 QuickPort muis" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (serieel)" +msgid "Default Baud rate" +msgstr "Standaard baudrate" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "COM] Standaard Hayes-compatibele modem " @@ -1413,21 +1869,81 @@ msgstr "Systeem MIDI" msgid "MIDI Input Device" msgstr "MIDI-ingangsapparaat" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "BIOS-bestand" + +msgid "BIOS file (ROM #1)" +msgstr "BIOS-bestand (ROM #1)" + +msgid "BIOS file (ROM #2)" +msgstr "BIOS-bestand (ROM #2)" + +msgid "BIOS file (ROM #3)" +msgstr "BIOS-bestand (ROM #3)" + +msgid "BIOS file (ROM #4)" +msgstr "BIOS-bestand (ROM #4)" + +msgid "BIOS address" msgstr "BIOS-adres" +msgid "BIOS address (ROM #1)" +msgstr "BIOS-adres (ROM #1)" + +msgid "BIOS address (ROM #2)" +msgstr "BIOS-adres (ROM #2)" + +msgid "BIOS address (ROM #3)" +msgstr "BIOS-adres (ROM #3)" + +msgid "BIOS address (ROM #4)" +msgstr "BIOS-adres (ROM #4)" + msgid "Enable BIOS extension ROM Writes" msgstr "BIOS-extensie ROM Writes inschakelen" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "BIOS-extensie ROM Writes inschakelen (ROM #1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "BIOS-extensie ROM Writes inschakelen (ROM #2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "BIOS-extensie ROM Writes inschakelen (ROM #3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "BIOS-extensie ROM Writes inschakelen (ROM #4)" + +msgid "Linear framebuffer base" +msgstr "Lineaire framebuffer-basis" + msgid "Address" msgstr "Adres" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "Seriële poort IRQ" + +msgid "Parallel port IRQ" +msgstr "Parallelle poort IRQ" + msgid "BIOS Revision" msgstr "BIOS Revisie" +msgid "BIOS Version" +msgstr "BIOS-versie" + +msgid "BIOS Language" +msgstr "BIOS-taal" + +msgid "IBM 5161 Expansion Unit" +msgstr "IBM 5161 Uitbreidingseenheid" + +msgid "IBM Cassette Basic" +msgstr "IBM Cassette Basic" + msgid "Translate 26 -> 17" msgstr "Vertaal 26 -> 17" @@ -1443,6 +1959,18 @@ msgstr "Kleuren inverteren" msgid "BIOS size" msgstr "BIOS-grootte" +msgid "BIOS size (ROM #1)" +msgstr "BIOS-grootte (ROM #1)" + +msgid "BIOS size (ROM #2)" +msgstr "BIOS-grootte (ROM #1)" + +msgid "BIOS size (ROM #3)" +msgstr "BIOS-grootte (ROM #3)" + +msgid "BIOS size (ROM #4)" +msgstr "BIOS-grootte (ROM #4)" + msgid "Map C0000-C7FFF as UMB" msgstr "Geheugenadres C0000-C7FFF toewijzen aan UMB" @@ -1518,6 +2046,9 @@ msgstr "Reverbniveau" msgid "Interpolation Method" msgstr "Interpolatiemethode" +msgid "Dynamic Sample Loading" +msgstr "Dynamische sample-lading" + msgid "Reverb Output Gain" msgstr "Reverbuitgang Versterking" @@ -1605,6 +2136,12 @@ msgstr "Lage DMA" msgid "Enable Game port" msgstr "Game-poort inschakelen" +msgid "SID Model" +msgstr "SID-model" + +msgid "SID Filter Strength" +msgstr "SID-filtersterkte" + msgid "Surround module" msgstr "Surroundmodule" @@ -1617,6 +2154,12 @@ msgstr "Verhoog CODEC interrupt bij CODEC setup (nodig voor sommige stuurprogram msgid "SB Address" msgstr "SB-adres" +msgid "Adlib Address" +msgstr "Adlib-adres" + +msgid "Use EEPROM setting" +msgstr "Gebruik EEPROM-instelling" + msgid "WSS IRQ" msgstr "WSS IRQ" @@ -1701,9 +2244,15 @@ msgstr "RAMDAC type" msgid "Blend" msgstr "Mengen" +msgid "Font" +msgstr "Lettertype" + msgid "Bilinear filtering" msgstr "Bilineaire filtering" +msgid "Video chroma-keying" +msgstr "Video chroma-keying" + msgid "Dithering" msgstr "Dithering" @@ -1746,6 +2295,33 @@ msgstr "Overdrachtssnelheid" msgid "EMS mode" msgstr "EMS-modus" +msgid "EMS Address" +msgstr "EMS-adres" + +msgid "EMS 1 Address" +msgstr "EMS 1 adres" + +msgid "EMS 2 Address" +msgstr "EMS 2 adres" + +msgid "EMS Memory Size" +msgstr "EMS-geheugengrootte" + +msgid "EMS 1 Memory Size" +msgstr "EMS 1 geheugengrootte" + +msgid "EMS 2 Memory Size" +msgstr "EMS 3 geheugengrootte" + +msgid "Enable EMS" +msgstr "Schakel EMS in" + +msgid "Enable EMS 1" +msgstr "Schakel EMS 1 in" + +msgid "Enable EMS 2" +msgstr "Schakel EMS 2 in" + msgid "Address for > 2 MB" msgstr "Adres voor > 2 MB" @@ -1764,11 +2340,11 @@ msgstr "Altijd op geselecteerde snelheid" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "BIOS-instelling + Sneltoetsen (niet actief tijdens POST)" -msgid "64 kB starting from F0000" -msgstr "64 kB vanaf F0000" +msgid "64 KB starting from F0000" +msgstr "64 KB vanaf F0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB vanaf E0000 (geïnverteerd MSB adres, laatste 64KB eerst)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KB vanaf E0000 (geïnverteerd MSB adres, laatste 64 KB eerst)" msgid "Sine" msgstr "Sinus" @@ -1869,6 +2445,9 @@ msgstr "256 KB" msgid "Composite" msgstr "Composite" +msgid "True color" +msgstr "Echte kleur" + msgid "Old" msgstr "Oud" @@ -1902,6 +2481,15 @@ msgstr "sRGB-interpolatie" msgid "Linear interpolation" msgstr "Lineaire interpolatie" +msgid "Has secondary 8x8 character set" +msgstr "Heeft secundaire 8x8 karakterset" + +msgid "Has Quadcolor II daughter board" +msgstr "Heeft Quadcolor II dochterkaart" + +msgid "Alternate monochrome contrast" +msgstr "Alternatief monochroom contrast" + msgid "128 KB" msgstr "128 KB" @@ -1935,6 +2523,9 @@ msgstr "Amber" msgid "Gray" msgstr "Grijs" +msgid "Grayscale" +msgstr "Grijstinten" + msgid "Color" msgstr "Kleur" @@ -1950,6 +2541,12 @@ msgstr "Andere talen" msgid "Bochs latest" msgstr "Bochs nieuwste" +msgid "Apply overscan deltas" +msgstr "Overscan-delta’s toepassen" + +msgid "Mono Interlaced" +msgstr "Mono geïnterlaced " + msgid "Mono Non-Interlaced" msgstr "Mono niet geïnterlaced" @@ -1962,6 +2559,9 @@ msgstr "Kleur niet geïnterlaced" msgid "3Dfx Voodoo Graphics" msgstr "3Dfx Voodoo Graphics" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 TMU's)" @@ -2031,6 +2631,9 @@ msgstr "Baud-snelheid van doorvoer" msgid "Named Pipe (Server)" msgstr "Named Pipe (Server)" +msgid "Named Pipe (Client)" +msgstr "Named Pipe (Client)" + msgid "Host Serial Passthrough" msgstr "Host seriële doorgave" @@ -2076,6 +2679,12 @@ msgstr "IBM 8514/A-kloon (ISA)" msgid "Vendor" msgstr "Leverancier" +msgid "30 Hz (JMP2 = 1)" +msgstr "30 Hz (JMP2 = 1)" + +msgid "60 Hz (JMP2 = 2)" +msgstr "60 Hz (JMP2 = 2)" + msgid "Generic PC/XT Memory Expansion" msgstr "Generieke PC/XT geheugenuitbreiding" @@ -2147,3 +2756,201 @@ msgstr "Omlaag verplaatsen" msgid "Could not load file %1" msgstr "Kon bestand %1 niet laden" + +msgid "Key Bindings:" +msgstr "Toetskoppelingen" + +msgid "Action" +msgstr "Actie" + +msgid "Keybind" +msgstr "Toetskoppeling" + +msgid "Clear binding" +msgstr "Wis koppelinh" + +msgid "Bind" +msgstr "Koppel" + +msgid "Bind Key" +msgstr "Koppel toets" + +msgid "Enter key combo:" +msgstr "Geef toetsencombinatie in:" + +msgid "Bind conflict" +msgstr "Koppelconflict" + +msgid "This key combo is already in use." +msgstr "Deze toetsencombinatie is al in gebruik" + +msgid "Send Control+Alt+Del" +msgstr "Stuur Control+Alt+Del" + +msgid "Send Control+Alt+Escape" +msgstr "Stuur Control+Alt+Escape" + +msgid "Toggle fullscreen" +msgstr "Volledig scherm omschakelen" + +msgid "Screenshot" +msgstr "Schermafbeelding" + +msgid "Release mouse pointer" +msgstr "Geef muis vrij" + +msgid "Toggle pause" +msgstr "Pause omschakelen" + +msgid "Toggle mute" +msgstr "Geluiddemping omschakelen" + +msgid "Text files" +msgstr "Tekstbestanden" + +msgid "ROM files" +msgstr "ROM-bestanden" + +msgid "SoundFont files" +msgstr "SoundFont-bestanden" + +msgid "Local Switch" +msgstr "Lokale Switch" + +msgid "Remote Switch" +msgstr "Externe Switch" + +msgid "Switch:" +msgstr "Switch" + +msgid "Hub Mode" +msgstr "Hub-modus" + +msgid "Hostname:" +msgstr "Hostname" + +msgid "ISA RAM:" +msgstr "ISA RAM:" + +msgid "ISA ROM:" +msgstr "ISA ROM:" + +msgid "&Wipe NVRAM" +msgstr "NVRAM &wissen" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Dit verwijdert alle NVRAM-bestanden (en gerelateerde bestanden) van de virtuele machine die zich in de submap \"nvr\" bevinden. Je zult de BIOS-instellingen (en mogelijk ook andere apparaten in de VM) opnieuw moeten configureren indien van toepassing.\n\nWeet je zeker dat je alle NVRAM-gegevens van de virtuele machine \"%1\" wilt wissen?" + +msgid "Success" +msgstr "Succes" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Wissen van NVRAM-inhoud van de virtuele machine \"%1\" geslaagd" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Fout bij Wissen van NVRAM-inhoud van de virtuele machine \"%1\"" + +msgid "%1 VM Manager" +msgstr "%1 VM Manager" + +msgid "%n disk(s)" +msgstr "%n schijf(en)" + +msgid "Unknown Status" +msgstr "Onbekende Status" + +msgid "No Machines Found!" +msgstr "Geen Machines Gevonden!" + +msgid "Check for updates on startup" +msgstr "Controleer op updates bij start" + +msgid "Unable to determine release information" +msgstr "Kan release-informatie niet bepalen" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Er is een fout opgetreden bij het controleren op updates:\n\n%1\n\nProbeer later opnieuw." + +msgid "Update check complete" +msgstr "Controleren op updates voltooid" + +msgid "stable" +msgstr "stabiel" + +msgid "beta" +msgstr "beta" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Je gebruikt de nieuwste %1-versie van 86Box: %2" + +msgid "version" +msgstr "versie" + +msgid "build" +msgstr "build" + +msgid "You are currently running version %1." +msgstr "Je gebruikt versie %1." + +msgid "Version %1 is now available." +msgstr "Versie %1 is nu beschikbaar." + +msgid "You are currently running build %1." +msgstr "Je gebruikt build %1." + +msgid "Build %1 is now available." +msgstr "Build %1 is nu beschikbaar." + +msgid "Would you like to visit the download page?" +msgstr "Wil je de downloadpagina bezoeken?" + +msgid "Visit download page" +msgstr "Bezoek downloadpagina" + +msgid "Update check" +msgstr "Updatecontrole" + +msgid "Checking for updates..." +msgstr "Controleren op updates..." + +msgid "86Box Update" +msgstr "86Box Update" + +msgid "Release notes:" +msgstr "Release-opmerkingen:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Crash van virtuele machine" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "Het proces van de virtuele machine \"%1\" is onverwacht beëindigd met exitcode %2." + +msgid "The system will not be added." +msgstr "Het systeem wordt niet toegevoegd." + +msgid "&Update mouse every CPU frame" +msgstr "&Muis bijwerken bij elk CPU-frame" + +msgid "Hue" +msgstr "Kleurtoon" + +msgid "Saturation" +msgstr "Verzadiging" + +msgid "Contrast" +msgstr "Contrast" + +msgid "Brightness" +msgstr "Helderheid" + +msgid "Sharpness" +msgstr "Scherpte" + +msgid "&CGA composite settings..." +msgstr "Instellingen van de &CGA-compositemodus..." + +msgid "CGA composite settings" +msgstr "Instellingen van de CGA-compositemodus" diff --git a/src/qt/languages/pl-PL.po b/src/qt/languages/pl-PL.po index b161370ed..8d722817a 100644 --- a/src/qt/languages/pl-PL.po +++ b/src/qt/languages/pl-PL.po @@ -10,13 +10,13 @@ msgid "&Action" msgstr "&Akcje" msgid "&Keyboard requires capture" -msgstr "&Klawaitura wymaga przechwytu myszy" +msgstr "&Klawiatura wymaga przechwytu myszy" msgid "&Right CTRL is left ALT" -msgstr "&Prawy CTRL to lewy ALT" +msgstr "Prawy C&TRL to lewy ALT" msgid "&Hard Reset..." -msgstr "&Twardy reset..." +msgstr "Twardy &reset..." msgid "&Ctrl+Alt+Del" msgstr "&Ctrl+Alt+Del" @@ -27,8 +27,14 @@ msgstr "Ctrl+Alt+&Esc" msgid "&Pause" msgstr "&Pauza" -msgid "E&xit..." -msgstr "W&yjdź..." +msgid "Pause" +msgstr "Pauza" + +msgid "Re&sume" +msgstr "&Wznów" + +msgid "E&xit" +msgstr "W&yjście" msgid "&View" msgstr "&Widok" @@ -43,7 +49,7 @@ msgid "&Resizeable window" msgstr "&Okno o zmiennym rozmiarze" msgid "R&emember size && position" -msgstr "P&amiętaj rozmiar &i pozycję" +msgstr "P&amiętaj rozmiar i pozycję" msgid "Re&nderer" msgstr "Re&nderer" @@ -51,20 +57,17 @@ msgstr "Re&nderer" msgid "&Qt (Software)" msgstr "&Qt (programowy)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" msgstr "Open&GL (3.0 Core)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." +msgid "Specify &dimensions..." msgstr "Określ wymiary..." -msgid "F&orce 4:3 display ratio" -msgstr "&Wymuś proporcje wyświetlania 4:3" +msgid "Force &4:3 display ratio" +msgstr "Wymuś proporcje wyświetlania &4:3" msgid "&Window scale factor" msgstr "Współ&czynnik skalowania okna" @@ -99,7 +102,7 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" +msgid "Fi<er method" msgstr "Metoda filtrowania" msgid "&Nearest" @@ -132,8 +135,8 @@ msgstr "&Skalowanie całkowite" msgid "4:&3 Integer scale" msgstr "Skalowanie całkowite 4:&3" -msgid "E&GA/(S)VGA settings" -msgstr "Ustawienia E&GA/(S)VGA" +msgid "EGA/(S)&VGA settings" +msgstr "Ustawienia EGA/(S)&VGA" msgid "&Inverted VGA monitor" msgstr "&Odwrócony monitor VGA" @@ -144,9 +147,15 @@ msgstr "Rodzaj ekranu &VGA" msgid "RGB &Color" msgstr "RGB - &Kolorowy" +msgid "RGB (no brown)" +msgstr "RGB (bez brązowego)" + msgid "&RGB Grayscale" msgstr "&RGB - Skala odcieni szarości" +msgid "Generic RGBI color monitor" +msgstr "Generyczny kolorowy monitor RGBI" + msgid "&Amber monitor" msgstr "&Bursztynowy monitor" @@ -175,7 +184,7 @@ msgid "Change contrast for &monochrome display" msgstr "Zmień kontrast dla ekranu &monochromatycznego" msgid "&Media" -msgstr "&Nośnik" +msgstr "N&ośnik" msgid "&Tools" msgstr "&Narzędzia" @@ -183,6 +192,9 @@ msgstr "&Narzędzia" msgid "&Settings..." msgstr "&Ustawienia..." +msgid "Settings..." +msgstr "Ustawienia..." + msgid "&Update status bar icons" msgstr "&Aktualizuj ikony na pasku statusu" @@ -208,7 +220,7 @@ msgid "End trace" msgstr "Zakończ śledzenie" msgid "&Help" -msgstr "&Pomoc" +msgstr "Pomo&c" msgid "&Documentation..." msgstr "&Dokumentacja..." @@ -348,6 +360,9 @@ msgstr "Maszyna:" msgid "Configure" msgstr "Konfiguruj" +msgid "CPU:" +msgstr "Procesor:" + msgid "CPU type:" msgstr "Rodzaj procesora:" @@ -384,6 +399,15 @@ msgstr "Włączona (UTC)" msgid "Dynamic Recompiler" msgstr "Dynamiczny rekompilator" +msgid "CPU frame size" +msgstr "Rozmiar ramki CPU" + +msgid "Larger frames (less smooth)" +msgstr "Większe ramki (mniej płynne)" + +msgid "Smaller frames (smoother)" +msgstr "Mniejsze ramki (płynniejsze)" + msgid "Video:" msgstr "Wideo:" @@ -399,12 +423,27 @@ msgstr "Grafika IBM 8514/A" msgid "XGA Graphics" msgstr "Grafika XGA" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "Karta graficzna IBM PS/55" + +msgid "Keyboard:" +msgstr "Klawiatura:" + +msgid "Keyboard" +msgstr "Klawiatura" + msgid "Mouse:" msgstr "Mysz:" +msgid "Mouse" +msgstr "Mysz" + msgid "Joystick:" msgstr "Joystick:" +msgid "Joystick" +msgstr "Joystick" + msgid "Joystick 1..." msgstr "Joystick 1..." @@ -418,16 +457,16 @@ msgid "Joystick 4..." msgstr "Joystick 4..." msgid "Sound card #1:" -msgstr "Karta dźwiękowa 1:" +msgstr "Karta dźwiękowa nr 1:" msgid "Sound card #2:" -msgstr "Karta dźwiękowa 2:" +msgstr "Karta dźwiękowa nr 2:" msgid "Sound card #3:" -msgstr "Karta dźwiękowa 3:" +msgstr "Karta dźwiękowa nr 3:" msgid "Sound card #4:" -msgstr "Karta dźwiękowa 4:" +msgstr "Karta dźwiękowa nr 4:" msgid "MIDI Out Device:" msgstr "Urządzenie wyjściowe MIDI:" @@ -435,6 +474,9 @@ msgstr "Urządzenie wyjściowe MIDI:" msgid "MIDI In Device:" msgstr "Urządzenie wejściowe MIDI:" +msgid "MIDI Out:" +msgstr "Wyjście MIDI:" + msgid "Standalone MPU-401" msgstr "Samodzielne urządzenie MPU-401" @@ -474,6 +516,9 @@ msgstr "Urządzenie LPT3:" msgid "LPT4 Device:" msgstr "Urządzenie LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "Wewnętrzne DMA LPT ECP:" + msgid "Serial port 1" msgstr "Port szeregowy 1" @@ -498,18 +543,21 @@ msgstr "Port równoległy 3" msgid "Parallel port 4" msgstr "Port równoległy 4" -msgid "HD Controller:" -msgstr "Kontroler dysku twardego:" - msgid "FD Controller:" msgstr "Kontroler dyskietek:" +msgid "CD-ROM Controller:" +msgstr "Kontroler CD-ROM:" + msgid "Tertiary IDE Controller" msgstr "Trzeciorzędny kontroler IDE" msgid "Quaternary IDE Controller" msgstr "Czwartorzędny kontroler IDE" +msgid "Hard disk" +msgstr "Dysk twardy" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "Kaseta" msgid "Hard disks:" msgstr "Dyski twarde:" +msgid "Firmware Version" +msgstr "Wersja firmware'u" + msgid "&New..." msgstr "&Nowy..." @@ -588,8 +639,14 @@ msgstr "Napędy CD-ROM:" msgid "MO drives:" msgstr "Napędy MO:" -msgid "ZIP drives:" -msgstr "Napędy ZIP:" +msgid "MO:" +msgstr "MO:" + +msgid "Removable disks:" +msgstr "Dyski wymienne:" + +msgid "Removable disk drives:" +msgstr "Stacje dysków wymiennych:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "ISA RTC:" msgid "ISA Memory Expansion" msgstr "Rozszerzenie pamięci ISA" +msgid "ISA ROM Cards" +msgstr "Karty ROM ISA" + msgid "Card 1:" msgstr "Karta 1:" @@ -612,6 +672,15 @@ msgstr "Karta 3:" msgid "Card 4:" msgstr "Karta 4:" +msgid "Generic ISA ROM Board" +msgstr "Generyczna płyta ROM ISA" + +msgid "Generic Dual ISA ROM Board" +msgstr "Generyczna podwójna płyta ROM ISA" + +msgid "Generic Quad ISA ROM Board" +msgstr "Generyczna poczwórna płyta ROM ISA" + msgid "ISABugger device" msgstr "Urządzenie ISABugger" @@ -633,11 +702,17 @@ msgstr " - PAUZA" msgid "Speed" msgstr "Szybkość" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Dysk wymienny %1 (%2): %3" -msgid "ZIP images" -msgstr "Obrazy ZIP" +msgid "&Removable disk %1 (%2): %3" +msgstr "Dysk &wymienny %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Obrazy dysków wymiennych" + +msgid "Image %1" +msgstr "Obraz %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "86Box nie może znaleźć obrazów ROM nadających się do użytku.\n\nProszę pobrać zestaw obrazów ROM ze strony download, i rozpakować je do katalogu \"roms\"." @@ -667,16 +742,16 @@ msgid "Surface images" msgstr "Obrazy powierzchni" msgid "Machine \"%hs\" is not available due to missing ROMs in the roms/machines directory. Switching to an available machine." -msgstr "Maszyna \"%hs\" nie jest dostępna, ponieważ brakuje ROM-ów w katalogu roms/machines. Przełączanie na dostępną maszynę." +msgstr "Maszyna „%hs” nie jest dostępna, ponieważ brakuje ROM-ów w katalogu roms/machines. Przełączanie na dostępną maszynę." msgid "Video card \"%hs\" is not available due to missing ROMs in the roms/video directory. Switching to an available video card." -msgstr "Karta wideo \"%hs\" nie jest dostępna, ponieważ brakuje ROM-ów w katalogu roms/video. Przełączanie na dostępną kartę graficzną." +msgstr "Karta wideo „%hs” nie jest dostępna, ponieważ brakuje ROM-ów w katalogu roms/video. Przełączanie na dostępną kartę graficzną." msgid "Video card #2 \"%hs\" is not available due to missing ROMs in the roms/video directory. Disabling the second video card." -msgstr "Karta wideo 2 \"%hs\" nie jest dostępna, ponieważ brakuje ROM-ów w katalogu roms/video. Wyłączenie drugiej karty graficznej." +msgstr "Karta wideo 2 „%hs” nie jest dostępna, ponieważ brakuje ROM-ów w katalogu roms/video. Wyłączenie drugiej karty graficznej." msgid "Device \"%hs\" is not available due to missing ROMs. Ignoring the device." -msgstr "Urządzenie \"%hs\" nie jest dostępne, ponieważ brakuje ROM-ów. Ignorowanie urządzenia." +msgstr "Urządzenie „%hs” nie jest dostępne, ponieważ brakuje ROM-ów. Ignorowanie urządzenia." msgid "Machine" msgstr "Maszyna" @@ -696,12 +771,30 @@ msgstr "Sieć" msgid "Ports (COM & LPT)" msgstr "Porty (COM & LPT)" +msgid "Ports" +msgstr "Porty" + +msgid "Serial ports:" +msgstr "Porty szeregowe:" + +msgid "Parallel ports:" +msgstr "Porty równoległe:" + msgid "Storage controllers" msgstr "Kontrolery pamięci masowej" msgid "Hard disks" msgstr "Dyski twarde" +msgid "Disks:" +msgstr "Dyski:" + +msgid "Floppy:" +msgstr "Dyskietki:" + +msgid "Controllers:" +msgstr "Kontrolery:" + msgid "Floppy & CD-ROM drives" msgstr "Napędy dyskietek i CD-ROM" @@ -711,14 +804,17 @@ msgstr "Inne urządzenia wymienne" msgid "Other peripherals" msgstr "Inne urządzenia peryferyjne" +msgid "Other devices" +msgstr "Inne urządzenia" + msgid "Click to capture mouse" msgstr "Kliknij, by przechwycić mysz" msgid "Press %1 to release mouse" -msgstr "Naciśnij %1 w celu uwolnienia myszy" +msgstr "Naciśnij %1, by wypuścić mysz" msgid "Press %1 or middle button to release mouse" -msgstr "Naciśnij %1 lub środkowy przycisk w celu uwolnienia myszy" +msgstr "Naciśnij %1 lub środkowy przycisk, by wypuścić mysz" msgid "Bus" msgstr "Magistrala" @@ -777,12 +873,39 @@ msgstr "Joystick 4-osiowy, 4-przyciskowy" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Pedals" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Thrustmaster Flight Control System" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Rudder Control System" + +msgid "2-button gamepad(s)" +msgstr "Pad(y) z dwoma przyciskami" + +msgid "2-button flight yoke" +msgstr "Wolant z dwoma przyciskami" + +msgid "4-button gamepad" +msgstr "Pad z czterema przyciskami" + +msgid "4-button flight yoke" +msgstr "Wolant z czterema przyciskami" + +msgid "2-button flight yoke with throttle" +msgstr "Wolant z dwoma przyciskami i przepustnicą" + +msgid "4-button flight yoke with throttle" +msgstr "Wolant z czterema przyciskami i przepustnicą" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Kierownica Win95 (3 osie, 4 przyciski)" + msgid "None" msgstr "Żaden" @@ -792,6 +915,9 @@ msgstr "%1 MB (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Dyskietka %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Dyskietka %1 (%2): %3" + msgid "Advanced sector images" msgstr "Zaawansowane obrazy sektorów" @@ -813,6 +939,9 @@ msgstr "Nie można zainicjować GhostPCL" msgid "MO %1 (%2): %3" msgstr "MO %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&MO %1 (%2): %3" + msgid "MO images" msgstr "Obrazy MO" @@ -822,8 +951,17 @@ msgstr "Witamy w 86Boxie!" msgid "Internal device" msgstr "Urządzenie wewnętrzne" +msgid "&File" +msgstr "&Plik" + +msgid "&New machine..." +msgstr "&Nowa maszyna..." + +msgid "&Check for updates..." +msgstr "&Sprawdź aktualizacje..." + msgid "Exit" -msgstr "Zakończ" +msgstr "Za&kończ" msgid "No ROMs found" msgstr "Nie znaleziono ROM-ów" @@ -844,7 +982,7 @@ msgid "86Box v" msgstr "86Box v" msgid "An emulator of old computers\n\nAuthors: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n\nWith previous core contributions from Sarah Walker, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information." -msgstr "Emulator starych komputerów\n\nAutorzy: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, i inni.\n\nZ wcześniejszym wkładem od Sarah Walker, leilei, JohnElliott, greatpsycho i innych.\n\nPrzetłumaczony przez: Fanta-Shokata, Lili1228\n\nWydany na licencji GNU General Public License w wersji 2 lub nowszej. Zobacz LICENSE aby uzyskać więcej informacji." +msgstr "Emulator starych komputerów\n\nAutorzy: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, i inni.\n\nZ wcześniejszym wkładem od Sarah Walker, leilei, JohnElliott, greatpsycho i innych.\n\nPrzetłumaczony przez: Lili1228\n\nWydany na licencji GNU General Public License w wersji 2 lub nowszej. Zobacz LICENSE aby uzyskać więcej informacji." msgid "Hardware not available" msgstr "Sprzęt niedostępny" @@ -868,10 +1006,10 @@ msgid "Don't exit" msgstr "Nie kończ" msgid "Reset" -msgstr "Przywróć" +msgstr "Resetuj" msgid "Don't reset" -msgstr "Nie przywracaj" +msgstr "Nie resetuj" msgid "CD-ROM images" msgstr "Obrazy CD-ROM" @@ -897,12 +1035,18 @@ msgstr "Kontynuuj" msgid "Cassette: %1" msgstr "Kaseta: %1" +msgid "C&assette: %1" +msgstr "K&aseta: %1" + msgid "Cassette images" msgstr "Obrazy kaset" msgid "Cartridge %1: %2" msgstr "Kartridż %1: %2" +msgid "Car&tridge %1: %2" +msgstr "Kar&tridż %1: %2" + msgid "Cartridge images" msgstr "Obrazy kartridżów" @@ -912,6 +1056,9 @@ msgstr "Wznów wykonywanie" msgid "Pause execution" msgstr "Zatrzymaj wykonywanie" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Naciśnij Ctrl+Alt+Del" @@ -921,9 +1068,279 @@ msgstr "Naciśnij Ctrl+Alt+Esc" msgid "Hard reset" msgstr "Twardy reset" +msgid "Force shutdown" +msgstr "Wymuś zamknięcie" + +msgid "Start" +msgstr "Uruchom" + +msgid "Not running" +msgstr "Wyłączona" + +msgid "Running" +msgstr "Uruchomiona" + +msgid "Paused" +msgstr "Wstrzymana" + +msgid "Waiting" +msgstr "Oczekiwanie" + +msgid "Powered Off" +msgstr "Wyłączona" + +msgid "%n running" +msgstr "%n uruchomion(a/e/ych)" + +msgid "%n paused" +msgstr "%n wstrzyman(a/e/ych)" + +msgid "%n waiting" +msgstr "%n oczekując(a/e/ych)" + +msgid "%1 total" +msgstr "Łącznie %1" + +msgid "VMs: %1" +msgstr "Maszyny wirtualne: %1" + +msgid "System Directory:" +msgstr "Folder systemowy:" + +msgid "Choose directory" +msgstr "Wybierz folder" + +msgid "Choose configuration file" +msgstr "Wybierz plik konfiguracyjny" + +msgid "86Box configuration files (86box.cfg)" +msgstr "Pliki konfiguracyjne 86Boxa (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Nieudany odczyt konfiguracji" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Nie udało się otworzyć wybranego pliku konfiguracyjnego do odczytu: %1" + +msgid "Use regular expressions in search box" +msgstr "Użyj wyrażeń regularnych w polu wyszukiwania" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "Liczba obecnie aktywnych maszyn: %1. Czy na pewno chcesz, mimo to, wyjść z menedżera maszyn wirtualnych?" + +msgid "Add new system wizard" +msgstr "Kreator dodawania nowego systemu" + +msgid "Introduction" +msgstr "Wstęp" + +msgid "This will help you add a new system to 86Box." +msgstr "Ten kreator pomoże Ci dodać nowy system do 86Boxa." + +msgid "New configuration" +msgstr "Nowa konfiguracja" + +msgid "Complete" +msgstr "Ukończono" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "Kreator teraz uruchomi konfigurację dla nowego systemu." + +msgid "Use existing configuration" +msgstr "Użyj istniejącej konfiguracji" + +msgid "Type some notes here" +msgstr "Wpisz tutaj swoje notatki" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Wklej zawartość istniejącego pliku konfiguracyjnego w poniższe pole." + +msgid "Load configuration from file" +msgstr "Wczytaj konfigurację z pliku" + +msgid "System name" +msgstr "Nazwa systemu" + +msgid "System name:" +msgstr "Nazwa systemu:" + +msgid "System name cannot contain certain characters" +msgstr "Nazwa systemu nie może zawierać niektórych znaków" + +msgid "System name already exists" +msgstr "Nazwa systemu już istnieje" + +msgid "Please enter a directory for the system" +msgstr "Wprowadź folder dla systemu" + +msgid "Directory does not exist" +msgstr "Folder nie istnieje" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "Zostanie utworzony nowy folder dla systemu w wybranym powyżej folderze" + +msgid "System location:" +msgstr "Lokalizacja systemu:" + +msgid "System name and location" +msgstr "Nazwa i lokalizacja systemu" + +msgid "Enter the name of the system and choose the location" +msgstr "Podaj nazwę system i wybierz jego lokalizację" + +msgid "Enter the name of the system" +msgstr "Podaj nazwę systemu" + +msgid "Please enter a system name" +msgstr "Proszę podać nazwę systemu" + +msgid "Display name (optional):" +msgstr "Nazwa wyświetlana (opcjonalne):" + +msgid "Display name:" +msgstr "Nazwa wyświetlana:" + +msgid "Set display name" +msgstr "Ustaw nazwę wyświetlaną" + +msgid "Enter the new display name (blank to reset)" +msgstr "Podaj nową nazwę wyświetlaną (wyczyść, by zresetować)" + +msgid "Change &display name..." +msgstr "Zmień wyświetlaną &nazwę..." + +msgid "Context Menu" +msgstr "Menu kontekstowe" + +msgid "&Open folder..." +msgstr "&Otwórz folder..." + +msgid "Open p&rinter tray..." +msgstr "Otwórz &tackę drukarki..." + +msgid "Set &icon..." +msgstr "&Ustaw ikonę..." + +msgid "Select an icon" +msgstr "Wybierz ikonę" + +msgid "C&lone..." +msgstr "&Klonuj..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "Maszyna wirtualna „%1” (%2) zostanie sklonowana jako:" + +msgid "Directory %1 already exists" +msgstr "Folder %1 już istnieje" + +msgid "You cannot use the following characters in the name: %1" +msgstr "Nie możesz użyć następujących znaków w nazwie: %1" + +msgid "Clone" +msgstr "Klonuj" + +msgid "Failed to create directory for cloned VM" +msgstr "Nie udało się stworzyć folderu dla klonowanej maszyny wirtualnej" + +msgid "Failed to clone VM." +msgstr "Nie udało się sklonować maszyny wirtualnej." + +msgid "Directory in use" +msgstr "Folder w użyciu" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "Wybrany folder jest już w użyciu. Proszę wybrać inny folder." + +msgid "Create directory failed" +msgstr "Nieudane utworzenie folderu" + +msgid "Unable to create the directory for the new system" +msgstr "Nie udało się utworzyć folderu dla nowego systemu" + +msgid "Configuration write failed" +msgstr "Nieudany zapis konfiguracji" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Nie udało się otworzyć pliku %1 do zapisu" + +msgid "Error adding system" +msgstr "Błąd dodawania systemu" + +msgid "Remove directory failed" +msgstr "Nieudane usunięcie folderu" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Nie udało się usunąć niektórych plików w folderze maszyny wirtualnej. Proszę usunąć je ręcznie." + +msgid "Build" +msgstr "Kompilacja" + +msgid "Version" +msgstr "Wersja" + +msgid "An update to 86Box is available: %1 %2" +msgstr "Dostępna jest aktualizacja 86Boxa: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Wystąpił błąd podczas sprawdzania aktualizacji %1" + +msgid "An update to 86Box is available!" +msgstr "Dostępna jest aktualizacja 86Boxa!" + +msgid "Warning" +msgstr "Ostrzeżenie" + +msgid "&Kill" +msgstr "&Zabij" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Zabicie maszyny wirtualnej może spowodować utratę danych. Zrób to tylko, jeśli proces 86Boxa się zawiesił.\n\nCzy na pewno chcesz zabić maszynę wirtualną „%1”?" + +msgid "&Delete" +msgstr "&Usuń" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Czy na pewno chcesz usunąć maszynę wirtualną „%1” i jej wszystkie pliki? Tej operacji nie można cofnąć!" + +msgid "Show &config file" +msgstr "&Pokaż plik konfiguracyjny" + +msgid "No screenshot" +msgstr "Brak zrzutów ekranu" + +msgid "Search" +msgstr "Szukanie" + +msgid "Searching for VMs..." +msgstr "Szukanie maszyn wirtualnych..." + +msgid "Found %1" +msgstr "Znaleziono %1" + +msgid "System" +msgstr "System" + +msgid "Storage" +msgstr "Pamięć" + +msgid "Disk %1: " +msgstr "Dysk %1: " + +msgid "No disks" +msgstr "Brak dysków" + +msgid "Audio" +msgstr "Dźwięk" + +msgid "Audio:" +msgstr "Dźwięk:" + msgid "ACPI shutdown" msgstr "Wyłączenie ACPI" +msgid "ACP&I shutdown" +msgstr "Wyłączenie ACP&I" + msgid "Hard disk (%1)" msgstr "Dysk twardy (%1)" @@ -979,7 +1396,7 @@ msgid "Disk image too large" msgstr "Obraz dysku jest za duży" msgid "Remember to partition and format the newly-created drive." -msgstr "Nie zapomnij o partycjonowaniu i sformatowaniu nowo utworzego dysku" +msgstr "Nie zapomnij o partycjonowaniu i sformatowaniu nowo utworzonego dysku." msgid "The selected file will be overwritten. Are you sure you want to use it?" msgstr "Wybrany plik zostanie nadpisany. Czy na pewno chcesz użyć tego pliku?" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 KB" @@ -1209,41 +1629,38 @@ msgstr "Urządzenia MCA" msgid "List of MCA devices:" msgstr "Lista urządzeń MCA:" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Narzędzie do tabletów" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "O &Qt" -msgid "About Qt" -msgstr "O Qt" - -msgid "MCA devices..." +msgid "&MCA devices..." msgstr "Urządzenia MCA..." -msgid "Show non-primary monitors" -msgstr "Pokaż monitory inne niż podstawowe" +msgid "Show non-&primary monitors" +msgstr "Pokaż monitory &inne niż podstawowe" -msgid "Open screenshots folder..." -msgstr "Otwórz folder zrzutów ekranu..." +msgid "Open screenshots &folder..." +msgstr "Otwórz folder zrzutów &ekranu..." -msgid "Apply fullscreen stretch mode when maximized" +msgid "Appl&y fullscreen stretch mode when maximized" msgstr "Zastosowanie trybu rozciągania na pełnym ekranie w stanie zmaksymalizowanym" -msgid "Cursor/Puck" -msgstr "Kursor/krążek" +msgid "&Cursor/Puck" +msgstr "&Kursor/krążek" -msgid "Pen" -msgstr "Pióro" +msgid "&Pen" +msgstr "P&ióro" -msgid "Host CD/DVD Drive (%1:)" -msgstr "Napęd CD/DVD hosta (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "&Napęd CD/DVD hosta (%1:)" msgid "&Connected" -msgstr "" +msgstr "&Podłączone" -msgid "Clear image history" -msgstr "Wyczyść historię obrazów" +msgid "Clear image &history" +msgstr "Wyczyść historię obrazów(&H)" msgid "Create..." msgstr "Stwórz..." @@ -1257,9 +1674,15 @@ msgstr "Nieznana magistrala" msgid "Null Driver" msgstr "Null Driver" +msgid "NIC:" +msgstr "NIC:" + msgid "NIC %1 (%2) %3" msgstr "NIC %1 (%2) %3" +msgid "&NIC %1 (%2) %3" +msgstr "&NIC %1 (%2) %3" + msgid "Render behavior" msgstr "Zachowanie renderowania" @@ -1306,13 +1729,13 @@ msgid "This machine might have been moved or copied." msgstr "To urządzenie mogło zostać przeniesione lub skopiowane." msgid "In order to ensure proper networking functionality, 86Box needs to know if this machine was moved or copied.\n\nSelect \"I Copied It\" if you are not sure." -msgstr "Aby zapewnić prawidłową funkcjonalność sieci, 86Box musi wiedzieć, czy to urządzenie zostało przeniesione lub skopiowane.\n\nW przypadku braku pewności, wybrać opcję \"Zostało skopiowane\"." +msgstr "Aby zapewnić prawidłową funkcjonalność sieci, 86Box musi wiedzieć, czy to maszyna zostało przeniesiona albo skopiowana.\n\nW przypadku braku pewności, wybierz opcję „Została skopiowana”." msgid "I Moved It" -msgstr "Zostało przeniesione" +msgstr "Została przeniesiona" msgid "I Copied It" -msgstr "Zostało skopiowane" +msgstr "Została skopiowana" msgid "86Box Monitor #" msgstr "86Box Monitor " @@ -1323,17 +1746,20 @@ msgstr "Brak urządzeń MCA." msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" -msgstr "Karta sieciowa 1" +msgstr "Karta sieciowa nr 1" msgid "Network Card #2" -msgstr "Karta sieciowa 2" +msgstr "Karta sieciowa nr 2" msgid "Network Card #3" -msgstr "Karta sieciowa 3" +msgstr "Karta sieciowa nr 3" msgid "Network Card #4" -msgstr "Karta sieciowa 4" +msgstr "Karta sieciowa nr 4" msgid "Mode:" msgstr "Tryb:" @@ -1365,9 +1791,27 @@ msgstr "Przelotka portu szeregowego 3" msgid "Serial port passthrough 4" msgstr "Przelotka portu szeregowego 4" -msgid "Renderer options..." +msgid "Renderer &options..." msgstr "Opcje renderowania..." +msgid "PC/XT Keyboard" +msgstr "Klawiatura PC/XT" + +msgid "AT Keyboard" +msgstr "Klawiatura AT" + +msgid "AX Keyboard" +msgstr "Klawiatura AX" + +msgid "PS/2 Keyboard" +msgstr "Klawiatura PS/2" + +msgid "PS/55 Keyboard" +msgstr "Klawiatura PS/55" + +msgid "Keys" +msgstr "Klawisze" + msgid "Logitech/Microsoft Bus Mouse" msgstr "Mysz magistralowa Logitech/Microsoft" @@ -1377,18 +1821,30 @@ msgstr "Mysz magistralowa Microsoft (InPort)" msgid "Mouse Systems Serial Mouse" msgstr "Mysz szeregowa Mouse Systems" +msgid "Mouse Systems Bus Mouse" +msgstr "Mysz magistralowa Mouse Systems" + msgid "Microsoft Serial Mouse" msgstr "Mysz szeregowa Microsoft" +msgid "Microsoft Serial BallPoint" +msgstr "Microsoft Serial BallPoint" + msgid "Logitech Serial Mouse" msgstr "Mysz szeregowa Logitech" msgid "PS/2 Mouse" msgstr "Mysz PS/2" +msgid "PS/2 QuickPort Mouse" +msgstr "PS/2 QuickPort Mouse" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (szeregowy)" +msgid "Default Baud rate" +msgstr "Domyślna szybkość transmisji" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Standardowy modem zgodny z Hayes" @@ -1413,11 +1869,53 @@ msgstr "System MIDI" msgid "MIDI Input Device" msgstr "Urządzenie wejściowe MIDI" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "Plik BIOS" + +msgid "BIOS file (ROM #1)" +msgstr "Plik BIOS (ROM nr 1)" + +msgid "BIOS file (ROM #2)" +msgstr "Plik BIOS (ROM nr 2)" + +msgid "BIOS file (ROM #3)" +msgstr "Plik BIOS (ROM nr 3)" + +msgid "BIOS file (ROM #4)" +msgstr "Plik BIOS (ROM nr 4)" + +msgid "BIOS address" msgstr "Adres BIOS" +msgid "BIOS address (ROM #1)" +msgstr "Adres BIOS (ROM nr 1)" + +msgid "BIOS address (ROM #2)" +msgstr "Adres BIOS (ROM nr 2)" + +msgid "BIOS address (ROM #3)" +msgstr "Adres BIOS (ROM nr 3)" + +msgid "BIOS address (ROM #4)" +msgstr "Adres BIOS (ROM nr 4)" + msgid "Enable BIOS extension ROM Writes" -msgstr "Włączenie zapisu do pamięci ROM rozszerzenia BIOS" +msgstr "Włącz zapis do pamięci ROM rozszerzenia BIOS" + +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "Włącz zapis do pamięci ROM rozszerzenia BIOS (ROM nr 1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "Włącz zapis do pamięci ROM rozszerzenia BIOS (ROM nr 2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "Włącz zapis do pamięci ROM rozszerzenia BIOS (ROM nr 3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "Włącz zapis do pamięci ROM rozszerzenia BIOS (ROM nr 4)" + +msgid "Linear framebuffer base" +msgstr "Adres bazowy liniowego buforu ramki" msgid "Address" msgstr "Adres" @@ -1425,9 +1923,27 @@ msgstr "Adres" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "IRQ portu szeregowego" + +msgid "Parallel port IRQ" +msgstr "IRQ portu równoległego" + msgid "BIOS Revision" +msgstr "Rewizja BIOS-u" + +msgid "BIOS Version" msgstr "Wersja BIOS-u" +msgid "BIOS Language" +msgstr "Język BIOS-u" + +msgid "IBM 5161 Expansion Unit" +msgstr "IBM 5161 Expansion Unit" + +msgid "IBM Cassette Basic" +msgstr "IBM Cassette Basic" + msgid "Translate 26 -> 17" msgstr "Przetłumacz 26 -> 17" @@ -1443,6 +1959,18 @@ msgstr "Odwracanie kolorów" msgid "BIOS size" msgstr "Rozmiar BIOS-u" +msgid "BIOS size (ROM #1)" +msgstr "Rozmiar BIOS-u (ROM nr 1)" + +msgid "BIOS size (ROM #2)" +msgstr "Rozmiar BIOS-u (ROM nr 2)" + +msgid "BIOS size (ROM #3)" +msgstr "Rozmiar BIOS-u (ROM nr 3)" + +msgid "BIOS size (ROM #4)" +msgstr "Rozmiar BIOS-u (ROM nr 4)" + msgid "Map C0000-C7FFF as UMB" msgstr "Mapowanie C0000-C7FFF jako UMB" @@ -1518,6 +2046,9 @@ msgstr "Poziom pogłosu" msgid "Interpolation Method" msgstr "Metoda interpolacji" +msgid "Dynamic Sample Loading" +msgstr "Dynamiczne wczytywanie sampli" + msgid "Reverb Output Gain" msgstr "Wzmocnienie sygnału wyjściowego pogłosu" @@ -1605,6 +2136,12 @@ msgstr "Niski poziom DMA" msgid "Enable Game port" msgstr "Włącz port gier" +msgid "SID Model" +msgstr "Model SID" + +msgid "SID Filter Strength" +msgstr "Siła filtra SID" + msgid "Surround module" msgstr "Moduł Surround" @@ -1617,6 +2154,12 @@ msgstr "Podnieś przerwanie CODEC podczas konfiguracji CODEC-a (wymagane przez n msgid "SB Address" msgstr "Adres SB" +msgid "Adlib Address" +msgstr "Adres Adlib" + +msgid "Use EEPROM setting" +msgstr "Użyj ustawień z EEPROM" + msgid "WSS IRQ" msgstr "WSS IRQ" @@ -1663,7 +2206,7 @@ msgid "GUS type" msgstr "Typ GUS" msgid "Enable 0x04 \"Exit 86Box\" command" -msgstr "Włącz polecenie 0x04 \"Wyjdź z 86Boxa\"" +msgstr "Włącz polecenie 0x04 „Wyjdź z 86Boxa”" msgid "Display type" msgstr "Typ ekranu" @@ -1701,9 +2244,15 @@ msgstr "Typ RAMDAC" msgid "Blend" msgstr "Mieszanka" +msgid "Font" +msgstr "Font" + msgid "Bilinear filtering" msgstr "Filtrowanie dwuliniowe" +msgid "Video chroma-keying" +msgstr "Chroma-keying obrazu" + msgid "Dithering" msgstr "Dithering" @@ -1746,6 +2295,33 @@ msgstr "Prędkość transferu" msgid "EMS mode" msgstr "Tryb EMS" +msgid "EMS Address" +msgstr "Adres EMS" + +msgid "EMS 1 Address" +msgstr "Adres EMS 1" + +msgid "EMS 2 Address" +msgstr "Adres EMS 2" + +msgid "EMS Memory Size" +msgstr "Rozmiar pamięci EMS" + +msgid "EMS 1 Memory Size" +msgstr "Rozmiar pamięci EMS 1" + +msgid "EMS 2 Memory Size" +msgstr "Rozmiar pamięci EMS 2" + +msgid "Enable EMS" +msgstr "Włącz EMS" + +msgid "Enable EMS 1" +msgstr "Włącz EMS 1" + +msgid "Enable EMS 2" +msgstr "Włącz EMS 2" + msgid "Address for > 2 MB" msgstr "Adres dla > 2 MB" @@ -1764,11 +2340,11 @@ msgstr "Zawsze z wybraną prędkością" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "Ustawienia BIOS + klawisze skrótu (wyłączone podczas testu POST)" -msgid "64 kB starting from F0000" -msgstr "64 kB począwszy od F0000" +msgid "64 KB starting from F0000" +msgstr "64 KB począwszy od F0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB począwszy od E0000 (adres MSB odwrócony, najpierw ostatnie 64KB)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KB począwszy od E0000 (adres MSB odwrócony, najpierw ostatnie 64 KB)" msgid "Sine" msgstr "Sinusoidalny" @@ -1869,6 +2445,9 @@ msgstr "256 KB" msgid "Composite" msgstr "Kompozyt" +msgid "True color" +msgstr "Prawdziwy kolor" + msgid "Old" msgstr "Stary" @@ -1902,6 +2481,15 @@ msgstr "Interpolacja sRGB" msgid "Linear interpolation" msgstr "Interpolacja liniowa" +msgid "Has secondary 8x8 character set" +msgstr "Posiada pomocniczy zestaw znaków 8x8" + +msgid "Has Quadcolor II daughter board" +msgstr "Posiada płytę rozszerzeń Quadcolor II" + +msgid "Alternate monochrome contrast" +msgstr "Alternatywny kontrast monochromatyczny" + msgid "128 KB" msgstr "128 KB" @@ -1935,6 +2523,9 @@ msgstr "Bursztynowy" msgid "Gray" msgstr "Szary" +msgid "Grayscale" +msgstr "Skala odcieni szarości" + msgid "Color" msgstr "Kolorowy" @@ -1950,6 +2541,12 @@ msgstr "Inne języki" msgid "Bochs latest" msgstr "Najnowszy Bochs" +msgid "Apply overscan deltas" +msgstr "Zastosuj delty overscanu" + +msgid "Mono Interlaced" +msgstr "Monochromatyczny z przeplotem" + msgid "Mono Non-Interlaced" msgstr "Monochromatyczny bez przeplotu" @@ -1962,8 +2559,11 @@ msgstr "Kolor bez przeplotu" msgid "3Dfx Voodoo Graphics" msgstr "Grafika 3Dfx Voodoo" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" -msgstr "Obsydian SB50 + Amethyst (2 jednostki TMU)" +msgstr "Obsidian SB50 + Amethyst (2 jednostki TMU)" msgid "8-bit" msgstr "8-bitowy" @@ -2031,6 +2631,9 @@ msgstr "Szybkość transmisji przelotowej" msgid "Named Pipe (Server)" msgstr "Nazwany potok (serwer)" +msgid "Named Pipe (Client)" +msgstr "Nazwany potok (klient)" + msgid "Host Serial Passthrough" msgstr "Przelot przez port szeregowy hosta" @@ -2038,7 +2641,7 @@ msgid "E&ject %1" msgstr "W&yjmij %1" msgid "&Unmute" -msgstr "O&dcisz" +msgstr "&Odcisz" msgid "Softfloat FPU" msgstr "FPU Softfloat" @@ -2076,6 +2679,12 @@ msgstr "Klon IBM 8514/A (ISA)" msgid "Vendor" msgstr "Producent" +msgid "30 Hz (JMP2 = 1)" +msgstr "30 Hz (JMP2 = 1)" + +msgid "60 Hz (JMP2 = 2)" +msgstr "60 Hz (JMP2 = 2)" + msgid "Generic PC/XT Memory Expansion" msgstr "Generyczne rozszerzenie pamięci PC/XT" @@ -2086,7 +2695,7 @@ msgid "Unable to find Dot-Matrix fonts" msgstr "Nie można znaleźć fontów igłowych" msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "Fonty TrueType w katalogu \"roms/printer/fonts\" są wymagane do emulacji generycznej drukarki igłowej ESC/P." +msgstr "Fonty TrueType w katalogu „roms/printer/fonts” są wymagane do emulacji generycznej drukarki igłowej ESC/P." msgid "Inhibit multimedia keys" msgstr "Przejmij klawisze multimedialne" @@ -2147,3 +2756,201 @@ msgstr "Przesuń w dół" msgid "Could not load file %1" msgstr "Nie można wczytać pliku %1" + +msgid "Key Bindings:" +msgstr "Przypisania klawiszy:" + +msgid "Action" +msgstr "Akcja" + +msgid "Keybind" +msgstr "Przypisane klawisze" + +msgid "Clear binding" +msgstr "Wyczyść przypisanie" + +msgid "Bind" +msgstr "Przypisanie" + +msgid "Bind Key" +msgstr "Przypisanie klawiszy" + +msgid "Enter key combo:" +msgstr "Wciśnij kombinację klawiszy:" + +msgid "Bind conflict" +msgstr "Konflikt przypisań" + +msgid "This key combo is already in use." +msgstr "Ta kombinacja klawiszy jest już w użyciu." + +msgid "Send Control+Alt+Del" +msgstr "Wyślij Control+Alt+Del" + +msgid "Send Control+Alt+Escape" +msgstr "Wyślij Control+Alt+Escape" + +msgid "Toggle fullscreen" +msgstr "Przełącz pełny ekran" + +msgid "Screenshot" +msgstr "Zrzut ekranu" + +msgid "Release mouse pointer" +msgstr "Wypuść wskaźnik myszy" + +msgid "Toggle pause" +msgstr "Przełącz pauzę" + +msgid "Toggle mute" +msgstr "Przełącz wyciszenie" + +msgid "Text files" +msgstr "Pliki tekstowe" + +msgid "ROM files" +msgstr "Pliki ROM" + +msgid "SoundFont files" +msgstr "Pliki SoundFont" + +msgid "Local Switch" +msgstr "Switch lokalny" + +msgid "Remote Switch" +msgstr "Switch zdalny" + +msgid "Switch:" +msgstr "Switch:" + +msgid "Hub Mode" +msgstr "Tryb hub" + +msgid "Hostname:" +msgstr "Nazwa komputera:" + +msgid "ISA RAM:" +msgstr "ISA RAM:" + +msgid "ISA ROM:" +msgstr "ISA ROM:" + +msgid "&Wipe NVRAM" +msgstr "&Wyczyść NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "To usunie wszystkie pliki NVRAM (i powiązane) maszyny wirtualnej, zlokalizowane w podkatalogu „nvr”. Będziesz musieć przekonfigurować BIOS (i prawdopodobnie inne urządzenia w maszynie wirtualnej), jeśli dotyczy.\n\nCzy na pewno chcesz wyczyścić całą zawartość NVRAM maszyny wirtualnej \"%1\"?" + +msgid "Success" +msgstr "Sukces" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Pomyślnie wyczyszczono zawartość NVRAM maszyny wirtualnej „%1”" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Wystąpił błąd podczas próby wyczyszczenia zawartości NVRAM maszyny wirtualnej „%1”" + +msgid "%1 VM Manager" +msgstr "Menedżer maszyn wirtualnych %1" + +msgid "%n disk(s)" +msgstr "%n dysk(i/ów)" + +msgid "Unknown Status" +msgstr "Status nieznany" + +msgid "No Machines Found!" +msgstr "Nie znaleziono maszyn!" + +msgid "Check for updates on startup" +msgstr "Sprawdzaj aktualizacje przy starcie" + +msgid "Unable to determine release information" +msgstr "Nie udało się ustalić informacji o wydaniu" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Wystąpił błąd podczas sprawdzania aktualizacji:\n\n%1\n\nSpróbuj ponownie później." + +msgid "Update check complete" +msgstr "Sprawdzanie aktualizacji ukończone" + +msgid "stable" +msgstr "stabilnej" + +msgid "beta" +msgstr "beta" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Używasz najnowszej wersji %1 86Boxa: %2" + +msgid "version" +msgstr "wersja" + +msgid "build" +msgstr "kompilacja" + +msgid "You are currently running version %1." +msgstr "Aktualnie używasz wersji %1." + +msgid "Version %1 is now available." +msgstr "Wersja %1 jest teraz dostępna." + +msgid "You are currently running build %1." +msgstr "Aktualnie używasz kompilacji %1." + +msgid "Build %1 is now available." +msgstr "Kompilacja %1 jest teraz dostępna." + +msgid "Would you like to visit the download page?" +msgstr "Czy chcesz odwiedzić stronę pobierania?" + +msgid "Visit download page" +msgstr "Odwiedź stronę pobierania" + +msgid "Update check" +msgstr "Sprawdzanie aktualizacji" + +msgid "Checking for updates..." +msgstr "Sprawdzanie aktualizacji..." + +msgid "86Box Update" +msgstr "Aktualizacja 86Boxa" + +msgid "Release notes:" +msgstr "Uwagi do wydania:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Awaria maszyny wirtualnej" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "Proces maszyny wirtualnej „%1” zakończył się nieoczekiwanie z kodem błędu %2." + +msgid "The system will not be added." +msgstr "System nie będzie dodany." + +msgid "&Update mouse every CPU frame" +msgstr "Aktualizuj &mysz z każdą ramką CPU" + +msgid "Hue" +msgstr "Barwa" + +msgid "Saturation" +msgstr "Nasycenie" + +msgid "Contrast" +msgstr "Kontrast" + +msgid "Brightness" +msgstr "Jasność" + +msgid "Sharpness" +msgstr "Ostrość" + +msgid "&CGA composite settings..." +msgstr "Ustawienia trybu kompozytowego &CGA..." + +msgid "CGA composite settings" +msgstr "Ustawienia trybu kompozytowego CGA" diff --git a/src/qt/languages/pt-BR.po b/src/qt/languages/pt-BR.po index 56ef18b15..68e13e876 100644 --- a/src/qt/languages/pt-BR.po +++ b/src/qt/languages/pt-BR.po @@ -13,13 +13,13 @@ msgid "&Keyboard requires capture" msgstr "&Teclado requer captura" msgid "&Right CTRL is left ALT" -msgstr "&CTRL direito é o ALT esquerdo" +msgstr "CTR&L direito é o ALT esquerdo" msgid "&Hard Reset..." msgstr "&Reinicialização completa..." msgid "&Ctrl+Alt+Del" -msgstr "&Ctrl+Alt+Del" +msgstr "Ctrl+Alt+&Del" msgid "Ctrl+Alt+&Esc" msgstr "Ctrl+Alt+&Esc" @@ -27,17 +27,23 @@ msgstr "Ctrl+Alt+&Esc" msgid "&Pause" msgstr "&Pausar" -msgid "E&xit..." -msgstr "&Sair..." +msgid "Pause" +msgstr "Pausa" + +msgid "Re&sume" +msgstr "&Continuar" + +msgid "E&xit" +msgstr "&Sair" msgid "&View" msgstr "&Exibir" msgid "&Hide status bar" -msgstr "&Ocultar barra de status" +msgstr "Ocultar barra de &status" msgid "Hide &toolbar" -msgstr "Ocultar &barra de ferramenta" +msgstr "Ocultar barra de &ferramentas" msgid "&Resizeable window" msgstr "&Janela redimensionável" @@ -51,23 +57,20 @@ msgstr "&Renderizador" msgid "&Qt (Software)" msgstr "&Qt (Software)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" msgstr "Open&GL (Núcleo 3.0)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." -msgstr "Especificar as dimensões..." +msgid "Specify &dimensions..." +msgstr "Especificar as dime&nsões..." -msgid "F&orce 4:3 display ratio" -msgstr "F&orçar proporção de tela em 4:3" +msgid "Force &4:3 display ratio" +msgstr "Forçar proporção de tela em &4:3" msgid "&Window scale factor" -msgstr "&Fator de redimensionamento da janela" +msgstr "F&ator de redimensionamento da janela" msgid "&0.5x" msgstr "&0,5x" @@ -99,8 +102,8 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" -msgstr "Método de filtragem" +msgid "Fi<er method" +msgstr "Método d&e filtragem" msgid "&Nearest" msgstr "&Mais próximo" @@ -109,13 +112,13 @@ msgid "&Linear" msgstr "&Linear" msgid "Hi&DPI scaling" -msgstr "Escala Hi&DPI" +msgstr "Escala &HiDPI" msgid "&Fullscreen" msgstr "&Tela cheia" msgid "Fullscreen &stretch mode" -msgstr "Modo de &redimensionamento da tela cheia" +msgstr "Modo de re&dimensionamento da tela cheia" msgid "&Full screen stretch" msgstr "&Tela cheia redimensionada" @@ -132,8 +135,8 @@ msgstr "&Redimensionamento com valores inteiros" msgid "4:&3 Integer scale" msgstr "Redimensionamento com valores inteiros 4:&3" -msgid "E&GA/(S)VGA settings" -msgstr "Configurações de E&GA/(S)VGA" +msgid "EGA/(S)&VGA settings" +msgstr "Configurações de EGA/(S)&VGA" msgid "&Inverted VGA monitor" msgstr "Monitor VGA &invertido" @@ -144,6 +147,9 @@ msgstr "&Tipo de tela VGA" msgid "RGB &Color" msgstr "&Cor RGB" +msgid "RGB (no brown)" +msgstr "RGB (sem marrom)" + msgid "&RGB Grayscale" msgstr "Tons de cinza &RGB" @@ -151,7 +157,7 @@ msgid "Generic RGBI color monitor" msgstr "Monitor colorido RGBI genérico" msgid "&Amber monitor" -msgstr "Monitor &âmbar" +msgstr "Monitor âmb&ar" msgid "&Green monitor" msgstr "Monitor &verde" @@ -186,6 +192,9 @@ msgstr "&Ferramentas" msgid "&Settings..." msgstr "&Configurações..." +msgid "Settings..." +msgstr "Configurações..." + msgid "&Update status bar icons" msgstr "&Atualizar ícones da barra de status" @@ -211,7 +220,7 @@ msgid "End trace" msgstr "Finalizar rastreamento" msgid "&Help" -msgstr "&Ajuda" +msgstr "Aj&uda" msgid "&Documentation..." msgstr "&Documentação..." @@ -351,11 +360,14 @@ msgstr "Máquina:" msgid "Configure" msgstr "Configurar" +msgid "CPU:" +msgstr "Processador:" + msgid "CPU type:" msgstr "Tipo de CPU:" msgid "Speed:" -msgstr "Veloc.:" +msgstr "Velocidade:" msgid "Frequency:" msgstr "Frequência:" @@ -411,12 +423,27 @@ msgstr "Gráficos IBM 8514/A" msgid "XGA Graphics" msgstr "Gráficos XGA" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "Gráficos IBM PS/55 Display Adapter" + +msgid "Keyboard:" +msgstr "Teclado:" + +msgid "Keyboard" +msgstr "Teclado" + msgid "Mouse:" msgstr "Mouse:" +msgid "Mouse" +msgstr "Mouse" + msgid "Joystick:" msgstr "Joystick:" +msgid "Joystick" +msgstr "Joystick" + msgid "Joystick 1..." msgstr "Joystick 1..." @@ -447,6 +474,9 @@ msgstr "Disp. de saída MIDI:" msgid "MIDI In Device:" msgstr "Disp. de entrada MIDI:" +msgid "MIDI Out:" +msgstr "Saída MIDI:" + msgid "Standalone MPU-401" msgstr "MPU-401 independente" @@ -454,7 +484,7 @@ msgid "Use FLOAT32 sound" msgstr "Usar som FLOAT32" msgid "FM synth driver" -msgstr "Controlador de sint. FM" +msgstr "Driver de sintetizador FM" msgid "Nuked (more accurate)" msgstr "Nuked (mais preciso)" @@ -486,6 +516,9 @@ msgstr "Dispositivo LPT3:" msgid "LPT4 Device:" msgstr "Dispositivo LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "DMA ECP LPT Interna:" + msgid "Serial port 1" msgstr "Porta serial 1" @@ -510,18 +543,21 @@ msgstr "Porta paralela 3" msgid "Parallel port 4" msgstr "Porta paralela 4" -msgid "HD Controller:" -msgstr "Controlador HD:" - msgid "FD Controller:" msgstr "Controlador FD:" +msgid "CD-ROM Controller:" +msgstr "Controlador de CD-ROM:" + msgid "Tertiary IDE Controller" msgstr "Controlador IDE terciário" msgid "Quaternary IDE Controller" msgstr "Controlador IDE quaternário" +msgid "Hard disk" +msgstr "Disco rígido" + msgid "SCSI" msgstr "SCSI" @@ -543,6 +579,9 @@ msgstr "Cassete" msgid "Hard disks:" msgstr "Discos rígidos:" +msgid "Firmware Version" +msgstr "Versão de Firmware" + msgid "&New..." msgstr "&Novo..." @@ -600,8 +639,14 @@ msgstr "Unidades de CD-ROM:" msgid "MO drives:" msgstr "Unidades magneto-ópticas:" -msgid "ZIP drives:" -msgstr "Unidades ZIP:" +msgid "MO:" +msgstr "Magneto-ópticas:" + +msgid "Removable disks:" +msgstr "Discos removíveis:" + +msgid "Removable disk drives:" +msgstr "Unidades de disco removível:" msgid "ZIP 250" msgstr "ZIP 250" @@ -627,18 +672,6 @@ msgstr "Placa 3:" msgid "Card 4:" msgstr "Placa 4:" -msgid "Board 1" -msgstr "Placa 1" - -msgid "Board 2" -msgstr "Placa 2" - -msgid "Board 3" -msgstr "Placa 3" - -msgid "Board 4" -msgstr "Placa 4" - msgid "Generic ISA ROM Board" msgstr "Placa ROM ISA Genérica" @@ -669,11 +702,17 @@ msgstr " - PAUSADO" msgid "Speed" msgstr "Velocidade" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Disco removível %1 (%2): %3" -msgid "ZIP images" -msgstr "Imagens ZIP" +msgid "&Removable disk %1 (%2): %3" +msgstr "Disco &removível %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Imagens de disco removível" + +msgid "Image %1" +msgstr "Imagem %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "O 86Box não conseguiu encontrar nenhuma imagem de ROM utilizável.\n\nPor favor, baixe um conjunto de ROM e extraia no diretório \"roms\"." @@ -732,12 +771,30 @@ msgstr "Rede" msgid "Ports (COM & LPT)" msgstr "Portas (COM & LPT)" +msgid "Ports" +msgstr "Portas" + +msgid "Serial ports:" +msgstr "Portas seriais:" + +msgid "Parallel ports:" +msgstr "Portas Paralelas:" + msgid "Storage controllers" msgstr "Controladores de armaz." msgid "Hard disks" msgstr "Discos rígidos" +msgid "Disks:" +msgstr "Discos:" + +msgid "Floppy:" +msgstr "Disquete:" + +msgid "Controllers:" +msgstr "Controladores:" + msgid "Floppy & CD-ROM drives" msgstr "Disquete & CD-ROM" @@ -747,6 +804,9 @@ msgstr "Dispos. removíveis" msgid "Other peripherals" msgstr "Outros periféricos" +msgid "Other devices" +msgstr "Outros dispositivos" + msgid "Click to capture mouse" msgstr "Clique para capturar o mouse" @@ -823,7 +883,7 @@ msgid "Thrustmaster Flight Control System" msgstr "Sistema de Controle de Voo Thrustmaster" msgid "Thrustmaster FCS + Rudder Control System" -msgstr "Thrustmaster SCV + Sistema de Controle de Leme" +msgstr "SCV Thrustmaster + Sistema de Controle de Leme" msgid "2-button gamepad(s)" msgstr "Gamepad(s) de 2 botões" @@ -855,6 +915,9 @@ msgstr "%1 MB (CCS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Disquete %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Disquete %1 (%2): %3" + msgid "Advanced sector images" msgstr "Imagens de setor avançado" @@ -876,6 +939,9 @@ msgstr "Não foi possível inicializar o GhostPCL" msgid "MO %1 (%2): %3" msgstr "Magneto-óptico %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&Magneto-óptico %1 (%2): %3" + msgid "MO images" msgstr "Imagens magneto-ópticas" @@ -885,6 +951,15 @@ msgstr "Bem-vindo ao 86Box!" msgid "Internal device" msgstr "Dispositivo interno" +msgid "&File" +msgstr "&Arquivo" + +msgid "&New machine..." +msgstr "&Nova máquina..." + +msgid "&Check for updates..." +msgstr "&Verificar por atualizações..." + msgid "Exit" msgstr "Sair" @@ -960,12 +1035,18 @@ msgstr "Continuar" msgid "Cassette: %1" msgstr "Cassete: %1" +msgid "C&assette: %1" +msgstr "C&assete: %1" + msgid "Cassette images" msgstr "Imagens de cassete" msgid "Cartridge %1: %2" msgstr "Cartucho %1: %2" +msgid "Car&tridge %1: %2" +msgstr "Car&tucho %1: %2" + msgid "Cartridge images" msgstr "Imagens de cartucho" @@ -975,6 +1056,9 @@ msgstr "Continuar a execução" msgid "Pause execution" msgstr "Pausar a execução" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Pressionar Ctrl+Alt+Del" @@ -984,9 +1068,279 @@ msgstr "Pressionar Ctrl+Alt+Esc" msgid "Hard reset" msgstr "Reinicialização completa" +msgid "Force shutdown" +msgstr "Forçar desligamento" + +msgid "Start" +msgstr "Iniciar" + +msgid "Not running" +msgstr "Parado" + +msgid "Running" +msgstr "Rodando" + +msgid "Paused" +msgstr "Pausada" + +msgid "Waiting" +msgstr "Esperando" + +msgid "Powered Off" +msgstr "Desligada" + +msgid "%n running" +msgstr "%n rodando" + +msgid "%n paused" +msgstr "%n pausada" + +msgid "%n waiting" +msgstr "%n esperando" + +msgid "%1 total" +msgstr "%1 total" + +msgid "VMs: %1" +msgstr "MVs: %1" + +msgid "System Directory:" +msgstr "Diretório do Sistema:" + +msgid "Choose directory" +msgstr "Escolha o diretório" + +msgid "Choose configuration file" +msgstr "Escolha o arquivo de configuração" + +msgid "86Box configuration files (86box.cfg)" +msgstr "Arquivos de configuração 86Box (86Box.cfg)" + +msgid "Configuration read failed" +msgstr "Falha ao ler a configuração" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Impossível abrir o arquivo de configuração selecionado para leitura: %1" + +msgid "Use regular expressions in search box" +msgstr "Usar expressões regulares na caixa de pesquisa" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 máquina(s) estão ativas atualmente. Tem certeza que deseja encerrar o gerenciador de MV mesmo assim?" + +msgid "Add new system wizard" +msgstr "Assistente para novo sistema" + +msgid "Introduction" +msgstr "Introdução" + +msgid "This will help you add a new system to 86Box." +msgstr "Isso irá ajudá-lo a adicionar um novo sistema ao 86Box." + +msgid "New configuration" +msgstr "Nova configuração" + +msgid "Complete" +msgstr "Completado" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "O assistente vai iniciar a configuração para o novo sistema." + +msgid "Use existing configuration" +msgstr "Usar configuração existente" + +msgid "Type some notes here" +msgstr "Digite algumas notas aqui" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Cole o conteúdo de uma configuração existente na caixa abaixo." + +msgid "Load configuration from file" +msgstr "Carregar configuração do arquivo" + +msgid "System name" +msgstr "Nome do sistema" + +msgid "System name:" +msgstr "Nome do sistema:" + +msgid "System name cannot contain certain characters" +msgstr "O nome do sistema não pode conter certos caracteres" + +msgid "System name already exists" +msgstr "O nome do sistema já existe" + +msgid "Please enter a directory for the system" +msgstr "Por favor digite um diretório para o sistema" + +msgid "Directory does not exist" +msgstr "O diretório não existe" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "Um novo diretório para o sistema será criado no diretório acima" + +msgid "System location:" +msgstr "Local do sistema:" + +msgid "System name and location" +msgstr "Nome do sistema e local" + +msgid "Enter the name of the system and choose the location" +msgstr "Digite o nome do sistema e escolha o local" + +msgid "Enter the name of the system" +msgstr "Digite o nome do sistema" + +msgid "Please enter a system name" +msgstr "Por favor digite um nome de sistema" + +msgid "Display name (optional):" +msgstr "Nome de exibição (opcional):" + +msgid "Display name:" +msgstr "Nome de exibição:" + +msgid "Set display name" +msgstr "Defina o nome de exibição" + +msgid "Enter the new display name (blank to reset)" +msgstr "Digite o novo nome de exibição (em branco para restaurar)" + +msgid "Change &display name..." +msgstr "Mudar o &nome de exibição..." + +msgid "Context Menu" +msgstr "Menu de contexto" + +msgid "&Open folder..." +msgstr "Abrir &pasta..." + +msgid "Open p&rinter tray..." +msgstr "Abrir fila da &impressora..." + +msgid "Set &icon..." +msgstr "&Definir ícone..." + +msgid "Select an icon" +msgstr "Selecione um ícone" + +msgid "C&lone..." +msgstr "&Clonar..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "A máquina virtual \"%1\" (%2) será clonada em:" + +msgid "Directory %1 already exists" +msgstr "O diretório %1 já existe" + +msgid "You cannot use the following characters in the name: %1" +msgstr "Você não pode usar os seguintes caracteres no nome: %1" + +msgid "Clone" +msgstr "Clonar" + +msgid "Failed to create directory for cloned VM" +msgstr "Falha ao criar o diretório para a MV clonada" + +msgid "Failed to clone VM." +msgstr "Falha ao clonar MV." + +msgid "Directory in use" +msgstr "Diretório em uso" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "O diretório selecionado já está em uso. Por favor escolha um diretório diferente." + +msgid "Create directory failed" +msgstr "Falha ao criar diretório" + +msgid "Unable to create the directory for the new system" +msgstr "Impossível criar o diretório para o novo sistema" + +msgid "Configuration write failed" +msgstr "Falha ao gravar a configuração" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Impossível abrir o arquivo de configuração %1 para escrita" + +msgid "Error adding system" +msgstr "Erro adicionando sistema" + +msgid "Remove directory failed" +msgstr "Falha ao remover diretório" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Alguns arquivos no diretório da máquina não puderam ser apagados. Por favor apágue-os manualmente." + +msgid "Build" +msgstr "Compilação" + +msgid "Version" +msgstr "Versão" + +msgid "An update to 86Box is available: %1 %2" +msgstr "Uma atualização do 86Box está disponível: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Ocorreu um erro ao verificar por atualizações: %1" + +msgid "An update to 86Box is available!" +msgstr "Uma atualização do 86Box está disponível!" + +msgid "Warning" +msgstr "Aviso" + +msgid "&Kill" +msgstr "&Matar" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Matar uma máquina virtual pode causar perda de dados. Só faça isso se o processo do 86Box travar.\n\nTem certeza que deseja matar a máquina virtual \"%1\"?" + +msgid "&Delete" +msgstr "&Apagar" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Deseja realmente apagar a máquina virtual \"%1\" e todos os seus arquivos? Essa ação não pode ser desfeita!" + +msgid "Show &config file" +msgstr "Mostrar arquivo de &configuração" + +msgid "No screenshot" +msgstr "Sem captura" + +msgid "Search" +msgstr "Procurar" + +msgid "Searching for VMs..." +msgstr "Procurando por MVs..." + +msgid "Found %1" +msgstr "Encontrado %1" + +msgid "System" +msgstr "Sistema" + +msgid "Storage" +msgstr "Armazenamento" + +msgid "Disk %1: " +msgstr "Disco %1: " + +msgid "No disks" +msgstr "Sem discos" + +msgid "Audio" +msgstr "Som" + +msgid "Audio:" +msgstr "Som:" + msgid "ACPI shutdown" msgstr "Desligamento por ACPI" +msgid "ACP&I shutdown" +msgstr "Desligamento por ACP&I" + msgid "Hard disk (%1)" msgstr "Disco rígido (%1)" @@ -1134,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 KB" @@ -1243,7 +1600,7 @@ msgid "Fast" msgstr "Rápido" msgid "&Auto-pause on focus loss" -msgstr "Pausa &automática ao perder o foco" +msgstr "Pa&usa automática ao perder o foco" msgid "WinBox is no longer supported" msgstr "O WinBox não é mais suportado" @@ -1272,41 +1629,38 @@ msgstr "Dispositivos MCA" msgid "List of MCA devices:" msgstr "Lista de dispositivos MCA:" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Ferramenta para tablet" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "Sobre o &Qt" -msgid "About Qt" -msgstr "Sobre o Qt" - -msgid "MCA devices..." +msgid "&MCA devices..." msgstr "Dispositivos MCA..." -msgid "Show non-primary monitors" -msgstr "Mostrar monitores não primários" +msgid "Show non-&primary monitors" +msgstr "Mostrar monitores não &primários" -msgid "Open screenshots folder..." -msgstr "Abrir pasta de capturas de tela..." +msgid "Open screenshots &folder..." +msgstr "Ab&rir pasta de capturas de tela..." -msgid "Apply fullscreen stretch mode when maximized" -msgstr "Aplicar modo de ampliação em tela cheia quando maximizado" +msgid "Appl&y fullscreen stretch mode when maximized" +msgstr "Apl&icar modo de ampliação em tela cheia quando maximizado" -msgid "Cursor/Puck" -msgstr "Cursor/Puck" +msgid "&Cursor/Puck" +msgstr "&Cursor/Puck" -msgid "Pen" -msgstr "Caneta" +msgid "&Pen" +msgstr "C&aneta" -msgid "Host CD/DVD Drive (%1:)" -msgstr "Unidade de CD/DVD do anfitrião (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "&Unidade de CD/DVD do anfitrião (%1:)" msgid "&Connected" msgstr "&Conectado" -msgid "Clear image history" -msgstr "Limpar histórico de imagens" +msgid "Clear image &history" +msgstr "Limpar histórico de imagens(&H)" msgid "Create..." msgstr "Criar..." @@ -1320,9 +1674,15 @@ msgstr "Barramento desconhecido" msgid "Null Driver" msgstr "Driver nulo" +msgid "NIC:" +msgstr "Placa de Rede:" + msgid "NIC %1 (%2) %3" msgstr "NIC %1 (%2) %3" +msgid "&NIC %1 (%2) %3" +msgstr "&NIC %1 (%2) %3" + msgid "Render behavior" msgstr "Comportamento de renderização" @@ -1386,6 +1746,9 @@ msgstr "Nenhum dispositivo MCA." msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" msgstr "Placa de rede 1" @@ -1428,8 +1791,26 @@ msgstr "Passagem de porta serial 3" msgid "Serial port passthrough 4" msgstr "Passagem de porta serial 4" -msgid "Renderer options..." -msgstr "Opções do renderizador..." +msgid "Renderer &options..." +msgstr "&Opções do renderizador..." + +msgid "PC/XT Keyboard" +msgstr "Teclado PC/XT" + +msgid "AT Keyboard" +msgstr "Teclado AT" + +msgid "AX Keyboard" +msgstr "Teclado AX" + +msgid "PS/2 Keyboard" +msgstr "Teclado PS/2" + +msgid "PS/55 Keyboard" +msgstr "Teclado PS/55" + +msgid "Keys" +msgstr "Teclas" msgid "Logitech/Microsoft Bus Mouse" msgstr "Mouse de barramento Logitech/Microsoft" @@ -1446,15 +1827,24 @@ msgstr "Mouse de barramento Mouse Systems" msgid "Microsoft Serial Mouse" msgstr "Mouse serial Microsoft" +msgid "Microsoft Serial BallPoint" +msgstr "Mouse serial Microsoft BallPoint" + msgid "Logitech Serial Mouse" msgstr "Mouse serial Logitech" msgid "PS/2 Mouse" msgstr "Mouse PS/2" +msgid "PS/2 QuickPort Mouse" +msgstr "Mouse PS/2 QuickPort" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (serial)" +msgid "Default Baud rate" +msgstr "Taxa de transmissão padrão" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Modem padrão compatível com Hayes" @@ -1494,7 +1884,7 @@ msgstr "Arquivo do BIOS (ROM #3)" msgid "BIOS file (ROM #4)" msgstr "Arquivo do BIOS (ROM #4)" -msgid "BIOS Address" +msgid "BIOS address" msgstr "Endereço do BIOS" msgid "BIOS address (ROM #1)" @@ -1533,15 +1923,18 @@ msgstr "Endereço" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "IRQ da Porta Serial" + +msgid "Parallel port IRQ" +msgstr "IRQ da Porta Paralela" + msgid "BIOS Revision" msgstr "Revisão do BIOS" msgid "BIOS Version" msgstr "Versão do BIOS" -msgid "BIOS Versions" -msgstr "Versões de BIOS" - msgid "BIOS Language" msgstr "Idioma do BIOS" @@ -1663,7 +2056,7 @@ msgid "Reversed stereo" msgstr "Estéreo invertido" msgid "Nice ramp" -msgstr "Bela rampa" +msgstr "Rampa suave" msgid "Hz" msgstr "Hz" @@ -1759,7 +2152,10 @@ msgid "Raise CODEC interrupt on CODEC setup (needed by some drivers)" msgstr "Aumentar a interrupção do CODEC na configuração do CODEC (necessário para alguns drivers)" msgid "SB Address" -msgstr "Endereço do SB" +msgstr "Endereço da SB" + +msgid "Adlib Address" +msgstr "Endereço da Adlib" msgid "Use EEPROM setting" msgstr "Usar configuração da EEPROM" @@ -1786,7 +2182,7 @@ msgid "Enable CMS" msgstr "Ativar o CMS" msgid "Mixer" -msgstr "Misturador" +msgstr "Mixer" msgid "High DMA" msgstr "DMA alto" @@ -1854,6 +2250,9 @@ msgstr "Fonte" msgid "Bilinear filtering" msgstr "Filtragem bilinear" +msgid "Video chroma-keying" +msgstr "Chroma-keying de vídeo" + msgid "Dithering" msgstr "Pontilhamento" @@ -1941,11 +2340,11 @@ msgstr "Sempre na velocidade selecionada" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "Configuração do BIOS + teclas de atalho (desativadas durante o POST)" -msgid "64 kB starting from F0000" -msgstr "64 kB a partir de F0000" +msgid "64 KB starting from F0000" +msgstr "64 KB a partir de F0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB a partir de E0000 (endereço MSB invertido, os últimos 64 kB primeiro)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KB a partir de E0000 (endereço MSB invertido, os últimos 64 KB primeiro)" msgid "Sine" msgstr "Senoidal" @@ -2046,8 +2445,11 @@ msgstr "256 KB" msgid "Composite" msgstr "Composto" +msgid "True color" +msgstr "Cor real" + msgid "Old" -msgstr "Antiga" +msgstr "Antigo" msgid "New" msgstr "Novo" @@ -2155,7 +2557,10 @@ msgid "Color Non-Interlaced" msgstr "Colorido não entrelaçado" msgid "3Dfx Voodoo Graphics" -msgstr "Gráficos 3Dfx Voodoo" +msgstr "3Dfx Voodoo Graphics" + +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 unidades TMU)" @@ -2188,7 +2593,7 @@ msgid "Generic Text Printer" msgstr "Impressora de texto genérica" msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Impressora matricial de pontos ESC/P genérica" +msgstr "Impressora matricial ESC/P genérica" msgid "Generic PostScript Printer" msgstr "Impressora PostScript genérica" @@ -2212,7 +2617,7 @@ msgid "Host Serial Device" msgstr "Dispositivo serial host" msgid "Name of pipe" -msgstr "Nome do tubo" +msgstr "Nome do pipe" msgid "Data bits" msgstr "Bits de dados" @@ -2224,7 +2629,10 @@ msgid "Baud Rate of Passthrough" msgstr "Taxa de transmissão de passagem" msgid "Named Pipe (Server)" -msgstr "Pipe nomeado (servidor)" +msgstr "Pipe nomeado (Servidor)" + +msgid "Named Pipe (Client)" +msgstr "Pipe nomeado (Cliente)" msgid "Host Serial Passthrough" msgstr "Passagem da porta serial do host" @@ -2287,7 +2695,7 @@ msgid "Unable to find Dot-Matrix fonts" msgstr "Não foi possível localizar os fontes matriciais de pontos" msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "As fontes TrueType no diretório \"roms/printer/fonts\" são necessárias para a emulação da impressora matricial de pontos ESC/P genérica." +msgstr "As fontes TrueType no diretório \"roms/printer/fonts\" são necessárias para a emulação da impressora matricial ESC/P genérica." msgid "Inhibit multimedia keys" msgstr "Inibir teclas multimídia" @@ -2370,6 +2778,12 @@ msgstr "Vincular tecla" msgid "Enter key combo:" msgstr "Pressione combinação de teclas:" +msgid "Bind conflict" +msgstr "Conflito de vínculo" + +msgid "This key combo is already in use." +msgstr "Esta combinação de teclas já está em uso." + msgid "Send Control+Alt+Del" msgstr "Enviar Control+Alt+Del" @@ -2394,11 +2808,149 @@ msgstr "Alternar mudo" msgid "Text files" msgstr "Arquivos de texto" -msgid "ROM files (*.bin *.rom)|*.bin,*.rom" -msgstr "Arquivos de ROM (*.bin *.rom)|*.bin,*.rom" - msgid "ROM files" msgstr "Arquivos de ROM" msgid "SoundFont files" msgstr "Arquivos SoundFont" + +msgid "Local Switch" +msgstr "Switch Local" + +msgid "Remote Switch" +msgstr "Switch Remoto" + +msgid "Switch:" +msgstr "Switch:" + +msgid "Hub Mode" +msgstr "Modo Hub" + +msgid "Hostname:" +msgstr "Nome do Host:" + +msgid "ISA RAM:" +msgstr "RAM ISA:" + +msgid "ISA ROM:" +msgstr "ROM ISA:" + +msgid "&Wipe NVRAM" +msgstr "&Limpar NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Isso irá apagar todos os arquivos NVRAM (e relacionados) da máquina virtual localizada no subdiretório \"nvr\". Você terá que reconfigurar as configurações do BIOS (e possívelmente outros dispositivos dentro da MV) novamente se aplicável.\n\nTem certeza que quer apagar todo o conteúdo NVRAM da máquina virtual \"%1\"?" + +msgid "Success" +msgstr "Sucesso" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Conteúdo NVRAM da máquina virtual \"%1\" apagado com sucesso" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Um erro ocorreu ao tentar apagar o conteúdo NVRAM da máquina virtual \"%1\"" + +msgid "%1 VM Manager" +msgstr "Gerenciador de MV do %1" + +msgid "%n disk(s)" +msgstr "%1 disco(s)" + +msgid "Unknown Status" +msgstr "Estado desconhecido" + +msgid "No Machines Found!" +msgstr "Nenhuma Máquina Encontrada!" + +msgid "Check for updates on startup" +msgstr "Verificar atualizações ao iniciar" + +msgid "Unable to determine release information" +msgstr "Impossível determinar informações do lançamento" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Ocorreu um erro ao verificar por atualizações:\n\n%1\n\nPor favor tente mais tarde." + +msgid "Update check complete" +msgstr "Verificação de atualização completada" + +msgid "stable" +msgstr "estável" + +msgid "beta" +msgstr "beta" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Você está executando a última versão %1 do 86Box: %2" + +msgid "version" +msgstr "versão" + +msgid "build" +msgstr "compilação" + +msgid "You are currently running version %1." +msgstr "Você está executando atualmente a versão %1." + +msgid "Version %1 is now available." +msgstr "Versão %2 está disponível." + +msgid "You are currently running build %1." +msgstr "Você está executando atualmente a compilação %1." + +msgid "Build %1 is now available." +msgstr "Compilação %2 está disponível." + +msgid "Would you like to visit the download page?" +msgstr "Gostaria de visitar a página de download?" + +msgid "Visit download page" +msgstr "Visitar página de download" + +msgid "Update check" +msgstr "Verificação de atualização" + +msgid "Checking for updates..." +msgstr "Verificando por atualizações.." + +msgid "86Box Update" +msgstr "Atualização do 86Box" + +msgid "Release notes:" +msgstr "Notas de lançamento:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Falha da máquina virtual" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "O processo da máquina virtual \"%1\" terminou inesperadamente com o código de saída %2." + +msgid "The system will not be added." +msgstr "O sistema não será adicionado." + +msgid "&Update mouse every CPU frame" +msgstr "&Atualiza o estado do mouse em cada quadro do CPU" + +msgid "Hue" +msgstr "Matiz" + +msgid "Saturation" +msgstr "Saturação" + +msgid "Contrast" +msgstr "Contraste" + +msgid "Brightness" +msgstr "Brilho" + +msgid "Sharpness" +msgstr "Nitidez" + +msgid "&CGA composite settings..." +msgstr "Configurações do modo composto &CGA..." + +msgid "CGA composite settings" +msgstr "Configurações do modo composto CGA" diff --git a/src/qt/languages/pt-PT.po b/src/qt/languages/pt-PT.po index 795d44e2b..456f98e3b 100644 --- a/src/qt/languages/pt-PT.po +++ b/src/qt/languages/pt-PT.po @@ -13,7 +13,7 @@ msgid "&Keyboard requires capture" msgstr "&Teclado requere captura" msgid "&Right CTRL is left ALT" -msgstr "&CTRL direito é ALT esquerdo" +msgstr "CTRL &direito é ALT esquerdo" msgid "&Hard Reset..." msgstr "&Reinicialização completa..." @@ -27,17 +27,23 @@ msgstr "Ctrl+Alt+&Esc" msgid "&Pause" msgstr "&Pausa" -msgid "E&xit..." -msgstr "&Sair..." +msgid "Pause" +msgstr "Pausa" + +msgid "Re&sume" +msgstr "Reto&mar" + +msgid "E&xit" +msgstr "&Sair" msgid "&View" msgstr "&Ver" msgid "&Hide status bar" -msgstr "&Ocultar barra de estado" +msgstr "Ocultar &barra de estado" msgid "Hide &toolbar" -msgstr "Hide &toolbar" +msgstr "Ocultar barra de &ferramentas" msgid "&Resizeable window" msgstr "&Janela redimensionável" @@ -51,20 +57,17 @@ msgstr "&Renderizador" msgid "&Qt (Software)" msgstr "&Qt (Software)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" msgstr "Open&GL (Núcleo 3.0)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." +msgid "Specify &dimensions..." msgstr "&Especificar dimensões..." -msgid "F&orce 4:3 display ratio" -msgstr "&Forçar rácio de visualização 4:3" +msgid "Force &4:3 display ratio" +msgstr "Forçar rácio de visualização &4:3" msgid "&Window scale factor" msgstr "F&actor de escala de janela" @@ -99,8 +102,8 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" -msgstr "Método de filtragem" +msgid "Fi<er method" +msgstr "Método de fil&tragem" msgid "&Nearest" msgstr "&Mais próximo" @@ -112,10 +115,10 @@ msgid "Hi&DPI scaling" msgstr "Escala Hi&DPI" msgid "&Fullscreen" -msgstr "E&crã cheio" +msgstr "Ecrã c&heio" msgid "Fullscreen &stretch mode" -msgstr "Modo &de estiramento na tela cheia" +msgstr "M&odo de estiramento na tela cheia" msgid "&Full screen stretch" msgstr "&Estiramento na tela cheia" @@ -132,8 +135,8 @@ msgstr "Escala &inteira" msgid "4:&3 Integer scale" msgstr "Escala inteira 4:&3" -msgid "E&GA/(S)VGA settings" -msgstr "Definições E&GA/(S)VGA" +msgid "EGA/(S)&VGA settings" +msgstr "Definições EGA/(S)&VGA" msgid "&Inverted VGA monitor" msgstr "Monitor VGA &invertido" @@ -144,9 +147,15 @@ msgstr "&Tipo de ecrã VGA" msgid "RGB &Color" msgstr "&Cores RGB" +msgid "RGB (no brown)" +msgstr "RGB (sem castanho)" + msgid "&RGB Grayscale" msgstr "&RGB em escala de cinzentos" +msgid "Generic RGBI color monitor" +msgstr "Monitor RGBI genérico em cores" + msgid "&Amber monitor" msgstr "Monitor âmb&ar" @@ -172,7 +181,7 @@ msgid "CGA/PCjr/Tandy/E&GA/(S)VGA overscan" msgstr "Overscan de CGA/PCjr/Tandy/E&GA/(S)VGA" msgid "Change contrast for &monochrome display" -msgstr "Mudar &contraste para ecrã monocromático" +msgstr "Mudar contraste para ecrã &monocromático" msgid "&Media" msgstr "&Media" @@ -183,11 +192,14 @@ msgstr "&Ferramentas" msgid "&Settings..." msgstr "&Definições..." +msgid "Settings..." +msgstr "Definições..." + msgid "&Update status bar icons" msgstr "&Atualizar ícones da barra de estado" msgid "Take s&creenshot" -msgstr "Gravar imagem de ecrã" +msgstr "Gravar imagem de &ecrã" msgid "S&ound" msgstr "&Som" @@ -196,7 +208,7 @@ msgid "&Preferences..." msgstr "&Preferências..." msgid "Enable &Discord integration" -msgstr "Ativar integração com &Discord" +msgstr "Ativar integração com D&iscord" msgid "Sound &gain..." msgstr "&Ganho de som..." @@ -208,7 +220,7 @@ msgid "End trace" msgstr "Terminar o rastreio" msgid "&Help" -msgstr "&Ajuda" +msgstr "Aj&uda" msgid "&Documentation..." msgstr "&Documentação..." @@ -348,6 +360,9 @@ msgstr "Máquina:" msgid "Configure" msgstr "Configurar" +msgid "CPU:" +msgstr "" + msgid "CPU type:" msgstr "Tipo do CPU:" @@ -384,6 +399,15 @@ msgstr "Ativada (UTC)" msgid "Dynamic Recompiler" msgstr "Recompilador dinâmico" +msgid "CPU frame size" +msgstr "Tamanho de blocos do CPU" + +msgid "Larger frames (less smooth)" +msgstr "Blocos mais grandes (menos suave)" + +msgid "Smaller frames (smoother)" +msgstr "Blocos mais pequenos (mais suave)" + msgid "Video:" msgstr "Vídeo:" @@ -399,12 +423,27 @@ msgstr "Gráficos IBM 8514/A" msgid "XGA Graphics" msgstr "Gráficos XGA" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "Adaptador de apresentação gráfica IBM PS/55" + +msgid "Keyboard:" +msgstr "Teclado:" + +msgid "Keyboard" +msgstr "Teclado" + msgid "Mouse:" msgstr "Rato:" +msgid "Mouse" +msgstr "Rato" + msgid "Joystick:" msgstr "Joystick:" +msgid "Joystick" +msgstr "Joystick" + msgid "Joystick 1..." msgstr "Joystick 1..." @@ -435,6 +474,9 @@ msgstr "Disp. saída MIDI:" msgid "MIDI In Device:" msgstr "Disp. entrada MIDI:" +msgid "MIDI Out:" +msgstr "Saída MIDI:" + msgid "Standalone MPU-401" msgstr "MPU-401 autónomo" @@ -474,6 +516,9 @@ msgstr "Dispositivo LPT3:" msgid "LPT4 Device:" msgstr "Dispositivo LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "DMA do ECP do LPT interno:" + msgid "Serial port 1" msgstr "Porta de série 1" @@ -498,18 +543,21 @@ msgstr "Porta paralela 3" msgid "Parallel port 4" msgstr "Porta paralela 4" -msgid "HD Controller:" -msgstr "Controlador HD:" - msgid "FD Controller:" msgstr "Controlador FD:" +msgid "CD-ROM Controller:" +msgstr "Controlador CD-ROM:" + msgid "Tertiary IDE Controller" msgstr "Controlador IDE terciário" msgid "Quaternary IDE Controller" msgstr "Controlador IDE quaternário" +msgid "Hard disk" +msgstr "Disco rígido" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "Cassete" msgid "Hard disks:" msgstr "Discos rígidos:" +msgid "Firmware Version" +msgstr "Versão de firmware" + msgid "&New..." msgstr "&Novo..." @@ -588,8 +639,14 @@ msgstr "Unidades CD-ROM:" msgid "MO drives:" msgstr "Unidades magneto-ópticas:" -msgid "ZIP drives:" -msgstr "Unidades ZIP:" +msgid "MO:" +msgstr "Magneto-ópticos:" + +msgid "Removable disks:" +msgstr "Discos amovíveis:" + +msgid "Removable disk drives:" +msgstr "Unidades de disco amovível:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "ISA RTC:" msgid "ISA Memory Expansion" msgstr "Expansão de memória ISA" +msgid "ISA ROM Cards" +msgstr "Placas ROM ISA" + msgid "Card 1:" msgstr "Placa 1:" @@ -612,6 +672,15 @@ msgstr "Placa 3:" msgid "Card 4:" msgstr "Placa 4:" +msgid "Generic ISA ROM Board" +msgstr "Placa ROM ISA genérica" + +msgid "Generic Dual ISA ROM Board" +msgstr "Placa ROM ISA dual genérica" + +msgid "Generic Quad ISA ROM Board" +msgstr "Placa ROM ISA quad genérica" + msgid "ISABugger device" msgstr "Dispositivo ISABugger" @@ -633,14 +702,20 @@ msgstr " - EM PAUSA" msgid "Speed" msgstr "Velocidade" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Disco amovível %1 (%2): %3" -msgid "ZIP images" -msgstr "Imagens ZIP" +msgid "&Removable disk %1 (%2): %3" +msgstr "&Disco amovível %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Imagens de disco amovível" + +msgid "Image %1" +msgstr "Imagem %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." -msgstr "O 86Box não conseguiu encontrar nenhuma imagem ROM utilizável.\n\nPor favor, vá a href=\"https://github.com/86Box/roms/releases/latest\">descarregue um pacote ROM e instale-o na pasta \"roms\"." +msgstr "O 86Box não conseguiu encontrar nenhuma imagem ROM utilizável.\n\nPor favor, vá a descarregue um pacote ROM e instale-o na pasta \"roms\"." msgid "(empty)" msgstr "(empty)" @@ -696,12 +771,30 @@ msgstr "Rede" msgid "Ports (COM & LPT)" msgstr "Portas (COM e LPT)" +msgid "Ports" +msgstr "Portas" + +msgid "Serial ports:" +msgstr "Portas série:" + +msgid "Parallel ports:" +msgstr "Portas paralelas:" + msgid "Storage controllers" msgstr "Dispositivos de armazenamento" msgid "Hard disks" msgstr "Discos rígidos" +msgid "Disks:" +msgstr "Discos:" + +msgid "Floppy:" +msgstr "Disquete:" + +msgid "Controllers:" +msgstr "Controladores:" + msgid "Floppy & CD-ROM drives" msgstr "Unidades de disquete e CD-ROM" @@ -711,6 +804,9 @@ msgstr "Outros dispostivos removíveis" msgid "Other peripherals" msgstr "Outros dispositivos" +msgid "Other devices" +msgstr "Outros dispositivos" + msgid "Click to capture mouse" msgstr "Clique para capturar o rato" @@ -777,12 +873,39 @@ msgstr "Joystick de 4 eixos, 4 botões" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Pedals" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Thrustmaster Flight Control System" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Rudder Control System" + +msgid "2-button gamepad(s)" +msgstr "Manípulo(s) de jogos de 2 botões" + +msgid "2-button flight yoke" +msgstr "Manípulo de voo de 2 botões" + +msgid "4-button gamepad" +msgstr "Manípulo(s) de jogos de 4 botões" + +msgid "4-button flight yoke" +msgstr "Manípulo de voo de 4 botões" + +msgid "2-button flight yoke with throttle" +msgstr "Manípulo de voo de 2 botões com acelerador" + +msgid "4-button flight yoke with throttle" +msgstr "Manípulo de voo de 4 botões com acelerador" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Volante Win95 (de 3 eixos, 4 botões)" + msgid "None" msgstr "Nenhum" @@ -792,6 +915,9 @@ msgstr "%1 MB (CCS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Disquete %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Disquete %1 (%2): %3" + msgid "Advanced sector images" msgstr "Imagens avançadas de sector" @@ -813,6 +939,9 @@ msgstr "Não foi possível inicializar o GhostPCL" msgid "MO %1 (%2): %3" msgstr "Magneto-óptico %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&Magneto-óptico %1 (%2): %3" + msgid "MO images" msgstr "Imagens magneto-ópticas" @@ -822,6 +951,15 @@ msgstr "Bem-vindos ao 86Box!" msgid "Internal device" msgstr "Dispositivo integrado" +msgid "&File" +msgstr "&Ficheiro" + +msgid "&New machine..." +msgstr "&Nova máquina" + +msgid "&Check for updates..." +msgstr "&Verificar para atualizações..." + msgid "Exit" msgstr "Sair" @@ -897,12 +1035,18 @@ msgstr "Continuar" msgid "Cassette: %1" msgstr "Cassete: %1" +msgid "C&assette: %1" +msgstr "C&assete: %1" + msgid "Cassette images" msgstr "Imagens de cassete" msgid "Cartridge %1: %2" msgstr "Cartucho %1: %2" +msgid "Car&tridge %1: %2" +msgstr "Car&tucho %1: %2" + msgid "Cartridge images" msgstr "Imagens de cartucho" @@ -912,6 +1056,9 @@ msgstr "Retomar execução" msgid "Pause execution" msgstr "Pausar execução" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Ctrl+Alt+Del" @@ -921,9 +1068,279 @@ msgstr "Ctrl+Alt+Esc" msgid "Hard reset" msgstr "Reinicialização completa" +msgid "Force shutdown" +msgstr "Desligamento forçado" + +msgid "Start" +msgstr "Iniciar" + +msgid "Not running" +msgstr "Não em execução" + +msgid "Running" +msgstr "Em execução" + +msgid "Paused" +msgstr "Em pausa" + +msgid "Waiting" +msgstr "Em espera" + +msgid "Powered Off" +msgstr "Desligado" + +msgid "%n running" +msgstr "%n em execução" + +msgid "%n paused" +msgstr "%n em pausa" + +msgid "%n waiting" +msgstr "%n em espera" + +msgid "%1 total" +msgstr "%1 total" + +msgid "VMs: %1" +msgstr "MVs: %1" + +msgid "System Directory:" +msgstr "Directório de sistema:" + +msgid "Choose directory" +msgstr "Escolher directório" + +msgid "Choose configuration file" +msgstr "Escolher ficheiro de configuração" + +msgid "86Box configuration files (86box.cfg)" +msgstr "Ficheiros de configuração do 86Box (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Falha na leitura da configuração" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Não foi possível abrir o ficheir de configurção seleccionado para leitura: %1" + +msgid "Use regular expressions in search box" +msgstr "Usa expressões regulares na caixa de procura" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 máquina(s) estão actualmente activas. Quer mesmo sair do gerenciador de MVs" + +msgid "Add new system wizard" +msgstr "Assistende de adicionamento do novo sistema" + +msgid "Introduction" +msgstr "Introdução" + +msgid "This will help you add a new system to 86Box." +msgstr "Esto ajudará-lhe a adicinar um novo sistema ao 86Box." + +msgid "New configuration" +msgstr "Nova configuração" + +msgid "Complete" +msgstr "Completar" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "Este assistente agora vai abrir as definições do novo sistema." + +msgid "Use existing configuration" +msgstr "Utilizar configuração existente" + +msgid "Type some notes here" +msgstr "Escreve algumas notas aqui" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Colar o conteúdo do firecheiro da configuração existente na caixa em baixo." + +msgid "Load configuration from file" +msgstr "Carregar configuração a partir do ficheiro" + +msgid "System name" +msgstr "Nome do sistema" + +msgid "System name:" +msgstr "Nome do sistema:" + +msgid "System name cannot contain certain characters" +msgstr "O nome do sistem não pode conter alguns caracteres" + +msgid "System name already exists" +msgstr "O nome do sistema já existe" + +msgid "Please enter a directory for the system" +msgstr "Por favor entre o directório para o sistema" + +msgid "Directory does not exist" +msgstr "O directório não existe" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "O novo directório para o sistema será criado no directorio selecciado em cima" + +msgid "System location:" +msgstr "Localização do sistema:" + +msgid "System name and location" +msgstr "Nome e localização do sistema" + +msgid "Enter the name of the system and choose the location" +msgstr "Escreve o nome do sistema e escolha a localização" + +msgid "Enter the name of the system" +msgstr "Escreve o nome do sistema" + +msgid "Please enter a system name" +msgstr "Por favor, escreve o nome do sistema" + +msgid "Display name (optional):" +msgstr "Nome apresentado (opcional):" + +msgid "Display name:" +msgstr "Nome apresentado:" + +msgid "Set display name" +msgstr "Definir o nome apresentado" + +msgid "Enter the new display name (blank to reset)" +msgstr "Escreve o nome apresentado (vazio para repor)" + +msgid "Change &display name..." +msgstr "Alterar o nome &apresentado..." + +msgid "Context Menu" +msgstr "Menu de contexto" + +msgid "&Open folder..." +msgstr "&Abrir pasta..." + +msgid "Open p&rinter tray..." +msgstr "Abrir &bandeja de impressora..." + +msgid "Set &icon..." +msgstr "Definir &ícone..." + +msgid "Select an icon" +msgstr "Seleccionar um ícone" + +msgid "C&lone..." +msgstr "C&lonar..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "A máquina virtual \"%1\" (%2) será clonada para:" + +msgid "Directory %1 already exists" +msgstr "O directório %1 já existe" + +msgid "You cannot use the following characters in the name: %1" +msgstr "Não pode usar os caracteres seguintes no nome: %1" + +msgid "Clone" +msgstr "Clonar" + +msgid "Failed to create directory for cloned VM" +msgstr "Falha na criação do directório para a MV clonada" + +msgid "Failed to clone VM." +msgstr "Falha na clonaçào da MV." + +msgid "Directory in use" +msgstr "Directório em uso" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "O directório seleccionado já está em uso. Por favor, escolhe um directório differente." + +msgid "Create directory failed" +msgstr "Falha na criação do directório" + +msgid "Unable to create the directory for the new system" +msgstr "Não foi possível criar a pasta para o novo sistema" + +msgid "Configuration write failed" +msgstr "Falha na escritura da configuração" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Não foi possível abrir o ficheiro de configuração em %1 para a escritura" + +msgid "Error adding system" +msgstr "Error ao adicionar o sistema" + +msgid "Remove directory failed" +msgstr "Falha na remoção do directório" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Não foi possível eliminar alguns ficheiros no directório da máquina. Por favor, elimene-las manualmente." + +msgid "Build" +msgstr "Compilação" + +msgid "Version" +msgstr "Versão" + +msgid "An update to 86Box is available: %1 %2" +msgstr "Está disponível uma atualização pelo 86Box: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Ha occurrido um error na verificação das atualizações: %1" + +msgid "An update to 86Box is available!" +msgstr "É disponível uma atualização para o 86Box!" + +msgid "Warning" +msgstr "Aviso" + +msgid "&Kill" +msgstr "&Terminar" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Terminar uma máquina virtual pode causar a perdida de dados. Faça-o só se o processo 86Box bloqueia-se.\n\nTem cerza que quiser terminal a máquina virtual \"%1\"?" + +msgid "&Delete" +msgstr "&Apagar" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Tem certeza de que quiser apagar a máquina virtual \"%1\" e todos os seus ficheiros? Esta ação não pode ser desfeita!" + +msgid "Show &config file" +msgstr "Mostrar ficheiro de &configuração" + +msgid "No screenshot" +msgstr "Sem capturas de ecrã" + +msgid "Search" +msgstr "Procurar" + +msgid "Searching for VMs..." +msgstr "A procurar para MVs..." + +msgid "Found %1" +msgstr "%1 encontrado" + +msgid "System" +msgstr "Sistema" + +msgid "Storage" +msgstr "Armazenamento" + +msgid "Disk %1: " +msgstr "Disco %1: " + +msgid "No disks" +msgstr "Sem discos" + +msgid "Audio" +msgstr "Som" + +msgid "Audio:" +msgstr "Som:" + msgid "ACPI shutdown" msgstr "Encerramento ACPI" +msgid "ACP&I shutdown" +msgstr "Encerramento ACP&I" + msgid "Hard disk (%1)" msgstr "Disco rígido (%1)" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 KB" @@ -1180,7 +1600,7 @@ msgid "Fast" msgstr "Rápido" msgid "&Auto-pause on focus loss" -msgstr "Pausa &automática na perda de focagem" +msgstr "Pa&usa automática na perda de focagem" msgid "WinBox is no longer supported" msgstr "O WinBox não é mais suportado" @@ -1209,41 +1629,38 @@ msgstr "Dispositivos MCA" msgid "List of MCA devices:" msgstr "Lista de dispositivos MCA:" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Ferramenta para tablet" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "Acerca do &Qt" -msgid "About Qt" -msgstr "Acerca do Qt" - -msgid "MCA devices..." +msgid "&MCA devices..." msgstr "Dispositivos MCA..." -msgid "Show non-primary monitors" -msgstr "Mostrar monitores não primários" +msgid "Show non-&primary monitors" +msgstr "Mostrar monitores não &primários" -msgid "Open screenshots folder..." -msgstr "Abrir a pasta de capturas de ecrã..." +msgid "Open screenshots &folder..." +msgstr "Abrir a pas&ta de capturas de ecrã..." -msgid "Apply fullscreen stretch mode when maximized" -msgstr "Aplicar o modo de estiramento na tela cheia quando maximizado" +msgid "Appl&y fullscreen stretch mode when maximized" +msgstr "Apl&icar o modo de estiramento na tela cheia quando maximizado" -msgid "Cursor/Puck" -msgstr "Cursor/Puck" +msgid "&Cursor/Puck" +msgstr "&Cursor/Puck" -msgid "Pen" -msgstr "Caneta" +msgid "&Pen" +msgstr "C&aneta" -msgid "Host CD/DVD Drive (%1:)" -msgstr "Unidade de CD/DVD do anfitrião (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "&Unidade de CD/DVD do anfitrião (%1:)" msgid "&Connected" msgstr "&Conectado" -msgid "Clear image history" -msgstr "Limpar o histórico de imagens" +msgid "Clear image &history" +msgstr "Limpar o histórico de imagens(&H)" msgid "Create..." msgstr "Criar..." @@ -1257,9 +1674,15 @@ msgstr "Autocarro desconhecido" msgid "Null Driver" msgstr "Condutor nulo" +msgid "NIC:" +msgstr "Placa de rede:" + msgid "NIC %1 (%2) %3" msgstr "NIC %1 (%2) %3" +msgid "&NIC %1 (%2) %3" +msgstr "&NIC %1 (%2) %3" + msgid "Render behavior" msgstr "Comportamento de renderização" @@ -1323,6 +1746,9 @@ msgstr "Não há dispositivos MCA." msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" msgstr "Placa de rede 1" @@ -1365,30 +1791,60 @@ msgstr "Passagem da porta de série 3" msgid "Serial port passthrough 4" msgstr "Passagem da porta de série 4" -msgid "Renderer options..." -msgstr "Opções do renderizador..." +msgid "Renderer &options..." +msgstr "Opções do re&nderizador..." + +msgid "PC/XT Keyboard" +msgstr "Teclado PC/XT" + +msgid "AT Keyboard" +msgstr "Teclado AT" + +msgid "AX Keyboard" +msgstr "Teclado AX" + +msgid "PS/2 Keyboard" +msgstr "Teclado PS/2" + +msgid "PS/55 Keyboard" +msgstr "Teclado PS/55" + +msgid "Keys" +msgstr "Teclas" msgid "Logitech/Microsoft Bus Mouse" -msgstr "Rato Logitech/Microsoft Bus" +msgstr "Rato bus Logitech/Microsoft" msgid "Microsoft Bus Mouse (InPort)" -msgstr "Rato Microsoft Bus (InPort)" +msgstr "Rato bus Microsoft (InPort)" msgid "Mouse Systems Serial Mouse" -msgstr "Sistemas de ratos Rato de série" +msgstr "Rato de série Mouse Systems" + +msgid "Mouse Systems Bus Mouse" +msgstr "Rato bus Mouse Systems" msgid "Microsoft Serial Mouse" msgstr "Rato de série Microsoft" +msgid "Microsoft Serial BallPoint" +msgstr "Rato de série Microsoft BallPoint" + msgid "Logitech Serial Mouse" msgstr "Rato de série Logitech" msgid "PS/2 Mouse" msgstr "Rato PS/2" +msgid "PS/2 QuickPort Mouse" +msgstr "Rato PS/2 QuickPort" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (série)" +msgid "Default Baud rate" +msgstr "Velocidade de transmissão padrão" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Modem padrão compatível com Hayes" @@ -1413,21 +1869,81 @@ msgstr "Sistema MIDI" msgid "MIDI Input Device" msgstr "Dispositivo de entrada MIDI" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "Ficheiro BIOS" + +msgid "BIOS file (ROM #1)" +msgstr "Ficheiro BIOS (ROM no. 1)" + +msgid "BIOS file (ROM #2)" +msgstr "Ficheiro BIOS (ROM no. 2)" + +msgid "BIOS file (ROM #3)" +msgstr "Ficheiro BIOS (ROM no. 3)" + +msgid "BIOS file (ROM #4)" +msgstr "Ficheiro BIOS (ROM no. 4)" + +msgid "BIOS address" msgstr "Endereço da BIOS" +msgid "BIOS address (ROM #1)" +msgstr "Endereço da BIOS (ROM no. 1)" + +msgid "BIOS address (ROM #2)" +msgstr "Endereço da BIOS (ROM no. 2)" + +msgid "BIOS address (ROM #3)" +msgstr "Endereço da BIOS (ROM no. 3)" + +msgid "BIOS address (ROM #4)" +msgstr "Endereço da BIOS (ROM no. 4)" + msgid "Enable BIOS extension ROM Writes" msgstr "Ativar as escritas de ROM de extensão da BIOS" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "Ativar as escritas de ROM de extensão da BIOS (ROM no. 1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "Ativar as escritas de ROM de extensão da BIOS (ROM no. 2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "Ativar as escritas de ROM de extensão da BIOS (ROM no. 3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "Ativar as escritas de ROM de extensão da BIOS (ROM no. 4)" + +msgid "Linear framebuffer base" +msgstr "Base do buffer de quadros linear" + msgid "Address" msgstr "Endereço" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "IRQ da porta série" + +msgid "Parallel port IRQ" +msgstr "IRQ da porta paralela" + msgid "BIOS Revision" msgstr "Revisão da BIOS" +msgid "BIOS Version" +msgstr "Versão da BIOS" + +msgid "BIOS Language" +msgstr "Idioma da BIOS" + +msgid "IBM 5161 Expansion Unit" +msgstr "Unidade de expansão IBM 5161" + +msgid "IBM Cassette Basic" +msgstr "BASIC de cassete IBM" + msgid "Translate 26 -> 17" msgstr "Traduzir 26 -> 17" @@ -1443,6 +1959,18 @@ msgstr "Inverter cores" msgid "BIOS size" msgstr "Tamanho da BIOS" +msgid "BIOS size (ROM #1)" +msgstr "Tamanho da BIOS (ROM no. 1)" + +msgid "BIOS size (ROM #2)" +msgstr "Tamanho da BIOS (ROM no. 2)" + +msgid "BIOS size (ROM #3)" +msgstr "Tamanho da BIOS (ROM no. 3)" + +msgid "BIOS size (ROM #4)" +msgstr "Tamanho da BIOS (ROM no. 4)" + msgid "Map C0000-C7FFF as UMB" msgstr "Mapear C0000-C7FFF como UMB" @@ -1518,6 +2046,9 @@ msgstr "Nível de reverberação" msgid "Interpolation Method" msgstr "Método de interpolação" +msgid "Dynamic Sample Loading" +msgstr "Carregamento dinámico de amostras" + msgid "Reverb Output Gain" msgstr "Ganho da saída do reverb" @@ -1605,6 +2136,12 @@ msgstr "DMA baixo" msgid "Enable Game port" msgstr "Ativar a porta de jogos" +msgid "SID Model" +msgstr "Modelo do SID" + +msgid "SID Filter Strength" +msgstr "Força do filtro do SID" + msgid "Surround module" msgstr "Módulo Surround" @@ -1617,6 +2154,12 @@ msgstr "Ativar a interrupção do CODEC na configuração do CODEC (necessário msgid "SB Address" msgstr "Endereço SB" +msgid "Adlib Address" +msgstr "Endereço Adlib" + +msgid "Use EEPROM setting" +msgstr "Utilizar a definição da EEPROM" + msgid "WSS IRQ" msgstr "WSS IRQ" @@ -1669,7 +2212,7 @@ msgid "Display type" msgstr "Tipo de ecrã" msgid "Composite type" -msgstr "Tipo composto" +msgstr "Tipo compósito" msgid "RGB type" msgstr "Tipo RGB" @@ -1701,9 +2244,15 @@ msgstr "Tipo de RAMDAC" msgid "Blend" msgstr "Mistura" +msgid "Font" +msgstr "Tipo de letra" + msgid "Bilinear filtering" msgstr "Filtragem bilinear" +msgid "Video chroma-keying" +msgstr "Utilizar a chave chroma do vídeo" + msgid "Dithering" msgstr "Dithering" @@ -1746,6 +2295,33 @@ msgstr "Velocidade de transferência" msgid "EMS mode" msgstr "Modo EMS" +msgid "EMS Address" +msgstr "Endereço da EMS" + +msgid "EMS 1 Address" +msgstr "Endereço da EMS 1" + +msgid "EMS 2 Address" +msgstr "Endereço da EMS 2" + +msgid "EMS Memory Size" +msgstr "Tamanho da memória EMS" + +msgid "EMS 1 Memory Size" +msgstr "Tamanho da memória EMS 1" + +msgid "EMS 2 Memory Size" +msgstr "Tamanho da memória EMS 2" + +msgid "Enable EMS" +msgstr "Activar a EMS" + +msgid "Enable EMS 1" +msgstr "Activar a EMS 1" + +msgid "Enable EMS 2" +msgstr "Activar a EMS 2" + msgid "Address for > 2 MB" msgstr "Endereço para > 2 MB" @@ -1764,11 +2340,11 @@ msgstr "Sempre à velocidade selecionada" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "Definição da BIOS + Teclas de atalho (desligadas durante o POST)" -msgid "64 kB starting from F0000" -msgstr "64 kB a partir de F0000" +msgid "64 KB starting from F0000" +msgstr "64 KB a partir de F0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB a partir de E0000 (endereço MSB invertido, os últimos 64KB primeiro)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KB a partir de E0000 (endereço MSB invertido, os últimos 64 KB primeiro)" msgid "Sine" msgstr "Sinusoidal" @@ -1804,7 +2380,7 @@ msgid "Five + Wheel" msgstr "Cinco + Roda" msgid "Five + 2 Wheels" -msgstr "" +msgstr "Cinco + 2 Rodas" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 série / SMT3(R)V" @@ -1869,6 +2445,9 @@ msgstr "256 KB" msgid "Composite" msgstr "Compósito" +msgid "True color" +msgstr "Cor verdadeira" + msgid "Old" msgstr "Antigo" @@ -1902,6 +2481,15 @@ msgstr "interpolação sRGB" msgid "Linear interpolation" msgstr "Interpolação linear" +msgid "Has secondary 8x8 character set" +msgstr "Tem conjunto de caracters 8x8 secundário" + +msgid "Has Quadcolor II daughter board" +msgstr "Tem a placa filha Quadcolor II" + +msgid "Alternate monochrome contrast" +msgstr "Contrasto monocromático alternativo" + msgid "128 KB" msgstr "128 KB" @@ -1935,6 +2523,9 @@ msgstr "Âmbar" msgid "Gray" msgstr "Cinzento" +msgid "Grayscale" +msgstr "Escala de cinzentos" + msgid "Color" msgstr "Cor" @@ -1950,6 +2541,12 @@ msgstr "Outros idiomas" msgid "Bochs latest" msgstr "Bochs mais recente" +msgid "Apply overscan deltas" +msgstr "Aplicr deltas do overscan" + +msgid "Mono Interlaced" +msgstr "Monocromático entrelaçado" + msgid "Mono Non-Interlaced" msgstr "Monocromático não entrelaçado" @@ -1962,6 +2559,9 @@ msgstr "Cor não entrelaçado" msgid "3Dfx Voodoo Graphics" msgstr "Gráficos 3Dfx Voodoo" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 unidades TMU)" @@ -2031,6 +2631,9 @@ msgstr "Taxa de transmissão de passagem" msgid "Named Pipe (Server)" msgstr "Tubo nomeado (servidor)" +msgid "Named Pipe (Client)" +msgstr "Tubo nomeado (cliente)" + msgid "Host Serial Passthrough" msgstr "Passagem da porta de série do anfitrião" @@ -2047,28 +2650,28 @@ msgid "High performance impact" msgstr "Elevado impacto no desempenho" msgid "[Generic] RAM Disk (max. speed)" -msgstr "[Generic] Disco RAM (velocidade máxima)" +msgstr "[Genérico] Disco RAM (velocidade máxima)" msgid "[Generic] 1989 (3500 RPM)" -msgstr "" +msgstr "[Genérico] 1989 (3500 RPM)" msgid "[Generic] 1992 (3600 RPM)" -msgstr "" +msgstr "[Genérico] 1992 (3600 RPM)" msgid "[Generic] 1994 (4500 RPM)" -msgstr "" +msgstr "[Genérico] 1994 (4500 RPM)" msgid "[Generic] 1996 (5400 RPM)" -msgstr "" +msgstr "[Genérico] 1996 (5400 RPM)" msgid "[Generic] 1997 (5400 RPM)" -msgstr "" +msgstr "[Genérico] 1997 (5400 RPM)" msgid "[Generic] 1998 (5400 RPM)" -msgstr "" +msgstr "[Genérico] 1998 (5400 RPM)" msgid "[Generic] 2000 (7200 RPM)" -msgstr "" +msgstr "[Genérico] 2000 (7200 RPM)" msgid "IBM 8514/A clone (ISA)" msgstr "Clone IBM 8514/A (ISA)" @@ -2076,6 +2679,12 @@ msgstr "Clone IBM 8514/A (ISA)" msgid "Vendor" msgstr "Fabricante" +msgid "30 Hz (JMP2 = 1)" +msgstr "30 Hz (JMP2 = 1)" + +msgid "60 Hz (JMP2 = 2)" +msgstr "60 Hz (JMP2 = 2)" + msgid "Generic PC/XT Memory Expansion" msgstr "Expansão de memória genérica PC/XT" @@ -2089,61 +2698,259 @@ msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for t msgstr "As fontes TrueType no diretório \"roms/printer/fonts\" são necessárias para a emulação da impressora matricial de pontos ESC/P genérica" msgid "Inhibit multimedia keys" -msgstr "" +msgstr "Deshabilitar teclas de multimídia" msgid "Ask for confirmation before saving settings" -msgstr "" +msgstr "Pedir confirmação antes de salvar as definições" msgid "Ask for confirmation before hard resetting" -msgstr "" +msgstr "Pedir confirmação antes da reinicialização completa" msgid "Ask for confirmation before quitting" -msgstr "" +msgstr "Pedir confirmação antes de sair" msgid "Options" -msgstr "" +msgstr "Opções" msgid "Model" -msgstr "" +msgstr "Modelo" msgid "Model:" -msgstr "" +msgstr "Modelo:" msgid "Failed to initialize Vulkan renderer." -msgstr "" +msgstr "Falha na inicialização do renderizador Vulkan." msgid "GLSL Error" -msgstr "" +msgstr "Erro de GLSL" msgid "Could not load shader: %1" -msgstr "" +msgstr "Não foi possível carregar o shader: %1" msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" -msgstr "" +msgstr "É requerida a versão 3.0 ou mais nova do OpenGL. A versão actual de GLSL é %1.%2" msgid "Could not load texture: %1" -msgstr "" +msgstr "Não foi possível carregar a textura: %1" msgid "Could not compile shader:\n\n%1" -msgstr "" +msgstr "Não foi possível compilar o shader:\n\n%1" msgid "Program not linked:\n\n%1" -msgstr "" +msgstr "Programa não ligado:\n\n%1" msgid "Shader Manager" -msgstr "" +msgstr "Gerenciador de shaders" msgid "Shader Configuration" -msgstr "" +msgstr "Configuração do shader" msgid "Add" -msgstr "" +msgstr "Adicionar" msgid "Move up" -msgstr "" +msgstr "Mover para cima" msgid "Move down" -msgstr "" +msgstr "Mover para baixo" msgid "Could not load file %1" -msgstr "" +msgstr "Não foi possível carregar o ficheiro %1" + +msgid "Key Bindings:" +msgstr "Teclas de atalho:" + +msgid "Action" +msgstr "Ação" + +msgid "Keybind" +msgstr "Atalho" + +msgid "Clear binding" +msgstr "Limpar atalho" + +msgid "Bind" +msgstr "Definir" + +msgid "Bind Key" +msgstr "Definir tecla" + +msgid "Enter key combo:" +msgstr "Escrever a combinação de teclas:" + +msgid "Bind conflict" +msgstr "Conflicto entre atalhos" + +msgid "This key combo is already in use." +msgstr "Esta combinação de teclas já está em uso." + +msgid "Send Control+Alt+Del" +msgstr "Enviar Control+Alt+Del" + +msgid "Send Control+Alt+Escape" +msgstr "Enviar Control+Alt+Escape" + +msgid "Toggle fullscreen" +msgstr "Alternar o modo em ecrã cheio" + +msgid "Screenshot" +msgstr "Captura de ecrã" + +msgid "Release mouse pointer" +msgstr "Soltar o ponteiro do rato" + +msgid "Toggle pause" +msgstr "Alternar a pausa" + +msgid "Toggle mute" +msgstr "Alternar o estado silenciado" + +msgid "Text files" +msgstr "Ficheiros de texto" + +msgid "ROM files" +msgstr "Ficheiros da ROM" + +msgid "SoundFont files" +msgstr "Ficheiros SoundFont" + +msgid "Local Switch" +msgstr "Comutador local" + +msgid "Remote Switch" +msgstr "Comutador remoto" + +msgid "Switch:" +msgstr "Comutador" + +msgid "Hub Mode" +msgstr "Modo de concentrador" + +msgid "Hostname:" +msgstr "Nome de anfitrião:" + +msgid "ISA RAM:" +msgstr "RAM ISA:" + +msgid "ISA ROM:" +msgstr "ROM ISA:" + +msgid "&Wipe NVRAM" +msgstr "&Limpar a NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Esto vai apagar todos of ficheirosa da NVRAM (e relacionados) da máquina virtual localizados no subdirectório \"nvr\". Terá que reconfigurar as definições da BIOS (e possívelmente dos outros dispositivos na MV) de novo se aplicável.\n\nTem certeza de que quiser limpar todos os conteúdos da NVRAM da máquina virtual \"%1\"?" + +msgid "Success" +msgstr "Éxito" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Os conteúdos da NVRAM da máquina virtual \"%1\" foram limpados com éxito" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Occorreu um error na tentativa de limpar os conteúdos da NVRAM da máquina virtual \"%1\"" + +msgid "%1 VM Manager" +msgstr "Gerenciador de MVs de %1" + +msgid "%n disk(s)" +msgstr "%n disco(s)" + +msgid "Unknown Status" +msgstr "Estado desconhecido" + +msgid "No Machines Found!" +msgstr "Nenhuma máquina encontrada!" + +msgid "Check for updates on startup" +msgstr "Verificar para atualizações ao iniciar" + +msgid "Unable to determine release information" +msgstr "Não foi possível determinar as informações da versão" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Occorreu um error na verificação para atualizações:\n\n%1\n\nPor favor, entente de novo mais tarde." + +msgid "Update check complete" +msgstr "Verificaçõ para atualizacões completeda" + +msgid "stable" +msgstr "estável" + +msgid "beta" +msgstr "beta" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Está a utilizar a última versão %1 do 86Box: %2" + +msgid "version" +msgstr "versão" + +msgid "build" +msgstr "compilação" + +msgid "You are currently running version %1." +msgstr "Atualmente está a utilizar a versão %1." + +msgid "Version %1 is now available." +msgstr "A versão %1 está agora disponível." + +msgid "You are currently running build %1." +msgstr "Atualmente está a utilizar a compilação %1." + +msgid "Build %1 is now available." +msgstr "A compilação %1 está agora disponível." + +msgid "Would you like to visit the download page?" +msgstr "Quiser visitar a pagina de transferências?" + +msgid "Visit download page" +msgstr "Visitar a pagina de transferências" + +msgid "Update check" +msgstr "Verificar atualizações" + +msgid "Checking for updates..." +msgstr "A verificar para atualizações..." + +msgid "86Box Update" +msgstr "Atualização do 86Box" + +msgid "Release notes:" +msgstr "Notas da versão:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Falecimento da máquina virtual" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "O processo da máquina virtual \"%1\" terminou inesperadamente com o código de saída %2." + +msgid "The system will not be added." +msgstr "O sistema não será adicionado." + +msgid "&Update mouse every CPU frame" +msgstr "&Atualiza o estado do rato em cada bloco do CPU" + +msgid "Hue" +msgstr "Matiz" + +msgid "Saturation" +msgstr "Saturação" + +msgid "Contrast" +msgstr "Contraste" + +msgid "Brightness" +msgstr "Brilho" + +msgid "Sharpness" +msgstr "Nitidez" + +msgid "&CGA composite settings..." +msgstr "Definições do modo compósito &CGA..." + +msgid "CGA composite settings" +msgstr "Definições do modo compósito CGA" diff --git a/src/qt/languages/ru-RU.po b/src/qt/languages/ru-RU.po index fe961cc60..9b9d3756f 100644 --- a/src/qt/languages/ru-RU.po +++ b/src/qt/languages/ru-RU.po @@ -27,8 +27,14 @@ msgstr "Ctrl+Alt+&Esc" msgid "&Pause" msgstr "&Пауза" -msgid "E&xit..." -msgstr "&Выход..." +msgid "Pause" +msgstr "Пауза" + +msgid "Re&sume" +msgstr "В&озобновить" + +msgid "E&xit" +msgstr "&Выход" msgid "&View" msgstr "&Вид" @@ -51,20 +57,17 @@ msgstr "&Рендеринг" msgid "&Qt (Software)" msgstr "&Qt (Software)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" msgstr "Open&GL (3.0 Core)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." +msgid "Specify &dimensions..." msgstr "&Указать размеры главного окна..." -msgid "F&orce 4:3 display ratio" -msgstr "У&становить соотношение сторон 4:3" +msgid "Force &4:3 display ratio" +msgstr "Установить соотношение сторон &4:3" msgid "&Window scale factor" msgstr "&Масштаб окна" @@ -99,8 +102,8 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" -msgstr "Метод фильтрации" +msgid "Fi<er method" +msgstr "Метод &фильтрации" msgid "&Nearest" msgstr "&Ближайший" @@ -132,8 +135,8 @@ msgstr "&Целочисленное масштабирование" msgid "4:&3 Integer scale" msgstr "4:&3 Целочисленное масштабирование" -msgid "E&GA/(S)VGA settings" -msgstr "Настройки E&GA/(S)VGA" +msgid "EGA/(S)&VGA settings" +msgstr "Настройки EGA/(S)&VGA" msgid "&Inverted VGA monitor" msgstr "&Инвертировать цвета VGA" @@ -144,12 +147,12 @@ msgstr "&Тип экрана VGA" msgid "RGB &Color" msgstr "RGB &цветной" -msgid "&RGB Grayscale" -msgstr "&RGB монохромный" - msgid "RGB (no brown)" msgstr "RGB (без коричневого)" +msgid "&RGB Grayscale" +msgstr "&RGB монохромный" + msgid "Generic RGBI color monitor" msgstr "Стандартный цветной монитор RGBI" @@ -189,6 +192,9 @@ msgstr "&Инструменты" msgid "&Settings..." msgstr "&Настройки машины..." +msgid "Settings..." +msgstr "Настройки машины..." + msgid "&Update status bar icons" msgstr "&Обновление значков строки состояния" @@ -214,7 +220,7 @@ msgid "End trace" msgstr "Завершить трассировку" msgid "&Help" -msgstr "&Помощь" +msgstr "&Справка" msgid "&Documentation..." msgstr "&Документация..." @@ -354,6 +360,9 @@ msgstr "Системная плата:" msgid "Configure" msgstr "Настройка" +msgid "CPU:" +msgstr "ЦП:" + msgid "CPU type:" msgstr "Тип ЦП:" @@ -414,12 +423,27 @@ msgstr "Ускоритель IBM 8514/A" msgid "XGA Graphics" msgstr "Ускоритель XGA" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "IBM PS/55 Display Adapter Graphics" + +msgid "Keyboard:" +msgstr "Клавиатура:" + +msgid "Keyboard" +msgstr "Клавиатура" + msgid "Mouse:" msgstr "Мышь:" +msgid "Mouse" +msgstr "Мышь" + msgid "Joystick:" msgstr "Джойстик:" +msgid "Joystick" +msgstr "Джойстик" + msgid "Joystick 1..." msgstr "Джойстик 1..." @@ -450,6 +474,9 @@ msgstr "Устройство вывода MIDI:" msgid "MIDI In Device:" msgstr "Устройство ввода MIDI:" +msgid "MIDI Out:" +msgstr "Вывод MIDI:" + msgid "Standalone MPU-401" msgstr "Отдельный MPU-401" @@ -489,6 +516,9 @@ msgstr "Устройство LPT3:" msgid "LPT4 Device:" msgstr "Устройство LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "DMA ECP встроенного LPT:" + msgid "Serial port 1" msgstr "Последовательный порт COM1" @@ -513,18 +543,21 @@ msgstr "Параллельный порт LPT3" msgid "Parallel port 4" msgstr "Параллельный порт LPT4" -msgid "HD Controller:" -msgstr "Контроллер HD:" - msgid "FD Controller:" msgstr "Контроллер FD:" +msgid "CD-ROM Controller:" +msgstr "Контроллер CD-ROM:" + msgid "Tertiary IDE Controller" msgstr "Третичный IDE контроллер" msgid "Quaternary IDE Controller" msgstr "Четвертичный IDE контроллер" +msgid "Hard disk" +msgstr "Жёсткий диск" + msgid "SCSI" msgstr "SCSI" @@ -546,6 +579,9 @@ msgstr "Кассета" msgid "Hard disks:" msgstr "Жёсткие диски:" +msgid "Firmware Version" +msgstr "Версия прошивки" + msgid "&New..." msgstr "&Создать..." @@ -603,8 +639,14 @@ msgstr "Дисководы CD-ROM:" msgid "MO drives:" msgstr "Магнитооптические дисководы:" -msgid "ZIP drives:" -msgstr "ZIP дисководы:" +msgid "MO:" +msgstr "Дисководы MO:" + +msgid "Removable disks:" +msgstr "Cъёмные диски:" + +msgid "Removable disk drives:" +msgstr "Дисководы съёмных дисков:" msgid "ZIP 250" msgstr "ZIP 250" @@ -630,6 +672,15 @@ msgstr "Карта 3:" msgid "Card 4:" msgstr "Карта 4:" +msgid "Generic ISA ROM Board" +msgstr "Стандартная плата ПЗУ ISA" + +msgid "Generic Dual ISA ROM Board" +msgstr "Стандартная плата на 2 ПЗУ ISA" + +msgid "Generic Quad ISA ROM Board" +msgstr "Стандартная плата на 4 ПЗУ ISA" + msgid "ISABugger device" msgstr "Устройство ISABugger" @@ -651,11 +702,17 @@ msgstr " - ПАУЗА" msgid "Speed" msgstr "Скорость" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Съёмный диск %1 (%2): %3" -msgid "ZIP images" -msgstr "Образы ZIP" +msgid "&Removable disk %1 (%2): %3" +msgstr "&Съёмный диск %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Образы съёмных дисков" + +msgid "Image %1" +msgstr "Образ %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "86Box не смог найти ни одного подходящего для использования файла с ПЗУ.\n\nПожалуйста скачайте набор ПЗУ и извлеките его в каталог \"roms\"." @@ -714,12 +771,30 @@ msgstr "Сеть" msgid "Ports (COM & LPT)" msgstr "Порты (COM и LPT)" +msgid "Ports" +msgstr "Порты" + +msgid "Serial ports:" +msgstr "Последовательные порты:" + +msgid "Parallel ports:" +msgstr "Параллельные порты:" + msgid "Storage controllers" msgstr "Контроллеры дисков" msgid "Hard disks" msgstr "Жёсткие диски" +msgid "Disks:" +msgstr "Диски:" + +msgid "Floppy:" +msgstr "Дисководы:" + +msgid "Controllers:" +msgstr "Контроллеры:" + msgid "Floppy & CD-ROM drives" msgstr "Гибкие диски и CD-ROM" @@ -729,6 +804,9 @@ msgstr "Другие съёмные устройства" msgid "Other peripherals" msgstr "Другая периферия" +msgid "Other devices" +msgstr "Другие устройства" + msgid "Click to capture mouse" msgstr "Щёлкните мышью для захвата курсора" @@ -774,21 +852,9 @@ msgstr "Неверное устройство PCap" msgid "2-axis, 2-button joystick(s)" msgstr "2-осевой, 2-кнопочный джойстик" -msgid "2-button gamepad(s)" -msgstr "2-кнопочный геймпад" - -msgid "2-button flight yoke" -msgstr "2-кнопочный flight yoke" - msgid "2-axis, 4-button joystick" msgstr "2-осевой, 4-кнопочный джойстик" -msgid "4-button gamepad" -msgstr "4-кнопочный геймпад" - -msgid "4-button flight yoke" -msgstr "4-кнопочный flight yoke" - msgid "2-axis, 6-button joystick" msgstr "2-осевой, 6-кнопочный джойстик" @@ -798,18 +864,9 @@ msgstr "2-осевой, 8-кнопочный джойстик" msgid "3-axis, 2-button joystick" msgstr "3-осевой, 2-кнопочный джойстик" -msgid "2-button flight yoke with throttle" -msgstr "2-кнопочный flight yoke с дросселем" - msgid "3-axis, 4-button joystick" msgstr "3-осевой, 4-кнопочный джойстик" -msgid "Win95 Steering Wheel (3-axis, 4-button)" -msgstr "Руль Win95 (3-осевой, 4-кнопочный)" - -msgid "4-button flight yoke with throttle" -msgstr "4-кнопочный flight yoke с дросселем" - msgid "4-axis, 4-button joystick" msgstr "4-осевой, 4-кнопочный джойстик" @@ -828,6 +885,27 @@ msgstr "Система управления полётом Thrustmaster" msgid "Thrustmaster FCS + Rudder Control System" msgstr "Thrustmaster FCS + Система управления рулем" +msgid "2-button gamepad(s)" +msgstr "2-кнопочный геймпад" + +msgid "2-button flight yoke" +msgstr "2-кнопочный flight yoke" + +msgid "4-button gamepad" +msgstr "4-кнопочный геймпад" + +msgid "4-button flight yoke" +msgstr "4-кнопочный flight yoke" + +msgid "2-button flight yoke with throttle" +msgstr "2-кнопочный flight yoke с дросселем" + +msgid "4-button flight yoke with throttle" +msgstr "4-кнопочный flight yoke с дросселем" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Руль Win95 (3-осевой, 4-кнопочный)" + msgid "None" msgstr "Нет" @@ -837,6 +915,9 @@ msgstr "%1 МБ (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Дисковод %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Дисковод %1 (%2): %3" + msgid "Advanced sector images" msgstr "Расширенные образы секторов" @@ -858,6 +939,9 @@ msgstr "Невозможно инициализировать GhostPCL" msgid "MO %1 (%2): %3" msgstr "Магнитооптический %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&Магнитооптический %1 (%2): %3" + msgid "MO images" msgstr "Образы магнитооптических дисков" @@ -867,6 +951,15 @@ msgstr "Добро пожаловать в 86Box!" msgid "Internal device" msgstr "Встроенное устройство" +msgid "&File" +msgstr "&Файл" + +msgid "&New machine..." +msgstr "&Новая машина..." + +msgid "&Check for updates..." +msgstr "&Проверить обновления..." + msgid "Exit" msgstr "Выход" @@ -942,12 +1035,18 @@ msgstr "Продолжить" msgid "Cassette: %1" msgstr "Кассета: %1" +msgid "C&assette: %1" +msgstr "&Кассета: %1" + msgid "Cassette images" msgstr "Образы кассет" msgid "Cartridge %1: %2" msgstr "Картридж %1: %2" +msgid "Car&tridge %1: %2" +msgstr "Кар&тридж %1: %2" + msgid "Cartridge images" msgstr "Образы картриджей" @@ -957,6 +1056,9 @@ msgstr "Возобновить выполнение" msgid "Pause execution" msgstr "Приостановить выполнение" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Нажать Ctrl+Alt+Del" @@ -966,9 +1068,279 @@ msgstr "Нажать Ctrl+Alt+Esc" msgid "Hard reset" msgstr "Холодная перезагрузка" +msgid "Force shutdown" +msgstr "Принудительное завершение работы" + +msgid "Start" +msgstr "Пуск" + +msgid "Not running" +msgstr "Не работает" + +msgid "Running" +msgstr "Работает" + +msgid "Paused" +msgstr "Приостановлена" + +msgid "Waiting" +msgstr "Ожидание" + +msgid "Powered Off" +msgstr "Выключена" + +msgid "%n running" +msgstr "%n работает" + +msgid "%n paused" +msgstr "%n приостановлено" + +msgid "%n waiting" +msgstr "%n ожидает" + +msgid "%1 total" +msgstr "всего %1" + +msgid "VMs: %1" +msgstr "Машин: %1" + +msgid "System Directory:" +msgstr "Системная папка:" + +msgid "Choose directory" +msgstr "Выбрать папку" + +msgid "Choose configuration file" +msgstr "Выбрать файл конфигурации" + +msgid "86Box configuration files (86box.cfg)" +msgstr "Файлы конфигурации 86Box (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Сбой при чтении конфигурации" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Невозможно открыть выбранный файл конфигурации для чтения: %1" + +msgid "Use regular expressions in search box" +msgstr "Использовать регулярные выражения в поле поиска" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 машина(ы) в настоящее время активна(ы). Вы уверены, что всё равно хотите выйти из менеджера виртуальной машины?" + +msgid "Add new system wizard" +msgstr "Мастер добавления новой системы" + +msgid "Introduction" +msgstr "Введение" + +msgid "This will help you add a new system to 86Box." +msgstr "Это поможет вам добавить новую систему в 86Box." + +msgid "New configuration" +msgstr "Новая конфигурация" + +msgid "Complete" +msgstr "Завершено" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "Мастер теперь запустит конфигурацию для новой системы." + +msgid "Use existing configuration" +msgstr "Использовать существующую конфигурацию" + +msgid "Type some notes here" +msgstr "Введите здесь несколько заметок" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Вставьте содержимое существующего файла конфигурации в поле ниже." + +msgid "Load configuration from file" +msgstr "Загрузить конфигурацию из файла" + +msgid "System name" +msgstr "Название системы" + +msgid "System name:" +msgstr "Название системы:" + +msgid "System name cannot contain certain characters" +msgstr "Название системы не может содержать определённые символы" + +msgid "System name already exists" +msgstr "Название системы уже существует" + +msgid "Please enter a directory for the system" +msgstr "Пожалуйста, введите папку для системы" + +msgid "Directory does not exist" +msgstr "Папка не существует" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "Новая папка для системы будет создана в выбранной папке выше" + +msgid "System location:" +msgstr "Расположение системы:" + +msgid "System name and location" +msgstr "Название системы и расположение" + +msgid "Enter the name of the system and choose the location" +msgstr "Введите название системы и выберите расположение" + +msgid "Enter the name of the system" +msgstr "Введите название системы" + +msgid "Please enter a system name" +msgstr "Пожалуйста, введите название системы" + +msgid "Display name (optional):" +msgstr "Отображаемое имя (необязательно):" + +msgid "Display name:" +msgstr "Отображаемое имя:" + +msgid "Set display name" +msgstr "Установить отображаемое имя" + +msgid "Enter the new display name (blank to reset)" +msgstr "Введите новое отображаемое имя (пусто, чтобы сбросить)" + +msgid "Change &display name..." +msgstr "Изменить &отображаемое имя..." + +msgid "Context Menu" +msgstr "Контекстное меню" + +msgid "&Open folder..." +msgstr "&Открыть папку..." + +msgid "Open p&rinter tray..." +msgstr "Открыть папку &принтера..." + +msgid "Set &icon..." +msgstr "Установить &значок..." + +msgid "Select an icon" +msgstr "Выберите значок" + +msgid "C&lone..." +msgstr "К&лонировать..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "Виртуальная машина \"%1\" (%2) будет клонирована в:" + +msgid "Directory %1 already exists" +msgstr "Папка %1 уже существует" + +msgid "You cannot use the following characters in the name: %1" +msgstr "Вы не можете использовать следующие символы в имени: %1" + +msgid "Clone" +msgstr "Клонировать" + +msgid "Failed to create directory for cloned VM" +msgstr "Не удалось создать папку для клонированной виртуальной машины" + +msgid "Failed to clone VM." +msgstr "Не удалось клонировать виртуальную машину." + +msgid "Directory in use" +msgstr "Папка используется" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "Выбранная папка уже используется. Пожалуйста, выберите другую папку." + +msgid "Create directory failed" +msgstr "Не удалось создать папку" + +msgid "Unable to create the directory for the new system" +msgstr "Невозможно создать папку для новой системы" + +msgid "Configuration write failed" +msgstr "Не удалось записать файл конфигурации" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Невозможно открыть файл конфигурации в %1 для записи" + +msgid "Error adding system" +msgstr "Ошибка добавления системы" + +msgid "Remove directory failed" +msgstr "Сбой при удалении папки" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Некоторые файлы в папке машины невозможно удалить. Пожалуйста, удалите их вручную." + +msgid "Build" +msgstr "Сборка" + +msgid "Version" +msgstr "Версия" + +msgid "An update to 86Box is available: %1 %2" +msgstr "Доступно обновление для 86Box: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "При проверке обновлений произошла ошибка: %1" + +msgid "An update to 86Box is available!" +msgstr "Доступно обновление для 86Box!" + +msgid "Warning" +msgstr "Внимание" + +msgid "&Kill" +msgstr "&Завершить процесс" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Принудительное завершение процесса виртуальной машины может привести к потере данных. Делайте это только в том случае, если процесс 86Box завис.\n\nВы действительно хотите принудительно завершить процесс виртуальной машины \"%1\"?" + +msgid "&Delete" +msgstr "&Удалить" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Вы действительно хотите удалить виртуальную машину \"%1\" и все её файлы? Это действие не может быть отменено!" + +msgid "Show &config file" +msgstr "Показать файл &конфигурации" + +msgid "No screenshot" +msgstr "Нет скриншота" + +msgid "Search" +msgstr "Поиск" + +msgid "Searching for VMs..." +msgstr "Поиск виртуальных машин..." + +msgid "Found %1" +msgstr "Найдено %1" + +msgid "System" +msgstr "Система" + +msgid "Storage" +msgstr "Диски" + +msgid "Disk %1: " +msgstr "Диск %1: " + +msgid "No disks" +msgstr "Нет дисков" + +msgid "Audio" +msgstr "Аудио" + +msgid "Audio:" +msgstr "Аудио:" + msgid "ACPI shutdown" msgstr "Сигнал завершения ACPI" +msgid "ACP&I shutdown" +msgstr "Сигнал завершения ACP&I" + msgid "Hard disk (%1)" msgstr "Жёсткий диск (%1)" @@ -1116,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 КБ" @@ -1254,41 +1629,38 @@ msgstr "Устройства MCA" msgid "List of MCA devices:" msgstr "Список устройств MCA:" -msgid "Tablet tool" -msgstr "Планшетный инструмент" +msgid "&Tablet tool" +msgstr "Планшетный &инструмент" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "О &Qt" -msgid "About Qt" -msgstr "О Qt" +msgid "&MCA devices..." +msgstr "Устройства &MCA..." -msgid "MCA devices..." -msgstr "Устройства MCA..." - -msgid "Show non-primary monitors" +msgid "Show non-&primary monitors" msgstr "&Показывать неосновные мониторы" -msgid "Open screenshots folder..." -msgstr "Открыть папку скриншотов..." +msgid "Open screenshots &folder..." +msgstr "Открыть папку &скриншотов..." -msgid "Apply fullscreen stretch mode when maximized" -msgstr "Применить полноэкранный режим растяжения при разворачивании окна" +msgid "Appl&y fullscreen stretch mode when maximized" +msgstr "Применить полно&экранный режим растяжения при разворачивании окна" -msgid "Cursor/Puck" -msgstr "Курсор/шайба" +msgid "&Cursor/Puck" +msgstr "&Курсор/шайба" -msgid "Pen" -msgstr "Ручка" +msgid "&Pen" +msgstr "&Ручка" -msgid "Host CD/DVD Drive (%1:)" -msgstr "CD/DVD Привод хоста (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "CD/DVD Привод &хоста (%1:)" msgid "&Connected" msgstr "&Кабель подключен" -msgid "Clear image history" -msgstr "Очистить историю образов" +msgid "Clear image &history" +msgstr "Очистить &историю образов" msgid "Create..." msgstr "Создать..." @@ -1302,9 +1674,15 @@ msgstr "Неизвестная шина" msgid "Null Driver" msgstr "Нулевой драйвер" +msgid "NIC:" +msgstr "Сетевой адаптер:" + msgid "NIC %1 (%2) %3" msgstr "NIC %1 (%2) %3" +msgid "&NIC %1 (%2) %3" +msgstr "&NIC %1 (%2) %3" + msgid "Render behavior" msgstr "Режим рендеринга" @@ -1368,6 +1746,9 @@ msgstr "Нет устройств MCA." msgid "MiB" msgstr "МиБ" +msgid "GiB" +msgstr "ГиБ" + msgid "Network Card #1" msgstr "Сетевая карта 1" @@ -1410,8 +1791,26 @@ msgstr "Сквозной последовательный порт COM3" msgid "Serial port passthrough 4" msgstr "Сквозной последовательный порт COM4" -msgid "Renderer options..." -msgstr "Параметры рендеринга..." +msgid "Renderer &options..." +msgstr "Параметры &рендеринга..." + +msgid "PC/XT Keyboard" +msgstr "Клавиатура PC/XT" + +msgid "AT Keyboard" +msgstr "Клавиатура AT" + +msgid "AX Keyboard" +msgstr "Клавиатура AX" + +msgid "PS/2 Keyboard" +msgstr "Клавиатура PS/2" + +msgid "PS/55 Keyboard" +msgstr "Клавиатура PS/55" + +msgid "Keys" +msgstr "Клавиши" msgid "Logitech/Microsoft Bus Mouse" msgstr "Bus-мышь Logitech/Microsoft" @@ -1428,15 +1827,24 @@ msgstr "Bus-мышь Mouse Systems" msgid "Microsoft Serial Mouse" msgstr "COM-мышь Microsoft" +msgid "Microsoft Serial BallPoint" +msgstr "COM-мышь Microsoft BallPoint" + msgid "Logitech Serial Mouse" msgstr "COM-мышь Logitech" msgid "PS/2 Mouse" msgstr "Мышь PS/2" +msgid "PS/2 QuickPort Mouse" +msgstr "Мышь PS/2 QuickPort" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (последовательный)" +msgid "Default Baud rate" +msgstr "Скорость передачи данных по умолчанию" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Стандартный Hayes-совместимый модем" @@ -1476,7 +1884,7 @@ msgstr "Файл BIOS (ПЗУ #3)" msgid "BIOS file (ROM #4)" msgstr "Файл BIOS (ПЗУ #4)" -msgid "BIOS Address" +msgid "BIOS address" msgstr "Адрес BIOS" msgid "BIOS address (ROM #1)" @@ -1507,7 +1915,7 @@ msgid "Enable BIOS extension ROM Writes (ROM #4)" msgstr "Разрешить запись в ПЗУ расширения BIOS (ПЗУ #4)" msgid "Linear framebuffer base" -msgstr "Линейная база кадрового буфера" +msgstr "Линейный фреймбуфер" msgid "Address" msgstr "Адрес" @@ -1515,15 +1923,18 @@ msgstr "Адрес" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "IRQ последовательного порта" + +msgid "Parallel port IRQ" +msgstr "IRQ параллельного порта" + msgid "BIOS Revision" msgstr "Версия BIOS" msgid "BIOS Version" msgstr "Версия BIOS" -msgid "BIOS Versions" -msgstr "Версии BIOS" - msgid "BIOS Language" msgstr "Язык BIOS" @@ -1743,6 +2154,9 @@ msgstr "Поднимать прерывание кодека при настро msgid "SB Address" msgstr "Адрес SB" +msgid "Adlib Address" +msgstr "Адрес AdLib" + msgid "Use EEPROM setting" msgstr "Использовать настройку EEPROM" @@ -1833,21 +2247,12 @@ msgstr "Смесь" msgid "Font" msgstr "Шрифт" -msgid "Has secondary 8x8 character set" -msgstr "Вторичный набор символов 8x8" - -msgid "Has Quadcolor II daughter board" -msgstr "Дочерняя плата Quadcolor II" - -msgid "Alternate monochrome contrast" -msgstr "Альтернативный монохромный контраст" +msgid "Bilinear filtering" +msgstr "Билинейная фильтрация" msgid "Video chroma-keying" msgstr "Видео хромакеинг" -msgid "Bilinear filtering" -msgstr "Билинейная фильтрация" - msgid "Dithering" msgstr "Дизеринг" @@ -1935,10 +2340,10 @@ msgstr "Всегда на выбранной скорости" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "Настройка BIOS + горячие клавиши (отключается во время POST)" -msgid "64 kB starting from F0000" +msgid "64 KB starting from F0000" msgstr "64 КБ, начиная с F0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" msgstr "128 КБ, начиная с E0000 (адрес MSB инвертирован, сначала последние 64 КБ)" msgid "Sine" @@ -2040,6 +2445,9 @@ msgstr "256 КБ" msgid "Composite" msgstr "Композитное видео" +msgid "True color" +msgstr "True Color" + msgid "Old" msgstr "Старый" @@ -2073,6 +2481,15 @@ msgstr "Интерполяция sRGB" msgid "Linear interpolation" msgstr "Линейная интерполяция" +msgid "Has secondary 8x8 character set" +msgstr "Вторичный набор символов 8x8" + +msgid "Has Quadcolor II daughter board" +msgstr "Дочерняя плата Quadcolor II" + +msgid "Alternate monochrome contrast" +msgstr "Альтернативный монохромный контраст" + msgid "128 KB" msgstr "128 КБ" @@ -2142,6 +2559,9 @@ msgstr "Цветной без чересстрочной развёртки" msgid "3Dfx Voodoo Graphics" msgstr "Ускоритель 3Dfx Voodoo" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 TMU)" @@ -2358,6 +2778,12 @@ msgstr "Привязать клавишу" msgid "Enter key combo:" msgstr "Введите комбинацию клавиш:" +msgid "Bind conflict" +msgstr "Конфликт привязки" + +msgid "This key combo is already in use." +msgstr "Эта комбинация клавиш уже используется." + msgid "Send Control+Alt+Del" msgstr "Отправить Control+Alt+Del" @@ -2387,3 +2813,144 @@ msgstr "Файлы ПЗУ" msgid "SoundFont files" msgstr "Файлы SoundFont" + +msgid "Local Switch" +msgstr "Локальный коммутатор" + +msgid "Remote Switch" +msgstr "Удалённый коммутатор" + +msgid "Switch:" +msgstr "Номер коммутатора:" + +msgid "Hub Mode" +msgstr "Режим концентратора" + +msgid "Hostname:" +msgstr "Имя хоста:" + +msgid "ISA RAM:" +msgstr "ISA ОЗУ:" + +msgid "ISA ROM:" +msgstr "ISA ПЗУ:" + +msgid "&Wipe NVRAM" +msgstr "&Стереть NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Это удалит все файлы NVRAM (и связанные) виртуальной машины, расположенной в подпапке \"nvr\". Вам придётся снова реконфигурировать настройки BIOS (и, возможно, другие устройства внутри виртуальной машины), если применимо.\n\nВы уверены, что хотите стереть всё содержимое NVRAM виртуальной машины \"%1\"?" + +msgid "Success" +msgstr "Успешно" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Успешно стёрто содержимое NVRAM виртуальной машины \"%1\"" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Произошла ошибка при попытке стереть содержимое NVRAM виртуальной машины \"%1\"" + +msgid "%1 VM Manager" +msgstr "Менеджер виртуальных машин %1" + +msgid "%n disk(s)" +msgstr "%n диск(ов)" + +msgid "Unknown Status" +msgstr "Неизвестный статус" + +msgid "No Machines Found!" +msgstr "Машины не найдены!" + +msgid "Check for updates on startup" +msgstr "Проверять обновления при запуске" + +msgid "Unable to determine release information" +msgstr "Невозможно определить информацию о релизе" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Произошла ошибка при проверке обновлений:\n\n%1\n\nПожалуйста, попробуйте еще раз позже." + +msgid "Update check complete" +msgstr "Проверка обновлений завершена" + +msgid "stable" +msgstr "стабильную" + +msgid "beta" +msgstr "бета" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Вы используете последнюю %1 версию 86Box: %2" + +msgid "version" +msgstr "версия" + +msgid "build" +msgstr "сборка" + +msgid "You are currently running version %1." +msgstr "Вы сейчас используете версию %1." + +msgid "Version %1 is now available." +msgstr "Доступна версия %1." + +msgid "You are currently running build %1." +msgstr "Вы сейчас используете сборку %1." + +msgid "Build %1 is now available." +msgstr "Доступна сборка %1." + +msgid "Would you like to visit the download page?" +msgstr "Открыть страницу загрузки?" + +msgid "Visit download page" +msgstr "Открыть страницу загрузки" + +msgid "Update check" +msgstr "Проверка обновлений" + +msgid "Checking for updates..." +msgstr "Проверка обновлений..." + +msgid "86Box Update" +msgstr "Обновление 86Box" + +msgid "Release notes:" +msgstr "Примечания к релизу:" + +msgid "%1 Hz" +msgstr "%1 Гц" + +msgid "Virtual machine crash" +msgstr "Сбой виртуальной машины" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "Процесс виртуальной машины \"%1\" неожиданно завершился с кодом завершения %2." + +msgid "The system will not be added." +msgstr "Система не будет добавлена." + +msgid "&Update mouse every CPU frame" +msgstr "&Обновлять мышь при каждом кадре ЦП" + +msgid "Hue" +msgstr "Тон" + +msgid "Saturation" +msgstr "Насыщенность" + +msgid "Contrast" +msgstr "Контраст" + +msgid "Brightness" +msgstr "Яркость" + +msgid "Sharpness" +msgstr "Резкость" + +msgid "&CGA composite settings..." +msgstr "Настройки композитного видео &CGA..." + +msgid "CGA composite settings" +msgstr "Настройки композитного видео CGA" diff --git a/src/qt/languages/sk-SK.po b/src/qt/languages/sk-SK.po index ef89f831a..a4169fac9 100644 --- a/src/qt/languages/sk-SK.po +++ b/src/qt/languages/sk-SK.po @@ -27,7 +27,13 @@ msgstr "Ctrl+Alt+&Esc" msgid "&Pause" msgstr "P&ozastaviť" -msgid "E&xit..." +msgid "Pause" +msgstr "Pozastaviť" + +msgid "Re&sume" +msgstr "&Obnoviť" + +msgid "E&xit" msgstr "&Ukončiť" msgid "&View" @@ -51,20 +57,17 @@ msgstr "&Renderer" msgid "&Qt (Software)" msgstr "&Qt (Software)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" msgstr "Open&GL (3.0 Core)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." +msgid "Specify &dimensions..." msgstr "&Zadať veľkosť..." -msgid "F&orce 4:3 display ratio" -msgstr "&Zachovať pomer strán 4:3" +msgid "Force &4:3 display ratio" +msgstr "Zachovať pomer strán &4:3" msgid "&Window scale factor" msgstr "&Násobné zväčšenie okna" @@ -99,7 +102,7 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" +msgid "Fi<er method" msgstr "Spôsob &filtrovania" msgid "&Nearest" @@ -132,8 +135,8 @@ msgstr "&Celočíselné škálovanie" msgid "4:&3 Integer scale" msgstr "4:&3 Celočíselné škálovanie" -msgid "E&GA/(S)VGA settings" -msgstr "Nastavenia pre E&GA a (S)VGA" +msgid "EGA/(S)&VGA settings" +msgstr "Nastavenia pre EGA a (S)&VGA" msgid "&Inverted VGA monitor" msgstr "&Obrátiť farby" @@ -144,9 +147,15 @@ msgstr "&Typ monitora VGA" msgid "RGB &Color" msgstr "RGB &farebný" +msgid "RGB (no brown)" +msgstr "RGB (bez hnedej)" + msgid "&RGB Grayscale" msgstr "&Odtiene sivej" +msgid "Generic RGBI color monitor" +msgstr "Obecný RGBI farebný monitor" + msgid "&Amber monitor" msgstr "&Jantárová obrazovka" @@ -183,6 +192,9 @@ msgstr "&Nástroje" msgid "&Settings..." msgstr "&Nastavenia..." +msgid "Settings..." +msgstr "Nastavenia..." + msgid "&Update status bar icons" msgstr "&Aktualizovať ikony na stavovom riadku" @@ -348,6 +360,9 @@ msgstr "Počítač:" msgid "Configure" msgstr "Nastaviť" +msgid "CPU:" +msgstr "Procesor:" + msgid "CPU type:" msgstr "Procesor:" @@ -384,6 +399,15 @@ msgstr "Zapnutá (UTC)" msgid "Dynamic Recompiler" msgstr "Dynamický prekladač" +msgid "CPU frame size" +msgstr "Veľkosť rámcov CPU" + +msgid "Larger frames (less smooth)" +msgstr "Väčšie rámce (menej plynulé)" + +msgid "Smaller frames (smoother)" +msgstr "Menšie rámce (plynulejšie)" + msgid "Video:" msgstr "Grafika:" @@ -399,12 +423,27 @@ msgstr "Grafika IBM 8514/A" msgid "XGA Graphics" msgstr "Grafika XGA" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "Grafika zobrazovacieho adaptéru IBM PS/55" + +msgid "Keyboard:" +msgstr "Klávesnica:" + +msgid "Keyboard" +msgstr "Klávesnica" + msgid "Mouse:" msgstr "Myš:" +msgid "Mouse" +msgstr "Myš" + msgid "Joystick:" msgstr "Joystick:" +msgid "Joystick" +msgstr "Joystick" + msgid "Joystick 1..." msgstr "Joystick 1..." @@ -430,10 +469,13 @@ msgid "Sound card #4:" msgstr "Zvuková karta 4:" msgid "MIDI Out Device:" -msgstr "MIDI výstup:" +msgstr "Zariadenie pre MIDI výstup:" msgid "MIDI In Device:" -msgstr "MIDI vstup:" +msgstr "Zariadenie pre MIDI vstup:" + +msgid "MIDI Out:" +msgstr "MIDI výstup" msgid "Standalone MPU-401" msgstr "Samostatný MPU-401" @@ -474,6 +516,9 @@ msgstr "Zariadenie na LPT3:" msgid "LPT4 Device:" msgstr "Zariadenie na LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "DMA kanál ECP interného LPT portu:" + msgid "Serial port 1" msgstr "Povoliť port COM1" @@ -498,18 +543,21 @@ msgstr "Povoliť port LPT3" msgid "Parallel port 4" msgstr "Povoliť port LPT4" -msgid "HD Controller:" -msgstr "Radič disku:" - msgid "FD Controller:" msgstr "Disketový radič:" +msgid "CD-ROM Controller:" +msgstr "Radič CD-ROM:" + msgid "Tertiary IDE Controller" msgstr "Tretí radič IDE" msgid "Quaternary IDE Controller" msgstr "Štvrtý radič IDE" +msgid "Hard disk" +msgstr "Radič CD-ROM:" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "Kazeta" msgid "Hard disks:" msgstr "Pevné disky:" +msgid "Firmware Version" +msgstr "Verzia firmvéru" + msgid "&New..." msgstr "&Nový..." @@ -588,8 +639,14 @@ msgstr "Mechaniky CD-ROM:" msgid "MO drives:" msgstr "Magnetooptické mechaniky:" -msgid "ZIP drives:" -msgstr "Mechaniky ZIP:" +msgid "MO:" +msgstr "Magnetooptické jednotky:" + +msgid "Removable disks:" +msgstr "Vymeniteľné disky:" + +msgid "Removable disk drives:" +msgstr "Mechaniky vymeniteľných diskov:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "ISA hodiny:" msgid "ISA Memory Expansion" msgstr "ISA rozšírenie pamäte" +msgid "ISA ROM Cards" +msgstr "ISA karty s pamäťou ROM" + msgid "Card 1:" msgstr "Karta 1:" @@ -612,6 +672,15 @@ msgstr "Karta 3:" msgid "Card 4:" msgstr "Karta 4:" +msgid "Generic ISA ROM Board" +msgstr "Obecná ISA karta s pamäťou ROM" + +msgid "Generic Dual ISA ROM Board" +msgstr "Obecná karta ISA s dvoma pamäťami ROM" + +msgid "Generic Quad ISA ROM Board" +msgstr "Obecná karta ISA so štyrmi pamäťami ROM" + msgid "ISABugger device" msgstr "Zariadenie ISABugger" @@ -633,11 +702,17 @@ msgstr " - POZASTAVENÝ" msgid "Speed" msgstr "Rýchlosť" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Vymeniteľný disk %1 (%2): %3" -msgid "ZIP images" -msgstr "Obrazy ZIP diskov" +msgid "&Removable disk %1 (%2): %3" +msgstr "&Vymeniteľný disk %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Obrazy vymeniteľných diskov" + +msgid "Image %1" +msgstr "Obraz %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "86Box nenašiel žiadne použiteľné imidž pamätí ROM.\n\nStiahnite sadu obrazov ROM a extrahujte ju do zložky \"roms\"." @@ -696,12 +771,30 @@ msgstr "Sieť" msgid "Ports (COM & LPT)" msgstr "COM a LPT porty" +msgid "Ports" +msgstr "Porty" + +msgid "Serial ports:" +msgstr "Sériové porty:" + +msgid "Parallel ports:" +msgstr "Paralelné porty:" + msgid "Storage controllers" msgstr "Radiče úložiska" msgid "Hard disks" msgstr "Pevné disky" +msgid "Disks:" +msgstr "Disky:" + +msgid "Floppy:" +msgstr "Disketové jednotky:" + +msgid "Controllers:" +msgstr "Radiče:" + msgid "Floppy & CD-ROM drives" msgstr "Disketové a CD-ROM mechaniky" @@ -711,6 +804,9 @@ msgstr "Ďalšie vymeniteľné zariadenia" msgid "Other peripherals" msgstr "Iné príslušenstvo" +msgid "Other devices" +msgstr "Iné zariadenia" + msgid "Click to capture mouse" msgstr "Kliknite pre zabráni myši" @@ -777,12 +873,39 @@ msgstr "4-osový, 4-tlačidlový joystick" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Pedals" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Thrustmaster Flight Control System" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Rudder Control System" + +msgid "2-button gamepad(s)" +msgstr "Ovládač s 2 tlačidlami" + +msgid "2-button flight yoke" +msgstr "Letecký knipl s 2 tlačidlami" + +msgid "4-button gamepad" +msgstr "Ovládač so 4 tlačidlami" + +msgid "4-button flight yoke" +msgstr "Letecký knipl so 4 tlačidlami" + +msgid "2-button flight yoke with throttle" +msgstr "Letecký knipl s 2 tlačidlami a pákou" + +msgid "4-button flight yoke with throttle" +msgstr "Letecký knipl s 4 tlačidlami a pákou" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Volant pre Windows 95 (3 osy, 4 tlačítka)" + msgid "None" msgstr "Žiadne" @@ -792,6 +915,9 @@ msgstr "%1 MB (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Disketová mechanika %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Disketová mechanika %1 (%2): %3" + msgid "Advanced sector images" msgstr "Rozšírené sektorové obrazy" @@ -813,6 +939,9 @@ msgstr "Nastala chyba pri inicializácii knižnice GhostPCL" msgid "MO %1 (%2): %3" msgstr "MO %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&MO %1 (%2): %3" + msgid "MO images" msgstr "Obrazy MO" @@ -822,6 +951,15 @@ msgstr "Vitajte v programe 86Box!" msgid "Internal device" msgstr "Vstavané zariadenie" +msgid "&File" +msgstr "&Súbor" + +msgid "&New machine..." +msgstr "&Nový počítač..." + +msgid "&Check for updates..." +msgstr "&Skontroluj aktualizácie..." + msgid "Exit" msgstr "Ukončiť" @@ -849,7 +987,7 @@ msgstr "Emulátor starých počítačov\n\nAutori: Miran Grča (OBattler), Richa msgid "Hardware not available" msgstr "Hardvér nie je dostupný" -msgid "Make sure %1 is installed and that you are on a libpcap-compatible network connection." +msgid "Make sure %1 is installed and that you are on a %1-compatible network connection." msgstr "Uistite sa, že je nainštalovaný %1 a používate sieťové pripojenie s ním kompatibilné." msgid "Invalid configuration" @@ -858,7 +996,7 @@ msgstr "Neplatná konfigurácia" msgid "%1 is required for automatic conversion of PostScript files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as PostScript (.ps) files." msgstr "%1 je potrebná pre automatický prevod PostScript dokumentov do PDF.\n\nAkékoľvek dokumenty vytlačené cez všeobecnú PostScriptovú tlačiareň budú uložené ako PostScript (.ps) súbory." -msgid "%1 is required for automatic conversion of PCL files to PDF.\n\nAny documents sent to the generic PCL printer will be saved as Printer Command Lnaugage (.pcl) files." +msgid "%1 is required for automatic conversion of PCL files to PDF.\n\nAny documents sent to the generic PCL printer will be saved as Printer Command Language (.pcl) files." msgstr "%1 je potrebná pre automatický prevod PCL dokumentov do PDF.\n\nAkékoľvek dokumenty vytlačené cez všeobecnú PCLovú tlačiareň budú uložené ako Printer Command Language (.pcl) súbory." msgid "Don't show this message again" @@ -897,12 +1035,18 @@ msgstr "Pokračovať" msgid "Cassette: %1" msgstr "Kazeta: %1" +msgid "C&assette: %1" +msgstr "K&azeta: %1" + msgid "Cassette images" msgstr "Kazetové nahrávky" msgid "Cartridge %1: %2" msgstr "Cartridge %1: %2" +msgid "Car&tridge %1: %2" +msgstr "Car&tridge %1: %2" + msgid "Cartridge images" msgstr "Obrazy cartridge" @@ -912,6 +1056,9 @@ msgstr "Obnoviť" msgid "Pause execution" msgstr "Pozastaviť" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Stlačiť Ctrl+Alt+Delete" @@ -921,9 +1068,279 @@ msgstr "Stlačiť Ctrl+Alt+Esc" msgid "Hard reset" msgstr "Resetovať" +msgid "Force shutdown" +msgstr "Vynútiť vypnutie" + +msgid "Start" +msgstr "Spustiť" + +msgid "Not running" +msgstr "Nebeží" + +msgid "Running" +msgstr "Beží" + +msgid "Paused" +msgstr "Pozastavené" + +msgid "Waiting" +msgstr "Čeká" + +msgid "Powered Off" +msgstr "Vypnuté" + +msgid "%n running" +msgstr "%n beží" + +msgid "%n paused" +msgstr "%n pozostavené" + +msgid "%n waiting" +msgstr "%n čeká" + +msgid "%1 total" +msgstr "%1 celkom" + +msgid "VMs: %1" +msgstr "Virtuálnych počítačov: %1" + +msgid "System Directory:" +msgstr "Systémový adresár:" + +msgid "Choose directory" +msgstr "Vyberte adresár" + +msgid "Choose configuration file" +msgstr "Vyberte konfiguračný súbor" + +msgid "86Box configuration files (86box.cfg)" +msgstr "Konfiguračné súbory 86Box (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Čítanie konfigurácie zlyhalo" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Nie je možné otvoriť vybraný konfiguračný súbor na čítanie: %1" + +msgid "Use regular expressions in search box" +msgstr "Použiť v poli vyhľadávania regulárne výrazy" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 počítač(ov) je stále aktívnych. Naozaj chcete ukončiť správcu virtuálnych počítačov?" + +msgid "Add new system wizard" +msgstr "Sprievodca pridávaním nového systému" + +msgid "Introduction" +msgstr "Úvod" + +msgid "This will help you add a new system to 86Box." +msgstr "Tento sprievodca vám pomôže pridať nový systém do programu 86Box." + +msgid "New configuration" +msgstr "Nová konfigurácia" + +msgid "Complete" +msgstr "Dokončiť" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "Sprievodca teraz spustí konfiguráciu nového systému." + +msgid "Use existing configuration" +msgstr "Použiť existujúcu konfiguráciu" + +msgid "Type some notes here" +msgstr "Tu zadajte nejaké poznámky" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Vložte obsah existujúceho konfiguračného súboru do poľa nižšie." + +msgid "Load configuration from file" +msgstr "Načítať konfiguráciu zo súboru" + +msgid "System name" +msgstr "Názov systému" + +msgid "System name:" +msgstr "Názov systému:" + +msgid "System name cannot contain certain characters" +msgstr "Názov systému nesmie obsahovať určité znaky" + +msgid "System name already exists" +msgstr "Názov systému už existuje" + +msgid "Please enter a directory for the system" +msgstr "Zadajte adresár pre systém" + +msgid "Directory does not exist" +msgstr "Adresár neexistuje" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "Pre tento systém bude vytvorený nový adresár vo vyššie zvolenom adresári." + +msgid "System location:" +msgstr "Umiestnenie systému:" + +msgid "System name and location" +msgstr "Názov systému a umiestnenie" + +msgid "Enter the name of the system and choose the location" +msgstr "Zadajte názov systému a vyberte umiestnenie" + +msgid "Enter the name of the system" +msgstr "Zadajte názov systému" + +msgid "Please enter a system name" +msgstr "Zadajte názov systému" + +msgid "Display name (optional):" +msgstr "Zobrazené meno (voliteľné):" + +msgid "Display name:" +msgstr "Zobrazené meno:" + +msgid "Set display name" +msgstr "Nastaviť zobrazené meno" + +msgid "Enter the new display name (blank to reset)" +msgstr "Zadajte nové zobrazené meno (prázdne pole pre vymazanie)" + +msgid "Change &display name..." +msgstr "Zmeniť &zobrazené meno..." + +msgid "Context Menu" +msgstr "Kontextové menu" + +msgid "&Open folder..." +msgstr "&Otvoriť priečinok..." + +msgid "Open p&rinter tray..." +msgstr "Otvoriť zásobník &tlačiarne..." + +msgid "Set &icon..." +msgstr "Nastaviť &ikonu..." + +msgid "Select an icon" +msgstr "Vyberte ikonu" + +msgid "C&lone..." +msgstr "K&lonovať..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "Virtuálny počítač \"%1\" (%2) bude klonovaný do:" + +msgid "Directory %1 already exists" +msgstr "Adresár %1 už existuje." + +msgid "You cannot use the following characters in the name: %1" +msgstr "V názve nemožno použiť nasledujúce znaky: %1" + +msgid "Clone" +msgstr "Klonovať" + +msgid "Failed to create directory for cloned VM" +msgstr "Nepodarilo sa vytvoriť adresár pre klonovaný virtuálny počítač" + +msgid "Failed to clone VM." +msgstr "Klonovanie virtuálneho počítača sa nepodarilo." + +msgid "Directory in use" +msgstr "Adresár sa už používa" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "Vybraný adresár je už používaný. Vyberte prosím iný adresár." + +msgid "Create directory failed" +msgstr "Vytvorenie adresára sa nepodarilo" + +msgid "Unable to create the directory for the new system" +msgstr "Nie je možné vytvoriť adresár pre nový systém" + +msgid "Configuration write failed" +msgstr "Zlyhal zápis konfigurácie" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Nepodarilo sa otvoriť konfiguračný súbor %1 na zápis" + +msgid "Error adding system" +msgstr "Chyba pri pridávaní systému" + +msgid "Remove directory failed" +msgstr "Odstránenie adresára sa nepodarilo" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Niektoré súbory v adresári zariadenia nebolo možné odstrániť. Odstráňte ich prosím ručne." + +msgid "Build" +msgstr "Build" + +msgid "Version" +msgstr "Verzia" + +msgid "An update to 86Box is available: %1 %2" +msgstr "Je k dispozícii aktualizácia pre 86Box: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Pri kontrole aktualizácií došlo k chybe: %1" + +msgid "An update to 86Box is available!" +msgstr "Je k dispozícii aktualizácia pre 86Box!" + +msgid "Warning" +msgstr "Upozornenie" + +msgid "&Kill" +msgstr "Vynútiť &ukončenie" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Ukončenie virtuálneho počítača môže spôsobiť stratu údajov. Ukončite ho len v prípade, ak proces programu 86Box zamrzne.\n\nNaozaj chcete ukončiť virtuálny počítač \"%1\"?" + +msgid "&Delete" +msgstr "&Odstrániť" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Naozaj chcete odstrániť virtuálny počítač \"%1\" a všetky jeho súbory? Táto akcia sa nedá vrátiť späť!" + +msgid "Show &config file" +msgstr "Zobraziť &konfiguračný súbor" + +msgid "No screenshot" +msgstr "Žiadny snímok obrazovky" + +msgid "Search" +msgstr "Hľadať" + +msgid "Searching for VMs..." +msgstr "Hľadanie virtuálnych počítačov..." + +msgid "Found %1" +msgstr "Nájdené %1" + +msgid "System" +msgstr "Systém" + +msgid "Storage" +msgstr "Úložisko" + +msgid "Disk %1: " +msgstr "Disk %1: " + +msgid "No disks" +msgstr "Žiadne disky" + +msgid "Audio" +msgstr "Zvuk" + +msgid "Audio:" +msgstr "Zvuk:" + msgid "ACPI shutdown" msgstr "Vypnúť cez rozhranie ACPI" +msgid "ACP&I shutdown" +msgstr "Vypnúť cez rozhranie ACP&I" + msgid "Hard disk (%1)" msgstr "Pevný disk (%1)" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 KB" @@ -1209,47 +1629,44 @@ msgstr "Zariadenia MCA" msgid "List of MCA devices:" msgstr "Zoznam zariadení MCA:" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Nástroj pre tablety" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "O &Qt" -msgid "About Qt" -msgstr "O Qt" - -msgid "MCA devices..." +msgid "&MCA devices..." msgstr "Zariadenia MCA..." -msgid "Show non-primary monitors" +msgid "Show non-&primary monitors" msgstr "Zobrazenie iných ako primárnych monitorov" -msgid "Open screenshots folder..." +msgid "Open screenshots &folder..." msgstr "Otvorte priečinok so snímkami obrazovky..." -msgid "Apply fullscreen stretch mode when maximized" +msgid "Appl&y fullscreen stretch mode when maximized" msgstr "Použitie režimu roztiahnutia na celú obrazovku pri maximalizácii" -msgid "Cursor/Puck" -msgstr "Kurzor/Puck" +msgid "&Cursor/Puck" +msgstr "&Kurzor/Puck" -msgid "Pen" -msgstr "Pero" +msgid "&Pen" +msgstr "&Pero" -msgid "Host CD/DVD Drive (%1:)" -msgstr "Hostiteľská jednotka CD/DVD (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "&Hostiteľská jednotka CD/DVD (%1:)" msgid "&Connected" -msgstr "" +msgstr "&Pripojené" -msgid "Clear image history" +msgid "Clear image &history" msgstr "Vymazanie histórie obrázkov" msgid "Create..." msgstr "Vytvorte..." msgid "Host CD/DVD Drive (%1)" -msgstr "Hostiteľská jednotka CD/DVD (%1)" +msgstr "Jednotka CD/DVD hostiteľa (%1)" msgid "Unknown Bus" msgstr "Neznáma zbernica" @@ -1257,9 +1674,14 @@ msgstr "Neznáma zbernica" msgid "Null Driver" msgstr "Nulový ovládač" -msgid "NIC %1 (%2) %3" -msgstr "NIC %1 (%2) %3" +msgid "NIC:" +msgstr "Sieťový adaptér:" +msgid "NIC %1 (%2) %3" +msgstr "Sieťový adaptér %1 (%2) %3" + +msgid "&NIC %1 (%2) %3" +msgstr "&Sieťový adaptér %1 (%2) %3" msgid "Render behavior" msgstr "Správanie pri vykresľovaní" @@ -1324,6 +1746,9 @@ msgstr "Žiadne zariadenia MCA." msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" msgstr "Sieťová karta 1" @@ -1366,9 +1791,27 @@ msgstr "Priechod sériového portu 3" msgid "Serial port passthrough 4" msgstr "Priechod cez sériový port 4" -msgid "Renderer options..." +msgid "Renderer &options..." msgstr "Možnosti vykresľovača..." +msgid "PC/XT Keyboard" +msgstr "Klávesnica PC/XT" + +msgid "AT Keyboard" +msgstr "Klávesnica AT" + +msgid "AX Keyboard" +msgstr "Klávesnica AX" + +msgid "PS/2 Keyboard" +msgstr "Klávesnica PS/2" + +msgid "PS/55 Keyboard" +msgstr "Klávesnica PS/55" + +msgid "Keys" +msgstr "Klávesy" + msgid "Logitech/Microsoft Bus Mouse" msgstr "Zbernicová myš Logitech/Microsoft" @@ -1376,20 +1819,32 @@ msgid "Microsoft Bus Mouse (InPort)" msgstr "Zbernicová myš Microsoft (InPort)" msgid "Mouse Systems Serial Mouse" +msgstr "Sériová myš Mouse Systems" + +msgid "Mouse Systems Bus Mouse" msgstr "Zbernicová myš Mouse Systems" msgid "Microsoft Serial Mouse" msgstr "Sériová myš Microsoft" +msgid "Microsoft Serial BallPoint" +msgstr "Sériová myš Microsoft BallPoint" + msgid "Logitech Serial Mouse" msgstr "Sériová myš Logitech" msgid "PS/2 Mouse" msgstr "Myš PS/2" +msgid "PS/2 QuickPort Mouse" +msgstr "Myš PS/2 QuickPort" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (sériová)" +msgid "Default Baud rate" +msgstr "Východná prenosová rýchlosť" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Štandardný modem kompatibilný s Hayesom" @@ -1414,20 +1869,80 @@ msgstr "Systém MIDI" msgid "MIDI Input Device" msgstr "Vstupné zariadenie MIDI" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "Súbor BIOS" + +msgid "BIOS file (ROM #1)" +msgstr "Súbor BIOS (ROM 1)" + +msgid "BIOS file (ROM #2)" +msgstr "Súbor BIOS (ROM 2)" + +msgid "BIOS file (ROM #3)" +msgstr "Súbor BIOS (ROM 3)" + +msgid "BIOS file (ROM #4)" +msgstr "Súbor BIOS (ROM 4)" + +msgid "BIOS address" msgstr "Adresa BIOS" +msgid "BIOS address (ROM #1)" +msgstr "Adresa BIOS (ROM 1)" + +msgid "BIOS address (ROM #2)" +msgstr "Adresa BIOS (ROM 2)" + +msgid "BIOS address (ROM #3)" +msgstr "Adresa BIOS (ROM 3)" + +msgid "BIOS address (ROM #4)" +msgstr "Adresa BIOS (ROM 4)" + msgid "Enable BIOS extension ROM Writes" msgstr "Povolenie zápisu do pamäte ROM s rozšírením BIOS" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "Povolenie zápisu do pamäte ROM s rozšírením BIOS (ROM 1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "Povolenie zápisu do pamäte ROM s rozšírením BIOS (ROM 2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "Povolenie zápisu do pamäte ROM s rozšírením BIOS (ROM 3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "Povolenie zápisu do pamäte ROM s rozšírením BIOS (ROM 4)" + +msgid "Linear framebuffer base" +msgstr "Začiatok lineárneho framebufferu" + msgid "Address" msgstr "Adresa" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "Prerušenie sériového portu" + +msgid "Parallel port IRQ" +msgstr "Prerušenie paralelného portu" + msgid "BIOS Revision" -msgstr "Revízia systému BIOS" +msgstr "Revízia BIOS" + +msgid "BIOS Version" +msgstr "Verzia BIOS" + +msgid "BIOS Language" +msgstr "Jazyk BIOS" + +msgid "IBM 5161 Expansion Unit" +msgstr "Rozširujúca jednotka IBM 5161" + +msgid "IBM Cassette Basic" +msgstr "Kazetový Basic IBM" msgid "Translate 26 -> 17" msgstr "Preložiť 26 -> 17" @@ -1442,7 +1957,19 @@ msgid "Invert colors" msgstr "Invertovanie farieb" msgid "BIOS size" -msgstr "Veľkosť systému BIOS" +msgstr "Veľkosť BIOS" + +msgid "BIOS size (ROM #1)" +msgstr "Veľkosť BIOS (ROM 1)" + +msgid "BIOS size (ROM #2)" +msgstr "Veľkosť BIOS (ROM 2)" + +msgid "BIOS size (ROM #3)" +msgstr "Veľkosť BIOS (ROM 3)" + +msgid "BIOS size (ROM #4)" +msgstr "Veľkosť BIOS (ROM 4)" msgid "Map C0000-C7FFF as UMB" msgstr "Mapa C0000-C7FFF ako UMB" @@ -1519,6 +2046,9 @@ msgstr "Úroveň dozvuku" msgid "Interpolation Method" msgstr "Metóda interpolácie" +msgid "Dynamic Sample Loading" +msgstr "Dynamické načítanie vzoriek" + msgid "Reverb Output Gain" msgstr "Zosilnenie výstupu dozvuku" @@ -1606,6 +2136,12 @@ msgstr "Nízka hodnota DMA" msgid "Enable Game port" msgstr "Povolenie herného portu" +msgid "SID Model" +msgstr "Model SID" + +msgid "SID Filter Strength" +msgstr "Sila filtra SID" + msgid "Surround module" msgstr "Surround modul" @@ -1618,6 +2154,12 @@ msgstr "Zvýšenie prerušenia CODEC pri nastavení CODEC (potrebné v niektorý msgid "SB Address" msgstr "Adresa SB" +msgid "Adlib Address" +msgstr "Adresa Adlib" + +msgid "Use EEPROM setting" +msgstr "Použiť nastavenie EEPROM" + msgid "WSS IRQ" msgstr "WSS IRQ" @@ -1702,9 +2244,15 @@ msgstr "Typ RAMDAC" msgid "Blend" msgstr "Zmes" +msgid "Font" +msgstr "Písmo" + msgid "Bilinear filtering" msgstr "Bilineárne filtrovanie" +msgid "Video chroma-keying" +msgstr "Farebné kľúčovanie obrazu" + msgid "Dithering" msgstr "Dithering" @@ -1747,6 +2295,33 @@ msgstr "Rýchlosť prenosu" msgid "EMS mode" msgstr "Režim EMS" +msgid "EMS Address" +msgstr "Adresa EMS" + +msgid "EMS 1 Address" +msgstr "Adresa EMS 1" + +msgid "EMS 2 Address" +msgstr "Adresa EMS 2" + +msgid "EMS Memory Size" +msgstr "Veľkosť pamäte EMS" + +msgid "EMS 1 Memory Size" +msgstr "Veľkosť pamäte EMS 1" + +msgid "EMS 2 Memory Size" +msgstr "Veľkosť pamäte EMS 2" + +msgid "Enable EMS" +msgstr "Povoliť EMS" + +msgid "Enable EMS 1" +msgstr "Povoliť EMS 1" + +msgid "Enable EMS 2" +msgstr "Povoliť EMS 2" + msgid "Address for > 2 MB" msgstr "Adresa pre > 2 MB" @@ -1765,11 +2340,11 @@ msgstr "Vždy pri zvolenej rýchlosti" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "Nastavenie BIOS + klávesové skratky (vypnuté počas POST)" -msgid "64 kB starting from F0000" -msgstr "64 kB od F0000" +msgid "64 KB starting from F0000" +msgstr "64 KB od F0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB od E0000 (adresa MSB invertovaná, najprv posledných 64 kB)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KB od E0000 (adresa MSB invertovaná, najprv posledných 64 KB)" msgid "Sine" msgstr "Sinusový" @@ -1799,13 +2374,13 @@ msgid "Three" msgstr "Tri" msgid "Wheel" -msgstr "Koleso" +msgstr "Koliesko" msgid "Five + Wheel" -msgstr "Päť + koleso" +msgstr "Päť s kolieskom" msgid "Five + 2 Wheels" -msgstr "" +msgstr "Päť s 2 kolieskami" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 sériová / SMT3(R)V" @@ -1870,6 +2445,9 @@ msgstr "256 KB" msgid "Composite" msgstr "Kompozitný" +msgid "True color" +msgstr "True color" + msgid "Old" msgstr "Staré" @@ -1903,6 +2481,15 @@ msgstr "Interpolácia sRGB" msgid "Linear interpolation" msgstr "Lineárna interpolácia" +msgid "Has secondary 8x8 character set" +msgstr "Má druhú sadu 8x8 znakov" + +msgid "Has Quadcolor II daughter board" +msgstr "Má dcérsku dosku Quadcolor II" + +msgid "Alternate monochrome contrast" +msgstr "Alternatívny monochromatický kontrast" + msgid "128 KB" msgstr "128 KB" @@ -1936,6 +2523,9 @@ msgstr "Oranžový" msgid "Gray" msgstr "Šedý" +msgid "Grayscale" +msgstr "Odtiene šedej" + msgid "Color" msgstr "Farebný" @@ -1951,18 +2541,27 @@ msgstr "Ostatné jazyky" msgid "Bochs latest" msgstr "Bochs najnovšie" +msgid "Apply overscan deltas" +msgstr "Použiť delty presahu" + +msgid "Mono Interlaced" +msgstr "Monochromatický s prekladaním" + msgid "Mono Non-Interlaced" -msgstr "Mono bez prelínania" +msgstr "Monochromatický bez prekladania" msgid "Color Interlaced" -msgstr "Farebné prelínanie" +msgstr "Farebný s prekladaním" msgid "Color Non-Interlaced" -msgstr "Farba bez prelínania" +msgstr "Farebny bez prekladania" msgid "3Dfx Voodoo Graphics" msgstr "Grafický akcelerátor 3dfx Voodoo" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 zariadenia TMU)" @@ -2030,7 +2629,10 @@ msgid "Baud Rate of Passthrough" msgstr "Prenosová rýchlosť priechodu" msgid "Named Pipe (Server)" -msgstr "Pomenované potrubie (server)" +msgstr "Pomenovaná rúrka (server)" + +msgid "Named Pipe (Client)" +msgstr "Pomenovaná rúrka (klient)" msgid "Host Serial Passthrough" msgstr "Priechod sériového portu hostiteľa" @@ -2048,28 +2650,28 @@ msgid "High performance impact" msgstr "Vysoký vplyv na výkon" msgid "[Generic] RAM Disk (max. speed)" -msgstr "[Generic] Disk RAM (max. rýchlosť)" +msgstr "[Všeobecný] Disk RAM (max. rýchlosť)" msgid "[Generic] 1989 (3500 RPM)" -msgstr "" +msgstr "[Všeobecný] 1989 (3500 ot./m)" msgid "[Generic] 1992 (3600 RPM)" -msgstr "" +msgstr "[Všeobecný] 1992 (3600 ot./m)" msgid "[Generic] 1994 (4500 RPM)" -msgstr "" +msgstr "[Všeobecný] 1994 (4500 ot./m)" msgid "[Generic] 1996 (5400 RPM)" -msgstr "" +msgstr "[Všeobecný] 1996 (5400 ot./m)" msgid "[Generic] 1997 (5400 RPM)" -msgstr "" +msgstr "[Všeobecný] 1997 (5400 ot./m)" msgid "[Generic] 1998 (5400 RPM)" -msgstr "" +msgstr "[Všeobecný] 1998 (5400 ot./m)" msgid "[Generic] 2000 (7200 RPM)" -msgstr "" +msgstr "[Všeobecný] 2000 (7200 ot./m)" msgid "IBM 8514/A clone (ISA)" msgstr "Klon IBM 8514/A (ISA)" @@ -2077,6 +2679,12 @@ msgstr "Klon IBM 8514/A (ISA)" msgid "Vendor" msgstr "Výrobca" +msgid "30 Hz (JMP2 = 1)" +msgstr "30 Hz (JMP2 = 1)" + +msgid "60 Hz (JMP2 = 2)" +msgstr "60 Hz (JMP2 = 2)" + msgid "Generic PC/XT Memory Expansion" msgstr "Všeobecné rozšírenie pamäte PC/XT" @@ -2090,61 +2698,259 @@ msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for t msgstr "Písma TrueType v adresári \"roms/printer/fonts\" sú potrebné na emuláciu generickej ihličkovej tlačiarne ESC/P." msgid "Inhibit multimedia keys" -msgstr "" +msgstr "Potlačiť stlačenie multimediálnych klávesov" msgid "Ask for confirmation before saving settings" -msgstr "" +msgstr "Vyžadovať potvrdenie pred uložením nastavení" msgid "Ask for confirmation before hard resetting" -msgstr "" +msgstr "Vyžadovať potvrdenie pred resetovaním" msgid "Ask for confirmation before quitting" -msgstr "" +msgstr "Vyžadovať potvrdenie pred ukončením" msgid "Options" -msgstr "" +msgstr "Možnosti" msgid "Model" -msgstr "" +msgstr "Model" msgid "Model:" -msgstr "" +msgstr "Model:" msgid "Failed to initialize Vulkan renderer." -msgstr "" +msgstr "Inicializácia renderera Vulkan zlyhala." msgid "GLSL Error" -msgstr "" +msgstr "Chyba GLSL" msgid "Could not load shader: %1" -msgstr "" +msgstr "Nebol možné načítať shader: %1" msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" -msgstr "" +msgstr "Je vyžadovaná verzia OpenGL 3.0 alebo vyššia. Aktuálna verzia GLSL je %1.%2" msgid "Could not load texture: %1" -msgstr "" +msgstr "Nebolo možné načítať textúru: %1" msgid "Could not compile shader:\n\n%1" -msgstr "" +msgstr "Nebolo možné skompilovať shader:\n\n%1" msgid "Program not linked:\n\n%1" -msgstr "" +msgstr "Program nebol spojený:\n\n%1" msgid "Shader Manager" -msgstr "" +msgstr "Správca shaderov" msgid "Shader Configuration" -msgstr "" +msgstr "Konfigurácia shaderu" msgid "Add" -msgstr "" +msgstr "Pridať" msgid "Move up" -msgstr "" +msgstr "Posunúť vyššie" msgid "Move down" -msgstr "" +msgstr "Posunúť nižšie" msgid "Could not load file %1" -msgstr "" +msgstr "Nebolo možné možné načítať súbor %1" + +msgid "Key Bindings:" +msgstr "Nastavenie klávesov" + +msgid "Action" +msgstr "Akcia" + +msgid "Keybind" +msgstr "Klávesy" + +msgid "Clear binding" +msgstr "Vymazať nastavenia" + +msgid "Bind" +msgstr "Nastaviť" + +msgid "Bind Key" +msgstr "Nastaviť klávesu" + +msgid "Enter key combo:" +msgstr "Zadajte kombináciu klávesov" + +msgid "Bind conflict" +msgstr "Konflikt nastavení" + +msgid "This key combo is already in use." +msgstr "Táto kombinácia klávesov je už použitá." + +msgid "Send Control+Alt+Del" +msgstr "Stlačte Ctrl+Alt+Del" + +msgid "Send Control+Alt+Escape" +msgstr "Stlačte Ctrl+Alt+Esc" + +msgid "Toggle fullscreen" +msgstr "Prepnúť režim celej obrazovky" + +msgid "Screenshot" +msgstr "Zhotoviť snímku obrazovky" + +msgid "Release mouse pointer" +msgstr "Uvoľniť kurzor myši" + +msgid "Toggle pause" +msgstr "Pozastaviť alebo obnoviť" + +msgid "Toggle mute" +msgstr "Prepnúť stlmenie" + +msgid "Text files" +msgstr "Textové súbory" + +msgid "ROM files" +msgstr "Súbory ROM" + +msgid "SoundFont files" +msgstr "Súbory SoundFont" + +msgid "Local Switch" +msgstr "Lokálny prepínač" + +msgid "Remote Switch" +msgstr "Vzdialený prepínač" + +msgid "Switch:" +msgstr "Prepínač:" + +msgid "Hub Mode" +msgstr "Režim hubu" + +msgid "Hostname:" +msgstr "Hostiteľské meno" + +msgid "ISA RAM:" +msgstr "ISA pamäť RAM:" + +msgid "ISA ROM:" +msgstr "ISA pamäť ROM:" + +msgid "&Wipe NVRAM" +msgstr "&Vymazať NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Týmto sa vymažú všetky súbory NVRAM (a súvisiace súbory) virtuálneho počítača umiestnené v podadresári „nvr“. V prípade potreby budete musieť znovu nakonfigurovať nastavenia systému BIOS (a prípadne aj ďalších zariadení vo vnútri virtuálneho počítača).\n\nNaozaj chcete vymazať celý obsah NVRAM virtuálneho počítača \"%1\"?" + +msgid "Success" +msgstr "Úspech" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Obsah NVRAM virtuálneho počítača \"%1\" bol úspešne vymazaný." + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Pri pokuse o vymazanie obsahu NVRAM virtuálneho počítača \"%1\" došlo k chybe" + +msgid "%1 VM Manager" +msgstr "Správca virtuálnych počítačov %1" + +msgid "%n disk(s)" +msgstr "%n disk(ov)" + +msgid "Unknown Status" +msgstr "Neznámy stav" + +msgid "No Machines Found!" +msgstr "Žádné počítače nalezeny!" + +msgid "Check for updates on startup" +msgstr "Skontroluj aktualizácie pri spustení" + +msgid "Unable to determine release information" +msgstr "Nebolo možné zistiť informácie o vydaní" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Pri kontrole aktualizácií došlo k chybe:\n\n%1\n\nSkúste to prosím neskôr znova." + +msgid "Update check complete" +msgstr "Kontrola aktualizácií dokončená" + +msgid "stable" +msgstr "stabilnú" + +msgid "beta" +msgstr "beta" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Používáte najnovšiu %1 verziu 86Boxu: %2" + +msgid "version" +msgstr "verzia" + +msgid "build" +msgstr "build" + +msgid "You are currently running version %1." +msgstr "Práve používate verziu %1." + +msgid "Version %1 is now available." +msgstr "K dispozícii je teraz verzia %1." + +msgid "You are currently running build %1." +msgstr "Práve používate build %1." + +msgid "Build %1 is now available." +msgstr "K dispozícii je teraz build %1." + +msgid "Would you like to visit the download page?" +msgstr "Chcete navštíviť stránku na stiahnutie?" + +msgid "Visit download page" +msgstr "Navštíviť stránku na stiahnutie" + +msgid "Update check" +msgstr "Kontrola aktualizácií" + +msgid "Checking for updates..." +msgstr "Prebieha kontrola aktualizácií..." + +msgid "86Box Update" +msgstr "Aktualizácia 86Box" + +msgid "Release notes:" +msgstr "Poznámky k vydaniu:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Havária virtuálneho počítača" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "Proces virtuálneho počítača \"%1\" bol neočakávane ukončený s kódom ukončenia %2." + +msgid "The system will not be added." +msgstr "Systém nebude pridaný." + +msgid "&Update mouse every CPU frame" +msgstr "&Aktualizovať myš pri každom rámci CPU" + +msgid "Hue" +msgstr "Odtieň" + +msgid "Saturation" +msgstr "Saturácia" + +msgid "Contrast" +msgstr "Kontrast" + +msgid "Brightness" +msgstr "Jas" + +msgid "Sharpness" +msgstr "Ostrota" + +msgid "&CGA composite settings..." +msgstr "Nastavenia kompozitného režimu &CGA..." + +msgid "CGA composite settings" +msgstr "Nastavenia kompozitného režimu CGA" diff --git a/src/qt/languages/sl-SI.po b/src/qt/languages/sl-SI.po index d4fd10e43..47a99b915 100644 --- a/src/qt/languages/sl-SI.po +++ b/src/qt/languages/sl-SI.po @@ -27,8 +27,14 @@ msgstr "Ctrl+Alt+&Esc" msgid "&Pause" msgstr "&Premor" -msgid "E&xit..." -msgstr "Iz&hod..." +msgid "Pause" +msgstr "Premor" + +msgid "Re&sume" +msgstr "&Nadaljuj" + +msgid "E&xit" +msgstr "Iz&hod" msgid "&View" msgstr "&Pogled" @@ -51,20 +57,17 @@ msgstr "&Upodabljanje" msgid "&Qt (Software)" msgstr "&Qt (programsko)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" msgstr "Open&GL (jedro 3.0)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." +msgid "Specify &dimensions..." msgstr "&Določi velikost..." -msgid "F&orce 4:3 display ratio" -msgstr "&Vsili razmerje zaslona 4:3" +msgid "Force &4:3 display ratio" +msgstr "Vsili razmerje zaslona &4:3" msgid "&Window scale factor" msgstr "&Faktor povečave okna" @@ -99,7 +102,7 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" +msgid "Fi<er method" msgstr "&Vrsta filtriranja" msgid "&Nearest" @@ -132,8 +135,8 @@ msgstr "&Celoštevilsko raztezanje" msgid "4:&3 Integer scale" msgstr "Celoštevilsko raztezanje 4:&3" -msgid "E&GA/(S)VGA settings" -msgstr "Nastavitve E&GA/(S)VGA" +msgid "EGA/(S)&VGA settings" +msgstr "Nastavitve EGA/(S)&VGA" msgid "&Inverted VGA monitor" msgstr "&Obrni barve zaslona VGA" @@ -144,9 +147,15 @@ msgstr "&Vrsta zaslona VGA" msgid "RGB &Color" msgstr "&Barvni RGB" +msgid "RGB (no brown)" +msgstr "RGB (brez rjave)" + msgid "&RGB Grayscale" msgstr "&Sivinski RGB" +msgid "Generic RGBI color monitor" +msgstr "Generični RGBI barvni monitor" + msgid "&Amber monitor" msgstr "&Rumeni zaslon" @@ -183,6 +192,9 @@ msgstr "&Orodja" msgid "&Settings..." msgstr "&Nastavitve..." +msgid "Settings..." +msgstr "Nastavitve..." + msgid "&Update status bar icons" msgstr "&Posodabljaj ikone statusne vrstice" @@ -259,7 +271,7 @@ msgid "&Folder..." msgstr "&Mapa..." msgid "Target &framerate" -msgstr "&Ciljno št. sličic na sekundo" +msgstr "&Ciljno št. kadrov na sekundo" msgid "&Sync with video" msgstr "&Sinhroniziraj z videom" @@ -348,6 +360,9 @@ msgstr "Sistem:" msgid "Configure" msgstr "Nastavi" +msgid "CPU:" +msgstr "Procesor:" + msgid "CPU type:" msgstr "Vrsta procesorja:" @@ -384,6 +399,15 @@ msgstr "Omogočeno (UTC)" msgid "Dynamic Recompiler" msgstr "Dinamični prevajalnik" +msgid "CPU frame size" +msgstr "Velikost blokov procesorja" + +msgid "Larger frames (less smooth)" +msgstr "Večji bloki (manj gladko)" + +msgid "Smaller frames (smoother)" +msgstr "Manjši bloki (bolj gladko)" + msgid "Video:" msgstr "Video:" @@ -399,12 +423,27 @@ msgstr "Grafika IBM 8514/A" msgid "XGA Graphics" msgstr "Grafika XGA" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "Grafika prikazovalnika IBM PS/55" + +msgid "Keyboard:" +msgstr "Tipkovnica:" + +msgid "Keyboard" +msgstr "Tipkovnica" + msgid "Mouse:" msgstr "Miška:" +msgid "Mouse" +msgstr "Miška" + msgid "Joystick:" msgstr "Igralna palica:" +msgid "Joystick" +msgstr "Igralna palica" + msgid "Joystick 1..." msgstr "Igralna palica 1..." @@ -435,6 +474,9 @@ msgstr "Izhodna naprava MIDI:" msgid "MIDI In Device:" msgstr "Vhodna naprava MIDI:" +msgid "MIDI Out:" +msgstr "Izhod MIDI:" + msgid "Standalone MPU-401" msgstr "Samostojen MPU-401" @@ -474,6 +516,9 @@ msgstr "Naprava LPT3:" msgid "LPT4 Device:" msgstr "Naprava LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "DMA ECP-ja notranjega LPT-ja:" + msgid "Serial port 1" msgstr "Serijska vrata 1" @@ -498,18 +543,21 @@ msgstr "Vzporedna vrata 3" msgid "Parallel port 4" msgstr "Vzporedna vrata 4" -msgid "HD Controller:" -msgstr "Krmilnik trdega diska:" - msgid "FD Controller:" msgstr "Disketni krmilnik:" +msgid "CD-ROM Controller:" +msgstr "Krmilnik CD-ROM:" + msgid "Tertiary IDE Controller" msgstr "Terciarni krmilnik IDE" msgid "Quaternary IDE Controller" msgstr "Kvartarni krmilnik IDE" +msgid "Hard disk" +msgstr "Trdi disk" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "Kasetnik" msgid "Hard disks:" msgstr "Trdi diski:" +msgid "Firmware Version" +msgstr "Različica programske opreme" + msgid "&New..." msgstr "Nov..." @@ -588,8 +639,14 @@ msgstr "Pogoni CD-ROM:" msgid "MO drives:" msgstr "Magnetno-optični pogoni:" -msgid "ZIP drives:" -msgstr "Pogoni ZIP:" +msgid "MO:" +msgstr "Magneto-optični:" + +msgid "Removable disks:" +msgstr "Odstranljivi diski:" + +msgid "Removable disk drives:" +msgstr "Odstranljivi diskovni pogoni:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "Ura realnega časa ISA:" msgid "ISA Memory Expansion" msgstr "Razširitev pomnilnika ISA" +msgid "ISA ROM Cards" +msgstr "Kartice ISA z ROM-i" + msgid "Card 1:" msgstr "Kartica 1:" @@ -612,6 +672,15 @@ msgstr "Kartica 3:" msgid "Card 4:" msgstr "Kartica 4:" +msgid "Generic ISA ROM Board" +msgstr "Generična plošča ISA z ROM-om" + +msgid "Generic Dual ISA ROM Board" +msgstr "Generična plošča ISA z dvema ROM-oma" + +msgid "Generic Quad ISA ROM Board" +msgstr "Generična plošča ISA s štirimi ROM-i" + msgid "ISABugger device" msgstr "Naprava ISABugger" @@ -633,11 +702,17 @@ msgstr " - ZAUSTAVLJEN" msgid "Speed" msgstr "Hitrost" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Odstranljivi disk %1 (%2): %3" -msgid "ZIP images" -msgstr "ZIP slike" +msgid "&Removable disk %1 (%2): %3" +msgstr "&Odstranljivi disk %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Slike odstranljivih diskov" + +msgid "Image %1" +msgstr "Slika %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "86Box ni našel nobenih uporabnih ROM slik.\n\nProsim prenesite komplet ROM-ov in ga razširite v mapo \"roms\"." @@ -696,12 +771,30 @@ msgstr "Omrežje" msgid "Ports (COM & LPT)" msgstr "Vrata (COM & LPT)" +msgid "Ports" +msgstr "Vrata" + +msgid "Serial ports:" +msgstr "Serijska vrata:" + +msgid "Parallel ports:" +msgstr "Paralelna vrata:" + msgid "Storage controllers" msgstr "Krmilniki shrambe" msgid "Hard disks" msgstr "Trdi diski" +msgid "Disks:" +msgstr "Diski:" + +msgid "Floppy:" +msgstr "Diskete:" + +msgid "Controllers:" +msgstr "Krmilniki:" + msgid "Floppy & CD-ROM drives" msgstr "Disketni in CD-ROM pogoni" @@ -711,6 +804,9 @@ msgstr "Druge odstranljive naprave" msgid "Other peripherals" msgstr "Druga periferija" +msgid "Other devices" +msgstr "Druge naprave" + msgid "Click to capture mouse" msgstr "Kliknite za zajem miške" @@ -769,20 +865,47 @@ msgid "3-axis, 2-button joystick" msgstr "Igralna palica s 3 osmi, 2 gumboma" msgid "3-axis, 4-button joystick" -msgstr "Igralna palica z 3 osmi, 4 gumbi" +msgstr "Igralna palica s 3 osmi, 4 gumbi" msgid "4-axis, 4-button joystick" -msgstr "Igralna palica z 4 osmi, 4 gumbi" +msgstr "Igralna palica s 4 osmi, 4 gumbi" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Pedals" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Thrustmaster Flight Control System" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Rudder Control System" + +msgid "2-button gamepad(s)" +msgstr "Igralna ploščica z 2 gumboma" + +msgid "2-button flight yoke" +msgstr "Letalski krmilni drog z 2 gumbi" + +msgid "4-button gamepad" +msgstr "Igralna ploščica s 4 gumbi" + +msgid "4-button flight yoke" +msgstr "Letalski krmilni drog s 4 gumbi" + +msgid "2-button flight yoke with throttle" +msgstr "Letalski krmilni drog z 2 gumbi gumboma ročico za plin" + +msgid "4-button flight yoke with throttle" +msgstr "Letalski krmilni drog s 4 gumbi z ročico za plin" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Volan Win95 s 3 osmi, 4 gumbi" + msgid "None" msgstr "Brez" @@ -792,6 +915,9 @@ msgstr "%1 MB (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Disketa %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Disketa %1 (%2): %3" + msgid "Advanced sector images" msgstr "Napredne sektorske slike" @@ -813,6 +939,9 @@ msgstr "GhostPCL-ja ni bilo mogoče inicializirati" msgid "MO %1 (%2): %3" msgstr "MO %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&MO %1 (%2): %3" + msgid "MO images" msgstr "Slike MO" @@ -822,6 +951,15 @@ msgstr "Dobrodošli v 86Box!" msgid "Internal device" msgstr "Vgrajena naprava" +msgid "&File" +msgstr "&Datoteka" + +msgid "&New machine..." +msgstr "&Nova naprava..." + +msgid "&Check for updates..." +msgstr "&Preveri obstoj posodobitev..." + msgid "Exit" msgstr "Izhod" @@ -849,8 +987,8 @@ msgstr "Emulator starih računalnikov\n\nAvtorji: Miran Grča (OBattler), Richar msgid "Hardware not available" msgstr "Strojna oprema ni na voljo" -msgid "Make sure %1 is installed and that you are on a libpcap-compatible network connection." -msgstr "Prepičajte se, da je nameščen %1 in da ste na omrežni povezavi, združljivi z libpcap." +msgid "Make sure %1 is installed and that you are on a %1-compatible network connection." +msgstr "Prepičajte se, da je nameščen %1 in da ste na omrežni povezavi, združljivi z %1." msgid "Invalid configuration" msgstr "Neveljavna konfiguracija" @@ -858,7 +996,7 @@ msgstr "Neveljavna konfiguracija" msgid "%1 is required for automatic conversion of PostScript files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as PostScript (.ps) files." msgstr "%1 je potreben za samodejno pretvorbo datotek PostScript v PDF.\n\nVsi dokumenti, poslani generičnemu tiskalniku PostScript bodo shranjeni kot datoteke PostScript (.ps)." -msgid "%1 is required for automatic conversion of PCL files to PDF.\n\nAny documents sent to the generic PCL printer will be saved as Printer Command Lnaugage (.pcl) files." +msgid "%1 is required for automatic conversion of PCL files to PDF.\n\nAny documents sent to the generic PCL printer will be saved as Printer Command Language (.pcl) files." msgstr "%1 je potreben za samodejno pretvorbo datotek PCL v PDF.\n\nVsi dokumenti, poslani generičnemu tiskalniku PCL bodo shranjeni kot datoteke Printer Command Language (.pcl)." msgid "Don't show this message again" @@ -897,12 +1035,18 @@ msgstr "Nadaljuj" msgid "Cassette: %1" msgstr "Kaseta: %1" +msgid "C&assette: %1" +msgstr "K&aseta: %1" + msgid "Cassette images" msgstr "Slike kaset" msgid "Cartridge %1: %2" msgstr "Spominski vložek %1: %2" +msgid "Car&tridge %1: %2" +msgstr "S&pominski vložek %1: %2" + msgid "Cartridge images" msgstr "Slike spominskega vložka" @@ -912,6 +1056,9 @@ msgstr "Nadaljuj izvajanje" msgid "Pause execution" msgstr "Prekini izvajanje" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Pritisni Ctrl+Alt+Del" @@ -921,9 +1068,279 @@ msgstr "Pritisni Ctrl+Alt+Esc" msgid "Hard reset" msgstr "Ponovni zagon" +msgid "Force shutdown" +msgstr "Prisilno prekini" + +msgid "Start" +msgstr "Zaženi" + +msgid "Not running" +msgstr "Se ne izvaja" + +msgid "Running" +msgstr "Se izvaja" + +msgid "Paused" +msgstr "Premor" + +msgid "Waiting" +msgstr "Čaka" + +msgid "Powered Off" +msgstr "Izklopljena" + +msgid "%n running" +msgstr "%n se izvaja" + +msgid "%n paused" +msgstr "%n v pavzi" + +msgid "%n waiting" +msgstr "%n čaka" + +msgid "%1 total" +msgstr "%1 skupno" + +msgid "VMs: %1" +msgstr "Navideznih naprav: %1" + +msgid "System Directory:" +msgstr "Imenik sistema:" + +msgid "Choose directory" +msgstr "Izberi imenik" + +msgid "Choose configuration file" +msgstr "Izberi datoteko z nastavitvami" + +msgid "86Box configuration files (86box.cfg)" +msgstr "Datoteke z nastavitvami programa 86Box (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Napaka pri branju nastavitev" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Ni bilo mogože odpreti izbrane datoteke z nastavitvami za branje: %1" + +msgid "Use regular expressions in search box" +msgstr "V iskalnem polju uporabi regularne ekspresije" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "Št. trenutno dejavnih naprav je %1. Ali vseeno želite izstopiti iz upravitelja navideznih naprav?" + +msgid "Add new system wizard" +msgstr "Čarovnik za dodajanje novega sistema" + +msgid "Introduction" +msgstr "Predstavitev" + +msgid "This will help you add a new system to 86Box." +msgstr "To Vam bo pomagalo dodati nov sistem v program 86Box." + +msgid "New configuration" +msgstr "Nove nastavitve" + +msgid "Complete" +msgstr "Dokončaj" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "Čarovnik bo zdaj zagnal nastavitev novega sistema." + +msgid "Use existing configuration" +msgstr "Uporabi obstoječe nastavitve" + +msgid "Type some notes here" +msgstr "Tukaj vpišite nekaj opomb" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Prilepite vsebino obstoječe datoteke z nastavitvami v spodnje polje." + +msgid "Load configuration from file" +msgstr "Naloži nastavitve iz datoteke" + +msgid "System name" +msgstr "Ime sistema" + +msgid "System name:" +msgstr "Ime sistema:" + +msgid "System name cannot contain certain characters" +msgstr "Ime sistema ne sme vsebovati določenih znakov" + +msgid "System name already exists" +msgstr "Ime sistema že obstaja" + +msgid "Please enter a directory for the system" +msgstr "Prosimo vpišite imenik za sistem" + +msgid "Directory does not exist" +msgstr "Imenik ne obstaja" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "Nov imenik sistema bo ustvarjen v zgoraj izbranem imeniku" + +msgid "System location:" +msgstr "Lokacija sistema:" + +msgid "System name and location" +msgstr "Ime sistema in lokacija" + +msgid "Enter the name of the system and choose the location" +msgstr "Vpišite ime sistema in izberite lokacijo" + +msgid "Enter the name of the system" +msgstr "Vpišite ime sistema" + +msgid "Please enter a system name" +msgstr "Prosimo, vpišite ime sistema" + +msgid "Display name (optional):" +msgstr "Prikazano ime (neobvezno):" + +msgid "Display name:" +msgstr "Prikazano ime:" + +msgid "Set display name" +msgstr "Nastavi prikazano ime" + +msgid "Enter the new display name (blank to reset)" +msgstr "Vstavi novo prikazano ime (prazno za ponastavitev)" + +msgid "Change &display name..." +msgstr "Spremeni &prikazano ime..." + +msgid "Context Menu" +msgstr "Kontekstni meni" + +msgid "&Open folder..." +msgstr "&Odpri mapo..." + +msgid "Open p&rinter tray..." +msgstr "Odpri pladenj &tiskalnika..." + +msgid "Set &icon..." +msgstr "Izberi &ikono" + +msgid "Select an icon" +msgstr "Izberi ikono" + +msgid "C&lone..." +msgstr "K&loniraj..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "Navidezna naprava \"%1\" (%2) bo klonirana v:" + +msgid "Directory %1 already exists" +msgstr "Direktorij %1 že obstaja" + +msgid "You cannot use the following characters in the name: %1" +msgstr "V imenu ne smete uporabiti sledečih znakov: %1" + +msgid "Clone" +msgstr "Kloniraj" + +msgid "Failed to create directory for cloned VM" +msgstr "Napaka pri izdelavi imenika za klonirani navidezni stroj" + +msgid "Failed to clone VM." +msgstr "Napaka pri kloniranju navidezne naprave." + +msgid "Directory in use" +msgstr "Direktorij v uporabi" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "Izbrani imenik je že v uporabi. Prosimo, izberite drug imenik." + +msgid "Create directory failed" +msgstr "Napaka pri ustvarjanju imenika" + +msgid "Unable to create the directory for the new system" +msgstr "Napaka pri ustvarjanju imenika za nov sistem" + +msgid "Configuration write failed" +msgstr "Napaka pri pisanju nastavitev" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Napaka pri odpiranju datoteke z nastavitvami %1 za pisanje" + +msgid "Error adding system" +msgstr "Napaka pri dodajanju sistema" + +msgid "Remove directory failed" +msgstr "Napaka pri odstranjevanju imenika" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Nekaterih datotek v imeniku naprave ni bilo mogoče izbrisati. Prosimo, izbrišite jih ročno." + +msgid "Build" +msgstr "Kompilacija" + +msgid "Version" +msgstr "Različica" + +msgid "An update to 86Box is available: %1 %2" +msgstr "Posodobitev programa 86Box je na voljo: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Prišlo je do napake med preverjanjem obstoja posodobitev: %1" + +msgid "An update to 86Box is available!" +msgstr "Posodobitev programa 86Box je na voljo!" + +msgid "Warning" +msgstr "Opozorilo" + +msgid "&Kill" +msgstr "&Prisilno končaj" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Prisilno končanje navidezne naprave lahko povzroči izgubo podatkov. To storite samo, če je proces 86Box postal neodziven.\n\nAli res želite prisilno končaiti navidzeno napravo \"%1\"?" + +msgid "&Delete" +msgstr "Iz&briši" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Ali res želite izbrisati navidezno napravo \"%1\" in vse njene datoteke? Preklic teka dejanja ni mogoč!" + +msgid "Show &config file" +msgstr "Prikaži datoteko z &nastavitvami" + +msgid "No screenshot" +msgstr "Ni zajemov zaslona" + +msgid "Search" +msgstr "Išči" + +msgid "Searching for VMs..." +msgstr "Iskanje navideznih naprav..." + +msgid "Found %1" +msgstr "%1 najden" + +msgid "System" +msgstr "Sistem" + +msgid "Storage" +msgstr "Shramba" + +msgid "Disk %1: " +msgstr "Disk %1: " + +msgid "No disks" +msgstr "Ni diskov" + +msgid "Audio" +msgstr "Zvok" + +msgid "Audio:" +msgstr "Zvok:" + msgid "ACPI shutdown" msgstr "Zaustavitev ACPI" +msgid "ACP&I shutdown" +msgstr "Zaustavitev ACP&I" + msgid "Hard disk (%1)" msgstr "Trdi disk (%1)" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 KB" @@ -1209,40 +1629,37 @@ msgstr "Naprave MCA" msgid "List of MCA devices:" msgstr "Seznam naprav MCA:" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Orodje za tablico" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "O programu &Qt" -msgid "About Qt" -msgstr "O programu Qt" - -msgid "MCA devices..." +msgid "&MCA devices..." msgstr "Naprave MCA..." -msgid "Show non-primary monitors" +msgid "Show non-&primary monitors" msgstr "Prikaži neprimarne monitorje" -msgid "Open screenshots folder..." +msgid "Open screenshots &folder..." msgstr "Odprite mapo s posnetki zaslona..." -msgid "Apply fullscreen stretch mode when maximized" +msgid "Appl&y fullscreen stretch mode when maximized" msgstr "Uporabi način celozaslonskega raztezanja v maksimiranem stanju" -msgid "Cursor/Puck" -msgstr "Kazalec/ključ" +msgid "&Cursor/Puck" +msgstr "&Kazalec/ključ" -msgid "Pen" -msgstr "Pisalo" +msgid "&Pen" +msgstr "&Pisalo" -msgid "Host CD/DVD Drive (%1:)" -msgstr "Gostiteljski pogon CD/DVD (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "&Gostiteljski pogon CD/DVD (%1:)" msgid "&Connected" msgstr "&Povezan" -msgid "Clear image history" +msgid "Clear image &history" msgstr "Počisti zgodovino slik" msgid "Create..." @@ -1257,14 +1674,20 @@ msgstr "Neznano vodilo" msgid "Null Driver" msgstr "Ničelni gonilnik" +msgid "NIC:" +msgstr "Omrežna kartica:" + msgid "NIC %1 (%2) %3" msgstr "NIC %1 (%2) %3" +msgid "&NIC %1 (%2) %3" +msgstr "&NIC %1 (%2) %3" + msgid "Render behavior" msgstr "Obnašanje pri upodabljanju" msgid "Use target framerate:" -msgstr "Uporabi ciljno št. sličic na sekundo:" +msgstr "Uporabi ciljno št. kadrov na sekundo:" msgid " fps" msgstr " fps" @@ -1323,6 +1746,9 @@ msgstr "Ni naprav MCA." msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" msgstr "Omrežna kartica 1" @@ -1365,9 +1791,27 @@ msgstr "Prepust za serijska vrata 3" msgid "Serial port passthrough 4" msgstr "Prepust za serijska vrata 4" -msgid "Renderer options..." +msgid "Renderer &options..." msgstr "Možnosti sistema za upodabljanje..." +msgid "PC/XT Keyboard" +msgstr "Tipkovnica PC/XT" + +msgid "AT Keyboard" +msgstr "Tipkovnica AT" + +msgid "AX Keyboard" +msgstr "Tipkovnica AX" + +msgid "PS/2 Keyboard" +msgstr "Tipkovnica PS/2" + +msgid "PS/55 Keyboard" +msgstr "Tipkovnica PS/55" + +msgid "Keys" +msgstr "Tipke" + msgid "Logitech/Microsoft Bus Mouse" msgstr "Miška na vodilu Logitech/Microsoft" @@ -1377,18 +1821,30 @@ msgstr "Miška na vodilu Microsoft (InPort)" msgid "Mouse Systems Serial Mouse" msgstr "Serijska miška Mouse Systems" +msgid "Mouse Systems Bus Mouse" +msgstr "Miška na vodilu Mouse Systems" + msgid "Microsoft Serial Mouse" msgstr "Serijska miška Microsoft" +msgid "Microsoft Serial BallPoint" +msgstr "Serijka miška Microsoft BallPoint" + msgid "Logitech Serial Mouse" msgstr "Serijska miška Logitech" msgid "PS/2 Mouse" msgstr "Miška PS/2" +msgid "PS/2 QuickPort Mouse" +msgstr "Miška PS/2 QuickPort" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (serijska)" +msgid "Default Baud rate" +msgstr "Privzeta baudna hitrost" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Standardni modem v skladen s Hayes" @@ -1413,21 +1869,81 @@ msgstr "Sistemski MIDI" msgid "MIDI Input Device" msgstr "Vhodna naprava MIDI" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "Datoteka BIOS-a" + +msgid "BIOS file (ROM #1)" +msgstr "Datoteka BIOS-a (ROM št. 1)" + +msgid "BIOS file (ROM #2)" +msgstr "Datoteka BIOS-a (ROM št. 2)" + +msgid "BIOS file (ROM #3)" +msgstr "Datoteka BIOS-a (ROM št. 3)" + +msgid "BIOS file (ROM #4)" +msgstr "Datoteka BIOS-a (ROM št. 4)" + +msgid "BIOS address" msgstr "Naslov BIOS-a" +msgid "BIOS address (ROM #1)" +msgstr "Naslov BIOS-a (ROM št. 1)" + +msgid "BIOS address (ROM #2)" +msgstr "Naslov BIOS-a (ROM št. 2)" + +msgid "BIOS address (ROM #3)" +msgstr "Naslov BIOS-a (ROM št. 3)" + +msgid "BIOS address (ROM #4)" +msgstr "Naslov BIOS-a (ROM št. 4)" + msgid "Enable BIOS extension ROM Writes" msgstr "Omogoči zapisovanje razširitev BIOS ROM-a" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "Omogoči pisanje v razširitveni ROM BIOS-a (ROM št. 1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "Omogoči pisanje v razširitveni ROM BIOS-a (ROM št. 2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "Omogoči pisanje v razširitveni ROM BIOS-a (ROM št. 3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "Omogoči pisanje v razširitveni ROM BIOS-a (ROM št. 4)" + +msgid "Linear framebuffer base" +msgstr "Naslov linearnega pomnilnika" + msgid "Address" msgstr "Naslov" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "IRQ serijskih vrat" + +msgid "Parallel port IRQ" +msgstr "IRQ paralelnih vrat" + msgid "BIOS Revision" msgstr "Revizija BIOS-a" +msgid "BIOS Version" +msgstr "Različica BIOS-a" + +msgid "BIOS Language" +msgstr "Jezik BIOS-a" + +msgid "IBM 5161 Expansion Unit" +msgstr "Razširitvena enota IBM 5161" + +msgid "IBM Cassette Basic" +msgstr "Kasetni BASIC IBM" + msgid "Translate 26 -> 17" msgstr "Prevedi 26 -> 17" @@ -1443,6 +1959,18 @@ msgstr "Invertiraj barve" msgid "BIOS size" msgstr "Velikost BIOS-a" +msgid "BIOS size (ROM #1)" +msgstr "Velikost BIOS-a (ROM št. 1)" + +msgid "BIOS size (ROM #2)" +msgstr "Velikost BIOS-a (ROM št. 2)" + +msgid "BIOS size (ROM #3)" +msgstr "Velikost BIOS-a (ROM št. 3)" + +msgid "BIOS size (ROM #4)" +msgstr "Velikost BIOS-a (ROM št. 4)" + msgid "Map C0000-C7FFF as UMB" msgstr "Preslikaj C0000-C7FFF kot UMB" @@ -1518,6 +2046,9 @@ msgstr "Raven odmeva" msgid "Interpolation Method" msgstr "Metoda interpolacije" +msgid "Dynamic Sample Loading" +msgstr "Dinamično nalaganje vzorcev" + msgid "Reverb Output Gain" msgstr "Ojačanje izhoda odmeva" @@ -1605,6 +2136,12 @@ msgstr "Nizki DMA" msgid "Enable Game port" msgstr "Omogočanje igralnih vrat" +msgid "SID Model" +msgstr "Model SID-a" + +msgid "SID Filter Strength" +msgstr "Jakost filtra SID-a" + msgid "Surround module" msgstr "Prostorski modul" @@ -1617,6 +2154,12 @@ msgstr "Dvigni prekinitev za CODEC ob nastavitvi CODEC-a (to potrebujejo nekater msgid "SB Address" msgstr "Naslov SB" +msgid "Adlib Address" +msgstr "Naslov Adlib" + +msgid "Use EEPROM setting" +msgstr "Uporabi nastavitve z EEPROM-a" + msgid "WSS IRQ" msgstr "IRQ WSS" @@ -1701,9 +2244,15 @@ msgstr "Vrsta RAMDAC" msgid "Blend" msgstr "Mešanica" +msgid "Font" +msgstr "Pisava" + msgid "Bilinear filtering" msgstr "Bilinearno filtriranje" +msgid "Video chroma-keying" +msgstr "Barvni ključ za videoposneke" + msgid "Dithering" msgstr "Barvno stresanje" @@ -1746,6 +2295,33 @@ msgstr "Hitrost prenosa" msgid "EMS mode" msgstr "Način EMS" +msgid "EMS Address" +msgstr "Naslov EMS" + +msgid "EMS 1 Address" +msgstr "Naslov EMS 1" + +msgid "EMS 2 Address" +msgstr "Naslov EMS 2" + +msgid "EMS Memory Size" +msgstr "Velikost pomnilnika EMS" + +msgid "EMS 1 Memory Size" +msgstr "Velikost pomnilnika EMS 1" + +msgid "EMS 2 Memory Size" +msgstr "Velikost pomnilnika EMS 2" + +msgid "Enable EMS" +msgstr "Omogoči EMS" + +msgid "Enable EMS 1" +msgstr "Omogoči EMS 1" + +msgid "Enable EMS 2" +msgstr "Omogoči EMS 2" + msgid "Address for > 2 MB" msgstr "Naslov za > 2 MB" @@ -1764,11 +2340,11 @@ msgstr "Vedno pri izbrani hitrosti" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "Nastavitev BIOS-a + Vroče tipke (izklopljeno med POST)" -msgid "64 kB starting from F0000" -msgstr "64 kB od F0000" +msgid "64 KB starting from F0000" +msgstr "64 KB od F0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB od E0000 (MSB naslova invertiran, najprej zadnjih 64 kB)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KB od E0000 (MSB naslova invertiran, najprej zadnjih 64 KB)" msgid "Sine" msgstr "Sinusna" @@ -1869,6 +2445,9 @@ msgstr "256 KB" msgid "Composite" msgstr "Kompozitni" +msgid "True color" +msgstr "Pravobarvni" + msgid "Old" msgstr "Stari" @@ -1902,6 +2481,15 @@ msgstr "Interpolacija sRGB" msgid "Linear interpolation" msgstr "Linearna interpolacija" +msgid "Has secondary 8x8 character set" +msgstr "Ima sekundarni nabor znakov 8x8" + +msgid "Has Quadcolor II daughter board" +msgstr "Ima hčerinsko ploščo Quadcolor II" + +msgid "Alternate monochrome contrast" +msgstr "Alternativni enobarvni kontrast" + msgid "128 KB" msgstr "128 KB" @@ -1935,6 +2523,9 @@ msgstr "Jantarni" msgid "Gray" msgstr "Sivi" +msgid "Grayscale" +msgstr "Sivinski" + msgid "Color" msgstr "Barvni" @@ -1950,6 +2541,12 @@ msgstr "Drugi jeziki" msgid "Bochs latest" msgstr "Bochs najnovejše" +msgid "Apply overscan deltas" +msgstr "Nanesi razlike v okvirju" + +msgid "Mono Interlaced" +msgstr "Enobarvni s prepletanjem" + msgid "Mono Non-Interlaced" msgstr "Enobarvni brez prepletanja" @@ -1962,6 +2559,9 @@ msgstr "Barvni brez prepletanja" msgid "3Dfx Voodoo Graphics" msgstr "3Dfx Voodoo Graphics" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 enoti TMU)" @@ -2031,6 +2631,9 @@ msgstr "Baudna hitrost prepusta" msgid "Named Pipe (Server)" msgstr "Poimenovana cev (Strežnik)" +msgid "Named Pipe (Client)" +msgstr "Poimenovana cev (Odjemalec)" + msgid "Host Serial Passthrough" msgstr "Prepust serijskih vrat gostitelja" @@ -2047,28 +2650,28 @@ msgid "High performance impact" msgstr "Visok učinek na hitrost delovanja" msgid "[Generic] RAM Disk (max. speed)" -msgstr "[Generic] Pomnilniški disk (največja hitrost)" +msgstr "[Generični] Pomnilniški disk (največja hitrost)" msgid "[Generic] 1989 (3500 RPM)" -msgstr "" +msgstr "[Generični] 1989 (3500 vrtlj./min.)" msgid "[Generic] 1992 (3600 RPM)" -msgstr "" +msgstr "[Generični] 1992 (3600 vrtlj./min.)" msgid "[Generic] 1994 (4500 RPM)" -msgstr "" +msgstr "[Generični] 1994 (4500 vrtlj./min.)" msgid "[Generic] 1996 (5400 RPM)" -msgstr "" +msgstr "[Generični] 1996 (5400 vrtlj./min.)" msgid "[Generic] 1997 (5400 RPM)" -msgstr "" +msgstr "[Generični] 1997 (5400 vrtlj./min.)" msgid "[Generic] 1998 (5400 RPM)" -msgstr "" +msgstr "[Generični] 1998 (5400 vrtlj./min.)" msgid "[Generic] 2000 (7200 RPM)" -msgstr "" +msgstr "[Generični] 2000 (7200 vrtlj./min.)" msgid "IBM 8514/A clone (ISA)" msgstr "Klon IBM 8514/A (ISA)" @@ -2076,6 +2679,12 @@ msgstr "Klon IBM 8514/A (ISA)" msgid "Vendor" msgstr "Proizvajalec" +msgid "30 Hz (JMP2 = 1)" +msgstr "30 Hz (JMP2 = 1)" + +msgid "60 Hz (JMP2 = 2)" +msgstr "60 Hz (JMP2 = 2)" + msgid "Generic PC/XT Memory Expansion" msgstr "Generična razširitev pomnilnika PC/XT" @@ -2104,10 +2713,10 @@ msgid "Options" msgstr "Možnosti" msgid "Model" -msgstr "" +msgstr "Model" msgid "Model:" -msgstr "" +msgstr "Model:" msgid "Failed to initialize Vulkan renderer." msgstr "Inicializacija upodobljevalnika Vulkan ni uspela." @@ -2147,3 +2756,201 @@ msgstr "Premakni dol" msgid "Could not load file %1" msgstr "Ni bilo mogoče naložiti datoteke %1" + +msgid "Key Bindings:" +msgstr "Kombinacije tipk" + +msgid "Action" +msgstr "Dejanje" + +msgid "Keybind" +msgstr "Kombinacija" + +msgid "Clear binding" +msgstr "Počisti kombinacijo" + +msgid "Bind" +msgstr "Dodeli" + +msgid "Bind Key" +msgstr "Dodeli tipko" + +msgid "Enter key combo:" +msgstr "Vpiši kombinacijo tipk:" + +msgid "Bind conflict" +msgstr "Konflikt med kombinacijami" + +msgid "This key combo is already in use." +msgstr "Ta kombinacija tipk je že v uporabi." + +msgid "Send Control+Alt+Del" +msgstr "Pošlji Control+Alt+Del" + +msgid "Send Control+Alt+Escape" +msgstr "Pošlji Control+Alt+Escape" + +msgid "Toggle fullscreen" +msgstr "Preklopi celozaslonski način" + +msgid "Screenshot" +msgstr "Zajem zaslona" + +msgid "Release mouse pointer" +msgstr "Izpusti kazalec miške" + +msgid "Toggle pause" +msgstr "Preklopi pavzo" + +msgid "Toggle mute" +msgstr "Preklopti tišino" + +msgid "Text files" +msgstr "Datoteke z besedilom" + +msgid "ROM files" +msgstr "Datoteke ROM" + +msgid "SoundFont files" +msgstr "Datoteke SoundFont" + +msgid "Local Switch" +msgstr "Lokalno stikalo" + +msgid "Remote Switch" +msgstr "Oddaljeno stikalo" + +msgid "Switch:" +msgstr "Stikalo:" + +msgid "Hub Mode" +msgstr "Način koncentratorja" + +msgid "Hostname:" +msgstr "Ime gostitelja:" + +msgid "ISA RAM:" +msgstr "RAM ISA:" + +msgid "ISA ROM:" +msgstr "ROM ISA:" + +msgid "&Wipe NVRAM" +msgstr "&Izbriši NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "To bo izbrisali vse datoteke NVRAM (in sorodne) navidezne naprave, ki se nahajajo v podimeniku \"nvr\". Morali boste ponovno nastaviti nastavitve BIOS-a (in verjetno tudi drugih naprav znotraj VS), če bo to potrebno.\n\nAli res želite izbrisati vso vsebino NVRAM-a navidezne naprave \"%1\"?" + +msgid "Success" +msgstr "Uspešno" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Vsebina NVRAM-a navidezne naprave \"%1\" je bila uspešno pobrisana" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Med brisanjem vsebine NVRAM-a navidezne naprave \"%1\" je prišlo do napake" + +msgid "%1 VM Manager" +msgstr "Upravitelj navideznih naprav %1" + +msgid "%n disk(s)" +msgstr "Št. diskov: %n" + +msgid "Unknown Status" +msgstr "Neznani status" + +msgid "No Machines Found!" +msgstr "Ni bilo najdenih naprav!" + +msgid "Check for updates on startup" +msgstr "Ob zagonu preveri obstoj posodobitev" + +msgid "Unable to determine release information" +msgstr "Ni bilo mogoče pridobiti informacij o različici" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Med preverjanjem obstoja posodobitev je prišlo do napake:\n\n%1\n\nProsimo, poskusite znova pozneje." + +msgid "Update check complete" +msgstr "Preverjanje obstoja posodobitev končano" + +msgid "stable" +msgstr "stabilno" + +msgid "beta" +msgstr "beta" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Izvajate zadnjo %1 različico programa 86Box: %2" + +msgid "version" +msgstr "različica" + +msgid "build" +msgstr "kompilacija" + +msgid "You are currently running version %1." +msgstr "Trenutno uporabljate različico %1." + +msgid "Version %1 is now available." +msgstr "Različica %1 je zdaj na voljo." + +msgid "You are currently running build %1." +msgstr "Trenutno uporabljate kompilacijo %1." + +msgid "Build %1 is now available." +msgstr "Kompilacija %1 je zdaj na voljo." + +msgid "Would you like to visit the download page?" +msgstr "Ali želite obiskati stran s prenosi?" + +msgid "Visit download page" +msgstr "Obišči stran s prenosi" + +msgid "Update check" +msgstr "Preveri obstoj posodobitev" + +msgid "Checking for updates..." +msgstr "Poteka preverjanje obstoja posodobitev..." + +msgid "86Box Update" +msgstr "Posodobitev programa 86Box" + +msgid "Release notes:" +msgstr "Opombe različice:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Sesutje navidezne naprave" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "Proces navidezne naprave \"%1\" se je nepričakovano zaključil z izhodno kodo %2." + +msgid "The system will not be added." +msgstr "Sistem ne bo dodan." + +msgid "&Update mouse every CPU frame" +msgstr "&Posodibi stanje miške ob vsakem bloku procesorja" + +msgid "Hue" +msgstr "Hue" + +msgid "Saturation" +msgstr "Nasičenost" + +msgid "Contrast" +msgstr "Kontrast" + +msgid "Brightness" +msgstr "Svetlost" + +msgid "Sharpness" +msgstr "Ostrina" + +msgid "&CGA composite settings..." +msgstr "Nastavitve kompozitnega načina &CGA..." + +msgid "CGA composite settings" +msgstr "Nastavitve kompozitnega načina CGA" diff --git a/src/qt/languages/sv-SE.po b/src/qt/languages/sv-SE.po index efbfab7eb..a0b4a0752 100644 --- a/src/qt/languages/sv-SE.po +++ b/src/qt/languages/sv-SE.po @@ -7,10 +7,10 @@ msgstr "" "X-Source-Language: en_US\n" msgid "&Action" -msgstr "" +msgstr "&Handling" msgid "&Keyboard requires capture" -msgstr "Tangentbord behöver uppfångas" +msgstr "&Tangentbord behöver uppfångas" msgid "&Right CTRL is left ALT" msgstr "&Höger CTRL är vänster ALT" @@ -27,8 +27,14 @@ msgstr "Ctrl+Alt+&Esc" msgid "&Pause" msgstr "&Pausa" -msgid "E&xit..." -msgstr "A&vsluta..." +msgid "Pause" +msgstr "&Pausa" + +msgid "Re&sume" +msgstr "Fo&rtsätt" + +msgid "E&xit" +msgstr "A&vsluta" msgid "&View" msgstr "&Visa" @@ -51,20 +57,17 @@ msgstr "Re&nderare" msgid "&Qt (Software)" msgstr "&Qt (Mjukvara)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" msgstr "Open&GL (3.0 Core)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." -msgstr "Ange mått..." +msgid "Specify &dimensions..." +msgstr "Ange &mått..." -msgid "F&orce 4:3 display ratio" -msgstr "T&vinga 4:3 bildförhållande" +msgid "Force &4:3 display ratio" +msgstr "Tvinga &4:3 bildförhållande" msgid "&Window scale factor" msgstr "&Skalningsfaktor för fönster" @@ -99,8 +102,8 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" -msgstr "Filtermetod" +msgid "Fi<er method" +msgstr "Fi<ermetod" msgid "&Nearest" msgstr "&Närmsta" @@ -109,7 +112,7 @@ msgid "&Linear" msgstr "&Linjär" msgid "Hi&DPI scaling" -msgstr "Hög&DPI-skalning" +msgstr "Hög &DPI-skalning" msgid "&Fullscreen" msgstr "&Helskärm" @@ -132,8 +135,8 @@ msgstr "&Skala till heltal" msgid "4:&3 Integer scale" msgstr "Skala till heltal i 4:&3" -msgid "E&GA/(S)VGA settings" -msgstr "E&GA/(S)VGA-inställningar" +msgid "EGA/(S)&VGA settings" +msgstr "EGA/(S)&VGA-inställningar" msgid "&Inverted VGA monitor" msgstr "&Inverterad VGA-skärm" @@ -144,9 +147,15 @@ msgstr "Skärmtyp för &VGA" msgid "RGB &Color" msgstr "RGB &färg" +msgid "RGB (no brown)" +msgstr "RGB (utan brunt)" + msgid "&RGB Grayscale" msgstr "&RGB gråskala" +msgid "Generic RGBI color monitor" +msgstr "Allmän RGBI färgskärm" + msgid "&Amber monitor" msgstr "&Bärnstensfärgad skärm" @@ -183,6 +192,9 @@ msgstr "&Verktyg" msgid "&Settings..." msgstr "&Inställningar..." +msgid "Settings..." +msgstr "Inställningar..." + msgid "&Update status bar icons" msgstr "&Uppdatera statusfältets ikoner" @@ -348,6 +360,9 @@ msgstr "Maskin:" msgid "Configure" msgstr "Konfigurera" +msgid "CPU:" +msgstr "Processor:" + msgid "CPU type:" msgstr "Processortyp:" @@ -384,6 +399,15 @@ msgstr "Aktiverad (UTC)" msgid "Dynamic Recompiler" msgstr "Dynamisk omkompilering" +msgid "CPU frame size" +msgstr "Ramstorlek för processor" + +msgid "Larger frames (less smooth)" +msgstr "Större ramar (mindre smidigt)" + +msgid "Smaller frames (smoother)" +msgstr "Mindre ramar (smidigare)" + msgid "Video:" msgstr "Bildskärmskort:" @@ -399,12 +423,27 @@ msgstr "IBM 8514/A-grafik" msgid "XGA Graphics" msgstr "XGA-grafik" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "IBM PS/55 bildskärmsadapter" + +msgid "Keyboard:" +msgstr "Tangentbord:" + +msgid "Keyboard" +msgstr "Tangentbord" + msgid "Mouse:" msgstr "Mus:" +msgid "Mouse" +msgstr "Mus" + msgid "Joystick:" msgstr "Styrspak:" +msgid "Joystick" +msgstr "Styrspak" + msgid "Joystick 1..." msgstr "Styrspak 1..." @@ -435,6 +474,9 @@ msgstr "Enhet för MIDI-utdata:" msgid "MIDI In Device:" msgstr "Enhet för MIDI-indata:" +msgid "MIDI Out:" +msgstr "MIDI-utgång:" + msgid "Standalone MPU-401" msgstr "Fristående MPU-401" @@ -474,6 +516,9 @@ msgstr "LPT3-enhet:" msgid "LPT4 Device:" msgstr "LPT4-enhet:" +msgid "Internal LPT ECP DMA:" +msgstr "Intern LPT ECP DMA:" + msgid "Serial port 1" msgstr "Serieport 1" @@ -498,18 +543,21 @@ msgstr "Parallellport 3" msgid "Parallel port 4" msgstr "Parallellport 4" -msgid "HD Controller:" -msgstr "Styrenhet för hårddisk:" - msgid "FD Controller:" msgstr "Styrenhet för diskett:" +msgid "CD-ROM Controller:" +msgstr "Styrenhet för CD-ROM:" + msgid "Tertiary IDE Controller" msgstr "Tertiär IDE-kontroller" msgid "Quaternary IDE Controller" msgstr "Kvartär IDE-kontroller" +msgid "Hard disk" +msgstr "Hårddisk" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "Kassettband" msgid "Hard disks:" msgstr "Hårddiskar:" +msgid "Firmware Version" +msgstr "Firmware-version" + msgid "&New..." msgstr "&Ny..." @@ -588,8 +639,14 @@ msgstr "CD-ROM-enheter:" msgid "MO drives:" msgstr "MO-enheter:" -msgid "ZIP drives:" -msgstr "Zip-enheter:" +msgid "MO:" +msgstr "MO:" + +msgid "Removable disks:" +msgstr "Flyttbara diskar:" + +msgid "Removable disk drives:" +msgstr "Enheter för flyttbara diskar:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "ISA realtidsklocka:" msgid "ISA Memory Expansion" msgstr "ISA minnesexpansion" +msgid "ISA ROM Cards" +msgstr "ISA ROM-kort" + msgid "Card 1:" msgstr "Kort 1:" @@ -612,6 +672,15 @@ msgstr "Kort 3:" msgid "Card 4:" msgstr "Kort 4:" +msgid "Generic ISA ROM Board" +msgstr "Allmän ISA ROM-kort" + +msgid "Generic Dual ISA ROM Board" +msgstr "Allmän dubbel ISA ROM-kort" + +msgid "Generic Quad ISA ROM Board" +msgstr "Allmän fyrdubbel ISA ROM-kort" + msgid "ISABugger device" msgstr "ISABugger-enhet" @@ -633,11 +702,17 @@ msgstr " - PAUSAD" msgid "Speed" msgstr "Hastighet" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Flyttbar disk %1 (%2): %3" -msgid "ZIP images" -msgstr "Zip-avbildningar" +msgid "&Removable disk %1 (%2): %3" +msgstr "&Flyttbar disk %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Flyttbara disk-avbildningar" + +msgid "Image %1" +msgstr "Avbildning %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "86Box kunde inte hitta några användbara ROM-avbildningar.\n\nVänligen ladda ner en ROM-uppsättning och extrahera den till mappen \"roms\"." @@ -696,12 +771,30 @@ msgstr "Nätverk" msgid "Ports (COM & LPT)" msgstr "Portar (COM & LPT)" +msgid "Ports" +msgstr "Portar" + +msgid "Serial ports:" +msgstr "Serieportar:" + +msgid "Parallel ports:" +msgstr "Parallelportar:" + msgid "Storage controllers" msgstr "Styrenheter för lagring" msgid "Hard disks" msgstr "Hårddiskar" +msgid "Disks:" +msgstr "Diskar:" + +msgid "Floppy:" +msgstr "Diskett:" + +msgid "Controllers:" +msgstr "Styrenheter:" + msgid "Floppy & CD-ROM drives" msgstr "Diskett- och CD-ROM-enheter" @@ -711,6 +804,9 @@ msgstr "Andra flyttbara enheter" msgid "Other peripherals" msgstr "Andra tillbehör" +msgid "Other devices" +msgstr "Andra enheter" + msgid "Click to capture mouse" msgstr "Klicka för att fånga upp musen" @@ -742,7 +838,7 @@ msgid "Default" msgstr "Standard" msgid "%1 Wait state(s)" -msgstr "" +msgstr "%1 Wait state(s)" msgid "Type" msgstr "Typ" @@ -777,12 +873,39 @@ msgstr "Styrspak med 4 axlar och 4 knappar" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH-pedaler" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Thrustmaster Flight Control System" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Rudder Control System" + +msgid "2-button gamepad(s)" +msgstr "Handkontroll(er) med två knappar" + +msgid "2-button flight yoke" +msgstr "Styrspak med två knappar" + +msgid "4-button gamepad" +msgstr "Handkontroll med fyra knappar" + +msgid "4-button flight yoke" +msgstr "Styrspak med fyra knappar" + +msgid "2-button flight yoke with throttle" +msgstr "Styrspak med två knappar och gas" + +msgid "4-button flight yoke with throttle" +msgstr "Styrspak med fyra knappar och gas" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Win95-ratt (tre axlar, fyra knappar)" + msgid "None" msgstr "Ingen" @@ -792,6 +915,9 @@ msgstr "%1 MB (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Diskett %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Diskett %1 (%2): %3" + msgid "Advanced sector images" msgstr "Avancerade sektoravbildningar" @@ -813,6 +939,9 @@ msgstr "Ej möjligt att initialisera GhostPCL" msgid "MO %1 (%2): %3" msgstr "MO %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&MO %1 (%2): %3" + msgid "MO images" msgstr "MO-avbildningar" @@ -822,6 +951,15 @@ msgstr "Välkommen till 86Box!" msgid "Internal device" msgstr "Intern enhet" +msgid "&File" +msgstr "&Fil" + +msgid "&New machine..." +msgstr "&Ny maskin..." + +msgid "&Check for updates..." +msgstr "&Leta efter uppdateringar..." + msgid "Exit" msgstr "Avsluta" @@ -897,12 +1035,18 @@ msgstr "Fortsätt" msgid "Cassette: %1" msgstr "Kassettband: %1" +msgid "C&assette: %1" +msgstr "K&assettband: %1" + msgid "Cassette images" msgstr "Kassettbandsavbildningar" msgid "Cartridge %1: %2" msgstr "Kassett %1: %2" +msgid "Car&tridge %1: %2" +msgstr "Ka&ssett %1: %2" + msgid "Cartridge images" msgstr "Kassettavbildningar" @@ -912,6 +1056,9 @@ msgstr "Fortsätt exekvering" msgid "Pause execution" msgstr "Pausa exekvering" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Tryck på Ctrl+Alt+Del" @@ -921,9 +1068,279 @@ msgstr "Tryck på Ctrl+Alt+Esc" msgid "Hard reset" msgstr "Hård omstart" +msgid "Force shutdown" +msgstr "Tvinga avstängning" + +msgid "Start" +msgstr "Starta" + +msgid "Not running" +msgstr "Körs ej" + +msgid "Running" +msgstr "Körs" + +msgid "Paused" +msgstr "Pausad" + +msgid "Waiting" +msgstr "Väntar" + +msgid "Powered Off" +msgstr "Avstängd" + +msgid "%n running" +msgstr "%n körs" + +msgid "%n paused" +msgstr "%n pausad" + +msgid "%n waiting" +msgstr "%n väntar" + +msgid "%1 total" +msgstr "%1 sammanlagt" + +msgid "VMs: %1" +msgstr "VM: %1" + +msgid "System Directory:" +msgstr "Systemmapp:" + +msgid "Choose directory" +msgstr "Välj mapp" + +msgid "Choose configuration file" +msgstr "Välj konfigurationsfil" + +msgid "86Box configuration files (86box.cfg)" +msgstr "86Box konfigurationsfiler (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Kunde inte läsa konfiguration" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Kunde inte läsa den valda konfigurationsfilen: %1" + +msgid "Use regular expressions in search box" +msgstr "Använd vanliga uttryck i sökfältet" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 maskin(er) är aktiva. Är du säker på att du vill avsluta VM-hanteraren ändå?" + +msgid "Add new system wizard" +msgstr "Guiden Lägg till nytt system" + +msgid "Introduction" +msgstr "Introduktion" + +msgid "This will help you add a new system to 86Box." +msgstr "Detta kommer att hjälpa dig lägga till ett nytt system till 86Box." + +msgid "New configuration" +msgstr "Ny konfiguration" + +msgid "Complete" +msgstr "Färdig" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "Guiden kommer nu starta konfigurationen för det nya systemet." + +msgid "Use existing configuration" +msgstr "Använd befintlig konfiguration" + +msgid "Type some notes here" +msgstr "Skriv anteckningar här" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Klistra in innehållet i den befintliga konfigurationsfilen i fältet nedanför." + +msgid "Load configuration from file" +msgstr "Ladda konfiguration från fil" + +msgid "System name" +msgstr "Systemnamn" + +msgid "System name:" +msgstr "Systemnamn:" + +msgid "System name cannot contain certain characters" +msgstr "Systemnamnet kan inte innehålla vissa tecken" + +msgid "System name already exists" +msgstr "Systemnamnet finns redan" + +msgid "Please enter a directory for the system" +msgstr "Välj en mapp till systemet" + +msgid "Directory does not exist" +msgstr "Mappen finns inte" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "En ny mapp till systemet kommer att skapas i den valda mappen ovanför" + +msgid "System location:" +msgstr "Systemplats:" + +msgid "System name and location" +msgstr "Systemnamn och plats" + +msgid "Enter the name of the system and choose the location" +msgstr "Ange namn på systemet och välj plats" + +msgid "Enter the name of the system" +msgstr "Ange namn på systemet" + +msgid "Please enter a system name" +msgstr "Ange ett systemnamn" + +msgid "Display name (optional):" +msgstr "Visningsnamn (valfritt):" + +msgid "Display name:" +msgstr "Visningsnamn:" + +msgid "Set display name" +msgstr "Ställ in visningsnamn" + +msgid "Enter the new display name (blank to reset)" +msgstr "Ange nytt visningsnamn (tom för att återställa)" + +msgid "Change &display name..." +msgstr "Ändra &visningsnamn..." + +msgid "Context Menu" +msgstr "Innehållsmeny" + +msgid "&Open folder..." +msgstr "&Öppna mapp..." + +msgid "Open p&rinter tray..." +msgstr "Öppna &skrivarfack..." + +msgid "Set &icon..." +msgstr "Ställ in &ikon..." + +msgid "Select an icon" +msgstr "Välj en ikon" + +msgid "C&lone..." +msgstr "K&lona..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "Virtuell maskin \"%1\" (%2) kommer att klonas till:" + +msgid "Directory %1 already exists" +msgstr "Mapp %1 finns redan" + +msgid "You cannot use the following characters in the name: %1" +msgstr "Du kan inte använda följande tecken i namnet: %1" + +msgid "Clone" +msgstr "Klona" + +msgid "Failed to create directory for cloned VM" +msgstr "Kunde inte skapa mapp för klonad VM" + +msgid "Failed to clone VM." +msgstr "Kunde inte klona VM." + +msgid "Directory in use" +msgstr "Mapp används" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "Den valda mappen används redan. Välj en annan mapp." + +msgid "Create directory failed" +msgstr "Kunde inte skapa mapp" + +msgid "Unable to create the directory for the new system" +msgstr "Kunde inte skapa mapp för nytt system" + +msgid "Configuration write failed" +msgstr "Kunde inte skriva konfiguration" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Kunde inte skriva till konfigurationsfil på %1" + +msgid "Error adding system" +msgstr "Fel vid tillägg av system" + +msgid "Remove directory failed" +msgstr "Kunde inte ta bort mapp" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Några filer i maskinens mapp kunde inte tas bort. Ta bort de manuellt." + +msgid "Build" +msgstr "Build" + +msgid "Version" +msgstr "Version" + +msgid "An update to 86Box is available: %1 %2" +msgstr "En uppdatering till 86Box är tillgänglig: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Vid kontroll av uppdateringar uppstod ett fel: %1" + +msgid "An update to 86Box is available!" +msgstr "En uppdatering till 86Box är tillgänglig!" + +msgid "Warning" +msgstr "Varning" + +msgid "&Kill" +msgstr "&Döda" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Att döda en virtuell maskin kan orsaka dataförlust. Gör detta endast om 86Box-processen hänger sig.\n\nVill du verkligen döda virtuella maskinen \"%1\"?" + +msgid "&Delete" +msgstr "&Ta bort" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Vill du verkligen ta bort virtuella maskinen \"%1\" och alla dess filer? Denna handling kan inte ångras!" + +msgid "Show &config file" +msgstr "Visa &konfigurationsfil" + +msgid "No screenshot" +msgstr "Inga skärmbilder" + +msgid "Search" +msgstr "Sök" + +msgid "Searching for VMs..." +msgstr "Söker efter VM..." + +msgid "Found %1" +msgstr "Hittade %1" + +msgid "System" +msgstr "System" + +msgid "Storage" +msgstr "Lagring" + +msgid "Disk %1: " +msgstr "Disk %1:" + +msgid "No disks" +msgstr "Inga diskar" + +msgid "Audio" +msgstr "Ljud" + +msgid "Audio:" +msgstr "Ljud:" + msgid "ACPI shutdown" msgstr "ACPI-avstängning" +msgid "ACP&I shutdown" +msgstr "ACP&I-avstängning" + msgid "Hard disk (%1)" msgstr "Hårddisk (%1)" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 KB" @@ -1209,40 +1629,37 @@ msgstr "MCA-enheter" msgid "List of MCA devices:" msgstr "Lista på MCA-enheter:" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Plattverktyg" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "Om &Qt" -msgid "About Qt" -msgstr "Om Qt" - -msgid "MCA devices..." +msgid "&MCA devices..." msgstr "MCA-enheter..." -msgid "Show non-primary monitors" +msgid "Show non-&primary monitors" msgstr "Visa icke-primära skärmar" -msgid "Open screenshots folder..." +msgid "Open screenshots &folder..." msgstr "Öppna skärmbildsmappen..." -msgid "Apply fullscreen stretch mode when maximized" +msgid "Appl&y fullscreen stretch mode when maximized" msgstr "Tillämpa sträckläge för helskärm när den är maximerad" -msgid "Cursor/Puck" -msgstr "Pekare/puck" +msgid "&Cursor/Puck" +msgstr "&Pekare/puck" -msgid "Pen" -msgstr "Penna" +msgid "&Pen" +msgstr "P&enna" -msgid "Host CD/DVD Drive (%1:)" -msgstr "Värdenhet för CD/DVD (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "&Värdenhet för CD/DVD (%1:)" msgid "&Connected" msgstr "&Ansluten" -msgid "Clear image history" +msgid "Clear image &history" msgstr "Rensa historik för avbildningar" msgid "Create..." @@ -1257,9 +1674,15 @@ msgstr "Okänd buss" msgid "Null Driver" msgstr "Tom drivrutin" +msgid "NIC:" +msgstr "NIC:" + msgid "NIC %1 (%2) %3" msgstr "NIC %1 (%2) %3" +msgid "&NIC %1 (%2) %3" +msgstr "&NIC %1 (%2) %3" + msgid "Render behavior" msgstr "Renderingsbeteende" @@ -1276,7 +1699,7 @@ msgid "Synchronize with video" msgstr "Synkronisera med bild" msgid "Shaders" -msgstr "" +msgstr "Shaders" msgid "Remove" msgstr "Ta bort" @@ -1323,6 +1746,9 @@ msgstr "Inga MCA-enheter." msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" msgstr "Nätverkskort #1" @@ -1365,30 +1791,60 @@ msgstr "Serieport passthrough 3" msgid "Serial port passthrough 4" msgstr "Serieport passthrough 4" -msgid "Renderer options..." +msgid "Renderer &options..." msgstr "Renderingsalternativ..." +msgid "PC/XT Keyboard" +msgstr "PC/XT-tangentbord" + +msgid "AT Keyboard" +msgstr "AT-tangenbord" + +msgid "AX Keyboard" +msgstr "AX-tangentbord" + +msgid "PS/2 Keyboard" +msgstr "PS/2-tangentbord" + +msgid "PS/55 Keyboard" +msgstr "PS/55-tangentbord" + +msgid "Keys" +msgstr "Tangenter" + msgid "Logitech/Microsoft Bus Mouse" -msgstr "Logitech/Microsoft-buss-mus" +msgstr "Logitech/Microsoft Bus-mus" msgid "Microsoft Bus Mouse (InPort)" -msgstr "Microsoft-buss-mus (InPort)" +msgstr "Microsoft Bus-mus (InPort)" msgid "Mouse Systems Serial Mouse" msgstr "Mouse Systems seriemus" +msgid "Mouse Systems Bus Mouse" +msgstr "Mouse Systems Bus-mus" + msgid "Microsoft Serial Mouse" msgstr "Microsoft seriemus" +msgid "Microsoft Serial BallPoint" +msgstr "Microsoft serie-BallPoint" + msgid "Logitech Serial Mouse" msgstr "Logitech seriemus" msgid "PS/2 Mouse" msgstr "PS/2-mus" +msgid "PS/2 QuickPort Mouse" +msgstr "PS/2 QuickPort-mus" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (serie)" +msgid "Default Baud rate" +msgstr "Standard Baudhastighet" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Standard Hayes-kompatibelt modem" @@ -1413,20 +1869,80 @@ msgstr "System-MIDI" msgid "MIDI Input Device" msgstr "Indataenhet för MIDI" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "BIOS-fil" + +msgid "BIOS file (ROM #1)" +msgstr "BIOS-fil (ROM #1)" + +msgid "BIOS file (ROM #2)" +msgstr "BIOS-fil (ROM #2)" + +msgid "BIOS file (ROM #3)" +msgstr "BIOS-fil (ROM #3)" + +msgid "BIOS file (ROM #4)" +msgstr "BIOS-fil (ROM #4)" + +msgid "BIOS address" msgstr "BIOS-adress" +msgid "BIOS address (ROM #1)" +msgstr "BIOS-adress (ROM #1)" + +msgid "BIOS address (ROM #2)" +msgstr "BIOS-adress (ROM #2)" + +msgid "BIOS address (ROM #3)" +msgstr "BIOS-adress (ROM #3)" + +msgid "BIOS address (ROM #4)" +msgstr "BIOS-adress (ROM #4)" + msgid "Enable BIOS extension ROM Writes" msgstr "Aktivera ROM-skrivningar för utökat BIOS" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "Aktivera ROM-skrivningar för utökat BIOS (ROM #1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "Aktivera ROM-skrivningar för utökat BIOS (ROM #2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "Aktivera ROM-skrivningar för utökat BIOS (ROM #3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "Aktivera ROM-skrivningar för utökat BIOS (ROM #4)" + +msgid "Linear framebuffer base" +msgstr "Linjär bas för skärmbuffert" + msgid "Address" msgstr "Adress" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "IRQ för serieport" + +msgid "Parallel port IRQ" +msgstr "IRQ för parallelport" + msgid "BIOS Revision" -msgstr "BIOS revision" +msgstr "BIOS-revision" + +msgid "BIOS Version" +msgstr "BIOS-version" + +msgid "BIOS Language" +msgstr "BIOS-språk" + +msgid "IBM 5161 Expansion Unit" +msgstr "IBM 5161 expansionsenhet" + +msgid "IBM Cassette Basic" +msgstr "IBM Cassette Basic" msgid "Translate 26 -> 17" msgstr "Översätt 26 -> 17" @@ -1443,6 +1959,18 @@ msgstr "Invertera färger" msgid "BIOS size" msgstr "Storlek på BIOS" +msgid "BIOS size (ROM #1)" +msgstr "Storlek på BIOS (ROM #1)" + +msgid "BIOS size (ROM #2)" +msgstr "Storlek på BIOS (ROM #2)" + +msgid "BIOS size (ROM #3)" +msgstr "Storlek på BIOS (ROM #3)" + +msgid "BIOS size (ROM #4)" +msgstr "Storlek på BIOS (BIOS #4)" + msgid "Map C0000-C7FFF as UMB" msgstr "Kartlägg C0000-C7FFF som UMB" @@ -1518,6 +2046,9 @@ msgstr "Reverb nivå" msgid "Interpolation Method" msgstr "Interpoleringsmetod" +msgid "Dynamic Sample Loading" +msgstr "Dynamisk sampelladdning" + msgid "Reverb Output Gain" msgstr "Reverb utmatningsförstärkning" @@ -1605,6 +2136,12 @@ msgstr "Låg DMA" msgid "Enable Game port" msgstr "Aktivera spelport" +msgid "SID Model" +msgstr "SID-modell" + +msgid "SID Filter Strength" +msgstr "SID filetstyrka" + msgid "Surround module" msgstr "Sorround-modul" @@ -1617,6 +2154,12 @@ msgstr "Öka avbrottsnummer för CODEC vid CODEC-installation (krävs av vissa d msgid "SB Address" msgstr "Adress för SB" +msgid "Adlib Address" +msgstr "Adlib-adress" + +msgid "Use EEPROM setting" +msgstr "Använd EEPROM-inställning" + msgid "WSS IRQ" msgstr "WSS IRQ" @@ -1701,9 +2244,15 @@ msgstr "RAMDAC-typ" msgid "Blend" msgstr "Blanda" +msgid "Font" +msgstr "Typsnitt" + msgid "Bilinear filtering" msgstr "Bilinjär filtrering" +msgid "Video chroma-keying" +msgstr "Video chroma-keying" + msgid "Dithering" msgstr "Dithering" @@ -1746,6 +2295,33 @@ msgstr "Överföringshastighet" msgid "EMS mode" msgstr "EMS-läge" +msgid "EMS Address" +msgstr "EMS-adress" + +msgid "EMS 1 Address" +msgstr "EMS 1-adress" + +msgid "EMS 2 Address" +msgstr "EMS 2-adress" + +msgid "EMS Memory Size" +msgstr "EMS minnesstorlek" + +msgid "EMS 1 Memory Size" +msgstr "EMS 1 minnesstorlek" + +msgid "EMS 2 Memory Size" +msgstr "EMS 2 minnesstorlek" + +msgid "Enable EMS" +msgstr "Aktivera EMS" + +msgid "Enable EMS 1" +msgstr "Aktivera EMS 1" + +msgid "Enable EMS 2" +msgstr "Aktivera EMS 2" + msgid "Address for > 2 MB" msgstr "Adress till > 2 MB" @@ -1764,11 +2340,11 @@ msgstr "Alltid vid den valda hastigheten" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "BIOS-inställningar + Snabbtangenter (av under POST)" -msgid "64 kB starting from F0000" -msgstr "64 kB som börjar från F0000" +msgid "64 KB starting from F0000" +msgstr "64 KB som börjar från F0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB som börjar från E0000 (adress MSB inverterad, de sista 64KB först)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KB som börjar från E0000 (adress MSB inverterad, de sista 64 KB först)" msgid "Sine" msgstr "Sinus" @@ -1804,7 +2380,7 @@ msgid "Five + Wheel" msgstr "Fem med hjul" msgid "Five + 2 Wheels" -msgstr "" +msgstr "Fem med två hjul" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 serie / SMT3(R)V" @@ -1869,6 +2445,9 @@ msgstr "256 KB" msgid "Composite" msgstr "Komposit" +msgid "True color" +msgstr "True color" + msgid "Old" msgstr "Gammal" @@ -1902,6 +2481,15 @@ msgstr "sRGB-interpolering" msgid "Linear interpolation" msgstr "Linjär interpolering" +msgid "Has secondary 8x8 character set" +msgstr "Har sekundär 8x8 teckenuppsättning" + +msgid "Has Quadcolor II daughter board" +msgstr "Har Quadcolor II dotterkort" + +msgid "Alternate monochrome contrast" +msgstr "Alternativ monokrom kontrast" + msgid "128 KB" msgstr "128 KB" @@ -1935,6 +2523,9 @@ msgstr "Bärnstensfärgad" msgid "Gray" msgstr "Grå" +msgid "Grayscale" +msgstr "Gråskala" + msgid "Color" msgstr "Färg" @@ -1950,6 +2541,12 @@ msgstr "Andra språk" msgid "Bochs latest" msgstr "Bochs senaste" +msgid "Apply overscan deltas" +msgstr "Tillämpa delta för överskanning" + +msgid "Mono Interlaced" +msgstr "Monokrom sammanflätad" + msgid "Mono Non-Interlaced" msgstr "Ej sammanflätad monokrom" @@ -1962,6 +2559,9 @@ msgstr "Ej sammanflätad färg" msgid "3Dfx Voodoo Graphics" msgstr "3Dfx Voodoo-grafik" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 TMUs)" @@ -2031,6 +2631,9 @@ msgstr "Passthroughns Baudhastighet" msgid "Named Pipe (Server)" msgstr "Namngiven pipe (server)" +msgid "Named Pipe (Client)" +msgstr "Namngiven pipe (klient)" + msgid "Host Serial Passthrough" msgstr "Värd-seriepassthrough" @@ -2116,7 +2719,7 @@ msgid "Model:" msgstr "Modell:" msgid "Failed to initialize Vulkan renderer." -msgstr "Kunde inte initialisera Vulkan-renderaren" +msgstr "Kunde inte initialisera Vulkan-renderaren." msgid "GLSL Error" msgstr "GLSL-fel" @@ -2153,3 +2756,201 @@ msgstr "Flytta ner" msgid "Could not load file %1" msgstr "Kunde inte ladda fil %1" + +msgid "Key Bindings:" +msgstr "Tangentbindningar:" + +msgid "Action" +msgstr "Handling" + +msgid "Keybind" +msgstr "Tangenbindning" + +msgid "Clear binding" +msgstr "Rensa bindningar" + +msgid "Bind" +msgstr "Bind" + +msgid "Bind Key" +msgstr "Bind tangent" + +msgid "Enter key combo:" +msgstr "Ange tangentkombination:" + +msgid "Bind conflict" +msgstr "Bindningskonflikt" + +msgid "This key combo is already in use." +msgstr "Denna tangentkombination används redan." + +msgid "Send Control+Alt+Del" +msgstr "Skicka Ctrl+Alt+Del" + +msgid "Send Control+Alt+Escape" +msgstr "Skicka Ctrl+Alt+Esc" + +msgid "Toggle fullscreen" +msgstr "Helskärm" + +msgid "Screenshot" +msgstr "Skärmbild" + +msgid "Release mouse pointer" +msgstr "Släpp muspekare" + +msgid "Toggle pause" +msgstr "Pausa" + +msgid "Toggle mute" +msgstr "Tysta" + +msgid "Text files" +msgstr "Textfiler" + +msgid "ROM files" +msgstr "ROM-filer" + +msgid "SoundFont files" +msgstr "SoundFont-filer" + +msgid "Local Switch" +msgstr "Lokal switch" + +msgid "Remote Switch" +msgstr "Fjärr-switch" + +msgid "Switch:" +msgstr "Switch:" + +msgid "Hub Mode" +msgstr "Hubb-läge" + +msgid "Hostname:" +msgstr "Värdnamn:" + +msgid "ISA RAM:" +msgstr "ISA RAM:" + +msgid "ISA ROM:" +msgstr "ISA ROM:" + +msgid "&Wipe NVRAM" +msgstr "&Rensa NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Detta kommer att ta bort alla NVRAM och relaterade filer från den virtuella maskinen i undermappen \"nvr\". Du kommer att behöva omkonfigurera BIOS och möjligen andra enheter inuti VM om applicerbart.\n\nÄr du säker på att du vill tömma allt NVRAM-innehåll för den virtuella maskinen \"%1\"?" + +msgid "Success" +msgstr "Lyckades" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Lyckades tömma allt NVRAM-innehåll för den virtuella maskinen \"%1\"." + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Ett fel uppstod vid försök att tömma NVRAM-innehållet för den virtuella maskinen \"%1\"." + +msgid "%1 VM Manager" +msgstr "%1 VM-hanterare" + +msgid "%n disk(s)" +msgstr "%n disk(ar)" + +msgid "Unknown Status" +msgstr "Ökänd status" + +msgid "No Machines Found!" +msgstr "Inga maskiner hittades!" + +msgid "Check for updates on startup" +msgstr "Sök efter uppdateringar vid start" + +msgid "Unable to determine release information" +msgstr "Kunde inte bestämma information för släpp" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Ett fel uppstod vid sökning av uppdateringar:\n\n%1\n\nFörsök igen senare." + +msgid "Update check complete" +msgstr "Uppdateringskontroll klar" + +msgid "stable" +msgstr "stable" + +msgid "beta" +msgstr "beta" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Du kör den senaste %1 versionen av 86Box: %2" + +msgid "version" +msgstr "version" + +msgid "build" +msgstr "build" + +msgid "You are currently running version %1." +msgstr "Du kör just ny version %1." + +msgid "Version %1 is now available." +msgstr "Version %1 finns nu tillgänglig." + +msgid "You are currently running build %1." +msgstr "Du kör just nu build %1." + +msgid "Build %1 is now available." +msgstr "Build %1 finns nu tillgänglig." + +msgid "Would you like to visit the download page?" +msgstr "Vill du besöka nedladdningssidan?" + +msgid "Visit download page" +msgstr "Besök nedladdningssida" + +msgid "Update check" +msgstr "Leta efter uppdateringar" + +msgid "Checking for updates..." +msgstr "Letar efter uppdateringar..." + +msgid "86Box Update" +msgstr "86Box-uppdatering" + +msgid "Release notes:" +msgstr "Information om släpp:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Virtuell maskin-krasch" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "Den virtuella maskinen \"%1\"s process har avslutats oväntad med kod %2." + +msgid "The system will not be added." +msgstr "Systemet kommer inte att läggas till." + +msgid "&Update mouse every CPU frame" +msgstr "&Uppdatera mus varje processorram" + +msgid "Hue" +msgstr "Färgton" + +msgid "Saturation" +msgstr "Mättnad" + +msgid "Contrast" +msgstr "Kontrast" + +msgid "Brightness" +msgstr "Ljusstyrka" + +msgid "Sharpness" +msgstr "Skärpa" + +msgid "&CGA composite settings..." +msgstr "Inställningar för &CGA-kompositläget..." + +msgid "CGA composite settings" +msgstr "Inställningar för CGA-kompositläget" diff --git a/src/qt/languages/tr-TR.po b/src/qt/languages/tr-TR.po index d2a0bc84b..4a9109b13 100644 --- a/src/qt/languages/tr-TR.po +++ b/src/qt/languages/tr-TR.po @@ -27,8 +27,14 @@ msgstr "Ctrl+&Alt+Esc" msgid "&Pause" msgstr "&Duraklat" -msgid "E&xit..." -msgstr "&Çıkış yap..." +msgid "Pause" +msgstr "Duraklat" + +msgid "Re&sume" +msgstr "Dev&am et" + +msgid "E&xit" +msgstr "&Çıkış yap" msgid "&View" msgstr "&Görünüm" @@ -51,20 +57,17 @@ msgstr "Derley&ici" msgid "&Qt (Software)" msgstr "&Qt (Yazılım bazlı)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL bazlı)" - msgid "Open&GL (3.0 Core)" msgstr "OpenG&L (Sürüm 3.0)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." +msgid "Specify &dimensions..." msgstr "Pencere &boyutunu belirle..." -msgid "F&orce 4:3 display ratio" -msgstr "4:3 görüntü oranına &zorla" +msgid "Force &4:3 display ratio" +msgstr "&4:3 görüntü oranına zorla" msgid "&Window scale factor" msgstr "Pencere &boyutu ölçeği" @@ -99,7 +102,7 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" +msgid "Fi<er method" msgstr "&Filtreleme yöntemi" msgid "&Nearest" @@ -132,7 +135,7 @@ msgstr "Tam &sayı ölçeklemesi" msgid "4:&3 Integer scale" msgstr "Tam sayı ölçeklemesi (4:&3)" -msgid "E&GA/(S)VGA settings" +msgid "EGA/(S)&VGA settings" msgstr "EGA/&(S)VGA ayarları" msgid "&Inverted VGA monitor" @@ -144,9 +147,15 @@ msgstr "VGA ekran &tipi" msgid "RGB &Color" msgstr "RGB (&Çok renkli)" +msgid "RGB (no brown)" +msgstr "RGB (kahverengi yok)" + msgid "&RGB Grayscale" msgstr "RGB (&Gri tonlu)" +msgid "Generic RGBI color monitor" +msgstr "Genel RGBI renkli monitör" + msgid "&Amber monitor" msgstr "&Kehribar monitör" @@ -175,7 +184,7 @@ msgid "Change contrast for &monochrome display" msgstr "Gri to&nlu görüntü için kontrastı değiştir" msgid "&Media" -msgstr "&Medya" +msgstr "&Ortam" msgid "&Tools" msgstr "&Araçlar" @@ -183,21 +192,24 @@ msgstr "&Araçlar" msgid "&Settings..." msgstr "&Ayarlar..." +msgid "Settings..." +msgstr "Ayarlar..." + msgid "&Update status bar icons" msgstr "Durum &çubuğu simgelerini güncelle" msgid "Take s&creenshot" msgstr "&Ekran görüntüsü al" +msgid "S&ound" +msgstr "&Ses" + msgid "&Preferences..." msgstr "&Tercihler..." msgid "Enable &Discord integration" msgstr "&Discord entegrasyonunu etkinleştir" -msgid "S&ound" -msgstr "&Ses" - msgid "Sound &gain..." msgstr "&Sesi artır..." @@ -217,13 +229,13 @@ msgid "&About 86Box..." msgstr "&86Box hakkında..." msgid "&New image..." -msgstr "&Yeni imaj oluştur..." +msgstr "&Yeni görüntü oluştur..." msgid "&Existing image..." -msgstr "&İmaj seç..." +msgstr "&Görüntü seç..." msgid "Existing image (&Write-protected)..." -msgstr "İmaj &seç (Yazma korumalı)..." +msgstr "Görüntü &seç (Yazma korumalı)..." msgid "&Record" msgstr "&Kaydet" @@ -241,7 +253,7 @@ msgid "E&ject" msgstr "&Çıkar" msgid "&Image..." -msgstr "&İmaj seç..." +msgstr "&Görüntü seç..." msgid "E&xport to 86F..." msgstr "&86F olarak kaydet..." @@ -250,10 +262,10 @@ msgid "&Mute" msgstr "&Sessize al" msgid "E&mpty" -msgstr "İmajı &çıkar" +msgstr "Görüntüyü &çıkar" msgid "Reload previous image" -msgstr "Önceki imajı yeniden seç" +msgstr "Önceki görüntüyü yeniden seç" msgid "&Folder..." msgstr "&Klasör seç..." @@ -295,7 +307,7 @@ msgid "Sound Gain" msgstr "Ses Artışı" msgid "New Image" -msgstr "Yeni imaj" +msgstr "Yeni görüntü" msgid "Settings" msgstr "Ayarlar" @@ -340,14 +352,17 @@ msgid "Lock to this size" msgstr "Bu boyuta kilitle" msgid "Machine type:" -msgstr "Makine türü:" +msgstr "Anakart türü:" msgid "Machine:" -msgstr "Makine:" +msgstr "Anakart:" msgid "Configure" msgstr "Ayarla" +msgid "CPU:" +msgstr "İşlemci:" + msgid "CPU type:" msgstr "İşlemci türü:" @@ -384,6 +399,15 @@ msgstr "Etkin (UTC)" msgid "Dynamic Recompiler" msgstr "Dinamik Derleyici" +msgid "CPU frame size" +msgstr "İşlemci kare boyutu" + +msgid "Larger frames (less smooth)" +msgstr "Daha büyük kareler (daha az akıcı)" + +msgid "Smaller frames (smoother)" +msgstr "Daha küçük kareler (daha akıcı)" + msgid "Video:" msgstr "Ekran kartı:" @@ -399,12 +423,27 @@ msgstr "IBM 8514/A Grafikleri" msgid "XGA Graphics" msgstr "XGA Grafikleri" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "IBM PS/55 Display Adapter Grafikleri" + +msgid "Keyboard:" +msgstr "Klavye:" + +msgid "Keyboard" +msgstr "Klavye" + msgid "Mouse:" msgstr "Fare:" +msgid "Mouse" +msgstr "Fare" + msgid "Joystick:" msgstr "Oyun Kolu:" +msgid "Joystick" +msgstr "Oyun Kolu" + msgid "Joystick 1..." msgstr "1. Oyun Kolu..." @@ -435,6 +474,9 @@ msgstr "MIDI Çıkış Cihazı:" msgid "MIDI In Device:" msgstr "MIDI Giriş Cihazı:" +msgid "MIDI Out:" +msgstr "MIDI Çıkış:" + msgid "Standalone MPU-401" msgstr "Bağımsız MPU-401" @@ -445,7 +487,7 @@ msgid "FM synth driver" msgstr "FM sentez sürücüsü" msgid "Nuked (more accurate)" -msgstr "Nuked (daha doğru)" +msgstr "Nuked (daha hassas)" msgid "YMFM (faster)" msgstr "YMFM (daha hızlı)" @@ -474,41 +516,47 @@ msgstr "LPT3 Cihazı:" msgid "LPT4 Device:" msgstr "LPT4 Cihazı:" +msgid "Internal LPT ECP DMA:" +msgstr "Dahili LPT ECP DMA'sı:" + msgid "Serial port 1" -msgstr "1. Seri Port" +msgstr "1. Seri bağlantı noktası" msgid "Serial port 2" -msgstr "2. Seri Port" +msgstr "2. Seri bağlantı noktası" msgid "Serial port 3" -msgstr "3. Seri Port" +msgstr "3. Seri bağlantı noktası" msgid "Serial port 4" -msgstr "4. Seri Port" +msgstr "4. Seri bağlantı noktası" msgid "Parallel port 1" -msgstr "1. Paralel Port" +msgstr "1. Paralel bağlantı noktası" msgid "Parallel port 2" -msgstr "2. Paralel Port" +msgstr "2. Paralel bağlantı noktası" msgid "Parallel port 3" -msgstr "3. Paralel Port" +msgstr "3. Paralel bağlantı noktası" msgid "Parallel port 4" -msgstr "4. Paralel Port" - -msgid "HD Controller:" -msgstr "Hard Disk Denetleyicisi:" +msgstr "4. Paralel bağlantı noktası" msgid "FD Controller:" msgstr "Disket Denetleyicisi:" +msgid "CD-ROM Controller:" +msgstr "CD-ROM Denetleyicisi:" + msgid "Tertiary IDE Controller" -msgstr "Üçlü IDE Denetleyici" +msgstr "Üçüncül IDE Denetleyicisi" msgid "Quaternary IDE Controller" -msgstr "Dörtlü IDE Denetleyici" +msgstr "Dördüncül IDE Denetleyicisi" + +msgid "Hard disk" +msgstr "Sabit disk" msgid "SCSI" msgstr "SCSI" @@ -529,13 +577,16 @@ msgid "Cassette" msgstr "Kaset" msgid "Hard disks:" -msgstr "Hard diskler:" +msgstr "Sabit diskler:" + +msgid "Firmware Version" +msgstr "Bellenim Sürümü" msgid "&New..." -msgstr "&Yeni imaj oluştur" +msgstr "&Yeni görüntü oluştur" msgid "&Existing..." -msgstr "&İmaj dosyası seç" +msgstr "&Görüntü dosyası seç" msgid "&Remove" msgstr "&Kaldır" @@ -568,7 +619,7 @@ msgid "Type:" msgstr "Tür:" msgid "Image Format:" -msgstr "İmaj Türü:" +msgstr "Görüntü Biçimi:" msgid "Block Size:" msgstr "Blok boyutu:" @@ -588,8 +639,14 @@ msgstr "CD-ROM sürücüleri:" msgid "MO drives:" msgstr "MO sürücüleri:" -msgid "ZIP drives:" -msgstr "ZIP sürücüleri:" +msgid "MO:" +msgstr "MO:" + +msgid "Removable disks:" +msgstr "Çıkarılabilir diskler:" + +msgid "Removable disk drives:" +msgstr "Çıkarılabilir disk sürücüleri:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "ISA RTC:" msgid "ISA Memory Expansion" msgstr "ISA Bellek Artırıcı" +msgid "ISA ROM Cards" +msgstr "ISA ROM Kartları" + msgid "Card 1:" msgstr "Kart 1:" @@ -612,6 +672,15 @@ msgstr "Kart 3:" msgid "Card 4:" msgstr "Kart 4:" +msgid "Generic ISA ROM Board" +msgstr "Genel ISA ROM Kartı" + +msgid "Generic Dual ISA ROM Board" +msgstr "Genel Çift ISA ROM Kartı" + +msgid "Generic Quad ISA ROM Board" +msgstr "Genel Dörtlü ISA ROM Kartı" + msgid "ISABugger device" msgstr "ISABugger cihazı" @@ -633,20 +702,20 @@ msgstr " - DURAKLATILDI" msgid "Speed" msgstr "Hız" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Çıkarılabilir disk %1 (%2): %3" -msgid "ZIP images" -msgstr "ZIP imajları" +msgid "&Removable disk %1 (%2): %3" +msgstr "&Çıkarılabilir disk %1 (%2): %3" -msgid "" -"86Box could not find any usable ROM images.\n" -"\n" -"Please download a ROM set and extract it into the \"roms\" directory." -msgstr "" -"86Box kullanılabilir hiçbir ROM dosyası bulamadı.\n" -"\n" -"Lütfen bir ROM seti indirip \"roms\" klasörüne çıkarın." +msgid "Removable disk images" +msgstr "Çıkarılabilir disk görüntüleri" + +msgid "Image %1" +msgstr "Görüntü %1" + +msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." +msgstr "86Box kullanılabilir hiçbir ROM dosyası bulamadı.\n\nLütfen bir ROM seti indirip \"roms\" klasörüne çıkarın." msgid "(empty)" msgstr "(boş)" @@ -664,16 +733,16 @@ msgid "Off" msgstr "Kapalı" msgid "All images" -msgstr "Tüm imajlar" +msgstr "Tüm görüntüler" msgid "Basic sector images" -msgstr "Basit sektör imajları" +msgstr "Basit sektör görüntüleri" msgid "Surface images" -msgstr "Yüzey imajları" +msgstr "Yüzey görüntüleri" msgid "Machine \"%hs\" is not available due to missing ROMs in the roms/machines directory. Switching to an available machine." -msgstr "\"%hs\" makinesi roms/machines klasöründe gerekli ROM dosyalarının mevcut olmaması nedeniyle kullanılamıyor. Kullanılabilen başka bir makineye geçiş yapılacaktır." +msgstr "\"%hs\" anakartı roms/machines klasöründe gerekli ROM dosyalarının mevcut olmaması nedeniyle kullanılamıyor. Kullanılabilen başka bir anakarta geçiş yapılacaktır." msgid "Video card \"%hs\" is not available due to missing ROMs in the roms/video directory. Switching to an available video card." msgstr "\"%hs\" ekran kartı roms/video klasöründe gerekli ROM dosyalarının mevcut olmaması nedeniyle kullanılamıyor. Kullanılabilen başka bir ekran kartına geçiş yapılacaktır." @@ -685,7 +754,7 @@ msgid "Device \"%hs\" is not available due to missing ROMs. Ignoring the device. msgstr "\"%hs\" cihazı gerekli ROM dosyalarının mevcut olmaması nedeniyle kullanılamıyor. Bu cihaz yok sayılacaktır." msgid "Machine" -msgstr "Makine" +msgstr "Anakart" msgid "Display" msgstr "Görüntü" @@ -700,13 +769,31 @@ msgid "Network" msgstr "Ağ" msgid "Ports (COM & LPT)" -msgstr "Portlar (COM & LPT)" +msgstr "Bağlantı noktaları (COM & LPT)" + +msgid "Ports" +msgstr "Bağlantı noktaları" + +msgid "Serial ports:" +msgstr "Seri bağlantı noktaları:" + +msgid "Parallel ports:" +msgstr "Paralel bağlantı noktaları:" msgid "Storage controllers" msgstr "Depolama denetleyicileri" msgid "Hard disks" -msgstr "Hard diskler" +msgstr "Sabit diskler" + +msgid "Disks:" +msgstr "Diskler:" + +msgid "Floppy:" +msgstr "Disket:" + +msgid "Controllers:" +msgstr "Denetleyiciler:" msgid "Floppy & CD-ROM drives" msgstr "Disket & CD-ROM sürücüleri" @@ -715,6 +802,9 @@ msgid "Other removable devices" msgstr "Diğer kaldırılabilir cihazlar" msgid "Other peripherals" +msgstr "Diğer çevre birimleri" + +msgid "Other devices" msgstr "Diğer cihazlar" msgid "Click to capture mouse" @@ -783,12 +873,39 @@ msgstr "4 eksenli, 4 düğmeli oyun kolu" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Pedals" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Thrustmaster Flight Control System" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Rudder Control System" + +msgid "2-button gamepad(s)" +msgstr "2 düğmeli oyun tablası" + +msgid "2-button flight yoke" +msgstr "2 düğmeli uçuş dümeni" + +msgid "4-button gamepad" +msgstr "4 düğmeli oyun tablası" + +msgid "4-button flight yoke" +msgstr "4 düğmeli uçuş dümeni" + +msgid "2-button flight yoke with throttle" +msgstr "2 düğmeli, gaz kollu uçuş dümeni" + +msgid "4-button flight yoke with throttle" +msgstr "4 düğmeli, gaz kollu uçuş dümeni" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Win95 direksiyonu (3 eksenli, 4 düğmeli)" + msgid "None" msgstr "Hiçbiri" @@ -798,11 +915,14 @@ msgstr "%1 MB (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Disket %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Disket %1 (%2): %3" + msgid "Advanced sector images" -msgstr "Gelişmiş sektör imajları" +msgstr "Gelişmiş sektör görüntüleri" msgid "Flux images" -msgstr "Flux imajları" +msgstr "Flux görüntüleri" msgid "Are you sure you want to hard reset the emulated machine?" msgstr "Makineyi yeniden başlamaya zorlamak istediğinizden emin misiniz?" @@ -819,8 +939,11 @@ msgstr "GhostPCL başlatılamadı" msgid "MO %1 (%2): %3" msgstr "MO %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&MO %1 (%2): %3" + msgid "MO images" -msgstr "MO imajları" +msgstr "MO görüntüleri" msgid "Welcome to 86Box!" msgstr "86Box'a hoşgeldiniz!" @@ -828,6 +951,15 @@ msgstr "86Box'a hoşgeldiniz!" msgid "Internal device" msgstr "Dahili cihaz" +msgid "&File" +msgstr "&Dosya" + +msgid "&New machine..." +msgstr "&Yeni makine..." + +msgid "&Check for updates..." +msgstr "&Güncelleştirmeleri kontrol et..." + msgid "Exit" msgstr "Çıkış yap" @@ -849,49 +981,23 @@ msgstr "86Box hakkında" msgid "86Box v" msgstr "86Box v" -msgid "" -"An emulator of old computers\n" -"\n" -"Authors: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n" -"\n" -"With previous core contributions from Sarah Walker, leilei, JohnElliott, greatpsycho, and others.\n" -"\n" -"Released under the GNU General Public License version 2 or later. See LICENSE for more information." -msgstr "" -"Bir eski bilgisayar emülatörü\n" -"\n" -"Yapımcılar: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne ve diğerleri.\n" -"\n" -"Sarah Walker, leilei, JohnElliott, greatpsycho, ve diğerlerinin önceki katkılarıyla birlikte.\n" -"\n" -"GNU Genel Kamu Lisansı versiyon 2 veya sonrası altında yayınlanmıştır. Daha fazla bilgi için LICENSE kısmını gözden geçirin." +msgid "An emulator of old computers\n\nAuthors: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n\nWith previous core contributions from Sarah Walker, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information." +msgstr "Bir eski bilgisayar emülatörü\n\nYapımcılar: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne ve diğerleri.\n\nSarah Walker, leilei, JohnElliott, greatpsycho, ve diğerlerinin önceki katkılarıyla birlikte.\n\nGNU Genel Kamu Lisansı versiyon 2 veya sonrası altında yayınlanmıştır. Daha fazla bilgi için LICENSE kısmını gözden geçirin." msgid "Hardware not available" msgstr "Cihaz mevcut değil" -msgid "Make sure %1 is installed and that you are on a libpcap-compatible network connection." -msgstr "%1 kurulu olduğundan ve libpcap uyumlu bir internet ağı kullandığınızdan emin olun." +msgid "Make sure %1 is installed and that you are on a %1-compatible network connection." +msgstr "%1 kurulu olduğundan ve %1 uyumlu bir internet ağı kullandığınızdan emin olun." msgid "Invalid configuration" msgstr "Geçersiz yapılandırma" -msgid "" -"%1 is required for automatic conversion of PostScript files to PDF.\n" -"\n" -"Any documents sent to the generic PostScript printer will be saved as PostScript (.ps) files." -msgstr "" -"%1 PostScript dosyalarının otomatik olarak PDF dosyasına çevirilmesi için gereklidir.\n" -"\n" -"Genel PostScript yazıcısına gönderilen tüm dökümanlar PostScript (.ps) dosyası olarak kaydedilecektir." +msgid "%1 is required for automatic conversion of PostScript files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as PostScript (.ps) files." +msgstr "%1 PostScript dosyalarının otomatik olarak PDF dosyasına çevirilmesi için gereklidir.\n\nGenel PostScript yazıcısına gönderilen tüm dökümanlar PostScript (.ps) dosyası olarak kaydedilecektir." -msgid "" -"%1 is required for automatic conversion of PCL files to PDF.\n" -"\n" -"Any documents sent to the generic PostScript printer will be saved as Printer Command Language (.pcl) files." -msgstr "" -"%1 PCL dosyalarının otomatik olarak PDF dosyasına çevirilmesi için gereklidir.\n" -"\n" -"Genel PostScript yazıcısına gönderilen tüm dökümanlar Printer Command Language (.pcl) dosyası olarak kaydedilecektir." +msgid "%1 is required for automatic conversion of PCL files to PDF.\n\nAny documents sent to the generic PCL printer will be saved as Printer Command Language (.pcl) files." +msgstr "%1 PCL dosyalarının otomatik olarak PDF dosyasına çevirilmesi için gereklidir.\n\nGenel PCL yazıcısına gönderilen tüm dökümanlar Printer Command Language (.pcl) dosyası olarak kaydedilecektir." msgid "Don't show this message again" msgstr "Bu mesajı bir daha gösterme" @@ -906,7 +1012,7 @@ msgid "Don't reset" msgstr "Hayır" msgid "CD-ROM images" -msgstr "CD-ROM imajları" +msgstr "CD-ROM görüntüleri" msgid "%1 Device Configuration" msgstr "%1 Cihaz Yapılandırması" @@ -920,18 +1026,8 @@ msgstr "GLSL gölgelendiricileri" msgid "You are loading an unsupported configuration" msgstr "Desteklenmeyen bir yapılandırma kullanıyorsunuz" -msgid "" -"CPU type filtering based on selected machine is disabled for this emulated machine.\n" -"\n" -"This makes it possible to choose a CPU that is otherwise incompatible with the selected machine. However, you may run into incompatibilities with the machine BIOS or other software.\n" -"\n" -"Enabling this setting is not officially supported and any bug reports filed may be closed as invalid." -msgstr "" -"Seçtiğiniz makineyle uygun işlemci filtresi bu yapılandırma için devre dışı bırakıldı.\n" -"\n" -"Bu durum seçili makine ile uyumsuz bir işlemci kullanmanızı mümkün kılmaktadır. Ancak bundan dolayı makinenin BIOS'unda veya çalıştırılan diğer yazılımlarda uyumsuzluk sorunları meydana gelebilir.\n" -"\n" -"İşlemci filtresinin devre dışı bırakılması resmi olarak desteklenmemektedir ve bu esnada açtığınız hata raporları geçersiz sayılabilir." +msgid "CPU type filtering based on selected machine is disabled for this emulated machine.\n\nThis makes it possible to choose a CPU that is otherwise incompatible with the selected machine. However, you may run into incompatibilities with the machine BIOS or other software.\n\nEnabling this setting is not officially supported and any bug reports filed may be closed as invalid." +msgstr "Seçtiğiniz makineyle uygun işlemci filtresi bu yapılandırma için devre dışı bırakıldı.\n\nBu durum seçili makine ile uyumsuz bir işlemci kullanmanızı mümkün kılmaktadır. Ancak bundan dolayı makinenin BIOS'unda veya çalıştırılan diğer yazılımlarda uyumsuzluk sorunları meydana gelebilir.\n\nİşlemci filtresinin devre dışı bırakılması resmi olarak desteklenmemektedir ve bu esnada açtığınız hata raporları geçersiz sayılabilir." msgid "Continue" msgstr "Devam et" @@ -939,14 +1035,20 @@ msgstr "Devam et" msgid "Cassette: %1" msgstr "Kaset: %1" +msgid "C&assette: %1" +msgstr "K&aset: %1" + msgid "Cassette images" -msgstr "Kaset imajları" +msgstr "Kaset görüntüleri" msgid "Cartridge %1: %2" msgstr "Kartuş %1: %2" +msgid "Car&tridge %1: %2" +msgstr "Kar&tuş %1: %2" + msgid "Cartridge images" -msgstr "Kartuş imajları" +msgstr "Kartuş görüntüleri" msgid "Resume execution" msgstr "Çalıştırmayı sürdür" @@ -954,6 +1056,9 @@ msgstr "Çalıştırmayı sürdür" msgid "Pause execution" msgstr "Çalıştırmayı duraklat" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Ctrl+Alt+Del tuşlarına bas" @@ -963,11 +1068,281 @@ msgstr "Ctrl+Alt+Esc tuşlarına bas" msgid "Hard reset" msgstr "Makineyi yeniden başlat" +msgid "Force shutdown" +msgstr "Kapatmaya zorla" + +msgid "Start" +msgstr "Başlat" + +msgid "Not running" +msgstr "Çalışmıyor" + +msgid "Running" +msgstr "Çalışıyor" + +msgid "Paused" +msgstr "Duraklatıldı" + +msgid "Waiting" +msgstr "Bekliyor" + +msgid "Powered Off" +msgstr "Kapalı" + +msgid "%n running" +msgstr "Çalışan %n" + +msgid "%n paused" +msgstr "Duraklatılmış %n" + +msgid "%n waiting" +msgstr "Bekleyen %n" + +msgid "%1 total" +msgstr "Toplam %1" + +msgid "VMs: %1" +msgstr "VM sayısı: %1" + +msgid "System Directory:" +msgstr "Sistem Dizini:" + +msgid "Choose directory" +msgstr "Dizin seç:" + +msgid "Choose configuration file" +msgstr "Yapılandırma dosyası seç" + +msgid "86Box configuration files (86box.cfg)" +msgstr "86Box yapılandırma dosyaları (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Yapılandırma okuması başarısız" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Seçili yapılandırma dosyası okunmak için açılamıyor: %1" + +msgid "Use regular expressions in search box" +msgstr "Arama kutusunda düzenli ifadeler kullan" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 makine şu anda aktif. Yine de VM yöneticisinden çıkmak istediğinize emin misiniz?" + +msgid "Add new system wizard" +msgstr "Yeni sistem ekleme sihirbazı" + +msgid "Introduction" +msgstr "Giriş" + +msgid "This will help you add a new system to 86Box." +msgstr "Bu sihirbaz 86Box'a yeni bir sistem eklemenizde yardımcı olacaktır." + +msgid "New configuration" +msgstr "Yeni yapılandırma" + +msgid "Complete" +msgstr "Tamamlandı" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "Sihirbaz şimdi yeni sistemin yapılandırmasını başlatacak." + +msgid "Use existing configuration" +msgstr "Var olan yapılandırma kullan" + +msgid "Type some notes here" +msgstr "Buraya not alın" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Var olan yapılandırma dosyasının içeriklerini aşağıdaki kutuya yapıştırınız." + +msgid "Load configuration from file" +msgstr "Dosyadan yapılandırma yükle" + +msgid "System name" +msgstr "Sistem adı" + +msgid "System name:" +msgstr "Sistem adı:" + +msgid "System name cannot contain certain characters" +msgstr "Sistem adı belirli karakterleri içeremez" + +msgid "System name already exists" +msgstr "Sistem adı zaten var" + +msgid "Please enter a directory for the system" +msgstr "Lütfen sistem için bir dizin girin" + +msgid "Directory does not exist" +msgstr "Dizin yok" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "Sistem için yeni bir dizin yukarıda seçili dizinde oluşturulacak" + +msgid "System location:" +msgstr "Sistem yeri:" + +msgid "System name and location" +msgstr "Sistem adı ve yeri:" + +msgid "Enter the name of the system and choose the location" +msgstr "Sistemin adını girin ve yerini seçin" + +msgid "Enter the name of the system" +msgstr "Sistemin adını girin" + +msgid "Please enter a system name" +msgstr "Lütfen bir sistem adı girin" + +msgid "Display name (optional):" +msgstr "Görüntü adı (isteğe bağlı)" + +msgid "Display name:" +msgstr "Görüntü adı:" + +msgid "Set display name" +msgstr "Görüntü adını ayarla" + +msgid "Enter the new display name (blank to reset)" +msgstr "Yeni görünü adını girin (sıfırlamak için boş bırakın)" + +msgid "Change &display name..." +msgstr "Görüntü adını &değiştirin" + +msgid "Context Menu" +msgstr "Bağlam Menüsü" + +msgid "&Open folder..." +msgstr "Klas&örü aç..." + +msgid "Open p&rinter tray..." +msgstr "Yazıcı te&psisini aç..." + +msgid "Set &icon..." +msgstr "S&imge seç..." + +msgid "Select an icon" +msgstr "Bir simge seç" + +msgid "C&lone..." +msgstr "K&lonla..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "Sanal makine \"%1\" (%2) şuraya klonlanacaktır:" + +msgid "Directory %1 already exists" +msgstr "Dizin &1 zaten var" + +msgid "You cannot use the following characters in the name: %1" +msgstr "İsimde şu karakterleri kullanamazsınız: %1" + +msgid "Clone" +msgstr "Klonla" + +msgid "Failed to create directory for cloned VM" +msgstr "Klonlanmış VM için dizin oluşturulamadı" + +msgid "Failed to clone VM." +msgstr "VM klonlanamadı" + +msgid "Directory in use" +msgstr "Dizin kullanımda" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "Seçili dizin zaten kullanımda. Lütfen farklı bir dizin seçiniz." + +msgid "Create directory failed" +msgstr "Dizin oluşturulamadı" + +msgid "Unable to create the directory for the new system" +msgstr "Yeni sistem için dizin oluşturulamadı" + +msgid "Configuration write failed" +msgstr "Yapılandırmaya yazma başarısız" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Yapılandırma dosyası %1 yazma için açılamıyor" + +msgid "Error adding system" +msgstr "Sistem eklenirken hata oluştu" + +msgid "Remove directory failed" +msgstr "Dizin kaldırılamadı" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Makinenin dizinindeki bazı dosyalar silinemedi. Lütfen bu dosyaları elle siliniz." + +msgid "Build" +msgstr "Yapı" + +msgid "Version" +msgstr "Sürüm" + +msgid "An update to 86Box is available: %1 %2" +msgstr "86Box için bir güncelleme bulunmakta: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Güncellemeler kontrol edilirken bir hata oluştu: %1" + +msgid "An update to 86Box is available!" +msgstr "86Box için bir güncelleme mevcut!" + +msgid "Warning" +msgstr "Uyarı" + +msgid "&Kill" +msgstr "Durmaya &zorla" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Bir sanal makineyi durmaya zorlamak veri kaybına yol açabilir. Bunu sadece 86Box işlemi takılı kalırsa uygulayın.\n\nGerçekten \"%1\" adlı sanal makineyi durmaya zorlamak istiyor musunuz?" + +msgid "&Delete" +msgstr "&Sil" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Gerçekten \"%1\" adlı sanal makineyi tüm dosyalarıyla birlikte silmek istiyor musunuz? Bu eylem geri alınamaz!" + +msgid "Show &config file" +msgstr "Yap&ılandırma dosyasını göster" + +msgid "No screenshot" +msgstr "Ekran görüntüsü yok" + +msgid "Search" +msgstr "Ara" + +msgid "Searching for VMs..." +msgstr "VM'ler aranıyor..." + +msgid "Found %1" +msgstr "%1 bulundu" + +msgid "System" +msgstr "Sistem" + +msgid "Storage" +msgstr "Depolama" + +msgid "Disk %1: " +msgstr "Disk %1: " + +msgid "No disks" +msgstr "Disk yok" + +msgid "Audio" +msgstr "Ses" + +msgid "Audio:" +msgstr "Ses:" + msgid "ACPI shutdown" msgstr "Makineyi ACPI kullanarak kapat" +msgid "ACP&I shutdown" +msgstr "Makineyi ACP&I kullanarak kapat" + msgid "Hard disk (%1)" -msgstr "Hard disk (%1)" +msgstr "Sabit disk (%1)" msgid "MFM/RLL or ESDI CD-ROM drives never existed" msgstr "MFM/RLL veya ESDI CD-ROM sürücüleri hiçbir zaman kullanılmamıştır" @@ -979,19 +1354,19 @@ msgid "Custom (large)..." msgstr "Diğer (büyük)..." msgid "Add New Hard Disk" -msgstr "Yeni Hard Disk İmajı Oluştur" +msgstr "Yeni Sabit Disk Görüntüsü Oluştur" msgid "Add Existing Hard Disk" -msgstr "Var Olan Hard Disk İmajı Ekleme" +msgstr "Var Olan Sabit Disk Görüntüsü Ekleme" msgid "HDI disk images cannot be larger than 4 GB." -msgstr "HDI imajları 4 GB boyutundan daha büyük olamaz." +msgstr "HDI görüntüleri 4 GB boyutundan daha büyük olamaz." msgid "Disk images cannot be larger than 127 GB." -msgstr "Disk imajları 127 GB boyutundan daha büyük olamaz." +msgstr "Disk görüntüleri 127 GB boyutundan daha büyük olamaz." msgid "Hard disk images" -msgstr "Hard disk imajları" +msgstr "Sabit disk görüntüleri" msgid "Unable to read file" msgstr "Dosya okunamıyor" @@ -1000,16 +1375,16 @@ msgid "Unable to write file" msgstr "Dosyanın üzerine yazılamıyor" msgid "HDI or HDX images with a sector size other than 512 are not supported." -msgstr "512 dışında sektör boyutu olan HDI ve HDX imajları desteklenmemektedir." +msgstr "512 dışında sektör boyutu olan HDI ve HDX görüntüleri desteklenmemektedir." msgid "Disk image file already exists" -msgstr "Bu imaj dosyası zaten mevcuttur" +msgstr "Bu görüntü dosyası zaten mevcuttur" msgid "Please specify a valid file name." msgstr "Lütfen geçerli bir dosya ismi belirleyin." msgid "Disk image created" -msgstr "Disk imajı oluşturuldu" +msgstr "Disk görüntüsü oluşturuldu" msgid "Make sure the file exists and is readable." msgstr "Dosyanın var olduğuna ve okunabildiğine emin olun." @@ -1018,7 +1393,7 @@ msgid "Make sure the file is being saved to a writable directory." msgstr "Dosyanın erişilebilir bir klasöre kaydedildiğinden emin olun." msgid "Disk image too large" -msgstr "Disk imajı çok büyük" +msgstr "Disk görüntüsü çok büyük" msgid "Remember to partition and format the newly-created drive." msgstr "Yeni oluşturulan diskte bölümler oluşturmayı ve bu bölümleri biçimlendirmeyi unutmayın." @@ -1027,7 +1402,7 @@ msgid "The selected file will be overwritten. Are you sure you want to use it?" msgstr "Seçili dosyanın üzerine yazılacaktır. Bu dosyayı kullanmak istediğinizden emin misiniz?" msgid "Unsupported disk image" -msgstr "Desteklenmeyen disk imajı" +msgstr "Desteklenmeyen disk görüntüsü" msgid "Overwrite" msgstr "Üzerine yaz" @@ -1036,13 +1411,13 @@ msgid "Don't overwrite" msgstr "Üzerine yazma" msgid "Raw image" -msgstr "Ham imaj" +msgstr "Ham görüntü" msgid "HDI image" -msgstr "HDI imajı" +msgstr "HDI görüntüsü" msgid "HDX image" -msgstr "HDX imajı" +msgstr "HDX görüntüsü" msgid "Fixed-size VHD" msgstr "Sabit boyutlu VHD" @@ -1057,13 +1432,13 @@ msgid "(N/A)" msgstr "(yok)" msgid "Raw image (.img)" -msgstr "Ham imaj (.img)" +msgstr "Ham görüntü (.img)" msgid "HDI image (.hdi)" -msgstr "HDI imajı (.hdi)" +msgstr "HDI görüntüsü (.hdi)" msgid "HDX image (.hdx)" -msgstr "HDX imajı (.hdx)" +msgstr "HDX görüntüsü (.hdx)" msgid "Fixed-size VHD (.vhd)" msgstr "Sabit boyutlu VHD (.vhd)" @@ -1086,18 +1461,8 @@ msgstr "VHD dosyaları" msgid "Select the parent VHD" msgstr "Ana VHD dosyasını seçin" -msgid "" -"This could mean that the parent image was modified after the differencing image was created.\n" -"\n" -"It can also happen if the image files were moved or copied, or by a bug in the program that created this disk.\n" -"\n" -"Do you want to fix the timestamps?" -msgstr "" -"Bu, farklandırmış imaj dosyası oluşturulduktan sonra ana imaj dosyasında bir değişiklik yapıldığı anlamına geliyor olabilir.\n" -"\n" -"Bu durum ayrıca imaj dosyalarının kopyalanmasından, yerlerinin değiştirilmesinden veya dosyaları oluşturan programdaki bir hatadan dolayı da meydana gelmiş olabilir.\n" -"\n" -"Zaman damgalarını düzeltmek ister misiniz?" +msgid "This could mean that the parent image was modified after the differencing image was created.\n\nIt can also happen if the image files were moved or copied, or by a bug in the program that created this disk.\n\nDo you want to fix the timestamps?" +msgstr "Bu, farklandırmış görüntü dosyası oluşturulduktan sonra ana görüntü dosyasında bir değişiklik yapıldığı anlamına geliyor olabilir.\n\nBu durum ayrıca görüntü dosyalarının kopyalanmasından, yerlerinin değiştirilmesinden veya dosyaları oluşturan programdaki bir hatadan dolayı da meydana gelmiş olabilir.\n\nZaman damgalarını düzeltmek ister misiniz?" msgid "Parent and child disk timestamps do not match" msgstr "Ana ve ek disklerin zaman damgaları uyuşmuyor" @@ -1123,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 KB" @@ -1217,7 +1585,7 @@ msgid "Mouse sensitivity:" msgstr "Fare hassasiyeti:" msgid "Select media images from program working directory" -msgstr "Medya imajlarını programın çalışma dizininden seç" +msgstr "Medya görüntülerini programın çalışma dizininden seç" msgid "PIT mode:" msgstr "PIT modu:" @@ -1237,18 +1605,8 @@ msgstr "Pencereye &odaklanmıyorken duraklat" msgid "WinBox is no longer supported" msgstr "WinBox artık desteklenmemektedir" -msgid "" -"Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n" -"\n" -"No further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n" -"\n" -"Go to 86box.net for a list of other managers you can use." -msgstr "" -"WinBox yöneticisinin geliştirilmesi geliştirici eksikliği nedeniyle 2022 yılında durduruldu. 86Box'ı daha iyi hale getirmeye odaklanmak amacıyla bu yöneticiyi artık desteklememe kararı aldık.\n" -"\n" -"Artık WinBox aracılığıyla güncellemeler yayınlanmayacaktır ve bu yöneticiyi 86Box'ın yeni sürümleriyle kullanmanız halinde hatalarla karşılaşabilirsiniz. WinBox'ın kullanımıyla ilgili tüm hata raporları geçersiz sayılacaktır.\n" -"\n" -"Kullanabileceğiniz diğer yöneticilerin bir listesi için lütfen 86box.net adresini ziyaret edin." +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "WinBox yöneticisinin geliştirilmesi geliştirici eksikliği nedeniyle 2022 yılında durduruldu. 86Box'ı daha iyi hale getirmeye odaklanmak amacıyla bu yöneticiyi artık desteklememe kararı aldık.\n\nArtık WinBox aracılığıyla güncellemeler yayınlanmayacaktır ve bu yöneticiyi 86Box'ın yeni sürümleriyle kullanmanız halinde hatalarla karşılaşabilirsiniz. WinBox'ın kullanımıyla ilgili tüm hata raporları geçersiz sayılacaktır.\n\nKullanabileceğiniz diğer yöneticilerin bir listesi için lütfen 86box.net adresini ziyaret edin." msgid "Generate" msgstr "Oluştur" @@ -1271,41 +1629,38 @@ msgstr "MCA cihazları" msgid "List of MCA devices:" msgstr "MCA cihazlarının listesi:" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Tablet aracı" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "&Qt hakkında" -msgid "About Qt" -msgstr "Qt hakkında" - -msgid "MCA devices..." +msgid "&MCA devices..." msgstr "MCA cihazları..." -msgid "Show non-primary monitors" +msgid "Show non-&primary monitors" msgstr "Birincil olmayan monitörleri göster" -msgid "Open screenshots folder..." +msgid "Open screenshots &folder..." msgstr "Ekran görüntüsü klasörünü aç..." -msgid "Apply fullscreen stretch mode when maximized" +msgid "Appl&y fullscreen stretch mode when maximized" msgstr "Büyütüldüğünde tam ekran germe modunu uygula" -msgid "Cursor/Puck" -msgstr "İmleç/Puck" +msgid "&Cursor/Puck" +msgstr "&İmleç/Puck" -msgid "Pen" -msgstr "Kalem" +msgid "&Pen" +msgstr "&Kalem" -msgid "Host CD/DVD Drive (%1:)" -msgstr "Ana Sistemin CD/DVD Sürücüsü (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "&Ana Sistemin CD/DVD Sürücüsü (%1:)" msgid "&Connected" msgstr "&Bağlı" -msgid "Clear image history" -msgstr "İmaj geçmişini temizle" +msgid "Clear image &history" +msgstr "Görüntü geçmişini temizle" msgid "Create..." msgstr "Oluştur..." @@ -1319,9 +1674,15 @@ msgstr "Bilinmeyen veri yolu" msgid "Null Driver" msgstr "Null sürücü" +msgid "NIC:" +msgstr "NIC:" + msgid "NIC %1 (%2) %3" msgstr "NIC %1 (%2) %3" +msgid "&NIC %1 (%2) %3" +msgstr "&NIC %1 (%2) %3" + msgid "Render behavior" msgstr "İşleyiş davranışı" @@ -1358,12 +1719,8 @@ msgstr "OpenGL sürüm 3.0 veya üstü gereklidir. Geçerli sürüm %1.%2" msgid "Error initializing OpenGL" msgstr "OpenGL başlatılırken hata oluştu" -msgid "" -"\n" -"Falling back to software rendering." -msgstr "" -"\n" -"Yazılım derleyicisine geri dönülüyor." +msgid "\nFalling back to software rendering." +msgstr "\nYazılım derleyicisine geri dönülüyor." msgid "

When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.

" msgstr "

Medya görüntüsü (CD-ROM, disket, vb.) seçme diyaloğu 86Box yapılandırma dosyasının bulunduğu dizinde başlayacaktır. Bu ayar muhtemelen sadece macOS üzerinde bir değişiklik meydana getirecektir.

" @@ -1371,14 +1728,8 @@ msgstr "

Medya görüntüsü (CD-ROM, disket, vb.) seçme d msgid "This machine might have been moved or copied." msgstr "Bu makine taşınmış veya kopyalanmış olabilir." -msgid "" -"In order to ensure proper networking functionality, 86Box needs to know if this machine was moved or copied.\n" -"\n" -"Select \"I Copied It\" if you are not sure." -msgstr "" -"Ağ bağlantısı özelliğinin doğru bir şekilde çalışması için 86Box'ın bu makinenin başka bir konuma taşındığını mı yoksa kopyalandığını mı belirlemesi gerekmektedir.\n" -"\n" -"Bundan emin değilseniz \"Kopyalandı\" seçeneğini seçin." +msgid "In order to ensure proper networking functionality, 86Box needs to know if this machine was moved or copied.\n\nSelect \"I Copied It\" if you are not sure." +msgstr "Ağ bağlantısı özelliğinin doğru bir şekilde çalışması için 86Box'ın bu makinenin başka bir konuma taşındığını mı yoksa kopyalandığını mı belirlemesi gerekmektedir.\n\nBundan emin değilseniz \"Kopyalandı\" seçeneğini seçin." msgid "I Moved It" msgstr "Taşındı" @@ -1395,6 +1746,9 @@ msgstr "MCA cihazı yok." msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" msgstr "1. Ağ Kartı" @@ -1426,44 +1780,71 @@ msgid "Novell NetWare 2.x Key Card" msgstr "Novell NetWare 2.x Anahtar Kartı" msgid "Serial port passthrough 1" -msgstr "1. Seri Port geçişi" +msgstr "1. Seri bağlantı noktası geçişi" msgid "Serial port passthrough 2" -msgstr "2. Seri Port geçişi" +msgstr "2. Seri bağlantı noktası geçişi" msgid "Serial port passthrough 3" -msgstr "3. Seri Port geçişi" +msgstr "3. Seri bağlantı noktası geçişi" msgid "Serial port passthrough 4" -msgstr "4. Seri Port geçişi" +msgstr "4. Seri bağlantı noktası geçişi" -msgid "Renderer options..." +msgid "Renderer &options..." msgstr "Derleyici seçenekleri..." +msgid "PC/XT Keyboard" +msgstr "PC/XT Klavyesi" + +msgid "AT Keyboard" +msgstr "AT Klavyesi" + +msgid "AX Keyboard" +msgstr "AX Klavyesi" + +msgid "PS/2 Keyboard" +msgstr "PS/2 Klavyesi" + +msgid "PS/55 Keyboard" +msgstr "PS/55 Klavyesi" + +msgid "Keys" +msgstr "Keys" + msgid "Logitech/Microsoft Bus Mouse" -msgstr "Logitech/Microsoft Bus Fare" +msgstr "Logitech/Microsoft Bus Faresi" msgid "Microsoft Bus Mouse (InPort)" -msgstr "Microsoft Bus Fare (InPort)" +msgstr "Microsoft Bus Faresi (InPort)" msgid "Mouse Systems Serial Mouse" -msgstr "Mouse Systems Seri Fare" +msgstr "Mouse Systems Seri Faresi" msgid "Mouse Systems Bus Mouse" -msgstr "Mouse Systems Bus Fare" +msgstr "Mouse Systems Bus Faresi" msgid "Microsoft Serial Mouse" -msgstr "Microsoft Seri Fare" +msgstr "Microsoft Seri Faresi" + +msgid "Microsoft Serial BallPoint" +msgstr "Microsoft Seri BallPoint" msgid "Logitech Serial Mouse" -msgstr "Logitech Seri Fare" +msgstr "Logitech Seri Faresi" msgid "PS/2 Mouse" -msgstr "PS/2 fare" +msgstr "PS/2 Faresi" + +msgid "PS/2 QuickPort Mouse" +msgstr "PS/2 QuickPort Faresi" msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (seri)" +msgid "Default Baud rate" +msgstr "Varsayılan Baud hızı" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Standart Hayes Uyumlu Modem" @@ -1488,21 +1869,81 @@ msgstr "Sistem MIDI'si" msgid "MIDI Input Device" msgstr "MIDI Giriş Cihazı" -msgid "BIOS Address" -msgstr "BIOS Adresi" +msgid "BIOS file" +msgstr "BIOS dosyası" + +msgid "BIOS file (ROM #1)" +msgstr "BIOS dosyası (ROM #1)" + +msgid "BIOS file (ROM #2)" +msgstr "BIOS dosyası (ROM #2)" + +msgid "BIOS file (ROM #3)" +msgstr "BIOS dosyası (ROM #3)" + +msgid "BIOS file (ROM #4)" +msgstr "BIOS dosyası (ROM #4)" + +msgid "BIOS address" +msgstr "BIOS adresi" + +msgid "BIOS address (ROM #1)" +msgstr "BIOS adresi (ROM #1)" + +msgid "BIOS address (ROM #2)" +msgstr "BIOS adresi (ROM #2)" + +msgid "BIOS address (ROM #3)" +msgstr "BIOS adresi (ROM #3)" + +msgid "BIOS address (ROM #4)" +msgstr "BIOS adresi (ROM #4)" msgid "Enable BIOS extension ROM Writes" msgstr "BIOS uzantı ROM yazımlarını etkinleştir" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "BIOS uzantı ROM yazımlarını etkinleştir (ROM #1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "BIOS uzantı ROM yazımlarını etkinleştir (ROM #2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "BIOS uzantı ROM yazımlarını etkinleştir (ROM #3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "BIOS uzantı ROM yazımlarını etkinleştir (ROM #4)" + +msgid "Linear framebuffer base" +msgstr "Doğrusal çerçeve arabelleği baz adresi" + msgid "Address" msgstr "Adres" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "Seri bağlantı noktası IRQ'su" + +msgid "Parallel port IRQ" +msgstr "Paralel bağlantı noktası IRQ'su" + msgid "BIOS Revision" +msgstr "BIOS Revizyonu" + +msgid "BIOS Version" msgstr "BIOS Sürümü" +msgid "BIOS Language" +msgstr "BIOS Dili" + +msgid "IBM 5161 Expansion Unit" +msgstr "IBM 5161 Genişletme Ünitesi" + +msgid "IBM Cassette Basic" +msgstr "IBM Kaset BASIC" + msgid "Translate 26 -> 17" msgstr "26 -> 17 olarak çevir" @@ -1518,6 +1959,18 @@ msgstr "Renkleri tersine çevir" msgid "BIOS size" msgstr "BIOS boyutu" +msgid "BIOS size (ROM #1)" +msgstr "BIOS boyutu (ROM #1)" + +msgid "BIOS size (ROM #2)" +msgstr "BIOS boyutu (ROM #2)" + +msgid "BIOS size (ROM #3)" +msgstr "BIOS boyutu (ROM #3)" + +msgid "BIOS size (ROM #4)" +msgstr "BIOS boyutu (ROM #4)" + msgid "Map C0000-C7FFF as UMB" msgstr "C0000-C7FFF'yi UMB olarak eşle" @@ -1591,7 +2044,10 @@ msgid "Reverb Level" msgstr "Yankı Seviyesi" msgid "Interpolation Method" -msgstr "İnterpolasyon Yöntemi" +msgstr "Enterpolasyon Yöntemi" + +msgid "Dynamic Sample Loading" +msgstr "Dinamik Kesit Yüklemesi" msgid "Reverb Output Gain" msgstr "Yankı Çıkış Sesi Artışı" @@ -1609,7 +2065,7 @@ msgid "Buttons" msgstr "Düğmeler" msgid "Serial Port" -msgstr "Seri Port" +msgstr "Seri Bağlantı Noktası" msgid "RTS toggle" msgstr "RTS ayarı" @@ -1630,7 +2086,7 @@ msgid "MAC Address" msgstr "MAC Adresi" msgid "MAC Address OUI" -msgstr "MAC Adresinin OUI'ı" +msgstr "MAC Adresinin OUI'si" msgid "Enable BIOS" msgstr "BIOS'u Etkinleştir" @@ -1680,6 +2136,12 @@ msgstr "Düşük DMA" msgid "Enable Game port" msgstr "Gameport'ı etkinleştir" +msgid "SID Model" +msgstr "SID Modeli" + +msgid "SID Filter Strength" +msgstr "SID Filtre Gücü" + msgid "Surround module" msgstr "Surround modülü" @@ -1692,6 +2154,12 @@ msgstr "CODEC kurulumunda CODEC kesmesini yükselt (bazı sürücüler tarafınd msgid "SB Address" msgstr "SB adresi" +msgid "Adlib Address" +msgstr "AdLib adresi" + +msgid "Use EEPROM setting" +msgstr "EEPROM ayarını kullan" + msgid "WSS IRQ" msgstr "WSS IRQ" @@ -1776,11 +2244,17 @@ msgstr "RAMDAC türü" msgid "Blend" msgstr "Karışım" +msgid "Font" +msgstr "Yazı tipi" + msgid "Bilinear filtering" -msgstr "Bilineer filtreleme" +msgstr "Çift doğrusal filtreleme" + +msgid "Video chroma-keying" +msgstr "Video renk anahtarlanması" msgid "Dithering" -msgstr "Dithering" +msgstr "Titreklik" msgid "Enable NMI for CGA emulation" msgstr "CGA öykünmesi için NMI'yi etkinleştir" @@ -1821,6 +2295,33 @@ msgstr "Transfer hızı" msgid "EMS mode" msgstr "EMS modu" +msgid "EMS Address" +msgstr "EMS adresi" + +msgid "EMS 1 Address" +msgstr "EMS 1 adresi" + +msgid "EMS 2 Address" +msgstr "EMS 2 adresi" + +msgid "EMS Memory Size" +msgstr "EMS bellek büyüklüğü" + +msgid "EMS 1 Memory Size" +msgstr "EMS 1 bellek büyüklüğü" + +msgid "EMS 2 Memory Size" +msgstr "EMS 2 bellek büyüklüğü" + +msgid "Enable EMS" +msgstr "EMS'yi etkinleştir" + +msgid "Enable EMS 1" +msgstr "EMS 1'i etkinleştir" + +msgid "Enable EMS 2" +msgstr "EMS 2'yi etkinleştir" + msgid "Address for > 2 MB" msgstr "> 2 MB için adres" @@ -1839,11 +2340,11 @@ msgstr "Her zaman seçilen hızda" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "BIOS ayarı + Kısayol tuşları (POST sırasında kapalı)" -msgid "64 kB starting from F0000" +msgid "64 KB starting from F0000" msgstr "F0000'dan başlayarak 64 KB" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "E0000'dan başlayarak 128 kB (adresin MSB'si ters çevirilmiş, önce sondaki 64KB)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "E0000'dan başlayarak 128 KB (adresin MSB'si ters çevirilmiş, önce sondaki 64 KB)" msgid "Sine" msgstr "Sinüs" @@ -1876,10 +2377,10 @@ msgid "Wheel" msgstr "Tekerlek" msgid "Five + Wheel" -msgstr "Beş +Tekerlek" +msgstr "Beş + Tekerlek" msgid "Five + 2 Wheels" -msgstr "" +msgstr "Beş + 2 Tekerlek" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 Seri / SMT3(R)V" @@ -1944,6 +2445,9 @@ msgstr "256 KB" msgid "Composite" msgstr "Kompozit" +msgid "True color" +msgstr "Gerçek renk" + msgid "Old" msgstr "Eski" @@ -1977,6 +2481,15 @@ msgstr "sRGB interpolasyonu" msgid "Linear interpolation" msgstr "Doğrusal interpolasyon" +msgid "Has secondary 8x8 character set" +msgstr "İkincil 8x8 karakter seti var" + +msgid "Has Quadcolor II daughter board" +msgstr "Quadcolor II yankartı var" + +msgid "Alternate monochrome contrast" +msgstr "Alternatif tek renkli kontrast" + msgid "128 KB" msgstr "128 KB" @@ -2010,6 +2523,9 @@ msgstr "Kehribar" msgid "Gray" msgstr "Gri" +msgid "Grayscale" +msgstr "Gri tonlu" + msgid "Color" msgstr "Renk" @@ -2025,6 +2541,12 @@ msgstr "Diğer diller" msgid "Bochs latest" msgstr "Bochs'un en son sürümü" +msgid "Apply overscan deltas" +msgstr "Aşırı tarama deltalarını uygula" + +msgid "Mono Interlaced" +msgstr "Tek Renkli (Geçiş Taramalı)" + msgid "Mono Non-Interlaced" msgstr "Tek Renkli (Geçiş Taramasız)" @@ -2037,6 +2559,9 @@ msgstr "Çok Renkli (Geçiş Taramasız)" msgid "3Dfx Voodoo Graphics" msgstr "3Dfx Voodoo Grafikleri" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 TMU)" @@ -2067,8 +2592,8 @@ msgstr "Stereo LPT DAC" msgid "Generic Text Printer" msgstr "Genel Metin Yazıcı" -msgid "Generic ESC/P Dot-Matrix" -msgstr "Genel ESC/P Dot-Matrix" +msgid "Generic ESC/P Dot-Matrix Printer" +msgstr "Genel ESC/P Dot-Matrix Yazıcı" msgid "Generic PostScript Printer" msgstr "Genel PostScript Yazıcı" @@ -2106,11 +2631,14 @@ msgstr "Geçişin Baud Hızı" msgid "Named Pipe (Server)" msgstr "Adlandırılmış Boru (Sunucu)" +msgid "Named Pipe (Client)" +msgstr "Adlandırılmış Boru (İstemci)" + msgid "Host Serial Passthrough" msgstr "Ana Sistem Seri Geçişi" msgid "E&ject %1" -msgstr "%1 imajını &çıkar" +msgstr "%1 görüntüsünü &çıkar" msgid "&Unmute" msgstr "&Sesi aç" @@ -2151,6 +2679,12 @@ msgstr "IBM 8514/A klonu (ISA)" msgid "Vendor" msgstr "Üretici" +msgid "30 Hz (JMP2 = 1)" +msgstr "30 Hz (JMP2 = 1)" + +msgid "60 Hz (JMP2 = 2)" +msgstr "60 Hz (JMP2 = 2)" + msgid "Generic PC/XT Memory Expansion" msgstr "Genel PC/XT Bellek Artırıcı" @@ -2199,16 +2733,10 @@ msgstr "OpenGL sürüm 3.0 veya daha yükseği gereklidir. Şu anki GLSL sürüm msgid "Could not load texture: %1" msgstr "%1 dokusu yüklenemedi" -msgid "" -"Could not compile shader:\n" -"\n" -"%1" +msgid "Could not compile shader:\n\n%1" msgstr "%1 gölgelendiricisi derlenemedi" -msgid "" -"Program not linked:\n" -"\n" -"%1" +msgid "Program not linked:\n\n%1" msgstr "%1 programı bağlanamadı" msgid "Shader Manager" @@ -2227,4 +2755,202 @@ msgid "Move down" msgstr "Aşağı taşı" msgid "Could not load file %1" -msgstr "%1 dosyası yüklenemedi" \ No newline at end of file +msgstr "%1 dosyası yüklenemedi" + +msgid "Key Bindings:" +msgstr "Tuş Bağlamaları" + +msgid "Action" +msgstr "Eylem" + +msgid "Keybind" +msgstr "Tuş bağlaması" + +msgid "Clear binding" +msgstr "Bağlamayı sil" + +msgid "Bind" +msgstr "Bağla" + +msgid "Bind Key" +msgstr "Tuş Bağla" + +msgid "Enter key combo:" +msgstr "Tuş kombinasyonunu girin:" + +msgid "Bind conflict" +msgstr "Bağlama çakışması" + +msgid "This key combo is already in use." +msgstr "Bu tuş kombinasyonu zaten kullanılıyor." + +msgid "Send Control+Alt+Del" +msgstr "Control+Alt+Del gönder" + +msgid "Send Control+Alt+Escape" +msgstr "Control+Alt+Escape gönder" + +msgid "Toggle fullscreen" +msgstr "Tam ekran modunu ayarla" + +msgid "Screenshot" +msgstr "Ekran görüntüsü" + +msgid "Release mouse pointer" +msgstr "Fare imlecini serbest bırak" + +msgid "Toggle pause" +msgstr "Duraklamayı ayarla" + +msgid "Toggle mute" +msgstr "Sessize almayı ayarla" + +msgid "Text files" +msgstr "Metin dosyaları" + +msgid "ROM files" +msgstr "ROM dosyaları" + +msgid "SoundFont files" +msgstr "SoundFont dosyaları" + +msgid "Local Switch" +msgstr "Yerel Switch" + +msgid "Remote Switch" +msgstr "Uzak Switch" + +msgid "Switch:" +msgstr "Switch:" + +msgid "Hub Mode" +msgstr "Hub Modu" + +msgid "Hostname:" +msgstr "Ana bilgisayar adı" + +msgid "ISA RAM:" +msgstr "ISA RAM:" + +msgid "ISA ROM:" +msgstr "ISA ROM:" + +msgid "&Wipe NVRAM" +msgstr "NVRAM'i te&mizle" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Bu işlem, sanal makinenin \"nvr\" altdizininde bulunan tüm NVRAM (ve ilişkili) dosyalarını silecektir. Eğer uygulanabilir ise, Anakartın BIOS'unu (ve muhtemelen VM içindeki diğer cihazları) yeniden yapılandırmanız gerekecektir.\n\nSanal makinenin tüm NVRAM içeriğini silmek istediğinizden emin misiniz?" + +msgid "Success" +msgstr "İşlem başarılı" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "\"%1\" adlı sanal makinenin NVRAM içeriği başarıyla silindi" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "\"%1\" adlı sanal makinenin NVRAM içeriği silinmeye çalışırken hata oluştu" + +msgid "%1 VM Manager" +msgstr "%1 VM Yöneticisi" + +msgid "%n disk(s)" +msgstr "%n disk" + +msgid "Unknown Status" +msgstr "Bilinmeyen Durum" + +msgid "No Machines Found!" +msgstr "Sanal Makine Bulunamadı!" + +msgid "Check for updates on startup" +msgstr "Başlangıçta güncellemeleri kontrol et" + +msgid "Unable to determine release information" +msgstr "Sürüm bilgisi belirlenemiyor" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Güncellemeler kontrol edilirken bir hata oluştu:\n\n%1\n\nLütfen tekrar deneyin." + +msgid "Update check complete" +msgstr "Güncelleme kontrolü tamamlandı" + +msgid "stable" +msgstr "kararlı" + +msgid "beta" +msgstr "beta" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Şu anda 86Box'ın en yeni %1 sürümünü kullanıyorsunuz: %2" + +msgid "version" +msgstr "sürüm" + +msgid "build" +msgstr "yapı" + +msgid "You are currently running version %1." +msgstr "Şu anda %1 sürümünü kullanıyorsunuz." + +msgid "Version %1 is now available." +msgstr "Sürüm %1 şimdi mevcut." + +msgid "You are currently running build %1." +msgstr "Şu anda %1 numaralı yapıyı kullanıyorsunuz." + +msgid "Build %1 is now available." +msgstr "Yapı %1 şimdi mevcut." + +msgid "Would you like to visit the download page?" +msgstr "İndirme sayfasını ziyaret etmek ister misiniz?" + +msgid "Visit download page" +msgstr "İndirme sayfasını ziyaret et" + +msgid "Update check" +msgstr "Güncelleme kontrolü" + +msgid "Checking for updates..." +msgstr "Güncellemeler kontrol ediliyor..." + +msgid "86Box Update" +msgstr "86Box Güncellemesi" + +msgid "Release notes:" +msgstr "Sürüm notları:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Sanal makine çöktü" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "\"%1\" adlı sanal makinenin işlemi beklenmedik bir şekilde çıkış kodu %2 ile sona erdi." + +msgid "The system will not be added." +msgstr "Sistem eklenmeyecek." + +msgid "&Update mouse every CPU frame" +msgstr "Her CPU karesi ile fareyi güncelle" + +msgid "Hue" +msgstr "Renk tonu" + +msgid "Saturation" +msgstr "Doygunluk" + +msgid "Contrast" +msgstr "Kontrast" + +msgid "Brightness" +msgstr "Parlaklık" + +msgid "Sharpness" +msgstr "Keskinlik" + +msgid "&CGA composite settings..." +msgstr "&CGA kompozit modunun ayarları..." + +msgid "CGA composite settings" +msgstr "CGA kompozit modunun ayarları" diff --git a/src/qt/languages/uk-UA.po b/src/qt/languages/uk-UA.po index 49a8acf00..dfe8d9d42 100644 --- a/src/qt/languages/uk-UA.po +++ b/src/qt/languages/uk-UA.po @@ -27,8 +27,14 @@ msgstr "Ctrl+Alt+&Esc" msgid "&Pause" msgstr "&Пауза" -msgid "E&xit..." -msgstr "&Вихід..." +msgid "Pause" +msgstr "Пауза" + +msgid "Re&sume" +msgstr "В&ідновити" + +msgid "E&xit" +msgstr "&Вихід" msgid "&View" msgstr "&Вигляд" @@ -51,20 +57,17 @@ msgstr "&Рендеринг" msgid "&Qt (Software)" msgstr "&Qt (Software)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" msgstr "Open&GL (3.0)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." +msgid "Specify &dimensions..." msgstr "&Вказати розміри..." -msgid "F&orce 4:3 display ratio" -msgstr "&Встановити відношення сторін 4:3" +msgid "Force &4:3 display ratio" +msgstr "Встановити відношення сторін &4:3" msgid "&Window scale factor" msgstr "&Масштаб вікна" @@ -99,7 +102,7 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" +msgid "Fi<er method" msgstr "Метод фільтрації" msgid "&Nearest" @@ -132,8 +135,8 @@ msgstr "&Цілісночисленне масштабування" msgid "4:&3 Integer scale" msgstr "Цілісночисленне масштабування 4:&3" -msgid "E&GA/(S)VGA settings" -msgstr "Налаштування E&GA/(S)VGA" +msgid "EGA/(S)&VGA settings" +msgstr "Налаштування EGA/(S)&VGA" msgid "&Inverted VGA monitor" msgstr "&Інвертувати кольори VGA" @@ -144,9 +147,15 @@ msgstr "&Тип екрана VGA" msgid "RGB &Color" msgstr "RGB &кольоровий" +msgid "RGB (no brown)" +msgstr "RGB (без коричневого)" + msgid "&RGB Grayscale" msgstr "&RGB монохромний" +msgid "Generic RGBI color monitor" +msgstr "Стандартний кольоровий монітор RGBI" + msgid "&Amber monitor" msgstr "&Бурштиновий відтінок" @@ -183,6 +192,9 @@ msgstr "&Інструменти" msgid "&Settings..." msgstr "&Налаштування машини..." +msgid "Settings..." +msgstr "Налаштування машини..." + msgid "&Update status bar icons" msgstr "&Обновлення значків рядка стану" @@ -348,6 +360,9 @@ msgstr "Системна плата:" msgid "Configure" msgstr "Налаштування" +msgid "CPU:" +msgstr "ЦП:" + msgid "CPU type:" msgstr "Тип ЦП:" @@ -384,6 +399,15 @@ msgstr "Увімкнути (UTC)" msgid "Dynamic Recompiler" msgstr "Динамічний рекомпілятор" +msgid "CPU frame size" +msgstr "Розмір кадру ЦП" + +msgid "Larger frames (less smooth)" +msgstr "Великі кадри (менш плавні)" + +msgid "Smaller frames (smoother)" +msgstr "Менші кадри (більш плавні)" + msgid "Video:" msgstr "Відеокарта:" @@ -399,12 +423,27 @@ msgstr "Прискорювач IBM 8514/A" msgid "XGA Graphics" msgstr "Прискорювач XGA" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "IBM PS/55 Display Adapter Graphics" + +msgid "Keyboard:" +msgstr "Клавіатура:" + +msgid "Keyboard" +msgstr "Клавіатура" + msgid "Mouse:" msgstr "Миша:" +msgid "Mouse" +msgstr "Миша" + msgid "Joystick:" msgstr "Джойстик:" +msgid "Joystick" +msgstr "Джойстик" + msgid "Joystick 1..." msgstr "Джойстик 1..." @@ -435,6 +474,9 @@ msgstr "MIDI Out при-ій:" msgid "MIDI In Device:" msgstr "MIDI In при-ій:" +msgid "MIDI Out:" +msgstr "MIDI Out:" + msgid "Standalone MPU-401" msgstr "Окремий MPU-401" @@ -474,6 +516,9 @@ msgstr "Пристрій LPT3:" msgid "LPT4 Device:" msgstr "Пристрій LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "DMA ECP вбудованого LPT:" + msgid "Serial port 1" msgstr "Послідов. порт COM1" @@ -498,18 +543,21 @@ msgstr "Паралельний порт LPT3" msgid "Parallel port 4" msgstr "Паралельний порт LPT4" -msgid "HD Controller:" -msgstr "Контролер HD:" - msgid "FD Controller:" msgstr "Контролер FD:" +msgid "CD-ROM Controller:" +msgstr "Контролер CD-ROM:" + msgid "Tertiary IDE Controller" msgstr "Третинний IDE контролер" msgid "Quaternary IDE Controller" msgstr "Четвертинний IDE контролер" +msgid "Hard disk" +msgstr "Жорсткий диск" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "Касета" msgid "Hard disks:" msgstr "Жорсткі диски:" +msgid "Firmware Version" +msgstr "Версія прошивки" + msgid "&New..." msgstr "&Створити..." @@ -588,8 +639,14 @@ msgstr "Дисководи CD-ROM:" msgid "MO drives:" msgstr "Магнітооптичні дисководи:" -msgid "ZIP drives:" -msgstr "ZIP дисководи:" +msgid "MO:" +msgstr "Дисководи MO:" + +msgid "Removable disks:" +msgstr "Знімні диски:" + +msgid "Removable disk drives:" +msgstr "Дисководи знімних дисків:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "ISA RTC:" msgid "ISA Memory Expansion" msgstr "Карта розширення пам'яті (ISA)" +msgid "ISA ROM Cards" +msgstr "Карти ПЗУ ISA" + msgid "Card 1:" msgstr "Карта 1:" @@ -612,6 +672,15 @@ msgstr "Карта 3:" msgid "Card 4:" msgstr "Карта 4:" +msgid "Generic ISA ROM Board" +msgstr "Стандартна плата ПЗУ ISA" + +msgid "Generic Dual ISA ROM Board" +msgstr "Стандартна плата на 2 ПЗУ ISA" + +msgid "Generic Quad ISA ROM Board" +msgstr "Стандартна плата на 4 ПЗУ ISA" + msgid "ISABugger device" msgstr "Пристрій ISABugger" @@ -633,11 +702,17 @@ msgstr " - ПРИЗУПИНЕННЯ" msgid "Speed" msgstr "Швидкість" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Знімний диск %1 (%2): %3" -msgid "ZIP images" -msgstr "Образи ZIP" +msgid "&Removable disk %1 (%2): %3" +msgstr "&Знімний диск %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Образи знімних дисків" + +msgid "Image %1" +msgstr "Образ %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "86Box не зміг знайти жодного відповідного для використання файлу з ПЗУ.\n\nБудь ласка завантажте набір ПЗУ і витягніть його в каталог \"roms\"." @@ -696,12 +771,30 @@ msgstr "Мережа" msgid "Ports (COM & LPT)" msgstr "Порти (COM и LPT)" +msgid "Ports" +msgstr "Порти" + +msgid "Serial ports:" +msgstr "Послідовні порти:" + +msgid "Parallel ports:" +msgstr "Паралельні порти:" + msgid "Storage controllers" msgstr "Контролери дисків" msgid "Hard disks" msgstr "Жорсткі диски" +msgid "Disks:" +msgstr "Диски:" + +msgid "Floppy:" +msgstr "Дисководи:" + +msgid "Controllers:" +msgstr "Контролери:" + msgid "Floppy & CD-ROM drives" msgstr "Гнучкі диски і CD-ROM" @@ -711,6 +804,9 @@ msgstr "Інші знімні при-ої" msgid "Other peripherals" msgstr "Інша периферія" +msgid "Other devices" +msgstr "Інші пристрої" + msgid "Click to capture mouse" msgstr "Клацніть мишею для захвату курсора" @@ -777,12 +873,39 @@ msgstr "4-осьовий, 4-кнопковий джойстик" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Педалі" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Система управління польотом Thrustmaster" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Система управління кермом" + +msgid "2-button gamepad(s)" +msgstr "4-кнопковий геймпад" + +msgid "2-button flight yoke" +msgstr "2-кнопковий flight yoke" + +msgid "4-button gamepad" +msgstr "4-кнопковий геймпад" + +msgid "4-button flight yoke" +msgstr "4-кнопковий flight yoke" + +msgid "2-button flight yoke with throttle" +msgstr "2-кнопковий flight yoke з дроселем" + +msgid "4-button flight yoke with throttle" +msgstr "4-кнопковий flight yoke з дроселем" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Кермо Win95 (3-осьове, 4-кнопкове)" + msgid "None" msgstr "Ні" @@ -792,6 +915,9 @@ msgstr "%1 МБ (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Дисковод %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "&Дисковод %1 (%2): %3" + msgid "Advanced sector images" msgstr "Розширені образи секторів" @@ -813,6 +939,9 @@ msgstr "Неможливо ініціалізувати GhostPCL" msgid "MO %1 (%2): %3" msgstr "Магнітооптичний %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&Магнітооптичний %1 (%2): %3" + msgid "MO images" msgstr "Образи магнітооптичних дисків" @@ -822,6 +951,15 @@ msgstr "Ласкаво просимо в 86Box!" msgid "Internal device" msgstr "Вбудований пристрій" +msgid "&File" +msgstr "&Файл" + +msgid "&New machine..." +msgstr "&Нова машина..." + +msgid "&Check for updates..." +msgstr "&Перевірити оновлення..." + msgid "Exit" msgstr "Вихід" @@ -849,8 +987,8 @@ msgstr "Емулятор старих комп'ютерів\n\nАвтори: Mir msgid "Hardware not available" msgstr "Обладнання недоступне" -msgid "Make sure %1 is installed and that you are on a libpcap-compatible network connection." -msgstr "Переконайтесь, що %1 встановлений і ваше мережеве з'єднання, сумісне з libpcap." +msgid "Make sure %1 is installed and that you are on a %1-compatible network connection." +msgstr "Переконайтесь, що %1 встановлений і ваше мережеве з'єднання, сумісне з %1." msgid "Invalid configuration" msgstr "Неприпустима конфігурація" @@ -897,12 +1035,18 @@ msgstr "Продовжити" msgid "Cassette: %1" msgstr "Касета: %1" +msgid "C&assette: %1" +msgstr "К&асета: %1" + msgid "Cassette images" msgstr "Образи касет" msgid "Cartridge %1: %2" msgstr "Картридж %1: %2" +msgid "Car&tridge %1: %2" +msgstr "Кар&тридж %1: %2" + msgid "Cartridge images" msgstr "Образи картриджів" @@ -912,6 +1056,9 @@ msgstr "Відновити виконання" msgid "Pause execution" msgstr "Призупинити виконання" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Натиснути Ctrl+Alt+Del" @@ -921,9 +1068,279 @@ msgstr "Натиснути Ctrl+Alt+Esc" msgid "Hard reset" msgstr "Холодне перезавантаження" +msgid "Force shutdown" +msgstr "Примусове завершення роботи" + +msgid "Start" +msgstr "Пуск" + +msgid "Not running" +msgstr "Не працює" + +msgid "Running" +msgstr "Працює" + +msgid "Paused" +msgstr "Призупинено" + +msgid "Waiting" +msgstr "Очікування" + +msgid "Powered Off" +msgstr "Вимкнено" + +msgid "%n running" +msgstr "%n працює" + +msgid "%n paused" +msgstr "%n призупинено" + +msgid "%n waiting" +msgstr "%n очікує" + +msgid "%1 total" +msgstr "всього %1" + +msgid "VMs: %1" +msgstr "Машин: %1" + +msgid "System Directory:" +msgstr "Системна папка:" + +msgid "Choose directory" +msgstr "Вибрати папку" + +msgid "Choose configuration file" +msgstr "Вибрати файл конфігурації" + +msgid "86Box configuration files (86box.cfg)" +msgstr "Файли конфігурації 86Box (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Збій під час читання конфігурації" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Неможливо відкрити вибраний файл конфігурації для читання: %1" + +msgid "Use regular expressions in search box" +msgstr "Використовувати регулярні вирази в полі пошуку" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 машина(и) наразі активна(і). Ви впевнені, що все одно хочете вийти з менеджера віртуальної машини?" + +msgid "Add new system wizard" +msgstr "Майстер додавання нової системи" + +msgid "Introduction" +msgstr "Вступ" + +msgid "This will help you add a new system to 86Box." +msgstr "Це допоможе вам додати нову систему в 86Box." + +msgid "New configuration" +msgstr "Нова конфігурація" + +msgid "Complete" +msgstr "Завершено" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "Майстер тепер запустить конфігурацію для нової системи." + +msgid "Use existing configuration" +msgstr "Використовувати існуючу конфігурацію" + +msgid "Type some notes here" +msgstr "Введіть тут кілька нотаток" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Вставте вміст існуючого файлу конфігурації в поле нижче." + +msgid "Load configuration from file" +msgstr "Завантажити конфігурацію з файлу" + +msgid "System name" +msgstr "Назва системи" + +msgid "System name:" +msgstr "Назва системи:" + +msgid "System name cannot contain certain characters" +msgstr "Назва системи не може містити певні символи" + +msgid "System name already exists" +msgstr "Назва системи вже існує" + +msgid "Please enter a directory for the system" +msgstr "Будь ласка, введіть папку для системи" + +msgid "Directory does not exist" +msgstr "Папка не існує" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "Нова папка для системи буде створена у вибраній папці вище" + +msgid "System location:" +msgstr "Розташування системи:" + +msgid "System name and location" +msgstr "Назва системи та розташування" + +msgid "Enter the name of the system and choose the location" +msgstr "Введіть назву системи та виберіть розташування" + +msgid "Enter the name of the system" +msgstr "Введіть назву системи" + +msgid "Please enter a system name" +msgstr "Будь ласка, введіть назву системи" + +msgid "Display name (optional):" +msgstr "Відображуване ім'я (необов'язково):" + +msgid "Display name:" +msgstr "Відображуване ім'я:" + +msgid "Set display name" +msgstr "Встановити відображуване ім'я" + +msgid "Enter the new display name (blank to reset)" +msgstr "Введіть нове відображуване ім'я (порожнє, щоб скинути)" + +msgid "Change &display name..." +msgstr "Змінити &відображуване ім'я..." + +msgid "Context Menu" +msgstr "Контекстне меню" + +msgid "&Open folder..." +msgstr "&Відкрити папку..." + +msgid "Open p&rinter tray..." +msgstr "Відкрити папку &принтера..." + +msgid "Set &icon..." +msgstr "Встановити &значок..." + +msgid "Select an icon" +msgstr "Виберіть значок" + +msgid "C&lone..." +msgstr "К&лонувати..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "Віртуальна машина \"%1\" (%2) буде клонована в:" + +msgid "Directory %1 already exists" +msgstr "Папка %1 вже існує" + +msgid "You cannot use the following characters in the name: %1" +msgstr "Ви не можете використовувати наступні символи в імені: %1" + +msgid "Clone" +msgstr "Клонувати" + +msgid "Failed to create directory for cloned VM" +msgstr "Не вдалося створити папку для клонованої віртуальної машини" + +msgid "Failed to clone VM." +msgstr "Не вдалося клонувати віртуальну машину." + +msgid "Directory in use" +msgstr "Папка використовується" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "Вибрана папка вже використовується. Будь ласка, виберіть іншу папку." + +msgid "Create directory failed" +msgstr "Не вдалося створити папку" + +msgid "Unable to create the directory for the new system" +msgstr "Неможливо створити папку для нової системи" + +msgid "Configuration write failed" +msgstr "Не вдалося записати файл конфігурації" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Неможливо відкрити файл конфігурації в %1 для запису" + +msgid "Error adding system" +msgstr "Помилка додавання системи" + +msgid "Remove directory failed" +msgstr "Збій під час видалення папки" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Деякі файли в папці машини неможливо видалити. Будь ласка, видаліть їх вручну." + +msgid "Build" +msgstr "Збірка" + +msgid "Version" +msgstr "Версія" + +msgid "An update to 86Box is available: %1 %2" +msgstr "Доступне оновлення для 86Box: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Під час перевірки оновлень сталася помилка: %1" + +msgid "An update to 86Box is available!" +msgstr "Доступне оновлення для 86Box!" + +msgid "Warning" +msgstr "Увага" + +msgid "&Kill" +msgstr "&Завершити процес" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Примусове завершення процесу віртуальної машини може призвести до втрати даних. Робіть це тільки в тому випадку, якщо процес 86Box завис.\n\nВи дійсно хочете примусово завершити процес віртуальної машини \"%1\"?" + +msgid "&Delete" +msgstr "&Видалити" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Ви дійсно хочете видалити віртуальну машину \"%1\" і всі її файли? Цю дію не можна скасувати!" + +msgid "Show &config file" +msgstr "Показати файл &конфігурації" + +msgid "No screenshot" +msgstr "Немає скріншоту" + +msgid "Search" +msgstr "Пошук" + +msgid "Searching for VMs..." +msgstr "Пошук віртуальних машин..." + +msgid "Found %1" +msgstr "Знайдено %1" + +msgid "System" +msgstr "Система" + +msgid "Storage" +msgstr "Диски" + +msgid "Disk %1: " +msgstr "Диск %1: " + +msgid "No disks" +msgstr "Немає дисків" + +msgid "Audio" +msgstr "Аудіо" + +msgid "Audio:" +msgstr "Аудіо:" + msgid "ACPI shutdown" msgstr "Сигнал завершення ACPI" +msgid "ACP&I shutdown" +msgstr "Сигнал завершення ACP&I" + msgid "Hard disk (%1)" msgstr "Жорсткий диск (%1)" @@ -1045,7 +1462,7 @@ msgid "Select the parent VHD" msgstr "Виберіть батьківський VHD" msgid "This could mean that the parent image was modified after the differencing image was created.\n\nIt can also happen if the image files were moved or copied, or by a bug in the program that created this disk.\n\nDo you want to fix the timestamps?" -msgstr "Це може означати, що батьківський образ був змінений після того, як було створено диференційований образ.\n\nЦе також може статися, якщо файли зображення були переміщені або скопійовані, або через помилку в програмі, що створила цей диск.\n \nВи хочете виправити тимчасові позначки?" +msgstr "Це може означати, що батьківський образ був змінений після того, як було створено диференційований образ.\n\nЦе також може статися, якщо файли зображення були переміщені або скопійовані, або через помилку в програмі, що створила цей диск.\n\nВи хочете виправити тимчасові позначки?" msgid "Parent and child disk timestamps do not match" msgstr "Тимчасові мітки батьківського та дочірнього дисків не співпадають" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 КБ" @@ -1209,40 +1629,37 @@ msgstr "Пристрої MCA" msgid "List of MCA devices:" msgstr "Список пристроїв MCA:" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Інструмент для планшета" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "Про &Qt" -msgid "About Qt" -msgstr "Про Qt" +msgid "&MCA devices..." +msgstr "Пристрої &MCA..." -msgid "MCA devices..." -msgstr "Пристрої MCA..." - -msgid "Show non-primary monitors" +msgid "Show non-&primary monitors" msgstr "Показати неосновні монітори" -msgid "Open screenshots folder..." +msgid "Open screenshots &folder..." msgstr "Відкрийте папку скріншотів..." -msgid "Apply fullscreen stretch mode when maximized" +msgid "Appl&y fullscreen stretch mode when maximized" msgstr "Застосовувати розстягування у повноекранному режимі у максимізованому стані" -msgid "Cursor/Puck" -msgstr "Курсор/шайба" +msgid "&Cursor/Puck" +msgstr "&Курсор/шайба" -msgid "Pen" -msgstr "Ручка" +msgid "&Pen" +msgstr "&Ручка" -msgid "Host CD/DVD Drive (%1:)" -msgstr "CD/DVD привід хоста (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "CD/DVD &привід хоста (%1:)" msgid "&Connected" msgstr "&Підключено" -msgid "Clear image history" +msgid "Clear image &history" msgstr "Очистити історію образів" msgid "Create..." @@ -1257,9 +1674,15 @@ msgstr "Невідома шина" msgid "Null Driver" msgstr "Нульовий драйвер" +msgid "NIC:" +msgstr "NIC:" + msgid "NIC %1 (%2) %3" msgstr "NIC %1 (%2) %3" +msgid "&NIC %1 (%2) %3" +msgstr "&NIC %1 (%2) %3" + msgid "Render behavior" msgstr "Поведінка рендерингу" @@ -1323,6 +1746,9 @@ msgstr "Ніяких пристроїв MCA." msgid "MiB" msgstr "МіБ" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" msgstr "Мережева карта 1" @@ -1365,9 +1791,27 @@ msgstr "Пропуск послідовного порту 3" msgid "Serial port passthrough 4" msgstr "Пропуск послідовного порту 4" -msgid "Renderer options..." +msgid "Renderer &options..." msgstr "Параметри рендерингу..." +msgid "PC/XT Keyboard" +msgstr "Клавіатура PC/XT" + +msgid "AT Keyboard" +msgstr "Клавіатура AT" + +msgid "AX Keyboard" +msgstr "Клавіатура AX" + +msgid "PS/2 Keyboard" +msgstr "Клавіатура PS/2" + +msgid "PS/55 Keyboard" +msgstr "Клавіатура PS/55" + +msgid "Keys" +msgstr "Клавіші" + msgid "Logitech/Microsoft Bus Mouse" msgstr "Шинна миша Logitech/Microsoft" @@ -1377,18 +1821,30 @@ msgstr "Шинна миша Microsoft (InPort)" msgid "Mouse Systems Serial Mouse" msgstr "Послідовна миша Mouse Systems" +msgid "Mouse Systems Bus Mouse" +msgstr "Шинна миша Mouse Systems" + msgid "Microsoft Serial Mouse" msgstr "Послідовна миша Microsoft" +msgid "Microsoft Serial BallPoint" +msgstr "Послідовна миша Microsoft BallPoint" + msgid "Logitech Serial Mouse" msgstr "Послідовна миша Logitech" msgid "PS/2 Mouse" msgstr "Миша PS/2" +msgid "PS/2 QuickPort Mouse" +msgstr "Миша PS/2 QuickPort" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (послідовна)" +msgid "Default Baud rate" +msgstr "Швидкість передачі даних за замовчуванням" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Стандартний модем, сумісний зі стандартом Hayes" @@ -1413,21 +1869,81 @@ msgstr "MIDI системи" msgid "MIDI Input Device" msgstr "Пристрій введення MIDI" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "Файл BIOS" + +msgid "BIOS file (ROM #1)" +msgstr "Файл BIOS (ПЗУ #1)" + +msgid "BIOS file (ROM #2)" +msgstr "Файл BIOS (ПЗУ #2)" + +msgid "BIOS file (ROM #3)" +msgstr "Файл BIOS (ПЗУ #3)" + +msgid "BIOS file (ROM #4)" +msgstr "Файл BIOS (ПЗУ #4)" + +msgid "BIOS address" msgstr "Адреса BIOS" +msgid "BIOS address (ROM #1)" +msgstr "Адреса BIOS (ПЗУ #1)" + +msgid "BIOS address (ROM #2)" +msgstr "Адреса BIOS (ПЗУ #2)" + +msgid "BIOS address (ROM #3)" +msgstr "Адреса BIOS (ПЗУ #3)" + +msgid "BIOS address (ROM #4)" +msgstr "Адреса BIOS (ПЗУ #4)" + msgid "Enable BIOS extension ROM Writes" msgstr "Увімкнути розширення BIOS Записи в ПЗУ" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "Увімкнути розширення BIOS Записи в ПЗУ (ПЗУ #1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "Увімкнути розширення BIOS Записи в ПЗУ (ПЗУ #2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "Увімкнути розширення BIOS Записи в ПЗУ (ПЗУ #3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "Увімкнути розширення BIOS Записи в ПЗУ (ПЗУ #4)" + +msgid "Linear framebuffer base" +msgstr "Лінійний фреймбуфер" + msgid "Address" msgstr "Адреса" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "IRQ послідовного порту" + +msgid "Parallel port IRQ" +msgstr "IRQ паралельного порту" + msgid "BIOS Revision" msgstr "Ревізія BIOS" +msgid "BIOS Version" +msgstr "Версія BIOS" + +msgid "BIOS Language" +msgstr "Мова BIOS" + +msgid "IBM 5161 Expansion Unit" +msgstr "Блок розширення IBM 5161" + +msgid "IBM Cassette Basic" +msgstr "Касетний бейсік IBM" + msgid "Translate 26 -> 17" msgstr "Перекладіть 26 -> 17" @@ -1443,6 +1959,18 @@ msgstr "Інвертувати кольори" msgid "BIOS size" msgstr "Розмір BIOS" +msgid "BIOS size (ROM #1)" +msgstr "Розмір BIOS (ПЗУ 1)" + +msgid "BIOS size (ROM #2)" +msgstr "Розмір BIOS (ПЗУ 2)" + +msgid "BIOS size (ROM #3)" +msgstr "Розмір BIOS (ПЗУ 3)" + +msgid "BIOS size (ROM #4)" +msgstr "Розмір BIOS (ПЗУ 4)" + msgid "Map C0000-C7FFF as UMB" msgstr "Зіставлення C0000-C7FFF як UMB" @@ -1518,6 +2046,9 @@ msgstr "Рівень реверберації" msgid "Interpolation Method" msgstr "Метод інтерполяції" +msgid "Dynamic Sample Loading" +msgstr "Динамічне завантаження семплів" + msgid "Reverb Output Gain" msgstr "Посилення виходу реверберації" @@ -1605,6 +2136,12 @@ msgstr "Низький рівень DMA" msgid "Enable Game port" msgstr "Увімкнути ігровий порт" +msgid "SID Model" +msgstr "Модель SID" + +msgid "SID Filter Strength" +msgstr "Сила фільтра SID" + msgid "Surround module" msgstr "Модуль об'ємного звучання" @@ -1617,6 +2154,12 @@ msgstr "Піднімати переривання CODEC під час встан msgid "SB Address" msgstr "Адреса SB" +msgid "Adlib Address" +msgstr "Адреса AdLib" + +msgid "Use EEPROM setting" +msgstr "Використовувати налаштування EEPROM" + msgid "WSS IRQ" msgstr "IRQ WSS" @@ -1701,9 +2244,15 @@ msgstr "Тип RAMDAC" msgid "Blend" msgstr "Суміш" +msgid "Font" +msgstr "Шрифт" + msgid "Bilinear filtering" msgstr "Білінійна фільтрація" +msgid "Video chroma-keying" +msgstr "Відео хромакеїнг" + msgid "Dithering" msgstr "Дизеринг" @@ -1746,6 +2295,33 @@ msgstr "Швидкість передачі даних" msgid "EMS mode" msgstr "Режим EMS" +msgid "EMS Address" +msgstr "Адреса EMS" + +msgid "EMS 1 Address" +msgstr "Адреса EMS 1" + +msgid "EMS 2 Address" +msgstr "Адреса EMS 2" + +msgid "EMS Memory Size" +msgstr "Розмір пам'яті EMS" + +msgid "EMS 1 Memory Size" +msgstr "Розмір пам'яті EMS 1" + +msgid "EMS 2 Memory Size" +msgstr "Розмір пам'яті EMS 2" + +msgid "Enable EMS" +msgstr "Увімкнути EMS" + +msgid "Enable EMS 1" +msgstr "Увімкнути EMS 1" + +msgid "Enable EMS 2" +msgstr "Увімкнути EMS 2" + msgid "Address for > 2 MB" msgstr "Адреса для > 2 МБ" @@ -1764,11 +2340,11 @@ msgstr "Завжди на обраній швидкості" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "Налаштування BIOS + Гарячі клавіші (вимкнено під час POST)" -msgid "64 kB starting from F0000" -msgstr "64 кБ, починаючи з F0000" +msgid "64 KB starting from F0000" +msgstr "64 KБ, починаючи з F0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 кБ, починаючи з E0000 (адреса MSB інвертована, останні 64 кБ першими)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KБ, починаючи з E0000 (адреса MSB інвертована, останні 64 KБ першими)" msgid "Sine" msgstr "Синусоїдальна" @@ -1804,7 +2380,7 @@ msgid "Five + Wheel" msgstr "П'ять + колесо" msgid "Five + 2 Wheels" -msgstr "" +msgstr "П'ять + 2 колеса" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 послідовна / SMT3(R)V" @@ -1869,6 +2445,9 @@ msgstr "256 КБ" msgid "Composite" msgstr "Композитний" +msgid "True color" +msgstr "True Color" + msgid "Old" msgstr "Старий" @@ -1902,6 +2481,15 @@ msgstr "sRGB інтерполяція" msgid "Linear interpolation" msgstr "Лінійна інтерполяція" +msgid "Has secondary 8x8 character set" +msgstr "Вторинний набір символів 8x8" + +msgid "Has Quadcolor II daughter board" +msgstr "Дочірня плата Quadcolor II" + +msgid "Alternate monochrome contrast" +msgstr "Альтернативний монохромний контраст" + msgid "128 KB" msgstr "128 КБ" @@ -1935,6 +2523,9 @@ msgstr "Бурштиновий" msgid "Gray" msgstr "Сірий" +msgid "Grayscale" +msgstr "Монохромний" + msgid "Color" msgstr "Кольоровий" @@ -1950,6 +2541,12 @@ msgstr "Інші мови" msgid "Bochs latest" msgstr "Bochs останній" +msgid "Apply overscan deltas" +msgstr "Застосувати дельти вильотів розгортки" + +msgid "Mono Interlaced" +msgstr "Монохромний інтерлейсний" + msgid "Mono Non-Interlaced" msgstr "Монохромний неінтерлейсний" @@ -1962,6 +2559,9 @@ msgstr "Кольоровий неінтерлейсний" msgid "3Dfx Voodoo Graphics" msgstr "Прискорювач 3Dfx Voodoo" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 TMU)" @@ -2031,6 +2631,9 @@ msgstr "Швидкість передачі даних пропуску" msgid "Named Pipe (Server)" msgstr "Іменований пайп (сервер)" +msgid "Named Pipe (Client)" +msgstr "Іменований пайп (клієнт)" + msgid "Host Serial Passthrough" msgstr "Пропуск послідовного порту хоста" @@ -2047,28 +2650,28 @@ msgid "High performance impact" msgstr "Високий вплив на продуктивність" msgid "[Generic] RAM Disk (max. speed)" -msgstr "[Generic] Диск оперативної пам'яті (макс. швидкість)" +msgstr "[Стандартний] Диск оперативної пам'яті (макс. швидкість)" msgid "[Generic] 1989 (3500 RPM)" -msgstr "" +msgstr "[Стандартний] 1989 (3500 RPM)" msgid "[Generic] 1992 (3600 RPM)" -msgstr "" +msgstr "[Стандартний] 1992 (3600 RPM)" msgid "[Generic] 1994 (4500 RPM)" -msgstr "" +msgstr "[Стандартний] 1994 (4500 RPM)" msgid "[Generic] 1996 (5400 RPM)" -msgstr "" +msgstr "[Стандартний] 1996 (5400 RPM)" msgid "[Generic] 1997 (5400 RPM)" -msgstr "" +msgstr "[Стандартний] 1997 (5400 RPM)" msgid "[Generic] 1998 (5400 RPM)" -msgstr "" +msgstr "[Стандартний] 1998 (5400 RPM)" msgid "[Generic] 2000 (7200 RPM)" -msgstr "" +msgstr "[Стандартний] 2000 (7200 RPM)" msgid "IBM 8514/A clone (ISA)" msgstr "Клон IBM 8514/A (ISA)" @@ -2095,61 +2698,259 @@ msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for t msgstr "Шрифти TrueType у каталозі \"roms/printer/fonts\" потрібні для емуляції загального матричного принтера Generic ESC/P." msgid "Inhibit multimedia keys" -msgstr "" +msgstr "Перехоплювати мультимедійні клавіші" msgid "Ask for confirmation before saving settings" -msgstr "" +msgstr "Запитувати підтвердження перед збереженням налаштувань" msgid "Ask for confirmation before hard resetting" -msgstr "" +msgstr "Запитувати підтвердження перед холодним перезавантаженням" msgid "Ask for confirmation before quitting" -msgstr "" +msgstr "Запитувати підтвердження перед виходом" msgid "Options" -msgstr "" +msgstr "Параметри" msgid "Model" -msgstr "" +msgstr "Модель" msgid "Model:" -msgstr "" +msgstr "Модель:" msgid "Failed to initialize Vulkan renderer." -msgstr "" +msgstr "Не вдалося ініціалізувати рендеринг Vulkan." msgid "GLSL Error" -msgstr "" +msgstr "Помилка GLSL" msgid "Could not load shader: %1" -msgstr "" +msgstr "Не вдалося завантажити шейдер: %1" msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" -msgstr "" +msgstr "Потрібна OpenGL версії 3.0 або вище. Поточна версія GLSL %1.%2" msgid "Could not load texture: %1" -msgstr "" +msgstr "Не вдалося завантажити текстуру: %1" msgid "Could not compile shader:\n\n%1" -msgstr "" +msgstr "Не вдалося скомпілювати шейдер:\n\n%1" msgid "Program not linked:\n\n%1" -msgstr "" +msgstr "Не вдалося скомпонувати шейдер:\n\n%1" msgid "Shader Manager" -msgstr "" +msgstr "Управління шейдерами" msgid "Shader Configuration" -msgstr "" +msgstr "Конфігурація шейдера" msgid "Add" -msgstr "" +msgstr "Додати" msgid "Move up" -msgstr "" +msgstr "Вгору" msgid "Move down" -msgstr "" +msgstr "Вниз" msgid "Could not load file %1" -msgstr "" +msgstr "Не вдалося завантажити файл %1" + +msgid "Key Bindings:" +msgstr "Прив'язки клавіш:" + +msgid "Action" +msgstr "Дія" + +msgid "Keybind" +msgstr "Прив'язка клавіш" + +msgid "Clear binding" +msgstr "Очистити прив'язку" + +msgid "Bind" +msgstr "Прив'язка" + +msgid "Bind Key" +msgstr "Прив'язати клавішу" + +msgid "Enter key combo:" +msgstr "Введіть комбінацію клавіш:" + +msgid "Bind conflict" +msgstr "Конфлікт прив'язки" + +msgid "This key combo is already in use." +msgstr "Ця комбінація клавіш вже використовується." + +msgid "Send Control+Alt+Del" +msgstr "Надіслати Control+Alt+Del" + +msgid "Send Control+Alt+Escape" +msgstr "Надіслати Control+Alt+Escape" + +msgid "Toggle fullscreen" +msgstr "Переключити повноекранний режим" + +msgid "Screenshot" +msgstr "Скріншот" + +msgid "Release mouse pointer" +msgstr "Відпустити вказівник миші" + +msgid "Toggle pause" +msgstr "Переключити паузу" + +msgid "Toggle mute" +msgstr "Переключити беззвучний режим" + +msgid "Text files" +msgstr "Текстові файли" + +msgid "ROM files" +msgstr "Файли ПЗУ" + +msgid "SoundFont files" +msgstr "Файли SoundFont" + +msgid "Local Switch" +msgstr "Локальний комутатор" + +msgid "Remote Switch" +msgstr "Віддалений комутатор" + +msgid "Switch:" +msgstr "Номер комутатора:" + +msgid "Hub Mode" +msgstr "Режим концентратора" + +msgid "Hostname:" +msgstr "Ім'я хоста:" + +msgid "ISA RAM:" +msgstr "ISA ОЗУ:" + +msgid "ISA ROM:" +msgstr "ISA ПЗУ:" + +msgid "&Wipe NVRAM" +msgstr "&Стерти NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Це видалить всі файли NVRAM (і пов'язані) віртуальної машини, розташованої в підпапці «nvr». Вам доведеться знову налаштувати BIOS (і, можливо, інші пристрої всередині віртуальної машини), якщо це необхідно. Ви впевнені, що хочете стерти весь вміст NVRAM віртуальної машини \"%1\"?" + +msgid "Success" +msgstr "Успішно" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Успішно стерто вміст NVRAM віртуальної машини \"%1\"" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Сталася помилка при спробі стерти вміст NVRAM віртуальної машини \"%1\"" + +msgid "%1 VM Manager" +msgstr "Менеджер віртуальних машин %1" + +msgid "%n disk(s)" +msgstr "%n диск(ів)" + +msgid "Unknown Status" +msgstr "Невідомий статус" + +msgid "No Machines Found!" +msgstr "Машини не знайдені!" + +msgid "Check for updates on startup" +msgstr "Перевіряти оновлення під час запуску" + +msgid "Unable to determine release information" +msgstr "Неможливо визначити інформацію про реліз" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Сталася помилка під час перевірки оновлень:\n\n%1\n\nБудь ласка, спробуйте ще раз пізніше." + +msgid "Update check complete" +msgstr "Перевірка оновлень завершена" + +msgid "stable" +msgstr "стабільну" + +msgid "beta" +msgstr "бета" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Ви використовуєте останню %1 версію 86Box: %2" + +msgid "version" +msgstr "версія" + +msgid "build" +msgstr "збірка" + +msgid "You are currently running version %1." +msgstr "Ви зараз використовуєте версію %1." + +msgid "Version %1 is now available." +msgstr "Доступна версія %1." + +msgid "You are currently running build %1." +msgstr "Ви зараз використовуєте збірку %1." + +msgid "Build %1 is now available." +msgstr "Доступна збірка %1." + +msgid "Would you like to visit the download page?" +msgstr "Відкрити сторінку завантаження?" + +msgid "Visit download page" +msgstr "Відкрити сторінку завантаження" + +msgid "Update check" +msgstr "Перевірка оновлень" + +msgid "Checking for updates..." +msgstr "Перевірка оновлень..." + +msgid "86Box Update" +msgstr "Оновлення 86Box" + +msgid "Release notes:" +msgstr "Примітки до релізу:" + +msgid "%1 Hz" +msgstr "%1 Гц" + +msgid "Virtual machine crash" +msgstr "Збій віртуальної машини" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "Процес віртуальної машини \"%1\" несподівано завершився з кодом завершення %2." + +msgid "The system will not be added." +msgstr "Система не буде додана." + +msgid "&Update mouse every CPU frame" +msgstr "&Оновлювати мишу при кожному кадрі ЦП" + +msgid "Hue" +msgstr "Відтінок" + +msgid "Saturation" +msgstr "Насичення" + +msgid "Contrast" +msgstr "Контраст" + +msgid "Brightness" +msgstr "Яскравість" + +msgid "Sharpness" +msgstr "Гострота" + +msgid "&CGA composite settings..." +msgstr "Налаштування композитного відео &CGA..." + +msgid "CGA composite settings" +msgstr "Налаштування композитного відео CGA" diff --git a/src/qt/languages/vi-VN.po b/src/qt/languages/vi-VN.po index 9fed36393..9a3521afb 100644 --- a/src/qt/languages/vi-VN.po +++ b/src/qt/languages/vi-VN.po @@ -10,7 +10,7 @@ msgid "&Action" msgstr "&Thực hiện" msgid "&Keyboard requires capture" -msgstr "Bàn phím &hoạt động cần capture chuột" +msgstr "Bàn phím &hoạt động cần 'bắt' chuột" msgid "&Right CTRL is left ALT" msgstr "Gắn ALT trái vào CTRL ph&ải" @@ -27,8 +27,14 @@ msgstr "Ctrl+Alt+&Esc" msgid "&Pause" msgstr "Tạm &dừng" -msgid "E&xit..." -msgstr "Th&oát..." +msgid "Pause" +msgstr "Tạm dừng" + +msgid "Re&sume" +msgstr "Tiếp tục" + +msgid "E&xit" +msgstr "Th&oát" msgid "&View" msgstr "&Xem" @@ -51,20 +57,17 @@ msgstr "Re&nderer" msgid "&Qt (Software)" msgstr "&Qt (phần mềm)" -msgid "Qt (&OpenGL)" -msgstr "Qt (&OpenGL)" - msgid "Open&GL (3.0 Core)" msgstr "Open&GL (3.0 Core)" msgid "&VNC" msgstr "&VNC" -msgid "Specify dimensions..." +msgid "Specify &dimensions..." msgstr "Tự nhập độ &phân giải..." -msgid "F&orce 4:3 display ratio" -msgstr "Giữ n&guyên khung hình 4:3" +msgid "Force &4:3 display ratio" +msgstr "Giữ nguyên khung hình &4:3" msgid "&Window scale factor" msgstr "Đổi &tỷ lệ cửa sổ" @@ -99,7 +102,7 @@ msgstr "&7x" msgid "&8x" msgstr "&8x" -msgid "Filter method" +msgid "Fi<er method" msgstr "&Bộ lọc hình ảnh" msgid "&Nearest" @@ -132,8 +135,8 @@ msgstr "Căn tỷ lệ số nguyên" msgid "4:&3 Integer scale" msgstr "Căn tỷ lệ 4:3 số nguyên" -msgid "E&GA/(S)VGA settings" -msgstr "Cài đặt EGA/(S)VGA" +msgid "EGA/(S)&VGA settings" +msgstr "Cài đặt EGA/(S)&VGA" msgid "&Inverted VGA monitor" msgstr "Đảo mà&u VGA" @@ -144,9 +147,15 @@ msgstr "L&oại màn VGA" msgid "RGB &Color" msgstr "Màu R&GB" +msgid "RGB (no brown)" +msgstr "RGB (không nâu)" + msgid "&RGB Grayscale" msgstr "Thang xám RG&B" +msgid "Generic RGBI color monitor" +msgstr "Màn hình màu RGBI chung" + msgid "&Amber monitor" msgstr "Màn hình vàng hổ phách (amber)" @@ -183,6 +192,9 @@ msgstr "&Công cụ" msgid "&Settings..." msgstr "&Cài đặt..." +msgid "Settings..." +msgstr "Cài đặt" + msgid "&Update status bar icons" msgstr "Cậ&p nhật biểu tượng thanh trạng thái" @@ -190,7 +202,7 @@ msgid "Take s&creenshot" msgstr "Chụp &màn hình" msgid "S&ound" -msgstr "&Thanh âm" +msgstr "&Âm thanh" msgid "&Preferences..." msgstr "&Tùy biến..." @@ -348,6 +360,9 @@ msgstr "Mẫu máy:" msgid "Configure" msgstr "Tinh chỉnh" +msgid "CPU:" +msgstr "CPU:" + msgid "CPU type:" msgstr "Loại CPU:" @@ -384,6 +399,15 @@ msgstr "Bật (UTC)" msgid "Dynamic Recompiler" msgstr "Bộ tái biên dịch động (Dynamic Recompiler)" +msgid "CPU frame size" +msgstr "Cỡ khung CPU" + +msgid "Larger frames (less smooth)" +msgstr "Khung lớn (kém mượt hơn)" + +msgid "Smaller frames (smoother)" +msgstr "Khung nhỏ (mượt hơn)" + msgid "Video:" msgstr "Video:" @@ -399,12 +423,27 @@ msgstr "Đồ họa IBM 8514/A" msgid "XGA Graphics" msgstr "Đồ họa XGA" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "Đồ họa adaptor xuất hình IBM PS/55" + +msgid "Keyboard:" +msgstr "Bàn phím:" + +msgid "Keyboard" +msgstr "Bàn phím" + msgid "Mouse:" msgstr "Chuột:" +msgid "Mouse" +msgstr "Chuột" + msgid "Joystick:" msgstr "Cần điều khiển:" +msgid "Joystick" +msgstr "Cần điều khiển" + msgid "Joystick 1..." msgstr "Cần điều khiển 1..." @@ -435,6 +474,9 @@ msgstr "Thiết bị MIDI out:" msgid "MIDI In Device:" msgstr "Thiết bị MIDI in:" +msgid "MIDI Out:" +msgstr "MIDI out:" + msgid "Standalone MPU-401" msgstr "MPU-401 độc lập" @@ -474,6 +516,9 @@ msgstr "Thiết bị LPT3:" msgid "LPT4 Device:" msgstr "Thiết bị LPT4:" +msgid "Internal LPT ECP DMA:" +msgstr "LPT ECP DMA nội bộ:" + msgid "Serial port 1" msgstr "Cổng serial 1" @@ -498,18 +543,21 @@ msgstr "Cổng parallel 3" msgid "Parallel port 4" msgstr "Cổng parallel 4" -msgid "HD Controller:" -msgstr "Bộ điều khiển ổ cứng:" - msgid "FD Controller:" msgstr "Bộ điều khiển ổ mềm:" +msgid "CD-ROM Controller:" +msgstr "Bộ điều khiển CD-ROM:" + msgid "Tertiary IDE Controller" msgstr "Bộ điều khiển IDE thứ ba" msgid "Quaternary IDE Controller" msgstr "Bộ điều khiển IDE thứ tư" +msgid "Hard disk" +msgstr "Ổ cứng" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "Cassette" msgid "Hard disks:" msgstr "Đĩa cứng:" +msgid "Firmware Version" +msgstr "Phiên bản firmware" + msgid "&New..." msgstr "Tạ&o mới..." @@ -588,8 +639,14 @@ msgstr "Ổ đĩa CD-ROM:" msgid "MO drives:" msgstr "Ổ đĩa MO:" -msgid "ZIP drives:" -msgstr "Ổ đĩa ZIP:" +msgid "MO:" +msgstr "MO:" + +msgid "Removable disks:" +msgstr "Đĩa tháo rời được:" + +msgid "Removable disk drives:" +msgstr "Ổ đĩa tháo rời được:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "ISA RTC:" msgid "ISA Memory Expansion" msgstr "Mở rộng bộ nhớ qua ISA" +msgid "ISA ROM Cards" +msgstr "Thẻ ROM ISA" + msgid "Card 1:" msgstr "Thẻ 1:" @@ -612,6 +672,15 @@ msgstr "Thẻ 3:" msgid "Card 4:" msgstr "Thẻ 4:" +msgid "Generic ISA ROM Board" +msgstr "Bảng mạch ROM ISA chung" + +msgid "Generic Dual ISA ROM Board" +msgstr "Bảng mạch đôi ROM ISA chung" + +msgid "Generic Quad ISA ROM Board" +msgstr "Bảng mạch bốn ROM ISA chung" + msgid "ISABugger device" msgstr "Thiết bị ISABugger" @@ -633,11 +702,17 @@ msgstr " - TẠM DỪNG" msgid "Speed" msgstr "Vận tốc" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "Đĩa tháo rời được %1 (%2): %3" -msgid "ZIP images" -msgstr "Ảnh đĩa ZIP" +msgid "&Removable disk %1 (%2): %3" +msgstr "Đĩa tháo rời được %1 (%2): %3" + +msgid "Removable disk images" +msgstr "Ảnh đĩa tháo rời được" + +msgid "Image %1" +msgstr "Ảnh %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "86Box không tìm được bản ROM nào.\n\nVui lòng tải về bộ ROM và trích xuất về thư mục \"roms\"." @@ -688,7 +763,7 @@ msgid "Input devices" msgstr "Thiết bị nhập" msgid "Sound" -msgstr "Thanh âm" +msgstr "Âm thanh" msgid "Network" msgstr "Nối mạng" @@ -696,12 +771,30 @@ msgstr "Nối mạng" msgid "Ports (COM & LPT)" msgstr "Cổng (COM và LPT)" +msgid "Ports" +msgstr "Cổng" + +msgid "Serial ports:" +msgstr "Cổng serial:" + +msgid "Parallel ports:" +msgstr "Cổng parallel:" + msgid "Storage controllers" msgstr "Vi điều khiển bộ nhớ ổ cứng" msgid "Hard disks" msgstr "Ổ cứng" +msgid "Disks:" +msgstr "Đĩa:" + +msgid "Floppy:" +msgstr "Đĩa mềm:" + +msgid "Controllers:" +msgstr "Bộ điều khiển:" + msgid "Floppy & CD-ROM drives" msgstr "Ổ (đĩa) mềm và CD-ROM" @@ -711,6 +804,9 @@ msgstr "Thiết bị tháo rời được khác" msgid "Other peripherals" msgstr "Thiết bị ngoại vi khác" +msgid "Other devices" +msgstr "Các thiết bị khác" + msgid "Click to capture mouse" msgstr "Nhấp vào khung hình để 'nhốt' chuột vào" @@ -777,12 +873,39 @@ msgstr "Cần điều khiển bốn trục, bốn nút" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + bàn giậm CH" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Thrustmaster Flight Control System" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Hệ thống bánh lái" + +msgid "2-button gamepad(s)" +msgstr "Tay cầm game hai nút" + +msgid "2-button flight yoke" +msgstr "Vô lăng máy bay hai nút" + +msgid "4-button gamepad" +msgstr "Tay cầm game bốn nút" + +msgid "4-button flight yoke" +msgstr "Vô lăng máy bay bốn nút" + +msgid "2-button flight yoke with throttle" +msgstr "Vô lăng máy bay hai nút có cần ga" + +msgid "4-button flight yoke with throttle" +msgstr "Vô lăng máy bay bốn nút có cần ga" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Vô lăng Win95 (ba trục, bốn nút)" + msgid "None" msgstr "Không có" @@ -792,6 +915,9 @@ msgstr "%1 MB (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "Đĩa mềm %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "Đĩa &mềm %1 (%2): %3" + msgid "Advanced sector images" msgstr "Ảnh (đĩa) sector nâng cao" @@ -813,6 +939,9 @@ msgstr "Không thể khởi tạo GhostPCL" msgid "MO %1 (%2): %3" msgstr "MO %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "&MO %1 (%2): %3" + msgid "MO images" msgstr "Ảnh đĩa MO" @@ -822,6 +951,15 @@ msgstr "Chào mừng đến 86Box!" msgid "Internal device" msgstr "Thiết bị nội bộ" +msgid "&File" +msgstr "&Tập tin" + +msgid "&New machine..." +msgstr "Máy &mới" + +msgid "&Check for updates..." +msgstr "Kiểm tra &cập nhật..." + msgid "Exit" msgstr "Thoát" @@ -897,12 +1035,18 @@ msgstr "Tiếp tục" msgid "Cassette: %1" msgstr "Cassette: %1" +msgid "C&assette: %1" +msgstr "C&assette: %1" + msgid "Cassette images" msgstr "Ảnh đĩa Cassette" msgid "Cartridge %1: %2" msgstr "Băng cartridge %1: %2" +msgid "Car&tridge %1: %2" +msgstr "Băng car&tridge %1: %2" + msgid "Cartridge images" msgstr "Ảnh đĩa băng cartridge" @@ -912,6 +1056,9 @@ msgstr "Tiếp tục chạy thực thi" msgid "Pause execution" msgstr "Tạm dừng thực thi" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "Nhấn Ctrl+Alt+Del" @@ -921,9 +1068,279 @@ msgstr "Nhấn Ctrl+Alt+Esc" msgid "Hard reset" msgstr "Buộc khởi động lại" +msgid "Force shutdown" +msgstr "Buộc tắt nguồn máy" + +msgid "Start" +msgstr "Khởi động" + +msgid "Not running" +msgstr "Đang không chạy" + +msgid "Running" +msgstr "Đang chạy" + +msgid "Paused" +msgstr "Đã tạm dừng" + +msgid "Waiting" +msgstr "Đang chờ" + +msgid "Powered Off" +msgstr "Đã tắt máy" + +msgid "%n running" +msgstr "%n đang chạy" + +msgid "%n paused" +msgstr "%n đã tạm dừng" + +msgid "%n waiting" +msgstr "%n đang chờ" + +msgid "%1 total" +msgstr "%1 tổng" + +msgid "VMs: %1" +msgstr "Máy ảo: %1" + +msgid "System Directory:" +msgstr "Thư mục hệ thống:" + +msgid "Choose directory" +msgstr "Chọn thư mục" + +msgid "Choose configuration file" +msgstr "Chọn tập tin cấu hình" + +msgid "86Box configuration files (86box.cfg)" +msgstr "Tập tin cấu hình 86Box (86box.cfg)" + +msgid "Configuration read failed" +msgstr "Không thể đọc cấu hình" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "Không thể mở cấu hình đã chọn để đọc: %1" + +msgid "Use regular expressions in search box" +msgstr "Dùng regex trong hộp tìm kiếm" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 máy hiện vẫn đang chạy. Bạn có muốn thoát trình quản lý máy ảo không?" + +msgid "Add new system wizard" +msgstr "Thêm trình thuật sĩ hệ thống mới" + +msgid "Introduction" +msgstr "Giới thiệu" + +msgid "This will help you add a new system to 86Box." +msgstr "Hướng dẫn này sẽ giúp bạn thêm hệ thống mới vào 86Box." + +msgid "New configuration" +msgstr "Cấu hình mới" + +msgid "Complete" +msgstr "Hoàn thành" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "Thuật sĩ bây giờ sẽ chạy cấu hình cho hệ thống mới." + +msgid "Use existing configuration" +msgstr "Dùng cấu hình có sẵn" + +msgid "Type some notes here" +msgstr "Nhập ghi chú vào đây" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "Dán nội dung của tập tin cấu hình có sẵn vào hộp bên dưới." + +msgid "Load configuration from file" +msgstr "Nạp cấu hình từ tập tin" + +msgid "System name" +msgstr "Tên hệ thống" + +msgid "System name:" +msgstr "Tên hệ thống:" + +msgid "System name cannot contain certain characters" +msgstr "Tên hệ thống không thể bao gồm các kí tự cụ thể" + +msgid "System name already exists" +msgstr "Tên hệ thống đã tốn tại" + +msgid "Please enter a directory for the system" +msgstr "Vui lòng nhập thư mục cho hệ thống" + +msgid "Directory does not exist" +msgstr "Thư mục không tồn tại" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "Một thư mục mới cho hệ thống sẽ được tạo trong thư mục đã chọn ở trên" + +msgid "System location:" +msgstr "Vị trí hệ thống:" + +msgid "System name and location" +msgstr "Tên và vị trí hệ thống" + +msgid "Enter the name of the system and choose the location" +msgstr "Điền tên của hệ thống và chọn vị trí" + +msgid "Enter the name of the system" +msgstr "Điền tên hệ thống" + +msgid "Please enter a system name" +msgstr "Hãy điền một cái tên" + +msgid "Display name (optional):" +msgstr "Tên hiển thị (tùy chọn):" + +msgid "Display name:" +msgstr "Tên hiển thị:" + +msgid "Set display name" +msgstr "Đặt tên hiển thị" + +msgid "Enter the new display name (blank to reset)" +msgstr "Điền tên hiển thị mới (để trống để đặt lại)" + +msgid "Change &display name..." +msgstr "Thay đổi tên hiển thị" + +msgid "Context Menu" +msgstr "Menu ngữ cảnh" + +msgid "&Open folder..." +msgstr "Mở thư mục" + +msgid "Open p&rinter tray..." +msgstr "Mở khay máy in" + +msgid "Set &icon..." +msgstr "Đặt biểu trưng" + +msgid "Select an icon" +msgstr "Chọn một biểu trưng" + +msgid "C&lone..." +msgstr "Tạo bản sao" + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "Máy ảo \"%1\" (%2) sẽ được sao chép vào:" + +msgid "Directory %1 already exists" +msgstr "Thư mục %1 đã tồn tại" + +msgid "You cannot use the following characters in the name: %1" +msgstr "Bạn không thể sử dụng kí tự này khi đặt tên: %1" + +msgid "Clone" +msgstr "Tạo bản sao" + +msgid "Failed to create directory for cloned VM" +msgstr "Không thể tạo thư mục cho máy ảo đã sao chép" + +msgid "Failed to clone VM." +msgstr "Không thể tạo bản sao của máy ảo." + +msgid "Directory in use" +msgstr "Thư mục đang bị sử dụng" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "Thư mục bạn chọn đang bị sử dụng. Hãy chọn thư mục khác dùng được." + +msgid "Create directory failed" +msgstr "Tạo thư mục không thành công" + +msgid "Unable to create the directory for the new system" +msgstr "Không thể tạo thư mục cho hệ thống mới" + +msgid "Configuration write failed" +msgstr "Không thể ghi cấu hình" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "Không mở được tập tin cấu hình ở %1 để ghi vào" + +msgid "Error adding system" +msgstr "Lỗi khi đang thêm hệ thống" + +msgid "Remove directory failed" +msgstr "Không thể loại bỏ thư mục" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "Một số tập tin trong thư mục máy ảo không thể xóa. Bạn hãy tự xóa ở vị trí đó." + +msgid "Build" +msgstr "Bản dựng" + +msgid "Version" +msgstr "Phiên bản" + +msgid "An update to 86Box is available: %1 %2" +msgstr "Có cập nhật mới cho 86Box: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "Có lỗi xảy ra khi kiểm tra cập nhật: %1" + +msgid "An update to 86Box is available!" +msgstr "Có cập nhật mới cho 86Box!" + +msgid "Warning" +msgstr "Cảnh báo" + +msgid "&Kill" +msgstr "Buộc dừng" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "Buộc một máy ảo dừng có thể gây ra mất mát dữ liệu. Chỉ nên làm khi tiến trình 86Box bị treo.\n\nBạn có muốn buộc dừng máy ảo \"%1\" không?" + +msgid "&Delete" +msgstr "Xóa" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "Bạn có thật sự muốn xóa máy ảo \"%1\" và tất cả các tập tin của nó không? Thao tác này không thể được phục hồi!" + +msgid "Show &config file" +msgstr "Hiện tập tin cấu hình" + +msgid "No screenshot" +msgstr "Không có ảnh chụp màn hình" + +msgid "Search" +msgstr "Tìm" + +msgid "Searching for VMs..." +msgstr "Đang tìm máy ảo..." + +msgid "Found %1" +msgstr "Đã thấy %1" + +msgid "System" +msgstr "Hệ thống" + +msgid "Storage" +msgstr "Lưu trữ" + +msgid "Disk %1: " +msgstr "Đĩa %1: " + +msgid "No disks" +msgstr "Không có đĩa" + +msgid "Audio" +msgstr "Âm thanh" + +msgid "Audio:" +msgstr "Âm thanh:" + msgid "ACPI shutdown" msgstr "Tắt máy theo ACPI" +msgid "ACP&I shutdown" +msgstr "Tắt máy theo ACP&I" + msgid "Hard disk (%1)" msgstr "Ổ cứng (%1)" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "CD-ROM %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "&CD-ROM %1 (%2): %3" + msgid "160 KB" msgstr "160 KB" @@ -1209,40 +1629,37 @@ msgstr "Thiết bị MCA" msgid "List of MCA devices:" msgstr "Danh sách các thiết bị MCA:" -msgid "Tablet tool" +msgid "&Tablet tool" msgstr "Công cụ bảng nhập liệu" -msgid "Qt (OpenGL &ES)" -msgstr "QT (OpenGL &ES)" +msgid "About &Qt" +msgstr "Về &qt" -msgid "About Qt" -msgstr "Về qt" - -msgid "MCA devices..." +msgid "&MCA devices..." msgstr "Thiết bị MCA..." -msgid "Show non-primary monitors" +msgid "Show non-&primary monitors" msgstr "Hiển thị các màn hình phụ" -msgid "Open screenshots folder..." +msgid "Open screenshots &folder..." msgstr "Mở thư mục ảnh chụp màn hình..." -msgid "Apply fullscreen stretch mode when maximized" +msgid "Appl&y fullscreen stretch mode when maximized" msgstr "Co giãn toàn màn hình khi cực đại hóa cửa sổ" -msgid "Cursor/Puck" -msgstr "Con trỏ/puck" +msgid "&Cursor/Puck" +msgstr "&Con trỏ/puck" -msgid "Pen" -msgstr "Bút" +msgid "&Pen" +msgstr "&Bút" -msgid "Host CD/DVD Drive (%1:)" -msgstr "Máy chủ CD/DVD ổ đĩa (%1 :)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "&Máy chủ CD/DVD ổ đĩa (%1 :)" msgid "&Connected" msgstr "&Đã kết nối" -msgid "Clear image history" +msgid "Clear image &history" msgstr "Xóa lịch sử ảnh đĩa" msgid "Create..." @@ -1257,9 +1674,15 @@ msgstr "Bus không xác định" msgid "Null Driver" msgstr "Trình điều khiển NULL" +msgid "NIC:" +msgstr "NIC:" + msgid "NIC %1 (%2) %3" msgstr "NIC %1 (%2) %3" +msgid "&NIC %1 (%2) %3" +msgstr "&NIC %1 (%2) %3" + msgid "Render behavior" msgstr "Hành vi kết xuất" @@ -1323,6 +1746,9 @@ msgstr "Không có thiết bị MCA." msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" msgstr "Thẻ mạng 1" @@ -1365,9 +1791,27 @@ msgstr "Thông qua cổng serial 3" msgid "Serial port passthrough 4" msgstr "Thông qua cổng serial 4" -msgid "Renderer options..." +msgid "Renderer &options..." msgstr "Tùy chọn kết xuất ..." +msgid "PC/XT Keyboard" +msgstr "Bàn phím PC/XT" + +msgid "AT Keyboard" +msgstr "Bàn phím AT" + +msgid "AX Keyboard" +msgstr "Bàn phím AX" + +msgid "PS/2 Keyboard" +msgstr "Bàn phím PS/2" + +msgid "PS/55 Keyboard" +msgstr "Bàn phím PS/55" + +msgid "Keys" +msgstr "Phím" + msgid "Logitech/Microsoft Bus Mouse" msgstr "Chuột bus Logitech/Microsoft" @@ -1377,18 +1821,30 @@ msgstr "Chuột bus Microsoft (INPORT)" msgid "Mouse Systems Serial Mouse" msgstr "Chuột serial Mouse Systems" +msgid "Mouse Systems Bus Mouse" +msgstr "Chuột bus Mouse Systems" + msgid "Microsoft Serial Mouse" msgstr "Chuột serial Microsoft" +msgid "Microsoft Serial BallPoint" +msgstr "Chuột bi serial Microsoft" + msgid "Logitech Serial Mouse" msgstr "Chuột serial Logitech" msgid "PS/2 Mouse" msgstr "Chuột PS/2" +msgid "PS/2 QuickPort Mouse" +msgstr "Chuột QuickPort PS/2" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (Serial)" +msgid "Default Baud rate" +msgstr "Tốc độ baud mặc định" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] Modem tuân thủ tiêu chuẩn Hayes" @@ -1413,21 +1869,81 @@ msgstr "MIDI của hệ thống" msgid "MIDI Input Device" msgstr "Thiết bị nhập MIDI" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "Tập tin BIOS" + +msgid "BIOS file (ROM #1)" +msgstr "Tập tin BIOS (ROM #1)" + +msgid "BIOS file (ROM #2)" +msgstr "Tập tin BIOS (ROM #2)" + +msgid "BIOS file (ROM #3)" +msgstr "Tập tin BIOS (ROM #3)" + +msgid "BIOS file (ROM #4)" +msgstr "Tập tin BIOS (ROM #4)" + +msgid "BIOS address" msgstr "Địa chỉ BIOS" +msgid "BIOS address (ROM #1)" +msgstr "Địa chỉ BIOS (ROM #1)" + +msgid "BIOS address (ROM #2)" +msgstr "Địa chỉ BIOS (ROM #2)" + +msgid "BIOS address (ROM #3)" +msgstr "Địa chỉ BIOS (ROM #3)" + +msgid "BIOS address (ROM #4)" +msgstr "Địa chỉ BIOS (ROM #4)" + msgid "Enable BIOS extension ROM Writes" msgstr "Kích hoạt ghi ROM mở rộng BIOS" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "Kích hoạt ghi ROM mở rộng BIOS (ROM #1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "Kích hoạt ghi ROM mở rộng BIOS (ROM #2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "Kích hoạt ghi ROM mở rộng BIOS (ROM #3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "Kích hoạt ghi ROM mở rộng BIOS (ROM #4)" + +msgid "Linear framebuffer base" +msgstr "Địa chỉ cơ sở framebuffer tuyến tính" + msgid "Address" msgstr "Địa chỉ" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "IRQ cổng serial" + +msgid "Parallel port IRQ" +msgstr "IRQ cổng parallel" + msgid "BIOS Revision" msgstr "Sửa đổi BIOS" +msgid "BIOS Version" +msgstr "Phiên bản BIOS" + +msgid "BIOS Language" +msgstr "Ngôn ngữ BIOS" + +msgid "IBM 5161 Expansion Unit" +msgstr "Bộ mở rộng IBM 5161" + +msgid "IBM Cassette Basic" +msgstr "IBM Cassette Basic" + msgid "Translate 26 -> 17" msgstr "Dịch 26 -> 17" @@ -1443,6 +1959,18 @@ msgstr "Đảo ngược màu sắc" msgid "BIOS size" msgstr "Kích thước BIOS" +msgid "BIOS size (ROM #1)" +msgstr "Kích thước BIOS (ROM #1)" + +msgid "BIOS size (ROM #2)" +msgstr "Kích thước BIOS (ROM #2)" + +msgid "BIOS size (ROM #3)" +msgstr "Kích thước BIOS (ROM #3)" + +msgid "BIOS size (ROM #4)" +msgstr "Kích thước BIOS (ROM #4)" + msgid "Map C0000-C7FFF as UMB" msgstr "Map C0000-C7FFF dưới dạng UMB" @@ -1518,6 +2046,9 @@ msgstr "Mức độ hồi âm" msgid "Interpolation Method" msgstr "Phương pháp nội suy" +msgid "Dynamic Sample Loading" +msgstr "Nạp mẫu động" + msgid "Reverb Output Gain" msgstr "Tăng đầu ra hồi âm" @@ -1525,7 +2056,7 @@ msgid "Reversed stereo" msgstr "Đảo ngược âm thanh nổi" msgid "Nice ramp" -msgstr "Đoạn đường dốc đẹp" +msgstr "Giảm độ dốc âm lượng" msgid "Hz" msgstr "Hz" @@ -1605,6 +2136,12 @@ msgstr "DMA thấp" msgid "Enable Game port" msgstr "Bật cổng trò chơi" +msgid "SID Model" +msgstr "Mẫu SID" + +msgid "SID Filter Strength" +msgstr "Cường độ bộ lọc SID" + msgid "Surround module" msgstr "Mô đun vòm" @@ -1617,6 +2154,12 @@ msgstr "Tăng ngắt CODEC trên thiết lập CODEC (cần bởi một số tr msgid "SB Address" msgstr "Địa chỉ SB" +msgid "Adlib Address" +msgstr "Địa chỉ AdLib" + +msgid "Use EEPROM setting" +msgstr "Dùng cài đặt EEPROM" + msgid "WSS IRQ" msgstr "WSS IRQ" @@ -1701,9 +2244,15 @@ msgstr "Loại RAMDAC" msgid "Blend" msgstr "Trộn" +msgid "Font" +msgstr "Phông" + msgid "Bilinear filtering" msgstr "Lọc song tuyến" +msgid "Video chroma-keying" +msgstr "Tách nền màu (chroma-keying) video" + msgid "Dithering" msgstr "Ngân tán" @@ -1746,6 +2295,33 @@ msgstr "Tốc độ truyền tải" msgid "EMS mode" msgstr "Chế độ EMS" +msgid "EMS Address" +msgstr "Địa chỉ EMS" + +msgid "EMS 1 Address" +msgstr "Địa chỉ EMS 1" + +msgid "EMS 2 Address" +msgstr "Địa chỉ EMS 2" + +msgid "EMS Memory Size" +msgstr "Cỡ bộ nhớ EMS" + +msgid "EMS 1 Memory Size" +msgstr "Cỡ bộ nhớ EMS 1" + +msgid "EMS 2 Memory Size" +msgstr "Cỡ bộ nhớ EMS 2" + +msgid "Enable EMS" +msgstr "Kích hoạt EMS" + +msgid "Enable EMS 1" +msgstr "Kích hoạt EMS 1" + +msgid "Enable EMS 2" +msgstr "Kích hoạt EMS 2" + msgid "Address for > 2 MB" msgstr "Địa chỉ cho > 2 MB" @@ -1764,11 +2340,11 @@ msgstr "Luôn ở tốc độ đã chọn" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "Cài đặt BIOS + phím nóng (TẮT trong POST)" -msgid "64 kB starting from F0000" -msgstr "64 kb bắt đầu từ f0000" +msgid "64 KB starting from F0000" +msgstr "64 KB bắt đầu từ f0000" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kb bắt đầu từ E0000 (địa chỉ MSB đảo ngược, 64kb cuối cùng)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KB bắt đầu từ E0000 (địa chỉ MSB đảo ngược, 64 KB cuối cùng)" msgid "Sine" msgstr "Sin" @@ -1804,7 +2380,7 @@ msgid "Five + Wheel" msgstr "Năm + con lăn" msgid "Five + 2 Wheels" -msgstr "" +msgstr "Năm + hai con lăn" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 Serial / SMT3(R)V" @@ -1869,6 +2445,9 @@ msgstr "256 KB" msgid "Composite" msgstr "Tổng hợp" +msgid "True color" +msgstr "Màu chân thật" + msgid "Old" msgstr "Cũ" @@ -1902,6 +2481,15 @@ msgstr "Nội suy SRGB" msgid "Linear interpolation" msgstr "Nội suy tuyến tính" +msgid "Has secondary 8x8 character set" +msgstr "Có bộ kí tự 8x8 thứ hai" + +msgid "Has Quadcolor II daughter board" +msgstr "Có bảng mạch con Quadcolor II" + +msgid "Alternate monochrome contrast" +msgstr "Tương phản đơn sắc thay thế" + msgid "128 KB" msgstr "128 KB" @@ -1935,6 +2523,9 @@ msgstr "Màu hổ phách" msgid "Gray" msgstr "Màu xám" +msgid "Grayscale" +msgstr "Thang màu xám" + msgid "Color" msgstr "Màu sắc" @@ -1950,6 +2541,12 @@ msgstr "Các ngôn ngữ khác" msgid "Bochs latest" msgstr "Bochs mới nhất" +msgid "Apply overscan deltas" +msgstr "Áp dụng delta quét đè" + +msgid "Mono Interlaced" +msgstr "Đơn sắc xen kẽ" + msgid "Mono Non-Interlaced" msgstr "Đơn sắc không xen kẽ" @@ -1962,6 +2559,9 @@ msgstr "Màu sắc không xen kẽ" msgid "3Dfx Voodoo Graphics" msgstr "Đồ họa 3Dfx Voodoo" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 TMU)" @@ -2031,6 +2631,9 @@ msgstr "Tốc độ baud của đường thông" msgid "Named Pipe (Server)" msgstr "Đường ống có tên (máy chủ)" +msgid "Named Pipe (Client)" +msgstr "Đường ống có tên (máy khách)" + msgid "Host Serial Passthrough" msgstr "Thông qua cổng serial của máy chủ" @@ -2050,37 +2653,43 @@ msgid "[Generic] RAM Disk (max. speed)" msgstr "[Generic] Đĩa RAM (tốc độ tối đa)" msgid "[Generic] 1989 (3500 RPM)" -msgstr "" +msgstr "[Generic] 1989 (3500 RPM)" msgid "[Generic] 1992 (3600 RPM)" -msgstr "" +msgstr "[Generic] 1992 (3600 RPM)" msgid "[Generic] 1994 (4500 RPM)" -msgstr "" +msgstr "[Generic] 1994 (4500 RPM)" msgid "[Generic] 1996 (5400 RPM)" -msgstr "" +msgstr "[Generic] 1996 (5400 RPM)" msgid "[Generic] 1997 (5400 RPM)" -msgstr "" +msgstr "[Generic] 1997 (5400 RPM)" msgid "[Generic] 1998 (5400 RPM)" -msgstr "" +msgstr "[Generic] 1998 (5400 RPM)" msgid "[Generic] 2000 (7200 RPM)" -msgstr "" +msgstr "[Generic] 2000 (7200 RPM)" msgid "IBM 8514/A clone (ISA)" -msgstr "IBM 8514/A bản nhái (ISA)" +msgstr "IBM 8514/A bản sao (ISA)" msgid "Vendor" msgstr "Nhà sản xuất" +msgid "30 Hz (JMP2 = 1)" +msgstr "" + +msgid "60 Hz (JMP2 = 2)" +msgstr "" + msgid "Generic PC/XT Memory Expansion" -msgstr "Chung mở rộng bộ nhớ qua PC/XT" +msgstr "Mở rộng bộ nhớ chung qua PC/XT" msgid "Generic PC/AT Memory Expansion" -msgstr "Chung mở rộng bộ nhớ qua PC/AT" +msgstr "Mở rộng bộ nhớ chung qua PC/AT" msgid "Unable to find Dot-Matrix fonts" msgstr "Không tìm thấy phông chữ ma trận chấm" @@ -2089,61 +2698,259 @@ msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for t msgstr "Cần có phông chữ TrueType trong thư mục \"roms/printer/fonts\" để mô phỏng máy in generic ESC/P ma trận chấm." msgid "Inhibit multimedia keys" -msgstr "" +msgstr "Không dùng dãy phím multimedia" msgid "Ask for confirmation before saving settings" -msgstr "" +msgstr "Hỏi xác nhận trước khi lưu cài đặt" msgid "Ask for confirmation before hard resetting" -msgstr "" +msgstr "Hỏi xác nhận trước khi buộc khởi động lại" msgid "Ask for confirmation before quitting" -msgstr "" +msgstr "Hỏi xác nhận trước khi thoát" msgid "Options" -msgstr "" +msgstr "Tùy chọn" msgid "Model" -msgstr "" +msgstr "Mẫu máy" msgid "Model:" -msgstr "" +msgstr "Mẫu máy:" msgid "Failed to initialize Vulkan renderer." -msgstr "" +msgstr "Không thể khởi tạo renderer Vulkan." msgid "GLSL Error" -msgstr "" +msgstr "Lỗi GLSL" msgid "Could not load shader: %1" -msgstr "" +msgstr "Không thể nạp shader: %1" msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" -msgstr "" +msgstr "Yêu cầu OpenGL bản 3.0 trở lên. Hiện tại bản GLSL là %1.%2" msgid "Could not load texture: %1" -msgstr "" +msgstr "Không thể nạp texture: %1" msgid "Could not compile shader:\n\n%1" -msgstr "" +msgstr "Không thể biên dịch shader: \n\n%1" msgid "Program not linked:\n\n%1" -msgstr "" +msgstr "Chương trình không được liên kết:\n\n%1" msgid "Shader Manager" -msgstr "" +msgstr "Trình quản lý shader" msgid "Shader Configuration" -msgstr "" +msgstr "Cấu hình shader" msgid "Add" -msgstr "" +msgstr "Thêm" msgid "Move up" -msgstr "" +msgstr "Chuyển lên" msgid "Move down" -msgstr "" +msgstr "Chuyển xuống" msgid "Could not load file %1" -msgstr "" +msgstr "Không thể nạp tập tin %1" + +msgid "Key Bindings:" +msgstr "Phím nóng:" + +msgid "Action" +msgstr "Thực hiện" + +msgid "Keybind" +msgstr "Phím nóng" + +msgid "Clear binding" +msgstr "Xóa phím nóng" + +msgid "Bind" +msgstr "Gắn" + +msgid "Bind Key" +msgstr "Gắn phím" + +msgid "Enter key combo:" +msgstr "Nhập tổ hợp phím" + +msgid "Bind conflict" +msgstr "Gắn phím trùng lặp" + +msgid "This key combo is already in use." +msgstr "Tổ hợp này đã được sử dụng." + +msgid "Send Control+Alt+Del" +msgstr "Gửi Control+Alt+Del" + +msgid "Send Control+Alt+Escape" +msgstr "Gửi Control+Alt+Escape" + +msgid "Toggle fullscreen" +msgstr "Bật/tắt toàn màn hình" + +msgid "Screenshot" +msgstr "Chụp màn hình" + +msgid "Release mouse pointer" +msgstr "Thả con trỏ chuột" + +msgid "Toggle pause" +msgstr "Tạm dừng/tiếp tục" + +msgid "Toggle mute" +msgstr "Bật/tắt tiếng" + +msgid "Text files" +msgstr "Tập tin văn bản" + +msgid "ROM files" +msgstr "Tập tin ROM" + +msgid "SoundFont files" +msgstr "Tập tin SoundFont" + +msgid "Local Switch" +msgstr "Công tắc cục bộ" + +msgid "Remote Switch" +msgstr "Công tắc từ xa" + +msgid "Switch:" +msgstr "Công tắc:" + +msgid "Hub Mode" +msgstr "Chế độ hub" + +msgid "Hostname:" +msgstr "Tên host:" + +msgid "ISA RAM:" +msgstr "ISA RAM:" + +msgid "ISA ROM:" +msgstr "ISA ROM:" + +msgid "&Wipe NVRAM" +msgstr "Xóa sạch NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "Hành động này sẽ xóa toàn bộ tập tin NVRAM (và các tập tin liên quan) của máy ảo nằm trong thư mục con \"nvr\". Bạn sẽ phải cấu hình lại cài đặt BIOS (và có thể các thiết bị khác nữa bên trong máy ảo) nếu có áp dụng.\n\nBạn có chắc muốn xóa toàn bộ nội dung NVRAM của máy ảo \"%1\" không?" + +msgid "Success" +msgstr "Thành công" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "Đã thành công xóa sạch nội dung NVRAM của máy ảo \"%1\"" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "Có lỗi xảy ra khi thử xóa nội dung NVRAM của máy ảo \"%1\"" + +msgid "%1 VM Manager" +msgstr "Trình quản lý máy ảo %1" + +msgid "%n disk(s)" +msgstr "%n đĩa" + +msgid "Unknown Status" +msgstr "Trạng thái không biết" + +msgid "No Machines Found!" +msgstr "Không tìm thấy máy nào!" + +msgid "Check for updates on startup" +msgstr "Kiểm tra cập nhật khi khởi động" + +msgid "Unable to determine release information" +msgstr "Không thể quyết định thông tin phát hành" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "Có lỗi xảy ra khi đang kiểm tra cập nhật:\n\n%1\n\nHãy thử lại sau." + +msgid "Update check complete" +msgstr "Kiểm tra cập nhật hoàn tất" + +msgid "stable" +msgstr "ổn định" + +msgid "beta" +msgstr "thử nghiệm" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "Bạn đang chạy phiên bản %1 mới nhất của 86Box: %2" + +msgid "version" +msgstr "phiên bản" + +msgid "build" +msgstr "bản dựng" + +msgid "You are currently running version %1." +msgstr "Bạn đang chạy phiên bản %1" + +msgid "Version %1 is now available." +msgstr "Phiên bản %1 hiện đã ra mắt." + +msgid "You are currently running build %1." +msgstr "Bạn đang chạy bản dựng %1" + +msgid "Build %1 is now available." +msgstr "Bản dựng %1 hiện đã ra mắt." + +msgid "Would you like to visit the download page?" +msgstr "Bạn có muốn truy cập trang tải xuống không?" + +msgid "Visit download page" +msgstr "Truy cập trang tải xuống" + +msgid "Update check" +msgstr "Kiểm tra cập nhật" + +msgid "Checking for updates..." +msgstr "Đang kiểm tra cập nhật..." + +msgid "86Box Update" +msgstr "Cập nhật 86Box" + +msgid "Release notes:" +msgstr "Ghi chú bản phát hành:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "Máy ảo bị sập" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "Tiến trình của máy ảo \"%1\" đã bị dừng bất thường với mã thoát %2." + +msgid "The system will not be added." +msgstr "Hệ thống sẽ không được thêm." + +msgid "&Update mouse every CPU frame" +msgstr "&Cập nhật chuột mỗi cỡ khung CPU" + +msgid "Hue" +msgstr "Màu sắc" + +msgid "Saturation" +msgstr "Độ bão hòa" + +msgid "Contrast" +msgstr "Sự tương phản" + +msgid "Brightness" +msgstr "Độ sáng" + +msgid "Sharpness" +msgstr "Độ sắc nét" + +msgid "&CGA composite settings..." +msgstr "Cài đặt chế độ tổng hợp &CGA..." + +msgid "CGA composite settings" +msgstr "Cài đặt chế độ tổng hợp CGA" diff --git a/src/qt/languages/zh-CN.po b/src/qt/languages/zh-CN.po index 2af5abef9..6f9ee1c4f 100644 --- a/src/qt/languages/zh-CN.po +++ b/src/qt/languages/zh-CN.po @@ -27,8 +27,14 @@ msgstr "Ctrl+Alt+Esc(&E)" msgid "&Pause" msgstr "暂停(&P)" -msgid "E&xit..." -msgstr "退出(&X)..." +msgid "Pause" +msgstr "暂停" + +msgid "Re&sume" +msgstr "恢复(&S)" + +msgid "E&xit" +msgstr "退出(&X)" msgid "&View" msgstr "查看(&V)" @@ -51,20 +57,17 @@ msgstr "渲染器(&N)" msgid "&Qt (Software)" msgstr "Qt (软件)(&Q)" -msgid "Qt (&OpenGL)" -msgstr "Qt (OpenGL)(&O)" - msgid "Open&GL (3.0 Core)" msgstr "OpenGL (3.0 Core)(&G)" msgid "&VNC" msgstr "VNC(&V)" -msgid "Specify dimensions..." -msgstr "指定窗口大小..." +msgid "Specify &dimensions..." +msgstr "指定窗口大小...(&D)" -msgid "F&orce 4:3 display ratio" -msgstr "强制 4:3 显示比例(&O)" +msgid "Force &4:3 display ratio" +msgstr "强制 4:3 显示比例(&4)" msgid "&Window scale factor" msgstr "窗口缩放系数(&W)" @@ -99,8 +102,8 @@ msgstr "7x(&7)" msgid "&8x" msgstr "8x(&8)" -msgid "Filter method" -msgstr "过滤方式" +msgid "Fi<er method" +msgstr "过滤方式(&L)" msgid "&Nearest" msgstr "邻近(&N)" @@ -132,8 +135,8 @@ msgstr "整数比例(&I)" msgid "4:&3 Integer scale" msgstr "4:3 整数比例(&3)" -msgid "E&GA/(S)VGA settings" -msgstr "EGA/(S)VGA 设置(&G)" +msgid "EGA/(S)&VGA settings" +msgstr "EGA/(S)VGA 设置(&V)" msgid "&Inverted VGA monitor" msgstr "VGA 显示器反色显示(&I)" @@ -144,9 +147,15 @@ msgstr "VGA 屏幕类型(&T)" msgid "RGB &Color" msgstr "RGB 彩色(&C)" +msgid "RGB (no brown)" +msgstr "RGB (无棕色)" + msgid "&RGB Grayscale" msgstr "RGB 灰度(&R)" +msgid "Generic RGBI color monitor" +msgstr "通用 RGBI 彩色显示器" + msgid "&Amber monitor" msgstr "琥珀色单色显示器(&A)" @@ -183,6 +192,9 @@ msgstr "工具(&T)" msgid "&Settings..." msgstr "设置(&S)..." +msgid "Settings..." +msgstr "设置" + msgid "&Update status bar icons" msgstr "更新状态栏图标(&U)" @@ -348,6 +360,9 @@ msgstr "机型:" msgid "Configure" msgstr "配置" +msgid "CPU:" +msgstr "CPU:" + msgid "CPU type:" msgstr "CPU 类型:" @@ -384,6 +399,15 @@ msgstr "启用 (UTC)" msgid "Dynamic Recompiler" msgstr "动态重编译器" +msgid "CPU frame size" +msgstr "CPU 执行帧长度" + +msgid "Larger frames (less smooth)" +msgstr "大执行帧 (操作欠平滑)" + +msgid "Smaller frames (smoother)" +msgstr "小执行帧 (操作更平滑)" + msgid "Video:" msgstr "显卡:" @@ -399,12 +423,27 @@ msgstr "IBM 8514/A 图形" msgid "XGA Graphics" msgstr "XGA 图形" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "IBM PS/55 显示适配器图形" + +msgid "Keyboard:" +msgstr "键盘:" + +msgid "Keyboard" +msgstr "键盘" + msgid "Mouse:" msgstr "鼠标:" +msgid "Mouse" +msgstr "鼠标" + msgid "Joystick:" msgstr "操纵杆:" +msgid "Joystick" +msgstr "操纵杆" + msgid "Joystick 1..." msgstr "操纵杆 1..." @@ -435,6 +474,9 @@ msgstr "MIDI 输出设备:" msgid "MIDI In Device:" msgstr "MIDI 输入设备:" +msgid "MIDI Out:" +msgstr "MIDI 输出:" + msgid "Standalone MPU-401" msgstr "独立 MPU-401" @@ -474,6 +516,9 @@ msgstr "LPT3 设备:" msgid "LPT4 Device:" msgstr "LPT4 设备:" +msgid "Internal LPT ECP DMA:" +msgstr "内部 LPT 的 ECP DMA:" + msgid "Serial port 1" msgstr "串口 1" @@ -498,18 +543,21 @@ msgstr "并口 3" msgid "Parallel port 4" msgstr "并口 4" -msgid "HD Controller:" -msgstr "硬盘控制器:" - msgid "FD Controller:" msgstr "软盘控制器:" +msgid "CD-ROM Controller:" +msgstr "CD-ROM 控制器" + msgid "Tertiary IDE Controller" msgstr "第三 IDE 控制器" msgid "Quaternary IDE Controller" msgstr "第四 IDE 控制器" +msgid "Hard disk" +msgstr "硬盘" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "磁带" msgid "Hard disks:" msgstr "硬盘:" +msgid "Firmware Version" +msgstr "固件版本" + msgid "&New..." msgstr "新建(&N)..." @@ -588,8 +639,14 @@ msgstr "光盘驱动器:" msgid "MO drives:" msgstr "磁光盘驱动器:" -msgid "ZIP drives:" -msgstr "ZIP 驱动器:" +msgid "MO:" +msgstr "磁光盘:" + +msgid "Removable disks:" +msgstr "可移动磁盘 (ZIP):" + +msgid "Removable disk drives:" +msgstr "可移动磁盘 (ZIP) 驱动器:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "ISA 实时时钟:" msgid "ISA Memory Expansion" msgstr "ISA 内存扩展" +msgid "ISA ROM Cards" +msgstr "ISA ROM 扩展卡" + msgid "Card 1:" msgstr "扩展卡 1:" @@ -612,6 +672,15 @@ msgstr "扩展卡 3:" msgid "Card 4:" msgstr "扩展卡 4:" +msgid "Generic ISA ROM Board" +msgstr "通用 ISA ROM 卡" + +msgid "Generic Dual ISA ROM Board" +msgstr "通用 ISA 双 ROM 卡" + +msgid "Generic Quad ISA ROM Board" +msgstr "通用 ISA 四 ROM 卡" + msgid "ISABugger device" msgstr "ISABugger 设备" @@ -633,11 +702,17 @@ msgstr " - 已暂停" msgid "Speed" msgstr "速度" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "可移动磁盘 (ZIP) %1 (%2): %3" -msgid "ZIP images" -msgstr "ZIP 映像" +msgid "&Removable disk %1 (%2): %3" +msgstr "可移动磁盘(&R) (ZIP) %1 (%2): %3" + +msgid "Removable disk images" +msgstr "可移动磁盘 (ZIP) 映像" + +msgid "Image %1" +msgstr "映像 %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "86Box 找不到任何可用的 ROM 映像。\n\n请下载 ROM 包并将其解压到 \"roms\" 文件夹中。" @@ -696,12 +771,30 @@ msgstr "网络" msgid "Ports (COM & LPT)" msgstr "端口 (COM 和 LPT)" +msgid "Ports" +msgstr "端口" + +msgid "Serial ports:" +msgstr "串行端口:" + +msgid "Parallel ports:" +msgstr "并行端口:" + msgid "Storage controllers" msgstr "存储控制器" msgid "Hard disks" msgstr "硬盘" +msgid "Disks:" +msgstr "硬盘:" + +msgid "Floppy:" +msgstr "软盘:" + +msgid "Controllers:" +msgstr "控制器:" + msgid "Floppy & CD-ROM drives" msgstr "软盘/光盘驱动器" @@ -711,6 +804,9 @@ msgstr "其他可移动设备" msgid "Other peripherals" msgstr "其他外围设备" +msgid "Other devices" +msgstr "其他设备" + msgid "Click to capture mouse" msgstr "单击窗口捕捉鼠标" @@ -777,12 +873,39 @@ msgstr "4 轴, 4 键操纵杆" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Pedals" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Thrustmaster Flight Control System" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Rudder Control System" + +msgid "2-button gamepad(s)" +msgstr "2 按钮游戏手柄" + +msgid "2-button flight yoke" +msgstr "2 按钮飞行摇杆" + +msgid "4-button gamepad" +msgstr "4 按钮游戏手柄" + +msgid "4-button flight yoke" +msgstr "4 按钮飞行摇杆" + +msgid "2-button flight yoke with throttle" +msgstr "2 按钮带油门飞行摇杆" + +msgid "4-button flight yoke with throttle" +msgstr "4 按钮带油门飞行摇杆" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Win95 方向盘 (3 轴, 4 键)" + msgid "None" msgstr "无" @@ -792,6 +915,9 @@ msgstr "%1 MB (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "软盘 %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "软盘(&F) %1 (%2): %3" + msgid "Advanced sector images" msgstr "高级扇区映像" @@ -813,6 +939,9 @@ msgstr "无法初始化 GhostPCL" msgid "MO %1 (%2): %3" msgstr "磁光盘 %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "磁光盘(&M) %1 (%2): %3" + msgid "MO images" msgstr "磁光盘映像" @@ -822,6 +951,15 @@ msgstr "欢迎使用 86Box!" msgid "Internal device" msgstr "内部设备" +msgid "&File" +msgstr "文件(&F)" + +msgid "&New machine..." +msgstr "新建计算机(&N)..." + +msgid "&Check for updates..." +msgstr "检查更新(&C)..." + msgid "Exit" msgstr "退出" @@ -897,12 +1035,18 @@ msgstr "继续" msgid "Cassette: %1" msgstr "磁带: %1" +msgid "C&assette: %1" +msgstr "磁带: %1(&A)" + msgid "Cassette images" msgstr "磁带映像" msgid "Cartridge %1: %2" msgstr "卡带 %1: %2" +msgid "Car&tridge %1: %2" +msgstr "卡带 %1: %2(&A)" + msgid "Cartridge images" msgstr "卡带映像" @@ -912,6 +1056,9 @@ msgstr "恢复执行" msgid "Pause execution" msgstr "暂停执行" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "按下 Ctrl+Alt+Del" @@ -921,9 +1068,279 @@ msgstr "按下 Ctrl+Alt+Esc" msgid "Hard reset" msgstr "硬重置" +msgid "Force shutdown" +msgstr "强制关机" + +msgid "Start" +msgstr "启动" + +msgid "Not running" +msgstr "未在运行" + +msgid "Running" +msgstr "正在运行" + +msgid "Paused" +msgstr "已暂停" + +msgid "Waiting" +msgstr "等待中" + +msgid "Powered Off" +msgstr "已关机" + +msgid "%n running" +msgstr "%n 正在运行" + +msgid "%n paused" +msgstr "%n 已暂停" + +msgid "%n waiting" +msgstr "%n 等待中" + +msgid "%1 total" +msgstr "%1 总计" + +msgid "VMs: %1" +msgstr "虚拟机: %1" + +msgid "System Directory:" +msgstr "系统目录" + +msgid "Choose directory" +msgstr "选择目录" + +msgid "Choose configuration file" +msgstr "选择配置文件" + +msgid "86Box configuration files (86box.cfg)" +msgstr "86Box 配置文件 (86box.cfg)" + +msgid "Configuration read failed" +msgstr "读取配置失败" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "无法打开选定的配置文件进行读取:%1" + +msgid "Use regular expressions in search box" +msgstr "在搜索框中使用正则表达式" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 计算机当前处于活动状态。您确定要退出虚拟机管理器吗?" + +msgid "Add new system wizard" +msgstr "新增系统向导" + +msgid "Introduction" +msgstr "介绍" + +msgid "This will help you add a new system to 86Box." +msgstr "这将帮助您在86Box中添加一个新系统。" + +msgid "New configuration" +msgstr "新配置" + +msgid "Complete" +msgstr "完成" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "向导现在将启动新系统的配置。" + +msgid "Use existing configuration" +msgstr "使用现有配置" + +msgid "Type some notes here" +msgstr "在此处键入一些备注" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "将现有配置文件内容粘贴到下面的框中。" + +msgid "Load configuration from file" +msgstr "从文件加载配置" + +msgid "System name" +msgstr "系统名称" + +msgid "System name:" +msgstr "系统名称:" + +msgid "System name cannot contain certain characters" +msgstr "系统名称不能包含某些字符" + +msgid "System name already exists" +msgstr "系统名称已存在" + +msgid "Please enter a directory for the system" +msgstr "请为系统输入一个目录" + +msgid "Directory does not exist" +msgstr "目录不存在" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "将在上方选定的目录中为系统创建一个新目录" + +msgid "System location:" +msgstr "系统位置:" + +msgid "System name and location" +msgstr "系统名称和位置" + +msgid "Enter the name of the system and choose the location" +msgstr "输入系统名称并选择位置" + +msgid "Enter the name of the system" +msgstr "输入系统名称" + +msgid "Please enter a system name" +msgstr "请输入系统名称" + +msgid "Display name (optional):" +msgstr "显示名称 (可选)" + +msgid "Display name:" +msgstr "显示名称:" + +msgid "Set display name" +msgstr "设置显示名称" + +msgid "Enter the new display name (blank to reset)" +msgstr "输入新的显示名称 (留空以重置)" + +msgid "Change &display name..." +msgstr "更改显示名称(&D)..." + +msgid "Context Menu" +msgstr "上下文菜单" + +msgid "&Open folder..." +msgstr "打开文件夹(&O)..." + +msgid "Open p&rinter tray..." +msgstr "打开打印机托盘(&R)..." + +msgid "Set &icon..." +msgstr "设置图标(&I)..." + +msgid "Select an icon" +msgstr "选择一个图标" + +msgid "C&lone..." +msgstr "克隆(&L)..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "虚拟机 \"%1\" (%2) 将被克隆到:" + +msgid "Directory %1 already exists" +msgstr "目录 %1 已存在" + +msgid "You cannot use the following characters in the name: %1" +msgstr " %1: 名称中不能使用以下字符: %1" + +msgid "Clone" +msgstr "克隆" + +msgid "Failed to create directory for cloned VM" +msgstr "创建克隆虚拟机目录失败" + +msgid "Failed to clone VM." +msgstr "克隆虚拟机失败。" + +msgid "Directory in use" +msgstr "目录正在使用中" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "所选目录已被占用,请选择另一个目录。" + +msgid "Create directory failed" +msgstr "创建目录失败" + +msgid "Unable to create the directory for the new system" +msgstr "无法为新系统创建目录" + +msgid "Configuration write failed" +msgstr "配置写入失败" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "无法打开 %1 的配置文件进行写入" + +msgid "Error adding system" +msgstr "添加系统时出错" + +msgid "Remove directory failed" +msgstr "移除目录失败" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "无法删除该机器目录中的某些文件。请手动删除。" + +msgid "Build" +msgstr "构建" + +msgid "Version" +msgstr "版本" + +msgid "An update to 86Box is available: %1 %2" +msgstr "86Box 有可用更新:%1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "检查更新时发生错误:%1" + +msgid "An update to 86Box is available!" +msgstr "86Box 有可用更新!" + +msgid "Warning" +msgstr "警告" + +msgid "&Kill" +msgstr "强制终止(&K)" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "强制终止虚拟机可能导致数据丢失。仅在86Box进程卡住时才执行此操作。\n\n您确定要强制终止虚拟机 \"%1\" 吗?" + +msgid "&Delete" +msgstr "删除(&D)" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "你真的想删除虚拟机 \"%1\" 及其所有文件吗?此操作无法撤消!" + +msgid "Show &config file" +msgstr "显示配置文件(&C)" + +msgid "No screenshot" +msgstr "无截图" + +msgid "Search" +msgstr "搜索" + +msgid "Searching for VMs..." +msgstr "正在搜索虚拟机..." + +msgid "Found %1" +msgstr "已找到 %1" + +msgid "System" +msgstr "系统" + +msgid "Storage" +msgstr "存储" + +msgid "Disk %1: " +msgstr "磁盘 %1" + +msgid "No disks" +msgstr "无磁盘" + +msgid "Audio" +msgstr "音频" + +msgid "Audio:" +msgstr "音频:" + msgid "ACPI shutdown" msgstr "ACPI 关机" +msgid "ACP&I shutdown" +msgstr "ACP&I 关机" + msgid "Hard disk (%1)" msgstr "硬盘 (%1)" @@ -970,10 +1387,10 @@ msgid "Disk image created" msgstr "已创建磁盘映像" msgid "Make sure the file exists and is readable." -msgstr "请确定此文件已存在并可读取。" +msgstr "请确定此文件存在并可读取。" msgid "Make sure the file is being saved to a writable directory." -msgstr "请确定此文件保存在可写目录中。" +msgstr "请确定此文件保存在可写入目录中。" msgid "Disk image too large" msgstr "磁盘映像太大" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "光盘 %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "光盘 %1 (%2): %3(&C)" + msgid "160 KB" msgstr "160 KB" @@ -1186,7 +1606,7 @@ msgid "WinBox is no longer supported" msgstr "WinBox 不再受支持" msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." -msgstr "由于缺乏维护者,WinBox 管理器的开发工作于 2022 年停止。由于我们正努力将 86Box 做得更好,因此决定不再支持 WinBox 作为管理器。\n\nWinBox将不再提供更新,如果你继续在86Box的新版本中使用WinBox,可能会遇到不正确的行为。任何与 WinBox 行为相关的错误报告都将被视为无效而关闭。\n\n请访问 86box.net,查看你可以使用的其他管理器列表。" +msgstr "由于缺乏维护者,WinBox 管理器的开发工作于 2022 年停止。由于我们正努力将 86Box 做得更好,因此决定不再支持 WinBox 作为管理器。\n\nWinBox 将不再提供更新,如果你继续在 86Box 的新版本中使用 WinBox,可能会遇到不正确的行为。任何与 WinBox 行为相关的错误报告都将被视为无效而关闭。\n\n请访问 86box.net,查看你可以使用的其他管理器列表。" msgid "Generate" msgstr "生成" @@ -1209,41 +1629,38 @@ msgstr "MCA 设备" msgid "List of MCA devices:" msgstr "MCA 设备清单:" -msgid "Tablet tool" -msgstr "平板工具" +msgid "&Tablet tool" +msgstr "平板工具(&T)" -msgid "Qt (OpenGL &ES)" -msgstr "Qt(OpenGL &ES)" +msgid "About &Qt" +msgstr "关于 &Qt" -msgid "About Qt" -msgstr "关于 Qt" +msgid "&MCA devices..." +msgstr "&MCA 设备..." -msgid "MCA devices..." -msgstr "MCA 设备..." +msgid "Show non-&primary monitors" +msgstr "显示非主要显示器(&P)" -msgid "Show non-primary monitors" -msgstr "显示非主要显示器" +msgid "Open screenshots &folder..." +msgstr "打开屏幕截图文件夹...(&F)" -msgid "Open screenshots folder..." -msgstr "打开屏幕截图文件夹..." +msgid "Appl&y fullscreen stretch mode when maximized" +msgstr "最大化时应用全屏拉伸模式(&Y)" -msgid "Apply fullscreen stretch mode when maximized" -msgstr "最大化时应用全屏拉伸模式" +msgid "&Cursor/Puck" +msgstr "光标/冰球(&C)" -msgid "Cursor/Puck" -msgstr "光标/冰球" +msgid "&Pen" +msgstr "笔(&P)" -msgid "Pen" -msgstr "笔" - -msgid "Host CD/DVD Drive (%1:)" -msgstr "主机 CD/DVD 驱动器 (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "主机 CD/DVD 驱动器 (%1:) (&H)" msgid "&Connected" msgstr "已连接(&C)" -msgid "Clear image history" -msgstr "清除映像历史记录" +msgid "Clear image &history" +msgstr "清除映像历史记录(&H)" msgid "Create..." msgstr "创建..." @@ -1257,9 +1674,15 @@ msgstr "未知总线" msgid "Null Driver" msgstr "空驱动程序" +msgid "NIC:" +msgstr "网卡:" + msgid "NIC %1 (%2) %3" msgstr "NIC %1 (%2) %3" +msgid "&NIC %1 (%2) %3" +msgstr "NIC %1 (%2) %3(&N)" + msgid "Render behavior" msgstr "渲染行为" @@ -1270,7 +1693,7 @@ msgid " fps" msgstr " fps" msgid "VSync" -msgstr "VSync" +msgstr "垂直同步" msgid "Synchronize with video" msgstr "与视频同步" @@ -1306,7 +1729,7 @@ msgid "This machine might have been moved or copied." msgstr "这台机器可能被移动或复制过。" msgid "In order to ensure proper networking functionality, 86Box needs to know if this machine was moved or copied.\n\nSelect \"I Copied It\" if you are not sure." -msgstr "为了确保网络功能正常,86Box需要知道这台机器是否被移动或复制。\n\n如果您不确定,请选择\"我已复制这台机器\"。" +msgstr "为了确保网络功能正常,86Box 需要知道这台机器是否被移动或复制。\n\n如果您不确定,请选择\"我已复制这台机器\"。" msgid "I Moved It" msgstr "我已移动这台机器" @@ -1315,7 +1738,7 @@ msgid "I Copied It" msgstr "我已复制这台机器" msgid "86Box Monitor #" -msgstr "86Box 监测器 #" +msgstr "86Box 显示器 #" msgid "No MCA devices." msgstr "无 MCA 设备。" @@ -1323,6 +1746,9 @@ msgstr "无 MCA 设备。" msgid "MiB" msgstr "兆字节" +msgid "GiB" +msgstr "吉字节" + msgid "Network Card #1" msgstr "网卡 1" @@ -1365,8 +1791,26 @@ msgstr "串行端口直通 3" msgid "Serial port passthrough 4" msgstr "串行端口直通 4" -msgid "Renderer options..." -msgstr "渲染器选项..." +msgid "Renderer &options..." +msgstr "渲染器选项...(&O)" + +msgid "PC/XT Keyboard" +msgstr "PC/XT 键盘" + +msgid "AT Keyboard" +msgstr "AT 键盘" + +msgid "AX Keyboard" +msgstr "AX 键盘" + +msgid "PS/2 Keyboard" +msgstr "PS/2 键盘" + +msgid "PS/55 Keyboard" +msgstr "PS/55 键盘" + +msgid "Keys" +msgstr "按键" msgid "Logitech/Microsoft Bus Mouse" msgstr "Logitech/Microsoft 总线鼠标" @@ -1377,18 +1821,30 @@ msgstr "Microsoft 总线鼠标(InPort)" msgid "Mouse Systems Serial Mouse" msgstr "Mouse Systems 串行鼠标" +msgid "Mouse Systems Bus Mouse" +msgstr "Mouse Systems 总线鼠标" + msgid "Microsoft Serial Mouse" msgstr "Microsoft 串行鼠标" +msgid "Microsoft Serial BallPoint" +msgstr "Microsoft Ballpoint 串行鼠标" + msgid "Logitech Serial Mouse" msgstr "Logitech 串行鼠标" msgid "PS/2 Mouse" msgstr "PS/2 鼠标" +msgid "PS/2 QuickPort Mouse" +msgstr "PS/2 QuickPort 鼠标" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (串行)" +msgid "Default Baud rate" +msgstr "默认波特率" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] 标准 Hayes 兼容调制解调器" @@ -1413,21 +1869,81 @@ msgstr "系统 MIDI" msgid "MIDI Input Device" msgstr "MIDI 输入设备" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "BIOS 文件" + +msgid "BIOS file (ROM #1)" +msgstr "BIOS 文件 (ROM 1)" + +msgid "BIOS file (ROM #2)" +msgstr "BIOS 文件 (ROM 2)" + +msgid "BIOS file (ROM #3)" +msgstr "BIOS 文件 (ROM 3)" + +msgid "BIOS file (ROM #4)" +msgstr "BIOS 文件 (ROM 4)" + +msgid "BIOS address" msgstr "BIOS 地址" +msgid "BIOS address (ROM #1)" +msgstr "BIOS 地址 (ROM 1)" + +msgid "BIOS address (ROM #2)" +msgstr "BIOS 地址 (ROM 2)" + +msgid "BIOS address (ROM #3)" +msgstr "BIOS 地址 (ROM 3)" + +msgid "BIOS address (ROM #4)" +msgstr "BIOS 地址 (ROM 4)" + msgid "Enable BIOS extension ROM Writes" msgstr "启用 BIOS 扩展 ROM 写入功能" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "启用 BIOS 扩展 ROM 写入功能 (ROM 1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "启用 BIOS 扩展 ROM 写入功能 (ROM 2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "启用 BIOS 扩展 ROM 写入功能 (ROM 3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "启用 BIOS 扩展 ROM 写入功能 (ROM 4)" + +msgid "Linear framebuffer base" +msgstr "线性帧缓冲基址" + msgid "Address" msgstr "地址" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "串口的 IRQ" + +msgid "Parallel port IRQ" +msgstr "并行端口的 IRQ" + msgid "BIOS Revision" msgstr "BIOS 修订版" +msgid "BIOS Version" +msgstr "BIOS 版本" + +msgid "BIOS Language" +msgstr "BIOS 语言" + +msgid "IBM 5161 Expansion Unit" +msgstr "IBM 5161 扩展单元" + +msgid "IBM Cassette Basic" +msgstr "IBM 磁带 BASIC" + msgid "Translate 26 -> 17" msgstr "翻译 26 -> 17" @@ -1443,6 +1959,18 @@ msgstr "反转颜色" msgid "BIOS size" msgstr "BIOS 大小" +msgid "BIOS size (ROM #1)" +msgstr "BIOS 大小 (ROM 1)" + +msgid "BIOS size (ROM #2)" +msgstr "BIOS 大小 (ROM 2)" + +msgid "BIOS size (ROM #3)" +msgstr "BIOS 大小 (ROM 3)" + +msgid "BIOS size (ROM #4)" +msgstr "BIOS 大小 (ROM 4)" + msgid "Map C0000-C7FFF as UMB" msgstr "将 C0000-C7FFF 映射为 UMB" @@ -1504,7 +2032,7 @@ msgid "Reverb" msgstr "混响" msgid "Reverb Room Size" -msgstr "混响室的大小" +msgstr "混响室大小" msgid "Reverb Damping" msgstr "混响阻尼" @@ -1518,14 +2046,17 @@ msgstr "混响电平" msgid "Interpolation Method" msgstr "插值法" +msgid "Dynamic Sample Loading" +msgstr "采样的动态加载" + msgid "Reverb Output Gain" -msgstr "混响输出的增益" +msgstr "混响输出增益" msgid "Reversed stereo" msgstr "反转立体声" msgid "Nice ramp" -msgstr "漂亮的斜坡" +msgstr "平滑渐变曲线" msgid "Hz" msgstr "Hz" @@ -1540,7 +2071,7 @@ msgid "RTS toggle" msgstr "RTS 切换" msgid "Revision" -msgstr "修订" +msgstr "修订版" msgid "Controller" msgstr "控制器" @@ -1605,6 +2136,12 @@ msgstr "低 DMA" msgid "Enable Game port" msgstr "启用游戏端口" +msgid "SID Model" +msgstr "SID 芯片型号" + +msgid "SID Filter Strength" +msgstr "SID 滤镜强度" + msgid "Surround module" msgstr "环绕声模块" @@ -1615,7 +2152,13 @@ msgid "Raise CODEC interrupt on CODEC setup (needed by some drivers)" msgstr "在 CODEC 设置时引发 CODEC 中断(某些驱动程序需要)。" msgid "SB Address" -msgstr "SB 地址" +msgstr "Sound Blaster 地址" + +msgid "Adlib Address" +msgstr "Adlib 地址" + +msgid "Use EEPROM setting" +msgstr "使用 EEPROM 设置" msgid "WSS IRQ" msgstr "WSS IRQ" @@ -1630,7 +2173,7 @@ msgid "Receive MIDI input (MPU-401)" msgstr "接收 MIDI 输入(MPU-401)" msgid "SB low DMA" -msgstr "SB 低 DMA" +msgstr "Sound Blaster 低 DMA" msgid "6CH variant (6-channel)" msgstr "6 通道变体(6 通道)" @@ -1701,9 +2244,15 @@ msgstr "RAMDAC 类型" msgid "Blend" msgstr "混合" +msgid "Font" +msgstr "字体" + msgid "Bilinear filtering" msgstr "双线性滤波" +msgid "Video chroma-keying" +msgstr "视频色键透明处理" + msgid "Dithering" msgstr "抖动" @@ -1711,7 +2260,7 @@ msgid "Enable NMI for CGA emulation" msgstr "为 CGA 仿真启用 NMI" msgid "Voodoo type" -msgstr "巫毒类型" +msgstr "Voodoo 类型" msgid "Framebuffer memory size" msgstr "帧缓冲区内存大小" @@ -1746,6 +2295,33 @@ msgstr "传输速度" msgid "EMS mode" msgstr "EMS (扩展内存)模式" +msgid "EMS Address" +msgstr "EMS 地址" + +msgid "EMS 1 Address" +msgstr "EMS 1 地址" + +msgid "EMS 2 Address" +msgstr "EMS 2 地址" + +msgid "EMS Memory Size" +msgstr "EMS 内存大小" + +msgid "EMS 1 Memory Size" +msgstr "EMS 1 内存大小" + +msgid "EMS 2 Memory Size" +msgstr "EMS 2 内存大小" + +msgid "Enable EMS" +msgstr "启用 EMS" + +msgid "Enable EMS 1" +msgstr "启用 EMS 1" + +msgid "Enable EMS 2" +msgstr "启用 EMS 2" + msgid "Address for > 2 MB" msgstr "地址 > 2 MB" @@ -1753,7 +2329,7 @@ msgid "Frame Address" msgstr "帧地址" msgid "USA" -msgstr "美国" +msgstr "美国英语" msgid "Danish" msgstr "丹麦语" @@ -1764,11 +2340,11 @@ msgstr "始终保持选定速度" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "BIOS 设置 + 热键 (开机自检期间关闭)" -msgid "64 kB starting from F0000" -msgstr "64 kB,从 F0000 开始" +msgid "64 KB starting from F0000" +msgstr "64 KB,从 F0000 开始" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB,从 E0000 开始 (地址 MSB 反相,最后 64KB 优先)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KB,从 E0000 开始 (地址 MSB 反相,最后 64 KB 优先)" msgid "Sine" msgstr "正弦" @@ -1801,10 +2377,10 @@ msgid "Wheel" msgstr "滚轮" msgid "Five + Wheel" -msgstr "五键+滚轮" +msgstr "五键 + 滚轮" msgid "Five + 2 Wheels" -msgstr "五键+双滚轮" +msgstr "五键 + 双滚轮" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 串行 / SMT3(R)V" @@ -1869,6 +2445,9 @@ msgstr "256 KB" msgid "Composite" msgstr "复合视频" +msgid "True color" +msgstr "真彩色" + msgid "Old" msgstr "旧" @@ -1879,7 +2458,7 @@ msgid "Color (generic)" msgstr "彩色(通用)" msgid "Green Monochrome" -msgstr "单色绿色" +msgstr "绿色单色" msgid "Amber Monochrome" msgstr "琥珀单色" @@ -1902,6 +2481,15 @@ msgstr "sRGB 插值" msgid "Linear interpolation" msgstr "线性插值" +msgid "Has secondary 8x8 character set" +msgstr "第二 8x8 字符集" + +msgid "Has Quadcolor II daughter board" +msgstr "Quadcolor II 子卡" + +msgid "Alternate monochrome contrast" +msgstr "翻转单色对比度" + msgid "128 KB" msgstr "128 KB" @@ -1921,10 +2509,10 @@ msgid "Color 80x25 (5153/CGA)" msgstr "彩色 80x25(5153/CGA)" msgid "Enhanced Color - Normal Mode (5154/ECD)" -msgstr "增强色彩 - 正常模式 (5154/ECD)" +msgstr "增强色 - 正常模式 (5154/ECD)" msgid "Enhanced Color - Enhanced Mode (5154/ECD)" -msgstr "增强色彩 - 增强模式 (5154/ECD)" +msgstr "增强色 - 增强模式 (5154/ECD)" msgid "Green" msgstr "绿色" @@ -1935,6 +2523,9 @@ msgstr "琥珀色" msgid "Gray" msgstr "灰色" +msgid "Grayscale" +msgstr "灰阶" + msgid "Color" msgstr "彩色" @@ -1950,6 +2541,12 @@ msgstr "其他语言" msgid "Bochs latest" msgstr "Bochs 最新版本" +msgid "Apply overscan deltas" +msgstr "应用过扫描增量" + +msgid "Mono Interlaced" +msgstr "单色隔行扫描" + msgid "Mono Non-Interlaced" msgstr "单色非隔行扫描" @@ -1962,6 +2559,9 @@ msgstr "彩色非隔行扫描" msgid "3Dfx Voodoo Graphics" msgstr "3Dfx Voodoo 图形" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst(2 个 TMU)" @@ -2005,7 +2605,7 @@ msgid "Parallel Line Internet Protocol" msgstr "Parallel Line Internet Protocol" msgid "Protection Dongle for Savage Quest" -msgstr "Savage Quest保护加密狗" +msgstr "Savage Quest 保护加密狗" msgid "Serial Passthrough Device" msgstr "串行端口直通设备" @@ -2031,6 +2631,9 @@ msgstr "直通波特率" msgid "Named Pipe (Server)" msgstr "命名管道(服务器)" +msgid "Named Pipe (Client)" +msgstr "命名管道 (客户端) " + msgid "Host Serial Passthrough" msgstr "主机串行端口直通" @@ -2153,3 +2756,201 @@ msgstr "下移" msgid "Could not load file %1" msgstr "无法加载文件 %1" + +msgid "Key Bindings:" +msgstr "按键绑定" + +msgid "Action" +msgstr "动作" + +msgid "Keybind" +msgstr "绑定的按键" + +msgid "Clear binding" +msgstr "清除绑定" + +msgid "Bind" +msgstr "绑定" + +msgid "Bind Key" +msgstr "绑定按键" + +msgid "Enter key combo:" +msgstr "输入按键组合" + +msgid "Bind conflict" +msgstr "绑定冲突" + +msgid "This key combo is already in use." +msgstr "该按键组合已被使用。" + +msgid "Send Control+Alt+Del" +msgstr "发送 Ctrl+Alt+Del" + +msgid "Send Control+Alt+Escape" +msgstr "发送 Ctrl+Alt+Esc" + +msgid "Toggle fullscreen" +msgstr "切换全屏" + +msgid "Screenshot" +msgstr "截图" + +msgid "Release mouse pointer" +msgstr "释放鼠标" + +msgid "Toggle pause" +msgstr "切换暂停" + +msgid "Toggle mute" +msgstr "切换静音" + +msgid "Text files" +msgstr "文本文件" + +msgid "ROM files" +msgstr "ROM 文件" + +msgid "SoundFont files" +msgstr "SoundFont 文件" + +msgid "Local Switch" +msgstr "本地交换机" + +msgid "Remote Switch" +msgstr "远程交换机" + +msgid "Switch:" +msgstr "交换机:" + +msgid "Hub Mode" +msgstr "集线器模式" + +msgid "Hostname:" +msgstr "主机名:" + +msgid "ISA RAM:" +msgstr "ISA 内存:" + +msgid "ISA ROM:" +msgstr "ISA ROM:" + +msgid "&Wipe NVRAM" +msgstr "清除 NVRAM(&W)" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "这将删除虚拟机位于 \"nvr\" 子目录中的所有 NVRAM 文件(及相关文件)。如果应用,您需要重新配置 BIOS(以及虚拟机内可能的其他设备)设置。\n\n您确定要擦除虚拟机 \"%1\" 的所有 NVRAM 内容吗?" + +msgid "Success" +msgstr "成功" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "已成功清除虚拟机 \"%1\" 的 NVRAM 内容" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "尝试清除虚拟机 \"%1\" 的 NVRAM 内容时发生错误" + +msgid "%1 VM Manager" +msgstr "%1 虚拟机管理器" + +msgid "%n disk(s)" +msgstr "%n 磁盘" + +msgid "Unknown Status" +msgstr "未知状态" + +msgid "No Machines Found!" +msgstr "未找到任何虚拟机!" + +msgid "Check for updates on startup" +msgstr "启动时检查更新" + +msgid "Unable to determine release information" +msgstr "无法确定发行版信息" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "检查更新:\n\n%1 时出错。\n\n请稍后再试。" + +msgid "Update check complete" +msgstr "检查更新已完成" + +msgid "stable" +msgstr "稳定版" + +msgid "beta" +msgstr "测试版" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "您正在运行 86Box 的最新 %1 版本:%2" + +msgid "version" +msgstr "版本" + +msgid "build" +msgstr "构建" + +msgid "You are currently running version %1." +msgstr "您当前正在运行版本 %1 。" + +msgid "Version %1 is now available." +msgstr "版本 %1现已可用。" + +msgid "You are currently running build %1." +msgstr "您当前正在运行构建 %1 。" + +msgid "Build %1 is now available." +msgstr "构建 %1现已可用。" + +msgid "Would you like to visit the download page?" +msgstr "您想访问下载页面吗?" + +msgid "Visit download page" +msgstr "访问下载页面" + +msgid "Update check" +msgstr "更新检查" + +msgid "Checking for updates..." +msgstr "正在检查更新..." + +msgid "86Box Update" +msgstr "86Box 更新" + +msgid "Release notes:" +msgstr "发行版说明" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "虚拟机崩溃" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "虚拟机 \"%1\" 的进程意外终止,退出代码为 %2。" + +msgid "The system will not be added." +msgstr "系统将不会被添加。" + +msgid "&Update mouse every CPU frame" +msgstr "逐 CPU 帧更新鼠标(&U)" + +msgid "Hue" +msgstr "色调" + +msgid "Saturation" +msgstr "饱和度" + +msgid "Contrast" +msgstr "对比" + +msgid "Brightness" +msgstr "亮度" + +msgid "Sharpness" +msgstr "锐度" + +msgid "&CGA composite settings..." +msgstr "CGA 复合模式设置...(&C)" + +msgid "CGA composite settings" +msgstr "CGA 复合模式设置" diff --git a/src/qt/languages/zh-TW.po b/src/qt/languages/zh-TW.po index 9d082a9af..ad03bd44d 100644 --- a/src/qt/languages/zh-TW.po +++ b/src/qt/languages/zh-TW.po @@ -27,8 +27,14 @@ msgstr "Ctrl+Alt+Esc(&E)" msgid "&Pause" msgstr "暫停(&P)" -msgid "E&xit..." -msgstr "退出(&X)..." +msgid "Pause" +msgstr "暫停" + +msgid "Re&sume" +msgstr "恢復" + +msgid "E&xit" +msgstr "退出(&X)" msgid "&View" msgstr "檢視(&V)" @@ -51,20 +57,17 @@ msgstr "渲染器(&N)" msgid "&Qt (Software)" msgstr "Qt (軟體)(&Q)" -msgid "Qt (&OpenGL)" -msgstr "Qt (OpenGL)(&O)" - msgid "Open&GL (3.0 Core)" msgstr "OpenGL (3.0 Core)(&G)" msgid "&VNC" msgstr "VNC(&V)" -msgid "Specify dimensions..." -msgstr "指定視窗大小..." +msgid "Specify &dimensions..." +msgstr "指定視窗大小...(&D)" -msgid "F&orce 4:3 display ratio" -msgstr "強制 4:3 顯示比例(&O)" +msgid "Force &4:3 display ratio" +msgstr "強制 4:3 顯示比例(&4)" msgid "&Window scale factor" msgstr "視窗縮放係數(&W)" @@ -99,8 +102,8 @@ msgstr "7x(&7)" msgid "&8x" msgstr "8x(&8)" -msgid "Filter method" -msgstr "過濾方式" +msgid "Fi<er method" +msgstr "過濾方式(&L)" msgid "&Nearest" msgstr "鄰近(&N)" @@ -132,8 +135,8 @@ msgstr "整數比例(&I)" msgid "4:&3 Integer scale" msgstr "4:3 整數比例(&3)" -msgid "E&GA/(S)VGA settings" -msgstr "EGA/(S)VGA 設定(&G)" +msgid "EGA/(S)&VGA settings" +msgstr "EGA/(S)VGA 設定(&V)" msgid "&Inverted VGA monitor" msgstr "VGA 顯示器反色顯示(&I)" @@ -144,9 +147,15 @@ msgstr "VGA 螢幕類型(&T)" msgid "RGB &Color" msgstr "RGB 彩色(&C)" +msgid "RGB (no brown)" +msgstr "RGB (無棕色)" + msgid "&RGB Grayscale" msgstr "RGB 灰度(&R)" +msgid "Generic RGBI color monitor" +msgstr "通用 RGBI 彩色監視器" + msgid "&Amber monitor" msgstr "琥珀色單色顯示器(&A)" @@ -183,6 +192,9 @@ msgstr "工具(&T)" msgid "&Settings..." msgstr "設定(&S)..." +msgid "Settings..." +msgstr "設定..." + msgid "&Update status bar icons" msgstr "更新狀態列圖示(&U)" @@ -348,6 +360,9 @@ msgstr "機型:" msgid "Configure" msgstr "設定" +msgid "CPU:" +msgstr "CPU:" + msgid "CPU type:" msgstr "CPU 類型:" @@ -384,6 +399,15 @@ msgstr "啟用 (UTC)" msgid "Dynamic Recompiler" msgstr "動態重編譯器" +msgid "CPU frame size" +msgstr "CPU 框架大小" + +msgid "Larger frames (less smooth)" +msgstr "較大的框架 (較不平滑)" + +msgid "Smaller frames (smoother)" +msgstr "更小的框架 (更平滑)" + msgid "Video:" msgstr "顯示卡:" @@ -399,12 +423,27 @@ msgstr "IBM 8514/A Graphics" msgid "XGA Graphics" msgstr "XGA Graphics" +msgid "IBM PS/55 Display Adapter Graphics" +msgstr "IBM PS/55 顯示介面卡圖形" + +msgid "Keyboard:" +msgstr "鍵盤:" + +msgid "Keyboard" +msgstr "鍵盤" + msgid "Mouse:" msgstr "滑鼠:" +msgid "Mouse" +msgstr "滑鼠" + msgid "Joystick:" msgstr "搖桿:" +msgid "Joystick" +msgstr "搖桿" + msgid "Joystick 1..." msgstr "搖桿 1..." @@ -435,6 +474,9 @@ msgstr "MIDI 輸出裝置:" msgid "MIDI In Device:" msgstr "MIDI 輸入裝置:" +msgid "MIDI Out:" +msgstr "MIDI 輸出:" + msgid "Standalone MPU-401" msgstr "獨立 MPU-401" @@ -474,6 +516,9 @@ msgstr "LPT3 裝置:" msgid "LPT4 Device:" msgstr "LPT4 裝置:" +msgid "Internal LPT ECP DMA:" +msgstr "內部 LPT 的 ECP 的 DMA:" + msgid "Serial port 1" msgstr "序列埠 1" @@ -498,18 +543,21 @@ msgstr "並列埠 3" msgid "Parallel port 4" msgstr "並列埠 4" -msgid "HD Controller:" -msgstr "硬碟控制器:" - msgid "FD Controller:" msgstr "軟碟控制器:" +msgid "CD-ROM Controller:" +msgstr "CD-ROM 控制器" + msgid "Tertiary IDE Controller" msgstr "第三 IDE 控制器" msgid "Quaternary IDE Controller" msgstr "第四 IDE 控制器" +msgid "Hard disk" +msgstr "硬碟" + msgid "SCSI" msgstr "SCSI" @@ -531,6 +579,9 @@ msgstr "磁帶" msgid "Hard disks:" msgstr "硬碟:" +msgid "Firmware Version" +msgstr "韌體版本" + msgid "&New..." msgstr "新增(&N)..." @@ -588,8 +639,14 @@ msgstr "光碟機:" msgid "MO drives:" msgstr "磁光碟機:" -msgid "ZIP drives:" -msgstr "ZIP 磁碟機:" +msgid "MO:" +msgstr "磁光:" + +msgid "Removable disks:" +msgstr "可移除:" + +msgid "Removable disk drives:" +msgstr "可移除磁碟:" msgid "ZIP 250" msgstr "ZIP 250" @@ -600,6 +657,9 @@ msgstr "ISA 實時時鐘:" msgid "ISA Memory Expansion" msgstr "ISA 記憶體擴充" +msgid "ISA ROM Cards" +msgstr "ISA ROM 擴充卡" + msgid "Card 1:" msgstr "擴充卡 1:" @@ -612,6 +672,15 @@ msgstr "擴充卡 3:" msgid "Card 4:" msgstr "擴充卡 4:" +msgid "Generic ISA ROM Board" +msgstr "通用 ISA ROM 板" + +msgid "Generic Dual ISA ROM Board" +msgstr "通用雙 ISA ROM 板" + +msgid "Generic Quad ISA ROM Board" +msgstr "通用四通道 ISA ROM 板" + msgid "ISABugger device" msgstr "ISABugger 裝置" @@ -633,11 +702,17 @@ msgstr " - 已暫停" msgid "Speed" msgstr "速度" -msgid "ZIP %1 %2 (%3): %4" -msgstr "ZIP %1 %2 (%3): %4" +msgid "Removable disk %1 (%2): %3" +msgstr "可移除磁碟 %1 (%2): %3" -msgid "ZIP images" -msgstr "ZIP 映像" +msgid "&Removable disk %1 (%2): %3" +msgstr "可移除磁碟(&R) %1 (%2): %3" + +msgid "Removable disk images" +msgstr "可移除磁碟影像" + +msgid "Image %1" +msgstr "影像 %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." msgstr "86Box 找不到任何可用的 ROM 映像。\n\n請下載 ROM 套件並將其解壓到 \"roms\" 資料夾。" @@ -696,12 +771,30 @@ msgstr "網路" msgid "Ports (COM & LPT)" msgstr "連接埠 (COM 和 LPT)" +msgid "Ports" +msgstr "連接埠" + +msgid "Serial ports:" +msgstr "序列連接埠:" + +msgid "Parallel ports:" +msgstr "平行埠:" + msgid "Storage controllers" msgstr "存儲控制器" msgid "Hard disks" msgstr "硬碟" +msgid "Disks:" +msgstr "磁碟:" + +msgid "Floppy:" +msgstr "軟盤:" + +msgid "Controllers:" +msgstr "控制器:" + msgid "Floppy & CD-ROM drives" msgstr "軟碟/光碟機" @@ -711,6 +804,9 @@ msgstr "其他卸除式裝置" msgid "Other peripherals" msgstr "其他周邊裝置" +msgid "Other devices" +msgstr "其他裝置" + msgid "Click to capture mouse" msgstr "點擊視窗捕捉滑鼠" @@ -777,12 +873,39 @@ msgstr "4 軸, 4 鍵搖桿" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" +msgid "CH Flightstick Pro + CH Pedals" +msgstr "CH Flightstick Pro + CH Pedals" + msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" msgid "Thrustmaster Flight Control System" msgstr "Thrustmaster Flight Control System" +msgid "Thrustmaster FCS + Rudder Control System" +msgstr "Thrustmaster FCS + Rudder Control System" + +msgid "2-button gamepad(s)" +msgstr "2 鍵遊戲手柄" + +msgid "2-button flight yoke" +msgstr "2 按鈕飛行搖桿" + +msgid "4-button gamepad" +msgstr "4 鍵遊戲手柄" + +msgid "4-button flight yoke" +msgstr "4 按鈕飛行搖桿" + +msgid "2-button flight yoke with throttle" +msgstr "2 按鈕飛行搖桿,含節流閥" + +msgid "4-button flight yoke with throttle" +msgstr "4 按鈕飛行搖桿,含節流閥" + +msgid "Win95 Steering Wheel (3-axis, 4-button)" +msgstr "Win95 方向盤 (3 軸, 4 鍵搖桿)" + msgid "None" msgstr "無" @@ -792,6 +915,9 @@ msgstr "%1 MB (CHS: %2, %3, %4)" msgid "Floppy %1 (%2): %3" msgstr "軟碟 %1 (%2): %3" +msgid "&Floppy %1 (%2): %3" +msgstr "軟碟 %1 (%2): %3(&F)" + msgid "Advanced sector images" msgstr "進階磁區映像" @@ -813,6 +939,9 @@ msgstr "無法初始化 GhostPCL" msgid "MO %1 (%2): %3" msgstr "磁光碟 %1 (%2): %3" +msgid "&MO %1 (%2): %3" +msgstr "磁光碟 %1 (%2): %3(&M)" + msgid "MO images" msgstr "磁光碟映像" @@ -822,6 +951,15 @@ msgstr "歡迎使用 86Box!" msgid "Internal device" msgstr "內部裝置" +msgid "&File" +msgstr "檔案(&F)" + +msgid "&New machine..." +msgstr "新機器(&N)..." + +msgid "&Check for updates..." +msgstr "檢查更新(&C)..." + msgid "Exit" msgstr "退出" @@ -849,8 +987,8 @@ msgstr "一個舊式電腦模擬器\n\n作者: Miran Grča (OBattler)、RichardG msgid "Hardware not available" msgstr "硬體不可用" -msgid "Make sure %1 is installed and that you are on a libpcap-compatible network connection." -msgstr "請確認 %1 已安裝且使用相容 libpcap 的網路連線。" +msgid "Make sure %1 is installed and that you are on a %1-compatible network connection." +msgstr "請確認 %1 已安裝且使用相容 %1 的網路連線。" msgid "Invalid configuration" msgstr "無效設定" @@ -897,12 +1035,18 @@ msgstr "繼續" msgid "Cassette: %1" msgstr "磁帶: %1" +msgid "C&assette: %1" +msgstr "磁帶: %1(&A)" + msgid "Cassette images" msgstr "磁帶映像" msgid "Cartridge %1: %2" msgstr "卡帶 %1: %2" +msgid "Car&tridge %1: %2" +msgstr "卡帶 %1: %2(&A)" + msgid "Cartridge images" msgstr "卡帶映像" @@ -912,6 +1056,9 @@ msgstr "恢復執行" msgid "Pause execution" msgstr "暫停執行" +msgid "Ctrl+Alt+Del" +msgstr "Ctrl+Alt+Del" + msgid "Press Ctrl+Alt+Del" msgstr "按下 Ctrl+Alt+Del" @@ -921,9 +1068,279 @@ msgstr "按下 Ctrl+Alt+Esc" msgid "Hard reset" msgstr "硬重設" +msgid "Force shutdown" +msgstr "強制關機" + +msgid "Start" +msgstr "開始" + +msgid "Not running" +msgstr "未執行" + +msgid "Running" +msgstr "運行" + +msgid "Paused" +msgstr "已暫停" + +msgid "Waiting" +msgstr "等待" + +msgid "Powered Off" +msgstr "電源關閉" + +msgid "%n running" +msgstr "%n 運行" + +msgid "%n paused" +msgstr "%n 已暫停" + +msgid "%n waiting" +msgstr "%n 等待" + +msgid "%1 total" +msgstr "%1 總計" + +msgid "VMs: %1" +msgstr "虛擬機器:%1" + +msgid "System Directory:" +msgstr "系統目錄:" + +msgid "Choose directory" +msgstr "選擇目錄" + +msgid "Choose configuration file" +msgstr "選擇組態檔案" + +msgid "86Box configuration files (86box.cfg)" +msgstr "86Box 配置檔案 (86box.cfg)" + +msgid "Configuration read failed" +msgstr "設定讀取失敗" + +msgid "Unable to open the selected configuration file for reading: %1" +msgstr "無法開啟選取的設定檔進行讀取: %1" + +msgid "Use regular expressions in search box" +msgstr "在搜尋方塊中使用正則表達式" + +msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" +msgstr "%1 台機器目前處於活動狀態。您確定要退出虛擬機器管理員嗎?" + +msgid "Add new system wizard" +msgstr "新增系統精靈" + +msgid "Introduction" +msgstr "簡介" + +msgid "This will help you add a new system to 86Box." +msgstr "這將有助於您在 86Box 中加入新系統。" + +msgid "New configuration" +msgstr "新配置" + +msgid "Complete" +msgstr "完成" + +msgid "The wizard will now launch the configuration for the new system." +msgstr "精靈現在會啟動新系統的組態。" + +msgid "Use existing configuration" +msgstr "使用現有組態" + +msgid "Type some notes here" +msgstr "在此輸入一些備註" + +msgid "Paste the contents of the existing configuration file into the box below." +msgstr "將現有組態檔案的內容貼到下面的方塊中。" + +msgid "Load configuration from file" +msgstr "從檔案載入設定" + +msgid "System name" +msgstr "系統名稱" + +msgid "System name:" +msgstr "系統名稱:" + +msgid "System name cannot contain certain characters" +msgstr "系統名稱不能包含特定字元" + +msgid "System name already exists" +msgstr "系統名稱已存在" + +msgid "Please enter a directory for the system" +msgstr "請輸入系統目錄" + +msgid "Directory does not exist" +msgstr "目錄不存在" + +msgid "A new directory for the system will be created in the selected directory above" +msgstr "系統的新目錄將會在上述選取的目錄中建立" + +msgid "System location:" +msgstr "系統位置:" + +msgid "System name and location" +msgstr "系統名稱和位置" + +msgid "Enter the name of the system and choose the location" +msgstr "輸入系統名稱並選擇位置" + +msgid "Enter the name of the system" +msgstr "輸入系統名稱" + +msgid "Please enter a system name" +msgstr "請輸入系統名稱" + +msgid "Display name (optional):" +msgstr "顯示名稱 (可選):" + +msgid "Display name:" +msgstr "顯示名稱:" + +msgid "Set display name" +msgstr "設定顯示名稱" + +msgid "Enter the new display name (blank to reset)" +msgstr "輸入新的顯示名稱 (空白表示重設)" + +msgid "Change &display name..." +msgstr "變更顯示名稱(&D)..." + +msgid "Context Menu" +msgstr "內容選單" + +msgid "&Open folder..." +msgstr "開啟資料夾(&O)..." + +msgid "Open p&rinter tray..." +msgstr "打開印表機托盤(&R)..." + +msgid "Set &icon..." +msgstr "設定圖示(&I)..." + +msgid "Select an icon" +msgstr "選擇圖示" + +msgid "C&lone..." +msgstr "克隆(&L)..." + +msgid "Virtual machine \"%1\" (%2) will be cloned into:" +msgstr "虛擬機器 \"%1\" (%2) 將被複製到:" + +msgid "Directory %1 already exists" +msgstr "目錄 %1 已經存在" + +msgid "You cannot use the following characters in the name: %1" +msgstr "您不能在名稱中使用下列字元:%1" + +msgid "Clone" +msgstr "克隆" + +msgid "Failed to create directory for cloned VM" +msgstr "為複製的虛擬機器建立目錄失敗" + +msgid "Failed to clone VM." +msgstr "複製虛擬機器失敗。" + +msgid "Directory in use" +msgstr "使用中的目錄" + +msgid "The selected directory is already in use. Please select a different directory." +msgstr "所選目錄已被使用。請選擇其他目錄。" + +msgid "Create directory failed" +msgstr "建立目錄失敗" + +msgid "Unable to create the directory for the new system" +msgstr "無法為新系統建立目錄" + +msgid "Configuration write failed" +msgstr "設定寫入失敗" + +msgid "Unable to open the configuration file at %1 for writing" +msgstr "無法開啟 %1 的設定檔進行寫入" + +msgid "Error adding system" +msgstr "錯誤新增系統" + +msgid "Remove directory failed" +msgstr "移除目錄失敗" + +msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." +msgstr "機器目錄中的某些檔案無法刪除。請手動刪除它們。" + +msgid "Build" +msgstr "建置" + +msgid "Version" +msgstr "版本" + +msgid "An update to 86Box is available: %1 %2" +msgstr "86Box 的更新可用: %1 %2" + +msgid "An error has occurred while checking for updates: %1" +msgstr "檢查更新時發生錯誤: %1" + +msgid "An update to 86Box is available!" +msgstr "86Box 的更新可用!" + +msgid "Warning" +msgstr "警告" + +msgid "&Kill" +msgstr "強制終止(&K)" + +msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" +msgstr "強行終止虛擬機器可能會導致資料遺失。只有在 86Box 過程卡住時才執行此操作。\n\n您真的希望強制終止虛擬機器 \"%1\"?" + +msgid "&Delete" +msgstr "刪除(&D)" + +msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" +msgstr "您真的想要刪除虛擬機器 \"%1\" 及其所有檔案嗎?此操作無法撤銷!" + +msgid "Show &config file" +msgstr "顯示設定檔(&C)" + +msgid "No screenshot" +msgstr "沒有截圖" + +msgid "Search" +msgstr "搜尋" + +msgid "Searching for VMs..." +msgstr "搜尋虛擬機器..." + +msgid "Found %1" +msgstr "找到 %1" + +msgid "System" +msgstr "系統" + +msgid "Storage" +msgstr "儲存" + +msgid "Disk %1: " +msgstr "磁碟 %1: " + +msgid "No disks" +msgstr "無磁碟" + +msgid "Audio" +msgstr "音訊" + +msgid "Audio:" +msgstr "音訊:" + msgid "ACPI shutdown" msgstr "ACPI 關機" +msgid "ACP&I shutdown" +msgstr "ACP&I 關機" + msgid "Hard disk (%1)" msgstr "硬碟 (%1)" @@ -1071,6 +1488,9 @@ msgstr "ATAPI" msgid "CD-ROM %1 (%2): %3" msgstr "光碟 %1 (%2): %3" +msgid "&CD-ROM %1 (%2): %3" +msgstr "光碟 %1 (%2): %3(&C)" + msgid "160 KB" msgstr "160 KB" @@ -1209,41 +1629,38 @@ msgstr "MCA 裝置" msgid "List of MCA devices:" msgstr "MCA 裝置清單:" -msgid "Tablet tool" -msgstr "平板工具" +msgid "&Tablet tool" +msgstr "平板工具(&T)" -msgid "Qt (OpenGL &ES)" -msgstr "Qt (OpenGL &ES)" +msgid "About &Qt" +msgstr "關於 &Qt" -msgid "About Qt" -msgstr "關於 Qt" +msgid "&MCA devices..." +msgstr "&MCA 裝置..." -msgid "MCA devices..." -msgstr "MCA 裝置..." +msgid "Show non-&primary monitors" +msgstr "顯示非主要顯示器(&P)" -msgid "Show non-primary monitors" -msgstr "顯示非主要顯示器" +msgid "Open screenshots &folder..." +msgstr "開啟螢幕截圖資料夾...(&F)" -msgid "Open screenshots folder..." -msgstr "開啟螢幕截圖資料夾..." +msgid "Appl&y fullscreen stretch mode when maximized" +msgstr "最大化時套用全螢幕拉伸模式(&Y)" -msgid "Apply fullscreen stretch mode when maximized" -msgstr "最大化時套用全螢幕拉伸模式" +msgid "&Cursor/Puck" +msgstr "游標/球棒(&C)" -msgid "Cursor/Puck" -msgstr "游標/球棒" +msgid "&Pen" +msgstr "筆(&P)" -msgid "Pen" -msgstr "筆" - -msgid "Host CD/DVD Drive (%1:)" -msgstr "主機 CD/DVD 光碟機 (%1:)" +msgid "&Host CD/DVD Drive (%1:)" +msgstr "主機 CD/DVD 光碟機 (%1:) (&H)" msgid "&Connected" msgstr "已連線" -msgid "Clear image history" -msgstr "清除映像歷史記錄" +msgid "Clear image &history" +msgstr "清除映像歷史記錄(&H)" msgid "Create..." msgstr "建立..." @@ -1257,9 +1674,15 @@ msgstr "未知匯流排" msgid "Null Driver" msgstr "空驅動程式" +msgid "NIC:" +msgstr "NIC:" + msgid "NIC %1 (%2) %3" msgstr "網路卡 %1 (%2) %3" +msgid "&NIC %1 (%2) %3" +msgstr "網路卡 %1 (%2) %3(&N)" + msgid "Render behavior" msgstr "渲染行為" @@ -1323,6 +1746,9 @@ msgstr "沒有 MCA 裝置。" msgid "MiB" msgstr "MiB" +msgid "GiB" +msgstr "GiB" + msgid "Network Card #1" msgstr "網路卡 1" @@ -1365,8 +1791,26 @@ msgstr "序列埠的直通 3" msgid "Serial port passthrough 4" msgstr "序列埠的直通 4" -msgid "Renderer options..." -msgstr "渲染器選項..." +msgid "Renderer &options..." +msgstr "渲染器選項...(&O)" + +msgid "PC/XT Keyboard" +msgstr "PC/XT 鍵盤" + +msgid "AT Keyboard" +msgstr "AT 鍵盤" + +msgid "AX Keyboard" +msgstr "AX 鍵盤" + +msgid "PS/2 Keyboard" +msgstr "PS/2 鍵盤" + +msgid "PS/55 Keyboard" +msgstr "PS/55 鍵盤" + +msgid "Keys" +msgstr "鑰匙" msgid "Logitech/Microsoft Bus Mouse" msgstr "Logitech/Microsoft 匯流排滑鼠" @@ -1377,18 +1821,30 @@ msgstr "Microsoft 匯流排滑鼠 (InPort)" msgid "Mouse Systems Serial Mouse" msgstr "Mouse Systems 序列滑鼠" +msgid "Mouse Systems Bus Mouse" +msgstr "Mouse Systems 匯流排滑鼠" + msgid "Microsoft Serial Mouse" msgstr "Microsoft 序列滑鼠" +msgid "Microsoft Serial BallPoint" +msgstr "Microsoft BallPoint 序列滑鼠" + msgid "Logitech Serial Mouse" msgstr "Logitech 序列滑鼠" msgid "PS/2 Mouse" msgstr "PS/2 滑鼠" +msgid "PS/2 QuickPort Mouse" +msgstr "PS/2 QuickPort 滑鼠" + msgid "3M MicroTouch (Serial)" msgstr "3M MicroTouch (序列)" +msgid "Default Baud rate" +msgstr "預設波特率" + msgid "[COM] Standard Hayes-compliant Modem" msgstr "[COM] 標準 Hayes 相容的數據機" @@ -1413,21 +1869,81 @@ msgstr "系統的 MIDI" msgid "MIDI Input Device" msgstr "MIDI 輸入裝置" -msgid "BIOS Address" +msgid "BIOS file" +msgstr "BIOS 檔案" + +msgid "BIOS file (ROM #1)" +msgstr "BIOS 檔案 (ROM 1)" + +msgid "BIOS file (ROM #2)" +msgstr "BIOS 檔案 (ROM 2)" + +msgid "BIOS file (ROM #3)" +msgstr "BIOS 檔案 (ROM 3)" + +msgid "BIOS file (ROM #4)" +msgstr "BIOS 檔案 (ROM 4)" + +msgid "BIOS address" msgstr "BIOS 位址" +msgid "BIOS address (ROM #1)" +msgstr "BIOS 位址 (ROM 1)" + +msgid "BIOS address (ROM #2)" +msgstr "BIOS 位址 (ROM 2)" + +msgid "BIOS address (ROM #3)" +msgstr "BIOS 位址 (ROM 3)" + +msgid "BIOS address (ROM #4)" +msgstr "BIOS 位址 (ROM 4)" + msgid "Enable BIOS extension ROM Writes" msgstr "啟用 BIOS 擴充 ROM 寫入" +msgid "Enable BIOS extension ROM Writes (ROM #1)" +msgstr "啟用 BIOS 擴充 ROM 寫入 (ROM 1)" + +msgid "Enable BIOS extension ROM Writes (ROM #2)" +msgstr "啟用 BIOS 擴充 ROM 寫入 (ROM 2)" + +msgid "Enable BIOS extension ROM Writes (ROM #3)" +msgstr "啟用 BIOS 擴充 ROM 寫入 (ROM 3)" + +msgid "Enable BIOS extension ROM Writes (ROM #4)" +msgstr "啟用 BIOS 擴充 ROM 寫入 (ROM 4)" + +msgid "Linear framebuffer base" +msgstr "線性圖框緩衝記憶體的底座" + msgid "Address" msgstr "位址" msgid "IRQ" msgstr "IRQ" +msgid "Serial port IRQ" +msgstr "序列埠的 IRQ" + +msgid "Parallel port IRQ" +msgstr "平行埠的 IRQ" + msgid "BIOS Revision" msgstr "BIOS 版本" +msgid "BIOS Version" +msgstr "BIOS 版本" + +msgid "BIOS Language" +msgstr "BIOS 語言" + +msgid "IBM 5161 Expansion Unit" +msgstr "IBM 5161 擴充裝置" + +msgid "IBM Cassette Basic" +msgstr "IBM 磁帶式 BASIC" + msgid "Translate 26 -> 17" msgstr "轉換 26 -> 17" @@ -1443,6 +1959,18 @@ msgstr "反轉顏色" msgid "BIOS size" msgstr "BIOS 大小" +msgid "BIOS size (ROM #1)" +msgstr "BIOS 大小 (ROM )" + +msgid "BIOS size (ROM #2)" +msgstr "BIOS 大小 (ROM 2)" + +msgid "BIOS size (ROM #3)" +msgstr "BIOS 大小 (ROM 3)" + +msgid "BIOS size (ROM #4)" +msgstr "BIOS 大小 (ROM 4)" + msgid "Map C0000-C7FFF as UMB" msgstr "映射 C0000-C7FFF 為 UMB" @@ -1518,6 +2046,9 @@ msgstr "混響電平" msgid "Interpolation Method" msgstr "插值方法" +msgid "Dynamic Sample Loading" +msgstr "樣品的動態載入" + msgid "Reverb Output Gain" msgstr "迴響輸出增益" @@ -1605,6 +2136,12 @@ msgstr "低 DMA" msgid "Enable Game port" msgstr "啟用遊戲埠" +msgid "SID Model" +msgstr "SID 型號" + +msgid "SID Filter Strength" +msgstr "SID 過濾強度" + msgid "Surround module" msgstr "環繞聲模組" @@ -1617,6 +2154,12 @@ msgstr "在 CODEC 設定時啟動 CODEC 中斷 (某些驅動程式需要)" msgid "SB Address" msgstr "SB 位址" +msgid "Adlib Address" +msgstr "Adlib 位址" + +msgid "Use EEPROM setting" +msgstr "使用 EEPROM 中的設定" + msgid "WSS IRQ" msgstr "WSS IRQ" @@ -1701,9 +2244,15 @@ msgstr "RAMDAC 類型" msgid "Blend" msgstr "混合" +msgid "Font" +msgstr "字型" + msgid "Bilinear filtering" msgstr "雙線性濾波" +msgid "Video chroma-keying" +msgstr "視訊色鍵" + msgid "Dithering" msgstr "抖動" @@ -1746,6 +2295,33 @@ msgstr "傳輸速度" msgid "EMS mode" msgstr "EMS 模式" +msgid "EMS Address" +msgstr "EMS 位址" + +msgid "EMS 1 Address" +msgstr "EMS 1 位址" + +msgid "EMS 2 Address" +msgstr "EMS 2 位址" + +msgid "EMS Memory Size" +msgstr "EMS 記憶體大小" + +msgid "EMS 1 Memory Size" +msgstr "EMS 1 記憶體大小" + +msgid "EMS 2 Memory Size" +msgstr "EMS 2 記憶體大小" + +msgid "Enable EMS" +msgstr "啟用 EMS" + +msgid "Enable EMS 1" +msgstr "啟用 EMS 1" + +msgid "Enable EMS 2" +msgstr "啟用 EMS 2" + msgid "Address for > 2 MB" msgstr "> 2 MB 的位址" @@ -1764,11 +2340,11 @@ msgstr "永遠以所選速度運作" msgid "BIOS setting + Hotkeys (off during POST)" msgstr "BIOS 設定 + 熱鍵 (POST 期間關閉)" -msgid "64 kB starting from F0000" -msgstr "64 kB 從 F0000 開始" +msgid "64 KB starting from F0000" +msgstr "64 KB 從 F0000 開始" -msgid "128 kB starting from E0000 (address MSB inverted, last 64KB first)" -msgstr "128 kB 從 E0000 開始 (位址 MSB 反轉,後 64KB 為先)" +msgid "128 KB starting from E0000 (address MSB inverted, last 64 KB first)" +msgstr "128 KB 從 E0000 開始 (位址 MSB 反轉,後 64 KB 為先)" msgid "Sine" msgstr "正弦" @@ -1804,7 +2380,7 @@ msgid "Five + Wheel" msgstr "五鍵 + 滾輪" msgid "Five + 2 Wheels" -msgstr "" +msgstr "五鍵 + 2 滾輪" msgid "A3 - SMT2 Serial / SMT3(R)V" msgstr "A3 - SMT2 序列 / SMT3(R)V" @@ -1869,6 +2445,9 @@ msgstr "256 KB" msgid "Composite" msgstr "複合視訊" +msgid "True color" +msgstr "真實色彩" + msgid "Old" msgstr "舊" @@ -1902,6 +2481,15 @@ msgstr "sRGB 插值" msgid "Linear interpolation" msgstr "線性插補" +msgid "Has secondary 8x8 character set" +msgstr "具有輔助 8x8 字元集" + +msgid "Has Quadcolor II daughter board" +msgstr "具有 Quadcolor II 子板" + +msgid "Alternate monochrome contrast" +msgstr "交替單色對比" + msgid "128 KB" msgstr "128 KB" @@ -1935,6 +2523,9 @@ msgstr "琥珀色" msgid "Gray" msgstr "灰色" +msgid "Grayscale" +msgstr "灰階" + msgid "Color" msgstr "顏色" @@ -1950,6 +2541,12 @@ msgstr "其他語言" msgid "Bochs latest" msgstr "Bochs 最新" +msgid "Apply overscan deltas" +msgstr "套用過掃描三角區" + +msgid "Mono Interlaced" +msgstr "單色隔行扫描" + msgid "Mono Non-Interlaced" msgstr "單色非隔行掃描" @@ -1962,6 +2559,9 @@ msgstr "彩色非隔行掃描" msgid "3Dfx Voodoo Graphics" msgstr "3Dfx Voodoo 圖形" +msgid "3Dfx Voodoo 2" +msgstr "3Dfx Voodoo 2" + msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 TMU)" @@ -2031,6 +2631,9 @@ msgstr "直通的鮑率" msgid "Named Pipe (Server)" msgstr "已命名管道 (伺服器)" +msgid "Named Pipe (Client)" +msgstr "已命名管道 (用戶端)" + msgid "Host Serial Passthrough" msgstr "主機序列埠的直通" @@ -2047,28 +2650,28 @@ msgid "High performance impact" msgstr "對效能影響大" msgid "[Generic] RAM Disk (max. speed)" -msgstr "[Generic] RAM 磁碟 (最大速度)" +msgstr "[通用] RAM 磁碟 (最大速度)" msgid "[Generic] 1989 (3500 RPM)" -msgstr "" +msgstr "[通用] 1989 (3500 轉速)" msgid "[Generic] 1992 (3600 RPM)" -msgstr "" +msgstr "[通用] 1992 (3600 轉速)" msgid "[Generic] 1994 (4500 RPM)" -msgstr "" +msgstr "[通用] 1994 (4500 轉速)" msgid "[Generic] 1996 (5400 RPM)" -msgstr "" +msgstr "[通用] 1996 (5400 轉速)" msgid "[Generic] 1997 (5400 RPM)" -msgstr "" +msgstr "[通用] 1997 (5400 轉速)" msgid "[Generic] 1998 (5400 RPM)" -msgstr "" +msgstr "[通用] 1998 (5400 轉速)" msgid "[Generic] 2000 (7200 RPM)" -msgstr "" +msgstr "[通用] 2000 (7200 轉速)" msgid "IBM 8514/A clone (ISA)" msgstr "IBM 8514/A 克隆 (ISA)" @@ -2076,6 +2679,12 @@ msgstr "IBM 8514/A 克隆 (ISA)" msgid "Vendor" msgstr "製造商" +msgid "30 Hz (JMP2 = 1)" +msgstr "30 Hz (JMP2 = 1)" + +msgid "60 Hz (JMP2 = 2)" +msgstr "60 Hz (JMP2 = 2)" + msgid "Generic PC/XT Memory Expansion" msgstr "通用 PC/XT 記憶體擴充" @@ -2089,61 +2698,259 @@ msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for t msgstr "通用 ESC/P 點矩陣印表機的模擬需要 \"roms/printer/fonts\" 目錄中的 TrueType 字體。" msgid "Inhibit multimedia keys" -msgstr "" +msgstr "禁止多媒體按鍵" msgid "Ask for confirmation before saving settings" -msgstr "" +msgstr "儲存設定前要求確認" msgid "Ask for confirmation before hard resetting" -msgstr "" +msgstr "硬體重設前要求確認" msgid "Ask for confirmation before quitting" -msgstr "" +msgstr "退出前請先確認" msgid "Options" -msgstr "" +msgstr "選項" msgid "Model" -msgstr "" +msgstr "型號" msgid "Model:" -msgstr "" +msgstr "型號:" msgid "Failed to initialize Vulkan renderer." -msgstr "" +msgstr "初始化 Vulkan 渲染器失敗。" msgid "GLSL Error" -msgstr "" +msgstr "GLSL 錯誤" msgid "Could not load shader: %1" -msgstr "" +msgstr "無法載入著色器: %1" msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" -msgstr "" +msgstr "需要 OpenGL 版本 3.0 或更高。目前的 GLSL 版本為 %1.%2" msgid "Could not load texture: %1" -msgstr "" +msgstr "無法載入材質: %1" msgid "Could not compile shader:\n\n%1" -msgstr "" +msgstr "無法編譯著色器:\n\n%1" msgid "Program not linked:\n\n%1" -msgstr "" +msgstr "程式未連結:\n\n%1" msgid "Shader Manager" -msgstr "" +msgstr "著色器管理員" msgid "Shader Configuration" -msgstr "" +msgstr "著色器組態" msgid "Add" -msgstr "" +msgstr "新增" msgid "Move up" -msgstr "" +msgstr "上移" msgid "Move down" -msgstr "" +msgstr "下移" msgid "Could not load file %1" -msgstr "" +msgstr "無法載入檔案 %1" + +msgid "Key Bindings:" +msgstr "按鍵綁定:" + +msgid "Action" +msgstr "行動" + +msgid "Keybind" +msgstr "鍵盤綁定" + +msgid "Clear binding" +msgstr "透明裝訂" + +msgid "Bind" +msgstr "綁定" + +msgid "Bind Key" +msgstr "綁定按鍵" + +msgid "Enter key combo:" +msgstr "輸入組合鍵:" + +msgid "Bind conflict" +msgstr "綁定衝突" + +msgid "This key combo is already in use." +msgstr "此組合鍵已在使用中。" + +msgid "Send Control+Alt+Del" +msgstr "傳送 Control+Alt+Del" + +msgid "Send Control+Alt+Escape" +msgstr "傳送 Control+Alt+Escape" + +msgid "Toggle fullscreen" +msgstr "切換全螢幕" + +msgid "Screenshot" +msgstr "螢幕截圖" + +msgid "Release mouse pointer" +msgstr "放開滑鼠游標" + +msgid "Toggle pause" +msgstr "切換暫停" + +msgid "Toggle mute" +msgstr "切換靜音" + +msgid "Text files" +msgstr "文字檔案" + +msgid "ROM files" +msgstr "ROM 檔案" + +msgid "SoundFont files" +msgstr "SoundFont 檔案" + +msgid "Local Switch" +msgstr "本地交換器" + +msgid "Remote Switch" +msgstr "遙控交換器" + +msgid "Switch:" +msgstr "交換器:" + +msgid "Hub Mode" +msgstr "集線器模式" + +msgid "Hostname:" +msgstr "主機名稱:" + +msgid "ISA RAM:" +msgstr "ISA RAM:" + +msgid "ISA ROM:" +msgstr "ISA ROM:" + +msgid "&Wipe NVRAM" +msgstr "清除(&W) NVRAM" + +msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" +msgstr "這將刪除位於 (\"nvr\" 子目錄中的) 虛擬機器的所有 NVRAM (和相關) 檔案。如果適用的話,您必須重新設定 BIOS (可能還有虛擬機器內的其他裝置) 設定。\n\n您確定要清除虛擬機 \"%1\" 的所有 NVRAM 內容嗎?" + +msgid "Success" +msgstr "成功" + +msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" +msgstr "成功清除虛擬機 \"%1\" 的 NVRAM 內容" + +msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" +msgstr "嘗試清除虛擬機 \"%1\" 的 NVRAM 內容時發生錯誤" + +msgid "%1 VM Manager" +msgstr "%1 虛擬機器管理員" + +msgid "%n disk(s)" +msgstr "%n 磁碟" + +msgid "Unknown Status" +msgstr "狀態不明" + +msgid "No Machines Found!" +msgstr "找不到機器!" + +msgid "Check for updates on startup" +msgstr "啟動時檢查更新" + +msgid "Unable to determine release information" +msgstr "無法確定釋放資訊" + +msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." +msgstr "檢查更新時出錯:\n'\n%1\n\n請稍後再試。" + +msgid "Update check complete" +msgstr "更新檢查完成" + +msgid "stable" +msgstr "穩定" + +msgid "beta" +msgstr "測試版" + +msgid "You are running the latest %1 version of 86Box: %2" +msgstr "您正在執行 86Box 的最新 %1 版本: %2" + +msgid "version" +msgstr "版本" + +msgid "build" +msgstr "建置" + +msgid "You are currently running version %1." +msgstr "您目前執行的是 %1 版本。" + +msgid "Version %1 is now available." +msgstr "版本 %1 現在可用。" + +msgid "You are currently running build %1." +msgstr "您目前執行的是 %1 建置。" + +msgid "Build %1 is now available." +msgstr "建置 %1 現在可用。" + +msgid "Would you like to visit the download page?" +msgstr "您要造訪下載頁面嗎?" + +msgid "Visit download page" +msgstr "造訪下載頁面" + +msgid "Update check" +msgstr "更新檢查" + +msgid "Checking for updates..." +msgstr "檢查更新..." + +msgid "86Box Update" +msgstr "86Box 更新" + +msgid "Release notes:" +msgstr "發佈說明:" + +msgid "%1 Hz" +msgstr "%1 Hz" + +msgid "Virtual machine crash" +msgstr "虛擬機當機" + +msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." +msgstr "虛擬機 \"%1\" 的進程以退出代碼 %2 意外終止。" + +msgid "The system will not be added." +msgstr "系統將不會新增。" + +msgid "&Update mouse every CPU frame" +msgstr "每 CPU 幀更新滑鼠(&U)" + +msgid "Hue" +msgstr "色調" + +msgid "Saturation" +msgstr "飽和度" + +msgid "Contrast" +msgstr "對比" + +msgid "Brightness" +msgstr "亮度" + +msgid "Sharpness" +msgstr "銳利度" + +msgid "&CGA composite settings..." +msgstr "CGA 複合模式的設定...(&C)" + +msgid "CGA composite settings" +msgstr "CGA 複合模式的設定" diff --git a/src/qt/qt_about.cpp b/src/qt/qt_about.cpp new file mode 100644 index 000000000..6c34c2add --- /dev/null +++ b/src/qt/qt_about.cpp @@ -0,0 +1,75 @@ +/* + * 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. + * + * About dialog module. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * Teemu Korhonen + * dob205 + * + * Copyright 2021 Joakim L. Gilje + * Copyright 2021-2022 Cacodemon345 + * Copyright 2021-2022 Teemu Korhonen + * Copyright 2022 dob205 + */ +#include "qt_about.hpp" + +extern "C" { +#include <86box/86box.h> +#include <86box/version.h> +} + +#include +#include +#include +#include +#include + +About::About(QWidget *parent) +{ + setTextFormat(Qt::RichText); + QString versioninfo; +#ifdef EMU_GIT_HASH + versioninfo = QString(" [%1]").arg(EMU_GIT_HASH); +#endif +#ifdef USE_DYNAREC +# ifdef USE_NEW_DYNAREC +# define DYNAREC_STR "new dynarec" +# else +# define DYNAREC_STR "old dynarec" +# endif +#else +# define DYNAREC_STR "no dynarec" +#endif + versioninfo.append(QString(" [%1, %2]").arg(QSysInfo::buildCpuArchitecture(), tr(DYNAREC_STR))); + setText(QString("%3%1%2").arg(EMU_VERSION_FULL, versioninfo, tr("86Box v"))); + setInformativeText(tr("An emulator of old computers\n\nAuthors: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n\nWith previous core contributions from Sarah Walker, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information.").replace("\n", "
")); + setWindowTitle(tr("About 86Box")); + const auto closeButton = addButton("OK", QMessageBox::ButtonRole::AcceptRole); + setEscapeButton(closeButton); + const auto webSiteButton = addButton(EMU_SITE, QMessageBox::ButtonRole::HelpRole); + webSiteButton->connect(webSiteButton, &QPushButton::released, []() { + QDesktopServices::openUrl(QUrl("https://" EMU_SITE)); + }); +#ifdef RELEASE_BUILD + setIconPixmap(QIcon(":/settings/qt/icons/86Box-green.ico").pixmap(32, 32)); +#elif defined ALPHA_BUILD + setIconPixmap(QIcon(":/settings/qt/icons/86Box-red.ico").pixmap(32, 32)); +#elif defined BETA_BUILD + setIconPixmap(QIcon(":/settings/qt/icons/86Box-yellow.ico").pixmap(32, 32)); +#else + setIconPixmap(QIcon(":/settings/qt/icons/86Box-gray.ico").pixmap(32, 32)); +#endif + setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); +} + +About::~About() + = default; diff --git a/src/qt/qt_about.hpp b/src/qt/qt_about.hpp new file mode 100644 index 000000000..206aab37b --- /dev/null +++ b/src/qt/qt_about.hpp @@ -0,0 +1,13 @@ +#ifndef QT_ABOUT_HPP +#define QT_ABOUT_HPP + +#include + +class About final : public QMessageBox { + Q_OBJECT + +public: + explicit About(QWidget *parent = nullptr); + ~About() override; +}; +#endif // QT_ABOUT_HPP \ No newline at end of file diff --git a/src/qt/qt_cgasettingsdialog.cpp b/src/qt/qt_cgasettingsdialog.cpp new file mode 100644 index 000000000..ee9aa86b6 --- /dev/null +++ b/src/qt/qt_cgasettingsdialog.cpp @@ -0,0 +1,94 @@ +#include "qt_cgasettingsdialog.hpp" +#include "ui_qt_cgasettingsdialog.h" + +#include + +extern "C" +{ +#include <86box/86box.h> +#include <86box/plat.h> +#include <86box/vid_cga_comp.h> +} + +CGASettingsDialog::CGASettingsDialog(QWidget *parent) + : QDialog(parent) + , ui(new Ui::CGASettingsDialog) +{ + ui->setupUi(this); + + cga_hue = vid_cga_comp_hue; + cga_saturation = vid_cga_comp_saturation; + cga_brightness = vid_cga_comp_brightness; + cga_contrast = vid_cga_comp_contrast; + cga_sharpness = vid_cga_comp_sharpness; + + ui->horizontalSliderHue->setValue(vid_cga_comp_hue); + ui->horizontalSliderSaturation->setValue(vid_cga_comp_saturation); + ui->horizontalSliderBrightness->setValue(vid_cga_comp_brightness); + ui->horizontalSliderContrast->setValue(vid_cga_comp_contrast); + ui->horizontalSliderSharpness->setValue(vid_cga_comp_sharpness); + + connect(ui->buttonBox->button(QDialogButtonBox::Apply), &QPushButton::clicked, this, &CGASettingsDialog::applySettings); + connect(ui->buttonBox->button(QDialogButtonBox::Reset), &QPushButton::clicked, this, [this] + { + ui->horizontalSliderHue->setValue(0); + ui->horizontalSliderSaturation->setValue(100); + ui->horizontalSliderBrightness->setValue(0); + ui->horizontalSliderContrast->setValue(100); + ui->horizontalSliderSharpness->setValue(0); + }); + + connect(ui->horizontalSliderHue, &QSlider::valueChanged, this, [this] { updateDisplay(); } ); + connect(ui->horizontalSliderSaturation, &QSlider::valueChanged, this, [this] { updateDisplay(); } ); + connect(ui->horizontalSliderBrightness, &QSlider::valueChanged, this, [this] { updateDisplay(); } ); + connect(ui->horizontalSliderContrast, &QSlider::valueChanged, this, [this] { updateDisplay(); } ); + connect(ui->horizontalSliderSharpness, &QSlider::valueChanged, this, [this] { updateDisplay(); } ); +} + +CGASettingsDialog::~CGASettingsDialog() +{ + delete ui; +} + +void CGASettingsDialog::updateDisplay() +{ + auto temp_cga_comp_hue = ui->horizontalSliderHue->value(); + auto temp_cga_comp_saturation = ui->horizontalSliderSaturation->value(); + auto temp_cga_comp_brightness = ui->horizontalSliderBrightness->value(); + auto temp_cga_comp_contrast = ui->horizontalSliderContrast->value(); + auto temp_cga_comp_sharpness = ui->horizontalSliderSharpness->value(); + cga_comp_reload(temp_cga_comp_brightness, temp_cga_comp_saturation, temp_cga_comp_sharpness, temp_cga_comp_hue, temp_cga_comp_contrast); +} + +void CGASettingsDialog::applySettings() +{ + vid_cga_comp_hue = ui->horizontalSliderHue->value(); + vid_cga_comp_saturation = ui->horizontalSliderSaturation->value(); + vid_cga_comp_brightness = ui->horizontalSliderBrightness->value(); + vid_cga_comp_contrast = ui->horizontalSliderContrast->value(); + vid_cga_comp_sharpness = ui->horizontalSliderSharpness->value(); + cga_comp_reload(vid_cga_comp_brightness, vid_cga_comp_saturation, vid_cga_comp_sharpness, vid_cga_comp_hue, vid_cga_comp_contrast); + + cga_hue = vid_cga_comp_hue; + cga_saturation = vid_cga_comp_saturation; + cga_brightness = vid_cga_comp_brightness; + cga_contrast = vid_cga_comp_contrast; + cga_sharpness = vid_cga_comp_sharpness; +} + +void CGASettingsDialog::on_buttonBox_accepted() +{ + applySettings(); +} + +void CGASettingsDialog::on_buttonBox_rejected() +{ + vid_cga_comp_hue = cga_hue; + vid_cga_comp_saturation = cga_saturation; + vid_cga_comp_brightness = cga_brightness; + vid_cga_comp_contrast = cga_contrast; + vid_cga_comp_sharpness = cga_sharpness; + + cga_comp_reload(vid_cga_comp_brightness, vid_cga_comp_saturation, vid_cga_comp_sharpness, vid_cga_comp_hue, vid_cga_comp_contrast); +} + diff --git a/src/qt/qt_cgasettingsdialog.hpp b/src/qt/qt_cgasettingsdialog.hpp new file mode 100644 index 000000000..e0a4e76d1 --- /dev/null +++ b/src/qt/qt_cgasettingsdialog.hpp @@ -0,0 +1,31 @@ +#ifndef QT_CGASETTINGSDIALOG_HPP +#define QT_CGASETTINGSDIALOG_HPP + +#include + +namespace Ui { +class CGASettingsDialog; +} + +class CGASettingsDialog : public QDialog { + Q_OBJECT + +public: + explicit CGASettingsDialog(QWidget *parent = nullptr); + ~CGASettingsDialog(); + +private slots: + void on_buttonBox_accepted(); + + void on_buttonBox_rejected(); + +private: + Ui::CGASettingsDialog *ui; + + void applySettings(); + void updateDisplay(); + + int cga_hue, cga_saturation, cga_sharpness, cga_brightness, cga_contrast; +}; + +#endif // QT_CGASETTINGSDIALOG_HPP diff --git a/src/qt/qt_cgasettingsdialog.ui b/src/qt/qt_cgasettingsdialog.ui new file mode 100644 index 000000000..7367b2099 --- /dev/null +++ b/src/qt/qt_cgasettingsdialog.ui @@ -0,0 +1,167 @@ + + + CGASettingsDialog + + + + 0 + 0 + 400 + 300 + + + + CGA composite settings + + + + QLayout::SizeConstraint::SetFixedSize + + + + + -100 + + + 100 + + + Qt::Orientation::Horizontal + + + + + + + 360 + + + 100 + + + Qt::Orientation::Horizontal + + + + + + + Hue + + + + + + + -50 + + + 50 + + + Qt::Orientation::Horizontal + + + + + + + Qt::Orientation::Horizontal + + + QDialogButtonBox::StandardButton::Apply|QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok|QDialogButtonBox::StandardButton::Reset + + + + + + + 360 + + + 100 + + + Qt::Orientation::Horizontal + + + + + + + Contrast + + + + + + + -360 + + + 360 + + + Qt::Orientation::Horizontal + + + + + + + Sharpness + + + + + + + Saturation + + + + + + + Brightness + + + + + + + + + buttonBox + accepted() + CGASettingsDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + CGASettingsDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/src/qt/qt_deviceconfig.cpp b/src/qt/qt_deviceconfig.cpp index 255b3c39f..33572c99c 100644 --- a/src/qt/qt_deviceconfig.cpp +++ b/src/qt/qt_deviceconfig.cpp @@ -282,20 +282,30 @@ DeviceConfig::ProcessConfig(void *dc, const void *c, const bool is_dep) fileField->setObjectName(config->name); fileField->setFileName(selected); /* Get the actually used part of the filter */ +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) QString filter = QString(config->file_filter).left(static_cast(strcspn(config->file_filter, "|"))); +#else + QString filter = QString(config->file_filter).split("|").at(0); +#endif /* Extract the description and the extension list */ QRegularExpressionMatch match = QRegularExpression("(.+) \\((.+)\\)$").match(filter); QString description = match.captured(1); QString extensions = match.captured(2); - QStringList extensionList; /* Split the extension list up and strip the filename globs */ QRegularExpression re("\\*\\.(.*)"); +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + QStringList extensionList; int i = 0; while (extensions.section(' ', i, i) != "") { QString extension = re.match(extensions.section(' ', i, i)).captured(1); extensionList.append(extension); i++; } +#else + QStringList extensionList = extensions.split(" "); + for (int i = 0; i < extensionList.count(); i++) + extensionList[i] = re.match(extensionList[i]).captured(1); +#endif fileField->setFilter(tr(description.toUtf8().constData()) % util::DlgFilter(extensionList) % tr("All files") % util::DlgFilter({ "*" }, true)); this->ui->formLayout->addRow(tr(config->description), fileField); break; diff --git a/src/qt/qt_downloader.cpp b/src/qt/qt_downloader.cpp index 329aeeafb..49f8a2e55 100644 --- a/src/qt/qt_downloader.cpp +++ b/src/qt/qt_downloader.cpp @@ -31,7 +31,11 @@ Downloader(const DownloadLocation downloadLocation, QObject *parent) : QObject(parent) , file(nullptr) , reply(nullptr) +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + , variantData(QMetaType(QMetaType::UnknownType)) +#else , variantData(QVariant::Invalid) +#endif { char PATHBUF[256]; switch (downloadLocation) { diff --git a/src/qt/qt_glsl_parser.cpp b/src/qt/qt_glsl_parser.cpp index 934dd2052..0bd35ca25 100644 --- a/src/qt/qt_glsl_parser.cpp +++ b/src/qt/qt_glsl_parser.cpp @@ -237,7 +237,7 @@ glslp_t *glslp_parse(const char *f) { int j; int len; int sublen; - char s[513], t[513], z[540]; + char s[2049], t[2049], z[2076]; memset(s, 0, sizeof(s)); if (endswith(f, ".glsl")) diff --git a/src/qt/qt_harddiskdialog.ui b/src/qt/qt_harddiskdialog.ui index cba835134..e2dea0220 100644 --- a/src/qt/qt_harddiskdialog.ui +++ b/src/qt/qt_harddiskdialog.ui @@ -32,87 +32,24 @@ Dialog - - - - false - - - 0 - - - true - - - - - + + - Sectors: - - - - - - - Image Format: - - - - - - - 30 - - - - - - - Bus: + File name: - - + + - Type: + Cylinders: - - - - - 0 - 0 - - - - - 64 - 16777215 - - - - 32767 - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - + @@ -128,58 +65,14 @@ - + Heads: - - - - - 0 - 0 - - - - - 64 - 16777215 - - - - - - - - 30 - - - - - - - Cylinders: - - - - - - - File name: - - - - - - - Size (MB): - - - - + @@ -198,28 +91,153 @@ - - + + - Channel: + Sectors: - + + + + + 0 + 0 + + + + + 64 + 16777215 + + + + 32767 + + + + + + + Size (MB): + + + + + + + + 0 + 0 + + + + + 64 + 16777215 + + + + + + + + Type: + + + + 30 - + + + + Bus: + + + + + + + 30 + + + + + + + Channel: + + + + + + + 30 + + + + + + + Model: + + + + + + + 30 + + + + + + + Image Format: + + + + + + + 30 + + + + Block Size: - + + + + 30 + + + + + + + false + + + 0 + + + true + + + + Qt::Vertical @@ -232,31 +250,13 @@ - - - - Model: + + + + Qt::Horizontal - - - - - - 30 - - - - - - - 30 - - - - - - - 30 + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok @@ -270,17 +270,6 @@ 1 - - lineEditCylinders - lineEditHeads - lineEditSectors - lineEditSize - comboBoxType - comboBoxBus - comboBoxChannel - comboBoxFormat - comboBoxBlockSize - diff --git a/src/qt/qt_harddrive_common.cpp b/src/qt/qt_harddrive_common.cpp index 52ae10a98..b0c8e0ea9 100644 --- a/src/qt/qt_harddrive_common.cpp +++ b/src/qt/qt_harddrive_common.cpp @@ -32,6 +32,7 @@ Harddrives::populateBuses(QAbstractItemModel *model) { model->removeRows(0, model->rowCount()); model->insertRows(0, 6); + model->setData(model->index(0, 0), "MFM/RLL"); model->setData(model->index(1, 0), "XTA"); model->setData(model->index(2, 0), "ESDI"); @@ -48,19 +49,23 @@ Harddrives::populateBuses(QAbstractItemModel *model) } void -Harddrives::populateRemovableBuses(QAbstractItemModel *model) +Harddrives::populateCDROMBuses(QAbstractItemModel *model) { model->removeRows(0, model->rowCount()); #ifdef USE_CDROM_MITSUMI - model->insertRows(0, 4); + model->insertRows(0, 5); #else - model->insertRows(0, 3); + model->insertRows(0, 4); #endif + model->setData(model->index(0, 0), QObject::tr("Disabled")); model->setData(model->index(1, 0), QObject::tr("ATAPI")); model->setData(model->index(2, 0), QObject::tr("SCSI")); #ifdef USE_CDROM_MITSUMI model->setData(model->index(3, 0), QObject::tr("Mitsumi")); + model->setData(model->index(4, 0), QObject::tr("Panasonic/MKE")); +#else + model->setData(model->index(3, 0), QObject::tr("Panasonic/MKE")); #endif model->setData(model->index(0, 0), HDD_BUS_DISABLED, Qt::UserRole); @@ -68,9 +73,27 @@ Harddrives::populateRemovableBuses(QAbstractItemModel *model) model->setData(model->index(2, 0), HDD_BUS_SCSI, Qt::UserRole); #ifdef USE_CDROM_MITSUMI model->setData(model->index(3, 0), CDROM_BUS_MITSUMI, Qt::UserRole); + model->setData(model->index(4, 0), CDROM_BUS_MKE, Qt::UserRole); +#else + model->setData(model->index(3, 0), CDROM_BUS_MKE, Qt::UserRole); #endif } +void +Harddrives::populateRemovableBuses(QAbstractItemModel *model) +{ + model->removeRows(0, model->rowCount()); + model->insertRows(0, 3); + + model->setData(model->index(0, 0), QObject::tr("Disabled")); + model->setData(model->index(1, 0), QObject::tr("ATAPI")); + model->setData(model->index(2, 0), QObject::tr("SCSI")); + + model->setData(model->index(0, 0), HDD_BUS_DISABLED, Qt::UserRole); + model->setData(model->index(1, 0), HDD_BUS_ATAPI, Qt::UserRole); + model->setData(model->index(2, 0), HDD_BUS_SCSI, Qt::UserRole); +} + void Harddrives::populateSpeeds(QAbstractItemModel *model, int bus) { @@ -138,6 +161,12 @@ Harddrives::populateBusChannels(QAbstractItemModel *model, int bus, SettingsBusT subChannelWidth = 2; busesToCheck.append(HDD_BUS_SCSI); break; + case CDROM_BUS_MKE: + shifter = 2; + orer = 3; + busRows = 4; + busesToCheck.append(CDROM_BUS_MKE); + break; default: break; } @@ -186,9 +215,12 @@ Harddrives::BusChannelName(uint8_t bus, uint8_t channel) case HDD_BUS_SCSI: busName = QString("SCSI (%1:%2)").arg(channel >> 4).arg(channel & 15, 2, 10, QChar('0')); break; - case CDROM_BUS_MITSUMI: - busName = QString("Mitsumi"); - break; + case CDROM_BUS_MITSUMI: + busName = QString("Mitsumi"); + break; + case CDROM_BUS_MKE: + busName = QString("Panasonic/MKE (%1:%2)").arg(channel >> 2).arg(channel & 3); + break; } return busName; diff --git a/src/qt/qt_harddrive_common.hpp b/src/qt/qt_harddrive_common.hpp index 28189f328..f989711f2 100644 --- a/src/qt/qt_harddrive_common.hpp +++ b/src/qt/qt_harddrive_common.hpp @@ -9,6 +9,7 @@ class SettingsBusTracking; namespace Harddrives { void populateBuses(QAbstractItemModel *model); +void populateCDROMBuses(QAbstractItemModel *model); void populateRemovableBuses(QAbstractItemModel *model); void populateBusChannels(QAbstractItemModel *model, int bus, SettingsBusTracking *sbt = nullptr); void populateSpeeds(QAbstractItemModel *model, int bus); diff --git a/src/qt/qt_iconindicators.cpp b/src/qt/qt_iconindicators.cpp index d5d22c78d..169910b21 100644 --- a/src/qt/qt_iconindicators.cpp +++ b/src/qt/qt_iconindicators.cpp @@ -12,6 +12,16 @@ getIndicatorIcon(IconIndicator indicator) return QIcon(":/settings/qt/icons/write_active.ico"); case Disabled: return QIcon(":/settings/qt/icons/disabled.ico"); + case WriteProtected: + return QIcon(":/settings/qt/icons/write_protected.ico"); + case New: + return QIcon(":/settings/qt/icons/new.ico"); + case Browse: + return QIcon(":/settings/qt/icons/browse.ico"); + case Eject: + return QIcon(":/settings/qt/icons/eject.ico"); + case Export: + return QIcon(":/settings/qt/icons/eject.ico"); default: return QIcon(); } @@ -26,14 +36,20 @@ getIconWithIndicator(const QIcon &icon, const QSize &size, QIcon::Mode iconMode, return iconPixmap; auto painter = QPainter(&iconPixmap); - auto indicatorPixmap = getIndicatorIcon(indicator == ReadWriteActive ? Active : indicator).pixmap(size); + auto indicatorPixmap = getIndicatorIcon((indicator == ReadWriteActive || indicator == WriteProtectedActive) ? Active : indicator).pixmap(size); + + if (indicator == WriteProtectedBrowse) + indicatorPixmap = getIndicatorIcon(WriteProtected).pixmap(size); painter.drawPixmap(0, 0, indicatorPixmap); - if (indicator == ReadWriteActive) { - auto writeIndicatorPixmap = getIndicatorIcon(WriteActive).pixmap(size); + if ((indicator == ReadWriteActive) || (indicator == WriteProtectedActive)) { + auto writeIndicatorPixmap = getIndicatorIcon(indicator == WriteProtectedActive ? WriteProtected : WriteActive).pixmap(size); painter.drawPixmap(0, 0, writeIndicatorPixmap); + } else if (indicator == WriteProtectedBrowse) { + auto browseIndicatorPixmap = getIndicatorIcon(Browse).pixmap(size); + painter.drawPixmap(0, 0, browseIndicatorPixmap); } painter.end(); return iconPixmap; -} \ No newline at end of file +} diff --git a/src/qt/qt_iconindicators.hpp b/src/qt/qt_iconindicators.hpp index 12f82f259..c3c8946ad 100644 --- a/src/qt/qt_iconindicators.hpp +++ b/src/qt/qt_iconindicators.hpp @@ -10,6 +10,13 @@ enum IconIndicator { WriteActive, ReadWriteActive, Disabled, + WriteProtected, + WriteProtectedActive, + New, + Browse, + WriteProtectedBrowse, + Export, + Eject }; QPixmap getIconWithIndicator(const QIcon &icon, const QSize &size, QIcon::Mode iconMode, IconIndicator indicator); diff --git a/src/qt/qt_joystickconfiguration.cpp b/src/qt/qt_joystickconfiguration.cpp index 62a9302d1..2d8910f4a 100644 --- a/src/qt/qt_joystickconfiguration.cpp +++ b/src/qt/qt_joystickconfiguration.cpp @@ -27,10 +27,11 @@ extern "C" { #include #include "qt_models_common.hpp" -JoystickConfiguration::JoystickConfiguration(int type, int joystick_nr, QWidget *parent) +JoystickConfiguration::JoystickConfiguration(int type, uint8_t gameport_nr, int joystick_nr, QWidget *parent) : QDialog(parent) , ui(new Ui::JoystickConfiguration) , type(type) + , gameport_nr(gameport_nr) , joystick_nr(joystick_nr) { ui->setupUi(this); @@ -41,7 +42,7 @@ JoystickConfiguration::JoystickConfiguration(int type, int joystick_nr, QWidget Models::AddEntry(model, plat_joystick_state[c].name, c + 1); } - ui->comboBoxDevice->setCurrentIndex(joystick_state[0][joystick_nr].plat_joystick_nr); + ui->comboBoxDevice->setCurrentIndex(joystick_state[gameport_nr][joystick_nr].plat_joystick_nr); layout()->setSizeConstraint(QLayout::SetFixedSize); } @@ -119,7 +120,7 @@ JoystickConfiguration::on_comboBoxDevice_currentIndexChanged(int index) } int nr_axes = plat_joystick_state[joystick].nr_axes; - int mapping = joystick_state[0][joystick_nr].axis_mapping[c]; + int mapping = joystick_state[gameport_nr][joystick_nr].axis_mapping[c]; if (mapping & POV_X) cbox->setCurrentIndex(nr_axes + (mapping & 3) * 2); else if (mapping & POV_Y) @@ -147,7 +148,7 @@ JoystickConfiguration::on_comboBoxDevice_currentIndexChanged(int index) Models::AddEntry(model, plat_joystick_state[joystick].button[d].name, 0); } - cbox->setCurrentIndex(joystick_state[0][joystick_nr].button_mapping[c]); + cbox->setCurrentIndex(joystick_state[gameport_nr][joystick_nr].button_mapping[c]); ui->ct->addWidget(label, row, 0); ui->ct->addWidget(cbox, row, 1); @@ -179,7 +180,7 @@ JoystickConfiguration::on_comboBoxDevice_currentIndexChanged(int index) Models::AddEntry(model, plat_joystick_state[joystick].axis[d].name, 0); } - int mapping = joystick_state[0][joystick_nr].pov_mapping[c / 2][c & 1]; + int mapping = joystick_state[gameport_nr][joystick_nr].pov_mapping[c / 2][c & 1]; int nr_povs = plat_joystick_state[joystick].nr_povs; if (mapping & POV_X) cbox->setCurrentIndex((mapping & 3) * 2); diff --git a/src/qt/qt_joystickconfiguration.hpp b/src/qt/qt_joystickconfiguration.hpp index 0b185ad73..bff38992a 100644 --- a/src/qt/qt_joystickconfiguration.hpp +++ b/src/qt/qt_joystickconfiguration.hpp @@ -11,7 +11,7 @@ class JoystickConfiguration : public QDialog { Q_OBJECT public: - explicit JoystickConfiguration(int type, int joystick_nr, QWidget *parent = nullptr); + explicit JoystickConfiguration(int type, uint8_t gameport_nr, int joystick_nr, QWidget *parent = nullptr); ~JoystickConfiguration(); int selectedDevice(); @@ -25,6 +25,7 @@ private: Ui::JoystickConfiguration *ui; QList widgets; int type; + int gameport_nr; int joystick_nr; }; diff --git a/src/qt/qt_keybind.ui b/src/qt/qt_keybind.ui index 835e12020..7bd8a8a62 100644 --- a/src/qt/qt_keybind.ui +++ b/src/qt/qt_keybind.ui @@ -22,7 +22,7 @@ Enter key combo: - Qt::AlignmentFlag::AlignCenter + Qt::AlignCenter @@ -31,17 +31,17 @@ - Qt::Orientation::Horizontal + Qt::Horizontal - Qt::Orientation::Horizontal + Qt::Horizontal - QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok + QDialogButtonBox::Cancel|QDialogButtonBox::Ok diff --git a/src/qt/qt_machinestatus.cpp b/src/qt/qt_machinestatus.cpp index db32569f3..6ff25d60f 100644 --- a/src/qt/qt_machinestatus.cpp +++ b/src/qt/qt_machinestatus.cpp @@ -31,7 +31,7 @@ extern "C" { #include <86box/hdc.h> #include <86box/scsi.h> #include <86box/scsi_device.h> -#include <86box/zip.h> +#include <86box/rdisk.h> #include <86box/mo.h> #include <86box/plat.h> #include <86box/machine.h> @@ -91,6 +91,8 @@ struct PixmapSetEmptyActive { QPixmap read_write_active; QPixmap empty_write_active; QPixmap empty_read_write_active; + QPixmap wp; + QPixmap wp_active; void load(const QIcon &icon); }; struct Pixmaps { @@ -100,7 +102,7 @@ struct Pixmaps { PixmapSetEmptyActive floppy_525; PixmapSetEmptyActive floppy_35; PixmapSetEmptyActive cdrom; - PixmapSetEmptyActive zip; + PixmapSetEmptyActive rdisk; PixmapSetEmptyActive mo; PixmapSetActive hd; PixmapSetEmptyActive net; @@ -168,6 +170,7 @@ struct StateEmptyActive { bool empty = false; bool active = false; bool write_active = false; + bool wp = false; void setActive(bool b) { @@ -193,6 +196,14 @@ struct StateEmptyActive { empty = b; refresh(); } + void setWriteProtected(bool b) + { + if (!label || b == wp) + return; + + wp = b; + refresh(); + } void refresh() { if (!label) @@ -203,7 +214,9 @@ struct StateEmptyActive { else label->setPixmap(write_active ? pixmaps->empty_write_active : (active ? pixmaps->empty_active : pixmaps->empty)); } else { - if (active && write_active) + if (wp) + label->setPixmap(active ? pixmaps->wp_active : pixmaps->wp); + else if (active && write_active) label->setPixmap(pixmaps->read_write_active); else label->setPixmap(write_active ? pixmaps->write_active : (active ? pixmaps->active : pixmaps->normal)); @@ -241,6 +254,8 @@ void PixmapSetEmptyActive::load(const QIcon &icon) { normal = getIconWithIndicator(icon, pixmap_size, QIcon::Normal, None); + wp = getIconWithIndicator(icon, pixmap_size, QIcon::Normal, WriteProtected); + wp_active = getIconWithIndicator(icon, pixmap_size, QIcon::Normal, WriteProtectedActive); active = getIconWithIndicator(icon, pixmap_size, QIcon::Normal, Active); write_active = getIconWithIndicator(icon, pixmap_size, QIcon::Normal, WriteActive); read_write_active = getIconWithIndicator(icon, pixmap_size, QIcon::Normal, ReadWriteActive); @@ -268,7 +283,7 @@ struct MachineStatus::States { pixmaps.floppy_525.load(QIcon(":/settings/qt/icons/floppy_525.ico")); pixmaps.floppy_35.load(QIcon(":/settings/qt/icons/floppy_35.ico")); pixmaps.cdrom.load(QIcon(":/settings/qt/icons/cdrom.ico")); - pixmaps.zip.load(QIcon(":/settings/qt/icons/zip.ico")); + pixmaps.rdisk.load(QIcon(":/settings/qt/icons/rdisk.ico")); pixmaps.mo.load(QIcon(":/settings/qt/icons/mo.ico")); pixmaps.hd.load(QIcon(":/settings/qt/icons/hard_disk.ico")); pixmaps.net.load(QIcon(":/settings/qt/icons/network.ico")); @@ -283,8 +298,8 @@ struct MachineStatus::States { for (auto &c : cdrom) { c.pixmaps = &pixmaps.cdrom; } - for (auto &z : zip) { - z.pixmaps = &pixmaps.zip; + for (auto &z : rdisk) { + z.pixmaps = &pixmaps.rdisk; } for (auto &m : mo) { m.pixmaps = &pixmaps.mo; @@ -301,7 +316,7 @@ struct MachineStatus::States { StateEmptyActive cassette; std::array fdd; std::array cdrom; - std::array zip; + std::array rdisk; std::array mo; std::array hdds; std::array net; @@ -373,7 +388,7 @@ MachineStatus::iterateCDROM(const std::function &cb) (scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) && (scsi_card_current[2] == 0) && (scsi_card_current[3] == 0)) continue; - if ((cdrom[i].bus_type == CDROM_BUS_MITSUMI) && (cdrom_interface_current == 0)) + if ((cdrom[i].bus_type == CDROM_BUS_MITSUMI || cdrom[i].bus_type == CDROM_BUS_MKE) && (cdrom_interface_current == 0)) continue; if (cdrom[i].bus_type != 0) { cb(i); @@ -382,21 +397,21 @@ MachineStatus::iterateCDROM(const std::function &cb) } void -MachineStatus::iterateZIP(const std::function &cb) +MachineStatus::iterateRDisk(const std::function &cb) { auto hdc_name = QString(hdc_get_internal_name(hdc_current[0])); - for (size_t i = 0; i < ZIP_NUM; i++) { + for (size_t i = 0; i < RDISK_NUM; i++) { /* Could be Internal or External IDE.. */ - if ((zip_drives[i].bus_type == ZIP_BUS_ATAPI) && !hasIDE() && + if ((rdisk_drives[i].bus_type == RDISK_BUS_ATAPI) && !hasIDE() && (hdc_name.left(3) != QStringLiteral("ide")) && (hdc_name.left(5) != QStringLiteral("xtide")) && (hdc_name.left(5) != QStringLiteral("mcide"))) continue; - if ((zip_drives[i].bus_type == ZIP_BUS_SCSI) && !hasSCSI() && + if ((rdisk_drives[i].bus_type == RDISK_BUS_SCSI) && !hasSCSI() && (scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) && (scsi_card_current[2] == 0) && (scsi_card_current[3] == 0)) continue; - if (zip_drives[i].bus_type != 0) { + if (rdisk_drives[i].bus_type != 0) { cb(i); } } @@ -454,16 +469,23 @@ MachineStatus::refreshEmptyIcons() if (!sbar_initialized) return; - for (size_t i = 0; i < FDD_NUM; ++i) + for (size_t i = 0; i < FDD_NUM; ++i) { d->fdd[i].setEmpty(machine_status.fdd[i].empty); + d->fdd[i].setWriteProtected(machine_status.fdd[i].write_prot); + } for (size_t i = 0; i < CDROM_NUM; ++i) d->cdrom[i].setEmpty(machine_status.cdrom[i].empty); - for (size_t i = 0; i < ZIP_NUM; i++) - d->zip[i].setEmpty(machine_status.zip[i].empty); - for (size_t i = 0; i < MO_NUM; i++) + for (size_t i = 0; i < RDISK_NUM; i++) { + d->rdisk[i].setEmpty(machine_status.rdisk[i].empty); + d->rdisk[i].setWriteProtected(machine_status.rdisk[i].write_prot); + } + for (size_t i = 0; i < MO_NUM; i++) { d->mo[i].setEmpty(machine_status.mo[i].empty); + d->mo[i].setWriteProtected(machine_status.mo[i].write_prot); + } d->cassette.setEmpty(machine_status.cassette.empty); + d->cassette.setWriteProtected(machine_status.cassette.write_prot); for (size_t i = 0; i < NET_CARD_MAX; i++) d->net[i].setEmpty(machine_status.net[i].empty); @@ -493,13 +515,13 @@ MachineStatus::refreshIcons() ui_sb_update_icon_write(SB_CDROM | i, 0); } } - for (size_t i = 0; i < ZIP_NUM; i++) { - d->zip[i].setActive(machine_status.zip[i].active); - d->zip[i].setWriteActive(machine_status.zip[i].write_active); - if (machine_status.zip[i].active) - ui_sb_update_icon(SB_ZIP | i, 0); - if (machine_status.zip[i].write_active) - ui_sb_update_icon_write(SB_ZIP | i, 0); + for (size_t i = 0; i < RDISK_NUM; i++) { + d->rdisk[i].setActive(machine_status.rdisk[i].active); + d->rdisk[i].setWriteActive(machine_status.rdisk[i].write_active); + if (machine_status.rdisk[i].active) + ui_sb_update_icon(SB_RDISK | i, 0); + if (machine_status.rdisk[i].write_active) + ui_sb_update_icon_write(SB_RDISK | i, 0); } for (size_t i = 0; i < MO_NUM; i++) { d->mo[i].setActive(machine_status.mo[i].active); @@ -536,9 +558,9 @@ MachineStatus::clearActivity() cdrom.setActive(false); cdrom.setWriteActive(false); } - for (auto &zip : d->zip) { - zip.setActive(false); - zip.setWriteActive(false); + for (auto &rdisk : d->rdisk) { + rdisk.setActive(false); + rdisk.setWriteActive(false); } for (auto &mo : d->mo) { mo.setActive(false); @@ -578,8 +600,8 @@ MachineStatus::refresh(QStatusBar *sbar) for (size_t i = 0; i < CDROM_NUM; i++) { sbar->removeWidget(d->cdrom[i].label.get()); } - for (size_t i = 0; i < ZIP_NUM; i++) { - sbar->removeWidget(d->zip[i].label.get()); + for (size_t i = 0; i < RDISK_NUM; i++) { + sbar->removeWidget(d->rdisk[i].label.get()); } for (size_t i = 0; i < MO_NUM; i++) { sbar->removeWidget(d->mo[i].label.get()); @@ -595,6 +617,12 @@ MachineStatus::refresh(QStatusBar *sbar) if (cassette_enable) { d->cassette.label = std::make_unique(); d->cassette.setEmpty(QString(cassette_fname).isEmpty()); + if (QString(cassette_fname).isEmpty()) + d->cassette.setWriteProtected(false); + else if (QString(cassette_fname).left(5) == "wp://") + d->cassette.setWriteProtected(true); + else + d->cassette.setWriteProtected(cassette_ui_writeprot); d->cassette.refresh(); connect((ClickableLabel *) d->cassette.label.get(), &ClickableLabel::clicked, [](QPoint pos) { MediaMenu::ptr->cassetteMenu->popup(pos - QPoint(0, MediaMenu::ptr->cassetteMenu->sizeHint().height())); @@ -602,7 +630,7 @@ MachineStatus::refresh(QStatusBar *sbar) connect((ClickableLabel *) d->cassette.label.get(), &ClickableLabel::dropped, [](QString str) { MediaMenu::ptr->cassetteMount(str, false); }); - d->cassette.label->setToolTip(MediaMenu::ptr->cassetteMenu->title()); + d->cassette.label->setToolTip(MediaMenu::ptr->cassetteMenu->toolTip()); d->cassette.label->setAcceptDrops(true); sbar->addWidget(d->cassette.label.get()); } @@ -618,7 +646,7 @@ MachineStatus::refresh(QStatusBar *sbar) connect((ClickableLabel *) d->cartridge[i].label.get(), &ClickableLabel::dropped, [i](QString str) { MediaMenu::ptr->cartridgeMount(i, str); }); - d->cartridge[i].label->setToolTip(MediaMenu::ptr->cartridgeMenus[i]->title()); + d->cartridge[i].label->setToolTip(MediaMenu::ptr->cartridgeMenus[i]->toolTip()); d->cartridge[i].label->setAcceptDrops(true); sbar->addWidget(d->cartridge[i].label.get()); } @@ -635,6 +663,12 @@ MachineStatus::refresh(QStatusBar *sbar) } d->fdd[i].label = std::make_unique(); d->fdd[i].setEmpty(QString(floppyfns[i]).isEmpty()); + if (QString(floppyfns[i]).isEmpty()) + d->fdd[i].setWriteProtected(false); + else if (QString(floppyfns[i]).left(5) == "wp://") + d->fdd[i].setWriteProtected(true); + else + d->fdd[i].setWriteProtected(ui_writeprot[i]); d->fdd[i].setActive(false); d->fdd[i].setWriteActive(false); d->fdd[i].refresh(); @@ -644,7 +678,7 @@ MachineStatus::refresh(QStatusBar *sbar) connect((ClickableLabel *) d->fdd[i].label.get(), &ClickableLabel::dropped, [i](QString str) { MediaMenu::ptr->floppyMount(i, str, false); }); - d->fdd[i].label->setToolTip(MediaMenu::ptr->floppyMenus[i]->title()); + d->fdd[i].label->setToolTip(MediaMenu::ptr->floppyMenus[i]->toolTip()); d->fdd[i].label->setAcceptDrops(true); sbar->addWidget(d->fdd[i].label.get()); }); @@ -661,31 +695,43 @@ MachineStatus::refresh(QStatusBar *sbar) connect((ClickableLabel *) d->cdrom[i].label.get(), &ClickableLabel::dropped, [i](QString str) { MediaMenu::ptr->cdromMount(i, str); }); - d->cdrom[i].label->setToolTip(MediaMenu::ptr->cdromMenus[i]->title()); + d->cdrom[i].label->setToolTip(MediaMenu::ptr->cdromMenus[i]->toolTip()); d->cdrom[i].label->setAcceptDrops(true); sbar->addWidget(d->cdrom[i].label.get()); }); - iterateZIP([this, sbar](int i) { - d->zip[i].label = std::make_unique(); - d->zip[i].setEmpty(QString(zip_drives[i].image_path).isEmpty()); - d->zip[i].setActive(false); - d->zip[i].setWriteActive(false); - d->zip[i].refresh(); - connect((ClickableLabel *) d->zip[i].label.get(), &ClickableLabel::clicked, [i](QPoint pos) { - MediaMenu::ptr->zipMenus[i]->popup(pos - QPoint(0, MediaMenu::ptr->zipMenus[i]->sizeHint().height())); + iterateRDisk([this, sbar](int i) { + d->rdisk[i].label = std::make_unique(); + d->rdisk[i].setEmpty(QString(rdisk_drives[i].image_path).isEmpty()); + if (QString(rdisk_drives[i].image_path).isEmpty()) + d->rdisk[i].setWriteProtected(false); + else if (QString(rdisk_drives[i].image_path).left(5) == "wp://") + d->rdisk[i].setWriteProtected(true); + else + d->rdisk[i].setWriteProtected(rdisk_drives[i].read_only); + d->rdisk[i].setActive(false); + d->rdisk[i].setWriteActive(false); + d->rdisk[i].refresh(); + connect((ClickableLabel *) d->rdisk[i].label.get(), &ClickableLabel::clicked, [i](QPoint pos) { + MediaMenu::ptr->rdiskMenus[i]->popup(pos - QPoint(0, MediaMenu::ptr->rdiskMenus[i]->sizeHint().height())); }); - connect((ClickableLabel *) d->zip[i].label.get(), &ClickableLabel::dropped, [i](QString str) { - MediaMenu::ptr->zipMount(i, str, false); + connect((ClickableLabel *) d->rdisk[i].label.get(), &ClickableLabel::dropped, [i](QString str) { + MediaMenu::ptr->rdiskMount(i, str, false); }); - d->zip[i].label->setToolTip(MediaMenu::ptr->zipMenus[i]->title()); - d->zip[i].label->setAcceptDrops(true); - sbar->addWidget(d->zip[i].label.get()); + d->rdisk[i].label->setToolTip(MediaMenu::ptr->rdiskMenus[i]->toolTip()); + d->rdisk[i].label->setAcceptDrops(true); + sbar->addWidget(d->rdisk[i].label.get()); }); iterateMO([this, sbar](int i) { d->mo[i].label = std::make_unique(); d->mo[i].setEmpty(QString(mo_drives[i].image_path).isEmpty()); + if (QString(rdisk_drives[i].image_path).isEmpty()) + d->mo[i].setWriteProtected(false); + else if (QString(rdisk_drives[i].image_path).left(5) == "wp://") + d->mo[i].setWriteProtected(true); + else + d->mo[i].setWriteProtected(rdisk_drives[i].read_only); d->mo[i].setActive(false); d->mo[i].setWriteActive(false); d->mo[i].refresh(); @@ -695,7 +741,7 @@ MachineStatus::refresh(QStatusBar *sbar) connect((ClickableLabel *) d->mo[i].label.get(), &ClickableLabel::dropped, [i](QString str) { MediaMenu::ptr->moMount(i, str, false); }); - d->mo[i].label->setToolTip(MediaMenu::ptr->moMenus[i]->title()); + d->mo[i].label->setToolTip(MediaMenu::ptr->moMenus[i]->toolTip()); d->mo[i].label->setAcceptDrops(true); sbar->addWidget(d->mo[i].label.get()); }); @@ -706,7 +752,7 @@ MachineStatus::refresh(QStatusBar *sbar) d->net[i].setActive(false); d->net[i].setWriteActive(false); d->net[i].refresh(); - d->net[i].label->setToolTip(MediaMenu::ptr->netMenus[i]->title()); + d->net[i].label->setToolTip(MediaMenu::ptr->netMenus[i]->toolTip()); connect((ClickableLabel *) d->net[i].label.get(), &ClickableLabel::clicked, [i](QPoint pos) { MediaMenu::ptr->netMenus[i]->popup(pos - QPoint(0, MediaMenu::ptr->netMenus[i]->sizeHint().height())); }); @@ -864,27 +910,27 @@ MachineStatus::updateTip(int tag) switch (category) { case SB_CASSETTE: if (d->cassette.label && MediaMenu::ptr->cassetteMenu) - d->cassette.label->setToolTip(MediaMenu::ptr->cassetteMenu->title()); + d->cassette.label->setToolTip(MediaMenu::ptr->cassetteMenu->toolTip()); break; case SB_CARTRIDGE: if (d->cartridge[item].label && MediaMenu::ptr->cartridgeMenus[item]) - d->cartridge[item].label->setToolTip(MediaMenu::ptr->cartridgeMenus[item]->title()); + d->cartridge[item].label->setToolTip(MediaMenu::ptr->cartridgeMenus[item]->toolTip()); break; case SB_FLOPPY: if (d->fdd[item].label && MediaMenu::ptr->floppyMenus[item]) - d->fdd[item].label->setToolTip(MediaMenu::ptr->floppyMenus[item]->title()); + d->fdd[item].label->setToolTip(MediaMenu::ptr->floppyMenus[item]->toolTip()); break; case SB_CDROM: if (d->cdrom[item].label && MediaMenu::ptr->cdromMenus[item]) - d->cdrom[item].label->setToolTip(MediaMenu::ptr->cdromMenus[item]->title()); + d->cdrom[item].label->setToolTip(MediaMenu::ptr->cdromMenus[item]->toolTip()); break; - case SB_ZIP: - if (d->zip[item].label && MediaMenu::ptr->zipMenus[item]) - d->zip[item].label->setToolTip(MediaMenu::ptr->zipMenus[item]->title()); + case SB_RDISK: + if (d->rdisk[item].label && MediaMenu::ptr->rdiskMenus[item]) + d->rdisk[item].label->setToolTip(MediaMenu::ptr->rdiskMenus[item]->toolTip()); break; case SB_MO: if (d->mo[item].label && MediaMenu::ptr->moMenus[item]) - d->mo[item].label->setToolTip(MediaMenu::ptr->moMenus[item]->title()); + d->mo[item].label->setToolTip(MediaMenu::ptr->moMenus[item]->toolTip()); break; case SB_HDD: break; diff --git a/src/qt/qt_machinestatus.hpp b/src/qt/qt_machinestatus.hpp index ad6425b5a..bb5058265 100644 --- a/src/qt/qt_machinestatus.hpp +++ b/src/qt/qt_machinestatus.hpp @@ -28,8 +28,13 @@ signals: void dropped(QString); protected: +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + void mousePressEvent(QMouseEvent *event) override { emit clicked(event->globalPosition().toPoint()); } + void mouseDoubleClickEvent(QMouseEvent *event) override { emit doubleClicked(event->globalPosition().toPoint()); } +#else void mousePressEvent(QMouseEvent *event) override { emit clicked(event->globalPos()); } void mouseDoubleClickEvent(QMouseEvent *event) override { emit doubleClicked(event->globalPos()); } +#endif void dragEnterEvent(QDragEnterEvent *event) override { if (event->mimeData()->hasUrls() && event->mimeData()->urls().size() == 1) { @@ -67,7 +72,7 @@ public: static bool hasSCSI(); static void iterateFDD(const std::function &cb); static void iterateCDROM(const std::function &cb); - static void iterateZIP(const std::function &cb); + static void iterateRDisk(const std::function &cb); static void iterateMO(const std::function &cb); static void iterateNIC(const std::function &cb); diff --git a/src/qt/qt_main.cpp b/src/qt/qt_main.cpp index b3b880094..6a2ba1a3a 100644 --- a/src/qt/qt_main.cpp +++ b/src/qt/qt_main.cpp @@ -66,6 +66,7 @@ extern "C" { # include "qt_rendererstack.hpp" # include "qt_winrawinputfilter.hpp" # include "qt_winmanagerfilter.hpp" +# include "qt_vmmanager_windarkmodefilter.hpp" # include <86box/win.h> # include # include @@ -441,9 +442,6 @@ main_thread_fn() int frames; QThread::currentThread()->setPriority(QThread::HighestPriority); -#ifdef _WIN32 - SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL); -#endif plat_set_thread_name(nullptr, "main_thread_fn"); framecountx = 0; // title_update = 1; @@ -517,10 +515,6 @@ main_thread_fn() static std::thread *main_thread; -#ifdef Q_OS_WINDOWS -extern bool windows_is_light_theme(); -#endif - int main(int argc, char *argv[]) { @@ -551,7 +545,7 @@ main(int argc, char *argv[]) } QApplication::setAttribute(Qt::AA_NativeWindows); - if (!windows_is_light_theme()) { + if (!util::isWindowsLightTheme()) { QFile f(":qdarkstyle/dark/darkstyle.qss"); if (!f.exists()) { @@ -561,16 +555,18 @@ main(int argc, char *argv[]) QTextStream ts(&f); qApp->setStyleSheet(ts.readAll()); } + QPalette palette(qApp->palette()); + palette.setColor(QPalette::Link, Qt::white); + palette.setColor(QPalette::LinkVisited, Qt::lightGray); + qApp->setPalette(palette); } #endif - qt_set_sequence_auto_mnemonic(false); Q_INIT_RESOURCE(qt_resources); Q_INIT_RESOURCE(qt_translations); QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); fmt.setSwapInterval(0); QSurfaceFormat::setDefaultFormat(fmt); - app.setStyle(new StyleOverride()); #ifdef __APPLE__ CocoaEventFilter cocoafilter; @@ -589,6 +585,14 @@ main(int argc, char *argv[]) return 0; } + if (!start_vmm) +#ifdef Q_OS_MACOS + qt_set_sequence_auto_mnemonic(false); +#else + qt_set_sequence_auto_mnemonic(!!kbd_req_capture); +#endif + app.setStyle(new StyleOverride()); + bool startMaximized = window_remember && monitor_settings[0].mon_window_maximized; fprintf(stderr, "Qt: version %s, platform \"%s\"\n", qVersion(), QApplication::platformName().toUtf8().data()); ProgSettings::loadTranslators(&app); @@ -613,7 +617,7 @@ main(int argc, char *argv[]) # endif #endif - if (!pc_init_modules()) { + if (!pc_init_roms()) { QMessageBox fatalbox(QMessageBox::Icon::Critical, QObject::tr("No ROMs found"), QObject::tr("86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory."), QMessageBox::Ok); @@ -622,6 +626,34 @@ main(int argc, char *argv[]) return 6; } + if (start_vmm) { + // VMManagerMain vmm; + // // Hackish until there is a proper solution + // QApplication::setApplicationName("86Box VM Manager"); + // QApplication::setApplicationDisplayName("86Box VM Manager"); + // vmm.show(); + // vmm.exec(); +#ifdef Q_OS_WINDOWS + auto darkModeFilter = std::unique_ptr(new WindowsDarkModeFilter()); + if (darkModeFilter) { + qApp->installNativeEventFilter(darkModeFilter.get()); + } + QTimer::singleShot(0, [&darkModeFilter] { +#else + QTimer::singleShot(0, [] { +#endif + const auto vmm_main_window = new VMManagerMainWindow(); +#ifdef Q_OS_WINDOWS + darkModeFilter.get()->setWindow(vmm_main_window); +#endif + vmm_main_window->show(); + }); + QApplication::exec(); + return 0; + } + + pc_init_modules(); + // UUID / copy / move detection if(!util::compareUuid()) { QMessageBox movewarnbox; @@ -664,6 +696,11 @@ main(int argc, char *argv[]) #endif if (settings_only) { + VMManagerClientSocket manager_socket; + if (qgetenv("VMM_86BOX_SOCKET").size()) { + manager_socket.IPCConnect(qgetenv("VMM_86BOX_SOCKET")); + manager_socket.clientRunningStateChanged(VMManagerProtocol::RunningState::PausedWaiting); + } Settings settings; if (settings.exec() == QDialog::Accepted) { settings.save(); @@ -684,19 +721,6 @@ main(int argc, char *argv[]) return 0; } - if (vmm_enabled) { - // VMManagerMain vmm; - // // Hackish until there is a proper solution - // QApplication::setApplicationName("86Box VM Manager"); - // QApplication::setApplicationDisplayName("86Box VM Manager"); - // vmm.show(); - // vmm.exec(); - const auto vmm_main_window = new VMManagerMainWindow(); - vmm_main_window->show(); - QApplication::exec(); - return 0; - } - #ifdef DISCORD discord_load(); #endif @@ -806,6 +830,7 @@ main(int argc, char *argv[]) emit main_window->close(); }); QObject::connect(main_window, &MainWindow::vmmRunningStateChanged, &manager_socket, &VMManagerClientSocket::clientRunningStateChanged); + QObject::connect(main_window, &MainWindow::vmmConfigurationChanged, &manager_socket, &VMManagerClientSocket::configurationChanged); main_window->installEventFilter(&manager_socket); manager_socket.sendWinIdMessage(main_window->winId()); diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 861037f99..7f611b9da 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -33,6 +33,8 @@ #include "qt_rendererstack.hpp" #include "qt_renderercommon.hpp" +#include "qt_cgasettingsdialog.hpp" + extern "C" { #include <86box/86box.h> #include <86box/config.h> @@ -92,11 +94,14 @@ extern bool cpu_thread_running; # include #endif +void qt_set_sequence_auto_mnemonic(bool b); + #include #include #include #include "qt_settings.hpp" +#include "qt_about.hpp" #include "qt_machinestatus.hpp" #include "qt_mediamenu.hpp" #include "qt_util.hpp" @@ -188,6 +193,16 @@ MainWindow::MainWindow(QWidget *parent) ui->stackedWidget->setMouseTracking(true); statusBar()->setVisible(!hide_status_bar); + auto hertz_label = new QLabel; + QTimer* frameRateTimer = new QTimer(this); + frameRateTimer->setInterval(1000); + frameRateTimer->setSingleShot(false); + connect(frameRateTimer, &QTimer::timeout, [hertz_label] { + hertz_label->setText(tr("%1 Hz").arg(QString::number(monitors[0].mon_actualrenderedframes.load()) + (monitors[0].mon_interlace ? "i" : ""))); + }); + statusBar()->addPermanentWidget(hertz_label); + frameRateTimer->start(1000); + num_icon = QIcon(":/settings/qt/icons/num_lock_on.ico"); num_icon_off = QIcon(":/settings/qt/icons/num_lock_off.ico"); scroll_icon = QIcon(":/settings/qt/icons/scroll_lock_on.ico"); @@ -268,9 +283,11 @@ MainWindow::MainWindow(QWidget *parent) num_label->setVisible(machine_has_bus(machine, MACHINE_BUS_PS2_PORTS | MACHINE_BUS_AT_KBD)); scroll_label->setVisible(machine_has_bus(machine, MACHINE_BUS_PS2_PORTS | MACHINE_BUS_AT_KBD)); caps_label->setVisible(machine_has_bus(machine, MACHINE_BUS_PS2_PORTS | MACHINE_BUS_AT_KBD)); - /* TODO: Base this on keyboard type instead when that's done. */ - kana_label->setVisible(machine_has_bus(machine, MACHINE_BUS_PS2_PORTS | MACHINE_BUS_AT_KBD) && - machine_has_flags(machine, MACHINE_AX)); + int ext_ax_kbd = machine_has_bus(machine, MACHINE_BUS_PS2_PORTS | MACHINE_BUS_AT_KBD) && + (keyboard_type == KEYBOARD_TYPE_AX); + int int_ax_kbd = machine_has_flags(machine, MACHINE_KEYBOARD_JIS) && + !machine_has_bus(machine, MACHINE_BUS_PS2_PORTS); + kana_label->setVisible(ext_ax_kbd || int_ax_kbd); while (QApplication::overrideCursor()) QApplication::restoreOverrideCursor(); #ifdef USE_WACOM @@ -278,11 +295,18 @@ MainWindow::MainWindow(QWidget *parent) #else ui->menuTablet_tool->menuAction()->setVisible(false); #endif + + bool enable_comp_option = false; + for (int i = 0; i < MONITORS_NUM; i++) { + if (monitors[i].mon_composite) { enable_comp_option = true; break; } + } + + ui->actionCGA_composite_settings->setEnabled(enable_comp_option); }); connect(this, &MainWindow::showMessageForNonQtThread, this, &MainWindow::showMessage_, Qt::QueuedConnection); - connect(this, &MainWindow::setTitle, this, [this, toolbar_label](const QString &title) { + connect(this, &MainWindow::setTitle, this, [toolbar_label](const QString &title) { if (dopause && !hide_tool_bar) { toolbar_label->setText(toolbar_label->text() + tr(" - PAUSED")); return; @@ -302,8 +326,6 @@ MainWindow::MainWindow(QWidget *parent) } } #endif - ui->actionPause->setChecked(false); - ui->actionPause->setCheckable(false); }); connect(this, &MainWindow::getTitleForNonQtThread, this, &MainWindow::getTitle_, Qt::BlockingQueuedConnection); @@ -334,6 +356,16 @@ MainWindow::MainWindow(QWidget *parent) } ui->stackedWidget->unsetCursor(); } +#ifndef Q_OS_MACOS + if (kbd_req_capture) { + qt_set_sequence_auto_mnemonic(!mouse_capture); + /* Hack to get the menubar to update the internal Alt+shortcut table */ + if (!video_fullscreen) { + ui->menubar->hide(); + ui->menubar->show(); + } + } +#endif }); connect(qApp, &QGuiApplication::applicationStateChanged, [this](Qt::ApplicationState state) { @@ -655,6 +687,9 @@ MainWindow::MainWindow(QWidget *parent) if (do_auto_pause > 0) { ui->actionAuto_pause->setChecked(true); } + if (force_constant_mouse > 0) { + ui->actionUpdate_mouse_every_CPU_frame->setChecked(true); + } #ifdef Q_OS_MACOS ui->actionCtrl_Alt_Del->setShortcutVisibleInContextMenu(true); @@ -713,7 +748,11 @@ MainWindow::MainWindow(QWidget *parent) setContextMenuPolicy(Qt::PreventContextMenu); /* Remove default Shift+F10 handler, which unfocuses keyboard input even with no context menu. */ +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + connect(new QShortcut(QKeySequence(Qt::SHIFT | Qt::Key_F10), this), &QShortcut::activated, this, [](){}); +#else connect(new QShortcut(QKeySequence(Qt::SHIFT + Qt::Key_F10), this), &QShortcut::activated, this, [](){}); +#endif connect(this, &MainWindow::initRendererMonitor, this, &MainWindow::initRendererMonitorSlot); connect(this, &MainWindow::initRendererMonitorForNonQtThread, this, &MainWindow::initRendererMonitorSlot, Qt::BlockingQueuedConnection); @@ -1024,7 +1063,9 @@ MainWindow::showEvent(QShowEvent *event) } if (window_remember && vid_resize == 1) { ui->stackedWidget->setFixedSize(window_w, window_h); +#ifndef Q_OS_MACOS QApplication::processEvents(); +#endif this->adjustSize(); } } @@ -1033,6 +1074,14 @@ void MainWindow::on_actionKeyboard_requires_capture_triggered() { kbd_req_capture ^= 1; +#ifndef Q_OS_MACOS + qt_set_sequence_auto_mnemonic(!!kbd_req_capture); + /* Hack to get the menubar to update the internal Alt+shortcut table */ + if (!video_fullscreen) { + ui->menubar->hide(); + ui->menubar->show(); + } +#endif } void @@ -1108,7 +1157,8 @@ MainWindow::on_actionSettings_triggered() case QDialog::Accepted: settings.save(); config_changed = 2; - updateShortcuts(); + updateShortcuts(); + emit vmmConfigurationChanged(); pc_reset_hard(); break; case QDialog::Rejected: @@ -1431,7 +1481,7 @@ MainWindow::eventFilter(QObject *receiver, QEvent *event) } - if (!dopause) { + if (!dopause && (!kbd_req_capture || mouse_capture)) { if (event->type() == QEvent::Shortcut) { auto shortcutEvent = (QShortcutEvent *) event; if (shortcutEvent->key() == ui->actionExit->shortcut()) { @@ -1456,7 +1506,7 @@ MainWindow::eventFilter(QObject *receiver, QEvent *event) if (event->type() == QEvent::WindowBlocked) { window_blocked = true; curdopause = dopause; - plat_pause(isShowMessage ? 2 : 1); + plat_pause(isNonPause ? dopause : (isShowMessage ? 2 : 1)); emit setMouseCapture(false); releaseKeyboard(); } else if (event->type() == QEvent::WindowUnblocked) { @@ -1484,8 +1534,18 @@ MainWindow::refreshMediaMenu() caps_label->setToolTip(QShortcut::tr("Caps Lock")); caps_label->setVisible(machine_has_bus(machine, MACHINE_BUS_PS2_PORTS | MACHINE_BUS_AT_KBD)); kana_label->setToolTip(QShortcut::tr("Kana Lock")); - kana_label->setVisible(machine_has_bus(machine, MACHINE_BUS_PS2_PORTS | MACHINE_BUS_AT_KBD) && - machine_has_flags(machine, MACHINE_AX)); + int ext_ax_kbd = machine_has_bus(machine, MACHINE_BUS_PS2_PORTS | MACHINE_BUS_AT_KBD) && + (keyboard_type == KEYBOARD_TYPE_AX); + int int_ax_kbd = machine_has_flags(machine, MACHINE_KEYBOARD_JIS) && + !machine_has_bus(machine, MACHINE_BUS_PS2_PORTS); + kana_label->setVisible(ext_ax_kbd || int_ax_kbd); + + bool enable_comp_option = false; + for (int i = 0; i < MONITORS_NUM; i++) { + if (monitors[i].mon_composite) { enable_comp_option = true; break; } + } + + ui->actionCGA_composite_settings->setEnabled(enable_comp_option); } void @@ -1905,42 +1965,8 @@ MainWindow::on_actionAbout_Qt_triggered() void MainWindow::on_actionAbout_86Box_triggered() { - QMessageBox msgBox; - msgBox.setTextFormat(Qt::RichText); - QString versioninfo; -#ifdef EMU_GIT_HASH - versioninfo = QString(" [%1]").arg(EMU_GIT_HASH); -#endif -#ifdef USE_DYNAREC -# ifdef USE_NEW_DYNAREC -# define DYNAREC_STR "new dynarec" -# else -# define DYNAREC_STR "old dynarec" -# endif -#else -# define DYNAREC_STR "no dynarec" -#endif - versioninfo.append(QString(" [%1, %2]").arg(QSysInfo::buildCpuArchitecture(), tr(DYNAREC_STR))); - msgBox.setText(QString("%3%1%2").arg(EMU_VERSION_FULL, versioninfo, tr("86Box v"))); - msgBox.setInformativeText(tr("An emulator of old computers\n\nAuthors: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n\nWith previous core contributions from Sarah Walker, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information.")); - msgBox.setWindowTitle(tr("About 86Box")); - const auto closeButton = msgBox.addButton("OK", QMessageBox::ButtonRole::AcceptRole); - msgBox.setEscapeButton(closeButton); - const auto webSiteButton = msgBox.addButton(EMU_SITE, QMessageBox::ButtonRole::HelpRole); - webSiteButton->connect(webSiteButton, &QPushButton::released, []() { - QDesktopServices::openUrl(QUrl("https://" EMU_SITE)); - }); -#ifdef RELEASE_BUILD - msgBox.setIconPixmap(QIcon(":/settings/qt/icons/86Box-green.ico").pixmap(32, 32)); -#elif defined ALPHA_BUILD - msgBox.setIconPixmap(QIcon(":/settings/qt/icons/86Box-red.ico").pixmap(32, 32)); -#elif defined BETA_BUILD - msgBox.setIconPixmap(QIcon(":/settings/qt/icons/86Box-yellow.ico").pixmap(32, 32)); -#else - msgBox.setIconPixmap(QIcon(":/settings/qt/icons/86Box-gray.ico").pixmap(32, 32)); -#endif - msgBox.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); - msgBox.exec(); + const auto msgBox = new About(this); + msgBox->exec(); } void @@ -1959,9 +1985,12 @@ MainWindow::on_actionCGA_PCjr_Tandy_EGA_S_VGA_overscan_triggered() void MainWindow::on_actionChange_contrast_for_monochrome_display_triggered() { + startblit(); vid_cga_contrast ^= 1; - cgapal_rebuild(); + for (int i = 0; i < MONITORS_NUM; i++) + cgapal_rebuild_monitor(i); config_save(); + endblit(); } void @@ -1975,6 +2004,16 @@ MainWindow::on_actionAuto_pause_triggered() { do_auto_pause ^= 1; ui->actionAuto_pause->setChecked(do_auto_pause > 0 ? true : false); + config_save(); +} + +void +MainWindow::on_actionUpdate_mouse_every_CPU_frame_triggered() +{ + force_constant_mouse ^= 1; + ui->actionUpdate_mouse_every_CPU_frame->setChecked(force_constant_mouse > 0 ? true : false); + mouse_update_sample_rate(); + config_save(); } void @@ -2112,8 +2151,11 @@ MainWindow::updateUiPauseState() QIcon(":/menuicons/qt/icons/pause.ico"); const auto tooltip_text = dopause ? QString(tr("Resume execution")) : QString(tr("Pause execution")); + const auto menu_text = dopause ? QString(tr("Re&sume")) : + QString(tr("&Pause")); ui->actionPause->setIcon(pause_icon); ui->actionPause->setToolTip(tooltip_text); + ui->actionPause->setText(menu_text); emit vmmRunningStateChanged(static_cast(window_blocked ? (dopause ? VMManagerProtocol::RunningState::PausedWaiting : VMManagerProtocol::RunningState::RunningWaiting) : (VMManagerProtocol::RunningState)dopause)); } @@ -2266,6 +2308,13 @@ MainWindow::on_actionOpen_screenshots_folder_triggered() QDesktopServices::openUrl(QUrl(QString("file:///") + usr_path + QString("/screenshots/"))); } +void +MainWindow::on_actionOpen_printer_tray_triggered() +{ + static_cast(QDir(QString(usr_path) + QString("/printer/")).mkpath(".")); + QDesktopServices::openUrl(QUrl(QString("file:///") + usr_path + QString("/printer/"))); +} + void MainWindow::on_actionApply_fullscreen_stretch_mode_when_maximized_triggered(bool checked) { @@ -2299,3 +2348,14 @@ void MainWindow::on_actionACPI_Shutdown_triggered() { acpi_pwrbut_pressed = 1; } + +void MainWindow::on_actionCGA_composite_settings_triggered() +{ + isNonPause = true; + CGASettingsDialog dialog; + dialog.setModal(true); + dialog.exec(); + isNonPause = false; + config_save(); +} + diff --git a/src/qt/qt_mainwindow.hpp b/src/qt/qt_mainwindow.hpp index 370d97d0e..22dec71f8 100644 --- a/src/qt/qt_mainwindow.hpp +++ b/src/qt/qt_mainwindow.hpp @@ -67,6 +67,7 @@ signals: void getTitleForNonQtThread(wchar_t *title); void vmmRunningStateChanged(VMManagerProtocol::RunningState state); + void vmmConfigurationChanged(); public slots: void showSettings(); void hardReset(); @@ -80,12 +81,13 @@ private slots: void on_actionSettings_triggered(); void on_actionExit_triggered(); void on_actionAuto_pause_triggered(); + void on_actionUpdate_mouse_every_CPU_frame_triggered(); void on_actionPause_triggered(); void on_actionCtrl_Alt_Del_triggered(); void on_actionCtrl_Alt_Esc_triggered(); void on_actionHard_Reset_triggered(); void on_actionRight_CTRL_is_left_ALT_triggered(); - static void on_actionKeyboard_requires_capture_triggered(); + void on_actionKeyboard_requires_capture_triggered(); void on_actionResizable_window_triggered(bool checked); void on_actionInverted_VGA_monitor_triggered(); void on_action0_5x_triggered(); @@ -162,8 +164,12 @@ private slots: void on_actionOpen_screenshots_folder_triggered(); + void on_actionOpen_printer_tray_triggered(); + void on_actionApply_fullscreen_stretch_mode_when_maximized_triggered(bool checked); + void on_actionCGA_composite_settings_triggered(); + private: Ui::MainWindow *ui; std::unique_ptr status; @@ -200,6 +206,7 @@ private: QIcon caps_icon_off, scroll_icon_off, num_icon_off, kana_icon_off; bool isShowMessage = false; + bool isNonPause = false; bool window_blocked = false; }; diff --git a/src/qt/qt_mainwindow.ui b/src/qt/qt_mainwindow.ui index 63bc0b01b..5ad597459 100644 --- a/src/qt/qt_mainwindow.ui +++ b/src/qt/qt_mainwindow.ui @@ -54,7 +54,7 @@ 0 0 724 - 23 + 21 @@ -63,17 +63,19 @@ - Tablet tool + &Tablet tool - + - + + + @@ -110,6 +112,7 @@ + @@ -142,7 +145,7 @@ - Filter method + Fi&lter method @@ -159,7 +162,7 @@ - E&GA/(S)VGA settings + EGA/(S)&VGA settings @@ -202,6 +205,7 @@ + @@ -229,7 +233,7 @@ - Qt::PreventContextMenu + Qt::ContextMenuPolicy::PreventContextMenu toolBar @@ -241,7 +245,7 @@ false - Qt::TopToolBarArea + Qt::ToolBarArea::TopToolBarArea @@ -250,7 +254,7 @@ - Qt::ToolButtonIconOnly + Qt::ToolButtonStyle::ToolButtonIconOnly false @@ -271,6 +275,14 @@ + + + true + + + &Update mouse every CPU frame + + true @@ -341,9 +353,6 @@ - - true - :/menuicons/qt/icons/pause.ico:/menuicons/qt/icons/pause.ico @@ -357,10 +366,10 @@ - Exit + E&xit - QAction::QuitRole + QAction::MenuRole::QuitRole @@ -372,7 +381,7 @@ &Settings... - QAction::NoRole + QAction::MenuRole::NoRole false @@ -423,7 +432,7 @@ - Specify dimensions... + Specify &dimensions... @@ -431,7 +440,7 @@ true - F&orce 4:3 display ratio + Force &4:3 display ratio @@ -668,13 +677,13 @@ - About Qt + About &Qt false - QAction::AboutQtRole + QAction::MenuRole::AboutQtRole @@ -682,7 +691,7 @@ &About 86Box... - QAction::AboutRole + QAction::MenuRole::AboutRole @@ -735,7 +744,7 @@ &Preferences... - QAction::PreferencesRole + QAction::MenuRole::PreferencesRole @@ -766,7 +775,7 @@ :/menuicons/qt/icons/acpi_shutdown.ico:/menuicons/qt/icons/acpi_shutdown.ico - ACPI shutdown + ACP&I shutdown ACPI shutdown @@ -805,10 +814,10 @@ - Renderer options... + Renderer &options... - QAction::NoRole + QAction::MenuRole::NoRole @@ -824,7 +833,7 @@ - MCA devices... + &MCA devices... @@ -832,7 +841,7 @@ true - Show non-primary monitors + Show non-&primary monitors @@ -840,15 +849,20 @@ true - VNC + &VNC 3 + + + Open p&rinter tray... + + - Open screenshots folder... + Open screenshots &folder... @@ -856,7 +870,7 @@ true - Apply fullscreen stretch mode when maximized + Appl&y fullscreen stretch mode when maximized @@ -864,7 +878,7 @@ true - Cursor/Puck + &Cursor/Puck @@ -872,7 +886,12 @@ true - Pen + &Pen + + + + + &CGA composite settings... diff --git a/src/qt/qt_mediahistorymanager.cpp b/src/qt/qt_mediahistorymanager.cpp index 5892c55cd..47ff7b4b5 100644 --- a/src/qt/qt_mediahistorymanager.cpp +++ b/src/qt/qt_mediahistorymanager.cpp @@ -21,6 +21,9 @@ #include #include #include "qt_mediahistorymanager.hpp" +#ifdef Q_OS_WINDOWS +#include +#endif extern "C" { #include <86box/timer.h> @@ -30,7 +33,7 @@ extern "C" { #include <86box/fdd.h> #include <86box/cdrom.h> #include <86box/scsi_device.h> -#include <86box/zip.h> +#include <86box/rdisk.h> #include <86box/mo.h> #include <86box/path.h> } @@ -111,8 +114,8 @@ MediaHistoryManager::maxDevicesSupported(ui::MediaType type) return CDROM_NUM; case ui::MediaType::Floppy: return FDD_NUM; - case ui::MediaType::Zip: - return ZIP_NUM; + case ui::MediaType::RDisk: + return RDISK_NUM; case ui::MediaType::Mo: return MO_NUM; case ui::MediaType::Cassette: @@ -197,14 +200,16 @@ MediaHistoryManager::initialDeduplication() case ui::MediaType::Optical: current_image = cdrom[device_index].image_path; break; - case ui::MediaType::Zip: - current_image = zip_drives[device_index].image_path; + case ui::MediaType::RDisk: + current_image = rdisk_drives[device_index].image_path; break; case ui::MediaType::Mo: current_image = mo_drives[device_index].image_path; break; } deduplicateList(device_history, QVector(1, current_image)); + device_history = removeMissingImages(device_history); + device_history = pathAdjustFull(device_history); // Fill in missing, if any int missing = MAX_PREV_IMAGES - device_history.size(); if (missing) { @@ -213,6 +218,7 @@ MediaHistoryManager::initialDeduplication() } } setHistoryListForDeviceIndex(device_index, device_type, device_history); + serializeImageHistoryType(device_type); } } } @@ -231,8 +237,8 @@ MediaHistoryManager::getEmuHistoryVarForType(ui::MediaType type, int index) return &fdd_image_history[index][0]; case ui::MediaType::Optical: return &cdrom[index].image_history[0]; - case ui::MediaType::Zip: - return &zip_drives[index].image_history[0]; + case ui::MediaType::RDisk: + return &rdisk_drives[index].image_history[0]; case ui::MediaType::Mo: return &mo_drives[index].image_history[0]; } @@ -343,24 +349,42 @@ MediaHistoryManager::removeMissingImages(device_index_list_t &device_history) char temp[MAX_IMAGE_PATH_LEN * 2] = { 0 }; - if (path_abs(checked_path.toUtf8().data())) { - if (checked_path.length() > (MAX_IMAGE_PATH_LEN - 1)) - fatal("removeMissingImages(): checked_path.length() > %i\n", MAX_IMAGE_PATH_LEN - 1); - else - snprintf(temp, (MAX_IMAGE_PATH_LEN - 1), "%s", checked_path.toUtf8().constData()); + if (checked_path.left(8) == "ioctl://") { + strncpy(temp, checked_path.toUtf8().data(), sizeof(temp) - 10); + temp[sizeof(temp) - 1] = '\0'; } else { - if ((strlen(usr_path) + strlen(path_get_slash(usr_path)) + checked_path.length()) > (MAX_IMAGE_PATH_LEN - 1)) - fatal("removeMissingImages(): Combined absolute path length > %i\n", MAX_IMAGE_PATH_LEN - 1); + QString path_only; + if (checked_path.left(5) == "wp://") + path_only = checked_path.right(checked_path.length() - 5); else - snprintf(temp, (MAX_IMAGE_PATH_LEN - 1), "%s%s%s", usr_path, - path_get_slash(usr_path), checked_path.toUtf8().constData()); + path_only = checked_path; + + if (path_abs(path_only.toUtf8().data())) { + if (path_only.length() > (MAX_IMAGE_PATH_LEN - 1)) + fatal("removeMissingImages(): path_only.length() > %i\n", MAX_IMAGE_PATH_LEN - 1); + else + snprintf(temp, (MAX_IMAGE_PATH_LEN - 1), "%s", path_only.toUtf8().constData()); + } else { + if ((strlen(usr_path) + strlen(path_get_slash(usr_path)) + path_only.length()) > (MAX_IMAGE_PATH_LEN - 1)) + fatal("removeMissingImages(): Combined absolute path length > %i\n", MAX_IMAGE_PATH_LEN - 1); + else + snprintf(temp, (MAX_IMAGE_PATH_LEN - 1), "%s%s%s", usr_path, + path_get_slash(usr_path), path_only.toUtf8().constData()); + } + path_normalize(temp); } - path_normalize(temp); QString qstr = QString::fromUtf8(temp); QFileInfo new_fi(qstr); - if ((new_fi.filePath().left(8) != "ioctl://") && !new_fi.exists()) { + bool file_exists = new_fi.exists(); + +#ifdef Q_OS_WINDOWS + if (new_fi.filePath().left(8) == "ioctl://") + file_exists = (GetDriveType(new_fi.filePath().right(2).toUtf8().data()) == DRIVE_CDROM); +#endif + + if (!file_exists) { qWarning("Image file %s does not exist - removing from history", qPrintable(new_fi.filePath())); checked_path = ""; } diff --git a/src/qt/qt_mediahistorymanager.hpp b/src/qt/qt_mediahistorymanager.hpp index 29ada8e2a..92b5939d3 100644 --- a/src/qt/qt_mediahistorymanager.hpp +++ b/src/qt/qt_mediahistorymanager.hpp @@ -45,7 +45,7 @@ Q_NAMESPACE enum class MediaType { Floppy, Optical, - Zip, + RDisk, Mo, Cassette, Cartridge @@ -62,7 +62,7 @@ typedef QHash master_list_t; static const MediaType AllSupportedMediaHistoryTypes[] = { MediaType::Optical, MediaType::Floppy, - MediaType::Zip, + MediaType::RDisk, MediaType::Mo, MediaType::Cassette, MediaType::Cartridge diff --git a/src/qt/qt_mediamenu.cpp b/src/qt/qt_mediamenu.cpp index 11fac2a70..465c56129 100644 --- a/src/qt/qt_mediamenu.cpp +++ b/src/qt/qt_mediamenu.cpp @@ -56,7 +56,7 @@ extern "C" { #include <86box/fdd_86f.h> #include <86box/cdrom.h> #include <86box/scsi_device.h> -#include <86box/zip.h> +#include <86box/rdisk.h> #include <86box/mo.h> #include <86box/sound.h> #include <86box/ui.h> @@ -69,9 +69,12 @@ extern "C" { #include "qt_deviceconfig.hpp" #include "qt_mediahistorymanager.hpp" #include "qt_mediamenu.hpp" +#include "qt_iconindicators.hpp" std::shared_ptr MediaMenu::ptr; +static QSize pixmap_size(16, 16); + MediaMenu::MediaMenu(QWidget *parent) : QObject(parent) { @@ -86,27 +89,28 @@ MediaMenu::refresh(QMenu *parentMenu) if (MachineStatus::hasCassette()) { cassetteMenu = parentMenu->addMenu(""); - cassetteMenu->addAction(tr("&New image..."), [this]() { cassetteNewImage(); }); + QIcon img_icon = QIcon(":/settings/qt/icons/cassette_image.ico"); + cassetteMenu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, New), tr("&New image..."), [this]() { cassetteNewImage(); }); cassetteMenu->addSeparator(); - cassetteMenu->addAction(tr("&Existing image..."), [this]() { cassetteSelectImage(false); }); - cassetteMenu->addAction(tr("Existing image (&Write-protected)..."), [this]() { cassetteSelectImage(true); }); + cassetteMenu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, Browse), tr("&Existing image..."), [this]() { cassetteSelectImage(false); }); + cassetteMenu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, WriteProtectedBrowse), tr("Existing image (&Write-protected)..."), [this]() { cassetteSelectImage(true); }); cassetteMenu->addSeparator(); for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) { cassetteImageHistoryPos[slot] = cassetteMenu->children().count(); - cassetteMenu->addAction(tr("Image %1").arg(slot), [this, slot]() { cassetteMenuSelect(slot); })->setCheckable(false); + cassetteMenu->addAction(img_icon, tr("Image %1").arg(slot), [this, slot]() { cassetteMenuSelect(slot); })->setCheckable(false); } cassetteMenu->addSeparator(); cassetteRecordPos = cassetteMenu->children().count(); - cassetteMenu->addAction(tr("&Record"), [this] { pc_cas_set_mode(cassette, 1); cassetteUpdateMenu(); })->setCheckable(true); + cassetteMenu->addAction(QIcon(":/settings/qt/icons/record.ico"), tr("&Record"), [this] { pc_cas_set_mode(cassette, 1); cassetteUpdateMenu(); })->setCheckable(true); cassettePlayPos = cassetteMenu->children().count(); - cassetteMenu->addAction(tr("&Play"), [this] { pc_cas_set_mode(cassette, 0); cassetteUpdateMenu(); })->setCheckable(true); + cassetteMenu->addAction(QIcon(":/menuicons/qt/icons/run.ico"), tr("&Play"), [this] { pc_cas_set_mode(cassette, 0); cassetteUpdateMenu(); })->setCheckable(true); cassetteRewindPos = cassetteMenu->children().count(); - cassetteMenu->addAction(tr("&Rewind to the beginning"), [] { pc_cas_rewind(cassette); }); + cassetteMenu->addAction(QIcon(":/settings/qt/icons/rewind.ico"), tr("&Rewind to the beginning"), [] { pc_cas_rewind(cassette); }); cassetteFastFwdPos = cassetteMenu->children().count(); - cassetteMenu->addAction(tr("&Fast forward to the end"), [] { pc_cas_append(cassette); }); + cassetteMenu->addAction(QIcon(":/settings/qt/icons/fast_forward.ico"), tr("&Fast forward to the end"), [] { pc_cas_append(cassette); }); cassetteMenu->addSeparator(); cassetteEjectPos = cassetteMenu->children().count(); - cassetteMenu->addAction(tr("E&ject"), [this]() { cassetteEject(); }); + cassetteMenu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, Eject), tr("E&ject"), [this]() { cassetteEject(); }); cassetteUpdateMenu(); } @@ -114,15 +118,16 @@ MediaMenu::refresh(QMenu *parentMenu) if (machine_has_cartridge(machine)) { for (int i = 0; i < 2; i++) { auto *menu = parentMenu->addMenu(""); - menu->addAction(tr("&Image..."), [this, i]() { cartridgeSelectImage(i); }); + QIcon img_icon = QIcon(":/settings/qt/icons/cartridge_image.ico"); + menu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, Browse), tr("&Image..."), [this, i]() { cartridgeSelectImage(i); }); menu->addSeparator(); for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) { cartridgeImageHistoryPos[slot] = menu->children().count(); - menu->addAction(tr("Image %1").arg(slot), [this, i, slot]() { cartridgeMenuSelect(i, slot); })->setCheckable(false); + menu->addAction(img_icon, tr("Image %1").arg(slot), [this, i, slot]() { cartridgeMenuSelect(i, slot); })->setCheckable(false); } menu->addSeparator(); cartridgeEjectPos = menu->children().count(); - menu->addAction(tr("E&ject"), [this, i]() { cartridgeEject(i); }); + menu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, Eject), tr("E&ject"), [this, i]() { cartridgeEject(i); }); cartridgeMenus[i] = menu; cartridgeUpdateMenu(i); } @@ -131,21 +136,23 @@ MediaMenu::refresh(QMenu *parentMenu) floppyMenus.clear(); MachineStatus::iterateFDD([this, parentMenu](int i) { auto *menu = parentMenu->addMenu(""); - menu->addAction(tr("&New image..."), [this, i]() { floppyNewImage(i); }); + QIcon img_icon = fdd_is_525(i) ? QIcon(":/settings/qt/icons/floppy_525_image.ico") : + QIcon(":/settings/qt/icons/floppy_35_image.ico"); + menu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, New), tr("&New image..."), [this, i]() { floppyNewImage(i); }); menu->addSeparator(); - menu->addAction(tr("&Existing image..."), [this, i]() { floppySelectImage(i, false); }); - menu->addAction(tr("Existing image (&Write-protected)..."), [this, i]() { floppySelectImage(i, true); }); + menu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, Browse), tr("&Existing image..."), [this, i]() { floppySelectImage(i, false); }); + menu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, WriteProtectedBrowse), tr("Existing image (&Write-protected)..."), [this, i]() { floppySelectImage(i, true); }); menu->addSeparator(); for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) { floppyImageHistoryPos[slot] = menu->children().count(); - menu->addAction(tr("Image %1").arg(slot), [this, i, slot]() { floppyMenuSelect(i, slot); })->setCheckable(false); + menu->addAction(img_icon, tr("Image %1").arg(slot), [this, i, slot]() { floppyMenuSelect(i, slot); })->setCheckable(false); } menu->addSeparator(); floppyExportPos = menu->children().count(); - menu->addAction(tr("E&xport to 86F..."), [this, i]() { floppyExportTo86f(i); }); + menu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, Export), tr("E&xport to 86F..."), [this, i]() { floppyExportTo86f(i); }); menu->addSeparator(); floppyEjectPos = menu->children().count(); - menu->addAction(tr("E&ject"), [this, i]() { floppyEject(i); }); + menu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, Eject), tr("E&ject"), [this, i]() { floppyEject(i); }); floppyMenus[i] = menu; floppyUpdateMenu(i); }); @@ -156,8 +163,8 @@ MediaMenu::refresh(QMenu *parentMenu) cdromMutePos = menu->children().count(); menu->addAction(QIcon(":/settings/qt/icons/cdrom_mute.ico"), tr("&Mute"), [this, i]() { cdromMute(i); })->setCheckable(true); menu->addSeparator(); - menu->addAction(QIcon(":/settings/qt/icons/cdrom_image.ico"), tr("&Image..."), [this, i]() { cdromMount(i, 0, nullptr); })->setCheckable(false); - menu->addAction(QIcon(":/settings/qt/icons/cdrom_folder.ico"), tr("&Folder..."), [this, i]() { cdromMount(i, 1, nullptr); })->setCheckable(false); + menu->addAction(getIconWithIndicator(QIcon(":/settings/qt/icons/cdrom_image.ico"), pixmap_size, QIcon::Normal, Browse), tr("&Image..."), [this, i]() { cdromMount(i, 0, nullptr); })->setCheckable(false); + menu->addAction(getIconWithIndicator(QIcon(":/settings/qt/icons/cdrom_folder.ico"), pixmap_size, QIcon::Normal, Browse), tr("&Folder..."), [this, i]() { cdromMount(i, 1, nullptr); })->setCheckable(false); menu->addSeparator(); for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) { cdromImageHistoryPos[slot] = menu->children().count(); @@ -170,7 +177,7 @@ MediaMenu::refresh(QMenu *parentMenu) for (const auto &letter : driveLetters) { auto drive = QString("%1:\\").arg(letter); if (GetDriveType(drive.toUtf8().constData()) == DRIVE_CDROM) - menu->addAction(QIcon(":/settings/qt/icons/cdrom_host.ico"), tr("Host CD/DVD Drive (%1:)").arg(letter), [this, i, letter] { cdromMount(i, 2, QString(R"(\\.\%1:)").arg(letter)); })->setCheckable(false); + menu->addAction(QIcon(":/settings/qt/icons/cdrom_host.ico"), tr("&Host CD/DVD Drive (%1:)").arg(letter), [this, i, letter] { cdromMount(i, 2, QString(R"(\\.\%1:)").arg(letter)); })->setCheckable(false); } menu->addSeparator(); #endif // Q_OS_WINDOWS @@ -180,40 +187,42 @@ MediaMenu::refresh(QMenu *parentMenu) cdromUpdateMenu(i); }); - zipMenus.clear(); - MachineStatus::iterateZIP([this, parentMenu](int i) { + rdiskMenus.clear(); + MachineStatus::iterateRDisk([this, parentMenu](int i) { auto *menu = parentMenu->addMenu(""); - menu->addAction(tr("&New image..."), [this, i]() { zipNewImage(i); }); + QIcon img_icon = QIcon(":/settings/qt/icons/rdisk_image.ico"); + menu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, New), tr("&New image..."), [this, i]() { rdiskNewImage(i); }); menu->addSeparator(); - menu->addAction(tr("&Existing image..."), [this, i]() { zipSelectImage(i, false); }); - menu->addAction(tr("Existing image (&Write-protected)..."), [this, i]() { zipSelectImage(i, true); }); + menu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, Browse), tr("&Existing image..."), [this, i]() { rdiskSelectImage(i, false); }); + menu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, WriteProtectedBrowse), tr("Existing image (&Write-protected)..."), [this, i]() { rdiskSelectImage(i, true); }); menu->addSeparator(); for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) { - zipImageHistoryPos[slot] = menu->children().count(); - menu->addAction(tr("Image %1").arg(slot), [this, i, slot]() { zipReload(i, slot); })->setCheckable(false); + rdiskImageHistoryPos[slot] = menu->children().count(); + menu->addAction(img_icon, tr("Image %1").arg(slot), [this, i, slot]() { rdiskReload(i, slot); })->setCheckable(false); } menu->addSeparator(); - zipEjectPos = menu->children().count(); - menu->addAction(tr("E&ject"), [this, i]() { zipEject(i); }); - zipMenus[i] = menu; - zipUpdateMenu(i); + rdiskEjectPos = menu->children().count(); + menu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, Eject), tr("E&ject"), [this, i]() { rdiskEject(i); }); + rdiskMenus[i] = menu; + rdiskUpdateMenu(i); }); moMenus.clear(); MachineStatus::iterateMO([this, parentMenu](int i) { auto *menu = parentMenu->addMenu(""); - menu->addAction(tr("&New image..."), [this, i]() { moNewImage(i); }); + QIcon img_icon = QIcon(":/settings/qt/icons/mo_image.ico"); + menu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, New), tr("&New image..."), [this, i]() { moNewImage(i); }); menu->addSeparator(); - menu->addAction(tr("&Existing image..."), [this, i]() { moSelectImage(i, false); }); - menu->addAction(tr("Existing image (&Write-protected)..."), [this, i]() { moSelectImage(i, true); }); + menu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, Browse), tr("&Existing image..."), [this, i]() { moSelectImage(i, false); }); + menu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, WriteProtectedBrowse), tr("Existing image (&Write-protected)..."), [this, i]() { moSelectImage(i, true); }); menu->addSeparator(); for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) { moImageHistoryPos[slot] = menu->children().count(); - menu->addAction(tr("Image %1").arg(slot), [this, i, slot]() { moReload(i, slot); })->setCheckable(false); + menu->addAction(img_icon, tr("Image %1").arg(slot), [this, i, slot]() { moReload(i, slot); })->setCheckable(false); } menu->addSeparator(); moEjectPos = menu->children().count(); - menu->addAction(tr("E&ject"), [this, i]() { moEject(i); }); + menu->addAction(getIconWithIndicator(img_icon, pixmap_size, QIcon::Normal, Eject), tr("E&ject"), [this, i]() { moEject(i); }); moMenus[i] = menu; moUpdateMenu(i); }); @@ -227,7 +236,7 @@ MediaMenu::refresh(QMenu *parentMenu) netMenus[i] = menu; nicUpdateMenu(i); }); - parentMenu->addAction(tr("Clear image history"), [this]() { clearImageHistory(); }); + parentMenu->addAction(tr("Clear image &history"), [this]() { clearImageHistory(); }); } void @@ -277,11 +286,18 @@ MediaMenu::cassetteMount(const QString &filename, bool wp) if (!filename.isEmpty()) { QByteArray filenameBytes = filename.toUtf8(); + + if (filename.left(5) == "wp://") + cassette_ui_writeprot = 1; + else if (cassette_ui_writeprot) + filenameBytes = QString::asprintf(R"(wp://%s)", filename.toUtf8().data()).toUtf8(); + strncpy(cassette_fname, filenameBytes.data(), sizeof(cassette_fname) - 1); pc_cas_set_fname(cassette, cassette_fname); } ui_sb_update_icon_state(SB_CASSETTE, filename.isEmpty() ? 1 : 0); + ui_sb_update_icon_wp(SB_CASSETTE, cassette_ui_writeprot); mhm.addImageToHistory(0, ui::MediaType::Cassette, previous_image.filePath(), filename); cassetteUpdateMenu(); ui_sb_update_tip(SB_CASSETTE); @@ -324,7 +340,8 @@ MediaMenu::cassetteUpdateMenu() recordMenu->setChecked(isSaving); playMenu->setChecked(!isSaving); - cassetteMenu->setTitle(tr("Cassette: %1").arg(name.isEmpty() ? tr("(empty)") : name)); + cassetteMenu->setTitle(tr("C&assette: %1").arg(name.isEmpty() ? tr("(empty)") : name)); + cassetteMenu->setToolTip(tr("Cassette: %1").arg(name.isEmpty() ? tr("(empty)") : name)); for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) { updateImageHistory(0, slot, ui::MediaType::Cassette); @@ -391,7 +408,8 @@ MediaMenu::cartridgeUpdateMenu(int i) auto *ejectMenu = dynamic_cast(childs[cartridgeEjectPos]); ejectMenu->setEnabled(!name.isEmpty()); ejectMenu->setText(name.isEmpty() ? tr("E&ject") : tr("E&ject %1").arg(fi.fileName())); - menu->setTitle(tr("Cartridge %1: %2").arg(QString::number(i + 1), name.isEmpty() ? tr("(empty)") : name)); + menu->setTitle(tr("Car&tridge %1: %2").arg(QString::number(i + 1), name.isEmpty() ? tr("(empty)") : name)); + menu->setToolTip(tr("Cartridge %1: %2").arg(QString::number(i + 1), name.isEmpty() ? tr("(empty)") : name)); for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) { updateImageHistory(i, slot, ui::MediaType::Cartridge); @@ -443,10 +461,18 @@ MediaMenu::floppyMount(int i, const QString &filename, bool wp) ui_writeprot[i] = wp ? 1 : 0; if (!filename.isEmpty()) { QByteArray filenameBytes = filename.toUtf8(); + + if (filename.left(5) == "wp://") + ui_writeprot[i] = 1; + else if (ui_writeprot[i]) + filenameBytes = QString::asprintf(R"(wp://%s)", filename.toUtf8().data()).toUtf8(); + fdd_load(i, filenameBytes.data()); - } + mhm.addImageToHistory(i, ui::MediaType::Floppy, previous_image.filePath(), QString(filenameBytes)); + } else + mhm.addImageToHistory(i, ui::MediaType::Floppy, previous_image.filePath(), filename); ui_sb_update_icon_state(SB_FLOPPY | i, filename.isEmpty() ? 1 : 0); - mhm.addImageToHistory(i, ui::MediaType::Floppy, previous_image.filePath(), filename); + ui_sb_update_icon_wp(SB_FLOPPY | i, ui_writeprot[i]); floppyUpdateMenu(i); ui_sb_update_tip(SB_FLOPPY | i); config_save(); @@ -500,7 +526,8 @@ MediaMenu::floppyUpdateMenu(int i) } int type = fdd_get_type(i); - floppyMenus[i]->setTitle(tr("Floppy %1 (%2): %3").arg(QString::number(i + 1), fdd_getname(type), name.isEmpty() ? tr("(empty)") : name)); + floppyMenus[i]->setTitle(tr("&Floppy %1 (%2): %3").arg(QString::number(i + 1), fdd_getname(type), name.isEmpty() ? tr("(empty)") : name)); + floppyMenus[i]->setToolTip(tr("Floppy %1 (%2): %3").arg(QString::number(i + 1), fdd_getname(type), name.isEmpty() ? tr("(empty)") : name)); } @@ -567,13 +594,13 @@ MediaMenu::cdromMount(int i, int dir, const QString &arg) QFileInfo fi(cdrom[i].image_path); if (dir > 1) - filename = QString::asprintf(R"(ioctl://%s)", arg.toStdString().c_str()); + filename = QString::asprintf(R"(ioctl://%s)", arg.toUtf8().data()); else if (dir == 1) filename = QFileDialog::getExistingDirectory(parentWidget); else { filename = QFileDialog::getOpenFileName(parentWidget, QString(), QString(), - tr("CD-ROM images") % util::DlgFilter({ "iso", "cue" }) % tr("All files") % util::DlgFilter({ "*" }, true)); + tr("CD-ROM images") % util::DlgFilter({ "iso", "cue", "mds" }) % tr("All files") % util::DlgFilter({ "*" }, true)); } if (filename.isEmpty()) @@ -639,8 +666,18 @@ MediaMenu::updateImageHistory(int index, int slot, ui::MediaType type) menu = cassetteMenu; children = menu->children(); imageHistoryUpdatePos = dynamic_cast(children[cassetteImageHistoryPos[slot]]); - fi.setFile(fn); - menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn; + menu_icon = QIcon(":/settings/qt/icons/cassette_image.ico"); + if (fn.left(5) == "wp://") + fi.setFile(fn.right(fn.length() - 5)); + else + fi.setFile(fn); + if (!fi.fileName().isEmpty() && (fn.left(5) == "wp://")) { + menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn.right(fn.length() - 5); + imageHistoryUpdatePos->setIcon(getIconWithIndicator(menu_icon, pixmap_size, QIcon::Normal, WriteProtected)); + } else { + menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn; + imageHistoryUpdatePos->setIcon(menu_icon); + } break; case ui::MediaType::Cartridge: if (!machine_has_cartridge(machine)) @@ -657,8 +694,19 @@ MediaMenu::updateImageHistory(int index, int slot, ui::MediaType type) menu = floppyMenus[index]; children = menu->children(); imageHistoryUpdatePos = dynamic_cast(children[floppyImageHistoryPos[slot]]); - fi.setFile(fn); - menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn; + menu_icon = fdd_is_525(index) ? QIcon(":/settings/qt/icons/floppy_525_image.ico") : + QIcon(":/settings/qt/icons/floppy_35_image.ico"); + if (fn.left(5) == "wp://") + fi.setFile(fn.right(fn.length() - 5)); + else + fi.setFile(fn); + if (!fi.fileName().isEmpty() && (fn.left(5) == "wp://")) { + menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn.right(fn.length() - 5); + imageHistoryUpdatePos->setIcon(getIconWithIndicator(menu_icon, pixmap_size, QIcon::Normal, WriteProtected)); + } else { + menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn; + imageHistoryUpdatePos->setIcon(menu_icon); + } break; case ui::MediaType::Optical: if (!cdromMenus.contains(index)) @@ -680,14 +728,24 @@ MediaMenu::updateImageHistory(int index, int slot, ui::MediaType type) } imageHistoryUpdatePos->setIcon(menu_icon); break; - case ui::MediaType::Zip: - if (!zipMenus.contains(index)) + case ui::MediaType::RDisk: + if (!rdiskMenus.contains(index)) return; - menu = zipMenus[index]; + menu = rdiskMenus[index]; children = menu->children(); - imageHistoryUpdatePos = dynamic_cast(children[zipImageHistoryPos[slot]]); - fi.setFile(fn); - menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn; + imageHistoryUpdatePos = dynamic_cast(children[rdiskImageHistoryPos[slot]]); + menu_icon = QIcon(":/settings/qt/icons/mo_image.ico"); + if (fn.left(5) == "wp://") + fi.setFile(fn.right(fn.length() - 5)); + else + fi.setFile(fn); + if (!fi.fileName().isEmpty() && (fn.left(5) == "wp://")) { + menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn.right(fn.length() - 5); + imageHistoryUpdatePos->setIcon(getIconWithIndicator(menu_icon, pixmap_size, QIcon::Normal, WriteProtected)); + } else { + menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn; + imageHistoryUpdatePos->setIcon(menu_icon); + } break; case ui::MediaType::Mo: if (!moMenus.contains(index)) @@ -695,11 +753,26 @@ MediaMenu::updateImageHistory(int index, int slot, ui::MediaType type) menu = moMenus[index]; children = menu->children(); imageHistoryUpdatePos = dynamic_cast(children[moImageHistoryPos[slot]]); - fi.setFile(fn); - menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn; + menu_icon = QIcon(":/settings/qt/icons/mo_image.ico"); + if (fn.left(5) == "wp://") + fi.setFile(fn.right(fn.length() - 5)); + else + fi.setFile(fn); + if (!fi.fileName().isEmpty() && (fn.left(5) == "wp://")) { + menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn.right(fn.length() - 5); + imageHistoryUpdatePos->setIcon(getIconWithIndicator(menu_icon, pixmap_size, QIcon::Normal, WriteProtected)); + } else { + menu_item_name = fi.fileName().isEmpty() ? tr("Reload previous image") : fn; + imageHistoryUpdatePos->setIcon(menu_icon); + } break; } +#ifndef Q_OS_MACOS + if ((slot >= 0) && (slot <= 9)) + imageHistoryUpdatePos->setText(menu_item_name.prepend("&%1 ").arg((slot == 9) ? 0 : (slot + 1))); + else +#endif imageHistoryUpdatePos->setText(menu_item_name); if (fn.left(8) == "ioctl://") @@ -747,9 +820,12 @@ MediaMenu::cdromUpdateMenu(int i) menu_item_name = name.isEmpty() ? QString() : fi.fileName(); name2 = name; - menu_icon = fi.isDir() ? QIcon(":/settings/qt/icons/cdrom_folder.ico") : QIcon(":/settings/qt/icons/cdrom_image.ico"); + if (name.isEmpty()) + menu_icon = QIcon(":/settings/qt/icons/cdrom.ico"); + else + menu_icon = fi.isDir() ? QIcon(":/settings/qt/icons/cdrom_folder.ico") : QIcon(":/settings/qt/icons/cdrom_image.ico"); } - ejectMenu->setIcon(menu_icon); + ejectMenu->setIcon(getIconWithIndicator(menu_icon, pixmap_size, QIcon::Normal, Eject)); ejectMenu->setText(name.isEmpty() ? tr("E&ject") : tr("E&ject %1").arg(menu_item_name)); for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) @@ -766,145 +842,192 @@ MediaMenu::cdromUpdateMenu(int i) busName = "SCSI"; break; case CDROM_BUS_MITSUMI: - busName = "Mitsumi"; - break; + busName = "Mitsumi"; + break; + case CDROM_BUS_MKE: + busName = "Panasonic/MKE"; + break; } - menu->setTitle(tr("CD-ROM %1 (%2): %3").arg(QString::number(i+1), busName, name.isEmpty() ? tr("(empty)") : name2)); + menu->setTitle(tr("&CD-ROM %1 (%2): %3").arg(QString::number(i+1), busName, name.isEmpty() ? tr("(empty)") : name2)); + menu->setToolTip(tr("CD-ROM %1 (%2): %3").arg(QString::number(i+1), busName, name.isEmpty() ? tr("(empty)") : name2)); } void -MediaMenu::zipNewImage(int i) +MediaMenu::rdiskNewImage(int i) { - NewFloppyDialog dialog(NewFloppyDialog::MediaType::Zip, parentWidget); + NewFloppyDialog dialog(NewFloppyDialog::MediaType::RDisk, parentWidget); switch (dialog.exec()) { default: break; case QDialog::Accepted: QByteArray filename = dialog.fileName().toUtf8(); - zipMount(i, filename, false); + rdiskMount(i, filename, false); break; } } void -MediaMenu::zipSelectImage(int i, bool wp) +MediaMenu::rdiskSelectImage(int i, bool wp) { const auto filename = QFileDialog::getOpenFileName( parentWidget, QString(), QString(), - tr("ZIP images") % util::DlgFilter({ "im?", "zdi" }) % tr("All files") % util::DlgFilter({ "*" }, true)); + tr("Removable disk images") % util::DlgFilter({ "im?", "rdi", "zdi" }) % tr("All files") % util::DlgFilter({ "*" }, true)); if (!filename.isEmpty()) - zipMount(i, filename, wp); + rdiskMount(i, filename, wp); } void -MediaMenu::zipMount(int i, const QString &filename, bool wp) +MediaMenu::rdiskMount(int i, const QString &filename, bool wp) { - const auto dev = static_cast(zip_drives[i].priv); - int was_empty = zip_is_empty(i); + const auto dev = static_cast(rdisk_drives[i].priv); + int was_empty = rdisk_is_empty(i); - zip_disk_close(dev); - zip_drives[i].read_only = wp; + rdisk_disk_close(dev); + rdisk_drives[i].read_only = wp; if (!filename.isEmpty()) { QByteArray filenameBytes = filename.toUtf8(); - zip_load(dev, filenameBytes.data(), 1); + + if (filename.left(5) == "wp://") + rdisk_drives[i].read_only = 1; + else if (rdisk_drives[i].read_only) + filenameBytes = QString::asprintf(R"(wp://%s)", filename.toUtf8().data()).toUtf8(); + + rdisk_load(dev, filenameBytes.data(), 1); /* Signal media change to the emulated machine. */ - zip_insert(dev); + rdisk_insert(dev); /* The drive was previously empty, transition directly to UNIT ATTENTION. */ if (was_empty) - zip_insert(dev); + rdisk_insert(dev); } - mhm.addImageToHistory(i, ui::MediaType::Zip, zip_drives[i].prev_image_path, zip_drives[i].image_path); + mhm.addImageToHistory(i, ui::MediaType::RDisk, rdisk_drives[i].prev_image_path, rdisk_drives[i].image_path); - ui_sb_update_icon_state(SB_ZIP | i, filename.isEmpty() ? 1 : 0); - zipUpdateMenu(i); - ui_sb_update_tip(SB_ZIP | i); + ui_sb_update_icon_state(SB_RDISK | i, filename.isEmpty() ? 1 : 0); + ui_sb_update_icon_wp(SB_RDISK | i, wp); + rdiskUpdateMenu(i); + ui_sb_update_tip(SB_RDISK | i); config_save(); } void -MediaMenu::zipEject(int i) +MediaMenu::rdiskEject(int i) { - const auto dev = static_cast(zip_drives[i].priv); + const auto dev = static_cast(rdisk_drives[i].priv); - mhm.addImageToHistory(i, ui::MediaType::Zip, zip_drives[i].image_path, QString()); - zip_disk_close(dev); - zip_drives[i].image_path[0] = 0; - if (zip_drives[i].bus_type) { + mhm.addImageToHistory(i, ui::MediaType::RDisk, rdisk_drives[i].image_path, QString()); + rdisk_disk_close(dev); + rdisk_drives[i].image_path[0] = 0; + if (rdisk_drives[i].bus_type) { /* Signal disk change to the emulated machine. */ - zip_insert(dev); + rdisk_insert(dev); } - ui_sb_update_icon_state(SB_ZIP | i, 1); - zipUpdateMenu(i); - ui_sb_update_tip(SB_ZIP | i); + ui_sb_update_icon_state(SB_RDISK | i, 1); + rdiskUpdateMenu(i); + ui_sb_update_tip(SB_RDISK | i); config_save(); } void -MediaMenu::zipReloadPrev(int i) +MediaMenu::rdiskReloadPrev(int i) { - const auto dev = static_cast(zip_drives[i].priv); + const auto dev = static_cast(rdisk_drives[i].priv); - zip_disk_reload(dev); - if (strlen(zip_drives[i].image_path) == 0) { - ui_sb_update_icon_state(SB_ZIP | i, 1); + rdisk_disk_reload(dev); + if (strlen(rdisk_drives[i].image_path) == 0) { + ui_sb_update_icon_state(SB_RDISK | i, 1); } else { - ui_sb_update_icon_state(SB_ZIP | i, 0); + ui_sb_update_icon_state(SB_RDISK | i, 0); } + ui_sb_update_icon_wp(SB_RDISK | i, rdisk_drives[i].read_only); - zipUpdateMenu(i); - ui_sb_update_tip(SB_ZIP | i); + rdiskUpdateMenu(i); + ui_sb_update_tip(SB_RDISK | i); config_save(); } void -MediaMenu::zipReload(int index, int slot) +MediaMenu::rdiskReload(int index, int slot) { - const QString filename = mhm.getImageForSlot(index, slot, ui::MediaType::Zip); - zipMount(index, filename, false); - zipUpdateMenu(index); - ui_sb_update_tip(SB_ZIP | index); + const QString filename = mhm.getImageForSlot(index, slot, ui::MediaType::RDisk); + rdiskMount(index, filename, rdisk_drives[index].read_only); + rdiskUpdateMenu(index); + ui_sb_update_tip(SB_RDISK | index); } void -MediaMenu::zipUpdateMenu(int i) +MediaMenu::moUpdateMenu(int i) { - const QString name = zip_drives[i].image_path; - const QString prev_name = zip_drives[i].prev_image_path; - QFileInfo fi(zip_drives[i].image_path); - if (!zipMenus.contains(i)) + QString name = mo_drives[i].image_path; + QString prev_name = mo_drives[i].prev_image_path; + QFileInfo fi(mo_drives[i].image_path); + if (!moMenus.contains(i)) return; - auto *menu = zipMenus[i]; + auto *menu = moMenus[i]; auto childs = menu->children(); - auto *ejectMenu = dynamic_cast(childs[zipEjectPos]); + auto *ejectMenu = dynamic_cast(childs[moEjectPos]); ejectMenu->setEnabled(!name.isEmpty()); ejectMenu->setText(name.isEmpty() ? tr("E&ject") : tr("E&ject %1").arg(fi.fileName())); QString busName = tr("Unknown Bus"); - switch (zip_drives[i].bus_type) { + switch (mo_drives[i].bus_type) { default: break; - case ZIP_BUS_ATAPI: + case MO_BUS_ATAPI: busName = "ATAPI"; break; - case ZIP_BUS_SCSI: + case MO_BUS_SCSI: busName = "SCSI"; break; } - menu->setTitle(tr("ZIP %1 %2 (%3): %4").arg((zip_drives[i].is_250 > 0) ? QString("250") : QString("100"), QString::number(i + 1), busName, name.isEmpty() ? tr("(empty)") : name)); + menu->setTitle(tr("&MO %1 (%2): %3").arg(QString::number(i + 1), busName, name.isEmpty() ? tr("(empty)") : name)); + menu->setToolTip(tr("MO %1 (%2): %3").arg(QString::number(i + 1), busName, name.isEmpty() ? tr("(empty)") : name)); for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) - updateImageHistory(i, slot, ui::MediaType::Zip); + updateImageHistory(i, slot, ui::MediaType::Mo); +} + +void +MediaMenu::rdiskUpdateMenu(int i) +{ + const QString name = rdisk_drives[i].image_path; + const QString prev_name = rdisk_drives[i].prev_image_path; + QFileInfo fi(rdisk_drives[i].image_path); + if (!rdiskMenus.contains(i)) + return; + auto *menu = rdiskMenus[i]; + auto childs = menu->children(); + + auto *ejectMenu = dynamic_cast(childs[rdiskEjectPos]); + ejectMenu->setEnabled(!name.isEmpty()); + ejectMenu->setText(name.isEmpty() ? tr("E&ject") : tr("E&ject %1").arg(fi.fileName())); + + QString busName = tr("Unknown Bus"); + switch (rdisk_drives[i].bus_type) { + default: + break; + case RDISK_BUS_ATAPI: + busName = "ATAPI"; + break; + case RDISK_BUS_SCSI: + busName = "SCSI"; + break; + } + + menu->setTitle(tr("&Removable disk %1 (%2): %3").arg(QString::number(i + 1), busName, name.isEmpty() ? tr("(empty)") : name)); + menu->setToolTip(tr("Removable disk %1 (%2): %3").arg(QString::number(i + 1), busName, name.isEmpty() ? tr("(empty)") : name)); + + for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) + updateImageHistory(i, slot, ui::MediaType::RDisk); } void @@ -947,6 +1070,12 @@ MediaMenu::moMount(int i, const QString &filename, bool wp) mo_drives[i].read_only = wp; if (!filename.isEmpty()) { QByteArray filenameBytes = filename.toUtf8(); + + if (filename.left(5) == "wp://") + mo_drives[i].read_only = 1; + else if (mo_drives[i].read_only) + filenameBytes = QString::asprintf(R"(wp://%s)", filename.toUtf8().data()).toUtf8(); + mo_load(dev, filenameBytes.data(), 1); /* Signal media change to the emulated machine. */ @@ -995,6 +1124,7 @@ MediaMenu::moReloadPrev(int i) } else { ui_sb_update_icon_state(SB_MO | i, 0); } + ui_sb_update_icon_state(SB_MO | i, mo_drives[i].read_only); moUpdateMenu(i); ui_sb_update_tip(SB_MO | i); @@ -1011,39 +1141,6 @@ MediaMenu::moReload(int index, int slot) ui_sb_update_tip(SB_MO | index); } -void -MediaMenu::moUpdateMenu(int i) -{ - QString name = mo_drives[i].image_path; - QString prev_name = mo_drives[i].prev_image_path; - QFileInfo fi(mo_drives[i].image_path); - if (!moMenus.contains(i)) - return; - auto *menu = moMenus[i]; - auto childs = menu->children(); - - auto *ejectMenu = dynamic_cast(childs[moEjectPos]); - ejectMenu->setEnabled(!name.isEmpty()); - ejectMenu->setText(name.isEmpty() ? tr("E&ject") : tr("E&ject %1").arg(fi.fileName())); - - QString busName = tr("Unknown Bus"); - switch (mo_drives[i].bus_type) { - default: - break; - case MO_BUS_ATAPI: - busName = "ATAPI"; - break; - case MO_BUS_SCSI: - busName = "SCSI"; - break; - } - - menu->setTitle(tr("MO %1 (%2): %3").arg(QString::number(i + 1), busName, name.isEmpty() ? tr("(empty)") : name)); - - for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) - updateImageHistory(i, slot, ui::MediaType::Mo); -} - void MediaMenu::nicConnect(int i) { @@ -1084,6 +1181,12 @@ MediaMenu::nicUpdateMenu(int i) case NET_TYPE_TAP: netType = "TAP"; break; + case NET_TYPE_NMSWITCH: + netType = "Local Switch"; + break; + case NET_TYPE_NRSWITCH: + netType = "Remote Switch"; + break; } QString devName = DeviceConfig::DeviceName(network_card_getdevice(net_cards_conf[i].device_num), network_card_get_internal_name(net_cards_conf[i].device_num), 1); @@ -1093,7 +1196,8 @@ MediaMenu::nicUpdateMenu(int i) auto *connectedAction = dynamic_cast(childs[netDisconnPos]); connectedAction->setChecked(network_is_connected(i)); - menu->setTitle(tr("NIC %1 (%2) %3").arg(QString::number(i + 1), netType, devName)); + menu->setTitle(tr("&NIC %1 (%2) %3").arg(QString::number(i + 1), netType, devName)); + menu->setToolTip(tr("NIC %1 (%2) %3").arg(QString::number(i + 1), netType, devName)); } QString @@ -1158,21 +1262,21 @@ plat_cdrom_ui_update(uint8_t id, uint8_t reload) } void -zip_eject(uint8_t id) +rdisk_eject(uint8_t id) { - MediaMenu::ptr->zipEject(id); + MediaMenu::ptr->rdiskEject(id); } void -zip_mount(uint8_t id, char *fn, uint8_t wp) +rdisk_mount(uint8_t id, char *fn, uint8_t wp) { - MediaMenu::ptr->zipMount(id, QString(fn), wp); + MediaMenu::ptr->rdiskMount(id, QString(fn), wp); } void -zip_reload(uint8_t id) +rdisk_reload(uint8_t id) { - MediaMenu::ptr->zipReloadPrev(id); + MediaMenu::ptr->rdiskReloadPrev(id); } void diff --git a/src/qt/qt_mediamenu.hpp b/src/qt/qt_mediamenu.hpp index ed97a0a50..fb24d24e0 100644 --- a/src/qt/qt_mediamenu.hpp +++ b/src/qt/qt_mediamenu.hpp @@ -17,7 +17,7 @@ public: void refresh(QMenu *parentMenu); - // because some 86box C-only code needs to call zip and + // because some 86box C-only code needs to call rdisk and // mo eject directly static std::shared_ptr ptr; @@ -51,13 +51,13 @@ public: void clearImageHistory(); void cdromUpdateMenu(int i); - void zipNewImage(int i); - void zipSelectImage(int i, bool wp); - void zipMount(int i, const QString &filename, bool wp); - void zipEject(int i); - void zipReloadPrev(int i); - void zipReload(int index, int slot); - void zipUpdateMenu(int i); + void rdiskNewImage(int i); + void rdiskSelectImage(int i, bool wp); + void rdiskMount(int i, const QString &filename, bool wp); + void rdiskEject(int i); + void rdiskReloadPrev(int i); + void rdiskReload(int index, int slot); + void rdiskUpdateMenu(int i); void moNewImage(int i); void moSelectImage(int i, bool wp); @@ -84,7 +84,7 @@ private: QMap cartridgeMenus; QMap floppyMenus; QMap cdromMenus; - QMap zipMenus; + QMap rdiskMenus; QMap moMenus; QMap netMenus; @@ -111,8 +111,8 @@ private: int cdromEjectPos; int cdromImageHistoryPos[MAX_PREV_IMAGES]; - int zipEjectPos; - int zipImageHistoryPos[MAX_PREV_IMAGES]; + int rdiskEjectPos; + int rdiskImageHistoryPos[MAX_PREV_IMAGES]; int moEjectPos; int moImageHistoryPos[MAX_PREV_IMAGES]; diff --git a/src/qt/qt_newfloppydialog.cpp b/src/qt/qt_newfloppydialog.cpp index 58a7a3df2..d9ae09d0c 100644 --- a/src/qt/qt_newfloppydialog.cpp +++ b/src/qt/qt_newfloppydialog.cpp @@ -29,7 +29,7 @@ extern "C" { #include <86box/plat.h> #include <86box/random.h> #include <86box/scsi_device.h> -#include <86box/zip.h> +#include <86box/rdisk.h> #include <86box/mo.h> } @@ -110,7 +110,7 @@ static const QStringList floppyTypes = { "2.88 MB", }; -static const QStringList zipTypes = { +static const QStringList rdiskTypes = { "ZIP 100", "ZIP 250", }; @@ -146,11 +146,11 @@ NewFloppyDialog::NewFloppyDialog(MediaType type, QWidget *parent) tr("All images") % util::DlgFilter({ "86f", "dsk", "flp", "im?", "img", "*fd?" }) % tr("Basic sector images") % util::DlgFilter({ "dsk", "flp", "im?", "img", "*fd?" }) % tr("Surface images") % util::DlgFilter({ "86f" }, true)); break; - case MediaType::Zip: - for (int i = 0; i < zipTypes.size(); ++i) { - Models::AddEntry(model, tr(zipTypes[i].toUtf8().data()), i); + case MediaType::RDisk: + for (int i = 0; i < rdiskTypes.size(); ++i) { + Models::AddEntry(model, tr(rdiskTypes[i].toUtf8().data()), i); } - ui->fileField->setFilter(tr("ZIP images") % util::DlgFilter({ "im?", "img", "zdi" }, true)); + ui->fileField->setFilter(tr("Removable disk images") % util::DlgFilter({ "im?", "img", "rdi", "zdi" }, true)); break; case MediaType::Mo: for (int i = 0; i < moTypes.size(); ++i) { @@ -218,13 +218,13 @@ NewFloppyDialog::onCreate() } } break; - case MediaType::Zip: + case MediaType::RDisk: { fileType = fi.suffix().toLower() == QStringLiteral("zdi") ? FileType::Zdi : FileType::Img; std::atomic_bool res; std::thread t([this, &res, filename, fileType, &progress] { - res = createZipSectorImage(filename, disk_sizes[ui->comboBoxSize->currentIndex() + 12], fileType, progress); + res = createRDiskSectorImage(filename, disk_sizes[ui->comboBoxSize->currentIndex() + 12], fileType, progress); }); progress.exec(); t.join(); @@ -463,7 +463,7 @@ NewFloppyDialog::createSectorImage(const QString &filename, const disk_size_t &d } bool -NewFloppyDialog::createZipSectorImage(const QString &filename, const disk_size_t &disk_size, FileType type, QProgressDialog &pbar) +NewFloppyDialog::createRDiskSectorImage(const QString &filename, const disk_size_t &disk_size, FileType type, QProgressDialog &pbar) { uint64_t total_size = 0; uint32_t total_sectors = 0; diff --git a/src/qt/qt_newfloppydialog.hpp b/src/qt/qt_newfloppydialog.hpp index a342df567..7429fc186 100644 --- a/src/qt/qt_newfloppydialog.hpp +++ b/src/qt/qt_newfloppydialog.hpp @@ -16,7 +16,7 @@ class NewFloppyDialog : public QDialog { public: enum class MediaType { Floppy, - Zip, + RDisk, Mo, }; enum class FileType { @@ -42,7 +42,7 @@ private: bool create86f(const QString &filename, const disk_size_t &disk_size, uint8_t rpm_mode); bool createSectorImage(const QString &filename, const disk_size_t &disk_size, FileType type); - bool createZipSectorImage(const QString &filename, const disk_size_t &disk_size, FileType type, QProgressDialog &pbar); + bool createRDiskSectorImage(const QString &filename, const disk_size_t &disk_size, FileType type, QProgressDialog &pbar); bool createMoSectorImage(const QString &filename, int8_t disk_size, FileType type, QProgressDialog &pbar); }; diff --git a/src/qt/qt_openglrenderer.cpp b/src/qt/qt_openglrenderer.cpp index f1fa5eecf..4ec091eb2 100644 --- a/src/qt/qt_openglrenderer.cpp +++ b/src/qt/qt_openglrenderer.cpp @@ -595,7 +595,7 @@ load_texture(const char *f, struct shader_texture *tex) int bpp = 4; - GLubyte *data = (GLubyte *) malloc(width * height * bpp); + GLubyte *data = (GLubyte *) malloc((size_t) width * height * bpp); int x, y, Y; for (y = 0; y < height; ++y) { @@ -1709,7 +1709,7 @@ OpenGLRenderer::render() plat_tempfile(fn, NULL, (char*)".png"); strcat(path, fn); - unsigned char *rgba = (unsigned char *)calloc(1, width * height * 4); + unsigned char *rgba = (unsigned char *) calloc(1, (size_t) width * height * 4); glw.glFinish(); glw.glReadPixels(window_rect.x, window_rect.y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, rgba); diff --git a/src/qt/qt_openglshaderconfig.ui b/src/qt/qt_openglshaderconfig.ui index 1aebdb6f6..dc743f57e 100644 --- a/src/qt/qt_openglshaderconfig.ui +++ b/src/qt/qt_openglshaderconfig.ui @@ -15,7 +15,7 @@ - QLayout::SizeConstraint::SetMinAndMaxSize + QLayout::SetMinAndMaxSize @@ -33,10 +33,10 @@ - QLayout::SizeConstraint::SetMaximumSize + QLayout::SetMaximumSize - QFormLayout::FieldGrowthPolicy::AllNonFixedFieldsGrow + QFormLayout::AllNonFixedFieldsGrow @@ -45,10 +45,10 @@ - Qt::Orientation::Horizontal + Qt::Horizontal - QDialogButtonBox::StandardButton::Apply|QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok|QDialogButtonBox::StandardButton::Reset + QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset diff --git a/src/qt/qt_openglshadermanagerdialog.ui b/src/qt/qt_openglshadermanagerdialog.ui index 2a72c69ed..82006c713 100644 --- a/src/qt/qt_openglshadermanagerdialog.ui +++ b/src/qt/qt_openglshadermanagerdialog.ui @@ -15,8 +15,82 @@ - QLayout::SizeConstraint::SetFixedSize + QLayout::SetFixedSize + + + + Render behavior + + + + QLayout::SetDefaultConstraint + + + + + Synchronize with video + + + true + + + + + + + Use target framerate: + + + + + + + 15 + + + 240 + + + 60 + + + Qt::Horizontal + + + false + + + false + + + + + + + fps + + + 15 + + + 240 + + + 60 + + + + + + + VSync + + + + + + @@ -24,22 +98,22 @@ - QLayout::SizeConstraint::SetFixedSize + QLayout::SetFixedSize - QAbstractItemView::DragDropMode::InternalMove + QAbstractItemView::InternalMove - QAbstractItemView::SelectionBehavior::SelectItems + QAbstractItemView::SelectItems - QLayout::SizeConstraint::SetFixedSize + QLayout::SetFixedSize @@ -58,7 +132,7 @@ - Qt::Orientation::Vertical + Qt::Vertical @@ -95,7 +169,7 @@ - Qt::Orientation::Vertical + Qt::Vertical @@ -108,10 +182,10 @@ - Qt::Orientation::Vertical + Qt::Vertical - QDialogButtonBox::StandardButton::Apply|QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok + QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok false @@ -123,80 +197,6 @@ - - - - Render behavior - - - - QLayout::SizeConstraint::SetDefaultConstraint - - - - - Use target framerate: - - - - - - - 15 - - - 240 - - - 60 - - - Qt::Orientation::Horizontal - - - false - - - false - - - - - - - Synchronize with video - - - true - - - - - - - VSync - - - - - - - fps - - - 15 - - - 240 - - - 60 - - - - - - diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index a2c0bc410..0de5d840c 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -361,7 +361,9 @@ path_append_filename(char *dest, const char *s1, const char *s2) if (!dest || !s1 || !s2) return; - snprintf(dest, dest_size, "%s", s1); + if (dest != s1) + snprintf(dest, dest_size, "%s", s1); + len = strlen(dest); if (len > 0 && dest[len - 1] != '/' && dest[len - 1] != '\\') { @@ -439,6 +441,8 @@ plat_pause(int p) } if ((!!p) == dopause) { + QTimer::singleShot(0, main_window, &MainWindow::updateUiPauseState); + #ifdef Q_OS_WINDOWS if (source_hwnd) PostMessage((HWND) (uintptr_t) source_hwnd, WM_SENDSTATUS, (WPARAM) !!p, (LPARAM) (HWND) main_window->winId()); @@ -662,9 +666,9 @@ plat_chdir(char *path) } void -plat_get_global_config_dir(char *outbuf, const uint8_t len) +plat_get_global_config_dir(char *outbuf, const size_t len) { - const auto dir = QDir(QStandardPaths::standardLocations(QStandardPaths::AppConfigLocation)[0]); + const auto dir = QDir(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); if (!dir.exists()) { if (!dir.mkpath(".")) { qWarning("Failed to create global configuration directory %s", dir.absolutePath().toUtf8().constData()); @@ -674,9 +678,9 @@ plat_get_global_config_dir(char *outbuf, const uint8_t len) } void -plat_get_global_data_dir(char *outbuf, const uint8_t len) +plat_get_global_data_dir(char *outbuf, const size_t len) { - const auto dir = QDir(QStandardPaths::standardLocations(QStandardPaths::AppDataLocation)[0]); + const auto dir = QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)); if (!dir.exists()) { if (!dir.mkpath(".")) { qWarning("Failed to create global data directory %s", dir.absolutePath().toUtf8().constData()); @@ -688,10 +692,21 @@ plat_get_global_data_dir(char *outbuf, const uint8_t len) void plat_get_temp_dir(char *outbuf, const uint8_t len) { - const auto dir = QDir(QStandardPaths::standardLocations(QStandardPaths::TempLocation)[0]); + const auto dir = QDir(QStandardPaths::writableLocation(QStandardPaths::TempLocation)); strncpy(outbuf, dir.canonicalPath().toUtf8().constData(), len); } +void +plat_get_vmm_dir(char *outbuf, const size_t len) +{ +#ifdef Q_OS_WINDOWS + const auto path = QDir::home().filePath("86Box VMs"); +#else + const auto path = QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).filePath("Virtual Machines"); +#endif + strncpy(outbuf, path.toUtf8().constData(), len); +} + void plat_init_rom_paths(void) { diff --git a/src/qt/qt_progsettings.cpp b/src/qt/qt_progsettings.cpp index 825689e78..c2fa75dff 100644 --- a/src/qt/qt_progsettings.cpp +++ b/src/qt/qt_progsettings.cpp @@ -47,7 +47,6 @@ QTranslator *ProgSettings::qtTranslator = nullptr; QVector> ProgSettings::languages = { { "system", "(System Default)" }, - { "ca-ES", "Catalan (Spain)" }, { "zh-CN", "Chinese (Simplified)" }, { "zh-TW", "Chinese (Traditional)" }, { "hr-HR", "Croatian (Croatia)" }, @@ -57,11 +56,11 @@ QVector> ProgSettings::languages = { { "en-US", "English (United States)" }, { "fi-FI", "Finnish (Finland)" }, { "fr-FR", "French (France)" }, - { "hu-HU", "Hungarian (Hungary)" }, { "it-IT", "Italian (Italy)" }, { "ja-JP", "Japanese (Japan)" }, { "ko-KR", "Korean (Korea)" }, { "nl-NL", "Dutch (Netherlands)" }, + { "nb-NO", "Norwegian (Bokmål)" }, { "pl-PL", "Polish (Poland)" }, { "pt-BR", "Portuguese (Brazil)" }, { "pt-PT", "Portuguese (Portugal)" }, @@ -173,7 +172,7 @@ ProgSettings::languageCodeToId(QString langCode) QString ProgSettings::languageIdToCode(int id) { - if ((id == 0) || (id >= languages.length())) { + if ((id <= 0) || (id >= languages.length())) { return "system"; } return languages[id].first; @@ -197,31 +196,64 @@ ProgSettings::loadTranslators(QObject *parent) for (int i = 0; i < QLocale::system().uiLanguages().size(); i++) { localetofilename = QLocale::system().uiLanguages()[i]; if (translator->load(QLatin1String("86box_") + localetofilename, QLatin1String(":/"))) { - qDebug() << "Translations loaded.\n"; + qDebug() << "Translations loaded."; QCoreApplication::installTranslator(translator); - if (!qtTranslator->load(QLatin1String("qtbase_") + localetofilename.replace('-', '_'), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) - if (!qtTranslator->load(QLatin1String("qtbase_") + localetofilename.left(localetofilename.indexOf('-')), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) - if (!qtTranslator->load(QLatin1String("qt_") + localetofilename.replace('-', '_'), QApplication::applicationDirPath() + "/./translations/")) - qtTranslator->load(QLatin1String("qt_") + localetofilename.replace('-', '_'), QLatin1String(":/")); - if (QApplication::installTranslator(qtTranslator)) { - qDebug() << "Qt translations loaded." - << "\n"; - } + /* First try qtbase */ + if (!loadQtTranslations(QLatin1String("qtbase_") + localetofilename.replace('-', '_'))) + /* If that fails, try legacy qt_* translations */ + if (!loadQtTranslations(QLatin1String("qt_") + localetofilename.replace('-', '_'))) + qDebug() << "Failed to find Qt translations!"; + if (QCoreApplication::installTranslator(qtTranslator)) + qDebug() << "Qt translations loaded."; break; } } } else { - translator->load(QLatin1String("86box_") + languages[lang_id].first, QLatin1String(":/")); + if (translator->load(QLatin1String("86box_") + languages[lang_id].first, QLatin1String(":/"))) + qDebug() << "Translations loaded."; QCoreApplication::installTranslator(translator); - if (!qtTranslator->load(QLatin1String("qtbase_") + QString(languages[lang_id].first).replace('-', '_'), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) - if (!qtTranslator->load(QLatin1String("qtbase_") + QString(languages[lang_id].first).left(QString(languages[lang_id].first).indexOf('-')), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) - if(!qtTranslator->load(QLatin1String("qt_") + QString(languages[lang_id].first).replace('-', '_'), QApplication::applicationDirPath() + "/./translations/")) - qtTranslator->load(QLatin1String("qt_") + QString(languages[lang_id].first).replace('-', '_'), QLatin1String(":/")); + /* First try qtbase */ + if (!loadQtTranslations(QLatin1String("qtbase_") + QString(languages[lang_id].first).replace('-', '_'))) + /* If that fails, try legacy qt_* translations */ + if (!loadQtTranslations(QLatin1String("qt_") + QString(languages[lang_id].first).replace('-', '_'))) + qDebug() << "Failed to find Qt translations!"; - QCoreApplication::installTranslator(qtTranslator); + if (QCoreApplication::installTranslator(qtTranslator)) + qDebug() << "Qt translations loaded."; } } +bool +ProgSettings::loadQtTranslations(const QString name) +{ + QString name_lang_only = name.left(name.indexOf('_')); + /* System-wide translations */ +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + if (qtTranslator->load(name, QLibraryInfo::path(QLibraryInfo::TranslationsPath))) +#else + if (qtTranslator->load(name, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) +#endif + return true; +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + else if (qtTranslator->load(name_lang_only, QLibraryInfo::path(QLibraryInfo::TranslationsPath))) +#else + else if (qtTranslator->load(name_lang_only, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) +#endif + return true; + /* Bundled translations (embedded) */ + else if (qtTranslator->load(name, QLatin1String(":/"))) + return true; + else if (qtTranslator->load(name_lang_only, QLatin1String(":/"))) + return true; + /* Bundled translations (external) */ + else if (qtTranslator->load(name, QApplication::applicationDirPath() + "/./translations/")) + return true; + else if (qtTranslator->load(name_lang_only, QApplication::applicationDirPath() + "/./translations/")) + return true; + else + return false; +} + void ProgSettings::on_pushButtonLanguage_released() { diff --git a/src/qt/qt_progsettings.hpp b/src/qt/qt_progsettings.hpp index 31600e7f1..9445d2f86 100644 --- a/src/qt/qt_progsettings.hpp +++ b/src/qt/qt_progsettings.hpp @@ -49,6 +49,7 @@ private slots: private: Ui::ProgSettings *ui; + static bool loadQtTranslations(const QString name); friend class MainWindow; double mouseSensitivity; diff --git a/src/qt/qt_progsettings.ui b/src/qt/qt_progsettings.ui index 6020efd77..abaee5019 100644 --- a/src/qt/qt_progsettings.ui +++ b/src/qt/qt_progsettings.ui @@ -27,28 +27,15 @@ - QLayout::SizeConstraint::SetFixedSize + QLayout::SetFixedSize - - + + - Default + Language: - - - - Qt::Orientation::Horizontal - - - - 40 - 20 - - - - @@ -61,20 +48,10 @@ - - - - <html><head/><body><p>When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.</p></body></html> - - - Select media images from program working directory - - - - Qt::Orientation::Horizontal + Qt::Horizontal @@ -84,13 +61,20 @@ - - + + Default + + + + Mouse sensitivity: + + + @@ -109,31 +93,37 @@ 100 - Qt::Orientation::Horizontal + Qt::Horizontal - - - - Language: - - - - - - - Ask for confirmation before saving settings - - - - - + + - Qt::Orientation::Horizontal + Qt::Horizontal - - QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok + + + 40 + 20 + + + + + + + + Default + + + + + + + <html><head/><body><p>When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.</p></body></html> + + + Select media images from program working directory @@ -144,10 +134,17 @@ - - + + - Mouse sensitivity: + Ask for confirmation before saving settings + + + + + + + Ask for confirmation before quitting @@ -158,10 +155,13 @@ - - - - Ask for confirmation before quitting + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok diff --git a/src/qt/qt_rendererstack.cpp b/src/qt/qt_rendererstack.cpp index 821b4c741..ade27d831 100644 --- a/src/qt/qt_rendererstack.cpp +++ b/src/qt/qt_rendererstack.cpp @@ -45,6 +45,8 @@ #include #include +#include + #include #include #include @@ -96,6 +98,17 @@ RendererStack::RendererStack(QWidget *parent, int monitor_index) ui->setupUi(this); m_monitor_index = monitor_index; + + + if (monitor_index >= 1) { + QTimer* frameRateTimer = new QTimer(this); + frameRateTimer->setSingleShot(false); + frameRateTimer->setInterval(1000); + connect(frameRateTimer, &QTimer::timeout, [this] { + this->setWindowTitle(QObject::tr("86Box Monitor #") + QString::number(m_monitor_index + 1) + QString(" - ") + tr("%1 Hz").arg(QString::number(monitors[m_monitor_index].mon_actualrenderedframes.load()) + (monitors[m_monitor_index].mon_interlace ? "i" : ""))); + }); + frameRateTimer->start(1000); + } #if defined __unix__ && !defined __HAIKU__ memset(auto_mouse_type, 0, sizeof (auto_mouse_type)); mousedata.mouse_type = getenv("EMU86BOX_MOUSE"); @@ -170,7 +183,11 @@ RendererStack::mouseReleaseEvent(QMouseEvent *event) rw_hwnd = (HWND) this->winId(); #endif +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + if (!dopause && this->geometry().contains(m_monitor_index >= 1 ? event->globalPosition().toPoint() : event->position().toPoint()) && +#else if (!dopause && this->geometry().contains(m_monitor_index >= 1 ? event->globalPos() : event->pos()) && +#endif (event->button() == Qt::LeftButton) && !mouse_capture && (isMouseDown & 1) && (kbd_req_capture || (mouse_get_buttons() != 0)) && (mouse_input_mode == 0)) { @@ -493,8 +510,13 @@ RendererStack::event(QEvent* event) if (m_monitor_index >= 1) { if (mouse_input_mode >= 1) { +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + mouse_x_abs = (mouse_event->position().x()) / (double)width(); + mouse_y_abs = (mouse_event->position().y()) / (double)height(); +#else mouse_x_abs = (mouse_event->localPos().x()) / (double)width(); mouse_y_abs = (mouse_event->localPos().y()) / (double)height(); +#endif if (!mouse_tablet_in_proximity) mouse_tablet_in_proximity = mousedata.mouse_tablet_in_proximity; mouse_x_abs -= rendererWindow->destinationF.left(); @@ -514,8 +536,13 @@ RendererStack::event(QEvent* event) #ifdef Q_OS_WINDOWS if (mouse_input_mode == 0) { +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + mouse_x_abs = (mouse_event->position().x()) / (double)width(); + mouse_y_abs = (mouse_event->position().y()) / (double)height(); +#else mouse_x_abs = (mouse_event->localPos().x()) / (double)width(); mouse_y_abs = (mouse_event->localPos().y()) / (double)height(); +#endif mouse_x_abs -= rendererWindow->destinationF.left(); mouse_y_abs -= rendererWindow->destinationF.top(); @@ -531,8 +558,13 @@ RendererStack::event(QEvent* event) } #endif +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + mouse_x_abs = (mouse_event->position().x()) / (double)width(); + mouse_y_abs = (mouse_event->position().y()) / (double)height(); +#else mouse_x_abs = (mouse_event->localPos().x()) / (double)width(); mouse_y_abs = (mouse_event->localPos().y()) / (double)height(); +#endif mouse_x_abs -= rendererWindow->destinationF.left(); mouse_y_abs -= rendererWindow->destinationF.top(); diff --git a/src/qt/qt_settings.cpp b/src/qt/qt_settings.cpp index 19a537652..e15015403 100644 --- a/src/qt/qt_settings.cpp +++ b/src/qt/qt_settings.cpp @@ -50,7 +50,11 @@ public: SettingsModel(QObject *parent) : QAbstractListModel(parent) { +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + fontHeight = QFontMetrics(qApp->font()).height(); +#else fontHeight = QApplication::fontMetrics().height(); +#endif } QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; @@ -164,24 +168,24 @@ Settings::Settings(QWidget *parent) connect(floppyCdrom, &SettingsFloppyCDROM::cdromChannelChanged, otherRemovable, &SettingsOtherRemovable::reloadBusChannels_MO); connect(floppyCdrom, &SettingsFloppyCDROM::cdromChannelChanged, otherRemovable, - &SettingsOtherRemovable::reloadBusChannels_ZIP); + &SettingsOtherRemovable::reloadBusChannels_RDisk); connect(harddisks, &SettingsHarddisks::driveChannelChanged, floppyCdrom, &SettingsFloppyCDROM::reloadBusChannels); connect(harddisks, &SettingsHarddisks::driveChannelChanged, otherRemovable, &SettingsOtherRemovable::reloadBusChannels_MO); connect(harddisks, &SettingsHarddisks::driveChannelChanged, otherRemovable, - &SettingsOtherRemovable::reloadBusChannels_ZIP); + &SettingsOtherRemovable::reloadBusChannels_RDisk); connect(otherRemovable, &SettingsOtherRemovable::moChannelChanged, harddisks, &SettingsHarddisks::reloadBusChannels); connect(otherRemovable, &SettingsOtherRemovable::moChannelChanged, floppyCdrom, &SettingsFloppyCDROM::reloadBusChannels); connect(otherRemovable, &SettingsOtherRemovable::moChannelChanged, otherRemovable, - &SettingsOtherRemovable::reloadBusChannels_ZIP); - connect(otherRemovable, &SettingsOtherRemovable::zipChannelChanged, harddisks, + &SettingsOtherRemovable::reloadBusChannels_RDisk); + connect(otherRemovable, &SettingsOtherRemovable::rdiskChannelChanged, harddisks, &SettingsHarddisks::reloadBusChannels); - connect(otherRemovable, &SettingsOtherRemovable::zipChannelChanged, floppyCdrom, + connect(otherRemovable, &SettingsOtherRemovable::rdiskChannelChanged, floppyCdrom, &SettingsFloppyCDROM::reloadBusChannels); - connect(otherRemovable, &SettingsOtherRemovable::zipChannelChanged, otherRemovable, + connect(otherRemovable, &SettingsOtherRemovable::rdiskChannelChanged, otherRemovable, &SettingsOtherRemovable::reloadBusChannels_MO); connect(ui->listView->selectionModel(), &QItemSelectionModel::currentChanged, this, diff --git a/src/qt/qt_settings_bus_tracking.cpp b/src/qt/qt_settings_bus_tracking.cpp index 6fb8637da..c811cc7c0 100644 --- a/src/qt/qt_settings_bus_tracking.cpp +++ b/src/qt/qt_settings_bus_tracking.cpp @@ -23,10 +23,14 @@ #include "86box/hdd.h" #include "86box/scsi.h" +#include "86box/cdrom.h" #include "qt_settings_bus_tracking.hpp" SettingsBusTracking::SettingsBusTracking() { + mitsumi_tracking = false; + + mke_tracking = 0x0000000000000000ULL; mfm_tracking = 0x0000000000000000ULL; esdi_tracking = 0x0000000000000000ULL; xta_tracking = 0x0000000000000000ULL; @@ -38,40 +42,76 @@ SettingsBusTracking::SettingsBusTracking() scsi_tracking[i] = 0x0000000000000000ULL; } +uint8_t +SettingsBusTracking::next_free_mke_channel() +{ + uint64_t mask; + uint8_t ret = CHANNEL_NONE; + + for (uint8_t i = 0; i < 4; i++) { + mask = 0xffULL << ((uint64_t) ((i << 3) & 0x3f)); + + if (!(mke_tracking & mask)) { + ret = (uint8_t) i; + break; + } + } + + return ret; +} + uint8_t SettingsBusTracking::next_free_mfm_channel() { - if ((mfm_tracking & 0xff00ULL) && !(mfm_tracking & 0x00ffULL)) - return 1; + uint64_t mask; + uint8_t ret = CHANNEL_NONE; - if (!(mfm_tracking & 0xff00ULL) && (mfm_tracking & 0x00ffULL)) - return 0; + for (uint8_t i = 0; i < 2; i++) { + mask = 0xffULL << ((uint64_t) ((i << 3) & 0x3f)); - return CHANNEL_NONE; + if (!(mfm_tracking & mask)) { + ret = (uint8_t) i; + break; + } + } + + return ret; } uint8_t SettingsBusTracking::next_free_esdi_channel() { - if ((esdi_tracking & 0xff00ULL) && !(esdi_tracking & 0x00ffULL)) - return 1; + uint64_t mask; + uint8_t ret = CHANNEL_NONE; - if (!(esdi_tracking & 0xff00ULL) && (esdi_tracking & 0x00ffULL)) - return 0; + for (uint8_t i = 0; i < 2; i++) { + mask = 0xffULL << ((uint64_t) ((i << 3) & 0x3f)); - return CHANNEL_NONE; + if (!(esdi_tracking & mask)) { + ret = (uint8_t) i; + break; + } + } + + return ret; } uint8_t SettingsBusTracking::next_free_xta_channel() { - if ((xta_tracking & 0xff00ULL) && !(xta_tracking & 0x00ffULL)) - return 1; + uint64_t mask; + uint8_t ret = CHANNEL_NONE; - if (!(xta_tracking & 0xff00ULL) && (xta_tracking & 0x00ffULL)) - return 0; + for (uint8_t i = 0; i < 2; i++) { + mask = 0xffULL << ((uint64_t) ((i << 3) & 0x3f)); - return CHANNEL_NONE; + if (!(xta_tracking & mask)) { + ret = (uint8_t) i; + break; + } + } + + return ret; } uint8_t @@ -204,22 +244,33 @@ QList SettingsBusTracking::busChannelsInUse(const int bus) { int element; uint64_t mask; switch (bus) { + case CDROM_BUS_MKE: + for (uint8_t i = 0; i < 4; i++) { + mask = 0xffULL << ((uint64_t) ((i << 3) & 0x3f)); + if (mke_tracking & mask) + channelsInUse.append(i); + } + break; + case CDROM_BUS_MITSUMI: + if (mitsumi_tracking) + channelsInUse.append(0); + break; case HDD_BUS_MFM: - for (uint8_t i = 0; i < 32; i++) { + for (uint8_t i = 0; i < 2; i++) { mask = 0xffULL << ((uint64_t) ((i << 3) & 0x3f)); if (mfm_tracking & mask) channelsInUse.append(i); } break; case HDD_BUS_ESDI: - for (uint8_t i = 0; i < 32; i++) { + for (uint8_t i = 0; i < 2; i++) { mask = 0xffULL << ((uint64_t) ((i << 3) & 0x3f)); if (esdi_tracking & mask) channelsInUse.append(i); } break; case HDD_BUS_XTA: - for (uint8_t i = 0; i < 32; i++) { + for (uint8_t i = 0; i < 2; i++) { mask = 0xffULL << ((uint64_t) ((i << 3) & 0x3f)); if (xta_tracking & mask) channelsInUse.append(i); @@ -263,6 +314,17 @@ SettingsBusTracking::device_track(int set, uint8_t dev_type, int bus, int channe uint64_t mask; switch (bus) { + case CDROM_BUS_MKE: + mask = ((uint64_t) dev_type) << ((uint64_t) ((channel << 3) & 0x3f)); + + if (set) + mke_tracking |= mask; + else + mke_tracking &= ~mask; + break; + case CDROM_BUS_MITSUMI: + mitsumi_tracking = set; + break; case HDD_BUS_MFM: mask = ((uint64_t) dev_type) << ((uint64_t) ((channel << 3) & 0x3f)); diff --git a/src/qt/qt_settings_bus_tracking.hpp b/src/qt/qt_settings_bus_tracking.hpp index 917706428..d17ed090a 100644 --- a/src/qt/qt_settings_bus_tracking.hpp +++ b/src/qt/qt_settings_bus_tracking.hpp @@ -8,7 +8,7 @@ #define DEV_HDD 0x01 #define DEV_CDROM 0x02 -#define DEV_ZIP 0x04 +#define DEV_RDISK 0x04 #define DEV_MO 0x08 #define BUS_MFM 0 @@ -31,12 +31,14 @@ public: QList busChannelsInUse(int bus); /* These return 0xff is none is free. */ + uint8_t next_free_mke_channel(); uint8_t next_free_mfm_channel(); uint8_t next_free_esdi_channel(); uint8_t next_free_xta_channel(); uint8_t next_free_ide_channel(); uint8_t next_free_scsi_id(); + int mke_bus_full(); int mfm_bus_full(); int esdi_bus_full(); int xta_bus_full(); @@ -44,11 +46,13 @@ public: int scsi_bus_full(); /* Set: 0 = Clear the device from the tracking, 1 = Set the device on the tracking. - Device type: 1 = Hard Disk, 2 = CD-ROM, 4 = ZIP, 8 = Magneto-Optical. + Device type: 1 = Hard Disk, 2 = CD-ROM, 4 = Removable disk, 8 = Magneto-Optical. Bus: 0 = MFM, 1 = ESDI, 2 = XTA, 3 = IDE, 4 = SCSI. */ void device_track(int set, uint8_t dev_type, int bus, int channel); private: + /* 1 channel, 2 devices per channel, 8 bits per device = 16 bits. */ + uint64_t mke_tracking { 0 }; /* 1 channel, 2 devices per channel, 8 bits per device = 16 bits. */ uint64_t mfm_tracking { 0 }; /* 1 channel, 2 devices per channel, 8 bits per device = 16 bits. */ @@ -61,6 +65,8 @@ private: 8 bits per device (future-proofing) = 2048 bits. */ uint64_t scsi_tracking[32] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + + bool mitsumi_tracking; }; #endif // QT_SETTINGS_BUS_TRACKING_HPP diff --git a/src/qt/qt_settingsdisplay.cpp b/src/qt/qt_settingsdisplay.cpp index e50f4ebe1..15b2f4588 100644 --- a/src/qt/qt_settingsdisplay.cpp +++ b/src/qt/qt_settingsdisplay.cpp @@ -183,7 +183,7 @@ SettingsDisplay::on_comboBoxVideo_currentIndexChanged(int index) bool machineHasMca = machine_has_bus(machineId, MACHINE_BUS_MCA) > 0; bool videoCardHas8514 = ((videoCard[0] == VID_INTERNAL) ? machine_has_flags(machineId, MACHINE_VIDEO_8514A) : (video_card_get_flags(videoCard[0]) == VIDEO_FLAG_TYPE_8514)); - bool videoCardHasXga = ((videoCard[0] == VID_INTERNAL) ? machine_has_flags(machineId, MACHINE_VIDEO_XGA) : (video_card_get_flags(videoCard[0]) == VIDEO_FLAG_TYPE_XGA)); + bool videoCardHasXga = ((videoCard[0] == VID_INTERNAL) ? 0 : (video_card_get_flags(videoCard[0]) == VIDEO_FLAG_TYPE_XGA)); bool machineSupports8514 = ((machineHasIsa16 || machineHasMca) && !videoCardHas8514); bool machineSupportsXga = ((machineHasMca && device_available(&xga_device)) && !videoCardHasXga); diff --git a/src/qt/qt_settingsfloppycdrom.cpp b/src/qt/qt_settingsfloppycdrom.cpp index bf1499076..f597aebe6 100644 --- a/src/qt/qt_settingsfloppycdrom.cpp +++ b/src/qt/qt_settingsfloppycdrom.cpp @@ -69,6 +69,7 @@ setCDROMBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint case CDROM_BUS_ATAPI: case CDROM_BUS_SCSI: case CDROM_BUS_MITSUMI: + case CDROM_BUS_MKE: icon = QIcon(":/settings/qt/icons/cdrom.ico"); break; } @@ -149,7 +150,7 @@ SettingsFloppyCDROM::SettingsFloppyCDROM(QWidget *parent) this, &SettingsFloppyCDROM::onFloppyRowChanged); ui->tableViewFloppy->setCurrentIndex(model->index(0, 0)); - Harddrives::populateRemovableBuses(ui->comboBoxBus->model()); + Harddrives::populateCDROMBuses(ui->comboBoxBus->model()); model = ui->comboBoxSpeed->model(); for (int i = 0; i < 72; i++) Models::AddEntry(model, QString("%1x").arg(i + 1), i + 1); @@ -170,11 +171,12 @@ SettingsFloppyCDROM::SettingsFloppyCDROM(QWidget *parent) setCDROMSpeed(model, idx.siblingAtColumn(1), cdrom[i].speed); else setCDROMSpeed(model, idx.siblingAtColumn(1), speed); - if (cdrom[i].bus_type == CDROM_BUS_ATAPI) + if (cdrom[i].bus_type == CDROM_BUS_MKE) + Harddrives::busTrackClass->device_track(1, DEV_CDROM, cdrom[i].bus_type, cdrom[i].mke_channel); + else if (cdrom[i].bus_type == CDROM_BUS_ATAPI) Harddrives::busTrackClass->device_track(1, DEV_CDROM, cdrom[i].bus_type, cdrom[i].ide_channel); else if (cdrom[i].bus_type == CDROM_BUS_SCSI) - Harddrives::busTrackClass->device_track(1, DEV_CDROM, cdrom[i].bus_type, - cdrom[i].scsi_device_id); + Harddrives::busTrackClass->device_track(1, DEV_CDROM, cdrom[i].bus_type, cdrom[i].scsi_device_id); else if (cdrom[i].bus_type == CDROM_BUS_MITSUMI) Harddrives::busTrackClass->device_track(1, DEV_CDROM, cdrom[i].bus_type, 0); } @@ -195,9 +197,10 @@ SettingsFloppyCDROM::SettingsFloppyCDROM(QWidget *parent) int selectedTypeRow = 0; int eligibleRows = 0; while (cdrom_drive_types[j].bus_type != BUS_TYPE_NONE) { - if (((bus_type == CDROM_BUS_ATAPI) || (bus_type == CDROM_BUS_SCSI)) && + if (((bus_type == CDROM_BUS_MKE) || (bus_type == CDROM_BUS_ATAPI) || + (bus_type == CDROM_BUS_SCSI)) && ((cdrom_drive_types[j].bus_type == bus_type) || - (cdrom_drive_types[j].bus_type == BUS_TYPE_BOTH))) { + ((cdrom_drive_types[j].bus_type == BUS_TYPE_BOTH) && (bus_type != BUS_TYPE_MKE)))) { QString name = CDROMName(j); Models::AddEntry(modelType, name, j); if (cdrom[cdromIdx].type == j) @@ -274,7 +277,7 @@ SettingsFloppyCDROM::onCDROMRowChanged(const QModelIndex ¤t) int speed = cdrom_get_speed(type); if (speed == -1) { speed = current.siblingAtColumn(1).data(Qt::UserRole).toUInt(); - ui->comboBoxSpeed->setEnabled(true); + ui->comboBoxSpeed->setEnabled((bus == CDROM_BUS_DISABLED) ? false : true); } else ui->comboBoxSpeed->setEnabled(false); ui->comboBoxSpeed->setCurrentIndex(speed == 0 ? 7 : speed - 1); @@ -286,9 +289,10 @@ SettingsFloppyCDROM::onCDROMRowChanged(const QModelIndex ¤t) int selectedTypeRow = 0; int eligibleRows = 0; while (cdrom_drive_types[j].bus_type != BUS_TYPE_NONE) { - if (((bus == CDROM_BUS_ATAPI) || (bus == CDROM_BUS_SCSI)) && + if (((bus == CDROM_BUS_MKE) || (bus == CDROM_BUS_ATAPI) || + (bus == CDROM_BUS_SCSI)) && ((cdrom_drive_types[j].bus_type == bus) || - (cdrom_drive_types[j].bus_type == BUS_TYPE_BOTH))) { + ((cdrom_drive_types[j].bus_type == BUS_TYPE_BOTH) && (bus != BUS_TYPE_MKE)))) { QString name = CDROMName(j); Models::AddEntry(modelType, name, j); if (type == j) @@ -366,7 +370,9 @@ SettingsFloppyCDROM::on_comboBoxBus_activated(int) Harddrives::busTrackClass->device_track(0, DEV_CDROM, ui->tableViewCDROM->model()->data(i, Qt::UserRole).toInt(), ui->tableViewCDROM->model()->data(i, Qt::UserRole + 1).toInt()); - if (bus_type == CDROM_BUS_ATAPI) + if (bus_type == CDROM_BUS_MKE) + ui->comboBoxChannel->setCurrentIndex(Harddrives::busTrackClass->next_free_mke_channel()); + else if (bus_type == CDROM_BUS_ATAPI) ui->comboBoxChannel->setCurrentIndex(Harddrives::busTrackClass->next_free_ide_channel()); else if (bus_type == CDROM_BUS_SCSI) ui->comboBoxChannel->setCurrentIndex(Harddrives::busTrackClass->next_free_scsi_id()); @@ -388,9 +394,10 @@ SettingsFloppyCDROM::on_comboBoxBus_activated(int) int selectedTypeRow = 0; int eligibleRows = 0; while (cdrom_drive_types[j].bus_type != BUS_TYPE_NONE) { - if (((bus_type == CDROM_BUS_ATAPI) || (bus_type == CDROM_BUS_SCSI)) && + if (((bus_type == CDROM_BUS_MKE) || (bus_type == CDROM_BUS_ATAPI) || + (bus_type == CDROM_BUS_SCSI)) && ((cdrom_drive_types[j].bus_type == bus_type) || - (cdrom_drive_types[j].bus_type == BUS_TYPE_BOTH))) { + ((cdrom_drive_types[j].bus_type == BUS_TYPE_BOTH) && (bus_type != BUS_TYPE_MKE)))) { QString name = CDROMName(j); Models::AddEntry(modelType, name, j); if (cdrom[cdromIdx].type == j) @@ -407,6 +414,20 @@ SettingsFloppyCDROM::on_comboBoxBus_activated(int) setCDROMType(ui->tableViewCDROM->model(), ui->tableViewCDROM->selectionModel()->currentIndex(), ui->comboBoxCDROMType->currentData().toUInt()); + + int speed = cdrom_get_speed(ui->comboBoxCDROMType->currentData().toUInt()); + if ((speed == -1) && (bus_type != CDROM_BUS_MITSUMI)) { + speed = ui->comboBoxSpeed->currentData().toUInt(); + ui->comboBoxSpeed->setEnabled(bus_type != CDROM_BUS_DISABLED); + } else { + ui->comboBoxSpeed->setEnabled(false); + if (bus_type == CDROM_BUS_MITSUMI) // temp hack + speed = 0; + } + ui->comboBoxSpeed->setCurrentIndex(speed == 0 ? 7 : speed - 1); + setCDROMSpeed(ui->tableViewCDROM->model(), + ui->tableViewCDROM->selectionModel()->currentIndex(), + speed); emit cdromChannelChanged(); } diff --git a/src/qt/qt_settingsfloppycdrom.ui b/src/qt/qt_settingsfloppycdrom.ui index 7dde46631..6b1036b5c 100644 --- a/src/qt/qt_settingsfloppycdrom.ui +++ b/src/qt/qt_settingsfloppycdrom.ui @@ -200,6 +200,17 @@ + + tableViewFloppy + comboBoxFloppyType + checkBoxTurboTimings + checkBoxCheckBPB + tableViewCDROM + comboBoxBus + comboBoxChannel + comboBoxSpeed + comboBoxCDROMType + diff --git a/src/qt/qt_settingsharddisks.ui b/src/qt/qt_settingsharddisks.ui index f996c76d1..e68de43d1 100644 --- a/src/qt/qt_settingsharddisks.ui +++ b/src/qt/qt_settingsharddisks.ui @@ -46,50 +46,52 @@ - - - - - Bus: - - - - - - - 30 - - - - - - - ID: - - - - - - - 30 - - - - - - - Model: - - - - - - - 30 - - - - + + + + + + Bus: + + + + + + + 30 + + + + + + + Channel: + + + + + + + 30 + + + + + + + Model: + + + + + + + 30 + + + + + diff --git a/src/qt/qt_settingsinput.cpp b/src/qt/qt_settingsinput.cpp index 6d89c511a..50e3662e9 100644 --- a/src/qt/qt_settingsinput.cpp +++ b/src/qt/qt_settingsinput.cpp @@ -8,8 +8,6 @@ * * Mouse/Joystick configuration UI module. * - * - * * Authors: Joakim L. Gilje * * Copyright 2021 Joakim L. Gilje @@ -21,12 +19,14 @@ #include #include +#include #include extern "C" { #include <86box/86box.h> #include <86box/device.h> #include <86box/machine.h> +#include <86box/keyboard.h> #include <86box/mouse.h> #include <86box/gameport.h> #include <86box/ui.h> @@ -55,7 +55,7 @@ SettingsInput::SettingsInput(QWidget *parent) horizontalHeader.append(tr("Keybind")); QTableWidget *keyTable = ui->tableKeys; - keyTable->setRowCount(10); + keyTable->setRowCount(NUM_ACCELS); keyTable->setColumnCount(3); keyTable->setColumnHidden(2, true); keyTable->setColumnWidth(0, 200); @@ -90,8 +90,10 @@ SettingsInput::~SettingsInput() void SettingsInput::save() { + keyboard_type = ui->comboBoxKeyboard->currentData().toInt(); mouse_type = ui->comboBoxMouse->currentData().toInt(); - joystick_type = ui->comboBoxJoystick->currentData().toInt(); + + joystick_type[0] = ui->comboBoxJoystick0->currentData().toInt(); // Copy accelerators from working set to global set for(int x = 0; x < NUM_ACCELS; x++) { @@ -108,10 +110,50 @@ SettingsInput::onCurrentMachineChanged(int machineId) // win_settings_video_proc, WM_INITDIALOG this->machineId = machineId; - auto *mouseModel = ui->comboBoxMouse->model(); - auto removeRows = mouseModel->rowCount(); + auto *keyboardModel = ui->comboBoxKeyboard->model(); + auto removeRows = keyboardModel->rowCount(); int selectedRow = 0; + + int c = 0; + int has_int_kbd = !!machine_has_flags(machineId, MACHINE_KEYBOARD); + + for (int i = 0; i < keyboard_get_ndev(); ++i) { + const auto *dev = keyboard_get_device(i); + int ikbd = (i == KEYBOARD_TYPE_INTERNAL); + + int pc5086_filter = (strstr(keyboard_get_internal_name(i), "ps") && + strstr(machine_get_internal_name_ex(machineId), "pc5086")); + + if ((ikbd != has_int_kbd) || !device_is_valid(dev, machineId) || pc5086_filter) + continue; + + QString name = DeviceConfig::DeviceName(dev, keyboard_get_internal_name(i), 0); + int row = keyboardModel->rowCount(); + keyboardModel->insertRow(row); + auto idx = keyboardModel->index(row, 0); + + keyboardModel->setData(idx, name, Qt::DisplayRole); + keyboardModel->setData(idx, i, Qt::UserRole); + + if (i == keyboard_type) + selectedRow = row - removeRows; + + c++; + } + keyboardModel->removeRows(0, removeRows); + ui->comboBoxKeyboard->setCurrentIndex(-1); + ui->comboBoxKeyboard->setCurrentIndex(selectedRow); + + if ((c == 1) || has_int_kbd) + ui->comboBoxKeyboard->setEnabled(false); + else + ui->comboBoxKeyboard->setEnabled(true); + + auto *mouseModel = ui->comboBoxMouse->model(); + removeRows = mouseModel->rowCount(); + + selectedRow = 0; for (int i = 0; i < mouse_get_ndev(); ++i) { const auto *dev = mouse_get_device(i); if ((i == MOUSE_TYPE_INTERNAL) && (machine_has_flags(machineId, MACHINE_MOUSE) == 0)) @@ -132,23 +174,25 @@ SettingsInput::onCurrentMachineChanged(int machineId) selectedRow = row - removeRows; } mouseModel->removeRows(0, removeRows); + ui->comboBoxMouse->setCurrentIndex(-1); ui->comboBoxMouse->setCurrentIndex(selectedRow); + // Joysticks int i = 0; const char *joyName = joystick_get_name(i); - auto *joystickModel = ui->comboBoxJoystick->model(); + auto *joystickModel = ui->comboBoxJoystick0->model(); removeRows = joystickModel->rowCount(); selectedRow = 0; while (joyName) { int row = Models::AddEntry(joystickModel, tr(joyName).toUtf8().data(), i); - if (i == joystick_type) + if (i == joystick_type[0]) selectedRow = row - removeRows; ++i; joyName = joystick_get_name(i); } joystickModel->removeRows(0, removeRows); - ui->comboBoxJoystick->setCurrentIndex(selectedRow); + ui->comboBoxJoystick0->setCurrentIndex(selectedRow); } void @@ -195,7 +239,7 @@ SettingsInput::on_tableKeys_cellDoubleClicked(int row, int col) for(int x = 0; x < NUM_ACCELS; x++) { if(QString::fromStdString(acc_keys_t[x].seq) == keyseq.toString(QKeySequence::PortableText)) { // That key is already in use - main_window->showMessage(MBX_ANSI & MBX_INFO, "Bind conflict", "This key combo is already in use", false); + QMessageBox::warning(this, tr("Bind conflict"), tr("This key combo is already in use."), QMessageBox::StandardButton::Ok); return; } } @@ -245,19 +289,30 @@ SettingsInput::on_pushButtonClearBind_clicked() strcpy(acc_keys_t[accKeyID].seq, ""); } +void +SettingsInput::on_comboBoxKeyboard_currentIndexChanged(int index) +{ + if (index < 0) + return; + int keyboardId = ui->comboBoxKeyboard->currentData().toInt(); + ui->pushButtonConfigureKeyboard->setEnabled(keyboard_has_config(keyboardId) > 0); +} + void SettingsInput::on_comboBoxMouse_currentIndexChanged(int index) { + if (index < 0) + return; int mouseId = ui->comboBoxMouse->currentData().toInt(); ui->pushButtonConfigureMouse->setEnabled(mouse_has_config(mouseId) > 0); } void -SettingsInput::on_comboBoxJoystick_currentIndexChanged(int index) +SettingsInput::on_comboBoxJoystick0_currentIndexChanged(int index) { - int joystickId = ui->comboBoxJoystick->currentData().toInt(); + int joystickId = ui->comboBoxJoystick0->currentData().toInt(); for (int i = 0; i < MAX_JOYSTICKS; ++i) { - auto *btn = findChild(QString("pushButtonJoystick%1").arg(i + 1)); + auto *btn = findChild(QString("pushButtonJoystick0%1").arg(i + 1)); if (btn == nullptr) continue; @@ -265,6 +320,13 @@ SettingsInput::on_comboBoxJoystick_currentIndexChanged(int index) } } +void +SettingsInput::on_pushButtonConfigureKeyboard_clicked() +{ + int keyboardId = ui->comboBoxKeyboard->currentData().toInt(); + DeviceConfig::ConfigureDevice(keyboard_get_device(keyboardId)); +} + void SettingsInput::on_pushButtonConfigureMouse_clicked() { @@ -273,10 +335,10 @@ SettingsInput::on_pushButtonConfigureMouse_clicked() } static int -get_axis(JoystickConfiguration &jc, int axis, int joystick_nr) +get_axis(JoystickConfiguration &jc, int axis, uint8_t gameport_nr, int joystick_nr) { int axis_sel = jc.selectedAxis(axis); - int nr_axes = plat_joystick_state[joystick_state[0][joystick_nr].plat_joystick_nr - 1].nr_axes; + int nr_axes = plat_joystick_state[joystick_state[gameport_nr][joystick_nr].plat_joystick_nr - 1].nr_axes; if (axis_sel < nr_axes) return axis_sel; @@ -289,10 +351,10 @@ get_axis(JoystickConfiguration &jc, int axis, int joystick_nr) } static int -get_pov(JoystickConfiguration &jc, int pov, int joystick_nr) +get_pov(JoystickConfiguration &jc, int pov, uint8_t gameport_nr, int joystick_nr) { int pov_sel = jc.selectedPov(pov); - int nr_povs = plat_joystick_state[joystick_state[0][joystick_nr].plat_joystick_nr - 1].nr_povs * 2; + int nr_povs = plat_joystick_state[joystick_state[gameport_nr][joystick_nr].plat_joystick_nr - 1].nr_povs * 2; if (pov_sel < nr_povs) { if (pov_sel & 1) @@ -305,9 +367,9 @@ get_pov(JoystickConfiguration &jc, int pov, int joystick_nr) } static void -updateJoystickConfig(int type, int joystick_nr, QWidget *parent) +updateJoystickConfig(int type, uint8_t gameport_nr, int joystick_nr, QWidget *parent) { - JoystickConfiguration jc(type, joystick_nr, parent); + JoystickConfiguration jc(type, gameport_nr, joystick_nr, parent); switch (jc.exec()) { case QDialog::Rejected: return; @@ -315,43 +377,43 @@ updateJoystickConfig(int type, int joystick_nr, QWidget *parent) break; } - joystick_state[0][joystick_nr].plat_joystick_nr = jc.selectedDevice(); - if (joystick_state[0][joystick_nr].plat_joystick_nr) { + joystick_state[gameport_nr][joystick_nr].plat_joystick_nr = jc.selectedDevice(); + if (joystick_state[gameport_nr][joystick_nr].plat_joystick_nr) { for (int axis_nr = 0; axis_nr < joystick_get_axis_count(type); axis_nr++) { - joystick_state[0][joystick_nr].axis_mapping[axis_nr] = get_axis(jc, axis_nr, joystick_nr); + joystick_state[gameport_nr][joystick_nr].axis_mapping[axis_nr] = get_axis(jc, axis_nr, gameport_nr, joystick_nr); } for (int button_nr = 0; button_nr < joystick_get_button_count(type); button_nr++) { - joystick_state[0][joystick_nr].button_mapping[button_nr] = jc.selectedButton(button_nr); + joystick_state[gameport_nr][joystick_nr].button_mapping[button_nr] = jc.selectedButton(button_nr); } for (int pov_nr = 0; pov_nr < joystick_get_pov_count(type) * 2; pov_nr += 2) { - joystick_state[0][joystick_nr].pov_mapping[pov_nr][0] = get_pov(jc, pov_nr, joystick_nr); - joystick_state[0][joystick_nr].pov_mapping[pov_nr][1] = get_pov(jc, pov_nr + 1, joystick_nr); + joystick_state[gameport_nr][joystick_nr].pov_mapping[pov_nr][0] = get_pov(jc, pov_nr, gameport_nr, joystick_nr); + joystick_state[gameport_nr][joystick_nr].pov_mapping[pov_nr][1] = get_pov(jc, pov_nr + 1, gameport_nr, joystick_nr); } } } void -SettingsInput::on_pushButtonJoystick1_clicked() +SettingsInput::on_pushButtonJoystick01_clicked() { - updateJoystickConfig(ui->comboBoxJoystick->currentData().toInt(), 0, this); + updateJoystickConfig(ui->comboBoxJoystick0->currentData().toInt(), 0, 0, this); } void -SettingsInput::on_pushButtonJoystick2_clicked() +SettingsInput::on_pushButtonJoystick02_clicked() { - updateJoystickConfig(ui->comboBoxJoystick->currentData().toInt(), 1, this); + updateJoystickConfig(ui->comboBoxJoystick0->currentData().toInt(), 0, 1, this); } void -SettingsInput::on_pushButtonJoystick3_clicked() +SettingsInput::on_pushButtonJoystick03_clicked() { - updateJoystickConfig(ui->comboBoxJoystick->currentData().toInt(), 2, this); + updateJoystickConfig(ui->comboBoxJoystick0->currentData().toInt(), 0, 2, this); } void -SettingsInput::on_pushButtonJoystick4_clicked() +SettingsInput::on_pushButtonJoystick04_clicked() { - updateJoystickConfig(ui->comboBoxJoystick->currentData().toInt(), 3, this); + updateJoystickConfig(ui->comboBoxJoystick0->currentData().toInt(), 0, 3, this); } diff --git a/src/qt/qt_settingsinput.hpp b/src/qt/qt_settingsinput.hpp index a51ad2564..68748fa36 100644 --- a/src/qt/qt_settingsinput.hpp +++ b/src/qt/qt_settingsinput.hpp @@ -26,25 +26,28 @@ public slots: void onCurrentMachineChanged(int machineId); private slots: + void on_comboBoxKeyboard_currentIndexChanged(int index); + void on_pushButtonConfigureKeyboard_clicked(); + void on_comboBoxMouse_currentIndexChanged(int index); void on_pushButtonConfigureMouse_clicked(); - void on_comboBoxJoystick_currentIndexChanged(int index); - void on_pushButtonJoystick1_clicked(); - void on_pushButtonJoystick2_clicked(); - void on_pushButtonJoystick3_clicked(); - void on_pushButtonJoystick4_clicked(); + void on_comboBoxJoystick0_currentIndexChanged(int index); + void on_pushButtonJoystick01_clicked(); + void on_pushButtonJoystick02_clicked(); + void on_pushButtonJoystick03_clicked(); + void on_pushButtonJoystick04_clicked(); - void on_tableKeys_cellDoubleClicked(int row, int col); - void on_tableKeys_currentCellChanged(int currentRow, int currentColumn, int previousRow, int previousColumn); + void on_tableKeys_cellDoubleClicked(int row, int col); + void on_tableKeys_currentCellChanged(int currentRow, int currentColumn, int previousRow, int previousColumn); - void on_pushButtonClearBind_clicked(); - void on_pushButtonBind_clicked(); + void on_pushButtonClearBind_clicked(); + void on_pushButtonBind_clicked(); private: Ui::SettingsInput *ui; int machineId = 0; - void refreshInputList(); + void refreshInputList(); }; #endif // QT_SETTINGSINPUT_HPP diff --git a/src/qt/qt_settingsinput.ui b/src/qt/qt_settingsinput.ui index 6ac6cf38a..02b3e388c 100644 --- a/src/qt/qt_settingsinput.ui +++ b/src/qt/qt_settingsinput.ui @@ -24,14 +24,14 @@ 0 - + - Mouse: + Keyboard: - + 0 @@ -44,7 +44,7 @@ - + 0 @@ -57,58 +57,91 @@ - + - Joystick: + Mouse: - + + + + 0 + 0 + + 30 + + + + + 0 + 0 + + + + Configure + + + - + + + Joystick: + + + + + + + 30 + + + + + Joystick 1... - - + + Joystick 2... - - + + Joystick 3... - - + + Joystick 4... - + Key Bindings: - + - QAbstractItemView::EditTrigger::NoEditTriggers + QAbstractItemView::NoEditTriggers false @@ -120,11 +153,11 @@ true - QAbstractItemView::SelectionBehavior::SelectRows + QAbstractItemView::SelectRows - + false @@ -134,7 +167,7 @@ - + false diff --git a/src/qt/qt_settingsmachine.ui b/src/qt/qt_settingsmachine.ui index f677ea178..7ed70a5cf 100644 --- a/src/qt/qt_settingsmachine.ui +++ b/src/qt/qt_settingsmachine.ui @@ -41,44 +41,6 @@ 0 - - - - 30 - - - - - - - FPU: - - - - - - - Memory: - - - - - - - 30 - - - - - - - - 0 - 0 - - - - @@ -86,71 +48,10 @@ - - - - CPU type: - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - 30 - - - - - - - Frequency: - - - Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter - - - - - - - - 0 - 0 - - - - 30 - - - - - - - - - - Wait states: + + + + 30 @@ -199,6 +100,88 @@ + + + + CPU type: + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + 30 + + + + + + + Frequency: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + 30 + + + + + + + + + + FPU: + + + + + + + 30 + + + + + + + Wait states: + + + @@ -250,6 +233,23 @@ + + + + Memory: + + + + + + + + 0 + 0 + + + + @@ -302,7 +302,7 @@ - Qt::Orientation::Horizontal + Qt::Horizontal @@ -315,77 +315,107 @@ - - - - 0 - 0 - - - - Time synchronization - - - - - - Disabled - - - - - - - Enabled (UTC) - - - - - - - Enabled (local time) - - - - - - - - - - - 0 - 0 - - - - CPU frame size - - - Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop - - - - - - Larger frames (less smooth) - - - - - - - Smaller frames (smoother) - - - - - + + + + + + 0 + 0 + + + + CPU frame size + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + Larger frames (less smooth) + + + + + + + Smaller frames (smoother) + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + Time synchronization + + + + + + Disabled + + + + + + + Enabled (local time) + + + + + + + Enabled (UTC) + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - Qt::Orientation::Vertical + Qt::Vertical @@ -397,6 +427,24 @@ + + comboBoxMachineType + comboBoxMachine + pushButtonConfigure + comboBoxCPU + comboBoxSpeed + comboBoxFPU + comboBoxWaitStates + comboBoxPitMode + spinBoxRAM + checkBoxDynamicRecompiler + checkBoxFPUSoftfloat + radioButtonDisabled + radioButtonLocalTime + radioButtonUTC + radioButtonLargerFrames + radioButtonSmallerFrames + diff --git a/src/qt/qt_settingsnetwork.cpp b/src/qt/qt_settingsnetwork.cpp index 2a8332f5c..cf07234e5 100644 --- a/src/qt/qt_settingsnetwork.cpp +++ b/src/qt/qt_settingsnetwork.cpp @@ -51,11 +51,43 @@ SettingsNetwork::enableElements(Ui::SettingsNetwork *ui) auto *option_list_label = findChild(QString("labelOptionList%1").arg(i + 1)); auto *option_list_line = findChild(QString("lineOptionList%1").arg(i + 1)); + // Switch group + auto *switch_group_label = findChild(QString("labelSwitch%1").arg(i + 1)); +// auto *switch_group_hlayout = findChild(QString("HLayoutSwitch%1").arg(i + 1)); +// auto *switch_group_hspacer = findChild(QString("horizontalSpacerSwitch%1").arg(i + 1)); + auto *switch_group_value = findChild(QString("spinnerSwitch%1").arg(i + 1)); + switch_group_value->setMinimum(1); + switch_group_value->setMaximum(10); + + // Promiscuous option + auto *promisc_label = findChild(QString("labelPromisc%1").arg(i + 1)); + auto *promisc_value = findChild(QString("boxPromisc%1").arg(i + 1)); + + // Remote switch hostname + auto *hostname_label = findChild(QString("labelHostname%1").arg(i + 1)); + auto *hostname_value = findChild(QString("hostnameSwitch%1").arg(i + 1)); + bridge_line->setEnabled(net_type_cbox->currentData().toInt() == NET_TYPE_TAP); intf_cbox->setEnabled(net_type_cbox->currentData().toInt() == NET_TYPE_PCAP); conf_btn->setEnabled(network_card_has_config(nic_cbox->currentData().toInt())); // net_type_conf_btn->setEnabled(network_type_has_config(netType)); + // NEW STUFF + // Make all options invisible by default + + // Switch group + switch_group_label->setVisible(false); + switch_group_value->setVisible(false); +// switch_group_hspacer->setVisible(false); + + // Promiscuous options + promisc_label->setVisible(false); + promisc_value->setVisible(false); + + // Hostname + hostname_label->setVisible(false); + hostname_value->setVisible(false); + // Option list label and line option_list_label->setVisible(false); option_list_line->setVisible(false); @@ -76,6 +108,7 @@ SettingsNetwork::enableElements(Ui::SettingsNetwork *ui) if(nic_cbox->currentData().toInt() != 0) { // Then only enable as needed based on network type switch (net_type_cbox->currentData().toInt()) { +#ifdef HAS_VDE case NET_TYPE_VDE: // option_list_label->setText("VDE Options"); option_list_label->setVisible(true); @@ -84,6 +117,7 @@ SettingsNetwork::enableElements(Ui::SettingsNetwork *ui) vde_socket_label->setVisible(true); socket_line->setVisible(true); break; +#endif case NET_TYPE_PCAP: // option_list_label->setText("PCAP Options"); @@ -105,6 +139,38 @@ SettingsNetwork::enableElements(Ui::SettingsNetwork *ui) break; #endif +#ifdef USE_NETSWITCH + case NET_TYPE_NMSWITCH: +// option_list_label->setText("Local Switch Options"); + option_list_label->setVisible(true); + option_list_line->setVisible(true); + + // Switch group + switch_group_label->setVisible(true); + switch_group_value->setVisible(true); +// switch_group_hspacer->setVisible(false); + + // Promiscuous options + promisc_label->setVisible(true); + promisc_value->setVisible(true); + break; + + case NET_TYPE_NRSWITCH: +// option_list_label->setText("Remote Switch Options"); + option_list_label->setVisible(true); + option_list_line->setVisible(true); + + // Switch group + switch_group_label->setVisible(true); + switch_group_value->setVisible(true); +// switch_group_hspacer->setVisible(false); + + // Hostname + hostname_label->setVisible(true); + hostname_value->setVisible(true); + break; +#endif /* USE_NETSWITCH */ + case NET_TYPE_SLIRP: default: break; @@ -141,7 +207,9 @@ SettingsNetwork::save() { for (int i = 0; i < NET_CARD_MAX; ++i) { auto *cbox = findChild(QString("comboBoxNIC%1").arg(i + 1)); +#ifdef HAS_VDE auto *socket_line = findChild(QString("socketVDENIC%1").arg(i + 1)); +#endif #if defined(__unix__) || defined(__APPLE__) auto *bridge_line = findChild(QString("bridgeTAPNIC%1").arg(i + 1)); #endif @@ -149,15 +217,32 @@ SettingsNetwork::save() cbox = findChild(QString("comboBoxNet%1").arg(i + 1)); net_cards_conf[i].net_type = cbox->currentData().toInt(); cbox = findChild(QString("comboBoxIntf%1").arg(i + 1)); +#ifdef USE_NETSWITCH + auto *hostname_value = findChild(QString("hostnameSwitch%1").arg(i + 1)); + auto *promisc_value = findChild(QString("boxPromisc%1").arg(i + 1)); + auto *switch_group_value = findChild(QString("spinnerSwitch%1").arg(i + 1)); +#endif /* USE_NETSWITCH */ memset(net_cards_conf[i].host_dev_name, '\0', sizeof(net_cards_conf[i].host_dev_name)); if (net_cards_conf[i].net_type == NET_TYPE_PCAP) strncpy(net_cards_conf[i].host_dev_name, network_devs[cbox->currentData().toInt()].device, sizeof(net_cards_conf[i].host_dev_name) - 1); +#ifdef HAS_VDE else if (net_cards_conf[i].net_type == NET_TYPE_VDE) strncpy(net_cards_conf[i].host_dev_name, socket_line->text().toUtf8().constData(), sizeof(net_cards_conf[i].host_dev_name)); +#endif #if defined(__unix__) || defined(__APPLE__) else if (net_cards_conf[i].net_type == NET_TYPE_TAP) strncpy(net_cards_conf[i].host_dev_name, bridge_line->text().toUtf8().constData(), sizeof(net_cards_conf[i].host_dev_name)); #endif +#ifdef USE_NETSWITCH + else if (net_cards_conf[i].net_type == NET_TYPE_NRSWITCH) { + memset(net_cards_conf[i].nrs_hostname, '\0', sizeof(net_cards_conf[i].nrs_hostname)); + strncpy(net_cards_conf[i].nrs_hostname, hostname_value->text().toUtf8().constData(), sizeof(net_cards_conf[i].nrs_hostname) - 1); + net_cards_conf[i].switch_group = switch_group_value->value() - 1; + } else if (net_cards_conf[i].net_type == NET_TYPE_NMSWITCH) { + net_cards_conf[i].promisc_mode = promisc_value->isChecked(); + net_cards_conf[i].switch_group = switch_group_value->value() - 1; + } +#endif /* USE_NETSWITCH */ } } @@ -221,13 +306,22 @@ SettingsNetwork::onCurrentMachineChanged(int machineId) if (network_ndev > 1) Models::AddEntry(model, "PCap", NET_TYPE_PCAP); +#ifdef HAS_VDE if (network_devmap.has_vde) Models::AddEntry(model, "VDE", NET_TYPE_VDE); +#endif #if defined(__unix__) || defined(__APPLE__) Models::AddEntry(model, "TAP", NET_TYPE_TAP); #endif +#ifdef USE_NETSWITCH + Models::AddEntry(model, "Local Switch", NET_TYPE_NMSWITCH); +#ifdef ENABLE_NET_NRSWITCH + Models::AddEntry(model, "Remote Switch", NET_TYPE_NRSWITCH); +#endif /* ENABLE_NET_NRSWITCH */ +#endif /* USE_NETSWITCH */ + model->removeRows(0, removeRows); cbox->setCurrentIndex(cbox->findData(net_cards_conf[i].net_type)); @@ -249,15 +343,31 @@ SettingsNetwork::onCurrentMachineChanged(int machineId) } if (net_cards_conf[i].net_type == NET_TYPE_VDE) { +#ifdef HAS_VDE QString currentVdeSocket = net_cards_conf[i].host_dev_name; auto editline = findChild(QString("socketVDENIC%1").arg(i+1)); editline->setText(currentVdeSocket); +#else + ; +#endif #if defined(__unix__) || defined(__APPLE__) } else if (net_cards_conf[i].net_type == NET_TYPE_TAP) { QString currentTapDevice = net_cards_conf[i].host_dev_name; auto editline = findChild(QString("bridgeTAPNIC%1").arg(i+1)); editline->setText(currentTapDevice); #endif +#ifdef USE_NETSWITCH + } else if (net_cards_conf[i].net_type == NET_TYPE_NMSWITCH) { + auto *promisc_value = findChild(QString("boxPromisc%1").arg(i + 1)); + promisc_value->setCheckState(net_cards_conf[i].promisc_mode == 1 ? Qt::CheckState::Checked : Qt::CheckState::Unchecked); + auto *switch_group_value = findChild(QString("spinnerSwitch%1").arg(i + 1)); + switch_group_value->setValue(net_cards_conf[i].switch_group + 1); + } else if (net_cards_conf[i].net_type == NET_TYPE_NRSWITCH) { + auto *hostname_value = findChild(QString("hostnameSwitch%1").arg(i + 1)); + hostname_value->setText(net_cards_conf[i].nrs_hostname); + auto *switch_group_value = findChild(QString("spinnerSwitch%1").arg(i + 1)); + switch_group_value->setValue(net_cards_conf[i].switch_group + 1); +#endif /* USE_NETSWITCH */ } } } diff --git a/src/qt/qt_settingsnetwork.ui b/src/qt/qt_settingsnetwork.ui index 7aff676d6..767b4244d 100644 --- a/src/qt/qt_settingsnetwork.ui +++ b/src/qt/qt_settingsnetwork.ui @@ -169,7 +169,69 @@ + + + + Switch: + + + + + + + + 1 + + + 10 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Hub Mode + + + + + + + + + + + + + + Hostname: + + + + + + + 128 + + + + Qt::Vertical @@ -322,7 +384,69 @@ + + + + Switch: + + + + + + + + 1 + + + 10 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Hub Mode + + + + + + + + + + + + + + Hostname: + + + + + + + 128 + + + + Qt::Vertical @@ -475,7 +599,69 @@ + + + + Switch: + + + + + + + + 1 + + + 10 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Hub Mode + + + + + + + + + + + + + + Hostname: + + + + + + + 128 + + + + Qt::Vertical @@ -628,7 +814,69 @@ + + + + Switch: + + + + + + + + 1 + + + 10 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Hub Mode + + + + + + + + + + + + + + Hostname: + + + + + + + 128 + + + + Qt::Vertical diff --git a/src/qt/qt_settingsotherperipherals.ui b/src/qt/qt_settingsotherperipherals.ui index 5c6b8fbf0..0a366b833 100644 --- a/src/qt/qt_settingsotherperipherals.ui +++ b/src/qt/qt_settingsotherperipherals.ui @@ -382,6 +382,32 @@ + + comboBoxRTC + pushButtonConfigureRTC + comboBoxIsaMemCard1 + pushButtonConfigureIsaMemCard1 + comboBoxIsaMemCard2 + pushButtonConfigureIsaMemCard2 + comboBoxIsaMemCard3 + pushButtonConfigureIsaMemCard3 + comboBoxIsaMemCard4 + pushButtonConfigureIsaMemCard4 + comboBoxIsaRomCard1 + pushButtonConfigureIsaRomCard1 + comboBoxIsaRomCard2 + pushButtonConfigureIsaRomCard2 + comboBoxIsaRomCard3 + pushButtonConfigureIsaRomCard3 + comboBoxIsaRomCard4 + pushButtonConfigureIsaRomCard4 + checkBoxISABugger + checkBoxPOSTCard + checkBoxUnitTester + pushButtonConfigureUT + checkBoxKeyCard + pushButtonConfigureKeyCard + diff --git a/src/qt/qt_settingsotherremovable.cpp b/src/qt/qt_settingsotherremovable.cpp index 8a810a4fb..4ba07161c 100644 --- a/src/qt/qt_settingsotherremovable.cpp +++ b/src/qt/qt_settingsotherremovable.cpp @@ -23,7 +23,7 @@ extern "C" { #include <86box/timer.h> #include <86box/scsi_device.h> #include <86box/mo.h> -#include <86box/zip.h> +#include <86box/rdisk.h> } #include @@ -40,6 +40,13 @@ moDriveTypeName(int i) mo_drive_types[i].revision); } +static QString +rdiskDriveTypeName(int i) +{ + return QString("%1 %2 %3").arg(rdisk_drive_types[i].vendor, rdisk_drive_types[i].model, + rdisk_drive_types[i].revision); +} + static void setMOBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint8_t channel) { @@ -65,27 +72,16 @@ setMOBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint8_t } static void -setMOType(QAbstractItemModel *model, const QModelIndex &idx, uint32_t type) -{ - auto i = idx.siblingAtColumn(1); - if (idx.siblingAtColumn(0).data(Qt::UserRole).toUInt() == MO_BUS_DISABLED) - model->setData(i, QCoreApplication::translate("", "None")); - else - model->setData(i, moDriveTypeName(type)); - model->setData(i, type, Qt::UserRole); -} - -static void -setZIPBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint8_t channel) +setRDiskBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint8_t channel) { QIcon icon; switch (bus) { - case ZIP_BUS_DISABLED: - icon = QIcon(":/settings/qt/icons/zip_disabled.ico"); + case RDISK_BUS_DISABLED: + icon = QIcon(":/settings/qt/icons/rdisk_disabled.ico"); break; - case ZIP_BUS_ATAPI: - case ZIP_BUS_SCSI: - icon = QIcon(":/settings/qt/icons/zip.ico"); + case RDISK_BUS_ATAPI: + case RDISK_BUS_SCSI: + icon = QIcon(":/settings/qt/icons/rdisk.ico"); break; default: @@ -100,11 +96,25 @@ setZIPBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint8_ } static void -setZIPType(QAbstractItemModel *model, const QModelIndex &idx, bool is250) +setMOType(QAbstractItemModel *model, const QModelIndex &idx, uint32_t type) { auto i = idx.siblingAtColumn(1); - model->setData(i, is250 ? "ZIP 250" : "ZIP 100"); - model->setData(i, is250, Qt::UserRole); + if (idx.siblingAtColumn(0).data(Qt::UserRole).toUInt() == MO_BUS_DISABLED) + model->setData(i, QCoreApplication::translate("", "None")); + else + model->setData(i, moDriveTypeName(type)); + model->setData(i, type, Qt::UserRole); +} + +static void +setRDiskType(QAbstractItemModel *model, const QModelIndex &idx, uint32_t type) +{ + auto i = idx.siblingAtColumn(1); + if (idx.siblingAtColumn(0).data(Qt::UserRole).toUInt() == RDISK_BUS_DISABLED) + model->setData(i, QCoreApplication::translate("", "None")); + else + model->setData(i, rdiskDriveTypeName(type)); + model->setData(i, type, Qt::UserRole); } SettingsOtherRemovable::SettingsOtherRemovable(QWidget *parent) @@ -114,6 +124,7 @@ SettingsOtherRemovable::SettingsOtherRemovable(QWidget *parent) ui->setupUi(this); Harddrives::populateRemovableBuses(ui->comboBoxMOBus->model()); + ui->comboBoxMOBus->model()->removeRows(3, ui->comboBoxMOBus->model()->rowCount() - 3); auto *model = ui->comboBoxMOType->model(); for (uint32_t i = 0; i < KNOWN_MO_DRIVE_TYPES; i++) { Models::AddEntry(model, moDriveTypeName(i), i); @@ -136,24 +147,30 @@ SettingsOtherRemovable::SettingsOtherRemovable(QWidget *parent) connect(ui->tableViewMO->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &SettingsOtherRemovable::onMORowChanged); ui->tableViewMO->setCurrentIndex(model->index(0, 0)); - Harddrives::populateRemovableBuses(ui->comboBoxZIPBus->model()); + Harddrives::populateRemovableBuses(ui->comboBoxRDiskBus->model()); + if ((ui->comboBoxRDiskBus->model()->rowCount() - 3) > 0) + ui->comboBoxRDiskBus->model()->removeRows(3, ui->comboBoxRDiskBus->model()->rowCount() - 3); + model = ui->comboBoxRDiskType->model(); + for (uint32_t i = 0; i < KNOWN_RDISK_DRIVE_TYPES; i++) { + Models::AddEntry(model, rdiskDriveTypeName(i), i); + } model = new QStandardItemModel(0, 2, this); - ui->tableViewZIP->setModel(model); + ui->tableViewRDisk->setModel(model); model->setHeaderData(0, Qt::Horizontal, tr("Bus")); model->setHeaderData(1, Qt::Horizontal, tr("Type")); - model->insertRows(0, ZIP_NUM); - for (int i = 0; i < ZIP_NUM; i++) { + model->insertRows(0, RDISK_NUM); + for (int i = 0; i < RDISK_NUM; i++) { auto idx = model->index(i, 0); - setZIPBus(model, idx, zip_drives[i].bus_type, zip_drives[i].res); - setZIPType(model, idx, zip_drives[i].is_250 > 0); - Harddrives::busTrackClass->device_track(1, DEV_ZIP, zip_drives[i].bus_type, zip_drives[i].bus_type == ZIP_BUS_ATAPI ? zip_drives[i].ide_channel : zip_drives[i].scsi_device_id); + setRDiskBus(model, idx, rdisk_drives[i].bus_type, rdisk_drives[i].res); + setRDiskType(model, idx.siblingAtColumn(1), rdisk_drives[i].type); + Harddrives::busTrackClass->device_track(1, DEV_MO, rdisk_drives[i].bus_type, rdisk_drives[i].bus_type == RDISK_BUS_ATAPI ? rdisk_drives[i].ide_channel : rdisk_drives[i].scsi_device_id); } - ui->tableViewZIP->resizeColumnsToContents(); - ui->tableViewZIP->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch); + ui->tableViewRDisk->resizeColumnsToContents(); + ui->tableViewRDisk->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch); - connect(ui->tableViewZIP->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &SettingsOtherRemovable::onZIPRowChanged); - ui->tableViewZIP->setCurrentIndex(model->index(0, 0)); + connect(ui->tableViewRDisk->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &SettingsOtherRemovable::onRDiskRowChanged); + ui->tableViewRDisk->setCurrentIndex(model->index(0, 0)); } SettingsOtherRemovable::~SettingsOtherRemovable() @@ -173,13 +190,13 @@ SettingsOtherRemovable::save() mo_drives[i].type = model->index(i, 1).data(Qt::UserRole).toUInt(); } - model = ui->tableViewZIP->model(); - for (uint8_t i = 0; i < ZIP_NUM; i++) { - zip_drives[i].fp = NULL; - zip_drives[i].priv = NULL; - zip_drives[i].bus_type = model->index(i, 0).data(Qt::UserRole).toUInt(); - zip_drives[i].res = model->index(i, 0).data(Qt::UserRole + 1).toUInt(); - zip_drives[i].is_250 = model->index(i, 1).data(Qt::UserRole).toBool() ? 1 : 0; + model = ui->tableViewRDisk->model(); + for (uint8_t i = 0; i < RDISK_NUM; i++) { + rdisk_drives[i].fp = NULL; + rdisk_drives[i].priv = NULL; + rdisk_drives[i].bus_type = model->index(i, 0).data(Qt::UserRole).toUInt(); + rdisk_drives[i].res = model->index(i, 0).data(Qt::UserRole + 1).toUInt(); + rdisk_drives[i].type = model->index(i, 1).data(Qt::UserRole).toUInt(); } } @@ -205,24 +222,24 @@ SettingsOtherRemovable::onMORowChanged(const QModelIndex ¤t) } void -SettingsOtherRemovable::onZIPRowChanged(const QModelIndex ¤t) +SettingsOtherRemovable::onRDiskRowChanged(const QModelIndex ¤t) { uint8_t bus = current.siblingAtColumn(0).data(Qt::UserRole).toUInt(); uint8_t channel = current.siblingAtColumn(0).data(Qt::UserRole + 1).toUInt(); - bool is250 = current.siblingAtColumn(1).data(Qt::UserRole).toBool(); + uint8_t type = current.siblingAtColumn(1).data(Qt::UserRole).toUInt(); - ui->comboBoxZIPBus->setCurrentIndex(-1); - const auto *model = ui->comboBoxZIPBus->model(); + ui->comboBoxRDiskBus->setCurrentIndex(-1); + const auto *model = ui->comboBoxRDiskBus->model(); auto match = model->match(model->index(0, 0), Qt::UserRole, bus); if (!match.isEmpty()) - ui->comboBoxZIPBus->setCurrentIndex(match.first().row()); + ui->comboBoxRDiskBus->setCurrentIndex(match.first().row()); - model = ui->comboBoxZIPChannel->model(); + model = ui->comboBoxRDiskChannel->model(); match = model->match(model->index(0, 0), Qt::UserRole, channel); if (!match.isEmpty()) - ui->comboBoxZIPChannel->setCurrentIndex(match.first().row()); - ui->checkBoxZIP250->setChecked(is250); - enableCurrentlySelectedChannel_ZIP(); + ui->comboBoxRDiskChannel->setCurrentIndex(match.first().row()); + ui->comboBoxRDiskType->setCurrentIndex(type); + enableCurrentlySelectedChannel_RDisk(); } void @@ -234,6 +251,15 @@ SettingsOtherRemovable::reloadBusChannels_MO() { enableCurrentlySelectedChannel_MO(); } +void +SettingsOtherRemovable::reloadBusChannels_RDisk() { + auto selected = ui->comboBoxRDiskChannel->currentIndex(); + Harddrives::populateBusChannels(ui->comboBoxRDiskChannel->model(), + ui->comboBoxRDiskBus->currentData().toInt(), Harddrives::busTrackClass); + ui->comboBoxRDiskChannel->setCurrentIndex(selected); + enableCurrentlySelectedChannel_RDisk(); +} + void SettingsOtherRemovable::on_comboBoxMOBus_currentIndexChanged(int index) { @@ -246,6 +272,18 @@ SettingsOtherRemovable::on_comboBoxMOBus_currentIndexChanged(int index) } } +void +SettingsOtherRemovable::on_comboBoxRDiskBus_currentIndexChanged(int index) +{ + if (index >= 0) { + int bus = ui->comboBoxRDiskBus->currentData().toInt(); + bool enabled = (bus != RDISK_BUS_DISABLED); + ui->comboBoxRDiskChannel->setEnabled(enabled); + ui->comboBoxRDiskType->setEnabled(enabled); + Harddrives::populateBusChannels(ui->comboBoxRDiskChannel->model(), bus, Harddrives::busTrackClass); + } +} + void SettingsOtherRemovable::on_comboBoxMOBus_activated(int) { @@ -253,9 +291,9 @@ SettingsOtherRemovable::on_comboBoxMOBus_activated(int) Harddrives::busTrackClass->device_track(0, DEV_MO, ui->tableViewMO->model()->data(i, Qt::UserRole).toInt(), ui->tableViewMO->model()->data(i, Qt::UserRole + 1).toInt()); - ui->comboBoxMOChannel->setCurrentIndex(ui->comboBoxMOBus->currentData().toUInt() == - MO_BUS_ATAPI ? Harddrives::busTrackClass->next_free_ide_channel() : - Harddrives::busTrackClass->next_free_scsi_id()); + ui->comboBoxMOChannel->setCurrentIndex(ui->comboBoxMOBus->currentData().toUInt() == MO_BUS_ATAPI ? + Harddrives::busTrackClass->next_free_ide_channel() : + Harddrives::busTrackClass->next_free_scsi_id()); ui->tableViewMO->model()->data(i, Qt::UserRole + 1); setMOBus(ui->tableViewMO->model(), ui->tableViewMO->selectionModel()->currentIndex(), @@ -272,6 +310,32 @@ SettingsOtherRemovable::on_comboBoxMOBus_activated(int) emit moChannelChanged(); } +void +SettingsOtherRemovable::on_comboBoxRDiskBus_activated(int) +{ + auto i = ui->tableViewRDisk->selectionModel()->currentIndex().siblingAtColumn(0); + Harddrives::busTrackClass->device_track(0, DEV_RDISK, ui->tableViewRDisk->model()->data(i, + Qt::UserRole).toInt(), ui->tableViewRDisk->model()->data(i, + Qt::UserRole + 1).toInt()); + ui->comboBoxRDiskChannel->setCurrentIndex(ui->comboBoxRDiskBus->currentData().toUInt() == RDISK_BUS_ATAPI ? + Harddrives::busTrackClass->next_free_ide_channel() : + Harddrives::busTrackClass->next_free_scsi_id()); + ui->tableViewRDisk->model()->data(i, Qt::UserRole + 1); + setRDiskBus(ui->tableViewRDisk->model(), + ui->tableViewRDisk->selectionModel()->currentIndex(), + ui->comboBoxRDiskBus->currentData().toUInt(), + ui->comboBoxRDiskChannel->currentData().toUInt()); + setRDiskType(ui->tableViewRDisk->model(), + ui->tableViewRDisk->selectionModel()->currentIndex(), + ui->comboBoxRDiskType->currentData().toUInt()); + ui->tableViewRDisk->resizeColumnsToContents(); + ui->tableViewRDisk->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch); + Harddrives::busTrackClass->device_track(1, DEV_RDISK, ui->tableViewRDisk->model()->data(i, + Qt::UserRole).toInt(), ui->tableViewRDisk->model()->data(i, + Qt::UserRole + 1).toInt()); + emit rdiskChannelChanged(); +} + void SettingsOtherRemovable::enableCurrentlySelectedChannel_MO() { @@ -282,6 +346,15 @@ SettingsOtherRemovable::enableCurrentlySelectedChannel_MO() item->setEnabled(true); } +void +SettingsOtherRemovable::enableCurrentlySelectedChannel_RDisk() +{ + const auto *item_model = qobject_cast(ui->comboBoxRDiskChannel->model()); + const auto index = ui->comboBoxRDiskChannel->currentIndex(); + auto *item = item_model->item(index); + if (item) + item->setEnabled(true); +} void SettingsOtherRemovable::on_comboBoxMOChannel_activated(int) { @@ -299,6 +372,23 @@ SettingsOtherRemovable::on_comboBoxMOChannel_activated(int) emit moChannelChanged(); } +void +SettingsOtherRemovable::on_comboBoxRDiskChannel_activated(int) +{ + auto i = ui->tableViewRDisk->selectionModel()->currentIndex().siblingAtColumn(0); + Harddrives::busTrackClass->device_track(0, DEV_RDISK, ui->tableViewRDisk->model()->data(i, + Qt::UserRole).toInt(), ui->tableViewRDisk->model()->data(i, + Qt::UserRole + 1).toInt()); + setRDiskBus(ui->tableViewRDisk->model(), + ui->tableViewRDisk->selectionModel()->currentIndex(), + ui->comboBoxRDiskBus->currentData().toUInt(), + ui->comboBoxRDiskChannel->currentData().toUInt()); + Harddrives::busTrackClass->device_track(1, DEV_RDISK, ui->tableViewRDisk->model()->data(i, + Qt::UserRole).toInt(), + ui->tableViewRDisk->model()->data(i, Qt::UserRole + 1).toInt()); + emit rdiskChannelChanged(); +} + void SettingsOtherRemovable::on_comboBoxMOType_activated(int) { @@ -310,77 +400,11 @@ SettingsOtherRemovable::on_comboBoxMOType_activated(int) } void -SettingsOtherRemovable::reloadBusChannels_ZIP() { - auto selected = ui->comboBoxZIPChannel->currentIndex(); - Harddrives::populateBusChannels(ui->comboBoxZIPChannel->model(), - ui->comboBoxZIPBus->currentData().toInt(), Harddrives::busTrackClass); - ui->comboBoxZIPChannel->setCurrentIndex(selected); - enableCurrentlySelectedChannel_ZIP(); -} - -void -SettingsOtherRemovable::on_comboBoxZIPBus_currentIndexChanged(int index) +SettingsOtherRemovable::on_comboBoxRDiskType_activated(int) { - if (index >= 0) { - int bus = ui->comboBoxZIPBus->currentData().toInt(); - bool enabled = (bus != ZIP_BUS_DISABLED); - ui->comboBoxZIPChannel->setEnabled(enabled); - ui->checkBoxZIP250->setEnabled(enabled); - Harddrives::populateBusChannels(ui->comboBoxZIPChannel->model(), bus, Harddrives::busTrackClass); - } -} - -void -SettingsOtherRemovable::on_comboBoxZIPBus_activated(int) -{ - auto i = ui->tableViewZIP->selectionModel()->currentIndex().siblingAtColumn(0); - Harddrives::busTrackClass->device_track(0, DEV_ZIP, ui->tableViewZIP->model()->data(i, - Qt::UserRole).toInt(), ui->tableViewZIP->model()->data(i, - Qt::UserRole + 1).toInt()); - ui->comboBoxZIPChannel->setCurrentIndex(ui->comboBoxZIPBus->currentData().toUInt() == ZIP_BUS_ATAPI ? - Harddrives::busTrackClass->next_free_ide_channel() : - Harddrives::busTrackClass->next_free_scsi_id()); - setZIPBus(ui->tableViewZIP->model(), - ui->tableViewZIP->selectionModel()->currentIndex(), - ui->comboBoxZIPBus->currentData().toUInt(), - ui->comboBoxZIPChannel->currentData().toUInt()); - Harddrives::busTrackClass->device_track(1, DEV_ZIP, ui->tableViewZIP->model()->data(i, - Qt::UserRole).toInt(), ui->tableViewZIP->model()->data(i, - Qt::UserRole + 1).toInt()); - emit zipChannelChanged(); -} - -void -SettingsOtherRemovable::enableCurrentlySelectedChannel_ZIP() -{ - const auto *item_model = qobject_cast(ui->comboBoxZIPChannel->model()); - const auto index = ui->comboBoxZIPChannel->currentIndex(); - auto *item = item_model->item(index); - if (item) - item->setEnabled(true); -} - -void -SettingsOtherRemovable::on_comboBoxZIPChannel_activated(int) -{ - auto i = ui->tableViewZIP->selectionModel()->currentIndex().siblingAtColumn(0); - Harddrives::busTrackClass->device_track(0, DEV_ZIP, ui->tableViewZIP->model()->data(i, - Qt::UserRole).toInt(), ui->tableViewZIP->model()->data(i, - Qt::UserRole + 1).toInt()); - setZIPBus(ui->tableViewZIP->model(), - ui->tableViewZIP->selectionModel()->currentIndex(), - ui->comboBoxZIPBus->currentData().toUInt(), - ui->comboBoxZIPChannel->currentData().toUInt()); - Harddrives::busTrackClass->device_track(1, DEV_ZIP, ui->tableViewZIP->model()->data(i, - Qt::UserRole).toInt(), - ui->tableViewZIP->model()->data(i, Qt::UserRole + 1).toInt()); - emit zipChannelChanged(); -} - -void -SettingsOtherRemovable::on_checkBoxZIP250_stateChanged(int state) -{ - setZIPType(ui->tableViewZIP->model(), - ui->tableViewZIP->selectionModel()->currentIndex(), - state == Qt::Checked); + setRDiskType(ui->tableViewRDisk->model(), + ui->tableViewRDisk->selectionModel()->currentIndex(), + ui->comboBoxRDiskType->currentData().toUInt()); + ui->tableViewRDisk->resizeColumnsToContents(); + ui->tableViewRDisk->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch); } diff --git a/src/qt/qt_settingsotherremovable.hpp b/src/qt/qt_settingsotherremovable.hpp index 1459ed043..79fcfbf3f 100644 --- a/src/qt/qt_settingsotherremovable.hpp +++ b/src/qt/qt_settingsotherremovable.hpp @@ -14,13 +14,13 @@ public: explicit SettingsOtherRemovable(QWidget *parent = nullptr); ~SettingsOtherRemovable(); void reloadBusChannels_MO(); - void reloadBusChannels_ZIP(); + void reloadBusChannels_RDisk(); void save(); signals: void moChannelChanged(); - void zipChannelChanged(); + void rdiskChannelChanged(); private slots: void onMORowChanged(const QModelIndex ¤t); @@ -29,16 +29,16 @@ private slots: void on_comboBoxMOChannel_activated(int index); void on_comboBoxMOType_activated(int index); - void onZIPRowChanged(const QModelIndex ¤t); - void on_comboBoxZIPBus_currentIndexChanged(int index); - void on_comboBoxZIPBus_activated(int index); - void on_comboBoxZIPChannel_activated(int index); - void on_checkBoxZIP250_stateChanged(int arg1); + void onRDiskRowChanged(const QModelIndex ¤t); + void on_comboBoxRDiskBus_currentIndexChanged(int index); + void on_comboBoxRDiskBus_activated(int index); + void on_comboBoxRDiskChannel_activated(int index); + void on_comboBoxRDiskType_activated(int index); private: Ui::SettingsOtherRemovable *ui; void enableCurrentlySelectedChannel_MO(); - void enableCurrentlySelectedChannel_ZIP(); + void enableCurrentlySelectedChannel_RDisk(); }; #endif // QT_SETTINGSOTHERREMOVABLE_HPP diff --git a/src/qt/qt_settingsotherremovable.ui b/src/qt/qt_settingsotherremovable.ui index ae7839e54..8224d67f6 100644 --- a/src/qt/qt_settingsotherremovable.ui +++ b/src/qt/qt_settingsotherremovable.ui @@ -113,14 +113,14 @@ - + - ZIP drives: + Removable disk drives: - + 0 @@ -151,40 +151,47 @@ - - - - + + + + Bus: - - + + 30 - - + + Channel: - - + + 30 - - + + - ZIP 250 + Type: + + + + + + + 30 @@ -193,6 +200,16 @@ + + tableViewMO + comboBoxMOBus + comboBoxMOChannel + comboBoxMOType + tableViewRDisk + comboBoxRDiskBus + comboBoxRDiskChannel + comboBoxRDiskType + diff --git a/src/qt/qt_settingsports.cpp b/src/qt/qt_settingsports.cpp index ddebd28e8..001193357 100644 --- a/src/qt/qt_settingsports.cpp +++ b/src/qt/qt_settingsports.cpp @@ -49,6 +49,8 @@ SettingsPorts::~SettingsPorts() void SettingsPorts::save() { + jumpered_internal_ecp_dma = ui->comboBoxLptECPDMA->currentData().toInt(); + for (int i = 0; i < PARALLEL_MAX; i++) { auto *cbox = findChild(QString("comboBoxLpt%1").arg(i + 1)); auto *checkBox = findChild(QString("checkBoxParallel%1").arg(i + 1)); @@ -73,7 +75,53 @@ SettingsPorts::onCurrentMachineChanged(int machineId) { this->machineId = machineId; - int c = 0; + int c = 0; + + auto *lptEcpDmaModel = ui->comboBoxLptECPDMA->model(); + auto removeRowsEcpDma = lptEcpDmaModel->rowCount(); + + int has_jumpers = !!machine_has_jumpered_ecp_dma(machineId, DMA_ANY); + + int selectedRow = -2; + int first = -2; + + for (int i = 0; i < 9; ++i) { + int j = machine_map_jumpered_ecp_dma(i); + + if ((has_jumpers && ((j == DMA_NONE) || !machine_has_jumpered_ecp_dma(machineId, j))) || + (!has_jumpers && (j != DMA_NONE))) + continue; + + if (first == -2) + first = j; + + QString name = tr(machine_get_jumpered_ecp_dma_name(i)); + int row = lptEcpDmaModel->rowCount(); + lptEcpDmaModel->insertRow(row); + auto idx = lptEcpDmaModel->index(row, 0); + + lptEcpDmaModel->setData(idx, name, Qt::DisplayRole); + lptEcpDmaModel->setData(idx, j, Qt::UserRole); + + if (j == jumpered_internal_ecp_dma) + selectedRow = row - removeRowsEcpDma; + + c++; + } + + if (selectedRow == -2) + selectedRow = first; + + lptEcpDmaModel->removeRows(0, removeRowsEcpDma); + ui->comboBoxLptECPDMA->setCurrentIndex(-1); + ui->comboBoxLptECPDMA->setCurrentIndex(selectedRow); + + if ((c == 1) || !has_jumpers) + ui->comboBoxLptECPDMA->setEnabled(false); + else + ui->comboBoxLptECPDMA->setEnabled(true); + + c = 0; // LPT Device QComboBox * cbox[PARALLEL_MAX] = { 0 }; @@ -111,11 +159,17 @@ SettingsPorts::onCurrentMachineChanged(int machineId) cbox[i]->setCurrentIndex(-1); cbox[i]->setCurrentIndex(selectedRows[i]); - auto *checkBox = findChild(QString("checkBoxParallel%1").arg(i + 1)); + auto *checkBox = findChild(QString("checkBoxParallel%1").arg(i + 1)); + auto *buttonCfg = findChild(QString("pushButtonConfigureLpt%1").arg(i + 1)); if (checkBox != NULL) checkBox->setChecked(lpt_ports[i].enabled > 0); - if (cbox[i] != NULL) + if (cbox[i] != NULL) { cbox[i]->setEnabled(lpt_ports[i].enabled > 0); + if (buttonCfg != NULL) { + int lptDevice = cbox[i]->currentData().toInt(); + buttonCfg->setEnabled(lpt_device_has_config(lptDevice) && (lpt_ports[i].enabled > 0)); + } + } } for (int i = 0; i < (SERIAL_MAX - 1); i++) { @@ -132,6 +186,86 @@ SettingsPorts::onCurrentMachineChanged(int machineId) } } +void +SettingsPorts::on_comboBoxLpt1_currentIndexChanged(int index) +{ + if (index < 0) + return; + + int lptDevice = ui->comboBoxLpt1->currentData().toInt(); + + ui->pushButtonConfigureLpt1->setEnabled(lpt_device_has_config(lptDevice)); +} + +void +SettingsPorts::on_pushButtonConfigureLpt1_clicked() +{ + int lptDevice = ui->comboBoxLpt1->currentData().toInt(); + auto *device = lpt_device_getdevice(lptDevice); + + DeviceConfig::ConfigureDevice(device, 1); +} + +void +SettingsPorts::on_comboBoxLpt2_currentIndexChanged(int index) +{ + if (index < 0) + return; + + int lptDevice = ui->comboBoxLpt2->currentData().toInt(); + + ui->pushButtonConfigureLpt2->setEnabled(lpt_device_has_config(lptDevice)); +} + +void +SettingsPorts::on_pushButtonConfigureLpt2_clicked() +{ + int lptDevice = ui->comboBoxLpt2->currentData().toInt(); + auto *device = lpt_device_getdevice(lptDevice); + + DeviceConfig::ConfigureDevice(device, 1); +} + +void +SettingsPorts::on_comboBoxLpt3_currentIndexChanged(int index) +{ + if (index < 0) + return; + + int lptDevice = ui->comboBoxLpt3->currentData().toInt(); + + ui->pushButtonConfigureLpt3->setEnabled(lpt_device_has_config(lptDevice)); +} + +void +SettingsPorts::on_pushButtonConfigureLpt3_clicked() +{ + int lptDevice = ui->comboBoxLpt3->currentData().toInt(); + auto *device = lpt_device_getdevice(lptDevice); + + DeviceConfig::ConfigureDevice(device, 1); +} + +void +SettingsPorts::on_comboBoxLpt4_currentIndexChanged(int index) +{ + if (index < 0) + return; + + int lptDevice = ui->comboBoxLpt4->currentData().toInt(); + + ui->pushButtonConfigureLpt4->setEnabled(lpt_device_has_config(lptDevice)); +} + +void +SettingsPorts::on_pushButtonConfigureLpt4_clicked() +{ + int lptDevice = ui->comboBoxLpt4->currentData().toInt(); + auto *device = lpt_device_getdevice(lptDevice); + + DeviceConfig::ConfigureDevice(device, 1); +} + void SettingsPorts::on_checkBoxParallel1_stateChanged(int state) { diff --git a/src/qt/qt_settingsports.hpp b/src/qt/qt_settingsports.hpp index 8be1f0491..f6024b094 100644 --- a/src/qt/qt_settingsports.hpp +++ b/src/qt/qt_settingsports.hpp @@ -20,6 +20,15 @@ public slots: void onCurrentMachineChanged(int machineId); private slots: + void on_comboBoxLpt1_currentIndexChanged(int index); + void on_pushButtonConfigureLpt1_clicked(); + void on_comboBoxLpt2_currentIndexChanged(int index); + void on_pushButtonConfigureLpt2_clicked(); + void on_comboBoxLpt3_currentIndexChanged(int index); + void on_pushButtonConfigureLpt3_clicked(); + void on_comboBoxLpt4_currentIndexChanged(int index); + void on_pushButtonConfigureLpt4_clicked(); + void on_checkBoxParallel1_stateChanged(int state); void on_checkBoxParallel2_stateChanged(int state); void on_checkBoxParallel3_stateChanged(int state); diff --git a/src/qt/qt_settingsports.ui b/src/qt/qt_settingsports.ui index 92420f2df..9a8533995 100644 --- a/src/qt/qt_settingsports.ui +++ b/src/qt/qt_settingsports.ui @@ -13,7 +13,7 @@ Form - + 0 @@ -27,63 +27,135 @@ 0 - + - + - LPT1 Device: + Internal LPT ECP DMA: - - + + + + + 0 + 0 + + 30 + + + LPT1 Device: + + + + + + + + 0 + 0 + + + + 30 + + + + + + + Configure + + + + LPT2 Device: - + + + + 0 + 0 + + 30 - + + + + Configure + + + + LPT3 Device: - + + + + 0 + 0 + + 30 - + + + + Configure + + + + LPT4 Device: - + + + + 0 + 0 + + 30 + + + + Configure + + + diff --git a/src/qt/qt_settingsstoragecontrollers.cpp b/src/qt/qt_settingsstoragecontrollers.cpp index 5c9b24c46..8614852eb 100644 --- a/src/qt/qt_settingsstoragecontrollers.cpp +++ b/src/qt/qt_settingsstoragecontrollers.cpp @@ -52,15 +52,16 @@ void SettingsStorageControllers::save() { /* Storage devices category */ + for (uint8_t i = 0; i < HDC_MAX; ++i) { + QComboBox *cbox = findChild(QString("comboBoxHD%1").arg(i + 1)); + hdc_current[i] = cbox->currentData().toInt(); + } for (uint8_t i = 0; i < SCSI_CARD_MAX; ++i) { QComboBox *cbox = findChild(QString("comboBoxSCSI%1").arg(i + 1)); scsi_card_current[i] = cbox->currentData().toInt(); } fdc_current[0] = ui->comboBoxFD->currentData().toInt(); - hdc_current[0] = ui->comboBoxHD->currentData().toInt(); cdrom_interface_current = ui->comboBoxCDInterface->currentData().toInt(); - ide_ter_enabled = ui->checkBoxTertiaryIDE->isChecked() ? 1 : 0; - ide_qua_enabled = ui->checkBoxQuaternaryIDE->isChecked() ? 1 : 0; cassette_enable = ui->checkBoxCassette->isChecked() ? 1 : 0; } @@ -69,44 +70,12 @@ SettingsStorageControllers::onCurrentMachineChanged(int machineId) { this->machineId = machineId; - /*HD controller config*/ + /* FD controller config */ int c = 0; - auto *model = ui->comboBoxHD->model(); + auto *model = ui->comboBoxFD->model(); auto removeRows = model->rowCount(); int selectedRow = 0; - while (true) { - /* Skip "internal" if machine doesn't have it. */ - if ((c == 1) && (machine_has_flags(machineId, MACHINE_HDC) == 0)) { - c++; - continue; - } - - QString name = DeviceConfig::DeviceName(hdc_get_device(c), hdc_get_internal_name(c), 1); - if (name.isEmpty()) - break; - - if (hdc_available(c)) { - const device_t *hdc_dev = hdc_get_device(c); - - if (device_is_valid(hdc_dev, machineId)) { - int row = Models::AddEntry(model, name, c); - if (c == hdc_current[0]) - selectedRow = row - removeRows; - } - } - c++; - } - model->removeRows(0, removeRows); - ui->comboBoxHD->setEnabled(model->rowCount() > 0); - ui->comboBoxHD->setCurrentIndex(-1); - ui->comboBoxHD->setCurrentIndex(selectedRow); - - /* FD controller config */ - model = ui->comboBoxFD->model(); - removeRows = model->rowCount(); - c = 0; - selectedRow = 0; while (true) { #if 0 /* Skip "internal" if machine doesn't have it. */ @@ -139,15 +108,10 @@ SettingsStorageControllers::onCurrentMachineChanged(int machineId) ui->comboBoxFD->setCurrentIndex(selectedRow); /*CD interface controller config*/ -#ifdef USE_CDROM_MITSUMI ui->labelCDInterface->setVisible(true); ui->comboBoxCDInterface->setVisible(true); ui->pushButtonCDInterface->setVisible(true); -#else - ui->labelCDInterface->setVisible(false); - ui->comboBoxCDInterface->setVisible(false); - ui->pushButtonCDInterface->setVisible(false); -#endif + c = 0; model = ui->comboBoxCDInterface->model(); removeRows = model->rowCount(); @@ -177,6 +141,51 @@ SettingsStorageControllers::onCurrentMachineChanged(int machineId) ui->comboBoxCDInterface->setCurrentIndex(-1); ui->comboBoxCDInterface->setCurrentIndex(selectedRow); + // HD Controller + QComboBox * hd_cbox[HDC_MAX] = { 0 }; + QAbstractItemModel *hd_models[HDC_MAX] = { 0 }; + int hd_removeRows_[HDC_MAX] = { 0 }; + int hd_selectedRows[HDC_MAX] = { 0 }; + + for (uint8_t i = 0; i < HDC_MAX; ++i) { + hd_cbox[i] = findChild(QString("comboBoxHD%1").arg(i + 1)); + hd_models[i] = hd_cbox[i]->model(); + hd_removeRows_[i] = hd_models[i]->rowCount(); + } + + c = 0; + while (true) { + const QString name = DeviceConfig::DeviceName(hdc_get_device(c), + hdc_get_internal_name(c), 1); + + if (name.isEmpty()) + break; + + if (hdc_available(c)) { + if (device_is_valid(hdc_get_device(c), machineId)) { + for (uint8_t i = 0; i < HDC_MAX; ++i) { + /* Skip "internal" if machine doesn't have it. */ + if ((c == 1) && ((i > 0) || (machine_has_flags(machineId, MACHINE_HDC) == 0))) + continue; + + int row = Models::AddEntry(hd_models[i], name, c); + + if (c == hdc_current[i]) + hd_selectedRows[i] = row - hd_removeRows_[i]; + } + } + } + + c++; + } + + for (uint8_t i = 0; i < HDC_MAX; ++i) { + hd_models[i]->removeRows(0, hd_removeRows_[i]); + hd_cbox[i]->setEnabled(hd_models[i]->rowCount() > 1); + hd_cbox[i]->setCurrentIndex(-1); + hd_cbox[i]->setCurrentIndex(hd_selectedRows[i]); + } + // SCSI Card QComboBox * cbox[SCSI_CARD_MAX] = { 0 }; QAbstractItemModel *models[SCSI_CARD_MAX] = { 0 }; @@ -208,7 +217,7 @@ SettingsStorageControllers::onCurrentMachineChanged(int machineId) } } - c++; + c++; } for (uint8_t i = 0; i < SCSI_CARD_MAX; ++i) { @@ -218,12 +227,6 @@ SettingsStorageControllers::onCurrentMachineChanged(int machineId) cbox[i]->setCurrentIndex(selectedRows[i]); } - int is_at = IS_AT(machineId); - ui->checkBoxTertiaryIDE->setEnabled(is_at > 0); - ui->checkBoxQuaternaryIDE->setEnabled(is_at > 0); - ui->checkBoxTertiaryIDE->setChecked(ui->checkBoxTertiaryIDE->isEnabled() && ide_ter_enabled); - ui->checkBoxQuaternaryIDE->setChecked(ui->checkBoxQuaternaryIDE->isEnabled() && ide_qua_enabled); - if (machine_has_bus(machineId, MACHINE_BUS_CASSETTE)) { ui->checkBoxCassette->setChecked(cassette_enable > 0); ui->checkBoxCassette->setEnabled(true); @@ -243,12 +246,39 @@ SettingsStorageControllers::on_comboBoxFD_currentIndexChanged(int index) } void -SettingsStorageControllers::on_comboBoxHD_currentIndexChanged(int index) +SettingsStorageControllers::on_comboBoxHD1_currentIndexChanged(int index) { if (index < 0) return; - ui->pushButtonHD->setEnabled(hdc_has_config(ui->comboBoxHD->currentData().toInt()) > 0); + ui->pushButtonHD1->setEnabled(hdc_has_config(ui->comboBoxHD1->currentData().toInt()) > 0); +} + +void +SettingsStorageControllers::on_comboBoxHD2_currentIndexChanged(int index) +{ + if (index < 0) + return; + + ui->pushButtonHD2->setEnabled(hdc_has_config(ui->comboBoxHD2->currentData().toInt()) > 0); +} + +void +SettingsStorageControllers::on_comboBoxHD3_currentIndexChanged(int index) +{ + if (index < 0) + return; + + ui->pushButtonHD3->setEnabled(hdc_has_config(ui->comboBoxHD3->currentData().toInt()) > 0); +} + +void +SettingsStorageControllers::on_comboBoxHD4_currentIndexChanged(int index) +{ + if (index < 0) + return; + + ui->pushButtonHD4->setEnabled(hdc_has_config(ui->comboBoxHD4->currentData().toInt()) > 0); } void @@ -260,18 +290,6 @@ SettingsStorageControllers::on_comboBoxCDInterface_currentIndexChanged(int index ui->pushButtonCDInterface->setEnabled(cdrom_interface_has_config(ui->comboBoxCDInterface->currentData().toInt()) > 0); } -void -SettingsStorageControllers::on_checkBoxTertiaryIDE_stateChanged(int arg1) -{ - ui->pushButtonTertiaryIDE->setEnabled(arg1 == Qt::Checked); -} - -void -SettingsStorageControllers::on_checkBoxQuaternaryIDE_stateChanged(int arg1) -{ - ui->pushButtonQuaternaryIDE->setEnabled(arg1 == Qt::Checked); -} - void SettingsStorageControllers::on_pushButtonFD_clicked() { @@ -279,9 +297,27 @@ SettingsStorageControllers::on_pushButtonFD_clicked() } void -SettingsStorageControllers::on_pushButtonHD_clicked() +SettingsStorageControllers::on_pushButtonHD1_clicked() { - DeviceConfig::ConfigureDevice(hdc_get_device(ui->comboBoxHD->currentData().toInt())); + DeviceConfig::ConfigureDevice(hdc_get_device(ui->comboBoxHD1->currentData().toInt()), 1); +} + +void +SettingsStorageControllers::on_pushButtonHD2_clicked() +{ + DeviceConfig::ConfigureDevice(hdc_get_device(ui->comboBoxHD2->currentData().toInt()), 2); +} + +void +SettingsStorageControllers::on_pushButtonHD3_clicked() +{ + DeviceConfig::ConfigureDevice(hdc_get_device(ui->comboBoxHD3->currentData().toInt()), 3); +} + +void +SettingsStorageControllers::on_pushButtonHD4_clicked() +{ + DeviceConfig::ConfigureDevice(hdc_get_device(ui->comboBoxHD4->currentData().toInt()), 4); } void @@ -290,18 +326,6 @@ SettingsStorageControllers::on_pushButtonCDInterface_clicked() DeviceConfig::ConfigureDevice(cdrom_interface_get_device(ui->comboBoxCDInterface->currentData().toInt())); } -void -SettingsStorageControllers::on_pushButtonTertiaryIDE_clicked() -{ - DeviceConfig::ConfigureDevice(&ide_ter_device); -} - -void -SettingsStorageControllers::on_pushButtonQuaternaryIDE_clicked() -{ - DeviceConfig::ConfigureDevice(&ide_qua_device); -} - void SettingsStorageControllers::on_comboBoxSCSI1_currentIndexChanged(int index) { diff --git a/src/qt/qt_settingsstoragecontrollers.hpp b/src/qt/qt_settingsstoragecontrollers.hpp index 074b48dbd..7ba862e0c 100644 --- a/src/qt/qt_settingsstoragecontrollers.hpp +++ b/src/qt/qt_settingsstoragecontrollers.hpp @@ -23,18 +23,18 @@ private slots: void on_comboBoxFD_currentIndexChanged(int index); void on_pushButtonFD_clicked(); - void on_comboBoxHD_currentIndexChanged(int index); - void on_pushButtonHD_clicked(); + void on_comboBoxHD1_currentIndexChanged(int index); + void on_pushButtonHD1_clicked(); + void on_comboBoxHD2_currentIndexChanged(int index); + void on_pushButtonHD2_clicked(); + void on_comboBoxHD3_currentIndexChanged(int index); + void on_pushButtonHD3_clicked(); + void on_comboBoxHD4_currentIndexChanged(int index); + void on_pushButtonHD4_clicked(); void on_comboBoxCDInterface_currentIndexChanged(int index); void on_pushButtonCDInterface_clicked(); - void on_checkBoxTertiaryIDE_stateChanged(int arg1); - void on_pushButtonTertiaryIDE_clicked(); - - void on_checkBoxQuaternaryIDE_stateChanged(int arg1); - void on_pushButtonQuaternaryIDE_clicked(); - void on_comboBoxSCSI1_currentIndexChanged(int index); void on_pushButtonSCSI1_clicked(); void on_comboBoxSCSI2_currentIndexChanged(int index); diff --git a/src/qt/qt_settingsstoragecontrollers.ui b/src/qt/qt_settingsstoragecontrollers.ui index b9eb310ba..2d6fa9d32 100644 --- a/src/qt/qt_settingsstoragecontrollers.ui +++ b/src/qt/qt_settingsstoragecontrollers.ui @@ -50,89 +50,145 @@ - - - HD Controller: - - - - - - - - 0 - 0 - - - - 30 - - - - - - - Configure - - - - CD-ROM Controller: - + 30 - + Configure - - - - Tertiary IDE Controller - - - - - - - false - - - Configure - - - - - - - Quaternary IDE Controller - - - - - - - false - - - Configure - - - + + + + Hard disk + + + + + + Controller 1: + + + + + + + + 0 + 0 + + + + 30 + + + + + + + Configure + + + + + + + Controller 2: + + + + + + + + 0 + 0 + + + + 30 + + + + + + + Configure + + + + + + + Controller 3: + + + + + + + + 0 + 0 + + + + 30 + + + + + + + Configure + + + + + + + Controller 4: + + + + + + + + 0 + 0 + + + + 30 + + + + + + + Configure + + + + + + @@ -272,6 +328,29 @@ + + comboBoxFD + pushButtonFD + comboBoxCDInterface + pushButtonCDInterface + comboBoxHD1 + pushButtonHD1 + comboBoxHD2 + pushButtonHD2 + comboBoxHD3 + pushButtonHD3 + comboBoxHD4 + pushButtonHD4 + comboBoxSCSI1 + pushButtonSCSI1 + comboBoxSCSI2 + pushButtonSCSI2 + comboBoxSCSI3 + pushButtonSCSI3 + comboBoxSCSI4 + pushButtonSCSI4 + checkBoxCassette + diff --git a/src/qt/qt_styleoverride.cpp b/src/qt/qt_styleoverride.cpp index 0bade8fa6..2da0342bb 100644 --- a/src/qt/qt_styleoverride.cpp +++ b/src/qt/qt_styleoverride.cpp @@ -15,6 +15,7 @@ * Copyright 2022 Teemu Korhonen */ #include "qt_styleoverride.hpp" +#include "qt_util.hpp" #include #include @@ -22,6 +23,11 @@ #include #include +extern "C" { +#include <86box/86box.h> +#include <86box/plat.h> +} + #ifdef Q_OS_WINDOWS #include #ifndef DWMWA_USE_IMMERSIVE_DARK_MODE @@ -37,7 +43,7 @@ StyleOverride::styleHint( QStyleHintReturn *returnData) const { /* Disable using menu with alt key */ - if (hint == QStyle::SH_MenuBar_AltKeyNavigation) + if (!start_vmm && (!kbd_req_capture || mouse_capture) && (hint == QStyle::SH_MenuBar_AltKeyNavigation)) return 0; return QProxyStyle::styleHint(hint, option, widget, returnData); @@ -59,8 +65,7 @@ StyleOverride::polish(QWidget *widget) } widget->setWindowFlag(Qt::WindowContextHelpButtonHint, false); #ifdef Q_OS_WINDOWS - extern bool windows_is_light_theme(); - BOOL DarkMode = !windows_is_light_theme(); + BOOL DarkMode = !util::isWindowsLightTheme(); DwmSetWindowAttribute((HWND)widget->winId(), DWMWA_USE_IMMERSIVE_DARK_MODE, (LPCVOID)&DarkMode, sizeof(DarkMode)); #endif } diff --git a/src/qt/qt_translations.qrc.in b/src/qt/qt_translations.qrc.in index c050747c0..ef7993372 100644 --- a/src/qt/qt_translations.qrc.in +++ b/src/qt/qt_translations.qrc.in @@ -1,6 +1,5 @@ - 86box_ca-ES.qm 86box_cs-CZ.qm 86box_de-DE.qm 86box_en-US.qm @@ -9,10 +8,10 @@ 86box_fi-FI.qm 86box_fr-FR.qm 86box_hr-HR.qm - 86box_hu-HU.qm 86box_it-IT.qm 86box_ja-JP.qm 86box_ko-KR.qm + 86box_nb-NO.qm 86box_nl-NL.qm 86box_pl-PL.qm 86box_pt-BR.qm diff --git a/src/qt/qt_ui.cpp b/src/qt/qt_ui.cpp index 6e0b3cfbb..d4a257887 100644 --- a/src/qt/qt_ui.cpp +++ b/src/qt/qt_ui.cpp @@ -50,7 +50,7 @@ extern "C" { #include <86box/cartridge.h> #include <86box/cassette.h> #include <86box/cdrom.h> -#include <86box/zip.h> +#include <86box/rdisk.h> #include <86box/mo.h> #include <86box/hdd.h> #include <86box/thread.h> @@ -262,6 +262,34 @@ ui_sb_set_ready(int ready) } } +void +ui_sb_update_icon_wp(int tag, int state) +{ + const auto temp = static_cast(tag); + const int category = static_cast(temp & 0xfffffff0); + const int item = tag & 0xf; + + switch (category) { + default: + break; + case SB_CASSETTE: + machine_status.cassette.write_prot = state > 0 ? true : false; + break; + case SB_FLOPPY: + machine_status.fdd[item].write_prot = state > 0 ? true : false; + break; + case SB_RDISK: + machine_status.rdisk[item].write_prot = state > 0 ? true : false; + break; + case SB_MO: + machine_status.mo[item].write_prot = state > 0 ? true : false; + break; + } + + if (main_window != nullptr) + main_window->updateStatusEmptyIcons(); +} + void ui_sb_update_icon_state(int tag, int state) { @@ -284,8 +312,8 @@ ui_sb_update_icon_state(int tag, int state) case SB_CDROM: machine_status.cdrom[item].empty = state > 0 ? true : false; break; - case SB_ZIP: - machine_status.zip[item].empty = state > 0 ? true : false; + case SB_RDISK: + machine_status.rdisk[item].empty = state > 0 ? true : false; break; case SB_MO: machine_status.mo[item].empty = state > 0 ? true : false; @@ -322,8 +350,8 @@ ui_sb_update_icon(int tag, int active) case SB_CDROM: machine_status.cdrom[item].active = active > 0 ? true : false; break; - case SB_ZIP: - machine_status.zip[item].active = active > 0 ? true : false; + case SB_RDISK: + machine_status.rdisk[item].active = active > 0 ? true : false; break; case SB_MO: machine_status.mo[item].active = active > 0 ? true : false; @@ -358,8 +386,8 @@ ui_sb_update_icon_write(int tag, int write) case SB_CDROM: machine_status.cdrom[item].write_active = write > 0 ? true : false; break; - case SB_ZIP: - machine_status.zip[item].write_active = write > 0 ? true : false; + case SB_RDISK: + machine_status.rdisk[item].write_active = write > 0 ? true : false; break; case SB_MO: machine_status.mo[item].write_active = write > 0 ? true : false; diff --git a/src/qt/qt_updatecheckdialog.cpp b/src/qt/qt_updatecheckdialog.cpp index d0cb6941d..017d93822 100644 --- a/src/qt/qt_updatecheckdialog.cpp +++ b/src/qt/qt_updatecheckdialog.cpp @@ -30,7 +30,6 @@ UpdateCheckDialog:: UpdateCheckDialog(const UpdateCheck::UpdateChannel channel, QWidget *parent) : QDialog(parent), ui(new Ui::UpdateCheckDialog), updateCheck(new UpdateCheck(channel)) { ui->setupUi(this); - setWindowTitle(tr("Update check")); ui->statusLabel->setHidden(true); updateChannel = channel; currentVersion = UpdateCheck::getCurrentVersion(updateChannel); @@ -67,7 +66,7 @@ UpdateCheckDialog::downloadComplete(const UpdateCheck::UpdateResult &result) return; } - const auto updateDetails = new UpdateDetails(result); + const auto updateDetails = new UpdateDetails(result, this); connect(updateDetails, &QDialog::accepted, [this] { accept(); }); @@ -84,7 +83,12 @@ UpdateCheckDialog::upToDate() ui->progressBar->setMaximum(100); ui->progressBar->setValue(100); ui->statusLabel->setVisible(true); - const auto statusText = tr("You are running the latest %1 version of 86Box: %2").arg(updateChannel == UpdateCheck::UpdateChannel::Stable ? "stable" : "beta", currentVersion); + QString currentVersionString; + if (updateChannel == UpdateCheck::UpdateChannel::Stable) + currentVersionString = QString("v%1").arg(currentVersion); + else + currentVersionString = QString("%1 %2").arg(tr("build"), currentVersion); + const auto statusText = tr("You are running the latest %1 version of 86Box: %2").arg(updateChannel == UpdateCheck::UpdateChannel::Stable ? tr("stable") : tr("beta"), currentVersionString); ui->statusLabel->setText(statusText); ui->buttonBox->setStandardButtons(QDialogButtonBox::Ok); } diff --git a/src/qt/qt_updatecheckdialog.ui b/src/qt/qt_updatecheckdialog.ui index e50a541bb..3fd2942fd 100644 --- a/src/qt/qt_updatecheckdialog.ui +++ b/src/qt/qt_updatecheckdialog.ui @@ -6,10 +6,22 @@ 0 0 - 350 - 134 + 400 + 130 + + + 400 + 130 + + + + + 400 + 130 + + 0 @@ -17,7 +29,7 @@ - Dialog + Update check @@ -29,7 +41,7 @@ - Checking for updates.. + Checking for updates... Qt::AlignCenter diff --git a/src/qt/qt_updatedetails.cpp b/src/qt/qt_updatedetails.cpp index dceeea47c..aea55a30a 100644 --- a/src/qt/qt_updatedetails.cpp +++ b/src/qt/qt_updatedetails.cpp @@ -23,18 +23,23 @@ UpdateDetails:: -UpdateDetails(const UpdateCheck::UpdateResult &updateResult, QWidget *parent) : ui(new Ui::UpdateDetails) +UpdateDetails(const UpdateCheck::UpdateResult &updateResult, QWidget *parent) : QDialog(parent), ui(new Ui::UpdateDetails) { ui->setupUi(this); - setWindowTitle("86Box Update"); - ui->updateTitle->setText("An update to 86Box is available!"); + ui->updateTitle->setText(tr("An update to 86Box is available!")); QString currentVersionText; - QString releaseType = updateResult.channel == UpdateCheck::UpdateChannel::Stable ? tr("version") : tr("build"); - if(!updateResult.currentVersion.isEmpty()) { - currentVersionText = tr("You are currently running %1 %2. ").arg(releaseType, updateResult.currentVersion); + QString latestVersionText; + if (updateResult.channel == UpdateCheck::UpdateChannel::Stable) { + currentVersionText = tr("You are currently running version %1.").arg(updateResult.currentVersion); + latestVersionText = tr("Version %1 is now available.").arg(updateResult.latestVersion); + } else { + currentVersionText = tr("You are currently running build %1.").arg(updateResult.currentVersion); + latestVersionText = tr("Build %1 is now available.").arg(updateResult.latestVersion); } + if (updateResult.currentVersion.isEmpty()) + currentVersionText = ""; - const auto updateDetailsText = tr("%1 %2 is now available. %3Would you like to visit the download page?").arg(releaseType[0].toUpper() + releaseType.mid(1), updateResult.latestVersion, currentVersionText); + const auto updateDetailsText = QString("%1 %2%3").arg(latestVersionText, currentVersionText.append(' '), tr("Would you like to visit the download page?")); ui->updateDetails->setText(updateDetailsText); if(updateResult.channel == UpdateCheck::UpdateChannel::Stable) { @@ -105,7 +110,27 @@ UpdateDetails::visitDownloadPage(const UpdateCheck::UpdateChannel &channel) QDesktopServices::openUrl(QUrl("https://github.com/86Box/86Box/releases/latest")); break; case UpdateCheck::UpdateChannel::CI: - QDesktopServices::openUrl(QUrl("https://ci.86box.net/job/86Box/lastSuccessfulBuild/artifact/")); + QDesktopServices::openUrl(QUrl("https://86box.net/builds#" +#ifdef Q_OS_WINDOWS + "win" +#elif defined(Q_OS_MACOS) + "mac" +#elif defined(Q_OS_LINUX) + "lin" +#endif + +#if defined(__aarch64__) || defined(_M_ARM64) + "arm64" +#elif defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64) + "64" +#endif + +#ifdef USE_NEW_DYNAREC + "ndr" +#else + "odr" +#endif + )); break; } } diff --git a/src/qt/qt_updatedetails.ui b/src/qt/qt_updatedetails.ui index 7b9c0aa2a..7798896a9 100644 --- a/src/qt/qt_updatedetails.ui +++ b/src/qt/qt_updatedetails.ui @@ -17,7 +17,7 @@ - Dialog + 86Box Update diff --git a/src/qt/qt_util.cpp b/src/qt/qt_util.cpp index 5baaaaacf..201b61b3f 100644 --- a/src/qt/qt_util.cpp +++ b/src/qt/qt_util.cpp @@ -27,6 +27,7 @@ #include "qt_util.hpp" #ifdef Q_OS_WINDOWS +# include # include # ifndef DWMWA_WINDOW_CORNER_PREFERENCE # define DWMWA_WINDOW_CORNER_PREFERENCE 33 @@ -62,6 +63,36 @@ screenOfWidget(QWidget *widget) } #ifdef Q_OS_WINDOWS + +bool +isWindowsLightTheme(void) { + // based on https://stackoverflow.com/questions/51334674/how-to-detect-windows-10-light-dark-mode-in-win32-application + + // The value is expected to be a REG_DWORD, which is a signed 32-bit little-endian + auto buffer = std::vector(4); + auto cbData = static_cast(buffer.size() * sizeof(char)); + auto res = RegGetValueW( + HKEY_CURRENT_USER, + L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", + L"AppsUseLightTheme", + RRF_RT_REG_DWORD, // expected value type + nullptr, + buffer.data(), + &cbData); + + if (res != ERROR_SUCCESS) { + return 1; + } + + // convert bytes written to our buffer to an int, assuming little-endian + auto i = int(buffer[3] << 24 | + buffer[2] << 16 | + buffer[1] << 8 | + buffer[0]); + + return i == 1; +} + void setWin11RoundedCorners(WId hwnd, bool enable) { @@ -117,11 +148,16 @@ DlgFilter(QStringList extensions, bool last) QString currentUuid() { - auto configPath = QFileInfo(cfg_path).dir().canonicalPath(); - if(!configPath.endsWith("/")) { - configPath.append("/"); + return generateUuid(QString(cfg_path)); +} + +QString generateUuid(const QString &path) +{ + auto dirPath = QFileInfo(path).dir().canonicalPath(); + if(!dirPath.endsWith("/")) { + dirPath.append("/"); } - return QUuid::createUuidV5(QUuid{}, configPath).toString(QUuid::WithoutBraces); + return QUuid::createUuidV5(QUuid{}, dirPath).toString(QUuid::WithoutBraces); } bool compareUuid() diff --git a/src/qt/qt_util.hpp b/src/qt/qt_util.hpp index e0d2648d0..a2ca44425 100644 --- a/src/qt/qt_util.hpp +++ b/src/qt/qt_util.hpp @@ -15,9 +15,11 @@ QString DlgFilter(QStringList extensions, bool last = false); /* Returns screen the widget is on */ QScreen *screenOfWidget(QWidget *widget); #ifdef Q_OS_WINDOWS +bool isWindowsLightTheme(void); void setWin11RoundedCorners(WId hwnd, bool enable); #endif QString currentUuid(); +QString generateUuid(const QString &path); void storeCurrentUuid(); bool compareUuid(); void generateNewMacAdresses(); diff --git a/src/qt/qt_vmmanager_addmachine.cpp b/src/qt/qt_vmmanager_addmachine.cpp index aa6c7a1c4..b621d4733 100644 --- a/src/qt/qt_vmmanager_addmachine.cpp +++ b/src/qt/qt_vmmanager_addmachine.cpp @@ -47,58 +47,31 @@ VMManagerAddMachine(QWidget *parent) : QWizard(parent) #ifndef Q_OS_MACOS setWizardStyle(ModernStyle); - // setPixmap(LogoPixmap, scaledPixmap); - // setPixmap(LogoPixmap, wizardPixmap); - // setPixmap(WatermarkPixmap, scaledPixmap); - setPixmap(WatermarkPixmap, wizardPixmap); + setPixmap(LogoPixmap, QPixmap(":assets/addvm-logo.png")); #else - // macos - // setPixmap(BackgroundPixmap, scaledPixmap); - setPixmap(BackgroundPixmap, wizardPixmap); + setWizardStyle(MacStyle); + setPixmap(BackgroundPixmap, QPixmap(":/assets/86box-wizard.png")); #endif // Wizard wants to resize based on image. This keeps the size +#ifdef Q_OS_WINDOWS + setMinimumSize(QSize(550, size().height())); + setMaximumSize(QSize(550, size().height())); + setWindowFlag(Qt::MSWindowsFixedSizeDialogHint, true); +#else setMinimumSize(size()); +#endif setOption(HaveHelpButton, false); - // setPixmap(LogoPixmap, QPixmap(":/settings/qt/icons/86Box-gray.ico")); - - connect(this, &QWizard::helpRequested, this, &VMManagerAddMachine::showHelp); setWindowTitle(tr("Add new system wizard")); } -void -VMManagerAddMachine::showHelp() -{ - // TBD - static QString lastHelpMessage; - - QString message; - - // Help will depend on the current page - switch (currentId()) { - case Page_Intro: - message = tr("This is the into page."); - break; - default: - message = tr("No help has been added yet, you're on your own."); - break; - } - - if (lastHelpMessage == message) { - message = tr("Did you click help twice?"); - } - - QMessageBox::information(this, tr("Add new system wizard help"), message); - lastHelpMessage = message; -} - IntroPage:: IntroPage(QWidget *parent) { setTitle(tr("Introduction")); - setPixmap(QWizard::WatermarkPixmap, QPixmap(":/assets/qt/assets/86box.png")); + setPixmap(QWizard::WatermarkPixmap, QPixmap(":assets/addvm-watermark.png")); topLabel = new QLabel(tr("This will help you add a new system to 86Box.")); // topLabel = new QLabel(tr("This will help you add a new system to 86Box.\n\n Choose \"New configuration\" if you'd like to create a new machine.\n\nChoose \"Use existing configuration\" if you'd like to paste in an existing configuration from elsewhere.")); @@ -106,7 +79,7 @@ IntroPage(QWidget *parent) newConfigRadioButton = new QRadioButton(tr("New configuration")); // auto newDescription = new QLabel(tr("Choose this option to start with a fresh configuration.")); - existingConfigRadioButton = new QRadioButton(tr("Use existing configuraion")); + existingConfigRadioButton = new QRadioButton(tr("Use existing configuration")); // auto existingDescription = new QLabel(tr("Use this option if you'd like to paste in the configuration file from an existing system.")); newConfigRadioButton->setChecked(true); @@ -134,16 +107,24 @@ WithExistingConfigPage:: WithExistingConfigPage(QWidget *parent) { setTitle(tr("Use existing configuration")); - - const auto topLabel = new QLabel(tr("Paste the contents of the existing configuration file into the box below.")); - topLabel->setWordWrap(true); + setSubTitle(tr("Paste the contents of the existing configuration file into the box below.")); existingConfiguration = new QPlainTextEdit(); + const auto monospaceFont = new QFont(); +#ifdef Q_OS_WINDOWS + monospaceFont->setFamily("Consolas"); +#elif defined(Q_OS_MACOS) + monospaceFont->setFamily("Menlo"); +#else + monospaceFont->setFamily("Monospace"); +#endif + monospaceFont->setStyleHint(QFont::Monospace); + monospaceFont->setFixedPitch(true); + existingConfiguration->setFont(*monospaceFont); connect(existingConfiguration, &QPlainTextEdit::textChanged, this, &WithExistingConfigPage::completeChanged); registerField("existingConfiguration*", this, "configuration"); const auto layout = new QVBoxLayout(); - layout->addWidget(topLabel); layout->addWidget(existingConfiguration); const auto loadFileButton = new QPushButton(); const auto loadFileLabel = new QLabel(tr("Load configuration from file")); @@ -160,7 +141,6 @@ WithExistingConfigPage(QWidget *parent) void WithExistingConfigPage::chooseExistingConfigFile() { - // TODO: FIXME: This is using the CLI arg and needs to instead use a proper variable const auto startDirectory = QString(vmm_path); const auto selectedConfigFile = QFileDialog::getOpenFileName(this, tr("Choose configuration file"), startDirectory, @@ -208,6 +188,7 @@ WithExistingConfigPage::isComplete() const NameAndLocationPage:: NameAndLocationPage(QWidget *parent) { +#ifdef CUSTOM_SYSTEM_LOCATION setTitle(tr("System name and location")); #if defined(_WIN32) @@ -218,29 +199,38 @@ NameAndLocationPage(QWidget *parent) dirValidate = QRegularExpression(R"(^[^/]+$)"); #endif - const auto topLabel = new QLabel(tr("Enter the name of the system and choose the location")); - topLabel->setWordWrap(true); + setSubTitle(tr("Enter the name of the system and choose the location")); +#else + setTitle(tr("System name")); + setSubTitle(tr("Enter the name of the system")); +#endif const auto chooseDirectoryButton = new QPushButton(); chooseDirectoryButton->setIcon(QApplication::style()->standardIcon(QStyle::SP_DirIcon)); - const auto systemNameLabel = new QLabel(tr("System Name")); + const auto systemNameLabel = new QLabel(tr("System name:")); systemName = new QLineEdit(); // Special event filter to override enter key systemName->installEventFilter(this); registerField("systemName*", systemName); systemNameValidation = new QLabel(); - const auto systemLocationLabel = new QLabel(tr("System Location")); +#ifdef CUSTOM_SYSTEM_LOCATION + const auto systemLocationLabel = new QLabel(tr("System location:")); systemLocation = new QLineEdit(); - // TODO: FIXME: This is using the CLI arg and needs to instead use a proper variable systemLocation->setText(QDir::toNativeSeparators(vmm_path)); registerField("systemLocation*", systemLocation); systemLocationValidation = new QLabel(); systemLocationValidation->setWordWrap(true); +#endif + + const auto displayNameLabel = new QLabel(tr("Display name (optional):")); + displayName = new QLineEdit(); + // Special event filter to override enter key + displayName->installEventFilter(this); + registerField("displayName*", displayName); const auto layout = new QGridLayout(); - layout->addWidget(topLabel, 0, 0, 1, -1); // Spacer row layout->setRowMinimumHeight(1, 20); layout->addWidget(systemNameLabel, 2, 0); @@ -250,6 +240,7 @@ NameAndLocationPage(QWidget *parent) // Set height on validation because it may not always be present layout->setRowMinimumHeight(3, 20); +#ifdef CUSTOM_SYSTEM_LOCATION // Another spacer layout->setRowMinimumHeight(4, 20); layout->addWidget(systemLocationLabel, 5, 0); @@ -258,11 +249,18 @@ NameAndLocationPage(QWidget *parent) // Validation text layout->addWidget(systemLocationValidation, 6, 0, 1, -1); layout->setRowMinimumHeight(6, 20); +#endif + + // Another spacer + layout->setRowMinimumHeight(7, 20); + layout->addWidget(displayNameLabel, 8, 0); + layout->addWidget(displayName, 8, 1); setLayout(layout); - +#ifdef CUSTOM_SYSTEM_LOCATION connect(chooseDirectoryButton, &QPushButton::clicked, this, &NameAndLocationPage::chooseDirectoryLocation); +#endif } int @@ -271,41 +269,52 @@ NameAndLocationPage::nextId() const return VMManagerAddMachine::Page_Conclusion; } +#ifdef CUSTOM_SYSTEM_LOCATION void NameAndLocationPage::chooseDirectoryLocation() { - // TODO: FIXME: This is pulling in the CLI directory! Needs to be set properly elsewhere const auto directory = QFileDialog::getExistingDirectory(this, "Choose directory", QDir(vmm_path).path()); systemLocation->setText(QDir::toNativeSeparators(directory)); emit completeChanged(); } +#endif bool NameAndLocationPage::isComplete() const { bool nameValid = false; +#ifdef CUSTOM_SYSTEM_LOCATION bool locationValid = false; +#endif // return true if complete if (systemName->text().isEmpty()) { systemNameValidation->setText(tr("Please enter a system name")); +#ifdef CUSTOM_SYSTEM_LOCATION } else if (!systemName->text().contains(dirValidate)) { systemNameValidation->setText(tr("System name cannot contain certain characters")); } else if (const QDir newDir = QDir::cleanPath(systemLocation->text() + "/" + systemName->text()); newDir.exists()) { +#else + } else if (const QDir newDir = QDir::cleanPath(QString(vmm_path) + "/" + systemName->text()); newDir.exists()) { +#endif systemNameValidation->setText(tr("System name already exists")); } else { systemNameValidation->clear(); nameValid = true; } +#ifdef CUSTOM_SYSTEM_LOCATION if (systemLocation->text().isEmpty()) { systemLocationValidation->setText(tr("Please enter a directory for the system")); } else if (const auto dir = QDir(systemLocation->text()); !dir.exists()) { systemLocationValidation->setText(tr("Directory does not exist")); } else { - systemLocationValidation->setText("A new directory for the system will be created in the selected directory above"); + systemLocationValidation->setText(tr("A new directory for the system will be created in the selected directory above")); locationValid = true; } return nameValid && locationValid; +#else + return nameValid; +#endif } bool NameAndLocationPage::eventFilter(QObject *watched, QEvent *event) @@ -333,23 +342,38 @@ ConclusionPage(QWidget *parent) { setTitle(tr("Complete")); + setPixmap(QWizard::WatermarkPixmap, QPixmap(":assets/addvm-watermark.png")); + topLabel = new QLabel(tr("The wizard will now launch the configuration for the new system.")); topLabel->setWordWrap(true); const auto systemNameLabel = new QLabel(tr("System name:")); systemNameLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); systemName = new QLabel(); + systemName->setWordWrap(true); +#ifdef CUSTOM_SYSTEM_LOCATION const auto systemLocationLabel = new QLabel(tr("System location:")); systemLocationLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); systemLocation = new QLabel(); + systemLocation->setWordWrap(true); +#endif + + displayNameLabel = new QLabel(tr("Display name:")); + displayNameLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); + displayName = new QLabel(); + displayName->setWordWrap(true); const auto layout = new QGridLayout(); layout->addWidget(topLabel, 0, 0, 1, -1); layout->setRowMinimumHeight(1, 20); layout->addWidget(systemNameLabel, 2, 0); layout->addWidget(systemName, 2, 1); +#ifdef CUSTOM_SYSTEM_LOCATION layout->addWidget(systemLocationLabel, 3, 0); layout->addWidget(systemLocation, 3, 1); +#endif + layout->addWidget(displayNameLabel, 4, 0); + layout->addWidget(displayName, 4, 1); setLayout(layout); } @@ -358,10 +382,23 @@ ConclusionPage(QWidget *parent) void ConclusionPage::initializePage() { +#ifdef CUSTOM_SYSTEM_LOCATION const auto finalPath = QDir::cleanPath(field("systemLocation").toString() + "/" + field("systemName").toString()); const auto nativePath = QDir::toNativeSeparators(finalPath); +#endif const auto systemNameDisplay = field("systemName").toString(); + const auto displayNameDisplay = field("displayName").toString(); systemName->setText(systemNameDisplay); +#ifdef CUSTOM_SYSTEM_LOCATION systemLocation->setText(nativePath); +#endif + if (!displayNameDisplay.isEmpty()) { + displayNameLabel->setVisible(true); + displayName->setVisible(true); + displayName->setText(displayNameDisplay); + } else { + displayNameLabel->setVisible(false); + displayName->setVisible(false); + } } diff --git a/src/qt/qt_vmmanager_addmachine.hpp b/src/qt/qt_vmmanager_addmachine.hpp index c1355b471..b73b5a609 100644 --- a/src/qt/qt_vmmanager_addmachine.hpp +++ b/src/qt/qt_vmmanager_addmachine.hpp @@ -41,9 +41,6 @@ public: }; explicit VMManagerAddMachine(QWidget *parent = nullptr); - -private slots: - void showHelp(); }; class IntroPage : public QWizardPage { @@ -88,12 +85,17 @@ public: [[nodiscard]] int nextId() const override; private: QLineEdit *systemName; +#ifdef CUSTOM_SYSTEM_LOCATION QLineEdit *systemLocation; +#endif + QLineEdit *displayName; QLabel *systemNameValidation; +#ifdef CUSTOM_SYSTEM_LOCATION QLabel *systemLocationValidation; QRegularExpression dirValidate; private slots: void chooseDirectoryLocation(); +#endif protected: [[nodiscard]] bool isComplete() const override; bool eventFilter(QObject *watched, QEvent *event) override; @@ -107,7 +109,11 @@ public: private: QLabel *topLabel; QLabel *systemName; +#ifdef CUSTOM_SYSTEM_LOCATION QLabel *systemLocation; +#endif + QLabel *displayNameLabel; + QLabel *displayName; protected: void initializePage() override; }; diff --git a/src/qt/qt_vmmanager_clientsocket.cpp b/src/qt/qt_vmmanager_clientsocket.cpp index f5e5c8bad..ffe4fb5f7 100644 --- a/src/qt/qt_vmmanager_clientsocket.cpp +++ b/src/qt/qt_vmmanager_clientsocket.cpp @@ -247,3 +247,9 @@ VMManagerClientSocket::clientRunningStateChanged(VMManagerProtocol::RunningState extra_object["status"] = static_cast(state); sendMessageWithObject(VMManagerProtocol::ClientMessage::RunningStateChanged, extra_object); } + +void +VMManagerClientSocket::configurationChanged() const +{ + sendMessage(VMManagerProtocol::ClientMessage::ConfigurationChanged); +} diff --git a/src/qt/qt_vmmanager_clientsocket.hpp b/src/qt/qt_vmmanager_clientsocket.hpp index 980ec10ee..50657a27b 100644 --- a/src/qt/qt_vmmanager_clientsocket.hpp +++ b/src/qt/qt_vmmanager_clientsocket.hpp @@ -44,6 +44,7 @@ signals: public slots: void clientRunningStateChanged(VMManagerProtocol::RunningState state) const; + void configurationChanged() const; private: QString server_name; diff --git a/src/qt/qt_vmmanager_config.cpp b/src/qt/qt_vmmanager_config.cpp index 08bf4e7c4..41075799b 100644 --- a/src/qt/qt_vmmanager_config.cpp +++ b/src/qt/qt_vmmanager_config.cpp @@ -33,6 +33,9 @@ VMManagerConfig::VMManagerConfig(const ConfigType type, const QString& section) config_type = type; settings = new QSettings(configFile, QSettings::IniFormat, this); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + settings->setIniCodec("UTF-8"); +#endif settings->setFallbacksEnabled(false); if(type == ConfigType::System && !section.isEmpty()) { settings->beginGroup(section); diff --git a/src/qt/qt_vmmanager_details.cpp b/src/qt/qt_vmmanager_details.cpp index c3b5ac4ce..65608cf0a 100644 --- a/src/qt/qt_vmmanager_details.cpp +++ b/src/qt/qt_vmmanager_details.cpp @@ -19,12 +19,19 @@ #include #include +#include "qt_util.hpp" #include "qt_vmmanager_details.hpp" #include "ui_qt_vmmanager_details.h" +#define TOOLBUTTON_STYLESHEET_LIGHT "QToolButton {background: transparent; border: none; padding: 5px} QToolButton:hover {background: palette(midlight)} QToolButton:pressed {background: palette(mid)}" #ifdef Q_OS_WINDOWS -extern bool windows_is_light_theme(); +# define TOOLBUTTON_STYLESHEET_DARK "QToolButton {padding: 5px}" +# define SCREENSHOTBORDER_STYLESHEET_DARK "QLabel { border: 1px solid gray }" +#else +# define TOOLBUTTON_STYLESHEET_DARK "QToolButton {background: transparent; border: none; padding: 5px} QToolButton:hover {background: palette(dark)} QToolButton:pressed {background: palette(mid)}" #endif +#define SCROLLAREA_STYLESHEET_LIGHT "QWidget {background-color: palette(light)} QScrollBar{ background-color: none }" +#define SYSTEMLABEL_STYLESHEET_LIGHT "background-color: palette(midlight);" using namespace VMManager; @@ -60,13 +67,16 @@ VMManagerDetails::VMManagerDetails(QWidget *parent) : ui->leftColumn->layout()->addWidget(networkSection); // ui->leftColumn->layout()->addWidget(createHorizontalLine()); - inputSection = new VMManagerDetailSection(tr("Input Devices", "Header for Input section in VM Manager Details")); + inputSection = new VMManagerDetailSection(tr("Input devices", "Header for Input section in VM Manager Details")); ui->leftColumn->layout()->addWidget(inputSection); // ui->leftColumn->layout()->addWidget(createHorizontalLine()); portsSection = new VMManagerDetailSection(tr("Ports", "Header for Input section in VM Manager Details")); ui->leftColumn->layout()->addWidget(portsSection); + otherSection = new VMManagerDetailSection(tr("Other devices", "Header for Other devices section in VM Manager Details")); + ui->leftColumn->layout()->addWidget(otherSection); + // This is like adding a spacer leftColumnLayout->addStretch(); @@ -97,24 +107,23 @@ VMManagerDetails::VMManagerDetails(QWidget *parent) : QString toolButtonStyleSheet; // Simple method to try and determine if light mode is enabled #ifdef Q_OS_WINDOWS - const bool lightMode = windows_is_light_theme(); + const bool lightMode = util::isWindowsLightTheme(); #else const bool lightMode = QApplication::palette().window().color().value() > QApplication::palette().windowText().color().value(); #endif if (lightMode) { - toolButtonStyleSheet = "QToolButton {background: transparent; border: none; padding: 5px} QToolButton:hover {background: palette(midlight)} QToolButton:pressed {background: palette(mid)}"; + toolButtonStyleSheet = TOOLBUTTON_STYLESHEET_LIGHT; } else { -#ifndef Q_OS_WINDOWS - toolButtonStyleSheet = "QToolButton {background: transparent; border: none; padding: 5px} QToolButton:hover {background: palette(dark)} QToolButton:pressed {background: palette(mid)}"; -#else - toolButtonStyleSheet = "QToolButton {padding: 5px}"; -#endif + toolButtonStyleSheet = TOOLBUTTON_STYLESHEET_DARK; } ui->ssNavTBHolder->setStyleSheet(toolButtonStyleSheet); + pauseIcon = QIcon(":/menuicons/qt/icons/pause.ico"); + runIcon = QIcon(":/menuicons/qt/icons/run.ico"); + // Experimenting startPauseButton = new QToolButton(); - startPauseButton->setIcon(QIcon(":/menuicons/qt/icons/run.ico")); + startPauseButton->setIcon(runIcon); startPauseButton->setAutoRaise(true); startPauseButton->setEnabled(false); startPauseButton->setToolTip(tr("Start")); @@ -144,6 +153,17 @@ VMManagerDetails::VMManagerDetails(QWidget *parent) : ui->notesTextEdit->setEnabled(false); +#ifdef Q_OS_WINDOWS + connect(this, &VMManagerDetails::styleUpdated, systemSection, &VMManagerDetailSection::updateStyle); + connect(this, &VMManagerDetails::styleUpdated, videoSection, &VMManagerDetailSection::updateStyle); + connect(this, &VMManagerDetails::styleUpdated, storageSection, &VMManagerDetailSection::updateStyle); + connect(this, &VMManagerDetails::styleUpdated, audioSection, &VMManagerDetailSection::updateStyle); + connect(this, &VMManagerDetails::styleUpdated, networkSection, &VMManagerDetailSection::updateStyle); + connect(this, &VMManagerDetails::styleUpdated, inputSection, &VMManagerDetailSection::updateStyle); + connect(this, &VMManagerDetails::styleUpdated, portsSection, &VMManagerDetailSection::updateStyle); + connect(this, &VMManagerDetails::styleUpdated, otherSection, &VMManagerDetailSection::updateStyle); +#endif + sysconfig = new VMManagerSystem(); } @@ -157,12 +177,11 @@ VMManagerDetails::updateData(VMManagerSystem *passed_sysconfig) { // Set the scrollarea background but also set the scroll bar to none. Otherwise it will also // set the scrollbar background to the same. #ifdef Q_OS_WINDOWS - extern bool windows_is_light_theme(); - if (windows_is_light_theme()) + if (util::isWindowsLightTheme()) #endif { - ui->scrollArea->setStyleSheet("QWidget {background-color: palette(light)} QScrollBar{ background-color: none }"); - ui->systemLabel->setStyleSheet("background-color: palette(midlight);"); + ui->scrollArea->setStyleSheet(SCROLLAREA_STYLESHEET_LIGHT); + ui->systemLabel->setStyleSheet(SYSTEMLABEL_STYLESHEET_LIGHT); } // Margins are a little different on macos #ifdef Q_OS_MACOS @@ -189,15 +208,39 @@ VMManagerDetails::updateData(VMManagerSystem *passed_sysconfig) { bool running = sysconfig->getProcessStatus() == VMManagerSystem::ProcessStatus::Running || sysconfig->getProcessStatus() == VMManagerSystem::ProcessStatus::RunningWaiting; if(running) { - startPauseButton->setIcon(QIcon(":/menuicons/qt/icons/pause.ico")); + startPauseButton->setIcon(pauseIcon); connect(startPauseButton, &QToolButton::clicked, sysconfig, &VMManagerSystem::pauseButtonPressed); } else { - startPauseButton->setIcon(QIcon(":/menuicons/qt/icons/run.ico")); + startPauseButton->setIcon(runIcon); connect(startPauseButton, &QToolButton::clicked, sysconfig, &VMManagerSystem::startButtonPressed); } startPauseButton->setEnabled(true); configureButton->setEnabled(true); + updateConfig(passed_sysconfig); + updateScreenshots(passed_sysconfig); + + ui->systemLabel->setText(passed_sysconfig->displayName); + ui->statusLabel->setText(sysconfig->process->processId() == 0 ? + tr("Not running") : + QString("%1: PID %2").arg(tr("Running"), QString::number(sysconfig->process->processId()))); + ui->notesTextEdit->setPlainText(passed_sysconfig->notes); + ui->notesTextEdit->setEnabled(true); + + disconnect(sysconfig->process, &QProcess::stateChanged, this, &VMManagerDetails::updateProcessStatus); + connect(sysconfig->process, &QProcess::stateChanged, this, &VMManagerDetails::updateProcessStatus); + + disconnect(sysconfig, &VMManagerSystem::windowStatusChanged, this, &VMManagerDetails::updateWindowStatus); + connect(sysconfig, &VMManagerSystem::windowStatusChanged, this, &VMManagerDetails::updateWindowStatus); + + disconnect(sysconfig, &VMManagerSystem::clientProcessStatusChanged, this, &VMManagerDetails::updateProcessStatus); + connect(sysconfig, &VMManagerSystem::clientProcessStatusChanged, this, &VMManagerDetails::updateProcessStatus); + + updateProcessStatus(); +} + +void +VMManagerDetails::updateConfig(VMManagerSystem *passed_sysconfig) { // Each detail section here has its own VMManagerDetailSection. // When a system is selected in the list view it is updated here, through this object: // * First you clear it with VMManagerDetailSection::clear() @@ -221,7 +264,10 @@ VMManagerDetails::updateData(VMManagerSystem *passed_sysconfig) { storageSection->addSection("Disks", passed_sysconfig->getDisplayValue(Display::Name::Disks)); storageSection->addSection("Floppy", passed_sysconfig->getDisplayValue(Display::Name::Floppy)); storageSection->addSection("CD-ROM", passed_sysconfig->getDisplayValue(Display::Name::CD)); + storageSection->addSection("Removable disks", passed_sysconfig->getDisplayValue(Display::Name::RDisk)); + storageSection->addSection("MO", passed_sysconfig->getDisplayValue(Display::Name::MO)); storageSection->addSection("SCSI", passed_sysconfig->getDisplayValue(Display::Name::SCSIController)); + storageSection->addSection("Controllers", passed_sysconfig->getDisplayValue(Display::Name::StorageController)); // Audio audioSection->clear(); @@ -234,14 +280,33 @@ VMManagerDetails::updateData(VMManagerSystem *passed_sysconfig) { // Input inputSection->clear(); - inputSection->addSection(tr("Mouse"), passed_sysconfig->getDisplayValue(Display::Name::Mouse)); - inputSection->addSection(tr("Joystick"), passed_sysconfig->getDisplayValue(Display::Name::Joystick)); + inputSection->addSection("Keyboard", passed_sysconfig->getDisplayValue(Display::Name::Keyboard)); + inputSection->addSection("Mouse", passed_sysconfig->getDisplayValue(Display::Name::Mouse)); + inputSection->addSection("Joystick", passed_sysconfig->getDisplayValue(Display::Name::Joystick)); // Ports portsSection->clear(); - portsSection->addSection(tr("Serial Ports"), passed_sysconfig->getDisplayValue(Display::Name::Serial)); - portsSection->addSection(tr("Parallel Ports"), passed_sysconfig->getDisplayValue(Display::Name::Parallel)); + portsSection->addSection("Serial ports", passed_sysconfig->getDisplayValue(Display::Name::Serial)); + portsSection->addSection("Parallel ports", passed_sysconfig->getDisplayValue(Display::Name::Parallel)); + // Other devices + otherSection->clear(); + otherSection->addSection("ISA RTC", passed_sysconfig->getDisplayValue(Display::Name::IsaRtc)); + otherSection->addSection("ISA RAM", passed_sysconfig->getDisplayValue(Display::Name::IsaMem)); + otherSection->addSection("ISA ROM", passed_sysconfig->getDisplayValue(Display::Name::IsaRom)); + + systemSection->setSections(); + videoSection->setSections(); + storageSection->setSections(); + audioSection->setSections(); + networkSection->setSections(); + inputSection->setSections(); + portsSection->setSections(); + otherSection->setSections(); +} + +void +VMManagerDetails::updateScreenshots(VMManagerSystem *passed_sysconfig) { // Disable screenshot navigation buttons by default ui->screenshotNext->setEnabled(false); ui->screenshotPrevious->setEnabled(false); @@ -279,31 +344,13 @@ VMManagerDetails::updateData(VMManagerSystem *passed_sysconfig) { ui->screenshot->setEnabled(false); ui->screenshot->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); #ifdef Q_OS_WINDOWS - if (!windows_is_light_theme()) { - ui->screenshot->setStyleSheet("QLabel { border: 1px solid gray }"); + if (!util::isWindowsLightTheme()) { + ui->screenshot->setStyleSheet(SCREENSHOTBORDER_STYLESHEET_DARK); } else { ui->screenshot->setStyleSheet(""); } #endif } - - ui->systemLabel->setText(passed_sysconfig->displayName); - ui->statusLabel->setText(sysconfig->process->processId() == 0 ? - tr("Not running") : - QString("%1: PID %2").arg(tr("Running"), QString::number(sysconfig->process->processId()))); - ui->notesTextEdit->setPlainText(passed_sysconfig->notes); - ui->notesTextEdit->setEnabled(true); - - disconnect(sysconfig->process, &QProcess::stateChanged, this, &VMManagerDetails::updateProcessStatus); - connect(sysconfig->process, &QProcess::stateChanged, this, &VMManagerDetails::updateProcessStatus); - - disconnect(sysconfig, &VMManagerSystem::windowStatusChanged, this, &VMManagerDetails::updateWindowStatus); - connect(sysconfig, &VMManagerSystem::windowStatusChanged, this, &VMManagerDetails::updateWindowStatus); - - disconnect(sysconfig, &VMManagerSystem::clientProcessStatusChanged, this, &VMManagerDetails::updateProcessStatus); - connect(sysconfig, &VMManagerSystem::clientProcessStatusChanged, this, &VMManagerDetails::updateProcessStatus); - - updateProcessStatus(); } void @@ -312,17 +359,17 @@ VMManagerDetails::updateProcessStatus() { QString status_text = running ? QString("%1: PID %2").arg(tr("Running"), QString::number(sysconfig->process->processId())) : tr("Not running"); - status_text.append(sysconfig->window_obscured ? QString(" (%1)").arg(tr("waiting")) : ""); + status_text.append(sysconfig->window_obscured ? QString(" (%1)").arg(tr("Waiting")) : ""); ui->statusLabel->setText(status_text); resetButton->setEnabled(running); stopButton->setEnabled(running); cadButton->setEnabled(running); if(running) { if(sysconfig->getProcessStatus() == VMManagerSystem::ProcessStatus::Running) { - startPauseButton->setIcon(QIcon(":/menuicons/qt/icons/pause.ico")); + startPauseButton->setIcon(pauseIcon); startPauseButton->setToolTip(tr("Pause")); } else { - startPauseButton->setIcon(QIcon(":/menuicons/qt/icons/run.ico")); + startPauseButton->setIcon(runIcon); startPauseButton->setToolTip(tr("Continue")); } @@ -330,7 +377,7 @@ VMManagerDetails::updateProcessStatus() { disconnect(startPauseButton, &QToolButton::clicked, sysconfig, &VMManagerSystem::startButtonPressed); connect(startPauseButton, &QToolButton::clicked, sysconfig, &VMManagerSystem::pauseButtonPressed); } else { - startPauseButton->setIcon(QIcon(":/menuicons/qt/icons/run.ico")); + startPauseButton->setIcon(runIcon); disconnect(startPauseButton, &QToolButton::clicked, sysconfig, &VMManagerSystem::pauseButtonPressed); disconnect(startPauseButton, &QToolButton::clicked, sysconfig, &VMManagerSystem::startButtonPressed); connect(startPauseButton, &QToolButton::clicked, sysconfig, &VMManagerSystem::startButtonPressed); @@ -356,6 +403,32 @@ VMManagerDetails::updateWindowStatus() updateProcessStatus(); } +#ifdef Q_OS_WINDOWS +void +VMManagerDetails::updateStyle() +{ + QString toolButtonStyleSheet; + const bool lightMode = util::isWindowsLightTheme(); + if (lightMode) { + toolButtonStyleSheet = TOOLBUTTON_STYLESHEET_LIGHT; + ui->scrollArea->setStyleSheet(SCROLLAREA_STYLESHEET_LIGHT); + ui->systemLabel->setStyleSheet(SYSTEMLABEL_STYLESHEET_LIGHT); + if (!ui->screenshot->isEnabled()) + ui->screenshot->setStyleSheet(""); + } else { + toolButtonStyleSheet = TOOLBUTTON_STYLESHEET_DARK; + ui->scrollArea->setStyleSheet(""); + ui->systemLabel->setStyleSheet(""); + if (!ui->screenshot->isEnabled()) + ui->screenshot->setStyleSheet(SCREENSHOTBORDER_STYLESHEET_DARK); + } + ui->ssNavTBHolder->setStyleSheet(toolButtonStyleSheet); + ui->toolButtonHolder->setStyleSheet(toolButtonStyleSheet); + + emit styleUpdated(); +} +#endif + QWidget * VMManagerDetails::createHorizontalLine(const int leftSpacing, const int rightSpacing) { diff --git a/src/qt/qt_vmmanager_details.hpp b/src/qt/qt_vmmanager_details.hpp index 5d3bfa8a4..ac7cda35b 100644 --- a/src/qt/qt_vmmanager_details.hpp +++ b/src/qt/qt_vmmanager_details.hpp @@ -42,8 +42,18 @@ public: void updateProcessStatus(); void updateWindowStatus(); + +#ifdef Q_OS_WINDOWS + void updateStyle(); +#endif + // CollapseButton *systemCollapseButton; +#ifdef Q_OS_WINDOWS +signals: + void styleUpdated(); +#endif + private: Ui::VMManagerDetails *ui; VMManagerSystem *sysconfig; @@ -55,6 +65,7 @@ private: VMManagerDetailSection *networkSection; VMManagerDetailSection *inputSection; VMManagerDetailSection *portsSection; + VMManagerDetailSection *otherSection; QFileInfoList screenshots; int screenshotIndex = 0; @@ -67,6 +78,11 @@ private: QToolButton *configureButton; QToolButton *cadButton; + QIcon pauseIcon; + QIcon runIcon; + + void updateConfig(VMManagerSystem *passed_sysconfig); + void updateScreenshots(VMManagerSystem *passed_sysconfig); static QWidget* createHorizontalLine(int leftSpacing = 25, int rightSpacing = 25); // QVBoxLayout *detailsLayout; private slots: diff --git a/src/qt/qt_vmmanager_detailsection.cpp b/src/qt/qt_vmmanager_detailsection.cpp index ce42ae281..ab9a4b5ff 100644 --- a/src/qt/qt_vmmanager_detailsection.cpp +++ b/src/qt/qt_vmmanager_detailsection.cpp @@ -19,6 +19,15 @@ #include "ui_qt_vmmanager_detailsection.h" #include +#include "qt_util.hpp" + +#define HEADER_STYLESHEET_LIGHT "background-color: palette(midlight);" +#ifdef Q_OS_WINDOWS +# define HEADER_STYLESHEET_DARK "background-color: #616161;" +# define BACKGROUND_STYLESHEET_DARK "background-color: #272727;" +#else +# define HEADER_STYLESHEET_DARK "background-color: palette(mid);" +#endif const QString VMManagerDetailSection::sectionSeparator = ";"; using namespace VMManager; @@ -40,21 +49,18 @@ VMManagerDetailSection(const QString §ionName) // Simple method to try and determine if light mode is enabled on the host #ifdef Q_OS_WINDOWS - extern bool windows_is_light_theme(); - const bool lightMode = windows_is_light_theme(); + const bool lightMode = util::isWindowsLightTheme(); #else const bool lightMode = QApplication::palette().window().color().value() > QApplication::palette().windowText().color().value(); #endif // Alternate layout - if ( lightMode) { - ui->collapseButtonHolder->setStyleSheet("background-color: palette(midlight);"); + if (lightMode) { + ui->collapseButtonHolder->setStyleSheet(HEADER_STYLESHEET_LIGHT); } else { #ifdef Q_OS_WINDOWS - ui->outerFrame->setStyleSheet("background-color: #272727;"); - ui->collapseButtonHolder->setStyleSheet("background-color: #616161;"); -#else - ui->collapseButtonHolder->setStyleSheet("background-color: palette(mid);"); + ui->outerFrame->setStyleSheet(BACKGROUND_STYLESHEET_DARK); #endif + ui->collapseButtonHolder->setStyleSheet(HEADER_STYLESHEET_DARK); } const auto sectionLabel = new QLabel(sectionName); sectionLabel->setStyleSheet(sectionLabel->styleSheet().append("font-weight: bold;")); @@ -143,7 +149,6 @@ VMManagerDetailSection::addSection(const QString &name, const QString &value, Di { const auto new_section = DetailSection { name, value}; sections.push_back(new_section); - setSections(); } void @@ -154,8 +159,50 @@ VMManagerDetailSection::setupMainLayout() mainLayout = new QVBoxLayout; } void -VMManagerDetailSection::clearContentsSetupGrid() +VMManagerDetailSection::setSections() { + int row = 0; + + for (const auto& section : sections) { + QStringList sectionsToAdd = section.value.split(sectionSeparator); + QLabel *labelKey = nullptr; + + for (const auto& line : sectionsToAdd) { + if (line.isEmpty()) { + // Don't bother adding entries if the values are blank + continue; + } + + const auto labelValue = new QLabel(); + labelValue->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred); + labelValue->setTextInteractionFlags(labelValue->textInteractionFlags() | Qt::TextSelectableByMouse); + labelValue->setText(line); + frameGridLayout->addWidget(labelValue, row, 1, Qt::AlignLeft); + + if (!labelKey) { + labelKey = new QLabel(); + labelKey->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); + labelKey->setTextInteractionFlags(labelValue->textInteractionFlags()); + labelKey->setText(QCoreApplication::translate("", QString(section.name + ":").toUtf8().data())); + frameGridLayout->addWidget(labelKey, row, 0, Qt::AlignLeft); + } + + const auto hSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); + frameGridLayout->addItem(hSpacer, row, 2); + row++; + } + } + + collapseButton->setContent(ui->detailFrame); + if (sections.size()) + setVisible(true); +} +void +VMManagerDetailSection::clear() +{ + sections.clear(); + setVisible(false); + // Clear everything out if(frameGridLayout) { while(frameGridLayout->count()) { @@ -168,76 +215,25 @@ VMManagerDetailSection::clearContentsSetupGrid() delete frameGridLayout; frameGridLayout = new QGridLayout(); - qint32 *left = nullptr, *top = nullptr, *right = nullptr, *bottom = nullptr; - frameGridLayout->getContentsMargins(left, top, right, bottom); frameGridLayout->setContentsMargins(getMargins(MarginSection::DisplayGrid)); ui->detailFrame->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); ui->detailFrame->setLayout(frameGridLayout); } + +#ifdef Q_OS_WINDOWS void -VMManagerDetailSection::setSections() +VMManagerDetailSection::updateStyle() { - clearContentsSetupGrid(); - int row = 0; - - - for ( const auto& section : sections) { - // if the string contains the separator (defined elsewhere) then split and - // add each entry on a new line. Otherwise, just add the one. - QStringList sectionsToAdd; - if(section.value.contains(sectionSeparator)) { - sectionsToAdd = section.value.split(sectionSeparator); - } else { - sectionsToAdd.push_back(section.value); - } - bool keyAdded = false; - for(const auto&line : sectionsToAdd) { - if(line.isEmpty()) { - // Don't bother adding entries if the values are blank - continue; - } - const auto labelKey = new QLabel(); - labelKey->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); - const auto labelValue = new QLabel(); - labelKey->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred); - labelValue->setTextInteractionFlags(labelValue->textInteractionFlags() | Qt::TextSelectableByMouse); - labelKey->setTextInteractionFlags(labelValue->textInteractionFlags() | Qt::TextSelectableByMouse); - - // Reduce the text size for the label - // First, get the existing font - auto smaller_font = labelValue->font(); - // Get a smaller size - // Not sure if I like the smaller size, back to regular for now - // auto smaller_size = 0.85 * smaller_font.pointSize(); - const auto smaller_size = 1 * smaller_font.pointSize(); - // Set the font to the smaller size - smaller_font.setPointSizeF(smaller_size); - // Assign that new, smaller font to the label - labelKey->setFont(smaller_font); - labelValue->setFont(smaller_font); - - labelKey->setText(section.name + ":"); - labelValue->setText(line); - if(!keyAdded) { - frameGridLayout->addWidget(labelKey, row, 0, Qt::AlignLeft); - keyAdded = true; - } - frameGridLayout->addWidget(labelValue, row, 1, Qt::AlignLeft); - const auto hSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); - frameGridLayout->addItem(hSpacer, row, 2); - row++; - } + const bool lightMode = util::isWindowsLightTheme(); + if (lightMode) { + ui->outerFrame->setStyleSheet(""); + ui->collapseButtonHolder->setStyleSheet(HEADER_STYLESHEET_LIGHT); + } else { + ui->outerFrame->setStyleSheet(BACKGROUND_STYLESHEET_DARK); + ui->collapseButtonHolder->setStyleSheet(HEADER_STYLESHEET_DARK); } - collapseButton->setContent(ui->detailFrame); - if (sections.size()) - setVisible(true); -} -void -VMManagerDetailSection::clear() -{ - sections.clear(); - setVisible(false); } +#endif // QT for Linux and Windows doesn't have the same default margins as QT on MacOS. // For consistency in appearance we'll have to return the margins on a per-OS basis diff --git a/src/qt/qt_vmmanager_detailsection.hpp b/src/qt/qt_vmmanager_detailsection.hpp index 7619a476c..3df7ce64c 100644 --- a/src/qt/qt_vmmanager_detailsection.hpp +++ b/src/qt/qt_vmmanager_detailsection.hpp @@ -61,8 +61,10 @@ public: ~VMManagerDetailSection() override; void addSection(const QString &name, const QString &value, VMManager::Display::Name displayField = VMManager::Display::Name::Unknown); + void setSections(); void clear(); + QLabel *tableLabel; CollapseButton *collapseButton; // QGridLayout *buttonGridLayout; QGridLayout *frameGridLayout; @@ -72,6 +74,10 @@ public: static const QString sectionSeparator; +#ifdef Q_OS_WINDOWS +public slots: + void updateStyle(); +#endif private: enum class MarginSection { @@ -82,7 +88,6 @@ private: void setSectionName(const QString &name); void setupMainLayout(); void clearContentsSetupGrid(); - void setSections(); static QMargins getMargins(MarginSection section); diff --git a/src/qt/qt_vmmanager_listviewdelegate.cpp b/src/qt/qt_vmmanager_listviewdelegate.cpp index 28820a044..c5d2e1dc9 100644 --- a/src/qt/qt_vmmanager_listviewdelegate.cpp +++ b/src/qt/qt_vmmanager_listviewdelegate.cpp @@ -18,13 +18,10 @@ #include +#include "qt_util.hpp" #include "qt_vmmanager_listviewdelegate.hpp" #include "qt_vmmanager_model.hpp" -#ifdef Q_OS_WINDOWS -extern bool windows_is_light_theme(); -#endif - // Thanks to scopchanov https://github.com/scopchanov/SO-MessageLog // from https://stackoverflow.com/questions/53105343/is-it-possible-to-add-a-custom-widget-into-a-qlistview @@ -34,6 +31,15 @@ VMManagerListViewDelegate::VMManagerListViewDelegate(QObject *parent) : QStyledItemDelegate(parent), m_ptr(new VMManagerListViewDelegateStyle) { + default_icon = QIcon(":/settings/qt/icons/86Box-gray.ico"); + stop_icon = QApplication::style()->standardIcon(QStyle::SP_MediaStop); + running_icon = QIcon(":/menuicons/qt/icons/run.ico"); + stopped_icon = QIcon(":/menuicons/qt/icons/acpi_shutdown.ico"); + paused_icon = QIcon(":/menuicons/qt/icons/pause.ico"); + unknown_icon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxQuestion); + + highlight_color = QColor("#616161"); + bg_color = QColor("#272727"); } VMManagerListViewDelegate::~VMManagerListViewDelegate() @@ -43,7 +49,7 @@ void VMManagerListViewDelegate::paint(QPainter *painter, const QStyleOptionViewI const QModelIndex &index) const { bool windows_light_mode = true; #ifdef Q_OS_WINDOWS - windows_light_mode = windows_is_light_theme(); + windows_light_mode = util::isWindowsLightTheme(); #endif QStyleOptionViewItem opt(option); initStyleOption(&opt, index); @@ -56,34 +62,33 @@ void VMManagerListViewDelegate::paint(QPainter *painter, const QStyleOptionViewI -m_ptr->margins.bottom())); // The status icon represents the current state of the vm. Initially set to a default state. - QIcon status_icon = QApplication::style()->standardIcon(QStyle::SP_MediaStop); auto process_variant = index.data(VMManagerModel::Roles::ProcessStatus); auto process_status = process_variant.value(); // The main icon, configurable. Falls back to default if it cannot be loaded. - auto customIcom = index.data(VMManagerModel::Roles::Icon).toString(); - opt.icon = QIcon(":/settings/qt/icons/86Box-gray.ico"); - if(!customIcom.isEmpty()) { - if (const auto customPixmap = QPixmap(customIcom); !customPixmap.isNull()) { + auto customIcon = index.data(VMManagerModel::Roles::Icon).toString(); + opt.icon = default_icon; + if (!customIcon.isEmpty()) { + const auto customPixmap = QPixmap(customIcon); + if (!customPixmap.isNull()) opt.icon = customPixmap; - } } - // opt.icon = QIcon(":/settings/qt/icons/86Box-gray.ico"); // Set the status icon based on the process status + QIcon status_icon; switch(process_status) { case VMManagerSystem::ProcessStatus::Running: - status_icon = QIcon(":/menuicons/qt/icons/run.ico"); + status_icon = running_icon; break; case VMManagerSystem::ProcessStatus::Stopped: - status_icon = QIcon(":/menuicons/qt/icons/acpi_shutdown.ico"); + status_icon = stopped_icon; break; case VMManagerSystem::ProcessStatus::PausedWaiting: case VMManagerSystem::ProcessStatus::RunningWaiting: case VMManagerSystem::ProcessStatus::Paused: - status_icon = QIcon(":/menuicons/qt/icons/pause.ico"); + status_icon = paused_icon; break; default: - status_icon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxQuestion); + status_icon = unknown_icon; } @@ -105,13 +110,13 @@ void VMManagerListViewDelegate::paint(QPainter *painter, const QStyleOptionViewI // When selected, only draw the highlighted part until the horizontal separator int offset = 2; auto highlightRect = rect.adjusted(0, 0, 0, -offset); - painter->fillRect(highlightRect, windows_light_mode ? palette.highlight().color() : QColor("#616161")); + painter->fillRect(highlightRect, windows_light_mode ? palette.highlight().color() : highlight_color); // Then fill the remainder with the normal color auto regularRect = rect.adjusted(0, rect.height()-offset, 0, 0); - painter->fillRect(regularRect, windows_light_mode ? palette.light().color() : QColor("#272727")); + painter->fillRect(regularRect, windows_light_mode ? palette.light().color() : bg_color); } else { // Otherwise just draw the background color as usual - painter->fillRect(rect, windows_light_mode ? palette.light().color() : QColor("#272727")); + painter->fillRect(rect, windows_light_mode ? palette.light().color() : bg_color); } // Draw bottom line. Last line gets a different color diff --git a/src/qt/qt_vmmanager_listviewdelegate.hpp b/src/qt/qt_vmmanager_listviewdelegate.hpp index 84325086d..9e320653b 100644 --- a/src/qt/qt_vmmanager_listviewdelegate.hpp +++ b/src/qt/qt_vmmanager_listviewdelegate.hpp @@ -63,5 +63,15 @@ public: const QModelIndex &index) const override; private: VMManagerListViewDelegateStyle *m_ptr; + + QIcon default_icon; + QIcon stop_icon; + QIcon running_icon; + QIcon stopped_icon; + QIcon paused_icon; + QIcon unknown_icon; + + QColor bg_color; + QColor highlight_color; }; #endif // QT_VMMANAGER_LISTVIEWDELEGATE_H \ No newline at end of file diff --git a/src/qt/qt_vmmanager_main.cpp b/src/qt/qt_vmmanager_main.cpp index 87649a6a1..cfded658e 100644 --- a/src/qt/qt_vmmanager_main.cpp +++ b/src/qt/qt_vmmanager_main.cpp @@ -15,6 +15,8 @@ * Copyright 2024 cold-brewed */ +#include +#include #include #include #include @@ -23,16 +25,67 @@ #include #include #include +#include + +#include +#include #include "qt_vmmanager_main.hpp" #include "ui_qt_vmmanager_main.h" #include "qt_vmmanager_model.hpp" #include "qt_vmmanager_addmachine.hpp" +// https://stackoverflow.com/a/36460740 +bool copyPath(QString sourceDir, QString destinationDir, bool overWriteDirectory) +{ + QDir originDirectory(sourceDir); + + if (! originDirectory.exists()) + { + return false; + } + + QDir destinationDirectory(destinationDir); + + if(destinationDirectory.exists() && !overWriteDirectory) + { + return false; + } + else if(destinationDirectory.exists() && overWriteDirectory) + { + destinationDirectory.removeRecursively(); + } + + originDirectory.mkpath(destinationDir); + + foreach (QString directoryName, originDirectory.entryList(QDir::Dirs | \ + QDir::NoDotAndDotDot)) + { + QString destinationPath = destinationDir + "/" + directoryName; + originDirectory.mkpath(destinationPath); + copyPath(sourceDir + "/" + directoryName, destinationPath, overWriteDirectory); + } + + foreach (QString fileName, originDirectory.entryList(QDir::Files)) + { + QFile::copy(sourceDir + "/" + fileName, destinationDir + "/" + fileName); + } + + /*! Possible race-condition mitigation? */ + QDir finalDestination(destinationDir); + finalDestination.refresh(); + + if(finalDestination.exists()) + { + return true; + } + + return false; +} + VMManagerMain::VMManagerMain(QWidget *parent) : QWidget(parent), ui(new Ui::VMManagerMain), selected_sysconfig(new VMManagerSystem) { ui->setupUi(this); - this->setWindowTitle("86Box VM Manager"); // Set up the main listView ui->listView->setItemDelegate(new VMManagerListViewDelegate); @@ -53,7 +106,7 @@ VMManagerMain::VMManagerMain(QWidget *parent) : if (indexAt.isValid()) { QMenu contextMenu(tr("Context Menu"), ui->listView); - QAction nameChangeAction(tr("Change display name")); + QAction nameChangeAction(tr("Change &display name...")); contextMenu.addAction(&nameChangeAction); // Use a lambda to call a function so indexAt can be passed connect(&nameChangeAction, &QAction::triggered, ui->listView, [this, indexAt] { @@ -61,19 +114,8 @@ VMManagerMain::VMManagerMain(QWidget *parent) : }); nameChangeAction.setEnabled(!selected_sysconfig->window_obscured); - QAction openSystemFolderAction(tr("Open folder")); - contextMenu.addAction(&openSystemFolderAction); - connect(&openSystemFolderAction, &QAction::triggered, [indexAt] { - if (const auto configDir = indexAt.data(VMManagerModel::Roles::ConfigDir).toString(); !configDir.isEmpty()) { - QDir dir(configDir); - if (!dir.exists()) - dir.mkpath("."); - - QDesktopServices::openUrl(QUrl(QString("file:///") + dir.canonicalPath())); - } - }); - QAction setSystemIcon(tr("Set icon")); + QAction setSystemIcon(tr("Set &icon...")); contextMenu.addAction(&setSystemIcon); connect(&setSystemIcon, &QAction::triggered, [this] { IconSelectionDialog dialog(":/systemicons/"); @@ -85,20 +127,208 @@ VMManagerMain::VMManagerMain(QWidget *parent) : }); setSystemIcon.setEnabled(!selected_sysconfig->window_obscured); + contextMenu.addSeparator(); + + QAction cloneMachine(tr("C&lone...")); + contextMenu.addAction(&cloneMachine); + connect(&cloneMachine, &QAction::triggered, [this] { + QDialog dialog = QDialog(this); + auto layout = new QVBoxLayout(&dialog); + layout->setSizeConstraint(QLayout::SetFixedSize); + layout->addWidget(new QLabel(tr("Virtual machine \"%1\" (%2) will be cloned into:").arg(selected_sysconfig->displayName, selected_sysconfig->config_dir))); + QLineEdit* edit = new QLineEdit(&dialog); + layout->addWidget(edit); + QLabel* errLabel = new QLabel(&dialog); + layout->addWidget(errLabel); + errLabel->setVisible(false); + QDialogButtonBox* buttonBox = new QDialogButtonBox(&dialog); + buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); + buttonBox->button(QDialogButtonBox::Ok)->setDisabled(true); + connect(buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept); + connect(buttonBox, &QDialogButtonBox::rejected, &dialog, &QDialog::reject); + layout->addWidget(buttonBox); + connect(edit, &QLineEdit::textChanged, this, [errLabel, buttonBox] (const QString& text) { + bool isSpaceOnly = true; +#ifdef Q_OS_WINDOWS + const char illegalChars[] = "<>:\"|?*\\/"; +#else + const char illegalChars[] = "\\/"; +#endif + for (const auto& curChar : text) { + for (size_t i = 0; i < sizeof(illegalChars) - 1; i++) { + if (illegalChars[i] == curChar) { + goto illegal_chars; + } + if (!curChar.isSpace()) { + isSpaceOnly = false; + } + } + } + errLabel->setVisible(false); + buttonBox->button(QDialogButtonBox::Ok)->setDisabled(isSpaceOnly || text.isEmpty()); + if (QDir((QString(vmm_path) + "/") + text).exists() && buttonBox->button(QDialogButtonBox::Ok)->isEnabled()) { + goto dir_already_exists; + } + return; +dir_already_exists: + errLabel->setText(tr("Directory %1 already exists").arg(QDir((QString(vmm_path) + "/") + text).canonicalPath())); + errLabel->setVisible(true); + buttonBox->button(QDialogButtonBox::Ok)->setDisabled(true); + return; +illegal_chars: + QString illegalCharsDisplay; + for (size_t i = 0; i < sizeof(illegalChars) - 1; i++) { + illegalCharsDisplay.push_back(illegalChars[i]); + illegalCharsDisplay.push_back(' '); + } + illegalCharsDisplay.chop(1); + errLabel->setText(tr("You cannot use the following characters in the name: %1").arg(illegalCharsDisplay)); + errLabel->setVisible(true); + buttonBox->button(QDialogButtonBox::Ok)->setDisabled(true); + return; + }); + + if (dialog.exec() > 0) { + std::atomic_bool finished{false}; + std::atomic_bool errCode; + auto vmDir = QDir(vmm_path).canonicalPath(); + vmDir.append("/"); + vmDir.append(edit->text()); + vmDir.append("/"); + + if (!QDir(vmDir).mkpath(".")) { + QMessageBox::critical(this, tr("Clone"), tr("Failed to create directory for cloned VM"), QMessageBox::Ok); + return; + } + + QProgressDialog* progDialog = new QProgressDialog(this); + progDialog->setMaximum(0); + progDialog->setMinimum(0); + progDialog->setWindowFlags(progDialog->windowFlags() & ~Qt::WindowCloseButtonHint); + progDialog->setMinimumSize(progDialog->sizeHint()); + progDialog->setMaximumSize(progDialog->sizeHint()); + progDialog->setMinimumDuration(0); + progDialog->setCancelButton(nullptr); + progDialog->setAutoClose(false); + progDialog->setAutoReset(false); + progDialog->setAttribute(Qt::WA_DeleteOnClose, true); + progDialog->setValue(0); + progDialog->setWindowTitle(tr("Clone")); + progDialog->show(); + QString srcPath = selected_sysconfig->config_dir; + QString dstPath = vmDir; + + std::thread copyThread([&finished, srcPath, dstPath, &errCode] { + errCode = copyPath(srcPath, dstPath, true); + finished = true; + }); + while (!finished) { + QApplication::processEvents(); + } + copyThread.join(); + progDialog->close(); + if (!errCode) { + QDir(dstPath).removeRecursively(); + QMessageBox::critical(this, tr("Clone"), tr("Failed to clone VM."), QMessageBox::Ok); + return; + } + + QFileInfo configFileInfo(vmDir + CONFIG_FILE); + if (configFileInfo.exists()) { + const auto current_index = ui->listView->currentIndex(); + vm_model->reload(this); + const auto created_object = vm_model->getIndexForConfigFile(configFileInfo); + if (created_object.row() < 0) { + // For some reason the index of the new object couldn't be determined. Fall back to the old index. + ui->listView->setCurrentIndex(current_index); + return; + } + auto added_system = vm_model->getConfigObjectForIndex(created_object); + added_system->setDisplayName(edit->text()); + // Get the index of the newly-created system and select it + const QModelIndex mapped_index = proxy_model->mapFromSource(created_object); + ui->listView->setCurrentIndex(mapped_index); + } else { + QDir(dstPath).removeRecursively(); + QMessageBox::critical(this, tr("Clone"), tr("Failed to clone VM."), QMessageBox::Ok); + return; + } + } + }); + QAction killIcon(tr("&Kill")); contextMenu.addAction(&killIcon); connect(&killIcon, &QAction::triggered, [this, parent] { - QMessageBox msgbox(QMessageBox::Warning, tr("Warning"), tr("Killing a virtual machine can cause data loss. Only do this if 86Box.exe process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?").arg(selected_sysconfig->displayName), QMessageBox::StandardButton::Yes | QMessageBox::StandardButton::No, parent); + QMessageBox msgbox(QMessageBox::Warning, tr("Warning"), tr("Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?").arg(selected_sysconfig->displayName), QMessageBox::StandardButton::Yes | QMessageBox::StandardButton::No, parent); msgbox.exec(); if (msgbox.result() == QMessageBox::Yes) { + disconnect(selected_sysconfig->process, QOverload::of(&QProcess::finished), nullptr, nullptr); selected_sysconfig->process->kill(); } }); killIcon.setEnabled(selected_sysconfig->process->state() == QProcess::Running); + QAction clrNvram(tr("&Wipe NVRAM")); + contextMenu.addAction(&clrNvram); + connect(&clrNvram, &QAction::triggered, [this, parent] { + QMessageBox msgbox(QMessageBox::Warning, tr("Warning"), tr("This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?").arg(selected_sysconfig->displayName), QMessageBox::StandardButton::Yes | QMessageBox::StandardButton::No, parent); + msgbox.exec(); + if (msgbox.result() == QMessageBox::Yes) { + if (QDir(selected_sysconfig->config_dir + "/nvr/").removeRecursively()) + QMessageBox::information(this, tr("Success"), tr("Successfully wiped the NVRAM contents of the virtual machine \"%1\"").arg(selected_sysconfig->displayName)); + else { + QMessageBox::critical(this, tr("Error"), tr("An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"").arg(selected_sysconfig->displayName)); + } + } + }); + clrNvram.setEnabled(selected_sysconfig->process->state() == QProcess::NotRunning); + + QAction deleteAction(tr("&Delete")); + contextMenu.addAction(&deleteAction); + connect(&deleteAction, &QAction::triggered, [this] { + deleteSystem(selected_sysconfig); + }); + deleteAction.setEnabled(selected_sysconfig->process->state() == QProcess::NotRunning); + contextMenu.addSeparator(); - QAction showRawConfigFile(tr("Show config file")); + QAction openSystemFolderAction(tr("&Open folder...")); + contextMenu.addAction(&openSystemFolderAction); + connect(&openSystemFolderAction, &QAction::triggered, [indexAt] { + if (const auto configDir = indexAt.data(VMManagerModel::Roles::ConfigDir).toString(); !configDir.isEmpty()) { + QDir dir(configDir); + if (!dir.exists()) + dir.mkpath("."); + + QDesktopServices::openUrl(QUrl(QString("file:///") + dir.canonicalPath())); + } + }); + + QAction openPrinterFolderAction(tr("Open p&rinter tray...")); + contextMenu.addAction(&openPrinterFolderAction); + connect(&openPrinterFolderAction, &QAction::triggered, [indexAt] { + if (const auto printerDir = indexAt.data(VMManagerModel::Roles::ConfigDir).toString() + QString("/printer/"); !printerDir.isEmpty()) { + QDir dir(printerDir); + if (!dir.exists()) + dir.mkpath("."); + + QDesktopServices::openUrl(QUrl(QString("file:///") + dir.canonicalPath())); + } + }); + + QAction openScreenshotsFolderAction(tr("Open screenshots &folder...")); + contextMenu.addAction(&openScreenshotsFolderAction); + connect(&openScreenshotsFolderAction, &QAction::triggered, [indexAt] { + if (const auto screenshotsDir = indexAt.data(VMManagerModel::Roles::ConfigDir).toString() + QString("/screenshots/"); !screenshotsDir.isEmpty()) { + QDir dir(screenshotsDir); + if (!dir.exists()) + dir.mkpath("."); + + QDesktopServices::openUrl(QUrl(QString("file:///") + dir.canonicalPath())); + } + }); + + QAction showRawConfigFile(tr("Show &config file")); contextMenu.addAction(&showRawConfigFile); connect(&showRawConfigFile, &QAction::triggered, [this, indexAt] { if (const auto configFile = indexAt.data(VMManagerModel::Roles::ConfigFile).toString(); !configFile.isEmpty()) { @@ -106,12 +336,20 @@ VMManagerMain::VMManagerMain(QWidget *parent) : } }); + contextMenu.exec(ui->listView->viewport()->mapToGlobal(pos)); + } else { + QMenu contextMenu(tr("Context Menu"), ui->listView); + + QAction newMachineAction(tr("New machine...")); + contextMenu.addAction(&newMachineAction); + connect(&newMachineAction, &QAction::triggered, this, &VMManagerMain::newMachineWizard); + contextMenu.exec(ui->listView->viewport()->mapToGlobal(pos)); } }); // Initial default details view - vm_details = new VMManagerDetails(); + vm_details = new VMManagerDetails(ui->detailsArea); ui->detailsArea->layout()->addWidget(vm_details); const QItemSelectionModel *selection_model = ui->listView->selectionModel(); @@ -123,8 +361,11 @@ VMManagerMain::VMManagerMain(QWidget *parent) : ui->listView->setCurrentIndex(first_index); } + connect(ui->listView, &QListView::doubleClicked, this, &VMManagerMain::startButtonPressed); + // Load and apply settings loadSettings(); + ui->splitter->setSizes({ui->detailsArea->width(), (ui->listView->minimumWidth() * 2)}); // Set up search bar connect(ui->searchBar, &QLineEdit::textChanged, this, &VMManagerMain::searchSystems); @@ -141,7 +382,7 @@ VMManagerMain::VMManagerMain(QWidget *parent) : // Set initial status bar after the event loop starts QTimer::singleShot(0, this, [this] { - emit updateStatusRight(totalCountString()); + emit updateStatusRight(machineCountString()); }); #if EMU_BUILD_NUM != 0 @@ -167,9 +408,19 @@ VMManagerMain::currentSelectionChanged(const QModelIndex ¤t, return; } + /* hack to prevent strange segfaults when adding a machine after + removing all machines previously */ + if (selected_sysconfig->config_signal_connected == true) { + disconnect(selected_sysconfig, &VMManagerSystem::configurationChanged, this, &VMManagerMain::onConfigUpdated); + selected_sysconfig->config_signal_connected = false; + } const auto mapped_index = proxy_model->mapToSource(current); selected_sysconfig = vm_model->getConfigObjectForIndex(mapped_index); vm_details->updateData(selected_sysconfig); + if (selected_sysconfig->config_signal_connected == false) { + connect(selected_sysconfig, &VMManagerSystem::configurationChanged, this, &VMManagerMain::onConfigUpdated); + selected_sysconfig->config_signal_connected = true; + } // Emit that the selection changed, include with the process state emit selectionChanged(current, selected_sysconfig->process->state()); @@ -182,19 +433,6 @@ VMManagerMain::settingsButtonPressed() { return; } selected_sysconfig->launchSettings(); - // If the process is already running, the system will be instructed to open its settings window. - // Otherwise the process will be launched and will need to be tracked here. - if (!selected_sysconfig->isProcessRunning()) { - connect(selected_sysconfig->process, QOverload::of(&QProcess::finished), - [=](const int exitCode, const QProcess::ExitStatus exitStatus){ - if (exitCode != 0 || exitStatus != QProcess::NormalExit) { - qInfo().nospace().noquote() << "Abnormal program termination while launching settings: exit code " << exitCode << ", exit status " << exitStatus; - return; - } - selected_sysconfig->reloadConfig(); - vm_details->updateData(selected_sysconfig); - }); - } } void @@ -308,6 +546,12 @@ VMManagerMain::currentSelectionIsValid() const return ui->listView->currentIndex().isValid() && selected_sysconfig->isValid(); } +void +VMManagerMain::onConfigUpdated(const QString &uuid) +{ + if (selected_sysconfig->uuid == uuid) + vm_details->updateData(selected_sysconfig); +} // Used from MainWindow during app exit to obtain and persist the current selection QString VMManagerMain::getCurrentSelection() const @@ -340,26 +584,31 @@ VMManagerMain::newMachineWizard() const auto wizard = new VMManagerAddMachine(this); if (wizard->exec() == QDialog::Accepted) { const auto newName = wizard->field("systemName").toString(); +#ifdef CUSTOM_SYSTEM_LOCATION const auto systemDir = wizard->field("systemLocation").toString(); +#else + const auto systemDir = QDir(vmm_path).path(); +#endif const auto existingConfiguration = wizard->field("existingConfiguration").toString(); - addNewSystem(newName, systemDir, existingConfiguration); + const auto displayName = wizard->field("displayName").toString(); + addNewSystem(newName, systemDir, displayName, existingConfiguration); } } void -VMManagerMain::addNewSystem(const QString &name, const QString &dir, const QString &configFile) +VMManagerMain::addNewSystem(const QString &name, const QString &dir, const QString &displayName, const QString &configFile) { - const auto newSytemDirectory = QDir(QDir::cleanPath(dir + "/" + name)); + const auto newSystemDirectory = QDir(QDir::cleanPath(dir + "/" + name)); // qt replaces `/` with native separators - const auto newSystemConfigFile = QFileInfo(newSytemDirectory.path() + "/" + "86box.cfg"); - if (newSystemConfigFile.exists() || newSytemDirectory.exists()) { + const auto newSystemConfigFile = QFileInfo(newSystemDirectory.path() + "/" + CONFIG_FILE); + if (newSystemConfigFile.exists() || newSystemDirectory.exists()) { QMessageBox::critical(this, tr("Directory in use"), tr("The selected directory is already in use. Please select a different directory.")); return; } // Create the directory const QDir qmkdir; - if (const bool mkdirResult = qmkdir.mkdir(newSytemDirectory.path()); !mkdirResult) { + if (const bool mkdirResult = qmkdir.mkdir(newSystemDirectory.path()); !mkdirResult) { QMessageBox::critical(this, tr("Create directory failed"), tr("Unable to create the directory for the new system")); return; } @@ -380,24 +629,30 @@ VMManagerMain::addNewSystem(const QString &name, const QString &dir, const QStri const auto new_system = new VMManagerSystem(newSystemConfigFile.absoluteFilePath()); new_system->launchSettings(); // Handle this in a closure so we can capture the temporary new_system object + disconnect(new_system->process, QOverload::of(&QProcess::finished), nullptr, nullptr); connect(new_system->process, QOverload::of(&QProcess::finished), [=](const int exitCode, const QProcess::ExitStatus exitStatus) { + bool fail = false; if (exitCode != 0 || exitStatus != QProcess::NormalExit) { qInfo().nospace().noquote() << "Abnormal program termination while creating new system: exit code " << exitCode << ", exit status " << exitStatus; qInfo() << "Not adding system due to errors"; + QString errMsg = tr("The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2.").arg( + (!displayName.isEmpty() ? displayName : name), QString::number(exitCode)); QMessageBox::critical(this, tr("Error adding system"), - tr("Abnormal program termination while creating new system: exit code %1, exit status %2.\n\nThe system will not be added.").arg(QString::number(exitCode), exitStatus)); - delete new_system; - return; + QString("%1\n\n%2").arg(errMsg, tr("The system will not be added."))); + fail = true; } // Create a new QFileInfo because the info from the old one may be cached if (const auto fi = QFileInfo(new_system->config_file.absoluteFilePath()); !fi.exists()) { // No config file which means the cancel button was pressed in the settings dialog // Attempt to clean up the directory that was created const QDir qrmdir; - if (const bool result = qrmdir.rmdir(newSytemDirectory.path()); !result) { + if (const bool result = qrmdir.rmdir(newSystemDirectory.path()); !result) { qWarning() << "Error cleaning up the old directory for canceled operation. Continuing anyway."; } + fail = true; + } + if (fail) { delete new_system; return; } @@ -410,6 +665,8 @@ VMManagerMain::addNewSystem(const QString &name, const QString &dir, const QStri delete new_system; return; } + auto added_system = vm_model->getConfigObjectForIndex(created_object); + added_system->setDisplayName(displayName); // Get the index of the newly-created system and select it const QModelIndex mapped_index = proxy_model->mapFromSource(created_object); ui->listView->setCurrentIndex(mapped_index); @@ -417,6 +674,33 @@ VMManagerMain::addNewSystem(const QString &name, const QString &dir, const QStri }); } + +void +VMManagerMain::deleteSystem(VMManagerSystem *sysconfig) +{ + QMessageBox msgbox(QMessageBox::Icon::Warning, tr("Warning"), tr("Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!").arg(sysconfig->displayName), QMessageBox::StandardButton::Yes | QMessageBox::StandardButton::No, qobject_cast(this->parent())); + msgbox.exec(); + if (msgbox.result() == QMessageBox::Yes) { + auto qrmdir = new QDir(sysconfig->config_dir); + if (const bool rmdirResult = qrmdir->removeRecursively(); !rmdirResult) { + QMessageBox::critical(this, tr("Remove directory failed"), tr("Some files in the machine's directory were unable to be deleted. Please delete them manually.")); + return; + } + auto config = new VMManagerConfig(VMManagerConfig::ConfigType::General); + config->remove(sysconfig->uuid); + vm_model->removeConfigFromModel(sysconfig); + delete sysconfig; + + if (vm_model->rowCount(QModelIndex()) <= 0) { + /* no machines left - get rid of the last machine's leftovers */ + ui->detailsArea->layout()->removeWidget(vm_details); + delete vm_details; + vm_details = new VMManagerDetails(); + ui->detailsArea->layout()->addWidget(vm_details); + } + } +} + QStringList VMManagerMain::getSearchCompletionList() const { @@ -433,10 +717,14 @@ VMManagerMain::getSearchCompletionList() const } QString -VMManagerMain::totalCountString() const +VMManagerMain::machineCountString(QString states) const { const auto count = vm_model->rowCount(QModelIndex()); - return QString("%1 %2").arg(QString::number(count), tr("total")); + if (!states.isEmpty()) + states.append(", "); + states.append(tr("%1 total").arg(count)); + + return tr("VMs: %1").arg(states); } void @@ -448,14 +736,26 @@ VMManagerMain::modelDataChange() QStringList stats; for (auto it = modelStats.constBegin(); it != modelStats.constEnd(); ++it) { const auto &key = it.key(); - stats.append(QString("%1 %2").arg(QString::number(modelStats[key]), key)); + QString text = ""; + switch (key) { + case VMManagerSystem::ProcessStatus::Running: + text = tr("%n running", "", modelStats[key]); + break; + case VMManagerSystem::ProcessStatus::Paused: + text = tr("%n paused", "", modelStats[key]); + break; + case VMManagerSystem::ProcessStatus::PausedWaiting: + case VMManagerSystem::ProcessStatus::RunningWaiting: + text = tr("%n waiting", "", modelStats[key]); + break; + default: + break; + } + if(!text.isEmpty()) + stats.append(text); } auto states = stats.join(", "); - if (!modelStats.isEmpty()) { - states.append(", "); - } - - emit updateStatusRight(states + totalCountString()); + emit updateStatusRight(machineCountString(states)); } void @@ -470,6 +770,35 @@ VMManagerMain::onPreferencesUpdated() } } +void +VMManagerMain::onLanguageUpdated() +{ + vm_model->refreshConfigs(); + modelDataChange(); + /* Hack to work around details widgets not being re-translatable + without going through layers of abstraction */ + ui->detailsArea->layout()->removeWidget(vm_details); + delete vm_details; + vm_details = new VMManagerDetails(); + ui->detailsArea->layout()->addWidget(vm_details); + if (vm_model->rowCount(QModelIndex()) > 0) + vm_details->updateData(selected_sysconfig); +} + +#ifdef Q_OS_WINDOWS +void +VMManagerMain::onDarkModeUpdated() +{ + vm_details->updateStyle(); +} +#endif + +int +VMManagerMain::getActiveMachineCount() +{ + return vm_model->getActiveMachineCount(); +} + #if EMU_BUILD_NUM != 0 void VMManagerMain::backgroundUpdateCheckStart() const @@ -488,16 +817,18 @@ void VMManagerMain::backgroundUpdateCheckComplete(const UpdateCheck::UpdateResult &result) { qDebug() << "Check complete: update available?" << result.updateAvailable; - auto type = result.channel == UpdateCheck::UpdateChannel::CI ? tr("Build") : tr("Version"); - const auto updateMessage = QString("%1: %2 %3").arg( tr("An update to 86Box is available"), type, result.latestVersion); - emit updateStatusLeft(updateMessage); + if (result.updateAvailable) { + auto type = result.channel == UpdateCheck::UpdateChannel::CI ? tr("build") : tr("version"); + const auto updateMessage = tr("An update to 86Box is available: %1 %2").arg(type, result.latestVersion); + emit updateStatusLeft(updateMessage); + } } void VMManagerMain::backgroundUpdateCheckError(const QString &errorMsg) { qDebug() << "Update check failed with the following error:" << errorMsg; - // TODO: Update the status bar + emit updateStatusLeft(tr("An error has occurred while checking for updates: %1").arg(errorMsg)); } #endif @@ -520,10 +851,21 @@ VMManagerMain::showTextFileContents(const QString &title, const QString &path) displayFile.close(); const auto textDisplayDialog = new QDialog(this); - textDisplayDialog->setFixedSize(QSize(540, 360)); + textDisplayDialog->setMinimumSize(QSize(540, 360)); textDisplayDialog->setWindowTitle(QString("%1 - %2").arg(title, fi.fileName())); const auto textEdit = new QPlainTextEdit(); + const auto monospaceFont = new QFont(); +#ifdef Q_OS_WINDOWS + monospaceFont->setFamily("Consolas"); +#elif defined(Q_OS_MACOS) + monospaceFont->setFamily("Menlo"); +#else + monospaceFont->setFamily("Monospace"); +#endif + monospaceFont->setStyleHint(QFont::Monospace); + monospaceFont->setFixedPitch(true); + textEdit->setFont(*monospaceFont); textEdit->setReadOnly(true); textEdit->setPlainText(configFileContents); const auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok); diff --git a/src/qt/qt_vmmanager_main.hpp b/src/qt/qt_vmmanager_main.hpp index fecee2009..be43da705 100644 --- a/src/qt/qt_vmmanager_main.hpp +++ b/src/qt/qt_vmmanager_main.hpp @@ -18,8 +18,6 @@ #ifndef QT_VMMANAGER_MAIN_H #define QT_VMMANAGER_MAIN_H -#include "qt_updatecheck.hpp" - #include #include "qt_vmmanager_model.hpp" #include "qt_vmmanager_details.hpp" @@ -29,8 +27,12 @@ extern "C" { #include <86box/86box.h> // for vmm_path +#include <86box/version.h> } +#if EMU_BUILD_NUM != 0 +# include "qt_updatecheck.hpp" +#endif QT_BEGIN_NAMESPACE namespace Ui { class VMManagerMain; } @@ -68,7 +70,8 @@ public slots: void shutdownForceButtonPressed() const; void searchSystems(const QString &text) const; void newMachineWizard(); - void addNewSystem(const QString &name, const QString &dir, const QString &configFile = {}); + void deleteSystem(VMManagerSystem *sysconfig); + void addNewSystem(const QString &name, const QString &dir, const QString &displayName = QString(), const QString &configFile = {}); #if __GNUC__ >= 11 [[nodiscard]] QStringList getSearchCompletionList() const; #else @@ -76,6 +79,12 @@ public slots: #endif void modelDataChange(); void onPreferencesUpdated(); + void onLanguageUpdated(); +#ifdef Q_OS_WINDOWS + void onDarkModeUpdated(); +#endif + void onConfigUpdated(const QString &uuid); + int getActiveMachineCount(); private: Ui::VMManagerMain *ui; @@ -98,7 +107,7 @@ private: void updateDisplayName(const QModelIndex &index); void loadSettings(); [[nodiscard]] bool currentSelectionIsValid() const; - [[nodiscard]] QString totalCountString() const; + [[nodiscard]] QString machineCountString(QString states = "") const; #if EMU_BUILD_NUM != 0 void backgroundUpdateCheckStart() const; #endif diff --git a/src/qt/qt_vmmanager_main.ui b/src/qt/qt_vmmanager_main.ui index c19094345..566cea862 100644 --- a/src/qt/qt_vmmanager_main.ui +++ b/src/qt/qt_vmmanager_main.ui @@ -6,7 +6,7 @@ 0 0 - 815 + 820 472 @@ -16,9 +16,6 @@ 0 - - VMManagerMain - 0 @@ -33,83 +30,83 @@ 0 - - - - 0 - 0 - + + + Qt::Horizontal - - - 0 + + false + + + + + 0 + 0 + - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 200 - 0 - - - - - 200 - 16777215 - - - - - - - - Qt::ClickFocus - - - Search - - - true - - - - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 125 + 0 + + + + + + + + Qt::ClickFocus + + + Search + + + true + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + diff --git a/src/qt/qt_vmmanager_mainwindow.cpp b/src/qt/qt_vmmanager_mainwindow.cpp index d3533482b..11eba670b 100644 --- a/src/qt/qt_vmmanager_mainwindow.cpp +++ b/src/qt/qt_vmmanager_mainwindow.cpp @@ -19,11 +19,18 @@ #include "qt_vmmanager_main.hpp" #include "qt_vmmanager_preferences.hpp" #include "ui_qt_vmmanager_mainwindow.h" -#include "qt_updatecheckdialog.hpp" +#if EMU_BUILD_NUM != 0 +# include "qt_updatecheckdialog.hpp" +#endif +#include "qt_about.hpp" +#include "qt_progsettings.hpp" +#include "qt_util.hpp" #include #include #include +#include +#include VMManagerMainWindow:: VMManagerMainWindow(QWidget *parent) @@ -37,15 +44,15 @@ VMManagerMainWindow(QWidget *parent) // Connect signals from the VMManagerMain widget connect(vmm, &VMManagerMain::selectionChanged, this, &VMManagerMainWindow::vmmSelectionChanged); - setWindowTitle(tr("86Box VM Manager")); + setWindowTitle(tr("%1 VM Manager").arg(EMU_NAME)); setCentralWidget(vmm); // Set up the buttons + connect(ui->actionNew_Machine, &QAction::triggered, vmm, &VMManagerMain::newMachineWizard); connect(ui->actionStartPause, &QAction::triggered, vmm, &VMManagerMain::startButtonPressed); connect(ui->actionSettings, &QAction::triggered, vmm, &VMManagerMain::settingsButtonPressed); connect(ui->actionHard_Reset, &QAction::triggered, vmm, &VMManagerMain::restartButtonPressed); connect(ui->actionForce_Shutdown, &QAction::triggered, vmm, &VMManagerMain::shutdownForceButtonPressed); - connect(ui->actionNew_Machine, &QAction::triggered, vmm, &VMManagerMain::newMachineWizard); // Set up menu actions // (Disable this if the EMU_BUILD_NUM == 0) @@ -69,7 +76,7 @@ VMManagerMainWindow(QWidget *parent) const auto searchBar = new QLineEdit(); searchBar->setMinimumWidth(150); - searchBar->setPlaceholderText(" " + tr("Search")); + searchBar->setPlaceholderText(tr("Search")); searchBar->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); searchBar->setClearButtonEnabled(true); // Spacer to make the search go all the way to the right @@ -92,6 +99,9 @@ VMManagerMainWindow(QWidget *parent) auto *completerModel = new QStringListModel(allStrings, completer); completer->setModel(completerModel); searchBar->setCompleter(completer); +#ifdef Q_OS_WINDOWS + ui->toolBar->setBackgroundRole(QPalette::Light); +#endif ui->toolBar->setVisible(false); // END REMOVE @@ -105,6 +115,10 @@ VMManagerMainWindow(QWidget *parent) // Inform the main view when preferences are updated connect(this, &VMManagerMainWindow::preferencesUpdated, vmm, &VMManagerMain::onPreferencesUpdated); + connect(this, &VMManagerMainWindow::languageUpdated, vmm, &VMManagerMain::onLanguageUpdated); +#ifdef Q_OS_WINDOWS + connect(this, &VMManagerMainWindow::darkModeUpdated, vmm, &VMManagerMain::onDarkModeUpdated); +#endif } @@ -120,6 +134,8 @@ VMManagerMainWindow::vmmSelectionChanged(const QModelIndex ¤tSelection, co ui->actionStartPause->setIcon(QIcon(":/menuicons/qt/icons/pause.ico")); ui->actionStartPause->setText(tr("Pause")); ui->actionStartPause->setToolTip(tr("Pause")); + disconnect(ui->actionStartPause, &QAction::triggered, vmm, &VMManagerMain::startButtonPressed); + connect(ui->actionStartPause, &QAction::triggered, vmm, &VMManagerMain::pauseButtonPressed); ui->actionHard_Reset->setEnabled(true); ui->actionForce_Shutdown->setEnabled(true); ui->actionCtrl_Alt_Del->setEnabled(true); @@ -128,6 +144,8 @@ VMManagerMainWindow::vmmSelectionChanged(const QModelIndex ¤tSelection, co ui->actionStartPause->setIcon(QIcon(":/menuicons/qt/icons/run.ico")); ui->actionStartPause->setText(tr("Start")); ui->actionStartPause->setToolTip(tr("Start")); + disconnect(ui->actionStartPause, &QAction::triggered, vmm, &VMManagerMain::pauseButtonPressed); + connect(ui->actionStartPause, &QAction::triggered, vmm, &VMManagerMain::startButtonPressed); ui->actionHard_Reset->setEnabled(false); ui->actionForce_Shutdown->setEnabled(false); ui->actionCtrl_Alt_Del->setEnabled(false); @@ -139,6 +157,7 @@ VMManagerMainWindow::preferencesTriggered() const auto prefs = new VMManagerPreferences(); if (prefs->exec() == QDialog::Accepted) { emit preferencesUpdated(); + updateLanguage(); } } @@ -152,9 +171,48 @@ VMManagerMainWindow::saveSettings() const config->sync(); } +void +VMManagerMainWindow::updateLanguage() +{ + ProgSettings::loadTranslators(QCoreApplication::instance()); + ProgSettings::reloadStrings(); + ui->retranslateUi(this); + setWindowTitle(tr("%1 VM Manager").arg(EMU_NAME)); + emit languageUpdated(); +} + + +#ifdef Q_OS_WINDOWS +void +VMManagerMainWindow::updateDarkMode() +{ + emit darkModeUpdated(); +} +#endif + +void +VMManagerMainWindow::changeEvent(QEvent *event) +{ +#ifdef Q_OS_WINDOWS + if (event->type() == QEvent::LanguageChange) { + QApplication::setFont(QFont(ProgSettings::getFontName(lang_id), 9)); + } +#endif + QWidget::changeEvent(event); +} + void VMManagerMainWindow::closeEvent(QCloseEvent *event) { + int running = vmm->getActiveMachineCount(); + if (running > 0) { + QMessageBox warningbox(QMessageBox::Icon::Warning, tr("%1 VM Manager").arg(EMU_NAME), tr("%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?").arg(running), QMessageBox::Yes | QMessageBox::No, this); + warningbox.exec(); + if (warningbox.result() == QMessageBox::No) { + event->ignore(); + return; + } + } saveSettings(); QMainWindow::closeEvent(event); } @@ -171,19 +229,40 @@ VMManagerMainWindow::setStatusRight(const QString &text) const statusRight->setText(text); } +#if EMU_BUILD_NUM != 0 void VMManagerMainWindow::checkForUpdatesTriggered() { auto updateChannel = UpdateCheck::UpdateChannel::CI; -#ifdef RELEASE_BUILD +# ifdef RELEASE_BUILD updateChannel = UpdateCheck::UpdateChannel::Stable; -#endif - const auto updateCheck = new UpdateCheckDialog(updateChannel); +# endif + const auto updateCheck = new UpdateCheckDialog(updateChannel, this); updateCheck->exec(); } +#endif -void VMManagerMainWindow::on_actionExit_triggered() +void +VMManagerMainWindow::on_actionExit_triggered() { this->close(); } +void +VMManagerMainWindow::on_actionAbout_Qt_triggered() +{ + QApplication::aboutQt(); +} + +void +VMManagerMainWindow::on_actionAbout_86Box_triggered() +{ + const auto msgBox = new About(this); + msgBox->exec(); +} + +void +VMManagerMainWindow::on_actionDocumentation_triggered() +{ + QDesktopServices::openUrl(QUrl(EMU_DOCS_URL)); +} diff --git a/src/qt/qt_vmmanager_mainwindow.hpp b/src/qt/qt_vmmanager_mainwindow.hpp index 12ac5afb1..bde74765c 100644 --- a/src/qt/qt_vmmanager_mainwindow.hpp +++ b/src/qt/qt_vmmanager_mainwindow.hpp @@ -36,6 +36,10 @@ public: ~VMManagerMainWindow() override; signals: void preferencesUpdated(); + void languageUpdated(); +#ifdef Q_OS_WINDOWS + void darkModeUpdated(); +#endif private: Ui::VMManagerMainWindow *ui; @@ -46,15 +50,25 @@ private: public slots: void setStatusLeft(const QString &text) const; void setStatusRight(const QString &text) const; + void updateLanguage(); +#ifdef Q_OS_WINDOWS + void updateDarkMode(); +#endif private slots: void vmmSelectionChanged(const QModelIndex ¤tSelection, QProcess::ProcessState processState) const; void preferencesTriggered(); - static void checkForUpdatesTriggered(); +#if EMU_BUILD_NUM != 0 + void checkForUpdatesTriggered(); +#endif void on_actionExit_triggered(); + void on_actionDocumentation_triggered(); + void on_actionAbout_86Box_triggered(); + void on_actionAbout_Qt_triggered(); protected: + void changeEvent(QEvent *event) override; void closeEvent(QCloseEvent *event) override; }; diff --git a/src/qt/qt_vmmanager_mainwindow.ui b/src/qt/qt_vmmanager_mainwindow.ui index 0c8dac8bc..7cd817a0b 100644 --- a/src/qt/qt_vmmanager_mainwindow.ui +++ b/src/qt/qt_vmmanager_mainwindow.ui @@ -11,7 +11,7 @@ - MainWindow + 86Box VM Manager @@ -25,30 +25,45 @@ - Tools + &Tools - File + &File + + + &Help + + + + + + + + true + toolBar false + + Qt::TopToolBarArea + 16 @@ -56,7 +71,7 @@ - Qt::ToolButtonStyle::ToolButtonIconOnly + Qt::ToolButtonIconOnly TopToolBarArea @@ -64,18 +79,14 @@ false + + - - - - Do something - - true @@ -85,7 +96,7 @@ :/menuicons/qt/icons/run.ico:/menuicons/qt/icons/run.ico - Start + &Start false @@ -112,7 +123,7 @@ :/menuicons/qt/icons/acpi_shutdown.ico:/menuicons/qt/icons/acpi_shutdown.ico - Force shutdown + &Force shutdown Force shutdown @@ -157,7 +168,7 @@ &Settings... - QAction::MenuRole::NoRole + QAction::NoRole false @@ -169,21 +180,21 @@ :/settings/qt/icons/86Box-yellow.ico:/settings/qt/icons/86Box-yellow.ico - New Machine + &New machine... - New Machine + New machine... - Preferences + &Preferences... - Preferences + Preferences... - QAction::MenuRole::PreferencesRole + QAction::PreferencesRole @@ -195,7 +206,7 @@ :/menuicons/qt/icons/run.ico:/menuicons/qt/icons/run.ico - Start + &Start false @@ -203,18 +214,39 @@ - Check for updates + &Check for updates... - - - - &Exit + E&xit - QAction::MenuRole::QuitRole + QAction::QuitRole + + + + + &Documentation... + + + + + &About 86Box... + + + QAction::AboutRole + + + + + About &Qt + + + false + + + QAction::AboutQtRole diff --git a/src/qt/qt_vmmanager_model.cpp b/src/qt/qt_vmmanager_model.cpp index 848970f80..40baac90a 100644 --- a/src/qt/qt_vmmanager_model.cpp +++ b/src/qt/qt_vmmanager_model.cpp @@ -113,6 +113,12 @@ VMManagerModel::reload(QWidget* parent) // TODO: Remove missing configs } +void +VMManagerModel::refreshConfigs() { + for ( const auto& each_config : machines) + each_config->reloadConfig(); +} + QModelIndex VMManagerModel::getIndexForConfigFile(const QFileInfo& config_file) { @@ -134,6 +140,18 @@ VMManagerModel::addConfigToModel(VMManagerSystem *system_config) connect(system_config, &VMManagerSystem::itemDataChanged, this, &VMManagerModel::modelDataChanged); endInsertRows(); } + +void +VMManagerModel::removeConfigFromModel(VMManagerSystem *system_config) +{ + const QModelIndex index = getIndexForConfigFile(system_config->config_file); + disconnect(system_config, &VMManagerSystem::itemDataChanged, this, &VMManagerModel::modelDataChanged); + beginRemoveRows(QModelIndex(), index.row(), index.row()); + machines.remove(index.row()); + endRemoveRows(); + emit systemDataChanged(); +} + void VMManagerModel::modelDataChanged() { @@ -149,15 +167,23 @@ VMManagerModel::updateDisplayName(const QModelIndex &index, const QString &newDi machines.at(index.row())->setDisplayName(newDisplayName); modelDataChanged(); } -QHash +QMap VMManagerModel::getProcessStats() { - QHash stats; + QMap stats; for (const auto& system: machines) { - if (system->getProcessStatus() != VMManagerSystem::ProcessStatus::Stopped) { - auto statusString = system->getProcessStatusString(); - stats[statusString] += 1; - } + stats[system->getProcessStatus()] += 1; } return stats; -} \ No newline at end of file +} + +int +VMManagerModel::getActiveMachineCount() +{ + int running = 0; + for (const auto& system: machines) { + if (system->getProcessStatus() != VMManagerSystem::ProcessStatus::Stopped) + running++; + } + return running; +} diff --git a/src/qt/qt_vmmanager_model.hpp b/src/qt/qt_vmmanager_model.hpp index bc13cc16f..159dad9f2 100644 --- a/src/qt/qt_vmmanager_model.hpp +++ b/src/qt/qt_vmmanager_model.hpp @@ -51,12 +51,15 @@ public: [[nodiscard]] QVariant headerData(int section, Qt::Orientation orientation, int role) const override; void addConfigToModel(VMManagerSystem *system_config); + void removeConfigFromModel(VMManagerSystem *system_config); [[nodiscard]] VMManagerSystem * getConfigObjectForIndex(const QModelIndex &index) const; QModelIndex getIndexForConfigFile(const QFileInfo& config_file); void reload(QWidget* parent = nullptr); void updateDisplayName(const QModelIndex &index, const QString &newDisplayName); - QHash getProcessStats(); + QMap getProcessStats(); + int getActiveMachineCount(); + void refreshConfigs(); signals: void systemDataChanged(); diff --git a/src/qt/qt_vmmanager_preferences.cpp b/src/qt/qt_vmmanager_preferences.cpp index 57f67c9b8..49b7b4a1f 100644 --- a/src/qt/qt_vmmanager_preferences.cpp +++ b/src/qt/qt_vmmanager_preferences.cpp @@ -17,13 +17,17 @@ #include #include +#include +#include "qt_progsettings.hpp" #include "qt_vmmanager_preferences.hpp" #include "qt_vmmanager_config.hpp" #include "ui_qt_vmmanager_preferences.h" extern "C" { #include <86box/86box.h> +#include <86box/config.h> +#include <86box/version.h> } VMManagerPreferences:: @@ -34,15 +38,24 @@ VMManagerPreferences(QWidget *parent) : ui(new Ui::VMManagerPreferences) connect(ui->dirSelectButton, &QPushButton::clicked, this, &VMManagerPreferences::chooseDirectoryLocation); const auto config = new VMManagerConfig(VMManagerConfig::ConfigType::General); - const auto configSystemDir = config->getStringValue("system_directory"); + const auto configSystemDir = QString(vmm_path_cfg); if(!configSystemDir.isEmpty()) { // Prefer this one - ui->systemDirectory->setText(configSystemDir); + ui->systemDirectory->setText(QDir::toNativeSeparators(configSystemDir)); } else if(!QString(vmm_path).isEmpty()) { // If specified on command line - ui->systemDirectory->setText(QDir(vmm_path).path()); + ui->systemDirectory->setText(QDir::toNativeSeparators(QDir(vmm_path).path())); } + ui->comboBoxLanguage->setItemData(0, 0); + for (int i = 1; i < ProgSettings::languages.length(); i++) { + ui->comboBoxLanguage->addItem(ProgSettings::languages[i].second, i); + if (i == lang_id) { + ui->comboBoxLanguage->setCurrentIndex(ui->comboBoxLanguage->findData(i)); + } + } + ui->comboBoxLanguage->model()->sort(Qt::AscendingOrder); + // TODO: Defaults #if EMU_BUILD_NUM != 0 const auto configUpdateCheck = config->getStringValue("update_check").toInt(); @@ -64,16 +77,26 @@ VMManagerPreferences() void VMManagerPreferences::chooseDirectoryLocation() { - // TODO: FIXME: This is pulling in the CLI directory! Needs to be set properly elsewhere - const auto directory = QFileDialog::getExistingDirectory(this, "Choose directory", QDir(vmm_path).path()); - ui->systemDirectory->setText(QDir::toNativeSeparators(directory)); + const auto directory = QFileDialog::getExistingDirectory(this, tr("Choose directory"), ui->systemDirectory->text()); + if (!directory.isEmpty()) + ui->systemDirectory->setText(QDir::toNativeSeparators(directory)); +} + +void +VMManagerPreferences::on_pushButtonLanguage_released() +{ + ui->comboBoxLanguage->setCurrentIndex(0); } void VMManagerPreferences::accept() { const auto config = new VMManagerConfig(VMManagerConfig::ConfigType::General); - config->setStringValue("system_directory", ui->systemDirectory->text()); + + strncpy(vmm_path_cfg, QDir::cleanPath(ui->systemDirectory->text()).toUtf8().constData(), sizeof(vmm_path_cfg) - 1); + lang_id = ui->comboBoxLanguage->currentData().toInt(); + config_save_global(); + #if EMU_BUILD_NUM != 0 config->setStringValue("update_check", ui->updateCheckBox->isChecked() ? "1" : "0"); #endif diff --git a/src/qt/qt_vmmanager_preferences.hpp b/src/qt/qt_vmmanager_preferences.hpp index aedba862a..d28ff79ac 100644 --- a/src/qt/qt_vmmanager_preferences.hpp +++ b/src/qt/qt_vmmanager_preferences.hpp @@ -37,6 +37,7 @@ private: QString settingsFile; private slots: void chooseDirectoryLocation(); + void on_pushButtonLanguage_released(); protected: void accept() override; void reject() override; diff --git a/src/qt/qt_vmmanager_preferences.ui b/src/qt/qt_vmmanager_preferences.ui index 1743a0bfb..37caaae56 100644 --- a/src/qt/qt_vmmanager_preferences.ui +++ b/src/qt/qt_vmmanager_preferences.ui @@ -53,6 +53,42 @@ + + + + Language: + + + + + + + + + + 0 + 0 + + + + 30 + + + + (System Default) + + + + + + + + Default + + + + + @@ -92,6 +128,13 @@ + + dirSelectButton + comboBoxLanguage + pushButtonLanguage + updateCheckBox + regexSearchCheckBox + diff --git a/src/qt/qt_vmmanager_protocol.cpp b/src/qt/qt_vmmanager_protocol.cpp index ca862a55a..bc1805411 100644 --- a/src/qt/qt_vmmanager_protocol.cpp +++ b/src/qt/qt_vmmanager_protocol.cpp @@ -91,6 +91,8 @@ VMManagerProtocol::getClientMessageType(const QJsonObject &json_document) return VMManagerProtocol::ClientMessage::WindowUnblocked; } else if (message_type == "RunningStateChanged") { return VMManagerProtocol::ClientMessage::RunningStateChanged; + } else if (message_type == "ConfigurationChanged") { + return VMManagerProtocol::ClientMessage::ConfigurationChanged; } else if (message_type == "WinIdMessage") { return VMManagerProtocol::ClientMessage::WinIdMessage; } diff --git a/src/qt/qt_vmmanager_protocol.hpp b/src/qt/qt_vmmanager_protocol.hpp index f50c37ae3..90f7e4eeb 100644 --- a/src/qt/qt_vmmanager_protocol.hpp +++ b/src/qt/qt_vmmanager_protocol.hpp @@ -54,6 +54,7 @@ public: WindowBlocked, WindowUnblocked, RunningStateChanged, + ConfigurationChanged, WinIdMessage, UnknownMessage, }; diff --git a/src/qt/qt_vmmanager_serversocket.cpp b/src/qt/qt_vmmanager_serversocket.cpp index 3630df430..1364ff794 100644 --- a/src/qt/qt_vmmanager_serversocket.cpp +++ b/src/qt/qt_vmmanager_serversocket.cpp @@ -185,6 +185,10 @@ VMManagerServerSocket::jsonReceived(const QJsonObject &json) } } break; + case VMManagerProtocol::ClientMessage::ConfigurationChanged: + qDebug("Configuration change received from client"); + emit configurationChanged(); + break; default: qDebug("Unknown client message type received:"); qDebug() << json; diff --git a/src/qt/qt_vmmanager_serversocket.hpp b/src/qt/qt_vmmanager_serversocket.hpp index 01c719813..30ad02b2c 100644 --- a/src/qt/qt_vmmanager_serversocket.hpp +++ b/src/qt/qt_vmmanager_serversocket.hpp @@ -75,6 +75,7 @@ signals: void dataReceived(); void windowStatusChanged(int status); void runningStatusChanged(VMManagerProtocol::RunningState state); + void configurationChanged(); void winIdReceived(WId id); diff --git a/src/qt/qt_vmmanager_system.cpp b/src/qt/qt_vmmanager_system.cpp index 225b302df..61c52b1b0 100644 --- a/src/qt/qt_vmmanager_system.cpp +++ b/src/qt/qt_vmmanager_system.cpp @@ -26,8 +26,10 @@ #include #include #include +#include #include #include +#include "qt_util.hpp" #include "qt_vmmanager_system.hpp" // #include "qt_vmmanager_details_section.hpp" #include "qt_vmmanager_detailsection.hpp" @@ -49,11 +51,22 @@ extern "C" { #include <86box/thread.h> // required for network.h #include <86box/timer.h> // required for network.h and fdd.h #include <86box/cdrom.h> +#include <86box/cdrom_interface.h> #include <86box/scsi.h> +#include <86box/scsi_device.h> // required for rdisk.h and mo.h +#include <86box/rdisk.h> +#include <86box/mo.h> #include <86box/fdd.h> +#include <86box/fdc_ext.h> +#include <86box/hdc.h> #include <86box/gameport.h> +#include <86box/isartc.h> +#include <86box/isamem.h> +#include <86box/isarom.h> +#include <86box/lpt.h> #include <86box/midi.h> #include <86box/network.h> +#include <86box/keyboard.h> #include <86box/mouse.h> } @@ -67,16 +80,10 @@ VMManagerSystem::VMManagerSystem(const QString &sysconfig_file) { // that contains the 86box configuration file config_name = config_file.dir().dirName(); // The full path of the directory that contains the 86box configuration file - config_dir = shortened_dir = config_file.dir().path(); + config_dir = shortened_dir = config_file.dir().absolutePath(); process_status = ProcessStatus::Stopped; - // Main 86Box uses usr_path for UUID which includes the trailing slash. - // Make sure to append the slash here so the UUIDs will match - auto uuid_path = config_dir; - if (!uuid_path.endsWith("/")) { - uuid_path.append("/"); - } // In the configuration file the UUID is used as a unique value - uuid = QUuid::createUuidV5(QUuid{}, uuid_path).toString(QUuid::WithoutBraces); + uuid = util::generateUuid(sysconfig_file); // That unique value is used to map the information to each individual system. config_settings = new VMManagerConfig(VMManagerConfig::ConfigType::System, uuid); @@ -126,26 +133,16 @@ VMManagerSystem::scanForConfigs(QWidget* parent, const QString &searchPath) progDialog.setMinimum(0); progDialog.setMaximum(0); progDialog.setWindowFlags(progDialog.windowFlags() & ~Qt::WindowCloseButtonHint); + progDialog.setMinimumSize(progDialog.sizeHint()); + progDialog.setMaximumSize(progDialog.sizeHint()); QElapsedTimer scanTimer; scanTimer.start(); QVector system_configs; - const auto config = new VMManagerConfig(VMManagerConfig::ConfigType::General); - auto systemDirConfig = config->getStringValue("system_directory"); - - const auto config_file_name = QString("86box.cfg"); + const auto config_file_name = QString(CONFIG_FILE); const QStringList filters = {config_file_name}; QStringList matches; - // TODO: Preferences. Once I get the CLI args worked out. - // For now it just takes vmm_path from the CLI QString search_directory; - // if(searchPath.isEmpty()) { - // // If the location isn't specified in function call, use the one loaded - // // from the config file - // search_directory = systemDirConfig; - // } else { - // search_directory = searchPath; - // } search_directory = searchPath.isEmpty()? vmm_path : searchPath; @@ -227,6 +224,9 @@ VMManagerSystem::loadSettings() } // qInfo() << "Loaded "<< config_file.filePath() << "status:" << settings.status(); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + settings.setIniCodec("UTF-8"); +#endif // Clear out the config hash in case the config is reloaded for (const auto &outer_key : config_hash.keys()) { config_hash[outer_key].clear(); @@ -243,7 +243,11 @@ VMManagerSystem::loadSettings() QString setting_value; // QSettings will interpret lines with commas as QStringList. // Check for it and join them back to a string. +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + if (settings.value(key_name).typeId() == QMetaType::QStringList) { +#else if (settings.value(key_name).type() == QVariant::StringList) { +#endif setting_value = settings.value(key_name).toStringList().join(", "); } else { setting_value = settings.value(key_name).toString(); @@ -407,16 +411,35 @@ VMManagerSystem::launchMainProcess() { return; } } + // If the system is already running, bring it to front + if (process->processId() != 0) { +#ifdef Q_OS_WINDOWS + if (this->id) { + SetForegroundWindow((HWND)this->id); + } +#endif + return; + } setProcessEnvVars(); QString program = main_binary.filePath(); QStringList args; - args << "-P" << config_dir; + args << "--vmpath" << config_dir; args << "--vmname" << displayName; process->setProgram(program); process->setArguments(args); qDebug() << Q_FUNC_INFO << " Full Command:" << process->program() << " " << process->arguments(); process->start(); updateTimestamp(); + + connect(process, QOverload::of(&QProcess::finished), + [=](const int exitCode, const QProcess::ExitStatus exitStatus){ + if (exitCode != 0 || exitStatus != QProcess::NormalExit) { + qInfo().nospace().noquote() << "Abnormal program termination while launching main process: exit code " << exitCode << ", exit status " << exitStatus; + QMessageBox::critical(this, tr("Virtual machine crash"), + tr("The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2.").arg(displayName, QString::number(exitCode))); + return; + } + }); } void @@ -431,6 +454,15 @@ VMManagerSystem::launchSettings() { return; } + // start the server first to get the socket name + if (!serverIsRunning) { + if(!startServer()) { + // FIXME: Better error handling + qInfo("Failed to start VM Manager server"); + return; + } + } + // If the system is already running, instruct it to show settings if (process->processId() != 0) { #ifdef Q_OS_WINDOWS @@ -448,11 +480,23 @@ VMManagerSystem::launchSettings() { QString program = main_binary.filePath(); QStringList open_command_args; QStringList args; - args << "-P" << config_dir << "-S"; + args << "--vmpath" << config_dir << "--settings"; process->setProgram(program); process->setArguments(args); qDebug() << Q_FUNC_INFO << " Full Command:" << process->program() << " " << process->arguments(); process->start(); + + connect(process, QOverload::of(&QProcess::finished), + [=](const int exitCode, const QProcess::ExitStatus exitStatus){ + if (exitCode != 0 || exitStatus != QProcess::NormalExit) { + qInfo().nospace().noquote() << "Abnormal program termination while launching settings: exit code " << exitCode << ", exit status " << exitStatus; + QMessageBox::critical(this, tr("Virtual machine crash"), + tr("The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2.").arg(displayName, QString::number(exitCode))); + return; + } + + configurationChangeReceived(); + }); } void @@ -489,8 +533,10 @@ VMManagerSystem::setupVars() { auto network_config = getCategory("Network"); auto input_config = getCategory("Input devices"); auto floppy_cdrom_config = getCategory("Floppy and CD-ROM drives"); - auto scsi_config = getCategory("Storage controllers"); + auto rdisk_mo_config = getCategory("Other removable devices"); + auto storage_config = getCategory("Storage controllers"); auto ports_config = getCategory("Ports (COM & LPT)"); + auto other_config = getCategory("Other peripherals"); // auto general_config = getCategory("General"); // auto config_uuid = QString("Not set"); // if(!general_config["uuid"].isEmpty()) { @@ -513,17 +559,39 @@ VMManagerSystem::setupVars() { } display_table[Display::Name::Machine] = machine_name; - // CPU: Combine name with speed - auto cpu_name = QString(); + // CPU: Combine name with speed and FPU + QString cpu_name = "Unknown"; while (cpu_families[i].package != 0) { if (cpu_families[i].internal_name == machine_config["cpu_family"]) { + int j = 0; cpu_name = QString("%1 %2").arg(cpu_families[i].manufacturer, cpu_families[i].name); + while (cpu_families[i].cpus[j].cpu_type != 0) { + if (cpu_families[i].cpus[j].rspeed == machine_config["cpu_speed"].toUInt()) { + auto cpu_speed = QString(cpu_families[i].cpus[j].name).split("/").at(0).split(" (").at(0); + cpu_name.append(cpu_speed.prepend(" / ")); + cpu_name.append(QCoreApplication::translate("", "MHz").prepend(' ')); + if (machine_config.contains("fpu_type") && (machine_config["fpu_type"] != QString("none")) && (machine_config["fpu_type"] != QString("internal"))) { + int k = 0; + while (cpu_families[i].cpus[j].fpus[k].internal_name != nullptr) { + if (QString(cpu_families[i].cpus[j].fpus[k].internal_name) == machine_config["fpu_type"]) { + cpu_name.append(QString(cpu_families[i].cpus[j].fpus[k].name).prepend(", ")); + cpu_name.append(QCoreApplication::translate("", "FPU").prepend(' ')); + break; + } + k++; + } + } + break; + } + j++; + } + break; } i++; } - int speed_display = machine_config["cpu_speed"].toInt() / 1000000; - cpu_name.append(QString::number(speed_display).prepend(" / ")); - cpu_name.append(QCoreApplication::translate("", "MHz").prepend(' ')); +// int speed_display = machine_config["cpu_speed"].toInt() / 1000000; +// cpu_name.append(QString::number(speed_display).prepend(" / ")); +// cpu_name.append(QCoreApplication::translate("", "MHz").prepend(' ')); display_table[Display::Name::CPU] = cpu_name; // Memory @@ -537,12 +605,44 @@ VMManagerSystem::setupVars() { int video_int = video_get_video_from_internal_name(video_config["gfxcard"].toUtf8().data()); const device_t* video_dev = video_card_getdevice(video_int); display_table[Display::Name::Video] = DeviceConfig::DeviceName(video_dev, video_get_internal_name(video_int), 1); - if (!video_config["voodoo"].isEmpty()) { - // FIXME: Come back to this later to add more for secondary video -// display_table[Display::Name::Video].append(" (with voodoo)"); - display_table[Display::Name::Voodoo] = "Voodoo enabled"; + + // Secondary video + if (video_config.contains("gfxcard_2")) { + int video2_int = video_get_video_from_internal_name(video_config["gfxcard_2"].toUtf8().data()); + const device_t* video2_dev = video_card_getdevice(video2_int); + display_table[Display::Name::Video].append(DeviceConfig::DeviceName(video2_dev, video_get_internal_name(video2_int), 1).prepend(VMManagerDetailSection::sectionSeparator)); } + // Add-on video that's not Voodoo + if (video_config.contains("8514a") && (video_config["8514a"].toInt() != 0)) + display_table[Display::Name::Video].append(tr("IBM 8514/A Graphics").prepend(VMManagerDetailSection::sectionSeparator)); + if (video_config.contains("xga") && (video_config["xga"].toInt() != 0)) + display_table[Display::Name::Video].append(tr("XGA Graphics").prepend(VMManagerDetailSection::sectionSeparator)); + if (video_config.contains("da2") && (video_config["da2"].toInt() != 0)) + display_table[Display::Name::Video].append(tr("IBM PS/55 Display Adapter Graphics").prepend(VMManagerDetailSection::sectionSeparator)); + + // Voodoo + QString voodoo_name = ""; + if (video_config.contains("voodoo") && (video_config["voodoo"].toInt() != 0)) { + char temp[512]; + device_get_name(&voodoo_device, 0, temp); + auto voodoo_config = getCategory(QString(temp)); + int voodoo_type = voodoo_config["type"].toInt(); + switch (voodoo_type) { + case 0: + default: + voodoo_name = tr("3Dfx Voodoo Graphics"); + break; + case 1: + voodoo_name = tr("Obsidian SB50 + Amethyst (2 TMUs)"); + break; + case 2: + voodoo_name = tr("3Dfx Voodoo 2"); + break; + } + } + display_table[Display::Name::Voodoo] = voodoo_name; + // Drives // First the number of disks QMap disks; @@ -585,25 +685,31 @@ VMManagerSystem::setupVars() { } int diskSizeRaw = (cylinders.toInt() * heads.toInt() * sectors.toInt()) >> 11; QString diskSizeFinal; - QString unit = "MiB"; + QString unit = tr("MiB"); if(diskSizeRaw > 1000) { - unit = "GiB"; + unit = tr("GiB"); diskSizeFinal = QString::number(diskSizeRaw * 1.0 / 1000, 'f', 1); } else { diskSizeFinal = QString::number(diskSizeRaw); } // Only prefix each disk when there are multiple disks - QString diskNumberDisplay = disks.count() > 1 ? QString("Disk %1: ").arg(disk_number) : ""; + QString diskNumberDisplay = disks.count() > 1 ? tr("Disk %1: ").arg(disk_number) : ""; new_disk_display.append(QString("%1%2 %3 (%4)").arg(diskNumberDisplay, diskSizeFinal, unit, bus_type.toUpper())); } if(new_disk_display.isEmpty()) { - new_disk_display = "No disks"; + new_disk_display = tr("No disks"); } display_table[Display::Name::Disks] = new_disk_display; // Floppy & CD-ROM QStringList floppyDevices; QStringList cdromDevices; + // Special case: first two 5.25" 360k FDDs which don't get saved to the .cfg + for (int i = 0; i < 2; i++) { + if (!floppy_cdrom_config.contains(QString("fdd_0%1_type").arg(i + 1))) + floppyDevices.append(QString(fdd_getname(fdd_get_from_internal_name((char *) "525_2dd")))); + } + static auto floppy_match = QRegularExpression("fdd_\\d\\d_type", QRegularExpression::CaseInsensitiveOption); static auto cdrom_match = QRegularExpression("cdrom_\\d\\d_type", QRegularExpression::CaseInsensitiveOption); for(const auto& key: floppy_cdrom_config.keys()) { @@ -645,16 +751,55 @@ VMManagerSystem::setupVars() { display_table[Display::Name::Floppy] = floppyDevices.join(VMManagerDetailSection::sectionSeparator); display_table[Display::Name::CD] = cdromDevices.join(VMManagerDetailSection::sectionSeparator); + // Removable disks & MO + QStringList rdiskDevices; + QStringList moDevices; + static auto rdisk_match = QRegularExpression("rdisk_\\d\\d_parameters", QRegularExpression::CaseInsensitiveOption); + static auto zip_match = QRegularExpression("zip_\\d\\d_parameters", QRegularExpression::CaseInsensitiveOption); // Legacy ZIP drive entries + static auto mo_match = QRegularExpression("mo_\\d\\d_parameters", QRegularExpression::CaseInsensitiveOption); + for(const auto& key: rdisk_mo_config.keys()) { + if(key.contains(rdisk_match) || key.contains(zip_match)) { + auto device_number = key.split("_").at(1); + auto rdisk_parameters = QString(rdisk_mo_config[key]); + auto rdisk_type = rdisk_parameters.split(",").at(0).toInt(); + if (key.contains(zip_match)) + rdisk_type++; + auto rdisk_bus = rdisk_parameters.split(",").at(1).trimmed().toUpper(); + + if((rdisk_type >= 0) && (rdisk_type < KNOWN_RDISK_DRIVE_TYPES)) { + if(!rdisk_bus.isEmpty()) + rdisk_bus = QString(" (%1)").arg(rdisk_bus); + rdiskDevices.append(QString("%1 %2%3").arg(rdisk_drive_types[rdisk_type].vendor, rdisk_drive_types[rdisk_type].model, rdisk_bus)); + } + } + if(key.contains(mo_match)) { + auto device_number = key.split("_").at(1); + auto mo_parameters = QString(rdisk_mo_config[key]); + auto mo_type = mo_parameters.split(",").at(0).toInt(); + auto mo_bus = mo_parameters.split(",").at(1).trimmed().toUpper(); + + if((mo_type >= 0) && (mo_type < KNOWN_MO_DRIVE_TYPES)) { + if(!mo_bus.isEmpty()) + mo_bus = QString(" (%1)").arg(mo_bus); + moDevices.append(QString("%1 %2%3").arg(mo_drive_types[mo_type].vendor, mo_drive_types[mo_type].model, mo_bus)); + } + } + } + + display_table[Display::Name::RDisk] = rdiskDevices.join(VMManagerDetailSection::sectionSeparator); + display_table[Display::Name::MO] = moDevices.join(VMManagerDetailSection::sectionSeparator); + + // SCSI controllers QStringList scsiControllers; static auto scsi_match = QRegularExpression("scsicard_\\d", QRegularExpression::CaseInsensitiveOption); - for(const auto& key: scsi_config.keys()) { + for(const auto& key: storage_config.keys()) { if(key.contains(scsi_match)) { auto device_number = key.split("_").at(1); - auto scsi_internal_name = QString(scsi_config[key]); + auto scsi_internal_name = QString(storage_config[key]); auto scsi_id = scsi_card_get_from_internal_name(scsi_internal_name.toUtf8().data()); auto scsi_device = scsi_card_getdevice(scsi_id); - auto scsi_name = QString(scsi_device->name); + auto scsi_name = DeviceConfig::DeviceName(scsi_device, scsi_card_get_internal_name(scsi_id), 1); if(!scsi_name.isEmpty()) { scsiControllers.append(scsi_name); } @@ -662,14 +807,94 @@ VMManagerSystem::setupVars() { } display_table[Display::Name::SCSIController] = scsiControllers.join(VMManagerDetailSection::sectionSeparator); + // Hard and floppy disk controllers + QStringList storageControllers; + static auto fdc_match = QRegularExpression("fdc(_\\d)?", QRegularExpression::CaseInsensitiveOption); // futureproofing + static auto hdc_match = QRegularExpression("hdc(_\\d)?", QRegularExpression::CaseInsensitiveOption); + for(const auto& key: storage_config.keys()) { + if(key.contains(fdc_match)) { + QString device_number; + if (!key.contains('_')) + device_number = "1"; + else // futureproofing + device_number = key.split("_").at(1); + auto fdc_internal_name = QString(storage_config[key]); + if (!fdc_internal_name.isEmpty() && (fdc_internal_name != "none") && (fdc_internal_name != "internal")) { + auto fdc_id = fdc_card_get_from_internal_name(fdc_internal_name.toUtf8().data()); + auto fdc_device = fdc_card_getdevice(fdc_id); + auto fdc_name = DeviceConfig::DeviceName(fdc_device, fdc_card_get_internal_name(fdc_id), 1); + if(!fdc_name.isEmpty()) { + storageControllers.append(fdc_name); + } + } + } + if(key.contains(hdc_match)) { + QString device_number; + if (!key.contains('_')) // legacy hdc entry + device_number = "1"; + else + device_number = key.split("_").at(1); + auto hdc_internal_name = QString(storage_config[key]); + if (!hdc_internal_name.isEmpty() && (hdc_internal_name != "none") && (hdc_internal_name != "internal")) { + auto hdc_id = hdc_get_from_internal_name(hdc_internal_name.toUtf8().data()); + auto hdc_device = hdc_get_device(hdc_id); + auto hdc_name = DeviceConfig::DeviceName(hdc_device, hdc_get_internal_name(hdc_id), 1); + if(!hdc_name.isEmpty()) { + storageControllers.append(hdc_name); + } + } + } + } + + // CD-ROM controller + if (storage_config.contains("cdrom_interface")) { + auto cdrom_intf_internal_name = storage_config["cdrom_interface"]; + if (!cdrom_intf_internal_name.isEmpty() && (cdrom_intf_internal_name != "none") && (cdrom_intf_internal_name != "internal")) { + auto cdrom_intf_dev = cdrom_interface_get_from_internal_name(cdrom_intf_internal_name.toUtf8().data()); + auto cdrom_intf_dev_name = DeviceConfig::DeviceName(cdrom_interface_get_device(cdrom_intf_dev), cdrom_interface_get_internal_name(cdrom_intf_dev), 1); + storageControllers.append(cdrom_intf_dev_name); + } + } + + // Legacy tertiary/quaternary IDE + QString ide_ter_internal_name = "ide_ter"; + QString ide_qua_internal_name = "ide_qua"; + if (storage_config.contains(ide_ter_internal_name) && (storage_config[ide_ter_internal_name].toInt() != 0)) + storageControllers.append(DeviceConfig::DeviceName(hdc_get_device(hdc_get_from_internal_name(ide_ter_internal_name.toUtf8().data())), ide_ter_internal_name.toUtf8().constData(), 1)); + if (storage_config.contains(ide_qua_internal_name) && (storage_config[ide_qua_internal_name].toInt() != 0)) + storageControllers.append(DeviceConfig::DeviceName(hdc_get_device(hdc_get_from_internal_name(ide_qua_internal_name.toUtf8().data())), ide_qua_internal_name.toUtf8().constData(), 1)); + + display_table[Display::Name::StorageController] = storageControllers.join(VMManagerDetailSection::sectionSeparator); + // Audio - int sound_int = sound_card_get_from_internal_name(audio_config["sndcard"].toUtf8().data()); - const device_t* audio_dev = sound_card_getdevice(sound_int); - display_table[Display::Name::Audio] = DeviceConfig::DeviceName(audio_dev, sound_card_get_internal_name(sound_int), 1); + QStringList sndCards; + static auto sndcard_match = QRegularExpression("sndcard\\d?", QRegularExpression::CaseInsensitiveOption); + for(const auto& key: audio_config.keys()) { + if(key.contains(sndcard_match)) { + auto device_number = key.right(1); + if(device_number == "d") // card #1 has no number + device_number = "1"; + auto audio_internal_name = QString(audio_config[key]); + auto audio_id = sound_card_get_from_internal_name(audio_internal_name.toUtf8().data()); + auto audio_device = sound_card_getdevice(audio_id); + auto audio_name = DeviceConfig::DeviceName(audio_device, sound_card_get_internal_name(audio_id), 1); + if(!audio_name.isEmpty()) { + sndCards.append(audio_name); + } + } + } + if(audio_config.contains("mpu401_standalone")) { + sndCards.append(tr("Standalone MPU-401")); + } + if(sndCards.isEmpty()) { + sndCards.append(tr("None")); + } + display_table[Display::Name::Audio] = sndCards.join(VMManagerDetailSection::sectionSeparator); // MIDI QString midiOutDev; - if(auto midi_out_device = QString(audio_config["midi_device"]); !midi_out_device.isEmpty()) { + if (audio_config.contains("midi_device")) { + auto midi_out_device = QString(audio_config["midi_device"]); auto midi_device_int = midi_out_device_get_from_internal_name(midi_out_device.toUtf8().data()); auto midi_out = midi_out_device_getdevice(midi_device_int); if(auto midiDevName = QString(midi_out->name); !midiDevName.isEmpty()) { @@ -683,7 +908,7 @@ VMManagerSystem::setupVars() { // midi_in_device (input) // Network - QString nicList; + QStringList nicList; static auto nic_match = QRegularExpression("net_\\d\\d_card", QRegularExpression::CaseInsensitiveOption); for(const auto& key: network_config.keys()) { if(key.contains(nic_match)) { @@ -691,14 +916,20 @@ VMManagerSystem::setupVars() { auto nic_internal_name = QString(network_config[key]); auto nic_id = network_card_get_from_internal_name(nic_internal_name.toUtf8().data()); auto nic = network_card_getdevice(nic_id); - auto nic_name = QString(nic->name); - // Add separator for each subsequent value, skipping the first - if(!nicList.isEmpty()) { - nicList.append(QString("%1").arg(VMManagerDetailSection::sectionSeparator)); - } + auto nic_name = DeviceConfig::DeviceName(nic, network_card_get_internal_name(nic_id), 1); auto net_type_key = QString("net_%1_net_type").arg(device_number); auto net_type = network_config[net_type_key]; if (!net_type.isEmpty()) { + if (net_type == "slirp") + net_type = "SLiRP"; + else if (net_type == "pcap") + net_type = "PCap"; + else if (net_type == "nmswitch") + net_type = tr("Local Switch"); + else if (net_type == "nrswitch") + net_type = tr("Remote Switch"); + else + net_type = net_type.toUpper(); nicList.append(nic_name + " (" + net_type + ")"); } else { nicList.append(nic_name); @@ -707,21 +938,30 @@ VMManagerSystem::setupVars() { } } if(nicList.isEmpty()) { - nicList = "None"; + nicList.append(tr("None")); + } + display_table[Display::Name::NIC] = nicList.join(VMManagerDetailSection::sectionSeparator); + + // Input (Keyboard) + if (input_config.contains("keyboard_type")) { + auto keyboard_internal_name = input_config["keyboard_type"]; + auto keyboard_dev = keyboard_get_from_internal_name(keyboard_internal_name.toUtf8().data()); + auto keyboard_dev_name = DeviceConfig::DeviceName(keyboard_get_device(keyboard_dev), keyboard_get_internal_name(keyboard_dev), 0); + display_table[Display::Name::Keyboard] = keyboard_dev_name; } - display_table[Display::Name::NIC] = nicList; // Input (Mouse) auto mouse_internal_name = input_config["mouse_type"]; auto mouse_dev = mouse_get_from_internal_name(mouse_internal_name.toUtf8().data()); - auto mouse_dev_name = mouse_get_name(mouse_dev); + auto mouse_dev_name = DeviceConfig::DeviceName(mouse_get_device(mouse_dev), mouse_get_internal_name(mouse_dev), 0); display_table[Display::Name::Mouse] = mouse_dev_name; // Input (joystick) QString joystickDevice; - if(auto joystick_internal = QString(input_config["joystick_type"]); !joystick_internal.isEmpty()) { + if(input_config.contains("joystick_type")) { + auto joystick_internal = QString(input_config["joystick_type"]); auto joystick_dev = joystick_get_from_internal_name(joystick_internal.toUtf8().data()); - if (auto joystickName = QString(joystick_get_name(joystick_dev)); !joystickName.isEmpty()) { + if (auto joystickName = tr(joystick_get_name(joystick_dev)); !joystickName.isEmpty()) { joystickDevice = joystickName; } } @@ -769,16 +1009,68 @@ VMManagerSystem::setupVars() { break; } portIndex = 0; + bool hasLptDevices = false; while (true) { - if (lpt_enabled[portIndex]) - lptFinal.append(QString("LPT%1").arg(portIndex + 1)); + if (lpt_enabled[portIndex]) { + auto lpt_device_key = QString("lpt%1_device").arg(portIndex + 1); + QString lpt_device_name = ""; + if (ports_config.contains(lpt_device_key)) { + auto lpt_internal_name = QString(ports_config[lpt_device_key]); + auto lpt_id = lpt_device_get_from_internal_name(lpt_internal_name.toUtf8().data()); + lpt_device_name = " (" + tr(lpt_device_get_name(lpt_id)) + ")"; + hasLptDevices = true; + } + lptFinal.append(QString("LPT%1%2").arg(portIndex + 1).arg(lpt_device_name)); + } ++portIndex; if (portIndex == PARALLEL_MAX) break; } - display_table[Display::Name::Serial] = serialFinal.empty() ? tr("None") : serialFinal.join(", "); - display_table[Display::Name::Parallel] = lptFinal.empty() ? tr("None") : lptFinal.join(", "); + display_table[Display::Name::Serial] = (serialFinal.empty() ? tr("None") : serialFinal.join(", ")); + display_table[Display::Name::Parallel] = (lptFinal.empty() ? tr("None") : lptFinal.join((hasLptDevices ? VMManagerDetailSection::sectionSeparator : ", "))); + // ISA RTC + QString isartc_dev_name = ""; + if (other_config.contains("isartc_type")) { + auto isartc_internal_name = other_config["isartc_type"]; + auto isartc_dev = isartc_get_from_internal_name(isartc_internal_name.toUtf8().data()); + isartc_dev_name = DeviceConfig::DeviceName(isartc_get_device(isartc_dev), isartc_get_internal_name(isartc_dev), 0); + } + display_table[Display::Name::IsaRtc] = isartc_dev_name; + + // ISA RAM + QStringList IsaMemCards; + static auto isamem_match = QRegularExpression("isamem\\d_type", QRegularExpression::CaseInsensitiveOption); + for(const auto& key: other_config.keys()) { + if(key.contains(isamem_match)) { + auto device_number = QString("%1").arg(key.split("_").at(0).right(1).toInt() + 1); + auto isamem_internal_name = QString(other_config[key]); + auto isamem_id = isamem_get_from_internal_name(isamem_internal_name.toUtf8().data()); + auto isamem_device = isamem_get_device(isamem_id); + auto isamem_name = DeviceConfig::DeviceName(isamem_device, isamem_get_internal_name(isamem_id), 0); + if(!isamem_name.isEmpty()) { + IsaMemCards.append(isamem_name); + } + } + } + display_table[Display::Name::IsaMem] = IsaMemCards.join(VMManagerDetailSection::sectionSeparator); + + // ISA ROM + QStringList IsaRomCards; + static auto isarom_match = QRegularExpression("isarom\\d_type", QRegularExpression::CaseInsensitiveOption); + for(const auto& key: other_config.keys()) { + if(key.contains(isarom_match)) { + auto device_number = QString("%1").arg(key.split("_").at(0).right(1).toInt() + 1); + auto isarom_internal_name = QString(other_config[key]); + auto isarom_id = isarom_get_from_internal_name(isarom_internal_name.toUtf8().data()); + auto isarom_device = isarom_get_device(isarom_id); + auto isarom_name = DeviceConfig::DeviceName(isarom_device, isarom_get_internal_name(isarom_id), 0); + if(!isarom_name.isEmpty()) { + IsaRomCards.append(isarom_name); + } + } + } + display_table[Display::Name::IsaRom] = IsaRomCards.join(VMManagerDetailSection::sectionSeparator); } bool @@ -788,6 +1080,7 @@ VMManagerSystem::startServer() { connect(socket_server, &VMManagerServerSocket::dataReceived, this, &VMManagerSystem::dataReceived); connect(socket_server, &VMManagerServerSocket::windowStatusChanged, this, &VMManagerSystem::windowStatusChangeReceived); connect(socket_server, &VMManagerServerSocket::runningStatusChanged, this, &VMManagerSystem::runningStatusChangeReceived); + connect(socket_server, &VMManagerServerSocket::configurationChanged, this, &VMManagerSystem::configurationChangeReceived); connect(socket_server, &VMManagerServerSocket::winIdReceived, this, [this] (WId id) { this->id = id; }); return true; } else { @@ -883,7 +1176,7 @@ VMManagerSystem::processStatusToString(VMManagerSystem::ProcessStatus status) return tr("Paused"); case VMManagerSystem::ProcessStatus::PausedWaiting: case VMManagerSystem::ProcessStatus::RunningWaiting: - return tr("Paused (Waiting)"); + return QString("%1 (%2)").arg(tr("Paused"), tr("Waiting")); default: return tr("Unknown Status"); } @@ -926,6 +1219,12 @@ VMManagerSystem::runningStatusChangeReceived(VMManagerProtocol::RunningState sta processStatusChanged(); } void +VMManagerSystem::configurationChangeReceived() +{ + reloadConfig(); + emit configurationChanged(this->uuid); +} +void VMManagerSystem::reloadConfig() { loadSettings(); diff --git a/src/qt/qt_vmmanager_system.hpp b/src/qt/qt_vmmanager_system.hpp index a73b31886..5914e46cb 100644 --- a/src/qt/qt_vmmanager_system.hpp +++ b/src/qt/qt_vmmanager_system.hpp @@ -46,7 +46,10 @@ enum class Name { Disks, Floppy, CD, + RDisk, + MO, SCSIController, + StorageController, MidiOut, Joystick, Serial, @@ -54,7 +57,11 @@ enum class Name { Audio, Voodoo, NIC, + Keyboard, Mouse, + IsaRtc, + IsaMem, + IsaRom, Unknown }; Q_ENUM_NS(Name) @@ -129,6 +136,7 @@ public: QProcess *process = new QProcess(); bool window_obscured; + bool config_signal_connected = false; QString getDisplayValue(VMManager::Display::Name key); QFileInfoList getScreenshots(); @@ -148,6 +156,7 @@ signals: void windowStatusChanged(); void itemDataChanged(); void clientProcessStatusChanged(); + void configurationChanged(const QString &uuid); private: void loadSettings(); @@ -188,6 +197,7 @@ private: void dataReceived(); void windowStatusChangeReceived(int status); void runningStatusChangeReceived(VMManagerProtocol::RunningState state); + void configurationChangeReceived(); void processStatusChanged(); void statusRefresh(); }; diff --git a/src/qt/qt_vmmanager_windarkmodefilter.cpp b/src/qt/qt_vmmanager_windarkmodefilter.cpp new file mode 100644 index 000000000..195419ad9 --- /dev/null +++ b/src/qt/qt_vmmanager_windarkmodefilter.cpp @@ -0,0 +1,99 @@ +/* + * 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. + * + * Generic Windows native event filter for dark mode handling + * + * + * + * Authors: Teemu Korhonen + * Cacodemon345 + * + * Copyright 2021 Teemu Korhonen + * Copyright 2024-2025 Cacodemon345. + */ + +#include "qt_vmmanager_windarkmodefilter.hpp" + +#include +#include +#include +#include +#include + +#include +#include +#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE +#define DWMWA_USE_IMMERSIVE_DARK_MODE 20 +#endif + +#include <86box/86box.h> +#include <86box/plat.h> + +#include "qt_util.hpp" + +static bool NewDarkMode = FALSE; + +void +WindowsDarkModeFilter::setWindow(VMManagerMainWindow *window) +{ + this->window = window; +} + +bool +WindowsDarkModeFilter::nativeEventFilter(const QByteArray &eventType, void *message, result_t *result) +{ + if ((window != nullptr) && (eventType == "windows_generic_MSG")) { + MSG *msg = static_cast(message); + + if ((msg != nullptr) && (msg->message == WM_SETTINGCHANGE)) { + if ((((void *) msg->lParam) != nullptr) && + (wcscmp(L"ImmersiveColorSet", (wchar_t*)msg->lParam) == 0)) { + + bool OldDarkMode = NewDarkMode; + + if (!util::isWindowsLightTheme()) { + QFile f(":qdarkstyle/dark/darkstyle.qss"); + + if (!f.exists()) + printf("Unable to set stylesheet, file not found\n"); + else { + f.open(QFile::ReadOnly | QFile::Text); + QTextStream ts(&f); + qApp->setStyleSheet(ts.readAll()); + } + QPalette palette(qApp->palette()); + palette.setColor(QPalette::Link, Qt::white); + palette.setColor(QPalette::LinkVisited, Qt::lightGray); + qApp->setPalette(palette); + window->resize(window->size()); + + NewDarkMode = TRUE; + } else { + qApp->setStyleSheet(""); + QPalette palette(qApp->palette()); + palette.setColor(QPalette::Link, Qt::blue); + palette.setColor(QPalette::LinkVisited, Qt::magenta); + qApp->setPalette(palette); + window->resize(window->size()); + NewDarkMode = FALSE; + } + window->updateDarkMode(); + + if (NewDarkMode != OldDarkMode) QTimer::singleShot(1000, [this] () { + BOOL DarkMode = NewDarkMode; + DwmSetWindowAttribute((HWND) window->winId(), + DWMWA_USE_IMMERSIVE_DARK_MODE, + (LPCVOID) &DarkMode, + sizeof(DarkMode)); + }); + } + } + } + + return false; +} diff --git a/src/qt/qt_vmmanager_windarkmodefilter.hpp b/src/qt/qt_vmmanager_windarkmodefilter.hpp new file mode 100644 index 000000000..4f6b28a6e --- /dev/null +++ b/src/qt/qt_vmmanager_windarkmodefilter.hpp @@ -0,0 +1,47 @@ +/* + * 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. + * + * Header file for Windows dark mode native messages filter + * + * + * + * Authors: Teemu Korhonen + * + * Copyright 2022 Teemu Korhonen + */ + +#ifndef QT_WINDOWSDARKMODEEVENTFILTER_HPP +#define QT_WINDOWSDARKMODEEVENTFILTER_HPP + +#include +#include +#include +#include +#include + +#include "qt_vmmanager_mainwindow.hpp" + +#if QT_VERSION_MAJOR >= 6 +# define result_t qintptr +#else +# define result_t long +#endif + +class WindowsDarkModeFilter : public QObject, public QAbstractNativeEventFilter { + Q_OBJECT + +public: + WindowsDarkModeFilter() = default; + void setWindow(VMManagerMainWindow *window); + bool nativeEventFilter(const QByteArray &eventType, void *message, result_t *result) override; + +private: + VMManagerMainWindow *window; +}; + +#endif // QT_WINDOWSDARKMODEEVENTFILTER_HPP diff --git a/src/qt/qt_winrawinputfilter.cpp b/src/qt/qt_winrawinputfilter.cpp index eca77d15d..9b7adce1d 100644 --- a/src/qt/qt_winrawinputfilter.cpp +++ b/src/qt/qt_winrawinputfilter.cpp @@ -71,38 +71,11 @@ extern void win_keyboard_handle(uint32_t scancode, int up, int e0, int e1); #include #include "qt_rendererstack.hpp" +#include "qt_util.hpp" #include "ui_qt_mainwindow.h" static bool NewDarkMode = FALSE; -bool windows_is_light_theme() { - // based on https://stackoverflow.com/questions/51334674/how-to-detect-windows-10-light-dark-mode-in-win32-application - - // The value is expected to be a REG_DWORD, which is a signed 32-bit little-endian - auto buffer = std::vector(4); - auto cbData = static_cast(buffer.size() * sizeof(char)); - auto res = RegGetValueW( - HKEY_CURRENT_USER, - L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", - L"AppsUseLightTheme", - RRF_RT_REG_DWORD, // expected value type - nullptr, - buffer.data(), - &cbData); - - if (res != ERROR_SUCCESS) { - return 1; - } - - // convert bytes written to our buffer to an int, assuming little-endian - auto i = int(buffer[3] << 24 | - buffer[2] << 16 | - buffer[1] << 8 | - buffer[0]); - - return i == 1; -} - struct { HANDLE done_event = 0, ready_event = 0; @@ -365,7 +338,7 @@ WindowsRawInputFilter::nativeEventFilter(const QByteArray &eventType, void *mess } #endif - if (!windows_is_light_theme()) { + if (!util::isWindowsLightTheme()) { QFile f(":qdarkstyle/dark/darkstyle.qss"); if (!f.exists()) @@ -375,9 +348,17 @@ WindowsRawInputFilter::nativeEventFilter(const QByteArray &eventType, void *mess QTextStream ts(&f); qApp->setStyleSheet(ts.readAll()); } + QPalette palette(qApp->palette()); + palette.setColor(QPalette::Link, Qt::white); + palette.setColor(QPalette::LinkVisited, Qt::lightGray); + qApp->setPalette(palette); NewDarkMode = TRUE; } else { qApp->setStyleSheet(""); + QPalette palette(qApp->palette()); + palette.setColor(QPalette::Link, Qt::blue); + palette.setColor(QPalette::LinkVisited, Qt::magenta); + qApp->setPalette(palette); NewDarkMode = FALSE; } diff --git a/src/qt/sdl_joystick.c b/src/qt/sdl_joystick.c index ea3720eea..f1ba0380f 100644 --- a/src/qt/sdl_joystick.c +++ b/src/qt/sdl_joystick.c @@ -33,10 +33,10 @@ #include <86box/gameport.h> #include <86box/plat_unused.h> -int joysticks_present = 0; -joystick_t joystick_state[GAMEPORT_MAX][MAX_JOYSTICKS]; -plat_joystick_t plat_joystick_state[MAX_PLAT_JOYSTICKS]; -static SDL_Joystick *sdl_joy[MAX_PLAT_JOYSTICKS]; +int joysticks_present = 0; +joystick_state_t joystick_state[GAMEPORT_MAX][MAX_JOYSTICKS]; +plat_joystick_state_t plat_joystick_state[MAX_PLAT_JOYSTICKS]; +static SDL_Joystick *sdl_joy[MAX_PLAT_JOYSTICKS]; #ifndef M_PI # define M_PI 3.14159265358979323846 @@ -91,7 +91,7 @@ joystick_close(void) } static int -joystick_get_axis(int gameport, int joystick_nr, int mapping) +joystick_get_axis(int joystick_nr, int mapping) { if (mapping & POV_X) { switch (plat_joystick_state[joystick_nr].p[mapping & 3]) { @@ -128,9 +128,9 @@ joystick_get_axis(int gameport, int joystick_nr, int mapping) } void -joystick_process(void) +joystick_process(uint8_t gp) { - if (!joystick_type) + if (!joystick_type[gp]) return; SDL_JoystickUpdate(); @@ -146,44 +146,44 @@ joystick_process(void) #if 0 pclog("joystick %i - x=%i y=%i b[0]=%i b[1]=%i %i\n", js, - joystick_state[0][js].x, - joystick_state[0][js].y, - joystick_state[0][js].b[0], - joystick_state[0][js].b[1], - joysticks_present); + joystick_state[gp][js].x, + joystick_state[gp][js].y, + joystick_state[gp][js].b[0], + joystick_state[gp][js].b[1], + joysticks_present[gp]); #endif } - for (int js = 0; js < joystick_get_max_joysticks(joystick_type); js++) { - if (joystick_state[0][js].plat_joystick_nr) { - int joystick_nr = joystick_state[0][js].plat_joystick_nr - 1; + for (int js = 0; js < joystick_get_max_joysticks(joystick_type[gp]); js++) { + if (joystick_state[gp][js].plat_joystick_nr) { + int joystick_nr = joystick_state[gp][js].plat_joystick_nr - 1; - for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type); axis_nr++) - joystick_state[0][js].axis[axis_nr] = joystick_get_axis(0, joystick_nr, joystick_state[0][js].axis_mapping[axis_nr]); + for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type[gp]); axis_nr++) + joystick_state[gp][js].axis[axis_nr] = joystick_get_axis(joystick_nr, joystick_state[gp][js].axis_mapping[axis_nr]); - for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type); button_nr++) - joystick_state[0][js].button[button_nr] = plat_joystick_state[joystick_nr].b[joystick_state[0][js].button_mapping[button_nr]]; + for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type[gp]); button_nr++) + joystick_state[gp][js].button[button_nr] = plat_joystick_state[joystick_nr].b[joystick_state[gp][js].button_mapping[button_nr]]; - for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type); pov_nr++) { - int x = joystick_get_axis(0, joystick_nr, joystick_state[0][js].pov_mapping[pov_nr][0]); - int y = joystick_get_axis(0, joystick_nr, joystick_state[0][js].pov_mapping[pov_nr][1]); + for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type[gp]); pov_nr++) { + int x = joystick_get_axis(joystick_nr, joystick_state[gp][js].pov_mapping[pov_nr][0]); + int y = joystick_get_axis(joystick_nr, joystick_state[gp][js].pov_mapping[pov_nr][1]); double angle = (atan2((double) y, (double) x) * 360.0) / (2 * M_PI); double magnitude = sqrt((double) x * (double) x + (double) y * (double) y); if (magnitude < 16384) - joystick_state[0][js].pov[pov_nr] = -1; + joystick_state[gp][js].pov[pov_nr] = -1; else - joystick_state[0][js].pov[pov_nr] = ((int) angle + 90 + 360) % 360; + joystick_state[gp][js].pov[pov_nr] = ((int) angle + 90 + 360) % 360; } } else { - for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type); axis_nr++) - joystick_state[0][js].axis[axis_nr] = 0; + for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type[gp]); axis_nr++) + joystick_state[gp][js].axis[axis_nr] = 0; - for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type); button_nr++) - joystick_state[0][js].button[button_nr] = 0; + for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type[gp]); button_nr++) + joystick_state[gp][js].button[button_nr] = 0; - for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type); pov_nr++) - joystick_state[0][js].pov[pov_nr] = -1; + for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type[gp]); pov_nr++) + joystick_state[gp][js].pov[pov_nr] = -1; } } } diff --git a/src/qt/win_cdrom_ioctl.c b/src/qt/win_cdrom_ioctl.c index ff72e58fe..6bc2df27c 100644 --- a/src/qt/win_cdrom_ioctl.c +++ b/src/qt/win_cdrom_ioctl.c @@ -49,6 +49,13 @@ typedef struct ioctl_t { WCHAR path[256]; } ioctl_t; +typedef struct _CDROM_FULL_TOC { + UCHAR Length[2]; + UCHAR FirstCompleteSession; + UCHAR LastCompleteSession; + CDROM_TOC_FULL_TOC_DATA_BLOCK Descriptors[MAXIMUM_NUMBER_TRACKS + 2]; +} CDROM_FULL_TOC; + static int ioctl_read_dvd_structure(const void *local, uint8_t layer, uint8_t format, uint8_t *buffer, uint32_t *info); @@ -124,7 +131,7 @@ ioctl_read_normal_toc(ioctl_t *ioctl, uint8_t *toc_buf, int32_t *tracks_num) const int temp = DeviceIoControl(ioctl->handle, IOCTL_CDROM_READ_TOC_EX, &cur_read_toc_ex, sizeof(CDROM_READ_TOC_EX), - cur_full_toc, 65535, + cur_full_toc, sizeof(CDROM_TOC), (LPDWORD) &size, NULL); ioctl_log(ioctl->log, "temp = %i\n", temp); @@ -179,7 +186,7 @@ ioctl_read_raw_toc(ioctl_t *ioctl) if (!ioctl->is_dvd) { status = DeviceIoControl(ioctl->handle, IOCTL_CDROM_READ_TOC_EX, &cur_read_toc_ex, sizeof(CDROM_READ_TOC_EX), - cur_full_toc, 65535, + cur_full_toc, sizeof(CDROM_FULL_TOC), (LPDWORD) &size, NULL); ioctl_log(ioctl->log, "status = %i\n", status); } @@ -315,6 +322,7 @@ ioctl_get_track_info(const void *local, const uint32_t track, const raw_track_info_t *rti = (const raw_track_info_t *) ioctl->cur_rti; int ret = 1; int trk = -1; + int next = -1; if ((track >= 1) && (track < 99)) for (int i = 0; i < ioctl->blocks_num; i++) @@ -323,13 +331,35 @@ ioctl_get_track_info(const void *local, const uint32_t track, break; } + if ((track >= 1) && (track < 98)) + for (int i = 0; i < ioctl->blocks_num; i++) + if ((rti[i].point == (track + 1)) && (rti[i].session == rti[trk].session)) { + next = i; + break; + } + + if ((track >= 1) && (track < 99) && (trk != -1) && (next == -1)) + for (int i = 0; i < ioctl->blocks_num; i++) + if ((rti[i].point == 0xa2) && (rti[i].session == rti[trk].session)) { + next = i; + break; + } + if ((track == 0xaa) || (trk == -1)) { ioctl_log(ioctl->log, "ioctl_get_track_info(%02i)\n", track); ret = 0; } else { - ti->m = rti[trk].pm; - ti->s = rti[trk].ps; - ti->f = rti[trk].pf; + if (end) { + if (next != -1) { + ti->m = rti[next].pm; + ti->s = rti[next].ps; + ti->f = rti[next].pf; + } + } else { + ti->m = rti[trk].pm; + ti->s = rti[trk].ps; + ti->f = rti[trk].pf; + } ti->number = rti[trk].point; ti->attr = rti[trk].adr_ctl; diff --git a/src/qt/win_joystick_rawinput.c b/src/qt/win_joystick_rawinput.c index ecd885d3a..24ad87f63 100644 --- a/src/qt/win_joystick_rawinput.c +++ b/src/qt/win_joystick_rawinput.c @@ -96,15 +96,15 @@ typedef struct { } pov[MAX_JOY_POVS]; } raw_joystick_t; -int joysticks_present = 0; -joystick_t joystick_state[GAMEPORT_MAX][MAX_JOYSTICKS]; -plat_joystick_t plat_joystick_state[MAX_PLAT_JOYSTICKS]; +int joysticks_present = 0; +joystick_state_t joystick_state[GAMEPORT_MAX][MAX_JOYSTICKS]; +plat_joystick_state_t plat_joystick_state[MAX_PLAT_JOYSTICKS]; raw_joystick_t raw_joystick_state[MAX_PLAT_JOYSTICKS]; /* We only use the first 32 buttons reported, from Usage ID 1-128 */ void -joystick_add_button(raw_joystick_t *rawjoy, plat_joystick_t *joy, USAGE usage) +joystick_add_button(raw_joystick_t *rawjoy, plat_joystick_state_t *joy, USAGE usage) { if (joy->nr_buttons >= MAX_JOY_BUTTONS) return; @@ -117,7 +117,7 @@ joystick_add_button(raw_joystick_t *rawjoy, plat_joystick_t *joy, USAGE usage) } void -joystick_add_axis(raw_joystick_t *rawjoy, plat_joystick_t *joy, PHIDP_VALUE_CAPS prop) +joystick_add_axis(raw_joystick_t *rawjoy, plat_joystick_state_t *joy, PHIDP_VALUE_CAPS prop) { if (joy->nr_axes >= MAX_JOY_AXES) return; @@ -202,7 +202,7 @@ joystick_add_axis(raw_joystick_t *rawjoy, plat_joystick_t *joy, PHIDP_VALUE_CAPS } void -joystick_add_pov(raw_joystick_t *rawjoy, plat_joystick_t *joy, PHIDP_VALUE_CAPS prop) +joystick_add_pov(raw_joystick_t *rawjoy, plat_joystick_state_t *joy, PHIDP_VALUE_CAPS prop) { if (joy->nr_povs >= MAX_JOY_POVS) return; @@ -217,7 +217,7 @@ joystick_add_pov(raw_joystick_t *rawjoy, plat_joystick_t *joy, PHIDP_VALUE_CAPS } void -joystick_get_capabilities(raw_joystick_t *rawjoy, plat_joystick_t *joy) +joystick_get_capabilities(raw_joystick_t *rawjoy, plat_joystick_state_t *joy) { UINT size = 0; PHIDP_BUTTON_CAPS btn_caps = NULL; @@ -276,7 +276,7 @@ end: } void -joystick_get_device_name(raw_joystick_t *rawjoy, plat_joystick_t *joy, PRID_DEVICE_INFO info) +joystick_get_device_name(raw_joystick_t *rawjoy, plat_joystick_state_t *joy, PRID_DEVICE_INFO info) { UINT size = 0; WCHAR *device_name = NULL; @@ -340,9 +340,9 @@ joystick_init(void) if (info->hid.usUsage != HID_USAGE_GENERIC_JOYSTICK && info->hid.usUsage != HID_USAGE_GENERIC_GAMEPAD) goto end_loop; - plat_joystick_t *joy = &plat_joystick_state[joysticks_present]; - raw_joystick_t *rawjoy = &raw_joystick_state[joysticks_present]; - rawjoy->hdevice = deviceList[i].hDevice; + plat_joystick_state_t *joy = &plat_joystick_state[joysticks_present]; + raw_joystick_t *rawjoy = &raw_joystick_state[joysticks_present]; + rawjoy->hdevice = deviceList[i].hDevice; joystick_get_capabilities(rawjoy, joy); joystick_get_device_name(rawjoy, joy, info); @@ -454,7 +454,7 @@ win_joystick_handle(PRAWINPUT raw) plat_joystick_state[j].a[axis_nr] = value; #if 0 - joystick_log("%s %-06d ", plat_joystick_state[0][j].axis[axis_nr].name, plat_joystick_state[j].a[axis_nr]); + joystick_log("%s %-06d ", plat_joystick_state[j].axis[axis_nr].name, plat_joystick_state[j].a[axis_nr]); #endif } @@ -476,7 +476,7 @@ win_joystick_handle(PRAWINPUT raw) plat_joystick_state[j].p[pov_nr] = value; #if 0 - joystick_log("%s %-3d ", plat_joystick_state[0][j].pov[pov_nr].name, plat_joystick_state[j].p[pov_nr]); + joystick_log("%s %-3d ", plat_joystick_state[j].pov[pov_nr].name, plat_joystick_state[j].p[pov_nr]); #endif } #if 0 @@ -505,41 +505,41 @@ joystick_get_axis(int joystick_nr, int mapping) } void -joystick_process(void) +joystick_process(uint8_t gp) { - if (joystick_type == JS_TYPE_NONE) + if (joystick_type[gp] == JS_TYPE_NONE) return; - for (int js = 0; js < joystick_get_max_joysticks(joystick_type); js++) { - if (joystick_state[0][js].plat_joystick_nr) { - int joystick_nr = joystick_state[0][js].plat_joystick_nr - 1; + for (int js = 0; js < joystick_get_max_joysticks(joystick_type[gp]); js++) { + if (joystick_state[gp][js].plat_joystick_nr) { + int joystick_nr = joystick_state[gp][js].plat_joystick_nr - 1; - for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type); axis_nr++) - joystick_state[0][js].axis[axis_nr] = joystick_get_axis(joystick_nr, joystick_state[0][js].axis_mapping[axis_nr]); + for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type[gp]); axis_nr++) + joystick_state[gp][js].axis[axis_nr] = joystick_get_axis(joystick_nr, joystick_state[gp][js].axis_mapping[axis_nr]); - for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type); button_nr++) - joystick_state[0][js].button[button_nr] = plat_joystick_state[joystick_nr].b[joystick_state[0][js].button_mapping[button_nr]]; + for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type[gp]); button_nr++) + joystick_state[gp][js].button[button_nr] = plat_joystick_state[joystick_nr].b[joystick_state[gp][js].button_mapping[button_nr]]; - for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type); pov_nr++) { - int x = joystick_get_axis(joystick_nr, joystick_state[0][js].pov_mapping[pov_nr][0]); - int y = joystick_get_axis(joystick_nr, joystick_state[0][js].pov_mapping[pov_nr][1]); + for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type[gp]); pov_nr++) { + int x = joystick_get_axis(joystick_nr, joystick_state[gp][js].pov_mapping[pov_nr][0]); + int y = joystick_get_axis(joystick_nr, joystick_state[gp][js].pov_mapping[pov_nr][1]); double angle = (atan2((double) y, (double) x) * 360.0) / (2 * M_PI); double magnitude = sqrt((double) x * (double) x + (double) y * (double) y); if (magnitude < 16384) - joystick_state[0][js].pov[pov_nr] = -1; + joystick_state[gp][js].pov[pov_nr] = -1; else - joystick_state[0][js].pov[pov_nr] = ((int) angle + 90 + 360) % 360; + joystick_state[gp][js].pov[pov_nr] = ((int) angle + 90 + 360) % 360; } } else { - for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type); axis_nr++) - joystick_state[0][js].axis[axis_nr] = 0; + for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type[gp]); axis_nr++) + joystick_state[gp][js].axis[axis_nr] = 0; - for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type); button_nr++) - joystick_state[0][js].button[button_nr] = 0; + for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type[gp]); button_nr++) + joystick_state[gp][js].button[button_nr] = 0; - for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type); pov_nr++) - joystick_state[0][js].pov[pov_nr] = -1; + for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type[gp]); pov_nr++) + joystick_state[gp][js].pov[pov_nr] = -1; } } } diff --git a/src/qt_resources.qrc b/src/qt_resources.qrc index 51518b8f6..78153d3ff 100644 --- a/src/qt_resources.qrc +++ b/src/qt_resources.qrc @@ -1,6 +1,8 @@ qt/icons/cartridge.ico + qt/icons/cartridge_image.ico + qt/icons/cassette_image.ico qt/icons/cassette.ico qt/icons/cdrom.ico qt/icons/cdrom_disabled.ico @@ -10,24 +12,39 @@ qt/icons/cdrom_folder.ico qt/icons/cdrom_host.ico qt/icons/display.ico + qt/icons/fast_forward.ico qt/icons/floppy_35.ico + qt/icons/floppy_35_image.ico qt/icons/floppy_525.ico + qt/icons/floppy_525_image.ico qt/icons/floppy_and_cdrom_drives.ico qt/icons/floppy_disabled.ico qt/icons/hard_disk.ico qt/icons/input_devices.ico qt/icons/machine.ico qt/icons/mo.ico + qt/icons/mo_image.ico qt/icons/mo_disabled.ico qt/icons/network.ico qt/icons/other_peripherals.ico qt/icons/other_removable_devices.ico qt/icons/ports.ico + qt/icons/rdisk.ico + qt/icons/rdisk_image.ico + qt/icons/rdisk_disabled.ico + qt/icons/record.ico + qt/icons/rewind.ico qt/icons/sound.ico qt/icons/storage_controllers.ico - qt/icons/zip.ico - qt/icons/zip_disabled.ico + qt/icons/superdisk.ico + qt/icons/superdisk_image.ico + qt/icons/superdisk_disabled.ico qt/icons/active.ico + qt/icons/browse.ico + qt/icons/eject.ico + qt/icons/export.ico + qt/icons/new.ico + qt/icons/write_protected.ico qt/icons/write_active.ico qt/icons/disabled.ico qt/icons/86Box-gray.ico @@ -66,6 +83,8 @@ qt/assets/86box-yellow.png qt/assets/86box.png qt/assets/86box-wizard.png + qt/assets/addvm-logo.png + qt/assets/addvm-watermark.png qt/assets/systemicons/cpq_deskpro.png diff --git a/src/scsi/scsi.c b/src/scsi/scsi.c index 0b0ca7211..a02f4e7a5 100644 --- a/src/scsi/scsi.c +++ b/src/scsi/scsi.c @@ -33,7 +33,7 @@ #include <86box/scsi.h> #include <86box/scsi_device.h> #include <86box/cdrom.h> -#include <86box/zip.h> +#include <86box/rdisk.h> #include <86box/scsi_disk.h> #include <86box/scsi_aha154x.h> #include <86box/scsi_buslogic.h> @@ -84,6 +84,7 @@ static SCSI_CARD scsi_cards[] = { { &buslogic_445c_device, }, /* PCI */ { &am53c974_pci_device, }, + { &am53c974a_pci_device, }, { &buslogic_958d_pci_device, }, { &ncr53c810_pci_device, }, { &ncr53c815_pci_device, }, diff --git a/src/scsi/scsi_aha154x.c b/src/scsi/scsi_aha154x.c index 7c887e28b..7161a53bb 100644 --- a/src/scsi/scsi_aha154x.c +++ b/src/scsi/scsi_aha154x.c @@ -1006,8 +1006,10 @@ aha_init(const device_t *info) switch (dev->type) { case AHA_154xA: strcpy(dev->name, "AHA-154xA"); - dev->fw_rev = "A003"; /* The 3.07 microcode says A006. */ - dev->bios_path = "roms/scsi/adaptec/aha1540a307.bin"; /*Only for port 0x330*/ + bios_rev = (char *) device_get_config_bios("bios_rev"); + dev->bios_path = (char *) device_get_bios_file(info, bios_rev, 0); + dev->fw_rev = "A006"; /*3.07 (Port 0x330) normal microcode (M_E7BC.BIN)*/ + /* This is configurable from the configuration for the 154xB, the rest of the controllers read it from the EEPROM. */ dev->HostID = device_get_config_int("hostid"); @@ -1018,19 +1020,19 @@ aha_init(const device_t *info) case AHA_154xB: strcpy(dev->name, "AHA-154xB"); - switch (dev->Base) { - case 0x0330: - dev->bios_path = "roms/scsi/adaptec/aha1540b320_330.bin"; - break; + bios_rev = (char *) device_get_config_bios("bios_rev"); + dev->bios_path = (char *) device_get_bios_file(info, bios_rev, 0); + if (!strcmp(bios_rev, "v3_08")) + dev->fw_rev = "A003"; /*3.08 (Port 0x330) normal microcode (U12 27C128 Microcode v3.08.bin)*/ + else if (!strcmp(bios_rev, "v3_10") || !strcmp(bios_rev, "v3_10_p334") || !strcmp(bios_rev, "v3_1b_p334")) + dev->fw_rev = "A005"; /*3.10 (and revisions) normal microcode (M_FC8A.BIN)*/ + else if (!strcmp(bios_rev, "v3_11")) + dev->fw_rev = "A008"; /*3.11 (Port 0x330) normal microcode (1542BU12V311.BIN)*/ + else if (!strcmp(bios_rev, "v3_20") || !strcmp(bios_rev, "v3_20_p334")) + dev->fw_rev = "A014"; /*3.20 normal microcode (M_3054.BIN)*/ + else + dev->fw_rev = "A012"; /*3.20 (port 0x330) extended timeout microcode (M_5D98.BIN)*/ - case 0x0334: - dev->bios_path = "roms/scsi/adaptec/aha1540b320_334.bin"; - break; - - default: - break; - } - dev->fw_rev = "A005"; /* The 3.2 microcode says A012. */ /* This is configurable from the configuration for the 154xB, the rest of the controllers read it from the EEPROM. */ dev->HostID = device_get_config_int("hostid"); @@ -1156,6 +1158,125 @@ aha_init(const device_t *info) } // clang-format off +static const device_config_t aha_154xa_config[] = { + { + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = NULL, + .default_int = 0x334, + .file_filter = NULL, + .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 = "" } + }, + .bios = { { 0 } } + }, + { + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 11, + .file_filter = NULL, + .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 = "" } + }, + .bios = { { 0 } } + }, + { + .name = "dma", + .description = "DMA", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 6, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "DMA 5", .value = 5 }, + { .description = "DMA 6", .value = 6 }, + { .description = "DMA 7", .value = 7 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "hostid", + .description = "Host ID", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 7, + .file_filter = NULL, + .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 = { { 0 } } + }, + { + .name = "bios_rev", + .description = "BIOS Revision", + .type = CONFIG_BIOS, + .default_string = "v3_07", + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .bios = { + { + .name = "Version 3.07 (Port 0x330)", + .internal_name = "v3_07", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 16384, + .files = { "roms/scsi/adaptec/aha1540a307.bin", "" } + }, + { .files_no = 0 } + }, + }, + { + .name = "bios_addr", + .description = "BIOS address", + .type = CONFIG_HEX20, + .default_string = NULL, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0 }, + { .description = "C800H", .value = 0xc8000 }, + { .description = "D000H", .value = 0xd0000 }, + { .description = "D800H", .value = 0xd8000 }, + { .description = "DC00H", .value = 0xdc000 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +}; + static const device_config_t aha_154xb_config[] = { { .name = "base", @@ -1233,9 +1354,93 @@ static const device_config_t aha_154xb_config[] = { }, .bios = { { 0 } } }, + { + .name = "bios_rev", + .description = "BIOS Revision", + .type = CONFIG_BIOS, + .default_string = "v3_20_p334", + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .bios = { + { + .name = "Version 3.08 (Port 0x330)", + .internal_name = "v3_08", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 16384, + .files = { "roms/scsi/adaptec/U13 27C128 BIOS v3.08.bin", "" } + }, + { + .name = "Version 3.10 (Port 0x330)", + .internal_name = "v3_10", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 16384, + .files = { "roms/scsi/adaptec/aha1540b310.bin", "" } + }, + { + .name = "Version 3.10 (Port 0x334)", + .internal_name = "v3_10_p334", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 16384, + .files = { "roms/scsi/adaptec/154xp334.bin", "" } + }, + { + .name = "Version 3.1b (Port 0x334)", + .internal_name = "v3_1b_p334", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 16384, + .files = { "roms/scsi/adaptec/154xp334_v31b.bin", "" } + }, + { + .name = "Version 3.11 (Port 0x330)", + .internal_name = "v3_11", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 16384, + .files = { "roms/scsi/adaptec/1542BU13V311.BIN", "" } + }, + { + .name = "Version 3.20 (Port 0x330)", + .internal_name = "v3_20", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 16384, + .files = { "roms/scsi/adaptec/aha1540b320_330.bin", "" } + }, + { + .name = "Version 3.20 (Port 0x330) (Ext. Timeout)", + .internal_name = "v3_20_exttimeout", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 16384, + .files = { "roms/scsi/adaptec/B_B300.BIN", "" } + }, + { + .name = "Version 3.20 (Port 0x334)", + .internal_name = "v3_20_p334", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 16384, + .files = { "roms/scsi/adaptec/aha1540b320_334.bin", "" } + }, + { .files_no = 0 } + }, + }, { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0, @@ -1254,7 +1459,7 @@ static const device_config_t aha_154xb_config[] = { { .name = "", .description = "", .type = CONFIG_END } }; -static const device_config_t aha_154x_config[] = { +static const device_config_t aha_154xc_config[] = { { .name = "base", .description = "Address", @@ -1312,7 +1517,7 @@ static const device_config_t aha_154x_config[] = { }, { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0, @@ -1389,7 +1594,7 @@ static const device_config_t aha_154xcf_config[] = { }, { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0, @@ -1481,7 +1686,7 @@ const device_t aha154xa_device = { .available = NULL, .speed_changed = NULL, .force_redraw = NULL, - .config = aha_154xb_config + .config = aha_154xa_config }; const device_t aha154xb_device = { @@ -1509,7 +1714,7 @@ const device_t aha154xc_device = { .available = NULL, .speed_changed = NULL, .force_redraw = NULL, - .config = aha_154x_config + .config = aha_154xc_config }; const device_t aha154xcf_device = { diff --git a/src/scsi/scsi_buslogic.c b/src/scsi/scsi_buslogic.c index 0e8954aff..c2ecc7b62 100644 --- a/src/scsi/scsi_buslogic.c +++ b/src/scsi/scsi_buslogic.c @@ -1874,7 +1874,7 @@ static const device_config_t BT_ISA_Config[] = { }, { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0, diff --git a/src/scsi/scsi_cdrom.c b/src/scsi/scsi_cdrom.c index 95c8c3640..be23a66fe 100644 --- a/src/scsi/scsi_cdrom.c +++ b/src/scsi/scsi_cdrom.c @@ -645,19 +645,16 @@ scsi_cdrom_bus_speed(scsi_cdrom_t *dev) { double ret = -1.0; - if (dev && dev->drv && (dev->drv->bus_type == CDROM_BUS_SCSI)) { - dev->callback = -1.0; /* Speed depends on SCSI controller */ - return 0.0; - } else { - if (dev && dev->drv) - ret = ide_atapi_get_period(dev->drv->ide_channel); - if (ret == -1.0) { - if (dev) - dev->callback = -1.0; - return 0.0; - } else - return 1000000.0 / ret; + if (dev && dev->drv) + ret = ide_atapi_get_period(dev->drv->ide_channel); + + if (ret == -1.0) { + if (dev) + dev->callback = -1.0; + ret = 0.0; } + + return ret; } static void @@ -671,7 +668,12 @@ scsi_cdrom_set_period(scsi_cdrom_t *dev) double bytes_per_second; double period; - if (dev->was_cached != -1) { + if (dev->was_cached == -1) { + if (dev->drv->bus_type == CDROM_BUS_SCSI) + dev->callback = -1.0; /* Speed depends on SCSI controller */ + else + dev->callback = 512.0 + (scsi_cdrom_bus_speed(dev) * (double) (dev->packet_len)); + } else { if (dev->was_cached) { dev->callback += 512.0; scsi_cdrom_set_callback(dev); @@ -686,27 +688,21 @@ scsi_cdrom_set_period(scsi_cdrom_t *dev) /* 44100 * 16 bits * 2 channels = 176400 bytes per second */ bytes_per_second = 176400.0; bytes_per_second *= (double) dev->drv->cur_speed; - } else { - bytes_per_second = scsi_cdrom_bus_speed(dev); - if (bytes_per_second == 0.0) { - dev->callback = -1; /* Speed depends on SCSI controller */ - return; + + period = 1000000.0 / bytes_per_second; + scsi_cdrom_log(dev->log, "Byte transfer period: %lf us\n", period); + if (dev->was_cached == -1) + period *= (double) dev->packet_len; + else { + const int num = ((dev->drv->bus_type == CDROM_BUS_SCSI) || + (dev->block_len == 0)) ? dev->sectors_num : + ((scsi_cdrom_current_mode(dev) == 2) ? 1 : dev->sectors_num); + + period *= ((double) num) * 2352.0; } + scsi_cdrom_log(dev->log, "Sector transfer period: %lf us\n", period); + dev->callback += period; } - - period = 1000000.0 / bytes_per_second; - scsi_cdrom_log(dev->log, "Byte transfer period: %lf us\n", period); - if (dev->was_cached == -1) - period *= (double) dev->packet_len; - else { - const int num = ((dev->drv->bus_type == CDROM_BUS_SCSI) || - (dev->block_len == 0)) ? dev->sectors_num : - ((scsi_cdrom_current_mode(dev) == 2) ? 1 : dev->sectors_num); - - period *= ((double) num) * 2352.0; - } - scsi_cdrom_log(dev->log, "Sector transfer period: %lf us\n", period); - dev->callback += period; } scsi_cdrom_set_callback(dev); } @@ -1048,7 +1044,7 @@ scsi_cdrom_read_data(scsi_cdrom_t *dev, const int msf, const int type, const int dev->sectors_num = 0; - if (dev->drv->cd_status == CD_STATUS_EMPTY) + if ((dev->drv->cd_status == CD_STATUS_EMPTY) || (dev->drv->cd_status == CD_STATUS_DVD_REJECTED)) scsi_cdrom_not_ready(dev); else if (dev->sector_pos > dev->drv->cdrom_capacity) { scsi_cdrom_lba_out_of_range(dev); @@ -1242,10 +1238,10 @@ scsi_cdrom_pre_execution_check(scsi_cdrom_t *dev, const uint8_t *cdb) if (!(scsi_cdrom_command_flags[cdb[0]] & ALLOW_UA)) scsi_cdrom_insert((void *) dev); - ready = (dev->drv->cd_status != CD_STATUS_EMPTY); + ready = (dev->drv->cd_status != CD_STATUS_EMPTY) && (dev->drv->cd_status != CD_STATUS_DVD_REJECTED); } } else - ready = (dev->drv->cd_status != CD_STATUS_EMPTY); + ready = (dev->drv->cd_status != CD_STATUS_EMPTY) && (dev->drv->cd_status != CD_STATUS_DVD_REJECTED); skip_ready_check: /* @@ -1325,10 +1321,18 @@ scsi_cdrom_update_sector_flags(scsi_cdrom_t *dev) dev->sector_type = 0x08 | ((2048 / dev->drv->sector_size) << 4); dev->sector_flags = 0x0010; break; + case 2052: + dev->sector_type = 0x18; + dev->sector_flags = 0x0030; + break; case 2056: dev->sector_type = 0x18; dev->sector_flags = 0x0050; break; + case 2060: + dev->sector_type = 0x18; + dev->sector_flags = 0x0070; + break; case 2324: case 2328: dev->sector_type = (dev->drv->sector_size == 2328) ? 0x1a : 0x1b; dev->sector_flags = 0x0018; @@ -1437,7 +1441,8 @@ scsi_cdrom_request_sense_for_scsi(scsi_common_t *sc, uint8_t *buffer, uint8_t al { scsi_cdrom_t *dev = (scsi_cdrom_t *) sc; - if ((dev->drv->cd_status == CD_STATUS_EMPTY) && dev->unit_attention) { + if (((dev->drv->cd_status == CD_STATUS_EMPTY) || + (dev->drv->cd_status == CD_STATUS_DVD_REJECTED)) && dev->unit_attention) { /* If the drive is not ready, there is no reason to keep the UNIT ATTENTION condition present, as we only use it to mark disc changes. @@ -2849,7 +2854,7 @@ scsi_cdrom_command(scsi_common_t *sc, const uint8_t *cdb) Also, the max_len variable is reused as this command does otherwise not use it, to avoid having to declare another variable. */ - if (dev->drv->cd_status == CD_STATUS_EMPTY) + if ((dev->drv->cd_status == CD_STATUS_EMPTY) || (dev->drv->cd_status == CD_STATUS_DVD_REJECTED)) max_len = 70; /* No media inserted. */ else if (dev->drv->cd_status == CD_STATUS_DVD) max_len = 65; /* DVD. */ @@ -2926,7 +2931,7 @@ scsi_cdrom_command(scsi_common_t *sc, const uint8_t *cdb) alloc_length = 0; - if (dev->drv->cd_status != CD_STATUS_EMPTY) { + if ((dev->drv->cd_status != CD_STATUS_EMPTY) && (dev->drv->cd_status != CD_STATUS_DVD_REJECTED)) { if (dev->drv->cd_status == CD_STATUS_DVD) { b[6] = (MMC_PROFILE_DVD_ROM >> 8) & 0xff; b[7] = MMC_PROFILE_DVD_ROM & 0xff; @@ -2950,7 +2955,8 @@ scsi_cdrom_command(scsi_common_t *sc, const uint8_t *cdb) alloc_length += 4; b += 4; - for (uint8_t i = 0; i < 2; i++) { + int max_profiles = cdrom_is_dvd(dev->drv->type) ? 2 : 1; + for (uint8_t i = 0; i < max_profiles; i++) { b[0] = (profiles[i] >> 8) & 0xff; b[1] = profiles[i] & 0xff; @@ -2958,7 +2964,7 @@ scsi_cdrom_command(scsi_common_t *sc, const uint8_t *cdb) b[2] |= 1; alloc_length += 4; - b += 4; + b += 4; } } if ((feature == 1) || ((cdb[1] & 3) < 2)) { @@ -3026,7 +3032,7 @@ scsi_cdrom_command(scsi_common_t *sc, const uint8_t *cdb) alloc_length += 8; b += 8; } - if ((feature == 0x1f) || ((cdb[1] & 3) < 2)) { + if (cdrom_is_dvd(dev->drv->type) && ((feature == 0x1f) || ((cdb[1] & 3) < 2))) { b[1] = 0x1f; b[2] = (0 << 2) | 0x02 | 0x01; /* persistent and current */ b[3] = 0; @@ -3096,7 +3102,7 @@ scsi_cdrom_command(scsi_common_t *sc, const uint8_t *cdb) gesn_event_header->notification_class |= GESN_MEDIA; /* Bits 7-4 = Reserved, Bits 4-1 = Media Status. */ - if (dev->drv->cd_status == CD_STATUS_EMPTY) + if ((dev->drv->cd_status == CD_STATUS_EMPTY) || (dev->drv->cd_status == CD_STATUS_DVD_REJECTED)) dev->buffer[4] = MEC_MEDIA_REMOVAL; else dev->buffer[4] = dev->unit_attention ? MEC_NEW_MEDIA : MEC_NO_CHANGE; @@ -3804,8 +3810,10 @@ scsi_cdrom_get_max(const ide_t *ide, UNUSED(const int ide_has_dma), const int ty static int scsi_cdrom_get_timings(const ide_t *ide, UNUSED(const int ide_has_dma), const int type) { - const scsi_cdrom_t *dev = (scsi_cdrom_t *) ide->sc; - int has_dma = cdrom_has_dma(dev->drv->type); + const scsi_cdrom_t *dev = (scsi_cdrom_t *) ide->sc; + int has_dma = cdrom_has_dma(dev->drv->type); + int pio_cyc_time[5] = { 600, 383, 240, 180, 120 }; + int max_pio = cdrom_get_transfer_max(dev->drv->type, TYPE_PIO); int ret; switch (type) { @@ -3813,10 +3821,20 @@ scsi_cdrom_get_timings(const ide_t *ide, UNUSED(const int ide_has_dma), const in ret = has_dma ? 120 : 0; break; case TIMINGS_PIO: - ret = has_dma ? 120 : 0; + if (max_pio <= 0) + ret = 600; + else if (max_pio == 1) + ret = 383; + else + ret = 240; break; case TIMINGS_PIO_FC: - ret = 0; + if (max_pio > 4) + ret = 120; + else if (max_pio < 0) + ret = 600; + else + ret = pio_cyc_time[max_pio]; break; default: ret = 0; diff --git a/src/scsi/scsi_ncr53c400.c b/src/scsi/scsi_ncr53c400.c index 7a87b4ac9..5f2302b4f 100644 --- a/src/scsi/scsi_ncr53c400.c +++ b/src/scsi/scsi_ncr53c400.c @@ -821,7 +821,7 @@ corel_ls2000_available(void) static const device_config_t ncr53c400_mmio_config[] = { { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xD8000, @@ -892,7 +892,7 @@ static const device_config_t rt1000b_config[] = { }, { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xD8000, @@ -953,7 +953,7 @@ static const device_config_t rt1000b_mc_config[] = { static const device_config_t t130b_config[] = { { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xD8000, diff --git a/src/scsi/scsi_pcscsi.c b/src/scsi/scsi_pcscsi.c index 7c991bdb1..f91eef683 100644 --- a/src/scsi/scsi_pcscsi.c +++ b/src/scsi/scsi_pcscsi.c @@ -46,14 +46,25 @@ #include <86box/scsi_pcscsi.h> #include <86box/vid_ati_eeprom.h> #include <86box/fifo8.h> +#include "cpu.h" -#define DC390_ROM "roms/scsi/esp_pci/INT13.BIN" -#define AM53C974_ROM "roms/scsi/esp_pci/harom.bin" +#define DC390_ROM "roms/scsi/esp_pci/INT13.BIN" +#define AM53C974_3_01_AMD_ROM "roms/scsi/esp_pci/ebrom.bin" +#define AM53C974_3_43_ROM "roms/scsi/esp_pci/2974BIOS.BIN" +#define AM53C974_4_00_ROM "roms/scsi/esp_pci/2974bios-4-00.bin" +#define AM53C974_5_00_ROM "roms/scsi/esp_pci/2974bios-5-00.bin" +#define AM53C974_5_11_ROM "roms/scsi/esp_pci/2974bios-5-11.bin" #define ESP_REGS 16 #define ESP_FIFO_SZ 16 #define ESP_CMDFIFO_SZ 32 +enum ESPASCMode { + ESP_ASC_MODE_DIS = 0, /* Disconnected */ + ESP_ASC_MODE_INI = 1, /* Initiator */ + ESP_ASC_MODE_TGT = 2 /* Target */ +}; + #define ESP_TCLO 0x0 #define ESP_TCMID 0x1 #define ESP_FIFO 0x2 @@ -80,6 +91,13 @@ #define CMD_DMA 0x80 #define CMD_CMD 0x7f +#define CMD_GRP_MASK 0x70 + +#define CMD_GRP_MISC 0x00 +#define CMD_GRP_INIT 0x01 +#define CMD_GRP_TRGT 0x02 +#define CMD_GRP_DISC 0x04 + #define CMD_NOP 0x00 #define CMD_FLUSH 0x01 #define CMD_RESET 0x02 @@ -114,7 +132,7 @@ #define INTR_FC 0x08 #define INTR_BS 0x10 #define INTR_DC 0x20 -#define INTR_ILL 0x40 +#define INTR_IL 0x40 #define INTR_RST 0x80 #define SEQ_0 0x0 @@ -123,6 +141,7 @@ #define CFG1_RESREPT 0x40 +#define TCHI_ESP100A 0x01 #define TCHI_FAS100A 0x04 #define TCHI_AM53C974 0x12 @@ -153,8 +172,7 @@ #define SBAC_PABTEN (1 << 25) typedef struct esp_t { - mem_mapping_t mmio_mapping; - mem_mapping_t ram_mapping; + char *bios_path; char nvr_path[64]; uint8_t pci_slot; int has_bios; @@ -176,6 +194,7 @@ typedef struct esp_t { uint8_t id, lun; Fifo8 cmdfifo; uint8_t cmdfifo_cdb_offset; + uint8_t asc_mode; int data_ready; int32_t xfer_counter; @@ -206,6 +225,8 @@ typedef struct esp_t { uint8_t pos_regs[8]; } esp_t; +static esp_t reset_state = { 0 }; + #define READ_FROM_DEVICE 1 #define WRITE_TO_DEVICE 0 @@ -280,10 +301,10 @@ esp_pci_update_irq(esp_t *dev) if (level) { pci_set_irq(dev->pci_slot, PCI_INTA, &dev->irq_state); - esp_log("Raising PCI IRQ...\n"); + esp_log("Raising PCI IRQ..., SCSIL=%d, DMAL=%d\n", scsi_level, dma_level); } else { pci_clear_irq(dev->pci_slot, PCI_INTA, &dev->irq_state); - esp_log("Lowering PCI IRQ...\n"); + esp_log("Lowering PCI IRQ..., SCSIL=%d, DMAL=%d\n", scsi_level, dma_level); } } @@ -310,6 +331,7 @@ esp_irq(esp_t *dev, int level) * DMA_STAT_DONE and the ESP IRQ arriving which is visible to the * guest that can cause confusion e.g. Linux */ + esp_log("ESP IRQ issuing: WBC=%d, CMDMask=%03x.\n", dev->dma_regs[DMA_WBC], dev->dma_regs[DMA_CMD] & DMA_CMD_MASK); if (((dev->dma_regs[DMA_CMD] & DMA_CMD_MASK) == 0x03) && (dev->dma_regs[DMA_WBC] == 0)) dev->dma_regs[DMA_STAT] |= DMA_STAT_DONE; @@ -435,12 +457,14 @@ esp_select(esp_t *dev) esp_log("ESP SCSI no devices on ID %d, LUN %d\n", dev->id, dev->lun); /* No such drive */ dev->rregs[ESP_RSTAT] = 0; + dev->asc_mode = ESP_ASC_MODE_DIS; dev->rregs[ESP_RINTR] = INTR_DC; esp_raise_irq(dev); return -1; } else esp_log("ESP SCSI device present on ID %d, LUN %d\n", dev->id, dev->lun); + dev->asc_mode = ESP_ASC_MODE_INI; return 0; } @@ -460,9 +484,10 @@ esp_transfer_data(esp_t *dev) * Initial incoming data xfer is complete for sequencer command * so raise deferred bus service and function complete interrupt */ - dev->rregs[ESP_RINTR] |= (INTR_BS | INTR_FC); - dev->rregs[ESP_RSEQ] = SEQ_CD; - break; + dev->rregs[ESP_RINTR] |= (INTR_BS | INTR_FC); + dev->rregs[ESP_RSEQ] = SEQ_CD; + esp_raise_irq(dev); + break; case CMD_SELATNS: case (CMD_SELATNS | CMD_DMA): @@ -470,22 +495,26 @@ esp_transfer_data(esp_t *dev) * Initial incoming data xfer is complete so raise command * completion interrupt */ - dev->rregs[ESP_RINTR] |= INTR_BS; - dev->rregs[ESP_RSEQ] = SEQ_MO; - break; + dev->rregs[ESP_RINTR] |= INTR_BS; + dev->rregs[ESP_RSEQ] = SEQ_MO; + esp_raise_irq(dev); + break; case CMD_TI: case (CMD_TI | CMD_DMA): /* - * Bus service interrupt raised because of initial change to - * DATA phase + * If the final COMMAND phase data was transferred using a TI + * command, clear ESP_CMD to terminate the TI command and raise + * the completion interrupt */ dev->rregs[ESP_CMD] = 0; dev->rregs[ESP_RINTR] |= INTR_BS; + esp_raise_irq(dev); + break; + + default: break; } - - esp_raise_irq(dev); } /* @@ -531,7 +560,7 @@ esp_do_command_phase(esp_t *dev) dev->ti_size = sd->buffer_length; dev->xfer_counter = sd->buffer_length; - esp_log("ESP SCSI Command = 0x%02x, ID = %d, LUN = %d, len = %d, phase = %02x.\n", buf[0], dev->id, dev->lun, sd->buffer_length, sd->phase); + esp_log("ESP SCSI Command = 0x%02x, ID = %d, LUN = %d, len = %d, phase = %02x, PCI DMA cmd mask = %02x.\n", buf[0], dev->id, dev->lun, sd->buffer_length, sd->phase, dev->dma_regs[DMA_CMD] & DMA_CMD_MASK); fifo8_reset(&dev->cmdfifo); @@ -570,10 +599,12 @@ esp_do_message_phase(esp_t *dev) dev->lun = message & 7; dev->cmdfifo_cdb_offset--; + esp_log("Scanning LUN=%d.\n", dev->lun); if (scsi_device_present(&scsi_devices[dev->bus][dev->id]) && (dev->lun > 0)) { /* We only support LUN 0 */ esp_log("LUN = %i\n", dev->lun); dev->rregs[ESP_RSTAT] = 0; + dev->asc_mode = ESP_ASC_MODE_DIS; dev->rregs[ESP_RINTR] = INTR_DC; dev->rregs[ESP_RSEQ] = SEQ_0; esp_raise_irq(dev); @@ -598,8 +629,8 @@ esp_do_cmd(esp_t *dev) { esp_log("DO CMD.\n"); esp_do_message_phase(dev); - assert(dev->cmdfifo_cdb_offset == 0); - esp_do_command_phase(dev); + if (dev->cmdfifo_cdb_offset >= 0) + esp_do_command_phase(dev); } static void @@ -610,7 +641,10 @@ esp_dma_enable(esp_t *dev, int level) dev->dma_enabled = 1; timer_stop(&dev->timer); if (((dev->rregs[ESP_CMD] & CMD_CMD) != CMD_TI) && ((dev->rregs[ESP_CMD] & CMD_CMD) != CMD_PAD)) { - timer_on_auto(&dev->timer, 40.0); + if (dev->wregs[ESP_WCCF] & 0x07) + timer_on_auto(&dev->timer, ((double)(dev->wregs[ESP_WCCF] & 0x07)) * 5.0); + else + timer_on_auto(&dev->timer, 40.0); } else { esp_log("Period = %lf\n", dev->period); timer_on_auto(&dev->timer, dev->period); @@ -631,7 +665,10 @@ esp_hard_reset(esp_t *dev) fifo8_reset(&dev->cmdfifo); dev->dma = 0; dev->tchi_written = 0; + dev->asc_mode = ESP_ASC_MODE_DIS; dev->rregs[ESP_CFG1] = dev->mca ? dev->HostID : 7; + dev->sbac = 1 << 19; + esp_log("ESP Reset\n"); timer_stop(&dev->timer); @@ -679,25 +716,28 @@ esp_do_dma(esp_t *dev) uint8_t buf[ESP_CMDFIFO_SZ]; uint32_t len; - esp_log("ESP SCSI Actual DMA len = %d\n", esp_get_tc(dev)); - len = esp_get_tc(dev); + esp_log("ESP SCSI Actual DMA len=%d, cfg3=%02x, phase=%x.\n", len, dev->rregs[ESP_CFG3], esp_get_phase(dev)); + switch (esp_get_phase(dev)) { case STAT_MO: len = MIN(len, fifo8_num_free(&dev->cmdfifo)); - if (dev->mca) { - dma_set_drq(dev->DmaChannel, 1); - while (dev->dma_86c01.pos < len) { - int val = dma_channel_read(dev->DmaChannel); - buf[dev->dma_86c01.pos++] = val & 0xff; - } - dev->dma_86c01.pos = 0; - dma_set_drq(dev->DmaChannel, 0); - } else - esp_pci_dma_memory_rw(dev, buf, len, WRITE_TO_DEVICE); + esp_log("ESP SCSI Message Out len=%d.\n", len); + if (len) { + if (dev->mca) { + dma_set_drq(dev->DmaChannel, 1); + while (dev->dma_86c01.pos < len) { + int val = dma_channel_read(dev->DmaChannel); + buf[dev->dma_86c01.pos++] = val & 0xff; + } + dev->dma_86c01.pos = 0; + dma_set_drq(dev->DmaChannel, 0); + } else + esp_pci_dma_memory_rw(dev, buf, len, WRITE_TO_DEVICE); - esp_set_tc(dev, esp_get_tc(dev) - len); + esp_set_tc(dev, esp_get_tc(dev) - len); + } fifo8_push_all(&dev->cmdfifo, buf, len); dev->cmdfifo_cdb_offset += len; @@ -745,19 +785,21 @@ esp_do_dma(esp_t *dev) case STAT_CD: len = MIN(len, fifo8_num_free(&dev->cmdfifo)); - if (dev->mca) { - dma_set_drq(dev->DmaChannel, 1); - while (dev->dma_86c01.pos < len) { - int val = dma_channel_read(dev->DmaChannel); - buf[dev->dma_86c01.pos++] = val & 0xff; - } - dev->dma_86c01.pos = 0; - dma_set_drq(dev->DmaChannel, 0); - } else - esp_pci_dma_memory_rw(dev, buf, len, WRITE_TO_DEVICE); + if (len) { + if (dev->mca) { + dma_set_drq(dev->DmaChannel, 1); + while (dev->dma_86c01.pos < len) { + int val = dma_channel_read(dev->DmaChannel); + buf[dev->dma_86c01.pos++] = val & 0xff; + } + dev->dma_86c01.pos = 0; + dma_set_drq(dev->DmaChannel, 0); + } else + esp_pci_dma_memory_rw(dev, buf, len, WRITE_TO_DEVICE); - fifo8_push_all(&dev->cmdfifo, buf, len); - esp_set_tc(dev, esp_get_tc(dev) - len); + fifo8_push_all(&dev->cmdfifo, buf, len); + esp_set_tc(dev, esp_get_tc(dev) - len); + } dev->ti_size = 0; if (esp_get_tc(dev) == 0) { /* Command has been received */ @@ -775,20 +817,22 @@ esp_do_dma(esp_t *dev) switch (dev->rregs[ESP_CMD]) { case (CMD_TI | CMD_DMA): - if (dev->mca) { - dma_set_drq(dev->DmaChannel, 1); - while (dev->dma_86c01.pos < len) { - int val = dma_channel_read(dev->DmaChannel); - esp_log("ESP SCSI DMA write for 53C9x: pos = %i, val = %02x\n", dev->dma_86c01.pos, val & 0xff); - sd->sc->temp_buffer[dev->buffer_pos + dev->dma_86c01.pos] = val & 0xff; - dev->dma_86c01.pos++; - } - dma_set_drq(dev->DmaChannel, 0); - dev->dma_86c01.pos = 0; - } else - esp_pci_dma_memory_rw(dev, sd->sc->temp_buffer + dev->buffer_pos, len, WRITE_TO_DEVICE); + if (len) { + if (dev->mca) { + dma_set_drq(dev->DmaChannel, 1); + while (dev->dma_86c01.pos < len) { + int val = dma_channel_read(dev->DmaChannel); + esp_log("ESP SCSI DMA write for 53C9x: pos = %i, val = %02x\n", dev->dma_86c01.pos, val & 0xff); + sd->sc->temp_buffer[dev->buffer_pos + dev->dma_86c01.pos] = val & 0xff; + dev->dma_86c01.pos++; + } + dma_set_drq(dev->DmaChannel, 0); + dev->dma_86c01.pos = 0; + } else + esp_pci_dma_memory_rw(dev, sd->sc->temp_buffer + dev->buffer_pos, len, WRITE_TO_DEVICE); - esp_set_tc(dev, esp_get_tc(dev) - len); + esp_set_tc(dev, esp_get_tc(dev) - len); + } dev->buffer_pos += len; dev->xfer_counter -= len; dev->ti_size += len; @@ -834,18 +878,19 @@ esp_do_dma(esp_t *dev) switch (dev->rregs[ESP_CMD]) { case (CMD_TI | CMD_DMA): - if (dev->mca) { - dma_set_drq(dev->DmaChannel, 1); - while (dev->dma_86c01.pos < len) { - dma_channel_write(dev->DmaChannel, sd->sc->temp_buffer[dev->buffer_pos + dev->dma_86c01.pos]); - esp_log("ESP SCSI DMA read for 53C9x: pos = %i, val = %02x\n", dev->dma_86c01.pos, sd->sc->temp_buffer[dev->buffer_pos + dev->dma_86c01.pos]); - dev->dma_86c01.pos++; - } - dev->dma_86c01.pos = 0; - dma_set_drq(dev->DmaChannel, 0); - } else - esp_pci_dma_memory_rw(dev, sd->sc->temp_buffer + dev->buffer_pos, len, READ_FROM_DEVICE); - + if (len) { + if (dev->mca) { + dma_set_drq(dev->DmaChannel, 1); + while (dev->dma_86c01.pos < len) { + dma_channel_write(dev->DmaChannel, sd->sc->temp_buffer[dev->buffer_pos + dev->dma_86c01.pos]); + esp_log("ESP SCSI DMA read for 53C9x: pos = %i, val = %02x\n", dev->dma_86c01.pos, sd->sc->temp_buffer[dev->buffer_pos + dev->dma_86c01.pos]); + dev->dma_86c01.pos++; + } + dev->dma_86c01.pos = 0; + dma_set_drq(dev->DmaChannel, 0); + } else + esp_pci_dma_memory_rw(dev, sd->sc->temp_buffer + dev->buffer_pos, len, READ_FROM_DEVICE); + } dev->buffer_pos += len; dev->xfer_counter -= len; dev->ti_size -= len; @@ -886,6 +931,7 @@ esp_do_dma(esp_t *dev) if (len) { buf[0] = dev->status; + /* Length already non-zero */ if (dev->mca) { dma_set_drq(dev->DmaChannel, 1); while (dev->dma_86c01.pos < len) { @@ -925,6 +971,7 @@ esp_do_dma(esp_t *dev) if (len) { buf[0] = 0; + /* Length already non-zero */ if (dev->mca) { dma_set_drq(dev->DmaChannel, 1); while (dev->dma_86c01.pos < len) { @@ -943,6 +990,9 @@ esp_do_dma(esp_t *dev) esp_raise_irq(dev); } break; + + default: + break; } break; @@ -991,6 +1041,7 @@ esp_do_nodma(esp_t *dev) uint8_t buf[ESP_FIFO_SZ]; int len; + esp_log("No DMA phase=%x.\n", esp_get_phase(dev)); switch (esp_get_phase(dev)) { case STAT_MO: switch (dev->rregs[ESP_CMD]) { @@ -998,8 +1049,10 @@ esp_do_nodma(esp_t *dev) /* Copy FIFO into cmdfifo */ len = esp_fifo_pop_buf(dev, buf, fifo8_num_used(&dev->fifo)); len = MIN(fifo8_num_free(&dev->cmdfifo), len); + esp_log("ESP Message Out CMD SelAtn len=%d.\n", len); fifo8_push_all(&dev->cmdfifo, buf, len); + esp_log("ESP Message Out CMD SelAtn FIFO num used=%d.\n", fifo8_num_used(&dev->cmdfifo)); if (fifo8_num_used(&dev->cmdfifo) >= 1) { /* First byte received, switch to command phase */ esp_set_phase(dev, STAT_CD); @@ -1015,11 +1068,13 @@ esp_do_nodma(esp_t *dev) case CMD_SELATNS: /* Copy one byte from FIFO into cmdfifo */ - len = esp_fifo_pop_buf(dev, buf, - MIN(fifo8_num_used(&dev->fifo), 1)); + len = esp_fifo_pop_buf(dev, buf, MIN(fifo8_num_used(&dev->fifo), 1)); + esp_log("ESP Message Out CMD SelAtnStop len1=%d.\n", len); len = MIN(fifo8_num_free(&dev->cmdfifo), len); + esp_log("ESP Message Out CMD SelAtnStop len2=%d.\n", len); fifo8_push_all(&dev->cmdfifo, buf, len); + esp_log("ESP Message Out CMD SelAtnStop FIFO num used=%d.\n", fifo8_num_used(&dev->cmdfifo)); if (fifo8_num_used(&dev->cmdfifo) >= 1) { /* First byte received, stop in message out phase */ dev->rregs[ESP_RSEQ] = SEQ_MO; @@ -1034,11 +1089,14 @@ esp_do_nodma(esp_t *dev) case CMD_TI: /* Copy FIFO into cmdfifo */ len = esp_fifo_pop_buf(dev, buf, fifo8_num_used(&dev->fifo)); + esp_log("ESP Message Out CMD TI len1=%d.\n", len); len = MIN(fifo8_num_free(&dev->cmdfifo), len); + esp_log("ESP Message Out CMD TI len2=%d.\n", len); fifo8_push_all(&dev->cmdfifo, buf, len); /* ATN remains asserted until FIFO empty */ dev->cmdfifo_cdb_offset = fifo8_num_used(&dev->cmdfifo); + esp_log("ESP Message Out CMD TI CDB offset=%d.\n", dev->cmdfifo_cdb_offset); esp_set_phase(dev, STAT_CD); dev->rregs[ESP_CMD] = 0; dev->rregs[ESP_RINTR] |= INTR_BS; @@ -1144,6 +1202,7 @@ esp_do_nodma(esp_t *dev) case STAT_ST: switch (dev->rregs[ESP_CMD]) { case CMD_ICCS: + esp_log("ICCS Status=%x.\n", dev->status); esp_fifo_push(dev, dev->status); esp_set_phase(dev, STAT_MI); @@ -1211,15 +1270,18 @@ esp_command_complete(void *priv, uint32_t status) static void esp_timer_on(esp_t *dev, scsi_device_t *sd, double p) { - if (dev->mca) { - /* Normal SCSI: 5000000 bytes per second */ - dev->period = (p > 0.0) ? p : (((double) sd->buffer_length) * 0.2); - } else { + if ((dev->rregs[ESP_CFG3] & 0x18) == 0x18) { /* Fast SCSI: 10000000 bytes per second */ dev->period = (p > 0.0) ? p : (((double) sd->buffer_length) * 0.1); + } else { + /* Normal SCSI: 5000000 bytes per second */ + dev->period = (p > 0.0) ? p : (((double) sd->buffer_length) * 0.2); } - timer_on_auto(&dev->timer, dev->period + 40.0); + if ((dev->wregs[ESP_WCCF] & 0x07) == 0x00) + timer_on_auto(&dev->timer, dev->period + 40.0); + else + timer_on_auto(&dev->timer, dev->period + (((double)(dev->wregs[ESP_WCCF] & 0x07)) * 5.0)); } static void @@ -1256,6 +1318,7 @@ handle_s_without_atn(void *priv) if (esp_select(dev) < 0) return; + esp_log("Selection without ATN.\n"); esp_set_phase(dev, STAT_CD); dev->cmdfifo_cdb_offset = 0; @@ -1273,6 +1336,7 @@ handle_satn(void *priv) if (esp_select(dev) < 0) return; + esp_log("Selection with ATN.\n"); esp_set_phase(dev, STAT_MO); if (dev->dma) @@ -1289,8 +1353,8 @@ handle_satn_stop(void *priv) if (esp_select(dev) < 0) return; + esp_log("Selection with ATN and Stop.\n"); esp_set_phase(dev, STAT_MO); - dev->cmdfifo_cdb_offset = 0; if (dev->dma) esp_do_dma(dev); @@ -1323,6 +1387,37 @@ esp_callback(void *priv) } } +static int +esp_cmd_is_valid(esp_t *dev, uint8_t cmd) +{ + uint8_t cmd_group = (cmd & CMD_GRP_MASK) >> 4; + + /* Always allow misc commands */ + if (cmd_group == CMD_GRP_MISC) + return 1; + + switch (dev->asc_mode) { + case ESP_ASC_MODE_DIS: + /* Disconnected mode: only allow disconnected commands */ + if (cmd_group == CMD_GRP_DISC) + return 1; + + break; + + case ESP_ASC_MODE_INI: + /* Initiator mode: allow initiator commands */ + if (cmd_group == CMD_GRP_INIT) + return 1; + + break; + + default: + break; + } + + return 0; +} + static uint32_t esp_reg_read(esp_t *dev, uint32_t saddr) { @@ -1338,29 +1433,43 @@ esp_reg_read(esp_t *dev, uint32_t saddr) except TC */ ret = dev->rregs[ESP_RINTR]; dev->rregs[ESP_RINTR] = 0; - dev->rregs[ESP_RSTAT] &= ~STAT_TC; - esp_log("ESP SCSI Clear sequence step\n"); + dev->rregs[ESP_RSTAT] &= ~(0x08 | STAT_PE | STAT_GE | STAT_TC); esp_lower_irq(dev); - esp_log("ESP RINTR read old val = %02x\n", ret); + esp_log("Read Interrupt=%02x (old).\n", ret); break; case ESP_TCHI: /* Return the unique id if the value has never been written */ - if (dev->mca) { - ret = dev->rregs[ESP_TCHI]; - } else { - if (!dev->tchi_written) - ret = TCHI_AM53C974; + if (!dev->tchi_written) { + if (dev->mca) + ret = TCHI_ESP100A; else - ret = dev->rregs[ESP_TCHI]; + ret = TCHI_AM53C974; + + esp_log("ChipID=%02x.\n", ret); + } else { + ret = dev->rregs[ESP_TCHI]; + esp_log("Read TCHI Register=%02x.\n", ret); } break; case ESP_RFLAGS: ret = fifo8_num_used(&dev->fifo); break; + case ESP_RSTAT: + ret = dev->rregs[ESP_RSTAT]; + esp_log("Read SCSI Status Register=%02x.\n", ret); + break; + case ESP_RSEQ: + ret = dev->rregs[ESP_RSEQ]; + esp_log("Read Sequence Step=%02x, intr=%02x.\n", ret, dev->rregs[ESP_RINTR]); + break; + case ESP_CFG2: + ret = dev->rregs[ESP_CFG2] & 0x40; + esp_log("Read CFG2 Register=%02x.\n", ret); + break; default: ret = dev->rregs[saddr]; break; } - esp_log("Read reg %02x = %02x\n", saddr, ret); + esp_log("%04X:%08X: Read ESP reg%02x=%02x\n", CS, cpu_state.pc, saddr, ret); return ret; } @@ -1385,6 +1494,11 @@ esp_reg_write(esp_t *dev, uint32_t saddr, uint32_t val) break; case ESP_CMD: dev->rregs[ESP_CMD] = val; + if (!esp_cmd_is_valid(dev, dev->rregs[ESP_CMD])) { + dev->rregs[ESP_RSTAT] |= INTR_IL; + esp_raise_irq(dev); + break; + } if (val & CMD_DMA) { dev->dma = 1; @@ -1419,19 +1533,27 @@ esp_reg_write(esp_t *dev, uint32_t saddr, uint32_t val) esp_pci_soft_reset(dev); break; case CMD_BUSRESET: - for (uint8_t i = 0; i < 16; i++) - scsi_device_reset(&scsi_devices[dev->bus][i]); + esp_log("ESP Bus Reset val=%02x.\n", (dev->rregs[ESP_CFG1] & CFG1_RESREPT)); + if (dev->mca) { + esp_lower_irq(dev); + esp_hard_reset(dev); + } else + esp_pci_soft_reset(dev); - if (!(dev->wregs[ESP_CFG1] & CFG1_RESREPT)) { + for (uint8_t i = 0; i < 16; i++) { + scsi_device_reset(&scsi_devices[dev->bus][i]); + } + if (!(dev->rregs[ESP_CFG1] & CFG1_RESREPT)) { dev->rregs[ESP_RINTR] |= INTR_RST; esp_log("ESP Bus Reset with IRQ\n"); esp_raise_irq(dev); } break; case CMD_TI: - esp_log("Transfer Information val = %02X\n", val); + esp_log("Transfer Information val=%02X\n", val); break; case CMD_ICCS: + esp_log("ESP SCSI ICCS\n"); esp_write_response(dev); dev->rregs[ESP_RINTR] |= INTR_FC; dev->rregs[ESP_RSTAT] |= STAT_MI; @@ -1446,8 +1568,8 @@ esp_reg_write(esp_t *dev, uint32_t saddr, uint32_t val) handle_satn_stop(dev); break; case CMD_MSGACC: + dev->asc_mode = ESP_ASC_MODE_DIS; dev->rregs[ESP_RINTR] |= INTR_DC; - dev->rregs[ESP_RSEQ] = 0; dev->rregs[ESP_RFLAGS] = 0; esp_log("ESP SCSI MSGACC IRQ\n"); esp_raise_irq(dev); @@ -1463,7 +1585,7 @@ esp_reg_write(esp_t *dev, uint32_t saddr, uint32_t val) break; case CMD_ENSEL: dev->rregs[ESP_RINTR] = 0; - esp_log("ESP Enable Selection, do cmd = %d\n", dev->do_cmd); + esp_log("ESP Enable Selection.\n"); break; case CMD_DISSEL: dev->rregs[ESP_RINTR] = 0; @@ -1483,7 +1605,13 @@ esp_reg_write(esp_t *dev, uint32_t saddr, uint32_t val) case ESP_WSYNO: break; case ESP_CFG1: + dev->rregs[ESP_CFG1] = val; + esp_log("ESP CFG1=%02x.\n", val); + break; case ESP_CFG2: + dev->rregs[ESP_CFG2] = val & ~0x8f; + esp_log("ESP CFG2=%02x.\n", dev->rregs[ESP_CFG2]); + break; case ESP_CFG3: case ESP_RES3: case ESP_RES4: @@ -1502,9 +1630,12 @@ esp_reg_write(esp_t *dev, uint32_t saddr, uint32_t val) static void esp_pci_dma_memory_rw(esp_t *dev, uint8_t *buf, uint32_t len, int dir) { - uint32_t sg_pos = 0; uint32_t addr; int expected_dir; + int sg_pos = 0; + uint32_t DMALen; + uint32_t DMAPtr; + uint32_t WAC = 0; if (dev->dma_regs[DMA_CMD] & DMA_CMD_DIR) expected_dir = READ_FROM_DEVICE; @@ -1516,52 +1647,74 @@ esp_pci_dma_memory_rw(esp_t *dev, uint8_t *buf, uint32_t len, int dir) return; } - if (dev->dma_regs[DMA_CMD] & DMA_CMD_MDL) { - if (dev->dma_regs[DMA_STC]) { - if (dev->dma_regs[DMA_WBC] > len) - dev->dma_regs[DMA_WBC] = len; + if (dev->dma_regs[DMA_WBC] < len) + len = dev->dma_regs[DMA_WBC]; + + esp_log("DMA Length=%d.\n", len); + if (dev->dma_regs[DMA_CMD] & DMA_CMD_MDL) { + if (len) { + dma_bm_read(dev->dma_regs[DMA_WMAC], (uint8_t *)&DMAPtr, 4, 4); + dev->dma_regs[DMA_WAC] = DMAPtr | dev->dma_regs[DMA_SPA]; + DMALen = len; + WAC = dev->dma_regs[DMA_SPA]; + for (uint32_t i = 0; i < len; i += 4) { + if (WAC == 0) { + dma_bm_read(dev->dma_regs[DMA_WMAC], (uint8_t *)&DMAPtr, 4, 4); + dev->dma_regs[DMA_WAC] = DMAPtr; + } - esp_log("WAC MDL=%08x, STC=%d, ID=%d.\n", dev->dma_regs[DMA_WAC] | (dev->dma_regs[DMA_WMAC] & 0xff000), dev->dma_regs[DMA_STC], dev->id); - for (uint32_t i = 0; i < len; i++) { addr = dev->dma_regs[DMA_WAC]; - if (expected_dir) - dma_bm_write(addr | (dev->dma_regs[DMA_WMAC] & 0xff000), &buf[sg_pos], len, 4); - else - dma_bm_read(addr | (dev->dma_regs[DMA_WMAC] & 0xff000), &buf[sg_pos], len, 4); + esp_log("Data Buffer %s: length %d (%u), pointer 0x%04X\n", + expected_dir ? "read" : "write", len, len, addr); - sg_pos++; - dev->dma_regs[DMA_WBC]--; - dev->dma_regs[DMA_WAC]++; - - if (dev->dma_regs[DMA_WAC] & 0x1000) { - dev->dma_regs[DMA_WAC] = 0; - dev->dma_regs[DMA_WMAC] += 0x1000; + if (addr && DMALen) { + if (expected_dir) + dma_bm_write(addr, &buf[sg_pos], DMALen, 4); + else + dma_bm_read(addr, &buf[sg_pos], DMALen, 4); } + sg_pos += 4; + DMALen -= 4; + + /* update status registers */ + dev->dma_regs[DMA_WBC] -= 4; + dev->dma_regs[DMA_WAC] += 4; + WAC += 4; + if (WAC >= 0x1000) { + WAC = 0; + dev->dma_regs[DMA_WMAC] += 4; + } + + if (DMALen < 0) + DMALen = 0; + if (dev->dma_regs[DMA_WBC] <= 0) { dev->dma_regs[DMA_WBC] = 0; - dev->dma_regs[DMA_STAT] |= DMA_STAT_DONE; + break; } } } } else { - if (dev->dma_regs[DMA_WBC] < len) - len = dev->dma_regs[DMA_WBC]; + if (len) { + addr = dev->dma_regs[DMA_WAC]; - addr = dev->dma_regs[DMA_WAC]; + if (expected_dir) + dma_bm_write(addr, buf, len, 4); + else + dma_bm_read(addr, buf, len, 4); - if (expected_dir) - dma_bm_write(addr, buf, len, 4); - else - dma_bm_read(addr, buf, len, 4); + /* update status registers */ + dev->dma_regs[DMA_WBC] -= len; + dev->dma_regs[DMA_WAC] += len; + } + } - /* update status registers */ - dev->dma_regs[DMA_WBC] -= len; - dev->dma_regs[DMA_WAC] += len; - - if (dev->dma_regs[DMA_WBC] == 0) - dev->dma_regs[DMA_STAT] |= DMA_STAT_DONE; + esp_log("Finished count=%d.\n", dev->dma_regs[DMA_WBC]); + if (dev->dma_regs[DMA_WBC] == 0) { + esp_log("DMA transfer finished.\n"); + dev->dma_regs[DMA_STAT] |= DMA_STAT_DONE; } } @@ -1574,13 +1727,13 @@ esp_pci_dma_read(esp_t *dev, uint16_t saddr) if (saddr == DMA_STAT) { if (!(dev->sbac & SBAC_STATUS)) { - dev->dma_regs[DMA_STAT] &= ~(DMA_STAT_ERROR | DMA_STAT_ABORT | DMA_STAT_DONE); + dev->dma_regs[DMA_STAT] &= ~(DMA_STAT_PWDN | DMA_STAT_ERROR | DMA_STAT_ABORT | DMA_STAT_DONE); esp_log("ESP PCI DMA Read done cleared\n"); esp_pci_update_irq(dev); } } - esp_log("ESP PCI DMA Read regs addr = %04x, temp = %06x\n", saddr, ret); + esp_log("ESP PCI DMA Read regs addr=%04x, ret=%06x, STAT=%02x\n", saddr, ret, dev->dma_regs[DMA_STAT]); return ret; } @@ -1595,8 +1748,8 @@ esp_pci_dma_write(esp_t *dev, uint16_t saddr, uint32_t val) esp_log("ESP PCI DMA Write CMD = %02x\n", val & DMA_CMD_MASK); switch (val & DMA_CMD_MASK) { case 0: /*IDLE*/ + esp_log("IDLE/NOP\n"); esp_dma_enable(dev, 0); - esp_log("PCI DMA disable\n"); break; case 1: /*BLAST*/ dev->dma_regs[DMA_STAT] |= DMA_STAT_BCMBLT; @@ -1605,12 +1758,12 @@ esp_pci_dma_write(esp_t *dev, uint16_t saddr, uint32_t val) scsi_device_command_stop(&scsi_devices[dev->bus][dev->id]); break; case 3: /*START*/ + dev->dma_regs[DMA_WBC] = dev->dma_regs[DMA_STC]; dev->dma_regs[DMA_WAC] = dev->dma_regs[DMA_SPA]; - dev->dma_regs[DMA_WMAC] = dev->dma_regs[DMA_SMDLA] & 0xfffffffc; - if (!dev->dma_regs[DMA_STC]) - dev->dma_regs[DMA_STC] = 0x1000000; - dev->dma_regs[DMA_WBC] = dev->dma_regs[DMA_STC]; + if (val & DMA_CMD_MDL) + dev->dma_regs[DMA_WMAC] = dev->dma_regs[DMA_SMDLA] & 0xfffffffc; + dev->dma_regs[DMA_STAT] &= ~(DMA_STAT_BCMBLT | DMA_STAT_SCSIINT | DMA_STAT_DONE | DMA_STAT_ABORT | DMA_STAT_ERROR | DMA_STAT_PWDN); esp_dma_enable(dev, 1); esp_log("PCI DMA enable, MDL bit=%02x, SPA=%08x, SMDLA=%08x, STC=%d, ID=%d, SCSICMD=%02x.\n", val & DMA_CMD_MDL, dev->dma_regs[DMA_SPA], dev->dma_regs[DMA_SMDLA], dev->dma_regs[DMA_STC], dev->id, dev->cmdfifo.data[1]); @@ -1685,7 +1838,7 @@ esp_io_pci_read(esp_t *dev, uint32_t addr, unsigned int size) } else if (addr == 0x70) { /* DMA SCSI Bus and control */ ret = dev->sbac; - esp_log("ESP PCI SBAC read = %02x\n", ret); + esp_log("ESP PCI SBAC read=%08x\n", ret); } else { /* Invalid region */ ret = 0; @@ -1695,7 +1848,11 @@ esp_io_pci_read(esp_t *dev, uint32_t addr, unsigned int size) ret >>= (addr & 3) * 8; ret &= ~(~(uint64_t) 0 << (8 * size)); - esp_log("ESP PCI I/O read: addr = %02x, val = %02x\n", addr, ret); + if (addr == 0x70) + esp_log("%04X:%08X: SBAC PCI I/O read: addr=%02x, val=%02x\n", CS, cpu_state.pc, addr, ret); + else + esp_log("%04X:%08X: ESP PCI I/O read: addr=%02x, val=%02x\n", CS, cpu_state.pc, addr, ret); + return ret; } @@ -1740,6 +1897,7 @@ esp_io_pci_write(esp_t *dev, uint32_t addr, uint32_t val, unsigned int size) esp_pci_dma_write(dev, (addr - 0x40) >> 2, val); } else if (addr == 0x70) { /* DMA SCSI Bus and control */ + esp_log("ESP PCI SBAC write=%08x\n", val); dev->sbac = val; } } @@ -2015,7 +2173,7 @@ esp_pci_read(UNUSED(int func), int addr, void *priv) { esp_t *dev = (esp_t *) priv; - // esp_log("ESP PCI: Reading register %02X\n", addr & 0xff); + esp_log("ESP PCI: Reading register %02X\n", addr & 0xff); switch (addr) { case 0x00: @@ -2044,13 +2202,15 @@ esp_pci_read(UNUSED(int func), int addr, void *priv) case 0x07: return esp_pci_regs[0x07] | 0x02; case 0x08: - return 0x10; /*Revision ID*/ + return (dev->local == 1) ? 0 : 0x10; /*Revision ID*/ case 0x09: return 0; /*Programming interface*/ case 0x0A: return 0; /*devubclass*/ case 0x0B: return 1; /*Class code*/ + case 0x0C: + return esp_pci_regs[0x0c]; case 0x0E: return 0; /*Header type */ case 0x10: @@ -2081,9 +2241,11 @@ esp_pci_read(UNUSED(int func), int addr, void *priv) return dev->irq; case 0x3D: return PCI_INTA; - + case 0x3E: + return 0x04; + case 0x3F: + return 0x28; case 0x40 ... 0x4f: - esp_log("ESP PCI: Read value %02X to register %02X, ID=%d\n", esp_pci_regs[addr], addr, dev->id); return esp_pci_regs[addr]; default: @@ -2101,7 +2263,7 @@ esp_pci_write(UNUSED(int func), int addr, uint8_t val, void *priv) int eesk; int eedi; - // esp_log("ESP PCI: Write value %02X to register %02X\n", val, addr); + esp_log("%04X:%08X: ESP PCI: Write value %02X to register %02X\n", CS, cpu_state.pc, val, addr); if (!dev->local) { if ((addr >= 0x80) && (addr <= 0xFF)) { @@ -2142,6 +2304,10 @@ esp_pci_write(UNUSED(int func), int addr, uint8_t val, void *priv) esp_pci_regs[addr] &= ~(val & 0xf9); break; + case 0x0c: + esp_pci_regs[addr] = val; + break; + case 0x10: case 0x11: case 0x12: @@ -2192,7 +2358,6 @@ esp_pci_write(UNUSED(int func), int addr, uint8_t val, void *priv) return; case 0x40 ... 0x4f: - esp_log("ESP PCI: Write value %02X to register %02X, ID=%i.\n", val, addr, dev->id); esp_pci_regs[addr] = val; return; @@ -2201,10 +2366,31 @@ esp_pci_write(UNUSED(int func), int addr, uint8_t val, void *priv) } } +static void +esp_pci_reset(void *priv) +{ + esp_t *dev = (esp_t *) priv; + + timer_disable(&dev->timer); + + reset_state.bios.mapping = dev->bios.mapping; + + reset_state.timer = dev->timer; + + reset_state.pci_slot = dev->pci_slot; + + memcpy(dev, &reset_state, sizeof(esp_t)); + + esp_pci_soft_reset(dev); +} + static void * -dc390_init(UNUSED(const device_t *info)) +dc390_init(const device_t *info) { esp_t *dev = calloc(1, sizeof(esp_t)); + const char *bios_rev = NULL; + uint32_t mask = 0; + uint32_t size = 0x8000; dev->bus = scsi_get_bus(); @@ -2224,11 +2410,18 @@ dc390_init(UNUSED(const device_t *info)) dev->has_bios = device_get_config_int("bios"); if (dev->has_bios) { - dev->BIOSBase = 0xd0000; + dev->BIOSBase = 0xc8000; if (dev->local) { - ;//rom_init(&dev->bios, AM53C974_ROM, 0xd0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL); + bios_rev = (char *) device_get_config_bios("bios_rev"); + dev->bios_path = (char *) device_get_bios_file(info, bios_rev, 0); + if (!strcmp(bios_rev, "v3_43")) + mask = 0x4000; + else if (!strcmp(bios_rev, "v3_01_amd")) + size = 0x4000; + + rom_init(&dev->bios, dev->bios_path, dev->BIOSBase, size, size - 1, mask, MEM_MAPPING_EXTERNAL); } else - rom_init(&dev->bios, DC390_ROM, 0xd0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL); + rom_init(&dev->bios, DC390_ROM, dev->BIOSBase, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL); } /* Enable our BIOS space in PCI, if needed. */ @@ -2248,13 +2441,16 @@ dc390_init(UNUSED(const device_t *info)) } esp_pci_hard_reset(dev); - for (uint8_t i = 0; i < 16; i++) + for (uint8_t i = 0; i < 16; i++) { scsi_device_reset(&scsi_devices[dev->bus][i]); + } timer_add(&dev->timer, esp_callback, dev, 0); scsi_bus_set_speed(dev->bus, 10000000.0); + memcpy(&reset_state, dev, sizeof(esp_t)); + return dev; } @@ -2436,7 +2632,7 @@ ncr53c9x_mca_init(const device_t *info) timer_add(&dev->timer, esp_callback, dev, 0); - scsi_bus_set_speed(dev->bus, 5000000.0); + scsi_bus_set_speed(dev->bus, 10000000.0); return dev; } @@ -2472,6 +2668,118 @@ static const device_config_t bios_enable_config[] = { // clang-format on }; +static const device_config_t am53c974_bios_enable_config[] = { + // clang-format off + { + .name = "bios_rev", + .description = "BIOS Revision", + .type = CONFIG_BIOS, + .default_string = "v3_01_amd", + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .bios = { + { + .name = "Version 3.01 (AMD)", + .internal_name = "v3_01_amd", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 16384, + .files = { AM53C974_3_01_AMD_ROM, "" } + }, + { .files_no = 0 } + }, + }, + { + .name = "bios", + .description = "Enable BIOS", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +static const device_config_t am53c974a_bios_enable_config[] = { + // clang-format off + { + .name = "bios_rev", + .description = "BIOS Revision", + .type = CONFIG_BIOS, + .default_string = "v3_01_amd", + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .bios = { + { + .name = "Version 3.01 (AMD)", + .internal_name = "v3_01_amd", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 16384, + .files = { AM53C974_3_01_AMD_ROM, "" } + }, + { + .name = "Version 3.43 (Dawicontrol)", + .internal_name = "v3_43", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 32768, + .files = { AM53C974_3_43_ROM, "" } + }, + { + .name = "Version 4.00 (Dawicontrol)", + .internal_name = "v4_00", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 32768, + .files = { AM53C974_4_00_ROM, "" } + }, + { + .name = "Version 5.00 (Dawicontrol)", + .internal_name = "v5_00", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 32768, + .files = { AM53C974_5_00_ROM, "" } + }, + { + .name = "Version 5.11 (Dawicontrol)", + .internal_name = "v5_11", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 32768, + .files = { AM53C974_5_11_ROM, "" } + }, + { .files_no = 0 } + }, + }, + { + .name = "bios", + .description = "Enable BIOS", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + const device_t dc390_pci_device = { .name = "Tekram DC-390 PCI", .internal_name = "dc390", @@ -2479,7 +2787,7 @@ const device_t dc390_pci_device = { .local = 0, .init = dc390_init, .close = esp_close, - .reset = NULL, + .reset = esp_pci_reset, .available = NULL, .speed_changed = NULL, .force_redraw = NULL, @@ -2487,17 +2795,31 @@ const device_t dc390_pci_device = { }; const device_t am53c974_pci_device = { - .name = "AMD 53c974A PCI", + .name = "AMD 53c974 PCI", .internal_name = "am53c974", .flags = DEVICE_PCI, .local = 1, .init = dc390_init, .close = esp_close, - .reset = NULL, + .reset = esp_pci_reset, .available = NULL, .speed_changed = NULL, .force_redraw = NULL, - .config = NULL + .config = am53c974_bios_enable_config +}; + +const device_t am53c974a_pci_device = { + .name = "AMD 53c974A PCI", + .internal_name = "am53c974a", + .flags = DEVICE_PCI, + .local = 2, + .init = dc390_init, + .close = esp_close, + .reset = esp_pci_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = am53c974a_bios_enable_config }; const device_t ncr53c90a_mca_device = { diff --git a/src/scsi/scsi_t128.c b/src/scsi/scsi_t128.c index c5a1c4e67..e2f963900 100644 --- a/src/scsi/scsi_t128.c +++ b/src/scsi/scsi_t128.c @@ -548,7 +548,7 @@ t128_available(void) static const device_config_t t128_config[] = { { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xD8000, diff --git a/src/sio/CMakeLists.txt b/src/sio/CMakeLists.txt index 6106871bc..b2ca643cf 100644 --- a/src/sio/CMakeLists.txt +++ b/src/sio/CMakeLists.txt @@ -16,28 +16,30 @@ # add_library(sio OBJECT + sio_82091aa.c + sio_90c50.c sio_acc3221.c sio_ali5123.c + sio_cbm_io.c + sio_gm82c803ab.c + sio_gm82c803c.c + sio_f82c606.c sio_f82c710.c - sio_82091aa.c sio_fdc37c6xx.c sio_fdc37c67x.c sio_fdc37c669.c sio_fdc37c93x.c sio_fdc37m60x.c sio_it86x1f.c + sio_pc87310.c + sio_pc873xx.c sio_pc87306.c sio_pc87307.c sio_pc87309.c - sio_pc87310.c - sio_pc87311.c - sio_pc87332.c - sio_prime3b.c - sio_prime3c.c - sio_w83787f.c - sio_w83877f.c - sio_w83977f.c - sio_um8663f.c + sio_w837x7.c + sio_w83877.c + sio_w83977.c + sio_um866x.c sio_um8669f.c sio_vl82c113.c sio_vt82c686.c diff --git a/src/sio/sio_82091aa.c b/src/sio/sio_82091aa.c index 71f8749f2..cfe33df12 100644 --- a/src/sio/sio_82091aa.c +++ b/src/sio/sio_82091aa.c @@ -42,6 +42,7 @@ typedef struct i82091aa_t { uint16_t base_address; fdc_t *fdc; serial_t *uart[2]; + lpt_t *lpt; } i82091aa_t; static void @@ -53,11 +54,36 @@ fdc_handler(i82091aa_t *dev) } static void -lpt1_handler(i82091aa_t *dev) +lpt_handler(i82091aa_t *dev) { uint16_t lpt_port = LPT1_ADDR; + int enable = (dev->regs[0x20] & 0x01); - lpt1_remove(); + lpt_port_remove(dev->lpt); + + lpt_set_fifo_threshold(dev->lpt, (dev->regs[0x20] & 0x80) ? 15 : 8); + + switch (dev->regs[0x20] & 0x60) { + default: + case 0x00: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + case 0x20: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 1); + break; + case 0x40: + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + case 0x60: + enable = 0; + break; + } switch ((dev->regs[0x20] >> 1) & 0x03) { case 0x00: @@ -77,10 +103,10 @@ lpt1_handler(i82091aa_t *dev) break; } - if ((dev->regs[0x20] & 0x01) && lpt_port) - lpt1_setup(lpt_port); + if (enable && lpt_port) + lpt_port_setup(dev->lpt, lpt_port); - lpt1_irq((dev->regs[0x20] & 0x08) ? LPT1_IRQ : LPT2_IRQ); + lpt_port_irq(dev->lpt, (dev->regs[0x20] & 0x08) ? LPT1_IRQ : LPT2_IRQ); } static void @@ -175,8 +201,8 @@ i82091aa_write(uint16_t port, uint8_t val, void *priv) break; case 0x20: *reg = (val & 0xef); - if (valxor & 0x07) - lpt1_handler(dev); + if (valxor & 0xe8) + lpt_handler(dev); break; case 0x21: *reg = (val & 0x2f); @@ -217,6 +243,8 @@ i82091aa_read(uint16_t port, void *priv) if (index) ret = dev->cur_reg; + else if (dev->cur_reg == 0x20) + ret = dev->regs[dev->cur_reg] | lpt_read_ecp_mode(dev->lpt); else if (dev->cur_reg < 0x51) ret = dev->regs[dev->cur_reg]; @@ -236,7 +264,7 @@ i82091aa_reset(i82091aa_t *dev) fdc_reset(dev->fdc); fdc_handler(dev); - lpt1_handler(dev); + lpt_handler(dev); serial_handler(dev, 0); serial_handler(dev, 1); serial_set_clock_src(dev->uart[0], (24000000.0 / 13.0)); @@ -264,6 +292,11 @@ i82091aa_init(const device_t *info) dev->uart[0] = device_add_inst(&ns16550_device, 1); dev->uart[1] = device_add_inst(&ns16550_device, 2); + dev->lpt = device_add_inst(&lpt_port_device, 1); + + lpt_set_cnfga_readout(dev->lpt, 0x90); + lpt_set_cnfgb_readout(dev->lpt, 0x00); + dev->has_ide = (info->local >> 9) & 0x03; i82091aa_reset(dev); @@ -285,63 +318,7 @@ const device_t i82091aa_device = { .name = "Intel 82091AA Super I/O", .internal_name = "i82091aa", .flags = 0, - .local = 0x40, - .init = i82091aa_init, - .close = i82091aa_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t i82091aa_26e_device = { - .name = "Intel 82091AA Super I/O (Port 26Eh)", - .internal_name = "i82091aa_26e", - .flags = 0, - .local = 0x140, - .init = i82091aa_init, - .close = i82091aa_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t i82091aa_398_device = { - .name = "Intel 82091AA Super I/O (Port 398h)", - .internal_name = "i82091aa_398", - .flags = 0, - .local = 0x148, - .init = i82091aa_init, - .close = i82091aa_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t i82091aa_ide_pri_device = { - .name = "Intel 82091AA Super I/O (With Primary IDE)", - .internal_name = "i82091aa_ide", - .flags = 0, - .local = 0x240, - .init = i82091aa_init, - .close = i82091aa_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t i82091aa_ide_device = { - .name = "Intel 82091AA Super I/O (With IDE)", - .internal_name = "i82091aa_ide", - .flags = 0, - .local = 0x440, + .local = 0, .init = i82091aa_init, .close = i82091aa_close, .reset = NULL, diff --git a/src/sio/sio_90c50.c b/src/sio/sio_90c50.c new file mode 100644 index 000000000..5e7f19b6f --- /dev/null +++ b/src/sio/sio_90c50.c @@ -0,0 +1,266 @@ +/* + * 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. + * + * Emulation of the Dataworld 90C50 (COMBAT) Super I/O chip. + * + * Authors: Miran Grca, + * + * Copyright 2020-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include <86box/io.h> +#include <86box/timer.h> +#include <86box/device.h> +#include <86box/lpt.h> +#include <86box/mem.h> +#include <86box/nvr.h> +#include <86box/pci.h> +#include <86box/rom.h> +#include <86box/serial.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/sio.h> +#include <86box/plat_unused.h> + +#ifdef ENABLE_90C50_LOG +int dw90c50_do_log = ENABLE_90C50_LOG; + +static void +dw90c50_log(const char *fmt, ...) +{ + va_list ap; + + if (dw90c50_do_log) { + va_start(ap, fmt); + pclog_ex(fmt, ap); + va_end(ap); + } +} +#else +# define dw90c50_log(fmt, ...) +#endif + +typedef struct dw90c50_t { + uint8_t flags; + uint8_t reg; + fdc_t *fdc; + serial_t *uart[2]; + lpt_t *lpt; +} dw90c50_t; + +static void +lpt_handler(dw90c50_t *dev) +{ + int temp; + uint16_t lpt_port = LPT1_ADDR; + uint8_t lpt_irq = LPT1_IRQ; + + /* bits 0-1: + * 00 378h + * 01 3bch + * 10 278h + * 11 disabled + */ + temp = (dev->reg & 0x06) >> 1; + + lpt_port_remove(dev->lpt); + + switch (temp) { + case 0x00: + lpt_port = 0x000; + lpt_irq = 0xff; + break; + case 0x01: + lpt_port = LPT_MDA_ADDR; + break; + case 0x02: + lpt_port = LPT1_ADDR; + break; + case 0x03: + lpt_port = LPT2_ADDR; + break; + + default: + break; + } + + if (lpt_port) + lpt_port_setup(dev->lpt, lpt_port); + + lpt_port_irq(dev->lpt, lpt_irq); +} + +static void +serial_handler(dw90c50_t *dev) +{ + uint16_t base1 = 0x0000, base2 = 0x0000; + uint8_t irq1, irq2; + + serial_remove(dev->uart[0]); + serial_remove(dev->uart[1]); + + switch ((dev->reg >> 3) & 0x07) { + case 0x0001: + base1 = 0x03f8; + break; + case 0x0002: + base2 = 0x02f8; + break; + case 0x0003: + base1 = 0x03f8; + base2 = 0x02f8; + break; + case 0x0004: + base1 = 0x03e8; + base2 = 0x02e8; + break; + case 0x0006: + base2 = 0x03f8; + break; + case 0x0007: + base1 = 0x02f8; + base2 = 0x03f8; + break; + } + + irq1 = (base1 & 0x0100) ? COM1_IRQ : COM2_IRQ; + irq2 = (base2 & 0x0100) ? COM1_IRQ : COM2_IRQ; + + if (base1 != 0x0000) + serial_setup(dev->uart[0], base1, irq1); + + if (base2 != 0x0000) + serial_setup(dev->uart[0], base2, irq2); +} + +static void +dw90c50_write(UNUSED(uint16_t port), uint8_t val, void *priv) +{ + dw90c50_t *dev = (dw90c50_t *) priv; + uint8_t valxor; + + dw90c50_log("[%04X:%08X] [W] %02X = %02X (%i)\n", CS, cpu_state.pc, port, val, dev->tries); + + /* Second write to config register. */ + valxor = val ^ dev->reg; + dev->reg = val; + + dw90c50_log("SIO: Register written %02X\n", val); + + /* Reconfigure floppy disk controller. */ + if (valxor & 0x01) { + dw90c50_log("SIO: FDC disabled\n"); + fdc_remove(dev->fdc); + /* Bit 0: 1 = Enable FDC. */ + if (val & 0x01) { + dw90c50_log("SIO: FDC enabled\n"); + fdc_set_base(dev->fdc, FDC_PRIMARY_ADDR); + } + } + + /* Reconfigure parallel port. */ + if (valxor & 0x06) + lpt_handler(dev); + + /* Reconfigure serial ports. */ + if (valxor & 0x38) + serial_handler(dev); + + /* Reconfigure IDE controller. */ + if ((dev->flags & PCX73XX_IDE) && (valxor & 0x40)) { + dw90c50_log("SIO: HDC disabled\n"); + ide_pri_disable(); + /* Bit 6: 1 = Enable IDE controller. */ + if (val & 0x40) { + dw90c50_log("SIO: HDC enabled\n"); + ide_set_base(0, 0x1f0); + ide_set_side(0, 0x3f6); + ide_pri_enable(); + } + } +} + +uint8_t +dw90c50_read(UNUSED(uint16_t port), void *priv) +{ + dw90c50_t *dev = (dw90c50_t *) priv; + uint8_t ret = 0xff; + + ret = dev->reg; + + dw90c50_log("[%04X:%08X] [R] %02X = %02X\n", CS, cpu_state.pc, port, ret); + + return ret; +} + +void +dw90c50_reset(dw90c50_t *dev) +{ + fdc_reset(dev->fdc); + + dev->reg = 0x62; + dw90c50_write(0x03f3, 0x9d, dev); +} + +static void +dw90c50_close(void *priv) +{ + dw90c50_t *dev = (dw90c50_t *) priv; + + free(dev); +} + +static void * +dw90c50_init(const device_t *info) +{ + dw90c50_t *dev = (dw90c50_t *) calloc(1, sizeof(dw90c50_t)); + + /* Avoid conflicting with machines that make no use of the 90C50 Internal IDE */ + dev->flags = info->local; + + dev->fdc = device_add(&fdc_at_nsc_device); + + dev->uart[0] = device_add_inst(&ns16450_device, 1); + dev->uart[1] = device_add_inst(&ns16450_device, 2); + + dev->lpt = device_add_inst(&lpt_port_device, 1); + lpt_set_ext(dev->lpt, 1); + + if (dev->flags & DW90C50_IDE) + device_add(&ide_isa_device); + + dw90c50_reset(dev); + + io_sethandler(0x03f3, 0x0001, + dw90c50_read, NULL, NULL, dw90c50_write, NULL, NULL, dev); + + return dev; +} + +const device_t dw90c50_device = { + .name = "National Semiconductor 90C50 Super I/O", + .internal_name = "90c50", + .flags = 0, + .local = 0, + .init = dw90c50_init, + .close = dw90c50_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/sio/sio_acc3221.c b/src/sio/sio_acc3221.c index 203b1c1f1..c9cb8b6cf 100644 --- a/src/sio/sio_acc3221.c +++ b/src/sio/sio_acc3221.c @@ -38,6 +38,7 @@ typedef struct acc3221_t { uint8_t regs[256]; fdc_t *fdc; serial_t *uart[2]; + lpt_t *lpt; } acc3221_t; /* Configuration Register Index, BE (R/W): @@ -302,10 +303,10 @@ typedef struct acc3221_t { static void acc3221_lpt_handle(acc3221_t *dev) { - lpt1_remove(); + lpt_port_remove(dev->lpt); if (!(dev->regs[0xbe] & REG_BE_LPT1_DISABLE)) - lpt1_setup(dev->regs[0xbf] << 2); + lpt_port_setup(dev->lpt, dev->regs[0xbf] << 2); } static void @@ -436,9 +437,10 @@ acc3221_reset(acc3221_t *dev) serial_remove(dev->uart[1]); serial_setup(dev->uart[1], COM2_ADDR, COM2_IRQ); - lpt1_remove(); - lpt1_setup(LPT1_ADDR); - lpt1_irq(LPT1_IRQ); + lpt_port_remove(dev->lpt); + lpt_port_setup(dev->lpt, LPT1_ADDR); + + lpt_port_irq(dev->lpt, LPT1_IRQ); fdc_reset(dev->fdc); } @@ -461,6 +463,8 @@ acc3221_init(UNUSED(const device_t *info)) dev->uart[0] = device_add_inst(&ns16450_device, 1); dev->uart[1] = device_add_inst(&ns16450_device, 2); + dev->lpt = device_add_inst(&lpt_port_device, 1); + io_sethandler(0x00f2, 0x0002, acc3221_read, NULL, NULL, acc3221_write, NULL, NULL, dev); acc3221_reset(dev); diff --git a/src/sio/sio_ali5123.c b/src/sio/sio_ali5123.c index 7dc522b30..5dad42252 100644 --- a/src/sio/sio_ali5123.c +++ b/src/sio/sio_ali5123.c @@ -47,6 +47,7 @@ typedef struct ali5123_t { int cur_reg; fdc_t *fdc; serial_t *uart[3]; + lpt_t *lpt; } ali5123_t; static void ali5123_write(uint16_t port, uint8_t val, void *priv); @@ -81,13 +82,15 @@ ali5123_fdc_handler(ali5123_t *dev) static void ali5123_lpt_handler(ali5123_t *dev) { - uint16_t ld_port = 0x0000; - uint16_t mask = 0xfffc; - uint8_t global_enable = !(dev->regs[0x22] & (1 << 3)); - uint8_t local_enable = !!dev->ld_regs[3][0x30]; - uint8_t lpt_irq = dev->ld_regs[3][0x70]; - uint8_t lpt_dma = dev->ld_regs[3][0x74]; - uint8_t lpt_mode = dev->ld_regs[3][0xf0] & 0x07; + uint16_t ld_port = 0x0000; + uint16_t mask = 0xfffc; + uint8_t global_enable = !(dev->regs[0x22] & (1 << 3)); + uint8_t local_enable = !!dev->ld_regs[3][0x30]; + uint8_t lpt_irq = dev->ld_regs[3][0x70]; + uint8_t lpt_dma = dev->ld_regs[3][0x74]; + uint8_t lpt_mode = dev->ld_regs[3][0xf0] & 0x07; + uint8_t irq_readout[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x08, + 0x00, 0x10, 0x18, 0x20, 0x00, 0x28, 0x30, 0x00 }; if (lpt_irq > 15) lpt_irq = 0xff; @@ -95,47 +98,50 @@ ali5123_lpt_handler(ali5123_t *dev) if (lpt_dma >= 4) lpt_dma = 0xff; - lpt1_remove(); - lpt_set_fifo_threshold(0, (dev->ld_regs[3][0xf0] & 0x78) >> 3); + lpt_port_remove(dev->lpt); + lpt_set_fifo_threshold(dev->lpt, (dev->ld_regs[3][0xf0] & 0x78) >> 3); if ((lpt_mode == 0x04) && (dev->ld_regs[3][0xf1] & 0x80)) lpt_mode = 0x00; switch (lpt_mode) { default: case 0x04: - lpt_set_epp(0, 0); - lpt_set_ecp(0, 0); - lpt_set_ext(0, 0); + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); break; case 0x00: - lpt_set_epp(0, 0); - lpt_set_ecp(0, 0); - lpt_set_ext(0, 1); + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 1); break; case 0x01: case 0x05: mask = 0xfff8; - lpt_set_epp(0, 1); - lpt_set_ecp(0, 0); - lpt_set_ext(0, 0); + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); break; case 0x02: - lpt_set_epp(0, 0); - lpt_set_ecp(0, 1); - lpt_set_ext(0, 0); + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); break; case 0x03: case 0x07: mask = 0xfff8; - lpt_set_epp(0, 1); - lpt_set_ecp(0, 1); - lpt_set_ext(0, 0); + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); break; } if (global_enable && local_enable) { ld_port = (make_port(dev, 3) & 0xfffc) & mask; if ((ld_port >= 0x0100) && (ld_port <= (0x0ffc & mask))) - lpt1_setup(ld_port); + lpt_port_setup(dev->lpt, ld_port); } - lpt1_irq(lpt_irq); - lpt_port_dma(0, lpt_dma); + lpt_port_irq(dev->lpt, lpt_irq); + lpt_port_dma(dev->lpt, lpt_dma); + + lpt_set_cnfgb_readout(dev->lpt, ((lpt_irq > 15) ? 0x00 : irq_readout[lpt_irq]) | + ((lpt_dma >= 4) ? 0x00 : lpt_dma)); } static void @@ -515,6 +521,7 @@ ali5123_init(const device_t *info) dev->uart[0] = device_add_inst(&ns16550_device, 1); dev->uart[1] = device_add_inst(&ns16550_device, 2); dev->uart[2] = device_add_inst(&ns16550_device, 3); + dev->lpt = device_add_inst(&lpt_port_device, 1); dev->chip_id = info->local & 0xff; @@ -523,7 +530,7 @@ ali5123_init(const device_t *info) io_sethandler(FDC_PRIMARY_ADDR, 0x0002, ali5123_read, NULL, NULL, ali5123_write, NULL, NULL, dev); - device_add(&keyboard_ps2_ali_pci_device); + device_add_params(&kbc_at_device, (void *) KBC_VEN_ALI); return dev; } diff --git a/src/sio/sio_cbm_io.c b/src/sio/sio_cbm_io.c new file mode 100644 index 000000000..477c30a44 --- /dev/null +++ b/src/sio/sio_cbm_io.c @@ -0,0 +1,112 @@ +/* + * 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. + * + * Implementation of the ACC 3221-SP Super I/O Chip. + * + * + * + * Authors: Sarah Walker, + * + * Copyright 2019 Sarah Walker. + */ +#include +#include +#include +#include +#include +#include <86box/86box.h> +#include <86box/io.h> +#include <86box/timer.h> +#include <86box/device.h> +#include <86box/pci.h> +#include <86box/lpt.h> +#include <86box/serial.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/sio.h> +#include <86box/plat_unused.h> + +typedef struct cbm_io_t { + serial_t *uart; + lpt_t *lpt; +} cbm_io_t; + +static void +cbm_io_write(UNUSED(uint16_t port), uint8_t val, void *priv) +{ + cbm_io_t *dev = (cbm_io_t *) priv; + + lpt_port_remove(dev->lpt); + + switch (val & 0x03) { + case 0x01: + lpt_port_setup(dev->lpt, LPT_MDA_ADDR); + break; + case 0x02: + lpt_port_setup(dev->lpt, LPT1_ADDR); + break; + case 0x03: + lpt_port_setup(dev->lpt, LPT2_ADDR); + break; + + default: + break; + } + + switch (val & 0x0c) { + case 0x04: + serial_setup(dev->uart, COM2_ADDR, COM2_IRQ); + break; + case 0x08: + serial_setup(dev->uart, COM1_ADDR, COM1_IRQ); + break; + + default: + break; + } +} + +static void +cbm_io_close(void *priv) +{ + cbm_io_t *dev = (cbm_io_t *) priv; + + free(dev); +} + +static void * +cbm_io_init(UNUSED(const device_t *info)) +{ + cbm_io_t *dev = (cbm_io_t *) calloc(1, sizeof(cbm_io_t)); + + dev->uart = device_add_inst(&ns16450_device, 1); + + dev->lpt = device_add_inst(&lpt_port_device, 1); + + io_sethandler(0x0230, 0x0001, + NULL, NULL, NULL, cbm_io_write, NULL, NULL, + dev); + + return dev; +} + +const device_t cbm_io_device = { + .name = "Commodore CBM I/O", + .internal_name = "cbm_io", + .flags = 0, + .local = 0, + .init = cbm_io_init, + .close = cbm_io_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/sio/sio_f82c606.c b/src/sio/sio_f82c606.c new file mode 100644 index 000000000..1e6eacccc --- /dev/null +++ b/src/sio/sio_f82c606.c @@ -0,0 +1,329 @@ +/* + * 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. + * + * Implementation of the Chips & Technologies 82C606 CHIPSpak + * Multifunction Controller. + * + * Relevant literature: + * + * [1] Chips and Technologies, Inc., + * 82C605/82C606 CHIPSpak/CHIPSport MULTIFUNCTION CONTROLLERS, + * PRELIMINARY Data Sheet, Revision 1, May 1987. + * + * + * Authors: Eluan Costa Miranda, + * Lubomir Rintel, + * Miran Grca, + * + * Copyright 2020-2025 Eluan Costa Miranda. + * Copyright 2021-2025 Lubomir Rintel. + * Copyright 2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#include <86box/86box.h> +#include <86box/io.h> +#include <86box/timer.h> +#include <86box/device.h> +#include <86box/lpt.h> +#include <86box/serial.h> +#include <86box/gameport.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/nvr.h> +#include <86box/sio.h> +#include <86box/machine.h> + +typedef struct upc_t { + int configuration_state; /* state of algorithm to enter configuration mode */ + int configuration_mode; + uint16_t cri_addr; /* cri = configuration index register, addr is even */ + uint16_t cap_addr; /* cap = configuration access port, addr is odd and is cri_addr + 1 */ + uint8_t cri; /* currently indexed register */ + uint8_t last_write; + + /* these regs are not affected by reset */ + uint8_t regs[15]; /* there are 16 indexes, but there is no need to store the last one which is: R = cri_addr / 4, W = exit config mode */ + nvr_t *nvr; + void *gameport; + serial_t *uart[2]; + lpt_t *lpt; +} upc_t; + +#ifdef ENABLE_F82C606_LOG +int f82c606_do_log = ENABLE_F82C606_LOG; + +static void +f82c606_log(const char *fmt, ...) +{ + va_list ap; + + if (f82c606_do_log) { + va_start(ap, fmt); + pclog_ex(fmt, ap); + va_end(ap); + } +} +#else +# define f82c606_log(fmt, ...) +#endif + +static void +f82c606_update_ports(upc_t *dev, int set) +{ + uint8_t uart1_int = 0xff; + uint8_t uart2_int = 0xff; + uint8_t lpt_int = 0xff; + int nvr_int = -1; + + serial_remove(dev->uart[0]); + serial_remove(dev->uart[1]); + lpt_port_remove(dev->lpt); + + nvr_at_handler(0, ((uint16_t) dev->regs[3]) << 2, dev->nvr); + nvr_at_handler(0, 0x70, dev->nvr); + + gameport_remap(dev->gameport, 0); + + if (!set) + return; + + switch (dev->regs[8] & 0xc0) { + case 0x40: + nvr_int = 3; + break; + case 0x80: + uart1_int = COM2_IRQ; + break; + case 0xc0: + uart2_int = COM2_IRQ; + break; + + default: + break; + } + + switch (dev->regs[8] & 0x30) { + case 0x10: + nvr_int = 4; + break; + case 0x20: + uart1_int = COM1_IRQ; + break; + case 0x30: + uart2_int = COM1_IRQ; + break; + + default: + break; + } + + switch (dev->regs[8] & 0x0c) { + case 0x04: + nvr_int = 5; + break; + case 0x08: + uart1_int = 5; + break; + case 0x0c: + lpt_int = LPT2_IRQ; + break; + + default: + break; + } + + switch (dev->regs[8] & 0x03) { + case 0x01: + nvr_int = 7; + break; + case 0x02: + uart2_int = 7; + break; + case 0x03: + lpt_int = LPT1_IRQ; + break; + + default: + break; + } + + if (dev->regs[0] & 1) { + gameport_remap(dev->gameport, ((uint16_t) dev->regs[7]) << 2); + f82c606_log("Game port at %04X\n", ((uint16_t) dev->regs[7]) << 2); + } + + if (dev->regs[0] & 2) { + serial_setup(dev->uart[0], ((uint16_t) dev->regs[4]) << 2, uart1_int); + f82c606_log("UART 1 at %04X, IRQ %i\n", ((uint16_t) dev->regs[4]) << 2, uart1_int); + } + + if (dev->regs[0] & 4) { + serial_setup(dev->uart[1], ((uint16_t) dev->regs[5]) << 2, uart2_int); + f82c606_log("UART 2 at %04X, IRQ %i\n", ((uint16_t) dev->regs[5]) << 2, uart2_int); + } + + if (dev->regs[0] & 8) { + lpt_port_setup(dev->lpt, ((uint16_t) dev->regs[6]) << 2); + lpt_port_irq(dev->lpt, lpt_int); + f82c606_log("LPT1 at %04X, IRQ %i\n", ((uint16_t) dev->regs[6]) << 2, lpt_int); + } + + nvr_at_handler(1, ((uint16_t) dev->regs[3]) << 2, dev->nvr); + nvr_irq_set(nvr_int, dev->nvr); + f82c606_log("RTC at %04X, IRQ %i\n", ((uint16_t) dev->regs[3]) << 2, nvr_int); +} + +static uint8_t +f82c606_config_read(uint16_t port, void *priv) +{ + const upc_t *dev = (upc_t *) priv; + uint8_t temp = 0xff; + + if (dev->configuration_mode) { + if (port == dev->cri_addr) { + temp = dev->cri; + } else if (port == dev->cap_addr) { + if (dev->cri == 0xf) + temp = dev->cri_addr / 4; + else + temp = dev->regs[dev->cri]; + } + } + + return temp; +} + +static void +f82c606_config_write(uint16_t port, uint8_t val, void *priv) +{ + upc_t *dev = (upc_t *) priv; + int configuration_state_event = 0; + + switch (port) { + case 0x2fa: + if ((dev->configuration_state == 0) && (val != 0x00) && (val != 0xff)) { + configuration_state_event = 1; + dev->last_write = val; + } else if (dev->configuration_state == 4) { + if ((val | dev->last_write) == 0xff) { + dev->cri_addr = ((uint16_t) dev->last_write) << 2; + dev->cap_addr = dev->cri_addr + 1; + dev->configuration_mode = 1; + f82c606_update_ports(dev, 0); + /* TODO: is the value of cri reset here or when exiting configuration mode? */ + io_sethandler(dev->cri_addr, 0x0002, + f82c606_config_read, NULL, NULL, + f82c606_config_write, NULL, NULL, dev); + } else + dev->configuration_mode = 0; + } + break; + case 0x3fa: + if ((dev->configuration_state == 1) && ((val | dev->last_write) == 0xff)) + configuration_state_event = 1; + else if ((dev->configuration_state == 2) && (val == 0x36)) + configuration_state_event = 1; + else if (dev->configuration_state == 3) { + dev->last_write = val; + configuration_state_event = 1; + } + break; + default: + break; + } + + if (dev->configuration_mode) { + if (port == dev->cri_addr) { + dev->cri = val & 0xf; + } else if (port == dev->cap_addr) { + if (dev->cri == 0xf) { + dev->configuration_mode = 0; + io_removehandler(dev->cri_addr, 0x0002, + f82c606_config_read, NULL, NULL, + f82c606_config_write, NULL, NULL, dev); + /* TODO: any benefit in updating at each register write instead of when exiting config mode? */ + f82c606_update_ports(dev, 1); + } else + dev->regs[dev->cri] = val; + } + } + + /* TODO: is the state only reset when accessing 0x2fa and 0x3fa wrongly? */ + if ((port == 0x2fa || port == 0x3fa) && configuration_state_event) + dev->configuration_state++; + else + dev->configuration_state = 0; +} + +static void +f82c606_reset(void *priv) +{ + upc_t *dev = (upc_t *) priv; + + /* Set power-on defaults. */ + dev->regs[0] = 0x00; /* Enable */ + dev->regs[1] = 0x00; /* Configuration Register */ + dev->regs[2] = 0x00; /* Ext Baud Rate Select */ + dev->regs[3] = 0xb0; /* RTC Base */ + dev->regs[4] = 0xfe; /* UART1 Base */ + dev->regs[5] = 0xbe; /* UART2 Base */ + dev->regs[6] = 0x9e; /* Parallel Base */ + dev->regs[7] = 0x80; /* Game Base */ + dev->regs[8] = 0xec; /* Interrupt Select */ + + f82c606_update_ports(dev, 1); +} + +static void +f82c606_close(void *priv) +{ + upc_t *dev = (upc_t *) priv; + + free(dev); +} + +static void * +f82c606_init(const device_t *info) +{ + upc_t *dev = (upc_t *) calloc(1, sizeof(upc_t)); + + dev->nvr = device_add(&at_nvr_old_device); + dev->gameport = gameport_add(&gameport_sio_device); + + dev->uart[0] = device_add_inst(&ns16450_device, 1); + dev->uart[1] = device_add_inst(&ns16450_device, 2); + + dev->lpt = device_add_inst(&lpt_port_device, 1); + + io_sethandler(0x02fa, 0x0001, NULL, NULL, NULL, f82c606_config_write, NULL, NULL, dev); + io_sethandler(0x03fa, 0x0001, NULL, NULL, NULL, f82c606_config_write, NULL, NULL, dev); + + f82c606_reset(dev); + + return dev; +} + +const device_t f82c606_device = { + .name = "82C606 CHIPSpak Multifunction Controller", + .internal_name = "f82c606", + .flags = 0, + .local = 0, + .init = f82c606_init, + .close = f82c606_close, + .reset = f82c606_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/sio/sio_f82c710.c b/src/sio/sio_f82c710.c index a7aa101c6..f7ff1409f 100644 --- a/src/sio/sio_f82c710.c +++ b/src/sio/sio_f82c710.c @@ -6,23 +6,23 @@ * * This file is part of the 86Box distribution. * - * Implementation of the Chips & Technologies F82C710 Universal Peripheral - * Controller (UPC) and 82C606 CHIPSpak Multifunction Controller. + * Implementation of the Chips & Technologies F82C710 Universal + * Peripheral Controller (UPC). * * Relevant literature: * * [1] Chips and Technologies, Inc., - * 82C605/82C606 CHIPSpak/CHIPSport MULTIFUNCTION CONTROLLERS, - * PRELIMINARY Data Sheet, Revision 1, May 1987. - * + * 82710 Univeral Peripheral Controller, Data Sheet, + * PRELIMINARY, August 1990. + * * + * Authors: Eluan Costa Miranda, + * Lubomir Rintel, + * Miran Grca, * - * - * Authors: Eluan Costa Miranda - * Lubomir Rintel - * - * Copyright 2020 Eluan Costa Miranda. - * Copyright 2021 Lubomir Rintel. + * Copyright 2020-2025 Eluan Costa Miranda. + * Copyright 2021-2025 Lubomir Rintel. + * Copyright 2025 Miran Grca. */ #include #include @@ -40,24 +40,38 @@ #include <86box/hdc_ide.h> #include <86box/fdd.h> #include <86box/fdc.h> -#include <86box/nvr.h> +#include <86box/machine.h> +#include <86box/mouse.h> +#include <86box/plat_fallthrough.h> #include <86box/sio.h> +#include "cpu.h" typedef struct upc_t { - uint32_t local; - int configuration_state; /* state of algorithm to enter configuration mode */ + int configuration_state; /* State of algorithm to enter the + configuration mode. */ int configuration_mode; - uint16_t cri_addr; /* cri = configuration index register, addr is even */ - uint16_t cap_addr; /* cap = configuration access port, addr is odd and is cri_addr + 1 */ - uint8_t cri; /* currently indexed register */ + uint8_t next_value; + uint16_t cri_addr; /* CRI = Configuration Index Register, + addr is even. */ + uint16_t cap_addr; /* CAP = Configuration Access Port, addr is + odd and is cri_addr + 1. */ + uint8_t cri; /* Currently indexed register. */ uint8_t last_write; + uint16_t mouse_base; - /* these regs are not affected by reset */ - uint8_t regs[15]; /* there are 16 indexes, but there is no need to store the last one which is: R = cri_addr / 4, W = exit config mode */ + /* These regs are not affected by reset */ + uint8_t regs[15]; /* There are 16 indexes, but there is no + need to store the last one which is: + R = cri_addr / 4, W = exit config mode. */ + int serial_irq; + int lpt_irq; + int xta; fdc_t *fdc; - nvr_t *nvr; void *gameport; - serial_t *uart[2]; + void *mouse; + void *hdc_xta; + serial_t *uart; + lpt_t *lpt; } upc_t; #ifdef ENABLE_F82C710_LOG @@ -79,150 +93,86 @@ f82c710_log(const char *fmt, ...) #endif static void -f82c710_update_ports(upc_t *dev, int set) +serial_handler(upc_t *dev) { - uint16_t com_addr = 0; - uint16_t lpt_addr = 0; + uint16_t com_addr = 0x0000; - serial_remove(dev->uart[0]); - serial_remove(dev->uart[1]); - lpt1_remove(); - lpt2_remove(); - fdc_remove(dev->fdc); - ide_pri_disable(); + serial_remove(dev->uart); - if (!set) - return; + if (dev->regs[0x00] & 0x04) { + com_addr = dev->regs[0x04] << 2; - if (dev->regs[0] & 4) { - com_addr = dev->regs[4] * 4; - if (com_addr == COM1_ADDR) - serial_setup(dev->uart[0], com_addr, COM1_IRQ); - else if (com_addr == COM2_ADDR) - serial_setup(dev->uart[1], com_addr, COM2_IRQ); + serial_setup(dev->uart, com_addr, dev->serial_irq); } - - if (dev->regs[0] & 8) { - lpt_addr = dev->regs[6] * 4; - lpt1_setup(lpt_addr); - if ((lpt_addr == LPT1_ADDR) || (lpt_addr == LPT_MDA_ADDR)) - lpt1_irq(LPT1_IRQ); - else if (lpt_addr == LPT2_ADDR) - lpt1_irq(LPT2_IRQ); - } - - if (dev->regs[12] & 0x80) - ide_pri_enable(); - - if (dev->regs[12] & 0x20) - fdc_set_base(dev->fdc, FDC_PRIMARY_ADDR); } static void -f82c606_update_ports(upc_t *dev, int set) +lpt_handler(upc_t *dev) { - uint8_t uart1_int = 0xff; - uint8_t uart2_int = 0xff; - uint8_t lpt1_int = 0xff; - int nvr_int = -1; + uint16_t lpt_addr = 0x0000; - serial_remove(dev->uart[0]); - serial_remove(dev->uart[1]); - lpt1_remove(); - lpt2_remove(); + lpt_port_remove(dev->lpt); - nvr_at_handler(0, ((uint16_t) dev->regs[3]) << 2, dev->nvr); - nvr_at_handler(0, 0x70, dev->nvr); + if (dev->regs[0x00] & 0x08) { + lpt_addr = dev->regs[0x06] << 2; - gameport_remap(dev->gameport, 0); + lpt_port_setup(dev->lpt, lpt_addr); + lpt_port_irq(dev->lpt, dev->lpt_irq); - if (!set) - return; - - switch (dev->regs[8] & 0xc0) { - case 0x40: - nvr_int = 3; - break; - case 0x80: - uart1_int = COM2_IRQ; - break; - case 0xc0: - uart2_int = COM2_IRQ; - break; - - default: - break; + lpt_set_ext(dev->lpt, !!(dev->regs[0x01] & 0x40)); } +} - switch (dev->regs[8] & 0x30) { - case 0x10: - nvr_int = 4; - break; - case 0x20: - uart1_int = COM1_IRQ; - break; - case 0x30: - uart2_int = COM1_IRQ; - break; +static void +ide_handler(upc_t *dev) +{ + if (dev->xta) { + if (dev->hdc_xta != NULL) + xta_handler(dev->hdc_xta, 0); + } else + ide_pri_disable(); - default: - break; + if (dev->regs[0x0c] & 0x80) { + if (dev->regs[0x0c] & 0x40) { + if (dev->xta && (dev->hdc_xta != NULL)) + xta_handler(dev->hdc_xta, 1); + } else { + if (!dev->xta) + ide_pri_enable(); + } } +} - switch (dev->regs[8] & 0x0c) { - case 0x04: - nvr_int = 5; - break; - case 0x08: - uart1_int = 5; - break; - case 0x0c: - lpt1_int = LPT2_IRQ; - break; +static void +fdc_handler(upc_t *dev) +{ + fdc_remove(dev->fdc); - default: - break; - } + if (dev->regs[0x0c] & 0x20) + fdc_set_base(dev->fdc, FDC_PRIMARY_ADDR); - switch (dev->regs[8] & 0x03) { - case 0x01: - nvr_int = 7; - break; - case 0x02: - uart2_int = 7; - break; - case 0x03: - lpt1_int = LPT1_IRQ; - break; + fdc_set_power_down(dev->fdc, !!(dev->regs[0x0c] & 0x10)); +} - default: - break; - } +static void +mouse_handler(upc_t *dev) +{ + if (dev->mouse_base != 0x0000) + mouse_upc_handler(0, dev->mouse_base, dev->mouse); - if (dev->regs[0] & 1) { - gameport_remap(dev->gameport, ((uint16_t) dev->regs[7]) << 2); - f82c710_log("Game port at %04X\n", ((uint16_t) dev->regs[7]) << 2); - } + dev->mouse_base = dev->regs[0x0d] << 2; - if (dev->regs[0] & 2) { - serial_setup(dev->uart[0], ((uint16_t) dev->regs[4]) << 2, uart1_int); - f82c710_log("UART 1 at %04X, IRQ %i\n", ((uint16_t) dev->regs[4]) << 2, uart1_int); - } + if (dev->mouse_base != 0x0000) + mouse_upc_handler(1, dev->mouse_base, dev->mouse); +} - if (dev->regs[0] & 4) { - serial_setup(dev->uart[1], ((uint16_t) dev->regs[5]) << 2, uart2_int); - f82c710_log("UART 2 at %04X, IRQ %i\n", ((uint16_t) dev->regs[5]) << 2, uart2_int); - } - - if (dev->regs[0] & 8) { - lpt1_setup(((uint16_t) dev->regs[6]) << 2); - lpt1_irq(lpt1_int); - f82c710_log("LPT1 at %04X, IRQ %i\n", ((uint16_t) dev->regs[6]) << 2, lpt1_int); - } - - nvr_at_handler(1, ((uint16_t) dev->regs[3]) << 2, dev->nvr); - nvr_irq_set(nvr_int, dev->nvr); - f82c710_log("RTC at %04X, IRQ %i\n", ((uint16_t) dev->regs[3]) << 2, nvr_int); +static void +f82c710_update_ports(upc_t *dev) +{ + serial_handler(dev); + lpt_handler(dev); + ide_handler(dev); + fdc_handler(dev); } static uint8_t @@ -235,9 +185,9 @@ f82c710_config_read(uint16_t port, void *priv) if (port == dev->cri_addr) { temp = dev->cri; } else if (port == dev->cap_addr) { - if (dev->cri == 0xf) - temp = dev->cri_addr / 4; - else + if (dev->cri == 0x0f) + temp = dev->cri_addr >> 2; + else if (dev->cri < 0x0f) temp = dev->regs[dev->cri]; } } @@ -248,66 +198,111 @@ f82c710_config_read(uint16_t port, void *priv) static void f82c710_config_write(uint16_t port, uint8_t val, void *priv) { - upc_t *dev = (upc_t *) priv; - int configuration_state_event = 0; + upc_t * dev = (upc_t *) priv; + uint8_t valxor = 0x00; + int configuration_state_event = 0; switch (port) { + default: + break; case 0x2fa: - if ((dev->configuration_state == 0) && (val != 0x00) && (val != 0xff) && (dev->local == 606)) { + if (dev->configuration_state == 0) { configuration_state_event = 1; - dev->last_write = val; - } else if ((dev->configuration_state == 0) && (val == 0x55) && (dev->local == 710)) - configuration_state_event = 1; - else if (dev->configuration_state == 4) { - if ((val | dev->last_write) == 0xff) { - dev->cri_addr = ((uint16_t) dev->last_write) << 2; - dev->cap_addr = dev->cri_addr + 1; + dev->next_value = 0xff - val; + } else if (dev->configuration_state == 4) { + uint8_t addr_verify = dev->cri_addr >> 2; + addr_verify += val; + if (addr_verify == 0xff) { dev->configuration_mode = 1; - if (dev->local == 606) - f82c606_update_ports(dev, 0); - else if (dev->local == 710) - f82c710_update_ports(dev, 0); /* TODO: is the value of cri reset here or when exiting configuration mode? */ - io_sethandler(dev->cri_addr, 0x0002, f82c710_config_read, NULL, NULL, f82c710_config_write, NULL, NULL, dev); + io_sethandler(dev->cri_addr, 0x0002, + f82c710_config_read, NULL, NULL, + f82c710_config_write, NULL, NULL, dev); } else dev->configuration_mode = 0; } break; case 0x3fa: - if ((dev->configuration_state == 1) && ((val | dev->last_write) == 0xff) && (dev->local == 606)) - configuration_state_event = 1; - else if ((dev->configuration_state == 1) && (val == 0xaa) && (dev->local == 710)) + if ((dev->configuration_state == 1) && (val == dev->next_value)) configuration_state_event = 1; else if ((dev->configuration_state == 2) && (val == 0x36)) configuration_state_event = 1; else if (dev->configuration_state == 3) { - dev->last_write = val; + dev->cri_addr = val << 2; + dev->cap_addr = dev->cri_addr + 1; configuration_state_event = 1; } break; - default: - break; } if (dev->configuration_mode) { - if (port == dev->cri_addr) { + if (port == dev->cri_addr) dev->cri = val & 0xf; - } else if (port == dev->cap_addr) { - if (dev->cri == 0xf) { - dev->configuration_mode = 0; - io_removehandler(dev->cri_addr, 0x0002, f82c710_config_read, NULL, NULL, f82c710_config_write, NULL, NULL, dev); - /* TODO: any benefit in updating at each register write instead of when exiting config mode? */ - if (dev->local == 606) - f82c606_update_ports(dev, 1); - else if (dev->local == 710) - f82c710_update_ports(dev, 1); - } else - dev->regs[dev->cri] = val; + else if (port == dev->cap_addr) { + valxor = (dev->regs[dev->cri] ^ val); + switch (dev->cri) { + case 0x00: + dev->regs[dev->cri] = (dev->regs[dev->cri] & 0x10) | (val & 0xef); + if (valxor & 0x08) + lpt_handler(dev); + if (valxor & 0x04) + serial_handler(dev); + break; + case 0x01: + dev->regs[dev->cri] = (dev->regs[dev->cri] & 0x07) | (val & 0xf8); + if (valxor & 0x40) + serial_handler(dev); + break; + case 0x02: + dev->regs[dev->cri] = (dev->regs[dev->cri] & 0x08) | (val & 0xf0); + break; + case 0x03: + case 0x07: case 0x08: + /* TODO: Reserved - is it actually writable? */ + fallthrough; + case 0x09: case 0x0a: + case 0x0b: + dev->regs[dev->cri] = val; + break; + case 0x04: + dev->regs[dev->cri] = (dev->regs[dev->cri] & 0x01) | (val & 0xfe); + if (valxor & 0xfe) + serial_handler(dev); + break; + case 0x06: + dev->regs[dev->cri] = val; + if (valxor) + lpt_handler(dev); + break; + case 0x0c: + dev->regs[dev->cri] = val; + if (valxor & 0xc0) + ide_handler(dev); + if (valxor & 0x30) + fdc_handler(dev); + break; + case 0x0d: + dev->regs[dev->cri] = val; + if (valxor) + mouse_handler(dev); + break; + case 0x0e: + dev->regs[dev->cri] = (dev->regs[dev->cri] & 0x20) | (val & 0xdf); + if (valxor) + mouse_handler(dev); + break; + case 0x0f: + dev->configuration_mode = 0; + io_removehandler(dev->cri_addr, 0x0002, + f82c710_config_read, NULL, NULL, + f82c710_config_write, NULL, NULL, dev); + break; + } } } /* TODO: is the state only reset when accessing 0x2fa and 0x3fa wrongly? */ - if ((port == 0x2fa || port == 0x3fa) && configuration_state_event) + if (((port == 0x2fa) || (port == 0x3fa)) && configuration_state_event) dev->configuration_state++; else dev->configuration_state = 0; @@ -318,39 +313,27 @@ f82c710_reset(void *priv) { upc_t *dev = (upc_t *) priv; - /* Set power-on defaults. */ - if (dev->local == 606) { - dev->regs[0] = 0x00; /* Enable */ - dev->regs[1] = 0x00; /* Configuration Register */ - dev->regs[2] = 0x00; /* Ext Baud Rate Select */ - dev->regs[3] = 0xb0; /* RTC Base */ - dev->regs[4] = 0xfe; /* UART1 Base */ - dev->regs[5] = 0xbe; /* UART2 Base */ - dev->regs[6] = 0x9e; /* Parallel Base */ - dev->regs[7] = 0x80; /* Game Base */ - dev->regs[8] = 0xec; /* Interrupt Select */ - } else if (dev->local == 710) { - dev->regs[0] = 0x0c; - dev->regs[1] = 0x00; - dev->regs[2] = 0x00; - dev->regs[3] = 0x00; - dev->regs[4] = 0xfe; - dev->regs[5] = 0x00; - dev->regs[6] = 0x9e; - dev->regs[7] = 0x00; - dev->regs[8] = 0x00; - dev->regs[9] = 0xb0; - dev->regs[10] = 0x00; - dev->regs[11] = 0x00; - dev->regs[12] = 0xa0; - dev->regs[13] = 0x00; - dev->regs[14] = 0x00; - } + dev->configuration_state = 0; + dev->configuration_mode = 0; - if (dev->local == 606) - f82c606_update_ports(dev, 1); - else if (dev->local == 710) - f82c710_update_ports(dev, 1); + /* Set power-on defaults. */ + dev->regs[0x00] = 0x0c; + dev->regs[0x01] = 0x00; + dev->regs[0x02] = 0x00; + dev->regs[0x03] = 0x00; + dev->regs[0x04] = 0xfe; + dev->regs[0x05] = 0x00; + dev->regs[0x06] = 0x9e; + dev->regs[0x07] = 0x00; + dev->regs[0x08] = 0x00; + dev->regs[0x09] = 0xb0; + dev->regs[0x0a] = 0x00; + dev->regs[0x0b] = 0x00; + dev->regs[0x0c] = 0xa0; + dev->regs[0x0d] = 0x00; + dev->regs[0x0e] = 0x00; + + f82c710_update_ports(dev); } static void @@ -365,16 +348,19 @@ static void * f82c710_init(const device_t *info) { upc_t *dev = (upc_t *) calloc(1, sizeof(upc_t)); - dev->local = info->local; - if (dev->local == 606) { - dev->nvr = device_add(&at_nvr_old_device); - dev->gameport = gameport_add(&gameport_sio_device); - } else if (dev->local == 710) - dev->fdc = device_add(&fdc_at_device); + if (strstr(machine_get_internal_name(), "5086") != NULL) + dev->fdc = device_add(&fdc_at_actlow_device); + else + dev->fdc = device_add(&fdc_at_device); - dev->uart[0] = device_add_inst(&ns16450_device, 1); - dev->uart[1] = device_add_inst(&ns16450_device, 2); + dev->uart = device_add_inst(&ns16450_device, 1); + dev->lpt = device_add_inst(&lpt_port_device, 1); + + dev->mouse = device_add_params(&mouse_upc_device, (void *) (uintptr_t) (is286 ? 12 : 2)); + + dev->serial_irq = device_get_config_int("serial_irq"); + dev->lpt_irq = device_get_config_int("lpt_irq"); io_sethandler(0x02fa, 0x0001, NULL, NULL, NULL, f82c710_config_write, NULL, NULL, dev); io_sethandler(0x03fa, 0x0001, NULL, NULL, NULL, f82c710_config_write, NULL, NULL, dev); @@ -384,30 +370,126 @@ f82c710_init(const device_t *info) return dev; } -const device_t f82c606_device = { - .name = "82C606 CHIPSpak Multifunction Controller", - .internal_name = "f82c606", - .flags = 0, - .local = 606, - .init = f82c710_init, - .close = f82c710_close, - .reset = f82c710_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL +static void * +f82c710_pc5086_init(const device_t *info) +{ + upc_t *dev = f82c710_init(info); + + int hdc_present = device_get_config_int("hdc_present"); + + if (hdc_present) + dev->hdc_xta = device_add(&xta_st50x_pc5086_device); + + dev->xta = 1; + + f82c710_reset(dev); + + return dev; +} + +static const device_config_t f82c710_config[] = { + { + .name = "serial_irq", + .description = "Serial port IRQ", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 4, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "IRQ 4", .value = 4 }, + { .description = "IRQ 3", .value = 3 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "lpt_irq", + .description = "Parallel port IRQ", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 7, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "IRQ 7", .value = 7 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +}; + +static const device_config_t f82c710_pc5086_config[] = { + { + .name = "serial_irq", + .description = "Serial port IRQ", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 4, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "IRQ 4", .value = 4 }, + { .description = "IRQ 3", .value = 3 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "lpt_irq", + .description = "Parallel port IRQ", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 7, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "IRQ 7", .value = 7 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "hdc_present", + .description = "Hard disk", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } }; const device_t f82c710_device = { .name = "F82C710 UPC Super I/O", .internal_name = "f82c710", .flags = 0, - .local = 710, + .local = 0, .init = f82c710_init, .close = f82c710_close, .reset = f82c710_reset, .available = NULL, .speed_changed = NULL, .force_redraw = NULL, - .config = NULL + .config = f82c710_config +}; + +const device_t f82c710_pc5086_device = { + .name = "F82C710 UPC Super I/O (PC5086)", + .internal_name = "f82c710_pc5086", + .flags = 0, + .local = 0, + .init = f82c710_pc5086_init, + .close = f82c710_close, + .reset = f82c710_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = f82c710_pc5086_config }; diff --git a/src/sio/sio_fdc37c669.c b/src/sio/sio_fdc37c669.c index 3be28c6ba..57ca37619 100644 --- a/src/sio/sio_fdc37c669.c +++ b/src/sio/sio_fdc37c669.c @@ -33,15 +33,20 @@ #include <86box/fdd.h> #include <86box/fdc.h> #include <86box/sio.h> +#include "cpu.h" typedef struct fdc37c669_t { uint8_t id; uint8_t tries; - uint8_t regs[42]; + uint8_t has_ide; + uint8_t dma_map[4]; + uint8_t irq_map[16]; + uint8_t regs[256]; int locked; int rw_locked; int cur_reg; fdc_t *fdc; + lpt_t *lpt; serial_t *uart[2]; } fdc37c669_t; @@ -69,6 +74,7 @@ static void fdc37c669_fdc_handler(fdc37c669_t *dev) { fdc_remove(dev->fdc); + if (dev->regs[0x20] & 0xc0) fdc_set_base(dev->fdc, ((uint16_t) dev->regs[0x20]) << 2); } @@ -81,6 +87,7 @@ fdc37c669_uart_handler(fdc37c669_t *dev, uint8_t uart) uint8_t uart_shift = ((uart ^ 1) << 2); serial_remove(dev->uart[uart]); + if ((dev->regs[0x02] & pwrdn_mask) && (dev->regs[uart_reg] & 0xc0)) serial_setup(dev->uart[0], ((uint16_t) dev->regs[0x24]) << 2, (dev->regs[0x28] >> uart_shift) & 0x0f); @@ -105,9 +112,40 @@ fdc37c669_lpt_handler(fdc37c669_t *dev) { uint8_t mask = ~(dev->regs[0x04] & 0x01); - lpt_port_remove(dev->id); + lpt_port_remove(dev->lpt); + + if (dev->regs[0x01] & 0x08) { + lpt_set_ext(dev->lpt, 0); + + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + } else { + lpt_set_ext(dev->lpt, 1); + + lpt_set_epp(dev->lpt, dev->regs[0x04] & 0x01); + lpt_set_ecp(dev->lpt, dev->regs[0x04] & 0x02); + } + + lpt_set_fifo_threshold(dev->lpt, dev->regs[0x0a] & 0x0f); + if ((dev->regs[0x01] & 0x04) && (dev->regs[0x23] >= 0x40)) - lpt_port_setup(dev->id, ((uint16_t) (dev->regs[0x23] & mask)) << 2); + lpt_port_setup(dev->lpt, ((uint16_t) (dev->regs[0x23] & mask)) << 2); +} + +static void +ide_handler(fdc37c669_t *dev) +{ + if (dev->has_ide > 0) { + int ide_id = dev->has_ide - 1; + + ide_handlers(ide_id, 0); + + ide_set_base_addr(ide_id, 0, ((uint16_t) (dev->regs[0x21] & 0xfc)) << 2); + ide_set_base_addr(ide_id, 1, (((uint16_t) (dev->regs[0x22] & 0xfc)) << 2) | 0x0006); + + if ((dev->regs[0x00] & 0x03) == 0x02) + ide_handlers(ide_id, 1); + } } static void @@ -138,12 +176,14 @@ fdc37c669_write(uint16_t port, uint8_t val, void *priv) } else if (!dev->rw_locked || (dev->cur_reg > 0x0f)) switch (dev->cur_reg) { case 0x00: dev->regs[dev->cur_reg] = (dev->regs[dev->cur_reg] & 0x74) | (val & 0x8b); - if (!dev->id && (valxor & 8)) + if (!dev->id && (valxor & 0x08)) fdc_set_power_down(dev->fdc, !(val & 0x08)); + if (!dev->id && (valxor & 0x03)) + ide_handler(dev); break; case 0x01: dev->regs[dev->cur_reg] = (dev->regs[dev->cur_reg] & 0x73) | (val & 0x8c); - if (valxor & 0x04) + if (valxor & 0x0c) fdc37c669_lpt_handler(dev); if (valxor & 0x80) dev->rw_locked = !(val & 0x80); @@ -157,6 +197,17 @@ fdc37c669_write(uint16_t port, uint8_t val, void *priv) break; case 0x03: dev->regs[dev->cur_reg] = (dev->regs[dev->cur_reg] & 0x08) | (val & 0xf7); + if ((valxor & 0x60) && (dev->fdc != NULL)) { + fdc_clear_flags(dev->fdc, FDC_FLAG_PS2 | FDC_FLAG_PS2_MCA); + switch (val & 0x0c) { + case 0x00: + fdc_set_flags(dev->fdc, FDC_FLAG_PS2); + break; + case 0x20: + fdc_set_flags(dev->fdc, FDC_FLAG_PS2_MCA); + break; + } + } if (!dev->id && (valxor & 0x02)) fdc_update_enh_mode(dev->fdc, !!(val & 0x02)); break; @@ -190,6 +241,8 @@ fdc37c669_write(uint16_t port, uint8_t val, void *priv) break; case 0x0a: dev->regs[dev->cur_reg] = (dev->regs[dev->cur_reg] & 0xf0) | (val & 0x0f); + if (valxor & 0x0f) + fdc37c669_lpt_handler(dev); break; case 0x0b: dev->regs[dev->cur_reg] = val; @@ -222,9 +275,13 @@ fdc37c669_write(uint16_t port, uint8_t val, void *priv) break; case 0x21: dev->regs[dev->cur_reg] = val & 0xfc; + if (!dev->id && (valxor & 0xfc)) + ide_handler(dev); break; case 0x22: dev->regs[dev->cur_reg] = (dev->regs[dev->cur_reg] & 0x03) | (val & 0xfc); + if (!dev->id && (valxor & 0xfc)) + ide_handler(dev); break; case 0x23: dev->regs[dev->cur_reg] = val; @@ -245,13 +302,15 @@ fdc37c669_write(uint16_t port, uint8_t val, void *priv) dev->regs[dev->cur_reg] = val; if (valxor & 0xf0) fdc_set_dma_ch(dev->fdc, val >> 4); + if (valxor & 0x0f) + lpt_port_dma(dev->lpt, val & 0x0f); break; case 0x27: dev->regs[dev->cur_reg] = val; if (valxor & 0xf0) fdc_set_irq(dev->fdc, val >> 4); if (valxor & 0x0f) - lpt_port_irq(dev->id, val & 0x0f); + lpt_port_irq(dev->lpt, val & 0x0f); break; case 0x28: dev->regs[dev->cur_reg] = val; @@ -305,9 +364,13 @@ fdc37c669_reset(void *priv) dev->regs[0x21] = 0x3c; dev->regs[0x22] = 0x3d; - if (dev->id != 1) { + if (!dev->id) { fdc_reset(dev->fdc); + fdc37c669_fdc_handler(dev); + fdc_clear_flags(dev->fdc, FDC_FLAG_PS2 | FDC_FLAG_PS2_MCA); + + ide_handler(dev); } fdc37c669_uart_handler(dev, 0); @@ -339,15 +402,35 @@ fdc37c669_init(const device_t *info) dev->id = next_id; - if (next_id != 1) - dev->fdc = device_add(&fdc_at_smc_device); + if (next_id != 1) { + dev->fdc = device_add(&fdc_at_smc_device); + dev->has_ide = (info->local >> 8) & 0xff; + } dev->uart[0] = device_add_inst(&ns16550_device, (next_id << 1) + 1); dev->uart[1] = device_add_inst(&ns16550_device, (next_id << 1) + 2); - io_sethandler(info->local ? FDC_SECONDARY_ADDR : (next_id ? FDC_SECONDARY_ADDR : FDC_PRIMARY_ADDR), + dev->lpt = device_add_inst(&lpt_port_device, next_id + 1); + lpt_set_cnfgb_readout(dev->lpt, 0x00); + + io_sethandler((info->local & FDC37C6XX_370) ? FDC_SECONDARY_ADDR : (next_id ? FDC_SECONDARY_ADDR : FDC_PRIMARY_ADDR), 0x0002, fdc37c669_read, NULL, NULL, fdc37c669_write, NULL, NULL, dev); + dev->dma_map[0] = 4; + for (int i = 1; i < 4; i++) + dev->dma_map[i] = i; + + memset(dev->irq_map, 0xff, 16); + dev->irq_map[0] = 0xff; + for (int i = 1; i < 7; i++) + dev->irq_map[i] = i; + dev->irq_map[1] = 5; + dev->irq_map[5] = 7; + dev->irq_map[7] = 0xff; /* Reserved. */ + dev->irq_map[8] = 10; + dev->irq_map[9] = 9; /* This is used by the Acrosser PJ-A511M for IRQ 9. */ + dev->irq_map[11] = 11; /* This is used by the Acrosser PJ-A511M for IRQ 11. */ + fdc37c669_reset(dev); next_id++; @@ -368,17 +451,3 @@ const device_t fdc37c669_device = { .force_redraw = NULL, .config = NULL }; - -const device_t fdc37c669_370_device = { - .name = "SMC FDC37C669 Super I/O (Port 370h)", - .internal_name = "fdc37c669_370", - .flags = 0, - .local = 1, - .init = fdc37c669_init, - .close = fdc37c669_close, - .reset = fdc37c669_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; diff --git a/src/sio/sio_fdc37c67x.c b/src/sio/sio_fdc37c67x.c index 931734048..943b78b21 100644 --- a/src/sio/sio_fdc37c67x.c +++ b/src/sio/sio_fdc37c67x.c @@ -6,16 +6,15 @@ * * This file is part of the 86Box distribution. * - * Implementation of the SMC FDC37C67X Super I/O Chip. - * - * + * Implementation of the SMC FDC37C67x Super I/O Chips. * * Authors: Miran Grca, * - * Copyright 2016-2018 Miran Grca. + * Copyright 2025 Miran Grca. */ -#include +#include #include +#include #include #include #include @@ -23,65 +22,69 @@ #include <86box/io.h> #include <86box/timer.h> #include <86box/device.h> -#include <86box/pic.h> #include <86box/pci.h> +#include <86box/pic.h> #include <86box/lpt.h> #include <86box/serial.h> #include <86box/hdc.h> #include <86box/hdc_ide.h> #include <86box/fdd.h> #include <86box/fdc.h> -#include "cpu.h" -#include <86box/sio.h> +#include <86box/keyboard.h> +#include <86box/machine.h> +#include <86box/apm.h> +#include <86box/plat.h> #include <86box/plat_unused.h> - -#define AB_RST 0x80 +#include <86box/video.h> +#include <86box/sio.h> +#include "cpu.h" typedef struct fdc37c67x_t { - uint8_t chip_id; - uint8_t is_apm; - uint8_t tries; - uint8_t gpio_regs[2]; - uint8_t auxio_reg; - uint8_t regs[48]; - uint8_t ld_regs[11][256]; - uint16_t gpio_base; /* Set to EA */ - uint16_t auxio_base; - uint16_t sio_base; - int locked; - int cur_reg; - fdc_t *fdc; - serial_t *uart[2]; + uint8_t is_compaq; + uint8_t max_ld; + uint8_t tries; + uint8_t port_370; + uint8_t gpio_reg; + uint8_t regs[48]; + uint8_t ld_regs[11][256]; + uint16_t kbc_type; + uint16_t superio_base; + uint16_t fdc_base; + uint16_t lpt_base; + uint16_t kbc_base; + uint16_t gpio_base; /* Set to EA */ + uint16_t uart_base[2]; + int locked; + int cur_reg; + fdc_t *fdc; + void *kbc; + serial_t *uart[2]; + lpt_t *lpt; } fdc37c67x_t; static void fdc37c67x_write(uint16_t port, uint8_t val, void *priv); static uint8_t fdc37c67x_read(uint16_t port, void *priv); static uint16_t -make_port(fdc37c67x_t *dev, uint8_t ld) +make_port_superio(const fdc37c67x_t *dev) { - uint16_t r0 = dev->ld_regs[ld][0x60]; - uint16_t r1 = dev->ld_regs[ld][0x61]; + const uint16_t r0 = dev->regs[0x26]; + const uint16_t r1 = dev->regs[0x27]; - uint16_t p = (r0 << 8) + r1; + const uint16_t p = (r1 << 8) + r0; return p; } -static uint8_t -fdc37c67x_auxio_read(UNUSED(uint16_t port), void *priv) +static uint16_t +make_port(const fdc37c67x_t *dev, const uint8_t ld) { - const fdc37c67x_t *dev = (fdc37c67x_t *) priv; + const uint16_t r0 = dev->ld_regs[ld][0x60]; + const uint16_t r1 = dev->ld_regs[ld][0x61]; - return dev->auxio_reg; -} + const uint16_t p = (r0 << 8) + r1; -static void -fdc37c67x_auxio_write(UNUSED(uint16_t port), uint8_t val, void *priv) -{ - fdc37c67x_t *dev = (fdc37c67x_t *) priv; - - dev->auxio_reg = val; + return p; } static uint8_t @@ -90,7 +93,18 @@ fdc37c67x_gpio_read(uint16_t port, void *priv) const fdc37c67x_t *dev = (fdc37c67x_t *) priv; uint8_t ret = 0xff; - ret = dev->gpio_regs[port & 1]; + if (dev->locked) { + if (dev->is_compaq) + ret = fdc37c67x_read(port & 0x0001, priv); + } else if (port & 0x0001) switch (dev->gpio_reg) { + case 0x03: + ret = dev->ld_regs[0x08][0xf4]; + break; + case 0x0c ... 0x0f: + ret = dev->ld_regs[0x08][0xb0 + dev->gpio_reg - 0x08]; + break; + } else + ret = dev->gpio_reg; return ret; } @@ -100,377 +114,502 @@ fdc37c67x_gpio_write(uint16_t port, uint8_t val, void *priv) { fdc37c67x_t *dev = (fdc37c67x_t *) priv; - if (!(port & 1)) - dev->gpio_regs[0] = (dev->gpio_regs[0] & 0xfc) | (val & 0x03); + if (dev->locked) { + if (dev->is_compaq) + fdc37c67x_write(port & 0x0001, val, priv); + } else if (port & 0x0001) switch (dev->gpio_reg) { + case 0x03: + dev->ld_regs[0x08][0xf4] = val & 0xef; + break; + case 0x0c: case 0x0e: + dev->ld_regs[0x08][0xb0 + dev->gpio_reg - 0x08] = val & 0x9e; + break; + case 0x0d: + dev->ld_regs[0x08][0xb0 + dev->gpio_reg - 0x08] = val & 0xd7; + break; + case 0x0f: + dev->ld_regs[0x08][0xb0 + dev->gpio_reg - 0x08] = val & 0x17; + break; + } else + dev->gpio_reg = val; +} + +static void +fdc37c67x_superio_handler(fdc37c67x_t *dev) +{ + if (!dev->is_compaq) { + if (dev->superio_base != 0x0000) + io_removehandler(dev->superio_base, 0x0002, + fdc37c67x_read, NULL, NULL, fdc37c67x_write, NULL, NULL, dev); + dev->superio_base = make_port_superio(dev); + if (dev->superio_base != 0x0000) + io_sethandler(dev->superio_base, 0x0002, + fdc37c67x_read, NULL, NULL, fdc37c67x_write, NULL, NULL, dev); + } } static void fdc37c67x_fdc_handler(fdc37c67x_t *dev) { - uint16_t ld_port = 0; - uint8_t global_enable = !!(dev->regs[0x22] & (1 << 0)); - uint8_t local_enable = !!dev->ld_regs[0][0x30]; + const uint8_t global_enable = !!(dev->regs[0x22] & (1 << 0)); + const uint8_t local_enable = !!dev->ld_regs[0][0x30]; + const uint16_t old_base = dev->fdc_base; - fdc_remove(dev->fdc); - if (global_enable && local_enable) { - ld_port = make_port(dev, 0) & 0xFFF8; - if ((ld_port >= 0x0100) && (ld_port <= 0x0FF8)) - fdc_set_base(dev->fdc, ld_port); + dev->fdc_base = 0x0000; + + if (global_enable && local_enable) + dev->fdc_base = make_port(dev, 0) & 0xfff8; + + if (dev->fdc_base != old_base) { + if ((old_base >= 0x0100) && (old_base <= 0x0ff8)) + fdc_remove(dev->fdc); + + if ((dev->fdc_base >= 0x0100) && (dev->fdc_base <= 0x0ff8)) + fdc_set_base(dev->fdc, dev->fdc_base); } } static void fdc37c67x_lpt_handler(fdc37c67x_t *dev) { - uint16_t ld_port = 0; - uint8_t global_enable = !!(dev->regs[0x22] & (1 << 3)); - uint8_t local_enable = !!dev->ld_regs[3][0x30]; - uint8_t lpt_irq = dev->ld_regs[3][0x70]; + uint16_t ld_port = 0x0000; + uint16_t mask = 0xfffc; + uint8_t global_enable = !!(dev->regs[0x22] & (1 << 3)); + uint8_t local_enable = !!dev->ld_regs[3][0x30]; + uint8_t lpt_irq = dev->ld_regs[3][0x70]; + uint8_t lpt_dma = dev->ld_regs[3][0x74]; + uint8_t lpt_mode = dev->ld_regs[3][0xf0] & 0x07; + uint8_t irq_readout[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x08, + 0x00, 0x10, 0x18, 0x20, 0x00, 0x00, 0x28, 0x30 }; if (lpt_irq > 15) lpt_irq = 0xff; - lpt1_remove(); + if (lpt_dma >= 4) + lpt_dma = 0xff; + + lpt_port_remove(dev->lpt); + lpt_set_fifo_threshold(dev->lpt, (dev->ld_regs[3][0xf0] & 0x78) >> 3); + switch (lpt_mode) { + default: + case 0x04: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x00: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 1); + break; + case 0x01: case 0x05: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x02: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + case 0x03: case 0x07: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + } if (global_enable && local_enable) { - ld_port = make_port(dev, 3) & 0xFFFC; - if ((ld_port >= 0x0100) && (ld_port <= 0x0FFC)) - lpt1_setup(ld_port); + ld_port = (make_port(dev, 3) & 0xfffc) & mask; + if ((ld_port >= 0x0100) && (ld_port <= (0x0ffc & mask))) + lpt_port_setup(dev->lpt, ld_port); } - lpt1_irq(lpt_irq); + lpt_port_irq(dev->lpt, lpt_irq); + lpt_port_dma(dev->lpt, lpt_dma); + + lpt_set_cnfgb_readout(dev->lpt, ((lpt_irq > 15) ? 0x00 : irq_readout[lpt_irq]) | + ((lpt_dma >= 4) ? 0x00 : lpt_dma)); } static void -fdc37c67x_serial_handler(fdc37c67x_t *dev, int uart) +fdc37c67x_serial_handler(fdc37c67x_t *dev, const int uart) { - uint16_t ld_port = 0; - uint8_t uart_no = 4 + uart; - uint8_t global_enable = !!(dev->regs[0x22] & (1 << uart_no)); - uint8_t local_enable = !!dev->ld_regs[uart_no][0x30]; + const uint8_t uart_no = 4 + uart; + const uint8_t global_enable = !!(dev->regs[0x22] & (1 << uart_no)); + const uint8_t local_enable = !!dev->ld_regs[uart_no][0x30]; + const uint16_t old_base = dev->uart_base[uart]; + double clock_src = 24000000.0 / 13.0; - serial_remove(dev->uart[uart]); - if (global_enable && local_enable) { - ld_port = make_port(dev, uart_no) & 0xFFF8; - if ((ld_port >= 0x0100) && (ld_port <= 0x0FF8)) - serial_setup(dev->uart[uart], ld_port, dev->ld_regs[uart_no][0x70]); + dev->uart_base[uart] = 0x0000; + + if (global_enable && local_enable) + dev->uart_base[uart] = make_port(dev, uart_no) & 0xfff8; + + if (dev->uart_base[uart] != old_base) { + if ((old_base >= 0x0100) && (old_base <= 0x0ff8)) + serial_remove(dev->uart[uart]); + + if ((dev->uart_base[uart] >= 0x0100) && (dev->uart_base[uart] <= 0x0ff8)) + serial_setup(dev->uart[uart], dev->uart_base[uart], dev->ld_regs[uart_no][0x70]); } + + switch (dev->ld_regs[uart_no][0xf0] & 0x03) { + case 0x00: + clock_src = 24000000.0 / 13.0; + break; + case 0x01: + clock_src = 24000000.0 / 12.0; + break; + case 0x02: + clock_src = 24000000.0 / 1.0; + break; + case 0x03: + clock_src = 24000000.0 / 1.625; + break; + + default: + break; + } + + serial_set_clock_src(dev->uart[uart], clock_src); + + /* + TODO: If UART 2's own IRQ pin is also enabled when shared, + it should also be asserted. + */ + if (dev->ld_regs[4][0xf0] & 0x80) { + serial_irq(dev->uart[0], dev->ld_regs[4][0x70]); + serial_irq(dev->uart[1], dev->ld_regs[4][0x70]); + } else + serial_irq(dev->uart[uart], dev->ld_regs[uart_no][0x70]); } static void -fdc37c67x_auxio_handler(fdc37c67x_t *dev) +fdc37c67x_kbc_handler(fdc37c67x_t *dev) { - uint16_t ld_port = 0; - uint8_t local_enable = !!dev->ld_regs[8][0x30]; + const uint8_t local_enable = !!dev->ld_regs[7][0x30]; + const uint16_t old_base = dev->kbc_base; - io_removehandler(dev->auxio_base, 0x0001, - fdc37c67x_auxio_read, NULL, NULL, fdc37c67x_auxio_write, NULL, NULL, dev); - if (local_enable) { - dev->auxio_base = ld_port = make_port(dev, 8); - if ((ld_port >= 0x0100) && (ld_port <= 0x0FFF)) - io_sethandler(dev->auxio_base, 0x0001, - fdc37c67x_auxio_read, NULL, NULL, fdc37c67x_auxio_write, NULL, NULL, dev); - } -} + dev->kbc_base = local_enable ? 0x0060 : 0x0000; -static void -fdc37c67x_sio_handler(UNUSED(fdc37c67x_t *dev)) -{ -#if 0 - if (dev->sio_base) { - io_removehandler(dev->sio_base, 0x0002, - fdc37c67x_read, NULL, NULL, fdc37c67x_write, NULL, NULL, dev); - } - dev->sio_base = (((uint16_t) dev->regs[0x27]) << 8) | dev->regs[0x26]; - if (dev->sio_base) { - io_sethandler(dev->sio_base, 0x0002, - fdc37c67x_read, NULL, NULL, fdc37c67x_write, NULL, NULL, dev); - } -#endif + if (dev->kbc_base != old_base) + kbc_at_handler(local_enable, dev->kbc_base, dev->kbc); + + kbc_at_set_irq(0, dev->ld_regs[7][0x70], dev->kbc); + kbc_at_set_irq(1, dev->ld_regs[7][0x72], dev->kbc); } static void fdc37c67x_gpio_handler(fdc37c67x_t *dev) { - uint16_t ld_port = 0; - uint8_t local_enable; + const uint8_t local_enable = !!(dev->regs[0x03] & 0x80) || + (dev->is_compaq && dev->locked); + const uint16_t old_base = dev->gpio_base; - local_enable = !!(dev->regs[0x03] & 0x80); + dev->gpio_base = 0x0000; - io_removehandler(dev->gpio_base, 0x0002, - fdc37c67x_gpio_read, NULL, NULL, fdc37c67x_gpio_write, NULL, NULL, dev); - if (local_enable) { - switch (dev->regs[0x03] & 0x03) { - case 0: - ld_port = 0xe0; - break; - case 1: - ld_port = 0xe2; - break; - case 2: - ld_port = 0xe4; - break; - case 3: - ld_port = 0xea; /* Default */ - break; + if (local_enable) switch (dev->regs[0x03] & 0x03) { + default: + break; + case 0: + dev->gpio_base = 0x00e0; + break; + case 1: + dev->gpio_base = 0x00e2; + break; + case 2: + dev->gpio_base = 0x00e4; + break; + case 3: + dev->gpio_base = 0x00ea; /* Default */ + break; + } - default: - break; - } - dev->gpio_base = ld_port; - if (ld_port > 0x0000) + if (dev->gpio_base != old_base) { + if (old_base != 0x0000) + io_removehandler(old_base, 0x0002, + fdc37c67x_gpio_read, NULL, NULL, fdc37c67x_gpio_write, NULL, NULL, dev); + + if (dev->gpio_base > 0x0000) io_sethandler(dev->gpio_base, 0x0002, fdc37c67x_gpio_read, NULL, NULL, fdc37c67x_gpio_write, NULL, NULL, dev); } } static void -fdc37c67x_smi_handler(fdc37c67x_t *dev) +fdc37c67x_state_change(fdc37c67x_t *dev, const uint8_t locked) { - /* TODO: 8042 P1.2 SMI#. */ - pic_reset_smi_irq_mask(); - pic_set_smi_irq_mask(dev->ld_regs[3][0x70], dev->ld_regs[8][0xb4] & 0x02); - pic_set_smi_irq_mask(dev->ld_regs[5][0x70], dev->ld_regs[8][0xb4] & 0x04); - pic_set_smi_irq_mask(dev->ld_regs[4][0x70], dev->ld_regs[8][0xb4] & 0x08); - pic_set_smi_irq_mask(dev->ld_regs[0][0x70], dev->ld_regs[8][0xb4] & 0x10); - pic_set_smi_irq_mask(12, dev->ld_regs[8][0xb5] & 0x01); - pic_set_smi_irq_mask(1, dev->ld_regs[8][0xb5] & 0x02); - pic_set_smi_irq_mask(10, dev->ld_regs[8][0xb5] & 0x80); + dev->locked = locked; + fdc_3f1_enable(dev->fdc, !locked); } static void fdc37c67x_write(uint16_t port, uint8_t val, void *priv) { fdc37c67x_t *dev = (fdc37c67x_t *) priv; - uint8_t index = (port & 1) ? 0 : 1; - uint8_t valxor = 0x00; - uint8_t keep = 0x00; + uint8_t index = !(port & 1); + uint8_t valxor; - if (index) { - if ((val == 0x55) && !dev->locked) { - if (dev->tries) { - dev->locked = 1; - fdc_3f1_enable(dev->fdc, 0); - dev->tries = 0; - } else - dev->tries++; - } else { - if (dev->locked) { - if (val == 0xaa) { - dev->locked = 0; - fdc_3f1_enable(dev->fdc, 1); - return; - } + if (port == 0x00fb) { + fdc37c67x_state_change(dev, 1); + dev->tries = 0; + } else if (port == 0x00f9) + fdc37c67x_state_change(dev, 0); + else if (index) { + if ((!dev->is_compaq) && (val == 0x55) && !dev->locked) { + fdc37c67x_state_change(dev, 1); + dev->tries = 0; + } else if (dev->locked) { + if ((!dev->is_compaq) && (val == 0xaa)) + fdc37c67x_state_change(dev, 0); + else dev->cur_reg = val; - } else { - if (dev->tries) - dev->tries = 0; - } - } - return; - } else { - if (dev->locked) { - if (dev->cur_reg < 48) { - valxor = val ^ dev->regs[dev->cur_reg]; - if ((val == 0x20) || (val == 0x21)) - return; - dev->regs[dev->cur_reg] = val; - } else { - valxor = val ^ dev->ld_regs[dev->regs[7]][dev->cur_reg]; - if (((dev->cur_reg & 0xF0) == 0x70) && (dev->regs[7] < 4)) - return; - /* Block writes to some logical devices. */ - if (dev->regs[7] > 0x0a) - return; - else - switch (dev->regs[7]) { - case 0x01: - case 0x02: - case 0x07: - return; + } else if ((!dev->is_compaq) && dev->tries) + dev->tries = 0; + } else if (dev->locked) { + if (dev->cur_reg < 0x30) { + valxor = val ^ dev->regs[dev->cur_reg]; - default: + switch (dev->cur_reg) { + case 0x02: + dev->regs[dev->cur_reg] = val; + if (val == 0x02) + fdc37c67x_state_change(dev, 0); + break; + case 0x03: + dev->regs[dev->cur_reg] = val & 0x83; + fdc37c67x_gpio_handler(dev); + break; + case 0x07: case 0x26: + case 0x2b ... 0x2f: + dev->regs[dev->cur_reg] = val; + break; + case 0x22: + dev->regs[dev->cur_reg] = val & 0x39; + + if (valxor & 0x01) + fdc37c67x_fdc_handler(dev); + if (valxor & 0x08) + fdc37c67x_lpt_handler(dev); + if (valxor & 0x10) + fdc37c67x_serial_handler(dev, 0); + if (valxor & 0x20) + fdc37c67x_serial_handler(dev, 1); + break; + case 0x23: + dev->regs[dev->cur_reg] = val & 0x39; + break; + case 0x24: + dev->regs[dev->cur_reg] = val & 0x4e; + break; + case 0x27: + dev->regs[dev->cur_reg] = val; + fdc37c67x_superio_handler(dev); + break; + default: + break; + } + } else { + valxor = val ^ dev->ld_regs[dev->regs[7]][dev->cur_reg]; + + if (dev->regs[7] <= dev->max_ld) switch (dev->regs[7]) { + case 0x00: /* FDD */ + switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x70: + case 0x74: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if ((dev->cur_reg == 0x30) && (val & 0x01)) + dev->regs[0x22] |= 0x01; + if (valxor) + fdc37c67x_fdc_handler(dev); + break; + case 0xf0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0xef; + + if (valxor & 0x01) + fdc_update_enh_mode(dev->fdc, val & 0x01); + if (valxor & 0x0c) { + fdc_clear_flags(dev->fdc, FDC_FLAG_PS2 | FDC_FLAG_PS2_MCA); + switch (val & 0x0c) { + case 0x00: + fdc_set_flags(dev->fdc, FDC_FLAG_PS2); + break; + case 0x04: + fdc_set_flags(dev->fdc, FDC_FLAG_PS2_MCA); + break; + } + } + if (valxor & 0x10) + fdc_set_swap(dev->fdc, (val & 0x10) >> 4); + break; + case 0xf1: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0xfc; + + if (valxor & 0x0c) + fdc_update_densel_force(dev->fdc, (val & 0xc) >> 2); + break; + case 0xf2: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if (valxor & 0xc0) + fdc_update_rwc(dev->fdc, 3, (val & 0xc0) >> 6); + if (valxor & 0x30) + fdc_update_rwc(dev->fdc, 2, (val & 0x30) >> 4); + if (valxor & 0x0c) + fdc_update_rwc(dev->fdc, 1, (val & 0x0c) >> 2); + if (valxor & 0x03) + fdc_update_rwc(dev->fdc, 0, (val & 0x03)); + break; + case 0xf4 ... 0xf7: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x5b; + + if (valxor & 0x18) + fdc_update_drvrate(dev->fdc, dev->cur_reg - 0xf4, + (val & 0x18) >> 3); break; } - dev->ld_regs[dev->regs[7]][dev->cur_reg] = val | keep; + break; + case 0x03: /* Parallel Port */ + switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x70: + case 0x74: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if ((dev->cur_reg == 0x30) && (val & 0x01)) + dev->regs[0x22] |= 0x08; + if (valxor) + fdc37c67x_lpt_handler(dev); + break; + case 0xf0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + if (valxor & 0x7f) + fdc37c67x_lpt_handler(dev); + break; + case 0xf1: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x03; + break; + } + break; + case 0x04: /* Serial port 1 */ + switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x70: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if ((dev->cur_reg == 0x30) && (val & 0x01)) + dev->regs[0x22] |= 0x10; + if (valxor) + fdc37c67x_serial_handler(dev, 0); + break; + case 0xf0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x83; + + if (valxor & 0x83) { + fdc37c67x_serial_handler(dev, 0); + fdc37c67x_serial_handler(dev, 1); + } + break; + } + break; + case 0x05: /* Serial port 2 */ + switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x62: case 0x63: + case 0x70: + case 0x74: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if ((dev->cur_reg == 0x30) && (val & 0x01)) + dev->regs[0x22] |= 0x20; + if (valxor) + fdc37c67x_serial_handler(dev, 1); + break; + case 0xf0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x03; + + if (valxor & 0x03) { + fdc37c67x_serial_handler(dev, 0); + fdc37c67x_serial_handler(dev, 1); + } + break; + case 0xf1: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x7f; + break; + case 0xf2: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + break; + } + break; + case 0x07: /* Keyboard */ + switch (dev->cur_reg) { + case 0x30: + case 0x70: case 0x72: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if (valxor) + fdc37c67x_kbc_handler(dev); + break; + case 0xf0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x84; + break; + } + break; + case 0x08: /* Aux. I/O */ + switch (dev->cur_reg) { + case 0x30: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + break; + case 0xb4: case 0xb6: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x9e; + break; + case 0xb5: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0xd7; + break; + case 0xb7: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x17; + break; + case 0xb8: + case 0xf1 ... 0xf3: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + break; + case 0xc0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = (dev->ld_regs[dev->regs[7]][dev->cur_reg] & 0xe4) | (val & 0x1b); + break; + case 0xc1: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x0f; + for (int i = 0; i < 4; i++) + fdc_set_fdd_changed(i, !!(val & (1 << i))); + break; + case 0xf4: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0xef; + break; + } + break; } - } else - return; - } - - if (dev->cur_reg < 48) { - switch (dev->cur_reg) { - case 0x03: - if (valxor & 0x83) - fdc37c67x_gpio_handler(dev); - dev->regs[0x03] &= 0x83; - break; - case 0x22: - if (valxor & 0x01) - fdc37c67x_fdc_handler(dev); - if (valxor & 0x08) - fdc37c67x_lpt_handler(dev); - if (valxor & 0x10) - fdc37c67x_serial_handler(dev, 0); - if (valxor & 0x20) - fdc37c67x_serial_handler(dev, 1); - break; - case 0x26: - case 0x27: - fdc37c67x_sio_handler(dev); - break; - - default: - break; } - - return; - } - - switch (dev->regs[7]) { - case 0: - /* FDD */ - switch (dev->cur_reg) { - case 0x30: - case 0x60: - case 0x61: - if ((dev->cur_reg == 0x30) && (val & 0x01)) - dev->regs[0x22] |= 0x01; - if (valxor) - fdc37c67x_fdc_handler(dev); - break; - case 0xF0: - if (valxor & 0x01) - fdc_update_enh_mode(dev->fdc, val & 0x01); - if (valxor & 0x10) - fdc_set_swap(dev->fdc, (val & 0x10) >> 4); - break; - case 0xF1: - if (valxor & 0xC) - fdc_update_densel_force(dev->fdc, (val & 0xc) >> 2); - break; - case 0xF2: - if (valxor & 0xC0) - fdc_update_rwc(dev->fdc, 3, (val & 0xc0) >> 6); - if (valxor & 0x30) - fdc_update_rwc(dev->fdc, 2, (val & 0x30) >> 4); - if (valxor & 0x0C) - fdc_update_rwc(dev->fdc, 1, (val & 0x0c) >> 2); - if (valxor & 0x03) - fdc_update_rwc(dev->fdc, 0, (val & 0x03)); - break; - case 0xF4: - if (valxor & 0x18) - fdc_update_drvrate(dev->fdc, 0, (val & 0x18) >> 3); - break; - case 0xF5: - if (valxor & 0x18) - fdc_update_drvrate(dev->fdc, 1, (val & 0x18) >> 3); - break; - case 0xF6: - if (valxor & 0x18) - fdc_update_drvrate(dev->fdc, 2, (val & 0x18) >> 3); - break; - case 0xF7: - if (valxor & 0x18) - fdc_update_drvrate(dev->fdc, 3, (val & 0x18) >> 3); - break; - - default: - break; - } - break; - case 3: - /* Parallel port */ - switch (dev->cur_reg) { - case 0x30: - case 0x60: - case 0x61: - case 0x70: - if ((dev->cur_reg == 0x30) && (val & 0x01)) - dev->regs[0x22] |= 0x08; - if (valxor) - fdc37c67x_lpt_handler(dev); - if (dev->cur_reg == 0x70) - fdc37c67x_smi_handler(dev); - break; - - default: - break; - } - break; - case 4: - /* Serial port 1 */ - switch (dev->cur_reg) { - case 0x30: - case 0x60: - case 0x61: - case 0x70: - if ((dev->cur_reg == 0x30) && (val & 0x01)) - dev->regs[0x22] |= 0x10; - if (valxor) - fdc37c67x_serial_handler(dev, 0); - if (dev->cur_reg == 0x70) - fdc37c67x_smi_handler(dev); - break; - - default: - break; - } - break; - case 5: - /* Serial port 2 */ - switch (dev->cur_reg) { - case 0x30: - case 0x60: - case 0x61: - case 0x70: - if ((dev->cur_reg == 0x30) && (val & 0x01)) - dev->regs[0x22] |= 0x20; - if (valxor) - fdc37c67x_serial_handler(dev, 1); - if (dev->cur_reg == 0x70) - fdc37c67x_smi_handler(dev); - break; - - default: - break; - } - break; - case 8: - /* Auxiliary I/O */ - switch (dev->cur_reg) { - case 0x30: - case 0x60: - case 0x61: - case 0x70: - if (valxor) - fdc37c67x_auxio_handler(dev); - break; - case 0xb4: - case 0xb5: - fdc37c67x_smi_handler(dev); - break; - - default: - break; - } - break; - - default: - break; } } static uint8_t fdc37c67x_read(uint16_t port, void *priv) { - fdc37c67x_t *dev = (fdc37c67x_t *) priv; - uint8_t index = (port & 1) ? 0 : 1; - uint8_t ret = 0xff; - uint16_t smi_stat = pic_get_smi_irq_status(); - int f_irq = dev->ld_regs[0][0x70]; - int p_irq = dev->ld_regs[3][0x70]; - int s1_irq = dev->ld_regs[4][0x70]; - int s2_irq = dev->ld_regs[5][0x70]; + fdc37c67x_t *dev = (fdc37c67x_t *) priv; + uint8_t index = (port & 1) ? 0 : 1; + uint8_t ret = 0xff; + + /* Compaq Presario 4500: Unlock at FB, Register at EA, Data at EB, Lock at F9. */ + if ((port == 0xea) || (port == 0xf9) || (port == 0xfb)) + index = 1; + else if (port == 0xeb) + index = 0; if (dev->locked) { if (index) @@ -478,28 +617,25 @@ fdc37c67x_read(uint16_t port, void *priv) else { if (dev->cur_reg < 0x30) { if (dev->cur_reg == 0x20) - ret = dev->chip_id; + ret = 0x47; else ret = dev->regs[dev->cur_reg]; - } else { - if ((dev->regs[7] == 0) && (dev->cur_reg == 0xF2)) { - ret = (fdc_get_rwc(dev->fdc, 0) | (fdc_get_rwc(dev->fdc, 1) << 2) | (fdc_get_rwc(dev->fdc, 2) << 4) | (fdc_get_rwc(dev->fdc, 3) << 6)); - } else + } else if (dev->regs[7] <= dev->max_ld) { + if ((dev->regs[7] == 0x00) && (dev->cur_reg == 0xf2)) + ret = (fdc_get_rwc(dev->fdc, 0) | (fdc_get_rwc(dev->fdc, 1) << 2) | + (fdc_get_rwc(dev->fdc, 2) << 4) | (fdc_get_rwc(dev->fdc, 3) << 6)); + else if ((dev->regs[7] == 0x08) && (dev->cur_reg == 0xc1)) { + ret = dev->ld_regs[dev->regs[7]][dev->cur_reg] & 0xf0; + for (int i = 0; i < 4; i++) + ret |= (fdc_get_fdd_changed(i) << i); + } else if ((dev->regs[7] == 0x08) && (dev->cur_reg == 0xc2)) + ret = fdc_get_shadow(dev->fdc); + else if ((dev->regs[7] == 0x08) && (dev->cur_reg == 0xc3)) + ret = serial_get_shadow(dev->uart[0]); + else if ((dev->regs[7] == 0x08) && (dev->cur_reg == 0xc4)) + ret = serial_get_shadow(dev->uart[1]); + else if ((dev->regs[7] != 0x06) || (dev->cur_reg != 0xf3)) ret = dev->ld_regs[dev->regs[7]][dev->cur_reg]; - - /* TODO: 8042 P1.2 SMI#. */ - if ((dev->regs[7] == 8) && (dev->cur_reg == 0xb6)) { - ret = dev->ld_regs[dev->regs[7]][dev->cur_reg] & 0xe1; - ret |= ((!!(smi_stat & (1 << p_irq))) << 1); - ret |= ((!!(smi_stat & (1 << s2_irq))) << 2); - ret |= ((!!(smi_stat & (1 << s1_irq))) << 3); - ret |= ((!!(smi_stat & (1 << f_irq))) << 4); - } else if ((dev->regs[7] == 8) && (dev->cur_reg == 0xb7)) { - ret = dev->ld_regs[dev->regs[7]][dev->cur_reg] & 0xec; - ret |= ((!!(smi_stat & (1 << 12))) << 0); - ret |= ((!!(smi_stat & (1 << 1))) << 1); - ret |= ((!!(smi_stat & (1 << 10))) << 4); - } } } } @@ -508,75 +644,86 @@ fdc37c67x_read(uint16_t port, void *priv) } static void -fdc37c67x_reset(fdc37c67x_t *dev) +fdc37c67x_reset(void *priv) { - memset(dev->regs, 0, 48); + fdc37c67x_t *dev = (fdc37c67x_t *) priv; + + memset(dev->regs, 0x00, sizeof(dev->regs)); dev->regs[0x03] = 0x03; - dev->regs[0x20] = dev->chip_id; + dev->regs[0x20] = 0x40; + dev->regs[0x21] = 0x01; dev->regs[0x22] = 0x39; dev->regs[0x24] = 0x04; - dev->regs[0x26] = 0xf0; + dev->regs[0x26] = dev->port_370 ? 0x70 : 0xf0; dev->regs[0x27] = 0x03; - for (uint8_t i = 0; i < 11; i++) - memset(dev->ld_regs[i], 0, 256); + for (uint8_t i = 0; i <= 0x0a; i++) + memset(dev->ld_regs[i], 0x00, 256); /* Logical device 0: FDD */ - dev->ld_regs[0][0x30] = 1; - dev->ld_regs[0][0x60] = 3; - dev->ld_regs[0][0x61] = 0xf0; - dev->ld_regs[0][0x70] = 6; - dev->ld_regs[0][0x74] = 2; - dev->ld_regs[0][0xf0] = 0x0e; - dev->ld_regs[0][0xf2] = 0xff; + dev->ld_regs[0x00][0x30] = 0x00; + dev->ld_regs[0x00][0x60] = 0x03; + dev->ld_regs[0x00][0x61] = 0xf0; + dev->ld_regs[0x00][0x70] = 0x06; + dev->ld_regs[0x00][0x74] = 0x02; + dev->ld_regs[0x00][0xf0] = 0x0e; + dev->ld_regs[0x00][0xf2] = 0xff; /* Logical device 3: Parallel Port */ - dev->ld_regs[3][0x30] = 1; - dev->ld_regs[3][0x60] = 3; - dev->ld_regs[3][0x61] = 0x78; - dev->ld_regs[3][0x70] = 7; - dev->ld_regs[3][0x74] = 4; - dev->ld_regs[3][0xf0] = 0x3c; + dev->ld_regs[0x03][0x30] = 0x00; + dev->ld_regs[0x03][0x60] = 0x03; + dev->ld_regs[0x03][0x61] = 0x78; + dev->ld_regs[0x03][0x70] = 0x07; + dev->ld_regs[0x03][0x74] = 0x04; + dev->ld_regs[0x03][0xf0] = 0x3c; /* Logical device 4: Serial Port 1 */ - dev->ld_regs[4][0x30] = 1; - dev->ld_regs[4][0x60] = 3; - dev->ld_regs[4][0x61] = 0xf8; - dev->ld_regs[4][0x70] = 4; - dev->ld_regs[4][0xf0] = 3; - serial_setup(dev->uart[0], COM1_ADDR, dev->ld_regs[4][0x70]); + dev->ld_regs[0x04][0x30] = 0x00; + dev->ld_regs[0x04][0x60] = 0x03; + dev->ld_regs[0x04][0x61] = 0xf8; + dev->ld_regs[0x04][0x70] = 0x04; + serial_irq(dev->uart[0], dev->ld_regs[4][0x70]); /* Logical device 5: Serial Port 2 */ - dev->ld_regs[5][0x30] = 1; - dev->ld_regs[5][0x60] = 2; - dev->ld_regs[5][0x61] = 0xf8; - dev->ld_regs[5][0x70] = 3; - dev->ld_regs[5][0x74] = 4; - dev->ld_regs[5][0xf1] = 2; - dev->ld_regs[5][0xf2] = 3; - serial_setup(dev->uart[1], COM2_ADDR, dev->ld_regs[5][0x70]); + dev->ld_regs[0x05][0x30] = 0x00; + dev->ld_regs[0x05][0x60] = 0x02; + dev->ld_regs[0x05][0x61] = 0xf8; + dev->ld_regs[0x05][0x70] = 0x03; + dev->ld_regs[0x05][0x74] = 0x04; + dev->ld_regs[0x05][0xf1] = 0x02; + dev->ld_regs[0x05][0xf2] = 0x03; + serial_irq(dev->uart[1], dev->ld_regs[5][0x70]); /* Logical device 7: Keyboard */ - dev->ld_regs[7][0x30] = 1; - dev->ld_regs[7][0x61] = 0x60; - dev->ld_regs[7][0x70] = 1; - dev->ld_regs[7][0x72] = 12; + dev->ld_regs[0x07][0x30] = 0x00; + dev->ld_regs[0x07][0x61] = 0x60; + dev->ld_regs[0x07][0x70] = 0x01; /* Logical device 8: Auxiliary I/O */ - dev->ld_regs[8][0xc0] = 6; - dev->ld_regs[8][0xc1] = 3; + dev->ld_regs[0x08][0x30] = 0x00; + dev->ld_regs[0x08][0x60] = 0x00; + dev->ld_regs[0x08][0x61] = 0x00; + dev->ld_regs[0x08][0xc0] = 0x06; + dev->ld_regs[0x08][0xc1] = 0x03; fdc37c67x_gpio_handler(dev); fdc37c67x_lpt_handler(dev); fdc37c67x_serial_handler(dev, 0); fdc37c67x_serial_handler(dev, 1); - fdc37c67x_auxio_handler(dev); - fdc37c67x_sio_handler(dev); + fdc_clear_flags(dev->fdc, FDC_FLAG_PS2 | FDC_FLAG_PS2_MCA); fdc_reset(dev->fdc); + fdc37c67x_fdc_handler(dev); + for (int i = 0; i < 4; i++) + fdc_set_fdd_changed(i, 1); + + fdc37c67x_kbc_handler(dev); + + fdc37c67x_superio_handler(dev); + dev->locked = 0; } @@ -595,35 +742,65 @@ fdc37c67x_init(const device_t *info) dev->fdc = device_add(&fdc_at_smc_device); - dev->uart[0] = device_add_inst(&ns16550_device, 1); - dev->uart[1] = device_add_inst(&ns16550_device, 2); + dev->uart[0] = device_add_inst(&ns16550_device, 1); + dev->uart[1] = device_add_inst(&ns16550_device, 2); - dev->chip_id = info->local & 0xff; + dev->lpt = device_add_inst(&lpt_port_device, 1); - dev->gpio_regs[0] = 0xff; -#if 0 - dev->gpio_regs[1] = (info->local == 0x0030) ? 0xff : 0xfd; -#endif - dev->gpio_regs[1] = (dev->chip_id == 0x30) ? 0xff : 0xfd; + dev->kbc_type = info->local & FDC37XXXX_KBC; + + dev->is_compaq = (dev->kbc_type == FDC37XXX1); + + dev->port_370 = !!(info->local & FDC37XXXX_370); + + dev->max_ld = 8; + + if (dev->is_compaq) { + io_sethandler(0x0f9, 0x0001, + fdc37c67x_read, NULL, NULL, fdc37c67x_write, NULL, NULL, dev); + io_sethandler(0x0fb, 0x0001, + fdc37c67x_read, NULL, NULL, fdc37c67x_write, NULL, NULL, dev); + } + + switch (dev->kbc_type) { + case FDC37XXX1: + dev->kbc = device_add_params(&kbc_at_device, (void *) KBC_VEN_COMPAQ); + break; + case FDC37XXX2: + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_AMI | 0x00003500)); + break; + case FDC37XXX3: + default: + dev->kbc = device_add(&kbc_at_device); + break; + case FDC37XXX5: + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_PHOENIX | 0x00013800)); + break; + case FDC37XXX7: + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_PHOENIX | 0x00041600)); + break; + } + + /* Set the defaults here so the ports can be removed by fdc37c67x_reset(). */ + dev->fdc_base = 0x03f0; + dev->lpt_base = 0x0378; + dev->uart_base[0] = 0x03f8; + dev->uart_base[1] = 0x02f8; + dev->kbc_base = 0x0060; fdc37c67x_reset(dev); - io_sethandler(FDC_SECONDARY_ADDR, 0x0002, - fdc37c67x_read, NULL, NULL, fdc37c67x_write, NULL, NULL, dev); - io_sethandler(FDC_PRIMARY_ADDR, 0x0002, - fdc37c67x_read, NULL, NULL, fdc37c67x_write, NULL, NULL, dev); - return dev; } const device_t fdc37c67x_device = { - .name = "SMC FDC37C67X Super I/O", + .name = "SMC FDC37C67x Super I/O", .internal_name = "fdc37c67x", .flags = 0, - .local = 0x40, + .local = 0, .init = fdc37c67x_init, .close = fdc37c67x_close, - .reset = NULL, + .reset = fdc37c67x_reset, .available = NULL, .speed_changed = NULL, .force_redraw = NULL, diff --git a/src/sio/sio_fdc37c6xx.c b/src/sio/sio_fdc37c6xx.c index aa66af883..64fa8d6c7 100644 --- a/src/sio/sio_fdc37c6xx.c +++ b/src/sio/sio_fdc37c6xx.c @@ -9,11 +9,9 @@ * Implementation of the SMC FDC37C663 and FDC37C665 Super * I/O Chips. * - * - * * Authors: Miran Grca, * - * Copyright 2016-2020 Miran Grca. + * Copyright 2016-2025 Miran Grca. */ #include #include @@ -32,6 +30,7 @@ #include <86box/fdd.h> #include <86box/fdc.h> #include <86box/sio.h> +#include "cpu.h" typedef struct fdc37c6xx_t { uint8_t max_reg; @@ -44,6 +43,7 @@ typedef struct fdc37c6xx_t { int com4_addr; fdc_t *fdc; serial_t *uart[2]; + lpt_t *lpt; } fdc37c6xx_t; static void @@ -106,26 +106,73 @@ set_serial_addr(fdc37c6xx_t *dev, int port) } static void -lpt1_handler(fdc37c6xx_t *dev) +lpt_handler(fdc37c6xx_t *dev) { - lpt1_remove(); - switch (dev->regs[1] & 3) { - case 1: - lpt1_setup(LPT_MDA_ADDR); - lpt1_irq(LPT_MDA_IRQ); + uint16_t lpt_port = 0x0000; + uint16_t mask = 0xfffc; + uint8_t local_enable = 1; + uint8_t lpt_irq = LPT1_IRQ; + uint8_t lpt_ext = !(dev->regs[1] & 0x08); + uint8_t lpt_mode = (dev->chip_id >= 0x65) ? (dev->regs[4] & 0x03) : 0x00; + + switch (dev->regs[1] & 0x03) { + case 0x01: + lpt_port = LPT_MDA_ADDR; + lpt_irq = LPT_MDA_IRQ; break; - case 2: - lpt1_setup(LPT1_ADDR); - lpt1_irq(LPT1_IRQ /*LPT2_IRQ*/); + case 0x02: + lpt_port = LPT1_ADDR; + lpt_irq = LPT1_IRQ /*LPT2_IRQ*/; break; - case 3: - lpt1_setup(LPT2_ADDR); - lpt1_irq(LPT1_IRQ /*LPT2_IRQ*/); + case 0x03: + lpt_port = LPT2_ADDR; + lpt_irq = LPT1_IRQ /*LPT2_IRQ*/; break; default: + local_enable = 0; break; } + + if (lpt_irq > 15) + lpt_irq = 0xff; + + lpt_port_remove(dev->lpt); + lpt_set_fifo_threshold(dev->lpt, dev->regs[0x0a] & 0x0f); + if (lpt_ext) switch (lpt_mode) { + default: + case 0x00: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 1); + break; + case 0x01: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x02: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + case 0x03: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + } else { + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + } + + if (local_enable && (lpt_port >= 0x0100) && (lpt_port <= (0x0ffc & mask))) + lpt_port_setup(dev->lpt, lpt_port); + + lpt_port_irq(dev->lpt, lpt_irq); } static void @@ -139,19 +186,16 @@ fdc_handler(fdc37c6xx_t *dev) static void ide_handler(fdc37c6xx_t *dev) { - /* TODO: Make an ide_disable(channel) and ide_enable(channel) so we can simplify this. */ - if (dev->has_ide == 2) { - ide_sec_disable(); - ide_set_base(1, (dev->regs[0x05] & 0x02) ? 0x170 : 0x1f0); - ide_set_side(1, (dev->regs[0x05] & 0x02) ? 0x376 : 0x3f6); + if (dev->has_ide > 0) { + int ide_id = dev->has_ide - 1; + + ide_handlers(ide_id, 0); + + ide_set_base_addr(ide_id, 0, (dev->regs[0x05] & 0x02) ? 0x0170 : 0x01f0); + ide_set_base_addr(ide_id, 1, (dev->regs[0x05] & 0x02) ? 0x0376 : 0x03f6); + if (dev->regs[0x00] & 0x01) - ide_sec_enable(); - } else if (dev->has_ide == 1) { - ide_pri_disable(); - ide_set_base(0, (dev->regs[0x05] & 0x02) ? 0x170 : 0x1f0); - ide_set_side(0, (dev->regs[0x05] & 0x02) ? 0x376 : 0x3f6); - if (dev->regs[0x00] & 0x01) - ide_pri_enable(); + ide_handlers(ide_id, 1); } } @@ -175,38 +219,38 @@ fdc37c6xx_write(uint16_t port, uint8_t val, void *priv) dev->regs[dev->cur_reg] = val; switch (dev->cur_reg) { - case 0: + case 0x00: if (dev->has_ide && (valxor & 0x01)) ide_handler(dev); if (valxor & 0x10) fdc_handler(dev); break; - case 1: - if (valxor & 3) - lpt1_handler(dev); + case 0x01: + if (valxor & 0x0b) + lpt_handler(dev); if (valxor & 0x60) { set_com34_addr(dev); set_serial_addr(dev, 0); set_serial_addr(dev, 1); } break; - case 2: - if (valxor & 7) + case 0x02: + if (valxor & 0x07) set_serial_addr(dev, 0); if (valxor & 0x70) set_serial_addr(dev, 1); break; - case 3: - if (valxor & 2) - fdc_update_enh_mode(dev->fdc, (dev->regs[3] & 2) ? 1 : 0); + case 0x03: + if (valxor & 0x02) + fdc_update_enh_mode(dev->fdc, !!(dev->regs[0x03] & 0x02)); break; - case 4: + case 0x04: if (valxor & 0x10) set_serial_addr(dev, 0); if (valxor & 0x20) set_serial_addr(dev, 1); break; - case 5: + case 0x05: if (valxor & 0x01) fdc_handler(dev); if (dev->has_ide && (valxor & 0x02)) @@ -216,6 +260,10 @@ fdc37c6xx_write(uint16_t port, uint8_t val, void *priv) if (valxor & 0x20) fdc_set_swap(dev->fdc, (dev->regs[5] & 0x20) >> 5); break; + case 0x0a: + if (valxor) + lpt_handler(dev); + break; default: break; @@ -232,7 +280,7 @@ fdc37c6xx_read(uint16_t port, void *priv) uint8_t ret = 0xff; if (dev->tries == 2) { - if ((port == 0x3f1) && (dev->cur_reg <= dev->max_reg)) + if ((port == 0x03f1) && (dev->cur_reg <= dev->max_reg)) ret = dev->regs[dev->cur_reg]; } @@ -251,8 +299,8 @@ fdc37c6xx_reset(fdc37c6xx_t *dev) serial_remove(dev->uart[1]); serial_setup(dev->uart[1], COM2_ADDR, COM2_IRQ); - lpt1_remove(); - lpt1_setup(LPT1_ADDR); + lpt_port_remove(dev->lpt); + lpt_port_setup(dev->lpt, LPT1_ADDR); fdc_reset(dev->fdc); fdc_remove(dev->fdc); @@ -293,7 +341,7 @@ fdc37c6xx_reset(fdc37c6xx_t *dev) set_serial_addr(dev, 0); set_serial_addr(dev, 1); - lpt1_handler(dev); + lpt_handler(dev); fdc_handler(dev); @@ -330,175 +378,26 @@ fdc37c6xx_init(const device_t *info) dev->uart[1] = device_add_inst(&ns16450_device, 2); } - io_sethandler(FDC_PRIMARY_ADDR, 0x0002, - fdc37c6xx_read, NULL, NULL, fdc37c6xx_write, NULL, NULL, dev); + dev->lpt = device_add_inst(&lpt_port_device, 1); + lpt_set_cnfgb_readout(dev->lpt, 0x00); + + if (info->local & FDC37C6XX_370) + io_sethandler(FDC_SECONDARY_ADDR, 0x0002, + fdc37c6xx_read, NULL, NULL, fdc37c6xx_write, NULL, NULL, dev); + else + io_sethandler(FDC_PRIMARY_ADDR, 0x0002, + fdc37c6xx_read, NULL, NULL, fdc37c6xx_write, NULL, NULL, dev); fdc37c6xx_reset(dev); return dev; } -/* The three appear to differ only in the chip ID, if I - understood their datasheets correctly. */ -const device_t fdc37c651_device = { - .name = "SMC FDC37C651 Super I/O", - .internal_name = "fdc37c651", +const device_t fdc37c6xx_device = { + .name = "SMC FDC37C6xx Super I/O", + .internal_name = "fdc37c6xx", .flags = 0, - .local = 0x51, - .init = fdc37c6xx_init, - .close = fdc37c6xx_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t fdc37c651_ide_device = { - .name = "SMC FDC37C651 Super I/O (With IDE)", - .internal_name = "fdc37c651_ide", - .flags = 0, - .local = 0x151, - .init = fdc37c6xx_init, - .close = fdc37c6xx_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t fdc37c661_device = { - .name = "SMC FDC37C661 Super I/O", - .internal_name = "fdc37c661", - .flags = 0, - .local = 0x61, - .init = fdc37c6xx_init, - .close = fdc37c6xx_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t fdc37c661_ide_device = { - .name = "SMC FDC37C661 Super I/O (With IDE)", - .internal_name = "fdc37c661_ide", - .flags = 0, - .local = 0x161, - .init = fdc37c6xx_init, - .close = fdc37c6xx_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t fdc37c661_ide_sec_device = { - .name = "SMC FDC37C661 Super I/O (With Secondary IDE)", - .internal_name = "fdc37c661_ide_sec", - .flags = 0, - .local = 0x261, - .init = fdc37c6xx_init, - .close = fdc37c6xx_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t fdc37c663_device = { - .name = "SMC FDC37C663 Super I/O", - .internal_name = "fdc37c663", - .flags = 0, - .local = 0x63, - .init = fdc37c6xx_init, - .close = fdc37c6xx_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t fdc37c663_ide_device = { - .name = "SMC FDC37C663 Super I/O (With IDE)", - .internal_name = "fdc37c663_ide", - .flags = 0, - .local = 0x163, - .init = fdc37c6xx_init, - .close = fdc37c6xx_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t fdc37c665_device = { - .name = "SMC FDC37C665 Super I/O", - .internal_name = "fdc37c665", - .flags = 0, - .local = 0x65, - .init = fdc37c6xx_init, - .close = fdc37c6xx_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t fdc37c665_ide_device = { - .name = "SMC FDC37C665 Super I/O (With IDE)", - .internal_name = "fdc37c665_ide", - .flags = 0, - .local = 0x265, - .init = fdc37c6xx_init, - .close = fdc37c6xx_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t fdc37c665_ide_pri_device = { - .name = "SMC FDC37C665 Super I/O (With Primary IDE)", - .internal_name = "fdc37c665_ide_pri", - .flags = 0, - .local = 0x165, - .init = fdc37c6xx_init, - .close = fdc37c6xx_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t fdc37c665_ide_sec_device = { - .name = "SMC FDC37C665 Super I/O (With Secondary IDE)", - .internal_name = "fdc37c665_ide_sec", - .flags = 0, - .local = 0x265, - .init = fdc37c6xx_init, - .close = fdc37c6xx_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t fdc37c666_device = { - .name = "SMC FDC37C666 Super I/O", - .internal_name = "fdc37c666", - .flags = 0, - .local = 0x66, + .local = 0, .init = fdc37c6xx_init, .close = fdc37c6xx_close, .reset = NULL, diff --git a/src/sio/sio_fdc37c93x.c b/src/sio/sio_fdc37c93x.c index dce5b11dc..47e73ebae 100644 --- a/src/sio/sio_fdc37c93x.c +++ b/src/sio/sio_fdc37c93x.c @@ -6,10 +6,7 @@ * * This file is part of the 86Box distribution. * - * Implementation of the SMC FDC37C932FR and FDC37C935 Super - * I/O Chips. - * - * + * Implementation of the SMC FDC37C93x Super I/O Chips. * * Authors: Miran Grca, * @@ -78,6 +75,7 @@ typedef struct fdc37c93x_t { acpi_t *acpi; void *kbc; serial_t *uart[2]; + lpt_t *lpt; } fdc37c93x_t; static void fdc37c93x_write(uint16_t port, uint8_t val, void *priv); @@ -792,28 +790,64 @@ fdc37c93x_fdc_handler(fdc37c93x_t *dev) static void fdc37c93x_lpt_handler(fdc37c93x_t *dev) { - const uint8_t global_enable = !!(dev->regs[0x22] & (1 << 3)); - const uint8_t local_enable = !!dev->ld_regs[3][0x30]; - uint8_t lpt_irq = dev->ld_regs[3][0x70]; - const uint16_t old_base = dev->lpt_base; + uint16_t ld_port = 0x0000; + uint16_t mask = 0xfffc; + uint8_t global_enable = !!(dev->regs[0x22] & (1 << 3)); + uint8_t local_enable = !!dev->ld_regs[3][0x30]; + uint8_t lpt_irq = dev->ld_regs[3][0x70]; + uint8_t lpt_dma = dev->ld_regs[3][0x74]; + uint8_t lpt_mode = dev->ld_regs[3][0xf0] & 0x07; + uint8_t irq_readout[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x08, + 0x00, 0x10, 0x18, 0x20, 0x00, 0x00, 0x28, 0x30 }; if (lpt_irq > 15) lpt_irq = 0xff; - dev->lpt_base = 0x0000; + if (lpt_dma >= 4) + lpt_dma = 0xff; - if (global_enable && local_enable) - dev->lpt_base = make_port(dev, 3) & 0xfffc; - - if (dev->lpt_base != old_base) { - if ((old_base >= 0x0100) && (old_base <= 0x0ffc)) - lpt1_remove(); - - if ((dev->lpt_base >= 0x0100) && (dev->lpt_base <= 0x0ffc)) - lpt1_setup(dev->lpt_base); + lpt_port_remove(dev->lpt); + lpt_set_fifo_threshold(dev->lpt, (dev->ld_regs[3][0xf0] & 0x78) >> 3); + switch (lpt_mode) { + default: + case 0x04: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x00: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 1); + break; + case 0x01: case 0x05: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x02: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + case 0x03: case 0x07: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; } + if (global_enable && local_enable) { + ld_port = (make_port(dev, 3) & 0xfffc) & mask; + if ((ld_port >= 0x0100) && (ld_port <= (0x0ffc & mask))) + lpt_port_setup(dev->lpt, ld_port); + } + lpt_port_irq(dev->lpt, lpt_irq); + lpt_port_dma(dev->lpt, lpt_dma); - lpt1_irq(lpt_irq); + lpt_set_cnfgb_readout(dev->lpt, ((lpt_irq > 15) ? 0x00 : irq_readout[lpt_irq]) | + ((lpt_dma >= 4) ? 0x00 : lpt_dma)); } static void @@ -823,6 +857,7 @@ fdc37c93x_serial_handler(fdc37c93x_t *dev, const int uart) const uint8_t global_enable = !!(dev->regs[0x22] & (1 << uart_no)); const uint8_t local_enable = !!dev->ld_regs[uart_no][0x30]; const uint16_t old_base = dev->uart_base[uart]; + double clock_src = 24000000.0 / 13.0; dev->uart_base[uart] = 0x0000; @@ -837,13 +872,34 @@ fdc37c93x_serial_handler(fdc37c93x_t *dev, const int uart) serial_setup(dev->uart[uart], dev->uart_base[uart], dev->ld_regs[uart_no][0x70]); } + switch (dev->ld_regs[uart_no][0xf0] & 0x03) { + case 0x00: + clock_src = 24000000.0 / 13.0; + break; + case 0x01: + clock_src = 24000000.0 / 12.0; + break; + case 0x02: + clock_src = 24000000.0 / 1.0; + break; + case 0x03: + clock_src = 24000000.0 / 1.625; + break; + + default: + break; + } + + serial_set_clock_src(dev->uart[uart], clock_src); + /* TODO: If UART 2's own IRQ pin is also enabled when shared, it should also be asserted. */ - if ((dev->chip_id >= FDC37C93X_FR) && (dev->ld_regs[4][0xf0] & 0x80)) - serial_irq(dev->uart[uart], dev->ld_regs[4][0x70]); - else + if ((dev->chip_id >= FDC37C93X_FR) && (dev->ld_regs[4][0xf0] & 0x80)) { + serial_irq(dev->uart[0], dev->ld_regs[4][0x70]); + serial_irq(dev->uart[1], dev->ld_regs[4][0x70]); + } else serial_irq(dev->uart[uart], dev->ld_regs[uart_no][0x70]); } @@ -855,9 +911,11 @@ fdc37c93x_nvr_pri_handler(const fdc37c93x_t *dev) if (dev->chip_id != 0x02) local_enable &= ((dev->ld_regs[6][0xf0] & 0x90) != 0x80); - nvr_at_handler(0, 0x70, dev->nvr); - if (local_enable) - nvr_at_handler(1, 0x70, dev->nvr); + if (dev->has_nvr) { + nvr_at_handler(0, 0x70, dev->nvr); + if (local_enable) + nvr_at_handler(1, 0x70, dev->nvr); + } } static void @@ -875,12 +933,12 @@ fdc37c93x_nvr_sec_handler(fdc37c93x_t *dev) dev->nvr_sec_base = make_port_sec(dev, 6) & 0xfffe; if (dev->nvr_sec_base != old_base) { - if ((old_base > 0x0000) && (old_base <= 0x0ffe)) + if (dev->has_nvr && (old_base > 0x0000) && (old_base <= 0x0ffe)) nvr_at_sec_handler(0, dev->nvr_sec_base, dev->nvr); /* Datasheet erratum: First it says minimum address is 0x0100, but later implies that it's 0x0000 and that default is 0x0070, same as (unrelocatable) primary NVR. */ - if ((dev->nvr_sec_base > 0x0000) && (dev->nvr_sec_base <= 0x0ffe)) + if (dev->has_nvr && (dev->nvr_sec_base > 0x0000) && (dev->nvr_sec_base <= 0x0ffe)) nvr_at_sec_handler(1, dev->nvr_sec_base, dev->nvr); } } @@ -895,6 +953,9 @@ fdc37c93x_kbc_handler(fdc37c93x_t *dev) if (dev->kbc_base != old_base) kbc_at_handler(local_enable, dev->kbc_base, dev->kbc); + + kbc_at_set_irq(0, dev->ld_regs[7][0x70], dev->kbc); + kbc_at_set_irq(1, dev->ld_regs[7][0x72], dev->kbc); } static void @@ -1036,6 +1097,7 @@ fdc37c93x_write(uint16_t port, uint8_t val, void *priv) break; case 0x03: dev->regs[dev->cur_reg] = val & 0x83; + fdc37c93x_gpio_handler(dev); break; case 0x07: case 0x26: case 0x2e ... 0x2f: @@ -1116,6 +1178,17 @@ fdc37c93x_write(uint16_t port, uint8_t val, void *priv) if (valxor & 0x01) fdc_update_enh_mode(dev->fdc, val & 0x01); + if (valxor & 0x0c) { + fdc_clear_flags(dev->fdc, FDC_FLAG_PS2 | FDC_FLAG_PS2_MCA); + switch (val & 0x0c) { + case 0x00: + fdc_set_flags(dev->fdc, FDC_FLAG_PS2); + break; + case 0x04: + fdc_set_flags(dev->fdc, FDC_FLAG_PS2_MCA); + break; + } + } if (valxor & 0x10) fdc_set_swap(dev->fdc, (val & 0x10) >> 4); break; @@ -1194,8 +1267,20 @@ fdc37c93x_write(uint16_t port, uint8_t val, void *priv) if (valxor) fdc37c93x_lpt_handler(dev); break; + /* + Bits 2:0: Mode: + - 000: Bi-directional (SPP); + - 001: EPP-1.9 and SPP; + - 010: ECP; + - 011: ECP and EPP-1.9; + - 101: EPP-1.7 and SPP; + - 110: ECP and EPP-1.7. + Bits 6:3: ECP FIFO Threshold. + */ case 0xf0: dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + if (valxor & 0x7f) + fdc37c93x_lpt_handler(dev); break; case 0xf1: if (dev->chip_id >= FDC37C93X_FR) @@ -1215,7 +1300,6 @@ fdc37c93x_write(uint16_t port, uint8_t val, void *priv) if (valxor) fdc37c93x_serial_handler(dev, 0); break; - /* TODO: Bit 0 = MIDI Mode, Bit 1 = High speed. */ case 0xf0: if (dev->chip_id >= FDC37C93X_FR) { dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x83; @@ -1246,7 +1330,6 @@ fdc37c93x_write(uint16_t port, uint8_t val, void *priv) fdc37c93x_serial_handler(dev, 1); } break; - /* TODO: Bit 0 = MIDI Mode, Bit 1 = High speed. */ case 0xf0: dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x03; @@ -1288,7 +1371,7 @@ fdc37c93x_write(uint16_t port, uint8_t val, void *priv) else dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x8f; - if (valxor) { + if (dev->has_nvr && valxor) { nvr_lock_set(0x80, 0x20, !!(dev->ld_regs[6][dev->cur_reg] & 0x01), dev->nvr); nvr_lock_set(0xa0, 0x20, !!(dev->ld_regs[6][dev->cur_reg] & 0x02), dev->nvr); nvr_lock_set(0xc0, 0x20, !!(dev->ld_regs[6][dev->cur_reg] & 0x04), dev->nvr); @@ -1348,7 +1431,7 @@ fdc37c93x_write(uint16_t port, uint8_t val, void *priv) case 0x07: /* Keyboard */ switch (dev->cur_reg) { case 0x30: - case 0x70: case 0x71: + case 0x70: case 0x72: dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; if (valxor) @@ -1521,8 +1604,6 @@ fdc37c93x_read(uint16_t port, void *priv) if ((dev->regs[7] == 0x00) && (dev->cur_reg == 0xf2)) ret = (fdc_get_rwc(dev->fdc, 0) | (fdc_get_rwc(dev->fdc, 1) << 2) | (fdc_get_rwc(dev->fdc, 2) << 4) | (fdc_get_rwc(dev->fdc, 3) << 6)); - else if ((dev->regs[7] != 0x06) || (dev->cur_reg != 0xf3)) - ret = dev->ld_regs[dev->regs[7]][dev->cur_reg]; else if ((dev->regs[7] == 0x08) && (dev->cur_reg >= 0xf6) && (dev->cur_reg <= 0xfb) && (dev->chip_id >= FDC37C93X_FR)) switch (dev->cur_reg) { @@ -1568,7 +1649,8 @@ fdc37c93x_read(uint16_t port, void *priv) ret |= fdc37c93x_read_gp(dev, 7, i); } break; - } + } else if ((dev->regs[7] != 0x06) || (dev->cur_reg != 0xf3)) + ret = dev->ld_regs[dev->regs[7]][dev->cur_reg]; } } } @@ -1577,8 +1659,10 @@ fdc37c93x_read(uint16_t port, void *priv) } static void -fdc37c93x_reset(fdc37c93x_t *dev) +fdc37c93x_reset(void *priv) { + fdc37c93x_t *dev = (fdc37c93x_t *) priv; + memset(dev->regs, 0x00, sizeof(dev->regs)); dev->regs[0x03] = 0x03; @@ -1657,6 +1741,7 @@ fdc37c93x_reset(fdc37c93x_t *dev) dev->ld_regs[0x07][0x30] = 0x00; dev->ld_regs[0x07][0x61] = 0x60; dev->ld_regs[0x07][0x70] = 0x01; + dev->ld_regs[0x07][0x72] = 0x0c; /* Logical device 8: Auxiliary I/O */ dev->ld_regs[0x08][0x30] = 0x00; @@ -1701,7 +1786,9 @@ fdc37c93x_reset(fdc37c93x_t *dev) if (dev->is_apm) fdc37c93x_acpi_handler(dev); + fdc_clear_flags(dev->fdc, FDC_FLAG_PS2 | FDC_FLAG_PS2_MCA); fdc_reset(dev->fdc); + fdc37c93x_fdc_handler(dev); if (dev->has_nvr) { @@ -1721,11 +1808,6 @@ fdc37c93x_reset(fdc37c93x_t *dev) if (dev->chip_id != 0x02) fdc37c93x_superio_handler(dev); - if (dev->chip_id >= FDC37C93X_FR) { - serial_set_clock_src(dev->uart[0], 24000000.0); - serial_set_clock_src(dev->uart[1], 24000000.0); - } - memset(dev->gpio_regs, 0xff, 256); memset(dev->gpio_pulldn, 0xff, 8); @@ -1798,14 +1880,16 @@ fdc37c93x_init(const device_t *info) dev->uart[0] = device_add_inst(&ns16550_device, 1); dev->uart[1] = device_add_inst(&ns16550_device, 2); + dev->lpt = device_add_inst(&lpt_port_device, 1); + dev->chip_id = info->local & FDC37C93X_CHIP_ID; - dev->kbc_type = info->local & FDC37C93X_KBC; + dev->kbc_type = info->local & FDC37XXXX_KBC; dev->is_apm = (dev->chip_id == FDC37C93X_APM); - dev->is_compaq = (dev->kbc_type == FDC37C931); + dev->is_compaq = (dev->kbc_type == FDC37XXX1); dev->has_nvr = !(info->local & FDC37C93X_NO_NVR); - dev->port_370 = !!(info->local & FDC37C93X_370); + dev->port_370 = !!(info->local & FDC37XXXX_370); if (dev->has_nvr) { dev->nvr = device_add(&amstrad_megapc_nvr_device); @@ -1834,21 +1918,21 @@ fdc37c93x_init(const device_t *info) } switch (dev->kbc_type) { - case FDC37C931: - dev->kbc = device_add(&keyboard_ps2_compaq_device); + case FDC37XXX1: + dev->kbc = device_add_params(&kbc_at_device, (void *) KBC_VEN_COMPAQ); break; - case FDC37C932: - dev->kbc = device_add(&keyboard_ps2_intel_ami_pci_device); + case FDC37XXX2: + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_AMI | 0x00003500)); break; - case FDC37C933: + case FDC37XXX3: default: - dev->kbc = device_add(&keyboard_ps2_pci_device); + dev->kbc = device_add(&kbc_at_device); break; - case FDC37C935: - dev->kbc = device_add(&keyboard_ps2_phoenix_device); + case FDC37XXX5: + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_PHOENIX | 0x00013800)); break; - case FDC37C937: - dev->kbc = device_add(&keyboard_ps2_phoenix_pci_device); + case FDC37XXX7: + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_PHOENIX | 0x00041600)); break; } @@ -1881,7 +1965,7 @@ const device_t fdc37c93x_device = { .local = 0, .init = fdc37c93x_init, .close = fdc37c93x_close, - .reset = NULL, + .reset = fdc37c93x_reset, .available = NULL, .speed_changed = NULL, .force_redraw = NULL, diff --git a/src/sio/sio_fdc37m60x.c b/src/sio/sio_fdc37m60x.c index 11d2f3349..e6470a6ea 100644 --- a/src/sio/sio_fdc37m60x.c +++ b/src/sio/sio_fdc37m60x.c @@ -6,252 +6,535 @@ * * This file is part of the 86Box distribution. * - * Emulation of the SMSC FDC37M60x Super I/O + * Implementation of the SMC FDC37M60x Super I/O Chips. * + * Authors: Miran Grca, * - * - * Authors: Tiseno100 - * - * Copyright 2020 Tiseno100 + * Copyright 2025 Miran Grca. */ -#include -#include +#include #include +#include #include #include #include -#define HAVE_STDARG_H #include <86box/86box.h> #include <86box/io.h> #include <86box/timer.h> #include <86box/device.h> -#include <86box/keyboard.h> +#include <86box/pci.h> +#include <86box/pic.h> #include <86box/lpt.h> #include <86box/serial.h> #include <86box/hdc.h> #include <86box/hdc_ide.h> #include <86box/fdd.h> #include <86box/fdc.h> +#include <86box/keyboard.h> +#include <86box/machine.h> +#include <86box/apm.h> +#include <86box/plat.h> +#include <86box/plat_unused.h> +#include <86box/video.h> #include <86box/sio.h> - -#define SIO_INDEX_PORT dev->sio_index_port -#define INDEX dev->index - -/* Current Logical Device Number */ -#define CURRENT_LOGICAL_DEVICE dev->regs[0x07] - -/* Global Device Configuration */ -#define ENABLED(ld) dev->device_regs[ld][0x30] -#define BASE_ADDRESS(ld) ((dev->device_regs[ld][0x60] << 8) | (dev->device_regs[ld][0x61])) -#define IRQ(ld) dev->device_regs[ld][0x70] -#define DMA(ld) dev->device_regs[ld][0x74] - -/* Miscellaneous Chip Functionality */ -#define SOFT_RESET (val & 0x01) -#define POWER_CONTROL dev->regs[0x22] - -#ifdef ENABLE_FDC37M60X_LOG -int fdc37m60x_do_log = ENABLE_FDC37M60X_LOG; - -static void -fdc37m60x_log(const char *fmt, ...) -{ - va_list ap; - - if (fdc37m60x_do_log) { - va_start(ap, fmt); - pclog_ex(fmt, ap); - va_end(ap); - } -} -#else -# define fdc37m60x_log(fmt, ...) -#endif +#include "cpu.h" typedef struct fdc37m60x_t { - uint8_t index; - uint8_t regs[256]; - uint8_t device_regs[10][256]; - uint8_t cfg_lock; - uint8_t ide_function; - uint16_t sio_index_port; - - fdc_t *fdc; - serial_t *uart[2]; - + uint8_t is_compaq; + uint8_t max_ld; + uint8_t tries; + uint8_t port_370; + uint8_t regs[48]; + uint8_t ld_regs[11][256]; + uint16_t kbc_type; + uint16_t superio_base; + uint16_t fdc_base; + uint16_t lpt_base; + uint16_t kbc_base; + uint16_t uart_base[2]; + int locked; + int cur_reg; + fdc_t *fdc; + void *kbc; + serial_t *uart[2]; + lpt_t *lpt; } fdc37m60x_t; -static void fdc37m60x_fdc_handler(fdc37m60x_t *dev); -static void fdc37m60x_uart_handler(uint8_t num, fdc37m60x_t *dev); -static void fdc37m60x_lpt_handler(fdc37m60x_t *dev); -static void fdc37m60x_logical_device_handler(fdc37m60x_t *dev); -static void fdc37m60x_reset(void *priv); +static void fdc37m60x_write(uint16_t port, uint8_t val, void *priv); +static uint8_t fdc37m60x_read(uint16_t port, void *priv); -static void -fdc37m60x_write(uint16_t addr, uint8_t val, void *priv) +static uint16_t +make_port_superio(const fdc37m60x_t *dev) { - fdc37m60x_t *dev = (fdc37m60x_t *) priv; + const uint16_t r0 = dev->regs[0x26]; + const uint16_t r1 = dev->regs[0x27]; - if (addr & 1) { - if (!dev->cfg_lock) { - switch (INDEX) { - /* Global Configuration */ - case 0x02: - dev->regs[INDEX] = val; - if (SOFT_RESET) - fdc37m60x_reset(dev); - break; + const uint16_t p = (r1 << 8) + r0; - case 0x07: - CURRENT_LOGICAL_DEVICE = val; - break; - - case 0x22: - POWER_CONTROL = val & 0x3f; - break; - - case 0x23: - dev->regs[INDEX] = val & 0x3f; - break; - - case 0x24: - dev->regs[INDEX] = val & 0x4e; - break; - - case 0x2b: - case 0x2c: - case 0x2d: - case 0x2e: - case 0x2f: - dev->regs[INDEX] = val; - break; - - /* Device Configuration */ - case 0x30: - case 0x60: - case 0x61: - case 0x70: - case 0x74: - case 0xf0: - case 0xf1: - case 0xf2: - case 0xf3: - case 0xf4: - case 0xf5: - case 0xf6: - case 0xf7: - if (CURRENT_LOGICAL_DEVICE <= 0x81) /* Avoid Overflow */ - dev->device_regs[CURRENT_LOGICAL_DEVICE][INDEX] = (INDEX == 0x30) ? (val & 1) : val; - fdc37m60x_logical_device_handler(dev); - break; - - default: - break; - } - } - } else { - /* Enter/Escape Configuration Mode */ - if (val == 0x55) - dev->cfg_lock = 0; - else if (!dev->cfg_lock && (val == 0xaa)) - dev->cfg_lock = 1; - else if (!dev->cfg_lock) - INDEX = val; - } + return p; } -static uint8_t -fdc37m60x_read(uint16_t addr, void *priv) +static uint16_t +make_port(const fdc37m60x_t *dev, const uint8_t ld) { - const fdc37m60x_t *dev = (fdc37m60x_t *) priv; - uint8_t ret = 0xff; + const uint16_t r0 = dev->ld_regs[ld][0x60]; + const uint16_t r1 = dev->ld_regs[ld][0x61]; - if (addr & 1) - ret = (INDEX >= 0x30) ? dev->device_regs[CURRENT_LOGICAL_DEVICE][INDEX] : dev->regs[INDEX]; + const uint16_t p = (r0 << 8) + r1; - return ret; + return p; +} + +static void +fdc37m60x_superio_handler(fdc37m60x_t *dev) +{ + if (!dev->is_compaq) { + if (dev->superio_base != 0x0000) + io_removehandler(dev->superio_base, 0x0002, + fdc37m60x_read, NULL, NULL, fdc37m60x_write, NULL, NULL, dev); + dev->superio_base = make_port_superio(dev); + if (dev->superio_base != 0x0000) + io_sethandler(dev->superio_base, 0x0002, + fdc37m60x_read, NULL, NULL, fdc37m60x_write, NULL, NULL, dev); + } } static void fdc37m60x_fdc_handler(fdc37m60x_t *dev) { - fdc_remove(dev->fdc); + const uint8_t global_enable = !!(dev->regs[0x22] & (1 << 0)); + const uint8_t local_enable = !!dev->ld_regs[0][0x30]; + const uint16_t old_base = dev->fdc_base; - if (ENABLED(0) || (POWER_CONTROL & 0x01)) { - fdc_set_base(dev->fdc, BASE_ADDRESS(0)); - fdc_set_irq(dev->fdc, IRQ(0) & 0xf); - fdc_set_dma_ch(dev->fdc, DMA(0) & 0x07); - fdc37m60x_log("SMC60x-FDC: BASE %04x IRQ %d DMA %d\n", BASE_ADDRESS(0), IRQ(0) & 0xf, DMA(0) & 0x07); + dev->fdc_base = 0x0000; + + if (global_enable && local_enable) + dev->fdc_base = make_port(dev, 0) & 0xfff8; + + if (dev->fdc_base != old_base) { + if ((old_base >= 0x0100) && (old_base <= 0x0ff8)) + fdc_remove(dev->fdc); + + if ((dev->fdc_base >= 0x0100) && (dev->fdc_base <= 0x0ff8)) + fdc_set_base(dev->fdc, dev->fdc_base); } - - fdc_update_enh_mode(dev->fdc, dev->device_regs[0][0xf0] & 0x01); - - fdc_update_densel_force(dev->fdc, (dev->device_regs[0][0xf1] & 0xc) >> 2); - - fdc_update_rwc(dev->fdc, 3, (dev->device_regs[0][0xf2] & 0xc0) >> 6); - fdc_update_rwc(dev->fdc, 2, (dev->device_regs[0][0xf2] & 0x30) >> 4); - fdc_update_rwc(dev->fdc, 1, (dev->device_regs[0][0xf2] & 0x0c) >> 2); - fdc_update_rwc(dev->fdc, 0, (dev->device_regs[0][0xf2] & 0x03)); - - fdc_update_drvrate(dev->fdc, 0, (dev->device_regs[0][0xf4] & 0x18) >> 3); - fdc_update_drvrate(dev->fdc, 1, (dev->device_regs[0][0xf5] & 0x18) >> 3); - fdc_update_drvrate(dev->fdc, 2, (dev->device_regs[0][0xf6] & 0x18) >> 3); - fdc_update_drvrate(dev->fdc, 3, (dev->device_regs[0][0xf7] & 0x18) >> 3); } static void -fdc37m60x_uart_handler(uint8_t num, fdc37m60x_t *dev) -{ - serial_remove(dev->uart[num & 1]); - - if (ENABLED(4 + (num & 1)) || (POWER_CONTROL & (1 << (4 + (num & 1))))) { - serial_setup(dev->uart[num & 1], BASE_ADDRESS(4 + (num & 1)), IRQ(4 + (num & 1)) & 0xf); - fdc37m60x_log("SMC60x-UART%d: BASE %04x IRQ %d\n", num & 1, BASE_ADDRESS(4 + (num & 1)), IRQ(4 + (num & 1)) & 0xf); - } -} - -void fdc37m60x_lpt_handler(fdc37m60x_t *dev) { - lpt1_remove(); + uint16_t ld_port = 0x0000; + uint16_t mask = 0xfffc; + uint8_t global_enable = !!(dev->regs[0x22] & (1 << 3)); + uint8_t local_enable = !!dev->ld_regs[3][0x30]; + uint8_t lpt_irq = dev->ld_regs[3][0x70]; + uint8_t lpt_dma = dev->ld_regs[3][0x74]; + uint8_t lpt_mode = dev->ld_regs[3][0xf0] & 0x07; + uint8_t irq_readout[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x08, + 0x00, 0x10, 0x18, 0x20, 0x00, 0x00, 0x28, 0x30 }; - if (ENABLED(3) || (POWER_CONTROL & 0x08)) { - lpt1_setup(BASE_ADDRESS(3)); - lpt1_irq(IRQ(3) & 0xf); - fdc37m60x_log("SMC60x-LPT: BASE %04x IRQ %d\n", BASE_ADDRESS(3), IRQ(3) & 0xf); + if (lpt_irq > 15) + lpt_irq = 0xff; + + if (lpt_dma >= 4) + lpt_dma = 0xff; + + lpt_port_remove(dev->lpt); + lpt_set_fifo_threshold(dev->lpt, (dev->ld_regs[3][0xf0] & 0x78) >> 3); + switch (lpt_mode) { + default: + case 0x04: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x00: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 1); + break; + case 0x01: case 0x05: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x02: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + case 0x03: case 0x07: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; } + if (global_enable && local_enable) { + ld_port = (make_port(dev, 3) & 0xfffc) & mask; + if ((ld_port >= 0x0100) && (ld_port <= (0x0ffc & mask))) + lpt_port_setup(dev->lpt, ld_port); + } + lpt_port_irq(dev->lpt, lpt_irq); + lpt_port_dma(dev->lpt, lpt_dma); + + lpt_set_cnfgb_readout(dev->lpt, ((lpt_irq > 15) ? 0x00 : irq_readout[lpt_irq]) | + ((lpt_dma >= 4) ? 0x00 : lpt_dma)); } -void -fdc37m60x_logical_device_handler(fdc37m60x_t *dev) +static void +fdc37m60x_serial_handler(fdc37m60x_t *dev, const int uart) { - /* Register 07h: - Device 0: FDC - Device 3: LPT - Device 4: UART1 - Device 5: UART2 - */ + const uint8_t uart_no = 4 + uart; + const uint8_t global_enable = !!(dev->regs[0x22] & (1 << uart_no)); + const uint8_t local_enable = !!dev->ld_regs[uart_no][0x30]; + const uint16_t old_base = dev->uart_base[uart]; + double clock_src = 24000000.0 / 13.0; - switch (CURRENT_LOGICAL_DEVICE) { + dev->uart_base[uart] = 0x0000; + + if (global_enable && local_enable) + dev->uart_base[uart] = make_port(dev, uart_no) & 0xfff8; + + if (dev->uart_base[uart] != old_base) { + if ((old_base >= 0x0100) && (old_base <= 0x0ff8)) + serial_remove(dev->uart[uart]); + + if ((dev->uart_base[uart] >= 0x0100) && (dev->uart_base[uart] <= 0x0ff8)) + serial_setup(dev->uart[uart], dev->uart_base[uart], dev->ld_regs[uart_no][0x70]); + } + + switch (dev->ld_regs[uart_no][0xf0] & 0x03) { case 0x00: - fdc37m60x_fdc_handler(dev); + clock_src = 24000000.0 / 13.0; + break; + case 0x01: + clock_src = 24000000.0 / 12.0; + break; + case 0x02: + clock_src = 24000000.0 / 1.0; break; - case 0x03: - fdc37m60x_lpt_handler(dev); - break; - - case 0x04: - fdc37m60x_uart_handler(0, dev); - break; - - case 0x05: - fdc37m60x_uart_handler(1, dev); + clock_src = 24000000.0 / 1.625; break; default: break; } + + serial_set_clock_src(dev->uart[uart], clock_src); + + /* + TODO: If UART 2's own IRQ pin is also enabled when shared, + it should also be asserted. + */ + if (dev->ld_regs[4][0xf0] & 0x80) { + serial_irq(dev->uart[0], dev->ld_regs[4][0x70]); + serial_irq(dev->uart[1], dev->ld_regs[4][0x70]); + } else + serial_irq(dev->uart[uart], dev->ld_regs[uart_no][0x70]); +} + +static void +fdc37m60x_kbc_handler(fdc37m60x_t *dev) +{ + const uint8_t local_enable = !!dev->ld_regs[7][0x30]; + const uint16_t old_base = dev->kbc_base; + + dev->kbc_base = local_enable ? 0x0060 : 0x0000; + + if (dev->kbc_base != old_base) + kbc_at_handler(local_enable, dev->kbc_base, dev->kbc); + + kbc_at_set_irq(0, dev->ld_regs[7][0x70], dev->kbc); + kbc_at_set_irq(1, dev->ld_regs[7][0x72], dev->kbc); +} + +static void +fdc37m60x_state_change(fdc37m60x_t *dev, const uint8_t locked) +{ + dev->locked = locked; + fdc_3f1_enable(dev->fdc, !locked); +} + +static void +fdc37m60x_write(uint16_t port, uint8_t val, void *priv) +{ + fdc37m60x_t *dev = (fdc37m60x_t *) priv; + uint8_t index = !(port & 1); + uint8_t valxor; + + if (port == 0x00fb) { + fdc37m60x_state_change(dev, 1); + dev->tries = 0; + } else if (port == 0x00f9) + fdc37m60x_state_change(dev, 0); + else if (index) { + if ((!dev->is_compaq) && (val == 0x55) && !dev->locked) { + fdc37m60x_state_change(dev, 1); + dev->tries = 0; + } else if (dev->locked) { + if ((!dev->is_compaq) && (val == 0xaa)) + fdc37m60x_state_change(dev, 0); + else + dev->cur_reg = val; + } else if ((!dev->is_compaq) && dev->tries) + dev->tries = 0; + } else if (dev->locked) { + if (dev->cur_reg < 0x30) { + valxor = val ^ dev->regs[dev->cur_reg]; + + switch (dev->cur_reg) { + case 0x02: + dev->regs[dev->cur_reg] = val; + if (val == 0x02) + fdc37m60x_state_change(dev, 0); + break; + case 0x07: case 0x26: + case 0x2b ... 0x2f: + dev->regs[dev->cur_reg] = val; + break; + case 0x22: + dev->regs[dev->cur_reg] = val & 0x39; + + if (valxor & 0x01) + fdc37m60x_fdc_handler(dev); + if (valxor & 0x08) + fdc37m60x_lpt_handler(dev); + if (valxor & 0x10) + fdc37m60x_serial_handler(dev, 0); + if (valxor & 0x20) + fdc37m60x_serial_handler(dev, 1); + break; + case 0x23: + dev->regs[dev->cur_reg] = val & 0x39; + break; + case 0x24: + dev->regs[dev->cur_reg] = val & 0x4e; + break; + case 0x27: + dev->regs[dev->cur_reg] = val; + fdc37m60x_superio_handler(dev); + break; + default: + break; + } + } else { + valxor = val ^ dev->ld_regs[dev->regs[7]][dev->cur_reg]; + + if (dev->regs[7] <= dev->max_ld) switch (dev->regs[7]) { + case 0x00: /* FDD */ + switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x70: + case 0x74: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if ((dev->cur_reg == 0x30) && (val & 0x01)) + dev->regs[0x22] |= 0x01; + if (valxor) + fdc37m60x_fdc_handler(dev); + break; + case 0xf0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0xef; + + if (valxor & 0x01) + fdc_update_enh_mode(dev->fdc, val & 0x01); + if (valxor & 0x0c) { + fdc_clear_flags(dev->fdc, FDC_FLAG_PS2 | FDC_FLAG_PS2_MCA); + switch (val & 0x0c) { + case 0x00: + fdc_set_flags(dev->fdc, FDC_FLAG_PS2); + break; + case 0x04: + fdc_set_flags(dev->fdc, FDC_FLAG_PS2_MCA); + break; + } + } + if (valxor & 0x10) + fdc_set_swap(dev->fdc, (val & 0x10) >> 4); + break; + case 0xf1: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0xfc; + + if (valxor & 0x0c) + fdc_update_densel_force(dev->fdc, (val & 0xc) >> 2); + break; + case 0xf2: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if (valxor & 0xc0) + fdc_update_rwc(dev->fdc, 3, (val & 0xc0) >> 6); + if (valxor & 0x30) + fdc_update_rwc(dev->fdc, 2, (val & 0x30) >> 4); + if (valxor & 0x0c) + fdc_update_rwc(dev->fdc, 1, (val & 0x0c) >> 2); + if (valxor & 0x03) + fdc_update_rwc(dev->fdc, 0, (val & 0x03)); + break; + case 0xf4 ... 0xf7: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x5b; + + if (valxor & 0x18) + fdc_update_drvrate(dev->fdc, dev->cur_reg - 0xf4, + (val & 0x18) >> 3); + break; + } + break; + case 0x03: /* Parallel Port */ + switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x70: + case 0x74: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if ((dev->cur_reg == 0x30) && (val & 0x01)) + dev->regs[0x22] |= 0x08; + if (valxor) + fdc37m60x_lpt_handler(dev); + break; + case 0xf0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + if (valxor & 0x7f) + fdc37m60x_lpt_handler(dev); + break; + } + break; + case 0x04: /* Serial port 1 */ + switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x70: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if ((dev->cur_reg == 0x30) && (val & 0x01)) + dev->regs[0x22] |= 0x10; + if (valxor) + fdc37m60x_serial_handler(dev, 0); + break; + case 0xf0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x83; + + if (valxor & 0x83) { + fdc37m60x_serial_handler(dev, 0); + fdc37m60x_serial_handler(dev, 1); + } + break; + } + break; + case 0x05: /* Serial port 2 */ + switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x62: case 0x63: + case 0x70: + case 0x74: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if ((dev->cur_reg == 0x30) && (val & 0x01)) + dev->regs[0x22] |= 0x20; + if (valxor) + fdc37m60x_serial_handler(dev, 1); + break; + case 0xf0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x03; + + if (valxor & 0x03) { + fdc37m60x_serial_handler(dev, 0); + fdc37m60x_serial_handler(dev, 1); + } + break; + case 0xf1: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x7f; + break; + case 0xf2: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + break; + } + break; + case 0x07: /* Keyboard */ + switch (dev->cur_reg) { + case 0x30: + case 0x70: case 0x72: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if (valxor) + fdc37m60x_kbc_handler(dev); + break; + case 0xf0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x84; + break; + } + break; + case 0x08: /* Aux. I/O */ + switch (dev->cur_reg) { + case 0x30: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + break; + case 0xb8: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + break; + case 0xc0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = (dev->ld_regs[dev->regs[7]][dev->cur_reg] & 0xe4) | (val & 0x1b); + break; + case 0xc1: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x0f; + for (int i = 0; i < 4; i++) + fdc_set_fdd_changed(i, !!(val & (1 << i))); + break; + } + break; + } + } + } +} + +static uint8_t +fdc37m60x_read(uint16_t port, void *priv) +{ + fdc37m60x_t *dev = (fdc37m60x_t *) priv; + uint8_t index = (port & 1) ? 0 : 1; + uint8_t ret = 0xff; + + /* Compaq Presario 4500: Unlock at FB, Register at EA, Data at EB, Lock at F9. */ + if ((port == 0xea) || (port == 0xf9) || (port == 0xfb)) + index = 1; + else if (port == 0xeb) + index = 0; + + if (dev->locked) { + if (index) + ret = dev->cur_reg; + else { + if (dev->cur_reg < 0x30) { + if (dev->cur_reg == 0x20) + ret = 0x47; + else + ret = dev->regs[dev->cur_reg]; + } else if (dev->regs[7] <= dev->max_ld) { + if ((dev->regs[7] == 0x00) && (dev->cur_reg == 0xf2)) + ret = (fdc_get_rwc(dev->fdc, 0) | (fdc_get_rwc(dev->fdc, 1) << 2) | + (fdc_get_rwc(dev->fdc, 2) << 4) | (fdc_get_rwc(dev->fdc, 3) << 6)); + else if ((dev->regs[7] == 0x08) && (dev->cur_reg == 0xc1)) { + ret = dev->ld_regs[dev->regs[7]][dev->cur_reg] & 0xf0; + for (int i = 0; i < 4; i++) + ret |= (fdc_get_fdd_changed(i) << i); + } else if ((dev->regs[7] == 0x08) && (dev->cur_reg == 0xc2)) + ret = fdc_get_shadow(dev->fdc); + else if ((dev->regs[7] == 0x08) && (dev->cur_reg == 0xc3)) + ret = serial_get_shadow(dev->uart[0]); + else if ((dev->regs[7] == 0x08) && (dev->cur_reg == 0xc4)) + ret = serial_get_shadow(dev->uart[1]); + else if ((dev->regs[7] != 0x06) || (dev->cur_reg != 0xf3)) + ret = dev->ld_regs[dev->regs[7]][dev->cur_reg]; + } + } + } + + return ret; } static void @@ -259,40 +542,80 @@ fdc37m60x_reset(void *priv) { fdc37m60x_t *dev = (fdc37m60x_t *) priv; - memset(dev->regs, 0, sizeof(dev->regs)); - for (uint8_t i = 0; i < 10; i++) - memset(dev->device_regs[i], 0, sizeof(dev->device_regs[i])); + memset(dev->regs, 0x00, sizeof(dev->regs)); dev->regs[0x20] = 0x47; + dev->regs[0x22] = 0x39; dev->regs[0x24] = 0x04; - dev->regs[0x26] = SIO_INDEX_PORT & 0xf; - dev->regs[0x27] = (SIO_INDEX_PORT >> 4) & 0xf; + dev->regs[0x26] = dev->port_370 ? 0x70 : 0xf0; + dev->regs[0x27] = 0x03; - /* FDC Registers */ - dev->device_regs[0][0x60] = 0x03; /* Base Address */ - dev->device_regs[0][0x61] = 0xf0; - dev->device_regs[0][0x70] = 0x06; - dev->device_regs[0][0x74] = 0x02; - dev->device_regs[0][0xf0] = 0x0e; - dev->device_regs[0][0xf2] = 0xff; + for (uint8_t i = 0; i <= 0x0a; i++) + memset(dev->ld_regs[i], 0x00, 256); - /* LPT Port */ - dev->device_regs[3][0x74] = 0x04; - dev->device_regs[3][0xf0] = 0x3c; + /* Logical device 0: FDD */ + dev->ld_regs[0x00][0x30] = 0x00; + dev->ld_regs[0x00][0x60] = 0x03; + dev->ld_regs[0x00][0x61] = 0xf0; + dev->ld_regs[0x00][0x70] = 0x06; + dev->ld_regs[0x00][0x74] = 0x02; + dev->ld_regs[0x00][0xf0] = 0x0e; + dev->ld_regs[0x00][0xf2] = 0xff; - /* UART1 */ - dev->device_regs[4][0x74] = 0x04; - dev->device_regs[4][0xf1] = 0x02; - dev->device_regs[4][0xf2] = 0x03; + /* Logical device 3: Parallel Port */ + dev->ld_regs[0x03][0x30] = 0x00; + dev->ld_regs[0x03][0x60] = 0x03; + dev->ld_regs[0x03][0x61] = 0x78; + dev->ld_regs[0x03][0x70] = 0x07; + dev->ld_regs[0x03][0x74] = 0x04; + dev->ld_regs[0x03][0xf0] = 0x3c; - /* AUX */ - dev->device_regs[8][0xc0] = 0x06; - dev->device_regs[8][0xc1] = 0x03; + /* Logical device 4: Serial Port 1 */ + dev->ld_regs[0x04][0x30] = 0x00; + dev->ld_regs[0x04][0x60] = 0x03; + dev->ld_regs[0x04][0x61] = 0xf8; + dev->ld_regs[0x04][0x70] = 0x04; + serial_irq(dev->uart[0], dev->ld_regs[4][0x70]); + + /* Logical device 5: Serial Port 2 */ + dev->ld_regs[0x05][0x30] = 0x00; + dev->ld_regs[0x05][0x60] = 0x02; + dev->ld_regs[0x05][0x61] = 0xf8; + dev->ld_regs[0x05][0x70] = 0x03; + dev->ld_regs[0x05][0x74] = 0x04; + dev->ld_regs[0x05][0xf1] = 0x02; + dev->ld_regs[0x05][0xf2] = 0x03; + serial_irq(dev->uart[1], dev->ld_regs[5][0x70]); + + /* Logical device 7: Keyboard */ + dev->ld_regs[0x07][0x30] = 0x00; + dev->ld_regs[0x07][0x61] = 0x60; + dev->ld_regs[0x07][0x70] = 0x01; + + /* Logical device 8: Auxiliary I/O */ + dev->ld_regs[0x08][0x30] = 0x00; + dev->ld_regs[0x08][0x60] = 0x00; + dev->ld_regs[0x08][0x61] = 0x00; + dev->ld_regs[0x08][0xc0] = 0x06; + dev->ld_regs[0x08][0xc1] = 0x03; + + fdc37m60x_lpt_handler(dev); + fdc37m60x_serial_handler(dev, 0); + fdc37m60x_serial_handler(dev, 1); + + fdc_clear_flags(dev->fdc, FDC_FLAG_PS2 | FDC_FLAG_PS2_MCA); + fdc_reset(dev->fdc); fdc37m60x_fdc_handler(dev); - fdc37m60x_uart_handler(0, dev); - fdc37m60x_uart_handler(1, dev); - fdc37m60x_lpt_handler(dev); + + for (int i = 0; i < 4; i++) + fdc_set_fdd_changed(i, 1); + + fdc37m60x_kbc_handler(dev); + + fdc37m60x_superio_handler(dev); + + dev->locked = 0; } static void @@ -307,13 +630,54 @@ static void * fdc37m60x_init(const device_t *info) { fdc37m60x_t *dev = (fdc37m60x_t *) calloc(1, sizeof(fdc37m60x_t)); - SIO_INDEX_PORT = info->local; - dev->fdc = device_add(&fdc_at_smc_device); - dev->uart[0] = device_add_inst(&ns16550_device, 1); - dev->uart[1] = device_add_inst(&ns16550_device, 2); + dev->fdc = device_add(&fdc_at_smc_device); - io_sethandler(SIO_INDEX_PORT, 0x0002, fdc37m60x_read, NULL, NULL, fdc37m60x_write, NULL, NULL, dev); + dev->uart[0] = device_add_inst(&ns16550_device, 1); + dev->uart[1] = device_add_inst(&ns16550_device, 2); + + dev->lpt = device_add_inst(&lpt_port_device, 1); + + dev->kbc_type = info->local & FDC37XXXX_KBC; + + dev->is_compaq = (dev->kbc_type == FDC37XXX1); + + dev->port_370 = !!(info->local & FDC37XXXX_370); + + dev->max_ld = 8; + + if (dev->is_compaq) { + io_sethandler(0x0f9, 0x0001, + fdc37m60x_read, NULL, NULL, fdc37m60x_write, NULL, NULL, dev); + io_sethandler(0x0fb, 0x0001, + fdc37m60x_read, NULL, NULL, fdc37m60x_write, NULL, NULL, dev); + } + + switch (dev->kbc_type) { + case FDC37XXX1: + dev->kbc = device_add_params(&kbc_at_device, (void *) KBC_VEN_COMPAQ); + break; + case FDC37XXX2: + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_AMI | 0x00003500)); + break; + case FDC37XXX3: + default: + dev->kbc = device_add(&kbc_at_device); + break; + case FDC37XXX5: + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_PHOENIX | 0x00013800)); + break; + case FDC37XXX7: + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_PHOENIX | 0x00041600)); + break; + } + + /* Set the defaults here so the ports can be removed by fdc37m60x_reset(). */ + dev->fdc_base = 0x03f0; + dev->lpt_base = 0x0378; + dev->uart_base[0] = 0x03f8; + dev->uart_base[1] = 0x02f8; + dev->kbc_base = 0x0060; fdc37m60x_reset(dev); @@ -321,27 +685,13 @@ fdc37m60x_init(const device_t *info) } const device_t fdc37m60x_device = { - .name = "SMSC FDC37M60X", + .name = "SMC FDC37C93x Super I/O", .internal_name = "fdc37m60x", .flags = 0, - .local = FDC_PRIMARY_ADDR, + .local = 0, .init = fdc37m60x_init, .close = fdc37m60x_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t fdc37m60x_370_device = { - .name = "SMSC FDC37M60X with 10K Pull Up Resistor", - .internal_name = "fdc37m60x_370", - .flags = 0, - .local = FDC_SECONDARY_ADDR, - .init = fdc37m60x_init, - .close = fdc37m60x_close, - .reset = NULL, + .reset = fdc37m60x_reset, .available = NULL, .speed_changed = NULL, .force_redraw = NULL, diff --git a/src/sio/sio_gm82c803ab.c b/src/sio/sio_gm82c803ab.c new file mode 100644 index 000000000..bf74dc703 --- /dev/null +++ b/src/sio/sio_gm82c803ab.c @@ -0,0 +1,373 @@ +/* + * 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. + * + * Implementation of the GoldStar GM82C803 A andB Super I/O + * Chips. + * + * Authors: Miran Grca, + * + * Copyright 2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#include <86box/86box.h> +#include <86box/io.h> +#include <86box/timer.h> +#include <86box/device.h> +#include <86box/pci.h> +#include <86box/lpt.h> +#include <86box/serial.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/sio.h> + +typedef struct gm82c803ab_t { + uint8_t type; + uint8_t tries; + uint8_t has_ide; + uint8_t regs[256]; + int cur_reg; + int com3_addr; + int com4_addr; + fdc_t *fdc; + serial_t *uart[2]; + lpt_t *lpt; +} gm82c803ab_t; + +#ifdef ENABLE_GM82C803AB_LOG +int gm82c803ab_do_log = ENABLE_GM82C803AB_LOG; + +static void +gm82c803ab_log(const char *fmt, ...) +{ + va_list ap; + + if (gm82c803ab_do_log) { + va_start(ap, fmt); + pclog_ex(fmt, ap); + va_end(ap); + } +} +#else +# define gm82c803ab_log(fmt, ...) +#endif + +static void +ide_handler(gm82c803ab_t *dev) +{ + if (dev->has_ide > 0) { + int ide_id = dev->has_ide - 1; + + ide_handlers(ide_id, 0); + + ide_set_base_addr(ide_id, 0, (dev->regs[0xa1] & 0x80) ? 0x0170 : 0x01f0); + ide_set_base_addr(ide_id, 1, (dev->regs[0xa1] & 0x80) ? 0x0376 : 0x03f6); + + if (dev->regs[0xa0] & 0x20) + ide_handlers(ide_id, 1); + } +} + +static void +fdc_handler(gm82c803ab_t *dev) +{ + fdc_remove(dev->fdc); + if (dev->regs[0xa0] & 0x10) + fdc_set_base(dev->fdc, (dev->regs[0xa1] & 0x40) ? FDC_SECONDARY_ADDR : FDC_PRIMARY_ADDR); +} + +static void +set_com34_addr(gm82c803ab_t *dev) +{ + switch (dev->regs[0xa4] & 0xc0) { + case 0x00: + dev->com3_addr = COM3_ADDR; + dev->com4_addr = COM4_ADDR; + break; + case 0x40: + dev->com3_addr = 0x338; + dev->com4_addr = 0x238; + break; + case 0x80: + dev->com3_addr = COM3_ADDR; + dev->com4_addr = 0x2e0; + break; + case 0xc0: + dev->com3_addr = 0x220; + dev->com4_addr = 0x228; + break; + + default: + break; + } +} + +static void +set_serial_addr(gm82c803ab_t *dev, int port) +{ + uint8_t shift = 2 + (port << 1); + double clock_src = 24000000.0 / 13.0; + + if (dev->regs[0xa4] & (1 << (4 + port))) + clock_src = 24000000.0 / 12.0; + + serial_remove(dev->uart[port]); + if (dev->regs[0xa0] & (0x04 << port)) { + switch ((dev->regs[0xa1] >> shift) & 0x03) { + case 0x00: + serial_setup(dev->uart[port], COM1_ADDR, COM1_IRQ); + break; + case 0x01: + serial_setup(dev->uart[port], COM2_ADDR, COM2_IRQ); + break; + case 0x02: + serial_setup(dev->uart[port], dev->com3_addr, COM3_IRQ); + break; + case 0x03: + serial_setup(dev->uart[port], dev->com4_addr, COM4_IRQ); + break; + + default: + break; + } + } + + serial_set_clock_src(dev->uart[port], clock_src); +} + +static void +lpt_handler(gm82c803ab_t *dev) +{ + uint16_t lpt_port = 0x0000; + uint16_t mask = 0xfffc; + uint8_t local_enable = 1; + uint8_t lpt_irq = LPT1_IRQ; + uint8_t lpt_mode = (dev->regs[0xa0] & 0x03); + + switch (lpt_mode) { + default: + local_enable = 0; + break; + case 0x00: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 1); + break; + case 0x01: + if (dev->type == GM82C803B) { + lpt_set_epp(dev->lpt, !!(dev->regs[0xa5] & 0x20)); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + } else + local_enable = 0; + break; + case 0x02: + if (dev->type == GM82C803B) { + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, !!(dev->regs[0xa5] & 0x20)); + lpt_set_ext(dev->lpt, 0); + } else + local_enable = 0; + break; + } + + switch (dev->regs[0xa1] & 0x03) { + default: + lpt_port = LPT_MDA_ADDR; + lpt_irq = LPT_MDA_IRQ; + break; + case 0x00: + lpt_port = LPT1_ADDR; + lpt_irq = LPT1_IRQ /*LPT2_IRQ*/; + break; + case 0x01: + lpt_port = LPT2_ADDR; + lpt_irq = LPT1_IRQ /*LPT2_IRQ*/; + break; + } + + if (lpt_irq > 15) + lpt_irq = 0xff; + + lpt_port_remove(dev->lpt); + lpt_set_fifo_threshold(dev->lpt, dev->regs[0x0a] & 0x0f); + + if (local_enable && (lpt_port >= 0x0100) && (lpt_port <= (0x0ffc & mask))) + lpt_port_setup(dev->lpt, lpt_port); + + lpt_port_irq(dev->lpt, lpt_irq); +} + +static void +gm82c803ab_write(uint16_t port, uint8_t val, void *priv) +{ + gm82c803ab_t *dev = (gm82c803ab_t *) priv; + uint8_t valxor = 0; + + if (dev->tries == 2) { + if (port == 0x0398) { + if (val == 0xcc) + dev->tries = 0; + else + dev->cur_reg = val; + } else { + if ((dev->cur_reg < 0xa0) || (dev->cur_reg > 0xa5)) + return; + + valxor = val ^ dev->regs[dev->cur_reg]; + dev->regs[dev->cur_reg] = val; + + switch (dev->cur_reg) { + default: + break; + case 0xa0: /* Function Selection Register (FSR) */ + if (valxor & 0x20) + ide_handler(dev); + if (valxor & 0x10) + fdc_handler(dev); + if (valxor & 0x08) + set_serial_addr(dev, 1); + if (valxor & 0x04) + set_serial_addr(dev, 0); + if (valxor & 0x03) + lpt_handler(dev); + break; + case 0xa1: /* Address Selection Register (ASR) */ + if (valxor & 0x80) + ide_handler(dev); + if (valxor & 0x40) + fdc_handler(dev); + if (valxor & 0x30) + set_serial_addr(dev, 1); + if (valxor & 0x0c) + set_serial_addr(dev, 0); + if (valxor & 0x03) + lpt_handler(dev); + break; + case 0xa4: /* Miscellaneous Function Register */ + if (valxor & 0xc0) { + set_com34_addr(dev); + set_serial_addr(dev, 0); + set_serial_addr(dev, 1); + } + if (valxor & 0x20) + set_serial_addr(dev, 1); + if (valxor & 0x10) + set_serial_addr(dev, 0); + if (valxor & 0x01) + fdc_set_swap(dev->fdc, val & 0x01); + break; + case 0xa5: /* ECP Register */ + if (valxor & 0x20) + lpt_handler(dev); + break; + } + } + } else if ((port == 0x0398) && (val == 0x33)) + dev->tries++; +} + +static uint8_t +gm82c803ab_read(uint16_t port, void *priv) +{ + const gm82c803ab_t *dev = (gm82c803ab_t *) priv; + uint8_t ret = 0xff; + + if (dev->tries == 2) { + if ((port == 0x0399) && (dev->cur_reg >= 0xa0) && (dev->cur_reg <= 0xa1)) + ret = dev->regs[dev->cur_reg]; + } + + return ret; +} + +static void +gm82c803ab_reset(gm82c803ab_t *dev) +{ + dev->com3_addr = 0x338; + dev->com4_addr = 0x238; + + serial_remove(dev->uart[0]); + serial_setup(dev->uart[0], COM1_ADDR, COM1_IRQ); + + serial_remove(dev->uart[1]); + serial_setup(dev->uart[1], COM2_ADDR, COM2_IRQ); + + lpt_port_remove(dev->lpt); + lpt_port_setup(dev->lpt, LPT1_ADDR); + + fdc_reset(dev->fdc); + fdc_remove(dev->fdc); + + dev->tries = 0; + memset(dev->regs, 0, 256); + + dev->regs[0xa0] = 0xff; + + set_serial_addr(dev, 0); + set_serial_addr(dev, 1); + + lpt_handler(dev); + + fdc_handler(dev); + + if (dev->has_ide) + ide_handler(dev); +} + +static void +gm82c803ab_close(void *priv) +{ + gm82c803ab_t *dev = (gm82c803ab_t *) priv; + + free(dev); +} + +static void * +gm82c803ab_init(const device_t *info) +{ + gm82c803ab_t *dev = (gm82c803ab_t *) calloc(1, sizeof(gm82c803ab_t)); + + dev->fdc = device_add(&fdc_at_smc_device); + + dev->type = info->local & 0xff; + dev->has_ide = (info->local >> 8) & 0xff; + + dev->uart[0] = device_add_inst(&ns16550_device, 1); + dev->uart[1] = device_add_inst(&ns16550_device, 2); + + dev->lpt = device_add_inst(&lpt_port_device, 1); + lpt_set_cnfgb_readout(dev->lpt, 0x00); + + io_sethandler(0x0398, 0x0002, + gm82c803ab_read, NULL, NULL, gm82c803ab_write, NULL, NULL, dev); + + gm82c803ab_reset(dev); + + return dev; +} + +const device_t gm82c803ab_device = { + .name = "Goldstar GMC82C803A/B", + .internal_name = "gm82c803ab", + .flags = 0, + .local = 0, + .init = gm82c803ab_init, + .close = gm82c803ab_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/sio/sio_gm82c803c.c b/src/sio/sio_gm82c803c.c new file mode 100644 index 000000000..e9787fa39 --- /dev/null +++ b/src/sio/sio_gm82c803c.c @@ -0,0 +1,383 @@ +/* + * 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. + * + * Implementation of the GoldStar GM82C803C Super I/O Chip. + * + * Authors: Miran Grca, + * + * Copyright 2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#include <86box/86box.h> +#include <86box/io.h> +#include <86box/timer.h> +#include <86box/device.h> +#include <86box/pci.h> +#include <86box/lpt.h> +#include <86box/serial.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/sio.h> + +typedef struct gm82c803c_t { + uint8_t tries; + uint8_t has_ide; + uint8_t dma_map[4]; + uint8_t irq_map[10]; + uint8_t regs[256]; + int cur_reg; + fdc_t *fdc; + serial_t *uart[2]; + lpt_t *lpt; +} gm82c803c_t; + +#ifdef ENABLE_GM82C803C_LOG +int gm82c803c_do_log = ENABLE_GM82C803C_LOG; + +static void +gm82c803c_log(const char *fmt, ...) +{ + va_list ap; + + if (gm82c803c_do_log) { + va_start(ap, fmt); + pclog_ex(fmt, ap); + va_end(ap); + } +} +#else +# define gm82c803c_log(fmt, ...) +#endif + +static void +ide_handler(gm82c803c_t *dev) +{ + uint16_t ide_port = 0x0000; + + if (dev->has_ide > 0) { + int ide_id = dev->has_ide - 1; + + ide_handlers(ide_id, 0); + + ide_port = (dev->regs[0xc4] << 2) & 0xfff0; + ide_set_base_addr(ide_id, 0, ide_port); + + ide_port = ((dev->regs[0xc5] << 2) & 0xfff0) | 0x0006; + ide_set_base_addr(ide_id, 1, ide_port); + + if (dev->regs[0xc2] & 0x20) + ide_handlers(ide_id, 1); + } +} + +static void +fdc_handler(gm82c803c_t *dev) +{ + uint16_t fdc_port = 0x0000; + uint8_t fdc_irq = 6; + uint8_t fdc_dma = 2; + + fdc_port = (dev->regs[0xc3] << 2) & 0xfff0; + + fdc_irq = dev->irq_map[dev->regs[0xca] >> 4]; + fdc_dma = dev->dma_map[(dev->regs[0xc9] >> 4) & 0x03]; + + fdc_set_irq(dev->fdc, fdc_irq); + fdc_set_dma_ch(dev->fdc, fdc_dma); + + fdc_remove(dev->fdc); + if (dev->regs[0xc2] & 0x10) + fdc_set_base(dev->fdc, fdc_port); +} + +static void +set_serial_addr(gm82c803c_t *dev, int port) +{ + uint16_t serial_port = 0x0000; + uint8_t serial_irq = COM1_IRQ; + double clock_src = 24000000.0 / 13.0; + + if (dev->regs[0xce] & (1 << (6 + port))) + clock_src = 24000000.0 / 3.0; + else if (dev->regs[0xd1] & (1 << port)) + clock_src = 24000000.0 / 12.0; + + serial_remove(dev->uart[port]); + if (dev->regs[0xc2] & (0x04 << port)) { + serial_port = (dev->regs[0xc7 + port] << 2) & 0xfff8; + serial_irq = dev->irq_map[dev->regs[0xcb] >> ((port ^ 1) * 0xff)]; + + serial_setup(dev->uart[port], serial_port, serial_irq); + } + + serial_set_clock_src(dev->uart[port], clock_src); +} + +static void +lpt_handler(gm82c803c_t *dev) +{ + uint16_t lpt_port = 0x0000; + uint16_t mask = 0xfffc; + uint8_t local_enable = 1; + uint8_t lpt_irq = LPT1_IRQ; + uint8_t lpt_dma = 3; + uint8_t lpt_mode = (dev->regs[0xc2] & 0x03); + + switch (lpt_mode) { + default: + local_enable = 0; + break; + case 0x00: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 1); + break; + case 0x01: + lpt_set_epp(dev->lpt, !!(dev->regs[0xd0] & 0x20)); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + case 0x02: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, !!(dev->regs[0xd0] & 0x20)); + lpt_set_ext(dev->lpt, 0); + break; + } + + lpt_port = ((dev->regs[0xc6] << 2) & 0xfffc) & mask; + + lpt_irq = dev->irq_map[dev->regs[0xca] & 0x0f]; + lpt_dma = dev->dma_map[dev->regs[0xc9] & 0x03]; + + if (lpt_irq > 15) + lpt_irq = 0xff; + + lpt_port_remove(dev->lpt); + lpt_set_fifo_threshold(dev->lpt, dev->regs[0x0a] & 0x0f); + + if (local_enable && (lpt_port >= 0x0100) && (lpt_port <= (0x0ffc & mask))) + lpt_port_setup(dev->lpt, lpt_port); + + lpt_port_irq(dev->lpt, lpt_irq); + lpt_port_dma(dev->lpt, lpt_dma); +} + +static void +gm82c803c_write(uint16_t port, uint8_t val, void *priv) +{ + gm82c803c_t *dev = (gm82c803c_t *) priv; + uint8_t valxor = 0; + + if (dev->tries == 2) { + if (port == 0x0398) { + if (val == 0xcc) + dev->tries = 0; + else + dev->cur_reg = val; + } else { + if ((dev->cur_reg < 0xc2) || (dev->cur_reg > 0xd8)) + return; + + valxor = val ^ dev->regs[dev->cur_reg]; + dev->regs[dev->cur_reg] = val; + + switch (dev->cur_reg) { + default: + break; + case 0xc2: + if (valxor & 0x20) + ide_handler(dev); + if (valxor & 0x10) + fdc_handler(dev); + if (valxor & 0x08) + set_serial_addr(dev, 1); + if (valxor & 0x04) + set_serial_addr(dev, 0); + if (valxor & 0x03) + lpt_handler(dev); + break; + case 0xc3: + if (valxor) + fdc_handler(dev); + break; + case 0xc4: case 0xc5: + if (valxor) + ide_handler(dev); + break; + case 0xc6: + if (valxor) + lpt_handler(dev); + break; + case 0xc7: + if (valxor) + set_serial_addr(dev, 0); + case 0xc8: + if (valxor) + set_serial_addr(dev, 1); + case 0xc9: + if (valxor & 0xf0) + fdc_handler(dev); + if (valxor & 0x0f) + lpt_handler(dev); + break; + case 0xca: + if (valxor & 0xf0) + fdc_handler(dev); + if (valxor & 0x0f) + lpt_handler(dev); + break; + case 0xcb: + if (valxor & 0xf0) + set_serial_addr(dev, 0); + if (valxor & 0x0f) + set_serial_addr(dev, 1); + break; + case 0xce: + if (valxor & 0x80) + set_serial_addr(dev, 1); + if (valxor & 0x40) + set_serial_addr(dev, 0); + break; + case 0xd0: + if (valxor & 0x20) + lpt_handler(dev); + break; + case 0xd1: + if (valxor & 0x02) + set_serial_addr(dev, 1); + if (valxor & 0x01) + set_serial_addr(dev, 0); + break; + + if (valxor & 0x20) + ide_handler(dev); + if (valxor & 0x08) + set_serial_addr(dev, 1); + if (valxor & 0x04) + set_serial_addr(dev, 0); + break; + } + } + } else if ((port == 0x0398) && (val == 0x33)) + dev->tries++; +} + +static uint8_t +gm82c803c_read(uint16_t port, void *priv) +{ + const gm82c803c_t *dev = (gm82c803c_t *) priv; + uint8_t ret = 0xff; + + if (dev->tries == 2) { + if ((port == 0x0399) && (dev->cur_reg >= 0xa0) && (dev->cur_reg <= 0xa1)) + ret = dev->regs[dev->cur_reg]; + } + + return ret; +} + +static void +gm82c803c_reset(gm82c803c_t *dev) +{ + serial_remove(dev->uart[0]); + serial_setup(dev->uart[0], COM1_ADDR, COM1_IRQ); + + serial_remove(dev->uart[1]); + serial_setup(dev->uart[1], COM2_ADDR, COM2_IRQ); + + lpt_port_remove(dev->lpt); + lpt_port_setup(dev->lpt, LPT1_ADDR); + + fdc_reset(dev->fdc); + fdc_remove(dev->fdc); + + dev->tries = 0; + memset(dev->regs, 0, 256); + + dev->regs[0xc0] = 0x3c; + dev->regs[0xc2] = 0x03; + dev->regs[0xc3] = 0x3c; + dev->regs[0xc4] = 0x3c; + dev->regs[0xc5] = 0x3d; + dev->regs[0xd5] = 0x3c; + + set_serial_addr(dev, 0); + set_serial_addr(dev, 1); + + lpt_handler(dev); + + fdc_handler(dev); + + if (dev->has_ide) + ide_handler(dev); +} + +static void +gm82c803c_close(void *priv) +{ + gm82c803c_t *dev = (gm82c803c_t *) priv; + + free(dev); +} + +static void * +gm82c803c_init(const device_t *info) +{ + gm82c803c_t *dev = (gm82c803c_t *) calloc(1, sizeof(gm82c803c_t)); + + dev->fdc = device_add(&fdc_at_smc_device); + + dev->has_ide = (info->local >> 8) & 0xff; + + dev->uart[0] = device_add_inst(&ns16550_device, 1); + dev->uart[1] = device_add_inst(&ns16550_device, 2); + + dev->lpt = device_add_inst(&lpt_port_device, 1); + lpt_set_cnfgb_readout(dev->lpt, 0x00); + + io_sethandler(0x0398, 0x0002, + gm82c803c_read, NULL, NULL, gm82c803c_write, NULL, NULL, dev); + + dev->dma_map[0] = 4; + for (int i = 1; i < 4; i++) + dev->dma_map[i] = i; + + memset(dev->irq_map, 0xff, 16); + dev->irq_map[0] = 0xff; + for (int i = 1; i < 7; i++) + dev->irq_map[i] = i; + dev->irq_map[1] = 5; + dev->irq_map[5] = 7; + dev->irq_map[7] = 0xff; /* Reserved. */ + dev->irq_map[8] = 10; + + gm82c803c_reset(dev); + + return dev; +} + +const device_t gm82c803c_device = { + .name = "Goldstar GM82C803C", + .internal_name = "gm82c803c", + .flags = 0, + .local = 0, + .init = gm82c803c_init, + .close = gm82c803c_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/sio/sio_it86x1f.c b/src/sio/sio_it86x1f.c index b3553bf54..324914355 100644 --- a/src/sio/sio_it86x1f.c +++ b/src/sio/sio_it86x1f.c @@ -32,6 +32,7 @@ #include <86box/fdd.h> #include <86box/fdc.h> #include <86box/gameport.h> +#include <86box/keyboard.h> #include <86box/sio.h> #include <86box/isapnp.h> #include <86box/plat_fallthrough.h> @@ -243,6 +244,7 @@ typedef struct it86x1f_t { fdc_t *fdc; serial_t *uart[2]; + lpt_t *lpt; void *gameport; } it86x1f_t; @@ -290,11 +292,14 @@ it8661f_pnp_config_changed(uint8_t ld, isapnp_device_config_t *config, void *pri break; case 3: - lpt1_remove(); + lpt_port_remove(dev->lpt); if (config->activate && (config->io[0].base != ISAPNP_IO_DISABLED)) { it86x1f_log("IT86x1F: LPT enabled at port %04X IRQ %d\n", config->io[0].base, config->irq[0].irq); - lpt1_setup(config->io[0].base); + lpt_port_setup(dev->lpt, config->io[0].base); + + lpt_port_irq(dev->lpt, config->irq[0].irq); + lpt_port_dma(dev->lpt, (config->dma[0].dma == ISAPNP_DMA_DISABLED) ? -1 : config->dma[0].dma); } else { it86x1f_log("IT86x1F: LPT disabled\n"); } @@ -465,6 +470,13 @@ it86x1f_pnp_write_vendor_reg(uint8_t ld, uint8_t reg, uint8_t val, void *priv) case 0x0f0: dev->ldn_regs[ld][reg & 0x0f] = val & 0x0f; fdc_set_swwp(dev->fdc, !!(val & 0x01)); + if (val & 0x02) { + for (int i = 0; i < 4; i++) + fdc_update_drvrate(dev->fdc, i, 1); + } else { + for (int i = 0; i < 4; i++) + fdc_update_drvrate(dev->fdc, i, 0); + } fdc_set_swap(dev->fdc, !!(val & 0x04)); break; @@ -483,6 +495,8 @@ it86x1f_pnp_write_vendor_reg(uint8_t ld, uint8_t reg, uint8_t val, void *priv) case 0x3f0: dev->ldn_regs[ld][reg & 0x0f] = val & 0x07; + lpt_set_epp(dev->lpt, val & 0x01); + lpt_set_ecp(dev->lpt, val & 0x02); break; case 0x4f0: @@ -771,13 +785,19 @@ it86x1f_reset(it86x1f_t *dev) { it86x1f_log("IT86x1F: reset()\n"); + for (int i = 0; i < 4; i++) + fdc_update_drvrate(dev->fdc, i, 0); + fdc_reset(dev->fdc); serial_remove(dev->uart[0]); serial_remove(dev->uart[1]); - lpt1_remove(); + lpt_port_remove(dev->lpt); + + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); isapnp_enable_card(dev->pnp_card, ISAPNP_CARD_DISABLE); @@ -822,6 +842,11 @@ it86x1f_init(UNUSED(const device_t *info)) dev->uart[0] = device_add_inst(&ns16550_device, 1); dev->uart[1] = device_add_inst(&ns16550_device, 2); + dev->lpt = device_add_inst(&lpt_port_device, 1); + + lpt_set_cnfgb_readout(dev->lpt, 0x00); + lpt_set_ext(dev->lpt, 1); + dev->gameport = gameport_add(&gameport_sio_device); dev->instance = device_get_instance(); @@ -830,6 +855,9 @@ it86x1f_init(UNUSED(const device_t *info)) dev->unlock_id = it86x1f_models[i].unlock_id; io_sethandler(0x279, 1, NULL, NULL, NULL, it86x1f_write_unlock, NULL, NULL, dev); + if (info->local == ITE_IT8671F) + device_add_params(&kbc_at_device, (void *) (KBC_VEN_AMI | 0x00004800)); + it86x1f_reset(dev); return dev; diff --git a/src/sio/sio_pc87306.c b/src/sio/sio_pc87306.c index 5a0a8798a..e95292fbb 100644 --- a/src/sio/sio_pc87306.c +++ b/src/sio/sio_pc87306.c @@ -23,6 +23,7 @@ #include <86box/io.h> #include <86box/timer.h> #include <86box/device.h> +#include <86box/keyboard.h> #include <86box/lpt.h> #include <86box/mem.h> #include <86box/nvr.h> @@ -42,9 +43,12 @@ typedef struct pc87306_t { uint8_t regs[29]; uint8_t gpio[2]; uint16_t gpioba; + uint16_t kbc_type; int cur_reg; fdc_t *fdc; + void *kbc; serial_t *uart[2]; + lpt_t *lpt; nvr_t *nvr; } pc87306_t; @@ -115,18 +119,15 @@ pc87306_gpio_handler(pc87306_t *dev) } static void -lpt1_handler(pc87306_t *dev) +lpt_handler(pc87306_t *dev) { int temp; uint16_t lptba; - uint16_t lpt_port = LPT1_ADDR; - uint8_t lpt_irq = LPT2_IRQ; - uint8_t lpt_dma = ((dev->regs[0x18] & 0x06) >> 1); + uint16_t lpt_port = LPT1_ADDR; + uint8_t lpt_irq = LPT2_IRQ; + uint8_t cnfgb_readout = 0x08; - lpt1_remove(); - - if (lpt_dma == 0x00) - lpt_dma = 0xff; + lpt_port_remove(dev->lpt); temp = dev->regs[0x01] & 3; lptba = ((uint16_t) dev->regs[0x19]) << 2; @@ -159,17 +160,22 @@ lpt1_handler(pc87306_t *dev) if (dev->regs[0x1b] & 0x10) lpt_irq = (dev->regs[0x1b] & 0x20) ? 7 : 5; - lpt_set_ext(0, !!(dev->regs[0x02] & 0x80)); + cnfgb_readout |= (lpt_irq == 5) ? 0x30 : 0x00; + cnfgb_readout |= (dev->regs[0x18] & 0x06) >> 1; - lpt_set_epp(0, !!(dev->regs[0x04] & 0x01)); - lpt_set_ecp(0, !!(dev->regs[0x04] & 0x04)); + lpt_set_cnfgb_readout(dev->lpt, cnfgb_readout); + lpt_set_ext(dev->lpt, !!(dev->regs[0x02] & 0x80)); + + lpt_set_epp(dev->lpt, !!(dev->regs[0x04] & 0x01)); + lpt_set_ecp(dev->lpt, !!(dev->regs[0x04] & 0x04)); if (lpt_port) - lpt1_setup(lpt_port); + lpt_port_setup(dev->lpt, lpt_port); - lpt1_irq(lpt_irq); + lpt_port_irq(dev->lpt, lpt_irq); - lpt_port_dma(0, lpt_dma); + if ((dev->regs[0x18] & 0x06) != 0x00) + lpt_port_dma(dev->lpt, (dev->regs[0x18] & 0x08) ? 3 : 1); } static void @@ -244,6 +250,15 @@ serial_handler(pc87306_t *dev, int uart) } } +static void +kbc_handler(pc87306_t *dev) +{ + kbc_at_handler(0, 0x0060, dev->kbc); + + if (dev->regs[0x05] & 0x01) + kbc_at_handler(1, 0x0060, dev->kbc); +} + static void pc87306_write(uint16_t port, uint8_t val, void *priv) { @@ -278,9 +293,9 @@ pc87306_write(uint16_t port, uint8_t val, void *priv) switch (dev->cur_reg) { case 0x00: if (valxor & 0x01) { - lpt1_remove(); + lpt_port_remove(dev->lpt); if ((val & 1) && !(dev->regs[0x02] & 1)) - lpt1_handler(dev); + lpt_handler(dev); } if (valxor & 0x02) { serial_remove(dev->uart[0x00]); @@ -300,9 +315,9 @@ pc87306_write(uint16_t port, uint8_t val, void *priv) break; case 0x01: if (valxor & 0x03) { - lpt1_remove(); + lpt_port_remove(dev->lpt); if ((dev->regs[0x00] & 1) && !(dev->regs[0x02] & 1)) - lpt1_handler(dev); + lpt_handler(dev); } if (valxor & 0xcc) { serial_remove(dev->uart[0x00]); @@ -317,14 +332,14 @@ pc87306_write(uint16_t port, uint8_t val, void *priv) break; case 0x02: if (valxor & 0x01) { - lpt1_remove(); + lpt_port_remove(dev->lpt); serial_remove(dev->uart[0x00]); serial_remove(dev->uart[0x01]); fdc_remove(dev->fdc); if (!(val & 1)) { if (dev->regs[0x00] & 0x01) - lpt1_handler(dev); + lpt_handler(dev); if (dev->regs[0x00] & 0x02) serial_handler(dev, 0); if (dev->regs[0x00] & 0x04) @@ -333,22 +348,24 @@ pc87306_write(uint16_t port, uint8_t val, void *priv) fdc_set_base(dev->fdc, (dev->regs[0x00] & 0x20) ? FDC_SECONDARY_ADDR : FDC_PRIMARY_ADDR); } } - if (valxor & 0x08) { - lpt1_remove(); + if (valxor & 0x88) { + lpt_port_remove(dev->lpt); if ((dev->regs[0x00] & 1) && !(dev->regs[0x02] & 1)) - lpt1_handler(dev); + lpt_handler(dev); } break; case 0x04: if (valxor & (0x05)) { - lpt1_remove(); + lpt_port_remove(dev->lpt); if ((dev->regs[0x00] & 0x01) && !(dev->regs[0x02] & 0x01)) - lpt1_handler(dev); + lpt_handler(dev); } if (valxor & 0x80) nvr_lock_set(0x00, 256, !!(val & 0x80), dev->nvr); break; case 0x05: + if (valxor & 0x01) + kbc_handler(dev); if (valxor & 0x08) nvr_at_handler(!!(val & 0x08), 0x0070, dev->nvr); if (valxor & 0x20) @@ -359,6 +376,8 @@ pc87306_write(uint16_t port, uint8_t val, void *priv) fdc_update_enh_mode(dev->fdc, (val & 4) ? 1 : 0); fdc_update_densel_polarity(dev->fdc, (val & 0x40) ? 1 : 0); } + if (valxor & 0x20) + lpt_set_cnfga_readout(dev->lpt, (val & 0x20) ? 0x18 : 0x10); break; case 0x0f: if (valxor) @@ -371,26 +390,26 @@ pc87306_write(uint16_t port, uint8_t val, void *priv) pc87306_gpio_handler(dev); break; case 0x18: - if (valxor & (0x06)) { - lpt1_remove(); + if (valxor & (0x0e)) { + lpt_port_remove(dev->lpt); if ((dev->regs[0x00] & 0x01) && !(dev->regs[0x02] & 0x01)) - lpt1_handler(dev); + lpt_handler(dev); } break; case 0x19: if (valxor) { - lpt1_remove(); + lpt_port_remove(dev->lpt); if ((dev->regs[0x00] & 1) && !(dev->regs[0x02] & 1)) - lpt1_handler(dev); + lpt_handler(dev); } break; case 0x1b: if (valxor & 0x70) { - lpt1_remove(); + lpt_port_remove(dev->lpt); if (!(val & 0x40)) dev->regs[0x19] = 0xef; if ((dev->regs[0x00] & 1) && !(dev->regs[0x02] & 1)) - lpt1_handler(dev); + lpt_handler(dev); } break; case 0x1c: @@ -419,15 +438,21 @@ pc87306_read(uint16_t port, void *priv) index = (port & 1) ? 0 : 1; - dev->tries = 0; - - if (index) + if (dev->tries == 0xff) { + ret = 0x88; + dev->tries = 0xfe; + } else if (dev->tries == 0xfe) { + ret = 0x00; + dev->tries = 0; + } else if (index) { ret = dev->cur_reg & 0x1f; - else { + dev->tries = 0; + } else { if (dev->cur_reg == 8) ret = 0x70; else if (dev->cur_reg < 28) ret = dev->regs[dev->cur_reg]; + dev->tries = 0; } return ret; @@ -440,6 +465,8 @@ pc87306_reset_common(void *priv) memset(dev->regs, 0, 29); + dev->tries = 0xff; + dev->regs[0x00] = 0x0B; dev->regs[0x01] = 0x01; dev->regs[0x03] = 0x01; @@ -455,8 +482,9 @@ pc87306_reset_common(void *priv) 0 = 360 rpm @ 500 kbps for 3.5" 1 = Default, 300 rpm @ 500, 300, 250, 1000 kbps for 3.5" */ - lpt1_remove(); - lpt1_handler(dev); + lpt_set_cnfga_readout(dev->lpt, 0x10); + lpt_port_remove(dev->lpt); + lpt_handler(dev); serial_remove(dev->uart[0x00]); serial_remove(dev->uart[0x01]); serial_handler(dev, 0); @@ -494,13 +522,31 @@ pc87306_init(UNUSED(const device_t *info)) { pc87306_t *dev = (pc87306_t *) calloc(1, sizeof(pc87306_t)); + dev->kbc_type = info->local & PCX730X_KBC; + dev->fdc = device_add(&fdc_at_nsc_device); dev->uart[0x00] = device_add_inst(&ns16550_device, 1); dev->uart[0x01] = device_add_inst(&ns16550_device, 2); + dev->lpt = device_add_inst(&lpt_port_device, 1); + lpt_set_cnfga_readout(dev->lpt, 0x10); + dev->nvr = device_add(&at_mb_nvr_device); + switch (dev->kbc_type) { + case PCX730X_AMI: + default: + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_AMI | 0x00003500)); + break; + case PCX730X_PHOENIX_42: + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_PHOENIX | 0x00013700)); + break; + case PCX730X_PHOENIX_42I: + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_PHOENIX | 0x00041600)); + break; + } + dev->gpio[0] = dev->gpio[1] = 0xff; pc87306_reset_common(dev); diff --git a/src/sio/sio_pc87307.c b/src/sio/sio_pc87307.c index 7e51c5975..44db6ee9d 100644 --- a/src/sio/sio_pc87307.c +++ b/src/sio/sio_pc87307.c @@ -42,7 +42,7 @@ typedef struct pc87307_t { uint8_t baddr; uint8_t pm_idx; uint8_t regs[48]; - uint8_t ld_regs[256][208]; + uint8_t ld_regs[256][256]; uint8_t pcregs[16]; uint8_t gpio[2][8]; uint8_t pm[8]; @@ -54,6 +54,7 @@ typedef struct pc87307_t { void *kbc; fdc_t *fdc; serial_t *uart[2]; + lpt_t *lpt; } pc87307_t; enum { @@ -72,7 +73,7 @@ enum { #define LD_MAX LD_PM static void fdc_handler(pc87307_t *dev); -static void lpt1_handler(pc87307_t *dev); +static void lpt_handler(pc87307_t *dev); static void serial_handler(pc87307_t *dev, int uart); static void kbc_handler(pc87307_t *dev); static void pc87307_write(uint16_t port, uint8_t val, void *priv); @@ -187,7 +188,7 @@ pc87307_pm_write(uint16_t port, uint8_t val, void *priv) switch (dev->pm_idx) { case 0x00: fdc_handler(dev); - lpt1_handler(dev); + lpt_handler(dev); serial_handler(dev, 1); serial_handler(dev, 0); break; @@ -266,6 +267,7 @@ fdc_handler(pc87307_t *dev) uint8_t active = (dev->ld_regs[LD_FDC][0x00] & 0x01) && (dev->pm[0x00] & 0x08); uint8_t irq = (dev->ld_regs[LD_FDC][0x40] & 0x0f); + uint8_t dma = (dev->ld_regs[LD_FDC][0x44] & 0x0f); uint16_t addr = ((dev->ld_regs[LD_FDC][0x30] << 8) | dev->ld_regs[LD_FDC][0x31]) & 0xfff8; @@ -273,25 +275,71 @@ fdc_handler(pc87307_t *dev) pc87307_log("Enabling FDC on %04X, IRQ %i...\n", addr, irq); fdc_set_base(dev->fdc, addr); fdc_set_irq(dev->fdc, irq); + fdc_set_dma_ch(dev->fdc, dma); } } static void -lpt1_handler(pc87307_t *dev) +lpt_handler(pc87307_t *dev) { uint8_t active = (dev->ld_regs[LD_LPT][0x00] & 0x01) && (dev->pm[0x00] & 0x10); uint8_t irq = (dev->ld_regs[LD_LPT][0x40] & 0x0f); + uint8_t dma = (dev->ld_regs[LD_LPT][0x44] & 0x0f); uint16_t addr = (dev->ld_regs[LD_LPT][0x30] << 8) | dev->ld_regs[LD_LPT][0x31]; + uint8_t mode = (dev->ld_regs[LD_LPT][0xf0] >> 7); + uint16_t mask = 0xfffc; - if (active && (addr <= 0xfffc)) { + if (irq > 15) + irq = 0xff; + + if (dma >= 4) + dma = 0xff; + + lpt_port_remove(dev->lpt); + + switch (mode) { + default: + case 0x00: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x01: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 1); + break; + case 0x02: case 0x03: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x04: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + case 0x07: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + } + + lpt_set_cfg_regs_enabled(dev->lpt, !!(dev->ld_regs[LD_LPT][0xf0] & 0x10)); + + if (active && (addr <= (0xfffc & mask))) { pc87307_log("Enabling LPT1 on %04X...\n", addr); - lpt1_setup(addr); + lpt_port_setup(dev->lpt, addr & mask); } else - lpt1_setup(0xffff); + lpt_port_setup(dev->lpt, 0xffff); - lpt1_irq(irq); + lpt_port_irq(dev->lpt, irq); + lpt_port_dma(dev->lpt, dma); } static void @@ -439,7 +487,7 @@ pc87307_write(uint16_t port, uint8_t val, void *priv) break; case LD_LPT: dev->ld_regs[ld][reg] = val; - lpt1_handler(dev); + lpt_handler(dev); break; case LD_UART2: dev->ld_regs[ld][reg] = val; @@ -488,7 +536,7 @@ pc87307_write(uint16_t port, uint8_t val, void *priv) break; case LD_LPT: dev->ld_regs[ld][reg] = (old & 0xfc) | (val & 0x03); - lpt1_handler(dev); + lpt_handler(dev); break; case LD_UART2: dev->ld_regs[ld][reg] = val; @@ -526,7 +574,7 @@ pc87307_write(uint16_t port, uint8_t val, void *priv) break; case LD_LPT: dev->ld_regs[ld][reg] = (old & 0x03) | (val & 0xfc); - lpt1_handler(dev); + lpt_handler(dev); break; case LD_UART2: dev->ld_regs[ld][reg] = (old & 0x07) | (val & 0xf8); @@ -594,7 +642,7 @@ pc87307_write(uint16_t port, uint8_t val, void *priv) break; case LD_LPT: dev->ld_regs[ld][reg] = val; - lpt1_handler(dev); + lpt_handler(dev); break; case LD_UART2: dev->ld_regs[ld][reg] = val; @@ -630,7 +678,7 @@ pc87307_write(uint16_t port, uint8_t val, void *priv) break; case LD_LPT: dev->ld_regs[ld][reg] = val; - lpt1_handler(dev); + lpt_handler(dev); break; case LD_UART2: dev->ld_regs[ld][reg] = val; @@ -662,7 +710,7 @@ pc87307_write(uint16_t port, uint8_t val, void *priv) break; case LD_LPT: dev->ld_regs[ld][reg] = val; - lpt1_handler(dev); + lpt_handler(dev); break; case LD_UART2: case LD_UART1: dev->ld_regs[ld][reg] = val; @@ -822,7 +870,7 @@ pc87307_reset(void *priv) kbc_handler(dev); fdc_handler(dev); - lpt1_handler(dev); + lpt_handler(dev); serial_handler(dev, 0); serial_handler(dev, 1); gpio_handler(dev); @@ -850,17 +898,20 @@ pc87307_init(const device_t *info) dev->uart[0] = device_add_inst(&ns16550_device, 1); dev->uart[1] = device_add_inst(&ns16550_device, 2); + dev->lpt = device_add_inst(&lpt_port_device, 1); + lpt_set_cnfga_readout(dev->lpt, 0x14); + switch (info->local & PCX730X_KBC) { - default: case PCX730X_AMI: - dev->kbc = device_add(&keyboard_ps2_intel_ami_pci_device); + default: + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_AMI | 0x00003500)); break; /* Optiplex! */ case PCX730X_PHOENIX_42: - dev->kbc = device_add(&keyboard_ps2_phoenix_device); + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_PHOENIX | 0x00013700)); break; case PCX730X_PHOENIX_42I: - dev->kbc = device_add(&keyboard_ps2_phoenix_pci_device); + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_PHOENIX | 0x00041600)); break; } diff --git a/src/sio/sio_pc87309.c b/src/sio/sio_pc87309.c index 5a3f0d828..415bbbdc4 100644 --- a/src/sio/sio_pc87309.c +++ b/src/sio/sio_pc87309.c @@ -42,7 +42,7 @@ typedef struct pc87309_t { uint8_t baddr; uint8_t pm_idx; uint8_t regs[48]; - uint8_t ld_regs[256][208]; + uint8_t ld_regs[256][256]; uint8_t pm[8]; uint16_t superio_base; uint16_t pm_base; @@ -50,6 +50,7 @@ typedef struct pc87309_t { void *kbc; fdc_t *fdc; serial_t *uart[2]; + lpt_t *lpt; } pc87309_t; enum { @@ -66,7 +67,7 @@ enum { #define LD_MAX LD_MOUSE static void fdc_handler(pc87309_t *dev); -static void lpt1_handler(pc87309_t *dev); +static void lpt_handler(pc87309_t *dev); static void serial_handler(pc87309_t *dev, int uart); static void kbc_handler(pc87309_t *dev); static void pc87309_write(uint16_t port, uint8_t val, void *priv); @@ -103,7 +104,7 @@ pc87309_pm_write(uint16_t port, uint8_t val, void *priv) switch (dev->pm_idx) { case 0x00: fdc_handler(dev); - lpt1_handler(dev); + lpt_handler(dev); serial_handler(dev, 1); serial_handler(dev, 0); break; @@ -182,6 +183,7 @@ fdc_handler(pc87309_t *dev) uint8_t active = (dev->ld_regs[LD_FDC][0x00] & 0x01) && (dev->pm[0x00] & 0x08); uint8_t irq = (dev->ld_regs[LD_FDC][0x40] & 0x0f); + uint8_t dma = (dev->ld_regs[LD_FDC][0x44] & 0x0f); uint16_t addr = ((dev->ld_regs[LD_FDC][0x30] << 8) | dev->ld_regs[LD_FDC][0x31]) & 0xfff8; @@ -189,25 +191,71 @@ fdc_handler(pc87309_t *dev) pc87309_log("Enabling FDC on %04X, IRQ %i...\n", addr, irq); fdc_set_base(dev->fdc, addr); fdc_set_irq(dev->fdc, irq); + fdc_set_dma_ch(dev->fdc, dma); } } static void -lpt1_handler(pc87309_t *dev) +lpt_handler(pc87309_t *dev) { uint8_t active = (dev->ld_regs[LD_LPT][0x00] & 0x01) && (dev->pm[0x00] & 0x10); uint8_t irq = (dev->ld_regs[LD_LPT][0x40] & 0x0f); + uint8_t dma = (dev->ld_regs[LD_LPT][0x44] & 0x0f); uint16_t addr = (dev->ld_regs[LD_LPT][0x30] << 8) | dev->ld_regs[LD_LPT][0x31]; + uint8_t mode = (dev->ld_regs[LD_LPT][0xf0] >> 7); + uint16_t mask = 0xfffc; - if (active && (addr <= 0xfffc)) { + if (irq > 15) + irq = 0xff; + + if (dma >= 4) + dma = 0xff; + + lpt_port_remove(dev->lpt); + + switch (mode) { + default: + case 0x00: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x01: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 1); + break; + case 0x02: case 0x03: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x04: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + case 0x07: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + } + + lpt_set_cfg_regs_enabled(dev->lpt, !!(dev->ld_regs[LD_LPT][0xf0] & 0x10)); + + if (active && (addr <= (0xfffc & mask))) { pc87309_log("Enabling LPT1 on %04X...\n", addr); - lpt1_setup(addr); + lpt_port_setup(dev->lpt, addr & mask); } else - lpt1_setup(0xffff); + lpt_port_setup(dev->lpt, 0xffff); - lpt1_irq(irq); + lpt_port_irq(dev->lpt, irq); + lpt_port_dma(dev->lpt, dma); } static void @@ -330,7 +378,7 @@ pc87309_write(uint16_t port, uint8_t val, void *priv) break; case LD_LPT: dev->ld_regs[ld][reg] = val; - lpt1_handler(dev); + lpt_handler(dev); break; case LD_UART2: dev->ld_regs[ld][reg] = val; @@ -372,7 +420,7 @@ pc87309_write(uint16_t port, uint8_t val, void *priv) break; case LD_LPT: dev->ld_regs[ld][reg] = (old & 0xfc) | (val & 0x03); - lpt1_handler(dev); + lpt_handler(dev); break; case LD_UART2: dev->ld_regs[ld][reg] = val; @@ -403,7 +451,7 @@ pc87309_write(uint16_t port, uint8_t val, void *priv) break; case LD_LPT: dev->ld_regs[ld][reg] = (old & 0x03) | (val & 0xfc); - lpt1_handler(dev); + lpt_handler(dev); break; case LD_UART2: dev->ld_regs[ld][reg] = (old & 0x07) | (val & 0xf8); @@ -456,7 +504,7 @@ pc87309_write(uint16_t port, uint8_t val, void *priv) break; case LD_LPT: dev->ld_regs[ld][reg] = val; - lpt1_handler(dev); + lpt_handler(dev); break; case LD_UART2: dev->ld_regs[ld][reg] = val; @@ -492,7 +540,7 @@ pc87309_write(uint16_t port, uint8_t val, void *priv) break; case LD_LPT: dev->ld_regs[ld][reg] = val; - lpt1_handler(dev); + lpt_handler(dev); break; case LD_UART2: dev->ld_regs[ld][reg] = val; @@ -524,7 +572,7 @@ pc87309_write(uint16_t port, uint8_t val, void *priv) break; case LD_LPT: dev->ld_regs[ld][reg] = val; - lpt1_handler(dev); + lpt_handler(dev); break; case LD_UART2: case LD_UART1: dev->ld_regs[ld][reg] = val; @@ -658,7 +706,7 @@ pc87309_reset(void *priv) kbc_handler(dev); fdc_handler(dev); - lpt1_handler(dev); + lpt_handler(dev); serial_handler(dev, 0); serial_handler(dev, 1); pm_handler(dev); @@ -685,17 +733,20 @@ pc87309_init(const device_t *info) dev->uart[0] = device_add_inst(&ns16550_device, 1); dev->uart[1] = device_add_inst(&ns16550_device, 2); + dev->lpt = device_add_inst(&lpt_port_device, 1); + lpt_set_cnfga_readout(dev->lpt, 0x14); + switch (info->local & PCX730X_KBC) { - default: case PCX730X_AMI: - dev->kbc = device_add(&keyboard_ps2_intel_ami_pci_device); + default: + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_AMI | 0x00003500)); break; /* Optiplex! */ case PCX730X_PHOENIX_42: - dev->kbc = device_add(&keyboard_ps2_phoenix_device); + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_PHOENIX | 0x00013700)); break; case PCX730X_PHOENIX_42I: - dev->kbc = device_add(&keyboard_ps2_phoenix_pci_device); + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_PHOENIX | 0x00041600)); break; } diff --git a/src/sio/sio_pc87310.c b/src/sio/sio_pc87310.c index ae0f5d977..b6341abc5 100644 --- a/src/sio/sio_pc87310.c +++ b/src/sio/sio_pc87310.c @@ -64,10 +64,11 @@ typedef struct pc87310_t { uint8_t regs[2]; fdc_t *fdc; serial_t *uart[2]; + lpt_t *lpt; } pc87310_t; static void -lpt1_handler(pc87310_t *dev) +lpt_handler(pc87310_t *dev) { int temp; uint16_t lpt_port = LPT1_ADDR; @@ -81,19 +82,19 @@ lpt1_handler(pc87310_t *dev) */ temp = dev->regs[1] & 0x03; - lpt1_remove(); + lpt_port_remove(dev->lpt); switch (temp) { - case 0: + case 0x00: lpt_port = LPT1_ADDR; break; - case 1: + case 0x01: lpt_port = LPT_MDA_ADDR; break; - case 2: + case 0x02: lpt_port = LPT2_ADDR; break; - case 3: + case 0x03: lpt_port = 0x000; lpt_irq = 0xff; break; @@ -103,9 +104,9 @@ lpt1_handler(pc87310_t *dev) } if (lpt_port) - lpt1_setup(lpt_port); + lpt_port_setup(dev->lpt, lpt_port); - lpt1_irq(lpt_irq); + lpt_port_irq(dev->lpt, lpt_irq); } static void @@ -187,22 +188,22 @@ pc87310_write(UNUSED(uint16_t port), uint8_t val, void *priv) /* Reconfigure parallel port. */ if (valxor & 0x03) /* Bits 1, 0: 1, 1 = Disable parallel port. */ - lpt1_handler(dev); + lpt_handler(dev); /* Reconfigure serial ports. */ if (valxor & 0x1c) serial_handler(dev); /* Reconfigure IDE controller. */ - if ((dev->flags & PC87310_IDE) && (valxor & 0x20)) { + if ((dev->flags & PCX73XX_IDE) && (valxor & 0x20)) { pc87310_log("SIO: HDC disabled\n"); ide_pri_disable(); /* Bit 5: 1 = Disable IDE controller. */ if (!(val & 0x20)) { pc87310_log("SIO: HDC enabled\n"); ide_set_base(0, 0x1f0); - ide_set_side(0, 0x3f6); - ide_pri_enable(); + ide_set_side(0, 0x3f6); + ide_pri_enable(); } } @@ -253,9 +254,9 @@ pc87310_reset(pc87310_t *dev) dev->tries = 0; - lpt1_handler(dev); + lpt_handler(dev); serial_handler(dev); - if (dev->flags & PC87310_IDE) { + if (dev->flags & PCX73XX_IDE) { ide_pri_disable(); ide_pri_enable(); } @@ -283,16 +284,19 @@ pc87310_init(const device_t *info) dev->uart[0] = device_add_inst(&ns16450_device, 1); dev->uart[1] = device_add_inst(&ns16450_device, 2); - if (dev->flags & PC87310_IDE) + dev->lpt = device_add_inst(&lpt_port_device, 1); + lpt_set_ext(dev->lpt, 1); + + if (dev->flags & PCX73XX_IDE) device_add((dev->flags & PC87310_ALI) ? &ide_vlb_device : &ide_isa_device); pc87310_reset(dev); - io_sethandler(0x3f3, 0x0001, + io_sethandler(0x03f3, 0x0001, pc87310_read, NULL, NULL, pc87310_write, NULL, NULL, dev); if (dev->flags & PC87310_ALI) - io_sethandler(0x3f1, 0x0001, + io_sethandler(0x03f1, 0x0001, pc87310_read, NULL, NULL, pc87310_write, NULL, NULL, dev); return dev; diff --git a/src/sio/sio_pc87311.c b/src/sio/sio_pc87311.c deleted file mode 100644 index b560ef425..000000000 --- a/src/sio/sio_pc87311.c +++ /dev/null @@ -1,318 +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. - * - * Emulation of the National Semiconductor PC87311 Super I/O - * - * - * - * Authors: Tiseno100 - * - * Copyright 2020 Tiseno100 - */ -#include -#include -#include -#include -#include -#include -#define HAVE_STDARG_H -#include <86box/86box.h> -#include <86box/io.h> -#include <86box/timer.h> -#include <86box/device.h> -#include <86box/lpt.h> -#include <86box/serial.h> -#include <86box/hdc.h> -#include <86box/hdc_ide.h> -#include <86box/fdd.h> -#include <86box/fdc.h> -#include <86box/sio.h> -#include <86box/plat_unused.h> - -#define HAS_IDE_FUNCTIONALITY dev->ide_function - -/* Basic Functionalities */ -#define FUNCTION_ENABLE dev->regs[0x00] -#define FUNCTION_ADDRESS dev->regs[0x01] -#define POWER_TEST dev->regs[0x02] - -/* Base Addresses */ -#define LPT_BA (FUNCTION_ADDRESS & 0x03) -#define UART1_BA ((FUNCTION_ADDRESS >> 2) & 0x03) -#define UART2_BA ((FUNCTION_ADDRESS >> 4) & 0x03) -#define COM_BA ((FUNCTION_ADDRESS >> 6) & 0x03) - -#ifdef ENABLE_PC87311_LOG -int pc87311_do_log = ENABLE_PC87311_LOG; - -static void -pc87311_log(const char *fmt, ...) -{ - va_list ap; - - if (pc87311_do_log) { - va_start(ap, fmt); - pclog_ex(fmt, ap); - va_end(ap); - } -} -#else -# define pc87311_log(fmt, ...) -#endif - -typedef struct pc87311_t { - uint8_t index; - uint8_t regs[256]; - uint8_t cfg_lock; - uint8_t ide_function; - uint16_t base; - uint16_t irq; - fdc_t *fdc_controller; - serial_t *uart[2]; - -} pc87311_t; - -void pc87311_fdc_handler(pc87311_t *dev); -void pc87311_uart_handler(uint8_t num, pc87311_t *dev); -void pc87311_lpt_handler(pc87311_t *dev); -void pc87311_ide_handler(pc87311_t *dev); -void pc87311_enable(pc87311_t *dev); - -static void -pc87311_write(uint16_t addr, uint8_t val, void *priv) -{ - pc87311_t *dev = (pc87311_t *) priv; - - switch (addr) { - case 0x398: - case 0x26e: - dev->index = val; - break; - - case 0x399: - case 0x26f: - switch (dev->index) { - case 0x00: - FUNCTION_ENABLE = val; - break; - case 0x01: - FUNCTION_ADDRESS = val; - break; - case 0x02: - POWER_TEST = val; - break; - - default: - break; - } - break; - - default: - break; - } - - pc87311_enable(dev); -} - -static uint8_t -pc87311_read(UNUSED(uint16_t addr), void *priv) -{ - const pc87311_t *dev = (pc87311_t *) priv; - - return dev->regs[dev->index]; -} - -void -pc87311_fdc_handler(pc87311_t *dev) -{ - fdc_remove(dev->fdc_controller); - fdc_set_base(dev->fdc_controller, (FUNCTION_ENABLE & 0x20) ? FDC_SECONDARY_ADDR : FDC_PRIMARY_ADDR); - pc87311_log("PC87311-FDC: BASE %04x\n", (FUNCTION_ENABLE & 0x20) ? FDC_SECONDARY_ADDR : FDC_PRIMARY_ADDR); -} - -uint16_t -com3(pc87311_t *dev) -{ - switch (COM_BA) { - case 0: - return COM3_ADDR; - case 1: - return 0x0338; - case 2: - return COM4_ADDR; - case 3: - return 0x0220; - default: - return COM3_ADDR; - } -} - -uint16_t -com4(pc87311_t *dev) -{ - switch (COM_BA) { - case 0: - return COM4_ADDR; - case 1: - return 0x0238; - case 2: - return 0x02e0; - case 3: - return 0x0228; - default: - return COM4_ADDR; - } -} - -void -pc87311_uart_handler(uint8_t num, pc87311_t *dev) -{ - serial_remove(dev->uart[num & 1]); - - switch (!(num & 1) ? UART1_BA : UART2_BA) { - case 0: - dev->base = COM1_ADDR; - dev->irq = COM1_IRQ; - break; - case 1: - dev->base = COM2_ADDR; - dev->irq = COM2_IRQ; - break; - case 2: - dev->base = com3(dev); - dev->irq = COM3_IRQ; - break; - case 3: - dev->base = com4(dev); - dev->irq = COM4_IRQ; - break; - - default: - break; - } - serial_setup(dev->uart[num & 1], dev->base, dev->irq); - pc87311_log("PC87311-UART%01x: BASE %04x IRQ %01x\n", num & 1, dev->base, dev->irq); -} - -void -pc87311_lpt_handler(pc87311_t *dev) -{ - lpt1_remove(); - switch (LPT_BA) { - case 0: - dev->base = LPT1_ADDR; - dev->irq = (POWER_TEST & 0x08) ? LPT1_IRQ : LPT2_IRQ; - break; - case 1: - dev->base = LPT_MDA_ADDR; - dev->irq = LPT_MDA_IRQ; - break; - case 2: - dev->base = LPT2_ADDR; - dev->irq = LPT2_IRQ; - break; - - default: - break; - } - lpt1_setup(dev->base); - lpt1_irq(dev->irq); - pc87311_log("PC87311-LPT: BASE %04x IRQ %01x\n", dev->base, dev->irq); -} - -void -pc87311_ide_handler(pc87311_t *dev) -{ - ide_pri_disable(); - ide_sec_disable(); - - ide_set_base(0, 0x1f0); - ide_set_side(0, 0x3f6); - ide_pri_enable(); - - if (FUNCTION_ENABLE & 0x80) { - ide_set_base(1, 0x170); - ide_set_side(1, 0x376); - ide_sec_enable(); - } - pc87311_log("PC87311-IDE: PRI %01x SEC %01x\n", (FUNCTION_ENABLE >> 6) & 1, (FUNCTION_ENABLE >> 7) & 1); -} - -void -pc87311_enable(pc87311_t *dev) -{ - (FUNCTION_ENABLE & 0x01) ? pc87311_lpt_handler(dev) : lpt1_remove(); - (FUNCTION_ENABLE & 0x02) ? pc87311_uart_handler(0, dev) : serial_remove(dev->uart[0]); - (FUNCTION_ENABLE & 0x04) ? pc87311_uart_handler(1, dev) : serial_remove(dev->uart[1]); - (FUNCTION_ENABLE & 0x08) ? pc87311_fdc_handler(dev) : fdc_remove(dev->fdc_controller); - if (FUNCTION_ENABLE & 0x20) - pc87311_fdc_handler(dev); - if (HAS_IDE_FUNCTIONALITY) { - (FUNCTION_ENABLE & 0x40) ? pc87311_ide_handler(dev) : ide_pri_disable(); - (FUNCTION_ADDRESS & 0x80) ? pc87311_ide_handler(dev) : ide_sec_disable(); - } -} - -static void -pc87311_close(void *priv) -{ - pc87311_t *dev = (pc87311_t *) priv; - - free(dev); -} - -static void * -pc87311_init(const device_t *info) -{ - pc87311_t *dev = (pc87311_t *) calloc(1, sizeof(pc87311_t)); - - /* Avoid conflicting with machines that make no use of the PC87311 Internal IDE */ - HAS_IDE_FUNCTIONALITY = info->local; - - dev->fdc_controller = device_add(&fdc_at_nsc_device); - dev->uart[0] = device_add_inst(&ns16450_device, 1); - dev->uart[1] = device_add_inst(&ns16450_device, 2); - - if (HAS_IDE_FUNCTIONALITY) - device_add(&ide_isa_2ch_device); - - io_sethandler(0x0398, 0x0002, pc87311_read, NULL, NULL, pc87311_write, NULL, NULL, dev); - io_sethandler(0x026e, 0x0002, pc87311_read, NULL, NULL, pc87311_write, NULL, NULL, dev); - - pc87311_enable(dev); - - return dev; -} - -const device_t pc87311_device = { - .name = "National Semiconductor PC87311", - .internal_name = "pc87311", - .flags = 0, - .local = 0, - .init = pc87311_init, - .close = pc87311_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t pc87311_ide_device = { - .name = "National Semiconductor PC87311 with IDE functionality", - .internal_name = "pc87311_ide", - .flags = 0, - .local = 1, - .init = pc87311_init, - .close = pc87311_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; diff --git a/src/sio/sio_pc87332.c b/src/sio/sio_pc873xx.c similarity index 58% rename from src/sio/sio_pc87332.c rename to src/sio/sio_pc873xx.c index d9fb0b211..05f5d9be2 100644 --- a/src/sio/sio_pc87332.c +++ b/src/sio/sio_pc873xx.c @@ -6,9 +6,7 @@ * * This file is part of the 86Box distribution. * - * Emulation of the NatSemi PC87332 Super I/O chip. - * - * + * Emulation of the NatSemi PC87311 and PC87332 Super I/O chips. * * Authors: Miran Grca, * @@ -35,39 +33,50 @@ #include <86box/fdc.h> #include <86box/sio.h> -typedef struct pc87332_t { +typedef struct pc873xx_t { + uint8_t baddr; + uint8_t is_332; uint8_t tries; uint8_t has_ide; uint8_t fdc_on; - uint8_t regs[15]; + uint8_t regs[256]; + uint16_t base_addr; int cur_reg; + int max_reg; fdc_t *fdc; serial_t *uart[2]; -} pc87332_t; + lpt_t *lpt; +} pc873xx_t; static void -lpt1_handler(pc87332_t *dev) +lpt_handler(pc873xx_t *dev) { int temp; uint16_t lpt_port = LPT1_ADDR; - uint8_t lpt_irq = LPT2_IRQ; + uint8_t lpt_irq = LPT2_IRQ; + uint8_t lpt_dma = ((dev->regs[0x18] & 0x06) >> 1); - temp = dev->regs[0x01] & 3; + lpt_port_remove(dev->lpt); + + if (lpt_dma == 0x00) + lpt_dma = 0xff; + + temp = dev->regs[0x01] & 0x03; switch (temp) { - case 0: + case 0x00: lpt_port = LPT1_ADDR; lpt_irq = (dev->regs[0x02] & 0x08) ? LPT1_IRQ : LPT2_IRQ; break; - case 1: + case 0x01: lpt_port = LPT_MDA_ADDR; - lpt_irq = LPT_MDA_IRQ; + lpt_irq = LPT_MDA_IRQ; break; - case 2: + case 0x02: lpt_port = LPT2_ADDR; lpt_irq = LPT2_IRQ; break; - case 3: + case 0x03: lpt_port = 0x000; lpt_irq = 0xff; break; @@ -76,14 +85,24 @@ lpt1_handler(pc87332_t *dev) break; } - if (lpt_port) - lpt1_setup(lpt_port); + lpt_set_cnfgb_readout(dev->lpt, (lpt_irq == 5) ? 0x38 : 0x08); + lpt_set_ext(dev->lpt, !!(dev->regs[0x02] & 0x80)); - lpt1_irq(lpt_irq); + if (dev->is_332) { + lpt_set_epp(dev->lpt, !!(dev->regs[0x04] & 0x01)); + lpt_set_ecp(dev->lpt, !!(dev->regs[0x04] & 0x04)); + + lpt_port_dma(dev->lpt, lpt_dma); + } + + if (lpt_port) + lpt_port_setup(dev->lpt, lpt_port); + + lpt_port_irq(dev->lpt, lpt_irq); } static void -serial_handler(pc87332_t *dev, int uart) +serial_handler(pc873xx_t *dev, int uart) { int temp; @@ -141,7 +160,7 @@ serial_handler(pc87332_t *dev, int uart) } static void -ide_handler(pc87332_t *dev) +ide_handler(pc873xx_t *dev) { /* TODO: Make an ide_disable(channel) and ide_enable(channel) so we can simplify this. */ if (dev->has_ide == 2) { @@ -160,9 +179,9 @@ ide_handler(pc87332_t *dev) } static void -pc87332_write(uint16_t port, uint8_t val, void *priv) +pc873xx_write(uint16_t port, uint8_t val, void *priv) { - pc87332_t *dev = (pc87332_t *) priv; + pc873xx_t *dev = (pc873xx_t *) priv; uint8_t index; uint8_t valxor; @@ -176,7 +195,7 @@ pc87332_write(uint16_t port, uint8_t val, void *priv) if (dev->tries) { valxor = val ^ dev->regs[dev->cur_reg]; dev->tries = 0; - if ((dev->cur_reg <= 14) && (dev->cur_reg != 8)) + if ((dev->cur_reg <= dev->max_reg) && (dev->cur_reg != 8)) dev->regs[dev->cur_reg] = val; else return; @@ -186,70 +205,84 @@ pc87332_write(uint16_t port, uint8_t val, void *priv) } } - switch (dev->cur_reg) { - case 0: - if (valxor & 1) { - lpt1_remove(); - if ((val & 1) && !(dev->regs[2] & 1)) - lpt1_handler(dev); + if (dev->cur_reg <= dev->max_reg) switch (dev->cur_reg) { + case 0x00: + if (valxor & 0x01) { + lpt_port_remove(dev->lpt); + if ((val & 0x01) && !(dev->regs[0x02] & 0x01)) + lpt_handler(dev); } - if (valxor & 2) { + if (valxor & 0x02) { serial_remove(dev->uart[0]); - if ((val & 2) && !(dev->regs[2] & 1)) + if ((val & 0x02) && !(dev->regs[0x02] & 0x01)) serial_handler(dev, 0); } - if (valxor & 4) { + if (valxor & 0x04) { serial_remove(dev->uart[1]); - if ((val & 4) && !(dev->regs[2] & 1)) + if ((val & 0x04) && !(dev->regs[0x02] & 0x01)) serial_handler(dev, 1); } if (valxor & 0x28) { fdc_remove(dev->fdc); - if ((val & 8) && !(dev->regs[2] & 1)) + if ((val & 0x08) && !(dev->regs[0x02] & 0x01)) fdc_set_base(dev->fdc, (val & 0x20) ? FDC_SECONDARY_ADDR : FDC_PRIMARY_ADDR); } if (dev->has_ide && (valxor & 0xc0)) ide_handler(dev); break; - case 1: - if (valxor & 3) { - lpt1_remove(); - if ((dev->regs[0] & 1) && !(dev->regs[2] & 1)) - lpt1_handler(dev); + case 0x01: + if (valxor & 0x03) { + lpt_port_remove(dev->lpt); + if ((dev->regs[0x00] & 0x01) && !(dev->regs[0x02] & 0x01)) + lpt_handler(dev); } if (valxor & 0xcc) { serial_remove(dev->uart[0]); - if ((dev->regs[0] & 2) && !(dev->regs[2] & 1)) + if ((dev->regs[0x00] & 0x02) && !(dev->regs[0x02] & 0x01)) serial_handler(dev, 0); } if (valxor & 0xf0) { serial_remove(dev->uart[1]); - if ((dev->regs[0] & 4) && !(dev->regs[2] & 1)) + if ((dev->regs[0x00] & 0x04) && !(dev->regs[0x02] & 0x01)) serial_handler(dev, 1); } break; - case 2: - if (valxor & 1) { - lpt1_remove(); + case 0x02: + if (valxor & 0x01) { + lpt_port_remove(dev->lpt); serial_remove(dev->uart[0]); serial_remove(dev->uart[1]); fdc_remove(dev->fdc); - if (!(val & 1)) { - if (dev->regs[0] & 1) - lpt1_handler(dev); - if (dev->regs[0] & 2) + if (!(val & 0x01)) { + if (dev->regs[0x00] & 0x01) + lpt_handler(dev); + if (dev->regs[0x00] & 0x02) serial_handler(dev, 0); - if (dev->regs[0] & 4) + if (dev->regs[0x00] & 0x04) serial_handler(dev, 1); - if (dev->regs[0] & 8) - fdc_set_base(dev->fdc, (dev->regs[0] & 0x20) ? FDC_SECONDARY_ADDR : FDC_PRIMARY_ADDR); + if (dev->regs[0x00] & 0x08) + fdc_set_base(dev->fdc, (dev->regs[0x00] & 0x20) ? FDC_SECONDARY_ADDR : FDC_PRIMARY_ADDR); } } - if (valxor & 8) { - lpt1_remove(); - if ((dev->regs[0] & 1) && !(dev->regs[2] & 1)) - lpt1_handler(dev); + if (valxor & 0x88) { + lpt_port_remove(dev->lpt); + if ((dev->regs[0x00] & 0x01) && !(dev->regs[0x02] & 0x01)) + lpt_handler(dev); + } + break; + case 0x04: + if (valxor & 0x05) { + lpt_port_remove(dev->lpt); + if ((dev->regs[0x00] & 0x01) && !(dev->regs[0x02] & 0x01)) + lpt_handler(dev); + } + break; + case 0x06: + if (valxor & 0x08) { + lpt_port_remove(dev->lpt); + if ((dev->regs[0x00] & 0x01) && !(dev->regs[0x02] & 0x01)) + lpt_handler(dev); } break; @@ -259,9 +292,9 @@ pc87332_write(uint16_t port, uint8_t val, void *priv) } uint8_t -pc87332_read(uint16_t port, void *priv) +pc873xx_read(uint16_t port, void *priv) { - pc87332_t *dev = (pc87332_t *) priv; + pc873xx_t *dev = (pc873xx_t *) priv; uint8_t ret = 0xff; uint8_t index; @@ -282,7 +315,7 @@ pc87332_read(uint16_t port, void *priv) } void -pc87332_reset(pc87332_t *dev) +pc873xx_reset(pc873xx_t *dev) { memset(dev->regs, 0, 15); @@ -298,8 +331,8 @@ pc87332_reset(pc87332_t *dev) 0 = 360 rpm @ 500 kbps for 3.5" 1 = Default, 300 rpm @ 500, 300, 250, 1000 kbps for 3.5" */ - lpt1_remove(); - lpt1_handler(dev); + lpt_port_remove(dev->lpt); + lpt_handler(dev); serial_remove(dev->uart[0]); serial_remove(dev->uart[1]); serial_handler(dev, 0); @@ -313,101 +346,65 @@ pc87332_reset(pc87332_t *dev) } static void -pc87332_close(void *priv) +pc873xx_close(void *priv) { - pc87332_t *dev = (pc87332_t *) priv; + pc873xx_t *dev = (pc873xx_t *) priv; free(dev); } static void * -pc87332_init(const device_t *info) +pc873xx_init(const device_t *info) { - pc87332_t *dev = (pc87332_t *) calloc(1, sizeof(pc87332_t)); + pc873xx_t *dev = (pc873xx_t *) calloc(1, sizeof(pc873xx_t)); dev->fdc = device_add(&fdc_at_nsc_device); dev->uart[0] = device_add_inst(&ns16550_device, 1); dev->uart[1] = device_add_inst(&ns16550_device, 2); - dev->has_ide = (info->local >> 8) & 0xff; - dev->fdc_on = (info->local >> 16) & 0xff; - pc87332_reset(dev); + dev->lpt = device_add_inst(&lpt_port_device, 1); + lpt_set_cnfgb_readout(dev->lpt, 0x08); - if ((info->local & 0xff) == 0x01) { - io_sethandler(0x398, 0x0002, - pc87332_read, NULL, NULL, pc87332_write, NULL, NULL, dev); - } else { - io_sethandler(0x02e, 0x0002, - pc87332_read, NULL, NULL, pc87332_write, NULL, NULL, dev); + dev->is_332 = !!(info->local & PC87332); + dev->max_reg = dev->is_332 ? 0x08 : 0x02; + + dev->has_ide = info->local & (PCX73XX_IDE_PRI | PCX73XX_IDE_SEC); + dev->fdc_on = info->local & PCX73XX_FDC_ON; + + dev->baddr = (info->local & PCX730X_BADDR) >> PCX730X_BADDR_SHIFT; + pc873xx_reset(dev); + + switch (dev->baddr) { + default: + case 0x00: + dev->base_addr = 0x0398; + break; + case 0x01: + dev->base_addr = 0x026e; + break; + case 0x02: + dev->base_addr = 0x015c; + break; + case 0x03: + /* Our PC87332 machine use this unless otherwise specified. */ + dev->base_addr = 0x002e; + break; } + io_sethandler(dev->base_addr, 0x0002, + pc873xx_read, NULL, NULL, pc873xx_write, NULL, NULL, dev); + return dev; } -const device_t pc87332_device = { - .name = "National Semiconductor PC87332 Super I/O", - .internal_name = "pc87332", +const device_t pc873xx_device = { + .name = "National Semiconductor PC873xx Super I/O", + .internal_name = "pc873xx", .flags = 0, .local = 0x00, - .init = pc87332_init, - .close = pc87332_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t pc87332_398_device = { - .name = "National Semiconductor PC87332 Super I/O (Port 398h)", - .internal_name = "pc87332_398", - .flags = 0, - .local = 0x01, - .init = pc87332_init, - .close = pc87332_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t pc87332_398_ide_device = { - .name = "National Semiconductor PC87332 Super I/O (Port 398h) (With IDE)", - .internal_name = "pc87332_398_ide", - .flags = 0, - .local = 0x101, - .init = pc87332_init, - .close = pc87332_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t pc87332_398_ide_sec_device = { - .name = "National Semiconductor PC87332 Super I/O (Port 398h) (With Secondary IDE)", - .internal_name = "pc87332_398_ide_sec", - .flags = 0, - .local = 0x201, - .init = pc87332_init, - .close = pc87332_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t pc87332_398_ide_fdcon_device = { - .name = "National Semiconductor PC87332 Super I/O (Port 398h) (With IDE and FDC on)", - .internal_name = "pc87332_398_ide_fdcon", - .flags = 0, - .local = 0x10101, - .init = pc87332_init, - .close = pc87332_close, + .init = pc873xx_init, + .close = pc873xx_close, .reset = NULL, .available = NULL, .speed_changed = NULL, diff --git a/src/sio/sio_prime3b.c b/src/sio/sio_prime3b.c deleted file mode 100644 index 1cc0be3aa..000000000 --- a/src/sio/sio_prime3b.c +++ /dev/null @@ -1,310 +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. - * - * Emulation of the Goldstar Prime3B Super I/O - * - * - * - * Authors: Tiseno100 - * - * Copyright 2021 Tiseno100 - */ -#include -#include -#include -#include -#include -#include -#define HAVE_STDARG_H -#include <86box/86box.h> -#include <86box/io.h> -#include <86box/timer.h> -#include <86box/device.h> -#include <86box/lpt.h> -#include <86box/serial.h> -#include <86box/hdc.h> -#include <86box/hdc_ide.h> -#include <86box/fdd.h> -#include <86box/fdc.h> -#include <86box/sio.h> -#include <86box/plat_unused.h> - -#define FSR dev->regs[0xa0] -#define ASR dev->regs[0xa1] -#define PDR dev->regs[0xa2] -#define HAS_IDE_FUNCTIONALITY dev->ide_function - -#ifdef ENABLE_PRIME3B_LOG -int prime3b_do_log = ENABLE_PRIME3B_LOG; - -static void -prime3b_log(const char *fmt, ...) -{ - va_list ap; - - if (prime3b_do_log) { - va_start(ap, fmt); - pclog_ex(fmt, ap); - va_end(ap); - } -} -#else -# define prime3b_log(fmt, ...) -#endif - -typedef struct prime3b_t { - uint8_t index; - uint8_t regs[256]; - uint8_t cfg_lock; - uint8_t ide_function; - uint16_t com3_addr; - uint16_t com4_addr; - - fdc_t *fdc_controller; - serial_t *uart[2]; - -} prime3b_t; - -void prime3b_fdc_handler(prime3b_t *dev); -void prime3b_uart_handler(uint8_t num, prime3b_t *dev); -void prime3b_lpt_handler(prime3b_t *dev); -void prime3b_ide_handler(prime3b_t *dev); -void prime3b_enable(prime3b_t *dev); -void prime3b_powerdown(prime3b_t *dev); - -static void -prime3b_write(uint16_t addr, uint8_t val, void *priv) -{ - prime3b_t *dev = (prime3b_t *) priv; - - if (addr == 0x398) { - dev->index = val; - - /* Enter/Escape Configuration Mode */ - if (val == 0x33) - dev->cfg_lock = 0; - else if (val == 0xcc) - dev->cfg_lock = 1; - } else if ((addr == 0x399) && !dev->cfg_lock) { - switch (dev->index) { - case 0xa0: /* Function Selection Register (FSR) */ - FSR = val; - prime3b_enable(dev); - break; - case 0xa1: /* Address Selection Register (ASR) */ - ASR = val; - prime3b_enable(dev); - break; - case 0xa2: /* Power Down Register (PDR) */ - dev->regs[0xa2] = val; - break; - case 0xa3: /* Test Mode Register (TMR) */ - dev->regs[0xa3] = val; - break; - case 0xa4: /* Miscellaneous Function Register */ - dev->regs[0xa4] = val; - switch ((dev->regs[0xa4] >> 6) & 3) { - case 0: - dev->com3_addr = COM3_ADDR; - dev->com4_addr = COM4_ADDR; - break; - case 1: - dev->com3_addr = 0x338; - dev->com4_addr = 0x238; - break; - case 2: - dev->com3_addr = COM4_ADDR; - dev->com4_addr = 0x2e0; - break; - case 3: - dev->com3_addr = 0x220; - dev->com4_addr = 0x228; - break; - - default: - break; - } - break; - case 0xa5: /* ECP Register */ - dev->regs[0xa5] = val; - break; - - default: - break; - } - } -} - -static uint8_t -prime3b_read(UNUSED(uint16_t addr), void *priv) -{ - const prime3b_t *dev = (prime3b_t *) priv; - - return dev->regs[dev->index]; -} - -void -prime3b_fdc_handler(prime3b_t *dev) -{ - uint16_t fdc_base = !(ASR & 0x40) ? FDC_PRIMARY_ADDR : FDC_SECONDARY_ADDR; - fdc_remove(dev->fdc_controller); - fdc_set_base(dev->fdc_controller, fdc_base); - prime3b_log("Prime3B-FDC: Enabled with base %03x\n", fdc_base); -} - -void -prime3b_uart_handler(uint8_t num, prime3b_t *dev) -{ - uint16_t uart_base; - if ((ASR >> (3 + 2 * num)) & 1) - uart_base = !((ASR >> (2 + 2 * num)) & 1) ? dev->com3_addr : dev->com4_addr; - else - uart_base = !((ASR >> (2 + 2 * num)) & 1) ? COM1_ADDR : COM2_ADDR; - - serial_remove(dev->uart[num]); - serial_setup(dev->uart[num], uart_base, 4 - num); - prime3b_log("Prime3B-UART%d: Enabled with base %03x\n", num, uart_base); -} - -void -prime3b_lpt_handler(prime3b_t *dev) -{ - uint16_t lpt_base = (ASR & 2) ? LPT_MDA_ADDR : (!(ASR & 1) ? LPT1_ADDR : LPT2_ADDR); - lpt1_remove(); - lpt1_setup(lpt_base); - lpt1_irq(LPT1_IRQ); - prime3b_log("Prime3B-LPT: Enabled with base %03x\n", lpt_base); -} - -void -prime3b_ide_handler(prime3b_t *dev) -{ - ide_pri_disable(); - uint16_t ide_base = !(ASR & 0x80) ? 0x1f0 : 0x170; - uint16_t ide_side = ide_base + 0x206; - ide_set_base(0, ide_base); - ide_set_side(0, ide_side); - prime3b_log("Prime3B-IDE: Enabled with base %03x and side %03x\n", ide_base, ide_side); -} - -void -prime3b_enable(prime3b_t *dev) -{ - /* - Simulate a device enable/disable scenario - - Register A0: Function Selection Register (FSR) - Bit 7: Gameport - Bit 6: 4 FDD Enable - Bit 5: IDE - Bit 4: FDC - Bit 3: UART 2 - Bit 2: UART 1 - Bit 1/0: PIO (0/0 Bidirectional , 0/1 ECP, 1/0 EPP, 1/1 Disabled) - - Note: 86Box LPT is simplistic and can't do ECP or EPP. - */ - - !(FSR & 3) ? prime3b_lpt_handler(dev) : lpt1_remove(); - (FSR & 4) ? prime3b_uart_handler(0, dev) : serial_remove(dev->uart[0]); - (FSR & 8) ? prime3b_uart_handler(1, dev) : serial_remove(dev->uart[1]); - (FSR & 0x10) ? prime3b_fdc_handler(dev) : fdc_remove(dev->fdc_controller); - if (HAS_IDE_FUNCTIONALITY) - (FSR & 0x20) ? prime3b_ide_handler(dev) : ide_pri_disable(); -} - -void -prime3b_powerdown(prime3b_t *dev) -{ - /* Note: It can be done more efficiently for sure */ - uint8_t old_base = PDR; - - if (PDR & 1) - PDR |= 0x1e; - - if (PDR & 0x40) - io_removehandler(0x0398, 0x0002, prime3b_read, NULL, NULL, prime3b_write, NULL, NULL, dev); - - if (PDR & 2) - fdc_remove(dev->fdc_controller); - - if (PDR & 4) - serial_remove(dev->uart[0]); - - if (PDR & 8) - serial_remove(dev->uart[1]); - - if (PDR & 0x10) - lpt1_remove(); - - if (PDR & 1) - PDR = old_base; -} - -static void -prime3b_close(void *priv) -{ - prime3b_t *dev = (prime3b_t *) priv; - - free(dev); -} - -static void * -prime3b_init(const device_t *info) -{ - prime3b_t *dev = (prime3b_t *) calloc(1, sizeof(prime3b_t)); - - /* Avoid conflicting with machines that make no use of the Prime3B Internal IDE */ - HAS_IDE_FUNCTIONALITY = info->local; - - dev->regs[0xa0] = 3; - - dev->fdc_controller = device_add(&fdc_at_device); - dev->uart[0] = device_add_inst(&ns16550_device, 1); - dev->uart[1] = device_add_inst(&ns16550_device, 2); - if (HAS_IDE_FUNCTIONALITY) - device_add(&ide_isa_device); - - dev->com3_addr = COM3_ADDR; - dev->com4_addr = COM4_ADDR; - fdc_reset(dev->fdc_controller); - - prime3b_enable(dev); - - io_sethandler(0x0398, 0x0002, prime3b_read, NULL, NULL, prime3b_write, NULL, NULL, dev); - - return dev; -} - -const device_t prime3b_device = { - .name = "Goldstar Prime3B", - .internal_name = "prime3b", - .flags = 0, - .local = 0, - .init = prime3b_init, - .close = prime3b_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t prime3b_ide_device = { - .name = "Goldstar Prime3B with IDE functionality", - .internal_name = "prime3b_ide", - .flags = 0, - .local = 1, - .init = prime3b_init, - .close = prime3b_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; diff --git a/src/sio/sio_prime3c.c b/src/sio/sio_prime3c.c deleted file mode 100644 index f70f9f372..000000000 --- a/src/sio/sio_prime3c.c +++ /dev/null @@ -1,355 +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. - * - * Emulation of the LG Prime3C Super I/O - * - * - * - * Authors: Tiseno100 - * - * Copyright 2020 Tiseno100 - */ -#include -#include -#include -#include -#include -#include -#define HAVE_STDARG_H -#include <86box/86box.h> -#include <86box/io.h> -#include <86box/timer.h> -#include <86box/device.h> -#include <86box/lpt.h> -#include <86box/serial.h> -#include <86box/hdc.h> -#include <86box/hdc_ide.h> -#include <86box/fdd.h> -#include <86box/fdc.h> -#include <86box/sio.h> -#include <86box/plat_unused.h> - -#ifdef ENABLE_PRIME3C_LOG -int prime3c_do_log = ENABLE_PRIME3C_LOG; - -static void -prime3c_log(const char *fmt, ...) -{ - va_list ap; - - if (prime3c_do_log) { - va_start(ap, fmt); - pclog_ex(fmt, ap); - va_end(ap); - } -} -#else -# define prime3c_log(fmt, ...) -#endif - -/* Function Select(Note on prime3c_enable) */ -#define FUNCTION_SELECT dev->regs[0xc2] - -/* Base Address Registers */ -#define FDC_BASE_ADDRESS dev->regs[0xc3] -#define IDE_BASE_ADDRESS dev->regs[0xc4] -#define IDE_SIDE_ADDRESS dev->regs[0xc5] -#define LPT_BASE_ADDRESS dev->regs[0xc6] -#define UART1_BASE_ADDRESS dev->regs[0xc7] -#define UART2_BASE_ADDRESS dev->regs[0xc8] - -/* FDC/LPT Configuration */ -#define FDC_LPT_DMA dev->regs[0xc9] -#define FDC_LPT_IRQ dev->regs[0xca] - -/* UART 1/2 Configuration */ -#define UART_IRQ dev->regs[0xcb] - -/* Miscellaneous Configuration*/ -#define FDC_SWAP (dev->regs[0xd6] & 0x01) - -/* IDE functionality(Note on Init) */ -#define HAS_IDE_FUNCTIONALITY dev->ide_function - -typedef struct prime3c_t { - uint8_t index; - uint8_t regs[256]; - uint8_t cfg_lock; - uint8_t ide_function; - - fdc_t *fdc_controller; - serial_t *uart[2]; - -} prime3c_t; - -void prime3c_fdc_handler(prime3c_t *dev); -void prime3c_uart_handler(uint8_t num, prime3c_t *dev); -void prime3c_lpt_handler(prime3c_t *dev); -void prime3c_ide_handler(prime3c_t *dev); -void prime3c_enable(prime3c_t *dev); - -static void -prime3c_write(uint16_t addr, uint8_t val, void *priv) -{ - prime3c_t *dev = (prime3c_t *) priv; - - switch (addr) { - case 0x398: - dev->index = val; - - /* Enter/Escape Configuration Mode */ - if (val == 0x33) - dev->cfg_lock = 0; - else if (val == 0x55) - dev->cfg_lock = 1; - break; - - case 0x399: - if (!dev->cfg_lock) { - switch (dev->index) { - case 0xc2: - FUNCTION_SELECT = val & 0xbf; - prime3c_enable(dev); - break; - - case 0xc3: - FDC_BASE_ADDRESS = val & 0xfc; - prime3c_fdc_handler(dev); - break; - - case 0xc4: - IDE_BASE_ADDRESS = val & 0xfc; - if (HAS_IDE_FUNCTIONALITY) - prime3c_ide_handler(dev); - break; - - case 0xc5: - IDE_SIDE_ADDRESS = (val & 0xfc) | 0x02; - if (HAS_IDE_FUNCTIONALITY) - prime3c_ide_handler(dev); - break; - - case 0xc6: - LPT_BASE_ADDRESS = val; - break; - - case 0xc7: - UART1_BASE_ADDRESS = val & 0xfe; - prime3c_uart_handler(0, dev); - break; - - case 0xc8: - UART2_BASE_ADDRESS = val & 0xfe; - prime3c_uart_handler(1, dev); - break; - - case 0xc9: - FDC_LPT_DMA = val; - prime3c_fdc_handler(dev); - break; - - case 0xca: - FDC_LPT_IRQ = val; - prime3c_fdc_handler(dev); - prime3c_lpt_handler(dev); - break; - - case 0xcb: - UART_IRQ = val; - prime3c_uart_handler(0, dev); - prime3c_uart_handler(1, dev); - break; - - case 0xcd: - case 0xce: - dev->regs[dev->index] = val; - break; - - case 0xcf: - dev->regs[dev->index] = val & 0x3f; - break; - - case 0xd0: - dev->regs[dev->index] = val & 0xfc; - break; - - case 0xd1: - dev->regs[dev->index] = val & 0x3f; - break; - - case 0xd3: - dev->regs[dev->index] = val & 0x7c; - break; - - case 0xd5: - case 0xd6: - case 0xd7: - case 0xd8: - dev->regs[dev->index] = val; - break; - - default: - break; - } - } - break; - - default: - break; - } -} - -static uint8_t -prime3c_read(UNUSED(uint16_t addr), void *priv) -{ - const prime3c_t *dev = (prime3c_t *) priv; - - return dev->regs[dev->index]; -} - -void -prime3c_fdc_handler(prime3c_t *dev) -{ - fdc_remove(dev->fdc_controller); - if (FUNCTION_SELECT & 0x10) { - fdc_set_base(dev->fdc_controller, FDC_BASE_ADDRESS << 2); - fdc_set_irq(dev->fdc_controller, (FDC_LPT_IRQ >> 4) & 0xf); - fdc_set_dma_ch(dev->fdc_controller, (FDC_LPT_DMA >> 4) & 0xf); - fdc_set_swap(dev->fdc_controller, FDC_SWAP); - prime3c_log("Prime3C-FDC: BASE %04x IRQ %01x DMA %01x\n", FDC_BASE_ADDRESS << 2, (FDC_LPT_IRQ >> 4) & 0xf, (FDC_LPT_DMA >> 4) & 0xf); - } -} - -void -prime3c_uart_handler(uint8_t num, prime3c_t *dev) -{ - serial_remove(dev->uart[num & 1]); - if (FUNCTION_SELECT & (!(num & 1) ? 0x04 : 0x08)) { - serial_setup(dev->uart[num & 1], (!(num & 1) ? UART1_BASE_ADDRESS : UART2_BASE_ADDRESS) << 2, (UART_IRQ >> (!(num & 1) ? 4 : 0)) & 0xf); - prime3c_log("Prime3C-UART%01x: BASE %04x IRQ %01x\n", num & 1, (!(num & 1) ? UART1_BASE_ADDRESS : UART2_BASE_ADDRESS) << 2, (UART_IRQ >> (!(num & 1) ? 4 : 0)) & 0xf); - } -} - -void -prime3c_lpt_handler(prime3c_t *dev) -{ - lpt1_remove(); - if (!(FUNCTION_SELECT & 0x03)) { - - lpt1_setup(LPT_BASE_ADDRESS << 2); - lpt1_irq(FDC_LPT_IRQ & 0xf); - prime3c_log("Prime3C-LPT: BASE %04x IRQ %02x\n", LPT_BASE_ADDRESS << 2, FDC_LPT_IRQ & 0xf); - } -} - -void -prime3c_ide_handler(prime3c_t *dev) -{ - ide_pri_disable(); - if (FUNCTION_SELECT & 0x20) { - ide_set_base(0, IDE_BASE_ADDRESS << 2); - ide_set_side(0, IDE_SIDE_ADDRESS << 2); - ide_pri_enable(); - prime3c_log("Prime3C-IDE: BASE %04x SIDE %04x\n", IDE_BASE_ADDRESS << 2, IDE_SIDE_ADDRESS << 2); - } -} - -void -prime3c_enable(prime3c_t *dev) -{ - /* - Simulate a device enable/disable scenario - - Register C2: Function Select - Bit 7: Gameport - Bit 6: Reserved - Bit 5: IDE - Bit 4: FDC - Bit 3: UART 2 - Bit 2: UART 1 - Bit 1/0: PIO (0/0 Unidirectional , 0/1 ECP, 1/0 EPP, 1/1 Disabled) - - Note: 86Box LPT is simplistic and can't do ECP or EPP. - */ - - !(FUNCTION_SELECT & 0x03) ? prime3c_lpt_handler(dev) : lpt1_remove(); - (FUNCTION_SELECT & 0x04) ? prime3c_uart_handler(0, dev) : serial_remove(dev->uart[0]); - (FUNCTION_SELECT & 0x08) ? prime3c_uart_handler(1, dev) : serial_remove(dev->uart[1]); - (FUNCTION_SELECT & 0x10) ? prime3c_fdc_handler(dev) : fdc_remove(dev->fdc_controller); - if (HAS_IDE_FUNCTIONALITY) - (FUNCTION_SELECT & 0x20) ? prime3c_ide_handler(dev) : ide_pri_disable(); -} - -static void -prime3c_close(void *priv) -{ - prime3c_t *dev = (prime3c_t *) priv; - - free(dev); -} - -static void * -prime3c_init(const device_t *info) -{ - prime3c_t *dev = (prime3c_t *) calloc(1, sizeof(prime3c_t)); - - /* Avoid conflicting with machines that make no use of the Prime3C Internal IDE */ - HAS_IDE_FUNCTIONALITY = info->local; - - dev->regs[0xc0] = 0x3c; - dev->regs[0xc2] = 0x03; - dev->regs[0xc3] = 0x3c; - dev->regs[0xc4] = 0x3c; - dev->regs[0xc5] = 0x3d; - dev->regs[0xd5] = 0x3c; - - dev->fdc_controller = device_add(&fdc_at_device); - dev->uart[0] = device_add_inst(&ns16550_device, 1); - dev->uart[1] = device_add_inst(&ns16550_device, 2); - if (HAS_IDE_FUNCTIONALITY) - device_add(&ide_isa_device); - - prime3c_fdc_handler(dev); - prime3c_uart_handler(0, dev); - prime3c_uart_handler(1, dev); - prime3c_lpt_handler(dev); - if (HAS_IDE_FUNCTIONALITY) - prime3c_ide_handler(dev); - - io_sethandler(0x0398, 0x0002, prime3c_read, NULL, NULL, prime3c_write, NULL, NULL, dev); - - return dev; -} - -const device_t prime3c_device = { - .name = "Goldstar Prime3C", - .internal_name = "prime3c", - .flags = 0, - .local = 0, - .init = prime3c_init, - .close = prime3c_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t prime3c_ide_device = { - .name = "Goldstar Prime3C with IDE functionality", - .internal_name = "prime3c_ide", - .flags = 0, - .local = 1, - .init = prime3c_init, - .close = prime3c_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; diff --git a/src/sio/sio_um8663f.c b/src/sio/sio_um8663f.c deleted file mode 100644 index 6075fe3e7..000000000 --- a/src/sio/sio_um8663f.c +++ /dev/null @@ -1,423 +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. - * - * Implementation of the UMC UMF8663F Super I/O chip. - * - * Authors: Miran Grca, - * - * Copyright 2024 Miran Grca. - */ -#include -#include -#include -#include -#include -#include -#define HAVE_STDARG_H -#include <86box/86box.h> -#include <86box/device.h> -#include <86box/io.h> -#include <86box/timer.h> -#include <86box/pci.h> -#include <86box/lpt.h> -#include <86box/serial.h> -#include <86box/fdd.h> -#include <86box/fdc.h> -#include <86box/gameport.h> -#include <86box/hdc.h> -#include <86box/hdc_ide.h> -#include <86box/sio.h> -#include <86box/random.h> -#include <86box/plat_unused.h> - -#ifdef ENABLE_UM8663F_LOG -int um8663f_do_log = ENABLE_UM8663F_LOG; - -static void -um8663f_log(const char *fmt, ...) -{ - va_list ap; - - if (um8663f_do_log) { - va_start(ap, fmt); - pclog_ex(fmt, ap); - va_end(ap); - } -} -#else -# define um8663f_log(fmt, ...) -#endif - -typedef struct um8663f_t { - uint8_t max_reg; - uint8_t ide; - uint8_t locked; - uint8_t cur_reg; - uint8_t regs[5]; - - fdc_t *fdc; - serial_t *uart[2]; -} um8663f_t; - -static void -um8663f_fdc_handler(um8663f_t *dev) -{ - fdc_remove(dev->fdc); - if (dev->regs[0] & 0x01) - fdc_set_base(dev->fdc, (dev->regs[1] & 0x01) ? FDC_PRIMARY_ADDR : FDC_SECONDARY_ADDR); -} - -static void -um8663f_uart_handler(um8663f_t *dev, int port) -{ - uint8_t shift = (port + 1); - - serial_remove(dev->uart[port]); - if (dev->regs[0] & (2 << port)) { - switch ((dev->regs[1] >> shift) & 0x01) { - case 0x00: - if (port == 1) - serial_setup(dev->uart[port], COM4_ADDR, COM4_IRQ); - else - serial_setup(dev->uart[port], COM3_ADDR, COM1_IRQ); - break; - case 0x01: - if (port == 1) - serial_setup(dev->uart[port], COM2_ADDR, COM2_IRQ); - else - serial_setup(dev->uart[port], COM1_ADDR, COM1_IRQ); - break; - - default: - break; - } - } -} - -static void -um8663f_lpt_handler(um8663f_t *dev) -{ - lpt1_remove(); - if (dev->regs[0] & 0x08) { - switch ((dev->regs[1] >> 3) & 0x01) { - case 0x01: - lpt1_setup(LPT1_ADDR); - lpt1_irq(LPT1_IRQ); - break; - case 0x00: - lpt1_setup(LPT2_ADDR); - lpt1_irq(LPT2_IRQ); - break; - - default: - break; - } - } -} - -static void -um8663f_ide_handler(um8663f_t *dev) -{ - int board = dev->ide - 1; - - if (dev->ide > 0) { - ide_handlers(board, 0); - ide_set_base(board, (dev->regs[1] & 0x10) ? 0x01f0 : 0x0170); - ide_set_side(board, (dev->regs[1] & 0x10) ? 0x03f6 : 0x0376); - if (dev->regs[0] & 0x10) - ide_handlers(board, 1); - } -} - -static void -um8663f_write(uint16_t port, uint8_t val, void *priv) -{ - um8663f_t *dev = (um8663f_t *) priv; - uint8_t valxor; - - um8663f_log("UM8663F: write(%04X, %02X)\n", port, val); - - if (dev->locked) { - if ((port == 0x108) && (val == 0xaa)) - dev->locked = 0; - } else { - if (port == 0x108) { - if (val == 0x55) - dev->locked = 1; - else - dev->cur_reg = val; - } else if ((dev->cur_reg >= 0xc0) && (dev->cur_reg <= dev->max_reg)) { - valxor = (dev->regs[dev->cur_reg - 0xc0] ^ val); - dev->regs[dev->cur_reg - 0xc0] = val; - switch (dev->cur_reg - 0xc0) { - /* Port enable register. */ - case 0x00: - if (valxor & 0x10) - um8663f_ide_handler(dev); - if (valxor & 0x08) - um8663f_lpt_handler(dev); - if (valxor & 0x04) - um8663f_uart_handler(dev, 1); - if (valxor & 0x02) - um8663f_uart_handler(dev, 0); - if (valxor & 0x01) - um8663f_fdc_handler(dev); - break; - /* - Port configuration register: - - Bits 7, 6: - - 0, 0 = LPT 1 is none; - - 0, 1 = LPT 1 is EPP; - - 1, 0 = LPT 1 is SPP; - - 1, 1 = LPT 1 is ECP; - - Bit 4 = 0 = IDE is secondary, 1 = IDE is primary; - - Bit 3 = 0 = LPT 1 is 278h, 1 = LPT 1 is 378h; - - Bit 2 = 0 = UART 2 is COM4, 1 = UART 2 is COM2; - - Bit 1 = 0 = UART 1 is COM3, 1 = UART 2 is COM1; - - Bit 0 = 0 = FDC is 370h, 1 = UART 2 is 3f0h. - */ - case 0x01: - if (valxor & 0x10) - um8663f_ide_handler(dev); - if (valxor & 0x08) - um8663f_lpt_handler(dev); - if (valxor & 0x04) - um8663f_uart_handler(dev, 1); - if (valxor & 0x02) - um8663f_uart_handler(dev, 0); - if (valxor & 0x01) - um8663f_fdc_handler(dev); - break; - } - } - } -} - -static uint8_t -um8663f_read(uint16_t port, void *priv) -{ - const um8663f_t *dev = (um8663f_t *) priv; - uint8_t ret = 0xff; - - if (!dev->locked) { - if (port == 0x108) - ret = dev->cur_reg; /* ??? */ - else if ((dev->cur_reg >= 0xc0) && (dev->cur_reg <= dev->max_reg)) { - ret = dev->regs[dev->cur_reg - 0xc0]; - if (dev->cur_reg == 0xc0) - ret = (ret & 0x1f) | ((random_generate() & 0x07) << 5); - } - } - - um8663f_log("UM8663F: read(%04X) = %02X\n", port, ret); - - return ret; -} - -static void -um8663f_reset(void *priv) -{ - um8663f_t *dev = (um8663f_t *) priv; - - serial_remove(dev->uart[0]); - serial_setup(dev->uart[0], COM1_ADDR, COM1_IRQ); - - serial_remove(dev->uart[1]); - serial_setup(dev->uart[1], COM2_ADDR, COM2_IRQ); - - lpt1_remove(); - lpt1_setup(LPT1_ADDR); - - fdc_reset(dev->fdc); - fdc_remove(dev->fdc); - - memset(dev->regs, 0x00, sizeof(dev->regs)); - - dev->regs[0x00] = (dev->ide > 0) ? 0x1f : 0x0f; - dev->regs[0x01] = (dev->ide == 2) ? 0x0f : 0x1f; - - um8663f_fdc_handler(dev); - um8663f_uart_handler(dev, 0); - um8663f_uart_handler(dev, 1); - um8663f_lpt_handler(dev); - um8663f_ide_handler(dev); - - dev->locked = 1; -} - -static void -um8663f_close(void *priv) -{ - um8663f_t *dev = (um8663f_t *) priv; - - free(dev); -} - -static void * -um8663f_init(UNUSED(const device_t *info)) -{ - um8663f_t *dev = (um8663f_t *) calloc(1, sizeof(um8663f_t)); - - dev->fdc = device_add(&fdc_at_smc_device); - - dev->uart[0] = device_add_inst(&ns16550_device, 1); - dev->uart[1] = device_add_inst(&ns16550_device, 2); - - dev->ide = info->local & 0xff; - if (dev->ide < IDE_BUS_MAX) - device_add(&ide_isa_device); - - dev->max_reg = info->local >> 8; - - if (dev->max_reg != 0x00) - io_sethandler(0x0108, 0x0002, um8663f_read, NULL, NULL, um8663f_write, NULL, NULL, dev); - - um8663f_reset(dev); - - return dev; -} - -const device_t um82c862f_device = { - .name = "UMC UM82C862F Super I/O", - .internal_name = "um82c862f", - .flags = 0, - .local = 0x0000, - .init = um8663f_init, - .close = um8663f_close, - .reset = um8663f_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t um82c862f_ide_device = { - .name = "UMC UM82C862F Super I/O (With IDE)", - .internal_name = "um82c862f_ide", - .flags = 0, - .local = 0x0001, - .init = um8663f_init, - .close = um8663f_close, - .reset = um8663f_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t um82c863f_device = { - .name = "UMC UM82C863F Super I/O", - .internal_name = "um82c863f", - .flags = 0, - .local = 0xc100, - .init = um8663f_init, - .close = um8663f_close, - .reset = um8663f_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t um82c863f_ide_device = { - .name = "UMC UM82C863F Super I/O (With IDE)", - .internal_name = "um82c863f_ide", - .flags = 0, - .local = 0xc101, - .init = um8663f_init, - .close = um8663f_close, - .reset = um8663f_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t um8663af_device = { - .name = "UMC UM8663AF Super I/O", - .internal_name = "um8663af", - .flags = 0, - .local = 0xc300, - .init = um8663f_init, - .close = um8663f_close, - .reset = um8663f_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t um8663af_ide_device = { - .name = "UMC UM8663AF Super I/O (With IDE)", - .internal_name = "um8663af_ide", - .flags = 0, - .local = 0xc301, - .init = um8663f_init, - .close = um8663f_close, - .reset = um8663f_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t um8663af_ide_sec_device = { - .name = "UMC UM8663AF Super I/O (With Secondary IDE)", - .internal_name = "um8663af_ide_sec", - .flags = 0, - .local = 0xc302, - .init = um8663f_init, - .close = um8663f_close, - .reset = um8663f_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t um8663bf_device = { - .name = "UMC UM8663BF Super I/O", - .internal_name = "um8663bf", - .flags = 0, - .local = 0xc400, - .init = um8663f_init, - .close = um8663f_close, - .reset = um8663f_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t um8663bf_ide_device = { - .name = "UMC UM8663BF Super I/O (With IDE)", - .internal_name = "um8663bf_ide", - .flags = 0, - .local = 0xc401, - .init = um8663f_init, - .close = um8663f_close, - .reset = um8663f_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t um8663bf_ide_sec_device = { - .name = "UMC UM8663BF Super I/O (With Secondary IDE)", - .internal_name = "um8663bf_ide_sec", - .flags = 0, - .local = 0xc402, - .init = um8663f_init, - .close = um8663f_close, - .reset = um8663f_reset, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; diff --git a/src/sio/sio_um8669f.c b/src/sio/sio_um8669f.c index 6da9ef6e9..f0460ada9 100644 --- a/src/sio/sio_um8669f.c +++ b/src/sio/sio_um8669f.c @@ -8,8 +8,6 @@ * * Emulation of the UMC UM8669F Super I/O chip. * - * - * * Authors: Sarah Walker, * Miran Grca, * RichardG, @@ -92,7 +90,8 @@ static uint8_t um8669f_pnp_rom[] = { 0x15, 0x41, 0xd0, 0x04, 0x00, 0x01, /* logical device PNP0400, can participate in boot */ 0x22, 0xfa, 0x1f, /* IRQ 1/3/4/5/6/7/8/9/10/11/12 */ - 0x47, 0x00, 0x00, 0x01, 0xf8, 0x03, 0x08, 0x08, /* I/O 0x100-0x3F8, decodes 10-bit, 8-byte alignment, 8 addresses */ + 0x2a, 0x0f, 0x0c, /* DMA 0/1/2/3, compatibility, no count by word, count by byte, is bus master, 8-bit only */ + 0x47, 0x01, 0x00, 0x01, 0xf8, 0x0f, 0x08, 0x08, /* I/O 0x100-0x3F8, decodes 16-bit, 8-byte alignment, 8 addresses */ 0x15, 0x41, 0xd0, 0x06, 0x00, 0x01, /* logical device PNP0600, can participate in boot */ 0x22, 0xfa, 0x1f, /* IRQ 1/3/4/5/6/7/8/9/10/11/12 */ @@ -120,7 +119,8 @@ static const isapnp_device_config_t um8669f_pnp_defaults[] = { }, { .activate = 1, .io = { { .base = LPT1_ADDR }, }, - .irq = { { .irq = LPT1_IRQ }, } + .irq = { { .irq = LPT1_IRQ }, }, + .dma = { { .dma = 3 }, } }, { .activate = 0, .io = { { .base = 0x1f0 }, }, @@ -157,6 +157,7 @@ typedef struct um8669f_t { fdc_t *fdc; serial_t *uart[2]; + lpt_t * lpt; uint8_t ide; void *gameport; } um8669f_t; @@ -203,11 +204,11 @@ um8669f_pnp_config_changed(uint8_t ld, isapnp_device_config_t *config, void *pri break; case 3: - lpt1_remove(); + lpt_port_remove(dev->lpt); if (config->activate && (config->io[0].base != ISAPNP_IO_DISABLED)) { um8669f_log("UM8669F: LPT enabled at port %04X IRQ %d\n", config->io[0].base, config->irq[0].irq); - lpt1_setup(config->io[0].base); + lpt_port_setup(dev->lpt, config->io[0].base); } else { um8669f_log("UM8669F: LPT disabled\n"); } @@ -267,6 +268,9 @@ um8669f_write(uint16_t port, uint8_t val, void *priv) if (dev->cur_reg == 0xc1) { um8669f_log("UM8669F: ISAPnP %sabled\n", (val & 0x80) ? "en" : "dis"); isapnp_enable_card(dev->pnp_card, (val & 0x80) ? ISAPNP_CARD_FORCE_CONFIG : ISAPNP_CARD_DISABLE); + } else if (dev->cur_reg == 0xc0) { + lpt_set_epp(dev->lpt, val & 0x08); + lpt_set_ecp(dev->lpt, val & 0x10); } } } @@ -301,7 +305,10 @@ um8669f_reset(um8669f_t *dev) serial_remove(dev->uart[1]); - lpt1_remove(); + lpt_port_remove(dev->lpt); + + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); if (dev->ide < IDE_BUS_MAX) ide_remove_handlers(dev->ide); @@ -339,7 +346,12 @@ um8669f_init(const device_t *info) dev->uart[0] = device_add_inst(&ns16550_device, 1); dev->uart[1] = device_add_inst(&ns16550_device, 2); - dev->ide = info->local; + dev->lpt = device_add_inst(&lpt_port_device, 1); + + lpt_set_cnfgb_readout(dev->lpt, 0x00); + lpt_set_ext(dev->lpt, 1); + + dev->ide = (uint8_t) (info->local - 1); if (dev->ide < IDE_BUS_MAX) device_add(&ide_isa_device); @@ -357,20 +369,6 @@ const device_t um8669f_device = { .name = "UMC UM8669F Super I/O", .internal_name = "um8669f", .flags = 0, - .local = 0xff, - .init = um8669f_init, - .close = um8669f_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t um8669f_ide_device = { - .name = "UMC UM8669F Super I/O (With IDE)", - .internal_name = "um8669f_ide", - .flags = 0, .local = 0, .init = um8669f_init, .close = um8669f_close, @@ -380,17 +378,3 @@ const device_t um8669f_ide_device = { .force_redraw = NULL, .config = NULL }; - -const device_t um8669f_ide_sec_device = { - .name = "UMC UM8669F Super I/O (With Secondary IDE)", - .internal_name = "um8669f_ide_sec", - .flags = 0, - .local = 1, - .init = um8669f_init, - .close = um8669f_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; diff --git a/src/sio/sio_um866x.c b/src/sio/sio_um866x.c new file mode 100644 index 000000000..bc1127a8b --- /dev/null +++ b/src/sio/sio_um866x.c @@ -0,0 +1,325 @@ +/* + * 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. + * + * Implementation of the UMC UM82C862F, UM82C863F, UM86863F, + * and UM8663BF Super I/O chips. + * + * Authors: Miran Grca, + * + * Copyright 2024 Miran Grca. + */ +#include +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include <86box/device.h> +#include <86box/io.h> +#include <86box/timer.h> +#include <86box/pci.h> +#include <86box/lpt.h> +#include <86box/serial.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/gameport.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/sio.h> +#include <86box/random.h> +#include <86box/plat_unused.h> + +#ifdef ENABLE_UM866X_LOG +int um866x_do_log = ENABLE_UM866X_LOG; + +static void +um866x_log(const char *fmt, ...) +{ + va_list ap; + + if (um866x_do_log) { + va_start(ap, fmt); + pclog_ex(fmt, ap); + va_end(ap); + } +} +#else +# define um866x_log(fmt, ...) +#endif + +typedef struct um866x_t { + uint8_t max_reg; + uint8_t ide; + uint8_t locked; + uint8_t cur_reg; + uint8_t regs[5]; + + fdc_t *fdc; + + serial_t *uart[2]; + lpt_t * lpt; +} um866x_t; + +static void +um866x_fdc_handler(um866x_t *dev) +{ + fdc_remove(dev->fdc); + if (dev->regs[0] & 0x01) + fdc_set_base(dev->fdc, (dev->regs[1] & 0x01) ? FDC_PRIMARY_ADDR : FDC_SECONDARY_ADDR); +} + +static void +um866x_uart_handler(um866x_t *dev, int port) +{ + uint8_t shift = (port + 1); + + serial_remove(dev->uart[port]); + if (dev->regs[0] & (2 << port)) { + switch ((dev->regs[1] >> shift) & 0x01) { + case 0x00: + if (port == 1) + serial_setup(dev->uart[port], COM4_ADDR, COM4_IRQ); + else + serial_setup(dev->uart[port], COM3_ADDR, COM1_IRQ); + break; + case 0x01: + if (port == 1) + serial_setup(dev->uart[port], COM2_ADDR, COM2_IRQ); + else + serial_setup(dev->uart[port], COM1_ADDR, COM1_IRQ); + break; + + default: + break; + } + } +} + +static void +um866x_lpt_handler(um866x_t *dev) +{ + int enabled = (dev->regs[0] & 0x08); + + lpt_port_remove(dev->lpt); + switch(dev->regs[1] & 0xc0) { + case 0x00: + enabled = 0; + break; + case 0x40: + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x80: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 1); + break; + case 0xc0: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + } + if (enabled) { + switch ((dev->regs[1] >> 3) & 0x01) { + case 0x01: + lpt_port_setup(dev->lpt, LPT1_ADDR); + lpt_port_irq(dev->lpt, LPT1_IRQ); + break; + case 0x00: + lpt_port_setup(dev->lpt, LPT2_ADDR); + lpt_port_irq(dev->lpt, LPT2_IRQ); + break; + + default: + break; + } + } +} + +static void +um866x_ide_handler(um866x_t *dev) +{ + int board = dev->ide - 1; + + if (dev->ide > 0) { + ide_handlers(board, 0); + ide_set_base(board, (dev->regs[1] & 0x10) ? 0x01f0 : 0x0170); + ide_set_side(board, (dev->regs[1] & 0x10) ? 0x03f6 : 0x0376); + if (dev->regs[0] & 0x10) + ide_handlers(board, 1); + } +} + +static void +um866x_write(uint16_t port, uint8_t val, void *priv) +{ + um866x_t *dev = (um866x_t *) priv; + uint8_t valxor; + + um866x_log("UM866X: write(%04X, %02X)\n", port, val); + + if (dev->locked) { + if ((port == 0x108) && (val == 0xaa)) + dev->locked = 0; + } else { + if (port == 0x108) { + if (val == 0x55) + dev->locked = 1; + else + dev->cur_reg = val; + } else if ((dev->cur_reg >= 0xc0) && (dev->cur_reg <= dev->max_reg)) { + valxor = (dev->regs[dev->cur_reg - 0xc0] ^ val); + dev->regs[dev->cur_reg - 0xc0] = val; + switch (dev->cur_reg - 0xc0) { + /* Port enable register. */ + case 0x00: + if (valxor & 0x10) + um866x_ide_handler(dev); + if (valxor & 0x08) + um866x_lpt_handler(dev); + if (valxor & 0x04) + um866x_uart_handler(dev, 1); + if (valxor & 0x02) + um866x_uart_handler(dev, 0); + if (valxor & 0x01) + um866x_fdc_handler(dev); + break; + /* + Port configuration register: + - Bits 7, 6: + - 0, 0 = LPT 1 is none; + - 0, 1 = LPT 1 is EPP; + - 1, 0 = LPT 1 is SPP; + - 1, 1 = LPT 1 is ECP; + - Bit 4 = 0 = IDE is secondary, 1 = IDE is primary; + - Bit 3 = 0 = LPT 1 is 278h, 1 = LPT 1 is 378h; + - Bit 2 = 0 = UART 2 is COM4, 1 = UART 2 is COM2; + - Bit 1 = 0 = UART 1 is COM3, 1 = UART 2 is COM1; + - Bit 0 = 0 = FDC is 370h, 1 = UART 2 is 3f0h. + */ + case 0x01: + if (valxor & 0xc8) + um866x_lpt_handler(dev); + if (valxor & 0x10) + um866x_ide_handler(dev); + if (valxor & 0x04) + um866x_uart_handler(dev, 1); + if (valxor & 0x02) + um866x_uart_handler(dev, 0); + if (valxor & 0x01) + um866x_fdc_handler(dev); + break; + } + } + } +} + +static uint8_t +um866x_read(uint16_t port, void *priv) +{ + const um866x_t *dev = (um866x_t *) priv; + uint8_t ret = 0xff; + + if (!dev->locked) { + if (port == 0x108) + ret = dev->cur_reg; /* ??? */ + else if ((dev->cur_reg >= 0xc0) && (dev->cur_reg <= dev->max_reg)) { + ret = dev->regs[dev->cur_reg - 0xc0]; + if (dev->cur_reg == 0xc0) + ret = (ret & 0x1f) | ((random_generate() & 0x07) << 5); + } + } + + um866x_log("UM866X: read(%04X) = %02X\n", port, ret); + + return ret; +} + +static void +um866x_reset(void *priv) +{ + um866x_t *dev = (um866x_t *) priv; + + serial_remove(dev->uart[0]); + serial_setup(dev->uart[0], COM1_ADDR, COM1_IRQ); + + serial_remove(dev->uart[1]); + serial_setup(dev->uart[1], COM2_ADDR, COM2_IRQ); + + lpt_port_remove(dev->lpt); + lpt_port_setup(dev->lpt, LPT1_ADDR); + + fdc_reset(dev->fdc); + fdc_remove(dev->fdc); + + memset(dev->regs, 0x00, sizeof(dev->regs)); + + dev->regs[0x00] = (dev->ide > 0) ? 0x1f : 0x0f; + dev->regs[0x01] = (dev->ide == 2) ? 0x0f : 0x1f; + + um866x_fdc_handler(dev); + um866x_uart_handler(dev, 0); + um866x_uart_handler(dev, 1); + um866x_lpt_handler(dev); + um866x_ide_handler(dev); + + dev->locked = 1; +} + +static void +um866x_close(void *priv) +{ + um866x_t *dev = (um866x_t *) priv; + + free(dev); +} + +static void * +um866x_init(UNUSED(const device_t *info)) +{ + um866x_t *dev = (um866x_t *) calloc(1, sizeof(um866x_t)); + + dev->fdc = device_add(&fdc_at_smc_device); + + dev->uart[0] = device_add_inst(&ns16550_device, 1); + dev->uart[1] = device_add_inst(&ns16550_device, 2); + + dev->lpt = device_add_inst(&lpt_port_device, 1); + lpt_set_cnfgb_readout(dev->lpt, 0x00); + + dev->ide = info->local & 0xff; + if (dev->ide < IDE_BUS_MAX) + device_add(&ide_isa_device); + + dev->max_reg = info->local >> 8; + + if (dev->max_reg != 0x00) + io_sethandler(0x0108, 0x0002, um866x_read, NULL, NULL, um866x_write, NULL, NULL, dev); + + um866x_reset(dev); + + return dev; +} + +const device_t um866x_device = { + .name = "UMC UM82C86x/866x Super I/O", + .internal_name = "um866x", + .flags = 0, + .local = 0, + .init = um866x_init, + .close = um866x_close, + .reset = um866x_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/sio/sio_vl82c113.c b/src/sio/sio_vl82c113.c index b000fe5dd..bf63e9023 100644 --- a/src/sio/sio_vl82c113.c +++ b/src/sio/sio_vl82c113.c @@ -143,7 +143,7 @@ vl82c113_init(UNUSED(const device_t *info)) dev->nvr_base = 0x0070; /* Commands are standard. */ - dev->kbc = device_add(&keyboard_at_device); + dev->kbc = device_add(&kbc_at_device); vl82c113_reset(dev); diff --git a/src/sio/sio_vt82c686.c b/src/sio/sio_vt82c686.c index 0e874210d..4caffbc00 100644 --- a/src/sio/sio_vt82c686.c +++ b/src/sio/sio_vt82c686.c @@ -44,6 +44,7 @@ typedef struct vt82c686_t { uint8_t lpt_irq; fdc_t *fdc; serial_t *uart[2]; + lpt_t *lpt; } vt82c686_t; static uint8_t @@ -83,16 +84,30 @@ vt82c686_lpt_handler(vt82c686_t *dev) if (io_len == 8) io_mask = 0x3f8; /* EPP */ - lpt1_remove(); + lpt_port_remove(dev->lpt); + + lpt_set_ext(dev->lpt, !!(dev->regs[0x10] & 0x80)); + + switch (dev->regs[0x10] & 0x03) { + case 0x01: + lpt_set_epp(dev->lpt, !!(dev->regs[0x10] & 0x20)); + lpt_set_ecp(dev->lpt, 1); + break; + case 0x02: + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, !!(dev->regs[0x10] & 0x20)); + break; + } if (((dev->regs[0x02] & 0x03) != 0x03) && !(dev->regs[0x0f] & 0x11) && (io_base >= 0x100) && (io_base <= io_mask)) - lpt1_setup(io_base); + lpt_port_setup(dev->lpt, io_base); - if (dev->lpt_irq) { - lpt1_irq(dev->lpt_irq); - } else { - lpt1_irq(0xff); - } + if (dev->lpt_irq) + lpt_port_irq(dev->lpt, dev->lpt_irq); + else + lpt_port_irq(dev->lpt, 0xff); + + lpt_port_dma(dev->lpt, dev->lpt_dma); } static void @@ -177,6 +192,7 @@ vt82c686_write(uint16_t port, uint8_t val, void *priv) case 0x10: dev->regs[reg] &= 0xf4; + vt82c686_lpt_handler(dev); break; case 0x11: @@ -295,6 +311,7 @@ vt82c686_init(UNUSED(const device_t *info)) dev->uart[0] = device_add_inst(&ns16550_device, 1); dev->uart[1] = device_add_inst(&ns16550_device, 2); + dev->lpt = device_add_inst(&lpt_port_device, 1); dev->lpt_dma = 3; vt82c686_reset(dev); diff --git a/src/sio/sio_w83787f.c b/src/sio/sio_w83787f.c deleted file mode 100644 index f4971ddce..000000000 --- a/src/sio/sio_w83787f.c +++ /dev/null @@ -1,536 +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. - * - * Emulation of the Winbond W83787F/IF Super I/O Chip. - * - * Winbond W83787F Super I/O Chip - * Used by the Award 430HX - * - * - * - * Authors: Miran Grca, - * Copyright 2020 Miran Grca. - */ -#include -#include -#include -#include -#include -#include -#define HAVE_STDARG_H -#include <86box/86box.h> -#include <86box/device.h> -#include <86box/io.h> -#include <86box/timer.h> -#include <86box/mem.h> -#include <86box/lpt.h> -#include <86box/serial.h> -#include <86box/fdd.h> -#include <86box/fdc.h> -#include <86box/hdc.h> -#include <86box/hdc_ide.h> -#include <86box/gameport.h> -#include <86box/sio.h> - -#ifdef ENABLE_W83787_LOG -int w83787_do_log = ENABLE_W83787_LOG; - -static void -w83787_log(const char *fmt, ...) -{ - va_list ap; - - if (w83787_do_log) { - va_start(ap, fmt); - pclog_ex(fmt, ap); - va_end(ap); - } -} -#else -# define w83787_log(fmt, ...) -#endif - -#define FDDA_TYPE (dev->regs[7] & 3) -#define FDDB_TYPE ((dev->regs[7] >> 2) & 3) -#define FDDC_TYPE ((dev->regs[7] >> 4) & 3) -#define FDDD_TYPE ((dev->regs[7] >> 6) & 3) - -#define FD_BOOT (dev->regs[8] & 3) -#define SWWP ((dev->regs[8] >> 4) & 1) -#define DISFDDWR ((dev->regs[8] >> 5) & 1) - -#define EN3MODE ((dev->regs[9] >> 5) & 1) - -#define DRV2EN_NEG (dev->regs[0xB] & 1) /* 0 = drive 2 installed */ -#define INVERTZ ((dev->regs[0xB] >> 1) & 1) /* 0 = invert DENSEL polarity */ -#define IDENT ((dev->regs[0xB] >> 3) & 1) - -#define HEFERE ((dev->regs[0xC] >> 5) & 1) - -#define HAS_IDE_FUNCTIONALITY dev->ide_function - -typedef struct w83787f_t { - uint8_t tries; - uint8_t regs[42]; - uint16_t reg_init; - int locked; - int rw_locked; - int cur_reg; - int key; - int ide_function; - int ide_start; - fdc_t *fdc; - serial_t *uart[2]; - void *gameport; -} w83787f_t; - -static void w83787f_write(uint16_t port, uint8_t val, void *priv); -static uint8_t w83787f_read(uint16_t port, void *priv); - -static void -w83787f_remap(w83787f_t *dev) -{ - io_removehandler(0x250, 0x0004, - w83787f_read, NULL, NULL, w83787f_write, NULL, NULL, dev); - io_sethandler(0x250, 0x0004, - w83787f_read, NULL, NULL, w83787f_write, NULL, NULL, dev); - dev->key = 0x88 | HEFERE; -} - -#ifdef FIXME -/* FIXME: Implement EPP (and ECP) parallel port modes. */ -static uint8_t -get_lpt_length(w83787f_t *dev) -{ - uint8_t length = 4; - - if (dev->regs[9] & 0x80) { - if (dev->regs[0] & 0x04) - length = 8; /* EPP mode. */ - if (dev->regs[0] & 0x08) - length |= 0x80; /* ECP mode. */ - } - - return length; -} -#endif - -static void -w83787f_serial_handler(w83787f_t *dev, int uart) -{ - int urs0 = !!(dev->regs[1] & (1 << uart)); - int urs1 = !!(dev->regs[1] & (4 << uart)); - int urs2 = !!(dev->regs[3] & (8 >> uart)); - int urs; - int irq = COM1_IRQ; - uint16_t addr = COM1_ADDR; - uint16_t enable = 1; - - urs = (urs1 << 1) | urs0; - - if (urs2) { - addr = uart ? COM1_ADDR : COM2_ADDR; - irq = uart ? COM1_IRQ : COM2_IRQ; - } else { - switch (urs) { - case 0: - addr = uart ? COM3_ADDR : COM4_ADDR; - irq = uart ? COM3_IRQ : COM4_IRQ; - break; - case 1: - addr = uart ? COM4_ADDR : COM3_ADDR; - irq = uart ? COM4_IRQ : COM3_IRQ; - break; - case 2: - addr = uart ? COM2_ADDR : COM1_ADDR; - irq = uart ? COM2_IRQ : COM1_IRQ; - break; - case 3: - default: - enable = 0; - break; - } - } - - if (dev->regs[4] & (0x20 >> uart)) - enable = 0; - - serial_remove(dev->uart[uart]); - if (enable) - serial_setup(dev->uart[uart], addr, irq); -} - -static void -w83787f_lpt_handler(w83787f_t *dev) -{ - int ptras = (dev->regs[1] >> 4) & 0x03; - int irq = LPT1_IRQ; - uint16_t addr = LPT1_ADDR; - uint16_t enable = 1; - - switch (ptras) { - case 0x00: - addr = LPT_MDA_ADDR; - irq = LPT_MDA_IRQ; - break; - case 0x01: - addr = LPT2_ADDR; - irq = LPT2_IRQ; - break; - case 0x02: - addr = LPT1_ADDR; - irq = LPT1_IRQ; - break; - case 0x03: - default: - enable = 0; - break; - } - - if (dev->regs[4] & 0x80) - enable = 0; - - lpt1_remove(); - if (enable) { - lpt1_setup(addr); - lpt1_irq(irq); - } -} - -static void -w83787f_gameport_handler(w83787f_t *dev) -{ - if (!(dev->regs[3] & 0x40) && !(dev->regs[4] & 0x40)) - gameport_remap(dev->gameport, 0x201); - else - gameport_remap(dev->gameport, 0); -} - -static void -w83787f_fdc_handler(w83787f_t *dev) -{ - fdc_remove(dev->fdc); - if (!(dev->regs[0] & 0x20)) - fdc_set_base(dev->fdc, (dev->regs[0] & 0x10) ? FDC_PRIMARY_ADDR : FDC_SECONDARY_ADDR); - fdc_set_power_down(dev->fdc, !!(dev->regs[6] & 0x08)); -} - -static void -w83787f_ide_handler(w83787f_t *dev) -{ - if (dev->ide_function & 0x20) { - ide_sec_disable(); - if (!(dev->regs[0] & 0x80)) { - ide_set_base(1, (dev->regs[0] & 0x40) ? 0x1f0 : 0x170); - ide_set_side(1, (dev->regs[0] & 0x40) ? 0x3f6 : 0x376); - ide_sec_enable(); - } - } else { - ide_pri_disable(); - if (!(dev->regs[0] & 0x80)) { - ide_set_base(0, (dev->regs[0] & 0x40) ? 0x1f0 : 0x170); - ide_set_side(0, (dev->regs[0] & 0x40) ? 0x3f6 : 0x376); - ide_pri_enable(); - } - } -} - -static void -w83787f_write(uint16_t port, uint8_t val, void *priv) -{ - w83787f_t *dev = (w83787f_t *) priv; - uint8_t valxor = 0; - uint8_t max = 0x15; - - if (port == 0x250) { - if (val == dev->key) - dev->locked = 1; - else - dev->locked = 0; - return; - } else if (port == 0x251) { - if (val <= max) - dev->cur_reg = val; - return; - } else { - if (dev->locked) { - if (dev->rw_locked && (dev->cur_reg <= 0x0b)) - return; - if (dev->cur_reg == 6) - val &= 0xFB; - valxor = val ^ dev->regs[dev->cur_reg]; - dev->regs[dev->cur_reg] = val; - } else - return; - } - - switch (dev->cur_reg) { - case 0: - w83787_log("REG 00: %02X\n", val); - if ((valxor & 0xc0) && (HAS_IDE_FUNCTIONALITY)) - w83787f_ide_handler(dev); - if (valxor & 0x30) - w83787f_fdc_handler(dev); - if (valxor & 0x0c) - w83787f_lpt_handler(dev); - break; - case 1: - if (valxor & 0x80) - fdc_set_swap(dev->fdc, (dev->regs[1] & 0x80) ? 1 : 0); - if (valxor & 0x30) - w83787f_lpt_handler(dev); - if (valxor & 0x0a) - w83787f_serial_handler(dev, 1); - if (valxor & 0x05) - w83787f_serial_handler(dev, 0); - break; - case 3: - if (valxor & 0x80) - w83787f_lpt_handler(dev); - if (valxor & 0x40) - w83787f_gameport_handler(dev); - if (valxor & 0x08) - w83787f_serial_handler(dev, 0); - if (valxor & 0x04) - w83787f_serial_handler(dev, 1); - break; - case 4: - if (valxor & 0x10) - w83787f_serial_handler(dev, 1); - if (valxor & 0x20) - w83787f_serial_handler(dev, 0); - if (valxor & 0x80) - w83787f_lpt_handler(dev); - if (valxor & 0x40) - w83787f_gameport_handler(dev); - break; - case 6: - if (valxor & 0x08) - w83787f_fdc_handler(dev); - break; - case 7: - if (valxor & 0x03) - fdc_update_rwc(dev->fdc, 0, FDDA_TYPE); - if (valxor & 0x0c) - fdc_update_rwc(dev->fdc, 1, FDDB_TYPE); - if (valxor & 0x30) - fdc_update_rwc(dev->fdc, 2, FDDC_TYPE); - if (valxor & 0xc0) - fdc_update_rwc(dev->fdc, 3, FDDD_TYPE); - break; - case 8: - if (valxor & 0x03) - fdc_update_boot_drive(dev->fdc, FD_BOOT); - if (valxor & 0x10) - fdc_set_swwp(dev->fdc, SWWP ? 1 : 0); - if (valxor & 0x20) - fdc_set_diswr(dev->fdc, DISFDDWR ? 1 : 0); - break; - case 9: - if (valxor & 0x20) - fdc_update_enh_mode(dev->fdc, EN3MODE ? 1 : 0); - if (valxor & 0x40) - dev->rw_locked = (val & 0x40) ? 1 : 0; - if (valxor & 0x80) - w83787f_lpt_handler(dev); - break; - case 0xB: - w83787_log("Writing %02X to CRB\n", val); - break; - case 0xC: - if (valxor & 0x20) - w83787f_remap(dev); - break; - - default: - break; - } -} - -static uint8_t -w83787f_read(uint16_t port, void *priv) -{ - w83787f_t *dev = (w83787f_t *) priv; - uint8_t ret = 0xff; - - if (dev->locked) { - if (port == 0x251) - ret = dev->cur_reg; - else if (port == 0x252) { - if (dev->cur_reg == 7) - ret = (fdc_get_rwc(dev->fdc, 0) | (fdc_get_rwc(dev->fdc, 1) << 2)); - else if (!dev->rw_locked || (dev->cur_reg > 0x0b)) - ret = dev->regs[dev->cur_reg]; - } - } - - return ret; -} - -static void -w83787f_reset(w83787f_t *dev) -{ - uint16_t hefere = dev->reg_init & 0x0100; - - lpt1_remove(); - lpt1_setup(LPT1_ADDR); - lpt1_irq(LPT1_IRQ); - - memset(dev->regs, 0, 0x2A); - - if (HAS_IDE_FUNCTIONALITY) { - if (dev->ide_function & 0x20) { - dev->regs[0x00] = 0x90; - ide_sec_disable(); - ide_set_base(1, 0x170); - ide_set_side(1, 0x376); - } else { - dev->regs[0x00] = 0xd0; - ide_pri_disable(); - ide_set_base(0, 0x1f0); - ide_set_side(0, 0x3f6); - } - - if (dev->ide_start) { - dev->regs[0x00] &= 0x7f; - if (dev->ide_function & 0x20) - ide_sec_enable(); - else - ide_pri_enable(); - } - } else - dev->regs[0x00] = 0xd0; - - fdc_reset(dev->fdc); - w83787f_fdc_handler(dev); - - dev->regs[0x01] = 0x2C; - dev->regs[0x03] = 0x70; - dev->regs[0x07] = 0xF5; - dev->regs[0x09] = dev->reg_init & 0xff; - dev->regs[0x0a] = 0x1F; - dev->regs[0x0c] = 0x0C | (hefere >> 3); - dev->regs[0x0d] = 0xA3; - - gameport_remap(dev->gameport, 0); - - serial_setup(dev->uart[0], COM1_ADDR, COM1_IRQ); - serial_setup(dev->uart[1], COM2_ADDR, COM2_IRQ); - - w83787f_lpt_handler(dev); - - dev->key = 0x88 | (hefere >> 8); - - w83787f_remap(dev); - - dev->locked = 0; - dev->rw_locked = 0; -} - -static void -w83787f_close(void *priv) -{ - w83787f_t *dev = (w83787f_t *) priv; - - free(dev); -} - -static void * -w83787f_init(const device_t *info) -{ - w83787f_t *dev = (w83787f_t *) calloc(1, sizeof(w83787f_t)); - - HAS_IDE_FUNCTIONALITY = (info->local & 0x30); - - dev->fdc = device_add(&fdc_at_winbond_device); - - dev->uart[0] = device_add_inst(&ns16550_device, 1); - dev->uart[1] = device_add_inst(&ns16550_device, 2); - - dev->gameport = gameport_add(&gameport_sio_1io_device); - - if ((dev->ide_function & 0x30) == 0x10) - device_add(&ide_isa_device); - - dev->ide_start = !!(info->local & 0x40); - - dev->reg_init = info->local & 0x010f; - w83787f_reset(dev); - - return dev; -} - -const device_t w83787f_88h_device = { - .name = "Winbond W83787F/IF Super I/O", - .internal_name = "w83787f", - .flags = 0, - .local = 0x0009, - .init = w83787f_init, - .close = w83787f_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t w83787f_device = { - .name = "Winbond W83787F/IF Super I/O", - .internal_name = "w83787f", - .flags = 0, - .local = 0x0109, - .init = w83787f_init, - .close = w83787f_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t w83787f_ide_device = { - .name = "Winbond W83787F/IF Super I/O (With IDE)", - .internal_name = "w83787f_ide", - .flags = 0, - .local = 0x0119, - .init = w83787f_init, - .close = w83787f_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t w83787f_ide_en_device = { - .name = "Winbond W83787F/IF Super I/O (With IDE Enabled)", - .internal_name = "w83787f_ide_en", - .flags = 0, - .local = 0x0159, - .init = w83787f_init, - .close = w83787f_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t w83787f_ide_sec_device = { - .name = "Winbond W83787F/IF Super I/O (With Secondary IDE)", - .internal_name = "w83787f_ide_sec", - .flags = 0, - .local = 0x0139, - .init = w83787f_init, - .close = w83787f_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; diff --git a/src/sio/sio_w837x7.c b/src/sio/sio_w837x7.c new file mode 100644 index 000000000..3b5924b27 --- /dev/null +++ b/src/sio/sio_w837x7.c @@ -0,0 +1,476 @@ +/* + * 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. + * + * Emulation of the Winbond W837x7F/IF Super I/O Chip. + * + * Authors: Miran Grca, + * Copyright 2020-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include <86box/device.h> +#include <86box/io.h> +#include <86box/timer.h> +#include <86box/mem.h> +#include <86box/lpt.h> +#include <86box/serial.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/gameport.h> +#include <86box/sio.h> + +#define FDDA_TYPE (dev->regs[7] & 3) +#define FDDB_TYPE ((dev->regs[7] >> 2) & 3) +#define FDDC_TYPE ((dev->regs[7] >> 4) & 3) +#define FDDD_TYPE ((dev->regs[7] >> 6) & 3) + +#define FD_BOOT (dev->regs[8] & 3) +#define SWWP ((dev->regs[8] >> 4) & 1) +#define DISFDDWR ((dev->regs[8] >> 5) & 1) + +#define EN3MODE ((dev->regs[9] >> 5) & 1) + +#define DRV2EN_NEG (dev->regs[0xB] & 1) /* 0 = drive 2 installed */ +#define INVERTZ ((dev->regs[0xB] >> 1) & 1) /* 0 = invert DENSEL polarity */ +#define IDENT ((dev->regs[0xB] >> 3) & 1) + +#define HEFERE ((dev->regs[0xC] >> 5) & 1) + +typedef struct w837x7_t { + uint8_t tries; + uint8_t has_ide; + uint8_t type; + uint8_t hefere; + uint8_t max_reg; + uint8_t regs[256]; + int locked; + int rw_locked; + int cur_reg; + int key; + int ide_start; + fdc_t *fdc; + serial_t *uart[2]; + lpt_t *lpt; + void *gameport; +} w837x7_t; + +#ifdef ENABLE_W837X7_LOG +int w837x7_do_log = ENABLE_W837X7_LOG; + +static void +w837x7_log(const char *fmt, ...) +{ + va_list ap; + + if (w837x7_do_log) { + va_start(ap, fmt); + pclog_ex(fmt, ap); + va_end(ap); + } +} +#else +# define w837x7_log(fmt, ...) +#endif + +static void +w837x7_serial_handler(w837x7_t *dev, int uart) +{ + int urs0 = !!(dev->regs[0x01] & (0x01 << uart)); + int urs1 = !!(dev->regs[0x01] & (0x04 << uart)); + int urs2 = !!(dev->regs[0x03] & (0x08 >> uart)); + int urs; + int irq = COM1_IRQ; + uint16_t addr = COM1_ADDR; + uint16_t enable = 1; + double clock_src = 24000000.0 / 13.0; + + if (dev->regs[0x03] & (1 << (1 - uart))) + clock_src = 24000000.0 / 12.0; + + urs = (urs1 << 1) | urs0; + + if (urs2) { + addr = uart ? COM1_ADDR : COM2_ADDR; + irq = uart ? COM1_IRQ : COM2_IRQ; + } else { + switch (urs) { + case 0x00: + addr = uart ? COM3_ADDR : COM4_ADDR; + irq = uart ? COM3_IRQ : COM4_IRQ; + break; + case 0x01: + addr = uart ? COM4_ADDR : COM3_ADDR; + irq = uart ? COM4_IRQ : COM3_IRQ; + break; + case 0x02: + addr = uart ? COM2_ADDR : COM1_ADDR; + irq = uart ? COM2_IRQ : COM1_IRQ; + break; + case 0x03: + default: + enable = 0; + break; + } + } + + if (dev->regs[0x04] & (0x20 >> uart)) + enable = 0; + + serial_remove(dev->uart[uart]); + if (enable) + serial_setup(dev->uart[uart], addr, irq); + + serial_set_clock_src(dev->uart[uart], clock_src); +} + +static void +w837x7_lpt_handler(w837x7_t *dev) +{ + int ptras = (dev->regs[1] >> 4) & 0x03; + uint16_t lpt_port = 0x0000; + uint16_t mask = 0xfffc; + uint8_t local_enable = 1; + uint8_t lpt_irq = LPT1_IRQ; + uint8_t lpt_mode = (dev->regs[0x09] & 0x80) | (dev->regs[0x00] & 0x0c); + + switch (ptras) { + case 0x00: + lpt_port = LPT_MDA_ADDR; + lpt_irq = LPT_MDA_IRQ; + break; + case 0x01: + lpt_port = LPT2_ADDR; + lpt_irq = LPT1_IRQ /*LPT2_IRQ*/; + break; + case 0x02: + lpt_port = LPT1_ADDR; + lpt_irq = LPT1_IRQ /*LPT2_IRQ*/; + break; + + default: + local_enable = 0; + break; + } + + if (dev->regs[0x04] & 0x80) + local_enable = 0; + + if (lpt_irq > 15) + lpt_irq = 0xff; + + lpt_port_remove(dev->lpt); + lpt_set_fifo_threshold(dev->lpt, dev->regs[0x05] & 0x0f); + switch (lpt_mode) { + default: + local_enable = 0; + break; + case 0x00: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 1); + break; + case 0x84: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x88: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + case 0x8c: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + } + + if (local_enable && (lpt_port >= 0x0100) && (lpt_port <= (0x0ffc & mask))) + lpt_port_setup(dev->lpt, lpt_port); + + lpt_port_irq(dev->lpt, lpt_irq); +} + +static void +w837x7_gameport_handler(w837x7_t *dev) +{ + if (!(dev->regs[3] & 0x40) && !(dev->regs[4] & 0x40)) + gameport_remap(dev->gameport, 0x201); + else + gameport_remap(dev->gameport, 0); +} + +static void +w837x7_fdc_handler(w837x7_t *dev) +{ + fdc_remove(dev->fdc); + if (!(dev->regs[0] & 0x20)) + fdc_set_base(dev->fdc, (dev->regs[0] & 0x10) ? FDC_PRIMARY_ADDR : FDC_SECONDARY_ADDR); + fdc_set_power_down(dev->fdc, !!(dev->regs[6] & 0x08)); +} + +static void +w837x7_ide_handler(w837x7_t *dev) +{ + if (dev->has_ide > 0) { + int ide_id = dev->has_ide - 1; + + ide_handlers(ide_id, 0); + + ide_set_base_addr(ide_id, 0, (dev->regs[0x00] & 0x40) ? 0x01f0 : 0x0170); + ide_set_base_addr(ide_id, 1, (dev->regs[0x00] & 0x40) ? 0x03f6 : 0x0376); + + if (!(dev->regs[0x00] & 0x80)) + ide_handlers(ide_id, 1); + } +} + +static void +w837x7_write(uint16_t port, uint8_t val, void *priv) +{ + w837x7_t *dev = (w837x7_t *) priv; + uint8_t valxor = 0; + + if (port == 0x0250) { + if (val == dev->key) + dev->locked = 1; + else + dev->locked = 0; + return; + } else if (port == 0x0251) { + dev->cur_reg = val; + return; + } else { + if (dev->locked) { + if (dev->rw_locked && (dev->cur_reg <= 0x0b)) + return; + valxor = val ^ dev->regs[dev->cur_reg]; + dev->regs[dev->cur_reg] = val; + } else + return; + } + + if (dev->cur_reg <= dev->max_reg) switch (dev->cur_reg) { + case 0x00: + w837x7_log("REG 00: %02X\n", val); + if (valxor & 0xc0) + w837x7_ide_handler(dev); + if (valxor & 0x30) + w837x7_fdc_handler(dev); + if (valxor & 0x0c) + w837x7_lpt_handler(dev); + break; + case 0x01: + if (valxor & 0x80) + fdc_set_swap(dev->fdc, (dev->regs[1] & 0x80) ? 1 : 0); + if (valxor & 0x30) + w837x7_lpt_handler(dev); + if (valxor & 0x0a) + w837x7_serial_handler(dev, 1); + if (valxor & 0x05) + w837x7_serial_handler(dev, 0); + break; + case 0x03: + if (valxor & 0x80) + w837x7_lpt_handler(dev); + if (valxor & 0x40) + w837x7_gameport_handler(dev); + if (valxor & 0x0a) + w837x7_serial_handler(dev, 0); + if (valxor & 0x05) + w837x7_serial_handler(dev, 1); + break; + case 0x04: + if (valxor & 0x10) + w837x7_serial_handler(dev, 1); + if (valxor & 0x20) + w837x7_serial_handler(dev, 0); + if (valxor & 0x80) + w837x7_lpt_handler(dev); + if (valxor & 0x40) + w837x7_gameport_handler(dev); + break; + case 0x05: + if (valxor & 0x0f) + w837x7_lpt_handler(dev); + break; + case 0x06: + if (valxor & 0x08) + w837x7_fdc_handler(dev); + break; + case 0x07: + if (valxor & 0x03) + fdc_update_rwc(dev->fdc, 0, FDDA_TYPE); + if (valxor & 0x0c) + fdc_update_rwc(dev->fdc, 1, FDDB_TYPE); + if (valxor & 0x30) + fdc_update_rwc(dev->fdc, 2, FDDC_TYPE); + if (valxor & 0xc0) + fdc_update_rwc(dev->fdc, 3, FDDD_TYPE); + break; + case 0x08: + if (valxor & 0x03) + fdc_update_boot_drive(dev->fdc, FD_BOOT); + if (valxor & 0x10) + fdc_set_swwp(dev->fdc, SWWP ? 1 : 0); + if (valxor & 0x20) + fdc_set_diswr(dev->fdc, DISFDDWR ? 1 : 0); + break; + case 0x09: + if (valxor & 0x20) + fdc_update_enh_mode(dev->fdc, EN3MODE ? 1 : 0); + if (valxor & 0x40) + dev->rw_locked = (val & 0x40) ? 1 : 0; + if (valxor & 0x80) + w837x7_lpt_handler(dev); + break; + case 0x0b: + if ((valxor & 0x0c) && (dev->type == W83777F)) { + fdc_clear_flags(dev->fdc, FDC_FLAG_PS2 | FDC_FLAG_PS2_MCA); + switch (val & 0x0c) { + case 0x00: + fdc_set_flags(dev->fdc, FDC_FLAG_PS2); + break; + case 0x04: + fdc_set_flags(dev->fdc, FDC_FLAG_PS2_MCA); + break; + } + } + break; + case 0x0c: + if (dev->type == W83787IF) + dev->key = 0x88 | HEFERE; + break; + + default: + break; + } +} + +static uint8_t +w837x7_read(uint16_t port, void *priv) +{ + w837x7_t *dev = (w837x7_t *) priv; + uint8_t ret = 0xff; + + if (dev->locked) { + if (port == 0x0251) + ret = dev->cur_reg; + else if (port == 0x0252) { + if (dev->cur_reg == 7) + ret = (fdc_get_rwc(dev->fdc, 0) | (fdc_get_rwc(dev->fdc, 1) << 2)); + else if (!dev->rw_locked || (dev->cur_reg > 0x0b)) + ret = dev->regs[dev->cur_reg]; + } + } + + return ret; +} + +static void +w837x7_reset(w837x7_t *dev) +{ + memset(dev->regs, 0x00, dev->max_reg + 1); + + if (dev->has_ide == 0x02) + dev->regs[0x00] = 0x90; + else if (dev->has_ide == 0x01) + dev->regs[0x00] = 0xd0; + + if (dev->ide_start) + dev->regs[0x00] &= 0x7f; + + dev->regs[0x01] = 0x2c; + dev->regs[0x03] = 0x30; + dev->regs[0x09] = dev->type; + dev->regs[0x0a] = 0x1f; + + if (dev->type == W83787IF) { + dev->regs[0x0c] = 0x0c | dev->hefere; + dev->regs[0x0d] = 0x03; + } else + dev->regs[0x0c] = dev->hefere; + + dev->key = 0x88 | HEFERE; + + fdc_reset(dev->fdc); + fdc_clear_flags(dev->fdc, FDC_FLAG_PS2 | FDC_FLAG_PS2_MCA); + + w837x7_fdc_handler(dev); + + w837x7_lpt_handler(dev); + w837x7_serial_handler(dev, 0); + w837x7_serial_handler(dev, 1); + w837x7_gameport_handler(dev); + w837x7_ide_handler(dev); + + dev->locked = 0; + dev->rw_locked = 0; +} + +static void +w837x7_close(void *priv) +{ + w837x7_t *dev = (w837x7_t *) priv; + + free(dev); +} + +static void * +w837x7_init(const device_t *info) +{ + w837x7_t *dev = (w837x7_t *) calloc(1, sizeof(w837x7_t)); + + dev->type = info->local & 0x0f; + dev->hefere = info->local & W837X7_KEY_89; + dev->max_reg = (dev->type == W83787IF) ? 0x15 : ((dev->type == W83787F) ? 0x0a : 0x0b); + dev->has_ide = (info->local >> 16) & 0xff; + dev->ide_start = !!(info->local & W837X7_IDE_START); + + dev->fdc = device_add(&fdc_at_winbond_device); + + dev->uart[0] = device_add_inst(&ns16550_device, 1); + dev->uart[1] = device_add_inst(&ns16550_device, 2); + + dev->lpt = device_add_inst(&lpt_port_device, 1); + lpt_set_cnfgb_readout(dev->lpt, 0x3f); + + dev->gameport = gameport_add(&gameport_sio_1io_device); + + w837x7_reset(dev); + + io_sethandler(0x250, 0x0004, + w837x7_read, NULL, NULL, w837x7_write, NULL, NULL, dev); + + return dev; +} + +const device_t w837x7_device = { + .name = "Winbond W837x7 Super I/O", + .internal_name = "w837x7", + .flags = 0, + .local = 0, + .init = w837x7_init, + .close = w837x7_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/sio/sio_w83877.c b/src/sio/sio_w83877.c new file mode 100644 index 000000000..04599b5f8 --- /dev/null +++ b/src/sio/sio_w83877.c @@ -0,0 +1,556 @@ +/* + * 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. + * + * Emulation of the Winbond W83877 family of Super I/O Chips. + * + * Authors: Miran Grca, + * Copyright 2016-2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#include <86box/86box.h> +#include <86box/device.h> +#include <86box/io.h> +#include <86box/timer.h> +#include <86box/pci.h> +#include <86box/mem.h> +#include <86box/rom.h> +#include <86box/lpt.h> +#include <86box/serial.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/machine.h> +#include <86box/sio.h> + +#define FDDA_TYPE (dev->regs[0x07] & 3) +#define FDDB_TYPE ((dev->regs[0x07] >> 2) & 3) +#define FDDC_TYPE ((dev->regs[0x07] >> 4) & 3) +#define FDDD_TYPE ((dev->regs[0x07] >> 6) & 3) + +#define FD_BOOT (dev->regs[0x08] & 3) +#define SWWP ((dev->regs[0x08] >> 4) & 1) +#define DISFDDWR ((dev->regs[0x08] >> 5) & 1) + +#define EN3MODE ((dev->regs[0x09] >> 5) & 1) + +#define DRV2EN_NEG (dev->regs[0x0b] & 1) /* 0 = drive 2 installed */ +#define INVERTZ ((dev->regs[0x0b] >> 1) & 1) /* 0 = invert DENSEL polarity */ +#define IDENT ((dev->regs[0x0b] >> 3) & 1) + +#define HEFERE ((dev->regs[0x0c] >> 5) & 1) + +#define HEFRAS (dev->regs[0x16] & 1) + +#define PRTIQS (dev->regs[0x27] & 0x0f) +#define ECPIRQ ((dev->regs[0x27] >> 5) & 0x07) + +typedef struct w83877_t { + uint8_t tries; + uint8_t has_ide; + uint8_t dma_map[4]; + uint8_t irq_map[10]; + uint8_t regs[256]; + uint16_t reg_init; + int locked; + int rw_locked; + int cur_reg; + int base_address; + int key; + int key_times; + fdc_t *fdc; + serial_t *uart[2]; + lpt_t *lpt; +} w83877_t; + +static void w83877_write(uint16_t port, uint8_t val, void *priv); +static uint8_t w83877_read(uint16_t port, void *priv); + +static void +w83877_remap(w83877_t *dev) +{ + uint8_t hefras = HEFRAS; + + io_removehandler(0x250, 0x0003, + w83877_read, NULL, NULL, w83877_write, NULL, NULL, dev); + io_removehandler(FDC_PRIMARY_ADDR, 0x0002, + w83877_read, NULL, NULL, w83877_write, NULL, NULL, dev); + dev->base_address = (hefras ? FDC_PRIMARY_ADDR : 0x250); + io_sethandler(dev->base_address, hefras ? 0x0002 : 0x0003, + w83877_read, NULL, NULL, w83877_write, NULL, NULL, dev); + dev->key_times = hefras + 1; + dev->key = (hefras ? 0x86 : 0x88) | HEFERE; +} + +static uint8_t +get_lpt_length(w83877_t *dev) +{ + uint8_t length = 4; + + if (dev->regs[0x09] & 0x80) { + if (dev->regs[0x00] & 0x04) + length = 8; /* EPP mode. */ + if (dev->regs[0x00] & 0x08) + length |= 0x80; /* ECP mode. */ + } + + return length; +} + +static uint16_t +make_port(w83877_t *dev, uint8_t reg) +{ + uint16_t p = 0; + uint8_t l; + + switch (reg) { + case 0x20: + p = ((uint16_t) (dev->regs[reg] & 0xfc)) << 2; + p &= 0x0ff0; + if ((p < 0x0100) || (p > 0x03f0)) + p = 0x03f0; + break; + case 0x23: + l = get_lpt_length(dev); + p = ((uint16_t) (dev->regs[reg] & 0xff)) << 2; + /* 8 ports in EPP mode, 4 in non-EPP mode. */ + if ((l & 0x0f) == 8) + p &= 0x03f8; + else + p &= 0x03fc; + if ((p < 0x0100) || (p > 0x03ff)) + p = LPT1_ADDR; + break; + case 0x24: + p = ((uint16_t) (dev->regs[reg] & 0xfe)) << 2; + p &= 0x0ff8; + if ((p < 0x0100) || (p > 0x03f8)) + p = COM1_ADDR; + break; + case 0x25: + p = ((uint16_t) (dev->regs[reg] & 0xfe)) << 2; + p &= 0x0ff8; + if ((p < 0x0100) || (p > 0x03f8)) + p = COM2_ADDR; + break; + + default: + break; + } + + return p; +} + +static void +w83877_ide_handler(w83877_t *dev) +{ + uint16_t ide_port = 0x0000; + + if (dev->has_ide > 0) { + int ide_id = dev->has_ide - 1; + + ide_handlers(ide_id, 0); + + ide_port = (dev->regs[0x21] << 2) & 0xfff0; + ide_set_base_addr(ide_id, 0, ide_port); + + ide_port = ((dev->regs[0x22] << 2) & 0xfff0) | 0x0006; + ide_set_base_addr(ide_id, 1, ide_port); + + if (!(dev->regs[0x06] & 0x04)) + ide_handlers(ide_id, 1); + } +} + +static void +w83877_fdc_handler(w83877_t *dev) +{ + fdc_remove(dev->fdc); + if (!(dev->regs[0x06] & 0x08) && (dev->regs[0x20] & 0xc0)) + fdc_set_base(dev->fdc, make_port(dev, 0x20)); + fdc_set_irq(dev->fdc, dev->irq_map[dev->regs[0x29] >> 4]); + fdc_set_dma_ch(dev->fdc, dev->dma_map[(dev->regs[0x26] >> 4) & 0x03]); + fdc_set_power_down(dev->fdc, !!(dev->regs[0x06] & 0x08)); +} + +static void +w83877_lpt_handler(w83877_t *dev) +{ + const uint8_t lpt_irq = dev->irq_map[PRTIQS]; + + lpt_port_remove(dev->lpt); + + lpt_set_ext(dev->lpt, 1); + + lpt_set_epp(dev->lpt, (dev->regs[0x09] & 0x80) && (dev->regs[0x00] & 0x04)); + lpt_set_ecp(dev->lpt, (dev->regs[0x09] & 0x80) && (dev->regs[0x00] & 0x08)); + + lpt_set_fifo_threshold(dev->lpt, dev->regs[0x05] & 0x0f); + + if (!(dev->regs[0x04] & 0x80) && (dev->regs[0x23] & 0xc0)) + lpt_port_setup(dev->lpt, make_port(dev, 0x23)); + + lpt_port_irq(dev->lpt, lpt_irq); + lpt_port_dma(dev->lpt, dev->dma_map[dev->regs[0x26] & 0x03]); + + lpt_set_cnfgb_readout(dev->lpt, ((dev->regs[0x26] & 0xe0) >> 2) | 0x07); +} + +static void +w83877_serial_handler(w83877_t *dev, int uart) +{ + int reg_mask = uart ? 0x10 : 0x20; + int reg_id = uart ? 0x25 : 0x24; + int irq_mask = uart ? 0x0f : 0xf0; + int irq_shift = uart ? 0 : 4; + double clock_src = 24000000.0 / 13.0; + + serial_remove(dev->uart[uart]); + if (!(dev->regs[4] & reg_mask) && (dev->regs[reg_id] & 0xc0)) + serial_setup(dev->uart[uart], make_port(dev, reg_id), dev->irq_map[(dev->regs[0x28] & irq_mask) >> irq_shift]); + + if (dev->regs[0x19] & (0x02 >> uart)) { + clock_src = 14769000.0; + } else if (dev->regs[0x03] & (0x02 >> uart)) { + clock_src = 24000000.0 / 12.0; + } else { + clock_src = 24000000.0 / 13.0; + } + + serial_set_clock_src(dev->uart[uart], clock_src); +} + +static void +w83877_write(uint16_t port, uint8_t val, void *priv) +{ + w83877_t *dev = (w83877_t *) priv; + uint8_t valxor = 0; + + if (port == 0x0250) { + if (val == dev->key) + dev->locked = 1; + else + dev->locked = 0; + return; + } else if (port == 0x0251) { + dev->cur_reg = val; + return; + } else if (port == FDC_PRIMARY_ADDR) { + if ((val == dev->key) && !dev->locked) { + if (dev->key_times == 2) { + if (dev->tries) { + dev->locked = 1; + dev->tries = 0; + } else + dev->tries++; + } else { + dev->locked = 1; + dev->tries = 0; + } + } else { + if (dev->locked) { + dev->cur_reg = val; + + if (val == 0xaa) + dev->locked = 0; + } else { + if (dev->tries) + dev->tries = 0; + } + } + return; + } else if ((port == 0x0252) || (port == 0x03f1)) { + if (dev->locked) { + if (dev->rw_locked) + return; + valxor = val ^ dev->regs[dev->cur_reg]; + dev->regs[dev->cur_reg] = val; + } else + return; + } + + switch (dev->cur_reg) { + case 0x00: + if (valxor & 0x0c) + w83877_lpt_handler(dev); + break; + case 0x01: + if (valxor & 0x80) + fdc_set_swap(dev->fdc, (dev->regs[0x01] & 0x80) ? 1 : 0); + break; + case 0x03: + if (valxor & 0x02) + w83877_serial_handler(dev, 0); + if (valxor & 0x01) + w83877_serial_handler(dev, 1); + break; + case 0x04: + if (valxor & 0x10) + w83877_serial_handler(dev, 1); + if (valxor & 0x20) + w83877_serial_handler(dev, 0); + if (valxor & 0x80) + w83877_lpt_handler(dev); + break; + case 0x05: + if (valxor & 0x0f) + w83877_lpt_handler(dev); + break; + case 0x06: + if (valxor & 0x08) + w83877_fdc_handler(dev); + if (valxor & 0x04) + w83877_ide_handler(dev); + break; + case 0x07: + if (valxor & 0x03) + fdc_update_rwc(dev->fdc, 0, FDDA_TYPE); + if (valxor & 0x0c) + fdc_update_rwc(dev->fdc, 1, FDDB_TYPE); + if (valxor & 0x30) + fdc_update_rwc(dev->fdc, 2, FDDC_TYPE); + if (valxor & 0xc0) + fdc_update_rwc(dev->fdc, 3, FDDD_TYPE); + break; + case 0x08: + if (valxor & 0x03) + fdc_update_boot_drive(dev->fdc, FD_BOOT); + if (valxor & 0x10) + fdc_set_swwp(dev->fdc, SWWP ? 1 : 0); + if (valxor & 0x20) + fdc_set_diswr(dev->fdc, DISFDDWR ? 1 : 0); + break; + case 0x09: + if (valxor & 0x20) + fdc_update_enh_mode(dev->fdc, EN3MODE ? 1 : 0); + if (valxor & 0x40) + dev->rw_locked = (val & 0x40) ? 1 : 0; + if (valxor & 0x80) + w83877_lpt_handler(dev); + break; + case 0x0b: + if (valxor & 0x0c) { + fdc_clear_flags(dev->fdc, FDC_FLAG_PS2 | FDC_FLAG_PS2_MCA); + switch (val & 0x0c) { + case 0x00: + fdc_set_flags(dev->fdc, FDC_FLAG_PS2); + break; + case 0x04: + fdc_set_flags(dev->fdc, FDC_FLAG_PS2_MCA); + break; + } + } + if (valxor & 0x02) + fdc_update_densel_polarity(dev->fdc, INVERTZ ? 1 : 0); + if (valxor & 0x01) + fdc_update_drv2en(dev->fdc, DRV2EN_NEG ? 0 : 1); + break; + case 0x0c: + if (valxor & 0x20) + w83877_remap(dev); + break; + case 0x16: + if (valxor & 0x02) { + dev->regs[0x1e] = (val & 0x02) ? 0x81 : 0x00; + dev->regs[0x20] = (val & 0x02) ? 0xfc : 0x00; + dev->regs[0x21] = (val & 0x02) ? 0x7c : 0x00; + dev->regs[0x22] = (val & 0x02) ? 0xfd : 0x00; + dev->regs[0x23] = (val & 0x02) ? 0xde : 0x00; + dev->regs[0x24] = (val & 0x02) ? 0xfe : 0x00; + dev->regs[0x25] = (val & 0x02) ? 0xbe : 0x00; + dev->regs[0x26] = (val & 0x02) ? 0x23 : 0x00; + dev->regs[0x27] = (val & 0x02) ? 0x65 : 0x00; + dev->regs[0x28] = (val & 0x02) ? 0x43 : 0x00; + dev->regs[0x29] = (val & 0x02) ? 0x62 : 0x00; + w83877_fdc_handler(dev); + w83877_lpt_handler(dev); + w83877_serial_handler(dev, 0); + w83877_serial_handler(dev, 1); + } + if (valxor & 0x01) + w83877_remap(dev); + break; + case 0x19: + if (valxor & 0x02) + w83877_serial_handler(dev, 0); + if (valxor & 0x01) + w83877_serial_handler(dev, 1); + break; + case 0x20: + if (valxor) + w83877_fdc_handler(dev); + break; + case 0x21: case 0x22: + if (valxor) + w83877_ide_handler(dev); + break; + case 0x23: + if (valxor) + w83877_lpt_handler(dev); + break; + case 0x24: + if (valxor & 0xfe) + w83877_serial_handler(dev, 0); + break; + case 0x25: + if (valxor & 0xfe) + w83877_serial_handler(dev, 1); + break; + case 0x26: + if (valxor & 0x0f) + w83877_lpt_handler(dev); + if (valxor & 0xf0) + w83877_fdc_handler(dev); + break; + case 0x27: + if (valxor & 0xef) + w83877_lpt_handler(dev); + break; + case 0x28: + if (valxor & 0x0f) { + if ((dev->regs[0x28] & 0x0f) == 0) + dev->regs[0x28] |= 0x03; + w83877_serial_handler(dev, 1); + } + if (valxor & 0xf0) { + if ((dev->regs[0x28] & 0xf0) == 0) + dev->regs[0x28] |= 0x40; + w83877_serial_handler(dev, 0); + } + break; + case 0x29: + if (valxor & 0xf0) + w83877_fdc_handler(dev); + break; + + default: + break; + } +} + +static uint8_t +w83877_read(uint16_t port, void *priv) +{ + w83877_t *dev = (w83877_t *) priv; + uint8_t ret = 0xff; + + if (dev->locked) { + if ((port == FDC_PRIMARY_ADDR) || (port == 0x251)) + ret = dev->cur_reg; + else if ((port == 0x3f1) || (port == 0x252)) { + if (dev->cur_reg == 7) + ret = (fdc_get_rwc(dev->fdc, 0) | (fdc_get_rwc(dev->fdc, 1) << 2) | (fdc_get_rwc(dev->fdc, 2) << 4) | (fdc_get_rwc(dev->fdc, 3) << 6)); + else if ((dev->cur_reg >= 0x18) || !dev->rw_locked) + ret = dev->regs[dev->cur_reg]; + } + } + + return ret; +} + +static void +w83877_reset(w83877_t *dev) +{ + fdc_reset(dev->fdc); + + memset(dev->regs, 0, 0x2A); + dev->regs[0x03] = 0x30; + dev->regs[0x07] = 0xF5; + dev->regs[0x09] = (dev->reg_init >> 8) & 0xff; + dev->regs[0x0a] = 0x1F; + dev->regs[0x0c] = 0x28; + dev->regs[0x0d] = 0xA3; + dev->regs[0x16] = dev->reg_init & 0xff; + + w83877_fdc_handler(dev); + fdc_clear_flags(dev->fdc, FDC_FLAG_PS2 | FDC_FLAG_PS2_MCA); + + w83877_lpt_handler(dev); + + w83877_serial_handler(dev, 0); + w83877_serial_handler(dev, 1); + + if (dev->has_ide) + w83877_ide_handler(dev); + + dev->base_address = FDC_PRIMARY_ADDR; + dev->key = 0x89; + dev->key_times = 1; + + w83877_remap(dev); + + dev->locked = 0; + dev->rw_locked = 0; +} + +static void +w83877_close(void *priv) +{ + w83877_t *dev = (w83877_t *) priv; + + free(dev); +} + +static void * +w83877_init(const device_t *info) +{ + w83877_t *dev = (w83877_t *) calloc(1, sizeof(w83877_t)); + + dev->fdc = device_add(&fdc_at_winbond_device); + + dev->uart[0] = device_add_inst(&ns16550_device, 1); + dev->uart[1] = device_add_inst(&ns16550_device, 2); + + dev->lpt = device_add_inst(&lpt_port_device, 1); + + dev->reg_init = info->local; + + dev->has_ide = (info->local >> 16) & 0xff; + + if (!strcmp(machine_get_internal_name(), "ficpa2012")) { + dev->dma_map[0] = 4; + dev->dma_map[1] = 3; + dev->dma_map[2] = 1; + dev->dma_map[3] = 2; + } else { + dev->dma_map[0] = 4; + for (int i = 1; i < 4; i++) + dev->dma_map[i] = i; + } + + memset(dev->irq_map, 0xff, 16); + dev->irq_map[0] = 0xff; + for (int i = 1; i < 7; i++) + dev->irq_map[i] = i; + dev->irq_map[1] = 5; + dev->irq_map[5] = 7; + dev->irq_map[7] = 9; /* Guesswork, I can't find a single BIOS that lets me assign IRQ_G to something. */ + dev->irq_map[8] = 10; + + w83877_reset(dev); + + return dev; +} + +const device_t w83877_device = { + .name = "Winbond W83877F Super I/O", + .internal_name = "w83877", + .flags = 0, + .local = 0, + .init = w83877_init, + .close = w83877_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/sio/sio_w83877f.c b/src/sio/sio_w83877f.c deleted file mode 100644 index 7c92d6e71..000000000 --- a/src/sio/sio_w83877f.c +++ /dev/null @@ -1,515 +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. - * - * Emulation of the Winbond W83877F Super I/O Chip. - * - * Winbond W83877F Super I/O Chip - * Used by the Award 430HX - * - * - * - * Authors: Miran Grca, - * Copyright 2016-2020 Miran Grca. - */ -#include -#include -#include -#include -#include -#include <86box/86box.h> -#include <86box/device.h> -#include <86box/io.h> -#include <86box/timer.h> -#include <86box/pci.h> -#include <86box/mem.h> -#include <86box/rom.h> -#include <86box/lpt.h> -#include <86box/serial.h> -#include <86box/fdd.h> -#include <86box/fdc.h> -#include <86box/sio.h> - -#define FDDA_TYPE (dev->regs[7] & 3) -#define FDDB_TYPE ((dev->regs[7] >> 2) & 3) -#define FDDC_TYPE ((dev->regs[7] >> 4) & 3) -#define FDDD_TYPE ((dev->regs[7] >> 6) & 3) - -#define FD_BOOT (dev->regs[8] & 3) -#define SWWP ((dev->regs[8] >> 4) & 1) -#define DISFDDWR ((dev->regs[8] >> 5) & 1) - -#define EN3MODE ((dev->regs[9] >> 5) & 1) - -#define DRV2EN_NEG (dev->regs[0xB] & 1) /* 0 = drive 2 installed */ -#define INVERTZ ((dev->regs[0xB] >> 1) & 1) /* 0 = invert DENSEL polarity */ -#define IDENT ((dev->regs[0xB] >> 3) & 1) - -#define HEFERE ((dev->regs[0xC] >> 5) & 1) - -#define HEFRAS (dev->regs[0x16] & 1) - -#define PRTIQS (dev->regs[0x27] & 0x0f) -#define ECPIRQ ((dev->regs[0x27] >> 5) & 0x07) - -typedef struct w83877f_t { - uint8_t tries; - uint8_t regs[42]; - uint16_t reg_init; - int locked; - int rw_locked; - int cur_reg; - int base_address; - int key; - int key_times; - fdc_t *fdc; - serial_t *uart[2]; -} w83877f_t; - -static void w83877f_write(uint16_t port, uint8_t val, void *priv); -static uint8_t w83877f_read(uint16_t port, void *priv); - -static void -w83877f_remap(w83877f_t *dev) -{ - uint8_t hefras = HEFRAS; - - io_removehandler(0x250, 0x0003, - w83877f_read, NULL, NULL, w83877f_write, NULL, NULL, dev); - io_removehandler(FDC_PRIMARY_ADDR, 0x0002, - w83877f_read, NULL, NULL, w83877f_write, NULL, NULL, dev); - dev->base_address = (hefras ? FDC_PRIMARY_ADDR : 0x250); - io_sethandler(dev->base_address, hefras ? 0x0002 : 0x0003, - w83877f_read, NULL, NULL, w83877f_write, NULL, NULL, dev); - dev->key_times = hefras + 1; - dev->key = (hefras ? 0x86 : 0x88) | HEFERE; -} - -static uint8_t -get_lpt_length(w83877f_t *dev) -{ - uint8_t length = 4; - - if (dev->regs[9] & 0x80) { - if (dev->regs[0] & 0x04) - length = 8; /* EPP mode. */ - if (dev->regs[0] & 0x08) - length |= 0x80; /* ECP mode. */ - } - - return length; -} - -static uint16_t -make_port(w83877f_t *dev, uint8_t reg) -{ - uint16_t p = 0; - uint8_t l; - - switch (reg) { - case 0x20: - p = ((uint16_t) (dev->regs[reg] & 0xfc)) << 2; - p &= 0xFF0; - if ((p < 0x100) || (p > 0x3F0)) - p = 0x3F0; - break; - case 0x23: - l = get_lpt_length(dev); - p = ((uint16_t) (dev->regs[reg] & 0xff)) << 2; - /* 8 ports in EPP mode, 4 in non-EPP mode. */ - if ((l & 0x0f) == 8) - p &= 0x3F8; - else - p &= 0x3FC; - if ((p < 0x100) || (p > 0x3FF)) - p = LPT1_ADDR; - /* In ECP mode, A10 is active. */ - if (l & 0x80) - p |= 0x400; - break; - case 0x24: - p = ((uint16_t) (dev->regs[reg] & 0xfe)) << 2; - p &= 0xFF8; - if ((p < 0x100) || (p > 0x3F8)) - p = COM1_ADDR; - break; - case 0x25: - p = ((uint16_t) (dev->regs[reg] & 0xfe)) << 2; - p &= 0xFF8; - if ((p < 0x100) || (p > 0x3F8)) - p = COM2_ADDR; - break; - - default: - break; - } - - return p; -} - -static void -w83877f_fdc_handler(w83877f_t *dev) -{ - fdc_remove(dev->fdc); - if (dev->regs[0x20] & 0xc0) - fdc_set_base(dev->fdc, make_port(dev, 0x20)); - fdc_set_power_down(dev->fdc, !!(dev->regs[6] & 0x08)); -} - -static void -w83877f_lpt_handler(w83877f_t *dev) -{ - uint8_t lpt_irq; - uint8_t lpt_irqs[8] = { 0, 7, 9, 10, 11, 14, 15, 5 }; - - lpt1_remove(); - if (!(dev->regs[4] & 0x80) && (dev->regs[0x23] & 0xc0)) - lpt1_setup(make_port(dev, 0x23)); - - lpt_irq = 0xff; - - lpt_irq = lpt_irqs[ECPIRQ]; - if (lpt_irq == 0) - lpt_irq = PRTIQS; - - lpt1_irq(lpt_irq); -} - -static void -w83877f_serial_handler(w83877f_t *dev, int uart) -{ - int reg_mask = uart ? 0x10 : 0x20; - int reg_id = uart ? 0x25 : 0x24; - int irq_mask = uart ? 0x0f : 0xf0; - int irq_shift = uart ? 0 : 4; - double clock_src = 24000000.0 / 13.0; - - serial_remove(dev->uart[uart]); - if (!(dev->regs[4] & reg_mask) && (dev->regs[reg_id] & 0xc0)) - serial_setup(dev->uart[uart], make_port(dev, reg_id), (dev->regs[0x28] & irq_mask) >> irq_shift); - - if (dev->regs[0x19] & (0x02 >> uart)) { - clock_src = 14769000.0; - } else if (dev->regs[0x03] & (0x02 >> uart)) { - clock_src = 24000000.0 / 12.0; - } else { - clock_src = 24000000.0 / 13.0; - } - - serial_set_clock_src(dev->uart[uart], clock_src); -} - -static void -w83877f_write(uint16_t port, uint8_t val, void *priv) -{ - w83877f_t *dev = (w83877f_t *) priv; - uint8_t valxor = 0; - uint8_t max = 0x2A; - - if (port == 0x250) { - if (val == dev->key) - dev->locked = 1; - else - dev->locked = 0; - return; - } else if (port == 0x251) { - if (val <= max) - dev->cur_reg = val; - return; - } else if (port == FDC_PRIMARY_ADDR) { - if ((val == dev->key) && !dev->locked) { - if (dev->key_times == 2) { - if (dev->tries) { - dev->locked = 1; - dev->tries = 0; - } else - dev->tries++; - } else { - dev->locked = 1; - dev->tries = 0; - } - } else { - if (dev->locked) { - if (val < max) - dev->cur_reg = val; - if (val == 0xaa) - dev->locked = 0; - } else { - if (dev->tries) - dev->tries = 0; - } - } - return; - } else if ((port == 0x252) || (port == 0x3f1)) { - if (dev->locked) { - if (dev->rw_locked) - return; - if ((dev->cur_reg >= 0x26) && (dev->cur_reg <= 0x27)) - return; - if (dev->cur_reg == 0x29) - return; - if (dev->cur_reg == 6) - val &= 0xFB; - valxor = val ^ dev->regs[dev->cur_reg]; - dev->regs[dev->cur_reg] = val; - } else - return; - } - - switch (dev->cur_reg) { - case 0: - if (valxor & 0x0c) - w83877f_lpt_handler(dev); - break; - case 1: - if (valxor & 0x80) - fdc_set_swap(dev->fdc, (dev->regs[1] & 0x80) ? 1 : 0); - break; - case 3: - if (valxor & 0x02) - w83877f_serial_handler(dev, 0); - if (valxor & 0x01) - w83877f_serial_handler(dev, 1); - break; - case 4: - if (valxor & 0x10) - w83877f_serial_handler(dev, 1); - if (valxor & 0x20) - w83877f_serial_handler(dev, 0); - if (valxor & 0x80) - w83877f_lpt_handler(dev); - break; - case 6: - if (valxor & 0x08) - w83877f_fdc_handler(dev); - break; - case 7: - if (valxor & 0x03) - fdc_update_rwc(dev->fdc, 0, FDDA_TYPE); - if (valxor & 0x0c) - fdc_update_rwc(dev->fdc, 1, FDDB_TYPE); - if (valxor & 0x30) - fdc_update_rwc(dev->fdc, 2, FDDC_TYPE); - if (valxor & 0xc0) - fdc_update_rwc(dev->fdc, 3, FDDD_TYPE); - break; - case 8: - if (valxor & 0x03) - fdc_update_boot_drive(dev->fdc, FD_BOOT); - if (valxor & 0x10) - fdc_set_swwp(dev->fdc, SWWP ? 1 : 0); - if (valxor & 0x20) - fdc_set_diswr(dev->fdc, DISFDDWR ? 1 : 0); - break; - case 9: - if (valxor & 0x20) - fdc_update_enh_mode(dev->fdc, EN3MODE ? 1 : 0); - if (valxor & 0x40) - dev->rw_locked = (val & 0x40) ? 1 : 0; - if (valxor & 0x80) - w83877f_lpt_handler(dev); - break; - case 0xB: - if (valxor & 1) - fdc_update_drv2en(dev->fdc, DRV2EN_NEG ? 0 : 1); - if (valxor & 2) - fdc_update_densel_polarity(dev->fdc, INVERTZ ? 1 : 0); - break; - case 0xC: - if (valxor & 0x20) - w83877f_remap(dev); - break; - case 0x16: - if (valxor & 1) - w83877f_remap(dev); - break; - case 0x19: - if (valxor & 0x02) - w83877f_serial_handler(dev, 0); - if (valxor & 0x01) - w83877f_serial_handler(dev, 1); - break; - case 0x20: - if (valxor) - w83877f_fdc_handler(dev); - break; - case 0x23: - if (valxor) - w83877f_lpt_handler(dev); - break; - case 0x24: - if (valxor & 0xfe) - w83877f_serial_handler(dev, 0); - break; - case 0x25: - if (valxor & 0xfe) - w83877f_serial_handler(dev, 1); - break; - case 0x27: - if (valxor & 0xef) - w83877f_lpt_handler(dev); - break; - case 0x28: - if (valxor & 0xf) { - if ((dev->regs[0x28] & 0x0f) == 0) - dev->regs[0x28] |= 0x03; - w83877f_serial_handler(dev, 1); - } - if (valxor & 0xf0) { - if ((dev->regs[0x28] & 0xf0) == 0) - dev->regs[0x28] |= 0x40; - w83877f_serial_handler(dev, 0); - } - break; - - default: - break; - } -} - -static uint8_t -w83877f_read(uint16_t port, void *priv) -{ - w83877f_t *dev = (w83877f_t *) priv; - uint8_t ret = 0xff; - - if (dev->locked) { - if ((port == FDC_PRIMARY_ADDR) || (port == 0x251)) - ret = dev->cur_reg; - else if ((port == 0x3f1) || (port == 0x252)) { - if (dev->cur_reg == 7) - ret = (fdc_get_rwc(dev->fdc, 0) | (fdc_get_rwc(dev->fdc, 1) << 2) | (fdc_get_rwc(dev->fdc, 2) << 4) | (fdc_get_rwc(dev->fdc, 3) << 6)); - else if ((dev->cur_reg >= 0x18) || !dev->rw_locked) - ret = dev->regs[dev->cur_reg]; - } - } - - return ret; -} - -static void -w83877f_reset(w83877f_t *dev) -{ - fdc_reset(dev->fdc); - - memset(dev->regs, 0, 0x2A); - dev->regs[0x03] = 0x30; - dev->regs[0x07] = 0xF5; - dev->regs[0x09] = (dev->reg_init >> 8) & 0xff; - dev->regs[0x0a] = 0x1F; - dev->regs[0x0c] = 0x28; - dev->regs[0x0d] = 0xA3; - dev->regs[0x16] = dev->reg_init & 0xff; - dev->regs[0x1e] = 0x81; - dev->regs[0x20] = (FDC_PRIMARY_ADDR >> 2) & 0xfc; - dev->regs[0x21] = (0x1f0 >> 2) & 0xfc; - dev->regs[0x22] = ((0x3f6 >> 2) & 0xfc) | 1; - dev->regs[0x23] = (LPT1_ADDR >> 2); - dev->regs[0x24] = (COM1_ADDR >> 2) & 0xfe; - dev->regs[0x25] = (COM2_ADDR >> 2) & 0xfe; - dev->regs[0x26] = (2 << 4) | 4; - dev->regs[0x27] = (2 << 4) | 5; - dev->regs[0x28] = (4 << 4) | 3; - dev->regs[0x29] = 0x62; - - w83877f_fdc_handler(dev); - - w83877f_lpt_handler(dev); - - w83877f_serial_handler(dev, 0); - w83877f_serial_handler(dev, 1); - - dev->base_address = FDC_PRIMARY_ADDR; - dev->key = 0x89; - dev->key_times = 1; - - w83877f_remap(dev); - - dev->locked = 0; - dev->rw_locked = 0; -} - -static void -w83877f_close(void *priv) -{ - w83877f_t *dev = (w83877f_t *) priv; - - free(dev); -} - -static void * -w83877f_init(const device_t *info) -{ - w83877f_t *dev = (w83877f_t *) calloc(1, sizeof(w83877f_t)); - - dev->fdc = device_add(&fdc_at_winbond_device); - - dev->uart[0] = device_add_inst(&ns16550_device, 1); - dev->uart[1] = device_add_inst(&ns16550_device, 2); - - dev->reg_init = info->local; - - w83877f_reset(dev); - - return dev; -} - -const device_t w83877f_device = { - .name = "Winbond W83877F Super I/O", - .internal_name = "w83877f", - .flags = 0, - .local = 0x0a05, - .init = w83877f_init, - .close = w83877f_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t w83877f_president_device = { - .name = "Winbond W83877F Super I/O (President)", - .internal_name = "w83877f_president", - .flags = 0, - .local = 0x0a04, - .init = w83877f_init, - .close = w83877f_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t w83877tf_device = { - .name = "Winbond W83877TF Super I/O", - .internal_name = "w83877tf", - .flags = 0, - .local = 0x0c04, - .init = w83877f_init, - .close = w83877f_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t w83877tf_acorp_device = { - .name = "Winbond W83877TF Super I/O", - .internal_name = "w83877tf_acorp", - .flags = 0, - .local = 0x0c05, - .init = w83877f_init, - .close = w83877f_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; diff --git a/src/sio/sio_w83977.c b/src/sio/sio_w83977.c new file mode 100644 index 000000000..a14e50942 --- /dev/null +++ b/src/sio/sio_w83977.c @@ -0,0 +1,1344 @@ +/* + * 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. + * + * Implementation of the Winbond W83977 Super I/O Chips. + * + * Authors: Miran Grca, + * + * Copyright 2025 Miran Grca. + */ +#include +#include +#include +#include +#include +#include +#include <86box/86box.h> +#include <86box/io.h> +#include <86box/timer.h> +#include <86box/device.h> +#include <86box/pci.h> +#include <86box/pic.h> +#include <86box/lpt.h> +#include <86box/serial.h> +#include <86box/hdc.h> +#include <86box/hdc_ide.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/keyboard.h> +#include <86box/machine.h> +#include <86box/nvr.h> +#include <86box/apm.h> +#include <86box/plat.h> +#include <86box/plat_unused.h> +#include <86box/video.h> +#include <86box/sio.h> +#include "cpu.h" + +typedef struct w83977_gpio_t { + uint8_t id; + uint8_t reg; + uint8_t pulldn; + uint8_t pad; + + uint8_t alt[4]; + + uint16_t base; + + void * parent; +} w83977_gpio_t; + +typedef struct w83977_t { + uint8_t id; + uint8_t hefras; + uint8_t has_nvr; + uint8_t tries; + uint8_t lockreg; + uint8_t gpio_reg; + uint8_t regs[48]; + uint8_t ld_regs[11][256]; + uint16_t kbc_type; + uint16_t superio_base; + uint16_t fdc_base; + uint16_t lpt_base; + uint16_t nvr_base; + uint16_t kbc_base[2]; + uint16_t gpio_base; /* Set to EA */ + uint16_t uart_base[2]; + int locked; + int cur_reg; + uint32_t type; + w83977_gpio_t gpio[3]; + fdc_t *fdc; + nvr_t *nvr; + void *kbc; + serial_t *uart[2]; + lpt_t *lpt; +} w83977_t; + +static int next_id = 0; + +static void w83977_write(uint16_t port, uint8_t val, void *priv); +static uint8_t w83977_read(uint16_t port, void *priv); + +static uint16_t +make_port(const w83977_t *dev, const uint8_t ld) +{ + const uint16_t r0 = dev->ld_regs[ld][0x60]; + const uint16_t r1 = dev->ld_regs[ld][0x61]; + + const uint16_t p = (r0 << 8) + r1; + + return p; +} + +static uint16_t +make_port_sec(const w83977_t *dev, const uint8_t ld) +{ + const uint16_t r0 = dev->ld_regs[ld][0x62]; + const uint16_t r1 = dev->ld_regs[ld][0x63]; + + const uint16_t p = (r0 << 8) + r1; + + return p; +} + +static __inline uint8_t +w83977_do_read_gp(w83977_gpio_t *dev, int reg, int bit) +{ + return dev->reg & dev->pulldn & (1 << bit); +} + +static __inline uint8_t +w83977_do_read_alt(const w83977_gpio_t *dev, int alt, int reg, int bit) +{ + return dev->alt[alt] & (1 << bit); +} + +static uint8_t +w83977_read_gp(const w83977_gpio_t *dev, int bit) +{ + uint8_t reg = dev->id; + w83977_t *sio = (w83977_t *) dev->parent; + uint8_t gp_func_reg = sio->ld_regs[0x07 + reg - 1][0xe0 + ((((reg - 1) << 3) + bit) & 0x0f)]; + uint8_t gp_func; + uint8_t ret = 1 << bit; + + if (gp_func_reg & 0x01) switch (reg) { + default: + /* Do nothing, this GP does not exist. */ + break; + case 1: + switch (bit) { + default: + gp_func = (gp_func_reg >> 3) & 0x03; + if (gp_func == 0x00) + ret = w83977_do_read_gp((w83977_gpio_t *) dev, reg - 1, bit); + else + ret = w83977_do_read_alt(dev, gp_func - 1, reg - 1, bit); + break; + case 0: case 1: + gp_func = (gp_func_reg >> 3) & 0x01; + if (gp_func == 0x00) + ret = w83977_do_read_gp((w83977_gpio_t *) dev, reg - 1, bit); + else + ret = w83977_do_read_alt(dev, 0, reg - 1, bit); + break; + case 4: + gp_func = (gp_func_reg >> 3) & 0x03; + if (gp_func == 0x00) + ret = w83977_do_read_gp((w83977_gpio_t *) dev, reg - 1, bit); + else if (gp_func == 0x02) + ret = kbc_at_read_p(sio->kbc, 1, 0x80) ? (1 << bit) : 0x00; + else + ret = w83977_do_read_alt(dev, gp_func - 1, reg - 1, bit); + break; + } + break; + case 2: + switch (bit) { + default: + break; + case 0: + gp_func = (gp_func_reg >> 3) & 0x03; + if (gp_func == 0x00) + ret = w83977_do_read_gp((w83977_gpio_t *) dev, reg - 1, bit); + else if (gp_func == 0x02) + ret = kbc_at_read_p(sio->kbc, 2, 0x01) ? (1 << bit) : 0x00; + else + ret = w83977_do_read_alt(dev, gp_func - 1, reg - 1, bit); + break; + case 1 ... 4: + gp_func = (gp_func_reg >> 3) & 0x03; + if (gp_func == 0x00) + ret = w83977_do_read_gp((w83977_gpio_t *) dev, reg - 1, bit); + else if (gp_func == 0x02) + ret = kbc_at_read_p(sio->kbc, 1, 1 << (bit + 2)) ? (1 << bit) : 0x00; + else + ret = w83977_do_read_alt(dev, gp_func - 1, reg - 1, bit); + break; + case 5: + gp_func = (gp_func_reg >> 3) & 0x01; + if (gp_func == 0x00) + ret = w83977_do_read_gp((w83977_gpio_t *) dev, reg, bit); + else + ret = kbc_at_read_p(sio->kbc, 2, 0x02) ? (1 << bit) : 0x00; + break; + case 6: case 7: + /* Do nothing, these bits do not exist. */ + break; + } + break; + case 3: + if (sio->type == W83977TF) switch (bit) { + default: + break; + case 0 ... 4: + gp_func = (gp_func_reg >> 3) & 0x03; + if (gp_func == 0x00) + ret = w83977_do_read_gp((w83977_gpio_t *) dev, reg - 1, bit); + else + ret = w83977_do_read_alt(dev, gp_func - 1, reg - 1, bit); + break; + case 5 ... 7: + /* Do nothing, these bits have no function. */ + break; + } + break; + } + + if (gp_func_reg & 0x02) + ret ^= (1 << bit); + + return ret; +} + +static __inline void +w83977_do_write_gp(w83977_gpio_t *dev, int reg, int bit, int set) +{ + dev->reg = (dev->reg & ~(1 << bit)) | (set << bit); +} + +static __inline void +w83977_do_write_alt(w83977_gpio_t *dev, int alt, int reg, int bit, int set) +{ + dev->alt[alt] = (dev->alt[alt] & ~(1 << bit)) | (set << bit); +} + +static void +w83977_write_gp(w83977_gpio_t *dev, int bit, int set) +{ + uint8_t reg = dev->id; + w83977_t *sio = (w83977_t *) dev->parent; + uint8_t gp_func_reg = sio->ld_regs[0x07 + reg - 1][0xe0 + ((((reg - 1) << 3) + bit) & 0x0f)]; + uint8_t gp_func; + + if (gp_func_reg & 0x02) + set = !set; + + if (!(gp_func_reg & 0x01)) switch (reg) { + default: + /* Do nothing, this GP does not exist. */ + break; + case 1: + switch (bit) { + default: + gp_func = (gp_func_reg >> 3) & 0x03; + if (gp_func == 0x00) + w83977_do_write_gp(dev, reg - 1, bit, set); + else + w83977_do_write_alt(dev, gp_func - 1, reg - 1, bit, set); + break; + case 0: case 1: + gp_func = (gp_func_reg >> 3) & 0x01; + if (gp_func == 0x00) + w83977_do_write_gp(dev, reg - 1, bit, set); + else + w83977_do_write_alt(dev, 0, reg - 1, bit, set); + break; + case 4: + gp_func = (gp_func_reg >> 3) & 0x03; + if (gp_func == 0x00) + w83977_do_write_gp(dev, reg - 1, bit, set); + else if (gp_func == 0x02) + kbc_at_write_p(sio->kbc, 1, 0x7f, set << 7); + else + w83977_do_write_alt(dev, gp_func - 1, reg - 1, bit, set); + break; + } + break; + case 2: + switch (bit) { + default: + break; + case 0: + gp_func = (gp_func_reg >> 3) & 0x03; + if (gp_func == 0x00) + w83977_do_write_gp(dev, reg - 1, bit, set); + else if (gp_func == 0x02) + kbc_at_write_p(sio->kbc, 2, 0xfe, set); + else + w83977_do_write_alt(dev, gp_func - 1, reg - 1, bit, set); + break; + case 1 ... 4: + gp_func = (gp_func_reg >> 3) & 0x03; + if (gp_func == 0x00) + w83977_do_write_gp(dev, reg - 1, bit, set); + else if (gp_func == 0x02) + kbc_at_write_p(sio->kbc, 1, ~(1 << (bit + 2)), set << (bit + 2)); + else + w83977_do_write_alt(dev, gp_func - 1, reg - 1, bit, set); + break; + case 5: + gp_func = (gp_func_reg >> 3) & 0x01; + if (gp_func == 0x00) + w83977_do_write_gp(dev, reg - 1, bit, set); + else + kbc_at_write_p(sio->kbc, 2, 0xfd, set << 1); + break; + case 6: case 7: + /* Do nothing, these bits do not exist. */ + break; + } + break; + case 3: + if (sio->type == W83977TF) switch (bit) { + default: + break; + case 0 ... 4: + gp_func = (gp_func_reg >> 3) & 0x03; + if (gp_func == 0x00) + w83977_do_write_gp(dev, reg - 1, bit, set); + else + w83977_do_write_alt(dev, gp_func - 1, reg - 1, bit, set); + break; + case 5 ... 7: + /* Do nothing, these bits have no function. */ + break; + } + break; + } +} + +static uint8_t +w83977_gpio_read(uint16_t port, void *priv) +{ + const w83977_gpio_t *dev = (w83977_gpio_t *) priv; + uint8_t ret = 0x00; + + for (uint8_t i = 0; i < 8; i++) + ret |= w83977_read_gp(dev, i); + + return ret; +} + +static void +w83977_gpio_write(uint16_t port, uint8_t val, void *priv) +{ + w83977_gpio_t *dev = (w83977_gpio_t *) priv; + + for (uint8_t i = 0; i < 8; i++) + w83977_write_gp(dev, i, val & (1 << i)); +} + +static void +w83977_superio_handler(w83977_t *dev) +{ + if (dev->superio_base != 0x0000) + io_removehandler(dev->superio_base, 0x0002, + w83977_read, NULL, NULL, w83977_write, NULL, NULL, dev); + + dev->superio_base = (dev->regs[0x26] & 0x40) ? 0x0370 : 0x03f0; + + io_sethandler(dev->superio_base, 0x0002, + w83977_read, NULL, NULL, w83977_write, NULL, NULL, dev); +} + +static void +w83977_fdc_handler(w83977_t *dev) +{ + const uint8_t global_enable = !!(dev->regs[0x22] & (1 << 0)); + const uint8_t local_enable = !!dev->ld_regs[0][0x30]; + const uint16_t old_base = dev->fdc_base; + + dev->fdc_base = 0x0000; + + if (global_enable && local_enable) + dev->fdc_base = make_port(dev, 0) & 0xfff8; + + if (dev->fdc_base != old_base) { + if ((dev->id != 1) && (old_base >= 0x0100) && (old_base <= 0x0ff8)) + fdc_remove(dev->fdc); + + if ((dev->id != 1) && (dev->fdc_base >= 0x0100) && (dev->fdc_base <= 0x0ff8)) + fdc_set_base(dev->fdc, dev->fdc_base); + } +} + +static void +w83977_lpt_handler(w83977_t *dev) +{ + uint16_t ld_port = 0x0000; + uint16_t mask = 0xfffc; + uint8_t global_enable = !!(dev->regs[0x22] & (1 << 3)); + uint8_t local_enable = !!dev->ld_regs[1][0x30]; + uint8_t lpt_irq = dev->ld_regs[1][0x70]; + uint8_t lpt_dma = dev->ld_regs[1][0x74]; + uint8_t lpt_mode = dev->ld_regs[1][0xf0] & 0x07; + uint8_t irq_readout[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x08, + 0x00, 0x10, 0x18, 0x20, 0x00, 0x00, 0x28, 0x30 }; + + if (lpt_irq > 15) + lpt_irq = 0xff; + + if (lpt_dma >= 4) + lpt_dma = 0xff; + + lpt_port_remove(dev->lpt); + lpt_set_fifo_threshold(dev->lpt, (dev->ld_regs[1][0xf0] & 0x78) >> 3); + switch (lpt_mode) { + default: + case 0x04: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x00: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 1); + break; + case 0x01: case 0x05: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x02: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + case 0x03: case 0x07: + mask = 0xfff8; + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + } + if (global_enable && local_enable) { + ld_port = (make_port(dev, 1) & 0xfffc) & mask; + if ((ld_port >= 0x0100) && (ld_port <= (0x0ffc & mask))) + lpt_port_setup(dev->lpt, ld_port); + } + lpt_port_irq(dev->lpt, lpt_irq); + lpt_port_dma(dev->lpt, lpt_dma); + + lpt_set_cnfgb_readout(dev->lpt, ((lpt_irq > 15) ? 0x00 : irq_readout[lpt_irq]) | 0x07); +} + +static void +w83977_serial_handler(w83977_t *dev, const int uart) +{ + const uint8_t uart_no = 2 + uart; + const uint8_t global_enable = !!(dev->regs[0x22] & (1 << uart_no)); + const uint8_t local_enable = !!dev->ld_regs[uart_no][0x30]; + const uint16_t old_base = dev->uart_base[uart]; + double clock_src = 24000000.0 / 13.0; + + dev->uart_base[uart] = 0x0000; + + if (global_enable && local_enable) + dev->uart_base[uart] = make_port(dev, uart_no) & 0xfff8; + + if (dev->uart_base[uart] != old_base) { + if ((old_base >= 0x0100) && (old_base <= 0x0ff8)) + serial_remove(dev->uart[uart]); + + if ((dev->uart_base[uart] >= 0x0100) && (dev->uart_base[uart] <= 0x0ff8)) + serial_setup(dev->uart[uart], dev->uart_base[uart], dev->ld_regs[uart_no][0x70]); + } + + switch (dev->ld_regs[uart_no][0xf0] & 0x03) { + case 0x00: + clock_src = 24000000.0 / 13.0; + break; + case 0x01: + clock_src = 24000000.0 / 12.0; + break; + case 0x02: + clock_src = 24000000.0 / 1.0; + break; + case 0x03: + clock_src = 24000000.0 / 1.625; + break; + + default: + break; + } + + serial_set_clock_src(dev->uart[uart], clock_src); + + serial_irq(dev->uart[uart], dev->ld_regs[uart_no][0x70]); +} + +static void +w83977_nvr_handler(w83977_t *dev) +{ + uint8_t local_enable = !!dev->ld_regs[6][0x30]; + const uint16_t old_base = dev->nvr_base; + + local_enable &= (((dev->ld_regs[6][0xf0] & 0xe0) == 0x80) || + ((dev->ld_regs[6][0xf0] & 0xe0) == 0xe0)); + + dev->nvr_base = 0x0000; + + if (local_enable) + dev->nvr_base = make_port(dev, 6) & 0xfffe; + + if (dev->nvr_base != old_base) { + if ((dev->id != 1) && dev->has_nvr && (old_base > 0x0000) && (old_base <= 0x0ffe)) + nvr_at_handler(0, dev->nvr_base, dev->nvr); + + if ((dev->id != 1) && dev->has_nvr && (dev->nvr_base > 0x0000) && (dev->nvr_base <= 0x0ffe)) + nvr_at_handler(1, dev->nvr_base, dev->nvr); + } +} + +static void +w83977_kbc_handler(w83977_t *dev) +{ + const uint8_t local_enable = !!dev->ld_regs[5][0x30]; + const uint16_t old_base = dev->kbc_base[0]; + const uint16_t old_base2 = dev->kbc_base[1]; + + dev->kbc_base[0] = dev->kbc_base[1] = 0x0000; + + if (local_enable) { + dev->kbc_base[0] = make_port(dev, 5); + dev->kbc_base[1] = make_port_sec(dev, 5); + } + + if (dev->kbc_base[0] != old_base) { + if ((dev->id != 1) && (dev->kbc != NULL) && (old_base >= 0x0100) && (old_base <= 0x0ff8)) + kbc_at_port_handler(0, 0, old_base, dev->kbc); + + if ((dev->id != 1) && (dev->kbc != NULL) && (dev->kbc_base[0] >= 0x0100) && (dev->kbc_base[0] <= 0x0ff8)) + kbc_at_port_handler(0, 1, dev->kbc_base[0], dev->kbc); + } + + if (dev->kbc_base[1] != old_base2) { + if ((dev->id != 1) && (dev->kbc != NULL) && (old_base2 >= 0x0100) && (old_base2 <= 0x0ff8)) + kbc_at_port_handler(1, 0, old_base2, dev->kbc); + + if ((dev->id != 1) && (dev->kbc != NULL) && (dev->kbc_base[1] >= 0x0100) && (dev->kbc_base[1] <= 0x0ff8)) + kbc_at_port_handler(1, 1, dev->kbc_base[1], dev->kbc); + } + + if ((dev->id != 1) && (dev->kbc != NULL)) { + kbc_at_set_irq(0, dev->ld_regs[5][0x70], dev->kbc); + kbc_at_set_irq(1, dev->ld_regs[5][0x72], dev->kbc); + } +} + +static void +w83977_gpio_handler(w83977_t *dev, const int gpio) +{ + const uint8_t gpio_no = 7 + gpio; + const uint8_t local_enable = !!dev->ld_regs[gpio_no][0x30]; + const uint16_t old_base = dev->gpio[gpio].base; + + dev->gpio[gpio].base = 0x0000; + + if (local_enable) + dev->gpio[gpio].base = make_port(dev, gpio_no) & 0xfff8; + + if (dev->gpio[gpio].base != old_base) { + if ((old_base >= 0x0100) && (old_base <= 0x0ff8)) + io_removehandler(old_base, 0x0002, + w83977_gpio_read, NULL, NULL, w83977_gpio_write, NULL, NULL, dev); + + if ((dev->gpio[gpio].base >= 0x0100) && (dev->gpio[gpio].base <= 0x0ff8)) + io_sethandler(dev->gpio[gpio].base, 0x0002, + w83977_gpio_read, NULL, NULL, w83977_gpio_write, NULL, NULL, dev); + } +} + +static void +w83977_state_change(w83977_t *dev, const uint8_t locked) +{ + dev->locked = locked; + + if (dev->id != 1) + fdc_3f1_enable(dev->fdc, !locked); +} + +static void +w83977_write(uint16_t port, uint8_t val, void *priv) +{ + w83977_t *dev = (w83977_t *) priv; + uint8_t index = !(port & 1); + uint8_t valxor; + + if (index) { + if ((val == 0x87) && !dev->locked) { + if (dev->tries) { + w83977_state_change(dev, 1); + dev->tries = 0; + } else + dev->tries++; + } else if (dev->locked) { + if (val == 0xaa) + w83977_state_change(dev, 0); + else + dev->cur_reg = val; + } else if (dev->tries) + dev->tries = 0; + } else if (dev->locked && !dev->lockreg) { + if (dev->cur_reg < 0x30) { + valxor = val ^ dev->regs[dev->cur_reg]; + + switch (dev->cur_reg) { + case 0x02: + dev->regs[dev->cur_reg] = val; + if (val == 0x02) + w83977_state_change(dev, 0); + break; + case 0x07: + case 0x2c ... 0x2f: + dev->regs[dev->cur_reg] = val; + break; + case 0x22: + if (dev->type == W83977F) + dev->regs[dev->cur_reg] = val & 0x3d; + else + dev->regs[dev->cur_reg] = val & 0x39; + + if (valxor & 0x01) + w83977_fdc_handler(dev); + if (valxor & 0x08) + w83977_lpt_handler(dev); + if (valxor & 0x10) + w83977_serial_handler(dev, 0); + if (valxor & 0x20) + w83977_serial_handler(dev, 1); + break; + case 0x23: + if (dev->type == W83977F) + dev->regs[dev->cur_reg] = val & 0x3f; + else + dev->regs[dev->cur_reg] = (dev->regs[dev->cur_reg] & 0xfe) | (val & 0x01); + break; + case 0x24: + if (dev->type == W83977F) + dev->regs[dev->cur_reg] = (dev->regs[dev->cur_reg] & 0x04) | (val & 0xf3); + else + dev->regs[dev->cur_reg] = (dev->regs[dev->cur_reg] & 0x04) | (val & 0xc1); + break; + case 0x25: + if (dev->type == W83977F) + dev->regs[dev->cur_reg] = val & 0x3d; + else + dev->regs[dev->cur_reg] = val & 0x39; + break; + case 0x26: + if (dev->type == W83977F) + dev->regs[dev->cur_reg] = val; + else + dev->regs[dev->cur_reg] = val & 0xef; + dev->lockreg = !!(val & 0x20); + w83977_superio_handler(dev); + break; + case 0x28: + dev->regs[dev->cur_reg] = val & 0x17; + break; + case 0x2a: + if (dev->type == W83977TF) + dev->regs[dev->cur_reg] = val & 0xf3; + else + dev->regs[dev->cur_reg] = val; + break; + case 0x2b: + if (dev->type == W83977TF) + dev->regs[dev->cur_reg] = val & 0xf9; + else + dev->regs[dev->cur_reg] = val; + break; + + default: + break; + } + } else { + valxor = val ^ dev->ld_regs[dev->regs[7]][dev->cur_reg]; + + if (dev->regs[7] <= 0x0a) switch (dev->regs[7]) { + case 0x00: /* FDD */ + switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x70: + case 0x74: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if ((dev->cur_reg == 0x30) && (val & 0x01)) + dev->regs[0x22] |= 0x01; + if (valxor) + w83977_fdc_handler(dev); + break; + case 0xf0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if ((valxor & 0x01) && (val & 0x01)) { + uint8_t reg_f2 = dev->ld_regs[dev->regs[7]][0xf2]; + + fdc_update_rwc(dev->fdc, 3, (reg_f2 & 0xc0) >> 6); + fdc_update_rwc(dev->fdc, 2, (reg_f2 & 0x30) >> 4); + fdc_update_rwc(dev->fdc, 1, (reg_f2 & 0x0c) >> 2); + fdc_update_rwc(dev->fdc, 0, (reg_f2 & 0x03)); + } else { + fdc_update_rwc(dev->fdc, 3, 0x00); + fdc_update_rwc(dev->fdc, 2, 0x00); + fdc_update_rwc(dev->fdc, 1, 0x00); + fdc_update_rwc(dev->fdc, 0, 0x00); + } + if (valxor & 0x0c) { + fdc_clear_flags(dev->fdc, FDC_FLAG_PS2 | FDC_FLAG_PS2_MCA); + switch (val & 0x0c) { + case 0x00: + fdc_set_flags(dev->fdc, FDC_FLAG_PS2); + break; + case 0x04: + fdc_set_flags(dev->fdc, FDC_FLAG_PS2_MCA); + break; + } + } + if (valxor & 0x10) + fdc_set_swap(dev->fdc, (val & 0x10) >> 4); + break; + case 0xf1: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if (valxor & 0x01) + fdc_set_swwp(dev->fdc, !!(val & 0x01)); + if (valxor & 0x02) + fdc_set_diswr(dev->fdc, !!(val & 0x02)); + if (valxor & 0x0c) + fdc_update_densel_force(dev->fdc, (val & 0xc) >> 2); + break; + case 0xf2: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if (dev->ld_regs[dev->regs[7]][0xf0] & 0x01) { + if (valxor & 0xc0) + fdc_update_rwc(dev->fdc, 3, (val & 0xc0) >> 6); + if (valxor & 0x30) + fdc_update_rwc(dev->fdc, 2, (val & 0x30) >> 4); + if (valxor & 0x0c) + fdc_update_rwc(dev->fdc, 1, (val & 0x0c) >> 2); + if (valxor & 0x03) + fdc_update_rwc(dev->fdc, 0, (val & 0x03)); + } + break; + case 0xf4 ... 0xf7: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x5b; + + if (valxor & 0x18) + fdc_update_drvrate(dev->fdc, dev->cur_reg - 0xf4, + (val & 0x18) >> 3); + break; + } + break; + case 0x01: /* Parallel Port */ + switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x70: + case 0x74: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if ((dev->cur_reg == 0x30) && (val & 0x01)) + dev->regs[0x22] |= 0x08; + if (valxor) + w83977_lpt_handler(dev); + break; + /* + Bits 2:0: Mode: + - 000: Bi-directional (SPP); + - 001: EPP-1.9 and SPP; + - 010: ECP; + - 011: ECP and EPP-1.9; + - 100: Printer Mode (Default); + - 101: EPP-1.7 and SPP; + - 110: ECP and EPP-1.7. + Bits 6:3: ECP FIFO Threshold. + */ + case 0xf0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + if (valxor) + w83977_lpt_handler(dev); + break; + } + break; + case 0x02: /* Serial port 1 */ + switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x70: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if ((dev->cur_reg == 0x30) && (val & 0x01)) + dev->regs[0x22] |= 0x10; + if (valxor) + w83977_serial_handler(dev, 0); + break; + case 0xf0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x03; + + if (valxor & 0x03) + w83977_serial_handler(dev, 0); + break; + } + break; + case 0x03: /* Serial port 2 */ + switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x70: + case 0x74: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if ((dev->cur_reg == 0x30) && (val & 0x01)) + dev->regs[0x22] |= 0x20; + if (valxor) + w83977_serial_handler(dev, 1); + break; + case 0xf0: + if (dev->type == W83977F) + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x03; + else + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x0f; + + if (valxor & 0x03) + w83977_serial_handler(dev, 1); + break; + case 0xf1: + if (dev->type != W83977F) + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x7f; + break; + } + break; + case 0x04: /* Real Time Clock */ + if (dev->type == W83977F) switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x70: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if (valxor) + w83977_nvr_handler(dev); + break; + case 0xf0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if ((dev->id != 1) && dev->has_nvr && valxor) { + nvr_lock_set(0x80, 0x20, !!(dev->ld_regs[6][dev->cur_reg] & 0x01), dev->nvr); + nvr_lock_set(0xa0, 0x20, !!(dev->ld_regs[6][dev->cur_reg] & 0x02), dev->nvr); + nvr_lock_set(0xc0, 0x20, !!(dev->ld_regs[6][dev->cur_reg] & 0x04), dev->nvr); + nvr_lock_set(0xe0, 0x20, !!(dev->ld_regs[6][dev->cur_reg] & 0x08), dev->nvr); + + nvr_bank_set(0, val >> 6, dev->nvr); + } + break; + } + break; + case 0x05: /* KBC */ + switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x62: case 0x63: + case 0x70: case 0x72: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if (valxor) + w83977_kbc_handler(dev); + break; + case 0xf0: + if (dev->type == W83977F) + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0xc7; + else + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x83; + if (valxor & 0x01) + kbc_at_set_fast_reset(val & 0x01); + break; + } + break; + case 0x06: /* IR */ + if (dev->type == W83977F) switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x70: + case 0x74: case 0x75: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + break; + case 0xf0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x0f; + break; + } + break; + case 0x07: /* GP I/O Port I */ + switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x62: case 0x63: + case 0x64: case 0x65: + case 0x70: case 0x72: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if (valxor) + w83977_gpio_handler(dev, 0); + break; + case 0xe0 ... 0xe7: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x1b; + break; + case 0xf1: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x03; + break; + } + break; + case 0x08: /* GP I/O Port II */ + switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x70: case 0x72: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if (valxor) + w83977_gpio_handler(dev, 0); + break; + case 0xe8 ... 0xed: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x1f; + break; + case 0xee: + if (dev->type == W83977TF) + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x1f; + break; + case 0xf0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x08; + break; + case 0xf2: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + break; + case 0xf3: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x0e; + break; + case 0xf4: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x0f; + break; + } + break; + case 0x09: /* GP I/O Port III */ + if (dev->type == W83977TF) switch (dev->cur_reg) { + case 0x30: + case 0x60: case 0x61: + case 0x62: case 0x63: + case 0x64: case 0x65: + case 0x70: case 0x72: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + + if (valxor) + w83977_gpio_handler(dev, 0); + break; + case 0xe0 ... 0xe7: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x1b; + break; + case 0xf1: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x07; + break; + } + break; + case 0x0a: /* ACPI */ + if (dev->type != W83977F) switch (dev->cur_reg) { + case 0x30: + case 0x70: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + break; + case 0x60: case 0x61: + case 0x62: case 0x63: + case 0x64: case 0x65: + if (dev->type == W83977TF) + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + break; + case 0xe0: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0xf7; + break; + case 0xe1: case 0xe2: + case 0xfe: case 0xff: + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + break; + case 0xe4: + if (dev->type == W83977EF) + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0xf0; + else + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val; + break; + case 0xe5: + if (dev->type == W83977EF) + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x7f; + break; + case 0xe7: + if (dev->type == W83977EF) + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x03; + break; + case 0xf0: + if (dev->type == W83977EF) + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0xcf; + else + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x8f; + break; + case 0xf1: + if (dev->type == W83977EF) + dev->ld_regs[dev->regs[7]][dev->cur_reg] &= ~(val & 0xcf); + else + dev->ld_regs[dev->regs[7]][dev->cur_reg] &= ~(val & 0x0f); + break; + case 0xf2: + if (dev->type != W83977EF) + dev->ld_regs[dev->regs[7]][dev->cur_reg] &= ~(val & 0x0f); + break; + case 0xf3: + if (dev->type == W83977EF) + dev->ld_regs[dev->regs[7]][dev->cur_reg] &= ~(val & 0x7f); + else + dev->ld_regs[dev->regs[7]][dev->cur_reg] &= ~(val & 0x3f); + break; + case 0xf4: + if (dev->type == W83977EF) + dev->ld_regs[dev->regs[7]][dev->cur_reg] &= ~(val & 0x17); + else + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x0f; + break; + case 0xf5: + if (dev->type != W83977EF) + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x0f; + break; + case 0xf6: + if (dev->type == W83977EF) + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x7f; + else + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x3f; + break; + case 0xf7: + if (dev->type == W83977EF) + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x17; + else + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x01; + break; + case 0xf9: + if (dev->type == W83977EF) + dev->ld_regs[dev->regs[7]][dev->cur_reg] = val & 0x07; + break; + } + break; + } + } + } +} + +static uint8_t +w83977_read(uint16_t port, void *priv) +{ + w83977_t *dev = (w83977_t *) priv; + uint8_t index = (port & 1) ? 0 : 1; + uint8_t ret = 0xff; + + if (dev->locked) { + if (index) + ret = dev->cur_reg; + else { + if (dev->cur_reg < 0x30) { + if (dev->cur_reg == 0x20) + ret = dev->type >> (W83977_TYPE_SHIFT + 8); + else if (dev->cur_reg == 0x21) + ret = (dev->type >> W83977_TYPE_SHIFT) & 0xff; + else + ret = dev->regs[dev->cur_reg]; + } else if ((dev->regs[7] == 0x0a) && (dev->cur_reg == 0xe3)) { + ret = dev->ld_regs[dev->regs[7]][dev->cur_reg]; + if (dev->type == W83977EF) + dev->ld_regs[dev->regs[7]][dev->cur_reg] &= ~0x17; + else + dev->ld_regs[dev->regs[7]][dev->cur_reg] &= ~0x07; + } else if (dev->regs[7] <= 0x0a) { + if ((dev->regs[7] == 0x00) && (dev->cur_reg == 0xf2)) + ret = (fdc_get_rwc(dev->fdc, 0) | (fdc_get_rwc(dev->fdc, 1) << 2) | + (fdc_get_rwc(dev->fdc, 2) << 4) | (fdc_get_rwc(dev->fdc, 3) << 6)); + else + ret = dev->ld_regs[dev->regs[7]][dev->cur_reg]; + } + } + } + + return ret; +} + +static void +w83977_reset(void *priv) +{ + w83977_t *dev = (w83977_t *) priv; + + dev->lockreg = 0; + + memset(dev->regs, 0x00, sizeof(dev->regs)); + + dev->regs[0x03] = 0x03; + dev->regs[0x20] = dev->type >> (W83977_TYPE_SHIFT + 8); + dev->regs[0x21] = (dev->type >> W83977_TYPE_SHIFT) & 0xff; + dev->regs[0x22] = 0xff; + dev->regs[0x23] = (dev->type != W83977F) ? 0xfe : 0x00; + dev->regs[0x24] = 0x80; + dev->regs[0x26] = dev->hefras << 6; + + for (uint8_t i = 0; i <= 0x0a; i++) + memset(dev->ld_regs[i], 0x00, 256); + + /* Logical device 0: FDD */ + dev->ld_regs[0x00][0x30] = 0x01; + dev->ld_regs[0x00][0x60] = 0x03; + dev->ld_regs[0x00][0x61] = (dev->id == 1) ? 0x70 : 0xf0; + dev->ld_regs[0x00][0x70] = 0x06; + if (dev->type == W83977F) + dev->ld_regs[0x00][0x71] = 0x02; + dev->ld_regs[0x00][0x74] = 0x02; + dev->ld_regs[0x00][0xf0] = 0x0e; + dev->ld_regs[0x00][0xf2] = 0xff; + + /* Logical device 1: Parallel Port */ + dev->ld_regs[0x01][0x30] = 0x01; + dev->ld_regs[0x01][0x60] = (dev->id == 1) ? 0x02 : 0x03; + dev->ld_regs[0x01][0x61] = 0x78; + dev->ld_regs[0x01][0x70] = (dev->id == 1) ? 0x05 : 0x07; + if (dev->type == W83977F) + dev->ld_regs[0x01][0x71] = 0x02; + dev->ld_regs[0x01][0x74] = 0x04; + dev->ld_regs[0x01][0xf0] = 0x3f; + + /* Logical device 2: Serial Port 1 */ + dev->ld_regs[0x02][0x30] = 0x01; + dev->ld_regs[0x02][0x60] = 0x03; + dev->ld_regs[0x02][0x61] = (dev->id == 1) ? 0xe8 : 0xf8; + dev->ld_regs[0x02][0x70] = 0x04; + if (dev->type == W83977F) + dev->ld_regs[0x02][0x71] = 0x02; + serial_irq(dev->uart[0], dev->ld_regs[2][0x70]); + + /* Logical device 3: Serial Port 2 */ + dev->ld_regs[0x03][0x30] = 0x01; + dev->ld_regs[0x03][0x60] = 0x02; + dev->ld_regs[0x03][0x61] = (dev->id == 1) ? 0xe8 : 0xf8; + dev->ld_regs[0x03][0x70] = 0x03; + if (dev->type == W83977F) + dev->ld_regs[0x03][0x71] = 0x02; + dev->ld_regs[0x03][0x74] = 0x04; + serial_irq(dev->uart[1], dev->ld_regs[3][0x70]); + + if (dev->type == W83977F) { + /* Logical device 4: Real Time Clock */ + dev->ld_regs[0x04][0x30] = 0x01; + dev->ld_regs[0x04][0x61] = 0x70; + dev->ld_regs[0x04][0x70] = 0x08; + } + + /* Logical device 5: KBC */ + dev->ld_regs[0x05][0x30] = 0x01; + dev->ld_regs[0x05][0x61] = 0x60; + dev->ld_regs[0x05][0x63] = 0x64; + dev->ld_regs[0x05][0x70] = 0x01; + if (dev->type == W83977F) + dev->ld_regs[0x05][0x71] = 0x02; + dev->ld_regs[0x05][0x72] = 0x0c; + if (dev->type == W83977F) + dev->ld_regs[0x05][0x73] = 0x02; + if (dev->type == W83977F) + dev->ld_regs[0x05][0xf0] = 0x40; + else + dev->ld_regs[0x05][0xf0] = 0x83; + + if (dev->type == W83977F) { + /* Logical device 6: IR */ + dev->ld_regs[0x06][0x71] = 0x02; + dev->ld_regs[0x06][0x74] = 0x04; + } + + /* Logical device 7: GP I/O Port I */ + if (dev->type == W83977F) + dev->ld_regs[0x07][0x71] = 0x02; + dev->ld_regs[0x07][0xe0] = 0x01; + dev->ld_regs[0x07][0xe1] = 0x01; + dev->ld_regs[0x07][0xe2] = 0x01; + dev->ld_regs[0x07][0xe3] = 0x01; + dev->ld_regs[0x07][0xe4] = 0x01; + dev->ld_regs[0x07][0xe5] = 0x01; + dev->ld_regs[0x07][0xe6] = 0x01; + dev->ld_regs[0x07][0xe7] = 0x01; + + /* Logical device 8: GP I/O Port II */ + if (dev->type == W83977F) + dev->ld_regs[0x08][0x71] = 0x02; + dev->ld_regs[0x08][0xe8] = 0x01; + dev->ld_regs[0x08][0xe9] = 0x01; + dev->ld_regs[0x08][0xea] = 0x01; + dev->ld_regs[0x08][0xeb] = 0x01; + dev->ld_regs[0x08][0xec] = 0x01; + dev->ld_regs[0x08][0xed] = 0x01; + if (dev->type == W83977TF) + dev->ld_regs[0x08][0xee] = 0x01; + + if (dev->type == W83977TF) { + /* Logical device 9: GP I/O Port III */ + dev->ld_regs[0x09][0xe0] = 0x01; + dev->ld_regs[0x09][0xe1] = 0x01; + dev->ld_regs[0x09][0xe2] = 0x01; + dev->ld_regs[0x09][0xe3] = 0x01; + dev->ld_regs[0x09][0xe4] = 0x01; + dev->ld_regs[0x09][0xe5] = 0x01; + dev->ld_regs[0x09][0xe6] = 0x01; + dev->ld_regs[0x09][0xe7] = 0x01; + } + + /* Logical device A: ACPI - not on W83977F */ + if (dev->type == W83977EF) + dev->ld_regs[0x0a][0xe3] = 0x10; + + w83977_lpt_handler(dev); + w83977_serial_handler(dev, 0); + w83977_serial_handler(dev, 1); + + /* W83977EF has ACPI but no ACPI I/O ports. */ + + if (dev->id != 1) { + fdc_clear_flags(dev->fdc, FDC_FLAG_PS2 | FDC_FLAG_PS2_MCA); + fdc_reset(dev->fdc); + + w83977_fdc_handler(dev); + + if ((dev->type == W83977F) && dev->has_nvr) { + w83977_nvr_handler(dev); + nvr_bank_set(0, 0, dev->nvr); + + nvr_lock_set(0x80, 0x20, 0, dev->nvr); + nvr_lock_set(0xa0, 0x20, 0, dev->nvr); + nvr_lock_set(0xc0, 0x20, 0, dev->nvr); + nvr_lock_set(0xe0, 0x20, 0, dev->nvr); + } + + w83977_kbc_handler(dev); + } + + w83977_superio_handler(dev); + + for (int i = 0; i < 3; i++) { + dev->gpio[i].reg = 0xff; + dev->gpio[i].pulldn = 0xff; + + w83977_gpio_handler(dev, i); + } + + dev->locked = 0; +} + +static void +w83977_close(void *priv) +{ + w83977_t *dev = (w83977_t *) priv; + + next_id = 0; + + free(dev); +} + +static void * +w83977_init(const device_t *info) +{ + w83977_t *dev = (w83977_t *) calloc(1, sizeof(w83977_t)); + + dev->hefras = info->local & W83977_370; + + dev->id = next_id; + + if (next_id == 1) + dev->hefras ^= W83977_370; + else + dev->fdc = device_add(&fdc_at_smc_device); + + dev->uart[0] = device_add_inst(&ns16550_device, (next_id << 1) + 1); + dev->uart[1] = device_add_inst(&ns16550_device, (next_id << 1) + 2); + + dev->lpt = device_add_inst(&lpt_port_device, next_id + 1); + + dev->type = info->local & W83977_TYPE; + + dev->kbc_type = info->local & W83977_KBC; + + dev->has_nvr = !(info->local & W83977_NO_NVR); + + if (dev->has_nvr && (dev->id != 1)) { + dev->nvr = device_add(&amstrad_megapc_nvr_device); + + nvr_bank_set(0, 0, dev->nvr); + } + + switch (dev->kbc_type) { + case W83977_AMI: + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_AMI | 0x00004800)); + break; + case W83977_PHOENIX: + dev->kbc = device_add_params(&kbc_at_device, (void *) (KBC_VEN_PHOENIX | 0x00041900)); + break; + } + + /* Set the defaults here so the ports can be removed by w83977_reset(). */ + dev->fdc_base = (dev->id == 1) ? 0x0000 : 0x03f0; + dev->lpt_base = (dev->id == 1) ? 0x0278 : 0x0378; + dev->uart_base[0] = (dev->id == 1) ? 0x03e8 : 0x03f8; + dev->uart_base[1] = (dev->id == 1) ? 0x02e8 : 0x02f8; + dev->nvr_base = (dev->id == 1) ? 0x0000 : 0x0070; + dev->kbc_base[0] = (dev->id == 1) ? 0x0000 : 0x0060; + dev->kbc_base[1] = (dev->id == 1) ? 0x0000 : 0x0064; + + for (int i = 0; i < 3; i++) { + dev->gpio[i].id = i + 1; + + dev->gpio[i].reg = 0xff; + dev->gpio[i].pulldn = 0xff; + + for (int j = 0; j < 4; j++) + dev->gpio[i].alt[j] = 0xff; + + dev->gpio[i].parent = dev; + } + + w83977_reset(dev); + + next_id++; + + return dev; +} + +const device_t w83977_device = { + .name = "SMC FDC37C93x Super I/O", + .internal_name = "w83977", + .flags = 0, + .local = 0, + .init = w83977_init, + .close = w83977_close, + .reset = w83977_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/sio/sio_w83977f.c b/src/sio/sio_w83977f.c deleted file mode 100644 index fd177bc19..000000000 --- a/src/sio/sio_w83977f.c +++ /dev/null @@ -1,686 +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. - * - * Emulation of the Winbond W83977F Super I/O Chip. - * - * Winbond W83977F Super I/O Chip - * Used by the Award 430TX - * - * - * - * Authors: Miran Grca, - * Copyright 2016-2020 Miran Grca. - */ -#include -#include -#include -#include -#include -#include <86box/86box.h> -#include <86box/device.h> -#include <86box/io.h> -#include <86box/timer.h> -#include <86box/pci.h> -#include <86box/mem.h> -#include <86box/rom.h> -#include <86box/lpt.h> -#include <86box/serial.h> -#include <86box/fdd.h> -#include <86box/fdc.h> -#include <86box/sio.h> - -#define HEFRAS (dev->regs[0x26] & 0x40) - -typedef struct w83977f_t { - uint8_t id; - uint8_t tries; - uint8_t regs[48]; - uint8_t dev_regs[256][208]; - int locked; - int rw_locked; - int cur_reg; - int base_address; - int type; - int hefras; - fdc_t *fdc; - serial_t *uart[2]; -} w83977f_t; - -static int next_id = 0; - -static void w83977f_write(uint16_t port, uint8_t val, void *priv); -static uint8_t w83977f_read(uint16_t port, void *priv); - -static void -w83977f_remap(w83977f_t *dev) -{ - io_removehandler(FDC_PRIMARY_ADDR, 0x0002, - w83977f_read, NULL, NULL, w83977f_write, NULL, NULL, dev); - io_removehandler(FDC_SECONDARY_ADDR, 0x0002, - w83977f_read, NULL, NULL, w83977f_write, NULL, NULL, dev); - - dev->base_address = (HEFRAS ? FDC_SECONDARY_ADDR : FDC_PRIMARY_ADDR); - - io_sethandler(dev->base_address, 0x0002, - w83977f_read, NULL, NULL, w83977f_write, NULL, NULL, dev); -} - -static uint8_t -get_lpt_length(w83977f_t *dev) -{ - uint8_t length = 4; - - if (((dev->dev_regs[1][0xc0] & 0x07) != 0x00) && ((dev->dev_regs[1][0xc0] & 0x07) != 0x02) && ((dev->dev_regs[1][0xc0] & 0x07) != 0x04)) - length = 8; - - return length; -} - -static void -w83977f_fdc_handler(w83977f_t *dev) -{ - uint16_t io_base = (dev->dev_regs[0][0x30] << 8) | dev->dev_regs[0][0x31]; - - if (dev->id == 1) - return; - - fdc_remove(dev->fdc); - - if ((dev->dev_regs[0][0x00] & 0x01) && (dev->regs[0x22] & 0x01) && (io_base >= 0x100) && (io_base <= 0xff8)) - fdc_set_base(dev->fdc, io_base); - - fdc_set_irq(dev->fdc, dev->dev_regs[0][0x40] & 0x0f); -} - -static void -w83977f_lpt_handler(w83977f_t *dev) -{ - uint16_t io_mask; - uint16_t io_base = (dev->dev_regs[1][0x30] << 8) | dev->dev_regs[1][0x31]; - int io_len = get_lpt_length(dev); - io_base &= (0xff8 | io_len); - io_mask = 0xffc; - if (io_len == 8) - io_mask = 0xff8; - - if (dev->id == 1) { - lpt2_remove(); - - if ((dev->dev_regs[1][0x00] & 0x01) && (dev->regs[0x22] & 0x08) && (io_base >= 0x100) && (io_base <= io_mask)) - lpt2_setup(io_base); - - lpt2_irq(dev->dev_regs[1][0x40] & 0x0f); - } else { - lpt1_remove(); - - if ((dev->dev_regs[1][0x00] & 0x01) && (dev->regs[0x22] & 0x08) && (io_base >= 0x100) && (io_base <= io_mask)) - lpt1_setup(io_base); - - lpt1_irq(dev->dev_regs[1][0x40] & 0x0f); - } -} - -static void -w83977f_serial_handler(w83977f_t *dev, int uart) -{ - uint16_t io_base = (dev->dev_regs[2 + uart][0x30] << 8) | dev->dev_regs[2 + uart][0x31]; - double clock_src = 24000000.0 / 13.0; - - serial_remove(dev->uart[uart]); - - if ((dev->dev_regs[2 + uart][0x00] & 0x01) && (dev->regs[0x22] & (0x10 << uart)) && (io_base >= 0x100) && (io_base <= 0xff8)) - serial_setup(dev->uart[uart], io_base, dev->dev_regs[2 + uart][0x40] & 0x0f); - - switch (dev->dev_regs[2 + uart][0xc0] & 0x03) { - case 0x00: - clock_src = 24000000.0 / 13.0; - break; - case 0x01: - clock_src = 24000000.0 / 12.0; - break; - case 0x02: - clock_src = 24000000.0 / 1.0; - break; - case 0x03: - clock_src = 24000000.0 / 1.625; - break; - - default: - break; - } - - serial_set_clock_src(dev->uart[uart], clock_src); -} - -static void -w83977f_write(uint16_t port, uint8_t val, void *priv) -{ - w83977f_t *dev = (w83977f_t *) priv; - uint8_t index = (port & 1) ? 0 : 1; - uint8_t valxor = 0; - uint8_t ld = dev->regs[7]; - - if (index) { - if ((val == 0x87) && !dev->locked) { - if (dev->tries) { - dev->locked = 1; - dev->tries = 0; - } else - dev->tries++; - } else { - if (dev->locked) { - if (val == 0xaa) - dev->locked = 0; - else - dev->cur_reg = val; - } else { - if (dev->tries) - dev->tries = 0; - } - } - return; - } else { - if (dev->locked) { - if (dev->rw_locked) - return; - if (dev->cur_reg >= 0x30) { - valxor = val ^ dev->dev_regs[ld][dev->cur_reg - 0x30]; - dev->dev_regs[ld][dev->cur_reg - 0x30] = val; - } else { - valxor = val ^ dev->regs[dev->cur_reg]; - dev->regs[dev->cur_reg] = val; - } - } else - return; - } - - switch (dev->cur_reg) { - case 0x02: -#if 0 - if (valxor & 0x02) - softresetx86(); -#endif - break; - case 0x22: - if (valxor & 0x20) - w83977f_serial_handler(dev, 1); - if (valxor & 0x10) - w83977f_serial_handler(dev, 0); - if (valxor & 0x08) - w83977f_lpt_handler(dev); - if (valxor & 0x01) - w83977f_fdc_handler(dev); - break; - case 0x26: - if (valxor & 0x40) - w83977f_remap(dev); - if (valxor & 0x20) - dev->rw_locked = (val & 0x20) ? 1 : 0; - break; - case 0x30: - if (valxor & 0x01) - switch (ld) { - case 0x00: - w83977f_fdc_handler(dev); - break; - case 0x01: - w83977f_lpt_handler(dev); - break; - case 0x02: - case 0x03: - w83977f_serial_handler(dev, ld - 2); - break; - - default: - break; - } - break; - case 0x60: - case 0x61: - if (valxor & 0xff) - switch (ld) { - case 0x00: - w83977f_fdc_handler(dev); - break; - case 0x01: - w83977f_lpt_handler(dev); - break; - case 0x02: - case 0x03: - w83977f_serial_handler(dev, ld - 2); - break; - - default: - break; - } - break; - case 0x70: - if (valxor & 0x0f) - switch (ld) { - case 0x00: - w83977f_fdc_handler(dev); - break; - case 0x01: - w83977f_lpt_handler(dev); - break; - case 0x02: - case 0x03: - w83977f_serial_handler(dev, ld - 2); - break; - - default: - break; - } - break; - case 0xf0: - switch (ld) { - case 0x00: - if (dev->id == 1) - break; - - if (!dev->id && (valxor & 0x20)) - fdc_update_drv2en(dev->fdc, (val & 0x20) ? 0 : 1); - if (!dev->id && (valxor & 0x10)) - fdc_set_swap(dev->fdc, (val & 0x10) ? 1 : 0); - if (!dev->id && (valxor & 0x01)) - fdc_update_enh_mode(dev->fdc, (val & 0x01) ? 1 : 0); - break; - case 0x01: - if (valxor & 0x07) - w83977f_lpt_handler(dev); - break; - case 0x02: - case 0x03: - if (valxor & 0x03) - w83977f_serial_handler(dev, ld - 2); - break; - - default: - break; - } - break; - case 0xf1: - switch (ld) { - case 0x00: - if (dev->id == 1) - break; - - if (!dev->id && (valxor & 0xc0)) - fdc_update_boot_drive(dev->fdc, (val & 0xc0) >> 6); - if (!dev->id && (valxor & 0x0c)) - fdc_update_densel_force(dev->fdc, (val & 0x0c) >> 2); - if (!dev->id && (valxor & 0x02)) - fdc_set_diswr(dev->fdc, (val & 0x02) ? 1 : 0); - if (!dev->id && (valxor & 0x01)) - fdc_set_swwp(dev->fdc, (val & 0x01) ? 1 : 0); - break; - - default: - break; - } - break; - case 0xf2: - switch (ld) { - case 0x00: - if (dev->id == 1) - break; - - if (!dev->id && (valxor & 0xc0)) - fdc_update_rwc(dev->fdc, 3, (val & 0xc0) >> 6); - if (!dev->id && (valxor & 0x30)) - fdc_update_rwc(dev->fdc, 2, (val & 0x30) >> 4); - if (!dev->id && (valxor & 0x0c)) - fdc_update_rwc(dev->fdc, 1, (val & 0x0c) >> 2); - if (!dev->id && (valxor & 0x03)) - fdc_update_rwc(dev->fdc, 0, val & 0x03); - break; - - default: - break; - } - break; - case 0xf4: - case 0xf5: - case 0xf6: - case 0xf7: - switch (ld) { - case 0x00: - if (dev->id == 1) - break; - - if (!dev->id && (valxor & 0x18)) - fdc_update_drvrate(dev->fdc, dev->cur_reg & 0x03, (val & 0x18) >> 3); - break; - - default: - break; - } - break; - - default: - break; - } -} - -static uint8_t -w83977f_read(uint16_t port, void *priv) -{ - w83977f_t *dev = (w83977f_t *) priv; - uint8_t ret = 0xff; - uint8_t index = (port & 1) ? 0 : 1; - uint8_t ld = dev->regs[7]; - - if (dev->locked) { - if (index) - ret = dev->cur_reg; - else { - if (!dev->rw_locked) { - if (!dev->id && ((dev->cur_reg == 0xf2) && (ld == 0x00))) - ret = (fdc_get_rwc(dev->fdc, 0) | (fdc_get_rwc(dev->fdc, 1) << 2) | (fdc_get_rwc(dev->fdc, 2) << 4) | (fdc_get_rwc(dev->fdc, 3) << 6)); - else if (dev->cur_reg >= 0x30) - ret = dev->dev_regs[ld][dev->cur_reg - 0x30]; - else - ret = dev->regs[dev->cur_reg]; - } - } - } - - return ret; -} - -static void -w83977f_reset(w83977f_t *dev) -{ - memset(dev->regs, 0, 48); - for (uint16_t i = 0; i < 256; i++) - memset(dev->dev_regs[i], 0, 208); - - if (dev->type < 2) { - dev->regs[0x20] = 0x97; - dev->regs[0x21] = dev->type ? 0x73 : 0x71; - } else { - dev->regs[0x20] = 0x52; - dev->regs[0x21] = 0xf0; - } - dev->regs[0x22] = 0xff; - dev->regs[0x24] = dev->type ? 0x84 : 0xa4; - dev->regs[0x26] = dev->hefras; - - /* WARNING: Array elements are register - 0x30. */ - /* Logical Device 0 (FDC) */ - dev->dev_regs[0][0x00] = 0x01; - if (!dev->type) - dev->dev_regs[0][0x01] = 0x02; - if (next_id == 1) { - dev->dev_regs[0][0x30] = 0x03; - dev->dev_regs[0][0x31] = 0x70; - } else { - dev->dev_regs[0][0x30] = 0x03; - dev->dev_regs[0][0x31] = 0xf0; - } - dev->dev_regs[0][0x40] = 0x06; - if (!dev->type) - dev->dev_regs[0][0x41] = 0x02; /* Read-only */ - dev->dev_regs[0][0x44] = 0x02; - dev->dev_regs[0][0xc0] = 0x0e; - - /* Logical Device 1 (Parallel Port) */ - dev->dev_regs[1][0x00] = 0x01; - if (!dev->type) - dev->dev_regs[1][0x01] = 0x02; - if (next_id == 1) { - dev->dev_regs[1][0x30] = 0x02; - dev->dev_regs[1][0x31] = 0x78; - dev->dev_regs[1][0x40] = 0x05; - } else { - dev->dev_regs[1][0x30] = 0x03; - dev->dev_regs[1][0x31] = 0x78; - dev->dev_regs[1][0x40] = 0x07; - } - if (!dev->type) - dev->dev_regs[1][0x41] = 0x01 /*0x02*/; /* Read-only */ - dev->dev_regs[1][0x44] = 0x04; - dev->dev_regs[1][0xc0] = 0x3c; /* The datasheet says default is 3f, but also default is printer mode. */ - - /* Logical Device 2 (UART A) */ - dev->dev_regs[2][0x00] = 0x01; - if (!dev->type) - dev->dev_regs[2][0x01] = 0x02; - if (next_id == 1) { - dev->dev_regs[2][0x30] = 0x03; - dev->dev_regs[2][0x31] = 0xe8; - } else { - dev->dev_regs[2][0x30] = 0x03; - dev->dev_regs[2][0x31] = 0xf8; - } - dev->dev_regs[2][0x40] = 0x04; - if (!dev->type) - dev->dev_regs[2][0x41] = 0x02; /* Read-only */ - - /* Logical Device 3 (UART B) */ - dev->dev_regs[3][0x00] = 0x01; - if (!dev->type) - dev->dev_regs[3][0x01] = 0x02; - if (next_id == 1) { - dev->dev_regs[3][0x30] = 0x02; - dev->dev_regs[3][0x31] = 0xe8; - } else { - dev->dev_regs[3][0x30] = 0x02; - dev->dev_regs[3][0x31] = 0xf8; - } - dev->dev_regs[3][0x40] = 0x03; - if (!dev->type) - dev->dev_regs[3][0x41] = 0x02; /* Read-only */ - - /* Logical Device 4 (RTC) */ - if (!dev->type) { - dev->dev_regs[4][0x00] = 0x01; - dev->dev_regs[4][0x01] = 0x02; - dev->dev_regs[4][0x30] = 0x00; - dev->dev_regs[4][0x31] = 0x70; - dev->dev_regs[4][0x40] = 0x08; - dev->dev_regs[4][0x41] = 0x02; /* Read-only */ - } - - /* Logical Device 5 (KBC) */ - dev->dev_regs[5][0x00] = 0x01; - if (!dev->type) - dev->dev_regs[5][0x01] = 0x02; - dev->dev_regs[5][0x30] = 0x00; - dev->dev_regs[5][0x31] = 0x60; - dev->dev_regs[5][0x32] = 0x00; - dev->dev_regs[5][0x33] = 0x64; - dev->dev_regs[5][0x40] = 0x01; - if (!dev->type) - dev->dev_regs[5][0x41] = 0x02; /* Read-only */ - dev->dev_regs[5][0x42] = 0x0c; - if (!dev->type) - dev->dev_regs[5][0x43] = 0x02; /* Read-only? */ - dev->dev_regs[5][0xc0] = dev->type ? 0x83 : 0x40; - - /* Logical Device 6 (IR) = UART C */ - if (!dev->type) { - dev->dev_regs[6][0x01] = 0x02; - dev->dev_regs[6][0x41] = 0x02; /* Read-only */ - dev->dev_regs[6][0x44] = 0x04; - dev->dev_regs[6][0x45] = 0x04; - } - - /* Logical Device 7 (Auxiliary I/O Part I) */ - if (!dev->type) - dev->dev_regs[7][0x01] = 0x02; - if (!dev->type) - dev->dev_regs[7][0x41] = 0x02; /* Read-only */ - if (!dev->type) - dev->dev_regs[7][0x43] = 0x02; /* Read-only? */ - dev->dev_regs[7][0xb0] = 0x01; - dev->dev_regs[7][0xb1] = 0x01; - dev->dev_regs[7][0xb2] = 0x01; - dev->dev_regs[7][0xb3] = 0x01; - dev->dev_regs[7][0xb4] = 0x01; - dev->dev_regs[7][0xb5] = 0x01; - dev->dev_regs[7][0xb6] = 0x01; - if (dev->type) - dev->dev_regs[7][0xb7] = 0x01; - - /* Logical Device 8 (Auxiliary I/O Part II) */ - if (!dev->type) - dev->dev_regs[8][0x01] = 0x02; - if (!dev->type) - dev->dev_regs[8][0x41] = 0x02; /* Read-only */ - if (!dev->type) - dev->dev_regs[8][0x43] = 0x02; /* Read-only? */ - dev->dev_regs[8][0xb8] = 0x01; - dev->dev_regs[8][0xb9] = 0x01; - dev->dev_regs[8][0xba] = 0x01; - dev->dev_regs[8][0xbb] = 0x01; - dev->dev_regs[8][0xbc] = 0x01; - dev->dev_regs[8][0xbd] = 0x01; - dev->dev_regs[8][0xbe] = 0x01; - dev->dev_regs[8][0xbf] = 0x01; - - /* Logical Device 9 (Auxiliary I/O Part III) */ - if (dev->type) { - dev->dev_regs[9][0xb0] = 0x01; - dev->dev_regs[9][0xb1] = 0x01; - dev->dev_regs[9][0xb2] = 0x01; - dev->dev_regs[9][0xb3] = 0x01; - dev->dev_regs[9][0xb4] = 0x01; - dev->dev_regs[9][0xb5] = 0x01; - dev->dev_regs[9][0xb6] = 0x01; - dev->dev_regs[9][0xb7] = 0x01; - - dev->dev_regs[10][0xc0] = 0x8f; - } - - if (dev->id == 1) { - serial_setup(dev->uart[0], COM3_ADDR, COM3_IRQ); - serial_setup(dev->uart[1], COM4_ADDR, COM4_IRQ); - } else { - fdc_reset(dev->fdc); - - serial_setup(dev->uart[0], COM1_ADDR, COM1_IRQ); - serial_setup(dev->uart[1], COM2_ADDR, COM2_IRQ); - - w83977f_fdc_handler(dev); - } - - w83977f_lpt_handler(dev); - w83977f_serial_handler(dev, 0); - w83977f_serial_handler(dev, 1); - - w83977f_remap(dev); - - dev->locked = 0; - dev->rw_locked = 0; -} - -static void -w83977f_close(void *priv) -{ - w83977f_t *dev = (w83977f_t *) priv; - - next_id = 0; - - free(dev); -} - -static void * -w83977f_init(const device_t *info) -{ - w83977f_t *dev = (w83977f_t *) calloc(1, sizeof(w83977f_t)); - - dev->type = info->local & 0x0f; - dev->hefras = info->local & 0x40; - - dev->id = next_id; - - if (next_id == 1) - dev->hefras ^= 0x40; - else - dev->fdc = device_add(&fdc_at_smc_device); - - dev->uart[0] = device_add_inst(&ns16550_device, (next_id << 1) + 1); - dev->uart[1] = device_add_inst(&ns16550_device, (next_id << 1) + 2); - - w83977f_reset(dev); - - next_id++; - - return dev; -} - -const device_t w83977f_device = { - .name = "Winbond W83977F Super I/O", - .internal_name = "w83977f", - .flags = 0, - .local = 0, - .init = w83977f_init, - .close = w83977f_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t w83977f_370_device = { - .name = "Winbond W83977F Super I/O (Port 370h)", - .internal_name = "w83977f_370", - .flags = 0, - .local = 0x40, - .init = w83977f_init, - .close = w83977f_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t w83977tf_device = { - .name = "Winbond W83977TF Super I/O", - .internal_name = "w83977tf", - .flags = 0, - .local = 1, - .init = w83977f_init, - .close = w83977f_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t w83977ef_device = { - .name = "Winbond W83977TF Super I/O", - .internal_name = "w83977ef", - .flags = 0, - .local = 2, - .init = w83977f_init, - .close = w83977f_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; - -const device_t w83977ef_370_device = { - .name = "Winbond W83977TF Super I/O (Port 370h)", - .internal_name = "w83977ef_370", - .flags = 0, - .local = 0x42, - .init = w83977f_init, - .close = w83977f_close, - .reset = NULL, - .available = NULL, - .speed_changed = NULL, - .force_redraw = NULL, - .config = NULL -}; diff --git a/src/sound/CMakeLists.txt b/src/sound/CMakeLists.txt index 66a0ee4e3..9e2a75198 100644 --- a/src/sound/CMakeLists.txt +++ b/src/sound/CMakeLists.txt @@ -36,6 +36,7 @@ add_library(snd OBJECT snd_azt2316a.c snd_cms.c snd_cmi8x38.c + snd_covox.c snd_cs423x.c snd_gus.c snd_sb.c diff --git a/src/sound/midi_opl4.c b/src/sound/midi_opl4.c index 5ec15cc7c..25f44c9e7 100644 --- a/src/sound/midi_opl4.c +++ b/src/sound/midi_opl4.c @@ -436,7 +436,8 @@ note_on(uint8_t note, uint8_t velocity, MIDI_CHANNEL_DATA *midi_channel, opl4_mi const YRW801_REGION_DATA_PTR *region_ptr = &snd_yrw801_regions[0]; const YRW801_WAVE_DATA *wave_data[2]; VOICE_DATA *voice[2]; - uint8_t i = 0, voices = 0; + int i = 0; + uint8_t voices = 0; while (opl4_midi->gen_in_progress) { } diff --git a/src/sound/snd_adlib.c b/src/sound/snd_adlib.c index 17990e842..b21a1f472 100644 --- a/src/sound/snd_adlib.c +++ b/src/sound/snd_adlib.c @@ -1,3 +1,21 @@ +/* + * 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. + * + * Adlib emulation. + * + * Authors: Sarah Walker, + * Miran Grca, + * Jasmine Iwanek, + * + * Copyright 2008-2018 Sarah Walker. + * Copyright 2016-2025 Miran Grca. + * Copyright 2024-2025 Jasmine Iwanek. + */ #include #include #include @@ -33,7 +51,7 @@ adlib_log(const char *fmt, ...) # define adlib_log(fmt, ...) #endif -typedef struct adlib_t { +typedef struct adlib_s { fm_drv_t opl; uint8_t pos_regs[8]; diff --git a/src/sound/snd_covox.c b/src/sound/snd_covox.c new file mode 100644 index 000000000..aaffbcf08 --- /dev/null +++ b/src/sound/snd_covox.c @@ -0,0 +1,475 @@ +/* + * 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. + * + * Rainbow Arts PC-Soundman Emulation + * + * Authors: Jasmine Iwanek, + * + * Copyright 2025 Jasmine Iwanek. + */ +#include +#include +#include +#include +#include +#define HAVE_STDARG_H + +#include <86box/86box.h> +#include <86box/device.h> +#include <86box/io.h> +#include <86box/mca.h> +#include <86box/sound.h> +#include <86box/filters.h> +#include <86box/timer.h> +#include <86box/snd_opl.h> +#include <86box/plat_fallthrough.h> +#include <86box/plat_unused.h> + +#define COVOX_SOUNDMAN 0 +#define COVOX_VOICEMASTERKEY 1 +#define COVOX_SOUNDMASTERPLUS 2 +#define COVOX_ISADACR0 3 +#define COVOX_ISADACR1 4 + +#ifdef ENABLE_COVOX_LOG +int covox_do_log = ENABLE_COVOX_LOG; + +static void +covox_log(const char *fmt, ...) +{ + va_list ap; + + if (covox_do_log) { + va_start(ap, fmt); + pclog_ex(fmt, ap); + va_end(ap); + } +} +#else +# define covox_log(fmt, ...) +#endif + +typedef struct covox_s { + fm_drv_t opl; + + uint8_t dac_val; + + int16_t buffer[2][SOUNDBUFLEN]; + int pos; +} covox_t; + +// TODO: Can this be rolled into covox_get_buffer? +static void +covox_update(covox_t *covox) +{ + for (; covox->pos < sound_pos_global; covox->pos++) { + covox->buffer[0][covox->pos] = (int8_t) (covox->dac_val ^ 0x80) * 0x40; + covox->buffer[1][covox->pos] = (int8_t) (covox->dac_val ^ 0x80) * 0x40; + } +} + +uint8_t +covox_read(uint16_t addr, void *priv) +{ +#if 0 + const covox_t *covox = (covox_t *) priv; +#endif + + covox_log("covox_read: addr=%04x\n", addr); + + return 0xff; +} + +void +covox_write(uint16_t addr, uint8_t val, void *priv) +{ + covox_t *covox = (covox_t *) priv; + + covox_log("covox_write: addr=%04x val=%02x\n", addr, val); + + switch (addr) { + case 0x221: // Soundman + case 0x229: // Soundman + case 0x22f: // Soundman, voicemasterkey + case 0x231: // isadac-r1? + case 0x24f: // voicemasterkey + case 0x279: // isadac-r0 (lPT2) + case 0x28f: // voicemasterkey + case 0x2cf: // voicemasterkey + case 0x301: // Soundman + case 0x309: // Soundman + case 0x30f: // soundman + case 0x331: // soundmasterplus + case 0x339: // soundmasterplus + case 0x371: // isadac-r0 + case 0x379: // isadac-r0 (lPT1) + case 0x381: // isadac-r0 + case 0x3bd: // isadac-r0 (lPT1-Mono) + covox->dac_val = val; + // TODO: Is this needed here? + covox_update(covox); + break; + + default: + break; + } +} + +static void +covox_get_buffer(int32_t *buffer, int len, void *priv) +{ + covox_t *covox = (covox_t *) priv; + + covox_update(covox); + + for (int c = 0; c < len; c++) { + buffer[c * 2] += dac_iir(0, covox->buffer[0][c]); + buffer[c * 2 + 1] += dac_iir(1, covox->buffer[1][c]); + } + covox->pos = 0; +} + +static void +covox_get_music_buffer(int32_t *buffer, int len, void *priv) +{ + covox_t *covox = (covox_t *) priv; + + const int32_t *opl_buf = covox->opl.update(covox->opl.priv); + + for (int c = 0; c < len * 2; c++) + buffer[c] += opl_buf[c]; + + if (covox->opl.reset_buffer) + covox->opl.reset_buffer(covox->opl.priv); +} + +#define IO_SETHANDLER_COVOX_DAC(addr, len) \ + io_sethandler((addr), (len), \ + covox_read, NULL, NULL, \ + covox_write, NULL, NULL, \ + covox) + +#define IO_SETHANDLER_COVOX_ADLIB(addr, len) \ + io_sethandler((addr), (len), \ + covox->opl.read, NULL, NULL, \ + covox->opl.write, NULL, NULL, \ + covox->opl.priv) + +void * +covox_init(UNUSED(const device_t *info)) +{ + covox_t *covox = calloc(1, sizeof(covox_t)); + uint8_t has_adlib = 0; + uint8_t has_stereo = 0; + uint8_t fixed_address = 0; + if (!covox) + return NULL; + + covox_log("covox_init\n"); + switch (info->local) { + case COVOX_SOUNDMAN: + fixed_address = 1; + fallthrough; + case COVOX_SOUNDMASTERPLUS: + has_adlib = 1; + break; + + case COVOX_ISADACR0: + has_stereo = 1; + break; + + case COVOX_ISADACR1: + has_stereo = 2; + break; + + default: + break; + } + + if (fixed_address) { + IO_SETHANDLER_COVOX_DAC(0x220, 0x0002); + IO_SETHANDLER_COVOX_DAC(0x228, 0x0002); + IO_SETHANDLER_COVOX_DAC(0x22e, 0x0002); +#if 0 + // According to vgmpf, this is the address + IO_SETHANDLER_COVOX_DAC(0x22f, 0x0001); +#endif + IO_SETHANDLER_COVOX_DAC(0x300, 0x0002); + IO_SETHANDLER_COVOX_DAC(0x308, 0x0002); + IO_SETHANDLER_COVOX_DAC(0x30e, 0x0002); + } else { + IO_SETHANDLER_COVOX_DAC(device_get_config_hex16("base"), 0x0002); + + // TODO: Needs more work + if (has_stereo) + IO_SETHANDLER_COVOX_DAC(device_get_config_hex16("base2"), 0x0002); + } + sound_add_handler(covox_get_buffer, covox); + + if (has_adlib) { + fm_driver_get(FM_YM3812, &covox->opl); + if (fixed_address) { + // Adlib Clone part + IO_SETHANDLER_COVOX_ADLIB(0x380, 0x0002); + IO_SETHANDLER_COVOX_ADLIB(0x388, 0x0002); + IO_SETHANDLER_COVOX_ADLIB(0x38e, 0x0002); + } else + IO_SETHANDLER_COVOX_ADLIB(device_get_config_hex16("adlibbase"), 0x0002); + + music_add_handler(covox_get_music_buffer, covox); + } + + return covox; +} + +void +covox_close(void *priv) +{ + covox_t *covox = (covox_t *) priv; + + if (covox) + free(covox); +} + +// clang-format off +static const device_config_t voicemasterkey_config[] = { + { + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = NULL, + .default_int = 0x388, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "0x22f", .value = 0x22f }, + { .description = "0x24f", .value = 0x24f }, + { .description = "0x28f", .value = 0x28f }, + { .description = "0x2cf", .value = 0x2cf }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +}; +// clang-format on + +// Note: We don't support sound input on this yet +const device_t voicemasterkey_device = { + .name = "Covox Voice Master Key", + .internal_name = "voicemasterkey", + .flags = DEVICE_ISA | DEVICE_SIDECAR, + .local = COVOX_VOICEMASTERKEY, + .init = covox_init, + .close = covox_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = voicemasterkey_config +}; + +// clang-format off +static const device_config_t soundmasterplus_config[] = { + { + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = NULL, + .default_int = 0x330, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "0x330", .value = 0x330 }, + { .description = "0x338", .value = 0x338 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "adlibbase", + .description = "Adlib Address", + .type = CONFIG_HEX16, + .default_string = NULL, + .default_int = 0x388, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "0x388", .value = 0x388 }, + { .description = "0x380", .value = 0x380 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +}; +// clang-format on + +const device_t soundmasterplus_device = { + .name = "Covox Sound Master Plus", + .internal_name = "soundmasterplus", + .flags = DEVICE_ISA | DEVICE_SIDECAR, + .local = COVOX_SOUNDMASTERPLUS, + .init = covox_init, + .close = covox_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = soundmasterplus_config +}; + +// clang-format off +static const device_config_t isadacr0_config[] = { + { + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = NULL, + .default_int = 0x380, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "0x220", .value = 0x220 }, + { .description = "0x228", .value = 0x228 }, + { .description = "0x22e", .value = 0x22e }, + { .description = "0x230", .value = 0x230 }, + { .description = "0x24e", .value = 0x24e }, + { .description = "0x278", .value = 0x278 }, + { .description = "0x28e", .value = 0x28e }, + { .description = "0x2ce", .value = 0x2ce }, + { .description = "0x300", .value = 0x300 }, + { .description = "0x308", .value = 0x308 }, + { .description = "0x303", .value = 0x30e }, + { .description = "0x330", .value = 0x330 }, + { .description = "0x338", .value = 0x338 }, + { .description = "0x370", .value = 0x370 }, + { .description = "0x378", .value = 0x378 }, + { .description = "0x380", .value = 0x380 }, + { .description = "0x3bc", .value = 0x3bc }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "base2", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = NULL, + .default_int = 0x370, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "0x220", .value = 0x220 }, + { .description = "0x228", .value = 0x228 }, + { .description = "0x22e", .value = 0x22e }, + { .description = "0x230", .value = 0x230 }, + { .description = "0x24e", .value = 0x24e }, + { .description = "0x278", .value = 0x278 }, + { .description = "0x28e", .value = 0x28e }, + { .description = "0x2ce", .value = 0x2ce }, + { .description = "0x300", .value = 0x300 }, + { .description = "0x308", .value = 0x308 }, + { .description = "0x303", .value = 0x30e }, + { .description = "0x330", .value = 0x330 }, + { .description = "0x338", .value = 0x338 }, + { .description = "0x370", .value = 0x370 }, + { .description = "0x378", .value = 0x378 }, + { .description = "0x380", .value = 0x380 }, + { .description = "0x3bc", .value = 0x3bc }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +}; +// clang-format on + +// Note: We don't support stereo on this yet +const device_t isadacr0_device = { + .name = "ISA DAC-r0", + .internal_name = "isadacr0", + .flags = DEVICE_ISA | DEVICE_SIDECAR, + .local = COVOX_ISADACR0, + .init = covox_init, + .close = covox_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = isadacr0_config +}; + +// clang-format off +static const device_config_t isadacr1_config[] = { + { + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = NULL, + .default_int = 0x378, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "0x378", .value = 0x378 }, + { .description = "0x3bc", .value = 0x3bc }, + { .description = "0x278", .value = 0x278 }, + { .description = "0x230", .value = 0x230 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "base2", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = NULL, + .default_int = 0x278, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "0x378", .value = 0x378 }, + { .description = "0x3bc", .value = 0x3bc }, + { .description = "0x278", .value = 0x278 }, + { .description = "0x230", .value = 0x230 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +}; +// clang-format on + +// Note: We don't support stereo on this yet +const device_t isadacr1_device = { + .name = "ISA DAC-r1", + .internal_name = "isadacr1", + .flags = DEVICE_ISA | DEVICE_SIDECAR, + .local = COVOX_ISADACR1, + .init = covox_init, + .close = covox_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = isadacr1_config +}; + +const device_t soundman_device = { + .name = "Rainbow Arts PC-Soundman", + .internal_name = "soundman", + .flags = DEVICE_ISA | DEVICE_SIDECAR, + .local = COVOX_SOUNDMAN, + .init = covox_init, + .close = covox_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/sound/snd_lpt_dac.c b/src/sound/snd_lpt_dac.c index 13a430c91..99cf66916 100644 --- a/src/sound/snd_lpt_dac.c +++ b/src/sound/snd_lpt_dac.c @@ -8,6 +8,7 @@ #include <86box/86box.h> #include <86box/filters.h> #include <86box/timer.h> +#include <86box/device.h> #include <86box/lpt.h> #include <86box/machine.h> #include <86box/sound.h> @@ -128,7 +129,9 @@ const lpt_device_t lpt_dac_device = { .read_status = dac_read_status, .read_ctrl = NULL, .epp_write_data = NULL, - .epp_request_read = NULL + .epp_request_read = NULL, + .priv = NULL, + .lpt = NULL }; const lpt_device_t lpt_dac_stereo_device = { @@ -143,5 +146,7 @@ const lpt_device_t lpt_dac_stereo_device = { .read_status = dac_read_status, .read_ctrl = NULL, .epp_write_data = NULL, - .epp_request_read = NULL + .epp_request_read = NULL, + .priv = NULL, + .lpt = NULL }; diff --git a/src/sound/snd_lpt_dss.c b/src/sound/snd_lpt_dss.c index b609e3add..206f44ec8 100644 --- a/src/sound/snd_lpt_dss.c +++ b/src/sound/snd_lpt_dss.c @@ -8,6 +8,7 @@ #include <86box/86box.h> #include <86box/filters.h> #include <86box/timer.h> +#include <86box/device.h> #include <86box/lpt.h> #include <86box/machine.h> #include <86box/sound.h> @@ -144,5 +145,7 @@ const lpt_device_t dss_device = { .read_status = dss_read_status, .read_ctrl = NULL, .epp_write_data = NULL, - .epp_request_read = NULL + .epp_request_read = NULL, + .priv = NULL, + .lpt = NULL }; diff --git a/src/sound/snd_sb.c b/src/sound/snd_sb.c index 4c73abf21..f041ebb8c 100644 --- a/src/sound/snd_sb.c +++ b/src/sound/snd_sb.c @@ -2874,9 +2874,8 @@ sb_init(UNUSED(const device_t *info)) sb_ct1335_mixer_reset(sb); if (device_get_config_int("gameport")) { - sb->gameport = gameport_add(&gameport_device); + sb->gameport = gameport_add(&gameport_200_device); sb->gameport_addr = 0x200; - gameport_remap(sb->gameport, sb->gameport_addr); } /* DSP I/O handler is activated in sb_dsp_setaddr */ @@ -2959,9 +2958,8 @@ sb_mcv_init(UNUSED(const device_t *info)) midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp); if (device_get_config_int("gameport")) { - sb->gameport = gameport_add(&gameport_device); + sb->gameport = gameport_add(&gameport_200_device); sb->gameport_addr = 0x200; - gameport_remap(sb->gameport, sb->gameport_addr); } return sb; @@ -3047,9 +3045,8 @@ sb_pro_v1_init(UNUSED(const device_t *info)) midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp); if (device_get_config_int("gameport")) { - sb->gameport = gameport_add(&gameport_device); + sb->gameport = gameport_add(&gameport_200_device); sb->gameport_addr = 0x200; - gameport_remap(sb->gameport, sb->gameport_addr); } return sb; @@ -3107,9 +3104,8 @@ sb_pro_v2_init(UNUSED(const device_t *info)) midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp); if (device_get_config_int("gameport")) { - sb->gameport = gameport_add(&gameport_device); + sb->gameport = gameport_add(&gameport_200_device); sb->gameport_addr = 0x200; - gameport_remap(sb->gameport, sb->gameport_addr); } return sb; @@ -3146,9 +3142,8 @@ sb_pro_mcv_init(UNUSED(const device_t *info)) midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp); if (device_get_config_int("gameport")) { - sb->gameport = gameport_add(&gameport_device); + sb->gameport = gameport_add(&gameport_200_device); sb->gameport_addr = 0x200; - gameport_remap(sb->gameport, sb->gameport_addr); } return sb; @@ -3241,9 +3236,8 @@ sb_16_init(UNUSED(const device_t *info)) gameport_remap(sb->gameport, sb->gameport_addr); } else { if (device_get_config_int("gameport")) { - sb->gameport = gameport_add(&gameport_device); + sb->gameport = gameport_add(&gameport_200_device); sb->gameport_addr = 0x200; - gameport_remap(sb->gameport, sb->gameport_addr); } } @@ -3279,7 +3273,7 @@ sb_16_reply_mca_init(UNUSED(const device_t *info)) if (device_get_config_int("receive_input")) midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp); - sb->gameport = gameport_add(&gameport_device); + sb->gameport = gameport_add(&gameport_200_device); /* I/O handlers activated in sb_pro_mcv_write */ mca_add(sb_16_reply_mca_read, sb_16_reply_mca_write, sb_mcv_feedb, NULL, sb); @@ -3645,9 +3639,8 @@ sb_awe32_init(UNUSED(const device_t *info)) midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp); if (device_get_config_int("gameport")) { - sb->gameport = gameport_add(&gameport_device); + sb->gameport = gameport_add(&gameport_200_device); sb->gameport_addr = 0x200; - gameport_remap(sb->gameport, sb->gameport_addr); } return sb; @@ -3911,9 +3904,8 @@ ess_x688_init(UNUSED(const device_t *info)) } if (device_get_config_int("gameport")) { - ess->gameport = gameport_add(&gameport_device); + ess->gameport = gameport_add(&gameport_200_device); ess->gameport_addr = 0x200; - gameport_remap(ess->gameport, ess->gameport_addr); } if (ide_base > 0x0000) { @@ -4060,7 +4052,7 @@ ess_x688_mca_init(UNUSED(const device_t *info)) sb_dsp_set_mpu(&ess->dsp, ess->mpu); } - ess->gameport = gameport_add(&gameport_device); + ess->gameport = gameport_add(&gameport_200_device); mpu401_change_addr(ess->mpu, 0); diff --git a/src/sound/sound.c b/src/sound/sound.c index 615df88bc..c81dc47b0 100644 --- a/src/sound/sound.c +++ b/src/sound/sound.c @@ -12,9 +12,11 @@ * * Authors: Sarah Walker, * Miran Grca, + * Jasmine Iwanek, * * Copyright 2008-2020 Sarah Walker. - * Copyright 2016-2020 Miran Grca. + * Copyright 2016-2025 Miran Grca. + * Copyright 2024-2025 Jasmine Iwanek. */ #include #include @@ -111,6 +113,11 @@ static const SOUND_CARD sound_cards[] = { { &ssi2001_device }, { &mmb_device }, { &pasplus_device }, + { &voicemasterkey_device }, + { &soundmasterplus_device }, + { &soundman_device }, + { &isadacr0_device }, + { &isadacr1_device }, { &sb_1_device }, { &sb_15_device }, { &sb_2_device }, diff --git a/src/unix/CMakeLists.txt b/src/unix/CMakeLists.txt index 91fa25f39..724ab041f 100644 --- a/src/unix/CMakeLists.txt +++ b/src/unix/CMakeLists.txt @@ -32,6 +32,16 @@ set(THREADS_PREFER_PTHREAD_FLAG TRUE) find_package(Threads REQUIRED) target_link_libraries(86Box Threads::Threads) +find_package(SDL2 REQUIRED) +include_directories(${SDL2_INCLUDE_DIRS}) +if(STATIC_BUILD AND TARGET SDL2::SDL2-static) + target_link_libraries(86Box SDL2::SDL2-static) +elseif(TARGET SDL2::SDL2) + target_link_libraries(86Box SDL2::SDL2) +else() + target_link_libraries(86Box ${SDL2_LIBRARIES}) +endif() + add_library(ui OBJECT unix_sdl.c unix_cdrom.c diff --git a/src/unix/assets/86Box.spec b/src/unix/assets/86Box.spec index bb9b85b12..000fb07c3 100644 --- a/src/unix/assets/86Box.spec +++ b/src/unix/assets/86Box.spec @@ -15,7 +15,7 @@ %global romver 4.1 Name: 86Box -Version: 5.0 +Version: 5.0.1 Release: 1%{?dist} Summary: Classic PC emulator License: GPLv2+ @@ -121,5 +121,5 @@ popd %{_datadir}/%{name}/roms %changelog -* Sat Aug 31 Jasmine Iwanek 5.0-1 +* Sat Aug 31 Jasmine Iwanek 5.0.1-1 - Bump release diff --git a/src/unix/assets/net.86box.86Box.metainfo.xml b/src/unix/assets/net.86box.86Box.metainfo.xml index 4c6a795a7..49d5a87d9 100644 --- a/src/unix/assets/net.86box.86Box.metainfo.xml +++ b/src/unix/assets/net.86box.86Box.metainfo.xml @@ -11,7 +11,7 @@ net.86box.86Box.desktop - + diff --git a/src/unix/unix.c b/src/unix/unix.c index f3580cd19..bc9b9fedf 100644 --- a/src/unix/unix.c +++ b/src/unix/unix.c @@ -64,8 +64,8 @@ int fixed_size_x = 640; int fixed_size_y = 480; extern int title_set; extern wchar_t sdl_win_title[512]; -plat_joystick_t plat_joystick_state[MAX_PLAT_JOYSTICKS]; -joystick_t joystick_state[GAMEPORT_MAX][MAX_JOYSTICKS]; +plat_joystick_state_t plat_joystick_state[MAX_PLAT_JOYSTICKS]; +joystick_state_t joystick_state[GAMEPORT_MAX][MAX_JOYSTICKS]; int joysticks_present; SDL_mutex *blitmtx; SDL_threadID eventthread; @@ -873,7 +873,7 @@ plat_init_rom_paths(void) #undef TMP_PATH_BUFSIZE void -plat_get_global_config_dir(char *outbuf, const uint8_t len) +plat_get_global_config_dir(char *outbuf, const size_t len) { char *prefPath = SDL_GetPrefPath(NULL, "86Box"); strncpy(outbuf, prefPath, len); @@ -882,7 +882,7 @@ plat_get_global_config_dir(char *outbuf, const uint8_t len) } void -plat_get_global_data_dir(char *outbuf, const uint8_t len) +plat_get_global_data_dir(char *outbuf, const size_t len) { char *prefPath = SDL_GetPrefPath(NULL, "86Box"); strncpy(outbuf, prefPath, len); @@ -901,6 +901,14 @@ plat_get_temp_dir(char *outbuf, uint8_t len) path_slash(outbuf); } +void +plat_get_vmm_dir(char *outbuf, const size_t len) +{ + // Return empty string. SDL 86Box does not have a VM manager + if (len > 0) + outbuf[0] = 0; +} + bool process_media_commands_3(uint8_t *id, char *fn, uint8_t *wp, int cmdargc) { @@ -948,6 +956,11 @@ void (*f_rl_callback_handler_remove)(void) = NULL; # define LIBEDIT_LIBRARY "libedit.so" #endif +void ui_sb_update_icon_wp(int tag, int state) +{ + /* No-op */ +} + uint32_t timer_onesec(uint32_t interval, UNUSED(void *param)) { @@ -1001,12 +1014,12 @@ monitor_thread(UNUSED(void *param)) printf( "fddload - Load floppy disk image into drive .\n" "cdload - Load CD-ROM image into drive .\n" - "zipload - Load ZIP image into ZIP drive .\n" + "rdiskload - Load removable disk image into removable disk drive .\n" "cartload - Load cartridge image into cartridge drive .\n" "moload - Load MO image into MO drive .\n\n" "fddeject - eject disk from floppy drive .\n" "cdeject - eject disc from CD-ROM drive .\n" - "zipeject - eject ZIP image from ZIP drive .\n" + "rdiskeject - eject removable disk image from removable disk drive .\n" "carteject - eject cartridge from drive .\n" "moeject - eject image from MO drive .\n\n" "hardreset - hard reset the emulated system.\n" @@ -1111,8 +1124,8 @@ monitor_thread(UNUSED(void *param)) mo_eject(atoi(xargv[1])); } else if (strncasecmp(xargv[0], "carteject", 8) == 0 && cmdargc >= 2) { cartridge_eject(atoi(xargv[1])); - } else if (strncasecmp(xargv[0], "zipeject", 8) == 0 && cmdargc >= 2) { - zip_eject(atoi(xargv[1])); + } else if (strncasecmp(xargv[0], "rdiskeject", 8) == 0 && cmdargc >= 2) { + rdisk_eject(atoi(xargv[1])); } else if (strncasecmp(xargv[0], "fddload", 7) == 0 && cmdargc >= 4) { uint8_t id; uint8_t wp; @@ -1179,7 +1192,7 @@ monitor_thread(UNUSED(void *param)) printf("Inserting tape into cartridge holder %hhu: %s\n", id, fn); cartridge_mount(id, fn, wp); } - } else if (strncasecmp(xargv[0], "zipload", 7) == 0 && cmdargc >= 4) { + } else if (strncasecmp(xargv[0], "rdiskload", 7) == 0 && cmdargc >= 4) { uint8_t id; uint8_t wp; bool err = false; @@ -1198,8 +1211,8 @@ monitor_thread(UNUSED(void *param)) if (fn[strlen(fn) - 1] == '\'' || fn[strlen(fn) - 1] == '"') fn[strlen(fn) - 1] = '\0'; - printf("Inserting disk into ZIP drive %c: %s\n", id + 'A', fn); - zip_mount(id, fn, wp); + printf("Inserting disk into removable disk drive %c: %s\n", id + 'A', fn); + rdisk_mount(id, fn, wp); } } free(line); @@ -1223,11 +1236,12 @@ main(int argc, char **argv) ret = pc_init(argc, argv); if (ret == 0) return 0; - if (!pc_init_modules()) { + if (!pc_init_roms()) { ui_msgbox_header(MBX_FATAL, L"No ROMs found.", L"86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory."); SDL_Quit(); return 6; } + pc_init_modules(); for (uint8_t i = 1; i < GFXCARD_MAX; i++) gfxcard[i] = 0; @@ -1470,7 +1484,7 @@ joystick_close(void) } void -joystick_process(void) +joystick_process(uint8_t gp) { /* No-op. */ } diff --git a/src/unix/unix_cdrom.c b/src/unix/unix_cdrom.c index b1096b0b4..09aaa5092 100644 --- a/src/unix/unix_cdrom.c +++ b/src/unix/unix_cdrom.c @@ -6,7 +6,7 @@ * * This file is part of the 86Box distribution. * - * Handle the platform-side of CDROM/ZIP/MO drives. + * Handle the platform-side of CDROM/RDisk/MO drives. * * * @@ -34,7 +34,7 @@ #include <86box/cdrom.h> #include <86box/cdrom_image.h> #include <86box/mo.h> -#include <86box/zip.h> +#include <86box/rdisk.h> #include <86box/scsi_disk.h> #include <86box/plat.h> #include <86box/ui.h> @@ -220,58 +220,58 @@ mo_reload(uint8_t id) } void -zip_eject(uint8_t id) +rdisk_eject(uint8_t id) { - zip_t *dev = (zip_t *) zip_drives[id].priv; + rdisk_t *dev = (rdisk_t *) rdisk_drives[id].priv; - zip_disk_close(dev); - if (zip_drives[id].bus_type) { + rdisk_disk_close(dev); + if (rdisk_drives[id].bus_type) { /* Signal disk change to the emulated machine. */ - zip_insert(dev); + rdisk_insert(dev); } - ui_sb_update_icon_state(SB_ZIP | id, 1); + ui_sb_update_icon_state(SB_RDISK | id, 1); #if 0 - media_menu_update_zip(id); + media_menu_update_rdisk(id); #endif - ui_sb_update_tip(SB_ZIP | id); + ui_sb_update_tip(SB_RDISK | id); config_save(); } void -zip_mount(uint8_t id, char *fn, uint8_t wp) +rdisk_mount(uint8_t id, char *fn, uint8_t wp) { - zip_t *dev = (zip_t *) zip_drives[id].priv; + rdisk_t *dev = (rdisk_t *) rdisk_drives[id].priv; - zip_disk_close(dev); - zip_drives[id].read_only = wp; - zip_load(dev, fn, 0); + rdisk_disk_close(dev); + rdisk_drives[id].read_only = wp; + rdisk_load(dev, fn, 0); - ui_sb_update_icon_state(SB_ZIP | id, strlen(zip_drives[id].image_path) ? 0 : 1); + ui_sb_update_icon_state(SB_RDISK | id, strlen(rdisk_drives[id].image_path) ? 0 : 1); #if 0 - media_menu_update_zip(id); + media_menu_update_rdisk(id); #endif - ui_sb_update_tip(SB_ZIP | id); + ui_sb_update_tip(SB_RDISK | id); config_save(); } void -zip_reload(uint8_t id) +rdisk_reload(uint8_t id) { - zip_t *dev = (zip_t *) zip_drives[id].priv; + rdisk_t *dev = (rdisk_t *) rdisk_drives[id].priv; - zip_disk_reload(dev); - if (strlen(zip_drives[id].image_path) == 0) { - ui_sb_update_icon_state(SB_ZIP | id, 1); + rdisk_disk_reload(dev); + if (strlen(rdisk_drives[id].image_path) == 0) { + ui_sb_update_icon_state(SB_RDISK | id, 1); } else { - ui_sb_update_icon_state(SB_ZIP | id, 0); + ui_sb_update_icon_state(SB_RDISK | id, 0); } #if 0 - media_menu_update_zip(id); + media_menu_update_rdisk(id); #endif - ui_sb_update_tip(SB_ZIP | id); + ui_sb_update_tip(SB_RDISK | id); config_save(); } diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index 2ffe41f7b..bcbc7aafd 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -18,6 +18,7 @@ add_library(utils OBJECT cJSON.c crc.c + crc32.c fifo.c fifo8.c ini.c diff --git a/src/utils/crc32.c b/src/utils/crc32.c new file mode 100644 index 000000000..6993654ae --- /dev/null +++ b/src/utils/crc32.c @@ -0,0 +1,1016 @@ +/* crc32.c -- compute the CRC-32 of a data stream + * Copyright (C) 1995-2022 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + * + * This interleaved implementation of a CRC makes use of pipelined multiple + * arithmetic-logic units, commonly found in modern CPU cores. It is due to + * Kadatch and Jenkins (2010). See doc/crc-doc.1.0.pdf in this distribution. + */ + +/* @(#) $Id$ */ + +/* + Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore + protection on the static variables used to control the first-use generation + of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should + first call get_crc_table() to initialize the tables before allowing more than + one thread to use crc32(). + + MAKECRCH can be #defined to write out crc32.h. A main() routine is also + produced, so that this one source file can be compiled to an executable. + */ +#include +#include + +#define __USE_LARGEFILE64 +#include + +#if (defined(__HAIKU__) || defined(__unix__) || defined(__APPLE__)) && !defined(__linux__) +# define off64_t off_t +#endif + +#ifdef MAKECRCH +# include +# ifndef DYNAMIC_CRC_TABLE +# define DYNAMIC_CRC_TABLE +# endif /* !DYNAMIC_CRC_TABLE */ +#endif /* MAKECRCH */ + + /* + A CRC of a message is computed on N braids of words in the message, where + each word consists of W bytes (4 or 8). If N is 3, for example, then three + running sparse CRCs are calculated respectively on each braid, at these + indices in the array of words: 0, 3, 6, ..., 1, 4, 7, ..., and 2, 5, 8, ... + This is done starting at a word boundary, and continues until as many blocks + of N * W bytes as are available have been processed. The results are combined + into a single CRC at the end. For this code, N must be in the range 1..6 and + W must be 4 or 8. The upper limit on N can be increased if desired by adding + more #if blocks, extending the patterns apparent in the code. In addition, + crc32.h would need to be regenerated, if the maximum N value is increased. + + N and W are chosen empirically by benchmarking the execution time on a given + processor. The choices for N and W below were based on testing on Intel Kaby + Lake i7, AMD Ryzen 7, ARM Cortex-A57, Sparc64-VII, PowerPC POWER9, and MIPS64 + Octeon II processors. The Intel, AMD, and ARM processors were all fastest + with N=5, W=8. The Sparc, PowerPC, and MIPS64 were all fastest at N=5, W=4. + They were all tested with either gcc or clang, all using the -O3 optimization + level. Your mileage may vary. + */ + +/* Define N */ +#ifdef Z_TESTN +# define N Z_TESTN +#else +# define N 5 +#endif +#if N < 1 || N > 6 +# error N must be in 1..6 +#endif + +/* + crc_t must be at least 32 bits. word_t must be at least as long as + crc_t. It is assumed here that word_t is either 32 bits or 64 bits, and + that bytes are eight bits. + */ + +/* + Define W and the associated word_t type. If W is not defined, then a + braided calculation is not used, and the associated tables and code are not + compiled. + */ +#ifdef CDROM_TESTW +# if CDROM_TESTW-1 != -1 +# define W CDROM_TESTW +# endif +#else +# ifdef MAKECRCH +# define W 8 /* required for MAKECRCH */ +# else +# if defined(__x86_64__) || defined(__aarch64__) +# define W 8 +# else +# define W 4 +# endif +# endif +#endif +#ifdef W +# if W == 8 + typedef uint64_t word_t; +# else +# undef W +# define W 4 + typedef uint32_t word_t; +# endif +#endif + +/* + #ifdef this out because that code path does not currently produce the + correct results. + */ +#ifdef USE_ARMCRC32 +/* If available, use the ARM processor CRC32 instruction. */ +#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8 +# define ARMCRC32 +#endif +#endif + +#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) +/* + Swap the bytes in a word_t to convert between little and big endian. Any + self-respecting compiler will optimize this to a single machine byte-swap + instruction, if one is available. This assumes that word_t is either 32 bits + or 64 bits. + */ +static word_t byte_swap(word_t word) { +# if W == 8 + return + (word & 0xff00000000000000) >> 56 | + (word & 0xff000000000000) >> 40 | + (word & 0xff0000000000) >> 24 | + (word & 0xff00000000) >> 8 | + (word & 0xff000000) << 8 | + (word & 0xff0000) << 24 | + (word & 0xff00) << 40 | + (word & 0xff) << 56; +# else /* W == 4 */ + return + (word & 0xff000000) >> 24 | + (word & 0xff0000) >> 8 | + (word & 0xff00) << 8 | + (word & 0xff) << 24; +# endif +} +#endif + +#ifdef DYNAMIC_CRC_TABLE +/* ========================================================================= + * Table of powers of x for combining CRC-32s, filled in by make_crc_table() + * below. + */ + static crc_t x2n_table[32]; +#else +/* ========================================================================= + * Tables for byte-wise and braided CRC-32 calculations, and a table of powers + * of x for combining CRC-32s, all made by make_crc_table(). + */ +# include "crc32.h" +#endif + +/* CRC polynomial. */ +// #define POLY 0xedb88320 /* p(x) reflected, with x^32 implied */ +#define POLY 0xd8018001 /* p(x) reflected, with x^32 implied */ + +#ifdef DYNAMIC_CRC_TABLE +/* ========================================================================= + * Build the tables for byte-wise and braided CRC-32 calculations, and a table + * of powers of x for combining CRC-32s. + */ +static crc_t crc_table[256]; +#ifdef W + static word_t crc_big_table[256]; + static crc_t crc_braid_table[W][256]; + static word_t crc_braid_big_table[W][256]; + static void braid(crc_t [][256], word_t [][256], int, int); +#endif +#ifdef MAKECRCH + static void write_table(FILE *, const crc_t *, int); + static void write_table32hi(FILE *, const word_t *, int); + static void write_table64(FILE *, const word_t *, int); +#endif /* MAKECRCH */ + +/* + Define a once() function depending on the availability of atomics. If this is + compiled with DYNAMIC_CRC_TABLE defined, and if CRCs will be computed in + multiple threads, and if atomics are not available, then get_crc_table() must + be called to initialize the tables and must return before any threads are + allowed to compute or combine CRCs. + */ + +/* Definition of once functionality. */ +typedef struct once_s once_t; + +/* Check for the availability of atomics. */ +#if defined(__STDC__) && __STDC_VERSION__ >= 201112L && \ + !defined(__STDC_NO_ATOMICS__) + +#include + +/* Structure for once(), which must be initialized with ONCE_INIT. */ +struct once_s { + atomic_flag begun; + atomic_int done; +}; +#define ONCE_INIT {ATOMIC_FLAG_INIT, 0} + +/* + Run the provided init() function exactly once, even if multiple threads + invoke once() at the same time. The state must be a once_t initialized with + ONCE_INIT. + */ +static void once(once_t *state, void (*init)(void)) { + if (!atomic_load(&state->done)) { + if (atomic_flag_test_and_set(&state->begun)) + while (!atomic_load(&state->done)) + ; + else { + init(); + atomic_store(&state->done, 1); + } + } +} + +#else /* no atomics */ + +/* Structure for once(), which must be initialized with ONCE_INIT. */ +struct once_s { + volatile int begun; + volatile int done; +}; +#define ONCE_INIT {0, 0} + +/* Test and set. Alas, not atomic, but tries to minimize the period of + vulnerability. */ +static int test_and_set(int volatile *flag) { + int was; + + was = *flag; + *flag = 1; + return was; +} + +/* Run the provided init() function once. This is not thread-safe. */ +static void once(once_t *state, void (*init)(void)) { + if (!state->done) { + if (test_and_set(&state->begun)) + while (!state->done) + ; + else { + init(); + state->done = 1; + } + } +} + +#endif + +/* State for once(). */ +static once_t made = ONCE_INIT; + +/* + Generate tables for a byte-wise 32-bit CRC calculation on the polynomial: + x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. + + Polynomials over GF(2) are represented in binary, one bit per coefficient, + with the lowest powers in the most significant bit. Then adding polynomials + is just exclusive-or, and multiplying a polynomial by x is a right shift by + one. If we call the above polynomial p, and represent a byte as the + polynomial q, also with the lowest power in the most significant bit (so the + byte 0xb1 is the polynomial x^7+x^3+x^2+1), then the CRC is (q*x^32) mod p, + where a mod b means the remainder after dividing a by b. + + This calculation is done using the shift-register method of multiplying and + taking the remainder. The register is initialized to zero, and for each + incoming bit, x^32 is added mod p to the register if the bit is a one (where + x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by x + (which is shifting right by one and adding x^32 mod p if the bit shifted out + is a one). We start with the highest power (least significant bit) of q and + repeat for all eight bits of q. + + The table is simply the CRC of all possible eight bit values. This is all the + information needed to generate CRCs on data a byte at a time for all + combinations of CRC register values and incoming bytes. + */ + +static void make_crc_table(void) { + unsigned i, j, n; + crc_t p; + + /* initialize the CRC of bytes tables */ + for (i = 0; i < 256; i++) { + p = i; + for (j = 0; j < 8; j++) + p = p & 1 ? (p >> 1) ^ POLY : p >> 1; + crc_table[i] = p; +#ifdef W + crc_big_table[i] = byte_swap(p); +#endif + } + + /* initialize the x^2^n mod p(x) table */ + p = (crc_t) 1 << 30; /* x^1 */ + x2n_table[0] = p; + for (n = 1; n < 32; n++) + x2n_table[n] = p = multmodp(p, p); + +#ifdef W + /* initialize the braiding tables -- needs x2n_table[] */ + braid(crc_braid_table, crc_braid_big_table, N, W); +#endif + +#ifdef MAKECRCH + { + /* + The crc32.h header file contains tables for both 32-bit and 64-bit + word_t's, and so requires a 64-bit type be available. In that + case, word_t must be defined to be 64-bits. This code then also + generates and writes out the tables for the case that word_t is + 32 bits. + */ +#if !defined(W) || W != 8 +# error Need a 64-bit integer type in order to generate crc32.h. +#endif + FILE *out; + int k, n; + crc_t ltl[8][256]; + word_t big[8][256]; + + out = fopen("crc32.h", "w"); + if (out == NULL) return; + + /* write out little-endian CRC table to crc32.h */ + fprintf(out, + "/* crc32.h -- tables for rapid CRC calculation\n" + " * Generated automatically by crc32.c\n */\n" + "\n" + "static const crc_t crc_table[] = {\n" + " "); + write_table(out, crc_table, 256); + fprintf(out, + "};\n"); + + /* write out big-endian CRC table for 64-bit word_t to crc32.h */ + fprintf(out, + "\n" + "#ifdef W\n" + "\n" + "#if W == 8\n" + "\n" + "static const word_t crc_big_table[] = {\n" + " "); + write_table64(out, crc_big_table, 256); + fprintf(out, + "};\n"); + + /* write out big-endian CRC table for 32-bit word_t to crc32.h */ + fprintf(out, + "\n" + "#else /* W == 4 */\n" + "\n" + "static const word_t crc_big_table[] = {\n" + " "); + write_table32hi(out, crc_big_table, 256); + fprintf(out, + "};\n" + "\n" + "#endif\n"); + + /* write out braid tables for each value of N */ + for (n = 1; n <= 6; n++) { + fprintf(out, + "\n" + "#if N == %d\n", n); + + /* compute braid tables for this N and 64-bit word_t */ + braid(ltl, big, n, 8); + + /* write out braid tables for 64-bit word_t to crc32.h */ + fprintf(out, + "\n" + "#if W == 8\n" + "\n" + "static const crc_t crc_braid_table[][256] = {\n"); + for (k = 0; k < 8; k++) { + fprintf(out, " {"); + write_table(out, ltl[k], 256); + fprintf(out, "}%s", k < 7 ? ",\n" : ""); + } + fprintf(out, + "};\n" + "\n" + "static const word_t crc_braid_big_table[][256] = {\n"); + for (k = 0; k < 8; k++) { + fprintf(out, " {"); + write_table64(out, big[k], 256); + fprintf(out, "}%s", k < 7 ? ",\n" : ""); + } + fprintf(out, + "};\n"); + + /* compute braid tables for this N and 32-bit word_t */ + braid(ltl, big, n, 4); + + /* write out braid tables for 32-bit word_t to crc32.h */ + fprintf(out, + "\n" + "#else /* W == 4 */\n" + "\n" + "static const crc_t crc_braid_table[][256] = {\n"); + for (k = 0; k < 4; k++) { + fprintf(out, " {"); + write_table(out, ltl[k], 256); + fprintf(out, "}%s", k < 3 ? ",\n" : ""); + } + fprintf(out, + "};\n" + "\n" + "static const word_t crc_braid_big_table[][256] = {\n"); + for (k = 0; k < 4; k++) { + fprintf(out, " {"); + write_table32hi(out, big[k], 256); + fprintf(out, "}%s", k < 3 ? ",\n" : ""); + } + fprintf(out, + "};\n" + "\n" + "#endif\n" + "\n" + "#endif\n"); + } + fprintf(out, + "\n" + "#endif\n"); + + /* write out zeros operator table to crc32.h */ + fprintf(out, + "\n" + "static const crc_t x2n_table[] = {\n" + " "); + write_table(out, x2n_table, 32); + fprintf(out, + "};\n"); + fclose(out); + } +#endif /* MAKECRCH */ +} + +#ifdef MAKECRCH + +/* + Write the 32-bit values in table[0..k-1] to out, five per line in + hexadecimal separated by commas. + */ +static void write_table(FILE *out, const crc_t *table, int k) { + int n; + + for (n = 0; n < k; n++) + fprintf(out, "%s0x%08lx%s", n == 0 || n % 5 ? "" : " ", + (unsigned long)(table[n]), + n == k - 1 ? "" : (n % 5 == 4 ? ",\n" : ", ")); +} + +/* + Write the high 32-bits of each value in table[0..k-1] to out, five per line + in hexadecimal separated by commas. + */ +static void write_table32hi(FILE *out, const word_t *table, int k) { + int n; + + for (n = 0; n < k; n++) + fprintf(out, "%s0x%08lx%s", n == 0 || n % 5 ? "" : " ", + (unsigned long)(table[n] >> 32), + n == k - 1 ? "" : (n % 5 == 4 ? ",\n" : ", ")); +} + +/* + Write the 64-bit values in table[0..k-1] to out, three per line in + hexadecimal separated by commas. This assumes that if there is a 64-bit + type, then there is also a long long integer type, and it is at least 64 + bits. If not, then the type cast and format string can be adjusted + accordingly. + */ +static void write_table64(FILE *out, const word_t *table, int k) { + int n; + + for (n = 0; n < k; n++) + fprintf(out, "%s0x%016llx%s", n == 0 || n % 3 ? "" : " ", + (unsigned long long)(table[n]), + n == k - 1 ? "" : (n % 3 == 2 ? ",\n" : ", ")); +} + +/* Actually do the deed. */ +int main(void) { + make_crc_table(); + return 0; +} + +#endif /* MAKECRCH */ + +#ifdef W +/* + Generate the little and big-endian braid tables for the given n and word_t + size w. Each array must have room for w blocks of 256 elements. + */ +static void braid(crc_t ltl[][256], word_t big[][256], int n, int w) { + int k; + crc_t i, p, q; + for (k = 0; k < w; k++) { + p = x2nmodp((n * w + 3 - k) << 3, 0); + ltl[k][0] = 0; + big[w - 1 - k][0] = 0; + for (i = 1; i < 256; i++) { + ltl[k][i] = q = multmodp(i << 24, p); + big[w - 1 - k][i] = byte_swap(q); + } + } +} +#endif + +#endif /* DYNAMIC_CRC_TABLE */ + +/* ========================================================================= + * Use ARM machine instructions if available. This will compute the CRC about + * ten times faster than the braided calculation. This code does not check for + * the presence of the CRC instruction at run time. __ARM_FEATURE_CRC32 will + * only be defined if the compilation specifies an ARM processor architecture + * that has the instructions. For example, compiling with -march=armv8.1-a or + * -march=armv8-a+crc, or -march=native if the compile machine has the crc32 + * instructions. + */ +#ifdef ARMCRC32 + +/* + Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial, + reflected. For speed, this requires that a not be zero. + */ +static crc_t multmodp(crc_t a, crc_t b) { + crc_t m, p; + + m = (crc_t)1 << 31; + p = 0; + for (;;) { + if (a & m) { + p ^= b; + if ((a & (m - 1)) == 0) + break; + } + m >>= 1; + b = b & 1 ? (b >> 1) ^ POLY : b >> 1; + } + return p; +} + +/* + Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been + initialized. + */ +static crc_t x2nmodp(off64_t n, unsigned k) { + crc_t p; + + p = (crc_t)1 << 31; /* x^0 == 1 */ + while (n) { + if (n & 1) + p = multmodp(x2n_table[k & 31], p); + n >>= 1; + k++; + } + return p; +} + +/* + Constants empirically determined to maximize speed. These values are from + measurements on a Cortex-A57. Your mileage may vary. + */ +#define Z_BATCH 3990 /* number of words in a batch */ +#define Z_BATCH_ZEROS 0xa10d3d0c /* computed from Z_BATCH = 3990 */ +#define Z_BATCH_MIN 800 /* fewest words in a final batch */ + +uint32_t cdrom_crc32(unsigned long crc, const unsigned char *buf, + size_t len) { + crc_t val; + word_t crc1, crc2; + const word_t *word; + word_t val0, val1, val2; + size_t last, last2, i; + size_t num; + + /* Return initial CRC, if requested. */ + if (buf == NULL) + return 0; + +#ifdef DYNAMIC_CRC_TABLE + once(&made, make_crc_table); +#endif /* DYNAMIC_CRC_TABLE */ + + /* Pre-condition the CRC */ + crc = (~crc) & 0xffffffff; + + /* Compute the CRC up to a word boundary. */ + while (len && ((size_t) buf & 7) != 0) { + len--; + val = *buf++; + __asm__ volatile("crc32b %w0, %w0, %w1" : "+r"(crc) : "r"(val)); + } + + /* Prepare to compute the CRC on full 64-bit words word[0..num-1]. */ + word = (word_t const *)buf; + num = len >> 3; + len &= 7; + + /* Do three interleaved CRCs to realize the throughput of one crc32x + instruction per cycle. Each CRC is calculated on Z_BATCH words. The + three CRCs are combined into a single CRC after each set of batches. */ + while (num >= 3 * Z_BATCH) { + crc1 = 0; + crc2 = 0; + for (i = 0; i < Z_BATCH; i++) { + val0 = word[i]; + val1 = word[i + Z_BATCH]; + val2 = word[i + 2 * Z_BATCH]; + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0)); + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc1) : "r"(val1)); + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc2) : "r"(val2)); + } + word += 3 * Z_BATCH; + num -= 3 * Z_BATCH; + crc = multmodp(Z_BATCH_ZEROS, crc) ^ crc1; + crc = multmodp(Z_BATCH_ZEROS, crc) ^ crc2; + } + + /* Do one last smaller batch with the remaining words, if there are enough + to pay for the combination of CRCs. */ + last = num / 3; + if (last >= Z_BATCH_MIN) { + last2 = last << 1; + crc1 = 0; + crc2 = 0; + for (i = 0; i < last; i++) { + val0 = word[i]; + val1 = word[i + last]; + val2 = word[i + last2]; + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0)); + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc1) : "r"(val1)); + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc2) : "r"(val2)); + } + word += 3 * last; + num -= 3 * last; + val = x2nmodp(last, 6); + crc = multmodp(val, crc) ^ crc1; + crc = multmodp(val, crc) ^ crc2; + } + + /* Compute the CRC on any remaining words. */ + for (i = 0; i < num; i++) { + val0 = word[i]; + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0)); + } + word += num; + + /* Complete the CRC on any remaining bytes. */ + buf = (const unsigned char *) word; + while (len) { + len--; + val = *buf++; + __asm__ volatile("crc32b %w0, %w0, %w1" : "+r"(crc) : "r"(val)); + } + + /* Return the CRC, post-conditioned. */ + return crc ^ 0xffffffff; +} + +#else + +#ifdef W + +/* + Return the CRC of the W bytes in the word_t data, taking the + least-significant byte of the word as the first byte of data, without any pre + or post conditioning. This is used to combine the CRCs of each braid. + */ +static crc_t crc_word(word_t data) { + int k; + for (k = 0; k < W; k++) + data = (data >> 8) ^ crc_table[data & 0xff]; + return (crc_t) data; +} + +static word_t crc_word_big(word_t data) { + int k; + for (k = 0; k < W; k++) + data = (data << 8) ^ + crc_big_table[(data >> ((W - 1) << 3)) & 0xff]; + return data; +} + +#endif + +/* ========================================================================= */ +unsigned long cdrom_crc32(unsigned long crc, const unsigned char *buf, + size_t len) { + /* Return initial CRC, if requested. */ + if (buf == NULL) + return 0; + +#ifdef DYNAMIC_CRC_TABLE + once(&made, make_crc_table); +#endif /* DYNAMIC_CRC_TABLE */ + + /* Pre-condition the CRC */ + crc = (~crc) & 0xffffffff; + +#ifdef W + + /* If provided enough bytes, do a braided CRC calculation. */ + if (len >= N * W + W - 1) { + size_t blks; + word_t const *words; + unsigned endian; + int k; + + /* Compute the CRC up to a word_t boundary. */ + while (len && ((size_t) buf & (W - 1)) != 0) { + len--; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + } + + /* Compute the CRC on as many N word_t blocks as are available. */ + blks = len / (N * W); + len -= blks * N * W; + words = (word_t const *)buf; + + /* Do endian check at execution time instead of compile time, since ARM + processors can change the endianness at execution time. If the + compiler knows what the endianness will be, it can optimize out the + check and the unused branch. */ + endian = 1; + if (*(unsigned char *)&endian) { + /* Little endian. */ + + crc_t crc0; + word_t word0; +#if N > 1 + crc_t crc1; + word_t word1; +#if N > 2 + crc_t crc2; + word_t word2; +#if N > 3 + crc_t crc3; + word_t word3; +#if N > 4 + crc_t crc4; + word_t word4; +#if N > 5 + crc_t crc5; + word_t word5; +#endif +#endif +#endif +#endif +#endif + + /* Initialize the CRC for each braid. */ + crc0 = crc; +#if N > 1 + crc1 = 0; +#if N > 2 + crc2 = 0; +#if N > 3 + crc3 = 0; +#if N > 4 + crc4 = 0; +#if N > 5 + crc5 = 0; +#endif +#endif +#endif +#endif +#endif + + /* + Process the first blks-1 blocks, computing the CRCs on each braid + independently. + */ + while (--blks) { + /* Load the word for each braid into registers. */ + word0 = crc0 ^ words[0]; +#if N > 1 + word1 = crc1 ^ words[1]; +#if N > 2 + word2 = crc2 ^ words[2]; +#if N > 3 + word3 = crc3 ^ words[3]; +#if N > 4 + word4 = crc4 ^ words[4]; +#if N > 5 + word5 = crc5 ^ words[5]; +#endif +#endif +#endif +#endif +#endif + words += N; + + /* Compute and update the CRC for each word. The loop should + get unrolled. */ + crc0 = crc_braid_table[0][word0 & 0xff]; +#if N > 1 + crc1 = crc_braid_table[0][word1 & 0xff]; +#if N > 2 + crc2 = crc_braid_table[0][word2 & 0xff]; +#if N > 3 + crc3 = crc_braid_table[0][word3 & 0xff]; +#if N > 4 + crc4 = crc_braid_table[0][word4 & 0xff]; +#if N > 5 + crc5 = crc_braid_table[0][word5 & 0xff]; +#endif +#endif +#endif +#endif +#endif + for (k = 1; k < W; k++) { + crc0 ^= crc_braid_table[k][(word0 >> (k << 3)) & 0xff]; +#if N > 1 + crc1 ^= crc_braid_table[k][(word1 >> (k << 3)) & 0xff]; +#if N > 2 + crc2 ^= crc_braid_table[k][(word2 >> (k << 3)) & 0xff]; +#if N > 3 + crc3 ^= crc_braid_table[k][(word3 >> (k << 3)) & 0xff]; +#if N > 4 + crc4 ^= crc_braid_table[k][(word4 >> (k << 3)) & 0xff]; +#if N > 5 + crc5 ^= crc_braid_table[k][(word5 >> (k << 3)) & 0xff]; +#endif +#endif +#endif +#endif +#endif + } + } + + /* + Process the last block, combining the CRCs of the N braids at the + same time. + */ + crc = crc_word(crc0 ^ words[0]); +#if N > 1 + crc = crc_word(crc1 ^ words[1] ^ crc); +#if N > 2 + crc = crc_word(crc2 ^ words[2] ^ crc); +#if N > 3 + crc = crc_word(crc3 ^ words[3] ^ crc); +#if N > 4 + crc = crc_word(crc4 ^ words[4] ^ crc); +#if N > 5 + crc = crc_word(crc5 ^ words[5] ^ crc); +#endif +#endif +#endif +#endif +#endif + words += N; + } + else { + /* Big endian. */ + + word_t crc0, word0, comb; +#if N > 1 + word_t crc1, word1; +#if N > 2 + word_t crc2, word2; +#if N > 3 + word_t crc3, word3; +#if N > 4 + word_t crc4, word4; +#if N > 5 + word_t crc5, word5; +#endif +#endif +#endif +#endif +#endif + + /* Initialize the CRC for each braid. */ + crc0 = byte_swap(crc); +#if N > 1 + crc1 = 0; +#if N > 2 + crc2 = 0; +#if N > 3 + crc3 = 0; +#if N > 4 + crc4 = 0; +#if N > 5 + crc5 = 0; +#endif +#endif +#endif +#endif +#endif + + /* + Process the first blks-1 blocks, computing the CRCs on each braid + independently. + */ + while (--blks) { + /* Load the word for each braid into registers. */ + word0 = crc0 ^ words[0]; +#if N > 1 + word1 = crc1 ^ words[1]; +#if N > 2 + word2 = crc2 ^ words[2]; +#if N > 3 + word3 = crc3 ^ words[3]; +#if N > 4 + word4 = crc4 ^ words[4]; +#if N > 5 + word5 = crc5 ^ words[5]; +#endif +#endif +#endif +#endif +#endif + words += N; + + /* Compute and update the CRC for each word. The loop should + get unrolled. */ + crc0 = crc_braid_big_table[0][word0 & 0xff]; +#if N > 1 + crc1 = crc_braid_big_table[0][word1 & 0xff]; +#if N > 2 + crc2 = crc_braid_big_table[0][word2 & 0xff]; +#if N > 3 + crc3 = crc_braid_big_table[0][word3 & 0xff]; +#if N > 4 + crc4 = crc_braid_big_table[0][word4 & 0xff]; +#if N > 5 + crc5 = crc_braid_big_table[0][word5 & 0xff]; +#endif +#endif +#endif +#endif +#endif + for (k = 1; k < W; k++) { + crc0 ^= crc_braid_big_table[k][(word0 >> (k << 3)) & 0xff]; +#if N > 1 + crc1 ^= crc_braid_big_table[k][(word1 >> (k << 3)) & 0xff]; +#if N > 2 + crc2 ^= crc_braid_big_table[k][(word2 >> (k << 3)) & 0xff]; +#if N > 3 + crc3 ^= crc_braid_big_table[k][(word3 >> (k << 3)) & 0xff]; +#if N > 4 + crc4 ^= crc_braid_big_table[k][(word4 >> (k << 3)) & 0xff]; +#if N > 5 + crc5 ^= crc_braid_big_table[k][(word5 >> (k << 3)) & 0xff]; +#endif +#endif +#endif +#endif +#endif + } + } + + /* + Process the last block, combining the CRCs of the N braids at the + same time. + */ + comb = crc_word_big(crc0 ^ words[0]); +#if N > 1 + comb = crc_word_big(crc1 ^ words[1] ^ comb); +#if N > 2 + comb = crc_word_big(crc2 ^ words[2] ^ comb); +#if N > 3 + comb = crc_word_big(crc3 ^ words[3] ^ comb); +#if N > 4 + comb = crc_word_big(crc4 ^ words[4] ^ comb); +#if N > 5 + comb = crc_word_big(crc5 ^ words[5] ^ comb); +#endif +#endif +#endif +#endif +#endif + words += N; + crc = byte_swap(comb); + } + + /* + Update the pointer to the remaining bytes to process. + */ + buf = (unsigned char const *)words; + } + +#endif /* W */ + + /* Complete the computation of the CRC on any remaining bytes. */ + while (len >= 8) { + len -= 8; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + } + while (len) { + len--; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + } + + /* Return the CRC, post-conditioned. */ + return crc ^ 0xffffffff; +} + +#endif diff --git a/src/utils/crc32.h b/src/utils/crc32.h new file mode 100644 index 000000000..d4bf86c5a --- /dev/null +++ b/src/utils/crc32.h @@ -0,0 +1,9448 @@ +/* crc32.h -- tables for rapid CRC calculation + * Generated automatically by crc32.c + */ + +typedef uint32_t crc_t; + +static const crc_t crc_table[] = { + 0x00000000, 0x90910101, 0x91210201, 0x01b00300, 0x92410401, + 0x02d00500, 0x03600600, 0x93f10701, 0x94810801, 0x04100900, + 0x05a00a00, 0x95310b01, 0x06c00c00, 0x96510d01, 0x97e10e01, + 0x07700f00, 0x99011001, 0x09901100, 0x08201200, 0x98b11301, + 0x0b401400, 0x9bd11501, 0x9a611601, 0x0af01700, 0x0d801800, + 0x9d111901, 0x9ca11a01, 0x0c301b00, 0x9fc11c01, 0x0f501d00, + 0x0ee01e00, 0x9e711f01, 0x82012001, 0x12902100, 0x13202200, + 0x83b12301, 0x10402400, 0x80d12501, 0x81612601, 0x11f02700, + 0x16802800, 0x86112901, 0x87a12a01, 0x17302b00, 0x84c12c01, + 0x14502d00, 0x15e02e00, 0x85712f01, 0x1b003000, 0x8b913101, + 0x8a213201, 0x1ab03300, 0x89413401, 0x19d03500, 0x18603600, + 0x88f13701, 0x8f813801, 0x1f103900, 0x1ea03a00, 0x8e313b01, + 0x1dc03c00, 0x8d513d01, 0x8ce13e01, 0x1c703f00, 0xb4014001, + 0x24904100, 0x25204200, 0xb5b14301, 0x26404400, 0xb6d14501, + 0xb7614601, 0x27f04700, 0x20804800, 0xb0114901, 0xb1a14a01, + 0x21304b00, 0xb2c14c01, 0x22504d00, 0x23e04e00, 0xb3714f01, + 0x2d005000, 0xbd915101, 0xbc215201, 0x2cb05300, 0xbf415401, + 0x2fd05500, 0x2e605600, 0xbef15701, 0xb9815801, 0x29105900, + 0x28a05a00, 0xb8315b01, 0x2bc05c00, 0xbb515d01, 0xbae15e01, + 0x2a705f00, 0x36006000, 0xa6916101, 0xa7216201, 0x37b06300, + 0xa4416401, 0x34d06500, 0x35606600, 0xa5f16701, 0xa2816801, + 0x32106900, 0x33a06a00, 0xa3316b01, 0x30c06c00, 0xa0516d01, + 0xa1e16e01, 0x31706f00, 0xaf017001, 0x3f907100, 0x3e207200, + 0xaeb17301, 0x3d407400, 0xadd17501, 0xac617601, 0x3cf07700, + 0x3b807800, 0xab117901, 0xaaa17a01, 0x3a307b00, 0xa9c17c01, + 0x39507d00, 0x38e07e00, 0xa8717f01, 0xd8018001, 0x48908100, + 0x49208200, 0xd9b18301, 0x4a408400, 0xdad18501, 0xdb618601, + 0x4bf08700, 0x4c808800, 0xdc118901, 0xdda18a01, 0x4d308b00, + 0xdec18c01, 0x4e508d00, 0x4fe08e00, 0xdf718f01, 0x41009000, + 0xd1919101, 0xd0219201, 0x40b09300, 0xd3419401, 0x43d09500, + 0x42609600, 0xd2f19701, 0xd5819801, 0x45109900, 0x44a09a00, + 0xd4319b01, 0x47c09c00, 0xd7519d01, 0xd6e19e01, 0x46709f00, + 0x5a00a000, 0xca91a101, 0xcb21a201, 0x5bb0a300, 0xc841a401, + 0x58d0a500, 0x5960a600, 0xc9f1a701, 0xce81a801, 0x5e10a900, + 0x5fa0aa00, 0xcf31ab01, 0x5cc0ac00, 0xcc51ad01, 0xcde1ae01, + 0x5d70af00, 0xc301b001, 0x5390b100, 0x5220b200, 0xc2b1b301, + 0x5140b400, 0xc1d1b501, 0xc061b601, 0x50f0b700, 0x5780b800, + 0xc711b901, 0xc6a1ba01, 0x5630bb00, 0xc5c1bc01, 0x5550bd00, + 0x54e0be00, 0xc471bf01, 0x6c00c000, 0xfc91c101, 0xfd21c201, + 0x6db0c300, 0xfe41c401, 0x6ed0c500, 0x6f60c600, 0xfff1c701, + 0xf881c801, 0x6810c900, 0x69a0ca00, 0xf931cb01, 0x6ac0cc00, + 0xfa51cd01, 0xfbe1ce01, 0x6b70cf00, 0xf501d001, 0x6590d100, + 0x6420d200, 0xf4b1d301, 0x6740d400, 0xf7d1d501, 0xf661d601, + 0x66f0d700, 0x6180d800, 0xf111d901, 0xf0a1da01, 0x6030db00, + 0xf3c1dc01, 0x6350dd00, 0x62e0de00, 0xf271df01, 0xee01e001, + 0x7e90e100, 0x7f20e200, 0xefb1e301, 0x7c40e400, 0xecd1e501, + 0xed61e601, 0x7df0e700, 0x7a80e800, 0xea11e901, 0xeba1ea01, + 0x7b30eb00, 0xe8c1ec01, 0x7850ed00, 0x79e0ee00, 0xe971ef01, + 0x7700f000, 0xe791f101, 0xe621f201, 0x76b0f300, 0xe541f401, + 0x75d0f500, 0x7460f600, 0xe4f1f701, 0xe381f801, 0x7310f900, + 0x72a0fa00, 0xe231fb01, 0x71c0fc00, 0xe151fd01, 0xe0e1fe01, + 0x7070ff00}; + +#ifdef W + +#if W == 8 + +static const word_t crc_big_table[] = { + 0x0000000000000000, 0x0101919000000000, 0x0102219100000000, + 0x0003b00100000000, 0x0104419200000000, 0x0005d00200000000, + 0x0006600300000000, 0x0107f19300000000, 0x0108819400000000, + 0x0009100400000000, 0x000aa00500000000, 0x010b319500000000, + 0x000cc00600000000, 0x010d519600000000, 0x010ee19700000000, + 0x000f700700000000, 0x0110019900000000, 0x0011900900000000, + 0x0012200800000000, 0x0113b19800000000, 0x0014400b00000000, + 0x0115d19b00000000, 0x0116619a00000000, 0x0017f00a00000000, + 0x0018800d00000000, 0x0119119d00000000, 0x011aa19c00000000, + 0x001b300c00000000, 0x011cc19f00000000, 0x001d500f00000000, + 0x001ee00e00000000, 0x011f719e00000000, 0x0120018200000000, + 0x0021901200000000, 0x0022201300000000, 0x0123b18300000000, + 0x0024401000000000, 0x0125d18000000000, 0x0126618100000000, + 0x0027f01100000000, 0x0028801600000000, 0x0129118600000000, + 0x012aa18700000000, 0x002b301700000000, 0x012cc18400000000, + 0x002d501400000000, 0x002ee01500000000, 0x012f718500000000, + 0x0030001b00000000, 0x0131918b00000000, 0x0132218a00000000, + 0x0033b01a00000000, 0x0134418900000000, 0x0035d01900000000, + 0x0036601800000000, 0x0137f18800000000, 0x0138818f00000000, + 0x0039101f00000000, 0x003aa01e00000000, 0x013b318e00000000, + 0x003cc01d00000000, 0x013d518d00000000, 0x013ee18c00000000, + 0x003f701c00000000, 0x014001b400000000, 0x0041902400000000, + 0x0042202500000000, 0x0143b1b500000000, 0x0044402600000000, + 0x0145d1b600000000, 0x014661b700000000, 0x0047f02700000000, + 0x0048802000000000, 0x014911b000000000, 0x014aa1b100000000, + 0x004b302100000000, 0x014cc1b200000000, 0x004d502200000000, + 0x004ee02300000000, 0x014f71b300000000, 0x0050002d00000000, + 0x015191bd00000000, 0x015221bc00000000, 0x0053b02c00000000, + 0x015441bf00000000, 0x0055d02f00000000, 0x0056602e00000000, + 0x0157f1be00000000, 0x015881b900000000, 0x0059102900000000, + 0x005aa02800000000, 0x015b31b800000000, 0x005cc02b00000000, + 0x015d51bb00000000, 0x015ee1ba00000000, 0x005f702a00000000, + 0x0060003600000000, 0x016191a600000000, 0x016221a700000000, + 0x0063b03700000000, 0x016441a400000000, 0x0065d03400000000, + 0x0066603500000000, 0x0167f1a500000000, 0x016881a200000000, + 0x0069103200000000, 0x006aa03300000000, 0x016b31a300000000, + 0x006cc03000000000, 0x016d51a000000000, 0x016ee1a100000000, + 0x006f703100000000, 0x017001af00000000, 0x0071903f00000000, + 0x0072203e00000000, 0x0173b1ae00000000, 0x0074403d00000000, + 0x0175d1ad00000000, 0x017661ac00000000, 0x0077f03c00000000, + 0x0078803b00000000, 0x017911ab00000000, 0x017aa1aa00000000, + 0x007b303a00000000, 0x017cc1a900000000, 0x007d503900000000, + 0x007ee03800000000, 0x017f71a800000000, 0x018001d800000000, + 0x0081904800000000, 0x0082204900000000, 0x0183b1d900000000, + 0x0084404a00000000, 0x0185d1da00000000, 0x018661db00000000, + 0x0087f04b00000000, 0x0088804c00000000, 0x018911dc00000000, + 0x018aa1dd00000000, 0x008b304d00000000, 0x018cc1de00000000, + 0x008d504e00000000, 0x008ee04f00000000, 0x018f71df00000000, + 0x0090004100000000, 0x019191d100000000, 0x019221d000000000, + 0x0093b04000000000, 0x019441d300000000, 0x0095d04300000000, + 0x0096604200000000, 0x0197f1d200000000, 0x019881d500000000, + 0x0099104500000000, 0x009aa04400000000, 0x019b31d400000000, + 0x009cc04700000000, 0x019d51d700000000, 0x019ee1d600000000, + 0x009f704600000000, 0x00a0005a00000000, 0x01a191ca00000000, + 0x01a221cb00000000, 0x00a3b05b00000000, 0x01a441c800000000, + 0x00a5d05800000000, 0x00a6605900000000, 0x01a7f1c900000000, + 0x01a881ce00000000, 0x00a9105e00000000, 0x00aaa05f00000000, + 0x01ab31cf00000000, 0x00acc05c00000000, 0x01ad51cc00000000, + 0x01aee1cd00000000, 0x00af705d00000000, 0x01b001c300000000, + 0x00b1905300000000, 0x00b2205200000000, 0x01b3b1c200000000, + 0x00b4405100000000, 0x01b5d1c100000000, 0x01b661c000000000, + 0x00b7f05000000000, 0x00b8805700000000, 0x01b911c700000000, + 0x01baa1c600000000, 0x00bb305600000000, 0x01bcc1c500000000, + 0x00bd505500000000, 0x00bee05400000000, 0x01bf71c400000000, + 0x00c0006c00000000, 0x01c191fc00000000, 0x01c221fd00000000, + 0x00c3b06d00000000, 0x01c441fe00000000, 0x00c5d06e00000000, + 0x00c6606f00000000, 0x01c7f1ff00000000, 0x01c881f800000000, + 0x00c9106800000000, 0x00caa06900000000, 0x01cb31f900000000, + 0x00ccc06a00000000, 0x01cd51fa00000000, 0x01cee1fb00000000, + 0x00cf706b00000000, 0x01d001f500000000, 0x00d1906500000000, + 0x00d2206400000000, 0x01d3b1f400000000, 0x00d4406700000000, + 0x01d5d1f700000000, 0x01d661f600000000, 0x00d7f06600000000, + 0x00d8806100000000, 0x01d911f100000000, 0x01daa1f000000000, + 0x00db306000000000, 0x01dcc1f300000000, 0x00dd506300000000, + 0x00dee06200000000, 0x01df71f200000000, 0x01e001ee00000000, + 0x00e1907e00000000, 0x00e2207f00000000, 0x01e3b1ef00000000, + 0x00e4407c00000000, 0x01e5d1ec00000000, 0x01e661ed00000000, + 0x00e7f07d00000000, 0x00e8807a00000000, 0x01e911ea00000000, + 0x01eaa1eb00000000, 0x00eb307b00000000, 0x01ecc1e800000000, + 0x00ed507800000000, 0x00eee07900000000, 0x01ef71e900000000, + 0x00f0007700000000, 0x01f191e700000000, 0x01f221e600000000, + 0x00f3b07600000000, 0x01f441e500000000, 0x00f5d07500000000, + 0x00f6607400000000, 0x01f7f1e400000000, 0x01f881e300000000, + 0x00f9107300000000, 0x00faa07200000000, 0x01fb31e200000000, + 0x00fcc07100000000, 0x01fd51e100000000, 0x01fee1e000000000, + 0x00ff707000000000}; + +#else /* W == 4 */ + +static const word_t crc_big_table[] = { + 0x00000000, 0x01019190, 0x01022191, 0x0003b001, 0x01044192, + 0x0005d002, 0x00066003, 0x0107f193, 0x01088194, 0x00091004, + 0x000aa005, 0x010b3195, 0x000cc006, 0x010d5196, 0x010ee197, + 0x000f7007, 0x01100199, 0x00119009, 0x00122008, 0x0113b198, + 0x0014400b, 0x0115d19b, 0x0116619a, 0x0017f00a, 0x0018800d, + 0x0119119d, 0x011aa19c, 0x001b300c, 0x011cc19f, 0x001d500f, + 0x001ee00e, 0x011f719e, 0x01200182, 0x00219012, 0x00222013, + 0x0123b183, 0x00244010, 0x0125d180, 0x01266181, 0x0027f011, + 0x00288016, 0x01291186, 0x012aa187, 0x002b3017, 0x012cc184, + 0x002d5014, 0x002ee015, 0x012f7185, 0x0030001b, 0x0131918b, + 0x0132218a, 0x0033b01a, 0x01344189, 0x0035d019, 0x00366018, + 0x0137f188, 0x0138818f, 0x0039101f, 0x003aa01e, 0x013b318e, + 0x003cc01d, 0x013d518d, 0x013ee18c, 0x003f701c, 0x014001b4, + 0x00419024, 0x00422025, 0x0143b1b5, 0x00444026, 0x0145d1b6, + 0x014661b7, 0x0047f027, 0x00488020, 0x014911b0, 0x014aa1b1, + 0x004b3021, 0x014cc1b2, 0x004d5022, 0x004ee023, 0x014f71b3, + 0x0050002d, 0x015191bd, 0x015221bc, 0x0053b02c, 0x015441bf, + 0x0055d02f, 0x0056602e, 0x0157f1be, 0x015881b9, 0x00591029, + 0x005aa028, 0x015b31b8, 0x005cc02b, 0x015d51bb, 0x015ee1ba, + 0x005f702a, 0x00600036, 0x016191a6, 0x016221a7, 0x0063b037, + 0x016441a4, 0x0065d034, 0x00666035, 0x0167f1a5, 0x016881a2, + 0x00691032, 0x006aa033, 0x016b31a3, 0x006cc030, 0x016d51a0, + 0x016ee1a1, 0x006f7031, 0x017001af, 0x0071903f, 0x0072203e, + 0x0173b1ae, 0x0074403d, 0x0175d1ad, 0x017661ac, 0x0077f03c, + 0x0078803b, 0x017911ab, 0x017aa1aa, 0x007b303a, 0x017cc1a9, + 0x007d5039, 0x007ee038, 0x017f71a8, 0x018001d8, 0x00819048, + 0x00822049, 0x0183b1d9, 0x0084404a, 0x0185d1da, 0x018661db, + 0x0087f04b, 0x0088804c, 0x018911dc, 0x018aa1dd, 0x008b304d, + 0x018cc1de, 0x008d504e, 0x008ee04f, 0x018f71df, 0x00900041, + 0x019191d1, 0x019221d0, 0x0093b040, 0x019441d3, 0x0095d043, + 0x00966042, 0x0197f1d2, 0x019881d5, 0x00991045, 0x009aa044, + 0x019b31d4, 0x009cc047, 0x019d51d7, 0x019ee1d6, 0x009f7046, + 0x00a0005a, 0x01a191ca, 0x01a221cb, 0x00a3b05b, 0x01a441c8, + 0x00a5d058, 0x00a66059, 0x01a7f1c9, 0x01a881ce, 0x00a9105e, + 0x00aaa05f, 0x01ab31cf, 0x00acc05c, 0x01ad51cc, 0x01aee1cd, + 0x00af705d, 0x01b001c3, 0x00b19053, 0x00b22052, 0x01b3b1c2, + 0x00b44051, 0x01b5d1c1, 0x01b661c0, 0x00b7f050, 0x00b88057, + 0x01b911c7, 0x01baa1c6, 0x00bb3056, 0x01bcc1c5, 0x00bd5055, + 0x00bee054, 0x01bf71c4, 0x00c0006c, 0x01c191fc, 0x01c221fd, + 0x00c3b06d, 0x01c441fe, 0x00c5d06e, 0x00c6606f, 0x01c7f1ff, + 0x01c881f8, 0x00c91068, 0x00caa069, 0x01cb31f9, 0x00ccc06a, + 0x01cd51fa, 0x01cee1fb, 0x00cf706b, 0x01d001f5, 0x00d19065, + 0x00d22064, 0x01d3b1f4, 0x00d44067, 0x01d5d1f7, 0x01d661f6, + 0x00d7f066, 0x00d88061, 0x01d911f1, 0x01daa1f0, 0x00db3060, + 0x01dcc1f3, 0x00dd5063, 0x00dee062, 0x01df71f2, 0x01e001ee, + 0x00e1907e, 0x00e2207f, 0x01e3b1ef, 0x00e4407c, 0x01e5d1ec, + 0x01e661ed, 0x00e7f07d, 0x00e8807a, 0x01e911ea, 0x01eaa1eb, + 0x00eb307b, 0x01ecc1e8, 0x00ed5078, 0x00eee079, 0x01ef71e9, + 0x00f00077, 0x01f191e7, 0x01f221e6, 0x00f3b076, 0x01f441e5, + 0x00f5d075, 0x00f66074, 0x01f7f1e4, 0x01f881e3, 0x00f91073, + 0x00faa072, 0x01fb31e2, 0x00fcc071, 0x01fd51e1, 0x01fee1e0, + 0x00ff7070}; + +#endif + +#if N == 1 + +#if W == 8 + +static const crc_t crc_braid_table[][256] = { + {0x00000000, 0x65904101, 0xcb208202, 0xaeb0c303, 0x26420407, + 0x43d24506, 0xed628605, 0x88f2c704, 0x4c84080e, 0x2914490f, + 0x87a48a0c, 0xe234cb0d, 0x6ac60c09, 0x0f564d08, 0xa1e68e0b, + 0xc476cf0a, 0x9908101c, 0xfc98511d, 0x5228921e, 0x37b8d31f, + 0xbf4a141b, 0xdada551a, 0x746a9619, 0x11fad718, 0xd58c1812, + 0xb01c5913, 0x1eac9a10, 0x7b3cdb11, 0xf3ce1c15, 0x965e5d14, + 0x38ee9e17, 0x5d7edf16, 0x8213203b, 0xe783613a, 0x4933a239, + 0x2ca3e338, 0xa451243c, 0xc1c1653d, 0x6f71a63e, 0x0ae1e73f, + 0xce972835, 0xab076934, 0x05b7aa37, 0x6027eb36, 0xe8d52c32, + 0x8d456d33, 0x23f5ae30, 0x4665ef31, 0x1b1b3027, 0x7e8b7126, + 0xd03bb225, 0xb5abf324, 0x3d593420, 0x58c97521, 0xf679b622, + 0x93e9f723, 0x579f3829, 0x320f7928, 0x9cbfba2b, 0xf92ffb2a, + 0x71dd3c2e, 0x144d7d2f, 0xbafdbe2c, 0xdf6dff2d, 0xb4254075, + 0xd1b50174, 0x7f05c277, 0x1a958376, 0x92674472, 0xf7f70573, + 0x5947c670, 0x3cd78771, 0xf8a1487b, 0x9d31097a, 0x3381ca79, + 0x56118b78, 0xdee34c7c, 0xbb730d7d, 0x15c3ce7e, 0x70538f7f, + 0x2d2d5069, 0x48bd1168, 0xe60dd26b, 0x839d936a, 0x0b6f546e, + 0x6eff156f, 0xc04fd66c, 0xa5df976d, 0x61a95867, 0x04391966, + 0xaa89da65, 0xcf199b64, 0x47eb5c60, 0x227b1d61, 0x8ccbde62, + 0xe95b9f63, 0x3636604e, 0x53a6214f, 0xfd16e24c, 0x9886a34d, + 0x10746449, 0x75e42548, 0xdb54e64b, 0xbec4a74a, 0x7ab26840, + 0x1f222941, 0xb192ea42, 0xd402ab43, 0x5cf06c47, 0x39602d46, + 0x97d0ee45, 0xf240af44, 0xaf3e7052, 0xcaae3153, 0x641ef250, + 0x018eb351, 0x897c7455, 0xecec3554, 0x425cf657, 0x27ccb756, + 0xe3ba785c, 0x862a395d, 0x289afa5e, 0x4d0abb5f, 0xc5f87c5b, + 0xa0683d5a, 0x0ed8fe59, 0x6b48bf58, 0xd84980e9, 0xbdd9c1e8, + 0x136902eb, 0x76f943ea, 0xfe0b84ee, 0x9b9bc5ef, 0x352b06ec, + 0x50bb47ed, 0x94cd88e7, 0xf15dc9e6, 0x5fed0ae5, 0x3a7d4be4, + 0xb28f8ce0, 0xd71fcde1, 0x79af0ee2, 0x1c3f4fe3, 0x414190f5, + 0x24d1d1f4, 0x8a6112f7, 0xeff153f6, 0x670394f2, 0x0293d5f3, + 0xac2316f0, 0xc9b357f1, 0x0dc598fb, 0x6855d9fa, 0xc6e51af9, + 0xa3755bf8, 0x2b879cfc, 0x4e17ddfd, 0xe0a71efe, 0x85375fff, + 0x5a5aa0d2, 0x3fcae1d3, 0x917a22d0, 0xf4ea63d1, 0x7c18a4d5, + 0x1988e5d4, 0xb73826d7, 0xd2a867d6, 0x16dea8dc, 0x734ee9dd, + 0xddfe2ade, 0xb86e6bdf, 0x309cacdb, 0x550cedda, 0xfbbc2ed9, + 0x9e2c6fd8, 0xc352b0ce, 0xa6c2f1cf, 0x087232cc, 0x6de273cd, + 0xe510b4c9, 0x8080f5c8, 0x2e3036cb, 0x4ba077ca, 0x8fd6b8c0, + 0xea46f9c1, 0x44f63ac2, 0x21667bc3, 0xa994bcc7, 0xcc04fdc6, + 0x62b43ec5, 0x07247fc4, 0x6c6cc09c, 0x09fc819d, 0xa74c429e, + 0xc2dc039f, 0x4a2ec49b, 0x2fbe859a, 0x810e4699, 0xe49e0798, + 0x20e8c892, 0x45788993, 0xebc84a90, 0x8e580b91, 0x06aacc95, + 0x633a8d94, 0xcd8a4e97, 0xa81a0f96, 0xf564d080, 0x90f49181, + 0x3e445282, 0x5bd41383, 0xd326d487, 0xb6b69586, 0x18065685, + 0x7d961784, 0xb9e0d88e, 0xdc70998f, 0x72c05a8c, 0x17501b8d, + 0x9fa2dc89, 0xfa329d88, 0x54825e8b, 0x31121f8a, 0xee7fe0a7, + 0x8befa1a6, 0x255f62a5, 0x40cf23a4, 0xc83de4a0, 0xadada5a1, + 0x031d66a2, 0x668d27a3, 0xa2fbe8a9, 0xc76ba9a8, 0x69db6aab, + 0x0c4b2baa, 0x84b9ecae, 0xe129adaf, 0x4f996eac, 0x2a092fad, + 0x7777f0bb, 0x12e7b1ba, 0xbc5772b9, 0xd9c733b8, 0x5135f4bc, + 0x34a5b5bd, 0x9a1576be, 0xff8537bf, 0x3bf3f8b5, 0x5e63b9b4, + 0xf0d37ab7, 0x95433bb6, 0x1db1fcb2, 0x7821bdb3, 0xd6917eb0, + 0xb3013fb1}, + {0x00000000, 0x009001d1, 0x012003a2, 0x01b00273, 0x02400744, + 0x02d00695, 0x036004e6, 0x03f00537, 0x04800e88, 0x04100f59, + 0x05a00d2a, 0x05300cfb, 0x06c009cc, 0x0650081d, 0x07e00a6e, + 0x07700bbf, 0x09001d10, 0x09901cc1, 0x08201eb2, 0x08b01f63, + 0x0b401a54, 0x0bd01b85, 0x0a6019f6, 0x0af01827, 0x0d801398, + 0x0d101249, 0x0ca0103a, 0x0c3011eb, 0x0fc014dc, 0x0f50150d, + 0x0ee0177e, 0x0e7016af, 0x12003a20, 0x12903bf1, 0x13203982, + 0x13b03853, 0x10403d64, 0x10d03cb5, 0x11603ec6, 0x11f03f17, + 0x168034a8, 0x16103579, 0x17a0370a, 0x173036db, 0x14c033ec, + 0x1450323d, 0x15e0304e, 0x1570319f, 0x1b002730, 0x1b9026e1, + 0x1a202492, 0x1ab02543, 0x19402074, 0x19d021a5, 0x186023d6, + 0x18f02207, 0x1f8029b8, 0x1f102869, 0x1ea02a1a, 0x1e302bcb, + 0x1dc02efc, 0x1d502f2d, 0x1ce02d5e, 0x1c702c8f, 0x24007440, + 0x24907591, 0x252077e2, 0x25b07633, 0x26407304, 0x26d072d5, + 0x276070a6, 0x27f07177, 0x20807ac8, 0x20107b19, 0x21a0796a, + 0x213078bb, 0x22c07d8c, 0x22507c5d, 0x23e07e2e, 0x23707fff, + 0x2d006950, 0x2d906881, 0x2c206af2, 0x2cb06b23, 0x2f406e14, + 0x2fd06fc5, 0x2e606db6, 0x2ef06c67, 0x298067d8, 0x29106609, + 0x28a0647a, 0x283065ab, 0x2bc0609c, 0x2b50614d, 0x2ae0633e, + 0x2a7062ef, 0x36004e60, 0x36904fb1, 0x37204dc2, 0x37b04c13, + 0x34404924, 0x34d048f5, 0x35604a86, 0x35f04b57, 0x328040e8, + 0x32104139, 0x33a0434a, 0x3330429b, 0x30c047ac, 0x3050467d, + 0x31e0440e, 0x317045df, 0x3f005370, 0x3f9052a1, 0x3e2050d2, + 0x3eb05103, 0x3d405434, 0x3dd055e5, 0x3c605796, 0x3cf05647, + 0x3b805df8, 0x3b105c29, 0x3aa05e5a, 0x3a305f8b, 0x39c05abc, + 0x39505b6d, 0x38e0591e, 0x387058cf, 0x4800e880, 0x4890e951, + 0x4920eb22, 0x49b0eaf3, 0x4a40efc4, 0x4ad0ee15, 0x4b60ec66, + 0x4bf0edb7, 0x4c80e608, 0x4c10e7d9, 0x4da0e5aa, 0x4d30e47b, + 0x4ec0e14c, 0x4e50e09d, 0x4fe0e2ee, 0x4f70e33f, 0x4100f590, + 0x4190f441, 0x4020f632, 0x40b0f7e3, 0x4340f2d4, 0x43d0f305, + 0x4260f176, 0x42f0f0a7, 0x4580fb18, 0x4510fac9, 0x44a0f8ba, + 0x4430f96b, 0x47c0fc5c, 0x4750fd8d, 0x46e0fffe, 0x4670fe2f, + 0x5a00d2a0, 0x5a90d371, 0x5b20d102, 0x5bb0d0d3, 0x5840d5e4, + 0x58d0d435, 0x5960d646, 0x59f0d797, 0x5e80dc28, 0x5e10ddf9, + 0x5fa0df8a, 0x5f30de5b, 0x5cc0db6c, 0x5c50dabd, 0x5de0d8ce, + 0x5d70d91f, 0x5300cfb0, 0x5390ce61, 0x5220cc12, 0x52b0cdc3, + 0x5140c8f4, 0x51d0c925, 0x5060cb56, 0x50f0ca87, 0x5780c138, + 0x5710c0e9, 0x56a0c29a, 0x5630c34b, 0x55c0c67c, 0x5550c7ad, + 0x54e0c5de, 0x5470c40f, 0x6c009cc0, 0x6c909d11, 0x6d209f62, + 0x6db09eb3, 0x6e409b84, 0x6ed09a55, 0x6f609826, 0x6ff099f7, + 0x68809248, 0x68109399, 0x69a091ea, 0x6930903b, 0x6ac0950c, + 0x6a5094dd, 0x6be096ae, 0x6b70977f, 0x650081d0, 0x65908001, + 0x64208272, 0x64b083a3, 0x67408694, 0x67d08745, 0x66608536, + 0x66f084e7, 0x61808f58, 0x61108e89, 0x60a08cfa, 0x60308d2b, + 0x63c0881c, 0x635089cd, 0x62e08bbe, 0x62708a6f, 0x7e00a6e0, + 0x7e90a731, 0x7f20a542, 0x7fb0a493, 0x7c40a1a4, 0x7cd0a075, + 0x7d60a206, 0x7df0a3d7, 0x7a80a868, 0x7a10a9b9, 0x7ba0abca, + 0x7b30aa1b, 0x78c0af2c, 0x7850aefd, 0x79e0ac8e, 0x7970ad5f, + 0x7700bbf0, 0x7790ba21, 0x7620b852, 0x76b0b983, 0x7540bcb4, + 0x75d0bd65, 0x7460bf16, 0x74f0bec7, 0x7380b578, 0x7310b4a9, + 0x72a0b6da, 0x7230b70b, 0x71c0b23c, 0x7150b3ed, 0x70e0b19e, + 0x7070b04f}, + {0x00000000, 0x9001d100, 0x9000a203, 0x00017303, 0x90024405, + 0x00039505, 0x0002e606, 0x90033706, 0x90078809, 0x00065909, + 0x00072a0a, 0x9006fb0a, 0x0005cc0c, 0x90041d0c, 0x90056e0f, + 0x0004bf0f, 0x900c1011, 0x000dc111, 0x000cb212, 0x900d6312, + 0x000e5414, 0x900f8514, 0x900ef617, 0x000f2717, 0x000b9818, + 0x900a4918, 0x900b3a1b, 0x000aeb1b, 0x9009dc1d, 0x00080d1d, + 0x00097e1e, 0x9008af1e, 0x901b2021, 0x001af121, 0x001b8222, + 0x901a5322, 0x00196424, 0x9018b524, 0x9019c627, 0x00181727, + 0x001ca828, 0x901d7928, 0x901c0a2b, 0x001ddb2b, 0x901eec2d, + 0x001f3d2d, 0x001e4e2e, 0x901f9f2e, 0x00173030, 0x9016e130, + 0x90179233, 0x00164333, 0x90157435, 0x0014a535, 0x0015d636, + 0x90140736, 0x9010b839, 0x00116939, 0x00101a3a, 0x9011cb3a, + 0x0012fc3c, 0x90132d3c, 0x90125e3f, 0x00138f3f, 0x90354041, + 0x00349141, 0x0035e242, 0x90343342, 0x00370444, 0x9036d544, + 0x9037a647, 0x00367747, 0x0032c848, 0x90331948, 0x90326a4b, + 0x0033bb4b, 0x90308c4d, 0x00315d4d, 0x00302e4e, 0x9031ff4e, + 0x00395050, 0x90388150, 0x9039f253, 0x00382353, 0x903b1455, + 0x003ac555, 0x003bb656, 0x903a6756, 0x903ed859, 0x003f0959, + 0x003e7a5a, 0x903fab5a, 0x003c9c5c, 0x903d4d5c, 0x903c3e5f, + 0x003def5f, 0x002e6060, 0x902fb160, 0x902ec263, 0x002f1363, + 0x902c2465, 0x002df565, 0x002c8666, 0x902d5766, 0x9029e869, + 0x00283969, 0x00294a6a, 0x90289b6a, 0x002bac6c, 0x902a7d6c, + 0x902b0e6f, 0x002adf6f, 0x90227071, 0x0023a171, 0x0022d272, + 0x90230372, 0x00203474, 0x9021e574, 0x90209677, 0x00214777, + 0x0025f878, 0x90242978, 0x90255a7b, 0x00248b7b, 0x9027bc7d, + 0x00266d7d, 0x00271e7e, 0x9026cf7e, 0x90698081, 0x00685181, + 0x00692282, 0x9068f382, 0x006bc484, 0x906a1584, 0x906b6687, + 0x006ab787, 0x006e0888, 0x906fd988, 0x906eaa8b, 0x006f7b8b, + 0x906c4c8d, 0x006d9d8d, 0x006cee8e, 0x906d3f8e, 0x00659090, + 0x90644190, 0x90653293, 0x0064e393, 0x9067d495, 0x00660595, + 0x00677696, 0x9066a796, 0x90621899, 0x0063c999, 0x0062ba9a, + 0x90636b9a, 0x00605c9c, 0x90618d9c, 0x9060fe9f, 0x00612f9f, + 0x0072a0a0, 0x907371a0, 0x907202a3, 0x0073d3a3, 0x9070e4a5, + 0x007135a5, 0x007046a6, 0x907197a6, 0x907528a9, 0x0074f9a9, + 0x00758aaa, 0x90745baa, 0x00776cac, 0x9076bdac, 0x9077ceaf, + 0x00761faf, 0x907eb0b1, 0x007f61b1, 0x007e12b2, 0x907fc3b2, + 0x007cf4b4, 0x907d25b4, 0x907c56b7, 0x007d87b7, 0x007938b8, + 0x9078e9b8, 0x90799abb, 0x00784bbb, 0x907b7cbd, 0x007aadbd, + 0x007bdebe, 0x907a0fbe, 0x005cc0c0, 0x905d11c0, 0x905c62c3, + 0x005db3c3, 0x905e84c5, 0x005f55c5, 0x005e26c6, 0x905ff7c6, + 0x905b48c9, 0x005a99c9, 0x005beaca, 0x905a3bca, 0x00590ccc, + 0x9058ddcc, 0x9059aecf, 0x00587fcf, 0x9050d0d1, 0x005101d1, + 0x005072d2, 0x9051a3d2, 0x005294d4, 0x905345d4, 0x905236d7, + 0x0053e7d7, 0x005758d8, 0x905689d8, 0x9057fadb, 0x00562bdb, + 0x90551cdd, 0x0054cddd, 0x0055bede, 0x90546fde, 0x9047e0e1, + 0x004631e1, 0x004742e2, 0x904693e2, 0x0045a4e4, 0x904475e4, + 0x904506e7, 0x0044d7e7, 0x004068e8, 0x9041b9e8, 0x9040caeb, + 0x00411beb, 0x90422ced, 0x0043fded, 0x00428eee, 0x90435fee, + 0x004bf0f0, 0x904a21f0, 0x904b52f3, 0x004a83f3, 0x9049b4f5, + 0x004865f5, 0x004916f6, 0x9048c7f6, 0x904c78f9, 0x004da9f9, + 0x004cdafa, 0x904d0bfa, 0x004e3cfc, 0x904fedfc, 0x904e9eff, + 0x004f4fff}, + {0x00000000, 0x90d00101, 0x91a30201, 0x01730300, 0x93450401, + 0x03950500, 0x02e60600, 0x92360701, 0x96890801, 0x06590900, + 0x072a0a00, 0x97fa0b01, 0x05cc0c00, 0x951c0d01, 0x946f0e01, + 0x04bf0f00, 0x9d111001, 0x0dc11100, 0x0cb21200, 0x9c621301, + 0x0e541400, 0x9e841501, 0x9ff71601, 0x0f271700, 0x0b981800, + 0x9b481901, 0x9a3b1a01, 0x0aeb1b00, 0x98dd1c01, 0x080d1d00, + 0x097e1e00, 0x99ae1f01, 0x8a212001, 0x1af12100, 0x1b822200, + 0x8b522301, 0x19642400, 0x89b42501, 0x88c72601, 0x18172700, + 0x1ca82800, 0x8c782901, 0x8d0b2a01, 0x1ddb2b00, 0x8fed2c01, + 0x1f3d2d00, 0x1e4e2e00, 0x8e9e2f01, 0x17303000, 0x87e03101, + 0x86933201, 0x16433300, 0x84753401, 0x14a53500, 0x15d63600, + 0x85063701, 0x81b93801, 0x11693900, 0x101a3a00, 0x80ca3b01, + 0x12fc3c00, 0x822c3d01, 0x835f3e01, 0x138f3f00, 0xa4414001, + 0x34914100, 0x35e24200, 0xa5324301, 0x37044400, 0xa7d44501, + 0xa6a74601, 0x36774700, 0x32c84800, 0xa2184901, 0xa36b4a01, + 0x33bb4b00, 0xa18d4c01, 0x315d4d00, 0x302e4e00, 0xa0fe4f01, + 0x39505000, 0xa9805101, 0xa8f35201, 0x38235300, 0xaa155401, + 0x3ac55500, 0x3bb65600, 0xab665701, 0xafd95801, 0x3f095900, + 0x3e7a5a00, 0xaeaa5b01, 0x3c9c5c00, 0xac4c5d01, 0xad3f5e01, + 0x3def5f00, 0x2e606000, 0xbeb06101, 0xbfc36201, 0x2f136300, + 0xbd256401, 0x2df56500, 0x2c866600, 0xbc566701, 0xb8e96801, + 0x28396900, 0x294a6a00, 0xb99a6b01, 0x2bac6c00, 0xbb7c6d01, + 0xba0f6e01, 0x2adf6f00, 0xb3717001, 0x23a17100, 0x22d27200, + 0xb2027301, 0x20347400, 0xb0e47501, 0xb1977601, 0x21477700, + 0x25f87800, 0xb5287901, 0xb45b7a01, 0x248b7b00, 0xb6bd7c01, + 0x266d7d00, 0x271e7e00, 0xb7ce7f01, 0xf8818001, 0x68518100, + 0x69228200, 0xf9f28301, 0x6bc48400, 0xfb148501, 0xfa678601, + 0x6ab78700, 0x6e088800, 0xfed88901, 0xffab8a01, 0x6f7b8b00, + 0xfd4d8c01, 0x6d9d8d00, 0x6cee8e00, 0xfc3e8f01, 0x65909000, + 0xf5409101, 0xf4339201, 0x64e39300, 0xf6d59401, 0x66059500, + 0x67769600, 0xf7a69701, 0xf3199801, 0x63c99900, 0x62ba9a00, + 0xf26a9b01, 0x605c9c00, 0xf08c9d01, 0xf1ff9e01, 0x612f9f00, + 0x72a0a000, 0xe270a101, 0xe303a201, 0x73d3a300, 0xe1e5a401, + 0x7135a500, 0x7046a600, 0xe096a701, 0xe429a801, 0x74f9a900, + 0x758aaa00, 0xe55aab01, 0x776cac00, 0xe7bcad01, 0xe6cfae01, + 0x761faf00, 0xefb1b001, 0x7f61b100, 0x7e12b200, 0xeec2b301, + 0x7cf4b400, 0xec24b501, 0xed57b601, 0x7d87b700, 0x7938b800, + 0xe9e8b901, 0xe89bba01, 0x784bbb00, 0xea7dbc01, 0x7aadbd00, + 0x7bdebe00, 0xeb0ebf01, 0x5cc0c000, 0xcc10c101, 0xcd63c201, + 0x5db3c300, 0xcf85c401, 0x5f55c500, 0x5e26c600, 0xcef6c701, + 0xca49c801, 0x5a99c900, 0x5beaca00, 0xcb3acb01, 0x590ccc00, + 0xc9dccd01, 0xc8afce01, 0x587fcf00, 0xc1d1d001, 0x5101d100, + 0x5072d200, 0xc0a2d301, 0x5294d400, 0xc244d501, 0xc337d601, + 0x53e7d700, 0x5758d800, 0xc788d901, 0xc6fbda01, 0x562bdb00, + 0xc41ddc01, 0x54cddd00, 0x55bede00, 0xc56edf01, 0xd6e1e001, + 0x4631e100, 0x4742e200, 0xd792e301, 0x45a4e400, 0xd574e501, + 0xd407e601, 0x44d7e700, 0x4068e800, 0xd0b8e901, 0xd1cbea01, + 0x411beb00, 0xd32dec01, 0x43fded00, 0x428eee00, 0xd25eef01, + 0x4bf0f000, 0xdb20f101, 0xda53f201, 0x4a83f300, 0xd8b5f401, + 0x4865f500, 0x4916f600, 0xd9c6f701, 0xdd79f801, 0x4da9f900, + 0x4cdafa00, 0xdc0afb01, 0x4e3cfc00, 0xdeecfd01, 0xdf9ffe01, + 0x4f4fff00}, + {0x00000000, 0x41000001, 0x82000002, 0xc3000003, 0xb4030007, + 0xf5030006, 0x36030005, 0x77030004, 0xd805000d, 0x9905000c, + 0x5a05000f, 0x1b05000e, 0x6c06000a, 0x2d06000b, 0xee060008, + 0xaf060009, 0x00090019, 0x41090018, 0x8209001b, 0xc309001a, + 0xb40a001e, 0xf50a001f, 0x360a001c, 0x770a001d, 0xd80c0014, + 0x990c0015, 0x5a0c0016, 0x1b0c0017, 0x6c0f0013, 0x2d0f0012, + 0xee0f0011, 0xaf0f0010, 0x00120032, 0x41120033, 0x82120030, + 0xc3120031, 0xb4110035, 0xf5110034, 0x36110037, 0x77110036, + 0xd817003f, 0x9917003e, 0x5a17003d, 0x1b17003c, 0x6c140038, + 0x2d140039, 0xee14003a, 0xaf14003b, 0x001b002b, 0x411b002a, + 0x821b0029, 0xc31b0028, 0xb418002c, 0xf518002d, 0x3618002e, + 0x7718002f, 0xd81e0026, 0x991e0027, 0x5a1e0024, 0x1b1e0025, + 0x6c1d0021, 0x2d1d0020, 0xee1d0023, 0xaf1d0022, 0x00240064, + 0x41240065, 0x82240066, 0xc3240067, 0xb4270063, 0xf5270062, + 0x36270061, 0x77270060, 0xd8210069, 0x99210068, 0x5a21006b, + 0x1b21006a, 0x6c22006e, 0x2d22006f, 0xee22006c, 0xaf22006d, + 0x002d007d, 0x412d007c, 0x822d007f, 0xc32d007e, 0xb42e007a, + 0xf52e007b, 0x362e0078, 0x772e0079, 0xd8280070, 0x99280071, + 0x5a280072, 0x1b280073, 0x6c2b0077, 0x2d2b0076, 0xee2b0075, + 0xaf2b0074, 0x00360056, 0x41360057, 0x82360054, 0xc3360055, + 0xb4350051, 0xf5350050, 0x36350053, 0x77350052, 0xd833005b, + 0x9933005a, 0x5a330059, 0x1b330058, 0x6c30005c, 0x2d30005d, + 0xee30005e, 0xaf30005f, 0x003f004f, 0x413f004e, 0x823f004d, + 0xc33f004c, 0xb43c0048, 0xf53c0049, 0x363c004a, 0x773c004b, + 0xd83a0042, 0x993a0043, 0x5a3a0040, 0x1b3a0041, 0x6c390045, + 0x2d390044, 0xee390047, 0xaf390046, 0x004800c8, 0x414800c9, + 0x824800ca, 0xc34800cb, 0xb44b00cf, 0xf54b00ce, 0x364b00cd, + 0x774b00cc, 0xd84d00c5, 0x994d00c4, 0x5a4d00c7, 0x1b4d00c6, + 0x6c4e00c2, 0x2d4e00c3, 0xee4e00c0, 0xaf4e00c1, 0x004100d1, + 0x414100d0, 0x824100d3, 0xc34100d2, 0xb44200d6, 0xf54200d7, + 0x364200d4, 0x774200d5, 0xd84400dc, 0x994400dd, 0x5a4400de, + 0x1b4400df, 0x6c4700db, 0x2d4700da, 0xee4700d9, 0xaf4700d8, + 0x005a00fa, 0x415a00fb, 0x825a00f8, 0xc35a00f9, 0xb45900fd, + 0xf55900fc, 0x365900ff, 0x775900fe, 0xd85f00f7, 0x995f00f6, + 0x5a5f00f5, 0x1b5f00f4, 0x6c5c00f0, 0x2d5c00f1, 0xee5c00f2, + 0xaf5c00f3, 0x005300e3, 0x415300e2, 0x825300e1, 0xc35300e0, + 0xb45000e4, 0xf55000e5, 0x365000e6, 0x775000e7, 0xd85600ee, + 0x995600ef, 0x5a5600ec, 0x1b5600ed, 0x6c5500e9, 0x2d5500e8, + 0xee5500eb, 0xaf5500ea, 0x006c00ac, 0x416c00ad, 0x826c00ae, + 0xc36c00af, 0xb46f00ab, 0xf56f00aa, 0x366f00a9, 0x776f00a8, + 0xd86900a1, 0x996900a0, 0x5a6900a3, 0x1b6900a2, 0x6c6a00a6, + 0x2d6a00a7, 0xee6a00a4, 0xaf6a00a5, 0x006500b5, 0x416500b4, + 0x826500b7, 0xc36500b6, 0xb46600b2, 0xf56600b3, 0x366600b0, + 0x776600b1, 0xd86000b8, 0x996000b9, 0x5a6000ba, 0x1b6000bb, + 0x6c6300bf, 0x2d6300be, 0xee6300bd, 0xaf6300bc, 0x007e009e, + 0x417e009f, 0x827e009c, 0xc37e009d, 0xb47d0099, 0xf57d0098, + 0x367d009b, 0x777d009a, 0xd87b0093, 0x997b0092, 0x5a7b0091, + 0x1b7b0090, 0x6c780094, 0x2d780095, 0xee780096, 0xaf780097, + 0x00770087, 0x41770086, 0x82770085, 0xc3770084, 0xb4740080, + 0xf5740081, 0x36740082, 0x77740083, 0xd872008a, 0x9972008b, + 0x5a720088, 0x1b720089, 0x6c71008d, 0x2d71008c, 0xee71008f, + 0xaf71008e}, + {0x00000000, 0x00900190, 0x01200320, 0x01b002b0, 0x02400640, + 0x02d007d0, 0x03600560, 0x03f004f0, 0x04800c80, 0x04100d10, + 0x05a00fa0, 0x05300e30, 0x06c00ac0, 0x06500b50, 0x07e009e0, + 0x07700870, 0x09001900, 0x09901890, 0x08201a20, 0x08b01bb0, + 0x0b401f40, 0x0bd01ed0, 0x0a601c60, 0x0af01df0, 0x0d801580, + 0x0d101410, 0x0ca016a0, 0x0c301730, 0x0fc013c0, 0x0f501250, + 0x0ee010e0, 0x0e701170, 0x12003200, 0x12903390, 0x13203120, + 0x13b030b0, 0x10403440, 0x10d035d0, 0x11603760, 0x11f036f0, + 0x16803e80, 0x16103f10, 0x17a03da0, 0x17303c30, 0x14c038c0, + 0x14503950, 0x15e03be0, 0x15703a70, 0x1b002b00, 0x1b902a90, + 0x1a202820, 0x1ab029b0, 0x19402d40, 0x19d02cd0, 0x18602e60, + 0x18f02ff0, 0x1f802780, 0x1f102610, 0x1ea024a0, 0x1e302530, + 0x1dc021c0, 0x1d502050, 0x1ce022e0, 0x1c702370, 0x24006400, + 0x24906590, 0x25206720, 0x25b066b0, 0x26406240, 0x26d063d0, + 0x27606160, 0x27f060f0, 0x20806880, 0x20106910, 0x21a06ba0, + 0x21306a30, 0x22c06ec0, 0x22506f50, 0x23e06de0, 0x23706c70, + 0x2d007d00, 0x2d907c90, 0x2c207e20, 0x2cb07fb0, 0x2f407b40, + 0x2fd07ad0, 0x2e607860, 0x2ef079f0, 0x29807180, 0x29107010, + 0x28a072a0, 0x28307330, 0x2bc077c0, 0x2b507650, 0x2ae074e0, + 0x2a707570, 0x36005600, 0x36905790, 0x37205520, 0x37b054b0, + 0x34405040, 0x34d051d0, 0x35605360, 0x35f052f0, 0x32805a80, + 0x32105b10, 0x33a059a0, 0x33305830, 0x30c05cc0, 0x30505d50, + 0x31e05fe0, 0x31705e70, 0x3f004f00, 0x3f904e90, 0x3e204c20, + 0x3eb04db0, 0x3d404940, 0x3dd048d0, 0x3c604a60, 0x3cf04bf0, + 0x3b804380, 0x3b104210, 0x3aa040a0, 0x3a304130, 0x39c045c0, + 0x39504450, 0x38e046e0, 0x38704770, 0x4800c800, 0x4890c990, + 0x4920cb20, 0x49b0cab0, 0x4a40ce40, 0x4ad0cfd0, 0x4b60cd60, + 0x4bf0ccf0, 0x4c80c480, 0x4c10c510, 0x4da0c7a0, 0x4d30c630, + 0x4ec0c2c0, 0x4e50c350, 0x4fe0c1e0, 0x4f70c070, 0x4100d100, + 0x4190d090, 0x4020d220, 0x40b0d3b0, 0x4340d740, 0x43d0d6d0, + 0x4260d460, 0x42f0d5f0, 0x4580dd80, 0x4510dc10, 0x44a0dea0, + 0x4430df30, 0x47c0dbc0, 0x4750da50, 0x46e0d8e0, 0x4670d970, + 0x5a00fa00, 0x5a90fb90, 0x5b20f920, 0x5bb0f8b0, 0x5840fc40, + 0x58d0fdd0, 0x5960ff60, 0x59f0fef0, 0x5e80f680, 0x5e10f710, + 0x5fa0f5a0, 0x5f30f430, 0x5cc0f0c0, 0x5c50f150, 0x5de0f3e0, + 0x5d70f270, 0x5300e300, 0x5390e290, 0x5220e020, 0x52b0e1b0, + 0x5140e540, 0x51d0e4d0, 0x5060e660, 0x50f0e7f0, 0x5780ef80, + 0x5710ee10, 0x56a0eca0, 0x5630ed30, 0x55c0e9c0, 0x5550e850, + 0x54e0eae0, 0x5470eb70, 0x6c00ac00, 0x6c90ad90, 0x6d20af20, + 0x6db0aeb0, 0x6e40aa40, 0x6ed0abd0, 0x6f60a960, 0x6ff0a8f0, + 0x6880a080, 0x6810a110, 0x69a0a3a0, 0x6930a230, 0x6ac0a6c0, + 0x6a50a750, 0x6be0a5e0, 0x6b70a470, 0x6500b500, 0x6590b490, + 0x6420b620, 0x64b0b7b0, 0x6740b340, 0x67d0b2d0, 0x6660b060, + 0x66f0b1f0, 0x6180b980, 0x6110b810, 0x60a0baa0, 0x6030bb30, + 0x63c0bfc0, 0x6350be50, 0x62e0bce0, 0x6270bd70, 0x7e009e00, + 0x7e909f90, 0x7f209d20, 0x7fb09cb0, 0x7c409840, 0x7cd099d0, + 0x7d609b60, 0x7df09af0, 0x7a809280, 0x7a109310, 0x7ba091a0, + 0x7b309030, 0x78c094c0, 0x78509550, 0x79e097e0, 0x79709670, + 0x77008700, 0x77908690, 0x76208420, 0x76b085b0, 0x75408140, + 0x75d080d0, 0x74608260, 0x74f083f0, 0x73808b80, 0x73108a10, + 0x72a088a0, 0x72308930, 0x71c08dc0, 0x71508c50, 0x70e08ee0, + 0x70708f70}, + {0x00000000, 0x90019000, 0x90002003, 0x0001b003, 0x90034005, + 0x0002d005, 0x00036006, 0x9002f006, 0x90058009, 0x00041009, + 0x0005a00a, 0x9004300a, 0x0006c00c, 0x9007500c, 0x9006e00f, + 0x0007700f, 0x90080011, 0x00099011, 0x00082012, 0x9009b012, + 0x000b4014, 0x900ad014, 0x900b6017, 0x000af017, 0x000d8018, + 0x900c1018, 0x900da01b, 0x000c301b, 0x900ec01d, 0x000f501d, + 0x000ee01e, 0x900f701e, 0x90130021, 0x00129021, 0x00132022, + 0x9012b022, 0x00104024, 0x9011d024, 0x90106027, 0x0011f027, + 0x00168028, 0x90171028, 0x9016a02b, 0x0017302b, 0x9015c02d, + 0x0014502d, 0x0015e02e, 0x9014702e, 0x001b0030, 0x901a9030, + 0x901b2033, 0x001ab033, 0x90184035, 0x0019d035, 0x00186036, + 0x9019f036, 0x901e8039, 0x001f1039, 0x001ea03a, 0x901f303a, + 0x001dc03c, 0x901c503c, 0x901de03f, 0x001c703f, 0x90250041, + 0x00249041, 0x00252042, 0x9024b042, 0x00264044, 0x9027d044, + 0x90266047, 0x0027f047, 0x00208048, 0x90211048, 0x9020a04b, + 0x0021304b, 0x9023c04d, 0x0022504d, 0x0023e04e, 0x9022704e, + 0x002d0050, 0x902c9050, 0x902d2053, 0x002cb053, 0x902e4055, + 0x002fd055, 0x002e6056, 0x902ff056, 0x90288059, 0x00291059, + 0x0028a05a, 0x9029305a, 0x002bc05c, 0x902a505c, 0x902be05f, + 0x002a705f, 0x00360060, 0x90379060, 0x90362063, 0x0037b063, + 0x90354065, 0x0034d065, 0x00356066, 0x9034f066, 0x90338069, + 0x00321069, 0x0033a06a, 0x9032306a, 0x0030c06c, 0x9031506c, + 0x9030e06f, 0x0031706f, 0x903e0071, 0x003f9071, 0x003e2072, + 0x903fb072, 0x003d4074, 0x903cd074, 0x903d6077, 0x003cf077, + 0x003b8078, 0x903a1078, 0x903ba07b, 0x003a307b, 0x9038c07d, + 0x0039507d, 0x0038e07e, 0x9039707e, 0x90490081, 0x00489081, + 0x00492082, 0x9048b082, 0x004a4084, 0x904bd084, 0x904a6087, + 0x004bf087, 0x004c8088, 0x904d1088, 0x904ca08b, 0x004d308b, + 0x904fc08d, 0x004e508d, 0x004fe08e, 0x904e708e, 0x00410090, + 0x90409090, 0x90412093, 0x0040b093, 0x90424095, 0x0043d095, + 0x00426096, 0x9043f096, 0x90448099, 0x00451099, 0x0044a09a, + 0x9045309a, 0x0047c09c, 0x9046509c, 0x9047e09f, 0x0046709f, + 0x005a00a0, 0x905b90a0, 0x905a20a3, 0x005bb0a3, 0x905940a5, + 0x0058d0a5, 0x005960a6, 0x9058f0a6, 0x905f80a9, 0x005e10a9, + 0x005fa0aa, 0x905e30aa, 0x005cc0ac, 0x905d50ac, 0x905ce0af, + 0x005d70af, 0x905200b1, 0x005390b1, 0x005220b2, 0x9053b0b2, + 0x005140b4, 0x9050d0b4, 0x905160b7, 0x0050f0b7, 0x005780b8, + 0x905610b8, 0x9057a0bb, 0x005630bb, 0x9054c0bd, 0x005550bd, + 0x0054e0be, 0x905570be, 0x006c00c0, 0x906d90c0, 0x906c20c3, + 0x006db0c3, 0x906f40c5, 0x006ed0c5, 0x006f60c6, 0x906ef0c6, + 0x906980c9, 0x006810c9, 0x0069a0ca, 0x906830ca, 0x006ac0cc, + 0x906b50cc, 0x906ae0cf, 0x006b70cf, 0x906400d1, 0x006590d1, + 0x006420d2, 0x9065b0d2, 0x006740d4, 0x9066d0d4, 0x906760d7, + 0x0066f0d7, 0x006180d8, 0x906010d8, 0x9061a0db, 0x006030db, + 0x9062c0dd, 0x006350dd, 0x0062e0de, 0x906370de, 0x907f00e1, + 0x007e90e1, 0x007f20e2, 0x907eb0e2, 0x007c40e4, 0x907dd0e4, + 0x907c60e7, 0x007df0e7, 0x007a80e8, 0x907b10e8, 0x907aa0eb, + 0x007b30eb, 0x9079c0ed, 0x007850ed, 0x0079e0ee, 0x907870ee, + 0x007700f0, 0x907690f0, 0x907720f3, 0x0076b0f3, 0x907440f5, + 0x0075d0f5, 0x007460f6, 0x9075f0f6, 0x907280f9, 0x007310f9, + 0x0072a0fa, 0x907330fa, 0x0071c0fc, 0x907050fc, 0x9071e0ff, + 0x007070ff}, + {0x00000000, 0x90910101, 0x91210201, 0x01b00300, 0x92410401, + 0x02d00500, 0x03600600, 0x93f10701, 0x94810801, 0x04100900, + 0x05a00a00, 0x95310b01, 0x06c00c00, 0x96510d01, 0x97e10e01, + 0x07700f00, 0x99011001, 0x09901100, 0x08201200, 0x98b11301, + 0x0b401400, 0x9bd11501, 0x9a611601, 0x0af01700, 0x0d801800, + 0x9d111901, 0x9ca11a01, 0x0c301b00, 0x9fc11c01, 0x0f501d00, + 0x0ee01e00, 0x9e711f01, 0x82012001, 0x12902100, 0x13202200, + 0x83b12301, 0x10402400, 0x80d12501, 0x81612601, 0x11f02700, + 0x16802800, 0x86112901, 0x87a12a01, 0x17302b00, 0x84c12c01, + 0x14502d00, 0x15e02e00, 0x85712f01, 0x1b003000, 0x8b913101, + 0x8a213201, 0x1ab03300, 0x89413401, 0x19d03500, 0x18603600, + 0x88f13701, 0x8f813801, 0x1f103900, 0x1ea03a00, 0x8e313b01, + 0x1dc03c00, 0x8d513d01, 0x8ce13e01, 0x1c703f00, 0xb4014001, + 0x24904100, 0x25204200, 0xb5b14301, 0x26404400, 0xb6d14501, + 0xb7614601, 0x27f04700, 0x20804800, 0xb0114901, 0xb1a14a01, + 0x21304b00, 0xb2c14c01, 0x22504d00, 0x23e04e00, 0xb3714f01, + 0x2d005000, 0xbd915101, 0xbc215201, 0x2cb05300, 0xbf415401, + 0x2fd05500, 0x2e605600, 0xbef15701, 0xb9815801, 0x29105900, + 0x28a05a00, 0xb8315b01, 0x2bc05c00, 0xbb515d01, 0xbae15e01, + 0x2a705f00, 0x36006000, 0xa6916101, 0xa7216201, 0x37b06300, + 0xa4416401, 0x34d06500, 0x35606600, 0xa5f16701, 0xa2816801, + 0x32106900, 0x33a06a00, 0xa3316b01, 0x30c06c00, 0xa0516d01, + 0xa1e16e01, 0x31706f00, 0xaf017001, 0x3f907100, 0x3e207200, + 0xaeb17301, 0x3d407400, 0xadd17501, 0xac617601, 0x3cf07700, + 0x3b807800, 0xab117901, 0xaaa17a01, 0x3a307b00, 0xa9c17c01, + 0x39507d00, 0x38e07e00, 0xa8717f01, 0xd8018001, 0x48908100, + 0x49208200, 0xd9b18301, 0x4a408400, 0xdad18501, 0xdb618601, + 0x4bf08700, 0x4c808800, 0xdc118901, 0xdda18a01, 0x4d308b00, + 0xdec18c01, 0x4e508d00, 0x4fe08e00, 0xdf718f01, 0x41009000, + 0xd1919101, 0xd0219201, 0x40b09300, 0xd3419401, 0x43d09500, + 0x42609600, 0xd2f19701, 0xd5819801, 0x45109900, 0x44a09a00, + 0xd4319b01, 0x47c09c00, 0xd7519d01, 0xd6e19e01, 0x46709f00, + 0x5a00a000, 0xca91a101, 0xcb21a201, 0x5bb0a300, 0xc841a401, + 0x58d0a500, 0x5960a600, 0xc9f1a701, 0xce81a801, 0x5e10a900, + 0x5fa0aa00, 0xcf31ab01, 0x5cc0ac00, 0xcc51ad01, 0xcde1ae01, + 0x5d70af00, 0xc301b001, 0x5390b100, 0x5220b200, 0xc2b1b301, + 0x5140b400, 0xc1d1b501, 0xc061b601, 0x50f0b700, 0x5780b800, + 0xc711b901, 0xc6a1ba01, 0x5630bb00, 0xc5c1bc01, 0x5550bd00, + 0x54e0be00, 0xc471bf01, 0x6c00c000, 0xfc91c101, 0xfd21c201, + 0x6db0c300, 0xfe41c401, 0x6ed0c500, 0x6f60c600, 0xfff1c701, + 0xf881c801, 0x6810c900, 0x69a0ca00, 0xf931cb01, 0x6ac0cc00, + 0xfa51cd01, 0xfbe1ce01, 0x6b70cf00, 0xf501d001, 0x6590d100, + 0x6420d200, 0xf4b1d301, 0x6740d400, 0xf7d1d501, 0xf661d601, + 0x66f0d700, 0x6180d800, 0xf111d901, 0xf0a1da01, 0x6030db00, + 0xf3c1dc01, 0x6350dd00, 0x62e0de00, 0xf271df01, 0xee01e001, + 0x7e90e100, 0x7f20e200, 0xefb1e301, 0x7c40e400, 0xecd1e501, + 0xed61e601, 0x7df0e700, 0x7a80e800, 0xea11e901, 0xeba1ea01, + 0x7b30eb00, 0xe8c1ec01, 0x7850ed00, 0x79e0ee00, 0xe971ef01, + 0x7700f000, 0xe791f101, 0xe621f201, 0x76b0f300, 0xe541f401, + 0x75d0f500, 0x7460f600, 0xe4f1f701, 0xe381f801, 0x7310f900, + 0x72a0fa00, 0xe231fb01, 0x71c0fc00, 0xe151fd01, 0xe0e1fe01, + 0x7070ff00}}; + +static const word_t crc_braid_big_table[][256] = { + {0x0000000000000000, 0x0101919000000000, 0x0102219100000000, + 0x0003b00100000000, 0x0104419200000000, 0x0005d00200000000, + 0x0006600300000000, 0x0107f19300000000, 0x0108819400000000, + 0x0009100400000000, 0x000aa00500000000, 0x010b319500000000, + 0x000cc00600000000, 0x010d519600000000, 0x010ee19700000000, + 0x000f700700000000, 0x0110019900000000, 0x0011900900000000, + 0x0012200800000000, 0x0113b19800000000, 0x0014400b00000000, + 0x0115d19b00000000, 0x0116619a00000000, 0x0017f00a00000000, + 0x0018800d00000000, 0x0119119d00000000, 0x011aa19c00000000, + 0x001b300c00000000, 0x011cc19f00000000, 0x001d500f00000000, + 0x001ee00e00000000, 0x011f719e00000000, 0x0120018200000000, + 0x0021901200000000, 0x0022201300000000, 0x0123b18300000000, + 0x0024401000000000, 0x0125d18000000000, 0x0126618100000000, + 0x0027f01100000000, 0x0028801600000000, 0x0129118600000000, + 0x012aa18700000000, 0x002b301700000000, 0x012cc18400000000, + 0x002d501400000000, 0x002ee01500000000, 0x012f718500000000, + 0x0030001b00000000, 0x0131918b00000000, 0x0132218a00000000, + 0x0033b01a00000000, 0x0134418900000000, 0x0035d01900000000, + 0x0036601800000000, 0x0137f18800000000, 0x0138818f00000000, + 0x0039101f00000000, 0x003aa01e00000000, 0x013b318e00000000, + 0x003cc01d00000000, 0x013d518d00000000, 0x013ee18c00000000, + 0x003f701c00000000, 0x014001b400000000, 0x0041902400000000, + 0x0042202500000000, 0x0143b1b500000000, 0x0044402600000000, + 0x0145d1b600000000, 0x014661b700000000, 0x0047f02700000000, + 0x0048802000000000, 0x014911b000000000, 0x014aa1b100000000, + 0x004b302100000000, 0x014cc1b200000000, 0x004d502200000000, + 0x004ee02300000000, 0x014f71b300000000, 0x0050002d00000000, + 0x015191bd00000000, 0x015221bc00000000, 0x0053b02c00000000, + 0x015441bf00000000, 0x0055d02f00000000, 0x0056602e00000000, + 0x0157f1be00000000, 0x015881b900000000, 0x0059102900000000, + 0x005aa02800000000, 0x015b31b800000000, 0x005cc02b00000000, + 0x015d51bb00000000, 0x015ee1ba00000000, 0x005f702a00000000, + 0x0060003600000000, 0x016191a600000000, 0x016221a700000000, + 0x0063b03700000000, 0x016441a400000000, 0x0065d03400000000, + 0x0066603500000000, 0x0167f1a500000000, 0x016881a200000000, + 0x0069103200000000, 0x006aa03300000000, 0x016b31a300000000, + 0x006cc03000000000, 0x016d51a000000000, 0x016ee1a100000000, + 0x006f703100000000, 0x017001af00000000, 0x0071903f00000000, + 0x0072203e00000000, 0x0173b1ae00000000, 0x0074403d00000000, + 0x0175d1ad00000000, 0x017661ac00000000, 0x0077f03c00000000, + 0x0078803b00000000, 0x017911ab00000000, 0x017aa1aa00000000, + 0x007b303a00000000, 0x017cc1a900000000, 0x007d503900000000, + 0x007ee03800000000, 0x017f71a800000000, 0x018001d800000000, + 0x0081904800000000, 0x0082204900000000, 0x0183b1d900000000, + 0x0084404a00000000, 0x0185d1da00000000, 0x018661db00000000, + 0x0087f04b00000000, 0x0088804c00000000, 0x018911dc00000000, + 0x018aa1dd00000000, 0x008b304d00000000, 0x018cc1de00000000, + 0x008d504e00000000, 0x008ee04f00000000, 0x018f71df00000000, + 0x0090004100000000, 0x019191d100000000, 0x019221d000000000, + 0x0093b04000000000, 0x019441d300000000, 0x0095d04300000000, + 0x0096604200000000, 0x0197f1d200000000, 0x019881d500000000, + 0x0099104500000000, 0x009aa04400000000, 0x019b31d400000000, + 0x009cc04700000000, 0x019d51d700000000, 0x019ee1d600000000, + 0x009f704600000000, 0x00a0005a00000000, 0x01a191ca00000000, + 0x01a221cb00000000, 0x00a3b05b00000000, 0x01a441c800000000, + 0x00a5d05800000000, 0x00a6605900000000, 0x01a7f1c900000000, + 0x01a881ce00000000, 0x00a9105e00000000, 0x00aaa05f00000000, + 0x01ab31cf00000000, 0x00acc05c00000000, 0x01ad51cc00000000, + 0x01aee1cd00000000, 0x00af705d00000000, 0x01b001c300000000, + 0x00b1905300000000, 0x00b2205200000000, 0x01b3b1c200000000, + 0x00b4405100000000, 0x01b5d1c100000000, 0x01b661c000000000, + 0x00b7f05000000000, 0x00b8805700000000, 0x01b911c700000000, + 0x01baa1c600000000, 0x00bb305600000000, 0x01bcc1c500000000, + 0x00bd505500000000, 0x00bee05400000000, 0x01bf71c400000000, + 0x00c0006c00000000, 0x01c191fc00000000, 0x01c221fd00000000, + 0x00c3b06d00000000, 0x01c441fe00000000, 0x00c5d06e00000000, + 0x00c6606f00000000, 0x01c7f1ff00000000, 0x01c881f800000000, + 0x00c9106800000000, 0x00caa06900000000, 0x01cb31f900000000, + 0x00ccc06a00000000, 0x01cd51fa00000000, 0x01cee1fb00000000, + 0x00cf706b00000000, 0x01d001f500000000, 0x00d1906500000000, + 0x00d2206400000000, 0x01d3b1f400000000, 0x00d4406700000000, + 0x01d5d1f700000000, 0x01d661f600000000, 0x00d7f06600000000, + 0x00d8806100000000, 0x01d911f100000000, 0x01daa1f000000000, + 0x00db306000000000, 0x01dcc1f300000000, 0x00dd506300000000, + 0x00dee06200000000, 0x01df71f200000000, 0x01e001ee00000000, + 0x00e1907e00000000, 0x00e2207f00000000, 0x01e3b1ef00000000, + 0x00e4407c00000000, 0x01e5d1ec00000000, 0x01e661ed00000000, + 0x00e7f07d00000000, 0x00e8807a00000000, 0x01e911ea00000000, + 0x01eaa1eb00000000, 0x00eb307b00000000, 0x01ecc1e800000000, + 0x00ed507800000000, 0x00eee07900000000, 0x01ef71e900000000, + 0x00f0007700000000, 0x01f191e700000000, 0x01f221e600000000, + 0x00f3b07600000000, 0x01f441e500000000, 0x00f5d07500000000, + 0x00f6607400000000, 0x01f7f1e400000000, 0x01f881e300000000, + 0x00f9107300000000, 0x00faa07200000000, 0x01fb31e200000000, + 0x00fcc07100000000, 0x01fd51e100000000, 0x01fee1e000000000, + 0x00ff707000000000}, + {0x0000000000000000, 0x0090019000000000, 0x0320009000000000, + 0x03b0010000000000, 0x0540039000000000, 0x05d0020000000000, + 0x0660030000000000, 0x06f0029000000000, 0x0980059000000000, + 0x0910040000000000, 0x0aa0050000000000, 0x0a30049000000000, + 0x0cc0060000000000, 0x0c50079000000000, 0x0fe0069000000000, + 0x0f70070000000000, 0x1100089000000000, 0x1190090000000000, + 0x1220080000000000, 0x12b0099000000000, 0x14400b0000000000, + 0x14d00a9000000000, 0x17600b9000000000, 0x17f00a0000000000, + 0x18800d0000000000, 0x18100c9000000000, 0x1ba00d9000000000, + 0x1b300c0000000000, 0x1dc00e9000000000, 0x1d500f0000000000, + 0x1ee00e0000000000, 0x1e700f9000000000, 0x2100139000000000, + 0x2190120000000000, 0x2220130000000000, 0x22b0129000000000, + 0x2440100000000000, 0x24d0119000000000, 0x2760109000000000, + 0x27f0110000000000, 0x2880160000000000, 0x2810179000000000, + 0x2ba0169000000000, 0x2b30170000000000, 0x2dc0159000000000, + 0x2d50140000000000, 0x2ee0150000000000, 0x2e70149000000000, + 0x30001b0000000000, 0x30901a9000000000, 0x33201b9000000000, + 0x33b01a0000000000, 0x3540189000000000, 0x35d0190000000000, + 0x3660180000000000, 0x36f0199000000000, 0x39801e9000000000, + 0x39101f0000000000, 0x3aa01e0000000000, 0x3a301f9000000000, + 0x3cc01d0000000000, 0x3c501c9000000000, 0x3fe01d9000000000, + 0x3f701c0000000000, 0x4100259000000000, 0x4190240000000000, + 0x4220250000000000, 0x42b0249000000000, 0x4440260000000000, + 0x44d0279000000000, 0x4760269000000000, 0x47f0270000000000, + 0x4880200000000000, 0x4810219000000000, 0x4ba0209000000000, + 0x4b30210000000000, 0x4dc0239000000000, 0x4d50220000000000, + 0x4ee0230000000000, 0x4e70229000000000, 0x50002d0000000000, + 0x50902c9000000000, 0x53202d9000000000, 0x53b02c0000000000, + 0x55402e9000000000, 0x55d02f0000000000, 0x56602e0000000000, + 0x56f02f9000000000, 0x5980289000000000, 0x5910290000000000, + 0x5aa0280000000000, 0x5a30299000000000, 0x5cc02b0000000000, + 0x5c502a9000000000, 0x5fe02b9000000000, 0x5f702a0000000000, + 0x6000360000000000, 0x6090379000000000, 0x6320369000000000, + 0x63b0370000000000, 0x6540359000000000, 0x65d0340000000000, + 0x6660350000000000, 0x66f0349000000000, 0x6980339000000000, + 0x6910320000000000, 0x6aa0330000000000, 0x6a30329000000000, + 0x6cc0300000000000, 0x6c50319000000000, 0x6fe0309000000000, + 0x6f70310000000000, 0x71003e9000000000, 0x71903f0000000000, + 0x72203e0000000000, 0x72b03f9000000000, 0x74403d0000000000, + 0x74d03c9000000000, 0x77603d9000000000, 0x77f03c0000000000, + 0x78803b0000000000, 0x78103a9000000000, 0x7ba03b9000000000, + 0x7b303a0000000000, 0x7dc0389000000000, 0x7d50390000000000, + 0x7ee0380000000000, 0x7e70399000000000, 0x8100499000000000, + 0x8190480000000000, 0x8220490000000000, 0x82b0489000000000, + 0x84404a0000000000, 0x84d04b9000000000, 0x87604a9000000000, + 0x87f04b0000000000, 0x88804c0000000000, 0x88104d9000000000, + 0x8ba04c9000000000, 0x8b304d0000000000, 0x8dc04f9000000000, + 0x8d504e0000000000, 0x8ee04f0000000000, 0x8e704e9000000000, + 0x9000410000000000, 0x9090409000000000, 0x9320419000000000, + 0x93b0400000000000, 0x9540429000000000, 0x95d0430000000000, + 0x9660420000000000, 0x96f0439000000000, 0x9980449000000000, + 0x9910450000000000, 0x9aa0440000000000, 0x9a30459000000000, + 0x9cc0470000000000, 0x9c50469000000000, 0x9fe0479000000000, + 0x9f70460000000000, 0xa0005a0000000000, 0xa0905b9000000000, + 0xa3205a9000000000, 0xa3b05b0000000000, 0xa540599000000000, + 0xa5d0580000000000, 0xa660590000000000, 0xa6f0589000000000, + 0xa9805f9000000000, 0xa9105e0000000000, 0xaaa05f0000000000, + 0xaa305e9000000000, 0xacc05c0000000000, 0xac505d9000000000, + 0xafe05c9000000000, 0xaf705d0000000000, 0xb100529000000000, + 0xb190530000000000, 0xb220520000000000, 0xb2b0539000000000, + 0xb440510000000000, 0xb4d0509000000000, 0xb760519000000000, + 0xb7f0500000000000, 0xb880570000000000, 0xb810569000000000, + 0xbba0579000000000, 0xbb30560000000000, 0xbdc0549000000000, + 0xbd50550000000000, 0xbee0540000000000, 0xbe70559000000000, + 0xc0006c0000000000, 0xc0906d9000000000, 0xc3206c9000000000, + 0xc3b06d0000000000, 0xc5406f9000000000, 0xc5d06e0000000000, + 0xc6606f0000000000, 0xc6f06e9000000000, 0xc980699000000000, + 0xc910680000000000, 0xcaa0690000000000, 0xca30689000000000, + 0xccc06a0000000000, 0xcc506b9000000000, 0xcfe06a9000000000, + 0xcf706b0000000000, 0xd100649000000000, 0xd190650000000000, + 0xd220640000000000, 0xd2b0659000000000, 0xd440670000000000, + 0xd4d0669000000000, 0xd760679000000000, 0xd7f0660000000000, + 0xd880610000000000, 0xd810609000000000, 0xdba0619000000000, + 0xdb30600000000000, 0xddc0629000000000, 0xdd50630000000000, + 0xdee0620000000000, 0xde70639000000000, 0xe1007f9000000000, + 0xe1907e0000000000, 0xe2207f0000000000, 0xe2b07e9000000000, + 0xe4407c0000000000, 0xe4d07d9000000000, 0xe7607c9000000000, + 0xe7f07d0000000000, 0xe8807a0000000000, 0xe8107b9000000000, + 0xeba07a9000000000, 0xeb307b0000000000, 0xedc0799000000000, + 0xed50780000000000, 0xeee0790000000000, 0xee70789000000000, + 0xf000770000000000, 0xf090769000000000, 0xf320779000000000, + 0xf3b0760000000000, 0xf540749000000000, 0xf5d0750000000000, + 0xf660740000000000, 0xf6f0759000000000, 0xf980729000000000, + 0xf910730000000000, 0xfaa0720000000000, 0xfa30739000000000, + 0xfcc0710000000000, 0xfc50709000000000, 0xffe0719000000000, + 0xff70700000000000}, + {0x0000000000000000, 0x9001900000000000, 0x2003200100000000, + 0xb002b00100000000, 0x4006400200000000, 0xd007d00200000000, + 0x6005600300000000, 0xf004f00300000000, 0x800c800400000000, + 0x100d100400000000, 0xa00fa00500000000, 0x300e300500000000, + 0xc00ac00600000000, 0x500b500600000000, 0xe009e00700000000, + 0x7008700700000000, 0x0019000900000000, 0x9018900900000000, + 0x201a200800000000, 0xb01bb00800000000, 0x401f400b00000000, + 0xd01ed00b00000000, 0x601c600a00000000, 0xf01df00a00000000, + 0x8015800d00000000, 0x1014100d00000000, 0xa016a00c00000000, + 0x3017300c00000000, 0xc013c00f00000000, 0x5012500f00000000, + 0xe010e00e00000000, 0x7011700e00000000, 0x0032001200000000, + 0x9033901200000000, 0x2031201300000000, 0xb030b01300000000, + 0x4034401000000000, 0xd035d01000000000, 0x6037601100000000, + 0xf036f01100000000, 0x803e801600000000, 0x103f101600000000, + 0xa03da01700000000, 0x303c301700000000, 0xc038c01400000000, + 0x5039501400000000, 0xe03be01500000000, 0x703a701500000000, + 0x002b001b00000000, 0x902a901b00000000, 0x2028201a00000000, + 0xb029b01a00000000, 0x402d401900000000, 0xd02cd01900000000, + 0x602e601800000000, 0xf02ff01800000000, 0x8027801f00000000, + 0x1026101f00000000, 0xa024a01e00000000, 0x3025301e00000000, + 0xc021c01d00000000, 0x5020501d00000000, 0xe022e01c00000000, + 0x7023701c00000000, 0x0064002400000000, 0x9065902400000000, + 0x2067202500000000, 0xb066b02500000000, 0x4062402600000000, + 0xd063d02600000000, 0x6061602700000000, 0xf060f02700000000, + 0x8068802000000000, 0x1069102000000000, 0xa06ba02100000000, + 0x306a302100000000, 0xc06ec02200000000, 0x506f502200000000, + 0xe06de02300000000, 0x706c702300000000, 0x007d002d00000000, + 0x907c902d00000000, 0x207e202c00000000, 0xb07fb02c00000000, + 0x407b402f00000000, 0xd07ad02f00000000, 0x6078602e00000000, + 0xf079f02e00000000, 0x8071802900000000, 0x1070102900000000, + 0xa072a02800000000, 0x3073302800000000, 0xc077c02b00000000, + 0x5076502b00000000, 0xe074e02a00000000, 0x7075702a00000000, + 0x0056003600000000, 0x9057903600000000, 0x2055203700000000, + 0xb054b03700000000, 0x4050403400000000, 0xd051d03400000000, + 0x6053603500000000, 0xf052f03500000000, 0x805a803200000000, + 0x105b103200000000, 0xa059a03300000000, 0x3058303300000000, + 0xc05cc03000000000, 0x505d503000000000, 0xe05fe03100000000, + 0x705e703100000000, 0x004f003f00000000, 0x904e903f00000000, + 0x204c203e00000000, 0xb04db03e00000000, 0x4049403d00000000, + 0xd048d03d00000000, 0x604a603c00000000, 0xf04bf03c00000000, + 0x8043803b00000000, 0x1042103b00000000, 0xa040a03a00000000, + 0x3041303a00000000, 0xc045c03900000000, 0x5044503900000000, + 0xe046e03800000000, 0x7047703800000000, 0x00c8004800000000, + 0x90c9904800000000, 0x20cb204900000000, 0xb0cab04900000000, + 0x40ce404a00000000, 0xd0cfd04a00000000, 0x60cd604b00000000, + 0xf0ccf04b00000000, 0x80c4804c00000000, 0x10c5104c00000000, + 0xa0c7a04d00000000, 0x30c6304d00000000, 0xc0c2c04e00000000, + 0x50c3504e00000000, 0xe0c1e04f00000000, 0x70c0704f00000000, + 0x00d1004100000000, 0x90d0904100000000, 0x20d2204000000000, + 0xb0d3b04000000000, 0x40d7404300000000, 0xd0d6d04300000000, + 0x60d4604200000000, 0xf0d5f04200000000, 0x80dd804500000000, + 0x10dc104500000000, 0xa0dea04400000000, 0x30df304400000000, + 0xc0dbc04700000000, 0x50da504700000000, 0xe0d8e04600000000, + 0x70d9704600000000, 0x00fa005a00000000, 0x90fb905a00000000, + 0x20f9205b00000000, 0xb0f8b05b00000000, 0x40fc405800000000, + 0xd0fdd05800000000, 0x60ff605900000000, 0xf0fef05900000000, + 0x80f6805e00000000, 0x10f7105e00000000, 0xa0f5a05f00000000, + 0x30f4305f00000000, 0xc0f0c05c00000000, 0x50f1505c00000000, + 0xe0f3e05d00000000, 0x70f2705d00000000, 0x00e3005300000000, + 0x90e2905300000000, 0x20e0205200000000, 0xb0e1b05200000000, + 0x40e5405100000000, 0xd0e4d05100000000, 0x60e6605000000000, + 0xf0e7f05000000000, 0x80ef805700000000, 0x10ee105700000000, + 0xa0eca05600000000, 0x30ed305600000000, 0xc0e9c05500000000, + 0x50e8505500000000, 0xe0eae05400000000, 0x70eb705400000000, + 0x00ac006c00000000, 0x90ad906c00000000, 0x20af206d00000000, + 0xb0aeb06d00000000, 0x40aa406e00000000, 0xd0abd06e00000000, + 0x60a9606f00000000, 0xf0a8f06f00000000, 0x80a0806800000000, + 0x10a1106800000000, 0xa0a3a06900000000, 0x30a2306900000000, + 0xc0a6c06a00000000, 0x50a7506a00000000, 0xe0a5e06b00000000, + 0x70a4706b00000000, 0x00b5006500000000, 0x90b4906500000000, + 0x20b6206400000000, 0xb0b7b06400000000, 0x40b3406700000000, + 0xd0b2d06700000000, 0x60b0606600000000, 0xf0b1f06600000000, + 0x80b9806100000000, 0x10b8106100000000, 0xa0baa06000000000, + 0x30bb306000000000, 0xc0bfc06300000000, 0x50be506300000000, + 0xe0bce06200000000, 0x70bd706200000000, 0x009e007e00000000, + 0x909f907e00000000, 0x209d207f00000000, 0xb09cb07f00000000, + 0x4098407c00000000, 0xd099d07c00000000, 0x609b607d00000000, + 0xf09af07d00000000, 0x8092807a00000000, 0x1093107a00000000, + 0xa091a07b00000000, 0x3090307b00000000, 0xc094c07800000000, + 0x5095507800000000, 0xe097e07900000000, 0x7096707900000000, + 0x0087007700000000, 0x9086907700000000, 0x2084207600000000, + 0xb085b07600000000, 0x4081407500000000, 0xd080d07500000000, + 0x6082607400000000, 0xf083f07400000000, 0x808b807300000000, + 0x108a107300000000, 0xa088a07200000000, 0x3089307200000000, + 0xc08dc07100000000, 0x508c507100000000, 0xe08ee07000000000, + 0x708f707000000000}, + {0x0000000000000000, 0x0100004100000000, 0x0200008200000000, + 0x030000c300000000, 0x070003b400000000, 0x060003f500000000, + 0x0500033600000000, 0x0400037700000000, 0x0d0005d800000000, + 0x0c00059900000000, 0x0f00055a00000000, 0x0e00051b00000000, + 0x0a00066c00000000, 0x0b00062d00000000, 0x080006ee00000000, + 0x090006af00000000, 0x1900090000000000, 0x1800094100000000, + 0x1b00098200000000, 0x1a0009c300000000, 0x1e000ab400000000, + 0x1f000af500000000, 0x1c000a3600000000, 0x1d000a7700000000, + 0x14000cd800000000, 0x15000c9900000000, 0x16000c5a00000000, + 0x17000c1b00000000, 0x13000f6c00000000, 0x12000f2d00000000, + 0x11000fee00000000, 0x10000faf00000000, 0x3200120000000000, + 0x3300124100000000, 0x3000128200000000, 0x310012c300000000, + 0x350011b400000000, 0x340011f500000000, 0x3700113600000000, + 0x3600117700000000, 0x3f0017d800000000, 0x3e00179900000000, + 0x3d00175a00000000, 0x3c00171b00000000, 0x3800146c00000000, + 0x3900142d00000000, 0x3a0014ee00000000, 0x3b0014af00000000, + 0x2b001b0000000000, 0x2a001b4100000000, 0x29001b8200000000, + 0x28001bc300000000, 0x2c0018b400000000, 0x2d0018f500000000, + 0x2e00183600000000, 0x2f00187700000000, 0x26001ed800000000, + 0x27001e9900000000, 0x24001e5a00000000, 0x25001e1b00000000, + 0x21001d6c00000000, 0x20001d2d00000000, 0x23001dee00000000, + 0x22001daf00000000, 0x6400240000000000, 0x6500244100000000, + 0x6600248200000000, 0x670024c300000000, 0x630027b400000000, + 0x620027f500000000, 0x6100273600000000, 0x6000277700000000, + 0x690021d800000000, 0x6800219900000000, 0x6b00215a00000000, + 0x6a00211b00000000, 0x6e00226c00000000, 0x6f00222d00000000, + 0x6c0022ee00000000, 0x6d0022af00000000, 0x7d002d0000000000, + 0x7c002d4100000000, 0x7f002d8200000000, 0x7e002dc300000000, + 0x7a002eb400000000, 0x7b002ef500000000, 0x78002e3600000000, + 0x79002e7700000000, 0x700028d800000000, 0x7100289900000000, + 0x7200285a00000000, 0x7300281b00000000, 0x77002b6c00000000, + 0x76002b2d00000000, 0x75002bee00000000, 0x74002baf00000000, + 0x5600360000000000, 0x5700364100000000, 0x5400368200000000, + 0x550036c300000000, 0x510035b400000000, 0x500035f500000000, + 0x5300353600000000, 0x5200357700000000, 0x5b0033d800000000, + 0x5a00339900000000, 0x5900335a00000000, 0x5800331b00000000, + 0x5c00306c00000000, 0x5d00302d00000000, 0x5e0030ee00000000, + 0x5f0030af00000000, 0x4f003f0000000000, 0x4e003f4100000000, + 0x4d003f8200000000, 0x4c003fc300000000, 0x48003cb400000000, + 0x49003cf500000000, 0x4a003c3600000000, 0x4b003c7700000000, + 0x42003ad800000000, 0x43003a9900000000, 0x40003a5a00000000, + 0x41003a1b00000000, 0x4500396c00000000, 0x4400392d00000000, + 0x470039ee00000000, 0x460039af00000000, 0xc800480000000000, + 0xc900484100000000, 0xca00488200000000, 0xcb0048c300000000, + 0xcf004bb400000000, 0xce004bf500000000, 0xcd004b3600000000, + 0xcc004b7700000000, 0xc5004dd800000000, 0xc4004d9900000000, + 0xc7004d5a00000000, 0xc6004d1b00000000, 0xc2004e6c00000000, + 0xc3004e2d00000000, 0xc0004eee00000000, 0xc1004eaf00000000, + 0xd100410000000000, 0xd000414100000000, 0xd300418200000000, + 0xd20041c300000000, 0xd60042b400000000, 0xd70042f500000000, + 0xd400423600000000, 0xd500427700000000, 0xdc0044d800000000, + 0xdd00449900000000, 0xde00445a00000000, 0xdf00441b00000000, + 0xdb00476c00000000, 0xda00472d00000000, 0xd90047ee00000000, + 0xd80047af00000000, 0xfa005a0000000000, 0xfb005a4100000000, + 0xf8005a8200000000, 0xf9005ac300000000, 0xfd0059b400000000, + 0xfc0059f500000000, 0xff00593600000000, 0xfe00597700000000, + 0xf7005fd800000000, 0xf6005f9900000000, 0xf5005f5a00000000, + 0xf4005f1b00000000, 0xf0005c6c00000000, 0xf1005c2d00000000, + 0xf2005cee00000000, 0xf3005caf00000000, 0xe300530000000000, + 0xe200534100000000, 0xe100538200000000, 0xe00053c300000000, + 0xe40050b400000000, 0xe50050f500000000, 0xe600503600000000, + 0xe700507700000000, 0xee0056d800000000, 0xef00569900000000, + 0xec00565a00000000, 0xed00561b00000000, 0xe900556c00000000, + 0xe800552d00000000, 0xeb0055ee00000000, 0xea0055af00000000, + 0xac006c0000000000, 0xad006c4100000000, 0xae006c8200000000, + 0xaf006cc300000000, 0xab006fb400000000, 0xaa006ff500000000, + 0xa9006f3600000000, 0xa8006f7700000000, 0xa10069d800000000, + 0xa000699900000000, 0xa300695a00000000, 0xa200691b00000000, + 0xa6006a6c00000000, 0xa7006a2d00000000, 0xa4006aee00000000, + 0xa5006aaf00000000, 0xb500650000000000, 0xb400654100000000, + 0xb700658200000000, 0xb60065c300000000, 0xb20066b400000000, + 0xb30066f500000000, 0xb000663600000000, 0xb100667700000000, + 0xb80060d800000000, 0xb900609900000000, 0xba00605a00000000, + 0xbb00601b00000000, 0xbf00636c00000000, 0xbe00632d00000000, + 0xbd0063ee00000000, 0xbc0063af00000000, 0x9e007e0000000000, + 0x9f007e4100000000, 0x9c007e8200000000, 0x9d007ec300000000, + 0x99007db400000000, 0x98007df500000000, 0x9b007d3600000000, + 0x9a007d7700000000, 0x93007bd800000000, 0x92007b9900000000, + 0x91007b5a00000000, 0x90007b1b00000000, 0x9400786c00000000, + 0x9500782d00000000, 0x960078ee00000000, 0x970078af00000000, + 0x8700770000000000, 0x8600774100000000, 0x8500778200000000, + 0x840077c300000000, 0x800074b400000000, 0x810074f500000000, + 0x8200743600000000, 0x8300747700000000, 0x8a0072d800000000, + 0x8b00729900000000, 0x8800725a00000000, 0x8900721b00000000, + 0x8d00716c00000000, 0x8c00712d00000000, 0x8f0071ee00000000, + 0x8e0071af00000000}, + {0x0000000000000000, 0x0101d09000000000, 0x0102a39100000000, + 0x0003730100000000, 0x0104459300000000, 0x0005950300000000, + 0x0006e60200000000, 0x0107369200000000, 0x0108899600000000, + 0x0009590600000000, 0x000a2a0700000000, 0x010bfa9700000000, + 0x000ccc0500000000, 0x010d1c9500000000, 0x010e6f9400000000, + 0x000fbf0400000000, 0x0110119d00000000, 0x0011c10d00000000, + 0x0012b20c00000000, 0x0113629c00000000, 0x0014540e00000000, + 0x0115849e00000000, 0x0116f79f00000000, 0x0017270f00000000, + 0x0018980b00000000, 0x0119489b00000000, 0x011a3b9a00000000, + 0x001beb0a00000000, 0x011cdd9800000000, 0x001d0d0800000000, + 0x001e7e0900000000, 0x011fae9900000000, 0x0120218a00000000, + 0x0021f11a00000000, 0x0022821b00000000, 0x0123528b00000000, + 0x0024641900000000, 0x0125b48900000000, 0x0126c78800000000, + 0x0027171800000000, 0x0028a81c00000000, 0x0129788c00000000, + 0x012a0b8d00000000, 0x002bdb1d00000000, 0x012ced8f00000000, + 0x002d3d1f00000000, 0x002e4e1e00000000, 0x012f9e8e00000000, + 0x0030301700000000, 0x0131e08700000000, 0x0132938600000000, + 0x0033431600000000, 0x0134758400000000, 0x0035a51400000000, + 0x0036d61500000000, 0x0137068500000000, 0x0138b98100000000, + 0x0039691100000000, 0x003a1a1000000000, 0x013bca8000000000, + 0x003cfc1200000000, 0x013d2c8200000000, 0x013e5f8300000000, + 0x003f8f1300000000, 0x014041a400000000, 0x0041913400000000, + 0x0042e23500000000, 0x014332a500000000, 0x0044043700000000, + 0x0145d4a700000000, 0x0146a7a600000000, 0x0047773600000000, + 0x0048c83200000000, 0x014918a200000000, 0x014a6ba300000000, + 0x004bbb3300000000, 0x014c8da100000000, 0x004d5d3100000000, + 0x004e2e3000000000, 0x014ffea000000000, 0x0050503900000000, + 0x015180a900000000, 0x0152f3a800000000, 0x0053233800000000, + 0x015415aa00000000, 0x0055c53a00000000, 0x0056b63b00000000, + 0x015766ab00000000, 0x0158d9af00000000, 0x0059093f00000000, + 0x005a7a3e00000000, 0x015baaae00000000, 0x005c9c3c00000000, + 0x015d4cac00000000, 0x015e3fad00000000, 0x005fef3d00000000, + 0x0060602e00000000, 0x0161b0be00000000, 0x0162c3bf00000000, + 0x0063132f00000000, 0x016425bd00000000, 0x0065f52d00000000, + 0x0066862c00000000, 0x016756bc00000000, 0x0168e9b800000000, + 0x0069392800000000, 0x006a4a2900000000, 0x016b9ab900000000, + 0x006cac2b00000000, 0x016d7cbb00000000, 0x016e0fba00000000, + 0x006fdf2a00000000, 0x017071b300000000, 0x0071a12300000000, + 0x0072d22200000000, 0x017302b200000000, 0x0074342000000000, + 0x0175e4b000000000, 0x017697b100000000, 0x0077472100000000, + 0x0078f82500000000, 0x017928b500000000, 0x017a5bb400000000, + 0x007b8b2400000000, 0x017cbdb600000000, 0x007d6d2600000000, + 0x007e1e2700000000, 0x017fceb700000000, 0x018081f800000000, + 0x0081516800000000, 0x0082226900000000, 0x0183f2f900000000, + 0x0084c46b00000000, 0x018514fb00000000, 0x018667fa00000000, + 0x0087b76a00000000, 0x0088086e00000000, 0x0189d8fe00000000, + 0x018aabff00000000, 0x008b7b6f00000000, 0x018c4dfd00000000, + 0x008d9d6d00000000, 0x008eee6c00000000, 0x018f3efc00000000, + 0x0090906500000000, 0x019140f500000000, 0x019233f400000000, + 0x0093e36400000000, 0x0194d5f600000000, 0x0095056600000000, + 0x0096766700000000, 0x0197a6f700000000, 0x019819f300000000, + 0x0099c96300000000, 0x009aba6200000000, 0x019b6af200000000, + 0x009c5c6000000000, 0x019d8cf000000000, 0x019efff100000000, + 0x009f2f6100000000, 0x00a0a07200000000, 0x01a170e200000000, + 0x01a203e300000000, 0x00a3d37300000000, 0x01a4e5e100000000, + 0x00a5357100000000, 0x00a6467000000000, 0x01a796e000000000, + 0x01a829e400000000, 0x00a9f97400000000, 0x00aa8a7500000000, + 0x01ab5ae500000000, 0x00ac6c7700000000, 0x01adbce700000000, + 0x01aecfe600000000, 0x00af1f7600000000, 0x01b0b1ef00000000, + 0x00b1617f00000000, 0x00b2127e00000000, 0x01b3c2ee00000000, + 0x00b4f47c00000000, 0x01b524ec00000000, 0x01b657ed00000000, + 0x00b7877d00000000, 0x00b8387900000000, 0x01b9e8e900000000, + 0x01ba9be800000000, 0x00bb4b7800000000, 0x01bc7dea00000000, + 0x00bdad7a00000000, 0x00bede7b00000000, 0x01bf0eeb00000000, + 0x00c0c05c00000000, 0x01c110cc00000000, 0x01c263cd00000000, + 0x00c3b35d00000000, 0x01c485cf00000000, 0x00c5555f00000000, + 0x00c6265e00000000, 0x01c7f6ce00000000, 0x01c849ca00000000, + 0x00c9995a00000000, 0x00caea5b00000000, 0x01cb3acb00000000, + 0x00cc0c5900000000, 0x01cddcc900000000, 0x01ceafc800000000, + 0x00cf7f5800000000, 0x01d0d1c100000000, 0x00d1015100000000, + 0x00d2725000000000, 0x01d3a2c000000000, 0x00d4945200000000, + 0x01d544c200000000, 0x01d637c300000000, 0x00d7e75300000000, + 0x00d8585700000000, 0x01d988c700000000, 0x01dafbc600000000, + 0x00db2b5600000000, 0x01dc1dc400000000, 0x00ddcd5400000000, + 0x00debe5500000000, 0x01df6ec500000000, 0x01e0e1d600000000, + 0x00e1314600000000, 0x00e2424700000000, 0x01e392d700000000, + 0x00e4a44500000000, 0x01e574d500000000, 0x01e607d400000000, + 0x00e7d74400000000, 0x00e8684000000000, 0x01e9b8d000000000, + 0x01eacbd100000000, 0x00eb1b4100000000, 0x01ec2dd300000000, + 0x00edfd4300000000, 0x00ee8e4200000000, 0x01ef5ed200000000, + 0x00f0f04b00000000, 0x01f120db00000000, 0x01f253da00000000, + 0x00f3834a00000000, 0x01f4b5d800000000, 0x00f5654800000000, + 0x00f6164900000000, 0x01f7c6d900000000, 0x01f879dd00000000, + 0x00f9a94d00000000, 0x00fada4c00000000, 0x01fb0adc00000000, + 0x00fc3c4e00000000, 0x01fdecde00000000, 0x01fe9fdf00000000, + 0x00ff4f4f00000000}, + {0x0000000000000000, 0x00d1019000000000, 0x03a2009000000000, + 0x0373010000000000, 0x0544029000000000, 0x0595030000000000, + 0x06e6020000000000, 0x0637039000000000, 0x0988079000000000, + 0x0959060000000000, 0x0a2a070000000000, 0x0afb069000000000, + 0x0ccc050000000000, 0x0c1d049000000000, 0x0f6e059000000000, + 0x0fbf040000000000, 0x11100c9000000000, 0x11c10d0000000000, + 0x12b20c0000000000, 0x12630d9000000000, 0x14540e0000000000, + 0x14850f9000000000, 0x17f60e9000000000, 0x17270f0000000000, + 0x18980b0000000000, 0x18490a9000000000, 0x1b3a0b9000000000, + 0x1beb0a0000000000, 0x1ddc099000000000, 0x1d0d080000000000, + 0x1e7e090000000000, 0x1eaf089000000000, 0x21201b9000000000, + 0x21f11a0000000000, 0x22821b0000000000, 0x22531a9000000000, + 0x2464190000000000, 0x24b5189000000000, 0x27c6199000000000, + 0x2717180000000000, 0x28a81c0000000000, 0x28791d9000000000, + 0x2b0a1c9000000000, 0x2bdb1d0000000000, 0x2dec1e9000000000, + 0x2d3d1f0000000000, 0x2e4e1e0000000000, 0x2e9f1f9000000000, + 0x3030170000000000, 0x30e1169000000000, 0x3392179000000000, + 0x3343160000000000, 0x3574159000000000, 0x35a5140000000000, + 0x36d6150000000000, 0x3607149000000000, 0x39b8109000000000, + 0x3969110000000000, 0x3a1a100000000000, 0x3acb119000000000, + 0x3cfc120000000000, 0x3c2d139000000000, 0x3f5e129000000000, + 0x3f8f130000000000, 0x4140359000000000, 0x4191340000000000, + 0x42e2350000000000, 0x4233349000000000, 0x4404370000000000, + 0x44d5369000000000, 0x47a6379000000000, 0x4777360000000000, + 0x48c8320000000000, 0x4819339000000000, 0x4b6a329000000000, + 0x4bbb330000000000, 0x4d8c309000000000, 0x4d5d310000000000, + 0x4e2e300000000000, 0x4eff319000000000, 0x5050390000000000, + 0x5081389000000000, 0x53f2399000000000, 0x5323380000000000, + 0x55143b9000000000, 0x55c53a0000000000, 0x56b63b0000000000, + 0x56673a9000000000, 0x59d83e9000000000, 0x59093f0000000000, + 0x5a7a3e0000000000, 0x5aab3f9000000000, 0x5c9c3c0000000000, + 0x5c4d3d9000000000, 0x5f3e3c9000000000, 0x5fef3d0000000000, + 0x60602e0000000000, 0x60b12f9000000000, 0x63c22e9000000000, + 0x63132f0000000000, 0x65242c9000000000, 0x65f52d0000000000, + 0x66862c0000000000, 0x66572d9000000000, 0x69e8299000000000, + 0x6939280000000000, 0x6a4a290000000000, 0x6a9b289000000000, + 0x6cac2b0000000000, 0x6c7d2a9000000000, 0x6f0e2b9000000000, + 0x6fdf2a0000000000, 0x7170229000000000, 0x71a1230000000000, + 0x72d2220000000000, 0x7203239000000000, 0x7434200000000000, + 0x74e5219000000000, 0x7796209000000000, 0x7747210000000000, + 0x78f8250000000000, 0x7829249000000000, 0x7b5a259000000000, + 0x7b8b240000000000, 0x7dbc279000000000, 0x7d6d260000000000, + 0x7e1e270000000000, 0x7ecf269000000000, 0x8180699000000000, + 0x8151680000000000, 0x8222690000000000, 0x82f3689000000000, + 0x84c46b0000000000, 0x84156a9000000000, 0x87666b9000000000, + 0x87b76a0000000000, 0x88086e0000000000, 0x88d96f9000000000, + 0x8baa6e9000000000, 0x8b7b6f0000000000, 0x8d4c6c9000000000, + 0x8d9d6d0000000000, 0x8eee6c0000000000, 0x8e3f6d9000000000, + 0x9090650000000000, 0x9041649000000000, 0x9332659000000000, + 0x93e3640000000000, 0x95d4679000000000, 0x9505660000000000, + 0x9676670000000000, 0x96a7669000000000, 0x9918629000000000, + 0x99c9630000000000, 0x9aba620000000000, 0x9a6b639000000000, + 0x9c5c600000000000, 0x9c8d619000000000, 0x9ffe609000000000, + 0x9f2f610000000000, 0xa0a0720000000000, 0xa071739000000000, + 0xa302729000000000, 0xa3d3730000000000, 0xa5e4709000000000, + 0xa535710000000000, 0xa646700000000000, 0xa697719000000000, + 0xa928759000000000, 0xa9f9740000000000, 0xaa8a750000000000, + 0xaa5b749000000000, 0xac6c770000000000, 0xacbd769000000000, + 0xafce779000000000, 0xaf1f760000000000, 0xb1b07e9000000000, + 0xb1617f0000000000, 0xb2127e0000000000, 0xb2c37f9000000000, + 0xb4f47c0000000000, 0xb4257d9000000000, 0xb7567c9000000000, + 0xb7877d0000000000, 0xb838790000000000, 0xb8e9789000000000, + 0xbb9a799000000000, 0xbb4b780000000000, 0xbd7c7b9000000000, + 0xbdad7a0000000000, 0xbede7b0000000000, 0xbe0f7a9000000000, + 0xc0c05c0000000000, 0xc0115d9000000000, 0xc3625c9000000000, + 0xc3b35d0000000000, 0xc5845e9000000000, 0xc5555f0000000000, + 0xc6265e0000000000, 0xc6f75f9000000000, 0xc9485b9000000000, + 0xc9995a0000000000, 0xcaea5b0000000000, 0xca3b5a9000000000, + 0xcc0c590000000000, 0xccdd589000000000, 0xcfae599000000000, + 0xcf7f580000000000, 0xd1d0509000000000, 0xd101510000000000, + 0xd272500000000000, 0xd2a3519000000000, 0xd494520000000000, + 0xd445539000000000, 0xd736529000000000, 0xd7e7530000000000, + 0xd858570000000000, 0xd889569000000000, 0xdbfa579000000000, + 0xdb2b560000000000, 0xdd1c559000000000, 0xddcd540000000000, + 0xdebe550000000000, 0xde6f549000000000, 0xe1e0479000000000, + 0xe131460000000000, 0xe242470000000000, 0xe293469000000000, + 0xe4a4450000000000, 0xe475449000000000, 0xe706459000000000, + 0xe7d7440000000000, 0xe868400000000000, 0xe8b9419000000000, + 0xebca409000000000, 0xeb1b410000000000, 0xed2c429000000000, + 0xedfd430000000000, 0xee8e420000000000, 0xee5f439000000000, + 0xf0f04b0000000000, 0xf0214a9000000000, 0xf3524b9000000000, + 0xf3834a0000000000, 0xf5b4499000000000, 0xf565480000000000, + 0xf616490000000000, 0xf6c7489000000000, 0xf9784c9000000000, + 0xf9a94d0000000000, 0xfada4c0000000000, 0xfa0b4d9000000000, + 0xfc3c4e0000000000, 0xfced4f9000000000, 0xff9e4e9000000000, + 0xff4f4f0000000000}, + {0x0000000000000000, 0xd101900000000000, 0xa203200100000000, + 0x7302b00100000000, 0x4407400200000000, 0x9506d00200000000, + 0xe604600300000000, 0x3705f00300000000, 0x880e800400000000, + 0x590f100400000000, 0x2a0da00500000000, 0xfb0c300500000000, + 0xcc09c00600000000, 0x1d08500600000000, 0x6e0ae00700000000, + 0xbf0b700700000000, 0x101d000900000000, 0xc11c900900000000, + 0xb21e200800000000, 0x631fb00800000000, 0x541a400b00000000, + 0x851bd00b00000000, 0xf619600a00000000, 0x2718f00a00000000, + 0x9813800d00000000, 0x4912100d00000000, 0x3a10a00c00000000, + 0xeb11300c00000000, 0xdc14c00f00000000, 0x0d15500f00000000, + 0x7e17e00e00000000, 0xaf16700e00000000, 0x203a001200000000, + 0xf13b901200000000, 0x8239201300000000, 0x5338b01300000000, + 0x643d401000000000, 0xb53cd01000000000, 0xc63e601100000000, + 0x173ff01100000000, 0xa834801600000000, 0x7935101600000000, + 0x0a37a01700000000, 0xdb36301700000000, 0xec33c01400000000, + 0x3d32501400000000, 0x4e30e01500000000, 0x9f31701500000000, + 0x3027001b00000000, 0xe126901b00000000, 0x9224201a00000000, + 0x4325b01a00000000, 0x7420401900000000, 0xa521d01900000000, + 0xd623601800000000, 0x0722f01800000000, 0xb829801f00000000, + 0x6928101f00000000, 0x1a2aa01e00000000, 0xcb2b301e00000000, + 0xfc2ec01d00000000, 0x2d2f501d00000000, 0x5e2de01c00000000, + 0x8f2c701c00000000, 0x4074002400000000, 0x9175902400000000, + 0xe277202500000000, 0x3376b02500000000, 0x0473402600000000, + 0xd572d02600000000, 0xa670602700000000, 0x7771f02700000000, + 0xc87a802000000000, 0x197b102000000000, 0x6a79a02100000000, + 0xbb78302100000000, 0x8c7dc02200000000, 0x5d7c502200000000, + 0x2e7ee02300000000, 0xff7f702300000000, 0x5069002d00000000, + 0x8168902d00000000, 0xf26a202c00000000, 0x236bb02c00000000, + 0x146e402f00000000, 0xc56fd02f00000000, 0xb66d602e00000000, + 0x676cf02e00000000, 0xd867802900000000, 0x0966102900000000, + 0x7a64a02800000000, 0xab65302800000000, 0x9c60c02b00000000, + 0x4d61502b00000000, 0x3e63e02a00000000, 0xef62702a00000000, + 0x604e003600000000, 0xb14f903600000000, 0xc24d203700000000, + 0x134cb03700000000, 0x2449403400000000, 0xf548d03400000000, + 0x864a603500000000, 0x574bf03500000000, 0xe840803200000000, + 0x3941103200000000, 0x4a43a03300000000, 0x9b42303300000000, + 0xac47c03000000000, 0x7d46503000000000, 0x0e44e03100000000, + 0xdf45703100000000, 0x7053003f00000000, 0xa152903f00000000, + 0xd250203e00000000, 0x0351b03e00000000, 0x3454403d00000000, + 0xe555d03d00000000, 0x9657603c00000000, 0x4756f03c00000000, + 0xf85d803b00000000, 0x295c103b00000000, 0x5a5ea03a00000000, + 0x8b5f303a00000000, 0xbc5ac03900000000, 0x6d5b503900000000, + 0x1e59e03800000000, 0xcf58703800000000, 0x80e8004800000000, + 0x51e9904800000000, 0x22eb204900000000, 0xf3eab04900000000, + 0xc4ef404a00000000, 0x15eed04a00000000, 0x66ec604b00000000, + 0xb7edf04b00000000, 0x08e6804c00000000, 0xd9e7104c00000000, + 0xaae5a04d00000000, 0x7be4304d00000000, 0x4ce1c04e00000000, + 0x9de0504e00000000, 0xeee2e04f00000000, 0x3fe3704f00000000, + 0x90f5004100000000, 0x41f4904100000000, 0x32f6204000000000, + 0xe3f7b04000000000, 0xd4f2404300000000, 0x05f3d04300000000, + 0x76f1604200000000, 0xa7f0f04200000000, 0x18fb804500000000, + 0xc9fa104500000000, 0xbaf8a04400000000, 0x6bf9304400000000, + 0x5cfcc04700000000, 0x8dfd504700000000, 0xfeffe04600000000, + 0x2ffe704600000000, 0xa0d2005a00000000, 0x71d3905a00000000, + 0x02d1205b00000000, 0xd3d0b05b00000000, 0xe4d5405800000000, + 0x35d4d05800000000, 0x46d6605900000000, 0x97d7f05900000000, + 0x28dc805e00000000, 0xf9dd105e00000000, 0x8adfa05f00000000, + 0x5bde305f00000000, 0x6cdbc05c00000000, 0xbdda505c00000000, + 0xced8e05d00000000, 0x1fd9705d00000000, 0xb0cf005300000000, + 0x61ce905300000000, 0x12cc205200000000, 0xc3cdb05200000000, + 0xf4c8405100000000, 0x25c9d05100000000, 0x56cb605000000000, + 0x87caf05000000000, 0x38c1805700000000, 0xe9c0105700000000, + 0x9ac2a05600000000, 0x4bc3305600000000, 0x7cc6c05500000000, + 0xadc7505500000000, 0xdec5e05400000000, 0x0fc4705400000000, + 0xc09c006c00000000, 0x119d906c00000000, 0x629f206d00000000, + 0xb39eb06d00000000, 0x849b406e00000000, 0x559ad06e00000000, + 0x2698606f00000000, 0xf799f06f00000000, 0x4892806800000000, + 0x9993106800000000, 0xea91a06900000000, 0x3b90306900000000, + 0x0c95c06a00000000, 0xdd94506a00000000, 0xae96e06b00000000, + 0x7f97706b00000000, 0xd081006500000000, 0x0180906500000000, + 0x7282206400000000, 0xa383b06400000000, 0x9486406700000000, + 0x4587d06700000000, 0x3685606600000000, 0xe784f06600000000, + 0x588f806100000000, 0x898e106100000000, 0xfa8ca06000000000, + 0x2b8d306000000000, 0x1c88c06300000000, 0xcd89506300000000, + 0xbe8be06200000000, 0x6f8a706200000000, 0xe0a6007e00000000, + 0x31a7907e00000000, 0x42a5207f00000000, 0x93a4b07f00000000, + 0xa4a1407c00000000, 0x75a0d07c00000000, 0x06a2607d00000000, + 0xd7a3f07d00000000, 0x68a8807a00000000, 0xb9a9107a00000000, + 0xcaaba07b00000000, 0x1baa307b00000000, 0x2cafc07800000000, + 0xfdae507800000000, 0x8eace07900000000, 0x5fad707900000000, + 0xf0bb007700000000, 0x21ba907700000000, 0x52b8207600000000, + 0x83b9b07600000000, 0xb4bc407500000000, 0x65bdd07500000000, + 0x16bf607400000000, 0xc7bef07400000000, 0x78b5807300000000, + 0xa9b4107300000000, 0xdab6a07200000000, 0x0bb7307200000000, + 0x3cb2c07100000000, 0xedb3507100000000, 0x9eb1e07000000000, + 0x4fb0707000000000}, + {0x0000000000000000, 0x0141906500000000, 0x028220cb00000000, + 0x03c3b0ae00000000, 0x0704422600000000, 0x0645d24300000000, + 0x058662ed00000000, 0x04c7f28800000000, 0x0e08844c00000000, + 0x0f49142900000000, 0x0c8aa48700000000, 0x0dcb34e200000000, + 0x090cc66a00000000, 0x084d560f00000000, 0x0b8ee6a100000000, + 0x0acf76c400000000, 0x1c10089900000000, 0x1d5198fc00000000, + 0x1e92285200000000, 0x1fd3b83700000000, 0x1b144abf00000000, + 0x1a55dada00000000, 0x19966a7400000000, 0x18d7fa1100000000, + 0x12188cd500000000, 0x13591cb000000000, 0x109aac1e00000000, + 0x11db3c7b00000000, 0x151ccef300000000, 0x145d5e9600000000, + 0x179eee3800000000, 0x16df7e5d00000000, 0x3b20138200000000, + 0x3a6183e700000000, 0x39a2334900000000, 0x38e3a32c00000000, + 0x3c2451a400000000, 0x3d65c1c100000000, 0x3ea6716f00000000, + 0x3fe7e10a00000000, 0x352897ce00000000, 0x346907ab00000000, + 0x37aab70500000000, 0x36eb276000000000, 0x322cd5e800000000, + 0x336d458d00000000, 0x30aef52300000000, 0x31ef654600000000, + 0x27301b1b00000000, 0x26718b7e00000000, 0x25b23bd000000000, + 0x24f3abb500000000, 0x2034593d00000000, 0x2175c95800000000, + 0x22b679f600000000, 0x23f7e99300000000, 0x29389f5700000000, + 0x28790f3200000000, 0x2bbabf9c00000000, 0x2afb2ff900000000, + 0x2e3cdd7100000000, 0x2f7d4d1400000000, 0x2cbefdba00000000, + 0x2dff6ddf00000000, 0x754025b400000000, 0x7401b5d100000000, + 0x77c2057f00000000, 0x7683951a00000000, 0x7244679200000000, + 0x7305f7f700000000, 0x70c6475900000000, 0x7187d73c00000000, + 0x7b48a1f800000000, 0x7a09319d00000000, 0x79ca813300000000, + 0x788b115600000000, 0x7c4ce3de00000000, 0x7d0d73bb00000000, + 0x7ecec31500000000, 0x7f8f537000000000, 0x69502d2d00000000, + 0x6811bd4800000000, 0x6bd20de600000000, 0x6a939d8300000000, + 0x6e546f0b00000000, 0x6f15ff6e00000000, 0x6cd64fc000000000, + 0x6d97dfa500000000, 0x6758a96100000000, 0x6619390400000000, + 0x65da89aa00000000, 0x649b19cf00000000, 0x605ceb4700000000, + 0x611d7b2200000000, 0x62decb8c00000000, 0x639f5be900000000, + 0x4e60363600000000, 0x4f21a65300000000, 0x4ce216fd00000000, + 0x4da3869800000000, 0x4964741000000000, 0x4825e47500000000, + 0x4be654db00000000, 0x4aa7c4be00000000, 0x4068b27a00000000, + 0x4129221f00000000, 0x42ea92b100000000, 0x43ab02d400000000, + 0x476cf05c00000000, 0x462d603900000000, 0x45eed09700000000, + 0x44af40f200000000, 0x52703eaf00000000, 0x5331aeca00000000, + 0x50f21e6400000000, 0x51b38e0100000000, 0x55747c8900000000, + 0x5435ecec00000000, 0x57f65c4200000000, 0x56b7cc2700000000, + 0x5c78bae300000000, 0x5d392a8600000000, 0x5efa9a2800000000, + 0x5fbb0a4d00000000, 0x5b7cf8c500000000, 0x5a3d68a000000000, + 0x59fed80e00000000, 0x58bf486b00000000, 0xe98049d800000000, + 0xe8c1d9bd00000000, 0xeb02691300000000, 0xea43f97600000000, + 0xee840bfe00000000, 0xefc59b9b00000000, 0xec062b3500000000, + 0xed47bb5000000000, 0xe788cd9400000000, 0xe6c95df100000000, + 0xe50aed5f00000000, 0xe44b7d3a00000000, 0xe08c8fb200000000, + 0xe1cd1fd700000000, 0xe20eaf7900000000, 0xe34f3f1c00000000, + 0xf590414100000000, 0xf4d1d12400000000, 0xf712618a00000000, + 0xf653f1ef00000000, 0xf294036700000000, 0xf3d5930200000000, + 0xf01623ac00000000, 0xf157b3c900000000, 0xfb98c50d00000000, + 0xfad9556800000000, 0xf91ae5c600000000, 0xf85b75a300000000, + 0xfc9c872b00000000, 0xfddd174e00000000, 0xfe1ea7e000000000, + 0xff5f378500000000, 0xd2a05a5a00000000, 0xd3e1ca3f00000000, + 0xd0227a9100000000, 0xd163eaf400000000, 0xd5a4187c00000000, + 0xd4e5881900000000, 0xd72638b700000000, 0xd667a8d200000000, + 0xdca8de1600000000, 0xdde94e7300000000, 0xde2afedd00000000, + 0xdf6b6eb800000000, 0xdbac9c3000000000, 0xdaed0c5500000000, + 0xd92ebcfb00000000, 0xd86f2c9e00000000, 0xceb052c300000000, + 0xcff1c2a600000000, 0xcc32720800000000, 0xcd73e26d00000000, + 0xc9b410e500000000, 0xc8f5808000000000, 0xcb36302e00000000, + 0xca77a04b00000000, 0xc0b8d68f00000000, 0xc1f946ea00000000, + 0xc23af64400000000, 0xc37b662100000000, 0xc7bc94a900000000, + 0xc6fd04cc00000000, 0xc53eb46200000000, 0xc47f240700000000, + 0x9cc06c6c00000000, 0x9d81fc0900000000, 0x9e424ca700000000, + 0x9f03dcc200000000, 0x9bc42e4a00000000, 0x9a85be2f00000000, + 0x99460e8100000000, 0x98079ee400000000, 0x92c8e82000000000, + 0x9389784500000000, 0x904ac8eb00000000, 0x910b588e00000000, + 0x95ccaa0600000000, 0x948d3a6300000000, 0x974e8acd00000000, + 0x960f1aa800000000, 0x80d064f500000000, 0x8191f49000000000, + 0x8252443e00000000, 0x8313d45b00000000, 0x87d426d300000000, + 0x8695b6b600000000, 0x8556061800000000, 0x8417967d00000000, + 0x8ed8e0b900000000, 0x8f9970dc00000000, 0x8c5ac07200000000, + 0x8d1b501700000000, 0x89dca29f00000000, 0x889d32fa00000000, + 0x8b5e825400000000, 0x8a1f123100000000, 0xa7e07fee00000000, + 0xa6a1ef8b00000000, 0xa5625f2500000000, 0xa423cf4000000000, + 0xa0e43dc800000000, 0xa1a5adad00000000, 0xa2661d0300000000, + 0xa3278d6600000000, 0xa9e8fba200000000, 0xa8a96bc700000000, + 0xab6adb6900000000, 0xaa2b4b0c00000000, 0xaeecb98400000000, + 0xafad29e100000000, 0xac6e994f00000000, 0xad2f092a00000000, + 0xbbf0777700000000, 0xbab1e71200000000, 0xb97257bc00000000, + 0xb833c7d900000000, 0xbcf4355100000000, 0xbdb5a53400000000, + 0xbe76159a00000000, 0xbf3785ff00000000, 0xb5f8f33b00000000, + 0xb4b9635e00000000, 0xb77ad3f000000000, 0xb63b439500000000, + 0xb2fcb11d00000000, 0xb3bd217800000000, 0xb07e91d600000000, + 0xb13f01b300000000}}; + +#else /* W == 4 */ + +static const crc_t crc_braid_table[][256] = { + {0x00000000, 0x41000001, 0x82000002, 0xc3000003, 0xb4030007, + 0xf5030006, 0x36030005, 0x77030004, 0xd805000d, 0x9905000c, + 0x5a05000f, 0x1b05000e, 0x6c06000a, 0x2d06000b, 0xee060008, + 0xaf060009, 0x00090019, 0x41090018, 0x8209001b, 0xc309001a, + 0xb40a001e, 0xf50a001f, 0x360a001c, 0x770a001d, 0xd80c0014, + 0x990c0015, 0x5a0c0016, 0x1b0c0017, 0x6c0f0013, 0x2d0f0012, + 0xee0f0011, 0xaf0f0010, 0x00120032, 0x41120033, 0x82120030, + 0xc3120031, 0xb4110035, 0xf5110034, 0x36110037, 0x77110036, + 0xd817003f, 0x9917003e, 0x5a17003d, 0x1b17003c, 0x6c140038, + 0x2d140039, 0xee14003a, 0xaf14003b, 0x001b002b, 0x411b002a, + 0x821b0029, 0xc31b0028, 0xb418002c, 0xf518002d, 0x3618002e, + 0x7718002f, 0xd81e0026, 0x991e0027, 0x5a1e0024, 0x1b1e0025, + 0x6c1d0021, 0x2d1d0020, 0xee1d0023, 0xaf1d0022, 0x00240064, + 0x41240065, 0x82240066, 0xc3240067, 0xb4270063, 0xf5270062, + 0x36270061, 0x77270060, 0xd8210069, 0x99210068, 0x5a21006b, + 0x1b21006a, 0x6c22006e, 0x2d22006f, 0xee22006c, 0xaf22006d, + 0x002d007d, 0x412d007c, 0x822d007f, 0xc32d007e, 0xb42e007a, + 0xf52e007b, 0x362e0078, 0x772e0079, 0xd8280070, 0x99280071, + 0x5a280072, 0x1b280073, 0x6c2b0077, 0x2d2b0076, 0xee2b0075, + 0xaf2b0074, 0x00360056, 0x41360057, 0x82360054, 0xc3360055, + 0xb4350051, 0xf5350050, 0x36350053, 0x77350052, 0xd833005b, + 0x9933005a, 0x5a330059, 0x1b330058, 0x6c30005c, 0x2d30005d, + 0xee30005e, 0xaf30005f, 0x003f004f, 0x413f004e, 0x823f004d, + 0xc33f004c, 0xb43c0048, 0xf53c0049, 0x363c004a, 0x773c004b, + 0xd83a0042, 0x993a0043, 0x5a3a0040, 0x1b3a0041, 0x6c390045, + 0x2d390044, 0xee390047, 0xaf390046, 0x004800c8, 0x414800c9, + 0x824800ca, 0xc34800cb, 0xb44b00cf, 0xf54b00ce, 0x364b00cd, + 0x774b00cc, 0xd84d00c5, 0x994d00c4, 0x5a4d00c7, 0x1b4d00c6, + 0x6c4e00c2, 0x2d4e00c3, 0xee4e00c0, 0xaf4e00c1, 0x004100d1, + 0x414100d0, 0x824100d3, 0xc34100d2, 0xb44200d6, 0xf54200d7, + 0x364200d4, 0x774200d5, 0xd84400dc, 0x994400dd, 0x5a4400de, + 0x1b4400df, 0x6c4700db, 0x2d4700da, 0xee4700d9, 0xaf4700d8, + 0x005a00fa, 0x415a00fb, 0x825a00f8, 0xc35a00f9, 0xb45900fd, + 0xf55900fc, 0x365900ff, 0x775900fe, 0xd85f00f7, 0x995f00f6, + 0x5a5f00f5, 0x1b5f00f4, 0x6c5c00f0, 0x2d5c00f1, 0xee5c00f2, + 0xaf5c00f3, 0x005300e3, 0x415300e2, 0x825300e1, 0xc35300e0, + 0xb45000e4, 0xf55000e5, 0x365000e6, 0x775000e7, 0xd85600ee, + 0x995600ef, 0x5a5600ec, 0x1b5600ed, 0x6c5500e9, 0x2d5500e8, + 0xee5500eb, 0xaf5500ea, 0x006c00ac, 0x416c00ad, 0x826c00ae, + 0xc36c00af, 0xb46f00ab, 0xf56f00aa, 0x366f00a9, 0x776f00a8, + 0xd86900a1, 0x996900a0, 0x5a6900a3, 0x1b6900a2, 0x6c6a00a6, + 0x2d6a00a7, 0xee6a00a4, 0xaf6a00a5, 0x006500b5, 0x416500b4, + 0x826500b7, 0xc36500b6, 0xb46600b2, 0xf56600b3, 0x366600b0, + 0x776600b1, 0xd86000b8, 0x996000b9, 0x5a6000ba, 0x1b6000bb, + 0x6c6300bf, 0x2d6300be, 0xee6300bd, 0xaf6300bc, 0x007e009e, + 0x417e009f, 0x827e009c, 0xc37e009d, 0xb47d0099, 0xf57d0098, + 0x367d009b, 0x777d009a, 0xd87b0093, 0x997b0092, 0x5a7b0091, + 0x1b7b0090, 0x6c780094, 0x2d780095, 0xee780096, 0xaf780097, + 0x00770087, 0x41770086, 0x82770085, 0xc3770084, 0xb4740080, + 0xf5740081, 0x36740082, 0x77740083, 0xd872008a, 0x9972008b, + 0x5a720088, 0x1b720089, 0x6c71008d, 0x2d71008c, 0xee71008f, + 0xaf71008e}, + {0x00000000, 0x00900190, 0x01200320, 0x01b002b0, 0x02400640, + 0x02d007d0, 0x03600560, 0x03f004f0, 0x04800c80, 0x04100d10, + 0x05a00fa0, 0x05300e30, 0x06c00ac0, 0x06500b50, 0x07e009e0, + 0x07700870, 0x09001900, 0x09901890, 0x08201a20, 0x08b01bb0, + 0x0b401f40, 0x0bd01ed0, 0x0a601c60, 0x0af01df0, 0x0d801580, + 0x0d101410, 0x0ca016a0, 0x0c301730, 0x0fc013c0, 0x0f501250, + 0x0ee010e0, 0x0e701170, 0x12003200, 0x12903390, 0x13203120, + 0x13b030b0, 0x10403440, 0x10d035d0, 0x11603760, 0x11f036f0, + 0x16803e80, 0x16103f10, 0x17a03da0, 0x17303c30, 0x14c038c0, + 0x14503950, 0x15e03be0, 0x15703a70, 0x1b002b00, 0x1b902a90, + 0x1a202820, 0x1ab029b0, 0x19402d40, 0x19d02cd0, 0x18602e60, + 0x18f02ff0, 0x1f802780, 0x1f102610, 0x1ea024a0, 0x1e302530, + 0x1dc021c0, 0x1d502050, 0x1ce022e0, 0x1c702370, 0x24006400, + 0x24906590, 0x25206720, 0x25b066b0, 0x26406240, 0x26d063d0, + 0x27606160, 0x27f060f0, 0x20806880, 0x20106910, 0x21a06ba0, + 0x21306a30, 0x22c06ec0, 0x22506f50, 0x23e06de0, 0x23706c70, + 0x2d007d00, 0x2d907c90, 0x2c207e20, 0x2cb07fb0, 0x2f407b40, + 0x2fd07ad0, 0x2e607860, 0x2ef079f0, 0x29807180, 0x29107010, + 0x28a072a0, 0x28307330, 0x2bc077c0, 0x2b507650, 0x2ae074e0, + 0x2a707570, 0x36005600, 0x36905790, 0x37205520, 0x37b054b0, + 0x34405040, 0x34d051d0, 0x35605360, 0x35f052f0, 0x32805a80, + 0x32105b10, 0x33a059a0, 0x33305830, 0x30c05cc0, 0x30505d50, + 0x31e05fe0, 0x31705e70, 0x3f004f00, 0x3f904e90, 0x3e204c20, + 0x3eb04db0, 0x3d404940, 0x3dd048d0, 0x3c604a60, 0x3cf04bf0, + 0x3b804380, 0x3b104210, 0x3aa040a0, 0x3a304130, 0x39c045c0, + 0x39504450, 0x38e046e0, 0x38704770, 0x4800c800, 0x4890c990, + 0x4920cb20, 0x49b0cab0, 0x4a40ce40, 0x4ad0cfd0, 0x4b60cd60, + 0x4bf0ccf0, 0x4c80c480, 0x4c10c510, 0x4da0c7a0, 0x4d30c630, + 0x4ec0c2c0, 0x4e50c350, 0x4fe0c1e0, 0x4f70c070, 0x4100d100, + 0x4190d090, 0x4020d220, 0x40b0d3b0, 0x4340d740, 0x43d0d6d0, + 0x4260d460, 0x42f0d5f0, 0x4580dd80, 0x4510dc10, 0x44a0dea0, + 0x4430df30, 0x47c0dbc0, 0x4750da50, 0x46e0d8e0, 0x4670d970, + 0x5a00fa00, 0x5a90fb90, 0x5b20f920, 0x5bb0f8b0, 0x5840fc40, + 0x58d0fdd0, 0x5960ff60, 0x59f0fef0, 0x5e80f680, 0x5e10f710, + 0x5fa0f5a0, 0x5f30f430, 0x5cc0f0c0, 0x5c50f150, 0x5de0f3e0, + 0x5d70f270, 0x5300e300, 0x5390e290, 0x5220e020, 0x52b0e1b0, + 0x5140e540, 0x51d0e4d0, 0x5060e660, 0x50f0e7f0, 0x5780ef80, + 0x5710ee10, 0x56a0eca0, 0x5630ed30, 0x55c0e9c0, 0x5550e850, + 0x54e0eae0, 0x5470eb70, 0x6c00ac00, 0x6c90ad90, 0x6d20af20, + 0x6db0aeb0, 0x6e40aa40, 0x6ed0abd0, 0x6f60a960, 0x6ff0a8f0, + 0x6880a080, 0x6810a110, 0x69a0a3a0, 0x6930a230, 0x6ac0a6c0, + 0x6a50a750, 0x6be0a5e0, 0x6b70a470, 0x6500b500, 0x6590b490, + 0x6420b620, 0x64b0b7b0, 0x6740b340, 0x67d0b2d0, 0x6660b060, + 0x66f0b1f0, 0x6180b980, 0x6110b810, 0x60a0baa0, 0x6030bb30, + 0x63c0bfc0, 0x6350be50, 0x62e0bce0, 0x6270bd70, 0x7e009e00, + 0x7e909f90, 0x7f209d20, 0x7fb09cb0, 0x7c409840, 0x7cd099d0, + 0x7d609b60, 0x7df09af0, 0x7a809280, 0x7a109310, 0x7ba091a0, + 0x7b309030, 0x78c094c0, 0x78509550, 0x79e097e0, 0x79709670, + 0x77008700, 0x77908690, 0x76208420, 0x76b085b0, 0x75408140, + 0x75d080d0, 0x74608260, 0x74f083f0, 0x73808b80, 0x73108a10, + 0x72a088a0, 0x72308930, 0x71c08dc0, 0x71508c50, 0x70e08ee0, + 0x70708f70}, + {0x00000000, 0x90019000, 0x90002003, 0x0001b003, 0x90034005, + 0x0002d005, 0x00036006, 0x9002f006, 0x90058009, 0x00041009, + 0x0005a00a, 0x9004300a, 0x0006c00c, 0x9007500c, 0x9006e00f, + 0x0007700f, 0x90080011, 0x00099011, 0x00082012, 0x9009b012, + 0x000b4014, 0x900ad014, 0x900b6017, 0x000af017, 0x000d8018, + 0x900c1018, 0x900da01b, 0x000c301b, 0x900ec01d, 0x000f501d, + 0x000ee01e, 0x900f701e, 0x90130021, 0x00129021, 0x00132022, + 0x9012b022, 0x00104024, 0x9011d024, 0x90106027, 0x0011f027, + 0x00168028, 0x90171028, 0x9016a02b, 0x0017302b, 0x9015c02d, + 0x0014502d, 0x0015e02e, 0x9014702e, 0x001b0030, 0x901a9030, + 0x901b2033, 0x001ab033, 0x90184035, 0x0019d035, 0x00186036, + 0x9019f036, 0x901e8039, 0x001f1039, 0x001ea03a, 0x901f303a, + 0x001dc03c, 0x901c503c, 0x901de03f, 0x001c703f, 0x90250041, + 0x00249041, 0x00252042, 0x9024b042, 0x00264044, 0x9027d044, + 0x90266047, 0x0027f047, 0x00208048, 0x90211048, 0x9020a04b, + 0x0021304b, 0x9023c04d, 0x0022504d, 0x0023e04e, 0x9022704e, + 0x002d0050, 0x902c9050, 0x902d2053, 0x002cb053, 0x902e4055, + 0x002fd055, 0x002e6056, 0x902ff056, 0x90288059, 0x00291059, + 0x0028a05a, 0x9029305a, 0x002bc05c, 0x902a505c, 0x902be05f, + 0x002a705f, 0x00360060, 0x90379060, 0x90362063, 0x0037b063, + 0x90354065, 0x0034d065, 0x00356066, 0x9034f066, 0x90338069, + 0x00321069, 0x0033a06a, 0x9032306a, 0x0030c06c, 0x9031506c, + 0x9030e06f, 0x0031706f, 0x903e0071, 0x003f9071, 0x003e2072, + 0x903fb072, 0x003d4074, 0x903cd074, 0x903d6077, 0x003cf077, + 0x003b8078, 0x903a1078, 0x903ba07b, 0x003a307b, 0x9038c07d, + 0x0039507d, 0x0038e07e, 0x9039707e, 0x90490081, 0x00489081, + 0x00492082, 0x9048b082, 0x004a4084, 0x904bd084, 0x904a6087, + 0x004bf087, 0x004c8088, 0x904d1088, 0x904ca08b, 0x004d308b, + 0x904fc08d, 0x004e508d, 0x004fe08e, 0x904e708e, 0x00410090, + 0x90409090, 0x90412093, 0x0040b093, 0x90424095, 0x0043d095, + 0x00426096, 0x9043f096, 0x90448099, 0x00451099, 0x0044a09a, + 0x9045309a, 0x0047c09c, 0x9046509c, 0x9047e09f, 0x0046709f, + 0x005a00a0, 0x905b90a0, 0x905a20a3, 0x005bb0a3, 0x905940a5, + 0x0058d0a5, 0x005960a6, 0x9058f0a6, 0x905f80a9, 0x005e10a9, + 0x005fa0aa, 0x905e30aa, 0x005cc0ac, 0x905d50ac, 0x905ce0af, + 0x005d70af, 0x905200b1, 0x005390b1, 0x005220b2, 0x9053b0b2, + 0x005140b4, 0x9050d0b4, 0x905160b7, 0x0050f0b7, 0x005780b8, + 0x905610b8, 0x9057a0bb, 0x005630bb, 0x9054c0bd, 0x005550bd, + 0x0054e0be, 0x905570be, 0x006c00c0, 0x906d90c0, 0x906c20c3, + 0x006db0c3, 0x906f40c5, 0x006ed0c5, 0x006f60c6, 0x906ef0c6, + 0x906980c9, 0x006810c9, 0x0069a0ca, 0x906830ca, 0x006ac0cc, + 0x906b50cc, 0x906ae0cf, 0x006b70cf, 0x906400d1, 0x006590d1, + 0x006420d2, 0x9065b0d2, 0x006740d4, 0x9066d0d4, 0x906760d7, + 0x0066f0d7, 0x006180d8, 0x906010d8, 0x9061a0db, 0x006030db, + 0x9062c0dd, 0x006350dd, 0x0062e0de, 0x906370de, 0x907f00e1, + 0x007e90e1, 0x007f20e2, 0x907eb0e2, 0x007c40e4, 0x907dd0e4, + 0x907c60e7, 0x007df0e7, 0x007a80e8, 0x907b10e8, 0x907aa0eb, + 0x007b30eb, 0x9079c0ed, 0x007850ed, 0x0079e0ee, 0x907870ee, + 0x007700f0, 0x907690f0, 0x907720f3, 0x0076b0f3, 0x907440f5, + 0x0075d0f5, 0x007460f6, 0x9075f0f6, 0x907280f9, 0x007310f9, + 0x0072a0fa, 0x907330fa, 0x0071c0fc, 0x907050fc, 0x9071e0ff, + 0x007070ff}, + {0x00000000, 0x90910101, 0x91210201, 0x01b00300, 0x92410401, + 0x02d00500, 0x03600600, 0x93f10701, 0x94810801, 0x04100900, + 0x05a00a00, 0x95310b01, 0x06c00c00, 0x96510d01, 0x97e10e01, + 0x07700f00, 0x99011001, 0x09901100, 0x08201200, 0x98b11301, + 0x0b401400, 0x9bd11501, 0x9a611601, 0x0af01700, 0x0d801800, + 0x9d111901, 0x9ca11a01, 0x0c301b00, 0x9fc11c01, 0x0f501d00, + 0x0ee01e00, 0x9e711f01, 0x82012001, 0x12902100, 0x13202200, + 0x83b12301, 0x10402400, 0x80d12501, 0x81612601, 0x11f02700, + 0x16802800, 0x86112901, 0x87a12a01, 0x17302b00, 0x84c12c01, + 0x14502d00, 0x15e02e00, 0x85712f01, 0x1b003000, 0x8b913101, + 0x8a213201, 0x1ab03300, 0x89413401, 0x19d03500, 0x18603600, + 0x88f13701, 0x8f813801, 0x1f103900, 0x1ea03a00, 0x8e313b01, + 0x1dc03c00, 0x8d513d01, 0x8ce13e01, 0x1c703f00, 0xb4014001, + 0x24904100, 0x25204200, 0xb5b14301, 0x26404400, 0xb6d14501, + 0xb7614601, 0x27f04700, 0x20804800, 0xb0114901, 0xb1a14a01, + 0x21304b00, 0xb2c14c01, 0x22504d00, 0x23e04e00, 0xb3714f01, + 0x2d005000, 0xbd915101, 0xbc215201, 0x2cb05300, 0xbf415401, + 0x2fd05500, 0x2e605600, 0xbef15701, 0xb9815801, 0x29105900, + 0x28a05a00, 0xb8315b01, 0x2bc05c00, 0xbb515d01, 0xbae15e01, + 0x2a705f00, 0x36006000, 0xa6916101, 0xa7216201, 0x37b06300, + 0xa4416401, 0x34d06500, 0x35606600, 0xa5f16701, 0xa2816801, + 0x32106900, 0x33a06a00, 0xa3316b01, 0x30c06c00, 0xa0516d01, + 0xa1e16e01, 0x31706f00, 0xaf017001, 0x3f907100, 0x3e207200, + 0xaeb17301, 0x3d407400, 0xadd17501, 0xac617601, 0x3cf07700, + 0x3b807800, 0xab117901, 0xaaa17a01, 0x3a307b00, 0xa9c17c01, + 0x39507d00, 0x38e07e00, 0xa8717f01, 0xd8018001, 0x48908100, + 0x49208200, 0xd9b18301, 0x4a408400, 0xdad18501, 0xdb618601, + 0x4bf08700, 0x4c808800, 0xdc118901, 0xdda18a01, 0x4d308b00, + 0xdec18c01, 0x4e508d00, 0x4fe08e00, 0xdf718f01, 0x41009000, + 0xd1919101, 0xd0219201, 0x40b09300, 0xd3419401, 0x43d09500, + 0x42609600, 0xd2f19701, 0xd5819801, 0x45109900, 0x44a09a00, + 0xd4319b01, 0x47c09c00, 0xd7519d01, 0xd6e19e01, 0x46709f00, + 0x5a00a000, 0xca91a101, 0xcb21a201, 0x5bb0a300, 0xc841a401, + 0x58d0a500, 0x5960a600, 0xc9f1a701, 0xce81a801, 0x5e10a900, + 0x5fa0aa00, 0xcf31ab01, 0x5cc0ac00, 0xcc51ad01, 0xcde1ae01, + 0x5d70af00, 0xc301b001, 0x5390b100, 0x5220b200, 0xc2b1b301, + 0x5140b400, 0xc1d1b501, 0xc061b601, 0x50f0b700, 0x5780b800, + 0xc711b901, 0xc6a1ba01, 0x5630bb00, 0xc5c1bc01, 0x5550bd00, + 0x54e0be00, 0xc471bf01, 0x6c00c000, 0xfc91c101, 0xfd21c201, + 0x6db0c300, 0xfe41c401, 0x6ed0c500, 0x6f60c600, 0xfff1c701, + 0xf881c801, 0x6810c900, 0x69a0ca00, 0xf931cb01, 0x6ac0cc00, + 0xfa51cd01, 0xfbe1ce01, 0x6b70cf00, 0xf501d001, 0x6590d100, + 0x6420d200, 0xf4b1d301, 0x6740d400, 0xf7d1d501, 0xf661d601, + 0x66f0d700, 0x6180d800, 0xf111d901, 0xf0a1da01, 0x6030db00, + 0xf3c1dc01, 0x6350dd00, 0x62e0de00, 0xf271df01, 0xee01e001, + 0x7e90e100, 0x7f20e200, 0xefb1e301, 0x7c40e400, 0xecd1e501, + 0xed61e601, 0x7df0e700, 0x7a80e800, 0xea11e901, 0xeba1ea01, + 0x7b30eb00, 0xe8c1ec01, 0x7850ed00, 0x79e0ee00, 0xe971ef01, + 0x7700f000, 0xe791f101, 0xe621f201, 0x76b0f300, 0xe541f401, + 0x75d0f500, 0x7460f600, 0xe4f1f701, 0xe381f801, 0x7310f900, + 0x72a0fa00, 0xe231fb01, 0x71c0fc00, 0xe151fd01, 0xe0e1fe01, + 0x7070ff00}}; + +static const word_t crc_braid_big_table[][256] = { + {0x00000000, 0x01019190, 0x01022191, 0x0003b001, 0x01044192, + 0x0005d002, 0x00066003, 0x0107f193, 0x01088194, 0x00091004, + 0x000aa005, 0x010b3195, 0x000cc006, 0x010d5196, 0x010ee197, + 0x000f7007, 0x01100199, 0x00119009, 0x00122008, 0x0113b198, + 0x0014400b, 0x0115d19b, 0x0116619a, 0x0017f00a, 0x0018800d, + 0x0119119d, 0x011aa19c, 0x001b300c, 0x011cc19f, 0x001d500f, + 0x001ee00e, 0x011f719e, 0x01200182, 0x00219012, 0x00222013, + 0x0123b183, 0x00244010, 0x0125d180, 0x01266181, 0x0027f011, + 0x00288016, 0x01291186, 0x012aa187, 0x002b3017, 0x012cc184, + 0x002d5014, 0x002ee015, 0x012f7185, 0x0030001b, 0x0131918b, + 0x0132218a, 0x0033b01a, 0x01344189, 0x0035d019, 0x00366018, + 0x0137f188, 0x0138818f, 0x0039101f, 0x003aa01e, 0x013b318e, + 0x003cc01d, 0x013d518d, 0x013ee18c, 0x003f701c, 0x014001b4, + 0x00419024, 0x00422025, 0x0143b1b5, 0x00444026, 0x0145d1b6, + 0x014661b7, 0x0047f027, 0x00488020, 0x014911b0, 0x014aa1b1, + 0x004b3021, 0x014cc1b2, 0x004d5022, 0x004ee023, 0x014f71b3, + 0x0050002d, 0x015191bd, 0x015221bc, 0x0053b02c, 0x015441bf, + 0x0055d02f, 0x0056602e, 0x0157f1be, 0x015881b9, 0x00591029, + 0x005aa028, 0x015b31b8, 0x005cc02b, 0x015d51bb, 0x015ee1ba, + 0x005f702a, 0x00600036, 0x016191a6, 0x016221a7, 0x0063b037, + 0x016441a4, 0x0065d034, 0x00666035, 0x0167f1a5, 0x016881a2, + 0x00691032, 0x006aa033, 0x016b31a3, 0x006cc030, 0x016d51a0, + 0x016ee1a1, 0x006f7031, 0x017001af, 0x0071903f, 0x0072203e, + 0x0173b1ae, 0x0074403d, 0x0175d1ad, 0x017661ac, 0x0077f03c, + 0x0078803b, 0x017911ab, 0x017aa1aa, 0x007b303a, 0x017cc1a9, + 0x007d5039, 0x007ee038, 0x017f71a8, 0x018001d8, 0x00819048, + 0x00822049, 0x0183b1d9, 0x0084404a, 0x0185d1da, 0x018661db, + 0x0087f04b, 0x0088804c, 0x018911dc, 0x018aa1dd, 0x008b304d, + 0x018cc1de, 0x008d504e, 0x008ee04f, 0x018f71df, 0x00900041, + 0x019191d1, 0x019221d0, 0x0093b040, 0x019441d3, 0x0095d043, + 0x00966042, 0x0197f1d2, 0x019881d5, 0x00991045, 0x009aa044, + 0x019b31d4, 0x009cc047, 0x019d51d7, 0x019ee1d6, 0x009f7046, + 0x00a0005a, 0x01a191ca, 0x01a221cb, 0x00a3b05b, 0x01a441c8, + 0x00a5d058, 0x00a66059, 0x01a7f1c9, 0x01a881ce, 0x00a9105e, + 0x00aaa05f, 0x01ab31cf, 0x00acc05c, 0x01ad51cc, 0x01aee1cd, + 0x00af705d, 0x01b001c3, 0x00b19053, 0x00b22052, 0x01b3b1c2, + 0x00b44051, 0x01b5d1c1, 0x01b661c0, 0x00b7f050, 0x00b88057, + 0x01b911c7, 0x01baa1c6, 0x00bb3056, 0x01bcc1c5, 0x00bd5055, + 0x00bee054, 0x01bf71c4, 0x00c0006c, 0x01c191fc, 0x01c221fd, + 0x00c3b06d, 0x01c441fe, 0x00c5d06e, 0x00c6606f, 0x01c7f1ff, + 0x01c881f8, 0x00c91068, 0x00caa069, 0x01cb31f9, 0x00ccc06a, + 0x01cd51fa, 0x01cee1fb, 0x00cf706b, 0x01d001f5, 0x00d19065, + 0x00d22064, 0x01d3b1f4, 0x00d44067, 0x01d5d1f7, 0x01d661f6, + 0x00d7f066, 0x00d88061, 0x01d911f1, 0x01daa1f0, 0x00db3060, + 0x01dcc1f3, 0x00dd5063, 0x00dee062, 0x01df71f2, 0x01e001ee, + 0x00e1907e, 0x00e2207f, 0x01e3b1ef, 0x00e4407c, 0x01e5d1ec, + 0x01e661ed, 0x00e7f07d, 0x00e8807a, 0x01e911ea, 0x01eaa1eb, + 0x00eb307b, 0x01ecc1e8, 0x00ed5078, 0x00eee079, 0x01ef71e9, + 0x00f00077, 0x01f191e7, 0x01f221e6, 0x00f3b076, 0x01f441e5, + 0x00f5d075, 0x00f66074, 0x01f7f1e4, 0x01f881e3, 0x00f91073, + 0x00faa072, 0x01fb31e2, 0x00fcc071, 0x01fd51e1, 0x01fee1e0, + 0x00ff7070}, + {0x00000000, 0x00900190, 0x03200090, 0x03b00100, 0x05400390, + 0x05d00200, 0x06600300, 0x06f00290, 0x09800590, 0x09100400, + 0x0aa00500, 0x0a300490, 0x0cc00600, 0x0c500790, 0x0fe00690, + 0x0f700700, 0x11000890, 0x11900900, 0x12200800, 0x12b00990, + 0x14400b00, 0x14d00a90, 0x17600b90, 0x17f00a00, 0x18800d00, + 0x18100c90, 0x1ba00d90, 0x1b300c00, 0x1dc00e90, 0x1d500f00, + 0x1ee00e00, 0x1e700f90, 0x21001390, 0x21901200, 0x22201300, + 0x22b01290, 0x24401000, 0x24d01190, 0x27601090, 0x27f01100, + 0x28801600, 0x28101790, 0x2ba01690, 0x2b301700, 0x2dc01590, + 0x2d501400, 0x2ee01500, 0x2e701490, 0x30001b00, 0x30901a90, + 0x33201b90, 0x33b01a00, 0x35401890, 0x35d01900, 0x36601800, + 0x36f01990, 0x39801e90, 0x39101f00, 0x3aa01e00, 0x3a301f90, + 0x3cc01d00, 0x3c501c90, 0x3fe01d90, 0x3f701c00, 0x41002590, + 0x41902400, 0x42202500, 0x42b02490, 0x44402600, 0x44d02790, + 0x47602690, 0x47f02700, 0x48802000, 0x48102190, 0x4ba02090, + 0x4b302100, 0x4dc02390, 0x4d502200, 0x4ee02300, 0x4e702290, + 0x50002d00, 0x50902c90, 0x53202d90, 0x53b02c00, 0x55402e90, + 0x55d02f00, 0x56602e00, 0x56f02f90, 0x59802890, 0x59102900, + 0x5aa02800, 0x5a302990, 0x5cc02b00, 0x5c502a90, 0x5fe02b90, + 0x5f702a00, 0x60003600, 0x60903790, 0x63203690, 0x63b03700, + 0x65403590, 0x65d03400, 0x66603500, 0x66f03490, 0x69803390, + 0x69103200, 0x6aa03300, 0x6a303290, 0x6cc03000, 0x6c503190, + 0x6fe03090, 0x6f703100, 0x71003e90, 0x71903f00, 0x72203e00, + 0x72b03f90, 0x74403d00, 0x74d03c90, 0x77603d90, 0x77f03c00, + 0x78803b00, 0x78103a90, 0x7ba03b90, 0x7b303a00, 0x7dc03890, + 0x7d503900, 0x7ee03800, 0x7e703990, 0x81004990, 0x81904800, + 0x82204900, 0x82b04890, 0x84404a00, 0x84d04b90, 0x87604a90, + 0x87f04b00, 0x88804c00, 0x88104d90, 0x8ba04c90, 0x8b304d00, + 0x8dc04f90, 0x8d504e00, 0x8ee04f00, 0x8e704e90, 0x90004100, + 0x90904090, 0x93204190, 0x93b04000, 0x95404290, 0x95d04300, + 0x96604200, 0x96f04390, 0x99804490, 0x99104500, 0x9aa04400, + 0x9a304590, 0x9cc04700, 0x9c504690, 0x9fe04790, 0x9f704600, + 0xa0005a00, 0xa0905b90, 0xa3205a90, 0xa3b05b00, 0xa5405990, + 0xa5d05800, 0xa6605900, 0xa6f05890, 0xa9805f90, 0xa9105e00, + 0xaaa05f00, 0xaa305e90, 0xacc05c00, 0xac505d90, 0xafe05c90, + 0xaf705d00, 0xb1005290, 0xb1905300, 0xb2205200, 0xb2b05390, + 0xb4405100, 0xb4d05090, 0xb7605190, 0xb7f05000, 0xb8805700, + 0xb8105690, 0xbba05790, 0xbb305600, 0xbdc05490, 0xbd505500, + 0xbee05400, 0xbe705590, 0xc0006c00, 0xc0906d90, 0xc3206c90, + 0xc3b06d00, 0xc5406f90, 0xc5d06e00, 0xc6606f00, 0xc6f06e90, + 0xc9806990, 0xc9106800, 0xcaa06900, 0xca306890, 0xccc06a00, + 0xcc506b90, 0xcfe06a90, 0xcf706b00, 0xd1006490, 0xd1906500, + 0xd2206400, 0xd2b06590, 0xd4406700, 0xd4d06690, 0xd7606790, + 0xd7f06600, 0xd8806100, 0xd8106090, 0xdba06190, 0xdb306000, + 0xddc06290, 0xdd506300, 0xdee06200, 0xde706390, 0xe1007f90, + 0xe1907e00, 0xe2207f00, 0xe2b07e90, 0xe4407c00, 0xe4d07d90, + 0xe7607c90, 0xe7f07d00, 0xe8807a00, 0xe8107b90, 0xeba07a90, + 0xeb307b00, 0xedc07990, 0xed507800, 0xeee07900, 0xee707890, + 0xf0007700, 0xf0907690, 0xf3207790, 0xf3b07600, 0xf5407490, + 0xf5d07500, 0xf6607400, 0xf6f07590, 0xf9807290, 0xf9107300, + 0xfaa07200, 0xfa307390, 0xfcc07100, 0xfc507090, 0xffe07190, + 0xff707000}, + {0x00000000, 0x90019000, 0x20032001, 0xb002b001, 0x40064002, + 0xd007d002, 0x60056003, 0xf004f003, 0x800c8004, 0x100d1004, + 0xa00fa005, 0x300e3005, 0xc00ac006, 0x500b5006, 0xe009e007, + 0x70087007, 0x00190009, 0x90189009, 0x201a2008, 0xb01bb008, + 0x401f400b, 0xd01ed00b, 0x601c600a, 0xf01df00a, 0x8015800d, + 0x1014100d, 0xa016a00c, 0x3017300c, 0xc013c00f, 0x5012500f, + 0xe010e00e, 0x7011700e, 0x00320012, 0x90339012, 0x20312013, + 0xb030b013, 0x40344010, 0xd035d010, 0x60376011, 0xf036f011, + 0x803e8016, 0x103f1016, 0xa03da017, 0x303c3017, 0xc038c014, + 0x50395014, 0xe03be015, 0x703a7015, 0x002b001b, 0x902a901b, + 0x2028201a, 0xb029b01a, 0x402d4019, 0xd02cd019, 0x602e6018, + 0xf02ff018, 0x8027801f, 0x1026101f, 0xa024a01e, 0x3025301e, + 0xc021c01d, 0x5020501d, 0xe022e01c, 0x7023701c, 0x00640024, + 0x90659024, 0x20672025, 0xb066b025, 0x40624026, 0xd063d026, + 0x60616027, 0xf060f027, 0x80688020, 0x10691020, 0xa06ba021, + 0x306a3021, 0xc06ec022, 0x506f5022, 0xe06de023, 0x706c7023, + 0x007d002d, 0x907c902d, 0x207e202c, 0xb07fb02c, 0x407b402f, + 0xd07ad02f, 0x6078602e, 0xf079f02e, 0x80718029, 0x10701029, + 0xa072a028, 0x30733028, 0xc077c02b, 0x5076502b, 0xe074e02a, + 0x7075702a, 0x00560036, 0x90579036, 0x20552037, 0xb054b037, + 0x40504034, 0xd051d034, 0x60536035, 0xf052f035, 0x805a8032, + 0x105b1032, 0xa059a033, 0x30583033, 0xc05cc030, 0x505d5030, + 0xe05fe031, 0x705e7031, 0x004f003f, 0x904e903f, 0x204c203e, + 0xb04db03e, 0x4049403d, 0xd048d03d, 0x604a603c, 0xf04bf03c, + 0x8043803b, 0x1042103b, 0xa040a03a, 0x3041303a, 0xc045c039, + 0x50445039, 0xe046e038, 0x70477038, 0x00c80048, 0x90c99048, + 0x20cb2049, 0xb0cab049, 0x40ce404a, 0xd0cfd04a, 0x60cd604b, + 0xf0ccf04b, 0x80c4804c, 0x10c5104c, 0xa0c7a04d, 0x30c6304d, + 0xc0c2c04e, 0x50c3504e, 0xe0c1e04f, 0x70c0704f, 0x00d10041, + 0x90d09041, 0x20d22040, 0xb0d3b040, 0x40d74043, 0xd0d6d043, + 0x60d46042, 0xf0d5f042, 0x80dd8045, 0x10dc1045, 0xa0dea044, + 0x30df3044, 0xc0dbc047, 0x50da5047, 0xe0d8e046, 0x70d97046, + 0x00fa005a, 0x90fb905a, 0x20f9205b, 0xb0f8b05b, 0x40fc4058, + 0xd0fdd058, 0x60ff6059, 0xf0fef059, 0x80f6805e, 0x10f7105e, + 0xa0f5a05f, 0x30f4305f, 0xc0f0c05c, 0x50f1505c, 0xe0f3e05d, + 0x70f2705d, 0x00e30053, 0x90e29053, 0x20e02052, 0xb0e1b052, + 0x40e54051, 0xd0e4d051, 0x60e66050, 0xf0e7f050, 0x80ef8057, + 0x10ee1057, 0xa0eca056, 0x30ed3056, 0xc0e9c055, 0x50e85055, + 0xe0eae054, 0x70eb7054, 0x00ac006c, 0x90ad906c, 0x20af206d, + 0xb0aeb06d, 0x40aa406e, 0xd0abd06e, 0x60a9606f, 0xf0a8f06f, + 0x80a08068, 0x10a11068, 0xa0a3a069, 0x30a23069, 0xc0a6c06a, + 0x50a7506a, 0xe0a5e06b, 0x70a4706b, 0x00b50065, 0x90b49065, + 0x20b62064, 0xb0b7b064, 0x40b34067, 0xd0b2d067, 0x60b06066, + 0xf0b1f066, 0x80b98061, 0x10b81061, 0xa0baa060, 0x30bb3060, + 0xc0bfc063, 0x50be5063, 0xe0bce062, 0x70bd7062, 0x009e007e, + 0x909f907e, 0x209d207f, 0xb09cb07f, 0x4098407c, 0xd099d07c, + 0x609b607d, 0xf09af07d, 0x8092807a, 0x1093107a, 0xa091a07b, + 0x3090307b, 0xc094c078, 0x50955078, 0xe097e079, 0x70967079, + 0x00870077, 0x90869077, 0x20842076, 0xb085b076, 0x40814075, + 0xd080d075, 0x60826074, 0xf083f074, 0x808b8073, 0x108a1073, + 0xa088a072, 0x30893072, 0xc08dc071, 0x508c5071, 0xe08ee070, + 0x708f7070}, + {0x00000000, 0x01000041, 0x02000082, 0x030000c3, 0x070003b4, + 0x060003f5, 0x05000336, 0x04000377, 0x0d0005d8, 0x0c000599, + 0x0f00055a, 0x0e00051b, 0x0a00066c, 0x0b00062d, 0x080006ee, + 0x090006af, 0x19000900, 0x18000941, 0x1b000982, 0x1a0009c3, + 0x1e000ab4, 0x1f000af5, 0x1c000a36, 0x1d000a77, 0x14000cd8, + 0x15000c99, 0x16000c5a, 0x17000c1b, 0x13000f6c, 0x12000f2d, + 0x11000fee, 0x10000faf, 0x32001200, 0x33001241, 0x30001282, + 0x310012c3, 0x350011b4, 0x340011f5, 0x37001136, 0x36001177, + 0x3f0017d8, 0x3e001799, 0x3d00175a, 0x3c00171b, 0x3800146c, + 0x3900142d, 0x3a0014ee, 0x3b0014af, 0x2b001b00, 0x2a001b41, + 0x29001b82, 0x28001bc3, 0x2c0018b4, 0x2d0018f5, 0x2e001836, + 0x2f001877, 0x26001ed8, 0x27001e99, 0x24001e5a, 0x25001e1b, + 0x21001d6c, 0x20001d2d, 0x23001dee, 0x22001daf, 0x64002400, + 0x65002441, 0x66002482, 0x670024c3, 0x630027b4, 0x620027f5, + 0x61002736, 0x60002777, 0x690021d8, 0x68002199, 0x6b00215a, + 0x6a00211b, 0x6e00226c, 0x6f00222d, 0x6c0022ee, 0x6d0022af, + 0x7d002d00, 0x7c002d41, 0x7f002d82, 0x7e002dc3, 0x7a002eb4, + 0x7b002ef5, 0x78002e36, 0x79002e77, 0x700028d8, 0x71002899, + 0x7200285a, 0x7300281b, 0x77002b6c, 0x76002b2d, 0x75002bee, + 0x74002baf, 0x56003600, 0x57003641, 0x54003682, 0x550036c3, + 0x510035b4, 0x500035f5, 0x53003536, 0x52003577, 0x5b0033d8, + 0x5a003399, 0x5900335a, 0x5800331b, 0x5c00306c, 0x5d00302d, + 0x5e0030ee, 0x5f0030af, 0x4f003f00, 0x4e003f41, 0x4d003f82, + 0x4c003fc3, 0x48003cb4, 0x49003cf5, 0x4a003c36, 0x4b003c77, + 0x42003ad8, 0x43003a99, 0x40003a5a, 0x41003a1b, 0x4500396c, + 0x4400392d, 0x470039ee, 0x460039af, 0xc8004800, 0xc9004841, + 0xca004882, 0xcb0048c3, 0xcf004bb4, 0xce004bf5, 0xcd004b36, + 0xcc004b77, 0xc5004dd8, 0xc4004d99, 0xc7004d5a, 0xc6004d1b, + 0xc2004e6c, 0xc3004e2d, 0xc0004eee, 0xc1004eaf, 0xd1004100, + 0xd0004141, 0xd3004182, 0xd20041c3, 0xd60042b4, 0xd70042f5, + 0xd4004236, 0xd5004277, 0xdc0044d8, 0xdd004499, 0xde00445a, + 0xdf00441b, 0xdb00476c, 0xda00472d, 0xd90047ee, 0xd80047af, + 0xfa005a00, 0xfb005a41, 0xf8005a82, 0xf9005ac3, 0xfd0059b4, + 0xfc0059f5, 0xff005936, 0xfe005977, 0xf7005fd8, 0xf6005f99, + 0xf5005f5a, 0xf4005f1b, 0xf0005c6c, 0xf1005c2d, 0xf2005cee, + 0xf3005caf, 0xe3005300, 0xe2005341, 0xe1005382, 0xe00053c3, + 0xe40050b4, 0xe50050f5, 0xe6005036, 0xe7005077, 0xee0056d8, + 0xef005699, 0xec00565a, 0xed00561b, 0xe900556c, 0xe800552d, + 0xeb0055ee, 0xea0055af, 0xac006c00, 0xad006c41, 0xae006c82, + 0xaf006cc3, 0xab006fb4, 0xaa006ff5, 0xa9006f36, 0xa8006f77, + 0xa10069d8, 0xa0006999, 0xa300695a, 0xa200691b, 0xa6006a6c, + 0xa7006a2d, 0xa4006aee, 0xa5006aaf, 0xb5006500, 0xb4006541, + 0xb7006582, 0xb60065c3, 0xb20066b4, 0xb30066f5, 0xb0006636, + 0xb1006677, 0xb80060d8, 0xb9006099, 0xba00605a, 0xbb00601b, + 0xbf00636c, 0xbe00632d, 0xbd0063ee, 0xbc0063af, 0x9e007e00, + 0x9f007e41, 0x9c007e82, 0x9d007ec3, 0x99007db4, 0x98007df5, + 0x9b007d36, 0x9a007d77, 0x93007bd8, 0x92007b99, 0x91007b5a, + 0x90007b1b, 0x9400786c, 0x9500782d, 0x960078ee, 0x970078af, + 0x87007700, 0x86007741, 0x85007782, 0x840077c3, 0x800074b4, + 0x810074f5, 0x82007436, 0x83007477, 0x8a0072d8, 0x8b007299, + 0x8800725a, 0x8900721b, 0x8d00716c, 0x8c00712d, 0x8f0071ee, + 0x8e0071af}}; + +#endif + +#endif + +#if N == 2 + +#if W == 8 + +static const crc_t crc_braid_table[][256] = { + {0x00000000, 0x6c90c100, 0xd9218200, 0xb5b14300, 0x02400403, + 0x6ed0c503, 0xdb618603, 0xb7f14703, 0x04800806, 0x6810c906, + 0xdda18a06, 0xb1314b06, 0x06c00c05, 0x6a50cd05, 0xdfe18e05, + 0xb3714f05, 0x0900100c, 0x6590d10c, 0xd021920c, 0xbcb1530c, + 0x0b40140f, 0x67d0d50f, 0xd261960f, 0xbef1570f, 0x0d80180a, + 0x6110d90a, 0xd4a19a0a, 0xb8315b0a, 0x0fc01c09, 0x6350dd09, + 0xd6e19e09, 0xba715f09, 0x12002018, 0x7e90e118, 0xcb21a218, + 0xa7b16318, 0x1040241b, 0x7cd0e51b, 0xc961a61b, 0xa5f1671b, + 0x1680281e, 0x7a10e91e, 0xcfa1aa1e, 0xa3316b1e, 0x14c02c1d, + 0x7850ed1d, 0xcde1ae1d, 0xa1716f1d, 0x1b003014, 0x7790f114, + 0xc221b214, 0xaeb17314, 0x19403417, 0x75d0f517, 0xc061b617, + 0xacf17717, 0x1f803812, 0x7310f912, 0xc6a1ba12, 0xaa317b12, + 0x1dc03c11, 0x7150fd11, 0xc4e1be11, 0xa8717f11, 0x24004030, + 0x48908130, 0xfd21c230, 0x91b10330, 0x26404433, 0x4ad08533, + 0xff61c633, 0x93f10733, 0x20804836, 0x4c108936, 0xf9a1ca36, + 0x95310b36, 0x22c04c35, 0x4e508d35, 0xfbe1ce35, 0x97710f35, + 0x2d00503c, 0x4190913c, 0xf421d23c, 0x98b1133c, 0x2f40543f, + 0x43d0953f, 0xf661d63f, 0x9af1173f, 0x2980583a, 0x4510993a, + 0xf0a1da3a, 0x9c311b3a, 0x2bc05c39, 0x47509d39, 0xf2e1de39, + 0x9e711f39, 0x36006028, 0x5a90a128, 0xef21e228, 0x83b12328, + 0x3440642b, 0x58d0a52b, 0xed61e62b, 0x81f1272b, 0x3280682e, + 0x5e10a92e, 0xeba1ea2e, 0x87312b2e, 0x30c06c2d, 0x5c50ad2d, + 0xe9e1ee2d, 0x85712f2d, 0x3f007024, 0x5390b124, 0xe621f224, + 0x8ab13324, 0x3d407427, 0x51d0b527, 0xe461f627, 0x88f13727, + 0x3b807822, 0x5710b922, 0xe2a1fa22, 0x8e313b22, 0x39c07c21, + 0x5550bd21, 0xe0e1fe21, 0x8c713f21, 0x48008060, 0x24904160, + 0x91210260, 0xfdb1c360, 0x4a408463, 0x26d04563, 0x93610663, + 0xfff1c763, 0x4c808866, 0x20104966, 0x95a10a66, 0xf931cb66, + 0x4ec08c65, 0x22504d65, 0x97e10e65, 0xfb71cf65, 0x4100906c, + 0x2d90516c, 0x9821126c, 0xf4b1d36c, 0x4340946f, 0x2fd0556f, + 0x9a61166f, 0xf6f1d76f, 0x4580986a, 0x2910596a, 0x9ca11a6a, + 0xf031db6a, 0x47c09c69, 0x2b505d69, 0x9ee11e69, 0xf271df69, + 0x5a00a078, 0x36906178, 0x83212278, 0xefb1e378, 0x5840a47b, + 0x34d0657b, 0x8161267b, 0xedf1e77b, 0x5e80a87e, 0x3210697e, + 0x87a12a7e, 0xeb31eb7e, 0x5cc0ac7d, 0x30506d7d, 0x85e12e7d, + 0xe971ef7d, 0x5300b074, 0x3f907174, 0x8a213274, 0xe6b1f374, + 0x5140b477, 0x3dd07577, 0x88613677, 0xe4f1f777, 0x5780b872, + 0x3b107972, 0x8ea13a72, 0xe231fb72, 0x55c0bc71, 0x39507d71, + 0x8ce13e71, 0xe071ff71, 0x6c00c050, 0x00900150, 0xb5214250, + 0xd9b18350, 0x6e40c453, 0x02d00553, 0xb7614653, 0xdbf18753, + 0x6880c856, 0x04100956, 0xb1a14a56, 0xdd318b56, 0x6ac0cc55, + 0x06500d55, 0xb3e14e55, 0xdf718f55, 0x6500d05c, 0x0990115c, + 0xbc21525c, 0xd0b1935c, 0x6740d45f, 0x0bd0155f, 0xbe61565f, + 0xd2f1975f, 0x6180d85a, 0x0d10195a, 0xb8a15a5a, 0xd4319b5a, + 0x63c0dc59, 0x0f501d59, 0xbae15e59, 0xd6719f59, 0x7e00e048, + 0x12902148, 0xa7216248, 0xcbb1a348, 0x7c40e44b, 0x10d0254b, + 0xa561664b, 0xc9f1a74b, 0x7a80e84e, 0x1610294e, 0xa3a16a4e, + 0xcf31ab4e, 0x78c0ec4d, 0x14502d4d, 0xa1e16e4d, 0xcd71af4d, + 0x7700f044, 0x1b903144, 0xae217244, 0xc2b1b344, 0x7540f447, + 0x19d03547, 0xac617647, 0xc0f1b747, 0x7380f842, 0x1f103942, + 0xaaa17a42, 0xc631bb42, 0x71c0fc41, 0x1d503d41, 0xa8e17e41, + 0xc471bf41}, + {0x00000000, 0x900100c0, 0x90010183, 0x00000143, 0x90010305, + 0x000003c5, 0x00000286, 0x90010246, 0x90010609, 0x000006c9, + 0x0000078a, 0x9001074a, 0x0000050c, 0x900105cc, 0x9001048f, + 0x0000044f, 0x90010c11, 0x00000cd1, 0x00000d92, 0x90010d52, + 0x00000f14, 0x90010fd4, 0x90010e97, 0x00000e57, 0x00000a18, + 0x90010ad8, 0x90010b9b, 0x00000b5b, 0x9001091d, 0x000009dd, + 0x0000089e, 0x9001085e, 0x90011821, 0x000018e1, 0x000019a2, + 0x90011962, 0x00001b24, 0x90011be4, 0x90011aa7, 0x00001a67, + 0x00001e28, 0x90011ee8, 0x90011fab, 0x00001f6b, 0x90011d2d, + 0x00001ded, 0x00001cae, 0x90011c6e, 0x00001430, 0x900114f0, + 0x900115b3, 0x00001573, 0x90011735, 0x000017f5, 0x000016b6, + 0x90011676, 0x90011239, 0x000012f9, 0x000013ba, 0x9001137a, + 0x0000113c, 0x900111fc, 0x900110bf, 0x0000107f, 0x90013041, + 0x00003081, 0x000031c2, 0x90013102, 0x00003344, 0x90013384, + 0x900132c7, 0x00003207, 0x00003648, 0x90013688, 0x900137cb, + 0x0000370b, 0x9001354d, 0x0000358d, 0x000034ce, 0x9001340e, + 0x00003c50, 0x90013c90, 0x90013dd3, 0x00003d13, 0x90013f55, + 0x00003f95, 0x00003ed6, 0x90013e16, 0x90013a59, 0x00003a99, + 0x00003bda, 0x90013b1a, 0x0000395c, 0x9001399c, 0x900138df, + 0x0000381f, 0x00002860, 0x900128a0, 0x900129e3, 0x00002923, + 0x90012b65, 0x00002ba5, 0x00002ae6, 0x90012a26, 0x90012e69, + 0x00002ea9, 0x00002fea, 0x90012f2a, 0x00002d6c, 0x90012dac, + 0x90012cef, 0x00002c2f, 0x90012471, 0x000024b1, 0x000025f2, + 0x90012532, 0x00002774, 0x900127b4, 0x900126f7, 0x00002637, + 0x00002278, 0x900122b8, 0x900123fb, 0x0000233b, 0x9001217d, + 0x000021bd, 0x000020fe, 0x9001203e, 0x90016081, 0x00006041, + 0x00006102, 0x900161c2, 0x00006384, 0x90016344, 0x90016207, + 0x000062c7, 0x00006688, 0x90016648, 0x9001670b, 0x000067cb, + 0x9001658d, 0x0000654d, 0x0000640e, 0x900164ce, 0x00006c90, + 0x90016c50, 0x90016d13, 0x00006dd3, 0x90016f95, 0x00006f55, + 0x00006e16, 0x90016ed6, 0x90016a99, 0x00006a59, 0x00006b1a, + 0x90016bda, 0x0000699c, 0x9001695c, 0x9001681f, 0x000068df, + 0x000078a0, 0x90017860, 0x90017923, 0x000079e3, 0x90017ba5, + 0x00007b65, 0x00007a26, 0x90017ae6, 0x90017ea9, 0x00007e69, + 0x00007f2a, 0x90017fea, 0x00007dac, 0x90017d6c, 0x90017c2f, + 0x00007cef, 0x900174b1, 0x00007471, 0x00007532, 0x900175f2, + 0x000077b4, 0x90017774, 0x90017637, 0x000076f7, 0x000072b8, + 0x90017278, 0x9001733b, 0x000073fb, 0x900171bd, 0x0000717d, + 0x0000703e, 0x900170fe, 0x000050c0, 0x90015000, 0x90015143, + 0x00005183, 0x900153c5, 0x00005305, 0x00005246, 0x90015286, + 0x900156c9, 0x00005609, 0x0000574a, 0x9001578a, 0x000055cc, + 0x9001550c, 0x9001544f, 0x0000548f, 0x90015cd1, 0x00005c11, + 0x00005d52, 0x90015d92, 0x00005fd4, 0x90015f14, 0x90015e57, + 0x00005e97, 0x00005ad8, 0x90015a18, 0x90015b5b, 0x00005b9b, + 0x900159dd, 0x0000591d, 0x0000585e, 0x9001589e, 0x900148e1, + 0x00004821, 0x00004962, 0x900149a2, 0x00004be4, 0x90014b24, + 0x90014a67, 0x00004aa7, 0x00004ee8, 0x90014e28, 0x90014f6b, + 0x00004fab, 0x90014ded, 0x00004d2d, 0x00004c6e, 0x90014cae, + 0x000044f0, 0x90014430, 0x90014573, 0x000045b3, 0x900147f5, + 0x00004735, 0x00004676, 0x900146b6, 0x900142f9, 0x00004239, + 0x0000437a, 0x900143ba, 0x000041fc, 0x9001413c, 0x9001407f, + 0x000040bf}, + {0x00000000, 0x9001c101, 0x90008201, 0x00014300, 0x90020401, + 0x0003c500, 0x00028600, 0x90034701, 0x90070801, 0x0006c900, + 0x00078a00, 0x90064b01, 0x00050c00, 0x9004cd01, 0x90058e01, + 0x00044f00, 0x900d1001, 0x000cd100, 0x000d9200, 0x900c5301, + 0x000f1400, 0x900ed501, 0x900f9601, 0x000e5700, 0x000a1800, + 0x900bd901, 0x900a9a01, 0x000b5b00, 0x90081c01, 0x0009dd00, + 0x00089e00, 0x90095f01, 0x90192001, 0x0018e100, 0x0019a200, + 0x90186301, 0x001b2400, 0x901ae501, 0x901ba601, 0x001a6700, + 0x001e2800, 0x901fe901, 0x901eaa01, 0x001f6b00, 0x901c2c01, + 0x001ded00, 0x001cae00, 0x901d6f01, 0x00143000, 0x9015f101, + 0x9014b201, 0x00157300, 0x90163401, 0x0017f500, 0x0016b600, + 0x90177701, 0x90133801, 0x0012f900, 0x0013ba00, 0x90127b01, + 0x00113c00, 0x9010fd01, 0x9011be01, 0x00107f00, 0x90314001, + 0x00308100, 0x0031c200, 0x90300301, 0x00334400, 0x90328501, + 0x9033c601, 0x00320700, 0x00364800, 0x90378901, 0x9036ca01, + 0x00370b00, 0x90344c01, 0x00358d00, 0x0034ce00, 0x90350f01, + 0x003c5000, 0x903d9101, 0x903cd201, 0x003d1300, 0x903e5401, + 0x003f9500, 0x003ed600, 0x903f1701, 0x903b5801, 0x003a9900, + 0x003bda00, 0x903a1b01, 0x00395c00, 0x90389d01, 0x9039de01, + 0x00381f00, 0x00286000, 0x9029a101, 0x9028e201, 0x00292300, + 0x902a6401, 0x002ba500, 0x002ae600, 0x902b2701, 0x902f6801, + 0x002ea900, 0x002fea00, 0x902e2b01, 0x002d6c00, 0x902cad01, + 0x902dee01, 0x002c2f00, 0x90257001, 0x0024b100, 0x0025f200, + 0x90243301, 0x00277400, 0x9026b501, 0x9027f601, 0x00263700, + 0x00227800, 0x9023b901, 0x9022fa01, 0x00233b00, 0x90207c01, + 0x0021bd00, 0x0020fe00, 0x90213f01, 0x90618001, 0x00604100, + 0x00610200, 0x9060c301, 0x00638400, 0x90624501, 0x90630601, + 0x0062c700, 0x00668800, 0x90674901, 0x90660a01, 0x0067cb00, + 0x90648c01, 0x00654d00, 0x00640e00, 0x9065cf01, 0x006c9000, + 0x906d5101, 0x906c1201, 0x006dd300, 0x906e9401, 0x006f5500, + 0x006e1600, 0x906fd701, 0x906b9801, 0x006a5900, 0x006b1a00, + 0x906adb01, 0x00699c00, 0x90685d01, 0x90691e01, 0x0068df00, + 0x0078a000, 0x90796101, 0x90782201, 0x0079e300, 0x907aa401, + 0x007b6500, 0x007a2600, 0x907be701, 0x907fa801, 0x007e6900, + 0x007f2a00, 0x907eeb01, 0x007dac00, 0x907c6d01, 0x907d2e01, + 0x007cef00, 0x9075b001, 0x00747100, 0x00753200, 0x9074f301, + 0x0077b400, 0x90767501, 0x90773601, 0x0076f700, 0x0072b800, + 0x90737901, 0x90723a01, 0x0073fb00, 0x9070bc01, 0x00717d00, + 0x00703e00, 0x9071ff01, 0x0050c000, 0x90510101, 0x90504201, + 0x00518300, 0x9052c401, 0x00530500, 0x00524600, 0x90538701, + 0x9057c801, 0x00560900, 0x00574a00, 0x90568b01, 0x0055cc00, + 0x90540d01, 0x90554e01, 0x00548f00, 0x905dd001, 0x005c1100, + 0x005d5200, 0x905c9301, 0x005fd400, 0x905e1501, 0x905f5601, + 0x005e9700, 0x005ad800, 0x905b1901, 0x905a5a01, 0x005b9b00, + 0x9058dc01, 0x00591d00, 0x00585e00, 0x90599f01, 0x9049e001, + 0x00482100, 0x00496200, 0x9048a301, 0x004be400, 0x904a2501, + 0x904b6601, 0x004aa700, 0x004ee800, 0x904f2901, 0x904e6a01, + 0x004fab00, 0x904cec01, 0x004d2d00, 0x004c6e00, 0x904daf01, + 0x0044f000, 0x90453101, 0x90447201, 0x0045b300, 0x9046f401, + 0x00473500, 0x00467600, 0x9047b701, 0x9043f801, 0x00423900, + 0x00437a00, 0x9042bb01, 0x0041fc00, 0x90403d01, 0x90417e01, + 0x0040bf00}, + {0x00000000, 0x90c00001, 0x91830001, 0x01430000, 0x93050001, + 0x03c50000, 0x02860000, 0x92460001, 0x96090001, 0x06c90000, + 0x078a0000, 0x974a0001, 0x050c0000, 0x95cc0001, 0x948f0001, + 0x044f0000, 0x9c110001, 0x0cd10000, 0x0d920000, 0x9d520001, + 0x0f140000, 0x9fd40001, 0x9e970001, 0x0e570000, 0x0a180000, + 0x9ad80001, 0x9b9b0001, 0x0b5b0000, 0x991d0001, 0x09dd0000, + 0x089e0000, 0x985e0001, 0x88210001, 0x18e10000, 0x19a20000, + 0x89620001, 0x1b240000, 0x8be40001, 0x8aa70001, 0x1a670000, + 0x1e280000, 0x8ee80001, 0x8fab0001, 0x1f6b0000, 0x8d2d0001, + 0x1ded0000, 0x1cae0000, 0x8c6e0001, 0x14300000, 0x84f00001, + 0x85b30001, 0x15730000, 0x87350001, 0x17f50000, 0x16b60000, + 0x86760001, 0x82390001, 0x12f90000, 0x13ba0000, 0x837a0001, + 0x113c0000, 0x81fc0001, 0x80bf0001, 0x107f0000, 0xa0410001, + 0x30810000, 0x31c20000, 0xa1020001, 0x33440000, 0xa3840001, + 0xa2c70001, 0x32070000, 0x36480000, 0xa6880001, 0xa7cb0001, + 0x370b0000, 0xa54d0001, 0x358d0000, 0x34ce0000, 0xa40e0001, + 0x3c500000, 0xac900001, 0xadd30001, 0x3d130000, 0xaf550001, + 0x3f950000, 0x3ed60000, 0xae160001, 0xaa590001, 0x3a990000, + 0x3bda0000, 0xab1a0001, 0x395c0000, 0xa99c0001, 0xa8df0001, + 0x381f0000, 0x28600000, 0xb8a00001, 0xb9e30001, 0x29230000, + 0xbb650001, 0x2ba50000, 0x2ae60000, 0xba260001, 0xbe690001, + 0x2ea90000, 0x2fea0000, 0xbf2a0001, 0x2d6c0000, 0xbdac0001, + 0xbcef0001, 0x2c2f0000, 0xb4710001, 0x24b10000, 0x25f20000, + 0xb5320001, 0x27740000, 0xb7b40001, 0xb6f70001, 0x26370000, + 0x22780000, 0xb2b80001, 0xb3fb0001, 0x233b0000, 0xb17d0001, + 0x21bd0000, 0x20fe0000, 0xb03e0001, 0xf0810001, 0x60410000, + 0x61020000, 0xf1c20001, 0x63840000, 0xf3440001, 0xf2070001, + 0x62c70000, 0x66880000, 0xf6480001, 0xf70b0001, 0x67cb0000, + 0xf58d0001, 0x654d0000, 0x640e0000, 0xf4ce0001, 0x6c900000, + 0xfc500001, 0xfd130001, 0x6dd30000, 0xff950001, 0x6f550000, + 0x6e160000, 0xfed60001, 0xfa990001, 0x6a590000, 0x6b1a0000, + 0xfbda0001, 0x699c0000, 0xf95c0001, 0xf81f0001, 0x68df0000, + 0x78a00000, 0xe8600001, 0xe9230001, 0x79e30000, 0xeba50001, + 0x7b650000, 0x7a260000, 0xeae60001, 0xeea90001, 0x7e690000, + 0x7f2a0000, 0xefea0001, 0x7dac0000, 0xed6c0001, 0xec2f0001, + 0x7cef0000, 0xe4b10001, 0x74710000, 0x75320000, 0xe5f20001, + 0x77b40000, 0xe7740001, 0xe6370001, 0x76f70000, 0x72b80000, + 0xe2780001, 0xe33b0001, 0x73fb0000, 0xe1bd0001, 0x717d0000, + 0x703e0000, 0xe0fe0001, 0x50c00000, 0xc0000001, 0xc1430001, + 0x51830000, 0xc3c50001, 0x53050000, 0x52460000, 0xc2860001, + 0xc6c90001, 0x56090000, 0x574a0000, 0xc78a0001, 0x55cc0000, + 0xc50c0001, 0xc44f0001, 0x548f0000, 0xccd10001, 0x5c110000, + 0x5d520000, 0xcd920001, 0x5fd40000, 0xcf140001, 0xce570001, + 0x5e970000, 0x5ad80000, 0xca180001, 0xcb5b0001, 0x5b9b0000, + 0xc9dd0001, 0x591d0000, 0x585e0000, 0xc89e0001, 0xd8e10001, + 0x48210000, 0x49620000, 0xd9a20001, 0x4be40000, 0xdb240001, + 0xda670001, 0x4aa70000, 0x4ee80000, 0xde280001, 0xdf6b0001, + 0x4fab0000, 0xdded0001, 0x4d2d0000, 0x4c6e0000, 0xdcae0001, + 0x44f00000, 0xd4300001, 0xd5730001, 0x45b30000, 0xd7f50001, + 0x47350000, 0x46760000, 0xd6b60001, 0xd2f90001, 0x42390000, + 0x437a0000, 0xd3ba0001, 0x41fc0000, 0xd13c0001, 0xd07f0001, + 0x40bf0000}, + {0x00000000, 0x51010001, 0xa2020002, 0xf3030003, 0xf4070007, + 0xa5060006, 0x56050005, 0x07040004, 0x580d000d, 0x090c000c, + 0xfa0f000f, 0xab0e000e, 0xac0a000a, 0xfd0b000b, 0x0e080008, + 0x5f090009, 0xb01a001a, 0xe11b001b, 0x12180018, 0x43190019, + 0x441d001d, 0x151c001c, 0xe61f001f, 0xb71e001e, 0xe8170017, + 0xb9160016, 0x4a150015, 0x1b140014, 0x1c100010, 0x4d110011, + 0xbe120012, 0xef130013, 0xd0370037, 0x81360036, 0x72350035, + 0x23340034, 0x24300030, 0x75310031, 0x86320032, 0xd7330033, + 0x883a003a, 0xd93b003b, 0x2a380038, 0x7b390039, 0x7c3d003d, + 0x2d3c003c, 0xde3f003f, 0x8f3e003e, 0x602d002d, 0x312c002c, + 0xc22f002f, 0x932e002e, 0x942a002a, 0xc52b002b, 0x36280028, + 0x67290029, 0x38200020, 0x69210021, 0x9a220022, 0xcb230023, + 0xcc270027, 0x9d260026, 0x6e250025, 0x3f240024, 0x106d006d, + 0x416c006c, 0xb26f006f, 0xe36e006e, 0xe46a006a, 0xb56b006b, + 0x46680068, 0x17690069, 0x48600060, 0x19610061, 0xea620062, + 0xbb630063, 0xbc670067, 0xed660066, 0x1e650065, 0x4f640064, + 0xa0770077, 0xf1760076, 0x02750075, 0x53740074, 0x54700070, + 0x05710071, 0xf6720072, 0xa7730073, 0xf87a007a, 0xa97b007b, + 0x5a780078, 0x0b790079, 0x0c7d007d, 0x5d7c007c, 0xae7f007f, + 0xff7e007e, 0xc05a005a, 0x915b005b, 0x62580058, 0x33590059, + 0x345d005d, 0x655c005c, 0x965f005f, 0xc75e005e, 0x98570057, + 0xc9560056, 0x3a550055, 0x6b540054, 0x6c500050, 0x3d510051, + 0xce520052, 0x9f530053, 0x70400040, 0x21410041, 0xd2420042, + 0x83430043, 0x84470047, 0xd5460046, 0x26450045, 0x77440044, + 0x284d004d, 0x794c004c, 0x8a4f004f, 0xdb4e004e, 0xdc4a004a, + 0x8d4b004b, 0x7e480048, 0x2f490049, 0x20da00da, 0x71db00db, + 0x82d800d8, 0xd3d900d9, 0xd4dd00dd, 0x85dc00dc, 0x76df00df, + 0x27de00de, 0x78d700d7, 0x29d600d6, 0xdad500d5, 0x8bd400d4, + 0x8cd000d0, 0xddd100d1, 0x2ed200d2, 0x7fd300d3, 0x90c000c0, + 0xc1c100c1, 0x32c200c2, 0x63c300c3, 0x64c700c7, 0x35c600c6, + 0xc6c500c5, 0x97c400c4, 0xc8cd00cd, 0x99cc00cc, 0x6acf00cf, + 0x3bce00ce, 0x3cca00ca, 0x6dcb00cb, 0x9ec800c8, 0xcfc900c9, + 0xf0ed00ed, 0xa1ec00ec, 0x52ef00ef, 0x03ee00ee, 0x04ea00ea, + 0x55eb00eb, 0xa6e800e8, 0xf7e900e9, 0xa8e000e0, 0xf9e100e1, + 0x0ae200e2, 0x5be300e3, 0x5ce700e7, 0x0de600e6, 0xfee500e5, + 0xafe400e4, 0x40f700f7, 0x11f600f6, 0xe2f500f5, 0xb3f400f4, + 0xb4f000f0, 0xe5f100f1, 0x16f200f2, 0x47f300f3, 0x18fa00fa, + 0x49fb00fb, 0xbaf800f8, 0xebf900f9, 0xecfd00fd, 0xbdfc00fc, + 0x4eff00ff, 0x1ffe00fe, 0x30b700b7, 0x61b600b6, 0x92b500b5, + 0xc3b400b4, 0xc4b000b0, 0x95b100b1, 0x66b200b2, 0x37b300b3, + 0x68ba00ba, 0x39bb00bb, 0xcab800b8, 0x9bb900b9, 0x9cbd00bd, + 0xcdbc00bc, 0x3ebf00bf, 0x6fbe00be, 0x80ad00ad, 0xd1ac00ac, + 0x22af00af, 0x73ae00ae, 0x74aa00aa, 0x25ab00ab, 0xd6a800a8, + 0x87a900a9, 0xd8a000a0, 0x89a100a1, 0x7aa200a2, 0x2ba300a3, + 0x2ca700a7, 0x7da600a6, 0x8ea500a5, 0xdfa400a4, 0xe0800080, + 0xb1810081, 0x42820082, 0x13830083, 0x14870087, 0x45860086, + 0xb6850085, 0xe7840084, 0xb88d008d, 0xe98c008c, 0x1a8f008f, + 0x4b8e008e, 0x4c8a008a, 0x1d8b008b, 0xee880088, 0xbf890089, + 0x509a009a, 0x019b009b, 0xf2980098, 0xa3990099, 0xa49d009d, + 0xf59c009c, 0x069f009f, 0x579e009e, 0x08970097, 0x59960096, + 0xaa950095, 0xfb940094, 0xfc900090, 0xad910091, 0x5e920092, + 0x0f930093}, + {0x00000000, 0x41b401b4, 0x83680368, 0xc2dc02dc, 0xb6d306d3, + 0xf7670767, 0x35bb05bb, 0x740f040f, 0xdda50da5, 0x9c110c11, + 0x5ecd0ecd, 0x1f790f79, 0x6b760b76, 0x2ac20ac2, 0xe81e081e, + 0xa9aa09aa, 0x0b491b49, 0x4afd1afd, 0x88211821, 0xc9951995, + 0xbd9a1d9a, 0xfc2e1c2e, 0x3ef21ef2, 0x7f461f46, 0xd6ec16ec, + 0x97581758, 0x55841584, 0x14301430, 0x603f103f, 0x218b118b, + 0xe3571357, 0xa2e312e3, 0x16923692, 0x57263726, 0x95fa35fa, + 0xd44e344e, 0xa0413041, 0xe1f531f5, 0x23293329, 0x629d329d, + 0xcb373b37, 0x8a833a83, 0x485f385f, 0x09eb39eb, 0x7de43de4, + 0x3c503c50, 0xfe8c3e8c, 0xbf383f38, 0x1ddb2ddb, 0x5c6f2c6f, + 0x9eb32eb3, 0xdf072f07, 0xab082b08, 0xeabc2abc, 0x28602860, + 0x69d429d4, 0xc07e207e, 0x81ca21ca, 0x43162316, 0x02a222a2, + 0x76ad26ad, 0x37192719, 0xf5c525c5, 0xb4712471, 0x2d246d24, + 0x6c906c90, 0xae4c6e4c, 0xeff86ff8, 0x9bf76bf7, 0xda436a43, + 0x189f689f, 0x592b692b, 0xf0816081, 0xb1356135, 0x73e963e9, + 0x325d625d, 0x46526652, 0x07e667e6, 0xc53a653a, 0x848e648e, + 0x266d766d, 0x67d977d9, 0xa5057505, 0xe4b174b1, 0x90be70be, + 0xd10a710a, 0x13d673d6, 0x52627262, 0xfbc87bc8, 0xba7c7a7c, + 0x78a078a0, 0x39147914, 0x4d1b7d1b, 0x0caf7caf, 0xce737e73, + 0x8fc77fc7, 0x3bb65bb6, 0x7a025a02, 0xb8de58de, 0xf96a596a, + 0x8d655d65, 0xccd15cd1, 0x0e0d5e0d, 0x4fb95fb9, 0xe6135613, + 0xa7a757a7, 0x657b557b, 0x24cf54cf, 0x50c050c0, 0x11745174, + 0xd3a853a8, 0x921c521c, 0x30ff40ff, 0x714b414b, 0xb3974397, + 0xf2234223, 0x862c462c, 0xc7984798, 0x05444544, 0x44f044f0, + 0xed5a4d5a, 0xacee4cee, 0x6e324e32, 0x2f864f86, 0x5b894b89, + 0x1a3d4a3d, 0xd8e148e1, 0x99554955, 0x5a48da48, 0x1bfcdbfc, + 0xd920d920, 0x9894d894, 0xec9bdc9b, 0xad2fdd2f, 0x6ff3dff3, + 0x2e47de47, 0x87edd7ed, 0xc659d659, 0x0485d485, 0x4531d531, + 0x313ed13e, 0x708ad08a, 0xb256d256, 0xf3e2d3e2, 0x5101c101, + 0x10b5c0b5, 0xd269c269, 0x93ddc3dd, 0xe7d2c7d2, 0xa666c666, + 0x64bac4ba, 0x250ec50e, 0x8ca4cca4, 0xcd10cd10, 0x0fcccfcc, + 0x4e78ce78, 0x3a77ca77, 0x7bc3cbc3, 0xb91fc91f, 0xf8abc8ab, + 0x4cdaecda, 0x0d6eed6e, 0xcfb2efb2, 0x8e06ee06, 0xfa09ea09, + 0xbbbdebbd, 0x7961e961, 0x38d5e8d5, 0x917fe17f, 0xd0cbe0cb, + 0x1217e217, 0x53a3e3a3, 0x27ace7ac, 0x6618e618, 0xa4c4e4c4, + 0xe570e570, 0x4793f793, 0x0627f627, 0xc4fbf4fb, 0x854ff54f, + 0xf140f140, 0xb0f4f0f4, 0x7228f228, 0x339cf39c, 0x9a36fa36, + 0xdb82fb82, 0x195ef95e, 0x58eaf8ea, 0x2ce5fce5, 0x6d51fd51, + 0xaf8dff8d, 0xee39fe39, 0x776cb76c, 0x36d8b6d8, 0xf404b404, + 0xb5b0b5b0, 0xc1bfb1bf, 0x800bb00b, 0x42d7b2d7, 0x0363b363, + 0xaac9bac9, 0xeb7dbb7d, 0x29a1b9a1, 0x6815b815, 0x1c1abc1a, + 0x5daebdae, 0x9f72bf72, 0xdec6bec6, 0x7c25ac25, 0x3d91ad91, + 0xff4daf4d, 0xbef9aef9, 0xcaf6aaf6, 0x8b42ab42, 0x499ea99e, + 0x082aa82a, 0xa180a180, 0xe034a034, 0x22e8a2e8, 0x635ca35c, + 0x1753a753, 0x56e7a6e7, 0x943ba43b, 0xd58fa58f, 0x61fe81fe, + 0x204a804a, 0xe2968296, 0xa3228322, 0xd72d872d, 0x96998699, + 0x54458445, 0x15f185f1, 0xbc5b8c5b, 0xfdef8def, 0x3f338f33, + 0x7e878e87, 0x0a888a88, 0x4b3c8b3c, 0x89e089e0, 0xc8548854, + 0x6ab79ab7, 0x2b039b03, 0xe9df99df, 0xa86b986b, 0xdc649c64, + 0x9dd09dd0, 0x5f0c9f0c, 0x1eb89eb8, 0xb7129712, 0xf6a696a6, + 0x347a947a, 0x75ce95ce, 0x01c191c1, 0x40759075, 0x82a992a9, + 0xc31d931d}, + {0x00000000, 0xb491b490, 0xd9206923, 0x6db1ddb3, 0x0243d245, + 0xb6d266d5, 0xdb63bb66, 0x6ff20ff6, 0x0487a48a, 0xb016101a, + 0xdda7cda9, 0x69367939, 0x06c476cf, 0xb255c25f, 0xdfe41fec, + 0x6b75ab7c, 0x090f4914, 0xbd9efd84, 0xd02f2037, 0x64be94a7, + 0x0b4c9b51, 0xbfdd2fc1, 0xd26cf272, 0x66fd46e2, 0x0d88ed9e, + 0xb919590e, 0xd4a884bd, 0x6039302d, 0x0fcb3fdb, 0xbb5a8b4b, + 0xd6eb56f8, 0x627ae268, 0x121e9228, 0xa68f26b8, 0xcb3efb0b, + 0x7faf4f9b, 0x105d406d, 0xa4ccf4fd, 0xc97d294e, 0x7dec9dde, + 0x169936a2, 0xa2088232, 0xcfb95f81, 0x7b28eb11, 0x14dae4e7, + 0xa04b5077, 0xcdfa8dc4, 0x796b3954, 0x1b11db3c, 0xaf806fac, + 0xc231b21f, 0x76a0068f, 0x19520979, 0xadc3bde9, 0xc072605a, + 0x74e3d4ca, 0x1f967fb6, 0xab07cb26, 0xc6b61695, 0x7227a205, + 0x1dd5adf3, 0xa9441963, 0xc4f5c4d0, 0x70647040, 0x243d2450, + 0x90ac90c0, 0xfd1d4d73, 0x498cf9e3, 0x267ef615, 0x92ef4285, + 0xff5e9f36, 0x4bcf2ba6, 0x20ba80da, 0x942b344a, 0xf99ae9f9, + 0x4d0b5d69, 0x22f9529f, 0x9668e60f, 0xfbd93bbc, 0x4f488f2c, + 0x2d326d44, 0x99a3d9d4, 0xf4120467, 0x4083b0f7, 0x2f71bf01, + 0x9be00b91, 0xf651d622, 0x42c062b2, 0x29b5c9ce, 0x9d247d5e, + 0xf095a0ed, 0x4404147d, 0x2bf61b8b, 0x9f67af1b, 0xf2d672a8, + 0x4647c638, 0x3623b678, 0x82b202e8, 0xef03df5b, 0x5b926bcb, + 0x3460643d, 0x80f1d0ad, 0xed400d1e, 0x59d1b98e, 0x32a412f2, + 0x8635a662, 0xeb847bd1, 0x5f15cf41, 0x30e7c0b7, 0x84767427, + 0xe9c7a994, 0x5d561d04, 0x3f2cff6c, 0x8bbd4bfc, 0xe60c964f, + 0x529d22df, 0x3d6f2d29, 0x89fe99b9, 0xe44f440a, 0x50def09a, + 0x3bab5be6, 0x8f3aef76, 0xe28b32c5, 0x561a8655, 0x39e889a3, + 0x8d793d33, 0xe0c8e080, 0x54595410, 0x487a48a0, 0xfcebfc30, + 0x915a2183, 0x25cb9513, 0x4a399ae5, 0xfea82e75, 0x9319f3c6, + 0x27884756, 0x4cfdec2a, 0xf86c58ba, 0x95dd8509, 0x214c3199, + 0x4ebe3e6f, 0xfa2f8aff, 0x979e574c, 0x230fe3dc, 0x417501b4, + 0xf5e4b524, 0x98556897, 0x2cc4dc07, 0x4336d3f1, 0xf7a76761, + 0x9a16bad2, 0x2e870e42, 0x45f2a53e, 0xf16311ae, 0x9cd2cc1d, + 0x2843788d, 0x47b1777b, 0xf320c3eb, 0x9e911e58, 0x2a00aac8, + 0x5a64da88, 0xeef56e18, 0x8344b3ab, 0x37d5073b, 0x582708cd, + 0xecb6bc5d, 0x810761ee, 0x3596d57e, 0x5ee37e02, 0xea72ca92, + 0x87c31721, 0x3352a3b1, 0x5ca0ac47, 0xe83118d7, 0x8580c564, + 0x311171f4, 0x536b939c, 0xe7fa270c, 0x8a4bfabf, 0x3eda4e2f, + 0x512841d9, 0xe5b9f549, 0x880828fa, 0x3c999c6a, 0x57ec3716, + 0xe37d8386, 0x8ecc5e35, 0x3a5deaa5, 0x55afe553, 0xe13e51c3, + 0x8c8f8c70, 0x381e38e0, 0x6c476cf0, 0xd8d6d860, 0xb56705d3, + 0x01f6b143, 0x6e04beb5, 0xda950a25, 0xb724d796, 0x03b56306, + 0x68c0c87a, 0xdc517cea, 0xb1e0a159, 0x057115c9, 0x6a831a3f, + 0xde12aeaf, 0xb3a3731c, 0x0732c78c, 0x654825e4, 0xd1d99174, + 0xbc684cc7, 0x08f9f857, 0x670bf7a1, 0xd39a4331, 0xbe2b9e82, + 0x0aba2a12, 0x61cf816e, 0xd55e35fe, 0xb8efe84d, 0x0c7e5cdd, + 0x638c532b, 0xd71de7bb, 0xbaac3a08, 0x0e3d8e98, 0x7e59fed8, + 0xcac84a48, 0xa77997fb, 0x13e8236b, 0x7c1a2c9d, 0xc88b980d, + 0xa53a45be, 0x11abf12e, 0x7ade5a52, 0xce4feec2, 0xa3fe3371, + 0x176f87e1, 0x789d8817, 0xcc0c3c87, 0xa1bde134, 0x152c55a4, + 0x7756b7cc, 0xc3c7035c, 0xae76deef, 0x1ae76a7f, 0x75156589, + 0xc184d119, 0xac350caa, 0x18a4b83a, 0x73d11346, 0xc740a7d6, + 0xaaf17a65, 0x1e60cef5, 0x7192c103, 0xc5037593, 0xa8b2a820, + 0x1c231cb0}, + {0x00000000, 0x90f49140, 0x91ea2283, 0x011eb3c3, 0x93d74505, + 0x0323d445, 0x023d6786, 0x92c9f6c6, 0x97ad8a09, 0x07591b49, + 0x0647a88a, 0x96b339ca, 0x047acf0c, 0x948e5e4c, 0x9590ed8f, + 0x05647ccf, 0x9f581411, 0x0fac8551, 0x0eb23692, 0x9e46a7d2, + 0x0c8f5114, 0x9c7bc054, 0x9d657397, 0x0d91e2d7, 0x08f59e18, + 0x98010f58, 0x991fbc9b, 0x09eb2ddb, 0x9b22db1d, 0x0bd64a5d, + 0x0ac8f99e, 0x9a3c68de, 0x8eb32821, 0x1e47b961, 0x1f590aa2, + 0x8fad9be2, 0x1d646d24, 0x8d90fc64, 0x8c8e4fa7, 0x1c7adee7, + 0x191ea228, 0x89ea3368, 0x88f480ab, 0x180011eb, 0x8ac9e72d, + 0x1a3d766d, 0x1b23c5ae, 0x8bd754ee, 0x11eb3c30, 0x811fad70, + 0x80011eb3, 0x10f58ff3, 0x823c7935, 0x12c8e875, 0x13d65bb6, + 0x8322caf6, 0x8646b639, 0x16b22779, 0x17ac94ba, 0x875805fa, + 0x1591f33c, 0x8565627c, 0x847bd1bf, 0x148f40ff, 0xad655041, + 0x3d91c101, 0x3c8f72c2, 0xac7be382, 0x3eb21544, 0xae468404, + 0xaf5837c7, 0x3faca687, 0x3ac8da48, 0xaa3c4b08, 0xab22f8cb, + 0x3bd6698b, 0xa91f9f4d, 0x39eb0e0d, 0x38f5bdce, 0xa8012c8e, + 0x323d4450, 0xa2c9d510, 0xa3d766d3, 0x3323f793, 0xa1ea0155, + 0x311e9015, 0x300023d6, 0xa0f4b296, 0xa590ce59, 0x35645f19, + 0x347aecda, 0xa48e7d9a, 0x36478b5c, 0xa6b31a1c, 0xa7ada9df, + 0x3759389f, 0x23d67860, 0xb322e920, 0xb23c5ae3, 0x22c8cba3, + 0xb0013d65, 0x20f5ac25, 0x21eb1fe6, 0xb11f8ea6, 0xb47bf269, + 0x248f6329, 0x2591d0ea, 0xb56541aa, 0x27acb76c, 0xb758262c, + 0xb64695ef, 0x26b204af, 0xbc8e6c71, 0x2c7afd31, 0x2d644ef2, + 0xbd90dfb2, 0x2f592974, 0xbfadb834, 0xbeb30bf7, 0x2e479ab7, + 0x2b23e678, 0xbbd77738, 0xbac9c4fb, 0x2a3d55bb, 0xb8f4a37d, + 0x2800323d, 0x291e81fe, 0xb9ea10be, 0xeac9a081, 0x7a3d31c1, + 0x7b238202, 0xebd71342, 0x791ee584, 0xe9ea74c4, 0xe8f4c707, + 0x78005647, 0x7d642a88, 0xed90bbc8, 0xec8e080b, 0x7c7a994b, + 0xeeb36f8d, 0x7e47fecd, 0x7f594d0e, 0xefaddc4e, 0x7591b490, + 0xe56525d0, 0xe47b9613, 0x748f0753, 0xe646f195, 0x76b260d5, + 0x77acd316, 0xe7584256, 0xe23c3e99, 0x72c8afd9, 0x73d61c1a, + 0xe3228d5a, 0x71eb7b9c, 0xe11feadc, 0xe001591f, 0x70f5c85f, + 0x647a88a0, 0xf48e19e0, 0xf590aa23, 0x65643b63, 0xf7adcda5, + 0x67595ce5, 0x6647ef26, 0xf6b37e66, 0xf3d702a9, 0x632393e9, + 0x623d202a, 0xf2c9b16a, 0x600047ac, 0xf0f4d6ec, 0xf1ea652f, + 0x611ef46f, 0xfb229cb1, 0x6bd60df1, 0x6ac8be32, 0xfa3c2f72, + 0x68f5d9b4, 0xf80148f4, 0xf91ffb37, 0x69eb6a77, 0x6c8f16b8, + 0xfc7b87f8, 0xfd65343b, 0x6d91a57b, 0xff5853bd, 0x6facc2fd, + 0x6eb2713e, 0xfe46e07e, 0x47acf0c0, 0xd7586180, 0xd646d243, + 0x46b24303, 0xd47bb5c5, 0x448f2485, 0x45919746, 0xd5650606, + 0xd0017ac9, 0x40f5eb89, 0x41eb584a, 0xd11fc90a, 0x43d63fcc, + 0xd322ae8c, 0xd23c1d4f, 0x42c88c0f, 0xd8f4e4d1, 0x48007591, + 0x491ec652, 0xd9ea5712, 0x4b23a1d4, 0xdbd73094, 0xdac98357, + 0x4a3d1217, 0x4f596ed8, 0xdfadff98, 0xdeb34c5b, 0x4e47dd1b, + 0xdc8e2bdd, 0x4c7aba9d, 0x4d64095e, 0xdd90981e, 0xc91fd8e1, + 0x59eb49a1, 0x58f5fa62, 0xc8016b22, 0x5ac89de4, 0xca3c0ca4, + 0xcb22bf67, 0x5bd62e27, 0x5eb252e8, 0xce46c3a8, 0xcf58706b, + 0x5face12b, 0xcd6517ed, 0x5d9186ad, 0x5c8f356e, 0xcc7ba42e, + 0x5647ccf0, 0xc6b35db0, 0xc7adee73, 0x57597f33, 0xc59089f5, + 0x556418b5, 0x547aab76, 0xc48e3a36, 0xc1ea46f9, 0x511ed7b9, + 0x5000647a, 0xc0f4f53a, 0x523d03fc, 0xc2c992bc, 0xc3d7217f, + 0x5323b03f}}; + +static const word_t crc_braid_big_table[][256] = { + {0x0000000000000000, 0x4091f49000000000, 0x8322ea9100000000, + 0xc3b31e0100000000, 0x0545d79300000000, 0x45d4230300000000, + 0x86673d0200000000, 0xc6f6c99200000000, 0x098aad9700000000, + 0x491b590700000000, 0x8aa8470600000000, 0xca39b39600000000, + 0x0ccf7a0400000000, 0x4c5e8e9400000000, 0x8fed909500000000, + 0xcf7c640500000000, 0x1114589f00000000, 0x5185ac0f00000000, + 0x9236b20e00000000, 0xd2a7469e00000000, 0x14518f0c00000000, + 0x54c07b9c00000000, 0x9773659d00000000, 0xd7e2910d00000000, + 0x189ef50800000000, 0x580f019800000000, 0x9bbc1f9900000000, + 0xdb2deb0900000000, 0x1ddb229b00000000, 0x5d4ad60b00000000, + 0x9ef9c80a00000000, 0xde683c9a00000000, 0x2128b38e00000000, + 0x61b9471e00000000, 0xa20a591f00000000, 0xe29bad8f00000000, + 0x246d641d00000000, 0x64fc908d00000000, 0xa74f8e8c00000000, + 0xe7de7a1c00000000, 0x28a21e1900000000, 0x6833ea8900000000, + 0xab80f48800000000, 0xeb11001800000000, 0x2de7c98a00000000, + 0x6d763d1a00000000, 0xaec5231b00000000, 0xee54d78b00000000, + 0x303ceb1100000000, 0x70ad1f8100000000, 0xb31e018000000000, + 0xf38ff51000000000, 0x35793c8200000000, 0x75e8c81200000000, + 0xb65bd61300000000, 0xf6ca228300000000, 0x39b6468600000000, + 0x7927b21600000000, 0xba94ac1700000000, 0xfa05588700000000, + 0x3cf3911500000000, 0x7c62658500000000, 0xbfd17b8400000000, + 0xff408f1400000000, 0x415065ad00000000, 0x01c1913d00000000, + 0xc2728f3c00000000, 0x82e37bac00000000, 0x4415b23e00000000, + 0x048446ae00000000, 0xc73758af00000000, 0x87a6ac3f00000000, + 0x48dac83a00000000, 0x084b3caa00000000, 0xcbf822ab00000000, + 0x8b69d63b00000000, 0x4d9f1fa900000000, 0x0d0eeb3900000000, + 0xcebdf53800000000, 0x8e2c01a800000000, 0x50443d3200000000, + 0x10d5c9a200000000, 0xd366d7a300000000, 0x93f7233300000000, + 0x5501eaa100000000, 0x15901e3100000000, 0xd623003000000000, + 0x96b2f4a000000000, 0x59ce90a500000000, 0x195f643500000000, + 0xdaec7a3400000000, 0x9a7d8ea400000000, 0x5c8b473600000000, + 0x1c1ab3a600000000, 0xdfa9ada700000000, 0x9f38593700000000, + 0x6078d62300000000, 0x20e922b300000000, 0xe35a3cb200000000, + 0xa3cbc82200000000, 0x653d01b000000000, 0x25acf52000000000, + 0xe61feb2100000000, 0xa68e1fb100000000, 0x69f27bb400000000, + 0x29638f2400000000, 0xead0912500000000, 0xaa4165b500000000, + 0x6cb7ac2700000000, 0x2c2658b700000000, 0xef9546b600000000, + 0xaf04b22600000000, 0x716c8ebc00000000, 0x31fd7a2c00000000, + 0xf24e642d00000000, 0xb2df90bd00000000, 0x7429592f00000000, + 0x34b8adbf00000000, 0xf70bb3be00000000, 0xb79a472e00000000, + 0x78e6232b00000000, 0x3877d7bb00000000, 0xfbc4c9ba00000000, + 0xbb553d2a00000000, 0x7da3f4b800000000, 0x3d32002800000000, + 0xfe811e2900000000, 0xbe10eab900000000, 0x81a0c9ea00000000, + 0xc1313d7a00000000, 0x0282237b00000000, 0x4213d7eb00000000, + 0x84e51e7900000000, 0xc474eae900000000, 0x07c7f4e800000000, + 0x4756007800000000, 0x882a647d00000000, 0xc8bb90ed00000000, + 0x0b088eec00000000, 0x4b997a7c00000000, 0x8d6fb3ee00000000, + 0xcdfe477e00000000, 0x0e4d597f00000000, 0x4edcadef00000000, + 0x90b4917500000000, 0xd02565e500000000, 0x13967be400000000, + 0x53078f7400000000, 0x95f146e600000000, 0xd560b27600000000, + 0x16d3ac7700000000, 0x564258e700000000, 0x993e3ce200000000, + 0xd9afc87200000000, 0x1a1cd67300000000, 0x5a8d22e300000000, + 0x9c7beb7100000000, 0xdcea1fe100000000, 0x1f5901e000000000, + 0x5fc8f57000000000, 0xa0887a6400000000, 0xe0198ef400000000, + 0x23aa90f500000000, 0x633b646500000000, 0xa5cdadf700000000, + 0xe55c596700000000, 0x26ef476600000000, 0x667eb3f600000000, + 0xa902d7f300000000, 0xe993236300000000, 0x2a203d6200000000, + 0x6ab1c9f200000000, 0xac47006000000000, 0xecd6f4f000000000, + 0x2f65eaf100000000, 0x6ff41e6100000000, 0xb19c22fb00000000, + 0xf10dd66b00000000, 0x32bec86a00000000, 0x722f3cfa00000000, + 0xb4d9f56800000000, 0xf44801f800000000, 0x37fb1ff900000000, + 0x776aeb6900000000, 0xb8168f6c00000000, 0xf8877bfc00000000, + 0x3b3465fd00000000, 0x7ba5916d00000000, 0xbd5358ff00000000, + 0xfdc2ac6f00000000, 0x3e71b26e00000000, 0x7ee046fe00000000, + 0xc0f0ac4700000000, 0x806158d700000000, 0x43d246d600000000, + 0x0343b24600000000, 0xc5b57bd400000000, 0x85248f4400000000, + 0x4697914500000000, 0x060665d500000000, 0xc97a01d000000000, + 0x89ebf54000000000, 0x4a58eb4100000000, 0x0ac91fd100000000, + 0xcc3fd64300000000, 0x8cae22d300000000, 0x4f1d3cd200000000, + 0x0f8cc84200000000, 0xd1e4f4d800000000, 0x9175004800000000, + 0x52c61e4900000000, 0x1257ead900000000, 0xd4a1234b00000000, + 0x9430d7db00000000, 0x5783c9da00000000, 0x17123d4a00000000, + 0xd86e594f00000000, 0x98ffaddf00000000, 0x5b4cb3de00000000, + 0x1bdd474e00000000, 0xdd2b8edc00000000, 0x9dba7a4c00000000, + 0x5e09644d00000000, 0x1e9890dd00000000, 0xe1d81fc900000000, + 0xa149eb5900000000, 0x62faf55800000000, 0x226b01c800000000, + 0xe49dc85a00000000, 0xa40c3cca00000000, 0x67bf22cb00000000, + 0x272ed65b00000000, 0xe852b25e00000000, 0xa8c346ce00000000, + 0x6b7058cf00000000, 0x2be1ac5f00000000, 0xed1765cd00000000, + 0xad86915d00000000, 0x6e358f5c00000000, 0x2ea47bcc00000000, + 0xf0cc475600000000, 0xb05db3c600000000, 0x73eeadc700000000, + 0x337f595700000000, 0xf58990c500000000, 0xb518645500000000, + 0x76ab7a5400000000, 0x363a8ec400000000, 0xf946eac100000000, + 0xb9d71e5100000000, 0x7a64005000000000, 0x3af5f4c000000000, + 0xfc033d5200000000, 0xbc92c9c200000000, 0x7f21d7c300000000, + 0x3fb0235300000000}, + {0x0000000000000000, 0x90b491b400000000, 0x236920d900000000, + 0xb3ddb16d00000000, 0x45d2430200000000, 0xd566d2b600000000, + 0x66bb63db00000000, 0xf60ff26f00000000, 0x8aa4870400000000, + 0x1a1016b000000000, 0xa9cda7dd00000000, 0x3979366900000000, + 0xcf76c40600000000, 0x5fc255b200000000, 0xec1fe4df00000000, + 0x7cab756b00000000, 0x14490f0900000000, 0x84fd9ebd00000000, + 0x37202fd000000000, 0xa794be6400000000, 0x519b4c0b00000000, + 0xc12fddbf00000000, 0x72f26cd200000000, 0xe246fd6600000000, + 0x9eed880d00000000, 0x0e5919b900000000, 0xbd84a8d400000000, + 0x2d30396000000000, 0xdb3fcb0f00000000, 0x4b8b5abb00000000, + 0xf856ebd600000000, 0x68e27a6200000000, 0x28921e1200000000, + 0xb8268fa600000000, 0x0bfb3ecb00000000, 0x9b4faf7f00000000, + 0x6d405d1000000000, 0xfdf4cca400000000, 0x4e297dc900000000, + 0xde9dec7d00000000, 0xa236991600000000, 0x328208a200000000, + 0x815fb9cf00000000, 0x11eb287b00000000, 0xe7e4da1400000000, + 0x77504ba000000000, 0xc48dfacd00000000, 0x54396b7900000000, + 0x3cdb111b00000000, 0xac6f80af00000000, 0x1fb231c200000000, + 0x8f06a07600000000, 0x7909521900000000, 0xe9bdc3ad00000000, + 0x5a6072c000000000, 0xcad4e37400000000, 0xb67f961f00000000, + 0x26cb07ab00000000, 0x9516b6c600000000, 0x05a2277200000000, + 0xf3add51d00000000, 0x631944a900000000, 0xd0c4f5c400000000, + 0x4070647000000000, 0x50243d2400000000, 0xc090ac9000000000, + 0x734d1dfd00000000, 0xe3f98c4900000000, 0x15f67e2600000000, + 0x8542ef9200000000, 0x369f5eff00000000, 0xa62bcf4b00000000, + 0xda80ba2000000000, 0x4a342b9400000000, 0xf9e99af900000000, + 0x695d0b4d00000000, 0x9f52f92200000000, 0x0fe6689600000000, + 0xbc3bd9fb00000000, 0x2c8f484f00000000, 0x446d322d00000000, + 0xd4d9a39900000000, 0x670412f400000000, 0xf7b0834000000000, + 0x01bf712f00000000, 0x910be09b00000000, 0x22d651f600000000, + 0xb262c04200000000, 0xcec9b52900000000, 0x5e7d249d00000000, + 0xeda095f000000000, 0x7d14044400000000, 0x8b1bf62b00000000, + 0x1baf679f00000000, 0xa872d6f200000000, 0x38c6474600000000, + 0x78b6233600000000, 0xe802b28200000000, 0x5bdf03ef00000000, + 0xcb6b925b00000000, 0x3d64603400000000, 0xadd0f18000000000, + 0x1e0d40ed00000000, 0x8eb9d15900000000, 0xf212a43200000000, + 0x62a6358600000000, 0xd17b84eb00000000, 0x41cf155f00000000, + 0xb7c0e73000000000, 0x2774768400000000, 0x94a9c7e900000000, + 0x041d565d00000000, 0x6cff2c3f00000000, 0xfc4bbd8b00000000, + 0x4f960ce600000000, 0xdf229d5200000000, 0x292d6f3d00000000, + 0xb999fe8900000000, 0x0a444fe400000000, 0x9af0de5000000000, + 0xe65bab3b00000000, 0x76ef3a8f00000000, 0xc5328be200000000, + 0x55861a5600000000, 0xa389e83900000000, 0x333d798d00000000, + 0x80e0c8e000000000, 0x1054595400000000, 0xa0487a4800000000, + 0x30fcebfc00000000, 0x83215a9100000000, 0x1395cb2500000000, + 0xe59a394a00000000, 0x752ea8fe00000000, 0xc6f3199300000000, + 0x5647882700000000, 0x2aecfd4c00000000, 0xba586cf800000000, + 0x0985dd9500000000, 0x99314c2100000000, 0x6f3ebe4e00000000, + 0xff8a2ffa00000000, 0x4c579e9700000000, 0xdce30f2300000000, + 0xb401754100000000, 0x24b5e4f500000000, 0x9768559800000000, + 0x07dcc42c00000000, 0xf1d3364300000000, 0x6167a7f700000000, + 0xd2ba169a00000000, 0x420e872e00000000, 0x3ea5f24500000000, + 0xae1163f100000000, 0x1dccd29c00000000, 0x8d78432800000000, + 0x7b77b14700000000, 0xebc320f300000000, 0x581e919e00000000, + 0xc8aa002a00000000, 0x88da645a00000000, 0x186ef5ee00000000, + 0xabb3448300000000, 0x3b07d53700000000, 0xcd08275800000000, + 0x5dbcb6ec00000000, 0xee61078100000000, 0x7ed5963500000000, + 0x027ee35e00000000, 0x92ca72ea00000000, 0x2117c38700000000, + 0xb1a3523300000000, 0x47aca05c00000000, 0xd71831e800000000, + 0x64c5808500000000, 0xf471113100000000, 0x9c936b5300000000, + 0x0c27fae700000000, 0xbffa4b8a00000000, 0x2f4eda3e00000000, + 0xd941285100000000, 0x49f5b9e500000000, 0xfa28088800000000, + 0x6a9c993c00000000, 0x1637ec5700000000, 0x86837de300000000, + 0x355ecc8e00000000, 0xa5ea5d3a00000000, 0x53e5af5500000000, + 0xc3513ee100000000, 0x708c8f8c00000000, 0xe0381e3800000000, + 0xf06c476c00000000, 0x60d8d6d800000000, 0xd30567b500000000, + 0x43b1f60100000000, 0xb5be046e00000000, 0x250a95da00000000, + 0x96d724b700000000, 0x0663b50300000000, 0x7ac8c06800000000, + 0xea7c51dc00000000, 0x59a1e0b100000000, 0xc915710500000000, + 0x3f1a836a00000000, 0xafae12de00000000, 0x1c73a3b300000000, + 0x8cc7320700000000, 0xe425486500000000, 0x7491d9d100000000, + 0xc74c68bc00000000, 0x57f8f90800000000, 0xa1f70b6700000000, + 0x31439ad300000000, 0x829e2bbe00000000, 0x122aba0a00000000, + 0x6e81cf6100000000, 0xfe355ed500000000, 0x4de8efb800000000, + 0xdd5c7e0c00000000, 0x2b538c6300000000, 0xbbe71dd700000000, + 0x083aacba00000000, 0x988e3d0e00000000, 0xd8fe597e00000000, + 0x484ac8ca00000000, 0xfb9779a700000000, 0x6b23e81300000000, + 0x9d2c1a7c00000000, 0x0d988bc800000000, 0xbe453aa500000000, + 0x2ef1ab1100000000, 0x525ade7a00000000, 0xc2ee4fce00000000, + 0x7133fea300000000, 0xe1876f1700000000, 0x17889d7800000000, + 0x873c0ccc00000000, 0x34e1bda100000000, 0xa4552c1500000000, + 0xccb7567700000000, 0x5c03c7c300000000, 0xefde76ae00000000, + 0x7f6ae71a00000000, 0x8965157500000000, 0x19d184c100000000, + 0xaa0c35ac00000000, 0x3ab8a41800000000, 0x4613d17300000000, + 0xd6a740c700000000, 0x657af1aa00000000, 0xf5ce601e00000000, + 0x03c1927100000000, 0x937503c500000000, 0x20a8b2a800000000, + 0xb01c231c00000000}, + {0x0000000000000000, 0xb401b44100000000, 0x6803688300000000, + 0xdc02dcc200000000, 0xd306d3b600000000, 0x670767f700000000, + 0xbb05bb3500000000, 0x0f040f7400000000, 0xa50da5dd00000000, + 0x110c119c00000000, 0xcd0ecd5e00000000, 0x790f791f00000000, + 0x760b766b00000000, 0xc20ac22a00000000, 0x1e081ee800000000, + 0xaa09aaa900000000, 0x491b490b00000000, 0xfd1afd4a00000000, + 0x2118218800000000, 0x951995c900000000, 0x9a1d9abd00000000, + 0x2e1c2efc00000000, 0xf21ef23e00000000, 0x461f467f00000000, + 0xec16ecd600000000, 0x5817589700000000, 0x8415845500000000, + 0x3014301400000000, 0x3f103f6000000000, 0x8b118b2100000000, + 0x571357e300000000, 0xe312e3a200000000, 0x9236921600000000, + 0x2637265700000000, 0xfa35fa9500000000, 0x4e344ed400000000, + 0x413041a000000000, 0xf531f5e100000000, 0x2933292300000000, + 0x9d329d6200000000, 0x373b37cb00000000, 0x833a838a00000000, + 0x5f385f4800000000, 0xeb39eb0900000000, 0xe43de47d00000000, + 0x503c503c00000000, 0x8c3e8cfe00000000, 0x383f38bf00000000, + 0xdb2ddb1d00000000, 0x6f2c6f5c00000000, 0xb32eb39e00000000, + 0x072f07df00000000, 0x082b08ab00000000, 0xbc2abcea00000000, + 0x6028602800000000, 0xd429d46900000000, 0x7e207ec000000000, + 0xca21ca8100000000, 0x1623164300000000, 0xa222a20200000000, + 0xad26ad7600000000, 0x1927193700000000, 0xc525c5f500000000, + 0x712471b400000000, 0x246d242d00000000, 0x906c906c00000000, + 0x4c6e4cae00000000, 0xf86ff8ef00000000, 0xf76bf79b00000000, + 0x436a43da00000000, 0x9f689f1800000000, 0x2b692b5900000000, + 0x816081f000000000, 0x356135b100000000, 0xe963e97300000000, + 0x5d625d3200000000, 0x5266524600000000, 0xe667e60700000000, + 0x3a653ac500000000, 0x8e648e8400000000, 0x6d766d2600000000, + 0xd977d96700000000, 0x057505a500000000, 0xb174b1e400000000, + 0xbe70be9000000000, 0x0a710ad100000000, 0xd673d61300000000, + 0x6272625200000000, 0xc87bc8fb00000000, 0x7c7a7cba00000000, + 0xa078a07800000000, 0x1479143900000000, 0x1b7d1b4d00000000, + 0xaf7caf0c00000000, 0x737e73ce00000000, 0xc77fc78f00000000, + 0xb65bb63b00000000, 0x025a027a00000000, 0xde58deb800000000, + 0x6a596af900000000, 0x655d658d00000000, 0xd15cd1cc00000000, + 0x0d5e0d0e00000000, 0xb95fb94f00000000, 0x135613e600000000, + 0xa757a7a700000000, 0x7b557b6500000000, 0xcf54cf2400000000, + 0xc050c05000000000, 0x7451741100000000, 0xa853a8d300000000, + 0x1c521c9200000000, 0xff40ff3000000000, 0x4b414b7100000000, + 0x974397b300000000, 0x234223f200000000, 0x2c462c8600000000, + 0x984798c700000000, 0x4445440500000000, 0xf044f04400000000, + 0x5a4d5aed00000000, 0xee4ceeac00000000, 0x324e326e00000000, + 0x864f862f00000000, 0x894b895b00000000, 0x3d4a3d1a00000000, + 0xe148e1d800000000, 0x5549559900000000, 0x48da485a00000000, + 0xfcdbfc1b00000000, 0x20d920d900000000, 0x94d8949800000000, + 0x9bdc9bec00000000, 0x2fdd2fad00000000, 0xf3dff36f00000000, + 0x47de472e00000000, 0xedd7ed8700000000, 0x59d659c600000000, + 0x85d4850400000000, 0x31d5314500000000, 0x3ed13e3100000000, + 0x8ad08a7000000000, 0x56d256b200000000, 0xe2d3e2f300000000, + 0x01c1015100000000, 0xb5c0b51000000000, 0x69c269d200000000, + 0xddc3dd9300000000, 0xd2c7d2e700000000, 0x66c666a600000000, + 0xbac4ba6400000000, 0x0ec50e2500000000, 0xa4cca48c00000000, + 0x10cd10cd00000000, 0xcccfcc0f00000000, 0x78ce784e00000000, + 0x77ca773a00000000, 0xc3cbc37b00000000, 0x1fc91fb900000000, + 0xabc8abf800000000, 0xdaecda4c00000000, 0x6eed6e0d00000000, + 0xb2efb2cf00000000, 0x06ee068e00000000, 0x09ea09fa00000000, + 0xbdebbdbb00000000, 0x61e9617900000000, 0xd5e8d53800000000, + 0x7fe17f9100000000, 0xcbe0cbd000000000, 0x17e2171200000000, + 0xa3e3a35300000000, 0xace7ac2700000000, 0x18e6186600000000, + 0xc4e4c4a400000000, 0x70e570e500000000, 0x93f7934700000000, + 0x27f6270600000000, 0xfbf4fbc400000000, 0x4ff54f8500000000, + 0x40f140f100000000, 0xf4f0f4b000000000, 0x28f2287200000000, + 0x9cf39c3300000000, 0x36fa369a00000000, 0x82fb82db00000000, + 0x5ef95e1900000000, 0xeaf8ea5800000000, 0xe5fce52c00000000, + 0x51fd516d00000000, 0x8dff8daf00000000, 0x39fe39ee00000000, + 0x6cb76c7700000000, 0xd8b6d83600000000, 0x04b404f400000000, + 0xb0b5b0b500000000, 0xbfb1bfc100000000, 0x0bb00b8000000000, + 0xd7b2d74200000000, 0x63b3630300000000, 0xc9bac9aa00000000, + 0x7dbb7deb00000000, 0xa1b9a12900000000, 0x15b8156800000000, + 0x1abc1a1c00000000, 0xaebdae5d00000000, 0x72bf729f00000000, + 0xc6bec6de00000000, 0x25ac257c00000000, 0x91ad913d00000000, + 0x4daf4dff00000000, 0xf9aef9be00000000, 0xf6aaf6ca00000000, + 0x42ab428b00000000, 0x9ea99e4900000000, 0x2aa82a0800000000, + 0x80a180a100000000, 0x34a034e000000000, 0xe8a2e82200000000, + 0x5ca35c6300000000, 0x53a7531700000000, 0xe7a6e75600000000, + 0x3ba43b9400000000, 0x8fa58fd500000000, 0xfe81fe6100000000, + 0x4a804a2000000000, 0x968296e200000000, 0x228322a300000000, + 0x2d872dd700000000, 0x9986999600000000, 0x4584455400000000, + 0xf185f11500000000, 0x5b8c5bbc00000000, 0xef8deffd00000000, + 0x338f333f00000000, 0x878e877e00000000, 0x888a880a00000000, + 0x3c8b3c4b00000000, 0xe089e08900000000, 0x548854c800000000, + 0xb79ab76a00000000, 0x039b032b00000000, 0xdf99dfe900000000, + 0x6b986ba800000000, 0x649c64dc00000000, 0xd09dd09d00000000, + 0x0c9f0c5f00000000, 0xb89eb81e00000000, 0x129712b700000000, + 0xa696a6f600000000, 0x7a947a3400000000, 0xce95ce7500000000, + 0xc191c10100000000, 0x7590754000000000, 0xa992a98200000000, + 0x1d931dc300000000}, + {0x0000000000000000, 0x0100015100000000, 0x020002a200000000, + 0x030003f300000000, 0x070007f400000000, 0x060006a500000000, + 0x0500055600000000, 0x0400040700000000, 0x0d000d5800000000, + 0x0c000c0900000000, 0x0f000ffa00000000, 0x0e000eab00000000, + 0x0a000aac00000000, 0x0b000bfd00000000, 0x0800080e00000000, + 0x0900095f00000000, 0x1a001ab000000000, 0x1b001be100000000, + 0x1800181200000000, 0x1900194300000000, 0x1d001d4400000000, + 0x1c001c1500000000, 0x1f001fe600000000, 0x1e001eb700000000, + 0x170017e800000000, 0x160016b900000000, 0x1500154a00000000, + 0x1400141b00000000, 0x1000101c00000000, 0x1100114d00000000, + 0x120012be00000000, 0x130013ef00000000, 0x370037d000000000, + 0x3600368100000000, 0x3500357200000000, 0x3400342300000000, + 0x3000302400000000, 0x3100317500000000, 0x3200328600000000, + 0x330033d700000000, 0x3a003a8800000000, 0x3b003bd900000000, + 0x3800382a00000000, 0x3900397b00000000, 0x3d003d7c00000000, + 0x3c003c2d00000000, 0x3f003fde00000000, 0x3e003e8f00000000, + 0x2d002d6000000000, 0x2c002c3100000000, 0x2f002fc200000000, + 0x2e002e9300000000, 0x2a002a9400000000, 0x2b002bc500000000, + 0x2800283600000000, 0x2900296700000000, 0x2000203800000000, + 0x2100216900000000, 0x2200229a00000000, 0x230023cb00000000, + 0x270027cc00000000, 0x2600269d00000000, 0x2500256e00000000, + 0x2400243f00000000, 0x6d006d1000000000, 0x6c006c4100000000, + 0x6f006fb200000000, 0x6e006ee300000000, 0x6a006ae400000000, + 0x6b006bb500000000, 0x6800684600000000, 0x6900691700000000, + 0x6000604800000000, 0x6100611900000000, 0x620062ea00000000, + 0x630063bb00000000, 0x670067bc00000000, 0x660066ed00000000, + 0x6500651e00000000, 0x6400644f00000000, 0x770077a000000000, + 0x760076f100000000, 0x7500750200000000, 0x7400745300000000, + 0x7000705400000000, 0x7100710500000000, 0x720072f600000000, + 0x730073a700000000, 0x7a007af800000000, 0x7b007ba900000000, + 0x7800785a00000000, 0x7900790b00000000, 0x7d007d0c00000000, + 0x7c007c5d00000000, 0x7f007fae00000000, 0x7e007eff00000000, + 0x5a005ac000000000, 0x5b005b9100000000, 0x5800586200000000, + 0x5900593300000000, 0x5d005d3400000000, 0x5c005c6500000000, + 0x5f005f9600000000, 0x5e005ec700000000, 0x5700579800000000, + 0x560056c900000000, 0x5500553a00000000, 0x5400546b00000000, + 0x5000506c00000000, 0x5100513d00000000, 0x520052ce00000000, + 0x5300539f00000000, 0x4000407000000000, 0x4100412100000000, + 0x420042d200000000, 0x4300438300000000, 0x4700478400000000, + 0x460046d500000000, 0x4500452600000000, 0x4400447700000000, + 0x4d004d2800000000, 0x4c004c7900000000, 0x4f004f8a00000000, + 0x4e004edb00000000, 0x4a004adc00000000, 0x4b004b8d00000000, + 0x4800487e00000000, 0x4900492f00000000, 0xda00da2000000000, + 0xdb00db7100000000, 0xd800d88200000000, 0xd900d9d300000000, + 0xdd00ddd400000000, 0xdc00dc8500000000, 0xdf00df7600000000, + 0xde00de2700000000, 0xd700d77800000000, 0xd600d62900000000, + 0xd500d5da00000000, 0xd400d48b00000000, 0xd000d08c00000000, + 0xd100d1dd00000000, 0xd200d22e00000000, 0xd300d37f00000000, + 0xc000c09000000000, 0xc100c1c100000000, 0xc200c23200000000, + 0xc300c36300000000, 0xc700c76400000000, 0xc600c63500000000, + 0xc500c5c600000000, 0xc400c49700000000, 0xcd00cdc800000000, + 0xcc00cc9900000000, 0xcf00cf6a00000000, 0xce00ce3b00000000, + 0xca00ca3c00000000, 0xcb00cb6d00000000, 0xc800c89e00000000, + 0xc900c9cf00000000, 0xed00edf000000000, 0xec00eca100000000, + 0xef00ef5200000000, 0xee00ee0300000000, 0xea00ea0400000000, + 0xeb00eb5500000000, 0xe800e8a600000000, 0xe900e9f700000000, + 0xe000e0a800000000, 0xe100e1f900000000, 0xe200e20a00000000, + 0xe300e35b00000000, 0xe700e75c00000000, 0xe600e60d00000000, + 0xe500e5fe00000000, 0xe400e4af00000000, 0xf700f74000000000, + 0xf600f61100000000, 0xf500f5e200000000, 0xf400f4b300000000, + 0xf000f0b400000000, 0xf100f1e500000000, 0xf200f21600000000, + 0xf300f34700000000, 0xfa00fa1800000000, 0xfb00fb4900000000, + 0xf800f8ba00000000, 0xf900f9eb00000000, 0xfd00fdec00000000, + 0xfc00fcbd00000000, 0xff00ff4e00000000, 0xfe00fe1f00000000, + 0xb700b73000000000, 0xb600b66100000000, 0xb500b59200000000, + 0xb400b4c300000000, 0xb000b0c400000000, 0xb100b19500000000, + 0xb200b26600000000, 0xb300b33700000000, 0xba00ba6800000000, + 0xbb00bb3900000000, 0xb800b8ca00000000, 0xb900b99b00000000, + 0xbd00bd9c00000000, 0xbc00bccd00000000, 0xbf00bf3e00000000, + 0xbe00be6f00000000, 0xad00ad8000000000, 0xac00acd100000000, + 0xaf00af2200000000, 0xae00ae7300000000, 0xaa00aa7400000000, + 0xab00ab2500000000, 0xa800a8d600000000, 0xa900a98700000000, + 0xa000a0d800000000, 0xa100a18900000000, 0xa200a27a00000000, + 0xa300a32b00000000, 0xa700a72c00000000, 0xa600a67d00000000, + 0xa500a58e00000000, 0xa400a4df00000000, 0x800080e000000000, + 0x810081b100000000, 0x8200824200000000, 0x8300831300000000, + 0x8700871400000000, 0x8600864500000000, 0x850085b600000000, + 0x840084e700000000, 0x8d008db800000000, 0x8c008ce900000000, + 0x8f008f1a00000000, 0x8e008e4b00000000, 0x8a008a4c00000000, + 0x8b008b1d00000000, 0x880088ee00000000, 0x890089bf00000000, + 0x9a009a5000000000, 0x9b009b0100000000, 0x980098f200000000, + 0x990099a300000000, 0x9d009da400000000, 0x9c009cf500000000, + 0x9f009f0600000000, 0x9e009e5700000000, 0x9700970800000000, + 0x9600965900000000, 0x950095aa00000000, 0x940094fb00000000, + 0x900090fc00000000, 0x910091ad00000000, 0x9200925e00000000, + 0x9300930f00000000}, + {0x0000000000000000, 0x0100c09000000000, 0x0100839100000000, + 0x0000430100000000, 0x0100059300000000, 0x0000c50300000000, + 0x0000860200000000, 0x0100469200000000, 0x0100099600000000, + 0x0000c90600000000, 0x00008a0700000000, 0x01004a9700000000, + 0x00000c0500000000, 0x0100cc9500000000, 0x01008f9400000000, + 0x00004f0400000000, 0x0100119c00000000, 0x0000d10c00000000, + 0x0000920d00000000, 0x0100529d00000000, 0x0000140f00000000, + 0x0100d49f00000000, 0x0100979e00000000, 0x0000570e00000000, + 0x0000180a00000000, 0x0100d89a00000000, 0x01009b9b00000000, + 0x00005b0b00000000, 0x01001d9900000000, 0x0000dd0900000000, + 0x00009e0800000000, 0x01005e9800000000, 0x0100218800000000, + 0x0000e11800000000, 0x0000a21900000000, 0x0100628900000000, + 0x0000241b00000000, 0x0100e48b00000000, 0x0100a78a00000000, + 0x0000671a00000000, 0x0000281e00000000, 0x0100e88e00000000, + 0x0100ab8f00000000, 0x00006b1f00000000, 0x01002d8d00000000, + 0x0000ed1d00000000, 0x0000ae1c00000000, 0x01006e8c00000000, + 0x0000301400000000, 0x0100f08400000000, 0x0100b38500000000, + 0x0000731500000000, 0x0100358700000000, 0x0000f51700000000, + 0x0000b61600000000, 0x0100768600000000, 0x0100398200000000, + 0x0000f91200000000, 0x0000ba1300000000, 0x01007a8300000000, + 0x00003c1100000000, 0x0100fc8100000000, 0x0100bf8000000000, + 0x00007f1000000000, 0x010041a000000000, 0x0000813000000000, + 0x0000c23100000000, 0x010002a100000000, 0x0000443300000000, + 0x010084a300000000, 0x0100c7a200000000, 0x0000073200000000, + 0x0000483600000000, 0x010088a600000000, 0x0100cba700000000, + 0x00000b3700000000, 0x01004da500000000, 0x00008d3500000000, + 0x0000ce3400000000, 0x01000ea400000000, 0x0000503c00000000, + 0x010090ac00000000, 0x0100d3ad00000000, 0x0000133d00000000, + 0x010055af00000000, 0x0000953f00000000, 0x0000d63e00000000, + 0x010016ae00000000, 0x010059aa00000000, 0x0000993a00000000, + 0x0000da3b00000000, 0x01001aab00000000, 0x00005c3900000000, + 0x01009ca900000000, 0x0100dfa800000000, 0x00001f3800000000, + 0x0000602800000000, 0x0100a0b800000000, 0x0100e3b900000000, + 0x0000232900000000, 0x010065bb00000000, 0x0000a52b00000000, + 0x0000e62a00000000, 0x010026ba00000000, 0x010069be00000000, + 0x0000a92e00000000, 0x0000ea2f00000000, 0x01002abf00000000, + 0x00006c2d00000000, 0x0100acbd00000000, 0x0100efbc00000000, + 0x00002f2c00000000, 0x010071b400000000, 0x0000b12400000000, + 0x0000f22500000000, 0x010032b500000000, 0x0000742700000000, + 0x0100b4b700000000, 0x0100f7b600000000, 0x0000372600000000, + 0x0000782200000000, 0x0100b8b200000000, 0x0100fbb300000000, + 0x00003b2300000000, 0x01007db100000000, 0x0000bd2100000000, + 0x0000fe2000000000, 0x01003eb000000000, 0x010081f000000000, + 0x0000416000000000, 0x0000026100000000, 0x0100c2f100000000, + 0x0000846300000000, 0x010044f300000000, 0x010007f200000000, + 0x0000c76200000000, 0x0000886600000000, 0x010048f600000000, + 0x01000bf700000000, 0x0000cb6700000000, 0x01008df500000000, + 0x00004d6500000000, 0x00000e6400000000, 0x0100cef400000000, + 0x0000906c00000000, 0x010050fc00000000, 0x010013fd00000000, + 0x0000d36d00000000, 0x010095ff00000000, 0x0000556f00000000, + 0x0000166e00000000, 0x0100d6fe00000000, 0x010099fa00000000, + 0x0000596a00000000, 0x00001a6b00000000, 0x0100dafb00000000, + 0x00009c6900000000, 0x01005cf900000000, 0x01001ff800000000, + 0x0000df6800000000, 0x0000a07800000000, 0x010060e800000000, + 0x010023e900000000, 0x0000e37900000000, 0x0100a5eb00000000, + 0x0000657b00000000, 0x0000267a00000000, 0x0100e6ea00000000, + 0x0100a9ee00000000, 0x0000697e00000000, 0x00002a7f00000000, + 0x0100eaef00000000, 0x0000ac7d00000000, 0x01006ced00000000, + 0x01002fec00000000, 0x0000ef7c00000000, 0x0100b1e400000000, + 0x0000717400000000, 0x0000327500000000, 0x0100f2e500000000, + 0x0000b47700000000, 0x010074e700000000, 0x010037e600000000, + 0x0000f77600000000, 0x0000b87200000000, 0x010078e200000000, + 0x01003be300000000, 0x0000fb7300000000, 0x0100bde100000000, + 0x00007d7100000000, 0x00003e7000000000, 0x0100fee000000000, + 0x0000c05000000000, 0x010000c000000000, 0x010043c100000000, + 0x0000835100000000, 0x0100c5c300000000, 0x0000055300000000, + 0x0000465200000000, 0x010086c200000000, 0x0100c9c600000000, + 0x0000095600000000, 0x00004a5700000000, 0x01008ac700000000, + 0x0000cc5500000000, 0x01000cc500000000, 0x01004fc400000000, + 0x00008f5400000000, 0x0100d1cc00000000, 0x0000115c00000000, + 0x0000525d00000000, 0x010092cd00000000, 0x0000d45f00000000, + 0x010014cf00000000, 0x010057ce00000000, 0x0000975e00000000, + 0x0000d85a00000000, 0x010018ca00000000, 0x01005bcb00000000, + 0x00009b5b00000000, 0x0100ddc900000000, 0x00001d5900000000, + 0x00005e5800000000, 0x01009ec800000000, 0x0100e1d800000000, + 0x0000214800000000, 0x0000624900000000, 0x0100a2d900000000, + 0x0000e44b00000000, 0x010024db00000000, 0x010067da00000000, + 0x0000a74a00000000, 0x0000e84e00000000, 0x010028de00000000, + 0x01006bdf00000000, 0x0000ab4f00000000, 0x0100eddd00000000, + 0x00002d4d00000000, 0x00006e4c00000000, 0x0100aedc00000000, + 0x0000f04400000000, 0x010030d400000000, 0x010073d500000000, + 0x0000b34500000000, 0x0100f5d700000000, 0x0000354700000000, + 0x0000764600000000, 0x0100b6d600000000, 0x0100f9d200000000, + 0x0000394200000000, 0x00007a4300000000, 0x0100bad300000000, + 0x0000fc4100000000, 0x01003cd100000000, 0x01007fd000000000, + 0x0000bf4000000000}, + {0x0000000000000000, 0x01c1019000000000, 0x0182009000000000, + 0x0043010000000000, 0x0104029000000000, 0x00c5030000000000, + 0x0086020000000000, 0x0147039000000000, 0x0108079000000000, + 0x00c9060000000000, 0x008a070000000000, 0x014b069000000000, + 0x000c050000000000, 0x01cd049000000000, 0x018e059000000000, + 0x004f040000000000, 0x01100d9000000000, 0x00d10c0000000000, + 0x00920d0000000000, 0x01530c9000000000, 0x00140f0000000000, + 0x01d50e9000000000, 0x01960f9000000000, 0x00570e0000000000, + 0x00180a0000000000, 0x01d90b9000000000, 0x019a0a9000000000, + 0x005b0b0000000000, 0x011c089000000000, 0x00dd090000000000, + 0x009e080000000000, 0x015f099000000000, 0x0120199000000000, + 0x00e1180000000000, 0x00a2190000000000, 0x0163189000000000, + 0x00241b0000000000, 0x01e51a9000000000, 0x01a61b9000000000, + 0x00671a0000000000, 0x00281e0000000000, 0x01e91f9000000000, + 0x01aa1e9000000000, 0x006b1f0000000000, 0x012c1c9000000000, + 0x00ed1d0000000000, 0x00ae1c0000000000, 0x016f1d9000000000, + 0x0030140000000000, 0x01f1159000000000, 0x01b2149000000000, + 0x0073150000000000, 0x0134169000000000, 0x00f5170000000000, + 0x00b6160000000000, 0x0177179000000000, 0x0138139000000000, + 0x00f9120000000000, 0x00ba130000000000, 0x017b129000000000, + 0x003c110000000000, 0x01fd109000000000, 0x01be119000000000, + 0x007f100000000000, 0x0140319000000000, 0x0081300000000000, + 0x00c2310000000000, 0x0103309000000000, 0x0044330000000000, + 0x0185329000000000, 0x01c6339000000000, 0x0007320000000000, + 0x0048360000000000, 0x0189379000000000, 0x01ca369000000000, + 0x000b370000000000, 0x014c349000000000, 0x008d350000000000, + 0x00ce340000000000, 0x010f359000000000, 0x00503c0000000000, + 0x01913d9000000000, 0x01d23c9000000000, 0x00133d0000000000, + 0x01543e9000000000, 0x00953f0000000000, 0x00d63e0000000000, + 0x01173f9000000000, 0x01583b9000000000, 0x00993a0000000000, + 0x00da3b0000000000, 0x011b3a9000000000, 0x005c390000000000, + 0x019d389000000000, 0x01de399000000000, 0x001f380000000000, + 0x0060280000000000, 0x01a1299000000000, 0x01e2289000000000, + 0x0023290000000000, 0x01642a9000000000, 0x00a52b0000000000, + 0x00e62a0000000000, 0x01272b9000000000, 0x01682f9000000000, + 0x00a92e0000000000, 0x00ea2f0000000000, 0x012b2e9000000000, + 0x006c2d0000000000, 0x01ad2c9000000000, 0x01ee2d9000000000, + 0x002f2c0000000000, 0x0170259000000000, 0x00b1240000000000, + 0x00f2250000000000, 0x0133249000000000, 0x0074270000000000, + 0x01b5269000000000, 0x01f6279000000000, 0x0037260000000000, + 0x0078220000000000, 0x01b9239000000000, 0x01fa229000000000, + 0x003b230000000000, 0x017c209000000000, 0x00bd210000000000, + 0x00fe200000000000, 0x013f219000000000, 0x0180619000000000, + 0x0041600000000000, 0x0002610000000000, 0x01c3609000000000, + 0x0084630000000000, 0x0145629000000000, 0x0106639000000000, + 0x00c7620000000000, 0x0088660000000000, 0x0149679000000000, + 0x010a669000000000, 0x00cb670000000000, 0x018c649000000000, + 0x004d650000000000, 0x000e640000000000, 0x01cf659000000000, + 0x00906c0000000000, 0x01516d9000000000, 0x01126c9000000000, + 0x00d36d0000000000, 0x01946e9000000000, 0x00556f0000000000, + 0x00166e0000000000, 0x01d76f9000000000, 0x01986b9000000000, + 0x00596a0000000000, 0x001a6b0000000000, 0x01db6a9000000000, + 0x009c690000000000, 0x015d689000000000, 0x011e699000000000, + 0x00df680000000000, 0x00a0780000000000, 0x0161799000000000, + 0x0122789000000000, 0x00e3790000000000, 0x01a47a9000000000, + 0x00657b0000000000, 0x00267a0000000000, 0x01e77b9000000000, + 0x01a87f9000000000, 0x00697e0000000000, 0x002a7f0000000000, + 0x01eb7e9000000000, 0x00ac7d0000000000, 0x016d7c9000000000, + 0x012e7d9000000000, 0x00ef7c0000000000, 0x01b0759000000000, + 0x0071740000000000, 0x0032750000000000, 0x01f3749000000000, + 0x00b4770000000000, 0x0175769000000000, 0x0136779000000000, + 0x00f7760000000000, 0x00b8720000000000, 0x0179739000000000, + 0x013a729000000000, 0x00fb730000000000, 0x01bc709000000000, + 0x007d710000000000, 0x003e700000000000, 0x01ff719000000000, + 0x00c0500000000000, 0x0101519000000000, 0x0142509000000000, + 0x0083510000000000, 0x01c4529000000000, 0x0005530000000000, + 0x0046520000000000, 0x0187539000000000, 0x01c8579000000000, + 0x0009560000000000, 0x004a570000000000, 0x018b569000000000, + 0x00cc550000000000, 0x010d549000000000, 0x014e559000000000, + 0x008f540000000000, 0x01d05d9000000000, 0x00115c0000000000, + 0x00525d0000000000, 0x01935c9000000000, 0x00d45f0000000000, + 0x01155e9000000000, 0x01565f9000000000, 0x00975e0000000000, + 0x00d85a0000000000, 0x01195b9000000000, 0x015a5a9000000000, + 0x009b5b0000000000, 0x01dc589000000000, 0x001d590000000000, + 0x005e580000000000, 0x019f599000000000, 0x01e0499000000000, + 0x0021480000000000, 0x0062490000000000, 0x01a3489000000000, + 0x00e44b0000000000, 0x01254a9000000000, 0x01664b9000000000, + 0x00a74a0000000000, 0x00e84e0000000000, 0x01294f9000000000, + 0x016a4e9000000000, 0x00ab4f0000000000, 0x01ec4c9000000000, + 0x002d4d0000000000, 0x006e4c0000000000, 0x01af4d9000000000, + 0x00f0440000000000, 0x0131459000000000, 0x0172449000000000, + 0x00b3450000000000, 0x01f4469000000000, 0x0035470000000000, + 0x0076460000000000, 0x01b7479000000000, 0x01f8439000000000, + 0x0039420000000000, 0x007a430000000000, 0x01bb429000000000, + 0x00fc410000000000, 0x013d409000000000, 0x017e419000000000, + 0x00bf400000000000}, + {0x0000000000000000, 0xc000019000000000, 0x8301019000000000, + 0x4301000000000000, 0x0503019000000000, 0xc503000000000000, + 0x8602000000000000, 0x4602019000000000, 0x0906019000000000, + 0xc906000000000000, 0x8a07000000000000, 0x4a07019000000000, + 0x0c05000000000000, 0xcc05019000000000, 0x8f04019000000000, + 0x4f04000000000000, 0x110c019000000000, 0xd10c000000000000, + 0x920d000000000000, 0x520d019000000000, 0x140f000000000000, + 0xd40f019000000000, 0x970e019000000000, 0x570e000000000000, + 0x180a000000000000, 0xd80a019000000000, 0x9b0b019000000000, + 0x5b0b000000000000, 0x1d09019000000000, 0xdd09000000000000, + 0x9e08000000000000, 0x5e08019000000000, 0x2118019000000000, + 0xe118000000000000, 0xa219000000000000, 0x6219019000000000, + 0x241b000000000000, 0xe41b019000000000, 0xa71a019000000000, + 0x671a000000000000, 0x281e000000000000, 0xe81e019000000000, + 0xab1f019000000000, 0x6b1f000000000000, 0x2d1d019000000000, + 0xed1d000000000000, 0xae1c000000000000, 0x6e1c019000000000, + 0x3014000000000000, 0xf014019000000000, 0xb315019000000000, + 0x7315000000000000, 0x3517019000000000, 0xf517000000000000, + 0xb616000000000000, 0x7616019000000000, 0x3912019000000000, + 0xf912000000000000, 0xba13000000000000, 0x7a13019000000000, + 0x3c11000000000000, 0xfc11019000000000, 0xbf10019000000000, + 0x7f10000000000000, 0x4130019000000000, 0x8130000000000000, + 0xc231000000000000, 0x0231019000000000, 0x4433000000000000, + 0x8433019000000000, 0xc732019000000000, 0x0732000000000000, + 0x4836000000000000, 0x8836019000000000, 0xcb37019000000000, + 0x0b37000000000000, 0x4d35019000000000, 0x8d35000000000000, + 0xce34000000000000, 0x0e34019000000000, 0x503c000000000000, + 0x903c019000000000, 0xd33d019000000000, 0x133d000000000000, + 0x553f019000000000, 0x953f000000000000, 0xd63e000000000000, + 0x163e019000000000, 0x593a019000000000, 0x993a000000000000, + 0xda3b000000000000, 0x1a3b019000000000, 0x5c39000000000000, + 0x9c39019000000000, 0xdf38019000000000, 0x1f38000000000000, + 0x6028000000000000, 0xa028019000000000, 0xe329019000000000, + 0x2329000000000000, 0x652b019000000000, 0xa52b000000000000, + 0xe62a000000000000, 0x262a019000000000, 0x692e019000000000, + 0xa92e000000000000, 0xea2f000000000000, 0x2a2f019000000000, + 0x6c2d000000000000, 0xac2d019000000000, 0xef2c019000000000, + 0x2f2c000000000000, 0x7124019000000000, 0xb124000000000000, + 0xf225000000000000, 0x3225019000000000, 0x7427000000000000, + 0xb427019000000000, 0xf726019000000000, 0x3726000000000000, + 0x7822000000000000, 0xb822019000000000, 0xfb23019000000000, + 0x3b23000000000000, 0x7d21019000000000, 0xbd21000000000000, + 0xfe20000000000000, 0x3e20019000000000, 0x8160019000000000, + 0x4160000000000000, 0x0261000000000000, 0xc261019000000000, + 0x8463000000000000, 0x4463019000000000, 0x0762019000000000, + 0xc762000000000000, 0x8866000000000000, 0x4866019000000000, + 0x0b67019000000000, 0xcb67000000000000, 0x8d65019000000000, + 0x4d65000000000000, 0x0e64000000000000, 0xce64019000000000, + 0x906c000000000000, 0x506c019000000000, 0x136d019000000000, + 0xd36d000000000000, 0x956f019000000000, 0x556f000000000000, + 0x166e000000000000, 0xd66e019000000000, 0x996a019000000000, + 0x596a000000000000, 0x1a6b000000000000, 0xda6b019000000000, + 0x9c69000000000000, 0x5c69019000000000, 0x1f68019000000000, + 0xdf68000000000000, 0xa078000000000000, 0x6078019000000000, + 0x2379019000000000, 0xe379000000000000, 0xa57b019000000000, + 0x657b000000000000, 0x267a000000000000, 0xe67a019000000000, + 0xa97e019000000000, 0x697e000000000000, 0x2a7f000000000000, + 0xea7f019000000000, 0xac7d000000000000, 0x6c7d019000000000, + 0x2f7c019000000000, 0xef7c000000000000, 0xb174019000000000, + 0x7174000000000000, 0x3275000000000000, 0xf275019000000000, + 0xb477000000000000, 0x7477019000000000, 0x3776019000000000, + 0xf776000000000000, 0xb872000000000000, 0x7872019000000000, + 0x3b73019000000000, 0xfb73000000000000, 0xbd71019000000000, + 0x7d71000000000000, 0x3e70000000000000, 0xfe70019000000000, + 0xc050000000000000, 0x0050019000000000, 0x4351019000000000, + 0x8351000000000000, 0xc553019000000000, 0x0553000000000000, + 0x4652000000000000, 0x8652019000000000, 0xc956019000000000, + 0x0956000000000000, 0x4a57000000000000, 0x8a57019000000000, + 0xcc55000000000000, 0x0c55019000000000, 0x4f54019000000000, + 0x8f54000000000000, 0xd15c019000000000, 0x115c000000000000, + 0x525d000000000000, 0x925d019000000000, 0xd45f000000000000, + 0x145f019000000000, 0x575e019000000000, 0x975e000000000000, + 0xd85a000000000000, 0x185a019000000000, 0x5b5b019000000000, + 0x9b5b000000000000, 0xdd59019000000000, 0x1d59000000000000, + 0x5e58000000000000, 0x9e58019000000000, 0xe148019000000000, + 0x2148000000000000, 0x6249000000000000, 0xa249019000000000, + 0xe44b000000000000, 0x244b019000000000, 0x674a019000000000, + 0xa74a000000000000, 0xe84e000000000000, 0x284e019000000000, + 0x6b4f019000000000, 0xab4f000000000000, 0xed4d019000000000, + 0x2d4d000000000000, 0x6e4c000000000000, 0xae4c019000000000, + 0xf044000000000000, 0x3044019000000000, 0x7345019000000000, + 0xb345000000000000, 0xf547019000000000, 0x3547000000000000, + 0x7646000000000000, 0xb646019000000000, 0xf942019000000000, + 0x3942000000000000, 0x7a43000000000000, 0xba43019000000000, + 0xfc41000000000000, 0x3c41019000000000, 0x7f40019000000000, + 0xbf40000000000000}, + {0x0000000000000000, 0x00c1906c00000000, 0x008221d900000000, + 0x0043b1b500000000, 0x0304400200000000, 0x03c5d06e00000000, + 0x038661db00000000, 0x0347f1b700000000, 0x0608800400000000, + 0x06c9106800000000, 0x068aa1dd00000000, 0x064b31b100000000, + 0x050cc00600000000, 0x05cd506a00000000, 0x058ee1df00000000, + 0x054f71b300000000, 0x0c10000900000000, 0x0cd1906500000000, + 0x0c9221d000000000, 0x0c53b1bc00000000, 0x0f14400b00000000, + 0x0fd5d06700000000, 0x0f9661d200000000, 0x0f57f1be00000000, + 0x0a18800d00000000, 0x0ad9106100000000, 0x0a9aa1d400000000, + 0x0a5b31b800000000, 0x091cc00f00000000, 0x09dd506300000000, + 0x099ee1d600000000, 0x095f71ba00000000, 0x1820001200000000, + 0x18e1907e00000000, 0x18a221cb00000000, 0x1863b1a700000000, + 0x1b24401000000000, 0x1be5d07c00000000, 0x1ba661c900000000, + 0x1b67f1a500000000, 0x1e28801600000000, 0x1ee9107a00000000, + 0x1eaaa1cf00000000, 0x1e6b31a300000000, 0x1d2cc01400000000, + 0x1ded507800000000, 0x1daee1cd00000000, 0x1d6f71a100000000, + 0x1430001b00000000, 0x14f1907700000000, 0x14b221c200000000, + 0x1473b1ae00000000, 0x1734401900000000, 0x17f5d07500000000, + 0x17b661c000000000, 0x1777f1ac00000000, 0x1238801f00000000, + 0x12f9107300000000, 0x12baa1c600000000, 0x127b31aa00000000, + 0x113cc01d00000000, 0x11fd507100000000, 0x11bee1c400000000, + 0x117f71a800000000, 0x3040002400000000, 0x3081904800000000, + 0x30c221fd00000000, 0x3003b19100000000, 0x3344402600000000, + 0x3385d04a00000000, 0x33c661ff00000000, 0x3307f19300000000, + 0x3648802000000000, 0x3689104c00000000, 0x36caa1f900000000, + 0x360b319500000000, 0x354cc02200000000, 0x358d504e00000000, + 0x35cee1fb00000000, 0x350f719700000000, 0x3c50002d00000000, + 0x3c91904100000000, 0x3cd221f400000000, 0x3c13b19800000000, + 0x3f54402f00000000, 0x3f95d04300000000, 0x3fd661f600000000, + 0x3f17f19a00000000, 0x3a58802900000000, 0x3a99104500000000, + 0x3adaa1f000000000, 0x3a1b319c00000000, 0x395cc02b00000000, + 0x399d504700000000, 0x39dee1f200000000, 0x391f719e00000000, + 0x2860003600000000, 0x28a1905a00000000, 0x28e221ef00000000, + 0x2823b18300000000, 0x2b64403400000000, 0x2ba5d05800000000, + 0x2be661ed00000000, 0x2b27f18100000000, 0x2e68803200000000, + 0x2ea9105e00000000, 0x2eeaa1eb00000000, 0x2e2b318700000000, + 0x2d6cc03000000000, 0x2dad505c00000000, 0x2deee1e900000000, + 0x2d2f718500000000, 0x2470003f00000000, 0x24b1905300000000, + 0x24f221e600000000, 0x2433b18a00000000, 0x2774403d00000000, + 0x27b5d05100000000, 0x27f661e400000000, 0x2737f18800000000, + 0x2278803b00000000, 0x22b9105700000000, 0x22faa1e200000000, + 0x223b318e00000000, 0x217cc03900000000, 0x21bd505500000000, + 0x21fee1e000000000, 0x213f718c00000000, 0x6080004800000000, + 0x6041902400000000, 0x6002219100000000, 0x60c3b1fd00000000, + 0x6384404a00000000, 0x6345d02600000000, 0x6306619300000000, + 0x63c7f1ff00000000, 0x6688804c00000000, 0x6649102000000000, + 0x660aa19500000000, 0x66cb31f900000000, 0x658cc04e00000000, + 0x654d502200000000, 0x650ee19700000000, 0x65cf71fb00000000, + 0x6c90004100000000, 0x6c51902d00000000, 0x6c12219800000000, + 0x6cd3b1f400000000, 0x6f94404300000000, 0x6f55d02f00000000, + 0x6f16619a00000000, 0x6fd7f1f600000000, 0x6a98804500000000, + 0x6a59102900000000, 0x6a1aa19c00000000, 0x6adb31f000000000, + 0x699cc04700000000, 0x695d502b00000000, 0x691ee19e00000000, + 0x69df71f200000000, 0x78a0005a00000000, 0x7861903600000000, + 0x7822218300000000, 0x78e3b1ef00000000, 0x7ba4405800000000, + 0x7b65d03400000000, 0x7b26618100000000, 0x7be7f1ed00000000, + 0x7ea8805e00000000, 0x7e69103200000000, 0x7e2aa18700000000, + 0x7eeb31eb00000000, 0x7dacc05c00000000, 0x7d6d503000000000, + 0x7d2ee18500000000, 0x7def71e900000000, 0x74b0005300000000, + 0x7471903f00000000, 0x7432218a00000000, 0x74f3b1e600000000, + 0x77b4405100000000, 0x7775d03d00000000, 0x7736618800000000, + 0x77f7f1e400000000, 0x72b8805700000000, 0x7279103b00000000, + 0x723aa18e00000000, 0x72fb31e200000000, 0x71bcc05500000000, + 0x717d503900000000, 0x713ee18c00000000, 0x71ff71e000000000, + 0x50c0006c00000000, 0x5001900000000000, 0x504221b500000000, + 0x5083b1d900000000, 0x53c4406e00000000, 0x5305d00200000000, + 0x534661b700000000, 0x5387f1db00000000, 0x56c8806800000000, + 0x5609100400000000, 0x564aa1b100000000, 0x568b31dd00000000, + 0x55ccc06a00000000, 0x550d500600000000, 0x554ee1b300000000, + 0x558f71df00000000, 0x5cd0006500000000, 0x5c11900900000000, + 0x5c5221bc00000000, 0x5c93b1d000000000, 0x5fd4406700000000, + 0x5f15d00b00000000, 0x5f5661be00000000, 0x5f97f1d200000000, + 0x5ad8806100000000, 0x5a19100d00000000, 0x5a5aa1b800000000, + 0x5a9b31d400000000, 0x59dcc06300000000, 0x591d500f00000000, + 0x595ee1ba00000000, 0x599f71d600000000, 0x48e0007e00000000, + 0x4821901200000000, 0x486221a700000000, 0x48a3b1cb00000000, + 0x4be4407c00000000, 0x4b25d01000000000, 0x4b6661a500000000, + 0x4ba7f1c900000000, 0x4ee8807a00000000, 0x4e29101600000000, + 0x4e6aa1a300000000, 0x4eab31cf00000000, 0x4decc07800000000, + 0x4d2d501400000000, 0x4d6ee1a100000000, 0x4daf71cd00000000, + 0x44f0007700000000, 0x4431901b00000000, 0x447221ae00000000, + 0x44b3b1c200000000, 0x47f4407500000000, 0x4735d01900000000, + 0x477661ac00000000, 0x47b7f1c000000000, 0x42f8807300000000, + 0x4239101f00000000, 0x427aa1aa00000000, 0x42bb31c600000000, + 0x41fcc07100000000, 0x413d501d00000000, 0x417ee1a800000000, + 0x41bf71c400000000}}; + +#else /* W == 4 */ + +static const crc_t crc_braid_table[][256] = { + {0x00000000, 0x65904101, 0xcb208202, 0xaeb0c303, 0x26420407, + 0x43d24506, 0xed628605, 0x88f2c704, 0x4c84080e, 0x2914490f, + 0x87a48a0c, 0xe234cb0d, 0x6ac60c09, 0x0f564d08, 0xa1e68e0b, + 0xc476cf0a, 0x9908101c, 0xfc98511d, 0x5228921e, 0x37b8d31f, + 0xbf4a141b, 0xdada551a, 0x746a9619, 0x11fad718, 0xd58c1812, + 0xb01c5913, 0x1eac9a10, 0x7b3cdb11, 0xf3ce1c15, 0x965e5d14, + 0x38ee9e17, 0x5d7edf16, 0x8213203b, 0xe783613a, 0x4933a239, + 0x2ca3e338, 0xa451243c, 0xc1c1653d, 0x6f71a63e, 0x0ae1e73f, + 0xce972835, 0xab076934, 0x05b7aa37, 0x6027eb36, 0xe8d52c32, + 0x8d456d33, 0x23f5ae30, 0x4665ef31, 0x1b1b3027, 0x7e8b7126, + 0xd03bb225, 0xb5abf324, 0x3d593420, 0x58c97521, 0xf679b622, + 0x93e9f723, 0x579f3829, 0x320f7928, 0x9cbfba2b, 0xf92ffb2a, + 0x71dd3c2e, 0x144d7d2f, 0xbafdbe2c, 0xdf6dff2d, 0xb4254075, + 0xd1b50174, 0x7f05c277, 0x1a958376, 0x92674472, 0xf7f70573, + 0x5947c670, 0x3cd78771, 0xf8a1487b, 0x9d31097a, 0x3381ca79, + 0x56118b78, 0xdee34c7c, 0xbb730d7d, 0x15c3ce7e, 0x70538f7f, + 0x2d2d5069, 0x48bd1168, 0xe60dd26b, 0x839d936a, 0x0b6f546e, + 0x6eff156f, 0xc04fd66c, 0xa5df976d, 0x61a95867, 0x04391966, + 0xaa89da65, 0xcf199b64, 0x47eb5c60, 0x227b1d61, 0x8ccbde62, + 0xe95b9f63, 0x3636604e, 0x53a6214f, 0xfd16e24c, 0x9886a34d, + 0x10746449, 0x75e42548, 0xdb54e64b, 0xbec4a74a, 0x7ab26840, + 0x1f222941, 0xb192ea42, 0xd402ab43, 0x5cf06c47, 0x39602d46, + 0x97d0ee45, 0xf240af44, 0xaf3e7052, 0xcaae3153, 0x641ef250, + 0x018eb351, 0x897c7455, 0xecec3554, 0x425cf657, 0x27ccb756, + 0xe3ba785c, 0x862a395d, 0x289afa5e, 0x4d0abb5f, 0xc5f87c5b, + 0xa0683d5a, 0x0ed8fe59, 0x6b48bf58, 0xd84980e9, 0xbdd9c1e8, + 0x136902eb, 0x76f943ea, 0xfe0b84ee, 0x9b9bc5ef, 0x352b06ec, + 0x50bb47ed, 0x94cd88e7, 0xf15dc9e6, 0x5fed0ae5, 0x3a7d4be4, + 0xb28f8ce0, 0xd71fcde1, 0x79af0ee2, 0x1c3f4fe3, 0x414190f5, + 0x24d1d1f4, 0x8a6112f7, 0xeff153f6, 0x670394f2, 0x0293d5f3, + 0xac2316f0, 0xc9b357f1, 0x0dc598fb, 0x6855d9fa, 0xc6e51af9, + 0xa3755bf8, 0x2b879cfc, 0x4e17ddfd, 0xe0a71efe, 0x85375fff, + 0x5a5aa0d2, 0x3fcae1d3, 0x917a22d0, 0xf4ea63d1, 0x7c18a4d5, + 0x1988e5d4, 0xb73826d7, 0xd2a867d6, 0x16dea8dc, 0x734ee9dd, + 0xddfe2ade, 0xb86e6bdf, 0x309cacdb, 0x550cedda, 0xfbbc2ed9, + 0x9e2c6fd8, 0xc352b0ce, 0xa6c2f1cf, 0x087232cc, 0x6de273cd, + 0xe510b4c9, 0x8080f5c8, 0x2e3036cb, 0x4ba077ca, 0x8fd6b8c0, + 0xea46f9c1, 0x44f63ac2, 0x21667bc3, 0xa994bcc7, 0xcc04fdc6, + 0x62b43ec5, 0x07247fc4, 0x6c6cc09c, 0x09fc819d, 0xa74c429e, + 0xc2dc039f, 0x4a2ec49b, 0x2fbe859a, 0x810e4699, 0xe49e0798, + 0x20e8c892, 0x45788993, 0xebc84a90, 0x8e580b91, 0x06aacc95, + 0x633a8d94, 0xcd8a4e97, 0xa81a0f96, 0xf564d080, 0x90f49181, + 0x3e445282, 0x5bd41383, 0xd326d487, 0xb6b69586, 0x18065685, + 0x7d961784, 0xb9e0d88e, 0xdc70998f, 0x72c05a8c, 0x17501b8d, + 0x9fa2dc89, 0xfa329d88, 0x54825e8b, 0x31121f8a, 0xee7fe0a7, + 0x8befa1a6, 0x255f62a5, 0x40cf23a4, 0xc83de4a0, 0xadada5a1, + 0x031d66a2, 0x668d27a3, 0xa2fbe8a9, 0xc76ba9a8, 0x69db6aab, + 0x0c4b2baa, 0x84b9ecae, 0xe129adaf, 0x4f996eac, 0x2a092fad, + 0x7777f0bb, 0x12e7b1ba, 0xbc5772b9, 0xd9c733b8, 0x5135f4bc, + 0x34a5b5bd, 0x9a1576be, 0xff8537bf, 0x3bf3f8b5, 0x5e63b9b4, + 0xf0d37ab7, 0x95433bb6, 0x1db1fcb2, 0x7821bdb3, 0xd6917eb0, + 0xb3013fb1}, + {0x00000000, 0x009001d1, 0x012003a2, 0x01b00273, 0x02400744, + 0x02d00695, 0x036004e6, 0x03f00537, 0x04800e88, 0x04100f59, + 0x05a00d2a, 0x05300cfb, 0x06c009cc, 0x0650081d, 0x07e00a6e, + 0x07700bbf, 0x09001d10, 0x09901cc1, 0x08201eb2, 0x08b01f63, + 0x0b401a54, 0x0bd01b85, 0x0a6019f6, 0x0af01827, 0x0d801398, + 0x0d101249, 0x0ca0103a, 0x0c3011eb, 0x0fc014dc, 0x0f50150d, + 0x0ee0177e, 0x0e7016af, 0x12003a20, 0x12903bf1, 0x13203982, + 0x13b03853, 0x10403d64, 0x10d03cb5, 0x11603ec6, 0x11f03f17, + 0x168034a8, 0x16103579, 0x17a0370a, 0x173036db, 0x14c033ec, + 0x1450323d, 0x15e0304e, 0x1570319f, 0x1b002730, 0x1b9026e1, + 0x1a202492, 0x1ab02543, 0x19402074, 0x19d021a5, 0x186023d6, + 0x18f02207, 0x1f8029b8, 0x1f102869, 0x1ea02a1a, 0x1e302bcb, + 0x1dc02efc, 0x1d502f2d, 0x1ce02d5e, 0x1c702c8f, 0x24007440, + 0x24907591, 0x252077e2, 0x25b07633, 0x26407304, 0x26d072d5, + 0x276070a6, 0x27f07177, 0x20807ac8, 0x20107b19, 0x21a0796a, + 0x213078bb, 0x22c07d8c, 0x22507c5d, 0x23e07e2e, 0x23707fff, + 0x2d006950, 0x2d906881, 0x2c206af2, 0x2cb06b23, 0x2f406e14, + 0x2fd06fc5, 0x2e606db6, 0x2ef06c67, 0x298067d8, 0x29106609, + 0x28a0647a, 0x283065ab, 0x2bc0609c, 0x2b50614d, 0x2ae0633e, + 0x2a7062ef, 0x36004e60, 0x36904fb1, 0x37204dc2, 0x37b04c13, + 0x34404924, 0x34d048f5, 0x35604a86, 0x35f04b57, 0x328040e8, + 0x32104139, 0x33a0434a, 0x3330429b, 0x30c047ac, 0x3050467d, + 0x31e0440e, 0x317045df, 0x3f005370, 0x3f9052a1, 0x3e2050d2, + 0x3eb05103, 0x3d405434, 0x3dd055e5, 0x3c605796, 0x3cf05647, + 0x3b805df8, 0x3b105c29, 0x3aa05e5a, 0x3a305f8b, 0x39c05abc, + 0x39505b6d, 0x38e0591e, 0x387058cf, 0x4800e880, 0x4890e951, + 0x4920eb22, 0x49b0eaf3, 0x4a40efc4, 0x4ad0ee15, 0x4b60ec66, + 0x4bf0edb7, 0x4c80e608, 0x4c10e7d9, 0x4da0e5aa, 0x4d30e47b, + 0x4ec0e14c, 0x4e50e09d, 0x4fe0e2ee, 0x4f70e33f, 0x4100f590, + 0x4190f441, 0x4020f632, 0x40b0f7e3, 0x4340f2d4, 0x43d0f305, + 0x4260f176, 0x42f0f0a7, 0x4580fb18, 0x4510fac9, 0x44a0f8ba, + 0x4430f96b, 0x47c0fc5c, 0x4750fd8d, 0x46e0fffe, 0x4670fe2f, + 0x5a00d2a0, 0x5a90d371, 0x5b20d102, 0x5bb0d0d3, 0x5840d5e4, + 0x58d0d435, 0x5960d646, 0x59f0d797, 0x5e80dc28, 0x5e10ddf9, + 0x5fa0df8a, 0x5f30de5b, 0x5cc0db6c, 0x5c50dabd, 0x5de0d8ce, + 0x5d70d91f, 0x5300cfb0, 0x5390ce61, 0x5220cc12, 0x52b0cdc3, + 0x5140c8f4, 0x51d0c925, 0x5060cb56, 0x50f0ca87, 0x5780c138, + 0x5710c0e9, 0x56a0c29a, 0x5630c34b, 0x55c0c67c, 0x5550c7ad, + 0x54e0c5de, 0x5470c40f, 0x6c009cc0, 0x6c909d11, 0x6d209f62, + 0x6db09eb3, 0x6e409b84, 0x6ed09a55, 0x6f609826, 0x6ff099f7, + 0x68809248, 0x68109399, 0x69a091ea, 0x6930903b, 0x6ac0950c, + 0x6a5094dd, 0x6be096ae, 0x6b70977f, 0x650081d0, 0x65908001, + 0x64208272, 0x64b083a3, 0x67408694, 0x67d08745, 0x66608536, + 0x66f084e7, 0x61808f58, 0x61108e89, 0x60a08cfa, 0x60308d2b, + 0x63c0881c, 0x635089cd, 0x62e08bbe, 0x62708a6f, 0x7e00a6e0, + 0x7e90a731, 0x7f20a542, 0x7fb0a493, 0x7c40a1a4, 0x7cd0a075, + 0x7d60a206, 0x7df0a3d7, 0x7a80a868, 0x7a10a9b9, 0x7ba0abca, + 0x7b30aa1b, 0x78c0af2c, 0x7850aefd, 0x79e0ac8e, 0x7970ad5f, + 0x7700bbf0, 0x7790ba21, 0x7620b852, 0x76b0b983, 0x7540bcb4, + 0x75d0bd65, 0x7460bf16, 0x74f0bec7, 0x7380b578, 0x7310b4a9, + 0x72a0b6da, 0x7230b70b, 0x71c0b23c, 0x7150b3ed, 0x70e0b19e, + 0x7070b04f}, + {0x00000000, 0x9001d100, 0x9000a203, 0x00017303, 0x90024405, + 0x00039505, 0x0002e606, 0x90033706, 0x90078809, 0x00065909, + 0x00072a0a, 0x9006fb0a, 0x0005cc0c, 0x90041d0c, 0x90056e0f, + 0x0004bf0f, 0x900c1011, 0x000dc111, 0x000cb212, 0x900d6312, + 0x000e5414, 0x900f8514, 0x900ef617, 0x000f2717, 0x000b9818, + 0x900a4918, 0x900b3a1b, 0x000aeb1b, 0x9009dc1d, 0x00080d1d, + 0x00097e1e, 0x9008af1e, 0x901b2021, 0x001af121, 0x001b8222, + 0x901a5322, 0x00196424, 0x9018b524, 0x9019c627, 0x00181727, + 0x001ca828, 0x901d7928, 0x901c0a2b, 0x001ddb2b, 0x901eec2d, + 0x001f3d2d, 0x001e4e2e, 0x901f9f2e, 0x00173030, 0x9016e130, + 0x90179233, 0x00164333, 0x90157435, 0x0014a535, 0x0015d636, + 0x90140736, 0x9010b839, 0x00116939, 0x00101a3a, 0x9011cb3a, + 0x0012fc3c, 0x90132d3c, 0x90125e3f, 0x00138f3f, 0x90354041, + 0x00349141, 0x0035e242, 0x90343342, 0x00370444, 0x9036d544, + 0x9037a647, 0x00367747, 0x0032c848, 0x90331948, 0x90326a4b, + 0x0033bb4b, 0x90308c4d, 0x00315d4d, 0x00302e4e, 0x9031ff4e, + 0x00395050, 0x90388150, 0x9039f253, 0x00382353, 0x903b1455, + 0x003ac555, 0x003bb656, 0x903a6756, 0x903ed859, 0x003f0959, + 0x003e7a5a, 0x903fab5a, 0x003c9c5c, 0x903d4d5c, 0x903c3e5f, + 0x003def5f, 0x002e6060, 0x902fb160, 0x902ec263, 0x002f1363, + 0x902c2465, 0x002df565, 0x002c8666, 0x902d5766, 0x9029e869, + 0x00283969, 0x00294a6a, 0x90289b6a, 0x002bac6c, 0x902a7d6c, + 0x902b0e6f, 0x002adf6f, 0x90227071, 0x0023a171, 0x0022d272, + 0x90230372, 0x00203474, 0x9021e574, 0x90209677, 0x00214777, + 0x0025f878, 0x90242978, 0x90255a7b, 0x00248b7b, 0x9027bc7d, + 0x00266d7d, 0x00271e7e, 0x9026cf7e, 0x90698081, 0x00685181, + 0x00692282, 0x9068f382, 0x006bc484, 0x906a1584, 0x906b6687, + 0x006ab787, 0x006e0888, 0x906fd988, 0x906eaa8b, 0x006f7b8b, + 0x906c4c8d, 0x006d9d8d, 0x006cee8e, 0x906d3f8e, 0x00659090, + 0x90644190, 0x90653293, 0x0064e393, 0x9067d495, 0x00660595, + 0x00677696, 0x9066a796, 0x90621899, 0x0063c999, 0x0062ba9a, + 0x90636b9a, 0x00605c9c, 0x90618d9c, 0x9060fe9f, 0x00612f9f, + 0x0072a0a0, 0x907371a0, 0x907202a3, 0x0073d3a3, 0x9070e4a5, + 0x007135a5, 0x007046a6, 0x907197a6, 0x907528a9, 0x0074f9a9, + 0x00758aaa, 0x90745baa, 0x00776cac, 0x9076bdac, 0x9077ceaf, + 0x00761faf, 0x907eb0b1, 0x007f61b1, 0x007e12b2, 0x907fc3b2, + 0x007cf4b4, 0x907d25b4, 0x907c56b7, 0x007d87b7, 0x007938b8, + 0x9078e9b8, 0x90799abb, 0x00784bbb, 0x907b7cbd, 0x007aadbd, + 0x007bdebe, 0x907a0fbe, 0x005cc0c0, 0x905d11c0, 0x905c62c3, + 0x005db3c3, 0x905e84c5, 0x005f55c5, 0x005e26c6, 0x905ff7c6, + 0x905b48c9, 0x005a99c9, 0x005beaca, 0x905a3bca, 0x00590ccc, + 0x9058ddcc, 0x9059aecf, 0x00587fcf, 0x9050d0d1, 0x005101d1, + 0x005072d2, 0x9051a3d2, 0x005294d4, 0x905345d4, 0x905236d7, + 0x0053e7d7, 0x005758d8, 0x905689d8, 0x9057fadb, 0x00562bdb, + 0x90551cdd, 0x0054cddd, 0x0055bede, 0x90546fde, 0x9047e0e1, + 0x004631e1, 0x004742e2, 0x904693e2, 0x0045a4e4, 0x904475e4, + 0x904506e7, 0x0044d7e7, 0x004068e8, 0x9041b9e8, 0x9040caeb, + 0x00411beb, 0x90422ced, 0x0043fded, 0x00428eee, 0x90435fee, + 0x004bf0f0, 0x904a21f0, 0x904b52f3, 0x004a83f3, 0x9049b4f5, + 0x004865f5, 0x004916f6, 0x9048c7f6, 0x904c78f9, 0x004da9f9, + 0x004cdafa, 0x904d0bfa, 0x004e3cfc, 0x904fedfc, 0x904e9eff, + 0x004f4fff}, + {0x00000000, 0x90d00101, 0x91a30201, 0x01730300, 0x93450401, + 0x03950500, 0x02e60600, 0x92360701, 0x96890801, 0x06590900, + 0x072a0a00, 0x97fa0b01, 0x05cc0c00, 0x951c0d01, 0x946f0e01, + 0x04bf0f00, 0x9d111001, 0x0dc11100, 0x0cb21200, 0x9c621301, + 0x0e541400, 0x9e841501, 0x9ff71601, 0x0f271700, 0x0b981800, + 0x9b481901, 0x9a3b1a01, 0x0aeb1b00, 0x98dd1c01, 0x080d1d00, + 0x097e1e00, 0x99ae1f01, 0x8a212001, 0x1af12100, 0x1b822200, + 0x8b522301, 0x19642400, 0x89b42501, 0x88c72601, 0x18172700, + 0x1ca82800, 0x8c782901, 0x8d0b2a01, 0x1ddb2b00, 0x8fed2c01, + 0x1f3d2d00, 0x1e4e2e00, 0x8e9e2f01, 0x17303000, 0x87e03101, + 0x86933201, 0x16433300, 0x84753401, 0x14a53500, 0x15d63600, + 0x85063701, 0x81b93801, 0x11693900, 0x101a3a00, 0x80ca3b01, + 0x12fc3c00, 0x822c3d01, 0x835f3e01, 0x138f3f00, 0xa4414001, + 0x34914100, 0x35e24200, 0xa5324301, 0x37044400, 0xa7d44501, + 0xa6a74601, 0x36774700, 0x32c84800, 0xa2184901, 0xa36b4a01, + 0x33bb4b00, 0xa18d4c01, 0x315d4d00, 0x302e4e00, 0xa0fe4f01, + 0x39505000, 0xa9805101, 0xa8f35201, 0x38235300, 0xaa155401, + 0x3ac55500, 0x3bb65600, 0xab665701, 0xafd95801, 0x3f095900, + 0x3e7a5a00, 0xaeaa5b01, 0x3c9c5c00, 0xac4c5d01, 0xad3f5e01, + 0x3def5f00, 0x2e606000, 0xbeb06101, 0xbfc36201, 0x2f136300, + 0xbd256401, 0x2df56500, 0x2c866600, 0xbc566701, 0xb8e96801, + 0x28396900, 0x294a6a00, 0xb99a6b01, 0x2bac6c00, 0xbb7c6d01, + 0xba0f6e01, 0x2adf6f00, 0xb3717001, 0x23a17100, 0x22d27200, + 0xb2027301, 0x20347400, 0xb0e47501, 0xb1977601, 0x21477700, + 0x25f87800, 0xb5287901, 0xb45b7a01, 0x248b7b00, 0xb6bd7c01, + 0x266d7d00, 0x271e7e00, 0xb7ce7f01, 0xf8818001, 0x68518100, + 0x69228200, 0xf9f28301, 0x6bc48400, 0xfb148501, 0xfa678601, + 0x6ab78700, 0x6e088800, 0xfed88901, 0xffab8a01, 0x6f7b8b00, + 0xfd4d8c01, 0x6d9d8d00, 0x6cee8e00, 0xfc3e8f01, 0x65909000, + 0xf5409101, 0xf4339201, 0x64e39300, 0xf6d59401, 0x66059500, + 0x67769600, 0xf7a69701, 0xf3199801, 0x63c99900, 0x62ba9a00, + 0xf26a9b01, 0x605c9c00, 0xf08c9d01, 0xf1ff9e01, 0x612f9f00, + 0x72a0a000, 0xe270a101, 0xe303a201, 0x73d3a300, 0xe1e5a401, + 0x7135a500, 0x7046a600, 0xe096a701, 0xe429a801, 0x74f9a900, + 0x758aaa00, 0xe55aab01, 0x776cac00, 0xe7bcad01, 0xe6cfae01, + 0x761faf00, 0xefb1b001, 0x7f61b100, 0x7e12b200, 0xeec2b301, + 0x7cf4b400, 0xec24b501, 0xed57b601, 0x7d87b700, 0x7938b800, + 0xe9e8b901, 0xe89bba01, 0x784bbb00, 0xea7dbc01, 0x7aadbd00, + 0x7bdebe00, 0xeb0ebf01, 0x5cc0c000, 0xcc10c101, 0xcd63c201, + 0x5db3c300, 0xcf85c401, 0x5f55c500, 0x5e26c600, 0xcef6c701, + 0xca49c801, 0x5a99c900, 0x5beaca00, 0xcb3acb01, 0x590ccc00, + 0xc9dccd01, 0xc8afce01, 0x587fcf00, 0xc1d1d001, 0x5101d100, + 0x5072d200, 0xc0a2d301, 0x5294d400, 0xc244d501, 0xc337d601, + 0x53e7d700, 0x5758d800, 0xc788d901, 0xc6fbda01, 0x562bdb00, + 0xc41ddc01, 0x54cddd00, 0x55bede00, 0xc56edf01, 0xd6e1e001, + 0x4631e100, 0x4742e200, 0xd792e301, 0x45a4e400, 0xd574e501, + 0xd407e601, 0x44d7e700, 0x4068e800, 0xd0b8e901, 0xd1cbea01, + 0x411beb00, 0xd32dec01, 0x43fded00, 0x428eee00, 0xd25eef01, + 0x4bf0f000, 0xdb20f101, 0xda53f201, 0x4a83f300, 0xd8b5f401, + 0x4865f500, 0x4916f600, 0xd9c6f701, 0xdd79f801, 0x4da9f900, + 0x4cdafa00, 0xdc0afb01, 0x4e3cfc00, 0xdeecfd01, 0xdf9ffe01, + 0x4f4fff00}}; + +static const word_t crc_braid_big_table[][256] = { + {0x00000000, 0x0101d090, 0x0102a391, 0x00037301, 0x01044593, + 0x00059503, 0x0006e602, 0x01073692, 0x01088996, 0x00095906, + 0x000a2a07, 0x010bfa97, 0x000ccc05, 0x010d1c95, 0x010e6f94, + 0x000fbf04, 0x0110119d, 0x0011c10d, 0x0012b20c, 0x0113629c, + 0x0014540e, 0x0115849e, 0x0116f79f, 0x0017270f, 0x0018980b, + 0x0119489b, 0x011a3b9a, 0x001beb0a, 0x011cdd98, 0x001d0d08, + 0x001e7e09, 0x011fae99, 0x0120218a, 0x0021f11a, 0x0022821b, + 0x0123528b, 0x00246419, 0x0125b489, 0x0126c788, 0x00271718, + 0x0028a81c, 0x0129788c, 0x012a0b8d, 0x002bdb1d, 0x012ced8f, + 0x002d3d1f, 0x002e4e1e, 0x012f9e8e, 0x00303017, 0x0131e087, + 0x01329386, 0x00334316, 0x01347584, 0x0035a514, 0x0036d615, + 0x01370685, 0x0138b981, 0x00396911, 0x003a1a10, 0x013bca80, + 0x003cfc12, 0x013d2c82, 0x013e5f83, 0x003f8f13, 0x014041a4, + 0x00419134, 0x0042e235, 0x014332a5, 0x00440437, 0x0145d4a7, + 0x0146a7a6, 0x00477736, 0x0048c832, 0x014918a2, 0x014a6ba3, + 0x004bbb33, 0x014c8da1, 0x004d5d31, 0x004e2e30, 0x014ffea0, + 0x00505039, 0x015180a9, 0x0152f3a8, 0x00532338, 0x015415aa, + 0x0055c53a, 0x0056b63b, 0x015766ab, 0x0158d9af, 0x0059093f, + 0x005a7a3e, 0x015baaae, 0x005c9c3c, 0x015d4cac, 0x015e3fad, + 0x005fef3d, 0x0060602e, 0x0161b0be, 0x0162c3bf, 0x0063132f, + 0x016425bd, 0x0065f52d, 0x0066862c, 0x016756bc, 0x0168e9b8, + 0x00693928, 0x006a4a29, 0x016b9ab9, 0x006cac2b, 0x016d7cbb, + 0x016e0fba, 0x006fdf2a, 0x017071b3, 0x0071a123, 0x0072d222, + 0x017302b2, 0x00743420, 0x0175e4b0, 0x017697b1, 0x00774721, + 0x0078f825, 0x017928b5, 0x017a5bb4, 0x007b8b24, 0x017cbdb6, + 0x007d6d26, 0x007e1e27, 0x017fceb7, 0x018081f8, 0x00815168, + 0x00822269, 0x0183f2f9, 0x0084c46b, 0x018514fb, 0x018667fa, + 0x0087b76a, 0x0088086e, 0x0189d8fe, 0x018aabff, 0x008b7b6f, + 0x018c4dfd, 0x008d9d6d, 0x008eee6c, 0x018f3efc, 0x00909065, + 0x019140f5, 0x019233f4, 0x0093e364, 0x0194d5f6, 0x00950566, + 0x00967667, 0x0197a6f7, 0x019819f3, 0x0099c963, 0x009aba62, + 0x019b6af2, 0x009c5c60, 0x019d8cf0, 0x019efff1, 0x009f2f61, + 0x00a0a072, 0x01a170e2, 0x01a203e3, 0x00a3d373, 0x01a4e5e1, + 0x00a53571, 0x00a64670, 0x01a796e0, 0x01a829e4, 0x00a9f974, + 0x00aa8a75, 0x01ab5ae5, 0x00ac6c77, 0x01adbce7, 0x01aecfe6, + 0x00af1f76, 0x01b0b1ef, 0x00b1617f, 0x00b2127e, 0x01b3c2ee, + 0x00b4f47c, 0x01b524ec, 0x01b657ed, 0x00b7877d, 0x00b83879, + 0x01b9e8e9, 0x01ba9be8, 0x00bb4b78, 0x01bc7dea, 0x00bdad7a, + 0x00bede7b, 0x01bf0eeb, 0x00c0c05c, 0x01c110cc, 0x01c263cd, + 0x00c3b35d, 0x01c485cf, 0x00c5555f, 0x00c6265e, 0x01c7f6ce, + 0x01c849ca, 0x00c9995a, 0x00caea5b, 0x01cb3acb, 0x00cc0c59, + 0x01cddcc9, 0x01ceafc8, 0x00cf7f58, 0x01d0d1c1, 0x00d10151, + 0x00d27250, 0x01d3a2c0, 0x00d49452, 0x01d544c2, 0x01d637c3, + 0x00d7e753, 0x00d85857, 0x01d988c7, 0x01dafbc6, 0x00db2b56, + 0x01dc1dc4, 0x00ddcd54, 0x00debe55, 0x01df6ec5, 0x01e0e1d6, + 0x00e13146, 0x00e24247, 0x01e392d7, 0x00e4a445, 0x01e574d5, + 0x01e607d4, 0x00e7d744, 0x00e86840, 0x01e9b8d0, 0x01eacbd1, + 0x00eb1b41, 0x01ec2dd3, 0x00edfd43, 0x00ee8e42, 0x01ef5ed2, + 0x00f0f04b, 0x01f120db, 0x01f253da, 0x00f3834a, 0x01f4b5d8, + 0x00f56548, 0x00f61649, 0x01f7c6d9, 0x01f879dd, 0x00f9a94d, + 0x00fada4c, 0x01fb0adc, 0x00fc3c4e, 0x01fdecde, 0x01fe9fdf, + 0x00ff4f4f}, + {0x00000000, 0x00d10190, 0x03a20090, 0x03730100, 0x05440290, + 0x05950300, 0x06e60200, 0x06370390, 0x09880790, 0x09590600, + 0x0a2a0700, 0x0afb0690, 0x0ccc0500, 0x0c1d0490, 0x0f6e0590, + 0x0fbf0400, 0x11100c90, 0x11c10d00, 0x12b20c00, 0x12630d90, + 0x14540e00, 0x14850f90, 0x17f60e90, 0x17270f00, 0x18980b00, + 0x18490a90, 0x1b3a0b90, 0x1beb0a00, 0x1ddc0990, 0x1d0d0800, + 0x1e7e0900, 0x1eaf0890, 0x21201b90, 0x21f11a00, 0x22821b00, + 0x22531a90, 0x24641900, 0x24b51890, 0x27c61990, 0x27171800, + 0x28a81c00, 0x28791d90, 0x2b0a1c90, 0x2bdb1d00, 0x2dec1e90, + 0x2d3d1f00, 0x2e4e1e00, 0x2e9f1f90, 0x30301700, 0x30e11690, + 0x33921790, 0x33431600, 0x35741590, 0x35a51400, 0x36d61500, + 0x36071490, 0x39b81090, 0x39691100, 0x3a1a1000, 0x3acb1190, + 0x3cfc1200, 0x3c2d1390, 0x3f5e1290, 0x3f8f1300, 0x41403590, + 0x41913400, 0x42e23500, 0x42333490, 0x44043700, 0x44d53690, + 0x47a63790, 0x47773600, 0x48c83200, 0x48193390, 0x4b6a3290, + 0x4bbb3300, 0x4d8c3090, 0x4d5d3100, 0x4e2e3000, 0x4eff3190, + 0x50503900, 0x50813890, 0x53f23990, 0x53233800, 0x55143b90, + 0x55c53a00, 0x56b63b00, 0x56673a90, 0x59d83e90, 0x59093f00, + 0x5a7a3e00, 0x5aab3f90, 0x5c9c3c00, 0x5c4d3d90, 0x5f3e3c90, + 0x5fef3d00, 0x60602e00, 0x60b12f90, 0x63c22e90, 0x63132f00, + 0x65242c90, 0x65f52d00, 0x66862c00, 0x66572d90, 0x69e82990, + 0x69392800, 0x6a4a2900, 0x6a9b2890, 0x6cac2b00, 0x6c7d2a90, + 0x6f0e2b90, 0x6fdf2a00, 0x71702290, 0x71a12300, 0x72d22200, + 0x72032390, 0x74342000, 0x74e52190, 0x77962090, 0x77472100, + 0x78f82500, 0x78292490, 0x7b5a2590, 0x7b8b2400, 0x7dbc2790, + 0x7d6d2600, 0x7e1e2700, 0x7ecf2690, 0x81806990, 0x81516800, + 0x82226900, 0x82f36890, 0x84c46b00, 0x84156a90, 0x87666b90, + 0x87b76a00, 0x88086e00, 0x88d96f90, 0x8baa6e90, 0x8b7b6f00, + 0x8d4c6c90, 0x8d9d6d00, 0x8eee6c00, 0x8e3f6d90, 0x90906500, + 0x90416490, 0x93326590, 0x93e36400, 0x95d46790, 0x95056600, + 0x96766700, 0x96a76690, 0x99186290, 0x99c96300, 0x9aba6200, + 0x9a6b6390, 0x9c5c6000, 0x9c8d6190, 0x9ffe6090, 0x9f2f6100, + 0xa0a07200, 0xa0717390, 0xa3027290, 0xa3d37300, 0xa5e47090, + 0xa5357100, 0xa6467000, 0xa6977190, 0xa9287590, 0xa9f97400, + 0xaa8a7500, 0xaa5b7490, 0xac6c7700, 0xacbd7690, 0xafce7790, + 0xaf1f7600, 0xb1b07e90, 0xb1617f00, 0xb2127e00, 0xb2c37f90, + 0xb4f47c00, 0xb4257d90, 0xb7567c90, 0xb7877d00, 0xb8387900, + 0xb8e97890, 0xbb9a7990, 0xbb4b7800, 0xbd7c7b90, 0xbdad7a00, + 0xbede7b00, 0xbe0f7a90, 0xc0c05c00, 0xc0115d90, 0xc3625c90, + 0xc3b35d00, 0xc5845e90, 0xc5555f00, 0xc6265e00, 0xc6f75f90, + 0xc9485b90, 0xc9995a00, 0xcaea5b00, 0xca3b5a90, 0xcc0c5900, + 0xccdd5890, 0xcfae5990, 0xcf7f5800, 0xd1d05090, 0xd1015100, + 0xd2725000, 0xd2a35190, 0xd4945200, 0xd4455390, 0xd7365290, + 0xd7e75300, 0xd8585700, 0xd8895690, 0xdbfa5790, 0xdb2b5600, + 0xdd1c5590, 0xddcd5400, 0xdebe5500, 0xde6f5490, 0xe1e04790, + 0xe1314600, 0xe2424700, 0xe2934690, 0xe4a44500, 0xe4754490, + 0xe7064590, 0xe7d74400, 0xe8684000, 0xe8b94190, 0xebca4090, + 0xeb1b4100, 0xed2c4290, 0xedfd4300, 0xee8e4200, 0xee5f4390, + 0xf0f04b00, 0xf0214a90, 0xf3524b90, 0xf3834a00, 0xf5b44990, + 0xf5654800, 0xf6164900, 0xf6c74890, 0xf9784c90, 0xf9a94d00, + 0xfada4c00, 0xfa0b4d90, 0xfc3c4e00, 0xfced4f90, 0xff9e4e90, + 0xff4f4f00}, + {0x00000000, 0xd1019000, 0xa2032001, 0x7302b001, 0x44074002, + 0x9506d002, 0xe6046003, 0x3705f003, 0x880e8004, 0x590f1004, + 0x2a0da005, 0xfb0c3005, 0xcc09c006, 0x1d085006, 0x6e0ae007, + 0xbf0b7007, 0x101d0009, 0xc11c9009, 0xb21e2008, 0x631fb008, + 0x541a400b, 0x851bd00b, 0xf619600a, 0x2718f00a, 0x9813800d, + 0x4912100d, 0x3a10a00c, 0xeb11300c, 0xdc14c00f, 0x0d15500f, + 0x7e17e00e, 0xaf16700e, 0x203a0012, 0xf13b9012, 0x82392013, + 0x5338b013, 0x643d4010, 0xb53cd010, 0xc63e6011, 0x173ff011, + 0xa8348016, 0x79351016, 0x0a37a017, 0xdb363017, 0xec33c014, + 0x3d325014, 0x4e30e015, 0x9f317015, 0x3027001b, 0xe126901b, + 0x9224201a, 0x4325b01a, 0x74204019, 0xa521d019, 0xd6236018, + 0x0722f018, 0xb829801f, 0x6928101f, 0x1a2aa01e, 0xcb2b301e, + 0xfc2ec01d, 0x2d2f501d, 0x5e2de01c, 0x8f2c701c, 0x40740024, + 0x91759024, 0xe2772025, 0x3376b025, 0x04734026, 0xd572d026, + 0xa6706027, 0x7771f027, 0xc87a8020, 0x197b1020, 0x6a79a021, + 0xbb783021, 0x8c7dc022, 0x5d7c5022, 0x2e7ee023, 0xff7f7023, + 0x5069002d, 0x8168902d, 0xf26a202c, 0x236bb02c, 0x146e402f, + 0xc56fd02f, 0xb66d602e, 0x676cf02e, 0xd8678029, 0x09661029, + 0x7a64a028, 0xab653028, 0x9c60c02b, 0x4d61502b, 0x3e63e02a, + 0xef62702a, 0x604e0036, 0xb14f9036, 0xc24d2037, 0x134cb037, + 0x24494034, 0xf548d034, 0x864a6035, 0x574bf035, 0xe8408032, + 0x39411032, 0x4a43a033, 0x9b423033, 0xac47c030, 0x7d465030, + 0x0e44e031, 0xdf457031, 0x7053003f, 0xa152903f, 0xd250203e, + 0x0351b03e, 0x3454403d, 0xe555d03d, 0x9657603c, 0x4756f03c, + 0xf85d803b, 0x295c103b, 0x5a5ea03a, 0x8b5f303a, 0xbc5ac039, + 0x6d5b5039, 0x1e59e038, 0xcf587038, 0x80e80048, 0x51e99048, + 0x22eb2049, 0xf3eab049, 0xc4ef404a, 0x15eed04a, 0x66ec604b, + 0xb7edf04b, 0x08e6804c, 0xd9e7104c, 0xaae5a04d, 0x7be4304d, + 0x4ce1c04e, 0x9de0504e, 0xeee2e04f, 0x3fe3704f, 0x90f50041, + 0x41f49041, 0x32f62040, 0xe3f7b040, 0xd4f24043, 0x05f3d043, + 0x76f16042, 0xa7f0f042, 0x18fb8045, 0xc9fa1045, 0xbaf8a044, + 0x6bf93044, 0x5cfcc047, 0x8dfd5047, 0xfeffe046, 0x2ffe7046, + 0xa0d2005a, 0x71d3905a, 0x02d1205b, 0xd3d0b05b, 0xe4d54058, + 0x35d4d058, 0x46d66059, 0x97d7f059, 0x28dc805e, 0xf9dd105e, + 0x8adfa05f, 0x5bde305f, 0x6cdbc05c, 0xbdda505c, 0xced8e05d, + 0x1fd9705d, 0xb0cf0053, 0x61ce9053, 0x12cc2052, 0xc3cdb052, + 0xf4c84051, 0x25c9d051, 0x56cb6050, 0x87caf050, 0x38c18057, + 0xe9c01057, 0x9ac2a056, 0x4bc33056, 0x7cc6c055, 0xadc75055, + 0xdec5e054, 0x0fc47054, 0xc09c006c, 0x119d906c, 0x629f206d, + 0xb39eb06d, 0x849b406e, 0x559ad06e, 0x2698606f, 0xf799f06f, + 0x48928068, 0x99931068, 0xea91a069, 0x3b903069, 0x0c95c06a, + 0xdd94506a, 0xae96e06b, 0x7f97706b, 0xd0810065, 0x01809065, + 0x72822064, 0xa383b064, 0x94864067, 0x4587d067, 0x36856066, + 0xe784f066, 0x588f8061, 0x898e1061, 0xfa8ca060, 0x2b8d3060, + 0x1c88c063, 0xcd895063, 0xbe8be062, 0x6f8a7062, 0xe0a6007e, + 0x31a7907e, 0x42a5207f, 0x93a4b07f, 0xa4a1407c, 0x75a0d07c, + 0x06a2607d, 0xd7a3f07d, 0x68a8807a, 0xb9a9107a, 0xcaaba07b, + 0x1baa307b, 0x2cafc078, 0xfdae5078, 0x8eace079, 0x5fad7079, + 0xf0bb0077, 0x21ba9077, 0x52b82076, 0x83b9b076, 0xb4bc4075, + 0x65bdd075, 0x16bf6074, 0xc7bef074, 0x78b58073, 0xa9b41073, + 0xdab6a072, 0x0bb73072, 0x3cb2c071, 0xedb35071, 0x9eb1e070, + 0x4fb07070}, + {0x00000000, 0x01419065, 0x028220cb, 0x03c3b0ae, 0x07044226, + 0x0645d243, 0x058662ed, 0x04c7f288, 0x0e08844c, 0x0f491429, + 0x0c8aa487, 0x0dcb34e2, 0x090cc66a, 0x084d560f, 0x0b8ee6a1, + 0x0acf76c4, 0x1c100899, 0x1d5198fc, 0x1e922852, 0x1fd3b837, + 0x1b144abf, 0x1a55dada, 0x19966a74, 0x18d7fa11, 0x12188cd5, + 0x13591cb0, 0x109aac1e, 0x11db3c7b, 0x151ccef3, 0x145d5e96, + 0x179eee38, 0x16df7e5d, 0x3b201382, 0x3a6183e7, 0x39a23349, + 0x38e3a32c, 0x3c2451a4, 0x3d65c1c1, 0x3ea6716f, 0x3fe7e10a, + 0x352897ce, 0x346907ab, 0x37aab705, 0x36eb2760, 0x322cd5e8, + 0x336d458d, 0x30aef523, 0x31ef6546, 0x27301b1b, 0x26718b7e, + 0x25b23bd0, 0x24f3abb5, 0x2034593d, 0x2175c958, 0x22b679f6, + 0x23f7e993, 0x29389f57, 0x28790f32, 0x2bbabf9c, 0x2afb2ff9, + 0x2e3cdd71, 0x2f7d4d14, 0x2cbefdba, 0x2dff6ddf, 0x754025b4, + 0x7401b5d1, 0x77c2057f, 0x7683951a, 0x72446792, 0x7305f7f7, + 0x70c64759, 0x7187d73c, 0x7b48a1f8, 0x7a09319d, 0x79ca8133, + 0x788b1156, 0x7c4ce3de, 0x7d0d73bb, 0x7ecec315, 0x7f8f5370, + 0x69502d2d, 0x6811bd48, 0x6bd20de6, 0x6a939d83, 0x6e546f0b, + 0x6f15ff6e, 0x6cd64fc0, 0x6d97dfa5, 0x6758a961, 0x66193904, + 0x65da89aa, 0x649b19cf, 0x605ceb47, 0x611d7b22, 0x62decb8c, + 0x639f5be9, 0x4e603636, 0x4f21a653, 0x4ce216fd, 0x4da38698, + 0x49647410, 0x4825e475, 0x4be654db, 0x4aa7c4be, 0x4068b27a, + 0x4129221f, 0x42ea92b1, 0x43ab02d4, 0x476cf05c, 0x462d6039, + 0x45eed097, 0x44af40f2, 0x52703eaf, 0x5331aeca, 0x50f21e64, + 0x51b38e01, 0x55747c89, 0x5435ecec, 0x57f65c42, 0x56b7cc27, + 0x5c78bae3, 0x5d392a86, 0x5efa9a28, 0x5fbb0a4d, 0x5b7cf8c5, + 0x5a3d68a0, 0x59fed80e, 0x58bf486b, 0xe98049d8, 0xe8c1d9bd, + 0xeb026913, 0xea43f976, 0xee840bfe, 0xefc59b9b, 0xec062b35, + 0xed47bb50, 0xe788cd94, 0xe6c95df1, 0xe50aed5f, 0xe44b7d3a, + 0xe08c8fb2, 0xe1cd1fd7, 0xe20eaf79, 0xe34f3f1c, 0xf5904141, + 0xf4d1d124, 0xf712618a, 0xf653f1ef, 0xf2940367, 0xf3d59302, + 0xf01623ac, 0xf157b3c9, 0xfb98c50d, 0xfad95568, 0xf91ae5c6, + 0xf85b75a3, 0xfc9c872b, 0xfddd174e, 0xfe1ea7e0, 0xff5f3785, + 0xd2a05a5a, 0xd3e1ca3f, 0xd0227a91, 0xd163eaf4, 0xd5a4187c, + 0xd4e58819, 0xd72638b7, 0xd667a8d2, 0xdca8de16, 0xdde94e73, + 0xde2afedd, 0xdf6b6eb8, 0xdbac9c30, 0xdaed0c55, 0xd92ebcfb, + 0xd86f2c9e, 0xceb052c3, 0xcff1c2a6, 0xcc327208, 0xcd73e26d, + 0xc9b410e5, 0xc8f58080, 0xcb36302e, 0xca77a04b, 0xc0b8d68f, + 0xc1f946ea, 0xc23af644, 0xc37b6621, 0xc7bc94a9, 0xc6fd04cc, + 0xc53eb462, 0xc47f2407, 0x9cc06c6c, 0x9d81fc09, 0x9e424ca7, + 0x9f03dcc2, 0x9bc42e4a, 0x9a85be2f, 0x99460e81, 0x98079ee4, + 0x92c8e820, 0x93897845, 0x904ac8eb, 0x910b588e, 0x95ccaa06, + 0x948d3a63, 0x974e8acd, 0x960f1aa8, 0x80d064f5, 0x8191f490, + 0x8252443e, 0x8313d45b, 0x87d426d3, 0x8695b6b6, 0x85560618, + 0x8417967d, 0x8ed8e0b9, 0x8f9970dc, 0x8c5ac072, 0x8d1b5017, + 0x89dca29f, 0x889d32fa, 0x8b5e8254, 0x8a1f1231, 0xa7e07fee, + 0xa6a1ef8b, 0xa5625f25, 0xa423cf40, 0xa0e43dc8, 0xa1a5adad, + 0xa2661d03, 0xa3278d66, 0xa9e8fba2, 0xa8a96bc7, 0xab6adb69, + 0xaa2b4b0c, 0xaeecb984, 0xafad29e1, 0xac6e994f, 0xad2f092a, + 0xbbf07777, 0xbab1e712, 0xb97257bc, 0xb833c7d9, 0xbcf43551, + 0xbdb5a534, 0xbe76159a, 0xbf3785ff, 0xb5f8f33b, 0xb4b9635e, + 0xb77ad3f0, 0xb63b4395, 0xb2fcb11d, 0xb3bd2178, 0xb07e91d6, + 0xb13f01b3}}; + +#endif + +#endif + +#if N == 3 + +#if W == 8 + +static const crc_t crc_braid_table[][256] = { + {0x00000000, 0x47596181, 0x8eb2c302, 0xc9eba283, 0xad668607, + 0xea3fe786, 0x23d44505, 0x648d2484, 0xeace0c0d, 0xad976d8c, + 0x647ccf0f, 0x2325ae8e, 0x47a88a0a, 0x00f1eb8b, 0xc91a4908, + 0x8e432889, 0x659f1819, 0x22c67998, 0xeb2ddb1b, 0xac74ba9a, + 0xc8f99e1e, 0x8fa0ff9f, 0x464b5d1c, 0x01123c9d, 0x8f511414, + 0xc8087595, 0x01e3d716, 0x46bab697, 0x22379213, 0x656ef392, + 0xac855111, 0xebdc3090, 0xcb3e3032, 0x8c6751b3, 0x458cf330, + 0x02d592b1, 0x6658b635, 0x2101d7b4, 0xe8ea7537, 0xafb314b6, + 0x21f03c3f, 0x66a95dbe, 0xaf42ff3d, 0xe81b9ebc, 0x8c96ba38, + 0xcbcfdbb9, 0x0224793a, 0x457d18bb, 0xaea1282b, 0xe9f849aa, + 0x2013eb29, 0x674a8aa8, 0x03c7ae2c, 0x449ecfad, 0x8d756d2e, + 0xca2c0caf, 0x446f2426, 0x033645a7, 0xcadde724, 0x8d8486a5, + 0xe909a221, 0xae50c3a0, 0x67bb6123, 0x20e200a2, 0x267f6067, + 0x612601e6, 0xa8cda365, 0xef94c2e4, 0x8b19e660, 0xcc4087e1, + 0x05ab2562, 0x42f244e3, 0xccb16c6a, 0x8be80deb, 0x4203af68, + 0x055acee9, 0x61d7ea6d, 0x268e8bec, 0xef65296f, 0xa83c48ee, + 0x43e0787e, 0x04b919ff, 0xcd52bb7c, 0x8a0bdafd, 0xee86fe79, + 0xa9df9ff8, 0x60343d7b, 0x276d5cfa, 0xa92e7473, 0xee7715f2, + 0x279cb771, 0x60c5d6f0, 0x0448f274, 0x431193f5, 0x8afa3176, + 0xcda350f7, 0xed415055, 0xaa1831d4, 0x63f39357, 0x24aaf2d6, + 0x4027d652, 0x077eb7d3, 0xce951550, 0x89cc74d1, 0x078f5c58, + 0x40d63dd9, 0x893d9f5a, 0xce64fedb, 0xaae9da5f, 0xedb0bbde, + 0x245b195d, 0x630278dc, 0x88de484c, 0xcf8729cd, 0x066c8b4e, + 0x4135eacf, 0x25b8ce4b, 0x62e1afca, 0xab0a0d49, 0xec536cc8, + 0x62104441, 0x254925c0, 0xeca28743, 0xabfbe6c2, 0xcf76c246, + 0x882fa3c7, 0x41c40144, 0x069d60c5, 0x4cfec0ce, 0x0ba7a14f, + 0xc24c03cc, 0x8515624d, 0xe19846c9, 0xa6c12748, 0x6f2a85cb, + 0x2873e44a, 0xa630ccc3, 0xe169ad42, 0x28820fc1, 0x6fdb6e40, + 0x0b564ac4, 0x4c0f2b45, 0x85e489c6, 0xc2bde847, 0x2961d8d7, + 0x6e38b956, 0xa7d31bd5, 0xe08a7a54, 0x84075ed0, 0xc35e3f51, + 0x0ab59dd2, 0x4decfc53, 0xc3afd4da, 0x84f6b55b, 0x4d1d17d8, + 0x0a447659, 0x6ec952dd, 0x2990335c, 0xe07b91df, 0xa722f05e, + 0x87c0f0fc, 0xc099917d, 0x097233fe, 0x4e2b527f, 0x2aa676fb, + 0x6dff177a, 0xa414b5f9, 0xe34dd478, 0x6d0efcf1, 0x2a579d70, + 0xe3bc3ff3, 0xa4e55e72, 0xc0687af6, 0x87311b77, 0x4edab9f4, + 0x0983d875, 0xe25fe8e5, 0xa5068964, 0x6ced2be7, 0x2bb44a66, + 0x4f396ee2, 0x08600f63, 0xc18bade0, 0x86d2cc61, 0x0891e4e8, + 0x4fc88569, 0x862327ea, 0xc17a466b, 0xa5f762ef, 0xe2ae036e, + 0x2b45a1ed, 0x6c1cc06c, 0x6a81a0a9, 0x2dd8c128, 0xe43363ab, + 0xa36a022a, 0xc7e726ae, 0x80be472f, 0x4955e5ac, 0x0e0c842d, + 0x804faca4, 0xc716cd25, 0x0efd6fa6, 0x49a40e27, 0x2d292aa3, + 0x6a704b22, 0xa39be9a1, 0xe4c28820, 0x0f1eb8b0, 0x4847d931, + 0x81ac7bb2, 0xc6f51a33, 0xa2783eb7, 0xe5215f36, 0x2ccafdb5, + 0x6b939c34, 0xe5d0b4bd, 0xa289d53c, 0x6b6277bf, 0x2c3b163e, + 0x48b632ba, 0x0fef533b, 0xc604f1b8, 0x815d9039, 0xa1bf909b, + 0xe6e6f11a, 0x2f0d5399, 0x68543218, 0x0cd9169c, 0x4b80771d, + 0x826bd59e, 0xc532b41f, 0x4b719c96, 0x0c28fd17, 0xc5c35f94, + 0x829a3e15, 0xe6171a91, 0xa14e7b10, 0x68a5d993, 0x2ffcb812, + 0xc4208882, 0x8379e903, 0x4a924b80, 0x0dcb2a01, 0x69460e85, + 0x2e1f6f04, 0xe7f4cd87, 0xa0adac06, 0x2eee848f, 0x69b7e50e, + 0xa05c478d, 0xe705260c, 0x83880288, 0xc4d16309, 0x0d3ac18a, + 0x4a63a00b}, + {0x00000000, 0x99fd819c, 0x83f8033b, 0x1a0582a7, 0xb7f30675, + 0x2e0e87e9, 0x340b054e, 0xadf684d2, 0xdfe50ce9, 0x46188d75, + 0x5c1d0fd2, 0xc5e08e4e, 0x68160a9c, 0xf1eb8b00, 0xebee09a7, + 0x7213883b, 0x0fc919d1, 0x9634984d, 0x8c311aea, 0x15cc9b76, + 0xb83a1fa4, 0x21c79e38, 0x3bc21c9f, 0xa23f9d03, 0xd02c1538, + 0x49d194a4, 0x53d41603, 0xca29979f, 0x67df134d, 0xfe2292d1, + 0xe4271076, 0x7dda91ea, 0x1f9233a2, 0x866fb23e, 0x9c6a3099, + 0x0597b105, 0xa86135d7, 0x319cb44b, 0x2b9936ec, 0xb264b770, + 0xc0773f4b, 0x598abed7, 0x438f3c70, 0xda72bdec, 0x7784393e, + 0xee79b8a2, 0xf47c3a05, 0x6d81bb99, 0x105b2a73, 0x89a6abef, + 0x93a32948, 0x0a5ea8d4, 0xa7a82c06, 0x3e55ad9a, 0x24502f3d, + 0xbdadaea1, 0xcfbe269a, 0x5643a706, 0x4c4625a1, 0xd5bba43d, + 0x784d20ef, 0xe1b0a173, 0xfbb523d4, 0x6248a248, 0x3f246744, + 0xa6d9e6d8, 0xbcdc647f, 0x2521e5e3, 0x88d76131, 0x112ae0ad, + 0x0b2f620a, 0x92d2e396, 0xe0c16bad, 0x793cea31, 0x63396896, + 0xfac4e90a, 0x57326dd8, 0xcecfec44, 0xd4ca6ee3, 0x4d37ef7f, + 0x30ed7e95, 0xa910ff09, 0xb3157dae, 0x2ae8fc32, 0x871e78e0, + 0x1ee3f97c, 0x04e67bdb, 0x9d1bfa47, 0xef08727c, 0x76f5f3e0, + 0x6cf07147, 0xf50df0db, 0x58fb7409, 0xc106f595, 0xdb037732, + 0x42fef6ae, 0x20b654e6, 0xb94bd57a, 0xa34e57dd, 0x3ab3d641, + 0x97455293, 0x0eb8d30f, 0x14bd51a8, 0x8d40d034, 0xff53580f, + 0x66aed993, 0x7cab5b34, 0xe556daa8, 0x48a05e7a, 0xd15ddfe6, + 0xcb585d41, 0x52a5dcdd, 0x2f7f4d37, 0xb682ccab, 0xac874e0c, + 0x357acf90, 0x988c4b42, 0x0171cade, 0x1b744879, 0x8289c9e5, + 0xf09a41de, 0x6967c042, 0x736242e5, 0xea9fc379, 0x476947ab, + 0xde94c637, 0xc4914490, 0x5d6cc50c, 0x7e48ce88, 0xe7b54f14, + 0xfdb0cdb3, 0x644d4c2f, 0xc9bbc8fd, 0x50464961, 0x4a43cbc6, + 0xd3be4a5a, 0xa1adc261, 0x385043fd, 0x2255c15a, 0xbba840c6, + 0x165ec414, 0x8fa34588, 0x95a6c72f, 0x0c5b46b3, 0x7181d759, + 0xe87c56c5, 0xf279d462, 0x6b8455fe, 0xc672d12c, 0x5f8f50b0, + 0x458ad217, 0xdc77538b, 0xae64dbb0, 0x37995a2c, 0x2d9cd88b, + 0xb4615917, 0x1997ddc5, 0x806a5c59, 0x9a6fdefe, 0x03925f62, + 0x61dafd2a, 0xf8277cb6, 0xe222fe11, 0x7bdf7f8d, 0xd629fb5f, + 0x4fd47ac3, 0x55d1f864, 0xcc2c79f8, 0xbe3ff1c3, 0x27c2705f, + 0x3dc7f2f8, 0xa43a7364, 0x09ccf7b6, 0x9031762a, 0x8a34f48d, + 0x13c97511, 0x6e13e4fb, 0xf7ee6567, 0xedebe7c0, 0x7416665c, + 0xd9e0e28e, 0x401d6312, 0x5a18e1b5, 0xc3e56029, 0xb1f6e812, + 0x280b698e, 0x320eeb29, 0xabf36ab5, 0x0605ee67, 0x9ff86ffb, + 0x85fded5c, 0x1c006cc0, 0x416ca9cc, 0xd8912850, 0xc294aaf7, + 0x5b692b6b, 0xf69fafb9, 0x6f622e25, 0x7567ac82, 0xec9a2d1e, + 0x9e89a525, 0x077424b9, 0x1d71a61e, 0x848c2782, 0x297aa350, + 0xb08722cc, 0xaa82a06b, 0x337f21f7, 0x4ea5b01d, 0xd7583181, + 0xcd5db326, 0x54a032ba, 0xf956b668, 0x60ab37f4, 0x7aaeb553, + 0xe35334cf, 0x9140bcf4, 0x08bd3d68, 0x12b8bfcf, 0x8b453e53, + 0x26b3ba81, 0xbf4e3b1d, 0xa54bb9ba, 0x3cb63826, 0x5efe9a6e, + 0xc7031bf2, 0xdd069955, 0x44fb18c9, 0xe90d9c1b, 0x70f01d87, + 0x6af59f20, 0xf3081ebc, 0x811b9687, 0x18e6171b, 0x02e395bc, + 0x9b1e1420, 0x36e890f2, 0xaf15116e, 0xb51093c9, 0x2ced1255, + 0x513783bf, 0xc8ca0223, 0xd2cf8084, 0x4b320118, 0xe6c485ca, + 0x7f390456, 0x653c86f1, 0xfcc1076d, 0x8ed28f56, 0x172f0eca, + 0x0d2a8c6d, 0x94d70df1, 0x39218923, 0xa0dc08bf, 0xbad98a18, + 0x23240b84}, + {0x00000000, 0xfc919d10, 0x49203a23, 0xb5b1a733, 0x92407446, + 0x6ed1e956, 0xdb604e65, 0x27f1d375, 0x9483e88f, 0x6812759f, + 0xdda3d2ac, 0x21324fbc, 0x06c39cc9, 0xfa5201d9, 0x4fe3a6ea, + 0xb3723bfa, 0x9904d11d, 0x65954c0d, 0xd024eb3e, 0x2cb5762e, + 0x0b44a55b, 0xf7d5384b, 0x42649f78, 0xbef50268, 0x0d873992, + 0xf116a482, 0x44a703b1, 0xb8369ea1, 0x9fc74dd4, 0x6356d0c4, + 0xd6e777f7, 0x2a76eae7, 0x820aa239, 0x7e9b3f29, 0xcb2a981a, + 0x37bb050a, 0x104ad67f, 0xecdb4b6f, 0x596aec5c, 0xa5fb714c, + 0x16894ab6, 0xea18d7a6, 0x5fa97095, 0xa338ed85, 0x84c93ef0, + 0x7858a3e0, 0xcde904d3, 0x317899c3, 0x1b0e7324, 0xe79fee34, + 0x522e4907, 0xaebfd417, 0x894e0762, 0x75df9a72, 0xc06e3d41, + 0x3cffa051, 0x8f8d9bab, 0x731c06bb, 0xc6ada188, 0x3a3c3c98, + 0x1dcdefed, 0xe15c72fd, 0x54edd5ce, 0xa87c48de, 0xb4164471, + 0x4887d961, 0xfd367e52, 0x01a7e342, 0x26563037, 0xdac7ad27, + 0x6f760a14, 0x93e79704, 0x2095acfe, 0xdc0431ee, 0x69b596dd, + 0x95240bcd, 0xb2d5d8b8, 0x4e4445a8, 0xfbf5e29b, 0x07647f8b, + 0x2d12956c, 0xd183087c, 0x6432af4f, 0x98a3325f, 0xbf52e12a, + 0x43c37c3a, 0xf672db09, 0x0ae34619, 0xb9917de3, 0x4500e0f3, + 0xf0b147c0, 0x0c20dad0, 0x2bd109a5, 0xd74094b5, 0x62f13386, + 0x9e60ae96, 0x361ce648, 0xca8d7b58, 0x7f3cdc6b, 0x83ad417b, + 0xa45c920e, 0x58cd0f1e, 0xed7ca82d, 0x11ed353d, 0xa29f0ec7, + 0x5e0e93d7, 0xebbf34e4, 0x172ea9f4, 0x30df7a81, 0xcc4ee791, + 0x79ff40a2, 0x856eddb2, 0xaf183755, 0x5389aa45, 0xe6380d76, + 0x1aa99066, 0x3d584313, 0xc1c9de03, 0x74787930, 0x88e9e420, + 0x3b9bdfda, 0xc70a42ca, 0x72bbe5f9, 0x8e2a78e9, 0xa9dbab9c, + 0x554a368c, 0xe0fb91bf, 0x1c6a0caf, 0xd82f88e1, 0x24be15f1, + 0x910fb2c2, 0x6d9e2fd2, 0x4a6ffca7, 0xb6fe61b7, 0x034fc684, + 0xffde5b94, 0x4cac606e, 0xb03dfd7e, 0x058c5a4d, 0xf91dc75d, + 0xdeec1428, 0x227d8938, 0x97cc2e0b, 0x6b5db31b, 0x412b59fc, + 0xbdbac4ec, 0x080b63df, 0xf49afecf, 0xd36b2dba, 0x2ffab0aa, + 0x9a4b1799, 0x66da8a89, 0xd5a8b173, 0x29392c63, 0x9c888b50, + 0x60191640, 0x47e8c535, 0xbb795825, 0x0ec8ff16, 0xf2596206, + 0x5a252ad8, 0xa6b4b7c8, 0x130510fb, 0xef948deb, 0xc8655e9e, + 0x34f4c38e, 0x814564bd, 0x7dd4f9ad, 0xcea6c257, 0x32375f47, + 0x8786f874, 0x7b176564, 0x5ce6b611, 0xa0772b01, 0x15c68c32, + 0xe9571122, 0xc321fbc5, 0x3fb066d5, 0x8a01c1e6, 0x76905cf6, + 0x51618f83, 0xadf01293, 0x1841b5a0, 0xe4d028b0, 0x57a2134a, + 0xab338e5a, 0x1e822969, 0xe213b479, 0xc5e2670c, 0x3973fa1c, + 0x8cc25d2f, 0x7053c03f, 0x6c39cc90, 0x90a85180, 0x2519f6b3, + 0xd9886ba3, 0xfe79b8d6, 0x02e825c6, 0xb75982f5, 0x4bc81fe5, + 0xf8ba241f, 0x042bb90f, 0xb19a1e3c, 0x4d0b832c, 0x6afa5059, + 0x966bcd49, 0x23da6a7a, 0xdf4bf76a, 0xf53d1d8d, 0x09ac809d, + 0xbc1d27ae, 0x408cbabe, 0x677d69cb, 0x9becf4db, 0x2e5d53e8, + 0xd2cccef8, 0x61bef502, 0x9d2f6812, 0x289ecf21, 0xd40f5231, + 0xf3fe8144, 0x0f6f1c54, 0xbadebb67, 0x464f2677, 0xee336ea9, + 0x12a2f3b9, 0xa713548a, 0x5b82c99a, 0x7c731aef, 0x80e287ff, + 0x355320cc, 0xc9c2bddc, 0x7ab08626, 0x86211b36, 0x3390bc05, + 0xcf012115, 0xe8f0f260, 0x14616f70, 0xa1d0c843, 0x5d415553, + 0x7737bfb4, 0x8ba622a4, 0x3e178597, 0xc2861887, 0xe577cbf2, + 0x19e656e2, 0xac57f1d1, 0x50c66cc1, 0xe3b4573b, 0x1f25ca2b, + 0xaa946d18, 0x5605f008, 0x71f4237d, 0x8d65be6d, 0x38d4195e, + 0xc445844e}, + {0x00000000, 0x005c11c1, 0x00b82382, 0x00e43243, 0x01704704, + 0x012c56c5, 0x01c86486, 0x01947547, 0x02e08e08, 0x02bc9fc9, + 0x0258ad8a, 0x0204bc4b, 0x0390c90c, 0x03ccd8cd, 0x0328ea8e, + 0x0374fb4f, 0x05c11c10, 0x059d0dd1, 0x05793f92, 0x05252e53, + 0x04b15b14, 0x04ed4ad5, 0x04097896, 0x04556957, 0x07219218, + 0x077d83d9, 0x0799b19a, 0x07c5a05b, 0x0651d51c, 0x060dc4dd, + 0x06e9f69e, 0x06b5e75f, 0x0b823820, 0x0bde29e1, 0x0b3a1ba2, + 0x0b660a63, 0x0af27f24, 0x0aae6ee5, 0x0a4a5ca6, 0x0a164d67, + 0x0962b628, 0x093ea7e9, 0x09da95aa, 0x0986846b, 0x0812f12c, + 0x084ee0ed, 0x08aad2ae, 0x08f6c36f, 0x0e432430, 0x0e1f35f1, + 0x0efb07b2, 0x0ea71673, 0x0f336334, 0x0f6f72f5, 0x0f8b40b6, + 0x0fd75177, 0x0ca3aa38, 0x0cffbbf9, 0x0c1b89ba, 0x0c47987b, + 0x0dd3ed3c, 0x0d8ffcfd, 0x0d6bcebe, 0x0d37df7f, 0x17047040, + 0x17586181, 0x17bc53c2, 0x17e04203, 0x16743744, 0x16282685, + 0x16cc14c6, 0x16900507, 0x15e4fe48, 0x15b8ef89, 0x155cddca, + 0x1500cc0b, 0x1494b94c, 0x14c8a88d, 0x142c9ace, 0x14708b0f, + 0x12c56c50, 0x12997d91, 0x127d4fd2, 0x12215e13, 0x13b52b54, + 0x13e93a95, 0x130d08d6, 0x13511917, 0x1025e258, 0x1079f399, + 0x109dc1da, 0x10c1d01b, 0x1155a55c, 0x1109b49d, 0x11ed86de, + 0x11b1971f, 0x1c864860, 0x1cda59a1, 0x1c3e6be2, 0x1c627a23, + 0x1df60f64, 0x1daa1ea5, 0x1d4e2ce6, 0x1d123d27, 0x1e66c668, + 0x1e3ad7a9, 0x1edee5ea, 0x1e82f42b, 0x1f16816c, 0x1f4a90ad, + 0x1faea2ee, 0x1ff2b32f, 0x19475470, 0x191b45b1, 0x19ff77f2, + 0x19a36633, 0x18371374, 0x186b02b5, 0x188f30f6, 0x18d32137, + 0x1ba7da78, 0x1bfbcbb9, 0x1b1ff9fa, 0x1b43e83b, 0x1ad79d7c, + 0x1a8b8cbd, 0x1a6fbefe, 0x1a33af3f, 0x2e08e080, 0x2e54f141, + 0x2eb0c302, 0x2eecd2c3, 0x2f78a784, 0x2f24b645, 0x2fc08406, + 0x2f9c95c7, 0x2ce86e88, 0x2cb47f49, 0x2c504d0a, 0x2c0c5ccb, + 0x2d98298c, 0x2dc4384d, 0x2d200a0e, 0x2d7c1bcf, 0x2bc9fc90, + 0x2b95ed51, 0x2b71df12, 0x2b2dced3, 0x2ab9bb94, 0x2ae5aa55, + 0x2a019816, 0x2a5d89d7, 0x29297298, 0x29756359, 0x2991511a, + 0x29cd40db, 0x2859359c, 0x2805245d, 0x28e1161e, 0x28bd07df, + 0x258ad8a0, 0x25d6c961, 0x2532fb22, 0x256eeae3, 0x24fa9fa4, + 0x24a68e65, 0x2442bc26, 0x241eade7, 0x276a56a8, 0x27364769, + 0x27d2752a, 0x278e64eb, 0x261a11ac, 0x2646006d, 0x26a2322e, + 0x26fe23ef, 0x204bc4b0, 0x2017d571, 0x20f3e732, 0x20aff6f3, + 0x213b83b4, 0x21679275, 0x2183a036, 0x21dfb1f7, 0x22ab4ab8, + 0x22f75b79, 0x2213693a, 0x224f78fb, 0x23db0dbc, 0x23871c7d, + 0x23632e3e, 0x233f3fff, 0x390c90c0, 0x39508101, 0x39b4b342, + 0x39e8a283, 0x387cd7c4, 0x3820c605, 0x38c4f446, 0x3898e587, + 0x3bec1ec8, 0x3bb00f09, 0x3b543d4a, 0x3b082c8b, 0x3a9c59cc, + 0x3ac0480d, 0x3a247a4e, 0x3a786b8f, 0x3ccd8cd0, 0x3c919d11, + 0x3c75af52, 0x3c29be93, 0x3dbdcbd4, 0x3de1da15, 0x3d05e856, + 0x3d59f997, 0x3e2d02d8, 0x3e711319, 0x3e95215a, 0x3ec9309b, + 0x3f5d45dc, 0x3f01541d, 0x3fe5665e, 0x3fb9779f, 0x328ea8e0, + 0x32d2b921, 0x32368b62, 0x326a9aa3, 0x33feefe4, 0x33a2fe25, + 0x3346cc66, 0x331adda7, 0x306e26e8, 0x30323729, 0x30d6056a, + 0x308a14ab, 0x311e61ec, 0x3142702d, 0x31a6426e, 0x31fa53af, + 0x374fb4f0, 0x3713a531, 0x37f79772, 0x37ab86b3, 0x363ff3f4, + 0x3663e235, 0x3687d076, 0x36dbc1b7, 0x35af3af8, 0x35f32b39, + 0x3517197a, 0x354b08bb, 0x34df7dfc, 0x34836c3d, 0x34675e7e, + 0x343b4fbf}, + {0x00000000, 0x5c11c100, 0xb8238200, 0xe4324300, 0xc0440403, + 0x9c55c503, 0x78678603, 0x24764703, 0x308b0805, 0x6c9ac905, + 0x88a88a05, 0xd4b94b05, 0xf0cf0c06, 0xacdecd06, 0x48ec8e06, + 0x14fd4f06, 0x6116100a, 0x3d07d10a, 0xd935920a, 0x8524530a, + 0xa1521409, 0xfd43d509, 0x19719609, 0x45605709, 0x519d180f, + 0x0d8cd90f, 0xe9be9a0f, 0xb5af5b0f, 0x91d91c0c, 0xcdc8dd0c, + 0x29fa9e0c, 0x75eb5f0c, 0xc22c2014, 0x9e3de114, 0x7a0fa214, + 0x261e6314, 0x02682417, 0x5e79e517, 0xba4ba617, 0xe65a6717, + 0xf2a72811, 0xaeb6e911, 0x4a84aa11, 0x16956b11, 0x32e32c12, + 0x6ef2ed12, 0x8ac0ae12, 0xd6d16f12, 0xa33a301e, 0xff2bf11e, + 0x1b19b21e, 0x4708731e, 0x637e341d, 0x3f6ff51d, 0xdb5db61d, + 0x874c771d, 0x93b1381b, 0xcfa0f91b, 0x2b92ba1b, 0x77837b1b, + 0x53f53c18, 0x0fe4fd18, 0xebd6be18, 0xb7c77f18, 0x345b402b, + 0x684a812b, 0x8c78c22b, 0xd069032b, 0xf41f4428, 0xa80e8528, + 0x4c3cc628, 0x102d0728, 0x04d0482e, 0x58c1892e, 0xbcf3ca2e, + 0xe0e20b2e, 0xc4944c2d, 0x98858d2d, 0x7cb7ce2d, 0x20a60f2d, + 0x554d5021, 0x095c9121, 0xed6ed221, 0xb17f1321, 0x95095422, + 0xc9189522, 0x2d2ad622, 0x713b1722, 0x65c65824, 0x39d79924, + 0xdde5da24, 0x81f41b24, 0xa5825c27, 0xf9939d27, 0x1da1de27, + 0x41b01f27, 0xf677603f, 0xaa66a13f, 0x4e54e23f, 0x1245233f, + 0x3633643c, 0x6a22a53c, 0x8e10e63c, 0xd201273c, 0xc6fc683a, + 0x9aeda93a, 0x7edfea3a, 0x22ce2b3a, 0x06b86c39, 0x5aa9ad39, + 0xbe9bee39, 0xe28a2f39, 0x97617035, 0xcb70b135, 0x2f42f235, + 0x73533335, 0x57257436, 0x0b34b536, 0xef06f636, 0xb3173736, + 0xa7ea7830, 0xfbfbb930, 0x1fc9fa30, 0x43d83b30, 0x67ae7c33, + 0x3bbfbd33, 0xdf8dfe33, 0x839c3f33, 0x68b68056, 0x34a74156, + 0xd0950256, 0x8c84c356, 0xa8f28455, 0xf4e34555, 0x10d10655, + 0x4cc0c755, 0x583d8853, 0x042c4953, 0xe01e0a53, 0xbc0fcb53, + 0x98798c50, 0xc4684d50, 0x205a0e50, 0x7c4bcf50, 0x09a0905c, + 0x55b1515c, 0xb183125c, 0xed92d35c, 0xc9e4945f, 0x95f5555f, + 0x71c7165f, 0x2dd6d75f, 0x392b9859, 0x653a5959, 0x81081a59, + 0xdd19db59, 0xf96f9c5a, 0xa57e5d5a, 0x414c1e5a, 0x1d5ddf5a, + 0xaa9aa042, 0xf68b6142, 0x12b92242, 0x4ea8e342, 0x6adea441, + 0x36cf6541, 0xd2fd2641, 0x8eece741, 0x9a11a847, 0xc6006947, + 0x22322a47, 0x7e23eb47, 0x5a55ac44, 0x06446d44, 0xe2762e44, + 0xbe67ef44, 0xcb8cb048, 0x979d7148, 0x73af3248, 0x2fbef348, + 0x0bc8b44b, 0x57d9754b, 0xb3eb364b, 0xeffaf74b, 0xfb07b84d, + 0xa716794d, 0x43243a4d, 0x1f35fb4d, 0x3b43bc4e, 0x67527d4e, + 0x83603e4e, 0xdf71ff4e, 0x5cedc07d, 0x00fc017d, 0xe4ce427d, + 0xb8df837d, 0x9ca9c47e, 0xc0b8057e, 0x248a467e, 0x789b877e, + 0x6c66c878, 0x30770978, 0xd4454a78, 0x88548b78, 0xac22cc7b, + 0xf0330d7b, 0x14014e7b, 0x48108f7b, 0x3dfbd077, 0x61ea1177, + 0x85d85277, 0xd9c99377, 0xfdbfd474, 0xa1ae1574, 0x459c5674, + 0x198d9774, 0x0d70d872, 0x51611972, 0xb5535a72, 0xe9429b72, + 0xcd34dc71, 0x91251d71, 0x75175e71, 0x29069f71, 0x9ec1e069, + 0xc2d02169, 0x26e26269, 0x7af3a369, 0x5e85e46a, 0x0294256a, + 0xe6a6666a, 0xbab7a76a, 0xae4ae86c, 0xf25b296c, 0x16696a6c, + 0x4a78ab6c, 0x6e0eec6f, 0x321f2d6f, 0xd62d6e6f, 0x8a3caf6f, + 0xffd7f063, 0xa3c63163, 0x47f47263, 0x1be5b363, 0x3f93f460, + 0x63823560, 0x87b07660, 0xdba1b760, 0xcf5cf866, 0x934d3966, + 0x777f7a66, 0x2b6ebb66, 0x0f18fc65, 0x53093d65, 0xb73b7e65, + 0xeb2abf65}, + {0x00000000, 0xd16d00ac, 0x12d9015b, 0xc3b401f7, 0x25b202b6, + 0xf4df021a, 0x376b03ed, 0xe6060341, 0x4b64056c, 0x9a0905c0, + 0x59bd0437, 0x88d0049b, 0x6ed607da, 0xbfbb0776, 0x7c0f0681, + 0xad62062d, 0x96c80ad8, 0x47a50a74, 0x84110b83, 0x557c0b2f, + 0xb37a086e, 0x621708c2, 0xa1a30935, 0x70ce0999, 0xddac0fb4, + 0x0cc10f18, 0xcf750eef, 0x1e180e43, 0xf81e0d02, 0x29730dae, + 0xeac70c59, 0x3baa0cf5, 0x9d9315b3, 0x4cfe151f, 0x8f4a14e8, + 0x5e271444, 0xb8211705, 0x694c17a9, 0xaaf8165e, 0x7b9516f2, + 0xd6f710df, 0x079a1073, 0xc42e1184, 0x15431128, 0xf3451269, + 0x222812c5, 0xe19c1332, 0x30f1139e, 0x0b5b1f6b, 0xda361fc7, + 0x19821e30, 0xc8ef1e9c, 0x2ee91ddd, 0xff841d71, 0x3c301c86, + 0xed5d1c2a, 0x403f1a07, 0x91521aab, 0x52e61b5c, 0x838b1bf0, + 0x658d18b1, 0xb4e0181d, 0x775419ea, 0xa6391946, 0x8b252b65, + 0x5a482bc9, 0x99fc2a3e, 0x48912a92, 0xae9729d3, 0x7ffa297f, + 0xbc4e2888, 0x6d232824, 0xc0412e09, 0x112c2ea5, 0xd2982f52, + 0x03f52ffe, 0xe5f32cbf, 0x349e2c13, 0xf72a2de4, 0x26472d48, + 0x1ded21bd, 0xcc802111, 0x0f3420e6, 0xde59204a, 0x385f230b, + 0xe93223a7, 0x2a862250, 0xfbeb22fc, 0x568924d1, 0x87e4247d, + 0x4450258a, 0x953d2526, 0x733b2667, 0xa25626cb, 0x61e2273c, + 0xb08f2790, 0x16b63ed6, 0xc7db3e7a, 0x046f3f8d, 0xd5023f21, + 0x33043c60, 0xe2693ccc, 0x21dd3d3b, 0xf0b03d97, 0x5dd23bba, + 0x8cbf3b16, 0x4f0b3ae1, 0x9e663a4d, 0x7860390c, 0xa90d39a0, + 0x6ab93857, 0xbbd438fb, 0x807e340e, 0x511334a2, 0x92a73555, + 0x43ca35f9, 0xa5cc36b8, 0x74a13614, 0xb71537e3, 0x6678374f, + 0xcb1a3162, 0x1a7731ce, 0xd9c33039, 0x08ae3095, 0xeea833d4, + 0x3fc53378, 0xfc71328f, 0x2d1c3223, 0xa64956c9, 0x77245665, + 0xb4905792, 0x65fd573e, 0x83fb547f, 0x529654d3, 0x91225524, + 0x404f5588, 0xed2d53a5, 0x3c405309, 0xfff452fe, 0x2e995252, + 0xc89f5113, 0x19f251bf, 0xda465048, 0x0b2b50e4, 0x30815c11, + 0xe1ec5cbd, 0x22585d4a, 0xf3355de6, 0x15335ea7, 0xc45e5e0b, + 0x07ea5ffc, 0xd6875f50, 0x7be5597d, 0xaa8859d1, 0x693c5826, + 0xb851588a, 0x5e575bcb, 0x8f3a5b67, 0x4c8e5a90, 0x9de35a3c, + 0x3bda437a, 0xeab743d6, 0x29034221, 0xf86e428d, 0x1e6841cc, + 0xcf054160, 0x0cb14097, 0xdddc403b, 0x70be4616, 0xa1d346ba, + 0x6267474d, 0xb30a47e1, 0x550c44a0, 0x8461440c, 0x47d545fb, + 0x96b84557, 0xad1249a2, 0x7c7f490e, 0xbfcb48f9, 0x6ea64855, + 0x88a04b14, 0x59cd4bb8, 0x9a794a4f, 0x4b144ae3, 0xe6764cce, + 0x371b4c62, 0xf4af4d95, 0x25c24d39, 0xc3c44e78, 0x12a94ed4, + 0xd11d4f23, 0x00704f8f, 0x2d6c7dac, 0xfc017d00, 0x3fb57cf7, + 0xeed87c5b, 0x08de7f1a, 0xd9b37fb6, 0x1a077e41, 0xcb6a7eed, + 0x660878c0, 0xb765786c, 0x74d1799b, 0xa5bc7937, 0x43ba7a76, + 0x92d77ada, 0x51637b2d, 0x800e7b81, 0xbba47774, 0x6ac977d8, + 0xa97d762f, 0x78107683, 0x9e1675c2, 0x4f7b756e, 0x8ccf7499, + 0x5da27435, 0xf0c07218, 0x21ad72b4, 0xe2197343, 0x337473ef, + 0xd57270ae, 0x041f7002, 0xc7ab71f5, 0x16c67159, 0xb0ff681f, + 0x619268b3, 0xa2266944, 0x734b69e8, 0x954d6aa9, 0x44206a05, + 0x87946bf2, 0x56f96b5e, 0xfb9b6d73, 0x2af66ddf, 0xe9426c28, + 0x382f6c84, 0xde296fc5, 0x0f446f69, 0xccf06e9e, 0x1d9d6e32, + 0x263762c7, 0xf75a626b, 0x34ee639c, 0xe5836330, 0x03856071, + 0xd2e860dd, 0x115c612a, 0xc0316186, 0x6d5367ab, 0xbc3e6707, + 0x7f8a66f0, 0xaee7665c, 0x48e1651d, 0x998c65b1, 0x5a386446, + 0x8b5564ea}, + {0x00000000, 0xfc91ad91, 0x49205b21, 0xb5b1f6b0, 0x9240b642, + 0x6ed11bd3, 0xdb60ed63, 0x27f140f2, 0x94826c87, 0x6813c116, + 0xdda237a6, 0x21339a37, 0x06c2dac5, 0xfa537754, 0x4fe281e4, + 0xb3732c75, 0x9907d90d, 0x6596749c, 0xd027822c, 0x2cb62fbd, + 0x0b476f4f, 0xf7d6c2de, 0x4267346e, 0xbef699ff, 0x0d85b58a, + 0xf114181b, 0x44a5eeab, 0xb834433a, 0x9fc503c8, 0x6354ae59, + 0xd6e558e9, 0x2a74f578, 0x820cb219, 0x7e9d1f88, 0xcb2ce938, + 0x37bd44a9, 0x104c045b, 0xecdda9ca, 0x596c5f7a, 0xa5fdf2eb, + 0x168ede9e, 0xea1f730f, 0x5fae85bf, 0xa33f282e, 0x84ce68dc, + 0x785fc54d, 0xcdee33fd, 0x317f9e6c, 0x1b0b6b14, 0xe79ac685, + 0x522b3035, 0xaeba9da4, 0x894bdd56, 0x75da70c7, 0xc06b8677, + 0x3cfa2be6, 0x8f890793, 0x7318aa02, 0xc6a95cb2, 0x3a38f123, + 0x1dc9b1d1, 0xe1581c40, 0x54e9eaf0, 0xa8784761, 0xb41a6431, + 0x488bc9a0, 0xfd3a3f10, 0x01ab9281, 0x265ad273, 0xdacb7fe2, + 0x6f7a8952, 0x93eb24c3, 0x209808b6, 0xdc09a527, 0x69b85397, + 0x9529fe06, 0xb2d8bef4, 0x4e491365, 0xfbf8e5d5, 0x07694844, + 0x2d1dbd3c, 0xd18c10ad, 0x643de61d, 0x98ac4b8c, 0xbf5d0b7e, + 0x43cca6ef, 0xf67d505f, 0x0aecfdce, 0xb99fd1bb, 0x450e7c2a, + 0xf0bf8a9a, 0x0c2e270b, 0x2bdf67f9, 0xd74eca68, 0x62ff3cd8, + 0x9e6e9149, 0x3616d628, 0xca877bb9, 0x7f368d09, 0x83a72098, + 0xa456606a, 0x58c7cdfb, 0xed763b4b, 0x11e796da, 0xa294baaf, + 0x5e05173e, 0xebb4e18e, 0x17254c1f, 0x30d40ced, 0xcc45a17c, + 0x79f457cc, 0x8565fa5d, 0xaf110f25, 0x5380a2b4, 0xe6315404, + 0x1aa0f995, 0x3d51b967, 0xc1c014f6, 0x7471e246, 0x88e04fd7, + 0x3b9363a2, 0xc702ce33, 0x72b33883, 0x8e229512, 0xa9d3d5e0, + 0x55427871, 0xe0f38ec1, 0x1c622350, 0xd837c861, 0x24a665f0, + 0x91179340, 0x6d863ed1, 0x4a777e23, 0xb6e6d3b2, 0x03572502, + 0xffc68893, 0x4cb5a4e6, 0xb0240977, 0x0595ffc7, 0xf9045256, + 0xdef512a4, 0x2264bf35, 0x97d54985, 0x6b44e414, 0x4130116c, + 0xbda1bcfd, 0x08104a4d, 0xf481e7dc, 0xd370a72e, 0x2fe10abf, + 0x9a50fc0f, 0x66c1519e, 0xd5b27deb, 0x2923d07a, 0x9c9226ca, + 0x60038b5b, 0x47f2cba9, 0xbb636638, 0x0ed29088, 0xf2433d19, + 0x5a3b7a78, 0xa6aad7e9, 0x131b2159, 0xef8a8cc8, 0xc87bcc3a, + 0x34ea61ab, 0x815b971b, 0x7dca3a8a, 0xceb916ff, 0x3228bb6e, + 0x87994dde, 0x7b08e04f, 0x5cf9a0bd, 0xa0680d2c, 0x15d9fb9c, + 0xe948560d, 0xc33ca375, 0x3fad0ee4, 0x8a1cf854, 0x768d55c5, + 0x517c1537, 0xadedb8a6, 0x185c4e16, 0xe4cde387, 0x57becff2, + 0xab2f6263, 0x1e9e94d3, 0xe20f3942, 0xc5fe79b0, 0x396fd421, + 0x8cde2291, 0x704f8f00, 0x6c2dac50, 0x90bc01c1, 0x250df771, + 0xd99c5ae0, 0xfe6d1a12, 0x02fcb783, 0xb74d4133, 0x4bdceca2, + 0xf8afc0d7, 0x043e6d46, 0xb18f9bf6, 0x4d1e3667, 0x6aef7695, + 0x967edb04, 0x23cf2db4, 0xdf5e8025, 0xf52a755d, 0x09bbd8cc, + 0xbc0a2e7c, 0x409b83ed, 0x676ac31f, 0x9bfb6e8e, 0x2e4a983e, + 0xd2db35af, 0x61a819da, 0x9d39b44b, 0x288842fb, 0xd419ef6a, + 0xf3e8af98, 0x0f790209, 0xbac8f4b9, 0x46595928, 0xee211e49, + 0x12b0b3d8, 0xa7014568, 0x5b90e8f9, 0x7c61a80b, 0x80f0059a, + 0x3541f32a, 0xc9d05ebb, 0x7aa372ce, 0x8632df5f, 0x338329ef, + 0xcf12847e, 0xe8e3c48c, 0x1472691d, 0xa1c39fad, 0x5d52323c, + 0x7726c744, 0x8bb76ad5, 0x3e069c65, 0xc29731f4, 0xe5667106, + 0x19f7dc97, 0xac462a27, 0x50d787b6, 0xe3a4abc3, 0x1f350652, + 0xaa84f0e2, 0x56155d73, 0x71e41d81, 0x8d75b010, 0x38c446a0, + 0xc455eb31}, + {0x00000000, 0x006c90c1, 0x00d92182, 0x00b5b143, 0x01b24304, + 0x01ded3c5, 0x016b6286, 0x0107f247, 0x03648608, 0x030816c9, + 0x03bda78a, 0x03d1374b, 0x02d6c50c, 0x02ba55cd, 0x020fe48e, + 0x0263744f, 0x06c90c10, 0x06a59cd1, 0x06102d92, 0x067cbd53, + 0x077b4f14, 0x0717dfd5, 0x07a26e96, 0x07cefe57, 0x05ad8a18, + 0x05c11ad9, 0x0574ab9a, 0x05183b5b, 0x041fc91c, 0x047359dd, + 0x04c6e89e, 0x04aa785f, 0x0d921820, 0x0dfe88e1, 0x0d4b39a2, + 0x0d27a963, 0x0c205b24, 0x0c4ccbe5, 0x0cf97aa6, 0x0c95ea67, + 0x0ef69e28, 0x0e9a0ee9, 0x0e2fbfaa, 0x0e432f6b, 0x0f44dd2c, + 0x0f284ded, 0x0f9dfcae, 0x0ff16c6f, 0x0b5b1430, 0x0b3784f1, + 0x0b8235b2, 0x0beea573, 0x0ae95734, 0x0a85c7f5, 0x0a3076b6, + 0x0a5ce677, 0x083f9238, 0x085302f9, 0x08e6b3ba, 0x088a237b, + 0x098dd13c, 0x09e141fd, 0x0954f0be, 0x0938607f, 0x1b243040, + 0x1b48a081, 0x1bfd11c2, 0x1b918103, 0x1a967344, 0x1afae385, + 0x1a4f52c6, 0x1a23c207, 0x1840b648, 0x182c2689, 0x189997ca, + 0x18f5070b, 0x19f2f54c, 0x199e658d, 0x192bd4ce, 0x1947440f, + 0x1ded3c50, 0x1d81ac91, 0x1d341dd2, 0x1d588d13, 0x1c5f7f54, + 0x1c33ef95, 0x1c865ed6, 0x1ceace17, 0x1e89ba58, 0x1ee52a99, + 0x1e509bda, 0x1e3c0b1b, 0x1f3bf95c, 0x1f57699d, 0x1fe2d8de, + 0x1f8e481f, 0x16b62860, 0x16dab8a1, 0x166f09e2, 0x16039923, + 0x17046b64, 0x1768fba5, 0x17dd4ae6, 0x17b1da27, 0x15d2ae68, + 0x15be3ea9, 0x150b8fea, 0x15671f2b, 0x1460ed6c, 0x140c7dad, + 0x14b9ccee, 0x14d55c2f, 0x107f2470, 0x1013b4b1, 0x10a605f2, + 0x10ca9533, 0x11cd6774, 0x11a1f7b5, 0x111446f6, 0x1178d637, + 0x131ba278, 0x137732b9, 0x13c283fa, 0x13ae133b, 0x12a9e17c, + 0x12c571bd, 0x1270c0fe, 0x121c503f, 0x36486080, 0x3624f041, + 0x36914102, 0x36fdd1c3, 0x37fa2384, 0x3796b345, 0x37230206, + 0x374f92c7, 0x352ce688, 0x35407649, 0x35f5c70a, 0x359957cb, + 0x349ea58c, 0x34f2354d, 0x3447840e, 0x342b14cf, 0x30816c90, + 0x30edfc51, 0x30584d12, 0x3034ddd3, 0x31332f94, 0x315fbf55, + 0x31ea0e16, 0x31869ed7, 0x33e5ea98, 0x33897a59, 0x333ccb1a, + 0x33505bdb, 0x3257a99c, 0x323b395d, 0x328e881e, 0x32e218df, + 0x3bda78a0, 0x3bb6e861, 0x3b035922, 0x3b6fc9e3, 0x3a683ba4, + 0x3a04ab65, 0x3ab11a26, 0x3add8ae7, 0x38befea8, 0x38d26e69, + 0x3867df2a, 0x380b4feb, 0x390cbdac, 0x39602d6d, 0x39d59c2e, + 0x39b90cef, 0x3d1374b0, 0x3d7fe471, 0x3dca5532, 0x3da6c5f3, + 0x3ca137b4, 0x3ccda775, 0x3c781636, 0x3c1486f7, 0x3e77f2b8, + 0x3e1b6279, 0x3eaed33a, 0x3ec243fb, 0x3fc5b1bc, 0x3fa9217d, + 0x3f1c903e, 0x3f7000ff, 0x2d6c50c0, 0x2d00c001, 0x2db57142, + 0x2dd9e183, 0x2cde13c4, 0x2cb28305, 0x2c073246, 0x2c6ba287, + 0x2e08d6c8, 0x2e644609, 0x2ed1f74a, 0x2ebd678b, 0x2fba95cc, + 0x2fd6050d, 0x2f63b44e, 0x2f0f248f, 0x2ba55cd0, 0x2bc9cc11, + 0x2b7c7d52, 0x2b10ed93, 0x2a171fd4, 0x2a7b8f15, 0x2ace3e56, + 0x2aa2ae97, 0x28c1dad8, 0x28ad4a19, 0x2818fb5a, 0x28746b9b, + 0x297399dc, 0x291f091d, 0x29aab85e, 0x29c6289f, 0x20fe48e0, + 0x2092d821, 0x20276962, 0x204bf9a3, 0x214c0be4, 0x21209b25, + 0x21952a66, 0x21f9baa7, 0x239acee8, 0x23f65e29, 0x2343ef6a, + 0x232f7fab, 0x22288dec, 0x22441d2d, 0x22f1ac6e, 0x229d3caf, + 0x263744f0, 0x265bd431, 0x26ee6572, 0x2682f5b3, 0x278507f4, + 0x27e99735, 0x275c2676, 0x2730b6b7, 0x2553c2f8, 0x253f5239, + 0x258ae37a, 0x25e673bb, 0x24e181fc, 0x248d113d, 0x2438a07e, + 0x245430bf}}; + +static const word_t crc_braid_big_table[][256] = { + {0x0000000000000000, 0xc1906c0000000000, 0x8221d90000000000, + 0x43b1b50000000000, 0x0443b20100000000, 0xc5d3de0100000000, + 0x86626b0100000000, 0x47f2070100000000, 0x0886640300000000, + 0xc916080300000000, 0x8aa7bd0300000000, 0x4b37d10300000000, + 0x0cc5d60200000000, 0xcd55ba0200000000, 0x8ee40f0200000000, + 0x4f74630200000000, 0x100cc90600000000, 0xd19ca50600000000, + 0x922d100600000000, 0x53bd7c0600000000, 0x144f7b0700000000, + 0xd5df170700000000, 0x966ea20700000000, 0x57fece0700000000, + 0x188aad0500000000, 0xd91ac10500000000, 0x9aab740500000000, + 0x5b3b180500000000, 0x1cc91f0400000000, 0xdd59730400000000, + 0x9ee8c60400000000, 0x5f78aa0400000000, 0x2018920d00000000, + 0xe188fe0d00000000, 0xa2394b0d00000000, 0x63a9270d00000000, + 0x245b200c00000000, 0xe5cb4c0c00000000, 0xa67af90c00000000, + 0x67ea950c00000000, 0x289ef60e00000000, 0xe90e9a0e00000000, + 0xaabf2f0e00000000, 0x6b2f430e00000000, 0x2cdd440f00000000, + 0xed4d280f00000000, 0xaefc9d0f00000000, 0x6f6cf10f00000000, + 0x30145b0b00000000, 0xf184370b00000000, 0xb235820b00000000, + 0x73a5ee0b00000000, 0x3457e90a00000000, 0xf5c7850a00000000, + 0xb676300a00000000, 0x77e65c0a00000000, 0x38923f0800000000, + 0xf902530800000000, 0xbab3e60800000000, 0x7b238a0800000000, + 0x3cd18d0900000000, 0xfd41e10900000000, 0xbef0540900000000, + 0x7f60380900000000, 0x4030241b00000000, 0x81a0481b00000000, + 0xc211fd1b00000000, 0x0381911b00000000, 0x4473961a00000000, + 0x85e3fa1a00000000, 0xc6524f1a00000000, 0x07c2231a00000000, + 0x48b6401800000000, 0x89262c1800000000, 0xca97991800000000, + 0x0b07f51800000000, 0x4cf5f21900000000, 0x8d659e1900000000, + 0xced42b1900000000, 0x0f44471900000000, 0x503ced1d00000000, + 0x91ac811d00000000, 0xd21d341d00000000, 0x138d581d00000000, + 0x547f5f1c00000000, 0x95ef331c00000000, 0xd65e861c00000000, + 0x17ceea1c00000000, 0x58ba891e00000000, 0x992ae51e00000000, + 0xda9b501e00000000, 0x1b0b3c1e00000000, 0x5cf93b1f00000000, + 0x9d69571f00000000, 0xded8e21f00000000, 0x1f488e1f00000000, + 0x6028b61600000000, 0xa1b8da1600000000, 0xe2096f1600000000, + 0x2399031600000000, 0x646b041700000000, 0xa5fb681700000000, + 0xe64add1700000000, 0x27dab11700000000, 0x68aed21500000000, + 0xa93ebe1500000000, 0xea8f0b1500000000, 0x2b1f671500000000, + 0x6ced601400000000, 0xad7d0c1400000000, 0xeeccb91400000000, + 0x2f5cd51400000000, 0x70247f1000000000, 0xb1b4131000000000, + 0xf205a61000000000, 0x3395ca1000000000, 0x7467cd1100000000, + 0xb5f7a11100000000, 0xf646141100000000, 0x37d6781100000000, + 0x78a21b1300000000, 0xb932771300000000, 0xfa83c21300000000, + 0x3b13ae1300000000, 0x7ce1a91200000000, 0xbd71c51200000000, + 0xfec0701200000000, 0x3f501c1200000000, 0x8060483600000000, + 0x41f0243600000000, 0x0241913600000000, 0xc3d1fd3600000000, + 0x8423fa3700000000, 0x45b3963700000000, 0x0602233700000000, + 0xc7924f3700000000, 0x88e62c3500000000, 0x4976403500000000, + 0x0ac7f53500000000, 0xcb57993500000000, 0x8ca59e3400000000, + 0x4d35f23400000000, 0x0e84473400000000, 0xcf142b3400000000, + 0x906c813000000000, 0x51fced3000000000, 0x124d583000000000, + 0xd3dd343000000000, 0x942f333100000000, 0x55bf5f3100000000, + 0x160eea3100000000, 0xd79e863100000000, 0x98eae53300000000, + 0x597a893300000000, 0x1acb3c3300000000, 0xdb5b503300000000, + 0x9ca9573200000000, 0x5d393b3200000000, 0x1e888e3200000000, + 0xdf18e23200000000, 0xa078da3b00000000, 0x61e8b63b00000000, + 0x2259033b00000000, 0xe3c96f3b00000000, 0xa43b683a00000000, + 0x65ab043a00000000, 0x261ab13a00000000, 0xe78add3a00000000, + 0xa8febe3800000000, 0x696ed23800000000, 0x2adf673800000000, + 0xeb4f0b3800000000, 0xacbd0c3900000000, 0x6d2d603900000000, + 0x2e9cd53900000000, 0xef0cb93900000000, 0xb074133d00000000, + 0x71e47f3d00000000, 0x3255ca3d00000000, 0xf3c5a63d00000000, + 0xb437a13c00000000, 0x75a7cd3c00000000, 0x3616783c00000000, + 0xf786143c00000000, 0xb8f2773e00000000, 0x79621b3e00000000, + 0x3ad3ae3e00000000, 0xfb43c23e00000000, 0xbcb1c53f00000000, + 0x7d21a93f00000000, 0x3e901c3f00000000, 0xff00703f00000000, + 0xc0506c2d00000000, 0x01c0002d00000000, 0x4271b52d00000000, + 0x83e1d92d00000000, 0xc413de2c00000000, 0x0583b22c00000000, + 0x4632072c00000000, 0x87a26b2c00000000, 0xc8d6082e00000000, + 0x0946642e00000000, 0x4af7d12e00000000, 0x8b67bd2e00000000, + 0xcc95ba2f00000000, 0x0d05d62f00000000, 0x4eb4632f00000000, + 0x8f240f2f00000000, 0xd05ca52b00000000, 0x11ccc92b00000000, + 0x527d7c2b00000000, 0x93ed102b00000000, 0xd41f172a00000000, + 0x158f7b2a00000000, 0x563ece2a00000000, 0x97aea22a00000000, + 0xd8dac12800000000, 0x194aad2800000000, 0x5afb182800000000, + 0x9b6b742800000000, 0xdc99732900000000, 0x1d091f2900000000, + 0x5eb8aa2900000000, 0x9f28c62900000000, 0xe048fe2000000000, + 0x21d8922000000000, 0x6269272000000000, 0xa3f94b2000000000, + 0xe40b4c2100000000, 0x259b202100000000, 0x662a952100000000, + 0xa7baf92100000000, 0xe8ce9a2300000000, 0x295ef62300000000, + 0x6aef432300000000, 0xab7f2f2300000000, 0xec8d282200000000, + 0x2d1d442200000000, 0x6eacf12200000000, 0xaf3c9d2200000000, + 0xf044372600000000, 0x31d45b2600000000, 0x7265ee2600000000, + 0xb3f5822600000000, 0xf407852700000000, 0x3597e92700000000, + 0x76265c2700000000, 0xb7b6302700000000, 0xf8c2532500000000, + 0x39523f2500000000, 0x7ae38a2500000000, 0xbb73e62500000000, + 0xfc81e12400000000, 0x3d118d2400000000, 0x7ea0382400000000, + 0xbf30542400000000}, + {0x0000000000000000, 0x91ad91fc00000000, 0x215b204900000000, + 0xb0f6b1b500000000, 0x42b6409200000000, 0xd31bd16e00000000, + 0x63ed60db00000000, 0xf240f12700000000, 0x876c829400000000, + 0x16c1136800000000, 0xa637a2dd00000000, 0x379a332100000000, + 0xc5dac20600000000, 0x547753fa00000000, 0xe481e24f00000000, + 0x752c73b300000000, 0x0dd9079900000000, 0x9c74966500000000, + 0x2c8227d000000000, 0xbd2fb62c00000000, 0x4f6f470b00000000, + 0xdec2d6f700000000, 0x6e34674200000000, 0xff99f6be00000000, + 0x8ab5850d00000000, 0x1b1814f100000000, 0xabeea54400000000, + 0x3a4334b800000000, 0xc803c59f00000000, 0x59ae546300000000, + 0xe958e5d600000000, 0x78f5742a00000000, 0x19b20c8200000000, + 0x881f9d7e00000000, 0x38e92ccb00000000, 0xa944bd3700000000, + 0x5b044c1000000000, 0xcaa9ddec00000000, 0x7a5f6c5900000000, + 0xebf2fda500000000, 0x9ede8e1600000000, 0x0f731fea00000000, + 0xbf85ae5f00000000, 0x2e283fa300000000, 0xdc68ce8400000000, + 0x4dc55f7800000000, 0xfd33eecd00000000, 0x6c9e7f3100000000, + 0x146b0b1b00000000, 0x85c69ae700000000, 0x35302b5200000000, + 0xa49dbaae00000000, 0x56dd4b8900000000, 0xc770da7500000000, + 0x77866bc000000000, 0xe62bfa3c00000000, 0x9307898f00000000, + 0x02aa187300000000, 0xb25ca9c600000000, 0x23f1383a00000000, + 0xd1b1c91d00000000, 0x401c58e100000000, 0xf0eae95400000000, + 0x614778a800000000, 0x31641ab400000000, 0xa0c98b4800000000, + 0x103f3afd00000000, 0x8192ab0100000000, 0x73d25a2600000000, + 0xe27fcbda00000000, 0x52897a6f00000000, 0xc324eb9300000000, + 0xb608982000000000, 0x27a509dc00000000, 0x9753b86900000000, + 0x06fe299500000000, 0xf4bed8b200000000, 0x6513494e00000000, + 0xd5e5f8fb00000000, 0x4448690700000000, 0x3cbd1d2d00000000, + 0xad108cd100000000, 0x1de63d6400000000, 0x8c4bac9800000000, + 0x7e0b5dbf00000000, 0xefa6cc4300000000, 0x5f507df600000000, + 0xcefdec0a00000000, 0xbbd19fb900000000, 0x2a7c0e4500000000, + 0x9a8abff000000000, 0x0b272e0c00000000, 0xf967df2b00000000, + 0x68ca4ed700000000, 0xd83cff6200000000, 0x49916e9e00000000, + 0x28d6163600000000, 0xb97b87ca00000000, 0x098d367f00000000, + 0x9820a78300000000, 0x6a6056a400000000, 0xfbcdc75800000000, + 0x4b3b76ed00000000, 0xda96e71100000000, 0xafba94a200000000, + 0x3e17055e00000000, 0x8ee1b4eb00000000, 0x1f4c251700000000, + 0xed0cd43000000000, 0x7ca145cc00000000, 0xcc57f47900000000, + 0x5dfa658500000000, 0x250f11af00000000, 0xb4a2805300000000, + 0x045431e600000000, 0x95f9a01a00000000, 0x67b9513d00000000, + 0xf614c0c100000000, 0x46e2717400000000, 0xd74fe08800000000, + 0xa263933b00000000, 0x33ce02c700000000, 0x8338b37200000000, + 0x1295228e00000000, 0xe0d5d3a900000000, 0x7178425500000000, + 0xc18ef3e000000000, 0x5023621c00000000, 0x61c837d800000000, + 0xf065a62400000000, 0x4093179100000000, 0xd13e866d00000000, + 0x237e774a00000000, 0xb2d3e6b600000000, 0x0225570300000000, + 0x9388c6ff00000000, 0xe6a4b54c00000000, 0x770924b000000000, + 0xc7ff950500000000, 0x565204f900000000, 0xa412f5de00000000, + 0x35bf642200000000, 0x8549d59700000000, 0x14e4446b00000000, + 0x6c11304100000000, 0xfdbca1bd00000000, 0x4d4a100800000000, + 0xdce781f400000000, 0x2ea770d300000000, 0xbf0ae12f00000000, + 0x0ffc509a00000000, 0x9e51c16600000000, 0xeb7db2d500000000, + 0x7ad0232900000000, 0xca26929c00000000, 0x5b8b036000000000, + 0xa9cbf24700000000, 0x386663bb00000000, 0x8890d20e00000000, + 0x193d43f200000000, 0x787a3b5a00000000, 0xe9d7aaa600000000, + 0x59211b1300000000, 0xc88c8aef00000000, 0x3acc7bc800000000, + 0xab61ea3400000000, 0x1b975b8100000000, 0x8a3aca7d00000000, + 0xff16b9ce00000000, 0x6ebb283200000000, 0xde4d998700000000, + 0x4fe0087b00000000, 0xbda0f95c00000000, 0x2c0d68a000000000, + 0x9cfbd91500000000, 0x0d5648e900000000, 0x75a33cc300000000, + 0xe40ead3f00000000, 0x54f81c8a00000000, 0xc5558d7600000000, + 0x37157c5100000000, 0xa6b8edad00000000, 0x164e5c1800000000, + 0x87e3cde400000000, 0xf2cfbe5700000000, 0x63622fab00000000, + 0xd3949e1e00000000, 0x42390fe200000000, 0xb079fec500000000, + 0x21d46f3900000000, 0x9122de8c00000000, 0x008f4f7000000000, + 0x50ac2d6c00000000, 0xc101bc9000000000, 0x71f70d2500000000, + 0xe05a9cd900000000, 0x121a6dfe00000000, 0x83b7fc0200000000, + 0x33414db700000000, 0xa2ecdc4b00000000, 0xd7c0aff800000000, + 0x466d3e0400000000, 0xf69b8fb100000000, 0x67361e4d00000000, + 0x9576ef6a00000000, 0x04db7e9600000000, 0xb42dcf2300000000, + 0x25805edf00000000, 0x5d752af500000000, 0xccd8bb0900000000, + 0x7c2e0abc00000000, 0xed839b4000000000, 0x1fc36a6700000000, + 0x8e6efb9b00000000, 0x3e984a2e00000000, 0xaf35dbd200000000, + 0xda19a86100000000, 0x4bb4399d00000000, 0xfb42882800000000, + 0x6aef19d400000000, 0x98afe8f300000000, 0x0902790f00000000, + 0xb9f4c8ba00000000, 0x2859594600000000, 0x491e21ee00000000, + 0xd8b3b01200000000, 0x684501a700000000, 0xf9e8905b00000000, + 0x0ba8617c00000000, 0x9a05f08000000000, 0x2af3413500000000, + 0xbb5ed0c900000000, 0xce72a37a00000000, 0x5fdf328600000000, + 0xef29833300000000, 0x7e8412cf00000000, 0x8cc4e3e800000000, + 0x1d69721400000000, 0xad9fc3a100000000, 0x3c32525d00000000, + 0x44c7267700000000, 0xd56ab78b00000000, 0x659c063e00000000, + 0xf43197c200000000, 0x067166e500000000, 0x97dcf71900000000, + 0x272a46ac00000000, 0xb687d75000000000, 0xc3aba4e300000000, + 0x5206351f00000000, 0xe2f084aa00000000, 0x735d155600000000, + 0x811de47100000000, 0x10b0758d00000000, 0xa046c43800000000, + 0x31eb55c400000000}, + {0x0000000000000000, 0xac006dd100000000, 0x5b01d91200000000, + 0xf701b4c300000000, 0xb602b22500000000, 0x1a02dff400000000, + 0xed036b3700000000, 0x410306e600000000, 0x6c05644b00000000, + 0xc005099a00000000, 0x3704bd5900000000, 0x9b04d08800000000, + 0xda07d66e00000000, 0x7607bbbf00000000, 0x81060f7c00000000, + 0x2d0662ad00000000, 0xd80ac89600000000, 0x740aa54700000000, + 0x830b118400000000, 0x2f0b7c5500000000, 0x6e087ab300000000, + 0xc208176200000000, 0x3509a3a100000000, 0x9909ce7000000000, + 0xb40facdd00000000, 0x180fc10c00000000, 0xef0e75cf00000000, + 0x430e181e00000000, 0x020d1ef800000000, 0xae0d732900000000, + 0x590cc7ea00000000, 0xf50caa3b00000000, 0xb315939d00000000, + 0x1f15fe4c00000000, 0xe8144a8f00000000, 0x4414275e00000000, + 0x051721b800000000, 0xa9174c6900000000, 0x5e16f8aa00000000, + 0xf216957b00000000, 0xdf10f7d600000000, 0x73109a0700000000, + 0x84112ec400000000, 0x2811431500000000, 0x691245f300000000, + 0xc512282200000000, 0x32139ce100000000, 0x9e13f13000000000, + 0x6b1f5b0b00000000, 0xc71f36da00000000, 0x301e821900000000, + 0x9c1eefc800000000, 0xdd1de92e00000000, 0x711d84ff00000000, + 0x861c303c00000000, 0x2a1c5ded00000000, 0x071a3f4000000000, + 0xab1a529100000000, 0x5c1be65200000000, 0xf01b8b8300000000, + 0xb1188d6500000000, 0x1d18e0b400000000, 0xea19547700000000, + 0x461939a600000000, 0x652b258b00000000, 0xc92b485a00000000, + 0x3e2afc9900000000, 0x922a914800000000, 0xd32997ae00000000, + 0x7f29fa7f00000000, 0x88284ebc00000000, 0x2428236d00000000, + 0x092e41c000000000, 0xa52e2c1100000000, 0x522f98d200000000, + 0xfe2ff50300000000, 0xbf2cf3e500000000, 0x132c9e3400000000, + 0xe42d2af700000000, 0x482d472600000000, 0xbd21ed1d00000000, + 0x112180cc00000000, 0xe620340f00000000, 0x4a2059de00000000, + 0x0b235f3800000000, 0xa72332e900000000, 0x5022862a00000000, + 0xfc22ebfb00000000, 0xd124895600000000, 0x7d24e48700000000, + 0x8a25504400000000, 0x26253d9500000000, 0x67263b7300000000, + 0xcb2656a200000000, 0x3c27e26100000000, 0x90278fb000000000, + 0xd63eb61600000000, 0x7a3edbc700000000, 0x8d3f6f0400000000, + 0x213f02d500000000, 0x603c043300000000, 0xcc3c69e200000000, + 0x3b3ddd2100000000, 0x973db0f000000000, 0xba3bd25d00000000, + 0x163bbf8c00000000, 0xe13a0b4f00000000, 0x4d3a669e00000000, + 0x0c39607800000000, 0xa0390da900000000, 0x5738b96a00000000, + 0xfb38d4bb00000000, 0x0e347e8000000000, 0xa234135100000000, + 0x5535a79200000000, 0xf935ca4300000000, 0xb836cca500000000, + 0x1436a17400000000, 0xe33715b700000000, 0x4f37786600000000, + 0x62311acb00000000, 0xce31771a00000000, 0x3930c3d900000000, + 0x9530ae0800000000, 0xd433a8ee00000000, 0x7833c53f00000000, + 0x8f3271fc00000000, 0x23321c2d00000000, 0xc95649a600000000, + 0x6556247700000000, 0x925790b400000000, 0x3e57fd6500000000, + 0x7f54fb8300000000, 0xd354965200000000, 0x2455229100000000, + 0x88554f4000000000, 0xa5532ded00000000, 0x0953403c00000000, + 0xfe52f4ff00000000, 0x5252992e00000000, 0x13519fc800000000, + 0xbf51f21900000000, 0x485046da00000000, 0xe4502b0b00000000, + 0x115c813000000000, 0xbd5cece100000000, 0x4a5d582200000000, + 0xe65d35f300000000, 0xa75e331500000000, 0x0b5e5ec400000000, + 0xfc5fea0700000000, 0x505f87d600000000, 0x7d59e57b00000000, + 0xd15988aa00000000, 0x26583c6900000000, 0x8a5851b800000000, + 0xcb5b575e00000000, 0x675b3a8f00000000, 0x905a8e4c00000000, + 0x3c5ae39d00000000, 0x7a43da3b00000000, 0xd643b7ea00000000, + 0x2142032900000000, 0x8d426ef800000000, 0xcc41681e00000000, + 0x604105cf00000000, 0x9740b10c00000000, 0x3b40dcdd00000000, + 0x1646be7000000000, 0xba46d3a100000000, 0x4d47676200000000, + 0xe1470ab300000000, 0xa0440c5500000000, 0x0c44618400000000, + 0xfb45d54700000000, 0x5745b89600000000, 0xa24912ad00000000, + 0x0e497f7c00000000, 0xf948cbbf00000000, 0x5548a66e00000000, + 0x144ba08800000000, 0xb84bcd5900000000, 0x4f4a799a00000000, + 0xe34a144b00000000, 0xce4c76e600000000, 0x624c1b3700000000, + 0x954daff400000000, 0x394dc22500000000, 0x784ec4c300000000, + 0xd44ea91200000000, 0x234f1dd100000000, 0x8f4f700000000000, + 0xac7d6c2d00000000, 0x007d01fc00000000, 0xf77cb53f00000000, + 0x5b7cd8ee00000000, 0x1a7fde0800000000, 0xb67fb3d900000000, + 0x417e071a00000000, 0xed7e6acb00000000, 0xc078086600000000, + 0x6c7865b700000000, 0x9b79d17400000000, 0x3779bca500000000, + 0x767aba4300000000, 0xda7ad79200000000, 0x2d7b635100000000, + 0x817b0e8000000000, 0x7477a4bb00000000, 0xd877c96a00000000, + 0x2f767da900000000, 0x8376107800000000, 0xc275169e00000000, + 0x6e757b4f00000000, 0x9974cf8c00000000, 0x3574a25d00000000, + 0x1872c0f000000000, 0xb472ad2100000000, 0x437319e200000000, + 0xef73743300000000, 0xae7072d500000000, 0x02701f0400000000, + 0xf571abc700000000, 0x5971c61600000000, 0x1f68ffb000000000, + 0xb368926100000000, 0x446926a200000000, 0xe8694b7300000000, + 0xa96a4d9500000000, 0x056a204400000000, 0xf26b948700000000, + 0x5e6bf95600000000, 0x736d9bfb00000000, 0xdf6df62a00000000, + 0x286c42e900000000, 0x846c2f3800000000, 0xc56f29de00000000, + 0x696f440f00000000, 0x9e6ef0cc00000000, 0x326e9d1d00000000, + 0xc762372600000000, 0x6b625af700000000, 0x9c63ee3400000000, + 0x306383e500000000, 0x7160850300000000, 0xdd60e8d200000000, + 0x2a615c1100000000, 0x866131c000000000, 0xab67536d00000000, + 0x07673ebc00000000, 0xf0668a7f00000000, 0x5c66e7ae00000000, + 0x1d65e14800000000, 0xb1658c9900000000, 0x4664385a00000000, + 0xea64558b00000000}, + {0x0000000000000000, 0x00c1115c00000000, 0x008223b800000000, + 0x004332e400000000, 0x030444c000000000, 0x03c5559c00000000, + 0x0386677800000000, 0x0347762400000000, 0x05088b3000000000, + 0x05c99a6c00000000, 0x058aa88800000000, 0x054bb9d400000000, + 0x060ccff000000000, 0x06cddeac00000000, 0x068eec4800000000, + 0x064ffd1400000000, 0x0a10166100000000, 0x0ad1073d00000000, + 0x0a9235d900000000, 0x0a53248500000000, 0x091452a100000000, + 0x09d543fd00000000, 0x0996711900000000, 0x0957604500000000, + 0x0f189d5100000000, 0x0fd98c0d00000000, 0x0f9abee900000000, + 0x0f5bafb500000000, 0x0c1cd99100000000, 0x0cddc8cd00000000, + 0x0c9efa2900000000, 0x0c5feb7500000000, 0x14202cc200000000, + 0x14e13d9e00000000, 0x14a20f7a00000000, 0x14631e2600000000, + 0x1724680200000000, 0x17e5795e00000000, 0x17a64bba00000000, + 0x17675ae600000000, 0x1128a7f200000000, 0x11e9b6ae00000000, + 0x11aa844a00000000, 0x116b951600000000, 0x122ce33200000000, + 0x12edf26e00000000, 0x12aec08a00000000, 0x126fd1d600000000, + 0x1e303aa300000000, 0x1ef12bff00000000, 0x1eb2191b00000000, + 0x1e73084700000000, 0x1d347e6300000000, 0x1df56f3f00000000, + 0x1db65ddb00000000, 0x1d774c8700000000, 0x1b38b19300000000, + 0x1bf9a0cf00000000, 0x1bba922b00000000, 0x1b7b837700000000, + 0x183cf55300000000, 0x18fde40f00000000, 0x18bed6eb00000000, + 0x187fc7b700000000, 0x2b405b3400000000, 0x2b814a6800000000, + 0x2bc2788c00000000, 0x2b0369d000000000, 0x28441ff400000000, + 0x28850ea800000000, 0x28c63c4c00000000, 0x28072d1000000000, + 0x2e48d00400000000, 0x2e89c15800000000, 0x2ecaf3bc00000000, + 0x2e0be2e000000000, 0x2d4c94c400000000, 0x2d8d859800000000, + 0x2dceb77c00000000, 0x2d0fa62000000000, 0x21504d5500000000, + 0x21915c0900000000, 0x21d26eed00000000, 0x21137fb100000000, + 0x2254099500000000, 0x229518c900000000, 0x22d62a2d00000000, + 0x22173b7100000000, 0x2458c66500000000, 0x2499d73900000000, + 0x24dae5dd00000000, 0x241bf48100000000, 0x275c82a500000000, + 0x279d93f900000000, 0x27dea11d00000000, 0x271fb04100000000, + 0x3f6077f600000000, 0x3fa166aa00000000, 0x3fe2544e00000000, + 0x3f23451200000000, 0x3c64333600000000, 0x3ca5226a00000000, + 0x3ce6108e00000000, 0x3c2701d200000000, 0x3a68fcc600000000, + 0x3aa9ed9a00000000, 0x3aeadf7e00000000, 0x3a2bce2200000000, + 0x396cb80600000000, 0x39ada95a00000000, 0x39ee9bbe00000000, + 0x392f8ae200000000, 0x3570619700000000, 0x35b170cb00000000, + 0x35f2422f00000000, 0x3533537300000000, 0x3674255700000000, + 0x36b5340b00000000, 0x36f606ef00000000, 0x363717b300000000, + 0x3078eaa700000000, 0x30b9fbfb00000000, 0x30fac91f00000000, + 0x303bd84300000000, 0x337cae6700000000, 0x33bdbf3b00000000, + 0x33fe8ddf00000000, 0x333f9c8300000000, 0x5680b66800000000, + 0x5641a73400000000, 0x560295d000000000, 0x56c3848c00000000, + 0x5584f2a800000000, 0x5545e3f400000000, 0x5506d11000000000, + 0x55c7c04c00000000, 0x53883d5800000000, 0x53492c0400000000, + 0x530a1ee000000000, 0x53cb0fbc00000000, 0x508c799800000000, + 0x504d68c400000000, 0x500e5a2000000000, 0x50cf4b7c00000000, + 0x5c90a00900000000, 0x5c51b15500000000, 0x5c1283b100000000, + 0x5cd392ed00000000, 0x5f94e4c900000000, 0x5f55f59500000000, + 0x5f16c77100000000, 0x5fd7d62d00000000, 0x59982b3900000000, + 0x59593a6500000000, 0x591a088100000000, 0x59db19dd00000000, + 0x5a9c6ff900000000, 0x5a5d7ea500000000, 0x5a1e4c4100000000, + 0x5adf5d1d00000000, 0x42a09aaa00000000, 0x42618bf600000000, + 0x4222b91200000000, 0x42e3a84e00000000, 0x41a4de6a00000000, + 0x4165cf3600000000, 0x4126fdd200000000, 0x41e7ec8e00000000, + 0x47a8119a00000000, 0x476900c600000000, 0x472a322200000000, + 0x47eb237e00000000, 0x44ac555a00000000, 0x446d440600000000, + 0x442e76e200000000, 0x44ef67be00000000, 0x48b08ccb00000000, + 0x48719d9700000000, 0x4832af7300000000, 0x48f3be2f00000000, + 0x4bb4c80b00000000, 0x4b75d95700000000, 0x4b36ebb300000000, + 0x4bf7faef00000000, 0x4db807fb00000000, 0x4d7916a700000000, + 0x4d3a244300000000, 0x4dfb351f00000000, 0x4ebc433b00000000, + 0x4e7d526700000000, 0x4e3e608300000000, 0x4eff71df00000000, + 0x7dc0ed5c00000000, 0x7d01fc0000000000, 0x7d42cee400000000, + 0x7d83dfb800000000, 0x7ec4a99c00000000, 0x7e05b8c000000000, + 0x7e468a2400000000, 0x7e879b7800000000, 0x78c8666c00000000, + 0x7809773000000000, 0x784a45d400000000, 0x788b548800000000, + 0x7bcc22ac00000000, 0x7b0d33f000000000, 0x7b4e011400000000, + 0x7b8f104800000000, 0x77d0fb3d00000000, 0x7711ea6100000000, + 0x7752d88500000000, 0x7793c9d900000000, 0x74d4bffd00000000, + 0x7415aea100000000, 0x74569c4500000000, 0x74978d1900000000, + 0x72d8700d00000000, 0x7219615100000000, 0x725a53b500000000, + 0x729b42e900000000, 0x71dc34cd00000000, 0x711d259100000000, + 0x715e177500000000, 0x719f062900000000, 0x69e0c19e00000000, + 0x6921d0c200000000, 0x6962e22600000000, 0x69a3f37a00000000, + 0x6ae4855e00000000, 0x6a25940200000000, 0x6a66a6e600000000, + 0x6aa7b7ba00000000, 0x6ce84aae00000000, 0x6c295bf200000000, + 0x6c6a691600000000, 0x6cab784a00000000, 0x6fec0e6e00000000, + 0x6f2d1f3200000000, 0x6f6e2dd600000000, 0x6faf3c8a00000000, + 0x63f0d7ff00000000, 0x6331c6a300000000, 0x6372f44700000000, + 0x63b3e51b00000000, 0x60f4933f00000000, 0x6035826300000000, + 0x6076b08700000000, 0x60b7a1db00000000, 0x66f85ccf00000000, + 0x66394d9300000000, 0x667a7f7700000000, 0x66bb6e2b00000000, + 0x65fc180f00000000, 0x653d095300000000, 0x657e3bb700000000, + 0x65bf2aeb00000000}, + {0x0000000000000000, 0xc1115c0000000000, 0x8223b80000000000, + 0x4332e40000000000, 0x0447700100000000, 0xc5562c0100000000, + 0x8664c80100000000, 0x4775940100000000, 0x088ee00200000000, + 0xc99fbc0200000000, 0x8aad580200000000, 0x4bbc040200000000, + 0x0cc9900300000000, 0xcdd8cc0300000000, 0x8eea280300000000, + 0x4ffb740300000000, 0x101cc10500000000, 0xd10d9d0500000000, + 0x923f790500000000, 0x532e250500000000, 0x145bb10400000000, + 0xd54aed0400000000, 0x9678090400000000, 0x5769550400000000, + 0x1892210700000000, 0xd9837d0700000000, 0x9ab1990700000000, + 0x5ba0c50700000000, 0x1cd5510600000000, 0xddc40d0600000000, + 0x9ef6e90600000000, 0x5fe7b50600000000, 0x2038820b00000000, + 0xe129de0b00000000, 0xa21b3a0b00000000, 0x630a660b00000000, + 0x247ff20a00000000, 0xe56eae0a00000000, 0xa65c4a0a00000000, + 0x674d160a00000000, 0x28b6620900000000, 0xe9a73e0900000000, + 0xaa95da0900000000, 0x6b84860900000000, 0x2cf1120800000000, + 0xede04e0800000000, 0xaed2aa0800000000, 0x6fc3f60800000000, + 0x3024430e00000000, 0xf1351f0e00000000, 0xb207fb0e00000000, + 0x7316a70e00000000, 0x3463330f00000000, 0xf5726f0f00000000, + 0xb6408b0f00000000, 0x7751d70f00000000, 0x38aaa30c00000000, + 0xf9bbff0c00000000, 0xba891b0c00000000, 0x7b98470c00000000, + 0x3cedd30d00000000, 0xfdfc8f0d00000000, 0xbece6b0d00000000, + 0x7fdf370d00000000, 0x4070041700000000, 0x8161581700000000, + 0xc253bc1700000000, 0x0342e01700000000, 0x4437741600000000, + 0x8526281600000000, 0xc614cc1600000000, 0x0705901600000000, + 0x48fee41500000000, 0x89efb81500000000, 0xcadd5c1500000000, + 0x0bcc001500000000, 0x4cb9941400000000, 0x8da8c81400000000, + 0xce9a2c1400000000, 0x0f8b701400000000, 0x506cc51200000000, + 0x917d991200000000, 0xd24f7d1200000000, 0x135e211200000000, + 0x542bb51300000000, 0x953ae91300000000, 0xd6080d1300000000, + 0x1719511300000000, 0x58e2251000000000, 0x99f3791000000000, + 0xdac19d1000000000, 0x1bd0c11000000000, 0x5ca5551100000000, + 0x9db4091100000000, 0xde86ed1100000000, 0x1f97b11100000000, + 0x6048861c00000000, 0xa159da1c00000000, 0xe26b3e1c00000000, + 0x237a621c00000000, 0x640ff61d00000000, 0xa51eaa1d00000000, + 0xe62c4e1d00000000, 0x273d121d00000000, 0x68c6661e00000000, + 0xa9d73a1e00000000, 0xeae5de1e00000000, 0x2bf4821e00000000, + 0x6c81161f00000000, 0xad904a1f00000000, 0xeea2ae1f00000000, + 0x2fb3f21f00000000, 0x7054471900000000, 0xb1451b1900000000, + 0xf277ff1900000000, 0x3366a31900000000, 0x7413371800000000, + 0xb5026b1800000000, 0xf6308f1800000000, 0x3721d31800000000, + 0x78daa71b00000000, 0xb9cbfb1b00000000, 0xfaf91f1b00000000, + 0x3be8431b00000000, 0x7c9dd71a00000000, 0xbd8c8b1a00000000, + 0xfebe6f1a00000000, 0x3faf331a00000000, 0x80e0082e00000000, + 0x41f1542e00000000, 0x02c3b02e00000000, 0xc3d2ec2e00000000, + 0x84a7782f00000000, 0x45b6242f00000000, 0x0684c02f00000000, + 0xc7959c2f00000000, 0x886ee82c00000000, 0x497fb42c00000000, + 0x0a4d502c00000000, 0xcb5c0c2c00000000, 0x8c29982d00000000, + 0x4d38c42d00000000, 0x0e0a202d00000000, 0xcf1b7c2d00000000, + 0x90fcc92b00000000, 0x51ed952b00000000, 0x12df712b00000000, + 0xd3ce2d2b00000000, 0x94bbb92a00000000, 0x55aae52a00000000, + 0x1698012a00000000, 0xd7895d2a00000000, 0x9872292900000000, + 0x5963752900000000, 0x1a51912900000000, 0xdb40cd2900000000, + 0x9c35592800000000, 0x5d24052800000000, 0x1e16e12800000000, + 0xdf07bd2800000000, 0xa0d88a2500000000, 0x61c9d62500000000, + 0x22fb322500000000, 0xe3ea6e2500000000, 0xa49ffa2400000000, + 0x658ea62400000000, 0x26bc422400000000, 0xe7ad1e2400000000, + 0xa8566a2700000000, 0x6947362700000000, 0x2a75d22700000000, + 0xeb648e2700000000, 0xac111a2600000000, 0x6d00462600000000, + 0x2e32a22600000000, 0xef23fe2600000000, 0xb0c44b2000000000, + 0x71d5172000000000, 0x32e7f32000000000, 0xf3f6af2000000000, + 0xb4833b2100000000, 0x7592672100000000, 0x36a0832100000000, + 0xf7b1df2100000000, 0xb84aab2200000000, 0x795bf72200000000, + 0x3a69132200000000, 0xfb784f2200000000, 0xbc0ddb2300000000, + 0x7d1c872300000000, 0x3e2e632300000000, 0xff3f3f2300000000, + 0xc0900c3900000000, 0x0181503900000000, 0x42b3b43900000000, + 0x83a2e83900000000, 0xc4d77c3800000000, 0x05c6203800000000, + 0x46f4c43800000000, 0x87e5983800000000, 0xc81eec3b00000000, + 0x090fb03b00000000, 0x4a3d543b00000000, 0x8b2c083b00000000, + 0xcc599c3a00000000, 0x0d48c03a00000000, 0x4e7a243a00000000, + 0x8f6b783a00000000, 0xd08ccd3c00000000, 0x119d913c00000000, + 0x52af753c00000000, 0x93be293c00000000, 0xd4cbbd3d00000000, + 0x15dae13d00000000, 0x56e8053d00000000, 0x97f9593d00000000, + 0xd8022d3e00000000, 0x1913713e00000000, 0x5a21953e00000000, + 0x9b30c93e00000000, 0xdc455d3f00000000, 0x1d54013f00000000, + 0x5e66e53f00000000, 0x9f77b93f00000000, 0xe0a88e3200000000, + 0x21b9d23200000000, 0x628b363200000000, 0xa39a6a3200000000, + 0xe4effe3300000000, 0x25fea23300000000, 0x66cc463300000000, + 0xa7dd1a3300000000, 0xe8266e3000000000, 0x2937323000000000, + 0x6a05d63000000000, 0xab148a3000000000, 0xec611e3100000000, + 0x2d70423100000000, 0x6e42a63100000000, 0xaf53fa3100000000, + 0xf0b44f3700000000, 0x31a5133700000000, 0x7297f73700000000, + 0xb386ab3700000000, 0xf4f33f3600000000, 0x35e2633600000000, + 0x76d0873600000000, 0xb7c1db3600000000, 0xf83aaf3500000000, + 0x392bf33500000000, 0x7a19173500000000, 0xbb084b3500000000, + 0xfc7ddf3400000000, 0x3d6c833400000000, 0x7e5e673400000000, + 0xbf4f3b3400000000}, + {0x0000000000000000, 0x109d91fc00000000, 0x233a204900000000, + 0x33a7b1b500000000, 0x4674409200000000, 0x56e9d16e00000000, + 0x654e60db00000000, 0x75d3f12700000000, 0x8fe8839400000000, + 0x9f75126800000000, 0xacd2a3dd00000000, 0xbc4f322100000000, + 0xc99cc30600000000, 0xd90152fa00000000, 0xeaa6e34f00000000, + 0xfa3b72b300000000, 0x1dd1049900000000, 0x0d4c956500000000, + 0x3eeb24d000000000, 0x2e76b52c00000000, 0x5ba5440b00000000, + 0x4b38d5f700000000, 0x789f644200000000, 0x6802f5be00000000, + 0x9239870d00000000, 0x82a416f100000000, 0xb103a74400000000, + 0xa19e36b800000000, 0xd44dc79f00000000, 0xc4d0566300000000, + 0xf777e7d600000000, 0xe7ea762a00000000, 0x39a20a8200000000, + 0x293f9b7e00000000, 0x1a982acb00000000, 0x0a05bb3700000000, + 0x7fd64a1000000000, 0x6f4bdbec00000000, 0x5cec6a5900000000, + 0x4c71fba500000000, 0xb64a891600000000, 0xa6d718ea00000000, + 0x9570a95f00000000, 0x85ed38a300000000, 0xf03ec98400000000, + 0xe0a3587800000000, 0xd304e9cd00000000, 0xc399783100000000, + 0x24730e1b00000000, 0x34ee9fe700000000, 0x07492e5200000000, + 0x17d4bfae00000000, 0x62074e8900000000, 0x729adf7500000000, + 0x413d6ec000000000, 0x51a0ff3c00000000, 0xab9b8d8f00000000, + 0xbb061c7300000000, 0x88a1adc600000000, 0x983c3c3a00000000, + 0xedefcd1d00000000, 0xfd725ce100000000, 0xced5ed5400000000, + 0xde487ca800000000, 0x714416b400000000, 0x61d9874800000000, + 0x527e36fd00000000, 0x42e3a70100000000, 0x3730562600000000, + 0x27adc7da00000000, 0x140a766f00000000, 0x0497e79300000000, + 0xfeac952000000000, 0xee3104dc00000000, 0xdd96b56900000000, + 0xcd0b249500000000, 0xb8d8d5b200000000, 0xa845444e00000000, + 0x9be2f5fb00000000, 0x8b7f640700000000, 0x6c95122d00000000, + 0x7c0883d100000000, 0x4faf326400000000, 0x5f32a39800000000, + 0x2ae152bf00000000, 0x3a7cc34300000000, 0x09db72f600000000, + 0x1946e30a00000000, 0xe37d91b900000000, 0xf3e0004500000000, + 0xc047b1f000000000, 0xd0da200c00000000, 0xa509d12b00000000, + 0xb59440d700000000, 0x8633f16200000000, 0x96ae609e00000000, + 0x48e61c3600000000, 0x587b8dca00000000, 0x6bdc3c7f00000000, + 0x7b41ad8300000000, 0x0e925ca400000000, 0x1e0fcd5800000000, + 0x2da87ced00000000, 0x3d35ed1100000000, 0xc70e9fa200000000, + 0xd7930e5e00000000, 0xe434bfeb00000000, 0xf4a92e1700000000, + 0x817adf3000000000, 0x91e74ecc00000000, 0xa240ff7900000000, + 0xb2dd6e8500000000, 0x553718af00000000, 0x45aa895300000000, + 0x760d38e600000000, 0x6690a91a00000000, 0x1343583d00000000, + 0x03dec9c100000000, 0x3079787400000000, 0x20e4e98800000000, + 0xdadf9b3b00000000, 0xca420ac700000000, 0xf9e5bb7200000000, + 0xe9782a8e00000000, 0x9cabdba900000000, 0x8c364a5500000000, + 0xbf91fbe000000000, 0xaf0c6a1c00000000, 0xe1882fd800000000, + 0xf115be2400000000, 0xc2b20f9100000000, 0xd22f9e6d00000000, + 0xa7fc6f4a00000000, 0xb761feb600000000, 0x84c64f0300000000, + 0x945bdeff00000000, 0x6e60ac4c00000000, 0x7efd3db000000000, + 0x4d5a8c0500000000, 0x5dc71df900000000, 0x2814ecde00000000, + 0x38897d2200000000, 0x0b2ecc9700000000, 0x1bb35d6b00000000, + 0xfc592b4100000000, 0xecc4babd00000000, 0xdf630b0800000000, + 0xcffe9af400000000, 0xba2d6bd300000000, 0xaab0fa2f00000000, + 0x99174b9a00000000, 0x898ada6600000000, 0x73b1a8d500000000, + 0x632c392900000000, 0x508b889c00000000, 0x4016196000000000, + 0x35c5e84700000000, 0x255879bb00000000, 0x16ffc80e00000000, + 0x066259f200000000, 0xd82a255a00000000, 0xc8b7b4a600000000, + 0xfb10051300000000, 0xeb8d94ef00000000, 0x9e5e65c800000000, + 0x8ec3f43400000000, 0xbd64458100000000, 0xadf9d47d00000000, + 0x57c2a6ce00000000, 0x475f373200000000, 0x74f8868700000000, + 0x6465177b00000000, 0x11b6e65c00000000, 0x012b77a000000000, + 0x328cc61500000000, 0x221157e900000000, 0xc5fb21c300000000, + 0xd566b03f00000000, 0xe6c1018a00000000, 0xf65c907600000000, + 0x838f615100000000, 0x9312f0ad00000000, 0xa0b5411800000000, + 0xb028d0e400000000, 0x4a13a25700000000, 0x5a8e33ab00000000, + 0x6929821e00000000, 0x79b413e200000000, 0x0c67e2c500000000, + 0x1cfa733900000000, 0x2f5dc28c00000000, 0x3fc0537000000000, + 0x90cc396c00000000, 0x8051a89000000000, 0xb3f6192500000000, + 0xa36b88d900000000, 0xd6b879fe00000000, 0xc625e80200000000, + 0xf58259b700000000, 0xe51fc84b00000000, 0x1f24baf800000000, + 0x0fb92b0400000000, 0x3c1e9ab100000000, 0x2c830b4d00000000, + 0x5950fa6a00000000, 0x49cd6b9600000000, 0x7a6ada2300000000, + 0x6af74bdf00000000, 0x8d1d3df500000000, 0x9d80ac0900000000, + 0xae271dbc00000000, 0xbeba8c4000000000, 0xcb697d6700000000, + 0xdbf4ec9b00000000, 0xe8535d2e00000000, 0xf8ceccd200000000, + 0x02f5be6100000000, 0x12682f9d00000000, 0x21cf9e2800000000, + 0x31520fd400000000, 0x4481fef300000000, 0x541c6f0f00000000, + 0x67bbdeba00000000, 0x77264f4600000000, 0xa96e33ee00000000, + 0xb9f3a21200000000, 0x8a5413a700000000, 0x9ac9825b00000000, + 0xef1a737c00000000, 0xff87e28000000000, 0xcc20533500000000, + 0xdcbdc2c900000000, 0x2686b07a00000000, 0x361b218600000000, + 0x05bc903300000000, 0x152101cf00000000, 0x60f2f0e800000000, + 0x706f611400000000, 0x43c8d0a100000000, 0x5355415d00000000, + 0xb4bf377700000000, 0xa422a68b00000000, 0x9785173e00000000, + 0x871886c200000000, 0xf2cb77e500000000, 0xe256e61900000000, + 0xd1f157ac00000000, 0xc16cc65000000000, 0x3b57b4e300000000, + 0x2bca251f00000000, 0x186d94aa00000000, 0x08f0055600000000, + 0x7d23f47100000000, 0x6dbe658d00000000, 0x5e19d43800000000, + 0x4e8445c400000000}, + {0x0000000000000000, 0x9c81fd9900000000, 0x3b03f88300000000, + 0xa782051a00000000, 0x7506f3b700000000, 0xe9870e2e00000000, + 0x4e050b3400000000, 0xd284f6ad00000000, 0xe90ce5df00000000, + 0x758d184600000000, 0xd20f1d5c00000000, 0x4e8ee0c500000000, + 0x9c0a166800000000, 0x008bebf100000000, 0xa709eeeb00000000, + 0x3b88137200000000, 0xd119c90f00000000, 0x4d98349600000000, + 0xea1a318c00000000, 0x769bcc1500000000, 0xa41f3ab800000000, + 0x389ec72100000000, 0x9f1cc23b00000000, 0x039d3fa200000000, + 0x38152cd000000000, 0xa494d14900000000, 0x0316d45300000000, + 0x9f9729ca00000000, 0x4d13df6700000000, 0xd19222fe00000000, + 0x761027e400000000, 0xea91da7d00000000, 0xa233921f00000000, + 0x3eb26f8600000000, 0x99306a9c00000000, 0x05b1970500000000, + 0xd73561a800000000, 0x4bb49c3100000000, 0xec36992b00000000, + 0x70b764b200000000, 0x4b3f77c000000000, 0xd7be8a5900000000, + 0x703c8f4300000000, 0xecbd72da00000000, 0x3e39847700000000, + 0xa2b879ee00000000, 0x053a7cf400000000, 0x99bb816d00000000, + 0x732a5b1000000000, 0xefaba68900000000, 0x4829a39300000000, + 0xd4a85e0a00000000, 0x062ca8a700000000, 0x9aad553e00000000, + 0x3d2f502400000000, 0xa1aeadbd00000000, 0x9a26becf00000000, + 0x06a7435600000000, 0xa125464c00000000, 0x3da4bbd500000000, + 0xef204d7800000000, 0x73a1b0e100000000, 0xd423b5fb00000000, + 0x48a2486200000000, 0x4467243f00000000, 0xd8e6d9a600000000, + 0x7f64dcbc00000000, 0xe3e5212500000000, 0x3161d78800000000, + 0xade02a1100000000, 0x0a622f0b00000000, 0x96e3d29200000000, + 0xad6bc1e000000000, 0x31ea3c7900000000, 0x9668396300000000, + 0x0ae9c4fa00000000, 0xd86d325700000000, 0x44eccfce00000000, + 0xe36ecad400000000, 0x7fef374d00000000, 0x957eed3000000000, + 0x09ff10a900000000, 0xae7d15b300000000, 0x32fce82a00000000, + 0xe0781e8700000000, 0x7cf9e31e00000000, 0xdb7be60400000000, + 0x47fa1b9d00000000, 0x7c7208ef00000000, 0xe0f3f57600000000, + 0x4771f06c00000000, 0xdbf00df500000000, 0x0974fb5800000000, + 0x95f506c100000000, 0x327703db00000000, 0xaef6fe4200000000, + 0xe654b62000000000, 0x7ad54bb900000000, 0xdd574ea300000000, + 0x41d6b33a00000000, 0x9352459700000000, 0x0fd3b80e00000000, + 0xa851bd1400000000, 0x34d0408d00000000, 0x0f5853ff00000000, + 0x93d9ae6600000000, 0x345bab7c00000000, 0xa8da56e500000000, + 0x7a5ea04800000000, 0xe6df5dd100000000, 0x415d58cb00000000, + 0xdddca55200000000, 0x374d7f2f00000000, 0xabcc82b600000000, + 0x0c4e87ac00000000, 0x90cf7a3500000000, 0x424b8c9800000000, + 0xdeca710100000000, 0x7948741b00000000, 0xe5c9898200000000, + 0xde419af000000000, 0x42c0676900000000, 0xe542627300000000, + 0x79c39fea00000000, 0xab47694700000000, 0x37c694de00000000, + 0x904491c400000000, 0x0cc56c5d00000000, 0x88ce487e00000000, + 0x144fb5e700000000, 0xb3cdb0fd00000000, 0x2f4c4d6400000000, + 0xfdc8bbc900000000, 0x6149465000000000, 0xc6cb434a00000000, + 0x5a4abed300000000, 0x61c2ada100000000, 0xfd43503800000000, + 0x5ac1552200000000, 0xc640a8bb00000000, 0x14c45e1600000000, + 0x8845a38f00000000, 0x2fc7a69500000000, 0xb3465b0c00000000, + 0x59d7817100000000, 0xc5567ce800000000, 0x62d479f200000000, + 0xfe55846b00000000, 0x2cd172c600000000, 0xb0508f5f00000000, + 0x17d28a4500000000, 0x8b5377dc00000000, 0xb0db64ae00000000, + 0x2c5a993700000000, 0x8bd89c2d00000000, 0x175961b400000000, + 0xc5dd971900000000, 0x595c6a8000000000, 0xfede6f9a00000000, + 0x625f920300000000, 0x2afdda6100000000, 0xb67c27f800000000, + 0x11fe22e200000000, 0x8d7fdf7b00000000, 0x5ffb29d600000000, + 0xc37ad44f00000000, 0x64f8d15500000000, 0xf8792ccc00000000, + 0xc3f13fbe00000000, 0x5f70c22700000000, 0xf8f2c73d00000000, + 0x64733aa400000000, 0xb6f7cc0900000000, 0x2a76319000000000, + 0x8df4348a00000000, 0x1175c91300000000, 0xfbe4136e00000000, + 0x6765eef700000000, 0xc0e7ebed00000000, 0x5c66167400000000, + 0x8ee2e0d900000000, 0x12631d4000000000, 0xb5e1185a00000000, + 0x2960e5c300000000, 0x12e8f6b100000000, 0x8e690b2800000000, + 0x29eb0e3200000000, 0xb56af3ab00000000, 0x67ee050600000000, + 0xfb6ff89f00000000, 0x5cedfd8500000000, 0xc06c001c00000000, + 0xcca96c4100000000, 0x502891d800000000, 0xf7aa94c200000000, + 0x6b2b695b00000000, 0xb9af9ff600000000, 0x252e626f00000000, + 0x82ac677500000000, 0x1e2d9aec00000000, 0x25a5899e00000000, + 0xb924740700000000, 0x1ea6711d00000000, 0x82278c8400000000, + 0x50a37a2900000000, 0xcc2287b000000000, 0x6ba082aa00000000, + 0xf7217f3300000000, 0x1db0a54e00000000, 0x813158d700000000, + 0x26b35dcd00000000, 0xba32a05400000000, 0x68b656f900000000, + 0xf437ab6000000000, 0x53b5ae7a00000000, 0xcf3453e300000000, + 0xf4bc409100000000, 0x683dbd0800000000, 0xcfbfb81200000000, + 0x533e458b00000000, 0x81bab32600000000, 0x1d3b4ebf00000000, + 0xbab94ba500000000, 0x2638b63c00000000, 0x6e9afe5e00000000, + 0xf21b03c700000000, 0x559906dd00000000, 0xc918fb4400000000, + 0x1b9c0de900000000, 0x871df07000000000, 0x209ff56a00000000, + 0xbc1e08f300000000, 0x87961b8100000000, 0x1b17e61800000000, + 0xbc95e30200000000, 0x20141e9b00000000, 0xf290e83600000000, + 0x6e1115af00000000, 0xc99310b500000000, 0x5512ed2c00000000, + 0xbf83375100000000, 0x2302cac800000000, 0x8480cfd200000000, + 0x1801324b00000000, 0xca85c4e600000000, 0x5604397f00000000, + 0xf1863c6500000000, 0x6d07c1fc00000000, 0x568fd28e00000000, + 0xca0e2f1700000000, 0x6d8c2a0d00000000, 0xf10dd79400000000, + 0x2389213900000000, 0xbf08dca000000000, 0x188ad9ba00000000, + 0x840b242300000000}, + {0x0000000000000000, 0x8161594700000000, 0x02c3b28e00000000, + 0x83a2ebc900000000, 0x078666ad00000000, 0x86e73fea00000000, + 0x0545d42300000000, 0x84248d6400000000, 0x0d0cceea00000000, + 0x8c6d97ad00000000, 0x0fcf7c6400000000, 0x8eae252300000000, + 0x0a8aa84700000000, 0x8bebf10000000000, 0x08491ac900000000, + 0x8928438e00000000, 0x19189f6500000000, 0x9879c62200000000, + 0x1bdb2deb00000000, 0x9aba74ac00000000, 0x1e9ef9c800000000, + 0x9fffa08f00000000, 0x1c5d4b4600000000, 0x9d3c120100000000, + 0x1414518f00000000, 0x957508c800000000, 0x16d7e30100000000, + 0x97b6ba4600000000, 0x1392372200000000, 0x92f36e6500000000, + 0x115185ac00000000, 0x9030dceb00000000, 0x32303ecb00000000, + 0xb351678c00000000, 0x30f38c4500000000, 0xb192d50200000000, + 0x35b6586600000000, 0xb4d7012100000000, 0x3775eae800000000, + 0xb614b3af00000000, 0x3f3cf02100000000, 0xbe5da96600000000, + 0x3dff42af00000000, 0xbc9e1be800000000, 0x38ba968c00000000, + 0xb9dbcfcb00000000, 0x3a79240200000000, 0xbb187d4500000000, + 0x2b28a1ae00000000, 0xaa49f8e900000000, 0x29eb132000000000, + 0xa88a4a6700000000, 0x2caec70300000000, 0xadcf9e4400000000, + 0x2e6d758d00000000, 0xaf0c2cca00000000, 0x26246f4400000000, + 0xa745360300000000, 0x24e7ddca00000000, 0xa586848d00000000, + 0x21a209e900000000, 0xa0c350ae00000000, 0x2361bb6700000000, + 0xa200e22000000000, 0x67607f2600000000, 0xe601266100000000, + 0x65a3cda800000000, 0xe4c294ef00000000, 0x60e6198b00000000, + 0xe18740cc00000000, 0x6225ab0500000000, 0xe344f24200000000, + 0x6a6cb1cc00000000, 0xeb0de88b00000000, 0x68af034200000000, + 0xe9ce5a0500000000, 0x6dead76100000000, 0xec8b8e2600000000, + 0x6f2965ef00000000, 0xee483ca800000000, 0x7e78e04300000000, + 0xff19b90400000000, 0x7cbb52cd00000000, 0xfdda0b8a00000000, + 0x79fe86ee00000000, 0xf89fdfa900000000, 0x7b3d346000000000, + 0xfa5c6d2700000000, 0x73742ea900000000, 0xf21577ee00000000, + 0x71b79c2700000000, 0xf0d6c56000000000, 0x74f2480400000000, + 0xf593114300000000, 0x7631fa8a00000000, 0xf750a3cd00000000, + 0x555041ed00000000, 0xd43118aa00000000, 0x5793f36300000000, + 0xd6f2aa2400000000, 0x52d6274000000000, 0xd3b77e0700000000, + 0x501595ce00000000, 0xd174cc8900000000, 0x585c8f0700000000, + 0xd93dd64000000000, 0x5a9f3d8900000000, 0xdbfe64ce00000000, + 0x5fdae9aa00000000, 0xdebbb0ed00000000, 0x5d195b2400000000, + 0xdc78026300000000, 0x4c48de8800000000, 0xcd2987cf00000000, + 0x4e8b6c0600000000, 0xcfea354100000000, 0x4bceb82500000000, + 0xcaafe16200000000, 0x490d0aab00000000, 0xc86c53ec00000000, + 0x4144106200000000, 0xc025492500000000, 0x4387a2ec00000000, + 0xc2e6fbab00000000, 0x46c276cf00000000, 0xc7a32f8800000000, + 0x4401c44100000000, 0xc5609d0600000000, 0xcec0fe4c00000000, + 0x4fa1a70b00000000, 0xcc034cc200000000, 0x4d62158500000000, + 0xc94698e100000000, 0x4827c1a600000000, 0xcb852a6f00000000, + 0x4ae4732800000000, 0xc3cc30a600000000, 0x42ad69e100000000, + 0xc10f822800000000, 0x406edb6f00000000, 0xc44a560b00000000, + 0x452b0f4c00000000, 0xc689e48500000000, 0x47e8bdc200000000, + 0xd7d8612900000000, 0x56b9386e00000000, 0xd51bd3a700000000, + 0x547a8ae000000000, 0xd05e078400000000, 0x513f5ec300000000, + 0xd29db50a00000000, 0x53fcec4d00000000, 0xdad4afc300000000, + 0x5bb5f68400000000, 0xd8171d4d00000000, 0x5976440a00000000, + 0xdd52c96e00000000, 0x5c33902900000000, 0xdf917be000000000, + 0x5ef022a700000000, 0xfcf0c08700000000, 0x7d9199c000000000, + 0xfe33720900000000, 0x7f522b4e00000000, 0xfb76a62a00000000, + 0x7a17ff6d00000000, 0xf9b514a400000000, 0x78d44de300000000, + 0xf1fc0e6d00000000, 0x709d572a00000000, 0xf33fbce300000000, + 0x725ee5a400000000, 0xf67a68c000000000, 0x771b318700000000, + 0xf4b9da4e00000000, 0x75d8830900000000, 0xe5e85fe200000000, + 0x648906a500000000, 0xe72bed6c00000000, 0x664ab42b00000000, + 0xe26e394f00000000, 0x630f600800000000, 0xe0ad8bc100000000, + 0x61ccd28600000000, 0xe8e4910800000000, 0x6985c84f00000000, + 0xea27238600000000, 0x6b467ac100000000, 0xef62f7a500000000, + 0x6e03aee200000000, 0xeda1452b00000000, 0x6cc01c6c00000000, + 0xa9a0816a00000000, 0x28c1d82d00000000, 0xab6333e400000000, + 0x2a026aa300000000, 0xae26e7c700000000, 0x2f47be8000000000, + 0xace5554900000000, 0x2d840c0e00000000, 0xa4ac4f8000000000, + 0x25cd16c700000000, 0xa66ffd0e00000000, 0x270ea44900000000, + 0xa32a292d00000000, 0x224b706a00000000, 0xa1e99ba300000000, + 0x2088c2e400000000, 0xb0b81e0f00000000, 0x31d9474800000000, + 0xb27bac8100000000, 0x331af5c600000000, 0xb73e78a200000000, + 0x365f21e500000000, 0xb5fdca2c00000000, 0x349c936b00000000, + 0xbdb4d0e500000000, 0x3cd589a200000000, 0xbf77626b00000000, + 0x3e163b2c00000000, 0xba32b64800000000, 0x3b53ef0f00000000, + 0xb8f104c600000000, 0x39905d8100000000, 0x9b90bfa100000000, + 0x1af1e6e600000000, 0x99530d2f00000000, 0x1832546800000000, + 0x9c16d90c00000000, 0x1d77804b00000000, 0x9ed56b8200000000, + 0x1fb432c500000000, 0x969c714b00000000, 0x17fd280c00000000, + 0x945fc3c500000000, 0x153e9a8200000000, 0x911a17e600000000, + 0x107b4ea100000000, 0x93d9a56800000000, 0x12b8fc2f00000000, + 0x828820c400000000, 0x03e9798300000000, 0x804b924a00000000, + 0x012acb0d00000000, 0x850e466900000000, 0x046f1f2e00000000, + 0x87cdf4e700000000, 0x06acada000000000, 0x8f84ee2e00000000, + 0x0ee5b76900000000, 0x8d475ca000000000, 0x0c2605e700000000, + 0x8802888300000000, 0x0963d1c400000000, 0x8ac13a0d00000000, + 0x0ba0634a00000000}}; + +#else /* W == 4 */ + +static const crc_t crc_braid_table[][256] = { + {0x00000000, 0x51010001, 0xa2020002, 0xf3030003, 0xf4070007, + 0xa5060006, 0x56050005, 0x07040004, 0x580d000d, 0x090c000c, + 0xfa0f000f, 0xab0e000e, 0xac0a000a, 0xfd0b000b, 0x0e080008, + 0x5f090009, 0xb01a001a, 0xe11b001b, 0x12180018, 0x43190019, + 0x441d001d, 0x151c001c, 0xe61f001f, 0xb71e001e, 0xe8170017, + 0xb9160016, 0x4a150015, 0x1b140014, 0x1c100010, 0x4d110011, + 0xbe120012, 0xef130013, 0xd0370037, 0x81360036, 0x72350035, + 0x23340034, 0x24300030, 0x75310031, 0x86320032, 0xd7330033, + 0x883a003a, 0xd93b003b, 0x2a380038, 0x7b390039, 0x7c3d003d, + 0x2d3c003c, 0xde3f003f, 0x8f3e003e, 0x602d002d, 0x312c002c, + 0xc22f002f, 0x932e002e, 0x942a002a, 0xc52b002b, 0x36280028, + 0x67290029, 0x38200020, 0x69210021, 0x9a220022, 0xcb230023, + 0xcc270027, 0x9d260026, 0x6e250025, 0x3f240024, 0x106d006d, + 0x416c006c, 0xb26f006f, 0xe36e006e, 0xe46a006a, 0xb56b006b, + 0x46680068, 0x17690069, 0x48600060, 0x19610061, 0xea620062, + 0xbb630063, 0xbc670067, 0xed660066, 0x1e650065, 0x4f640064, + 0xa0770077, 0xf1760076, 0x02750075, 0x53740074, 0x54700070, + 0x05710071, 0xf6720072, 0xa7730073, 0xf87a007a, 0xa97b007b, + 0x5a780078, 0x0b790079, 0x0c7d007d, 0x5d7c007c, 0xae7f007f, + 0xff7e007e, 0xc05a005a, 0x915b005b, 0x62580058, 0x33590059, + 0x345d005d, 0x655c005c, 0x965f005f, 0xc75e005e, 0x98570057, + 0xc9560056, 0x3a550055, 0x6b540054, 0x6c500050, 0x3d510051, + 0xce520052, 0x9f530053, 0x70400040, 0x21410041, 0xd2420042, + 0x83430043, 0x84470047, 0xd5460046, 0x26450045, 0x77440044, + 0x284d004d, 0x794c004c, 0x8a4f004f, 0xdb4e004e, 0xdc4a004a, + 0x8d4b004b, 0x7e480048, 0x2f490049, 0x20da00da, 0x71db00db, + 0x82d800d8, 0xd3d900d9, 0xd4dd00dd, 0x85dc00dc, 0x76df00df, + 0x27de00de, 0x78d700d7, 0x29d600d6, 0xdad500d5, 0x8bd400d4, + 0x8cd000d0, 0xddd100d1, 0x2ed200d2, 0x7fd300d3, 0x90c000c0, + 0xc1c100c1, 0x32c200c2, 0x63c300c3, 0x64c700c7, 0x35c600c6, + 0xc6c500c5, 0x97c400c4, 0xc8cd00cd, 0x99cc00cc, 0x6acf00cf, + 0x3bce00ce, 0x3cca00ca, 0x6dcb00cb, 0x9ec800c8, 0xcfc900c9, + 0xf0ed00ed, 0xa1ec00ec, 0x52ef00ef, 0x03ee00ee, 0x04ea00ea, + 0x55eb00eb, 0xa6e800e8, 0xf7e900e9, 0xa8e000e0, 0xf9e100e1, + 0x0ae200e2, 0x5be300e3, 0x5ce700e7, 0x0de600e6, 0xfee500e5, + 0xafe400e4, 0x40f700f7, 0x11f600f6, 0xe2f500f5, 0xb3f400f4, + 0xb4f000f0, 0xe5f100f1, 0x16f200f2, 0x47f300f3, 0x18fa00fa, + 0x49fb00fb, 0xbaf800f8, 0xebf900f9, 0xecfd00fd, 0xbdfc00fc, + 0x4eff00ff, 0x1ffe00fe, 0x30b700b7, 0x61b600b6, 0x92b500b5, + 0xc3b400b4, 0xc4b000b0, 0x95b100b1, 0x66b200b2, 0x37b300b3, + 0x68ba00ba, 0x39bb00bb, 0xcab800b8, 0x9bb900b9, 0x9cbd00bd, + 0xcdbc00bc, 0x3ebf00bf, 0x6fbe00be, 0x80ad00ad, 0xd1ac00ac, + 0x22af00af, 0x73ae00ae, 0x74aa00aa, 0x25ab00ab, 0xd6a800a8, + 0x87a900a9, 0xd8a000a0, 0x89a100a1, 0x7aa200a2, 0x2ba300a3, + 0x2ca700a7, 0x7da600a6, 0x8ea500a5, 0xdfa400a4, 0xe0800080, + 0xb1810081, 0x42820082, 0x13830083, 0x14870087, 0x45860086, + 0xb6850085, 0xe7840084, 0xb88d008d, 0xe98c008c, 0x1a8f008f, + 0x4b8e008e, 0x4c8a008a, 0x1d8b008b, 0xee880088, 0xbf890089, + 0x509a009a, 0x019b009b, 0xf2980098, 0xa3990099, 0xa49d009d, + 0xf59c009c, 0x069f009f, 0x579e009e, 0x08970097, 0x59960096, + 0xaa950095, 0xfb940094, 0xfc900090, 0xad910091, 0x5e920092, + 0x0f930093}, + {0x00000000, 0x41b401b4, 0x83680368, 0xc2dc02dc, 0xb6d306d3, + 0xf7670767, 0x35bb05bb, 0x740f040f, 0xdda50da5, 0x9c110c11, + 0x5ecd0ecd, 0x1f790f79, 0x6b760b76, 0x2ac20ac2, 0xe81e081e, + 0xa9aa09aa, 0x0b491b49, 0x4afd1afd, 0x88211821, 0xc9951995, + 0xbd9a1d9a, 0xfc2e1c2e, 0x3ef21ef2, 0x7f461f46, 0xd6ec16ec, + 0x97581758, 0x55841584, 0x14301430, 0x603f103f, 0x218b118b, + 0xe3571357, 0xa2e312e3, 0x16923692, 0x57263726, 0x95fa35fa, + 0xd44e344e, 0xa0413041, 0xe1f531f5, 0x23293329, 0x629d329d, + 0xcb373b37, 0x8a833a83, 0x485f385f, 0x09eb39eb, 0x7de43de4, + 0x3c503c50, 0xfe8c3e8c, 0xbf383f38, 0x1ddb2ddb, 0x5c6f2c6f, + 0x9eb32eb3, 0xdf072f07, 0xab082b08, 0xeabc2abc, 0x28602860, + 0x69d429d4, 0xc07e207e, 0x81ca21ca, 0x43162316, 0x02a222a2, + 0x76ad26ad, 0x37192719, 0xf5c525c5, 0xb4712471, 0x2d246d24, + 0x6c906c90, 0xae4c6e4c, 0xeff86ff8, 0x9bf76bf7, 0xda436a43, + 0x189f689f, 0x592b692b, 0xf0816081, 0xb1356135, 0x73e963e9, + 0x325d625d, 0x46526652, 0x07e667e6, 0xc53a653a, 0x848e648e, + 0x266d766d, 0x67d977d9, 0xa5057505, 0xe4b174b1, 0x90be70be, + 0xd10a710a, 0x13d673d6, 0x52627262, 0xfbc87bc8, 0xba7c7a7c, + 0x78a078a0, 0x39147914, 0x4d1b7d1b, 0x0caf7caf, 0xce737e73, + 0x8fc77fc7, 0x3bb65bb6, 0x7a025a02, 0xb8de58de, 0xf96a596a, + 0x8d655d65, 0xccd15cd1, 0x0e0d5e0d, 0x4fb95fb9, 0xe6135613, + 0xa7a757a7, 0x657b557b, 0x24cf54cf, 0x50c050c0, 0x11745174, + 0xd3a853a8, 0x921c521c, 0x30ff40ff, 0x714b414b, 0xb3974397, + 0xf2234223, 0x862c462c, 0xc7984798, 0x05444544, 0x44f044f0, + 0xed5a4d5a, 0xacee4cee, 0x6e324e32, 0x2f864f86, 0x5b894b89, + 0x1a3d4a3d, 0xd8e148e1, 0x99554955, 0x5a48da48, 0x1bfcdbfc, + 0xd920d920, 0x9894d894, 0xec9bdc9b, 0xad2fdd2f, 0x6ff3dff3, + 0x2e47de47, 0x87edd7ed, 0xc659d659, 0x0485d485, 0x4531d531, + 0x313ed13e, 0x708ad08a, 0xb256d256, 0xf3e2d3e2, 0x5101c101, + 0x10b5c0b5, 0xd269c269, 0x93ddc3dd, 0xe7d2c7d2, 0xa666c666, + 0x64bac4ba, 0x250ec50e, 0x8ca4cca4, 0xcd10cd10, 0x0fcccfcc, + 0x4e78ce78, 0x3a77ca77, 0x7bc3cbc3, 0xb91fc91f, 0xf8abc8ab, + 0x4cdaecda, 0x0d6eed6e, 0xcfb2efb2, 0x8e06ee06, 0xfa09ea09, + 0xbbbdebbd, 0x7961e961, 0x38d5e8d5, 0x917fe17f, 0xd0cbe0cb, + 0x1217e217, 0x53a3e3a3, 0x27ace7ac, 0x6618e618, 0xa4c4e4c4, + 0xe570e570, 0x4793f793, 0x0627f627, 0xc4fbf4fb, 0x854ff54f, + 0xf140f140, 0xb0f4f0f4, 0x7228f228, 0x339cf39c, 0x9a36fa36, + 0xdb82fb82, 0x195ef95e, 0x58eaf8ea, 0x2ce5fce5, 0x6d51fd51, + 0xaf8dff8d, 0xee39fe39, 0x776cb76c, 0x36d8b6d8, 0xf404b404, + 0xb5b0b5b0, 0xc1bfb1bf, 0x800bb00b, 0x42d7b2d7, 0x0363b363, + 0xaac9bac9, 0xeb7dbb7d, 0x29a1b9a1, 0x6815b815, 0x1c1abc1a, + 0x5daebdae, 0x9f72bf72, 0xdec6bec6, 0x7c25ac25, 0x3d91ad91, + 0xff4daf4d, 0xbef9aef9, 0xcaf6aaf6, 0x8b42ab42, 0x499ea99e, + 0x082aa82a, 0xa180a180, 0xe034a034, 0x22e8a2e8, 0x635ca35c, + 0x1753a753, 0x56e7a6e7, 0x943ba43b, 0xd58fa58f, 0x61fe81fe, + 0x204a804a, 0xe2968296, 0xa3228322, 0xd72d872d, 0x96998699, + 0x54458445, 0x15f185f1, 0xbc5b8c5b, 0xfdef8def, 0x3f338f33, + 0x7e878e87, 0x0a888a88, 0x4b3c8b3c, 0x89e089e0, 0xc8548854, + 0x6ab79ab7, 0x2b039b03, 0xe9df99df, 0xa86b986b, 0xdc649c64, + 0x9dd09dd0, 0x5f0c9f0c, 0x1eb89eb8, 0xb7129712, 0xf6a696a6, + 0x347a947a, 0x75ce95ce, 0x01c191c1, 0x40759075, 0x82a992a9, + 0xc31d931d}, + {0x00000000, 0xb491b490, 0xd9206923, 0x6db1ddb3, 0x0243d245, + 0xb6d266d5, 0xdb63bb66, 0x6ff20ff6, 0x0487a48a, 0xb016101a, + 0xdda7cda9, 0x69367939, 0x06c476cf, 0xb255c25f, 0xdfe41fec, + 0x6b75ab7c, 0x090f4914, 0xbd9efd84, 0xd02f2037, 0x64be94a7, + 0x0b4c9b51, 0xbfdd2fc1, 0xd26cf272, 0x66fd46e2, 0x0d88ed9e, + 0xb919590e, 0xd4a884bd, 0x6039302d, 0x0fcb3fdb, 0xbb5a8b4b, + 0xd6eb56f8, 0x627ae268, 0x121e9228, 0xa68f26b8, 0xcb3efb0b, + 0x7faf4f9b, 0x105d406d, 0xa4ccf4fd, 0xc97d294e, 0x7dec9dde, + 0x169936a2, 0xa2088232, 0xcfb95f81, 0x7b28eb11, 0x14dae4e7, + 0xa04b5077, 0xcdfa8dc4, 0x796b3954, 0x1b11db3c, 0xaf806fac, + 0xc231b21f, 0x76a0068f, 0x19520979, 0xadc3bde9, 0xc072605a, + 0x74e3d4ca, 0x1f967fb6, 0xab07cb26, 0xc6b61695, 0x7227a205, + 0x1dd5adf3, 0xa9441963, 0xc4f5c4d0, 0x70647040, 0x243d2450, + 0x90ac90c0, 0xfd1d4d73, 0x498cf9e3, 0x267ef615, 0x92ef4285, + 0xff5e9f36, 0x4bcf2ba6, 0x20ba80da, 0x942b344a, 0xf99ae9f9, + 0x4d0b5d69, 0x22f9529f, 0x9668e60f, 0xfbd93bbc, 0x4f488f2c, + 0x2d326d44, 0x99a3d9d4, 0xf4120467, 0x4083b0f7, 0x2f71bf01, + 0x9be00b91, 0xf651d622, 0x42c062b2, 0x29b5c9ce, 0x9d247d5e, + 0xf095a0ed, 0x4404147d, 0x2bf61b8b, 0x9f67af1b, 0xf2d672a8, + 0x4647c638, 0x3623b678, 0x82b202e8, 0xef03df5b, 0x5b926bcb, + 0x3460643d, 0x80f1d0ad, 0xed400d1e, 0x59d1b98e, 0x32a412f2, + 0x8635a662, 0xeb847bd1, 0x5f15cf41, 0x30e7c0b7, 0x84767427, + 0xe9c7a994, 0x5d561d04, 0x3f2cff6c, 0x8bbd4bfc, 0xe60c964f, + 0x529d22df, 0x3d6f2d29, 0x89fe99b9, 0xe44f440a, 0x50def09a, + 0x3bab5be6, 0x8f3aef76, 0xe28b32c5, 0x561a8655, 0x39e889a3, + 0x8d793d33, 0xe0c8e080, 0x54595410, 0x487a48a0, 0xfcebfc30, + 0x915a2183, 0x25cb9513, 0x4a399ae5, 0xfea82e75, 0x9319f3c6, + 0x27884756, 0x4cfdec2a, 0xf86c58ba, 0x95dd8509, 0x214c3199, + 0x4ebe3e6f, 0xfa2f8aff, 0x979e574c, 0x230fe3dc, 0x417501b4, + 0xf5e4b524, 0x98556897, 0x2cc4dc07, 0x4336d3f1, 0xf7a76761, + 0x9a16bad2, 0x2e870e42, 0x45f2a53e, 0xf16311ae, 0x9cd2cc1d, + 0x2843788d, 0x47b1777b, 0xf320c3eb, 0x9e911e58, 0x2a00aac8, + 0x5a64da88, 0xeef56e18, 0x8344b3ab, 0x37d5073b, 0x582708cd, + 0xecb6bc5d, 0x810761ee, 0x3596d57e, 0x5ee37e02, 0xea72ca92, + 0x87c31721, 0x3352a3b1, 0x5ca0ac47, 0xe83118d7, 0x8580c564, + 0x311171f4, 0x536b939c, 0xe7fa270c, 0x8a4bfabf, 0x3eda4e2f, + 0x512841d9, 0xe5b9f549, 0x880828fa, 0x3c999c6a, 0x57ec3716, + 0xe37d8386, 0x8ecc5e35, 0x3a5deaa5, 0x55afe553, 0xe13e51c3, + 0x8c8f8c70, 0x381e38e0, 0x6c476cf0, 0xd8d6d860, 0xb56705d3, + 0x01f6b143, 0x6e04beb5, 0xda950a25, 0xb724d796, 0x03b56306, + 0x68c0c87a, 0xdc517cea, 0xb1e0a159, 0x057115c9, 0x6a831a3f, + 0xde12aeaf, 0xb3a3731c, 0x0732c78c, 0x654825e4, 0xd1d99174, + 0xbc684cc7, 0x08f9f857, 0x670bf7a1, 0xd39a4331, 0xbe2b9e82, + 0x0aba2a12, 0x61cf816e, 0xd55e35fe, 0xb8efe84d, 0x0c7e5cdd, + 0x638c532b, 0xd71de7bb, 0xbaac3a08, 0x0e3d8e98, 0x7e59fed8, + 0xcac84a48, 0xa77997fb, 0x13e8236b, 0x7c1a2c9d, 0xc88b980d, + 0xa53a45be, 0x11abf12e, 0x7ade5a52, 0xce4feec2, 0xa3fe3371, + 0x176f87e1, 0x789d8817, 0xcc0c3c87, 0xa1bde134, 0x152c55a4, + 0x7756b7cc, 0xc3c7035c, 0xae76deef, 0x1ae76a7f, 0x75156589, + 0xc184d119, 0xac350caa, 0x18a4b83a, 0x73d11346, 0xc740a7d6, + 0xaaf17a65, 0x1e60cef5, 0x7192c103, 0xc5037593, 0xa8b2a820, + 0x1c231cb0}, + {0x00000000, 0x90f49140, 0x91ea2283, 0x011eb3c3, 0x93d74505, + 0x0323d445, 0x023d6786, 0x92c9f6c6, 0x97ad8a09, 0x07591b49, + 0x0647a88a, 0x96b339ca, 0x047acf0c, 0x948e5e4c, 0x9590ed8f, + 0x05647ccf, 0x9f581411, 0x0fac8551, 0x0eb23692, 0x9e46a7d2, + 0x0c8f5114, 0x9c7bc054, 0x9d657397, 0x0d91e2d7, 0x08f59e18, + 0x98010f58, 0x991fbc9b, 0x09eb2ddb, 0x9b22db1d, 0x0bd64a5d, + 0x0ac8f99e, 0x9a3c68de, 0x8eb32821, 0x1e47b961, 0x1f590aa2, + 0x8fad9be2, 0x1d646d24, 0x8d90fc64, 0x8c8e4fa7, 0x1c7adee7, + 0x191ea228, 0x89ea3368, 0x88f480ab, 0x180011eb, 0x8ac9e72d, + 0x1a3d766d, 0x1b23c5ae, 0x8bd754ee, 0x11eb3c30, 0x811fad70, + 0x80011eb3, 0x10f58ff3, 0x823c7935, 0x12c8e875, 0x13d65bb6, + 0x8322caf6, 0x8646b639, 0x16b22779, 0x17ac94ba, 0x875805fa, + 0x1591f33c, 0x8565627c, 0x847bd1bf, 0x148f40ff, 0xad655041, + 0x3d91c101, 0x3c8f72c2, 0xac7be382, 0x3eb21544, 0xae468404, + 0xaf5837c7, 0x3faca687, 0x3ac8da48, 0xaa3c4b08, 0xab22f8cb, + 0x3bd6698b, 0xa91f9f4d, 0x39eb0e0d, 0x38f5bdce, 0xa8012c8e, + 0x323d4450, 0xa2c9d510, 0xa3d766d3, 0x3323f793, 0xa1ea0155, + 0x311e9015, 0x300023d6, 0xa0f4b296, 0xa590ce59, 0x35645f19, + 0x347aecda, 0xa48e7d9a, 0x36478b5c, 0xa6b31a1c, 0xa7ada9df, + 0x3759389f, 0x23d67860, 0xb322e920, 0xb23c5ae3, 0x22c8cba3, + 0xb0013d65, 0x20f5ac25, 0x21eb1fe6, 0xb11f8ea6, 0xb47bf269, + 0x248f6329, 0x2591d0ea, 0xb56541aa, 0x27acb76c, 0xb758262c, + 0xb64695ef, 0x26b204af, 0xbc8e6c71, 0x2c7afd31, 0x2d644ef2, + 0xbd90dfb2, 0x2f592974, 0xbfadb834, 0xbeb30bf7, 0x2e479ab7, + 0x2b23e678, 0xbbd77738, 0xbac9c4fb, 0x2a3d55bb, 0xb8f4a37d, + 0x2800323d, 0x291e81fe, 0xb9ea10be, 0xeac9a081, 0x7a3d31c1, + 0x7b238202, 0xebd71342, 0x791ee584, 0xe9ea74c4, 0xe8f4c707, + 0x78005647, 0x7d642a88, 0xed90bbc8, 0xec8e080b, 0x7c7a994b, + 0xeeb36f8d, 0x7e47fecd, 0x7f594d0e, 0xefaddc4e, 0x7591b490, + 0xe56525d0, 0xe47b9613, 0x748f0753, 0xe646f195, 0x76b260d5, + 0x77acd316, 0xe7584256, 0xe23c3e99, 0x72c8afd9, 0x73d61c1a, + 0xe3228d5a, 0x71eb7b9c, 0xe11feadc, 0xe001591f, 0x70f5c85f, + 0x647a88a0, 0xf48e19e0, 0xf590aa23, 0x65643b63, 0xf7adcda5, + 0x67595ce5, 0x6647ef26, 0xf6b37e66, 0xf3d702a9, 0x632393e9, + 0x623d202a, 0xf2c9b16a, 0x600047ac, 0xf0f4d6ec, 0xf1ea652f, + 0x611ef46f, 0xfb229cb1, 0x6bd60df1, 0x6ac8be32, 0xfa3c2f72, + 0x68f5d9b4, 0xf80148f4, 0xf91ffb37, 0x69eb6a77, 0x6c8f16b8, + 0xfc7b87f8, 0xfd65343b, 0x6d91a57b, 0xff5853bd, 0x6facc2fd, + 0x6eb2713e, 0xfe46e07e, 0x47acf0c0, 0xd7586180, 0xd646d243, + 0x46b24303, 0xd47bb5c5, 0x448f2485, 0x45919746, 0xd5650606, + 0xd0017ac9, 0x40f5eb89, 0x41eb584a, 0xd11fc90a, 0x43d63fcc, + 0xd322ae8c, 0xd23c1d4f, 0x42c88c0f, 0xd8f4e4d1, 0x48007591, + 0x491ec652, 0xd9ea5712, 0x4b23a1d4, 0xdbd73094, 0xdac98357, + 0x4a3d1217, 0x4f596ed8, 0xdfadff98, 0xdeb34c5b, 0x4e47dd1b, + 0xdc8e2bdd, 0x4c7aba9d, 0x4d64095e, 0xdd90981e, 0xc91fd8e1, + 0x59eb49a1, 0x58f5fa62, 0xc8016b22, 0x5ac89de4, 0xca3c0ca4, + 0xcb22bf67, 0x5bd62e27, 0x5eb252e8, 0xce46c3a8, 0xcf58706b, + 0x5face12b, 0xcd6517ed, 0x5d9186ad, 0x5c8f356e, 0xcc7ba42e, + 0x5647ccf0, 0xc6b35db0, 0xc7adee73, 0x57597f33, 0xc59089f5, + 0x556418b5, 0x547aab76, 0xc48e3a36, 0xc1ea46f9, 0x511ed7b9, + 0x5000647a, 0xc0f4f53a, 0x523d03fc, 0xc2c992bc, 0xc3d7217f, + 0x5323b03f}}; + +static const word_t crc_braid_big_table[][256] = { + {0x00000000, 0x4091f490, 0x8322ea91, 0xc3b31e01, 0x0545d793, + 0x45d42303, 0x86673d02, 0xc6f6c992, 0x098aad97, 0x491b5907, + 0x8aa84706, 0xca39b396, 0x0ccf7a04, 0x4c5e8e94, 0x8fed9095, + 0xcf7c6405, 0x1114589f, 0x5185ac0f, 0x9236b20e, 0xd2a7469e, + 0x14518f0c, 0x54c07b9c, 0x9773659d, 0xd7e2910d, 0x189ef508, + 0x580f0198, 0x9bbc1f99, 0xdb2deb09, 0x1ddb229b, 0x5d4ad60b, + 0x9ef9c80a, 0xde683c9a, 0x2128b38e, 0x61b9471e, 0xa20a591f, + 0xe29bad8f, 0x246d641d, 0x64fc908d, 0xa74f8e8c, 0xe7de7a1c, + 0x28a21e19, 0x6833ea89, 0xab80f488, 0xeb110018, 0x2de7c98a, + 0x6d763d1a, 0xaec5231b, 0xee54d78b, 0x303ceb11, 0x70ad1f81, + 0xb31e0180, 0xf38ff510, 0x35793c82, 0x75e8c812, 0xb65bd613, + 0xf6ca2283, 0x39b64686, 0x7927b216, 0xba94ac17, 0xfa055887, + 0x3cf39115, 0x7c626585, 0xbfd17b84, 0xff408f14, 0x415065ad, + 0x01c1913d, 0xc2728f3c, 0x82e37bac, 0x4415b23e, 0x048446ae, + 0xc73758af, 0x87a6ac3f, 0x48dac83a, 0x084b3caa, 0xcbf822ab, + 0x8b69d63b, 0x4d9f1fa9, 0x0d0eeb39, 0xcebdf538, 0x8e2c01a8, + 0x50443d32, 0x10d5c9a2, 0xd366d7a3, 0x93f72333, 0x5501eaa1, + 0x15901e31, 0xd6230030, 0x96b2f4a0, 0x59ce90a5, 0x195f6435, + 0xdaec7a34, 0x9a7d8ea4, 0x5c8b4736, 0x1c1ab3a6, 0xdfa9ada7, + 0x9f385937, 0x6078d623, 0x20e922b3, 0xe35a3cb2, 0xa3cbc822, + 0x653d01b0, 0x25acf520, 0xe61feb21, 0xa68e1fb1, 0x69f27bb4, + 0x29638f24, 0xead09125, 0xaa4165b5, 0x6cb7ac27, 0x2c2658b7, + 0xef9546b6, 0xaf04b226, 0x716c8ebc, 0x31fd7a2c, 0xf24e642d, + 0xb2df90bd, 0x7429592f, 0x34b8adbf, 0xf70bb3be, 0xb79a472e, + 0x78e6232b, 0x3877d7bb, 0xfbc4c9ba, 0xbb553d2a, 0x7da3f4b8, + 0x3d320028, 0xfe811e29, 0xbe10eab9, 0x81a0c9ea, 0xc1313d7a, + 0x0282237b, 0x4213d7eb, 0x84e51e79, 0xc474eae9, 0x07c7f4e8, + 0x47560078, 0x882a647d, 0xc8bb90ed, 0x0b088eec, 0x4b997a7c, + 0x8d6fb3ee, 0xcdfe477e, 0x0e4d597f, 0x4edcadef, 0x90b49175, + 0xd02565e5, 0x13967be4, 0x53078f74, 0x95f146e6, 0xd560b276, + 0x16d3ac77, 0x564258e7, 0x993e3ce2, 0xd9afc872, 0x1a1cd673, + 0x5a8d22e3, 0x9c7beb71, 0xdcea1fe1, 0x1f5901e0, 0x5fc8f570, + 0xa0887a64, 0xe0198ef4, 0x23aa90f5, 0x633b6465, 0xa5cdadf7, + 0xe55c5967, 0x26ef4766, 0x667eb3f6, 0xa902d7f3, 0xe9932363, + 0x2a203d62, 0x6ab1c9f2, 0xac470060, 0xecd6f4f0, 0x2f65eaf1, + 0x6ff41e61, 0xb19c22fb, 0xf10dd66b, 0x32bec86a, 0x722f3cfa, + 0xb4d9f568, 0xf44801f8, 0x37fb1ff9, 0x776aeb69, 0xb8168f6c, + 0xf8877bfc, 0x3b3465fd, 0x7ba5916d, 0xbd5358ff, 0xfdc2ac6f, + 0x3e71b26e, 0x7ee046fe, 0xc0f0ac47, 0x806158d7, 0x43d246d6, + 0x0343b246, 0xc5b57bd4, 0x85248f44, 0x46979145, 0x060665d5, + 0xc97a01d0, 0x89ebf540, 0x4a58eb41, 0x0ac91fd1, 0xcc3fd643, + 0x8cae22d3, 0x4f1d3cd2, 0x0f8cc842, 0xd1e4f4d8, 0x91750048, + 0x52c61e49, 0x1257ead9, 0xd4a1234b, 0x9430d7db, 0x5783c9da, + 0x17123d4a, 0xd86e594f, 0x98ffaddf, 0x5b4cb3de, 0x1bdd474e, + 0xdd2b8edc, 0x9dba7a4c, 0x5e09644d, 0x1e9890dd, 0xe1d81fc9, + 0xa149eb59, 0x62faf558, 0x226b01c8, 0xe49dc85a, 0xa40c3cca, + 0x67bf22cb, 0x272ed65b, 0xe852b25e, 0xa8c346ce, 0x6b7058cf, + 0x2be1ac5f, 0xed1765cd, 0xad86915d, 0x6e358f5c, 0x2ea47bcc, + 0xf0cc4756, 0xb05db3c6, 0x73eeadc7, 0x337f5957, 0xf58990c5, + 0xb5186455, 0x76ab7a54, 0x363a8ec4, 0xf946eac1, 0xb9d71e51, + 0x7a640050, 0x3af5f4c0, 0xfc033d52, 0xbc92c9c2, 0x7f21d7c3, + 0x3fb02353}, + {0x00000000, 0x90b491b4, 0x236920d9, 0xb3ddb16d, 0x45d24302, + 0xd566d2b6, 0x66bb63db, 0xf60ff26f, 0x8aa48704, 0x1a1016b0, + 0xa9cda7dd, 0x39793669, 0xcf76c406, 0x5fc255b2, 0xec1fe4df, + 0x7cab756b, 0x14490f09, 0x84fd9ebd, 0x37202fd0, 0xa794be64, + 0x519b4c0b, 0xc12fddbf, 0x72f26cd2, 0xe246fd66, 0x9eed880d, + 0x0e5919b9, 0xbd84a8d4, 0x2d303960, 0xdb3fcb0f, 0x4b8b5abb, + 0xf856ebd6, 0x68e27a62, 0x28921e12, 0xb8268fa6, 0x0bfb3ecb, + 0x9b4faf7f, 0x6d405d10, 0xfdf4cca4, 0x4e297dc9, 0xde9dec7d, + 0xa2369916, 0x328208a2, 0x815fb9cf, 0x11eb287b, 0xe7e4da14, + 0x77504ba0, 0xc48dfacd, 0x54396b79, 0x3cdb111b, 0xac6f80af, + 0x1fb231c2, 0x8f06a076, 0x79095219, 0xe9bdc3ad, 0x5a6072c0, + 0xcad4e374, 0xb67f961f, 0x26cb07ab, 0x9516b6c6, 0x05a22772, + 0xf3add51d, 0x631944a9, 0xd0c4f5c4, 0x40706470, 0x50243d24, + 0xc090ac90, 0x734d1dfd, 0xe3f98c49, 0x15f67e26, 0x8542ef92, + 0x369f5eff, 0xa62bcf4b, 0xda80ba20, 0x4a342b94, 0xf9e99af9, + 0x695d0b4d, 0x9f52f922, 0x0fe66896, 0xbc3bd9fb, 0x2c8f484f, + 0x446d322d, 0xd4d9a399, 0x670412f4, 0xf7b08340, 0x01bf712f, + 0x910be09b, 0x22d651f6, 0xb262c042, 0xcec9b529, 0x5e7d249d, + 0xeda095f0, 0x7d140444, 0x8b1bf62b, 0x1baf679f, 0xa872d6f2, + 0x38c64746, 0x78b62336, 0xe802b282, 0x5bdf03ef, 0xcb6b925b, + 0x3d646034, 0xadd0f180, 0x1e0d40ed, 0x8eb9d159, 0xf212a432, + 0x62a63586, 0xd17b84eb, 0x41cf155f, 0xb7c0e730, 0x27747684, + 0x94a9c7e9, 0x041d565d, 0x6cff2c3f, 0xfc4bbd8b, 0x4f960ce6, + 0xdf229d52, 0x292d6f3d, 0xb999fe89, 0x0a444fe4, 0x9af0de50, + 0xe65bab3b, 0x76ef3a8f, 0xc5328be2, 0x55861a56, 0xa389e839, + 0x333d798d, 0x80e0c8e0, 0x10545954, 0xa0487a48, 0x30fcebfc, + 0x83215a91, 0x1395cb25, 0xe59a394a, 0x752ea8fe, 0xc6f31993, + 0x56478827, 0x2aecfd4c, 0xba586cf8, 0x0985dd95, 0x99314c21, + 0x6f3ebe4e, 0xff8a2ffa, 0x4c579e97, 0xdce30f23, 0xb4017541, + 0x24b5e4f5, 0x97685598, 0x07dcc42c, 0xf1d33643, 0x6167a7f7, + 0xd2ba169a, 0x420e872e, 0x3ea5f245, 0xae1163f1, 0x1dccd29c, + 0x8d784328, 0x7b77b147, 0xebc320f3, 0x581e919e, 0xc8aa002a, + 0x88da645a, 0x186ef5ee, 0xabb34483, 0x3b07d537, 0xcd082758, + 0x5dbcb6ec, 0xee610781, 0x7ed59635, 0x027ee35e, 0x92ca72ea, + 0x2117c387, 0xb1a35233, 0x47aca05c, 0xd71831e8, 0x64c58085, + 0xf4711131, 0x9c936b53, 0x0c27fae7, 0xbffa4b8a, 0x2f4eda3e, + 0xd9412851, 0x49f5b9e5, 0xfa280888, 0x6a9c993c, 0x1637ec57, + 0x86837de3, 0x355ecc8e, 0xa5ea5d3a, 0x53e5af55, 0xc3513ee1, + 0x708c8f8c, 0xe0381e38, 0xf06c476c, 0x60d8d6d8, 0xd30567b5, + 0x43b1f601, 0xb5be046e, 0x250a95da, 0x96d724b7, 0x0663b503, + 0x7ac8c068, 0xea7c51dc, 0x59a1e0b1, 0xc9157105, 0x3f1a836a, + 0xafae12de, 0x1c73a3b3, 0x8cc73207, 0xe4254865, 0x7491d9d1, + 0xc74c68bc, 0x57f8f908, 0xa1f70b67, 0x31439ad3, 0x829e2bbe, + 0x122aba0a, 0x6e81cf61, 0xfe355ed5, 0x4de8efb8, 0xdd5c7e0c, + 0x2b538c63, 0xbbe71dd7, 0x083aacba, 0x988e3d0e, 0xd8fe597e, + 0x484ac8ca, 0xfb9779a7, 0x6b23e813, 0x9d2c1a7c, 0x0d988bc8, + 0xbe453aa5, 0x2ef1ab11, 0x525ade7a, 0xc2ee4fce, 0x7133fea3, + 0xe1876f17, 0x17889d78, 0x873c0ccc, 0x34e1bda1, 0xa4552c15, + 0xccb75677, 0x5c03c7c3, 0xefde76ae, 0x7f6ae71a, 0x89651575, + 0x19d184c1, 0xaa0c35ac, 0x3ab8a418, 0x4613d173, 0xd6a740c7, + 0x657af1aa, 0xf5ce601e, 0x03c19271, 0x937503c5, 0x20a8b2a8, + 0xb01c231c}, + {0x00000000, 0xb401b441, 0x68036883, 0xdc02dcc2, 0xd306d3b6, + 0x670767f7, 0xbb05bb35, 0x0f040f74, 0xa50da5dd, 0x110c119c, + 0xcd0ecd5e, 0x790f791f, 0x760b766b, 0xc20ac22a, 0x1e081ee8, + 0xaa09aaa9, 0x491b490b, 0xfd1afd4a, 0x21182188, 0x951995c9, + 0x9a1d9abd, 0x2e1c2efc, 0xf21ef23e, 0x461f467f, 0xec16ecd6, + 0x58175897, 0x84158455, 0x30143014, 0x3f103f60, 0x8b118b21, + 0x571357e3, 0xe312e3a2, 0x92369216, 0x26372657, 0xfa35fa95, + 0x4e344ed4, 0x413041a0, 0xf531f5e1, 0x29332923, 0x9d329d62, + 0x373b37cb, 0x833a838a, 0x5f385f48, 0xeb39eb09, 0xe43de47d, + 0x503c503c, 0x8c3e8cfe, 0x383f38bf, 0xdb2ddb1d, 0x6f2c6f5c, + 0xb32eb39e, 0x072f07df, 0x082b08ab, 0xbc2abcea, 0x60286028, + 0xd429d469, 0x7e207ec0, 0xca21ca81, 0x16231643, 0xa222a202, + 0xad26ad76, 0x19271937, 0xc525c5f5, 0x712471b4, 0x246d242d, + 0x906c906c, 0x4c6e4cae, 0xf86ff8ef, 0xf76bf79b, 0x436a43da, + 0x9f689f18, 0x2b692b59, 0x816081f0, 0x356135b1, 0xe963e973, + 0x5d625d32, 0x52665246, 0xe667e607, 0x3a653ac5, 0x8e648e84, + 0x6d766d26, 0xd977d967, 0x057505a5, 0xb174b1e4, 0xbe70be90, + 0x0a710ad1, 0xd673d613, 0x62726252, 0xc87bc8fb, 0x7c7a7cba, + 0xa078a078, 0x14791439, 0x1b7d1b4d, 0xaf7caf0c, 0x737e73ce, + 0xc77fc78f, 0xb65bb63b, 0x025a027a, 0xde58deb8, 0x6a596af9, + 0x655d658d, 0xd15cd1cc, 0x0d5e0d0e, 0xb95fb94f, 0x135613e6, + 0xa757a7a7, 0x7b557b65, 0xcf54cf24, 0xc050c050, 0x74517411, + 0xa853a8d3, 0x1c521c92, 0xff40ff30, 0x4b414b71, 0x974397b3, + 0x234223f2, 0x2c462c86, 0x984798c7, 0x44454405, 0xf044f044, + 0x5a4d5aed, 0xee4ceeac, 0x324e326e, 0x864f862f, 0x894b895b, + 0x3d4a3d1a, 0xe148e1d8, 0x55495599, 0x48da485a, 0xfcdbfc1b, + 0x20d920d9, 0x94d89498, 0x9bdc9bec, 0x2fdd2fad, 0xf3dff36f, + 0x47de472e, 0xedd7ed87, 0x59d659c6, 0x85d48504, 0x31d53145, + 0x3ed13e31, 0x8ad08a70, 0x56d256b2, 0xe2d3e2f3, 0x01c10151, + 0xb5c0b510, 0x69c269d2, 0xddc3dd93, 0xd2c7d2e7, 0x66c666a6, + 0xbac4ba64, 0x0ec50e25, 0xa4cca48c, 0x10cd10cd, 0xcccfcc0f, + 0x78ce784e, 0x77ca773a, 0xc3cbc37b, 0x1fc91fb9, 0xabc8abf8, + 0xdaecda4c, 0x6eed6e0d, 0xb2efb2cf, 0x06ee068e, 0x09ea09fa, + 0xbdebbdbb, 0x61e96179, 0xd5e8d538, 0x7fe17f91, 0xcbe0cbd0, + 0x17e21712, 0xa3e3a353, 0xace7ac27, 0x18e61866, 0xc4e4c4a4, + 0x70e570e5, 0x93f79347, 0x27f62706, 0xfbf4fbc4, 0x4ff54f85, + 0x40f140f1, 0xf4f0f4b0, 0x28f22872, 0x9cf39c33, 0x36fa369a, + 0x82fb82db, 0x5ef95e19, 0xeaf8ea58, 0xe5fce52c, 0x51fd516d, + 0x8dff8daf, 0x39fe39ee, 0x6cb76c77, 0xd8b6d836, 0x04b404f4, + 0xb0b5b0b5, 0xbfb1bfc1, 0x0bb00b80, 0xd7b2d742, 0x63b36303, + 0xc9bac9aa, 0x7dbb7deb, 0xa1b9a129, 0x15b81568, 0x1abc1a1c, + 0xaebdae5d, 0x72bf729f, 0xc6bec6de, 0x25ac257c, 0x91ad913d, + 0x4daf4dff, 0xf9aef9be, 0xf6aaf6ca, 0x42ab428b, 0x9ea99e49, + 0x2aa82a08, 0x80a180a1, 0x34a034e0, 0xe8a2e822, 0x5ca35c63, + 0x53a75317, 0xe7a6e756, 0x3ba43b94, 0x8fa58fd5, 0xfe81fe61, + 0x4a804a20, 0x968296e2, 0x228322a3, 0x2d872dd7, 0x99869996, + 0x45844554, 0xf185f115, 0x5b8c5bbc, 0xef8deffd, 0x338f333f, + 0x878e877e, 0x888a880a, 0x3c8b3c4b, 0xe089e089, 0x548854c8, + 0xb79ab76a, 0x039b032b, 0xdf99dfe9, 0x6b986ba8, 0x649c64dc, + 0xd09dd09d, 0x0c9f0c5f, 0xb89eb81e, 0x129712b7, 0xa696a6f6, + 0x7a947a34, 0xce95ce75, 0xc191c101, 0x75907540, 0xa992a982, + 0x1d931dc3}, + {0x00000000, 0x01000151, 0x020002a2, 0x030003f3, 0x070007f4, + 0x060006a5, 0x05000556, 0x04000407, 0x0d000d58, 0x0c000c09, + 0x0f000ffa, 0x0e000eab, 0x0a000aac, 0x0b000bfd, 0x0800080e, + 0x0900095f, 0x1a001ab0, 0x1b001be1, 0x18001812, 0x19001943, + 0x1d001d44, 0x1c001c15, 0x1f001fe6, 0x1e001eb7, 0x170017e8, + 0x160016b9, 0x1500154a, 0x1400141b, 0x1000101c, 0x1100114d, + 0x120012be, 0x130013ef, 0x370037d0, 0x36003681, 0x35003572, + 0x34003423, 0x30003024, 0x31003175, 0x32003286, 0x330033d7, + 0x3a003a88, 0x3b003bd9, 0x3800382a, 0x3900397b, 0x3d003d7c, + 0x3c003c2d, 0x3f003fde, 0x3e003e8f, 0x2d002d60, 0x2c002c31, + 0x2f002fc2, 0x2e002e93, 0x2a002a94, 0x2b002bc5, 0x28002836, + 0x29002967, 0x20002038, 0x21002169, 0x2200229a, 0x230023cb, + 0x270027cc, 0x2600269d, 0x2500256e, 0x2400243f, 0x6d006d10, + 0x6c006c41, 0x6f006fb2, 0x6e006ee3, 0x6a006ae4, 0x6b006bb5, + 0x68006846, 0x69006917, 0x60006048, 0x61006119, 0x620062ea, + 0x630063bb, 0x670067bc, 0x660066ed, 0x6500651e, 0x6400644f, + 0x770077a0, 0x760076f1, 0x75007502, 0x74007453, 0x70007054, + 0x71007105, 0x720072f6, 0x730073a7, 0x7a007af8, 0x7b007ba9, + 0x7800785a, 0x7900790b, 0x7d007d0c, 0x7c007c5d, 0x7f007fae, + 0x7e007eff, 0x5a005ac0, 0x5b005b91, 0x58005862, 0x59005933, + 0x5d005d34, 0x5c005c65, 0x5f005f96, 0x5e005ec7, 0x57005798, + 0x560056c9, 0x5500553a, 0x5400546b, 0x5000506c, 0x5100513d, + 0x520052ce, 0x5300539f, 0x40004070, 0x41004121, 0x420042d2, + 0x43004383, 0x47004784, 0x460046d5, 0x45004526, 0x44004477, + 0x4d004d28, 0x4c004c79, 0x4f004f8a, 0x4e004edb, 0x4a004adc, + 0x4b004b8d, 0x4800487e, 0x4900492f, 0xda00da20, 0xdb00db71, + 0xd800d882, 0xd900d9d3, 0xdd00ddd4, 0xdc00dc85, 0xdf00df76, + 0xde00de27, 0xd700d778, 0xd600d629, 0xd500d5da, 0xd400d48b, + 0xd000d08c, 0xd100d1dd, 0xd200d22e, 0xd300d37f, 0xc000c090, + 0xc100c1c1, 0xc200c232, 0xc300c363, 0xc700c764, 0xc600c635, + 0xc500c5c6, 0xc400c497, 0xcd00cdc8, 0xcc00cc99, 0xcf00cf6a, + 0xce00ce3b, 0xca00ca3c, 0xcb00cb6d, 0xc800c89e, 0xc900c9cf, + 0xed00edf0, 0xec00eca1, 0xef00ef52, 0xee00ee03, 0xea00ea04, + 0xeb00eb55, 0xe800e8a6, 0xe900e9f7, 0xe000e0a8, 0xe100e1f9, + 0xe200e20a, 0xe300e35b, 0xe700e75c, 0xe600e60d, 0xe500e5fe, + 0xe400e4af, 0xf700f740, 0xf600f611, 0xf500f5e2, 0xf400f4b3, + 0xf000f0b4, 0xf100f1e5, 0xf200f216, 0xf300f347, 0xfa00fa18, + 0xfb00fb49, 0xf800f8ba, 0xf900f9eb, 0xfd00fdec, 0xfc00fcbd, + 0xff00ff4e, 0xfe00fe1f, 0xb700b730, 0xb600b661, 0xb500b592, + 0xb400b4c3, 0xb000b0c4, 0xb100b195, 0xb200b266, 0xb300b337, + 0xba00ba68, 0xbb00bb39, 0xb800b8ca, 0xb900b99b, 0xbd00bd9c, + 0xbc00bccd, 0xbf00bf3e, 0xbe00be6f, 0xad00ad80, 0xac00acd1, + 0xaf00af22, 0xae00ae73, 0xaa00aa74, 0xab00ab25, 0xa800a8d6, + 0xa900a987, 0xa000a0d8, 0xa100a189, 0xa200a27a, 0xa300a32b, + 0xa700a72c, 0xa600a67d, 0xa500a58e, 0xa400a4df, 0x800080e0, + 0x810081b1, 0x82008242, 0x83008313, 0x87008714, 0x86008645, + 0x850085b6, 0x840084e7, 0x8d008db8, 0x8c008ce9, 0x8f008f1a, + 0x8e008e4b, 0x8a008a4c, 0x8b008b1d, 0x880088ee, 0x890089bf, + 0x9a009a50, 0x9b009b01, 0x980098f2, 0x990099a3, 0x9d009da4, + 0x9c009cf5, 0x9f009f06, 0x9e009e57, 0x97009708, 0x96009659, + 0x950095aa, 0x940094fb, 0x900090fc, 0x910091ad, 0x9200925e, + 0x9300930f}}; + +#endif + +#endif + +#if N == 4 + +#if W == 8 + +static const crc_t crc_braid_table[][256] = { + {0x00000000, 0xbd01c000, 0xca008003, 0x77014003, 0x24020005, + 0x9903c005, 0xee028006, 0x53034006, 0x4804000a, 0xf505c00a, + 0x82048009, 0x3f054009, 0x6c06000f, 0xd107c00f, 0xa606800c, + 0x1b07400c, 0x90080014, 0x2d09c014, 0x5a088017, 0xe7094017, + 0xb40a0011, 0x090bc011, 0x7e0a8012, 0xc30b4012, 0xd80c001e, + 0x650dc01e, 0x120c801d, 0xaf0d401d, 0xfc0e001b, 0x410fc01b, + 0x360e8018, 0x8b0f4018, 0x9013002b, 0x2d12c02b, 0x5a138028, + 0xe7124028, 0xb411002e, 0x0910c02e, 0x7e11802d, 0xc310402d, + 0xd8170021, 0x6516c021, 0x12178022, 0xaf164022, 0xfc150024, + 0x4114c024, 0x36158027, 0x8b144027, 0x001b003f, 0xbd1ac03f, + 0xca1b803c, 0x771a403c, 0x2419003a, 0x9918c03a, 0xee198039, + 0x53184039, 0x481f0035, 0xf51ec035, 0x821f8036, 0x3f1e4036, + 0x6c1d0030, 0xd11cc030, 0xa61d8033, 0x1b1c4033, 0x90250055, + 0x2d24c055, 0x5a258056, 0xe7244056, 0xb4270050, 0x0926c050, + 0x7e278053, 0xc3264053, 0xd821005f, 0x6520c05f, 0x1221805c, + 0xaf20405c, 0xfc23005a, 0x4122c05a, 0x36238059, 0x8b224059, + 0x002d0041, 0xbd2cc041, 0xca2d8042, 0x772c4042, 0x242f0044, + 0x992ec044, 0xee2f8047, 0x532e4047, 0x4829004b, 0xf528c04b, + 0x82298048, 0x3f284048, 0x6c2b004e, 0xd12ac04e, 0xa62b804d, + 0x1b2a404d, 0x0036007e, 0xbd37c07e, 0xca36807d, 0x7737407d, + 0x2434007b, 0x9935c07b, 0xee348078, 0x53354078, 0x48320074, + 0xf533c074, 0x82328077, 0x3f334077, 0x6c300071, 0xd131c071, + 0xa6308072, 0x1b314072, 0x903e006a, 0x2d3fc06a, 0x5a3e8069, + 0xe73f4069, 0xb43c006f, 0x093dc06f, 0x7e3c806c, 0xc33d406c, + 0xd83a0060, 0x653bc060, 0x123a8063, 0xaf3b4063, 0xfc380065, + 0x4139c065, 0x36388066, 0x8b394066, 0x904900a9, 0x2d48c0a9, + 0x5a4980aa, 0xe74840aa, 0xb44b00ac, 0x094ac0ac, 0x7e4b80af, + 0xc34a40af, 0xd84d00a3, 0x654cc0a3, 0x124d80a0, 0xaf4c40a0, + 0xfc4f00a6, 0x414ec0a6, 0x364f80a5, 0x8b4e40a5, 0x004100bd, + 0xbd40c0bd, 0xca4180be, 0x774040be, 0x244300b8, 0x9942c0b8, + 0xee4380bb, 0x534240bb, 0x484500b7, 0xf544c0b7, 0x824580b4, + 0x3f4440b4, 0x6c4700b2, 0xd146c0b2, 0xa64780b1, 0x1b4640b1, + 0x005a0082, 0xbd5bc082, 0xca5a8081, 0x775b4081, 0x24580087, + 0x9959c087, 0xee588084, 0x53594084, 0x485e0088, 0xf55fc088, + 0x825e808b, 0x3f5f408b, 0x6c5c008d, 0xd15dc08d, 0xa65c808e, + 0x1b5d408e, 0x90520096, 0x2d53c096, 0x5a528095, 0xe7534095, + 0xb4500093, 0x0951c093, 0x7e508090, 0xc3514090, 0xd856009c, + 0x6557c09c, 0x1256809f, 0xaf57409f, 0xfc540099, 0x4155c099, + 0x3654809a, 0x8b55409a, 0x006c00fc, 0xbd6dc0fc, 0xca6c80ff, + 0x776d40ff, 0x246e00f9, 0x996fc0f9, 0xee6e80fa, 0x536f40fa, + 0x486800f6, 0xf569c0f6, 0x826880f5, 0x3f6940f5, 0x6c6a00f3, + 0xd16bc0f3, 0xa66a80f0, 0x1b6b40f0, 0x906400e8, 0x2d65c0e8, + 0x5a6480eb, 0xe76540eb, 0xb46600ed, 0x0967c0ed, 0x7e6680ee, + 0xc36740ee, 0xd86000e2, 0x6561c0e2, 0x126080e1, 0xaf6140e1, + 0xfc6200e7, 0x4163c0e7, 0x366280e4, 0x8b6340e4, 0x907f00d7, + 0x2d7ec0d7, 0x5a7f80d4, 0xe77e40d4, 0xb47d00d2, 0x097cc0d2, + 0x7e7d80d1, 0xc37c40d1, 0xd87b00dd, 0x657ac0dd, 0x127b80de, + 0xaf7a40de, 0xfc7900d8, 0x4178c0d8, 0x367980db, 0x8b7840db, + 0x007700c3, 0xbd76c0c3, 0xca7780c0, 0x777640c0, 0x247500c6, + 0x9974c0c6, 0xee7580c5, 0x537440c5, 0x487300c9, 0xf572c0c9, + 0x827380ca, 0x3f7240ca, 0x6c7100cc, 0xd170c0cc, 0xa67180cf, + 0x1b7040cf}, + {0x00000000, 0x90910151, 0x912102a1, 0x01b003f0, 0x92410541, + 0x02d00410, 0x036007e0, 0x93f106b1, 0x94810a81, 0x04100bd0, + 0x05a00820, 0x95310971, 0x06c00fc0, 0x96510e91, 0x97e10d61, + 0x07700c30, 0x99011501, 0x09901450, 0x082017a0, 0x98b116f1, + 0x0b401040, 0x9bd11111, 0x9a6112e1, 0x0af013b0, 0x0d801f80, + 0x9d111ed1, 0x9ca11d21, 0x0c301c70, 0x9fc11ac1, 0x0f501b90, + 0x0ee01860, 0x9e711931, 0x82012a01, 0x12902b50, 0x132028a0, + 0x83b129f1, 0x10402f40, 0x80d12e11, 0x81612de1, 0x11f02cb0, + 0x16802080, 0x861121d1, 0x87a12221, 0x17302370, 0x84c125c1, + 0x14502490, 0x15e02760, 0x85712631, 0x1b003f00, 0x8b913e51, + 0x8a213da1, 0x1ab03cf0, 0x89413a41, 0x19d03b10, 0x186038e0, + 0x88f139b1, 0x8f813581, 0x1f1034d0, 0x1ea03720, 0x8e313671, + 0x1dc030c0, 0x8d513191, 0x8ce13261, 0x1c703330, 0xb4015401, + 0x24905550, 0x252056a0, 0xb5b157f1, 0x26405140, 0xb6d15011, + 0xb76153e1, 0x27f052b0, 0x20805e80, 0xb0115fd1, 0xb1a15c21, + 0x21305d70, 0xb2c15bc1, 0x22505a90, 0x23e05960, 0xb3715831, + 0x2d004100, 0xbd914051, 0xbc2143a1, 0x2cb042f0, 0xbf414441, + 0x2fd04510, 0x2e6046e0, 0xbef147b1, 0xb9814b81, 0x29104ad0, + 0x28a04920, 0xb8314871, 0x2bc04ec0, 0xbb514f91, 0xbae14c61, + 0x2a704d30, 0x36007e00, 0xa6917f51, 0xa7217ca1, 0x37b07df0, + 0xa4417b41, 0x34d07a10, 0x356079e0, 0xa5f178b1, 0xa2817481, + 0x321075d0, 0x33a07620, 0xa3317771, 0x30c071c0, 0xa0517091, + 0xa1e17361, 0x31707230, 0xaf016b01, 0x3f906a50, 0x3e2069a0, + 0xaeb168f1, 0x3d406e40, 0xadd16f11, 0xac616ce1, 0x3cf06db0, + 0x3b806180, 0xab1160d1, 0xaaa16321, 0x3a306270, 0xa9c164c1, + 0x39506590, 0x38e06660, 0xa8716731, 0xd801a801, 0x4890a950, + 0x4920aaa0, 0xd9b1abf1, 0x4a40ad40, 0xdad1ac11, 0xdb61afe1, + 0x4bf0aeb0, 0x4c80a280, 0xdc11a3d1, 0xdda1a021, 0x4d30a170, + 0xdec1a7c1, 0x4e50a690, 0x4fe0a560, 0xdf71a431, 0x4100bd00, + 0xd191bc51, 0xd021bfa1, 0x40b0bef0, 0xd341b841, 0x43d0b910, + 0x4260bae0, 0xd2f1bbb1, 0xd581b781, 0x4510b6d0, 0x44a0b520, + 0xd431b471, 0x47c0b2c0, 0xd751b391, 0xd6e1b061, 0x4670b130, + 0x5a008200, 0xca918351, 0xcb2180a1, 0x5bb081f0, 0xc8418741, + 0x58d08610, 0x596085e0, 0xc9f184b1, 0xce818881, 0x5e1089d0, + 0x5fa08a20, 0xcf318b71, 0x5cc08dc0, 0xcc518c91, 0xcde18f61, + 0x5d708e30, 0xc3019701, 0x53909650, 0x522095a0, 0xc2b194f1, + 0x51409240, 0xc1d19311, 0xc06190e1, 0x50f091b0, 0x57809d80, + 0xc7119cd1, 0xc6a19f21, 0x56309e70, 0xc5c198c1, 0x55509990, + 0x54e09a60, 0xc4719b31, 0x6c00fc00, 0xfc91fd51, 0xfd21fea1, + 0x6db0fff0, 0xfe41f941, 0x6ed0f810, 0x6f60fbe0, 0xfff1fab1, + 0xf881f681, 0x6810f7d0, 0x69a0f420, 0xf931f571, 0x6ac0f3c0, + 0xfa51f291, 0xfbe1f161, 0x6b70f030, 0xf501e901, 0x6590e850, + 0x6420eba0, 0xf4b1eaf1, 0x6740ec40, 0xf7d1ed11, 0xf661eee1, + 0x66f0efb0, 0x6180e380, 0xf111e2d1, 0xf0a1e121, 0x6030e070, + 0xf3c1e6c1, 0x6350e790, 0x62e0e460, 0xf271e531, 0xee01d601, + 0x7e90d750, 0x7f20d4a0, 0xefb1d5f1, 0x7c40d340, 0xecd1d211, + 0xed61d1e1, 0x7df0d0b0, 0x7a80dc80, 0xea11ddd1, 0xeba1de21, + 0x7b30df70, 0xe8c1d9c1, 0x7850d890, 0x79e0db60, 0xe971da31, + 0x7700c300, 0xe791c251, 0xe621c1a1, 0x76b0c0f0, 0xe541c641, + 0x75d0c710, 0x7460c4e0, 0xe4f1c5b1, 0xe381c981, 0x7310c8d0, + 0x72a0cb20, 0xe231ca71, 0x71c0ccc0, 0xe151cd91, 0xe0e1ce61, + 0x7070cf30}, + {0x00000000, 0x00005001, 0x0000a002, 0x0000f003, 0x00014004, + 0x00011005, 0x0001e006, 0x0001b007, 0x00028008, 0x0002d009, + 0x0002200a, 0x0002700b, 0x0003c00c, 0x0003900d, 0x0003600e, + 0x0003300f, 0x00050010, 0x00055011, 0x0005a012, 0x0005f013, + 0x00044014, 0x00041015, 0x0004e016, 0x0004b017, 0x00078018, + 0x0007d019, 0x0007201a, 0x0007701b, 0x0006c01c, 0x0006901d, + 0x0006601e, 0x0006301f, 0x000a0020, 0x000a5021, 0x000aa022, + 0x000af023, 0x000b4024, 0x000b1025, 0x000be026, 0x000bb027, + 0x00088028, 0x0008d029, 0x0008202a, 0x0008702b, 0x0009c02c, + 0x0009902d, 0x0009602e, 0x0009302f, 0x000f0030, 0x000f5031, + 0x000fa032, 0x000ff033, 0x000e4034, 0x000e1035, 0x000ee036, + 0x000eb037, 0x000d8038, 0x000dd039, 0x000d203a, 0x000d703b, + 0x000cc03c, 0x000c903d, 0x000c603e, 0x000c303f, 0x00140040, + 0x00145041, 0x0014a042, 0x0014f043, 0x00154044, 0x00151045, + 0x0015e046, 0x0015b047, 0x00168048, 0x0016d049, 0x0016204a, + 0x0016704b, 0x0017c04c, 0x0017904d, 0x0017604e, 0x0017304f, + 0x00110050, 0x00115051, 0x0011a052, 0x0011f053, 0x00104054, + 0x00101055, 0x0010e056, 0x0010b057, 0x00138058, 0x0013d059, + 0x0013205a, 0x0013705b, 0x0012c05c, 0x0012905d, 0x0012605e, + 0x0012305f, 0x001e0060, 0x001e5061, 0x001ea062, 0x001ef063, + 0x001f4064, 0x001f1065, 0x001fe066, 0x001fb067, 0x001c8068, + 0x001cd069, 0x001c206a, 0x001c706b, 0x001dc06c, 0x001d906d, + 0x001d606e, 0x001d306f, 0x001b0070, 0x001b5071, 0x001ba072, + 0x001bf073, 0x001a4074, 0x001a1075, 0x001ae076, 0x001ab077, + 0x00198078, 0x0019d079, 0x0019207a, 0x0019707b, 0x0018c07c, + 0x0018907d, 0x0018607e, 0x0018307f, 0x00280080, 0x00285081, + 0x0028a082, 0x0028f083, 0x00294084, 0x00291085, 0x0029e086, + 0x0029b087, 0x002a8088, 0x002ad089, 0x002a208a, 0x002a708b, + 0x002bc08c, 0x002b908d, 0x002b608e, 0x002b308f, 0x002d0090, + 0x002d5091, 0x002da092, 0x002df093, 0x002c4094, 0x002c1095, + 0x002ce096, 0x002cb097, 0x002f8098, 0x002fd099, 0x002f209a, + 0x002f709b, 0x002ec09c, 0x002e909d, 0x002e609e, 0x002e309f, + 0x002200a0, 0x002250a1, 0x0022a0a2, 0x0022f0a3, 0x002340a4, + 0x002310a5, 0x0023e0a6, 0x0023b0a7, 0x002080a8, 0x0020d0a9, + 0x002020aa, 0x002070ab, 0x0021c0ac, 0x002190ad, 0x002160ae, + 0x002130af, 0x002700b0, 0x002750b1, 0x0027a0b2, 0x0027f0b3, + 0x002640b4, 0x002610b5, 0x0026e0b6, 0x0026b0b7, 0x002580b8, + 0x0025d0b9, 0x002520ba, 0x002570bb, 0x0024c0bc, 0x002490bd, + 0x002460be, 0x002430bf, 0x003c00c0, 0x003c50c1, 0x003ca0c2, + 0x003cf0c3, 0x003d40c4, 0x003d10c5, 0x003de0c6, 0x003db0c7, + 0x003e80c8, 0x003ed0c9, 0x003e20ca, 0x003e70cb, 0x003fc0cc, + 0x003f90cd, 0x003f60ce, 0x003f30cf, 0x003900d0, 0x003950d1, + 0x0039a0d2, 0x0039f0d3, 0x003840d4, 0x003810d5, 0x0038e0d6, + 0x0038b0d7, 0x003b80d8, 0x003bd0d9, 0x003b20da, 0x003b70db, + 0x003ac0dc, 0x003a90dd, 0x003a60de, 0x003a30df, 0x003600e0, + 0x003650e1, 0x0036a0e2, 0x0036f0e3, 0x003740e4, 0x003710e5, + 0x0037e0e6, 0x0037b0e7, 0x003480e8, 0x0034d0e9, 0x003420ea, + 0x003470eb, 0x0035c0ec, 0x003590ed, 0x003560ee, 0x003530ef, + 0x003300f0, 0x003350f1, 0x0033a0f2, 0x0033f0f3, 0x003240f4, + 0x003210f5, 0x0032e0f6, 0x0032b0f7, 0x003180f8, 0x0031d0f9, + 0x003120fa, 0x003170fb, 0x0030c0fc, 0x003090fd, 0x003060fe, + 0x003030ff}, + {0x00000000, 0x00500100, 0x00a00200, 0x00f00300, 0x01400400, + 0x01100500, 0x01e00600, 0x01b00700, 0x02800800, 0x02d00900, + 0x02200a00, 0x02700b00, 0x03c00c00, 0x03900d00, 0x03600e00, + 0x03300f00, 0x05001000, 0x05501100, 0x05a01200, 0x05f01300, + 0x04401400, 0x04101500, 0x04e01600, 0x04b01700, 0x07801800, + 0x07d01900, 0x07201a00, 0x07701b00, 0x06c01c00, 0x06901d00, + 0x06601e00, 0x06301f00, 0x0a002000, 0x0a502100, 0x0aa02200, + 0x0af02300, 0x0b402400, 0x0b102500, 0x0be02600, 0x0bb02700, + 0x08802800, 0x08d02900, 0x08202a00, 0x08702b00, 0x09c02c00, + 0x09902d00, 0x09602e00, 0x09302f00, 0x0f003000, 0x0f503100, + 0x0fa03200, 0x0ff03300, 0x0e403400, 0x0e103500, 0x0ee03600, + 0x0eb03700, 0x0d803800, 0x0dd03900, 0x0d203a00, 0x0d703b00, + 0x0cc03c00, 0x0c903d00, 0x0c603e00, 0x0c303f00, 0x14004000, + 0x14504100, 0x14a04200, 0x14f04300, 0x15404400, 0x15104500, + 0x15e04600, 0x15b04700, 0x16804800, 0x16d04900, 0x16204a00, + 0x16704b00, 0x17c04c00, 0x17904d00, 0x17604e00, 0x17304f00, + 0x11005000, 0x11505100, 0x11a05200, 0x11f05300, 0x10405400, + 0x10105500, 0x10e05600, 0x10b05700, 0x13805800, 0x13d05900, + 0x13205a00, 0x13705b00, 0x12c05c00, 0x12905d00, 0x12605e00, + 0x12305f00, 0x1e006000, 0x1e506100, 0x1ea06200, 0x1ef06300, + 0x1f406400, 0x1f106500, 0x1fe06600, 0x1fb06700, 0x1c806800, + 0x1cd06900, 0x1c206a00, 0x1c706b00, 0x1dc06c00, 0x1d906d00, + 0x1d606e00, 0x1d306f00, 0x1b007000, 0x1b507100, 0x1ba07200, + 0x1bf07300, 0x1a407400, 0x1a107500, 0x1ae07600, 0x1ab07700, + 0x19807800, 0x19d07900, 0x19207a00, 0x19707b00, 0x18c07c00, + 0x18907d00, 0x18607e00, 0x18307f00, 0x28008000, 0x28508100, + 0x28a08200, 0x28f08300, 0x29408400, 0x29108500, 0x29e08600, + 0x29b08700, 0x2a808800, 0x2ad08900, 0x2a208a00, 0x2a708b00, + 0x2bc08c00, 0x2b908d00, 0x2b608e00, 0x2b308f00, 0x2d009000, + 0x2d509100, 0x2da09200, 0x2df09300, 0x2c409400, 0x2c109500, + 0x2ce09600, 0x2cb09700, 0x2f809800, 0x2fd09900, 0x2f209a00, + 0x2f709b00, 0x2ec09c00, 0x2e909d00, 0x2e609e00, 0x2e309f00, + 0x2200a000, 0x2250a100, 0x22a0a200, 0x22f0a300, 0x2340a400, + 0x2310a500, 0x23e0a600, 0x23b0a700, 0x2080a800, 0x20d0a900, + 0x2020aa00, 0x2070ab00, 0x21c0ac00, 0x2190ad00, 0x2160ae00, + 0x2130af00, 0x2700b000, 0x2750b100, 0x27a0b200, 0x27f0b300, + 0x2640b400, 0x2610b500, 0x26e0b600, 0x26b0b700, 0x2580b800, + 0x25d0b900, 0x2520ba00, 0x2570bb00, 0x24c0bc00, 0x2490bd00, + 0x2460be00, 0x2430bf00, 0x3c00c000, 0x3c50c100, 0x3ca0c200, + 0x3cf0c300, 0x3d40c400, 0x3d10c500, 0x3de0c600, 0x3db0c700, + 0x3e80c800, 0x3ed0c900, 0x3e20ca00, 0x3e70cb00, 0x3fc0cc00, + 0x3f90cd00, 0x3f60ce00, 0x3f30cf00, 0x3900d000, 0x3950d100, + 0x39a0d200, 0x39f0d300, 0x3840d400, 0x3810d500, 0x38e0d600, + 0x38b0d700, 0x3b80d800, 0x3bd0d900, 0x3b20da00, 0x3b70db00, + 0x3ac0dc00, 0x3a90dd00, 0x3a60de00, 0x3a30df00, 0x3600e000, + 0x3650e100, 0x36a0e200, 0x36f0e300, 0x3740e400, 0x3710e500, + 0x37e0e600, 0x37b0e700, 0x3480e800, 0x34d0e900, 0x3420ea00, + 0x3470eb00, 0x35c0ec00, 0x3590ed00, 0x3560ee00, 0x3530ef00, + 0x3300f000, 0x3350f100, 0x33a0f200, 0x33f0f300, 0x3240f400, + 0x3210f500, 0x32e0f600, 0x32b0f700, 0x3180f800, 0x31d0f900, + 0x3120fa00, 0x3170fb00, 0x30c0fc00, 0x3090fd00, 0x3060fe00, + 0x3030ff00}, + {0x00000000, 0x50010000, 0xa0020000, 0xf0030000, 0xf0070003, + 0xa0060003, 0x50050003, 0x00040003, 0x500d0005, 0x000c0005, + 0xf00f0005, 0xa00e0005, 0xa00a0006, 0xf00b0006, 0x00080006, + 0x50090006, 0xa01a000a, 0xf01b000a, 0x0018000a, 0x5019000a, + 0x501d0009, 0x001c0009, 0xf01f0009, 0xa01e0009, 0xf017000f, + 0xa016000f, 0x5015000f, 0x0014000f, 0x0010000c, 0x5011000c, + 0xa012000c, 0xf013000c, 0xf0370017, 0xa0360017, 0x50350017, + 0x00340017, 0x00300014, 0x50310014, 0xa0320014, 0xf0330014, + 0xa03a0012, 0xf03b0012, 0x00380012, 0x50390012, 0x503d0011, + 0x003c0011, 0xf03f0011, 0xa03e0011, 0x502d001d, 0x002c001d, + 0xf02f001d, 0xa02e001d, 0xa02a001e, 0xf02b001e, 0x0028001e, + 0x5029001e, 0x00200018, 0x50210018, 0xa0220018, 0xf0230018, + 0xf027001b, 0xa026001b, 0x5025001b, 0x0024001b, 0x506d002d, + 0x006c002d, 0xf06f002d, 0xa06e002d, 0xa06a002e, 0xf06b002e, + 0x0068002e, 0x5069002e, 0x00600028, 0x50610028, 0xa0620028, + 0xf0630028, 0xf067002b, 0xa066002b, 0x5065002b, 0x0064002b, + 0xf0770027, 0xa0760027, 0x50750027, 0x00740027, 0x00700024, + 0x50710024, 0xa0720024, 0xf0730024, 0xa07a0022, 0xf07b0022, + 0x00780022, 0x50790022, 0x507d0021, 0x007c0021, 0xf07f0021, + 0xa07e0021, 0xa05a003a, 0xf05b003a, 0x0058003a, 0x5059003a, + 0x505d0039, 0x005c0039, 0xf05f0039, 0xa05e0039, 0xf057003f, + 0xa056003f, 0x5055003f, 0x0054003f, 0x0050003c, 0x5051003c, + 0xa052003c, 0xf053003c, 0x00400030, 0x50410030, 0xa0420030, + 0xf0430030, 0xf0470033, 0xa0460033, 0x50450033, 0x00440033, + 0x504d0035, 0x004c0035, 0xf04f0035, 0xa04e0035, 0xa04a0036, + 0xf04b0036, 0x00480036, 0x50490036, 0xa0da005a, 0xf0db005a, + 0x00d8005a, 0x50d9005a, 0x50dd0059, 0x00dc0059, 0xf0df0059, + 0xa0de0059, 0xf0d7005f, 0xa0d6005f, 0x50d5005f, 0x00d4005f, + 0x00d0005c, 0x50d1005c, 0xa0d2005c, 0xf0d3005c, 0x00c00050, + 0x50c10050, 0xa0c20050, 0xf0c30050, 0xf0c70053, 0xa0c60053, + 0x50c50053, 0x00c40053, 0x50cd0055, 0x00cc0055, 0xf0cf0055, + 0xa0ce0055, 0xa0ca0056, 0xf0cb0056, 0x00c80056, 0x50c90056, + 0x50ed004d, 0x00ec004d, 0xf0ef004d, 0xa0ee004d, 0xa0ea004e, + 0xf0eb004e, 0x00e8004e, 0x50e9004e, 0x00e00048, 0x50e10048, + 0xa0e20048, 0xf0e30048, 0xf0e7004b, 0xa0e6004b, 0x50e5004b, + 0x00e4004b, 0xf0f70047, 0xa0f60047, 0x50f50047, 0x00f40047, + 0x00f00044, 0x50f10044, 0xa0f20044, 0xf0f30044, 0xa0fa0042, + 0xf0fb0042, 0x00f80042, 0x50f90042, 0x50fd0041, 0x00fc0041, + 0xf0ff0041, 0xa0fe0041, 0xf0b70077, 0xa0b60077, 0x50b50077, + 0x00b40077, 0x00b00074, 0x50b10074, 0xa0b20074, 0xf0b30074, + 0xa0ba0072, 0xf0bb0072, 0x00b80072, 0x50b90072, 0x50bd0071, + 0x00bc0071, 0xf0bf0071, 0xa0be0071, 0x50ad007d, 0x00ac007d, + 0xf0af007d, 0xa0ae007d, 0xa0aa007e, 0xf0ab007e, 0x00a8007e, + 0x50a9007e, 0x00a00078, 0x50a10078, 0xa0a20078, 0xf0a30078, + 0xf0a7007b, 0xa0a6007b, 0x50a5007b, 0x00a4007b, 0x00800060, + 0x50810060, 0xa0820060, 0xf0830060, 0xf0870063, 0xa0860063, + 0x50850063, 0x00840063, 0x508d0065, 0x008c0065, 0xf08f0065, + 0xa08e0065, 0xa08a0066, 0xf08b0066, 0x00880066, 0x50890066, + 0xa09a006a, 0xf09b006a, 0x0098006a, 0x5099006a, 0x509d0069, + 0x009c0069, 0xf09f0069, 0xa09e0069, 0xf097006f, 0xa096006f, + 0x5095006f, 0x0094006f, 0x0090006c, 0x5091006c, 0xa092006c, + 0xf093006c}, + {0x00000000, 0xf1b700b7, 0x536d016d, 0xa2da01da, 0xa6da02da, + 0x576d026d, 0xf5b703b7, 0x04000300, 0xfdb705b7, 0x0c000500, + 0xaeda04da, 0x5f6d046d, 0x5b6d076d, 0xaada07da, 0x08000600, + 0xf9b706b7, 0x4b6d0b6d, 0xbada0bda, 0x18000a00, 0xe9b70ab7, + 0xedb709b7, 0x1c000900, 0xbeda08da, 0x4f6d086d, 0xb6da0eda, + 0x476d0e6d, 0xe5b70fb7, 0x14000f00, 0x10000c00, 0xe1b70cb7, + 0x436d0d6d, 0xb2da0dda, 0x96da16da, 0x676d166d, 0xc5b717b7, + 0x34001700, 0x30001400, 0xc1b714b7, 0x636d156d, 0x92da15da, + 0x6b6d136d, 0x9ada13da, 0x38001200, 0xc9b712b7, 0xcdb711b7, + 0x3c001100, 0x9eda10da, 0x6f6d106d, 0xddb71db7, 0x2c001d00, + 0x8eda1cda, 0x7f6d1c6d, 0x7b6d1f6d, 0x8ada1fda, 0x28001e00, + 0xd9b71eb7, 0x20001800, 0xd1b718b7, 0x736d196d, 0x82da19da, + 0x86da1ada, 0x776d1a6d, 0xd5b71bb7, 0x24001b00, 0x9db72db7, + 0x6c002d00, 0xceda2cda, 0x3f6d2c6d, 0x3b6d2f6d, 0xcada2fda, + 0x68002e00, 0x99b72eb7, 0x60002800, 0x91b728b7, 0x336d296d, + 0xc2da29da, 0xc6da2ada, 0x376d2a6d, 0x95b72bb7, 0x64002b00, + 0xd6da26da, 0x276d266d, 0x85b727b7, 0x74002700, 0x70002400, + 0x81b724b7, 0x236d256d, 0xd2da25da, 0x2b6d236d, 0xdada23da, + 0x78002200, 0x89b722b7, 0x8db721b7, 0x7c002100, 0xdeda20da, + 0x2f6d206d, 0x0b6d3b6d, 0xfada3bda, 0x58003a00, 0xa9b73ab7, + 0xadb739b7, 0x5c003900, 0xfeda38da, 0x0f6d386d, 0xf6da3eda, + 0x076d3e6d, 0xa5b73fb7, 0x54003f00, 0x50003c00, 0xa1b73cb7, + 0x036d3d6d, 0xf2da3dda, 0x40003000, 0xb1b730b7, 0x136d316d, + 0xe2da31da, 0xe6da32da, 0x176d326d, 0xb5b733b7, 0x44003300, + 0xbdb735b7, 0x4c003500, 0xeeda34da, 0x1f6d346d, 0x1b6d376d, + 0xeada37da, 0x48003600, 0xb9b736b7, 0x8b6d5b6d, 0x7ada5bda, + 0xd8005a00, 0x29b75ab7, 0x2db759b7, 0xdc005900, 0x7eda58da, + 0x8f6d586d, 0x76da5eda, 0x876d5e6d, 0x25b75fb7, 0xd4005f00, + 0xd0005c00, 0x21b75cb7, 0x836d5d6d, 0x72da5dda, 0xc0005000, + 0x31b750b7, 0x936d516d, 0x62da51da, 0x66da52da, 0x976d526d, + 0x35b753b7, 0xc4005300, 0x3db755b7, 0xcc005500, 0x6eda54da, + 0x9f6d546d, 0x9b6d576d, 0x6ada57da, 0xc8005600, 0x39b756b7, + 0x1db74db7, 0xec004d00, 0x4eda4cda, 0xbf6d4c6d, 0xbb6d4f6d, + 0x4ada4fda, 0xe8004e00, 0x19b74eb7, 0xe0004800, 0x11b748b7, + 0xb36d496d, 0x42da49da, 0x46da4ada, 0xb76d4a6d, 0x15b74bb7, + 0xe4004b00, 0x56da46da, 0xa76d466d, 0x05b747b7, 0xf4004700, + 0xf0004400, 0x01b744b7, 0xa36d456d, 0x52da45da, 0xab6d436d, + 0x5ada43da, 0xf8004200, 0x09b742b7, 0x0db741b7, 0xfc004100, + 0x5eda40da, 0xaf6d406d, 0x16da76da, 0xe76d766d, 0x45b777b7, + 0xb4007700, 0xb0007400, 0x41b774b7, 0xe36d756d, 0x12da75da, + 0xeb6d736d, 0x1ada73da, 0xb8007200, 0x49b772b7, 0x4db771b7, + 0xbc007100, 0x1eda70da, 0xef6d706d, 0x5db77db7, 0xac007d00, + 0x0eda7cda, 0xff6d7c6d, 0xfb6d7f6d, 0x0ada7fda, 0xa8007e00, + 0x59b77eb7, 0xa0007800, 0x51b778b7, 0xf36d796d, 0x02da79da, + 0x06da7ada, 0xf76d7a6d, 0x55b77bb7, 0xa4007b00, 0x80006000, + 0x71b760b7, 0xd36d616d, 0x22da61da, 0x26da62da, 0xd76d626d, + 0x75b763b7, 0x84006300, 0x7db765b7, 0x8c006500, 0x2eda64da, + 0xdf6d646d, 0xdb6d676d, 0x2ada67da, 0x88006600, 0x79b766b7, + 0xcb6d6b6d, 0x3ada6bda, 0x98006a00, 0x69b76ab7, 0x6db769b7, + 0x9c006900, 0x3eda68da, 0xcf6d686d, 0x36da6eda, 0xc76d6e6d, + 0x65b76fb7, 0x94006f00, 0x90006c00, 0x61b76cb7, 0xc36d6d6d, + 0x32da6dda}, + {0x00000000, 0xa6d9b6d9, 0xfdb06db1, 0x5b69db68, 0x4b63db61, + 0xedba6db8, 0xb6d3b6d0, 0x100a0009, 0x96c7b6c2, 0x301e001b, + 0x6b77db73, 0xcdae6daa, 0xdda46da3, 0x7b7ddb7a, 0x20140012, + 0x86cdb6cb, 0x9d8c6d87, 0x3b55db5e, 0x603c0036, 0xc6e5b6ef, + 0xd6efb6e6, 0x7036003f, 0x2b5fdb57, 0x8d866d8e, 0x0b4bdb45, + 0xad926d9c, 0xf6fbb6f4, 0x5022002d, 0x40280024, 0xe6f1b6fd, + 0xbd986d95, 0x1b41db4c, 0x8b1bdb0d, 0x2dc26dd4, 0x76abb6bc, + 0xd0720065, 0xc078006c, 0x66a1b6b5, 0x3dc86ddd, 0x9b11db04, + 0x1ddc6dcf, 0xbb05db16, 0xe06c007e, 0x46b5b6a7, 0x56bfb6ae, + 0xf0660077, 0xab0fdb1f, 0x0dd66dc6, 0x1697b68a, 0xb04e0053, + 0xeb27db3b, 0x4dfe6de2, 0x5df46deb, 0xfb2ddb32, 0xa044005a, + 0x069db683, 0x80500048, 0x2689b691, 0x7de06df9, 0xdb39db20, + 0xcb33db29, 0x6dea6df0, 0x3683b698, 0x905a0041, 0xa634b619, + 0x00ed00c0, 0x5b84dba8, 0xfd5d6d71, 0xed576d78, 0x4b8edba1, + 0x10e700c9, 0xb63eb610, 0x30f300db, 0x962ab602, 0xcd436d6a, + 0x6b9adbb3, 0x7b90dbba, 0xdd496d63, 0x8620b60b, 0x20f900d2, + 0x3bb8db9e, 0x9d616d47, 0xc608b62f, 0x60d100f6, 0x70db00ff, + 0xd602b626, 0x8d6b6d4e, 0x2bb2db97, 0xad7f6d5c, 0x0ba6db85, + 0x50cf00ed, 0xf616b634, 0xe61cb63d, 0x40c500e4, 0x1bacdb8c, + 0xbd756d55, 0x2d2f6d14, 0x8bf6dbcd, 0xd09f00a5, 0x7646b67c, + 0x664cb675, 0xc09500ac, 0x9bfcdbc4, 0x3d256d1d, 0xbbe8dbd6, + 0x1d316d0f, 0x4658b667, 0xe08100be, 0xf08b00b7, 0x5652b66e, + 0x0d3b6d06, 0xabe2dbdf, 0xb0a30093, 0x167ab64a, 0x4d136d22, + 0xebcadbfb, 0xfbc0dbf2, 0x5d196d2b, 0x0670b643, 0xa0a9009a, + 0x2664b651, 0x80bd0088, 0xdbd4dbe0, 0x7d0d6d39, 0x6d076d30, + 0xcbdedbe9, 0x90b70081, 0x366eb658, 0xfc6a6c31, 0x5ab3dae8, + 0x01da0180, 0xa703b759, 0xb709b750, 0x11d00189, 0x4ab9dae1, + 0xec606c38, 0x6aaddaf3, 0xcc746c2a, 0x971db742, 0x31c4019b, + 0x21ce0192, 0x8717b74b, 0xdc7e6c23, 0x7aa7dafa, 0x61e601b6, + 0xc73fb76f, 0x9c566c07, 0x3a8fdade, 0x2a85dad7, 0x8c5c6c0e, + 0xd735b766, 0x71ec01bf, 0xf721b774, 0x51f801ad, 0x0a91dac5, + 0xac486c1c, 0xbc426c15, 0x1a9bdacc, 0x41f201a4, 0xe72bb77d, + 0x7771b73c, 0xd1a801e5, 0x8ac1da8d, 0x2c186c54, 0x3c126c5d, + 0x9acbda84, 0xc1a201ec, 0x677bb735, 0xe1b601fe, 0x476fb727, + 0x1c066c4f, 0xbadfda96, 0xaad5da9f, 0x0c0c6c46, 0x5765b72e, + 0xf1bc01f7, 0xeafddabb, 0x4c246c62, 0x174db70a, 0xb19401d3, + 0xa19e01da, 0x0747b703, 0x5c2e6c6b, 0xfaf7dab2, 0x7c3a6c79, + 0xdae3daa0, 0x818a01c8, 0x2753b711, 0x3759b718, 0x918001c1, + 0xcae9daa9, 0x6c306c70, 0x5a5eda28, 0xfc876cf1, 0xa7eeb799, + 0x01370140, 0x113d0149, 0xb7e4b790, 0xec8d6cf8, 0x4a54da21, + 0xcc996cea, 0x6a40da33, 0x3129015b, 0x97f0b782, 0x87fab78b, + 0x21230152, 0x7a4ada3a, 0xdc936ce3, 0xc7d2b7af, 0x610b0176, + 0x3a62da1e, 0x9cbb6cc7, 0x8cb16cce, 0x2a68da17, 0x7101017f, + 0xd7d8b7a6, 0x5115016d, 0xf7ccb7b4, 0xaca56cdc, 0x0a7cda05, + 0x1a76da0c, 0xbcaf6cd5, 0xe7c6b7bd, 0x411f0164, 0xd1450125, + 0x779cb7fc, 0x2cf56c94, 0x8a2cda4d, 0x9a26da44, 0x3cff6c9d, + 0x6796b7f5, 0xc14f012c, 0x4782b7e7, 0xe15b013e, 0xba32da56, + 0x1ceb6c8f, 0x0ce16c86, 0xaa38da5f, 0xf1510137, 0x5788b7ee, + 0x4cc96ca2, 0xea10da7b, 0xb1790113, 0x17a0b7ca, 0x07aab7c3, + 0xa173011a, 0xfa1ada72, 0x5cc36cab, 0xda0eda60, 0x7cd76cb9, + 0x27beb7d1, 0x81670108, 0x916d0101, 0x37b4b7d8, 0x6cdd6cb0, + 0xca04da69}, + {0x00000000, 0x48d7d861, 0x91afb0c2, 0xd97868a3, 0x935c6187, + 0xdb8bb9e6, 0x02f3d145, 0x4a240924, 0x96bbc30d, 0xde6c1b6c, + 0x071473cf, 0x4fc3abae, 0x05e7a28a, 0x4d307aeb, 0x94481248, + 0xdc9fca29, 0x9d748619, 0xd5a35e78, 0x0cdb36db, 0x440ceeba, + 0x0e28e79e, 0x46ff3fff, 0x9f87575c, 0xd7508f3d, 0x0bcf4514, + 0x43189d75, 0x9a60f5d6, 0xd2b72db7, 0x98932493, 0xd044fcf2, + 0x093c9451, 0x41eb4c30, 0x8aea0c31, 0xc23dd450, 0x1b45bcf3, + 0x53926492, 0x19b66db6, 0x5161b5d7, 0x8819dd74, 0xc0ce0515, + 0x1c51cf3c, 0x5486175d, 0x8dfe7ffe, 0xc529a79f, 0x8f0daebb, + 0xc7da76da, 0x1ea21e79, 0x5675c618, 0x179e8a28, 0x5f495249, + 0x86313aea, 0xcee6e28b, 0x84c2ebaf, 0xcc1533ce, 0x156d5b6d, + 0x5dba830c, 0x81254925, 0xc9f29144, 0x108af9e7, 0x585d2186, + 0x127928a2, 0x5aaef0c3, 0x83d69860, 0xcb014001, 0xa5d71861, + 0xed00c000, 0x3478a8a3, 0x7caf70c2, 0x368b79e6, 0x7e5ca187, + 0xa724c924, 0xeff31145, 0x336cdb6c, 0x7bbb030d, 0xa2c36bae, + 0xea14b3cf, 0xa030baeb, 0xe8e7628a, 0x319f0a29, 0x7948d248, + 0x38a39e78, 0x70744619, 0xa90c2eba, 0xe1dbf6db, 0xabffffff, + 0xe328279e, 0x3a504f3d, 0x7287975c, 0xae185d75, 0xe6cf8514, + 0x3fb7edb7, 0x776035d6, 0x3d443cf2, 0x7593e493, 0xaceb8c30, + 0xe43c5451, 0x2f3d1450, 0x67eacc31, 0xbe92a492, 0xf6457cf3, + 0xbc6175d7, 0xf4b6adb6, 0x2dcec515, 0x65191d74, 0xb986d75d, + 0xf1510f3c, 0x2829679f, 0x60febffe, 0x2adab6da, 0x620d6ebb, + 0xbb750618, 0xf3a2de79, 0xb2499249, 0xfa9e4a28, 0x23e6228b, + 0x6b31faea, 0x2115f3ce, 0x69c22baf, 0xb0ba430c, 0xf86d9b6d, + 0x24f25144, 0x6c258925, 0xb55de186, 0xfd8a39e7, 0xb7ae30c3, + 0xff79e8a2, 0x26018001, 0x6ed65860, 0xfbad30c1, 0xb37ae8a0, + 0x6a028003, 0x22d55862, 0x68f15146, 0x20268927, 0xf95ee184, + 0xb18939e5, 0x6d16f3cc, 0x25c12bad, 0xfcb9430e, 0xb46e9b6f, + 0xfe4a924b, 0xb69d4a2a, 0x6fe52289, 0x2732fae8, 0x66d9b6d8, + 0x2e0e6eb9, 0xf776061a, 0xbfa1de7b, 0xf585d75f, 0xbd520f3e, + 0x642a679d, 0x2cfdbffc, 0xf06275d5, 0xb8b5adb4, 0x61cdc517, + 0x291a1d76, 0x633e1452, 0x2be9cc33, 0xf291a490, 0xba467cf1, + 0x71473cf0, 0x3990e491, 0xe0e88c32, 0xa83f5453, 0xe21b5d77, + 0xaacc8516, 0x73b4edb5, 0x3b6335d4, 0xe7fcfffd, 0xaf2b279c, + 0x76534f3f, 0x3e84975e, 0x74a09e7a, 0x3c77461b, 0xe50f2eb8, + 0xadd8f6d9, 0xec33bae9, 0xa4e46288, 0x7d9c0a2b, 0x354bd24a, + 0x7f6fdb6e, 0x37b8030f, 0xeec06bac, 0xa617b3cd, 0x7a8879e4, + 0x325fa185, 0xeb27c926, 0xa3f01147, 0xe9d41863, 0xa103c002, + 0x787ba8a1, 0x30ac70c0, 0x5e7a28a0, 0x16adf0c1, 0xcfd59862, + 0x87024003, 0xcd264927, 0x85f19146, 0x5c89f9e5, 0x145e2184, + 0xc8c1ebad, 0x801633cc, 0x596e5b6f, 0x11b9830e, 0x5b9d8a2a, + 0x134a524b, 0xca323ae8, 0x82e5e289, 0xc30eaeb9, 0x8bd976d8, + 0x52a11e7b, 0x1a76c61a, 0x5052cf3e, 0x1885175f, 0xc1fd7ffc, + 0x892aa79d, 0x55b56db4, 0x1d62b5d5, 0xc41add76, 0x8ccd0517, + 0xc6e90c33, 0x8e3ed452, 0x5746bcf1, 0x1f916490, 0xd4902491, + 0x9c47fcf0, 0x453f9453, 0x0de84c32, 0x47cc4516, 0x0f1b9d77, + 0xd663f5d4, 0x9eb42db5, 0x422be79c, 0x0afc3ffd, 0xd384575e, + 0x9b538f3f, 0xd177861b, 0x99a05e7a, 0x40d836d9, 0x080feeb8, + 0x49e4a288, 0x01337ae9, 0xd84b124a, 0x909cca2b, 0xdab8c30f, + 0x926f1b6e, 0x4b1773cd, 0x03c0abac, 0xdf5f6185, 0x9788b9e4, + 0x4ef0d147, 0x06270926, 0x4c030002, 0x04d4d863, 0xddacb0c0, + 0x957b68a1}}; + +static const word_t crc_braid_big_table[][256] = { + {0x0000000000000000, 0x61d8d74800000000, 0xc2b0af9100000000, + 0xa36878d900000000, 0x87615c9300000000, 0xe6b98bdb00000000, + 0x45d1f30200000000, 0x2409244a00000000, 0x0dc3bb9600000000, + 0x6c1b6cde00000000, 0xcf73140700000000, 0xaeabc34f00000000, + 0x8aa2e70500000000, 0xeb7a304d00000000, 0x4812489400000000, + 0x29ca9fdc00000000, 0x1986749d00000000, 0x785ea3d500000000, + 0xdb36db0c00000000, 0xbaee0c4400000000, 0x9ee7280e00000000, + 0xff3fff4600000000, 0x5c57879f00000000, 0x3d8f50d700000000, + 0x1445cf0b00000000, 0x759d184300000000, 0xd6f5609a00000000, + 0xb72db7d200000000, 0x9324939800000000, 0xf2fc44d000000000, + 0x51943c0900000000, 0x304ceb4100000000, 0x310cea8a00000000, + 0x50d43dc200000000, 0xf3bc451b00000000, 0x9264925300000000, + 0xb66db61900000000, 0xd7b5615100000000, 0x74dd198800000000, + 0x1505cec000000000, 0x3ccf511c00000000, 0x5d17865400000000, + 0xfe7ffe8d00000000, 0x9fa729c500000000, 0xbbae0d8f00000000, + 0xda76dac700000000, 0x791ea21e00000000, 0x18c6755600000000, + 0x288a9e1700000000, 0x4952495f00000000, 0xea3a318600000000, + 0x8be2e6ce00000000, 0xafebc28400000000, 0xce3315cc00000000, + 0x6d5b6d1500000000, 0x0c83ba5d00000000, 0x2549258100000000, + 0x4491f2c900000000, 0xe7f98a1000000000, 0x86215d5800000000, + 0xa228791200000000, 0xc3f0ae5a00000000, 0x6098d68300000000, + 0x014001cb00000000, 0x6118d7a500000000, 0x00c000ed00000000, + 0xa3a8783400000000, 0xc270af7c00000000, 0xe6798b3600000000, + 0x87a15c7e00000000, 0x24c924a700000000, 0x4511f3ef00000000, + 0x6cdb6c3300000000, 0x0d03bb7b00000000, 0xae6bc3a200000000, + 0xcfb314ea00000000, 0xebba30a000000000, 0x8a62e7e800000000, + 0x290a9f3100000000, 0x48d2487900000000, 0x789ea33800000000, + 0x1946747000000000, 0xba2e0ca900000000, 0xdbf6dbe100000000, + 0xffffffab00000000, 0x9e2728e300000000, 0x3d4f503a00000000, + 0x5c97877200000000, 0x755d18ae00000000, 0x1485cfe600000000, + 0xb7edb73f00000000, 0xd635607700000000, 0xf23c443d00000000, + 0x93e4937500000000, 0x308cebac00000000, 0x51543ce400000000, + 0x50143d2f00000000, 0x31ccea6700000000, 0x92a492be00000000, + 0xf37c45f600000000, 0xd77561bc00000000, 0xb6adb6f400000000, + 0x15c5ce2d00000000, 0x741d196500000000, 0x5dd786b900000000, + 0x3c0f51f100000000, 0x9f67292800000000, 0xfebffe6000000000, + 0xdab6da2a00000000, 0xbb6e0d6200000000, 0x180675bb00000000, + 0x79dea2f300000000, 0x499249b200000000, 0x284a9efa00000000, + 0x8b22e62300000000, 0xeafa316b00000000, 0xcef3152100000000, + 0xaf2bc26900000000, 0x0c43bab000000000, 0x6d9b6df800000000, + 0x4451f22400000000, 0x2589256c00000000, 0x86e15db500000000, + 0xe7398afd00000000, 0xc330aeb700000000, 0xa2e879ff00000000, + 0x0180012600000000, 0x6058d66e00000000, 0xc130adfb00000000, + 0xa0e87ab300000000, 0x0380026a00000000, 0x6258d52200000000, + 0x4651f16800000000, 0x2789262000000000, 0x84e15ef900000000, + 0xe53989b100000000, 0xccf3166d00000000, 0xad2bc12500000000, + 0x0e43b9fc00000000, 0x6f9b6eb400000000, 0x4b924afe00000000, + 0x2a4a9db600000000, 0x8922e56f00000000, 0xe8fa322700000000, + 0xd8b6d96600000000, 0xb96e0e2e00000000, 0x1a0676f700000000, + 0x7bdea1bf00000000, 0x5fd785f500000000, 0x3e0f52bd00000000, + 0x9d672a6400000000, 0xfcbffd2c00000000, 0xd57562f000000000, + 0xb4adb5b800000000, 0x17c5cd6100000000, 0x761d1a2900000000, + 0x52143e6300000000, 0x33cce92b00000000, 0x90a491f200000000, + 0xf17c46ba00000000, 0xf03c477100000000, 0x91e4903900000000, + 0x328ce8e000000000, 0x53543fa800000000, 0x775d1be200000000, + 0x1685ccaa00000000, 0xb5edb47300000000, 0xd435633b00000000, + 0xfdfffce700000000, 0x9c272baf00000000, 0x3f4f537600000000, + 0x5e97843e00000000, 0x7a9ea07400000000, 0x1b46773c00000000, + 0xb82e0fe500000000, 0xd9f6d8ad00000000, 0xe9ba33ec00000000, + 0x8862e4a400000000, 0x2b0a9c7d00000000, 0x4ad24b3500000000, + 0x6edb6f7f00000000, 0x0f03b83700000000, 0xac6bc0ee00000000, + 0xcdb317a600000000, 0xe479887a00000000, 0x85a15f3200000000, + 0x26c927eb00000000, 0x4711f0a300000000, 0x6318d4e900000000, + 0x02c003a100000000, 0xa1a87b7800000000, 0xc070ac3000000000, + 0xa0287a5e00000000, 0xc1f0ad1600000000, 0x6298d5cf00000000, + 0x0340028700000000, 0x274926cd00000000, 0x4691f18500000000, + 0xe5f9895c00000000, 0x84215e1400000000, 0xadebc1c800000000, + 0xcc33168000000000, 0x6f5b6e5900000000, 0x0e83b91100000000, + 0x2a8a9d5b00000000, 0x4b524a1300000000, 0xe83a32ca00000000, + 0x89e2e58200000000, 0xb9ae0ec300000000, 0xd876d98b00000000, + 0x7b1ea15200000000, 0x1ac6761a00000000, 0x3ecf525000000000, + 0x5f17851800000000, 0xfc7ffdc100000000, 0x9da72a8900000000, + 0xb46db55500000000, 0xd5b5621d00000000, 0x76dd1ac400000000, + 0x1705cd8c00000000, 0x330ce9c600000000, 0x52d43e8e00000000, + 0xf1bc465700000000, 0x9064911f00000000, 0x912490d400000000, + 0xf0fc479c00000000, 0x53943f4500000000, 0x324ce80d00000000, + 0x1645cc4700000000, 0x779d1b0f00000000, 0xd4f563d600000000, + 0xb52db49e00000000, 0x9ce72b4200000000, 0xfd3ffc0a00000000, + 0x5e5784d300000000, 0x3f8f539b00000000, 0x1b8677d100000000, + 0x7a5ea09900000000, 0xd936d84000000000, 0xb8ee0f0800000000, + 0x88a2e44900000000, 0xe97a330100000000, 0x4a124bd800000000, + 0x2bca9c9000000000, 0x0fc3b8da00000000, 0x6e1b6f9200000000, + 0xcd73174b00000000, 0xacabc00300000000, 0x85615fdf00000000, + 0xe4b9889700000000, 0x47d1f04e00000000, 0x2609270600000000, + 0x0200034c00000000, 0x63d8d40400000000, 0xc0b0acdd00000000, + 0xa1687b9500000000}, + {0x0000000000000000, 0xd9b6d9a600000000, 0xb16db0fd00000000, + 0x68db695b00000000, 0x61db634b00000000, 0xb86dbaed00000000, + 0xd0b6d3b600000000, 0x09000a1000000000, 0xc2b6c79600000000, + 0x1b001e3000000000, 0x73db776b00000000, 0xaa6daecd00000000, + 0xa36da4dd00000000, 0x7adb7d7b00000000, 0x1200142000000000, + 0xcbb6cd8600000000, 0x876d8c9d00000000, 0x5edb553b00000000, + 0x36003c6000000000, 0xefb6e5c600000000, 0xe6b6efd600000000, + 0x3f00367000000000, 0x57db5f2b00000000, 0x8e6d868d00000000, + 0x45db4b0b00000000, 0x9c6d92ad00000000, 0xf4b6fbf600000000, + 0x2d00225000000000, 0x2400284000000000, 0xfdb6f1e600000000, + 0x956d98bd00000000, 0x4cdb411b00000000, 0x0ddb1b8b00000000, + 0xd46dc22d00000000, 0xbcb6ab7600000000, 0x650072d000000000, + 0x6c0078c000000000, 0xb5b6a16600000000, 0xdd6dc83d00000000, + 0x04db119b00000000, 0xcf6ddc1d00000000, 0x16db05bb00000000, + 0x7e006ce000000000, 0xa7b6b54600000000, 0xaeb6bf5600000000, + 0x770066f000000000, 0x1fdb0fab00000000, 0xc66dd60d00000000, + 0x8ab6971600000000, 0x53004eb000000000, 0x3bdb27eb00000000, + 0xe26dfe4d00000000, 0xeb6df45d00000000, 0x32db2dfb00000000, + 0x5a0044a000000000, 0x83b69d0600000000, 0x4800508000000000, + 0x91b6892600000000, 0xf96de07d00000000, 0x20db39db00000000, + 0x29db33cb00000000, 0xf06dea6d00000000, 0x98b6833600000000, + 0x41005a9000000000, 0x19b634a600000000, 0xc000ed0000000000, + 0xa8db845b00000000, 0x716d5dfd00000000, 0x786d57ed00000000, + 0xa1db8e4b00000000, 0xc900e71000000000, 0x10b63eb600000000, + 0xdb00f33000000000, 0x02b62a9600000000, 0x6a6d43cd00000000, + 0xb3db9a6b00000000, 0xbadb907b00000000, 0x636d49dd00000000, + 0x0bb6208600000000, 0xd200f92000000000, 0x9edbb83b00000000, + 0x476d619d00000000, 0x2fb608c600000000, 0xf600d16000000000, + 0xff00db7000000000, 0x26b602d600000000, 0x4e6d6b8d00000000, + 0x97dbb22b00000000, 0x5c6d7fad00000000, 0x85dba60b00000000, + 0xed00cf5000000000, 0x34b616f600000000, 0x3db61ce600000000, + 0xe400c54000000000, 0x8cdbac1b00000000, 0x556d75bd00000000, + 0x146d2f2d00000000, 0xcddbf68b00000000, 0xa5009fd000000000, + 0x7cb6467600000000, 0x75b64c6600000000, 0xac0095c000000000, + 0xc4dbfc9b00000000, 0x1d6d253d00000000, 0xd6dbe8bb00000000, + 0x0f6d311d00000000, 0x67b6584600000000, 0xbe0081e000000000, + 0xb7008bf000000000, 0x6eb6525600000000, 0x066d3b0d00000000, + 0xdfdbe2ab00000000, 0x9300a3b000000000, 0x4ab67a1600000000, + 0x226d134d00000000, 0xfbdbcaeb00000000, 0xf2dbc0fb00000000, + 0x2b6d195d00000000, 0x43b6700600000000, 0x9a00a9a000000000, + 0x51b6642600000000, 0x8800bd8000000000, 0xe0dbd4db00000000, + 0x396d0d7d00000000, 0x306d076d00000000, 0xe9dbdecb00000000, + 0x8100b79000000000, 0x58b66e3600000000, 0x316c6afc00000000, + 0xe8dab35a00000000, 0x8001da0100000000, 0x59b703a700000000, + 0x50b709b700000000, 0x8901d01100000000, 0xe1dab94a00000000, + 0x386c60ec00000000, 0xf3daad6a00000000, 0x2a6c74cc00000000, + 0x42b71d9700000000, 0x9b01c43100000000, 0x9201ce2100000000, + 0x4bb7178700000000, 0x236c7edc00000000, 0xfadaa77a00000000, + 0xb601e66100000000, 0x6fb73fc700000000, 0x076c569c00000000, + 0xdeda8f3a00000000, 0xd7da852a00000000, 0x0e6c5c8c00000000, + 0x66b735d700000000, 0xbf01ec7100000000, 0x74b721f700000000, + 0xad01f85100000000, 0xc5da910a00000000, 0x1c6c48ac00000000, + 0x156c42bc00000000, 0xccda9b1a00000000, 0xa401f24100000000, + 0x7db72be700000000, 0x3cb7717700000000, 0xe501a8d100000000, + 0x8ddac18a00000000, 0x546c182c00000000, 0x5d6c123c00000000, + 0x84dacb9a00000000, 0xec01a2c100000000, 0x35b77b6700000000, + 0xfe01b6e100000000, 0x27b76f4700000000, 0x4f6c061c00000000, + 0x96dadfba00000000, 0x9fdad5aa00000000, 0x466c0c0c00000000, + 0x2eb7655700000000, 0xf701bcf100000000, 0xbbdafdea00000000, + 0x626c244c00000000, 0x0ab74d1700000000, 0xd30194b100000000, + 0xda019ea100000000, 0x03b7470700000000, 0x6b6c2e5c00000000, + 0xb2daf7fa00000000, 0x796c3a7c00000000, 0xa0dae3da00000000, + 0xc8018a8100000000, 0x11b7532700000000, 0x18b7593700000000, + 0xc101809100000000, 0xa9dae9ca00000000, 0x706c306c00000000, + 0x28da5e5a00000000, 0xf16c87fc00000000, 0x99b7eea700000000, + 0x4001370100000000, 0x49013d1100000000, 0x90b7e4b700000000, + 0xf86c8dec00000000, 0x21da544a00000000, 0xea6c99cc00000000, + 0x33da406a00000000, 0x5b01293100000000, 0x82b7f09700000000, + 0x8bb7fa8700000000, 0x5201232100000000, 0x3ada4a7a00000000, + 0xe36c93dc00000000, 0xafb7d2c700000000, 0x76010b6100000000, + 0x1eda623a00000000, 0xc76cbb9c00000000, 0xce6cb18c00000000, + 0x17da682a00000000, 0x7f01017100000000, 0xa6b7d8d700000000, + 0x6d01155100000000, 0xb4b7ccf700000000, 0xdc6ca5ac00000000, + 0x05da7c0a00000000, 0x0cda761a00000000, 0xd56cafbc00000000, + 0xbdb7c6e700000000, 0x64011f4100000000, 0x250145d100000000, + 0xfcb79c7700000000, 0x946cf52c00000000, 0x4dda2c8a00000000, + 0x44da269a00000000, 0x9d6cff3c00000000, 0xf5b7966700000000, + 0x2c014fc100000000, 0xe7b7824700000000, 0x3e015be100000000, + 0x56da32ba00000000, 0x8f6ceb1c00000000, 0x866ce10c00000000, + 0x5fda38aa00000000, 0x370151f100000000, 0xeeb7885700000000, + 0xa26cc94c00000000, 0x7bda10ea00000000, 0x130179b100000000, + 0xcab7a01700000000, 0xc3b7aa0700000000, 0x1a0173a100000000, + 0x72da1afa00000000, 0xab6cc35c00000000, 0x60da0eda00000000, + 0xb96cd77c00000000, 0xd1b7be2700000000, 0x0801678100000000, + 0x01016d9100000000, 0xd8b7b43700000000, 0xb06cdd6c00000000, + 0x69da04ca00000000}, + {0x0000000000000000, 0xb700b7f100000000, 0x6d016d5300000000, + 0xda01daa200000000, 0xda02daa600000000, 0x6d026d5700000000, + 0xb703b7f500000000, 0x0003000400000000, 0xb705b7fd00000000, + 0x0005000c00000000, 0xda04daae00000000, 0x6d046d5f00000000, + 0x6d076d5b00000000, 0xda07daaa00000000, 0x0006000800000000, + 0xb706b7f900000000, 0x6d0b6d4b00000000, 0xda0bdaba00000000, + 0x000a001800000000, 0xb70ab7e900000000, 0xb709b7ed00000000, + 0x0009001c00000000, 0xda08dabe00000000, 0x6d086d4f00000000, + 0xda0edab600000000, 0x6d0e6d4700000000, 0xb70fb7e500000000, + 0x000f001400000000, 0x000c001000000000, 0xb70cb7e100000000, + 0x6d0d6d4300000000, 0xda0ddab200000000, 0xda16da9600000000, + 0x6d166d6700000000, 0xb717b7c500000000, 0x0017003400000000, + 0x0014003000000000, 0xb714b7c100000000, 0x6d156d6300000000, + 0xda15da9200000000, 0x6d136d6b00000000, 0xda13da9a00000000, + 0x0012003800000000, 0xb712b7c900000000, 0xb711b7cd00000000, + 0x0011003c00000000, 0xda10da9e00000000, 0x6d106d6f00000000, + 0xb71db7dd00000000, 0x001d002c00000000, 0xda1cda8e00000000, + 0x6d1c6d7f00000000, 0x6d1f6d7b00000000, 0xda1fda8a00000000, + 0x001e002800000000, 0xb71eb7d900000000, 0x0018002000000000, + 0xb718b7d100000000, 0x6d196d7300000000, 0xda19da8200000000, + 0xda1ada8600000000, 0x6d1a6d7700000000, 0xb71bb7d500000000, + 0x001b002400000000, 0xb72db79d00000000, 0x002d006c00000000, + 0xda2cdace00000000, 0x6d2c6d3f00000000, 0x6d2f6d3b00000000, + 0xda2fdaca00000000, 0x002e006800000000, 0xb72eb79900000000, + 0x0028006000000000, 0xb728b79100000000, 0x6d296d3300000000, + 0xda29dac200000000, 0xda2adac600000000, 0x6d2a6d3700000000, + 0xb72bb79500000000, 0x002b006400000000, 0xda26dad600000000, + 0x6d266d2700000000, 0xb727b78500000000, 0x0027007400000000, + 0x0024007000000000, 0xb724b78100000000, 0x6d256d2300000000, + 0xda25dad200000000, 0x6d236d2b00000000, 0xda23dada00000000, + 0x0022007800000000, 0xb722b78900000000, 0xb721b78d00000000, + 0x0021007c00000000, 0xda20dade00000000, 0x6d206d2f00000000, + 0x6d3b6d0b00000000, 0xda3bdafa00000000, 0x003a005800000000, + 0xb73ab7a900000000, 0xb739b7ad00000000, 0x0039005c00000000, + 0xda38dafe00000000, 0x6d386d0f00000000, 0xda3edaf600000000, + 0x6d3e6d0700000000, 0xb73fb7a500000000, 0x003f005400000000, + 0x003c005000000000, 0xb73cb7a100000000, 0x6d3d6d0300000000, + 0xda3ddaf200000000, 0x0030004000000000, 0xb730b7b100000000, + 0x6d316d1300000000, 0xda31dae200000000, 0xda32dae600000000, + 0x6d326d1700000000, 0xb733b7b500000000, 0x0033004400000000, + 0xb735b7bd00000000, 0x0035004c00000000, 0xda34daee00000000, + 0x6d346d1f00000000, 0x6d376d1b00000000, 0xda37daea00000000, + 0x0036004800000000, 0xb736b7b900000000, 0x6d5b6d8b00000000, + 0xda5bda7a00000000, 0x005a00d800000000, 0xb75ab72900000000, + 0xb759b72d00000000, 0x005900dc00000000, 0xda58da7e00000000, + 0x6d586d8f00000000, 0xda5eda7600000000, 0x6d5e6d8700000000, + 0xb75fb72500000000, 0x005f00d400000000, 0x005c00d000000000, + 0xb75cb72100000000, 0x6d5d6d8300000000, 0xda5dda7200000000, + 0x005000c000000000, 0xb750b73100000000, 0x6d516d9300000000, + 0xda51da6200000000, 0xda52da6600000000, 0x6d526d9700000000, + 0xb753b73500000000, 0x005300c400000000, 0xb755b73d00000000, + 0x005500cc00000000, 0xda54da6e00000000, 0x6d546d9f00000000, + 0x6d576d9b00000000, 0xda57da6a00000000, 0x005600c800000000, + 0xb756b73900000000, 0xb74db71d00000000, 0x004d00ec00000000, + 0xda4cda4e00000000, 0x6d4c6dbf00000000, 0x6d4f6dbb00000000, + 0xda4fda4a00000000, 0x004e00e800000000, 0xb74eb71900000000, + 0x004800e000000000, 0xb748b71100000000, 0x6d496db300000000, + 0xda49da4200000000, 0xda4ada4600000000, 0x6d4a6db700000000, + 0xb74bb71500000000, 0x004b00e400000000, 0xda46da5600000000, + 0x6d466da700000000, 0xb747b70500000000, 0x004700f400000000, + 0x004400f000000000, 0xb744b70100000000, 0x6d456da300000000, + 0xda45da5200000000, 0x6d436dab00000000, 0xda43da5a00000000, + 0x004200f800000000, 0xb742b70900000000, 0xb741b70d00000000, + 0x004100fc00000000, 0xda40da5e00000000, 0x6d406daf00000000, + 0xda76da1600000000, 0x6d766de700000000, 0xb777b74500000000, + 0x007700b400000000, 0x007400b000000000, 0xb774b74100000000, + 0x6d756de300000000, 0xda75da1200000000, 0x6d736deb00000000, + 0xda73da1a00000000, 0x007200b800000000, 0xb772b74900000000, + 0xb771b74d00000000, 0x007100bc00000000, 0xda70da1e00000000, + 0x6d706def00000000, 0xb77db75d00000000, 0x007d00ac00000000, + 0xda7cda0e00000000, 0x6d7c6dff00000000, 0x6d7f6dfb00000000, + 0xda7fda0a00000000, 0x007e00a800000000, 0xb77eb75900000000, + 0x007800a000000000, 0xb778b75100000000, 0x6d796df300000000, + 0xda79da0200000000, 0xda7ada0600000000, 0x6d7a6df700000000, + 0xb77bb75500000000, 0x007b00a400000000, 0x0060008000000000, + 0xb760b77100000000, 0x6d616dd300000000, 0xda61da2200000000, + 0xda62da2600000000, 0x6d626dd700000000, 0xb763b77500000000, + 0x0063008400000000, 0xb765b77d00000000, 0x0065008c00000000, + 0xda64da2e00000000, 0x6d646ddf00000000, 0x6d676ddb00000000, + 0xda67da2a00000000, 0x0066008800000000, 0xb766b77900000000, + 0x6d6b6dcb00000000, 0xda6bda3a00000000, 0x006a009800000000, + 0xb76ab76900000000, 0xb769b76d00000000, 0x0069009c00000000, + 0xda68da3e00000000, 0x6d686dcf00000000, 0xda6eda3600000000, + 0x6d6e6dc700000000, 0xb76fb76500000000, 0x006f009400000000, + 0x006c009000000000, 0xb76cb76100000000, 0x6d6d6dc300000000, + 0xda6dda3200000000}, + {0x0000000000000000, 0x0000015000000000, 0x000002a000000000, + 0x000003f000000000, 0x030007f000000000, 0x030006a000000000, + 0x0300055000000000, 0x0300040000000000, 0x05000d5000000000, + 0x05000c0000000000, 0x05000ff000000000, 0x05000ea000000000, + 0x06000aa000000000, 0x06000bf000000000, 0x0600080000000000, + 0x0600095000000000, 0x0a001aa000000000, 0x0a001bf000000000, + 0x0a00180000000000, 0x0a00195000000000, 0x09001d5000000000, + 0x09001c0000000000, 0x09001ff000000000, 0x09001ea000000000, + 0x0f0017f000000000, 0x0f0016a000000000, 0x0f00155000000000, + 0x0f00140000000000, 0x0c00100000000000, 0x0c00115000000000, + 0x0c0012a000000000, 0x0c0013f000000000, 0x170037f000000000, + 0x170036a000000000, 0x1700355000000000, 0x1700340000000000, + 0x1400300000000000, 0x1400315000000000, 0x140032a000000000, + 0x140033f000000000, 0x12003aa000000000, 0x12003bf000000000, + 0x1200380000000000, 0x1200395000000000, 0x11003d5000000000, + 0x11003c0000000000, 0x11003ff000000000, 0x11003ea000000000, + 0x1d002d5000000000, 0x1d002c0000000000, 0x1d002ff000000000, + 0x1d002ea000000000, 0x1e002aa000000000, 0x1e002bf000000000, + 0x1e00280000000000, 0x1e00295000000000, 0x1800200000000000, + 0x1800215000000000, 0x180022a000000000, 0x180023f000000000, + 0x1b0027f000000000, 0x1b0026a000000000, 0x1b00255000000000, + 0x1b00240000000000, 0x2d006d5000000000, 0x2d006c0000000000, + 0x2d006ff000000000, 0x2d006ea000000000, 0x2e006aa000000000, + 0x2e006bf000000000, 0x2e00680000000000, 0x2e00695000000000, + 0x2800600000000000, 0x2800615000000000, 0x280062a000000000, + 0x280063f000000000, 0x2b0067f000000000, 0x2b0066a000000000, + 0x2b00655000000000, 0x2b00640000000000, 0x270077f000000000, + 0x270076a000000000, 0x2700755000000000, 0x2700740000000000, + 0x2400700000000000, 0x2400715000000000, 0x240072a000000000, + 0x240073f000000000, 0x22007aa000000000, 0x22007bf000000000, + 0x2200780000000000, 0x2200795000000000, 0x21007d5000000000, + 0x21007c0000000000, 0x21007ff000000000, 0x21007ea000000000, + 0x3a005aa000000000, 0x3a005bf000000000, 0x3a00580000000000, + 0x3a00595000000000, 0x39005d5000000000, 0x39005c0000000000, + 0x39005ff000000000, 0x39005ea000000000, 0x3f0057f000000000, + 0x3f0056a000000000, 0x3f00555000000000, 0x3f00540000000000, + 0x3c00500000000000, 0x3c00515000000000, 0x3c0052a000000000, + 0x3c0053f000000000, 0x3000400000000000, 0x3000415000000000, + 0x300042a000000000, 0x300043f000000000, 0x330047f000000000, + 0x330046a000000000, 0x3300455000000000, 0x3300440000000000, + 0x35004d5000000000, 0x35004c0000000000, 0x35004ff000000000, + 0x35004ea000000000, 0x36004aa000000000, 0x36004bf000000000, + 0x3600480000000000, 0x3600495000000000, 0x5a00daa000000000, + 0x5a00dbf000000000, 0x5a00d80000000000, 0x5a00d95000000000, + 0x5900dd5000000000, 0x5900dc0000000000, 0x5900dff000000000, + 0x5900dea000000000, 0x5f00d7f000000000, 0x5f00d6a000000000, + 0x5f00d55000000000, 0x5f00d40000000000, 0x5c00d00000000000, + 0x5c00d15000000000, 0x5c00d2a000000000, 0x5c00d3f000000000, + 0x5000c00000000000, 0x5000c15000000000, 0x5000c2a000000000, + 0x5000c3f000000000, 0x5300c7f000000000, 0x5300c6a000000000, + 0x5300c55000000000, 0x5300c40000000000, 0x5500cd5000000000, + 0x5500cc0000000000, 0x5500cff000000000, 0x5500cea000000000, + 0x5600caa000000000, 0x5600cbf000000000, 0x5600c80000000000, + 0x5600c95000000000, 0x4d00ed5000000000, 0x4d00ec0000000000, + 0x4d00eff000000000, 0x4d00eea000000000, 0x4e00eaa000000000, + 0x4e00ebf000000000, 0x4e00e80000000000, 0x4e00e95000000000, + 0x4800e00000000000, 0x4800e15000000000, 0x4800e2a000000000, + 0x4800e3f000000000, 0x4b00e7f000000000, 0x4b00e6a000000000, + 0x4b00e55000000000, 0x4b00e40000000000, 0x4700f7f000000000, + 0x4700f6a000000000, 0x4700f55000000000, 0x4700f40000000000, + 0x4400f00000000000, 0x4400f15000000000, 0x4400f2a000000000, + 0x4400f3f000000000, 0x4200faa000000000, 0x4200fbf000000000, + 0x4200f80000000000, 0x4200f95000000000, 0x4100fd5000000000, + 0x4100fc0000000000, 0x4100fff000000000, 0x4100fea000000000, + 0x7700b7f000000000, 0x7700b6a000000000, 0x7700b55000000000, + 0x7700b40000000000, 0x7400b00000000000, 0x7400b15000000000, + 0x7400b2a000000000, 0x7400b3f000000000, 0x7200baa000000000, + 0x7200bbf000000000, 0x7200b80000000000, 0x7200b95000000000, + 0x7100bd5000000000, 0x7100bc0000000000, 0x7100bff000000000, + 0x7100bea000000000, 0x7d00ad5000000000, 0x7d00ac0000000000, + 0x7d00aff000000000, 0x7d00aea000000000, 0x7e00aaa000000000, + 0x7e00abf000000000, 0x7e00a80000000000, 0x7e00a95000000000, + 0x7800a00000000000, 0x7800a15000000000, 0x7800a2a000000000, + 0x7800a3f000000000, 0x7b00a7f000000000, 0x7b00a6a000000000, + 0x7b00a55000000000, 0x7b00a40000000000, 0x6000800000000000, + 0x6000815000000000, 0x600082a000000000, 0x600083f000000000, + 0x630087f000000000, 0x630086a000000000, 0x6300855000000000, + 0x6300840000000000, 0x65008d5000000000, 0x65008c0000000000, + 0x65008ff000000000, 0x65008ea000000000, 0x66008aa000000000, + 0x66008bf000000000, 0x6600880000000000, 0x6600895000000000, + 0x6a009aa000000000, 0x6a009bf000000000, 0x6a00980000000000, + 0x6a00995000000000, 0x69009d5000000000, 0x69009c0000000000, + 0x69009ff000000000, 0x69009ea000000000, 0x6f0097f000000000, + 0x6f0096a000000000, 0x6f00955000000000, 0x6f00940000000000, + 0x6c00900000000000, 0x6c00915000000000, 0x6c0092a000000000, + 0x6c0093f000000000}, + {0x0000000000000000, 0x0001500000000000, 0x0002a00000000000, + 0x0003f00000000000, 0x0004400100000000, 0x0005100100000000, + 0x0006e00100000000, 0x0007b00100000000, 0x0008800200000000, + 0x0009d00200000000, 0x000a200200000000, 0x000b700200000000, + 0x000cc00300000000, 0x000d900300000000, 0x000e600300000000, + 0x000f300300000000, 0x0010000500000000, 0x0011500500000000, + 0x0012a00500000000, 0x0013f00500000000, 0x0014400400000000, + 0x0015100400000000, 0x0016e00400000000, 0x0017b00400000000, + 0x0018800700000000, 0x0019d00700000000, 0x001a200700000000, + 0x001b700700000000, 0x001cc00600000000, 0x001d900600000000, + 0x001e600600000000, 0x001f300600000000, 0x0020000a00000000, + 0x0021500a00000000, 0x0022a00a00000000, 0x0023f00a00000000, + 0x0024400b00000000, 0x0025100b00000000, 0x0026e00b00000000, + 0x0027b00b00000000, 0x0028800800000000, 0x0029d00800000000, + 0x002a200800000000, 0x002b700800000000, 0x002cc00900000000, + 0x002d900900000000, 0x002e600900000000, 0x002f300900000000, + 0x0030000f00000000, 0x0031500f00000000, 0x0032a00f00000000, + 0x0033f00f00000000, 0x0034400e00000000, 0x0035100e00000000, + 0x0036e00e00000000, 0x0037b00e00000000, 0x0038800d00000000, + 0x0039d00d00000000, 0x003a200d00000000, 0x003b700d00000000, + 0x003cc00c00000000, 0x003d900c00000000, 0x003e600c00000000, + 0x003f300c00000000, 0x0040001400000000, 0x0041501400000000, + 0x0042a01400000000, 0x0043f01400000000, 0x0044401500000000, + 0x0045101500000000, 0x0046e01500000000, 0x0047b01500000000, + 0x0048801600000000, 0x0049d01600000000, 0x004a201600000000, + 0x004b701600000000, 0x004cc01700000000, 0x004d901700000000, + 0x004e601700000000, 0x004f301700000000, 0x0050001100000000, + 0x0051501100000000, 0x0052a01100000000, 0x0053f01100000000, + 0x0054401000000000, 0x0055101000000000, 0x0056e01000000000, + 0x0057b01000000000, 0x0058801300000000, 0x0059d01300000000, + 0x005a201300000000, 0x005b701300000000, 0x005cc01200000000, + 0x005d901200000000, 0x005e601200000000, 0x005f301200000000, + 0x0060001e00000000, 0x0061501e00000000, 0x0062a01e00000000, + 0x0063f01e00000000, 0x0064401f00000000, 0x0065101f00000000, + 0x0066e01f00000000, 0x0067b01f00000000, 0x0068801c00000000, + 0x0069d01c00000000, 0x006a201c00000000, 0x006b701c00000000, + 0x006cc01d00000000, 0x006d901d00000000, 0x006e601d00000000, + 0x006f301d00000000, 0x0070001b00000000, 0x0071501b00000000, + 0x0072a01b00000000, 0x0073f01b00000000, 0x0074401a00000000, + 0x0075101a00000000, 0x0076e01a00000000, 0x0077b01a00000000, + 0x0078801900000000, 0x0079d01900000000, 0x007a201900000000, + 0x007b701900000000, 0x007cc01800000000, 0x007d901800000000, + 0x007e601800000000, 0x007f301800000000, 0x0080002800000000, + 0x0081502800000000, 0x0082a02800000000, 0x0083f02800000000, + 0x0084402900000000, 0x0085102900000000, 0x0086e02900000000, + 0x0087b02900000000, 0x0088802a00000000, 0x0089d02a00000000, + 0x008a202a00000000, 0x008b702a00000000, 0x008cc02b00000000, + 0x008d902b00000000, 0x008e602b00000000, 0x008f302b00000000, + 0x0090002d00000000, 0x0091502d00000000, 0x0092a02d00000000, + 0x0093f02d00000000, 0x0094402c00000000, 0x0095102c00000000, + 0x0096e02c00000000, 0x0097b02c00000000, 0x0098802f00000000, + 0x0099d02f00000000, 0x009a202f00000000, 0x009b702f00000000, + 0x009cc02e00000000, 0x009d902e00000000, 0x009e602e00000000, + 0x009f302e00000000, 0x00a0002200000000, 0x00a1502200000000, + 0x00a2a02200000000, 0x00a3f02200000000, 0x00a4402300000000, + 0x00a5102300000000, 0x00a6e02300000000, 0x00a7b02300000000, + 0x00a8802000000000, 0x00a9d02000000000, 0x00aa202000000000, + 0x00ab702000000000, 0x00acc02100000000, 0x00ad902100000000, + 0x00ae602100000000, 0x00af302100000000, 0x00b0002700000000, + 0x00b1502700000000, 0x00b2a02700000000, 0x00b3f02700000000, + 0x00b4402600000000, 0x00b5102600000000, 0x00b6e02600000000, + 0x00b7b02600000000, 0x00b8802500000000, 0x00b9d02500000000, + 0x00ba202500000000, 0x00bb702500000000, 0x00bcc02400000000, + 0x00bd902400000000, 0x00be602400000000, 0x00bf302400000000, + 0x00c0003c00000000, 0x00c1503c00000000, 0x00c2a03c00000000, + 0x00c3f03c00000000, 0x00c4403d00000000, 0x00c5103d00000000, + 0x00c6e03d00000000, 0x00c7b03d00000000, 0x00c8803e00000000, + 0x00c9d03e00000000, 0x00ca203e00000000, 0x00cb703e00000000, + 0x00ccc03f00000000, 0x00cd903f00000000, 0x00ce603f00000000, + 0x00cf303f00000000, 0x00d0003900000000, 0x00d1503900000000, + 0x00d2a03900000000, 0x00d3f03900000000, 0x00d4403800000000, + 0x00d5103800000000, 0x00d6e03800000000, 0x00d7b03800000000, + 0x00d8803b00000000, 0x00d9d03b00000000, 0x00da203b00000000, + 0x00db703b00000000, 0x00dcc03a00000000, 0x00dd903a00000000, + 0x00de603a00000000, 0x00df303a00000000, 0x00e0003600000000, + 0x00e1503600000000, 0x00e2a03600000000, 0x00e3f03600000000, + 0x00e4403700000000, 0x00e5103700000000, 0x00e6e03700000000, + 0x00e7b03700000000, 0x00e8803400000000, 0x00e9d03400000000, + 0x00ea203400000000, 0x00eb703400000000, 0x00ecc03500000000, + 0x00ed903500000000, 0x00ee603500000000, 0x00ef303500000000, + 0x00f0003300000000, 0x00f1503300000000, 0x00f2a03300000000, + 0x00f3f03300000000, 0x00f4403200000000, 0x00f5103200000000, + 0x00f6e03200000000, 0x00f7b03200000000, 0x00f8803100000000, + 0x00f9d03100000000, 0x00fa203100000000, 0x00fb703100000000, + 0x00fcc03000000000, 0x00fd903000000000, 0x00fe603000000000, + 0x00ff303000000000}, + {0x0000000000000000, 0x0150000000000000, 0x02a0000000000000, + 0x03f0000000000000, 0x0440010000000000, 0x0510010000000000, + 0x06e0010000000000, 0x07b0010000000000, 0x0880020000000000, + 0x09d0020000000000, 0x0a20020000000000, 0x0b70020000000000, + 0x0cc0030000000000, 0x0d90030000000000, 0x0e60030000000000, + 0x0f30030000000000, 0x1000050000000000, 0x1150050000000000, + 0x12a0050000000000, 0x13f0050000000000, 0x1440040000000000, + 0x1510040000000000, 0x16e0040000000000, 0x17b0040000000000, + 0x1880070000000000, 0x19d0070000000000, 0x1a20070000000000, + 0x1b70070000000000, 0x1cc0060000000000, 0x1d90060000000000, + 0x1e60060000000000, 0x1f30060000000000, 0x20000a0000000000, + 0x21500a0000000000, 0x22a00a0000000000, 0x23f00a0000000000, + 0x24400b0000000000, 0x25100b0000000000, 0x26e00b0000000000, + 0x27b00b0000000000, 0x2880080000000000, 0x29d0080000000000, + 0x2a20080000000000, 0x2b70080000000000, 0x2cc0090000000000, + 0x2d90090000000000, 0x2e60090000000000, 0x2f30090000000000, + 0x30000f0000000000, 0x31500f0000000000, 0x32a00f0000000000, + 0x33f00f0000000000, 0x34400e0000000000, 0x35100e0000000000, + 0x36e00e0000000000, 0x37b00e0000000000, 0x38800d0000000000, + 0x39d00d0000000000, 0x3a200d0000000000, 0x3b700d0000000000, + 0x3cc00c0000000000, 0x3d900c0000000000, 0x3e600c0000000000, + 0x3f300c0000000000, 0x4000140000000000, 0x4150140000000000, + 0x42a0140000000000, 0x43f0140000000000, 0x4440150000000000, + 0x4510150000000000, 0x46e0150000000000, 0x47b0150000000000, + 0x4880160000000000, 0x49d0160000000000, 0x4a20160000000000, + 0x4b70160000000000, 0x4cc0170000000000, 0x4d90170000000000, + 0x4e60170000000000, 0x4f30170000000000, 0x5000110000000000, + 0x5150110000000000, 0x52a0110000000000, 0x53f0110000000000, + 0x5440100000000000, 0x5510100000000000, 0x56e0100000000000, + 0x57b0100000000000, 0x5880130000000000, 0x59d0130000000000, + 0x5a20130000000000, 0x5b70130000000000, 0x5cc0120000000000, + 0x5d90120000000000, 0x5e60120000000000, 0x5f30120000000000, + 0x60001e0000000000, 0x61501e0000000000, 0x62a01e0000000000, + 0x63f01e0000000000, 0x64401f0000000000, 0x65101f0000000000, + 0x66e01f0000000000, 0x67b01f0000000000, 0x68801c0000000000, + 0x69d01c0000000000, 0x6a201c0000000000, 0x6b701c0000000000, + 0x6cc01d0000000000, 0x6d901d0000000000, 0x6e601d0000000000, + 0x6f301d0000000000, 0x70001b0000000000, 0x71501b0000000000, + 0x72a01b0000000000, 0x73f01b0000000000, 0x74401a0000000000, + 0x75101a0000000000, 0x76e01a0000000000, 0x77b01a0000000000, + 0x7880190000000000, 0x79d0190000000000, 0x7a20190000000000, + 0x7b70190000000000, 0x7cc0180000000000, 0x7d90180000000000, + 0x7e60180000000000, 0x7f30180000000000, 0x8000280000000000, + 0x8150280000000000, 0x82a0280000000000, 0x83f0280000000000, + 0x8440290000000000, 0x8510290000000000, 0x86e0290000000000, + 0x87b0290000000000, 0x88802a0000000000, 0x89d02a0000000000, + 0x8a202a0000000000, 0x8b702a0000000000, 0x8cc02b0000000000, + 0x8d902b0000000000, 0x8e602b0000000000, 0x8f302b0000000000, + 0x90002d0000000000, 0x91502d0000000000, 0x92a02d0000000000, + 0x93f02d0000000000, 0x94402c0000000000, 0x95102c0000000000, + 0x96e02c0000000000, 0x97b02c0000000000, 0x98802f0000000000, + 0x99d02f0000000000, 0x9a202f0000000000, 0x9b702f0000000000, + 0x9cc02e0000000000, 0x9d902e0000000000, 0x9e602e0000000000, + 0x9f302e0000000000, 0xa000220000000000, 0xa150220000000000, + 0xa2a0220000000000, 0xa3f0220000000000, 0xa440230000000000, + 0xa510230000000000, 0xa6e0230000000000, 0xa7b0230000000000, + 0xa880200000000000, 0xa9d0200000000000, 0xaa20200000000000, + 0xab70200000000000, 0xacc0210000000000, 0xad90210000000000, + 0xae60210000000000, 0xaf30210000000000, 0xb000270000000000, + 0xb150270000000000, 0xb2a0270000000000, 0xb3f0270000000000, + 0xb440260000000000, 0xb510260000000000, 0xb6e0260000000000, + 0xb7b0260000000000, 0xb880250000000000, 0xb9d0250000000000, + 0xba20250000000000, 0xbb70250000000000, 0xbcc0240000000000, + 0xbd90240000000000, 0xbe60240000000000, 0xbf30240000000000, + 0xc0003c0000000000, 0xc1503c0000000000, 0xc2a03c0000000000, + 0xc3f03c0000000000, 0xc4403d0000000000, 0xc5103d0000000000, + 0xc6e03d0000000000, 0xc7b03d0000000000, 0xc8803e0000000000, + 0xc9d03e0000000000, 0xca203e0000000000, 0xcb703e0000000000, + 0xccc03f0000000000, 0xcd903f0000000000, 0xce603f0000000000, + 0xcf303f0000000000, 0xd000390000000000, 0xd150390000000000, + 0xd2a0390000000000, 0xd3f0390000000000, 0xd440380000000000, + 0xd510380000000000, 0xd6e0380000000000, 0xd7b0380000000000, + 0xd8803b0000000000, 0xd9d03b0000000000, 0xda203b0000000000, + 0xdb703b0000000000, 0xdcc03a0000000000, 0xdd903a0000000000, + 0xde603a0000000000, 0xdf303a0000000000, 0xe000360000000000, + 0xe150360000000000, 0xe2a0360000000000, 0xe3f0360000000000, + 0xe440370000000000, 0xe510370000000000, 0xe6e0370000000000, + 0xe7b0370000000000, 0xe880340000000000, 0xe9d0340000000000, + 0xea20340000000000, 0xeb70340000000000, 0xecc0350000000000, + 0xed90350000000000, 0xee60350000000000, 0xef30350000000000, + 0xf000330000000000, 0xf150330000000000, 0xf2a0330000000000, + 0xf3f0330000000000, 0xf440320000000000, 0xf510320000000000, + 0xf6e0320000000000, 0xf7b0320000000000, 0xf880310000000000, + 0xf9d0310000000000, 0xfa20310000000000, 0xfb70310000000000, + 0xfcc0300000000000, 0xfd90300000000000, 0xfe60300000000000, + 0xff30300000000000}, + {0x0000000000000000, 0x5101919000000000, 0xa102219100000000, + 0xf003b00100000000, 0x4105419200000000, 0x1004d00200000000, + 0xe007600300000000, 0xb106f19300000000, 0x810a819400000000, + 0xd00b100400000000, 0x2008a00500000000, 0x7109319500000000, + 0xc00fc00600000000, 0x910e519600000000, 0x610de19700000000, + 0x300c700700000000, 0x0115019900000000, 0x5014900900000000, + 0xa017200800000000, 0xf116b19800000000, 0x4010400b00000000, + 0x1111d19b00000000, 0xe112619a00000000, 0xb013f00a00000000, + 0x801f800d00000000, 0xd11e119d00000000, 0x211da19c00000000, + 0x701c300c00000000, 0xc11ac19f00000000, 0x901b500f00000000, + 0x6018e00e00000000, 0x3119719e00000000, 0x012a018200000000, + 0x502b901200000000, 0xa028201300000000, 0xf129b18300000000, + 0x402f401000000000, 0x112ed18000000000, 0xe12d618100000000, + 0xb02cf01100000000, 0x8020801600000000, 0xd121118600000000, + 0x2122a18700000000, 0x7023301700000000, 0xc125c18400000000, + 0x9024501400000000, 0x6027e01500000000, 0x3126718500000000, + 0x003f001b00000000, 0x513e918b00000000, 0xa13d218a00000000, + 0xf03cb01a00000000, 0x413a418900000000, 0x103bd01900000000, + 0xe038601800000000, 0xb139f18800000000, 0x8135818f00000000, + 0xd034101f00000000, 0x2037a01e00000000, 0x7136318e00000000, + 0xc030c01d00000000, 0x9131518d00000000, 0x6132e18c00000000, + 0x3033701c00000000, 0x015401b400000000, 0x5055902400000000, + 0xa056202500000000, 0xf157b1b500000000, 0x4051402600000000, + 0x1150d1b600000000, 0xe15361b700000000, 0xb052f02700000000, + 0x805e802000000000, 0xd15f11b000000000, 0x215ca1b100000000, + 0x705d302100000000, 0xc15bc1b200000000, 0x905a502200000000, + 0x6059e02300000000, 0x315871b300000000, 0x0041002d00000000, + 0x514091bd00000000, 0xa14321bc00000000, 0xf042b02c00000000, + 0x414441bf00000000, 0x1045d02f00000000, 0xe046602e00000000, + 0xb147f1be00000000, 0x814b81b900000000, 0xd04a102900000000, + 0x2049a02800000000, 0x714831b800000000, 0xc04ec02b00000000, + 0x914f51bb00000000, 0x614ce1ba00000000, 0x304d702a00000000, + 0x007e003600000000, 0x517f91a600000000, 0xa17c21a700000000, + 0xf07db03700000000, 0x417b41a400000000, 0x107ad03400000000, + 0xe079603500000000, 0xb178f1a500000000, 0x817481a200000000, + 0xd075103200000000, 0x2076a03300000000, 0x717731a300000000, + 0xc071c03000000000, 0x917051a000000000, 0x6173e1a100000000, + 0x3072703100000000, 0x016b01af00000000, 0x506a903f00000000, + 0xa069203e00000000, 0xf168b1ae00000000, 0x406e403d00000000, + 0x116fd1ad00000000, 0xe16c61ac00000000, 0xb06df03c00000000, + 0x8061803b00000000, 0xd16011ab00000000, 0x2163a1aa00000000, + 0x7062303a00000000, 0xc164c1a900000000, 0x9065503900000000, + 0x6066e03800000000, 0x316771a800000000, 0x01a801d800000000, + 0x50a9904800000000, 0xa0aa204900000000, 0xf1abb1d900000000, + 0x40ad404a00000000, 0x11acd1da00000000, 0xe1af61db00000000, + 0xb0aef04b00000000, 0x80a2804c00000000, 0xd1a311dc00000000, + 0x21a0a1dd00000000, 0x70a1304d00000000, 0xc1a7c1de00000000, + 0x90a6504e00000000, 0x60a5e04f00000000, 0x31a471df00000000, + 0x00bd004100000000, 0x51bc91d100000000, 0xa1bf21d000000000, + 0xf0beb04000000000, 0x41b841d300000000, 0x10b9d04300000000, + 0xe0ba604200000000, 0xb1bbf1d200000000, 0x81b781d500000000, + 0xd0b6104500000000, 0x20b5a04400000000, 0x71b431d400000000, + 0xc0b2c04700000000, 0x91b351d700000000, 0x61b0e1d600000000, + 0x30b1704600000000, 0x0082005a00000000, 0x518391ca00000000, + 0xa18021cb00000000, 0xf081b05b00000000, 0x418741c800000000, + 0x1086d05800000000, 0xe085605900000000, 0xb184f1c900000000, + 0x818881ce00000000, 0xd089105e00000000, 0x208aa05f00000000, + 0x718b31cf00000000, 0xc08dc05c00000000, 0x918c51cc00000000, + 0x618fe1cd00000000, 0x308e705d00000000, 0x019701c300000000, + 0x5096905300000000, 0xa095205200000000, 0xf194b1c200000000, + 0x4092405100000000, 0x1193d1c100000000, 0xe19061c000000000, + 0xb091f05000000000, 0x809d805700000000, 0xd19c11c700000000, + 0x219fa1c600000000, 0x709e305600000000, 0xc198c1c500000000, + 0x9099505500000000, 0x609ae05400000000, 0x319b71c400000000, + 0x00fc006c00000000, 0x51fd91fc00000000, 0xa1fe21fd00000000, + 0xf0ffb06d00000000, 0x41f941fe00000000, 0x10f8d06e00000000, + 0xe0fb606f00000000, 0xb1faf1ff00000000, 0x81f681f800000000, + 0xd0f7106800000000, 0x20f4a06900000000, 0x71f531f900000000, + 0xc0f3c06a00000000, 0x91f251fa00000000, 0x61f1e1fb00000000, + 0x30f0706b00000000, 0x01e901f500000000, 0x50e8906500000000, + 0xa0eb206400000000, 0xf1eab1f400000000, 0x40ec406700000000, + 0x11edd1f700000000, 0xe1ee61f600000000, 0xb0eff06600000000, + 0x80e3806100000000, 0xd1e211f100000000, 0x21e1a1f000000000, + 0x70e0306000000000, 0xc1e6c1f300000000, 0x90e7506300000000, + 0x60e4e06200000000, 0x31e571f200000000, 0x01d601ee00000000, + 0x50d7907e00000000, 0xa0d4207f00000000, 0xf1d5b1ef00000000, + 0x40d3407c00000000, 0x11d2d1ec00000000, 0xe1d161ed00000000, + 0xb0d0f07d00000000, 0x80dc807a00000000, 0xd1dd11ea00000000, + 0x21dea1eb00000000, 0x70df307b00000000, 0xc1d9c1e800000000, + 0x90d8507800000000, 0x60dbe07900000000, 0x31da71e900000000, + 0x00c3007700000000, 0x51c291e700000000, 0xa1c121e600000000, + 0xf0c0b07600000000, 0x41c641e500000000, 0x10c7d07500000000, + 0xe0c4607400000000, 0xb1c5f1e400000000, 0x81c981e300000000, + 0xd0c8107300000000, 0x20cba07200000000, 0x71ca31e200000000, + 0xc0ccc07100000000, 0x91cd51e100000000, 0x61cee1e000000000, + 0x30cf707000000000}, + {0x0000000000000000, 0x00c001bd00000000, 0x038000ca00000000, + 0x0340017700000000, 0x0500022400000000, 0x05c0039900000000, + 0x068002ee00000000, 0x0640035300000000, 0x0a00044800000000, + 0x0ac005f500000000, 0x0980048200000000, 0x0940053f00000000, + 0x0f00066c00000000, 0x0fc007d100000000, 0x0c8006a600000000, + 0x0c40071b00000000, 0x1400089000000000, 0x14c0092d00000000, + 0x1780085a00000000, 0x174009e700000000, 0x11000ab400000000, + 0x11c00b0900000000, 0x12800a7e00000000, 0x12400bc300000000, + 0x1e000cd800000000, 0x1ec00d6500000000, 0x1d800c1200000000, + 0x1d400daf00000000, 0x1b000efc00000000, 0x1bc00f4100000000, + 0x18800e3600000000, 0x18400f8b00000000, 0x2b00139000000000, + 0x2bc0122d00000000, 0x2880135a00000000, 0x284012e700000000, + 0x2e0011b400000000, 0x2ec0100900000000, 0x2d80117e00000000, + 0x2d4010c300000000, 0x210017d800000000, 0x21c0166500000000, + 0x2280171200000000, 0x224016af00000000, 0x240015fc00000000, + 0x24c0144100000000, 0x2780153600000000, 0x2740148b00000000, + 0x3f001b0000000000, 0x3fc01abd00000000, 0x3c801bca00000000, + 0x3c401a7700000000, 0x3a00192400000000, 0x3ac0189900000000, + 0x398019ee00000000, 0x3940185300000000, 0x35001f4800000000, + 0x35c01ef500000000, 0x36801f8200000000, 0x36401e3f00000000, + 0x30001d6c00000000, 0x30c01cd100000000, 0x33801da600000000, + 0x33401c1b00000000, 0x5500259000000000, 0x55c0242d00000000, + 0x5680255a00000000, 0x564024e700000000, 0x500027b400000000, + 0x50c0260900000000, 0x5380277e00000000, 0x534026c300000000, + 0x5f0021d800000000, 0x5fc0206500000000, 0x5c80211200000000, + 0x5c4020af00000000, 0x5a0023fc00000000, 0x5ac0224100000000, + 0x5980233600000000, 0x5940228b00000000, 0x41002d0000000000, + 0x41c02cbd00000000, 0x42802dca00000000, 0x42402c7700000000, + 0x44002f2400000000, 0x44c02e9900000000, 0x47802fee00000000, + 0x47402e5300000000, 0x4b00294800000000, 0x4bc028f500000000, + 0x4880298200000000, 0x4840283f00000000, 0x4e002b6c00000000, + 0x4ec02ad100000000, 0x4d802ba600000000, 0x4d402a1b00000000, + 0x7e00360000000000, 0x7ec037bd00000000, 0x7d8036ca00000000, + 0x7d40377700000000, 0x7b00342400000000, 0x7bc0359900000000, + 0x788034ee00000000, 0x7840355300000000, 0x7400324800000000, + 0x74c033f500000000, 0x7780328200000000, 0x7740333f00000000, + 0x7100306c00000000, 0x71c031d100000000, 0x728030a600000000, + 0x7240311b00000000, 0x6a003e9000000000, 0x6ac03f2d00000000, + 0x69803e5a00000000, 0x69403fe700000000, 0x6f003cb400000000, + 0x6fc03d0900000000, 0x6c803c7e00000000, 0x6c403dc300000000, + 0x60003ad800000000, 0x60c03b6500000000, 0x63803a1200000000, + 0x63403baf00000000, 0x650038fc00000000, 0x65c0394100000000, + 0x6680383600000000, 0x6640398b00000000, 0xa900499000000000, + 0xa9c0482d00000000, 0xaa80495a00000000, 0xaa4048e700000000, + 0xac004bb400000000, 0xacc04a0900000000, 0xaf804b7e00000000, + 0xaf404ac300000000, 0xa3004dd800000000, 0xa3c04c6500000000, + 0xa0804d1200000000, 0xa0404caf00000000, 0xa6004ffc00000000, + 0xa6c04e4100000000, 0xa5804f3600000000, 0xa5404e8b00000000, + 0xbd00410000000000, 0xbdc040bd00000000, 0xbe8041ca00000000, + 0xbe40407700000000, 0xb800432400000000, 0xb8c0429900000000, + 0xbb8043ee00000000, 0xbb40425300000000, 0xb700454800000000, + 0xb7c044f500000000, 0xb480458200000000, 0xb440443f00000000, + 0xb200476c00000000, 0xb2c046d100000000, 0xb18047a600000000, + 0xb140461b00000000, 0x82005a0000000000, 0x82c05bbd00000000, + 0x81805aca00000000, 0x81405b7700000000, 0x8700582400000000, + 0x87c0599900000000, 0x848058ee00000000, 0x8440595300000000, + 0x88005e4800000000, 0x88c05ff500000000, 0x8b805e8200000000, + 0x8b405f3f00000000, 0x8d005c6c00000000, 0x8dc05dd100000000, + 0x8e805ca600000000, 0x8e405d1b00000000, 0x9600529000000000, + 0x96c0532d00000000, 0x9580525a00000000, 0x954053e700000000, + 0x930050b400000000, 0x93c0510900000000, 0x9080507e00000000, + 0x904051c300000000, 0x9c0056d800000000, 0x9cc0576500000000, + 0x9f80561200000000, 0x9f4057af00000000, 0x990054fc00000000, + 0x99c0554100000000, 0x9a80543600000000, 0x9a40558b00000000, + 0xfc006c0000000000, 0xfcc06dbd00000000, 0xff806cca00000000, + 0xff406d7700000000, 0xf9006e2400000000, 0xf9c06f9900000000, + 0xfa806eee00000000, 0xfa406f5300000000, 0xf600684800000000, + 0xf6c069f500000000, 0xf580688200000000, 0xf540693f00000000, + 0xf3006a6c00000000, 0xf3c06bd100000000, 0xf0806aa600000000, + 0xf0406b1b00000000, 0xe800649000000000, 0xe8c0652d00000000, + 0xeb80645a00000000, 0xeb4065e700000000, 0xed0066b400000000, + 0xedc0670900000000, 0xee80667e00000000, 0xee4067c300000000, + 0xe20060d800000000, 0xe2c0616500000000, 0xe180601200000000, + 0xe14061af00000000, 0xe70062fc00000000, 0xe7c0634100000000, + 0xe480623600000000, 0xe440638b00000000, 0xd7007f9000000000, + 0xd7c07e2d00000000, 0xd4807f5a00000000, 0xd4407ee700000000, + 0xd2007db400000000, 0xd2c07c0900000000, 0xd1807d7e00000000, + 0xd1407cc300000000, 0xdd007bd800000000, 0xddc07a6500000000, + 0xde807b1200000000, 0xde407aaf00000000, 0xd80079fc00000000, + 0xd8c0784100000000, 0xdb80793600000000, 0xdb40788b00000000, + 0xc300770000000000, 0xc3c076bd00000000, 0xc08077ca00000000, + 0xc040767700000000, 0xc600752400000000, 0xc6c0749900000000, + 0xc58075ee00000000, 0xc540745300000000, 0xc900734800000000, + 0xc9c072f500000000, 0xca80738200000000, 0xca40723f00000000, + 0xcc00716c00000000, 0xccc070d100000000, 0xcf8071a600000000, + 0xcf40701b00000000}}; + +#else /* W == 4 */ + +static const crc_t crc_braid_table[][256] = { + {0x00000000, 0x6c90c100, 0xd9218200, 0xb5b14300, 0x02400403, + 0x6ed0c503, 0xdb618603, 0xb7f14703, 0x04800806, 0x6810c906, + 0xdda18a06, 0xb1314b06, 0x06c00c05, 0x6a50cd05, 0xdfe18e05, + 0xb3714f05, 0x0900100c, 0x6590d10c, 0xd021920c, 0xbcb1530c, + 0x0b40140f, 0x67d0d50f, 0xd261960f, 0xbef1570f, 0x0d80180a, + 0x6110d90a, 0xd4a19a0a, 0xb8315b0a, 0x0fc01c09, 0x6350dd09, + 0xd6e19e09, 0xba715f09, 0x12002018, 0x7e90e118, 0xcb21a218, + 0xa7b16318, 0x1040241b, 0x7cd0e51b, 0xc961a61b, 0xa5f1671b, + 0x1680281e, 0x7a10e91e, 0xcfa1aa1e, 0xa3316b1e, 0x14c02c1d, + 0x7850ed1d, 0xcde1ae1d, 0xa1716f1d, 0x1b003014, 0x7790f114, + 0xc221b214, 0xaeb17314, 0x19403417, 0x75d0f517, 0xc061b617, + 0xacf17717, 0x1f803812, 0x7310f912, 0xc6a1ba12, 0xaa317b12, + 0x1dc03c11, 0x7150fd11, 0xc4e1be11, 0xa8717f11, 0x24004030, + 0x48908130, 0xfd21c230, 0x91b10330, 0x26404433, 0x4ad08533, + 0xff61c633, 0x93f10733, 0x20804836, 0x4c108936, 0xf9a1ca36, + 0x95310b36, 0x22c04c35, 0x4e508d35, 0xfbe1ce35, 0x97710f35, + 0x2d00503c, 0x4190913c, 0xf421d23c, 0x98b1133c, 0x2f40543f, + 0x43d0953f, 0xf661d63f, 0x9af1173f, 0x2980583a, 0x4510993a, + 0xf0a1da3a, 0x9c311b3a, 0x2bc05c39, 0x47509d39, 0xf2e1de39, + 0x9e711f39, 0x36006028, 0x5a90a128, 0xef21e228, 0x83b12328, + 0x3440642b, 0x58d0a52b, 0xed61e62b, 0x81f1272b, 0x3280682e, + 0x5e10a92e, 0xeba1ea2e, 0x87312b2e, 0x30c06c2d, 0x5c50ad2d, + 0xe9e1ee2d, 0x85712f2d, 0x3f007024, 0x5390b124, 0xe621f224, + 0x8ab13324, 0x3d407427, 0x51d0b527, 0xe461f627, 0x88f13727, + 0x3b807822, 0x5710b922, 0xe2a1fa22, 0x8e313b22, 0x39c07c21, + 0x5550bd21, 0xe0e1fe21, 0x8c713f21, 0x48008060, 0x24904160, + 0x91210260, 0xfdb1c360, 0x4a408463, 0x26d04563, 0x93610663, + 0xfff1c763, 0x4c808866, 0x20104966, 0x95a10a66, 0xf931cb66, + 0x4ec08c65, 0x22504d65, 0x97e10e65, 0xfb71cf65, 0x4100906c, + 0x2d90516c, 0x9821126c, 0xf4b1d36c, 0x4340946f, 0x2fd0556f, + 0x9a61166f, 0xf6f1d76f, 0x4580986a, 0x2910596a, 0x9ca11a6a, + 0xf031db6a, 0x47c09c69, 0x2b505d69, 0x9ee11e69, 0xf271df69, + 0x5a00a078, 0x36906178, 0x83212278, 0xefb1e378, 0x5840a47b, + 0x34d0657b, 0x8161267b, 0xedf1e77b, 0x5e80a87e, 0x3210697e, + 0x87a12a7e, 0xeb31eb7e, 0x5cc0ac7d, 0x30506d7d, 0x85e12e7d, + 0xe971ef7d, 0x5300b074, 0x3f907174, 0x8a213274, 0xe6b1f374, + 0x5140b477, 0x3dd07577, 0x88613677, 0xe4f1f777, 0x5780b872, + 0x3b107972, 0x8ea13a72, 0xe231fb72, 0x55c0bc71, 0x39507d71, + 0x8ce13e71, 0xe071ff71, 0x6c00c050, 0x00900150, 0xb5214250, + 0xd9b18350, 0x6e40c453, 0x02d00553, 0xb7614653, 0xdbf18753, + 0x6880c856, 0x04100956, 0xb1a14a56, 0xdd318b56, 0x6ac0cc55, + 0x06500d55, 0xb3e14e55, 0xdf718f55, 0x6500d05c, 0x0990115c, + 0xbc21525c, 0xd0b1935c, 0x6740d45f, 0x0bd0155f, 0xbe61565f, + 0xd2f1975f, 0x6180d85a, 0x0d10195a, 0xb8a15a5a, 0xd4319b5a, + 0x63c0dc59, 0x0f501d59, 0xbae15e59, 0xd6719f59, 0x7e00e048, + 0x12902148, 0xa7216248, 0xcbb1a348, 0x7c40e44b, 0x10d0254b, + 0xa561664b, 0xc9f1a74b, 0x7a80e84e, 0x1610294e, 0xa3a16a4e, + 0xcf31ab4e, 0x78c0ec4d, 0x14502d4d, 0xa1e16e4d, 0xcd71af4d, + 0x7700f044, 0x1b903144, 0xae217244, 0xc2b1b344, 0x7540f447, + 0x19d03547, 0xac617647, 0xc0f1b747, 0x7380f842, 0x1f103942, + 0xaaa17a42, 0xc631bb42, 0x71c0fc41, 0x1d503d41, 0xa8e17e41, + 0xc471bf41}, + {0x00000000, 0x900100c0, 0x90010183, 0x00000143, 0x90010305, + 0x000003c5, 0x00000286, 0x90010246, 0x90010609, 0x000006c9, + 0x0000078a, 0x9001074a, 0x0000050c, 0x900105cc, 0x9001048f, + 0x0000044f, 0x90010c11, 0x00000cd1, 0x00000d92, 0x90010d52, + 0x00000f14, 0x90010fd4, 0x90010e97, 0x00000e57, 0x00000a18, + 0x90010ad8, 0x90010b9b, 0x00000b5b, 0x9001091d, 0x000009dd, + 0x0000089e, 0x9001085e, 0x90011821, 0x000018e1, 0x000019a2, + 0x90011962, 0x00001b24, 0x90011be4, 0x90011aa7, 0x00001a67, + 0x00001e28, 0x90011ee8, 0x90011fab, 0x00001f6b, 0x90011d2d, + 0x00001ded, 0x00001cae, 0x90011c6e, 0x00001430, 0x900114f0, + 0x900115b3, 0x00001573, 0x90011735, 0x000017f5, 0x000016b6, + 0x90011676, 0x90011239, 0x000012f9, 0x000013ba, 0x9001137a, + 0x0000113c, 0x900111fc, 0x900110bf, 0x0000107f, 0x90013041, + 0x00003081, 0x000031c2, 0x90013102, 0x00003344, 0x90013384, + 0x900132c7, 0x00003207, 0x00003648, 0x90013688, 0x900137cb, + 0x0000370b, 0x9001354d, 0x0000358d, 0x000034ce, 0x9001340e, + 0x00003c50, 0x90013c90, 0x90013dd3, 0x00003d13, 0x90013f55, + 0x00003f95, 0x00003ed6, 0x90013e16, 0x90013a59, 0x00003a99, + 0x00003bda, 0x90013b1a, 0x0000395c, 0x9001399c, 0x900138df, + 0x0000381f, 0x00002860, 0x900128a0, 0x900129e3, 0x00002923, + 0x90012b65, 0x00002ba5, 0x00002ae6, 0x90012a26, 0x90012e69, + 0x00002ea9, 0x00002fea, 0x90012f2a, 0x00002d6c, 0x90012dac, + 0x90012cef, 0x00002c2f, 0x90012471, 0x000024b1, 0x000025f2, + 0x90012532, 0x00002774, 0x900127b4, 0x900126f7, 0x00002637, + 0x00002278, 0x900122b8, 0x900123fb, 0x0000233b, 0x9001217d, + 0x000021bd, 0x000020fe, 0x9001203e, 0x90016081, 0x00006041, + 0x00006102, 0x900161c2, 0x00006384, 0x90016344, 0x90016207, + 0x000062c7, 0x00006688, 0x90016648, 0x9001670b, 0x000067cb, + 0x9001658d, 0x0000654d, 0x0000640e, 0x900164ce, 0x00006c90, + 0x90016c50, 0x90016d13, 0x00006dd3, 0x90016f95, 0x00006f55, + 0x00006e16, 0x90016ed6, 0x90016a99, 0x00006a59, 0x00006b1a, + 0x90016bda, 0x0000699c, 0x9001695c, 0x9001681f, 0x000068df, + 0x000078a0, 0x90017860, 0x90017923, 0x000079e3, 0x90017ba5, + 0x00007b65, 0x00007a26, 0x90017ae6, 0x90017ea9, 0x00007e69, + 0x00007f2a, 0x90017fea, 0x00007dac, 0x90017d6c, 0x90017c2f, + 0x00007cef, 0x900174b1, 0x00007471, 0x00007532, 0x900175f2, + 0x000077b4, 0x90017774, 0x90017637, 0x000076f7, 0x000072b8, + 0x90017278, 0x9001733b, 0x000073fb, 0x900171bd, 0x0000717d, + 0x0000703e, 0x900170fe, 0x000050c0, 0x90015000, 0x90015143, + 0x00005183, 0x900153c5, 0x00005305, 0x00005246, 0x90015286, + 0x900156c9, 0x00005609, 0x0000574a, 0x9001578a, 0x000055cc, + 0x9001550c, 0x9001544f, 0x0000548f, 0x90015cd1, 0x00005c11, + 0x00005d52, 0x90015d92, 0x00005fd4, 0x90015f14, 0x90015e57, + 0x00005e97, 0x00005ad8, 0x90015a18, 0x90015b5b, 0x00005b9b, + 0x900159dd, 0x0000591d, 0x0000585e, 0x9001589e, 0x900148e1, + 0x00004821, 0x00004962, 0x900149a2, 0x00004be4, 0x90014b24, + 0x90014a67, 0x00004aa7, 0x00004ee8, 0x90014e28, 0x90014f6b, + 0x00004fab, 0x90014ded, 0x00004d2d, 0x00004c6e, 0x90014cae, + 0x000044f0, 0x90014430, 0x90014573, 0x000045b3, 0x900147f5, + 0x00004735, 0x00004676, 0x900146b6, 0x900142f9, 0x00004239, + 0x0000437a, 0x900143ba, 0x000041fc, 0x9001413c, 0x9001407f, + 0x000040bf}, + {0x00000000, 0x9001c101, 0x90008201, 0x00014300, 0x90020401, + 0x0003c500, 0x00028600, 0x90034701, 0x90070801, 0x0006c900, + 0x00078a00, 0x90064b01, 0x00050c00, 0x9004cd01, 0x90058e01, + 0x00044f00, 0x900d1001, 0x000cd100, 0x000d9200, 0x900c5301, + 0x000f1400, 0x900ed501, 0x900f9601, 0x000e5700, 0x000a1800, + 0x900bd901, 0x900a9a01, 0x000b5b00, 0x90081c01, 0x0009dd00, + 0x00089e00, 0x90095f01, 0x90192001, 0x0018e100, 0x0019a200, + 0x90186301, 0x001b2400, 0x901ae501, 0x901ba601, 0x001a6700, + 0x001e2800, 0x901fe901, 0x901eaa01, 0x001f6b00, 0x901c2c01, + 0x001ded00, 0x001cae00, 0x901d6f01, 0x00143000, 0x9015f101, + 0x9014b201, 0x00157300, 0x90163401, 0x0017f500, 0x0016b600, + 0x90177701, 0x90133801, 0x0012f900, 0x0013ba00, 0x90127b01, + 0x00113c00, 0x9010fd01, 0x9011be01, 0x00107f00, 0x90314001, + 0x00308100, 0x0031c200, 0x90300301, 0x00334400, 0x90328501, + 0x9033c601, 0x00320700, 0x00364800, 0x90378901, 0x9036ca01, + 0x00370b00, 0x90344c01, 0x00358d00, 0x0034ce00, 0x90350f01, + 0x003c5000, 0x903d9101, 0x903cd201, 0x003d1300, 0x903e5401, + 0x003f9500, 0x003ed600, 0x903f1701, 0x903b5801, 0x003a9900, + 0x003bda00, 0x903a1b01, 0x00395c00, 0x90389d01, 0x9039de01, + 0x00381f00, 0x00286000, 0x9029a101, 0x9028e201, 0x00292300, + 0x902a6401, 0x002ba500, 0x002ae600, 0x902b2701, 0x902f6801, + 0x002ea900, 0x002fea00, 0x902e2b01, 0x002d6c00, 0x902cad01, + 0x902dee01, 0x002c2f00, 0x90257001, 0x0024b100, 0x0025f200, + 0x90243301, 0x00277400, 0x9026b501, 0x9027f601, 0x00263700, + 0x00227800, 0x9023b901, 0x9022fa01, 0x00233b00, 0x90207c01, + 0x0021bd00, 0x0020fe00, 0x90213f01, 0x90618001, 0x00604100, + 0x00610200, 0x9060c301, 0x00638400, 0x90624501, 0x90630601, + 0x0062c700, 0x00668800, 0x90674901, 0x90660a01, 0x0067cb00, + 0x90648c01, 0x00654d00, 0x00640e00, 0x9065cf01, 0x006c9000, + 0x906d5101, 0x906c1201, 0x006dd300, 0x906e9401, 0x006f5500, + 0x006e1600, 0x906fd701, 0x906b9801, 0x006a5900, 0x006b1a00, + 0x906adb01, 0x00699c00, 0x90685d01, 0x90691e01, 0x0068df00, + 0x0078a000, 0x90796101, 0x90782201, 0x0079e300, 0x907aa401, + 0x007b6500, 0x007a2600, 0x907be701, 0x907fa801, 0x007e6900, + 0x007f2a00, 0x907eeb01, 0x007dac00, 0x907c6d01, 0x907d2e01, + 0x007cef00, 0x9075b001, 0x00747100, 0x00753200, 0x9074f301, + 0x0077b400, 0x90767501, 0x90773601, 0x0076f700, 0x0072b800, + 0x90737901, 0x90723a01, 0x0073fb00, 0x9070bc01, 0x00717d00, + 0x00703e00, 0x9071ff01, 0x0050c000, 0x90510101, 0x90504201, + 0x00518300, 0x9052c401, 0x00530500, 0x00524600, 0x90538701, + 0x9057c801, 0x00560900, 0x00574a00, 0x90568b01, 0x0055cc00, + 0x90540d01, 0x90554e01, 0x00548f00, 0x905dd001, 0x005c1100, + 0x005d5200, 0x905c9301, 0x005fd400, 0x905e1501, 0x905f5601, + 0x005e9700, 0x005ad800, 0x905b1901, 0x905a5a01, 0x005b9b00, + 0x9058dc01, 0x00591d00, 0x00585e00, 0x90599f01, 0x9049e001, + 0x00482100, 0x00496200, 0x9048a301, 0x004be400, 0x904a2501, + 0x904b6601, 0x004aa700, 0x004ee800, 0x904f2901, 0x904e6a01, + 0x004fab00, 0x904cec01, 0x004d2d00, 0x004c6e00, 0x904daf01, + 0x0044f000, 0x90453101, 0x90447201, 0x0045b300, 0x9046f401, + 0x00473500, 0x00467600, 0x9047b701, 0x9043f801, 0x00423900, + 0x00437a00, 0x9042bb01, 0x0041fc00, 0x90403d01, 0x90417e01, + 0x0040bf00}, + {0x00000000, 0x90c00001, 0x91830001, 0x01430000, 0x93050001, + 0x03c50000, 0x02860000, 0x92460001, 0x96090001, 0x06c90000, + 0x078a0000, 0x974a0001, 0x050c0000, 0x95cc0001, 0x948f0001, + 0x044f0000, 0x9c110001, 0x0cd10000, 0x0d920000, 0x9d520001, + 0x0f140000, 0x9fd40001, 0x9e970001, 0x0e570000, 0x0a180000, + 0x9ad80001, 0x9b9b0001, 0x0b5b0000, 0x991d0001, 0x09dd0000, + 0x089e0000, 0x985e0001, 0x88210001, 0x18e10000, 0x19a20000, + 0x89620001, 0x1b240000, 0x8be40001, 0x8aa70001, 0x1a670000, + 0x1e280000, 0x8ee80001, 0x8fab0001, 0x1f6b0000, 0x8d2d0001, + 0x1ded0000, 0x1cae0000, 0x8c6e0001, 0x14300000, 0x84f00001, + 0x85b30001, 0x15730000, 0x87350001, 0x17f50000, 0x16b60000, + 0x86760001, 0x82390001, 0x12f90000, 0x13ba0000, 0x837a0001, + 0x113c0000, 0x81fc0001, 0x80bf0001, 0x107f0000, 0xa0410001, + 0x30810000, 0x31c20000, 0xa1020001, 0x33440000, 0xa3840001, + 0xa2c70001, 0x32070000, 0x36480000, 0xa6880001, 0xa7cb0001, + 0x370b0000, 0xa54d0001, 0x358d0000, 0x34ce0000, 0xa40e0001, + 0x3c500000, 0xac900001, 0xadd30001, 0x3d130000, 0xaf550001, + 0x3f950000, 0x3ed60000, 0xae160001, 0xaa590001, 0x3a990000, + 0x3bda0000, 0xab1a0001, 0x395c0000, 0xa99c0001, 0xa8df0001, + 0x381f0000, 0x28600000, 0xb8a00001, 0xb9e30001, 0x29230000, + 0xbb650001, 0x2ba50000, 0x2ae60000, 0xba260001, 0xbe690001, + 0x2ea90000, 0x2fea0000, 0xbf2a0001, 0x2d6c0000, 0xbdac0001, + 0xbcef0001, 0x2c2f0000, 0xb4710001, 0x24b10000, 0x25f20000, + 0xb5320001, 0x27740000, 0xb7b40001, 0xb6f70001, 0x26370000, + 0x22780000, 0xb2b80001, 0xb3fb0001, 0x233b0000, 0xb17d0001, + 0x21bd0000, 0x20fe0000, 0xb03e0001, 0xf0810001, 0x60410000, + 0x61020000, 0xf1c20001, 0x63840000, 0xf3440001, 0xf2070001, + 0x62c70000, 0x66880000, 0xf6480001, 0xf70b0001, 0x67cb0000, + 0xf58d0001, 0x654d0000, 0x640e0000, 0xf4ce0001, 0x6c900000, + 0xfc500001, 0xfd130001, 0x6dd30000, 0xff950001, 0x6f550000, + 0x6e160000, 0xfed60001, 0xfa990001, 0x6a590000, 0x6b1a0000, + 0xfbda0001, 0x699c0000, 0xf95c0001, 0xf81f0001, 0x68df0000, + 0x78a00000, 0xe8600001, 0xe9230001, 0x79e30000, 0xeba50001, + 0x7b650000, 0x7a260000, 0xeae60001, 0xeea90001, 0x7e690000, + 0x7f2a0000, 0xefea0001, 0x7dac0000, 0xed6c0001, 0xec2f0001, + 0x7cef0000, 0xe4b10001, 0x74710000, 0x75320000, 0xe5f20001, + 0x77b40000, 0xe7740001, 0xe6370001, 0x76f70000, 0x72b80000, + 0xe2780001, 0xe33b0001, 0x73fb0000, 0xe1bd0001, 0x717d0000, + 0x703e0000, 0xe0fe0001, 0x50c00000, 0xc0000001, 0xc1430001, + 0x51830000, 0xc3c50001, 0x53050000, 0x52460000, 0xc2860001, + 0xc6c90001, 0x56090000, 0x574a0000, 0xc78a0001, 0x55cc0000, + 0xc50c0001, 0xc44f0001, 0x548f0000, 0xccd10001, 0x5c110000, + 0x5d520000, 0xcd920001, 0x5fd40000, 0xcf140001, 0xce570001, + 0x5e970000, 0x5ad80000, 0xca180001, 0xcb5b0001, 0x5b9b0000, + 0xc9dd0001, 0x591d0000, 0x585e0000, 0xc89e0001, 0xd8e10001, + 0x48210000, 0x49620000, 0xd9a20001, 0x4be40000, 0xdb240001, + 0xda670001, 0x4aa70000, 0x4ee80000, 0xde280001, 0xdf6b0001, + 0x4fab0000, 0xdded0001, 0x4d2d0000, 0x4c6e0000, 0xdcae0001, + 0x44f00000, 0xd4300001, 0xd5730001, 0x45b30000, 0xd7f50001, + 0x47350000, 0x46760000, 0xd6b60001, 0xd2f90001, 0x42390000, + 0x437a0000, 0xd3ba0001, 0x41fc0000, 0xd13c0001, 0xd07f0001, + 0x40bf0000}}; + +static const word_t crc_braid_big_table[][256] = { + {0x00000000, 0x0100c090, 0x01008391, 0x00004301, 0x01000593, + 0x0000c503, 0x00008602, 0x01004692, 0x01000996, 0x0000c906, + 0x00008a07, 0x01004a97, 0x00000c05, 0x0100cc95, 0x01008f94, + 0x00004f04, 0x0100119c, 0x0000d10c, 0x0000920d, 0x0100529d, + 0x0000140f, 0x0100d49f, 0x0100979e, 0x0000570e, 0x0000180a, + 0x0100d89a, 0x01009b9b, 0x00005b0b, 0x01001d99, 0x0000dd09, + 0x00009e08, 0x01005e98, 0x01002188, 0x0000e118, 0x0000a219, + 0x01006289, 0x0000241b, 0x0100e48b, 0x0100a78a, 0x0000671a, + 0x0000281e, 0x0100e88e, 0x0100ab8f, 0x00006b1f, 0x01002d8d, + 0x0000ed1d, 0x0000ae1c, 0x01006e8c, 0x00003014, 0x0100f084, + 0x0100b385, 0x00007315, 0x01003587, 0x0000f517, 0x0000b616, + 0x01007686, 0x01003982, 0x0000f912, 0x0000ba13, 0x01007a83, + 0x00003c11, 0x0100fc81, 0x0100bf80, 0x00007f10, 0x010041a0, + 0x00008130, 0x0000c231, 0x010002a1, 0x00004433, 0x010084a3, + 0x0100c7a2, 0x00000732, 0x00004836, 0x010088a6, 0x0100cba7, + 0x00000b37, 0x01004da5, 0x00008d35, 0x0000ce34, 0x01000ea4, + 0x0000503c, 0x010090ac, 0x0100d3ad, 0x0000133d, 0x010055af, + 0x0000953f, 0x0000d63e, 0x010016ae, 0x010059aa, 0x0000993a, + 0x0000da3b, 0x01001aab, 0x00005c39, 0x01009ca9, 0x0100dfa8, + 0x00001f38, 0x00006028, 0x0100a0b8, 0x0100e3b9, 0x00002329, + 0x010065bb, 0x0000a52b, 0x0000e62a, 0x010026ba, 0x010069be, + 0x0000a92e, 0x0000ea2f, 0x01002abf, 0x00006c2d, 0x0100acbd, + 0x0100efbc, 0x00002f2c, 0x010071b4, 0x0000b124, 0x0000f225, + 0x010032b5, 0x00007427, 0x0100b4b7, 0x0100f7b6, 0x00003726, + 0x00007822, 0x0100b8b2, 0x0100fbb3, 0x00003b23, 0x01007db1, + 0x0000bd21, 0x0000fe20, 0x01003eb0, 0x010081f0, 0x00004160, + 0x00000261, 0x0100c2f1, 0x00008463, 0x010044f3, 0x010007f2, + 0x0000c762, 0x00008866, 0x010048f6, 0x01000bf7, 0x0000cb67, + 0x01008df5, 0x00004d65, 0x00000e64, 0x0100cef4, 0x0000906c, + 0x010050fc, 0x010013fd, 0x0000d36d, 0x010095ff, 0x0000556f, + 0x0000166e, 0x0100d6fe, 0x010099fa, 0x0000596a, 0x00001a6b, + 0x0100dafb, 0x00009c69, 0x01005cf9, 0x01001ff8, 0x0000df68, + 0x0000a078, 0x010060e8, 0x010023e9, 0x0000e379, 0x0100a5eb, + 0x0000657b, 0x0000267a, 0x0100e6ea, 0x0100a9ee, 0x0000697e, + 0x00002a7f, 0x0100eaef, 0x0000ac7d, 0x01006ced, 0x01002fec, + 0x0000ef7c, 0x0100b1e4, 0x00007174, 0x00003275, 0x0100f2e5, + 0x0000b477, 0x010074e7, 0x010037e6, 0x0000f776, 0x0000b872, + 0x010078e2, 0x01003be3, 0x0000fb73, 0x0100bde1, 0x00007d71, + 0x00003e70, 0x0100fee0, 0x0000c050, 0x010000c0, 0x010043c1, + 0x00008351, 0x0100c5c3, 0x00000553, 0x00004652, 0x010086c2, + 0x0100c9c6, 0x00000956, 0x00004a57, 0x01008ac7, 0x0000cc55, + 0x01000cc5, 0x01004fc4, 0x00008f54, 0x0100d1cc, 0x0000115c, + 0x0000525d, 0x010092cd, 0x0000d45f, 0x010014cf, 0x010057ce, + 0x0000975e, 0x0000d85a, 0x010018ca, 0x01005bcb, 0x00009b5b, + 0x0100ddc9, 0x00001d59, 0x00005e58, 0x01009ec8, 0x0100e1d8, + 0x00002148, 0x00006249, 0x0100a2d9, 0x0000e44b, 0x010024db, + 0x010067da, 0x0000a74a, 0x0000e84e, 0x010028de, 0x01006bdf, + 0x0000ab4f, 0x0100eddd, 0x00002d4d, 0x00006e4c, 0x0100aedc, + 0x0000f044, 0x010030d4, 0x010073d5, 0x0000b345, 0x0100f5d7, + 0x00003547, 0x00007646, 0x0100b6d6, 0x0100f9d2, 0x00003942, + 0x00007a43, 0x0100bad3, 0x0000fc41, 0x01003cd1, 0x01007fd0, + 0x0000bf40}, + {0x00000000, 0x01c10190, 0x01820090, 0x00430100, 0x01040290, + 0x00c50300, 0x00860200, 0x01470390, 0x01080790, 0x00c90600, + 0x008a0700, 0x014b0690, 0x000c0500, 0x01cd0490, 0x018e0590, + 0x004f0400, 0x01100d90, 0x00d10c00, 0x00920d00, 0x01530c90, + 0x00140f00, 0x01d50e90, 0x01960f90, 0x00570e00, 0x00180a00, + 0x01d90b90, 0x019a0a90, 0x005b0b00, 0x011c0890, 0x00dd0900, + 0x009e0800, 0x015f0990, 0x01201990, 0x00e11800, 0x00a21900, + 0x01631890, 0x00241b00, 0x01e51a90, 0x01a61b90, 0x00671a00, + 0x00281e00, 0x01e91f90, 0x01aa1e90, 0x006b1f00, 0x012c1c90, + 0x00ed1d00, 0x00ae1c00, 0x016f1d90, 0x00301400, 0x01f11590, + 0x01b21490, 0x00731500, 0x01341690, 0x00f51700, 0x00b61600, + 0x01771790, 0x01381390, 0x00f91200, 0x00ba1300, 0x017b1290, + 0x003c1100, 0x01fd1090, 0x01be1190, 0x007f1000, 0x01403190, + 0x00813000, 0x00c23100, 0x01033090, 0x00443300, 0x01853290, + 0x01c63390, 0x00073200, 0x00483600, 0x01893790, 0x01ca3690, + 0x000b3700, 0x014c3490, 0x008d3500, 0x00ce3400, 0x010f3590, + 0x00503c00, 0x01913d90, 0x01d23c90, 0x00133d00, 0x01543e90, + 0x00953f00, 0x00d63e00, 0x01173f90, 0x01583b90, 0x00993a00, + 0x00da3b00, 0x011b3a90, 0x005c3900, 0x019d3890, 0x01de3990, + 0x001f3800, 0x00602800, 0x01a12990, 0x01e22890, 0x00232900, + 0x01642a90, 0x00a52b00, 0x00e62a00, 0x01272b90, 0x01682f90, + 0x00a92e00, 0x00ea2f00, 0x012b2e90, 0x006c2d00, 0x01ad2c90, + 0x01ee2d90, 0x002f2c00, 0x01702590, 0x00b12400, 0x00f22500, + 0x01332490, 0x00742700, 0x01b52690, 0x01f62790, 0x00372600, + 0x00782200, 0x01b92390, 0x01fa2290, 0x003b2300, 0x017c2090, + 0x00bd2100, 0x00fe2000, 0x013f2190, 0x01806190, 0x00416000, + 0x00026100, 0x01c36090, 0x00846300, 0x01456290, 0x01066390, + 0x00c76200, 0x00886600, 0x01496790, 0x010a6690, 0x00cb6700, + 0x018c6490, 0x004d6500, 0x000e6400, 0x01cf6590, 0x00906c00, + 0x01516d90, 0x01126c90, 0x00d36d00, 0x01946e90, 0x00556f00, + 0x00166e00, 0x01d76f90, 0x01986b90, 0x00596a00, 0x001a6b00, + 0x01db6a90, 0x009c6900, 0x015d6890, 0x011e6990, 0x00df6800, + 0x00a07800, 0x01617990, 0x01227890, 0x00e37900, 0x01a47a90, + 0x00657b00, 0x00267a00, 0x01e77b90, 0x01a87f90, 0x00697e00, + 0x002a7f00, 0x01eb7e90, 0x00ac7d00, 0x016d7c90, 0x012e7d90, + 0x00ef7c00, 0x01b07590, 0x00717400, 0x00327500, 0x01f37490, + 0x00b47700, 0x01757690, 0x01367790, 0x00f77600, 0x00b87200, + 0x01797390, 0x013a7290, 0x00fb7300, 0x01bc7090, 0x007d7100, + 0x003e7000, 0x01ff7190, 0x00c05000, 0x01015190, 0x01425090, + 0x00835100, 0x01c45290, 0x00055300, 0x00465200, 0x01875390, + 0x01c85790, 0x00095600, 0x004a5700, 0x018b5690, 0x00cc5500, + 0x010d5490, 0x014e5590, 0x008f5400, 0x01d05d90, 0x00115c00, + 0x00525d00, 0x01935c90, 0x00d45f00, 0x01155e90, 0x01565f90, + 0x00975e00, 0x00d85a00, 0x01195b90, 0x015a5a90, 0x009b5b00, + 0x01dc5890, 0x001d5900, 0x005e5800, 0x019f5990, 0x01e04990, + 0x00214800, 0x00624900, 0x01a34890, 0x00e44b00, 0x01254a90, + 0x01664b90, 0x00a74a00, 0x00e84e00, 0x01294f90, 0x016a4e90, + 0x00ab4f00, 0x01ec4c90, 0x002d4d00, 0x006e4c00, 0x01af4d90, + 0x00f04400, 0x01314590, 0x01724490, 0x00b34500, 0x01f44690, + 0x00354700, 0x00764600, 0x01b74790, 0x01f84390, 0x00394200, + 0x007a4300, 0x01bb4290, 0x00fc4100, 0x013d4090, 0x017e4190, + 0x00bf4000}, + {0x00000000, 0xc0000190, 0x83010190, 0x43010000, 0x05030190, + 0xc5030000, 0x86020000, 0x46020190, 0x09060190, 0xc9060000, + 0x8a070000, 0x4a070190, 0x0c050000, 0xcc050190, 0x8f040190, + 0x4f040000, 0x110c0190, 0xd10c0000, 0x920d0000, 0x520d0190, + 0x140f0000, 0xd40f0190, 0x970e0190, 0x570e0000, 0x180a0000, + 0xd80a0190, 0x9b0b0190, 0x5b0b0000, 0x1d090190, 0xdd090000, + 0x9e080000, 0x5e080190, 0x21180190, 0xe1180000, 0xa2190000, + 0x62190190, 0x241b0000, 0xe41b0190, 0xa71a0190, 0x671a0000, + 0x281e0000, 0xe81e0190, 0xab1f0190, 0x6b1f0000, 0x2d1d0190, + 0xed1d0000, 0xae1c0000, 0x6e1c0190, 0x30140000, 0xf0140190, + 0xb3150190, 0x73150000, 0x35170190, 0xf5170000, 0xb6160000, + 0x76160190, 0x39120190, 0xf9120000, 0xba130000, 0x7a130190, + 0x3c110000, 0xfc110190, 0xbf100190, 0x7f100000, 0x41300190, + 0x81300000, 0xc2310000, 0x02310190, 0x44330000, 0x84330190, + 0xc7320190, 0x07320000, 0x48360000, 0x88360190, 0xcb370190, + 0x0b370000, 0x4d350190, 0x8d350000, 0xce340000, 0x0e340190, + 0x503c0000, 0x903c0190, 0xd33d0190, 0x133d0000, 0x553f0190, + 0x953f0000, 0xd63e0000, 0x163e0190, 0x593a0190, 0x993a0000, + 0xda3b0000, 0x1a3b0190, 0x5c390000, 0x9c390190, 0xdf380190, + 0x1f380000, 0x60280000, 0xa0280190, 0xe3290190, 0x23290000, + 0x652b0190, 0xa52b0000, 0xe62a0000, 0x262a0190, 0x692e0190, + 0xa92e0000, 0xea2f0000, 0x2a2f0190, 0x6c2d0000, 0xac2d0190, + 0xef2c0190, 0x2f2c0000, 0x71240190, 0xb1240000, 0xf2250000, + 0x32250190, 0x74270000, 0xb4270190, 0xf7260190, 0x37260000, + 0x78220000, 0xb8220190, 0xfb230190, 0x3b230000, 0x7d210190, + 0xbd210000, 0xfe200000, 0x3e200190, 0x81600190, 0x41600000, + 0x02610000, 0xc2610190, 0x84630000, 0x44630190, 0x07620190, + 0xc7620000, 0x88660000, 0x48660190, 0x0b670190, 0xcb670000, + 0x8d650190, 0x4d650000, 0x0e640000, 0xce640190, 0x906c0000, + 0x506c0190, 0x136d0190, 0xd36d0000, 0x956f0190, 0x556f0000, + 0x166e0000, 0xd66e0190, 0x996a0190, 0x596a0000, 0x1a6b0000, + 0xda6b0190, 0x9c690000, 0x5c690190, 0x1f680190, 0xdf680000, + 0xa0780000, 0x60780190, 0x23790190, 0xe3790000, 0xa57b0190, + 0x657b0000, 0x267a0000, 0xe67a0190, 0xa97e0190, 0x697e0000, + 0x2a7f0000, 0xea7f0190, 0xac7d0000, 0x6c7d0190, 0x2f7c0190, + 0xef7c0000, 0xb1740190, 0x71740000, 0x32750000, 0xf2750190, + 0xb4770000, 0x74770190, 0x37760190, 0xf7760000, 0xb8720000, + 0x78720190, 0x3b730190, 0xfb730000, 0xbd710190, 0x7d710000, + 0x3e700000, 0xfe700190, 0xc0500000, 0x00500190, 0x43510190, + 0x83510000, 0xc5530190, 0x05530000, 0x46520000, 0x86520190, + 0xc9560190, 0x09560000, 0x4a570000, 0x8a570190, 0xcc550000, + 0x0c550190, 0x4f540190, 0x8f540000, 0xd15c0190, 0x115c0000, + 0x525d0000, 0x925d0190, 0xd45f0000, 0x145f0190, 0x575e0190, + 0x975e0000, 0xd85a0000, 0x185a0190, 0x5b5b0190, 0x9b5b0000, + 0xdd590190, 0x1d590000, 0x5e580000, 0x9e580190, 0xe1480190, + 0x21480000, 0x62490000, 0xa2490190, 0xe44b0000, 0x244b0190, + 0x674a0190, 0xa74a0000, 0xe84e0000, 0x284e0190, 0x6b4f0190, + 0xab4f0000, 0xed4d0190, 0x2d4d0000, 0x6e4c0000, 0xae4c0190, + 0xf0440000, 0x30440190, 0x73450190, 0xb3450000, 0xf5470190, + 0x35470000, 0x76460000, 0xb6460190, 0xf9420190, 0x39420000, + 0x7a430000, 0xba430190, 0xfc410000, 0x3c410190, 0x7f400190, + 0xbf400000}, + {0x00000000, 0x00c1906c, 0x008221d9, 0x0043b1b5, 0x03044002, + 0x03c5d06e, 0x038661db, 0x0347f1b7, 0x06088004, 0x06c91068, + 0x068aa1dd, 0x064b31b1, 0x050cc006, 0x05cd506a, 0x058ee1df, + 0x054f71b3, 0x0c100009, 0x0cd19065, 0x0c9221d0, 0x0c53b1bc, + 0x0f14400b, 0x0fd5d067, 0x0f9661d2, 0x0f57f1be, 0x0a18800d, + 0x0ad91061, 0x0a9aa1d4, 0x0a5b31b8, 0x091cc00f, 0x09dd5063, + 0x099ee1d6, 0x095f71ba, 0x18200012, 0x18e1907e, 0x18a221cb, + 0x1863b1a7, 0x1b244010, 0x1be5d07c, 0x1ba661c9, 0x1b67f1a5, + 0x1e288016, 0x1ee9107a, 0x1eaaa1cf, 0x1e6b31a3, 0x1d2cc014, + 0x1ded5078, 0x1daee1cd, 0x1d6f71a1, 0x1430001b, 0x14f19077, + 0x14b221c2, 0x1473b1ae, 0x17344019, 0x17f5d075, 0x17b661c0, + 0x1777f1ac, 0x1238801f, 0x12f91073, 0x12baa1c6, 0x127b31aa, + 0x113cc01d, 0x11fd5071, 0x11bee1c4, 0x117f71a8, 0x30400024, + 0x30819048, 0x30c221fd, 0x3003b191, 0x33444026, 0x3385d04a, + 0x33c661ff, 0x3307f193, 0x36488020, 0x3689104c, 0x36caa1f9, + 0x360b3195, 0x354cc022, 0x358d504e, 0x35cee1fb, 0x350f7197, + 0x3c50002d, 0x3c919041, 0x3cd221f4, 0x3c13b198, 0x3f54402f, + 0x3f95d043, 0x3fd661f6, 0x3f17f19a, 0x3a588029, 0x3a991045, + 0x3adaa1f0, 0x3a1b319c, 0x395cc02b, 0x399d5047, 0x39dee1f2, + 0x391f719e, 0x28600036, 0x28a1905a, 0x28e221ef, 0x2823b183, + 0x2b644034, 0x2ba5d058, 0x2be661ed, 0x2b27f181, 0x2e688032, + 0x2ea9105e, 0x2eeaa1eb, 0x2e2b3187, 0x2d6cc030, 0x2dad505c, + 0x2deee1e9, 0x2d2f7185, 0x2470003f, 0x24b19053, 0x24f221e6, + 0x2433b18a, 0x2774403d, 0x27b5d051, 0x27f661e4, 0x2737f188, + 0x2278803b, 0x22b91057, 0x22faa1e2, 0x223b318e, 0x217cc039, + 0x21bd5055, 0x21fee1e0, 0x213f718c, 0x60800048, 0x60419024, + 0x60022191, 0x60c3b1fd, 0x6384404a, 0x6345d026, 0x63066193, + 0x63c7f1ff, 0x6688804c, 0x66491020, 0x660aa195, 0x66cb31f9, + 0x658cc04e, 0x654d5022, 0x650ee197, 0x65cf71fb, 0x6c900041, + 0x6c51902d, 0x6c122198, 0x6cd3b1f4, 0x6f944043, 0x6f55d02f, + 0x6f16619a, 0x6fd7f1f6, 0x6a988045, 0x6a591029, 0x6a1aa19c, + 0x6adb31f0, 0x699cc047, 0x695d502b, 0x691ee19e, 0x69df71f2, + 0x78a0005a, 0x78619036, 0x78222183, 0x78e3b1ef, 0x7ba44058, + 0x7b65d034, 0x7b266181, 0x7be7f1ed, 0x7ea8805e, 0x7e691032, + 0x7e2aa187, 0x7eeb31eb, 0x7dacc05c, 0x7d6d5030, 0x7d2ee185, + 0x7def71e9, 0x74b00053, 0x7471903f, 0x7432218a, 0x74f3b1e6, + 0x77b44051, 0x7775d03d, 0x77366188, 0x77f7f1e4, 0x72b88057, + 0x7279103b, 0x723aa18e, 0x72fb31e2, 0x71bcc055, 0x717d5039, + 0x713ee18c, 0x71ff71e0, 0x50c0006c, 0x50019000, 0x504221b5, + 0x5083b1d9, 0x53c4406e, 0x5305d002, 0x534661b7, 0x5387f1db, + 0x56c88068, 0x56091004, 0x564aa1b1, 0x568b31dd, 0x55ccc06a, + 0x550d5006, 0x554ee1b3, 0x558f71df, 0x5cd00065, 0x5c119009, + 0x5c5221bc, 0x5c93b1d0, 0x5fd44067, 0x5f15d00b, 0x5f5661be, + 0x5f97f1d2, 0x5ad88061, 0x5a19100d, 0x5a5aa1b8, 0x5a9b31d4, + 0x59dcc063, 0x591d500f, 0x595ee1ba, 0x599f71d6, 0x48e0007e, + 0x48219012, 0x486221a7, 0x48a3b1cb, 0x4be4407c, 0x4b25d010, + 0x4b6661a5, 0x4ba7f1c9, 0x4ee8807a, 0x4e291016, 0x4e6aa1a3, + 0x4eab31cf, 0x4decc078, 0x4d2d5014, 0x4d6ee1a1, 0x4daf71cd, + 0x44f00077, 0x4431901b, 0x447221ae, 0x44b3b1c2, 0x47f44075, + 0x4735d019, 0x477661ac, 0x47b7f1c0, 0x42f88073, 0x4239101f, + 0x427aa1aa, 0x42bb31c6, 0x41fcc071, 0x413d501d, 0x417ee1a8, + 0x41bf71c4}}; + +#endif + +#endif + +#if N == 5 + +#if W == 8 + +static const crc_t crc_braid_table[][256] = { + {0x00000000, 0x86acf0c0, 0xbd5ae183, 0x3bf61143, 0xcab6c305, + 0x4c1a33c5, 0x77ec2286, 0xf140d246, 0x256e8609, 0xa3c276c9, + 0x9834678a, 0x1e98974a, 0xefd8450c, 0x6974b5cc, 0x5282a48f, + 0xd42e544f, 0x4add0c12, 0xcc71fcd2, 0xf787ed91, 0x712b1d51, + 0x806bcf17, 0x06c73fd7, 0x3d312e94, 0xbb9dde54, 0x6fb38a1b, + 0xe91f7adb, 0xd2e96b98, 0x54459b58, 0xa505491e, 0x23a9b9de, + 0x185fa89d, 0x9ef3585d, 0x95ba1824, 0x1316e8e4, 0x28e0f9a7, + 0xae4c0967, 0x5f0cdb21, 0xd9a02be1, 0xe2563aa2, 0x64faca62, + 0xb0d49e2d, 0x36786eed, 0x0d8e7fae, 0x8b228f6e, 0x7a625d28, + 0xfcceade8, 0xc738bcab, 0x41944c6b, 0xdf671436, 0x59cbe4f6, + 0x623df5b5, 0xe4910575, 0x15d1d733, 0x937d27f3, 0xa88b36b0, + 0x2e27c670, 0xfa09923f, 0x7ca562ff, 0x475373bc, 0xc1ff837c, + 0x30bf513a, 0xb613a1fa, 0x8de5b0b9, 0x0b494079, 0x9b77304b, + 0x1ddbc08b, 0x262dd1c8, 0xa0812108, 0x51c1f34e, 0xd76d038e, + 0xec9b12cd, 0x6a37e20d, 0xbe19b642, 0x38b54682, 0x034357c1, + 0x85efa701, 0x74af7547, 0xf2038587, 0xc9f594c4, 0x4f596404, + 0xd1aa3c59, 0x5706cc99, 0x6cf0ddda, 0xea5c2d1a, 0x1b1cff5c, + 0x9db00f9c, 0xa6461edf, 0x20eaee1f, 0xf4c4ba50, 0x72684a90, + 0x499e5bd3, 0xcf32ab13, 0x3e727955, 0xb8de8995, 0x832898d6, + 0x05846816, 0x0ecd286f, 0x8861d8af, 0xb397c9ec, 0x353b392c, + 0xc47beb6a, 0x42d71baa, 0x79210ae9, 0xff8dfa29, 0x2ba3ae66, + 0xad0f5ea6, 0x96f94fe5, 0x1055bf25, 0xe1156d63, 0x67b99da3, + 0x5c4f8ce0, 0xdae37c20, 0x4410247d, 0xc2bcd4bd, 0xf94ac5fe, + 0x7fe6353e, 0x8ea6e778, 0x080a17b8, 0x33fc06fb, 0xb550f63b, + 0x617ea274, 0xe7d252b4, 0xdc2443f7, 0x5a88b337, 0xabc86171, + 0x2d6491b1, 0x169280f2, 0x903e7032, 0x86ed6095, 0x00419055, + 0x3bb78116, 0xbd1b71d6, 0x4c5ba390, 0xcaf75350, 0xf1014213, + 0x77adb2d3, 0xa383e69c, 0x252f165c, 0x1ed9071f, 0x9875f7df, + 0x69352599, 0xef99d559, 0xd46fc41a, 0x52c334da, 0xcc306c87, + 0x4a9c9c47, 0x716a8d04, 0xf7c67dc4, 0x0686af82, 0x802a5f42, + 0xbbdc4e01, 0x3d70bec1, 0xe95eea8e, 0x6ff21a4e, 0x54040b0d, + 0xd2a8fbcd, 0x23e8298b, 0xa544d94b, 0x9eb2c808, 0x181e38c8, + 0x135778b1, 0x95fb8871, 0xae0d9932, 0x28a169f2, 0xd9e1bbb4, + 0x5f4d4b74, 0x64bb5a37, 0xe217aaf7, 0x3639feb8, 0xb0950e78, + 0x8b631f3b, 0x0dcfeffb, 0xfc8f3dbd, 0x7a23cd7d, 0x41d5dc3e, + 0xc7792cfe, 0x598a74a3, 0xdf268463, 0xe4d09520, 0x627c65e0, + 0x933cb7a6, 0x15904766, 0x2e665625, 0xa8caa6e5, 0x7ce4f2aa, + 0xfa48026a, 0xc1be1329, 0x4712e3e9, 0xb65231af, 0x30fec16f, + 0x0b08d02c, 0x8da420ec, 0x1d9a50de, 0x9b36a01e, 0xa0c0b15d, + 0x266c419d, 0xd72c93db, 0x5180631b, 0x6a767258, 0xecda8298, + 0x38f4d6d7, 0xbe582617, 0x85ae3754, 0x0302c794, 0xf24215d2, + 0x74eee512, 0x4f18f451, 0xc9b40491, 0x57475ccc, 0xd1ebac0c, + 0xea1dbd4f, 0x6cb14d8f, 0x9df19fc9, 0x1b5d6f09, 0x20ab7e4a, + 0xa6078e8a, 0x7229dac5, 0xf4852a05, 0xcf733b46, 0x49dfcb86, + 0xb89f19c0, 0x3e33e900, 0x05c5f843, 0x83690883, 0x882048fa, + 0x0e8cb83a, 0x357aa979, 0xb3d659b9, 0x42968bff, 0xc43a7b3f, + 0xffcc6a7c, 0x79609abc, 0xad4ecef3, 0x2be23e33, 0x10142f70, + 0x96b8dfb0, 0x67f80df6, 0xe154fd36, 0xdaa2ec75, 0x5c0e1cb5, + 0xc2fd44e8, 0x4451b428, 0x7fa7a56b, 0xf90b55ab, 0x084b87ed, + 0x8ee7772d, 0xb511666e, 0x33bd96ae, 0xe793c2e1, 0x613f3221, + 0x5ac92362, 0xdc65d3a2, 0x2d2501e4, 0xab89f124, 0x907fe067, + 0x16d310a7}, + {0x00000000, 0xbdd9c129, 0xcbb08251, 0x76694378, 0x276204a1, + 0x9abbc588, 0xecd286f0, 0x510b47d9, 0x4ec40942, 0xf31dc86b, + 0x85748b13, 0x38ad4a3a, 0x69a60de3, 0xd47fccca, 0xa2168fb2, + 0x1fcf4e9b, 0x9d881284, 0x2051d3ad, 0x563890d5, 0xebe151fc, + 0xbaea1625, 0x0733d70c, 0x715a9474, 0xcc83555d, 0xd34c1bc6, + 0x6e95daef, 0x18fc9997, 0xa52558be, 0xf42e1f67, 0x49f7de4e, + 0x3f9e9d36, 0x82475c1f, 0x8b13250b, 0x36cae422, 0x40a3a75a, + 0xfd7a6673, 0xac7121aa, 0x11a8e083, 0x67c1a3fb, 0xda1862d2, + 0xc5d72c49, 0x780eed60, 0x0e67ae18, 0xb3be6f31, 0xe2b528e8, + 0x5f6ce9c1, 0x2905aab9, 0x94dc6b90, 0x169b378f, 0xab42f6a6, + 0xdd2bb5de, 0x60f274f7, 0x31f9332e, 0x8c20f207, 0xfa49b17f, + 0x47907056, 0x585f3ecd, 0xe586ffe4, 0x93efbc9c, 0x2e367db5, + 0x7f3d3a6c, 0xc2e4fb45, 0xb48db83d, 0x09547914, 0xa6254a15, + 0x1bfc8b3c, 0x6d95c844, 0xd04c096d, 0x81474eb4, 0x3c9e8f9d, + 0x4af7cce5, 0xf72e0dcc, 0xe8e14357, 0x5538827e, 0x2351c106, + 0x9e88002f, 0xcf8347f6, 0x725a86df, 0x0433c5a7, 0xb9ea048e, + 0x3bad5891, 0x867499b8, 0xf01ddac0, 0x4dc41be9, 0x1ccf5c30, + 0xa1169d19, 0xd77fde61, 0x6aa61f48, 0x756951d3, 0xc8b090fa, + 0xbed9d382, 0x030012ab, 0x520b5572, 0xefd2945b, 0x99bbd723, + 0x2462160a, 0x2d366f1e, 0x90efae37, 0xe686ed4f, 0x5b5f2c66, + 0x0a546bbf, 0xb78daa96, 0xc1e4e9ee, 0x7c3d28c7, 0x63f2665c, + 0xde2ba775, 0xa842e40d, 0x159b2524, 0x449062fd, 0xf949a3d4, + 0x8f20e0ac, 0x32f92185, 0xb0be7d9a, 0x0d67bcb3, 0x7b0effcb, + 0xc6d73ee2, 0x97dc793b, 0x2a05b812, 0x5c6cfb6a, 0xe1b53a43, + 0xfe7a74d8, 0x43a3b5f1, 0x35caf689, 0x881337a0, 0xd9187079, + 0x64c1b150, 0x12a8f228, 0xaf713301, 0xfc499429, 0x41905500, + 0x37f91678, 0x8a20d751, 0xdb2b9088, 0x66f251a1, 0x109b12d9, + 0xad42d3f0, 0xb28d9d6b, 0x0f545c42, 0x793d1f3a, 0xc4e4de13, + 0x95ef99ca, 0x283658e3, 0x5e5f1b9b, 0xe386dab2, 0x61c186ad, + 0xdc184784, 0xaa7104fc, 0x17a8c5d5, 0x46a3820c, 0xfb7a4325, + 0x8d13005d, 0x30cac174, 0x2f058fef, 0x92dc4ec6, 0xe4b50dbe, + 0x596ccc97, 0x08678b4e, 0xb5be4a67, 0xc3d7091f, 0x7e0ec836, + 0x775ab122, 0xca83700b, 0xbcea3373, 0x0133f25a, 0x5038b583, + 0xede174aa, 0x9b8837d2, 0x2651f6fb, 0x399eb860, 0x84477949, + 0xf22e3a31, 0x4ff7fb18, 0x1efcbcc1, 0xa3257de8, 0xd54c3e90, + 0x6895ffb9, 0xead2a3a6, 0x570b628f, 0x216221f7, 0x9cbbe0de, + 0xcdb0a707, 0x7069662e, 0x06002556, 0xbbd9e47f, 0xa416aae4, + 0x19cf6bcd, 0x6fa628b5, 0xd27fe99c, 0x8374ae45, 0x3ead6f6c, + 0x48c42c14, 0xf51ded3d, 0x5a6cde3c, 0xe7b51f15, 0x91dc5c6d, + 0x2c059d44, 0x7d0eda9d, 0xc0d71bb4, 0xb6be58cc, 0x0b6799e5, + 0x14a8d77e, 0xa9711657, 0xdf18552f, 0x62c19406, 0x33cad3df, + 0x8e1312f6, 0xf87a518e, 0x45a390a7, 0xc7e4ccb8, 0x7a3d0d91, + 0x0c544ee9, 0xb18d8fc0, 0xe086c819, 0x5d5f0930, 0x2b364a48, + 0x96ef8b61, 0x8920c5fa, 0x34f904d3, 0x429047ab, 0xff498682, + 0xae42c15b, 0x139b0072, 0x65f2430a, 0xd82b8223, 0xd17ffb37, + 0x6ca63a1e, 0x1acf7966, 0xa716b84f, 0xf61dff96, 0x4bc43ebf, + 0x3dad7dc7, 0x8074bcee, 0x9fbbf275, 0x2262335c, 0x540b7024, + 0xe9d2b10d, 0xb8d9f6d4, 0x050037fd, 0x73697485, 0xceb0b5ac, + 0x4cf7e9b3, 0xf12e289a, 0x87476be2, 0x3a9eaacb, 0x6b95ed12, + 0xd64c2c3b, 0xa0256f43, 0x1dfcae6a, 0x0233e0f1, 0xbfea21d8, + 0xc98362a0, 0x745aa389, 0x2551e450, 0x98882579, 0xeee16601, + 0x5338a728}, + {0x00000000, 0x48902851, 0x912050a2, 0xd9b078f3, 0x9243a147, + 0xdad38916, 0x0363f1e5, 0x4bf3d9b4, 0x9484428d, 0xdc146adc, + 0x05a4122f, 0x4d343a7e, 0x06c7e3ca, 0x4e57cb9b, 0x97e7b368, + 0xdf779b39, 0x990b8519, 0xd19bad48, 0x082bd5bb, 0x40bbfdea, + 0x0b48245e, 0x43d80c0f, 0x9a6874fc, 0xd2f85cad, 0x0d8fc794, + 0x451fefc5, 0x9caf9736, 0xd43fbf67, 0x9fcc66d3, 0xd75c4e82, + 0x0eec3671, 0x467c1e20, 0x82140a31, 0xca842260, 0x13345a93, + 0x5ba472c2, 0x1057ab76, 0x58c78327, 0x8177fbd4, 0xc9e7d385, + 0x169048bc, 0x5e0060ed, 0x87b0181e, 0xcf20304f, 0x84d3e9fb, + 0xcc43c1aa, 0x15f3b959, 0x5d639108, 0x1b1f8f28, 0x538fa779, + 0x8a3fdf8a, 0xc2aff7db, 0x895c2e6f, 0xc1cc063e, 0x187c7ecd, + 0x50ec569c, 0x8f9bcda5, 0xc70be5f4, 0x1ebb9d07, 0x562bb556, + 0x1dd86ce2, 0x554844b3, 0x8cf83c40, 0xc4681411, 0xb42b1461, + 0xfcbb3c30, 0x250b44c3, 0x6d9b6c92, 0x2668b526, 0x6ef89d77, + 0xb748e584, 0xffd8cdd5, 0x20af56ec, 0x683f7ebd, 0xb18f064e, + 0xf91f2e1f, 0xb2ecf7ab, 0xfa7cdffa, 0x23cca709, 0x6b5c8f58, + 0x2d209178, 0x65b0b929, 0xbc00c1da, 0xf490e98b, 0xbf63303f, + 0xf7f3186e, 0x2e43609d, 0x66d348cc, 0xb9a4d3f5, 0xf134fba4, + 0x28848357, 0x6014ab06, 0x2be772b2, 0x63775ae3, 0xbac72210, + 0xf2570a41, 0x363f1e50, 0x7eaf3601, 0xa71f4ef2, 0xef8f66a3, + 0xa47cbf17, 0xecec9746, 0x355cefb5, 0x7dccc7e4, 0xa2bb5cdd, + 0xea2b748c, 0x339b0c7f, 0x7b0b242e, 0x30f8fd9a, 0x7868d5cb, + 0xa1d8ad38, 0xe9488569, 0xaf349b49, 0xe7a4b318, 0x3e14cbeb, + 0x7684e3ba, 0x3d773a0e, 0x75e7125f, 0xac576aac, 0xe4c742fd, + 0x3bb0d9c4, 0x7320f195, 0xaa908966, 0xe200a137, 0xa9f37883, + 0xe16350d2, 0x38d32821, 0x70430070, 0xd85528c1, 0x90c50090, + 0x49757863, 0x01e55032, 0x4a168986, 0x0286a1d7, 0xdb36d924, + 0x93a6f175, 0x4cd16a4c, 0x0441421d, 0xddf13aee, 0x956112bf, + 0xde92cb0b, 0x9602e35a, 0x4fb29ba9, 0x0722b3f8, 0x415eadd8, + 0x09ce8589, 0xd07efd7a, 0x98eed52b, 0xd31d0c9f, 0x9b8d24ce, + 0x423d5c3d, 0x0aad746c, 0xd5daef55, 0x9d4ac704, 0x44fabff7, + 0x0c6a97a6, 0x47994e12, 0x0f096643, 0xd6b91eb0, 0x9e2936e1, + 0x5a4122f0, 0x12d10aa1, 0xcb617252, 0x83f15a03, 0xc80283b7, + 0x8092abe6, 0x5922d315, 0x11b2fb44, 0xcec5607d, 0x8655482c, + 0x5fe530df, 0x1775188e, 0x5c86c13a, 0x1416e96b, 0xcda69198, + 0x8536b9c9, 0xc34aa7e9, 0x8bda8fb8, 0x526af74b, 0x1afadf1a, + 0x510906ae, 0x19992eff, 0xc029560c, 0x88b97e5d, 0x57cee564, + 0x1f5ecd35, 0xc6eeb5c6, 0x8e7e9d97, 0xc58d4423, 0x8d1d6c72, + 0x54ad1481, 0x1c3d3cd0, 0x6c7e3ca0, 0x24ee14f1, 0xfd5e6c02, + 0xb5ce4453, 0xfe3d9de7, 0xb6adb5b6, 0x6f1dcd45, 0x278de514, + 0xf8fa7e2d, 0xb06a567c, 0x69da2e8f, 0x214a06de, 0x6ab9df6a, + 0x2229f73b, 0xfb998fc8, 0xb309a799, 0xf575b9b9, 0xbde591e8, + 0x6455e91b, 0x2cc5c14a, 0x673618fe, 0x2fa630af, 0xf616485c, + 0xbe86600d, 0x61f1fb34, 0x2961d365, 0xf0d1ab96, 0xb84183c7, + 0xf3b25a73, 0xbb227222, 0x62920ad1, 0x2a022280, 0xee6a3691, + 0xa6fa1ec0, 0x7f4a6633, 0x37da4e62, 0x7c2997d6, 0x34b9bf87, + 0xed09c774, 0xa599ef25, 0x7aee741c, 0x327e5c4d, 0xebce24be, + 0xa35e0cef, 0xe8add55b, 0xa03dfd0a, 0x798d85f9, 0x311dada8, + 0x7761b388, 0x3ff19bd9, 0xe641e32a, 0xaed1cb7b, 0xe52212cf, + 0xadb23a9e, 0x7402426d, 0x3c926a3c, 0xe3e5f105, 0xab75d954, + 0x72c5a1a7, 0x3a5589f6, 0x71a65042, 0x39367813, 0xe08600e0, + 0xa81628b1}, + {0x00000000, 0x00a95181, 0x0152a302, 0x01fbf283, 0x02a54604, + 0x020c1785, 0x03f7e506, 0x035eb487, 0x054a8c08, 0x05e3dd89, + 0x04182f0a, 0x04b17e8b, 0x07efca0c, 0x07469b8d, 0x06bd690e, + 0x0614388f, 0x0a951810, 0x0a3c4991, 0x0bc7bb12, 0x0b6eea93, + 0x08305e14, 0x08990f95, 0x0962fd16, 0x09cbac97, 0x0fdf9418, + 0x0f76c599, 0x0e8d371a, 0x0e24669b, 0x0d7ad21c, 0x0dd3839d, + 0x0c28711e, 0x0c81209f, 0x152a3020, 0x158361a1, 0x14789322, + 0x14d1c2a3, 0x178f7624, 0x172627a5, 0x16ddd526, 0x167484a7, + 0x1060bc28, 0x10c9eda9, 0x11321f2a, 0x119b4eab, 0x12c5fa2c, + 0x126cabad, 0x1397592e, 0x133e08af, 0x1fbf2830, 0x1f1679b1, + 0x1eed8b32, 0x1e44dab3, 0x1d1a6e34, 0x1db33fb5, 0x1c48cd36, + 0x1ce19cb7, 0x1af5a438, 0x1a5cf5b9, 0x1ba7073a, 0x1b0e56bb, + 0x1850e23c, 0x18f9b3bd, 0x1902413e, 0x19ab10bf, 0x2a546040, + 0x2afd31c1, 0x2b06c342, 0x2baf92c3, 0x28f12644, 0x285877c5, + 0x29a38546, 0x290ad4c7, 0x2f1eec48, 0x2fb7bdc9, 0x2e4c4f4a, + 0x2ee51ecb, 0x2dbbaa4c, 0x2d12fbcd, 0x2ce9094e, 0x2c4058cf, + 0x20c17850, 0x206829d1, 0x2193db52, 0x213a8ad3, 0x22643e54, + 0x22cd6fd5, 0x23369d56, 0x239fccd7, 0x258bf458, 0x2522a5d9, + 0x24d9575a, 0x247006db, 0x272eb25c, 0x2787e3dd, 0x267c115e, + 0x26d540df, 0x3f7e5060, 0x3fd701e1, 0x3e2cf362, 0x3e85a2e3, + 0x3ddb1664, 0x3d7247e5, 0x3c89b566, 0x3c20e4e7, 0x3a34dc68, + 0x3a9d8de9, 0x3b667f6a, 0x3bcf2eeb, 0x38919a6c, 0x3838cbed, + 0x39c3396e, 0x396a68ef, 0x35eb4870, 0x354219f1, 0x34b9eb72, + 0x3410baf3, 0x374e0e74, 0x37e75ff5, 0x361cad76, 0x36b5fcf7, + 0x30a1c478, 0x300895f9, 0x31f3677a, 0x315a36fb, 0x3204827c, + 0x32add3fd, 0x3356217e, 0x33ff70ff, 0x54a8c080, 0x54019101, + 0x55fa6382, 0x55533203, 0x560d8684, 0x56a4d705, 0x575f2586, + 0x57f67407, 0x51e24c88, 0x514b1d09, 0x50b0ef8a, 0x5019be0b, + 0x53470a8c, 0x53ee5b0d, 0x5215a98e, 0x52bcf80f, 0x5e3dd890, + 0x5e948911, 0x5f6f7b92, 0x5fc62a13, 0x5c989e94, 0x5c31cf15, + 0x5dca3d96, 0x5d636c17, 0x5b775498, 0x5bde0519, 0x5a25f79a, + 0x5a8ca61b, 0x59d2129c, 0x597b431d, 0x5880b19e, 0x5829e01f, + 0x4182f0a0, 0x412ba121, 0x40d053a2, 0x40790223, 0x4327b6a4, + 0x438ee725, 0x427515a6, 0x42dc4427, 0x44c87ca8, 0x44612d29, + 0x459adfaa, 0x45338e2b, 0x466d3aac, 0x46c46b2d, 0x473f99ae, + 0x4796c82f, 0x4b17e8b0, 0x4bbeb931, 0x4a454bb2, 0x4aec1a33, + 0x49b2aeb4, 0x491bff35, 0x48e00db6, 0x48495c37, 0x4e5d64b8, + 0x4ef43539, 0x4f0fc7ba, 0x4fa6963b, 0x4cf822bc, 0x4c51733d, + 0x4daa81be, 0x4d03d03f, 0x7efca0c0, 0x7e55f141, 0x7fae03c2, + 0x7f075243, 0x7c59e6c4, 0x7cf0b745, 0x7d0b45c6, 0x7da21447, + 0x7bb62cc8, 0x7b1f7d49, 0x7ae48fca, 0x7a4dde4b, 0x79136acc, + 0x79ba3b4d, 0x7841c9ce, 0x78e8984f, 0x7469b8d0, 0x74c0e951, + 0x753b1bd2, 0x75924a53, 0x76ccfed4, 0x7665af55, 0x779e5dd6, + 0x77370c57, 0x712334d8, 0x718a6559, 0x707197da, 0x70d8c65b, + 0x738672dc, 0x732f235d, 0x72d4d1de, 0x727d805f, 0x6bd690e0, + 0x6b7fc161, 0x6a8433e2, 0x6a2d6263, 0x6973d6e4, 0x69da8765, + 0x682175e6, 0x68882467, 0x6e9c1ce8, 0x6e354d69, 0x6fcebfea, + 0x6f67ee6b, 0x6c395aec, 0x6c900b6d, 0x6d6bf9ee, 0x6dc2a86f, + 0x614388f0, 0x61ead971, 0x60112bf2, 0x60b87a73, 0x63e6cef4, + 0x634f9f75, 0x62b46df6, 0x621d3c77, 0x640904f8, 0x64a05579, + 0x655ba7fa, 0x65f2f67b, 0x66ac42fc, 0x6605137d, 0x67fee1fe, + 0x6757b07f}, + {0x00000000, 0xa9518100, 0xe2a00203, 0x4bf18303, 0x75430405, + 0xdc128505, 0x97e30606, 0x3eb28706, 0xea86080a, 0x43d7890a, + 0x08260a09, 0xa1778b09, 0x9fc50c0f, 0x36948d0f, 0x7d650e0c, + 0xd4348f0c, 0x650f1017, 0xcc5e9117, 0x87af1214, 0x2efe9314, + 0x104c1412, 0xb91d9512, 0xf2ec1611, 0x5bbd9711, 0x8f89181d, + 0x26d8991d, 0x6d291a1e, 0xc4789b1e, 0xfaca1c18, 0x539b9d18, + 0x186a1e1b, 0xb13b9f1b, 0xca1e202e, 0x634fa12e, 0x28be222d, + 0x81efa32d, 0xbf5d242b, 0x160ca52b, 0x5dfd2628, 0xf4aca728, + 0x20982824, 0x89c9a924, 0xc2382a27, 0x6b69ab27, 0x55db2c21, + 0xfc8aad21, 0xb77b2e22, 0x1e2aaf22, 0xaf113039, 0x0640b139, + 0x4db1323a, 0xe4e0b33a, 0xda52343c, 0x7303b53c, 0x38f2363f, + 0x91a3b73f, 0x45973833, 0xecc6b933, 0xa7373a30, 0x0e66bb30, + 0x30d43c36, 0x9985bd36, 0xd2743e35, 0x7b25bf35, 0x243f405f, + 0x8d6ec15f, 0xc69f425c, 0x6fcec35c, 0x517c445a, 0xf82dc55a, + 0xb3dc4659, 0x1a8dc759, 0xceb94855, 0x67e8c955, 0x2c194a56, + 0x8548cb56, 0xbbfa4c50, 0x12abcd50, 0x595a4e53, 0xf00bcf53, + 0x41305048, 0xe861d148, 0xa390524b, 0x0ac1d34b, 0x3473544d, + 0x9d22d54d, 0xd6d3564e, 0x7f82d74e, 0xabb65842, 0x02e7d942, + 0x49165a41, 0xe047db41, 0xdef55c47, 0x77a4dd47, 0x3c555e44, + 0x9504df44, 0xee216071, 0x4770e171, 0x0c816272, 0xa5d0e372, + 0x9b626474, 0x3233e574, 0x79c26677, 0xd093e777, 0x04a7687b, + 0xadf6e97b, 0xe6076a78, 0x4f56eb78, 0x71e46c7e, 0xd8b5ed7e, + 0x93446e7d, 0x3a15ef7d, 0x8b2e7066, 0x227ff166, 0x698e7265, + 0xc0dff365, 0xfe6d7463, 0x573cf563, 0x1ccd7660, 0xb59cf760, + 0x61a8786c, 0xc8f9f96c, 0x83087a6f, 0x2a59fb6f, 0x14eb7c69, + 0xbdbafd69, 0xf64b7e6a, 0x5f1aff6a, 0x487e80be, 0xe12f01be, + 0xaade82bd, 0x038f03bd, 0x3d3d84bb, 0x946c05bb, 0xdf9d86b8, + 0x76cc07b8, 0xa2f888b4, 0x0ba909b4, 0x40588ab7, 0xe9090bb7, + 0xd7bb8cb1, 0x7eea0db1, 0x351b8eb2, 0x9c4a0fb2, 0x2d7190a9, + 0x842011a9, 0xcfd192aa, 0x668013aa, 0x583294ac, 0xf16315ac, + 0xba9296af, 0x13c317af, 0xc7f798a3, 0x6ea619a3, 0x25579aa0, + 0x8c061ba0, 0xb2b49ca6, 0x1be51da6, 0x50149ea5, 0xf9451fa5, + 0x8260a090, 0x2b312190, 0x60c0a293, 0xc9912393, 0xf723a495, + 0x5e722595, 0x1583a696, 0xbcd22796, 0x68e6a89a, 0xc1b7299a, + 0x8a46aa99, 0x23172b99, 0x1da5ac9f, 0xb4f42d9f, 0xff05ae9c, + 0x56542f9c, 0xe76fb087, 0x4e3e3187, 0x05cfb284, 0xac9e3384, + 0x922cb482, 0x3b7d3582, 0x708cb681, 0xd9dd3781, 0x0de9b88d, + 0xa4b8398d, 0xef49ba8e, 0x46183b8e, 0x78aabc88, 0xd1fb3d88, + 0x9a0abe8b, 0x335b3f8b, 0x6c41c0e1, 0xc51041e1, 0x8ee1c2e2, + 0x27b043e2, 0x1902c4e4, 0xb05345e4, 0xfba2c6e7, 0x52f347e7, + 0x86c7c8eb, 0x2f9649eb, 0x6467cae8, 0xcd364be8, 0xf384ccee, + 0x5ad54dee, 0x1124ceed, 0xb8754fed, 0x094ed0f6, 0xa01f51f6, + 0xebeed2f5, 0x42bf53f5, 0x7c0dd4f3, 0xd55c55f3, 0x9eadd6f0, + 0x37fc57f0, 0xe3c8d8fc, 0x4a9959fc, 0x0168daff, 0xa8395bff, + 0x968bdcf9, 0x3fda5df9, 0x742bdefa, 0xdd7a5ffa, 0xa65fe0cf, + 0x0f0e61cf, 0x44ffe2cc, 0xedae63cc, 0xd31ce4ca, 0x7a4d65ca, + 0x31bce6c9, 0x98ed67c9, 0x4cd9e8c5, 0xe58869c5, 0xae79eac6, + 0x07286bc6, 0x399aecc0, 0x90cb6dc0, 0xdb3aeec3, 0x726b6fc3, + 0xc350f0d8, 0x6a0171d8, 0x21f0f2db, 0x88a173db, 0xb613f4dd, + 0x1f4275dd, 0x54b3f6de, 0xfde277de, 0x29d6f8d2, 0x808779d2, + 0xcb76fad1, 0x62277bd1, 0x5c95fcd7, 0xf5c47dd7, 0xbe35fed4, + 0x17647fd4}, + {0x00000000, 0x90fd017c, 0x91f902fb, 0x01040387, 0x93f105f5, + 0x030c0489, 0x0208070e, 0x92f50672, 0x97e10be9, 0x071c0a95, + 0x06180912, 0x96e5086e, 0x04100e1c, 0x94ed0f60, 0x95e90ce7, + 0x05140d9b, 0x9fc117d1, 0x0f3c16ad, 0x0e38152a, 0x9ec51456, + 0x0c301224, 0x9ccd1358, 0x9dc910df, 0x0d3411a3, 0x08201c38, + 0x98dd1d44, 0x99d91ec3, 0x09241fbf, 0x9bd119cd, 0x0b2c18b1, + 0x0a281b36, 0x9ad51a4a, 0x8f812fa1, 0x1f7c2edd, 0x1e782d5a, + 0x8e852c26, 0x1c702a54, 0x8c8d2b28, 0x8d8928af, 0x1d7429d3, + 0x18602448, 0x889d2534, 0x899926b3, 0x196427cf, 0x8b9121bd, + 0x1b6c20c1, 0x1a682346, 0x8a95223a, 0x10403870, 0x80bd390c, + 0x81b93a8b, 0x11443bf7, 0x83b13d85, 0x134c3cf9, 0x12483f7e, + 0x82b53e02, 0x87a13399, 0x175c32e5, 0x16583162, 0x86a5301e, + 0x1450366c, 0x84ad3710, 0x85a93497, 0x155435eb, 0xaf015f41, + 0x3ffc5e3d, 0x3ef85dba, 0xae055cc6, 0x3cf05ab4, 0xac0d5bc8, + 0xad09584f, 0x3df45933, 0x38e054a8, 0xa81d55d4, 0xa9195653, + 0x39e4572f, 0xab11515d, 0x3bec5021, 0x3ae853a6, 0xaa1552da, + 0x30c04890, 0xa03d49ec, 0xa1394a6b, 0x31c44b17, 0xa3314d65, + 0x33cc4c19, 0x32c84f9e, 0xa2354ee2, 0xa7214379, 0x37dc4205, + 0x36d84182, 0xa62540fe, 0x34d0468c, 0xa42d47f0, 0xa5294477, + 0x35d4450b, 0x208070e0, 0xb07d719c, 0xb179721b, 0x21847367, + 0xb3717515, 0x238c7469, 0x228877ee, 0xb2757692, 0xb7617b09, + 0x279c7a75, 0x269879f2, 0xb665788e, 0x24907efc, 0xb46d7f80, + 0xb5697c07, 0x25947d7b, 0xbf416731, 0x2fbc664d, 0x2eb865ca, + 0xbe4564b6, 0x2cb062c4, 0xbc4d63b8, 0xbd49603f, 0x2db46143, + 0x28a06cd8, 0xb85d6da4, 0xb9596e23, 0x29a46f5f, 0xbb51692d, + 0x2bac6851, 0x2aa86bd6, 0xba556aaa, 0xee01be81, 0x7efcbffd, + 0x7ff8bc7a, 0xef05bd06, 0x7df0bb74, 0xed0dba08, 0xec09b98f, + 0x7cf4b8f3, 0x79e0b568, 0xe91db414, 0xe819b793, 0x78e4b6ef, + 0xea11b09d, 0x7aecb1e1, 0x7be8b266, 0xeb15b31a, 0x71c0a950, + 0xe13da82c, 0xe039abab, 0x70c4aad7, 0xe231aca5, 0x72ccadd9, + 0x73c8ae5e, 0xe335af22, 0xe621a2b9, 0x76dca3c5, 0x77d8a042, + 0xe725a13e, 0x75d0a74c, 0xe52da630, 0xe429a5b7, 0x74d4a4cb, + 0x61809120, 0xf17d905c, 0xf07993db, 0x608492a7, 0xf27194d5, + 0x628c95a9, 0x6388962e, 0xf3759752, 0xf6619ac9, 0x669c9bb5, + 0x67989832, 0xf765994e, 0x65909f3c, 0xf56d9e40, 0xf4699dc7, + 0x64949cbb, 0xfe4186f1, 0x6ebc878d, 0x6fb8840a, 0xff458576, + 0x6db08304, 0xfd4d8278, 0xfc4981ff, 0x6cb48083, 0x69a08d18, + 0xf95d8c64, 0xf8598fe3, 0x68a48e9f, 0xfa5188ed, 0x6aac8991, + 0x6ba88a16, 0xfb558b6a, 0x4100e1c0, 0xd1fde0bc, 0xd0f9e33b, + 0x4004e247, 0xd2f1e435, 0x420ce549, 0x4308e6ce, 0xd3f5e7b2, + 0xd6e1ea29, 0x461ceb55, 0x4718e8d2, 0xd7e5e9ae, 0x4510efdc, + 0xd5edeea0, 0xd4e9ed27, 0x4414ec5b, 0xdec1f611, 0x4e3cf76d, + 0x4f38f4ea, 0xdfc5f596, 0x4d30f3e4, 0xddcdf298, 0xdcc9f11f, + 0x4c34f063, 0x4920fdf8, 0xd9ddfc84, 0xd8d9ff03, 0x4824fe7f, + 0xdad1f80d, 0x4a2cf971, 0x4b28faf6, 0xdbd5fb8a, 0xce81ce61, + 0x5e7ccf1d, 0x5f78cc9a, 0xcf85cde6, 0x5d70cb94, 0xcd8dcae8, + 0xcc89c96f, 0x5c74c813, 0x5960c588, 0xc99dc4f4, 0xc899c773, + 0x5864c60f, 0xca91c07d, 0x5a6cc101, 0x5b68c286, 0xcb95c3fa, + 0x5140d9b0, 0xc1bdd8cc, 0xc0b9db4b, 0x5044da37, 0xc2b1dc45, + 0x524cdd39, 0x5348debe, 0xc3b5dfc2, 0xc6a1d259, 0x565cd325, + 0x5758d0a2, 0xc7a5d1de, 0x5550d7ac, 0xc5add6d0, 0xc4a9d557, + 0x5454d42b}, + {0x00000000, 0x6c007d01, 0xd800fa02, 0xb4008703, 0x0002f407, + 0x6c028906, 0xd8020e05, 0xb4027304, 0x0005e80e, 0x6c05950f, + 0xd805120c, 0xb4056f0d, 0x00071c09, 0x6c076108, 0xd807e60b, + 0xb4079b0a, 0x000bd01c, 0x6c0bad1d, 0xd80b2a1e, 0xb40b571f, + 0x0009241b, 0x6c09591a, 0xd809de19, 0xb409a318, 0x000e3812, + 0x6c0e4513, 0xd80ec210, 0xb40ebf11, 0x000ccc15, 0x6c0cb114, + 0xd80c3617, 0xb40c4b16, 0x0017a038, 0x6c17dd39, 0xd8175a3a, + 0xb417273b, 0x0015543f, 0x6c15293e, 0xd815ae3d, 0xb415d33c, + 0x00124836, 0x6c123537, 0xd812b234, 0xb412cf35, 0x0010bc31, + 0x6c10c130, 0xd8104633, 0xb4103b32, 0x001c7024, 0x6c1c0d25, + 0xd81c8a26, 0xb41cf727, 0x001e8423, 0x6c1ef922, 0xd81e7e21, + 0xb41e0320, 0x0019982a, 0x6c19e52b, 0xd8196228, 0xb4191f29, + 0x001b6c2d, 0x6c1b112c, 0xd81b962f, 0xb41beb2e, 0x002f4070, + 0x6c2f3d71, 0xd82fba72, 0xb42fc773, 0x002db477, 0x6c2dc976, + 0xd82d4e75, 0xb42d3374, 0x002aa87e, 0x6c2ad57f, 0xd82a527c, + 0xb42a2f7d, 0x00285c79, 0x6c282178, 0xd828a67b, 0xb428db7a, + 0x0024906c, 0x6c24ed6d, 0xd8246a6e, 0xb424176f, 0x0026646b, + 0x6c26196a, 0xd8269e69, 0xb426e368, 0x00217862, 0x6c210563, + 0xd8218260, 0xb421ff61, 0x00238c65, 0x6c23f164, 0xd8237667, + 0xb4230b66, 0x0038e048, 0x6c389d49, 0xd8381a4a, 0xb438674b, + 0x003a144f, 0x6c3a694e, 0xd83aee4d, 0xb43a934c, 0x003d0846, + 0x6c3d7547, 0xd83df244, 0xb43d8f45, 0x003ffc41, 0x6c3f8140, + 0xd83f0643, 0xb43f7b42, 0x00333054, 0x6c334d55, 0xd833ca56, + 0xb433b757, 0x0031c453, 0x6c31b952, 0xd8313e51, 0xb4314350, + 0x0036d85a, 0x6c36a55b, 0xd8362258, 0xb4365f59, 0x00342c5d, + 0x6c34515c, 0xd834d65f, 0xb434ab5e, 0x005e80e0, 0x6c5efde1, + 0xd85e7ae2, 0xb45e07e3, 0x005c74e7, 0x6c5c09e6, 0xd85c8ee5, + 0xb45cf3e4, 0x005b68ee, 0x6c5b15ef, 0xd85b92ec, 0xb45befed, + 0x00599ce9, 0x6c59e1e8, 0xd85966eb, 0xb4591bea, 0x005550fc, + 0x6c552dfd, 0xd855aafe, 0xb455d7ff, 0x0057a4fb, 0x6c57d9fa, + 0xd8575ef9, 0xb45723f8, 0x0050b8f2, 0x6c50c5f3, 0xd85042f0, + 0xb4503ff1, 0x00524cf5, 0x6c5231f4, 0xd852b6f7, 0xb452cbf6, + 0x004920d8, 0x6c495dd9, 0xd849dada, 0xb449a7db, 0x004bd4df, + 0x6c4ba9de, 0xd84b2edd, 0xb44b53dc, 0x004cc8d6, 0x6c4cb5d7, + 0xd84c32d4, 0xb44c4fd5, 0x004e3cd1, 0x6c4e41d0, 0xd84ec6d3, + 0xb44ebbd2, 0x0042f0c4, 0x6c428dc5, 0xd8420ac6, 0xb44277c7, + 0x004004c3, 0x6c4079c2, 0xd840fec1, 0xb44083c0, 0x004718ca, + 0x6c4765cb, 0xd847e2c8, 0xb4479fc9, 0x0045eccd, 0x6c4591cc, + 0xd84516cf, 0xb4456bce, 0x0071c090, 0x6c71bd91, 0xd8713a92, + 0xb4714793, 0x00733497, 0x6c734996, 0xd873ce95, 0xb473b394, + 0x0074289e, 0x6c74559f, 0xd874d29c, 0xb474af9d, 0x0076dc99, + 0x6c76a198, 0xd876269b, 0xb4765b9a, 0x007a108c, 0x6c7a6d8d, + 0xd87aea8e, 0xb47a978f, 0x0078e48b, 0x6c78998a, 0xd8781e89, + 0xb4786388, 0x007ff882, 0x6c7f8583, 0xd87f0280, 0xb47f7f81, + 0x007d0c85, 0x6c7d7184, 0xd87df687, 0xb47d8b86, 0x006660a8, + 0x6c661da9, 0xd8669aaa, 0xb466e7ab, 0x006494af, 0x6c64e9ae, + 0xd8646ead, 0xb46413ac, 0x006388a6, 0x6c63f5a7, 0xd86372a4, + 0xb4630fa5, 0x00617ca1, 0x6c6101a0, 0xd86186a3, 0xb461fba2, + 0x006db0b4, 0x6c6dcdb5, 0xd86d4ab6, 0xb46d37b7, 0x006f44b3, + 0x6c6f39b2, 0xd86fbeb1, 0xb46fc3b0, 0x006858ba, 0x6c6825bb, + 0xd868a2b8, 0xb468dfb9, 0x006aacbd, 0x6c6ad1bc, 0xd86a56bf, + 0xb46a2bbe}, + {0x00000000, 0x00bd01c0, 0x017a0380, 0x01c70240, 0x02f40700, + 0x024906c0, 0x038e0480, 0x03330540, 0x05e80e00, 0x05550fc0, + 0x04920d80, 0x042f0c40, 0x071c0900, 0x07a108c0, 0x06660a80, + 0x06db0b40, 0x0bd01c00, 0x0b6d1dc0, 0x0aaa1f80, 0x0a171e40, + 0x09241b00, 0x09991ac0, 0x085e1880, 0x08e31940, 0x0e381200, + 0x0e8513c0, 0x0f421180, 0x0fff1040, 0x0ccc1500, 0x0c7114c0, + 0x0db61680, 0x0d0b1740, 0x17a03800, 0x171d39c0, 0x16da3b80, + 0x16673a40, 0x15543f00, 0x15e93ec0, 0x142e3c80, 0x14933d40, + 0x12483600, 0x12f537c0, 0x13323580, 0x138f3440, 0x10bc3100, + 0x100130c0, 0x11c63280, 0x117b3340, 0x1c702400, 0x1ccd25c0, + 0x1d0a2780, 0x1db72640, 0x1e842300, 0x1e3922c0, 0x1ffe2080, + 0x1f432140, 0x19982a00, 0x19252bc0, 0x18e22980, 0x185f2840, + 0x1b6c2d00, 0x1bd12cc0, 0x1a162e80, 0x1aab2f40, 0x2f407000, + 0x2ffd71c0, 0x2e3a7380, 0x2e877240, 0x2db47700, 0x2d0976c0, + 0x2cce7480, 0x2c737540, 0x2aa87e00, 0x2a157fc0, 0x2bd27d80, + 0x2b6f7c40, 0x285c7900, 0x28e178c0, 0x29267a80, 0x299b7b40, + 0x24906c00, 0x242d6dc0, 0x25ea6f80, 0x25576e40, 0x26646b00, + 0x26d96ac0, 0x271e6880, 0x27a36940, 0x21786200, 0x21c563c0, + 0x20026180, 0x20bf6040, 0x238c6500, 0x233164c0, 0x22f66680, + 0x224b6740, 0x38e04800, 0x385d49c0, 0x399a4b80, 0x39274a40, + 0x3a144f00, 0x3aa94ec0, 0x3b6e4c80, 0x3bd34d40, 0x3d084600, + 0x3db547c0, 0x3c724580, 0x3ccf4440, 0x3ffc4100, 0x3f4140c0, + 0x3e864280, 0x3e3b4340, 0x33305400, 0x338d55c0, 0x324a5780, + 0x32f75640, 0x31c45300, 0x317952c0, 0x30be5080, 0x30035140, + 0x36d85a00, 0x36655bc0, 0x37a25980, 0x371f5840, 0x342c5d00, + 0x34915cc0, 0x35565e80, 0x35eb5f40, 0x5e80e000, 0x5e3de1c0, + 0x5ffae380, 0x5f47e240, 0x5c74e700, 0x5cc9e6c0, 0x5d0ee480, + 0x5db3e540, 0x5b68ee00, 0x5bd5efc0, 0x5a12ed80, 0x5aafec40, + 0x599ce900, 0x5921e8c0, 0x58e6ea80, 0x585beb40, 0x5550fc00, + 0x55edfdc0, 0x542aff80, 0x5497fe40, 0x57a4fb00, 0x5719fac0, + 0x56def880, 0x5663f940, 0x50b8f200, 0x5005f3c0, 0x51c2f180, + 0x517ff040, 0x524cf500, 0x52f1f4c0, 0x5336f680, 0x538bf740, + 0x4920d800, 0x499dd9c0, 0x485adb80, 0x48e7da40, 0x4bd4df00, + 0x4b69dec0, 0x4aaedc80, 0x4a13dd40, 0x4cc8d600, 0x4c75d7c0, + 0x4db2d580, 0x4d0fd440, 0x4e3cd100, 0x4e81d0c0, 0x4f46d280, + 0x4ffbd340, 0x42f0c400, 0x424dc5c0, 0x438ac780, 0x4337c640, + 0x4004c300, 0x40b9c2c0, 0x417ec080, 0x41c3c140, 0x4718ca00, + 0x47a5cbc0, 0x4662c980, 0x46dfc840, 0x45eccd00, 0x4551ccc0, + 0x4496ce80, 0x442bcf40, 0x71c09000, 0x717d91c0, 0x70ba9380, + 0x70079240, 0x73349700, 0x738996c0, 0x724e9480, 0x72f39540, + 0x74289e00, 0x74959fc0, 0x75529d80, 0x75ef9c40, 0x76dc9900, + 0x766198c0, 0x77a69a80, 0x771b9b40, 0x7a108c00, 0x7aad8dc0, + 0x7b6a8f80, 0x7bd78e40, 0x78e48b00, 0x78598ac0, 0x799e8880, + 0x79238940, 0x7ff88200, 0x7f4583c0, 0x7e828180, 0x7e3f8040, + 0x7d0c8500, 0x7db184c0, 0x7c768680, 0x7ccb8740, 0x6660a800, + 0x66dda9c0, 0x671aab80, 0x67a7aa40, 0x6494af00, 0x6429aec0, + 0x65eeac80, 0x6553ad40, 0x6388a600, 0x6335a7c0, 0x62f2a580, + 0x624fa440, 0x617ca100, 0x61c1a0c0, 0x6006a280, 0x60bba340, + 0x6db0b400, 0x6d0db5c0, 0x6ccab780, 0x6c77b640, 0x6f44b300, + 0x6ff9b2c0, 0x6e3eb080, 0x6e83b140, 0x6858ba00, 0x68e5bbc0, + 0x6922b980, 0x699fb840, 0x6aacbd00, 0x6a11bcc0, 0x6bd6be80, + 0x6b6bbf40}}; + +static const word_t crc_braid_big_table[][256] = { + {0x0000000000000000, 0xc001bd0000000000, 0x80037a0100000000, + 0x4002c70100000000, 0x0007f40200000000, 0xc006490200000000, + 0x80048e0300000000, 0x4005330300000000, 0x000ee80500000000, + 0xc00f550500000000, 0x800d920400000000, 0x400c2f0400000000, + 0x00091c0700000000, 0xc008a10700000000, 0x800a660600000000, + 0x400bdb0600000000, 0x001cd00b00000000, 0xc01d6d0b00000000, + 0x801faa0a00000000, 0x401e170a00000000, 0x001b240900000000, + 0xc01a990900000000, 0x80185e0800000000, 0x4019e30800000000, + 0x0012380e00000000, 0xc013850e00000000, 0x8011420f00000000, + 0x4010ff0f00000000, 0x0015cc0c00000000, 0xc014710c00000000, + 0x8016b60d00000000, 0x40170b0d00000000, 0x0038a01700000000, + 0xc0391d1700000000, 0x803bda1600000000, 0x403a671600000000, + 0x003f541500000000, 0xc03ee91500000000, 0x803c2e1400000000, + 0x403d931400000000, 0x0036481200000000, 0xc037f51200000000, + 0x8035321300000000, 0x40348f1300000000, 0x0031bc1000000000, + 0xc030011000000000, 0x8032c61100000000, 0x40337b1100000000, + 0x0024701c00000000, 0xc025cd1c00000000, 0x80270a1d00000000, + 0x4026b71d00000000, 0x0023841e00000000, 0xc022391e00000000, + 0x8020fe1f00000000, 0x4021431f00000000, 0x002a981900000000, + 0xc02b251900000000, 0x8029e21800000000, 0x40285f1800000000, + 0x002d6c1b00000000, 0xc02cd11b00000000, 0x802e161a00000000, + 0x402fab1a00000000, 0x0070402f00000000, 0xc071fd2f00000000, + 0x80733a2e00000000, 0x4072872e00000000, 0x0077b42d00000000, + 0xc076092d00000000, 0x8074ce2c00000000, 0x4075732c00000000, + 0x007ea82a00000000, 0xc07f152a00000000, 0x807dd22b00000000, + 0x407c6f2b00000000, 0x00795c2800000000, 0xc078e12800000000, + 0x807a262900000000, 0x407b9b2900000000, 0x006c902400000000, + 0xc06d2d2400000000, 0x806fea2500000000, 0x406e572500000000, + 0x006b642600000000, 0xc06ad92600000000, 0x80681e2700000000, + 0x4069a32700000000, 0x0062782100000000, 0xc063c52100000000, + 0x8061022000000000, 0x4060bf2000000000, 0x00658c2300000000, + 0xc064312300000000, 0x8066f62200000000, 0x40674b2200000000, + 0x0048e03800000000, 0xc0495d3800000000, 0x804b9a3900000000, + 0x404a273900000000, 0x004f143a00000000, 0xc04ea93a00000000, + 0x804c6e3b00000000, 0x404dd33b00000000, 0x0046083d00000000, + 0xc047b53d00000000, 0x8045723c00000000, 0x4044cf3c00000000, + 0x0041fc3f00000000, 0xc040413f00000000, 0x8042863e00000000, + 0x40433b3e00000000, 0x0054303300000000, 0xc0558d3300000000, + 0x80574a3200000000, 0x4056f73200000000, 0x0053c43100000000, + 0xc052793100000000, 0x8050be3000000000, 0x4051033000000000, + 0x005ad83600000000, 0xc05b653600000000, 0x8059a23700000000, + 0x40581f3700000000, 0x005d2c3400000000, 0xc05c913400000000, + 0x805e563500000000, 0x405feb3500000000, 0x00e0805e00000000, + 0xc0e13d5e00000000, 0x80e3fa5f00000000, 0x40e2475f00000000, + 0x00e7745c00000000, 0xc0e6c95c00000000, 0x80e40e5d00000000, + 0x40e5b35d00000000, 0x00ee685b00000000, 0xc0efd55b00000000, + 0x80ed125a00000000, 0x40ecaf5a00000000, 0x00e99c5900000000, + 0xc0e8215900000000, 0x80eae65800000000, 0x40eb5b5800000000, + 0x00fc505500000000, 0xc0fded5500000000, 0x80ff2a5400000000, + 0x40fe975400000000, 0x00fba45700000000, 0xc0fa195700000000, + 0x80f8de5600000000, 0x40f9635600000000, 0x00f2b85000000000, + 0xc0f3055000000000, 0x80f1c25100000000, 0x40f07f5100000000, + 0x00f54c5200000000, 0xc0f4f15200000000, 0x80f6365300000000, + 0x40f78b5300000000, 0x00d8204900000000, 0xc0d99d4900000000, + 0x80db5a4800000000, 0x40dae74800000000, 0x00dfd44b00000000, + 0xc0de694b00000000, 0x80dcae4a00000000, 0x40dd134a00000000, + 0x00d6c84c00000000, 0xc0d7754c00000000, 0x80d5b24d00000000, + 0x40d40f4d00000000, 0x00d13c4e00000000, 0xc0d0814e00000000, + 0x80d2464f00000000, 0x40d3fb4f00000000, 0x00c4f04200000000, + 0xc0c54d4200000000, 0x80c78a4300000000, 0x40c6374300000000, + 0x00c3044000000000, 0xc0c2b94000000000, 0x80c07e4100000000, + 0x40c1c34100000000, 0x00ca184700000000, 0xc0cba54700000000, + 0x80c9624600000000, 0x40c8df4600000000, 0x00cdec4500000000, + 0xc0cc514500000000, 0x80ce964400000000, 0x40cf2b4400000000, + 0x0090c07100000000, 0xc0917d7100000000, 0x8093ba7000000000, + 0x4092077000000000, 0x0097347300000000, 0xc096897300000000, + 0x80944e7200000000, 0x4095f37200000000, 0x009e287400000000, + 0xc09f957400000000, 0x809d527500000000, 0x409cef7500000000, + 0x0099dc7600000000, 0xc098617600000000, 0x809aa67700000000, + 0x409b1b7700000000, 0x008c107a00000000, 0xc08dad7a00000000, + 0x808f6a7b00000000, 0x408ed77b00000000, 0x008be47800000000, + 0xc08a597800000000, 0x80889e7900000000, 0x4089237900000000, + 0x0082f87f00000000, 0xc083457f00000000, 0x8081827e00000000, + 0x40803f7e00000000, 0x00850c7d00000000, 0xc084b17d00000000, + 0x8086767c00000000, 0x4087cb7c00000000, 0x00a8606600000000, + 0xc0a9dd6600000000, 0x80ab1a6700000000, 0x40aaa76700000000, + 0x00af946400000000, 0xc0ae296400000000, 0x80acee6500000000, + 0x40ad536500000000, 0x00a6886300000000, 0xc0a7356300000000, + 0x80a5f26200000000, 0x40a44f6200000000, 0x00a17c6100000000, + 0xc0a0c16100000000, 0x80a2066000000000, 0x40a3bb6000000000, + 0x00b4b06d00000000, 0xc0b50d6d00000000, 0x80b7ca6c00000000, + 0x40b6776c00000000, 0x00b3446f00000000, 0xc0b2f96f00000000, + 0x80b03e6e00000000, 0x40b1836e00000000, 0x00ba586800000000, + 0xc0bbe56800000000, 0x80b9226900000000, 0x40b89f6900000000, + 0x00bdac6a00000000, 0xc0bc116a00000000, 0x80bed66b00000000, + 0x40bf6b6b00000000}, + {0x0000000000000000, 0x017d006c00000000, 0x02fa00d800000000, + 0x038700b400000000, 0x07f4020000000000, 0x0689026c00000000, + 0x050e02d800000000, 0x047302b400000000, 0x0ee8050000000000, + 0x0f95056c00000000, 0x0c1205d800000000, 0x0d6f05b400000000, + 0x091c070000000000, 0x0861076c00000000, 0x0be607d800000000, + 0x0a9b07b400000000, 0x1cd00b0000000000, 0x1dad0b6c00000000, + 0x1e2a0bd800000000, 0x1f570bb400000000, 0x1b24090000000000, + 0x1a59096c00000000, 0x19de09d800000000, 0x18a309b400000000, + 0x12380e0000000000, 0x13450e6c00000000, 0x10c20ed800000000, + 0x11bf0eb400000000, 0x15cc0c0000000000, 0x14b10c6c00000000, + 0x17360cd800000000, 0x164b0cb400000000, 0x38a0170000000000, + 0x39dd176c00000000, 0x3a5a17d800000000, 0x3b2717b400000000, + 0x3f54150000000000, 0x3e29156c00000000, 0x3dae15d800000000, + 0x3cd315b400000000, 0x3648120000000000, 0x3735126c00000000, + 0x34b212d800000000, 0x35cf12b400000000, 0x31bc100000000000, + 0x30c1106c00000000, 0x334610d800000000, 0x323b10b400000000, + 0x24701c0000000000, 0x250d1c6c00000000, 0x268a1cd800000000, + 0x27f71cb400000000, 0x23841e0000000000, 0x22f91e6c00000000, + 0x217e1ed800000000, 0x20031eb400000000, 0x2a98190000000000, + 0x2be5196c00000000, 0x286219d800000000, 0x291f19b400000000, + 0x2d6c1b0000000000, 0x2c111b6c00000000, 0x2f961bd800000000, + 0x2eeb1bb400000000, 0x70402f0000000000, 0x713d2f6c00000000, + 0x72ba2fd800000000, 0x73c72fb400000000, 0x77b42d0000000000, + 0x76c92d6c00000000, 0x754e2dd800000000, 0x74332db400000000, + 0x7ea82a0000000000, 0x7fd52a6c00000000, 0x7c522ad800000000, + 0x7d2f2ab400000000, 0x795c280000000000, 0x7821286c00000000, + 0x7ba628d800000000, 0x7adb28b400000000, 0x6c90240000000000, + 0x6ded246c00000000, 0x6e6a24d800000000, 0x6f1724b400000000, + 0x6b64260000000000, 0x6a19266c00000000, 0x699e26d800000000, + 0x68e326b400000000, 0x6278210000000000, 0x6305216c00000000, + 0x608221d800000000, 0x61ff21b400000000, 0x658c230000000000, + 0x64f1236c00000000, 0x677623d800000000, 0x660b23b400000000, + 0x48e0380000000000, 0x499d386c00000000, 0x4a1a38d800000000, + 0x4b6738b400000000, 0x4f143a0000000000, 0x4e693a6c00000000, + 0x4dee3ad800000000, 0x4c933ab400000000, 0x46083d0000000000, + 0x47753d6c00000000, 0x44f23dd800000000, 0x458f3db400000000, + 0x41fc3f0000000000, 0x40813f6c00000000, 0x43063fd800000000, + 0x427b3fb400000000, 0x5430330000000000, 0x554d336c00000000, + 0x56ca33d800000000, 0x57b733b400000000, 0x53c4310000000000, + 0x52b9316c00000000, 0x513e31d800000000, 0x504331b400000000, + 0x5ad8360000000000, 0x5ba5366c00000000, 0x582236d800000000, + 0x595f36b400000000, 0x5d2c340000000000, 0x5c51346c00000000, + 0x5fd634d800000000, 0x5eab34b400000000, 0xe0805e0000000000, + 0xe1fd5e6c00000000, 0xe27a5ed800000000, 0xe3075eb400000000, + 0xe7745c0000000000, 0xe6095c6c00000000, 0xe58e5cd800000000, + 0xe4f35cb400000000, 0xee685b0000000000, 0xef155b6c00000000, + 0xec925bd800000000, 0xedef5bb400000000, 0xe99c590000000000, + 0xe8e1596c00000000, 0xeb6659d800000000, 0xea1b59b400000000, + 0xfc50550000000000, 0xfd2d556c00000000, 0xfeaa55d800000000, + 0xffd755b400000000, 0xfba4570000000000, 0xfad9576c00000000, + 0xf95e57d800000000, 0xf82357b400000000, 0xf2b8500000000000, + 0xf3c5506c00000000, 0xf04250d800000000, 0xf13f50b400000000, + 0xf54c520000000000, 0xf431526c00000000, 0xf7b652d800000000, + 0xf6cb52b400000000, 0xd820490000000000, 0xd95d496c00000000, + 0xdada49d800000000, 0xdba749b400000000, 0xdfd44b0000000000, + 0xdea94b6c00000000, 0xdd2e4bd800000000, 0xdc534bb400000000, + 0xd6c84c0000000000, 0xd7b54c6c00000000, 0xd4324cd800000000, + 0xd54f4cb400000000, 0xd13c4e0000000000, 0xd0414e6c00000000, + 0xd3c64ed800000000, 0xd2bb4eb400000000, 0xc4f0420000000000, + 0xc58d426c00000000, 0xc60a42d800000000, 0xc77742b400000000, + 0xc304400000000000, 0xc279406c00000000, 0xc1fe40d800000000, + 0xc08340b400000000, 0xca18470000000000, 0xcb65476c00000000, + 0xc8e247d800000000, 0xc99f47b400000000, 0xcdec450000000000, + 0xcc91456c00000000, 0xcf1645d800000000, 0xce6b45b400000000, + 0x90c0710000000000, 0x91bd716c00000000, 0x923a71d800000000, + 0x934771b400000000, 0x9734730000000000, 0x9649736c00000000, + 0x95ce73d800000000, 0x94b373b400000000, 0x9e28740000000000, + 0x9f55746c00000000, 0x9cd274d800000000, 0x9daf74b400000000, + 0x99dc760000000000, 0x98a1766c00000000, 0x9b2676d800000000, + 0x9a5b76b400000000, 0x8c107a0000000000, 0x8d6d7a6c00000000, + 0x8eea7ad800000000, 0x8f977ab400000000, 0x8be4780000000000, + 0x8a99786c00000000, 0x891e78d800000000, 0x886378b400000000, + 0x82f87f0000000000, 0x83857f6c00000000, 0x80027fd800000000, + 0x817f7fb400000000, 0x850c7d0000000000, 0x84717d6c00000000, + 0x87f67dd800000000, 0x868b7db400000000, 0xa860660000000000, + 0xa91d666c00000000, 0xaa9a66d800000000, 0xabe766b400000000, + 0xaf94640000000000, 0xaee9646c00000000, 0xad6e64d800000000, + 0xac1364b400000000, 0xa688630000000000, 0xa7f5636c00000000, + 0xa47263d800000000, 0xa50f63b400000000, 0xa17c610000000000, + 0xa001616c00000000, 0xa38661d800000000, 0xa2fb61b400000000, + 0xb4b06d0000000000, 0xb5cd6d6c00000000, 0xb64a6dd800000000, + 0xb7376db400000000, 0xb3446f0000000000, 0xb2396f6c00000000, + 0xb1be6fd800000000, 0xb0c36fb400000000, 0xba58680000000000, + 0xbb25686c00000000, 0xb8a268d800000000, 0xb9df68b400000000, + 0xbdac6a0000000000, 0xbcd16a6c00000000, 0xbf566ad800000000, + 0xbe2b6ab400000000}, + {0x0000000000000000, 0x7c01fd9000000000, 0xfb02f99100000000, + 0x8703040100000000, 0xf505f19300000000, 0x89040c0300000000, + 0x0e07080200000000, 0x7206f59200000000, 0xe90be19700000000, + 0x950a1c0700000000, 0x1209180600000000, 0x6e08e59600000000, + 0x1c0e100400000000, 0x600fed9400000000, 0xe70ce99500000000, + 0x9b0d140500000000, 0xd117c19f00000000, 0xad163c0f00000000, + 0x2a15380e00000000, 0x5614c59e00000000, 0x2412300c00000000, + 0x5813cd9c00000000, 0xdf10c99d00000000, 0xa311340d00000000, + 0x381c200800000000, 0x441ddd9800000000, 0xc31ed99900000000, + 0xbf1f240900000000, 0xcd19d19b00000000, 0xb1182c0b00000000, + 0x361b280a00000000, 0x4a1ad59a00000000, 0xa12f818f00000000, + 0xdd2e7c1f00000000, 0x5a2d781e00000000, 0x262c858e00000000, + 0x542a701c00000000, 0x282b8d8c00000000, 0xaf28898d00000000, + 0xd329741d00000000, 0x4824601800000000, 0x34259d8800000000, + 0xb326998900000000, 0xcf27641900000000, 0xbd21918b00000000, + 0xc1206c1b00000000, 0x4623681a00000000, 0x3a22958a00000000, + 0x7038401000000000, 0x0c39bd8000000000, 0x8b3ab98100000000, + 0xf73b441100000000, 0x853db18300000000, 0xf93c4c1300000000, + 0x7e3f481200000000, 0x023eb58200000000, 0x9933a18700000000, + 0xe5325c1700000000, 0x6231581600000000, 0x1e30a58600000000, + 0x6c36501400000000, 0x1037ad8400000000, 0x9734a98500000000, + 0xeb35541500000000, 0x415f01af00000000, 0x3d5efc3f00000000, + 0xba5df83e00000000, 0xc65c05ae00000000, 0xb45af03c00000000, + 0xc85b0dac00000000, 0x4f5809ad00000000, 0x3359f43d00000000, + 0xa854e03800000000, 0xd4551da800000000, 0x535619a900000000, + 0x2f57e43900000000, 0x5d5111ab00000000, 0x2150ec3b00000000, + 0xa653e83a00000000, 0xda5215aa00000000, 0x9048c03000000000, + 0xec493da000000000, 0x6b4a39a100000000, 0x174bc43100000000, + 0x654d31a300000000, 0x194ccc3300000000, 0x9e4fc83200000000, + 0xe24e35a200000000, 0x794321a700000000, 0x0542dc3700000000, + 0x8241d83600000000, 0xfe4025a600000000, 0x8c46d03400000000, + 0xf0472da400000000, 0x774429a500000000, 0x0b45d43500000000, + 0xe070802000000000, 0x9c717db000000000, 0x1b7279b100000000, + 0x6773842100000000, 0x157571b300000000, 0x69748c2300000000, + 0xee77882200000000, 0x927675b200000000, 0x097b61b700000000, + 0x757a9c2700000000, 0xf279982600000000, 0x8e7865b600000000, + 0xfc7e902400000000, 0x807f6db400000000, 0x077c69b500000000, + 0x7b7d942500000000, 0x316741bf00000000, 0x4d66bc2f00000000, + 0xca65b82e00000000, 0xb66445be00000000, 0xc462b02c00000000, + 0xb8634dbc00000000, 0x3f6049bd00000000, 0x4361b42d00000000, + 0xd86ca02800000000, 0xa46d5db800000000, 0x236e59b900000000, + 0x5f6fa42900000000, 0x2d6951bb00000000, 0x5168ac2b00000000, + 0xd66ba82a00000000, 0xaa6a55ba00000000, 0x81be01ee00000000, + 0xfdbffc7e00000000, 0x7abcf87f00000000, 0x06bd05ef00000000, + 0x74bbf07d00000000, 0x08ba0ded00000000, 0x8fb909ec00000000, + 0xf3b8f47c00000000, 0x68b5e07900000000, 0x14b41de900000000, + 0x93b719e800000000, 0xefb6e47800000000, 0x9db011ea00000000, + 0xe1b1ec7a00000000, 0x66b2e87b00000000, 0x1ab315eb00000000, + 0x50a9c07100000000, 0x2ca83de100000000, 0xabab39e000000000, + 0xd7aac47000000000, 0xa5ac31e200000000, 0xd9adcc7200000000, + 0x5eaec87300000000, 0x22af35e300000000, 0xb9a221e600000000, + 0xc5a3dc7600000000, 0x42a0d87700000000, 0x3ea125e700000000, + 0x4ca7d07500000000, 0x30a62de500000000, 0xb7a529e400000000, + 0xcba4d47400000000, 0x2091806100000000, 0x5c907df100000000, + 0xdb9379f000000000, 0xa792846000000000, 0xd59471f200000000, + 0xa9958c6200000000, 0x2e96886300000000, 0x529775f300000000, + 0xc99a61f600000000, 0xb59b9c6600000000, 0x3298986700000000, + 0x4e9965f700000000, 0x3c9f906500000000, 0x409e6df500000000, + 0xc79d69f400000000, 0xbb9c946400000000, 0xf18641fe00000000, + 0x8d87bc6e00000000, 0x0a84b86f00000000, 0x768545ff00000000, + 0x0483b06d00000000, 0x78824dfd00000000, 0xff8149fc00000000, + 0x8380b46c00000000, 0x188da06900000000, 0x648c5df900000000, + 0xe38f59f800000000, 0x9f8ea46800000000, 0xed8851fa00000000, + 0x9189ac6a00000000, 0x168aa86b00000000, 0x6a8b55fb00000000, + 0xc0e1004100000000, 0xbce0fdd100000000, 0x3be3f9d000000000, + 0x47e2044000000000, 0x35e4f1d200000000, 0x49e50c4200000000, + 0xcee6084300000000, 0xb2e7f5d300000000, 0x29eae1d600000000, + 0x55eb1c4600000000, 0xd2e8184700000000, 0xaee9e5d700000000, + 0xdcef104500000000, 0xa0eeedd500000000, 0x27ede9d400000000, + 0x5bec144400000000, 0x11f6c1de00000000, 0x6df73c4e00000000, + 0xeaf4384f00000000, 0x96f5c5df00000000, 0xe4f3304d00000000, + 0x98f2cddd00000000, 0x1ff1c9dc00000000, 0x63f0344c00000000, + 0xf8fd204900000000, 0x84fcddd900000000, 0x03ffd9d800000000, + 0x7ffe244800000000, 0x0df8d1da00000000, 0x71f92c4a00000000, + 0xf6fa284b00000000, 0x8afbd5db00000000, 0x61ce81ce00000000, + 0x1dcf7c5e00000000, 0x9acc785f00000000, 0xe6cd85cf00000000, + 0x94cb705d00000000, 0xe8ca8dcd00000000, 0x6fc989cc00000000, + 0x13c8745c00000000, 0x88c5605900000000, 0xf4c49dc900000000, + 0x73c799c800000000, 0x0fc6645800000000, 0x7dc091ca00000000, + 0x01c16c5a00000000, 0x86c2685b00000000, 0xfac395cb00000000, + 0xb0d9405100000000, 0xccd8bdc100000000, 0x4bdbb9c000000000, + 0x37da445000000000, 0x45dcb1c200000000, 0x39dd4c5200000000, + 0xbede485300000000, 0xc2dfb5c300000000, 0x59d2a1c600000000, + 0x25d35c5600000000, 0xa2d0585700000000, 0xded1a5c700000000, + 0xacd7505500000000, 0xd0d6adc500000000, 0x57d5a9c400000000, + 0x2bd4545400000000}, + {0x0000000000000000, 0x008151a900000000, 0x0302a0e200000000, + 0x0383f14b00000000, 0x0504437500000000, 0x058512dc00000000, + 0x0606e39700000000, 0x0687b23e00000000, 0x0a0886ea00000000, + 0x0a89d74300000000, 0x090a260800000000, 0x098b77a100000000, + 0x0f0cc59f00000000, 0x0f8d943600000000, 0x0c0e657d00000000, + 0x0c8f34d400000000, 0x17100f6500000000, 0x17915ecc00000000, + 0x1412af8700000000, 0x1493fe2e00000000, 0x12144c1000000000, + 0x12951db900000000, 0x1116ecf200000000, 0x1197bd5b00000000, + 0x1d18898f00000000, 0x1d99d82600000000, 0x1e1a296d00000000, + 0x1e9b78c400000000, 0x181ccafa00000000, 0x189d9b5300000000, + 0x1b1e6a1800000000, 0x1b9f3bb100000000, 0x2e201eca00000000, + 0x2ea14f6300000000, 0x2d22be2800000000, 0x2da3ef8100000000, + 0x2b245dbf00000000, 0x2ba50c1600000000, 0x2826fd5d00000000, + 0x28a7acf400000000, 0x2428982000000000, 0x24a9c98900000000, + 0x272a38c200000000, 0x27ab696b00000000, 0x212cdb5500000000, + 0x21ad8afc00000000, 0x222e7bb700000000, 0x22af2a1e00000000, + 0x393011af00000000, 0x39b1400600000000, 0x3a32b14d00000000, + 0x3ab3e0e400000000, 0x3c3452da00000000, 0x3cb5037300000000, + 0x3f36f23800000000, 0x3fb7a39100000000, 0x3338974500000000, + 0x33b9c6ec00000000, 0x303a37a700000000, 0x30bb660e00000000, + 0x363cd43000000000, 0x36bd859900000000, 0x353e74d200000000, + 0x35bf257b00000000, 0x5f403f2400000000, 0x5fc16e8d00000000, + 0x5c429fc600000000, 0x5cc3ce6f00000000, 0x5a447c5100000000, + 0x5ac52df800000000, 0x5946dcb300000000, 0x59c78d1a00000000, + 0x5548b9ce00000000, 0x55c9e86700000000, 0x564a192c00000000, + 0x56cb488500000000, 0x504cfabb00000000, 0x50cdab1200000000, + 0x534e5a5900000000, 0x53cf0bf000000000, 0x4850304100000000, + 0x48d161e800000000, 0x4b5290a300000000, 0x4bd3c10a00000000, + 0x4d54733400000000, 0x4dd5229d00000000, 0x4e56d3d600000000, + 0x4ed7827f00000000, 0x4258b6ab00000000, 0x42d9e70200000000, + 0x415a164900000000, 0x41db47e000000000, 0x475cf5de00000000, + 0x47dda47700000000, 0x445e553c00000000, 0x44df049500000000, + 0x716021ee00000000, 0x71e1704700000000, 0x7262810c00000000, + 0x72e3d0a500000000, 0x7464629b00000000, 0x74e5333200000000, + 0x7766c27900000000, 0x77e793d000000000, 0x7b68a70400000000, + 0x7be9f6ad00000000, 0x786a07e600000000, 0x78eb564f00000000, + 0x7e6ce47100000000, 0x7eedb5d800000000, 0x7d6e449300000000, + 0x7def153a00000000, 0x66702e8b00000000, 0x66f17f2200000000, + 0x65728e6900000000, 0x65f3dfc000000000, 0x63746dfe00000000, + 0x63f53c5700000000, 0x6076cd1c00000000, 0x60f79cb500000000, + 0x6c78a86100000000, 0x6cf9f9c800000000, 0x6f7a088300000000, + 0x6ffb592a00000000, 0x697ceb1400000000, 0x69fdbabd00000000, + 0x6a7e4bf600000000, 0x6aff1a5f00000000, 0xbe807e4800000000, + 0xbe012fe100000000, 0xbd82deaa00000000, 0xbd038f0300000000, + 0xbb843d3d00000000, 0xbb056c9400000000, 0xb8869ddf00000000, + 0xb807cc7600000000, 0xb488f8a200000000, 0xb409a90b00000000, + 0xb78a584000000000, 0xb70b09e900000000, 0xb18cbbd700000000, + 0xb10dea7e00000000, 0xb28e1b3500000000, 0xb20f4a9c00000000, + 0xa990712d00000000, 0xa911208400000000, 0xaa92d1cf00000000, + 0xaa13806600000000, 0xac94325800000000, 0xac1563f100000000, + 0xaf9692ba00000000, 0xaf17c31300000000, 0xa398f7c700000000, + 0xa319a66e00000000, 0xa09a572500000000, 0xa01b068c00000000, + 0xa69cb4b200000000, 0xa61de51b00000000, 0xa59e145000000000, + 0xa51f45f900000000, 0x90a0608200000000, 0x9021312b00000000, + 0x93a2c06000000000, 0x932391c900000000, 0x95a423f700000000, + 0x9525725e00000000, 0x96a6831500000000, 0x9627d2bc00000000, + 0x9aa8e66800000000, 0x9a29b7c100000000, 0x99aa468a00000000, + 0x992b172300000000, 0x9faca51d00000000, 0x9f2df4b400000000, + 0x9cae05ff00000000, 0x9c2f545600000000, 0x87b06fe700000000, + 0x87313e4e00000000, 0x84b2cf0500000000, 0x84339eac00000000, + 0x82b42c9200000000, 0x82357d3b00000000, 0x81b68c7000000000, + 0x8137ddd900000000, 0x8db8e90d00000000, 0x8d39b8a400000000, + 0x8eba49ef00000000, 0x8e3b184600000000, 0x88bcaa7800000000, + 0x883dfbd100000000, 0x8bbe0a9a00000000, 0x8b3f5b3300000000, + 0xe1c0416c00000000, 0xe14110c500000000, 0xe2c2e18e00000000, + 0xe243b02700000000, 0xe4c4021900000000, 0xe44553b000000000, + 0xe7c6a2fb00000000, 0xe747f35200000000, 0xebc8c78600000000, + 0xeb49962f00000000, 0xe8ca676400000000, 0xe84b36cd00000000, + 0xeecc84f300000000, 0xee4dd55a00000000, 0xedce241100000000, + 0xed4f75b800000000, 0xf6d04e0900000000, 0xf6511fa000000000, + 0xf5d2eeeb00000000, 0xf553bf4200000000, 0xf3d40d7c00000000, + 0xf3555cd500000000, 0xf0d6ad9e00000000, 0xf057fc3700000000, + 0xfcd8c8e300000000, 0xfc59994a00000000, 0xffda680100000000, + 0xff5b39a800000000, 0xf9dc8b9600000000, 0xf95dda3f00000000, + 0xfade2b7400000000, 0xfa5f7add00000000, 0xcfe05fa600000000, + 0xcf610e0f00000000, 0xcce2ff4400000000, 0xcc63aeed00000000, + 0xcae41cd300000000, 0xca654d7a00000000, 0xc9e6bc3100000000, + 0xc967ed9800000000, 0xc5e8d94c00000000, 0xc56988e500000000, + 0xc6ea79ae00000000, 0xc66b280700000000, 0xc0ec9a3900000000, + 0xc06dcb9000000000, 0xc3ee3adb00000000, 0xc36f6b7200000000, + 0xd8f050c300000000, 0xd871016a00000000, 0xdbf2f02100000000, + 0xdb73a18800000000, 0xddf413b600000000, 0xdd75421f00000000, + 0xdef6b35400000000, 0xde77e2fd00000000, 0xd2f8d62900000000, + 0xd279878000000000, 0xd1fa76cb00000000, 0xd17b276200000000, + 0xd7fc955c00000000, 0xd77dc4f500000000, 0xd4fe35be00000000, + 0xd47f641700000000}, + {0x0000000000000000, 0x8151a90000000000, 0x02a3520100000000, + 0x83f2fb0100000000, 0x0446a50200000000, 0x85170c0200000000, + 0x06e5f70300000000, 0x87b45e0300000000, 0x088c4a0500000000, + 0x89dde30500000000, 0x0a2f180400000000, 0x8b7eb10400000000, + 0x0ccaef0700000000, 0x8d9b460700000000, 0x0e69bd0600000000, + 0x8f38140600000000, 0x1018950a00000000, 0x91493c0a00000000, + 0x12bbc70b00000000, 0x93ea6e0b00000000, 0x145e300800000000, + 0x950f990800000000, 0x16fd620900000000, 0x97accb0900000000, + 0x1894df0f00000000, 0x99c5760f00000000, 0x1a378d0e00000000, + 0x9b66240e00000000, 0x1cd27a0d00000000, 0x9d83d30d00000000, + 0x1e71280c00000000, 0x9f20810c00000000, 0x20302a1500000000, + 0xa161831500000000, 0x2293781400000000, 0xa3c2d11400000000, + 0x24768f1700000000, 0xa527261700000000, 0x26d5dd1600000000, + 0xa784741600000000, 0x28bc601000000000, 0xa9edc91000000000, + 0x2a1f321100000000, 0xab4e9b1100000000, 0x2cfac51200000000, + 0xadab6c1200000000, 0x2e59971300000000, 0xaf083e1300000000, + 0x3028bf1f00000000, 0xb179161f00000000, 0x328bed1e00000000, + 0xb3da441e00000000, 0x346e1a1d00000000, 0xb53fb31d00000000, + 0x36cd481c00000000, 0xb79ce11c00000000, 0x38a4f51a00000000, + 0xb9f55c1a00000000, 0x3a07a71b00000000, 0xbb560e1b00000000, + 0x3ce2501800000000, 0xbdb3f91800000000, 0x3e41021900000000, + 0xbf10ab1900000000, 0x4060542a00000000, 0xc131fd2a00000000, + 0x42c3062b00000000, 0xc392af2b00000000, 0x4426f12800000000, + 0xc577582800000000, 0x4685a32900000000, 0xc7d40a2900000000, + 0x48ec1e2f00000000, 0xc9bdb72f00000000, 0x4a4f4c2e00000000, + 0xcb1ee52e00000000, 0x4caabb2d00000000, 0xcdfb122d00000000, + 0x4e09e92c00000000, 0xcf58402c00000000, 0x5078c12000000000, + 0xd129682000000000, 0x52db932100000000, 0xd38a3a2100000000, + 0x543e642200000000, 0xd56fcd2200000000, 0x569d362300000000, + 0xd7cc9f2300000000, 0x58f48b2500000000, 0xd9a5222500000000, + 0x5a57d92400000000, 0xdb06702400000000, 0x5cb22e2700000000, + 0xdde3872700000000, 0x5e117c2600000000, 0xdf40d52600000000, + 0x60507e3f00000000, 0xe101d73f00000000, 0x62f32c3e00000000, + 0xe3a2853e00000000, 0x6416db3d00000000, 0xe547723d00000000, + 0x66b5893c00000000, 0xe7e4203c00000000, 0x68dc343a00000000, + 0xe98d9d3a00000000, 0x6a7f663b00000000, 0xeb2ecf3b00000000, + 0x6c9a913800000000, 0xedcb383800000000, 0x6e39c33900000000, + 0xef686a3900000000, 0x7048eb3500000000, 0xf119423500000000, + 0x72ebb93400000000, 0xf3ba103400000000, 0x740e4e3700000000, + 0xf55fe73700000000, 0x76ad1c3600000000, 0xf7fcb53600000000, + 0x78c4a13000000000, 0xf995083000000000, 0x7a67f33100000000, + 0xfb365a3100000000, 0x7c82043200000000, 0xfdd3ad3200000000, + 0x7e21563300000000, 0xff70ff3300000000, 0x80c0a85400000000, + 0x0191015400000000, 0x8263fa5500000000, 0x0332535500000000, + 0x84860d5600000000, 0x05d7a45600000000, 0x86255f5700000000, + 0x0774f65700000000, 0x884ce25100000000, 0x091d4b5100000000, + 0x8aefb05000000000, 0x0bbe195000000000, 0x8c0a475300000000, + 0x0d5bee5300000000, 0x8ea9155200000000, 0x0ff8bc5200000000, + 0x90d83d5e00000000, 0x1189945e00000000, 0x927b6f5f00000000, + 0x132ac65f00000000, 0x949e985c00000000, 0x15cf315c00000000, + 0x963dca5d00000000, 0x176c635d00000000, 0x9854775b00000000, + 0x1905de5b00000000, 0x9af7255a00000000, 0x1ba68c5a00000000, + 0x9c12d25900000000, 0x1d437b5900000000, 0x9eb1805800000000, + 0x1fe0295800000000, 0xa0f0824100000000, 0x21a12b4100000000, + 0xa253d04000000000, 0x2302794000000000, 0xa4b6274300000000, + 0x25e78e4300000000, 0xa615754200000000, 0x2744dc4200000000, + 0xa87cc84400000000, 0x292d614400000000, 0xaadf9a4500000000, + 0x2b8e334500000000, 0xac3a6d4600000000, 0x2d6bc44600000000, + 0xae993f4700000000, 0x2fc8964700000000, 0xb0e8174b00000000, + 0x31b9be4b00000000, 0xb24b454a00000000, 0x331aec4a00000000, + 0xb4aeb24900000000, 0x35ff1b4900000000, 0xb60de04800000000, + 0x375c494800000000, 0xb8645d4e00000000, 0x3935f44e00000000, + 0xbac70f4f00000000, 0x3b96a64f00000000, 0xbc22f84c00000000, + 0x3d73514c00000000, 0xbe81aa4d00000000, 0x3fd0034d00000000, + 0xc0a0fc7e00000000, 0x41f1557e00000000, 0xc203ae7f00000000, + 0x4352077f00000000, 0xc4e6597c00000000, 0x45b7f07c00000000, + 0xc6450b7d00000000, 0x4714a27d00000000, 0xc82cb67b00000000, + 0x497d1f7b00000000, 0xca8fe47a00000000, 0x4bde4d7a00000000, + 0xcc6a137900000000, 0x4d3bba7900000000, 0xcec9417800000000, + 0x4f98e87800000000, 0xd0b8697400000000, 0x51e9c07400000000, + 0xd21b3b7500000000, 0x534a927500000000, 0xd4fecc7600000000, + 0x55af657600000000, 0xd65d9e7700000000, 0x570c377700000000, + 0xd834237100000000, 0x59658a7100000000, 0xda97717000000000, + 0x5bc6d87000000000, 0xdc72867300000000, 0x5d232f7300000000, + 0xded1d47200000000, 0x5f807d7200000000, 0xe090d66b00000000, + 0x61c17f6b00000000, 0xe233846a00000000, 0x63622d6a00000000, + 0xe4d6736900000000, 0x6587da6900000000, 0xe675216800000000, + 0x6724886800000000, 0xe81c9c6e00000000, 0x694d356e00000000, + 0xeabfce6f00000000, 0x6bee676f00000000, 0xec5a396c00000000, + 0x6d0b906c00000000, 0xeef96b6d00000000, 0x6fa8c26d00000000, + 0xf088436100000000, 0x71d9ea6100000000, 0xf22b116000000000, + 0x737ab86000000000, 0xf4cee66300000000, 0x759f4f6300000000, + 0xf66db46200000000, 0x773c1d6200000000, 0xf804096400000000, + 0x7955a06400000000, 0xfaa75b6500000000, 0x7bf6f26500000000, + 0xfc42ac6600000000, 0x7d13056600000000, 0xfee1fe6700000000, + 0x7fb0576700000000}, + {0x0000000000000000, 0x5128904800000000, 0xa250209100000000, + 0xf378b0d900000000, 0x47a1439200000000, 0x1689d3da00000000, + 0xe5f1630300000000, 0xb4d9f34b00000000, 0x8d42849400000000, + 0xdc6a14dc00000000, 0x2f12a40500000000, 0x7e3a344d00000000, + 0xcae3c70600000000, 0x9bcb574e00000000, 0x68b3e79700000000, + 0x399b77df00000000, 0x19850b9900000000, 0x48ad9bd100000000, + 0xbbd52b0800000000, 0xeafdbb4000000000, 0x5e24480b00000000, + 0x0f0cd84300000000, 0xfc74689a00000000, 0xad5cf8d200000000, + 0x94c78f0d00000000, 0xc5ef1f4500000000, 0x3697af9c00000000, + 0x67bf3fd400000000, 0xd366cc9f00000000, 0x824e5cd700000000, + 0x7136ec0e00000000, 0x201e7c4600000000, 0x310a148200000000, + 0x602284ca00000000, 0x935a341300000000, 0xc272a45b00000000, + 0x76ab571000000000, 0x2783c75800000000, 0xd4fb778100000000, + 0x85d3e7c900000000, 0xbc48901600000000, 0xed60005e00000000, + 0x1e18b08700000000, 0x4f3020cf00000000, 0xfbe9d38400000000, + 0xaac143cc00000000, 0x59b9f31500000000, 0x0891635d00000000, + 0x288f1f1b00000000, 0x79a78f5300000000, 0x8adf3f8a00000000, + 0xdbf7afc200000000, 0x6f2e5c8900000000, 0x3e06ccc100000000, + 0xcd7e7c1800000000, 0x9c56ec5000000000, 0xa5cd9b8f00000000, + 0xf4e50bc700000000, 0x079dbb1e00000000, 0x56b52b5600000000, + 0xe26cd81d00000000, 0xb344485500000000, 0x403cf88c00000000, + 0x111468c400000000, 0x61142bb400000000, 0x303cbbfc00000000, + 0xc3440b2500000000, 0x926c9b6d00000000, 0x26b5682600000000, + 0x779df86e00000000, 0x84e548b700000000, 0xd5cdd8ff00000000, + 0xec56af2000000000, 0xbd7e3f6800000000, 0x4e068fb100000000, + 0x1f2e1ff900000000, 0xabf7ecb200000000, 0xfadf7cfa00000000, + 0x09a7cc2300000000, 0x588f5c6b00000000, 0x7891202d00000000, + 0x29b9b06500000000, 0xdac100bc00000000, 0x8be990f400000000, + 0x3f3063bf00000000, 0x6e18f3f700000000, 0x9d60432e00000000, + 0xcc48d36600000000, 0xf5d3a4b900000000, 0xa4fb34f100000000, + 0x5783842800000000, 0x06ab146000000000, 0xb272e72b00000000, + 0xe35a776300000000, 0x1022c7ba00000000, 0x410a57f200000000, + 0x501e3f3600000000, 0x0136af7e00000000, 0xf24e1fa700000000, + 0xa3668fef00000000, 0x17bf7ca400000000, 0x4697ecec00000000, + 0xb5ef5c3500000000, 0xe4c7cc7d00000000, 0xdd5cbba200000000, + 0x8c742bea00000000, 0x7f0c9b3300000000, 0x2e240b7b00000000, + 0x9afdf83000000000, 0xcbd5687800000000, 0x38add8a100000000, + 0x698548e900000000, 0x499b34af00000000, 0x18b3a4e700000000, + 0xebcb143e00000000, 0xbae3847600000000, 0x0e3a773d00000000, + 0x5f12e77500000000, 0xac6a57ac00000000, 0xfd42c7e400000000, + 0xc4d9b03b00000000, 0x95f1207300000000, 0x668990aa00000000, + 0x37a100e200000000, 0x8378f3a900000000, 0xd25063e100000000, + 0x2128d33800000000, 0x7000437000000000, 0xc12855d800000000, + 0x9000c59000000000, 0x6378754900000000, 0x3250e50100000000, + 0x8689164a00000000, 0xd7a1860200000000, 0x24d936db00000000, + 0x75f1a69300000000, 0x4c6ad14c00000000, 0x1d42410400000000, + 0xee3af1dd00000000, 0xbf12619500000000, 0x0bcb92de00000000, + 0x5ae3029600000000, 0xa99bb24f00000000, 0xf8b3220700000000, + 0xd8ad5e4100000000, 0x8985ce0900000000, 0x7afd7ed000000000, + 0x2bd5ee9800000000, 0x9f0c1dd300000000, 0xce248d9b00000000, + 0x3d5c3d4200000000, 0x6c74ad0a00000000, 0x55efdad500000000, + 0x04c74a9d00000000, 0xf7bffa4400000000, 0xa6976a0c00000000, + 0x124e994700000000, 0x4366090f00000000, 0xb01eb9d600000000, + 0xe136299e00000000, 0xf022415a00000000, 0xa10ad11200000000, + 0x527261cb00000000, 0x035af18300000000, 0xb78302c800000000, + 0xe6ab928000000000, 0x15d3225900000000, 0x44fbb21100000000, + 0x7d60c5ce00000000, 0x2c48558600000000, 0xdf30e55f00000000, + 0x8e18751700000000, 0x3ac1865c00000000, 0x6be9161400000000, + 0x9891a6cd00000000, 0xc9b9368500000000, 0xe9a74ac300000000, + 0xb88fda8b00000000, 0x4bf76a5200000000, 0x1adffa1a00000000, + 0xae06095100000000, 0xff2e991900000000, 0x0c5629c000000000, + 0x5d7eb98800000000, 0x64e5ce5700000000, 0x35cd5e1f00000000, + 0xc6b5eec600000000, 0x979d7e8e00000000, 0x23448dc500000000, + 0x726c1d8d00000000, 0x8114ad5400000000, 0xd03c3d1c00000000, + 0xa03c7e6c00000000, 0xf114ee2400000000, 0x026c5efd00000000, + 0x5344ceb500000000, 0xe79d3dfe00000000, 0xb6b5adb600000000, + 0x45cd1d6f00000000, 0x14e58d2700000000, 0x2d7efaf800000000, + 0x7c566ab000000000, 0x8f2eda6900000000, 0xde064a2100000000, + 0x6adfb96a00000000, 0x3bf7292200000000, 0xc88f99fb00000000, + 0x99a709b300000000, 0xb9b975f500000000, 0xe891e5bd00000000, + 0x1be9556400000000, 0x4ac1c52c00000000, 0xfe18366700000000, + 0xaf30a62f00000000, 0x5c4816f600000000, 0x0d6086be00000000, + 0x34fbf16100000000, 0x65d3612900000000, 0x96abd1f000000000, + 0xc78341b800000000, 0x735ab2f300000000, 0x227222bb00000000, + 0xd10a926200000000, 0x8022022a00000000, 0x91366aee00000000, + 0xc01efaa600000000, 0x33664a7f00000000, 0x624eda3700000000, + 0xd697297c00000000, 0x87bfb93400000000, 0x74c709ed00000000, + 0x25ef99a500000000, 0x1c74ee7a00000000, 0x4d5c7e3200000000, + 0xbe24ceeb00000000, 0xef0c5ea300000000, 0x5bd5ade800000000, + 0x0afd3da000000000, 0xf9858d7900000000, 0xa8ad1d3100000000, + 0x88b3617700000000, 0xd99bf13f00000000, 0x2ae341e600000000, + 0x7bcbd1ae00000000, 0xcf1222e500000000, 0x9e3ab2ad00000000, + 0x6d42027400000000, 0x3c6a923c00000000, 0x05f1e5e300000000, + 0x54d975ab00000000, 0xa7a1c57200000000, 0xf689553a00000000, + 0x4250a67100000000, 0x1378363900000000, 0xe00086e000000000, + 0xb12816a800000000}, + {0x0000000000000000, 0x29c1d9bd00000000, 0x5182b0cb00000000, + 0x7843697600000000, 0xa104622700000000, 0x88c5bb9a00000000, + 0xf086d2ec00000000, 0xd9470b5100000000, 0x4209c44e00000000, + 0x6bc81df300000000, 0x138b748500000000, 0x3a4aad3800000000, + 0xe30da66900000000, 0xcacc7fd400000000, 0xb28f16a200000000, + 0x9b4ecf1f00000000, 0x8412889d00000000, 0xadd3512000000000, + 0xd590385600000000, 0xfc51e1eb00000000, 0x2516eaba00000000, + 0x0cd7330700000000, 0x74945a7100000000, 0x5d5583cc00000000, + 0xc61b4cd300000000, 0xefda956e00000000, 0x9799fc1800000000, + 0xbe5825a500000000, 0x671f2ef400000000, 0x4edef74900000000, + 0x369d9e3f00000000, 0x1f5c478200000000, 0x0b25138b00000000, + 0x22e4ca3600000000, 0x5aa7a34000000000, 0x73667afd00000000, + 0xaa2171ac00000000, 0x83e0a81100000000, 0xfba3c16700000000, + 0xd26218da00000000, 0x492cd7c500000000, 0x60ed0e7800000000, + 0x18ae670e00000000, 0x316fbeb300000000, 0xe828b5e200000000, + 0xc1e96c5f00000000, 0xb9aa052900000000, 0x906bdc9400000000, + 0x8f379b1600000000, 0xa6f642ab00000000, 0xdeb52bdd00000000, + 0xf774f26000000000, 0x2e33f93100000000, 0x07f2208c00000000, + 0x7fb149fa00000000, 0x5670904700000000, 0xcd3e5f5800000000, + 0xe4ff86e500000000, 0x9cbcef9300000000, 0xb57d362e00000000, + 0x6c3a3d7f00000000, 0x45fbe4c200000000, 0x3db88db400000000, + 0x1479540900000000, 0x154a25a600000000, 0x3c8bfc1b00000000, + 0x44c8956d00000000, 0x6d094cd000000000, 0xb44e478100000000, + 0x9d8f9e3c00000000, 0xe5ccf74a00000000, 0xcc0d2ef700000000, + 0x5743e1e800000000, 0x7e82385500000000, 0x06c1512300000000, + 0x2f00889e00000000, 0xf64783cf00000000, 0xdf865a7200000000, + 0xa7c5330400000000, 0x8e04eab900000000, 0x9158ad3b00000000, + 0xb899748600000000, 0xc0da1df000000000, 0xe91bc44d00000000, + 0x305ccf1c00000000, 0x199d16a100000000, 0x61de7fd700000000, + 0x481fa66a00000000, 0xd351697500000000, 0xfa90b0c800000000, + 0x82d3d9be00000000, 0xab12000300000000, 0x72550b5200000000, + 0x5b94d2ef00000000, 0x23d7bb9900000000, 0x0a16622400000000, + 0x1e6f362d00000000, 0x37aeef9000000000, 0x4fed86e600000000, + 0x662c5f5b00000000, 0xbf6b540a00000000, 0x96aa8db700000000, + 0xeee9e4c100000000, 0xc7283d7c00000000, 0x5c66f26300000000, + 0x75a72bde00000000, 0x0de442a800000000, 0x24259b1500000000, + 0xfd62904400000000, 0xd4a349f900000000, 0xace0208f00000000, + 0x8521f93200000000, 0x9a7dbeb000000000, 0xb3bc670d00000000, + 0xcbff0e7b00000000, 0xe23ed7c600000000, 0x3b79dc9700000000, + 0x12b8052a00000000, 0x6afb6c5c00000000, 0x433ab5e100000000, + 0xd8747afe00000000, 0xf1b5a34300000000, 0x89f6ca3500000000, + 0xa037138800000000, 0x797018d900000000, 0x50b1c16400000000, + 0x28f2a81200000000, 0x013371af00000000, 0x299449fc00000000, + 0x0055904100000000, 0x7816f93700000000, 0x51d7208a00000000, + 0x88902bdb00000000, 0xa151f26600000000, 0xd9129b1000000000, + 0xf0d342ad00000000, 0x6b9d8db200000000, 0x425c540f00000000, + 0x3a1f3d7900000000, 0x13dee4c400000000, 0xca99ef9500000000, + 0xe358362800000000, 0x9b1b5f5e00000000, 0xb2da86e300000000, + 0xad86c16100000000, 0x844718dc00000000, 0xfc0471aa00000000, + 0xd5c5a81700000000, 0x0c82a34600000000, 0x25437afb00000000, + 0x5d00138d00000000, 0x74c1ca3000000000, 0xef8f052f00000000, + 0xc64edc9200000000, 0xbe0db5e400000000, 0x97cc6c5900000000, + 0x4e8b670800000000, 0x674abeb500000000, 0x1f09d7c300000000, + 0x36c80e7e00000000, 0x22b15a7700000000, 0x0b7083ca00000000, + 0x7333eabc00000000, 0x5af2330100000000, 0x83b5385000000000, + 0xaa74e1ed00000000, 0xd237889b00000000, 0xfbf6512600000000, + 0x60b89e3900000000, 0x4979478400000000, 0x313a2ef200000000, + 0x18fbf74f00000000, 0xc1bcfc1e00000000, 0xe87d25a300000000, + 0x903e4cd500000000, 0xb9ff956800000000, 0xa6a3d2ea00000000, + 0x8f620b5700000000, 0xf721622100000000, 0xdee0bb9c00000000, + 0x07a7b0cd00000000, 0x2e66697000000000, 0x5625000600000000, + 0x7fe4d9bb00000000, 0xe4aa16a400000000, 0xcd6bcf1900000000, + 0xb528a66f00000000, 0x9ce97fd200000000, 0x45ae748300000000, + 0x6c6fad3e00000000, 0x142cc44800000000, 0x3ded1df500000000, + 0x3cde6c5a00000000, 0x151fb5e700000000, 0x6d5cdc9100000000, + 0x449d052c00000000, 0x9dda0e7d00000000, 0xb41bd7c000000000, + 0xcc58beb600000000, 0xe599670b00000000, 0x7ed7a81400000000, + 0x571671a900000000, 0x2f5518df00000000, 0x0694c16200000000, + 0xdfd3ca3300000000, 0xf612138e00000000, 0x8e517af800000000, + 0xa790a34500000000, 0xb8cce4c700000000, 0x910d3d7a00000000, + 0xe94e540c00000000, 0xc08f8db100000000, 0x19c886e000000000, + 0x30095f5d00000000, 0x484a362b00000000, 0x618bef9600000000, + 0xfac5208900000000, 0xd304f93400000000, 0xab47904200000000, + 0x828649ff00000000, 0x5bc142ae00000000, 0x72009b1300000000, + 0x0a43f26500000000, 0x23822bd800000000, 0x37fb7fd100000000, + 0x1e3aa66c00000000, 0x6679cf1a00000000, 0x4fb816a700000000, + 0x96ff1df600000000, 0xbf3ec44b00000000, 0xc77dad3d00000000, + 0xeebc748000000000, 0x75f2bb9f00000000, 0x5c33622200000000, + 0x24700b5400000000, 0x0db1d2e900000000, 0xd4f6d9b800000000, + 0xfd37000500000000, 0x8574697300000000, 0xacb5b0ce00000000, + 0xb3e9f74c00000000, 0x9a282ef100000000, 0xe26b478700000000, + 0xcbaa9e3a00000000, 0x12ed956b00000000, 0x3b2c4cd600000000, + 0x436f25a000000000, 0x6aaefc1d00000000, 0xf1e0330200000000, + 0xd821eabf00000000, 0xa06283c900000000, 0x89a35a7400000000, + 0x50e4512500000000, 0x7925889800000000, 0x0166e1ee00000000, + 0x28a7385300000000}, + {0x0000000000000000, 0xc0f0ac8600000000, 0x83e15abd00000000, + 0x4311f63b00000000, 0x05c3b6ca00000000, 0xc5331a4c00000000, + 0x8622ec7700000000, 0x46d240f100000000, 0x09866e2500000000, + 0xc976c2a300000000, 0x8a67349800000000, 0x4a97981e00000000, + 0x0c45d8ef00000000, 0xccb5746900000000, 0x8fa4825200000000, + 0x4f542ed400000000, 0x120cdd4a00000000, 0xd2fc71cc00000000, + 0x91ed87f700000000, 0x511d2b7100000000, 0x17cf6b8000000000, + 0xd73fc70600000000, 0x942e313d00000000, 0x54de9dbb00000000, + 0x1b8ab36f00000000, 0xdb7a1fe900000000, 0x986be9d200000000, + 0x589b455400000000, 0x1e4905a500000000, 0xdeb9a92300000000, + 0x9da85f1800000000, 0x5d58f39e00000000, 0x2418ba9500000000, + 0xe4e8161300000000, 0xa7f9e02800000000, 0x67094cae00000000, + 0x21db0c5f00000000, 0xe12ba0d900000000, 0xa23a56e200000000, + 0x62cafa6400000000, 0x2d9ed4b000000000, 0xed6e783600000000, + 0xae7f8e0d00000000, 0x6e8f228b00000000, 0x285d627a00000000, + 0xe8adcefc00000000, 0xabbc38c700000000, 0x6b4c944100000000, + 0x361467df00000000, 0xf6e4cb5900000000, 0xb5f53d6200000000, + 0x750591e400000000, 0x33d7d11500000000, 0xf3277d9300000000, + 0xb0368ba800000000, 0x70c6272e00000000, 0x3f9209fa00000000, + 0xff62a57c00000000, 0xbc73534700000000, 0x7c83ffc100000000, + 0x3a51bf3000000000, 0xfaa113b600000000, 0xb9b0e58d00000000, + 0x7940490b00000000, 0x4b30779b00000000, 0x8bc0db1d00000000, + 0xc8d12d2600000000, 0x082181a000000000, 0x4ef3c15100000000, + 0x8e036dd700000000, 0xcd129bec00000000, 0x0de2376a00000000, + 0x42b619be00000000, 0x8246b53800000000, 0xc157430300000000, + 0x01a7ef8500000000, 0x4775af7400000000, 0x878503f200000000, + 0xc494f5c900000000, 0x0464594f00000000, 0x593caad100000000, + 0x99cc065700000000, 0xdaddf06c00000000, 0x1a2d5cea00000000, + 0x5cff1c1b00000000, 0x9c0fb09d00000000, 0xdf1e46a600000000, + 0x1feeea2000000000, 0x50bac4f400000000, 0x904a687200000000, + 0xd35b9e4900000000, 0x13ab32cf00000000, 0x5579723e00000000, + 0x9589deb800000000, 0xd698288300000000, 0x1668840500000000, + 0x6f28cd0e00000000, 0xafd8618800000000, 0xecc997b300000000, + 0x2c393b3500000000, 0x6aeb7bc400000000, 0xaa1bd74200000000, + 0xe90a217900000000, 0x29fa8dff00000000, 0x66aea32b00000000, + 0xa65e0fad00000000, 0xe54ff99600000000, 0x25bf551000000000, + 0x636d15e100000000, 0xa39db96700000000, 0xe08c4f5c00000000, + 0x207ce3da00000000, 0x7d24104400000000, 0xbdd4bcc200000000, + 0xfec54af900000000, 0x3e35e67f00000000, 0x78e7a68e00000000, + 0xb8170a0800000000, 0xfb06fc3300000000, 0x3bf650b500000000, + 0x74a27e6100000000, 0xb452d2e700000000, 0xf74324dc00000000, + 0x37b3885a00000000, 0x7161c8ab00000000, 0xb191642d00000000, + 0xf280921600000000, 0x32703e9000000000, 0x9560ed8600000000, + 0x5590410000000000, 0x1681b73b00000000, 0xd6711bbd00000000, + 0x90a35b4c00000000, 0x5053f7ca00000000, 0x134201f100000000, + 0xd3b2ad7700000000, 0x9ce683a300000000, 0x5c162f2500000000, + 0x1f07d91e00000000, 0xdff7759800000000, 0x9925356900000000, + 0x59d599ef00000000, 0x1ac46fd400000000, 0xda34c35200000000, + 0x876c30cc00000000, 0x479c9c4a00000000, 0x048d6a7100000000, + 0xc47dc6f700000000, 0x82af860600000000, 0x425f2a8000000000, + 0x014edcbb00000000, 0xc1be703d00000000, 0x8eea5ee900000000, + 0x4e1af26f00000000, 0x0d0b045400000000, 0xcdfba8d200000000, + 0x8b29e82300000000, 0x4bd944a500000000, 0x08c8b29e00000000, + 0xc8381e1800000000, 0xb178571300000000, 0x7188fb9500000000, + 0x32990dae00000000, 0xf269a12800000000, 0xb4bbe1d900000000, + 0x744b4d5f00000000, 0x375abb6400000000, 0xf7aa17e200000000, + 0xb8fe393600000000, 0x780e95b000000000, 0x3b1f638b00000000, + 0xfbefcf0d00000000, 0xbd3d8ffc00000000, 0x7dcd237a00000000, + 0x3edcd54100000000, 0xfe2c79c700000000, 0xa3748a5900000000, + 0x638426df00000000, 0x2095d0e400000000, 0xe0657c6200000000, + 0xa6b73c9300000000, 0x6647901500000000, 0x2556662e00000000, + 0xe5a6caa800000000, 0xaaf2e47c00000000, 0x6a0248fa00000000, + 0x2913bec100000000, 0xe9e3124700000000, 0xaf3152b600000000, + 0x6fc1fe3000000000, 0x2cd0080b00000000, 0xec20a48d00000000, + 0xde509a1d00000000, 0x1ea0369b00000000, 0x5db1c0a000000000, + 0x9d416c2600000000, 0xdb932cd700000000, 0x1b63805100000000, + 0x5872766a00000000, 0x9882daec00000000, 0xd7d6f43800000000, + 0x172658be00000000, 0x5437ae8500000000, 0x94c7020300000000, + 0xd21542f200000000, 0x12e5ee7400000000, 0x51f4184f00000000, + 0x9104b4c900000000, 0xcc5c475700000000, 0x0cacebd100000000, + 0x4fbd1dea00000000, 0x8f4db16c00000000, 0xc99ff19d00000000, + 0x096f5d1b00000000, 0x4a7eab2000000000, 0x8a8e07a600000000, + 0xc5da297200000000, 0x052a85f400000000, 0x463b73cf00000000, + 0x86cbdf4900000000, 0xc0199fb800000000, 0x00e9333e00000000, + 0x43f8c50500000000, 0x8308698300000000, 0xfa48208800000000, + 0x3ab88c0e00000000, 0x79a97a3500000000, 0xb959d6b300000000, + 0xff8b964200000000, 0x3f7b3ac400000000, 0x7c6accff00000000, + 0xbc9a607900000000, 0xf3ce4ead00000000, 0x333ee22b00000000, + 0x702f141000000000, 0xb0dfb89600000000, 0xf60df86700000000, + 0x36fd54e100000000, 0x75eca2da00000000, 0xb51c0e5c00000000, + 0xe844fdc200000000, 0x28b4514400000000, 0x6ba5a77f00000000, + 0xab550bf900000000, 0xed874b0800000000, 0x2d77e78e00000000, + 0x6e6611b500000000, 0xae96bd3300000000, 0xe1c293e700000000, + 0x21323f6100000000, 0x6223c95a00000000, 0xa2d365dc00000000, + 0xe401252d00000000, 0x24f189ab00000000, 0x67e07f9000000000, + 0xa710d31600000000}}; + +#else /* W == 4 */ + +static const crc_t crc_braid_table[][256] = { + {0x00000000, 0x5c11c100, 0xb8238200, 0xe4324300, 0xc0440403, + 0x9c55c503, 0x78678603, 0x24764703, 0x308b0805, 0x6c9ac905, + 0x88a88a05, 0xd4b94b05, 0xf0cf0c06, 0xacdecd06, 0x48ec8e06, + 0x14fd4f06, 0x6116100a, 0x3d07d10a, 0xd935920a, 0x8524530a, + 0xa1521409, 0xfd43d509, 0x19719609, 0x45605709, 0x519d180f, + 0x0d8cd90f, 0xe9be9a0f, 0xb5af5b0f, 0x91d91c0c, 0xcdc8dd0c, + 0x29fa9e0c, 0x75eb5f0c, 0xc22c2014, 0x9e3de114, 0x7a0fa214, + 0x261e6314, 0x02682417, 0x5e79e517, 0xba4ba617, 0xe65a6717, + 0xf2a72811, 0xaeb6e911, 0x4a84aa11, 0x16956b11, 0x32e32c12, + 0x6ef2ed12, 0x8ac0ae12, 0xd6d16f12, 0xa33a301e, 0xff2bf11e, + 0x1b19b21e, 0x4708731e, 0x637e341d, 0x3f6ff51d, 0xdb5db61d, + 0x874c771d, 0x93b1381b, 0xcfa0f91b, 0x2b92ba1b, 0x77837b1b, + 0x53f53c18, 0x0fe4fd18, 0xebd6be18, 0xb7c77f18, 0x345b402b, + 0x684a812b, 0x8c78c22b, 0xd069032b, 0xf41f4428, 0xa80e8528, + 0x4c3cc628, 0x102d0728, 0x04d0482e, 0x58c1892e, 0xbcf3ca2e, + 0xe0e20b2e, 0xc4944c2d, 0x98858d2d, 0x7cb7ce2d, 0x20a60f2d, + 0x554d5021, 0x095c9121, 0xed6ed221, 0xb17f1321, 0x95095422, + 0xc9189522, 0x2d2ad622, 0x713b1722, 0x65c65824, 0x39d79924, + 0xdde5da24, 0x81f41b24, 0xa5825c27, 0xf9939d27, 0x1da1de27, + 0x41b01f27, 0xf677603f, 0xaa66a13f, 0x4e54e23f, 0x1245233f, + 0x3633643c, 0x6a22a53c, 0x8e10e63c, 0xd201273c, 0xc6fc683a, + 0x9aeda93a, 0x7edfea3a, 0x22ce2b3a, 0x06b86c39, 0x5aa9ad39, + 0xbe9bee39, 0xe28a2f39, 0x97617035, 0xcb70b135, 0x2f42f235, + 0x73533335, 0x57257436, 0x0b34b536, 0xef06f636, 0xb3173736, + 0xa7ea7830, 0xfbfbb930, 0x1fc9fa30, 0x43d83b30, 0x67ae7c33, + 0x3bbfbd33, 0xdf8dfe33, 0x839c3f33, 0x68b68056, 0x34a74156, + 0xd0950256, 0x8c84c356, 0xa8f28455, 0xf4e34555, 0x10d10655, + 0x4cc0c755, 0x583d8853, 0x042c4953, 0xe01e0a53, 0xbc0fcb53, + 0x98798c50, 0xc4684d50, 0x205a0e50, 0x7c4bcf50, 0x09a0905c, + 0x55b1515c, 0xb183125c, 0xed92d35c, 0xc9e4945f, 0x95f5555f, + 0x71c7165f, 0x2dd6d75f, 0x392b9859, 0x653a5959, 0x81081a59, + 0xdd19db59, 0xf96f9c5a, 0xa57e5d5a, 0x414c1e5a, 0x1d5ddf5a, + 0xaa9aa042, 0xf68b6142, 0x12b92242, 0x4ea8e342, 0x6adea441, + 0x36cf6541, 0xd2fd2641, 0x8eece741, 0x9a11a847, 0xc6006947, + 0x22322a47, 0x7e23eb47, 0x5a55ac44, 0x06446d44, 0xe2762e44, + 0xbe67ef44, 0xcb8cb048, 0x979d7148, 0x73af3248, 0x2fbef348, + 0x0bc8b44b, 0x57d9754b, 0xb3eb364b, 0xeffaf74b, 0xfb07b84d, + 0xa716794d, 0x43243a4d, 0x1f35fb4d, 0x3b43bc4e, 0x67527d4e, + 0x83603e4e, 0xdf71ff4e, 0x5cedc07d, 0x00fc017d, 0xe4ce427d, + 0xb8df837d, 0x9ca9c47e, 0xc0b8057e, 0x248a467e, 0x789b877e, + 0x6c66c878, 0x30770978, 0xd4454a78, 0x88548b78, 0xac22cc7b, + 0xf0330d7b, 0x14014e7b, 0x48108f7b, 0x3dfbd077, 0x61ea1177, + 0x85d85277, 0xd9c99377, 0xfdbfd474, 0xa1ae1574, 0x459c5674, + 0x198d9774, 0x0d70d872, 0x51611972, 0xb5535a72, 0xe9429b72, + 0xcd34dc71, 0x91251d71, 0x75175e71, 0x29069f71, 0x9ec1e069, + 0xc2d02169, 0x26e26269, 0x7af3a369, 0x5e85e46a, 0x0294256a, + 0xe6a6666a, 0xbab7a76a, 0xae4ae86c, 0xf25b296c, 0x16696a6c, + 0x4a78ab6c, 0x6e0eec6f, 0x321f2d6f, 0xd62d6e6f, 0x8a3caf6f, + 0xffd7f063, 0xa3c63163, 0x47f47263, 0x1be5b363, 0x3f93f460, + 0x63823560, 0x87b07660, 0xdba1b760, 0xcf5cf866, 0x934d3966, + 0x777f7a66, 0x2b6ebb66, 0x0f18fc65, 0x53093d65, 0xb73b7e65, + 0xeb2abf65}, + {0x00000000, 0xd16d00ac, 0x12d9015b, 0xc3b401f7, 0x25b202b6, + 0xf4df021a, 0x376b03ed, 0xe6060341, 0x4b64056c, 0x9a0905c0, + 0x59bd0437, 0x88d0049b, 0x6ed607da, 0xbfbb0776, 0x7c0f0681, + 0xad62062d, 0x96c80ad8, 0x47a50a74, 0x84110b83, 0x557c0b2f, + 0xb37a086e, 0x621708c2, 0xa1a30935, 0x70ce0999, 0xddac0fb4, + 0x0cc10f18, 0xcf750eef, 0x1e180e43, 0xf81e0d02, 0x29730dae, + 0xeac70c59, 0x3baa0cf5, 0x9d9315b3, 0x4cfe151f, 0x8f4a14e8, + 0x5e271444, 0xb8211705, 0x694c17a9, 0xaaf8165e, 0x7b9516f2, + 0xd6f710df, 0x079a1073, 0xc42e1184, 0x15431128, 0xf3451269, + 0x222812c5, 0xe19c1332, 0x30f1139e, 0x0b5b1f6b, 0xda361fc7, + 0x19821e30, 0xc8ef1e9c, 0x2ee91ddd, 0xff841d71, 0x3c301c86, + 0xed5d1c2a, 0x403f1a07, 0x91521aab, 0x52e61b5c, 0x838b1bf0, + 0x658d18b1, 0xb4e0181d, 0x775419ea, 0xa6391946, 0x8b252b65, + 0x5a482bc9, 0x99fc2a3e, 0x48912a92, 0xae9729d3, 0x7ffa297f, + 0xbc4e2888, 0x6d232824, 0xc0412e09, 0x112c2ea5, 0xd2982f52, + 0x03f52ffe, 0xe5f32cbf, 0x349e2c13, 0xf72a2de4, 0x26472d48, + 0x1ded21bd, 0xcc802111, 0x0f3420e6, 0xde59204a, 0x385f230b, + 0xe93223a7, 0x2a862250, 0xfbeb22fc, 0x568924d1, 0x87e4247d, + 0x4450258a, 0x953d2526, 0x733b2667, 0xa25626cb, 0x61e2273c, + 0xb08f2790, 0x16b63ed6, 0xc7db3e7a, 0x046f3f8d, 0xd5023f21, + 0x33043c60, 0xe2693ccc, 0x21dd3d3b, 0xf0b03d97, 0x5dd23bba, + 0x8cbf3b16, 0x4f0b3ae1, 0x9e663a4d, 0x7860390c, 0xa90d39a0, + 0x6ab93857, 0xbbd438fb, 0x807e340e, 0x511334a2, 0x92a73555, + 0x43ca35f9, 0xa5cc36b8, 0x74a13614, 0xb71537e3, 0x6678374f, + 0xcb1a3162, 0x1a7731ce, 0xd9c33039, 0x08ae3095, 0xeea833d4, + 0x3fc53378, 0xfc71328f, 0x2d1c3223, 0xa64956c9, 0x77245665, + 0xb4905792, 0x65fd573e, 0x83fb547f, 0x529654d3, 0x91225524, + 0x404f5588, 0xed2d53a5, 0x3c405309, 0xfff452fe, 0x2e995252, + 0xc89f5113, 0x19f251bf, 0xda465048, 0x0b2b50e4, 0x30815c11, + 0xe1ec5cbd, 0x22585d4a, 0xf3355de6, 0x15335ea7, 0xc45e5e0b, + 0x07ea5ffc, 0xd6875f50, 0x7be5597d, 0xaa8859d1, 0x693c5826, + 0xb851588a, 0x5e575bcb, 0x8f3a5b67, 0x4c8e5a90, 0x9de35a3c, + 0x3bda437a, 0xeab743d6, 0x29034221, 0xf86e428d, 0x1e6841cc, + 0xcf054160, 0x0cb14097, 0xdddc403b, 0x70be4616, 0xa1d346ba, + 0x6267474d, 0xb30a47e1, 0x550c44a0, 0x8461440c, 0x47d545fb, + 0x96b84557, 0xad1249a2, 0x7c7f490e, 0xbfcb48f9, 0x6ea64855, + 0x88a04b14, 0x59cd4bb8, 0x9a794a4f, 0x4b144ae3, 0xe6764cce, + 0x371b4c62, 0xf4af4d95, 0x25c24d39, 0xc3c44e78, 0x12a94ed4, + 0xd11d4f23, 0x00704f8f, 0x2d6c7dac, 0xfc017d00, 0x3fb57cf7, + 0xeed87c5b, 0x08de7f1a, 0xd9b37fb6, 0x1a077e41, 0xcb6a7eed, + 0x660878c0, 0xb765786c, 0x74d1799b, 0xa5bc7937, 0x43ba7a76, + 0x92d77ada, 0x51637b2d, 0x800e7b81, 0xbba47774, 0x6ac977d8, + 0xa97d762f, 0x78107683, 0x9e1675c2, 0x4f7b756e, 0x8ccf7499, + 0x5da27435, 0xf0c07218, 0x21ad72b4, 0xe2197343, 0x337473ef, + 0xd57270ae, 0x041f7002, 0xc7ab71f5, 0x16c67159, 0xb0ff681f, + 0x619268b3, 0xa2266944, 0x734b69e8, 0x954d6aa9, 0x44206a05, + 0x87946bf2, 0x56f96b5e, 0xfb9b6d73, 0x2af66ddf, 0xe9426c28, + 0x382f6c84, 0xde296fc5, 0x0f446f69, 0xccf06e9e, 0x1d9d6e32, + 0x263762c7, 0xf75a626b, 0x34ee639c, 0xe5836330, 0x03856071, + 0xd2e860dd, 0x115c612a, 0xc0316186, 0x6d5367ab, 0xbc3e6707, + 0x7f8a66f0, 0xaee7665c, 0x48e1651d, 0x998c65b1, 0x5a386446, + 0x8b5564ea}, + {0x00000000, 0xfc91ad91, 0x49205b21, 0xb5b1f6b0, 0x9240b642, + 0x6ed11bd3, 0xdb60ed63, 0x27f140f2, 0x94826c87, 0x6813c116, + 0xdda237a6, 0x21339a37, 0x06c2dac5, 0xfa537754, 0x4fe281e4, + 0xb3732c75, 0x9907d90d, 0x6596749c, 0xd027822c, 0x2cb62fbd, + 0x0b476f4f, 0xf7d6c2de, 0x4267346e, 0xbef699ff, 0x0d85b58a, + 0xf114181b, 0x44a5eeab, 0xb834433a, 0x9fc503c8, 0x6354ae59, + 0xd6e558e9, 0x2a74f578, 0x820cb219, 0x7e9d1f88, 0xcb2ce938, + 0x37bd44a9, 0x104c045b, 0xecdda9ca, 0x596c5f7a, 0xa5fdf2eb, + 0x168ede9e, 0xea1f730f, 0x5fae85bf, 0xa33f282e, 0x84ce68dc, + 0x785fc54d, 0xcdee33fd, 0x317f9e6c, 0x1b0b6b14, 0xe79ac685, + 0x522b3035, 0xaeba9da4, 0x894bdd56, 0x75da70c7, 0xc06b8677, + 0x3cfa2be6, 0x8f890793, 0x7318aa02, 0xc6a95cb2, 0x3a38f123, + 0x1dc9b1d1, 0xe1581c40, 0x54e9eaf0, 0xa8784761, 0xb41a6431, + 0x488bc9a0, 0xfd3a3f10, 0x01ab9281, 0x265ad273, 0xdacb7fe2, + 0x6f7a8952, 0x93eb24c3, 0x209808b6, 0xdc09a527, 0x69b85397, + 0x9529fe06, 0xb2d8bef4, 0x4e491365, 0xfbf8e5d5, 0x07694844, + 0x2d1dbd3c, 0xd18c10ad, 0x643de61d, 0x98ac4b8c, 0xbf5d0b7e, + 0x43cca6ef, 0xf67d505f, 0x0aecfdce, 0xb99fd1bb, 0x450e7c2a, + 0xf0bf8a9a, 0x0c2e270b, 0x2bdf67f9, 0xd74eca68, 0x62ff3cd8, + 0x9e6e9149, 0x3616d628, 0xca877bb9, 0x7f368d09, 0x83a72098, + 0xa456606a, 0x58c7cdfb, 0xed763b4b, 0x11e796da, 0xa294baaf, + 0x5e05173e, 0xebb4e18e, 0x17254c1f, 0x30d40ced, 0xcc45a17c, + 0x79f457cc, 0x8565fa5d, 0xaf110f25, 0x5380a2b4, 0xe6315404, + 0x1aa0f995, 0x3d51b967, 0xc1c014f6, 0x7471e246, 0x88e04fd7, + 0x3b9363a2, 0xc702ce33, 0x72b33883, 0x8e229512, 0xa9d3d5e0, + 0x55427871, 0xe0f38ec1, 0x1c622350, 0xd837c861, 0x24a665f0, + 0x91179340, 0x6d863ed1, 0x4a777e23, 0xb6e6d3b2, 0x03572502, + 0xffc68893, 0x4cb5a4e6, 0xb0240977, 0x0595ffc7, 0xf9045256, + 0xdef512a4, 0x2264bf35, 0x97d54985, 0x6b44e414, 0x4130116c, + 0xbda1bcfd, 0x08104a4d, 0xf481e7dc, 0xd370a72e, 0x2fe10abf, + 0x9a50fc0f, 0x66c1519e, 0xd5b27deb, 0x2923d07a, 0x9c9226ca, + 0x60038b5b, 0x47f2cba9, 0xbb636638, 0x0ed29088, 0xf2433d19, + 0x5a3b7a78, 0xa6aad7e9, 0x131b2159, 0xef8a8cc8, 0xc87bcc3a, + 0x34ea61ab, 0x815b971b, 0x7dca3a8a, 0xceb916ff, 0x3228bb6e, + 0x87994dde, 0x7b08e04f, 0x5cf9a0bd, 0xa0680d2c, 0x15d9fb9c, + 0xe948560d, 0xc33ca375, 0x3fad0ee4, 0x8a1cf854, 0x768d55c5, + 0x517c1537, 0xadedb8a6, 0x185c4e16, 0xe4cde387, 0x57becff2, + 0xab2f6263, 0x1e9e94d3, 0xe20f3942, 0xc5fe79b0, 0x396fd421, + 0x8cde2291, 0x704f8f00, 0x6c2dac50, 0x90bc01c1, 0x250df771, + 0xd99c5ae0, 0xfe6d1a12, 0x02fcb783, 0xb74d4133, 0x4bdceca2, + 0xf8afc0d7, 0x043e6d46, 0xb18f9bf6, 0x4d1e3667, 0x6aef7695, + 0x967edb04, 0x23cf2db4, 0xdf5e8025, 0xf52a755d, 0x09bbd8cc, + 0xbc0a2e7c, 0x409b83ed, 0x676ac31f, 0x9bfb6e8e, 0x2e4a983e, + 0xd2db35af, 0x61a819da, 0x9d39b44b, 0x288842fb, 0xd419ef6a, + 0xf3e8af98, 0x0f790209, 0xbac8f4b9, 0x46595928, 0xee211e49, + 0x12b0b3d8, 0xa7014568, 0x5b90e8f9, 0x7c61a80b, 0x80f0059a, + 0x3541f32a, 0xc9d05ebb, 0x7aa372ce, 0x8632df5f, 0x338329ef, + 0xcf12847e, 0xe8e3c48c, 0x1472691d, 0xa1c39fad, 0x5d52323c, + 0x7726c744, 0x8bb76ad5, 0x3e069c65, 0xc29731f4, 0xe5667106, + 0x19f7dc97, 0xac462a27, 0x50d787b6, 0xe3a4abc3, 0x1f350652, + 0xaa84f0e2, 0x56155d73, 0x71e41d81, 0x8d75b010, 0x38c446a0, + 0xc455eb31}, + {0x00000000, 0x006c90c1, 0x00d92182, 0x00b5b143, 0x01b24304, + 0x01ded3c5, 0x016b6286, 0x0107f247, 0x03648608, 0x030816c9, + 0x03bda78a, 0x03d1374b, 0x02d6c50c, 0x02ba55cd, 0x020fe48e, + 0x0263744f, 0x06c90c10, 0x06a59cd1, 0x06102d92, 0x067cbd53, + 0x077b4f14, 0x0717dfd5, 0x07a26e96, 0x07cefe57, 0x05ad8a18, + 0x05c11ad9, 0x0574ab9a, 0x05183b5b, 0x041fc91c, 0x047359dd, + 0x04c6e89e, 0x04aa785f, 0x0d921820, 0x0dfe88e1, 0x0d4b39a2, + 0x0d27a963, 0x0c205b24, 0x0c4ccbe5, 0x0cf97aa6, 0x0c95ea67, + 0x0ef69e28, 0x0e9a0ee9, 0x0e2fbfaa, 0x0e432f6b, 0x0f44dd2c, + 0x0f284ded, 0x0f9dfcae, 0x0ff16c6f, 0x0b5b1430, 0x0b3784f1, + 0x0b8235b2, 0x0beea573, 0x0ae95734, 0x0a85c7f5, 0x0a3076b6, + 0x0a5ce677, 0x083f9238, 0x085302f9, 0x08e6b3ba, 0x088a237b, + 0x098dd13c, 0x09e141fd, 0x0954f0be, 0x0938607f, 0x1b243040, + 0x1b48a081, 0x1bfd11c2, 0x1b918103, 0x1a967344, 0x1afae385, + 0x1a4f52c6, 0x1a23c207, 0x1840b648, 0x182c2689, 0x189997ca, + 0x18f5070b, 0x19f2f54c, 0x199e658d, 0x192bd4ce, 0x1947440f, + 0x1ded3c50, 0x1d81ac91, 0x1d341dd2, 0x1d588d13, 0x1c5f7f54, + 0x1c33ef95, 0x1c865ed6, 0x1ceace17, 0x1e89ba58, 0x1ee52a99, + 0x1e509bda, 0x1e3c0b1b, 0x1f3bf95c, 0x1f57699d, 0x1fe2d8de, + 0x1f8e481f, 0x16b62860, 0x16dab8a1, 0x166f09e2, 0x16039923, + 0x17046b64, 0x1768fba5, 0x17dd4ae6, 0x17b1da27, 0x15d2ae68, + 0x15be3ea9, 0x150b8fea, 0x15671f2b, 0x1460ed6c, 0x140c7dad, + 0x14b9ccee, 0x14d55c2f, 0x107f2470, 0x1013b4b1, 0x10a605f2, + 0x10ca9533, 0x11cd6774, 0x11a1f7b5, 0x111446f6, 0x1178d637, + 0x131ba278, 0x137732b9, 0x13c283fa, 0x13ae133b, 0x12a9e17c, + 0x12c571bd, 0x1270c0fe, 0x121c503f, 0x36486080, 0x3624f041, + 0x36914102, 0x36fdd1c3, 0x37fa2384, 0x3796b345, 0x37230206, + 0x374f92c7, 0x352ce688, 0x35407649, 0x35f5c70a, 0x359957cb, + 0x349ea58c, 0x34f2354d, 0x3447840e, 0x342b14cf, 0x30816c90, + 0x30edfc51, 0x30584d12, 0x3034ddd3, 0x31332f94, 0x315fbf55, + 0x31ea0e16, 0x31869ed7, 0x33e5ea98, 0x33897a59, 0x333ccb1a, + 0x33505bdb, 0x3257a99c, 0x323b395d, 0x328e881e, 0x32e218df, + 0x3bda78a0, 0x3bb6e861, 0x3b035922, 0x3b6fc9e3, 0x3a683ba4, + 0x3a04ab65, 0x3ab11a26, 0x3add8ae7, 0x38befea8, 0x38d26e69, + 0x3867df2a, 0x380b4feb, 0x390cbdac, 0x39602d6d, 0x39d59c2e, + 0x39b90cef, 0x3d1374b0, 0x3d7fe471, 0x3dca5532, 0x3da6c5f3, + 0x3ca137b4, 0x3ccda775, 0x3c781636, 0x3c1486f7, 0x3e77f2b8, + 0x3e1b6279, 0x3eaed33a, 0x3ec243fb, 0x3fc5b1bc, 0x3fa9217d, + 0x3f1c903e, 0x3f7000ff, 0x2d6c50c0, 0x2d00c001, 0x2db57142, + 0x2dd9e183, 0x2cde13c4, 0x2cb28305, 0x2c073246, 0x2c6ba287, + 0x2e08d6c8, 0x2e644609, 0x2ed1f74a, 0x2ebd678b, 0x2fba95cc, + 0x2fd6050d, 0x2f63b44e, 0x2f0f248f, 0x2ba55cd0, 0x2bc9cc11, + 0x2b7c7d52, 0x2b10ed93, 0x2a171fd4, 0x2a7b8f15, 0x2ace3e56, + 0x2aa2ae97, 0x28c1dad8, 0x28ad4a19, 0x2818fb5a, 0x28746b9b, + 0x297399dc, 0x291f091d, 0x29aab85e, 0x29c6289f, 0x20fe48e0, + 0x2092d821, 0x20276962, 0x204bf9a3, 0x214c0be4, 0x21209b25, + 0x21952a66, 0x21f9baa7, 0x239acee8, 0x23f65e29, 0x2343ef6a, + 0x232f7fab, 0x22288dec, 0x22441d2d, 0x22f1ac6e, 0x229d3caf, + 0x263744f0, 0x265bd431, 0x26ee6572, 0x2682f5b3, 0x278507f4, + 0x27e99735, 0x275c2676, 0x2730b6b7, 0x2553c2f8, 0x253f5239, + 0x258ae37a, 0x25e673bb, 0x24e181fc, 0x248d113d, 0x2438a07e, + 0x245430bf}}; + +static const word_t crc_braid_big_table[][256] = { + {0x00000000, 0xc1906c00, 0x8221d900, 0x43b1b500, 0x0443b201, + 0xc5d3de01, 0x86626b01, 0x47f20701, 0x08866403, 0xc9160803, + 0x8aa7bd03, 0x4b37d103, 0x0cc5d602, 0xcd55ba02, 0x8ee40f02, + 0x4f746302, 0x100cc906, 0xd19ca506, 0x922d1006, 0x53bd7c06, + 0x144f7b07, 0xd5df1707, 0x966ea207, 0x57fece07, 0x188aad05, + 0xd91ac105, 0x9aab7405, 0x5b3b1805, 0x1cc91f04, 0xdd597304, + 0x9ee8c604, 0x5f78aa04, 0x2018920d, 0xe188fe0d, 0xa2394b0d, + 0x63a9270d, 0x245b200c, 0xe5cb4c0c, 0xa67af90c, 0x67ea950c, + 0x289ef60e, 0xe90e9a0e, 0xaabf2f0e, 0x6b2f430e, 0x2cdd440f, + 0xed4d280f, 0xaefc9d0f, 0x6f6cf10f, 0x30145b0b, 0xf184370b, + 0xb235820b, 0x73a5ee0b, 0x3457e90a, 0xf5c7850a, 0xb676300a, + 0x77e65c0a, 0x38923f08, 0xf9025308, 0xbab3e608, 0x7b238a08, + 0x3cd18d09, 0xfd41e109, 0xbef05409, 0x7f603809, 0x4030241b, + 0x81a0481b, 0xc211fd1b, 0x0381911b, 0x4473961a, 0x85e3fa1a, + 0xc6524f1a, 0x07c2231a, 0x48b64018, 0x89262c18, 0xca979918, + 0x0b07f518, 0x4cf5f219, 0x8d659e19, 0xced42b19, 0x0f444719, + 0x503ced1d, 0x91ac811d, 0xd21d341d, 0x138d581d, 0x547f5f1c, + 0x95ef331c, 0xd65e861c, 0x17ceea1c, 0x58ba891e, 0x992ae51e, + 0xda9b501e, 0x1b0b3c1e, 0x5cf93b1f, 0x9d69571f, 0xded8e21f, + 0x1f488e1f, 0x6028b616, 0xa1b8da16, 0xe2096f16, 0x23990316, + 0x646b0417, 0xa5fb6817, 0xe64add17, 0x27dab117, 0x68aed215, + 0xa93ebe15, 0xea8f0b15, 0x2b1f6715, 0x6ced6014, 0xad7d0c14, + 0xeeccb914, 0x2f5cd514, 0x70247f10, 0xb1b41310, 0xf205a610, + 0x3395ca10, 0x7467cd11, 0xb5f7a111, 0xf6461411, 0x37d67811, + 0x78a21b13, 0xb9327713, 0xfa83c213, 0x3b13ae13, 0x7ce1a912, + 0xbd71c512, 0xfec07012, 0x3f501c12, 0x80604836, 0x41f02436, + 0x02419136, 0xc3d1fd36, 0x8423fa37, 0x45b39637, 0x06022337, + 0xc7924f37, 0x88e62c35, 0x49764035, 0x0ac7f535, 0xcb579935, + 0x8ca59e34, 0x4d35f234, 0x0e844734, 0xcf142b34, 0x906c8130, + 0x51fced30, 0x124d5830, 0xd3dd3430, 0x942f3331, 0x55bf5f31, + 0x160eea31, 0xd79e8631, 0x98eae533, 0x597a8933, 0x1acb3c33, + 0xdb5b5033, 0x9ca95732, 0x5d393b32, 0x1e888e32, 0xdf18e232, + 0xa078da3b, 0x61e8b63b, 0x2259033b, 0xe3c96f3b, 0xa43b683a, + 0x65ab043a, 0x261ab13a, 0xe78add3a, 0xa8febe38, 0x696ed238, + 0x2adf6738, 0xeb4f0b38, 0xacbd0c39, 0x6d2d6039, 0x2e9cd539, + 0xef0cb939, 0xb074133d, 0x71e47f3d, 0x3255ca3d, 0xf3c5a63d, + 0xb437a13c, 0x75a7cd3c, 0x3616783c, 0xf786143c, 0xb8f2773e, + 0x79621b3e, 0x3ad3ae3e, 0xfb43c23e, 0xbcb1c53f, 0x7d21a93f, + 0x3e901c3f, 0xff00703f, 0xc0506c2d, 0x01c0002d, 0x4271b52d, + 0x83e1d92d, 0xc413de2c, 0x0583b22c, 0x4632072c, 0x87a26b2c, + 0xc8d6082e, 0x0946642e, 0x4af7d12e, 0x8b67bd2e, 0xcc95ba2f, + 0x0d05d62f, 0x4eb4632f, 0x8f240f2f, 0xd05ca52b, 0x11ccc92b, + 0x527d7c2b, 0x93ed102b, 0xd41f172a, 0x158f7b2a, 0x563ece2a, + 0x97aea22a, 0xd8dac128, 0x194aad28, 0x5afb1828, 0x9b6b7428, + 0xdc997329, 0x1d091f29, 0x5eb8aa29, 0x9f28c629, 0xe048fe20, + 0x21d89220, 0x62692720, 0xa3f94b20, 0xe40b4c21, 0x259b2021, + 0x662a9521, 0xa7baf921, 0xe8ce9a23, 0x295ef623, 0x6aef4323, + 0xab7f2f23, 0xec8d2822, 0x2d1d4422, 0x6eacf122, 0xaf3c9d22, + 0xf0443726, 0x31d45b26, 0x7265ee26, 0xb3f58226, 0xf4078527, + 0x3597e927, 0x76265c27, 0xb7b63027, 0xf8c25325, 0x39523f25, + 0x7ae38a25, 0xbb73e625, 0xfc81e124, 0x3d118d24, 0x7ea03824, + 0xbf305424}, + {0x00000000, 0x91ad91fc, 0x215b2049, 0xb0f6b1b5, 0x42b64092, + 0xd31bd16e, 0x63ed60db, 0xf240f127, 0x876c8294, 0x16c11368, + 0xa637a2dd, 0x379a3321, 0xc5dac206, 0x547753fa, 0xe481e24f, + 0x752c73b3, 0x0dd90799, 0x9c749665, 0x2c8227d0, 0xbd2fb62c, + 0x4f6f470b, 0xdec2d6f7, 0x6e346742, 0xff99f6be, 0x8ab5850d, + 0x1b1814f1, 0xabeea544, 0x3a4334b8, 0xc803c59f, 0x59ae5463, + 0xe958e5d6, 0x78f5742a, 0x19b20c82, 0x881f9d7e, 0x38e92ccb, + 0xa944bd37, 0x5b044c10, 0xcaa9ddec, 0x7a5f6c59, 0xebf2fda5, + 0x9ede8e16, 0x0f731fea, 0xbf85ae5f, 0x2e283fa3, 0xdc68ce84, + 0x4dc55f78, 0xfd33eecd, 0x6c9e7f31, 0x146b0b1b, 0x85c69ae7, + 0x35302b52, 0xa49dbaae, 0x56dd4b89, 0xc770da75, 0x77866bc0, + 0xe62bfa3c, 0x9307898f, 0x02aa1873, 0xb25ca9c6, 0x23f1383a, + 0xd1b1c91d, 0x401c58e1, 0xf0eae954, 0x614778a8, 0x31641ab4, + 0xa0c98b48, 0x103f3afd, 0x8192ab01, 0x73d25a26, 0xe27fcbda, + 0x52897a6f, 0xc324eb93, 0xb6089820, 0x27a509dc, 0x9753b869, + 0x06fe2995, 0xf4bed8b2, 0x6513494e, 0xd5e5f8fb, 0x44486907, + 0x3cbd1d2d, 0xad108cd1, 0x1de63d64, 0x8c4bac98, 0x7e0b5dbf, + 0xefa6cc43, 0x5f507df6, 0xcefdec0a, 0xbbd19fb9, 0x2a7c0e45, + 0x9a8abff0, 0x0b272e0c, 0xf967df2b, 0x68ca4ed7, 0xd83cff62, + 0x49916e9e, 0x28d61636, 0xb97b87ca, 0x098d367f, 0x9820a783, + 0x6a6056a4, 0xfbcdc758, 0x4b3b76ed, 0xda96e711, 0xafba94a2, + 0x3e17055e, 0x8ee1b4eb, 0x1f4c2517, 0xed0cd430, 0x7ca145cc, + 0xcc57f479, 0x5dfa6585, 0x250f11af, 0xb4a28053, 0x045431e6, + 0x95f9a01a, 0x67b9513d, 0xf614c0c1, 0x46e27174, 0xd74fe088, + 0xa263933b, 0x33ce02c7, 0x8338b372, 0x1295228e, 0xe0d5d3a9, + 0x71784255, 0xc18ef3e0, 0x5023621c, 0x61c837d8, 0xf065a624, + 0x40931791, 0xd13e866d, 0x237e774a, 0xb2d3e6b6, 0x02255703, + 0x9388c6ff, 0xe6a4b54c, 0x770924b0, 0xc7ff9505, 0x565204f9, + 0xa412f5de, 0x35bf6422, 0x8549d597, 0x14e4446b, 0x6c113041, + 0xfdbca1bd, 0x4d4a1008, 0xdce781f4, 0x2ea770d3, 0xbf0ae12f, + 0x0ffc509a, 0x9e51c166, 0xeb7db2d5, 0x7ad02329, 0xca26929c, + 0x5b8b0360, 0xa9cbf247, 0x386663bb, 0x8890d20e, 0x193d43f2, + 0x787a3b5a, 0xe9d7aaa6, 0x59211b13, 0xc88c8aef, 0x3acc7bc8, + 0xab61ea34, 0x1b975b81, 0x8a3aca7d, 0xff16b9ce, 0x6ebb2832, + 0xde4d9987, 0x4fe0087b, 0xbda0f95c, 0x2c0d68a0, 0x9cfbd915, + 0x0d5648e9, 0x75a33cc3, 0xe40ead3f, 0x54f81c8a, 0xc5558d76, + 0x37157c51, 0xa6b8edad, 0x164e5c18, 0x87e3cde4, 0xf2cfbe57, + 0x63622fab, 0xd3949e1e, 0x42390fe2, 0xb079fec5, 0x21d46f39, + 0x9122de8c, 0x008f4f70, 0x50ac2d6c, 0xc101bc90, 0x71f70d25, + 0xe05a9cd9, 0x121a6dfe, 0x83b7fc02, 0x33414db7, 0xa2ecdc4b, + 0xd7c0aff8, 0x466d3e04, 0xf69b8fb1, 0x67361e4d, 0x9576ef6a, + 0x04db7e96, 0xb42dcf23, 0x25805edf, 0x5d752af5, 0xccd8bb09, + 0x7c2e0abc, 0xed839b40, 0x1fc36a67, 0x8e6efb9b, 0x3e984a2e, + 0xaf35dbd2, 0xda19a861, 0x4bb4399d, 0xfb428828, 0x6aef19d4, + 0x98afe8f3, 0x0902790f, 0xb9f4c8ba, 0x28595946, 0x491e21ee, + 0xd8b3b012, 0x684501a7, 0xf9e8905b, 0x0ba8617c, 0x9a05f080, + 0x2af34135, 0xbb5ed0c9, 0xce72a37a, 0x5fdf3286, 0xef298333, + 0x7e8412cf, 0x8cc4e3e8, 0x1d697214, 0xad9fc3a1, 0x3c32525d, + 0x44c72677, 0xd56ab78b, 0x659c063e, 0xf43197c2, 0x067166e5, + 0x97dcf719, 0x272a46ac, 0xb687d750, 0xc3aba4e3, 0x5206351f, + 0xe2f084aa, 0x735d1556, 0x811de471, 0x10b0758d, 0xa046c438, + 0x31eb55c4}, + {0x00000000, 0xac006dd1, 0x5b01d912, 0xf701b4c3, 0xb602b225, + 0x1a02dff4, 0xed036b37, 0x410306e6, 0x6c05644b, 0xc005099a, + 0x3704bd59, 0x9b04d088, 0xda07d66e, 0x7607bbbf, 0x81060f7c, + 0x2d0662ad, 0xd80ac896, 0x740aa547, 0x830b1184, 0x2f0b7c55, + 0x6e087ab3, 0xc2081762, 0x3509a3a1, 0x9909ce70, 0xb40facdd, + 0x180fc10c, 0xef0e75cf, 0x430e181e, 0x020d1ef8, 0xae0d7329, + 0x590cc7ea, 0xf50caa3b, 0xb315939d, 0x1f15fe4c, 0xe8144a8f, + 0x4414275e, 0x051721b8, 0xa9174c69, 0x5e16f8aa, 0xf216957b, + 0xdf10f7d6, 0x73109a07, 0x84112ec4, 0x28114315, 0x691245f3, + 0xc5122822, 0x32139ce1, 0x9e13f130, 0x6b1f5b0b, 0xc71f36da, + 0x301e8219, 0x9c1eefc8, 0xdd1de92e, 0x711d84ff, 0x861c303c, + 0x2a1c5ded, 0x071a3f40, 0xab1a5291, 0x5c1be652, 0xf01b8b83, + 0xb1188d65, 0x1d18e0b4, 0xea195477, 0x461939a6, 0x652b258b, + 0xc92b485a, 0x3e2afc99, 0x922a9148, 0xd32997ae, 0x7f29fa7f, + 0x88284ebc, 0x2428236d, 0x092e41c0, 0xa52e2c11, 0x522f98d2, + 0xfe2ff503, 0xbf2cf3e5, 0x132c9e34, 0xe42d2af7, 0x482d4726, + 0xbd21ed1d, 0x112180cc, 0xe620340f, 0x4a2059de, 0x0b235f38, + 0xa72332e9, 0x5022862a, 0xfc22ebfb, 0xd1248956, 0x7d24e487, + 0x8a255044, 0x26253d95, 0x67263b73, 0xcb2656a2, 0x3c27e261, + 0x90278fb0, 0xd63eb616, 0x7a3edbc7, 0x8d3f6f04, 0x213f02d5, + 0x603c0433, 0xcc3c69e2, 0x3b3ddd21, 0x973db0f0, 0xba3bd25d, + 0x163bbf8c, 0xe13a0b4f, 0x4d3a669e, 0x0c396078, 0xa0390da9, + 0x5738b96a, 0xfb38d4bb, 0x0e347e80, 0xa2341351, 0x5535a792, + 0xf935ca43, 0xb836cca5, 0x1436a174, 0xe33715b7, 0x4f377866, + 0x62311acb, 0xce31771a, 0x3930c3d9, 0x9530ae08, 0xd433a8ee, + 0x7833c53f, 0x8f3271fc, 0x23321c2d, 0xc95649a6, 0x65562477, + 0x925790b4, 0x3e57fd65, 0x7f54fb83, 0xd3549652, 0x24552291, + 0x88554f40, 0xa5532ded, 0x0953403c, 0xfe52f4ff, 0x5252992e, + 0x13519fc8, 0xbf51f219, 0x485046da, 0xe4502b0b, 0x115c8130, + 0xbd5cece1, 0x4a5d5822, 0xe65d35f3, 0xa75e3315, 0x0b5e5ec4, + 0xfc5fea07, 0x505f87d6, 0x7d59e57b, 0xd15988aa, 0x26583c69, + 0x8a5851b8, 0xcb5b575e, 0x675b3a8f, 0x905a8e4c, 0x3c5ae39d, + 0x7a43da3b, 0xd643b7ea, 0x21420329, 0x8d426ef8, 0xcc41681e, + 0x604105cf, 0x9740b10c, 0x3b40dcdd, 0x1646be70, 0xba46d3a1, + 0x4d476762, 0xe1470ab3, 0xa0440c55, 0x0c446184, 0xfb45d547, + 0x5745b896, 0xa24912ad, 0x0e497f7c, 0xf948cbbf, 0x5548a66e, + 0x144ba088, 0xb84bcd59, 0x4f4a799a, 0xe34a144b, 0xce4c76e6, + 0x624c1b37, 0x954daff4, 0x394dc225, 0x784ec4c3, 0xd44ea912, + 0x234f1dd1, 0x8f4f7000, 0xac7d6c2d, 0x007d01fc, 0xf77cb53f, + 0x5b7cd8ee, 0x1a7fde08, 0xb67fb3d9, 0x417e071a, 0xed7e6acb, + 0xc0780866, 0x6c7865b7, 0x9b79d174, 0x3779bca5, 0x767aba43, + 0xda7ad792, 0x2d7b6351, 0x817b0e80, 0x7477a4bb, 0xd877c96a, + 0x2f767da9, 0x83761078, 0xc275169e, 0x6e757b4f, 0x9974cf8c, + 0x3574a25d, 0x1872c0f0, 0xb472ad21, 0x437319e2, 0xef737433, + 0xae7072d5, 0x02701f04, 0xf571abc7, 0x5971c616, 0x1f68ffb0, + 0xb3689261, 0x446926a2, 0xe8694b73, 0xa96a4d95, 0x056a2044, + 0xf26b9487, 0x5e6bf956, 0x736d9bfb, 0xdf6df62a, 0x286c42e9, + 0x846c2f38, 0xc56f29de, 0x696f440f, 0x9e6ef0cc, 0x326e9d1d, + 0xc7623726, 0x6b625af7, 0x9c63ee34, 0x306383e5, 0x71608503, + 0xdd60e8d2, 0x2a615c11, 0x866131c0, 0xab67536d, 0x07673ebc, + 0xf0668a7f, 0x5c66e7ae, 0x1d65e148, 0xb1658c99, 0x4664385a, + 0xea64558b}, + {0x00000000, 0x00c1115c, 0x008223b8, 0x004332e4, 0x030444c0, + 0x03c5559c, 0x03866778, 0x03477624, 0x05088b30, 0x05c99a6c, + 0x058aa888, 0x054bb9d4, 0x060ccff0, 0x06cddeac, 0x068eec48, + 0x064ffd14, 0x0a101661, 0x0ad1073d, 0x0a9235d9, 0x0a532485, + 0x091452a1, 0x09d543fd, 0x09967119, 0x09576045, 0x0f189d51, + 0x0fd98c0d, 0x0f9abee9, 0x0f5bafb5, 0x0c1cd991, 0x0cddc8cd, + 0x0c9efa29, 0x0c5feb75, 0x14202cc2, 0x14e13d9e, 0x14a20f7a, + 0x14631e26, 0x17246802, 0x17e5795e, 0x17a64bba, 0x17675ae6, + 0x1128a7f2, 0x11e9b6ae, 0x11aa844a, 0x116b9516, 0x122ce332, + 0x12edf26e, 0x12aec08a, 0x126fd1d6, 0x1e303aa3, 0x1ef12bff, + 0x1eb2191b, 0x1e730847, 0x1d347e63, 0x1df56f3f, 0x1db65ddb, + 0x1d774c87, 0x1b38b193, 0x1bf9a0cf, 0x1bba922b, 0x1b7b8377, + 0x183cf553, 0x18fde40f, 0x18bed6eb, 0x187fc7b7, 0x2b405b34, + 0x2b814a68, 0x2bc2788c, 0x2b0369d0, 0x28441ff4, 0x28850ea8, + 0x28c63c4c, 0x28072d10, 0x2e48d004, 0x2e89c158, 0x2ecaf3bc, + 0x2e0be2e0, 0x2d4c94c4, 0x2d8d8598, 0x2dceb77c, 0x2d0fa620, + 0x21504d55, 0x21915c09, 0x21d26eed, 0x21137fb1, 0x22540995, + 0x229518c9, 0x22d62a2d, 0x22173b71, 0x2458c665, 0x2499d739, + 0x24dae5dd, 0x241bf481, 0x275c82a5, 0x279d93f9, 0x27dea11d, + 0x271fb041, 0x3f6077f6, 0x3fa166aa, 0x3fe2544e, 0x3f234512, + 0x3c643336, 0x3ca5226a, 0x3ce6108e, 0x3c2701d2, 0x3a68fcc6, + 0x3aa9ed9a, 0x3aeadf7e, 0x3a2bce22, 0x396cb806, 0x39ada95a, + 0x39ee9bbe, 0x392f8ae2, 0x35706197, 0x35b170cb, 0x35f2422f, + 0x35335373, 0x36742557, 0x36b5340b, 0x36f606ef, 0x363717b3, + 0x3078eaa7, 0x30b9fbfb, 0x30fac91f, 0x303bd843, 0x337cae67, + 0x33bdbf3b, 0x33fe8ddf, 0x333f9c83, 0x5680b668, 0x5641a734, + 0x560295d0, 0x56c3848c, 0x5584f2a8, 0x5545e3f4, 0x5506d110, + 0x55c7c04c, 0x53883d58, 0x53492c04, 0x530a1ee0, 0x53cb0fbc, + 0x508c7998, 0x504d68c4, 0x500e5a20, 0x50cf4b7c, 0x5c90a009, + 0x5c51b155, 0x5c1283b1, 0x5cd392ed, 0x5f94e4c9, 0x5f55f595, + 0x5f16c771, 0x5fd7d62d, 0x59982b39, 0x59593a65, 0x591a0881, + 0x59db19dd, 0x5a9c6ff9, 0x5a5d7ea5, 0x5a1e4c41, 0x5adf5d1d, + 0x42a09aaa, 0x42618bf6, 0x4222b912, 0x42e3a84e, 0x41a4de6a, + 0x4165cf36, 0x4126fdd2, 0x41e7ec8e, 0x47a8119a, 0x476900c6, + 0x472a3222, 0x47eb237e, 0x44ac555a, 0x446d4406, 0x442e76e2, + 0x44ef67be, 0x48b08ccb, 0x48719d97, 0x4832af73, 0x48f3be2f, + 0x4bb4c80b, 0x4b75d957, 0x4b36ebb3, 0x4bf7faef, 0x4db807fb, + 0x4d7916a7, 0x4d3a2443, 0x4dfb351f, 0x4ebc433b, 0x4e7d5267, + 0x4e3e6083, 0x4eff71df, 0x7dc0ed5c, 0x7d01fc00, 0x7d42cee4, + 0x7d83dfb8, 0x7ec4a99c, 0x7e05b8c0, 0x7e468a24, 0x7e879b78, + 0x78c8666c, 0x78097730, 0x784a45d4, 0x788b5488, 0x7bcc22ac, + 0x7b0d33f0, 0x7b4e0114, 0x7b8f1048, 0x77d0fb3d, 0x7711ea61, + 0x7752d885, 0x7793c9d9, 0x74d4bffd, 0x7415aea1, 0x74569c45, + 0x74978d19, 0x72d8700d, 0x72196151, 0x725a53b5, 0x729b42e9, + 0x71dc34cd, 0x711d2591, 0x715e1775, 0x719f0629, 0x69e0c19e, + 0x6921d0c2, 0x6962e226, 0x69a3f37a, 0x6ae4855e, 0x6a259402, + 0x6a66a6e6, 0x6aa7b7ba, 0x6ce84aae, 0x6c295bf2, 0x6c6a6916, + 0x6cab784a, 0x6fec0e6e, 0x6f2d1f32, 0x6f6e2dd6, 0x6faf3c8a, + 0x63f0d7ff, 0x6331c6a3, 0x6372f447, 0x63b3e51b, 0x60f4933f, + 0x60358263, 0x6076b087, 0x60b7a1db, 0x66f85ccf, 0x66394d93, + 0x667a7f77, 0x66bb6e2b, 0x65fc180f, 0x653d0953, 0x657e3bb7, + 0x65bf2aeb}}; + +#endif + +#endif + +#if N == 6 + +#if W == 8 + +static const crc_t crc_braid_table[][256] = { + {0x00000000, 0xe17c91c1, 0x72fa2381, 0x9386b240, 0xe5f44702, + 0x0488d6c3, 0x970e6483, 0x7672f542, 0x7beb8e07, 0x9a971fc6, + 0x0911ad86, 0xe86d3c47, 0x9e1fc905, 0x7f6358c4, 0xece5ea84, + 0x0d997b45, 0xf7d71c0e, 0x16ab8dcf, 0x852d3f8f, 0x6451ae4e, + 0x12235b0c, 0xf35fcacd, 0x60d9788d, 0x81a5e94c, 0x8c3c9209, + 0x6d4003c8, 0xfec6b188, 0x1fba2049, 0x69c8d50b, 0x88b444ca, + 0x1b32f68a, 0xfa4e674b, 0x5fad381f, 0xbed1a9de, 0x2d571b9e, + 0xcc2b8a5f, 0xba597f1d, 0x5b25eedc, 0xc8a35c9c, 0x29dfcd5d, + 0x2446b618, 0xc53a27d9, 0x56bc9599, 0xb7c00458, 0xc1b2f11a, + 0x20ce60db, 0xb348d29b, 0x5234435a, 0xa87a2411, 0x4906b5d0, + 0xda800790, 0x3bfc9651, 0x4d8e6313, 0xacf2f2d2, 0x3f744092, + 0xde08d153, 0xd391aa16, 0x32ed3bd7, 0xa16b8997, 0x40171856, + 0x3665ed14, 0xd7197cd5, 0x449fce95, 0xa5e35f54, 0xbf5a703e, + 0x5e26e1ff, 0xcda053bf, 0x2cdcc27e, 0x5aae373c, 0xbbd2a6fd, + 0x285414bd, 0xc928857c, 0xc4b1fe39, 0x25cd6ff8, 0xb64bddb8, + 0x57374c79, 0x2145b93b, 0xc03928fa, 0x53bf9aba, 0xb2c30b7b, + 0x488d6c30, 0xa9f1fdf1, 0x3a774fb1, 0xdb0bde70, 0xad792b32, + 0x4c05baf3, 0xdf8308b3, 0x3eff9972, 0x3366e237, 0xd21a73f6, + 0x419cc1b6, 0xa0e05077, 0xd692a535, 0x37ee34f4, 0xa46886b4, + 0x45141775, 0xe0f74821, 0x018bd9e0, 0x920d6ba0, 0x7371fa61, + 0x05030f23, 0xe47f9ee2, 0x77f92ca2, 0x9685bd63, 0x9b1cc626, + 0x7a6057e7, 0xe9e6e5a7, 0x089a7466, 0x7ee88124, 0x9f9410e5, + 0x0c12a2a5, 0xed6e3364, 0x1720542f, 0xf65cc5ee, 0x65da77ae, + 0x84a6e66f, 0xf2d4132d, 0x13a882ec, 0x802e30ac, 0x6152a16d, + 0x6ccbda28, 0x8db74be9, 0x1e31f9a9, 0xff4d6868, 0x893f9d2a, + 0x68430ceb, 0xfbc5beab, 0x1ab92f6a, 0xceb7e07f, 0x2fcb71be, + 0xbc4dc3fe, 0x5d31523f, 0x2b43a77d, 0xca3f36bc, 0x59b984fc, + 0xb8c5153d, 0xb55c6e78, 0x5420ffb9, 0xc7a64df9, 0x26dadc38, + 0x50a8297a, 0xb1d4b8bb, 0x22520afb, 0xc32e9b3a, 0x3960fc71, + 0xd81c6db0, 0x4b9adff0, 0xaae64e31, 0xdc94bb73, 0x3de82ab2, + 0xae6e98f2, 0x4f120933, 0x428b7276, 0xa3f7e3b7, 0x307151f7, + 0xd10dc036, 0xa77f3574, 0x4603a4b5, 0xd58516f5, 0x34f98734, + 0x911ad860, 0x706649a1, 0xe3e0fbe1, 0x029c6a20, 0x74ee9f62, + 0x95920ea3, 0x0614bce3, 0xe7682d22, 0xeaf15667, 0x0b8dc7a6, + 0x980b75e6, 0x7977e427, 0x0f051165, 0xee7980a4, 0x7dff32e4, + 0x9c83a325, 0x66cdc46e, 0x87b155af, 0x1437e7ef, 0xf54b762e, + 0x8339836c, 0x624512ad, 0xf1c3a0ed, 0x10bf312c, 0x1d264a69, + 0xfc5adba8, 0x6fdc69e8, 0x8ea0f829, 0xf8d20d6b, 0x19ae9caa, + 0x8a282eea, 0x6b54bf2b, 0x71ed9041, 0x90910180, 0x0317b3c0, + 0xe26b2201, 0x9419d743, 0x75654682, 0xe6e3f4c2, 0x079f6503, + 0x0a061e46, 0xeb7a8f87, 0x78fc3dc7, 0x9980ac06, 0xeff25944, + 0x0e8ec885, 0x9d087ac5, 0x7c74eb04, 0x863a8c4f, 0x67461d8e, + 0xf4c0afce, 0x15bc3e0f, 0x63cecb4d, 0x82b25a8c, 0x1134e8cc, + 0xf048790d, 0xfdd10248, 0x1cad9389, 0x8f2b21c9, 0x6e57b008, + 0x1825454a, 0xf959d48b, 0x6adf66cb, 0x8ba3f70a, 0x2e40a85e, + 0xcf3c399f, 0x5cba8bdf, 0xbdc61a1e, 0xcbb4ef5c, 0x2ac87e9d, + 0xb94eccdd, 0x58325d1c, 0x55ab2659, 0xb4d7b798, 0x275105d8, + 0xc62d9419, 0xb05f615b, 0x5123f09a, 0xc2a542da, 0x23d9d31b, + 0xd997b450, 0x38eb2591, 0xab6d97d1, 0x4a110610, 0x3c63f352, + 0xdd1f6293, 0x4e99d0d3, 0xafe54112, 0xa27c3a57, 0x4300ab96, + 0xd08619d6, 0x31fa8817, 0x47887d55, 0xa6f4ec94, 0x35725ed4, + 0xd40ecf15}, + {0x00000000, 0x2d6cc0fd, 0x5ad981fa, 0x77b54107, 0xb5b303f4, + 0x98dfc309, 0xef6a820e, 0xc20642f3, 0xdb6507eb, 0xf609c716, + 0x81bc8611, 0xacd046ec, 0x6ed6041f, 0x43bac4e2, 0x340f85e5, + 0x19634518, 0x06c90fd5, 0x2ba5cf28, 0x5c108e2f, 0x717c4ed2, + 0xb37a0c21, 0x9e16ccdc, 0xe9a38ddb, 0xc4cf4d26, 0xddac083e, + 0xf0c0c8c3, 0x877589c4, 0xaa194939, 0x681f0bca, 0x4573cb37, + 0x32c68a30, 0x1faa4acd, 0x0d921faa, 0x20fedf57, 0x574b9e50, + 0x7a275ead, 0xb8211c5e, 0x954ddca3, 0xe2f89da4, 0xcf945d59, + 0xd6f71841, 0xfb9bd8bc, 0x8c2e99bb, 0xa1425946, 0x63441bb5, + 0x4e28db48, 0x399d9a4f, 0x14f15ab2, 0x0b5b107f, 0x2637d082, + 0x51829185, 0x7cee5178, 0xbee8138b, 0x9384d376, 0xe4319271, + 0xc95d528c, 0xd03e1794, 0xfd52d769, 0x8ae7966e, 0xa78b5693, + 0x658d1460, 0x48e1d49d, 0x3f54959a, 0x12385567, 0x1b243f54, + 0x3648ffa9, 0x41fdbeae, 0x6c917e53, 0xae973ca0, 0x83fbfc5d, + 0xf44ebd5a, 0xd9227da7, 0xc04138bf, 0xed2df842, 0x9a98b945, + 0xb7f479b8, 0x75f23b4b, 0x589efbb6, 0x2f2bbab1, 0x02477a4c, + 0x1ded3081, 0x3081f07c, 0x4734b17b, 0x6a587186, 0xa85e3375, + 0x8532f388, 0xf287b28f, 0xdfeb7272, 0xc688376a, 0xebe4f797, + 0x9c51b690, 0xb13d766d, 0x733b349e, 0x5e57f463, 0x29e2b564, + 0x048e7599, 0x16b620fe, 0x3bdae003, 0x4c6fa104, 0x610361f9, + 0xa305230a, 0x8e69e3f7, 0xf9dca2f0, 0xd4b0620d, 0xcdd32715, + 0xe0bfe7e8, 0x970aa6ef, 0xba666612, 0x786024e1, 0x550ce41c, + 0x22b9a51b, 0x0fd565e6, 0x107f2f2b, 0x3d13efd6, 0x4aa6aed1, + 0x67ca6e2c, 0xa5cc2cdf, 0x88a0ec22, 0xff15ad25, 0xd2796dd8, + 0xcb1a28c0, 0xe676e83d, 0x91c3a93a, 0xbcaf69c7, 0x7ea92b34, + 0x53c5ebc9, 0x2470aace, 0x091c6a33, 0x36487ea8, 0x1b24be55, + 0x6c91ff52, 0x41fd3faf, 0x83fb7d5c, 0xae97bda1, 0xd922fca6, + 0xf44e3c5b, 0xed2d7943, 0xc041b9be, 0xb7f4f8b9, 0x9a983844, + 0x589e7ab7, 0x75f2ba4a, 0x0247fb4d, 0x2f2b3bb0, 0x3081717d, + 0x1dedb180, 0x6a58f087, 0x4734307a, 0x85327289, 0xa85eb274, + 0xdfebf373, 0xf287338e, 0xebe47696, 0xc688b66b, 0xb13df76c, + 0x9c513791, 0x5e577562, 0x733bb59f, 0x048ef498, 0x29e23465, + 0x3bda6102, 0x16b6a1ff, 0x6103e0f8, 0x4c6f2005, 0x8e6962f6, + 0xa305a20b, 0xd4b0e30c, 0xf9dc23f1, 0xe0bf66e9, 0xcdd3a614, + 0xba66e713, 0x970a27ee, 0x550c651d, 0x7860a5e0, 0x0fd5e4e7, + 0x22b9241a, 0x3d136ed7, 0x107fae2a, 0x67caef2d, 0x4aa62fd0, + 0x88a06d23, 0xa5ccadde, 0xd279ecd9, 0xff152c24, 0xe676693c, + 0xcb1aa9c1, 0xbcafe8c6, 0x91c3283b, 0x53c56ac8, 0x7ea9aa35, + 0x091ceb32, 0x24702bcf, 0x2d6c41fc, 0x00008101, 0x77b5c006, + 0x5ad900fb, 0x98df4208, 0xb5b382f5, 0xc206c3f2, 0xef6a030f, + 0xf6094617, 0xdb6586ea, 0xacd0c7ed, 0x81bc0710, 0x43ba45e3, + 0x6ed6851e, 0x1963c419, 0x340f04e4, 0x2ba54e29, 0x06c98ed4, + 0x717ccfd3, 0x5c100f2e, 0x9e164ddd, 0xb37a8d20, 0xc4cfcc27, + 0xe9a30cda, 0xf0c049c2, 0xddac893f, 0xaa19c838, 0x877508c5, + 0x45734a36, 0x681f8acb, 0x1faacbcc, 0x32c60b31, 0x20fe5e56, + 0x0d929eab, 0x7a27dfac, 0x574b1f51, 0x954d5da2, 0xb8219d5f, + 0xcf94dc58, 0xe2f81ca5, 0xfb9b59bd, 0xd6f79940, 0xa142d847, + 0x8c2e18ba, 0x4e285a49, 0x63449ab4, 0x14f1dbb3, 0x399d1b4e, + 0x26375183, 0x0b5b917e, 0x7ceed079, 0x51821084, 0x93845277, + 0xbee8928a, 0xc95dd38d, 0xe4311370, 0xfd525668, 0xd03e9695, + 0xa78bd792, 0x8ae7176f, 0x48e1559c, 0x658d9561, 0x1238d466, + 0x3f54149b}, + {0x00000000, 0x6c90fd50, 0xd921faa0, 0xb5b107f0, 0x0240f543, + 0x6ed00813, 0xdb610fe3, 0xb7f1f2b3, 0x0481ea86, 0x681117d6, + 0xdda01026, 0xb130ed76, 0x06c11fc5, 0x6a51e295, 0xdfe0e565, + 0xb3701835, 0x0903d50c, 0x6593285c, 0xd0222fac, 0xbcb2d2fc, + 0x0b43204f, 0x67d3dd1f, 0xd262daef, 0xbef227bf, 0x0d823f8a, + 0x6112c2da, 0xd4a3c52a, 0xb833387a, 0x0fc2cac9, 0x63523799, + 0xd6e33069, 0xba73cd39, 0x1207aa18, 0x7e975748, 0xcb2650b8, + 0xa7b6ade8, 0x10475f5b, 0x7cd7a20b, 0xc966a5fb, 0xa5f658ab, + 0x1686409e, 0x7a16bdce, 0xcfa7ba3e, 0xa337476e, 0x14c6b5dd, + 0x7856488d, 0xcde74f7d, 0xa177b22d, 0x1b047f14, 0x77948244, + 0xc22585b4, 0xaeb578e4, 0x19448a57, 0x75d47707, 0xc06570f7, + 0xacf58da7, 0x1f859592, 0x731568c2, 0xc6a46f32, 0xaa349262, + 0x1dc560d1, 0x71559d81, 0xc4e49a71, 0xa8746721, 0x240f5430, + 0x489fa960, 0xfd2eae90, 0x91be53c0, 0x264fa173, 0x4adf5c23, + 0xff6e5bd3, 0x93fea683, 0x208ebeb6, 0x4c1e43e6, 0xf9af4416, + 0x953fb946, 0x22ce4bf5, 0x4e5eb6a5, 0xfbefb155, 0x977f4c05, + 0x2d0c813c, 0x419c7c6c, 0xf42d7b9c, 0x98bd86cc, 0x2f4c747f, + 0x43dc892f, 0xf66d8edf, 0x9afd738f, 0x298d6bba, 0x451d96ea, + 0xf0ac911a, 0x9c3c6c4a, 0x2bcd9ef9, 0x475d63a9, 0xf2ec6459, + 0x9e7c9909, 0x3608fe28, 0x5a980378, 0xef290488, 0x83b9f9d8, + 0x34480b6b, 0x58d8f63b, 0xed69f1cb, 0x81f90c9b, 0x328914ae, + 0x5e19e9fe, 0xeba8ee0e, 0x8738135e, 0x30c9e1ed, 0x5c591cbd, + 0xe9e81b4d, 0x8578e61d, 0x3f0b2b24, 0x539bd674, 0xe62ad184, + 0x8aba2cd4, 0x3d4bde67, 0x51db2337, 0xe46a24c7, 0x88fad997, + 0x3b8ac1a2, 0x571a3cf2, 0xe2ab3b02, 0x8e3bc652, 0x39ca34e1, + 0x555ac9b1, 0xe0ebce41, 0x8c7b3311, 0x481ea860, 0x248e5530, + 0x913f52c0, 0xfdafaf90, 0x4a5e5d23, 0x26cea073, 0x937fa783, + 0xffef5ad3, 0x4c9f42e6, 0x200fbfb6, 0x95beb846, 0xf92e4516, + 0x4edfb7a5, 0x224f4af5, 0x97fe4d05, 0xfb6eb055, 0x411d7d6c, + 0x2d8d803c, 0x983c87cc, 0xf4ac7a9c, 0x435d882f, 0x2fcd757f, + 0x9a7c728f, 0xf6ec8fdf, 0x459c97ea, 0x290c6aba, 0x9cbd6d4a, + 0xf02d901a, 0x47dc62a9, 0x2b4c9ff9, 0x9efd9809, 0xf26d6559, + 0x5a190278, 0x3689ff28, 0x8338f8d8, 0xefa80588, 0x5859f73b, + 0x34c90a6b, 0x81780d9b, 0xede8f0cb, 0x5e98e8fe, 0x320815ae, + 0x87b9125e, 0xeb29ef0e, 0x5cd81dbd, 0x3048e0ed, 0x85f9e71d, + 0xe9691a4d, 0x531ad774, 0x3f8a2a24, 0x8a3b2dd4, 0xe6abd084, + 0x515a2237, 0x3dcadf67, 0x887bd897, 0xe4eb25c7, 0x579b3df2, + 0x3b0bc0a2, 0x8ebac752, 0xe22a3a02, 0x55dbc8b1, 0x394b35e1, + 0x8cfa3211, 0xe06acf41, 0x6c11fc50, 0x00810100, 0xb53006f0, + 0xd9a0fba0, 0x6e510913, 0x02c1f443, 0xb770f3b3, 0xdbe00ee3, + 0x689016d6, 0x0400eb86, 0xb1b1ec76, 0xdd211126, 0x6ad0e395, + 0x06401ec5, 0xb3f11935, 0xdf61e465, 0x6512295c, 0x0982d40c, + 0xbc33d3fc, 0xd0a32eac, 0x6752dc1f, 0x0bc2214f, 0xbe7326bf, + 0xd2e3dbef, 0x6193c3da, 0x0d033e8a, 0xb8b2397a, 0xd422c42a, + 0x63d33699, 0x0f43cbc9, 0xbaf2cc39, 0xd6623169, 0x7e165648, + 0x1286ab18, 0xa737ace8, 0xcba751b8, 0x7c56a30b, 0x10c65e5b, + 0xa57759ab, 0xc9e7a4fb, 0x7a97bcce, 0x1607419e, 0xa3b6466e, + 0xcf26bb3e, 0x78d7498d, 0x1447b4dd, 0xa1f6b32d, 0xcd664e7d, + 0x77158344, 0x1b857e14, 0xae3479e4, 0xc2a484b4, 0x75557607, + 0x19c58b57, 0xac748ca7, 0xc0e471f7, 0x739469c2, 0x1f049492, + 0xaab59362, 0xc6256e32, 0x71d49c81, 0x1d4461d1, 0xa8f56621, + 0xc4659b71}, + {0x00000000, 0x903d50c0, 0x9079a183, 0x0044f143, 0x90f04305, + 0x00cd13c5, 0x0089e286, 0x90b4b246, 0x91e38609, 0x01ded6c9, + 0x019a278a, 0x91a7774a, 0x0113c50c, 0x912e95cc, 0x916a648f, + 0x0157344f, 0x93c40c11, 0x03f95cd1, 0x03bdad92, 0x9380fd52, + 0x03344f14, 0x93091fd4, 0x934dee97, 0x0370be57, 0x02278a18, + 0x921adad8, 0x925e2b9b, 0x02637b5b, 0x92d7c91d, 0x02ea99dd, + 0x02ae689e, 0x9293385e, 0x978b1821, 0x07b648e1, 0x07f2b9a2, + 0x97cfe962, 0x077b5b24, 0x97460be4, 0x9702faa7, 0x073faa67, + 0x06689e28, 0x9655cee8, 0x96113fab, 0x062c6f6b, 0x9698dd2d, + 0x06a58ded, 0x06e17cae, 0x96dc2c6e, 0x044f1430, 0x947244f0, + 0x9436b5b3, 0x040be573, 0x94bf5735, 0x048207f5, 0x04c6f6b6, + 0x94fba676, 0x95ac9239, 0x0591c2f9, 0x05d533ba, 0x95e8637a, + 0x055cd13c, 0x956181fc, 0x952570bf, 0x0518207f, 0x9f153041, + 0x0f286081, 0x0f6c91c2, 0x9f51c102, 0x0fe57344, 0x9fd82384, + 0x9f9cd2c7, 0x0fa18207, 0x0ef6b648, 0x9ecbe688, 0x9e8f17cb, + 0x0eb2470b, 0x9e06f54d, 0x0e3ba58d, 0x0e7f54ce, 0x9e42040e, + 0x0cd13c50, 0x9cec6c90, 0x9ca89dd3, 0x0c95cd13, 0x9c217f55, + 0x0c1c2f95, 0x0c58ded6, 0x9c658e16, 0x9d32ba59, 0x0d0fea99, + 0x0d4b1bda, 0x9d764b1a, 0x0dc2f95c, 0x9dffa99c, 0x9dbb58df, + 0x0d86081f, 0x089e2860, 0x98a378a0, 0x98e789e3, 0x08dad923, + 0x986e6b65, 0x08533ba5, 0x0817cae6, 0x982a9a26, 0x997dae69, + 0x0940fea9, 0x09040fea, 0x99395f2a, 0x098ded6c, 0x99b0bdac, + 0x99f44cef, 0x09c91c2f, 0x9b5a2471, 0x0b6774b1, 0x0b2385f2, + 0x9b1ed532, 0x0baa6774, 0x9b9737b4, 0x9bd3c6f7, 0x0bee9637, + 0x0ab9a278, 0x9a84f2b8, 0x9ac003fb, 0x0afd533b, 0x9a49e17d, + 0x0a74b1bd, 0x0a3040fe, 0x9a0d103e, 0x8e296081, 0x1e143041, + 0x1e50c102, 0x8e6d91c2, 0x1ed92384, 0x8ee47344, 0x8ea08207, + 0x1e9dd2c7, 0x1fcae688, 0x8ff7b648, 0x8fb3470b, 0x1f8e17cb, + 0x8f3aa58d, 0x1f07f54d, 0x1f43040e, 0x8f7e54ce, 0x1ded6c90, + 0x8dd03c50, 0x8d94cd13, 0x1da99dd3, 0x8d1d2f95, 0x1d207f55, + 0x1d648e16, 0x8d59ded6, 0x8c0eea99, 0x1c33ba59, 0x1c774b1a, + 0x8c4a1bda, 0x1cfea99c, 0x8cc3f95c, 0x8c87081f, 0x1cba58df, + 0x19a278a0, 0x899f2860, 0x89dbd923, 0x19e689e3, 0x89523ba5, + 0x196f6b65, 0x192b9a26, 0x8916cae6, 0x8841fea9, 0x187cae69, + 0x18385f2a, 0x88050fea, 0x18b1bdac, 0x888ced6c, 0x88c81c2f, + 0x18f54cef, 0x8a6674b1, 0x1a5b2471, 0x1a1fd532, 0x8a2285f2, + 0x1a9637b4, 0x8aab6774, 0x8aef9637, 0x1ad2c6f7, 0x1b85f2b8, + 0x8bb8a278, 0x8bfc533b, 0x1bc103fb, 0x8b75b1bd, 0x1b48e17d, + 0x1b0c103e, 0x8b3140fe, 0x113c50c0, 0x81010000, 0x8145f143, + 0x1178a183, 0x81cc13c5, 0x11f14305, 0x11b5b246, 0x8188e286, + 0x80dfd6c9, 0x10e28609, 0x10a6774a, 0x809b278a, 0x102f95cc, + 0x8012c50c, 0x8056344f, 0x106b648f, 0x82f85cd1, 0x12c50c11, + 0x1281fd52, 0x82bcad92, 0x12081fd4, 0x82354f14, 0x8271be57, + 0x124cee97, 0x131bdad8, 0x83268a18, 0x83627b5b, 0x135f2b9b, + 0x83eb99dd, 0x13d6c91d, 0x1392385e, 0x83af689e, 0x86b748e1, + 0x168a1821, 0x16cee962, 0x86f3b9a2, 0x16470be4, 0x867a5b24, + 0x863eaa67, 0x1603faa7, 0x1754cee8, 0x87699e28, 0x872d6f6b, + 0x17103fab, 0x87a48ded, 0x1799dd2d, 0x17dd2c6e, 0x87e07cae, + 0x157344f0, 0x854e1430, 0x850ae573, 0x1537b5b3, 0x858307f5, + 0x15be5735, 0x15faa676, 0x85c7f6b6, 0x8490c2f9, 0x14ad9239, + 0x14e9637a, 0x84d433ba, 0x146081fc, 0x845dd13c, 0x8419207f, + 0x142470bf}, + {0x00000000, 0xac51c101, 0xe8a08201, 0x44f14300, 0x61420401, + 0xcd13c500, 0x89e28600, 0x25b34701, 0xc2840802, 0x6ed5c903, + 0x2a248a03, 0x86754b02, 0xa3c60c03, 0x0f97cd02, 0x4b668e02, + 0xe7374f03, 0x350b1007, 0x995ad106, 0xddab9206, 0x71fa5307, + 0x54491406, 0xf818d507, 0xbce99607, 0x10b85706, 0xf78f1805, + 0x5bded904, 0x1f2f9a04, 0xb37e5b05, 0x96cd1c04, 0x3a9cdd05, + 0x7e6d9e05, 0xd23c5f04, 0x6a16200e, 0xc647e10f, 0x82b6a20f, + 0x2ee7630e, 0x0b54240f, 0xa705e50e, 0xe3f4a60e, 0x4fa5670f, + 0xa892280c, 0x04c3e90d, 0x4032aa0d, 0xec636b0c, 0xc9d02c0d, + 0x6581ed0c, 0x2170ae0c, 0x8d216f0d, 0x5f1d3009, 0xf34cf108, + 0xb7bdb208, 0x1bec7309, 0x3e5f3408, 0x920ef509, 0xd6ffb609, + 0x7aae7708, 0x9d99380b, 0x31c8f90a, 0x7539ba0a, 0xd9687b0b, + 0xfcdb3c0a, 0x508afd0b, 0x147bbe0b, 0xb82a7f0a, 0xd42c401c, + 0x787d811d, 0x3c8cc21d, 0x90dd031c, 0xb56e441d, 0x193f851c, + 0x5dcec61c, 0xf19f071d, 0x16a8481e, 0xbaf9891f, 0xfe08ca1f, + 0x52590b1e, 0x77ea4c1f, 0xdbbb8d1e, 0x9f4ace1e, 0x331b0f1f, + 0xe127501b, 0x4d76911a, 0x0987d21a, 0xa5d6131b, 0x8065541a, + 0x2c34951b, 0x68c5d61b, 0xc494171a, 0x23a35819, 0x8ff29918, + 0xcb03da18, 0x67521b19, 0x42e15c18, 0xeeb09d19, 0xaa41de19, + 0x06101f18, 0xbe3a6012, 0x126ba113, 0x569ae213, 0xfacb2312, + 0xdf786413, 0x7329a512, 0x37d8e612, 0x9b892713, 0x7cbe6810, + 0xd0efa911, 0x941eea11, 0x384f2b10, 0x1dfc6c11, 0xb1adad10, + 0xf55cee10, 0x590d2f11, 0x8b317015, 0x2760b114, 0x6391f214, + 0xcfc03315, 0xea737414, 0x4622b515, 0x02d3f615, 0xae823714, + 0x49b57817, 0xe5e4b916, 0xa115fa16, 0x0d443b17, 0x28f77c16, + 0x84a6bd17, 0xc057fe17, 0x6c063f16, 0x185b803b, 0xb40a413a, + 0xf0fb023a, 0x5caac33b, 0x7919843a, 0xd548453b, 0x91b9063b, + 0x3de8c73a, 0xdadf8839, 0x768e4938, 0x327f0a38, 0x9e2ecb39, + 0xbb9d8c38, 0x17cc4d39, 0x533d0e39, 0xff6ccf38, 0x2d50903c, + 0x8101513d, 0xc5f0123d, 0x69a1d33c, 0x4c12943d, 0xe043553c, + 0xa4b2163c, 0x08e3d73d, 0xefd4983e, 0x4385593f, 0x07741a3f, + 0xab25db3e, 0x8e969c3f, 0x22c75d3e, 0x66361e3e, 0xca67df3f, + 0x724da035, 0xde1c6134, 0x9aed2234, 0x36bce335, 0x130fa434, + 0xbf5e6535, 0xfbaf2635, 0x57fee734, 0xb0c9a837, 0x1c986936, + 0x58692a36, 0xf438eb37, 0xd18bac36, 0x7dda6d37, 0x392b2e37, + 0x957aef36, 0x4746b032, 0xeb177133, 0xafe63233, 0x03b7f332, + 0x2604b433, 0x8a557532, 0xcea43632, 0x62f5f733, 0x85c2b830, + 0x29937931, 0x6d623a31, 0xc133fb30, 0xe480bc31, 0x48d17d30, + 0x0c203e30, 0xa071ff31, 0xcc77c027, 0x60260126, 0x24d74226, + 0x88868327, 0xad35c426, 0x01640527, 0x45954627, 0xe9c48726, + 0x0ef3c825, 0xa2a20924, 0xe6534a24, 0x4a028b25, 0x6fb1cc24, + 0xc3e00d25, 0x87114e25, 0x2b408f24, 0xf97cd020, 0x552d1121, + 0x11dc5221, 0xbd8d9320, 0x983ed421, 0x346f1520, 0x709e5620, + 0xdccf9721, 0x3bf8d822, 0x97a91923, 0xd3585a23, 0x7f099b22, + 0x5abadc23, 0xf6eb1d22, 0xb21a5e22, 0x1e4b9f23, 0xa661e029, + 0x0a302128, 0x4ec16228, 0xe290a329, 0xc723e428, 0x6b722529, + 0x2f836629, 0x83d2a728, 0x64e5e82b, 0xc8b4292a, 0x8c456a2a, + 0x2014ab2b, 0x05a7ec2a, 0xa9f62d2b, 0xed076e2b, 0x4156af2a, + 0x936af02e, 0x3f3b312f, 0x7bca722f, 0xd79bb32e, 0xf228f42f, + 0x5e79352e, 0x1a88762e, 0xb6d9b72f, 0x51eef82c, 0xfdbf392d, + 0xb94e7a2d, 0x151fbb2c, 0x30acfc2d, 0x9cfd3d2c, 0xd80c7e2c, + 0x745dbf2d}, + {0x00000000, 0x30b70076, 0x616e00ec, 0x51d9009a, 0xc2dc01d8, + 0xf26b01ae, 0xa3b20134, 0x93050142, 0x35bb03b3, 0x050c03c5, + 0x54d5035f, 0x64620329, 0xf767026b, 0xc7d0021d, 0x96090287, + 0xa6be02f1, 0x6b760766, 0x5bc10710, 0x0a18078a, 0x3aaf07fc, + 0xa9aa06be, 0x991d06c8, 0xc8c40652, 0xf8730624, 0x5ecd04d5, + 0x6e7a04a3, 0x3fa30439, 0x0f14044f, 0x9c11050d, 0xaca6057b, + 0xfd7f05e1, 0xcdc80597, 0xd6ec0ecc, 0xe65b0eba, 0xb7820e20, + 0x87350e56, 0x14300f14, 0x24870f62, 0x755e0ff8, 0x45e90f8e, + 0xe3570d7f, 0xd3e00d09, 0x82390d93, 0xb28e0de5, 0x218b0ca7, + 0x113c0cd1, 0x40e50c4b, 0x70520c3d, 0xbd9a09aa, 0x8d2d09dc, + 0xdcf40946, 0xec430930, 0x7f460872, 0x4ff10804, 0x1e28089e, + 0x2e9f08e8, 0x88210a19, 0xb8960a6f, 0xe94f0af5, 0xd9f80a83, + 0x4afd0bc1, 0x7a4a0bb7, 0x2b930b2d, 0x1b240b5b, 0x1ddb1d9b, + 0x2d6c1ded, 0x7cb51d77, 0x4c021d01, 0xdf071c43, 0xefb01c35, + 0xbe691caf, 0x8ede1cd9, 0x28601e28, 0x18d71e5e, 0x490e1ec4, + 0x79b91eb2, 0xeabc1ff0, 0xda0b1f86, 0x8bd21f1c, 0xbb651f6a, + 0x76ad1afd, 0x461a1a8b, 0x17c31a11, 0x27741a67, 0xb4711b25, + 0x84c61b53, 0xd51f1bc9, 0xe5a81bbf, 0x4316194e, 0x73a11938, + 0x227819a2, 0x12cf19d4, 0x81ca1896, 0xb17d18e0, 0xe0a4187a, + 0xd013180c, 0xcb371357, 0xfb801321, 0xaa5913bb, 0x9aee13cd, + 0x09eb128f, 0x395c12f9, 0x68851263, 0x58321215, 0xfe8c10e4, + 0xce3b1092, 0x9fe21008, 0xaf55107e, 0x3c50113c, 0x0ce7114a, + 0x5d3e11d0, 0x6d8911a6, 0xa0411431, 0x90f61447, 0xc12f14dd, + 0xf19814ab, 0x629d15e9, 0x522a159f, 0x03f31505, 0x33441573, + 0x95fa1782, 0xa54d17f4, 0xf494176e, 0xc4231718, 0x5726165a, + 0x6791162c, 0x364816b6, 0x06ff16c0, 0x3bb63b36, 0x0b013b40, + 0x5ad83bda, 0x6a6f3bac, 0xf96a3aee, 0xc9dd3a98, 0x98043a02, + 0xa8b33a74, 0x0e0d3885, 0x3eba38f3, 0x6f633869, 0x5fd4381f, + 0xccd1395d, 0xfc66392b, 0xadbf39b1, 0x9d0839c7, 0x50c03c50, + 0x60773c26, 0x31ae3cbc, 0x01193cca, 0x921c3d88, 0xa2ab3dfe, + 0xf3723d64, 0xc3c53d12, 0x657b3fe3, 0x55cc3f95, 0x04153f0f, + 0x34a23f79, 0xa7a73e3b, 0x97103e4d, 0xc6c93ed7, 0xf67e3ea1, + 0xed5a35fa, 0xdded358c, 0x8c343516, 0xbc833560, 0x2f863422, + 0x1f313454, 0x4ee834ce, 0x7e5f34b8, 0xd8e13649, 0xe856363f, + 0xb98f36a5, 0x893836d3, 0x1a3d3791, 0x2a8a37e7, 0x7b53377d, + 0x4be4370b, 0x862c329c, 0xb69b32ea, 0xe7423270, 0xd7f53206, + 0x44f03344, 0x74473332, 0x259e33a8, 0x152933de, 0xb397312f, + 0x83203159, 0xd2f931c3, 0xe24e31b5, 0x714b30f7, 0x41fc3081, + 0x1025301b, 0x2092306d, 0x266d26ad, 0x16da26db, 0x47032641, + 0x77b42637, 0xe4b12775, 0xd4062703, 0x85df2799, 0xb56827ef, + 0x13d6251e, 0x23612568, 0x72b825f2, 0x420f2584, 0xd10a24c6, + 0xe1bd24b0, 0xb064242a, 0x80d3245c, 0x4d1b21cb, 0x7dac21bd, + 0x2c752127, 0x1cc22151, 0x8fc72013, 0xbf702065, 0xeea920ff, + 0xde1e2089, 0x78a02278, 0x4817220e, 0x19ce2294, 0x297922e2, + 0xba7c23a0, 0x8acb23d6, 0xdb12234c, 0xeba5233a, 0xf0812861, + 0xc0362817, 0x91ef288d, 0xa15828fb, 0x325d29b9, 0x02ea29cf, + 0x53332955, 0x63842923, 0xc53a2bd2, 0xf58d2ba4, 0xa4542b3e, + 0x94e32b48, 0x07e62a0a, 0x37512a7c, 0x66882ae6, 0x563f2a90, + 0x9bf72f07, 0xab402f71, 0xfa992feb, 0xca2e2f9d, 0x592b2edf, + 0x699c2ea9, 0x38452e33, 0x08f22e45, 0xae4c2cb4, 0x9efb2cc2, + 0xcf222c58, 0xff952c2e, 0x6c902d6c, 0x5c272d1a, 0x0dfe2d80, + 0x3d492df6}, + {0x00000000, 0x776c766c, 0xeed8ecd8, 0x99b49ab4, 0x6db2d9b3, + 0x1adeafdf, 0x836a356b, 0xf4064307, 0xdb65b366, 0xac09c50a, + 0x35bd5fbe, 0x42d129d2, 0xb6d76ad5, 0xc1bb1cb9, 0x580f860d, + 0x2f63f061, 0x06c866cf, 0x71a410a3, 0xe8108a17, 0x9f7cfc7b, + 0x6b7abf7c, 0x1c16c910, 0x85a253a4, 0xf2ce25c8, 0xddadd5a9, + 0xaac1a3c5, 0x33753971, 0x44194f1d, 0xb01f0c1a, 0xc7737a76, + 0x5ec7e0c2, 0x29ab96ae, 0x0d90cd9e, 0x7afcbbf2, 0xe3482146, + 0x9424572a, 0x6022142d, 0x174e6241, 0x8efaf8f5, 0xf9968e99, + 0xd6f57ef8, 0xa1990894, 0x382d9220, 0x4f41e44c, 0xbb47a74b, + 0xcc2bd127, 0x559f4b93, 0x22f33dff, 0x0b58ab51, 0x7c34dd3d, + 0xe5804789, 0x92ec31e5, 0x66ea72e2, 0x1186048e, 0x88329e3a, + 0xff5ee856, 0xd03d1837, 0xa7516e5b, 0x3ee5f4ef, 0x49898283, + 0xbd8fc184, 0xcae3b7e8, 0x53572d5c, 0x243b5b30, 0x1b219b3c, + 0x6c4ded50, 0xf5f977e4, 0x82950188, 0x7693428f, 0x01ff34e3, + 0x984bae57, 0xef27d83b, 0xc044285a, 0xb7285e36, 0x2e9cc482, + 0x59f0b2ee, 0xadf6f1e9, 0xda9a8785, 0x432e1d31, 0x34426b5d, + 0x1de9fdf3, 0x6a858b9f, 0xf331112b, 0x845d6747, 0x705b2440, + 0x0737522c, 0x9e83c898, 0xe9efbef4, 0xc68c4e95, 0xb1e038f9, + 0x2854a24d, 0x5f38d421, 0xab3e9726, 0xdc52e14a, 0x45e67bfe, + 0x328a0d92, 0x16b156a2, 0x61dd20ce, 0xf869ba7a, 0x8f05cc16, + 0x7b038f11, 0x0c6ff97d, 0x95db63c9, 0xe2b715a5, 0xcdd4e5c4, + 0xbab893a8, 0x230c091c, 0x54607f70, 0xa0663c77, 0xd70a4a1b, + 0x4ebed0af, 0x39d2a6c3, 0x1079306d, 0x67154601, 0xfea1dcb5, + 0x89cdaad9, 0x7dcbe9de, 0x0aa79fb2, 0x93130506, 0xe47f736a, + 0xcb1c830b, 0xbc70f567, 0x25c46fd3, 0x52a819bf, 0xa6ae5ab8, + 0xd1c22cd4, 0x4876b660, 0x3f1ac00c, 0x36433678, 0x412f4014, + 0xd89bdaa0, 0xaff7accc, 0x5bf1efcb, 0x2c9d99a7, 0xb5290313, + 0xc245757f, 0xed26851e, 0x9a4af372, 0x03fe69c6, 0x74921faa, + 0x80945cad, 0xf7f82ac1, 0x6e4cb075, 0x1920c619, 0x308b50b7, + 0x47e726db, 0xde53bc6f, 0xa93fca03, 0x5d398904, 0x2a55ff68, + 0xb3e165dc, 0xc48d13b0, 0xebeee3d1, 0x9c8295bd, 0x05360f09, + 0x725a7965, 0x865c3a62, 0xf1304c0e, 0x6884d6ba, 0x1fe8a0d6, + 0x3bd3fbe6, 0x4cbf8d8a, 0xd50b173e, 0xa2676152, 0x56612255, + 0x210d5439, 0xb8b9ce8d, 0xcfd5b8e1, 0xe0b64880, 0x97da3eec, + 0x0e6ea458, 0x7902d234, 0x8d049133, 0xfa68e75f, 0x63dc7deb, + 0x14b00b87, 0x3d1b9d29, 0x4a77eb45, 0xd3c371f1, 0xa4af079d, + 0x50a9449a, 0x27c532f6, 0xbe71a842, 0xc91dde2e, 0xe67e2e4f, + 0x91125823, 0x08a6c297, 0x7fcab4fb, 0x8bccf7fc, 0xfca08190, + 0x65141b24, 0x12786d48, 0x2d62ad44, 0x5a0edb28, 0xc3ba419c, + 0xb4d637f0, 0x40d074f7, 0x37bc029b, 0xae08982f, 0xd964ee43, + 0xf6071e22, 0x816b684e, 0x18dff2fa, 0x6fb38496, 0x9bb5c791, + 0xecd9b1fd, 0x756d2b49, 0x02015d25, 0x2baacb8b, 0x5cc6bde7, + 0xc5722753, 0xb21e513f, 0x46181238, 0x31746454, 0xa8c0fee0, + 0xdfac888c, 0xf0cf78ed, 0x87a30e81, 0x1e179435, 0x697be259, + 0x9d7da15e, 0xea11d732, 0x73a54d86, 0x04c93bea, 0x20f260da, + 0x579e16b6, 0xce2a8c02, 0xb946fa6e, 0x4d40b969, 0x3a2ccf05, + 0xa39855b1, 0xd4f423dd, 0xfb97d3bc, 0x8cfba5d0, 0x154f3f64, + 0x62234908, 0x96250a0f, 0xe1497c63, 0x78fde6d7, 0x0f9190bb, + 0x263a0615, 0x51567079, 0xc8e2eacd, 0xbf8e9ca1, 0x4b88dfa6, + 0x3ce4a9ca, 0xa550337e, 0xd23c4512, 0xfd5fb573, 0x8a33c31f, + 0x138759ab, 0x64eb2fc7, 0x90ed6cc0, 0xe7811aac, 0x7e358018, + 0x0959f674}, + {0x00000000, 0x6c866cf0, 0xd90cd9e0, 0xb58ab510, 0x021ab3c3, + 0x6e9cdf33, 0xdb166a23, 0xb79006d3, 0x04356786, 0x68b30b76, + 0xdd39be66, 0xb1bfd296, 0x062fd445, 0x6aa9b8b5, 0xdf230da5, + 0xb3a56155, 0x086acf0c, 0x64eca3fc, 0xd16616ec, 0xbde07a1c, + 0x0a707ccf, 0x66f6103f, 0xd37ca52f, 0xbffac9df, 0x0c5fa88a, + 0x60d9c47a, 0xd553716a, 0xb9d51d9a, 0x0e451b49, 0x62c377b9, + 0xd749c2a9, 0xbbcfae59, 0x10d59e18, 0x7c53f2e8, 0xc9d947f8, + 0xa55f2b08, 0x12cf2ddb, 0x7e49412b, 0xcbc3f43b, 0xa74598cb, + 0x14e0f99e, 0x7866956e, 0xcdec207e, 0xa16a4c8e, 0x16fa4a5d, + 0x7a7c26ad, 0xcff693bd, 0xa370ff4d, 0x18bf5114, 0x74393de4, + 0xc1b388f4, 0xad35e404, 0x1aa5e2d7, 0x76238e27, 0xc3a93b37, + 0xaf2f57c7, 0x1c8a3692, 0x700c5a62, 0xc586ef72, 0xa9008382, + 0x1e908551, 0x7216e9a1, 0xc79c5cb1, 0xab1a3041, 0x21ab3c30, + 0x4d2d50c0, 0xf8a7e5d0, 0x94218920, 0x23b18ff3, 0x4f37e303, + 0xfabd5613, 0x963b3ae3, 0x259e5bb6, 0x49183746, 0xfc928256, + 0x9014eea6, 0x2784e875, 0x4b028485, 0xfe883195, 0x920e5d65, + 0x29c1f33c, 0x45479fcc, 0xf0cd2adc, 0x9c4b462c, 0x2bdb40ff, + 0x475d2c0f, 0xf2d7991f, 0x9e51f5ef, 0x2df494ba, 0x4172f84a, + 0xf4f84d5a, 0x987e21aa, 0x2fee2779, 0x43684b89, 0xf6e2fe99, + 0x9a649269, 0x317ea228, 0x5df8ced8, 0xe8727bc8, 0x84f41738, + 0x336411eb, 0x5fe27d1b, 0xea68c80b, 0x86eea4fb, 0x354bc5ae, + 0x59cda95e, 0xec471c4e, 0x80c170be, 0x3751766d, 0x5bd71a9d, + 0xee5daf8d, 0x82dbc37d, 0x39146d24, 0x559201d4, 0xe018b4c4, + 0x8c9ed834, 0x3b0edee7, 0x5788b217, 0xe2020707, 0x8e846bf7, + 0x3d210aa2, 0x51a76652, 0xe42dd342, 0x88abbfb2, 0x3f3bb961, + 0x53bdd591, 0xe6376081, 0x8ab10c71, 0x43567860, 0x2fd01490, + 0x9a5aa180, 0xf6dccd70, 0x414ccba3, 0x2dcaa753, 0x98401243, + 0xf4c67eb3, 0x47631fe6, 0x2be57316, 0x9e6fc606, 0xf2e9aaf6, + 0x4579ac25, 0x29ffc0d5, 0x9c7575c5, 0xf0f31935, 0x4b3cb76c, + 0x27badb9c, 0x92306e8c, 0xfeb6027c, 0x492604af, 0x25a0685f, + 0x902add4f, 0xfcacb1bf, 0x4f09d0ea, 0x238fbc1a, 0x9605090a, + 0xfa8365fa, 0x4d136329, 0x21950fd9, 0x941fbac9, 0xf899d639, + 0x5383e678, 0x3f058a88, 0x8a8f3f98, 0xe6095368, 0x519955bb, + 0x3d1f394b, 0x88958c5b, 0xe413e0ab, 0x57b681fe, 0x3b30ed0e, + 0x8eba581e, 0xe23c34ee, 0x55ac323d, 0x392a5ecd, 0x8ca0ebdd, + 0xe026872d, 0x5be92974, 0x376f4584, 0x82e5f094, 0xee639c64, + 0x59f39ab7, 0x3575f647, 0x80ff4357, 0xec792fa7, 0x5fdc4ef2, + 0x335a2202, 0x86d09712, 0xea56fbe2, 0x5dc6fd31, 0x314091c1, + 0x84ca24d1, 0xe84c4821, 0x62fd4450, 0x0e7b28a0, 0xbbf19db0, + 0xd777f140, 0x60e7f793, 0x0c619b63, 0xb9eb2e73, 0xd56d4283, + 0x66c823d6, 0x0a4e4f26, 0xbfc4fa36, 0xd34296c6, 0x64d29015, + 0x0854fce5, 0xbdde49f5, 0xd1582505, 0x6a978b5c, 0x0611e7ac, + 0xb39b52bc, 0xdf1d3e4c, 0x688d389f, 0x040b546f, 0xb181e17f, + 0xdd078d8f, 0x6ea2ecda, 0x0224802a, 0xb7ae353a, 0xdb2859ca, + 0x6cb85f19, 0x003e33e9, 0xb5b486f9, 0xd932ea09, 0x7228da48, + 0x1eaeb6b8, 0xab2403a8, 0xc7a26f58, 0x7032698b, 0x1cb4057b, + 0xa93eb06b, 0xc5b8dc9b, 0x761dbdce, 0x1a9bd13e, 0xaf11642e, + 0xc39708de, 0x74070e0d, 0x188162fd, 0xad0bd7ed, 0xc18dbb1d, + 0x7a421544, 0x16c479b4, 0xa34ecca4, 0xcfc8a054, 0x7858a687, + 0x14deca77, 0xa1547f67, 0xcdd21397, 0x7e7772c2, 0x12f11e32, + 0xa77bab22, 0xcbfdc7d2, 0x7c6dc101, 0x10ebadf1, 0xa56118e1, + 0xc9e77411}}; + +static const word_t crc_braid_big_table[][256] = { + {0x0000000000000000, 0xf06c866c00000000, 0xe0d90cd900000000, + 0x10b58ab500000000, 0xc3b31a0200000000, 0x33df9c6e00000000, + 0x236a16db00000000, 0xd30690b700000000, 0x8667350400000000, + 0x760bb36800000000, 0x66be39dd00000000, 0x96d2bfb100000000, + 0x45d42f0600000000, 0xb5b8a96a00000000, 0xa50d23df00000000, + 0x5561a5b300000000, 0x0ccf6a0800000000, 0xfca3ec6400000000, + 0xec1666d100000000, 0x1c7ae0bd00000000, 0xcf7c700a00000000, + 0x3f10f66600000000, 0x2fa57cd300000000, 0xdfc9fabf00000000, + 0x8aa85f0c00000000, 0x7ac4d96000000000, 0x6a7153d500000000, + 0x9a1dd5b900000000, 0x491b450e00000000, 0xb977c36200000000, + 0xa9c249d700000000, 0x59aecfbb00000000, 0x189ed51000000000, + 0xe8f2537c00000000, 0xf847d9c900000000, 0x082b5fa500000000, + 0xdb2dcf1200000000, 0x2b41497e00000000, 0x3bf4c3cb00000000, + 0xcb9845a700000000, 0x9ef9e01400000000, 0x6e95667800000000, + 0x7e20eccd00000000, 0x8e4c6aa100000000, 0x5d4afa1600000000, + 0xad267c7a00000000, 0xbd93f6cf00000000, 0x4dff70a300000000, + 0x1451bf1800000000, 0xe43d397400000000, 0xf488b3c100000000, + 0x04e435ad00000000, 0xd7e2a51a00000000, 0x278e237600000000, + 0x373ba9c300000000, 0xc7572faf00000000, 0x92368a1c00000000, + 0x625a0c7000000000, 0x72ef86c500000000, 0x828300a900000000, + 0x5185901e00000000, 0xa1e9167200000000, 0xb15c9cc700000000, + 0x41301aab00000000, 0x303cab2100000000, 0xc0502d4d00000000, + 0xd0e5a7f800000000, 0x2089219400000000, 0xf38fb12300000000, + 0x03e3374f00000000, 0x1356bdfa00000000, 0xe33a3b9600000000, + 0xb65b9e2500000000, 0x4637184900000000, 0x568292fc00000000, + 0xa6ee149000000000, 0x75e8842700000000, 0x8584024b00000000, + 0x953188fe00000000, 0x655d0e9200000000, 0x3cf3c12900000000, + 0xcc9f474500000000, 0xdc2acdf000000000, 0x2c464b9c00000000, + 0xff40db2b00000000, 0x0f2c5d4700000000, 0x1f99d7f200000000, + 0xeff5519e00000000, 0xba94f42d00000000, 0x4af8724100000000, + 0x5a4df8f400000000, 0xaa217e9800000000, 0x7927ee2f00000000, + 0x894b684300000000, 0x99fee2f600000000, 0x6992649a00000000, + 0x28a27e3100000000, 0xd8cef85d00000000, 0xc87b72e800000000, + 0x3817f48400000000, 0xeb11643300000000, 0x1b7de25f00000000, + 0x0bc868ea00000000, 0xfba4ee8600000000, 0xaec54b3500000000, + 0x5ea9cd5900000000, 0x4e1c47ec00000000, 0xbe70c18000000000, + 0x6d76513700000000, 0x9d1ad75b00000000, 0x8daf5dee00000000, + 0x7dc3db8200000000, 0x246d143900000000, 0xd401925500000000, + 0xc4b418e000000000, 0x34d89e8c00000000, 0xe7de0e3b00000000, + 0x17b2885700000000, 0x070702e200000000, 0xf76b848e00000000, + 0xa20a213d00000000, 0x5266a75100000000, 0x42d32de400000000, + 0xb2bfab8800000000, 0x61b93b3f00000000, 0x91d5bd5300000000, + 0x816037e600000000, 0x710cb18a00000000, 0x6078564300000000, + 0x9014d02f00000000, 0x80a15a9a00000000, 0x70cddcf600000000, + 0xa3cb4c4100000000, 0x53a7ca2d00000000, 0x4312409800000000, + 0xb37ec6f400000000, 0xe61f634700000000, 0x1673e52b00000000, + 0x06c66f9e00000000, 0xf6aae9f200000000, 0x25ac794500000000, + 0xd5c0ff2900000000, 0xc575759c00000000, 0x3519f3f000000000, + 0x6cb73c4b00000000, 0x9cdbba2700000000, 0x8c6e309200000000, + 0x7c02b6fe00000000, 0xaf04264900000000, 0x5f68a02500000000, + 0x4fdd2a9000000000, 0xbfb1acfc00000000, 0xead0094f00000000, + 0x1abc8f2300000000, 0x0a09059600000000, 0xfa6583fa00000000, + 0x2963134d00000000, 0xd90f952100000000, 0xc9ba1f9400000000, + 0x39d699f800000000, 0x78e6835300000000, 0x888a053f00000000, + 0x983f8f8a00000000, 0x685309e600000000, 0xbb55995100000000, + 0x4b391f3d00000000, 0x5b8c958800000000, 0xabe013e400000000, + 0xfe81b65700000000, 0x0eed303b00000000, 0x1e58ba8e00000000, + 0xee343ce200000000, 0x3d32ac5500000000, 0xcd5e2a3900000000, + 0xddeba08c00000000, 0x2d8726e000000000, 0x7429e95b00000000, + 0x84456f3700000000, 0x94f0e58200000000, 0x649c63ee00000000, + 0xb79af35900000000, 0x47f6753500000000, 0x5743ff8000000000, + 0xa72f79ec00000000, 0xf24edc5f00000000, 0x02225a3300000000, + 0x1297d08600000000, 0xe2fb56ea00000000, 0x31fdc65d00000000, + 0xc191403100000000, 0xd124ca8400000000, 0x21484ce800000000, + 0x5044fd6200000000, 0xa0287b0e00000000, 0xb09df1bb00000000, + 0x40f177d700000000, 0x93f7e76000000000, 0x639b610c00000000, + 0x732eebb900000000, 0x83426dd500000000, 0xd623c86600000000, + 0x264f4e0a00000000, 0x36fac4bf00000000, 0xc69642d300000000, + 0x1590d26400000000, 0xe5fc540800000000, 0xf549debd00000000, + 0x052558d100000000, 0x5c8b976a00000000, 0xace7110600000000, + 0xbc529bb300000000, 0x4c3e1ddf00000000, 0x9f388d6800000000, + 0x6f540b0400000000, 0x7fe181b100000000, 0x8f8d07dd00000000, + 0xdaeca26e00000000, 0x2a80240200000000, 0x3a35aeb700000000, + 0xca5928db00000000, 0x195fb86c00000000, 0xe9333e0000000000, + 0xf986b4b500000000, 0x09ea32d900000000, 0x48da287200000000, + 0xb8b6ae1e00000000, 0xa80324ab00000000, 0x586fa2c700000000, + 0x8b69327000000000, 0x7b05b41c00000000, 0x6bb03ea900000000, + 0x9bdcb8c500000000, 0xcebd1d7600000000, 0x3ed19b1a00000000, + 0x2e6411af00000000, 0xde0897c300000000, 0x0d0e077400000000, + 0xfd62811800000000, 0xedd70bad00000000, 0x1dbb8dc100000000, + 0x4415427a00000000, 0xb479c41600000000, 0xa4cc4ea300000000, + 0x54a0c8cf00000000, 0x87a6587800000000, 0x77cade1400000000, + 0x677f54a100000000, 0x9713d2cd00000000, 0xc272777e00000000, + 0x321ef11200000000, 0x22ab7ba700000000, 0xd2c7fdcb00000000, + 0x01c16d7c00000000, 0xf1adeb1000000000, 0xe11861a500000000, + 0x1174e7c900000000}, + {0x0000000000000000, 0x6c766c7700000000, 0xd8ecd8ee00000000, + 0xb49ab49900000000, 0xb3d9b26d00000000, 0xdfafde1a00000000, + 0x6b356a8300000000, 0x074306f400000000, 0x66b365db00000000, + 0x0ac509ac00000000, 0xbe5fbd3500000000, 0xd229d14200000000, + 0xd56ad7b600000000, 0xb91cbbc100000000, 0x0d860f5800000000, + 0x61f0632f00000000, 0xcf66c80600000000, 0xa310a47100000000, + 0x178a10e800000000, 0x7bfc7c9f00000000, 0x7cbf7a6b00000000, + 0x10c9161c00000000, 0xa453a28500000000, 0xc825cef200000000, + 0xa9d5addd00000000, 0xc5a3c1aa00000000, 0x7139753300000000, + 0x1d4f194400000000, 0x1a0c1fb000000000, 0x767a73c700000000, + 0xc2e0c75e00000000, 0xae96ab2900000000, 0x9ecd900d00000000, + 0xf2bbfc7a00000000, 0x462148e300000000, 0x2a57249400000000, + 0x2d14226000000000, 0x41624e1700000000, 0xf5f8fa8e00000000, + 0x998e96f900000000, 0xf87ef5d600000000, 0x940899a100000000, + 0x20922d3800000000, 0x4ce4414f00000000, 0x4ba747bb00000000, + 0x27d12bcc00000000, 0x934b9f5500000000, 0xff3df32200000000, + 0x51ab580b00000000, 0x3ddd347c00000000, 0x894780e500000000, + 0xe531ec9200000000, 0xe272ea6600000000, 0x8e04861100000000, + 0x3a9e328800000000, 0x56e85eff00000000, 0x37183dd000000000, + 0x5b6e51a700000000, 0xeff4e53e00000000, 0x8382894900000000, + 0x84c18fbd00000000, 0xe8b7e3ca00000000, 0x5c2d575300000000, + 0x305b3b2400000000, 0x3c9b211b00000000, 0x50ed4d6c00000000, + 0xe477f9f500000000, 0x8801958200000000, 0x8f42937600000000, + 0xe334ff0100000000, 0x57ae4b9800000000, 0x3bd827ef00000000, + 0x5a2844c000000000, 0x365e28b700000000, 0x82c49c2e00000000, + 0xeeb2f05900000000, 0xe9f1f6ad00000000, 0x85879ada00000000, + 0x311d2e4300000000, 0x5d6b423400000000, 0xf3fde91d00000000, + 0x9f8b856a00000000, 0x2b1131f300000000, 0x47675d8400000000, + 0x40245b7000000000, 0x2c52370700000000, 0x98c8839e00000000, + 0xf4beefe900000000, 0x954e8cc600000000, 0xf938e0b100000000, + 0x4da2542800000000, 0x21d4385f00000000, 0x26973eab00000000, + 0x4ae152dc00000000, 0xfe7be64500000000, 0x920d8a3200000000, + 0xa256b11600000000, 0xce20dd6100000000, 0x7aba69f800000000, + 0x16cc058f00000000, 0x118f037b00000000, 0x7df96f0c00000000, + 0xc963db9500000000, 0xa515b7e200000000, 0xc4e5d4cd00000000, + 0xa893b8ba00000000, 0x1c090c2300000000, 0x707f605400000000, + 0x773c66a000000000, 0x1b4a0ad700000000, 0xafd0be4e00000000, + 0xc3a6d23900000000, 0x6d30791000000000, 0x0146156700000000, + 0xb5dca1fe00000000, 0xd9aacd8900000000, 0xdee9cb7d00000000, + 0xb29fa70a00000000, 0x0605139300000000, 0x6a737fe400000000, + 0x0b831ccb00000000, 0x67f570bc00000000, 0xd36fc42500000000, + 0xbf19a85200000000, 0xb85aaea600000000, 0xd42cc2d100000000, + 0x60b6764800000000, 0x0cc01a3f00000000, 0x7836433600000000, + 0x14402f4100000000, 0xa0da9bd800000000, 0xccacf7af00000000, + 0xcbeff15b00000000, 0xa7999d2c00000000, 0x130329b500000000, + 0x7f7545c200000000, 0x1e8526ed00000000, 0x72f34a9a00000000, + 0xc669fe0300000000, 0xaa1f927400000000, 0xad5c948000000000, + 0xc12af8f700000000, 0x75b04c6e00000000, 0x19c6201900000000, + 0xb7508b3000000000, 0xdb26e74700000000, 0x6fbc53de00000000, + 0x03ca3fa900000000, 0x0489395d00000000, 0x68ff552a00000000, + 0xdc65e1b300000000, 0xb0138dc400000000, 0xd1e3eeeb00000000, + 0xbd95829c00000000, 0x090f360500000000, 0x65795a7200000000, + 0x623a5c8600000000, 0x0e4c30f100000000, 0xbad6846800000000, + 0xd6a0e81f00000000, 0xe6fbd33b00000000, 0x8a8dbf4c00000000, + 0x3e170bd500000000, 0x526167a200000000, 0x5522615600000000, + 0x39540d2100000000, 0x8dceb9b800000000, 0xe1b8d5cf00000000, + 0x8048b6e000000000, 0xec3eda9700000000, 0x58a46e0e00000000, + 0x34d2027900000000, 0x3391048d00000000, 0x5fe768fa00000000, + 0xeb7ddc6300000000, 0x870bb01400000000, 0x299d1b3d00000000, + 0x45eb774a00000000, 0xf171c3d300000000, 0x9d07afa400000000, + 0x9a44a95000000000, 0xf632c52700000000, 0x42a871be00000000, + 0x2ede1dc900000000, 0x4f2e7ee600000000, 0x2358129100000000, + 0x97c2a60800000000, 0xfbb4ca7f00000000, 0xfcf7cc8b00000000, + 0x9081a0fc00000000, 0x241b146500000000, 0x486d781200000000, + 0x44ad622d00000000, 0x28db0e5a00000000, 0x9c41bac300000000, + 0xf037d6b400000000, 0xf774d04000000000, 0x9b02bc3700000000, + 0x2f9808ae00000000, 0x43ee64d900000000, 0x221e07f600000000, + 0x4e686b8100000000, 0xfaf2df1800000000, 0x9684b36f00000000, + 0x91c7b59b00000000, 0xfdb1d9ec00000000, 0x492b6d7500000000, + 0x255d010200000000, 0x8bcbaa2b00000000, 0xe7bdc65c00000000, + 0x532772c500000000, 0x3f511eb200000000, 0x3812184600000000, + 0x5464743100000000, 0xe0fec0a800000000, 0x8c88acdf00000000, + 0xed78cff000000000, 0x810ea38700000000, 0x3594171e00000000, + 0x59e27b6900000000, 0x5ea17d9d00000000, 0x32d711ea00000000, + 0x864da57300000000, 0xea3bc90400000000, 0xda60f22000000000, + 0xb6169e5700000000, 0x028c2ace00000000, 0x6efa46b900000000, + 0x69b9404d00000000, 0x05cf2c3a00000000, 0xb15598a300000000, + 0xdd23f4d400000000, 0xbcd397fb00000000, 0xd0a5fb8c00000000, + 0x643f4f1500000000, 0x0849236200000000, 0x0f0a259600000000, + 0x637c49e100000000, 0xd7e6fd7800000000, 0xbb90910f00000000, + 0x15063a2600000000, 0x7970565100000000, 0xcdeae2c800000000, + 0xa19c8ebf00000000, 0xa6df884b00000000, 0xcaa9e43c00000000, + 0x7e3350a500000000, 0x12453cd200000000, 0x73b55ffd00000000, + 0x1fc3338a00000000, 0xab59871300000000, 0xc72feb6400000000, + 0xc06ced9000000000, 0xac1a81e700000000, 0x1880357e00000000, + 0x74f6590900000000}, + {0x0000000000000000, 0x7600b73000000000, 0xec006e6100000000, + 0x9a00d95100000000, 0xd801dcc200000000, 0xae016bf200000000, + 0x3401b2a300000000, 0x4201059300000000, 0xb303bb3500000000, + 0xc5030c0500000000, 0x5f03d55400000000, 0x2903626400000000, + 0x6b0267f700000000, 0x1d02d0c700000000, 0x8702099600000000, + 0xf102bea600000000, 0x6607766b00000000, 0x1007c15b00000000, + 0x8a07180a00000000, 0xfc07af3a00000000, 0xbe06aaa900000000, + 0xc8061d9900000000, 0x5206c4c800000000, 0x240673f800000000, + 0xd504cd5e00000000, 0xa3047a6e00000000, 0x3904a33f00000000, + 0x4f04140f00000000, 0x0d05119c00000000, 0x7b05a6ac00000000, + 0xe1057ffd00000000, 0x9705c8cd00000000, 0xcc0eecd600000000, + 0xba0e5be600000000, 0x200e82b700000000, 0x560e358700000000, + 0x140f301400000000, 0x620f872400000000, 0xf80f5e7500000000, + 0x8e0fe94500000000, 0x7f0d57e300000000, 0x090de0d300000000, + 0x930d398200000000, 0xe50d8eb200000000, 0xa70c8b2100000000, + 0xd10c3c1100000000, 0x4b0ce54000000000, 0x3d0c527000000000, + 0xaa099abd00000000, 0xdc092d8d00000000, 0x4609f4dc00000000, + 0x300943ec00000000, 0x7208467f00000000, 0x0408f14f00000000, + 0x9e08281e00000000, 0xe8089f2e00000000, 0x190a218800000000, + 0x6f0a96b800000000, 0xf50a4fe900000000, 0x830af8d900000000, + 0xc10bfd4a00000000, 0xb70b4a7a00000000, 0x2d0b932b00000000, + 0x5b0b241b00000000, 0x9b1ddb1d00000000, 0xed1d6c2d00000000, + 0x771db57c00000000, 0x011d024c00000000, 0x431c07df00000000, + 0x351cb0ef00000000, 0xaf1c69be00000000, 0xd91cde8e00000000, + 0x281e602800000000, 0x5e1ed71800000000, 0xc41e0e4900000000, + 0xb21eb97900000000, 0xf01fbcea00000000, 0x861f0bda00000000, + 0x1c1fd28b00000000, 0x6a1f65bb00000000, 0xfd1aad7600000000, + 0x8b1a1a4600000000, 0x111ac31700000000, 0x671a742700000000, + 0x251b71b400000000, 0x531bc68400000000, 0xc91b1fd500000000, + 0xbf1ba8e500000000, 0x4e19164300000000, 0x3819a17300000000, + 0xa219782200000000, 0xd419cf1200000000, 0x9618ca8100000000, + 0xe0187db100000000, 0x7a18a4e000000000, 0x0c1813d000000000, + 0x571337cb00000000, 0x211380fb00000000, 0xbb1359aa00000000, + 0xcd13ee9a00000000, 0x8f12eb0900000000, 0xf9125c3900000000, + 0x6312856800000000, 0x1512325800000000, 0xe4108cfe00000000, + 0x92103bce00000000, 0x0810e29f00000000, 0x7e1055af00000000, + 0x3c11503c00000000, 0x4a11e70c00000000, 0xd0113e5d00000000, + 0xa611896d00000000, 0x311441a000000000, 0x4714f69000000000, + 0xdd142fc100000000, 0xab1498f100000000, 0xe9159d6200000000, + 0x9f152a5200000000, 0x0515f30300000000, 0x7315443300000000, + 0x8217fa9500000000, 0xf4174da500000000, 0x6e1794f400000000, + 0x181723c400000000, 0x5a16265700000000, 0x2c16916700000000, + 0xb616483600000000, 0xc016ff0600000000, 0x363bb63b00000000, + 0x403b010b00000000, 0xda3bd85a00000000, 0xac3b6f6a00000000, + 0xee3a6af900000000, 0x983addc900000000, 0x023a049800000000, + 0x743ab3a800000000, 0x85380d0e00000000, 0xf338ba3e00000000, + 0x6938636f00000000, 0x1f38d45f00000000, 0x5d39d1cc00000000, + 0x2b3966fc00000000, 0xb139bfad00000000, 0xc739089d00000000, + 0x503cc05000000000, 0x263c776000000000, 0xbc3cae3100000000, + 0xca3c190100000000, 0x883d1c9200000000, 0xfe3daba200000000, + 0x643d72f300000000, 0x123dc5c300000000, 0xe33f7b6500000000, + 0x953fcc5500000000, 0x0f3f150400000000, 0x793fa23400000000, + 0x3b3ea7a700000000, 0x4d3e109700000000, 0xd73ec9c600000000, + 0xa13e7ef600000000, 0xfa355aed00000000, 0x8c35eddd00000000, + 0x1635348c00000000, 0x603583bc00000000, 0x2234862f00000000, + 0x5434311f00000000, 0xce34e84e00000000, 0xb8345f7e00000000, + 0x4936e1d800000000, 0x3f3656e800000000, 0xa5368fb900000000, + 0xd336388900000000, 0x91373d1a00000000, 0xe7378a2a00000000, + 0x7d37537b00000000, 0x0b37e44b00000000, 0x9c322c8600000000, + 0xea329bb600000000, 0x703242e700000000, 0x0632f5d700000000, + 0x4433f04400000000, 0x3233477400000000, 0xa8339e2500000000, + 0xde33291500000000, 0x2f3197b300000000, 0x5931208300000000, + 0xc331f9d200000000, 0xb5314ee200000000, 0xf7304b7100000000, + 0x8130fc4100000000, 0x1b30251000000000, 0x6d30922000000000, + 0xad266d2600000000, 0xdb26da1600000000, 0x4126034700000000, + 0x3726b47700000000, 0x7527b1e400000000, 0x032706d400000000, + 0x9927df8500000000, 0xef2768b500000000, 0x1e25d61300000000, + 0x6825612300000000, 0xf225b87200000000, 0x84250f4200000000, + 0xc6240ad100000000, 0xb024bde100000000, 0x2a2464b000000000, + 0x5c24d38000000000, 0xcb211b4d00000000, 0xbd21ac7d00000000, + 0x2721752c00000000, 0x5121c21c00000000, 0x1320c78f00000000, + 0x652070bf00000000, 0xff20a9ee00000000, 0x89201ede00000000, + 0x7822a07800000000, 0x0e22174800000000, 0x9422ce1900000000, + 0xe222792900000000, 0xa0237cba00000000, 0xd623cb8a00000000, + 0x4c2312db00000000, 0x3a23a5eb00000000, 0x612881f000000000, + 0x172836c000000000, 0x8d28ef9100000000, 0xfb2858a100000000, + 0xb9295d3200000000, 0xcf29ea0200000000, 0x5529335300000000, + 0x2329846300000000, 0xd22b3ac500000000, 0xa42b8df500000000, + 0x3e2b54a400000000, 0x482be39400000000, 0x0a2ae60700000000, + 0x7c2a513700000000, 0xe62a886600000000, 0x902a3f5600000000, + 0x072ff79b00000000, 0x712f40ab00000000, 0xeb2f99fa00000000, + 0x9d2f2eca00000000, 0xdf2e2b5900000000, 0xa92e9c6900000000, + 0x332e453800000000, 0x452ef20800000000, 0xb42c4cae00000000, + 0xc22cfb9e00000000, 0x582c22cf00000000, 0x2e2c95ff00000000, + 0x6c2d906c00000000, 0x1a2d275c00000000, 0x802dfe0d00000000, + 0xf62d493d00000000}, + {0x0000000000000000, 0x01c151ac00000000, 0x0182a0e800000000, + 0x0043f14400000000, 0x0104426100000000, 0x00c513cd00000000, + 0x0086e28900000000, 0x0147b32500000000, 0x020884c200000000, + 0x03c9d56e00000000, 0x038a242a00000000, 0x024b758600000000, + 0x030cc6a300000000, 0x02cd970f00000000, 0x028e664b00000000, + 0x034f37e700000000, 0x07100b3500000000, 0x06d15a9900000000, + 0x0692abdd00000000, 0x0753fa7100000000, 0x0614495400000000, + 0x07d518f800000000, 0x0796e9bc00000000, 0x0657b81000000000, + 0x05188ff700000000, 0x04d9de5b00000000, 0x049a2f1f00000000, + 0x055b7eb300000000, 0x041ccd9600000000, 0x05dd9c3a00000000, + 0x059e6d7e00000000, 0x045f3cd200000000, 0x0e20166a00000000, + 0x0fe147c600000000, 0x0fa2b68200000000, 0x0e63e72e00000000, + 0x0f24540b00000000, 0x0ee505a700000000, 0x0ea6f4e300000000, + 0x0f67a54f00000000, 0x0c2892a800000000, 0x0de9c30400000000, + 0x0daa324000000000, 0x0c6b63ec00000000, 0x0d2cd0c900000000, + 0x0ced816500000000, 0x0cae702100000000, 0x0d6f218d00000000, + 0x09301d5f00000000, 0x08f14cf300000000, 0x08b2bdb700000000, + 0x0973ec1b00000000, 0x08345f3e00000000, 0x09f50e9200000000, + 0x09b6ffd600000000, 0x0877ae7a00000000, 0x0b38999d00000000, + 0x0af9c83100000000, 0x0aba397500000000, 0x0b7b68d900000000, + 0x0a3cdbfc00000000, 0x0bfd8a5000000000, 0x0bbe7b1400000000, + 0x0a7f2ab800000000, 0x1c402cd400000000, 0x1d817d7800000000, + 0x1dc28c3c00000000, 0x1c03dd9000000000, 0x1d446eb500000000, + 0x1c853f1900000000, 0x1cc6ce5d00000000, 0x1d079ff100000000, + 0x1e48a81600000000, 0x1f89f9ba00000000, 0x1fca08fe00000000, + 0x1e0b595200000000, 0x1f4cea7700000000, 0x1e8dbbdb00000000, + 0x1ece4a9f00000000, 0x1f0f1b3300000000, 0x1b5027e100000000, + 0x1a91764d00000000, 0x1ad2870900000000, 0x1b13d6a500000000, + 0x1a54658000000000, 0x1b95342c00000000, 0x1bd6c56800000000, + 0x1a1794c400000000, 0x1958a32300000000, 0x1899f28f00000000, + 0x18da03cb00000000, 0x191b526700000000, 0x185ce14200000000, + 0x199db0ee00000000, 0x19de41aa00000000, 0x181f100600000000, + 0x12603abe00000000, 0x13a16b1200000000, 0x13e29a5600000000, + 0x1223cbfa00000000, 0x136478df00000000, 0x12a5297300000000, + 0x12e6d83700000000, 0x1327899b00000000, 0x1068be7c00000000, + 0x11a9efd000000000, 0x11ea1e9400000000, 0x102b4f3800000000, + 0x116cfc1d00000000, 0x10adadb100000000, 0x10ee5cf500000000, + 0x112f0d5900000000, 0x1570318b00000000, 0x14b1602700000000, + 0x14f2916300000000, 0x1533c0cf00000000, 0x147473ea00000000, + 0x15b5224600000000, 0x15f6d30200000000, 0x143782ae00000000, + 0x1778b54900000000, 0x16b9e4e500000000, 0x16fa15a100000000, + 0x173b440d00000000, 0x167cf72800000000, 0x17bda68400000000, + 0x17fe57c000000000, 0x163f066c00000000, 0x3b805b1800000000, + 0x3a410ab400000000, 0x3a02fbf000000000, 0x3bc3aa5c00000000, + 0x3a84197900000000, 0x3b4548d500000000, 0x3b06b99100000000, + 0x3ac7e83d00000000, 0x3988dfda00000000, 0x38498e7600000000, + 0x380a7f3200000000, 0x39cb2e9e00000000, 0x388c9dbb00000000, + 0x394dcc1700000000, 0x390e3d5300000000, 0x38cf6cff00000000, + 0x3c90502d00000000, 0x3d51018100000000, 0x3d12f0c500000000, + 0x3cd3a16900000000, 0x3d94124c00000000, 0x3c5543e000000000, + 0x3c16b2a400000000, 0x3dd7e30800000000, 0x3e98d4ef00000000, + 0x3f59854300000000, 0x3f1a740700000000, 0x3edb25ab00000000, + 0x3f9c968e00000000, 0x3e5dc72200000000, 0x3e1e366600000000, + 0x3fdf67ca00000000, 0x35a04d7200000000, 0x34611cde00000000, + 0x3422ed9a00000000, 0x35e3bc3600000000, 0x34a40f1300000000, + 0x35655ebf00000000, 0x3526affb00000000, 0x34e7fe5700000000, + 0x37a8c9b000000000, 0x3669981c00000000, 0x362a695800000000, + 0x37eb38f400000000, 0x36ac8bd100000000, 0x376dda7d00000000, + 0x372e2b3900000000, 0x36ef7a9500000000, 0x32b0464700000000, + 0x337117eb00000000, 0x3332e6af00000000, 0x32f3b70300000000, + 0x33b4042600000000, 0x3275558a00000000, 0x3236a4ce00000000, + 0x33f7f56200000000, 0x30b8c28500000000, 0x3179932900000000, + 0x313a626d00000000, 0x30fb33c100000000, 0x31bc80e400000000, + 0x307dd14800000000, 0x303e200c00000000, 0x31ff71a000000000, + 0x27c077cc00000000, 0x2601266000000000, 0x2642d72400000000, + 0x2783868800000000, 0x26c435ad00000000, 0x2705640100000000, + 0x2746954500000000, 0x2687c4e900000000, 0x25c8f30e00000000, + 0x2409a2a200000000, 0x244a53e600000000, 0x258b024a00000000, + 0x24ccb16f00000000, 0x250de0c300000000, 0x254e118700000000, + 0x248f402b00000000, 0x20d07cf900000000, 0x21112d5500000000, + 0x2152dc1100000000, 0x20938dbd00000000, 0x21d43e9800000000, + 0x20156f3400000000, 0x20569e7000000000, 0x2197cfdc00000000, + 0x22d8f83b00000000, 0x2319a99700000000, 0x235a58d300000000, + 0x229b097f00000000, 0x23dcba5a00000000, 0x221debf600000000, + 0x225e1ab200000000, 0x239f4b1e00000000, 0x29e061a600000000, + 0x2821300a00000000, 0x2862c14e00000000, 0x29a390e200000000, + 0x28e423c700000000, 0x2925726b00000000, 0x2966832f00000000, + 0x28a7d28300000000, 0x2be8e56400000000, 0x2a29b4c800000000, + 0x2a6a458c00000000, 0x2bab142000000000, 0x2aeca70500000000, + 0x2b2df6a900000000, 0x2b6e07ed00000000, 0x2aaf564100000000, + 0x2ef06a9300000000, 0x2f313b3f00000000, 0x2f72ca7b00000000, + 0x2eb39bd700000000, 0x2ff428f200000000, 0x2e35795e00000000, + 0x2e76881a00000000, 0x2fb7d9b600000000, 0x2cf8ee5100000000, + 0x2d39bffd00000000, 0x2d7a4eb900000000, 0x2cbb1f1500000000, + 0x2dfcac3000000000, 0x2c3dfd9c00000000, 0x2c7e0cd800000000, + 0x2dbf5d7400000000}, + {0x0000000000000000, 0xc0503d9000000000, 0x83a1799000000000, + 0x43f1440000000000, 0x0543f09000000000, 0xc513cd0000000000, + 0x86e2890000000000, 0x46b2b49000000000, 0x0986e39100000000, + 0xc9d6de0100000000, 0x8a279a0100000000, 0x4a77a79100000000, + 0x0cc5130100000000, 0xcc952e9100000000, 0x8f646a9100000000, + 0x4f34570100000000, 0x110cc49300000000, 0xd15cf90300000000, + 0x92adbd0300000000, 0x52fd809300000000, 0x144f340300000000, + 0xd41f099300000000, 0x97ee4d9300000000, 0x57be700300000000, + 0x188a270200000000, 0xd8da1a9200000000, 0x9b2b5e9200000000, + 0x5b7b630200000000, 0x1dc9d79200000000, 0xdd99ea0200000000, + 0x9e68ae0200000000, 0x5e38939200000000, 0x21188b9700000000, + 0xe148b60700000000, 0xa2b9f20700000000, 0x62e9cf9700000000, + 0x245b7b0700000000, 0xe40b469700000000, 0xa7fa029700000000, + 0x67aa3f0700000000, 0x289e680600000000, 0xe8ce559600000000, + 0xab3f119600000000, 0x6b6f2c0600000000, 0x2ddd989600000000, + 0xed8da50600000000, 0xae7ce10600000000, 0x6e2cdc9600000000, + 0x30144f0400000000, 0xf044729400000000, 0xb3b5369400000000, + 0x73e50b0400000000, 0x3557bf9400000000, 0xf507820400000000, + 0xb6f6c60400000000, 0x76a6fb9400000000, 0x3992ac9500000000, + 0xf9c2910500000000, 0xba33d50500000000, 0x7a63e89500000000, + 0x3cd15c0500000000, 0xfc81619500000000, 0xbf70259500000000, + 0x7f20180500000000, 0x4130159f00000000, 0x8160280f00000000, + 0xc2916c0f00000000, 0x02c1519f00000000, 0x4473e50f00000000, + 0x8423d89f00000000, 0xc7d29c9f00000000, 0x0782a10f00000000, + 0x48b6f60e00000000, 0x88e6cb9e00000000, 0xcb178f9e00000000, + 0x0b47b20e00000000, 0x4df5069e00000000, 0x8da53b0e00000000, + 0xce547f0e00000000, 0x0e04429e00000000, 0x503cd10c00000000, + 0x906cec9c00000000, 0xd39da89c00000000, 0x13cd950c00000000, + 0x557f219c00000000, 0x952f1c0c00000000, 0xd6de580c00000000, + 0x168e659c00000000, 0x59ba329d00000000, 0x99ea0f0d00000000, + 0xda1b4b0d00000000, 0x1a4b769d00000000, 0x5cf9c20d00000000, + 0x9ca9ff9d00000000, 0xdf58bb9d00000000, 0x1f08860d00000000, + 0x60289e0800000000, 0xa078a39800000000, 0xe389e79800000000, + 0x23d9da0800000000, 0x656b6e9800000000, 0xa53b530800000000, + 0xe6ca170800000000, 0x269a2a9800000000, 0x69ae7d9900000000, + 0xa9fe400900000000, 0xea0f040900000000, 0x2a5f399900000000, + 0x6ced8d0900000000, 0xacbdb09900000000, 0xef4cf49900000000, + 0x2f1cc90900000000, 0x71245a9b00000000, 0xb174670b00000000, + 0xf285230b00000000, 0x32d51e9b00000000, 0x7467aa0b00000000, + 0xb437979b00000000, 0xf7c6d39b00000000, 0x3796ee0b00000000, + 0x78a2b90a00000000, 0xb8f2849a00000000, 0xfb03c09a00000000, + 0x3b53fd0a00000000, 0x7de1499a00000000, 0xbdb1740a00000000, + 0xfe40300a00000000, 0x3e100d9a00000000, 0x8160298e00000000, + 0x4130141e00000000, 0x02c1501e00000000, 0xc2916d8e00000000, + 0x8423d91e00000000, 0x4473e48e00000000, 0x0782a08e00000000, + 0xc7d29d1e00000000, 0x88e6ca1f00000000, 0x48b6f78f00000000, + 0x0b47b38f00000000, 0xcb178e1f00000000, 0x8da53a8f00000000, + 0x4df5071f00000000, 0x0e04431f00000000, 0xce547e8f00000000, + 0x906ced1d00000000, 0x503cd08d00000000, 0x13cd948d00000000, + 0xd39da91d00000000, 0x952f1d8d00000000, 0x557f201d00000000, + 0x168e641d00000000, 0xd6de598d00000000, 0x99ea0e8c00000000, + 0x59ba331c00000000, 0x1a4b771c00000000, 0xda1b4a8c00000000, + 0x9ca9fe1c00000000, 0x5cf9c38c00000000, 0x1f08878c00000000, + 0xdf58ba1c00000000, 0xa078a21900000000, 0x60289f8900000000, + 0x23d9db8900000000, 0xe389e61900000000, 0xa53b528900000000, + 0x656b6f1900000000, 0x269a2b1900000000, 0xe6ca168900000000, + 0xa9fe418800000000, 0x69ae7c1800000000, 0x2a5f381800000000, + 0xea0f058800000000, 0xacbdb11800000000, 0x6ced8c8800000000, + 0x2f1cc88800000000, 0xef4cf51800000000, 0xb174668a00000000, + 0x71245b1a00000000, 0x32d51f1a00000000, 0xf285228a00000000, + 0xb437961a00000000, 0x7467ab8a00000000, 0x3796ef8a00000000, + 0xf7c6d21a00000000, 0xb8f2851b00000000, 0x78a2b88b00000000, + 0x3b53fc8b00000000, 0xfb03c11b00000000, 0xbdb1758b00000000, + 0x7de1481b00000000, 0x3e100c1b00000000, 0xfe40318b00000000, + 0xc0503c1100000000, 0x0000018100000000, 0x43f1458100000000, + 0x83a1781100000000, 0xc513cc8100000000, 0x0543f11100000000, + 0x46b2b51100000000, 0x86e2888100000000, 0xc9d6df8000000000, + 0x0986e21000000000, 0x4a77a61000000000, 0x8a279b8000000000, + 0xcc952f1000000000, 0x0cc5128000000000, 0x4f34568000000000, + 0x8f646b1000000000, 0xd15cf88200000000, 0x110cc51200000000, + 0x52fd811200000000, 0x92adbc8200000000, 0xd41f081200000000, + 0x144f358200000000, 0x57be718200000000, 0x97ee4c1200000000, + 0xd8da1b1300000000, 0x188a268300000000, 0x5b7b628300000000, + 0x9b2b5f1300000000, 0xdd99eb8300000000, 0x1dc9d61300000000, + 0x5e38921300000000, 0x9e68af8300000000, 0xe148b78600000000, + 0x21188a1600000000, 0x62e9ce1600000000, 0xa2b9f38600000000, + 0xe40b471600000000, 0x245b7a8600000000, 0x67aa3e8600000000, + 0xa7fa031600000000, 0xe8ce541700000000, 0x289e698700000000, + 0x6b6f2d8700000000, 0xab3f101700000000, 0xed8da48700000000, + 0x2ddd991700000000, 0x6e2cdd1700000000, 0xae7ce08700000000, + 0xf044731500000000, 0x30144e8500000000, 0x73e50a8500000000, + 0xb3b5371500000000, 0xf507838500000000, 0x3557be1500000000, + 0x76a6fa1500000000, 0xb6f6c78500000000, 0xf9c2908400000000, + 0x3992ad1400000000, 0x7a63e91400000000, 0xba33d48400000000, + 0xfc81601400000000, 0x3cd15d8400000000, 0x7f20198400000000, + 0xbf70241400000000}, + {0x0000000000000000, 0x50fd906c00000000, 0xa0fa21d900000000, + 0xf007b1b500000000, 0x43f5400200000000, 0x1308d06e00000000, + 0xe30f61db00000000, 0xb3f2f1b700000000, 0x86ea810400000000, + 0xd617116800000000, 0x2610a0dd00000000, 0x76ed30b100000000, + 0xc51fc10600000000, 0x95e2516a00000000, 0x65e5e0df00000000, + 0x351870b300000000, 0x0cd5030900000000, 0x5c28936500000000, + 0xac2f22d000000000, 0xfcd2b2bc00000000, 0x4f20430b00000000, + 0x1fddd36700000000, 0xefda62d200000000, 0xbf27f2be00000000, + 0x8a3f820d00000000, 0xdac2126100000000, 0x2ac5a3d400000000, + 0x7a3833b800000000, 0xc9cac20f00000000, 0x9937526300000000, + 0x6930e3d600000000, 0x39cd73ba00000000, 0x18aa071200000000, + 0x4857977e00000000, 0xb85026cb00000000, 0xe8adb6a700000000, + 0x5b5f471000000000, 0x0ba2d77c00000000, 0xfba566c900000000, + 0xab58f6a500000000, 0x9e40861600000000, 0xcebd167a00000000, + 0x3ebaa7cf00000000, 0x6e4737a300000000, 0xddb5c61400000000, + 0x8d48567800000000, 0x7d4fe7cd00000000, 0x2db277a100000000, + 0x147f041b00000000, 0x4482947700000000, 0xb48525c200000000, + 0xe478b5ae00000000, 0x578a441900000000, 0x0777d47500000000, + 0xf77065c000000000, 0xa78df5ac00000000, 0x9295851f00000000, + 0xc268157300000000, 0x326fa4c600000000, 0x629234aa00000000, + 0xd160c51d00000000, 0x819d557100000000, 0x719ae4c400000000, + 0x216774a800000000, 0x30540f2400000000, 0x60a99f4800000000, + 0x90ae2efd00000000, 0xc053be9100000000, 0x73a14f2600000000, + 0x235cdf4a00000000, 0xd35b6eff00000000, 0x83a6fe9300000000, + 0xb6be8e2000000000, 0xe6431e4c00000000, 0x1644aff900000000, + 0x46b93f9500000000, 0xf54bce2200000000, 0xa5b65e4e00000000, + 0x55b1effb00000000, 0x054c7f9700000000, 0x3c810c2d00000000, + 0x6c7c9c4100000000, 0x9c7b2df400000000, 0xcc86bd9800000000, + 0x7f744c2f00000000, 0x2f89dc4300000000, 0xdf8e6df600000000, + 0x8f73fd9a00000000, 0xba6b8d2900000000, 0xea961d4500000000, + 0x1a91acf000000000, 0x4a6c3c9c00000000, 0xf99ecd2b00000000, + 0xa9635d4700000000, 0x5964ecf200000000, 0x09997c9e00000000, + 0x28fe083600000000, 0x7803985a00000000, 0x880429ef00000000, + 0xd8f9b98300000000, 0x6b0b483400000000, 0x3bf6d85800000000, + 0xcbf169ed00000000, 0x9b0cf98100000000, 0xae14893200000000, + 0xfee9195e00000000, 0x0eeea8eb00000000, 0x5e13388700000000, + 0xede1c93000000000, 0xbd1c595c00000000, 0x4d1be8e900000000, + 0x1de6788500000000, 0x242b0b3f00000000, 0x74d69b5300000000, + 0x84d12ae600000000, 0xd42cba8a00000000, 0x67de4b3d00000000, + 0x3723db5100000000, 0xc7246ae400000000, 0x97d9fa8800000000, + 0xa2c18a3b00000000, 0xf23c1a5700000000, 0x023babe200000000, + 0x52c63b8e00000000, 0xe134ca3900000000, 0xb1c95a5500000000, + 0x41ceebe000000000, 0x11337b8c00000000, 0x60a81e4800000000, + 0x30558e2400000000, 0xc0523f9100000000, 0x90afaffd00000000, + 0x235d5e4a00000000, 0x73a0ce2600000000, 0x83a77f9300000000, + 0xd35aefff00000000, 0xe6429f4c00000000, 0xb6bf0f2000000000, + 0x46b8be9500000000, 0x16452ef900000000, 0xa5b7df4e00000000, + 0xf54a4f2200000000, 0x054dfe9700000000, 0x55b06efb00000000, + 0x6c7d1d4100000000, 0x3c808d2d00000000, 0xcc873c9800000000, + 0x9c7aacf400000000, 0x2f885d4300000000, 0x7f75cd2f00000000, + 0x8f727c9a00000000, 0xdf8fecf600000000, 0xea979c4500000000, + 0xba6a0c2900000000, 0x4a6dbd9c00000000, 0x1a902df000000000, + 0xa962dc4700000000, 0xf99f4c2b00000000, 0x0998fd9e00000000, + 0x59656df200000000, 0x7802195a00000000, 0x28ff893600000000, + 0xd8f8388300000000, 0x8805a8ef00000000, 0x3bf7595800000000, + 0x6b0ac93400000000, 0x9b0d788100000000, 0xcbf0e8ed00000000, + 0xfee8985e00000000, 0xae15083200000000, 0x5e12b98700000000, + 0x0eef29eb00000000, 0xbd1dd85c00000000, 0xede0483000000000, + 0x1de7f98500000000, 0x4d1a69e900000000, 0x74d71a5300000000, + 0x242a8a3f00000000, 0xd42d3b8a00000000, 0x84d0abe600000000, + 0x37225a5100000000, 0x67dfca3d00000000, 0x97d87b8800000000, + 0xc725ebe400000000, 0xf23d9b5700000000, 0xa2c00b3b00000000, + 0x52c7ba8e00000000, 0x023a2ae200000000, 0xb1c8db5500000000, + 0xe1354b3900000000, 0x1132fa8c00000000, 0x41cf6ae000000000, + 0x50fc116c00000000, 0x0001810000000000, 0xf00630b500000000, + 0xa0fba0d900000000, 0x1309516e00000000, 0x43f4c10200000000, + 0xb3f370b700000000, 0xe30ee0db00000000, 0xd616906800000000, + 0x86eb000400000000, 0x76ecb1b100000000, 0x261121dd00000000, + 0x95e3d06a00000000, 0xc51e400600000000, 0x3519f1b300000000, + 0x65e461df00000000, 0x5c29126500000000, 0x0cd4820900000000, + 0xfcd333bc00000000, 0xac2ea3d000000000, 0x1fdc526700000000, + 0x4f21c20b00000000, 0xbf2673be00000000, 0xefdbe3d200000000, + 0xdac3936100000000, 0x8a3e030d00000000, 0x7a39b2b800000000, + 0x2ac422d400000000, 0x9936d36300000000, 0xc9cb430f00000000, + 0x39ccf2ba00000000, 0x693162d600000000, 0x4856167e00000000, + 0x18ab861200000000, 0xe8ac37a700000000, 0xb851a7cb00000000, + 0x0ba3567c00000000, 0x5b5ec61000000000, 0xab5977a500000000, + 0xfba4e7c900000000, 0xcebc977a00000000, 0x9e41071600000000, + 0x6e46b6a300000000, 0x3ebb26cf00000000, 0x8d49d77800000000, + 0xddb4471400000000, 0x2db3f6a100000000, 0x7d4e66cd00000000, + 0x4483157700000000, 0x147e851b00000000, 0xe47934ae00000000, + 0xb484a4c200000000, 0x0776557500000000, 0x578bc51900000000, + 0xa78c74ac00000000, 0xf771e4c000000000, 0xc269947300000000, + 0x9294041f00000000, 0x6293b5aa00000000, 0x326e25c600000000, + 0x819cd47100000000, 0xd161441d00000000, 0x2166f5a800000000, + 0x719b65c400000000}, + {0x0000000000000000, 0xfdc06c2d00000000, 0xfa81d95a00000000, + 0x0741b57700000000, 0xf403b3b500000000, 0x09c3df9800000000, + 0x0e826aef00000000, 0xf34206c200000000, 0xeb0765db00000000, + 0x16c709f600000000, 0x1186bc8100000000, 0xec46d0ac00000000, + 0x1f04d66e00000000, 0xe2c4ba4300000000, 0xe5850f3400000000, + 0x1845631900000000, 0xd50fc90600000000, 0x28cfa52b00000000, + 0x2f8e105c00000000, 0xd24e7c7100000000, 0x210c7ab300000000, + 0xdccc169e00000000, 0xdb8da3e900000000, 0x264dcfc400000000, + 0x3e08acdd00000000, 0xc3c8c0f000000000, 0xc489758700000000, + 0x394919aa00000000, 0xca0b1f6800000000, 0x37cb734500000000, + 0x308ac63200000000, 0xcd4aaa1f00000000, 0xaa1f920d00000000, + 0x57dffe2000000000, 0x509e4b5700000000, 0xad5e277a00000000, + 0x5e1c21b800000000, 0xa3dc4d9500000000, 0xa49df8e200000000, + 0x595d94cf00000000, 0x4118f7d600000000, 0xbcd89bfb00000000, + 0xbb992e8c00000000, 0x465942a100000000, 0xb51b446300000000, + 0x48db284e00000000, 0x4f9a9d3900000000, 0xb25af11400000000, + 0x7f105b0b00000000, 0x82d0372600000000, 0x8591825100000000, + 0x7851ee7c00000000, 0x8b13e8be00000000, 0x76d3849300000000, + 0x719231e400000000, 0x8c525dc900000000, 0x94173ed000000000, + 0x69d752fd00000000, 0x6e96e78a00000000, 0x93568ba700000000, + 0x60148d6500000000, 0x9dd4e14800000000, 0x9a95543f00000000, + 0x6755381200000000, 0x543f241b00000000, 0xa9ff483600000000, + 0xaebefd4100000000, 0x537e916c00000000, 0xa03c97ae00000000, + 0x5dfcfb8300000000, 0x5abd4ef400000000, 0xa77d22d900000000, + 0xbf3841c000000000, 0x42f82ded00000000, 0x45b9989a00000000, + 0xb879f4b700000000, 0x4b3bf27500000000, 0xb6fb9e5800000000, + 0xb1ba2b2f00000000, 0x4c7a470200000000, 0x8130ed1d00000000, + 0x7cf0813000000000, 0x7bb1344700000000, 0x8671586a00000000, + 0x75335ea800000000, 0x88f3328500000000, 0x8fb287f200000000, + 0x7272ebdf00000000, 0x6a3788c600000000, 0x97f7e4eb00000000, + 0x90b6519c00000000, 0x6d763db100000000, 0x9e343b7300000000, + 0x63f4575e00000000, 0x64b5e22900000000, 0x99758e0400000000, + 0xfe20b61600000000, 0x03e0da3b00000000, 0x04a16f4c00000000, + 0xf961036100000000, 0x0a2305a300000000, 0xf7e3698e00000000, + 0xf0a2dcf900000000, 0x0d62b0d400000000, 0x1527d3cd00000000, + 0xe8e7bfe000000000, 0xefa60a9700000000, 0x126666ba00000000, + 0xe124607800000000, 0x1ce40c5500000000, 0x1ba5b92200000000, + 0xe665d50f00000000, 0x2b2f7f1000000000, 0xd6ef133d00000000, + 0xd1aea64a00000000, 0x2c6eca6700000000, 0xdf2ccca500000000, + 0x22eca08800000000, 0x25ad15ff00000000, 0xd86d79d200000000, + 0xc0281acb00000000, 0x3de876e600000000, 0x3aa9c39100000000, + 0xc769afbc00000000, 0x342ba97e00000000, 0xc9ebc55300000000, + 0xceaa702400000000, 0x336a1c0900000000, 0xa87e483600000000, + 0x55be241b00000000, 0x52ff916c00000000, 0xaf3ffd4100000000, + 0x5c7dfb8300000000, 0xa1bd97ae00000000, 0xa6fc22d900000000, + 0x5b3c4ef400000000, 0x43792ded00000000, 0xbeb941c000000000, + 0xb9f8f4b700000000, 0x4438989a00000000, 0xb77a9e5800000000, + 0x4abaf27500000000, 0x4dfb470200000000, 0xb03b2b2f00000000, + 0x7d71813000000000, 0x80b1ed1d00000000, 0x87f0586a00000000, + 0x7a30344700000000, 0x8972328500000000, 0x74b25ea800000000, + 0x73f3ebdf00000000, 0x8e3387f200000000, 0x9676e4eb00000000, + 0x6bb688c600000000, 0x6cf73db100000000, 0x9137519c00000000, + 0x6275575e00000000, 0x9fb53b7300000000, 0x98f48e0400000000, + 0x6534e22900000000, 0x0261da3b00000000, 0xffa1b61600000000, + 0xf8e0036100000000, 0x05206f4c00000000, 0xf662698e00000000, + 0x0ba205a300000000, 0x0ce3b0d400000000, 0xf123dcf900000000, + 0xe966bfe000000000, 0x14a6d3cd00000000, 0x13e766ba00000000, + 0xee270a9700000000, 0x1d650c5500000000, 0xe0a5607800000000, + 0xe7e4d50f00000000, 0x1a24b92200000000, 0xd76e133d00000000, + 0x2aae7f1000000000, 0x2defca6700000000, 0xd02fa64a00000000, + 0x236da08800000000, 0xdeadcca500000000, 0xd9ec79d200000000, + 0x242c15ff00000000, 0x3c6976e600000000, 0xc1a91acb00000000, + 0xc6e8afbc00000000, 0x3b28c39100000000, 0xc86ac55300000000, + 0x35aaa97e00000000, 0x32eb1c0900000000, 0xcf2b702400000000, + 0xfc416c2d00000000, 0x0181000000000000, 0x06c0b57700000000, + 0xfb00d95a00000000, 0x0842df9800000000, 0xf582b3b500000000, + 0xf2c306c200000000, 0x0f036aef00000000, 0x174609f600000000, + 0xea8665db00000000, 0xedc7d0ac00000000, 0x1007bc8100000000, + 0xe345ba4300000000, 0x1e85d66e00000000, 0x19c4631900000000, + 0xe4040f3400000000, 0x294ea52b00000000, 0xd48ec90600000000, + 0xd3cf7c7100000000, 0x2e0f105c00000000, 0xdd4d169e00000000, + 0x208d7ab300000000, 0x27cccfc400000000, 0xda0ca3e900000000, + 0xc249c0f000000000, 0x3f89acdd00000000, 0x38c819aa00000000, + 0xc508758700000000, 0x364a734500000000, 0xcb8a1f6800000000, + 0xcccbaa1f00000000, 0x310bc63200000000, 0x565efe2000000000, + 0xab9e920d00000000, 0xacdf277a00000000, 0x511f4b5700000000, + 0xa25d4d9500000000, 0x5f9d21b800000000, 0x58dc94cf00000000, + 0xa51cf8e200000000, 0xbd599bfb00000000, 0x4099f7d600000000, + 0x47d842a100000000, 0xba182e8c00000000, 0x495a284e00000000, + 0xb49a446300000000, 0xb3dbf11400000000, 0x4e1b9d3900000000, + 0x8351372600000000, 0x7e915b0b00000000, 0x79d0ee7c00000000, + 0x8410825100000000, 0x7752849300000000, 0x8a92e8be00000000, + 0x8dd35dc900000000, 0x701331e400000000, 0x685652fd00000000, + 0x95963ed000000000, 0x92d78ba700000000, 0x6f17e78a00000000, + 0x9c55e14800000000, 0x61958d6500000000, 0x66d4381200000000, + 0x9b14543f00000000}, + {0x0000000000000000, 0xc1917ce100000000, 0x8123fa7200000000, + 0x40b2869300000000, 0x0247f4e500000000, 0xc3d6880400000000, + 0x83640e9700000000, 0x42f5727600000000, 0x078eeb7b00000000, + 0xc61f979a00000000, 0x86ad110900000000, 0x473c6de800000000, + 0x05c91f9e00000000, 0xc458637f00000000, 0x84eae5ec00000000, + 0x457b990d00000000, 0x0e1cd7f700000000, 0xcf8dab1600000000, + 0x8f3f2d8500000000, 0x4eae516400000000, 0x0c5b231200000000, + 0xcdca5ff300000000, 0x8d78d96000000000, 0x4ce9a58100000000, + 0x09923c8c00000000, 0xc803406d00000000, 0x88b1c6fe00000000, + 0x4920ba1f00000000, 0x0bd5c86900000000, 0xca44b48800000000, + 0x8af6321b00000000, 0x4b674efa00000000, 0x1f38ad5f00000000, + 0xdea9d1be00000000, 0x9e1b572d00000000, 0x5f8a2bcc00000000, + 0x1d7f59ba00000000, 0xdcee255b00000000, 0x9c5ca3c800000000, + 0x5dcddf2900000000, 0x18b6462400000000, 0xd9273ac500000000, + 0x9995bc5600000000, 0x5804c0b700000000, 0x1af1b2c100000000, + 0xdb60ce2000000000, 0x9bd248b300000000, 0x5a43345200000000, + 0x11247aa800000000, 0xd0b5064900000000, 0x900780da00000000, + 0x5196fc3b00000000, 0x13638e4d00000000, 0xd2f2f2ac00000000, + 0x9240743f00000000, 0x53d108de00000000, 0x16aa91d300000000, + 0xd73bed3200000000, 0x97896ba100000000, 0x5618174000000000, + 0x14ed653600000000, 0xd57c19d700000000, 0x95ce9f4400000000, + 0x545fe3a500000000, 0x3e705abf00000000, 0xffe1265e00000000, + 0xbf53a0cd00000000, 0x7ec2dc2c00000000, 0x3c37ae5a00000000, + 0xfda6d2bb00000000, 0xbd14542800000000, 0x7c8528c900000000, + 0x39feb1c400000000, 0xf86fcd2500000000, 0xb8dd4bb600000000, + 0x794c375700000000, 0x3bb9452100000000, 0xfa2839c000000000, + 0xba9abf5300000000, 0x7b0bc3b200000000, 0x306c8d4800000000, + 0xf1fdf1a900000000, 0xb14f773a00000000, 0x70de0bdb00000000, + 0x322b79ad00000000, 0xf3ba054c00000000, 0xb30883df00000000, + 0x7299ff3e00000000, 0x37e2663300000000, 0xf6731ad200000000, + 0xb6c19c4100000000, 0x7750e0a000000000, 0x35a592d600000000, + 0xf434ee3700000000, 0xb48668a400000000, 0x7517144500000000, + 0x2148f7e000000000, 0xe0d98b0100000000, 0xa06b0d9200000000, + 0x61fa717300000000, 0x230f030500000000, 0xe29e7fe400000000, + 0xa22cf97700000000, 0x63bd859600000000, 0x26c61c9b00000000, + 0xe757607a00000000, 0xa7e5e6e900000000, 0x66749a0800000000, + 0x2481e87e00000000, 0xe510949f00000000, 0xa5a2120c00000000, + 0x64336eed00000000, 0x2f54201700000000, 0xeec55cf600000000, + 0xae77da6500000000, 0x6fe6a68400000000, 0x2d13d4f200000000, + 0xec82a81300000000, 0xac302e8000000000, 0x6da1526100000000, + 0x28dacb6c00000000, 0xe94bb78d00000000, 0xa9f9311e00000000, + 0x68684dff00000000, 0x2a9d3f8900000000, 0xeb0c436800000000, + 0xabbec5fb00000000, 0x6a2fb91a00000000, 0x7fe0b7ce00000000, + 0xbe71cb2f00000000, 0xfec34dbc00000000, 0x3f52315d00000000, + 0x7da7432b00000000, 0xbc363fca00000000, 0xfc84b95900000000, + 0x3d15c5b800000000, 0x786e5cb500000000, 0xb9ff205400000000, + 0xf94da6c700000000, 0x38dcda2600000000, 0x7a29a85000000000, + 0xbbb8d4b100000000, 0xfb0a522200000000, 0x3a9b2ec300000000, + 0x71fc603900000000, 0xb06d1cd800000000, 0xf0df9a4b00000000, + 0x314ee6aa00000000, 0x73bb94dc00000000, 0xb22ae83d00000000, + 0xf2986eae00000000, 0x3309124f00000000, 0x76728b4200000000, + 0xb7e3f7a300000000, 0xf751713000000000, 0x36c00dd100000000, + 0x74357fa700000000, 0xb5a4034600000000, 0xf51685d500000000, + 0x3487f93400000000, 0x60d81a9100000000, 0xa149667000000000, + 0xe1fbe0e300000000, 0x206a9c0200000000, 0x629fee7400000000, + 0xa30e929500000000, 0xe3bc140600000000, 0x222d68e700000000, + 0x6756f1ea00000000, 0xa6c78d0b00000000, 0xe6750b9800000000, + 0x27e4777900000000, 0x6511050f00000000, 0xa48079ee00000000, + 0xe432ff7d00000000, 0x25a3839c00000000, 0x6ec4cd6600000000, + 0xaf55b18700000000, 0xefe7371400000000, 0x2e764bf500000000, + 0x6c83398300000000, 0xad12456200000000, 0xeda0c3f100000000, + 0x2c31bf1000000000, 0x694a261d00000000, 0xa8db5afc00000000, + 0xe869dc6f00000000, 0x29f8a08e00000000, 0x6b0dd2f800000000, + 0xaa9cae1900000000, 0xea2e288a00000000, 0x2bbf546b00000000, + 0x4190ed7100000000, 0x8001919000000000, 0xc0b3170300000000, + 0x01226be200000000, 0x43d7199400000000, 0x8246657500000000, + 0xc2f4e3e600000000, 0x03659f0700000000, 0x461e060a00000000, + 0x878f7aeb00000000, 0xc73dfc7800000000, 0x06ac809900000000, + 0x4459f2ef00000000, 0x85c88e0e00000000, 0xc57a089d00000000, + 0x04eb747c00000000, 0x4f8c3a8600000000, 0x8e1d466700000000, + 0xceafc0f400000000, 0x0f3ebc1500000000, 0x4dcbce6300000000, + 0x8c5ab28200000000, 0xcce8341100000000, 0x0d7948f000000000, + 0x4802d1fd00000000, 0x8993ad1c00000000, 0xc9212b8f00000000, + 0x08b0576e00000000, 0x4a45251800000000, 0x8bd459f900000000, + 0xcb66df6a00000000, 0x0af7a38b00000000, 0x5ea8402e00000000, + 0x9f393ccf00000000, 0xdf8bba5c00000000, 0x1e1ac6bd00000000, + 0x5cefb4cb00000000, 0x9d7ec82a00000000, 0xddcc4eb900000000, + 0x1c5d325800000000, 0x5926ab5500000000, 0x98b7d7b400000000, + 0xd805512700000000, 0x19942dc600000000, 0x5b615fb000000000, + 0x9af0235100000000, 0xda42a5c200000000, 0x1bd3d92300000000, + 0x50b497d900000000, 0x9125eb3800000000, 0xd1976dab00000000, + 0x1006114a00000000, 0x52f3633c00000000, 0x93621fdd00000000, + 0xd3d0994e00000000, 0x1241e5af00000000, 0x573a7ca200000000, + 0x96ab004300000000, 0xd61986d000000000, 0x1788fa3100000000, + 0x557d884700000000, 0x94ecf4a600000000, 0xd45e723500000000, + 0x15cf0ed400000000}}; + +#else /* W == 4 */ + +static const crc_t crc_braid_table[][256] = { + {0x00000000, 0x47596181, 0x8eb2c302, 0xc9eba283, 0xad668607, + 0xea3fe786, 0x23d44505, 0x648d2484, 0xeace0c0d, 0xad976d8c, + 0x647ccf0f, 0x2325ae8e, 0x47a88a0a, 0x00f1eb8b, 0xc91a4908, + 0x8e432889, 0x659f1819, 0x22c67998, 0xeb2ddb1b, 0xac74ba9a, + 0xc8f99e1e, 0x8fa0ff9f, 0x464b5d1c, 0x01123c9d, 0x8f511414, + 0xc8087595, 0x01e3d716, 0x46bab697, 0x22379213, 0x656ef392, + 0xac855111, 0xebdc3090, 0xcb3e3032, 0x8c6751b3, 0x458cf330, + 0x02d592b1, 0x6658b635, 0x2101d7b4, 0xe8ea7537, 0xafb314b6, + 0x21f03c3f, 0x66a95dbe, 0xaf42ff3d, 0xe81b9ebc, 0x8c96ba38, + 0xcbcfdbb9, 0x0224793a, 0x457d18bb, 0xaea1282b, 0xe9f849aa, + 0x2013eb29, 0x674a8aa8, 0x03c7ae2c, 0x449ecfad, 0x8d756d2e, + 0xca2c0caf, 0x446f2426, 0x033645a7, 0xcadde724, 0x8d8486a5, + 0xe909a221, 0xae50c3a0, 0x67bb6123, 0x20e200a2, 0x267f6067, + 0x612601e6, 0xa8cda365, 0xef94c2e4, 0x8b19e660, 0xcc4087e1, + 0x05ab2562, 0x42f244e3, 0xccb16c6a, 0x8be80deb, 0x4203af68, + 0x055acee9, 0x61d7ea6d, 0x268e8bec, 0xef65296f, 0xa83c48ee, + 0x43e0787e, 0x04b919ff, 0xcd52bb7c, 0x8a0bdafd, 0xee86fe79, + 0xa9df9ff8, 0x60343d7b, 0x276d5cfa, 0xa92e7473, 0xee7715f2, + 0x279cb771, 0x60c5d6f0, 0x0448f274, 0x431193f5, 0x8afa3176, + 0xcda350f7, 0xed415055, 0xaa1831d4, 0x63f39357, 0x24aaf2d6, + 0x4027d652, 0x077eb7d3, 0xce951550, 0x89cc74d1, 0x078f5c58, + 0x40d63dd9, 0x893d9f5a, 0xce64fedb, 0xaae9da5f, 0xedb0bbde, + 0x245b195d, 0x630278dc, 0x88de484c, 0xcf8729cd, 0x066c8b4e, + 0x4135eacf, 0x25b8ce4b, 0x62e1afca, 0xab0a0d49, 0xec536cc8, + 0x62104441, 0x254925c0, 0xeca28743, 0xabfbe6c2, 0xcf76c246, + 0x882fa3c7, 0x41c40144, 0x069d60c5, 0x4cfec0ce, 0x0ba7a14f, + 0xc24c03cc, 0x8515624d, 0xe19846c9, 0xa6c12748, 0x6f2a85cb, + 0x2873e44a, 0xa630ccc3, 0xe169ad42, 0x28820fc1, 0x6fdb6e40, + 0x0b564ac4, 0x4c0f2b45, 0x85e489c6, 0xc2bde847, 0x2961d8d7, + 0x6e38b956, 0xa7d31bd5, 0xe08a7a54, 0x84075ed0, 0xc35e3f51, + 0x0ab59dd2, 0x4decfc53, 0xc3afd4da, 0x84f6b55b, 0x4d1d17d8, + 0x0a447659, 0x6ec952dd, 0x2990335c, 0xe07b91df, 0xa722f05e, + 0x87c0f0fc, 0xc099917d, 0x097233fe, 0x4e2b527f, 0x2aa676fb, + 0x6dff177a, 0xa414b5f9, 0xe34dd478, 0x6d0efcf1, 0x2a579d70, + 0xe3bc3ff3, 0xa4e55e72, 0xc0687af6, 0x87311b77, 0x4edab9f4, + 0x0983d875, 0xe25fe8e5, 0xa5068964, 0x6ced2be7, 0x2bb44a66, + 0x4f396ee2, 0x08600f63, 0xc18bade0, 0x86d2cc61, 0x0891e4e8, + 0x4fc88569, 0x862327ea, 0xc17a466b, 0xa5f762ef, 0xe2ae036e, + 0x2b45a1ed, 0x6c1cc06c, 0x6a81a0a9, 0x2dd8c128, 0xe43363ab, + 0xa36a022a, 0xc7e726ae, 0x80be472f, 0x4955e5ac, 0x0e0c842d, + 0x804faca4, 0xc716cd25, 0x0efd6fa6, 0x49a40e27, 0x2d292aa3, + 0x6a704b22, 0xa39be9a1, 0xe4c28820, 0x0f1eb8b0, 0x4847d931, + 0x81ac7bb2, 0xc6f51a33, 0xa2783eb7, 0xe5215f36, 0x2ccafdb5, + 0x6b939c34, 0xe5d0b4bd, 0xa289d53c, 0x6b6277bf, 0x2c3b163e, + 0x48b632ba, 0x0fef533b, 0xc604f1b8, 0x815d9039, 0xa1bf909b, + 0xe6e6f11a, 0x2f0d5399, 0x68543218, 0x0cd9169c, 0x4b80771d, + 0x826bd59e, 0xc532b41f, 0x4b719c96, 0x0c28fd17, 0xc5c35f94, + 0x829a3e15, 0xe6171a91, 0xa14e7b10, 0x68a5d993, 0x2ffcb812, + 0xc4208882, 0x8379e903, 0x4a924b80, 0x0dcb2a01, 0x69460e85, + 0x2e1f6f04, 0xe7f4cd87, 0xa0adac06, 0x2eee848f, 0x69b7e50e, + 0xa05c478d, 0xe705260c, 0x83880288, 0xc4d16309, 0x0d3ac18a, + 0x4a63a00b}, + {0x00000000, 0x99fd819c, 0x83f8033b, 0x1a0582a7, 0xb7f30675, + 0x2e0e87e9, 0x340b054e, 0xadf684d2, 0xdfe50ce9, 0x46188d75, + 0x5c1d0fd2, 0xc5e08e4e, 0x68160a9c, 0xf1eb8b00, 0xebee09a7, + 0x7213883b, 0x0fc919d1, 0x9634984d, 0x8c311aea, 0x15cc9b76, + 0xb83a1fa4, 0x21c79e38, 0x3bc21c9f, 0xa23f9d03, 0xd02c1538, + 0x49d194a4, 0x53d41603, 0xca29979f, 0x67df134d, 0xfe2292d1, + 0xe4271076, 0x7dda91ea, 0x1f9233a2, 0x866fb23e, 0x9c6a3099, + 0x0597b105, 0xa86135d7, 0x319cb44b, 0x2b9936ec, 0xb264b770, + 0xc0773f4b, 0x598abed7, 0x438f3c70, 0xda72bdec, 0x7784393e, + 0xee79b8a2, 0xf47c3a05, 0x6d81bb99, 0x105b2a73, 0x89a6abef, + 0x93a32948, 0x0a5ea8d4, 0xa7a82c06, 0x3e55ad9a, 0x24502f3d, + 0xbdadaea1, 0xcfbe269a, 0x5643a706, 0x4c4625a1, 0xd5bba43d, + 0x784d20ef, 0xe1b0a173, 0xfbb523d4, 0x6248a248, 0x3f246744, + 0xa6d9e6d8, 0xbcdc647f, 0x2521e5e3, 0x88d76131, 0x112ae0ad, + 0x0b2f620a, 0x92d2e396, 0xe0c16bad, 0x793cea31, 0x63396896, + 0xfac4e90a, 0x57326dd8, 0xcecfec44, 0xd4ca6ee3, 0x4d37ef7f, + 0x30ed7e95, 0xa910ff09, 0xb3157dae, 0x2ae8fc32, 0x871e78e0, + 0x1ee3f97c, 0x04e67bdb, 0x9d1bfa47, 0xef08727c, 0x76f5f3e0, + 0x6cf07147, 0xf50df0db, 0x58fb7409, 0xc106f595, 0xdb037732, + 0x42fef6ae, 0x20b654e6, 0xb94bd57a, 0xa34e57dd, 0x3ab3d641, + 0x97455293, 0x0eb8d30f, 0x14bd51a8, 0x8d40d034, 0xff53580f, + 0x66aed993, 0x7cab5b34, 0xe556daa8, 0x48a05e7a, 0xd15ddfe6, + 0xcb585d41, 0x52a5dcdd, 0x2f7f4d37, 0xb682ccab, 0xac874e0c, + 0x357acf90, 0x988c4b42, 0x0171cade, 0x1b744879, 0x8289c9e5, + 0xf09a41de, 0x6967c042, 0x736242e5, 0xea9fc379, 0x476947ab, + 0xde94c637, 0xc4914490, 0x5d6cc50c, 0x7e48ce88, 0xe7b54f14, + 0xfdb0cdb3, 0x644d4c2f, 0xc9bbc8fd, 0x50464961, 0x4a43cbc6, + 0xd3be4a5a, 0xa1adc261, 0x385043fd, 0x2255c15a, 0xbba840c6, + 0x165ec414, 0x8fa34588, 0x95a6c72f, 0x0c5b46b3, 0x7181d759, + 0xe87c56c5, 0xf279d462, 0x6b8455fe, 0xc672d12c, 0x5f8f50b0, + 0x458ad217, 0xdc77538b, 0xae64dbb0, 0x37995a2c, 0x2d9cd88b, + 0xb4615917, 0x1997ddc5, 0x806a5c59, 0x9a6fdefe, 0x03925f62, + 0x61dafd2a, 0xf8277cb6, 0xe222fe11, 0x7bdf7f8d, 0xd629fb5f, + 0x4fd47ac3, 0x55d1f864, 0xcc2c79f8, 0xbe3ff1c3, 0x27c2705f, + 0x3dc7f2f8, 0xa43a7364, 0x09ccf7b6, 0x9031762a, 0x8a34f48d, + 0x13c97511, 0x6e13e4fb, 0xf7ee6567, 0xedebe7c0, 0x7416665c, + 0xd9e0e28e, 0x401d6312, 0x5a18e1b5, 0xc3e56029, 0xb1f6e812, + 0x280b698e, 0x320eeb29, 0xabf36ab5, 0x0605ee67, 0x9ff86ffb, + 0x85fded5c, 0x1c006cc0, 0x416ca9cc, 0xd8912850, 0xc294aaf7, + 0x5b692b6b, 0xf69fafb9, 0x6f622e25, 0x7567ac82, 0xec9a2d1e, + 0x9e89a525, 0x077424b9, 0x1d71a61e, 0x848c2782, 0x297aa350, + 0xb08722cc, 0xaa82a06b, 0x337f21f7, 0x4ea5b01d, 0xd7583181, + 0xcd5db326, 0x54a032ba, 0xf956b668, 0x60ab37f4, 0x7aaeb553, + 0xe35334cf, 0x9140bcf4, 0x08bd3d68, 0x12b8bfcf, 0x8b453e53, + 0x26b3ba81, 0xbf4e3b1d, 0xa54bb9ba, 0x3cb63826, 0x5efe9a6e, + 0xc7031bf2, 0xdd069955, 0x44fb18c9, 0xe90d9c1b, 0x70f01d87, + 0x6af59f20, 0xf3081ebc, 0x811b9687, 0x18e6171b, 0x02e395bc, + 0x9b1e1420, 0x36e890f2, 0xaf15116e, 0xb51093c9, 0x2ced1255, + 0x513783bf, 0xc8ca0223, 0xd2cf8084, 0x4b320118, 0xe6c485ca, + 0x7f390456, 0x653c86f1, 0xfcc1076d, 0x8ed28f56, 0x172f0eca, + 0x0d2a8c6d, 0x94d70df1, 0x39218923, 0xa0dc08bf, 0xbad98a18, + 0x23240b84}, + {0x00000000, 0xfc919d10, 0x49203a23, 0xb5b1a733, 0x92407446, + 0x6ed1e956, 0xdb604e65, 0x27f1d375, 0x9483e88f, 0x6812759f, + 0xdda3d2ac, 0x21324fbc, 0x06c39cc9, 0xfa5201d9, 0x4fe3a6ea, + 0xb3723bfa, 0x9904d11d, 0x65954c0d, 0xd024eb3e, 0x2cb5762e, + 0x0b44a55b, 0xf7d5384b, 0x42649f78, 0xbef50268, 0x0d873992, + 0xf116a482, 0x44a703b1, 0xb8369ea1, 0x9fc74dd4, 0x6356d0c4, + 0xd6e777f7, 0x2a76eae7, 0x820aa239, 0x7e9b3f29, 0xcb2a981a, + 0x37bb050a, 0x104ad67f, 0xecdb4b6f, 0x596aec5c, 0xa5fb714c, + 0x16894ab6, 0xea18d7a6, 0x5fa97095, 0xa338ed85, 0x84c93ef0, + 0x7858a3e0, 0xcde904d3, 0x317899c3, 0x1b0e7324, 0xe79fee34, + 0x522e4907, 0xaebfd417, 0x894e0762, 0x75df9a72, 0xc06e3d41, + 0x3cffa051, 0x8f8d9bab, 0x731c06bb, 0xc6ada188, 0x3a3c3c98, + 0x1dcdefed, 0xe15c72fd, 0x54edd5ce, 0xa87c48de, 0xb4164471, + 0x4887d961, 0xfd367e52, 0x01a7e342, 0x26563037, 0xdac7ad27, + 0x6f760a14, 0x93e79704, 0x2095acfe, 0xdc0431ee, 0x69b596dd, + 0x95240bcd, 0xb2d5d8b8, 0x4e4445a8, 0xfbf5e29b, 0x07647f8b, + 0x2d12956c, 0xd183087c, 0x6432af4f, 0x98a3325f, 0xbf52e12a, + 0x43c37c3a, 0xf672db09, 0x0ae34619, 0xb9917de3, 0x4500e0f3, + 0xf0b147c0, 0x0c20dad0, 0x2bd109a5, 0xd74094b5, 0x62f13386, + 0x9e60ae96, 0x361ce648, 0xca8d7b58, 0x7f3cdc6b, 0x83ad417b, + 0xa45c920e, 0x58cd0f1e, 0xed7ca82d, 0x11ed353d, 0xa29f0ec7, + 0x5e0e93d7, 0xebbf34e4, 0x172ea9f4, 0x30df7a81, 0xcc4ee791, + 0x79ff40a2, 0x856eddb2, 0xaf183755, 0x5389aa45, 0xe6380d76, + 0x1aa99066, 0x3d584313, 0xc1c9de03, 0x74787930, 0x88e9e420, + 0x3b9bdfda, 0xc70a42ca, 0x72bbe5f9, 0x8e2a78e9, 0xa9dbab9c, + 0x554a368c, 0xe0fb91bf, 0x1c6a0caf, 0xd82f88e1, 0x24be15f1, + 0x910fb2c2, 0x6d9e2fd2, 0x4a6ffca7, 0xb6fe61b7, 0x034fc684, + 0xffde5b94, 0x4cac606e, 0xb03dfd7e, 0x058c5a4d, 0xf91dc75d, + 0xdeec1428, 0x227d8938, 0x97cc2e0b, 0x6b5db31b, 0x412b59fc, + 0xbdbac4ec, 0x080b63df, 0xf49afecf, 0xd36b2dba, 0x2ffab0aa, + 0x9a4b1799, 0x66da8a89, 0xd5a8b173, 0x29392c63, 0x9c888b50, + 0x60191640, 0x47e8c535, 0xbb795825, 0x0ec8ff16, 0xf2596206, + 0x5a252ad8, 0xa6b4b7c8, 0x130510fb, 0xef948deb, 0xc8655e9e, + 0x34f4c38e, 0x814564bd, 0x7dd4f9ad, 0xcea6c257, 0x32375f47, + 0x8786f874, 0x7b176564, 0x5ce6b611, 0xa0772b01, 0x15c68c32, + 0xe9571122, 0xc321fbc5, 0x3fb066d5, 0x8a01c1e6, 0x76905cf6, + 0x51618f83, 0xadf01293, 0x1841b5a0, 0xe4d028b0, 0x57a2134a, + 0xab338e5a, 0x1e822969, 0xe213b479, 0xc5e2670c, 0x3973fa1c, + 0x8cc25d2f, 0x7053c03f, 0x6c39cc90, 0x90a85180, 0x2519f6b3, + 0xd9886ba3, 0xfe79b8d6, 0x02e825c6, 0xb75982f5, 0x4bc81fe5, + 0xf8ba241f, 0x042bb90f, 0xb19a1e3c, 0x4d0b832c, 0x6afa5059, + 0x966bcd49, 0x23da6a7a, 0xdf4bf76a, 0xf53d1d8d, 0x09ac809d, + 0xbc1d27ae, 0x408cbabe, 0x677d69cb, 0x9becf4db, 0x2e5d53e8, + 0xd2cccef8, 0x61bef502, 0x9d2f6812, 0x289ecf21, 0xd40f5231, + 0xf3fe8144, 0x0f6f1c54, 0xbadebb67, 0x464f2677, 0xee336ea9, + 0x12a2f3b9, 0xa713548a, 0x5b82c99a, 0x7c731aef, 0x80e287ff, + 0x355320cc, 0xc9c2bddc, 0x7ab08626, 0x86211b36, 0x3390bc05, + 0xcf012115, 0xe8f0f260, 0x14616f70, 0xa1d0c843, 0x5d415553, + 0x7737bfb4, 0x8ba622a4, 0x3e178597, 0xc2861887, 0xe577cbf2, + 0x19e656e2, 0xac57f1d1, 0x50c66cc1, 0xe3b4573b, 0x1f25ca2b, + 0xaa946d18, 0x5605f008, 0x71f4237d, 0x8d65be6d, 0x38d4195e, + 0xc445844e}, + {0x00000000, 0x005c11c1, 0x00b82382, 0x00e43243, 0x01704704, + 0x012c56c5, 0x01c86486, 0x01947547, 0x02e08e08, 0x02bc9fc9, + 0x0258ad8a, 0x0204bc4b, 0x0390c90c, 0x03ccd8cd, 0x0328ea8e, + 0x0374fb4f, 0x05c11c10, 0x059d0dd1, 0x05793f92, 0x05252e53, + 0x04b15b14, 0x04ed4ad5, 0x04097896, 0x04556957, 0x07219218, + 0x077d83d9, 0x0799b19a, 0x07c5a05b, 0x0651d51c, 0x060dc4dd, + 0x06e9f69e, 0x06b5e75f, 0x0b823820, 0x0bde29e1, 0x0b3a1ba2, + 0x0b660a63, 0x0af27f24, 0x0aae6ee5, 0x0a4a5ca6, 0x0a164d67, + 0x0962b628, 0x093ea7e9, 0x09da95aa, 0x0986846b, 0x0812f12c, + 0x084ee0ed, 0x08aad2ae, 0x08f6c36f, 0x0e432430, 0x0e1f35f1, + 0x0efb07b2, 0x0ea71673, 0x0f336334, 0x0f6f72f5, 0x0f8b40b6, + 0x0fd75177, 0x0ca3aa38, 0x0cffbbf9, 0x0c1b89ba, 0x0c47987b, + 0x0dd3ed3c, 0x0d8ffcfd, 0x0d6bcebe, 0x0d37df7f, 0x17047040, + 0x17586181, 0x17bc53c2, 0x17e04203, 0x16743744, 0x16282685, + 0x16cc14c6, 0x16900507, 0x15e4fe48, 0x15b8ef89, 0x155cddca, + 0x1500cc0b, 0x1494b94c, 0x14c8a88d, 0x142c9ace, 0x14708b0f, + 0x12c56c50, 0x12997d91, 0x127d4fd2, 0x12215e13, 0x13b52b54, + 0x13e93a95, 0x130d08d6, 0x13511917, 0x1025e258, 0x1079f399, + 0x109dc1da, 0x10c1d01b, 0x1155a55c, 0x1109b49d, 0x11ed86de, + 0x11b1971f, 0x1c864860, 0x1cda59a1, 0x1c3e6be2, 0x1c627a23, + 0x1df60f64, 0x1daa1ea5, 0x1d4e2ce6, 0x1d123d27, 0x1e66c668, + 0x1e3ad7a9, 0x1edee5ea, 0x1e82f42b, 0x1f16816c, 0x1f4a90ad, + 0x1faea2ee, 0x1ff2b32f, 0x19475470, 0x191b45b1, 0x19ff77f2, + 0x19a36633, 0x18371374, 0x186b02b5, 0x188f30f6, 0x18d32137, + 0x1ba7da78, 0x1bfbcbb9, 0x1b1ff9fa, 0x1b43e83b, 0x1ad79d7c, + 0x1a8b8cbd, 0x1a6fbefe, 0x1a33af3f, 0x2e08e080, 0x2e54f141, + 0x2eb0c302, 0x2eecd2c3, 0x2f78a784, 0x2f24b645, 0x2fc08406, + 0x2f9c95c7, 0x2ce86e88, 0x2cb47f49, 0x2c504d0a, 0x2c0c5ccb, + 0x2d98298c, 0x2dc4384d, 0x2d200a0e, 0x2d7c1bcf, 0x2bc9fc90, + 0x2b95ed51, 0x2b71df12, 0x2b2dced3, 0x2ab9bb94, 0x2ae5aa55, + 0x2a019816, 0x2a5d89d7, 0x29297298, 0x29756359, 0x2991511a, + 0x29cd40db, 0x2859359c, 0x2805245d, 0x28e1161e, 0x28bd07df, + 0x258ad8a0, 0x25d6c961, 0x2532fb22, 0x256eeae3, 0x24fa9fa4, + 0x24a68e65, 0x2442bc26, 0x241eade7, 0x276a56a8, 0x27364769, + 0x27d2752a, 0x278e64eb, 0x261a11ac, 0x2646006d, 0x26a2322e, + 0x26fe23ef, 0x204bc4b0, 0x2017d571, 0x20f3e732, 0x20aff6f3, + 0x213b83b4, 0x21679275, 0x2183a036, 0x21dfb1f7, 0x22ab4ab8, + 0x22f75b79, 0x2213693a, 0x224f78fb, 0x23db0dbc, 0x23871c7d, + 0x23632e3e, 0x233f3fff, 0x390c90c0, 0x39508101, 0x39b4b342, + 0x39e8a283, 0x387cd7c4, 0x3820c605, 0x38c4f446, 0x3898e587, + 0x3bec1ec8, 0x3bb00f09, 0x3b543d4a, 0x3b082c8b, 0x3a9c59cc, + 0x3ac0480d, 0x3a247a4e, 0x3a786b8f, 0x3ccd8cd0, 0x3c919d11, + 0x3c75af52, 0x3c29be93, 0x3dbdcbd4, 0x3de1da15, 0x3d05e856, + 0x3d59f997, 0x3e2d02d8, 0x3e711319, 0x3e95215a, 0x3ec9309b, + 0x3f5d45dc, 0x3f01541d, 0x3fe5665e, 0x3fb9779f, 0x328ea8e0, + 0x32d2b921, 0x32368b62, 0x326a9aa3, 0x33feefe4, 0x33a2fe25, + 0x3346cc66, 0x331adda7, 0x306e26e8, 0x30323729, 0x30d6056a, + 0x308a14ab, 0x311e61ec, 0x3142702d, 0x31a6426e, 0x31fa53af, + 0x374fb4f0, 0x3713a531, 0x37f79772, 0x37ab86b3, 0x363ff3f4, + 0x3663e235, 0x3687d076, 0x36dbc1b7, 0x35af3af8, 0x35f32b39, + 0x3517197a, 0x354b08bb, 0x34df7dfc, 0x34836c3d, 0x34675e7e, + 0x343b4fbf}}; + +static const word_t crc_braid_big_table[][256] = { + {0x00000000, 0xc1115c00, 0x8223b800, 0x4332e400, 0x04477001, + 0xc5562c01, 0x8664c801, 0x47759401, 0x088ee002, 0xc99fbc02, + 0x8aad5802, 0x4bbc0402, 0x0cc99003, 0xcdd8cc03, 0x8eea2803, + 0x4ffb7403, 0x101cc105, 0xd10d9d05, 0x923f7905, 0x532e2505, + 0x145bb104, 0xd54aed04, 0x96780904, 0x57695504, 0x18922107, + 0xd9837d07, 0x9ab19907, 0x5ba0c507, 0x1cd55106, 0xddc40d06, + 0x9ef6e906, 0x5fe7b506, 0x2038820b, 0xe129de0b, 0xa21b3a0b, + 0x630a660b, 0x247ff20a, 0xe56eae0a, 0xa65c4a0a, 0x674d160a, + 0x28b66209, 0xe9a73e09, 0xaa95da09, 0x6b848609, 0x2cf11208, + 0xede04e08, 0xaed2aa08, 0x6fc3f608, 0x3024430e, 0xf1351f0e, + 0xb207fb0e, 0x7316a70e, 0x3463330f, 0xf5726f0f, 0xb6408b0f, + 0x7751d70f, 0x38aaa30c, 0xf9bbff0c, 0xba891b0c, 0x7b98470c, + 0x3cedd30d, 0xfdfc8f0d, 0xbece6b0d, 0x7fdf370d, 0x40700417, + 0x81615817, 0xc253bc17, 0x0342e017, 0x44377416, 0x85262816, + 0xc614cc16, 0x07059016, 0x48fee415, 0x89efb815, 0xcadd5c15, + 0x0bcc0015, 0x4cb99414, 0x8da8c814, 0xce9a2c14, 0x0f8b7014, + 0x506cc512, 0x917d9912, 0xd24f7d12, 0x135e2112, 0x542bb513, + 0x953ae913, 0xd6080d13, 0x17195113, 0x58e22510, 0x99f37910, + 0xdac19d10, 0x1bd0c110, 0x5ca55511, 0x9db40911, 0xde86ed11, + 0x1f97b111, 0x6048861c, 0xa159da1c, 0xe26b3e1c, 0x237a621c, + 0x640ff61d, 0xa51eaa1d, 0xe62c4e1d, 0x273d121d, 0x68c6661e, + 0xa9d73a1e, 0xeae5de1e, 0x2bf4821e, 0x6c81161f, 0xad904a1f, + 0xeea2ae1f, 0x2fb3f21f, 0x70544719, 0xb1451b19, 0xf277ff19, + 0x3366a319, 0x74133718, 0xb5026b18, 0xf6308f18, 0x3721d318, + 0x78daa71b, 0xb9cbfb1b, 0xfaf91f1b, 0x3be8431b, 0x7c9dd71a, + 0xbd8c8b1a, 0xfebe6f1a, 0x3faf331a, 0x80e0082e, 0x41f1542e, + 0x02c3b02e, 0xc3d2ec2e, 0x84a7782f, 0x45b6242f, 0x0684c02f, + 0xc7959c2f, 0x886ee82c, 0x497fb42c, 0x0a4d502c, 0xcb5c0c2c, + 0x8c29982d, 0x4d38c42d, 0x0e0a202d, 0xcf1b7c2d, 0x90fcc92b, + 0x51ed952b, 0x12df712b, 0xd3ce2d2b, 0x94bbb92a, 0x55aae52a, + 0x1698012a, 0xd7895d2a, 0x98722929, 0x59637529, 0x1a519129, + 0xdb40cd29, 0x9c355928, 0x5d240528, 0x1e16e128, 0xdf07bd28, + 0xa0d88a25, 0x61c9d625, 0x22fb3225, 0xe3ea6e25, 0xa49ffa24, + 0x658ea624, 0x26bc4224, 0xe7ad1e24, 0xa8566a27, 0x69473627, + 0x2a75d227, 0xeb648e27, 0xac111a26, 0x6d004626, 0x2e32a226, + 0xef23fe26, 0xb0c44b20, 0x71d51720, 0x32e7f320, 0xf3f6af20, + 0xb4833b21, 0x75926721, 0x36a08321, 0xf7b1df21, 0xb84aab22, + 0x795bf722, 0x3a691322, 0xfb784f22, 0xbc0ddb23, 0x7d1c8723, + 0x3e2e6323, 0xff3f3f23, 0xc0900c39, 0x01815039, 0x42b3b439, + 0x83a2e839, 0xc4d77c38, 0x05c62038, 0x46f4c438, 0x87e59838, + 0xc81eec3b, 0x090fb03b, 0x4a3d543b, 0x8b2c083b, 0xcc599c3a, + 0x0d48c03a, 0x4e7a243a, 0x8f6b783a, 0xd08ccd3c, 0x119d913c, + 0x52af753c, 0x93be293c, 0xd4cbbd3d, 0x15dae13d, 0x56e8053d, + 0x97f9593d, 0xd8022d3e, 0x1913713e, 0x5a21953e, 0x9b30c93e, + 0xdc455d3f, 0x1d54013f, 0x5e66e53f, 0x9f77b93f, 0xe0a88e32, + 0x21b9d232, 0x628b3632, 0xa39a6a32, 0xe4effe33, 0x25fea233, + 0x66cc4633, 0xa7dd1a33, 0xe8266e30, 0x29373230, 0x6a05d630, + 0xab148a30, 0xec611e31, 0x2d704231, 0x6e42a631, 0xaf53fa31, + 0xf0b44f37, 0x31a51337, 0x7297f737, 0xb386ab37, 0xf4f33f36, + 0x35e26336, 0x76d08736, 0xb7c1db36, 0xf83aaf35, 0x392bf335, + 0x7a191735, 0xbb084b35, 0xfc7ddf34, 0x3d6c8334, 0x7e5e6734, + 0xbf4f3b34}, + {0x00000000, 0x109d91fc, 0x233a2049, 0x33a7b1b5, 0x46744092, + 0x56e9d16e, 0x654e60db, 0x75d3f127, 0x8fe88394, 0x9f751268, + 0xacd2a3dd, 0xbc4f3221, 0xc99cc306, 0xd90152fa, 0xeaa6e34f, + 0xfa3b72b3, 0x1dd10499, 0x0d4c9565, 0x3eeb24d0, 0x2e76b52c, + 0x5ba5440b, 0x4b38d5f7, 0x789f6442, 0x6802f5be, 0x9239870d, + 0x82a416f1, 0xb103a744, 0xa19e36b8, 0xd44dc79f, 0xc4d05663, + 0xf777e7d6, 0xe7ea762a, 0x39a20a82, 0x293f9b7e, 0x1a982acb, + 0x0a05bb37, 0x7fd64a10, 0x6f4bdbec, 0x5cec6a59, 0x4c71fba5, + 0xb64a8916, 0xa6d718ea, 0x9570a95f, 0x85ed38a3, 0xf03ec984, + 0xe0a35878, 0xd304e9cd, 0xc3997831, 0x24730e1b, 0x34ee9fe7, + 0x07492e52, 0x17d4bfae, 0x62074e89, 0x729adf75, 0x413d6ec0, + 0x51a0ff3c, 0xab9b8d8f, 0xbb061c73, 0x88a1adc6, 0x983c3c3a, + 0xedefcd1d, 0xfd725ce1, 0xced5ed54, 0xde487ca8, 0x714416b4, + 0x61d98748, 0x527e36fd, 0x42e3a701, 0x37305626, 0x27adc7da, + 0x140a766f, 0x0497e793, 0xfeac9520, 0xee3104dc, 0xdd96b569, + 0xcd0b2495, 0xb8d8d5b2, 0xa845444e, 0x9be2f5fb, 0x8b7f6407, + 0x6c95122d, 0x7c0883d1, 0x4faf3264, 0x5f32a398, 0x2ae152bf, + 0x3a7cc343, 0x09db72f6, 0x1946e30a, 0xe37d91b9, 0xf3e00045, + 0xc047b1f0, 0xd0da200c, 0xa509d12b, 0xb59440d7, 0x8633f162, + 0x96ae609e, 0x48e61c36, 0x587b8dca, 0x6bdc3c7f, 0x7b41ad83, + 0x0e925ca4, 0x1e0fcd58, 0x2da87ced, 0x3d35ed11, 0xc70e9fa2, + 0xd7930e5e, 0xe434bfeb, 0xf4a92e17, 0x817adf30, 0x91e74ecc, + 0xa240ff79, 0xb2dd6e85, 0x553718af, 0x45aa8953, 0x760d38e6, + 0x6690a91a, 0x1343583d, 0x03dec9c1, 0x30797874, 0x20e4e988, + 0xdadf9b3b, 0xca420ac7, 0xf9e5bb72, 0xe9782a8e, 0x9cabdba9, + 0x8c364a55, 0xbf91fbe0, 0xaf0c6a1c, 0xe1882fd8, 0xf115be24, + 0xc2b20f91, 0xd22f9e6d, 0xa7fc6f4a, 0xb761feb6, 0x84c64f03, + 0x945bdeff, 0x6e60ac4c, 0x7efd3db0, 0x4d5a8c05, 0x5dc71df9, + 0x2814ecde, 0x38897d22, 0x0b2ecc97, 0x1bb35d6b, 0xfc592b41, + 0xecc4babd, 0xdf630b08, 0xcffe9af4, 0xba2d6bd3, 0xaab0fa2f, + 0x99174b9a, 0x898ada66, 0x73b1a8d5, 0x632c3929, 0x508b889c, + 0x40161960, 0x35c5e847, 0x255879bb, 0x16ffc80e, 0x066259f2, + 0xd82a255a, 0xc8b7b4a6, 0xfb100513, 0xeb8d94ef, 0x9e5e65c8, + 0x8ec3f434, 0xbd644581, 0xadf9d47d, 0x57c2a6ce, 0x475f3732, + 0x74f88687, 0x6465177b, 0x11b6e65c, 0x012b77a0, 0x328cc615, + 0x221157e9, 0xc5fb21c3, 0xd566b03f, 0xe6c1018a, 0xf65c9076, + 0x838f6151, 0x9312f0ad, 0xa0b54118, 0xb028d0e4, 0x4a13a257, + 0x5a8e33ab, 0x6929821e, 0x79b413e2, 0x0c67e2c5, 0x1cfa7339, + 0x2f5dc28c, 0x3fc05370, 0x90cc396c, 0x8051a890, 0xb3f61925, + 0xa36b88d9, 0xd6b879fe, 0xc625e802, 0xf58259b7, 0xe51fc84b, + 0x1f24baf8, 0x0fb92b04, 0x3c1e9ab1, 0x2c830b4d, 0x5950fa6a, + 0x49cd6b96, 0x7a6ada23, 0x6af74bdf, 0x8d1d3df5, 0x9d80ac09, + 0xae271dbc, 0xbeba8c40, 0xcb697d67, 0xdbf4ec9b, 0xe8535d2e, + 0xf8ceccd2, 0x02f5be61, 0x12682f9d, 0x21cf9e28, 0x31520fd4, + 0x4481fef3, 0x541c6f0f, 0x67bbdeba, 0x77264f46, 0xa96e33ee, + 0xb9f3a212, 0x8a5413a7, 0x9ac9825b, 0xef1a737c, 0xff87e280, + 0xcc205335, 0xdcbdc2c9, 0x2686b07a, 0x361b2186, 0x05bc9033, + 0x152101cf, 0x60f2f0e8, 0x706f6114, 0x43c8d0a1, 0x5355415d, + 0xb4bf3777, 0xa422a68b, 0x9785173e, 0x871886c2, 0xf2cb77e5, + 0xe256e619, 0xd1f157ac, 0xc16cc650, 0x3b57b4e3, 0x2bca251f, + 0x186d94aa, 0x08f00556, 0x7d23f471, 0x6dbe658d, 0x5e19d438, + 0x4e8445c4}, + {0x00000000, 0x9c81fd99, 0x3b03f883, 0xa782051a, 0x7506f3b7, + 0xe9870e2e, 0x4e050b34, 0xd284f6ad, 0xe90ce5df, 0x758d1846, + 0xd20f1d5c, 0x4e8ee0c5, 0x9c0a1668, 0x008bebf1, 0xa709eeeb, + 0x3b881372, 0xd119c90f, 0x4d983496, 0xea1a318c, 0x769bcc15, + 0xa41f3ab8, 0x389ec721, 0x9f1cc23b, 0x039d3fa2, 0x38152cd0, + 0xa494d149, 0x0316d453, 0x9f9729ca, 0x4d13df67, 0xd19222fe, + 0x761027e4, 0xea91da7d, 0xa233921f, 0x3eb26f86, 0x99306a9c, + 0x05b19705, 0xd73561a8, 0x4bb49c31, 0xec36992b, 0x70b764b2, + 0x4b3f77c0, 0xd7be8a59, 0x703c8f43, 0xecbd72da, 0x3e398477, + 0xa2b879ee, 0x053a7cf4, 0x99bb816d, 0x732a5b10, 0xefaba689, + 0x4829a393, 0xd4a85e0a, 0x062ca8a7, 0x9aad553e, 0x3d2f5024, + 0xa1aeadbd, 0x9a26becf, 0x06a74356, 0xa125464c, 0x3da4bbd5, + 0xef204d78, 0x73a1b0e1, 0xd423b5fb, 0x48a24862, 0x4467243f, + 0xd8e6d9a6, 0x7f64dcbc, 0xe3e52125, 0x3161d788, 0xade02a11, + 0x0a622f0b, 0x96e3d292, 0xad6bc1e0, 0x31ea3c79, 0x96683963, + 0x0ae9c4fa, 0xd86d3257, 0x44eccfce, 0xe36ecad4, 0x7fef374d, + 0x957eed30, 0x09ff10a9, 0xae7d15b3, 0x32fce82a, 0xe0781e87, + 0x7cf9e31e, 0xdb7be604, 0x47fa1b9d, 0x7c7208ef, 0xe0f3f576, + 0x4771f06c, 0xdbf00df5, 0x0974fb58, 0x95f506c1, 0x327703db, + 0xaef6fe42, 0xe654b620, 0x7ad54bb9, 0xdd574ea3, 0x41d6b33a, + 0x93524597, 0x0fd3b80e, 0xa851bd14, 0x34d0408d, 0x0f5853ff, + 0x93d9ae66, 0x345bab7c, 0xa8da56e5, 0x7a5ea048, 0xe6df5dd1, + 0x415d58cb, 0xdddca552, 0x374d7f2f, 0xabcc82b6, 0x0c4e87ac, + 0x90cf7a35, 0x424b8c98, 0xdeca7101, 0x7948741b, 0xe5c98982, + 0xde419af0, 0x42c06769, 0xe5426273, 0x79c39fea, 0xab476947, + 0x37c694de, 0x904491c4, 0x0cc56c5d, 0x88ce487e, 0x144fb5e7, + 0xb3cdb0fd, 0x2f4c4d64, 0xfdc8bbc9, 0x61494650, 0xc6cb434a, + 0x5a4abed3, 0x61c2ada1, 0xfd435038, 0x5ac15522, 0xc640a8bb, + 0x14c45e16, 0x8845a38f, 0x2fc7a695, 0xb3465b0c, 0x59d78171, + 0xc5567ce8, 0x62d479f2, 0xfe55846b, 0x2cd172c6, 0xb0508f5f, + 0x17d28a45, 0x8b5377dc, 0xb0db64ae, 0x2c5a9937, 0x8bd89c2d, + 0x175961b4, 0xc5dd9719, 0x595c6a80, 0xfede6f9a, 0x625f9203, + 0x2afdda61, 0xb67c27f8, 0x11fe22e2, 0x8d7fdf7b, 0x5ffb29d6, + 0xc37ad44f, 0x64f8d155, 0xf8792ccc, 0xc3f13fbe, 0x5f70c227, + 0xf8f2c73d, 0x64733aa4, 0xb6f7cc09, 0x2a763190, 0x8df4348a, + 0x1175c913, 0xfbe4136e, 0x6765eef7, 0xc0e7ebed, 0x5c661674, + 0x8ee2e0d9, 0x12631d40, 0xb5e1185a, 0x2960e5c3, 0x12e8f6b1, + 0x8e690b28, 0x29eb0e32, 0xb56af3ab, 0x67ee0506, 0xfb6ff89f, + 0x5cedfd85, 0xc06c001c, 0xcca96c41, 0x502891d8, 0xf7aa94c2, + 0x6b2b695b, 0xb9af9ff6, 0x252e626f, 0x82ac6775, 0x1e2d9aec, + 0x25a5899e, 0xb9247407, 0x1ea6711d, 0x82278c84, 0x50a37a29, + 0xcc2287b0, 0x6ba082aa, 0xf7217f33, 0x1db0a54e, 0x813158d7, + 0x26b35dcd, 0xba32a054, 0x68b656f9, 0xf437ab60, 0x53b5ae7a, + 0xcf3453e3, 0xf4bc4091, 0x683dbd08, 0xcfbfb812, 0x533e458b, + 0x81bab326, 0x1d3b4ebf, 0xbab94ba5, 0x2638b63c, 0x6e9afe5e, + 0xf21b03c7, 0x559906dd, 0xc918fb44, 0x1b9c0de9, 0x871df070, + 0x209ff56a, 0xbc1e08f3, 0x87961b81, 0x1b17e618, 0xbc95e302, + 0x20141e9b, 0xf290e836, 0x6e1115af, 0xc99310b5, 0x5512ed2c, + 0xbf833751, 0x2302cac8, 0x8480cfd2, 0x1801324b, 0xca85c4e6, + 0x5604397f, 0xf1863c65, 0x6d07c1fc, 0x568fd28e, 0xca0e2f17, + 0x6d8c2a0d, 0xf10dd794, 0x23892139, 0xbf08dca0, 0x188ad9ba, + 0x840b2423}, + {0x00000000, 0x81615947, 0x02c3b28e, 0x83a2ebc9, 0x078666ad, + 0x86e73fea, 0x0545d423, 0x84248d64, 0x0d0cceea, 0x8c6d97ad, + 0x0fcf7c64, 0x8eae2523, 0x0a8aa847, 0x8bebf100, 0x08491ac9, + 0x8928438e, 0x19189f65, 0x9879c622, 0x1bdb2deb, 0x9aba74ac, + 0x1e9ef9c8, 0x9fffa08f, 0x1c5d4b46, 0x9d3c1201, 0x1414518f, + 0x957508c8, 0x16d7e301, 0x97b6ba46, 0x13923722, 0x92f36e65, + 0x115185ac, 0x9030dceb, 0x32303ecb, 0xb351678c, 0x30f38c45, + 0xb192d502, 0x35b65866, 0xb4d70121, 0x3775eae8, 0xb614b3af, + 0x3f3cf021, 0xbe5da966, 0x3dff42af, 0xbc9e1be8, 0x38ba968c, + 0xb9dbcfcb, 0x3a792402, 0xbb187d45, 0x2b28a1ae, 0xaa49f8e9, + 0x29eb1320, 0xa88a4a67, 0x2caec703, 0xadcf9e44, 0x2e6d758d, + 0xaf0c2cca, 0x26246f44, 0xa7453603, 0x24e7ddca, 0xa586848d, + 0x21a209e9, 0xa0c350ae, 0x2361bb67, 0xa200e220, 0x67607f26, + 0xe6012661, 0x65a3cda8, 0xe4c294ef, 0x60e6198b, 0xe18740cc, + 0x6225ab05, 0xe344f242, 0x6a6cb1cc, 0xeb0de88b, 0x68af0342, + 0xe9ce5a05, 0x6dead761, 0xec8b8e26, 0x6f2965ef, 0xee483ca8, + 0x7e78e043, 0xff19b904, 0x7cbb52cd, 0xfdda0b8a, 0x79fe86ee, + 0xf89fdfa9, 0x7b3d3460, 0xfa5c6d27, 0x73742ea9, 0xf21577ee, + 0x71b79c27, 0xf0d6c560, 0x74f24804, 0xf5931143, 0x7631fa8a, + 0xf750a3cd, 0x555041ed, 0xd43118aa, 0x5793f363, 0xd6f2aa24, + 0x52d62740, 0xd3b77e07, 0x501595ce, 0xd174cc89, 0x585c8f07, + 0xd93dd640, 0x5a9f3d89, 0xdbfe64ce, 0x5fdae9aa, 0xdebbb0ed, + 0x5d195b24, 0xdc780263, 0x4c48de88, 0xcd2987cf, 0x4e8b6c06, + 0xcfea3541, 0x4bceb825, 0xcaafe162, 0x490d0aab, 0xc86c53ec, + 0x41441062, 0xc0254925, 0x4387a2ec, 0xc2e6fbab, 0x46c276cf, + 0xc7a32f88, 0x4401c441, 0xc5609d06, 0xcec0fe4c, 0x4fa1a70b, + 0xcc034cc2, 0x4d621585, 0xc94698e1, 0x4827c1a6, 0xcb852a6f, + 0x4ae47328, 0xc3cc30a6, 0x42ad69e1, 0xc10f8228, 0x406edb6f, + 0xc44a560b, 0x452b0f4c, 0xc689e485, 0x47e8bdc2, 0xd7d86129, + 0x56b9386e, 0xd51bd3a7, 0x547a8ae0, 0xd05e0784, 0x513f5ec3, + 0xd29db50a, 0x53fcec4d, 0xdad4afc3, 0x5bb5f684, 0xd8171d4d, + 0x5976440a, 0xdd52c96e, 0x5c339029, 0xdf917be0, 0x5ef022a7, + 0xfcf0c087, 0x7d9199c0, 0xfe337209, 0x7f522b4e, 0xfb76a62a, + 0x7a17ff6d, 0xf9b514a4, 0x78d44de3, 0xf1fc0e6d, 0x709d572a, + 0xf33fbce3, 0x725ee5a4, 0xf67a68c0, 0x771b3187, 0xf4b9da4e, + 0x75d88309, 0xe5e85fe2, 0x648906a5, 0xe72bed6c, 0x664ab42b, + 0xe26e394f, 0x630f6008, 0xe0ad8bc1, 0x61ccd286, 0xe8e49108, + 0x6985c84f, 0xea272386, 0x6b467ac1, 0xef62f7a5, 0x6e03aee2, + 0xeda1452b, 0x6cc01c6c, 0xa9a0816a, 0x28c1d82d, 0xab6333e4, + 0x2a026aa3, 0xae26e7c7, 0x2f47be80, 0xace55549, 0x2d840c0e, + 0xa4ac4f80, 0x25cd16c7, 0xa66ffd0e, 0x270ea449, 0xa32a292d, + 0x224b706a, 0xa1e99ba3, 0x2088c2e4, 0xb0b81e0f, 0x31d94748, + 0xb27bac81, 0x331af5c6, 0xb73e78a2, 0x365f21e5, 0xb5fdca2c, + 0x349c936b, 0xbdb4d0e5, 0x3cd589a2, 0xbf77626b, 0x3e163b2c, + 0xba32b648, 0x3b53ef0f, 0xb8f104c6, 0x39905d81, 0x9b90bfa1, + 0x1af1e6e6, 0x99530d2f, 0x18325468, 0x9c16d90c, 0x1d77804b, + 0x9ed56b82, 0x1fb432c5, 0x969c714b, 0x17fd280c, 0x945fc3c5, + 0x153e9a82, 0x911a17e6, 0x107b4ea1, 0x93d9a568, 0x12b8fc2f, + 0x828820c4, 0x03e97983, 0x804b924a, 0x012acb0d, 0x850e4669, + 0x046f1f2e, 0x87cdf4e7, 0x06acada0, 0x8f84ee2e, 0x0ee5b769, + 0x8d475ca0, 0x0c2605e7, 0x88028883, 0x0963d1c4, 0x8ac13a0d, + 0x0ba0634a}}; + +#endif + +#endif + +#endif + +static const crc_t x2n_table[] = { + 0x40000000, 0x20000000, 0x08000000, 0x00800000, 0x00008000, + 0xd8018001, 0xf8818001, 0xf0810001, 0x28008000, 0xd0818001, + 0xf8010001, 0x28800000, 0x08808000, 0xd8810001, 0x20808000, + 0xd0010001, 0x20000000, 0x08000000, 0x00800000, 0x00008000, + 0xd8018001, 0xf8818001, 0xf0810001, 0x28008000, 0xd0818001, + 0xf8010001, 0x28800000, 0x08808000, 0xd8810001, 0x20808000, + 0xd0010001, 0x20000000}; diff --git a/src/utils/log.c b/src/utils/log.c index f10dff56b..f0eb6aa3c 100644 --- a/src/utils/log.c +++ b/src/utils/log.c @@ -36,7 +36,7 @@ #include <86box/log.h> typedef struct log_t { - char buff[1024]; + char buff[LOG_SIZE_BUFFER]; char dev_name[1024]; int seen; int suppr_seen; @@ -105,7 +105,7 @@ void log_out(void *priv, const char *fmt, va_list ap) { log_t *log = (log_t *) priv; - char temp[1024]; + char temp[LOG_SIZE_BUFFER]; if (log == NULL) pclog("WARNING: Logging called with a NULL log pointer\n"); @@ -273,8 +273,8 @@ void log_fatal(void *priv, const char *fmt, ...) { log_t *log = (log_t *) priv; - char temp[1024]; - char fmt2[1024]; + char temp[LOG_SIZE_BUFFER]; + char fmt2[LOG_SIZE_BUFFER]; va_list ap; if (log == NULL) @@ -287,11 +287,11 @@ log_fatal(void *priv, const char *fmt, ...) free(log->cyclic_buff); } + log_copy(log, fmt2, fmt, LOG_SIZE_BUFFER); va_start(ap, fmt); - log_copy(log, fmt2, fmt, 1024); vsprintf(temp, fmt2, ap); - fatal_ex(fmt2, ap); va_end(ap); + fatal("%s", temp); exit(-1); } @@ -299,8 +299,8 @@ void log_warning(void *priv, const char *fmt, ...) { log_t *log = (log_t *) priv; - char temp[1024]; - char fmt2[1024]; + char temp[LOG_SIZE_BUFFER]; + char fmt2[LOG_SIZE_BUFFER]; va_list ap; if (log == NULL) @@ -313,11 +313,11 @@ log_warning(void *priv, const char *fmt, ...) free(log->cyclic_buff); } + log_copy(log, fmt2, fmt, LOG_SIZE_BUFFER); va_start(ap, fmt); - log_copy(log, fmt2, fmt, 1024); vsprintf(temp, fmt2, ap); - warning_ex(fmt2, ap); va_end(ap); + warning("%s", temp); } static void * diff --git a/src/video/CMakeLists.txt b/src/video/CMakeLists.txt index 1159c93e2..f34455136 100644 --- a/src/video/CMakeLists.txt +++ b/src/video/CMakeLists.txt @@ -58,6 +58,7 @@ add_library(vid OBJECT vid_cga_quadcolor.c vid_cga_toshiba_t1000.c vid_cga_toshiba_t3100e.c + vid_cga_v6355.c # PCJr/Tandy vid_pcjr.c diff --git a/src/video/clockgen/vid_clockgen_ics2494.c b/src/video/clockgen/vid_clockgen_ics2494.c index 350a490cc..33a74fe62 100644 --- a/src/video/clockgen/vid_clockgen_ics2494.c +++ b/src/video/clockgen/vid_clockgen_ics2494.c @@ -48,6 +48,120 @@ ics2494_log(const char *fmt, ...) # define ics2494_log(fmt, ...) #endif +/* Two consecutive byte-writes are NOT allowed. Furthermore an index + * written to 0x01CE is only usable ONCE! Note also that the setting of ATI + * extended registers (especially those with clock selection bits) should be + * bracketed by a sequencer reset. + * + * Boards prior to V5 use 4 crystals. Boards V5 and later use a clock + * generator chip. V3 and V4 boards differ when it comes to choosing clock + * frequencies. + * + * VGA Wonder V3/V4 Board Clock Frequencies + * R E G I S T E R S + * 1CE(*) 3C2 3C2 Frequency + * B2h/BEh + * Bit 6/4 Bit 3 Bit 2 (MHz) + * ------- ------- ------- ------- + * 0 0 0 50.175 + * 0 0 1 56.644 + * 0 1 0 Spare 1 + * 0 1 1 44.900 + * 1 0 0 44.900 + * 1 0 1 50.175 + * 1 1 0 Spare 2 + * 1 1 1 36.000 + * + * (*): V3 uses index B2h, bit 6; V4 uses index BEh, bit 4 + * + * V5, PLUS, XL and XL24 usually have an ATI 18810 clock generator chip, but + * some have an ATI 18811-0, and it's quite conceivable that some exist with + * ATI 18811-1's or ATI 18811-2's. Mach32 boards are known to use any one of + * these clock generators. The possibilities for Mach64 boards also include + * two different flavours of the newer 18818 chips. I have yet to figure out + * how BIOS initialization sets up the board for a particular set of + * frequencies. Mach32 and Mach64 boards also use a different dot clock + * ordering. ATI says there is no reliable way for the driver to determine + * which clock generator is on the board (their BIOS's are tailored to the + * board). + * + * VGA Wonder V5/PLUS/XL/XL24 Board Clock Frequencies + * R E G I S T E R S + * 1CE 1CE 3C2 3C2 Frequency + * B9h BEh (MHz) 18811-0 18811-1 + * Bit 1 Bit 4 Bit 3 Bit 2 18810 18812-0 18811-2 18818-? 18818-? + * ------- ------- ------- ------- ------- ------- ------- ------- ------- + * 0 0 0 0 30.240 30.240 135.000 (*3) (*3) + * 0 0 0 1 32.000 32.000 32.000 110.000 110.000 + * 0 0 1 0 37.500 110.000 110.000 126.000 126.000 + * 0 0 1 1 39.000 80.000 80.000 135.000 135.000 + * 0 1 0 0 42.954 42.954 100.000 50.350 25.175 + * 0 1 0 1 48.771 48.771 126.000 56.644 28.322 + * 0 1 1 0 (*1) 92.400 92.400 63.000 31.500 + * 0 1 1 1 36.000 36.000 36.000 72.000 36.000 + * 1 0 0 0 40.000 39.910 39.910 (*3) (*3) + * 1 0 0 1 56.644 44.900 44.900 80.000 80.000 + * 1 0 1 0 75.000 75.000 75.000 75.000 75.000 + * 1 0 1 1 65.000 65.000 65.000 65.000 65.000 + * 1 1 0 0 50.350 50.350 50.350 40.000 40.000 + * 1 1 0 1 56.640 56.640 56.640 44.900 44.900 + * 1 1 1 0 (*2) (*3) (*3) 49.500 49.500 + * 1 1 1 1 44.900 44.900 44.900 50.000 50.000 + * + * (*1) External 0 (supposedly 16.657 Mhz) + * (*2) External 1 (supposedly 28.322 MHz) + * (*3) This setting doesn't seem to generate anything + * + * Mach32 and Mach64 Board Clock Frequencies + * R E G I S T E R S + * 1CE 1CE 3C2 3C2 Frequency + * B9h BEh (MHz) 18811-0 18811-1 + * Bit 1 Bit 4 Bit 3 Bit 2 18810 18812-0 18811-2 18818-? 18818-? + * ------- ------- ------- ------- ------- ------- ------- ------- ------- + * 0 0 0 0 42.954 42.954 100.000 50.350 25.175 + * 0 0 0 1 48.771 48.771 126.000 56.644 28.322 + * 0 0 1 0 (*1) 92.400 92.400 63.000 31.500 + * 0 0 1 1 36.000 36.000 36.000 72.000 36.000 + * 0 1 0 0 30.240 30.240 135.000 (*3) (*3) + * 0 1 0 1 32.000 32.000 32.000 110.000 110.000 + * 0 1 1 0 37.500 110.000 110.000 126.000 126.000 + * 0 1 1 1 39.000 80.000 80.000 135.000 135.000 + * 1 0 0 0 50.350 50.350 50.350 40.000 40.000 + * 1 0 0 1 56.640 56.640 56.640 44.900 44.900 + * 1 0 1 0 (*2) (*3) (*3) 49.500 49.500 + * 1 0 1 1 44.900 44.900 44.900 50.000 50.000 + * 1 1 0 0 40.000 39.910 39.910 (*3) (*3) + * 1 1 0 1 56.644 44.900 44.900 80.000 80.000 + * 1 1 1 0 75.000 75.000 75.000 75.000 75.000 + * 1 1 1 1 65.000 65.000 65.000 65.000 65.000 + * + * (*1) External 0 (supposedly 16.657 Mhz) + * (*2) External 1 (supposedly 28.322 MHz) + * (*3) This setting doesn't seem to generate anything + * + * Note that, to reduce confusion, this driver masks out the different clock + * ordering. + * + * For all boards, these frequencies can be divided by 1, 2, 3 or 4. + * + * Register 1CE, index B8h + * Bit 7 Bit 6 + * ------- ------- + * 0 0 Divide by 1 + * 0 1 Divide by 2 + * 1 0 Divide by 3 + * 1 1 Divide by 4 + * + * There is some question as to whether or not bit 1 of index 0xB9 can + * be used for clock selection on a V4 board. This driver makes it + * available only if the "undocumented_clocks" option (itself + * undocumented :-)) is specified in XF86Config. + * + * Also it appears that bit 0 of index 0xB9 can also be used for clock + * selection on some boards. It is also only available under XF86Config + * option "undocumented_clocks". + */ + float ics2494_getclock(int clock, void *priv) { @@ -56,7 +170,6 @@ ics2494_getclock(int clock, void *priv) if (clock > 15) clock = 15; - ics2494_log("Clock=%d, freq=%f.\n", clock, ics2494->freq[clock]); return ics2494->freq[clock]; } @@ -67,62 +180,116 @@ ics2494_init(const device_t *info) memset(ics2494, 0, sizeof(ics2494_t)); switch (info->local) { - case 10: + case 0: /* ATI 18810 for ATI 28800 */ - ics2494->freq[0x0] = 42954000.0; - ics2494->freq[0x1] = 48771000.0; - ics2494->freq[0x2] = 0.0; - ics2494->freq[0x3] = 36000000.0; - ics2494->freq[0x4] = 50350000.0; - ics2494->freq[0x5] = 56640000.0; - ics2494->freq[0x6] = 0.0; - ics2494->freq[0x7] = 44900000.0; - ics2494->freq[0x8] = 30240000.0; - ics2494->freq[0x9] = 32000000.0; - ics2494->freq[0xa] = 37500000.0; - ics2494->freq[0xb] = 39000000.0; - ics2494->freq[0xc] = 40000000.0; - ics2494->freq[0xd] = 56644000.0; - ics2494->freq[0xe] = 75000000.0; - ics2494->freq[0xf] = 65000000.0; + ics2494->freq[0] = 30240000.0; + ics2494->freq[1] = 32000000.0; + ics2494->freq[2] = 37500000.0; + ics2494->freq[3] = 39000000.0; + ics2494->freq[4] = 42954000.0; + ics2494->freq[5] = 48771000.0; + ics2494->freq[6] = 0.0; + ics2494->freq[7] = 36000000.0; + ics2494->freq[8] = 40000000.0; + ics2494->freq[9] = 56644000.0; + ics2494->freq[10] = 75000000.0; + ics2494->freq[11] = 65000000.0; + ics2494->freq[12] = 50350000.0; + ics2494->freq[13] = 56640000.0; + ics2494->freq[14] = 0.0; + ics2494->freq[15] = 44900000.0; break; - case 110: - /* ATI 18811-0 for ATI Mach32 */ - ics2494->freq[0x0] = 42954000.0; - ics2494->freq[0x1] = 48771000.0; - ics2494->freq[0x2] = 92400000.0; - ics2494->freq[0x3] = 36000000.0; - ics2494->freq[0x4] = 50350000.0; - ics2494->freq[0x5] = 56640000.0; - ics2494->freq[0x6] = 0.0; - ics2494->freq[0x7] = 44900000.0; - ics2494->freq[0x8] = 30240000.0; - ics2494->freq[0x9] = 32000000.0; - ics2494->freq[0xa] = 110000000.0; - ics2494->freq[0xb] = 80000000.0; - ics2494->freq[0xc] = 39910000.0; - ics2494->freq[0xd] = 44900000.0; - ics2494->freq[0xe] = 75000000.0; - ics2494->freq[0xf] = 65000000.0; + case 1: + /* ATI 18811-0/ATI 18812-0 for ATI 28800 */ + ics2494->freq[0] = 42950000.0; + ics2494->freq[1] = 48770000.0; + ics2494->freq[2] = 92400000.0; + ics2494->freq[3] = 36000000.0; + ics2494->freq[4] = 50350000.0; + ics2494->freq[5] = 56640000.0; + ics2494->freq[7] = 44900000.0; + ics2494->freq[8] = 30240000.0; + ics2494->freq[9] = 32000000.0; + ics2494->freq[10] = 110000000.0; + ics2494->freq[11] = 80000000.0; + ics2494->freq[12] = 39910000.0; + ics2494->freq[13] = 44900000.0; + ics2494->freq[14] = 75000000.0; + ics2494->freq[15] = 65000000.0; break; - case 111: - /* ATI 18811-1 for ATI Mach32 MCA */ - ics2494->freq[0x0] = 100000000.0; - ics2494->freq[0x1] = 126000000.0; - ics2494->freq[0x2] = 92400000.0; - ics2494->freq[0x3] = 36000000.0; - ics2494->freq[0x4] = 50350000.0; - ics2494->freq[0x5] = 56640000.0; - ics2494->freq[0x6] = 0.0; - ics2494->freq[0x7] = 44900000.0; - ics2494->freq[0x8] = 135000000.0; - ics2494->freq[0x9] = 32000000.0; - ics2494->freq[0xa] = 110000000.0; - ics2494->freq[0xb] = 80000000.0; - ics2494->freq[0xc] = 39910000.0; - ics2494->freq[0xd] = 44900000.0; - ics2494->freq[0xe] = 75000000.0; - ics2494->freq[0xf] = 65000000.0; + case 2: + /* ATI 18811-1/ATI 18811-2 for ATI 28800 */ + ics2494->freq[0] = 100000000.0; + ics2494->freq[1] = 126000000.0; + ics2494->freq[2] = 92400000.0; + ics2494->freq[3] = 36000000.0; + ics2494->freq[4] = 50350000.0; + ics2494->freq[5] = 56640000.0; + ics2494->freq[7] = 44900000.0; + ics2494->freq[8] = 135000000.0; + ics2494->freq[9] = 32000000.0; + ics2494->freq[10] = 110000000.0; + ics2494->freq[11] = 80000000.0; + ics2494->freq[12] = 39910000.0; + ics2494->freq[13] = 44900000.0; + ics2494->freq[14] = 75000000.0; + ics2494->freq[15] = 65000000.0; + break; + case 100: + /* ATI 18810 for ATI Mach32 */ + ics2494->freq[0] = 42954000.0; + ics2494->freq[1] = 48771000.0; + ics2494->freq[2] = 0.0; + ics2494->freq[3] = 36000000.0; + ics2494->freq[4] = 30240000.0; + ics2494->freq[5] = 32000000.0; + ics2494->freq[6] = 37500000.0; + ics2494->freq[7] = 39000000.0; + ics2494->freq[8] = 50350000.0; + ics2494->freq[9] = 56640000.0; + ics2494->freq[10] = 0.0; + ics2494->freq[11] = 44900000.0; + ics2494->freq[12] = 40000000.0; + ics2494->freq[13] = 56644000.0; + ics2494->freq[14] = 75000000.0; + ics2494->freq[15] = 65000000.0; + break; + case 101: + /* ATI 18811-0/ATI 18812-0 for ATI Mach32 */ + ics2494->freq[0] = 42954000.0; + ics2494->freq[1] = 48771000.0; + ics2494->freq[2] = 92400000.0; + ics2494->freq[3] = 36000000.0; + ics2494->freq[4] = 30240000.0; + ics2494->freq[5] = 32000000.0; + ics2494->freq[6] = 110000000.0; + ics2494->freq[7] = 80000000.0; + ics2494->freq[8] = 50350000.0; + ics2494->freq[9] = 56640000.0; + ics2494->freq[10] = 0.0; + ics2494->freq[11] = 44900000.0; + ics2494->freq[12] = 39910000.0; + ics2494->freq[13] = 44900000.0; + ics2494->freq[14] = 75000000.0; + ics2494->freq[15] = 65000000.0; + break; + case 102: + /* ATI 18811-1/ATI 18811-2 for ATI Mach32 */ + ics2494->freq[0] = 100000000.0; + ics2494->freq[1] = 126000000.0; + ics2494->freq[2] = 92400000.0; + ics2494->freq[3] = 36000000.0; + ics2494->freq[4] = 50350000.0; + ics2494->freq[5] = 56640000.0; + ics2494->freq[7] = 44900000.0; + ics2494->freq[8] = 135000000.0; + ics2494->freq[9] = 32000000.0; + ics2494->freq[10] = 110000000.0; + ics2494->freq[11] = 80000000.0; + ics2494->freq[12] = 39910000.0; + ics2494->freq[13] = 44900000.0; + ics2494->freq[14] = 75000000.0; + ics2494->freq[15] = 65000000.0; break; case 305: /* ICS2494A(N)-205 for S3 86C924 */ @@ -174,11 +341,11 @@ const device_t ics2494an_305_device = { .config = NULL }; -const device_t ati18810_device = { - .name = "ATI 18810 Clock Generator", - .internal_name = "ati18810", +const device_t ati18810_28800_device = { + .name = "ATI 18810 (ATI 28800) Clock Generator", + .internal_name = "ati18810_28800", .flags = 0, - .local = 10, + .local = 0, .init = ics2494_init, .close = ics2494_close, .reset = NULL, @@ -188,11 +355,11 @@ const device_t ati18810_device = { .config = NULL }; -const device_t ati18811_0_device = { - .name = "ATI 18811-0 Clock Generator", - .internal_name = "ati18811_0", +const device_t ati18811_0_28800_device = { + .name = "ATI 18811-0 (ATI 28800) Clock Generator", + .internal_name = "ati18811_0_28800", .flags = 0, - .local = 110, + .local = 1, .init = ics2494_init, .close = ics2494_close, .reset = NULL, @@ -202,11 +369,53 @@ const device_t ati18811_0_device = { .config = NULL }; -const device_t ati18811_1_device = { - .name = "ATI 18811-1 Clock Generator", - .internal_name = "ati18811_1", +const device_t ati18811_1_28800_device = { + .name = "ATI 18811-1 (ATI 28800) Clock Generator", + .internal_name = "ati18811_1_28800", .flags = 0, - .local = 111, + .local = 2, + .init = ics2494_init, + .close = ics2494_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t ati18810_mach32_device = { + .name = "ATI 18810 (ATI Mach32) Clock Generator", + .internal_name = "ati18810_mach32", + .flags = 0, + .local = 100, + .init = ics2494_init, + .close = ics2494_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t ati18811_0_mach32_device = { + .name = "ATI 18811-0 (ATI Mach32) Clock Generator", + .internal_name = "ati18811_0_mach32", + .flags = 0, + .local = 101, + .init = ics2494_init, + .close = ics2494_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t ati18811_1_mach32_device = { + .name = "ATI 18811-1 (ATI Mach32) Clock Generator", + .internal_name = "ati18811_1_mach32", + .flags = 0, + .local = 102, .init = ics2494_init, .close = ics2494_close, .reset = NULL, diff --git a/src/video/ramdac/vid_ramdac_bt48x.c b/src/video/ramdac/vid_ramdac_bt48x.c index d608750e3..64112e089 100644 --- a/src/video/ramdac/vid_ramdac_bt48x.c +++ b/src/video/ramdac/vid_ramdac_bt48x.c @@ -365,8 +365,11 @@ bt48x_recalctimings(void *priv, svga_t *svga) const bt48x_ramdac_t *ramdac = (bt48x_ramdac_t *) priv; svga->interlace = ramdac->cmd_r2 & 0x08; - if (ramdac->cmd_r3 & 0x08) - svga->hdisp *= 2; /* x2 clock multiplier */ + if (ramdac->cmd_r3 & 0x08) { + svga->hdisp <<= 1; /* x2 clock multiplier */ + svga->dots_per_clock <<= 1; + svga->clock *= 2.0; + } } void diff --git a/src/video/vid_8514a.c b/src/video/vid_8514a.c index c8191a876..32a402ec5 100644 --- a/src/video/vid_8514a.c +++ b/src/video/vid_8514a.c @@ -47,7 +47,7 @@ # undef CLAMP #endif -#define BIOS_MACH8_ROM_PATH "roms/video/mach8/11301113140_4k.BIN" +#define BIOS_MACH8_ROM_PATH "roms/video/mach8/11301113140_ROM.BIN" static void ibm8514_accel_outb(uint16_t port, uint8_t val, void *priv); static void ibm8514_accel_outw(uint16_t port, uint16_t val, void *priv); @@ -334,6 +334,9 @@ ibm8514_accel_out_fifo(svga_t *svga, uint16_t port, uint32_t val, int len) { ibm8514_t *dev = (ibm8514_t *) svga->dev8514; + if (dev == NULL) + return; + if (port & 0x8000) { if ((port != 0xe2e8) && (port != 0xe2e9) && (port != 0xe6e8) && (port != 0xe6e9)) { if (port & 0x4000) @@ -743,6 +746,9 @@ ibm8514_accel_out(uint16_t port, uint32_t val, svga_t *svga, int len) { ibm8514_t *dev = (ibm8514_t *) svga->dev8514; + if (dev == NULL) + return; + if (port & 0x8000) { if (dev->accel.cmd_back) { dev->fifo_idx++; @@ -777,6 +783,9 @@ ibm8514_accel_in_fifo(svga_t *svga, uint16_t port, int len) uint16_t temp = 0; int cmd = 0; + if (dev == NULL) + return 0xffff; + switch (port) { case 0x82e8: if (len == 2) @@ -3921,7 +3930,7 @@ ibm8514_mca_reset(void *priv) ibm8514_log("MCA reset.\n"); dev->on = 0; - if (dev->extensions) + if (dev->extensions == ATI) ati8514_mca_write(0x102, 0, svga); else ibm8514_mca_write(0x102, 0, svga); @@ -3941,6 +3950,8 @@ ibm8514_vblank_start(void *priv) static void * ibm8514_init(const device_t *info) { + FILE *fp; + uint8_t *rom_load = NULL; uint32_t bios_addr = 0; uint16_t bios_rom_eeprom = 0x0000; @@ -3970,33 +3981,46 @@ ibm8514_init(const device_t *info) dev->extensions = device_get_config_int("extensions"); bios_addr = device_get_config_hex20("bios_addr"); if (dev->type & DEVICE_MCA) - bios_addr = 0xc6000; + bios_addr = 0xc6800; switch (dev->extensions) { case ATI: if (rom_present(BIOS_MACH8_ROM_PATH)) { mach_t * mach = (mach_t *) calloc(1, sizeof(mach_t)); svga->ext8514 = mach; + fp = rom_fopen(BIOS_MACH8_ROM_PATH, "rb"); + if (bios_addr & 0x800) + (void) fseek(fp, 0x000, SEEK_SET); + else + (void) fseek(fp, 0x800, SEEK_SET); - rom_init(&dev->bios_rom, - BIOS_MACH8_ROM_PATH, - bios_addr, 0x1000, 0xfff, - 0, MEM_MAPPING_EXTERNAL); + rom_load = malloc(0x2000); + (void) !fread(rom_load, 0x2000, 1, fp); + (void) fclose(fp); + memset(&dev->bios_rom, 0x00, sizeof(rom_t)); + dev->bios_rom.rom = rom_load; + dev->bios_rom.mask = 0x1fff; + mem_mapping_add(&dev->bios_rom.mapping, bios_addr, 0x2000, + ati8514_rom_readb, ati8514_rom_readw, NULL, + NULL, NULL, NULL, + dev->bios_rom.rom, MEM_MAPPING_EXTERNAL | MEM_MAPPING_ROM_WS, dev); ati8514_init(svga, svga->ext8514, svga->dev8514); - mach->accel.scratch0 = ((bios_addr >> 7) - 0x1000) >> 4; - bios_rom_eeprom = mach->accel.scratch0; if (dev->type & DEVICE_MCA) { + dev->accel.scratch0 = (((bios_addr >> 7) - 0x1000) >> 4); + dev->accel.scratch0 |= ((dev->accel.scratch0 + 0x01) << 8); + bios_rom_eeprom = dev->accel.scratch0; dev->pos_regs[0] = 0x88; dev->pos_regs[1] = 0x80; - mach->eeprom.data[0] = 0x0000; - mach->eeprom.data[1] = bios_rom_eeprom | ((bios_rom_eeprom | 0x01) << 8); - ibm8514_log("EEPROM Data1=%04x.\n", mach->eeprom.data[1]); + mach->eeprom.data[1] = bios_rom_eeprom; mca_add(ati8514_mca_read, ati8514_mca_write, ibm8514_mca_feedb, ibm8514_mca_reset, svga); ati_eeprom_load_mach8(&mach->eeprom, "ati8514_mca.nvr", 1); mem_mapping_disable(&dev->bios_rom.mapping); - } else + } else { + dev->accel.scratch0 = ((bios_addr >> 7) - 0x1000) >> 4; + dev->accel.scratch0 |= ((dev->accel.scratch0 + 0x01) << 8); ati_eeprom_load_mach8(&mach->eeprom, "ati8514.nvr", 0); + } break; } @@ -4087,24 +4111,35 @@ static const device_config_t isa_ext8514_config[] = { }, { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, - .default_int = 0xc8000, + .default_int = 0xc8800, .file_filter = NULL, .spinner = { 0 }, .selection = { { .description = "C800h", .value = 0xc8000 }, + { .description = "C880h", .value = 0xc8800 }, { .description = "CA00h", .value = 0xca000 }, + { .description = "CA80h", .value = 0xca800 }, { .description = "CC00h", .value = 0xcc000 }, + { .description = "CC80h", .value = 0xcc800 }, { .description = "CE00h", .value = 0xce000 }, + { .description = "CE80h", .value = 0xce800 }, { .description = "D000h", .value = 0xd0000 }, + { .description = "D080h", .value = 0xd0800 }, { .description = "D200h", .value = 0xd2000 }, + { .description = "D280h", .value = 0xd2800 }, { .description = "D400h", .value = 0xd4000 }, + { .description = "D480h", .value = 0xd4800 }, { .description = "D600h", .value = 0xd6000 }, + { .description = "D680h", .value = 0xd6800 }, { .description = "D800h", .value = 0xd8000 }, + { .description = "D880h", .value = 0xd8800 }, { .description = "DA00h", .value = 0xda000 }, + { .description = "DA80h", .value = 0xda800 }, { .description = "DC00h", .value = 0xdc000 }, + { .description = "DC80h", .value = 0xdc800 }, { .description = "DE00h", .value = 0xde000 }, { .description = "" } }, diff --git a/src/video/vid_ati18800.c b/src/video/vid_ati18800.c index 9c87746c6..11124a35b 100644 --- a/src/video/vid_ati18800.c +++ b/src/video/vid_ati18800.c @@ -269,7 +269,7 @@ ati18800_init(const device_t *info) ati18800_in, ati18800_out, NULL, NULL); - ati18800->svga.clock_gen = device_add(&ati18810_device); + ati18800->svga.clock_gen = device_add(&ati18810_28800_device); ati18800->svga.getclock = ics2494_getclock; io_sethandler(0x01ce, 0x0002, ati18800_in, NULL, NULL, ati18800_out, NULL, NULL, ati18800); diff --git a/src/video/vid_ati28800.c b/src/video/vid_ati28800.c index 284abe78c..205d934ee 100644 --- a/src/video/vid_ati28800.c +++ b/src/video/vid_ati28800.c @@ -407,13 +407,23 @@ static void ati28800_recalctimings(svga_t *svga) { ati28800_t *ati28800 = (ati28800_t *) svga->priv; - int clock_sel; + int clock_sel = 0x00; if (ati28800->regs[0xad] & 0x08) svga->hblankstart = ((ati28800->regs[0x0d] >> 2) << 8) + svga->crtc[2]; - clock_sel = ((svga->miscout >> 2) & 3) | ((ati28800->regs[0xbe] & 0x10) >> 1) | - ((ati28800->regs[0xb9] & 2) << 1); + if (svga->miscout & 0x04) + clock_sel |= 0x01; + if (svga->miscout & 0x08) + clock_sel |= 0x02; + if (ati28800->regs[0xb9] & 0x02) + clock_sel |= 0x04; + if (ati28800->regs[0xbe] & 0x10) + clock_sel |= 0x08; + + svga->interlace = !!(ati28800->regs[0xbe] & 0x02); + if (svga->interlace) + svga->dispend >>= 1; if (ati28800->regs[0xa3] & 0x10) svga->memaddr_latch |= 0x10000; @@ -452,9 +462,25 @@ ati28800_recalctimings(svga_t *svga) } else svga->ati_4color = 0; - if (!svga->scrblank && (svga->crtc[0x17] & 0x80) && svga->attr_palette_enable) { + if (!svga->scrblank && svga->attr_palette_enable) { + svga->clock = (cpuclock * (double) (1ULL << 32)) / svga->getclock(clock_sel ^ 0x08, svga->clock_gen); + + switch ((ati28800->regs[0xb8] >> 6) & 3) { + case 0: + default: + break; + case 1: + svga->clock *= 2.0; + break; + case 2: + svga->clock *= 3.0; + break; + case 3: + svga->clock *= 4.0; + break; + } + if ((svga->gdcreg[6] & 1) || (svga->attrregs[0x10] & 1)) { - svga->clock = (cpuclock * (double) (1ULL << 32)) / svga->getclock(clock_sel, svga->clock_gen); ati28800_log("SEQREG1 bit 3=%x. gdcreg5 bits 5-6=%02x, 4bit pel=%02x, " "planar 16color=%02x, apa mode=%02x, attregs10 bit 7=%02x.\n", svga->seqregs[1] & 8, svga->gdcreg[5] & 0x60, @@ -568,7 +594,7 @@ ati28800k_init(const device_t *info) ati28800k_in, ati28800k_out, NULL, NULL); - ati28800->svga.clock_gen = device_add(&ati18810_device); + ati28800->svga.clock_gen = device_add(&ati18811_1_28800_device); ati28800->svga.getclock = ics2494_getclock; io_sethandler(0x01ce, 0x0002, ati28800k_in, NULL, NULL, ati28800k_out, NULL, NULL, ati28800); @@ -646,7 +672,7 @@ ati28800_init(const device_t *info) ati28800_in, ati28800_out, NULL, NULL); - ati28800->svga.clock_gen = device_add(&ati18810_device); + ati28800->svga.clock_gen = device_add(&ati18811_1_28800_device); ati28800->svga.getclock = ics2494_getclock; io_sethandler(0x01ce, 2, diff --git a/src/video/vid_ati_mach64.c b/src/video/vid_ati_mach64.c index 2b89bddf4..324023db1 100644 --- a/src/video/vid_ati_mach64.c +++ b/src/video/vid_ati_mach64.c @@ -37,6 +37,7 @@ #include <86box/video.h> #include <86box/i2c.h> #include <86box/vid_ddc.h> +#include <86box/vid_xga.h> #include <86box/vid_svga.h> #include <86box/vid_svga_render.h> #include <86box/vid_ati_eeprom.h> @@ -586,6 +587,7 @@ void mach64_updatemapping(mach64_t *mach64) { svga_t *svga = &mach64->svga; + xga_t *xga = (xga_t *) svga->xga; if (mach64->pci && !(mach64->pci_regs[PCI_REG_COMMAND] & PCI_COMMAND_MEM)) { mach64_log("Update mapping - PCI disabled\n"); @@ -611,6 +613,8 @@ mach64_updatemapping(mach64_t *mach64) mem_mapping_set_p(&svga->mapping, mach64); mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000); svga->banked_mask = 0xffff; + if (xga_active && (svga->xga != NULL)) + xga->on = 0; break; case 0x8: /*32k at B0000*/ mem_mapping_set_handler(&svga->mapping, svga_read, svga_readw, svga_readl, svga_write, svga_writew, svga_writel); diff --git a/src/video/vid_ati_mach8.c b/src/video/vid_ati_mach8.c index 4bb678857..24293ab1d 100644 --- a/src/video/vid_ati_mach8.c +++ b/src/video/vid_ati_mach8.c @@ -2431,6 +2431,11 @@ mach_out(uint16_t addr, uint8_t val, void *priv) svga_out(addr, val, svga); return; + case 0x3C2: + if (mach->regs[0xb8] & 0x08) + return; + break; + case 0x3C6: case 0x3C7: case 0x3C8: @@ -2465,10 +2470,56 @@ mach_out(uint16_t addr, uint8_t val, void *priv) case 0x3D5: if (svga->crtcreg & 0x20) return; - if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80) && !(mach->regs[0xb4] & 0x80)) + if ((svga->crtcreg < 7) && ((svga->crtc[0x11] & 0x80) || (mach->regs[0xb4] & 0x40)) && !(mach->regs[0xb4] & 0x80)) return; - if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80) && !(mach->regs[0xb4] & 0x80)) + if ((svga->crtcreg == 7) && ((svga->crtc[0x11] & 0x80) || (mach->regs[0xb4] & 0x40)) && !(mach->regs[0xb4] & 0x80)) val = (svga->crtc[7] & ~0x10) | (val & 0x10); + if (mach->regs[0xb8] & 0x04) { + if ((svga->crtcreg < 0x0a) || (svga->crtcreg > 0x0d)) + return; + } + if (mach->regs[0xb4] & 0x04) { + if (svga->crtcreg == 9) { + if (val & 0x8f) + return; + } + } + if (mach->regs[0xb4] & 0x08) { + if (svga->crtcreg == 6) + return; + if (svga->crtcreg == 7) { + if (val & 0xaf) + return; + } + if (svga->crtcreg == 9) { + if (val & 0x20) + return; + } + if (svga->crtcreg == 0x11) { + if (val & 0x0f) + return; + } + if ((svga->crtcreg == 0x10) || + (svga->crtcreg == 0x12) || + (svga->crtcreg == 0x15) || + (svga->crtcreg == 0x16)) + return; + } + if (mach->regs[0xb4] & 0x10) { + if ((svga->crtcreg == 0x0a) || + (svga->crtcreg == 0x0b)) + return; + } + if (mach->regs[0xb4] & 0x20) { + if (svga->crtcreg == 8) { + if (val & 0x7f) + return; + } + if (svga->crtcreg == 0x14) { + if (val & 0x1f) + return; + } + } old = svga->crtc[svga->crtcreg]; svga->crtc[svga->crtcreg] = val; @@ -2725,25 +2776,97 @@ mach_set_resolution(mach_t *mach, svga_t *svga) if (dev->v_syncstart == 1) dev->v_syncstart = 0x0601; + mach->accel.clock_sel_mode = 0; mach_log("ATI Mode: set=%02x, dispcntl=%02x, h_total=%d, hdisp=%d, vdisp=%d, v_total=%04x, v_syncstart=%04x, hsync_start=%d, hsync_width=%d, clocksel=%02x, advancedcntl=%02x.\n", mach->shadow_set & 0x03, dev->disp_cntl, dev->h_total, dev->hdisp, dev->vdisp, dev->v_total, dev->v_syncstart, dev->hsync_start, dev->hsync_width, mach->accel.clock_sel & 0xff, dev->accel.advfunc_cntl & 0x05); - if ((dev->disp_cntl >> 5) == 1) { /*Enable the 8514/A subsystem and set modes according to the shadow sets if needed.*/ + if ((dev->disp_cntl_2 >> 5) == 1) { /*Enable the 8514/A subsystem and set modes according to the shadow sets if needed.*/ switch (mach->shadow_set & 0x03) { case 0x01: if (!(dev->accel.advfunc_cntl & 0x04)) { - dev->h_total = 0x64; dev->hdisp = 640; dev->vdisp = 480; - dev->v_total = 0x0419; - dev->v_syncstart = 0x03d7; + if (ATI_8514A_ULTRA) { + dev->h_total = (mach->eeprom.data[0x11] & 0xff) + 1; + dev->v_total = mach->eeprom.data[0x0d] + 1; + dev->v_syncstart = mach->eeprom.data[9] + 1; + mach->accel.clock_sel_mode = (mach->eeprom.data[4] & 0xff) << 2; + } else { + mach_log("Mach: EEPROM 640x480: %04x.\n", mach->eeprom.data[7]); + switch (mach->eeprom.data[7] & 0xff) { + case 0x00: /*640x480 60Hz Non-interlaced*/ + default: + dev->h_total = 0x64; + dev->v_total = 0x0419; + dev->v_syncstart = 0x03d7; + mach->accel.clock_sel_mode = 0x50; + break; + case 0x01: /*640x480 72Hz Non-interlaced*/ + dev->h_total = 0x6a; + dev->v_total = 0x040c; + dev->v_syncstart = 0x03d1; + mach->accel.clock_sel_mode = 0x24; + break; + case 0x03: /*640x480 72Hz Non-interlaced Alt*/ + dev->h_total = 0x71; + dev->v_total = 0x04ca; + dev->v_syncstart = 0x0422; + mach->accel.clock_sel_mode = 0x6c; + break; + } + } } break; case 0x02: if (dev->accel.advfunc_cntl & 0x04) { - dev->h_total = 0x9e; dev->hdisp = 1024; dev->vdisp = 768; - dev->v_total = 0x0669; - dev->v_syncstart = 0x0601; + if (ATI_8514A_ULTRA) { + dev->h_total = ((mach->eeprom.data[0x11] >> 8) & 0xff) + 1; + dev->v_total = mach->eeprom.data[0x0c] + 1; + dev->v_syncstart = mach->eeprom.data[8] + 1; + mach->accel.clock_sel_mode = ((mach->eeprom.data[4] >> 8) & 0xff) << 2; + } else { + mach_log("Mach: EEPROM 1024x768: %04x.\n", mach->eeprom.data[9]); + switch (mach->eeprom.data[9] & 0xff) { + case 0x00: /*1024x768 76Hz Non-interlaced*/ + dev->h_total = 0xa3; + dev->v_total = 0x064b; + dev->v_syncstart = 0x060c; + mach->accel.clock_sel_mode = 0x2c; + break; + + case 0x01: /*1024x768 87Hz Interlaced*/ + default: + dev->h_total = 0x9e; + dev->v_total = 0x0669; + dev->v_syncstart = 0x0601; + mach->accel.clock_sel_mode = 0x1c; + break; + case 0x02: /*1024x768 60Hz Non-interlaced*/ + dev->h_total = 0xa8; + dev->v_total = 0x064a; + dev->v_syncstart = 0x0603; + mach->accel.clock_sel_mode = 0x3c; + break; + case 0x04: /*1024x768 70Hz Non-interlaced*/ + dev->h_total = 0xa6; + dev->v_total = 0x064a; + dev->v_syncstart = 0x0603; + mach->accel.clock_sel_mode = 0x38; + break; + case 0x08: /*1024x768 72Hz Non-interlaced*/ + dev->h_total = 0xa1; + dev->v_total = 0x064a; + dev->v_syncstart = 0x0603; + mach->accel.clock_sel_mode = 0x38; + break; + case 0x82: /*1024x768 66Hz Non-interlaced*/ + dev->h_total = 0xac; + dev->v_total = 0x065c; + dev->v_syncstart = 0x060b; + mach->accel.clock_sel_mode = 0x38; + break; + } + } } break; @@ -2751,23 +2874,93 @@ mach_set_resolution(mach_t *mach, svga_t *svga) break; } svga_recalctimings(svga); - } else if ((dev->disp_cntl >> 5) == 2) { /*Reset 8514/A to defaults if needed.*/ + } else if ((dev->disp_cntl_2 >> 5) == 2) { /*Reset 8514/A to defaults if needed.*/ if (dev->accel.advfunc_cntl & 0x04) { if (dev->hdisp == 640) { - dev->h_total = 0x9e; dev->hdisp = 1024; dev->vdisp = 768; - dev->v_total = 0x0669; - dev->v_syncstart = 0x0601; + if (ATI_8514A_ULTRA) { + dev->h_total = ((mach->eeprom.data[0x11] >> 8) & 0xff) + 1; + dev->v_total = mach->eeprom.data[0x0c] + 1; + dev->v_syncstart = mach->eeprom.data[8] + 1; + mach->accel.clock_sel_mode = ((mach->eeprom.data[4] >> 8) & 0xff) << 2; + } else { + mach_log("Mach Reset: EEPROM 1024x768: %04x.\n", mach->eeprom.data[9]); + switch (mach->eeprom.data[9] & 0xff) { + case 0x00: /*1024x768 76Hz Non-interlaced*/ + dev->h_total = 0xa3; + dev->v_total = 0x064b; + dev->v_syncstart = 0x060c; + mach->accel.clock_sel_mode = 0x2c; + break; + case 0x01: /*1024x768 87Hz Interlaced*/ + default: + dev->h_total = 0x9e; + dev->v_total = 0x0669; + dev->v_syncstart = 0x0601; + mach->accel.clock_sel_mode = 0x1c; + break; + case 0x02: /*1024x768 60Hz Non-interlaced*/ + dev->h_total = 0xa8; + dev->v_total = 0x064a; + dev->v_syncstart = 0x0603; + mach->accel.clock_sel_mode = 0x3c; + break; + case 0x04: /*1024x768 70Hz Non-interlaced*/ + dev->h_total = 0xa6; + dev->v_total = 0x064a; + dev->v_syncstart = 0x0603; + mach->accel.clock_sel_mode = 0x38; + break; + case 0x08: /*1024x768 72Hz Non-interlaced*/ + dev->h_total = 0xa1; + dev->v_total = 0x064a; + dev->v_syncstart = 0x0603; + mach->accel.clock_sel_mode = 0x38; + break; + case 0x82: /*1024x768 66Hz Non-interlaced*/ + dev->h_total = 0xac; + dev->v_total = 0x065c; + dev->v_syncstart = 0x060b; + mach->accel.clock_sel_mode = 0x38; + break; + } + } svga_recalctimings(svga); } } else { if (dev->hdisp == 1024) { - dev->h_total = 0x64; dev->hdisp = 640; dev->vdisp = 480; - dev->v_total = 0x0419; - dev->v_syncstart = 0x03d7; + if (ATI_8514A_ULTRA) { + dev->h_total = (mach->eeprom.data[0x11] & 0xff) + 1; + dev->v_total = mach->eeprom.data[0x0d] + 1; + dev->v_syncstart = mach->eeprom.data[9] + 1; + mach->accel.clock_sel_mode = (mach->eeprom.data[4] & 0xff) << 2; + } else { + mach_log("Mach: EEPROM 640x480: %04x.\n", mach->eeprom.data[7]); + switch (mach->eeprom.data[7] & 0xff) { + case 0x00: /*640x480 60Hz Non-interlaced*/ + default: + dev->h_total = 0x64; + dev->v_total = 0x0419; + dev->v_syncstart = 0x03d7; + mach->accel.clock_sel_mode = 0x50; + break; + case 0x01: /*640x480 72Hz Non-interlaced*/ + dev->h_total = 0x6a; + dev->v_total = 0x040c; + dev->v_syncstart = 0x03d1; + mach->accel.clock_sel_mode = 0x24; + break; + case 0x03: /*640x480 72Hz Non-interlaced Alt*/ + dev->h_total = 0x71; + dev->v_total = 0x04ca; + dev->v_syncstart = 0x0422; + mach->accel.clock_sel_mode = 0x6c; + break; + } + } svga_recalctimings(svga); } } @@ -2780,6 +2973,7 @@ ati8514_recalctimings(svga_t *svga) { mach_t *mach = (mach_t *) svga->ext8514; ibm8514_t *dev = (ibm8514_t *) svga->dev8514; + int _8514_modes = 0; mach_log("ON=%d, vgahdisp=%d.\n", dev->on, svga->hdisp); if (dev->on) { @@ -2790,6 +2984,29 @@ ati8514_recalctimings(svga_t *svga) dev->accel.ge_offset = (mach->accel.ge_offset_lo | (mach->accel.ge_offset_hi << 16)) << 2; mach->accel.crt_offset = (mach->accel.crt_offset_lo | (mach->accel.crt_offset_hi << 16)) << 2; + switch (mach->accel.clock_sel_mode) { + case 0x1c: + dev->interlace = 1; + _8514_modes = 1; + break; + case 0x24: + case 0x2c: + case 0x38: + case 0x3c: + case 0x50: + case 0x6c: + dev->interlace = 0; + _8514_modes = 2; + break; + default: + break; + } + + if (_8514_modes) + dev->ven_clock = mach->accel.clock_sel_mode & 0x7c; + else + dev->ven_clock = mach->accel.clock_sel & 0x7c; + dev->accel.ge_offset -= mach->accel.crt_offset; mach_log("HDISP=%d, VDISP=%d, shadowset=%x, 8514/A mode=%x, clocksel=%02x.\n", @@ -2811,10 +3028,11 @@ ati8514_recalctimings(svga_t *svga) else if (dev->h_disp == 640) dev->dispend = 480; - if (dev->accel.advfunc_cntl & 0x04) - svga->clock_8514 = (cpuclock * (double) (1ULL << 32)) / 44900000.0; - else - svga->clock_8514 = (cpuclock * (double) (1ULL << 32)) / 25175000.0; + dev->h_disp_time = dev->h_disp >> 3; + + svga->clock_8514 = (cpuclock * (double) (1ULL << 32)) / svga->getclock8514((dev->ven_clock >> 2) & 0x0f, svga->clock_gen8514) / 2.0; + if (dev->ven_clock & 0x40) + svga->clock_8514 *= 2.0; if (dev->interlace) dev->dispend >>= 1; @@ -2840,12 +3058,24 @@ mach_recalctimings(svga_t *svga) { mach_t *mach = (mach_t *) svga->priv; ibm8514_t *dev = (ibm8514_t *) svga->dev8514; - int clock_sel; + int clock_sel = 0x00; + int _8514_modes = 0; if (mach->regs[0xad] & 0x08) svga->hblankstart = ((mach->regs[0x0d] >> 2) << 8) + svga->crtc[2]; - clock_sel = ((svga->miscout >> 2) & 3) | ((mach->regs[0xbe] & 0x10) >> 1) | ((mach->regs[0xb9] & 2) << 1); + if (svga->miscout & 0x04) + clock_sel |= 0x01; + if (svga->miscout & 0x08) + clock_sel |= 0x02; + if (mach->regs[0xb9] & 0x02) + clock_sel |= 0x04; + if (mach->regs[0xbe] & 0x10) + clock_sel |= 0x08; + + svga->interlace = !!(mach->regs[0xbe] & 0x02); + if (svga->interlace) + svga->dispend >>= 1; if (ATI_MACH32) { if (mach->regs[0xad] & 0x04) @@ -2887,6 +3117,7 @@ mach_recalctimings(svga_t *svga) } mach_log("ON=%d, override=%d, gelo=%04x, gehi=%04x, crtlo=%04x, crthi=%04x, vgahdisp=%d.\n", dev->on, svga->override, mach->accel.ge_offset_lo, mach->accel.ge_offset_hi, mach->accel.crt_offset_lo, mach->accel.crt_offset_hi, svga->hdisp); + if (dev->on) { dev->memaddr_latch = 0; /*(mach->accel.crt_offset_lo | (mach->accel.crt_offset_hi << 16)) << 2;*/ dev->interlace = !!(dev->disp_cntl & 0x10); @@ -2896,6 +3127,41 @@ mach_recalctimings(svga_t *svga) dev->accel.ge_offset = (mach->accel.ge_offset_lo | (mach->accel.ge_offset_hi << 16)); mach->accel.crt_offset = (mach->accel.crt_offset_lo | (mach->accel.crt_offset_hi << 16)); + switch (mach->accel.clock_sel_mode) { + case 0x1c: + dev->interlace = 1; + _8514_modes = 1; + break; + case 0x24: + case 0x2c: + case 0x38: + case 0x3c: + case 0x50: + case 0x6c: + dev->interlace = 0; + _8514_modes = 2; + break; + default: + break; + } + + if (_8514_modes) + dev->ven_clock = mach->accel.clock_sel_mode & 0x7c; + else + dev->ven_clock = mach->accel.clock_sel & 0x7c; + + if (ATI_MACH32) { + mach_log("Mach32: Clock=%02x, double=%02x, h_total=%02x.\n", (dev->ven_clock >> 2) & 0x0f, dev->ven_clock & 0x40, dev->h_total); + svga->clock_8514 = (cpuclock * (double) (1ULL << 32)) / svga->getclock8514((dev->ven_clock >> 2) & 0x0f, svga->clock_gen8514) / 2.0; + } else { + mach_log("Mach8: Clock=%02x, double=%02x, h_total=%02x, selmode=%02x.\n", (dev->ven_clock >> 2) & 0x0f, dev->ven_clock & 0x40, dev->h_total, mach->accel.clock_sel_mode); + svga->clock_8514 = (cpuclock * (double) (1ULL << 32)) / svga->getclock8514((dev->ven_clock >> 2) & 0x0f, svga->clock_gen8514) / 2.0; + if ((((dev->ven_clock >> 2) & 0x0f) == 0x09) && (dev->h_total == 0x6b)) + svga->clock_8514 /= 2.0; + } + if (dev->ven_clock & 0x40) + svga->clock_8514 *= 2.0; + if (dev->bpp) { dev->accel.ge_offset <<= 1; mach->accel.crt_offset <<= 1; @@ -2919,18 +3185,16 @@ mach_recalctimings(svga_t *svga) dev->h_disp = dev->hdisp; dev->dispend = dev->vdisp; if (dev->dispend == 959) { /*FIXME: vertical resolution mess on EEPROM tests on Mach8*/ - dev->dispend >>= 1; dev->dispend++; + dev->dispend >>= 1; } else if (dev->dispend == 600) dev->h_disp = 800; else if (dev->h_disp == 640) dev->dispend = 480; - dev->h_disp_time = dev->hdisp >> 3; + dev->h_disp_time = dev->h_disp >> 3; - svga->clock_8514 = (cpuclock * (double) (1ULL << 32)) / svga->getclock((mach->accel.clock_sel >> 2) & 0x0f, svga->clock_gen); - if (mach->accel.clock_sel & 0x40) - svga->clock_8514 *= 2; + mach_log("8514/A modes=%d, clocksel=%02x, clkselmode=%02x, divide reg ibm=%02x, divide reg vga=%02x, vgainterlace=%x, interlace=%x, htotal=%02x.\n", _8514_modes, mach->accel.clock_sel & 0xfe, mach->accel.clock_sel_mode & 0xfe, mach->accel.clock_sel & 0x40, mach->regs[0xb8] & 0x40, svga->interlace, dev->interlace, dev->htotal); if (dev->interlace) dev->dispend >>= 1; @@ -3057,32 +3321,32 @@ mach_recalctimings(svga_t *svga) } } else { dev->mode = VGA_MODE; - if (!svga->scrblank && (svga->crtc[0x17] & 0x80) && svga->attr_palette_enable) { + if (!svga->scrblank && svga->attr_palette_enable) { mach_log("GDCREG5=%02x, ATTR10=%02x, ATI B0 bit 5=%02x, ON=%d.\n", svga->gdcreg[5] & 0x60, svga->attrregs[0x10] & 0x40, mach->regs[0xb0] & 0x20, dev->on); + if (ATI_MACH32) + svga->clock = (cpuclock * (double) (1ULL << 32)) / svga->getclock(clock_sel, svga->clock_gen); + else + svga->clock = (cpuclock * (double) (1ULL << 32)) / svga->getclock(clock_sel ^ 0x08, svga->clock_gen); + + switch ((mach->regs[0xb8] >> 6) & 3) { + case 0: + default: + break; + case 1: + svga->clock *= 2.0; + break; + case 2: + svga->clock *= 3.0; + break; + case 3: + svga->clock *= 4.0; + break; + } + + mach_log("VGA clock sel=%02x, divide reg=%02x, miscout bits2-3=%x, machregbe bit4=%02x, machregb9 bit1=%02x, charwidth=%d, htotal=%02x, hdisptime=%02x, seqregs1 bit 3=%02x.\n", clock_sel, (mach->regs[0xb8] >> 6) & 3, svga->miscout & 0x0c, mach->regs[0xbe] & 0x10, mach->regs[0xb9] & 0x02, svga->char_width, svga->htotal, svga->hdisp_time, svga->seqregs[1] & 8); if ((svga->gdcreg[6] & 0x01) || (svga->attrregs[0x10] & 0x01)) { if ((svga->gdcreg[5] & 0x40) || (svga->attrregs[0x10] & 0x40) || (mach->regs[0xb0] & 0x20)) { - svga->clock = (cpuclock * (double) (1ULL << 32)) / svga->getclock(clock_sel, svga->clock_gen); - mach_log("VGA clock=%02x.\n", mach->regs[0xa7] & 0x80); - if (ATI_MACH32) { - if (mach->regs[0xb8] & 0x40) - svga->clock *= 2; - } else { - switch (mach->regs[0xb8] & 0xc0) { - case 0x40: - svga->clock *= 2; - break; - case 0x80: - svga->clock *= 3; - break; - case 0xc0: - svga->clock *= 4; - break; - - default: - break; - } - } svga->map8 = svga->pallook; mach_log("Lowres=%x, seqreg[1]bit3=%x.\n", svga->lowres, svga->seqregs[1] & 8); if (svga->lowres) @@ -3120,6 +3384,7 @@ mach_accel_out_fifo(mach_t *mach, svga_t *svga, ibm8514_t *dev, uint16_t port, u switch (port) { case 0x2e8: + mach_log("HTOTAL=%04x, len=%d, set=%x, ATI mode bit=%x.\n", val, len, mach->shadow_set & 0x03, mach->accel.clock_sel & 0x01); if ((mach->accel.clock_sel & 0x01) || (!(mach->accel.clock_sel & 0x01) && (mach->shadow_set & 0x03))) { /*For 8514/A mode, take the shadow sets into account.*/ if (!(mach->shadow_cntl & 0x04)) dev->htotal = val; @@ -3149,7 +3414,7 @@ mach_accel_out_fifo(mach_t *mach, svga_t *svga, ibm8514_t *dev, uint16_t port, u if (len == 2) { mach_log("HDISP and HTOTAL=%04x, len=%d, set=%x, ATI mode bit=%x.\n", val, len, mach->shadow_set & 0x03, mach->accel.clock_sel & 0x01); if ((mach->accel.clock_sel & 0x01) || (!(mach->accel.clock_sel & 0x01) && (mach->shadow_set & 0x03))) { /*For 8514/A mode, take the shadow sets into account.*/ - if (!(mach->shadow_cntl & 0x04)) + if ((!(mach->shadow_cntl & 0x04)) && ((val >> 8) & 0xff)) dev->htotal = (val >> 8) & 0xff; if (!(mach->shadow_cntl & 0x08)) { @@ -3177,7 +3442,7 @@ mach_accel_out_fifo(mach_t *mach, svga_t *svga, ibm8514_t *dev, uint16_t port, u if (len == 1) { mach_log("HDISP and HTOTAL+1=%02x, len=%d, set=%x, ATI mode bit=%x.\n", val, len, mach->shadow_set & 0x03, mach->accel.clock_sel & 0x01); if ((mach->accel.clock_sel & 0x01) || (!(mach->accel.clock_sel & 0x01) && (mach->shadow_set & 0x03))) { /*For 8514/A mode, take the shadow sets into account.*/ - if (!(mach->shadow_cntl & 0x04)) { + if (!(mach->shadow_cntl & 0x04) && val) { dev->htotal = val; } } @@ -3292,11 +3557,16 @@ mach_accel_out_fifo(mach_t *mach, svga_t *svga, ibm8514_t *dev, uint16_t port, u break; case 0x22e8: - if ((mach->shadow_cntl & 0x03) == 0x00) - dev->disp_cntl = val; + if ((mach->accel.clock_sel & 0x01) || (!(mach->accel.clock_sel & 0x01) && (mach->shadow_set & 0x03))) { + if ((mach->shadow_cntl & 0x03) == 0x00) + dev->disp_cntl = val; + } - mach_log("ATI 8514/A: DISP_CNTL write %04x=%02x, written=%02x, interlace=%d.\n", - port, val & 0x70, dev->disp_cntl & 0x70, dev->interlace); + if (((mach->shadow_cntl & 0x03) == 0x00) || !dev->local) + dev->disp_cntl_2 = val; + + mach_log("ATI 8514/A: DISP_CNTL write %04x=%02x, written=%02x, interlace=%02x, shadowset=%02x, shadowcntl=%02x.\n", + port, val & 0x70, dev->disp_cntl & 0x70, dev->disp_cntl & 0x10, mach->shadow_set & 0x03, mach->shadow_cntl & 0x03); svga_recalctimings(svga); break; @@ -3796,9 +4066,9 @@ mach_accel_out_fifo(mach_t *mach, svga_t *svga, ibm8514_t *dev, uint16_t port, u case 0x52ef: mach_log("ATI 8514/A: (0x%04x) ScratchPad0 val=%04x.\n", port, val); if (len == 2) - mach->accel.scratch0 = val; + dev->accel.scratch0 = val; else { - WRITE8(port, mach->accel.scratch0, val); + WRITE8(port, dev->accel.scratch0, val); } break; @@ -3806,9 +4076,9 @@ mach_accel_out_fifo(mach_t *mach, svga_t *svga, ibm8514_t *dev, uint16_t port, u case 0x56ef: mach_log("ATI 8514/A: (0x%04x) ScratchPad1 val=%04x.\n", port, val); if (len == 2) - mach->accel.scratch1 = val; + dev->accel.scratch1 = val; else { - WRITE8(port, mach->accel.scratch1, val); + WRITE8(port, dev->accel.scratch1, val); } break; @@ -3849,6 +4119,7 @@ mach_accel_out_fifo(mach_t *mach, svga_t *svga, ibm8514_t *dev, uint16_t port, u else { WRITE8(port, mach->accel.max_waitstates, val); } + mach_log("ATI 8514/A: (0x%04x) val=0x%02x, len=%d.\n", port, val, len); break; case 0x6eee: @@ -3938,8 +4209,10 @@ mach_accel_out_fifo(mach_t *mach, svga_t *svga, ibm8514_t *dev, uint16_t port, u svga_recalctimings(svga); mach32_updatemapping(mach, svga); - } else - ati_eeprom_write(&mach->eeprom, !!(mach->accel.ext_ge_config & 0x04), !!(mach->accel.ext_ge_config & 0x02), !!(mach->accel.ext_ge_config & 0x01)); + } else { + if (mach->accel.ext_ge_config & 0x80) + ati_eeprom_write(&mach->eeprom, !!(mach->accel.ext_ge_config & 0x04), !!(mach->accel.ext_ge_config & 0x02), !!(mach->accel.ext_ge_config & 0x01)); + } break; case 0x7eee: @@ -4891,27 +5164,16 @@ mach_accel_in_call(uint16_t port, mach_t *mach, svga_t *svga, ibm8514_t *dev) case 0x52ee: case 0x52ef: - READ8(port, mach->accel.scratch0); - if (mach->mca_bus) { - if (svga->ext8514 != NULL) { - temp = (((dev->bios_rom.mapping.base >> 7) - 0x1000) >> 4); - if (port & 1) - temp |= 0x01; - } else { - if (mach->accel.scratch0 == 0x1234) - temp = 0x0000; - } - } else { - mach_log("ScratchPad0=%x.\n", mach->accel.scratch0); - if (mach->accel.scratch0 == 0x1234) - temp = 0x0000; - } + READ8(port, dev->accel.scratch0); + mach_log("ScratchPad0=%x.\n", dev->accel.scratch0); + if (dev->accel.scratch0 == 0x1234) + temp = 0x0000; break; case 0x56ee: case 0x56ef: - READ8(port, mach->accel.scratch1); - mach_log("ScratchPad1=%x.\n", mach->accel.scratch1); + READ8(port, dev->accel.scratch1); + mach_log("ScratchPad1=%x.\n", dev->accel.scratch1); break; case 0x5eee: @@ -6218,6 +6480,7 @@ static void mach32_updatemapping(mach_t *mach, svga_t *svga) { ibm8514_t *dev = (ibm8514_t *) svga->dev8514; + xga_t *xga = (xga_t *) svga->xga; if (mach->pci_bus && (!(mach->pci_regs[PCI_REG_COMMAND] & PCI_COMMAND_MEM))) { mach_log("No Mapping.\n"); @@ -6238,6 +6501,11 @@ mach32_updatemapping(mach_t *mach, svga_t *svga) case 0x4: /*64k at A0000*/ mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000); svga->banked_mask = 0xffff; + if (xga_active && (svga->xga != NULL)) { + xga->on = 0; + mem_mapping_set_handler(&svga->mapping, svga_read, svga_readw, svga_readl, svga_write, svga_writew, svga_writel); + mem_mapping_set_p(&svga->mapping, svga); + } break; case 0x8: /*32k at B0000*/ mem_mapping_set_addr(&svga->mapping, 0xb0000, 0x08000); @@ -6314,7 +6582,7 @@ mach32_hwcursor_draw(svga_t *svga, int displine) case 8: color0 = dev->pallook[mach->cursor_col_0]; color1 = dev->pallook[mach->cursor_col_1]; - mach_log("4/8BPP: Color0=%08x, Color1=%08x.\n", color0, color1); + mach_log("4/8BPP: Color0=%08x, Color1=%08x, interlace=%x, oddeven=%d.\n", color0, color1, dev->interlace, dev->hwcursor_oddeven); break; case 15: color0 = video_15to32[((mach->ext_cur_col_0_r << 16) | (mach->ext_cur_col_0_g << 8) | mach->cursor_col_0) & 0xffff]; @@ -7051,6 +7319,38 @@ mach_reset(void *priv) } } +uint8_t +ati8514_rom_readb(uint32_t addr, void *priv) +{ + const ibm8514_t *dev = (ibm8514_t *) priv; + const rom_t *rom = &dev->bios_rom; + uint8_t ret; + + mach_log("ROM1RB=%05x, ", addr); + + addr &= 0x1fff; + ret = rom->rom[addr]; + + mach_log("ReadBAddr1=%03x, ret=%02x.\n", addr, ret); + return (ret); +} + +uint16_t +ati8514_rom_readw(uint32_t addr, void *priv) +{ + const ibm8514_t *dev = (ibm8514_t *) priv; + const rom_t *rom = &dev->bios_rom; + uint16_t ret; + + mach_log("ROM1RW=%05x, ", addr); + + addr &= 0x1fff; + ret = (*(uint16_t *) &(rom->rom[addr])); + + mach_log("ReadWAddr1=%03x, ret=%04x.\n", addr, ret); + return (ret); +} + static void * mach8_init(const device_t *info) { @@ -7134,7 +7434,7 @@ mach8_init(const device_t *info) else mach->config1 |= 0x0c; mach->config1 |= 0x0400; - svga->clock_gen = device_add(&ati18811_1_device); + svga->clock_gen = device_add(&ati18811_1_mach32_device); } else if (mach->mca_bus) { video_inform(VIDEO_FLAG_TYPE_8514, &timing_mach32_mca); if (is286 && !is386) @@ -7142,7 +7442,7 @@ mach8_init(const device_t *info) else mach->config1 |= 0x06; mach->config1 |= 0x0400; - svga->clock_gen = device_add(&ati18811_1_device); + svga->clock_gen = device_add(&ati18811_1_mach32_device); } else if (mach->pci_bus) { video_inform(VIDEO_FLAG_TYPE_8514, &timing_mach32_pci); mach->config1 |= 0x0e; @@ -7151,11 +7451,11 @@ mach8_init(const device_t *info) else mach->config1 |= 0x0400; mach->config2 |= 0x2000; - svga->clock_gen = device_add(&ati18811_1_device); + svga->clock_gen = device_add(&ati18811_1_mach32_device); } else { video_inform(VIDEO_FLAG_TYPE_8514, &timing_gfxultra_isa); mach->config1 |= 0x0400; - svga->clock_gen = device_add(&ati18811_1_device); + svga->clock_gen = device_add(&ati18811_1_mach32_device); } mem_mapping_add(&mach->mmio_linear_mapping, 0, 0, mach32_ap_readb, mach32_ap_readw, mach32_ap_readl, mach32_ap_writeb, mach32_ap_writew, mach32_ap_writel, NULL, MEM_MAPPING_EXTERNAL, mach); mem_mapping_disable(&mach->mmio_linear_mapping); @@ -7177,10 +7477,12 @@ mach8_init(const device_t *info) mach->config1 |= 0x20; mach->config2 = 0x02; - svga->clock_gen = device_add(&ati18811_0_device); + svga->clock_gen = device_add(&ati18811_1_mach32_device); } dev->bpp = 0; svga->getclock = ics2494_getclock; + svga->clock_gen8514 = svga->clock_gen; + svga->getclock8514 = svga->getclock; dev->on = 0; dev->pitch = 1024; @@ -7279,6 +7581,8 @@ ati8514_init(svga_t *svga, void *ext8514, void *dev8514) dev->accel_out_fifo = ati8514_accel_out_fifo; dev->vblank_start = ati8514_vblank_start; + svga->clock_gen8514 = device_add(&ati18811_1_mach32_device); + svga->getclock8514 = ics2494_getclock; } static int diff --git a/src/video/vid_bochs_vbe.c b/src/video/vid_bochs_vbe.c index fd5772b19..0ea268ef7 100644 --- a/src/video/vid_bochs_vbe.c +++ b/src/video/vid_bochs_vbe.c @@ -511,7 +511,7 @@ bochs_vbe_outw(const uint16_t addr, const uint16_t val, void *priv) svga_recalctimings(&dev->svga); if (!(val & VBE_DISPI_NOCLEARMEM)) { memset(dev->svga.vram, 0, - dev->vbe_regs[VBE_DISPI_INDEX_YRES] * dev->svga.rowoffset); + (size_t) dev->vbe_regs[VBE_DISPI_INDEX_YRES] * dev->svga.rowoffset); } } else dev->svga.read_bank = dev->svga.write_bank = 0; diff --git a/src/video/vid_cga.c b/src/video/vid_cga.c index 1ca742890..01870ae94 100644 --- a/src/video/vid_cga.c +++ b/src/video/vid_cga.c @@ -788,6 +788,8 @@ cga_standalone_init(UNUSED(const device_t *info)) break; } + monitors[monitor_index_global].mon_composite = !!cga->composite; + return cga; } diff --git a/src/video/vid_cga_colorplus.c b/src/video/vid_cga_colorplus.c index af8fd6d99..15d53d543 100644 --- a/src/video/vid_cga_colorplus.c +++ b/src/video/vid_cga_colorplus.c @@ -26,10 +26,10 @@ #include "cpu.h" #include <86box/io.h> #include <86box/timer.h> +#include <86box/device.h> #include <86box/lpt.h> #include <86box/pit.h> #include <86box/mem.h> -#include <86box/device.h> #include <86box/video.h> #include <86box/vid_cga.h> #include <86box/vid_colorplus.h> @@ -357,7 +357,11 @@ colorplus_standalone_init(UNUSED(const device_t *info)) mem_mapping_add(&colorplus->cga.mapping, 0xb8000, 0x08000, colorplus_read, NULL, NULL, colorplus_write, NULL, NULL, NULL, MEM_MAPPING_EXTERNAL, colorplus); io_sethandler(0x03d0, 0x0010, colorplus_in, NULL, NULL, colorplus_out, NULL, NULL, colorplus); - lpt3_setup(LPT_MDA_ADDR); + colorplus->lpt = device_add_inst(&lpt_port_device, 1); + lpt_port_setup(colorplus->lpt, LPT_MDA_ADDR); + lpt_set_3bc_used(1); + + monitors[monitor_index_global].mon_composite = colorplus->cga.composite; return colorplus; } diff --git a/src/video/vid_cga_comp.c b/src/video/vid_cga_comp.c index ca9c2c9df..a316f79fb 100644 --- a/src/video/vid_cga_comp.c +++ b/src/video/vid_cga_comp.c @@ -28,9 +28,12 @@ #include <86box/mem.h> #include <86box/vid_cga.h> #include <86box/vid_cga_comp.h> +#include <86box/thread.h> int CGA_Composite_Table[1024]; +static mutex_t* cga_comp_mutex = NULL; + static double brightness = 0; static double contrast = 100; static double saturation = 100; @@ -69,23 +72,30 @@ static double intensity[4] = { #define NEW_CGA(c, i, r, g, b) (((c) / 0.72) * 0.29 + ((i) / 0.28) * 0.32 + ((r) / 0.28) * 0.1 + ((g) / 0.28) * 0.22 + ((b) / 0.28) * 0.07) -double mode_brightness; -double mode_contrast; -double mode_hue; -double min_v; -double max_v; +volatile double mode_brightness; +volatile double mode_contrast; +volatile double mode_hue; +volatile double min_v; +volatile double max_v; -double video_ri; -double video_rq; -double video_gi; -double video_gq; -double video_bi; -double video_bq; -int video_sharpness; -int tandy_mode_control = 0; +volatile double video_ri; +volatile double video_rq; +volatile double video_gi; +volatile double video_gq; +volatile double video_bi; +volatile double video_bq; +volatile int video_sharpness; static bool new_cga = 0; +static uint8_t current_cgamode = 0; + +int vid_cga_comp_brightness = 0; +int vid_cga_comp_sharpness = 0; +int vid_cga_comp_hue = 0; +int vid_cga_comp_saturation = 100; +int vid_cga_comp_contrast = 100; + void update_cga16_color(uint8_t cgamode) { @@ -109,6 +119,14 @@ update_cga16_color(uint8_t cgamode) static const double bi = -1.1069; static const double bq = 1.7046; + if (!cga_comp_mutex) + cga_comp_mutex = thread_create_mutex(); + + if (is_cpu_thread) + thread_wait_mutex(cga_comp_mutex); + + current_cgamode = cgamode; + if (!new_cga) { min_v = chroma_multiplexer[0] + intensity[0]; max_v = chroma_multiplexer[255] + intensity[3]; @@ -170,6 +188,9 @@ update_cga16_color(uint8_t cgamode) video_bi = (int) (bi * iq_adjust_i + bq * iq_adjust_q); video_bq = (int) (-bi * iq_adjust_q + bq * iq_adjust_i); video_sharpness = (int) (sharpness * 256 / 100); + + if (is_cpu_thread) + thread_release_mutex(cga_comp_mutex); } static uint8_t @@ -369,17 +390,41 @@ DecreaseSharpness(uint8_t cgamode) update_cga16_color(cgamode); } +void +cga_comp_reload(int new_brightness, int new_saturation, int new_sharpness, int new_hue, int new_contrast) +{ + if (!cga_comp_mutex) + cga_comp_mutex = thread_create_mutex(); + + if (!is_cpu_thread) + thread_wait_mutex(cga_comp_mutex); + + brightness = new_brightness; + contrast = new_contrast; + saturation = new_saturation; + sharpness = new_sharpness; + hue_offset = new_hue; + + update_cga16_color(current_cgamode); + + if (!is_cpu_thread) + thread_release_mutex(cga_comp_mutex); +} + void cga_comp_init(int revision) { + if (!cga_comp_mutex) + cga_comp_mutex = thread_create_mutex(); + new_cga = revision; /* Making sure this gets reset after reset. */ - brightness = 0; - contrast = 100; - saturation = 100; - sharpness = 0; - hue_offset = 0; + brightness = vid_cga_comp_brightness; + contrast = vid_cga_comp_contrast; + saturation = vid_cga_comp_saturation; + sharpness = vid_cga_comp_sharpness; + hue_offset = vid_cga_comp_hue; update_cga16_color(0); } diff --git a/src/video/vid_cga_compaq.c b/src/video/vid_cga_compaq.c index 1e21d63c1..81b063248 100644 --- a/src/video/vid_cga_compaq.c +++ b/src/video/vid_cga_compaq.c @@ -457,6 +457,8 @@ compaq_cga_init(const device_t *info) dev->crtc[9] = 13; + monitors[monitor_index_global].mon_composite = !!dev->composite; + return dev; } diff --git a/src/video/vid_cga_quadcolor.c b/src/video/vid_cga_quadcolor.c index 642391679..4159dc2c1 100644 --- a/src/video/vid_cga_quadcolor.c +++ b/src/video/vid_cga_quadcolor.c @@ -838,6 +838,8 @@ quadcolor_standalone_init(UNUSED(const device_t *info)) break; } + monitors[monitor_index_global].mon_composite = !!quadcolor->composite; + return quadcolor; } diff --git a/src/video/vid_cga_v6355.c b/src/video/vid_cga_v6355.c new file mode 100644 index 000000000..bdd4b82e6 --- /dev/null +++ b/src/video/vid_cga_v6355.c @@ -0,0 +1,1179 @@ +/* + * 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. + * + * Emulation of the Yamaha V6355 graphics card. + * + * Authors: Sarah Walker, + * John Elliott, + * Miran Grca, + * W. M. Martinez, + * + * Copyright 2008-2025 Sarah Walker. + * Copyright 2025 John Elliott. + * Copyright 2016-2025 Miran Grca. + * Copyright 2023-2025 W. M. Martinez + */ +#include +#include +#include +#include +#include +#include +#include <86box/86box.h> +#include "cpu.h" +#include <86box/io.h> +#include <86box/timer.h> +#include <86box/pit.h> +#include <86box/mem.h> +#include <86box/rom.h> +#include <86box/device.h> +#include <86box/video.h> +#include <86box/vid_v6355.h> +#include <86box/vid_cga_comp.h> +#include <86box/plat_unused.h> + +/* Emulation of the Yamaha V6355 chipset. This is a CGA clone that was + * probably designed primarily for laptops, where the primary display was + * a fixed-resolution LCD panel and there was the option of connecting to + * an external CGA monitor or PAL/SECAM television. + * + * Consequently, unlike a real CGA, it doesn't implement the first ten 6845 + * registers; instead, a small number of fixed resolutions can be selected + * using the V6355's own registers at 0x3DD / 0x3DF. Width is either 512 or 640 + * pixels; height is 64, 192, 200 or 204 pixels. + * + * Other features include: + * - MDA attribute support + * - Palette support - mapping from RGBI colour to 9-bit rrrgggbbb colours + * (when output is to composite) + * - Hardware mouse pointer support + * + * Outline of the V6355's extra registers, accessed through ports 0x3DD (index) + * and 0x3DE (data): + * + * 0x00-0x1F: Mouse pointer AND mask + * 0x20-0x3F: Mouse pointer XOR mask + * 0x40-0x5F: Palette for composite output. 0r,gb,0r,gb,0r,gb etc. + * 0x60-0x61: Mouse pointer X (big-endian, in 320x200 coordinates) + * 0x62: Not used (would be high byte of mouse pointer Y) + * 0x63: Mouse pointer Y + * 0x64: Mouse pointer visibility & vertical adjustment + * 0x65: Screen height & width, display type, RAM type + * 0x66: LCD adjust, MDA attribute emulation + * 0x67: Horizontal adjustment, other configuration + * 0x68: Mouse pointer colour + * 0x69: Control data register (not well documented) + * + * Currently unimplemented: + * > Display type (PAL/SECAM @50Hz vs NTSC @60Hz) + * > MDA monitor support + * > LCD panel support + * > Horizontal / vertical position adjustments + * > 160x200x16 and 640x200x16 video modes. Documentation suggests that these + * should be selected by setting bit 6 of the CGA control register, but + * that doesn't work on my real hardware, so I can't test and therefore + * can't replicate + * > Palette support on composite output. Composite_Process() does not + * appear to have any support for an arbitrary palette. + */ + +#define V6355_RGB 0 +#define V6355_COMPOSITE 1 +#define V6355_TRUECOLOR 2 + +#define COMPOSITE_OLD 0 +#define COMPOSITE_NEW 1 + +#define DOUBLE_NONE 0 +#define DOUBLE_SIMPLE 1 +#define DOUBLE_INTERPOLATE_SRGB 2 +#define DOUBLE_INTERPOLATE_LINEAR 3 + +#define DEVICE_VRAM 0x4000 +#define DEVICE_VRAM_MASK 0x3fff + +typedef union { + uint32_t color; + struct { + uint8_t b; + uint8_t g; + uint8_t r; + uint8_t a; + }; +} color_t; + +static uint8_t crtcmask[32] = { + 0xff, 0xff, 0xff, 0xff, 0x7f, 0x1f, 0x7f, 0x7f, 0xf3, 0x1f, 0x7f, 0x1f, 0x3f, 0xff, 0x3f, 0xff, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static uint8_t interp_lut[2][256][256]; + +static video_timings_t timing_v6355 = { .type = VIDEO_ISA, .write_b = 8, .write_w = 16, .write_l = 32, .read_b = 8, .read_w = 16, .read_l = 32 }; + +static uint8_t mdamap[256][2][2]; + +/* Default values for palette registers */ +static uint8_t defpalette[32] = { + 0x00, 0x00, /* Black */ + 0x00, 0x04, /* Blue */ + 0x00, 0x40, /* Green */ + 0x00, 0x44, /* Cyan */ + 0x04, 0x00, /* Red */ + 0x04, 0x04, /* Magenta */ + 0x04, 0x40, /* Yellow */ + 0x04, 0x44, /* Light grey */ + 0x01, 0x11, /* Dark grey */ + 0x00, 0x06, /* Bright blue */ + 0x00, 0x60, /* Bright green */ + 0x00, 0x66, /* Bright cyan */ + 0x06, 0x00, /* Bright red */ + 0x06, 0x06, /* Bright magenta */ + 0x06, 0x60, /* Bright yellow */ + 0x07, 0x77, /* Bright white */ +}; + +static void v6355_recalctimings(v6355_t *v6355); + +static void +v6355_out(uint16_t addr, uint8_t val, void *priv) +{ + v6355_t *v6355 = (v6355_t *) priv; + uint8_t old; + + switch (addr) { + case 0x3d0: + case 0x3d2: + case 0x3d4: + case 0x3d6: + v6355->crtcreg = val & 31; + break; + case 0x3d1: + case 0x3d3: + case 0x3d5: + case 0x3d7: + old = v6355->crtc[v6355->crtcreg]; + v6355->crtc[v6355->crtcreg] = val & crtcmask[v6355->crtcreg]; + if (old != val) { + if (v6355->crtcreg < 0xe || v6355->crtcreg > 0x10) + v6355_recalctimings(v6355); + } + break; + case 0x3d8: + if (((v6355->cgamode ^ val) & 5) != 0) { + v6355->cgamode = val; + update_cga16_color(v6355->cgamode); + } + v6355->cgamode = val; + break; + case 0x3d9: + v6355->cgacol = val; + break; + case 0x3dd: + v6355->v6355reg = val; + break; + case 0x3de: + v6355->v6355data[v6355->v6355reg] = val; + + /* Writes in the 0x40-0x5F range update the palette */ + if (v6355->v6355reg >= 0x40 && v6355->v6355reg < 0x60) { + int r = (v6355->v6355data[v6355->v6355reg & 0xFE]) & 7; + int g = (v6355->v6355data[v6355->v6355reg | 0x01] >> 4) & 7; + int b = (v6355->v6355data[v6355->v6355reg | 0x01]) & 7; + v6355->v6355pal[(v6355->v6355reg - 0x40) / 2] = + makecol(r * 0xFF / 7, g * 0xFF / 7, b * 0xFF / 7); + } + + /* Register autoincrements after a write. */ + v6355->v6355reg = (v6355->v6355reg + 1) % sizeof(v6355->v6355data); + break; + case 0x3df: + /* Supposedly used for memory paging in 16-colour mode, but + * I've found no documentation to explain how */ + break; + } +} + +static uint8_t +v6355_in(uint16_t addr, void *priv) +{ + v6355_t *v6355 = (v6355_t *) priv; + uint8_t ret = 0xff; + + switch (addr) { + case 0x3d4: + ret = v6355->crtcreg; + break; + case 0x3d5: + ret = v6355->crtc[v6355->crtcreg]; + break; + case 0x3da: + ret = v6355->cgastat; + break; + } + + return ret; +} + +static void +v6355_write(uint32_t addr, uint8_t val, void *priv) +{ + v6355_t *v6355 = (v6355_t *) priv; + + v6355->vram[addr & 0x3fff] = val; + + cycles -= 4; +} + +static uint8_t +v6355_read(uint32_t addr, void *priv) +{ + v6355_t *v6355 = (v6355_t *) priv; + + cycles -= 4; + + return v6355->vram[addr & 0x3fff]; +} + +/* Get width of display area (always 512px or 640px) */ +static uint32_t +v6355_width(v6355_t *v6355) +{ + return (v6355->v6355data[0x65] & 4) ? 512 : 640; +} + +/* Get height of display area (192px, 200px, 204px or 64px) */ +static uint32_t +v6355_height(v6355_t *v6355) +{ + static const unsigned heights[4] = { 192, 200, 204, 64 }; + + return heights[v6355->v6355data[0x65] & 3]; +} + +/* Timings on a V6355 are largely fixed */ +static void +v6355_recalctimings(v6355_t *v6355) +{ + double disptime; + double _dispontime, _dispofftime; +#ifndef USE_CGA_TIMINGS + double crtcconst = (cpuclock / 21477270.0 * (double) (1ULL << 32)) * 8.0; +#endif + + uint32_t w = v6355_width(v6355); + + disptime = w + 33; + _dispontime = w; + _dispofftime = disptime - _dispontime; +#ifdef USE_CGA_TIMINGS + _dispontime *= CGACONST; + _dispofftime *= CGACONST; +#else + _dispontime *= crtcconst; + _dispofftime *= crtcconst; +#endif + v6355->dispontime = (uint64_t)_dispontime; + v6355->dispofftime = (uint64_t)_dispofftime; +} + +/* Overlay the pointer on a line of the display. pixel[] is an array of 640 + * IBGR values containing the pixels to draw onto */ +static void +v6355_pointer(v6355_t *v6355, uint8_t *pixel) +{ + int c, pxc; + int y = v6355->displine - v6355->firstline; + + /* The pointer coordinates are on a 336x216 grid, with (16,16) being + * the top left-hand corner of the visible area */ + int pointer_x = (v6355->v6355data[0x60] << 8) | (v6355->v6355data[0x61]); + int pointer_y = v6355->v6355data[0x63]; + uint8_t mc; + uint8_t mand; + uint8_t mxor; + uint8_t mflags; + + /* Mouse drawing options */ + mflags = v6355->v6355data[0x64]; + + /* If the pointer is blinking and not currently shown, don't draw it */ + if ((v6355->cgablink & 8) && (mflags & 1)) + return; + + /* If this line doesn't intersect the pointer, nothing to do */ + if ((y < (pointer_y - 16)) || (y >= pointer_y)) + return; + + y -= (pointer_y - 16); + + /* Get mouse AND and XOR masks */ + mand = v6355->v6355data[0x68] & 0x0F; + mxor = (v6355->v6355data[0x68] >> 4) & 0x0F; + + /* Draw up to 16 double-width pixels */ + for (c = 0; c < 32; c++) { + mc = 0x80 >> ((c & 0x0E) >> 1); + pxc = c + 2 * (pointer_x - 16); + + if (pxc < 0 || pxc >= 640) + /* X clipping */ + continue; + + if (mflags & 2) { + /* Apply AND mask? */ + if (v6355->v6355data[y * 2 + c / 16] & mc) + pixel[pxc] &= mand; + } + + if (mflags & 4) { + /* Apply XOR mask? */ + if (v6355->v6355data[y * 2 + c / 16 + 32] & mc) + pixel[pxc] ^= mxor; + } + } +} + +/* Convert attribute byte to CGA colours */ +static void +v6355_map_attrs(v6355_t *v6355, uint8_t chr, uint8_t attr, uint8_t *cols) +{ + if (v6355->v6355data[0x66] & 0x40) { + /* MDA-style attributes */ + int blink = (v6355->cgamode & 0x20) && (v6355->cgablink & 8) && (attr & 0x80); + + cols[1] = mdamap[attr][blink][1]; + cols[0] = mdamap[attr][blink][0]; + } else { + /* CGA attributes (blinking enabled) */ + if (v6355->cgamode & 0x20) { + cols[1] = attr & 15; + cols[0] = (attr >> 4) & 7; + if ((v6355->cgablink & 8) && (attr & 0x80) && !v6355->drawcursor) + cols[1] = cols[0]; + } else { + /* CGA attributes (blinking disabled) */ + cols[1] = attr & 15; + cols[0] = attr >> 4; + } + } +} + +/* Render a line as 640 pixels in 80-column text mode */ +static void +v6355_line_text80(v6355_t *v6355, uint8_t *pixel, uint16_t ca) +{ + int32_t x, c; + uint8_t chr, attr; + uint32_t w = v6355_width(v6355) / 8; + uint8_t cols[2]; + + for (x = 0; x < w; x++) { + if (v6355->cgamode & 8) { + chr = v6355->charbuffer[x << 1]; + attr = v6355->charbuffer[(x << 1) + 1]; + } else + chr = attr = 0; + + v6355_map_attrs(v6355, chr, attr, cols); + + for (c = 0; c < 8; c++) { + uint8_t data = fontdat[chr + v6355->fontbase][v6355->sc & 7]; + + /* Underline attribute if enabled */ + if ((v6355->v6355data[0x66] & 0x80) && ((attr & 7) == 1) && ((v6355->sc & 7) == 7)) + data = 0xff; + + pixel[(x << 3) + c] = cols[(data & (1 << (c ^ 7))) ? 1 : 0]; + } + } +} + +/* Render a line as 640 pixels in 40-column text mode */ +static void +v6355_line_text40(v6355_t *v6355, uint8_t *pixel, uint16_t ca) +{ + int32_t x, c; + uint8_t chr, attr; + uint32_t w = v6355_width(v6355) / 16; + uint8_t cols[2]; + + for (x = 0; x < w; x++) { + if (v6355->cgamode & 8) { + chr = v6355->vram[((v6355->ma + x) << 1) & 0x3fff]; + attr = v6355->vram[(((v6355->ma + x) << 1) + 1) & 0x3fff]; + } else + chr = attr = 0; + + v6355_map_attrs(v6355, chr, attr, cols); + + for (c = 0; c < 8; c++) { + uint8_t data = fontdat[chr + v6355->fontbase][v6355->sc & 7]; + + /* Underline attribute if enabled */ + if ((v6355->v6355data[0x66] & 0x80) && ((attr & 7) == 1) && ((v6355->sc & 7) == 7)) + data = 0xff; + + pixel[(x << 4) + (c << 1)] = pixel[(x << 4) + (c << 1) + 1] = + cols[(data & (1 << (c ^ 7))) ? 1 : 0]; + } + } +} + +/* Render a line as 640 pixels in 320-pixel graphics mode */ +static void +v6355_line_graphics320(v6355_t *v6355, uint8_t *pixel) +{ + int32_t x; + int32_t c; + uint8_t cols[4]; + uint8_t intensity; + uint16_t dat; + uint32_t width = v6355_width(v6355) / 16; + + cols[0] = v6355->cgacol & 15; + + intensity = (v6355->cgacol & 16) ? 8 : 0; + + if (v6355->cgamode & 4) { + cols[1] = intensity | 3; + cols[2] = intensity | 4; + cols[3] = intensity | 7; + } else if (v6355->cgacol & 32) { + cols[1] = intensity | 3; + cols[2] = intensity | 5; + cols[3] = intensity | 7; + } else { + cols[1] = intensity | 2; + cols[2] = intensity | 4; + cols[3] = intensity | 6; + } + + for (x = 0; x < width; x++) { + if (v6355->cgamode & 8) + dat = (v6355->vram[((v6355->ma << 1) & 0x1fff) + ((v6355->sc & 1) * 0x2000)] << 8) | + v6355->vram[((v6355->ma << 1) & 0x1fff) + ((v6355->sc & 1) * 0x2000) + 1]; + else + dat = 0; + + v6355->ma++; + + for (c = 0; c < 8; c++) { + pixel[(x << 4) + (c << 1)] = pixel[(x << 4) + (c << 1) + 1] = cols[dat >> 14]; + dat <<= 2; + } + } +} + +/* Render a line as 640 pixels in 640-pixel graphics mode */ +static void +v6355_line_graphics640(v6355_t *v6355, uint8_t *pixel) +{ + int32_t x; + int32_t c; + uint8_t cols[2]; + uint16_t dat; + uint32_t width = v6355_width(v6355) / 16; + + cols[0] = 0; + cols[1] = v6355->cgacol & 15; + + for (x = 0; x < width; x++) { + if (v6355->cgamode & 8) + dat = (v6355->vram[((v6355->ma << 1) & 0x1fff) + ((v6355->sc & 1) * 0x2000)] << 8) | + v6355->vram[((v6355->ma << 1) & 0x1fff) + ((v6355->sc & 1) * 0x2000) + 1]; + else + dat = 0; + + v6355->ma++; + + for (c = 0; c < 16; c++) { + pixel[(x << 4) + c] = cols[dat >> 15]; + dat <<= 1; + } + } +} + +static void +v6355_render(v6355_t *v6355, int line) +{ + uint16_t ca = (v6355->crtc[15] | (v6355->crtc[14] << 8)) & 0x3fff; + int width = v6355_width(v6355); + int c; + int x; + int drawcursor; + uint32_t cols[4]; + uint8_t pixel[640]; + + /* Draw border */ + cols[0] = ((v6355->cgamode & 0x12) == 0x12) ? 0 : (v6355->cgacol & 15); + + for (c = 0; c < 8; c++) { + ((uint32_t *) buffer32->line[line])[c] = cols[0]; + ((uint32_t *) buffer32->line[line])[c + width + 8] = cols[0]; + } + + /* Render screen data. */ + if (v6355->cgamode & 1) { + /* High-res text */ + v6355_line_text80(v6355, pixel, ca); + v6355_pointer(v6355, pixel); + + for (x = 0; x < (width / 8); x++) { + drawcursor = ((v6355->ma == ca) && v6355->con && v6355->cursoron); + if (drawcursor) { + for (c = 0; c < 8; c++) + ((uint32_t *) buffer32->line[line])[(x << 3) + c + 8] = pixel[(x << 3) + c] ^ 0xffffff; + } else { + for (c = 0; c < 8; c++) + ((uint32_t *)buffer32->line[line])[(x << 3) + c + 8] = pixel[(x << 3) + c]; + } + + v6355->ma++; + } + } else if (!(v6355->cgamode & 2)) { + /* Low-res text */ + v6355_line_text40(v6355, pixel, ca); + v6355_pointer(v6355, pixel); + + for (x = 0; x < (width / 16); x++) { + drawcursor = ((v6355->ma == ca) && v6355->con && v6355->cursoron); + if (drawcursor) { + for (c = 0; c < 16; c++) + ((uint32_t *) buffer32->line[line])[(x << 4) + c + 8] = pixel[(x << 4) + c] ^ 0xffffff; + } else { + for (c = 0; c < 16; c++) + ((uint32_t *)buffer32->line[line])[(x << 4) + c + 8] = pixel[(x << 4) + c]; + } + + v6355->ma++; + } + } else if (!(v6355->cgamode & 16)) { + /* Low-res graphics + * XXX There should be a branch for 160x200x16 graphics somewhere around here */ + v6355_line_graphics320(v6355, pixel); + v6355_pointer(v6355, pixel); + + for (x = 0; x < (width / 16); x++) { + for (c = 0; c < 16; c++) + ((uint32_t *) buffer32->line[line])[(x << 4) + c + 8] = pixel[(x << 4) + c]; + } + } else { + /* High-res graphics + * XXX There should be a branch for 640x200x16 graphics somewhere around here */ + v6355_line_graphics640(v6355, pixel); + v6355_pointer(v6355, pixel); + + for (x = 0; x < (width / 16); x++) { + for (c = 0; c < 16; c++) + ((uint32_t *) buffer32->line[line])[(x << 4) + c + 8] = pixel[(x << 4) + c]; + } + } +} + +static void +v6355_render_blank(v6355_t *v6355, int line) +{ + int width = v6355_width(v6355); + uint32_t cols[4]; + + cols[0] = ((v6355->cgamode & 0x12) == 0x12) ? 0 : (v6355->cgacol & 15); + hline(buffer32, 0, line, width + 16, cols[0]); +} + +static void +v6355_render_process(v6355_t *v6355, int line) +{ + int c; + uint8_t border; + int width = v6355_width(v6355); + int x = width + 16; + + /* Now render the 640 pixels to the display buffer */ + switch (v6355->display_type) { + /* XXX V6355_COMPOSITE can't use the V6355's palette registers */ + case V6355_COMPOSITE: + for (c = 0; c < x; c++) + buffer32->line[line][c] = ((uint32_t *) buffer32->line[line])[c] & 0xf; + + border = ((v6355->cgamode & 0x12) == 0x12) ? 0 : (v6355->cgacol & 15); + + Composite_Process(v6355->cgamode, border, (width + 16) >> 2, buffer32->line[line]); + break; + case V6355_TRUECOLOR: + /* V6355_TRUECOLOR is a fictitious display that behaves like RGB except it + * takes account of the V6355's palette registers */ + for (c = 0; c < x; c++) + ((uint32_t *) buffer32->line[line])[c] = v6355->v6355pal[((uint32_t *) buffer32->line[line])[c] & 0xf]; + break; + default: + video_process_8(width + 16, line); + break; + } +} + +static uint8_t +v6355_interpolate_srgb(uint8_t co1, uint8_t co2, double fraction) +{ + uint8_t ret = ((co2 - co1) * fraction + co1); + + return ret; +} + +static uint8_t +v6355_interpolate_linear(uint8_t co1, uint8_t co2, double fraction) +{ + double c1, c2; + double r1, r2; + uint8_t ret; + + c1 = ((double) co1) / 255.0; + c1 = pow((co1 >= 0) ? c1 : -c1, 2.19921875); + if (co1 <= 0) + c1 = -c1; + c2 = ((double) co2) / 255.0; + c2 = pow((co2 >= 0) ? c2 : -c2, 2.19921875); + if (co2 <= 0) + c2 = -c2; + r1 = ((c2 - c1) * fraction + c1); + r2 = pow((r1 >= 0.0) ? r1 : -r1, 1.0 / 2.19921875); + if (r1 <= 0.0) + r2 = -r2; + ret = (uint8_t) round(r2 * 255.0); + + return ret; +} + +static color_t +v6355_interpolate_lookup(v6355_t *v6355, color_t color1, color_t color2, UNUSED(double fraction)) +{ + color_t ret; + uint8_t dt = v6355->double_type - DOUBLE_INTERPOLATE_SRGB; + + ret.a = 0x00; + ret.r = interp_lut[dt][color1.r][color2.r]; + ret.g = interp_lut[dt][color1.g][color2.g]; + ret.b = interp_lut[dt][color1.b][color2.b]; + + return ret; +} + +static void +v6355_interpolate(v6355_t *v6355, int x, int y, int w, int h) +{ + double quotient = 0.5; + + for (int i = y; i < (y + h); i++) { + if (i & 1) for (int j = x; j < (x + w); j++) { + int prev = i - 1; + int next = i + 1; + color_t prev_color, next_color; + color_t black; + color_t interim_1, interim_2; + color_t final; + + if (i < 0) + continue; + + black.color = 0x00000000; + + if ((prev >= 0) && (prev < (y + h))) + prev_color.color = buffer32->line[prev][j]; + else + prev_color.color = 0x00000000; + + if ((next >= 0) && (next < (y + h))) + next_color.color = buffer32->line[next][j]; + else + next_color.color = 0x00000000; + + interim_1 = v6355_interpolate_lookup(v6355, prev_color, black, quotient); + interim_2 = v6355_interpolate_lookup(v6355, black, next_color, quotient); + final = v6355_interpolate_lookup(v6355, interim_1, interim_2, quotient); + + buffer32->line[i][j] = final.color; + } + } +} + +static void +v6355_blit_memtoscreen(v6355_t *v6355, int x, int y, int w, int h) +{ + if (v6355->double_type > DOUBLE_SIMPLE) + v6355_interpolate(v6355, x, y, w, h); + + video_blit_memtoscreen(x, y, w, h); +} + +static void +v6355_poll(void *priv) +{ + v6355_t *v6355 = (v6355_t *) priv; + int x; + int oldvc; + int oldsc; + int xs_temp; + int ys_temp; + int old_ma; + + int width = v6355_width(v6355); + int height = v6355_height(v6355); + + /* Simulated CRTC height registers */ + int crtc4, crtc5, crtc6, crtc7, crtc8, crtc9; + + if (!(v6355->cgamode & 2)) { + /* Text mode values */ + crtc4 = (height + 54) / 8; + crtc5 = 6; + crtc6 = height / 8; + crtc7 = (height + 24) / 8; + crtc8 = 2; + crtc9 = 7; + } else { + /* Graphics mode values */ + crtc4 = (height + 54) / 2; + crtc5 = 6; + crtc6 = height / 2; + crtc7 = (height + 24) / 2; + crtc8 = 2; + crtc9 = 1; + } + + if (!v6355->linepos) { + timer_advance_u64(&v6355->timer, v6355->dispofftime); + + v6355->cgastat |= 1; + v6355->linepos = 1; + + oldsc = v6355->sc; + + if ((crtc8 & 3) == 3) + v6355->sc = ((v6355->sc << 1) + v6355->oddeven) & 7; + + if (v6355->cgadispon) { + if (v6355->displine < v6355->firstline) { + v6355->firstline = v6355->displine; + video_wait_for_buffer(); + } + + v6355->lastline = v6355->displine; + + switch (v6355->double_type) { + default: + v6355_render(v6355, v6355->displine << 1); + v6355_render_blank(v6355, (v6355->displine << 1) + 1); + break; + case DOUBLE_NONE: + v6355_render(v6355, v6355->displine); + break; + case DOUBLE_SIMPLE: + old_ma = v6355->ma; + v6355_render(v6355, v6355->displine << 1); + v6355->ma = old_ma; + v6355_render(v6355, (v6355->displine << 1) + 1); + break; + } + } else { + switch (v6355->double_type) { + default: + v6355_render_blank(v6355, v6355->displine << 1); + break; + case DOUBLE_NONE: + v6355_render_blank(v6355, v6355->displine); + break; + case DOUBLE_SIMPLE: + v6355_render_blank(v6355, v6355->displine << 1); + v6355_render_blank(v6355, (v6355->displine << 1) + 1); + break; + } + } + + switch (v6355->double_type) { + default: + v6355_render_process(v6355, v6355->displine << 1); + v6355_render_process(v6355, (v6355->displine << 1) + 1); + break; + case DOUBLE_NONE: + v6355_render_process(v6355, v6355->displine); + break; + } + + v6355->sc = oldsc; + + if (v6355->vc == crtc7 && !v6355->sc) + v6355->cgastat |= 8; + + v6355->displine++; + + if (v6355->displine >= 360) + v6355->displine = 0; + } else { + timer_advance_u64(&v6355->timer, v6355->dispontime); + + v6355->linepos = 0; + + if (v6355->vsynctime) { + v6355->vsynctime--; + + if (!v6355->vsynctime) + v6355->cgastat &= ~8; + } + + if (v6355->sc == (v6355->crtc[11] & 31) || ((crtc8 & 3) == 3 && v6355->sc == ((v6355->crtc[11] & 31) >> 1))) { + v6355->con = 0; + v6355->coff = 1; + } + + if ((crtc8 & 3) == 3 && v6355->sc == (crtc9 >> 1)) + v6355->maback = v6355->ma; + + if (v6355->vadj) { + v6355->sc++; + v6355->sc &= 31; + v6355->ma = v6355->maback; + v6355->vadj--; + + if (!v6355->vadj) { + v6355->cgadispon = 1; + v6355->ma = v6355->maback = (v6355->crtc[13] | (v6355->crtc[12] << 8)) & 0x3fff; + v6355->sc = 0; + } + } else if (v6355->sc == crtc9) { + v6355->maback = v6355->ma; + v6355->sc = 0; + oldvc = v6355->vc; + v6355->vc++; + v6355->vc &= 127; + + if (v6355->vc == crtc6) + v6355->cgadispon = 0; + + if (oldvc == crtc4) { + v6355->vc = 0; + v6355->vadj = crtc5; + + if (!v6355->vadj) + v6355->cgadispon = 1; + + if (!v6355->vadj) + v6355->ma = v6355->maback = (v6355->crtc[13] | (v6355->crtc[12] << 8)) & 0x3fff; + + if ((v6355->crtc[10] & 0x60) == 0x20) + v6355->cursoron = 0; + else + v6355->cursoron = v6355->cgablink & 8; + } + + if (v6355->vc == crtc7) { + v6355->cgadispon = 0; + v6355->displine = 0; + v6355->vsynctime = 16; + if (crtc7) { + x = width + 16; + v6355->lastline++; + + xs_temp = x; + ys_temp = v6355->lastline - v6355->firstline; + if (v6355->double_type > DOUBLE_NONE) + ys_temp <<= 1; + + if ((xs_temp > 0) && (ys_temp > 0)) { + if (xs_temp < 64) + xs_temp = 656; + if (ys_temp < 32) + ys_temp = 200; + if (!enable_overscan) + xs_temp -= 16; + + if (((xs_temp != xsize) || (ys_temp != ysize) || video_force_resize_get())) { + xsize = xs_temp; + ysize = ys_temp; + if (v6355->double_type > DOUBLE_NONE) + set_screen_size(xsize, ysize + (enable_overscan ? 16 : 0)); + else + set_screen_size(xsize, ysize + (enable_overscan ? 8 : 0)); + + if (video_force_resize_get()) + video_force_resize_set(0); + } + + if (v6355->double_type > DOUBLE_NONE) { + if (enable_overscan) + v6355_blit_memtoscreen(v6355, 0, (v6355->firstline - 4) << 1, + xsize, ((v6355->lastline - v6355->firstline) << 1) + 16); + else + v6355_blit_memtoscreen(v6355, 8, v6355->firstline << 1, + xsize, (v6355->lastline - v6355->firstline) << 1); + } else { + if (enable_overscan) + video_blit_memtoscreen(0, v6355->firstline - 4, + xsize, (v6355->lastline - v6355->firstline) + 8); + else + video_blit_memtoscreen(8, v6355->firstline, + xsize, v6355->lastline - v6355->firstline); + } + } + + frames++; + + video_res_x = xsize - 16; + video_res_y = ysize; + if (v6355->cgamode & 1) { + video_res_x /= 8; + video_res_y /= crtc9 + 1; + video_bpp = 0; + } else if (!(v6355->cgamode & 2)) { + video_res_x /= 16; + video_res_y /= crtc9 + 1; + video_bpp = 0; + } else if (!(v6355->cgamode & 16)) { + video_res_x /= 2; + video_bpp = 2; + } else + video_bpp = 1; + } + + v6355->firstline = 1000; + v6355->lastline = 0; + v6355->cgablink++; + v6355->oddeven ^= 1; + } + } else { + v6355->sc++; + v6355->sc &= 31; + v6355->ma = v6355->maback; + } + + if (v6355->cgadispon) + v6355->cgastat &= ~1; + + if ((v6355->sc == (v6355->crtc[10] & 31) || ((crtc8 & 3) == 3 && v6355->sc == ((v6355->crtc[10] & 31) >> 1)))) + v6355->con = 1; + + if (v6355->cgadispon && (v6355->cgamode & 1)) { + for (x = 0; x < ((width / 8) * 2); x++) + v6355->charbuffer[x] = v6355->vram[(((v6355->ma << 1) + x) & 0x3fff)]; + } + } +} + +static void * +v6355_standalone_init(const device_t *info) { + int n; + int c; + v6355_t *v6355 = calloc(1, sizeof(v6355_t)); + + video_inform(VIDEO_FLAG_TYPE_CGA, &timing_v6355); + + v6355->display_type = device_get_config_int("display_type"); + + overscan_x = overscan_y = 16; + + /* Initialise the palette registers to default values */ + memcpy(v6355->v6355data + 0x40, defpalette, 0x20); + + for (n = 0; n < 16; n++) { + int r = (v6355->v6355data[0x40 + 2 * n]) & 7; + int g = (v6355->v6355data[0x41 + 2 * n] >> 4) & 7; + int b = (v6355->v6355data[0x41 + 2 * n]) & 7; + + v6355->v6355pal[n] = makecol((r * 0xff) / 7, (g * 0xff) / 7, (b * 0xff) / 7); + } + + /* Default to 200 lines */ + v6355->v6355data[0x65] = 0x01; + + /* Set up CGA -> MDA attribute mapping */ + for (c = 0; c < 256; c++) { + mdamap[c][0][0] = mdamap[c][1][0] = mdamap[c][1][1] = 0; + + if (c & 8) + mdamap[c][0][1] = 0xf; + else + mdamap[c][0][1] = 0x7; + } + + mdamap[0x70][0][1] = 0; + mdamap[0x70][0][0] = mdamap[0x70][1][0] = mdamap[0x70][1][1] = 0xf; + mdamap[0xF0][0][1] = 0; + mdamap[0xF0][0][0] = mdamap[0xF0][1][0] = mdamap[0xF0][1][1] = 0xf; + mdamap[0x78][0][1] = 7; + mdamap[0x78][0][0] = mdamap[0x78][1][0] = mdamap[0x78][1][1] = 0xf; + mdamap[0xF8][0][1] = 7; + mdamap[0xF8][0][0] = mdamap[0xF8][1][0] = mdamap[0xF8][1][1] = 0xf; + mdamap[0x00][0][1] = mdamap[0x00][1][1] = 0; + mdamap[0x08][0][1] = mdamap[0x08][1][1] = 0; + mdamap[0x80][0][1] = mdamap[0x80][1][1] = 0; + mdamap[0x88][0][1] = mdamap[0x88][1][1] = 0; + + v6355->display_type = device_get_config_int("display_type"); + v6355->revision = device_get_config_int("composite_type"); + + v6355->vram = malloc(0x4000); + + cga_comp_init(v6355->revision); + + timer_add(&v6355->timer, v6355_poll, v6355, 1); + + mem_mapping_add(&v6355->mapping, 0xb8000, 0x08000, + v6355_read, NULL, NULL, v6355_write, NULL, NULL, NULL, + MEM_MAPPING_EXTERNAL, v6355); + + io_sethandler(0x03d0, 0x0010, + v6355_in, NULL, NULL, v6355_out, NULL, NULL, + v6355); + + v6355->rgb_type = device_get_config_int("rgb_type"); + cga_palette = (v6355->rgb_type << 1); + cgapal_rebuild(); + update_cga16_color(v6355->cgamode); + + v6355->double_type = device_get_config_int("double_type"); + + for (uint16_t i = 0; i < 256; i++) { + for (uint16_t j = 0; j < 256; j++) { + interp_lut[0][i][j] = v6355_interpolate_srgb(i, j, 0.5); + interp_lut[1][i][j] = v6355_interpolate_linear(i, j, 0.5); + } + } + + switch(device_get_config_int("font")) { + case 0: + loadfont(FONT_IBM_MDA_437_PATH, 0); + break; + case 1: + loadfont(FONT_IBM_MDA_437_NORDIC_PATH, 0); + break; + case 4: + loadfont(FONT_TULIP_DGA_PATH, 0); + break; + } + + monitors[monitor_index_global].mon_composite = (v6355->display_type == V6355_COMPOSITE); + + return v6355; +} + +static void +v6355_close(void *priv) { + v6355_t *v6355 = (v6355_t *) priv; + + free(v6355->vram); + free(v6355); +} + +static void +v6355_speed_changed(void *priv) { + v6355_t *v6355 = (v6355_t *) priv; + + v6355_recalctimings(v6355); +} + +// clang-format off +const device_config_t v6355_config[] = { + { + .name = "display_type", + .description = "Display type", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = V6355_RGB, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "RGB", .value = V6355_RGB }, + { .description = "Composite", .value = V6355_COMPOSITE }, + { .description = "True color", .value = V6355_TRUECOLOR }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "composite_type", + .description = "Composite type", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = COMPOSITE_OLD, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "Old", .value = COMPOSITE_OLD }, + { .description = "New", .value = COMPOSITE_NEW }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "rgb_type", + .description = "RGB type", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 5, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "Color (generic)", .value = 0 }, + { .description = "Green Monochrome", .value = 1 }, + { .description = "Amber Monochrome", .value = 2 }, + { .description = "Gray Monochrome", .value = 3 }, + { .description = "Color (no brown)", .value = 4 }, + { .description = "Color (IBM 5153)", .value = 5 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "double_type", + .description = "Line doubling type", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = DOUBLE_NONE, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "None", .value = DOUBLE_NONE }, + { .description = "Simple doubling", .value = DOUBLE_SIMPLE }, + { .description = "sRGB interpolation", .value = DOUBLE_INTERPOLATE_SRGB }, + { .description = "Linear interpolation", .value = DOUBLE_INTERPOLATE_LINEAR }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "font", + .description = "Font", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "US (CP 437)", .value = 0 }, + { .description = "IBM Nordic (CP 437-Nordic)", .value = 1 }, + { .description = "Tulip DGA", .value = 4 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +}; +// clang-format on + +const device_t v6355d_device = { + .name = "Yamaha V6355D", + .internal_name = "v6355d", + .flags = DEVICE_ISA, + .local = 0, + .init = v6355_standalone_init, + .close = v6355_close, + .reset = NULL, + .available = NULL, + .speed_changed = v6355_speed_changed, + .force_redraw = NULL, + .config = v6355_config +}; diff --git a/src/video/vid_chips_69000.c b/src/video/vid_chips_69000.c index 70b2b9e16..c63bfc70a 100644 --- a/src/video/vid_chips_69000.c +++ b/src/video/vid_chips_69000.c @@ -1102,10 +1102,8 @@ chips_69000_recalctimings(svga_t *svga) svga->rowoffset |= (svga->crtc[0x41] & 0xF) << 8; svga->interlace = !!(svga->crtc[0x70] & 0x80); - - if (svga->hdisp == 1280 && svga->dispend == 1024) { - svga->interlace = 0; - } + if (svga->interlace) + svga->dispend >>= 1; switch (chips->ext_regs[0x81] & 0xF) { default: @@ -1146,6 +1144,8 @@ chips_69000_recalctimings(svga_t *svga) if (svga->dispend > (((chips->flat_panel_regs[0x30] | ((chips->flat_panel_regs[0x35] & 0xF) << 8)) + 1))) { svga->dispend = svga->vsyncstart = svga->vblankstart = ((chips->flat_panel_regs[0x30] | ((chips->flat_panel_regs[0x35] & 0xF) << 8)) + 1); + if (svga->interlace) + svga->dispend >>= 1; } //svga->hdisp = ((chips->flat_panel_regs[0x20] | ((chips->flat_panel_regs[0x25] & 0xF) << 8)) + 1) << 3; //svga->htotal = ((chips->flat_panel_regs[0x23] | ((chips->flat_panel_regs[0x26] & 0xF) << 8)) + 5) << 3; diff --git a/src/video/vid_cl54xx.c b/src/video/vid_cl54xx.c index fff344f3a..0a43ab4ce 100644 --- a/src/video/vid_cl54xx.c +++ b/src/video/vid_cl54xx.c @@ -1703,6 +1703,7 @@ static void gd543x_recalc_mapping(gd54xx_t *gd54xx) { svga_t *svga = &gd54xx->svga; + xga_t *xga = (xga_t *) svga->xga; uint32_t base; uint32_t size; @@ -1729,6 +1730,10 @@ gd543x_recalc_mapping(gd54xx_t *gd54xx) case 0x4: /*64k at A0000*/ mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000); svga->banked_mask = 0xffff; + if (xga_active && (svga->xga != NULL)) { + xga->on = 0; + mem_mapping_set_handler(&svga->mapping, svga->read, svga->readw, svga->readl, svga->write, svga->writew, svga->writel); + } break; case 0x8: /*32k at B0000*/ mem_mapping_set_addr(&svga->mapping, 0xb0000, 0x08000); diff --git a/src/video/vid_ega.c b/src/video/vid_ega.c index 26bb38991..5a552ab6d 100644 --- a/src/video/vid_ega.c +++ b/src/video/vid_ega.c @@ -643,9 +643,10 @@ ega_recalctimings(ega_t *ega) crtcconst *= mdiv; } else { if (ega->vidclock) - crtcconst = (ega->seqregs[1] & 1) ? MDACONST : (MDACONST * (9.0 / 8.0)); + crtcconst = (cpuclock / 16257000.0 * (double) (1ULL << 32)); else - crtcconst = (ega->seqregs[1] & 1) ? CGACONST : (CGACONST * (9.0 / 8.0)); + crtcconst = (cpuclock / (157500000.0 / 11.0) * (double) (1ULL << 32)); + crtcconst *= mdiv; } ega->dot_clock = crtcconst / mdiv; diff --git a/src/video/vid_et4000w32.c b/src/video/vid_et4000w32.c index 2e9a7796a..c1021e905 100644 --- a/src/video/vid_et4000w32.c +++ b/src/video/vid_et4000w32.c @@ -366,7 +366,8 @@ et4000w32p_in(uint16_t addr, void *priv) } return svga->crtc[svga->crtcreg]; - case 0x3da: + case 0x3da: { + uint8_t ret = 0xff; svga->attrff = 0; /*Bit 1 of the Input Status Register is required by the OS/2 and NT ET4000W32/I drivers to be set otherwise @@ -375,7 +376,18 @@ et4000w32p_in(uint16_t addr, void *priv) svga->cgastat &= ~0x32; else svga->cgastat ^= 0x32; - return svga->cgastat; + + ret = svga->cgastat; + + if ((svga->fcr & 0x08) && svga->dispon) + ret |= 0x08; + + if (ret & 0x08) + ret &= 0x7f; + else + ret |= 0x80; + return ret; + } case 0x210a: case 0x211a: @@ -455,19 +467,19 @@ et4000w32p_recalctimings(svga_t *svga) svga->clock = (cpuclock * (double) (1ULL << 32)) / svga->getclock((svga->miscout >> 2) & 3, svga->clock_gen); - if (et4000->type != ET4000W32P_DIAMOND) { + if (et4000->type != ET4000W32P_DIAMOND && et4000->type != ET4000W32P_VIDEOMAGIC_REVB && et4000->type != ET4000W32P_CARDEX && et4000->type != ET4000W32P) { if ((svga->gdcreg[6] & 1) || (svga->attrregs[0x10] & 1)) { if (svga->gdcreg[5] & 0x40) { switch (svga->bpp) { case 8: - svga->clock /= 2; + svga->clock *= 2; break; case 15: case 16: - svga->clock /= 3; + svga->clock *= 3; break; case 24: - svga->clock /= 4; + svga->clock *= 4; break; default: diff --git a/src/video/vid_hercules.c b/src/video/vid_hercules.c index 229ddcca8..15b9e69cd 100644 --- a/src/video/vid_hercules.c +++ b/src/video/vid_hercules.c @@ -27,9 +27,9 @@ #include <86box/rom.h> #include <86box/io.h> #include <86box/timer.h> +#include <86box/device.h> #include <86box/lpt.h> #include <86box/pit.h> -#include <86box/device.h> #include <86box/video.h> #include <86box/vid_hercules.h> #include <86box/plat_unused.h> @@ -606,7 +606,9 @@ hercules_init(UNUSED(const device_t *info)) video_inform(VIDEO_FLAG_TYPE_MDA, &timing_hercules); /* Force the LPT3 port to be enabled. */ - lpt3_setup(LPT_MDA_ADDR); + dev->lpt = device_add_inst(&lpt_port_device, 1); + lpt_port_setup(dev->lpt, LPT_MDA_ADDR); + lpt_set_3bc_used(1); return dev; } diff --git a/src/video/vid_hercules_incolor.c b/src/video/vid_hercules_incolor.c index eceb440f9..6e3b6a6d2 100644 --- a/src/video/vid_hercules_incolor.c +++ b/src/video/vid_hercules_incolor.c @@ -24,11 +24,11 @@ #include <86box/86box.h> #include <86box/io.h> #include <86box/timer.h> +#include <86box/device.h> #include <86box/lpt.h> #include <86box/pit.h> #include <86box/mem.h> #include <86box/rom.h> -#include <86box/device.h> #include <86box/video.h> #include <86box/plat_unused.h> @@ -179,6 +179,8 @@ typedef struct { uint32_t rgb[64]; uint8_t *vram; + + lpt_t *lpt; } incolor_t; static video_timings_t timing_incolor = { .type = VIDEO_ISA, .write_b = 8, .write_w = 16, .write_l = 32, .read_b = 8, .read_w = 16, .read_l = 32 }; @@ -1035,7 +1037,9 @@ incolor_init(UNUSED(const device_t *info)) video_inform(VIDEO_FLAG_TYPE_MDA, &timing_incolor); /* Force the LPT3 port to be enabled. */ - lpt3_setup(LPT_MDA_ADDR); + dev->lpt = device_add_inst(&lpt_port_device, 1); + lpt_port_setup(dev->lpt, LPT_MDA_ADDR); + lpt_set_3bc_used(1); return dev; } diff --git a/src/video/vid_hercules_plus.c b/src/video/vid_hercules_plus.c index 7e1aec943..c6b442ce0 100644 --- a/src/video/vid_hercules_plus.c +++ b/src/video/vid_hercules_plus.c @@ -24,11 +24,11 @@ #include <86box/86box.h> #include <86box/io.h> #include <86box/timer.h> +#include <86box/device.h> #include <86box/lpt.h> #include <86box/pit.h> #include <86box/mem.h> #include <86box/rom.h> -#include <86box/device.h> #include <86box/video.h> #include <86box/plat_unused.h> @@ -86,6 +86,8 @@ typedef struct { int cols[256][2][2]; uint8_t *vram; + + lpt_t *lpt; } herculesplus_t; #define VIDEO_MONITOR_PROLOGUE() \ @@ -687,7 +689,9 @@ herculesplus_init(UNUSED(const device_t *info)) video_inform(VIDEO_FLAG_TYPE_MDA, &timing_herculesplus); /* Force the LPT3 port to be enabled. */ - lpt3_setup(LPT_MDA_ADDR); + dev->lpt = device_add_inst(&lpt_port_device, 1); + lpt_port_setup(dev->lpt, LPT_MDA_ADDR); + lpt_set_3bc_used(1); return dev; } diff --git a/src/video/vid_ht216.c b/src/video/vid_ht216.c index 3089ae26d..3ba814870 100644 --- a/src/video/vid_ht216.c +++ b/src/video/vid_ht216.c @@ -698,12 +698,16 @@ ht216_recalctimings(svga_t *svga) if (((ht216->ht_regs[0xc8] & HT_REG_C8_E256) || (svga->gdcreg[5] & 0x40)) && (!svga->lowres || (ht216->ht_regs[0xf6] & 0x80))) { if (high_res_256) { svga->hdisp >>= 1; + svga->dots_per_clock >>= 1; + svga->clock /= 2; ht216->adjust_cursor = 1; } svga->render = svga_render_8bpp_highres; } else if (svga->lowres) { if (high_res_256) { svga->hdisp >>= 1; + svga->dots_per_clock >>= 1; + svga->clock /= 2; ht216->adjust_cursor = 1; svga->render = svga_render_8bpp_highres; } else { @@ -726,6 +730,8 @@ ht216_recalctimings(svga_t *svga) } else if (svga->bpp == 15) { svga->rowoffset <<= 1; svga->hdisp >>= 1; + svga->dots_per_clock >>= 1; + svga->clock /= 2; if ((svga->crtc[0x17] & 0x60) == 0x20) /*Would result in a garbled screen with trailing cursor glitches*/ svga->crtc[0x17] |= 0x40; svga->render = svga_render_15bpp_highres; diff --git a/src/video/vid_jega.c b/src/video/vid_jega.c index eafdceb9c..d3c806708 100644 --- a/src/video/vid_jega.c +++ b/src/video/vid_jega.c @@ -912,9 +912,9 @@ const device_t jega_device = { }; const device_t jvga_device = { - .name = "OKIVGA/H-2 (JVGA/H)", + .name = "OKI VGA/H-2 (JVGA/H)", .internal_name = "jvga", - .flags = DEVICE_ISA, + .flags = DEVICE_ISA16, .local = 0, .init = jvga_standalone_init, .close = jega_close, diff --git a/src/video/vid_mda.c b/src/video/vid_mda.c index 5330e2ab3..184ad7fdd 100644 --- a/src/video/vid_mda.c +++ b/src/video/vid_mda.c @@ -27,11 +27,11 @@ #include <86box/86box.h> #include <86box/io.h> #include <86box/timer.h> +#include <86box/device.h> #include <86box/lpt.h> #include <86box/pit.h> #include <86box/mem.h> #include <86box/rom.h> -#include <86box/device.h> #include <86box/video.h> #include <86box/vid_mda.h> #include <86box/plat_unused.h> @@ -130,8 +130,8 @@ mda_recalctimings(mda_t *mda) double _dispontime; double _dispofftime; double disptime; - disptime = mda->crtc[MDA_CRTC_HTOTAL] + 1; - _dispontime = mda->crtc[MDA_CRTC_HDISP]; + disptime = (mda->crtc[MDA_CRTC_HTOTAL] + 1); + _dispontime = (mda->crtc[MDA_CRTC_HDISP]); _dispofftime = disptime - _dispontime; _dispontime *= MDACONST; _dispofftime *= MDACONST; @@ -453,7 +453,9 @@ mda_standalone_init(UNUSED(const device_t *info)) mda_init(mda); - lpt3_setup(LPT_MDA_ADDR); + mda->lpt = device_add_inst(&lpt_port_device, 1); + lpt_port_setup(mda->lpt, LPT_MDA_ADDR); + lpt_set_3bc_used(1); return mda; } diff --git a/src/video/vid_mga.c b/src/video/vid_mga.c index 294e6ce75..eded49cf6 100644 --- a/src/video/vid_mga.c +++ b/src/video/vid_mga.c @@ -35,6 +35,7 @@ #include <86box/video.h> #include <86box/i2c.h> #include <86box/vid_ddc.h> +#include <86box/vid_xga.h> #include <86box/vid_svga.h> #include <86box/vid_svga_render.h> @@ -1042,6 +1043,9 @@ mystique_recalctimings(svga_t *svga) } } else { switch (svga->bpp) { + case 4: + svga->render = svga_render_4bpp_highres; + break; case 8: svga->render = svga_render_8bpp_highres; break; @@ -1061,6 +1065,9 @@ mystique_recalctimings(svga_t *svga) } } else { switch (svga->bpp) { + case 4: + svga->render = svga_render_4bpp_highres; + break; case 8: svga->render = svga_render_8bpp_highres; break; @@ -1104,6 +1111,7 @@ static void mystique_recalc_mapping(mystique_t *mystique) { svga_t *svga = &mystique->svga; + xga_t *xga = (xga_t *) svga->xga; io_removehandler(0x03c0, 0x0020, mystique_in, NULL, NULL, mystique_out, NULL, NULL, mystique); if ((mystique->pci_regs[PCI_REG_COMMAND] & PCI_COMMAND_IO) && (mystique->pci_regs[0x41] & 1)) @@ -1141,6 +1149,10 @@ mystique_recalc_mapping(mystique_t *mystique) case 0x4: /*64k at A0000*/ mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000); svga->banked_mask = 0xffff; + if (xga_active && (svga->xga != NULL)) { + xga->on = 0; + mem_mapping_set_handler(&svga->mapping, svga->read, svga->readw, svga->readl, svga->write, svga->writew, svga->writel); + } break; case 0x8: /*32k at B0000*/ mem_mapping_set_addr(&svga->mapping, 0xb0000, 0x08000); diff --git a/src/video/vid_paradise.c b/src/video/vid_paradise.c index c3534f7bc..ff1013232 100644 --- a/src/video/vid_paradise.c +++ b/src/video/vid_paradise.c @@ -30,6 +30,7 @@ #include <86box/rom.h> #include <86box/device.h> #include <86box/video.h> +#include <86box/vid_xga.h> #include <86box/vid_svga.h> #include <86box/vid_svga_render.h> @@ -143,6 +144,7 @@ paradise_out(uint16_t addr, uint8_t val, void *priv) { paradise_t *paradise = (paradise_t *) priv; svga_t *svga = ¶dise->svga; + xga_t *xga = (xga_t *) svga->xga; uint8_t old; if (((addr & 0xfff0) == 0x3d0 || (addr & 0xfff0) == 0x3b0) && !(svga->miscout & 1)) @@ -188,6 +190,10 @@ paradise_out(uint16_t addr, uint8_t val, void *priv) case 0x4: /*64k at A0000*/ mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000); svga->banked_mask = 0xffff; + if (xga_active && (svga->xga != NULL)) { + xga->on = 0; + mem_mapping_set_handler(&svga->mapping, svga->read, svga->readw, svga->readl, svga->write, svga->writew, svga->writel); + } break; case 0x8: /*32k at B0000*/ mem_mapping_set_addr(&svga->mapping, 0xb0000, 0x08000); @@ -343,12 +349,12 @@ paradise_remap(paradise_t *paradise) paradise->write_bank[3] = paradise->write_bank[2] + 0x8000; } else if ((svga->gdcreg[6] & 0x0c) == 0x04) { paradise->read_bank[0] = svga->gdcreg[0x0a] << 12; - paradise->read_bank[1] = svga->gdcreg[9] << 12; + paradise->read_bank[1] = (svga->gdcreg[9] << 12) + 0x8000; paradise->read_bank[2] = paradise->read_bank[0]; paradise->read_bank[3] = paradise->read_bank[1]; paradise->write_bank[0] = svga->gdcreg[0x0a] << 12; - paradise->write_bank[1] = svga->gdcreg[9] << 12; + paradise->write_bank[1] = (svga->gdcreg[9] << 12) + 0x8000; paradise->write_bank[2] = paradise->write_bank[0]; paradise->write_bank[3] = paradise->write_bank[1]; } else { @@ -506,11 +512,11 @@ paradise_recalctimings(svga_t *svga) if ((svga->gdcreg[6] & 1) || (svga->attrregs[0x10] & 1)) { if ((svga->bpp >= 8) && !svga->lowres) { svga->render = svga_render_8bpp_highres; - if (paradise->type != WD90C11) + if (paradise->type < WD90C11) svga->vram_display_mask = (svga->crtc[0x2f] & 0x02) ? 0x3ffff : paradise->vram_mask; } } - if (paradise->type == WD90C11) switch (svga->crtc[0x2f] & 0x60) { + if (paradise->type >= WD90C11) switch (svga->crtc[0x2f] & 0x60) { case 0x60: case 0x40: svga->vram_display_mask = 0x3ffff; break; @@ -582,12 +588,11 @@ paradise_decode_addr(paradise_t *paradise, uint32_t addr, int write) break; } - if (memory_map_mode <= 1) { - if (write) - addr = (addr & 0x7fff) + paradise->write_bank[(addr >> 15) & 3]; - else - addr = (addr & 0x7fff) + paradise->read_bank[(addr >> 15) & 3]; - } + if (write) + addr = (addr & 0x7fff) + paradise->write_bank[(addr >> 15) & 3]; + else + addr = (addr & 0x7fff) + paradise->read_bank[(addr >> 15) & 3]; + return addr; } @@ -670,7 +675,7 @@ paradise_read(uint32_t addr, void *priv) uint32_t prev_addr; uint32_t prev_addr2; - addr = paradise_decode_addr(paradise, addr, 1); + addr = paradise_decode_addr(paradise, addr, 0); if (addr == 0xffffffff) return 0xff; @@ -705,7 +710,7 @@ paradise_readw(uint32_t addr, void *priv) uint32_t prev_addr; uint32_t prev_addr2; - addr = paradise_decode_addr(paradise, addr, 1); + addr = paradise_decode_addr(paradise, addr, 0); if (addr == 0xffffffff) return 0xffff; diff --git a/src/video/vid_pcjr.c b/src/video/vid_pcjr.c index b4a2d24db..6cdc5b783 100644 --- a/src/video/vid_pcjr.c +++ b/src/video/vid_pcjr.c @@ -719,4 +719,6 @@ pcjr_vid_init(pcjr_t *pcjr) else cga_palette = (display_type << 1); cgapal_rebuild(); + + monitors[monitor_index_global].mon_composite = !!pcjr->composite; } diff --git a/src/video/vid_s3.c b/src/video/vid_s3.c index d0495dca0..3704df946 100644 --- a/src/video/vid_s3.c +++ b/src/video/vid_s3.c @@ -24,6 +24,7 @@ #include #include #include +#include #define HAVE_STDARG_H #include <86box/86box.h> #include <86box/device.h> @@ -37,6 +38,7 @@ #include <86box/video.h> #include <86box/i2c.h> #include <86box/vid_ddc.h> +#include <86box/vid_xga.h> #include <86box/vid_svga.h> #include <86box/vid_svga_render.h> #include "cpu.h" @@ -388,6 +390,8 @@ typedef struct s3_t { int color_16bit; atomic_int busy, force_busy; + bool color_key_enabled; + uint8_t thread_run, serialport; void *i2c, *ddc; @@ -2613,10 +2617,89 @@ s3_hwcursor_draw(svga_t *svga, int displine) } \ } while (0) + +static bool +s3_trio64v_colorkey(s3_t* s3, uint32_t x, uint32_t y) +{ + svga_t* svga = &s3->svga; + uint8_t comp_r = 0, comp_g = 0, comp_b = 0; + uint8_t r = 0, g = 0, b = 0; + uint8_t bytes_per_pel = 1; + uint8_t shift = ((s3->streams.chroma_ctrl >> 24) & 7) ^ 7; + bool is15bpp = false; + + uint32_t base_addr = svga->memaddr_latch; + uint32_t stride = s3->streams.pri_stride; + + if (!s3->color_key_enabled) + return true; + + if (y > 2048) + return true; + if (!(s3->streams.chroma_ctrl & (1 << 28))) { + return true; + } + + comp_r = (s3->streams.chroma_ctrl >> 16) & 0xFF; + comp_g = (s3->streams.chroma_ctrl >> 8) & 0xFF; + comp_b = (s3->streams.chroma_ctrl) & 0xFF; + + if (svga->render == svga_render_32bpp_highres) bytes_per_pel = 4; + if (svga->render == svga_render_24bpp_highres) bytes_per_pel = 3; + if (svga->render == svga_render_16bpp_highres) bytes_per_pel = 2; + if (svga->render == svga_render_15bpp_highres) { bytes_per_pel = 2; is15bpp = true; } + + switch (bytes_per_pel) { + case 1: { + uint8_t index = svga->vram[(base_addr + (stride * y) + x * bytes_per_pel) & svga->vram_mask]; + r = svga->vgapal[index].r << 2; + g = svga->vgapal[index].g << 2; + b = svga->vgapal[index].b << 2; + break; + } + case 2: { + uint16_t col = *(uint16_t*)&svga->vram[(base_addr + (stride * y) + x * bytes_per_pel) & svga->vram_mask]; + if (is15bpp) { + r = ((col >> 10) & 0x1f) << 3; + g = ((col >> 5) & 0x1f) << 3; + b = (col & 0x1f) << 3; + } else { + r = ((col >> 11) & 0x1f) << 3; + g = ((col >> 5) & 0x3f) << 2; + b = (col & 0x1f) << 3; + } + break; + } + case 3: { + uint8_t *col = &svga->vram[(base_addr + (stride * y) + x * bytes_per_pel) & svga->vram_mask]; + r = col[0]; + g = col[1]; + b = col[2]; + break; + } + case 4: { + uint32_t col = *(uint32_t*)&svga->vram[(base_addr + (stride * y) + x * bytes_per_pel) & svga->vram_mask]; + r = (col >> 16) & 0xFF; + g = (col >> 8) & 0xFF; + b = col & 0xFF; + break; + } + } + + r >>= shift; + g >>= shift; + b >>= shift; + comp_r >>= shift; + comp_g >>= shift; + comp_b >>= shift; + + return !!(r == comp_r && g == comp_g && b == comp_b); +} + static void s3_trio64v_overlay_draw(svga_t *svga, int displine) { - const s3_t *s3 = (s3_t *) svga->priv; + s3_t *s3 = (s3_t *) svga->priv; int offset = (s3->streams.sec_x - s3->streams.pri_x) + 1; int r[8]; int g[8]; @@ -2637,7 +2720,10 @@ s3_trio64v_overlay_draw(svga_t *svga, int displine) OVERLAY_SAMPLE(); for (int x = 0; x < x_size; x++) { - *p++ = r[x_read] | (g[x_read] << 8) | (b[x_read] << 16); + if (s3_trio64v_colorkey(s3, offset + x, displine - svga->y_add)) + *p++ = r[x_read] | (g[x_read] << 8) | (b[x_read] << 16); + else + p++; svga->overlay_latch.h_acc += s3->streams.k1_horiz_scale; if (svga->overlay_latch.h_acc >= 0) { @@ -2859,7 +2945,7 @@ s3_out(uint16_t addr, uint8_t val, void *priv) switch (addr) { case 0x3c2: - if ((s3->chip == S3_VISION964) || (s3->chip == S3_VISION968) || (s3->chip == S3_86C928)) { + if ((s3->chip == S3_VISION964) || (s3->chip == S3_VISION968)) { if ((s3->card_type != S3_SPEA_MERCURY_P64V) && (s3->card_type != S3_MIROVIDEO40SV_ERGO_968)) { if (((val >> 2) & 3) != 3) icd2061_write(svga->clock_gen, (val >> 2) & 3); @@ -3069,6 +3155,8 @@ s3_out(uint16_t addr, uint8_t val, void *priv) svga->hwcursor.x /= 3; else if ((s3->chip <= S3_86C805) && s3->color_16bit) svga->hwcursor.x >>= 1; + else if ((s3->chip == S3_TRIO32) && ((svga->bpp == 15) || (svga->bpp == 16))) + svga->hwcursor.x >>= 1; break; case 0x4a: @@ -3128,7 +3216,10 @@ s3_out(uint16_t addr, uint8_t val, void *priv) break; case 0x42: - if ((s3->chip == S3_VISION964) || (s3->chip == S3_VISION968) || (s3->chip == S3_86C928)) { + if (((svga->miscout >> 2) & 3) == 3) + s3_log("[%04X:%08X]: Write CRTC%02x=%02x.\n", CS, cpu_state.pc, svga->crtcreg, svga->crtc[svga->crtcreg]); + + if ((s3->chip == S3_VISION964) || (s3->chip == S3_VISION968)) { if (((svga->miscout >> 2) & 3) == 3) icd2061_write(svga->clock_gen, svga->crtc[0x42] & 0x0f); } @@ -3534,9 +3625,15 @@ s3_recalctimings(svga_t *svga) svga->rowoffset |= 0x100; } else if (svga->crtc[0x43] & 0x04) svga->rowoffset |= 0x100; + if (!svga->rowoffset) svga->rowoffset = 0x100; + if ((((svga->miscout >> 2) & 3) == 3) && (s3->chip < S3_TRIO32)) + clk_sel = svga->crtc[0x42] & 0x0f; + + svga->clock = (cpuclock * (double) (1ULL << 32)) / svga->getclock(clk_sel, svga->clock_gen); + if ((s3->chip == S3_VISION964) || (s3->chip == S3_86C928)) { if (s3->card_type == S3_ELSAWIN2KPROX_964) ibm_rgb528_recalctimings(svga->ramdac, svga); @@ -3552,20 +3649,17 @@ s3_recalctimings(svga_t *svga) } else svga->interlace = !!(svga->crtc[0x42] & 0x20); - if ((((svga->miscout >> 2) & 3) == 3) && (s3->chip < S3_TRIO32)) - clk_sel = svga->crtc[0x42] & 0x0f; + if (s3->chip >= S3_TRIO32) { + switch (svga->crtc[0x67] >> 4) { + case 3: + case 5: + case 7: + svga->clock /= 2; + break; - svga->clock = (cpuclock * (double) (1ULL << 32)) / svga->getclock(clk_sel, svga->clock_gen); - - switch (svga->crtc[0x67] >> 4) { - case 3: - case 5: - case 7: - svga->clock /= 2; - break; - - default: - break; + default: + break; + } } if (s3->chip <= S3_86C805) { @@ -3653,6 +3747,7 @@ s3_recalctimings(svga_t *svga) case S3_86C928: switch (s3->card_type) { case S3_METHEUS_86C928: + s3_log("928 8bpp: ClockSel=%02x, width=%d, hdisp=%d, dotsperclock=%d.\n", clk_sel, s3->width, svga->hdisp, svga->dots_per_clock); switch (s3->width) { case 1280: /*Account for the 1280x1024 resolution*/ switch (svga->hdisp) { @@ -3716,6 +3811,8 @@ s3_recalctimings(svga_t *svga) case 1600: svga->hdisp <<= 1; svga->dots_per_clock <<= 1; + svga->clock /= 2.0; + break; default: break; } @@ -3746,6 +3843,8 @@ s3_recalctimings(svga_t *svga) case 1600: svga->hdisp <<= 1; svga->dots_per_clock <<= 1; + svga->clock /= 2.0; + break; default: break; } @@ -3801,6 +3900,7 @@ s3_recalctimings(svga_t *svga) /*SPEA specific drivers + its VBE RAM BIOS...*/ svga->hdisp <<= 1; svga->dots_per_clock <<= 1; + svga->clock /= 2.0; } break; default: @@ -3816,8 +3916,10 @@ s3_recalctimings(svga_t *svga) switch (s3->card_type) { case S3_METHEUS_86C928: if (!s3->color_16bit) { + s3_log("928 15bpp: ClockSel=%02x, width=%d, hdisp=%d, dotsperclock=%d.\n", clk_sel, s3->width, svga->hdisp, svga->dots_per_clock); svga->hdisp <<= 1; svga->dots_per_clock <<= 1; + svga->clock *= 2.0; } switch (svga->hdisp) { /*This might be a driver issue*/ case 800: @@ -3864,6 +3966,7 @@ s3_recalctimings(svga_t *svga) case 1600: svga->hdisp <<= 1; svga->dots_per_clock <<= 1; + svga->clock /= 2.0; break; default: break; @@ -3880,6 +3983,7 @@ s3_recalctimings(svga_t *svga) case S3_NUMBER9_9FX_531: svga->hdisp >>= 1; svga->dots_per_clock >>= 1; + svga->clock /= 2.0; break; default: @@ -3898,6 +4002,7 @@ s3_recalctimings(svga_t *svga) case S3_SPEA_MERCURY_P64V: svga->hdisp <<= 1; svga->dots_per_clock <<= 1; + svga->clock /= 2.0; /* TODO: Is this still needed? */ if (svga->hdisp == 832) svga->hdisp -= 32; @@ -3909,6 +4014,7 @@ s3_recalctimings(svga_t *svga) case 1600: svga->hdisp <<= 1; svga->dots_per_clock <<= 1; + svga->clock /= 2.0; break; default: break; @@ -3983,8 +4089,10 @@ s3_recalctimings(svga_t *svga) case S3_86C928: switch (s3->card_type) { case S3_METHEUS_86C928: + s3_log("928 16bpp: ClockSel=%02x, width=%d, hdisp=%d, dotsperclock=%d.\n", clk_sel, s3->width, svga->hdisp, svga->dots_per_clock); svga->hdisp <<= 1; svga->dots_per_clock <<= 1; + svga->clock *= 2.0; switch (svga->hdisp) { /*This might be a driver issue*/ case 800: s3->width = 1024; @@ -4042,6 +4150,7 @@ s3_recalctimings(svga_t *svga) case 1600: svga->hdisp <<= 1; svga->dots_per_clock <<= 1; + svga->clock /= 2.0; break; default: break; @@ -4064,6 +4173,7 @@ s3_recalctimings(svga_t *svga) case S3_SPEA_MERCURY_P64V: svga->hdisp <<= 1; svga->dots_per_clock <<= 1; + svga->clock /= 2.0; /* TODO: Is this still needed? */ if (svga->hdisp == 832) svga->hdisp -= 32; @@ -4075,6 +4185,7 @@ s3_recalctimings(svga_t *svga) case 1600: svga->hdisp <<= 1; svga->dots_per_clock <<= 1; + svga->clock /= 2.0; break; default: break; @@ -4150,6 +4261,7 @@ s3_recalctimings(svga_t *svga) case S3_VISION864: svga->hdisp = (svga->hdisp << 1) / 3; svga->dots_per_clock = (svga->dots_per_clock << 1) / 3; + svga->clock /= (2.0 / 3.0); break; case S3_VISION968: @@ -4157,6 +4269,7 @@ s3_recalctimings(svga_t *svga) case S3_MIROVIDEO40SV_ERGO_968: svga->hdisp = (svga->hdisp / 3) << 2; svga->dots_per_clock = (svga->hdisp / 3) << 2; + svga->clock /= (2.0 / 3.0); break; default: break; @@ -4187,6 +4300,7 @@ s3_recalctimings(svga_t *svga) case S3_NUMBER9_9FX_531: svga->hdisp >>= 1; svga->dots_per_clock >>= 1; + svga->clock /= 2.0; break; default: break; @@ -4200,6 +4314,7 @@ s3_recalctimings(svga_t *svga) case 1024: svga->hdisp >>= 1; svga->dots_per_clock >>= 1; + svga->clock /= 2.0; break; default: break; @@ -4211,6 +4326,7 @@ s3_recalctimings(svga_t *svga) case 1600: svga->hdisp <<= 1; svga->dots_per_clock <<= 1; + svga->clock /= 2.0; break; default: break; @@ -4232,6 +4348,7 @@ s3_recalctimings(svga_t *svga) case S3_SPEA_MERCURY_P64V: svga->hdisp <<= 1; svga->dots_per_clock <<= 1; + svga->clock /= 2.0; /* TODO: Is this still needed? */ if (svga->hdisp == 832) svga->hdisp -= 32; @@ -4243,6 +4360,7 @@ s3_recalctimings(svga_t *svga) case 1600: svga->hdisp <<= 1; svga->dots_per_clock <<= 1; + svga->clock /= 2.0; break; default: break; @@ -4398,11 +4516,13 @@ s3_trio64v_recalctimings(svga_t *svga) svga->render = svga_render_15bpp_highres; svga->hdisp >>= 1; svga->dots_per_clock >>= 1; + svga->clock /= 2.0; break; case 16: svga->render = svga_render_16bpp_highres; svga->hdisp >>= 1; svga->dots_per_clock >>= 1; + svga->clock /= 2.0; break; case 24: svga->render = svga_render_24bpp_highres; @@ -4459,9 +4579,11 @@ s3_trio64v_recalctimings(svga_t *svga) break; case 3: /*KRGB-16 (1.5.5.5)*/ svga->render = svga_render_15bpp_highres; + svga->clock /= 2.0; break; case 5: /*RGB-16 (5.6.5)*/ svga->render = svga_render_16bpp_highres; + svga->clock /= 2.0; break; case 6: /*RGB-24 (8.8.8)*/ svga->render = svga_render_24bpp_highres; @@ -4488,6 +4610,7 @@ static void s3_updatemapping(s3_t *s3) { svga_t *svga = &s3->svga; + xga_t *xga = (xga_t *) svga->xga; if (s3->pci && !(s3->pci_regs[PCI_REG_COMMAND] & PCI_COMMAND_MEM)) { mem_mapping_disable(&svga->mapping); @@ -4504,6 +4627,10 @@ s3_updatemapping(s3_t *s3) /* Enhanced mode forces 64kb at 0xa0000*/ mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000); svga->banked_mask = 0xffff; + if (xga_active && (svga->xga != NULL)) { + xga->on = 0; + mem_mapping_set_handler(&svga->mapping, svga->read, svga->readw, svga->readl, svga->write, svga->writew, svga->writel); + } } else switch (svga->gdcreg[6] & 0xc) { /*VGA mapping*/ case 0x0: /*128k at A0000*/ @@ -4513,6 +4640,10 @@ s3_updatemapping(s3_t *s3) case 0x4: /*64k at A0000*/ mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000); svga->banked_mask = 0xffff; + if (xga_active && (svga->xga != NULL)) { + xga->on = 0; + mem_mapping_set_handler(&svga->mapping, svga->read, svga->readw, svga->readl, svga->write, svga->writew, svga->writel); + } break; case 0x8: /*32k at B0000*/ mem_mapping_set_addr(&svga->mapping, 0xb0000, 0x08000); @@ -10135,6 +10266,7 @@ s3_init(const device_t *info) s3_in, s3_out, s3_hwcursor_draw, s3_trio64v_overlay_draw); + s3->color_key_enabled = !!device_get_config_int("colorkey"); } else { svga_init(info, svga, s3, vram_size, s3_recalctimings, @@ -10143,6 +10275,12 @@ s3_init(const device_t *info) NULL); } } + svga->read = s3_read; + svga->readw = s3_readw; + svga->readl = s3_readl; + svga->write = s3_write; + svga->writew = s3_writew; + svga->writel = s3_writel; mem_mapping_set_handler(&svga->mapping, s3_read, s3_readw, s3_readl, s3_write, s3_writew, s3_writel); mem_mapping_set_p(&svga->mapping, s3); @@ -10348,8 +10486,8 @@ s3_init(const device_t *info) s3->packed_mmio = 0; svga->crtc[0x5a] = 0x0a; svga->ramdac = device_add(&bt485_ramdac_device); - svga->clock_gen = device_add(&icd2061_device); - svga->getclock = icd2061_getclock; + svga->clock_gen = device_add(&ics2494an_305_device); + svga->getclock = ics2494_getclock; break; case S3_SPEA_MERCURY_LITE_PCI: @@ -10873,6 +11011,68 @@ static const device_config_t s3_phoenix_trio32_config[] = { { .name = "", .description = "", .type = CONFIG_END } }; +static const device_config_t s3_phoenix_trio32_v_config[] = { + { + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 2, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "512 KB", .value = 0 }, + { .description = "1 MB", .value = 1 }, + { .description = "2 MB", .value = 2 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "colorkey", + .description = "Video chroma-keying", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +}; + +static const device_config_t s3_trio64v_config[] = { + { + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 4, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "1 MB", .value = 1 }, + { .description = "2 MB", .value = 2 }, + { .description = "4 MB", .value = 4 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { + .name = "colorkey", + .description = "Video chroma-keying", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } +}; + static const device_config_t s3_standard_config[] = { { .name = "memory", @@ -11477,7 +11677,7 @@ const device_t s3_stb_powergraph_64_video_vlb_device = { .available = s3_stb_powergraph_64_video_available, .speed_changed = s3_speed_changed, .force_redraw = s3_force_redraw, - .config = s3_phoenix_trio32_config + .config = s3_phoenix_trio32_v_config }; const device_t s3_phoenix_trio64vplus_onboard_pci_device = { @@ -11491,7 +11691,7 @@ const device_t s3_phoenix_trio64vplus_onboard_pci_device = { .available = NULL, .speed_changed = s3_speed_changed, .force_redraw = s3_force_redraw, - .config = s3_standard_config + .config = s3_trio64v_config }; const device_t s3_phoenix_trio64vplus_pci_device = { @@ -11505,7 +11705,7 @@ const device_t s3_phoenix_trio64vplus_pci_device = { .available = s3_phoenix_trio64vplus_available, .speed_changed = s3_speed_changed, .force_redraw = s3_force_redraw, - .config = s3_standard_config + .config = s3_trio64v_config }; const device_t s3_cardex_trio64vplus_pci_device = { @@ -11519,7 +11719,7 @@ const device_t s3_cardex_trio64vplus_pci_device = { .available = s3_cardex_trio64vplus_available, .speed_changed = s3_speed_changed, .force_redraw = s3_force_redraw, - .config = s3_standard_config + .config = s3_trio64v_config }; const device_t s3_phoenix_vision864_vlb_device = { @@ -11659,7 +11859,7 @@ const device_t s3_trio64v2_dx_pci_device = { .available = s3_trio64v2_dx_available, .speed_changed = s3_speed_changed, .force_redraw = s3_force_redraw, - .config = s3_standard_config + .config = s3_trio64v_config }; const device_t s3_trio64v2_dx_onboard_pci_device = { @@ -11673,5 +11873,5 @@ const device_t s3_trio64v2_dx_onboard_pci_device = { .available = NULL, .speed_changed = s3_speed_changed, .force_redraw = s3_force_redraw, - .config = s3_standard_config + .config = s3_trio64v_config }; diff --git a/src/video/vid_s3_virge.c b/src/video/vid_s3_virge.c index 774b0d4b7..13a88a0c5 100644 --- a/src/video/vid_s3_virge.c +++ b/src/video/vid_s3_virge.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #define HAVE_STDARG_H #include <86box/86box.h> @@ -37,6 +38,7 @@ #include <86box/video.h> #include <86box/i2c.h> #include <86box/vid_ddc.h> +#include <86box/vid_xga.h> #include <86box/vid_svga.h> #include <86box/vid_svga_render.h> @@ -376,6 +378,8 @@ typedef struct virge_t { uint32_t dma_mmio_addr; uint32_t dma_data_type; + bool color_key_enabled; + int pci; int is_agp; @@ -910,6 +914,7 @@ s3_virge_recalctimings(svga_t *svga) if ((virge->chip != S3_VIRGEVX) && (virge->chip < S3_VIRGEGX2)) { svga->hdisp >>= 1; svga->dots_per_clock >>= 1; + svga->clock /= 2.0; } break; case 16: @@ -917,6 +922,7 @@ s3_virge_recalctimings(svga_t *svga) if ((virge->chip != S3_VIRGEVX) && (virge->chip < S3_VIRGEGX2)) { svga->hdisp >>= 1; svga->dots_per_clock >>= 1; + svga->clock /= 2.0; } break; case 24: @@ -1009,9 +1015,13 @@ s3_virge_recalctimings(svga_t *svga) break; case 3: /*KRGB-16 (1.5.5.5)*/ svga->render = svga_render_15bpp_highres; + if (virge->chip != S3_VIRGEVX) + svga->clock /= 2.0; break; case 5: /*RGB-16 (5.6.5)*/ svga->render = svga_render_16bpp_highres; + if (virge->chip != S3_VIRGEVX) + svga->clock /= 2.0; break; case 6: /*RGB-24 (8.8.8)*/ svga->render = svga_render_24bpp_highres; @@ -1036,6 +1046,7 @@ static void s3_virge_updatemapping(virge_t *virge) { svga_t *svga = &virge->svga; + xga_t *xga = (xga_t *) svga->xga; if (!(virge->pci_regs[PCI_REG_COMMAND] & PCI_COMMAND_MEM)) { mem_mapping_disable(&svga->mapping); @@ -1053,6 +1064,10 @@ s3_virge_updatemapping(virge_t *virge) case 0x4: /*64k at A0000*/ mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000); svga->banked_mask = 0xffff; + if (xga_active && (svga->xga != NULL)) { + xga->on = 0; + mem_mapping_set_handler(&svga->mapping, svga->read, svga->readw, svga->readl, svga->write, svga->writew, svga->writel); + } break; case 0x8: /*32k at B0000*/ mem_mapping_set_addr(&svga->mapping, 0xb0000, 0x08000); @@ -4785,6 +4800,132 @@ s3_virge_hwcursor_draw(svga_t *svga, int displine) } \ } while (0) + +static bool +s3_virge_colorkey(virge_t* virge, uint32_t x, uint32_t y) +{ + svga_t* svga = &virge->svga; + uint8_t comp_r = 0, comp_g = 0, comp_b = 0; + uint8_t comp_r_h = 0, comp_g_h = 0, comp_b_h = 0; + uint8_t r = 0, g = 0, b = 0; + uint8_t bytes_per_pel = 1; + uint8_t shift = ((virge->streams.chroma_ctrl >> 24) & 7) ^ 7; + bool is15bpp = false; + + uint32_t base_addr = svga->memaddr_latch; + uint32_t stride = (virge->chip < S3_VIRGEGX2) ? virge->streams.pri_stride : (svga->rowoffset << 3); + + bool color_key = false; + bool alpha_key = false; + + if (!virge->color_key_enabled) + return true; + + if (y > 2048) + return true; + + if (virge->chip >= S3_VIRGEGX2 && ((virge->streams.chroma_ctrl >> 29) & 3) == 0) + return true; + else if (!(virge->streams.chroma_ctrl & (1 << 28))) + return true; + + comp_r = (virge->streams.chroma_ctrl >> 16) & 0xFF; + comp_g = (virge->streams.chroma_ctrl >> 8) & 0xFF; + comp_b = (virge->streams.chroma_ctrl) & 0xFF; + + comp_r_h = (virge->streams.chroma_upper_bound >> 16) & 0xFF; + comp_g_h = (virge->streams.chroma_upper_bound >> 8) & 0xFF; + comp_b_h = (virge->streams.chroma_upper_bound) & 0xFF; + + if (svga->render == svga_render_32bpp_highres) bytes_per_pel = 4; + if (svga->render == svga_render_24bpp_highres) bytes_per_pel = 3; + if (svga->render == svga_render_16bpp_highres) bytes_per_pel = 2; + if (svga->render == svga_render_15bpp_highres) { bytes_per_pel = 2; is15bpp = true; } + + if (virge->chip >= S3_VIRGEDX && bytes_per_pel == 1) { + // TODO: Is this right for GX2 and later? Windows 2000 sources indicate that this is the format for alpha keying, but it's never used. + + /* Note for DX/GX: + If Bit 28 of Color/Chroma Key Control is 1: + Bit 29 = 0: Select color keying + Bit 29 = 1: Select alpha keying (lowest 8 bits of register used for compare) + */ + uint8_t index = virge->streams.chroma_ctrl & 0xFF; + alpha_key = (virge->chip < S3_VIRGEGX2) ? (virge->streams.chroma_ctrl & (1 << 29)) : ((virge->streams.chroma_ctrl >> 29) & 3) == 1; + + if (alpha_key) { + comp_r = comp_g = comp_b = index; + comp_r_h = comp_g_h = comp_b_h = index; + } + } + + if (alpha_key) { + uint8_t index = svga->vram[(base_addr + (stride * y) + x * bytes_per_pel) & svga->vram_mask]; + return !!((index >> shift) == (comp_r >> shift)); + } else { + switch (bytes_per_pel) { + case 1: { + uint8_t index = svga->vram[(base_addr + (stride * y) + x * bytes_per_pel) & svga->vram_mask]; + r = svga->vgapal[index].r << 2; + g = svga->vgapal[index].g << 2; + b = svga->vgapal[index].b << 2; + break; + } + case 2: { + uint16_t col = *(uint16_t*)&svga->vram[(base_addr + (stride * y) + x * bytes_per_pel) & svga->vram_mask]; + if (is15bpp) { + r = ((col >> 10) & 0x1f) << 3; + g = ((col >> 5) & 0x1f) << 3; + b = (col & 0x1f) << 3; + } else { + r = ((col >> 11) & 0x1f) << 3; + g = ((col >> 5) & 0x3f) << 2; + b = (col & 0x1f) << 3; + } + break; + } + case 3: { + uint8_t *col = &svga->vram[(base_addr + (stride * y) + x * bytes_per_pel) & svga->vram_mask]; + r = col[0]; + g = col[1]; + b = col[2]; + break; + } + case 4: { + uint32_t col = *(uint32_t*)&svga->vram[(base_addr + (stride * y) + x * bytes_per_pel) & svga->vram_mask]; + r = (col >> 16) & 0xFF; + g = (col >> 8) & 0xFF; + b = col & 0xFF; + break; + } + } + + r >>= shift; + g >>= shift; + b >>= shift; + comp_r >>= shift; + comp_g >>= shift; + comp_b >>= shift; + comp_r_h >>= shift; + comp_g_h >>= shift; + comp_b_h >>= shift; + + if (virge->chip < S3_VIRGEGX2) { + color_key = true; + } else { + color_key = ((virge->streams.chroma_ctrl >> 29) & 3) == 2; + } + + if (color_key) { + return !!(r == comp_r && g == comp_g && b == comp_b); + } else { + return !!(r >= comp_r && r <= comp_r_h && g >= comp_g && g <= comp_g_h && b >= comp_b && b <= comp_b_h); + } + } + + return true; +} + static void s3_virge_overlay_draw(svga_t *svga, int displine) { @@ -4818,7 +4959,10 @@ s3_virge_overlay_draw(svga_t *svga, int displine) OVERLAY_SAMPLE(); for (x = 0; x < x_size; x++) { - *p++ = r[x_read] | (g[x_read] << 8) | (b[x_read] << 16); + if (s3_virge_colorkey(virge, offset + x, displine - svga->y_add)) + *p++ = r[x_read] | (g[x_read] << 8) | (b[x_read] << 16); + else + p++; svga->overlay_latch.h_acc += virge->streams.k1_horiz_scale; if (svga->overlay_latch.h_acc >= 0) { @@ -5150,6 +5294,7 @@ s3_virge_init(const device_t *info) else virge->memory_size = device_get_config_int("memory"); + virge->color_key_enabled = !!device_get_config_int("colorkey"); virge->onboard = !!(info->local & 0x100); if (!virge->onboard) @@ -5533,6 +5678,17 @@ static const device_config_t s3_virge_config[] = { .selection = { { 0 } }, .bios = { { 0 } } }, + { + .name = "colorkey", + .description = "Video chroma-keying", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, { .name = "dithering", .description = "Dithering", @@ -5574,6 +5730,17 @@ static const device_config_t s3_virge_stb_config[] = { .selection = { { 0 } }, .bios = { { 0 } } }, + { + .name = "colorkey", + .description = "Video chroma-keying", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, { .name = "dithering", .description = "Dithering", @@ -5591,6 +5758,22 @@ static const device_config_t s3_virge_stb_config[] = { static const device_config_t s3_virge_357_config[] = { // clang-format off { + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 4, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "2 MB", .value = 2 }, + { .description = "4 MB", .value = 4 }, + { .description = "" } + }, + .bios = { { 0 } } + }, + + { .name = "bilinear", .description = "Bilinear filtering", .type = CONFIG_BINARY, @@ -5600,6 +5783,17 @@ static const device_config_t s3_virge_357_config[] = { .selection = { { 0 } }, .bios = { { 0 } } }, + { + .name = "colorkey", + .description = "Video chroma-keying", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, { .name = "dithering", .description = "Dithering", @@ -5642,6 +5836,17 @@ static const device_config_t s3_trio3d2x_config[] = { .selection = { { 0 } }, .bios = { { 0 } } }, + { + .name = "colorkey", + .description = "Video chroma-keying", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, { .name = "dithering", .description = "Dithering", @@ -5825,20 +6030,6 @@ const device_t s3_virge_357_agp_device = { .config = s3_virge_357_config }; -const device_t s3_diamond_stealth_4000_pci_device = { - .name = "S3 ViRGE/GX2 (Diamond Stealth 3D 4000) PCI", - .internal_name = "stealth3d_4000_pci", - .flags = DEVICE_PCI, - .local = S3_DIAMOND_STEALTH3D_4000, - .init = s3_virge_init, - .close = s3_virge_close, - .reset = s3_virge_reset, - .available = s3_virge_357_diamond_available, - .speed_changed = s3_virge_speed_changed, - .force_redraw = s3_virge_force_redraw, - .config = s3_virge_357_config -}; - const device_t s3_diamond_stealth_4000_agp_device = { .name = "S3 ViRGE/GX2 (Diamond Stealth 3D 4000) AGP", .internal_name = "stealth3d_4000_agp", diff --git a/src/video/vid_sigma.c b/src/video/vid_sigma.c index 6be21ce69..9f71773ad 100644 --- a/src/video/vid_sigma.c +++ b/src/video/vid_sigma.c @@ -234,6 +234,8 @@ sigma_out(uint16_t addr, uint8_t val, void *priv) case 0x2D8: sigma->sigmamode = val; + sigma->fullchange = changeframecount; + sigma_recalctimings(sigma); return; case 0x2D9: sigma->sigma_ctl = val; @@ -392,6 +394,7 @@ sigma_recalctimings(sigma_t *sigma) double disptime; double _dispontime; double _dispofftime; + double crtcconst = (cpuclock / 22440000.0 * (double) (1ULL << 32)) * 8.0; if (sigma->sigmamode & MODE_80COLS) { disptime = (sigma->crtc[0] + 1) << 1; @@ -402,8 +405,8 @@ sigma_recalctimings(sigma_t *sigma) } _dispofftime = disptime - _dispontime; - _dispontime *= CGACONST; - _dispofftime *= CGACONST; + _dispontime *= crtcconst; + _dispofftime *= crtcconst; sigma->dispontime = (uint64_t) (_dispontime); sigma->dispofftime = (uint64_t) (_dispofftime); } @@ -889,7 +892,7 @@ device_config_t sigma_config[] = { }, { .name = "bios_addr", - .description = "BIOS Address", + .description = "BIOS address", .type = CONFIG_HEX20, .default_string = NULL, .default_int = 0xc0000, diff --git a/src/video/vid_svga.c b/src/video/vid_svga.c index 512d5e11e..21ea23c93 100644 --- a/src/video/vid_svga.c +++ b/src/video/vid_svga.c @@ -404,6 +404,10 @@ svga_out(uint16_t addr, uint8_t val, void *priv) case 0x4: /*64k at A0000*/ mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000); svga->banked_mask = 0xffff; + if (xga_active && (svga->xga != NULL)) { + xga->on = 0; + mem_mapping_set_handler(&svga->mapping, svga->read, svga->readw, svga->readl, svga->write, svga->writew, svga->writel); + } break; case 0x8: /*32k at B0000*/ mem_mapping_set_addr(&svga->mapping, 0xb0000, 0x08000); @@ -789,34 +793,29 @@ svga_recalctimings(svga_t *svga) else svga->render = svga_render_text_80; - if (xga_active && (svga->xga != NULL)) { - if (xga->on) { - svga_log("XGA on=%d, base=%05x, ap=%x.\n", xga->on, svga->mapping.base, xga->aperture_cntl); - if ((svga->mapping.base == 0xb8000) && (xga->aperture_cntl >= 1)) /*Some operating systems reset themselves with ctrl-alt-del by going into text mode.*/ - xga->on = 0; - } - } svga->hdisp_old = svga->hdisp; } else { svga->hdisp_old = svga->hdisp; if ((svga->bpp <= 8) || ((svga->gdcreg[5] & 0x60) <= 0x20)) { if ((svga->gdcreg[5] & 0x60) == 0x00) { - if (svga->seqregs[1] & 8) /*Low res (320)*/ + if (svga->seqregs[1] & 8) { /*Low res (320)*/ svga->render = svga_render_4bpp_lowres; - else + svga_log("4 bpp low res.\n"); + } else svga->render = svga_render_4bpp_highres; } else if ((svga->gdcreg[5] & 0x60) == 0x20) { if (svga->seqregs[1] & 8) { /*Low res (320)*/ svga->render = svga_render_2bpp_lowres; - svga_log("2 bpp low res\n"); + svga_log("2 bpp low res.\n"); } else svga->render = svga_render_2bpp_highres; } else { svga->map8 = svga->pallook; - if (svga->lowres) /*Low res (320)*/ + if (svga->lowres) { /*Low res (320)*/ svga->render = svga_render_8bpp_lowres; - else + svga_log("8 bpp low res.\n"); + } else svga->render = svga_render_8bpp_highres; } } else { @@ -1047,11 +1046,11 @@ svga_recalctimings(svga_t *svga) crtcconst = svga->clock * svga->char_width; if (ibm8514_active && (svga->dev8514 != NULL)) { if (dev->on) - crtcconst8514 = svga->clock_8514; + crtcconst8514 = svga->clock_8514 * 8; } if (xga_active && (svga->xga != NULL)) { if (xga->on) - crtcconst_xga = svga->clock_xga; + crtcconst_xga = svga->clock_xga * 8; } #ifdef ENABLE_SVGA_LOG @@ -1095,7 +1094,6 @@ svga_recalctimings(svga_t *svga) if (dev->on) { disptime8514 = dev->h_total; _dispontime8514 = dev->h_disp_time; - svga_log("HTOTAL=%d, HDISP=%d.\n", dev->h_total, dev->h_disp); } } @@ -1137,6 +1135,7 @@ svga_recalctimings(svga_t *svga) case 1: /*Plus 8514/A*/ if (dev->on) { _dispofftime8514 = disptime8514 - _dispontime8514; + svga_log("DISPTIME8514=%lf, off=%lf, DISPONTIME8514=%lf, CRTCCONST8514=%lf.\n", disptime8514, _dispofftime8514, _dispontime8514, crtcconst8514); _dispontime8514 *= crtcconst8514; _dispofftime8514 *= crtcconst8514; @@ -1147,6 +1146,7 @@ svga_recalctimings(svga_t *svga) if (dev->dispofftime < TIMER_USEC) dev->dispofftime = TIMER_USEC; + svga->monitor->mon_interlace = !!dev->interlace; ibm8514_set_poll(svga); } else svga_set_poll(svga); @@ -1165,6 +1165,7 @@ svga_recalctimings(svga_t *svga) if (xga->dispofftime < TIMER_USEC) xga->dispofftime = TIMER_USEC; + svga->monitor->mon_interlace = !!xga->interlace; xga_set_poll(svga); } else svga_set_poll(svga); @@ -1183,6 +1184,7 @@ svga_recalctimings(svga_t *svga) if (dev->dispofftime < TIMER_USEC) dev->dispofftime = TIMER_USEC; + svga->monitor->mon_interlace = !!dev->interlace; ibm8514_set_poll(svga); } else if (xga->on) { _dispofftime_xga = disptime_xga - _dispontime_xga; @@ -1196,6 +1198,7 @@ svga_recalctimings(svga_t *svga) if (xga->dispofftime < TIMER_USEC) xga->dispofftime = TIMER_USEC; + svga->monitor->mon_interlace = !!xga->interlace; xga_set_poll(svga); } else svga_set_poll(svga); @@ -1214,7 +1217,7 @@ svga_recalctimings(svga_t *svga) int y_start = enable_overscan ? 0 : (svga->monitor->mon_overscan_y >> 1); int x_start = enable_overscan ? 0 : (svga->monitor->mon_overscan_x >> 1); video_wait_for_buffer_monitor(svga->monitor_index); - memset(svga->monitor->target_buffer->dat, 0, svga->monitor->target_buffer->w * svga->monitor->target_buffer->h * 4); + memset(svga->monitor->target_buffer->dat, 0, (size_t) svga->monitor->target_buffer->w * svga->monitor->target_buffer->h * 4); video_blit_memtoscreen_monitor(x_start, y_start, svga->monitor->mon_xsize + x_add, svga->monitor->mon_ysize + y_add, svga->monitor_index); video_wait_for_buffer_monitor(svga->monitor_index); svga->dpms_ui = 1; @@ -1248,6 +1251,10 @@ svga_recalctimings(svga_t *svga) else svga->hdisp >>= 1; } + + svga->monitor->mon_interlace = 0; + if (!svga->override && svga->interlace) + svga->monitor->mon_interlace = 1; } static void @@ -1445,8 +1452,10 @@ svga_poll(void *priv) svga->memaddr_backup = (svga->memaddr_backup << 2); svga->scanline = 0; - if (svga->attrregs[0x10] & 0x20) - svga->panning_blank = 1; + if (svga->attrregs[0x10] & 0x20) { + svga->scrollcache = 0; + svga->x_add = svga->left_overscan; + } } } if (svga->vc == svga->dispend) { @@ -1536,27 +1545,6 @@ svga_poll(void *priv) svga->dispon = 1; svga->displine = (svga->interlace && svga->oddeven) ? 1 : 0; - svga->linecountff = 0; - - svga->hwcursor_on = 0; - svga->hwcursor_latch = svga->hwcursor; - - svga->dac_hwcursor_on = 0; - svga->dac_hwcursor_latch = svga->dac_hwcursor; - - svga->overlay_on = 0; - svga->overlay_latch = svga->overlay; - - svga->panning_blank = 0; - } - - if (svga->scanline == (svga->crtc[10] & 31)) - svga->cursorvisible = 1; - - if (svga->panning_blank) { - svga->scrollcache = 0; - svga->x_add = svga->left_overscan; - } else { svga->scrollcache = (svga->attrregs[0x13] & 0x0f); if (!(svga->gdcreg[6] & 1) && !(svga->attrregs[0x10] & 1)) { /*Text mode*/ if (svga->seqregs[1] & 1) @@ -1576,7 +1564,20 @@ svga_poll(void *priv) svga->scrollcache <<= 1; svga->x_add = svga->left_overscan - svga->scrollcache; + + svga->linecountff = 0; + + svga->hwcursor_on = 0; + svga->hwcursor_latch = svga->hwcursor; + + svga->dac_hwcursor_on = 0; + svga->dac_hwcursor_latch = svga->dac_hwcursor; + + svga->overlay_on = 0; + svga->overlay_latch = svga->overlay; } + if (svga->scanline == (svga->crtc[10] & 31)) + svga->cursorvisible = 1; } } diff --git a/src/video/vid_svga_render.c b/src/video/vid_svga_render.c index b3a5c0192..f43db41c4 100644 --- a/src/video/vid_svga_render.c +++ b/src/video/vid_svga_render.c @@ -86,9 +86,14 @@ svga_render_blank(svga_t *svga) } uint32_t *line_ptr = &svga->monitor->target_buffer->line[svga->displine + svga->y_add][svga->x_add]; - uint32_t line_width = (uint32_t) (svga->hdisp + svga->scrollcache) * char_width * sizeof(uint32_t); + int32_t line_width = (uint32_t) (svga->hdisp + svga->scrollcache) * char_width * sizeof(uint32_t); - if ((svga->hdisp + svga->scrollcache) > 0) + if (svga->x_add < 0) { + line_ptr = &svga->monitor->target_buffer->line[svga->displine + svga->y_add][0]; + line_width -= svga->x_add; + } + + if (((svga->hdisp + svga->scrollcache) > 0) && (line_width >= 0)) memset(line_ptr, 0, line_width); } @@ -102,7 +107,8 @@ svga_render_overscan_left(svga_t *svga) return; uint32_t *line_ptr = svga->monitor->target_buffer->line[svga->displine + svga->y_add]; - for (int i = 0; i < svga->x_add; i++) + + if (svga->x_add >= 0) for (int i = 0; i < svga->x_add; i++) *line_ptr++ = svga->overscan_color; } @@ -746,7 +752,7 @@ svga_render_indexed_gfx(svga_t *svga, bool highres, bool combine8bits) if (svga->render_line_offset) { if (svga->render_line_offset > 0) { - memset(p, svga->overscan_color, charwidth * svga->render_line_offset * sizeof(uint32_t)); + memset(p, svga->overscan_color, (size_t) charwidth * svga->render_line_offset * sizeof(uint32_t)); p += charwidth * svga->render_line_offset; } } @@ -911,7 +917,7 @@ svga_render_indexed_gfx(svga_t *svga, bool highres, bool combine8bits) if (svga->render_line_offset < 0) { uint32_t *orig_line = &svga->monitor->target_buffer->line[svga->displine + svga->y_add][svga->x_add]; memmove(orig_line, orig_line + (charwidth * -svga->render_line_offset), (svga->hdisp) * 4); - memset((orig_line + svga->hdisp) - (charwidth * -svga->render_line_offset), svga->overscan_color, charwidth * -svga->render_line_offset * 4); + memset((orig_line + svga->hdisp) - (charwidth * -svga->render_line_offset), svga->overscan_color, (size_t) charwidth * -svga->render_line_offset * 4); } } diff --git a/src/video/vid_table.c b/src/video/vid_table.c index 2834213c7..c99f4aad1 100644 --- a/src/video/vid_table.c +++ b/src/video/vid_table.c @@ -28,6 +28,7 @@ #include <86box/machine.h> #include <86box/mem.h> #include <86box/device.h> +#include <86box/lpt.h> #include <86box/plat.h> #include <86box/video.h> #include <86box/vid_svga.h> @@ -113,6 +114,7 @@ video_cards[] = { { .device = &et4000_isa_device, .flags = VIDEO_FLAG_TYPE_NONE }, { .device = &v7_vga_1024i_device, .flags = VIDEO_FLAG_TYPE_NONE }, { .device = &wy700_device, .flags = VIDEO_FLAG_TYPE_NONE }, + { .device = &v6355d_device, .flags = VIDEO_FLAG_TYPE_NONE }, /* ISA16 */ { .device = &mach64gx_isa_device, .flags = VIDEO_FLAG_TYPE_NONE }, { .device = &gd5420_isa_device, .flags = VIDEO_FLAG_TYPE_NONE }, @@ -228,7 +230,6 @@ video_cards[] = { { .device = &s3_diamond_stealth_2000pro_pci_device, .flags = VIDEO_FLAG_TYPE_NONE }, { .device = &s3_virge_385_pci_device, .flags = VIDEO_FLAG_TYPE_NONE }, { .device = &s3_virge_357_pci_device, .flags = VIDEO_FLAG_TYPE_NONE }, - { .device = &s3_diamond_stealth_4000_pci_device, .flags = VIDEO_FLAG_TYPE_NONE }, { .device = &s3_trio3d2x_pci_device, .flags = VIDEO_FLAG_TYPE_NONE }, { .device = &millennium_device, .flags = VIDEO_FLAG_TYPE_NONE }, { .device = &millennium_ii_device, .flags = VIDEO_FLAG_TYPE_NONE }, @@ -282,6 +283,22 @@ vid_table_log(const char *fmt, ...) # define vid_table_log(fmt, ...) #endif +static pc_timer_t framerate_timer; + +void +video_update_framerates(void* priv) +{ + (void)priv; + int i = 0; + + for (i = 0; i < GFXCARD_MAX; i++) { + monitors[i].mon_actualrenderedframes = monitors[i].mon_renderedframes; + monitors[i].mon_renderedframes = 0; + } + + timer_on_auto(&framerate_timer, 1000 * 1000); +} + void video_reset_close(void) { @@ -314,6 +331,9 @@ video_prepare(void) /* Do an inform on the default values, so that that there's some sane values initialized even if the device init function does not do an inform of its own. */ video_inform_monitor(VIDEO_FLAG_TYPE_SPECIAL, &timing_default, i); + + monitors[i].mon_interlace = 0; + monitors[i].mon_composite = 0; } } @@ -357,6 +377,7 @@ video_reset(int card) device_add(video_cards[card].device); } + timer_add(&framerate_timer, video_update_framerates, NULL, 1); was_reset = 1; } diff --git a/src/video/vid_tandy.c b/src/video/vid_tandy.c index 7d9b5af1a..53c5b0dfd 100644 --- a/src/video/vid_tandy.c +++ b/src/video/vid_tandy.c @@ -762,6 +762,8 @@ tandy_vid_init(tandy_t *dev) tandy_vid_in, NULL, NULL, tandy_vid_out, NULL, NULL, dev); dev->vid = vid; + + monitors[monitor_index_global].mon_composite = !!vid->composite; } const device_config_t vid_config[] = { diff --git a/src/video/vid_tgui9440.c b/src/video/vid_tgui9440.c index 5cc3a8a78..6a0e1ca5e 100644 --- a/src/video/vid_tgui9440.c +++ b/src/video/vid_tgui9440.c @@ -72,6 +72,7 @@ #include <86box/video.h> #include <86box/i2c.h> #include <86box/vid_ddc.h> +#include <86box/vid_xga.h> #include <86box/vid_svga.h> #include <86box/vid_svga_render.h> @@ -911,6 +912,7 @@ static void tgui_recalcmapping(tgui_t *tgui) { svga_t *svga = &tgui->svga; + xga_t *xga = (xga_t *) svga->xga; if (tgui->type == TGUI_9400CXI) { if (svga->gdcreg[0x10] & EXT_CTRL_LATCH_COPY) { @@ -964,6 +966,10 @@ tgui_recalcmapping(tgui_t *tgui) case 0x4: /*64k at A0000*/ mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000); svga->banked_mask = 0xffff; + if (xga_active && (svga->xga != NULL)) { + xga->on = 0; + mem_mapping_set_handler(&svga->mapping, svga->read, svga->readw, svga->readl, svga->write, svga->writew, svga->writel); + } break; case 0x8: /*32k at B0000*/ mem_mapping_set_addr(&svga->mapping, 0xb0000, 0x08000); @@ -988,6 +994,10 @@ tgui_recalcmapping(tgui_t *tgui) case 0x4: /*64k at A0000*/ mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000); svga->banked_mask = 0xffff; + if (xga_active && (svga->xga != NULL)) { + xga->on = 0; + mem_mapping_set_handler(&svga->mapping, svga->read, svga->readw, svga->readl, svga->write, svga->writew, svga->writel); + } break; case 0x8: /*32k at B0000*/ mem_mapping_set_addr(&svga->mapping, 0xb0000, 0x08000); diff --git a/src/video/vid_voodoo_banshee.c b/src/video/vid_voodoo_banshee.c index d80a39a15..86329ee8d 100644 --- a/src/video/vid_voodoo_banshee.c +++ b/src/video/vid_voodoo_banshee.c @@ -41,6 +41,7 @@ #include <86box/video.h> #include <86box/i2c.h> #include <86box/vid_ddc.h> +#include <86box/vid_xga.h> #include <86box/vid_svga.h> #include <86box/vid_svga_render.h> #include <86box/vid_voodoo_common.h> @@ -452,6 +453,7 @@ static void banshee_updatemapping(banshee_t *banshee) { svga_t *svga = &banshee->svga; + xga_t *xga = (xga_t *) svga->xga; if (!(banshee->pci_regs[PCI_REG_COMMAND] & PCI_COMMAND_MEM)) { #if 0 @@ -473,6 +475,10 @@ banshee_updatemapping(banshee_t *banshee) case 0x4: /*64k at A0000*/ mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000); svga->banked_mask = 0xffff; + if (xga_active && (svga->xga != NULL)) { + xga->on = 0; + mem_mapping_set_handler(&svga->mapping, svga->read, svga->readw, svga->readl, svga->write, svga->writew, svga->writel); + } break; case 0x8: /*32k at B0000*/ mem_mapping_set_addr(&svga->mapping, 0xb0000, 0x08000); @@ -956,7 +962,7 @@ banshee_ext_outl(uint16_t addr, uint32_t val, void *priv) case Video_vidChromaKeyMin: banshee->vidChromaKeyMin = val; break; - + case Video_vidChromaKeyMax: banshee->vidChromaKeyMax = val; break; @@ -2760,7 +2766,7 @@ banshee_overlay_draw(svga_t *svga, int displine) voodoo->overlay.src_y += (1 << 20); return; } - + chroma_test_passed = banshee_chroma_key(banshee, svga->overlay_latch.x, displine - svga->y_add); if ((voodoo->overlay.src_y >> 20) < 2048) @@ -2880,7 +2886,7 @@ banshee_overlay_draw(svga_t *svga, int displine) fil[x * 3 + 1] = vb_filter_v1_g[fil[x * 3 + 1]][fil3[(x + 1) * 3 + 1]]; fil[x * 3 + 2] = vb_filter_v1_rb[fil[x * 3 + 2]][fil3[(x + 1) * 3 + 2]]; chroma_test_passed = banshee_chroma_key(banshee, svga->overlay_latch.x + x, displine - svga->y_add); - + if (chroma_test_passed) p[x] = (fil[x * 3 + 2] << 16) | (fil[x * 3 + 1] << 8) | fil[x * 3]; } diff --git a/src/video/vid_voodoo_banshee_blitter.c b/src/video/vid_voodoo_banshee_blitter.c index cf2824bba..ad92d580f 100644 --- a/src/video/vid_voodoo_banshee_blitter.c +++ b/src/video/vid_voodoo_banshee_blitter.c @@ -1,7 +1,5 @@ /*Current issues : - - missing screen->screen scaled blits with format conversion - missing YUV blits (YUV -> 32-bit, 24-bit, or 16-bit RGB now done) - - missing linestyle - missing wait for vsync - missing reversible lines diff --git a/src/video/vid_xga.c b/src/video/vid_xga.c index 91a2ce500..a91a893df 100644 --- a/src/video/vid_xga.c +++ b/src/video/vid_xga.c @@ -163,24 +163,76 @@ xga_updatemapping(svga_t *svga) case 0: xga_log("XGA: VGA mode address decode disabled.\n"); mem_mapping_disable(&xga->linear_mapping); + xga->test_stage = 0; + xga->mapping_base = svga->mapping.base; break; case 1: xga_log("XGA: VGA mode address decode enabled.\n"); mem_mapping_disable(&xga->linear_mapping); + xga->test_stage = 0; + mem_mapping_set_handler(&svga->mapping, svga->read, svga->readw, svga->readl, svga->write, svga->writew, svga->writel); + switch (svga->gdcreg[6] & 0xc) { + case 0x0: /*128k at A0000*/ + mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x20000); + svga->banked_mask = 0xffff; + break; + case 0x4: /*64k at A0000*/ + mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000); + svga->banked_mask = 0xffff; + break; + case 0x8: /*32k at B0000*/ + mem_mapping_set_addr(&svga->mapping, 0xb0000, 0x08000); + svga->banked_mask = 0x7fff; + break; + case 0xC: /*32k at B8000*/ + mem_mapping_set_addr(&svga->mapping, 0xb8000, 0x08000); + svga->banked_mask = 0x7fff; + break; + + default: + break; + } + xga->mapping_base = svga->mapping.base; break; case 2: xga_log("XGA: 132-Column mode address decode disabled.\n"); mem_mapping_disable(&xga->linear_mapping); + xga->test_stage = 0; + xga->mapping_base = svga->mapping.base; break; case 3: xga_log("XGA: 132-Column mode address decode enabled.\n"); mem_mapping_disable(&xga->linear_mapping); + xga->test_stage = 0; + mem_mapping_set_handler(&svga->mapping, svga->read, svga->readw, svga->readl, svga->write, svga->writew, svga->writel); + switch (svga->gdcreg[6] & 0xc) { + case 0x0: /*128k at A0000*/ + mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x20000); + svga->banked_mask = 0xffff; + break; + case 0x4: /*64k at A0000*/ + mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000); + svga->banked_mask = 0xffff; + break; + case 0x8: /*32k at B0000*/ + mem_mapping_set_addr(&svga->mapping, 0xb0000, 0x08000); + svga->banked_mask = 0x7fff; + break; + case 0xC: /*32k at B8000*/ + mem_mapping_set_addr(&svga->mapping, 0xb8000, 0x08000); + svga->banked_mask = 0x7fff; + break; + + default: + break; + } + xga->mapping_base = svga->mapping.base; break; default: - xga_log("XGA: Extended Graphics mode, ap=%d.\n", xga->aperture_cntl); + xga_log("XGA: Extended Graphics mode, ap=%d, mapbits=%x.\n", xga->aperture_cntl, svga->gdcreg[6] & 0xc); switch (xga->aperture_cntl) { case 0: - xga_log("XGA: No 64KB aperture: 1MB=%x, 4MB=%x, SVGA Mapping Base=%x.\n", xga->base_addr_1mb, xga->linear_base, svga->mapping.base); + xga_log("XGA: No 64KB aperture: 1MB=%x, 4MB=%x, SVGA Mapping Base=%x, mapbits=%x.\n", xga->base_addr_1mb, xga->linear_base, svga->mapping.base, svga->gdcreg[6] & 0xc); if (xga->base_addr_1mb) { mem_mapping_set_addr(&xga->linear_mapping, xga->base_addr_1mb, 0x100000); mem_mapping_enable(&xga->linear_mapping); @@ -190,6 +242,7 @@ xga_updatemapping(svga_t *svga) } else mem_mapping_disable(&xga->linear_mapping); + xga->test_stage = 0; mem_mapping_set_handler(&svga->mapping, svga->read, svga->readw, svga->readl, svga->write, svga->writew, svga->writel); switch (svga->gdcreg[6] & 0xc) { case 0x0: /*128k at A0000*/ @@ -212,10 +265,13 @@ xga_updatemapping(svga_t *svga) default: break; } + xga->mapping_base = svga->mapping.base; break; case 1: mem_mapping_disable(&xga->linear_mapping); - xga_log("XGA: 64KB aperture at A0000.\n"); + xga_log("XGA: 64KB aperture at A0000, on=%d.\n", xga->on); + xga->test_stage = 0; + xga->mapping_base = 0xa0000; mem_mapping_set_handler(&svga->mapping, xga_read, xga_readw, xga_readl, xga_write, xga_writew, xga_writel); mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000); xga->banked_mask = 0xffff; @@ -223,6 +279,8 @@ xga_updatemapping(svga_t *svga) case 2: mem_mapping_disable(&xga->linear_mapping); xga_log("XGA: 64KB aperture at B0000.\n"); + xga->test_stage = 0; + xga->mapping_base = 0xb0000; mem_mapping_set_handler(&svga->mapping, xga_read, xga_readw, xga_readl, xga_write, xga_writew, xga_writel); mem_mapping_set_addr(&svga->mapping, 0xb0000, 0x10000); xga->banked_mask = 0xffff; @@ -258,6 +316,8 @@ void xga_recalctimings(svga_t *svga) { xga_t *xga = (xga_t *) svga->xga; + + xga_log("DispCntl2=%d, lowres=%x.\n", xga->disp_cntl_2 & 7, svga->lowres); if (xga->on) { xga->h_total = xga->htotal + 1; xga->v_total = xga->vtotal + 1; @@ -305,6 +365,7 @@ xga_recalctimings(svga_t *svga) break; } + svga->render_xga = xga_render_blank; switch (xga->disp_cntl_2 & 7) { case 2: svga->render_xga = xga_render_4bpp; @@ -317,7 +378,6 @@ xga_recalctimings(svga_t *svga) break; default: - svga->render_xga = xga_render_blank; break; } @@ -602,6 +662,12 @@ xga_ext_outb(uint16_t addr, uint8_t val, void *priv) xga_log("[%04X:%08X]: EXT OUTB = %02x, val = %02x\n", CS, cpu_state.pc, addr, val); xga->int_stat = val; break; + case 6: + xga_log("[%04X:%08X]: EXT OUTB = %02x, val = %02x\n", CS, cpu_state.pc, addr, val); + break; + case 7: + xga_log("[%04X:%08X]: EXT OUTB = %02x, val = %02x\n", CS, cpu_state.pc, addr, val); + break; case 8: xga->ap_idx = val; xga_log("Aperture CNTL = %d, val = %02x, up to bit6 = %02x\n", xga->aperture_cntl, @@ -2379,8 +2445,6 @@ exec_command: xga->accel.px_map_format[xga->accel.src_map] & 0x0f, xga->accel.plane_mask); - xga->src_reverse_order = 0; - xga->dst_reverse_order = 0; switch ((xga->accel.command >> 24) & 0x0f) { case 2: /*Short Stroke Vectors Read */ xga_log("Short Stroke Vectors Read.\n"); @@ -2837,31 +2901,39 @@ xga_render_16bpp(svga_t *svga) void xga_write_test(uint32_t addr, uint8_t val, void *priv) { - svga_t *svga = (svga_t *) priv; - xga_t *xga = (xga_t *) svga->xga; + svga_t *svga = (svga_t *) priv; + xga_t *xga = (xga_t *) svga->xga; if (xga_active && xga) { - if (((xga->op_mode & 7) >= 1) && xga->aperture_cntl && (svga->mapping.base == 0xb8000)) { - xga_log("WriteAddr=%05x.\n", addr); - if (val == 0xa5) { /*Memory size test of XGA*/ - xga->test = val; - if (addr == 0xa0001) - xga->a5_test = 1; - else if (addr == 0xafffe) - xga->a5_test = 2; + if ((xga->op_mode & 7) == 4) { + if (xga->aperture_cntl && !xga->test_stage) { + if (val == 0xa5) { /*Memory size test of XGA*/ + xga->test = val; + if (addr == (xga->mapping_base + 0x0001)) + xga->a5_test = 1; + else if (addr == (xga->mapping_base + xga->banked_mask - 0x0001)) + xga->a5_test = 2; + xga->test_stage = 1; + xga->on = 0; + xga_log("XGA test1 addr=%05x, test=%02x.\n", addr, xga->a5_test); + } else if (val == 0x5a) { + xga->test = val; + xga->test_stage = 1; + xga->on = 0; + xga_log("XGA test2 addr = %05x.\n", addr); + } else if ((addr == xga->mapping_base) || (addr == (xga->mapping_base + 0x0010))) { + addr += xga->write_bank; + xga->vram[addr & xga->vram_mask] = val; + xga_log("XGA Linear endian reverse write, val = %02x, addr = %05x, banked mask = %04x, a5test=%d.\n", val, addr, svga->banked_mask, xga->a5_test); + } + } else { + xga->test_stage = 0; xga->on = 0; - xga_log("XGA test1 addr=%05x, test=%02x.\n", addr, xga->a5_test); - } else if (val == 0x5a) { - xga->test = val; - xga->on = 0; - xga_log("XGA test2 addr = %05x.\n", addr); - } else if ((addr == 0xa0000) || (addr == 0xa0010)) { - addr += xga->write_bank; - xga->vram[addr & xga->vram_mask] = val; - xga_log("XGA Linear endian reverse write, val = %02x, addr = %05x, banked mask = %04x, a5test=%d.\n", val, addr, svga->banked_mask, xga->a5_test); + xga_log("Write: AP=%x, teststage=%x, on=%d.\n", xga->aperture_cntl, xga->test_stage, xga->on); } - } else if (xga->aperture_cntl || (!xga->aperture_cntl && (svga->mapping.base == 0xa0000))) { + } else { + xga->test_stage = 0; xga->on = 0; xga_log("OFF XGA write.\n"); } @@ -2899,7 +2971,7 @@ xga_write(uint32_t addr, uint8_t val, void *priv) addr &= xga->banked_mask; addr += xga->write_bank; - xga_log("WriteBankedB addr=%08x, val=%02x, addrshift1=%08x.\n", addr, val, addr >> 1); + xga_log("WriteBankedB addr=%08x, val=%02x, ison=%d, mapbits=%x.\n", addr, val, xga->on, svga->gdcreg[6] & 0x0c); if (addr >= xga->vram_size) return; @@ -2917,7 +2989,7 @@ xga_writew(uint32_t addr, uint16_t val, void *priv) addr &= xga->banked_mask; addr += xga->write_bank; - xga_log("WriteBankedW addr=%08x, val=%04x, addrshift1=%08x.\n", addr, val, addr >> 1); + xga_log("WriteBankedW addr=%08x, val=%04x, ison=%d.\n", addr, val, xga->on); if (addr >= xga->vram_size) return; @@ -2935,7 +3007,7 @@ xga_writel(uint32_t addr, uint32_t val, void *priv) addr &= xga->banked_mask; addr += xga->write_bank; - xga_log("WriteBankedL addr=%08x, val=%08x, addrshift1=%08x.\n", addr, val, addr >> 1); + xga_log("WriteBankedL addr=%08x, val=%08x.\n", addr, val); if (addr >= xga->vram_size) return; @@ -2953,31 +3025,41 @@ xga_read_test(uint32_t addr, void *priv) uint8_t ret = 0x00; if (xga_active && xga) { - if (((xga->op_mode & 7) >= 1) && xga->aperture_cntl && (svga->mapping.base == 0xb8000)) { - if (xga->test == 0xa5) { /*Memory size test of XGA*/ - if (addr == 0xa0001) { + xga_log("Read: OPMODE=%x, APCNTL=%x, base=%05x, test=%x.\n", xga->op_mode & 7, xga->aperture_cntl, svga->mapping.base, xga->test); + if ((xga->op_mode & 7) == 4) { + if (xga->aperture_cntl && (xga->test_stage == 1)) { + if (xga->test == 0xa5) { /*Memory size test of XGA*/ + if (addr == (xga->mapping_base + 0x0001)) { + xga_log("A5 test bank = %x, svgabase=%05x.\n", addr, svga->mapping.base); + ret = xga->test; + } else if ((addr == xga->mapping_base) && (xga->a5_test == 1)) { /*This is required by XGAKIT to pass the memory test*/ + xga_log("A5 test bank = %x.\n", addr); + addr += xga->read_bank; + ret = xga->vram[addr & xga->vram_mask]; + } else + ret = xga->test; + + xga->test_stage = 0; + xga->on = 1; + xga_log("A5 read: XGA ON = %d, addr = %05x, ret = %02x, test1 = %x.\n", xga->on, addr, ret, xga->a5_test); + return ret; + } else if (xga->test == 0x5a) { + xga->test_stage = 0; ret = xga->test; xga->on = 1; - } else if ((addr == 0xa0000) && (xga->a5_test == 1)) { /*This is required by XGAKIT to pass the memory test*/ - xga_log("A5 test bank = %x.\n", addr); + xga_log("5A read: XGA ON = %d.\n", xga->on); + return ret; + } else if ((addr == xga->mapping_base) || (addr == (xga->mapping_base + 0x0010))) { addr += xga->read_bank; - ret = xga->vram[addr & xga->vram_mask]; - } else { - ret = xga->test; - xga->on = 1; + return xga->vram[addr & xga->vram_mask]; } - xga_log("A5 read: XGA ON = %d, addr = %05x, ret = %02x, test1 = %x.\n", xga->on, addr, ret, xga->a5_test); - return ret; - } else if (xga->test == 0x5a) { - ret = xga->test; - xga->on = 1; - xga_log("5A read: XGA ON = %d.\n", xga->on); - return ret; - } else if ((addr == 0xa0000) || (addr == 0xa0010)) { - addr += xga->read_bank; - return xga->vram[addr & xga->vram_mask]; + } else { + xga->test_stage = 0; + xga->on = 0; + xga_log("Read: AP=%x, teststage=%x, on=%d.\n", xga->aperture_cntl, xga->test_stage, xga->on); } - } else if (xga->aperture_cntl || (!xga->aperture_cntl && (svga->mapping.base == 0xa0000))) { + } else { + xga->test_stage = 0; xga->on = 0; xga_log("OFF XGA read.\n"); } @@ -3029,6 +3111,7 @@ xga_read(uint32_t addr, void *priv) cycles -= svga->monitor->mon_video_timing_read_b; ret = xga_read_banked(addr, svga); + xga_log("ReadBankedB addr=%08x, ret=%02x, ison=%d.\n", addr, ret, xga->on); return ret; } @@ -3050,6 +3133,7 @@ xga_readw(uint32_t addr, void *priv) cycles -= svga->monitor->mon_video_timing_read_w; ret = xga_readw_banked(addr, svga); + xga_log("ReadBankedW addr=%08x, ret=%04x, ison=%d.\n", addr, ret, xga->on); return ret; } @@ -3398,6 +3482,7 @@ xga_mca_write(int port, uint8_t val, void *priv) mem_mapping_disable(&xga->memio_mapping); xga->on = 0; xga->a5_test = 0; + xga->test_stage = 0; /* Save the MCA register value. */ xga->pos_regs[port & 7] = val; @@ -3450,11 +3535,11 @@ xga_reset(void *priv) xga_t *xga = (xga_t *) svga->xga; xga_log("Normal Reset.\n"); - if (xga_standalone_enabled) - mem_mapping_disable(&xga->memio_mapping); + mem_mapping_disable(&xga->memio_mapping); xga->on = 0; xga->a5_test = 0; + xga->test_stage = 0; mem_mapping_set_handler(&svga->mapping, svga->read, svga->readw, svga->readl, svga->write, svga->writew, svga->writel); svga_set_poll(svga); } @@ -3651,6 +3736,7 @@ xga_init(const device_t *info) xga->hwcursor.cur_xsize = 64; xga->hwcursor.cur_ysize = 64; xga->a5_test = 0; + xga->test_stage = 0; if (info->flags & DEVICE_MCA) { video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_xga_mca); diff --git a/src/video/video.c b/src/video/video.c index 785479e15..e2f2801d3 100644 --- a/src/video/video.c +++ b/src/video/video.c @@ -476,6 +476,7 @@ video_blit_memtoscreen_monitor(int x, int y, int w, int h, int monitor_index) monitors[monitor_index].mon_blit_data_ptr->y = y; monitors[monitor_index].mon_blit_data_ptr->w = w; monitors[monitor_index].mon_blit_data_ptr->h = h; + monitors[monitor_index].mon_renderedframes++; thread_set_event(monitors[monitor_index].mon_blit_data_ptr->wake_blit_thread); MTR_END("video", "video_blit_memtoscreen"); @@ -1058,20 +1059,20 @@ loadfont_common(FILE *fp, int format) for (uint16_t c = d; c < d + 256; c++) { (void) !fread(&fontdatm[c][8], 1, 8, fp); } - for (uint16_t c = d + 256; c < d + 512; c++) { + for (uint32_t c = d + 256; c < d + 512; c++) { (void) !fread(&fontdatm[c][8], 1, 8, fp); } - for (uint16_t c = d; c < d + 256; c++) { + for (uint32_t c = d; c < d + 256; c++) { (void) !fread(&fontdatm[c][0], 1, 8, fp); } - for (uint16_t c = d + 256; c < d + 512; c++) { + for (uint32_t c = d + 256; c < d + 512; c++) { (void) !fread(&fontdatm[c][0], 1, 8, fp); } fseek(fp, 4096, SEEK_CUR); /* Skip blank section */ - for (uint16_t c = d; c < d + 256; c++) { + for (uint32_t c = d; c < d + 256; c++) { (void) !fread(&fontdat[c][0], 1, 8, fp); } - for (uint16_t c = d + 256; c < d + 512; c++) { + for (uint32_t c = d + 256; c < d + 512; c++) { (void) !fread(&fontdat[c][0], 1, 8, fp); } } diff --git a/vcpkg.json b/vcpkg.json index 20b783add..52e30dd51 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,6 +1,6 @@ { "name": "86box", - "version-string": "5.0", + "version-string": "5.0.1", "homepage": "https://86box.net/", "documentation": "https://86box.readthedocs.io/", "license": "GPL-2.0-or-later",