diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e09b5636f..9e5521cf4 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -5,6 +5,7 @@ _Briefly describe what you are submitting._ Checklist ========= * [ ] Closes #xxx +* [ ] I have tested my changes locally and validated that the functionality works as intended * [ ] I have discussed this with core contributors already * [ ] This pull request requires changes to the ROM set * [ ] I have opened a roms pull request - https://github.com/86Box/roms/pull/changeme/ diff --git a/.github/workflows/cmake_linux.yml b/.github/workflows/cmake_linux.yml index 5dc0387d8..3fb8b0d61 100644 --- a/.github/workflows/cmake_linux.yml +++ b/.github/workflows/cmake_linux.yml @@ -55,6 +55,7 @@ jobs: - name: SDL GUI qt: off qt6: off + slug: -SDL static: on - name: Qt 5 GUI qt: on @@ -121,10 +122,9 @@ jobs: - name: Configure CMake run: >- - cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }} - --toolchain ${{ matrix.environment.toolchain }} + cmake -S . -B build --preset ${{ matrix.build.preset }} + --toolchain ${{ matrix.environment.toolchain }} -D NEW_DYNAREC=${{ matrix.dynarec.new }} - -D CMAKE_INSTALL_PREFIX=./build/artifacts -D QT=${{ matrix.ui.qt }} -D USE_QT6=${{ matrix.ui.qt6 }} diff --git a/.github/workflows/cmake_macos.yml b/.github/workflows/cmake_macos.yml index c917932fe..ace5314c8 100644 --- a/.github/workflows/cmake_macos.yml +++ b/.github/workflows/cmake_macos.yml @@ -26,11 +26,11 @@ on: jobs: - macos13-x86_64: + macos: - name: "${{ matrix.ui.name }}, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, x86_64" + name: "${{ matrix.ui.name }}, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.environment.arch }}" - runs-on: macos-13 + runs-on: ${{ matrix.environment.runner }} strategy: fail-fast: true @@ -54,12 +54,27 @@ jobs: ui: - name: SDL GUI qt: off + slug: -SDL static: on - - name: Qt GUI + - name: Qt 5 GUI qt: on - slug: -Qt + slug: -Qt5 packages: >- qt@5 + environment: + - arch: x86_64 + toolchain: ./cmake/flags-gcc-x86_64.cmake + slug: -x86_64 + runner: macos-13 + - arch: arm64 + toolchain: ./cmake/llvm-macos-aarch64.cmake + slug: -arm64 + runner: macos-14 + exclude: + - dynarec: + new: off + environment: + arch: arm64 steps: - name: Install dependencies @@ -81,10 +96,9 @@ jobs: - name: Configure CMake run: >- - cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }} - --toolchain ./cmake/flags-gcc-x86_64.cmake + cmake -S . -B build --preset ${{ matrix.build.preset }} + --toolchain ${{ matrix.environment.toolchain }} -D NEW_DYNAREC=${{ matrix.dynarec.new }} - -D CMAKE_INSTALL_PREFIX=./build/artifacts -D QT=${{ matrix.ui.qt }} -D Qt5_ROOT=$(brew --prefix qt@5) -D Qt5LinguistTools_ROOT=$(brew --prefix qt@5) @@ -100,82 +114,5 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: '86Box${{ matrix.ui.slug }}${{ matrix.dynarec.slug }}${{ matrix.build.slug }}-macOS-x86_64-gha${{ github.run_number }}' - path: build/artifacts/** - - macos14-arm64: - - name: "${{ matrix.ui.name }}, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, arm64" - - runs-on: macos-14 - - strategy: - fail-fast: true - matrix: - build: -# - name: Regular -# preset: regular - - name: Debug - preset: dev_debug - slug: -Debug - - name: Dev - preset: development - slug: -Dev - dynarec: -# - name: ODR -# new: off -# slug: -ODR - - name: NDR - new: on - slug: -NDR - ui: - - name: SDL GUI - qt: off - static: on - - name: Qt GUI - qt: on - slug: -Qt - packages: >- - qt@5 - - steps: - - name: Install dependencies - run: >- - brew install - sdl2 - rtmidi - openal-soft - fluidsynth - libslirp - vde - libserialport - ${{ matrix.ui.packages }} - - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - - name: Configure CMake - run: >- - cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }} - --toolchain ./cmake/llvm-macos-aarch64.cmake - -D NEW_DYNAREC=${{ matrix.dynarec.new }} - -D CMAKE_INSTALL_PREFIX=./build/artifacts - -D QT=${{ matrix.ui.qt }} - -D Qt5_ROOT=$(brew --prefix qt@5) - -D Qt5LinguistTools_ROOT=$(brew --prefix qt@5) - -D OpenAL_ROOT=$(brew --prefix openal-soft) - -D LIBSERIALPORT_ROOT=$(brew --prefix libserialport) - - - name: Build - run: cmake --build build - - - name: Generate package - run: cmake --install build - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: '86Box${{ matrix.ui.slug }}${{ matrix.dynarec.slug }}${{ matrix.build.slug }}-macOS-arm64-gha${{ github.run_number }}' + name: '86Box${{ matrix.ui.slug }}${{ matrix.dynarec.slug }}${{ matrix.build.slug }}-macOS${{ matrix.environment.slug }}-gha${{ github.run_number }}' path: build/artifacts/** diff --git a/.github/workflows/cmake_windows_msys2.yml b/.github/workflows/cmake_windows_msys2.yml index eb83d4674..8959395eb 100644 --- a/.github/workflows/cmake_windows_msys2.yml +++ b/.github/workflows/cmake_windows_msys2.yml @@ -1,4 +1,4 @@ -name: CMake (Windows, msys2) +name: CMake (Windows) on: @@ -26,9 +26,9 @@ on: jobs: - msys2: + windows: - name: "${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.environment.msystem }}" + name: "${{ matrix.ui.name }}, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.environment.msystem }}" runs-on: ${{ matrix.environment.runner }} @@ -56,14 +56,15 @@ jobs: new: on slug: -NDR ui: - - name: Qt GUI + - name: Qt 5 GUI qt: on + slug: -Qt5 static: on - slug: -Qt packages: >- - qt5-base:p - qt5-tools:p + qt5-static:p vulkan-headers:p +# qt5-base:p +# qt5-tools:p environment: # - msystem: MSYS # toolchain: ./cmake/flags-gcc-x86_64.cmake @@ -77,10 +78,12 @@ jobs: # prefix: mingw-w64-clang-x86_64 # toolchain: ./cmake/llvm-win32-x86_64.cmake # slug: "CLANG64" +# runner: windows-2022 # - msystem: UCRT64 # prefix: mingw-w64-ucrt-x86_64 # toolchain: ./cmake/flags-gcc-x86_64.cmake # slug: "UCRT64" +# runner: windows-2022 - msystem: CLANGARM64 toolchain: ./cmake/flags-gcc-aarch64.cmake slug: -arm64 @@ -112,8 +115,7 @@ jobs: libslirp:p fluidsynth:p libserialport:p - qt5-static:p - vulkan-headers:p + ${{ matrix.ui.packages }} openmp:p - name: Checkout repository @@ -123,10 +125,10 @@ jobs: - name: Configure CMake run: >- - cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }} + cmake -S . -B build --preset ${{ matrix.build.preset }} --toolchain ${{ matrix.environment.toolchain }} -D NEW_DYNAREC=${{ matrix.dynarec.new }} - -D CMAKE_INSTALL_PREFIX=./build/artifacts + -D QT=${{ matrix.ui.qt }} - name: Build run: cmake --build build diff --git a/.github/workflows/codeql_linux.yml b/.github/workflows/codeql_linux.yml index b8fb93ef6..855571782 100644 --- a/.github/workflows/codeql_linux.yml +++ b/.github/workflows/codeql_linux.yml @@ -33,7 +33,7 @@ jobs: analyze-linux: - name: "Analyze (${{ matrix.ui.name }}, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, x86_64)" + name: "${{ matrix.ui.name }}, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.environment.arch }}" runs-on: ubuntu-22.04 @@ -68,10 +68,13 @@ jobs: ui: - name: SDL GUI qt: off + qt6: off + slug: -SDL static: on - - name: Qt GUI + - name: Qt 5 GUI qt: on - slug: -Qt + qt6: off + slug: -Qt5 packages: >- qtbase5-dev qtbase5-private-dev @@ -79,6 +82,20 @@ jobs: qttranslations5-l10n libevdev-dev libxkbcommon-x11-dev + environment: + - arch: x86_64 + toolchain: ./cmake/flags-gcc-x86_64.cmake + slug: "-x86_64" + runner: ubuntu-22.04 +# - arch: arm64 +# toolchain: ./cmake/flags-gcc-aarch64.cmake +# slug: -arm64 +# runner: ubuntu-22.04-arm +# exclude: +# - dynarec: +# new: off +# environment: +# arch: arm64 steps: - name: Install dependencies @@ -104,7 +121,7 @@ jobs: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Install Build Wrapper - uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v5 + uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v6 - name: Initialize CodeQL uses: github/codeql-action/init@v3 @@ -114,11 +131,11 @@ jobs: - name: Configure CMake run: >- - cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }} - --toolchain ./cmake/flags-gcc-x86_64.cmake + cmake -S . -B build --preset ${{ matrix.build.preset }} + --toolchain ${{ matrix.environment.toolchain }} -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: | @@ -132,7 +149,7 @@ jobs: - name: SonarQube Scan if: matrix.build.preset == 'dev_debug' && matrix.dynarec.new == 'on' && matrix.ui.qt == 'on' && env.SONAR_TOKEN != '' # if: 0 - uses: SonarSource/sonarqube-scan-action@v5 + uses: SonarSource/sonarqube-scan-action@v6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} @@ -140,4 +157,4 @@ jobs: with: # Consult https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/scanners/sonarscanner/ for more information and options args: > - --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json" + --define sonar.cfamily.compile-commands=build/compile_commands.json diff --git a/.github/workflows/codeql_macos.yml b/.github/workflows/codeql_macos.yml index 203f385ff..74365cd56 100644 --- a/.github/workflows/codeql_macos.yml +++ b/.github/workflows/codeql_macos.yml @@ -31,11 +31,11 @@ on: jobs: - analyze-macos13-x86_64: + analyze-macos: - name: "Analyze (${{ matrix.ui.name }}, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, x86_64)" + name: "${{ matrix.ui.name }}, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.environment.arch }}" - runs-on: macos-13 + runs-on: ${{ matrix.environment.runner }} env: BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed @@ -66,13 +66,29 @@ jobs: new: on slug: -NDR ui: - - name: SDL GUI - qt: off - - name: Qt GUI +# - name: SDL GUI +# qt: off +# slug: -SDL +# static: on + - name: Qt 5 GUI qt: on - slug: -Qt + slug: -Qt5 packages: >- qt@5 + environment: + - arch: x86_64 + toolchain: ./cmake/flags-gcc-x86_64.cmake + slug: -x86_64 + runner: macos-13 +# - arch: arm64 +# toolchain: ./cmake/llvm-macos-aarch64.cmake +# slug: -arm64 +# runner: macos-14 +# exclude: +# - dynarec: +# new: off +# environment: +# arch: arm64 steps: - name: Install dependencies @@ -93,7 +109,7 @@ jobs: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Install Build Wrapper - uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v5 + uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v6 - name: Initialize CodeQL uses: github/codeql-action/init@v3 @@ -103,10 +119,9 @@ jobs: - name: Configure CMake run: >- - cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }} - --toolchain ./cmake/flags-gcc-x86_64.cmake + cmake -S . -B build --preset ${{ matrix.build.preset }} + --toolchain ${{ matrix.environment.toolchain }} -D NEW_DYNAREC=${{ matrix.dynarec.new }} - -D CMAKE_INSTALL_PREFIX=./build/artifacts -D QT=${{ matrix.ui.qt }} -D Qt5_ROOT=$(brew --prefix qt@5) -D Qt5LinguistTools_ROOT=$(brew --prefix qt@5) @@ -125,7 +140,7 @@ jobs: - name: SonarQube Scan # if: matrix.build.preset == 'dev_debug' && matrix.dynarec.new == 'on' && matrix.ui.qt == 'on' && env.SONAR_TOKEN != '' if: 0 - uses: SonarSource/sonarqube-scan-action@v5 + uses: SonarSource/sonarqube-scan-action@v6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} @@ -133,4 +148,4 @@ jobs: with: # Consult https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/scanners/sonarscanner/ for more information and options args: > - --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json" + --define sonar.cfamily.compile-commands=build/compile_commands.json diff --git a/.github/workflows/codeql_windows_msys2.yml b/.github/workflows/codeql_windows_msys2.yml index c7edae77f..9673ab650 100644 --- a/.github/workflows/codeql_windows_msys2.yml +++ b/.github/workflows/codeql_windows_msys2.yml @@ -1,4 +1,4 @@ -name: CodeQL Analysis (Windows, msys2) +name: CodeQL Analysis (Windows) on: @@ -31,9 +31,9 @@ on: jobs: - analyze-msys2: + analyze-windows: - name: "Analyze (${{ matrix.ui.name }}, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.environment.msystem }})" + name: "${{ matrix.ui.name }}, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.environment.msystem }}" runs-on: ${{ matrix.environment.runner }} @@ -70,14 +70,15 @@ jobs: new: on slug: -NDR ui: - - name: Qt GUI + - name: Qt 5 GUI qt: on + slug: -Qt5 static: off - slug: -Qt packages: >- qt5-base:p qt5-tools:p vulkan-headers:p +# qt5-static:p environment: # - msystem: MSYS # toolchain: ./cmake/flags-gcc-x86_64.cmake @@ -147,10 +148,9 @@ jobs: - name: Configure CMake run: >- - cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }} + cmake -S . -B build --preset ${{ matrix.build.preset }} --toolchain ${{ matrix.environment.toolchain }} -D NEW_DYNAREC=${{ matrix.dynarec.new }} - -D CMAKE_INSTALL_PREFIX=./build/artifacts -D QT=${{ matrix.ui.qt }} -D STATIC_BUILD=${{ matrix.ui.static }} @@ -169,7 +169,7 @@ jobs: - name: SonarQube Scan # if: matrix.build.preset == 'dev_debug' && matrix.dynarec.new == 'on' && matrix.ui.qt == 'on' && env.SONAR_TOKEN != '' if: 0 - uses: SonarSource/sonarqube-scan-action@v5 + uses: SonarSource/sonarqube-scan-action@v6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} @@ -177,4 +177,4 @@ jobs: with: # Consult https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/scanners/sonarscanner/ for more information and options args: > - --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json" + --define sonar.cfamily.compile-commands=build/compile_commands.json diff --git a/.gitignore b/.gitignore index 5935efd38..470a352ea 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,8 @@ Makefile /src/*.exe /src/86Box /src/include/86box/version.h +/src/.vs +/src/out # Legacy Makefile /src/*.o diff --git a/CMakeLists.txt b/CMakeLists.txt index 57e3b178f..29fedd6ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -185,6 +185,7 @@ cmake_dependent_option(SIO_DETECT "Super I/O Detection Helper" 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) +cmake_dependent_option(VFIO "Virtual Function I/O" ON "DEV_BRANCH" OFF) # Ditto but for Qt if(QT) diff --git a/sonar-project.properties b/sonar-project.properties index 781fad035..34cb02b6b 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,12 +1,16 @@ sonar.projectKey=86Box_86Box + sonar.organization=86box # This is the name and version displayed in the SonarCloud UI. -#sonar.projectName=86Box +sonar.projectName=86Box + #sonar.projectVersion=1.0 -# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +# Path is relative to the sonar-project.properties file. Defaults to . #sonar.sources=. # Encoding of the source code. Default is default system encoding #sonar.sourceEncoding=UTF-8 + +sonar.cfamily.compile-commands=build/compile_commands.json diff --git a/src/86box.c b/src/86box.c index b90591267..591772458 100644 --- a/src/86box.c +++ b/src/86box.c @@ -107,6 +107,7 @@ #include <86box/apm.h> #include <86box/acpi.h> #include <86box/nv/vid_nv_rivatimer.h> +#include <86box/vfio.h> // Disable c99-designator to avoid the warnings about int ng #ifdef __clang__ @@ -238,6 +239,7 @@ char monitor_edid_path[1024] = { 0 }; /* (C) Path to double video_gl_input_scale = 1.0; /* (C) OpenGL 3.x input scale */ int video_gl_input_scale_mode = FULLSCR_SCALE_FULL; /* (C) OpenGL 3.x input stretch mode */ int color_scheme = 0; /* (C) Color scheme of UI (Windows-only) */ +int fdd_sounds_enabled = 1; /* (C) Floppy drive sounds enabled */ // Accelerator key array struct accelKey acc_keys[NUM_ACCELS]; @@ -1646,6 +1648,11 @@ pc_reset_hard_init(void) the chances of the SCSI controller ending up on the bridge. */ video_voodoo_init(); +#if defined(USE_VFIO) && defined(__linux__) + /* Initialize VFIO */ + vfio_init(); +#endif + /* installs first game port if no device provides one, must be late */ if (joystick_type[0]) gameport_update_joystick_type(0); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 166320061..7c389c368 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -103,6 +103,16 @@ if(VNC) endif() endif() +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + if(VFIO) + include(CheckIncludeFile) + check_include_file("linux/vfio.h" VFIO_AVAILABLE) + if(VFIO_AVAILABLE) + add_compile_definitions(USE_VFIO) + endif() + endif() +endif() + if(INSTRUMENT) add_compile_definitions(USE_INSTRUMENT) endif() diff --git a/src/acpi.c b/src/acpi.c index 411662e39..84d910163 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -8,8 +8,6 @@ * * ACPI emulation. * - * - * * Authors: Miran Grca, * * Copyright 2020 Miran Grca. @@ -1222,7 +1220,7 @@ acpi_reg_write_intel(int size, uint16_t addr, uint8_t val, void *priv) /* GPOREG - General Purpose Output Register (IO) */ if (size == 1) { dev->regs.gporeg[addr & 3] = val; - if ((addr == 0x34) && !strcmp(machine_get_internal_name(), "cubx")) + if ((addr == 0x34) && (machines[machine].init == machine_at_cubx_init)) hdc_onboard_enabled = (val & 0x01); } break; @@ -1749,7 +1747,7 @@ acpi_reg_write_sis_5595(int size, uint16_t addr, uint8_t val, void *priv) break; case 0x1c: dev->regs.gpe_pin = ((dev->regs.gpe_pin & ~(0xff << shift32)) | ((val & 0xff) << shift32)); - if (!strcmp(machine_get_internal_name(), "m747") && (val & 0x10) && + if ((machines[machine].init == machine_at_m747_init) && (val & 0x10) && !(dev->regs.gpe_io & 0x00000010)) resetx86(); break; @@ -2365,7 +2363,7 @@ acpi_reset(void *priv) /* PC Chips M773: - Bit 3: 80-conductor cable on unknown IDE channel (active low) - Bit 1: 80-conductor cable on unknown IDE channel (active low) */ - dev->regs.gpireg[0] = !strcmp(machine_get_internal_name(), "m773") ? 0xf5 : 0xff; + dev->regs.gpireg[0] = (machines[machine].init == machine_at_m773_init) ? 0xf5 : 0xff; dev->regs.gpireg[1] = 0xff; /* A-Trend ATC7020BXII: - Bit 3: 80-conductor cable on secondary IDE channel (active low) @@ -2399,9 +2397,9 @@ acpi_reset(void *priv) - Bit 19: password cleared (active low). */ dev->regs.gpi_val = 0xfff57fc1; - if (!strcmp(machine_get_internal_name(), "ficva503a") || !strcmp(machine_get_internal_name(), "6via90ap")) + if ((machines[machine].init == machine_at_ficva503a_init) || (machines[machine].init == machine_at_6via90ap_init)) dev->regs.gpi_val |= 0x00000004; - else if (!strcmp(machine_get_internal_name(), "ficka6130")) + else if ((machines[machine].init == machine_at_ficka6130_init)) dev->regs.gpi_val |= 0x00080000; /* TriGem Delhi-III second GPI word: @@ -2409,7 +2407,7 @@ acpi_reset(void *priv) - Bit 6 = Password jumper (must be set); - Bit 5 = Enable Setup (must be set). */ - else if (!strcmp(machine_get_internal_name(), "delhi3")) + else if (machines[machine].init == machine_at_delhi3_init) dev->regs.gpi_val |= 0x00008000; } @@ -2420,7 +2418,7 @@ acpi_reset(void *priv) } /* The Gateway Tomahawk requires the LID polarity bit to be set. */ - if (!strcmp(machine_get_internal_name(), "tomahawk")) + if (machines[machine].init == machine_at_tomahawk_init) dev->regs.glbctl |= 0x02000000; acpi_rtc_status = 0; diff --git a/src/apm.c b/src/apm.c index 3973f2b23..b4806cb71 100644 --- a/src/apm.c +++ b/src/apm.c @@ -8,8 +8,6 @@ * * Advanced Power Management emulation. * - * - * * Authors: Miran Grca, * * Copyright 2019 Miran Grca. diff --git a/src/arch_detect.c b/src/arch_detect.c index 4ef267c94..08b92a546 100644 --- a/src/arch_detect.c +++ b/src/arch_detect.c @@ -8,8 +8,6 @@ * * Configure-time architecture detection for the CMake build. * - * - * * Authors: David Hrdlička, * * Copyright 2020-2021 David Hrdlička. diff --git a/src/cdrom/cdrom.c b/src/cdrom/cdrom.c index 6dd95b5dd..3b7eaeb3f 100644 --- a/src/cdrom/cdrom.c +++ b/src/cdrom/cdrom.c @@ -8,8 +8,6 @@ * * Generic CD-ROM drive core. * - * - * * Authors: Miran Grca, * * Copyright 2018-2021 Miran Grca. diff --git a/src/cdrom/cdrom_image_viso.c b/src/cdrom/cdrom_image_viso.c index 3eec6d5a1..5c47b745d 100644 --- a/src/cdrom/cdrom_image_viso.c +++ b/src/cdrom/cdrom_image_viso.c @@ -880,7 +880,7 @@ viso_init(const uint8_t id, const char *dirname, int *error) if (dirp) { /* create empty directory if opendir failed */ while ((readdir_entry = readdir(dirp))) { /* Ignore . and .. pseudo-directories. */ - if ((readdir_entry->d_name[0] == '.') && ((readdir_entry->d_name[1] == '\0') || (*((uint16_t *) &readdir_entry->d_name[1]) == '.'))) + if ((readdir_entry->d_name[0] == '.') && ((readdir_entry->d_name[1] == '\0') || (AS_U16(readdir_entry->d_name[1]) == '.'))) continue; children_count++; } @@ -927,7 +927,7 @@ viso_init(const uint8_t id, const char *dirname, int *error) /* Ignore . and .. pseudo-directories. */ if ((readdir_entry->d_name[0] == '.') && ((readdir_entry->d_name[1] == '\0') || - (*((uint16_t *) &readdir_entry->d_name[1]) == '.'))) + (AS_U16(readdir_entry->d_name[1]) == '.'))) continue; /* Add and fill entry. */ @@ -1245,8 +1245,8 @@ next_dir: /* Calculate checksum. */ uint16_t eltorito_checksum = 0; for (int i = 0; i < (p - data); i += 2) - eltorito_checksum -= le16_to_cpu(*((uint16_t *) &data[i])); - *((uint16_t *) &data[28]) = cpu_to_le16(eltorito_checksum); + eltorito_checksum -= le16_to_cpu(AS_U16(data[i])); + AS_U16(data[28]) = cpu_to_le16(eltorito_checksum); /* Now fill the default boot entry. */ *p++ = 0x88; /* bootable flag */ @@ -1552,11 +1552,11 @@ next_entry: uint32_t boot_size = entry->stats.st_size; if (boot_size % 512) /* round up */ boot_size += 512 - (boot_size % 512); - *((uint16_t *) &data[0]) = cpu_to_le16(boot_size / 512); + AS_U16(data[0]) = cpu_to_le16(boot_size / 512); } else { /* emulation */ - *((uint16_t *) &data[0]) = cpu_to_le16(1); + AS_U16(data[0]) = cpu_to_le16(1); } - *((uint32_t *) &data[2]) = cpu_to_le32(viso->all_sectors * base_factor); + AS_U32(data[2]) = cpu_to_le32(viso->all_sectors * base_factor); viso_pwrite(data, eltorito_offset, 6, 1, viso->tf.fp); } else { p = data; diff --git a/src/chipset/82c100.c b/src/chipset/82c100.c index a9d61b3b9..d3010674a 100644 --- a/src/chipset/82c100.c +++ b/src/chipset/82c100.c @@ -8,8 +8,6 @@ * * Implementation of Chips&Technology's 82C100 chipset. * - * - * * Authors: Miran Grca, * * Copyright 2021 Miran Grca. diff --git a/src/chipset/CMakeLists.txt b/src/chipset/CMakeLists.txt index 9ccba8dc6..6147a2ccf 100644 --- a/src/chipset/CMakeLists.txt +++ b/src/chipset/CMakeLists.txt @@ -92,5 +92,6 @@ add_library(chipset OBJECT via_apollo.c via_pipc.c vl82c480.c + vl82c59x.c wd76c10.c ) diff --git a/src/chipset/acc2168.c b/src/chipset/acc2168.c index dbbdc99f6..6378355e6 100644 --- a/src/chipset/acc2168.c +++ b/src/chipset/acc2168.c @@ -8,8 +8,6 @@ * * Implementation of the ACC 2046/2168 chipset * - * - * * Authors: Sarah Walker, * Tiseno100 * diff --git a/src/chipset/ali1409.c b/src/chipset/ali1409.c index 619843cda..b135473d8 100644 --- a/src/chipset/ali1409.c +++ b/src/chipset/ali1409.c @@ -11,8 +11,6 @@ * Note: This chipset has no datasheet, everything were done via * reverse engineering. * - * - * * Authors: Jose Phillips, * Sarah Walker, * diff --git a/src/chipset/ali1429.c b/src/chipset/ali1429.c index e2478078f..d6a4b28a0 100644 --- a/src/chipset/ali1429.c +++ b/src/chipset/ali1429.c @@ -11,8 +11,6 @@ * Note: This chipset has no datasheet, everything were done via * reverse engineering the BIOS of various machines using it. * - * - * * Authors: Tiseno100, * Miran Grca, * diff --git a/src/chipset/ali1435.c b/src/chipset/ali1435.c index ff096ac55..aebd10f32 100644 --- a/src/chipset/ali1435.c +++ b/src/chipset/ali1435.c @@ -7,8 +7,6 @@ * Emulation of ALi M1435 chipset that acts as both the * southbridge. * - * - * * Authors: Miran Grca, * * Copyright 2020 Miran Grca. diff --git a/src/chipset/ali1489.c b/src/chipset/ali1489.c index 80362e244..96ebd4a3d 100644 --- a/src/chipset/ali1489.c +++ b/src/chipset/ali1489.c @@ -8,8 +8,6 @@ * * Implementation of the ALi M1489 chipset. * - * - * * Authors: Tiseno100, * Miran Grca, * diff --git a/src/chipset/ali1531.c b/src/chipset/ali1531.c index 53324f8e6..1603dbca4 100644 --- a/src/chipset/ali1531.c +++ b/src/chipset/ali1531.c @@ -8,8 +8,6 @@ * * Implementation of the ALi M1531B CPU-to-PCI Bridge. * - * - * * Authors: Tiseno100, * * Copyright 2021 Tiseno100. diff --git a/src/chipset/ali1541.c b/src/chipset/ali1541.c index ebbcd7e63..1506d880a 100644 --- a/src/chipset/ali1541.c +++ b/src/chipset/ali1541.c @@ -8,8 +8,6 @@ * * Implementation of the ALi M1541/2 CPU-to-PCI Bridge. * - * - * * Authors: Miran Grca, * * Copyright 2021 Miran Grca. diff --git a/src/chipset/ali1543.c b/src/chipset/ali1543.c index 2f9273736..8ef8e6a20 100644 --- a/src/chipset/ali1543.c +++ b/src/chipset/ali1543.c @@ -8,8 +8,6 @@ * * Implementation of the ALi M1543 Desktop South Bridge. * - * - * * Authors: Tiseno100, * * Copyright 2021 Tiseno100. diff --git a/src/chipset/ali1621.c b/src/chipset/ali1621.c index d44c0f5a9..95602496c 100644 --- a/src/chipset/ali1621.c +++ b/src/chipset/ali1621.c @@ -8,8 +8,6 @@ * * Implementation of the ALi M1621/2 CPU-to-PCI Bridge. * - * - * * Authors: Miran Grca, * * Copyright 2021 Miran Grca. diff --git a/src/chipset/ali6117.c b/src/chipset/ali6117.c index 88bb4b572..a9eb96f88 100644 --- a/src/chipset/ali6117.c +++ b/src/chipset/ali6117.c @@ -8,8 +8,6 @@ * * Implementation of the ALi M6117 SoC. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. diff --git a/src/chipset/contaq_82c59x.c b/src/chipset/contaq_82c59x.c index 1981fd11c..a9831804f 100644 --- a/src/chipset/contaq_82c59x.c +++ b/src/chipset/contaq_82c59x.c @@ -8,8 +8,6 @@ * * Implementation of the Contaq/Cypress 82C596(A) and 597 chipsets. * - * - * * Authors: Miran Grca, * * Copyright 2021 Miran Grca. diff --git a/src/chipset/cs4031.c b/src/chipset/cs4031.c index cfec9ad30..ad01cd54d 100644 --- a/src/chipset/cs4031.c +++ b/src/chipset/cs4031.c @@ -8,8 +8,6 @@ * * Implementation of the Chips & Technologies CS4031 chipset. * - * - * * Authors: Tiseno100 * * Copyright 2021 Tiseno100 diff --git a/src/chipset/cs8220.c b/src/chipset/cs8220.c index 4c08ecef5..3c3c23767 100644 --- a/src/chipset/cs8220.c +++ b/src/chipset/cs8220.c @@ -160,7 +160,7 @@ cs8220_init(UNUSED(const device_t *info)) /* Dell System 200: 640 kB soldered on-board, any other RAM is expansion. */ - if (!strcmp(machine_get_internal_name(), "dells200")) switch (mem_size) { + if ((machines[machine].init == machine_at_dells200_init)) switch (mem_size) { default: dev->ram_banks[2].virt = 0x00100000; dev->ram_banks[2].phys = 0x000a0000; diff --git a/src/chipset/cs8230.c b/src/chipset/cs8230.c index 0374a44a6..7cdd808c6 100644 --- a/src/chipset/cs8230.c +++ b/src/chipset/cs8230.c @@ -8,8 +8,6 @@ * * Emulation of C&T CS8230 ("386/AT") chipset. * - * - * * Authors: Sarah Walker, * * Copyright 2020 Sarah Walker. diff --git a/src/chipset/et6000.c b/src/chipset/et6000.c index 14ebf852e..d561d90a3 100644 --- a/src/chipset/et6000.c +++ b/src/chipset/et6000.c @@ -8,8 +8,6 @@ * * Implementation of the ETEQ Cheetah ET6000 chipset. * - * - * * Authors: Tiseno100 * * Copyright 2021 Tiseno100 diff --git a/src/chipset/gc100.c b/src/chipset/gc100.c index e9eb05ecf..89dc6c9c0 100644 --- a/src/chipset/gc100.c +++ b/src/chipset/gc100.c @@ -12,8 +12,6 @@ * GC100 chipset, the GC100A chipset has been reverese-engineered. * Thus, its behavior may not be fully accurate. * - * - * * Authors: EngiNerd, * * Copyright 2020-2021 EngiNerd. diff --git a/src/chipset/grid1520.c b/src/chipset/grid1520.c index ce8b1e2a9..e008a0e29 100644 --- a/src/chipset/grid1520.c +++ b/src/chipset/grid1520.c @@ -9,6 +9,7 @@ * Implementation of the GRiD GRiDcase 1520 * * The GRiDcase 1520 is a 286-based portable. + * * These are HDDs supported by GRiD1520 (and probably other 15XX) BIOS * "CP3022",5 * "CP3024",5, 615,4,17 BIOS table type 2 diff --git a/src/chipset/headland.c b/src/chipset/headland.c index 1172d105d..480766103 100644 --- a/src/chipset/headland.c +++ b/src/chipset/headland.c @@ -8,8 +8,6 @@ * * Implementation of the HEADLAND AT286 chipset. * - * - * * Authors: Sarah Walker, * Fred N. van Kempen, * Original by GreatPsycho for PCem. diff --git a/src/chipset/ims8848.c b/src/chipset/ims8848.c index 094ee31f8..13fed304b 100644 --- a/src/chipset/ims8848.c +++ b/src/chipset/ims8848.c @@ -8,8 +8,6 @@ * * Implementation of the IMS 8848/8849 chipset. * - * - * * Authors: Miran Grca, * Tiseno100, * diff --git a/src/chipset/intel_420ex.c b/src/chipset/intel_420ex.c index 662fd0509..daa55c72c 100644 --- a/src/chipset/intel_420ex.c +++ b/src/chipset/intel_420ex.c @@ -9,8 +9,6 @@ * Emulation of Intel 82420EX chipset that acts as both the * northbridge and the southbridge. * - * - * * Authors: Miran Grca, * * Copyright 2020 Miran Grca. diff --git a/src/chipset/intel_4x0.c b/src/chipset/intel_4x0.c index 8e6ce97c3..18f4ee66a 100644 --- a/src/chipset/intel_4x0.c +++ b/src/chipset/intel_4x0.c @@ -8,8 +8,6 @@ * * Implementation of the Intel PCISet chips from 420TX to 440GX. * - * - * * Authors: Miran Grca, * * Copyright 2019-2020 Miran Grca. @@ -1549,7 +1547,7 @@ i4x0_read(int func, int addr, void *priv) with the addition of bits 3 and 0. */ if ((func == 0) && (addr == 0x93) && ((dev->type == INTEL_440FX) || (dev->type == INTEL_440LX) || (dev->type == INTEL_440EX))) ret = (ret & 0xf9) | (pci_read(0x0cf9, NULL) & 0x06); - else if ((func == 0) && (addr == 0x52) && (dev->type == INTEL_430TX) && !strcmp(machine_get_internal_name(), "tomahawk")) + else if ((func == 0) && (addr == 0x52) && (dev->type == INTEL_430TX) && (machines[machine].init == machine_at_tomahawk_init)) ret = 0xb2; } diff --git a/src/chipset/intel_82335.c b/src/chipset/intel_82335.c index bd53e0d05..1dc09a24b 100644 --- a/src/chipset/intel_82335.c +++ b/src/chipset/intel_82335.c @@ -8,8 +8,6 @@ * * Implementation of the Intel 82335(KU82335) chipset. * - * - * * Authors: Tiseno100 * * Copyright 2021 Tiseno100. diff --git a/src/chipset/intel_piix.c b/src/chipset/intel_piix.c index 5d0c18441..f48950cdc 100644 --- a/src/chipset/intel_piix.c +++ b/src/chipset/intel_piix.c @@ -11,8 +11,6 @@ * word 0 - base address * word 1 - bits 1-15 = byte count, bit 31 = end of transfer * - * - * * Authors: Miran Grca, * * Copyright 2016-2020 Miran Grca. @@ -1595,7 +1593,7 @@ piix_init(const device_t *info) - Bit 4: CMOS clear jumper, must be clear; - Bit 0: Password switch, must be clear. */ - if (!strcmp(machine_get_internal_name(), "richmond")) + if (machines[machine].init == machine_at_richmond_init) acpi_set_gpireg2_default(dev->acpi, 0xee); else acpi_set_gpireg2_default(dev->acpi, (dev->type > 4) ? 0xf1 : 0xdd); diff --git a/src/chipset/intel_sio.c b/src/chipset/intel_sio.c index b11ec0765..739785acb 100644 --- a/src/chipset/intel_sio.c +++ b/src/chipset/intel_sio.c @@ -6,8 +6,6 @@ * * Emulation of Intel System I/O PCI chip. * - * - * * Authors: Miran Grca, * * Copyright 2016-2018 Miran Grca. @@ -368,7 +366,7 @@ sio_config_read(uint16_t port, UNUSED(void *priv)) - 1, 0 = M; - 1, 1 = M. */ - if (!strcmp(machine_get_internal_name(), "opti560l")) + if (machines[machine].init == machine_at_opti560l_init) ret = 0x20; else ret = 0xd3; diff --git a/src/chipset/neat.c b/src/chipset/neat.c index 0aa6fe5b6..2d901d035 100644 --- a/src/chipset/neat.c +++ b/src/chipset/neat.c @@ -13,8 +13,6 @@ * 8MB of DRAM chips', because it works fine with bus-based * memory expansion. * - * - * * Authors: Fred N. van Kempen, * * Copyright 2018 Fred N. van Kempen. diff --git a/src/chipset/olivetti_eva.c b/src/chipset/olivetti_eva.c index 0dcbdd21f..47614a132 100644 --- a/src/chipset/olivetti_eva.c +++ b/src/chipset/olivetti_eva.c @@ -11,8 +11,6 @@ * Note: This chipset has no datasheet, everything were done via * reverse engineering the BIOS of various machines using it. * - * - * * Authors: EngiNerd * * Copyright 2020-2021 EngiNerd diff --git a/src/chipset/opti283.c b/src/chipset/opti283.c index 81780cf10..12d58fbf3 100644 --- a/src/chipset/opti283.c +++ b/src/chipset/opti283.c @@ -8,8 +8,6 @@ * * Implementation of the OPTi 82C283 chipset. * - * - * * Authors: Tiseno100, * Miran Grca, * diff --git a/src/chipset/opti291.c b/src/chipset/opti291.c index 91b9010e2..62bc0de54 100644 --- a/src/chipset/opti291.c +++ b/src/chipset/opti291.c @@ -8,8 +8,6 @@ * * Implementation of the OPTi 82C291 chipset. * - * - * * Authors: plant/nerd73, Tiseno100 * * Copyright 2020 plant/nerd73. diff --git a/src/chipset/opti391.c b/src/chipset/opti391.c index 7d3c10c98..8f3d9deea 100644 --- a/src/chipset/opti391.c +++ b/src/chipset/opti391.c @@ -8,8 +8,6 @@ * * Implementation of the OPTi 82C391/392 chipset. * - * - * * Authors: Miran Grca, * * Copyright 2021 Miran Grca. diff --git a/src/chipset/opti499.c b/src/chipset/opti499.c index 383b8e3e2..ed7c269b0 100644 --- a/src/chipset/opti499.c +++ b/src/chipset/opti499.c @@ -8,8 +8,6 @@ * * Implementation of the OPTi 82C493/82C499 chipset. * - * - * * Authors: Tiseno100, * Miran Grca, * diff --git a/src/chipset/opti822.c b/src/chipset/opti822.c index 471fbe393..2f416a1c2 100644 --- a/src/chipset/opti822.c +++ b/src/chipset/opti822.c @@ -9,8 +9,6 @@ * Implementation of the OPTi 82C822 VESA Local Bus to PCI * Bridge Interface. * - * - * * Authors: Miran Grca, * * Copyright 2022 Miran Grca. diff --git a/src/chipset/opti895.c b/src/chipset/opti895.c index 16b324963..6edd7c855 100644 --- a/src/chipset/opti895.c +++ b/src/chipset/opti895.c @@ -8,8 +8,6 @@ * * Implementation of the OPTi 82C802G/82C895 chipset. * - * - * * Authors: Tiseno100, * Miran Grca, * diff --git a/src/chipset/scamp.c b/src/chipset/scamp.c index 7ad7b3db2..9019809b5 100644 --- a/src/chipset/scamp.c +++ b/src/chipset/scamp.c @@ -13,8 +13,6 @@ * 8MB of DRAM chips', because it works fine with bus-based * memory expansion. * - * - * * Authors: Sarah Walker, * * Copyright 2020 Sarah Walker. diff --git a/src/chipset/scat.c b/src/chipset/scat.c index 43f93649e..84f7d459d 100644 --- a/src/chipset/scat.c +++ b/src/chipset/scat.c @@ -10,8 +10,6 @@ * * Re-worked version based on the 82C235 datasheet and errata. * - * - * * Authors: Original by GreatPsycho for PCem. * Fred N. van Kempen, * diff --git a/src/chipset/sis_5571_old.c b/src/chipset/sis_5571_old.c index 495137aed..de620c9c1 100644 --- a/src/chipset/sis_5571_old.c +++ b/src/chipset/sis_5571_old.c @@ -8,8 +8,6 @@ * * Implementation of the SiS 5571 Chipset. * - * - * * Authors: Tiseno100, * * Copyright 2021 Tiseno100. diff --git a/src/chipset/sis_85c496.c b/src/chipset/sis_85c496.c index 10bccc1c8..f2c1941d4 100644 --- a/src/chipset/sis_85c496.c +++ b/src/chipset/sis_85c496.c @@ -8,8 +8,6 @@ * * Implementation of the SiS 85c496/85c497 chip. * - * - * * Authors: Miran Grca, * * Copyright 2019-2020 Miran Grca. diff --git a/src/chipset/sis_85c4xx.c b/src/chipset/sis_85c4xx.c index 49d0418ce..aa50ed389 100644 --- a/src/chipset/sis_85c4xx.c +++ b/src/chipset/sis_85c4xx.c @@ -9,8 +9,6 @@ * Emulation of the SiS 85c401/85c402, 85c460, 85c461, and * 85c407/85c471 chipsets. * - * - * * Authors: Miran Grca, * * Copyright 2019-2020 Miran Grca. @@ -766,7 +764,7 @@ sis_85c4xx_reset(void *priv) if (dev->is_471) { dev->regs[0x09] = 0x40; - if (!strcmp(machine_get_internal_name(), "vli486sv2g")) { + if (machines[machine].init == machine_at_vli486sv2g_init) { if (mem_size_mb == 64) dev->regs[0x09] |= 0x1f; else @@ -784,7 +782,7 @@ sis_85c4xx_reset(void *priv) dev->regs[0x09] |= 0x34; else dev->regs[0x09] |= 0x35; - } else if (!strcmp(machine_get_internal_name(), "tg486g")) + } else if (machines[machine].init == machine_at_tg486g_init) dev->regs[0x09] |= ram_tg486g[mem_size_mb]; else dev->regs[0x09] |= ram_471[mem_size_mb]; diff --git a/src/chipset/stpc.c b/src/chipset/stpc.c index f3075323a..56eca8268 100644 --- a/src/chipset/stpc.c +++ b/src/chipset/stpc.c @@ -8,8 +8,6 @@ * * Implementation of the STMicroelectronics STPC series of SoCs. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. diff --git a/src/chipset/umc_8886.c b/src/chipset/umc_8886.c index 29e2d46da..3725394c3 100644 --- a/src/chipset/umc_8886.c +++ b/src/chipset/umc_8886.c @@ -11,8 +11,6 @@ * Note: This chipset has no datasheet, everything were done via * reverse engineering the BIOS of various machines using it. * - * - * * Authors: Tiseno100, * Miran Grca, * diff --git a/src/chipset/via_apollo.c b/src/chipset/via_apollo.c index 110b1f8e1..974f4e274 100644 --- a/src/chipset/via_apollo.c +++ b/src/chipset/via_apollo.c @@ -8,8 +8,6 @@ * * Implementation of the VIA Apollo series of chips. * - * - * * Authors: Miran Grca, * RichardG, * Tiseno100, diff --git a/src/chipset/via_pipc.c b/src/chipset/via_pipc.c index 7915b199e..a4d83220b 100644 --- a/src/chipset/via_pipc.c +++ b/src/chipset/via_pipc.c @@ -8,8 +8,6 @@ * * Emulation of the VIA PIPC southbridges. * - * - * * Authors: Miran Grca, * RichardG, * diff --git a/src/chipset/via_vt82c49x.c b/src/chipset/via_vt82c49x.c index 3a7bbfdda..35d9c18cc 100644 --- a/src/chipset/via_vt82c49x.c +++ b/src/chipset/via_vt82c49x.c @@ -8,8 +8,6 @@ * * Implementation of the VIA VT82C49X chipset. * - * - * * Authors: Tiseno100, * Miran Grca, * diff --git a/src/chipset/via_vt82c505.c b/src/chipset/via_vt82c505.c index dbbb447c7..3daeec85b 100644 --- a/src/chipset/via_vt82c505.c +++ b/src/chipset/via_vt82c505.c @@ -8,8 +8,6 @@ * * Implementation of the VIA VT82C505 VL/PCI Bridge Controller. * - * - * * Authors: Tiseno100, * Miran Grca, * diff --git a/src/chipset/vl82c480.c b/src/chipset/vl82c480.c index acb3568af..8015137e0 100644 --- a/src/chipset/vl82c480.c +++ b/src/chipset/vl82c480.c @@ -8,8 +8,6 @@ * * Implementation of the VLSI VL82c480 chipset. * - * - * * Authors: Miran Grca, * * Copyright 2020 Miran Grca. @@ -30,6 +28,8 @@ #include <86box/port_92.h> #include <86box/chipset.h> +#define machine_at_prolineamt_init NULL /* checks for a removed machine */ + typedef struct vl82c480_t { uint8_t idx; uint8_t regs[256]; @@ -132,8 +132,8 @@ vl82c480_write(uint16_t addr, uint8_t val, void *priv) break; case 0x02: case 0x03: dev->regs[dev->idx] = val; - if (!strcmp(machine_get_internal_name(), "martin") || - !strcmp(machine_get_internal_name(), "prolineamt")) + if ((machines[machine].init == machine_at_martin_init) || + (machines[machine].init == machine_at_prolineamt_init)) vl82c480_recalc_banks(dev); break; case 0x04: @@ -220,9 +220,9 @@ vl82c480_init(const device_t *info) vl82c480_t *dev = (vl82c480_t *) calloc(1, sizeof(vl82c480_t)); uint32_t sizes[8] = { 0, 0, 1024, 2048, 4096, 8192, 16384, 32768 }; uint32_t ms = mem_size; - uint8_t min_i = !strcmp(machine_get_internal_name(), "prolineamt") ? 1 : 0; - uint8_t min_j = !strcmp(machine_get_internal_name(), "prolineamt") ? 4 : 2; - uint8_t max_j = !strcmp(machine_get_internal_name(), "prolineamt") ? 8 : 7; + uint8_t min_i = (machines[machine].init == machine_at_prolineamt_init) ? 1 : 0; + uint8_t min_j = (machines[machine].init == machine_at_prolineamt_init) ? 4 : 2; + uint8_t max_j = (machines[machine].init == machine_at_prolineamt_init) ? 8 : 7; dev->regs[0x00] = info->local; dev->regs[0x01] = 0xff; @@ -233,7 +233,7 @@ vl82c480_init(const device_t *info) dev->regs[0x07] = 0x21; dev->regs[0x08] = 0x38; - if (!strcmp(machine_get_internal_name(), "prolineamt")) { + if (machines[machine].init == machine_at_prolineamt_init) { dev->banks[0] = 4096; /* Bank 0 is ignored if 64 MB is installed. */ diff --git a/src/chipset/vl82c59x.c b/src/chipset/vl82c59x.c new file mode 100644 index 000000000..468978718 --- /dev/null +++ b/src/chipset/vl82c59x.c @@ -0,0 +1,644 @@ +/* + * 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 VLSI SuperCore and Wildcat chipsets. + * + * + * + * Authors: Miran Grca, + * win2kgamer + * + * Copyright 2020-2025 Miran Grca. + * Copyright 2025 win2kgamer + */ + +#ifdef ENABLE_VL82C59X_LOG +#include +#endif + +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include "cpu.h" +#include <86box/device.h> +#include <86box/io.h> +#include <86box/timer.h> +#include <86box/apm.h> +#include <86box/machine.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/pit_fast.h> +#include <86box/plat_unused.h> +#include <86box/mem.h> +#include <86box/nvr.h> +#include <86box/smram.h> +#include <86box/pci.h> +#include <86box/port_92.h> +#include <86box/spd.h> +#include <86box/keyboard.h> +#include <86box/chipset.h> +#include <86box/log.h> + +#ifdef ENABLE_VL82C59X_LOG +int vl82c59x_do_log = ENABLE_VL82C59X_LOG; + +static void +vl82c59x_log(void *priv, const char *fmt, ...) +{ + if (vl82c59x_do_log) { + va_list ap; + va_start(ap, fmt); + log_out(priv, fmt, ap); + va_end(ap); + } +} +#else +# define vl82c59x_log(fmt, ...) +#endif + +typedef struct vl82c59x_t { + uint8_t nb_slot; + uint8_t sb_slot; + uint8_t type; + uint8_t is_compaq; + + uint8_t pci_conf[256]; + uint8_t pci_conf_sb[256]; + + uint16_t pmio; + uint8_t pmio_set; + uint8_t pmreg; + + smram_t *smram[4]; + port_92_t *port_92; + nvr_t *nvr; + + void * log; /* New logging system */ +} vl82c59x_t; + +static int +vl82c59x_shflags(uint8_t access) +{ + int ret = MEM_READ_EXTANY | MEM_WRITE_EXTANY; + + switch (access) { + default: + case 0x00: + ret = MEM_READ_EXTANY | MEM_WRITE_EXTANY; + break; + case 0x01: + ret = MEM_READ_EXTANY | MEM_WRITE_INTERNAL; + break; + case 0x02: + ret = MEM_READ_INTERNAL | MEM_WRITE_EXTANY; + break; + case 0x03: + ret = MEM_READ_INTERNAL | MEM_WRITE_INTERNAL; + break; + } + + return ret; +} + +static void +vl82c59x_recalc(vl82c59x_t *dev) +{ + uint32_t base; + uint8_t access; + + shadowbios = 0; + shadowbios_write = 0; + + for (uint8_t i = 0; i < 4; i++) { + for (uint8_t j = 0; j < 8; j += 2) { + base = 0x000c0000 + (i << 16) + (j << 13); + access = (dev->pci_conf[0x66 + i] >> j) & 3; + mem_set_mem_state_both(base, 0x4000, vl82c59x_shflags(access)); + shadowbios |= ((base >= 0xe0000) && (access & 0x02)); + shadowbios_write |= ((base >= 0xe0000) && (access & 0x01)); + } + } + + flushmmucache(); +} + +static void +vl82c59x_smram(vl82c59x_t *dev) +{ + smram_disable_all(); + + /* A/B region SMRAM seems to not be controlled by 591 reg 0x7C/SMRAM enable */ + /* Dell Dimension BIOS breaks if A0000 region is controlled by SMRAM enable */ + if (dev->pci_conf[0x64] & 0x55) { + smram_enable(dev->smram[0], 0x000a0000, 0x000a0000, 0x10000, dev->pci_conf[0x64] & 0xAA, dev->pci_conf[0x64] & 0x55); + } + if (dev->pci_conf[0x65] & 0x55) { + smram_enable(dev->smram[1], 0x000b0000, 0x000b0000, 0x10000, dev->pci_conf[0x65] & 0xAA, dev->pci_conf[0x65] & 0x55); + } + + /* Handle E region SMRAM */ + if (dev->pci_conf[0x7C] & 0x80) { + if (dev->pci_conf[0x68] & 0x05) { + smram_enable(dev->smram[2], 0x000e0000, 0x000e0000, 0x8000, dev->pci_conf[0x68] & 0x0A, dev->pci_conf[0x68] & 0x05); + } + if (dev->pci_conf[0x68] & 0x50) { + smram_enable(dev->smram[3], 0x000e8000, 0x000e8000, 0x8000, dev->pci_conf[0x68] & 0xA0, dev->pci_conf[0x68] & 0x50); + } + } + + flushmmucache(); +} + +static void +vl82c59x_pm_write(uint16_t addr, uint8_t val, void *priv) +{ + vl82c59x_t *dev = (vl82c59x_t *) priv; + + vl82c59x_log(dev->log, "VL82c593 SMI I/O: [W] (%04X) = %02X\n", addr, val); + + /* Verify SMI Global Enable and Software SMI Enable are set */ + if ((dev->pci_conf_sb[0x6D] & 0x80) && (dev->pci_conf_sb[0x60] & 0x80)) { + dev->pci_conf_sb[0x61] = 0x80; + dev->pmreg = val; + smi_raise(); + } + +} + +static uint8_t +vl82c59x_pm_read(uint16_t addr, void *priv) +{ + vl82c59x_t *dev = (vl82c59x_t *) priv; + uint8_t ret = 0x00; + + ret = dev->pmreg; + vl82c59x_log(dev->log, "VL82c593 SMI I/O: [R] (%04X) = %02X\n", addr, ret); + + return ret; +} + +static void +vl82c59x_set_pm_io(void *priv) +{ + vl82c59x_t *dev = (vl82c59x_t *) priv; + uint8_t highbyte = dev->pci_conf_sb[0x62]; + uint8_t lowbyte = dev->pci_conf_sb[0x63]; + + /* Check for existing I/O mapping and remove it */ + if (dev->pmio_set == 1) { + vl82c59x_log(dev->log, "VL82c59x: Removing SMI IO handler for %04X\n", dev->pmio); + io_removehandler(dev->pmio, 0x0001, vl82c59x_pm_read, NULL, NULL, vl82c59x_pm_write, NULL, NULL, dev); + dev->pmio_set = 0; + } + + if ((highbyte != 0x00) | (lowbyte != 0x00)) { + dev->pmio = ((highbyte << 8) + lowbyte); + vl82c59x_log(dev->log, "VL82c59x: Adding SMI IO handler for %04X\n", dev->pmio); + io_sethandler(dev->pmio, 0x0001, vl82c59x_pm_read, NULL, NULL, vl82c59x_pm_write, NULL, NULL, dev); + dev->pmio_set = 1; + } + +} + +static void +vl82c59x_write(int func, int addr, uint8_t val, void *priv) +{ + vl82c59x_t *dev = (vl82c59x_t *) priv; + + vl82c59x_log(dev->log, "[%04X:%08X] VL82c591: [W] (%02X, %02X) = %02X\n", CS, cpu_state.pc, func, addr, val); + + if (func == 0x00) + switch (addr) { + case 0x04: + case 0x05: /* PCI Command Register */ + dev->pci_conf[addr] = val; + break; + case 0x54: /* Cache Control Register 1 */ + dev->pci_conf[addr] = val; + cpu_cache_ext_enabled = (val & 0xc0); + cpu_update_waitstates(); + break; + case 0x55: /* Cache Control Register 2 */ + dev->pci_conf[addr] = val; + cpu_cache_int_enabled = (val & 0x40); + cpu_update_waitstates(); + break; + case 0x58: /* RAMCFG0 */ + case 0x59: /* RAMCFG1 */ + dev->pci_conf[addr] = val; + break; + case 0x5A: /* Wildcat EDO RAM control */ + if (dev->type == 0x01) { + dev->pci_conf[addr] = val; + } + break; + case 0x5C: /* RAMCTL0 */ + case 0x5D: /* RAMCTL1 */ + case 0x5E: /* RAMCTL2 */ + case 0x5F: + case 0x60: + case 0x62: + /* Apricot XEN-PC Ruby/Jade BIOS requires bit 2 to be set or */ + /* CMOS setup hangs on subsequent runs after NVRAM is initialized */ + dev->pci_conf[addr] = val; + break; + case 0x64: /* A-B SMRAM regs */ + case 0x65: + dev->pci_conf[addr] = val; + vl82c59x_smram(dev); + break; + case 0x66: /* Shadow RAM */ + case 0x67: + case 0x68: + case 0x69: + dev->pci_conf[addr] = val; + vl82c59x_recalc(dev); + vl82c59x_smram(dev); + break; + case 0x6C: /* L2 Cacheability registers */ + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x74: /* Suspected PMRA registers */ + case 0x75: + case 0x76: + case 0x78: + case 0x79: + case 0x7A: + dev->pci_conf[addr] = val; + break; + case 0x7C: /* MISCSSET, bit 7 is SMRAM enable (for the E region) */ + /* io.c logging shows BIOSes setting Bit 7 here */ + dev->pci_conf[addr] = val; + vl82c59x_smram(dev); + break; + case 0x7D: /* Unknown but seems Wildcat-specific, Zeos and PB600 BIOSes hang if bit 3 is writable */ + if (dev->type == 0x01) { + dev->pci_conf[addr] = val & 0xf7; + } + break; + default: + if (addr > 0x3F) + vl82c59x_log(dev->log, "VL82c591: Unknown reg [W] (%02X, %02X) = %02X\n", func, addr, val); + break; + } + +} + +static uint8_t +vl82c59x_read(int func, int addr, void *priv) +{ + const vl82c59x_t *dev = (vl82c59x_t *) priv; + uint8_t ret = 0xff; + + if (func == 0x00) { + switch (addr) { + default: + ret = dev->pci_conf[addr]; + break; + } + } + + vl82c59x_log(dev->log, "[%04X:%08X] VL82c591: [R] (%02X, %02X) = %02X\n", CS, cpu_state.pc, func, addr, ret); + + return ret; +} + +static void +vl82c59x_sb_write(int func, int addr, uint8_t val, void *priv) +{ + vl82c59x_t *dev = (vl82c59x_t *) priv; + uint8_t irq; + const uint8_t irq_array[8] = { 3, 5, 9, 10, 11, 12, 14, 15 }; + + vl82c59x_log(dev->log, "[%04X:%08X] VL82c593: [W] (%02X, %02X) = %02X\n", CS, cpu_state.pc, func, addr, val); + + if (func == 0x00) + switch (addr) { + case 0x04: + case 0x05: /* PCI Command Register */ + dev->pci_conf_sb[addr] = val; + break; + case 0x50: /* MISCSETC */ + case 0x51: /* MISCSETB */ + case 0x52: /* MISCSETA */ + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5A: + /* Has at least one GPIO bit. Compaq Presario 700/900 586 BIOS */ + /* uses bit 2 as an output to set the onboard ES688's base I/O */ + /* address. Bit 2 cleared = 220, bit 2 set = 240 */ + case 0x5C: /* Interrupt Assertion Level Register */ + case 0x5D: + dev->pci_conf_sb[addr] = val; + break; + case 0x60: /* SMI Enable Register */ + dev->pci_conf_sb[addr] = val; + break; + case 0x61: /* SMI Status Register */ + dev->pci_conf_sb[addr] = 0x00; + break; + case 0x62: /* SMI I/O port high byte */ + case 0x63: /* SMI I/O port low byte */ + dev->pci_conf_sb[addr] = val; + vl82c59x_set_pm_io(dev); + break; + case 0x64: /* System Event Enable Register 1 */ + dev->pci_conf_sb[addr] = val; + break; + case 0x65: /* System Event Status Register 1 */ + dev->pci_conf_sb[addr] = 0x00; + break; + case 0x66: /* System Event Enable Register 2 */ + dev->pci_conf_sb[addr] = val; + break; + case 0x67: /* System Event Status Register 2 */ + dev->pci_conf_sb[addr] = 0x00; + break; + case 0x68: /* System Event Enable Register 3 */ + dev->pci_conf_sb[addr] = val; + break; + case 0x69: /* System Event Status Register 3 */ + dev->pci_conf_sb[addr] = 0x00; + break; + case 0x6A: /* PCI Activity Control Register */ + dev->pci_conf_sb[addr] = val & 0x0f; /* Top 4 bits are Read/Clear */ + break; + case 0x6B: /* Programmable I/O Range Register High Byte */ + dev->pci_conf_sb[addr] = val; + break; + case 0x6C: /* Programmable I/O Range Register Low Byte */ + dev->pci_conf_sb[addr] = val; + break; + case 0x6D: /* System Event Control Register/SMI Global Enable */ + dev->pci_conf_sb[addr] = val; + break; + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: /* GPIO */ + /* Compaq Presario and Prolinea use bits 6-4 for setting ECP DMA */ + /* 011 (0x03) = DMA 3 (Default) */ + /* 100 (0x04) = DMA 0 */ + /* 111 (0x07) = DMA disabled */ + case 0x73: /* GPIO */ + dev->pci_conf_sb[addr] = val; + break; + case 0x74: /* PCI Interrupt Connection Register (PCIINT0/1) */ + dev->pci_conf_sb[addr] = val; + irq = irq_array[val & 0x07]; + pci_set_irq_routing(PCI_INTA, (irq != 0) ? irq : PCI_IRQ_DISABLED); + irq = irq_array[(val & 0x70) >> 4]; + pci_set_irq_routing(PCI_INTB, (irq != 0) ? irq : PCI_IRQ_DISABLED); + break; + case 0x75: /* PCI Interrupt Connection Register (PCIINT2/3) */ + dev->pci_conf_sb[addr] = val; + irq = irq_array[val & 0x07]; + pci_set_irq_routing(PCI_INTC, (irq != 0) ? irq : PCI_IRQ_DISABLED); + irq = irq_array[(val & 0x70) >> 4]; + pci_set_irq_routing(PCI_INTD, (irq != 0) ? irq : PCI_IRQ_DISABLED); + break; + case 0x76: /* PCI Interrupt Connection Register (ISA/PCIINT) */ + dev->pci_conf_sb[addr] = val; + break; + case 0x77: + case 0x78: + dev->pci_conf_sb[addr] = val; + break; + default: + if (addr > 0x3F) + vl82c59x_log(dev->log, "VL82c593: Unknown reg [W] (%02X, %02X) = %02X\n", func, addr, val); + break; + } + +} + +static uint8_t +vl82c59x_sb_read(int func, int addr, void *priv) +{ + const vl82c59x_t *dev = (vl82c59x_t *) priv; + uint8_t ret = 0xff; + + if (func == 0x00) + switch (addr) { + case 0x69: /* Lower two bits are a CPU speed readout per Compaq's Prolinea E series TRG */ + /* Per the Prolinea TRG bits 5/3/1 of 593 reg 0x73 must be set to 1 to read the jumpers */ + if (dev->is_compaq && (dev->pci_conf_sb[0x73] & 0x2A)) { + /* Set bit 2 to 1 as this is required for the Prolinea E to be properly identified + in Compaq Computer Setup. */ + ret = (dev->pci_conf_sb[addr] | 0x04); + if (cpu_busspeed <= 50000000) + ret = (ret & 0xfd); /* 50MHz: Bit 1 = 0 */ + else + ret = (ret | 0x02); /* 60MHz: Bit 1 = 1 */ + + if (cpu_dmulti <= 1.5) + ret = (ret | 0x01); /* 1.5x mult: Bit 0 = 1 */ + else + ret = (ret & 0xfe); /* 2.0x mult: Bit 0 = 0 */ + } else { + ret = dev->pci_conf_sb[addr]; + } + break; + default: + ret = dev->pci_conf_sb[addr]; + break; + } + + vl82c59x_log(dev->log, "[%04X:%08X] VL82c593: [R] (%02X, %02X) = %02X\n", CS, cpu_state.pc, func, addr, ret); + + return ret; + +} + +static void +vl82c59x_reset(void *priv) +{ + vl82c59x_t *dev = (vl82c59x_t *) priv; + + /* Northbridge (VLSI VL82c591) */ + dev->pci_conf[0x00] = 0x04; + dev->pci_conf[0x01] = 0x10; + switch (dev->type) { + case 0: /* SuperCore */ + dev->pci_conf[0x02] = 0x05; + dev->pci_conf[0x03] = 0x00; + break; + case 1: /* Wildcat */ + dev->pci_conf[0x02] = 0x07; + dev->pci_conf[0x03] = 0x00; + break; + } + dev->pci_conf[0x08] = 0x00; + dev->pci_conf[0x09] = 0x00; + dev->pci_conf[0x0a] = 0x00; + dev->pci_conf[0x0b] = 0x06; + + /* Southbridge (VLSI VL82c593) */ + dev->pci_conf_sb[0x00] = 0x04; + dev->pci_conf_sb[0x01] = 0x10; + switch (dev->type) { + case 0: /* SuperCore */ + dev->pci_conf_sb[0x02] = 0x06; + dev->pci_conf_sb[0x03] = 0x00; + break; + case 1: /* Wildcat */ + dev->pci_conf_sb[0x02] = 0x08; + dev->pci_conf_sb[0x03] = 0x00; + break; + } + dev->pci_conf_sb[0x08] = 0x00; + dev->pci_conf_sb[0x09] = 0x00; + dev->pci_conf_sb[0x0a] = 0x01; + dev->pci_conf_sb[0x0b] = 0x06; + + /* Unsure on which register configures this (if any), per Compaq's + * Pentium-based Presario 700/900 Series and Prolinea E Series Desktop + * Technical Reference Guides the ISA bus runs at 8MHz while the + * Zeos Pantera Wildcat user manual says that the ISA bus runs at + * 7.5MHz on 90MHz (60MHz bus) systems and 8.25MHz on 100MHz (66MHz bus) + * systems. + */ + if (cpu_busspeed > 50000000) + cpu_set_isa_pci_div(4); + else + cpu_set_isa_pci_div(3); + + 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); + + vl82c59x_smram(dev); + + /* Reset SMI IO port */ + dev->pmio = 0x0000; + dev->pmio_set = 0; + + cpu_cache_int_enabled = 1; + cpu_cache_ext_enabled = 1; + cpu_update_waitstates(); +} + +static void +vl82c59x_close(void *priv) +{ + vl82c59x_t *dev = (vl82c59x_t *) priv; + + smram_del(dev->smram[0]); + smram_del(dev->smram[1]); + smram_del(dev->smram[2]); + smram_del(dev->smram[3]); + + if (dev->log != NULL) { + log_close(dev->log); + dev->log = NULL; + } + + free(dev); +} + +static void * +vl82c59x_init(UNUSED(const device_t *info)) +{ + vl82c59x_t *dev = (vl82c59x_t *) calloc(1, sizeof(vl82c59x_t)); + + dev->type = (info->local & 0x0f); + + dev->is_compaq = (info->local >> 4); + + dev->log = log_open("VL82c59x"); + + /* VL82c591 (Northbridge) */ + pci_add_card(PCI_ADD_NORTHBRIDGE, vl82c59x_read, vl82c59x_write, dev, &dev->nb_slot); + + /* VL82c593 (Southbridge) */ + pci_add_card(PCI_ADD_SOUTHBRIDGE, vl82c59x_sb_read, vl82c59x_sb_write, dev, &dev->sb_slot); + + dev->port_92 = device_add(&port_92_device); + + /* NVR */ + dev->nvr = device_add(&at_nvr_device); + + dev->smram[0] = smram_add(); + dev->smram[1] = smram_add(); + dev->smram[2] = smram_add(); + dev->smram[3] = smram_add(); + + vl82c59x_reset(dev); + + return dev; +} + +const device_t vl82c59x_device = { + .name = "VLSI VL82c59x (SuperCore)", + .internal_name = "vl82c59x", + .flags = DEVICE_PCI, + .local = 0, + .init = vl82c59x_init, + .close = vl82c59x_close, + .reset = vl82c59x_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t vl82c59x_compaq_device = { + .name = "VLSI VL82c59x (SuperCore with Compaq readout)", + .internal_name = "vl82c59x_compaq", + .flags = DEVICE_PCI, + .local = 0x10, + .init = vl82c59x_init, + .close = vl82c59x_close, + .reset = vl82c59x_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t vl82c59x_wildcat_device = { + .name = "VLSI VL82c59x (Wildcat)", + .internal_name = "vl82c59x_wildcat", + .flags = DEVICE_PCI, + .local = 1, + .init = vl82c59x_init, + .close = vl82c59x_close, + .reset = vl82c59x_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t vl82c59x_wildcat_compaq_device = { + .name = "VLSI VL82c59x (Wildcat with Compaq readout)", + .internal_name = "vl82c59x_wildcat_compaq", + .flags = DEVICE_PCI, + .local = 0x11, + .init = vl82c59x_init, + .close = vl82c59x_close, + .reset = vl82c59x_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/chipset/wd76c10.c b/src/chipset/wd76c10.c index ddde7626e..b70785b37 100644 --- a/src/chipset/wd76c10.c +++ b/src/chipset/wd76c10.c @@ -11,7 +11,6 @@ * Authors: Miran Grca, * * Copyright 2024 Miran Grca. - * */ #include #include diff --git a/src/config.c b/src/config.c index 53d00a6bf..d4afe9d81 100644 --- a/src/config.c +++ b/src/config.c @@ -265,6 +265,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); + fdd_sounds_enabled = ini_section_get_int(cat, "fdd_sounds_enabled", 1); p = ini_section_get_string(cat, "uuid", NULL); if (p != NULL) @@ -572,7 +573,7 @@ load_input_devices(void) 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")) + else if (machines[machine].init == machine_xt_pc5086_init) keyboard_type = KEYBOARD_TYPE_PC_XT; else if (machine_has_bus(machine, MACHINE_BUS_PS2_PORTS)) { if (machine_has_flags(machine, MACHINE_KEYBOARD_JIS)) @@ -1436,6 +1437,15 @@ load_floppy_and_cdrom_drives(void) sprintf(temp, "fdd_%02i_check_bpb", c + 1); ini_section_delete_var(cat, temp); } + sprintf(temp, "fdd_%02i_audio", c + 1); + int def_prof = FDD_AUDIO_PROFILE_NONE; + int prof = ini_section_get_int(cat, temp, def_prof); + if (prof < 0 || prof >= FDD_AUDIO_PROFILE_MAX) + prof = def_prof; + fdd_set_audio_profile(c, prof); + if (prof == def_prof) + ini_section_delete_var(cat, temp); + for (int i = 0; i < MAX_PREV_IMAGES; i++) { fdd_image_history[c][i] = (char *) calloc((MAX_IMAGE_PATH_LEN + 1) << 1, sizeof(char)); sprintf(temp, "fdd_%02i_image_history_%02i", c + 1, i + 1); @@ -2479,6 +2489,11 @@ save_general(void) else ini_section_delete_var(cat, "force_constant_mouse"); + if (fdd_sounds_enabled == 1) + ini_section_delete_var(cat, "fdd_sounds_enabled"); + else + ini_section_set_int(cat, "fdd_sounds_enabled", fdd_sounds_enabled); + char cpu_buf[128] = { 0 }; plat_get_cpu_string(cpu_buf, 128); ini_section_set_string(cat, "host_cpu", cpu_buf); @@ -3416,6 +3431,14 @@ save_floppy_and_cdrom_drives(void) else save_image_file(cat, temp, fdd_image_history[c][i]); } + + sprintf(temp, "fdd_%02i_audio", c + 1); + int def_prof = FDD_AUDIO_PROFILE_NONE; + int prof = fdd_get_audio_profile(c); + if (prof == def_prof) + ini_section_delete_var(cat, temp); + else + ini_section_set_int(cat, temp, prof); } for (c = 0; c < CDROM_NUM; c++) { diff --git a/src/cpu/386_common.h b/src/cpu/386_common.h index 8e1f7533f..1efda9d4f 100644 --- a/src/cpu/386_common.h +++ b/src/cpu/386_common.h @@ -542,7 +542,7 @@ fastreadl_fetch(uint32_t a) # if (defined __amd64__ || defined _M_X64 || defined __aarch64__ || defined _M_ARM64) return *((uint32_t *) (((uintptr_t) &pccache2[a] & 0x00000000ffffffffULL) | ((uintptr_t) &pccache2[0] & 0xffffffff00000000ULL))); # else - return *((uint32_t *) &pccache2[a]); + return AS_U32(pccache2[a]); # endif } val = fastreadw_fetch(a); diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index ff806297e..bdd93ec5b 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -386,11 +386,7 @@ cpu_is_eligible(const cpu_family_t *cpu_family, int cpu, int machine) return 1; /* Cyrix 6x86MX on the NuPRO 592. */ - if (((cpu_s->cyrix_id & 0xff00) == 0x0400) && (strstr(machine_s->internal_name, "nupro") != NULL)) - return 0; - - /* Cyrix 6x86MX or MII on the P5MMS98. */ - if ((cpu_s->cpu_type == CPU_Cx6x86MX) && (strstr(machine_s->internal_name, "p5mms98") != NULL)) + if (((cpu_s->cyrix_id & 0xff00) == 0x0400) && (machine_s->init == machine_at_nupro592_init)) return 0; /* Check CPU blocklist. */ diff --git a/src/ddma.c b/src/ddma.c index 0ca1bb879..51f2b589e 100644 --- a/src/ddma.c +++ b/src/ddma.c @@ -8,8 +8,6 @@ * * Distributed DMA emulation. * - * - * * Authors: Miran Grca, * * Copyright 2020 Miran Grca. diff --git a/src/device.c b/src/device.c index 07e193ead..cd5adfee0 100644 --- a/src/device.c +++ b/src/device.c @@ -9,8 +9,6 @@ * Implementation of the generic device interface to handle * all devices attached to the emulator. * - * - * * Authors: Fred N. van Kempen, * Miran Grca, * Sarah Walker, diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt index 12835e909..47330955a 100644 --- a/src/device/CMakeLists.txt +++ b/src/device/CMakeLists.txt @@ -18,6 +18,8 @@ add_library(dev OBJECT access_bus.c + ast_nvr.c + ast_readout.c bugger.c cartridge.c cassette.c @@ -81,6 +83,17 @@ if(ISAMEM_BRAT) target_compile_definitions(dev PRIVATE USE_ISAMEM_BRAT) endif() +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + if(VFIO) + include(CheckIncludeFile) + check_include_file("linux/vfio.h" VFIO_AVAILABLE) + if(VFIO_AVAILABLE) + add_compile_definitions(USE_VFIO) + target_sources(dev PRIVATE vfio.c) + endif() + endif() +endif() + if(LASERXT) target_compile_definitions(dev PRIVATE USE_LASERXT) endif() diff --git a/src/device/ast_nvr.c b/src/device/ast_nvr.c new file mode 100644 index 000000000..21585dbe3 --- /dev/null +++ b/src/device/ast_nvr.c @@ -0,0 +1,180 @@ +/* + * 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 AST Bravo MS secondary NVR + * + * + * + * Authors: win2kgamer + * + * Copyright 2025 win2kgamer. + */ + +#ifdef ENABLE_AST_NVR_LOG +#include +#endif + +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include <86box/machine.h> +#include <86box/device.h> +#include <86box/io.h> +#include <86box/mem.h> +#include <86box/timer.h> +#include <86box/nvr.h> +#include <86box/rom.h> +#include <86box/log.h> + +#ifdef ENABLE_AST_NVR_LOG +int ast_nvr_do_log = ENABLE_AST_NVR_LOG; + +static void +ast_nvr_log(void *priv, const char *fmt, ...) +{ + if (ast_nvr_do_log) { + va_list ap; + va_start(ap, fmt); + log_out(priv, fmt, ap); + va_end(ap); + } +} +#else +# define ast_nvr_log(fmt, ...) +#endif + +typedef struct ast_nvr_t { + int addr; + int bank; + + uint8_t *ram; + int size; + + char *fn; + + void * log; // New logging system +} ast_nvr_t; + +static uint8_t +ast_nvr_read(uint16_t port, void *priv) +{ + ast_nvr_t *nvr = (ast_nvr_t *) priv; + uint8_t ret = 0xff; + + switch (port) { + case 0x800 ... 0x8FF: + nvr->addr = ((nvr->bank << 8) + (port - 0x800)); + ret = nvr->ram[nvr->addr]; + break; + default: + break; + } + + ast_nvr_log(nvr->log, "AST NVR Read [%02X:%02X] = %02X\n", nvr->bank, port, ret); + + return ret; +} + +static void +ast_nvr_write(uint16_t port, uint8_t val, void *priv) +{ + ast_nvr_t *nvr = (ast_nvr_t *) priv; + + ast_nvr_log(nvr->log, "AST NVR Write [%02X:%02X] = %02X\n", nvr->bank, port, val); + + switch (port) { + case 0x800 ... 0x8FF: + nvr->addr = ((nvr->bank << 8) + (port - 0x800)); + nvr->ram[nvr->addr] = val; + break; + case 0xC00: + nvr->bank = val; + default: + break; + } + +} + +static void * +ast_nvr_init(const device_t *info) +{ + ast_nvr_t *nvr; + FILE *fp = NULL; + int c; + + nvr = (ast_nvr_t *) calloc(1, sizeof(ast_nvr_t)); + memset(nvr, 0x00, sizeof(ast_nvr_t)); + + nvr->log = log_open("ASTNVR"); + + nvr->size = 8192; + + /* Set up the NVR file's name */ + c = strlen(machine_get_internal_name()) + 9; + nvr->fn = (char *) calloc(1, (c + 1)); + sprintf(nvr->fn, "%s_sec.nvr", machine_get_internal_name()); + + io_sethandler(0x0800, 0x100, + ast_nvr_read, NULL, NULL, ast_nvr_write, NULL, NULL, nvr); + io_sethandler(0x0C00, 0x01, + ast_nvr_read, NULL, NULL, ast_nvr_write, NULL, NULL, nvr); + + fp = nvr_fopen(nvr->fn, "rb"); + + nvr->ram = (uint8_t *) calloc(1, nvr->size); + memset(nvr->ram, 0xff, nvr->size); + if (fp != NULL) { + if (fread(nvr->ram, 1, nvr->size, fp) != nvr->size) + fatal("ast_nvr_init(): Error reading EEPROM data\n"); + fclose(fp); + } + + return nvr; +} + +static void +ast_nvr_close (void *priv) +{ + ast_nvr_t *nvr = (ast_nvr_t *) priv; + FILE *fp = NULL; + + fp = nvr_fopen(nvr->fn, "wb"); + + if (fp != NULL) { + (void) fwrite(nvr->ram, nvr->size, 1, fp); + fclose(fp); + } + + if (nvr->ram != NULL) + free(nvr->ram); + + if (nvr->log != NULL) { + log_close(nvr->log); + nvr->log = NULL; + } + + free(nvr); +} + +const device_t ast_nvr_device = { + .name = "AST Secondary NVRAM for Bravo MS", + .internal_name = "ast_nvr", + .flags = 0, + .local = 0, + .init = ast_nvr_init, + .close = ast_nvr_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/device/ast_readout.c b/src/device/ast_readout.c new file mode 100644 index 000000000..e583ae34d --- /dev/null +++ b/src/device/ast_readout.c @@ -0,0 +1,198 @@ +/* + * 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 AST Bravo MS jumper readout. + * + * + * + * Authors: win2kgamer + * + * Copyright 2025 win2kgamer + */ + +#ifdef ENABLE_AST_READOUT_LOG +#include +#endif + +#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/plat_unused.h> +#include <86box/lpt.h> +#include <86box/machine.h> +#include <86box/log.h> + +/* + The AST readout device has multiple indexed registers that handle + jumper readout, software ECP DMA configuration and other unknown functions. + + Register 0x00: + Bits 6-4 = ECP DMA configuration + 010 (0x02) = DMA 0 + 101 (0x05) = DMA 1 + 111 (0x07) = DMA 3 + + Register 0x03: + Bit 7 = Force flash + Bit 6 = Password disable + Bit 5 = Mono/Color primary video (0=Color/1=Mono) + Bit 4 = Setup disable (0=Enable Setup/1=Disable Setup) + Bit 3 = Enable onboard video (0=Enable/1=Disable) + Bit 2 = ???? + Bit 1 = ???? + Bit 0 = ???? +*/ + +typedef struct ast_readout_t { + uint8_t index; + uint8_t jumper[4]; + + void * log; // New logging system +} ast_readout_t; + +#ifdef ENABLE_AST_READOUT_LOG +int ast_readout_do_log = ENABLE_AST_READOUT_LOG; + +static void +ast_readout_log(void *priv, const char *fmt, ...) +{ + if (ast_readout_do_log) { + va_list ap; + va_start(ap, fmt); + log_out(priv, fmt, ap); + va_end(ap); + } +} +#else +# define ast_readout_log(fmt, ...) +#endif + +static void +ast_readout_write(uint16_t port, uint8_t val, void *priv) +{ + ast_readout_t *dev = (ast_readout_t *) priv; + switch (port) { + case 0xE0: + ast_readout_log(dev->log, "[%04X:%08X] AST Bravo Readout: Set Index %02X\n", CS, cpu_state.pc, val); + dev->index = val; + break; + case 0xE1: + ast_readout_log(dev->log, "[%04X:%08X] AST Bravo Readout: Write %02X:%02X\n", CS, cpu_state.pc, dev->index, val); + if ((dev->index == 0x00) && (!strcmp(machine_get_internal_name(), "bravoms586"))) { + uint8_t dmaval = ((val >> 4) & 0x07); + dev->jumper[dev->index] = val; + switch (dmaval) { + case 0x02: + ast_readout_log(dev->log, "ECP DMA set to 0\n"); + lpt1_dma(0); + break; + case 0x05: + ast_readout_log(dev->log, "ECP DMA set to 1\n"); + lpt1_dma(1); + break; + case 0x07: + ast_readout_log(dev->log, "ECP DMA set to 3\n"); + lpt1_dma(3); + break; + default: + ast_readout_log(dev->log, "Unknown ECP DMA!\n"); + break; + } + } else if (dev->index == 0x03) { + dev->jumper[dev->index] = (val & 0x07); + if (gfxcard[0] != 0x01) + dev->jumper[dev->index] |= 0x08; + } + else + dev->jumper[dev->index] = val; + break; + default: + break; + } +} + +static uint8_t +ast_readout_read(uint16_t port, void *priv) +{ + const ast_readout_t *dev = (ast_readout_t *) priv; + uint8_t ret = 0xff; + + switch (port) { + case 0xE0: + ast_readout_log(dev->log, "[%04X:%08X] AST Bravo Readout: Read Index %02X\n", CS, cpu_state.pc, dev->index); + ret = dev->index; + break; + case 0xE1: + ast_readout_log(dev->log, "[%04X:%08X] AST Bravo Readout: Read %02X:%02X\n", CS, cpu_state.pc, dev->index, dev->jumper[dev->index]); + ret = dev->jumper[dev->index]; + break; + default: + break; + } + return ret; +} + +static void +ast_readout_reset(void *priv) +{ + ast_readout_t *dev = (ast_readout_t *) priv; + + dev->jumper[0x03] = 0x06; + if (gfxcard[0] != 0x01) + dev->jumper[0x03] |= 0x08; +} + +static void +ast_readout_close(void *priv) +{ + ast_readout_t *dev = (ast_readout_t *) priv; + + if (dev->log != NULL) { + log_close(dev->log); + dev->log = NULL; + } + + free(dev); +} + +static void * +ast_readout_init(const device_t *info) +{ + ast_readout_t *dev = (ast_readout_t *) calloc(1, sizeof(ast_readout_t)); + + dev->log = log_open("AST Readout"); + + ast_readout_reset(dev); + + io_sethandler(0x00E0, 0x0002, ast_readout_read, NULL, NULL, ast_readout_write, NULL, NULL, dev); + + return dev; +} + +const device_t ast_readout_device = { + .name = "AST Bravo MS Readout", + .internal_name = "ast_readout", + .flags = 0, + .local = 0, + .init = ast_readout_init, + .close = ast_readout_close, + .reset = ast_readout_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/device/bugger.c b/src/device/bugger.c index 6a30df7be..8495cdbe5 100644 --- a/src/device/bugger.c +++ b/src/device/bugger.c @@ -44,9 +44,8 @@ * configuration register (CTRL_SPCFG bit set) but have to * remember that stuff first... * - * - * * Authors: Fred N. van Kempen, + * * Copyright 1989-2018 Fred N. van Kempen. */ #include diff --git a/src/device/cartridge.c b/src/device/cartridge.c index cb3c5e412..639095f72 100644 --- a/src/device/cartridge.c +++ b/src/device/cartridge.c @@ -8,8 +8,6 @@ * * Implementation of the PCjr cartridge emulation. * - * - * * Authors: Miran Grca, * * Copyright 2021 Miran Grca. diff --git a/src/device/clock_ics9xxx.c b/src/device/clock_ics9xxx.c index 02f033e9b..4c08d6b77 100644 --- a/src/device/clock_ics9xxx.c +++ b/src/device/clock_ics9xxx.c @@ -8,8 +8,6 @@ * * Emulation of the ICS9xxx series of clock generators. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. diff --git a/src/device/hasp.c b/src/device/hasp.c index 07e9ac636..ea8b9b413 100644 --- a/src/device/hasp.c +++ b/src/device/hasp.c @@ -12,8 +12,6 @@ * emulation is enough to satisfy that game, but not Aladdin's * DiagnostiX utility. * - * - * * Authors: RichardG, * Peter Ferrie * diff --git a/src/device/hwm.c b/src/device/hwm.c index 85c689740..13abcb413 100644 --- a/src/device/hwm.c +++ b/src/device/hwm.c @@ -8,13 +8,10 @@ * * Common functions for hardware monitoring chips. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. */ - #include #include #include diff --git a/src/device/hwm_gl518sm.c b/src/device/hwm_gl518sm.c index cfc16664a..a39511c9a 100644 --- a/src/device/hwm_gl518sm.c +++ b/src/device/hwm_gl518sm.c @@ -8,8 +8,6 @@ * * Emulation of the Genesys Logic GL518SM hardware monitoring chip. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. diff --git a/src/device/hwm_lm75.c b/src/device/hwm_lm75.c index 29fe2024f..79f9ee6f0 100644 --- a/src/device/hwm_lm75.c +++ b/src/device/hwm_lm75.c @@ -8,8 +8,6 @@ * * Emulation of the National Semiconductor LM75 temperature sensor chip. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. diff --git a/src/device/hwm_lm78.c b/src/device/hwm_lm78.c index 909713833..27741fd6d 100644 --- a/src/device/hwm_lm78.c +++ b/src/device/hwm_lm78.c @@ -8,8 +8,6 @@ * * Emulation of the National Semiconductor LM78 hardware monitoring chip. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. diff --git a/src/device/hwm_vt82c686.c b/src/device/hwm_vt82c686.c index 8623a9f6b..f20f8264c 100644 --- a/src/device/hwm_vt82c686.c +++ b/src/device/hwm_vt82c686.c @@ -8,8 +8,6 @@ * * Emulation of the VIA VT82C686A/B integrated hardware monitor. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. diff --git a/src/device/i2c.c b/src/device/i2c.c index eb80f413b..ca5e549b7 100644 --- a/src/device/i2c.c +++ b/src/device/i2c.c @@ -8,8 +8,6 @@ * * Implementation of the I2C bus and its operations. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. diff --git a/src/device/i2c_gpio.c b/src/device/i2c_gpio.c index 61a3dbe05..c941a2cc1 100644 --- a/src/device/i2c_gpio.c +++ b/src/device/i2c_gpio.c @@ -8,8 +8,6 @@ * * Emulation of a GPIO-based I2C host controller. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. diff --git a/src/device/ibm_5161.c b/src/device/ibm_5161.c index 456227676..38f911120 100644 --- a/src/device/ibm_5161.c +++ b/src/device/ibm_5161.c @@ -6,8 +6,6 @@ * * Emulation of the IBM Expansion Unit (5161). * - * - * * Authors: Miran Grca, * * Copyright 2016-2018 Miran Grca. diff --git a/src/device/isapnp.c b/src/device/isapnp.c index ce8f7817f..3129cd1c8 100644 --- a/src/device/isapnp.c +++ b/src/device/isapnp.c @@ -8,8 +8,6 @@ * * Implementation of ISA Plug and Play. * - * - * * Authors: Miran Grca, * RichardG, * @@ -27,6 +25,7 @@ #include <86box/io.h> #include <86box/isapnp.h> #include <86box/plat_unused.h> +#include "cpu.h" #define CHECK_CURRENT_LD() \ if (!ld) { \ @@ -44,6 +43,11 @@ const uint8_t isapnp_init_key[32] = { 0x6A, 0xB5, 0xDA, 0xED, 0xF6, 0xFB 0xDF, 0x6F, 0x37, 0x1B, 0x0D, 0x86, 0xC3, 0x61, 0xB0, 0x58, 0x2C, 0x16, 0x8B, 0x45, 0xA2, 0xD1, 0xE8, 0x74, 0x3A, 0x9D, 0xCE, 0xE7, 0x73, 0x39 }; +/* Required for the RTL8019AS. */ +const uint8_t isapnp_init_key2[32] = { 0xDA, 0x6D, 0x36, 0x1B, 0x8D, 0x46, 0x23, 0x91, + 0x48, 0xA4, 0xD2, 0x69, 0x34, 0x9A, 0x4D, 0x26, + 0x13, 0x89, 0x44, 0xA2, 0x51, 0x28, 0x94, 0xCA, + 0x65, 0x32, 0x19, 0x0C, 0x86, 0x43, 0xA1, 0x50 }; static const device_t isapnp_device; #ifdef ENABLE_ISAPNP_LOG @@ -73,6 +77,7 @@ enum { typedef struct _isapnp_device_ { uint8_t number; + uint8_t defs[256]; uint8_t regs[256]; uint8_t mem_upperlimit; uint8_t irq_types; @@ -87,11 +92,15 @@ typedef struct _isapnp_card_ { uint8_t enable; uint8_t state; uint8_t csn; + uint8_t csnsav; uint8_t ld; uint8_t id_checksum; uint8_t serial_read; uint8_t serial_read_pair; uint8_t serial_read_pos; + uint8_t is_rt; + uint8_t normal; + uint8_t multiple_lds; uint8_t *rom; uint16_t rom_pos; uint16_t rom_size; @@ -111,6 +120,7 @@ typedef struct _isapnp_card_ { typedef struct { uint8_t in_isolation; + uint8_t using_key2; uint8_t reg; uint8_t key_pos : 5; uint16_t read_data_addr; @@ -168,7 +178,7 @@ isapnp_device_config_changed(isapnp_card_t *card, isapnp_device_t *ld) } for (uint8_t i = 0; i < 8; i++) { reg_base = 0x60 + (2 * i); - if (ld->regs[0x31] & 0x02) + if (!(ld->regs[0x30] & 0x01) && (ld->regs[0x31] & 0x02)) card->config.io[i].base = 0; /* let us handle I/O range check reads */ else card->config.io[i].base = (ld->regs[reg_base] << 8) | ld->regs[reg_base + 1]; @@ -176,7 +186,7 @@ isapnp_device_config_changed(isapnp_card_t *card, isapnp_device_t *ld) for (uint8_t i = 0; i < 2; i++) { reg_base = 0x70 + (2 * i); card->config.irq[i].irq = ld->regs[reg_base]; - card->config.irq[i].level = ld->regs[reg_base + 1] & 0x02; + card->config.irq[i].level = !!(ld->regs[reg_base + 1] & 0x02); card->config.irq[i].type = ld->regs[reg_base + 1] & 0x01; } for (uint8_t i = 0; i < 2; i++) { @@ -258,17 +268,29 @@ isapnp_reset_ld_regs(isapnp_device_t *ld) /* Set the default IRQ type bits. */ for (uint8_t i = 0; i < 2; i++) { if (ld->irq_types & (0x1 << (4 * i))) - ld->regs[0x70 + (2 * i)] = 0x02; + ld->regs[0x71 + (2 * i)] = 0x02; else if (ld->irq_types & (0x2 << (4 * i))) - ld->regs[0x70 + (2 * i)] = 0x00; + ld->regs[0x71 + (2 * i)] = 0x00; else if (ld->irq_types & (0x4 << (4 * i))) - ld->regs[0x70 + (2 * i)] = 0x03; + ld->regs[0x71 + (2 * i)] = 0x03; else if (ld->irq_types & (0x8 << (4 * i))) - ld->regs[0x70 + (2 * i)] = 0x01; + ld->regs[0x71 + (2 * i)] = 0x01; } /* Reset configuration registers to match the default configuration. */ isapnp_reset_ld_config(ld); + + if (ld->defs[0x30] != 0x00) + ld->regs[0x30] = ld->defs[0x30]; + + if (ld->defs[0x60] != 0x00) + ld->regs[0x60] = ld->defs[0x60]; + + if (ld->defs[0x61] != 0x00) + ld->regs[0x61] = ld->defs[0x61]; + + if (ld->defs[0x70] != 0x00) + ld->regs[0x70] = ld->defs[0x70]; } static uint8_t @@ -290,7 +312,7 @@ isapnp_read_common(isapnp_t *dev, isapnp_card_t *card, isapnp_device_t *ld, uint case 0x01: /* Serial Isolation */ card = dev->first_card; while (card) { - if (card->enable && card->rom && (card->state == PNP_STATE_ISOLATION)) + if (card->enable && (card->rom != NULL) && (card->state == PNP_STATE_ISOLATION)) break; card = card->next; } @@ -376,6 +398,7 @@ vendor_defined: default: if (reg >= 0x30) { + CHECK_CURRENT_CARD(); CHECK_CURRENT_LD(); isapnp_log("ISAPnP: Read register %02X from CSN %02X device %02X\n", reg, card->csn, ld->number); ret = ld->regs[reg]; @@ -399,7 +422,8 @@ isapnp_read_data(UNUSED(uint16_t addr), void *priv) card = card->next; } - isapnp_log("ISAPnP: read_data() => "); + // isapnp_log("ISAPnP: read_data() => "); + isapnp_log("[%04X:%08X] ISAPnP: read_data() => ", CS, cpu_state.pc); return isapnp_read_common(dev, card, dev->current_ld, dev->reg); } @@ -434,26 +458,60 @@ isapnp_write_addr(UNUSED(uint16_t addr), uint8_t val, void *priv) if (card->state == PNP_STATE_WAIT_FOR_KEY) { /* checking only the first card should be fine */ /* Check written value against LFSR key. */ - if (val == isapnp_init_key[dev->key_pos]) { + if ((val == isapnp_init_key[dev->key_pos]) || (val == isapnp_init_key2[dev->key_pos])) { + dev->using_key2 = (val == isapnp_init_key2[dev->key_pos]); dev->key_pos++; if (!dev->key_pos) { isapnp_log("ISAPnP: Key unlocked, putting cards to SLEEP\n"); while (card) { - if (card->enable && (card->enable != ISAPNP_CARD_NO_KEY) && (card->state == PNP_STATE_WAIT_FOR_KEY)) + int match_rt = (dev->using_key2 && card->is_rt); + int match_normal = (!dev->using_key2 && card->normal); + if (card->enable && (match_rt || match_normal) && + (card->enable != ISAPNP_CARD_NO_KEY) && (card->state == PNP_STATE_WAIT_FOR_KEY)) card->state = PNP_STATE_SLEEP; card = card->next; } } - } else { + } else dev->key_pos = 0; - } + } +} + +static void +isapnp_ld_io_remove(isapnp_device_t *ld) +{ + uint16_t io_addr; + + for (uint8_t i = 0; i < 8; i++) { + if (!ld->io_len[i]) + continue; + + io_addr = (ld->regs[0x60 + (2 * i)] << 8) | ld->regs[0x61 + (2 * i)]; + + io_removehandler(io_addr, ld->io_len[i], isapnp_read_rangecheck, NULL, NULL, NULL, NULL, NULL, ld); + } +} + +static void +isapnp_ld_io_set(isapnp_device_t *ld) +{ + uint16_t io_addr; + + for (uint8_t i = 0; i < 8; i++) { + if (!ld->io_len[i]) + continue; + + io_addr = (ld->regs[0x60 + (2 * i)] << 8) | ld->regs[0x61 + (2 * i)]; + int ior = !(ld->regs[0x30] & 0x01) && (ld->regs[0x31] & 0x02); + + if (ior) + io_sethandler(io_addr, ld->io_len[i], isapnp_read_rangecheck, NULL, NULL, NULL, NULL, NULL, ld); } } static void isapnp_write_common(isapnp_t *dev, isapnp_card_t *card, isapnp_device_t *ld, uint8_t reg, uint8_t val) { - uint16_t io_addr; uint16_t reset_cards = 0; isapnp_log("ISAPnP: write_common(%02X, %02X)\n", reg, val); @@ -495,6 +553,7 @@ isapnp_write_common(isapnp_t *dev, isapnp_card_t *card, isapnp_device_t *ld, uin card->state = PNP_STATE_WAIT_FOR_KEY; card = card->next; } + dev->key_pos = 0; } if (val & 0x04) { isapnp_log("ISAPnP: Reset CSN\n"); @@ -515,8 +574,22 @@ isapnp_write_common(isapnp_t *dev, isapnp_card_t *card, isapnp_device_t *ld, uin if (card->csn == val) { card->rom_pos = 0; card->id_checksum = isapnp_init_key[0]; - if (card->state == PNP_STATE_SLEEP) + if (card->state == PNP_STATE_SLEEP) { card->state = (val == 0) ? PNP_STATE_ISOLATION : PNP_STATE_CONFIG; + + if (!card->multiple_lds) { + ld = card->first_ld; + while (ld) { + if (ld->number == 0x00) { + isapnp_log("ISAPnP: Select CSN %02X device 00\n", card->csn); + dev->current_ld_card = card; + dev->current_ld = ld; + break; + } + ld = ld->next; + } + } + } } else card->state = PNP_STATE_SLEEP; @@ -537,56 +610,47 @@ isapnp_write_common(isapnp_t *dev, isapnp_card_t *card, isapnp_device_t *ld, uin break; case 0x07: /* Logical Device Number */ - CHECK_CURRENT_CARD(); + if (card->multiple_lds) { + CHECK_CURRENT_CARD(); - card->ld = val; - ld = card->first_ld; - while (ld) { - if (ld->number == val) { - isapnp_log("ISAPnP: Select CSN %02X device %02X\n", card->csn, val); - dev->current_ld_card = card; - dev->current_ld = ld; - break; + card->ld = val; + ld = card->first_ld; + while (ld) { + if (ld->number == val) { + isapnp_log("ISAPnP: Select CSN %02X device %02X\n", card->csn, val); + dev->current_ld_card = card; + dev->current_ld = ld; + break; + } + ld = ld->next; } - ld = ld->next; - } - if (!ld) { - isapnp_log("ISAPnP: CSN %02X has no device %02X, creating one\n", card->csn, val); - dev->current_ld_card = card; - dev->current_ld = isapnp_create_ld(card); - dev->current_ld->number = val; + if (!ld) { + isapnp_log("ISAPnP: CSN %02X has no device %02X, creating one\n", card->csn, val); + dev->current_ld_card = card; + dev->current_ld = isapnp_create_ld(card); + dev->current_ld->number = val; + } } - break; case 0x30: /* Activate */ - CHECK_CURRENT_LD(); - - isapnp_log("ISAPnP: %sctivate CSN %02X device %02X\n", (val & 0x01) ? "A" : "Dea", card->csn, ld->number); - - ld->regs[reg] = val & 0x01; - isapnp_device_config_changed(card, ld); - - break; - case 0x31: /* I/O Range Check */ CHECK_CURRENT_LD(); - for (uint8_t i = 0; i < 8; i++) { - if (!ld->io_len[i]) - continue; + isapnp_log("ISAPnP: %sctivate CSN %02X device %02X\n", (ld->regs[0x30] & 0x01) ? "A" : "Dea", + card->csn, ld->number); - io_addr = (ld->regs[0x60 + (2 * i)] << 8) | ld->regs[0x61 + (2 * i)]; - if (ld->regs[reg] & 0x02) - io_removehandler(io_addr, ld->io_len[i], isapnp_read_rangecheck, NULL, NULL, NULL, NULL, NULL, ld); - if (val & 0x02) - io_sethandler(io_addr, ld->io_len[i], isapnp_read_rangecheck, NULL, NULL, NULL, NULL, NULL, ld); - } + isapnp_ld_io_remove(ld); + + if (reg == 0x30) + ld->regs[reg] = val & 0x01; + else + ld->regs[reg] = val & 0x03; + + isapnp_ld_io_set(ld); - ld->regs[reg] = val & 0x03; isapnp_device_config_changed(card, ld); - break; case 0x20 ... 0x2f: @@ -603,6 +667,7 @@ vendor_defined: default: if (reg >= 0x40) { + CHECK_CURRENT_CARD(); CHECK_CURRENT_LD(); isapnp_log("ISAPnP: Write %02X to register %02X on CSN %02X device %02X\n", val, reg, card->csn, ld->number); @@ -651,7 +716,9 @@ vendor_defined: break; } + isapnp_ld_io_remove(ld); ld->regs[reg] = val; + isapnp_ld_io_set(ld); isapnp_device_config_changed(card, ld); } break; @@ -672,7 +739,8 @@ isapnp_write_data(UNUSED(uint16_t addr), uint8_t val, void *priv) } } - isapnp_log("ISAPnP: write_data(%02X) => ", val); + // isapnp_log("ISAPnP: write_data(%02X) => ", val); + isapnp_log("[%04X:%08X] ISAPnP: write_data(%02X) => ", CS, cpu_state.pc, val); isapnp_write_common(dev, card, dev->current_ld, dev->reg, val); } @@ -731,11 +799,13 @@ isapnp_add_card(uint8_t *rom, uint16_t rom_size, isapnp_card_t *card = (isapnp_card_t *) calloc(1, sizeof(isapnp_card_t)); card->enable = 1; + card->normal = 1; card->priv = priv; card->config_changed = config_changed; card->csn_changed = csn_changed; card->read_vendor_reg = read_vendor_reg; card->write_vendor_reg = write_vendor_reg; + card->multiple_lds = 1; if (!dev->first_card) { dev->first_card = card; @@ -815,22 +885,22 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size) isapnp_log("ISAPnP: >>%s Memory range %d with %d bytes at %06X-%06X to %06X-%06X, align %d", /* %s */ in_df ? ">" : "", /* %d */ mem_range, - /* %d */ *((uint16_t *) &card->rom[i + 8]), - /* %06X */ *((uint16_t *) &card->rom[i + 4]) << 8, + /* %d */ AS_U16(card->rom[i + 8]), + /* %06X */ AS_U16(card->rom[i + 4]) << 8, /* %06X */ ((card->rom[i + 3] & 0x4) ? /* High address. */ - (*((uint16_t *) &card->rom[i + 10]) << 8) : + (AS_U16(card->rom[i + 10]) << 8) : /* Range. */ - (*((uint16_t *) &card->rom[i + 4]) << 8)) + - (*((uint16_t *) &card->rom[i + 10]) << 8), - /* %06X */ *((uint16_t *) &card->rom[i + 6]) << 8, + (AS_U16(card->rom[i + 4]) << 8)) + + (AS_U16(card->rom[i + 10]) << 8), + /* %06X */ AS_U16(card->rom[i + 6]) << 8, /* %06X */ ((card->rom[i + 3] & 0x4) ? /* High address. */ - (*((uint16_t *) &card->rom[i + 10]) << 8) : + (AS_U16(card->rom[i + 10]) << 8) : /* Range. */ - (*((uint16_t *) &card->rom[i + 6]) << 8)) + - (*((uint16_t *) &card->rom[i + 10]) << 8), - /* %d */ *((uint16_t *) &card->rom[i + 8])); + (AS_U16(card->rom[i + 6]) << 8)) + + (AS_U16(card->rom[i + 10]) << 8), + /* %d */ AS_U16(card->rom[i + 8])); res = 1 << mem_range; mem_range++; } else { @@ -847,22 +917,22 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size) isapnp_log("ISAPnP: >>%s 32-bit memory range %d with %d bytes at %08X-%08X, align %d", /* %s */ in_df ? ">" : "", /* %d */ mem_range_32, - /* %d */ *((uint32_t *) &card->rom[i + 12]), - /* %08X */ *((uint32_t *) &card->rom[i + 4]), + /* %d */ AS_U32(card->rom[i + 12]), + /* %08X */ AS_U32(card->rom[i + 4]), /* %08X */ ((card->rom[i + 3] & 0x4) ? /* High address. */ - *((uint32_t *) &card->rom[i + 16]) : + AS_U32(card->rom[i + 16]) : /* Range. */ - *((uint32_t *) &card->rom[i + 4])) + - *((uint32_t *) &card->rom[i + 16]), - /* %08X */ *((uint32_t *) &card->rom[i + 8]), + AS_U32(card->rom[i + 4])) + + AS_U32(card->rom[i + 16]), + /* %08X */ AS_U32(card->rom[i + 8]), /* %08X */ ((card->rom[i + 3] & 0x4) ? /* High address. */ - *((uint32_t *) &card->rom[i + 16]) : + AS_U32(card->rom[i + 16]) : /* Range. */ - *((uint32_t *) &card->rom[i + 8])) + - *((uint32_t *) &card->rom[i + 16]), - /* %d */ *((uint32_t *) &card->rom[i + 12])); + AS_U32(card->rom[i + 8])) + + AS_U32(card->rom[i + 16]), + /* %d */ AS_U32(card->rom[i + 12])); res = 1 << (4 + mem_range_32); mem_range_32++; } @@ -972,7 +1042,7 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size) else /* specific */ res = card->rom[i + 3] & 0x0f; - isapnp_log("ISAPnP: >>%s IRQ index %d with mask %04X, types %01X\n", in_df ? ">" : "", irq, *((uint16_t *) &card->rom[i + 1]), res); + isapnp_log("ISAPnP: >>%s IRQ index %d with mask %04X, types %01X\n", in_df ? ">" : "", irq, AS_U16(card->rom[i + 1]), res); ld->irq_types &= ~(0x0f << (4 * irq)); ld->irq_types |= res << (4 * irq); @@ -1038,7 +1108,7 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size) break; } - isapnp_log("ISAPnP: >>%s I/O range %d with %d ports at %04X-%04X, align %d, %d-bit decode\n", in_df ? ">" : "", io, card->rom[i + 7], *((uint16_t *) &card->rom[i + 2]), *((uint16_t *) &card->rom[i + 4]), card->rom[i + 6], (card->rom[i + 1] & 0x01) ? 16 : 10); + isapnp_log("ISAPnP: >>%s I/O range %d with %d ports at %04X-%04X, align %d, %d-bit decode\n", in_df ? ">" : "", io, card->rom[i + 7], AS_U16(card->rom[i + 2]), AS_U16(card->rom[i + 4]), card->rom[i + 6], (card->rom[i + 1] & 0x01) ? 16 : 10); if (card->rom[i + 1] & 0x01) ld->io_16bit |= 1 << io; @@ -1063,7 +1133,7 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size) break; } - isapnp_log("ISAPnP: >>%s Fixed I/O range %d with %d ports at %04X\n", in_df ? ">" : "", io, card->rom[i + 3], *((uint16_t *) &card->rom[i + 1])); + isapnp_log("ISAPnP: >>%s Fixed I/O range %d with %d ports at %04X\n", in_df ? ">" : "", io, card->rom[i + 3], AS_U16(card->rom[i + 1])); /* Fixed I/O port ranges of this kind are always 10-bit. */ ld->io_16bit &= ~(1 << io); @@ -1117,6 +1187,8 @@ 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; + if (enable == ISAPNP_CARD_FORCE_SLEEP) + card->state = PNP_STATE_SLEEP; int old_enable = card->enable; card->enable = enable; @@ -1163,6 +1235,63 @@ isapnp_read_reg(void *priv, uint8_t ldn, uint8_t reg) return isapnp_read_common(device_get_priv(&isapnp_device), card, ld, reg); } +void +isapnp_set_rt(void *priv, uint8_t is_rt) +{ + isapnp_card_t *card = (isapnp_card_t *) priv; + + card->is_rt = is_rt; +} + +void +isapnp_set_normal(void *priv, uint8_t normal) +{ + isapnp_card_t *card = (isapnp_card_t *) priv; + + card->normal = normal; +} + +void +isapnp_activate(void *priv, uint16_t base, uint8_t irq, int active) +{ + isapnp_card_t *card = (isapnp_card_t *) priv; + isapnp_device_t *ld = card->first_ld; + + while (ld) { + if (ld->number == 0x00) + break; + ld = ld->next; + } + + if (ld != NULL) { + ld->defs[0x30] = active; + ld->defs[0x60] = base >> 8; + if (!(ld->io_16bit & (1 << ((0x60 >> 1) & 0x07)))) + ld->defs[0x60] &= 0x03; + ld->defs[0x61] = base & 0xff; + ld->defs[0x70] = irq; + + isapnp_reset_ld_regs(ld); + } +} + +void +isapnp_set_single_ld(void *priv) +{ + isapnp_card_t *card = (isapnp_card_t *) priv; + + card->multiple_lds = 0; + card->ld = 0x00; +} + +uint8_t * +isapnp_get_csnsav(void *priv) +{ + isapnp_card_t *card = (isapnp_card_t *) priv; + + return &card->csnsav; +} + void isapnp_write_reg(void *priv, uint8_t ldn, uint8_t reg, uint8_t val) { diff --git a/src/device/isartc.c b/src/device/isartc.c index 664793db3..06b7767c8 100644 --- a/src/device/isartc.c +++ b/src/device/isartc.c @@ -26,8 +26,6 @@ * NOTE: The IRQ functionalities have been implemented, but not yet * tested, as I need to write test software for them first :) * - * - * * Authors: Fred N. van Kempen, * * Copyright 2018 Fred N. van Kempen. @@ -523,7 +521,7 @@ isartc_init(const device_t *info) { rtcdev_t *dev; int is_at = IS_AT(machine); - is_at = is_at || !strcmp(machine_get_internal_name(), "xi8088"); + is_at = is_at || (machines[machine].init == machine_xt_xi8088_init); /* Create a device instance. */ dev = (rtcdev_t *) calloc(1, sizeof(rtcdev_t)); diff --git a/src/device/kbc_at.c b/src/device/kbc_at.c index 186804e22..0f3bd5600 100644 --- a/src/device/kbc_at.c +++ b/src/device/kbc_at.c @@ -806,15 +806,15 @@ write_p2(atkbc_t *dev, uint8_t val) cpu_set_edx(); flushmmucache(); if ((kbc_ven == KBC_VEN_ALI) || - !strcmp(machine_get_internal_name(), "spc7700plw") || - !strcmp(machine_get_internal_name(), "pl4600c")) + (machines[machine].init == machine_at_spc7700plw_init) || + (machines[machine].init == machine_at_pl4600c_init)) smbase = 0x00030000; /* Yes, this is a hack, but until someone gets ahold of the real PCD-2L and can find out what they actually did to make it boot from FFFFF0 correctly despite A20 being gated when the CPU is reset, this will have to do. */ - if ((kbc_ven == KBC_VEN_SIEMENS) || !strcmp(machine_get_internal_name(), "acera1g")) + if ((kbc_ven == KBC_VEN_SIEMENS) || (machines[machine].init == machine_at_acera1g_init)) is486 ? loadcs(0xf000) : loadcs_2386(0xf000); } } @@ -1187,7 +1187,7 @@ write_cmd_ami(void *priv, uint8_t val) kbc_at_log("ATkbc: set KBC lines P22-P23 (P2 bits 2-3) low\n"); if (!(dev->flags & DEVICE_PCI)) write_p2(dev, dev->p2 & ~(4 << (val & 0x01))); - if (strstr(machine_get_internal_name(), "sb486pv") != NULL) + if (machines[machine].init == machine_at_sb486pv_init) kbc_delay_to_ob(dev, 0x03, 0, 0x00); else kbc_delay_to_ob(dev, dev->ob, 0, 0x00); @@ -2627,7 +2627,7 @@ kbc_at_process_cmd(void *priv) if (dev->ib == 0xbb) break; - if (strstr(machine_get_internal_name(), "pb41") != NULL) + if (machines[machine].init == machine_at_pb410a_init) cpu_override_dynarec = 1; if (dev->misc_flags & FLAG_PS2) { @@ -2759,7 +2759,7 @@ kbc_at_port_1_read(uint16_t port, void *priv) */ if (!(dev->misc_flags & FLAG_PS2) && (dev->irq[0] != 0xffff)) picintclevel(1 << dev->irq[0], &dev->irq_state); - if ((strstr(machine_get_internal_name(), "pb41") != NULL) && (cpu_override_dynarec == 1)) + if ((machines[machine].init == machine_at_pb410a_init) && (cpu_override_dynarec == 1)) cpu_override_dynarec = 0; kbc_at_log("ATkbc: [%04X:%08X] read (%04X) = %02X\n", CS, cpu_state.pc, port, ret); diff --git a/src/device/kbc_xt.c b/src/device/kbc_xt.c index 176f1df43..a9fa8bf6c 100644 --- a/src/device/kbc_xt.c +++ b/src/device/kbc_xt.c @@ -8,8 +8,6 @@ * * Implementation of the XT-style keyboard. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, diff --git a/src/device/keyboard.c b/src/device/keyboard.c index 524593eb7..7806418dd 100644 --- a/src/device/keyboard.c +++ b/src/device/keyboard.c @@ -8,8 +8,6 @@ * * General keyboard driver interface. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, diff --git a/src/device/keyboard_xt.c b/src/device/keyboard_xt.c index 2936868b0..d31d5f027 100644 --- a/src/device/keyboard_xt.c +++ b/src/device/keyboard_xt.c @@ -8,8 +8,6 @@ * * Implementation of the XT-style keyboard. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, diff --git a/src/device/mouse.c b/src/device/mouse.c index fb7fd020f..eb7557faf 100644 --- a/src/device/mouse.c +++ b/src/device/mouse.c @@ -11,8 +11,6 @@ * TODO: Add the Genius bus- and serial mouse. * Remove the '3-button' flag from mouse types. * - * - * * Authors: Miran Grca, * Fred N. van Kempen, * diff --git a/src/device/mouse_bus.c b/src/device/mouse_bus.c index dd71ef11e..cd54f981a 100644 --- a/src/device/mouse_bus.c +++ b/src/device/mouse_bus.c @@ -57,8 +57,6 @@ * Microsoft Windows NT 3.1 * Microsoft Windows 98 SE * - * - * * Authors: Miran Grca, * Fred N. van Kempen, * diff --git a/src/device/mouse_microtouch_touchscreen.c b/src/device/mouse_microtouch_touchscreen.c index 512fcc0df..4c4f46708 100644 --- a/src/device/mouse_microtouch_touchscreen.c +++ b/src/device/mouse_microtouch_touchscreen.c @@ -8,8 +8,6 @@ * * 3M MicroTouch Serial emulation. * - * - * * Authors: Cacodemon345, mourix * * Copyright 2024 Cacodemon345 diff --git a/src/device/nec_mate_unk.c b/src/device/nec_mate_unk.c index c0393eaa2..c4a697bd8 100644 --- a/src/device/nec_mate_unk.c +++ b/src/device/nec_mate_unk.c @@ -8,8 +8,6 @@ * * Implementation of the NEC Mate NX MA30D/23D Unknown Readout. * - * - * * Authors: Miran Grca, * * Copyright 2020-2023 Miran Grca. diff --git a/src/device/novell_cardkey.c b/src/device/novell_cardkey.c index edc32b879..0b1045777 100644 --- a/src/device/novell_cardkey.c +++ b/src/device/novell_cardkey.c @@ -9,12 +9,10 @@ * Implementation of the Novell NetWare 2.x Key Card, which * was used for anti-piracy protection. * - * * Authors: Cacodemon345 * * Copyright 2024 Cacodemon345. */ - #include #include #include diff --git a/src/device/pci_bridge.c b/src/device/pci_bridge.c index bf49baf14..d9aeeffb6 100644 --- a/src/device/pci_bridge.c +++ b/src/device/pci_bridge.c @@ -8,13 +8,10 @@ * * Implementation of PCI-PCI and host-AGP bridges. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. */ - #include #include #include diff --git a/src/device/phoenix_486_jumper.c b/src/device/phoenix_486_jumper.c index a3e2f0e7e..ed4349082 100644 --- a/src/device/phoenix_486_jumper.c +++ b/src/device/phoenix_486_jumper.c @@ -8,8 +8,6 @@ * * Implementation of the Phoenix 486 Jumper Readout. * - * - * * Authors: Miran Grca, * Tiseno100, * @@ -42,6 +40,18 @@ Bit 0 = ????. */ +/* + PB600 bit meanings: + Bit 7 = ???? (if 1 BIOS throws beep codes and won't POST) + Bit 6 = Super I/O chip: 1 = disabled, 0 = enabled + Bit 5 = ???? + Bit 4 = ???? + Bit 3 = ???? + Bit 2 = ???? + Bit 1 = Quick Boot: 1 = normal boot, 0 = quick boot/skip POST + Bit 0 = ???? +*/ + typedef struct phoenix_486_jumper_t { uint8_t type; uint8_t jumper; @@ -72,6 +82,8 @@ phoenix_486_jumper_write(UNUSED(uint16_t addr), uint8_t val, void *priv) phoenix_486_jumper_log("Phoenix 486 Jumper: Write %02x\n", val); if (dev->type == 1) dev->jumper = val & 0xbf; + else if (dev->type == 2) /* PB600 */ + dev->jumper = ((val & 0xbf) | 0x02); else dev->jumper = val; } @@ -92,6 +104,8 @@ phoenix_486_jumper_reset(void *priv) if (dev->type == 1) dev->jumper = 0x00; + else if (dev->type == 2) /* PB600 */ + dev->jumper = 0x02; else { dev->jumper = 0x9f; if (gfxcard[0] != 0x01) @@ -148,3 +162,17 @@ const device_t phoenix_486_jumper_pci_device = { .force_redraw = NULL, .config = NULL }; + +const device_t phoenix_486_jumper_pci_pb600_device = { + .name = "Phoenix 486 Jumper Readout (PB600)", + .internal_name = "phoenix_486_jumper_pci_pb600", + .flags = 0, + .local = 2, + .init = phoenix_486_jumper_init, + .close = phoenix_486_jumper_close, + .reset = phoenix_486_jumper_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/device/postcard.c b/src/device/postcard.c index ec031c2b8..908adfe72 100644 --- a/src/device/postcard.c +++ b/src/device/postcard.c @@ -8,8 +8,6 @@ * * Implementation of a port 80h POST diagnostic card. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. diff --git a/src/device/serial.c b/src/device/serial.c index ad9abfe5d..63f20cbee 100644 --- a/src/device/serial.c +++ b/src/device/serial.c @@ -10,8 +10,6 @@ * * Now passes all the AMIDIAG tests. * - * - * * Authors: Miran Grca, * Fred N. van Kempen, * diff --git a/src/device/serial_passthrough.c b/src/device/serial_passthrough.c index 249380b4f..6cf273fd1 100644 --- a/src/device/serial_passthrough.c +++ b/src/device/serial_passthrough.c @@ -8,14 +8,12 @@ * * Implementation of Serial passthrough device. * - * * Authors: Andreas J. Reichel , * Jasmine Iwanek * * Copyright 2021 Andreas J. Reichel. * Copyright 2021-2025 Jasmine Iwanek. */ - #include #include #include diff --git a/src/device/smbus_piix4.c b/src/device/smbus_piix4.c index ae37c72c4..ae263b484 100644 --- a/src/device/smbus_piix4.c +++ b/src/device/smbus_piix4.c @@ -8,8 +8,6 @@ * * Implementation of a generic PIIX4-compatible SMBus host controller. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. diff --git a/src/device/unittester.c b/src/device/unittester.c index 0e864aa0b..48486efce 100644 --- a/src/device/unittester.c +++ b/src/device/unittester.c @@ -11,8 +11,6 @@ * If modifying the protocol, you MUST modify the specification * and increment the version number. * - * - * * Authors: GreaseMonkey, * * Copyright 2024 GreaseMonkey. diff --git a/src/device/vfio.c b/src/device/vfio.c new file mode 100644 index 000000000..b5fc077b8 --- /dev/null +++ b/src/device/vfio.c @@ -0,0 +1,3377 @@ +/* + * 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. + * + * Virtual Function I/O PCI passthrough handler. + * + * Authors: RichardG, + * + * Copyright 2021-2025 RichardG. + */ +#define _FILE_OFFSET_BITS 64 +#define _LARGEFILE64_SOURCE 1 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include "cpu.h" +#include <86box/86box.h> +#include <86box/ini.h> +#include <86box/config.h> +#include <86box/device.h> +#include <86box/i2c.h> /* log2i */ +#include <86box/io.h> +#include <86box/mem.h> +#include <86box/path.h> +#include <86box/pci.h> +#include <86box/plat.h> +#include <86box/thread.h> +#include <86box/timer.h> +#include <86box/video.h> + +/* Just so we don't have to include Linux's pci.h, which + has some defines that conflict with our own pci.h */ +#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) +#define PCI_FUNC(devfn) ((devfn) & 0x07) + +enum { + NVIDIA_3D0_NONE = 0, + NVIDIA_3D0_SELECT, + NVIDIA_3D0_WINDOW, + NVIDIA_3D0_READ, + NVIDIA_3D0_WRITE +}; + +typedef struct { + int fd; + uint64_t precalc_offset; + uint64_t offset; + uint64_t size; + uint32_t emulated_offset; + uint8_t *mmap_base; + uint8_t *mmap_precalc; + uint8_t type; + uint8_t bar_id; + uint8_t read : 1; + uint8_t write : 1; + mem_mapping_t mem_mapping; + char name[20]; + struct _vfio_device_ *dev; + + struct { + mem_mapping_t mem_mappings[2]; + + struct { + uint32_t offset; + } iomirror; + + struct { + uint32_t offset; + } configmirror; + + struct { + struct { + uint32_t start; + uint32_t end; + } offset[2]; + uint32_t index; + } configwindow; + } quirks; +} vfio_region_t; + +typedef struct { + struct _vfio_device_ *dev; + int fd; + int type; + int vector; + uint16_t msix_offset; +} vfio_irq_t; + +typedef struct _vfio_device_ { + int fd; + uint8_t mem_enabled : 1; + uint8_t io_enabled : 1; + uint8_t rom_enabled : 1; + uint8_t can_reset : 1; + uint8_t can_flr_reset : 1; + uint8_t can_pm_reset : 1; + uint8_t can_hot_reset : 1; + uint8_t slot; + uint8_t bar_count; + uint8_t pm_cap; + uint8_t msi_cap; + uint8_t msix_cap; + uint8_t pcie_cap; + uint8_t af_cap; + char *name; + char *rom_fn; + + vfio_region_t bars[6]; + vfio_region_t rom; + vfio_region_t config; + vfio_region_t vga_io_lo; + vfio_region_t vga_io_hi; + vfio_region_t vga_mem; + + struct { + uint8_t type; + int vector_count; + vfio_irq_t *vectors; + + struct { + int raised; + uint8_t pin; + uint8_t state; + } intx; + struct { + uint32_t address; + uint32_t address_upper; + uint32_t pending; + uint32_t mask; + uint16_t ctl; + uint16_t data; + uint16_t vector_enable_mask; + uint8_t vector_count; + uint8_t vector_enable_count; + } msi; + struct { + mem_mapping_t table_mapping; + mem_mapping_t pba_mapping; + uint32_t table_offset; + uint32_t pba_offset; + uint32_t table_offset_precalc; + uint32_t pba_offset_precalc; + uint16_t ctl; + uint16_t vector_count; + uint16_t table_size; + uint16_t pba_size; + uint8_t table_bar; + uint8_t pba_bar; + uint8_t *table; + uint8_t *pba; + } msix; + } irq; + + struct { + union { + struct { + vfio_region_t *bar; + } ati3c3; + + struct { + uint64_t master_enable; + uint8_t bar_enable; + } nvidiabar5; + + struct { + uint32_t index; + uint8_t state; + } nvidia3d0; + }; + } quirks; + + struct _vfio_device_ *next; +} vfio_device_t; + +typedef struct _vfio_group_ { + int id; + int fd; + + vfio_device_t *first_device; + vfio_device_t *current_device; + + struct _vfio_group_ *next; +} vfio_group_t; + +static video_timings_t timing_default = { VIDEO_PCI, 8, 16, 32, 8, 16, 32 }; +static int container_fd = -1; +static int epoll_fd = -1; +static int irq_thread_wake_fd = -1; +static int closing = 0; +static int intx_high = 0; +static int timing_readb = 0; +static int timing_readw = 0; +static int timing_readl = 0; +static int timing_writeb = 0; +static int timing_writew = 0; +static int timing_writel = 0; +static vfio_group_t *first_group = NULL; +static vfio_group_t *current_group; +static thread_t *irq_thread; +static event_t *irq_event; +static event_t *irq_thread_resume; +static pc_timer_t irq_timer; +static vfio_irq_t *current_irq = NULL; +static const device_t vfio_device; + +#define ENABLE_VFIO_LOG 2 +#ifdef ENABLE_VFIO_LOG +int vfio_do_log = ENABLE_VFIO_LOG; + +static void +vfio_log(const char *fmt, ...) +{ + va_list ap; + + if (vfio_do_log) { + va_start(ap, fmt); + pclog_ex(fmt, ap); + va_end(ap); + } +} + +# if ENABLE_VFIO_LOG == 2 +# define vfio_log_op vfio_log +# else +# define vfio_log_op(fmt, ...) +# endif +#else +# define vfio_log(fmt, ...) +# define vfio_log_op(fmt, ...) +#endif + +static uint8_t vfio_bar_gettype(vfio_device_t *dev, vfio_region_t *bar); +static uint8_t vfio_config_readb(int func, int addr, void *priv); +static uint16_t vfio_config_readw(int func, int addr, void *priv); +static uint32_t vfio_config_readl(int func, int addr, void *priv); +static void vfio_config_writeb(int func, int addr, uint8_t val, void *priv); +static void vfio_config_writew(int func, int addr, uint16_t val, void *priv); +static void vfio_config_writel(int func, int addr, uint32_t val, void *priv); +static void vfio_irq_intx_setpin(vfio_device_t *dev); +static void vfio_irq_msi_disable(vfio_device_t *dev); +static void vfio_irq_msix_disable(vfio_device_t *dev); +static void vfio_irq_msix_updatemask(vfio_device_t *dev, uint16_t offset); +static void vfio_irq_enable(vfio_device_t *dev, int type); + +#define VFIO_RW(space, length_char, addr_type, addr_slength, val_type, val_slength) \ + static val_type \ + vfio_##space##_read##length_char##_fd(addr_type addr, void *priv) \ + { \ + register vfio_region_t *region = (vfio_region_t *) priv; \ + val_type ret; \ + if (pread(region->fd, &ret, sizeof(ret), region->precalc_offset + addr) != sizeof(ret)) \ + ret = -1; \ + vfio_log_op("[%04X:%08X] VFIO: " #space "_read" #length_char "_fd(%0" #addr_slength "X) = %0" #val_slength "X\n", CS, cpu_state.pc, addr, ret); \ + cycles -= timing_read##length_char; \ + intx_high = 0; \ + return ret; \ + } \ + \ + static void \ + vfio_##space##_write##length_char##_fd(addr_type addr, val_type val, void *priv) \ + { \ + register vfio_region_t *region = (vfio_region_t *) priv; \ + vfio_log_op("[%04X:%08X] VFIO: " #space "_write" #length_char "_fd(%0" #addr_slength "X, %0" #val_slength "X)\n", CS, cpu_state.pc, addr, val); \ + (void) !pwrite(region->fd, &val, sizeof(val), region->precalc_offset + addr); \ + cycles -= timing_write##length_char; \ + intx_high = 0; \ + } \ + \ + static val_type \ + vfio_##space##_read##length_char##_mm(addr_type addr, void *priv) \ + { \ + register val_type ret = *((val_type *) &((uint8_t *) priv)[addr]); \ + vfio_log_op("[%04X:%08X] VFIO: " #space "_read" #length_char "_mm(%0" #addr_slength "X) = %0" #val_slength "X\n", CS, cpu_state.pc, addr, ret); \ + cycles -= timing_read##length_char; \ + intx_high = 0; \ + return ret; \ + } \ + \ + static void \ + vfio_##space##_write##length_char##_mm(addr_type addr, val_type val, void *priv) \ + { \ + vfio_log_op("[%04X:%08X] VFIO: " #space "_write" #length_char "_mm(%0" #addr_slength "X, %0" #val_slength "X)\n", CS, cpu_state.pc, addr, val); \ + *((val_type *) &((uint8_t *) priv)[addr]) = val; \ + cycles -= timing_write##length_char; \ + intx_high = 0; \ + } + +VFIO_RW(mem, b, uint32_t, 8, uint8_t, 2) +VFIO_RW(mem, w, uint32_t, 8, uint16_t, 4) +VFIO_RW(mem, l, uint32_t, 8, uint32_t, 8) +VFIO_RW(io, b, uint16_t, 4, uint8_t, 2) +VFIO_RW(io, w, uint16_t, 4, uint16_t, 4) +VFIO_RW(io, l, uint16_t, 4, uint32_t, 8) + +static void +vfio_quirk_capture_io(vfio_device_t *dev, vfio_region_t *bar, + uint16_t base, uint16_t size, uint8_t enable, + uint8_t (*inb)(uint16_t addr, void *priv), + uint16_t (*inw)(uint16_t addr, void *priv), + uint32_t (*inl)(uint16_t addr, void *priv), + void (*outb)(uint16_t addr, uint8_t val, void *priv), + void (*outw)(uint16_t addr, uint16_t val, void *priv), + void (*outl)(uint16_t addr, uint32_t val, void *priv)) +{ + /* Remove quirk handler from port range. */ + io_removehandler(base, size, + bar->read ? inb : NULL, + bar->read ? inw : NULL, + bar->read ? inl : NULL, + bar->write ? outb : NULL, + bar->write ? outw : NULL, + bar->write ? outl : NULL, + dev ? ((void *) dev) : ((void *) bar)); + + if (enable) { + /* Remove existing handler from port range. */ + if (bar->mmap_base) /* mmap available */ + io_removehandler(base, size, + bar->read ? vfio_io_readb_mm : NULL, + bar->read ? vfio_io_readw_mm : NULL, + bar->read ? vfio_io_readl_mm : NULL, + bar->write ? vfio_io_writeb_mm : NULL, + bar->write ? vfio_io_writew_mm : NULL, + bar->write ? vfio_io_writel_mm : NULL, + bar->mmap_precalc); + else /* mmap not available */ + io_removehandler(base, size, + bar->read ? vfio_io_readb_fd : NULL, + bar->read ? vfio_io_readw_fd : NULL, + bar->read ? vfio_io_readl_fd : NULL, + bar->write ? vfio_io_writeb_fd : NULL, + bar->write ? vfio_io_writew_fd : NULL, + bar->write ? vfio_io_writel_fd : NULL, + bar); + + /* Add quirk handler to port range. */ + io_sethandler(base, size, + bar->read ? inb : NULL, + bar->read ? inw : NULL, + bar->read ? inl : NULL, + bar->write ? outb : NULL, + bar->write ? outw : NULL, + bar->write ? outl : NULL, + dev ? ((void *) dev) : ((void *) bar)); + } +} + +static uint8_t +vfio_quirk_configmirror_readb(uint32_t addr, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + vfio_device_t *dev = bar->dev; + + /* Cascade to the main handler. */ + vfio_mem_readb_fd(addr, bar); + + /* Read configuration register. */ + uint8_t ret = vfio_config_readb(0, addr - bar->quirks.configmirror.offset, dev); + vfio_log_op("VFIO %s: Config mirror: Read %02X from index %02X\n", + dev->name, ret, addr - bar->quirks.configmirror.offset); + + return ret; +} + +static uint16_t +vfio_quirk_configmirror_readw(uint32_t addr, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + vfio_device_t *dev = bar->dev; + + /* Cascade to the main handler. */ + vfio_mem_readw_fd(addr, bar); + + /* Read configuration register. */ + uint16_t ret = vfio_config_readw(0, addr - bar->quirks.configmirror.offset, dev); + vfio_log_op("VFIO %s: Config mirror: Read %04X from index %02X\n", + dev->name, ret, addr - bar->quirks.configmirror.offset); + + return ret; +} + +static uint32_t +vfio_quirk_configmirror_readl(uint32_t addr, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + vfio_device_t *dev = bar->dev; + + /* Cascade to the main handler. */ + vfio_mem_readl_fd(addr, bar); + + /* Read configuration register. */ + uint32_t ret = vfio_config_readl(0, addr - bar->quirks.configmirror.offset, dev); + vfio_log_op("VFIO %s: Config mirror: Read %08X from index %02X\n", + dev->name, ret, addr - bar->quirks.configmirror.offset); + + return ret; +} + +static void +vfio_quirk_configmirror_writeb(uint32_t addr, uint8_t val, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + vfio_device_t *dev = bar->dev; + + /* Write configuration register. */ + vfio_log_op("VFIO %s: Config mirror: Write %02X to index %02X\n", + dev->name, val, addr - bar->quirks.configmirror.offset); + vfio_config_writeb(0, addr - bar->quirks.configmirror.offset, val, dev); +} + +static void +vfio_quirk_configmirror_writew(uint32_t addr, uint16_t val, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + vfio_device_t *dev = bar->dev; + + /* Write configuration register. */ + vfio_log_op("VFIO %s: Config mirror: Write %04X to index %02X\n", + dev->name, val, addr - bar->quirks.configmirror.offset); + vfio_config_writew(0, addr - bar->quirks.configmirror.offset, val, dev); +} + +static void +vfio_quirk_configmirror_writel(uint32_t addr, uint32_t val, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + vfio_device_t *dev = bar->dev; + + /* Write configuration register. */ + vfio_log_op("VFIO %s: Config mirror: Write %08X to index %02X\n", + dev->name, val, addr - bar->quirks.configmirror.offset); + vfio_config_writel(0, addr - bar->quirks.configmirror.offset, val, dev); +} + +static void +vfio_quirk_configmirror(vfio_device_t *dev, vfio_region_t *bar, + uint32_t offset, uint8_t mapping_slot, uint8_t enable) +{ + /* Get the additional memory mapping structure. */ + mem_mapping_t *mapping = &bar->quirks.mem_mappings[mapping_slot]; + + vfio_log("VFIO %s: %sapping configuration space mirror for %s @ %08X\n", + dev->name, enable ? "M" : "Unm", bar->name, bar->emulated_offset + offset); + + /* Add mapping if it wasn't already added. + Being added after region setup, it should override the main BAR mapping. */ + if (!mapping->base) + mem_mapping_add(mapping, 0, 0, + vfio_quirk_configmirror_readb, + vfio_quirk_configmirror_readw, + vfio_quirk_configmirror_readl, + vfio_quirk_configmirror_writeb, + vfio_quirk_configmirror_writew, + vfio_quirk_configmirror_writel, + NULL, MEM_MAPPING_EXTERNAL, bar); + + /* Store start offset. */ + bar->quirks.configmirror.offset = bar->emulated_offset + offset; + + /* Enable or disable mapping. */ + if (enable) + mem_mapping_set_addr(mapping, bar->emulated_offset + offset, 256); + else + mem_mapping_disable(mapping); +} + +static void +vfio_quirk_configwindow_index_writeb(uint16_t addr, uint8_t val, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + vfio_device_t *dev = bar->dev; + + /* Write configuration register index. */ + vfio_log_op("VFIO %s: Config window: Write index[%d] %02X\n", + dev->name, addr & 3, val); + uint8_t offset = (addr & 3) << 3; + bar->quirks.configwindow.index &= ~(0x000000ff << offset); + bar->quirks.configwindow.index |= val << offset; + + /* Cascade to the main handler. */ + vfio_io_writeb_fd(addr, val, bar); +} + +static void +vfio_quirk_configwindow_index_writew(uint16_t addr, uint16_t val, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + vfio_device_t *dev = bar->dev; + + /* Write configuration register index. */ + vfio_log_op("VFIO %s: Config window: Write index[%d] %04X\n", + dev->name, addr & 2, val); + uint8_t offset = (addr & 2) << 3; + bar->quirks.configwindow.index &= ~(0x0000ffff << offset); + bar->quirks.configwindow.index |= val << offset; + + /* Cascade to the main handler. */ + vfio_io_writew_fd(addr, val, bar); +} + +static void +vfio_quirk_configwindow_index_writel(uint16_t addr, uint32_t val, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + vfio_device_t *dev = bar->dev; + + /* Write configuration register index. */ + vfio_log_op("VFIO %s: Config window: Write index %08X\n", + dev->name, val); + bar->quirks.configwindow.index = val; + + /* Cascade to the main handler. */ + vfio_io_writel_fd(addr, val, bar); +} + +static uint8_t +vfio_quirk_configwindow_data_readb(uint16_t addr, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + vfio_device_t *dev = bar->dev; + + /* Cascade to the main handler. */ + uint8_t ret = vfio_io_readb_fd(addr, bar); + + /* Read configuration register if part of the main PCI configuration space. */ + uint32_t index = bar->quirks.configwindow.index; + if ((index >= bar->quirks.configwindow.offset[0].start) && (index <= bar->quirks.configwindow.offset[0].end)) { + ret = vfio_config_readb(0, index - bar->quirks.configwindow.offset[0].start, dev); + vfio_log_op("VFIO %s: Config window: Read %02X from primary index %08X\n", + dev->name, ret, index); + } else if ((index >= bar->quirks.configwindow.offset[1].start) && (index <= bar->quirks.configwindow.offset[1].end)) { + ret = vfio_config_readb(0, index - bar->quirks.configwindow.offset[1].start, dev); + vfio_log_op("VFIO %s: Config window: Read %02X from secondary index %08X\n", + dev->name, ret, index); + } + + return ret; +} + +static uint16_t +vfio_quirk_configwindow_data_readw(uint16_t addr, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + vfio_device_t *dev = bar->dev; + + /* Cascade to the main handler. */ + uint16_t ret = vfio_io_readw_fd(addr, bar); + + /* Read configuration register if part of the main PCI configuration space. */ + uint32_t index = bar->quirks.configwindow.index; + if ((index >= bar->quirks.configwindow.offset[0].start) && (index <= bar->quirks.configwindow.offset[0].end)) { + ret = vfio_config_readw(0, index - bar->quirks.configwindow.offset[0].start, dev); + vfio_log_op("VFIO %s: Config window: Read %04X from primary index %08X\n", + dev->name, ret, index); + } else if ((index >= bar->quirks.configwindow.offset[1].start) && (index <= bar->quirks.configwindow.offset[1].end)) { + ret = vfio_config_readw(0, index - bar->quirks.configwindow.offset[1].start, dev); + vfio_log_op("VFIO %s: Config window: Read %04X from secondary index %08X\n", + dev->name, ret, index); + } + + return ret; +} + +static uint32_t +vfio_quirk_configwindow_data_readl(uint16_t addr, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + vfio_device_t *dev = bar->dev; + + /* Cascade to the main handler. */ + uint32_t ret = vfio_io_readl_fd(addr, bar); + + /* Read configuration register if part of the main PCI configuration space. */ + uint32_t index = bar->quirks.configwindow.index; + if ((index >= bar->quirks.configwindow.offset[0].start) && (index <= bar->quirks.configwindow.offset[0].end)) { + ret = vfio_config_readl(0, index - bar->quirks.configwindow.offset[0].start, dev); + vfio_log_op("VFIO %s: Config window: Read %08X from primary index %08X\n", + dev->name, ret, index); + } else if ((index >= bar->quirks.configwindow.offset[1].start) && (index <= bar->quirks.configwindow.offset[1].end)) { + ret = vfio_config_readl(0, index - bar->quirks.configwindow.offset[1].start, dev); + vfio_log_op("VFIO %s: Config window: Read %08X from secondary index %08X\n", + dev->name, ret, index); + } + + return ret; +} + +static void +vfio_quirk_configwindow_data_writeb(uint16_t addr, uint8_t val, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + vfio_device_t *dev = bar->dev; + + /* Write configuration register if part of the main PCI configuration space. */ + uint32_t index = bar->quirks.configwindow.index; + if ((index >= bar->quirks.configwindow.offset[0].start) && (index <= bar->quirks.configwindow.offset[0].end)) { + vfio_log_op("VFIO %s: Config window: Write %02X to primary index %08X\n", + dev->name, val, index); + vfio_config_writeb(0, index - bar->quirks.configwindow.offset[0].start, val, dev); + return; + } else if ((index >= bar->quirks.configwindow.offset[1].start) && (index <= bar->quirks.configwindow.offset[1].end)) { + vfio_log_op("VFIO %s: Config window: Write %02X to secondary index %08X\n", + dev->name, val, index); + vfio_config_writeb(0, index - bar->quirks.configwindow.offset[1].start, val, dev); + return; + } + + /* Cascade to the main handler. */ + vfio_io_writeb_fd(addr, val, bar); +} + +static void +vfio_quirk_configwindow_data_writew(uint16_t addr, uint16_t val, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + vfio_device_t *dev = bar->dev; + + /* Write configuration register if part of the main PCI configuration space. */ + uint32_t index = bar->quirks.configwindow.index; + if ((index >= bar->quirks.configwindow.offset[0].start) && (index <= bar->quirks.configwindow.offset[0].end)) { + vfio_log_op("VFIO %s: Config window: Write %04X to primary index %08X\n", + dev->name, val, index); + vfio_config_writew(0, index - bar->quirks.configwindow.offset[0].start, val, dev); + return; + } else if ((index >= bar->quirks.configwindow.offset[1].start) && (index <= bar->quirks.configwindow.offset[1].end)) { + vfio_log_op("VFIO %s: Config window: Write %04X to secondary index %08X\n", + dev->name, val, index); + vfio_config_writew(0, index - bar->quirks.configwindow.offset[1].start, val, dev); + return; + } + + /* Cascade to the main handler. */ + vfio_io_writew_fd(addr, val, bar); +} + +static void +vfio_quirk_configwindow_data_writel(uint16_t addr, uint32_t val, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + vfio_device_t *dev = bar->dev; + + /* Write configuration register if part of the main PCI configuration space. */ + uint32_t index = bar->quirks.configwindow.index; + if ((index >= bar->quirks.configwindow.offset[0].start) && (index <= bar->quirks.configwindow.offset[0].end)) { + vfio_log_op("VFIO %s: Config window: Write %08X to primary index %08X\n", + dev->name, val, index); + vfio_config_writel(0, index - bar->quirks.configwindow.offset[0].start, val, dev); + return; + } else if ((index >= bar->quirks.configwindow.offset[1].start) && (index <= bar->quirks.configwindow.offset[1].end)) { + vfio_log_op("VFIO %s: Config window: Write %08X to secondary index %08X\n", + dev->name, val, index); + vfio_config_writel(0, index - bar->quirks.configwindow.offset[1].start, val, dev); + return; + } + + /* Cascade to the main handler. */ + vfio_io_writel_fd(addr, val, bar); +} + +static void +vfio_quirk_configwindow(vfio_device_t *dev, vfio_region_t *bar, + uint16_t index_offset, uint16_t index_size, + uint16_t data_offset, uint16_t data_size, + uint32_t window_offset0, uint32_t window_offset1, uint8_t enable) +{ + vfio_log("VFIO %s: %sapping configuration space window for %s @ %04X and %04X\n", + dev->name, enable ? "M" : "Unm", bar->name, + bar->emulated_offset + index_offset, bar->emulated_offset + data_offset); + + /* Store start offsets, as well as end offsets to speed up operations. */ + bar->quirks.configwindow.offset[0].start = window_offset0; + bar->quirks.configwindow.offset[0].end = window_offset0 + 255; + bar->quirks.configwindow.offset[1].start = window_offset1; + bar->quirks.configwindow.offset[1].end = window_offset1 + 255; + + /* Enable or disable mapping. */ + vfio_quirk_capture_io(NULL, bar, bar->emulated_offset + index_offset, index_size, enable, + vfio_io_readb_fd, + vfio_io_readw_fd, + vfio_io_readl_fd, + vfio_quirk_configwindow_index_writeb, + vfio_quirk_configwindow_index_writew, + vfio_quirk_configwindow_index_writel); + vfio_quirk_capture_io(NULL, bar, bar->emulated_offset + data_offset, data_size, enable, + vfio_quirk_configwindow_data_readb, + vfio_quirk_configwindow_data_readw, + vfio_quirk_configwindow_data_readl, + vfio_quirk_configwindow_data_writeb, + vfio_quirk_configwindow_data_writew, + vfio_quirk_configwindow_data_writel); +} + +static uint8_t +vfio_quirk_iomirror_readb(uint16_t addr, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + + /* Read I/O port mirror from memory-mapped space. */ + uint8_t ret = vfio_mem_readb_fd(bar->emulated_offset + bar->quirks.iomirror.offset + addr, bar); +#ifdef ENABLE_VFIO_LOG + vfio_device_t *dev = bar->dev; + vfio_log_op("VFIO %s: I/O mirror: Read %02X from %04X (%08X)\n", dev->name, + ret, addr, bar->quirks.iomirror.offset + addr); +#endif + return ret; +} + +static uint16_t +vfio_quirk_iomirror_readw(uint16_t addr, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + + /* Read I/O port mirror from memory-mapped space. */ + uint16_t ret = vfio_mem_readw_fd(bar->emulated_offset + bar->quirks.iomirror.offset + addr, bar); +#ifdef ENABLE_VFIO_LOG + vfio_device_t *dev = bar->dev; + vfio_log_op("VFIO %s: I/O mirror: Read %04X from %04X (%08X)\n", dev->name, + ret, addr, bar->quirks.iomirror.offset + addr); +#endif + return ret; +} + +static uint32_t +vfio_quirk_iomirror_readl(uint16_t addr, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + + /* Read I/O port mirror from memory-mapped space. */ + uint32_t ret = vfio_mem_readl_fd(bar->emulated_offset + bar->quirks.iomirror.offset + addr, bar); +#ifdef ENABLE_VFIO_LOG + vfio_device_t *dev = bar->dev; + vfio_log_op("VFIO %s: I/O mirror: Read %08X from %04X (%08X)\n", dev->name, + ret, addr, bar->quirks.iomirror.offset + addr); +#endif + return ret; +} + +static void +vfio_quirk_iomirror_writeb(uint16_t addr, uint8_t val, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + + /* Write I/O port mirror to memory-mapped space. */ +#ifdef ENABLE_VFIO_LOG + vfio_device_t *dev = bar->dev; + vfio_log_op("VFIO %s: I/O mirror: Write %02X to %04X (%08X)\n", dev->name, + val, addr, bar->quirks.iomirror.offset + addr); +#endif + vfio_mem_writeb_fd(bar->emulated_offset + bar->quirks.iomirror.offset + addr, val, bar); +} + +static void +vfio_quirk_iomirror_writew(uint16_t addr, uint16_t val, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + + /* Write I/O port mirror to memory-mapped space. */ +#ifdef ENABLE_VFIO_LOG + vfio_device_t *dev = bar->dev; + vfio_log_op("VFIO %s: I/O mirror: Write %04X to %04X (%08X)\n", dev->name, + val, addr, bar->quirks.iomirror.offset + addr); +#endif + vfio_mem_writew_fd(bar->emulated_offset + bar->quirks.iomirror.offset + addr, val, bar); +} + +static void +vfio_quirk_iomirror_writel(uint16_t addr, uint32_t val, void *priv) +{ + vfio_region_t *bar = (vfio_region_t *) priv; + + /* Write I/O port mirror to memory-mapped space. */ +#ifdef ENABLE_VFIO_LOG + vfio_device_t *dev = bar->dev; + vfio_log_op("VFIO %s: I/O mirror: Write %08X to %04X (%08X)\n", dev->name, + val, addr, bar->quirks.iomirror.offset + addr); +#endif + vfio_mem_writel_fd(bar->emulated_offset + bar->quirks.iomirror.offset + addr, val, bar); +} + +static void +vfio_quirk_iomirror(vfio_device_t *dev, vfio_region_t *bar, + uint32_t offset, uint16_t base, uint16_t length, uint8_t enable) +{ + vfio_log("VFIO %s: %sapping I/O mirror for %s @ %08X\n", + dev->name, enable ? "M" : "Unm", bar->name, bar->emulated_offset + offset); + + /* Save I/O mirror offset, only one per BAR for now. */ + bar->quirks.iomirror.offset = offset; + + /* Add or remove quirk handler from port range. */ + if (enable) + io_sethandler(base, length, + bar->read ? vfio_quirk_iomirror_readb : NULL, + bar->read ? vfio_quirk_iomirror_readw : NULL, + bar->read ? vfio_quirk_iomirror_readl : NULL, + bar->write ? vfio_quirk_iomirror_writeb : NULL, + bar->write ? vfio_quirk_iomirror_writew : NULL, + bar->write ? vfio_quirk_iomirror_writel : NULL, + bar); + else + io_removehandler(base, length, + bar->read ? vfio_quirk_iomirror_readb : NULL, + bar->read ? vfio_quirk_iomirror_readw : NULL, + bar->read ? vfio_quirk_iomirror_readl : NULL, + bar->write ? vfio_quirk_iomirror_writeb : NULL, + bar->write ? vfio_quirk_iomirror_writew : NULL, + bar->write ? vfio_quirk_iomirror_writel : NULL, + bar); +} + +static uint8_t +vfio_quirk_ati3c3_readb(uint16_t addr, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + + /* Read high byte of the I/O BAR address. */ + uint8_t ret = dev->quirks.ati3c3.bar->emulated_offset >> 8; + vfio_log_op("VFIO %s: ATI 3C3: Read %02X\n", ret); + + return ret; +} + +static void +vfio_quirk_nvidiabar5(vfio_device_t *dev) +{ + /* Remap config window based on BAR enable status and the master/enable registers. */ + vfio_quirk_configwindow(dev, &dev->bars[5], 0x08, 4, 0x0c, 4, 0x1800, 0x88000, + dev->quirks.nvidiabar5.bar_enable && ((dev->quirks.nvidiabar5.master_enable & 0x0000000100000001) == 0x0000000100000001)); +} + +static void +vfio_quirk_nvidiabar5_writeb(uint16_t addr, uint8_t val, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + + /* Write master/enable registers. */ + vfio_log_op("VFIO %s: NVIDIA BAR 5: Write [%d] %02X\n", + dev->name, addr & 7, val); + uint8_t offset = (addr & 7) << 3; + dev->quirks.nvidiabar5.master_enable &= ~(0x00000000000000ff << offset); + dev->quirks.nvidiabar5.master_enable |= val << offset; + + /* Update window to account for changes in master/enable registers. */ + vfio_quirk_nvidiabar5(dev); + + /* Cascade to the main handler. */ + vfio_io_writeb_fd(addr, val, &dev->bars[5]); +} + +static void +vfio_quirk_nvidiabar5_writew(uint16_t addr, uint16_t val, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + + /* Write master/enable registers. */ + vfio_log_op("VFIO %s: NVIDIA BAR 5: Write [%d] %04X\n", + dev->name, addr & 7, val); + uint8_t offset = (addr & 6) << 3; + dev->quirks.nvidiabar5.master_enable &= ~(0x000000000000ffff << offset); + dev->quirks.nvidiabar5.master_enable |= val << offset; + + /* Update window to account for changes in master/enable registers. */ + vfio_quirk_nvidiabar5(dev); + + /* Cascade to the main handler. */ + vfio_io_writew_fd(addr, val, &dev->bars[5]); +} + +static void +vfio_quirk_nvidiabar5_writel(uint16_t addr, uint32_t val, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + + /* Write master/enable registers. */ + vfio_log_op("VFIO %s: NVIDIA BAR 5: Write [%d] %08X\n", + dev->name, addr & 7, val); + uint8_t offset = (addr & 4) << 3; + dev->quirks.nvidiabar5.master_enable &= ~(0x00000000ffffffff << offset); + dev->quirks.nvidiabar5.master_enable |= val << offset; + + /* Update window to account for changes in master/enable registers. */ + vfio_quirk_nvidiabar5(dev); + + /* Cascade to the main handler. */ + vfio_io_writel_fd(addr, val, &dev->bars[5]); +} + +static uint8_t +vfio_quirk_nvidia3d0_state_readb(uint16_t addr, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + + /* Reset state on read. */ + dev->quirks.nvidia3d0.state = NVIDIA_3D0_NONE; + vfio_log_op("VFIO %s: NVIDIA 3D0: Switching to NONE state (byte read)\n", dev->name); + + /* Cascade to the main handler. */ + return vfio_io_readb_fd(addr, &dev->vga_io_hi); +} + +static uint16_t +vfio_quirk_nvidia3d0_state_readw(uint16_t addr, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + + /* Reset state on read. */ + dev->quirks.nvidia3d0.state = NVIDIA_3D0_NONE; + vfio_log_op("VFIO %s: NVIDIA 3D0: Switching to NONE state (word read)\n", dev->name); + + /* Cascade to the main handler. */ + return vfio_io_readw_fd(addr, &dev->vga_io_hi); +} + +static uint32_t +vfio_quirk_nvidia3d0_state_readl(uint16_t addr, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + + /* Reset state on read. */ + dev->quirks.nvidia3d0.state = NVIDIA_3D0_NONE; + vfio_log_op("VFIO %s: NVIDIA 3D0: Switching to NONE state (dword read)\n", dev->name); + + /* Cascade to the main handler. */ + return vfio_io_readl_fd(addr, &dev->vga_io_hi); +} + +static void +vfio_quirk_nvidia3d0_state_writeb(uint16_t addr, uint8_t val, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + + /* Commands don't fit in a byte; just reset state and move on. */ + dev->quirks.nvidia3d0.state = NVIDIA_3D0_NONE; + vfio_log_op("VFIO %s: NVIDIA 3D0: Switching to NONE state (byte write)\n", dev->name); + + /* Cascade to the main handler. */ + vfio_io_writeb_fd(addr, val, &dev->vga_io_hi); +} + +static void +vfio_quirk_nvidia3d0_state_writew(uint16_t addr, uint16_t val, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + + uint8_t prev_state = dev->quirks.nvidia3d0.state; + dev->quirks.nvidia3d0.state = NVIDIA_3D0_NONE; + + /* Interpret NVIDIA commands. */ + switch (val) { + case 0x338: + if (prev_state == NVIDIA_3D0_NONE) { + dev->quirks.nvidia3d0.state = NVIDIA_3D0_SELECT; + vfio_log_op("VFIO %s: NVIDIA 3D0: Switching to SELECT state (word write)\n", dev->name); + } + break; + + case 0x538: + if (prev_state == NVIDIA_3D0_WINDOW) { + dev->quirks.nvidia3d0.state = NVIDIA_3D0_READ; + vfio_log_op("VFIO %s: NVIDIA 3D0: Switching to READ state (word write)\n", dev->name); + } + break; + + case 0x738: + if (prev_state == NVIDIA_3D0_WINDOW) { + dev->quirks.nvidia3d0.state = NVIDIA_3D0_WRITE; + vfio_log_op("VFIO %s: NVIDIA 3D0: Switching to WRITE state (word write)\n", dev->name); + } + break; + } + + /* Cascade to the main handler. */ + vfio_io_writew_fd(addr, val, &dev->vga_io_hi); +} + +static void +vfio_quirk_nvidia3d0_state_writel(uint16_t addr, uint32_t val, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + + uint8_t prev_state = dev->quirks.nvidia3d0.state; + dev->quirks.nvidia3d0.state = NVIDIA_3D0_NONE; + + /* Interpret NVIDIA commands. */ + switch (val) { + case 0x338: + if (prev_state == NVIDIA_3D0_NONE) { + dev->quirks.nvidia3d0.state = NVIDIA_3D0_SELECT; + vfio_log_op("VFIO %s: NVIDIA 3D0: Switching to SELECT state (dword write)\n", dev->name); + } + break; + + case 0x538: + if (prev_state == NVIDIA_3D0_WINDOW) { + dev->quirks.nvidia3d0.state = NVIDIA_3D0_READ; + vfio_log_op("VFIO %s: NVIDIA 3D0: Switching to READ state (dword write)\n", dev->name); + } + break; + + case 0x738: + if (prev_state == NVIDIA_3D0_WINDOW) { + dev->quirks.nvidia3d0.state = NVIDIA_3D0_WRITE; + vfio_log_op("VFIO %s: NVIDIA 3D0: Switching to WRITE state (dword write)\n", dev->name); + } + break; + } + + /* Cascade to the main handler. */ + vfio_io_writel_fd(addr, val, &dev->vga_io_hi); +} + +static uint8_t +vfio_quirk_nvidia3d0_data_readb(uint16_t addr, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + + /* Cascade to the main handler. */ + uint8_t prev_state = dev->quirks.nvidia3d0.state; + uint8_t ret = vfio_io_readb_fd(addr, &dev->vga_io_hi); + dev->quirks.nvidia3d0.state = NVIDIA_3D0_NONE; + + /* Read configuration register if part of the main PCI configuration space. */ + if ((prev_state == NVIDIA_3D0_READ) && (((dev->quirks.nvidia3d0.index & 0xffffff00) == 0x00001800) || ((dev->quirks.nvidia3d0.index & 0xffffff00) == 0x00088000))) { + ret = vfio_config_readb(0, dev->quirks.nvidia3d0.index, dev); + vfio_log_op("VFIO %s: NVIDIA 3D0: Read %02X from index %08X\n", dev->name, + ret, dev->quirks.nvidia3d0.index); + } + + return ret; +} + +static uint16_t +vfio_quirk_nvidia3d0_data_readw(uint16_t addr, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + + /* Cascade to the main handler. */ + uint8_t prev_state = dev->quirks.nvidia3d0.state; + uint16_t ret = vfio_io_readw_fd(addr, &dev->vga_io_hi); + dev->quirks.nvidia3d0.state = NVIDIA_3D0_NONE; + + /* Read configuration register if part of the main PCI configuration space. */ + if ((prev_state == NVIDIA_3D0_READ) && (((dev->quirks.nvidia3d0.index & 0xffffff00) == 0x00001800) || ((dev->quirks.nvidia3d0.index & 0xffffff00) == 0x00088000))) { + ret = vfio_config_readw(0, dev->quirks.nvidia3d0.index, dev); + vfio_log_op("VFIO %s: NVIDIA 3D0: Read %04X from index %08X\n", dev->name, + ret, dev->quirks.nvidia3d0.index); + } + + return ret; +} + +static uint32_t +vfio_quirk_nvidia3d0_data_readl(uint16_t addr, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + + /* Cascade to the main handler. */ + uint8_t prev_state = dev->quirks.nvidia3d0.state; + uint32_t ret = vfio_io_readl_fd(addr, &dev->vga_io_hi); + dev->quirks.nvidia3d0.state = NVIDIA_3D0_NONE; + + /* Read configuration register if part of the main PCI configuration space. */ + if ((prev_state == NVIDIA_3D0_READ) && (((dev->quirks.nvidia3d0.index & 0xffffff00) == 0x00001800) || ((dev->quirks.nvidia3d0.index & 0xffffff00) == 0x00088000))) { + ret = vfio_config_readl(0, dev->quirks.nvidia3d0.index, dev); + vfio_log_op("VFIO %s: NVIDIA 3D0: Read %08X from index %08X\n", dev->name, + ret, dev->quirks.nvidia3d0.index); + } + + return ret; +} + +static void +vfio_quirk_nvidia3d0_data_writeb(uint16_t addr, uint8_t val, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + + uint8_t prev_state = dev->quirks.nvidia3d0.state; + dev->quirks.nvidia3d0.state = NVIDIA_3D0_NONE; + + if (prev_state == NVIDIA_3D0_SELECT) { + /* Write MMIO index. */ + dev->quirks.nvidia3d0.index = val; + dev->quirks.nvidia3d0.state = NVIDIA_3D0_WINDOW; + vfio_log_op("VFIO %s: NVIDIA 3D0: Write index %02X\n", dev->name, val); + } else if (prev_state == NVIDIA_3D0_WRITE) { + /* Write configuration register if part of the main PCI configuration space. */ + if (((dev->quirks.nvidia3d0.index & 0xffffff00) == 0x00001800) || ((dev->quirks.nvidia3d0.index & 0xffffff00) == 0x00088000)) { + /* Write configuration register. */ + vfio_log_op("VFIO %s: NVIDIA 3D0: Write %02X to index %08X\n", dev->name, + val, dev->quirks.nvidia3d0.index); + vfio_config_writeb(0, dev->quirks.nvidia3d0.index, val, dev); + return; + } + } + + /* Cascade to the main handler. */ + vfio_io_writeb_fd(addr, val, &dev->vga_io_hi); +} + +static void +vfio_quirk_nvidia3d0_data_writew(uint16_t addr, uint16_t val, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + + uint8_t prev_state = dev->quirks.nvidia3d0.state; + dev->quirks.nvidia3d0.state = NVIDIA_3D0_NONE; + + if (prev_state == NVIDIA_3D0_SELECT) { + /* Write MMIO index. */ + dev->quirks.nvidia3d0.index = val; + dev->quirks.nvidia3d0.state = NVIDIA_3D0_WINDOW; + vfio_log_op("VFIO %s: NVIDIA 3D0: Write index %04X\n", dev->name, val); + } else if (prev_state == NVIDIA_3D0_WRITE) { + /* Write configuration register if part of the main PCI configuration space. */ + if (((dev->quirks.nvidia3d0.index & 0xffffff00) == 0x00001800) || ((dev->quirks.nvidia3d0.index & 0xffffff00) == 0x00088000)) { + vfio_log_op("VFIO %s: NVIDIA 3D0: Write %04X to index %08X\n", dev->name, + val, dev->quirks.nvidia3d0.index); + vfio_config_writew(0, dev->quirks.nvidia3d0.index, val, dev); + return; + } + } + + /* Cascade to the main handler. */ + vfio_io_writew_fd(addr, val, &dev->vga_io_hi); +} + +static void +vfio_quirk_nvidia3d0_data_writel(uint16_t addr, uint32_t val, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + + uint8_t prev_state = dev->quirks.nvidia3d0.state; + dev->quirks.nvidia3d0.state = NVIDIA_3D0_NONE; + + if (prev_state == NVIDIA_3D0_SELECT) { + /* Write MMIO index. */ + dev->quirks.nvidia3d0.index = val; + dev->quirks.nvidia3d0.state = NVIDIA_3D0_WINDOW; + vfio_log_op("VFIO %s: NVIDIA 3D0: Write index %08X\n", dev->name, val); + } else if (prev_state == NVIDIA_3D0_WRITE) { + /* Write configuration register if part of the main PCI configuration space. */ + if (((dev->quirks.nvidia3d0.index & 0xffffff00) == 0x00001800) || ((dev->quirks.nvidia3d0.index & 0xffffff00) == 0x00088000)) { + /* Write configuration register. */ + vfio_log_op("VFIO %s: NVIDIA 3D0: Write %08X to index %08X\n", dev->name, + val, dev->quirks.nvidia3d0.index); + vfio_config_writel(0, dev->quirks.nvidia3d0.index, val, dev); + return; + } + } + + /* Cascade to the main handler. */ + vfio_io_writel_fd(addr, val, &dev->vga_io_hi); +} + +static void +vfio_quirk_remap(vfio_device_t *dev, vfio_region_t *bar, uint8_t enable) +{ + /* Read vendor ID. */ + uint16_t vendor; + if (pread(dev->config.fd, &vendor, sizeof(vendor), dev->config.offset) != sizeof(vendor)) + vendor = 0x0000; + + int i, j; + switch (vendor) { + case 0x1002: /* ATI */ + i = (vfio_bar_gettype(dev, &dev->bars[1]) == 0x01) && (dev->bars[1].size >= 256); + j = (vfio_bar_gettype(dev, &dev->bars[4]) == 0x01) && (dev->bars[4].size >= 256); + + /* ATI/AMD cards report the I/O BAR's high byte on port 3C3, and according + to the Red Hat slide deck, this is used for VBIOS bootstrapping purposes. + This I/O BAR can be either 1 or 4, so we probe which one it is. If unsure + (shouldn't really happen), pick 1 which is mostly used by older cards. */ + if ((bar == &dev->vga_io_hi) && (i || j)) { + dev->quirks.ati3c3.bar = (j && !i) ? &dev->bars[4] : &dev->bars[1]; + vfio_log("VFIO %s: %sapping ATI 3C3 quirk (BAR %d)\n", dev->name, + enable ? "M" : "Unm", dev->quirks.ati3c3.bar->bar_id); + vfio_quirk_capture_io(dev, bar, 0x3c3, 1, enable, + vfio_quirk_ati3c3_readb, NULL, NULL, + NULL, NULL, NULL); + } + + /* BAR 2 configuration space mirror, and BAR 1/4 configuration space window. */ + if (j && !i) { + /* QEMU only enables the mirror here if BAR 2 is 64-bit capable. */ + if ((bar->bar_id == 2) && ((vfio_config_readb(0, 0x18, dev) & 0x07) == 0x04)) + vfio_quirk_configmirror(dev, bar, 0x4000, 0, enable); + else if (bar->bar_id == 4) + vfio_quirk_configwindow(dev, bar, 0x00, 4, 0x04, 4, 0x4000, 0x4000, enable); + } else { + if (bar->bar_id == 2) + vfio_quirk_configmirror(dev, bar, 0xf00, 0, enable); + else if (bar->bar_id == 1) + vfio_quirk_configwindow(dev, bar, 0x00, 4, 0x04, 4, 0xf00, 0xf00, enable); + } + break; + + case 0x1023: /* Trident */ + /* Mirror TGUI acceleration port range to memory-mapped space, since the PCI bridge + VGA decode policy doesn't allow it to be forwarded directly to the real card. */ + if ((bar->bar_id == 1) && (vfio_bar_gettype(dev, bar) == 0x00) && (bar->size >= 65536)) { + /* Port range from vid_tgui9440.c */ + vfio_quirk_iomirror(dev, bar, 0, 0x2100, 256, enable); + } + break; + + case 0x10de: /* NVIDIA */ + /* BAR 0 configuration space mirrors. */ + if ((bar->bar_id == 0) && (vfio_bar_gettype(dev, bar) == 0x00)) { + vfio_quirk_configmirror(dev, bar, 0x1800, 0, enable); + vfio_quirk_configmirror(dev, bar, 0x88000, 1, enable); + } + + /* BAR 5 configuration space window. */ + if ((bar->bar_id == 5) && (vfio_bar_gettype(dev, bar) == 0x01)) { + vfio_log("VFIO %s: %sapping NVIDIA BAR 5 quirk\n", dev->name, enable ? "M" : "Unm"); + vfio_quirk_capture_io(dev, bar, bar->emulated_offset, 8, enable, + vfio_io_readb_fd, + vfio_io_readw_fd, + vfio_io_readl_fd, + vfio_quirk_nvidiabar5_writeb, + vfio_quirk_nvidiabar5_writew, + vfio_quirk_nvidiabar5_writel); + + /* Update window to account for changes in BAR enable status. */ + dev->quirks.nvidiabar5.bar_enable = enable; + vfio_quirk_nvidiabar5(dev); + } + + /* Port 3D0 configuration space window. */ + if ((bar == &dev->vga_io_hi) && dev->bars[1].size) { + vfio_log("VFIO %s: %sapping NVIDIA 3D0 quirk\n", dev->name, enable ? "M" : "Unm"); + vfio_quirk_capture_io(dev, bar, 0x3d0, 1, enable, + vfio_quirk_nvidia3d0_data_readb, + vfio_quirk_nvidia3d0_data_readw, + vfio_quirk_nvidia3d0_data_readl, + vfio_quirk_nvidia3d0_data_writeb, + vfio_quirk_nvidia3d0_data_writew, + vfio_quirk_nvidia3d0_data_writel); + vfio_quirk_capture_io(dev, bar, 0x3d4, 1, enable, + vfio_quirk_nvidia3d0_state_readb, + vfio_quirk_nvidia3d0_state_readw, + vfio_quirk_nvidia3d0_state_readl, + vfio_quirk_nvidia3d0_state_writeb, + vfio_quirk_nvidia3d0_state_writew, + vfio_quirk_nvidia3d0_state_writel); + } + break; + + case 0x5333: /* S3 */ + /* Mirror enhanced command port ranges to memory-mapped space, since the PCI bridge + VGA decode policy doesn't allow those to be forwarded directly to the real card. */ + if (vfio_bar_gettype(dev, &dev->bars[0]) != 0x00) + break; + if ((dev->bars[0].size == 33554432) && (dev->bar_count == 1)) { + /* Older chips can only remap to VGA A0000. We can tell + those through BAR 0 being 32M and the only BAR. */ + if (bar == &dev->vga_mem) { + i = 0; + + /* Main port list from vid_s3.c */ + vfio_quirk_iomirror(dev, bar, i, 0x42e8, 2, enable); + vfio_quirk_iomirror(dev, bar, i, 0x46e8, 2, enable); + vfio_quirk_iomirror(dev, bar, i, 0x4ae8, 2, enable); + +s3_old_mmio: + vfio_quirk_iomirror(dev, bar, i, 0x82e8, 4, enable); + vfio_quirk_iomirror(dev, bar, i, 0x86e8, 4, enable); + vfio_quirk_iomirror(dev, bar, i, 0x8ae8, 4, enable); + vfio_quirk_iomirror(dev, bar, i, 0x8ee8, 4, enable); + vfio_quirk_iomirror(dev, bar, i, 0x92e8, 4, enable); + vfio_quirk_iomirror(dev, bar, i, 0x96e8, 4, enable); + + vfio_quirk_iomirror(dev, bar, i, 0x9ae8, 4, enable); + + vfio_quirk_iomirror(dev, bar, i, 0x9ee8, 2, enable); + vfio_quirk_iomirror(dev, bar, i, 0xa2e8, 4, enable); + vfio_quirk_iomirror(dev, bar, i, 0xa6e8, 4, enable); + vfio_quirk_iomirror(dev, bar, i, 0xaae8, 4, enable); + vfio_quirk_iomirror(dev, bar, i, 0xaee8, 4, enable); + + vfio_quirk_iomirror(dev, bar, i, 0xb2e8, 4, enable); + + vfio_quirk_iomirror(dev, bar, i, 0xb6e8, 2, enable); + vfio_quirk_iomirror(dev, bar, i, 0xbae8, 2, enable); + vfio_quirk_iomirror(dev, bar, i, 0xbee8, 2, enable); + vfio_quirk_iomirror(dev, bar, i, 0xe2e8, 2, enable); + + vfio_quirk_iomirror(dev, bar, i, 0xd2e8, 2, enable); + vfio_quirk_iomirror(dev, bar, i, 0xe6e8, 4, enable); + vfio_quirk_iomirror(dev, bar, i, 0xeae8, 4, enable); + vfio_quirk_iomirror(dev, bar, i, 0xeee8, 4, enable); + } + } else if ((dev->bars[0].size == 67108864) && (dev->bar_count == 1)) { + /* Trio64V+ and ViRGE chips can remap to BAR 0 + 16M. We can tell those through + BAR 0 being 64M = ((16M linear + 16M MMIO) * both endians) and the only BAR. */ + if (bar->bar_id == 0) { + i = 0x1000000; /* 16M MMIO offset */ + +s3_new_mmio: /* There's a configuration space mirror in here as well. */ + vfio_quirk_configmirror(dev, bar, i + 0x8000, 0, enable); + + /* Subsystem Control/Status and Advanced Function Control. */ + vfio_quirk_iomirror(dev, bar, i + 0x8504 - 0x42e8, 0x42e8, 2, enable); + vfio_quirk_iomirror(dev, bar, i + 0x850c - 0x4ae8, 0x4ae8, 2, enable); + + /* The rest maps exactly as older chips. */ + goto s3_old_mmio; + } + } else if ((dev->bars[0].size >= 524288) && (vfio_bar_gettype(dev, &dev->bars[1]) == 0x00)) { + /* Savage chips break the linear framebuffer out to + BAR 1+, eliminating the 16M MMIO offset from BAR 0. */ + if (bar->bar_id == 0) { + i = 0; + goto s3_new_mmio; + } + } + break; + } +} + +static uint8_t +vfio_bar_gettype(vfio_device_t *dev, vfio_region_t *bar) +{ + /* Read and store BAR type from device if unknown. */ + if (bar->type == 0xff) { + if (pread(dev->config.fd, &bar->type, sizeof(bar->type), + dev->config.offset + 0x10 + (bar->bar_id << 2)) + == sizeof(bar->type)) + bar->type &= 0x01; + else + bar->type = 0xff; + } + + /* Return stored BAR type. */ + return bar->type; +} + +static void +vfio_bar_remap(vfio_device_t *dev, vfio_region_t *bar, uint32_t new_offset) +{ + vfio_log("VFIO %s: bar_remap(%s, %08X)\n", dev->name, bar->name, new_offset); + + /* Act according to the BAR type. */ + uint8_t bar_type = vfio_bar_gettype(dev, bar); + if (bar_type == 0x00) { /* Memory BAR */ + if (bar->emulated_offset) { + vfio_log("VFIO %s: Unmapping %s memory @ %08X-%08X\n", dev->name, + bar->name, bar->emulated_offset, bar->emulated_offset + bar->size - 1); + + /* Unmap any quirks. */ + vfio_quirk_remap(dev, bar, 0); + + /* Disable memory mapping. */ + mem_mapping_disable(&bar->mem_mapping); + + /* Disable MSI-X table and PBA mappings if applicable to this BAR. */ + if (dev->irq.msix.table_bar == bar->bar_id) + mem_mapping_disable(&dev->irq.msix.table_mapping); + if (dev->irq.msix.pba_bar == bar->bar_id) + mem_mapping_disable(&dev->irq.msix.pba_mapping); + } + + bar->mmap_precalc = bar->mmap_base - new_offset; + /* Expansion ROM requires both ROM enable and memory enable. */ + if (((bar->bar_id != 0xff) || dev->rom_enabled) && dev->mem_enabled && new_offset) { + vfio_log("VFIO %s: Mapping %s memory @ %08X-%08X\n", dev->name, + bar->name, new_offset, new_offset + bar->size - 1); + + /* Enable memory mapping. */ + if (bar->mmap_base) /* mmap available */ + mem_mapping_set_p(&bar->mem_mapping, bar->mmap_precalc); + mem_mapping_set_addr(&bar->mem_mapping, new_offset, bar->size); + + /* Map any quirks. */ + vfio_quirk_remap(dev, bar, 1); + + /* Enable MSI-X table and PBA mappings if applicable to this BAR. */ + if (dev->irq.msix.table_bar == bar->bar_id) { + dev->irq.msix.table_offset_precalc = new_offset + dev->irq.msix.table_offset; + mem_mapping_set_addr(&dev->irq.msix.table_mapping, + dev->irq.msix.table_offset_precalc, + dev->irq.msix.table_size); + } + if (dev->irq.msix.pba_bar == bar->bar_id) { + dev->irq.msix.pba_offset_precalc = new_offset + dev->irq.msix.pba_offset; + mem_mapping_set_addr(&dev->irq.msix.pba_mapping, + dev->irq.msix.pba_offset_precalc, + dev->irq.msix.pba_size); + } + } + } else if (bar_type == 0x01) { /* I/O BAR */ + if (bar->emulated_offset) { + vfio_log("VFIO %s: Unmapping %s I/O @ %04X-%04X\n", dev->name, + bar->name, bar->emulated_offset, bar->emulated_offset + bar->size - 1); + + /* Unmap any quirks. */ + vfio_quirk_remap(dev, bar, 0); + + /* Disable I/O mapping. */ + if (bar->mmap_base) /* mmap available */ + io_removehandler(bar->emulated_offset, bar->size, + bar->read ? vfio_io_readb_mm : NULL, + bar->read ? vfio_io_readw_mm : NULL, + bar->read ? vfio_io_readl_mm : NULL, + bar->write ? vfio_io_writeb_mm : NULL, + bar->write ? vfio_io_writew_mm : NULL, + bar->write ? vfio_io_writel_mm : NULL, + bar->mmap_precalc); + else /* mmap not available */ + io_removehandler(bar->emulated_offset, bar->size, + bar->read ? vfio_io_readb_fd : NULL, + bar->read ? vfio_io_readw_fd : NULL, + bar->read ? vfio_io_readl_fd : NULL, + bar->write ? vfio_io_writeb_fd : NULL, + bar->write ? vfio_io_writew_fd : NULL, + bar->write ? vfio_io_writel_fd : NULL, + bar); + } + + bar->mmap_precalc = bar->mmap_base - new_offset; + if (dev->io_enabled && new_offset) { + vfio_log("VFIO %s: Mapping %s I/O @ %04X-%04X\n", dev->name, + bar->name, new_offset, new_offset + bar->size - 1); + + /* Enable I/O mapping. */ + if (bar->mmap_base) /* mmap available */ + io_sethandler(new_offset, bar->size, + bar->read ? vfio_io_readb_mm : NULL, + bar->read ? vfio_io_readw_mm : NULL, + bar->read ? vfio_io_readl_mm : NULL, + bar->write ? vfio_io_writeb_mm : NULL, + bar->write ? vfio_io_writew_mm : NULL, + bar->write ? vfio_io_writel_mm : NULL, + bar->mmap_precalc); + else /* mmap not available */ + io_sethandler(new_offset, bar->size, + bar->read ? vfio_io_readb_fd : NULL, + bar->read ? vfio_io_readw_fd : NULL, + bar->read ? vfio_io_readl_fd : NULL, + bar->write ? vfio_io_writeb_fd : NULL, + bar->write ? vfio_io_writew_fd : NULL, + bar->write ? vfio_io_writel_fd : NULL, + bar); + + /* Map any quirks. */ + vfio_quirk_remap(dev, bar, 1); + } + } + + /* Set new emulated and precalculated offsets. + The precalculated offsets speed up read/write operations. */ + bar->emulated_offset = new_offset; + bar->precalc_offset = bar->offset - new_offset; +} + +static uint32_t +ceilpow2(uint32_t size) +{ + uint32_t pow_size = 1 << log2i(size); + if (pow_size < size) + return pow_size << 1; + return pow_size; +} + +static uint8_t +vfio_config_readb(int func, int addr, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + if (func) + return 0xff; + + intx_high = 0; + + /* Read register from device. */ + addr &= 0xff; + uint8_t ret; + if (pread(dev->config.fd, &ret, 1, dev->config.offset + addr) != 1) { + vfio_log("VFIO %s: config_readb(%d, %02X) failed\n", dev->name, + func, addr); + return 0xff; + } + + /* Change value accordingly. */ + uint8_t bar_id, offset, new; + switch (addr) { + case 0x10 ... 0x27: /* BARs */ + /* Stop if this BAR is absent. */ + bar_id = (addr - 0x10) >> 2; + if (!dev->bars[bar_id].read && !dev->bars[bar_id].write) { + ret = 0x00; + break; + } + + /* Mask off and insert static bits. */ + offset = (addr & 3) << 3; + new = dev->bars[bar_id].emulated_offset >> offset; + if (!offset) { + switch (vfio_bar_gettype(dev, &dev->bars[bar_id])) { + case 0x00: /* Memory BAR */ + new = (new & ~0x07) | (ret & 0x07); + break; + + case 0x01: /* I/O BAR */ + new = (new & ~0x03) | (ret & 0x03); + break; + } + } + ret = new; + break; + + case 0x30 ... 0x33: /* Expansion ROM */ + /* Stop if the ROM is absent. */ + if (!dev->rom.read) { + ret = 0x00; + break; + } + + /* Mask off and insert ROM enable bit. */ + offset = (addr & 3) << 3; + ret = dev->rom.emulated_offset >> offset; + if (!offset) + ret = (ret & ~0x01) | dev->rom_enabled; + break; + + default: /* other (capabilities) */ + if (dev->msi_cap && (addr >= dev->msi_cap)) { /* MSI */ + /* Adjust register offset to account for different structure levels. */ + offset = addr - dev->msi_cap; + if (!(dev->irq.msi.ctl & 0x0080) && (offset >= 0x08)) + offset += 4; + switch (offset) { + case 0x02 ... 0x03: /* Message Control */ + offset = (offset - 0x02) << 3; + ret = dev->irq.msi.ctl >> offset; + goto end; + + case 0x04 ... 0x07: /* Message Address */ + offset = (offset - 0x04) << 3; + ret = dev->irq.msi.address >> offset; + goto end; + + case 0x08 ... 0x0b: /* Message Upper Address */ + offset = (offset - 0x08) << 3; + ret = dev->irq.msi.address_upper >> offset; + goto end; + + case 0x0c ... 0x0d: /* Message Data */ + offset = (offset - 0x0c) << 3; + ret = dev->irq.msi.data >> offset; + goto end; + + case 0x10 ... 0x13: /* Mask Bits */ + if (dev->irq.msi.ctl & 0x0100) { + offset = (offset - 0x10) << 3; + ret = dev->irq.msi.mask >> offset; + goto end; + } + break; + + case 0x14 ... 0x17: /* Pending Bits */ + if (dev->irq.msi.ctl & 0x0100) { + offset = (offset - 0x14) << 3; + ret = dev->irq.msi.pending >> offset; + goto end; + } + break; + } + } + if (dev->msix_cap && (addr >= dev->msix_cap)) { /* MSI-X */ + offset = addr - dev->msix_cap; + switch (offset) { + case 0x02 ... 0x03: /* Message Control */ + offset = (offset - 0x02) << 3; + ret = dev->irq.msix.ctl >> offset; + goto end; + } + } +end: + break; + } + + vfio_log("VFIO %s: config_readb(%02X) = %02X\n", dev->name, + addr, ret); + + return ret; +} + +static uint16_t +vfio_config_readw(int func, int addr, void *priv) +{ + return vfio_config_readb(func, addr, priv) | (vfio_config_readb(func, addr + 1, priv) << 8); +} + +static uint32_t +vfio_config_readl(int func, int addr, void *priv) +{ + return vfio_config_readb(func, addr, priv) | (vfio_config_readb(func, addr + 1, priv) << 8) | (vfio_config_readb(func, addr + 2, priv) << 16) | (vfio_config_readb(func, addr + 3, priv) << 24); +} + +static void +vfio_config_writeb(int func, int addr, uint8_t val, void *priv) +{ + vfio_device_t *dev = (vfio_device_t *) priv; + if (func) + return; + + addr &= 0xff; + vfio_log("VFIO %s: config_writeb(%02X, %02X)\n", dev->name, addr, val); + + intx_high = 0; + + /* VFIO should block anything we shouldn't write to, such as BARs. */ + (void) !pwrite(dev->config.fd, &val, 1, dev->config.offset + addr); + + /* Act on some written values. */ + uint8_t new_mem_enabled; + uint8_t new_io_enabled; + uint8_t bar_id; + uint8_t offset; + uint32_t new_value; + uint64_t val64; + + switch (addr) { + case 0x04: /* Command */ + /* Determine new memory and I/O enable states. */ + new_mem_enabled = !!(val & PCI_COMMAND_MEM); + new_io_enabled = !!(val & PCI_COMMAND_IO); + + vfio_log("VFIO %s: Command Memory[%d] I/O[%d]\n", dev->name, + new_mem_enabled, new_io_enabled); + + /* Remap regions only if their respective enable bits have changed. */ + if (dev->mem_enabled ^ new_mem_enabled) { + /* Set new memory enable state. */ + dev->mem_enabled = new_mem_enabled; + + /* Remap memory BARs. */ + for (uint8_t i = 0; i < 6; i++) { + if (vfio_bar_gettype(dev, &dev->bars[i]) == 0x00) + vfio_bar_remap(dev, &dev->bars[i], dev->bars[i].emulated_offset); + } + + /* Remap ROM if present. */ + if (dev->rom.read) + vfio_bar_remap(dev, &dev->rom, dev->rom.emulated_offset); + + /* Remap VGA framebuffer region if present. */ + if (dev->vga_mem.bar_id) + vfio_bar_remap(dev, &dev->vga_mem, 0xa0000); + } + if (dev->io_enabled ^ new_io_enabled) { + /* Set new I/O enable state. */ + dev->io_enabled = new_io_enabled; + + /* Remap I/O BARs. */ + for (uint8_t i = 0; i < 6; i++) { + if (vfio_bar_gettype(dev, &dev->bars[i]) == 0x01) + vfio_bar_remap(dev, &dev->bars[i], dev->bars[i].emulated_offset); + } + + /* Remap VGA I/O regions if present. */ + if (dev->vga_io_lo.bar_id) { + vfio_bar_remap(dev, &dev->vga_io_lo, 0x3b0); + vfio_bar_remap(dev, &dev->vga_io_hi, 0x3c0); + } + } + break; + + case 0x10 ... 0x27: /* BARs */ + /* Stop if this BAR is absent. */ + bar_id = (addr - 0x10) >> 2; + if (!dev->bars[bar_id].read && !dev->bars[bar_id].write) + break; + + /* Mask off static bits. */ + offset = (addr & 3) << 3; + if (!offset) { + switch (vfio_bar_gettype(dev, &dev->bars[bar_id])) { + case 0x00: /* Memory BAR */ + val &= ~0x07; + break; + + case 0x01: /* I/O BAR */ + val &= ~0x03; + break; + } + } + + /* Remap BAR. */ + new_value = dev->bars[bar_id].emulated_offset & ~(0x000000ff << offset); + new_value |= val << offset; + new_value &= ~(ceilpow2(dev->bars[bar_id].size) - 1); + vfio_bar_remap(dev, &dev->bars[bar_id], new_value); + break; + + case 0x30 ... 0x33: /* Expansion ROM */ + /* Stop if the ROM is absent. */ + if (!dev->rom.read) + break; + + /* Set ROM enable bit. */ + offset = (addr & 3) << 3; + if (!offset) { + dev->rom_enabled = val & 0x01; + val &= 0xfe; + } + + /* Remap ROM. */ + new_value = (dev->rom.emulated_offset & ~(0x000000ff << offset)); + new_value |= val << offset; + new_value &= ~(ceilpow2(dev->rom.size) - 1); + vfio_bar_remap(dev, &dev->rom, new_value); + break; + + case 0x3d: /* Interrupt Pin */ + if (val != dev->irq.intx.pin) + vfio_irq_intx_setpin(dev); + break; + + default: /* other (capabilities) */ + if (dev->msi_cap && (addr >= dev->msi_cap)) { /* MSI */ + /* Adjust register offset to account for different structure levels. */ + offset = addr - dev->msi_cap; + if (!(dev->irq.msi.ctl & 0x0080) && (offset >= 0x08)) + offset += 4; + switch (offset) { + case 0x00 ... 0x01: /* Capability */ + goto end; + + case 0x02 ... 0x03: /* Message Control */ + offset = (offset - 0x02) << 3; + new_value = dev->irq.msi.ctl & ~(0x00ff << offset); + new_value |= val << offset; + + /* Enable or disable MSI if requested and not conflicting with MSI-X. */ + if (dev->irq.type != VFIO_PCI_MSIX_IRQ_INDEX) { + if (!(dev->irq.msi.ctl & 0x0001) && (new_value & 0x0001)) + vfio_irq_enable(dev, VFIO_PCI_MSI_IRQ_INDEX); + else if ((dev->irq.msi.ctl & 0x0001) && !(new_value & 0x0001)) + vfio_irq_msi_disable(dev); + } + + /* Update control register. */ + dev->irq.msi.ctl = (new_value & 0x0071) | (dev->irq.msi.ctl & 0xff8e); + + /* Update enabled vector count and mask. */ + dev->irq.msi.vector_enable_count = MIN(1 << ((dev->irq.msi.ctl >> 1) & 3), dev->irq.msi.vector_count); + dev->irq.msi.vector_enable_mask = dev->irq.msi.vector_enable_count - 1; + goto end; + + case 0x04 ... 0x07: /* Message Address */ + offset = (offset - 0x04) << 3; + new_value = dev->irq.msi.address & ~(0x000000ff << offset); + new_value |= val << offset; + dev->irq.msi.address = new_value & 0xfffffffc; + goto end; + + case 0x08 ... 0x0b: /* Message Upper Address */ + offset = (offset - 0x08) << 3; + new_value = dev->irq.msi.address_upper & ~(0x000000ff << offset); + new_value |= val << offset; + dev->irq.msi.address_upper = new_value; + goto end; + + case 0x0c ... 0x0d: /* Message Data */ + offset = (offset - 0x0c) << 3; + new_value = dev->irq.msi.data & ~(0x00ff << offset); + new_value |= val << offset; + dev->irq.msi.data = new_value; + goto end; + + case 0x0e ... 0x0f: /* Reserved */ + case 0x14 ... 0x17: /* Pending Bits */ + if (dev->irq.msi.ctl & 0x0100) + goto end; + break; + + case 0x10 ... 0x13: /* Mask Bits */ + if (dev->irq.msi.ctl & 0x0100) { + offset = (offset - 0x10) << 3; + new_value = dev->irq.msi.mask & ~(0x000000ff << offset); + new_value |= val << offset; + dev->irq.msi.mask = new_value; + + /* Service any unmasked pending interrupts if MSI is enabled. */ + if (dev->irq.msi.ctl & 0x0001) { + new_value = ~new_value; + val64 = 1; + for (uint8_t i = 0; i < dev->irq.msi.vector_enable_count; i++) { + if (dev->irq.msi.pending & ((1 << i) & new_value)) + (void) !write(dev->irq.vectors[i].fd, &val64, sizeof(val64)); + } + dev->irq.msi.pending &= new_value; + } + + goto end; + } + break; + } + } + if (dev->msix_cap && (addr >= dev->msix_cap)) { /* MSI-X */ + offset = addr - dev->msix_cap; + switch (offset) { + case 0x00 ... 0x01: /* Capability */ + case 0x04 ... 0x0b: /* Table/PBA Offset */ + goto end; + + case 0x02 ... 0x03: /* Message Control */ + offset = (offset - 0x02) << 3; + new_value = dev->irq.msix.ctl & ~(0x00ff << offset); + new_value |= val << offset; + + /* Enable or disable MSI-X if requested. */ + if (!(dev->irq.msix.ctl & 0x8000) && (new_value & 0x8000)) + vfio_irq_enable(dev, VFIO_PCI_MSIX_IRQ_INDEX); + else if ((dev->irq.msix.ctl & 0x8000) && !(new_value & 0x8000)) + vfio_irq_msix_disable(dev); + + /* Update control register. */ + dev->irq.msix.ctl = (new_value & 0xc000) | (dev->irq.msix.ctl & 0x3fff); + + /* Service any unmasked pending interrupts if MSI-X + is enabled and the global mask bit was cleared. */ + if ((dev->irq.msix.ctl & 0xc000) == 0x8000) { + for (uint16_t i = 0x000c; i < dev->irq.msix.table_size; i += 0x0010) + vfio_irq_msix_updatemask(dev, i); + } + goto end; + } + } +end: + break; + } +} + +static void +vfio_config_writew(int func, int addr, uint16_t val, void *priv) +{ + vfio_config_writeb(func, addr, val, priv); + vfio_config_writeb(func, addr | 1, val >> 8, priv); +} + +static void +vfio_config_writel(int func, int addr, uint32_t val, void *priv) +{ + vfio_config_writeb(func, addr, val, priv); + vfio_config_writeb(func, addr | 1, val >> 8, priv); + vfio_config_writeb(func, addr | 2, val >> 16, priv); + vfio_config_writeb(func, addr | 3, val >> 24, priv); +} + +static void +vfio_irq_thread(void *priv) +{ + int nfds, i; + uint64_t buf; + struct epoll_event events[16]; + struct vfio_irq_set irq_set = { + .argsz = sizeof(irq_set), + .index = VFIO_PCI_INTX_IRQ_INDEX, + .start = 0, + .count = 1 + }; + vfio_device_t *dev; + vfio_irq_t *irq; + + vfio_log("VFIO: IRQ thread started\n"); + + while (epoll_fd >= 0) { + /* Wait for an interrupt to come in. */ + nfds = epoll_wait(epoll_fd, events, sizeof(events) / sizeof(events[0]), -1); + if (nfds < 0) { + vfio_log("VFIO %s: epoll_wait failed (%d)\n", errno); + break; + } + + /* Process all interrupts which came in. */ + for (i = 0; i < nfds; i++) { + /* Only handle read events. */ + if (!(events[i].events & EPOLLIN)) + continue; + + /* Get the IRQ and device structures for this interrupt. */ + irq = (vfio_irq_t *) events[i].data.ptr; + if (!irq) { + /* Do nothing if this is the wake eventfd, which has no data. */ + (void) !read(irq_thread_wake_fd, &buf, sizeof(buf)); + continue; + } + dev = irq->dev; + + /* Reset eventfd counter. */ + (void) !read(irq->fd, &buf, sizeof(buf)); + + /* Don't hang waiting for the timer if we're closing. */ + if (closing) + continue; + + /* Log VFIO IRQ type and vector. */ + vfio_log_op("VFIO %s: %s IRQ on vector %d\n", dev->name, + ((irq->type == VFIO_PCI_INTX_IRQ_INDEX) ? "INTx" : (((irq->type == VFIO_PCI_MSI_IRQ_INDEX) ? "MSI" : ((irq->type == VFIO_PCI_MSIX_IRQ_INDEX) ? "MSI-X" : NULL)))), + irq->vector); + + /* Perform pre-checks for specific IRQ types. */ + switch (irq->type) { + case VFIO_PCI_INTX_IRQ_INDEX: + /* Mask host IRQ. */ + irq_set.flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_MASK; + ioctl(dev->fd, VFIO_DEVICE_SET_IRQS, &irq_set); + break; + + case VFIO_PCI_MSI_IRQ_INDEX: + /* Ignore MSI if this vector is not enabled. */ + if (irq->vector >= dev->irq.msi.vector_enable_count) { + vfio_log_op("VFIO %s: MSI vector not enabled (%d >= %d)\n", dev->name, + irq->vector, dev->irq.msi.vector_enable_count); + continue; + } + + /* Ignore MSI if the upper 32 bits of a 64-bit address are non-zero. */ + if (dev->irq.msi.address_upper) { + vfio_log_op("VFIO %s: MSI 64-bit address %08X%08X\n", dev->name, + dev->irq.msi.address_upper, dev->irq.msi.address); + continue; + } + + /* Mark MSI as pending if this vector is masked through per-vector masking. */ + if (dev->irq.msi.mask & (1 << irq->vector)) { + vfio_log_op("VFIO %s: MSI masked\n", dev->name); + dev->irq.msi.pending |= 1 << irq->vector; + continue; + } + break; + + case VFIO_PCI_MSIX_IRQ_INDEX: + /* Ignore MSI-X if the upper 32 bits of a 64-bit address are non-zero. */ + if (*((uint32_t *) &dev->irq.msix.table[irq->msix_offset | 0x4])) { + vfio_log_op("VFIO %s: MSI-X 64-bit address %016X\n", dev->name, + *((uint64_t *) &dev->irq.msix.table[irq->msix_offset])); + continue; + } + + /* Mark MSI-X as pending if this vector or all vectors are masked. */ + if ((dev->irq.msix.ctl & 0x4000) || (dev->irq.msix.table[irq->msix_offset | 0xc] & 0x01)) { + vfio_log_op("VFIO %s: MSI-X masked\n", dev->name); + dev->irq.msix.pba[irq->vector >> 3] |= 1 << (irq->vector & 0x07); + continue; + } + break; + } + + /* Tell the timer to service this interrupt. */ + current_irq = irq; + + /* Wait for the timer to do its job. */ + thread_wait_event(irq_event, -1); + thread_reset_event(irq_event); + vfio_log_op("VFIO %s: IRQ serviced\n", dev->name); + + /* Unmask host IRQ if this is INTx. */ + if (irq->type == VFIO_PCI_INTX_IRQ_INDEX) { + irq_set.flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_UNMASK; + ioctl(dev->fd, VFIO_DEVICE_SET_IRQS, &irq_set); + } + } + + /* Pause if we were asked to. */ + thread_wait_event(irq_thread_resume, -1); + } + + /* We're done here. */ + vfio_log("VFIO: IRQ thread finished\n"); +} + +static void +vfio_irq_timer(void *priv) +{ + /* Schedule next run. */ + timer_on_auto(&irq_timer, 100.0); + + /* Stop if we're not servicing an IRQ at the moment. */ + if (!current_irq) + return; + vfio_device_t *dev = current_irq->dev; + + /* Act according to the IRQ type. */ + uint16_t val; + switch (current_irq->type) { + case VFIO_PCI_INTX_IRQ_INDEX: + if (!dev->irq.intx.raised) { /* rising edge */ + vfio_log_op("VFIO %s: Raising IRQ on pin INT%c\n", dev->name, + '@' + dev->irq.intx.pin); + + /* Raise IRQ. */ + pci_set_irq(dev->slot, dev->irq.intx.pin, &dev->irq.intx.state); + + /* Mark the IRQ as active, so that a BAR read/write can lower it. */ + dev->irq.intx.raised = intx_high = 1; + } else if (!intx_high) { /* falling edge */ + vfio_log_op("VFIO %s: Lowering IRQ on pin INT%c\n", dev->name, + '@' + dev->irq.intx.pin); + + /* Lower IRQ. */ + pci_clear_irq(dev->slot, dev->irq.intx.pin, &dev->irq.intx.state); + + /* Mark the IRQ as no longer high. */ + dev->irq.intx.raised = intx_high = 0; + + /* Allow the IRQ thread to be unblocked. */ + break; + } + + /* Don't unblock the IRQ thread unless otherwise stated. */ + return; + + case VFIO_PCI_MSI_IRQ_INDEX: + /* Insert the vector number into the value's lower bits. */ + val = (dev->irq.msi.data & ~dev->irq.msi.vector_enable_mask) | (current_irq->vector & dev->irq.msi.vector_enable_mask); + + /* Write value. */ + vfio_log_op("VFIO %s: Writing MSI value %04X to %04X\n", dev->name, val, dev->irq.msi.address); + mem_writew_phys(dev->irq.msi.address, val); + break; + + case VFIO_PCI_MSIX_IRQ_INDEX: + /* Write value. */ + vfio_log_op("VFIO %s: Writing MSI-X value %08X to %08X\n", dev->name, + *((uint32_t *) &dev->irq.msix.table[current_irq->msix_offset | 0x8]), + *((uint32_t *) &dev->irq.msix.table[current_irq->msix_offset])); + mem_writel_phys(*((uint32_t *) &dev->irq.msix.table[current_irq->msix_offset]), + *((uint32_t *) &dev->irq.msix.table[current_irq->msix_offset | 0x8])); + break; + } + + /* Unblock the IRQ thread. */ + current_irq = NULL; + thread_set_event(irq_event); +} + +static void +vfio_irq_disabletype(vfio_device_t *dev, int type) +{ + struct vfio_irq_set irq_set = { + .argsz = sizeof(irq_set), + .flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_TRIGGER, + .index = type, + .start = 0, + .count = 0, + }; + ioctl(dev->fd, VFIO_DEVICE_SET_IRQS, &irq_set); +} + +static void +vfio_irq_intx_disable(vfio_device_t *dev) +{ + /* Disable INTx on VFIO. */ + vfio_irq_disabletype(dev, VFIO_PCI_INTX_IRQ_INDEX); + + /* Clear pending interrupts. */ + dev->irq.intx.raised = intx_high = 0; + if (dev->irq.intx.pin) + pci_clear_irq(dev->slot, dev->irq.intx.pin, &dev->irq.intx.state); + + /* Disable interrupts altogether. */ + dev->irq.type = VFIO_PCI_NUM_IRQS; +} + +static void +vfio_irq_intx_setpin(vfio_device_t *dev) +{ + uint8_t val; + if (pread(dev->config.fd, &val, sizeof(val), dev->config.offset + 0x3d) == sizeof(val)) + dev->irq.intx.pin = val; + vfio_log("VFIO %s: IRQ pin is INT%c\n", dev->name, '@' + MIN(dev->irq.intx.pin, 'Z')); +} + +static void +vfio_irq_msi_disable(vfio_device_t *dev) +{ + /* Clear pending interrupts. */ + dev->irq.msi.pending = 0; + + /* Disable MSI on VFIO. */ + vfio_irq_disabletype(dev, VFIO_PCI_MSI_IRQ_INDEX); + + /* Re-enable INTx interrupts. */ + vfio_irq_enable(dev, VFIO_PCI_INTX_IRQ_INDEX); +} + +static void +vfio_irq_msix_disable(vfio_device_t *dev) +{ + /* Clear pending interrupts. */ + memset(dev->irq.msix.pba, 0, dev->irq.vector_count); + + /* Disable MSI-X on VFIO. */ + vfio_irq_disabletype(dev, VFIO_PCI_MSIX_IRQ_INDEX); + + /* Re-enable INTx interrupts. */ + vfio_irq_enable(dev, VFIO_PCI_INTX_IRQ_INDEX); +} + +static void +vfio_irq_msix_updatemask(vfio_device_t *dev, uint16_t offset) +{ + /* Service any unmasked pending interrupts. */ + if (((dev->irq.msix.ctl & 0xc000) == 0x8000) && !(dev->irq.msix.table[offset] & 0x01) && (dev->irq.msix.pba[offset >> 7] & (1 << (offset & 0x07)))) { + uint64_t val = 1; + (void) !write(dev->irq.vectors[offset >> 4].fd, &val, sizeof(val)); + dev->irq.msix.pba[offset >> 7] &= ~(1 << (offset & 0x07)); + } +} + +#define VFIO_RW_MSIX(length_char, val_type, val_slength) \ + static val_type \ + vfio_irq_msix_table_read##length_char(uint32_t addr, void *priv) \ + { \ + vfio_device_t *dev = (vfio_device_t *) priv; \ + val_type ret = dev->irq.msix.table[addr - dev->irq.msix.table_offset_precalc]; \ + vfio_log_op("[%08X:%04X] VFIO %s: msix_table_read" #length_char "(%08X) = %0" #val_slength "X\n", CS, cpu_state.pc, dev->name, addr, ret); \ + return ret; \ + } \ + \ + static void \ + vfio_irq_msix_table_write##length_char(uint32_t addr, val_type val, void *priv) \ + { \ + vfio_device_t *dev = (vfio_device_t *) priv; \ + vfio_log_op("[%08X:%04X] VFIO %s: msix_table_write" #length_char "(%08X, %0" #val_slength "X)\n", CS, cpu_state.pc, dev->name, addr, val); \ + uint16_t offset = addr - dev->irq.msix.table_offset_precalc; \ + dev->irq.msix.table[offset] = val; \ + if ((offset & 0x000f) == 0x000c) \ + vfio_irq_msix_updatemask(dev, offset); \ + } \ + \ + static val_type \ + vfio_irq_msix_pba_read##length_char(uint32_t addr, void *priv) \ + { \ + vfio_device_t *dev = (vfio_device_t *) priv; \ + val_type ret = dev->irq.msix.table[addr - dev->irq.msix.pba_offset_precalc]; \ + vfio_log_op("[%08X:%04X] VFIO %s: msix_pba_read" #length_char "(%08X) = %0" #val_slength "X\n", CS, cpu_state.pc, dev->name, addr, ret); \ + return ret; \ + } \ + \ + static void \ + vfio_irq_msix_pba_write##length_char(uint32_t addr, val_type val, void *priv) \ + { \ + vfio_device_t *dev = (vfio_device_t *) priv; \ + vfio_log_op("[%08X:%04X] VFIO %s: msix_pba_write" #length_char "(%08X, %0" #val_slength "X)\n", CS, cpu_state.pc, dev->name, addr, val); \ + } + +VFIO_RW_MSIX(b, uint8_t, 2) +VFIO_RW_MSIX(w, uint16_t, 4) +VFIO_RW_MSIX(l, uint32_t, 8) + +static void +vfio_irq_disable(vfio_device_t *dev) +{ + /* Do nothing if IRQs are already disabled. */ + if (dev->irq.type == VFIO_PCI_NUM_IRQS) + return; + vfio_log("VFIO %s: irq_disable(%d)\n", dev->name, dev->irq.type); + + /* Pause IRQ thread. */ + thread_reset_event(irq_thread_resume); + uint64_t val = 1; + (void) !write(irq_thread_wake_fd, &val, sizeof(val)); + + /* Always disable INTx after disabling MSI/MSI-X. */ + if (dev->irq.type == VFIO_PCI_MSIX_IRQ_INDEX) + vfio_irq_msix_disable(dev); + else if (dev->irq.type == VFIO_PCI_MSI_IRQ_INDEX) + vfio_irq_msi_disable(dev); + if (dev->irq.type == VFIO_PCI_INTX_IRQ_INDEX) + vfio_irq_intx_disable(dev); + + /* Invalidate all IRQ vectors. */ + if (dev->irq.vectors) { + for (int i = 0; i < dev->irq.vector_count; i++) { + if (dev->irq.vectors[i].fd >= 0) { + /* Remove eventfd from epoll. */ + epoll_ctl(epoll_fd, EPOLL_CTL_DEL, dev->irq.vectors[i].fd, NULL); + close(dev->irq.vectors[i].fd); + } + } + free(dev->irq.vectors); + dev->irq.vectors = NULL; + dev->irq.vector_count = 0; + } + + /* Resume IRQ thread. */ + thread_set_event(irq_thread_resume); +} + +static void +vfio_irq_enable(vfio_device_t *dev, int type) +{ + /* Disable any existing IRQs. */ + vfio_irq_disable(dev); + + vfio_log("VFIO %s: irq_enable(%d)\n", dev->name, type); + + /* Determine the number of vectors needed. */ + switch (type) { + case VFIO_PCI_INTX_IRQ_INDEX: + /* Only one vector needed. */ + dev->irq.vector_count = 1; + break; + + case VFIO_PCI_MSI_IRQ_INDEX: + /* Up to the number of vectors read during init is needed. */ + dev->irq.vector_count = dev->irq.msi.vector_count; + break; + + case VFIO_PCI_MSIX_IRQ_INDEX: + /* The number of vectors read during init is needed. */ + dev->irq.vector_count = dev->irq.msix.vector_count; + break; + } + + /* Prepare structure for enabling the interrupt type. */ + struct vfio_irq_set irq_set = { + .argsz = sizeof(irq_set) + (sizeof(int32_t) * dev->irq.vector_count), + .flags = VFIO_IRQ_SET_DATA_EVENTFD | VFIO_IRQ_SET_ACTION_TRIGGER, + .index = type, + .start = 0, + .count = dev->irq.vector_count + }; + int32_t *fd_list = (int32_t *) &irq_set.data; + struct epoll_event event = { .events = EPOLLIN }; + + /* Create interrupt vectors with their respective eventfds. */ + dev->irq.vectors = (vfio_irq_t *) malloc(sizeof(vfio_irq_t) * dev->irq.vector_count); + for (int i = 0; i < dev->irq.vector_count; i++) { + dev->irq.vectors[i].dev = dev; + dev->irq.vectors[i].type = type; + dev->irq.vectors[i].vector = i; + fd_list[i] = dev->irq.vectors[i].fd = eventfd(0, 0); + if (fd_list[i] < 0) + pclog("VFIO %s: IRQ eventfd %d failed (%d)\n", dev->name, i, errno); + else { + /* Add eventfd to epoll. */ + event.data.ptr = &dev->irq.vectors[i]; + epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd_list[i], &event); + } + dev->irq.vectors[i].msix_offset = i << 4; /* pre-calculated value to save operations on MSI-X processing */ + } + + /* Enable interrupt type on VFIO. */ + if (ioctl(dev->fd, VFIO_DEVICE_SET_IRQS, &irq_set)) + pclog("VFIO %s: SET_IRQS(%d, %d) failed (%d)\n", dev->name, + type, dev->irq.vector_count, errno); + dev->irq.type = type; +} + +static void +vfio_region_init(vfio_device_t *dev, struct vfio_region_info *reg, vfio_region_t *region) +{ + /* Set region structure information. */ + region->fd = dev->fd; + region->offset = reg->offset; + if (reg->index == VFIO_PCI_VGA_REGION_INDEX) { + region->bar_id = 0xfe; + if (region == &dev->vga_io_lo) { + region->offset += 0x3b0; + region->size = 12; + region->type = 0x01; + } else if (region == &dev->vga_io_hi) { + region->offset += 0x3c0; + region->size = 32; + region->type = 0x01; + } else { + region->offset += 0xa0000; + region->size = 131072; + region->type = 0x00; + } + } else { + region->size = reg->size; + region->type = 0xff; + } + region->read = !!(reg->flags & VFIO_REGION_INFO_FLAG_READ); + region->write = !!(reg->flags & VFIO_REGION_INFO_FLAG_WRITE); + region->dev = dev; + + /* Use special memory mapping for expansion ROMs. */ + if (reg->index == VFIO_PCI_ROM_REGION_INDEX) { + /* Use MMIO only. */ + region->fd = -1; + + /* Open ROM file if one was given. */ + FILE *fp = NULL; + if (dev->rom_fn) { + pclog("VFIO %s: Loading ROM from file: %s\n", dev->name, dev->rom_fn); + fp = fopen(dev->rom_fn, "rb"); + if (fp) { + /* Determine region size if the device has no ROM region. */ + if (!region->size) { + fseek(fp, 0, SEEK_END); + region->size = ceilpow2(ftell(fp)); + if (region->size < 2048) /* minimum size for an expansion ROM */ + region->size = 2048; + fseek(fp, 0, SEEK_SET); + } + } else { + /* Fall back to the device's ROM if it has one. */ + pclog("VFIO %s: Could not read ROM file, ", dev->name); + if (region->size) { + pclog("falling back to device ROM\n"); + } else { + /* Disable ROM. */ + pclog("not enabling ROM\n"); + region->read = region->write = 0; + goto end; + } + } + } + + /* Mark this as the expansion ROM region. */ + region->type = 0x00; + region->bar_id = 0xff; + + /* Allocate ROM shadow area. */ + region->mmap_base = region->mmap_precalc = plat_mmap(region->size, 0); + if (region->mmap_base == ((void *) -1)) { + pclog("VFIO %s: ROM mmap(%" PRIu64 ") failed\n", dev->name, region->size); + region->mmap_base = NULL; + goto end; + } + memset(region->mmap_base, 0xff, region->size); + + int i, j = 0; + if (fp) { + /* Read ROM from file. */ + while ((i = fread(region->mmap_precalc, 1, + region->size - j, + fp)) + != 0) { + region->mmap_precalc += i; + j += i; + } + fclose(fp); + } else { + /* Read ROM from device. */ + while ((i = pread(dev->fd, region->mmap_precalc, + region->size - j, + region->offset + j)) + != 0) { + region->mmap_precalc += i; + j += i; + } + } + + /* Perform a few sanity checks on the ROM, starting with the signature. */ + j = 0; + if (*((uint16_t *) ®ion->mmap_base[0x00]) == 0xaa55) { + /* Check ROM length. */ + uint32_t rom_len = region->mmap_base[0x02] << 9; /* 512-byte blocks */ + if (rom_len > region->size) { + pclog("VFIO %s: Warning: ROM length (%d bytes) is larger than ROM region (%" PRIu64 " bytes)\n", + dev->name, rom_len, region->size); + j = 1; + } + + /* Check PCI pointer. */ + uint16_t pci_ptr = *((uint16_t *) ®ion->mmap_base[0x18]); + if (pci_ptr && (pci_ptr != 0xffff)) { + /* Check PCI pointer bounds. */ + if (pci_ptr <= (region->size - 0x12)) { + /* Check PCI header ROM length only if <= 130048 bytes, as the + ROM length is 8 bits in the main header and 16 bits in here. */ + uint32_t pci_len = *((uint16_t *) ®ion->mmap_base[pci_ptr + 0x18]) << 9; /* 512-byte blocks */ + if ((pci_len <= (254 << 9)) && (pci_len != rom_len)) { + pclog("VFIO %s: Warning: ROM length in main header (%d bytes) is " + "different from length in PCI header (%d bytes)\n", + dev->name, rom_len, pci_len); + j = 1; + } + } else { + pclog("VFIO %s: Warning: ROM has invalid PCI header pointer: %04X\n", + dev->name, pci_ptr); + j = 1; + } + } else { + pclog("VFIO %s: Warning: ROM has no PCI header pointer\n", + dev->name); + j = 1; + } + + /* Compare checksum. */ + uint8_t checksum = 0; + if (rom_len > region->size) /* don't go out of bounds */ + rom_len = region->size; + rom_len -= 1; + for (i = 0; i < rom_len; i++) + checksum -= region->mmap_base[i]; + if (checksum != region->mmap_base[i]) { + pclog("VFIO %s: Warning: ROM has bad checksum; expected %02X, got %02X\n", + dev->name, checksum, region->mmap_base[i]); + j = 1; + } + } else { + pclog("VFIO %s: Warning: ROM has no 55 AA signature\n", dev->name); + j = 1; + } + + /* Add a helpful reminder if a sanity check warning was printed + and no ROM file was specified in this device's configuration. */ + if (j && !dev->rom_fn) + pclog("VFIO %s: A custom ROM can be loaded with the _rom_fn directive.\n", dev->name); + } else { + /* Attempt to mmap the region. */ + region->mmap_base = mmap(NULL, region->size, + (region->read ? PROT_READ : 0) | (region->write ? PROT_WRITE : 0), + MAP_SHARED, region->fd, region->offset); + if (region->mmap_base == ((void *) -1)) /* mmap failed */ + region->mmap_base = NULL; + } + region->mmap_precalc = region->mmap_base; + +end: + vfio_log("VFIO %s: Region: %s (offset %lX) (%d bytes) ", dev->name, + region->name, region->offset, region->size); + + /* Create memory mapping for if we need it. */ + if (region->mmap_base) { /* mmap available */ + vfio_log("(MM)"); + mem_mapping_add(®ion->mem_mapping, 0, 0, + region->read ? vfio_mem_readb_mm : NULL, + region->read ? vfio_mem_readw_mm : NULL, + region->read ? vfio_mem_readl_mm : NULL, + region->write ? vfio_mem_writeb_mm : NULL, + region->write ? vfio_mem_writew_mm : NULL, + region->write ? vfio_mem_writel_mm : NULL, + NULL, MEM_MAPPING_EXTERNAL, region->mmap_precalc); + } else if (region->fd >= 0) { /* mmap not available, but fd is */ + vfio_log("(FD)"); + mem_mapping_add(®ion->mem_mapping, 0, 0, + region->read ? vfio_mem_readb_fd : NULL, + region->read ? vfio_mem_readw_fd : NULL, + region->read ? vfio_mem_readl_fd : NULL, + region->write ? vfio_mem_writeb_fd : NULL, + region->write ? vfio_mem_writew_fd : NULL, + region->write ? vfio_mem_writel_fd : NULL, + NULL, MEM_MAPPING_EXTERNAL, region); + } else { + vfio_log("(not mapped)"); + } + + vfio_log(" (%c%c)\n", region->read ? 'R' : '-', region->write ? 'W' : '-'); +} + +static void +vfio_region_close(vfio_device_t *dev, vfio_region_t *region) +{ + /* Stop if this region was not initialized. */ + if (!region->size) + return; + + /* Unmap memory if mmap was available. */ + if (region->mmap_base) + plat_munmap(region->mmap_base, region->size); +} + +static vfio_group_t * +vfio_group_get(int id, uint8_t add) +{ + /* Look for an existing group. */ + vfio_group_t *group = first_group; + while (group) { + if (group->id == id) + return group; + else if (group->next) + group = group->next; + else + break; + } + + /* Don't add a group if told not to. */ + if (!add) + return NULL; + + /* Add group if no matches were found. */ + if (group) { + group->next = (vfio_group_t *) malloc(sizeof(vfio_group_t)); + group = group->next; + } else { + group = first_group = (vfio_group_t *) malloc(sizeof(vfio_group_t)); + } + memset(group, 0, sizeof(vfio_group_t)); + group->id = id; + + /* Open VFIO group. */ + char group_file[32]; + snprintf(group_file, sizeof(group_file), "/dev/vfio/%d", group->id); + group->fd = open(group_file, O_RDWR); + if (group->fd < 0) { + pclog("VFIO: Group %d not found\n", group->id); + goto end; + } + + /* Check if the group is viable. */ + struct vfio_group_status group_status = { .argsz = sizeof(group_status) }; + if (ioctl(group->fd, VFIO_GROUP_GET_STATUS, &group_status)) { + pclog("VFIO: Group %d GET_STATUS failed (%d)\n", group->id, errno); + goto close_fd; + } else if (!(group_status.flags & VFIO_GROUP_FLAGS_VIABLE)) { + pclog("VFIO: Group %d not viable\n", group->id); + goto close_fd; + } + + /* Claim the group. */ + if (ioctl(group->fd, VFIO_GROUP_SET_CONTAINER, &container_fd)) { + pclog("VFIO: Group %d SET_CONTAINER failed\n", group->id); + goto close_fd; + } + + goto end; + +close_fd: + close(group->fd); + group->fd = -1; +end: + return group; +} + +static void +vfio_dev_prereset(vfio_device_t *dev) +{ + vfio_log("VFIO %s: prereset()\n", dev->name); + + /* Disable interrupts. */ + vfio_irq_disable(dev); + + /* Extra steps for devices with power management capability. */ + if (dev->pm_cap) { + /* Make sure the device is in D0 state. */ + uint8_t pm_ctrl = vfio_config_readb(0, dev->pm_cap + 4, dev), + state = pm_ctrl & 0x03; + if (state) { + pm_ctrl &= ~0x03; + vfio_config_writeb(0, dev->pm_cap + 4, pm_ctrl, dev); + + pm_ctrl = vfio_config_readb(0, dev->pm_cap + 4, dev); + state = pm_ctrl & 0x03; + if (state) + vfio_log("VFIO %s: Device stuck in D%d state\n", dev->name, state); + } + + /* Enable PM reset if the device supports it. */ + dev->can_pm_reset = !(pm_ctrl & 0x08); + } + + /* Enable function-level reset if supported. */ + dev->can_flr_reset = (dev->pcie_cap && (vfio_config_readb(0, dev->pcie_cap + 7, dev) & 0x10)) || (dev->af_cap && (vfio_config_readb(0, dev->af_cap + 3, dev) & 0x02)); + + /* Disable bus master, BARs, expansion ROM and VGA regions; also enable INTx. */ + vfio_config_writew(0, 0x04, vfio_config_readw(0, 0x04, dev) & ~0x0407, dev); +} + +static void +vfio_dev_postreset(vfio_device_t *dev) +{ + vfio_log("VFIO %s: postreset()\n", dev->name); + + /* Enable INTx interrupts. MSI(-X) can be enabled by the OS later. */ + if (!closing) + vfio_irq_enable(dev, VFIO_PCI_INTX_IRQ_INDEX); + + /* Reset BARs, whatever this does. */ + uint32_t val = 0; + for (uint8_t i = 0x10; i < 0x28; i++) + (void) !pwrite(dev->config.fd, &val, sizeof(val), dev->config.offset + i); +} + +static int +vfio_dev_init(vfio_device_t *dev) +{ + vfio_log("VFIO %s: init()\n", dev->name); + + /* Grab device. */ + dev->fd = ioctl(current_group->fd, VFIO_GROUP_GET_DEVICE_FD, dev->name); + if (dev->fd < 0) { + vfio_log("VFIO %s: GET_DEVICE_FD failed (%d)\n", dev->name, errno); + goto end; + } + + /* Get device information. */ + struct vfio_device_info device_info = { .argsz = sizeof(device_info) }; + if (ioctl(dev->fd, VFIO_DEVICE_GET_INFO, &device_info)) { + pclog("VFIO %s: GET_INFO failed (%d), check for error in kernel log\n", dev->name, errno); + goto end; + } + + /* Check if any regions were returned. */ + if (!device_info.num_regions) { + pclog("VFIO %s: No regions returned, check for error in kernel log\n", dev->name); + goto end; + } + + /* Set main reset flag. */ + dev->can_reset = !!(device_info.flags & VFIO_DEVICE_FLAGS_RESET); + + /* Establish region names. */ + for (uint8_t i = 0; i < 6; i++) { + sprintf(dev->bars[i].name, "BAR #%d", dev->bars[i].bar_id = i); + dev->bars[i].type = 0xff; + } + strcpy(dev->rom.name, "Expansion ROM"); + strcpy(dev->config.name, "Configuration space"); + strcpy(dev->vga_io_lo.name, "VGA MDA"); + strcpy(dev->vga_io_hi.name, "VGA CGA/EGA"); + strcpy(dev->vga_mem.name, "VGA Framebuffer"); + + /* Initialize all regions. */ + struct vfio_region_info reg = { .argsz = sizeof(reg) }; + uint8_t cls; + for (int i = 0; i < device_info.num_regions; i++) { + /* Get region information. */ + reg.index = i; + ioctl(dev->fd, VFIO_DEVICE_GET_REGION_INFO, ®); + + /* Move on to the next region if this one is not valid. */ + if (!reg.size) + continue; + + /* Initialize region according to its type. */ + switch (reg.index) { + case VFIO_PCI_BAR0_REGION_INDEX ... VFIO_PCI_BAR5_REGION_INDEX: + vfio_region_init(dev, ®, &dev->bars[reg.index - VFIO_PCI_BAR0_REGION_INDEX]); + if (reg.size) + dev->bar_count++; + break; + + case VFIO_PCI_ROM_REGION_INDEX: + vfio_region_init(dev, ®, &dev->rom); + break; + + case VFIO_PCI_CONFIG_REGION_INDEX: + vfio_region_init(dev, ®, &dev->config); + break; + + case VFIO_PCI_VGA_REGION_INDEX: + /* Don't initialize VGA region if this is not a video card. */ + if ((dev->config.fd > 0) && (pread(dev->config.fd, &cls, sizeof(cls), dev->config.offset + 0x0b) == sizeof(cls)) && (cls != 0x03)) + break; + + vfio_region_init(dev, ®, &dev->vga_io_lo); /* I/O [3B0:3BB] */ + vfio_region_init(dev, ®, &dev->vga_io_hi); /* I/O [3C0:3DF] */ + vfio_region_init(dev, ®, &dev->vga_mem); /* memory [A0000:BFFFF] */ + + /* Inform that a PCI VGA video card is attached if no video card is emulated. */ + if (gfxcard == VID_NONE) + video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_default); + break; + + default: + vfio_log("VFIO %s: Unknown region %d (offset %lX) (%d bytes) (%c%c)\n", + dev->name, reg.index, reg.offset, reg.size, + (reg.flags & VFIO_REGION_INFO_FLAG_READ) ? 'R' : '-', + (reg.flags & VFIO_REGION_INFO_FLAG_WRITE) ? 'W' : '-'); + break; + } + } + + /* Make sure we have a valid device. */ + if (!dev->config.fd || !dev->config.read) { + pclog("VFIO %s: No configuration space region\n", dev->name); + goto end; + } + + /* Initialize ROM region if the device doesn't have one and we're loading a ROM from file. */ + if (dev->rom_fn && !dev->rom.fd) { + reg.index = VFIO_PCI_ROM_REGION_INDEX; + reg.offset = reg.size = 0; + reg.flags = VFIO_REGION_INFO_FLAG_READ; + vfio_region_init(dev, ®, &dev->rom); + } + + /* Go through PCI capability list if the device declares one. */ + dev->irq.msix.table_bar = dev->irq.msix.pba_bar = 0x07; + uint8_t cap_ptr; + uint8_t cap_id; + if ((pread(dev->config.fd, &cap_ptr, sizeof(cap_ptr), dev->config.offset + 0x06) == sizeof(cap_ptr)) && (cap_ptr & 0x10)) { + vfio_log("VFIO %s: Device capabilities:", dev->name); + + /* Read pointer to the first capability. */ + if (pread(dev->config.fd, &cap_ptr, sizeof(cap_ptr), dev->config.offset + 0x34) != sizeof(cap_ptr)) + cap_ptr = 0; + while (cap_ptr && (cap_ptr != 0xff)) { /* check 0xff just in case */ + /* Read capability ID, and store pointers to ones we care about. */ + if (pread(dev->config.fd, &cap_id, sizeof(cap_id), dev->config.offset + cap_ptr) != sizeof(cap_id)) + cap_id = 0; + switch (cap_id) { + case 0x01: + vfio_log(" PM"); + dev->pm_cap = cap_ptr; + break; + + case 0x05: + vfio_log(" MSI"); + if (dev->msi_cap) /* multiple copies not permitted by spec */ + break; + dev->msi_cap = cap_ptr; + + /* Read control register. */ + if (pread(dev->config.fd, &dev->irq.msi.ctl, sizeof(dev->irq.msi.ctl), + dev->config.offset + dev->msi_cap + 2) + != sizeof(dev->irq.msi.ctl)) + dev->irq.msi.ctl = 0; + + /* Set vector count. */ + dev->irq.msi.vector_count = (dev->irq.msi.ctl >> 1) & 0x07; + break; + + case 0x10: + vfio_log(" PCIe"); + dev->pcie_cap = cap_ptr; + break; + + case 0x11: + vfio_log(" MSI-X"); + if (dev->msix_cap) /* multiple copies not permitted by spec */ + break; + dev->msix_cap = cap_ptr; + + /* Read control register. */ + if (pread(dev->config.fd, &dev->irq.msix.ctl, sizeof(dev->irq.msix.ctl), + dev->config.offset + dev->msix_cap + 2) + != sizeof(dev->irq.msix.ctl)) + dev->irq.msix.ctl = 0; + + /* Set vector count. */ + dev->irq.msix.vector_count = (dev->irq.msix.ctl & 0x07ff) + 1; + + /* Read table and PBA BARs and offsets. */ + if (pread(dev->config.fd, &dev->irq.msix.table_offset, sizeof(dev->irq.msix.table_offset), + dev->config.offset + dev->msix_cap + 4) + != sizeof(dev->irq.msix.table_offset)) + dev->irq.msix.table_offset = 0x00000007; + dev->irq.msix.table_bar = dev->irq.msix.table_offset & 0x00000007; + dev->irq.msix.table_offset &= 0xfffffff8; + + if (pread(dev->config.fd, &dev->irq.msix.pba_offset, sizeof(dev->irq.msix.pba_offset), + dev->config.offset + dev->msix_cap + 8) + != sizeof(dev->irq.msix.pba_offset)) + dev->irq.msix.pba_offset = 0x00000007; + dev->irq.msix.pba_bar = dev->irq.msix.pba_offset & 0x00000007; + dev->irq.msix.pba_offset &= 0xfffffff8; + + /* Allocate table and PBA structures. */ + dev->irq.msix.table_size = dev->irq.msix.vector_count << 4; + dev->irq.msix.table = malloc(dev->irq.msix.table_size); + if (!dev->irq.msix.table) { + pclog("VFIO %s: MSI-X table malloc(%d) failed\n", dev->name, dev->irq.msix.table_size); + dev->irq.msix.table_size = dev->irq.msix.vector_count = 0; + } + + dev->irq.msix.pba_size = ((dev->irq.msix.vector_count - 1) >> 3) + 1; + dev->irq.msix.pba = malloc(dev->irq.msix.pba_size); + if (!dev->irq.msix.pba) { + pclog("VFIO %s: MSI-X PBA malloc(%d) failed\n", dev->name, dev->irq.msix.pba_size); + dev->irq.msix.pba_size = dev->irq.msix.vector_count = 0; + } + + /* Add table and PBA mappings. + Being added after region setup, they should override the main BAR mapping. */ + mem_mapping_add(&dev->irq.msix.table_mapping, 0, 0, + vfio_irq_msix_table_readb, + vfio_irq_msix_table_readw, + vfio_irq_msix_table_readl, + vfio_irq_msix_table_writeb, + vfio_irq_msix_table_writew, + vfio_irq_msix_table_writel, + NULL, MEM_MAPPING_EXTERNAL, dev); + + mem_mapping_add(&dev->irq.msix.pba_mapping, 0, 0, + vfio_irq_msix_pba_readb, + vfio_irq_msix_pba_readw, + vfio_irq_msix_pba_readl, + vfio_irq_msix_pba_writeb, + vfio_irq_msix_pba_writew, + vfio_irq_msix_pba_writel, + NULL, MEM_MAPPING_EXTERNAL, dev); + break; + + case 0x13: + vfio_log(" AF"); + dev->af_cap = cap_ptr; + break; + + default: + vfio_log(" [%02X]", cap_id); + break; + } + + /* Read pointer to the next capability. */ + if (pread(dev->config.fd, &cap_ptr, sizeof(cap_ptr), dev->config.offset + cap_ptr + 1) != sizeof(cap_ptr)) + cap_ptr = 0; + } + + vfio_log("\n"); + } + + /* Read INTx IRQ pin. */ + vfio_irq_intx_setpin(dev); + + /* Add PCI card while mapping the configuration space. */ + pci_add_card(PCI_ADD_NORMAL, vfio_config_readb, vfio_config_writeb, dev, &dev->slot); + + return 0; + +end: + if (dev->fd >= 0) + close(dev->fd); + return 1; +} + +static void +vfio_dev_close(vfio_device_t *dev) +{ + vfio_log("VFIO %s: close()\n", dev->name); + + /* Close all regions. */ + for (uint8_t i = 0; i < 6; i++) + vfio_region_close(dev, &dev->bars[i]); + vfio_region_close(dev, &dev->rom); + vfio_region_close(dev, &dev->config); + vfio_region_close(dev, &dev->vga_io_lo); + vfio_region_close(dev, &dev->vga_io_hi); + vfio_region_close(dev, &dev->vga_mem); + + /* Close device fd. */ + if (dev->fd >= 0) { + close(dev->fd); + dev->fd = -1; + } + + /* Clean up. */ + if (dev->irq.msix.table) + free(dev->irq.msix.table); + if (dev->irq.msix.pba) + free(dev->irq.msix.pba); + free(dev->name); +} + +void +vfio_unmap_dma(uint32_t offset, uint32_t size) +{ + struct vfio_iommu_type1_dma_unmap dma_unmap = { + .argsz = sizeof(dma_unmap), + .iova = offset, + .size = size + }; + + vfio_log("VFIO: unmap_dma(%08X, %d)\n", offset, size); + + /* Unmap DMA region. */ + if (!ioctl(container_fd, VFIO_IOMMU_UNMAP_DMA, &dma_unmap)) + return; + + vfio_log("VFIO: unmap_dma(%08X, %d) failed (%d)\n", offset, size, errno); +} + +void +vfio_map_dma(uint8_t *ptr, uint32_t offset, uint32_t size) +{ + struct vfio_iommu_type1_dma_map dma_map = { + .argsz = sizeof(dma_map), + .vaddr = (uint64_t) ptr, + .iova = offset, + .size = size, + .flags = VFIO_DMA_MAP_FLAG_READ | VFIO_DMA_MAP_FLAG_WRITE + }; + + vfio_log("VFIO: map_dma(%08X, %d)\n", offset, size); + + /* Map DMA region. */ + if (!ioctl(container_fd, VFIO_IOMMU_MAP_DMA, &dma_map)) + return; + + /* QEMU says mapping should be retried in case of EBUSY. */ + if (errno == EBUSY) { + vfio_unmap_dma(offset, size); + if (!ioctl(container_fd, VFIO_IOMMU_MAP_DMA, &dma_map)) + return; + } + + pclog("VFIO: map_dma(%08X, %d) failed (%d)\n", offset, size, errno); +} + +static void +vfio_reset(void *priv) +{ + vfio_log("VFIO: reset()\n"); + + /* Pre-reset and figure out the reset type for all devices. */ + int size; + int count; + struct vfio_pci_hot_reset_info *hot_reset_info; + struct vfio_pci_dependent_device *devices; + char name[13]; + vfio_group_t *group = first_group; + vfio_device_t *dev; + while (group) { + dev = group->first_device; + while (dev) { + /* Pre-reset this device. */ + vfio_dev_prereset(dev); + + /* Clear hot reset capable flag for this device. */ + dev->can_hot_reset = 0; + + /* Get hot reset information for the first time to get the entry count. */ + size = sizeof(struct vfio_pci_hot_reset_info); + hot_reset_info = (struct vfio_pci_hot_reset_info *) malloc(size); + if (!hot_reset_info) { + vfio_log("VFIO %s: malloc(hot_reset_info) 1 failed\n", dev->name); + goto next1; + } + memset(hot_reset_info, 0, size); + hot_reset_info->argsz = size; + if (ioctl(dev->fd, VFIO_DEVICE_GET_PCI_HOT_RESET_INFO, hot_reset_info) && (errno != ENOSPC)) { + vfio_log("VFIO %s: GET_PCI_HOT_RESET_INFO 1 failed (%d)\n", dev->name, errno); + goto next1; + } + count = hot_reset_info->count; + free(hot_reset_info); + + /* Get hot reset information for the second time to get the actual entries. */ + size = sizeof(struct vfio_pci_hot_reset) + (sizeof(struct vfio_pci_dependent_device) * count); + hot_reset_info = (struct vfio_pci_hot_reset_info *) malloc(size); + if (!hot_reset_info) { + vfio_log("VFIO %s: malloc(hot_reset_info) 2 failed\n", dev->name); + goto next1; + } + memset(hot_reset_info, 0, size); + hot_reset_info->argsz = size; + if (ioctl(dev->fd, VFIO_DEVICE_GET_PCI_HOT_RESET_INFO, hot_reset_info)) { + vfio_log("VFIO %s: GET_PCI_HOT_RESET_INFO 2 failed (%d)\n", dev->name, errno); + goto next1; + } + devices = &hot_reset_info->devices[0]; + + /* Go through the dependent device entries. */ + for (int i = 0; i < count; i++) { + /* Build this dependent device's name. */ + snprintf(name, sizeof(name), "%04x:%02x:%02x.%1x", + devices[i].segment, devices[i].bus, + PCI_SLOT(devices[i].devfn), PCI_FUNC(devices[i].devfn)); + + /* Check if we own this device's group. */ + if (!vfio_group_get(devices[i].group_id, 0)) { + vfio_log("VFIO %s: Cannot hot reset; we don't own" + "group %d for dependent device %s\n", + dev->name, devices[i].group_id, name); + goto next1; + } + } + + /* Mark this device as hot reset capable. */ + dev->can_hot_reset = 1; + +next1: + if (hot_reset_info) + free(hot_reset_info); + dev = dev->next; + } + group = group->next; + } + + /* Count the number of groups we own. */ + count = 0; + group = first_group; + while (group) { + count++; + group = group->next; + } + + /* Allocate hot reset structure. */ + struct vfio_pci_hot_reset *hot_reset; + size = sizeof(struct vfio_pci_hot_reset) + (sizeof(int32_t) * count); + hot_reset = (struct vfio_pci_hot_reset *) calloc(1, size); + hot_reset->argsz = size; + int32_t *fds = &hot_reset->group_fds[0]; + + /* Add group fds. */ + group = first_group; + while (group) { + fds[hot_reset->count++] = group->fd; + group = group->next; + } + + /* Reset all devices. */ + group = first_group; + while (group) { + dev = group->first_device; + while (dev) { + /* Try function-level reset. + I don't really understand the !pm_reset check, but QEMU does it. */ + if (dev->can_reset && (!dev->can_pm_reset || dev->can_flr_reset)) { + if (ioctl(dev->fd, VFIO_DEVICE_RESET)) + vfio_log("VFIO %s: DEVICE_RESET 1 failed (%d)\n", dev->name, errno); + else { + vfio_log("VFIO %s: FLR reset successful\n", dev->name); + goto next2; + } + } + + /* Try hot reset. */ + if (dev->can_hot_reset) { + if (ioctl(dev->fd, VFIO_DEVICE_PCI_HOT_RESET, hot_reset)) + vfio_log("VFIO %s: PCI_HOT_RESET failed (%d)\n", dev->name, errno); + else { + vfio_log("VFIO %s: Hot reset successful\n", dev->name); + goto next2; + } + } + + /* Try PM reset. */ + if (dev->can_reset && dev->can_pm_reset) { + if (ioctl(dev->fd, VFIO_DEVICE_RESET)) + vfio_log("VFIO %s: DEVICE_RESET 2 failed (%d)\n", dev->name, errno); + else { + vfio_log("VFIO %s: PM reset successful\n", dev->name); + goto next2; + } + } + + /* Warn if no reset types were successful. */ + pclog("VFIO %s: Device was not reset!\n", dev->name); + +next2: + dev = dev->next; + } + group = group->next; + } + + /* Clean up. */ + free(hot_reset); + + /* Post-reset all devices. */ + group = first_group; + while (group) { + dev = group->first_device; + while (dev) { + vfio_dev_postreset(dev); + dev = dev->next; + } + group = group->next; + } +} + +void +vfio_init(void) +{ + vfio_log("VFIO: init()\n"); + + /* Stay quiet if VFIO is not configured. */ + char *category = "VFIO", + *devices = config_get_string(category, "devices", NULL); + if (!devices || !strlen(devices)) + return; + + /* Open VFIO container. */ + container_fd = open("/dev/vfio/vfio", O_RDWR); + if (container_fd < 0) { + pclog("VFIO: Container not found (is vfio-pci loaded?)\n"); + return; + } + + /* Check VFIO API version. */ + int api = ioctl(container_fd, VFIO_GET_API_VERSION); + if (api != VFIO_API_VERSION) { + pclog("VFIO: Unknown API version %d (expected %d)\n", api, VFIO_API_VERSION); + goto close_container; + } + + /* Check for Type1 IOMMU support. */ + if (!ioctl(container_fd, VFIO_CHECK_EXTENSION, VFIO_TYPE1_IOMMU)) { + pclog("VFIO: Type1 IOMMU not supported\n"); + goto close_container; + } + + /* Parse device list. */ + char *strtok_save; + char *token = strtok_r(devices, " ", &strtok_save); + char *p; + char *dev_name; + char *sysfs_device; + char *config_key; + int i; + int domain_id; + int bus_id; + int dev_id; + int func_id; + vfio_device_t *dev = NULL; + vfio_device_t *prev_dev; + vfio_group_t *group; + while (token) { + /* Determine if the device was specified by location or sysfs path. */ + dev_name = NULL; + if (token[0] == '/') { + /* sysfs path: use basename as device name. */ + i = strlen(token); + dev_name = malloc(i + 1); + strncpy(dev_name, path_get_basename(token), i); + + /* Just append iommu_group to the path. */ + sysfs_device = malloc(i + 13); + snprintf(sysfs_device, i + 13, + "%s/iommu_group", token); + } else if (token[0]) { + /* Location: read domain/bus/device/function. */ + i = sscanf(token, "%x:%x:%x.%x", &domain_id, &bus_id, &dev_id, &func_id); + if (i < 3) { + domain_id = 0; + i = sscanf(token, "%x:%x.%x", &bus_id, &dev_id, &func_id); + if (i < 2) { + bus_id = 0; + i = sscanf(token, "%x.%x", &dev_id, &func_id); + if (i < 1) { + pclog("VFIO: Invalid device location: %s\n", token); + goto next; + } else if (i == 1) { + func_id = 0; + } + } else if (i == 2) { + func_id = 0; + } + } else if (i == 3) { + func_id = 0; + } + + /* Use dddd:bb:dd.f as device name. */ + dev_name = malloc(13); + snprintf(dev_name, 13, + "%04x:%02x:%02x.%1x", domain_id, bus_id, dev_id, func_id); + + /* Generate sysfs path. */ + sysfs_device = malloc(46); + snprintf(sysfs_device, 46, + "/sys/bus/pci/devices/%s/iommu_group", dev_name); + } else { + /* Skip blank token. */ + goto next; + } + + pclog("VFIO %s: IOMMU group ", dev_name); + + p = realpath(sysfs_device, NULL); + free(sysfs_device); + if (p) { + /* Parse group ID. */ + if (sscanf(path_get_basename(p), "%d", &i) != 1) { + pclog("path could not be parsed: %s\n", p); + free(p); + goto next; + } + + pclog("%d\n", i); + free(p); + } else { + /* No symlink found, move on to the next device. */ + pclog("not found (%d)\n", errno); + goto next; + } + + /* Get group by ID, and move on to the next device + if the group failed to initialize. (Not viable, etc.) */ + group = vfio_group_get(i, 1); + if (group->fd < 0) { + pclog("VFIO %s: Skipping because group failed to initialize\n", dev_name); + goto next; + } + + /* Allocate device structure. */ + prev_dev = group->current_device; + dev = group->current_device = (vfio_device_t *) calloc(1, sizeof(vfio_device_t)); + + /* Initialize device structure. */ + dev->name = dev_name; + dev_name = NULL; /* don't free it further down */ + dev->irq.type = VFIO_PCI_NUM_IRQS; + + /* Read device-specific settings. */ + i = strlen(token) + 8; + config_key = malloc(i); + snprintf(config_key, i, "%s_rom_fn", token); + dev->rom_fn = config_get_string(category, config_key, NULL); + free(config_key); + + /* Add to linked device list. */ + if (prev_dev) + prev_dev->next = dev; + else + group->first_device = dev; + +next: /* Clean up. */ + if (dev_name) + free(dev_name); + + /* Read next device name. */ + token = strtok_r(NULL, " ", &strtok_save); + } + + /* Stop if no devices were added. */ + if (!dev) + goto close_container; + + /* Set IOMMU type. */ + if (ioctl(container_fd, VFIO_SET_IOMMU, VFIO_TYPE1_IOMMU)) { + pclog("VFIO: SET_IOMMU failed (%d)\n", errno); + goto close_container; + } + + /* Map RAM to container for DMA. */ + vfio_map_dma(ram, 0, 1024UL * MIN(mem_size, 1048576)); + if (ram2) + vfio_map_dma(ram2, 1024UL * 1048576, 1024UL * (mem_size - 1048576)); + + /* Initialize epoll. */ + epoll_fd = epoll_create1(0); + if (epoll_fd < 0) { + pclog("VFIO: epoll_create1 failed (%d)\n", errno); + goto close_container; + } + + /* Initialize IRQ thread wake eventfd. */ + irq_thread_wake_fd = eventfd(0, 0); + if (irq_thread_wake_fd <= 0) { + pclog("VFIO: eventfd failed (%d)\n", errno); + goto close_container; + } + struct epoll_event event = { .events = EPOLLIN }; + if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, irq_thread_wake_fd, &event) < 0) { + pclog("VFIO: EPOLL_CTL_ADD failed (%d)\n", errno); + goto close_container; + } + + /* Initialize and start IRQ thread. */ + irq_event = thread_create_event(); + irq_thread_resume = thread_create_event(); + thread_set_event(irq_thread_resume); + irq_thread = thread_create(vfio_irq_thread, NULL); + + /* Start IRQ timer. */ + timer_add(&irq_timer, vfio_irq_timer, NULL, 0); + vfio_irq_timer(NULL); + + /* Initialize all devices. */ + current_group = first_group; + while (current_group) { + prev_dev = NULL; + dev = current_group->first_device; + while (dev) { + current_group->current_device = dev; + if (vfio_dev_init(dev)) { + pclog("VFIO %s: dev_init failed\n", dev->name); + + /* Deallocate this device if initialization failed. */ + if (prev_dev) + prev_dev->next = dev->next; + else + current_group->first_device = dev->next; + dev = dev->next; + free(current_group->current_device); + continue; + } + prev_dev = dev; + dev = dev->next; + } + current_group = current_group->next; + } + + /* Reset all devices. */ + vfio_log("VFIO: Performing initial reset\n"); + closing = 0; + + /* Add device_t to keep track of reset and close. */ + device_add(&vfio_device); + +close_container: + close(container_fd); + container_fd = -1; +} + +void +vfio_close(void *priv) +{ + vfio_log("VFIO: close()\n"); + + /* Reset all devices. */ + closing = 1; + vfio_reset(priv); + + /* Stop IRQ timer. */ + timer_on_auto(&irq_timer, 0.0); + + /* Stop IRQ thread by closing the epoll fd. */ + if (epoll_fd >= 0) { + close(epoll_fd); + epoll_fd = -1; + } + thread_set_event(irq_thread_resume); + + /* Close all groups. */ + while (first_group) { + current_group = first_group; + + /* Close all devices. */ + while (current_group->first_device) { + current_group->current_device = current_group->first_device; + + /* Close device. */ + vfio_dev_close(current_group->current_device); + + /* Deallocate device. */ + current_group->first_device = current_group->current_device->next; + free(current_group->current_device); + } + + /* Close group fd. */ + if (current_group->fd >= 0) + close(current_group->fd); + + /* Deallocate group. */ + first_group = current_group->next; + free(current_group); + } + + /* Close container. */ + if (container_fd >= 0) { + close(container_fd); + container_fd = -1; + } +} + +static void +vfio_speed_changed(void *priv) +{ + /* Set operation timings. */ + timing_readb = (int) (pci_timing * timing_default.read_b); + timing_readw = (int) (pci_timing * timing_default.read_w); + timing_readl = (int) (pci_timing * timing_default.read_l); + timing_writeb = (int) (pci_timing * timing_default.write_b); + timing_writew = (int) (pci_timing * timing_default.write_w); + timing_writel = (int) (pci_timing * timing_default.write_l); +} + +static const device_t vfio_device = { + .name = "VFIO PCI Passthrough", + .internal_name = "vfio", + .flags = DEVICE_PCI, + .local = 0, + .init = NULL, + .close = vfio_close, + .reset = vfio_reset, + .available = NULL, + .speed_changed = vfio_speed_changed, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/device/zenith_scratchpad.c b/src/device/zenith_scratchpad.c index 0db40c3f0..f71a9aada 100644 --- a/src/device/zenith_scratchpad.c +++ b/src/device/zenith_scratchpad.c @@ -9,8 +9,6 @@ * Emulation of various Zenith PC compatible machines. * Currently only the Zenith Data Systems Supersport is emulated. * - * - * * Authors: Tux, * Miran Grca, * TheCollector1995, diff --git a/src/discord.c b/src/discord.c index 18faee696..091d4c95f 100644 --- a/src/discord.c +++ b/src/discord.c @@ -8,8 +8,6 @@ * * Discord integration module. * - * - * * Authors: David Hrdlička, * * Copyright 2019 David Hrdlička. diff --git a/src/disk/hdc.c b/src/disk/hdc.c index 1e0d3f2bb..eb6c3a1b3 100644 --- a/src/disk/hdc.c +++ b/src/disk/hdc.c @@ -8,8 +8,6 @@ * * Common code to handle all sorts of disk controllers. * - * - * * Authors: Miran Grca, * Fred N. van Kempen, * diff --git a/src/disk/hdc_esdi_at.c b/src/disk/hdc_esdi_at.c index 64d292250..4838c23d3 100644 --- a/src/disk/hdc_esdi_at.c +++ b/src/disk/hdc_esdi_at.c @@ -8,8 +8,6 @@ * * Driver for the ESDI controller (WD1007-vse1) for PC/AT. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, diff --git a/src/disk/hdc_esdi_mca.c b/src/disk/hdc_esdi_mca.c index e59ae981d..78a2f3183 100644 --- a/src/disk/hdc_esdi_mca.c +++ b/src/disk/hdc_esdi_mca.c @@ -52,15 +52,12 @@ * however, are auto-configured by the system software as * shown above. * - * - * * Authors: Sarah Walker, * Fred N. van Kempen, * * Copyright 2008-2018 Sarah Walker. * Copyright 2017-2018 Fred N. van Kempen. */ - #include #include #include diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index e8c9fb05e..566f255e9 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -9,8 +9,6 @@ * Implementation of the IDE emulation for hard disks and ATAPI * CD-ROM devices. * - * - * * Authors: Sarah Walker, * Miran Grca, * @@ -812,7 +810,7 @@ ide_set_signature(ide_t *ide) ide->tf->sector = 1; ide->tf->head = 0; ide->tf->secount = 1; - ide->tf->cylinder = (ide->type == IDE_ATAPI_SHADOW) ? 0x0000 : ide_signatures[ide->type & ~IDE_SHADOW]; + ide->tf->cylinder = ide_signatures[ide->type & ~IDE_SHADOW]; if (ide->type == IDE_HDD) ide->drive = 0; @@ -1581,7 +1579,7 @@ ide_reset_registers(ide_t *ide) ide->tf->atastat = DRDY_STAT | DSC_STAT; ide->tf->error = 1; ide->tf->secount = 1; - ide->tf->cylinder = (ide->type == IDE_ATAPI_SHADOW) ? 0x0000 : ide_signatures[ide->type & ~IDE_SHADOW]; + ide->tf->cylinder = ide_signatures[ide->type & ~IDE_SHADOW]; ide->tf->sector = 1; ide->tf->head = 0; @@ -2100,6 +2098,8 @@ ide_readb(uint16_t addr, void *priv) case 0x4: /* Cylinder low */ if (ide->type == IDE_NONE) ret = 0x7f; + else if (ide->type == IDE_ATAPI_SHADOW) + ret = 0x00; else ret = ide->tf->cylinder & 0xff; #if defined(ENABLE_IDE_LOG) && (ENABLE_IDE_LOG == 2) @@ -2111,6 +2111,8 @@ ide_readb(uint16_t addr, void *priv) case 0x5: /* Cylinder high */ if (ide->type == IDE_NONE) ret = 0x7f; + else if (ide->type == IDE_ATAPI_SHADOW) + ret = 0x00; else ret = ide->tf->cylinder >> 8; #if defined(ENABLE_IDE_LOG) && (ENABLE_IDE_LOG == 2) diff --git a/src/disk/hdc_ide_ali5213.c b/src/disk/hdc_ide_ali5213.c index 67f959e1a..ff837cbc6 100644 --- a/src/disk/hdc_ide_ali5213.c +++ b/src/disk/hdc_ide_ali5213.c @@ -8,8 +8,6 @@ * * Implementation of the ALi M1489 chipset. * - * - * * Authors: Tiseno100, * Miran Grca, * diff --git a/src/disk/hdc_ide_cmd640.c b/src/disk/hdc_ide_cmd640.c index dbdf32dcf..ea2a195d9 100644 --- a/src/disk/hdc_ide_cmd640.c +++ b/src/disk/hdc_ide_cmd640.c @@ -694,3 +694,18 @@ const device_t ide_cmd640_pci_single_channel_sec_device = { .force_redraw = NULL, .config = NULL }; + +const device_t ide_cmd640_pci_single_channel_legacy_only_device = { + .name = "CMD PCI-0640B PCI (Legacy Mode Only)", + .internal_name = "ide_cmd640_pci_single_channel_legacy_only", + .flags = DEVICE_PCI, + .local = 0x20000, + .init = cmd640_init, + .close = cmd640_close, + .reset = cmd640_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + diff --git a/src/disk/hdc_ide_rz1000.c b/src/disk/hdc_ide_rz1000.c index 6b7aa68e8..56568cc2c 100644 --- a/src/disk/hdc_ide_rz1000.c +++ b/src/disk/hdc_ide_rz1000.c @@ -51,6 +51,7 @@ typedef struct rz1000_t { int irq_mode[2]; int irq_pin; int irq_line; + uint8_t type; } rz1000_t; static int next_id = 0; @@ -197,9 +198,12 @@ rz1000_reset(void *priv) rz1000_log("dev->local = %08X\n", dev->local); + dev->type = ((dev->local >> 8) & 0x01); + rz1000_log("dev->type = %04X\n", dev->type); + dev->regs[0x00] = 0x42; /* PC Technology */ dev->regs[0x01] = 0x10; - dev->regs[0x02] = 0x00; /* RZ-1000 */ + dev->regs[0x02] = dev->type; /* RZ-1000/RZ-1001 */ dev->regs[0x03] = 0x10; dev->regs[0x04] = 0x00; dev->regs[0x07] = 0x02; /* DEVSEL timing: 01 medium */ @@ -296,3 +300,17 @@ const device_t ide_rz1000_pci_single_channel_device = { .force_redraw = NULL, .config = NULL }; + +const device_t ide_rz1001_pci_device = { + .name = "PC Technology RZ-1001 PCI", + .internal_name = "ide_rz1001_pci", + .flags = DEVICE_PCI, + .local = 0x60100, + .init = rz1000_init, + .close = rz1000_close, + .reset = rz1000_reset, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/disk/hdc_ide_sff8038i.c b/src/disk/hdc_ide_sff8038i.c index 50deac38a..15dd4c515 100644 --- a/src/disk/hdc_ide_sff8038i.c +++ b/src/disk/hdc_ide_sff8038i.c @@ -10,8 +10,6 @@ * word 0 - base address * word 1 - bits 1-15 = byte count, bit 31 = end of transfer * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/disk/hdc_st506_at.c b/src/disk/hdc_st506_at.c index ed7b29d1f..5e50c44f0 100644 --- a/src/disk/hdc_st506_at.c +++ b/src/disk/hdc_st506_at.c @@ -12,8 +12,6 @@ * based design. Most cards were WD1003-WA2 or -WAH, where the * -WA2 cards had a floppy controller as well (to save space.) * - * - * * Authors: Sarah Walker, * Fred N. van Kempen, * diff --git a/src/disk/hdc_st506_xt.c b/src/disk/hdc_st506_xt.c index a7313ca63..de2536d83 100644 --- a/src/disk/hdc_st506_xt.c +++ b/src/disk/hdc_st506_xt.c @@ -41,8 +41,6 @@ * Since all controllers (including the ones made by DTC) use * (mostly) the same API, we keep them all in this module. * - * - * * Authors: Fred N. van Kempen, * Sarah Walker, * diff --git a/src/disk/hdc_xta_ps1.c b/src/disk/hdc_xta_ps1.c index ea71c918b..4a4273333 100644 --- a/src/disk/hdc_xta_ps1.c +++ b/src/disk/hdc_xta_ps1.c @@ -41,8 +41,6 @@ * Type table with the main code, so the user can only select * items from that list... * - * - * * Authors: Fred N. van Kempen, * * Based on my earlier HD20 driver for the EuroPC. diff --git a/src/disk/hdc_xtide.c b/src/disk/hdc_xtide.c index 63067f579..de79bca1b 100644 --- a/src/disk/hdc_xtide.c +++ b/src/disk/hdc_xtide.c @@ -21,8 +21,6 @@ * already on their way out, the newer IDE standard based on the * PC/AT controller and 16b design became the IDE we now know. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, diff --git a/src/disk/hdd.c b/src/disk/hdd.c index e48af6b20..af4411ab0 100644 --- a/src/disk/hdd.c +++ b/src/disk/hdd.c @@ -8,8 +8,6 @@ * * Common code to handle all sorts of hard disk images. * - * - * * Authors: Miran Grca, * Fred N. van Kempen, * diff --git a/src/disk/hdd_image.c b/src/disk/hdd_image.c index 75c27f4d1..79de77965 100644 --- a/src/disk/hdd_image.c +++ b/src/disk/hdd_image.c @@ -8,8 +8,6 @@ * * Handling of hard disk image files. * - * - * * Authors: Miran Grca, * Fred N. van Kempen, * diff --git a/src/disk/hdd_table.c b/src/disk/hdd_table.c index 12a0040ef..e0ff57b3f 100644 --- a/src/disk/hdd_table.c +++ b/src/disk/hdd_table.c @@ -9,8 +9,6 @@ * Implementation of the IDE emulation for hard disks and ATAPI * CD-ROM devices. * - * - * * Authors: Miran Grca, * Fred N. van Kempen, * diff --git a/src/dma.c b/src/dma.c index 2265947b9..bfc294f2a 100644 --- a/src/dma.c +++ b/src/dma.c @@ -8,8 +8,6 @@ * * Implementation of the Intel DMA controllers. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, @@ -1008,7 +1006,7 @@ dma_page_read(uint16_t addr, UNUSED(void *priv)) if (((addr & 0xfffc) == 0x80) && (CS == 0xf000) && ((cpu_state.pc & 0xfffffff8) == 0x00007278) && - !strcmp(machine_get_internal_name(), "megapc")) switch (addr) { + (machines[machine].init == machine_at_wd76c10_init)) switch (addr) { /* The Amstrad MegaPC Quadtel BIOS times a sequence of: mov ax,di div bx diff --git a/src/floppy/CMakeLists.txt b/src/floppy/CMakeLists.txt index c16ca06f4..c51d3717c 100644 --- a/src/floppy/CMakeLists.txt +++ b/src/floppy/CMakeLists.txt @@ -10,9 +10,12 @@ # # Authors: David Hrdlička, # Jasmine Iwanek, +# Toni Riikonen, # # Copyright 2020-2021 David Hrdlička. # Copyright 2024 Jasmine Iwanek. +# Copyright 2025 Toni Riikonen. +# All rights reserved. # add_library(fdd OBJECT @@ -31,6 +34,7 @@ add_library(fdd OBJECT fdd_pcjs.c fdd_mfm.c fdd_td0.c + fdd_audio.c ) add_subdirectory(lzw) diff --git a/src/floppy/fdc.c b/src/floppy/fdc.c index 9d68365d2..09886d6f8 100644 --- a/src/floppy/fdc.c +++ b/src/floppy/fdc.c @@ -9,13 +9,13 @@ * Implementation of the NEC uPD-765 and compatible floppy disk * controller. * - * - * * Authors: Sarah Walker, * Miran Grca, + * Toni Riikonen, * * Copyright 2008-2020 Sarah Walker. * Copyright 2016-2020 Miran Grca. + * Copyright 2025 Toni Riikonen. */ #include #include @@ -470,9 +470,9 @@ 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); + ((fdc->pretrk & 0x07) << 2) | + (fdc->power_down ? 0x40 : 0x00) | + ((fdc_read(0x03f2, fdc) & 0x04) ? 0x80 : 0x00); return ret; } @@ -532,36 +532,36 @@ fdc_update_rate(fdc_t *fdc, int drive) fdc->enh_mode && !(fdc->flags & FDC_FLAG_SMC661)) fdc->bit_rate = 500; else if ((fdc->rwc[drive] == 3) && fdc->enh_mode && - !(fdc->flags & FDC_FLAG_SMC661)) + !(fdc->flags & FDC_FLAG_SMC661)) fdc->bit_rate = 250; else switch (fdc->rate) { - default: - break; - case 0: /*High density*/ - fdc->bit_rate = 500; - break; - case 1: /*Double density (360 rpm)*/ - switch (fdc->drvrate[drive]) { - default: - break; - case 0: - fdc->bit_rate = 300; - break; - case 1: - fdc->bit_rate = 500; - break; - case 2: - fdc->bit_rate = 2000; - break; - } - break; - case 2: /*Double density*/ - fdc->bit_rate = 250; - break; - case 3: /*Extended density*/ - fdc->bit_rate = 1000; - break; - } + default: + break; + case 0: /*High density*/ + fdc->bit_rate = 500; + break; + case 1: /*Double density (360 rpm)*/ + switch (fdc->drvrate[drive]) { + default: + break; + case 0: + fdc->bit_rate = 300; + break; + case 1: + fdc->bit_rate = 500; + break; + case 2: + fdc->bit_rate = 2000; + break; + } + break; + case 2: /*Double density*/ + fdc->bit_rate = 250; + break; + case 3: /*Extended density*/ + fdc->bit_rate = 1000; + break; + } fdc->bitcell_period = (1000000 / fdc->bit_rate) * 2; /*Bitcell period in ns*/ } @@ -664,11 +664,38 @@ real_drive(fdc_t *fdc, int drive) return drive; } +/* FDD notifies FDC when seek operation is complete */ +void +fdc_seek_complete_interrupt(fdc_t *fdc, int drive) +{ + if (!fdc) { + fdc_log("ERROR: fdc_seek_complete_interrupt called with NULL fdc!\n"); + return; + } + + if (FDC_FLAG_PCJR & fdc->flags) { + fdc->fintr = 1; + fdc->interrupt = -4; + fdc_callback(fdc); + return; + } + + fdc_log("FDD %c: Seek complete interrupt\n", 0x41 + drive); + + fdc->fintr = 1; + fdc->interrupt = -3; + fdc->st0 = 0x20 | (drive & 3); + if (fdd_get_head(drive)) + fdc->st0 |= 0x04; + + fdc_callback(fdc); +} + void fdc_seek(fdc_t *fdc, int drive, int params) { fdd_seek(real_drive(fdc, drive), params); - fdc->stat |= (1 << fdc->drive); + fdc->stat = (fdc->stat & 0x0F) | 0x10 | (1 << fdc->drive); } static void @@ -692,8 +719,10 @@ fdc_io_command_phase1(fdc_t *fdc, int out) fdc->dtl = fdc->params[7]; fdc->rw_track = fdc->params[1]; + int implied_seek = 0; if (fdc->config & 0x40) { if (fdc->rw_track != fdc->pcn[fdc->params[0] & 3]) { + implied_seek = 1; fdc_seek(fdc, fdc->drive, ((int) fdc->rw_track) - ((int) fdc->pcn[fdc->params[0] & 3])); fdc->pcn[fdc->params[0] & 3] = fdc->rw_track; } @@ -703,6 +732,12 @@ fdc_io_command_phase1(fdc_t *fdc, int out) ui_sb_update_icon_write(SB_FLOPPY | real_drive(fdc, fdc->drive), 1); else ui_sb_update_icon(SB_FLOPPY | real_drive(fdc, fdc->drive), 1); + + if (implied_seek && !fdd_get_turbo(real_drive(fdc, fdc->drive))) { + fdc->stat = (fdc->stat & 0x0F) | 0x10 | (1 << real_drive(fdc, fdc->drive)); /* CB=1, per-drive busy */ + return; + } + fdc->stat = out ? 0x10 : 0x50; if ((fdc->flags & FDC_FLAG_PCJR) || !fdc->dma) { fdc->stat |= 0x20; @@ -764,7 +799,7 @@ fdc_soft_reset(fdc_t *fdc) } fdc_ctrl_reset(fdc); - } + } } static void @@ -779,565 +814,566 @@ fdc_write(uint16_t addr, uint8_t val, void *priv) cycles -= ISA_CYCLES(8); - if (!fdc->power_down || ((addr & 7) == 2) || ((addr & 7) == 4)) switch (addr & 7) { - case 0: - return; - case 1: - return; - case 2: /*DOR*/ - if (fdc->flags & FDC_FLAG_PCJR) { - if ((fdc->dor & 0x40) && !(val & 0x40)) { - timer_set_delay_u64(&fdc->watchdog_timer, 1000 * TIMER_USEC); - fdc->watchdog_count = 1000; - picintc(1 << fdc->irq); - } - if ((val & 0x80) && !(fdc->dor & 0x80)) { - timer_set_delay_u64(&fdc->timer, 8 * TIMER_USEC); - fdc->interrupt = -1; - ui_sb_update_icon(SB_FLOPPY | 0, 0); - ui_sb_update_icon_write(SB_FLOPPY | 0, 0); - fdc_ctrl_reset(fdc); - } - if (!fdd_get_flags(0)) - val &= 0xfe; - fdd_set_motor_enable(0, val & 0x01); - fdc->st0 &= ~0x07; - fdc->st0 |= (fdd_get_head(0) ? 4 : 0); - } else { - /* - 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)); - fdc->stat = 0x00; - fdc->pnum = fdc->ptot = 0; - } - if ((val & 4) && !(fdc->dor & 4)) - fdc_soft_reset(fdc); - /* We can now simplify this since each motor now spins separately. */ - for (int i = 0; i < FDD_NUM; i++) { - drive_num = real_drive(fdc, i); - if ((!fdd_get_flags(drive_num)) || (drive_num >= FDD_NUM)) - val &= ~(0x10 << drive_num); - else - fdd_set_motor_enable(i, (val & (0x10 << drive_num))); - } - drive_num = real_drive(fdc, val & 0x03); - current_drive = drive_num; - fdc->st0 = (fdc->st0 & 0xf8) | (val & 0x03) | (fdd_get_head(drive_num) ? 4 : 0); - } - fdc->dor = val; - return; - case 3: /* TDR */ - if (fdc->enh_mode) { - if (fdc->flags & FDC_FLAG_SMC661) { - fdc_set_swap(fdc, !!(val & 0x20)); - fdc_update_densel_force(fdc, (val & 0x18) >> 3); + if (!fdc->power_down || ((addr & 7) == 2) || ((addr & 7) == 4)) + switch (addr & 7) { + case 0: + return; + case 1: + return; + case 2: /*DOR*/ + if (fdc->flags & FDC_FLAG_PCJR) { + if ((fdc->dor & 0x40) && !(val & 0x40)) { + timer_set_delay_u64(&fdc->watchdog_timer, 1000 * TIMER_USEC); + fdc->watchdog_count = 1000; + picintc(1 << fdc->irq); + } + if ((val & 0x80) && !(fdc->dor & 0x80)) { + timer_set_delay_u64(&fdc->timer, 8 * TIMER_USEC); + fdc->interrupt = -1; + ui_sb_update_icon(SB_FLOPPY | 0, 0); + ui_sb_update_icon_write(SB_FLOPPY | 0, 0); + fdc_ctrl_reset(fdc); + } + if (!fdd_get_flags(0)) + val &= 0xfe; + fdd_set_motor_enable(0, val & 0x01); + fdc->st0 &= ~0x07; + fdc->st0 |= (fdd_get_head(0) ? 4 : 0); } else { - drive = real_drive(fdc, fdc->dor & 3); - fdc_update_rwc(fdc, drive, (val & 0x30) >> 4); + /* + 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)); + fdc->stat = 0x00; + fdc->pnum = fdc->ptot = 0; + } + if ((val & 4) && !(fdc->dor & 4)) + fdc_soft_reset(fdc); + /* We can now simplify this since each motor now spins separately. */ + for (int i = 0; i < FDD_NUM; i++) { + drive_num = real_drive(fdc, i); + if ((!fdd_get_flags(drive_num)) || (drive_num >= FDD_NUM)) + val &= ~(0x10 << drive_num); + else + fdd_set_motor_enable(i, (val & (0x10 << drive_num))); + } + drive_num = real_drive(fdc, val & 0x03); + current_drive = drive_num; + fdc->st0 = (fdc->st0 & 0xf8) | (val & 0x03) | (fdd_get_head(drive_num) ? 4 : 0); } - } - /* Bit 2: FIFO test mode (PS/55 5550-S,T only. Undocumented) - The Power-on Self Test of PS/55 writes and verifies 8 bytes of FIFO buffer through I/O 3F5h. - If it fails, then floppy drives will be treated as DD drives. */ - if (fdc->flags & FDC_FLAG_PS2_MCA) { - if (val & 0x04) { - fdc->tfifo = 8; - fdc->fifointest = 1; - } else { - fdc->tfifo = 1; - fdc->fifointest = 0; + fdc->dor = val; + return; + case 3: /* TDR */ + if (fdc->enh_mode) { + if (fdc->flags & FDC_FLAG_SMC661) { + fdc_set_swap(fdc, !!(val & 0x20)); + fdc_update_densel_force(fdc, (val & 0x18) >> 3); + } else { + drive = real_drive(fdc, fdc->dor & 3); + fdc_update_rwc(fdc, drive, (val & 0x30) >> 4); + } } - fifo_reset(fdc->fifo_p); - fifo_set_len(fdc->fifo_p, fdc->tfifo + 1); - fifo_set_trigger_len(fdc->fifo_p, fdc->tfifo + 1); - } - return; - case 4: /* DSR */ - if (!(fdc->flags & FDC_FLAG_NO_DSR_RESET)) { - if (!(val & 0x80)) { - timer_set_delay_u64(&fdc->timer, 8 * TIMER_USEC); - fdc->interrupt = -6; + /* Bit 2: FIFO test mode (PS/55 5550-S,T only. Undocumented) + The Power-on Self Test of PS/55 writes and verifies 8 bytes of FIFO buffer through I/O 3F5h. + If it fails, then floppy drives will be treated as DD drives. */ + if (fdc->flags & FDC_FLAG_PS2_MCA) { + if (val & 0x04) { + fdc->tfifo = 8; + fdc->fifointest = 1; + } else { + fdc->tfifo = 1; + fdc->fifointest = 0; + } + fifo_reset(fdc->fifo_p); + fifo_set_len(fdc->fifo_p, fdc->tfifo + 1); + fifo_set_trigger_len(fdc->fifo_p, fdc->tfifo + 1); } - if (fdc->power_down || ((val & 0x80) && !(fdc->dsr & 0x80))) - fdc_soft_reset(fdc); - } - fdc->dsr = val; - return; - case 5: /*Command register*/ - if (fdc->fifointest) { - /* Write FIFO buffer in the test mode (PS/55) */ - fdc_log("FIFO buffer position = %X\n", ((fifo_t *) fdc->fifo_p)->end); - fifo_write(val, fdc->fifo_p); - if (fifo_get_full(fdc->fifo_p)) - fdc->stat &= ~0x80; - break; - } - if ((fdc->stat & 0xf0) == 0xb0) { - if ((fdc->flags & FDC_FLAG_PCJR) || !fdc->fifo) { - fdc->dat = val; - fdc->stat &= ~0x80; - } else { + return; + case 4: /* DSR */ + if (!(fdc->flags & FDC_FLAG_NO_DSR_RESET)) { + if (!(val & 0x80)) { + timer_set_delay_u64(&fdc->timer, 8 * TIMER_USEC); + fdc->interrupt = -6; + } + if (fdc->power_down || ((val & 0x80) && !(fdc->dsr & 0x80))) + fdc_soft_reset(fdc); + } + fdc->dsr = val; + return; + case 5: /*Command register*/ + if (fdc->fifointest) { + /* Write FIFO buffer in the test mode (PS/55) */ + fdc_log("FIFO buffer position = %X\n", ((fifo_t *) fdc->fifo_p)->end); fifo_write(val, fdc->fifo_p); if (fifo_get_full(fdc->fifo_p)) fdc->stat &= ~0x80; + break; } - break; - } - if (fdc->pnum == fdc->ptot) { - if ((fdc->stat & 0xf0) != 0x80) { - /* If bit 4 of the MSR is set, or the MSR is 0x00, - the fdc_t is NOT in the command phase, therefore - do NOT accept commands. */ - return; + if ((fdc->stat & 0xf0) == 0xb0) { + if ((fdc->flags & FDC_FLAG_PCJR) || !fdc->fifo) { + fdc->dat = val; + fdc->stat &= ~0x80; + } else { + fifo_write(val, fdc->fifo_p); + if (fifo_get_full(fdc->fifo_p)) + fdc->stat &= ~0x80; + } + break; } + if (fdc->pnum == fdc->ptot) { + if ((fdc->stat & 0xf0) != 0x80) { + /* If bit 4 of the MSR is set, or the MSR is 0x00, + the fdc_t is NOT in the command phase, therefore + do NOT accept commands. */ + return; + } - fdc->stat &= 0xf; + fdc->stat &= 0xf; - fdc->tc = 0; - fdc->data_ready = 0; + fdc->tc = 0; + fdc->data_ready = 0; - fdc->command = val; - fdc->stat |= 0x10; - fdc_log("Starting FDC command %02X\n", fdc->command); - fdc->error = 0; + fdc->command = val; + fdc->stat |= 0x10; + fdc_log("Starting FDC command %02X\n", fdc->command); + fdc->error = 0; - if (((fdc->command & 0x1f) == 0x02) || ((fdc->command & 0x1f) == 0x05) || - ((fdc->command & 0x1f) == 0x06) || ((fdc->command & 0x1f) == 0x0a) || - ((fdc->command & 0x1f) == 0x0c) || ((fdc->command & 0x1f) == 0x0d) || - ((fdc->command & 0x1f) == 0x11) || ((fdc->command & 0x1f) == 0x16) || - ((fdc->command & 0x1f) == 0x19) || ((fdc->command & 0x1f) == 0x1d)) - fdc->processed_cmd = fdc->command & 0x1f; - else - fdc->processed_cmd = fdc->command; + if (((fdc->command & 0x1f) == 0x02) || ((fdc->command & 0x1f) == 0x05) || + ((fdc->command & 0x1f) == 0x06) || ((fdc->command & 0x1f) == 0x0a) || + ((fdc->command & 0x1f) == 0x0c) || ((fdc->command & 0x1f) == 0x0d) || + ((fdc->command & 0x1f) == 0x11) || ((fdc->command & 0x1f) == 0x16) || + ((fdc->command & 0x1f) == 0x19) || ((fdc->command & 0x1f) == 0x1d)) + fdc->processed_cmd = fdc->command & 0x1f; + else + fdc->processed_cmd = fdc->command; - switch (fdc->processed_cmd) { - case 0x01: /*Mode*/ - if (fdc->flags & FDC_FLAG_NSC) { - fdc->pnum = 0; - fdc->ptot = 4; + switch (fdc->processed_cmd) { + case 0x01: /*Mode*/ + if (fdc->flags & FDC_FLAG_NSC) { + fdc->pnum = 0; + fdc->ptot = 4; + fdc->stat |= 0x90; + fdc->format_state = 0; + } else + fdc_bad_command(fdc); + break; + case 0x02: /*Read track*/ + fdc->satisfying_sectors = 0; + fdc->sc = 0; + fdc->wrong_am = 0; + fdc->pnum = 0; + fdc->ptot = 8; fdc->stat |= 0x90; - fdc->format_state = 0; - } else - fdc_bad_command(fdc); - break; - case 0x02: /*Read track*/ - fdc->satisfying_sectors = 0; - fdc->sc = 0; - fdc->wrong_am = 0; - fdc->pnum = 0; - fdc->ptot = 8; - fdc->stat |= 0x90; - fdc->mfm = (fdc->command & 0x40) ? 1 : 0; - break; - case 0x03: /*Specify*/ - fdc->pnum = 0; - fdc->ptot = 2; - fdc->stat |= 0x90; - break; - case 0x04: /*Sense drive status*/ - fdc->pnum = 0; - fdc->ptot = 1; - fdc->stat |= 0x90; - break; - case 0x05: /*Write data*/ - case 0x09: /*Write deleted data*/ - fdc->satisfying_sectors = 0; - fdc->sc = 0; - fdc->wrong_am = 0; - fdc->deleted = ((fdc->command & 0x1F) == 9) ? 1 : 0; - fdc->pnum = 0; - fdc->ptot = 8; - fdc->stat |= 0x90; - fdc->mfm = (fdc->command & 0x40) ? 1 : 0; - break; - case 0x06: /*Read data*/ - case 0x0c: /*Read deleted data*/ - case 0x11: /*Scan equal*/ - case 0x19: /*Scan low or equal*/ - case 0x16: /*Verify*/ - case 0x1d: /*Scan high or equal*/ - fdc->satisfying_sectors = 0; - fdc->sc = 0; - fdc->wrong_am = 0; - fdc->deleted = ((fdc->command & 0x1F) == 0xC) ? 1 : 0; - if ((fdc->command & 0x1F) == 0x16) - fdc->deleted = 2; - fdc->deleted |= (fdc->command & 0x20); - fdc->pnum = 0; - fdc->ptot = 8; - fdc->stat |= 0x90; - fdc->mfm = (fdc->command & 0x40) ? 1 : 0; - break; - case 0x17: /*Powerdown mode*/ - if (!(fdc->flags & FDC_FLAG_ALI)) { - fdc_bad_command(fdc); + fdc->mfm = (fdc->command & 0x40) ? 1 : 0; break; - } - fallthrough; - case 0x07: /*Recalibrate*/ - fdc->pnum = 0; - fdc->ptot = 1; - fdc->stat |= 0x90; - break; - case 0x08: /*Sense interrupt status*/ - fdc_log("fdc->fintr = %i, fdc->reset_stat = %i\n", fdc->fintr, fdc->reset_stat); - fdc->lastdrive = fdc->drive; - fdc_sis(fdc); - break; - case 0x0a: /*Read sector ID*/ - fdc->pnum = 0; - fdc->ptot = 1; - fdc->stat |= 0x90; - fdc->mfm = (fdc->command & 0x40) ? 1 : 0; - break; - case 0x0d: /*Format track*/ - fdc->pnum = 0; - fdc->ptot = 5; - fdc->stat |= 0x90; - fdc->mfm = (fdc->command & 0x40) ? 1 : 0; - fdc->format_state = 0; - break; - case 0x0e: /*Dump registers*/ - if (fdc->flags & FDC_FLAG_NEC) { - fdc_bad_command(fdc); + case 0x03: /*Specify*/ + fdc->pnum = 0; + fdc->ptot = 2; + fdc->stat |= 0x90; break; - } - fdc->lastdrive = fdc->drive; - fdc->interrupt = 0x0e; - fdc_callback(fdc); - break; - case 0x0f: /*Seek*/ - fdc->pnum = 0; - fdc->ptot = 2; - fdc->stat |= 0x90; - break; - case 0x18: /*NSC*/ - if (!(fdc->flags & FDC_FLAG_NSC)) { - fdc_bad_command(fdc); - break; - } - fallthrough; - case 0x10: /*Get version*/ - case 0x14: /*Unlock*/ - case 0x94: /*Lock*/ - if (fdc->flags & FDC_FLAG_NEC) { - fdc_bad_command(fdc); - break; - } - fdc->lastdrive = fdc->drive; - fdc->interrupt = fdc->command; - fdc_callback(fdc); - break; - case 0x12: /*Set perpendicular mode*/ - if ((fdc->flags & FDC_FLAG_AT) && !(fdc->flags & FDC_FLAG_PCJR)) { + case 0x04: /*Sense drive status*/ fdc->pnum = 0; fdc->ptot = 1; fdc->stat |= 0x90; - } else - fdc_bad_command(fdc); - break; - case 0x13: /*Configure*/ - if (fdc->flags & FDC_FLAG_NEC) { - fdc_bad_command(fdc); break; - } - fdc->pnum = 0; - fdc->ptot = 3; - fdc->stat |= 0x90; - break; - default: - fdc_bad_command(fdc); - break; - } - } else { - fdc->stat = 0x10 | (fdc->stat & 0xf); - fdc->params[fdc->pnum++] = val; - if (fdc->pnum == 1) { - if (command_has_drivesel[fdc->command & 0x1F]) { - if (fdc->flags & FDC_FLAG_PCJR) - fdc->drive = 0; - else - fdc->drive = fdc->dor & 3; - fdc->rw_drive = fdc->params[0] & 3; - if (((fdc->command & 0x1F) == 7) || ((fdc->command & 0x1F) == 15)) - fdc->stat |= (1 << real_drive(fdc, fdc->drive)); - } - } - if (fdc->pnum == fdc->ptot) { - fdc_log("Got all params %02X\n", fdc->command); - fifo_reset(fdc->fifo_p); - fdc->interrupt = fdc->processed_cmd; - fdc->reset_stat = 0; - /* Disable timer if enabled. */ - timer_disable(&fdc->timer); - /* Start timer if needed at this point. */ - switch (fdc->interrupt & 0x1f) { - case 0x02: /* Read a track */ - case 0x03: /* Specify */ - case 0x0a: /* Read sector ID */ - case 0x05: /* Write data */ - case 0x06: /* Read data */ - case 0x09: /* Write deleted data */ - case 0x0c: /* Read deleted data */ - case 0x11: /* Scan equal */ - case 0x12: /* Perpendicular mode */ - case 0x16: /* Verify */ - case 0x19: /* Scan low or equal */ - case 0x1d: /* Scan high or equal */ - /* Do nothing. */ + case 0x05: /*Write data*/ + case 0x09: /*Write deleted data*/ + fdc->satisfying_sectors = 0; + fdc->sc = 0; + fdc->wrong_am = 0; + fdc->deleted = ((fdc->command & 0x1F) == 9) ? 1 : 0; + fdc->pnum = 0; + fdc->ptot = 8; + fdc->stat |= 0x90; + fdc->mfm = (fdc->command & 0x40) ? 1 : 0; break; - case 0x07: /* Recalibrate */ - case 0x0f: /* Seek */ - if (fdc->flags & FDC_FLAG_PCJR) - timer_set_delay_u64(&fdc->timer, 1000 * TIMER_USEC); - else - timer_set_delay_u64(&fdc->timer, 256 * TIMER_USEC); + case 0x06: /*Read data*/ + case 0x0c: /*Read deleted data*/ + case 0x11: /*Scan equal*/ + case 0x19: /*Scan low or equal*/ + case 0x16: /*Verify*/ + case 0x1d: /*Scan high or equal*/ + fdc->satisfying_sectors = 0; + fdc->sc = 0; + fdc->wrong_am = 0; + fdc->deleted = ((fdc->command & 0x1F) == 0xC) ? 1 : 0; + if ((fdc->command & 0x1F) == 0x16) + fdc->deleted = 2; + fdc->deleted |= (fdc->command & 0x20); + fdc->pnum = 0; + fdc->ptot = 8; + fdc->stat |= 0x90; + fdc->mfm = (fdc->command & 0x40) ? 1 : 0; break; - default: - timer_set_delay_u64(&fdc->timer, 256 * TIMER_USEC); - break; - } - /* Process the firt phase of the command. */ - switch (fdc->processed_cmd) { - case 0x02: /* Read a track */ - fdc_io_command_phase1(fdc, 0); - fdc->read_track_sector.id.c = fdc->params[1]; - fdc->read_track_sector.id.h = fdc->params[2]; - fdc->read_track_sector.id.r = 1; - fdc->read_track_sector.id.n = fdc->params[4]; - if ((fdc->head & 0x01) && !fdd_is_double_sided(real_drive(fdc, fdc->drive))) { - fdc_noidam(fdc); - return; + case 0x17: /*Powerdown mode*/ + if (!(fdc->flags & FDC_FLAG_ALI)) { + fdc_bad_command(fdc); + break; } - fdd_readsector(real_drive(fdc, fdc->drive), SECTOR_FIRST, fdc->params[1], fdc->head, fdc->rate, fdc->params[4]); - break; - case 0x03: /* Specify */ - fdc->stat = 0x80; - fdc->specify[0] = fdc->params[0]; - fdc->specify[1] = fdc->params[1]; - fdc->dma = (fdc->specify[1] & 1) ^ 1; - if (!fdc->dma) - dma_set_drq(fdc->dma_ch, 0); - break; - case 0x04: /*Sense drive status*/ - fdd_set_head(real_drive(fdc, fdc->drive), (fdc->params[0] & 4) ? 1 : 0); - break; - case 0x05: /* Write data */ - case 0x09: /* Write deleted data */ - fdc_io_command_phase1(fdc, 1); - if ((fdc->head & 0x01) && !fdd_is_double_sided(real_drive(fdc, fdc->drive))) { - fdc_noidam(fdc); - return; - } - fdd_writesector(real_drive(fdc, fdc->drive), fdc->sector, fdc->params[1], fdc->head, fdc->rate, fdc->params[4]); - break; - case 0x11: /* Scan equal */ - case 0x19: /* Scan low or equal */ - case 0x1d: /* Scan high or equal */ - fdc_io_command_phase1(fdc, 1); - if ((fdc->head & 0x01) && !fdd_is_double_sided(real_drive(fdc, fdc->drive))) { - fdc_noidam(fdc); - return; - } - fdd_comparesector(real_drive(fdc, fdc->drive), fdc->sector, fdc->params[1], fdc->head, fdc->rate, fdc->params[4]); - break; - case 0x16: /* Verify */ - if (fdc->params[0] & 0x80) - fdc->sc = fdc->params[7]; fallthrough; - case 0x06: /* Read data */ - case 0x0c: /* Read deleted data */ - fdc_io_command_phase1(fdc, 0); - fdc_log("Reading sector (drive %i) (%i) (%i %i %i %i) (%i %i %i)\n", fdc->drive, fdc->params[0], fdc->params[1], fdc->params[2], fdc->params[3], fdc->params[4], fdc->params[5], fdc->params[6], fdc->params[7]); - if ((fdc->head & 0x01) && !fdd_is_double_sided(real_drive(fdc, fdc->drive))) { - fdc_noidam(fdc); - return; - } - if (((dma_mode(2) & 0x0C) == 0x00) && !(fdc->flags & FDC_FLAG_PCJR) && fdc->dma) { - /* DMA is in verify mode, treat this like a VERIFY command. */ - fdc_log("Verify-mode read!\n"); - fdc->tc = 1; - fdc->deleted |= 2; - } - fdd_readsector(real_drive(fdc, fdc->drive), fdc->sector, fdc->params[1], fdc->head, fdc->rate, fdc->params[4]); + case 0x07: /*Recalibrate*/ + fdc->pnum = 0; + fdc->ptot = 1; + fdc->stat |= 0x90; break; - - case 0x07: /* Recalibrate */ - fdc->rw_drive = fdc->params[0] & 3; - fdc->stat = (1 << real_drive(fdc, fdc->drive)); - if (!(fdc->flags & FDC_FLAG_PCJR)) - fdc->stat |= 0x80; - fdc->st0 = fdc->params[0] & 3; - fdc->st0 |= fdd_get_head(real_drive(fdc, fdc->drive)) ? 0x04 : 0x00; - fdc->st0 |= 0x80; - drive_num = real_drive(fdc, fdc->drive); - /* Three conditions under which the command should fail. */ - if ((drive_num >= FDD_NUM) || !fdd_get_flags(drive_num) || !motoron[drive_num] || fdd_track0(drive_num)) { - fdc_log("Failed recalibrate\n"); - if ((drive_num >= FDD_NUM) || !fdd_get_flags(drive_num) || !motoron[drive_num]) - fdc->st0 = 0x70 | (fdc->params[0] & 3); - else - fdc->st0 = 0x20 | (fdc->params[0] & 3); - fdc->pcn[fdc->params[0] & 3] = 0; - if (fdc->flags & FDC_FLAG_PCJR) { - fdc->fintr = 1; - fdc->interrupt = -4; - } else { - timer_disable(&fdc->timer); - fdc->interrupt = -3; - fdc_callback(fdc); - } + case 0x08: /*Sense interrupt status*/ + fdc_log("fdc->fintr = %i, fdc->reset_stat = %i\n", fdc->fintr, fdc->reset_stat); + fdc->lastdrive = fdc->drive; + fdc_sis(fdc); + break; + case 0x0a: /*Read sector ID*/ + fdc->pnum = 0; + fdc->ptot = 1; + fdc->stat |= 0x90; + fdc->mfm = (fdc->command & 0x40) ? 1 : 0; + break; + case 0x0d: /*Format track*/ + fdc->pnum = 0; + fdc->ptot = 5; + fdc->stat |= 0x90; + fdc->mfm = (fdc->command & 0x40) ? 1 : 0; + fdc->format_state = 0; + break; + case 0x0e: /*Dump registers*/ + if (fdc->flags & FDC_FLAG_NEC) { + fdc_bad_command(fdc); break; } - if ((real_drive(fdc, fdc->drive) != 1) || fdc->drv2en) - fdc_seek(fdc, fdc->drive, -fdc->max_track); - fdc_log("Recalibrating...\n"); - fdc->seek_dir = fdc->step = 1; + fdc->lastdrive = fdc->drive; + fdc->interrupt = 0x0e; + fdc_callback(fdc); break; - case 0x0a: /* Read sector ID */ - fdc_rate(fdc, fdc->drive); - fdc->head = (fdc->params[0] & 4) ? 1 : 0; - fdd_set_head(real_drive(fdc, fdc->drive), (fdc->params[0] & 4) ? 1 : 0); - if ((real_drive(fdc, fdc->drive) != 1) || fdc->drv2en) { - fdd_readaddress(real_drive(fdc, fdc->drive), fdc->head, fdc->rate); - if ((fdc->flags & FDC_FLAG_PCJR) || !fdc->dma) - fdc->stat = 0x70; - else - fdc->stat = 0x50; + case 0x0f: /*Seek*/ + fdc->pnum = 0; + fdc->ptot = 2; + fdc->stat |= 0x90; + break; + case 0x18: /*NSC*/ + if (!(fdc->flags & FDC_FLAG_NSC)) { + fdc_bad_command(fdc); + break; + } + fallthrough; + case 0x10: /*Get version*/ + case 0x14: /*Unlock*/ + case 0x94: /*Lock*/ + if (fdc->flags & FDC_FLAG_NEC) { + fdc_bad_command(fdc); + break; + } + fdc->lastdrive = fdc->drive; + fdc->interrupt = fdc->command; + fdc_callback(fdc); + break; + case 0x12: /*Set perpendicular mode*/ + if ((fdc->flags & FDC_FLAG_AT) && !(fdc->flags & FDC_FLAG_PCJR)) { + fdc->pnum = 0; + fdc->ptot = 1; + fdc->stat |= 0x90; } else - fdc_noidam(fdc); + fdc_bad_command(fdc); break; - case 0x0d: /* Format */ - fdc_rate(fdc, fdc->drive); - fdc->head = (fdc->params[0] & 4) ? 1 : 0; - fdd_set_head(real_drive(fdc, fdc->drive), (fdc->params[0] & 4) ? 1 : 0); - fdc->gap = fdc->params[3]; - fdc->format_sectors = fdc->params[2]; - fdc->format_n = fdc->params[1]; - fdc->format_state = 1; - fdc->stat = 0x10; - break; - case 0x0f: /* Seek */ - fdc->rw_drive = fdc->params[0] & 3; - fdc->stat = (1 << fdc->drive); - if (!(fdc->flags & FDC_FLAG_PCJR)) - fdc->stat |= 0x80; - fdc->head = 0; /* TODO: See if this is correct. */ - fdc->st0 = fdc->params[0] & 0x03; - fdc->st0 |= (fdc->params[0] & 4); - fdc->st0 |= 0x80; - fdd_set_head(real_drive(fdc, fdc->drive), (fdc->params[0] & 4) ? 1 : 0); - drive_num = real_drive(fdc, fdc->drive); - /* Three conditions under which the command should fail. */ - if (!fdd_get_flags(drive_num) || (drive_num >= FDD_NUM) || !motoron[drive_num]) { - /* Yes, failed SEEK's still report success, unlike failed RECALIBRATE's. */ - fdc->st0 = 0x20 | (fdc->params[0] & 3); - if (fdc->command & 0x80) { - if (fdc->command & 0x40) - fdc->pcn[fdc->params[0] & 3] += fdc->params[1]; - else - fdc->pcn[fdc->params[0] & 3] -= fdc->params[1]; - } else - fdc->pcn[fdc->params[0] & 3] = fdc->params[1]; - if (fdc->flags & FDC_FLAG_PCJR) { - fdc->fintr = 1; - fdc->interrupt = -4; - } else { - timer_disable(&fdc->timer); - fdc->interrupt = -3; - fdc_callback(fdc); - } + case 0x13: /*Configure*/ + if (fdc->flags & FDC_FLAG_NEC) { + fdc_bad_command(fdc); break; } - if (fdc->command & 0x80) { - if (fdc->params[1]) { - if (fdc->command & 0x40) { - /* Relative seek inwards. */ - fdc->seek_dir = 0; - fdc_seek(fdc, fdc->drive, fdc->params[1]); - fdc->pcn[fdc->params[0] & 3] += fdc->params[1]; - } else { - /* Relative seek outwards. */ - fdc->seek_dir = 1; - fdc_seek(fdc, fdc->drive, -fdc->params[1]); - fdc->pcn[fdc->params[0] & 3] -= fdc->params[1]; - } - fdc->step = 1; - } else { - fdc->st0 = 0x20 | (fdc->params[0] & 3); - if (fdc->flags & FDC_FLAG_PCJR) { - fdc->fintr = 1; - fdc->interrupt = -4; - } else { - timer_disable(&fdc->timer); - fdc->interrupt = -3; - fdc_callback(fdc); - } - break; - } - } else { - fdc_log("Seeking to track %i (PCN = %i)...\n", fdc->params[1], fdc->pcn[fdc->params[0] & 3]); - if ((fdc->params[1] - fdc->pcn[fdc->params[0] & 3]) == 0) { - fdc_log("Failed seek\n"); - fdc->st0 = 0x20 | (fdc->params[0] & 3); - if (fdc->flags & FDC_FLAG_PCJR) { - fdc->fintr = 1; - fdc->interrupt = -4; - } else { - timer_disable(&fdc->timer); - fdc->interrupt = -3; - fdc_callback(fdc); - } - break; - } - if (fdc->params[1] > fdc->pcn[fdc->params[0] & 3]) - fdc->seek_dir = 0; - else - fdc->seek_dir = 1; - fdc_seek(fdc, fdc->drive, fdc->params[1] - fdc->pcn[fdc->params[0] & 3]); - fdc->pcn[fdc->params[0] & 3] = fdc->params[1]; - fdc->step = 1; - } + fdc->pnum = 0; + fdc->ptot = 3; + fdc->stat |= 0x90; break; - case 0x12: /* Perpendicular mode */ - fdc->stat = 0x80; - if (fdc->params[0] & 0x80) - fdc->perp = fdc->params[0] & 0x3f; - else { - fdc->perp &= 0xfc; - fdc->perp |= (fdc->params[0] & 0x03); - } - return; - default: + fdc_bad_command(fdc); break; } - } else - fdc->stat = 0x90 | (fdc->stat & 0xf); - } - return; - case 7: - if (!(fdc->flags & FDC_FLAG_TOSHIBA) && !(fdc->flags & FDC_FLAG_AT) && !(fdc->flags & FDC_FLAG_UMC)) - return; - fdc->rate = val & 0x03; - if (fdc->flags & FDC_FLAG_PS2) - fdc->noprec = !!(val & 0x04); - return; + } else { + fdc->stat = 0x10 | (fdc->stat & 0xf); + fdc->params[fdc->pnum++] = val; + if (fdc->pnum == 1) { + if (command_has_drivesel[fdc->command & 0x1F]) { + if (fdc->flags & FDC_FLAG_PCJR) + fdc->drive = 0; + else + fdc->drive = fdc->dor & 3; + fdc->rw_drive = fdc->params[0] & 3; + if (((fdc->command & 0x1F) == 7) || ((fdc->command & 0x1F) == 15)) + fdc->stat |= (1 << real_drive(fdc, fdc->drive)); + } + } + if (fdc->pnum == fdc->ptot) { + fdc_log("Got all params %02X\n", fdc->command); + fifo_reset(fdc->fifo_p); + fdc->interrupt = fdc->processed_cmd; + fdc->reset_stat = 0; + /* Disable timer if enabled. */ + timer_disable(&fdc->timer); + /* Start timer if needed at this point. */ + switch (fdc->interrupt & 0x1f) { + case 0x02: /* Read a track */ + case 0x03: /* Specify */ + case 0x0a: /* Read sector ID */ + case 0x05: /* Write data */ + case 0x06: /* Read data */ + case 0x09: /* Write deleted data */ + case 0x0c: /* Read deleted data */ + case 0x11: /* Scan equal */ + case 0x12: /* Perpendicular mode */ + case 0x16: /* Verify */ + case 0x19: /* Scan low or equal */ + case 0x1d: /* Scan high or equal */ + /* Do nothing. */ + break; + case 0x07: /* Recalibrate */ + case 0x0f: /* Seek */ + if (fdc->flags & FDC_FLAG_PCJR) + timer_set_delay_u64(&fdc->timer, 1000 * TIMER_USEC); + else + timer_set_delay_u64(&fdc->timer, 256 * TIMER_USEC); + break; + default: + timer_set_delay_u64(&fdc->timer, 256 * TIMER_USEC); + break; + } + /* Process the firt phase of the command. */ + switch (fdc->processed_cmd) { + case 0x02: /* Read a track */ + fdc_io_command_phase1(fdc, 0); + fdc->read_track_sector.id.c = fdc->params[1]; + fdc->read_track_sector.id.h = fdc->params[2]; + fdc->read_track_sector.id.r = 1; + fdc->read_track_sector.id.n = fdc->params[4]; + if ((fdc->head & 0x01) && !fdd_is_double_sided(real_drive(fdc, fdc->drive))) { + fdc_noidam(fdc); + return; + } + fdd_readsector(real_drive(fdc, fdc->drive), SECTOR_FIRST, fdc->params[1], fdc->head, fdc->rate, fdc->params[4]); + break; + case 0x03: /* Specify */ + fdc->stat = 0x80; + fdc->specify[0] = fdc->params[0]; + fdc->specify[1] = fdc->params[1]; + fdc->dma = (fdc->specify[1] & 1) ^ 1; + if (!fdc->dma) + dma_set_drq(fdc->dma_ch, 0); + break; + case 0x04: /*Sense drive status*/ + fdd_set_head(real_drive(fdc, fdc->drive), (fdc->params[0] & 4) ? 1 : 0); + break; + case 0x05: /* Write data */ + case 0x09: /* Write deleted data */ + fdc_io_command_phase1(fdc, 1); + if ((fdc->head & 0x01) && !fdd_is_double_sided(real_drive(fdc, fdc->drive))) { + fdc_noidam(fdc); + return; + } + fdd_writesector(real_drive(fdc, fdc->drive), fdc->sector, fdc->params[1], fdc->head, fdc->rate, fdc->params[4]); + break; + case 0x11: /* Scan equal */ + case 0x19: /* Scan low or equal */ + case 0x1d: /* Scan high or equal */ + fdc_io_command_phase1(fdc, 1); + if ((fdc->head & 0x01) && !fdd_is_double_sided(real_drive(fdc, fdc->drive))) { + fdc_noidam(fdc); + return; + } + fdd_comparesector(real_drive(fdc, fdc->drive), fdc->sector, fdc->params[1], fdc->head, fdc->rate, fdc->params[4]); + break; + case 0x16: /* Verify */ + if (fdc->params[0] & 0x80) + fdc->sc = fdc->params[7]; + fallthrough; + case 0x06: /* Read data */ + case 0x0c: /* Read deleted data */ + fdc_io_command_phase1(fdc, 0); + fdc_log("Reading sector (drive %i) (%i) (%i %i %i %i) (%i %i %i)\n", fdc->drive, fdc->params[0], fdc->params[1], fdc->params[2], fdc->params[3], fdc->params[4], fdc->params[5], fdc->params[6], fdc->params[7]); + if ((fdc->head & 0x01) && !fdd_is_double_sided(real_drive(fdc, fdc->drive))) { + fdc_noidam(fdc); + return; + } + if (((dma_mode(2) & 0x0C) == 0x00) && !(fdc->flags & FDC_FLAG_PCJR) && fdc->dma) { + /* DMA is in verify mode, treat this like a VERIFY command. */ + fdc_log("Verify-mode read!\n"); + fdc->tc = 1; + fdc->deleted |= 2; + } + fdd_readsector(real_drive(fdc, fdc->drive), fdc->sector, fdc->params[1], fdc->head, fdc->rate, fdc->params[4]); + break; - default: - break; - } + case 0x07: /* Recalibrate */ + fdc->rw_drive = fdc->params[0] & 3; + fdc->stat = (1 << real_drive(fdc, fdc->drive)); + if (!(fdc->flags & FDC_FLAG_PCJR)) + fdc->stat |= 0x80; + fdc->st0 = fdc->params[0] & 3; + fdc->st0 |= fdd_get_head(real_drive(fdc, fdc->drive)) ? 0x04 : 0x00; + fdc->st0 |= 0x80; + drive_num = real_drive(fdc, fdc->drive); + /* Three conditions under which the command should fail. */ + if ((drive_num >= FDD_NUM) || !fdd_get_flags(drive_num) || !motoron[drive_num] || fdd_track0(drive_num)) { + fdc_log("Failed recalibrate\n"); + if ((drive_num >= FDD_NUM) || !fdd_get_flags(drive_num) || !motoron[drive_num]) + fdc->st0 = 0x70 | (fdc->params[0] & 3); + else + fdc->st0 = 0x20 | (fdc->params[0] & 3); + fdc->pcn[fdc->params[0] & 3] = 0; + if (fdc->flags & FDC_FLAG_PCJR) { + fdc->fintr = 1; + fdc->interrupt = -4; + } else { + timer_disable(&fdc->timer); + fdc->interrupt = -3; + fdc_callback(fdc); + } + break; + } + if ((real_drive(fdc, fdc->drive) != 1) || fdc->drv2en) + fdc_seek(fdc, fdc->drive, -fdc->max_track); + fdc_log("Recalibrating...\n"); + fdc->seek_dir = fdc->step = 1; + break; + case 0x0a: /* Read sector ID */ + fdc_rate(fdc, fdc->drive); + fdc->head = (fdc->params[0] & 4) ? 1 : 0; + fdd_set_head(real_drive(fdc, fdc->drive), (fdc->params[0] & 4) ? 1 : 0); + if ((real_drive(fdc, fdc->drive) != 1) || fdc->drv2en) { + fdd_readaddress(real_drive(fdc, fdc->drive), fdc->head, fdc->rate); + if ((fdc->flags & FDC_FLAG_PCJR) || !fdc->dma) + fdc->stat = 0x70; + else + fdc->stat = 0x50; + } else + fdc_noidam(fdc); + break; + case 0x0d: /* Format */ + fdc_rate(fdc, fdc->drive); + fdc->head = (fdc->params[0] & 4) ? 1 : 0; + fdd_set_head(real_drive(fdc, fdc->drive), (fdc->params[0] & 4) ? 1 : 0); + fdc->gap = fdc->params[3]; + fdc->format_sectors = fdc->params[2]; + fdc->format_n = fdc->params[1]; + fdc->format_state = 1; + fdc->stat = 0x10; + break; + case 0x0f: /* Seek */ + fdc->rw_drive = fdc->params[0] & 3; + fdc->stat = (1 << fdc->drive); + if (!(fdc->flags & FDC_FLAG_PCJR)) + fdc->stat |= 0x80; + fdc->head = 0; /* TODO: See if this is correct. */ + fdc->st0 = fdc->params[0] & 0x03; + fdc->st0 |= (fdc->params[0] & 4); + fdc->st0 |= 0x80; + fdd_set_head(real_drive(fdc, fdc->drive), (fdc->params[0] & 4) ? 1 : 0); + drive_num = real_drive(fdc, fdc->drive); + /* Three conditions under which the command should fail. */ + if (!fdd_get_flags(drive_num) || (drive_num >= FDD_NUM) || !motoron[drive_num]) { + /* Yes, failed SEEK's still report success, unlike failed RECALIBRATE's. */ + fdc->st0 = 0x20 | (fdc->params[0] & 3); + if (fdc->command & 0x80) { + if (fdc->command & 0x40) + fdc->pcn[fdc->params[0] & 3] += fdc->params[1]; + else + fdc->pcn[fdc->params[0] & 3] -= fdc->params[1]; + } else + fdc->pcn[fdc->params[0] & 3] = fdc->params[1]; + if (fdc->flags & FDC_FLAG_PCJR) { + fdc->fintr = 1; + fdc->interrupt = -4; + } else { + timer_disable(&fdc->timer); + fdc->interrupt = -3; + fdc_callback(fdc); + } + break; + } + if (fdc->command & 0x80) { + if (fdc->params[1]) { + if (fdc->command & 0x40) { + /* Relative seek inwards. */ + fdc->seek_dir = 0; + fdc_seek(fdc, fdc->drive, fdc->params[1]); + fdc->pcn[fdc->params[0] & 3] += fdc->params[1]; + } else { + /* Relative seek outwards. */ + fdc->seek_dir = 1; + fdc_seek(fdc, fdc->drive, -fdc->params[1]); + fdc->pcn[fdc->params[0] & 3] -= fdc->params[1]; + } + fdc->step = 1; + } else { + fdc->st0 = 0x20 | (fdc->params[0] & 3); + if (fdc->flags & FDC_FLAG_PCJR) { + fdc->fintr = 1; + fdc->interrupt = -4; + } else { + timer_disable(&fdc->timer); + fdc->interrupt = -3; + fdc_callback(fdc); + } + break; + } + } else { + fdc_log("Seeking to track %i (PCN = %i)...\n", fdc->params[1], fdc->pcn[fdc->params[0] & 3]); + if ((fdc->params[1] - fdc->pcn[fdc->params[0] & 3]) == 0) { + fdc_log("Failed seek\n"); + fdc->st0 = 0x20 | (fdc->params[0] & 3); + if (fdc->flags & FDC_FLAG_PCJR) { + fdc->fintr = 1; + fdc->interrupt = -4; + } else { + timer_disable(&fdc->timer); + fdc->interrupt = -3; + fdc_callback(fdc); + } + break; + } + if (fdc->params[1] > fdc->pcn[fdc->params[0] & 3]) + fdc->seek_dir = 0; + else + fdc->seek_dir = 1; + fdc_seek(fdc, fdc->drive, fdc->params[1] - fdc->pcn[fdc->params[0] & 3]); + fdc->pcn[fdc->params[0] & 3] = fdc->params[1]; + fdc->step = 1; + } + break; + case 0x12: /* Perpendicular mode */ + fdc->stat = 0x80; + if (fdc->params[0] & 0x80) + fdc->perp = fdc->params[0] & 0x3f; + else { + fdc->perp &= 0xfc; + fdc->perp |= (fdc->params[0] & 0x03); + } + return; + + default: + break; + } + } else + fdc->stat = 0x90 | (fdc->stat & 0xf); + } + return; + case 7: + if (!(fdc->flags & FDC_FLAG_TOSHIBA) && !(fdc->flags & FDC_FLAG_AT) && !(fdc->flags & FDC_FLAG_UMC)) + return; + fdc->rate = val & 0x03; + if (fdc->flags & FDC_FLAG_PS2) + fdc->noprec = !!(val & 0x04); + return; + + default: + break; + } } uint8_t @@ -1349,213 +1385,214 @@ fdc_read(uint16_t addr, void *priv) cycles -= ISA_CYCLES(8); - if (!fdc->power_down || ((addr & 7) == 2)) switch (addr & 7) { - case 0: /* STA */ - if (fdc->flags & FDC_FLAG_PS2) { - drive = real_drive(fdc, fdc->dor & 3); - ret = 0x00; - /* TODO: - Bit 2: INDEX (best return always 0 as it goes by very fast) - */ - if (fdc->seek_dir) /* nDIRECTION */ - ret |= 0x01; - if (writeprot[drive]) /* WRITEPROT */ - ret |= 0x02; - if (!fdd_get_head(drive)) /* nHDSEL */ - ret |= 0x08; - if (fdd_track0(drive)) /* TRK0 */ - ret |= 0x10; - if (fdc->step) /* STEP */ - ret |= 0x20; - if (dma_get_drq(fdc->dma_ch)) /* DRQ */ - ret |= 0x40; - if (fdc->fintr || fdc->reset_stat) /* INTR */ - ret |= 0x80; - } else if (fdc->flags & FDC_FLAG_PS2_MCA) { - drive = real_drive(fdc, fdc->dor & 3); - ret = 0x04; - /* TODO: - Bit 2: nINDEX (best return always 1 as it goes by very fast) - */ - if (!fdc->seek_dir) /* DIRECTION */ - ret |= 0x01; - if (!writeprot[drive]) /* nWRITEPROT */ - ret |= 0x02; - if (fdd_get_head(drive)) /* HDSEL */ - ret |= 0x08; - if (!fdd_track0(drive)) /* nTRK0 */ - ret |= 0x10; - if (fdc->step) /* STEP */ - ret |= 0x20; - if (!fdd_get_type(1)) /* -Drive 2 Installed */ - ret |= 0x40; - if (fdc->fintr || fdc->reset_stat) /* INTR */ - ret |= 0x80; - } else - ret = 0xff; - break; - case 1: /* STB */ - if (fdc->flags & FDC_FLAG_PS2) { - drive = real_drive(fdc, fdc->dor & 3); - ret = 0x00; - if (!fdd_get_type(1)) /* -Drive 2 Installed */ - ret |= 0x80; - switch (drive) { /* -Drive Select 1,0 */ - case 0: - ret |= 0x43; - break; - case 1: - ret |= 0x23; - break; - case 2: - ret |= 0x62; - break; - case 3: - ret |= 0x61; - break; - - default: - break; - } - } else if (fdc->flags & FDC_FLAG_PS2_MCA) { - drive = real_drive(fdc, fdc->dor & 3); - ret = 0xc0; - ret |= (fdc->dor & 0x01) << 5; /* Drive Select 0 */ - ret |= (fdc->dor & 0x30) >> 4; /* Motor Select 1, 0 */ - } else { - if (is486 || !fdc->enable_3f1) + if (!fdc->power_down || ((addr & 7) == 2)) + switch (addr & 7) { + case 0: /* STA */ + if (fdc->flags & FDC_FLAG_PS2) { + drive = real_drive(fdc, fdc->dor & 3); + ret = 0x00; + /* TODO: + Bit 2: INDEX (best return always 0 as it goes by very fast) + */ + if (fdc->seek_dir) /* nDIRECTION */ + ret |= 0x01; + if (writeprot[drive]) /* WRITEPROT */ + ret |= 0x02; + if (!fdd_get_head(drive)) /* nHDSEL */ + ret |= 0x08; + if (fdd_track0(drive)) /* TRK0 */ + ret |= 0x10; + if (fdc->step) /* STEP */ + ret |= 0x20; + if (dma_get_drq(fdc->dma_ch)) /* DRQ */ + ret |= 0x40; + if (fdc->fintr || fdc->reset_stat) /* INTR */ + ret |= 0x80; + } else if (fdc->flags & FDC_FLAG_PS2_MCA) { + drive = real_drive(fdc, fdc->dor & 3); + ret = 0x04; + /* TODO: + Bit 2: nINDEX (best return always 1 as it goes by very fast) + */ + if (!fdc->seek_dir) /* DIRECTION */ + ret |= 0x01; + if (!writeprot[drive]) /* nWRITEPROT */ + ret |= 0x02; + if (fdd_get_head(drive)) /* HDSEL */ + ret |= 0x08; + if (!fdd_track0(drive)) /* nTRK0 */ + ret |= 0x10; + if (fdc->step) /* STEP */ + ret |= 0x20; + if (!fdd_get_type(1)) /* -Drive 2 Installed */ + ret |= 0x40; + if (fdc->fintr || fdc->reset_stat) /* INTR */ + ret |= 0x80; + } else ret = 0xff; - else { - if (fdc->flags & FDC_FLAG_UMC) { - drive = real_drive(fdc, fdc->dor & 1); - ret = !fdd_is_dd(drive) ? ((fdc->dor & 1) ? 2 : 1) : 0; - } else { - /* TODO: What is this and what is it used for? - It's almost identical to the PS/2 MCA mode. */ - drive = real_drive(fdc, fdc->dor & 3); - ret = 0x70; - ret &= ~(drive ? 0x40 : 0x20); - ret |= (fdc->dor & 0x30) >> 4; /* Motor Select 1, 0 */ + break; + case 1: /* STB */ + if (fdc->flags & FDC_FLAG_PS2) { + drive = real_drive(fdc, fdc->dor & 3); + ret = 0x00; + if (!fdd_get_type(1)) /* -Drive 2 Installed */ + ret |= 0x80; + switch (drive) { /* -Drive Select 1,0 */ + case 0: + ret |= 0x43; + break; + case 1: + ret |= 0x23; + break; + case 2: + ret |= 0x62; + break; + case 3: + ret |= 0x61; + break; + + default: + break; + } + } else if (fdc->flags & FDC_FLAG_PS2_MCA) { + drive = real_drive(fdc, fdc->dor & 3); + ret = 0xc0; + ret |= (fdc->dor & 0x01) << 5; /* Drive Select 0 */ + ret |= (fdc->dor & 0x30) >> 4; /* Motor Select 1, 0 */ + } else { + if (is486 || !fdc->enable_3f1) + ret = 0xff; + else { + if (fdc->flags & FDC_FLAG_UMC) { + drive = real_drive(fdc, fdc->dor & 1); + ret = !fdd_is_dd(drive) ? ((fdc->dor & 1) ? 2 : 1) : 0; + } else { + /* TODO: What is this and what is it used for? + It's almost identical to the PS/2 MCA mode. */ + drive = real_drive(fdc, fdc->dor & 3); + ret = 0x70; + ret &= ~(drive ? 0x40 : 0x20); + ret |= (fdc->dor & 0x30) >> 4; /* Motor Select 1, 0 */ + } } } - } - break; - case 2: - ret = fdc->dor; - break; - case 3: - drive = real_drive(fdc, fdc->dor & 3); - /* TODO: FDC_FLAG_PS2_TDR? */ - if ((fdc->flags & FDC_FLAG_PS2) || (fdc->flags & FDC_FLAG_PS2_MCA)) { - /* PS/1 Model 2121 seems return drive type in port - * 0x3f3, despite the 82077AA fdc_t not implementing - * this. This is presumably implemented outside the - * fdc_t on one of the motherboard's support chips. - * - * Confirmed: 00=1.44M 3.5 - * 10=2.88M 3.5 - * 20=1.2M 5.25 - * 30=1.2M 5.25 - * - * as reported by Configur.exe. - */ - if (fdd_is_525(drive)) - ret = 0x20; - else if (fdd_is_ed(drive)) - ret = 0x10; - else - ret = 0x00; - /* PS/55 POST throws an error and halt if ret = 1 or 2, somehow. */ - } else if (!fdc->enh_mode) - ret = 0x20; - else if (fdc->flags & FDC_FLAG_SMC661) - ret = (fdc->densel_force << 3) | ((!!fdc->swap) << 5) | (fdc->media_id << 6); - else - ret = (fdc->rwc[drive] << 4) | (fdc->media_id << 6); - break; - case 4: /*Status*/ - ret = fdc->stat; - break; - case 5: /*Data*/ - if (fdc->fifointest) { - /* Read FIFO buffer in the test mode (PS/55) */ - ret = fifo_read(fdc->fifo_p); break; - } - if ((fdc->stat & 0xf0) == 0xf0) { - fdc->stat &= ~0x80; - if ((fdc->flags & FDC_FLAG_PCJR) || !fdc->fifo) { - fdc->data_ready = 0; - ret = fdc->dat; - } else - ret = fifo_read(fdc->fifo_p); + case 2: + ret = fdc->dor; break; - } - if (fdc->paramstogo) { - fdc->stat &= ~0x80; - fdc_log("%i parameters to go\n", fdc->paramstogo); - fdc->paramstogo--; - ret = fdc->res[10 - fdc->paramstogo]; - if (!fdc->paramstogo) - fdc->stat = 0x80; - else - fdc->stat |= 0xC0; - } else if (fdc->dma) { - ret = fdc->dat; - break; - } else { - fdc->stat &= ~0x80; - if (lastbyte) - fdc->stat = 0x80; - lastbyte = 0; - ret = fdc->dat; - fdc->data_ready = 0; - } - fdc->stat &= 0xf0; - break; - case 7: /*Disk change*/ - drive = real_drive(fdc, fdc->dor & 3); - - if (fdc->flags & FDC_FLAG_PS2) { - if (fdc->dor & (0x10 << drive)) { - ret = (fdd_changed[drive] || drive_empty[drive]) ? 0x00 : 0x80; - ret |= (fdc->dor & 0x08); - ret |= (fdc->noprec << 2); - ret |= (fdc->rate & 0x03); - } else - ret = 0x00; - } else if (fdc->flags & FDC_FLAG_PS2_MCA) { - if (fdc->dor & (0x10 << drive)) { - ret = (fdd_changed[drive] || drive_empty[drive]) ? 0x80 : 0x00; - ret |= ((fdc->rate & 0x03) << 1); - ret |= fdc_get_densel(fdc, drive); - ret |= 0x78; - } else - ret = 0xf9; - } else { - if (fdc->dor & (0x10 << drive)) { - if ((drive == 1) && (fdc->flags & FDC_FLAG_TOSHIBA)) - ret = 0x00; + case 3: + drive = real_drive(fdc, fdc->dor & 3); + /* TODO: FDC_FLAG_PS2_TDR? */ + if ((fdc->flags & FDC_FLAG_PS2) || (fdc->flags & FDC_FLAG_PS2_MCA)) { + /* PS/1 Model 2121 seems return drive type in port + * 0x3f3, despite the 82077AA fdc_t not implementing + * this. This is presumably implemented outside the + * fdc_t on one of the motherboard's support chips. + * + * Confirmed: 00=1.44M 3.5 + * 10=2.88M 3.5 + * 20=1.2M 5.25 + * 30=1.2M 5.25 + * + * as reported by Configur.exe. + */ + if (fdd_is_525(drive)) + ret = 0x20; + else if (fdd_is_ed(drive)) + ret = 0x10; else + ret = 0x00; + /* PS/55 POST throws an error and halt if ret = 1 or 2, somehow. */ + } else if (!fdc->enh_mode) + ret = 0x20; + else if (fdc->flags & FDC_FLAG_SMC661) + ret = (fdc->densel_force << 3) | ((!!fdc->swap) << 5) | (fdc->media_id << 6); + else + ret = (fdc->rwc[drive] << 4) | (fdc->media_id << 6); + break; + case 4: /*Status*/ + ret = fdc->stat; + break; + case 5: /*Data*/ + if (fdc->fifointest) { + /* Read FIFO buffer in the test mode (PS/55) */ + ret = fifo_read(fdc->fifo_p); + break; + } + if ((fdc->stat & 0xf0) == 0xf0) { + fdc->stat &= ~0x80; + if ((fdc->flags & FDC_FLAG_PCJR) || !fdc->fifo) { + fdc->data_ready = 0; + ret = fdc->dat; + } else + ret = fifo_read(fdc->fifo_p); + break; + } + if (fdc->paramstogo) { + fdc->stat &= ~0x80; + fdc_log("%i parameters to go\n", fdc->paramstogo); + fdc->paramstogo--; + ret = fdc->res[10 - fdc->paramstogo]; + if (!fdc->paramstogo) + fdc->stat = 0x80; + else + fdc->stat |= 0xC0; + } else if (fdc->dma) { + ret = fdc->dat; + break; + } else { + fdc->stat &= ~0x80; + if (lastbyte) + fdc->stat = 0x80; + lastbyte = 0; + ret = fdc->dat; + fdc->data_ready = 0; + } + fdc->stat &= 0xf0; + break; + case 7: /*Disk change*/ + drive = real_drive(fdc, fdc->dor & 3); + + if (fdc->flags & FDC_FLAG_PS2) { + if (fdc->dor & (0x10 << drive)) { + ret = (fdd_changed[drive] || drive_empty[drive]) ? 0x00 : 0x80; + ret |= (fdc->dor & 0x08); + ret |= (fdc->noprec << 2); + ret |= (fdc->rate & 0x03); + } else + ret = 0x00; + } else if (fdc->flags & FDC_FLAG_PS2_MCA) { + if (fdc->dor & (0x10 << drive)) { ret = (fdd_changed[drive] || drive_empty[drive]) ? 0x80 : 0x00; - } else - ret = 0x00; - if (fdc->flags & FDC_FLAG_DISKCHG_ACTLOW) /*PC2086/3086 seem to reverse this bit*/ - ret ^= 0x80; + ret |= ((fdc->rate & 0x03) << 1); + ret |= fdc_get_densel(fdc, drive); + ret |= 0x78; + } else + ret = 0xf9; + } else { + if (fdc->dor & (0x10 << drive)) { + if ((drive == 1) && (fdc->flags & FDC_FLAG_TOSHIBA)) + ret = 0x00; + else + ret = (fdd_changed[drive] || drive_empty[drive]) ? 0x80 : 0x00; + } else + ret = 0x00; + if (fdc->flags & FDC_FLAG_DISKCHG_ACTLOW) /*PC2086/3086 seem to reverse this bit*/ + ret ^= 0x80; - /* 0 = ????, 1 = Ext. FDD off, 2 = Ext. FDD = FDD A, 3 = Ext. FDD = FDD B */ - if (fdc->flags & FDC_FLAG_TOSHIBA) { - ret |= (3 << 5); - ret |= 0x01; - } else - ret |= 0x7F; - } + /* 0 = ????, 1 = Ext. FDD off, 2 = Ext. FDD = FDD A, 3 = Ext. FDD = FDD B */ + if (fdc->flags & FDC_FLAG_TOSHIBA) { + ret |= (3 << 5); + ret |= 0x01; + } else + ret |= 0x7F; + } - fdc->step = 0; - break; - default: - ret = 0xff; - } + fdc->step = 0; + break; + default: + ret = 0xff; + } fdc_log("[%04X:%08X] Read FDC %04X %02X [%i:%02X]\n", CS, cpu_state.pc, addr, ret, drive, fdc->dor & (0x10 << drive)); return ret; } @@ -1859,7 +1896,7 @@ fdc_callback(void *priv) } else fdc->interrupt = -3; timer_set_delay_u64(&fdc->timer, 2048 * TIMER_USEC); - fdc->stat = 0x80 | (1 << fdc->rw_drive); + fdc->stat = 0x10 | (1 << fdc->rw_drive); return; case 0x0d: /*Format track*/ if (fdc->format_state == 1) { @@ -1902,15 +1939,18 @@ fdc_callback(void *priv) return; case 0x0f: /*Seek*/ fdc->st0 = 0x20 | (fdc->params[0] & 3); - fdc->stat = 0x80 | (1 << fdc->rw_drive); - if (fdc->flags & FDC_FLAG_PCJR) { - fdc->fintr = 1; - fdc->interrupt = -4; - timer_set_delay_u64(&fdc->timer, 1024 * TIMER_USEC); - } else { - fdc->interrupt = -3; - fdc_callback(fdc); + fdc->stat = 0x10 | (1 << fdc->rw_drive); + if (fdd_get_turbo(real_drive(fdc, fdc->rw_drive))) { + if (fdc->flags & FDC_FLAG_PCJR) { + fdc->fintr = 1; + fdc->interrupt = -4; + timer_set_delay_u64(&fdc->timer, 1024 * TIMER_USEC); + } else { + fdc->interrupt = -3; + fdc_callback(fdc); + } } + // Interrupts and callbacks in the fdd callback function return; case 0x10: /*Version*/ case 0x18: /*NSC*/ @@ -2402,10 +2442,10 @@ fdc_reset(void *priv) need to use a dual-RPM 5.25" drive - but hey, that finally gets those drives some usage as well. */ - fdc_update_drvrate(fdc, 0, !strcmp(machine_get_internal_name(), "if386sx")); - fdc_update_drvrate(fdc, 1, !strcmp(machine_get_internal_name(), "if386sx")); - fdc_update_drvrate(fdc, 2, !strcmp(machine_get_internal_name(), "if386sx")); - fdc_update_drvrate(fdc, 3, !strcmp(machine_get_internal_name(), "if386sx")); + fdc_update_drvrate(fdc, 0, (machines[machine].init == machine_at_if386sx_init)); + fdc_update_drvrate(fdc, 1, (machines[machine].init == machine_at_if386sx_init)); + fdc_update_drvrate(fdc, 2, (machines[machine].init == machine_at_if386sx_init)); + fdc_update_drvrate(fdc, 3, (machines[machine].init == machine_at_if386sx_init)); fdc_update_drv2en(fdc, 1); fdc_update_rates(fdc); @@ -2843,4 +2883,4 @@ const device_t fdc_ps2_mca_device = { .speed_changed = NULL, .force_redraw = NULL, .config = NULL -}; +}; \ No newline at end of file diff --git a/src/floppy/fdc_compaticard.c b/src/floppy/fdc_compaticard.c index cc438ddf6..1c668b470 100644 --- a/src/floppy/fdc_compaticard.c +++ b/src/floppy/fdc_compaticard.c @@ -12,7 +12,6 @@ * * Copyright 2022-2025 Jasmine Iwanek. */ - #include #include #include diff --git a/src/floppy/fdc_magitronic.c b/src/floppy/fdc_magitronic.c index a1ee922da..29db35006 100644 --- a/src/floppy/fdc_magitronic.c +++ b/src/floppy/fdc_magitronic.c @@ -12,7 +12,6 @@ * * Copyright 2021 Tiseno100 */ - #include #include #include diff --git a/src/floppy/fdc_monster.c b/src/floppy/fdc_monster.c index 38ad9e2ed..0bac3d590 100644 --- a/src/floppy/fdc_monster.c +++ b/src/floppy/fdc_monster.c @@ -8,8 +8,6 @@ * * Emulation of Sergey Kiselev's Monster Floppy Disk Controller. * - * - * * Authors: Jasmine Iwanek, * Miran Grca, * diff --git a/src/floppy/fdd.c b/src/floppy/fdd.c index bc81c8662..d4d9d4476 100644 --- a/src/floppy/fdd.c +++ b/src/floppy/fdd.c @@ -8,21 +8,23 @@ * * Implementation of the floppy drive emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, + * Toni Riikonen, * * Copyright 2008-2019 Sarah Walker. * Copyright 2016-2019 Miran Grca. * Copyright 2018-2019 Fred N. van Kempen. + * Copyright 2025 Toni Riikonen. */ #include #include #include #include #include +#include + #define HAVE_STDARG_H #include <86box/86box.h> #include <86box/timer.h> @@ -39,6 +41,7 @@ #include <86box/fdd_mfm.h> #include <86box/fdd_td0.h> #include <86box/fdc.h> +#include <86box/fdd_audio.h> /* Flags: Bit 0: 300 rpm supported; @@ -76,19 +79,44 @@ typedef struct fdd_t { fdd_t fdd[FDD_NUM]; +enum { + FDD_OP_NONE = 0, + FDD_OP_READ, + FDD_OP_WRITE, + FDD_OP_COMPARE, + FDD_OP_READADDR, + FDD_OP_FORMAT +}; + +typedef struct fdd_pending_op_t { + int pending; + int op; + int sector; + int track; + int side; + int density; + int sector_size; + uint8_t fill; +} fdd_pending_op_t; + +static fdd_pending_op_t fdd_pending[FDD_NUM]; + char floppyfns[FDD_NUM][512]; char *fdd_image_history[FDD_NUM][FLOPPY_IMAGE_HISTORY]; pc_timer_t fdd_poll_time[FDD_NUM]; +pc_timer_t fdd_seek_timer[FDD_NUM]; +int fdd_seek_in_progress[FDD_NUM] = { 0, 0, 0, 0 }; static int fdd_notfound = 0; static int driveloaders[FDD_NUM]; +static int fdd_audio_profile[FDD_NUM] = { 0 }; int writeprot[FDD_NUM]; int fwriteprot[FDD_NUM]; int fdd_changed[FDD_NUM]; int ui_writeprot[FDD_NUM] = { 0, 0, 0, 0 }; -int drive_empty[FDD_NUM] = { 1, 1, 1, 1 }; +int drive_empty[FDD_NUM] = { 1, 1, 1, 1 }; DRIVE drives[FDD_NUM]; @@ -101,9 +129,9 @@ d86f_handler_t d86f_handler[FDD_NUM]; static const struct { const char *ext; - void (*load)(int drive, char *fn); - void (*close)(int drive); - int size; + void (*load)(int drive, char *fn); + void (*close)(int drive); + int size; } loaders[] = { { "001", img_load, img_close, -1 }, { "002", img_load, img_close, -1 }, @@ -147,35 +175,35 @@ static const struct { const char *internal_name; } drive_types[] = { /* None */ - { 0, 0, "None", "none" }, + { 0, 0, "None", "none" }, /* 5.25" 1DD */ - { 43, FLAG_RPM_300 | FLAG_525 | FLAG_HOLE0, "5.25\" 180k", "525_1dd" }, + { 43, FLAG_RPM_300 | FLAG_525 | FLAG_HOLE0, "5.25\" 180k", "525_1dd" }, /* 5.25" DD */ - { 43, FLAG_RPM_300 | FLAG_525 | FLAG_DS | FLAG_HOLE0, "5.25\" 360k", "525_2dd" }, + { 43, FLAG_RPM_300 | FLAG_525 | FLAG_DS | FLAG_HOLE0, "5.25\" 360k", "525_2dd" }, /* 5.25" QD */ - { 86, FLAG_RPM_300 | FLAG_525 | FLAG_DS | FLAG_HOLE0 | FLAG_DOUBLE_STEP, "5.25\" 720k", "525_2qd" }, + { 86, FLAG_RPM_300 | FLAG_525 | FLAG_DS | FLAG_HOLE0 | FLAG_DOUBLE_STEP, "5.25\" 720k", "525_2qd" }, /* 5.25" HD */ - { 86, FLAG_RPM_360 | FLAG_525 | FLAG_DS | FLAG_HOLE0 | FLAG_HOLE1 | FLAG_DOUBLE_STEP | FLAG_PS2, "5.25\" 1.2M", "525_2hd" }, + { 86, FLAG_RPM_360 | FLAG_525 | FLAG_DS | FLAG_HOLE0 | FLAG_HOLE1 | FLAG_DOUBLE_STEP | FLAG_PS2, "5.25\" 1.2M", "525_2hd" }, /* 5.25" HD Dual RPM */ - { 86, FLAG_RPM_300 | FLAG_RPM_360 | FLAG_525 | FLAG_DS | FLAG_HOLE0 | FLAG_HOLE1 | FLAG_DOUBLE_STEP, "5.25\" 1.2M 300/360 RPM", "525_2hd_dualrpm" }, + { 86, FLAG_RPM_300 | FLAG_RPM_360 | FLAG_525 | FLAG_DS | FLAG_HOLE0 | FLAG_HOLE1 | FLAG_DOUBLE_STEP, "5.25\" 1.2M 300/360 RPM", "525_2hd_dualrpm" }, /* 3.5" 1DD */ - { 86, FLAG_RPM_300 | FLAG_HOLE0 | FLAG_DOUBLE_STEP, "3.5\" 360k", "35_1dd" }, + { 86, FLAG_RPM_300 | FLAG_HOLE0 | FLAG_DOUBLE_STEP, "3.5\" 360k", "35_1dd" }, /* 3.5" DD, Equivalent to TEAC FD-235F */ - { 86, FLAG_RPM_300 | FLAG_DS | FLAG_HOLE0 | FLAG_DOUBLE_STEP, "3.5\" 720k", "35_2dd" }, + { 86, FLAG_RPM_300 | FLAG_DS | FLAG_HOLE0 | FLAG_DOUBLE_STEP, "3.5\" 720k", "35_2dd" }, /* 3.5" HD, Equivalent to TEAC FD-235HF */ - { 86, FLAG_RPM_300 | FLAG_DS | FLAG_HOLE0 | FLAG_HOLE1 | FLAG_DOUBLE_STEP | FLAG_PS2, "3.5\" 1.44M", "35_2hd" }, + { 86, FLAG_RPM_300 | FLAG_DS | FLAG_HOLE0 | FLAG_HOLE1 | FLAG_DOUBLE_STEP | FLAG_PS2, "3.5\" 1.44M", "35_2hd" }, /* TODO: 3.5" DD, Equivalent to TEAC FD-235GF */ -// { 86, FLAG_RPM_300 | FLAG_RPM_360 | FLAG_DS | FLAG_HOLE0 | FLAG_HOLE1 | FLAG_DOUBLE_STEP, "3.5\" 1.25M", "35_2hd_2mode" }, + // { 86, FLAG_RPM_300 | FLAG_RPM_360 | FLAG_DS | FLAG_HOLE0 | FLAG_HOLE1 | FLAG_DOUBLE_STEP, "3.5\" 1.25M", "35_2hd_2mode" }, /* 3.5" HD PC-98 */ - { 86, FLAG_RPM_300 | FLAG_RPM_360 | FLAG_DS | FLAG_HOLE0 | FLAG_HOLE1 | FLAG_DOUBLE_STEP | FLAG_INVERT_DENSEL, "3.5\" 1.25M PC-98", "35_2hd_nec" }, + { 86, FLAG_RPM_300 | FLAG_RPM_360 | FLAG_DS | FLAG_HOLE0 | FLAG_HOLE1 | FLAG_DOUBLE_STEP | FLAG_INVERT_DENSEL, "3.5\" 1.25M PC-98", "35_2hd_nec" }, /* 3.5" HD 3-Mode, Equivalent to TEAC FD-235HG */ - { 86, FLAG_RPM_300 | FLAG_RPM_360 | FLAG_DS | FLAG_HOLE0 | FLAG_HOLE1 | FLAG_DOUBLE_STEP, "3.5\" 1.44M 300/360 RPM", "35_2hd_3mode" }, + { 86, FLAG_RPM_300 | FLAG_RPM_360 | FLAG_DS | FLAG_HOLE0 | FLAG_HOLE1 | FLAG_DOUBLE_STEP, "3.5\" 1.44M 300/360 RPM", "35_2hd_3mode" }, /* 3.5" ED, Equivalent to TEAC FD-235J */ - { 86, FLAG_RPM_300 | FLAG_DS | FLAG_HOLE0 | FLAG_HOLE1 | FLAG_HOLE2 | FLAG_DOUBLE_STEP, "3.5\" 2.88M", "35_2ed" }, + { 86, FLAG_RPM_300 | FLAG_DS | FLAG_HOLE0 | FLAG_HOLE1 | FLAG_HOLE2 | FLAG_DOUBLE_STEP, "3.5\" 2.88M", "35_2ed" }, /* 3.5" ED Dual RPM, Equivalent to TEAC FD-335J */ - { 86, FLAG_RPM_300 | FLAG_RPM_360 | FLAG_DS | FLAG_HOLE0 | FLAG_HOLE1 | FLAG_HOLE2 | FLAG_DOUBLE_STEP, "3.5\" 2.88M 300/360 RPM", "35_2ed_dualrpm" }, + { 86, FLAG_RPM_300 | FLAG_RPM_360 | FLAG_DS | FLAG_HOLE0 | FLAG_HOLE1 | FLAG_HOLE2 | FLAG_DOUBLE_STEP, "3.5\" 2.88M 300/360 RPM", "35_2ed_dualrpm" }, /* End of list */ - { -1, -1, "", "" } + { -1, -1, "", "" } }; #ifdef ENABLE_FDD_LOG @@ -184,11 +212,32 @@ int fdd_do_log = ENABLE_FDD_LOG; static void fdd_log(const char *fmt, ...) { - va_list ap; + va_list ap, ap_copy; + char timebuf[32]; + char fullbuf[1056]; // 32 + 1024 bytes for timestamp + message if (fdd_do_log) { + uint32_t ticks = plat_get_ticks(); + uint32_t seconds = ticks / 1000; + uint32_t milliseconds = ticks % 1000; + + snprintf(timebuf, sizeof(timebuf), "[%07u.%03u] ", seconds, milliseconds); + va_start(ap, fmt); - pclog_ex(fmt, ap); + va_copy(ap_copy, ap); + + strcpy(fullbuf, timebuf); + vsnprintf(fullbuf + strlen(timebuf), sizeof(fullbuf) - strlen(timebuf), fmt, ap_copy); + + va_end(ap_copy); + va_end(ap); + + va_start(ap, fmt); + va_end(ap); + + char *msg = fullbuf; + va_start(ap, fmt); + pclog_ex("%s", (va_list) &msg); va_end(ap); } } @@ -196,6 +245,24 @@ fdd_log(const char *fmt, ...) # define fdd_log(fmt, ...) #endif +void +fdd_set_audio_profile(int drive, int profile) +{ + if (drive < 0 || drive >= FDD_NUM) + return; + if (profile < 0 || profile >= FDD_AUDIO_PROFILE_MAX) + profile = 0; + fdd_audio_profile[drive] = profile; +} + +int +fdd_get_audio_profile(int drive) +{ + if (drive < 0 || drive >= FDD_NUM) + return 0; + return fdd_audio_profile[drive]; +} + char * fdd_getname(int type) { @@ -244,12 +311,70 @@ fdd_forced_seek(int drive, int track_diff) fdd_do_seek(drive, fdd[drive].track); } +static void +fdd_seek_complete_callback(void *priv) +{ + DRIVE *drive = (DRIVE *) priv; + + fdd_seek_in_progress[drive->id] = 0; + + fdd_log("fdd_seek_complete_callback(drive=%d) - TIMER FIRED! seek_in_progress=1\n", drive->id); + fdd_log("Notifying FDC of seek completion\n"); + fdd_do_seek(drive->id, fdd[drive->id].track); + + int had_pending = fdd_pending[drive->id].pending; + if (had_pending) { + fdd_pending_op_t *po = &fdd_pending[drive->id]; + fdd_log("Starting deferred op %d after seek on drive %d (trk=%d, side=%d, sec=%d)\n", + po->op, drive->id, po->track, po->side, po->sector); + + switch (po->op) { + case FDD_OP_READ: + if (drives[drive->id].readsector) + drives[drive->id].readsector(drive->id, po->sector, po->track, po->side, po->density, po->sector_size); + break; + case FDD_OP_WRITE: + if (drives[drive->id].writesector) + drives[drive->id].writesector(drive->id, po->sector, po->track, po->side, po->density, po->sector_size); + break; + case FDD_OP_COMPARE: + if (drives[drive->id].comparesector) + drives[drive->id].comparesector(drive->id, po->sector, po->track, po->side, po->density, po->sector_size); + break; + case FDD_OP_READADDR: + if (drives[drive->id].readaddress) + drives[drive->id].readaddress(drive->id, po->side, po->density); + break; + case FDD_OP_FORMAT: + if (drives[drive->id].format) + drives[drive->id].format(drive->id, po->side, po->density, po->fill); + break; + default: + break; + } + + po->pending = 0; + po->op = FDD_OP_NONE; + } + + if (!had_pending) + fdc_seek_complete_interrupt(fdd_fdc, drive->id); +} + void fdd_seek(int drive, int track_diff) { + fdd_log("fdd_seek(drive=%d, track_diff=%d)\n", drive, track_diff); if (!track_diff) return; + if (fdd_seek_in_progress[drive]) { + fdd_log("Seek already in progress for drive %d, ignoring new seek request\n", drive); + return; + } + + int old_track = fdd[drive].track; + fdd[drive].track += track_diff; if (fdd[drive].track < 0) @@ -260,12 +385,42 @@ fdd_seek(int drive, int track_diff) fdd_changed[drive] = 0; - fdd_do_seek(drive, fdd[drive].track); + if (fdd[drive].turbo) + fdd_do_seek(drive, fdd[drive].track); + else { + /* Trigger appropriate audio for track movements */ + int actual_track_diff = abs(old_track - fdd[drive].track); + if (actual_track_diff == 1) { + /* Single track movement */ + fdd_audio_play_single_track_step(drive, old_track, fdd[drive].track); + } else if (actual_track_diff > 1) { + /* Multi-track seek */ + fdd_audio_play_multi_track_seek(drive, old_track, fdd[drive].track); + } + + if (old_track + track_diff < 0) { + fdd_do_seek(drive, fdd[drive].track); + return; + } + + fdd_seek_in_progress[drive] = 1; + + if (!fdd_seek_timer[drive].callback) { + timer_add(&(fdd_seek_timer[drive]), fdd_seek_complete_callback, &drives[drive], 0); + } + + double initial_seek_time = FDC_FLAG_PCJR & fdd_fdc->flags ? 40000.0 : 15000.0; + double track_seek_time = FDC_FLAG_PCJR & fdd_fdc->flags ? 10000.0 : 6000.0; + uint64_t seek_time_us = (initial_seek_time + (abs(actual_track_diff) * track_seek_time)) * TIMER_USEC; + timer_set_delay_u64(&fdd_seek_timer[drive], seek_time_us); + } } int fdd_track0(int drive) { + fdd_log("fdd_track0(drive=%d)\n", drive); + /* If drive is disabled, TRK0 never gets set. */ if (!drive_types[fdd[drive].type].max_track) return 0; @@ -408,6 +563,7 @@ fdd_is_double_sided(int drive) void fdd_set_head(int drive, int head) { + fdd_log("fdd_set_head(%d, %d)\n", drive, head); if (head && !fdd_is_double_sided(drive)) fdd[drive].head = 0; else @@ -455,14 +611,13 @@ fdd_get_densel(int drive) void fdd_load(int drive, char *fn) { + fdd_log("fdd_load(%d, %s)\n", drive, fn); int c = 0; 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) { @@ -495,7 +650,6 @@ fdd_load(int drive, char *fn) c++; } } - fdd_log("FDD: could not load '%s' %s\n", fn, p); drive_empty[drive] = 1; fdd_set_head(drive, 0); memset(floppyfns[drive], 0, sizeof(floppyfns[drive])); @@ -505,8 +659,6 @@ fdd_load(int drive, char *fn) void fdd_close(int drive) { - fdd_log("FDD: closing drive %d\n", drive); - d86f_stop(drive); /* Call this first of all to make sure the 86F poll is back to idle state. */ if (loaders[driveloaders[drive]].close) loaders[driveloaders[drive]].close(drive); @@ -548,11 +700,14 @@ fdd_byteperiod(int drive) void fdd_set_motor_enable(int drive, int motor_enable) { - /* I think here is where spin-up and spin-down should be implemented. */ - if (motor_enable && !motoron[drive]) + fdd_log("fdd_set_motor_enable(%d, %d)\n", drive, motor_enable); + fdd_audio_set_motor_enable(drive, motor_enable); + + if (motor_enable && !motoron[drive]) { timer_set_delay_u64(&fdd_poll_time[drive], fdd_byteperiod(drive)); - else if (!motor_enable) + } else if (!motor_enable && motoron[drive]) { timer_disable(&fdd_poll_time[drive]); + } motoron[drive] = motor_enable; } @@ -617,6 +772,23 @@ fdd_reset(void) void fdd_readsector(int drive, int sector, int track, int side, int density, int sector_size) { + fdd_log("fdd_readsector(%d, %d, %d, %d, %d, %d)\n", drive, sector, track, side, density, sector_size); + + if (fdd_seek_in_progress[drive]) { + fdd_log("Seek in progress on drive %d, deferring READ (trk=%d->%d, side=%d, sec=%d)\n", + drive, fdd[drive].track, track, side, sector); + fdd_pending[drive] = (fdd_pending_op_t) { + .pending = 1, + .op = FDD_OP_READ, + .sector = sector, + .track = track, + .side = side, + .density = density, + .sector_size = sector_size + }; + return; + } + if (drives[drive].readsector) drives[drive].readsector(drive, sector, track, side, density, sector_size); else @@ -626,6 +798,23 @@ fdd_readsector(int drive, int sector, int track, int side, int density, int sect void fdd_writesector(int drive, int sector, int track, int side, int density, int sector_size) { + fdd_log("fdd_writesector(%d, %d, %d, %d, %d, %d)\n", drive, sector, track, side, density, sector_size); + + if (fdd_seek_in_progress[drive]) { + fdd_log("Seek in progress on drive %d, deferring WRITE (trk=%d->%d, side=%d, sec=%d)\n", + drive, fdd[drive].track, track, side, sector); + fdd_pending[drive] = (fdd_pending_op_t) { + .pending = 1, + .op = FDD_OP_WRITE, + .sector = sector, + .track = track, + .side = side, + .density = density, + .sector_size = sector_size + }; + return; + } + if (drives[drive].writesector) drives[drive].writesector(drive, sector, track, side, density, sector_size); else @@ -635,6 +824,21 @@ fdd_writesector(int drive, int sector, int track, int side, int density, int sec void fdd_comparesector(int drive, int sector, int track, int side, int density, int sector_size) { + if (fdd_seek_in_progress[drive]) { + fdd_log("Seek in progress on drive %d, deferring COMPARE (trk=%d->%d, side=%d, sec=%d)\n", + drive, fdd[drive].track, track, side, sector); + fdd_pending[drive] = (fdd_pending_op_t) { + .pending = 1, + .op = FDD_OP_COMPARE, + .sector = sector, + .track = track, + .side = side, + .density = density, + .sector_size = sector_size + }; + return; + } + if (drives[drive].comparesector) drives[drive].comparesector(drive, sector, track, side, density, sector_size); else @@ -644,6 +848,19 @@ fdd_comparesector(int drive, int sector, int track, int side, int density, int s void fdd_readaddress(int drive, int side, int density) { + if (fdd_seek_in_progress[drive]) { + fdd_log("Seek in progress on drive %d, deferring READADDRESS (trk=%d, side=%d)\n", + drive, fdd[drive].track, side); + fdd_pending[drive] = (fdd_pending_op_t) { + .pending = 1, + .op = FDD_OP_READADDR, + .track = fdd[drive].track, + .side = side, + .density = density + }; + return; + } + if (drives[drive].readaddress) drives[drive].readaddress(drive, side, density); } @@ -651,6 +868,20 @@ fdd_readaddress(int drive, int side, int density) void fdd_format(int drive, int side, int density, uint8_t fill) { + if (fdd_seek_in_progress[drive]) { + fdd_log("Seek in progress on drive %d, deferring FORMAT (trk=%d, side=%d)\n", + drive, fdd[drive].track, side); + fdd_pending[drive] = (fdd_pending_op_t) { + .pending = 1, + .op = FDD_OP_FORMAT, + .track = fdd[drive].track, + .side = side, + .density = density, + .fill = fill + }; + return; + } + if (drives[drive].format) drives[drive].format(drive, side, density, fill); else @@ -690,10 +921,14 @@ fdd_init(void) for (i = 0; i < FDD_NUM; i++) { fdd_load(i, floppyfns[i]); } + + if (fdd_sounds_enabled) { + fdd_audio_init(); + } } void fdd_do_writeback(int drive) { d86f_handler[drive].writeback(drive); -} +} \ No newline at end of file diff --git a/src/floppy/fdd_86f.c b/src/floppy/fdd_86f.c index f210bf4fd..0c64c41e7 100644 --- a/src/floppy/fdd_86f.c +++ b/src/floppy/fdd_86f.c @@ -10,8 +10,6 @@ * data in the form of FM/MFM-encoded transitions) which also * forms the core of the emulator's floppy disk emulation. * - * - * * Authors: Miran Grca, * Fred N. van Kempen, * diff --git a/src/floppy/fdd_audio.c b/src/floppy/fdd_audio.c new file mode 100644 index 000000000..afa78002f --- /dev/null +++ b/src/floppy/fdd_audio.c @@ -0,0 +1,786 @@ +/* + * 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 floppy drive audio emulation. + * + * Authors: Toni Riikonen, + * + * Copyright 2025 Toni Riikonen. + */ +#include +#include +#include +#include +#include +#include + +#define HAVE_STDARG_H +#include <86box/86box.h> +#include <86box/timer.h> +#include <86box/fdd.h> +#include <86box/fdd_audio.h> +#include <86box/mem.h> +#include <86box/rom.h> +#include <86box/sound.h> +#include <86box/plat.h> +#include <86box/path.h> + +#ifndef DISABLE_FDD_AUDIO + +/* Audio sample structure */ +typedef struct { + const char *filename; + int16_t *buffer; + int samples; + float volume; +} audio_sample_t; + +/* Single step audio state */ +typedef struct { + int position; + int active; +} single_step_state_t; + +/* Multi-track seek audio state */ +typedef struct { + int position; + int active; + int duration_samples; + int from_track; + int to_track; +} multi_seek_state_t; + +/* Drive type specific audio samples */ +typedef struct { + audio_sample_t spindlemotor_start; + audio_sample_t spindlemotor_loop; + audio_sample_t spindlemotor_stop; + audio_sample_t single_track_step; + audio_sample_t multi_track_seek; +} drive_audio_samples_t; + +/* 5.25" Teac FD-55GFR sample set */ +static drive_audio_samples_t samples_teac = { + .spindlemotor_start = { + .filename = "roms/floppy/samples/TeacFD-55GFR_5.25_1.2MB_motor_start_48000_16_1_PCM.wav", + .buffer = NULL, .samples = 0, .volume = 3.0f + }, + .spindlemotor_loop = { + .filename = "roms/floppy/samples/TeacFD-55GFR_5.25_1.2MB_motor_loop_48000_16_1_PCM.wav", + .buffer = NULL, .samples = 0, .volume = 3.0f + }, + .spindlemotor_stop = { + .filename = "roms/floppy/samples/TeacFD-55GFR_5.25_1.2MB_motor_stop_48000_16_1_PCM.wav", + .buffer = NULL, .samples = 0, .volume = 3.0f + }, + .single_track_step = { + .filename = "roms/floppy/samples/TeacFD-55GFR_5.25_1.2MB_track_step_48000_16_1_PCM.wav", + .buffer = NULL, .samples = 0, .volume = 2.0f + }, + .multi_track_seek = { + .filename = "roms/floppy/samples/TeacFD_55GFR_5.25_1.2MB_seekupdown_80_tracks1100ms_48000_16_1_PCM.wav", + .buffer = NULL, .samples = 0, .volume = 2.0f + } +}; + +/* 3.5" drive audio samples (Mitsumi) */ +static drive_audio_samples_t samples_35 = { + .spindlemotor_start = { + .filename = "roms/floppy/samples/mitsumi_spindle_motor_start_48000_16_1_PCM.wav", + .buffer = NULL, .samples = 0, .volume = 0.2f + }, + .spindlemotor_loop = { + .filename = "roms/floppy/samples/mitsumi_spindle_motor_loop_48000_16_1_PCM.wav", + .buffer = NULL, .samples = 0, .volume = 0.2f + }, + .spindlemotor_stop = { + .filename = "roms/floppy/samples/mitsumi_spindle_motor_stop_48000_16_1_PCM.wav", + .buffer = NULL, .samples = 0, .volume = 0.2f + }, + .single_track_step = { + .filename = "roms/floppy/samples/mitsumi_track_step_48000_16_1_PCM.wav", + .buffer = NULL, .samples = 0, .volume = 1.0f + }, + .multi_track_seek = { + .filename = "roms/floppy/samples/mitsumi_seek_80_tracks_495ms_48000_16_1_PCM.wav", + .buffer = NULL, .samples = 0, .volume = 1.0f + } +}; + +/* 5.25" drive audio samples (Panasonic) */ +static drive_audio_samples_t samples_525 = { + .spindlemotor_start = { + .filename = "roms/floppy/samples/Panasonic_JU-475-5_5.25_1.2MB_motor_start_48000_16_1_PCM.wav", + .buffer = NULL, .samples = 0, .volume = 1.0f + }, + .spindlemotor_loop = { + .filename = "roms/floppy/samples/Panasonic_JU-475-5_5.25_1.2MB_motor_loop_48000_16_1_PCM.wav", + .buffer = NULL, .samples = 0, .volume = 1.0f + }, + .spindlemotor_stop = { + .filename = "roms/floppy/samples/Panasonic_JU-475-5_5.25_1.2MB_motor_stop_48000_16_1_PCM.wav", + .buffer = NULL, .samples = 0, .volume = 1.0f + }, + .single_track_step = { + .filename = "roms/floppy/samples/Panasonic_JU-475-5_5.25_1.2MB_track_step_48000_16_1_PCM.wav", + .buffer = NULL, .samples = 0, .volume = 2.0f + }, + .multi_track_seek = { + .filename = "roms/floppy/samples/Panasonic_JU-475-5_5.25_1.2MB_seekup_40_tracks_285ms_5ms_per_track_48000_16_1_PCM.wav", + .buffer = NULL, .samples = 0, .volume = 2.0f + } +}; + +/* Audio state for each drive */ +static int spindlemotor_pos[FDD_NUM] = {}; +static motor_state_t spindlemotor_state[FDD_NUM] = {}; +static float spindlemotor_fade_volume[FDD_NUM] = {}; +static int spindlemotor_fade_samples_remaining[FDD_NUM] = {}; + +/* Single step audio state for each drive */ +static single_step_state_t single_step_state[FDD_NUM] = {}; + +/* Multi-track seek audio state for each drive */ +static multi_seek_state_t multi_seek_state[FDD_NUM] = {}; + +extern uint64_t motoron[FDD_NUM]; +extern char exe_path[2048]; /* path (dir) of executable */ + +extern int fdd_get_audio_profile(int drive); /* from fdd.h */ + +/* Forward declaration */ +static int16_t *load_wav(const char *filename, int *sample_count); + + +static drive_audio_samples_t * +get_drive_samples(int drive) +{ + switch (fdd_get_audio_profile(drive)) { + case FDD_AUDIO_PROFILE_PANASONIC: + return &samples_525; + case FDD_AUDIO_PROFILE_TEAC: + return &samples_teac; + case FDD_AUDIO_PROFILE_MITSUMI: + return &samples_35; + default: + return NULL; + } +} + +static int16_t * +load_wav(const char *filename, int *sample_count) +{ + FILE *f = NULL; + + if ((filename == NULL) || (strlen(filename) == 0)) + return NULL; + + if (strstr(filename, "..") != NULL) + return NULL; + + f = rom_fopen(filename, "rb"); + if (f == NULL) + return NULL; + + wav_header_t hdr; + if (fread(&hdr, sizeof(hdr), 1, f) != 1) { + fclose(f); + return NULL; + } + + if (memcmp(hdr.riff, "RIFF", 4) || memcmp(hdr.wave, "WAVE", 4) || memcmp(hdr.fmt, "fmt ", 4) || memcmp(hdr.data, "data", 4)) { + fclose(f); + return NULL; + } + + /* Accept both mono and stereo, 16-bit PCM */ + if (hdr.audio_format != 1 || hdr.bits_per_sample != 16 || (hdr.num_channels != 1 && hdr.num_channels != 2)) { + fclose(f); + return NULL; + } + + int input_samples = hdr.data_size / 2; /* 2 bytes per sample */ + int16_t *input_data = malloc(hdr.data_size); + if (!input_data) { + fclose(f); + return NULL; + } + + if (fread(input_data, 1, hdr.data_size, f) != hdr.data_size) { + free(input_data); + fclose(f); + return NULL; + } + fclose(f); + + int16_t *output_data; + int output_samples; + + if (hdr.num_channels == 1) { + /* Convert mono to stereo */ + output_samples = input_samples; /* Number of stereo sample pairs */ + output_data = malloc(input_samples * 2 * sizeof(int16_t)); /* Allocate for stereo */ + if (!output_data) { + free(input_data); + return NULL; + } + + /* Convert mono to stereo by duplicating each sample */ + for (int i = 0; i < input_samples; i++) { + output_data[i * 2] = input_data[i]; /* Left channel */ + output_data[i * 2 + 1] = input_data[i]; /* Right channel */ + } + + free(input_data); + } else { + /* Already stereo */ + output_data = input_data; + output_samples = input_samples / 2; /* Number of stereo sample pairs */ + } + + if (sample_count) + *sample_count = output_samples; + + return output_data; +} + +void +fdd_audio_init(void) +{ + int i; + + /* Load audio samples for both drive types */ + samples_35.spindlemotor_start.buffer = load_wav(samples_35.spindlemotor_start.filename, &samples_35.spindlemotor_start.samples); + samples_35.spindlemotor_loop.buffer = load_wav(samples_35.spindlemotor_loop.filename, &samples_35.spindlemotor_loop.samples); + samples_35.spindlemotor_stop.buffer = load_wav(samples_35.spindlemotor_stop.filename, &samples_35.spindlemotor_stop.samples); + samples_35.single_track_step.buffer = load_wav(samples_35.single_track_step.filename, &samples_35.single_track_step.samples); + samples_35.multi_track_seek.buffer = load_wav(samples_35.multi_track_seek.filename, &samples_35.multi_track_seek.samples); + + samples_525.spindlemotor_start.buffer = load_wav(samples_525.spindlemotor_start.filename, &samples_525.spindlemotor_start.samples); + samples_525.spindlemotor_loop.buffer = load_wav(samples_525.spindlemotor_loop.filename, &samples_525.spindlemotor_loop.samples); + samples_525.spindlemotor_stop.buffer = load_wav(samples_525.spindlemotor_stop.filename, &samples_525.spindlemotor_stop.samples); + samples_525.single_track_step.buffer = load_wav(samples_525.single_track_step.filename, &samples_525.single_track_step.samples); + samples_525.multi_track_seek.buffer = load_wav(samples_525.multi_track_seek.filename, &samples_525.multi_track_seek.samples); + + samples_teac.spindlemotor_start.buffer = load_wav(samples_teac.spindlemotor_start.filename, &samples_teac.spindlemotor_start.samples); + samples_teac.spindlemotor_loop.buffer = load_wav(samples_teac.spindlemotor_loop.filename, &samples_teac.spindlemotor_loop.samples); + samples_teac.spindlemotor_stop.buffer = load_wav(samples_teac.spindlemotor_stop.filename, &samples_teac.spindlemotor_stop.samples); + samples_teac.single_track_step.buffer = load_wav(samples_teac.single_track_step.filename, &samples_teac.single_track_step.samples); + samples_teac.multi_track_seek.buffer = load_wav(samples_teac.multi_track_seek.filename, &samples_teac.multi_track_seek.samples); + + /* Initialize audio state for all drives */ + for (i = 0; i < FDD_NUM; i++) { + spindlemotor_pos[i] = 0; + spindlemotor_state[i] = MOTOR_STATE_STOPPED; + spindlemotor_fade_volume[i] = 1.0f; + spindlemotor_fade_samples_remaining[i] = 0; + + /* Initialize single step state */ + single_step_state[i].position = 0; + single_step_state[i].active = 0; + + /* Initialize multi-track seek state */ + multi_seek_state[i].position = 0; + multi_seek_state[i].active = 0; + multi_seek_state[i].duration_samples = 0; + multi_seek_state[i].from_track = -1; + multi_seek_state[i].to_track = -1; + } + + /* Initialize sound thread */ + sound_fdd_thread_init(); +} + +void +fdd_audio_close(void) +{ + /* Free 3.5" samples */ + if (samples_35.spindlemotor_start.buffer) { + free(samples_35.spindlemotor_start.buffer); + samples_35.spindlemotor_start.buffer = NULL; + samples_35.spindlemotor_start.samples = 0; + } + if (samples_35.spindlemotor_loop.buffer) { + free(samples_35.spindlemotor_loop.buffer); + samples_35.spindlemotor_loop.buffer = NULL; + samples_35.spindlemotor_loop.samples = 0; + } + if (samples_35.spindlemotor_stop.buffer) { + free(samples_35.spindlemotor_stop.buffer); + samples_35.spindlemotor_stop.buffer = NULL; + samples_35.spindlemotor_stop.samples = 0; + } + if (samples_35.single_track_step.buffer) { + free(samples_35.single_track_step.buffer); + samples_35.single_track_step.buffer = NULL; + samples_35.single_track_step.samples = 0; + } + if (samples_35.multi_track_seek.buffer) { + free(samples_35.multi_track_seek.buffer); + samples_35.multi_track_seek.buffer = NULL; + samples_35.multi_track_seek.samples = 0; + } + + /* Free 5.25" samples */ + if (samples_525.spindlemotor_start.buffer) { + free(samples_525.spindlemotor_start.buffer); + samples_525.spindlemotor_start.buffer = NULL; + samples_525.spindlemotor_start.samples = 0; + } + if (samples_525.spindlemotor_loop.buffer) { + free(samples_525.spindlemotor_loop.buffer); + samples_525.spindlemotor_loop.buffer = NULL; + samples_525.spindlemotor_loop.samples = 0; + } + if (samples_525.spindlemotor_stop.buffer) { + free(samples_525.spindlemotor_stop.buffer); + samples_525.spindlemotor_stop.buffer = NULL; + samples_525.spindlemotor_stop.samples = 0; + } + if (samples_525.single_track_step.buffer) { + free(samples_525.single_track_step.buffer); + samples_525.single_track_step.buffer = NULL; + samples_525.single_track_step.samples = 0; + } + if (samples_525.multi_track_seek.buffer) { + free(samples_525.multi_track_seek.buffer); + samples_525.multi_track_seek.buffer = NULL; + samples_525.multi_track_seek.samples = 0; + } + + if (samples_teac.spindlemotor_start.buffer) { + free(samples_teac.spindlemotor_start.buffer); + samples_teac.spindlemotor_start.buffer = NULL; + samples_teac.spindlemotor_start.samples = 0; + } + if (samples_teac.spindlemotor_loop.buffer) { + free(samples_teac.spindlemotor_loop.buffer); + samples_teac.spindlemotor_loop.buffer = NULL; + samples_teac.spindlemotor_loop.samples = 0; + } + if (samples_teac.spindlemotor_stop.buffer) { + free(samples_teac.spindlemotor_stop.buffer); + samples_teac.spindlemotor_stop.buffer = NULL; + samples_teac.spindlemotor_stop.samples = 0; + } + if (samples_teac.single_track_step.buffer) { + free(samples_teac.single_track_step.buffer); + samples_teac.single_track_step.buffer = NULL; + samples_teac.single_track_step.samples = 0; + } + if (samples_teac.multi_track_seek.buffer) { + free(samples_teac.multi_track_seek.buffer); + samples_teac.multi_track_seek.buffer = NULL; + samples_teac.multi_track_seek.samples = 0; + } + + /* End sound thread */ + sound_fdd_thread_end(); +} + +void +fdd_audio_set_motor_enable(int drive, int motor_enable) +{ + if (!fdd_sounds_enabled || fdd_get_turbo(drive)) + return; + + drive_audio_samples_t *samples = get_drive_samples(drive); + if (!samples) + return; + + if (motor_enable && !motoron[drive]) { + /* Motor starting up */ + if (spindlemotor_state[drive] == MOTOR_STATE_STOPPING) { + /* Interrupt stop sequence and transition back to loop */ + spindlemotor_state[drive] = MOTOR_STATE_RUNNING; + spindlemotor_pos[drive] = 0; + spindlemotor_fade_volume[drive] = 1.0f; + spindlemotor_fade_samples_remaining[drive] = 0; + } else { + /* Normal startup */ + spindlemotor_state[drive] = MOTOR_STATE_STARTING; + spindlemotor_pos[drive] = 0; + spindlemotor_fade_volume[drive] = 1.0f; + spindlemotor_fade_samples_remaining[drive] = 0; + } + } else if (!motor_enable && motoron[drive]) { + /* Motor stopping */ + spindlemotor_state[drive] = MOTOR_STATE_STOPPING; + spindlemotor_pos[drive] = 0; + spindlemotor_fade_volume[drive] = 1.0f; + spindlemotor_fade_samples_remaining[drive] = FADE_SAMPLES; + } +} + +void +fdd_audio_play_single_track_step(int drive, int from_track, int to_track) +{ + if (!fdd_sounds_enabled || fdd_get_turbo(drive)) + return; + + if (drive < 0 || drive >= FDD_NUM) + return; + if (abs(from_track - to_track) != 1) + return; /* Only single track movements */ + + single_step_state[drive].position = 0; + single_step_state[drive].active = 1; +} + +void +fdd_audio_play_multi_track_seek(int drive, int from_track, int to_track) +{ + if (!fdd_sounds_enabled || fdd_get_turbo(drive)) + return; + + if (drive < 0 || drive >= FDD_NUM) + return; + + int track_diff = abs(from_track - to_track); + if (track_diff <= 1) + return; /* Use single step for 1 track movements */ + + drive_audio_samples_t *samples = get_drive_samples(drive); + if (!samples || !samples->multi_track_seek.buffer || samples->multi_track_seek.samples == 0) + return; /* No multi-track seek sample loaded */ + + /* Check if a seek is already active */ + if (multi_seek_state[drive].active && + multi_seek_state[drive].from_track == from_track && + multi_seek_state[drive].to_track == to_track) { + return; + } + + /* Calculate duration based on drive type */ + int duration_samples; + if (fdd_is_525(drive)) { + /* 5.25": 285ms for 40 tracks = 7.125ms per track at 48kHz sample rate */ + /* 7.125ms = 0.007125s, at 48000 Hz = 342 samples per track */ + duration_samples = track_diff * 342; + } else { + /* 3.5": 495ms for 80 tracks = 6.1875ms per track at 48kHz sample rate */ + /* 6.1875ms = 0.0061875s, at 48000 Hz = 297 samples per track */ + duration_samples = track_diff * 297; + } + + /* Clamp to maximum available sample length */ + if (duration_samples > samples->multi_track_seek.samples) + duration_samples = samples->multi_track_seek.samples; + + /* Start new seek (or restart interrupted seek) */ + multi_seek_state[drive].position = 0; + multi_seek_state[drive].active = 1; + multi_seek_state[drive].duration_samples = duration_samples; + multi_seek_state[drive].from_track = from_track; + multi_seek_state[drive].to_track = to_track; +} + +void +fdd_audio_callback(int16_t *buffer, int length) +{ + /* Clear buffer */ + memset(buffer, 0, length * sizeof(int16_t)); + /* Check if any motor is running or transitioning, or any audio is active */ + int any_audio_active = 0; + for (int drive = 0; drive < FDD_NUM; drive++) { + if (spindlemotor_state[drive] != MOTOR_STATE_STOPPED || + single_step_state[drive].active || + multi_seek_state[drive].active) { + any_audio_active = 1; + break; + } + } + + if (!any_audio_active) + return; + + float *float_buffer = (float *) buffer; + int16_t *int16_buffer = (int16_t *) buffer; + int samples_in_buffer = length / 2; + + /* Process audio for all drives */ + if (sound_is_float) for (int drive = 0; drive < FDD_NUM; drive++) { + drive_audio_samples_t *samples = get_drive_samples(drive); + if (!samples) + continue; + + for (int i = 0; i < samples_in_buffer; i++) { + float left_sample = 0.0f; + float right_sample = 0.0f; + + /* Process motor audio */ + if (spindlemotor_state[drive] != MOTOR_STATE_STOPPED) { + switch (spindlemotor_state[drive]) { + case MOTOR_STATE_STARTING: + if (samples->spindlemotor_start.buffer && spindlemotor_pos[drive] < samples->spindlemotor_start.samples) { + /* Play start sound with volume control */ + left_sample = (float) samples->spindlemotor_start.buffer[spindlemotor_pos[drive] * 2] / 131072.0f * samples->spindlemotor_start.volume; + right_sample = (float) samples->spindlemotor_start.buffer[spindlemotor_pos[drive] * 2 + 1] / 131072.0f * samples->spindlemotor_start.volume; + spindlemotor_pos[drive]++; + } else { + /* Start sound finished, transition to loop */ + spindlemotor_state[drive] = MOTOR_STATE_RUNNING; + spindlemotor_pos[drive] = 0; + } + break; + + case MOTOR_STATE_RUNNING: + if (samples->spindlemotor_loop.buffer && samples->spindlemotor_loop.samples > 0) { + /* Play loop sound with volume control */ + left_sample = (float) samples->spindlemotor_loop.buffer[spindlemotor_pos[drive] * 2] / 131072.0f * samples->spindlemotor_loop.volume; + right_sample = (float) samples->spindlemotor_loop.buffer[spindlemotor_pos[drive] * 2 + 1] / 131072.0f * samples->spindlemotor_loop.volume; + spindlemotor_pos[drive]++; + + /* Loop back to beginning */ + if (spindlemotor_pos[drive] >= samples->spindlemotor_loop.samples) { + spindlemotor_pos[drive] = 0; + } + } + break; + + case MOTOR_STATE_STOPPING: + if (spindlemotor_fade_samples_remaining[drive] > 0) { + /* Mix fading loop sound with rising stop sound */ + float loop_volume = spindlemotor_fade_volume[drive]; + float stop_volume = 1.0f - loop_volume; + + float loop_left = 0.0f, loop_right = 0.0f; + float stop_left = 0.0f, stop_right = 0.0f; + + /* Get loop sample (continue from current position) with volume control */ + if (samples->spindlemotor_loop.buffer && samples->spindlemotor_loop.samples > 0) { + int loop_pos = spindlemotor_pos[drive] % samples->spindlemotor_loop.samples; + loop_left = (float) samples->spindlemotor_loop.buffer[loop_pos * 2] / 131072.0f * samples->spindlemotor_loop.volume; + loop_right = (float) samples->spindlemotor_loop.buffer[loop_pos * 2 + 1] / 131072.0f * samples->spindlemotor_loop.volume; + } + + /* Get stop sample with volume control */ + if (samples->spindlemotor_stop.buffer && spindlemotor_pos[drive] < samples->spindlemotor_stop.samples) { + stop_left = (float) samples->spindlemotor_stop.buffer[spindlemotor_pos[drive] * 2] / 131072.0f * samples->spindlemotor_stop.volume; + stop_right = (float) samples->spindlemotor_stop.buffer[spindlemotor_pos[drive] * 2 + 1] / 131072.0f * samples->spindlemotor_stop.volume; + } + + /* Mix the sounds */ + left_sample = loop_left * loop_volume + stop_left * stop_volume; + right_sample = loop_right * loop_volume + stop_right * stop_volume; + + spindlemotor_pos[drive]++; + spindlemotor_fade_samples_remaining[drive]--; + + /* Update fade volume */ + spindlemotor_fade_volume[drive] = (float) spindlemotor_fade_samples_remaining[drive] / FADE_SAMPLES; + } else { + /* Fade completed, play remaining stop sound with volume control */ + if (samples->spindlemotor_stop.buffer && spindlemotor_pos[drive] < samples->spindlemotor_stop.samples) { + left_sample = (float) samples->spindlemotor_stop.buffer[spindlemotor_pos[drive] * 2] / 131072.0f * samples->spindlemotor_stop.volume; + right_sample = (float) samples->spindlemotor_stop.buffer[spindlemotor_pos[drive] * 2 + 1] / 131072.0f * samples->spindlemotor_stop.volume; + spindlemotor_pos[drive]++; + } else { + /* Stop sound finished */ + spindlemotor_state[drive] = MOTOR_STATE_STOPPED; + /* Note: Timer disabling is handled by fdd.c, not here */ + } + } + break; + + default: + break; + } + } + + /* Process single step audio */ + if (single_step_state[drive].active) { + if (samples->single_track_step.buffer && single_step_state[drive].position < samples->single_track_step.samples) { + /* Mix step sound with motor sound with volume control */ + float step_left = (float) samples->single_track_step.buffer[single_step_state[drive].position * 2] / 131072.0f * samples->single_track_step.volume; + float step_right = (float) samples->single_track_step.buffer[single_step_state[drive].position * 2 + 1] / 131072.0f * samples->single_track_step.volume; + + left_sample += step_left; + right_sample += step_right; + + single_step_state[drive].position++; + } else { + /* Step sound finished */ + single_step_state[drive].active = 0; + single_step_state[drive].position = 0; + } + } + + /* Process multi-track seek audio */ + if (multi_seek_state[drive].active) { + if (samples->multi_track_seek.buffer && + multi_seek_state[drive].position < multi_seek_state[drive].duration_samples && + multi_seek_state[drive].position < samples->multi_track_seek.samples) { + /* Mix seek sound with motor sound with volume control */ + float seek_left = (float) samples->multi_track_seek.buffer[multi_seek_state[drive].position * 2] / 131072.0f * samples->multi_track_seek.volume; + float seek_right = (float) samples->multi_track_seek.buffer[multi_seek_state[drive].position * 2 + 1] / 131072.0f * samples->multi_track_seek.volume; + + left_sample += seek_left; + right_sample += seek_right; + + multi_seek_state[drive].position++; + } else { + /* Seek sound finished */ + multi_seek_state[drive].active = 0; + multi_seek_state[drive].position = 0; + multi_seek_state[drive].duration_samples = 0; + multi_seek_state[drive].from_track = -1; + multi_seek_state[drive].to_track = -1; + } + } + + /* Mix this drive's audio into the buffer */ + float_buffer[i * 2] += left_sample; + float_buffer[i * 2 + 1] += right_sample; + } + } else for (int drive = 0; drive < FDD_NUM; drive++) { + drive_audio_samples_t *samples = get_drive_samples(drive); + if (!samples) + continue; + + for (int i = 0; i < samples_in_buffer; i++) { + int16_t left_sample = 0.0f; + int16_t right_sample = 0.0f; + + /* Process motor audio */ + if (spindlemotor_state[drive] != MOTOR_STATE_STOPPED) { + switch (spindlemotor_state[drive]) { + case MOTOR_STATE_STARTING: + if (samples->spindlemotor_start.buffer && spindlemotor_pos[drive] < samples->spindlemotor_start.samples) { + /* Play start sound with volume control */ + left_sample = (int16_t) (float) samples->spindlemotor_start.buffer[spindlemotor_pos[drive] * 2] / 4.0f * samples->spindlemotor_start.volume; + right_sample = (int16_t) (float) samples->spindlemotor_start.buffer[spindlemotor_pos[drive] * 2 + 1] / 4.0f * samples->spindlemotor_start.volume; + spindlemotor_pos[drive]++; + } else { + /* Start sound finished, transition to loop */ + spindlemotor_state[drive] = MOTOR_STATE_RUNNING; + spindlemotor_pos[drive] = 0; + } + break; + + case MOTOR_STATE_RUNNING: + if (samples->spindlemotor_loop.buffer && samples->spindlemotor_loop.samples > 0) { + /* Play loop sound with volume control */ + left_sample = (int16_t) (float) samples->spindlemotor_loop.buffer[spindlemotor_pos[drive] * 2] / 4.0f * samples->spindlemotor_loop.volume; + right_sample = (int16_t) (float) samples->spindlemotor_loop.buffer[spindlemotor_pos[drive] * 2 + 1] / 4.0f * samples->spindlemotor_loop.volume; + spindlemotor_pos[drive]++; + + /* Loop back to beginning */ + if (spindlemotor_pos[drive] >= samples->spindlemotor_loop.samples) { + spindlemotor_pos[drive] = 0; + } + } + break; + + case MOTOR_STATE_STOPPING: + if (spindlemotor_fade_samples_remaining[drive] > 0) { + /* Mix fading loop sound with rising stop sound */ + float loop_volume = spindlemotor_fade_volume[drive]; + float stop_volume = 1.0f - loop_volume; + + int16_t loop_left = 0x0000, loop_right = 0x0000; + int16_t stop_left = 0x0000, stop_right = 0x0000; + + /* Get loop sample (continue from current position) with volume control */ + if (samples->spindlemotor_loop.buffer && samples->spindlemotor_loop.samples > 0) { + int loop_pos = spindlemotor_pos[drive] % samples->spindlemotor_loop.samples; + loop_left = (int16_t) (float) samples->spindlemotor_loop.buffer[loop_pos * 2] / 4.0f * samples->spindlemotor_loop.volume; + loop_right = (int16_t) (float) samples->spindlemotor_loop.buffer[loop_pos * 2 + 1] / 4.0f * samples->spindlemotor_loop.volume; + } + + /* Get stop sample with volume control */ + if (samples->spindlemotor_stop.buffer && spindlemotor_pos[drive] < samples->spindlemotor_stop.samples) { + stop_left = (int16_t) (float) samples->spindlemotor_stop.buffer[spindlemotor_pos[drive] * 2] / 4.0f * samples->spindlemotor_stop.volume; + stop_right = (int16_t) samples->spindlemotor_stop.buffer[spindlemotor_pos[drive] * 2 + 1] / 4.0f * samples->spindlemotor_stop.volume; + } + + /* Mix the sounds */ + left_sample = loop_left * loop_volume + stop_left * stop_volume; + right_sample = loop_right * loop_volume + stop_right * stop_volume; + + spindlemotor_pos[drive]++; + spindlemotor_fade_samples_remaining[drive]--; + + /* Update fade volume */ + spindlemotor_fade_volume[drive] = (int16_t) (float) spindlemotor_fade_samples_remaining[drive] / FADE_SAMPLES; + } else { + /* Fade completed, play remaining stop sound with volume control */ + if (samples->spindlemotor_stop.buffer && spindlemotor_pos[drive] < samples->spindlemotor_stop.samples) { + left_sample = (int16_t) (float) samples->spindlemotor_stop.buffer[spindlemotor_pos[drive] * 2] / 4.0f * samples->spindlemotor_stop.volume; + right_sample = (int16_t) (float) samples->spindlemotor_stop.buffer[spindlemotor_pos[drive] * 2 + 1] / 4.0f * samples->spindlemotor_stop.volume; + spindlemotor_pos[drive]++; + } else { + /* Stop sound finished */ + spindlemotor_state[drive] = MOTOR_STATE_STOPPED; + /* Note: Timer disabling is handled by fdd.c, not here */ + } + } + break; + + default: + break; + } + } + + /* Process single step audio */ + if (single_step_state[drive].active) { + if (samples->single_track_step.buffer && single_step_state[drive].position < samples->single_track_step.samples) { + /* Mix step sound with motor sound with volume control */ + int16_t step_left = (int16_t) (float) samples->single_track_step.buffer[single_step_state[drive].position * 2] / 4.0f * samples->single_track_step.volume; + int16_t step_right = (int16_t) (float) samples->single_track_step.buffer[single_step_state[drive].position * 2 + 1] / 4.0f * samples->single_track_step.volume; + + left_sample += step_left; + right_sample += step_right; + + single_step_state[drive].position++; + } else { + /* Step sound finished */ + single_step_state[drive].active = 0; + single_step_state[drive].position = 0; + } + } + + /* Process multi-track seek audio */ + if (multi_seek_state[drive].active) { + if (samples->multi_track_seek.buffer && + multi_seek_state[drive].position < multi_seek_state[drive].duration_samples && + multi_seek_state[drive].position < samples->multi_track_seek.samples) { + /* Mix seek sound with motor sound with volume control */ + int16_t seek_left = (int16_t) (float) samples->multi_track_seek.buffer[multi_seek_state[drive].position * 2] / 4.0f * samples->multi_track_seek.volume; + int16_t seek_right = (int16_t) (float) samples->multi_track_seek.buffer[multi_seek_state[drive].position * 2 + 1] / 4.0f * samples->multi_track_seek.volume; + + left_sample += seek_left; + right_sample += seek_right; + + multi_seek_state[drive].position++; + } else { + /* Seek sound finished */ + multi_seek_state[drive].active = 0; + multi_seek_state[drive].position = 0; + multi_seek_state[drive].duration_samples = 0; + multi_seek_state[drive].from_track = -1; + multi_seek_state[drive].to_track = -1; + } + } + + /* Mix this drive's audio into the buffer */ + int16_buffer[i * 2] += left_sample; + int16_buffer[i * 2 + 1] += right_sample; + } + } +} +#else + +void fdd_audio_init(void) {} +void fdd_audio_close(void) {} +void fdd_audio_set_motor_enable(int drive, int motor_enable) { (void) drive; (void) motor_enable; } +void fdd_audio_play_single_track_step(int drive, int from_track, int to_track) { (void) drive; (void) from_track; (void) to_track; } +void fdd_audio_play_multi_track_seek(int drive, int from_track, int to_track) { (void) drive; (void) from_track; (void) to_track; } +void fdd_audio_callback(int16_t *buffer, int length) { memset(buffer, 0, length * sizeof(int16_t)); } + +#endif /* DISABLE_FDD_AUDIO */ \ No newline at end of file diff --git a/src/floppy/fdd_common.c b/src/floppy/fdd_common.c index d0659d990..ee694fac0 100644 --- a/src/floppy/fdd_common.c +++ b/src/floppy/fdd_common.c @@ -8,8 +8,6 @@ * * Shared code for all the floppy modules. * - * - * * Authors: Fred N. van Kempen, * * Copyright 2017-2018 Fred N. van Kempen. diff --git a/src/floppy/fdd_fdi.c b/src/floppy/fdd_fdi.c index 97b6441a0..835a06a53 100644 --- a/src/floppy/fdd_fdi.c +++ b/src/floppy/fdd_fdi.c @@ -9,8 +9,6 @@ * Implementation of the FDI floppy stream image format * interface to the FDI2RAW module. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, diff --git a/src/floppy/fdd_imd.c b/src/floppy/fdd_imd.c index 7994530ed..314b42927 100644 --- a/src/floppy/fdd_imd.c +++ b/src/floppy/fdd_imd.c @@ -8,8 +8,6 @@ * * Implementation of the IMD floppy image format. * - * - * * Authors: Fred N. van Kempen, * Miran Grca, * diff --git a/src/floppy/fdd_img.c b/src/floppy/fdd_img.c index 30e0212cd..5cd736377 100644 --- a/src/floppy/fdd_img.c +++ b/src/floppy/fdd_img.c @@ -13,8 +13,6 @@ * re-merged with the other files. Much of it is generic to * all formats. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, diff --git a/src/floppy/fdd_mfm.c b/src/floppy/fdd_mfm.c index 87da4e08b..68448bfab 100644 --- a/src/floppy/fdd_mfm.c +++ b/src/floppy/fdd_mfm.c @@ -8,8 +8,6 @@ * * Implementation of the HxC MFM image format. * - * - * * Authors: Miran Grca, * * Copyright 2018-2019 Miran Grca. diff --git a/src/floppy/fdd_pcjs.c b/src/floppy/fdd_pcjs.c index 6f69042b0..2193048c6 100644 --- a/src/floppy/fdd_pcjs.c +++ b/src/floppy/fdd_pcjs.c @@ -12,8 +12,6 @@ * * Copyright 2024 cold-brewed */ - - #include #include #include diff --git a/src/floppy/fdd_td0.c b/src/floppy/fdd_td0.c index f5882158b..f62e22c70 100644 --- a/src/floppy/fdd_td0.c +++ b/src/floppy/fdd_td0.c @@ -8,8 +8,6 @@ * * Implementation of the Teledisk floppy image format. * - * - * * Authors: Milodrag Milanovic, * Haruhiko OKUMURA, * Haruyasu YOSHIZAKI, diff --git a/src/floppy/fdi2raw.c b/src/floppy/fdi2raw.c index c6a41a52d..7c068e056 100644 --- a/src/floppy/fdi2raw.c +++ b/src/floppy/fdi2raw.c @@ -12,8 +12,6 @@ * addition of get_last_head and C++ callability by Thomas * Harte. * - * - * * Authors: Toni Wilen, * and Vincent Joguin, * Thomas Harte, diff --git a/src/gdbstub.c b/src/gdbstub.c index 2ae40d24c..6e1e9af26 100644 --- a/src/gdbstub.c +++ b/src/gdbstub.c @@ -8,8 +8,6 @@ * * GDB stub server for remote debugging. * - * - * * Authors: RichardG, * * Copyright 2022 RichardG. @@ -535,8 +533,8 @@ gdbstub_client_write_reg(int index, uint8_t *buf) break; case GDB_REG_EFLAGS: - cpu_state.flags = *((uint16_t *) &buf[0]); - cpu_state.eflags = *((uint16_t *) &buf[2]); + cpu_state.flags = AS_U16(buf[0]); + cpu_state.eflags = AS_U16(buf[2]); break; case GDB_REG_CS ... GDB_REG_GS: @@ -564,8 +562,8 @@ gdbstub_client_write_reg(int index, uint8_t *buf) case GDB_REG_ST0 ... GDB_REG_ST7: width = 10; x87_conv_t conv = { - .eind = { .ll = *((uint64_t *) &buf[0]) }, - .begin = *((uint16_t *) &buf[8]) + .eind = { .ll = AS_U64(buf[0]) }, + .begin = AS_U16(buf[8]) }; cpu_state.ST[(cpu_state.TOP + (index - GDB_REG_ST0)) & 7] = x87_from80(&conv); break; @@ -671,8 +669,8 @@ gdbstub_client_read_reg(int index, uint8_t *buf) break; case GDB_REG_EFLAGS: - *((uint16_t *) &buf[0]) = cpu_state.flags; - *((uint16_t *) &buf[2]) = cpu_state.eflags; + AS_U16(buf[0]) = cpu_state.flags; + AS_U16(buf[2]) = cpu_state.eflags; break; case GDB_REG_CS ... GDB_REG_GS: @@ -697,8 +695,8 @@ gdbstub_client_read_reg(int index, uint8_t *buf) width = 10; x87_conv_t conv; x87_to80(cpu_state.ST[(cpu_state.TOP + (index - GDB_REG_ST0)) & 7], &conv); - *((uint64_t *) &buf[0]) = conv.eind.ll; - *((uint16_t *) &buf[8]) = conv.begin; + AS_U64(buf[0]) = conv.eind.ll; + AS_U16(buf[8]) = conv.begin; break; case GDB_REG_FCTRL ... GDB_REG_FSTAT: @@ -757,7 +755,7 @@ gdbstub_client_packet(gdbstub_client_t *client) #ifdef GDBSTUB_CHECK_CHECKSUM gdbstub_client_read_hex(client, &rcv_checksum, 1); #endif - *((uint16_t *) &client->packet[--client->packet_pos]) = 0; + AS_U16(client->packet[--client->packet_pos]) = 0; #ifdef GDBSTUB_CHECK_CHECKSUM for (i = 0; i < client->packet_pos; i++) checksum += client->packet[i]; @@ -881,6 +879,7 @@ e22: /* Read by qwords, then by dwords, then by words, then by bytes. */ i = 0; + cpl_override = 1; if (is386) { for (; i < (k & ~7); i += 8) { *((uint64_t *) buf) = readmemql(j); @@ -902,6 +901,7 @@ e22: buf[0] = readmembl(j++); gdbstub_client_respond_hex(client, buf, 1); } + cpl_override = 0; break; case 'M': /* write memory */ @@ -936,6 +936,7 @@ e22: /* Write by qwords, then by dwords, then by words, then by bytes. */ p = client->packet; i = 0; + cpl_override = 1; if (is386) { for (; i < (k & ~7); i += 8) { writememql(j, *((uint64_t *) p)); @@ -957,6 +958,7 @@ e22: writemembl(j++, p[0]); p++; } + cpl_override = 0; /* Respond positively. */ goto ok; diff --git a/src/include/86box/86box.h b/src/include/86box/86box.h index 33749d440..6c924e031 100644 --- a/src/include/86box/86box.h +++ b/src/include/86box/86box.h @@ -79,6 +79,17 @@ #define BCD16(x) ((((x) / 1000) << 12) | (((x) / 100) << 8) | BCD8(x)) #define BCD32(x) ((((x) / 10000000) << 28) | (((x) / 1000000) << 24) | (((x) / 100000) << 20) | (((x) / 10000) << 16) | BCD16(x)) +#define AS_U8(x) (*((uint8_t *) &(x))) +#define AS_U16(x) (*((uint16_t *) &(x))) +#define AS_U32(x) (*((uint32_t *) &(x))) +#define AS_U64(x) (*((uint64_t *) &(x))) +#define AS_I8(x) (*((int8_t *) &(x))) +#define AS_I16(x) (*((int16_t *) &(x))) +#define AS_I32(x) (*((int32_t *) &(x))) +#define AS_I64(x) (*((int64_t *) &(x))) +#define AS_FLOAT(x) (*((float *) &(x))) +#define AS_DOUBLE(x) (*((double *) &(x))) + #if defined(__GNUC__) || defined(__clang__) # define UNLIKELY(x) __builtin_expect((x), 0) # define LIKELY(x) __builtin_expect((x), 1) @@ -208,6 +219,7 @@ extern int monitor_edid; /* (C) Which EDID to use. 0=default, extern char monitor_edid_path[1024]; /* (C) Path to custom EDID */ extern int color_scheme; /* (C) Color scheme of UI (Windows-only) */ +extern int fdd_sounds_enabled; /* (C) Enable floppy drive sounds */ #ifndef USE_NEW_DYNAREC extern FILE *stdlog; /* file to log output to */ diff --git a/src/include/86box/access_bus.h b/src/include/86box/access_bus.h index 333a1d4a5..84099a3db 100644 --- a/src/include/86box/access_bus.h +++ b/src/include/86box/access_bus.h @@ -8,8 +8,6 @@ * * Definitions for the ACPI emulation. * - * - * * Authors: Miran Grca, * * Copyright 2020-2025 Miran Grca. diff --git a/src/include/86box/chipset.h b/src/include/86box/chipset.h index 9cd037d1f..66ae082ef 100644 --- a/src/include/86box/chipset.h +++ b/src/include/86box/chipset.h @@ -214,6 +214,10 @@ extern const device_t via_vt8231_device; /* VLSI */ extern const device_t vl82c480_device; extern const device_t vl82c486_device; +extern const device_t vl82c59x_device; +extern const device_t vl82c59x_compaq_device; +extern const device_t vl82c59x_wildcat_device; +extern const device_t vl82c59x_wildcat_compaq_device; extern const device_t vlsi_scamp_device; /* WD */ @@ -228,6 +232,10 @@ 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 phoenix_486_jumper_pci_pb600_device; + +extern const device_t ast_readout_device; +extern const device_t ast_nvr_device; extern const device_t radisys_config_device; diff --git a/src/include/86box/fdc.h b/src/include/86box/fdc.h index cd1e58db7..06ccafa39 100644 --- a/src/include/86box/fdc.h +++ b/src/include/86box/fdc.h @@ -14,10 +14,12 @@ * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, + * Toni Riikonen, * * Copyright 2008-2020 Sarah Walker. * Copyright 2016-2020 Miran Grca. * Copyright 2018-2020 Fred N. van Kempen. + * Copyright 2025 Toni Riikonen. */ #ifndef EMU_FDC_H #define EMU_FDC_H @@ -251,6 +253,7 @@ extern uint8_t fdc_read(uint16_t addr, void *priv); extern void fdc_reset(void *priv); extern uint8_t fdc_get_current_drive(void); +extern void fdc_seek_complete_interrupt(fdc_t *fdc, int drive); #ifdef EMU_DEVICE_H extern const device_t fdc_xt_device; diff --git a/src/include/86box/fdd.h b/src/include/86box/fdd.h index d6ade3bc6..b73365de2 100644 --- a/src/include/86box/fdd.h +++ b/src/include/86box/fdd.h @@ -11,10 +11,12 @@ * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, + * Toni Riikonen, * * Copyright 2008-2025 Sarah Walker. * Copyright 2016-2025 Miran Grca. * Copyright 2018-2025 Fred N. van Kempen. + * Copyright 2025 Toni Riikonen. */ #ifndef EMU_FDD_H #define EMU_FDD_H @@ -23,6 +25,13 @@ #define FLOPPY_IMAGE_HISTORY 10 #define SEEK_RECALIBRATE -999 +/* Per-drive audio profiles */ +#define FDD_AUDIO_PROFILE_NONE 0 +#define FDD_AUDIO_PROFILE_MITSUMI 1 +#define FDD_AUDIO_PROFILE_PANASONIC 2 +#define FDD_AUDIO_PROFILE_TEAC 3 +#define FDD_AUDIO_PROFILE_MAX 4 + #ifdef __cplusplus extern "C" { #endif @@ -53,6 +62,10 @@ extern int fdd_get_check_bpb(int drive); extern void fdd_set_type(int drive, int type); extern int fdd_get_type(int drive); +/* New audio profile accessors */ +extern void fdd_set_audio_profile(int drive, int profile); +extern int fdd_get_audio_profile(int drive); + extern int fdd_get_flags(int drive); extern int fdd_get_densel(int drive); diff --git a/src/include/86box/fdd_audio.h b/src/include/86box/fdd_audio.h new file mode 100644 index 000000000..acd4e9350 --- /dev/null +++ b/src/include/86box/fdd_audio.h @@ -0,0 +1,86 @@ +/* + * 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. + * + * Definitions for the floppy drive audio emulation. + * + * Authors: Toni Riikonen, + * + * Copyright 2025 Toni Riikonen. + */ +#ifndef EMU_FDD_AUDIO_H +#define EMU_FDD_AUDIO_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef DISABLE_FDD_AUDIO + +/* Motor sound states */ +typedef enum { + MOTOR_STATE_STOPPED = 0, + MOTOR_STATE_STARTING, + MOTOR_STATE_RUNNING, + MOTOR_STATE_STOPPING +} motor_state_t; + +/* WAV header structure */ +typedef struct { + char riff[4]; + uint32_t size; + char wave[4]; + char fmt[4]; + uint32_t fmt_size; + uint16_t audio_format; + uint16_t num_channels; + uint32_t sample_rate; + uint32_t byte_rate; + uint16_t block_align; + uint16_t bits_per_sample; + char data[4]; + uint32_t data_size; +} wav_header_t; + +/* Fade duration: 75ms at 48kHz = 3600 samples */ +#define FADE_DURATION_MS 75 +#define FADE_SAMPLES (48000 * FADE_DURATION_MS / 1000) + +#else + +typedef enum { + MOTOR_STATE_STOPPED = 0 +} motor_state_t; + +#endif /* DISABLE_FDD_AUDIO */ + +/* FDD audio initialization and cleanup */ +extern void fdd_audio_init(void); +extern void fdd_audio_close(void); + +/* Motor control for audio */ +extern void fdd_audio_set_motor_enable(int drive, int motor_enable); + +/* Single sector movement audio */ +extern void fdd_audio_play_single_track_step(int drive, int from_track, int to_track); + +/* Multi-track seek audio */ +extern void fdd_audio_play_multi_track_seek(int drive, int from_track, int to_track); + +/* Audio callback function */ +extern void fdd_audio_callback(int16_t *buffer, int length); + +/* State name helper function */ +extern const char *fdd_audio_motor_state_name(motor_state_t state); + +#ifdef __cplusplus +} +#endif + +#endif /*EMU_FDD_AUDIO_H*/ \ No newline at end of file diff --git a/src/include/86box/filters.h b/src/include/86box/filters.h index d11e79512..572137ef0 100644 --- a/src/include/86box/filters.h +++ b/src/include/86box/filters.h @@ -5,7 +5,7 @@ /* fc=150Hz */ static inline float -adgold_highpass_iir(int c, int i, float NewSample) +adgold_highpass_iir(int i, float NewSample) { float ACoef[NCoef + 1] = { 0.98657437157334349000, @@ -19,28 +19,28 @@ adgold_highpass_iir(int c, int i, float NewSample) 0.97261396931534050000 }; - static float y[2][2][NCoef + 1]; /* output samples */ - static float x[2][2][NCoef + 1]; /* input samples */ + static float y[2][NCoef + 1]; /* output samples */ + static float x[2][NCoef + 1]; /* input samples */ int n; /* shift the old samples */ for (n = NCoef; n > 0; n--) { - x[c][i][n] = x[c][i][n - 1]; - y[c][i][n] = y[c][i][n - 1]; + x[i][n] = x[i][n - 1]; + y[i][n] = y[i][n - 1]; } /* Calculate the new output */ - x[c][i][0] = NewSample; - y[c][i][0] = ACoef[0] * x[c][i][0]; + x[i][0] = NewSample; + y[i][0] = ACoef[0] * x[i][0]; for (n = 1; n <= NCoef; n++) - y[c][i][0] += ACoef[n] * x[c][i][n] - BCoef[n] * y[c][i][n]; + y[i][0] += ACoef[n] * x[i][n] - BCoef[n] * y[i][n]; - return y[c][i][0]; + return y[i][0]; } /* fc=150Hz */ static inline float -adgold_lowpass_iir(int c, int i, float NewSample) +adgold_lowpass_iir(int i, float NewSample) { float ACoef[NCoef + 1] = { 0.00009159473951071446, @@ -54,23 +54,23 @@ adgold_lowpass_iir(int c, int i, float NewSample) 0.97261396931306277000 }; - static float y[2][2][NCoef + 1]; /* output samples */ - static float x[2][2][NCoef + 1]; /* input samples */ + static float y[2][NCoef + 1]; /* output samples */ + static float x[2][NCoef + 1]; /* input samples */ int n; /* shift the old samples */ for (n = NCoef; n > 0; n--) { - x[c][i][n] = x[c][i][n - 1]; - y[c][i][n] = y[c][i][n - 1]; + x[i][n] = x[i][n - 1]; + y[i][n] = y[i][n - 1]; } /* Calculate the new output */ - x[c][i][0] = NewSample; - y[c][i][0] = ACoef[0] * x[c][i][0]; + x[i][0] = NewSample; + y[i][0] = ACoef[0] * x[i][0]; for (n = 1; n <= NCoef; n++) - y[c][i][0] += ACoef[n] * x[c][i][n] - BCoef[n] * y[c][i][n]; + y[i][0] += ACoef[n] * x[i][n] - BCoef[n] * y[i][n]; - return y[c][i][0]; + return y[i][0]; } /* fc=56Hz */ diff --git a/src/include/86box/hdc.h b/src/include/86box/hdc.h index 214ed84e5..91a4c68cd 100644 --- a/src/include/86box/hdc.h +++ b/src/include/86box/hdc.h @@ -76,6 +76,7 @@ extern const device_t ide_cmd640_pci_device; /* CMD PCI-640B extern const device_t ide_cmd640_pci_legacy_only_device; /* CMD PCI-640B PCI (Legacy Mode Only) */ extern const device_t ide_cmd640_pci_single_channel_device; /* CMD PCI-640B PCI (Only primary channel) */ extern const device_t ide_cmd640_pci_single_channel_sec_device; /* CMD PCI-640B PCI (Only secondary channel) */ +extern const device_t ide_cmd640_pci_single_channel_legacy_only_device; /* CMD PCI-640B PCI (Legacy Mode Only/Only primary channel) */ 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) */ @@ -89,6 +90,7 @@ extern const device_t ide_opti611_vlb_sec_device; /* OPTi 82c611/6 extern const device_t ide_rz1000_pci_device; /* PC Technology RZ-1000 PCI */ extern const device_t ide_rz1000_pci_single_channel_device; /* PC Technology RZ-1000 PCI (Only primary channel) */ +extern const device_t ide_rz1001_pci_device; /* PC Technology RZ-1001 PCI */ extern const device_t ide_um8673f_device; /* UMC UM8673F */ extern const device_t ide_um8886af_device; /* UMC UM8886AF */ diff --git a/src/include/86box/isapnp.h b/src/include/86box/isapnp.h index 5e48b7c18..9fedd656c 100644 --- a/src/include/86box/isapnp.h +++ b/src/include/86box/isapnp.h @@ -28,7 +28,8 @@ enum { ISAPNP_CARD_DISABLE = 0, ISAPNP_CARD_ENABLE = 1, ISAPNP_CARD_FORCE_CONFIG = 2, /* cheat code for UMC UM8669F */ - ISAPNP_CARD_NO_KEY = 3 /* cheat code for Crystal CS423x */ + ISAPNP_CARD_NO_KEY = 3, /* cheat code for Crystal CS423x */ + ISAPNP_CARD_FORCE_SLEEP = 4 /* cheat code for Yamaha YMF-71x */ }; typedef struct isapnp_device_config_t { @@ -56,19 +57,24 @@ typedef struct isapnp_device_config_t { extern const uint8_t isapnp_init_key[32]; -void *isapnp_add_card(uint8_t *rom, uint16_t rom_size, - void (*config_changed)(uint8_t ld, isapnp_device_config_t *config, void *priv), - void (*csn_changed)(uint8_t csn, void *priv), - uint8_t (*read_vendor_reg)(uint8_t ld, uint8_t reg, void *priv), - void (*write_vendor_reg)(uint8_t ld, uint8_t reg, uint8_t val, void *priv), - void *priv); -void isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size); -void isapnp_enable_card(void *priv, uint8_t enable); -void isapnp_set_csn(void *priv, uint8_t csn); -uint8_t isapnp_read_reg(void *priv, uint8_t ldn, uint8_t reg); -void isapnp_write_reg(void *priv, uint8_t ldn, uint8_t reg, uint8_t val); -void isapnp_set_device_defaults(void *priv, uint8_t ldn, const isapnp_device_config_t *config); -void isapnp_reset_card(void *priv); -void isapnp_reset_device(void *priv, uint8_t ld); +extern void *isapnp_add_card(uint8_t *rom, uint16_t rom_size, + void (*config_changed)(uint8_t ld, isapnp_device_config_t *config, void *priv), + void (*csn_changed)(uint8_t csn, void *priv), + uint8_t (*read_vendor_reg)(uint8_t ld, uint8_t reg, void *priv), + void (*write_vendor_reg)(uint8_t ld, uint8_t reg, uint8_t val, void *priv), + void *priv); +extern void isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size); +extern void isapnp_enable_card(void *priv, uint8_t enable); +extern void isapnp_set_csn(void *priv, uint8_t csn); +extern uint8_t isapnp_read_reg(void *priv, uint8_t ldn, uint8_t reg); +extern void isapnp_write_reg(void *priv, uint8_t ldn, uint8_t reg, uint8_t val); +extern void isapnp_set_device_defaults(void *priv, uint8_t ldn, const isapnp_device_config_t *config); +extern void isapnp_reset_card(void *priv); +extern void isapnp_reset_device(void *priv, uint8_t ld); +extern void isapnp_set_rt(void *priv, uint8_t is_rt); +extern void isapnp_set_normal(void *priv, uint8_t normal); +extern void isapnp_activate(void *priv, uint16_t base, uint8_t irq, int active); +extern void isapnp_set_single_ld(void *priv); +extern uint8_t *isapnp_get_csnsav(void *priv); #endif /*EMU_ISAPNP_H*/ diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 101ed2934..3daba325f 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -301,6 +301,8 @@ enum { MACHINE_CHIPSET_VLSI_VL82C480, MACHINE_CHIPSET_VLSI_VL82C481, MACHINE_CHIPSET_VLSI_VL82C486, + MACHINE_CHIPSET_VLSI_SUPERCORE, + MACHINE_CHIPSET_VLSI_WILDCAT, MACHINE_CHIPSET_WD76C10, MACHINE_CHIPSET_ZYMOS_POACH, MACHINE_CHIPSET_MAX @@ -890,6 +892,9 @@ extern int machine_at_ecs50x_init(const machine_t *); /* OPTi 597 */ extern int machine_at_pci56001_init(const machine_t *); +/* VLSI SuperCore */ +extern int machine_at_celebris5xx_init(const machine_t *); + /* m_at_socket5.c */ /* i430NX */ extern int machine_at_p54np4_init(const machine_t *); @@ -930,6 +935,15 @@ extern int machine_at_torino_init(const machine_t *); /* UMC 889x */ extern int machine_at_hot539_init(const machine_t *); +/* VLSI SuperCore */ +extern int machine_at_bravoms586_init(const machine_t *); +extern int machine_at_g586vpmc_init(const machine_t *); +extern int machine_at_m54si_init(const machine_t *); +extern int machine_at_pb600_init(const machine_t *); + +/* VLSI Wildcat */ +extern int machine_at_globalyst620_init(const machine_t *); + /* m_at_socket7_3v.c */ /* i430FX */ #ifdef EMU_DEVICE_H @@ -976,6 +990,9 @@ 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 *); +/* VLSI Wildcat */ +extern int machine_at_zeoswildcat_init(const machine_t *); + /* m_at_socket7.c */ /* i430HX */ extern int machine_at_acerm3a_init(const machine_t *); @@ -1072,7 +1089,10 @@ 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 *); +#ifdef EMU_DEVICE_H +extern const device_t g5x_device; +#endif +extern int machine_at_g5x_init(const machine_t *); /* VIA MVP3 */ extern int machine_at_ax59pro_init(const machine_t *); @@ -1117,6 +1137,9 @@ extern int machine_at_p65up5_cpknd_init(const machine_t *); extern int machine_at_kn97_init(const machine_t *); /* i440LX */ +#ifdef EMU_DEVICE_H +extern const device_t lx6_device; +#endif 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 *); @@ -1134,7 +1157,10 @@ 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 *); +#ifdef EMU_DEVICE_H +extern const device_t ga686_device; +#endif +extern int machine_at_ga686_init(const machine_t *); #ifdef EMU_DEVICE_H extern const device_t ms6119_device; #endif diff --git a/src/include/86box/nv/vid_nv_rivatimer.h b/src/include/86box/nv/vid_nv_rivatimer.h index 59f6cfebf..659f683bd 100644 --- a/src/include/86box/nv/vid_nv_rivatimer.h +++ b/src/include/86box/nv/vid_nv_rivatimer.h @@ -8,7 +8,6 @@ * * Fast, high-frequency, guest CPU-independent timer for Riva emulation. * - * * Authors: Connor Hyde, I need a better email address ;^) * * Copyright 2024-2025 starfrost diff --git a/src/include/86box/plat.h b/src/include/86box/plat.h index 552b074f7..b76728047 100644 --- a/src/include/86box/plat.h +++ b/src/include/86box/plat.h @@ -150,6 +150,7 @@ 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_file_check(const char *path); extern int plat_dir_create(char *path); extern void *plat_mmap(size_t size, uint8_t executable); extern void plat_munmap(void *ptr, size_t size); diff --git a/src/include/86box/rom.h b/src/include/86box/rom.h index 331d78526..807649956 100644 --- a/src/include/86box/rom.h +++ b/src/include/86box/rom.h @@ -59,7 +59,7 @@ extern void rom_writel(uint32_t addr, uint32_t val, void *priv); extern void rom_get_full_path(char *dest, const char *fn); extern FILE *rom_fopen(const char *fn, char *mode); -extern int rom_getfile(char *fn, char *s, int size); +extern int rom_getfile(const char *fn, char *s, int size); extern int rom_present(const char *fn); extern int rom_load_linear_oddeven(const char *fn, uint32_t addr, int sz, diff --git a/src/include/86box/snd_ad1848.h b/src/include/86box/snd_ad1848.h index 4ad6f1709..435b2aac4 100644 --- a/src/include/86box/snd_ad1848.h +++ b/src/include/86box/snd_ad1848.h @@ -66,10 +66,10 @@ typedef struct ad1848_t { uint8_t enable : 1; uint8_t irq : 4; uint8_t dma : 3; - uint8_t adpcm_ref; - int8_t adpcm_step; + int adpcm_predictor[2]; + int16_t adpcm_step_index[2]; int freq; - int adpcm_data; + uint8_t adpcm_data; int adpcm_pos; uint8_t dma_ff; diff --git a/src/include/86box/snd_opl.h b/src/include/86box/snd_opl.h index 62c62e965..fbc66a1c2 100644 --- a/src/include/86box/snd_opl.h +++ b/src/include/86box/snd_opl.h @@ -49,6 +49,9 @@ enum fm_type { FM_MAX = 26 }; +#define FM_TYPE_MASK 255 +#define FM_FORCE_48K 256 + enum fm_driver { FM_DRV_NUKED = 0, FM_DRV_YMFM = 1, @@ -65,9 +68,11 @@ typedef struct fm_drv_t { void (*generate)(void *priv, int32_t *data, uint32_t num_samples); /* daughterboard only. */ } fm_drv_t; +extern uint8_t fm_driver_get_ex(int chip_id, fm_drv_t *drv, int is_48k); extern uint8_t fm_driver_get(int chip_id, fm_drv_t *drv); extern const fm_drv_t nuked_opl_drv; +extern const fm_drv_t nuked_opl_drv_48k; extern const fm_drv_t ymfm_drv; extern const fm_drv_t esfmu_opl_drv; extern const fm_drv_t ymfm_opl2board_drv; diff --git a/src/include/86box/snd_opl_nuked.h b/src/include/86box/snd_opl_nuked.h index 0b203fe31..9fdbe16c4 100644 --- a/src/include/86box/snd_opl_nuked.h +++ b/src/include/86box/snd_opl_nuked.h @@ -147,7 +147,7 @@ struct _opl3_chip { typedef struct { opl3_chip opl; int8_t flags; - int8_t pad; + int8_t is_48k; uint16_t port; uint8_t status; @@ -159,6 +159,8 @@ typedef struct { int pos; int32_t buffer[MUSICBUFLEN * 2]; + + int32_t *(*update)(void *priv); } nuked_drv_t; enum { diff --git a/src/include/86box/sound.h b/src/include/86box/sound.h index 76a04356c..5815d3f66 100644 --- a/src/include/86box/sound.h +++ b/src/include/86box/sound.h @@ -103,12 +103,16 @@ extern void sound_card_reset(void); extern void sound_cd_thread_end(void); extern void sound_cd_thread_reset(void); +extern void sound_fdd_thread_init(void); +extern void sound_fdd_thread_end(void); + extern void closeal(void); extern void inital(void); extern void givealbuffer(const void *buf); extern void givealbuffer_music(const void *buf); extern void givealbuffer_wt(const void *buf); extern void givealbuffer_cd(const void *buf); +extern void givealbuffer_fdd(const void *buf, const uint32_t size); #define sb_vibra16c_onboard_relocate_base sb_vibra16s_onboard_relocate_base #define sb_vibra16cl_onboard_relocate_base sb_vibra16s_onboard_relocate_base @@ -240,6 +244,9 @@ extern const device_t ncr_business_audio_device; /* Yamaha YMF-7xx */ extern const device_t ymf701_device; +extern const device_t ymf715_onboard_device; +extern const device_t ymf718_device; +extern const device_t ymf719_device; #ifdef USE_LIBSERIALPORT /* External Audio device OPL2Board (Host Connected hardware)*/ diff --git a/src/include/86box/vfio.h b/src/include/86box/vfio.h new file mode 100644 index 000000000..2166070a0 --- /dev/null +++ b/src/include/86box/vfio.h @@ -0,0 +1,20 @@ +/* + * 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. + * + * Definitions for Virtual Function I/O PCI passthrough. + * + * Authors: RichardG, + * + * Copyright 2021-2025 RichardG. + */ +#if !defined(EMU_VFIO_H) && defined(USE_VFIO) +# define EMU_VFIO_H + +extern void vfio_init(void); + +#endif diff --git a/src/include/fdi2raw.h b/src/include/fdi2raw.h index b848b26f2..68e90ba9b 100644 --- a/src/include/fdi2raw.h +++ b/src/include/fdi2raw.h @@ -8,8 +8,6 @@ * * Definitions for the FDI floppy file format. * - * - * * Authors: Toni Wilen, * and Vincent Joguin, * Thomas Harte, diff --git a/src/io.c b/src/io.c index 45dd4cb3d..233dd6704 100644 --- a/src/io.c +++ b/src/io.c @@ -8,8 +8,6 @@ * * Implement I/O ports and their operations. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, diff --git a/src/ioapic.c b/src/ioapic.c index ea0811f91..4c28c2c64 100644 --- a/src/ioapic.c +++ b/src/ioapic.c @@ -9,8 +9,6 @@ * Skeleton I/O APIC implementation, currently housing the MPS * table patcher for machines that require it. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. diff --git a/src/machine/m_amstrad.c b/src/machine/m_amstrad.c index 809a4a701..8e52bd488 100644 --- a/src/machine/m_amstrad.c +++ b/src/machine/m_amstrad.c @@ -29,8 +29,6 @@ * All models: The internal mouse controller does not work correctly with * version 7.04 of the mouse driver. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, @@ -77,14 +75,14 @@ #include <86box/m_amstrad.h> #include <86box/plat_unused.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 +#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 #define DOUBLE_NONE 0 #define DOUBLE_SIMPLE 1 @@ -92,17 +90,17 @@ #define DOUBLE_INTERPOLATE_LINEAR 3 typedef struct amsvid_t { - rom_t bios_rom; /* 1640 */ - cga_t cga; /* 1640/200 */ - mda_t mda; /* 1512/200/PPC512/640*/ - ega_t ega; /* 1640 */ - uint8_t emulation; /* Which display are we emulating? */ - uint8_t dipswitches; /* DIP switches 1-3 */ - uint8_t crtc_index; /* CRTC index readback - * Bit 7: CGA control port written - * Bit 6: Operation control port written - * Bit 5: CRTC register written - * Bits 0-4: Last CRTC register selected */ + rom_t bios_rom; /* 1640 */ + cga_t cga; /* 1640/200 */ + mda_t mda; /* 1512/200/PPC512/640*/ + ega_t ega; /* 1640 */ + uint8_t emulation; /* Which display are we emulating? */ + uint8_t dipswitches; /* DIP switches 1-3 */ + uint8_t crtc_index; /* CRTC index readback + * Bit 7: CGA control port written + * Bit 6: Operation control port written + * Bit 5: CRTC register written + * Bits 0-4: Last CRTC register selected */ uint8_t operation_ctrl; uint8_t reg_3df; uint8_t type; @@ -163,8 +161,8 @@ typedef struct amstrad_t { /* Video stuff. */ amsvid_t *vid; - fdc_t *fdc; - lpt_t *lpt; + fdc_t *fdc; + lpt_t *lpt; } amstrad_t; uint32_t amstrad_latch; @@ -347,20 +345,18 @@ vid_read_1512(uint32_t addr, void *priv) static void ams1512_render(amsvid_t *vid, int line) { - uint16_t cursoraddr = (vid->crtc[15] | (vid->crtc[14] << 8)) & 0x3fff; - int drawcursor; - int x; - int c; - uint8_t chr; - uint8_t attr; - uint16_t dat; - uint16_t dat2; - uint16_t dat3; - uint16_t dat4; - int cols[4]; - int col; + uint16_t cursoraddr = (vid->crtc[15] | (vid->crtc[14] << 8)) & 0x3fff; + int drawcursor; + uint8_t chr; + uint8_t attr; + uint16_t dat; + uint16_t dat2; + uint16_t dat3; + uint16_t dat4; + int cols[4]; + int col; - for (c = 0; c < 8; c++) { + for (uint8_t c = 0; c < 8; c++) { if ((vid->cgamode & 0x12) == 0x12) { buffer32->line[line][c] = buffer32->line[(line) + 1][c] = (vid->border & 15) + 16; if (vid->cgamode & CGA_MODE_FLAG_HIGHRES) { @@ -378,10 +374,10 @@ ams1512_render(amsvid_t *vid, int line) } } if (vid->cgamode & CGA_MODE_FLAG_HIGHRES) { - for (x = 0; x < 80; x++) { - chr = vid->vram[(vid->memaddr<< 1) & 0x3fff]; - attr = vid->vram[((vid->memaddr<< 1) + 1) & 0x3fff]; - drawcursor = ((vid->memaddr== cursoraddr) && vid->cursorvisible && vid->cursoron); + for (uint8_t x = 0; x < 80; x++) { + chr = vid->vram[(vid->memaddr << 1) & 0x3fff]; + attr = vid->vram[((vid->memaddr << 1) + 1) & 0x3fff]; + drawcursor = ((vid->memaddr == cursoraddr) && vid->cursorvisible && vid->cursoron); if (vid->cgamode & CGA_MODE_FLAG_BLINK) { cols[1] = (attr & 15) + 16; cols[0] = ((attr >> 4) & 7) + 16; @@ -392,21 +388,21 @@ ams1512_render(amsvid_t *vid, int line) cols[0] = (attr >> 4) + 16; } if (drawcursor) - for (c = 0; c < 8; c++) + for (uint8_t c = 0; c < 8; c++) buffer32->line[line][(x << 3) + c + 8] = cols[(fontdat[vid->fontbase + chr][vid->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0] ^ 15; else - for (c = 0; c < 8; c++) + for (uint8_t c = 0; c < 8; c++) buffer32->line[line][(x << 3) + c + 8] = cols[(fontdat[vid->fontbase + chr][vid->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0]; vid->memaddr++; } } else if (!(vid->cgamode & CGA_MODE_FLAG_GRAPHICS)) { - for (x = 0; x < 40; x++) { - chr = vid->vram[(vid->memaddr<< 1) & 0x3fff]; - attr = vid->vram[((vid->memaddr<< 1) + 1) & 0x3fff]; - drawcursor = ((vid->memaddr == cursoraddr) && vid->cursorvisible && vid->cursoron); - + for (uint8_t x = 0; x < 40; x++) { + chr = vid->vram[(vid->memaddr << 1) & 0x3fff]; + attr = vid->vram[((vid->memaddr << 1) + 1) & 0x3fff]; + drawcursor = ((vid->memaddr == cursoraddr) && vid->cursorvisible && vid->cursoron); + if (vid->cgamode & CGA_MODE_FLAG_BLINK) { cols[1] = (attr & 15) + 16; cols[0] = ((attr >> 4) & 7) + 16; @@ -418,12 +414,12 @@ ams1512_render(amsvid_t *vid, int line) } vid->memaddr++; if (drawcursor) - for (c = 0; c < 8; c++) + for (uint8_t c = 0; c < 8; c++) buffer32->line[line][(x << 4) + (c << 1) + 8] = buffer32->line[line][(x << 4) + (c << 1) + 1 + 8] = cols[(fontdat[vid->fontbase + chr][vid->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0] ^ 15; else - for (c = 0; c < 8; c++) + for (uint8_t c = 0; c < 8; c++) buffer32->line[line][(x << 4) + (c << 1) + 8] = buffer32->line[line][(x << 4) + (c << 1) + 1 + 8] = cols[(fontdat[vid->fontbase + chr][vid->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0]; @@ -444,26 +440,26 @@ ams1512_render(amsvid_t *vid, int line) cols[2] = col | 4; cols[3] = col | 6; } - for (x = 0; x < 40; x++) { + for (uint8_t x = 0; x < 40; x++) { dat = (vid->vram[((vid->memaddr<< 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000)] << 8) | vid->vram[((vid->memaddr<< 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000) + 1]; vid->memaddr++; - for (c = 0; c < 8; c++) { + for (uint8_t c = 0; c < 8; c++) { buffer32->line[line][(x << 4) + (c << 1) + 8] = buffer32->line[line][(x << 4) + (c << 1) + 1 + 8] = cols[dat >> 14]; dat <<= 2; } } } else { - for (x = 0; x < 40; x++) { - cursoraddr = ((vid->memaddr<< 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000); - dat = (vid->vram[cursoraddr] << 8) | vid->vram[cursoraddr + 1]; - dat2 = (vid->vram[cursoraddr + 0x4000] << 8) | vid->vram[cursoraddr + 0x4001]; - dat3 = (vid->vram[cursoraddr + 0x8000] << 8) | vid->vram[cursoraddr + 0x8001]; - dat4 = (vid->vram[cursoraddr + 0xc000] << 8) | vid->vram[cursoraddr + 0xc001]; + for (uint8_t x = 0; x < 40; x++) { + cursoraddr = ((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000); + dat = (vid->vram[cursoraddr] << 8) | vid->vram[cursoraddr + 1]; + dat2 = (vid->vram[cursoraddr + 0x4000] << 8) | vid->vram[cursoraddr + 0x4001]; + dat3 = (vid->vram[cursoraddr + 0x8000] << 8) | vid->vram[cursoraddr + 0x8001]; + dat4 = (vid->vram[cursoraddr + 0xc000] << 8) | vid->vram[cursoraddr + 0xc001]; vid->memaddr++; - for (c = 0; c < 16; c++) { + for (uint8_t c = 0; c < 16; c++) { buffer32->line[line][(x << 4) + c + 8] = (((dat >> 15) | ((dat2 >> 15) << 1) | ((dat3 >> 15) << 2) | ((dat4 >> 15) << 3)) & (vid->cgacol & 15)) + 16; dat <<= 1; @@ -500,7 +496,7 @@ vid_poll_1512(void *priv) timer_advance_u64(&vid->timer, vid->dispofftime); vid->status |= 1; vid->linepos = 1; - scanline_old = vid->scanline; + scanline_old = vid->scanline; if (vid->dispon) { if (vid->displine < vid->firstline) { vid->firstline = vid->displine; @@ -522,18 +518,19 @@ vid_poll_1512(void *priv) ams1512_render(vid, (vid->displine << 1) + 1); break; } - } else switch (vid->double_type) { - default: - ams1512_render_blank(vid, vid->displine << 1); - break; - case DOUBLE_NONE: - ams1512_render_blank(vid, vid->displine); - break; - case DOUBLE_SIMPLE: - ams1512_render_blank(vid, vid->displine << 1); - ams1512_render_blank(vid, (vid->displine << 1) + 1); - break; - } + } else + switch (vid->double_type) { + default: + ams1512_render_blank(vid, vid->displine << 1); + break; + case DOUBLE_NONE: + ams1512_render_blank(vid, vid->displine); + break; + case DOUBLE_SIMPLE: + ams1512_render_blank(vid, vid->displine << 1); + ams1512_render_blank(vid, (vid->displine << 1) + 1); + break; + } if (vid->cgamode & CGA_MODE_FLAG_HIGHRES) x = (vid->crtc[1] << 3) + 16; @@ -569,21 +566,21 @@ vid_poll_1512(void *priv) vid->status &= ~8; } if (vid->scanline == (vid->crtc[11] & 31)) { - vid->cursorvisible = 0; + vid->cursorvisible = 0; } if (vid->vadj) { vid->scanline++; vid->scanline &= 31; - vid->memaddr= vid->memaddr_backup; + vid->memaddr = vid->memaddr_backup; vid->vadj--; if (!vid->vadj) { - vid->dispon = 1; - vid->memaddr= vid->memaddr_backup = (vid->crtc[13] | (vid->crtc[12] << 8)) & 0x3fff; - vid->scanline = 0; + vid->dispon = 1; + vid->memaddr = vid->memaddr_backup = (vid->crtc[13] | (vid->crtc[12] << 8)) & 0x3fff; + vid->scanline = 0; } } else if (vid->scanline == vid->crtc[9]) { vid->memaddr_backup = vid->memaddr; - vid->scanline = 0; + vid->scanline = 0; vid->vc++; vid->vc &= 127; @@ -654,7 +651,7 @@ vid_poll_1512(void *priv) } else { vid->scanline++; vid->scanline &= 31; - vid->memaddr= vid->memaddr_backup; + vid->memaddr = vid->memaddr_backup; } if (vid->scanline == (vid->crtc[10] & 31)) vid->cursorvisible = 1; @@ -664,10 +661,8 @@ vid_poll_1512(void *priv) static void vid_init_1512(amstrad_t *ams) { - amsvid_t *vid; - /* Allocate a video controller block. */ - vid = (amsvid_t *) calloc(1, sizeof(amsvid_t)); + amsvid_t *vid = (amsvid_t *) calloc(1, sizeof(amsvid_t)); video_inform(VIDEO_FLAG_TYPE_CGA, &timing_pc1512); @@ -714,20 +709,21 @@ vid_speed_change_1512(void *priv) } const device_config_t vid_1512_config[] = { - // clang-format off + // clang-format off { - .name = "display_type", - .description = "Display type", - .type = CONFIG_SELECTION, - .default_string = "", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .selection = { + .name = "display_type", + .description = "Display type", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { .description = "PC-CM (Colour)", .value = 0 }, { .description = "PC-MM (Monochrome)", .value = 3 }, { .description = "" } - } + }, + .bios = { { 0 } } }, { .name = "double_type", @@ -747,29 +743,30 @@ const device_config_t vid_1512_config[] = { .bios = { { 0 } } }, { - .name = "codepage", - .description = "Hardware font", - .type = CONFIG_SELECTION, - .default_string = "", - .default_int = 3, - .file_filter = "", - .spinner = { 0 }, - .selection = { + .name = "codepage", + .description = "Hardware font", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 3, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { .description = "US English", .value = 3 }, { .description = "Danish", .value = 1 }, { .description = "Greek", .value = 0 }, { .description = "" } - } + }, + .bios = { { 0 } } }, { - .name = "language", - .description = "BIOS language", - .type = CONFIG_SELECTION, - .default_string = "", - .default_int = 7, - .file_filter = "", - .spinner = { 0 }, - .selection = { + .name = "language", + .description = "BIOS language", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 7, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { .description = "English", .value = 7 }, { .description = "German", .value = 6 }, { .description = "French", .value = 5 }, @@ -779,10 +776,11 @@ const device_config_t vid_1512_config[] = { { .description = "Italian", .value = 1 }, { .description = "Diagnostic mode", .value = 0 }, { .description = "" } - } + }, + .bios = { { 0 } } }, { .name = "", .description = "", .type = CONFIG_END } - // clang-format on + // clang-format on }; const device_t vid_1512_device = { @@ -917,7 +915,7 @@ vid_init_1640(amstrad_t *ams) cga_palette = 0; cgapal_rebuild(); - vid->double_type = device_get_config_int("double_type"); + vid->double_type = device_get_config_int("double_type"); vid->cga.double_type = device_get_config_int("double_type"); cga_interpolate_init(); @@ -943,7 +941,7 @@ vid_speed_changed_1640(void *priv) } const device_config_t vid_1640_config[] = { - // clang-format off + // clang-format off { .name = "double_type", .description = "Line doubling type", @@ -962,14 +960,14 @@ const device_config_t vid_1640_config[] = { .bios = { { 0 } } }, { - .name = "language", - .description = "BIOS language", - .type = CONFIG_SELECTION, - .default_string = "", - .default_int = 7, - .file_filter = "", - .spinner = { 0 }, - .selection = { + .name = "language", + .description = "BIOS language", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 7, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { .description = "English", .value = 7 }, { .description = "German", .value = 6 }, { .description = "French", .value = 5 }, @@ -979,10 +977,11 @@ const device_config_t vid_1640_config[] = { { .description = "Italian", .value = 1 }, { .description = "Diagnostic mode", .value = 0 }, { .description = "" } - } + }, + .bios = { { 0 } } }, { .name = "", .description = "", .type = CONFIG_END } - // clang-format on + // clang-format on }; const device_t vid_1640_device = { @@ -1359,8 +1358,8 @@ lcd_draw_char_40(amsvid_t *vid, uint32_t *buffer, uint8_t chr, static void lcdm_poll(amsvid_t *vid) { - mda_t *mda = &vid->mda; - uint16_t cursoraddr = (mda->crtc[MDA_CRTC_CURSOR_ADDR_LOW] | (mda->crtc[MDA_CRTC_CURSOR_ADDR_HIGH] << 8)) & 0x3fff; + mda_t *mda = &vid->mda; + uint16_t cursoraddr = (mda->crtc[MDA_CRTC_CURSOR_ADDR_LOW] | (mda->crtc[MDA_CRTC_CURSOR_ADDR_HIGH] << 8)) & 0x3fff; int drawcursor; int x; int oldvc; @@ -1373,7 +1372,7 @@ lcdm_poll(amsvid_t *vid) timer_advance_u64(&vid->timer, mda->dispofftime); mda->status |= 1; mda->linepos = 1; - scanline_old = mda->scanline; + scanline_old = mda->scanline; if ((mda->crtc[MDA_CRTC_INTERLACE] & 3) == 3) mda->scanline = (mda->scanline << 1) & 7; if (mda->dispon) { @@ -1381,9 +1380,9 @@ lcdm_poll(amsvid_t *vid) mda->firstline = mda->displine; mda->lastline = mda->displine; for (x = 0; x < mda->crtc[MDA_CRTC_HDISP]; x++) { - chr = mda->vram[(mda->memaddr<< 1) & 0xfff]; - attr = mda->vram[((mda->memaddr<< 1) + 1) & 0xfff]; - drawcursor = ((mda->memaddr== cursoraddr) && mda->cursorvisible && mda->cursoron); + chr = mda->vram[(mda->memaddr << 1) & 0xfff]; + attr = mda->vram[((mda->memaddr << 1) + 1) & 0xfff]; + drawcursor = ((mda->memaddr == cursoraddr) && mda->cursorvisible && mda->cursoron); blink = ((mda->blink & 16) && (mda->mode & MDA_MODE_BLINK) && (attr & 0x80) && !drawcursor); lcd_draw_char_80(vid, &(buffer32->line[mda->displine])[x * 8], chr, attr, drawcursor, blink, mda->scanline, 0, mda->mode); @@ -1407,22 +1406,22 @@ lcdm_poll(amsvid_t *vid) mda->status &= ~8; } if (mda->scanline == (mda->crtc[MDA_CRTC_CURSOR_END] & 31) || ((mda->crtc[MDA_CRTC_INTERLACE] & 3) == 3 && mda->scanline == ((mda->crtc[MDA_CRTC_CURSOR_END] & 31) >> 1))) { - mda->cursorvisible = 0; + mda->cursorvisible = 0; } if (mda->vadj) { mda->scanline++; mda->scanline &= 31; - mda->memaddr= mda->memaddr_backup; + mda->memaddr = mda->memaddr_backup; mda->vadj--; if (!mda->vadj) { - mda->dispon = 1; - mda->memaddr= mda->memaddr_backup = (mda->crtc[MDA_CRTC_START_ADDR_LOW] | (mda->crtc[MDA_CRTC_START_ADDR_HIGH] << 8)) & 0x3fff; - mda->scanline = 0; + mda->dispon = 1; + mda->memaddr = mda->memaddr_backup = (mda->crtc[MDA_CRTC_START_ADDR_LOW] | (mda->crtc[MDA_CRTC_START_ADDR_HIGH] << 8)) & 0x3fff; + mda->scanline = 0; } } else if (mda->scanline == mda->crtc[MDA_CRTC_MAX_SCANLINE_ADDR] || ((mda->crtc[MDA_CRTC_INTERLACE] & 3) == 3 && mda->scanline == (mda->crtc[MDA_CRTC_MAX_SCANLINE_ADDR] >> 1))) { mda->memaddr_backup = mda->memaddr; - mda->scanline = 0; - oldvc = mda->vc; + mda->scanline = 0; + oldvc = mda->vc; mda->vc++; mda->vc &= 127; if (mda->vc == mda->crtc[MDA_CRTC_VDISP]) @@ -1433,7 +1432,7 @@ lcdm_poll(amsvid_t *vid) if (!mda->vadj) mda->dispon = 1; if (!mda->vadj) - mda->memaddr= mda->memaddr_backup = (mda->crtc[MDA_CRTC_START_ADDR_LOW] | (mda->crtc[MDA_CRTC_START_ADDR_HIGH] << 8)) & 0x3fff; + mda->memaddr = mda->memaddr_backup = (mda->crtc[MDA_CRTC_START_ADDR_LOW] | (mda->crtc[MDA_CRTC_START_ADDR_HIGH] << 8)) & 0x3fff; if ((mda->crtc[MDA_CRTC_CURSOR_START] & 0x60) == 0x20) mda->cursoron = 0; else @@ -1471,7 +1470,7 @@ lcdm_poll(amsvid_t *vid) } else { mda->scanline++; mda->scanline &= 31; - mda->memaddr= mda->memaddr_backup; + mda->memaddr = mda->memaddr_backup; } if (mda->scanline == (mda->crtc[MDA_CRTC_CURSOR_START] & 31) || ((mda->crtc[MDA_CRTC_INTERLACE] & 3) == 3 && mda->scanline == ((mda->crtc[MDA_CRTC_CURSOR_START] & 31) >> 1))) mda->cursorvisible = 1; @@ -1500,7 +1499,7 @@ lcdc_poll(amsvid_t *vid) timer_advance_u64(&vid->timer, cga->dispofftime); cga->cgastat |= 1; cga->linepos = 1; - scanline_old = cga->scanline; + scanline_old = cga->scanline; if ((cga->crtc[CGA_CRTC_INTERLACE] & 3) == 3) cga->scanline = ((cga->scanline << 1) + cga->oddeven) & 7; if (cga->cgadispon) { @@ -1570,7 +1569,7 @@ lcdc_poll(amsvid_t *vid) cga->cgastat &= ~8; } if (cga->scanline == (cga->crtc[CGA_CRTC_CURSOR_END] & 31) || ((cga->crtc[CGA_CRTC_INTERLACE] & 3) == 3 && cga->scanline == ((cga->crtc[CGA_CRTC_CURSOR_END] & 31) >> 1))) { - cga->cursorvisible = 0; + cga->cursorvisible = 0; } if ((cga->crtc[CGA_CRTC_INTERLACE] & 3) == 3 && cga->scanline == (cga->crtc[CGA_CRTC_MAX_SCANLINE_ADDR] >> 1)) cga->memaddr_backup = cga->memaddr; @@ -1582,12 +1581,12 @@ lcdc_poll(amsvid_t *vid) if (!cga->vadj) { cga->cgadispon = 1; cga->memaddr = cga->memaddr_backup = (cga->crtc[CGA_CRTC_START_ADDR_LOW] | (cga->crtc[CGA_CRTC_START_ADDR_HIGH] << 8)) & 0x3fff; - cga->scanline = 0; + cga->scanline = 0; } } else if (cga->scanline == cga->crtc[CGA_CRTC_MAX_SCANLINE_ADDR]) { cga->memaddr_backup = cga->memaddr; - cga->scanline = 0; - oldvc = cga->vc; + cga->scanline = 0; + oldvc = cga->vc; cga->vc++; cga->vc &= 127; @@ -1830,68 +1829,71 @@ vid_close_200(void *priv) } const device_config_t vid_200_config[] = { - /* TODO: Should have options here for: - * - * > Display port (TTL or RF) - */ - // clang-format off + /* TODO: Should have options here for: + * + * > Display port (TTL or RF) + */ + // clang-format off { - .name = "video_emulation", - .description = "Display type", - .type = CONFIG_SELECTION, - .default_string = "", - .default_int = PC200_CGA, - .file_filter = "", - .spinner = { 0 }, - .selection = { + .name = "video_emulation", + .description = "Display type", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = PC200_CGA, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { .description = "CGA monitor", .value = PC200_CGA }, { .description = "MDA monitor", .value = PC200_MDA }, { .description = "Television", .value = PC200_TV }, { .description = "" } - } + }, + .bios = { { 0 } } }, { - .name = "display_type", - .description = "Monitor type", - .type = CONFIG_SELECTION, - .default_string = "", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .selection = { + .name = "display_type", + .description = "Monitor type", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { .description = "RGB", .value = 0 }, { .description = "RGB (no brown)", .value = 4 }, { .description = "Green Monochrome", .value = 1 }, { .description = "Amber Monochrome", .value = 2 }, { .description = "White Monochrome", .value = 3 }, { .description = "" } - } + }, + .bios = { { 0 } } }, { - .name = "codepage", - .description = "Hardware font", - .type = CONFIG_SELECTION, - .default_string = "", - .default_int = 3, - .file_filter = "", - .spinner = { 0 }, - .selection = { + .name = "codepage", + .description = "Hardware font", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 3, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { .description = "US English", .value = 3 }, { .description = "Portugese", .value = 2 }, { .description = "Norwegian", .value = 1 }, { .description = "Greek", .value = 0 }, { .description = "" } - } + }, + .bios = { { 0 } } }, { - .name = "language", - .description = "BIOS language", - .type = CONFIG_SELECTION, - .default_string = "", - .default_int = 7, - .file_filter = "", - .spinner = { 0 }, - .selection = { + .name = "language", + .description = "BIOS language", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 7, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { .description = "English", .value = 7 }, { .description = "German", .value = 6 }, { .description = "French", .value = 5 }, @@ -1901,10 +1903,11 @@ const device_config_t vid_200_config[] = { { .description = "Italian", .value = 1 }, { .description = "Diagnostic mode", .value = 0 }, { .description = "" } - } + }, + .bios = { { 0 } } }, { .name = "", .description = "", .type = CONFIG_END } - // clang-format on + // clang-format on }; const device_t vid_200_device = { @@ -1922,36 +1925,37 @@ const device_t vid_200_device = { }; const device_config_t vid_ppc512_config[] = { - /* TODO: Should have options here for: - * - * > Display port (TTL or RF) - */ - // clang-format off + /* TODO: Should have options here for: + * + * > Display port (TTL or RF) + */ + // clang-format off { - .name = "video_emulation", - .description = "Display type", - .type = CONFIG_SELECTION, - .default_string = "", - .default_int = PC200_LCDC, - .file_filter = "", - .spinner = { 0 }, - .selection = { + .name = "video_emulation", + .description = "Display type", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = PC200_LCDC, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { .description = "CGA monitor", .value = PC200_CGA }, { .description = "MDA monitor", .value = PC200_MDA }, { .description = "LCD (CGA mode)", .value = PC200_LCDC }, { .description = "LCD (MDA mode)", .value = PC200_LCDM }, { .description = "" } }, + .bios = { { 0 } } }, { - .name = "display_type", - .description = "Monitor type", - .type = CONFIG_SELECTION, - .default_string = "", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .selection = { + .name = "display_type", + .description = "Monitor type", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { .description = "RGB", .value = 0 }, { .description = "RGB (no brown)", .value = 4 }, { .description = "Green Monochrome", .value = 1 }, @@ -1959,32 +1963,34 @@ const device_config_t vid_ppc512_config[] = { { .description = "White Monochrome", .value = 3 }, { .description = "" } }, + .bios = { { 0 } } }, { - .name = "codepage", - .description = "Hardware font", - .type = CONFIG_SELECTION, - .default_string = "", - .default_int = 3, - .file_filter = "", - .spinner = { 0 }, - .selection = { + .name = "codepage", + .description = "Hardware font", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 3, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { .description = "US English", .value = 3 }, { .description = "Portugese", .value = 2 }, { .description = "Norwegian", .value = 1 }, { .description = "Greek", .value = 0 }, { .description = "" } }, + .bios = { { 0 } } }, { - .name = "language", - .description = "BIOS language", - .type = CONFIG_SELECTION, - .default_string = "", - .default_int = 7, - .file_filter = "", - .spinner = { 0 }, - .selection = { + .name = "language", + .description = "BIOS language", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 7, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { .description = "English", .value = 7 }, { .description = "German", .value = 6 }, { .description = "French", .value = 5 }, @@ -1994,17 +2000,22 @@ const device_config_t vid_ppc512_config[] = { { .description = "Italian", .value = 1 }, { .description = "Diagnostic mode", .value = 0 }, { .description = "" } - } + }, + .bios = { { 0 } } }, { - .name = "invert", - .description = "Invert LCD colors", - .type = CONFIG_BINARY, - .default_string = "", - .default_int = 0 + .name = "invert", + .description = "Invert LCD colors", + .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 + // clang-format on }; const device_t vid_ppc512_device = { @@ -2022,23 +2033,24 @@ const device_t vid_ppc512_device = { }; const device_config_t vid_pc2086_config[] = { - // clang-format off + // clang-format off { - .name = "language", - .description = "BIOS language", - .type = CONFIG_SELECTION, - .default_string = "", - .default_int = 7, - .file_filter = "", - .spinner = { 0 }, - .selection = { + .name = "language", + .description = "BIOS language", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 7, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { .description = "English", .value = 7 }, { .description = "Diagnostic mode", .value = 0 }, { .description = "" } - } + }, + .bios = { { 0 } } }, { .name = "", .description = "", .type = CONFIG_END } - // clang-format on + // clang-format on }; const device_t vid_pc2086_device = { @@ -2056,23 +2068,24 @@ const device_t vid_pc2086_device = { }; const device_config_t vid_pc3086_config[] = { - // clang-format off + // clang-format off { - .name = "language", - .description = "BIOS language", - .type = CONFIG_SELECTION, - .default_string = "", - .default_int = 7, - .file_filter = "", - .spinner = { 0 }, - .selection = { + .name = "language", + .description = "BIOS language", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = 7, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { .description = "English", .value = 7 }, { .description = "Diagnostic mode", .value = 3 }, { .description = "" } - } + }, + .bios = { { 0 } } }, { .name = "", .description = "", .type = CONFIG_END } - // clang-format on + // clang-format on }; const device_t vid_pc3086_device = { @@ -2121,7 +2134,7 @@ static int ms_poll(void *priv) { amstrad_t *ams = (amstrad_t *) priv; - int b = mouse_get_buttons_ex(); + int b = mouse_get_buttons_ex(); if ((b & 1) && !(ams->oldb & 1)) keyboard_send(0x7e); @@ -2433,7 +2446,7 @@ ams_read(uint16_t port, void *priv) } static const scancode scancode_pc200[512] = { - // clang-format off + // clang-format off { .mk = { 0 }, .brk = { 0 } }, /* 000 */ { .mk = { 0x01, 0 }, .brk = { 0x81, 0 } }, /* 001 */ { .mk = { 0x02, 0 }, .brk = { 0x82, 0 } }, /* 002 */ @@ -2946,7 +2959,7 @@ static const scancode scancode_pc200[512] = { { .mk = { 0 }, .brk = { 0 } }, /* 1fd */ { .mk = {0xe0, 0xfe, 0 }, .brk = { 0 } }, /* 1fe */ { .mk = {0xe0, 0xff, 0 }, .brk = { 0 } } /* 1ff */ - // clang-format on + // clang-format on }; static void @@ -2954,7 +2967,7 @@ machine_amstrad_init(const machine_t *model, int type) { amstrad_t *ams; - ams = (amstrad_t *) calloc(1, sizeof(amstrad_t)); + ams = (amstrad_t *) calloc(1, sizeof(amstrad_t)); ams->type = type; amstrad_latch = 0x80000000; diff --git a/src/machine/m_at_286.c b/src/machine/m_at_286.c index b8e1f746a..7f6442940 100644 --- a/src/machine/m_at_286.c +++ b/src/machine/m_at_286.c @@ -54,8 +54,9 @@ static const device_config_t ibmat_config[] = { .type = CONFIG_BIOS, .default_string = "ibm5170_111585", .default_int = 0, - .file_filter = "", + .file_filter = NULL, .spinner = { 0 }, + .selection = { { 0 } }, .bios = { { .name = "62X082x (11/15/85)", @@ -108,10 +109,15 @@ static const device_config_t ibmat_config[] = { }, }, { - .name = "enable_5161", - .description = "IBM 5161 Expansion Unit", - .type = CONFIG_BINARY, - .default_int = 0 + .name = "enable_5161", + .description = "IBM 5161 Expansion Unit", + .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 @@ -156,10 +162,10 @@ machine_at_ibmat_init(const machine_t *model) 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); + 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) @@ -176,10 +182,15 @@ machine_at_ibmat_init(const machine_t *model) 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 = "enable_5161", + .description = "IBM 5161 Expansion Unit", + .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 @@ -206,7 +217,7 @@ machine_at_ibmxt286_init(const machine_t *model) uint8_t enable_5161; device_context(model->device); - enable_5161 = machine_get_config_int("enable_5161"); + 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", @@ -279,8 +290,7 @@ machine_at_portableiii_init(const machine_t *model) int ret; ret = bios_load_linearr("roms/machines/portableiii/K Combined.bin", - 0x000f8000, 65536, 0); - + 0x000f8000, 65536, 0); if (bios_only || !ret) return ret; @@ -292,7 +302,7 @@ machine_at_portableiii_init(const machine_t *model) if (hdc_current[0] == HDC_INTERNAL) device_add(&ide_isa_device); - + if (gfxcard[0] == VID_INTERNAL) device_add(&compaq_plasma_device); @@ -318,8 +328,8 @@ machine_at_grid1520_init(const machine_t *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); + // for now just select CGA with amber monitor + // device_add(&cga_device); if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); @@ -992,12 +1002,12 @@ machine_at_drsm35286_init(const machine_t *model) 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)); @@ -1018,7 +1028,7 @@ machine_at_deskmaster286_init(const machine_t *model) machine_at_scat_init(model, 0, 1); device_add(&f82c710_device); - + device_add(&ide_isa_device); return ret; diff --git a/src/machine/m_at_386dx.c b/src/machine/m_at_386dx.c index 7fb045d58..5816204ed 100644 --- a/src/machine/m_at_386dx.c +++ b/src/machine/m_at_386dx.c @@ -60,18 +60,33 @@ machine_compaq_p1_handler(void) static const device_config_t deskpro386_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "deskpro386", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "September 1986", .internal_name = "deskpro386_09_1986", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/deskpro386/1986-09-04-HI.json.bin", "" } }, - { .name = "May 1988", .internal_name = "deskpro386", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/deskpro386/1988-05-10.json.bin", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "September 1986", + .internal_name = "deskpro386_09_1986", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 65536, + .files = { "roms/machines/deskpro386/1986-09-04-HI.json.bin", "" } + }, + { + .name = "May 1988", + .internal_name = "deskpro386", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 65536, + .files = { "roms/machines/deskpro386/1988-05-10.json.bin", "" } + }, { .files_no = 0 } }, }, @@ -96,15 +111,15 @@ const device_t deskpro386_device = { int machine_at_deskpro386_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); ret = bios_load_linearr(fn, 0x000f8000, 65536, 0); if (fdc_current[0] == FDC_INTERNAL) @@ -127,7 +142,7 @@ machine_at_portableiii386_init(const machine_t *model) int ret; ret = bios_load_linearr("roms/machines/portableiii/P.2 Combined.bin", - 0x000f0000, 131072, 0); + 0x000f0000, 131072, 0); if (bios_only || !ret) return ret; diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index 2942180bb..9ac53805a 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -103,18 +103,33 @@ machine_at_c747_init(const machine_t *model) static const device_config_t opti495_ami_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "ami495", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "AMI 060692", .internal_name = "ami495", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/ami495/opt495sx.ami", "" } }, - { .name = "MR BIOS V1.60", .internal_name = "mr495", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/ami495/opt495sx.mr", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "AMI 060692", + .internal_name = "ami495", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 65536, + .files = { "roms/machines/ami495/opt495sx.ami", "" } + }, + { + .name = "MR BIOS V1.60", + .internal_name = "mr495", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 65536, + .files = { "roms/machines/ami495/opt495sx.mr", "" } + }, { .files_no = 0 } }, }, @@ -139,15 +154,15 @@ const device_t opti495_ami_device = { int machine_at_opti495_ami_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); ret = bios_load_linear(fn, 0x000f0000, 65536, 0); machine_at_common_init(model); diff --git a/src/machine/m_at_386sx.c b/src/machine/m_at_386sx.c index 0dc9142db..ae9870c77 100644 --- a/src/machine/m_at_386sx.c +++ b/src/machine/m_at_386sx.c @@ -98,20 +98,35 @@ machine_at_quadt386sx_init(const machine_t *model) static const device_config_t pbl300sx_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "pbl300sx", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "Phoenix ROM BIOS PLUS 1.10 - Revision 19910723091302", .internal_name = "pbl300sx_1991", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pbl300sx/V1.10_1113_910723.bin", "" } }, - { .name = "Phoenix ROM BIOS PLUS 1.10 - Revision 19920910", .internal_name = "pbl300sx", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pbl300sx/pb_l300sx_1992.bin", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Phoenix ROM BIOS PLUS 1.10 - Revision 19910723091302", + .internal_name = "pbl300sx_1991", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/pbl300sx/V1.10_1113_910723.bin", "" } + }, + { + .name = "Phoenix ROM BIOS PLUS 1.10 - Revision 19920910", + .internal_name = "pbl300sx", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/pbl300sx/pb_l300sx_1992.bin", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -134,15 +149,15 @@ const device_t pbl300sx_device = { int machine_at_pbl300sx_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + 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(); @@ -234,20 +249,35 @@ machine_at_flytech386_init(const machine_t *model) static const device_config_t c325ax_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "325ax", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, .bios = { - { .name = "AMIBIOS 070791", .internal_name = "325ax", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/325ax/M27C512.BIN", "" } }, - { .name = "MR BIOS V1.41", .internal_name = "mr1217", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/325ax/mrbios.BIN", "" } }, + { + .name = "AMIBIOS 070791", + .internal_name = "325ax", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 65536, + .files = { "roms/machines/325ax/M27C512.BIN", "" } + }, + { + .name = "MR BIOS V1.41", + .internal_name = "mr1217", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 65536, + .files = { "roms/machines/325ax/mrbios.BIN", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -270,15 +300,15 @@ const device_t c325ax_device = { int machine_at_325ax_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); ret = bios_load_linear(fn, 0x000f0000, 65536, 0); machine_at_common_init(model); @@ -309,9 +339,9 @@ machine_at_acer100t_init(const machine_t *model) if (gfxcard[0] == VID_INTERNAL) device_add(&oti077_acer100t_device); - + device_add_params(&pc87310_device, (void *) (PC87310_ALI)); - + return ret; } @@ -575,20 +605,34 @@ machine_at_dataexpert386sx_init(const machine_t *model) static const device_config_t dells333sl_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "dells333sl", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "Phoenix ROM BIOS PLUS 1.10 - Revision J01 (Jostens Learning Corporation OEM)", .internal_name = "dells333sl_j01", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/dells333sl/DELL386.BIN", "" } }, - { .name = "Phoenix ROM BIOS PLUS 1.10 - Revision A02", .internal_name = "dells333sl", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/dells333sl/Dell_386SX_30807_UBIOS_B400_VLSI_VL82C311_Cirrus_Logic_GD5420.bin", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .bios = { + { + .name = "Phoenix ROM BIOS PLUS 1.10 - Revision J01 (Jostens Learning Corporation OEM)", + .internal_name = "dells333sl_j01", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/dells333sl/DELL386.BIN", "" } + }, + { + .name = "Phoenix ROM BIOS PLUS 1.10 - Revision A02", + .internal_name = "dells333sl", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/dells333sl/Dell_386SX_30807_UBIOS_B400_VLSI_VL82C311_Cirrus_Logic_GD5420.bin", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -611,15 +655,15 @@ const device_t dells333sl_device = { int machine_at_dells333sl_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); ret = bios_load_linear(fn, 0x000e0000, 262144, 0); memcpy(rom, &(rom[0x00020000]), 131072); mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000); diff --git a/src/machine/m_at_486_misc.c b/src/machine/m_at_486_misc.c index 9eb8f8d4c..6c492ada5 100644 --- a/src/machine/m_at_486_misc.c +++ b/src/machine/m_at_486_misc.c @@ -66,6 +66,7 @@ machine_at_itoxstar_init(const machine_t *model) 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); @@ -97,6 +98,7 @@ machine_at_arb1423c_init(const machine_t *model) 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); @@ -123,6 +125,7 @@ machine_at_arb1479_init(const machine_t *model) 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); @@ -146,6 +149,7 @@ machine_at_iach488_init(const machine_t *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_params(&w83977_device, (void *) (W83977F | W83977_AMI)); device_add(&stpc_consumer2_device); device_add(&sst_flash_29ee020_device); @@ -173,6 +177,7 @@ machine_at_pcm9340_init(const machine_t *model) 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); @@ -201,6 +206,7 @@ machine_at_pcm5330_init(const machine_t *model) 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); diff --git a/src/machine/m_at_common.c b/src/machine/m_at_common.c index 9526c7749..383c8dba5 100644 --- a/src/machine/m_at_common.c +++ b/src/machine/m_at_common.c @@ -7,7 +7,7 @@ * This file is part of the 86Box distribution. * * Implementation of the common initialization functions for - * the PC/AT and copatible machines. + * the PC/AT and copatible machines. * * Authors: Miran Grca, * Sarah Walker, @@ -135,5 +135,3 @@ machine_at_ps2_ide_init(const machine_t *model) device_add(&ide_isa_device); } - - diff --git a/src/machine/m_at_misc.c b/src/machine/m_at_misc.c index 268cf7f7d..eb93688a7 100644 --- a/src/machine/m_at_misc.c +++ b/src/machine/m_at_misc.c @@ -53,15 +53,16 @@ machine_at_vpc2007_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, 4); - pci_register_slot(0x08, 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, 1, 2, 3, 4); - pci_register_slot(0x0B, 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, 1, 2, 3, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x08, 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, 1, 2, 3, 4); + pci_register_slot(0x0B, 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, 1, 2, 3, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); device_add(&i440bx_no_agp_device); + device_add(&piix4e_device); device_add_params(&w83977_device, (void *) (W83977F | W83977_370 | W83977_AMI | W83977_NO_NVR)); device_add(&intel_flash_bxt_device); diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index 4c25799f6..c9fd9b6fb 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -53,15 +53,16 @@ machine_at_m729_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(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + 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); + 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); @@ -92,6 +93,7 @@ machine_at_acerv62x_init(const machine_t *model) 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(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + device_add(&i440fx_device); device_add(&piix3_device); device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_APM)); @@ -138,6 +140,7 @@ machine_at_kn97_init(const machine_t *model) 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(&i440fx_device); device_add(&piix3_device); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -151,17 +154,71 @@ machine_at_kn97_init(const machine_t *model) } /* i440LX */ +static const device_config_t lx6_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "lx6", + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Award Modular BIOS v4.51PG - Revision LY", + .internal_name = "lx6", .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/lx6/LX6C_LY.BIN", "" } + }, + { + .name = "Award Modular BIOS v4.51PG - Revision PZ Beta", + .internal_name = "lx6_beta", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/lx6/LX6C_PZ.B00", "" } + }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t lx6_device = { + .name = "ABIT AB-LX6", + .internal_name = "lx6_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = lx6_config +}; + int machine_at_lx6_init(const machine_t *model) { - int ret; + int ret = 0; + const char *fn; - ret = bios_load_linear("roms/machines/lx6/LX6C_PZ.B00", - 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); pci_init(PCI_CONFIG_TYPE_1); @@ -172,6 +229,7 @@ machine_at_lx6_init(const machine_t *model) pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440lx_device); device_add(&piix4e_device); device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); @@ -237,6 +295,7 @@ machine_at_spitfire_init(const machine_t *model) pci_register_slot(0x10, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); 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 *) (FDC37XXX5 | FDC37C93X_NORMAL | FDC37C93X_NO_NVR)); @@ -272,6 +331,7 @@ machine_at_ma30d_init(const machine_t *model) 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(0x01, PCI_CARD_AGPBRIDGE, 3, 0, 0, 0); + device_add(&i440lx_device); device_add(&piix4e_device); device_add(&nec_mate_unk_device); @@ -299,9 +359,10 @@ machine_at_p6i440e2_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(0x01, PCI_CARD_AGPBRIDGE, 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(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&i440ex_device); device_add(&piix4_device); device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); @@ -339,6 +400,7 @@ machine_at_bf6_init(const machine_t *model) pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 3, 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)); @@ -351,20 +413,35 @@ machine_at_bf6_init(const machine_t *model) static const device_config_t bx6_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "bx6", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "Award Modular BIOS v4.51PG - Revision EG", .internal_name = "bx6_eg", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/bx6/BX6_EG.BIN", "" } }, - { .name = "Award Modular BIOS v4.51PG - Revision QS", .internal_name = "bx6", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/bx6/BX6_QS.bin", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Award Modular BIOS v4.51PG - Revision EG", + .internal_name = "bx6_eg", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/bx6/BX6_EG.BIN", "" } + }, + { + .name = "Award Modular BIOS v4.51PG - Revision QS", + .internal_name = "bx6", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/bx6/BX6_QS.bin", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -387,15 +464,15 @@ const device_t bx6_device = { int machine_at_bx6_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + 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(); @@ -409,6 +486,7 @@ machine_at_bx6_init(const machine_t *model) pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x0F, 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 *) (W83977TF | W83977_AMI | W83977_NO_NVR)); @@ -441,6 +519,7 @@ machine_at_p2bls_init(const machine_t *model) 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)); @@ -479,6 +558,7 @@ machine_at_p3bf_init(const machine_t *model) 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)); @@ -513,6 +593,7 @@ machine_at_ax6bc_init(const machine_t *model) 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(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)); @@ -523,17 +604,72 @@ machine_at_ax6bc_init(const machine_t *model) return ret; } +static const device_config_t ga686_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "686bx", + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Award Modular BIOS v4.51PG - Revision 5/11/1998 (Amptron PII-3100)", + .internal_name = "pii3100", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 262144, + .files = { "roms/machines/686bx/31nologo.bin", "" } + }, + { + .name = "Award Modular BIOS v4.51PG - Revision F2a", + .internal_name = "686bx", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 262144, + .files = { "roms/machines/686bx/6BX.F2a", "" } + }, + { .files_no = 0 } + } + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t ga686_device = { + .name = "Gigabyte GA-686BX", + .internal_name = "ga686_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ga686_config +}; + int -machine_at_686bx_init(const machine_t *model) +machine_at_ga686_init(const machine_t *model) { - int ret; + int ret = 0; + const char *fn; - ret = bios_load_linear("roms/machines/686bx/6BX.F2a", - 0x000c0000, 262144, 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, 0x000c0000, 262144, 0); + device_context_restore(); + machine_at_common_init_ex(model, 2); pci_init(PCI_CONFIG_TYPE_1); @@ -544,6 +680,7 @@ machine_at_686bx_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(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)); @@ -562,24 +699,53 @@ machine_at_686bx_init(const machine_t *model) static const device_config_t ms6119_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "ms6119", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "AMIBIOS 6 (071595) - Revision 1.90 (Packard Bell Tacoma)", .internal_name = "tacoma", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 262144, .files = { "roms/machines/ms6119/A19P2190.ROM", "" } }, - { .name = "Award Modular BIOS v4.51PG - Revision 2.10", .internal_name = "ms6119", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 262144, .files = { "roms/machines/ms6119/w6119ims.2a0", "" } }, - { .name = "Award Modular BIOS v4.51PG - Revision 2.12 (Viglen Vig69M)", .internal_name = "vig69m", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 262144, .files = { "roms/machines/ms6119/vig69m.212", "" } }, - { .name = "Award Modular BIOS v4.51PG - Revision 3.30b1 (LG IBM Multinet i x7G)", .internal_name = "lgibmx7g", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 262144, .files = { "roms/machines/ms6119/ms6119.331", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "AMIBIOS 6 (071595) - Revision 1.90 (Packard Bell Tacoma)", + .internal_name = "tacoma", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 262144, + .files = { "roms/machines/ms6119/A19P2190.ROM", "" } + }, + { + .name = "Award Modular BIOS v4.51PG - Revision 2.10", + .internal_name = "ms6119", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 262144, + .files = { "roms/machines/ms6119/w6119ims.2a0", "" } + }, + { + .name = "Award Modular BIOS v4.51PG - Revision 2.12 (Viglen Vig69M)", + .internal_name = "vig69m", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 262144, + .files = { "roms/machines/ms6119/vig69m.212", "" } + }, + { + .name = "Award Modular BIOS v4.51PG - Revision 3.30b1 (LG IBM Multinet i x7G)", + .internal_name = "lgibmx7g", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 262144, + .files = { "roms/machines/ms6119/ms6119.331", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -602,15 +768,15 @@ const device_t ms6119_device = { int machine_at_ms6119_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); ret = bios_load_linear(fn, 0x000c0000, 262144, 0); device_context_restore(); @@ -624,12 +790,13 @@ machine_at_ms6119_init(const machine_t *model) 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; } @@ -656,6 +823,7 @@ machine_at_p6sba_init(const machine_t *model) pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 0, 0); pci_register_slot(0x0D, PCI_CARD_NORMAL, 3, 0, 0, 0); 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)); @@ -693,6 +861,7 @@ machine_at_s1846_init(const machine_t *model) 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(&pc87309_device, (void *) (PCX730X_AMI | PC87309_PC87309)); @@ -728,6 +897,7 @@ machine_at_vei8_init(const machine_t *model) 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)); @@ -752,6 +922,7 @@ machine_at_ms6168_common_init(const machine_t *model) 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); @@ -822,6 +993,7 @@ machine_at_atc6310bxii_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(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)); @@ -853,6 +1025,7 @@ machine_at_ficka6130_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(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&via_apro_device); device_add(&via_vt82c596a_device); device_add_params(&w83877_device, (void *) (W83877TF | W83877_3F0)); @@ -886,6 +1059,7 @@ machine_at_p3v133_init(const machine_t *model) 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(&via_apro133_device); device_add(&via_vt82c596b_device); device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); @@ -923,6 +1097,7 @@ machine_at_p3v4x_init(const machine_t *model) 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(&via_apro133a_device); device_add(&via_vt82c596b_device); device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); @@ -955,6 +1130,7 @@ machine_at_gt694va_init(const machine_t *model) pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x13, 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_vt82c596b_device); device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); @@ -998,6 +1174,7 @@ machine_at_p6f99_init(const machine_t *model) pci_register_slot(0x0D, PCI_CARD_NORMAL, 3, 4, 1, 2); 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(&it8661f_device); device_add(&winbond_flash_w29c020_device); @@ -1030,6 +1207,7 @@ machine_at_m747_init(const machine_t *model) pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); 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(&it8661f_device); device_add(&winbond_flash_w29c020_device); diff --git a/src/machine/m_at_slot1_socket370.c b/src/machine/m_at_slot1_socket370.c index c52885965..cf689fd08 100644 --- a/src/machine/m_at_slot1_socket370.c +++ b/src/machine/m_at_slot1_socket370.c @@ -55,12 +55,13 @@ 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); + 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)); @@ -101,6 +102,7 @@ machine_at_s1857_init(const machine_t *model) 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)); @@ -132,12 +134,13 @@ machine_at_p6bat_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); + 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)); diff --git a/src/machine/m_at_socket1.c b/src/machine/m_at_socket1.c index ab0fadb1a..7d16e1381 100644 --- a/src/machine/m_at_socket1.c +++ b/src/machine/m_at_socket1.c @@ -341,7 +341,7 @@ machine_at_d824_init(const machine_t *model) device_add(&ide_isa_device); device_add_params(&fdc37c6xx_device, (void *) FDC37C651); - + return ret; } @@ -364,14 +364,14 @@ machine_at_pcs44c_init(const machine_t *model) if (gfxcard[0] == VID_INTERNAL) device_add(&oti077_pcs44c_device); - + device_add(&vl82c113_device); device_add(&ide_isa_device); device_add_params(&pc873xx_device, (void *) (PCX73XX_IDE_PRI | PCX730X_398)); device_add(&intel_flash_bxt_device); - + return ret; } @@ -401,8 +401,9 @@ machine_at_tuliptc38_init(const machine_t *model) 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); + } 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); diff --git a/src/machine/m_at_socket2.c b/src/machine/m_at_socket2.c index 6c24070ba..b7cf93d92 100644 --- a/src/machine/m_at_socket2.c +++ b/src/machine/m_at_socket2.c @@ -228,16 +228,16 @@ machine_at_cobalt_init(const machine_t *model) 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)); @@ -374,6 +374,6 @@ machine_at_martin_init(const machine_t *model) 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 index 8d460186c..b98d27627 100644 --- a/src/machine/m_at_socket3.c +++ b/src/machine/m_at_socket3.c @@ -170,22 +170,44 @@ machine_at_greenb_init(const machine_t *model) static const device_config_t j403tg_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "403tg", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "AMI WinBIOS (121593)", .internal_name = "403tg", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/403tg/J403TGRevD.BIN", "" } }, - { .name = "Award Modular BIOS v4.50G", .internal_name = "403tg_award", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/403tg/403TG.BIN", "" } }, - { .name = "MR BIOS V2.02", .internal_name = "403tg_mr", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/403tg/MRBiosOPT895.bin", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "AMI WinBIOS (121593)", + .internal_name = "403tg", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 65536, + .files = { "roms/machines/403tg/J403TGRevD.BIN", "" } + }, + { + .name = "Award Modular BIOS v4.50G", + .internal_name = "403tg_award", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 65536, + .files = { "roms/machines/403tg/403TG.BIN", "" } + }, + { + .name = "MR BIOS V2.02", + .internal_name = "403tg_mr", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 65536, + .files = { "roms/machines/403tg/MRBiosOPT895.bin", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -208,17 +230,17 @@ const device_t j403tg_device = { int machine_at_403tg_init(const machine_t *model) { - int ret = 0; - const char* fn; + int ret = 0; + const char *fn; /* No ROMs available */ if (!device_available(model->device)) return ret; device_context(model->device); - int nvr_hack = !strcmp(device_get_config_bios("bios"), "403tg_d"); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); - ret = bios_load_linear(fn, 0x000f0000, 65536, 0); + int nvr_hack = !strcmp(device_get_config_bios("bios"), "403tg"); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000f0000, 65536, 0); if (nvr_hack) { machine_at_common_init_ex(model, 2); diff --git a/src/machine/m_at_socket370.c b/src/machine/m_at_socket370.c index 1094e59f5..f902a7fa9 100644 --- a/src/machine/m_at_socket370.c +++ b/src/machine/m_at_socket370.c @@ -60,6 +60,7 @@ machine_at_s370slm_init(const machine_t *model) 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(&i440lx_device); device_add(&piix4e_device); device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR)); @@ -95,6 +96,7 @@ machine_at_awo671r_init(const machine_t *model) 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_params(&w83977_device, 1, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR)); @@ -129,6 +131,7 @@ machine_at_ambx133_init(const machine_t *model) 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)); @@ -166,6 +169,7 @@ machine_at_cubx_init(const machine_t *model) 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)); @@ -201,6 +205,7 @@ machine_at_63a1_init(const machine_t *model) 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)); @@ -233,6 +238,7 @@ machine_at_atc7020bxii_init(const machine_t *model) 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(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)); @@ -264,6 +270,7 @@ machine_at_m773_init(const machine_t *model) pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); 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(&slc90e66_device); device_add(&it8671f_device); @@ -303,6 +310,7 @@ machine_at_apas3_init(const machine_t *model) 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(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&via_apro_device); device_add(&via_vt82c586b_device); device_add_params(&fdc37c669_device, (void *) 0); @@ -335,6 +343,7 @@ machine_at_p6bap_init(const machine_t *model) 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)); @@ -370,6 +379,7 @@ machine_at_6via90ap_init(const machine_t *model) 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)); @@ -410,6 +420,7 @@ machine_at_cuv4xls_init(const machine_t *model) pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 0, 0, 0); pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&via_apro133a_device); device_add(&via_vt82c686b_device); device_add(ics9xxx_get(ICS9250_18)); @@ -444,6 +455,7 @@ machine_at_7sbb_init(const machine_t *model) pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); 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(&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 index c122caa2d..a8b0f8eea 100644 --- a/src/machine/m_at_socket3_pci.c +++ b/src/machine/m_at_socket3_pci.c @@ -68,12 +68,11 @@ machine_at_ms4134_init(const machine_t *model) 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); + 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); @@ -102,11 +101,10 @@ machine_at_tg486gp_init(const machine_t *model) 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); + 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); @@ -290,20 +288,34 @@ machine_at_ms4145_init(const machine_t *model) static const device_config_t pc330_6573_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Language", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Language", + .type = CONFIG_BIOS, .default_string = "pc330_6573", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "English (PC 330, type 6573)", .internal_name = "pc330_6573", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pc330_6573/$IMAGES.USF", "" } }, - { .name = "Japanese (Aptiva 510/710/Vision)", .internal_name = "aptiva510", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pc330_6573/aptiva510_$IMAGES.USF", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "English (PC 330, type 6573)", + .internal_name = "pc330_6573", .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/pc330_6573/$IMAGES.USF", "" } + }, + { + .name = "Japanese (Aptiva 510/710/Vision)", + .internal_name = "aptiva510", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/pc330_6573/aptiva510_$IMAGES.USF", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -326,15 +338,15 @@ const device_t pc330_6573_device = { int machine_at_pc330_6573_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + 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(); @@ -371,22 +383,44 @@ machine_at_pc330_6573_init(const machine_t *model) static const device_config_t pb450_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .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", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 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 @@ -409,18 +443,18 @@ const device_t pb450_device = { int machine_at_pb450_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + 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; @@ -735,22 +769,44 @@ machine_at_486sp3g_init(const machine_t *model) static const device_config_t sb486pv_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .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", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 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 @@ -773,8 +829,8 @@ const device_t sb486pv_device = { int machine_at_sb486pv_init(const machine_t *model) { - int ret = 0; - const char* fn; + int ret = 0; + const char *fn; /* No ROMs available */ if (!device_available(model->device)) @@ -877,11 +933,12 @@ machine_at_acerp3_init(const machine_t *model) 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(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); + 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); @@ -910,6 +967,7 @@ machine_at_486sp3c_init(const machine_t *model) 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); @@ -937,6 +995,7 @@ machine_at_ls486e_init(const machine_t *model) 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); @@ -963,6 +1022,7 @@ machine_at_m4li_init(const machine_t *model) 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); @@ -989,6 +1049,7 @@ machine_at_ms4144_init(const machine_t *model) 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); @@ -1016,6 +1077,7 @@ machine_at_r418_init(const machine_t *model) 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); @@ -1042,6 +1104,7 @@ machine_at_4saw2_init(const machine_t *model) 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); @@ -1070,6 +1133,7 @@ machine_at_4dps_init(const machine_t *model) 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); @@ -1161,8 +1225,7 @@ machine_at_pl4600c_init(const machine_t *model) 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 */ - + pci_register_slot(0x13, PCI_CARD_VIDEO, 0, 0, 0, 0); /* Onboard */ device_add(&umc_hb4_device); device_add(&umc_8886af_device); @@ -1176,7 +1239,7 @@ machine_at_pl4600c_init(const machine_t *model) if (sound_card_current[0] == SOUND_INTERNAL) device_add(&ess_1688_device); - if (fdc_current[0] == FDC_INTERNAL){ + if (fdc_current[0] == FDC_INTERNAL) { fdd_set_turbo(0, 1); fdd_set_turbo(1, 1); } @@ -1305,7 +1368,7 @@ machine_at_m919_init(const machine_t *model) 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(&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); @@ -1344,20 +1407,35 @@ machine_at_spc7700plw_init(const machine_t *model) static const device_config_t hot433a_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .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 = "Award Modular BIOS 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", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 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 = "Award Modular BIOS 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 @@ -1380,8 +1458,8 @@ const device_t hot433a_device = { int machine_at_hot433a_init(const machine_t *model) { - int ret = 0; - const char* fn; + int ret = 0; + const char *fn; /* No ROMs available */ if (!device_available(model->device)) @@ -1389,8 +1467,8 @@ machine_at_hot433a_init(const machine_t *model) device_context(model->device); int is_award = !strcmp(device_get_config_bios("bios"), "hot433a_v451pg"); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); - ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + 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); diff --git a/src/machine/m_at_socket4.c b/src/machine/m_at_socket4.c index 5e1bf533f..d518ac5dd 100644 --- a/src/machine/m_at_socket4.c +++ b/src/machine/m_at_socket4.c @@ -43,20 +43,35 @@ static const device_config_t v12p_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "v12p", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, /*W1*/ - .bios = { - { .name = "Acer BIOS V1.2 - Revision R1.4", .internal_name = "v12p_r14", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/v12p/v12p_14.bin", "" } }, - { .name = "Acer BIOS V1.2 - Revision R1.6", .internal_name = "v12p", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/v12p/v12p_16.bin", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Acer BIOS V1.2 - Revision R1.4", + .internal_name = "v12p_r14", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/v12p/v12p_14.bin", "" } + }, + { + .name = "Acer BIOS V1.2 - Revision R1.6", + .internal_name = "v12p", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/v12p/v12p_16.bin", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -70,7 +85,7 @@ const device_t v12p_device = { .init = NULL, .close = NULL, .reset = NULL, - .available = NULL, + .available = NULL, .speed_changed = NULL, .force_redraw = NULL, .config = v12p_config @@ -79,18 +94,18 @@ const device_t v12p_device = { int machine_at_v12p_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + 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); @@ -101,6 +116,7 @@ machine_at_v12p_init(const machine_t *model) 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); @@ -130,6 +146,7 @@ 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_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); @@ -160,6 +177,7 @@ machine_at_p5mp3_init(const machine_t *model) pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */ 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_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -192,6 +210,7 @@ machine_at_opti560l_init(const machine_t *model) pci_register_slot(0x07, PCI_CARD_NORMAL, 1, 4, 3, 2); 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_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&sio_zb_device); @@ -264,6 +283,7 @@ 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_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&sio_device); device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); @@ -280,22 +300,44 @@ machine_at_valuepointp60_init(const machine_t *model) static const device_config_t batman_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "batman", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "AMIBIOS 111192 - Revision A08 (Dell Dimension XPS P60)", .internal_name = "dellxp60", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/batman/XP60-A08.ROM", "" } }, - { .name = "Intel AMIBIOS - Revision 1.00.04.AF1P (AMBRA DP60 PCI)", .internal_name = "ambradp60", .bios_type = BIOS_NORMAL, - .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/batman/1004AF1P.BIO", "roms/machines/batman/1004AF1P.BI1", "" } }, - { .name = "Intel AMIBIOS - Revision 1.00.08.AF1", .internal_name = "batman", .bios_type = BIOS_NORMAL, - .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/batman/1008AF1_.BIO", "roms/machines/batman/1008AF1_.BI1", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "AMIBIOS 111192 - Revision A08 (Dell Dimension XPS P60)", + .internal_name = "dellxp60", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/batman/XP60-A08.ROM", "" } + }, + { + .name = "Intel AMIBIOS - Revision 1.00.04.AF1P (AMBRA DP60 PCI)", + .internal_name = "ambradp60", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 131072, + .files = { "roms/machines/batman/1004AF1P.BIO", "roms/machines/batman/1004AF1P.BI1", "" } + }, + { + .name = "Intel AMIBIOS - Revision 1.00.08.AF1", + .internal_name = "batman", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 131072, + .files = { "roms/machines/batman/1008AF1_.BIO", "roms/machines/batman/1008AF1_.BI1", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -318,9 +360,9 @@ const device_t batman_device = { int machine_at_batman_init(const machine_t *model) { - int ret = 0; - const char* fn; - const char* fn2; + int ret = 0; + const char *fn; + const char *fn2; /* No ROMs available */ if (!device_available(model->device)) @@ -328,7 +370,7 @@ machine_at_batman_init(const machine_t *model) device_context(model->device); int is_dell = !strcmp(device_get_config_bios("bios"), "dellxp60"); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); if (is_dell) ret = bios_load_linear_inverted(fn, 0x000e0000, 131072, 0); else { @@ -346,15 +388,16 @@ machine_at_batman_init(const machine_t *model) pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); if (is_dell) { - pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 4, 3, 3); - pci_register_slot(0x05, PCI_CARD_NORMAL, 1, 4, 3, 2); - pci_register_slot(0x06, PCI_CARD_NORMAL, 2, 1, 3, 4); + pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 4, 3, 3); + pci_register_slot(0x05, PCI_CARD_NORMAL, 1, 4, 3, 2); + pci_register_slot(0x06, PCI_CARD_NORMAL, 2, 1, 3, 4); } else { - 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(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_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); @@ -380,6 +423,7 @@ machine_at_premiere_common_init(const machine_t *model, int pci_switch) 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); @@ -412,7 +456,7 @@ machine_at_m5pi_init(const machine_t *model) int ret; ret = bios_load_linear_inverted("roms/machines/m5pi/M5PI10R.BIN", - 0x000e0000, 131072, 0); + 0x000e0000, 131072, 0); if (bios_only || !ret) return ret; @@ -426,10 +470,11 @@ machine_at_m5pi_init(const machine_t *model) 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(&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(&ide_w83769f_pci_single_channel_device); device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); device_add(&intel_flash_bxt_ami_device); @@ -458,6 +503,7 @@ machine_at_pb520r_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(&i430lx_device); device_add(&ide_cmd640_pci_single_channel_device); @@ -579,6 +625,7 @@ 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_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); @@ -605,6 +652,7 @@ machine_at_sp4_common_init(const machine_t *model) 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); @@ -649,6 +697,7 @@ machine_at_ecs50x_init(const machine_t *model) 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); diff --git a/src/machine/m_at_socket4_5.c b/src/machine/m_at_socket4_5.c index 368f8397f..573f8bb71 100644 --- a/src/machine/m_at_socket4_5.c +++ b/src/machine/m_at_socket4_5.c @@ -70,3 +70,37 @@ machine_at_pci56001_init(const machine_t *model) return ret; } + +/* VLSI SuperCore */ +int +machine_at_celebris5xx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/celebris5xx/CELEBRIS.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(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x08, PCI_CARD_IDE, 4, 1, 2, 3); /* Onboard */ + pci_register_slot(0x09, PCI_CARD_VIDEO, 4, 1, 2, 3); /* Onboard */ + pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 3, 2, 1); /* Slot 01 */ + pci_register_slot(0x0C, PCI_CARD_NORMAL, 2, 1, 3, 2); /* Slot 02 */ + + device_add(&vl82c59x_device); + device_add(&intel_flash_bxt_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&ide_cmd640_pci_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + return ret; +} diff --git a/src/machine/m_at_socket5.c b/src/machine/m_at_socket5.c index cb3803e0d..d544dbc2e 100644 --- a/src/machine/m_at_socket5.c +++ b/src/machine/m_at_socket5.c @@ -62,6 +62,7 @@ machine_at_p54np4_init(const machine_t *model) 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); @@ -92,22 +93,44 @@ machine_at_586ip_init(const machine_t *model) static const device_config_t plato_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "plato", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "Intel AMIBIOS - Revision 1.00.02.AX1P (AMBRA DP90 PCI)", .internal_name = "ambradp90", .bios_type = BIOS_NORMAL, - .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/plato/1002AX1P.BIO", "roms/machines/plato/1002AX1P.BI1", "" } }, - { .name = "Intel AMIBIOS - Revision 1.00.16.AX1", .internal_name = "plato", .bios_type = BIOS_NORMAL, - .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/plato/1016ax1_.bio", "roms/machines/plato/1016ax1_.bi1", "" } }, - { .name = "Intel AMIBIOS - Revision 1.00.16.AX1J (Dell Dimension XPS P___)", .internal_name = "dellplato", .bios_type = BIOS_NORMAL, - .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/plato/1016AX1J.BIO", "roms/machines/plato/1016AX1J.BI1", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Intel AMIBIOS - Revision 1.00.02.AX1P (AMBRA DP90 PCI)", + .internal_name = "ambradp90", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 131072, + .files = { "roms/machines/plato/1002AX1P.BIO", "roms/machines/plato/1002AX1P.BI1", "" } + }, + { + .name = "Intel AMIBIOS - Revision 1.00.16.AX1", + .internal_name = "plato", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 131072, + .files = { "roms/machines/plato/1016ax1_.bio", "roms/machines/plato/1016ax1_.bi1", "" } + }, + { + .name = "Intel AMIBIOS - Revision 1.00.16.AX1J (Dell Dimension XPS P___)", + .internal_name = "dellplato", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 131072, + .files = { "roms/machines/plato/1016AX1J.BIO", "roms/machines/plato/1016AX1J.BI1", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -130,16 +153,16 @@ const device_t plato_device = { int machine_at_plato_init(const machine_t *model) { - int ret = 0; - const char* fn; - const char* fn2; + int ret = 0; + const char *fn; + const char *fn2; /* 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); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); fn2 = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 1); ret = bios_load_linear_combined(fn, fn2, 0x1d000, 128); device_context_restore(); @@ -154,28 +177,71 @@ machine_at_plato_init(const machine_t *model) static const device_config_t d842_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "d842", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, /*W1*/ - .bios = { - { .name = "PhoenixBIOS Pentium 1.03 - Revision 1.03.842", .internal_name = "d842_103", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842.BIN", "" } }, - { .name = "PhoenixBIOS Pentium 1.03 - Revision 1.09.842", .internal_name = "d842_109", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842_jul96.bin", "" } }, - { .name = "PhoenixBIOS Pentium 1.03 - Revision 1.10.842", .internal_name = "d842", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842_jun98_1.bin", "" } }, - { .name = "PhoenixBIOS 4.04 - Revision 1.05.842", .internal_name = "d842_105", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842_mar96.bin", "" } }, - { .name = "PhoenixBIOS 4.04 - Revision 1.06.842", .internal_name = "d842_106", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842_apr98.bin", "" } }, - { .name = "PhoenixBIOS 4.04 - Revision 1.07.842", .internal_name = "d842_107", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d842/d842_jun98.BIN", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "PhoenixBIOS Pentium 1.03 - Revision 1.03.842", + .internal_name = "d842_103", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/d842/d842.BIN", "" } + }, + { + .name = "PhoenixBIOS Pentium 1.03 - Revision 1.09.842", + .internal_name = "d842_109", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/d842/d842_jul96.bin", "" } + }, + { + .name = "PhoenixBIOS Pentium 1.03 - Revision 1.10.842", + .internal_name = "d842", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/d842/d842_jun98_1.bin", "" } + }, + { + .name = "PhoenixBIOS 4.04 - Revision 1.05.842", + .internal_name = "d842_105", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/d842/d842_mar96.bin", "" } + }, + { + .name = "PhoenixBIOS 4.04 - Revision 1.06.842", + .internal_name = "d842_106", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/d842/d842_apr98.bin", "" } + }, + { + .name = "PhoenixBIOS 4.04 - Revision 1.07.842", + .internal_name = "d842_107", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/d842/d842_jun98.BIN", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -198,15 +264,15 @@ const device_t d842_device = { int machine_at_d842_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + 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(); @@ -249,7 +315,9 @@ 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); + machine_force_ps2(1); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&i430nx_device); device_add(&sio_zb_device); @@ -281,6 +349,7 @@ machine_at_acerv30_init(const machine_t *model) pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x14, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); + device_add(&i430fx_device); device_add(&piix_device); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -312,6 +381,7 @@ 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_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&i430fx_device); device_add(&piix_device); @@ -411,6 +481,7 @@ machine_at_pt2000_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_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&i430fx_device); device_add(&piix_device); @@ -441,6 +512,7 @@ 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(&i430fx_device); device_add(&piix_device); device_add_params(&pc87306_device, (void *) PCX730X_AMI); @@ -468,6 +540,7 @@ 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_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&i430fx_device); device_add(&piix_device); @@ -497,6 +570,7 @@ 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_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&i430fx_device); device_add(&piix_device); @@ -630,6 +704,7 @@ machine_at_sq588_init(const machine_t *model) pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); 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_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -655,10 +730,11 @@ machine_at_p54sps_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, 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); - pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); + 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); + pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); + device_add(&sis_85c50x_device); device_add(&ide_pci_2ch_device); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -685,11 +761,12 @@ machine_at_ms5109_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, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 3, 2, 4); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 1, 3, 4); - pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 3, 2, 4); - pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_IDE, 0, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 3, 2, 4); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 1, 3, 4); + pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 3, 2, 4); + 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_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -717,10 +794,10 @@ machine_at_torino_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, 0, 0, 0, 0); - pci_register_slot(0x08, PCI_CARD_VIDEO, 0, 0, 0, 0); - pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x08, PCI_CARD_VIDEO, 0, 0, 0, 0); + pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); if (gfxcard[0] == VID_INTERNAL) device_add(machine_get_vid_device(machine)); @@ -744,19 +821,20 @@ machine_at_hot539_init(const machine_t *model) 0x000e0000, 131072, 0); if (bios_only || !ret) - return 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(0x12, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x15, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x16, 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(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x15, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x16, 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(&umc_8890_device); device_add(&umc_8886af_device); device_add(&sst_flash_29ee010_device); @@ -765,3 +843,173 @@ machine_at_hot539_init(const machine_t *model) return ret; } + +/* VLSI SuperCore */ +int +machine_at_bravoms586_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/bravoms586/asttest.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_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x06, PCI_CARD_IDE, 2, 0, 0, 0); + pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); + 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); + + device_add(&vl82c59x_device); + device_add(&intel_flash_bxt_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_cmd640_pci_single_channel_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + device_add(&ast_readout_device); /* AST custom jumper readout */ + device_add(&ast_nvr_device); /* AST custom secondary NVR device */ + + return ret; +} + +int +machine_at_g586vpmc_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/g586vpmc/Vpm_c3.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_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x02, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x08, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0A, PCI_CARD_IDE, 0, 0, 0, 0); + + device_add(&vl82c59x_device); + device_add(&sst_flash_29ee010_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&pc873xx_device, (void *) (PC87332 | PCX730X_398)); + device_add(&ide_cmd646_device); + return ret; +} + +int +machine_at_m54si_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/m54si/M54SI.03", + 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_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_IDE, 0, 0, 0, 0); /* Onboard device */ + 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); + + /* Slots are a guess since this BIOS won't work with pcireg */ + device_add(&vl82c59x_device); + device_add(&intel_flash_bxt_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_cmd640_pci_single_channel_device); + + return ret; +} + +int +machine_at_pb600_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pb600/BIOS.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(0x06, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0A, PCI_CARD_VIDEO, 4, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_IDE, 4, 0, 0, 0); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); + + device_add(&vl82c59x_device); + device_add(&intel_flash_bxt_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&phoenix_486_jumper_pci_pb600_device); + device_add(&ide_cmd640_pci_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + return ret; +} + +/* VLSI Wildcat */ +int +machine_at_globalyst620_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/globalyst620/p107.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_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0F, PCI_CARD_VIDEO, 0, 0, 0, 0); /* Onboard device */ + pci_register_slot(0x10, PCI_CARD_IDE, 0, 0, 0, 0); /* Onboard device */ + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); /* Slot 04 */ + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); /* Slot 05 */ + pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); /* Slot 06 */ + + device_add(&vl82c59x_wildcat_device); + device_add(&intel_flash_bxt_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&ide_cmd640_pci_single_channel_legacy_only_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); + + if (gfxcard[0] == VID_INTERNAL) + device_add(machine_get_vid_device(machine)); + + return ret; +} diff --git a/src/machine/m_at_socket7.c b/src/machine/m_at_socket7.c index 2b02c5bf1..75f94f82e 100644 --- a/src/machine/m_at_socket7.c +++ b/src/machine/m_at_socket7.c @@ -65,6 +65,7 @@ machine_at_acerm3a_init(const machine_t *model) 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); device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL)); @@ -94,6 +95,7 @@ machine_at_p55t2p4_init(const machine_t *model) 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(&i430hx_device); device_add(&piix3_device); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -116,6 +118,7 @@ machine_at_p65up5_common_init(const machine_t *model, const device_t *northbridg 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); @@ -143,28 +146,49 @@ machine_at_p65up5_cp55t2d_init(const machine_t *model) static const device_config_t cu430hx_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "cu430hx", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "Intel AMIBIOS - Revision 1.00.03.DK08 (Toshiba Equium 5xx0D)", .internal_name = "equium5200", .bios_type = BIOS_NORMAL, - .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/cu430hx/1003DK08.BIO", "roms/machines/cu430hx/1003DK08.BI1", - "roms/machines/cu430hx/1003DK08.BI2", "roms/machines/cu430hx/1003DK08.BI3", - "roms/machines/cu430hx/1003DK08.RCV", "" } }, - { .name = "Intel AMIBIOS - Revision 1.00.04.DK0K (NEC PowerMate V2xxx/P2xxx)", .internal_name = "powermatev2p2", .bios_type = BIOS_NORMAL, - .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/cu430hx/1004DK0K.BIO", "roms/machines/cu430hx/1004DK0K.BI1", - "roms/machines/cu430hx/1004DK0K.BI2", "roms/machines/cu430hx/1004DK0K.BI3", - "roms/machines/cu430hx/1004DK0K.RCV", "" } }, - { .name = "Intel AMIBIOS - Revision 1.00.06.DK0", .internal_name = "cu430hx", .bios_type = BIOS_NORMAL, - .files_no = 5, .local = 0, .size = 262144, .files = { "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", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Intel AMIBIOS - Revision 1.00.03.DK08 (Toshiba Equium 5xx0D)", + .internal_name = "equium5200", + .bios_type = BIOS_NORMAL, + .files_no = 5, + .local = 0, + .size = 262144, + .files = { "roms/machines/cu430hx/1003DK08.BIO", "roms/machines/cu430hx/1003DK08.BI1", + "roms/machines/cu430hx/1003DK08.BI2", "roms/machines/cu430hx/1003DK08.BI3", + "roms/machines/cu430hx/1003DK08.RCV", "" } }, + { + .name = "Intel AMIBIOS - Revision 1.00.04.DK0K (NEC PowerMate V2xxx/P2xxx)", + .internal_name = "powermatev2p2", + .bios_type = BIOS_NORMAL, + .files_no = 5, + .local = 0, + .size = 262144, + .files = { "roms/machines/cu430hx/1004DK0K.BIO", "roms/machines/cu430hx/1004DK0K.BI1", + "roms/machines/cu430hx/1004DK0K.BI2", "roms/machines/cu430hx/1004DK0K.BI3", + "roms/machines/cu430hx/1004DK0K.RCV", "" } + }, + { + .name = "Intel AMIBIOS - Revision 1.00.06.DK0", + .internal_name = "cu430hx", + .bios_type = BIOS_NORMAL, + .files_no = 5, + .local = 0, + .size = 262144, + .files = { "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", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -218,8 +242,8 @@ machine_at_cu430hx_gpio_init(void) int machine_at_cu430hx_init(const machine_t *model) { - int ret = 0; - const char* fn[5]; + int ret = 0; + const char *fn[5]; /* No ROMs available */ if (!device_available(model->device)) @@ -258,24 +282,39 @@ machine_at_cu430hx_init(const machine_t *model) static const device_config_t tc430hx_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "tc430hx", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "Intel AMIBIOS - Revision 1.00.07.DH0", .internal_name = "tc430hx", .bios_type = BIOS_NORMAL, - .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/tc430hx/1007DH0_.BIO", "roms/machines/tc430hx/1007DH0_.BI1", - "roms/machines/tc430hx/1007DH0_.BI2", "roms/machines/tc430hx/1007DH0_.BI3", - "roms/machines/tc430hx/1007DH0_.RCV", "" } }, - { .name = "Intel AMIBIOS - Revision 1.00.08.DH08 (Toshiba Infinia 7xx1)", .internal_name = "infinia7200", .bios_type = BIOS_NORMAL, - .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/tc430hx/1008DH08.BIO", "roms/machines/tc430hx/1008DH08.BI1", - "roms/machines/tc430hx/1008DH08.BI2", "roms/machines/tc430hx/1008DH08.BI3", - "roms/machines/tc430hx/1008DH08.RCV", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Intel AMIBIOS - Revision 1.00.07.DH0", + .internal_name = "tc430hx", + .bios_type = BIOS_NORMAL, + .files_no = 5, + .local = 0, + .size = 262144, + .files = { "roms/machines/tc430hx/1007DH0_.BIO", "roms/machines/tc430hx/1007DH0_.BI1", + "roms/machines/tc430hx/1007DH0_.BI2", "roms/machines/tc430hx/1007DH0_.BI3", + "roms/machines/tc430hx/1007DH0_.RCV", "" } + }, + { + .name = "Intel AMIBIOS - Revision 1.00.08.DH08 (Toshiba Infinia 7xx1)", + .internal_name = "infinia7200", + .bios_type = BIOS_NORMAL, + .files_no = 5, + .local = 0, + .size = 262144, + .files = { "roms/machines/tc430hx/1008DH08.BIO", "roms/machines/tc430hx/1008DH08.BI1", + "roms/machines/tc430hx/1008DH08.BI2", "roms/machines/tc430hx/1008DH08.BI3", + "roms/machines/tc430hx/1008DH08.RCV", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -329,8 +368,8 @@ machine_at_tc430hx_gpio_init(void) int machine_at_tc430hx_init(const machine_t *model) { - int ret = 0; - const char* fn[5]; + int ret = 0; + const char *fn[5]; /* No ROMs available */ if (!device_available(model->device)) @@ -371,20 +410,35 @@ machine_at_tc430hx_init(const machine_t *model) static const device_config_t m7shi_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "m7shi", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "PhoenixBIOS 4.0 Release 6.0 - Revision 05/20/97", .internal_name = "m7shi", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 262144, .files = { "roms/machines/m7shi/m7shi2n.rom", "" } }, - { .name = "PhoenixBIOS 4.0 Release 6.0 - Revision 01/21/98", .internal_name = "m7shi_4", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 262144, .files = { "roms/machines/m7shi/M7ns04.rom", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "PhoenixBIOS 4.0 Release 6.0 - Revision 05/20/97", + .internal_name = "m7shi", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 262144, + .files = { "roms/machines/m7shi/m7shi2n.rom", "" } + }, + { + .name = "PhoenixBIOS 4.0 Release 6.0 - Revision 01/21/98", + .internal_name = "m7shi_4", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 262144, + .files = { "roms/machines/m7shi/M7ns04.rom", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -407,15 +461,15 @@ const device_t m7shi_device = { int machine_at_m7shi_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); ret = bios_load_linear(fn, 0x000c0000, 262144, 0); device_context_restore(); @@ -428,6 +482,7 @@ machine_at_m7shi_init(const machine_t *model) 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)); @@ -457,6 +512,7 @@ machine_at_epc2102_init(const machine_t *model) 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); @@ -497,6 +553,7 @@ machine_at_pcv90_init(const machine_t *model) 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); @@ -528,6 +585,7 @@ machine_at_p55t2s_init(const machine_t *model) 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); @@ -561,6 +619,7 @@ machine_at_ap5vm_init(const machine_t *model) 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_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -591,6 +650,7 @@ machine_at_p55tvp4_init(const machine_t *model) 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(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); @@ -619,6 +679,7 @@ machine_at_5ivg_init(const machine_t *model) 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(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); @@ -648,6 +709,7 @@ machine_at_8500tvxa_init(const machine_t *model) pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 2, 1); pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 3, 2, 1); + device_add(&i430vx_device); device_add(&piix3_device); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -742,6 +804,7 @@ machine_at_dellhannibalp_init(const machine_t *model) 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, 4); + device_add(&i430vx_device); device_add(&piix3_device); device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_FR)); @@ -770,6 +833,7 @@ machine_at_p5vxb_init(const machine_t *model) 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); @@ -799,6 +863,7 @@ machine_at_p55va_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(&i430vx_device); device_add(&piix3_device); device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_FR)); @@ -864,6 +929,7 @@ machine_at_brio80xx_init(const machine_t *model) 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 *) (FDC37XXX5 | FDC37C93X_NORMAL | FDC37XXXX_370)); @@ -875,20 +941,35 @@ machine_at_brio80xx_init(const machine_t *model) static const device_config_t lgibmx52_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "lgibmx52", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "PhoenixBIOS 4.05 - Revision 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 = "PhoenixBIOS 4.05 - Revision 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", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "PhoenixBIOS 4.05 - Revision 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 = "PhoenixBIOS 4.05 - Revision 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 @@ -911,15 +992,15 @@ const device_t lgibmx52_device = { int machine_at_lgibmx52_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + 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(); @@ -932,6 +1013,7 @@ machine_at_lgibmx52_init(const machine_t *model) 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); @@ -997,9 +1079,9 @@ machine_at_pb810_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(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(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) @@ -1033,6 +1115,7 @@ machine_at_mb520n_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(&i430vx_device); device_add(&piix3_device); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -1062,6 +1145,7 @@ machine_at_i430vx_init(const machine_t *model) 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); @@ -1134,6 +1218,7 @@ machine_at_tx97_init(const machine_t *model) 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(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -1155,6 +1240,7 @@ 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); @@ -1219,6 +1305,7 @@ machine_at_tomahawk_init(const machine_t *model) 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)); @@ -1261,6 +1348,7 @@ machine_at_ym430tx_init(const machine_t *model) 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)); @@ -1290,6 +1378,7 @@ machine_at_thunderbolt_init(const machine_t *model) 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)); @@ -1319,6 +1408,7 @@ machine_at_ma23c_init(const machine_t *model) 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); @@ -1354,6 +1444,7 @@ machine_at_an430tx_init(const machine_t *model) 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(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); + device_add(&i430tx_device); device_add(&piix4_device); #ifdef FOLLOW_THE_SPECIFICATION @@ -1365,6 +1456,9 @@ machine_at_an430tx_init(const machine_t *model) device_add(&intel_flash_bxt_ami_device); spd_register(SPD_TYPE_SDRAM, 0x3, 128); + if (sound_card_current[0] == SOUND_INTERNAL) + machine_snd = device_add(machine_get_snd_device(machine)); + return ret; } @@ -1388,6 +1482,7 @@ machine_at_mb540n_init(const machine_t *model) 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(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); /* PIIX4 */ + device_add(&i430tx_device); device_add(&piix4_device); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -1419,6 +1514,7 @@ machine_at_56a5_init(const machine_t *model) pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); /* PIIX4 */ pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); + device_add(&i430tx_device); device_add(&piix4_device); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -1449,6 +1545,7 @@ machine_at_p5mms98_init(const machine_t *model) 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(&i430tx_device); device_add(&piix4_device); /* This actually has the Winbond W83967AF, for which I can not find any datasheet at all. */ @@ -1481,6 +1578,7 @@ machine_at_richmond_init(const machine_t *model) 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(&i430tx_device); device_add(&piix4_device); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -1514,6 +1612,7 @@ machine_at_ficva502_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, 1, 2, 3, 4); + device_add(&via_vpx_device); device_add(&via_vt82c586b_device); device_add_params(&fdc37c669_device, (void *) FDC37C6XX_370); @@ -1646,20 +1745,35 @@ machine_at_ms5146_init(const machine_t *model) static const device_config_t r534f_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "r534f_1998", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "Award Modular BIOS v4.51PG - Revision 06/12/1998", .internal_name = "r534f_1998", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/r534f/r534f008-1998.bin", "" } }, - { .name = "Award Modular BIOS v4.51PG - Revision 03/13/2000 (by Unicore Software)", .internal_name = "r534f", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/r534f/r534f008.bin", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Award Modular BIOS v4.51PG - Revision 06/12/1998", + .internal_name = "r534f_1998", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/r534f/r534f008-1998.bin", "" } + }, + { + .name = "Award Modular BIOS v4.51PG - Revision 03/13/2000 (by Unicore Software)", + .internal_name = "r534f", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/r534f/r534f008.bin", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -1682,15 +1796,15 @@ const device_t r534f_device = { int machine_at_r534f_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + 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(); @@ -1733,6 +1847,7 @@ machine_at_sp97xv_init(const machine_t *model) 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(0x13, PCI_CARD_VIDEO, 1, 2, 3, 4); /* On-chip SiS graphics, absent here. */ + device_add(&sis_5581_device); device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0)); device_add(&sst_flash_29ee010_device); @@ -1759,6 +1874,7 @@ machine_at_sq578_init(const machine_t *model) pci_register_slot(0x0D, PCI_CARD_NORMAL, 3, 4, 1, 2); 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_params(&w83877_device, (void *) (W83877TF | W83877_3F0)); device_add(&sst_flash_29ee010_device); @@ -1787,6 +1903,7 @@ machine_at_ms5172_init(const machine_t *model) 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); + device_add(&sis_5591_1997_device); device_add_params(&w83877_device, (void *) (W83877TF | W83877_3F0)); device_add(&sst_flash_29ee010_device); @@ -1798,20 +1915,35 @@ machine_at_ms5172_init(const machine_t *model) static const device_config_t m5ata_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "m5ata", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "Award Modular BIOS v4.51PG - Revision 12/23/97", .internal_name = "m5ata_1223", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/m5ata/ATA1223.BIN", "" } }, - { .name = "Award Modular BIOS v4.51PG - Revision 05/27/98", .internal_name = "m5ata", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/m5ata/ATA0527B.BIN", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Award Modular BIOS v4.51PG - Revision 12/23/97", + .internal_name = "m5ata_1223", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/m5ata/ATA1223.BIN", "" } + }, + { + .name = "Award Modular BIOS v4.51PG - Revision 05/27/98", + .internal_name = "m5ata", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/m5ata/ATA0527B.BIN", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -1834,15 +1966,15 @@ const device_t m5ata_device = { int machine_at_m5ata_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + 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(); @@ -1920,6 +2052,7 @@ machine_at_m560_init(const machine_t *model) 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); diff --git a/src/machine/m_at_socket7_3v.c b/src/machine/m_at_socket7_3v.c index f289b2275..76d09dbe0 100644 --- a/src/machine/m_at_socket7_3v.c +++ b/src/machine/m_at_socket7_3v.c @@ -45,18 +45,33 @@ static const device_config_t p54tp4xe_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "p54tp4xe", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "Award Modular BIOS v4.51PG - Revision 0302", .internal_name = "p54tp4xe", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/p54tp4xe/t15i0302.awd", "" } }, - { .name = "MR BIOS V3.30", .internal_name = "p54tp4xe_mr", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/p54tp4xe/TRITON.BIO", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Award Modular BIOS v4.51PG - Revision 0302", + .internal_name = "p54tp4xe", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/p54tp4xe/t15i0302.awd", "" } + }, + { + .name = "MR BIOS V3.30", + .internal_name = "p54tp4xe_mr", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/p54tp4xe/TRITON.BIO", "" } + }, { .files_no = 0 } }, }, @@ -81,15 +96,15 @@ const device_t p54tp4xe_device = { int machine_at_p54tp4xe_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + 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(); @@ -102,6 +117,7 @@ machine_at_p54tp4xe_init(const machine_t *model) 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); @@ -126,11 +142,12 @@ machine_at_exp8551_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(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(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); @@ -175,22 +192,44 @@ machine_at_vectra54_init(const machine_t *model) static const device_config_t thor_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "thor", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "Intel AMIBIOS - Revision 1.00.03.CN0T (Gateway 2000)", .internal_name = "gw2katx", .bios_type = BIOS_NORMAL, - .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/thor/1003CN0T.BIO", "roms/machines/thor/1003CN0T.BI1", "" } }, - { .name = "Intel AMIBIOS - Revision 1.00.06.CN0", .internal_name = "thor", .bios_type = BIOS_NORMAL, - .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/thor/1006cn0_.bio", "roms/machines/thor/1006cn0_.bi1", "" } }, - { .name = "MR BIOS V3.28", .internal_name = "mrthor", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/thor/mr_atx.bio", "" } }, + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Intel AMIBIOS - Revision 1.00.03.CN0T (Gateway 2000)", + .internal_name = "gw2katx", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 131072, + .files = { "roms/machines/thor/1003CN0T.BIO", "roms/machines/thor/1003CN0T.BI1", "" } + }, + { + .name = "Intel AMIBIOS - Revision 1.00.06.CN0", + .internal_name = "thor", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 131072, + .files = { "roms/machines/thor/1006cn0_.bio", "roms/machines/thor/1006cn0_.bi1", "" } + }, + { + .name = "MR BIOS V3.28", + .internal_name = "mrthor", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/thor/mr_atx.bio", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -258,9 +297,9 @@ machine_at_thor_gpio_init(void) int machine_at_thor_init(const machine_t *model) { - int ret = 0; - const char* fn; - const char* fn2; + int ret = 0; + const char *fn; + const char *fn2; /* No ROMs available */ if (!device_available(model->device)) @@ -269,7 +308,7 @@ machine_at_thor_init(const machine_t *model) device_context(model->device); int is_mr = !strcmp(device_get_config_bios("bios"), "mrthor"); int has_video = !strcmp(device_get_config_bios("bios"), "thor"); - fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); if (is_mr) ret = bios_load_linear(fn, 0x000e0000, 131072, 0); else { @@ -366,20 +405,21 @@ machine_at_endeavor_gpio_handler(uint8_t write, uint32_t val) if (write) { ret &= ((val & 0xffffffcf) | 0xffff0000); ret |= (val & 0x00000030); - if (machine_snd != NULL) switch ((val >> 4) & 0x03) { - case 0x00: - sb_vibra16s_onboard_relocate_base(0x0220, machine_snd); - break; - case 0x01: - sb_vibra16s_onboard_relocate_base(0x0260, machine_snd); - break; - case 0x02: - sb_vibra16s_onboard_relocate_base(0x0240, machine_snd); - break; - case 0x03: - sb_vibra16s_onboard_relocate_base(0x0280, machine_snd); - break; - } + if (machine_snd != NULL) + switch ((val >> 4) & 0x03) { + case 0x00: + sb_vibra16s_onboard_relocate_base(0x0220, machine_snd); + break; + case 0x01: + sb_vibra16s_onboard_relocate_base(0x0260, machine_snd); + break; + case 0x02: + sb_vibra16s_onboard_relocate_base(0x0240, machine_snd); + break; + case 0x03: + sb_vibra16s_onboard_relocate_base(0x0280, machine_snd); + break; + } machine_set_gpio(ret); } else ret = machine_get_gpio(); @@ -508,6 +548,7 @@ machine_at_pb640_init(const machine_t *model) pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 3, 4); pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 2, 1, 4); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add(&i430fx_rev02_device); device_add(&piix_rev02_device); @@ -535,11 +576,12 @@ machine_at_mb500n_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(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(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_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&i430fx_device); device_add(&piix_no_mirq_device); @@ -595,11 +637,12 @@ 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(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); /* The chip is not marked FR but the BIOS accesses register 06h of GPIO. */ @@ -630,6 +673,7 @@ machine_at_ap53_init(const machine_t *model) pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x06, PCI_CARD_VIDEO, 1, 2, 3, 4); + device_add(&i430hx_device); device_add(&piix3_device); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -659,6 +703,7 @@ machine_at_8500tuc_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, 1, 2, 3, 4); + device_add(&i430hx_device); device_add(&piix3_device); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -671,24 +716,53 @@ machine_at_8500tuc_init(const machine_t *model) static const device_config_t d943_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "d943", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, /*W1*/ - .bios = { - { .name = "PhoenixBIOS 4.05 - Revision 1.02.943", .internal_name = "d943_oct96", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d943/d943_oct96.bin", "" } }, - { .name = "PhoenixBIOS 4.05 - Revision 1.03.943", .internal_name = "d943_dec96", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d943/d943_dec96.bin", "" } }, - { .name = "PhoenixBIOS 4.05 - Revision 1.05.943", .internal_name = "d943_sept97", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d943/d943_sept97.bin", "" } }, - { .name = "PhoenixBIOS 4.05 - Revision 1.06.943", .internal_name = "d943", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d943/d943_oct97.bin", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "PhoenixBIOS 4.05 - Revision 1.02.943", + .internal_name = "d943_oct96", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/d943/d943_oct96.bin", "" } + }, + { + .name = "PhoenixBIOS 4.05 - Revision 1.03.943", + .internal_name = "d943_dec96", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/d943/d943_dec96.bin", "" } + }, + { + .name = "PhoenixBIOS 4.05 - Revision 1.05.943", + .internal_name = "d943_sept97", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/d943/d943_sept97.bin", "" } + }, + { + .name = "PhoenixBIOS 4.05 - Revision 1.06.943", + .internal_name = "d943", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/d943/d943_oct97.bin", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -711,18 +785,18 @@ const device_t d943_device = { int machine_at_d943_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + 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); @@ -731,8 +805,9 @@ machine_at_d943_init(const machine_t *model) 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(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_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -790,22 +865,44 @@ machine_at_gw2kma_init(const machine_t *model) static const device_config_t c5sbm2_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "5sbm2", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "Award Modular BIOS 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 = "Award Modular BIOS 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 = "Award Modular BIOS 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", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Award Modular BIOS 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 = "Award Modular BIOS 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 = "Award Modular BIOS 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 @@ -828,15 +925,15 @@ const device_t c5sbm2_device = { int machine_at_5sbm2_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + 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(); @@ -893,22 +990,44 @@ machine_at_amis727_init(const machine_t *model) static const device_config_t ap5s_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "ap5s", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "Award Modular BIOS v4.50PG - Revision R1.20", .internal_name = "ap5s_450pg", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/ap5s/ap5s120.bin", "" } }, - { .name = "Award Modular BIOS v4.51PG - Revision R1.50", .internal_name = "ap5s_r150", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/ap5s/AP5S150.BIN", "" } }, - { .name = "Award Modular BIOS v4.51PG - Revision R1.60", .internal_name = "ap5s", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/ap5s/ap5s160.bin", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Award Modular BIOS v4.50PG - Revision R1.20", + .internal_name = "ap5s_450pg", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/ap5s/ap5s120.bin", "" } + }, + { + .name = "Award Modular BIOS v4.51PG - Revision R1.50", + .internal_name = "ap5s_r150", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/ap5s/AP5S150.BIN", "" } + }, + { + .name = "Award Modular BIOS v4.51PG - Revision R1.60", + .internal_name = "ap5s", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/ap5s/ap5s160.bin", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -931,15 +1050,15 @@ const device_t ap5s_device = { int machine_at_ap5s_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + 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(); @@ -1020,3 +1139,37 @@ machine_at_ms5124_init(const machine_t *model) return ret; } + +/* VLSI Wildcat */ +int +machine_at_zeoswildcat_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/zeoswildcat/003606.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_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_IDE, 1, 2, 0, 0); /* Onboard device */ + pci_register_slot(0x0E, PCI_CARD_SCSI, 1, 0, 0, 0); /* Onboard device */ + pci_register_slot(0x0F, PCI_CARD_NETWORK, 1, 0, 0, 0); /* Onboard device */ + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); /* Slot 03 */ + pci_register_slot(0x12, PCI_CARD_NORMAL, 4, 2, 3, 1); /* Slot 04 */ + pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); /* Slot 05 */ + + /* Per the machine's manual there was an option for AMD SCSI and/or LAN controllers */ + device_add(&vl82c59x_wildcat_device); + device_add(&intel_flash_bxt_device); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add_params(&fdc37c6xx_device, (void *) FDC37C665); + device_add(&ide_rz1001_pci_device); + + return ret; +} diff --git a/src/machine/m_at_socket8.c b/src/machine/m_at_socket8.c index 11262ef4a..ea53e5fd4 100644 --- a/src/machine/m_at_socket8.c +++ b/src/machine/m_at_socket8.c @@ -61,6 +61,7 @@ machine_at_ap61_init(const machine_t *model) 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(&i450kx_device); device_add(&sio_zb_device); device_add(&ide_cmd646_device); @@ -94,6 +95,7 @@ machine_at_p6rp4_init(const machine_t *model) pci_register_slot(0x06, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 1, 2, 3); + device_add(&i450kx_device); device_add(&sio_zb_device); device_add(&ide_cmd646_device); @@ -108,20 +110,35 @@ machine_at_p6rp4_init(const machine_t *model) static const device_config_t ficpo6000_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "405F05C", - .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", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .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 @@ -135,7 +152,7 @@ const device_t ficpo6000_device = { .init = NULL, .close = NULL, .reset = NULL, - .available = NULL, + .available = NULL, .speed_changed = NULL, .force_redraw = NULL, .config = ficpo6000_config @@ -144,15 +161,15 @@ const device_t ficpo6000_device = { int machine_at_ficpo6000_init(const machine_t *model) { - int ret = 0; - const char* fn; + 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); + 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(); @@ -167,6 +184,7 @@ machine_at_ficpo6000_init(const machine_t *model) 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); @@ -189,7 +207,7 @@ machine_at_acerv60n_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_at_common_init_ex(model,2 ); + machine_at_common_init_ex(model, 2); pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); @@ -199,6 +217,7 @@ machine_at_acerv60n_init(const machine_t *model) pci_register_slot(0x10, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x12, PCI_CARD_NORMAL, 4, 1, 2, 3); 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 *) (FDC37XXX5 | FDC37C93X_NORMAL)); @@ -244,6 +263,7 @@ machine_at_8600ttc_init(const machine_t *model) 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); @@ -273,6 +293,7 @@ machine_at_686nx_init(const machine_t *model) 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); @@ -306,6 +327,7 @@ machine_at_ap440fx_init(const machine_t *model) pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 3, 4); pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 2, 1, 4); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 4); + device_add(&i440fx_device); device_add(&piix3_device); device_add_params(&pc87307_device, (void *) (PCX730X_AMI | PCX7307_PC87307)); @@ -323,28 +345,50 @@ machine_at_ap440fx_init(const machine_t *model) static const device_config_t vs440fx_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "vs440fx", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "Intel AMIBIOS - Revision 1.00.06.CS1J (Dell Dimension XPS Pro___n)", .internal_name = "dellvenus", .bios_type = BIOS_NORMAL, - .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/vs440fx/1006CS1J.BIO", "roms/machines/vs440fx/1006CS1J.BI1", - "roms/machines/vs440fx/1006CS1J.BI2", "roms/machines/vs440fx/1006CS1J.BI3", - "roms/machines/vs440fx/1006CS1J.RCV", "" } }, - { .name = "Intel AMIBIOS - Revision 1.00.11.CS1T (Gateway 2000)", .internal_name = "gw2kvenus", .bios_type = BIOS_NORMAL, - .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/vs440fx/1011CS1T.BIO", "roms/machines/vs440fx/1011CS1T.BI1", - "roms/machines/vs440fx/1011CS1T.BI2", "roms/machines/vs440fx/1011CS1T.BI3", - "roms/machines/vs440fx/1011CS1T.RCV", "" } }, - { .name = "Intel AMIBIOS - Revision 1.00.18.CS1", .internal_name = "vs440fx", .bios_type = BIOS_NORMAL, - .files_no = 5, .local = 0, .size = 262144, .files = { "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", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Intel AMIBIOS - Revision 1.00.06.CS1J (Dell Dimension XPS Pro___n)", + .internal_name = "dellvenus", + .bios_type = BIOS_NORMAL, + .files_no = 5, + .local = 0, + .size = 262144, + .files = { "roms/machines/vs440fx/1006CS1J.BIO", "roms/machines/vs440fx/1006CS1J.BI1", + "roms/machines/vs440fx/1006CS1J.BI2", "roms/machines/vs440fx/1006CS1J.BI3", + "roms/machines/vs440fx/1006CS1J.RCV", "" } + }, + { + .name = "Intel AMIBIOS - Revision 1.00.11.CS1T (Gateway 2000)", + .internal_name = "gw2kvenus", + .bios_type = BIOS_NORMAL, + .files_no = 5, + .local = 0, + .size = 262144, + .files = { "roms/machines/vs440fx/1011CS1T.BIO", "roms/machines/vs440fx/1011CS1T.BI1", + "roms/machines/vs440fx/1011CS1T.BI2", "roms/machines/vs440fx/1011CS1T.BI3", + "roms/machines/vs440fx/1011CS1T.RCV", "" } + }, + { + .name = "Intel AMIBIOS - Revision 1.00.18.CS1", + .internal_name = "vs440fx", + .bios_type = BIOS_NORMAL, + .files_no = 5, + .local = 0, + .size = 262144, + .files = { "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", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -367,15 +411,15 @@ const device_t vs440fx_device = { int machine_at_vs440fx_init(const machine_t *model) { - int ret = 0; - const char* fn[5]; + int ret = 0; + const char *fn[5]; /* No ROMs available */ if (!device_available(model->device)) return ret; device_context(model->device); - for (int i = 0; i < 5; i++) + for (uint8_t i = 0; i < 5; i++) fn[i] = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), i); ret = bios_load_linear_combined2(fn[0], fn[1], fn[2], fn[3], fn[4], 0x3a000, 128); device_context_restore(); @@ -389,6 +433,7 @@ machine_at_vs440fx_init(const machine_t *model) 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)); @@ -421,6 +466,7 @@ machine_at_lgibmx61_init(const machine_t *model) 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_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -450,6 +496,7 @@ machine_at_m6mi_init(const machine_t *model) pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x10, 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_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL)); @@ -478,6 +525,7 @@ machine_at_mb600n_init(const machine_t *model) 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); diff --git a/src/machine/m_at_sockets7.c b/src/machine/m_at_sockets7.c index a39b2cef4..7aaffb6ba 100644 --- a/src/machine/m_at_sockets7.c +++ b/src/machine/m_at_sockets7.c @@ -53,18 +53,19 @@ machine_at_p5a_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(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + 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(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(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 4, 1, 2); + 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(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 4, 1, 2); + device_add(&ali1541_device); device_add(&ali1543c_device); /* +0 */ device_add(&sst_flash_39sf020_device); @@ -88,15 +89,16 @@ machine_at_m579_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(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + 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(0x10, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x10, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + device_add(&ali1541_device); device_add(&ali1543c_device); /* +0 */ device_add(&sst_flash_29ee010_device); @@ -119,16 +121,17 @@ machine_at_gwlucas_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(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + 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(0x0E, 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(0x0F, PCI_CARD_SOUND, 1, 2, 3, 4); // ES1373 - pci_register_slot(0x14, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0F, PCI_CARD_SOUND, 1, 2, 3, 4); // ES1373 + pci_register_slot(0x14, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3); + device_add(&ali1541_device); device_add(&ali1543c_device); /* +0 */ device_add(&sst_flash_39sf020_device); @@ -156,15 +159,16 @@ machine_at_5aa_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(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + 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(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(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); + device_add(&ali1541_device); device_add(&ali1543c_device); /* +0 */ device_add(&sst_flash_29ee010_device); @@ -173,31 +177,87 @@ machine_at_5aa_init(const machine_t *model) return ret; } +static const device_config_t g5x_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "5ax", + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Award Modular BIOS v4.51PG - Revision F4", + .internal_name = "5ax", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/5ax/5AX.F4", "" } + }, + { + .name = "Phoenix - AwardBIOS v6.00PG - Release 4.1 (by eSupport)", + .internal_name = "5ax_esupport", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/5ax/6Z5KKG09.bin", "" } + }, + { .files_no = 0 } + } + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t g5x_device = { + .name = "Gigabyte GA-5AX", + .internal_name = "g5x_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = g5x_config +}; + int -machine_at_5ax_init(const machine_t *model) +machine_at_g5x_init(const machine_t *model) { - int ret; + int ret = 0; + const char *fn; - ret = bios_load_linear("roms/machines/5ax/5AX.F4", - 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); 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(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(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(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); + device_add(&ali1541_device); device_add(&ali1543c_device); /* +0 */ device_add(&sst_flash_29ee010_device); @@ -392,6 +452,7 @@ machine_at_5sg100_init(const machine_t *model) pci_register_slot(0x0D, PCI_CARD_NORMAL, 3, 4, 1, 2); 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_params(&w83877_device, (void *) (W83877TF | W83877_3F0)); device_add(&sst_flash_29ee010_device); diff --git a/src/machine/m_elt.c b/src/machine/m_elt.c index 2c807782c..b965486d1 100644 --- a/src/machine/m_elt.c +++ b/src/machine/m_elt.c @@ -30,7 +30,6 @@ * Boston, MA 02111-1307 * USA. */ - #include #include #include @@ -93,8 +92,8 @@ sysstat_out(UNUSED(uint16_t port), uint8_t val, void *priv) static uint8_t sysstat_in(UNUSED(uint16_t port), void *priv) { - const cga_t *cga = priv; - uint8_t ret = 0x0a; /* No idea what these bits are */ + const cga_t *cga = priv; + uint8_t ret = 0x0a; /* No idea what these bits are */ /* External CRT. We don't emulate the LCD/CRT switching, let's just * frivolously use this bit to indicate we're using the LCD if the diff --git a/src/machine/m_europc.c b/src/machine/m_europc.c index d85563241..c9f03295f 100644 --- a/src/machine/m_europc.c +++ b/src/machine/m_europc.c @@ -68,8 +68,6 @@ * * WARNING THIS IS A WORK-IN-PROGRESS MODULE. USE AT OWN RISK. * - * - * * Authors: Fred N. van Kempen, * * Inspired by the "jim.c" file originally present, but a @@ -677,23 +675,24 @@ europc_close(UNUSED(void *priv)) } static const device_config_t europc_config[] = { - // clang-format off + // clang-format off { - .name = "js9", - .description = "JS9 Jumper (JIM)", - .type = CONFIG_HEX16, - .default_string = "", - .default_int = 0x0250, - .file_filter = "", - .spinner = { 0 }, - .selection = { + .name = "js9", + .description = "JS9 Jumper (JIM)", + .type = CONFIG_HEX16, + .default_string = NULL, + .default_int = 0x0250, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { .description = "Disabled (250h)", .value = 0x0250 }, { .description = "Enabled (350h)", .value = 0x0350 }, - { .description = "" } + { .description = "" } }, + .bios = { { 0 } } }, { .name = "", .description = "", .type = CONFIG_END } - // clang-format on + // clang-format on }; const device_t europc_device = { diff --git a/src/machine/m_pcjr.c b/src/machine/m_pcjr.c index 9dba8795f..519933b23 100644 --- a/src/machine/m_pcjr.c +++ b/src/machine/m_pcjr.c @@ -8,8 +8,6 @@ * * Emulation of the IBM PCjr. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, @@ -52,16 +50,14 @@ #include <86box/machine.h> #include <86box/plat_unused.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 - +#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 static uint8_t key_queue[16]; static int key_queue_start = 0; @@ -70,7 +66,7 @@ static int key_queue_end = 0; /*PCjr keyboard has no escape scancodes, and no scancodes beyond 54 Map right alt to 54h (FN) */ const scancode scancode_pcjr[512] = { - // clang-format off + // clang-format off { .mk = { 0 }, .brk = { 0 } }, /* 000 */ { .mk = { 0x01, 0 }, .brk = { 0x81, 0 } }, /* 001 */ { .mk = { 0x02, 0 }, .brk = { 0x82, 0 } }, /* 002 */ @@ -583,10 +579,9 @@ const scancode scancode_pcjr[512] = { { .mk = { 0 }, .brk = { 0 } }, /* 1fd */ { .mk = { 0 }, .brk = { 0 } }, /* 1fe */ { .mk = { 0 }, .brk = { 0 } } /* 1ff */ - // clang-format on + // clang-format on }; - static void kbd_write(uint16_t port, uint8_t val, void *priv) { @@ -772,7 +767,7 @@ pit_irq0_timer_pcjr(int new_out, int old_out, UNUSED(void *priv)) } static const device_config_t pcjr_config[] = { - // clang-format off + // clang-format off { .name = "display_type", .description = "Display type", @@ -787,7 +782,8 @@ static const device_config_t pcjr_config[] = { { .description = "RGB (no brown)", .value = PCJR_RGB_NO_BROWN }, { .description = "RGB (IBM 5153)", .value = PCJR_RGB_IBM_5153 }, { .description = "" } - } + }, + .bios = { { 0 } } }, { .name = "double_type", @@ -811,10 +807,14 @@ static const device_config_t pcjr_config[] = { .description = "Apply overscan deltas", .type = CONFIG_BINARY, .default_string = NULL, - .default_int = 1 + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } }, { .name = "", .description = "", .type = CONFIG_END } - // clang-format on + // clang-format on }; const device_t pcjr_device = { diff --git a/src/machine/m_ps1.c b/src/machine/m_ps1.c index c8973cbb1..b37abdaa8 100644 --- a/src/machine/m_ps1.c +++ b/src/machine/m_ps1.c @@ -22,8 +22,6 @@ * The reserved 384K is remapped to the top of extended memory. * If this is not done then you get an error on startup. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, @@ -247,34 +245,98 @@ ps1_read(uint16_t port, void *priv) static const device_config_t ps1_2011_config[] = { // clang-format off { - .name = "bios_language", - .description = "BIOS Language", - .type = CONFIG_BIOS, + .name = "bios_language", + .description = "BIOS Language", + .type = CONFIG_BIOS, .default_string = "english_us", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, .bios = { - { .name = "English (US)", .internal_name = "english_us", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 262144, .files = { "roms/machines/ibmps1es/FC0000_US.BIN", "" } }, - { .name = "English (UK)", .internal_name = "english_uk", .bios_type = BIOS_NORMAL, - .files_no = 2, .local = 0, .size = 262144, .files = { "roms/machines/ibmps1es/F80000_UK.BIN", "roms/machines/ibmps1es/FC0000_UK.BIN", "" } }, - { .name = "English (Canada)", .internal_name = "english_ca", .bios_type = BIOS_NORMAL, - .files_no = 2, .local = 0, .size = 262144, .files = { "roms/machines/ibmps1es/F80000_CA.BIN", "roms/machines/ibmps1es/FC0000_CA.BIN", "" } }, - { .name = "Portuguese", .internal_name = "portuguese", .bios_type = BIOS_NORMAL, - .files_no = 2, .local = 0, .size = 262144, .files = { "roms/machines/ibmps1es/F80000_PT.BIN", "roms/machines/ibmps1es/FC0000_PT.BIN", "" } }, - { .name = "German", .internal_name = "german", .bios_type = BIOS_NORMAL, - .files_no = 2, .local = 0, .size = 262144, .files = { "roms/machines/ibmps1es/F80000_DE.BIN", "roms/machines/ibmps1es/FC0000_DE.BIN", "" } }, - { .name = "Swedish", .internal_name = "swedish", .bios_type = BIOS_NORMAL, - .files_no = 2, .local = 0, .size = 262144, .files = { "roms/machines/ibmps1es/F80000_SE.BIN", "roms/machines/ibmps1es/FC0000_SE.BIN", "" } }, - { .name = "French", .internal_name = "french", .bios_type = BIOS_NORMAL, - .files_no = 2, .local = 0, .size = 262144, .files = { "roms/machines/ibmps1es/F80000_FR.BIN", "roms/machines/ibmps1es/FC0000_FR.BIN", "" } }, - { .name = "Italian", .internal_name = "italian", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 524288, .files = { "roms/machines/ibmps1es/f80000.bin", "" } }, - { .name = "Spanish", .internal_name = "spanish", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 524288, .files = { "roms/machines/ibmps1es/F80000_ES.bin", "" } }, + { + .name = "English (US)", + .internal_name = "english_us", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 262144, + .files = { "roms/machines/ibmps1es/FC0000_US.BIN", "" } + }, + { + .name = "English (UK)", + .internal_name = "english_uk", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 262144, + .files = { "roms/machines/ibmps1es/F80000_UK.BIN", "roms/machines/ibmps1es/FC0000_UK.BIN", "" } + }, + { + .name = "English (Canada)", + .internal_name = "english_ca", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 262144, + .files = { "roms/machines/ibmps1es/F80000_CA.BIN", "roms/machines/ibmps1es/FC0000_CA.BIN", "" } + }, + { + .name = "Portuguese", + .internal_name = "portuguese", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 262144, + .files = { "roms/machines/ibmps1es/F80000_PT.BIN", "roms/machines/ibmps1es/FC0000_PT.BIN", "" } + }, + { + .name = "German", + .internal_name = "german", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 262144, + .files = { "roms/machines/ibmps1es/F80000_DE.BIN", "roms/machines/ibmps1es/FC0000_DE.BIN", "" } + }, + { + .name = "Swedish", + .internal_name = "swedish", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 262144, + .files = { "roms/machines/ibmps1es/F80000_SE.BIN", "roms/machines/ibmps1es/FC0000_SE.BIN", "" } + }, + { + .name = "French", + .internal_name = "french", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 262144, + .files = { "roms/machines/ibmps1es/F80000_FR.BIN", "roms/machines/ibmps1es/FC0000_FR.BIN", "" } + }, + { + .name = "Italian", + .internal_name = "italian", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 524288, + .files = { "roms/machines/ibmps1es/f80000.bin", "" } + }, + { + .name = "Spanish", + .internal_name = "spanish", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 524288, + .files = { "roms/machines/ibmps1es/F80000_ES.bin", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -300,7 +362,7 @@ ps1_setup(int model) ps1_t *ps; void *priv; - ps = (ps1_t *) calloc(1, sizeof(ps1_t)); + ps = (ps1_t *) calloc(1, sizeof(ps1_t)); ps->model = model; io_sethandler(0x0091, 1, @@ -325,25 +387,25 @@ ps1_setup(int model) if (model == 2011) { const device_t *d = device_context_get_device(); - const char * bios = device_get_config_bios("bios_language"); - const char * first = device_get_bios_file(d, bios, 0); - const char * second = device_get_bios_file(d, bios, 1); + const char *bios = device_get_config_bios("bios_language"); + const char *first = device_get_bios_file(d, bios, 0); + const char *second = device_get_bios_file(d, bios, 1); if (!strcmp(bios, "english_us")) { /* US English */ rom_init(&ps->high_rom, first, - 0xfc0000, 0x40000, 0x3ffff, 0, MEM_MAPPING_EXTERNAL); + 0xfc0000, 0x40000, 0x3ffff, 0, MEM_MAPPING_EXTERNAL); } else if (second == NULL) { /* Combined ROM. */ rom_init(&ps->high_rom, first, - 0xf80000, 0x80000, 0x7ffff, 0, MEM_MAPPING_EXTERNAL); + 0xf80000, 0x80000, 0x7ffff, 0, MEM_MAPPING_EXTERNAL); } else { /* Split ROM. */ rom_init(&ps->mid_rom, first, - 0xf80000, 0x40000, 0x3ffff, 0, MEM_MAPPING_EXTERNAL); + 0xf80000, 0x40000, 0x3ffff, 0, MEM_MAPPING_EXTERNAL); rom_init(&ps->high_rom, second, - 0xfc0000, 0x40000, 0x3ffff, 0, MEM_MAPPING_EXTERNAL); + 0xfc0000, 0x40000, 0x3ffff, 0, MEM_MAPPING_EXTERNAL); } lpt_set_next_inst(255); @@ -361,7 +423,9 @@ ps1_setup(int model) device_add(&ps1vga_device); } else if (model == 2121) { io_sethandler(0x00e0, 2, - ps1_read, NULL, NULL, ps1_write, NULL, NULL, ps); + ps1_read, NULL, NULL, + ps1_write, NULL, NULL, + ps); if (rom_present("roms/machines/ibmps1_2121/F80000.BIN")) { rom_init(&ps->mid_rom, @@ -414,9 +478,9 @@ machine_ps1_p1_handler(void) int machine_ps1_m2011_init(const machine_t *model) { - int ret; - const char* fn; - uint32_t offset; + int ret; + const char *fn; + uint32_t offset; if (!device_available(model->device)) { /* No ROMs available. */ @@ -426,7 +490,7 @@ machine_ps1_m2011_init(const machine_t *model) device_context(model->device); if ((fn = device_get_bios_file(model->device, device_get_config_bios("bios_language"), 1)) == NULL) { /* Combined ROM or US English. */ - fn = device_get_bios_file(model->device, device_get_config_bios("bios_language"), 0); + fn = device_get_bios_file(model->device, device_get_config_bios("bios_language"), 0); offset = (!strcmp("english_us", device_get_config_bios("bios_language"))) ? 0x20000 : 0x60000; } else { /* Separated ROM. */ @@ -434,7 +498,7 @@ machine_ps1_m2011_init(const machine_t *model) } if (!fn) { - fn = device_get_bios_file(model->device, "us_english", 0); + fn = device_get_bios_file(model->device, "us_english", 0); offset = 0x20000; } @@ -449,7 +513,7 @@ machine_ps1_m2011_init(const machine_t *model) device_context(model->device); - ps1_setup(2011); + ps1_setup(2011); device_context_restore(); diff --git a/src/machine/m_ps2_isa.c b/src/machine/m_ps2_isa.c index d768975d5..5754eee11 100644 --- a/src/machine/m_ps2_isa.c +++ b/src/machine/m_ps2_isa.c @@ -152,7 +152,7 @@ ps2_isa_setup(int model, int cpu_type) ps2_isa_t *ps2; void *priv; - ps2 = (ps2_isa_t *) calloc(1, sizeof(ps2_isa_t)); + ps2 = (ps2_isa_t *) calloc(1, sizeof(ps2_isa_t)); ps2->model = model; ps2->cpu_type = cpu_type; @@ -167,7 +167,7 @@ ps2_isa_setup(int model, int cpu_type) ps2->uart = device_add_inst(&ns16450_device, 1); - ps2->lpt = device_add_inst(&lpt_port_device, 1); + ps2->lpt = device_add_inst(&lpt_port_device, 1); lpt_set_ext(ps2->lpt, 1); lpt_port_remove(ps2->lpt); diff --git a/src/machine/m_ps2_mca.c b/src/machine/m_ps2_mca.c index 4a3d94ab3..e9f813f32 100644 --- a/src/machine/m_ps2_mca.c +++ b/src/machine/m_ps2_mca.c @@ -8,8 +8,6 @@ * * Implementation of MCA-based PS/2 machines. * - * - * * Authors: Fred N. van Kempen, * Miran Grca, * Sarah Walker, @@ -107,8 +105,8 @@ static struct ps2_t { serial_t *uart; lpt_t *lpt; - vga_t* mb_vga; - int has_e0000_hole; + vga_t *mb_vga; + int has_e0000_hole; } ps2; /*The model 70 type 3/4 BIOS performs cache testing. Since 86Box doesn't have any @@ -146,7 +144,7 @@ static struct ps2_t { static uint8_t ps2_cache[65536]; static int ps2_cache_valid[65536 / 8]; -static void mem_encoding_update(void); +static void mem_encoding_update(void); // #define ENABLE_PS2_MCA_LOG 1 #ifdef ENABLE_PS2_MCA_LOG int ps2_mca_do_log = ENABLE_PS2_MCA_LOG; @@ -376,45 +374,47 @@ ps55_model_50t_read(uint16_t port) return ps2.planar_id >> 8; case 0x102: return ps2.option[0]; - case 0x103: { - uint8_t val = 0xff; - /* - I/O 103h - Bit 7-4: Memory Card ID (Connector 1 or 3) - Bit 3-0: Memory Card ID (Connector 2) + case 0x103: + { + uint8_t val = 0xff; + /* + I/O 103h - Bit 7-4: Memory Card ID (Connector 1 or 3) + Bit 3-0: Memory Card ID (Connector 2) - Memory Card ID: 7h = 2 MB Memory Card 2 or 3 Installed - 5h = 4 MB Memory Card 2 Installed - */ - switch (mem_size / 1024) { - case 2: - if (ps2.option[1] & 0x04) - val = 0xff; - else - val = 0x7f; - break; - case 4: - if (ps2.option[1] & 0x04) - val = 0xff; - else - val = 0x77; - break; - case 6: - if (ps2.option[1] & 0x04) - val = 0x7f; - else - val = 0x77; - break; - case 8: - default: - if (ps2.option[1] & 0x04) - val = 0x5f; - else - val = 0x77; - break; + Memory Card ID: 7h = 2 MB Memory Card 2 or 3 Installed + 5h = 4 MB Memory Card 2 Installed + */ + switch (mem_size / 1024) { + case 2: + if (ps2.option[1] & 0x04) + val = 0xff; + else + val = 0x7f; + break; + case 4: + if (ps2.option[1] & 0x04) + val = 0xff; + else + val = 0x77; + break; + case 6: + if (ps2.option[1] & 0x04) + val = 0x7f; + else + val = 0x77; + break; + case 8: + default: + if (ps2.option[1] & 0x04) + val = 0x5f; + else + val = 0x77; + break; + } + ps2_mca_log(" Read MCA %04X %02X %04X:%04X mem_size = %d, ps2option1 = %2X\n", port, val, cs >> 4, cpu_state.pc, mem_size, ps2.option[1]); + return val; } - ps2_mca_log(" Read MCA %04X %02X %04X:%04X mem_size = %d, ps2option1 = %2X\n", port, val, cs >> 4, cpu_state.pc, mem_size, ps2.option[1]); - return val; - } case 0x104: + case 0x104: return ps2.option[2]; case 0x105: return ps2.option[3]; @@ -436,32 +436,34 @@ ps55_model_50v_read(uint16_t port) return ps2.planar_id >> 8; case 0x102: return ps2.option[0]; - case 0x103: { - uint8_t val = 0xff; - /* - I/O 103h - Bit 7-4: Reserved - Bit 3-0: Memory Card ID (Connector 3 or 1) + case 0x103: + { + uint8_t val = 0xff; + /* + I/O 103h - Bit 7-4: Reserved + Bit 3-0: Memory Card ID (Connector 3 or 1) - Memory Card ID: 8h = 4 MB Memory Card IV Installed - Fh = No Card Installed - */ - switch (mem_size / 1024) { - case 4: - if (ps2.option[1] & 0x04) - val = 0xff; - else - val = 0xf8; - break; - case 8: - default: - if (ps2.option[1] & 0x04) - val = 0xf8; - else - val = 0xf8; - break; + Memory Card ID: 8h = 4 MB Memory Card IV Installed + Fh = No Card Installed + */ + switch (mem_size / 1024) { + case 4: + if (ps2.option[1] & 0x04) + val = 0xff; + else + val = 0xf8; + break; + case 8: + default: + if (ps2.option[1] & 0x04) + val = 0xf8; + else + val = 0xf8; + break; + } + return val; } - return val; - } case 0x104: + case 0x104: /* Reading cache ID (bit 3-2) always returns zero */ return ps2.option[2] & 0xf3; case 0x105: @@ -532,10 +534,10 @@ model_55sx_mem_recalc(void) #ifdef ENABLE_PS2_MCA_LOG int enabled_mem = 0; #endif - int base = 0; - int remap_size = (ps2.option[3] & 0x10) ? 384 : 256; - int bit_mask = 0x00; - int max_rows = 4; + int base = 0; + int remap_size = (ps2.option[3] & 0x10) ? 384 : 256; + int bit_mask = 0x00; + int max_rows = 4; int bank_to_rows[16] = { 4, 2, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 2, 1, 0 }; ps2_mca_log("%02X %02X\n", ps2.option[1], ps2.option[3]); @@ -970,18 +972,15 @@ ps2_mca_write(uint16_t port, uint8_t val, UNUSED(void *priv)) case 0x102: if (!(ps2.setup & PS2_SETUP_IO)) ps2.planar_write(port, val); - else if (!(ps2.setup & PS2_SETUP_VGA)) - { - if (ps2.mb_vga) - { + else if (!(ps2.setup & PS2_SETUP_VGA)) { + if (ps2.mb_vga) { if (vga_isenabled(ps2.mb_vga)) vga_disable(ps2.mb_vga); if (val & 1) vga_enable(ps2.mb_vga); } ps2.pos_vga = val; - } - else if (ps2.adapter_setup & PS2_ADAPTER_SETUP) + } else if (ps2.adapter_setup & PS2_ADAPTER_SETUP) mca_write(port, val); break; case 0x103: @@ -1597,7 +1596,7 @@ 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); + ps2.lpt = device_add_inst(&lpt_port_device, 1); lpt_set_ext(ps2.lpt, 1); ps2.has_e0000_hole = 0; @@ -1606,24 +1605,36 @@ machine_ps2_common_init(const machine_t *model) static const device_config_t ps2_model_50_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "ibmps2_m50", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "IBM PS/2 model 50", .internal_name = "ibmps2_m50", .bios_type = BIOS_NORMAL, - .files_no = 4, .local = 0, .size = 131072, .files = { "roms/machines/ibmps2_m50/90x7420.zm13", - "roms/machines/ibmps2_m50/90x7429.zm18", - "roms/machines/ibmps2_m50/90x7423.zm14", - "roms/machines/ibmps2_m50/90x7426.zm16", "" } }, - { .name = "IBM PS/2 model 50Z", .internal_name = "ibmps2_m50z", .bios_type = BIOS_NORMAL, - .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/ibmps2_m50/15F8366.BIN", - "roms/machines/ibmps2_m50/15F8365.BIN", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "IBM PS/2 model 50", + .internal_name = "ibmps2_m50", + .bios_type = BIOS_NORMAL, + .files_no = 4, + .local = 0, + .size = 131072, + .files = { "roms/machines/ibmps2_m50/90x7420.zm13", "roms/machines/ibmps2_m50/90x7429.zm18", + "roms/machines/ibmps2_m50/90x7423.zm14", "roms/machines/ibmps2_m50/90x7426.zm16", "" } + }, + { + .name = "IBM PS/2 model 50Z", + .internal_name = "ibmps2_m50z", + .bios_type = BIOS_NORMAL, + .files_no = 2, + .local = 0, + .size = 131072, + .files = { "roms/machines/ibmps2_m50/15F8366.BIN", "roms/machines/ibmps2_m50/15F8365.BIN", "" } + }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -1646,8 +1657,8 @@ const device_t ps2_model_50_device = { int machine_ps2_model_50_init(const machine_t *model) { - int ret = 0; - const char* fn[4]; + int ret = 0; + const char *fn[4]; /* No ROMs available */ if (!device_available(model->device)) @@ -1656,11 +1667,11 @@ machine_ps2_model_50_init(const machine_t *model) device_context(model->device); int is_50z = !strcmp(device_get_config_bios("bios"), "ibmps2_m50z"); if (is_50z) { - for (int i = 0; i < 2; i++) + for (uint8_t i = 0; i < 2; i++) fn[i] = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), i); ret = bios_load_interleaved(fn[0], fn[1], 0x000e0000, 131072, 0); } else { - for (int i = 0; i < 4; i++) + for (uint8_t i = 0; i < 4; i++) fn[i] = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), i); ret = bios_load_interleaved(fn[0], fn[1], 0x000f0000, 131072, 0); ret &= bios_load_aux_interleaved(fn[2], fn[3], 0x000e0000, 65536, 0); @@ -1843,7 +1854,7 @@ ps55_mca_board_model_50t_init(void) /* The slot 5 is reserved for the Integrated Fixed Disk II (an internal ESDI hard drive). */ mca_init(5); - ps2.planar_read = ps55_model_50t_read; + ps2.planar_read = ps55_model_50t_read; ps2.planar_write = ps55_model_50tv_write; device_add(&ps2_nvr_device); @@ -1855,26 +1866,26 @@ ps55_mca_board_model_50t_init(void) ps2.has_e0000_hole = 1; mem_mapping_add(&ps2.split_mapping, - (mem_size + 256) * 1024, - 256 * 1024, - ps2_read_split_ram, - ps2_read_split_ramw, - ps2_read_split_raml, - ps2_write_split_ram, - ps2_write_split_ramw, - ps2_write_split_raml, - &ram[0xa0000], - MEM_MAPPING_INTERNAL, - NULL); + (mem_size + 256) * 1024, + 256 * 1024, + ps2_read_split_ram, + ps2_read_split_ramw, + ps2_read_split_raml, + ps2_write_split_ram, + ps2_write_split_ramw, + ps2_write_split_raml, + &ram[0xa0000], + MEM_MAPPING_INTERNAL, + NULL); mem_mapping_disable(&ps2.split_mapping); if (mem_size > 8192) { /* Only 8 MB supported on planar, create a memory expansion card for the rest */ - ps2_mca_mem_fffc_init(8); + ps2_mca_mem_fffc_init(8); } if (gfxcard[0] == VID_INTERNAL) - ps2.mb_vga = (vga_t *)device_add(&ps1vga_mca_device); + ps2.mb_vga = (vga_t *) device_add(&ps1vga_mca_device); } static void @@ -1886,7 +1897,7 @@ ps55_mca_board_model_50v_init(void) /* The slot 5 is reserved for the Integrated Fixed Disk II (an internal ESDI hard drive). */ mca_init(5); - ps2.planar_read = ps55_model_50v_read; + ps2.planar_read = ps55_model_50v_read; ps2.planar_write = ps55_model_50tv_write; device_add(&ps2_nvr_device); @@ -1899,17 +1910,17 @@ ps55_mca_board_model_50v_init(void) ps2.has_e0000_hole = 1; mem_mapping_add(&ps2.split_mapping, - (mem_size + 256) * 1024, - 256 * 1024, - ps2_read_split_ram, - ps2_read_split_ramw, - ps2_read_split_raml, - ps2_write_split_ram, - ps2_write_split_ramw, - ps2_write_split_raml, - &ram[0xa0000], - MEM_MAPPING_INTERNAL, - NULL); + (mem_size + 256) * 1024, + 256 * 1024, + ps2_read_split_ram, + ps2_read_split_ramw, + ps2_read_split_raml, + ps2_write_split_ram, + ps2_write_split_ramw, + ps2_write_split_raml, + &ram[0xa0000], + MEM_MAPPING_INTERNAL, + NULL); mem_mapping_disable(&ps2.split_mapping); mem_mapping_add(&ps2.cache_mapping, @@ -1926,13 +1937,12 @@ ps55_mca_board_model_50v_init(void) NULL); mem_mapping_disable(&ps2.cache_mapping); - if (mem_size > 8192) { - /* Only 8 MB supported on planar, create a memory expansion card for the rest */ - ps2_mca_mem_fffc_init(8); - } + /* Only 8 MB supported on planar, create a memory expansion card for the rest */ + if (mem_size > 8192) + ps2_mca_mem_fffc_init(8); if (gfxcard[0] == VID_INTERNAL) - ps2.mb_vga = (vga_t *)device_add(&ps1vga_mca_device); + ps2.mb_vga = (vga_t *) device_add(&ps1vga_mca_device); } int @@ -1941,7 +1951,7 @@ machine_ps55_model_50t_init(const machine_t *model) int ret; ret = bios_load_linear("roms/machines/ibmps55_m50t/38F6933.BIN", - 0x000e0000, 131072, 0); + 0x000e0000, 131072, 0); if (bios_only || !ret) return ret; @@ -1949,15 +1959,15 @@ machine_ps55_model_50t_init(const machine_t *model) machine_ps2_common_init(model); /* - * Planar ID - * FFFAh - PS/55 model 5551-S0x, T0x (stage 1?) - * FFEEh - PS/55 model 5551-S1x, T1x (stage 2?) - * Verification in BIOS P/N 38F6933: FBxx -> 4 slots (error), xxEE -> 5 slots (ok), others -> 8 (error) - * - * The only difference between S and T models is the CPU speed (16 MHz vs 20 MHz). - * The POST measures the speed, and sets a flag in the BIOS Data Area to indicate the sub model. - * The VM in 86Box runs faster than the real, so the POST always determines it as the T model. - */ + * Planar ID + * FFFAh - PS/55 model 5551-S0x, T0x (stage 1?) + * FFEEh - PS/55 model 5551-S1x, T1x (stage 2?) + * Verification in BIOS P/N 38F6933: FBxx -> 4 slots (error), xxEE -> 5 slots (ok), others -> 8 (error) + * + * The only difference between S and T models is the CPU speed (16 MHz vs 20 MHz). + * The POST measures the speed, and sets a flag in the BIOS Data Area to indicate the sub model. + * The VM in 86Box runs faster than the real, so the POST always determines it as the T model. + */ ps2.planar_id = 0xffee; ps55_mca_board_model_50t_init(); @@ -1981,10 +1991,10 @@ machine_ps55_model_50v_init(const machine_t *model) machine_ps2_common_init(model); /* - * Planar ID - * F1FFh - PS/55 model 5551-V0x, V1x - * Verification in BIOS P/N 56F7416,56F7417: FBxx -> 5 slots (ok), F1xx -> 5 slots (ok), others -> 8 (error) - */ + * Planar ID + * F1FFh - PS/55 model 5551-V0x, V1x + * Verification in BIOS P/N 56F7416,56F7417: FBxx -> 5 slots (ok), F1xx -> 5 slots (ok), others -> 8 (error) + */ ps2.planar_id = 0xf1ff; ps55_mca_board_model_50v_init(); diff --git a/src/machine/m_tandy.c b/src/machine/m_tandy.c index 899e819f7..5591f2cf0 100644 --- a/src/machine/m_tandy.c +++ b/src/machine/m_tandy.c @@ -8,8 +8,6 @@ * * Emulation of Tandy models 1000, 1000HX and 1000SL2. * - * - * * Authors: Sarah Walker, * Miran Grca, * @@ -47,7 +45,6 @@ #include <86box/m_tandy.h> #include <86box/plat_unused.h> - enum { TYPE_TANDY = 0, TYPE_TANDY1000SX, @@ -62,9 +59,8 @@ enum { EEPROM_WRITE }; - static const scancode scancode_tandy[512] = { - // clang-format off + // clang-format off { .mk = { 0 }, .brk = { 0 } }, /* 000 */ { .mk = { 0x01, 0 }, .brk = { 0x81, 0 } }, /* 001 */ { .mk = { 0x02, 0 }, .brk = { 0x82, 0 } }, /* 002 */ @@ -577,7 +573,7 @@ static const scancode scancode_tandy[512] = { { .mk = { 0 }, .brk = { 0 } }, /* 1fd */ { .mk = { 0 }, .brk = { 0 } }, /* 1fe */ { .mk = { 0 }, .brk = { 0 } } /* 1ff */ - // clang-format on + // clang-format on }; static int eep_data_out; @@ -600,8 +596,6 @@ tandy_log(const char *fmt, ...) # define tandy_log(fmt, ...) #endif - - static void eep_write(UNUSED(uint16_t addr), uint8_t val, void *priv) { diff --git a/src/machine/m_v86p.c b/src/machine/m_v86p.c index fbe7296f8..0be44de53 100644 --- a/src/machine/m_v86p.c +++ b/src/machine/m_v86p.c @@ -61,16 +61,16 @@ machine_v86p_init(const machine_t *model) if (!ret) { /* Try an older version of the BIOS. */ rom_id = 1; - ret = bios_load_interleavedr("roms/machines/v86p/INTEL8086AWD_BIOS_S3.1_V86P_090489_Even.rom", - "roms/machines/v86p/INTEL8086AWD_BIOS_S3.1_V86P_090489_Odd.rom", - 0x000f8000, 65536, 0); + ret = bios_load_interleavedr("roms/machines/v86p/INTEL8086AWD_BIOS_S3.1_V86P_090489_Even.rom", + "roms/machines/v86p/INTEL8086AWD_BIOS_S3.1_V86P_090489_Odd.rom", + 0x000f8000, 65536, 0); } if (!ret) { /* Try JVERNET's BIOS. */ rom_id = 2; - ret = bios_load_linear("roms/machines/v86p/V86P.ROM", - 0x000f0000, 65536, 0); + ret = bios_load_linear("roms/machines/v86p/V86P.ROM", + 0x000f0000, 65536, 0); } if (bios_only || !ret) diff --git a/src/machine/m_xt.c b/src/machine/m_xt.c index 815045389..c59b4ef37 100644 --- a/src/machine/m_xt.c +++ b/src/machine/m_xt.c @@ -65,46 +65,106 @@ machine_xt_common_init(const machine_t *model, int fixed_floppy) static const device_config_t ibmpc_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "ibm5150_5700671", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "5700671 (10/19/81)", .internal_name = "ibm5150_5700671", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/ibmpc/BIOS_IBM5150_19OCT81_5700671_U33.BIN", "" } }, - { .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", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "5700671 (10/19/81)", + .internal_name = "ibm5150_5700671", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 40960, + .files = { "roms/machines/ibmpc/BIOS_IBM5150_19OCT81_5700671_U33.BIN", "" } + }, + { + .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.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", "" } }, + { + .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, - .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/diagnostic/Supersoft_PCXT_8KB.bin", "" } }, - { .name = "Ruud's Diagnostic Rom", .internal_name = "diag_ruuds", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/diagnostic/ruuds_diagnostic_rom_v5.4_8kb.bin", "" } }, - { .name = "XT RAM Test", .internal_name = "diag_xtramtest", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/diagnostic/xtramtest_8k.bin", "" } }, + { + .name = "Supersoft Diagnostics", + .internal_name = "diag_supersoft", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 40960, + .files = { "roms/machines/diagnostic/Supersoft_PCXT_8KB.bin", "" } + }, + { + .name = "Ruud's Diagnostic Rom", + .internal_name = "diag_ruuds", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 40960, + .files = { "roms/machines/diagnostic/ruuds_diagnostic_rom_v5.4_8kb.bin", "" } + }, + { + .name = "XT RAM Test", + .internal_name = "diag_xtramtest", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 40960, + .files = { "roms/machines/diagnostic/xtramtest_8k.bin", "" } + }, { .files_no = 0 } - }, + } }, { - .name = "enable_5161", - .description = "IBM 5161 Expansion Unit", - .type = CONFIG_BINARY, - .default_int = 0 + .name = "enable_5161", + .description = "IBM 5161 Expansion Unit", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } }, { - .name = "enable_basic", - .description = "IBM Cassette Basic", - .type = CONFIG_BINARY, - .default_int = 1 + .name = "enable_basic", + .description = "IBM Cassette Basic", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -175,46 +235,106 @@ machine_ibmpc_init(const machine_t *model) static const device_config_t ibmpc82_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "ibm5150_1501476", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .bios = { - { .name = "1501476 (10/27/82)", .internal_name = "ibm5150_1501476", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/ibmpc82/BIOS_5150_27OCT82_1501476_U33.BIN", "" } }, - { .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", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "1501476 (10/27/82)", + .internal_name = "ibm5150_1501476", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 40960, + .files = { "roms/machines/ibmpc82/BIOS_5150_27OCT82_1501476_U33.BIN", "" } + }, + { + .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.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", "" } }, + { + .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, - .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/diagnostic/Supersoft_PCXT_8KB.bin", "" } }, - { .name = "Ruud's Diagnostic Rom", .internal_name = "diag_ruuds", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/diagnostic/ruuds_diagnostic_rom_v5.4_8kb.bin", "" } }, - { .name = "XT RAM Test", .internal_name = "diag_xtramtest", .bios_type = BIOS_NORMAL, - .files_no = 1, .local = 0, .size = 40960, .files = { "roms/machines/diagnostic/xtramtest_8k.bin", "" } }, + { + .name = "Supersoft Diagnostics", + .internal_name = "diag_supersoft", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 40960, + .files = { "roms/machines/diagnostic/Supersoft_PCXT_8KB.bin", "" } + }, + { + .name = "Ruud's Diagnostic Rom", + .internal_name = "diag_ruuds", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 40960, + .files = { "roms/machines/diagnostic/ruuds_diagnostic_rom_v5.4_8kb.bin", "" } + }, + { + .name = "XT RAM Test", + .internal_name = "diag_xtramtest", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 40960, + .files = { "roms/machines/diagnostic/xtramtest_8k.bin", "" } + }, { .files_no = 0 } - }, + } }, { - .name = "enable_5161", - .description = "IBM 5161 Expansion Unit", - .type = CONFIG_BINARY, - .default_int = 1 + .name = "enable_5161", + .description = "IBM 5161 Expansion Unit", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } }, { - .name = "enable_basic", - .description = "IBM Cassette Basic", - .type = CONFIG_BINARY, - .default_int = 1 + .name = "enable_basic", + .description = "IBM Cassette Basic", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -292,6 +412,7 @@ static const device_config_t ibmxt_config[] = { .default_int = 0, .file_filter = NULL, .spinner = { 0 }, + .selection = { { 0 } }, .bios = { { .name = "1501512 (11/08/82)", @@ -300,7 +421,8 @@ static const device_config_t ibmxt_config[] = { .files_no = 2, .local = 0, .size = 65536, - .files = { "roms/machines/ibmxt/BIOS_5160_08NOV82_U18_1501512.BIN", "roms/machines/ibmxt/BIOS_5160_08NOV82_U19_5000027.BIN", "" } + .files = { "roms/machines/ibmxt/BIOS_5160_08NOV82_U18_1501512.BIN", + "roms/machines/ibmxt/BIOS_5160_08NOV82_U19_5000027.BIN", "" } }, { .name = "1501512 (11/08/82) (Alt)", @@ -309,7 +431,8 @@ static const device_config_t ibmxt_config[] = { .files_no = 2, .local = 0, .size = 65536, - .files = { "roms/machines/ibmxt/BIOS_5160_08NOV82_U18_1501512.BIN", "roms/machines/ibmxt/BIOS_5160_08NOV82_U19_6359116.BIN", "" } + .files = { "roms/machines/ibmxt/BIOS_5160_08NOV82_U18_1501512.BIN", + "roms/machines/ibmxt/BIOS_5160_08NOV82_U19_6359116.BIN", "" } }, { .name = "5000026 (08/16/82)", @@ -318,7 +441,8 @@ static const device_config_t ibmxt_config[] = { .files_no = 2, .local = 0, .size = 65536, - .files = { "roms/machines/ibmxt/BIOS_5160_16AUG82_U18_5000026.BIN", "roms/machines/ibmxt/BIOS_5160_16AUG82_U19_5000027.BIN", "" } + .files = { "roms/machines/ibmxt/BIOS_5160_16AUG82_U18_5000026.BIN", + "roms/machines/ibmxt/BIOS_5160_16AUG82_U19_5000027.BIN", "" } }, // GLaBIOS for IBM XT @@ -329,7 +453,8 @@ static const device_config_t ibmxt_config[] = { .files_no = 2, .local = 1, .size = 40960, - .files = { "roms/machines/glabios/GLABIOS_0.4.0_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.4.0 (V20)", @@ -338,7 +463,8 @@ static const device_config_t ibmxt_config[] = { .files_no = 2, .local = 1, .size = 40960, - .files = { "roms/machines/glabios/GLABIOS_0.4.0_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. @@ -349,7 +475,8 @@ static const device_config_t ibmxt_config[] = { .files_no = 2, .local = 2, .size = 65536, - .files = { "roms/machines/diagnostic/Supersoft_PCXT_32KB.bin", "roms/machines/ibmxt/BIOS_5160_08NOV82_U19_5000027.BIN", "" } + .files = { "roms/machines/diagnostic/Supersoft_PCXT_32KB.bin", + "roms/machines/ibmxt/BIOS_5160_08NOV82_U19_5000027.BIN", "" } }, { .name = "Ruud's Diagnostic Rom", @@ -358,7 +485,8 @@ static const device_config_t ibmxt_config[] = { .files_no = 2, .local = 2, .size = 65536, - .files = { "roms/machines/diagnostic/ruuds_diagnostic_rom_v5.4_32kb.bin", "roms/machines/ibmxt/BIOS_5160_08NOV82_U19_5000027.BIN", "" } + .files = { "roms/machines/diagnostic/ruuds_diagnostic_rom_v5.4_32kb.bin", + "roms/machines/ibmxt/BIOS_5160_08NOV82_U19_5000027.BIN", "" } }, { .name = "XT RAM Test", @@ -367,22 +495,33 @@ static const device_config_t ibmxt_config[] = { .files_no = 2, .local = 2, .size = 65536, - .files = { "roms/machines/diagnostic/xtramtest_32k.bin", "roms/machines/ibmxt/BIOS_5160_08NOV82_U19_5000027.BIN", "" } + .files = { "roms/machines/diagnostic/xtramtest_32k.bin", + "roms/machines/ibmxt/BIOS_5160_08NOV82_U19_5000027.BIN", "" } }, { .files_no = 0 } - }, + } }, { - .name = "enable_5161", - .description = "IBM 5161 Expansion Unit", - .type = CONFIG_BINARY, - .default_int = 1 + .name = "enable_5161", + .description = "IBM 5161 Expansion Unit", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } }, { - .name = "enable_basic", - .description = "IBM Cassette Basic", - .type = CONFIG_BINARY, - .default_int = 1 + .name = "enable_basic", + .description = "IBM Cassette Basic", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -421,10 +560,10 @@ machine_ibmxt_init(const machine_t *model) enable_basic = machine_get_config_int("enable_basic"); fn = device_get_bios_file(model->device, device_get_config_bios("bios"), 0); local = device_get_bios_local(model->device, device_get_config_bios("bios")); - + if (local == 0) // Offset for stock roms - offset = 0x6000; - ret = bios_load_linear(fn, 0x000fe000, 65536, offset); + offset = 0x6000; + ret = bios_load_linear(fn, 0x000fe000, 65536, offset); if (enable_basic && ret) { if (local == 0) { // needed for stock roms @@ -463,6 +602,7 @@ static const device_config_t ibmxt86_config[] = { .default_int = 0, .file_filter = NULL, .spinner = { 0 }, + .selection = { { 0 } }, .bios = { { .name = "1501512 (05/09/86)", @@ -471,7 +611,8 @@ static const device_config_t ibmxt86_config[] = { .files_no = 2, .local = 0, .size = 65536, - .files = { "roms/machines/ibmxt86/BIOS_5160_09MAY86_U18_59X7268_62X0890_27256_F800.BIN", "roms/machines/ibmxt86/BIOS_5160_09MAY86_U19_62X0819_68X4370_27256_F000.BIN", "" } + .files = { "roms/machines/ibmxt86/BIOS_5160_09MAY86_U18_59X7268_62X0890_27256_F800.BIN", + "roms/machines/ibmxt86/BIOS_5160_09MAY86_U19_62X0819_68X4370_27256_F000.BIN", "" } }, { .name = "5000026 (01/10/86)", @@ -480,7 +621,8 @@ static const device_config_t ibmxt86_config[] = { .files_no = 2, .local = 0, .size = 65536, - .files = { "roms/machines/ibmxt86/BIOS_5160_10JAN86_U18_62X0851_27256_F800.BIN", "roms/machines/ibmxt86/BIOS_5160_10JAN86_U19_62X0854_27256_F000.BIN", "" } + .files = { "roms/machines/ibmxt86/BIOS_5160_10JAN86_U18_62X0851_27256_F800.BIN", + "roms/machines/ibmxt86/BIOS_5160_10JAN86_U19_62X0854_27256_F000.BIN", "" } }, { .name = "1501512 (01/10/86) (Alt)", @@ -489,7 +631,8 @@ static const device_config_t ibmxt86_config[] = { .files_no = 2, .local = 0, .size = 65536, - .files = { "roms/machines/ibmxt86/BIOS_5160_10JAN86_U18_62X0852_27256_F800.BIN", "roms/machines/ibmxt86/BIOS_5160_10JAN86_U19_62X0853_27256_F000.BIN", "" } + .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 @@ -500,7 +643,8 @@ static const device_config_t ibmxt86_config[] = { .files_no = 2, .local = 1, .size = 65536, - .files = { "roms/machines/glabios/GLABIOS_0.4.0_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.4.0 (V20)", @@ -509,7 +653,8 @@ static const device_config_t ibmxt86_config[] = { .files_no = 2, .local = 1, .size = 65536, - .files = { "roms/machines/glabios/GLABIOS_0.4.0_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. @@ -520,7 +665,8 @@ static const device_config_t ibmxt86_config[] = { .files_no = 2, .local = 2, .size = 65536, - .files = { "roms/machines/diagnostic/Supersoft_PCXT_32KB.bin", "roms/machines/ibmxt86/BIOS_5160_09MAY86_U19_62X0819_68X4370_27256_F000.BIN", "" } + .files = { "roms/machines/diagnostic/Supersoft_PCXT_32KB.bin", + "roms/machines/ibmxt86/BIOS_5160_09MAY86_U19_62X0819_68X4370_27256_F000.BIN", "" } }, { .name = "Ruud's Diagnostic Rom", @@ -545,10 +691,15 @@ static const device_config_t ibmxt86_config[] = { }, }, { - .name = "enable_5161", - .description = "IBM 5161 Expansion Unit", - .type = CONFIG_BINARY, - .default_int = 1 + .name = "enable_5161", + .description = "IBM 5161 Expansion Unit", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -575,20 +726,20 @@ machine_ibmxt86_init(const machine_t *model) uint8_t enable_5161; const char *fn; uint16_t offset = 0; - uint32_t local = 0; + uint32_t local = 0; /* No ROMs available. */ if (!device_available(model->device)) return ret; device_context(model->device); - enable_5161 = machine_get_config_int("enable_5161"); - fn = device_get_bios_file(model->device, device_get_config_bios("bios"), 0); - local = device_get_bios_local(model->device, device_get_config_bios("bios")); + enable_5161 = machine_get_config_int("enable_5161"); + fn = device_get_bios_file(model->device, device_get_config_bios("bios"), 0); + local = device_get_bios_local(model->device, device_get_config_bios("bios")); if (local == 0) // Offset for stock roms - offset = 0x6000; - ret = bios_load_linear(fn, 0x000fe000, 65536, offset); + offset = 0x6000; + ret = bios_load_linear(fn, 0x000fe000, 65536, offset); if (ret) { if (local == 0) { // needed for stock roms @@ -881,23 +1032,47 @@ machine_xt_super16te_init(const machine_t *model) static const device_config_t jukopc_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "jukost", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .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", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .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.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", "" } }, + { + .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 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -928,8 +1103,8 @@ machine_xt_jukopc_init(const machine_t *model) return ret; device_context(model->device); - fn = device_get_bios_file(model->device, device_get_config_bios("bios"), 0); - ret = bios_load_linear(fn, 0x000fe000, 8192, 0); + fn = device_get_bios_file(model->device, device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000fe000, 8192, 0); device_context_restore(); if (bios_only || !ret) @@ -977,13 +1152,14 @@ machine_xt_micoms_xl7turbo_init(const machine_t *model) static const device_config_t pc500_config[] = { // clang-format off { - .name = "bios", + .name = "bios", .description = "BIOS Version", .type = CONFIG_BIOS, .default_string = "pc500_330", .default_int = 0, .file_filter = NULL, .spinner = { 0 }, + .selection = { { 0 } }, .bios = { { .name = "3.30", @@ -1004,7 +1180,7 @@ static const device_config_t pc500_config[] = { .files = { "roms/machines/pc500/rom310.bin", "" } }, { .files_no = 0 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -1035,8 +1211,8 @@ machine_xt_pc500_init(const machine_t *model) return ret; device_context(model->device); - fn = device_get_bios_file(model->device, device_get_config_bios("bios"), 0); - ret = bios_load_linear(fn, 0x000fe000, 8192, 0); + fn = device_get_bios_file(model->device, device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000fe000, 8192, 0); device_context_restore(); if (bios_only || !ret) @@ -1280,23 +1456,47 @@ machine_xt_pcxt_init(const machine_t *model) static const device_config_t vendex_config[] = { // clang-format off { - .name = "bios", - .description = "BIOS Version", - .type = CONFIG_BIOS, + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, .default_string = "vendex", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .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", "" } }, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .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 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", "" } }, + { + .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 } - }, + } }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on @@ -1327,8 +1527,8 @@ machine_xt_vendex_init(const machine_t *model) return ret; device_context(model->device); - fn = device_get_bios_file(model->device, device_get_config_bios("bios"), 0); - ret = bios_load_linear(fn, 0x000fc000, 16384, 0); + fn = device_get_bios_file(model->device, device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000fc000, 16384, 0); device_context_restore(); if (bios_only || !ret) @@ -1342,7 +1542,7 @@ machine_xt_vendex_init(const machine_t *model) } static void -machine_xt_laserxt_common_init(const machine_t *model,int is_lxt3) +machine_xt_laserxt_common_init(const machine_t *model, int is_lxt3) { machine_common_init(model); @@ -1593,7 +1793,7 @@ machine_xt_pc5086_init(const machine_t *model) int ret; ret = bios_load_linear("roms/machines/pc5086/sys_rom.bin", - 0x000f0000, 65536, 0); + 0x000f0000, 65536, 0); if (bios_only || !ret) return ret; diff --git a/src/machine/m_xt_olivetti.c b/src/machine/m_xt_olivetti.c index 13d98e6f9..50a891e2c 100644 --- a/src/machine/m_xt_olivetti.c +++ b/src/machine/m_xt_olivetti.c @@ -132,8 +132,8 @@ typedef struct m24_kbd_t { uint8_t scan[7]; /* Mouse stuff. */ - int mouse_input_mode; - int b; + int mouse_input_mode; + int b; pc_timer_t send_delay_timer; } m24_kbd_t; @@ -553,20 +553,20 @@ m24_kbd_write(uint16_t port, uint8_t val, void *priv) switch (m24_kbd->command) { case 0x11: m24_kbd->mouse_input_mode = 0; - m24_kbd->scan[0] = m24_kbd->params[0]; - m24_kbd->scan[1] = m24_kbd->params[1]; - m24_kbd->scan[2] = m24_kbd->params[2]; - m24_kbd->scan[3] = m24_kbd->params[3]; - m24_kbd->scan[4] = m24_kbd->params[4]; - m24_kbd->scan[5] = m24_kbd->params[5]; - m24_kbd->scan[6] = m24_kbd->params[6]; + m24_kbd->scan[0] = m24_kbd->params[0]; + m24_kbd->scan[1] = m24_kbd->params[1]; + m24_kbd->scan[2] = m24_kbd->params[2]; + m24_kbd->scan[3] = m24_kbd->params[3]; + m24_kbd->scan[4] = m24_kbd->params[4]; + m24_kbd->scan[5] = m24_kbd->params[5]; + m24_kbd->scan[6] = m24_kbd->params[6]; break; case 0x12: m24_kbd->mouse_input_mode = 1; - m24_kbd->scan[0] = m24_kbd->params[0]; - m24_kbd->scan[1] = m24_kbd->params[1]; - m24_kbd->scan[2] = m24_kbd->params[2]; + m24_kbd->scan[0] = m24_kbd->params[0]; + m24_kbd->scan[1] = m24_kbd->params[1]; + m24_kbd->scan[2] = m24_kbd->params[2]; break; default: @@ -722,7 +722,7 @@ m24_kbd_reset(void *priv) m24_kbd->wantirq = 0; keyboard_scan = 1; m24_kbd->param = m24_kbd->param_total = 0; - m24_kbd->mouse_input_mode = 0; + m24_kbd->mouse_input_mode = 0; m24_kbd->scan[0] = 0x1c; m24_kbd->scan[1] = 0x53; m24_kbd->scan[2] = 0x01; @@ -736,11 +736,11 @@ static int ms_poll(void *priv) { m24_kbd_t *m24_kbd = (m24_kbd_t *) priv; - int delta_x; - int delta_y; - int o_x; - int o_y; - int b = mouse_get_buttons_ex(); + int delta_x; + int delta_y; + int o_x; + int o_y; + int b = mouse_get_buttons_ex(); if (((key_queue_end - key_queue_start) & 0xf) > 14) return 0xff; @@ -847,7 +847,7 @@ ms_poll(void *priv) - Right Windows (E0 5C) -> F18 (67). */ const scancode scancode_olivetti_m24_deluxe[512] = { - // clang-format off + // clang-format off { .mk = { 0 }, .brk = { 0 } }, /* 000 */ { .mk = { 0x01, 0 }, .brk = { 0x81, 0 } }, /* 001 */ { .mk = { 0x02, 0 }, .brk = { 0x82, 0 } }, /* 002 */ @@ -1360,7 +1360,7 @@ const scancode scancode_olivetti_m24_deluxe[512] = { { .mk = { 0 }, .brk = { 0 } }, /* 1fd */ { .mk = { 0 }, .brk = { 0 } }, /* 1fe */ { .mk = { 0 }, .brk = { 0 } } /* 1ff */ - // clang-format on + // clang-format on }; /* Remapping as follows: @@ -1370,7 +1370,7 @@ const scancode scancode_olivetti_m24_deluxe[512] = { - Menu (E0 5D) -> 5C. */ const scancode scancode_olivetti_m240[512] = { - // clang-format off + // clang-format off { .mk = { 0 }, .brk = { 0 } }, /* 000 */ { .mk = { 0x01, 0 }, .brk = { 0x81, 0 } }, /* 001 */ { .mk = { 0x02, 0 }, .brk = { 0x82, 0 } }, /* 002 */ @@ -1883,7 +1883,7 @@ const scancode scancode_olivetti_m240[512] = { { .mk = { 0 }, .brk = { 0 } }, /* 1fd */ { .mk = { 0 }, .brk = { 0 } }, /* 1fe */ { .mk = { 0 }, .brk = { 0 } } /* 1ff */ - // clang-format on + // clang-format on }; static void @@ -2084,33 +2084,38 @@ const device_t m24_kbd_device = { }; const device_config_t m19_vid_config[] = { - // clang-format off + // clang-format off { /* Olivetti / ATT compatible displays */ - .name = "rgb_type", - .description = "RGB type", - .type = CONFIG_SELECTION, - .default_string = "", - .default_int = CGA_RGB, - .file_filter = "", - .spinner = { 0 }, - .selection = { + .name = "rgb_type", + .description = "RGB type", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = CGA_RGB, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { .description = "Color", .value = 0 }, { .description = "Green Monochrome", .value = 1 }, { .description = "Amber Monochrome", .value = 2 }, { .description = "Gray Monochrome", .value = 3 }, { .description = "" } - } + }, + .bios = { { 0 } } }, { - .name = "snow_enabled", - .description = "Snow emulation", - .type = CONFIG_BINARY, - .default_string = "", - .default_int = 1, + .name = "snow_enabled", + .description = "Snow emulation", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } }, { .name = "", .description = "", .type = CONFIG_END } - // clang-format on + // clang-format on }; const device_t m19_vid_device = { @@ -2243,7 +2248,7 @@ m24_read(uint16_t port, UNUSED(void *priv)) static uint8_t m240_read(uint16_t port, UNUSED(void *priv)) { - uint8_t ret = 0x00; + uint8_t ret = 0x00; int fdd_count = 0; switch (port) { diff --git a/src/machine/m_xt_t1000.c b/src/machine/m_xt_t1000.c index 080a03d19..87899e7c6 100644 --- a/src/machine/m_xt_t1000.c +++ b/src/machine/m_xt_t1000.c @@ -51,8 +51,6 @@ * NOTE: Still need to figure out a way to load/save ConfigSys and * HardRAM stuff. Needs to be linked in to the NVR code. * - * - * * Authors: Fred N. van Kempen, * Miran Grca, * John Elliott, @@ -288,8 +286,8 @@ tc8521_write(uint16_t addr, uint8_t val, void *priv) static uint8_t tc8521_read(uint16_t addr, void *priv) { - const nvr_t *nvr = (nvr_t *) priv; - uint8_t page; + const nvr_t *nvr = (nvr_t *) priv; + uint8_t page; /* Get to the correct register page. */ addr &= 0x0f; @@ -342,7 +340,7 @@ ems_execaddr(t1000_t *sys, UNUSED(int pg), uint16_t val) return 0; /* Bit 7 reset => not mapped */ if (!sys->ems_pages) return 0; /* No EMS available: all used by - * HardRAM or conventional RAM */ + * HardRAM or conventional RAM */ val &= 0x7f; #if 0 @@ -468,7 +466,7 @@ static uint8_t ems_read_ram(uint32_t addr, void *priv) { const t1000_t *sys = (t1000_t *) priv; - int pg = addr_to_page(addr); + int pg = addr_to_page(addr); if (pg < 0) return 0xff; @@ -834,7 +832,7 @@ int machine_xt_t1000_init(const machine_t *model) { FILE *fp; - int ret; + int ret; ret = bios_load_linear("roms/machines/t1000/t1000.rom", 0x000f8000, 32768, 0); diff --git a/src/machine/m_xt_xi8088.c b/src/machine/m_xt_xi8088.c index 756432405..729cf48d5 100644 --- a/src/machine/m_xt_xi8088.c +++ b/src/machine/m_xt_xi8088.c @@ -87,77 +87,77 @@ xi8088_init(UNUSED(const device_t *info)) } static const device_config_t xi8088_config[] = { - // clang-format off + // clang-format off { - .name = "turbo_setting", + .name = "turbo_setting", .description = "Turbo", - .type = CONFIG_SELECTION, - .selection = { + .type = CONFIG_SELECTION, + .default_int = 0, + .selection = { { .description = "Always at selected speed", - .value = 0 + .value = 0 }, { .description = "BIOS setting + Hotkeys (off during POST)", - .value = 1 + .value = 1 } - }, - .default_int = 0 + } }, { - .name = "bios_128kb", + .name = "bios_128kb", .description = "BIOS size", - .type = CONFIG_SELECTION, - .selection = { + .type = CONFIG_SELECTION, + .default_int = 1, + .selection = { { .description = "64 KB starting from F0000", - .value = 0 + .value = 0 }, { .description = "128 KB starting from E0000 (address MSB inverted, last 64 KB first)", - .value = 1 + .value = 1 } - }, - .default_int = 1 + } }, { - .name = "umb_c0000h_c7fff", + .name = "umb_c0000h_c7fff", .description = "Map C0000-C7FFF as UMB", - .type = CONFIG_BINARY, + .type = CONFIG_BINARY, .default_int = 0 }, { - .name = "umb_c8000h_cffff", + .name = "umb_c8000h_cffff", .description = "Map C8000-CFFFF as UMB", - .type = CONFIG_BINARY, + .type = CONFIG_BINARY, .default_int = 0 }, { - .name = "umb_d0000h_d7fff", + .name = "umb_d0000h_d7fff", .description = "Map D0000-D7FFF as UMB", - .type = CONFIG_BINARY, + .type = CONFIG_BINARY, .default_int = 0 }, { - .name = "umb_d8000h_dffff", + .name = "umb_d8000h_dffff", .description = "Map D8000-DFFFF as UMB", - .type = CONFIG_BINARY, + .type = CONFIG_BINARY, .default_int = 0 }, { - .name = "umb_e0000h_e7fff", + .name = "umb_e0000h_e7fff", .description = "Map E0000-E7FFF as UMB", - .type = CONFIG_BINARY, + .type = CONFIG_BINARY, .default_int = 0 }, { - .name = "umb_e8000h_effff", + .name = "umb_e8000h_effff", .description = "Map E8000-EFFFF as UMB", - .type = CONFIG_BINARY, + .type = CONFIG_BINARY, .default_int = 0 }, { .name = "", .description = "", .type = CONFIG_END } - // clang-format on + // clang-format on }; const device_t xi8088_device = { diff --git a/src/machine/machine.c b/src/machine/machine.c index 50b0bb150..30f979fd4 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -8,8 +8,6 @@ * * Handling of the emulated machines. * - * - * * Authors: Miran Grca, * Fred N. van Kempen, * @@ -78,9 +76,9 @@ machine_init_ex(int m) machine_init_gpio(); machine_init_gpio_acpi(); - machine_snd = NULL; + machine_snd = NULL; - is_vpc = 0; + is_vpc = 0; standalone_gameport_type = NULL; gameport_instance_id = 0; @@ -185,7 +183,7 @@ void machine_common_init(UNUSED(const machine_t *model)) { uint8_t cpu_requires_fast_pit = is486 || (!is286 && is8086 && (cpu_s->rspeed >= 8000000)); - cpu_requires_fast_pit = cpu_requires_fast_pit && !cpu_16bitbus; + cpu_requires_fast_pit = cpu_requires_fast_pit && !cpu_16bitbus; /* System devices first. */ pic_init(); diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 47fe4823b..be70b897a 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -163,6 +163,8 @@ const machine_filter_t machine_chipsets[] = { { "VLSI VL82C480", MACHINE_CHIPSET_VLSI_VL82C480 }, { "VLSI VL82C481", MACHINE_CHIPSET_VLSI_VL82C481 }, { "VLSI VL82C486", MACHINE_CHIPSET_VLSI_VL82C486 }, + { "VLSI SuperCore", MACHINE_CHIPSET_VLSI_SUPERCORE }, + { "VLSI Wildcat", MACHINE_CHIPSET_VLSI_WILDCAT }, { "WD76C10", MACHINE_CHIPSET_WD76C10 } }; @@ -189,7375 +191,7375 @@ const machine_filter_t machine_chipsets[] = { */ const machine_t machines[] = { - // clang-format off + // clang-format off /* 8088 Machines */ { - .name = "[8088] IBM PC (1981)", - .internal_name = "ibmpc", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_ibmpc_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] IBM PC (1981)", + .internal_name = "ibmpc", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_ibmpc_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC5150, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 16, - .max = 64, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 16, + .max = 64, .step = 16 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] IBM PC (1982)", - .internal_name = "ibmpc82", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_ibmpc82_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] IBM PC (1982)", + .internal_name = "ibmpc82", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_ibmpc82_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC5150, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 256, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 256, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] IBM PCjr", - .internal_name = "ibmpcjr", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_pcjr_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] IBM PCjr", + .internal_name = "ibmpcjr", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_pcjr_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 = 4772728, - .max_bus = 4772728, + .cpu = { + .package = CPU_PKG_8088, + .block = CPU_BLOCK_NONE, + .min_bus = 4772728, + .max_bus = 4772728, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCJR, - .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_CARTRIDGE, - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_CARTRIDGE, + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] IBM XT (1982)", - .internal_name = "ibmxt", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_ibmxt_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] IBM XT (1982)", + .internal_name = "ibmxt", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_ibmxt_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 256, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 256, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] IBM XT (1986)", - .internal_name = "ibmxt86", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_ibmxt86_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] IBM XT (1986)", + .internal_name = "ibmxt86", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_ibmxt86_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] American XT Computer", - .internal_name = "americxt", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_americxt_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] American XT Computer", + .internal_name = "americxt", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_americxt_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] AMI XT clone", - .internal_name = "amixt", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_amixt_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] AMI XT clone", + .internal_name = "amixt", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_amixt_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Atari PC 3", - .internal_name = "ataripc3", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_ataripc3_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Atari PC 3", + .internal_name = "ataripc3", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_ataripc3_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FDC, /* Machine has internal video: NSI EVC315-S EGA */ - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_FDC, /* Machine has internal video: NSI EVC315-S EGA */ + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Bondwell BW230", - .internal_name = "bw230", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_bw230_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Bondwell BW230", + .internal_name = "bw230", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_bw230_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Columbia Data Products MPC-1600", - .internal_name = "mpc1600", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_mpc1600_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Columbia Data Products MPC-1600", + .internal_name = "mpc1600", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_mpc1600_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 128, - .max = 512, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 128, + .max = 512, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Compaq Portable", - .internal_name = "portable", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_compaq_portable_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Compaq Portable", + .internal_name = "portable", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_compaq_portable_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_KEYBOARD, - .ram = { - .min = 128, - .max = 640, + .flags = MACHINE_KEYBOARD, + .ram = { + .min = 128, + .max = 640, .step = 128 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] DTK PIM-TB10-Z", - .internal_name = "dtk", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_dtk_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] DTK PIM-TB10-Z", + .internal_name = "dtk", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_dtk_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Eagle PC Spirit", - .internal_name = "pcspirit", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_pcspirit_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Eagle PC Spirit", + .internal_name = "pcspirit", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_pcspirit_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 128, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 128, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Generic XT clone", - .internal_name = "genxt", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_genxt_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Generic XT clone", + .internal_name = "genxt", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_genxt_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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 + .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] GLaBIOS", - .internal_name = "glabios", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_glabios_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] GLaBIOS", + .internal_name = "glabios", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_glabios_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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 + .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] Hyosung Topstar 88T", - .internal_name = "top88", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_top88_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Hyosung Topstar 88T", + .internal_name = "top88", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_top88_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FDC, /* Machine has internal video: Paradise PVC2 */ - .ram = { - .min = 128, - .max = 640, + .flags = MACHINE_FDC, /* Machine has internal video: Paradise PVC2 */ + .ram = { + .min = 128, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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 = &fdc_xt_device, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .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 = &fdc_xt_device, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Hyundai SUPER-16T", - .internal_name = "super16t", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_super16t_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Hyundai SUPER-16T", + .internal_name = "super16t", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_super16t_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 = 4772728, - .max_bus = 8000000, + .cpu = { + .package = CPU_PKG_8088, + .block = CPU_BLOCK_NONE, + .min_bus = 4772728, + .max_bus = 8000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FDC, - .ram = { - .min = 128, - .max = 640, + .flags = MACHINE_FDC, + .ram = { + .min = 128, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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 = &fdc_xt_device, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .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 = &fdc_xt_device, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Hyundai SUPER-16TE", - .internal_name = "super16te", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_super16te_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Hyundai SUPER-16TE", + .internal_name = "super16te", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_super16te_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 = 10000000, + .cpu = { + .package = CPU_PKG_8088, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 10000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FDC, - .ram = { - .min = 128, - .max = 640, + .flags = MACHINE_FDC, + .ram = { + .min = 128, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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 = &fdc_xt_device, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .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 = &fdc_xt_device, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Juko ST", - .internal_name = "jukopc", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_jukopc_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Juko ST", + .internal_name = "jukopc", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_jukopc_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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 = &jukopc_device, - .kbd_device = &keyboard_pc_xt_device, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Kaypro PC", - .internal_name = "kaypropc", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_kaypropc_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Kaypro PC", + .internal_name = "kaypropc", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_kaypropc_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 128, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 128, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Micoms XL-7 Turbo/Pravetz-16ES", - .internal_name = "mxl7t", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_micoms_xl7turbo_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Micoms XL-7 Turbo/Pravetz-16ES", + .internal_name = "mxl7t", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_micoms_xl7turbo_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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 + .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] Multitech PC-500", - .internal_name = "pc500", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_pc500_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Multitech PC-500", + .internal_name = "pc500", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_pc500_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 128, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 128, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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 = &pc500_device, - .kbd_device = &keyboard_pc_xt_device, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_pc_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &pc500_device, + .kbd_device = &keyboard_pc_xt_device, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Multitech PC-500 plus", - .internal_name = "pc500plus", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_pc500plus_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Multitech PC-500 plus", + .internal_name = "pc500plus", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_pc500plus_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 128, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 128, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Multitech PC-700", - .internal_name = "pc700", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_pc700_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Multitech PC-700", + .internal_name = "pc700", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_pc700_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 128, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 128, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] NCR PC4i", - .internal_name = "pc4i", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_pc4i_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] NCR PC4i", + .internal_name = "pc4i", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_pc4i_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 640, .step = 128 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Olivetti M19", - .internal_name = "m19", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_xt_m19_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Olivetti M19", + .internal_name = "m19", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_xt_m19_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 = 4772728, - .max_bus = 7159092, + .cpu = { + .package = CPU_PKG_8088, + .block = CPU_BLOCK_NONE, + .min_bus = 4772728, + .max_bus = 7159092, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD, - .ram = { - .min = 256, - .max = 640, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD, + .ram = { + .min = 256, + .max = 640, .step = 128 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] OpenXT", - .internal_name = "openxt", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_openxt_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] OpenXT", + .internal_name = "openxt", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_openxt_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Philips P3105/NMS9100", - .internal_name = "p3105", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_p3105_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Philips P3105/NMS9100", + .internal_name = "p3105", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_p3105_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_XTA, - .ram = { - .min = 256, - .max = 768, + .flags = MACHINE_XTA, + .ram = { + .min = 256, + .max = 768, .step = 256 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Phoenix XT clone", - .internal_name = "pxxt", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_pxxt_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Phoenix XT clone", + .internal_name = "pxxt", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_pxxt_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Pravetz 16 / IMKO-4", - .internal_name = "pravetz16", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_pravetz16_imko4_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Pravetz 16 / IMKO-4", + .internal_name = "pravetz16", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_pravetz16_imko4_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Pravetz 16S / CPU12 Plus", - .internal_name = "pravetz16s", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_pravetz16s_cpu12p_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Pravetz 16S / CPU12 Plus", + .internal_name = "pravetz16s", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_pravetz16s_cpu12p_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 = 4772728, - .max_bus = 12000000, + .cpu = { + .package = CPU_PKG_8088, + .block = CPU_BLOCK_NONE, + .min_bus = 4772728, + .max_bus = 12000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 512, - .max = 1024, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 512, + .max = 1024, .step = 128 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 640, .step = 128 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Sanyo SX-16", - .internal_name = "sansx16", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_sansx16_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Sanyo SX-16", + .internal_name = "sansx16", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_sansx16_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FDC, - .ram = { - .min = 256, - .max = 640, + .flags = MACHINE_FDC, + .ram = { + .min = 256, + .max = 640, .step = 128 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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 = &fdc_xt_device, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .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 = &fdc_xt_device, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Schneider EuroPC", - .internal_name = "europc", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_europc_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Schneider EuroPC", + .internal_name = "europc", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_europc_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_8088_EUROPC, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_8088_EUROPC, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_XTA | MACHINE_KEYBOARD | MACHINE_MOUSE, /* Machine has internal video: Paradise PVC4 */ - .ram = { - .min = 512, - .max = 640, + .flags = MACHINE_XTA | MACHINE_KEYBOARD | MACHINE_MOUSE, /* Machine has internal video: Paradise PVC4 */ + .ram = { + .min = 512, + .max = 640, .step = 128 }, - .nvrmask = 15, - .jumpered_ecp_dma = 0, + .nvrmask = 15, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Super PC/Turbo XT", - .internal_name = "pcxt", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_pcxt_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Super PC/Turbo XT", + .internal_name = "pcxt", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_pcxt_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Tandy 1000 SX", - .internal_name = "tandy1000sx", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_tandy1000sx_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Tandy 1000 SX", + .internal_name = "tandy1000sx", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_tandy1000sx_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD, - .ram = { - .min = 384, - .max = 640, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD, + .ram = { + .min = 384, + .max = 640, .step = 128 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Tandy 1000 HX", - .internal_name = "tandy1000hx", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_tandy1000hx_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Tandy 1000 HX", + .internal_name = "tandy1000hx", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_tandy1000hx_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD, - .ram = { - .min = 256, - .max = 640, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD, + .ram = { + .min = 256, + .max = 640, .step = 128 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Toshiba T1000", - .internal_name = "t1000", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_xt_t1000_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Toshiba T1000", + .internal_name = "t1000", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_xt_t1000_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO | MACHINE_KEYBOARD, - .ram = { - .min = 512, - .max = 1280, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD, + .ram = { + .min = 512, + .max = 1280, .step = 768 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Vendex HeadStart Turbo 888-XT", - .internal_name = "vendex", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_xt_vendex_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Vendex HeadStart Turbo 888-XT", + .internal_name = "vendex", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_xt_vendex_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FDC, - .ram = { - .min = 256, - .max = 768, + .flags = MACHINE_FDC, + .ram = { + .min = 256, + .max = 768, .step = 256 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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 = &vendex_device, - .kbd_device = &keyboard_pc_xt_device, - .fdc_device = &fdc_xt_device, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_xtclone_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &vendex_device, + .kbd_device = &keyboard_pc_xt_device, + .fdc_device = &fdc_xt_device, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] VTech Laser Turbo XT", - .internal_name = "ltxt", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_laserxt_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] VTech Laser Turbo XT", + .internal_name = "ltxt", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_laserxt_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_8088_VTECH, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_8088_VTECH, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has a standard PS/2 KBC (so, use IBM PS/2 Type 1). */ { - .name = "[8088] Xi8088", - .internal_name = "xi8088", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_xi8088_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Xi8088", + .internal_name = "xi8088", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_xi8088_init, + .p1_handler = machine_generic_p1_handler, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 1024, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 1024, .step = 64 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Z-NIX PC-1600", - .internal_name = "znic", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_znic_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Z-NIX PC-1600", + .internal_name = "znic", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_znic_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Zenith Data Systems Z-151/152/161", - .internal_name = "zdsz151", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_z151_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Zenith Data Systems Z-151/152/161", + .internal_name = "zdsz151", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_z151_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 128, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 128, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Zenith Data Systems Z-159", - .internal_name = "zdsz159", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_z159_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Zenith Data Systems Z-159", + .internal_name = "zdsz159", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_z159_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 128, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 128, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8088] Zenith Data Systems SupersPort (Z-184)", - .internal_name = "zdsupers", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_z184_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8088] Zenith Data Systems SupersPort (Z-184)", + .internal_name = "zdsupers", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_z184_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO_FIXED, - .ram = { - .min = 128, - .max = 640, + .flags = MACHINE_VIDEO_FIXED, + .ram = { + .min = 128, + .max = 640, .step = 128 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[GC100A] Philips P3120", - .internal_name = "p3120", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_GC100A, - .init = machine_xt_p3120_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[GC100A] Philips P3120", + .internal_name = "p3120", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_GC100A, + .init = machine_xt_p3120_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_XTA, - .ram = { - .min = 256, - .max = 768, + .flags = MACHINE_XTA, + .ram = { + .min = 256, + .max = 768, .step = 256 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[V20] PC-XT", - .internal_name = "v20xt", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_v20xt_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[V20] PC-XT", + .internal_name = "v20xt", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_v20xt_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_8088, - .block = CPU_BLOCK(CPU_8088), - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_8088, + .block = CPU_BLOCK(CPU_8088), + .min_bus = 0, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[V20] Tulip PC Compact 2", - .internal_name = "tuliptc8", - .type = MACHINE_TYPE_8088, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_tuliptc8_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[V20] Tulip PC Compact 2", + .internal_name = "tuliptc8", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_tuliptc8_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_8088, - .block = CPU_BLOCK(CPU_8088), - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_8088, + .block = CPU_BLOCK(CPU_8088), + .min_bus = 0, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 64, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 64, + .max = 640, .step = 64 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* 8086 Machines */ { - .name = "[8086] Amstrad PC1512", - .internal_name = "pc1512", - .type = MACHINE_TYPE_8086, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_pc1512_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8086] Amstrad PC1512", + .internal_name = "pc1512", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_pc1512_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 = 8000000, - .max_bus = 8000000, + .cpu = { + .package = CPU_PKG_8086, + .block = CPU_BLOCK_NONE, + .min_bus = 8000000, + .max_bus = 8000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_MOUSE, - .ram = { - .min = 512, - .max = 640, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_MOUSE, + .ram = { + .min = 512, + .max = 640, .step = 128 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8086] Amstrad PC1640", - .internal_name = "pc1640", - .type = MACHINE_TYPE_8086, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_pc1640_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8086] Amstrad PC1640", + .internal_name = "pc1640", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_pc1640_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 = 10000000, + .cpu = { + .package = CPU_PKG_8086, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 10000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MOUSE, - .ram = { - .min = 640, - .max = 640, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MOUSE, + .ram = { + .min = 640, + .max = 640, .step = 640 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8086] Amstrad PC2086", - .internal_name = "pc2086", - .type = MACHINE_TYPE_8086, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_pc2086_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8086] Amstrad PC2086", + .internal_name = "pc2086", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_pc2086_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 = 10000000, + .cpu = { + .package = CPU_PKG_8086, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 10000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_MOUSE, - .ram = { - .min = 640, - .max = 640, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_MOUSE, + .ram = { + .min = 640, + .max = 640, .step = 640 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8086] Amstrad PC3086", - .internal_name = "pc3086", - .type = MACHINE_TYPE_8086, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_pc3086_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8086] Amstrad PC3086", + .internal_name = "pc3086", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_pc3086_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 = 10000000, + .cpu = { + .package = CPU_PKG_8086, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 10000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_XTA | MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_MOUSE, - .ram = { - .min = 640, - .max = 640, + .flags = MACHINE_XTA | MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_MOUSE, + .ram = { + .min = 640, + .max = 640, .step = 640 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC | MACHINE_BUS_PS2, - .flags = MACHINE_XTA, - .ram = { - .min = 512, - .max = 640, + .flags = MACHINE_XTA, + .ram = { + .min = 512, + .max = 640, .step = 128 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .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 + .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 PC20(0)", - .internal_name = "pc200", - .type = MACHINE_TYPE_8086, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_pc200_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8086] Amstrad PC20(0)", + .internal_name = "pc200", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_pc200_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 = 10000000, + .cpu = { + .package = CPU_PKG_8086, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 10000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MOUSE, - .ram = { - .min = 512, - .max = 640, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MOUSE, + .ram = { + .min = 512, + .max = 640, .step = 128 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .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 + .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 PPC512/640", - .internal_name = "ppc512", - .type = MACHINE_TYPE_8086, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_ppc512_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8086] Amstrad PPC512/640", + .internal_name = "ppc512", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_ppc512_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 = 10000000, + .cpu = { + .package = CPU_PKG_8086, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 10000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MOUSE, - .ram = { - .min = 512, - .max = 640, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MOUSE, + .ram = { + .min = 512, + .max = 640, .step = 128 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8086] Compaq Deskpro", - .internal_name = "deskpro", - .type = MACHINE_TYPE_8086, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_xt_compaq_deskpro_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8086] Compaq Deskpro", + .internal_name = "deskpro", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_xt_compaq_deskpro_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 128, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 128, + .max = 640, .step = 128 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8086] Epson Equity LT", - .internal_name = "elt", - .type = MACHINE_TYPE_8086, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_elt_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8086] Epson Equity LT", + .internal_name = "elt", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_elt_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO, - .ram = { - .min = 640, - .max = 640, + .flags = MACHINE_VIDEO, + .ram = { + .min = 640, + .max = 640, .step = 640 }, - .nvrmask = 0x3f, - .jumpered_ecp_dma = 0, + .nvrmask = 0x3f, + .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 + .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 = "[8086] Mazovia 1016", - .internal_name = "maz1016", - .type = MACHINE_TYPE_8086, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_maz1016_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8086] Mazovia 1016", + .internal_name = "maz1016", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_maz1016_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_8086_MAZOVIA, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_8086_MAZOVIA, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 640, .step = 384 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8086] Olivetti M21/24/24SP/AT&T PC 6300", - .internal_name = "m24", - .type = MACHINE_TYPE_8086, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_xt_m24_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8086] Olivetti M21/24/24SP/AT&T PC 6300", + .internal_name = "m24", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_xt_m24_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MOUSE | MACHINE_MFM, - .ram = { - .min = 128, - .max = 640, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MOUSE | MACHINE_MFM, + .ram = { + .min = 128, + .max = 640, .step = 128 }, - .nvrmask = 15, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has Olivetti KBC firmware. */ { - .name = "[8086] Olivetti M240/AT&T PC 6300 WGS", - .internal_name = "m240", - .type = MACHINE_TYPE_8086, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_xt_m240_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8086] Olivetti M240/AT&T PC 6300 WGS", + .internal_name = "m240", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_xt_m240_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_KEYBOARD | MACHINE_MFM, - .ram = { - .min = 128, - .max = 640, + .flags = MACHINE_KEYBOARD | MACHINE_MFM, + .ram = { + .min = 128, + .max = 640, .step = 128 }, - .nvrmask = 15, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8086] Schetmash Iskra-3104", - .internal_name = "iskra3104", - .type = MACHINE_TYPE_8086, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_iskra3104_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8086] Schetmash Iskra-3104", + .internal_name = "iskra3104", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_iskra3104_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 128, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 128, + .max = 640, .step = 128 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8086] Tandy 1000 SL/2", - .internal_name = "tandy1000sl2", - .type = MACHINE_TYPE_8086, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_tandy1000sl2_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8086] Tandy 1000 SL/2", + .internal_name = "tandy1000sl2", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_tandy1000sl2_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD, - .ram = { - .min = 512, - .max = 768, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD, + .ram = { + .min = 512, + .max = 768, .step = 128 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8086] Toshiba T1200", - .internal_name = "t1200", - .type = MACHINE_TYPE_8086, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_xt_t1200_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8086] Toshiba T1200", + .internal_name = "t1200", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_xt_t1200_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MFM, - .ram = { - .min = 1024, - .max = 2048, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MFM, + .ram = { + .min = 1024, + .max = 2048, .step = 1024 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8086] Victor V86P", - .internal_name = "v86p", - .type = MACHINE_TYPE_8086, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_v86p_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8086] Victor V86P", + .internal_name = "v86p", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_v86p_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MFM, - .ram = { - .min = 512, - .max = 1024, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD | MACHINE_MFM, + .ram = { + .min = 512, + .max = 1024, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[8086] VTech Laser XT3", - .internal_name = "lxt3", - .type = MACHINE_TYPE_8086, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_xt_lxt3_init, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[8086] VTech Laser XT3", + .internal_name = "lxt3", + .type = MACHINE_TYPE_8086, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_lxt3_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_8086_VTECH, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_8086_VTECH, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PC, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 512, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 512, + .max = 640, .step = 64 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* 286 AT machines */ /* Has IBM AT KBC firmware. */ { - .name = "[ISA] IBM AT", - .internal_name = "ibmat", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_ibmat_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] IBM AT", + .internal_name = "ibmat", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_ibmat_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 = 8000000, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 6000000, + .max_bus = 8000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 512, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 512, .step = 256 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ { - .name = "[ISA] IBM PS/1 model 2011", - .internal_name = "ibmps1es", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_ps1_m2011_init, - .p1_handler = machine_ps1_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] IBM PS/1 model 2011", + .internal_name = "ibmps1es", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_ps1_m2011_init, + .p1_handler = machine_ps1_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_286, - .block = CPU_BLOCK_NONE, - .min_bus = 10000000, - .max_bus = 10000000, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 10000000, + .max_bus = 10000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_XTA | MACHINE_VIDEO_FIXED, - .ram = { - .min = 512, - .max = 15360, + .flags = MACHINE_XTA | MACHINE_VIDEO_FIXED, + .ram = { + .min = 512, + .max = 15360, .step = 512 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ { - .name = "[ISA] IBM PS/2 model 30-286", - .internal_name = "ibmps2_m30_286", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_ps2_m30_286_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] IBM PS/2 model 30-286", + .internal_name = "ibmps2_m30_286", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_ps2_m30_286_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_286 | CPU_PKG_486SLC_IBM, - .block = CPU_BLOCK_NONE, - .min_bus = 10000000, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_286 | CPU_PKG_486SLC_IBM, + .block = CPU_BLOCK_NONE, + .min_bus = 10000000, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_XTA | MACHINE_VIDEO_FIXED, - .ram = { - .min = 512, - .max = 16384, + .flags = MACHINE_XTA | MACHINE_VIDEO_FIXED, + .ram = { + .min = 512, + .max = 16384, .step = 512 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has IBM AT KBC firmware. */ { - .name = "[ISA] IBM XT Model 286", - .internal_name = "ibmxt286", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_ibmxt286_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] IBM XT Model 286", + .internal_name = "ibmxt286", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_ibmxt286_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 = 6000000, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 6000000, + .max_bus = 6000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 640, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 640, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = &ibmxt286_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Uses Commodore (CBM) KBC firmware, to be implemented as identical to the IBM AT KBC firmware unless evidence emerges of any proprietary commands. */ { - .name = "[ISA] Commodore PC 30 III", - .internal_name = "cmdpc30", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_PROPRIETARY, /* Machine has chipset: Faraday FE3400B */ - .init = machine_at_cmdpc_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] Commodore PC 30 III", + .internal_name = "cmdpc30", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_PROPRIETARY, /* Machine has chipset: Faraday FE3400B */ + .init = machine_at_cmdpc_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 = 12500000, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 6000000, + .max_bus = 12500000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 640, - .max = 14912, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 640, + .max = 14912, .step = 64 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* Uses Compaq KBC firmware. */ { - .name = "[ISA] Compaq Portable II", - .internal_name = "portableii", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_at_portableii_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] Compaq Portable II", + .internal_name = "portableii", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_at_portableii_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 = 16000000, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 6000000, + .max_bus = 16000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_KEYBOARD, - .ram = { - .min = 640, - .max = 16384, + .flags = MACHINE_KEYBOARD, + .ram = { + .min = 640, + .max = 16384, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* Uses Compaq KBC firmware. */ { - .name = "[ISA] Compaq Portable III", - .internal_name = "portableiii", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_at_portableiii_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] Compaq Portable III", + .internal_name = "portableiii", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_at_portableiii_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 = 16000000, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 6000000, + .max_bus = 16000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_KEYBOARD, - .ram = { - .min = 640, - .max = 16384, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_KEYBOARD, + .ram = { + .min = 640, + .max = 16384, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = &compaq_plasma_device, - .snd_device = NULL, - .net_device = NULL + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE /*| MACHINE_VIDEO_FIXED*/ | MACHINE_KEYBOARD, - .ram = { - .min = 1024, - .max = 8192, + .flags = MACHINE_IDE /*| MACHINE_VIDEO_FIXED*/ | MACHINE_KEYBOARD, + .ram = { + .min = 1024, + .max = 8192, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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] Multitech PC-900", - .internal_name = "pc900", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_pc900_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] Multitech PC-900", + .internal_name = "pc900", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_pc900_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 1024, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 1024, .step = 128 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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 + .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", - .internal_name = "mr286", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_mr286_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] MR BIOS 286 clone", + .internal_name = "mr286", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_mr286_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE, - .ram = { - .min = 512, - .max = 16384, + .flags = MACHINE_IDE, + .ram = { + .min = 512, + .max = 16384, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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] NCR PC8/810/710/3390/3392", - .internal_name = "pc8", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_pc8_init, - .p1_handler = machine_ncr_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] NCR PC8/810/710/3390/3392", + .internal_name = "pc8", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_pc8_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 512, - .max = 16384, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 512, + .max = 16384, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = NULL, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has Olivetti KBC firmware. */ { - .name = "[ISA] Olivetti M290/AT&T 6286 WGS", - .internal_name = "m290", - .type = MACHINE_TYPE_286, - .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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] Olivetti M290/AT&T 6286 WGS", + .internal_name = "m290", + .type = MACHINE_TYPE_286, + .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 = 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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 1024, + .max = 16384, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has IBM AT KBC firmware. */ /* To configure the BIOS, use PB_2330a_diag.IMA from MS-DOS 3.30 Packard Bell OEM, GSETUP might work too*/ { - .name = "[ISA] Packard Bell PB286", - .internal_name = "pb286", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_pb286_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] Packard Bell PB286", + .internal_name = "pb286", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_pb286_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 1024, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 1024, .step = 128 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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 + .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] Phoenix AT clone", - .internal_name = "ibmatpx", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_pxat_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] Phoenix AT clone", + .internal_name = "ibmatpx", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_pxat_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 1024, /* assumed; more can be added via memory expansions */ + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 1024, /* assumed; more can be added via memory expansions */ .step = 128 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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 + .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 Quadtel KBC firmware. */ { - .name = "[ISA] Quadtel AT clone", - .internal_name = "ibmatquadtel", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_quadtat_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] Quadtel AT clone", + .internal_name = "ibmatquadtel", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_quadtat_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 1024, /* assumed; more can be added via memory expansions */ + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 1024, /* assumed; more can be added via memory expansions */ .step = 128 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE, - .ram = { - .min = 512, - .max = 16384, + .flags = MACHINE_IDE, + .ram = { + .min = 512, + .max = 16384, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE, - .ram = { - .min = 512, - .max = 16384, + .flags = MACHINE_IDE, + .ram = { + .min = 512, + .max = 16384, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, + .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 + .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 }, /* This has a Siemens proprietary KBC which is completely undocumented. */ { - .name = "[ISA] Siemens PCD-2L", - .internal_name = "siemens", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_siemens_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] Siemens PCD-2L", + .internal_name = "siemens", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_siemens_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 = 12500000, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 6000000, + .max_bus = 12500000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 15872, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 15872, .step = 128 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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 + .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 }, /* This has Toshiba's proprietary KBC, which is already implemented. */ { - .name = "[ISA] Toshiba T3100e", - .internal_name = "t3100e", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_at_t3100e_init, - .p1_handler = machine_t3100e_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] Toshiba T3100e", + .internal_name = "t3100e", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_at_t3100e_init, + .p1_handler = machine_t3100e_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE | MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD, - .ram = { - .min = 1024, - .max = 5120, + .flags = MACHINE_IDE | MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD, + .ram = { + .min = 1024, + .max = 5120, .step = 256 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* AMI BIOS for a chipset-less machine, most likely has AMI 'F' KBC firmware. */ { - .name = "[ISA] Trangg Bow Unknown 286", - .internal_name = "ibmatami", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_tbunk286_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] Trangg Bow Unknown 286", + .internal_name = "ibmatami", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_tbunk286_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 1024, /* assumed; more can be added via memory expansions */ + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 1024, /* assumed; more can be added via memory expansions */ .step = 128 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00003800, + .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 }, /* No proper pictures of the KBC exist, though it seems to have the IBM AT KBC firmware. */ { - .name = "[C&T PC/AT] Dell System 200", - .internal_name = "dells200", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_CT_AT, - .init = machine_at_dells200_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[C&T PC/AT] Dell System 200", + .internal_name = "dells200", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_CT_AT, + .init = machine_at_dells200_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 640, - .max = 16384, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 640, + .max = 16384, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 an Award-branded KBC controller */ { - .name = "[C&T PC/AT] Hyundai Super-286C", - .internal_name = "super286c", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_CT_AT, - .init = machine_at_super286c_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[C&T PC/AT] Hyundai Super-286C", + .internal_name = "super286c", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_CT_AT, + .init = machine_at_super286c_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 512, - .max = 1024, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 512, + .max = 1024, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AWARD | 0x00424600, + .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 }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 640, - .max = 16384, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 640, + .max = 16384, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 640, - .max = 16384, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 640, + .max = 16384, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 512, - .max = 1024, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 512, + .max = 1024, .step = 128 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, - .cpu = { - .package = CPU_PKG_286, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_SOFTFLOAT_ONLY, - .ram = { - .min = 512, - .max = 16384, + .flags = MACHINE_SOFTFLOAT_ONLY, + .ram = { + .min = 512, + .max = 16384, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has AMI 'B' KBC firmware. */ { - .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE, - .ram = { - .min = 512, - .max = 8192, + .flags = MACHINE_IDE, + .ram = { + .min = 512, + .max = 8192, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* 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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 512, - .max = 8192, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 512, + .max = 8192, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, + .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 + .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 }, /* 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_ataripc4_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[NEAT] Atari PC 4", + .internal_name = "ataripc4", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_NEAT, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FDC, /* Machine has video: Paradise PVGA1A */ - .ram = { - .min = 512, - .max = 8192, + .flags = MACHINE_FDC, /* Machine has video: Paradise PVGA1A */ + .ram = { + .min = 512, + .max = 8192, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, - .cpu = { - .package = CPU_PKG_286, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 512, - .max = 8192, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 512, + .max = 8192, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE | MACHINE_VIDEO, - .ram = { - .min = 512, - .max = 5120, + .flags = MACHINE_IDE | MACHINE_VIDEO, + .ram = { + .min = 512, + .max = 5120, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_IDE | MACHINE_VIDEO, + .ram = { + .min = 1024, + .max = 32768, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT | MACHINE_BUS_PS2, - .flags = MACHINE_IDE, - .ram = { - .min = 512, - .max = 16384, + .flags = MACHINE_IDE, + .ram = { + .min = 512, + .max = 16384, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = &f82c710_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has Chips & Technologies KBC firmware. */ { - .name = "[SCAT] GW-286CT GEAR", - .internal_name = "gw286ct", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_SCAT, - .init = machine_at_gw286ct_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SCAT] GW-286CT GEAR", + .internal_name = "gw286ct", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_SCAT, + .init = machine_at_gw286ct_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE, - .ram = { - .min = 512, - .max = 16384, + .flags = MACHINE_IDE, + .ram = { + .min = 512, + .max = 16384, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = &f82c710_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_CHIPS | 0x0000a600, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .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 - 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SCAT] Goldstar GDC-212M", + .internal_name = "gdc212m", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_SCAT, + .init = machine_at_gdc212m_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE, - .ram = { - .min = 512, - .max = 4096, + .flags = MACHINE_IDE, + .ram = { + .min = 512, + .max = 4096, .step = 512 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 VIA VT82C42N KBC. */ { - .name = "[SCAT] Hyundai Solomon 286KP", - .internal_name = "award286", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_SCAT, - .init = machine_at_award286_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SCAT] Hyundai Solomon 286KP", + .internal_name = "award286", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_SCAT, + .init = machine_at_award286_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE, - .ram = { - .min = 640, - .max = 8192, + .flags = MACHINE_IDE, + .ram = { + .min = 640, + .max = 8192, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 a VIA VT82C42N KBC. */ { - .name = "[SCAT] Hyundai Super-286TR", - .internal_name = "super286tr", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_SCAT, - .init = machine_at_super286tr_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SCAT] Hyundai Super-286TR", + .internal_name = "super286tr", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_SCAT, + .init = machine_at_super286tr_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 640, - .max = 8192, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 640, + .max = 8192, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, { - .name = "[SCAT] ICL DRS M35/286", - .internal_name = "drsm35286", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_SCAT, - .init = machine_at_drsm35286_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SCAT] ICL DRS M35/286", + .internal_name = "drsm35286", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_SCAT, + .init = machine_at_drsm35286_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO, /* Machine has Super I/O: C&T F82C711 */ - .ram = { - .min = 512, - .max = 5120, + .flags = MACHINE_IDE | MACHINE_VIDEO, /* Machine has Super I/O: C&T F82C711 */ + .ram = { + .min = 512, + .max = 5120, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = &gd5401_onboard_device, - .snd_device = NULL, - .net_device = NULL + .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 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, + .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, + .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 + .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, + .flags = MACHINE_IDE, /* Has internal video: C&T VGA 411 */ + .ram = { + .min = 512, + .max = 8192, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SCAT] Samsung SPC-4200P", + .internal_name = "spc4200p", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_SCAT, + .init = machine_at_spc4200p_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE, /* Has internal video: C&T VGA 411 */ - .ram = { - .min = 512, - .max = 2048, + .flags = MACHINE_IDE, /* Has internal video: C&T VGA 411 */ + .ram = { + .min = 512, + .max = 2048, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SCAT] Samsung SPC-4216P", + .internal_name = "spc4216p", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_SCAT, + .init = machine_at_spc4216p_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 1024, - .max = 5120, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 1024, + .max = 5120, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SCAT] Samsung SPC-4620P", + .internal_name = "spc4620p", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_SCAT, + .init = machine_at_spc4620p_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO, - .ram = { - .min = 1024, - .max = 5120, + .flags = MACHINE_IDE | MACHINE_VIDEO, + .ram = { + .min = 1024, + .max = 5120, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE, - .ram = { - .min = 512, - .max = 4096, + .flags = MACHINE_IDE, + .ram = { + .min = 512, + .max = 4096, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 + .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 }, /* 286 machines that utilize the MCA bus */ /* Has IBM PS/2 Type 2 KBC firmware. */ { - .name = "[MCA] IBM PS/2 model 50", - .internal_name = "ibmps2_m50", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_ps2_model_50_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[MCA] IBM PS/2 model 50", + .internal_name = "ibmps2_m50", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_ps2_model_50_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_286 | CPU_PKG_486SLC_IBM, - .block = CPU_BLOCK_NONE, - .min_bus = 10000000, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_286 | CPU_PKG_486SLC_IBM, + .block = CPU_BLOCK_NONE, + .min_bus = 10000000, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_MCA, - .flags = MACHINE_VIDEO, - .ram = { - .min = 1024, - .max = 10240, + .flags = MACHINE_VIDEO, + .ram = { + .min = 1024, + .max = 10240, .step = 1024 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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 = &ps2_model_50_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_IBM | KBC_FLAG_IS_TYPE2, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &ps2_model_50_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL }, /* Has IBM PS/2 Type 2 KBC firmware. */ { - .name = "[MCA] IBM PS/2 model 60", - .internal_name = "ibmps2_m60", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_ps2_model_60_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[MCA] IBM PS/2 model 60", + .internal_name = "ibmps2_m60", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_ps2_model_60_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_286 | CPU_PKG_486SLC_IBM, - .block = CPU_BLOCK_NONE, - .min_bus = 10000000, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_286 | CPU_PKG_486SLC_IBM, + .block = CPU_BLOCK_NONE, + .min_bus = 10000000, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_MCA, - .flags = MACHINE_VIDEO, - .ram = { - .min = 1024, - .max = 10240, + .flags = MACHINE_VIDEO, + .ram = { + .min = 1024, + .max = 10240, .step = 1024 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* 386SX machines */ /* ISA slots available because an official IBM expansion for that existed. */ /* Has IBM PS/2 Type 1 KBC firmware. */ { - .name = "[ISA] IBM PS/1 model 2121", - .internal_name = "ibmps1_2121", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_ps1_m2121_init, - .p1_handler = machine_ps1_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] IBM PS/1 model 2121", + .internal_name = "ibmps1_2121", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_ps1_m2121_init, + .p1_handler = machine_ps1_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO, - .ram = { - .min = 2048, - .max = 6144, + .flags = MACHINE_IDE | MACHINE_VIDEO, + .ram = { + .min = 2048, + .max = 6144, .step = 1024 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .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 NCR KBC firmware. */ { - .name = "[ISA] NCR PC916SX", - .internal_name = "pc916sx", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_DISCRETE, /* Machine has chipset: TI TACT82000 */ - .init = machine_at_pc916sx_init, - .p1_handler = machine_ncr_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] NCR PC916SX", + .internal_name = "pc916sx", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_DISCRETE, /* Machine has chipset: TI TACT82000 */ + .init = machine_at_pc916sx_init, + .p1_handler = machine_ncr_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 1024, + .max = 16384, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = NULL, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has Quadtel KBC firmware. */ { - .name = "[ISA] QTC-SXM KT X20T02/HI", - .internal_name = "quadt386sx", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_DISCRETE, /* Machine has chipset: VLSI TOPCAT */ - .init = machine_at_quadt386sx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ISA] QTC-SXM KT X20T02/HI", + .internal_name = "quadt386sx", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_DISCRETE, /* Machine has chipset: VLSI TOPCAT */ + .init = machine_at_quadt386sx_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 1024, + .max = 16384, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Most likely has Phonenix KBC firmware. */ { - .name = "[ACC 2036] Packard Bell Legend 300SX", - .internal_name = "pbl300sx", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_ACC_2036, - .init = machine_at_pbl300sx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ACC 2036] Packard Bell Legend 300SX", + .internal_name = "pbl300sx", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_ACC_2036, + .init = machine_at_pbl300sx_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_IDE | MACHINE_VIDEO, + .ram = { + .min = 1024, + .max = 16384, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, + .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 + .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 }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_IDE, + .ram = { + .min = 1024, + .max = 16384, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_3, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_IDE, + .ram = { + .min = 1024, + .max = 32768, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 KBC. */ - { - .name = "[ALi M1217] Flytech A36", - .internal_name = "flytech386", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_ALI_M1217, - .init = machine_at_flytech386_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_IDE | MACHINE_VIDEO, - .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_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 + .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 JetKey KBC without version, which is a clone of AMI '8'. */ { - .name = "[ALi M1217] Chaintech 3xxAX/AXB", - .internal_name = "325ax", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_ALI_M1217, - .init = machine_at_325ax_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi M1217] Chaintech 3xxAX/AXB", + .internal_name = "325ax", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_ALI_M1217, + .init = machine_at_325ax_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 1024, + .max = 16384, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 = &c325ax_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00003800, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &c325ax_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has a VIA VT82C42N KBC. */ + { + .name = "[ALi M1217] Flytech A36", + .internal_name = "flytech386", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_ALI_M1217, + .init = machine_at_flytech386_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_IDE | MACHINE_VIDEO, + .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_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 }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi M1409] Acer 100T", + .internal_name = "acer100t", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_ALI_M1409, + .init = machine_at_acer100t_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 = 16000000, - .max_bus = 25000000, /* Limited to 25 due a inaccurate cpu speed */ + .cpu = { + .package = CPU_PKG_386SX, + .block = CPU_BLOCK_NONE, + .min_bus = 16000000, + .max_bus = 25000000, /* Limited to 25 due a inaccurate cpu speed */ .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0, + .min_multi = 0, + .max_multi = 0, }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO , /* Machine has internal OTI 077 Video card*/ - .ram = { - .min = 2048, - .max = 16256, + .flags = MACHINE_IDE | MACHINE_VIDEO , /* Machine has internal OTI 077 Video card*/ + .ram = { + .min = 2048, + .max = 16256, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = &oti077_acer100t_device, - .snd_device = NULL, - .net_device = NULL + .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 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. */ { - .name = "[HT18] Arche AMA-932J", - .internal_name = "ama932j", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_HT18, - .init = machine_at_ama932j_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[HT18] Arche AMA-932J", + .internal_name = "ama932j", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_HT18, + .init = machine_at_ama932j_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE | MACHINE_VIDEO, - .ram = { - .min = 512, - .max = 8192, + .flags = MACHINE_IDE | MACHINE_VIDEO, + .ram = { + .min = 512, + .max = 8192, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = &oti067_ama932j_device, - .snd_device = NULL, - .net_device = NULL + .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 }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[Intel 82335] ADI 386SX", + .internal_name = "adi386sx", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_INTEL_82335, + .init = machine_at_adi386sx_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 512, - .max = 8192, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 512, + .max = 8192, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has an AMI Keyboard BIOS PLUS KBC firmware ('8'). */ - { .name = "[Intel 82335] Shuttle 386SX", - .internal_name = "shuttle386sx", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_INTEL_82335, - .init = machine_at_shuttle386sx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + { .name = "[Intel 82335] Shuttle 386SX", + .internal_name = "shuttle386sx", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_INTEL_82335, + .init = machine_at_shuttle386sx_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 512, - .max = 8192, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 512, + .max = 8192, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Uses Commodore (CBM) KBC firmware, to be implemented as identical to the IBM PS/2 Type 1 KBC firmware unless evidence emerges of any proprietary commands. */ { - .name = "[NEAT] Commodore SL386SX-16", - .internal_name = "cmdsl386sx16", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_NEAT, - .init = machine_at_cmdsl386sx16_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[NEAT] Commodore SL386SX-16", + .internal_name = "cmdsl386sx16", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_NEAT, + .init = machine_at_cmdsl386sx16_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE, - .ram = { - .min = 1024, - .max = 8192, + .flags = MACHINE_IDE, + .ram = { + .min = 1024, + .max = 8192, .step = 512 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has IBM AT KBC firmware. */ { - .name = "[NEAT] DTK PM-1630C", - .internal_name = "dtk386", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_NEAT, - .init = machine_at_neat_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[NEAT] DTK PM-1630C", + .internal_name = "dtk386", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_NEAT, + .init = machine_at_neat_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 512, - .max = 8192, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 512, + .max = 8192, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, - { .name = "[NEATsx] OKI if386AX30L", - .internal_name = "if386sx", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_NEAT_SX, - .init = machine_at_if386sx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + { .name = "[NEATsx] OKI if386AX30L", + .internal_name = "if386sx", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_NEAT_SX, + .init = machine_at_if386sx_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_KEYBOARD_JIS | MACHINE_AX, - .ram = { - .min = 1024, - .max = 4096, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_KEYBOARD_JIS | MACHINE_AX, + .ram = { + .min = 1024, + .max = 4096, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has IBM AT KBC firmware. */ { - .name = "[OPTi 291] DTK PPM-3333P", - .internal_name = "awardsx", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_OPTI_291, - .init = machine_at_awardsx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[OPTi 291] DTK PPM-3333P", + .internal_name = "awardsx", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_OPTI_291, + .init = machine_at_awardsx_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 1024, + .max = 16384, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* Uses Commodore (CBM) KBC firmware, to be implemented as identical to the IBM PS/2 Type 1 KBC firmware unless evidence emerges of any proprietary commands. */ { - .name = "[SCAMP] Commodore SL386SX-25", - .internal_name = "cmdsl386sx25", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_VLSI_SCAMP, - .init = machine_at_cmdsl386sx25_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SCAMP] Commodore SL386SX-25", + .internal_name = "cmdsl386sx25", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_VLSI_SCAMP, + .init = machine_at_cmdsl386sx25_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO, - .ram = { - .min = 1024, - .max = 8192, + .flags = MACHINE_IDE | MACHINE_VIDEO, + .ram = { + .min = 1024, + .max = 8192, .step = 512 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* The closest BIOS string I find to this one's, differs only in one part, and ends in -8, so I'm going to assume that this, too, has an AMI '8' (AMI Keyboard BIOS Plus) KBC firmware. */ { - .name = "[SCAMP] DataExpert 386SX", - .internal_name = "dataexpert386sx", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_VLSI_SCAMP, - .init = machine_at_dataexpert386sx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SCAMP] DataExpert 386SX", + .internal_name = "dataexpert386sx", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_VLSI_SCAMP, + .init = machine_at_dataexpert386sx_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 = 10000000, - .max_bus = 25000000, + .cpu = { + .package = CPU_PKG_386SX, + .block = CPU_BLOCK_NONE, + .min_bus = 10000000, + .max_bus = 25000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 1024, + .max = 16384, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* No proper pictures of the KBC exist, though it seems to have the IBM AT KBC firmware. */ { - .name = "[SCAMP] Dell System 333s/L", - .internal_name = "dells333sl", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_VLSI_SCAMP, - .init = machine_at_dells333sl_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SCAMP] Dell System 333s/L", + .internal_name = "dells333sl", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_VLSI_SCAMP, + .init = machine_at_dells333sl_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 = 10000000, - .max_bus = 33333333, + .cpu = { + .package = CPU_PKG_386SX, + .block = CPU_BLOCK_NONE, + .min_bus = 10000000, + .max_bus = 33333333, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_IDE | MACHINE_VIDEO, + .ram = { + .min = 1024, + .max = 16384, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 + .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 }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SCAMP] Samsung SPC-6033P", + .internal_name = "spc6033p", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_VLSI_SCAMP, + .init = machine_at_spc6033p_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO, - .ram = { - .min = 2048, - .max = 12288, + .flags = MACHINE_IDE | MACHINE_VIDEO, + .ram = { + .min = 2048, + .max = 12288, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has an unknown AMI KBC firmware, I'm going to assume 'F' until a photo or real hardware BIOS string is found. */ { - .name = "[SCATsx] Kaimei KMX-C-02", - .internal_name = "kmxc02", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_SCAT_SX, - .init = machine_at_kmxc02_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SCATsx] Kaimei KMX-C-02", + .internal_name = "kmxc02", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_SCAT_SX, + .init = machine_at_kmxc02_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 512, - .max = 16384, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 512, + .max = 16384, .step = 512 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has Quadtel KBC firmware. */ { - .name = "[WD76C10] Amstrad MegaPC", - .internal_name = "megapc", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_WD76C10, - .init = machine_at_wd76c10_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[WD76C10] Amstrad MegaPC", + .internal_name = "megapc", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_WD76C10, + .init = machine_at_wd76c10_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 = 16000000, - .max_bus = 25000000, + .cpu = { + .package = CPU_PKG_386SX, + .block = CPU_BLOCK_NONE, + .min_bus = 16000000, + .max_bus = 25000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_IDE | MACHINE_VIDEO, + .ram = { + .min = 1024, + .max = 32768, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* 386SX machines which utilize the MCA bus */ /* Has IBM PS/2 Type 1 KBC firmware. */ { - .name = "[MCA] IBM PS/2 model 55SX", - .internal_name = "ibmps2_m55sx", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_ps2_model_55sx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[MCA] IBM PS/2 model 55SX", + .internal_name = "ibmps2_m55sx", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_ps2_model_55sx_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_MCA, - .flags = MACHINE_VIDEO, - .ram = { - .min = 1024, - .max = 8192, + .flags = MACHINE_VIDEO, + .ram = { + .min = 1024, + .max = 8192, .step = 1024 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ { - .name = "[MCA] IBM PS/2 model 65SX", - .internal_name = "ibmps2_m65sx", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_ps2_model_65sx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[MCA] IBM PS/2 model 65SX", + .internal_name = "ibmps2_m65sx", + .type = MACHINE_TYPE_386SX, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_ps2_model_65sx_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_MCA, - .flags = MACHINE_VIDEO, - .ram = { - .min = 1024, - .max = 8192, + .flags = MACHINE_VIDEO, + .ram = { + .min = 1024, + .max = 8192, .step = 1024 }, - .nvrmask = 63, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_IBM, - .kbc_p1 = 0x00000cf0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .nvrmask = 63, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_IBM, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_IDE, + .ram = { + .min = 1024, + .max = 32768, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_IDE, + .ram = { + .min = 1024, + .max = 32768, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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. */ { - .name = "[OPTi 283] RYC Leopard LX", - .internal_name = "rycleopardlx", - .type = MACHINE_TYPE_486SLC, - .chipset = MACHINE_CHIPSET_OPTI_283, - .init = machine_at_rycleopardlx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[OPTi 283] RYC Leopard LX", + .internal_name = "rycleopardlx", + .type = MACHINE_TYPE_486SLC, + .chipset = MACHINE_CHIPSET_OPTI_283, + .init = machine_at_rycleopardlx_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_486SLC_IBM, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_486SLC_IBM, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* 386DX machines */ /* Uses Compaq KBC firmware. */ { - .name = "[ISA] Compaq Deskpro 386", - .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, + .name = "[ISA] Compaq Deskpro 386", + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 1024, + .max = 16384, .step = 1024 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .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 = &deskpro386_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_COMPAQ, + .kbc_p1 = 0x000000f4, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &deskpro386_device, + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_KEYBOARD, - .ram = { - .min = 1024, - .max = 14336, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_KEYBOARD, + .ram = { + .min = 1024, + .max = 14336, .step = 1024 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 512, - .max = 8192, + .flags = MACHINE_APM, + .ram = { + .min = 512, + .max = 8192, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 512, - .max = 8192, + .flags = MACHINE_APM, + .ram = { + .min = 512, + .max = 8192, .step = 128 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ACC 2168] Juko AT046DX3", + .internal_name = "acc386", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_ACC_2168, + .init = machine_at_acc386_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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, + .min_multi = 0, + .max_multi = 0, }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 1024, + .max = 32768, .step = 1024, }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, /* TODO: Lance LT38C41. */ + .kbc_params = KBC_VEN_AMI | 0x00004600, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL }, /* Has an AMI Keyboard BIOS PLUS KBC firmware ('8'). */ { - .name = "[C&T 386/AT] ECS 386/32", - .internal_name = "ecs386", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_CT_386, - .init = machine_at_ecs386_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[C&T 386/AT] ECS 386/32", + .internal_name = "ecs386", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_CT_386, + .init = machine_at_ecs386_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 + .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 }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 32768, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* 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 = "[C&T 386/AT] Tandy 4000", - .internal_name = "tandy4000", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_CT_386, - .init = machine_at_tandy4000_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[C&T 386/AT] Tandy 4000", + .internal_name = "tandy4000", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_CT_386, + .init = machine_at_tandy4000_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, .step = 1024 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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 + .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 AMIKey 'F' KBC firmware. */ { - .name = "[OPTi 391] DataExpert 386WB", - .internal_name = "dataexpert386wb", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_OPTI_391, - .init = machine_at_dataexpert386wb_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[OPTi 391] DataExpert 386WB", + .internal_name = "dataexpert386wb", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_OPTI_391, + .init = machine_at_dataexpert386wb_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX, /* Actual machine only supports 386DXes */ - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_386DX, /* Actual machine only supports 386DXes */ + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 1024, + .max = 32768, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 | 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 + .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, + .snd_device = NULL, + .net_device = NULL }, /* The board has a "ASII KB-100" which I was not able to find any information about, but the BIOS sends commands C9 without a parameter and D5, both of which are Phoenix MultiKey commands. */ { - .name = "[OPTi 495SLC] U-Board OPTi 495SLC", - .internal_name = "award495", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_OPTI_495SLC, - .init = machine_at_opti495_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[OPTi 495SLC] U-Board OPTi 495SLC", + .internal_name = "award495", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_OPTI_495SLC, + .init = machine_at_opti495_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX, /* Actual machine only supports 386DXes */ - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_386DX, /* Actual machine only supports 386DXes */ + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 32768, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 Award KBC firmware. */ { - .name = "[SiS 310] ASUS 386/33-64K", - .internal_name = "asus3863364k", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_SIS_310, - .init = machine_at_asus3863364k_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 310] ASUS 386/33-64K", + .internal_name = "asus3863364k", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_SIS_310, + .init = machine_at_asus3863364k_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 AMIKey F KBC firmware. */ { - .name = "[SiS 310] ASUS ISA-386C", - .internal_name = "asus386", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_SIS_310, - .init = machine_at_asus386_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 310] ASUS ISA-386C", + .internal_name = "asus386", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_SIS_310, + .init = machine_at_asus386_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* 386DX machines which utilize the MCA bus */ /* Has IBM PS/2 Type 1 KBC firmware. */ { - .name = "[MCA] IBM PS/2 model 80 (type 2)", - .internal_name = "ibmps2_m80", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_ps2_model_80_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[MCA] IBM PS/2 model 80 (type 2)", + .internal_name = "ibmps2_m80", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_ps2_model_80_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_486BL, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_386DX | CPU_PKG_486BL, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_MCA, - .flags = MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has IBM PS/55 5551-Sxx, Txx stage 2 firmware. */ { - .name = "[MCA] IBM PS/55 model 5550-T", - .internal_name = "ibmps55_m50t", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_ps55_model_50t_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[MCA] IBM PS/55 model 5550-T", + .internal_name = "ibmps55_m50t", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_ps55_model_50t_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_486BL, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_386DX | CPU_PKG_486BL, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_MCA, - .flags = MACHINE_VIDEO | MACHINE_KEYBOARD_JIS | MACHINE_APM, - .ram = { - .min = 2048, - .max = 16384, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD_JIS | MACHINE_APM, + .ram = { + .min = 2048, + .max = 16384, .step = 2048 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has IBM PS/55 5551-V0x, V1x firmware. */ { - .name = "[MCA] IBM PS/55 model 5550-V", - .internal_name = "ibmps55_m50v", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_ps55_model_50v_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[MCA] IBM PS/55 model 5550-V", + .internal_name = "ibmps55_m50v", + .type = MACHINE_TYPE_386DX, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_ps55_model_50v_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_486BL, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_386DX | CPU_PKG_486BL, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_MCA, - .flags = MACHINE_VIDEO | MACHINE_KEYBOARD_JIS | MACHINE_APM, - .ram = { - .min = 4096, - .max = 16384, + .flags = MACHINE_VIDEO | MACHINE_KEYBOARD_JIS | MACHINE_APM, + .ram = { + .min = 4096, + .max = 16384, .step = 4096 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* 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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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", - .internal_name = "c747", - .type = MACHINE_TYPE_386DX_486, - .chipset = MACHINE_CHIPSET_OPTI_495SX, - .init = machine_at_c747_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[OPTi 495SX] CAF Technology C747", + .internal_name = "c747", + .type = MACHINE_TYPE_386DX_486, + .chipset = MACHINE_CHIPSET_OPTI_495SX, + .init = machine_at_c747_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_SOCKET1, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_386DX | 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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM | MACHINE_IDE, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_APM | MACHINE_IDE, + .ram = { + .min = 1024, + .max = 32768, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 + .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' 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX | CPU_PKG_SOCKET1, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_386DX | 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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 32768, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 = &opti495_ami_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004d00, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &opti495_ami_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. */ { - .name = "[MCA] IBM PS/2 model 70 (type 3)", - .internal_name = "ibmps2_m70_type3", - .type = MACHINE_TYPE_386DX_486, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_ps2_model_70_type3_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[MCA] IBM PS/2 model 70 (type 3)", + .internal_name = "ibmps2_m70_type3", + .type = MACHINE_TYPE_386DX_486, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_ps2_model_70_type3_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_486BL | CPU_PKG_SOCKET1, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_386DX | CPU_PKG_486BL | 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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_MCA, - .flags = MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 2048, - .max = 65536, + .flags = MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 2048, + .max = 65536, .step = 2048 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ { - .name = "[MCA] IBM PS/2 model 80 (type 3)", - .internal_name = "ibmps2_m80_type3", - .type = MACHINE_TYPE_386DX_486, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_ps2_model_80_axx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[MCA] IBM PS/2 model 80 (type 3)", + .internal_name = "ibmps2_m80_type3", + .type = MACHINE_TYPE_386DX_486, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_ps2_model_80_axx_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_486BL | CPU_PKG_SOCKET1, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_386DX | CPU_PKG_486BL | 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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_MCA, - .flags = MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 2048, - .max = 65536, + .flags = MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 2048, + .max = 65536, .step = 2048 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* 486 machines - Socket 1 */ /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[CS4031] AMI 486 CS4031", + .internal_name = "cs4031", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_CT_CS4031, + .init = machine_at_cs4031_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 2.0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 1024, + .max = 32768, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 some variant of Phoenix MultiKey/42 as the Intel 8242 chip has a Phoenix copyright. */ { - .name = "[OPTi 498] Mylex MVI486", - .internal_name = "mvi486", - .type = MACHINE_TYPE_486, - .chipset = MACHINE_CHIPSET_OPTI_498, - .init = machine_at_mvi486_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[OPTi 498] Mylex MVI486", + .internal_name = "mvi486", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_OPTI_498, + .init = machine_at_mvi486_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 AMI KF KBC firmware. */ { - .name = "[SiS 401] ASUS ISA-486", - .internal_name = "isa486", - .type = MACHINE_TYPE_486, - .chipset = MACHINE_CHIPSET_SIS_401, - .init = machine_at_isa486_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 401] ASUS ISA-486", + .internal_name = "isa486", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_SIS_401, + .init = machine_at_isa486_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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". Also seen with an AMI 'F'. */ { - .name = "[SiS 401] Chaintech 4xxSX/SC", - .internal_name = "sis401", - .type = MACHINE_TYPE_486, - .chipset = MACHINE_CHIPSET_SIS_401, - .init = machine_at_sis401_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 401] Chaintech 4xxSX/SC", + .internal_name = "sis401", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_SIS_401, + .init = machine_at_sis401_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* Seen with both AMIKey F and AMIKey-2 H KBC firmwares. */ { - .name = "[SiS 460] ABIT AB-AV4", - .internal_name = "av4", - .type = MACHINE_TYPE_486, - .chipset = MACHINE_CHIPSET_SIS_460, - .init = machine_at_av4_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 460] ABIT AB-AV4", + .internal_name = "av4", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_SIS_460, + .init = machine_at_av4_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 Phoenix KBC firmware. */ { - .name = "[SiS 471] AST Advantage! 40xxd", - .internal_name = "advantage40xxd", - .type = MACHINE_TYPE_486, - .chipset = MACHINE_CHIPSET_SIS_471, - .init = machine_at_advantage40xxd_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 471] AST Advantage! 40xxd", + .internal_name = "advantage40xxd", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_SIS_471, + .init = machine_at_advantage40xxd_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, + .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 = 2 + .min_multi = 0, + .max_multi = 2 }, .bus_flags = MACHINE_PS2_VLB, - .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 4096, - .max = 36864, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 4096, + .max = 36864, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = &gd5424_onboard_device, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has AMIKey F KBC firmware. */ { - .name = "[Symphony SL42C460] DTK PKM-0031Y", - .internal_name = "dtk461", - .type = MACHINE_TYPE_486, - .chipset = MACHINE_CHIPSET_SYMPHONY_SL82C460, - .init = machine_at_dtk461_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[Symphony SL42C460] DTK PKM-0031Y", + .internal_name = "dtk461", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_SYMPHONY_SL82C460, + .init = machine_at_dtk461_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 32768, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* 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, @@ -7565,1555 +7567,1555 @@ const machine_t machines[] = { 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 64512, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 64512, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 a VLSI VL82C113A SCAMP Combination I/O which holds the KBC. */ { - .name = "[VLSI 82C480] HP Vectra 486VL", - .internal_name = "vect486vl", - .type = MACHINE_TYPE_486, - .chipset = MACHINE_CHIPSET_VLSI_VL82C480, - .init = machine_at_vect486vl_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VLSI 82C480] HP Vectra 486VL", + .internal_name = "vect486vl", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_VLSI_VL82C480, + .init = machine_at_vect486vl_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 2048, - .max = 32768, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 2048, + .max = 32768, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 + .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 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 2048, - .max = 32768, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 2048, + .max = 32768, .step = 2048 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has a VLSI VL82C113A SCAMP Combination I/O which holds the KBC. */ { - .name = "[VLSI 82C486] Olivetti PCS 44/C", - .internal_name = "pcs44c", - .type = MACHINE_TYPE_486, - .chipset = MACHINE_CHIPSET_VLSI_VL82C486, - .init = machine_at_pcs44c_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VLSI 82C486] Olivetti PCS 44/C", + .internal_name = "pcs44c", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_VLSI_VL82C486, + .init = machine_at_pcs44c_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 1024, - .max = 20480, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 1024, + .max = 20480, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = &oti077_pcs44c_device, - .snd_device = NULL, - .net_device = NULL + .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 = &oti077_pcs44c_device, + .snd_device = NULL, + .net_device = NULL }, /* Has a VLSI VL82C113A SCAMP Combination I/O which holds the KBC. */ { - .name = "[VLSI 82C486] Tulip 486 DC/DT", - .internal_name = "tuliptc38", - .type = MACHINE_TYPE_486, - .chipset = MACHINE_CHIPSET_VLSI_VL82C486, - .init = machine_at_tuliptc38_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VLSI 82C486] Tulip 486 DC/DT", + .internal_name = "tuliptc38", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_VLSI_VL82C486, + .init = machine_at_tuliptc38_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 2048, - .max = 32768, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 2048, + .max = 32768, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = 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 + .kbc_device = NULL, + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 16384, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 16384, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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)", - .internal_name = "ibmps2_m70_type4", - .type = MACHINE_TYPE_486, - .chipset = MACHINE_CHIPSET_PROPRIETARY, - .init = machine_ps2_model_70_type4_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[MCA] IBM PS/2 model 70 (type 4)", + .internal_name = "ibmps2_m70_type4", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_PROPRIETARY, + .init = machine_ps2_model_70_type4_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(CPU_i486SX, CPU_i486SX_SLENH, CPU_Am486SX, CPU_Cx486S), - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_SOCKET1, + .block = CPU_BLOCK(CPU_i486SX, CPU_i486SX_SLENH, CPU_Am486SX, CPU_Cx486S), + .min_bus = 0, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_MCA, - .flags = MACHINE_VIDEO | MACHINE_SOFTFLOAT_ONLY, - .ram = { - .min = 2048, - .max = 65536, + .flags = MACHINE_VIDEO | MACHINE_SOFTFLOAT_ONLY, + .ram = { + .min = 2048, + .max = 65536, .step = 2048 }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, + .nvrmask = 63, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* 486 machines - Socket 2 */ /* 486 machines with just the ISA slot */ /* Uses some variant of Phoenix MultiKey/42 as the BIOS sends keyboard controller command C7 (OR input byte with received data byte). */ { - .name = "[ACC 2168] Packard Bell PB410A", - .internal_name = "pb410a", - .type = MACHINE_TYPE_486_S2, - .chipset = MACHINE_CHIPSET_ACC_2168, - .init = machine_at_pb410a_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ACC 2168] Packard Bell PB410A", + .internal_name = "pb410a", + .type = MACHINE_TYPE_486_S2, + .chipset = MACHINE_CHIPSET_ACC_2168, + .init = machine_at_pb410a_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM | MACHINE_GAMEPORT, - .ram = { - .min = 4096, - .max = 36864, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM | MACHINE_GAMEPORT, + .ram = { + .min = 4096, + .max = 36864, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = &ht216_32_pb410a_device, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Uses an ACER/NEC 90M002A (UPD82C42C, 8042 clone) with unknown firmware (V4.01H). */ { - .name = "[ALi M1429G] Acer A1G", - .internal_name = "acera1g", - .type = MACHINE_TYPE_486_S2, - .chipset = MACHINE_CHIPSET_ALI_M1429G, - .init = machine_at_acera1g_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi M1429G] Acer A1G", + .internal_name = "acera1g", + .type = MACHINE_TYPE_486_S2, + .chipset = MACHINE_CHIPSET_ALI_M1429G, + .init = machine_at_acera1g_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 4096, - .max = 36864, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 4096, + .max = 36864, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = &gd5428_onboard_device, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ { - .name = "[ALi M1429G] Kaimei SA-486 VL-BUS M.B.", - .internal_name = "win486", - .type = MACHINE_TYPE_486_S2, - .chipset = MACHINE_CHIPSET_ALI_M1429G, - .init = machine_at_winbios1429_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi M1429G] Kaimei SA-486 VL-BUS M.B.", + .internal_name = "win486", + .type = MACHINE_TYPE_486_S2, + .chipset = MACHINE_CHIPSET_ALI_M1429G, + .init = machine_at_winbios1429_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 32768, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 32768, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 '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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_SCSI, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_SCSI, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 standalone AMI Megakey 1993, which is type 'P'. */ { - .name = "[IMS 8848] Tekram G486IP", - .internal_name = "g486ip", - .type = MACHINE_TYPE_486_S2, - .chipset = MACHINE_CHIPSET_IMS_8848, - .init = machine_at_g486ip_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[IMS 8848] Tekram G486IP", + .internal_name = "g486ip", + .type = MACHINE_TYPE_486_S2, + .chipset = MACHINE_CHIPSET_IMS_8848, + .init = machine_at_g486ip_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, + .flags = MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3 | CPU_PKG_486BL, - .block = CPU_BLOCK(CPU_P24T), - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_SOCKET3 | CPU_PKG_486BL, + .block = CPU_BLOCK(CPU_P24T), + .min_bus = 0, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_VLB, - .flags = MACHINE_APM | MACHINE_VIDEO | MACHINE_IDE_DUAL, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_APM | MACHINE_VIDEO | MACHINE_IDE_DUAL, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = &gd5428_vlb_onboard_device, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has AMIKey-2 'H' KBC firmware. */ { - .name = "[OPTi 499] Alaris COUGAR 486BL", - .internal_name = "cougar", - .type = MACHINE_TYPE_486_S2, - .chipset = MACHINE_CHIPSET_OPTI_499, - .init = machine_at_cougar_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[OPTi 499] Alaris COUGAR 486BL", + .internal_name = "cougar", + .type = MACHINE_TYPE_486_S2, + .chipset = MACHINE_CHIPSET_OPTI_499, + .init = machine_at_cougar_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3 | CPU_PKG_486BL, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = CPU_PKG_SOCKET3 | CPU_PKG_486BL, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, /* Machine has IDE with controller: Appian ADI/2 */ - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_APM, /* Machine has IDE with controller: Appian ADI/2 */ + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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 = 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 + .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 }, /* Uses an Intel KBC with Phoenix MultiKey KBC firmware. */ { - .name = "[SiS 461] DEC DECpc LPV", - .internal_name = "decpclpv", - .type = MACHINE_TYPE_486_S2, - .chipset = MACHINE_CHIPSET_SIS_461, - .init = machine_at_decpclpv_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 461] DEC DECpc LPV", + .internal_name = "decpclpv", + .type = MACHINE_TYPE_486_S2, + .chipset = MACHINE_CHIPSET_SIS_461, + .init = machine_at_decpclpv_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 1024, + .max = 32768, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = &s3_86c805_onboard_vlb_device, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Uses a ???? KBC. */ { - .name = "[SiS 461] Dell System 4xx/NP", - .internal_name = "dell466np", - .type = MACHINE_TYPE_486_S2, - .chipset = MACHINE_CHIPSET_SIS_461, - .init = machine_at_dell466np_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 461] Dell System 4xx/NP", + .internal_name = "dell466np", + .type = MACHINE_TYPE_486_S2, + .chipset = MACHINE_CHIPSET_SIS_461, + .init = machine_at_dell466np_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 1024, - .max = 32768, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 1024, + .max = 32768, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = 0x00002420, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &gd5428_onboard_vlb_device, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* The BIOS does not send any non-standard keyboard controller commands and wants a PS/2 mouse, so it's an IBM PS/2 KBC (Type 1) firmware. */ { - .name = "[SiS 461] IBM PS/ValuePoint 433DX/Si", - .internal_name = "valuepoint433", - .type = MACHINE_TYPE_486_S2, - .chipset = MACHINE_CHIPSET_SIS_461, - .init = machine_at_valuepoint433_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 461] IBM PS/ValuePoint 433DX/Si", + .internal_name = "valuepoint433", + .type = MACHINE_TYPE_486_S2, + .chipset = MACHINE_CHIPSET_SIS_461, + .init = machine_at_valuepoint433_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has a VLSI VL82C113A SCAMP Combination I/O which holds the KBC. */ { - .name = "[VLSI 82C480] ZEOS Martin", - .internal_name = "martin", - .type = MACHINE_TYPE_486_S2, - .chipset = MACHINE_CHIPSET_VLSI_VL82C480, - .init = machine_at_martin_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VLSI 82C480] ZEOS Martin", + .internal_name = "martin", + .type = MACHINE_TYPE_486_S2, + .chipset = MACHINE_CHIPSET_VLSI_VL82C480, + .init = machine_at_martin_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 2048, - .max = 65536, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 2048, + .max = 65536, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = NULL, + .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 }, /* 486 machines - Socket 3 */ /* 486 machines with just the ISA slot */ /* JETKey V5.0 */ { - .name = "[ALi M1429G] A-Trend ATC-1762", - .internal_name = "atc1762", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_ALI_M1429G, - .init = machine_at_atc1762_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi M1429G] A-Trend ATC-1762", + .internal_name = "atc1762", + .type = MACHINE_TYPE_486_S3, + .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, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 | 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 + .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 }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ { - .name = "[ALi M1429G] ECS AL486", - .internal_name = "ecsal486", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_ALI_M1429G, - .init = machine_at_ecsal486_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi M1429G] ECS AL486", + .internal_name = "ecsal486", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_ALI_M1429G, + .init = machine_at_ecsal486_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 98304, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 98304, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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. 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_AT, - .flags = MACHINE_SUPER_IO | MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_SUPER_IO | MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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_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 + .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 }, /* Has a Fujitsu MBL8042H KBC. */ { - .name = "[Contaq 82C596A] A-Trend 4GPV5", - .internal_name = "4gpv5", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_CONTAQ_82C596, - .init = machine_at_4gpv5_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[Contaq 82C596A] A-Trend 4GPV5", + .internal_name = "4gpv5", + .type = MACHINE_TYPE_486_S3, + .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, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = &j403tg_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &j403tg_device, + .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, + .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, + .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 + .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 = 65536, + .flags = MACHINE_IDE | MACHINE_APM, /* Machine has internal SCSI: Adaptec AIC-6360 */ + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .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, + .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, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .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, + .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, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* 486 machines - Socket 3 PCI */ @@ -9121,224 +9123,224 @@ const machine_t machines[] = { /* Machine with ALi M1429G chipset and M1435 southbridge */ /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCIV, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .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 + .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 }, /* TriGem machine with M1429G and PhoenixBIOS */ { - .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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCIV, - .flags = MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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_TRIGEM | 0x00005a00, - .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 + .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, + .snd_device = NULL, + .net_device = NULL }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ { - .name = "[ALi M1489] AAEON SBC-490", - .internal_name = "sbc490", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_ALI_M1489, - .init = machine_at_sbc490_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi M1489] AAEON SBC-490", + .internal_name = "sbc490", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_ALI_M1489, + .init = machine_at_sbc490_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_0 | MACHINE_DMA_1 | MACHINE_DMA_3, + .nvrmask = 255, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has the ALi M1487/9's on-chip keyboard controller which clones a standard AT KBC. */ { - .name = "[ALi M1489] ABIT AB-PB4", - .internal_name = "abpb4", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_ALI_M1489, - .init = machine_at_abpb4_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi M1489] ABIT AB-PB4", + .internal_name = "abpb4", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_ALI_M1489, + .init = machine_at_abpb4_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCI, /* Machine has a PISA slot */ - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_3, + .nvrmask = 255, + .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 + .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, + .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, + .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 + .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, + .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, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has the ALi M1487/9's on-chip keyboard controller which clones a standard AT KBC. @@ -9346,91 +9348,91 @@ const machine_t machines[] = { and 0xCB if command 0xA1 returns a letter in the 0x5x or 0x7x ranges, so I'm going to give it an AMI 'U' KBC. */ { - .name = "[ALi M1489] AMI WinBIOS 486 PCI", - .internal_name = "win486pci", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_ALI_M1489, - .init = machine_at_win486pci_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi M1489] AMI WinBIOS 486 PCI", + .internal_name = "win486pci", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_ALI_M1489, + .init = machine_at_win486pci_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .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 + .kbc_device = NULL, + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has the ALi M1487/9's on-chip keyboard controller which clones a standard AT KBC. @@ -9438,1467 +9440,1467 @@ const machine_t machines[] = { returns (but only if command 0xA1 is instant response), so said ALi keyboard controller likely returns 'E'. */ { - .name = "[ALi M1489] MSI MS-4145", - .internal_name = "ms4145", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_ALI_M1489, - .init = machine_at_ms4145_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi M1489] MSI MS-4145", + .internal_name = "ms4145", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_ALI_M1489, + .init = machine_at_ms4145_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_PS2_KBC | MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_PS2_KBC | MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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_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 + .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 }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCIV, - .flags = MACHINE_SUPER_IO | MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_SUPER_IO | MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .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, + .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, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCIV, - .flags = MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_PS2_KBC | MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_PS2_KBC | MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* absolutely no KBC info */ { - .name = "[i420EX] ICS SB486P", - .internal_name = "sb486p", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_INTEL_420EX, - .init = machine_at_sb486p_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i420EX] ICS SB486P", + .internal_name = "sb486p", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_INTEL_420EX, + .init = machine_at_sb486p_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_SUPER_IO | MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_SUPER_IO | MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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 }, /* According to another string seen on the UH19 website, this has AMI 'H' KBC. */ { - .name = "[i420TX] AMI Super Voyager PCI", - .internal_name = "amis76", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_INTEL_420TX, - .init = machine_at_amis76_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i420TX] AMI Super Voyager PCI", + .internal_name = "amis76", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_INTEL_420TX, + .init = machine_at_amis76_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, + .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 + .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, + .flags = MACHINE_SUPER_IO | MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_IDE | MACHINE_SCSI | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_IDE | MACHINE_SCSI | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = 0x00000ce0, - .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 + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess. */ + .kbc_p1 = 0x00000ce0, + .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'. Also has a SST 29EE010 Flash chip. */ { - .name = "[i420ZX] ASUS PCI/I-486SP3G", - .internal_name = "486sp3g", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_INTEL_420ZX, - .init = machine_at_486sp3g_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i420ZX] ASUS PCI/I-486SP3G", + .internal_name = "486sp3g", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_INTEL_420ZX, + .init = machine_at_486sp3g_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE | MACHINE_SCSI | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_IDE | MACHINE_SCSI | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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 = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .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 AMI MEGAKey 'P' or 'R' keyboard controller. */ { - .name = "[i420ZX] ICS SB486PV", - .internal_name = "sb486pv", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_INTEL_420ZX, - .init = machine_at_sb486pv_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i420ZX] ICS SB486PV", + .internal_name = "sb486pv", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_INTEL_420ZX, + .init = machine_at_sb486pv_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, + .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 + .min_multi = 0, + .max_multi = 0 }, /* Has PCI but no user-facing slots. */ .bus_flags = MACHINE_PCI, - .flags = MACHINE_PS2_KBC | MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM | MACHINE_PCI_INTERNAL, - .ram = { - .min = 2048, - .max = 65536, + .flags = MACHINE_PS2_KBC | MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM | MACHINE_PCI_INTERNAL, + .ram = { + .min = 2048, + .max = 65536, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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 | 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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* This most likely has a standalone AMI Megakey 1993, which is type 'P', like the below Tekram board. */ { - .name = "[IMS 8848] J-Bond PCI400C-B", - .internal_name = "pci400cb", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_IMS_8848, - .init = machine_at_pci400cb_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[IMS 8848] J-Bond PCI400C-B", + .internal_name = "pci400cb", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_IMS_8848, + .init = machine_at_pci400cb_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCIV, - .flags = MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, + .flags = MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = 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 + .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 IBM PS/2 Type 1 KBC firmware. */ { - .name = "[OPTi 802G] IBM PC 330 (type 6573)", - .internal_name = "pc330_6573", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_OPTI_895_802G, - .init = machine_at_pc330_6573_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[OPTi 802G] IBM PC 330 (type 6573)", + .internal_name = "pc330_6573", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_OPTI_895_802G, + .init = machine_at_pc330_6573_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3_PC330, - .block = CPU_BLOCK_NONE, - .min_bus = 25000000, - .max_bus = 33333333, + .cpu = { + .package = CPU_PKG_SOCKET3_PC330, + .block = CPU_BLOCK_NONE, + .min_bus = 25000000, + .max_bus = 33333333, .min_voltage = 0, .max_voltage = 0, - .min_multi = 2.0, - .max_multi = 3.0 + .min_multi = 2.0, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .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 = &pc330_6573_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &gd5430_onboard_vlb_device, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &pc330_6573_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &gd5430_onboard_vlb_device, + .snd_device = NULL, + .net_device = NULL }, /* has a Phoenix PLCC Multikey copyrighted 1993, version unknown. */ { - .name = "[OPTi 895] Packard Bell PB450", - .internal_name = "pb450", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_OPTI_895_802G, - .init = machine_at_pb450_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[OPTi 895] Packard Bell PB450", + .internal_name = "pb450", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_OPTI_895_802G, + .init = machine_at_pb450_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_SUPER_IO | MACHINE_IDE_DUAL | MACHINE_VIDEO, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_SUPER_IO | MACHINE_IDE_DUAL | MACHINE_VIDEO, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO, - .ram = { - .min = 2048, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO, + .ram = { + .min = 2048, + .max = 131072, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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_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 + .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 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCIV, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 261120, + .flags = 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, + .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, - .snd_device = NULL, - .net_device = NULL + .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'. */ { - .name = "[SiS 496] Lucky Star LS-486E", - .internal_name = "ls486e", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_SIS_496, - .init = machine_at_ls486e_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 496] Lucky Star LS-486E", + .internal_name = "ls486e", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_SIS_496, + .init = machine_at_ls486e_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_PS2_KBC | MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_PS2_KBC | MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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, - .snd_device = NULL, - .net_device = NULL + .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 a VIA VT82C42N KBC. */ { - .name = "[SiS 496] Micronics M4Li", - .internal_name = "m4li", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_SIS_496, - .init = machine_at_m4li_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 496] Micronics M4Li", + .internal_name = "m4li", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_SIS_496, + .init = machine_at_m4li_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = 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, + .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_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 + .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 }, /* AMIKEY-2 */ { - .name = "[SiS 496] MSI MS-4144", - .internal_name = "ms4144", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_SIS_496, - .init = machine_at_ms4144_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 496] MSI MS-4144", + .internal_name = "ms4144", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_SIS_496, + .init = machine_at_ms4144_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_SUPER_IO | MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 5120, /* Hack: machine seems to break with less than 5 MBs of RAM */ - .max = 131072, + .flags = MACHINE_SUPER_IO | MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 5120, /* Hack: machine seems to break with less than 5 MBs of RAM */ + .max = 131072, .step = 1024 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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 = 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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_PS2_KBC | MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 261120, + .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, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCIV, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 2048, - .max = 261120, + .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, + .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 + .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, + .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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT, - .ram = { - .min = 2048, - .max = 261120, + .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, + .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, - .snd_device = NULL, - .net_device = NULL + .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 UMC 88xx on-chip KBC. */ { - .name = "[UMC 8881] A-Trend ATC-1415", - .internal_name = "atc1415", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_UMC_UM8881, - .init = machine_at_atc1415_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[UMC 8881] A-Trend ATC-1415", + .internal_name = "atc1415", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_UMC_UM8881, + .init = machine_at_atc1415_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* This has the UMC 88xx on-chip KBC. All the copies of the BIOS string I can find, end in in -H, so the UMC on-chip KBC likely emulates the AMI 'H' KBC firmware. */ { - .name = "[UMC 8881] Biostar MB-84xxUUD-A", - .internal_name = "84xxuuda", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_UMC_UM8881, - .init = machine_at_84xxuuda_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[UMC 8881] Biostar MB-84xxUUD-A", + .internal_name = "84xxuuda", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_UMC_UM8881, + .init = machine_at_84xxuuda_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .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 + .kbc_device = NULL, + .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, + .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, + .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 + .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, + .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, + .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 + .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", - .internal_name = "ecs486", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_UMC_UM8881, - .init = machine_at_ecs486_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[UMC 8881] ECS Elite UM8810P-AIO", + .internal_name = "ecs486", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_UMC_UM8881, + .init = machine_at_ecs486_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_PS2_KBC | MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_PS2_KBC | MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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, - .snd_device = NULL, - .net_device = NULL + .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 AMIKey Z(!) KBC firmware. */ { - .name = "[UMC 8881] Epson ActionPC 2600", - .internal_name = "actionpc2600", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_UMC_UM8881, - .init = machine_at_actionpc2600_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[UMC 8881] Epson ActionPC 2600", + .internal_name = "actionpc2600", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_UMC_UM8881, + .init = machine_at_actionpc2600_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO, - .ram = { - .min = 1024, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO, + .ram = { + .min = 1024, + .max = 262144, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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_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, - .snd_device = NULL, - .net_device = NULL + .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 = &tgui9440_onboard_pci_device, + .snd_device = NULL, + .net_device = NULL }, /* This has the UMC 88xx on-chip KBC. All the copies of the BIOS string I can find, end in in -H, so the UMC on-chip KBC likely emulates the AMI 'H' KBC firmware. */ { - .name = "[UMC 8881] Epson ActionTower 8400", - .internal_name = "actiontower8400", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_UMC_UM8881, - .init = machine_at_actiontower8400_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[UMC 8881] Epson ActionTower 8400", + .internal_name = "actiontower8400", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_UMC_UM8881, + .init = machine_at_actiontower8400_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_SUPER_IO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO, - .ram = { - .min = 1024, - .max = 262144, + .flags = MACHINE_SUPER_IO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO, + .ram = { + .min = 1024, + .max = 262144, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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_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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* This has the UMC 88xx on-chip KBC. All the copies of the BIOS string I can find, end in in -H, so the UMC on-chip KBC likely emulates the AMI 'H' KBC firmware. */ { - .name = "[UMC 8881] PCChips M919", - .internal_name = "m919", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_UMC_UM8881, - .init = machine_at_m919_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[UMC 8881] PCChips M919", + .internal_name = "m919", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_UMC_UM8881, + .init = machine_at_m919_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PCIV, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .nvrmask = 255, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has IBM PS/2 Type 1 KBC firmware. Uses a mysterious I/O port C05. */ { - .name = "[UMC 8881] Samsung SPC7700P-LW", - .internal_name = "spc7700plw", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_UMC_UM8881, - .init = machine_at_spc7700plw_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[UMC 8881] Samsung SPC7700P-LW", + .internal_name = "spc7700plw", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_UMC_UM8881, + .init = machine_at_spc7700plw_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .nvrmask = 255, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* This has a Holtek KBC. */ { - .name = "[UMC 8881] Shuttle HOT-433A", - .internal_name = "hot433a", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_UMC_UM8881, - .init = machine_at_hot433a_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[UMC 8881] Shuttle HOT-433A", + .internal_name = "hot433a", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_UMC_UM8881, + .init = machine_at_hot433a_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 262144, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .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 + .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 }, /* Has a VIA VT82C406 KBC+RTC that likely has identical commands to the VT82C42N. */ { - .name = "[VIA VT82C496G] DFI G486VPA", - .internal_name = "g486vpa", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_VIA_VT82C496G, - .init = machine_at_g486vpa_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA VT82C496G] DFI G486VPA", + .internal_name = "g486vpa", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_VIA_VT82C496G, + .init = machine_at_g486vpa_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCIV, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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 = NULL, - .snd_device = NULL, - .net_device = NULL + .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 }, /* Has a VIA VT82C42N KBC. */ { - .name = "[VIA VT82C496G] FIC VIP-IO2", - .internal_name = "486vipio2", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_VIA_VT82C496G, - .init = machine_at_486vipio2_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA VT82C496G] FIC VIP-IO2", + .internal_name = "486vipio2", + .type = MACHINE_TYPE_486_S3_PCI, + .chipset = MACHINE_CHIPSET_VIA_VT82C496G, + .init = machine_at_486vipio2_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, + .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 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCIV, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT, - .ram = { - .min = 1024, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT, + .ram = { + .min = 1024, + .max = 131072, .step = 1024 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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 = NULL, - .snd_device = NULL, - .net_device = NULL + .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 }, /* 486 machines - Miscellaneous */ @@ -10906,319 +10908,319 @@ const machine_t machines[] = { /* Has a Winbond W83977F Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[STPC Client] ITOX STAR", - .internal_name = "itoxstar", - .type = MACHINE_TYPE_486_MISC, - .chipset = MACHINE_CHIPSET_STPC_CLIENT, - .init = machine_at_itoxstar_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[STPC Client] ITOX STAR", + .internal_name = "itoxstar", + .type = MACHINE_TYPE_486_MISC, + .chipset = MACHINE_CHIPSET_STPC_CLIENT, + .init = machine_at_itoxstar_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_STPC, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 75000000, + .cpu = { + .package = CPU_PKG_STPC, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 75000000, .min_voltage = 0, .max_voltage = 0, - .min_multi = 1.0, - .max_multi = 1.0 + .min_multi = 1.0, + .max_multi = 1.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, /* Machine has internal video: ST STPC Atlas */ - .ram = { - .min = 8192, - .max = 131072, + .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, + .nvrmask = 255, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .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 + .kbc_device = NULL, + .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 }, /* Has a Winbond W83977F Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[STPC Consumer-II] Acrosser AR-B1423C", - .internal_name = "arb1423c", - .type = MACHINE_TYPE_486_MISC, - .chipset = MACHINE_CHIPSET_STPC_CONSUMER_II, - .init = machine_at_arb1423c_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[STPC Consumer-II] Acrosser AR-B1423C", + .internal_name = "arb1423c", + .type = MACHINE_TYPE_486_MISC, + .chipset = MACHINE_CHIPSET_STPC_CONSUMER_II, + .init = machine_at_arb1423c_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_STPC, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_STPC, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 66666667, .min_voltage = 0, .max_voltage = 0, - .min_multi = 2.0, - .max_multi = 2.0 + .min_multi = 2.0, + .max_multi = 2.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_PCI_INTERNAL, /* Machine has internal video: ST STPC Atlas */ - .ram = { - .min = 32768, - .max = 163840, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_PCI_INTERNAL, /* Machine has internal video: ST STPC Atlas */ + .ram = { + .min = 32768, + .max = 163840, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .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 + .kbc_device = NULL, + .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 }, /* Has a Winbond W83977F Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[STPC Consumer-II] Acrosser AR-B1479", - .internal_name = "arb1479", - .type = MACHINE_TYPE_486_MISC, - .chipset = MACHINE_CHIPSET_STPC_CONSUMER_II, - .init = machine_at_arb1479_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[STPC Consumer-II] Acrosser AR-B1479", + .internal_name = "arb1479", + .type = MACHINE_TYPE_486_MISC, + .chipset = MACHINE_CHIPSET_STPC_CONSUMER_II, + .init = machine_at_arb1479_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_STPC, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_STPC, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 66666667, .min_voltage = 0, .max_voltage = 0, - .min_multi = 2.0, - .max_multi = 2.0 + .min_multi = 2.0, + .max_multi = 2.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_PCI_INTERNAL | MACHINE_USB, /* Machine has internal video: ST STPC Atlas */ - .ram = { - .min = 32768, - .max = 163840, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_PCI_INTERNAL | MACHINE_USB, /* Machine has internal video: ST STPC Atlas */ + .ram = { + .min = 32768, + .max = 163840, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .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 + .kbc_device = NULL, + .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 }, /* Has a Winbond W83977F Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[STPC Consumer-II] Lanner Electronics IAC-H488", - .internal_name = "iach488", - .type = MACHINE_TYPE_486_MISC, - .chipset = MACHINE_CHIPSET_STPC_CONSUMER_II, - .init = machine_at_iach488_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[STPC Consumer-II] Lanner Electronics IAC-H488", + .internal_name = "iach488", + .type = MACHINE_TYPE_486_MISC, + .chipset = MACHINE_CHIPSET_STPC_CONSUMER_II, + .init = machine_at_iach488_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_STPC, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_STPC, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 66666667, .min_voltage = 0, .max_voltage = 0, - .min_multi = 2.0, - .max_multi = 2.0 + .min_multi = 2.0, + .max_multi = 2.0 }, .bus_flags = MACHINE_PS2, - .flags = MACHINE_IDE | MACHINE_APM | MACHINE_PCI_INTERNAL, /* Machine has internal video: ST STPC Atlas and NIC: Realtek RTL8139C+ */ - .ram = { - .min = 32768, - .max = 131072, + .flags = MACHINE_IDE | MACHINE_APM | MACHINE_PCI_INTERNAL, /* Machine has internal video: ST STPC Atlas and NIC: Realtek RTL8139C+ */ + .ram = { + .min = 32768, + .max = 131072, .step = 32768 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .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 + .kbc_device = NULL, + .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 }, /* Has a Winbond W83977F Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[STPC Elite] Advantech PCM-9340", - .internal_name = "pcm9340", - .type = MACHINE_TYPE_486_MISC, - .chipset = MACHINE_CHIPSET_STPC_ELITE, - .init = machine_at_pcm9340_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[STPC Elite] Advantech PCM-9340", + .internal_name = "pcm9340", + .type = MACHINE_TYPE_486_MISC, + .chipset = MACHINE_CHIPSET_STPC_ELITE, + .init = machine_at_pcm9340_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_STPC, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_STPC, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 66666667, .min_voltage = 0, .max_voltage = 0, - .min_multi = 2.0, - .max_multi = 2.0 + .min_multi = 2.0, + .max_multi = 2.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_PCI_INTERNAL, /* Machine has internal video: SMI LynxEM+ 712 */ - .ram = { - .min = 32768, - .max = 98304, + .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, + .nvrmask = 255, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .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 + .kbc_device = NULL, + .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 }, /* Has a Winbond W83977F Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[STPC Atlas] AAEON PCM-5330", - .internal_name = "pcm5330", - .type = MACHINE_TYPE_486_MISC, - .chipset = MACHINE_CHIPSET_STPC_ATLAS, - .init = machine_at_pcm5330_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[STPC Atlas] AAEON PCM-5330", + .internal_name = "pcm5330", + .type = MACHINE_TYPE_486_MISC, + .chipset = MACHINE_CHIPSET_STPC_ATLAS, + .init = machine_at_pcm5330_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_STPC, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_STPC, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 66666667, .min_voltage = 0, .max_voltage = 0, - .min_multi = 2.0, - .max_multi = 2.0 + .min_multi = 2.0, + .max_multi = 2.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_PCI_INTERNAL, /* Machine has internal video: ST STPC Atlas */ - .ram = { - .min = 32768, - .max = 131072, + .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, + .nvrmask = 255, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .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 + .kbc_device = NULL, + .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 }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430LX] Acer V12P", + .internal_name = "v12p", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_INTEL_430LX, + .init = machine_at_v12p_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, + .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 + .min_multi = MACHINE_MULTIPLIER_FIXED, + .max_multi = MACHINE_MULTIPLIER_FIXED }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 2048, - .max = 196608, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 2048, + .max = 196608, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 + .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 }, /* Has AMIKey H KBC firmware (AMIKey-2), per POST screen with BIOS string shown in the manual. Has PS/2 mouse support with serial-style (DB9) @@ -11226,389 +11228,1739 @@ const machine_t machines[] = { The boot block for BIOS recovery requires an unknown bit on port 805h to be clear. */ { - .name = "[i430LX] AMI Excalibur PCI Pentium", - .internal_name = "excaliburpci", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_excaliburpci_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430LX] AMI Excalibur PCI Pentium", + .internal_name = "excaliburpci", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_INTEL_430LX, + .init = machine_at_excaliburpci_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, + .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 + .min_multi = MACHINE_MULTIPLIER_FIXED, + .max_multi = MACHINE_MULTIPLIER_FIXED }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE | MACHINE_APM, /* Machine has internal SCSI */ - .ram = { - .min = 2048, - .max = 131072, + .flags = MACHINE_IDE | MACHINE_APM, /* Machine has internal SCSI */ + .ram = { + .min = 2048, + .max = 131072, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 AMIKey F KBC firmware (AMIKey). */ { - .name = "[i430LX] ASUS P/I-P5MP3", - .internal_name = "p5mp3", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_p5mp3_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430LX] ASUS P/I-P5MP3", + .internal_name = "p5mp3", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_INTEL_430LX, + .init = machine_at_p5mp3_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, + .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 + .min_multi = MACHINE_MULTIPLIER_FIXED, + .max_multi = MACHINE_MULTIPLIER_FIXED }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_PS2_KBC | MACHINE_APM, - .ram = { - .min = 2048, - .max = 196608, + .flags = MACHINE_PS2_KBC | MACHINE_APM, + .ram = { + .min = 2048, + .max = 196608, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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. */ { - .name = "[i430LX] Dell OptiPlex 560/L", - .internal_name = "opti560l", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_opti560l_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430LX] Dell OptiPlex 560/L", + .internal_name = "opti560l", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_INTEL_430LX, + .init = machine_at_opti560l_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, + .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 + .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, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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. */ { - .name = "[i430LX] Gigabyte GA-586IS", - .internal_name = "586is", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_586is_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430LX] Gigabyte GA-586IS", + .internal_name = "586is", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_INTEL_430LX, + .init = machine_at_586is_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, + .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 + .min_multi = MACHINE_MULTIPLIER_FIXED, + .max_multi = MACHINE_MULTIPLIER_FIXED }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, + .flags = MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 IBM PS/2 Type 1 KBC firmware. */ { - .name = "[i430LX] IBM PS/ValuePoint P60", - .internal_name = "valuepointp60", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_valuepointp60_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430LX] IBM PS/ValuePoint P60", + .internal_name = "valuepointp60", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_INTEL_430LX, + .init = machine_at_valuepointp60_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, + .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 + .min_multi = MACHINE_MULTIPLIER_FIXED, + .max_multi = MACHINE_MULTIPLIER_FIXED }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_VIDEO_8514A | MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_VIDEO_8514A | MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_3, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* This has the Phoenix MultiKey KBC firmware. */ { - .name = "[i430LX] Intel Premiere/PCI (Batman)", - .internal_name = "batman", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_batman_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430LX] Intel Premiere/PCI (Batman)", + .internal_name = "batman", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_INTEL_430LX, + .init = machine_at_batman_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, + .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 + .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, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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 | 0x00012900, - .kbc_p1 = 0x00001030, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = &batman_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, + .kbc_p1 = 0x00001030, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &batman_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. */ { - .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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = MACHINE_MULTIPLIER_FIXED, + .max_multi = MACHINE_MULTIPLIER_FIXED }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_3, + .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 + .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 }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430LX] Micronics M5Pi", + .internal_name = "m5pi", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_INTEL_430LX, + .init = machine_at_m5pi_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, + .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 + .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, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, .step = 2048 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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 | 0x00012900, /* 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 + .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, + .snd_device = NULL, + .net_device = NULL }, /* This has the Phoenix MultiKey KBC firmware. */ { - .name = "[i430LX] Packard Bell PB520R", - .internal_name = "pb520r", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_pb520r_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430LX] Packard Bell PB520R", + .internal_name = "pb520r", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_INTEL_430LX, + .init = machine_at_pb520r_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, + .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 + .min_multi = MACHINE_MULTIPLIER_FIXED, + .max_multi = MACHINE_MULTIPLIER_FIXED }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 8192, - .max = 139264, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 8192, + .max = 139264, .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 = &gd5434_onboard_pci_device, + .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 + 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] AMI Excalibur VLB", + .internal_name = "excalibur", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_OPTI_547_597, + .init = machine_at_excalibur_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 = 60000000, + .min_voltage = 5000, + .max_voltage = 5000, + .min_multi = MACHINE_MULTIPLIER_FIXED, + .max_multi = MACHINE_MULTIPLIER_FIXED + }, + .bus_flags = MACHINE_PS2_VLB, + .flags = MACHINE_IDE | 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, + .snd_device = NULL, + .net_device = NULL + }, + + /* OPTi 596/597/822 */ + /* Has a VIA VT82C42N KBC with AMI 'F' firmware */ + { + .name = "[OPTi 597] AT&T Globalyst 330 (Pentium)", + .internal_name = "globalyst330_p5", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_OPTI_547_597, + .init = machine_at_globalyst330_p5_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_PCIV, + .flags = MACHINE_APM, + .ram = { + .min = 8192, + .max = 65536, + .step = 8192 + }, + .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 + }, + /* This has AMIKey 'F' KBC firmware. */ + { + .name = "[OPTi 597] Supermicro P5VL-PCI", + .internal_name = "p5vl", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_OPTI_547_597, + .init = machine_at_p5vl_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_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 = 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 + }, + + /* SiS 50x */ + /* This has some form of AMI MegaKey as it uses keyboard controller command 0xCC. */ + { + .name = "[SiS 501] AMI Excalibur PCI-II Pentium ISA", + .internal_name = "excaliburpci2", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_SIS_501, + .init = machine_at_excaliburpci2_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_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, + .step = 8192 + }, + .nvrmask = 127, + .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 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 = 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_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, + .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 = 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 type 'H'. */ + { + .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_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_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, + .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 = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + + /* Socket 4/5 machines */ + /* OPTi 596/597 */ + /* This has AMIKey-2 'H' KBC firmware. */ + { + .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_SOCKET4 | CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 3520, + .max_voltage = 5000, + .min_multi = 1.0, + .max_multi = 1.5 + }, + .bus_flags = MACHINE_PCI, + .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 = 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 + }, + /* VLSI SuperCore */ + /* This has Phoenix KBC firmware. */ + { + .name = "[VLSI SuperCore] DEC Celebris 5xx", + .internal_name = "celebris5xx", + .type = MACHINE_TYPE_SOCKET4_5, + .chipset = MACHINE_CHIPSET_VLSI_SUPERCORE, + .init = machine_at_celebris5xx_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET4 | CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_Cx6x86), + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 3520, + .max_voltage = 5000, + .min_multi = 1.0, + .max_multi = 2.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO, + .ram = { + .min = 4096, + .max = 131072, + .step = 4096 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 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 = &s3_phoenix_vision864_pci_device, + .snd_device = NULL, + .net_device = NULL + }, + + /* Socket 5 machines */ + /* 430NX */ + /* Has AMI 'H' KBC firmware. */ + { + .name = "[i430NX] ASUS PCI/I-P54NP4", + .internal_name = "p54np4", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430NX, + .init = machine_at_p54np4_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 = 3520, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 1.5 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE /*| MACHINE_SCSI */ | MACHINE_APM, + .ram = { + .min = 2048, + .max = 524288, + .step = 2048 + }, + .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 = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has AMI 'H' KBC firmware. */ + { + .name = "[i430NX] Gigabyte GA-586IP", + .internal_name = "586ip", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430NX, + .init = machine_at_586ip_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 = 3520, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 1.5 + }, + .bus_flags = MACHINE_PCI, + .flags = MACHINE_APM, + .ram = { + .min = 2048, + .max = 262144, + .step = 2048 + }, + .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 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 = 0x00001030, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &plato_device, + .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, + .snd_device = NULL, + .net_device = NULL + }, + /* Has AMI MegaKey KBC firmware. */ + { + .name = "[i430NX] Teknor TEK-932", + .internal_name = "tek932", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430NX, + .init = machine_at_tek932_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 = 3520, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 1.5 + }, + .bus_flags = MACHINE_PCI, + .flags = MACHINE_PS2_KBC | MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 2048, + .max = 262144, + .step = 2048 + }, + .nvrmask = 127, + .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, + .snd_device = NULL, + .net_device = NULL + }, + + /* 430FX */ + /* Uses an ACER/NEC 90M002A (UPD82C42C, 8042 clone) with unknown firmware (V5.0). */ + { + .name = "[i430FX] Acer V30", + .internal_name = "acerv30", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_acerv30_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_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, + .snd_device = NULL, + .net_device = NULL + }, + /* Has AMIKey F KBC firmware. */ + { + .name = "[i430FX] AMI Apollo", + .internal_name = "apollo", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_apollo_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_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 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 = 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_Cx6x86), + .min_bus = 60000000, + .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_VIDEO | MACHINE_SOUND | MACHINE_APM, /* Video: S3 Trio64V+ (86C765), Sound: Creative ViBRA 16S (CT2504), Network: 3Com ETHERLINK III (3C509B) */ + .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 = 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 (Zappa)", + .internal_name = "zappa", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_zappa_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 = 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 = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | 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 = NULL, + .net_device = NULL + }, + /* The BIOS sends KBC command B3 which indicates an AMI (or VIA VT82C42N) KBC. */ + { + .name = "[i430FX] NEC PowerMate Vxxx", + .internal_name = "powermatev", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_powermatev_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 + }, + /* Has AMIKey Z(!) KBC firmware. */ + { + .name = "[i430FX] TriGem Hawk", + .internal_name = "hawk", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_hawk_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_AMI_TRIGEM | KBC_FLAG_IS_GREEN | 0x00005a00, + .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 + }, + + /* OPTi 596/597 */ + /* 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 = 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_PS2_PCIV, + .flags = MACHINE_APM | MACHINE_IDE_DUAL | MACHINE_SUPER_IO, + .ram = { + .min = 8192, + .max = 131072, + .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 | 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_PS2_KBC | 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, + .snd_device = NULL, + .net_device = NULL + }, + + /* SiS 85C50x */ + /* 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 = 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 = 40000000, + .max_bus = 66666667, + .min_voltage = 3380, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 1.5 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | 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 = 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 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 = 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_PENTIUMMMX), + .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 = 8192, + .max = 131072, + .step = 8192 + }, + .nvrmask = 127, + .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, + .snd_device = NULL, + .net_device = NULL + }, + /* This machine has a Winbond W83C842 KBC */ + { + .name = "[SiS 501] Gemlight GMB-P54SPS", + .internal_name = "p54sps", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_SIS_501, + .init = machine_at_p54sps_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + CPU_BLOCK(CPU_PENTIUMMMX), + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 3520, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 1.5 + }, + .bus_flags = MACHINE_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, + .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_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 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 = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + CPU_BLOCK(CPU_PENTIUMMMX), + .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 = 8192, + .max = 131072, + .step = 8192 + }, + .nvrmask = 127, + .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, + .snd_device = NULL, + .net_device = NULL + }, + /* Has AMIKey Z(!) KBC firmware. */ + { + .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 = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + CPU_BLOCK(CPU_PENTIUMMMX), + .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_VIDEO | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, + .step = 8192 + }, + .nvrmask = 127, + .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, + .snd_device = NULL, + .net_device = NULL + }, + + /* UMC 889x */ + /* 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 = 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 = 40000000, + .max_bus = 66666667, + .min_voltage = 3380, + .max_voltage = 3600, + .min_multi = 1.5, + .max_multi = 2.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 262144, + .step = 8192 + }, + .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 + }, + + /* VLSI SuperCore */ + /* This has AST KBC firmware, likely a Phoenix variant since the BIOS */ + /* calls KBC command D5h to read the KBC revision. */ + { + .name = "[VLSI SuperCore] AST Bravo MS P/90", + .internal_name = "bravoms586", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_VLSI_SUPERCORE, + .init = machine_at_bravoms586_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_Cx6x86), + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 3520, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 2.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO, + .ram = { + .min = 4096, + .max = 131072, + .step = 4096 + }, .nvrmask = 127, - .jumpered_ecp_dma = 0, + .jumpered_ecp_dma = MACHINE_DMA_USE_CONFIG, .default_jumpered_ecp_dma = -1, .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_PHOENIX | 0x00012900, + .kbc_params = KBC_VEN_PHOENIX | 0x00021400, /* Guess */ .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, @@ -11620,179 +12972,39 @@ const machine_t machines[] = { .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 - 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. */ + /* Has a VIA KBC chip */ { - .name = "[OPTi 597] AMI Excalibur VLB", - .internal_name = "excalibur", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_OPTI_547_597, - .init = machine_at_excalibur_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VLSI SuperCore] DFI G586VPM Rev C", + .internal_name = "g586vpmc", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_VLSI_SUPERCORE, + .init = machine_at_g586vpmc_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 = 60000000, - .min_voltage = 5000, - .max_voltage = 5000, - .min_multi = MACHINE_MULTIPLIER_FIXED, - .max_multi = MACHINE_MULTIPLIER_FIXED - }, - .bus_flags = MACHINE_PS2_VLB, - .flags = MACHINE_IDE | 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, - .snd_device = NULL, - .net_device = NULL - }, - - /* OPTi 596/597/822 */ - /* Has a VIA VT82C42N KBC with AMI 'F' firmware */ - { - .name = "[OPTi 597] AT&T Globalyst 330 (Pentium)", - .internal_name = "globalyst330_p5", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_OPTI_547_597, - .init = machine_at_globalyst330_p5_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_PCIV, - .flags = MACHINE_APM, - .ram = { - .min = 8192, - .max = 65536, - .step = 8192 - }, - .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 - }, - /* This has AMIKey 'F' KBC firmware. */ - { - .name = "[OPTi 597] Supermicro P5VL-PCI", - .internal_name = "p5vl", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_OPTI_547_597, - .init = machine_at_p5vl_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_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 = 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 - }, - - /* SiS 50x */ - /* This has some form of AMI MegaKey as it uses keyboard controller command 0xCC. */ - { - .name = "[SiS 501] AMI Excalibur PCI-II Pentium ISA", - .internal_name = "excaliburpci2", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_SIS_501, - .init = machine_at_excaliburpci2_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 + .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_PS2_PCI, .flags = MACHINE_IDE_DUAL | MACHINE_APM, .ram = { - .min = 8192, - .max = 131072, - .step = 8192 + .min = 4096, + .max = 262144, + .step = 4096 }, .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_0 | MACHINE_DMA_1 | MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, + .jumpered_ecp_dma = MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 1, .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_AMI | 0x00005200, /* Guess. */ + .kbc_params = KBC_VEN_VIA | 0x00424600, /* Guess */ .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, @@ -11804,39 +13016,40 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* This has an AMIKey-2, which is type 'H'. */ + /* KBC firmware is unknown. No commands outside of the base PS/2 */ + /* KBC command set are used. */ { - .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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VLSI SuperCore] Micronics M54Si", + .internal_name = "m54si", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_VLSI_SUPERCORE, + .init = machine_at_m54si_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 + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_Cx6x86), + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 3520, + .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 + .min = 4096, + .max = 131072, + .step = 4096 }, .nvrmask = 127, .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, + .default_jumpered_ecp_dma = 4, .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_params = KBC_VEN_PHOENIX | 0x00021400, /* Guess */ .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, @@ -11848,39 +13061,39 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* This has an AMIKey-2, which is type 'H'. */ + /* This has Phoenix KBC firmware. */ { - .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, + .name = "[VLSI SuperCore] Packard Bell PB600", + .internal_name = "pb600", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_VLSI_SUPERCORE, + .init = machine_at_pb600_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 + .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_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO, .ram = { - .min = 8192, - .max = 131072, - .step = 8192 + .min = 8192, + .max = 139264, + .step = 4096 }, .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .jumpered_ecp_dma = MACHINE_DMA_1 | MACHINE_DMA_3, .default_jumpered_ecp_dma = 3, .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess */ .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, @@ -11888,359 +13101,45 @@ const machine_t machines[] = { .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, - .vid_device = NULL, + .vid_device = &gd5430_onboard_pci_device, .snd_device = NULL, .net_device = NULL }, - /* Socket 4/5 machines */ - /* OPTi 596/597 */ - /* This has AMIKey-2 'H' KBC firmware. */ + /* VLSI Wildcat */ + /* This has Phoenix KBC firmware. */ { - .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, + .name = "[VLSI Wildcat] AT&T Globalyst 620/630 (NCR 3248/3348)", + .internal_name = "globalyst620", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_VLSI_WILDCAT, + .init = machine_at_globalyst620_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET4 | CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK_NONE, - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3520, - .max_voltage = 5000, - .min_multi = 1.0, - .max_multi = 1.5 - }, - .bus_flags = MACHINE_PCI, - .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 = 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 - }, - - /* Socket 5 machines */ - /* 430NX */ - /* Has AMI 'H' KBC firmware. */ - { - .name = "[i430NX] ASUS PCI/I-P54NP4", - .internal_name = "p54np4", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430NX, - .init = machine_at_p54np4_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_Cx6x86), + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 3520, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 1.5 + .min_multi = 1.5, + .max_multi = 2.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE /*| MACHINE_SCSI */ | MACHINE_APM, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO, .ram = { - .min = 2048, - .max = 524288, - .step = 2048 - }, - .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 = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has AMI 'H' KBC firmware. */ - { - .name = "[i430NX] Gigabyte GA-586IP", - .internal_name = "586ip", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430NX, - .init = machine_at_586ip_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 = 3520, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 1.5 - }, - .bus_flags = MACHINE_PCI, - .flags = MACHINE_APM, - .ram = { - .min = 2048, - .max = 262144, - .step = 2048 - }, - .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 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 + .min = 4096, + .max = 196608, + .step = 4096 }, .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 = 0x00001030, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = &plato_device, - .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, - .snd_device = NULL, - .net_device = NULL - }, - /* Has AMI MegaKey KBC firmware. */ - { - .name = "[i430NX] Teknor TEK-932", - .internal_name = "tek932", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430NX, - .init = machine_at_tek932_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 = 3520, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 1.5 - }, - .bus_flags = MACHINE_PCI, - .flags = MACHINE_PS2_KBC | MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 2048, - .max = 262144, - .step = 2048 - }, - .nvrmask = 127, - .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, - .snd_device = NULL, - .net_device = NULL - }, - - /* 430FX */ - /* Uses an ACER/NEC 90M002A (UPD82C42C, 8042 clone) with unknown firmware (V5.0). */ - { - .name = "[i430FX] Acer V30", - .internal_name = "acerv30", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_acerv30_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_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, - .snd_device = NULL, - .net_device = NULL - }, - /* Has AMIKey F KBC firmware. */ - { - .name = "[i430FX] AMI Apollo", - .internal_name = "apollo", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_apollo_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_AMI | 0x00004600, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess */ .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, @@ -12248,633 +13147,7 @@ const machine_t machines[] = { .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* 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 = 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_Cx6x86), - .min_bus = 60000000, - .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_VIDEO | MACHINE_SOUND | MACHINE_APM, /* Video: S3 Trio64V+ (86C765), Sound: Creative ViBRA 16S (CT2504), Network: 3Com ETHERLINK III (3C509B) */ - .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 = 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 (Zappa)", - .internal_name = "zappa", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_zappa_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 = 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 = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | 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 = NULL, - .net_device = NULL - }, - /* The BIOS sends KBC command B3 which indicates an AMI (or VIA VT82C42N) KBC. */ - { - .name = "[i430FX] NEC PowerMate V", - .internal_name = "powermatev", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_powermatev_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 - }, - /* Has AMIKey Z(!) KBC firmware. */ - { - .name = "[i430FX] TriGem Hawk", - .internal_name = "hawk", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_hawk_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_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, - .snd_device = NULL, - .net_device = NULL - }, - - /* OPTi 596/597 */ - /* 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 = 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_PS2_PCIV, - .flags = MACHINE_APM | MACHINE_IDE_DUAL | MACHINE_SUPER_IO, - .ram = { - .min = 8192, - .max = 131072, - .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 | 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_PS2_KBC | 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, - .snd_device = NULL, - .net_device = NULL - }, - - /* SiS 85C50x */ - /* 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 = 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 = 40000000, - .max_bus = 66666667, - .min_voltage = 3380, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 1.5 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | 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 = 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 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 = 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_PENTIUMMMX), - .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 = 8192, - .max = 131072, - .step = 8192 - }, - .nvrmask = 127, - .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, - .snd_device = NULL, - .net_device = NULL - }, - /* This machine has a Winbond W83C842 KBC */ - { - .name = "[SiS 501] Gemlight GMB-P54SPS", - .internal_name = "p54sps", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_SIS_501, - .init = machine_at_p54sps_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - CPU_BLOCK(CPU_PENTIUMMMX), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3520, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 1.5 - }, - .bus_flags = MACHINE_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, - .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_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 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - CPU_BLOCK(CPU_PENTIUMMMX), - .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 = 8192, - .max = 131072, - .step = 8192 - }, - .nvrmask = 127, - .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, - .snd_device = NULL, - .net_device = NULL - }, - /* Has AMIKey Z(!) KBC firmware. */ - { - .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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - CPU_BLOCK(CPU_PENTIUMMMX), - .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_VIDEO | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, - .step = 8192 - }, - .nvrmask = 127, - .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, - .snd_device = NULL, - .net_device = NULL - }, - - /* UMC 889x */ - /* 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 = 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 = 40000000, - .max_bus = 66666667, - .min_voltage = 3380, - .max_voltage = 3600, - .min_multi = 1.5, - .max_multi = 2.0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 8192, - .max = 262144, - .step = 8192 - }, - .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, + .vid_device = &s3_phoenix_trio64_onboard_pci_device, .snd_device = NULL, .net_device = NULL }, @@ -12884,405 +13157,405 @@ const machine_t machines[] = { /* 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", - .internal_name = "p54tp4xe", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_p54tp4xe_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430FX] ASUS P/I-P55TP4XE", + .internal_name = "p54tp4xe", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_p54tp4xe_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 3380, .max_voltage = 3600, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_USE_MBDMA, + .nvrmask = 127, + .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 = &p54tp4xe_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00004800, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &p54tp4xe_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL }, /* Has AMIKey H KBC firmware. The KBC itself seems to differ between an AMIKEY-2 and a Winbond W83C42. */ { - .name = "[i430FX] DataExpert EXP8551", - .internal_name = "exp8551", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_exp8551_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430FX] DataExpert EXP8551", + .internal_name = "exp8551", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_exp8551_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, + .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 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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 = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .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 a SM(S)C FDC37C932 Super I/O chip with on-chip KBC with AMI MegaKey (revision '5') KBC firmware. */ { - .name = "[i430FX] HP Vectra VL 5 Series 4", - .internal_name = "vectra54", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_vectra54_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430FX] HP Vectra VL 5/xxx Series 4 (Chimay)", + .internal_name = "vectra54", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_vectra54_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, + .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 + .min_multi = 1.5, + .max_multi = 2.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 131072, .step = 8192 }, - .nvrmask = 511, - .jumpered_ecp_dma = 0, + .nvrmask = 511, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .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_phoenix_trio64_onboard_pci_device, - .snd_device = NULL, - .net_device = NULL + .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_phoenix_trio64_onboard_pci_device, + .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/ATX (Thor)", - .internal_name = "thor", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_thor_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 3380, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM | MACHINE_GAMEPORT, /* Machine has optional onboard sound: Crystal CS4232-KQ */ - .ram = { - .min = 8192, - .max = 131072, + .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, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = &thor_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &s3_phoenix_trio64vplus_onboard_pci_device, - .snd_device = NULL, - .net_device = NULL + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &thor_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &s3_phoenix_trio64vplus_onboard_pci_device, + .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/EV (Endeavor)", - .internal_name = "endeavor", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_endeavor_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = machine_at_endeavor_gpio_handler, - .available_flag = MACHINE_AVAILABLE, + .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 = machine_generic_p1_handler, + .gpio_handler = machine_at_endeavor_gpio_handler, + .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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 3380, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_3, + .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_phoenix_trio64_onboard_pci_device, - .snd_device = &sb_vibra16s_onboard_device, - .net_device = NULL + .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_phoenix_trio64_onboard_pci_device, + .snd_device = &sb_vibra16s_onboard_device, + .net_device = NULL }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_USE_MBDMA, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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 most likely uses AMI MegaKey KBC firmware as well due to having the same Super I/O chip (that has the KBC firmware on it) as eg. the Advanced/EV. */ { - .name = "[i430FX] Packard Bell PB640", - .internal_name = "pb640", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_pb640_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430FX] Packard Bell PB640", + .internal_name = "pb640", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_pb640_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 3380, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_3, + .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 = &gd5440_onboard_pci_device, - .snd_device = NULL, - .net_device = NULL + .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 = &gd5440_onboard_pci_device, + .snd_device = NULL, + .net_device = NULL }, /* Has a VIA VT82C42N KBC. */ { - .name = "[i430FX] PCPartner MB500N", - .internal_name = "mb500n", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_mb500n_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430FX] PCPartner MB500N", + .internal_name = "mb500n", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_mb500n_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, + .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 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_0 | MACHINE_DMA_1 | MACHINE_DMA_3, + .nvrmask = 127, + .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 + .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 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430FX] QDI FMB", + .internal_name = "fmb", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_fmb_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_WINCHIP, CPU_WINCHIP2, CPU_Cx6x86, CPU_Cx6x86L, CPU_Cx6x86MX), - .min_bus = 50000000, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_WINCHIP, CPU_WINCHIP2, CPU_Cx6x86, CPU_Cx6x86L, CPU_Cx6x86MX), + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 3380, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT, + .ram = { + .min = 8192, + .max = 131072, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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 = 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 + .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 }, /* 430HX */ @@ -13290,1805 +13563,1852 @@ 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 = "[i430HX] Acer V35N", - .internal_name = "acerv35n", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_acerv35n_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430HX] Acer V35N", + .internal_name = "acerv35n", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_INTEL_430HX, + .init = machine_at_acerv35n_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 3450, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 4096, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 4096, + .max = 524288, .step = 4096 }, - .nvrmask = 511, - .jumpered_ecp_dma = 0, + .nvrmask = 511, + .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 + .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 AMIKey-2 or VIA VT82C42N KBC (depending on the revision) with AMIKEY 'F' KBC firmware. */ { - .name = "[i430HX] AOpen AP53", - .internal_name = "ap53", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_ap53_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430HX] AOpen AP53", + .internal_name = "ap53", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_INTEL_430HX, + .init = machine_at_ap53_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 3450, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 2.5 + .min_multi = 1.5, + .max_multi = 2.5 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 4096, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 4096, + .max = 524288, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 4096, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 4096, + .max = 524288, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 + .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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_AV | MACHINE_GAMEPORT | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_AV | MACHINE_GAMEPORT | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, .step = 4096 }, - .nvrmask = 511, - .jumpered_ecp_dma = 0, + .nvrmask = 511, + .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, - .snd_device = &sb_vibra16c_onboard_device, - .net_device = NULL + .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, + .snd_device = &sb_vibra16c_onboard_device, + .net_device = NULL }, /* 430VX */ /* Has a SM(S)C FDC37C932FR Super I/O chip with on-chip KBC with AMI MegaKey (revision '5') KBC firmware. */ { - .name = "[i430VX] Gateway 2000 Mailman", - .internal_name = "gw2kma", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430VX, - .init = machine_at_gw2kma_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430VX] Gateway 2000 Mailman", + .internal_name = "gw2kma", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_INTEL_430VX, + .init = machine_at_gw2kma_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 3380, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_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, + .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, + .nvrmask = 511, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .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 + .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 }, /* SiS 5501 */ /* Has the Lance LT38C41 KBC. */ { - .name = "[SiS 5501] Chaintech 5SBM/5SBM2 (M103)", - .internal_name = "5sbm2", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_SIS_5501, - .init = machine_at_5sbm2_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 5501] Chaintech 5SBM/5SBM2 (M103)", + .internal_name = "5sbm2", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_SIS_5501, + .init = machine_at_5sbm2_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, + .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 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .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 | 0x00004600, - .kbc_p1 = 0x000004f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = &c5sbm2_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* SiS 5511 */ /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 8192, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 + .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, + .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, + .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 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 8192, - .max = 524288, + .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, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has an SMC FDC37C669QF Super I/O. */ { - .name = "[SiS 5511] IBM PC 140 (type 6260)", - .internal_name = "pc140_6260", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_SIS_5511, - .init = machine_at_pc140_6260_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 5511] IBM PC 140 (type 6260)", + .internal_name = "pc140_6260", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_SIS_5511, + .init = machine_at_pc140_6260_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_WINCHIP, CPU_WINCHIP2, CPU_Cx6x86, CPU_Cx6x86L, CPU_Cx6x86MX, CPU_PENTIUMMMX), - .min_bus = 50000000, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_WINCHIP, CPU_WINCHIP2, CPU_Cx6x86, CPU_Cx6x86L, CPU_Cx6x86MX, CPU_PENTIUMMMX), + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 3380, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = &gd5436_onboard_pci_device, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* Has AMIKey H KBC firmware (AMIKey-2). */ { - .name = "[SiS 5511] MSI MS-5124", - .internal_name = "ms5124", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_SIS_5511, - .init = machine_at_ms5124_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 5511] MSI MS-5124", + .internal_name = "ms5124", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_SIS_5511, + .init = machine_at_ms5124_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, + .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 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 8192, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_USE_MBDMA, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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 + }, + + /* VLSI Wildcat */ + /* KBC firmware is unknown. No PS/2 port is present and no commands outside */ + /* of the base AT KBC command set are used. */ + { + .name = "[VLSI Wildcat] Zeos Pantera Wildcat", + .internal_name = "zeoswildcat", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_VLSI_WILDCAT, + .init = machine_at_zeoswildcat_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_Cx6x86, CPU_PENTIUMMMX), + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 3520, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 2.5 + }, + .bus_flags = MACHINE_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 4096, + .max = 393216, + .step = 4096 + }, + .nvrmask = 127, + .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 = NULL, + .snd_device = NULL, + .net_device = NULL }, /* Socket 7 (Dual Voltage) 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, + .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, + .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 + .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, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 8192, + .max = 262144, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 = &m5ata_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &m5ata_device, + .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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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 = 83333333, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 83333333, .min_voltage = 2100, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 1048576, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1048576, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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+] PCChips M560", - .internal_name = "m560", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_ALI_ALADDIN_IV_PLUS, - .init = machine_at_m560_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi ALADDiN IV+] PCChips M560", + .internal_name = "m560", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_ALI_ALADDIN_IV_PLUS, + .init = machine_at_m560_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 = 83333333, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 83333333, .min_voltage = 2100, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 786432, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* 430HX */ /* Has a SM(S)C FDC37C935 Super I/O chip with on-chip KBC with Phoenix MultiKey/42 (version 1.38) KBC firmware. */ { - .name = "[i430HX] Acer AcerPower Ultima", - .internal_name = "acerm3a", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_acerm3a_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430HX] Acer AcerPower Ultima", + .internal_name = "acerm3a", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430HX, + .init = machine_at_acerm3a_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 = 50000000, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_Cx6x86MX), + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, /* Machine has internal SCSI */ - .ram = { - .min = 4096, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, /* Machine has internal SCSI */ + .ram = { + .min = 4096, + .max = 524288, .step = 4096 }, - .nvrmask = 511, - .jumpered_ecp_dma = 0, + .nvrmask = 511, + .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 + .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 AMIKey H KBC firmware (AMIKey-2). */ { - .name = "[i430HX] ASUS P/I-P55T2P4", - .internal_name = "p55t2p4", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_p55t2p4_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430HX] ASUS P/I-P55T2P4", + .internal_name = "p55t2p4", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430HX, + .init = machine_at_p55t2p4_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, + .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 + .min_multi = 1.5, + .max_multi = 4.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 4096, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 4096, + .max = 524288, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2500, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .min_multi = 1.5, + .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, /* Machine has AMB */ - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 4096, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 4096, + .max = 524288, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 + .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, + .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 = { + .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_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .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, + .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, + .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 = &cu430hx_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = &sb_vibra16c_onboard_device, - .net_device = NULL + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &cu430hx_device, + .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, + .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 = { + .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_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .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_SOUND | MACHINE_GAMEPORT | MACHINE_USB, /* Has internal sound: Yamaha YMF701-S */ - .ram = { - .min = 8192, - .max = 524288, + .flags = MACHINE_VIDEO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_SOUND | 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, + .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 = &tc430hx_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &s3_virge_375_pci_device, - .snd_device = &ymf701_device, - .net_device = NULL + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &tc430hx_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &s3_virge_375_pci_device, + .snd_device = &ymf701_device, + .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. */ { - .name = "[i430HX] Micronics M7S-Hi", - .internal_name = "m7shi", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_m7shi_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430HX] Micronics M7S-Hi", + .internal_name = "m7shi", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430HX, + .init = machine_at_m7shi_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, - .ram = { - .min = 4096, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, + .ram = { + .min = 4096, + .max = 524288, .step = 4096 }, - .nvrmask = 511, - .jumpered_ecp_dma = 0, + .nvrmask = 511, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x00000cf0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = &m7shi_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &m7shi_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL }, /* Unknown PS/2 KBC. */ { - .name = "[i430HX] Radisys EPC-2102", - .internal_name = "epc2102", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_epc2102_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430HX] Radisys EPC-2102", + .internal_name = "epc2102", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430HX, + .init = machine_at_epc2102_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2500, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .min_multi = 1.5, + .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 4096, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 4096, + .max = 524288, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_USE_CONFIG, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .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 . Yes, this is an Intel AMI BIOS with a fancy splash screen. */ { - .name = "[i430HX] Sony Vaio PCV-90", - .internal_name = "pcv90", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_pcv90_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430HX] Sony Vaio PCV-90", + .internal_name = "pcv90", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430HX, + .init = machine_at_pcv90_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 = { + .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_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_SOUND | MACHINE_GAMEPORT, /* Machine has internal video: ATI Mach64GT-B 3D Rage II */ - .ram = { - .min = 8192, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_SOUND | MACHINE_GAMEPORT, /* 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, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | 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 = &ymf701_device, - .net_device = NULL + .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 = &ymf701_device, + .net_device = NULL }, /* [TEST] The board doesn't seem to have a KBC at all, which probably means it's an on-chip one on the PC87306 SIO. A list on a Danish site shows the BIOS as having a -0 string, indicating non-AMI KBC firmware. */ { - .name = "[i430HX] Supermicro P55T2S", - .internal_name = "p55t2s", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_p55t2s_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430HX] Supermicro P55T2S", + .internal_name = "p55t2s", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430HX, + .init = machine_at_p55t2s_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 4096, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 4096, + .max = 524288, .step = 4096 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .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 = NULL, - .net_device = NULL + .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 = NULL, + .net_device = NULL }, /* 430VX */ /* This has the VIA VT82C42N or Holtek HT6542B KBC. */ { - .name = "[i430VX] AOpen AP5VM", - .internal_name = "ap5vm", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430VX, - .init = machine_at_ap5vm_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430VX] AOpen AP5VM", + .internal_name = "ap5vm", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430VX, + .init = machine_at_ap5vm_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2600, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SCSI | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 4096, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_SCSI | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 4096, + .max = 131072, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_1 | MACHINE_DMA_3, + .nvrmask = 127, + .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, - .snd_device = NULL, - .net_device = NULL + .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 }, /* Has AMIKey H KBC firmware (AMIKey-2) on a BestKey KBC. */ { - .name = "[i430VX] ASUS P/I-P55TVP4", - .internal_name = "p55tvp4", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430VX, - .init = machine_at_p55tvp4_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430VX] ASUS P/I-P55TVP4", + .internal_name = "p55tvp4", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430VX, + .init = machine_at_p55tvp4_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2500, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .min_multi = 1.5, + .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, /* Machine has AMB */ - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 4096, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 4096, + .max = 131072, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 BIOS does not send a single non-standard KBC command, so it must have a standard IBM PS/2 KBC firmware or a clone thereof. */ { - .name = "[i430VX] Azza PT-5IV", - .internal_name = "5ivg", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430VX, - .init = machine_at_5ivg_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430VX] Azza PT-5IV", + .internal_name = "5ivg", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430VX, + .init = machine_at_5ivg_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2500, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .min_multi = 1.5, + .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 4096, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 4096, + .max = 131072, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 + .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 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2600, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 4096, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 4096, + .max = 131072, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 + .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 }, /* Has a SM(S)C FDC37C932QF Super I/O chip with on-chip KBC with AMI MegaKey (revision '5') KBC firmware. */ { - .name = "[i430VX] Compaq Presario 224x", - .internal_name = "presario2240", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430VX, - .init = machine_at_presario2240_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430VX] Compaq Presario 224x", + .internal_name = "presario2240", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430VX, + .init = machine_at_presario2240_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 = 66666667, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 66666667, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .min_multi = 1.5, + .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM | MACHINE_ACPI, - .ram = { - .min = 16384, - .max = 49152, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM | MACHINE_ACPI, + .ram = { + .min = 16384, + .max = 49152, .step = 4096 }, - .nvrmask = 511, - .jumpered_ecp_dma = 0, + .nvrmask = 511, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .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_trio64v2_dx_onboard_pci_device, - .snd_device = NULL, - .net_device = NULL + .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_trio64v2_dx_onboard_pci_device, + .snd_device = NULL, + .net_device = NULL }, /* Has a SM(S)C FDC37C931APM Super I/O chip with on-chip KBC with Compaq KBC firmware. */ { - .name = "[i430VX] Compaq Presario 45xx", - .internal_name = "presario4500", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430VX, - .init = machine_at_presario4500_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430VX] Compaq Presario 45xx", + .internal_name = "presario4500", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430VX, + .init = machine_at_presario4500_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 = 66666667, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 66666667, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .min_multi = 1.5, + .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM | MACHINE_ACPI, - .ram = { - .min = 16384, - .max = 49152, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM | MACHINE_ACPI, + .ram = { + .min = 16384, + .max = 49152, .step = 4096 }, - .nvrmask = 511, - .jumpered_ecp_dma = 0, + .nvrmask = 511, + .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 = &s3_trio64v2_dx_onboard_pci_device, - .snd_device = NULL, - .net_device = NULL + .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 = &s3_trio64v2_dx_onboard_pci_device, + .snd_device = NULL, + .net_device = NULL }, /* Has a SM(S)C FDC37C932FR Super I/O chip with on-chip KBC with AMI MegaKey (revision '5') KBC firmware. */ { - .name = "[i430VX] Dell Dimension XPS Pxxxa/Mxxxa", - .internal_name = "dellhannibalp", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430VX, - .init = machine_at_dellhannibalp_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430VX] Dell Dimension XPS Pxxxa/Mxxxa", + .internal_name = "dellhannibalp", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430VX, + .init = machine_at_dellhannibalp_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 = { + .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_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2500, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .min_multi = 1.5, + .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, /* Machine has internal video: S3 Trio64V+ */ - .ram = { - .min = 8192, - .max = 131072, + .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, + .nvrmask = 511, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .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 = NULL, - .net_device = NULL + .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 = NULL, + .net_device = NULL }, /* Has AMIKey H KBC firmware (AMIKey-2). */ { - .name = "[i430VX] ECS P5VX-B", - .internal_name = "p5vxb", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430VX, - .init = machine_at_p5vxb_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430VX] ECS P5VX-B", + .internal_name = "p5vxb", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430VX, + .init = machine_at_p5vxb_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2500, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 4096, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 4096, + .max = 131072, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 a SM(S)C FDC37C932FR Super I/O chip with on-chip KBC with AMI MegaKey (revision '5') KBC firmware. */ { - .name = "[i430VX] Epox P55-VA", - .internal_name = "p55va", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430VX, - .init = machine_at_p55va_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430VX] Epox P55-VA", + .internal_name = "p55va", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430VX, + .init = machine_at_p55va_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 75000000, .min_voltage = 2500, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 4096, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 4096, + .max = 131072, .step = 4096 }, - .nvrmask = 511, - .jumpered_ecp_dma = 0, + .nvrmask = 511, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .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 = NULL, - .net_device = NULL + .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 = NULL, + .net_device = NULL }, /* Has a SM(S)C FDC37C932FR Super I/O chip with on-chip KBC with AMI MegaKey (revision '5') KBC firmware. */ { - .name = "[i430VX] Gateway 2000 Hitman", - .internal_name = "gw2kte", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430VX, - .init = machine_at_gw2kte_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430VX] Gateway 2000 Hitman", + .internal_name = "gw2kte", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430VX, + .init = machine_at_gw2kte_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 = { + .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_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2200, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, + .ram = { + .min = 8192, + .max = 131072, .step = 4096 }, - .nvrmask = 511, - .jumpered_ecp_dma = 0, + .nvrmask = 511, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .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 + .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 }, /* 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] HP Brio 80xx", - .internal_name = "brio80xx", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430VX, - .init = machine_at_brio80xx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430VX] HP Brio 80xx", + .internal_name = "brio80xx", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430VX, + .init = machine_at_brio80xx_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 = 66666667, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 66666667, .min_voltage = 2200, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .min_multi = 1.5, + .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, /* Machine has internal video: S3 Trio64V2/DX */ - .ram = { - .min = 8192, - .max = 131072, + .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, + .nvrmask = 511, + .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 + .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 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, + .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, + .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 + .min_multi = 1.5, + .max_multi = 4.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .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 = "[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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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 = { + .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_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_VIDEO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_VIDEO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 8192, + .max = 131072, .step = 4096 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_3, + .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_phoenix_trio64vplus_onboard_pci_device, - .snd_device = NULL, - .net_device = NULL + .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_phoenix_trio64vplus_onboard_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. */ { - .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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2500, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 4.0 + .min_multi = 1.5, + .max_multi = 4.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM, /* Machine has internal video: S3 Trio64V2/DX */ - .ram = { - .min = 4096, - .max = 131072, + .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, + .nvrmask = 511, + .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 + .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 }, /* This has the AMIKey 'H' firmware, possibly AMIKey-2. Photos show it with a BestKey, so it likely clones the behavior of AMIKey 'H'. */ { - .name = "[i430VX] PCPartner MB520N", - .internal_name = "mb520n", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430VX, - .init = machine_at_mb520n_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430VX] PCPartner MB520N", + .internal_name = "mb520n", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430VX, + .init = machine_at_mb520n_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2600, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .min_multi = 1.5, + .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 4096, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 4096, + .max = 131072, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 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. */ { - .name = "[i430VX] Shuttle HOT-557", - .internal_name = "430vx", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430VX, - .init = machine_at_i430vx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430VX] Shuttle HOT-557", + .internal_name = "430vx", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430VX, + .init = machine_at_i430vx_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2500, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_GAMEPORT | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 4096, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_GAMEPORT | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 4096, + .max = 131072, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* 430TX */ /* The BIOS sends KBC command B8, CA, and CB, so it has an AMI KBC firmware. */ { - .name = "[i430TX] ADLink NuPRO-591/592", - .internal_name = "nupro592", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430TX, - .init = machine_at_nupro592_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430TX] ADLink NuPRO-591/592", + .internal_name = "nupro592", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430TX, + .init = machine_at_nupro592_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 = 66666667, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 66666667, .min_voltage = 1900, .max_voltage = 2800, - .min_multi = 1.5, - .max_multi = 5.5 + .min_multi = 1.5, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_VIDEO, - .ram = { - .min = 8192, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_VIDEO, + .ram = { + .min = 8192, + .max = 262144, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 = &chips_69000_onboard_device, - .snd_device = NULL, - .net_device = NULL + .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 = &chips_69000_onboard_device, + .snd_device = NULL, + .net_device = NULL }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430TX] ASUS TX97", + .internal_name = "tx97", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430TX, + .init = machine_at_tx97_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, + .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 = 3.5 + .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, - .ram = { - .min = 8192, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 262144, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .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 + .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 }, /* According to Dell specifications, it can have either National Semiconductor @@ -15100,138 +15420,138 @@ const machine_t machines[] = { MultiKey/42i 4.16. */ { - .name = "[i430TX] Dell OptiPlex GN+", - .internal_name = "optiplexgn", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430TX, - .init = machine_at_optiplexgn_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430TX] Dell OptiPlex GN+", + .internal_name = "optiplexgn", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430TX, + .init = machine_at_optiplexgn_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2500, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .min_multi = 1.5, + .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI, /* Video: S3 86C785 (Trio64V2/GX), ethernet: 3C905. */ - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_VIDEO | MACHINE_SOUND, - .ram = { - .min = 8192, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_VIDEO | MACHINE_SOUND, + .ram = { + .min = 8192, + .max = 262144, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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, + .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, /* Stop-gap measure until the Trio64V2/GX is emulated, as both use the same VBIOS. */ - .vid_device = &s3_trio64v2_dx_onboard_pci_device, - .snd_device = &sb_vibra16xv_onboard_device, - .net_device = NULL + .vid_device = &s3_trio64v2_dx_onboard_pci_device, + .snd_device = &sb_vibra16xv_onboard_device, + .net_device = NULL }, /* [TEST] Has AMI Megakey '5' KBC firmware on the SM(S)C FDC37C67x Super I/O chip. */ { - .name = "[i430TX] Gateway E-1000", - .internal_name = "tomahawk", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430TX, - .init = machine_at_tomahawk_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430TX] Gateway E-1000", + .internal_name = "tomahawk", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430TX, + .init = machine_at_tomahawk_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, .min_voltage = 2100, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 5.5 + .min_multi = 1.5, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_VIDEO | MACHINE_SOUND | MACHINE_NIC | MACHINE_USB, - .ram = { - .min = 8192, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_VIDEO | MACHINE_SOUND | MACHINE_NIC | MACHINE_USB, + .ram = { + .min = 8192, + .max = 262144, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .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_trio64v2_dx_onboard_pci_device, - .snd_device = &cs4236b_device, - .net_device = &pcnet_am79c973_onboard_device + .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_trio64v2_dx_onboard_pci_device, + .snd_device = &cs4236b_device, + .net_device = &pcnet_am79c973_onboard_device }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430TX] Intel YM430TX (Yamamoto)", + .internal_name = "ym430tx", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430TX, + .init = machine_at_ym430tx_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 = { + .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 = 60000000, - .max_bus = 66666667, + .min_bus = 60000000, + .max_bus = 66666667, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .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, - .ram = { - .min = 4096, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 4096, + .max = 262144, .step = 4096 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* PhoenixBIOS 4.0 Rel 6.0 for 430TX, has onboard Yamaha YMF701 which @@ -15241,3033 +15561,3033 @@ const machine_t machines[] = { MultiKey/42 (version 1.38) KBC firmware. */ { - .name = "[i430TX] Micronics Thunderbolt", - .internal_name = "thunderbolt", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430TX, - .init = machine_at_thunderbolt_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430TX] Micronics Thunderbolt", + .internal_name = "thunderbolt", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430TX, + .init = machine_at_thunderbolt_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_WINCHIP, CPU_WINCHIP2), - .min_bus = 60000000, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_WINCHIP, CPU_WINCHIP2), + .min_bus = 60000000, + .max_bus = 66666667, .min_voltage = 2500, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .min_multi = 1.5, + .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, /* Machine has internal sound: Yamaha YMF701-S */ - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, - .ram = { - .min = 8192, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, + .ram = { + .min = 8192, + .max = 262144, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 SM(S)C FDC37C67x Super I/O chip with on-chip KBC with Phoenix or 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, .min_voltage = 2700, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .min_multi = 1.5, + .max_multi = 3.5 }, .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, + .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, + .nvrmask = 255, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .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 = NULL, - .net_device = NULL + .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 = NULL, + .net_device = NULL }, - /* This has the Phoenix MultiKey KBC firmware on the NSC Suepr I/O chip. */ + /* This has the Phoenix MultiKey KBC firmware on the NSC Super 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430TX] Packard Bell PB790", + .internal_name = "an430tx", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430TX, + .init = machine_at_an430tx_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 = { + .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 = 60000000, - .max_bus = 66666667, + .min_bus = 60000000, + .max_bus = 66666667, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .min_multi = 1.5, + .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI, /* Machine has internal video: ATI Mach64GT-B 3D Rage II */ - .ram = { - .min = 8192, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_SOUND | MACHINE_GAMEPORT, /* Machine has internal video: ATI Mach64GT-B 3D Rage II */ + .ram = { + .min = 8192, + .max = 262144, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .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 = NULL, - .net_device = NULL + .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 = &ymf715_onboard_device, + .net_device = NULL }, /* The BIOS sends KBC command BB and expects it to output a byte, which is AMI KBC behavior. A picture shows a VIA VT82C42N KBC though, so it could be a case of that KBC with AMI firmware. */ { - .name = "[i430TX] PCPartner MB540N", - .internal_name = "mb540n", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430TX, - .init = machine_at_mb540n_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430TX] PCPartner MB540N", + .internal_name = "mb540n", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430TX, + .init = machine_at_mb540n_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, .min_voltage = 2700, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .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, - .ram = { - .min = 4096, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 4096, + .max = 262144, .step = 4096 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .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 + .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 }, /* Award BIOS, PS2, EDO, SDRAM, 4 PCI, 4 ISA, VIA VT82C42N KBC */ { - .name = "[i430TX] Soltek SL-56A5", - .internal_name = "56a5", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430TX, - .init = machine_at_56a5_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430TX] Soltek SL-56A5", + .internal_name = "56a5", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430TX, + .init = machine_at_56a5_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 5.5 + .min_multi = 1.5, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 4096, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 4096, + .max = 262144, .step = 4096 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .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 + .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 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430TX] Supermicro P5MMS98", + .internal_name = "p5mms98", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430TX, + .init = machine_at_p5mms98_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_Cx6x86MX), + .min_bus = 50000000, + .max_bus = 75000000, .min_voltage = 2100, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .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, - .ram = { - .min = 4096, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 4096, + .max = 262144, .step = 4096 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* [TEST] Has AMIKey 'H' KBC firmware. */ { - .name = "[i430TX] TriGem RD535 (Richmond)", - .internal_name = "richmond", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430TX, - .init = machine_at_richmond_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430TX] TriGem RD535 (Richmond)", + .internal_name = "richmond", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430TX, + .init = machine_at_richmond_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, .min_voltage = 2100, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .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, - .ram = { - .min = 8192, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 262144, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .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 + .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 }, /* SiS 5571 */ /* Has the SiS 5571 chipset with on-chip KBC. */ { - .name = "[SiS 5571] Daewoo CD520", - .internal_name = "cb52xsi", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_SIS_5571, - .init = machine_at_cb52xsi_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 5571] Daewoo CD520", + .internal_name = "cb52xsi", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_SIS_5571, + .init = machine_at_cb52xsi_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 75000000, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 8192, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 8192, + .max = 262144, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 SiS 5571 chipset with on-chip KBC. */ { - .name = "[SiS 5571] MSI MS-5146", - .internal_name = "ms5146", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_SIS_5571, - .init = machine_at_ms5146_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 5571] MSI MS-5146", + .internal_name = "ms5146", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_SIS_5571, + .init = machine_at_ms5146_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 75000000, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, - .ram = { - .min = 8192, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, + .ram = { + .min = 8192, + .max = 262144, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 SiS 5571 chipset with on-chip KBC. */ { - .name = "[SiS 5571] Rise R534F", - .internal_name = "r534f", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_SIS_5571, - .init = machine_at_r534f_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 5571] Rise R534F", + .internal_name = "r534f", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_SIS_5571, + .init = machine_at_r534f_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 = 55000000, - .max_bus = 83333333, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 55000000, + .max_bus = 83333333, .min_voltage = 2500, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 8192, - .max = 393216, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 8192, + .max = 393216, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 = &r534f_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &r534f_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL }, /* SiS 5581 */ /* Has the SiS 5581 chipset with on-chip KBC. */ { - .name = "[SiS 5581] ASUS SP97-XV", - .internal_name = "sp97xv", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_SIS_5581, - .init = machine_at_sp97xv_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 5581] ASUS SP97-XV", + .internal_name = "sp97xv", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_SIS_5581, + .init = machine_at_sp97xv_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 75000000, .min_voltage = 2500, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 1572864, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1572864, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 SiS 5581 chipset with on-chip KBC. */ { - .name = "[SiS 5581] BCM SQ-578", - .internal_name = "sq578", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_SIS_5581, - .init = machine_at_sq578_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 5581] BCM SQ-578", + .internal_name = "sq578", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_SIS_5581, + .init = machine_at_sq578_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 75000000, .min_voltage = 2500, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 1572864, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1572864, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* SiS 5591 */ /* Has the SiS 5591 chipset with on-chip KBC. */ { - .name = "[SiS 5591] MSI MS-5172", - .internal_name = "ms5172", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_SIS_5591, - .init = machine_at_ms5172_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 5591] MSI MS-5172", + .internal_name = "ms5172", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_SIS_5591, + .init = machine_at_ms5172_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 75000000, .min_voltage = 2500, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 786432, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* Apollo VPX */ /* Has the VIA VT82C586B southbridge with on-chip KBC identical to the VIA VT82C42N. */ { - .name = "[VIA VPX] FIC VA-502", - .internal_name = "ficva502", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_VPX, - .init = machine_at_ficva502_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA VPX] FIC VA-502", + .internal_name = "ficva502", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_VPX, + .init = machine_at_ficva502_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, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 75000000, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* Apollo VP3 */ /* Has the VIA VT82C586B southbridge with on-chip KBC identical to the VIA VT82C42N. */ { - .name = "[VIA VP3] FIC PA-2012", - .internal_name = "ficpa2012", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_VP3, - .init = machine_at_ficpa2012_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA VP3] FIC PA-2012", + .internal_name = "ficpa2012", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_VP3, + .init = machine_at_ficpa2012_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 = 55000000, - .max_bus = 75000000, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 55000000, + .max_bus = 75000000, .min_voltage = 2100, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 5.5 + .min_multi = 1.5, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 1048576, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1048576, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 VIA VT82C586B southbridge with on-chip KBC identical to the VIA VT82C42N. */ { - .name = "[VIA VP3] PCPartner VIA809DS", - .internal_name = "via809ds", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_VP3, - .init = machine_at_via809ds_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA VP3] PCPartner VIA809DS", + .internal_name = "via809ds", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_VP3, + .init = machine_at_via809ds_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, + .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 = 5.5 + .min_multi = 1.5, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 1048576, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1048576, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* Super Socket 7 machines */ /* ALi ALADDiN V */ /* Has the ALi M1543C southbridge with on-chip KBC. */ { - .name = "[ALi ALADDiN V] ASUS P5A", - .internal_name = "p5a", - .type = MACHINE_TYPE_SOCKETS7, - .chipset = MACHINE_CHIPSET_ALI_ALADDIN_V, - .init = machine_at_p5a_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi ALADDiN V] ASUS P5A", + .internal_name = "p5a", + .type = MACHINE_TYPE_SOCKETS7, + .chipset = MACHINE_CHIPSET_ALI_ALADDIN_V, + .init = machine_at_p5a_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 = 120000000, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 120000000, .min_voltage = 2000, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 5.5 + .min_multi = 1.5, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_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, + .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, + .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 + .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 }, /* M1534c kbc */ { - .name = "[ALi ALADDiN V] Gateway Lucas", - .internal_name = "gwlucas", - .type = MACHINE_TYPE_SOCKETS7, - .chipset = MACHINE_CHIPSET_ALI_ALADDIN_V, - .init = machine_at_gwlucas_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi ALADDiN V] Gateway Lucas (MSI MS-5185)", + .internal_name = "gwlucas", + .type = MACHINE_TYPE_SOCKETS7, + .chipset = MACHINE_CHIPSET_ALI_ALADDIN_V, + .init = machine_at_gwlucas_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 = 66666667, - .max_bus = 100000000, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 100000000, .min_voltage = 2000, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 5.5 + .min_multi = 1.5, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_PCIONLY | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, /* Has internal video: ATI 3D Rage Pro Turbo AGP and sound: Ensoniq ES1373 */ - .ram = { - .min = 8192, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, /* Has internal video: ATI 3D Rage Pro Turbo AGP and sound: Ensoniq ES1373 */ + .ram = { + .min = 8192, + .max = 262144, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 = &es1373_onboard_device, - .net_device = NULL + .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 = &es1373_onboard_device, + .net_device = NULL }, /* Has the ALi M1543C southbridge with on-chip KBC. */ { - .name = "[ALi ALADDiN V] Gigabyte GA-5AA", - .internal_name = "5aa", - .type = MACHINE_TYPE_SOCKETS7, - .chipset = MACHINE_CHIPSET_ALI_ALADDIN_V, - .init = machine_at_5aa_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi ALADDiN V] Gigabyte GA-5AA", + .internal_name = "5aa", + .type = MACHINE_TYPE_SOCKETS7, + .chipset = MACHINE_CHIPSET_ALI_ALADDIN_V, + .init = machine_at_5aa_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 = 66666667, - .max_bus = 140000000, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 140000000, .min_voltage = 1300, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 5.5 + .min_multi = 1.5, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 1572864, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1572864, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 M1543C southbridge with on-chip KBC. */ { - .name = "[ALi ALADDiN V] Gigabyte GA-5AX", - .internal_name = "5ax", - .type = MACHINE_TYPE_SOCKETS7, - .chipset = MACHINE_CHIPSET_ALI_ALADDIN_V, - .init = machine_at_5ax_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi ALADDiN V] Gigabyte GA-5AX", + .internal_name = "5ax", + .type = MACHINE_TYPE_SOCKETS7, + .chipset = MACHINE_CHIPSET_ALI_ALADDIN_V, + .init = machine_at_g5x_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 = 66666667, - .max_bus = 140000000, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 140000000, .min_voltage = 1300, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 5.5 + .min_multi = 1.5, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 1572864, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1572864, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &g5x_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL }, /* Is the exact same as the Matsonic MS6260S. Has the ALi M1543C southbridge with on-chip KBC. */ { - .name = "[ALi ALADDiN V] PCChips M579", - .internal_name = "m579", - .type = MACHINE_TYPE_SOCKETS7, - .chipset = MACHINE_CHIPSET_ALI_ALADDIN_V, - .init = machine_at_m579_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi ALADDiN V] PCChips M579", + .internal_name = "m579", + .type = MACHINE_TYPE_SOCKETS7, + .chipset = MACHINE_CHIPSET_ALI_ALADDIN_V, + .init = machine_at_m579_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 = 66666667, - .max_bus = 100000000, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 100000000, .min_voltage = 2000, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 5.5 + .min_multi = 1.5, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, /* Machine has internal sound: C-Media CMI8330 */ - .ram = { - .min = 8192, - .max = 1572864, + .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, + .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 + .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 }, /* SiS 5591 */ /* Has the SiS 5591 chipset with on-chip KBC. */ { - .name = "[SiS 5591] Gigabyte GA-5SG100", - .internal_name = "5sg100", - .type = MACHINE_TYPE_SOCKETS7, - .chipset = MACHINE_CHIPSET_SIS_5591, - .init = machine_at_5sg100_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 5591] Gigabyte GA-5SG100", + .internal_name = "5sg100", + .type = MACHINE_TYPE_SOCKETS7, + .chipset = MACHINE_CHIPSET_SIS_5591, + .init = machine_at_5sg100_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 = 100000000, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 100000000, .min_voltage = 2000, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 5.5 + .min_multi = 1.5, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 786432, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* Apollo MVP3 */ /* Has the VIA VT82C586B southbridge with on-chip KBC identical to the VIA VT82C42N. */ { - .name = "[VIA MVP3] AOpen AX59 Pro", - .internal_name = "ax59pro", - .type = MACHINE_TYPE_SOCKETS7, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_MVP3, - .init = machine_at_ax59pro_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA MVP3] AOpen AX59 Pro", + .internal_name = "ax59pro", + .type = MACHINE_TYPE_SOCKETS7, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_MVP3, + .init = machine_at_ax59pro_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 = 66666667, - .max_bus = 124242424, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 124242424, .min_voltage = 1300, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 5.5 + .min_multi = 1.5, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 1048576, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1048576, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 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, + .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, + .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 + .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, + .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, + .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 + .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. */ { - .name = "[VIA MVP3] FIC VA-503+", - .internal_name = "ficva503p", - .type = MACHINE_TYPE_SOCKETS7, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_MVP3, - .init = machine_at_mvp3_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA MVP3] FIC VA-503+", + .internal_name = "ficva503p", + .type = MACHINE_TYPE_SOCKETS7, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_MVP3, + .init = machine_at_mvp3_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 = 66666667, - .max_bus = 124242424, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 124242424, .min_voltage = 2000, .max_voltage = 3200, - .min_multi = 1.5, - .max_multi = 5.5 + .min_multi = 1.5, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 1048576, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1048576, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 VIA VT82C686A southbridge with on-chip KBC identical to the VIA VT82C42N. */ { - .name = "[VIA MVP3] FIC VA-503A", - .internal_name = "ficva503a", - .type = MACHINE_TYPE_SOCKETS7, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_MVP3, - .init = machine_at_ficva503a_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA MVP3] FIC VA-503A", + .internal_name = "ficva503a", + .type = MACHINE_TYPE_SOCKETS7, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_MVP3, + .init = machine_at_ficva503a_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 = 66666667, - .max_bus = 124242424, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 124242424, .min_voltage = 1800, .max_voltage = 3100, - .min_multi = 1.5, - .max_multi = 5.5 + .min_multi = 1.5, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_A97 | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, - .ram = { - .min = 8192, - .max = 786432, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 VIA VT82C686A southbridge with on-chip KBC identical to the VIA VT82C42N. */ { - .name = "[VIA MVP3] Soyo 5EMA PRO", - .internal_name = "5emapro", - .type = MACHINE_TYPE_SOCKETS7, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_MVP3, - .init = machine_at_5emapro_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA MVP3] Soyo 5EMA PRO", + .internal_name = "5emapro", + .type = MACHINE_TYPE_SOCKETS7, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_MVP3, + .init = machine_at_5emapro_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 = 66666667, - .max_bus = 124242424, + .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 + .min_multi = 1.5, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 786432, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* Socket 8 machines */ /* 450KX */ /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i450KX] AOpen AP61", + .internal_name = "ap61", + .type = MACHINE_TYPE_SOCKET8, + .chipset = MACHINE_CHIPSET_INTEL_450KX, + .init = machine_at_ap61_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, + .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 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 8192, - .max = 524288, + .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, + .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 = 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 + .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 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .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, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_1, + .nvrmask = 127, + .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 + .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, + .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, + .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 + .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, + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_1, + .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, - .snd_device = NULL, - .net_device = NULL + .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, + .snd_device = NULL, + .net_device = NULL }, /* 440FX */ /* Has a SM(S)C FDC37C935 Super I/O chip with on-chip KBC with Phoenix MultiKey/42 (version 1.38) KBC firmware. */ { - .name = "[i440FX] Acer V60N", - .internal_name = "acerv60n", - .type = MACHINE_TYPE_SOCKET8, - .chipset = MACHINE_CHIPSET_INTEL_440FX, - .init = machine_at_acerv60n_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440FX] Acer V60N", + .internal_name = "acerv60n", + .type = MACHINE_TYPE_SOCKET8, + .chipset = MACHINE_CHIPSET_INTEL_440FX, + .init = machine_at_acerv60n_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, + .cpu = { + .package = CPU_PKG_SOCKET8, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, .min_voltage = 2500, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 8192, - .max = 393216, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 8192, + .max = 393216, .step = 8192 }, - .nvrmask = 511, - .jumpered_ecp_dma = 0, + .nvrmask = 511, + .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 + .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 }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, /* Machine has AMB */ - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 8192, - .max = 1048576, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1048576, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 + .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 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440FX] Biostar MB-8600TTC", + .internal_name = "8600ttc", + .type = MACHINE_TYPE_SOCKET8, + .chipset = MACHINE_CHIPSET_INTEL_440FX, + .init = machine_at_8600ttc_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 = 50000000, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_SOCKET8, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 2900, .max_voltage = 3300, - .min_multi = 2.0, - .max_multi = 5.5 + .min_multi = 2.0, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 + .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 }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440FX] Gigabyte GA-686NX", + .internal_name = "686nx", + .type = MACHINE_TYPE_SOCKET8, + .chipset = MACHINE_CHIPSET_INTEL_440FX, + .init = machine_at_686nx_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, + .cpu = { + .package = CPU_PKG_SOCKET8, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, .min_voltage = 2100, .max_voltage = 3500, - .min_multi = 2.0, - .max_multi = 5.5 + .min_multi = 2.0, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* 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 = "[i440FX] Intel AP440FX (Apollo)", - .internal_name = "ap440fx", - .type = MACHINE_TYPE_SOCKET8, - .chipset = MACHINE_CHIPSET_INTEL_440FX, - .init = machine_at_ap440fx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440FX] Intel AP440FX (Apollo)", + .internal_name = "ap440fx", + .type = MACHINE_TYPE_SOCKET8, + .chipset = MACHINE_CHIPSET_INTEL_440FX, + .init = machine_at_ap440fx_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, + .cpu = { + .package = CPU_PKG_SOCKET8, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, .min_voltage = 2100, .max_voltage = 3500, - .min_multi = 2.0, - .max_multi = 3.5 + .min_multi = 2.0, + .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_SOUND | MACHINE_VIDEO | MACHINE_USB, /* Machine has internal video: S3 ViRGE/DX and sound: Crystal CS4236B */ - .ram = { - .min = 8192, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_SOUND | MACHINE_VIDEO | MACHINE_USB, /* Machine has internal video: S3 ViRGE/DX and sound: Crystal CS4236B */ + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .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_325_onboard_pci_device, - .snd_device = &cs4236b_onboard_device, - .net_device = NULL + .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_325_onboard_pci_device, + .snd_device = &cs4236b_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 = "[i440FX] Intel VS440FX (Venus)", - .internal_name = "vs440fx", - .type = MACHINE_TYPE_SOCKET8, - .chipset = MACHINE_CHIPSET_INTEL_440FX, - .init = machine_at_vs440fx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440FX] Intel VS440FX (Venus)", + .internal_name = "vs440fx", + .type = MACHINE_TYPE_SOCKET8, + .chipset = MACHINE_CHIPSET_INTEL_440FX, + .init = machine_at_vs440fx_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, + .cpu = { + .package = CPU_PKG_SOCKET8, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, .min_voltage = 2100, .max_voltage = 3500, - .min_multi = 2.0, - .max_multi = 3.5 + .min_multi = 2.0, + .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = &vs440fx_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = &cs4236_onboard_device, - .net_device = NULL + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &vs440fx_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = &cs4236_onboard_device, + .net_device = NULL }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .cpu = { + .package = CPU_PKG_SOCKET8, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, .min_voltage = 2500, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .min_multi = 1.5, + .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-7880U */ - .ram = { - .min = 40960, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, /* Machine has internal SCSI: Adaptec AIC-7880U */ + .ram = { + .min = 40960, + .max = 524288, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .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 + .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 a SM(S)C FDC37C935 Super I/O chip with on-chip KBC with Phoenix MultiKey/42 (version 1.38) KBC firmware. */ { - .name = "[i440FX] Micronics M6Mi", - .internal_name = "m6mi", - .type = MACHINE_TYPE_SOCKET8, - .chipset = MACHINE_CHIPSET_INTEL_440FX, - .init = machine_at_m6mi_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440FX] Micronics M6Mi", + .internal_name = "m6mi", + .type = MACHINE_TYPE_SOCKET8, + .chipset = MACHINE_CHIPSET_INTEL_440FX, + .init = machine_at_m6mi_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, + .cpu = { + .package = CPU_PKG_SOCKET8, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, .min_voltage = 2900, .max_voltage = 3300, - .min_multi = 1.5, - .max_multi = 8.0 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, /* Machine has internal sound: Creative Vibra 16C */ - .ram = { - .min = 8192, - .max = 786432, + .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, + .nvrmask = 511, + .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 + .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 VIA VT82C42N KBC. */ { - .name = "[i440FX] PCPartner MB600N", - .internal_name = "mb600n", - .type = MACHINE_TYPE_SOCKET8, - .chipset = MACHINE_CHIPSET_INTEL_440FX, - .init = machine_at_mb600n_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440FX] PCPartner MB600N", + .internal_name = "mb600n", + .type = MACHINE_TYPE_SOCKET8, + .chipset = MACHINE_CHIPSET_INTEL_440FX, + .init = machine_at_mb600n_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, + .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 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 + .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 }, /* Slot 1 machines */ /* ALi ALADDiN-PRO II */ /* Has the ALi M1543C southbridge with on-chip KBC. */ { - .name = "[ALi ALADDiN-PRO II] PCChips M729", - .internal_name = "m729", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_ALI_ALADDIN_PRO_II, - .init = machine_at_m729_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[ALi ALADDiN-PRO II] PCChips M729", + .internal_name = "m729", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_ALI_ALADDIN_PRO_II, + .init = machine_at_m729_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, + .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 + .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_GAMEPORT | MACHINE_USB, /* Machine has internal sound: C-Media CMI8330 */ - .ram = { - .min = 8192, - .max = 1572864, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, /* Machine has internal sound: C-Media CMI8330 */ + .ram = { + .min = 8192, + .max = 1572864, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* 440FX */ /* Has a SM(S)C FDC37C935 Super I/O chip with on-chip KBC with Phoenix MultiKey/42 (version 1.38) KBC firmware. */ { - .name = "[i440FX] Acer V62X", - .internal_name = "acerv62x", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440FX, - .init = machine_at_acerv62x_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440FX] Acer V62X", + .internal_name = "acerv62x", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440FX, + .init = machine_at_acerv62x_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 = 60000000, - .max_bus = 83333333, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 83333333, .min_voltage = 1800, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 8192, - .max = 393216, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 8192, + .max = 393216, .step = 8192 }, - .nvrmask = 511, - .jumpered_ecp_dma = 0, + .nvrmask = 511, + .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 + .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 }, /* 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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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 = 66666667, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 1800, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 8192, - .max = 1048576, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1048576, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 + .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. */ { - .name = "[i440FX] ASUS KN97", - .internal_name = "kn97", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440FX, - .init = machine_at_kn97_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440FX] ASUS KN97", + .internal_name = "kn97", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440FX, + .init = machine_at_kn97_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 = 60000000, - .max_bus = 83333333, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 83333333, .min_voltage = 2800, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, - .ram = { - .min = 8192, - .max = 786432, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, + .nvrmask = 127, + .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 + .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 }, /* 440LX */ /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[i440LX] ABIT AB-LX6", - .internal_name = "lx6", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440LX, - .init = machine_at_lx6_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440LX] ABIT AB-LX6", + .internal_name = "lx6", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440LX, + .init = machine_at_lx6_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 = 60000000, - .max_bus = 83333333, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 83333333, .min_voltage = 1500, .max_voltage = 3500, - .min_multi = 2.0, - .max_multi = 5.5 + .min_multi = 2.0, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 1048576, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1048576, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &lx6_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL }, /* Has a National Semiconductor PC87307 Super I/O with on-chip KBC, which has one of these firmwares: AMI '5' MegaKey, Phoenix MultiKey/42 1.37, or Phoenix MultiKey/42i 4.16. */ { - .name = "[i440LX] Dell OptiPlex GXa", - .internal_name = "optiplexgxa", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440LX, - .init = machine_at_optiplexgxa_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440LX] Dell OptiPlex GXa", + .internal_name = "optiplexgxa", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440LX, + .init = machine_at_optiplexgxa_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(CPU_PENTIUMPRO, CPU_CYRIX3S), - .min_bus = 66666667, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK(CPU_PENTIUMPRO, CPU_CYRIX3S), + .min_bus = 66666667, + .max_bus = 66666667, .min_voltage = 1800, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 5.0 + .min_multi = 1.5, + .max_multi = 5.0 }, .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, - .max = 786432, + .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, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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, /* not yet emulated */ - .snd_device = &cs4236b_device, - .net_device = NULL /* not yet emulated */ + .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, /* not yet emulated */ + .snd_device = &cs4236b_device, + .net_device = NULL /* not yet emulated */ }, /* Has a SM(S)C FDC37C935 Super I/O chip with on-chip KBC with Phoenix MultiKey/42 (version 1.38) KBC firmware. */ { - .name = "[i440LX] Micronics Spitfire", - .internal_name = "spitfire", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440LX, - .init = machine_at_spitfire_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440LX] Micronics Spitfire", + .internal_name = "spitfire", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440LX, + .init = machine_at_spitfire_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 = 66666667, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 66666667, .min_voltage = 1800, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .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 sound: Yamaha YMF701 */ - .ram = { - .min = 8192, - .max = 1048576, + .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, + .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 + .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 SM(S)C FDC37C67x Super I/O chip with on-chip KBC with Phoenix or AMIKey-2 KBC firmware. */ { - .name = "[i440LX] NEC Mate NX MA30D/23D", - .internal_name = "ma30d", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440LX, - .init = machine_at_ma30d_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440LX] NEC Mate NX MA30D/23D", + .internal_name = "ma30d", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440LX, + .init = machine_at_ma30d_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 = 66666667, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 66666667, .min_voltage = 1800, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .min_multi = 1.5, + .max_multi = 8.0 }, .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, - .max = 786432, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .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, - .snd_device = NULL, - .net_device = NULL + .kbc_device = NULL, + .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, + .snd_device = NULL, + .net_device = NULL }, /* 440EX */ /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[i440EX] QDI EXCELLENT II", - .internal_name = "p6i440e2", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440EX, - .init = machine_at_p6i440e2_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440EX] QDI EXCELLENT II", + .internal_name = "p6i440e2", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440EX, + .init = machine_at_p6i440e2_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 = 83333333, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 83333333, .min_voltage = 1800, .max_voltage = 3500, - .min_multi = 3.0, - .max_multi = 8.0 + .min_multi = 3.0, + .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 = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* 440BX */ /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[i440BX] ABIT AB-BF6", - .internal_name = "bf6", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_bf6_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440BX] ABIT AB-BF6", + .internal_name = "bf6", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_bf6_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 = 133333333, + .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 + .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, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[i440BX] ABIT AB-BX6", - .internal_name = "bx6", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_bx6_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440BX] ABIT AB-BX6", + .internal_name = "bx6", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_bx6_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 = 133333333, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 133333333, .min_voltage = 1500, .max_voltage = 3500, - .min_multi = 2.0, - .max_multi = 5.5 + .min_multi = 2.0, + .max_multi = 5.5 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 = &bx6_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &bx6_device, + .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] AOpen AX6BC", - .internal_name = "ax6bc", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_ax6bc_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440BX] AOpen AX6BC", + .internal_name = "ax6bc", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_ax6bc_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 = 112121212, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 112121212, .min_voltage = 1800, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .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, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 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, + .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, + .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 + .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, + .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, + .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 + .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, + .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, + .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 + .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, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1048576, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[i440BX] Gigabyte GA-686BX", - .internal_name = "686bx", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_686bx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440BX] Gigabyte GA-686BX", + .internal_name = "686bx", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_ga686_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, + .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 + .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, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1048576, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &ga686_device, + .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 (updated 'H') KBC firmware. */ { - .name = "[i440BX] MSI MS-6119", - .internal_name = "ms6119", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_ms6119_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440BX] MSI MS-6119", + .internal_name = "ms6119", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_ms6119_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, + .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 + .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, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 = &ms6119_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &ms6119_device, + .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, + .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, + .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 + .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, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 National Semiconductors PC87309 Super I/O chip with on-chip KBC with most likely AMIKey-2 KBC firmware. */ { - .name = "[i440BX] Tyan Tsunami ATX", - .internal_name = "s1846", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_s1846_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440BX] Tyan Tsunami ATX", + .internal_name = "s1846", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_s1846_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 = 112121212, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 112121212, .min_voltage = 1800, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, /* Machine has internal sound: Ensoniq ES1371 */ - .ram = { - .min = 8192, - .max = 786432, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, /* Machine has internal sound: Ensoniq ES1371 */ + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .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 = &es1371_onboard_device, - .net_device = NULL + .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 = &es1371_onboard_device, + .net_device = NULL }, /* 440ZX */ /* Has a SM(S)C FDC37M60x Super I/O chip with on-chip KBC with most likely AMIKey-2 KBC firmware. */ { - .name = "[i440ZX] HP Vectra VEi 8", - .internal_name = "vei8", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440ZX, - .init = machine_at_vei8_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440ZX] HP Vectra VEi 8", + .internal_name = "vei8", + .type = MACHINE_TYPE_SLOT1, + .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, - .cpu = { - .package = CPU_PKG_SLOT1, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 100000000, + .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 + .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, + .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, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .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 = NULL, - .net_device = NULL + .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 = NULL, + .net_device = NULL }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[i440ZX] MSI MS-6168", - .internal_name = "ms6168", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_INTEL_440ZX, - .init = machine_at_ms6168_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440ZX] MSI MS-6168", + .internal_name = "ms6168", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_INTEL_440ZX, + .init = machine_at_ms6168_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, + .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 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, /* AGP is reserved for the internal video */ - .flags = MACHINE_IDE_DUAL | MACHINE_AV | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_AV | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 = &voodoo_3_2000_agp_onboard_8m_device, - .snd_device = &es1373_onboard_device, - .net_device = NULL + .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 = &voodoo_3_2000_agp_onboard_8m_device, + .snd_device = &es1373_onboard_device, + .net_device = NULL }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = 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, + .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 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, /* AGP is reserved for the internal video */ - .flags = MACHINE_IDE_DUAL | MACHINE_AV | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_AV | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 = &voodoo_3_2000_agp_onboard_8m_device, - .snd_device = &es1373_onboard_device, - .net_device = NULL + .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 = &voodoo_3_2000_agp_onboard_8m_device, + .snd_device = &es1373_onboard_device, + .net_device = NULL }, /* SiS (5)600 */ /* Has the SiS (5)600 chipset with on-chip KBC. */ { - .name = "[SiS 5600] Freetech/Flexus P6F99", - .internal_name = "p6f99", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_SIS_5600, - .init = machine_at_p6f99_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 5600] Freetech/Flexus P6F99", + .internal_name = "p6f99", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_SIS_5600, + .init = machine_at_p6f99_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, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 100000000, .min_voltage = 1300, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, /* Machine has internal sound: Ensoniq ES1373 */ - .ram = { - .min = 8192, - .max = 1572864, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, /* Machine has internal sound: Ensoniq ES1373 */ + .ram = { + .min = 8192, + .max = 1572864, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 = &es1373_onboard_device, - .net_device = NULL + .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 = &es1373_onboard_device, + .net_device = NULL }, /* Has the SiS (5)600 chipset with on-chip KBC. */ { - .name = "[SiS 5600] PCChips M747", - .internal_name = "m747", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_SIS_5600, - .init = machine_at_m747_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 5600] PCChips M747", + .internal_name = "m747", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_SIS_5600, + .init = machine_at_m747_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, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 100000000, .min_voltage = 1300, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .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: SiS 6326 and internal sound: C-Media CMI8330 */ - .ram = { - .min = 8192, - .max = 1572864, + .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, + .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 + .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 }, /* SMSC VictoryBX-66 */ /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[SMSC VictoryBX-66] A-Trend ATC6310BXII", - .internal_name = "atc6310bxii", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_SMSC_VICTORYBX_66, - .init = machine_at_atc6310bxii_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SMSC VictoryBX-66] A-Trend ATC6310BXII", + .internal_name = "atc6310bxii", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_SMSC_VICTORYBX_66, + .init = machine_at_atc6310bxii_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 = 133333333, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 133333333, .min_voltage = 1300, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .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, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* VIA Apollo Pro */ /* Has the VIA VT82C596B southbridge with on-chip KBC identical to the VIA VT82C42N. */ { - .name = "[VIA Apollo Pro] FIC KA-6130", - .internal_name = "ficka6130", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO, - .init = machine_at_ficka6130_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA Apollo Pro] FIC KA-6130", + .internal_name = "ficka6130", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO, + .init = machine_at_ficka6130_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, + .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 + .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_GAMEPORT | MACHINE_USB, /* Machine has internal sound: ESS ES1938S */ - .ram = { - .min = 8192, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, /* Machine has internal sound: ESS ES1938S */ + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 = "[VIA Apollo Pro 133] ASUS P3V133", - .internal_name = "p3v133", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133, - .init = machine_at_p3v133_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA Apollo Pro 133] ASUS P3V133", + .internal_name = "p3v133", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133, + .init = machine_at_p3v133_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, + .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 + .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 = 1572864, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1572864, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 = "[VIA Apollo Pro 133A] ASUS P3V4X", - .internal_name = "p3v4x", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, - .init = machine_at_p3v4x_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA Apollo Pro 133A] ASUS P3V4X", + .internal_name = "p3v4x", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, + .init = machine_at_p3v4x_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(CPU_PENTIUMPRO), - .min_bus = 66666667, - .max_bus = 150000000, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK(CPU_PENTIUMPRO), + .min_bus = 66666667, + .max_bus = 150000000, .min_voltage = 1300, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .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 = 2097152, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 2097152, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 = "[VIA Apollo Pro 133A] BCM GT694VA", - .internal_name = "gt694va", - .type = MACHINE_TYPE_SLOT1, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, - .init = machine_at_gt694va_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA Apollo Pro 133A] BCM GT694VA", + .internal_name = "gt694va", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, + .init = machine_at_gt694va_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 = 133333333, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 133333333, .min_voltage = 1300, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, /* Machine has internal sound: Ensoniq ES1373 */ - .ram = { - .min = 8192, - .max = 3145728, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, /* Machine has internal sound: Ensoniq ES1373 */ + .ram = { + .min = 8192, + .max = 3145728, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .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 = &es1373_onboard_device, - .net_device = NULL + .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 = &es1373_onboard_device, + .net_device = NULL }, /* Slot 1/2 machines */ @@ -18275,47 +18595,47 @@ const machine_t machines[] = { /* Has a National Semiconductors PC87309 Super I/O chip with on-chip KBC with most likely AMIKey-2 KBC firmware. */ { - .name = "[i440GX] Freeway FW-6400GX", - .internal_name = "fw6400gx", - .type = MACHINE_TYPE_SLOT1_2, - .chipset = MACHINE_CHIPSET_INTEL_440GX, - .init = machine_at_fw6400gx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440GX] Freeway FW-6400GX", + .internal_name = "fw6400gx", + .type = MACHINE_TYPE_SLOT1_2, + .chipset = MACHINE_CHIPSET_INTEL_440GX, + .init = machine_at_fw6400gx_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SLOT1 | CPU_PKG_SLOT2, - .block = CPU_BLOCK_NONE, - .min_bus = 100000000, - .max_bus = 150000000, + .cpu = { + .package = CPU_PKG_SLOT1 | CPU_PKG_SLOT2, + .block = CPU_BLOCK_NONE, + .min_bus = 100000000, + .max_bus = 150000000, .min_voltage = 1800, .max_voltage = 3500, - .min_multi = 3.0, - .max_multi = 8.0 + .min_multi = 3.0, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_NOISA | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 16384, - .max = 2097152, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 16384, + .max = 2097152, .step = 16384 }, - .nvrmask = 511, - .jumpered_ecp_dma = 0, + .nvrmask = 511, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .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 = NULL, - .net_device = NULL + .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 = NULL, + .net_device = NULL }, /* Slot 1/Socket 370 machines */ @@ -18323,138 +18643,138 @@ const machine_t machines[] = { /* 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.*/ { - .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 = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .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 = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SLOT1 | CPU_PKG_SOCKET370, - .block = CPU_BLOCK(CPU_PENTIUMPRO, CPU_CYRIX3S), /* Instability issues with PPro, and garbled text in POST with Cyrix */ - .min_bus = 66666667, - .max_bus = 100000000, + .cpu = { + .package = CPU_PKG_SLOT1 | CPU_PKG_SOCKET370, + .block = CPU_BLOCK(CPU_PENTIUMPRO, CPU_CYRIX3S), /* Instability issues with PPro, and garbled text in POST with Cyrix */ + .min_bus = 66666667, + .max_bus = 100000000, .min_voltage = 1300, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 786432, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 = &cmi8738_onboard_device, - .net_device = NULL + .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 = &cmi8738_onboard_device, + .net_device = NULL }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[i440BX] Tyan Trinity 371", - .internal_name = "s1857", - .type = MACHINE_TYPE_SLOT1_370, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_s1857_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440BX] Tyan Trinity 371", + .internal_name = "s1857", + .type = MACHINE_TYPE_SLOT1_370, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_s1857_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SLOT1 | CPU_PKG_SOCKET370, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 133333333, + .cpu = { + .package = CPU_PKG_SLOT1 | CPU_PKG_SOCKET370, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 133333333, .min_voltage = 1300, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 786432, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 = &es1373_onboard_device, - .net_device = NULL + .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 = &es1373_onboard_device, + .net_device = NULL }, /* VIA Apollo Pro */ /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[VIA Apollo Pro 133] ECS P6BAT-A+", - .internal_name = "p6bat", - .type = MACHINE_TYPE_SLOT1_370, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133, - .init = machine_at_p6bat_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA Apollo Pro 133] ECS P6BAT-A+", + .internal_name = "p6bat", + .type = MACHINE_TYPE_SLOT1_370, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133, + .init = machine_at_p6bat_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SLOT1 | CPU_PKG_SOCKET370, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 133333333, + .cpu = { + .package = CPU_PKG_SLOT1 | CPU_PKG_SOCKET370, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 133333333, .min_voltage = 1300, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 1572864, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1572864, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 = &cmi8738_onboard_device, - .net_device = NULL + .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 = &cmi8738_onboard_device, + .net_device = NULL }, /* Slot 2 machines */ @@ -18462,92 +18782,92 @@ const machine_t machines[] = { /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[i440GX] Gigabyte GA-6GXU", - .internal_name = "6gxu", - .type = MACHINE_TYPE_SLOT2, - .chipset = MACHINE_CHIPSET_INTEL_440GX, - .init = machine_at_6gxu_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440GX] Gigabyte GA-6GXU", + .internal_name = "6gxu", + .type = MACHINE_TYPE_SLOT2, + .chipset = MACHINE_CHIPSET_INTEL_440GX, + .init = machine_at_6gxu_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SLOT2, - .block = CPU_BLOCK_NONE, - .min_bus = 100000000, - .max_bus = 100000000, + .cpu = { + .package = CPU_PKG_SLOT2, + .block = CPU_BLOCK_NONE, + .min_bus = 100000000, + .max_bus = 100000000, .min_voltage = 1800, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .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 */ - .ram = { - .min = 16384, - .max = 2097152, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, /* Machine has internal SCSI */ + .ram = { + .min = 16384, + .max = 2097152, .step = 16384 }, - .nvrmask = 511, - .jumpered_ecp_dma = 0, + .nvrmask = 511, + .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 + .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 W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[i440GX] Supermicro S2DGE", - .internal_name = "s2dge", - .type = MACHINE_TYPE_SLOT2, - .chipset = MACHINE_CHIPSET_INTEL_440GX, - .init = machine_at_s2dge_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440GX] Supermicro S2DGE", + .internal_name = "s2dge", + .type = MACHINE_TYPE_SLOT2, + .chipset = MACHINE_CHIPSET_INTEL_440GX, + .init = machine_at_s2dge_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SLOT2, - .block = CPU_BLOCK_NONE, - .min_bus = 66666667, - .max_bus = 100000000, + .cpu = { + .package = CPU_PKG_SLOT2, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 100000000, .min_voltage = 1800, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .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 = 16384, - .max = 2097152, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 16384, + .max = 2097152, .step = 16384 }, - .nvrmask = 511, - .jumpered_ecp_dma = 0, + .nvrmask = 511, + .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 + .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 }, /* PGA370 machines */ @@ -18555,646 +18875,646 @@ const machine_t machines[] = { /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[i440LX] Supermicro 370SLM", - .internal_name = "s370slm", - .type = MACHINE_TYPE_SOCKET370, - .chipset = MACHINE_CHIPSET_INTEL_440LX, - .init = machine_at_s370slm_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440LX] Supermicro 370SLM", + .internal_name = "s370slm", + .type = MACHINE_TYPE_SOCKET370, + .chipset = MACHINE_CHIPSET_INTEL_440LX, + .init = machine_at_s370slm_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 = 100000000, + .cpu = { + .package = CPU_PKG_SOCKET370, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 100000000, .min_voltage = 1800, .max_voltage = 3500, - .min_multi = MACHINE_MULTIPLIER_FIXED, - .max_multi = MACHINE_MULTIPLIER_FIXED, + .min_multi = MACHINE_MULTIPLIER_FIXED, + .max_multi = MACHINE_MULTIPLIER_FIXED, }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 786432, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* 440BX */ /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[i440BX] AEWIN AW-O671R", - .internal_name = "awo671r", - .type = MACHINE_TYPE_SOCKET370, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_awo671r_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440BX] AEWIN AW-O671R", + .internal_name = "awo671r", + .type = MACHINE_TYPE_SOCKET370, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_awo671r_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 = 133333333, + .cpu = { + .package = CPU_PKG_SOCKET370, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 133333333, .min_voltage = 1300, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 /* limits assumed */ + .min_multi = 1.5, + .max_multi = 8.0 /* limits assumed */ }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, /* Machine has EISA, possibly for a riser? */ /* Yes, that's a rise slot, not EISA. */ - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB | MACHINE_VIDEO, /* Machine has internal video: C&T B69000, sound: ESS ES1938S and NIC: Realtek RTL8139C */ - .ram = { - .min = 8192, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB | MACHINE_VIDEO, /* Machine has internal video: C&T B69000, sound: ESS ES1938S and NIC: Realtek RTL8139C */ + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 = &chips_69000_onboard_device, - .snd_device = NULL, - .net_device = NULL + .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 = &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] AmazePC AM-BX133", - .internal_name = "ambx133", - .type = MACHINE_TYPE_SOCKET370, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_ambx133_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440BX] AmazePC AM-BX133", + .internal_name = "ambx133", + .type = MACHINE_TYPE_SOCKET370, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_ambx133_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 = 133333333, + .cpu = { + .package = CPU_PKG_SOCKET370, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 133333333, .min_voltage = 1300, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 /* limits assumed */ + .min_multi = 1.5, + .max_multi = 8.0 /* limits assumed */ }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 786432, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 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, + .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, + .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 + .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, + .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, + .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 + .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 }, /* 440ZX */ /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[i440ZX] Soltek SL-63A1", - .internal_name = "63a1", - .type = MACHINE_TYPE_SOCKET370, - .chipset = MACHINE_CHIPSET_INTEL_440ZX, - .init = machine_at_63a1_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440ZX] Soltek SL-63A1", + .internal_name = "63a1", + .type = MACHINE_TYPE_SOCKET370, + .chipset = MACHINE_CHIPSET_INTEL_440ZX, + .init = machine_at_63a1_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 = 100000000, + .cpu = { + .package = CPU_PKG_SOCKET370, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 100000000, .min_voltage = 1800, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .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 = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* SiS (5)600 */ /* Has the SiS 600 chipset, which is a re-brand of the 5600, with on-chip KBC. */ { - .name = "[SiS 600] Soyo SY-7SBB", - .internal_name = "7sbb", - .type = MACHINE_TYPE_SOCKET370, - .chipset = MACHINE_CHIPSET_SIS_5600, - .init = machine_at_7sbb_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SiS 600] Soyo SY-7SBB", + .internal_name = "7sbb", + .type = MACHINE_TYPE_SOCKET370, + .chipset = MACHINE_CHIPSET_SIS_5600, + .init = machine_at_7sbb_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(CPU_CYRIX3S), - .min_bus = 60000000, - .max_bus = 100000000, + .cpu = { + .package = CPU_PKG_SOCKET370, + .block = CPU_BLOCK(CPU_CYRIX3S), + .min_bus = 60000000, + .max_bus = 100000000, .min_voltage = 1800, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .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 = 1572864, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1572864, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 }, /* SMSC VictoryBX-66 */ /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[SMSC VictoryBX-66] A-Trend ATC7020BXII", - .internal_name = "atc7020bxii", - .type = MACHINE_TYPE_SOCKET370, - .chipset = MACHINE_CHIPSET_SMSC_VICTORYBX_66, - .init = machine_at_atc7020bxii_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SMSC VictoryBX-66] A-Trend ATC7020BXII", + .internal_name = "atc7020bxii", + .type = MACHINE_TYPE_SOCKET370, + .chipset = MACHINE_CHIPSET_SMSC_VICTORYBX_66, + .init = machine_at_atc7020bxii_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 = 133333333, + .cpu = { + .package = CPU_PKG_SOCKET370, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 133333333, .min_voltage = 1300, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .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, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1048576, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 an ITE IT8671F Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[SMSC VictoryBX-66] PCChips M773", - .internal_name = "m773", - .type = MACHINE_TYPE_SOCKET370, - .chipset = MACHINE_CHIPSET_SMSC_VICTORYBX_66, - .init = machine_at_m773_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[SMSC VictoryBX-66] PCChips M773", + .internal_name = "m773", + .type = MACHINE_TYPE_SOCKET370, + .chipset = MACHINE_CHIPSET_SMSC_VICTORYBX_66, + .init = machine_at_m773_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 = 133333333, + .cpu = { + .package = CPU_PKG_SOCKET370, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 133333333, .min_voltage = 1300, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_AGP | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, + .ram = { + .min = 8192, + .max = 524288, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 = &cmi8738_onboard_device, - .net_device = NULL + .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 = &cmi8738_onboard_device, + .net_device = NULL }, /* VIA Apollo Pro */ /* Has the VIA VT82C586B southbridge with on-chip KBC identical to the VIA VT82C42N. */ { - .name = "[VIA Apollo Pro] PCPartner APAS3", - .internal_name = "apas3", - .type = MACHINE_TYPE_SOCKET370, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO, - .init = machine_at_apas3_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA Apollo Pro] PCPartner APAS3", + .internal_name = "apas3", + .type = MACHINE_TYPE_SOCKET370, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO, + .init = machine_at_apas3_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 = 100000000, + .cpu = { + .package = CPU_PKG_SOCKET370, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 100000000, .min_voltage = 1800, .max_voltage = 3500, - .min_multi = 1.5, - .max_multi = 8.0 + .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 video: Creative Vibra 16XV */ - .ram = { - .min = 8192, - .max = 786432, + .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, + .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 + .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 = "[VIA Apollo Pro 133] ECS P6BAP-A+", - .internal_name = "p6bap", - .type = MACHINE_TYPE_SOCKET370, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133, - .init = machine_at_p6bap_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA Apollo Pro 133] ECS P6BAP-A+", + .internal_name = "p6bap", + .type = MACHINE_TYPE_SOCKET370, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133, + .init = machine_at_p6bap_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, + .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 + .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_GAMEPORT | MACHINE_USB | MACHINE_SOUND, - .ram = { - .min = 8192, - .max = 1572864, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB | MACHINE_SOUND, + .ram = { + .min = 8192, + .max = 1572864, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 = &cmi8738_onboard_device, - .net_device = NULL + .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 = &cmi8738_onboard_device, + .net_device = NULL }, /* Has the VIA VT82C686B southbridge with on-chip KBC identical to the VIA VT82C42N. */ { - .name = "[VIA Apollo Pro 133A] Acorp 6VIA90AP", - .internal_name = "6via90ap", - .type = MACHINE_TYPE_SOCKET370, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, - .init = machine_at_6via90ap_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA Apollo Pro 133A] Acorp 6VIA90AP", + .internal_name = "6via90ap", + .type = MACHINE_TYPE_SOCKET370, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, + .init = machine_at_6via90ap_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, + .cpu = { + .package = CPU_PKG_SOCKET370, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 150000000, .min_voltage = 1300, .max_voltage = 3500, - .min_multi = MACHINE_MULTIPLIER_FIXED, - .max_multi = MACHINE_MULTIPLIER_FIXED + .min_multi = MACHINE_MULTIPLIER_FIXED, + .max_multi = MACHINE_MULTIPLIER_FIXED }, .bus_flags = MACHINE_PS2_A97 | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_AG | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, - .ram = { - .min = 16384, - .max = 3145728, + .flags = MACHINE_IDE_DUAL | MACHINE_AG | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, + .ram = { + .min = 16384, + .max = 3145728, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 VIA VT82C686B southbridge with on-chip KBC identical to the VIA VT82C42N. */ { - .name = "[VIA Apollo Pro 133A] ASUS CUV4X-LS", - .internal_name = "cuv4xls", - .type = MACHINE_TYPE_SOCKET370, - .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, - .init = machine_at_cuv4xls_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[VIA Apollo Pro 133A] ASUS CUV4X-LS", + .internal_name = "cuv4xls", + .type = MACHINE_TYPE_SOCKET370, + .chipset = MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, + .init = machine_at_cuv4xls_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, + .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 + .min_multi = 1.5, + .max_multi = 8.0 }, .bus_flags = MACHINE_PS2_NOI97 | MACHINE_BUS_USB, /* Has Asus-proprietary LAN/SCSI slot */ - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, - .ram = { - .min = 16384, - .max = 4194304, + .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, + .ram = { + .min = 16384, + .max = 4194304, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 = &cmi8738_onboard_device, - .net_device = NULL + .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 = &cmi8738_onboard_device, + .net_device = NULL }, /* Miscellaneous/Fake/Hypervisor machines */ /* Has a Winbond W83977F Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { - .name = "[i440BX] Microsoft Virtual PC 2007", - .internal_name = "vpc2007", - .type = MACHINE_TYPE_MISC, - .chipset = MACHINE_CHIPSET_INTEL_440BX, - .init = machine_at_vpc2007_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i440BX] Microsoft Virtual PC 2007", + .internal_name = "vpc2007", + .type = MACHINE_TYPE_MISC, + .chipset = MACHINE_CHIPSET_INTEL_440BX, + .init = machine_at_vpc2007_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(CPU_PENTIUMPRO, CPU_PENTIUM2, CPU_CYRIX3S), - .min_bus = 0, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK(CPU_PENTIUMPRO, CPU_PENTIUM2, CPU_CYRIX3S), + .min_bus = 0, + .max_bus = 66666667, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, - .ram = { - .min = 8192, - .max = 1048576, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1048576, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .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 + .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 }, { - .name = NULL, - .internal_name = NULL, - .type = MACHINE_TYPE_NONE, - .chipset = MACHINE_CHIPSET_NONE, - .init = NULL, - .p1_handler = NULL, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = NULL, + .internal_name = NULL, + .type = MACHINE_TYPE_NONE, + .chipset = MACHINE_CHIPSET_NONE, + .init = NULL, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = 0, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, + .cpu = { + .package = 0, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, .min_voltage = 0, .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 + .min_multi = 0, + .max_multi = 0 }, .bus_flags = MACHINE_BUS_NONE, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 0, - .max = 0, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 0, + .max = 0, .step = 0 }, - .nvrmask = 0, - .jumpered_ecp_dma = 0, + .nvrmask = 0, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .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, - .snd_device = NULL, - .net_device = NULL + .kbc_device = NULL, + .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, + .snd_device = NULL, + .net_device = NULL } - // clang-format on + // clang-format on }; /* This is so Disabled comes first. */ @@ -19212,7 +19532,7 @@ static uint32_t machine_gpio; static uint32_t machine_gpio_acpi_default; static uint32_t machine_gpio_acpi; -static int machine_is_ps2 = 0; +static int machine_is_ps2 = 0; void *machine_snd = NULL; @@ -19531,7 +19851,7 @@ machine_has_bus(int m, int bus_flags) if ((bus_flags & MACHINE_BUS_XT_KBD) && !(machines[m].bus_flags & MACHINE_BUS_ISA16) && (!(machines[m].bus_flags & MACHINE_BUS_PS2_PORTS) || - !(strcmp(machine_get_internal_name(), "pc5086")))) + (machines[m].init == machine_xt_pc5086_init))) ret |= MACHINE_BUS_XT_KBD; #ifdef ONLY_AT_KBD_ON_AT_KBC diff --git a/src/mem/catalyst_flash.c b/src/mem/catalyst_flash.c index 5c8812464..da9bfc249 100644 --- a/src/mem/catalyst_flash.c +++ b/src/mem/catalyst_flash.c @@ -9,8 +9,6 @@ * Implementation of the Intel 1 Mbit and 2 Mbit, 8-bit and * 16-bit flash devices. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/mem/i2c_eeprom.c b/src/mem/i2c_eeprom.c index a8ae7ed04..75b13a801 100644 --- a/src/mem/i2c_eeprom.c +++ b/src/mem/i2c_eeprom.c @@ -8,8 +8,6 @@ * * Emulation of the 24Cxx series of I2C EEPROMs. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. diff --git a/src/mem/intel_flash.c b/src/mem/intel_flash.c index e193f3545..50e8016ce 100644 --- a/src/mem/intel_flash.c +++ b/src/mem/intel_flash.c @@ -9,8 +9,6 @@ * Implementation of the Intel 1 Mbit and 2 Mbit, 8-bit and * 16-bit flash devices. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/mem/mmu_2386.c b/src/mem/mmu_2386.c index ebf062d95..21a5c43a3 100644 --- a/src/mem/mmu_2386.c +++ b/src/mem/mmu_2386.c @@ -1,20 +1,20 @@ /* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * Memory handling and MMU. + * Memory handling and MMU. * - * Authors: Sarah Walker, - * Miran Grca, - * Fred N. van Kempen, + * Authors: Sarah Walker, + * Miran Grca, + * Fred N. van Kempen, * - * Copyright 2008-2020 Sarah Walker. - * Copyright 2016-2020 Miran Grca. - * Copyright 2017-2020 Fred N. van Kempen. + * Copyright 2008-2020 Sarah Walker. + * Copyright 2016-2020 Miran Grca. + * Copyright 2017-2020 Fred N. van Kempen. */ #include #include @@ -1048,7 +1048,7 @@ do_mmutranslate_2386(uint32_t addr, uint32_t *a64, int num, int write) mem_debug_check_addr(addr, write ? 2 : read_type); for (i = 0; i < num; i++) - a64[i] = (uint64_t) addr; + a64[i] = (uint64_t) addr; if (!(temp_cr0 >> 31)) return; diff --git a/src/mem/nmc93cxx.c b/src/mem/nmc93cxx.c index 50905bae2..17d97591e 100644 --- a/src/mem/nmc93cxx.c +++ b/src/mem/nmc93cxx.c @@ -8,14 +8,12 @@ * * Emulation of National Semiconductors NMC93Cxx EEPROMs. * - * * Authors: Cacodemon345 * * Copyright 2023 Cacodemon345 */ /* Ported over from QEMU */ - #include #include #include diff --git a/src/mem/rom.c b/src/mem/rom.c index f7b2b2b0d..631328913 100644 --- a/src/mem/rom.c +++ b/src/mem/rom.c @@ -12,8 +12,6 @@ * - pc2386 video BIOS is underdumped (16k instead of 24k) * - c386sx16 BIOS fails checksum * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, @@ -28,6 +26,7 @@ #include #include #include +#include #define HAVE_STDARG_H #include <86box/86box.h> #include "cpu.h" @@ -91,8 +90,9 @@ rom_check(const char *fn) { FILE *fp = NULL; int ret = 0; + char last = fn[strlen(fn) - 1]; - if ((fn[strlen(fn) - 1] == '/') || (fn[strlen(fn) - 1] == '\\')) + if ((last == '/') || (last == '\\')) ret = plat_dir_check((char *) fn); else { fp = fopen(fn, "rb"); @@ -111,7 +111,7 @@ rom_get_full_path(char *dest, const char *fn) dest[0] = 0x00; - if (strstr(fn, "roms/") == fn) { + if (!strncmp(fn, "roms/", 5)) { /* Relative path */ for (rom_path_t *rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) { path_append_filename(temp, rom_path->path, fn + 5); @@ -138,14 +138,13 @@ rom_fopen(const char *fn, char *mode) if ((fn == NULL) || (mode == NULL)) return NULL; - if (strstr(fn, "roms/") == fn) { + if (!strncmp(fn, "roms/", 5)) { /* Relative path */ for (rom_path_t *rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) { path_append_filename(temp, rom_path->path, fn + 5); - if ((fp = plat_fopen(temp, mode)) != NULL) { + if ((fp = plat_fopen(temp, mode)) != NULL) return fp; - } } return fp; @@ -156,16 +155,16 @@ rom_fopen(const char *fn, char *mode) } int -rom_getfile(char *fn, char *s, int size) +rom_getfile(const char *fn, char *s, int size) { char temp[1024]; - if (strstr(fn, "roms/") == fn) { + if (!strncmp(fn, "roms/", 5)) { /* Relative path */ for (rom_path_t *rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) { path_append_filename(temp, rom_path->path, fn + 5); - if (rom_present(temp)) { + if (plat_file_check(temp)) { strncpy(s, temp, size); return 1; } @@ -174,7 +173,7 @@ rom_getfile(char *fn, char *s, int size) return 0; } else { /* Absolute path */ - if (rom_present(fn)) { + if (plat_file_check(fn)) { strncpy(s, fn, size); return 1; } @@ -186,15 +185,25 @@ rom_getfile(char *fn, char *s, int size) int rom_present(const char *fn) { - FILE *fp; + char temp[1024]; - fp = rom_fopen(fn, "rb"); - if (fp != NULL) { - (void) fclose(fp); - return 1; + if (fn == NULL) + return 0; + + if (!strncmp(fn, "roms/", 5)) { + /* Relative path */ + for (rom_path_t *rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) { + path_append_filename(temp, rom_path->path, fn + 5); + + if (plat_file_check(temp)) + return 1; + } + + return 0; + } else { + /* Absolute path */ + return plat_file_check(fn); } - - return 0; } uint8_t @@ -598,13 +607,14 @@ bios_load(const char *fn1, const char *fn2, uint32_t addr, int sz, int off, int */ if (!bios_only) ptr = (flags & FLAG_AUX) ? rom : rom_reset(addr, sz); + else + return (!fn1 || rom_present(fn1)) && (!fn2 || rom_present(fn2)); if (!(flags & FLAG_AUX) && ((addr + sz) > 0x00100000)) sz = 0x00100000 - addr; #ifdef ENABLE_ROM_LOG - if (!bios_only) - rom_log("%sing %i bytes of %sBIOS starting with ptr[%08X] (ptr = %08X)\n", (bios_only) ? "Check" : "Load", sz, (flags & FLAG_AUX) ? "auxiliary " : "", addr - biosaddr, ptr); + rom_log("%sing %i bytes of %sBIOS starting with ptr[%08X] (ptr = %08X)\n", (bios_only) ? "Check" : "Load", sz, (flags & FLAG_AUX) ? "auxiliary " : "", addr - biosaddr, ptr); #endif if (flags & FLAG_INT) @@ -616,7 +626,7 @@ bios_load(const char *fn1, const char *fn2, uint32_t addr, int sz, int off, int ret = rom_load_linear(fn1, addr - biosaddr, sz, off, ptr); } - if (!bios_only && (flags & FLAG_REP) && (old_sz >= 65536) && (sz < old_sz)) { + if ((flags & FLAG_REP) && (old_sz >= 65536) && (sz < old_sz)) { old_sz /= sz; for (int i = 0; i < (old_sz - 1); i++) { rom_log("Copying ptr[%08X] to ptr[%08X]\n", addr - biosaddr, i * sz); @@ -624,7 +634,7 @@ bios_load(const char *fn1, const char *fn2, uint32_t addr, int sz, int off, int } } - if (!bios_only && ret && !(flags & FLAG_AUX)) + if (ret && !(flags & FLAG_AUX)) bios_add(); return ret; @@ -633,42 +643,28 @@ bios_load(const char *fn1, const char *fn2, uint32_t addr, int sz, int off, int int bios_load_linear_combined(const char *fn1, const char *fn2, int sz, UNUSED(int off)) { - uint8_t ret = 0; - - ret = bios_load_linear(fn1, 0x000f0000, 131072, 128); - ret &= bios_load_aux_linear(fn2, 0x000e0000, sz - 65536, 128); - - return ret; + return bios_load_linear(fn1, 0x000f0000, 131072, 128) && \ + bios_load_aux_linear(fn2, 0x000e0000, sz - 65536, 128); } int bios_load_linear_combined2(const char *fn1, const char *fn2, const char *fn3, const char *fn4, const char *fn5, int sz, int off) { - uint8_t ret = 0; - - ret = bios_load_linear(fn3, 0x000f0000, 262144, off); - ret &= bios_load_aux_linear(fn1, 0x000d0000, 65536, off); - ret &= bios_load_aux_linear(fn2, 0x000c0000, 65536, off); - ret &= bios_load_aux_linear(fn4, 0x000e0000, sz - 196608, off); - if (fn5 != NULL) - ret &= bios_load_aux_linear(fn5, 0x000ec000, 16384, 0); - - return ret; + return bios_load_linear(fn3, 0x000f0000, 262144, off) && \ + bios_load_aux_linear(fn1, 0x000d0000, 65536, off) && \ + bios_load_aux_linear(fn2, 0x000c0000, 65536, off) && \ + bios_load_aux_linear(fn4, 0x000e0000, sz - 196608, off) && \ + (!fn5 || bios_load_aux_linear(fn5, 0x000ec000, 16384, 0)); } int bios_load_linear_combined2_ex(const char *fn1, const char *fn2, const char *fn3, const char *fn4, const char *fn5, int sz, int off) { - uint8_t ret = 0; - - ret = bios_load_linear(fn3, 0x000e0000, 262144, off); - ret &= bios_load_aux_linear(fn1, 0x000c0000, 65536, off); - ret &= bios_load_aux_linear(fn2, 0x000d0000, 65536, off); - ret &= bios_load_aux_linear(fn4, 0x000f0000, sz - 196608, off); - if (fn5 != NULL) - ret &= bios_load_aux_linear(fn5, 0x000fc000, 16384, 0); - - return ret; + return bios_load_linear(fn3, 0x000e0000, 262144, off) && \ + bios_load_aux_linear(fn1, 0x000c0000, 65536, off) && \ + bios_load_aux_linear(fn2, 0x000d0000, 65536, off) && \ + bios_load_aux_linear(fn4, 0x000f0000, sz - 196608, off) && \ + (!fn5 || bios_load_aux_linear(fn5, 0x000fc000, 16384, 0)); } int diff --git a/src/mem/row.c b/src/mem/row.c index 572df7f47..02839b848 100644 --- a/src/mem/row.c +++ b/src/mem/row.c @@ -1,16 +1,16 @@ /* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * DRAM row handling. + * DRAM row handling. * - * Authors: Miran Grca, + * Authors: Miran Grca, * - * Copyright 2016-2020 Miran Grca. + * Copyright 2016-2020 Miran Grca. */ #include #include @@ -266,9 +266,9 @@ row_init(const device_t *info) pages[c].write_w = NULL; pages[c].write_l = NULL; #ifdef USE_NEW_DYNAREC - pages[c].evict_prev = EVICT_NOT_IN_LIST; - pages[c].byte_dirty_mask = &byte_dirty_mask[c * 64]; - pages[c].byte_code_present_mask = &byte_code_present_mask[c * 64]; + pages[c].evict_prev = EVICT_NOT_IN_LIST; + pages[c].byte_dirty_mask = &byte_dirty_mask[c * 64]; + pages[c].byte_code_present_mask = &byte_code_present_mask[c * 64]; #endif } diff --git a/src/mem/spd.c b/src/mem/spd.c index 01cd7b464..f3a61297b 100644 --- a/src/mem/spd.c +++ b/src/mem/spd.c @@ -8,8 +8,6 @@ * * Emulation of SPD (Serial Presence Detect) devices. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. diff --git a/src/mem/sst_flash.c b/src/mem/sst_flash.c index 34bfae83a..5db1e33de 100644 --- a/src/mem/sst_flash.c +++ b/src/mem/sst_flash.c @@ -8,8 +8,6 @@ * * Implementation of an SST flash chip. * - * - * * Authors: Miran Grca, * Jasmine Iwanek, * @@ -524,7 +522,7 @@ sst_init(const device_t *info) dev->is_39 = 1; dev->size = info->local & 0xffff0000; - if ((dev->size == 0x20000) && (strstr(machine_get_internal_name_ex(machine), "xi8088")) && !xi8088_bios_128kb()) + if ((dev->size == 0x20000) && ((machines[machine].init == machine_xt_xi8088_init) && !xi8088_bios_128kb())) dev->size = 0x10000; dev->mask = dev->size - 1; diff --git a/src/network/net_3c501.c b/src/network/net_3c501.c index f5809afb1..78c71ca88 100644 --- a/src/network/net_3c501.c +++ b/src/network/net_3c501.c @@ -9,8 +9,6 @@ * Implementation of the following network controller: * - 3Com Etherlink 3c500/3c501 (ISA 8-bit). * - * - * * Based on @(#)Dev3C501.cpp Oracle (VirtualBox) * * Authors: TheCollector1995, diff --git a/src/network/net_3c503.c b/src/network/net_3c503.c index ea64633bc..3c1f1b041 100644 --- a/src/network/net_3c503.c +++ b/src/network/net_3c503.c @@ -9,8 +9,6 @@ * Implementation of the following network controllers: * - 3Com Etherlink II 3c503 (ISA 8-bit). * - * - * * Based on @(#)3c503.cpp Carl (MAME) * * Authors: TheCollector1995, diff --git a/src/network/net_dp8390.c b/src/network/net_dp8390.c index a0e0e7129..0bf3e9d3b 100644 --- a/src/network/net_dp8390.c +++ b/src/network/net_dp8390.c @@ -7,8 +7,6 @@ * Emulation of the DP8390 Network Interface Controller used by * the WD family, NE1000/NE2000 family, and 3Com 3C503 NIC's. * - * - * * Authors: Miran Grca, * Bochs project, * @@ -516,7 +514,7 @@ dp8390_page0_write(dp8390_t *dev, uint32_t off, uint32_t val, UNUSED(unsigned le { uint8_t val2; - dp8390_log("DP839: Page0 write to register 0x%02x, value=0x%02x\n", + dp8390_log("DP8390: Page0 write to register 0x%02x, value=0x%02x\n", off, val); switch (off) { diff --git a/src/network/net_modem.c b/src/network/net_modem.c index 24869349f..20d3a03d1 100644 --- a/src/network/net_modem.c +++ b/src/network/net_modem.c @@ -8,8 +8,6 @@ * * Hayes AT-compliant modem emulation. * - * - * * Authors: Cacodemon345 * The DOSBox Team * @@ -17,7 +15,6 @@ * Copyright (C) 2022 The DOSBox Staging Team * Copyright (C) 2002-2021 The DOSBox Team */ - #include #include #include diff --git a/src/network/net_ne2000.c b/src/network/net_ne2000.c index 0174ef098..3e2e7dd38 100644 --- a/src/network/net_ne2000.c +++ b/src/network/net_ne2000.c @@ -13,8 +13,6 @@ * - Realtek RTL8019AS (ISA 16-bit, PnP); * - Realtek RTL8029AS (PCI). * - * - * * Based on @(#)ne2k.cc v1.56.2.1 2004/02/02 22:37:22 cbothamy * * Authors: Fred N. van Kempen, @@ -67,9 +65,11 @@ #include <86box/network.h> #include <86box/net_dp8390.h> #include <86box/net_ne2000.h> +#include <86box/nmc93cxx.h> #include <86box/isapnp.h> #include <86box/plat_fallthrough.h> #include <86box/plat_unused.h> +#include "cpu.h" /* ROM BIOS file paths. */ #define ROM_PATH_NE1000 "roms/network/ne1000/ne1000.rom" @@ -87,30 +87,33 @@ typedef struct nic_t { const char *name; - uint8_t pnp_csnsav; uint8_t pci_slot; uint8_t irq_state; - uint8_t pad; + uint8_t csnsav; /* RTL8019AS/RTL8029AS registers */ + uint8_t _9346cr; uint8_t config0; + uint8_t config1; uint8_t config2; uint8_t config3; - uint8_t _9346cr; + uint8_t res; uint8_t pci_regs[PCI_REGSIZE]; - uint8_t eeprom[128]; /* for RTL8029AS */ uint8_t maclocal[6]; /* configured MAC (local) address */ /* POS registers, MCA boards only */ uint8_t pos_regs[8]; + uint8_t eeprom_data[128]; + int board; int is_pci; int is_mca; int is_8bit; int base_irq; + int irq_level; int has_bios; uint32_t base_address; @@ -123,6 +126,9 @@ typedef struct nic_t { rom_t bios_rom; void *pnp_card; + uint8_t *pnp_csnsav; + + nmc93cxx_eeprom_t *eeprom; } nic_t; #ifdef ENABLE_NE2K_LOG @@ -146,7 +152,14 @@ nelog(int lvl, const char *fmt, ...) static void nic_interrupt(void *priv, int set) { - nic_t *dev = (nic_t *) priv; + nic_t *dev = (nic_t *) priv; + int enabled = 1; + + if (!dev->irq_level) + set ^= 1; + + if (dev->board == NE2K_RTL8019AS_PNP) + enabled = dev->config1 & 0x80; if (dev->is_pci) { if (set) @@ -154,13 +167,32 @@ nic_interrupt(void *priv, int set) else pci_clear_irq(dev->pci_slot, PCI_INTA, &dev->irq_state); } else { - if (set) - picint(1 << dev->base_irq); - else + if (enabled && (dev->base_irq != 0x02)) { + if (set) + picint(1 << dev->base_irq); + else + picintc(1 << dev->base_irq); + } else if (dev->base_irq != 0x02) picintc(1 << dev->base_irq); } } +static void +nic_config_reset(void *priv) +{ + nic_t *dev = (nic_t *) priv; + + uint8_t *data = (uint8_t *) nmc93cxx_eeprom_data(dev->eeprom); + + dev->config1 = (data[0x00] & 0x7f) | 0x80; + dev->config2 = (data[0x01] & 0xdf); + dev->config3 = (data[0x02] & 0xf7); + dev->irq_level = 0x02; + + if (dev->pnp_card != NULL) + isapnp_set_normal(dev->pnp_card, !!(dev->config3 & 0x80)); +} + /* reset - restore state to power-up, cancelling all i/o */ static void nic_reset(void *priv) @@ -170,6 +202,11 @@ nic_reset(void *priv) nelog(1, "%s: reset\n", dev->name); dp8390_reset(dev->dp8390); + + if (dev->board >= NE2K_RTL8019AS_PNP) + nic_config_reset(priv); + else + dev->irq_level = 0x02; } static void @@ -178,6 +215,11 @@ nic_soft_reset(void *priv) nic_t *dev = (nic_t *) priv; dp8390_soft_reset(dev->dp8390); + + if (dev->board >= NE2K_RTL8019AS_PNP) + nic_config_reset(priv); + else + dev->irq_level = 0x02; } /* @@ -238,6 +280,7 @@ asic_read(nic_t *dev, uint32_t off, unsigned int len) /* If all bytes have been written, signal remote-DMA complete */ if (dev->dp8390->remote_bytes == 0) { + nelog(3, "%s: DMA read: done (%i)\n", dev->name, dev->dp8390->IMR.rdma_inte); dev->dp8390->ISR.rdma_done = 1; if (dev->dp8390->IMR.rdma_inte) nic_interrupt(dev, 1); @@ -264,6 +307,11 @@ asic_write(nic_t *dev, uint32_t off, uint32_t val, unsigned len) dev->name, (unsigned) off, (unsigned) val); switch (off) { + default: /* this is invalid, but happens under win95 device detection */ + nelog(3, "%s: ASIC write invalid address %04x, ignoring\n", + dev->name, (unsigned) off); + break; + case 0x00: /* Data register - see asic_read for a description */ if ((len > 1) && (dev->dp8390->DCR.wdsize == 0)) { nelog(3, "%s: DMA write length %d on byte mode operation\n", @@ -301,11 +349,6 @@ asic_write(nic_t *dev, uint32_t off, uint32_t val, unsigned len) case 0x0f: /* Reset register */ /* end of reset pulse */ break; - - default: /* this is invalid, but happens under win95 device detection */ - nelog(3, "%s: ASIC write invalid address %04x, ignoring\n", - dev->name, (unsigned) off); - break; } } @@ -313,59 +356,159 @@ asic_write(nic_t *dev, uint32_t off, uint32_t val, unsigned len) static uint32_t page3_read(nic_t *dev, uint32_t off, UNUSED(unsigned int len)) { + uint8_t ret = 0x00; + if (dev->board >= NE2K_RTL8019AS_PNP) switch (off) { - case 0x1: /* 9346CR */ - return (dev->_9346cr); + default: + break; - case 0x3: /* CONFIG0 */ - return 0x00; /* Cable not BNC */ + case 0x1: /* 9346CR */ + ret = (dev->_9346cr & 0xfe); + + if (((ret & 0xc0) == 0x80) && nmc93cxx_eeprom_read(dev->eeprom)) + ret |= 0x01; + break; + + case 0x3: /* CONFIG0 */ + if (dev->board == NE2K_RTL8019AS_PNP) + ret = dev->config0; + else + ret = 0x00; /* Cable not BNC */ + break; + + case 0x4: /* CONFIG1 */ + if (dev->board == NE2K_RTL8019AS_PNP) + ret = dev->config1; + break; case 0x5: /* CONFIG2 */ - return (dev->config2 & 0xe0); + if (dev->board == NE2K_RTL8019AS_PNP) + ret = dev->config2; + else + ret = (dev->config2 & 0xe0); + break; case 0x6: /* CONFIG3 */ - return (dev->config3 & 0x46); + if (dev->board == NE2K_RTL8019AS_PNP) + ret = dev->config3; + else + ret = (dev->config3 & 0x46); + break; + + case 0x7: /* Reserved, Do not write */ + if (dev->board == NE2K_RTL8019AS_PNP) + ret = dev->res; + break; case 0x8: /* CSNSAV */ - return ((dev->board == NE2K_RTL8019AS_PNP) ? dev->pnp_csnsav : 0x00); + ret = ((dev->board == NE2K_RTL8019AS_PNP) ? *dev->pnp_csnsav : 0x00); + break; + + case 0x9: case 0xa: + case 0xc: + ret = 0xff; + break; + + case 0xb: /* INTR */ + if (dev->board == NE2K_RTL8019AS_PNP) { + ret = (pic2.irr & 0x02) ? 0x01 : 0x00; + ret |= (pic.irr & 0x08) ? 0x02 : 0x00; + ret |= (pic.irr & 0x10) ? 0x04 : 0x00; + ret |= (pic.irr & 0x20) ? 0x08 : 0x00; + ret |= (pic2.irr & 0x04) ? 0x10 : 0x00; + ret |= (pic2.irr & 0x08) ? 0x20 : 0x00; + ret |= (pic2.irr & 0x10) ? 0x40 : 0x00; + ret |= (pic2.irr & 0x80) ? 0x80 : 0x00; + } + break; + + case 0xd: /* CONFIG4 */ + if (dev->board == NE2K_RTL8019AS_PNP) { + uint8_t *data = (uint8_t *) nmc93cxx_eeprom_data(dev->eeprom); + ret = data[0x03]; + } + break; case 0xe: /* 8029ASID0 */ if (dev->board == NE2K_RTL8029AS) - return 0x29; + ret = 0x29; + else + ret = 0xff; break; case 0xf: /* 8029ASID1 */ if (dev->board == NE2K_RTL8029AS) - return 0x80; - break; - - default: + ret = 0x80; + else + ret = 0xff; break; } - nelog(3, "%s: Page3 read register 0x%02x attempted\n", dev->name, off); - return 0x00; + nelog(3, "%s: Page3 read register 0x%02x, value=0x%04x\n", dev->name, off, ret); + return ret; } static void page3_write(nic_t *dev, uint32_t off, uint32_t val, UNUSED(unsigned len)) { + int cfg_write_enable = ((dev->_9346cr & 0xc0) == 0xc0); + if (dev->board >= NE2K_RTL8019AS_PNP) { - nelog(3, "%s: Page2 write to register 0x%02x, len=%u, value=0x%04x\n", + nelog(3, "%s: Page3 write to register 0x%02x, len=%u, value=0x%04x\n", dev->name, off, len, val); switch (off) { case 0x01: /* 9346CR */ dev->_9346cr = (val & 0xfe); + if ((val & 0xc0) == 0x80) + nmc93cxx_eeprom_write(dev->eeprom, !!(val & 0x08), !!(val & 0x04), !!(val & 0x02)); + else if ((val & 0xc0) == 0x40) { + uint8_t *data = (uint8_t *) nmc93cxx_eeprom_data(dev->eeprom); + + dev->config1 = (data[0x00] & 0x7f) | 0x80; + dev->config2 = (data[0x01] & 0xdf); + dev->config3 = (data[0x02] & 0xf7); + dev->_9346cr = 0x21; + + isapnp_set_normal(dev->pnp_card, !!(dev->config3 & 0x80)); + } + break; + + case 0x03: /* CONFIG0 */ + if (cfg_write_enable && (dev->board == NE2K_RTL8019AS_PNP)) + dev->config0 = (dev->config0 & 0x3f) | (val & 0xc0); + break; + + case 0x04: /* CONFIG1 */ + if (cfg_write_enable && (dev->board == NE2K_RTL8019AS_PNP)) { + dev->config1 = (dev->config1 & 0x7f) | (val & 0x80); + if (val & 0x80) + nic_interrupt(dev, 1); + } break; case 0x05: /* CONFIG2 */ - dev->config2 = (val & 0xe0); + if (cfg_write_enable) { + if (dev->board == NE2K_RTL8019AS_PNP) + dev->config2 = (dev->config2 & 0x1f) | (val & 0xe0); + else + dev->config2 = (val & 0xe0); + } break; case 0x06: /* CONFIG3 */ - dev->config3 = (val & 0x46); + if (cfg_write_enable) { + if (dev->board == NE2K_RTL8019AS_PNP) + dev->config3 = (dev->config3 & 0xf9) | (val & 0x06); + else + dev->config3 = (val & 0x46); + } + break; + + case 0x7: /* Reserved, Do not write */ + if (dev->board == NE2K_RTL8019AS_PNP) + dev->res = val; break; case 0x09: /* HLTCLK */ @@ -493,6 +636,10 @@ static void nic_ioremove(nic_t *dev, uint16_t addr); static void nic_pnp_config_changed(uint8_t ld, isapnp_device_config_t *config, void *priv) { + uint8_t irq_map[16] = { 0x00, 0x00, 0x00, 0x10, 0x20, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x50, 0x60, 0x00, 0x00, 0x70 }; + uint8_t ios = 0x00; + if (ld) return; @@ -504,10 +651,22 @@ nic_pnp_config_changed(uint8_t ld, isapnp_device_config_t *config, void *priv) } dev->base_address = config->io[0].base; - dev->base_irq = config->irq[0].irq; - if (config->activate && (dev->base_address != ISAPNP_IO_DISABLED)) + dev->base_irq = config->irq[0].irq; + dev->irq_level = config->irq[0].level; + if ((dev->base_irq >= 0x00) && (dev->base_irq <= 0x0f)) + dev->config1 = (dev->config1 & 0x8f) | irq_map[dev->base_irq]; + else + dev->config1 = (dev->config1 & 0x8f); + + if (config->activate && (dev->base_address != ISAPNP_IO_DISABLED)) { nic_ioset(dev, dev->base_address); + ios |= (dev->base_address & 0x0100) ? 0x00 : 0x04; + ios |= (dev->base_address & 0x0080) ? 0x08 : 0x00; + ios |= (dev->base_address & 0x0040) ? 0x02 : 0x00; + ios |= (dev->base_address & 0x0020) ? 0x01 : 0x00; + dev->config1 = (dev->config1 & 0xf0) | ios; + } } static void @@ -515,35 +674,44 @@ nic_pnp_csn_changed(uint8_t csn, void *priv) { nic_t *dev = (nic_t *) priv; - dev->pnp_csnsav = csn; + *dev->pnp_csnsav = csn; } static uint8_t nic_pnp_read_vendor_reg(uint8_t ld, uint8_t reg, void *priv) { - if (ld != 0) - return 0x00; + uint8_t ret = 0x00; const nic_t *dev = (nic_t *) priv; - switch (reg) { - case 0xF0: - return dev->config0; - - case 0xF2: - return dev->config2; - - case 0xF3: - return dev->config3; - - case 0xF5: - return dev->pnp_csnsav; - + if (ld == 0) switch (reg) { default: break; + + case 0xf0: /* CONFIG0 */ + ret = dev->config0; + break; + + case 0xf1: /* CONFIG1 */ + ret = dev->config1; + break; + + case 0xf2: /* CONFIG2 */ + ret = dev->config2; + break; + + case 0xf3: /* CONFIG3 */ + ret = dev->config3; + break; + + case 0xf5: + ret = *dev->pnp_csnsav; + break; } - return 0x00; + nelog(3, "[R] Vendor register: %02X (LD = %02X) = %02X\n", reg, ld, ret); + + return ret; } static void @@ -551,10 +719,12 @@ nic_pnp_write_vendor_reg(uint8_t ld, uint8_t reg, uint8_t val, void *priv) { nic_t *dev = (nic_t *) priv; + nelog(3, "[W] Vendor register: %02X (LD = %02X) = %02X\n", reg, ld, val); + if ((ld == 0) && (reg == 0xf6) && (val & 0x04)) { - uint8_t csn = dev->pnp_csnsav; + uint8_t csn = *dev->pnp_csnsav; isapnp_set_csn(dev->pnp_card, 0); - dev->pnp_csnsav = csn; + *dev->pnp_csnsav = csn; } } @@ -915,6 +1085,7 @@ nic_init(const device_t *info) char *rom = NULL; nic_t *dev; int set_oui = 0; + int use_nvr = 0; dev = calloc(1, sizeof(nic_t)); dev->name = info->name; @@ -1146,26 +1317,33 @@ nic_init(const device_t *info) } /* Initialize the RTL80x9 EEPROM. */ - memset(dev->eeprom, 0x00, sizeof(dev->eeprom)); + memset(dev->eeprom_data, 0x00, sizeof(dev->eeprom_data)); if (dev->board == NE2K_RTL8029AS) { - memcpy(&dev->eeprom[0x02], dev->maclocal, 6); + dev->eeprom_data[0x00] = 0x00; + dev->eeprom_data[0x01] = 0x00; - dev->eeprom[0x76] = dev->eeprom[0x7A] = dev->eeprom[0x7E] = (PCI_DEVID & 0xff); - dev->eeprom[0x77] = dev->eeprom[0x7B] = dev->eeprom[0x7F] = (PCI_DEVID >> 8); - dev->eeprom[0x78] = dev->eeprom[0x7C] = (PCI_VENDID & 0xff); - dev->eeprom[0x79] = dev->eeprom[0x7D] = (PCI_VENDID >> 8); + memcpy(&dev->eeprom_data[0x02], dev->maclocal, 6); + + dev->eeprom_data[0x76] = dev->eeprom_data[0x7a] = dev->eeprom_data[0x7e] = (PCI_DEVID & 0xff); + dev->eeprom_data[0x77] = dev->eeprom_data[0x7b] = dev->eeprom_data[0x7f] = (PCI_DEVID >> 8); + dev->eeprom_data[0x78] = dev->eeprom_data[0x7c] = (PCI_VENDID & 0xff); + dev->eeprom_data[0x79] = dev->eeprom_data[0x7d] = (PCI_VENDID >> 8); + + use_nvr = 1; } else { const char *pnp_rom_file = NULL; int pnp_rom_len = 0x4a; switch (dev->board) { case NE2K_RTL8019AS_PNP: pnp_rom_file = "roms/network/rtl8019as/RTL8019A.BIN"; + use_nvr = 1; break; case NE2K_DE220P: pnp_rom_file = "roms/network/de220p/dlk2201a.bin"; - pnp_rom_len = 0x43; + pnp_rom_len = 0x43; + use_nvr = 1; break; default: @@ -1176,8 +1354,8 @@ nic_init(const device_t *info) if (pnp_rom_file) { FILE *fp = rom_fopen(pnp_rom_file, "rb"); if (fp) { - if (fread(&dev->eeprom[0x12], 1, pnp_rom_len, fp) == pnp_rom_len) - pnp_rom = &dev->eeprom[0x12]; + if (fread(&dev->eeprom_data[0x12], 1, pnp_rom_len, fp) == pnp_rom_len) + pnp_rom = &dev->eeprom_data[0x12]; fclose(fp); } } @@ -1185,10 +1363,22 @@ nic_init(const device_t *info) switch (info->local) { case NE2K_RTL8019AS_PNP: case NE2K_DE220P: - dev->pnp_card = isapnp_add_card(pnp_rom, pnp_rom_len, - nic_pnp_config_changed, nic_pnp_csn_changed, - nic_pnp_read_vendor_reg, nic_pnp_write_vendor_reg, - dev); + dev->pnp_card = isapnp_add_card(pnp_rom, pnp_rom_len, + nic_pnp_config_changed, nic_pnp_csn_changed, + nic_pnp_read_vendor_reg, nic_pnp_write_vendor_reg, + dev); + dev->pnp_csnsav = isapnp_get_csnsav(dev->pnp_card); + dev->config0 = 0x10 /* Cable not BNC */; + dev->config1 = 0x80; + dev->config2 = 0x00; + dev->config3 = 0x80; + isapnp_set_rt(dev->pnp_card, 1); + + dev->eeprom_data[0x00] = 0x80; + dev->eeprom_data[0x01] = 0x00; + dev->eeprom_data[0x02] = 0x81; + dev->eeprom_data[0x03] = 0x01; + memcpy(&dev->eeprom_data[0x04], dev->maclocal, 6); break; default: @@ -1197,6 +1387,50 @@ nic_init(const device_t *info) } } + if (use_nvr) { + nmc93cxx_eeprom_params_t params; + char filename[1024] = { 0 }; + + params.nwords = 64; + params.default_content = (uint16_t *) dev->eeprom_data; + params.filename = filename; + int inst = device_get_instance(); + snprintf(filename, sizeof(filename), "nmc93cxx_eeprom_%s_%d.nvr", info->internal_name, inst); + dev->eeprom = device_add_inst_params(&nmc93cxx_device, inst, ¶ms); + if (dev->eeprom == NULL) { + free(dev); + return NULL; + } + if (info->local == NE2K_RTL8019AS_PNP) { + uint8_t *data = (uint8_t *) nmc93cxx_eeprom_data(dev->eeprom); + + dev->config1 = (data[0x00] & 0x7f) | 0x80; + dev->config2 = (data[0x01] & 0xdf); + dev->config3 = (data[0x02] & 0xf7); + + isapnp_set_normal(dev->pnp_card, !!(dev->config3 & 0x80)); + isapnp_set_single_ld(dev->pnp_card); + + uint8_t irq_map[8] = { 9, 3, 4, 5, 10, 11, 12, 15 }; + + dev->base_address = 0x0200; + dev->base_address |= (dev->config1 & 0x01) ? 0x0020 : 0x0000; + dev->base_address |= (dev->config1 & 0x02) ? 0x0040 : 0x0000; + dev->base_address |= (dev->config1 & 0x04) ? 0x0000 : 0x0100; + dev->base_address |= (dev->config1 & 0x08) ? 0x0080 : 0x0000; + + dev->base_irq = irq_map[(dev->config1 >> 4) & 0x07]; + + if (!(dev->config3 & 0x01)) + nic_ioset(dev, dev->base_address); + + isapnp_activate(dev->pnp_card, dev->base_address, dev->base_irq, !(dev->config3 & 0x01)); + } + } + + if (dev->pnp_csnsav == NULL) + dev->pnp_csnsav = &dev->csnsav; + if (dev->board != NE2K_ETHERNEXT_MC) /* Reset the board. */ nic_reset(dev); @@ -1775,7 +2009,7 @@ const device_t rtl8019as_pnp_device = { .local = NE2K_RTL8019AS_PNP, .init = nic_init, .close = nic_close, - .reset = NULL, + .reset = nic_config_reset, .available = rtl8019as_available, .speed_changed = NULL, .force_redraw = NULL, @@ -1789,7 +2023,7 @@ const device_t de220p_device = { .local = NE2K_DE220P, .init = nic_init, .close = nic_close, - .reset = NULL, + .reset = nic_config_reset, .available = de220p_available, .speed_changed = NULL, .force_redraw = NULL, @@ -1803,7 +2037,7 @@ const device_t rtl8029as_device = { .local = NE2K_RTL8029AS, .init = nic_init, .close = nic_close, - .reset = NULL, + .reset = nic_config_reset, .available = NULL, .speed_changed = NULL, .force_redraw = NULL, diff --git a/src/network/net_netswitch.c b/src/network/net_netswitch.c index 336895dc6..1cd0a81a7 100644 --- a/src/network/net_netswitch.c +++ b/src/network/net_netswitch.c @@ -1,21 +1,17 @@ /* -* 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 + * 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 @@ -405,6 +401,7 @@ net_netswitch_init(const netcard_t *card, const uint8_t *mac_addr, void *priv, c 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); + ns_args.nrs_hostname[127] = 0x00; 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); diff --git a/src/network/net_null.c b/src/network/net_null.c index 6d5f68e46..4b1f03e3f 100644 --- a/src/network/net_null.c +++ b/src/network/net_null.c @@ -1,20 +1,17 @@ /* -* 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. -* -* Null network driver -* -* -* -* Authors: cold-brewed -* -* Copyright 2023 The 86Box development team -*/ - + * 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. + * + * Null network driver + * + * Authors: cold-brewed + * + * Copyright 2023 The 86Box development team + */ #include #include #include diff --git a/src/network/net_pcap.c b/src/network/net_pcap.c index 2af34d786..e0c6804f4 100644 --- a/src/network/net_pcap.c +++ b/src/network/net_pcap.c @@ -6,8 +6,6 @@ * * Handle WinPcap library processing. * - * - * * Authors: Fred N. van Kempen, * * Copyright 2017-2019 Fred N. van Kempen. diff --git a/src/network/net_pcnet.c b/src/network/net_pcnet.c index 16fd7c65c..0c97d1078 100644 --- a/src/network/net_pcnet.c +++ b/src/network/net_pcnet.c @@ -4,11 +4,11 @@ * 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 AMD PCnet LANCE NIC controller for both the ISA, VLB, * and PCI buses. * - * - * * Authors: Miran Grca, * TheCollector1995, * Antony T Curtis diff --git a/src/network/net_plip.c b/src/network/net_plip.c index 5eacc5536..36df49153 100644 --- a/src/network/net_plip.c +++ b/src/network/net_plip.c @@ -12,8 +12,6 @@ * packet driver. PLIP is not particularly fast, as it's a 4-bit * half-duplex protocol operating over SPP. * - * - * * Authors: RichardG, * Copyright 2020 RichardG. */ diff --git a/src/network/net_rtl8139.c b/src/network/net_rtl8139.c index 41ce86f6b..5f2c85b03 100644 --- a/src/network/net_rtl8139.c +++ b/src/network/net_rtl8139.c @@ -835,7 +835,7 @@ rtl8139_do_receive(void *priv, uint8_t *buf, int size_) uint32_t rx_space = rxdw0 & CP_RX_BUFFER_SIZE_MASK; /* write VLAN info to descriptor variables. */ - if (s->CpCmd & CPlusRxVLAN && bswap16(*((uint16_t *) &buf[ETH_ALEN * 2])) == 0x8100) { + if (s->CpCmd & CPlusRxVLAN && bswap16(AS_U16(buf[ETH_ALEN * 2])) == 0x8100) { dot1q_buf = &buf[ETH_ALEN * 2]; size -= VLAN_HLEN; /* if too small buffer, use the tailroom added duing expansion */ @@ -849,7 +849,7 @@ rtl8139_do_receive(void *priv, uint8_t *buf, int size_) rtl8139_log("C+ Rx mode : extracted vlan tag with tci: " "%u\n", - bswap16(*((uint16_t *) &dot1q_buf[ETHER_TYPE_LEN]))); + bswap16(AS_U16(dot1q_buf[ETHER_TYPE_LEN]))); } else { /* reset VLAN tag flag */ rxdw1 &= ~CP_RX_TAVA; diff --git a/src/network/net_slirp.c b/src/network/net_slirp.c index 9bf1f63d4..4f61a55a8 100644 --- a/src/network/net_slirp.c +++ b/src/network/net_slirp.c @@ -11,8 +11,6 @@ * Some of the code was borrowed from libvdeslirp * * - * - * * Authors: Fred N. van Kempen, * RichardG, * diff --git a/src/network/net_tap.c b/src/network/net_tap.c index 762f68b60..48721a9d2 100644 --- a/src/network/net_tap.c +++ b/src/network/net_tap.c @@ -13,7 +13,6 @@ * * Authors: Doug Johnson * - * * Copyright 2023 Doug Johnson * * Redistribution and use in source and binary forms, with @@ -46,7 +45,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #ifdef _WIN32 # error TAP networking is only supported on Linux #endif diff --git a/src/network/net_wd8003.c b/src/network/net_wd8003.c index 890b221e2..100391eb0 100644 --- a/src/network/net_wd8003.c +++ b/src/network/net_wd8003.c @@ -11,8 +11,6 @@ * - SMC/WD 8013EBT (ISA 16-bit); * - SMC/WD 8013EP/A (MCA). * - * - * * Authors: Fred N. van Kempen, * TheCollector1995, * Miran Grca, diff --git a/src/network/netswitch.c b/src/network/netswitch.c index 54815a682..1ec2c5e6f 100644 --- a/src/network/netswitch.c +++ b/src/network/netswitch.c @@ -1,21 +1,17 @@ /* -* 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 -*/ - - + * 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 @@ -246,6 +242,7 @@ ns_open(struct ns_open_args *open_args) { /* Remote switch hostname */ strncpy(conn->nrs_hostname, open_args->nrs_hostname, sizeof(conn->nrs_hostname) - 1); + conn->nrs_hostname[127] = 0x00; /* Switch type */ if(conn->switch_type == SWITCH_TYPE_REMOTE) { diff --git a/src/network/netswitch.h b/src/network/netswitch.h index 02534ff30..69062b66c 100644 --- a/src/network/netswitch.h +++ b/src/network/netswitch.h @@ -1,20 +1,17 @@ /* -* 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 -*/ - + * 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 diff --git a/src/network/network.c b/src/network/network.c index 661da7250..3f854f356 100644 --- a/src/network/network.c +++ b/src/network/network.c @@ -10,8 +10,6 @@ * it should be malloc'ed and then linked to the NETCARD def. * Will be done later. * - * - * * Authors: Fred N. van Kempen, * * Copyright 2017-2019 Fred N. van Kempen. diff --git a/src/network/pb_encode.c b/src/network/pb_encode.c index 7f5620125..a4e30b471 100644 --- a/src/network/pb_encode.c +++ b/src/network/pb_encode.c @@ -53,7 +53,8 @@ static bool checkreturn buf_write(pb_ostream_t *stream, const pb_byte_t *buf, si { pb_byte_t *dest = (pb_byte_t*)stream->state; stream->state = dest + count; - + + if ((dest != NULL) && (buf != NULL)) memcpy(dest, buf, count * sizeof(pb_byte_t)); return true; diff --git a/src/nvr.c b/src/nvr.c index b6bf2a5a5..ba4a12aa4 100644 --- a/src/nvr.c +++ b/src/nvr.c @@ -6,8 +6,6 @@ * * Implement a generic NVRAM/CMOS/RTC device. * - * - * * Authors: Fred N. van Kempen, , * David Hrdlička, * diff --git a/src/nvr_at.c b/src/nvr_at.c index 6853867ec..ae7bd8bb4 100644 --- a/src/nvr_at.c +++ b/src/nvr_at.c @@ -1213,7 +1213,7 @@ nvr_at_init(const device_t *info) } /* This is a hack but it is required for the machine to boot properly, no idea why. */ - if (nvr->is_new && !strcmp(machine_get_internal_name(), "spitfire")) + if (nvr->is_new && (machines[machine].init == machine_at_spitfire_init)) nvr->regs[0x33] = nvr->regs[0x34] = 0xff; return nvr; diff --git a/src/nvr_ps2.c b/src/nvr_ps2.c index febf6c165..9698f5fae 100644 --- a/src/nvr_ps2.c +++ b/src/nvr_ps2.c @@ -8,8 +8,6 @@ * * Handling of the PS/2 series CMOS devices. * - * - * * Authors: Fred N. van Kempen, * Sarah Walker, * diff --git a/src/pci.c b/src/pci.c index 94ab9d5f2..16e8cdb4f 100644 --- a/src/pci.c +++ b/src/pci.c @@ -8,8 +8,6 @@ * * Implementation the PCI bus. * - * - * * Authors: Miran Grca, * * Copyright 2023 Miran Grca. diff --git a/src/pic.c b/src/pic.c index 446ea1361..a39933939 100644 --- a/src/pic.c +++ b/src/pic.c @@ -9,8 +9,6 @@ * Implementation of the Intel PIC chip emulation, partially * ported from reenigne's XTCE. * - * - * * Authors: Andrew Jenner, * Miran Grca, * @@ -254,7 +252,7 @@ void pic_reset(void) { int is_at = IS_AT(machine); - is_at = is_at || !strcmp(machine_get_internal_name(), "xi8088"); + is_at = is_at || (machines[machine].init == machine_xt_xi8088_init); memset(&pic, 0, sizeof(pic_t)); memset(&pic2, 0, sizeof(pic_t)); diff --git a/src/pit.c b/src/pit.c index b99fed799..7c58a4b67 100644 --- a/src/pit.c +++ b/src/pit.c @@ -9,8 +9,6 @@ * Implementation of the Intel 8253/8254 Programmable Interval * Timer. * - * - * * Authors: Miran Grca, * * Copyright 2019 Miran Grca. diff --git a/src/pit_fast.c b/src/pit_fast.c index b92b59f3c..f8df2a7c4 100644 --- a/src/pit_fast.c +++ b/src/pit_fast.c @@ -9,8 +9,6 @@ * Implementation of the Intel 8253/8254 Programmable Interval * Timer. * - * - * * Authors: Miran Grca, * * Copyright 2019 Miran Grca. diff --git a/src/port_6x.c b/src/port_6x.c index b8183d651..0dc9bdbdd 100644 --- a/src/port_6x.c +++ b/src/port_6x.c @@ -9,8 +9,6 @@ * Implementation of Ports 61, 62, and 63 used by various * machines. * - * - * * Authors: Miran Grca, * * Copyright 2021 Miran Grca. diff --git a/src/port_92.c b/src/port_92.c index d1a53a321..23595eeb9 100644 --- a/src/port_92.c +++ b/src/port_92.c @@ -9,8 +9,6 @@ * Implementation of Port 92 used by PS/2 machines and 386+ * clones. * - * - * * Authors: Miran Grca, * * Copyright 2019 Miran Grca. diff --git a/src/printer/png.c b/src/printer/png.c index c7443252b..52d939673 100644 --- a/src/printer/png.c +++ b/src/printer/png.c @@ -6,8 +6,6 @@ * * Provide centralized access to the PNG image handler. * - * - * * Authors: Fred N. van Kempen, * * Copyright 2018 Fred N. van Kempen. diff --git a/src/printer/prt_cpmap.c b/src/printer/prt_cpmap.c index 153008f35..370e258ce 100644 --- a/src/printer/prt_cpmap.c +++ b/src/printer/prt_cpmap.c @@ -6,8 +6,6 @@ * * Various ASCII to Unicode maps, for the various codepages. * - * - * * Authors: Michael Drüing, * Fred N. van Kempen, * diff --git a/src/printer/prt_escp.c b/src/printer/prt_escp.c index 8fb6a1059..a24072971 100644 --- a/src/printer/prt_escp.c +++ b/src/printer/prt_escp.c @@ -6,8 +6,6 @@ * * Implementation of the Generic ESC/P 2 Dot-Matrix printer. * - * - * * Authors: Michael Drüing, * Fred N. van Kempen, * diff --git a/src/printer/prt_ps.c b/src/printer/prt_ps.c index 38c8053c2..3a3230394 100644 --- a/src/printer/prt_ps.c +++ b/src/printer/prt_ps.c @@ -9,15 +9,12 @@ * Implementation of a generic PostScript printer and a * generic PCL 5e printer. * - * - * * Authors: David Hrdlička, * Cacodemon345 * * Copyright 2019 David Hrdlička. * Copyright 2024 Cacodemon345. */ - #include #include #include diff --git a/src/printer/prt_text.c b/src/printer/prt_text.c index 41d3737d1..af601af75 100644 --- a/src/printer/prt_text.c +++ b/src/printer/prt_text.c @@ -13,8 +13,6 @@ * printer mechanics. This would lead to a page being 66 lines * of 80 characters each. * - * - * * Authors: Fred N. van Kempen, * * Copyright 2018-2019 Fred N. van Kempen. diff --git a/src/qt/qt_main.cpp b/src/qt/qt_main.cpp index 2bc3eacbb..d667cfdb9 100644 --- a/src/qt/qt_main.cpp +++ b/src/qt/qt_main.cpp @@ -540,6 +540,18 @@ main(int argc, char *argv[]) #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); #endif + QApplication::setAttribute(Qt::AA_UseDesktopOpenGL); + + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setSwapInterval(0); + fmt.setProfile(QSurfaceFormat::OpenGLContextProfile::CoreProfile); + fmt.setRenderableType(QSurfaceFormat::OpenGL); +#ifdef Q_OS_MACOS + fmt.setVersion(4, 1); +#else + fmt.setVersion(3, 2); +#endif + QSurfaceFormat::setDefaultFormat(fmt); QApplication app(argc, argv); QLocale::setDefault(QLocale::C); @@ -572,9 +584,6 @@ main(int argc, char *argv[]) Q_INIT_RESOURCE(qt_resources); Q_INIT_RESOURCE(qt_translations); - QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); - fmt.setSwapInterval(0); - QSurfaceFormat::setDefaultFormat(fmt); #ifdef __APPLE__ CocoaEventFilter cocoafilter; diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 954547078..e88bedd90 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -84,6 +84,7 @@ extern bool cpu_thread_running; #include #include #include +#include #include #include #include @@ -171,8 +172,6 @@ extern "C" void qt_blit(int x, int y, int w, int h, int monitor_index); extern MainWindow *main_window; -bool MainWindow::s_adjustingForce43 = false; - MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) @@ -933,11 +932,18 @@ MainWindow::closeEvent(QCloseEvent *event) } } if (window_remember) { - window_w = ui->stackedWidget->width(); - window_h = ui->stackedWidget->height(); + // If maximized, persist the normal (restorable) geometry + const bool wasMax = isMaximized(); + QRect normal = wasMax ? this->normalGeometry() : this->geometry(); + // Save WINDOW size (not the content widget’s 4:3 box) + const int chromeHeight = geometry().height() - ui->stackedWidget->height(); + window_w = normal.width(); + window_h = normal.height() - chromeHeight; + if (window_h < 0) + window_h = 0; if (!QApplication::platformName().contains("wayland")) { - window_x = this->geometry().x(); - window_y = this->geometry().y(); + window_x = normal.x(); + window_y = normal.y(); } for (int i = 1; i < MONITORS_NUM; i++) { if (renderers[i]) { @@ -1021,65 +1027,56 @@ void MainWindow::updateShortcuts() seq = QKeySequence::fromString(acc_keys[accID].seq); ui->actionMute_Unmute->setShortcut(seq); } - -void -MainWindow::adjustForForce43(const QSize &newWinSize) + +void +MainWindow::applyContentLayoutForCurrentState() { - // Only act in resizable mode with Force 4:3 enabled and not fullscreen - if (!(vid_resize == 1 && force_43 > 0) || video_fullscreen || s_adjustingForce43) - return; + auto applyFill = [this](const QRect& r){ + ui->stackedWidget->setGeometry(r); + ui->stackedWidget->onResize(r.width(), r.height()); + if (monitors[0].mon_scrnsz_x != r.width() || monitors[0].mon_scrnsz_y != r.height()) { + monitors[0].mon_scrnsz_x = r.width(); + monitors[0].mon_scrnsz_y = r.height(); + plat_resize_request(r.width(), r.height(), 0); + } + }; - s_adjustingForce43 = true; + auto apply43 = [this](const QRect& area){ + int areaW = area.width(); + int areaH = area.height(); + if (areaW <= 0 || areaH <= 0) return; - // Height consumed by menu/status/toolbars - int chromeH = menuBar()->height() - + (hide_status_bar ? 0 : statusBar()->height()) - + (hide_tool_bar ? 0 : ui->toolBar->height()); + int targetW = areaW; + int targetH = (areaW * 3) / 4; + if (targetH > areaH) { + targetH = areaH; + targetW = (areaH * 4) / 3; + } - // Compute client area size in device‑independent pixels - double dpr = (!dpi_scale ? util::screenOfWidget(this)->devicePixelRatio() : 1.0); - int winW = newWinSize.width(); - int winH = newWinSize.height(); - int clientW = static_cast(winW / dpr); - int clientH = static_cast((winH - chromeH) / dpr); + const int x = area.x() + (areaW - targetW) / 2; + const int y = area.y() + (areaH - targetH) / 2; - if (clientW <= 0 || clientH <= 0) { - s_adjustingForce43 = false; - return; - } + ui->stackedWidget->setGeometry(x, y, targetW, targetH); + ui->stackedWidget->onResize(targetW, targetH); - // Decide which dimension the user changed most – adjust the other - int curW = static_cast(width() / dpr); - int curH = static_cast((height() - chromeH) / dpr); - bool widthChanged = std::abs(clientW - curW) >= std::abs(clientH - curH); + if (monitors[0].mon_scrnsz_x != targetW || monitors[0].mon_scrnsz_y != targetH) { + monitors[0].mon_scrnsz_x = targetW; + monitors[0].mon_scrnsz_y = targetH; + plat_resize_request(targetW, targetH, 0); + } + }; - int targetW, targetH; - if (widthChanged) { - // user dragged width – compute matching height for 4:3 - targetW = clientW; - targetH = (clientW * 3) / 4; - } else { - // user dragged height – compute matching width for 4:3 - targetH = clientH; - targetW = (clientH * 4) / 3; - } + QWidget *cw = this->centralWidget(); + if (!cw) return; - // Convert back to window size including chrome and apply - int newW = static_cast(targetW * dpr); - int newH = static_cast(targetH * dpr) + chromeH; - if (newW != winW || newH != winH) - resize(newW, newH); + const QRect area = cw->contentsRect(); - // Update emulator framebuffer size and notify platform - monitors[0].mon_scrnsz_x = targetW; - monitors[0].mon_scrnsz_y = targetH; - plat_resize_request(targetW, targetH, 0); + // Fullscreen always fills (legacy behavior) + if (video_fullscreen) { applyFill(area); return; } - // Allow renderer widget to grow and recompute scaling - ui->stackedWidget->setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); - ui->stackedWidget->onResize(width(), height()); - - s_adjustingForce43 = false; + // Windowed: enforce 4:3 only when requested, otherwise fill + if (force_43 > 0) apply43(area); + else applyFill(area); } void @@ -1088,26 +1085,10 @@ MainWindow::resizeEvent(QResizeEvent *event) //qDebug() << pos().x() + event->size().width(); //qDebug() << pos().y() + event->size().height(); - // Enforce 4:3 aspect ratio in resizable mode when the option is set - adjustForForce43(event->size()); - - if (vid_resize == 1 || video_fullscreen) - return; + // Always let QMainWindow do its layout first + QMainWindow::resizeEvent(event); - int newX = pos().x(); - int newY = pos().y(); - - if (((frameGeometry().x() + event->size().width() + 1) > util::screenOfWidget(this)->availableGeometry().right())) { - //move(util::screenOfWidget(this)->availableGeometry().right() - size().width() - 1, pos().y()); - newX = util::screenOfWidget(this)->availableGeometry().right() - frameGeometry().width() - 1; - if (newX < 1) newX = 1; - } - - if (((frameGeometry().y() + event->size().height() + 1) > util::screenOfWidget(this)->availableGeometry().bottom())) { - newY = util::screenOfWidget(this)->availableGeometry().bottom() - frameGeometry().height() - 1; - if (newY < 1) newY = 1; - } - move(newX, newY); + applyContentLayoutForCurrentState(); } void @@ -1201,12 +1182,25 @@ MainWindow::showEvent(QShowEvent *event) monitors[0].mon_scrnsz_y = fixed_size_y; } if (window_remember && vid_resize == 1) { - ui->stackedWidget->setFixedSize(window_w, window_h); + const QSize target(window_w, window_h); + const QSize prevMin = ui->stackedWidget->minimumSize(); + const QSize prevMax = ui->stackedWidget->maximumSize(); + + ui->stackedWidget->setMinimumSize(target); + ui->stackedWidget->setMaximumSize(target); #ifndef Q_OS_MACOS QApplication::processEvents(); #endif this->adjustSize(); + + ui->stackedWidget->setMinimumSize(prevMin); + ui->stackedWidget->setMaximumSize(prevMax); + ui->stackedWidget->resize(target); } + + QTimer::singleShot(0, this, [this]{ + applyContentLayoutForCurrentState(); + }); } void @@ -1509,6 +1503,7 @@ MainWindow::on_actionFullscreen_triggered() { if (video_fullscreen > 0) { showNormal(); + QTimer::singleShot(0, this, [this]{ applyContentLayoutForCurrentState(); }); ui->menubar->show(); if (!hide_status_bar) ui->statusbar->show(); @@ -2146,16 +2141,7 @@ MainWindow::on_actionForce_4_3_display_ratio_triggered() { video_toggle_option(ui->actionForce_4_3_display_ratio, &force_43); - // When turning on Force 4:3 in resizable mode, immediately snap to 4:3 - if (vid_resize == 1 && !video_fullscreen) { - ui->stackedWidget->setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); - if (force_43 > 0) { - adjustForForce43(size()); - } else { - // Turning off: refresh renderer scaling - ui->stackedWidget->onResize(width(), height()); - } - } + QTimer::singleShot(0, this, [this]{ applyContentLayoutForCurrentState(); }); } void @@ -2524,4 +2510,3 @@ void MainWindow::on_actionCGA_composite_settings_triggered() isNonPause = false; config_save(); } - diff --git a/src/qt/qt_mainwindow.hpp b/src/qt/qt_mainwindow.hpp index f562c2ea9..77e8fe7c4 100644 --- a/src/qt/qt_mainwindow.hpp +++ b/src/qt/qt_mainwindow.hpp @@ -179,8 +179,8 @@ private: std::shared_ptr mm; static bool s_adjustingForce43; // guard against recursion - void adjustForForce43(const QSize &newWinSize); - + void applyContentLayoutForCurrentState(); + void updateShortcuts(); void processKeyboardInput(bool down, uint32_t keycode); #ifdef Q_OS_MACOS diff --git a/src/qt/qt_openglrenderer.cpp b/src/qt/qt_openglrenderer.cpp index 962fa4d30..492acb630 100644 --- a/src/qt/qt_openglrenderer.cpp +++ b/src/qt/qt_openglrenderer.cpp @@ -830,11 +830,9 @@ OpenGLRenderer::OpenGLRenderer(QWidget *parent) format.setVersion(3, 2); #endif format.setProfile(QSurfaceFormat::OpenGLContextProfile::CoreProfile); - - if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES) - format.setRenderableType(QSurfaceFormat::OpenGLES); - + format.setRenderableType(QSurfaceFormat::OpenGL); format.setSwapInterval(video_vsync ? 1 : 0); + format.setAlphaBufferSize(0); setFormat(format); diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index a0c2aa502..ad49e5e7c 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -64,6 +64,8 @@ # include #endif +#include + #ifdef Q_OS_OPENBSD # include #endif @@ -250,6 +252,21 @@ plat_dir_check(char *path) return fi.isDir() ? 1 : 0; } +int +plat_file_check(const char *path) +{ +#ifdef _WIN32 + auto data = QString::fromUtf8(path).toStdWString(); + auto res = GetFileAttributesW(data.c_str()); + return (res != INVALID_FILE_ATTRIBUTES) && !(res & FILE_ATTRIBUTE_DIRECTORY); +#else + struct stat stats; + if (stat(path, &stats) < 0) + return 0; + return !S_ISDIR(stats.st_mode); +#endif +} + int plat_getcwd(char *bufp, int max) { diff --git a/src/qt/qt_rendererstack.cpp b/src/qt/qt_rendererstack.cpp index 32b017b92..4a2e39bbe 100644 --- a/src/qt/qt_rendererstack.cpp +++ b/src/qt/qt_rendererstack.cpp @@ -441,6 +441,7 @@ RendererStack::createRenderer(Renderer renderer) current->setFocusProxy(this); current->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); current->setStyleSheet("background-color: black"); + current->setAttribute(Qt::WA_AlwaysStackOnTop); addWidget(current.get()); this->setStyleSheet("background-color: black"); diff --git a/src/qt/qt_settingsfloppycdrom.cpp b/src/qt/qt_settingsfloppycdrom.cpp index f597aebe6..6ec130044 100644 --- a/src/qt/qt_settingsfloppycdrom.cpp +++ b/src/qt/qt_settingsfloppycdrom.cpp @@ -34,43 +34,41 @@ extern "C" { #include <86box/cdrom.h> } -#include - #include "qt_models_common.hpp" #include "qt_harddrive_common.hpp" #include "qt_settings_bus_tracking.hpp" #include "qt_progsettings.hpp" -static void -setFloppyType(QAbstractItemModel *model, const QModelIndex &idx, int type) +void +SettingsFloppyCDROM::setFloppyType(QAbstractItemModel *model, const QModelIndex &idx, int type) { QIcon icon; if (type == 0) - icon = QIcon(":/settings/qt/icons/floppy_disabled.ico"); + icon = floppy_disabled_icon; else if (type >= 1 && type <= 6) - icon = QIcon(":/settings/qt/icons/floppy_525.ico"); + icon = floppy_525_icon; else - icon = QIcon(":/settings/qt/icons/floppy_35.ico"); + icon = floppy_35_icon; model->setData(idx, QObject::tr(fdd_getname(type))); model->setData(idx, type, Qt::UserRole); model->setData(idx, icon, Qt::DecorationRole); } -static void -setCDROMBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint8_t channel) +void +SettingsFloppyCDROM::setCDROMBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint8_t channel) { QIcon icon; switch (bus) { case CDROM_BUS_DISABLED: - icon = QIcon(":/settings/qt/icons/cdrom_disabled.ico"); + icon = cdrom_disabled_icon; break; case CDROM_BUS_ATAPI: case CDROM_BUS_SCSI: case CDROM_BUS_MITSUMI: case CDROM_BUS_MKE: - icon = QIcon(":/settings/qt/icons/cdrom.ico"); + icon = cdrom_icon; break; } @@ -116,6 +114,10 @@ SettingsFloppyCDROM::SettingsFloppyCDROM(QWidget *parent) { ui->setupUi(this); + floppy_disabled_icon = QIcon(":/settings/qt/icons/floppy_disabled.ico"); + floppy_525_icon = QIcon(":/settings/qt/icons/floppy_525.ico"); + floppy_35_icon = QIcon(":/settings/qt/icons/floppy_35.ico"); + auto *model = ui->comboBoxFloppyType->model(); int i = 0; while (true) { @@ -127,11 +129,12 @@ SettingsFloppyCDROM::SettingsFloppyCDROM(QWidget *parent) ++i; } - model = new QStandardItemModel(0, 3, this); + model = new QStandardItemModel(0, 4, this); ui->tableViewFloppy->setModel(model); model->setHeaderData(0, Qt::Horizontal, tr("Type")); model->setHeaderData(1, Qt::Horizontal, tr("Turbo")); model->setHeaderData(2, Qt::Horizontal, tr("Check BPB")); + model->setHeaderData(3, Qt::Horizontal, tr("Audio")); model->insertRows(0, FDD_NUM); /* Floppy drives category */ @@ -141,6 +144,26 @@ SettingsFloppyCDROM::SettingsFloppyCDROM(QWidget *parent) setFloppyType(model, idx, type); model->setData(idx.siblingAtColumn(1), fdd_get_turbo(i) > 0 ? tr("On") : tr("Off")); model->setData(idx.siblingAtColumn(2), fdd_get_check_bpb(i) > 0 ? tr("On") : tr("Off")); + + int prof = fdd_get_audio_profile(i); + QString profName; + switch (prof) { + case FDD_AUDIO_PROFILE_PANASONIC: + profName = tr("Panasonic"); + break; + case FDD_AUDIO_PROFILE_TEAC: + profName = tr("Teac"); + break; + case FDD_AUDIO_PROFILE_MITSUMI: + profName = tr("Mitsumi"); + break; + default: + profName = tr("None"); + break; + } + auto audioIdx = model->index(i, 3); + model->setData(audioIdx, profName); + model->setData(audioIdx, prof, Qt::UserRole); } ui->tableViewFloppy->resizeColumnsToContents(); @@ -148,7 +171,25 @@ SettingsFloppyCDROM::SettingsFloppyCDROM(QWidget *parent) connect(ui->tableViewFloppy->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &SettingsFloppyCDROM::onFloppyRowChanged); + +#ifndef DISABLE_FDD_AUDIO + ui->comboBoxFloppyAudio->setVisible(true); + ui->comboBoxFloppyAudio->addItem(tr("None"), FDD_AUDIO_PROFILE_NONE); + ui->comboBoxFloppyAudio->addItem(tr("Generic Mitsumi 3.5\" 1.44MB"), FDD_AUDIO_PROFILE_MITSUMI); + ui->comboBoxFloppyAudio->addItem(tr("Panasonic JU-475-5 5.25\" 1.2MB"), FDD_AUDIO_PROFILE_PANASONIC); + ui->comboBoxFloppyAudio->addItem(tr("Teac FD-55GFR 5.25\" 1.2MB"), FDD_AUDIO_PROFILE_TEAC); + ui->comboBoxFloppyAudio->setSizeAdjustPolicy(QComboBox::AdjustToContents); +#else + ui->comboBoxFloppyAudio->setVisible(false); +#endif + + // Set initial selection and trigger the row changed event to update controls ui->tableViewFloppy->setCurrentIndex(model->index(0, 0)); + // Manually trigger the row changed event to ensure audio selection is updated + onFloppyRowChanged(model->index(0, 0)); + + cdrom_disabled_icon = QIcon(":/settings/qt/icons/cdrom_disabled.ico"); + cdrom_icon = QIcon(":/settings/qt/icons/cdrom.ico"); Harddrives::populateCDROMBuses(ui->comboBoxBus->model()); model = ui->comboBoxSpeed->model(); @@ -228,6 +269,9 @@ SettingsFloppyCDROM::save() fdd_set_type(i, model->index(i, 0).data(Qt::UserRole).toInt()); fdd_set_turbo(i, model->index(i, 1).data() == tr("On") ? 1 : 0); fdd_set_check_bpb(i, model->index(i, 2).data() == tr("On") ? 1 : 0); +#ifndef DISABLE_FDD_AUDIO + fdd_set_audio_profile(i, model->index(i, 3).data(Qt::UserRole).toInt()); +#endif } /* Removable devices category */ @@ -245,6 +289,12 @@ SettingsFloppyCDROM::save() cdrom[i].speed = model->index(i, 1).data(Qt::UserRole).toUInt(); cdrom_set_type(i, model->index(i, 2).data(Qt::UserRole).toInt()); } + +#ifdef DISABLE_FDD_AUDIO + fdd_sounds_enabled = 0; +#else + fdd_sounds_enabled = 1; +#endif } void @@ -254,6 +304,10 @@ SettingsFloppyCDROM::onFloppyRowChanged(const QModelIndex ¤t) ui->comboBoxFloppyType->setCurrentIndex(type); ui->checkBoxTurboTimings->setChecked(current.siblingAtColumn(1).data() == tr("On")); ui->checkBoxCheckBPB->setChecked(current.siblingAtColumn(2).data() == tr("On")); + + int prof = current.siblingAtColumn(3).data(Qt::UserRole).toInt(); + int comboIndex = ui->comboBoxFloppyAudio->findData(prof); + ui->comboBoxFloppyAudio->setCurrentIndex(comboIndex); } void @@ -313,7 +367,7 @@ void SettingsFloppyCDROM::on_checkBoxTurboTimings_stateChanged(int arg1) { auto idx = ui->tableViewFloppy->selectionModel()->currentIndex(); - ui->tableViewFloppy->model()->setData(idx.siblingAtColumn(1), arg1 == Qt::Checked ? + ui->tableViewFloppy->model()->setData(idx.siblingAtColumn(1), arg1 == Qt::Checked ? tr("On") : tr("Off")); } @@ -321,10 +375,11 @@ void SettingsFloppyCDROM::on_checkBoxCheckBPB_stateChanged(int arg1) { auto idx = ui->tableViewFloppy->selectionModel()->currentIndex(); - ui->tableViewFloppy->model()->setData(idx.siblingAtColumn(2), arg1 == Qt::Checked ? + ui->tableViewFloppy->model()->setData(idx.siblingAtColumn(2), arg1 == Qt::Checked ? tr("On") : tr("Off")); } + void SettingsFloppyCDROM::on_comboBoxFloppyType_activated(int index) { @@ -332,6 +387,34 @@ SettingsFloppyCDROM::on_comboBoxFloppyType_activated(int index) ui->tableViewFloppy->selectionModel()->currentIndex(), index); } +void +SettingsFloppyCDROM::on_comboBoxFloppyAudio_activated(int) +{ + auto idx = ui->tableViewFloppy->selectionModel()->currentIndex(); + int prof = ui->comboBoxFloppyAudio->currentData().toInt(); + QString profName; + switch (prof) { + case FDD_AUDIO_PROFILE_NONE: + profName = tr("None"); + break; + case FDD_AUDIO_PROFILE_PANASONIC: + profName = tr("Panasonic"); + break; + case FDD_AUDIO_PROFILE_TEAC: + profName = tr("Teac"); + break; + case FDD_AUDIO_PROFILE_MITSUMI: + profName = tr("Mitsumi"); + break; + default: + profName = tr("None"); + break; + } + auto audioIdx = idx.siblingAtColumn(3); + ui->tableViewFloppy->model()->setData(audioIdx, profName); + ui->tableViewFloppy->model()->setData(audioIdx, prof, Qt::UserRole); +} + void SettingsFloppyCDROM::reloadBusChannels() { auto selected = ui->comboBoxChannel->currentIndex(); Harddrives::populateBusChannels(ui->comboBoxChannel->model(), ui->comboBoxBus->currentData().toInt(), Harddrives::busTrackClass); diff --git a/src/qt/qt_settingsfloppycdrom.hpp b/src/qt/qt_settingsfloppycdrom.hpp index 063942201..9a53dd88f 100644 --- a/src/qt/qt_settingsfloppycdrom.hpp +++ b/src/qt/qt_settingsfloppycdrom.hpp @@ -2,6 +2,7 @@ #define QT_SETTINGSFLOPPYCDROM_HPP #include +#include namespace Ui { class SettingsFloppyCDROM; @@ -25,6 +26,7 @@ private slots: void on_comboBoxFloppyType_activated(int index); void on_checkBoxTurboTimings_stateChanged(int arg1); void on_checkBoxCheckBPB_stateChanged(int arg1); + void on_comboBoxFloppyAudio_activated(int index); void onCDROMRowChanged(const QModelIndex ¤t); void on_comboBoxBus_activated(int index); @@ -36,7 +38,15 @@ private slots: private: Ui::SettingsFloppyCDROM *ui; + void setFloppyType(QAbstractItemModel *model, const QModelIndex &idx, int type); + void setCDROMBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint8_t channel); void enableCurrentlySelectedChannel(); + + QIcon floppy_disabled_icon; + QIcon floppy_525_icon; + QIcon floppy_35_icon; + QIcon cdrom_disabled_icon; + QIcon cdrom_icon; }; #endif // QT_SETTINGSFLOPPYCDROM_HPP diff --git a/src/qt/qt_settingsfloppycdrom.ui b/src/qt/qt_settingsfloppycdrom.ui index 6b1036b5c..0c9283834 100644 --- a/src/qt/qt_settingsfloppycdrom.ui +++ b/src/qt/qt_settingsfloppycdrom.ui @@ -66,35 +66,49 @@ - - + + Type: - + 30 - + Turbo timings - + Check BPB + + + + Audio: + + + + + + + 30 + + + @@ -205,6 +219,7 @@ comboBoxFloppyType checkBoxTurboTimings checkBoxCheckBPB + comboBoxFloppyAudio tableViewCDROM comboBoxBus comboBoxChannel diff --git a/src/qt/qt_settingsharddisks.cpp b/src/qt/qt_settingsharddisks.cpp index 6d82f2b77..40142f4d2 100644 --- a/src/qt/qt_settingsharddisks.cpp +++ b/src/qt/qt_settingsharddisks.cpp @@ -44,6 +44,8 @@ const int DataBusChannel = Qt::UserRole + 1; const int DataBusPrevious = Qt::UserRole + 2; const int DataBusChannelPrevious = Qt::UserRole + 3; +QIcon hard_disk_icon; + #if 0 static void normalize_hd_list() @@ -78,28 +80,31 @@ addRow(QAbstractItemModel *model, hard_disk_t *hd) model->insertRow(row); + auto busIndex = model->index(row, ColumnBus); QString busName = Harddrives::BusChannelName(hd->bus_type, hd->channel); - model->setData(model->index(row, ColumnBus), busName); - model->setData(model->index(row, ColumnBus), QIcon(":/settings/qt/icons/hard_disk.ico"), Qt::DecorationRole); - model->setData(model->index(row, ColumnBus), hd->bus_type, DataBus); - model->setData(model->index(row, ColumnBus), hd->bus_type, DataBusPrevious); - model->setData(model->index(row, ColumnBus), hd->channel, DataBusChannel); - model->setData(model->index(row, ColumnBus), hd->channel, DataBusChannelPrevious); + model->setData(busIndex, busName); + model->setData(busIndex, hard_disk_icon, Qt::DecorationRole); + model->setData(busIndex, hd->bus_type, DataBus); + model->setData(busIndex, hd->bus_type, DataBusPrevious); + model->setData(busIndex, hd->channel, DataBusChannel); + model->setData(busIndex, hd->channel, DataBusChannelPrevious); Harddrives::busTrackClass->device_track(1, DEV_HDD, hd->bus_type, hd->channel); + auto filenameIndex = model->index(row, ColumnFilename); QString fileName = hd->fn; if (fileName.startsWith(userPath, Qt::CaseInsensitive)) - model->setData(model->index(row, ColumnFilename), fileName.mid(userPath.size())); + model->setData(filenameIndex, fileName.mid(userPath.size())); else - model->setData(model->index(row, ColumnFilename), fileName); + model->setData(filenameIndex, fileName); - model->setData(model->index(row, ColumnFilename), fileName, Qt::UserRole); + model->setData(filenameIndex, fileName, Qt::UserRole); model->setData(model->index(row, ColumnCylinders), hd->tracks); model->setData(model->index(row, ColumnHeads), hd->hpc); model->setData(model->index(row, ColumnSectors), hd->spt); model->setData(model->index(row, ColumnSize), (hd->tracks * hd->hpc * hd->spt) >> 11); - model->setData(model->index(row, ColumnSpeed), QObject::tr(hdd_preset_getname(hd->speed_preset))); - model->setData(model->index(row, ColumnSpeed), hd->speed_preset, Qt::UserRole); + auto speedIndex = model->index(row, ColumnSpeed); + model->setData(speedIndex, QObject::tr(hdd_preset_getname(hd->speed_preset))); + model->setData(speedIndex, hd->speed_preset, Qt::UserRole); } SettingsHarddisks::SettingsHarddisks(QWidget *parent) @@ -108,6 +113,8 @@ SettingsHarddisks::SettingsHarddisks(QWidget *parent) { ui->setupUi(this); + hard_disk_icon = QIcon(":/settings/qt/icons/hard_disk.ico"); + QAbstractItemModel *model = new QStandardItemModel(0, 7, this); model->setHeaderData(ColumnBus, Qt::Horizontal, tr("Bus")); model->setHeaderData(ColumnFilename, Qt::Horizontal, tr("File")); diff --git a/src/qt/qt_settingsinput.cpp b/src/qt/qt_settingsinput.cpp index 50e3662e9..c540aa2ed 100644 --- a/src/qt/qt_settingsinput.cpp +++ b/src/qt/qt_settingsinput.cpp @@ -123,7 +123,7 @@ SettingsInput::onCurrentMachineChanged(int machineId) int ikbd = (i == KEYBOARD_TYPE_INTERNAL); int pc5086_filter = (strstr(keyboard_get_internal_name(i), "ps") && - strstr(machine_get_internal_name_ex(machineId), "pc5086")); + machines[machineId].init == machine_xt_pc5086_init); if ((ikbd != has_int_kbd) || !device_is_valid(dev, machineId) || pc5086_filter) continue; diff --git a/src/qt/qt_settingsotherremovable.cpp b/src/qt/qt_settingsotherremovable.cpp index 4ba07161c..f2fa3c675 100644 --- a/src/qt/qt_settingsotherremovable.cpp +++ b/src/qt/qt_settingsotherremovable.cpp @@ -26,8 +26,6 @@ extern "C" { #include <86box/rdisk.h> } -#include - #include "qt_models_common.hpp" #include "qt_harddrive_common.hpp" #include "qt_settings_bus_tracking.hpp" @@ -47,17 +45,17 @@ rdiskDriveTypeName(int i) rdisk_drive_types[i].revision); } -static void -setMOBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint8_t channel) +void +SettingsOtherRemovable::setMOBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint8_t channel) { QIcon icon; switch (bus) { case MO_BUS_DISABLED: - icon = QIcon(":/settings/qt/icons/mo_disabled.ico"); + icon = mo_disabled_icon; break; case MO_BUS_ATAPI: case MO_BUS_SCSI: - icon = QIcon(":/settings/qt/icons/mo.ico"); + icon = mo_icon; break; default: @@ -71,17 +69,17 @@ setMOBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint8_t model->setData(i, icon, Qt::DecorationRole); } -static void -setRDiskBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint8_t channel) +void +SettingsOtherRemovable::setRDiskBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint8_t channel) { QIcon icon; switch (bus) { case RDISK_BUS_DISABLED: - icon = QIcon(":/settings/qt/icons/rdisk_disabled.ico"); + icon = rdisk_disabled_icon; break; case RDISK_BUS_ATAPI: case RDISK_BUS_SCSI: - icon = QIcon(":/settings/qt/icons/rdisk.ico"); + icon = rdisk_icon; break; default: @@ -123,6 +121,9 @@ SettingsOtherRemovable::SettingsOtherRemovable(QWidget *parent) { ui->setupUi(this); + mo_disabled_icon = QIcon(":/settings/qt/icons/mo_disabled.ico"); + mo_icon = QIcon(":/settings/qt/icons/mo.ico"); + Harddrives::populateRemovableBuses(ui->comboBoxMOBus->model()); ui->comboBoxMOBus->model()->removeRows(3, ui->comboBoxMOBus->model()->rowCount() - 3); auto *model = ui->comboBoxMOType->model(); @@ -147,6 +148,9 @@ SettingsOtherRemovable::SettingsOtherRemovable(QWidget *parent) connect(ui->tableViewMO->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &SettingsOtherRemovable::onMORowChanged); ui->tableViewMO->setCurrentIndex(model->index(0, 0)); + rdisk_disabled_icon = QIcon(":/settings/qt/icons/rdisk_disabled.ico"); + rdisk_icon = QIcon(":/settings/qt/icons/rdisk.ico"); + Harddrives::populateRemovableBuses(ui->comboBoxRDiskBus->model()); if ((ui->comboBoxRDiskBus->model()->rowCount() - 3) > 0) ui->comboBoxRDiskBus->model()->removeRows(3, ui->comboBoxRDiskBus->model()->rowCount() - 3); diff --git a/src/qt/qt_settingsotherremovable.hpp b/src/qt/qt_settingsotherremovable.hpp index 79fcfbf3f..2c7a4e80e 100644 --- a/src/qt/qt_settingsotherremovable.hpp +++ b/src/qt/qt_settingsotherremovable.hpp @@ -2,6 +2,7 @@ #define QT_SETTINGSOTHERREMOVABLE_HPP #include +#include namespace Ui { class SettingsOtherRemovable; @@ -37,8 +38,15 @@ private slots: private: Ui::SettingsOtherRemovable *ui; + void setMOBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint8_t channel); + void setRDiskBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint8_t channel); void enableCurrentlySelectedChannel_MO(); void enableCurrentlySelectedChannel_RDisk(); + + QIcon mo_disabled_icon; + QIcon mo_icon; + QIcon rdisk_disabled_icon; + QIcon rdisk_icon; }; #endif // QT_SETTINGSOTHERREMOVABLE_HPP diff --git a/src/qt/qt_softwarerenderer.cpp b/src/qt/qt_softwarerenderer.cpp index 8dee1dbe3..dcc0799dd 100644 --- a/src/qt/qt_softwarerenderer.cpp +++ b/src/qt/qt_softwarerenderer.cpp @@ -73,6 +73,12 @@ SoftwareRenderer::render() m_backingStore->flush(rect); } +void +SoftwareRenderer::exposeEvent(QExposeEvent* event) +{ + render(); +} + void SoftwareRenderer::onBlit(int buf_idx, int x, int y, int w, int h) { diff --git a/src/qt/qt_softwarerenderer.hpp b/src/qt/qt_softwarerenderer.hpp index f8bd91338..c9c2706cd 100644 --- a/src/qt/qt_softwarerenderer.hpp +++ b/src/qt/qt_softwarerenderer.hpp @@ -25,6 +25,8 @@ public: void paintEvent(QPaintEvent *event) override; #endif + void exposeEvent(QExposeEvent* event) override; + std::vector> getBuffers() override; public slots: diff --git a/src/qt/qt_vmmanager_system.cpp b/src/qt/qt_vmmanager_system.cpp index 988d3ed5e..dec503fce 100644 --- a/src/qt/qt_vmmanager_system.cpp +++ b/src/qt/qt_vmmanager_system.cpp @@ -654,6 +654,9 @@ VMManagerSystem::setupVars() { voodoo_name = tr("3Dfx Voodoo 2"); break; } + + if (voodoo_config["sli"].toInt() == 1) + voodoo_name.append(" (SLI)"); } display_table[VMManager::Display::Name::Voodoo] = voodoo_name; diff --git a/src/scsi/scsi.c b/src/scsi/scsi.c index a02f4e7a5..36e1d0638 100644 --- a/src/scsi/scsi.c +++ b/src/scsi/scsi.c @@ -8,8 +8,6 @@ * * Handling of the SCSI controllers. * - * - * * Authors: Miran Grca, * Fred N. van Kempen, * TheCollector1995, diff --git a/src/scsi/scsi_aha154x.c b/src/scsi/scsi_aha154x.c index 7161a53bb..61228b3c0 100644 --- a/src/scsi/scsi_aha154x.c +++ b/src/scsi/scsi_aha154x.c @@ -10,8 +10,6 @@ * made by Adaptec, Inc. These controllers were designed for * the ISA bus. * - * - * * Authors: Fred N. van Kempen, * Original Buslogic version by SA1988 and Miran Grca. * diff --git a/src/scsi/scsi_buslogic.c b/src/scsi/scsi_buslogic.c index c2ecc7b62..daeb0a3e4 100644 --- a/src/scsi/scsi_buslogic.c +++ b/src/scsi/scsi_buslogic.c @@ -11,8 +11,6 @@ * 1 - BT-545S ISA; * 2 - BT-958D PCI * - * - * * Authors: TheCollector1995, * Miran Grca, * Fred N. van Kempen, diff --git a/src/scsi/scsi_device.c b/src/scsi/scsi_device.c index 33d3fa89a..1f6967105 100644 --- a/src/scsi/scsi_device.c +++ b/src/scsi/scsi_device.c @@ -8,8 +8,6 @@ * * The generic SCSI device command handler. * - * - * * Authors: Miran Grca, * Fred N. van Kempen, * diff --git a/src/scsi/scsi_disk.c b/src/scsi/scsi_disk.c index 9c8d36f7f..6c59ee7ad 100644 --- a/src/scsi/scsi_disk.c +++ b/src/scsi/scsi_disk.c @@ -6,8 +6,6 @@ * * Emulation of SCSI fixed disks. * - * - * * Authors: Miran Grca, * * Copyright 2017-2018 Miran Grca. diff --git a/src/scsi/scsi_ncr5380.c b/src/scsi/scsi_ncr5380.c index 132fade37..102e637c4 100644 --- a/src/scsi/scsi_ncr5380.c +++ b/src/scsi/scsi_ncr5380.c @@ -9,8 +9,6 @@ * Implementation of the NCR 5380 chip made by NCR * and used in various controllers. * - * - * * Authors: Sarah Walker, * TheCollector1995, * Fred N. van Kempen, diff --git a/src/scsi/scsi_ncr53c400.c b/src/scsi/scsi_ncr53c400.c index 5f2302b4f..31a2de8b3 100644 --- a/src/scsi/scsi_ncr53c400.c +++ b/src/scsi/scsi_ncr53c400.c @@ -9,8 +9,6 @@ * Implementation of the NCR 53c400 series of SCSI Host Adapters * made by NCR. These controllers were designed for the ISA and MCA bus. * - * - * * Authors: Sarah Walker, * TheCollector1995, * Fred N. van Kempen, diff --git a/src/scsi/scsi_ncr53c8xx.c b/src/scsi/scsi_ncr53c8xx.c index f87f22452..bc3ecec0b 100644 --- a/src/scsi/scsi_ncr53c8xx.c +++ b/src/scsi/scsi_ncr53c8xx.c @@ -10,8 +10,6 @@ * Adapters made by NCR and later Symbios and LSI. These * controllers were designed for the PCI bus. * - * - * * Authors: Paul Brook (QEMU) * Artyom Tarasenko (QEMU) * TheCollector1995, diff --git a/src/scsi/scsi_pcscsi.c b/src/scsi/scsi_pcscsi.c index 2c73066a1..11793f5a9 100644 --- a/src/scsi/scsi_pcscsi.c +++ b/src/scsi/scsi_pcscsi.c @@ -9,8 +9,6 @@ * Implementation of the Tekram DC-390 SCSI and related MCA * controllers using the NCR 53c9x series of chips. * - * - * * Authors: Fabrice Bellard (QEMU) * Herve Poussineau (QEMU) * TheCollector1995, diff --git a/src/scsi/scsi_spock.c b/src/scsi/scsi_spock.c index 0bb2d70ba..cf0236236 100644 --- a/src/scsi/scsi_spock.c +++ b/src/scsi/scsi_spock.c @@ -9,8 +9,6 @@ * Implementation of the IBM PS/2 SCSI controller with * cache for MCA only. * - * - * * Authors: Sarah Walker, * TheCollector1995, * diff --git a/src/scsi/scsi_t128.c b/src/scsi/scsi_t128.c index e2f963900..5b893dd70 100644 --- a/src/scsi/scsi_t128.c +++ b/src/scsi/scsi_t128.c @@ -9,8 +9,6 @@ * Implementation of the Trantor 128/228 series of SCSI Host Adapters * made by Trantor. These controllers were designed for the ISA and MCA bus. * - * - * * Authors: Sarah Walker, * TheCollector1995, * Fred N. van Kempen, diff --git a/src/scsi/scsi_x54x.c b/src/scsi/scsi_x54x.c index c248fbe92..b4256f94d 100644 --- a/src/scsi/scsi_x54x.c +++ b/src/scsi/scsi_x54x.c @@ -11,8 +11,6 @@ * series of SCSI Host Adapters made by Mylex. * These controllers were designed for various buses. * - * - * * Authors: TheCollector1995, * Miran Grca, * Fred N. van Kempen, diff --git a/src/sio/sio_82091aa.c b/src/sio/sio_82091aa.c index cfe33df12..6a38ec92c 100644 --- a/src/sio/sio_82091aa.c +++ b/src/sio/sio_82091aa.c @@ -8,8 +8,6 @@ * * Emulation of the Intel 82091AA Super I/O chip. * - * - * * Authors: Miran Grca, * * Copyright 2020 Miran Grca. diff --git a/src/sio/sio_acc3221.c b/src/sio/sio_acc3221.c index c9cb8b6cf..babcff121 100644 --- a/src/sio/sio_acc3221.c +++ b/src/sio/sio_acc3221.c @@ -8,8 +8,6 @@ * * Implementation of the ACC 3221-SP Super I/O Chip. * - * - * * Authors: Sarah Walker, * * Copyright 2019 Sarah Walker. diff --git a/src/sio/sio_ali5123.c b/src/sio/sio_ali5123.c index 5dad42252..39d6f1b90 100644 --- a/src/sio/sio_ali5123.c +++ b/src/sio/sio_ali5123.c @@ -8,8 +8,6 @@ * * Implementation of the ALi M5123/1543C Super I/O Chip. * - * - * * Authors: Miran Grca, * * Copyright 2016-2018 Miran Grca. diff --git a/src/sio/sio_cbm_io.c b/src/sio/sio_cbm_io.c index 477c30a44..2bcdadd65 100644 --- a/src/sio/sio_cbm_io.c +++ b/src/sio/sio_cbm_io.c @@ -8,8 +8,6 @@ * * Implementation of the ACC 3221-SP Super I/O Chip. * - * - * * Authors: Sarah Walker, * * Copyright 2019 Sarah Walker. diff --git a/src/sio/sio_detect.c b/src/sio/sio_detect.c index d36522fe0..d34718db9 100644 --- a/src/sio/sio_detect.c +++ b/src/sio/sio_detect.c @@ -8,8 +8,6 @@ * * Super I/O chip detection code. * - * - * * Authors: Miran Grca, * * Copyright 2016-2018 Miran Grca. diff --git a/src/sio/sio_f82c710.c b/src/sio/sio_f82c710.c index f7ff1409f..46cb61a40 100644 --- a/src/sio/sio_f82c710.c +++ b/src/sio/sio_f82c710.c @@ -349,7 +349,7 @@ f82c710_init(const device_t *info) { upc_t *dev = (upc_t *) calloc(1, sizeof(upc_t)); - if (strstr(machine_get_internal_name(), "5086") != NULL) + if (machines[machine].init == machine_xt_pc5086_init) dev->fdc = device_add(&fdc_at_actlow_device); else dev->fdc = device_add(&fdc_at_device); diff --git a/src/sio/sio_fdc37c669.c b/src/sio/sio_fdc37c669.c index 57ca37619..122afc521 100644 --- a/src/sio/sio_fdc37c669.c +++ b/src/sio/sio_fdc37c669.c @@ -8,8 +8,6 @@ * * Implementation of the SMC FDC37C669 Super I/O Chip. * - * - * * Authors: Miran Grca, * * Copyright 2016-2024 Miran Grca. diff --git a/src/sio/sio_fdc37c93x.c b/src/sio/sio_fdc37c93x.c index 47e73ebae..399469424 100644 --- a/src/sio/sio_fdc37c93x.c +++ b/src/sio/sio_fdc37c93x.c @@ -143,7 +143,7 @@ static __inline uint8_t fdc37c93x_do_read_gp(fdc37c93x_t *dev, int reg, int bit) { /* Update bit 2 on the Acer V35N according to the selected graphics card type. */ - if ((reg == 2) && (strstr(machine_get_internal_name(), "acer") != NULL)) + if ((reg == 2) && !strncmp(machine_get_internal_name(), "acer", 4)) dev->gpio_pulldn[reg] = (dev->gpio_pulldn[reg] & 0xfb) | (video_is_mda() ? 0x00 : 0x04); return dev->gpio_regs[reg] & dev->gpio_pulldn[reg] & (1 << bit); @@ -1812,7 +1812,7 @@ fdc37c93x_reset(void *priv) memset(dev->gpio_pulldn, 0xff, 8); /* Acer V62X requires bit 0 to be clear to not be stuck in "clear password" mode. */ - if (!strcmp(machine_get_internal_name(), "vectra54")) { + if (machines[machine].init == machine_at_vectra54_init) { dev->gpio_pulldn[1] = 0x40; /* @@ -1850,12 +1850,12 @@ fdc37c93x_reset(void *priv) dev->gpio_pulldn[1] |= 0x00; else if (cpu_dmulti > 2.5) dev->gpio_pulldn[1] |= 0x80; - } else if (!strcmp(machine_get_internal_name(), "acerv62x")) + } else if (machines[machine].init == machine_at_acerv62x_init) dev->gpio_pulldn[1] = 0xfe; else dev->gpio_pulldn[1] = (dev->chip_id == 0x30) ? 0xff : 0xfd; - if (strstr(machine_get_internal_name(), "acer") != NULL) + if (!strncmp(machine_get_internal_name(), "acer", 4)) /* Bit 2 on the Acer V35N is the text/graphics toggle, bits 1 and 3 = ????. */ dev->gpio_pulldn[2] = 0x10; diff --git a/src/sio/sio_it86x1f.c b/src/sio/sio_it86x1f.c index 324914355..77011de26 100644 --- a/src/sio/sio_it86x1f.c +++ b/src/sio/sio_it86x1f.c @@ -8,8 +8,6 @@ * * Emulation of the ITE IT86x1F Super I/O chips. * - * - * * Authors: RichardG, * * Copyright 2023 RichardG. @@ -43,7 +41,7 @@ enum { ITE_IT8671F = 0x8681 }; -#define CHIP_ID *((uint16_t *) &dev->global_regs[0]) +#define CHIP_ID AS_U16(dev->global_regs[0]) static void it8671f_pnp_config_changed(uint8_t ld, isapnp_device_config_t *config, void *priv); static void it8661f_pnp_config_changed(uint8_t ld, isapnp_device_config_t *config, void *priv); @@ -571,7 +569,7 @@ it86x1f_pnp_write_vendor_reg(uint8_t ld, uint8_t reg, uint8_t val, void *priv) case 0x7e3: if ((CHIP_ID == ITE_IT8671F) && (val & 0x80)) - *((uint16_t *) &dev->gpio_regs[0x22]) = 0x0000; + AS_U16(dev->gpio_regs[0x22]) = 0x0000; break; case 0x7fb: diff --git a/src/sio/sio_pc87306.c b/src/sio/sio_pc87306.c index f3c635dc8..f9e066b1f 100644 --- a/src/sio/sio_pc87306.c +++ b/src/sio/sio_pc87306.c @@ -8,8 +8,6 @@ * * Emulation of the NatSemi PC87306 Super I/O chip. * - * - * * Authors: Miran Grca, * * Copyright 2016-2018 Miran Grca. diff --git a/src/sio/sio_um8669f.c b/src/sio/sio_um8669f.c index 96c37573d..3431ae63e 100644 --- a/src/sio/sio_um8669f.c +++ b/src/sio/sio_um8669f.c @@ -44,7 +44,6 @@ 10 ASKIR 11 Disabled */ - #include #include #include diff --git a/src/sio/sio_vl82c113.c b/src/sio/sio_vl82c113.c index bf63e9023..b5ecde3c9 100644 --- a/src/sio/sio_vl82c113.c +++ b/src/sio/sio_vl82c113.c @@ -134,7 +134,7 @@ vl82c113_init(UNUSED(const device_t *info)) { vl82c113_t *dev = (vl82c113_t *) calloc(1, sizeof(vl82c113_t)); - if (!strcmp(machine_get_internal_name(), "martin")) + if (machines[machine].init == machine_at_martin_init) dev->nvr = device_add(&martin_nvr_device); else dev->nvr = device_add(&amstrad_megapc_nvr_device); diff --git a/src/sio/sio_vt82c686.c b/src/sio/sio_vt82c686.c index 4caffbc00..4b6228905 100644 --- a/src/sio/sio_vt82c686.c +++ b/src/sio/sio_vt82c686.c @@ -8,8 +8,6 @@ * * Emulation of the VIA VT82C686A/B integrated Super I/O. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. diff --git a/src/sio/sio_w837x7.c b/src/sio/sio_w837x7.c index 0b6aae240..ecf51d061 100644 --- a/src/sio/sio_w837x7.c +++ b/src/sio/sio_w837x7.c @@ -9,6 +9,7 @@ * Emulation of the Winbond W837x7F/IF Super I/O Chip. * * Authors: Miran Grca, + * * Copyright 2020-2025 Miran Grca. */ #include diff --git a/src/sio/sio_w83877.c b/src/sio/sio_w83877.c index a7a2b4ea2..b57ad76ff 100644 --- a/src/sio/sio_w83877.c +++ b/src/sio/sio_w83877.c @@ -9,6 +9,7 @@ * Emulation of the Winbond W83877 family of Super I/O Chips. * * Authors: Miran Grca, + * * Copyright 2016-2025 Miran Grca. */ #include @@ -527,7 +528,7 @@ w83877_init(const device_t *info) dev->has_ide = (info->local >> 16) & 0xff; - if (!strcmp(machine_get_internal_name(), "ficpa2012")) { + if (machines[machine].init == machine_at_ficpa2012_init) { dev->dma_map[0] = 4; dev->dma_map[1] = 3; dev->dma_map[2] = 1; diff --git a/src/sound/CMakeLists.txt b/src/sound/CMakeLists.txt index fdc60b971..ccb54ab19 100644 --- a/src/sound/CMakeLists.txt +++ b/src/sound/CMakeLists.txt @@ -52,6 +52,7 @@ add_library(snd OBJECT snd_optimc.c snd_opl_esfm.c snd_ymf701.c + snd_ymf71x.c ) # TODO: Should platform-specific audio driver be here? diff --git a/src/sound/audio4.c b/src/sound/audio4.c index c76d3253f..060e574e6 100644 --- a/src/sound/audio4.c +++ b/src/sound/audio4.c @@ -1,17 +1,16 @@ /* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * Interface to audio(4) for NetBSD/OpenBSD. + * Interface to audio(4) for NetBSD/OpenBSD. * + * Authors: Nishi * - * Authors: Nishi - * - * Copyright 2025 Nishi. + * Copyright 2025 Nishi. */ #include #include @@ -34,18 +33,20 @@ #endif #define I_NORMAL 0 -#define I_MUSIC 1 -#define I_WT 2 -#define I_CD 3 -#define I_MIDI 4 +#define I_MUSIC 1 +#define I_WT 2 +#define I_CD 3 +#define I_FDD 4 +#define I_MIDI 5 + +static int audio[6] = {-1, -1, -1, -1, -1, -1}; -static int audio[5] = { -1, -1, -1, -1, -1 }; #ifdef USE_NEW_API static struct audio_swpar info[5]; #else -static audio_info_t info[5]; +static audio_info_t info[6]; #endif -static int freqs[5] = { SOUND_FREQ, MUSIC_FREQ, WT_FREQ, CD_FREQ, 0 }; +static int freqs[6] = {SOUND_FREQ, MUSIC_FREQ, WT_FREQ, CD_FREQ, SOUND_FREQ, 0}; void closeal(void) @@ -166,12 +167,18 @@ givealbuffer_cd(const void *buf) givealbuffer_common(buf, I_CD, CD_BUFLEN << 1); } +void +givealbuffer_fdd(const void *buf, const uint32_t size) +{ + givealbuffer_common(buf, I_FDD, (int) size); +} + void givealbuffer_midi(const void *buf, const uint32_t size) { givealbuffer_common(buf, I_MIDI, (int) size); } - + void al_set_midi(const int freq, UNUSED(const int buf_size)) { diff --git a/src/sound/midi.c b/src/sound/midi.c index 9f83e88dc..f64ba64ff 100644 --- a/src/sound/midi.c +++ b/src/sound/midi.c @@ -1,22 +1,20 @@ /* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * MIDI device core module. + * MIDI device core module. * + * Authors: Miran Grca, + * Bit, + * DOSBox Team, * - * - * Authors: Miran Grca, - * Bit, - * DOSBox Team, - * - * Copyright 2016-2020 Miran Grca. - * Copyright 2016-2020 Bit. - * Copyright 2008-2020 DOSBox Team. + * Copyright 2016-2020 Miran Grca. + * Copyright 2016-2020 Bit. + * Copyright 2008-2020 DOSBox Team. */ #include #include @@ -29,6 +27,9 @@ #include <86box/midi.h> #include <86box/plat.h> +#define MIDI_SYSEX_MAX_ITERATIONS 1000 +#define MIDI_SYSEX_TIMEOUT_MS 5000 + int midi_output_device_current = 0; static int midi_output_device_last = 0; int midi_input_device_current = 0; @@ -570,15 +571,44 @@ midi_do_sysex(void) void midi_in_sysex(uint8_t *buffer, uint32_t len) { + int max_iterations = MIDI_SYSEX_MAX_ITERATIONS; + int iteration_count = 0; + uint32_t start_time = plat_get_ticks(); + uint32_t max_timeout_ms = MIDI_SYSEX_TIMEOUT_MS; + + /* Input validation */ + if (!buffer || len == 0) { + return; + } + midi_start_sysex(buffer, len); - while (1) { - /* This will return 0 if all theh handlers have either - timed out or otherwise indicated it is time to stop. */ - if (midi_do_sysex()) - plat_delay_ms(5); /* msec */ - else + while (iteration_count < max_iterations) { + /* Check for timeout */ + uint32_t elapsed_time = plat_get_ticks() - start_time; + if (elapsed_time > max_timeout_ms) { + /* Force abort all handlers on timeout */ + midi_in_handler_t *temp = mih_first; + while (temp != NULL) { + if (temp->sysex) { + temp->sysex(temp->priv, NULL, 0, 1); /* Call with abort=1 */ + } + temp->cnt = 0; + temp->len = 0; + temp = temp->next; + } + /* pclog("MIDI: SYSEX processing timed out after %d ms\n", elapsed_time); */ break; + } + + /* This will return 0 if all the handlers have either + timed out or otherwise indicated it is time to stop. */ + if (midi_do_sysex()) { + plat_delay_ms(5); /* msec */ + iteration_count++; + } else { + break; + } } } diff --git a/src/sound/midi_rtmidi.cpp b/src/sound/midi_rtmidi.cpp index 11203c3f2..e5e03bc0d 100644 --- a/src/sound/midi_rtmidi.cpp +++ b/src/sound/midi_rtmidi.cpp @@ -10,10 +10,10 @@ * * Author: Cacodemon345, * Miran Grca, + * * Copyright 2021 Cacodemon345. * Copyright 2021 Miran Grca. */ - #if defined __has_include # if __has_include() # include diff --git a/src/sound/openal.c b/src/sound/openal.c index c2addb270..d163150af 100644 --- a/src/sound/openal.c +++ b/src/sound/openal.c @@ -1,20 +1,18 @@ /* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * Interface to the OpenAL sound processing library. + * Interface to the OpenAL sound processing library. * + * Authors: Sarah Walker, + * Miran Grca, * - * - * Authors: Sarah Walker, - * Miran Grca, - * - * Copyright 2008-2019 Sarah Walker. - * Copyright 2016-2019 Miran Grca. + * Copyright 2008-2019 Sarah Walker. + * Copyright 2016-2019 Miran Grca. */ #include #include @@ -41,14 +39,16 @@ #define I_MUSIC 1 #define I_WT 2 #define I_CD 3 -#define I_MIDI 4 +#define I_FDD 4 +#define I_MIDI 5 ALuint buffers[4]; /* front and back buffers */ ALuint buffers_music[4]; /* front and back buffers */ ALuint buffers_wt[4]; /* front and back buffers */ ALuint buffers_cd[4]; /* front and back buffers */ +ALuint buffers_fdd[4]; /* front and back buffers */ ALuint buffers_midi[4]; /* front and back buffers */ -static ALuint source[5]; /* audio source */ +static ALuint source[6]; /* audio source - CHANGED FROM 5 TO 6 */ static int midi_freq = 44100; static int midi_buf_size = 4410; @@ -105,8 +105,9 @@ closeal(void) alSourceStopv(sources, source); alDeleteSources(sources, source); - if (sources == 4) + if (sources >= 6) alDeleteBuffers(4, buffers_midi); + alDeleteBuffers(4, buffers_fdd); alDeleteBuffers(4, buffers_cd); alDeleteBuffers(4, buffers_music); alDeleteBuffers(4, buffers); @@ -124,11 +125,13 @@ inital(void) float *wt_buf = NULL; float *cd_buf = NULL; float *midi_buf = NULL; + float *fdd_buf = NULL; int16_t *buf_int16 = NULL; int16_t *music_buf_int16 = NULL; int16_t *wt_buf_int16 = NULL; int16_t *cd_buf_int16 = NULL; int16_t *midi_buf_int16 = NULL; + int16_t *fdd_buf_int16 = NULL; int init_midi = 0; @@ -142,13 +145,14 @@ inital(void) if ((strcmp(mdn, "none") != 0) && (strcmp(mdn, SYSTEM_MIDI_INTERNAL_NAME) != 0)) init_midi = 1; /* If the device is neither none, nor system MIDI, initialize the MIDI buffer and source, otherwise, do not. */ - sources = 4 + !!init_midi; + sources = 5 + !!init_midi; if (sound_is_float) { buf = (float *) calloc((BUFLEN << 1), sizeof(float)); music_buf = (float *) calloc((MUSICBUFLEN << 1), sizeof(float)); wt_buf = (float *) calloc((WTBUFLEN << 1), sizeof(float)); cd_buf = (float *) calloc((CD_BUFLEN << 1), sizeof(float)); + fdd_buf = (float *) calloc((BUFLEN << 1), sizeof(float)); if (init_midi) midi_buf = (float *) calloc(midi_buf_size, sizeof(float)); } else { @@ -156,17 +160,22 @@ inital(void) music_buf_int16 = (int16_t *) calloc((MUSICBUFLEN << 1), sizeof(int16_t)); wt_buf_int16 = (int16_t *) calloc((WTBUFLEN << 1), sizeof(int16_t)); cd_buf_int16 = (int16_t *) calloc((CD_BUFLEN << 1), sizeof(int16_t)); + fdd_buf_int16 = (int16_t *) calloc((BUFLEN << 1), sizeof(int16_t)); if (init_midi) midi_buf_int16 = (int16_t *) calloc(midi_buf_size, sizeof(int16_t)); } alGenBuffers(4, buffers); alGenBuffers(4, buffers_cd); + alGenBuffers(4, buffers_fdd); alGenBuffers(4, buffers_music); alGenBuffers(4, buffers_wt); if (init_midi) alGenBuffers(4, buffers_midi); + // Create sources: 0=main, 1=music, 2=wt, 3=cd, 4=fdd, 5=midi(optional) + alGenSources(sources, source); + if (init_midi) alGenSources(5, source); else @@ -196,6 +205,12 @@ inital(void) alSourcef(source[I_CD], AL_ROLLOFF_FACTOR, 0.0f); alSourcei(source[I_CD], AL_SOURCE_RELATIVE, AL_TRUE); + alSource3f(source[I_FDD], AL_POSITION, 0.0f, 0.0f, 0.0f); + alSource3f(source[I_FDD], AL_VELOCITY, 0.0f, 0.0f, 0.0f); + alSource3f(source[I_FDD], AL_DIRECTION, 0.0f, 0.0f, 0.0f); + alSourcef(source[I_FDD], AL_ROLLOFF_FACTOR, 0.0f); + alSourcei(source[I_FDD], AL_SOURCE_RELATIVE, AL_TRUE); + if (init_midi) { alSource3f(source[I_MIDI], AL_POSITION, 0.0f, 0.0f, 0.0f); alSource3f(source[I_MIDI], AL_VELOCITY, 0.0f, 0.0f, 0.0f); @@ -209,6 +224,7 @@ inital(void) memset(cd_buf, 0, CD_BUFLEN * 2 * sizeof(float)); memset(music_buf, 0, MUSICBUFLEN * 2 * sizeof(float)); memset(wt_buf, 0, WTBUFLEN * 2 * sizeof(float)); + memset(fdd_buf, 0, BUFLEN * 2 * sizeof(float)); if (init_midi) memset(midi_buf, 0, midi_buf_size * sizeof(float)); } else { @@ -216,6 +232,7 @@ inital(void) memset(cd_buf_int16, 0, CD_BUFLEN * 2 * sizeof(int16_t)); memset(music_buf_int16, 0, MUSICBUFLEN * 2 * sizeof(int16_t)); memset(wt_buf_int16, 0, WTBUFLEN * 2 * sizeof(int16_t)); + memset(fdd_buf_int16, 0, BUFLEN * 2 * sizeof(int16_t)); if (init_midi) memset(midi_buf_int16, 0, midi_buf_size * sizeof(int16_t)); } @@ -226,6 +243,7 @@ inital(void) alBufferData(buffers_music[c], AL_FORMAT_STEREO_FLOAT32, music_buf, MUSICBUFLEN * 2 * sizeof(float), MUSIC_FREQ); alBufferData(buffers_wt[c], AL_FORMAT_STEREO_FLOAT32, wt_buf, WTBUFLEN * 2 * sizeof(float), WT_FREQ); alBufferData(buffers_cd[c], AL_FORMAT_STEREO_FLOAT32, cd_buf, CD_BUFLEN * 2 * sizeof(float), CD_FREQ); + alBufferData(buffers_fdd[c], AL_FORMAT_STEREO_FLOAT32, fdd_buf, BUFLEN * 2 * sizeof(float), FREQ); if (init_midi) alBufferData(buffers_midi[c], AL_FORMAT_STEREO_FLOAT32, midi_buf, midi_buf_size * (int) sizeof(float), midi_freq); } else { @@ -233,6 +251,7 @@ inital(void) alBufferData(buffers_music[c], AL_FORMAT_STEREO16, music_buf_int16, MUSICBUFLEN * 2 * sizeof(int16_t), MUSIC_FREQ); alBufferData(buffers_wt[c], AL_FORMAT_STEREO16, wt_buf_int16, WTBUFLEN * 2 * sizeof(int16_t), WT_FREQ); alBufferData(buffers_cd[c], AL_FORMAT_STEREO16, cd_buf_int16, CD_BUFLEN * 2 * sizeof(int16_t), CD_FREQ); + alBufferData(buffers_fdd[c], AL_FORMAT_STEREO16, fdd_buf_int16, BUFLEN * 2 * sizeof(int16_t), FREQ); if (init_midi) alBufferData(buffers_midi[c], AL_FORMAT_STEREO16, midi_buf_int16, midi_buf_size * (int) sizeof(int16_t), midi_freq); } @@ -242,12 +261,14 @@ inital(void) alSourceQueueBuffers(source[I_MUSIC], 4, buffers_music); alSourceQueueBuffers(source[I_WT], 4, buffers_wt); alSourceQueueBuffers(source[I_CD], 4, buffers_cd); + alSourceQueueBuffers(source[I_FDD], 4, buffers_fdd); if (init_midi) alSourceQueueBuffers(source[I_MIDI], 4, buffers_midi); alSourcePlay(source[I_NORMAL]); alSourcePlay(source[I_MUSIC]); alSourcePlay(source[I_WT]); alSourcePlay(source[I_CD]); + alSourcePlay(source[I_FDD]); if (init_midi) alSourcePlay(source[I_MIDI]); @@ -258,6 +279,7 @@ inital(void) free(wt_buf); free(music_buf); free(buf); + free(fdd_buf); } else { if (init_midi) free(midi_buf_int16); @@ -265,6 +287,7 @@ inital(void) free(wt_buf_int16); free(music_buf_int16); free(buf_int16); + free(fdd_buf_int16); } initialized = 1; @@ -329,5 +352,11 @@ givealbuffer_cd(const void *buf) void givealbuffer_midi(const void *buf, const uint32_t size) { - givealbuffer_common(buf, 4, (int) size, midi_freq); + givealbuffer_common(buf, 5, (int) size, midi_freq); } + +void +givealbuffer_fdd(const void *buf, const uint32_t size) +{ + givealbuffer_common(buf, 4, (int) size, FREQ); +} \ No newline at end of file diff --git a/src/sound/snd_ac97_codec.c b/src/sound/snd_ac97_codec.c index 1b28a8aab..77e5825d9 100644 --- a/src/sound/snd_ac97_codec.c +++ b/src/sound/snd_ac97_codec.c @@ -1,18 +1,16 @@ /* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * AC'97 audio codec emulation. + * AC'97 audio codec emulation. * + * Authors: RichardG, * - * - * Authors: RichardG, - * - * Copyright 2021 RichardG. + * Copyright 2021 RichardG. */ #include #include diff --git a/src/sound/snd_ac97_via.c b/src/sound/snd_ac97_via.c index 2d994b08f..28b802a6f 100644 --- a/src/sound/snd_ac97_via.c +++ b/src/sound/snd_ac97_via.c @@ -1,18 +1,16 @@ /* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * VIA AC'97 audio controller emulation. + * VIA AC'97 audio controller emulation. * + * Authors: RichardG, * - * - * Authors: RichardG, - * - * Copyright 2021 RichardG. + * Copyright 2021 RichardG. */ #include #include @@ -348,7 +346,7 @@ ac97_via_sgd_write(uint16_t addr, uint8_t val, void *priv) dev->sgd_regs[modem][addr & 0xf0] = (dev->sgd_regs[modem][addr & 0xf0] & ~0x47) | 0x80; /* Start at the specified entry pointer. */ - dev->sgd[modem][addr >> 4].entry_ptr = *((uint32_t *) &dev->sgd_regs[modem][(addr & 0xf0) | 0x4]) & 0xfffffffe; + dev->sgd[modem][addr >> 4].entry_ptr = AS_U32(dev->sgd_regs[modem][(addr & 0xf0) | 0x4]) & 0xfffffffe; dev->sgd[modem][addr >> 4].restart = 2; /* Start the actual SGD process. */ @@ -403,14 +401,14 @@ ac97_via_sgd_write(uint16_t addr, uint8_t val, void *priv) if (val & 1) { /* return 0x0000 on unaligned reads (real 686B behavior) */ dev->sgd_regs[modem][0x80] = dev->sgd_regs[modem][0x81] = 0x00; } else { - *((uint16_t *) &dev->codec_shadow[modem].regs_codec[i][val & 0x7f]) = *((uint16_t *) &dev->sgd_regs[modem][0x80]) = ac97_codec_readw(codec, val); + AS_U16(dev->codec_shadow[modem].regs_codec[i][val & 0x7f]) = AS_U16(dev->sgd_regs[modem][0x80]) = ac97_codec_readw(codec, val); } /* Flag data/status/index for this codec as valid. */ dev->sgd_regs[modem][0x83] |= 0x02 << (i << 1); } else if (!(val & 1)) { /* do nothing on unaligned writes */ ac97_codec_writew(codec, val, - *((uint16_t *) &dev->codec_shadow[modem].regs_codec[i][val & 0x7f]) = *((uint16_t *) &dev->sgd_regs[modem][0x80])); + AS_U16(dev->codec_shadow[modem].regs_codec[i][val & 0x7f]) = AS_U16(dev->sgd_regs[modem][0x80])); /* Update primary audio codec state if that codec was written to. */ if (!modem && !i) { @@ -579,7 +577,7 @@ ac97_via_sgd_process(void *priv) if (sgd->restart) { /* (Re)load entry pointer if required. */ if (sgd->restart & 2) - sgd->entry_ptr = *((uint32_t *) &dev->sgd_regs[sgd->modem][sgd->id | 0x4]) & 0xfffffffe; /* TODO: probe real hardware - does "even addr" actually mean dword aligned? */ + sgd->entry_ptr = AS_U32(dev->sgd_regs[sgd->modem][sgd->id | 0x4]) & 0xfffffffe; /* TODO: probe real hardware - does "even addr" actually mean dword aligned? */ sgd->restart = 0; /* Read entry. */ @@ -605,11 +603,11 @@ ac97_via_sgd_process(void *priv) if (sgd->id & 0x10) { /* Write channel: read data from FIFO. */ - // mem_writel_phys(sgd->sample_ptr, *((uint32_t *) &sgd->fifo[sgd->fifo_end & (sizeof(sgd->fifo) - 1)])); + // mem_writel_phys(sgd->sample_ptr, AS_U32(sgd->fifo[sgd->fifo_end & (sizeof(sgd->fifo) - 1)])); dma_bm_write(sgd->sample_ptr, &sgd->fifo[sgd->fifo_end & (sizeof(sgd->fifo) - 1)], 4, 4); } else { /* Read channel: write data to FIFO. */ - // *((uint32_t *) &sgd->fifo[sgd->fifo_end & (sizeof(sgd->fifo) - 1)]) = mem_readl_phys(sgd->sample_ptr); + // AS_U32(sgd->fifo[sgd->fifo_end & (sizeof(sgd->fifo) - 1)]) = mem_readl_phys(sgd->sample_ptr); dma_bm_read(sgd->sample_ptr, &sgd->fifo[sgd->fifo_end & (sizeof(sgd->fifo) - 1)], 4, 4); } sgd->fifo_end += 4; @@ -709,7 +707,7 @@ ac97_via_poll_stereo(void *priv) case 0x20: /* Mono, 16-bit PCM */ if ((sgd->fifo_end - sgd->fifo_pos) >= 2) { - sgd->out_l = sgd->out_r = *((uint16_t *) &sgd->fifo[sgd->fifo_pos & (sizeof(sgd->fifo) - 1)]); + sgd->out_l = sgd->out_r = AS_U16(sgd->fifo[sgd->fifo_pos & (sizeof(sgd->fifo) - 1)]); sgd->fifo_pos += 2; return; } @@ -717,9 +715,9 @@ ac97_via_poll_stereo(void *priv) case 0x30: /* Stereo, 16-bit PCM */ if ((sgd->fifo_end - sgd->fifo_pos) >= 4) { - sgd->out_l = *((uint16_t *) &sgd->fifo[sgd->fifo_pos & (sizeof(sgd->fifo) - 1)]); + sgd->out_l = AS_U16(sgd->fifo[sgd->fifo_pos & (sizeof(sgd->fifo) - 1)]); sgd->fifo_pos += 2; - sgd->out_r = *((uint16_t *) &sgd->fifo[sgd->fifo_pos & (sizeof(sgd->fifo) - 1)]); + sgd->out_r = AS_U16(sgd->fifo[sgd->fifo_pos & (sizeof(sgd->fifo) - 1)]); sgd->fifo_pos += 2; return; } @@ -749,9 +747,9 @@ ac97_via_poll_fm(void *priv) /* Feed next sample from the FIFO. The data format is not documented, but it probes as 16-bit stereo at 24 KHz. */ if ((sgd->fifo_end - sgd->fifo_pos) >= 4) { - sgd->out_l = *((uint16_t *) &sgd->fifo[sgd->fifo_pos & (sizeof(sgd->fifo) - 1)]); + sgd->out_l = AS_U16(sgd->fifo[sgd->fifo_pos & (sizeof(sgd->fifo) - 1)]); sgd->fifo_pos += 2; - sgd->out_r = *((uint16_t *) &sgd->fifo[sgd->fifo_pos & (sizeof(sgd->fifo) - 1)]); + sgd->out_r = AS_U16(sgd->fifo[sgd->fifo_pos & (sizeof(sgd->fifo) - 1)]); sgd->fifo_pos += 2; return; } diff --git a/src/sound/snd_ad1848.c b/src/sound/snd_ad1848.c index ff9d36318..6c32b1892 100644 --- a/src/sound/snd_ad1848.c +++ b/src/sound/snd_ad1848.c @@ -1,22 +1,20 @@ /* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * AD1848 / CS4248 / CS4231 (Windows Sound System) codec emulation. + * AD1848 / CS4248 / CS4231 (Windows Sound System) codec emulation. * + * Authors: Sarah Walker, + * TheCollector1995, + * RichardG, * - * - * Authors: Sarah Walker, - * TheCollector1995, - * RichardG, - * - * Copyright 2008-2020 Sarah Walker. - * Copyright 2018-2020 TheCollector1995. - * Copyright 2021-2025 RichardG. + * Copyright 2008-2020 Sarah Walker. + * Copyright 2018-2020 TheCollector1995. + * Copyright 2021-2025 RichardG. */ #include #include @@ -58,9 +56,22 @@ ad1848_log(const char *fmt, ...) static int ad1848_vols_7bits[128]; static double ad1848_vols_5bits_aux_gain[32]; -/* Borrowed from snd_sb_dsp */ -extern int8_t scaleMap4[64]; -extern uint8_t adjustMap4[64]; +/* Borrowed from ffmpeg. */ +static const int8_t adpcm_index_table[16] = { + -1, -1, -1, -1, 2, 4, 6, 8, + -1, -1, -1, -1, 2, 4, 6, 8 +}; +static const int16_t adpcm_step_table[89] = { + 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, + 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, + 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, + 130, 143, 157, 173, 190, 209, 230, 253, 279, 307, + 337, 371, 408, 449, 494, 544, 598, 658, 724, 796, + 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066, + 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358, + 5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, + 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767 +}; void ad1848_setirq(ad1848_t *ad1848, int irq) @@ -313,6 +324,8 @@ ad1848_write(uint16_t addr, uint8_t val, void *priv) case 9: if (!ad1848->enable && (val & 0x41) == 0x01) { ad1848->adpcm_pos = 0; + ad1848->adpcm_predictor[0] = ad1848->adpcm_predictor[1] = 0; + ad1848->adpcm_step_index[0] = ad1848->adpcm_step_index[1] = 0; ad1848->dma_ff = 0; if (ad1848->timer_latch) timer_set_delay_u64(&ad1848->timer_count, ad1848->timer_latch); @@ -360,6 +373,11 @@ ad1848_write(uint16_t addr, uint8_t val, void *priv) } break; + case 17: + if (val & 0x08) + ad1848->adpcm_predictor[0] = ad1848->adpcm_predictor[1] = 0; + break; + case 18 ... 19: if (ad1848->type >= AD1848_TYPE_CS4236B) { if (ad1848->type >= AD1848_TYPE_CS4235) { @@ -488,6 +506,8 @@ readonly_x: ad1848_log("AD1848: write(X%d, %02X)\n", ad1848->xindex, val); return; } + if (ad1848->type == AD1848_TYPE_CS4231) /* I23 is reserved and read-only on CS4231 non-A */ + goto readonly_i; break; case 24: @@ -622,29 +642,33 @@ ad1848_dma_channel_read(ad1848_t *ad1848, int channel) } static int16_t -ad1848_process_adpcm(ad1848_t *ad1848) +ad1848_process_adpcm(ad1848_t *ad1848, int channel) { int temp; if (ad1848->adpcm_pos++ & 1) { - temp = (ad1848->adpcm_data & 0x0f) + ad1848->adpcm_step; + temp = ad1848->adpcm_data >> 4; } else { - ad1848->adpcm_data = (int) (ad1848_dma_channel_read(ad1848, ad1848->dma) & 0xffff); - temp = (ad1848->adpcm_data >> 4) + ad1848->adpcm_step; + ad1848->adpcm_data = ad1848_dma_channel_read(ad1848, ad1848->dma); + temp = ad1848->adpcm_data & 0x0f; } - if (temp < 0) - temp = 0; - else if (temp > 63) - temp = 63; - ad1848->adpcm_ref += scaleMap4[temp]; - if (ad1848->adpcm_ref > 0xff) - ad1848->adpcm_ref = 0xff; - else if (ad1848->adpcm_ref < 0x00) - ad1848->adpcm_ref = 0x00; + int step = adpcm_step_table[ad1848->adpcm_step_index[channel]]; + int step_index = ad1848->adpcm_step_index[channel] + adpcm_index_table[temp]; + if (step_index < 0) + step_index = 0; + else if (step_index > 88) + step_index = 88; - ad1848->adpcm_step = (int8_t) ((ad1848->adpcm_step + adjustMap4[temp]) & 0xff); + int diff = ((2 * (temp & 7) + 1) * step) >> 3; + int predictor = ad1848->adpcm_predictor[channel] + ((temp & 8) ? -diff : diff); + if (predictor < -32768) + predictor = -32768; + else if (predictor > 32767) + predictor = 32767; + ad1848->adpcm_predictor[channel] = predictor; + ad1848->adpcm_step_index[channel] = step_index; - return (int16_t) ((ad1848->adpcm_ref ^ 0x80) << 8); + return (int16_t) predictor; } static void @@ -705,12 +729,12 @@ ad1848_poll(void *priv) /* 0x80 and 0x90 reserved */ case 0xa0: /* Mono, 4-bit ADPCM */ - ad1848->out_l = ad1848->out_r = ad1848_process_adpcm(ad1848); + ad1848->out_l = ad1848->out_r = ad1848_process_adpcm(ad1848, 0); break; case 0xb0: /* Stereo, 4-bit ADPCM */ - ad1848->out_l = ad1848_process_adpcm(ad1848); - ad1848->out_r = ad1848_process_adpcm(ad1848); + ad1848->out_l = ad1848_process_adpcm(ad1848, 0); + ad1848->out_r = ad1848_process_adpcm(ad1848, 1); break; case 0xc0: /* Mono, 16-bit PCM big endian */ diff --git a/src/sound/snd_adlibgold.c b/src/sound/snd_adlibgold.c index 360da3fec..87243e8d9 100644 --- a/src/sound/snd_adlibgold.c +++ b/src/sound/snd_adlibgold.c @@ -82,7 +82,6 @@ typedef struct adgold_t { int treble; int bass; - int16_t opl_buffer[SOUNDBUFLEN * 2]; int16_t mma_buffer[2][SOUNDBUFLEN]; int pos; @@ -90,6 +89,8 @@ typedef struct adgold_t { int gameport_enabled; int surround_enabled; + + int finish_dma; } adgold_t; static int attenuation[0x40]; @@ -173,33 +174,41 @@ adgold_update_irq_status(adgold_t *adgold) temp &= ~2; if ((adgold->adgold_mma_status & 0x02) && !(adgold->adgold_mma_regs[1][0xc] & 2)) temp &= ~2; + adgold->adgold_status = temp; - if ((adgold->adgold_status ^ 0xf) && !adgold->adgold_irq_status) { + if ((adgold->adgold_status ^ 0xf) && !adgold->adgold_irq_status) picint(1 << adgold->irq); - } + else if (!(adgold->adgold_status ^ 0xf) && adgold->adgold_irq_status) + picintc(1 << adgold->irq); adgold->adgold_irq_status = adgold->adgold_status ^ 0xf; } -int +void adgold_getsamp_dma(adgold_t *adgold, int channel) { - int temp; - dma_set_drq(adgold->dma, 1); + int dma_dat; - if ((adgold->adgold_mma_regs[channel][0xc] & 0x60) && (((adgold->adgold_mma_fifo_end[channel] - adgold->adgold_mma_fifo_start[channel]) & 255) >= 127)) - return 2; + adgold->finish_dma = 0; - temp = dma_channel_read(adgold->dma); - if (temp == DMA_NODATA) { - return 1; + if ((adgold->adgold_mma_regs[channel][0xc] & 0x60) && (((adgold->adgold_mma_fifo_end[channel] - adgold->adgold_mma_fifo_start[channel]) & 255) >= 127)) { + adgold->finish_dma = 1; + return; } - adgold->adgold_mma_fifo[channel][adgold->adgold_mma_fifo_end[channel]] = temp; - adgold->adgold_mma_fifo_end[channel] = (adgold->adgold_mma_fifo_end[channel] + 1) & 255; + + dma_set_drq(adgold->dma, 1); + dma_dat = dma_channel_read(adgold->dma); + if (dma_dat == DMA_NODATA) + return; + + adgold->adgold_mma_fifo[channel][adgold->adgold_mma_fifo_end[channel]] = dma_dat; + adgold->adgold_mma_fifo_end[channel] = (adgold->adgold_mma_fifo_end[channel] + 1) & 255; if (adgold->adgold_mma_regs[channel][0xc] & 0x60) { - temp = dma_channel_read(adgold->dma); - adgold->adgold_mma_fifo[channel][adgold->adgold_mma_fifo_end[channel]] = temp; + dma_dat = dma_channel_read(adgold->dma); + if (dma_dat == DMA_NODATA) + return; + adgold->adgold_mma_fifo[channel][adgold->adgold_mma_fifo_end[channel]] = dma_dat; adgold->adgold_mma_fifo_end[channel] = (adgold->adgold_mma_fifo_end[channel] + 1) & 255; } if (((adgold->adgold_mma_fifo_end[channel] - adgold->adgold_mma_fifo_start[channel]) & 255) >= adgold->adgold_mma_intpos[channel]) { @@ -207,8 +216,6 @@ adgold_getsamp_dma(adgold_t *adgold, int channel) adgold_update_irq_status(adgold); dma_set_drq(adgold->dma, 0); } - - return 0; } void @@ -291,7 +298,8 @@ adgold_write(uint16_t addr, uint8_t val, void *priv) case 0x18: /*Surround*/ adgold->adgold_38x_regs[0x18] = val; - ym7128_write(&adgold->ym7128, val); + if (adgold->surround_enabled) + ym7128_write(&adgold->ym7128, val); break; default: @@ -379,16 +387,10 @@ adgold_write(uint16_t addr, uint8_t val, void *priv) adgold->adgold_mma.voice_count[1] = adgold->adgold_mma.voice_latch[1]; while (((adgold->adgold_mma_fifo_end[0] - adgold->adgold_mma_fifo_start[0]) & 255) < 128) { - if (adgold_getsamp_dma(adgold, 0)) { - adgold->adgold_mma_fifo_end[0] = 0; - adgold->adgold_mma_fifo_start[0] = 0; + adgold_getsamp_dma(adgold, 0); + adgold_getsamp_dma(adgold, 1); + if (adgold->finish_dma) break; - } - if (adgold_getsamp_dma(adgold, 1)) { - adgold->adgold_mma_fifo_end[1] = 0; - adgold->adgold_mma_fifo_start[1] = 0; - break; - } } if (((adgold->adgold_mma_fifo_end[0] - adgold->adgold_mma_fifo_start[0]) & 255) >= adgold->adgold_mma_intpos[0]) { adgold->adgold_mma_status &= ~0x01; @@ -402,11 +404,9 @@ adgold_write(uint16_t addr, uint8_t val, void *priv) } } else { while (((adgold->adgold_mma_fifo_end[0] - adgold->adgold_mma_fifo_start[0]) & 255) < 128) { - if (adgold_getsamp_dma(adgold, 0)) { - adgold->adgold_mma_fifo_end[0] = 0; - adgold->adgold_mma_fifo_start[0] = 0; + adgold_getsamp_dma(adgold, 0); + if (adgold->finish_dma) break; - } } if (((adgold->adgold_mma_fifo_end[0] - adgold->adgold_mma_fifo_start[0]) & 255) >= adgold->adgold_mma_intpos[0]) { adgold->adgold_mma_status &= ~0x01; @@ -516,11 +516,9 @@ adgold_write(uint16_t addr, uint8_t val, void *priv) if (adgold->adgold_mma_regs[1][0xc] & 1) { while (((adgold->adgold_mma_fifo_end[1] - adgold->adgold_mma_fifo_start[1]) & 255) < 128) { - if (adgold_getsamp_dma(adgold, 1)) { - adgold->adgold_mma_fifo_end[1] = 0; - adgold->adgold_mma_fifo_start[1] = 0; + adgold_getsamp_dma(adgold, 1); + if (adgold->finish_dma) break; - } } } } @@ -598,7 +596,6 @@ adgold_read(uint16_t addr, void *priv) temp = adgold->adgold_mma_status; adgold->adgold_mma_status &= ~0xf3; /*JUKEGOLD expects timer status flags to auto-clear*/ adgold_update_irq_status(adgold); - picintc(1 << adgold->irq); break; case 5: if (adgold->adgold_mma_addr >= 0xf) @@ -693,11 +690,9 @@ adgold_mma_poll(adgold_t *adgold, int channel) } if (adgold->adgold_mma_regs[channel][0xc] & 1) { - if (adgold_getsamp_dma(adgold, channel)) { - adgold->adgold_mma_fifo_end[channel] = 0; - adgold->adgold_mma_fifo_start[channel] = 0; + adgold_getsamp_dma(adgold, channel); + if (adgold->finish_dma) return; - } } if (((adgold->adgold_mma_fifo_end[channel] - adgold->adgold_mma_fifo_start[channel]) & 255) < adgold->adgold_mma_intpos[channel] && !(adgold->adgold_mma_status & 0x01)) { adgold->adgold_mma_status |= (1 << channel); @@ -788,126 +783,14 @@ adgold_get_buffer(int32_t *buffer, int len, void *priv) int c; + int32_t *opl_buf = adgold->opl.update(adgold->opl.priv); adgold_update(adgold); - for (c = 0; c < len * 2; c += 2) { - adgold_buffer[c] = ((adgold->mma_buffer[0][c >> 1] * adgold->samp_vol_l) >> 7) / 4; - adgold_buffer[c + 1] = ((adgold->mma_buffer[1][c >> 1] * adgold->samp_vol_r) >> 7) / 4; - } - - if (adgold->surround_enabled) - ym7128_apply(&adgold->ym7128, adgold_buffer, len); - - switch (adgold->adgold_38x_regs[0x8] & 6) { - case 0: - for (c = 0; c < len * 2; c++) - adgold_buffer[c] = 0; - break; - case 2: /*Left channel only*/ - for (c = 0; c < len * 2; c += 2) - adgold_buffer[c + 1] = adgold_buffer[c]; - break; - case 4: /*Right channel only*/ - for (c = 0; c < len * 2; c += 2) - adgold_buffer[c] = adgold_buffer[c + 1]; - break; - case 6: /*Left and right channels*/ - break; - - default: - break; - } - - switch (adgold->adgold_38x_regs[0x8] & 0x18) { - case 0x00: /*Forced mono*/ - for (c = 0; c < len * 2; c += 2) - adgold_buffer[c] = adgold_buffer[c + 1] = ((int32_t) adgold_buffer[c] + (int32_t) adgold_buffer[c + 1]) / 2; - break; - case 0x08: /*Linear stereo*/ - break; - case 0x10: /*Pseudo stereo*/ - /*Filter left channel, leave right channel unchanged*/ - /*Filter cutoff is largely a guess*/ - for (c = 0; c < len * 2; c += 2) - adgold_buffer[c] += adgold_pseudo_stereo_iir(adgold_buffer[c]); - break; - case 0x18: /*Spatial stereo*/ - /*Quite probably wrong, I only have the diagram in the TDA8425 datasheet - and a very vague understanding of how op-amps work to go on*/ - for (c = 0; c < len * 2; c += 2) { - int16_t l = adgold_buffer[c]; - int16_t r = adgold_buffer[c + 1]; - - adgold_buffer[c] += (r / 3) + ((l * 2) / 3); - adgold_buffer[c + 1] += (l / 3) + ((r * 2) / 3); - } - break; - - default: - break; - } - - for (c = 0; c < len * 2; c += 2) { - int32_t temp; - int32_t lowpass; - int32_t highpass; - - /*Output is deliberately halved to avoid clipping*/ - temp = ((int32_t) adgold_buffer[c] * adgold->vol_l) >> 17; - lowpass = adgold_lowpass_iir(0, 0, temp); - highpass = adgold_highpass_iir(0, 0, temp); - if (adgold->bass > 6) - temp += (lowpass * bass_attenuation[adgold->bass]) >> 14; - else if (adgold->bass < 6) - temp = highpass + ((temp * bass_cut[adgold->bass]) >> 14); - if (adgold->treble > 6) - temp += (highpass * treble_attenuation[adgold->treble]) >> 14; - else if (adgold->treble < 6) - temp = lowpass + ((temp * treble_cut[adgold->treble]) >> 14); - if (temp < -32768) - temp = -32768; - if (temp > 32767) - temp = 32767; - buffer[c] += temp; - - temp = ((int32_t) adgold_buffer[c + 1] * adgold->vol_r) >> 17; - lowpass = adgold_lowpass_iir(0, 1, temp); - highpass = adgold_highpass_iir(0, 1, temp); - if (adgold->bass > 6) - temp += (lowpass * bass_attenuation[adgold->bass]) >> 14; - else if (adgold->bass < 6) - temp = highpass + ((temp * bass_cut[adgold->bass]) >> 14); - if (adgold->treble > 6) - temp += (highpass * treble_attenuation[adgold->treble]) >> 14; - else if (adgold->treble < 6) - temp = lowpass + ((temp * treble_cut[adgold->treble]) >> 14); - if (temp < -32768) - temp = -32768; - if (temp > 32767) - temp = 32767; - buffer[c + 1] += temp; - } - - adgold->pos = 0; - - free(adgold_buffer); -} - -static void -adgold_get_music_buffer(int32_t *buffer, int len, void *priv) -{ - adgold_t *adgold = (adgold_t *) priv; - int16_t *adgold_buffer = malloc(sizeof(int16_t) * len * 2); - if (adgold_buffer == NULL) - fatal("adgold_buffer = NULL"); - - int c; - - const int32_t *opl_buf = adgold->opl.update(adgold->opl.priv); - for (c = 0; c < len * 2; c += 2) { adgold_buffer[c] = ((opl_buf[c] * adgold->fm_vol_l) >> 7) / 2; + adgold_buffer[c] += ((adgold->mma_buffer[0][c >> 1] * adgold->samp_vol_l) >> 7) / 4; adgold_buffer[c + 1] = ((opl_buf[c + 1] * adgold->fm_vol_r) >> 7) / 2; + adgold_buffer[c + 1] += ((adgold->mma_buffer[1][c >> 1] * adgold->samp_vol_r) >> 7) / 4; } if (adgold->surround_enabled) @@ -969,8 +852,8 @@ adgold_get_music_buffer(int32_t *buffer, int len, void *priv) /*Output is deliberately halved to avoid clipping*/ temp = ((int32_t) adgold_buffer[c] * adgold->vol_l) >> 17; - lowpass = adgold_lowpass_iir(1, 0, temp); - highpass = adgold_highpass_iir(1, 0, temp); + lowpass = adgold_lowpass_iir(0, temp); + highpass = adgold_highpass_iir(0, temp); if (adgold->bass > 6) temp += (lowpass * bass_attenuation[adgold->bass]) >> 14; else if (adgold->bass < 6) @@ -986,8 +869,8 @@ adgold_get_music_buffer(int32_t *buffer, int len, void *priv) buffer[c] += temp; temp = ((int32_t) adgold_buffer[c + 1] * adgold->vol_r) >> 17; - lowpass = adgold_lowpass_iir(1, 1, temp); - highpass = adgold_highpass_iir(1, 1, temp); + lowpass = adgold_lowpass_iir(1, temp); + highpass = adgold_highpass_iir(1, temp); if (adgold->bass > 6) temp += (lowpass * bass_attenuation[adgold->bass]) >> 14; else if (adgold->bass < 6) @@ -1004,6 +887,7 @@ adgold_get_music_buffer(int32_t *buffer, int len, void *priv) } adgold->opl.reset_buffer(adgold->opl.priv); + adgold->pos = 0; free(adgold_buffer); } @@ -1073,7 +957,7 @@ adgold_init(UNUSED(const device_t *info)) adgold->surround_enabled = device_get_config_int("surround"); adgold->gameport_enabled = device_get_config_int("gameport"); - fm_driver_get(FM_YMF262, &adgold->opl); + fm_driver_get_ex(FM_YMF262, &adgold->opl, 1); if (adgold->surround_enabled) ym7128_init(&adgold->ym7128); @@ -1164,7 +1048,6 @@ adgold_init(UNUSED(const device_t *info)) timer_add(&adgold->adgold_mma_timer_count, adgold_timer_poll, adgold, 1); sound_add_handler(adgold_get_buffer, adgold); - music_add_handler(adgold_get_music_buffer, adgold); sound_set_cd_audio_filter(adgold_filter_cd_audio, adgold); diff --git a/src/sound/snd_audiopci.c b/src/sound/snd_audiopci.c index 1ca547650..23c4863c7 100644 --- a/src/sound/snd_audiopci.c +++ b/src/sound/snd_audiopci.c @@ -438,8 +438,8 @@ es137x_reset(void *priv) /* Default subsystem ID. */ dev->subsys_lock = 0x00; - *((uint16_t *) &dev->subsys_id[0]) = (dev->type == AUDIOPCI_ES1370) ? 0x4942 : 0x1274; - *((uint16_t *) &dev->subsys_id[2]) = (dev->type == AUDIOPCI_ES1370) ? 0x4c4c : 0x1371; + AS_U16(dev->subsys_id[0]) = (dev->type == AUDIOPCI_ES1370) ? 0x4942 : 0x1274; + AS_U16(dev->subsys_id[2]) = (dev->type == AUDIOPCI_ES1370) ? 0x4c4c : 0x1371; /* Interrupt/Chip Select Control Register, Address 00H Addressable as byte, word, longword */ diff --git a/src/sound/snd_cmi8x38.c b/src/sound/snd_cmi8x38.c index a41f53865..9ee003689 100644 --- a/src/sound/snd_cmi8x38.c +++ b/src/sound/snd_cmi8x38.c @@ -8,8 +8,6 @@ * * C-Media CMI8x38 PCI audio controller emulation. * - * - * * Authors: RichardG, * * Copyright 2022 RichardG. @@ -147,7 +145,7 @@ static void cmi8x38_update_irqs(cmi8x38_t *dev) { /* Calculate and use the INTR flag. */ - if (*((uint32_t *) &dev->io_regs[0x10]) & 0x0401c003) { + if (AS_U32(dev->io_regs[0x10]) & 0x0401c003) { dev->io_regs[0x13] |= 0x80; pci_set_irq(dev->pci_slot, PCI_INTA, &dev->irq_state); cmi8x38_log("CMI8x38: Raising IRQ\n"); @@ -912,19 +910,19 @@ cmi8x38_write(uint16_t addr, uint8_t val, void *priv) case 0x80 ... 0x83: case 0x88 ... 0x8b: dev->io_regs[addr] = val; - dev->dma[(addr & 0x78) >> 3].sample_ptr = *((uint32_t *) &dev->io_regs[addr & 0xfc]); + dev->dma[(addr & 0x78) >> 3].sample_ptr = AS_U32(dev->io_regs[addr & 0xfc]); return; case 0x84 ... 0x85: case 0x8c ... 0x8d: dev->io_regs[addr] = val; - dev->dma[(addr & 0x78) >> 3].frame_count_dma = dev->dma[(addr & 0x78) >> 3].sample_count_out = *((uint16_t *) &dev->io_regs[addr & 0xfe]) + 1; + dev->dma[(addr & 0x78) >> 3].frame_count_dma = dev->dma[(addr & 0x78) >> 3].sample_count_out = AS_U16(dev->io_regs[addr & 0xfe]) + 1; return; case 0x86 ... 0x87: case 0x8e ... 0x8f: dev->io_regs[addr] = val; - dev->dma[(addr & 0x78) >> 3].frame_count_fragment = *((uint16_t *) &dev->io_regs[addr & 0xfe]) + 1; + dev->dma[(addr & 0x78) >> 3].frame_count_fragment = AS_U16(dev->io_regs[addr & 0xfe]) + 1; return; case 0x92: @@ -1074,19 +1072,19 @@ cmi8x38_dma_process(void *priv) /* Set up base address and counters. Nothing reads sample_count_out; it's implemented as an assumption. */ dma->restart = 0; - dma->sample_ptr = *((uint32_t *) &dev->io_regs[dma->reg]); - dma->frame_count_dma = dma->sample_count_out = *((uint16_t *) &dev->io_regs[dma->reg | 0x4]) + 1; - dma->frame_count_fragment = *((uint16_t *) &dev->io_regs[dma->reg | 0x6]) + 1; + dma->sample_ptr = AS_U32(dev->io_regs[dma->reg]); + dma->frame_count_dma = dma->sample_count_out = AS_U16(dev->io_regs[dma->reg | 0x4]) + 1; + dma->frame_count_fragment = AS_U16(dev->io_regs[dma->reg | 0x6]) + 1; cmi8x38_log("CMI8x38: Starting DMA %d at %08X (count %04X fragment %04X)\n", dma->id, dma->sample_ptr, dma->frame_count_dma, dma->frame_count_fragment); } if (dma_status & 0x01) { /* Write channel: read data from FIFO. */ - mem_writel_phys(dma->sample_ptr, *((uint32_t *) &dma->fifo[dma->fifo_end & (sizeof(dma->fifo) - 1)])); + mem_writel_phys(dma->sample_ptr, AS_U32(dma->fifo[dma->fifo_end & (sizeof(dma->fifo) - 1)])); } else { /* Read channel: write data to FIFO. */ - *((uint32_t *) &dma->fifo[dma->fifo_end & (sizeof(dma->fifo) - 1)]) = mem_readl_phys(dma->sample_ptr); + AS_U32(dma->fifo[dma->fifo_end & (sizeof(dma->fifo) - 1)]) = mem_readl_phys(dma->sample_ptr); } dma->fifo_end += 4; dma->sample_ptr += 4; @@ -1094,7 +1092,7 @@ cmi8x38_dma_process(void *priv) /* Check if the fragment size was reached. */ if (--dma->frame_count_fragment <= 0) { /* Reset fragment counter. */ - dma->frame_count_fragment = *((uint16_t *) &dev->io_regs[dma->reg | 0x6]) + 1; + dma->frame_count_fragment = AS_U16(dev->io_regs[dma->reg | 0x6]) + 1; #ifdef ENABLE_CMI8X38_LOG if (dma->frame_count_fragment > 1) /* avoid log spam if fragment counting is unused, like on the newer WDM drivers (cmudax3) */ cmi8x38_log("CMI8x38: DMA %d fragment size reached at %04X frames left", dma->id, dma->frame_count_dma - 1); @@ -1181,7 +1179,7 @@ cmi8x38_poll(void *priv) case 0x02: /* Mono, 16-bit PCM */ if ((dma->fifo_end - dma->fifo_pos) >= 2) { - *out_l = *out_r = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + *out_l = *out_r = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; dma->sample_count_out -= 2; goto n4spk3d; @@ -1192,9 +1190,9 @@ cmi8x38_poll(void *priv) switch (dma->channels) { case 2: if ((dma->fifo_end - dma->fifo_pos) >= 4) { - *out_l = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + *out_l = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; - *out_r = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + *out_r = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; dma->sample_count_out -= 4; goto n4spk3d; @@ -1203,13 +1201,13 @@ cmi8x38_poll(void *priv) case 4: if ((dma->fifo_end - dma->fifo_pos) >= 8) { - dma->out_fl = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + dma->out_fl = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; - dma->out_fr = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + dma->out_fr = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; - dma->out_rl = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + dma->out_rl = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; - dma->out_rr = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + dma->out_rr = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; dma->sample_count_out -= 8; return; @@ -1218,15 +1216,15 @@ cmi8x38_poll(void *priv) case 5: /* not supported by WDM and Linux drivers; channel layout assumed */ if ((dma->fifo_end - dma->fifo_pos) >= 10) { - dma->out_fl = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + dma->out_fl = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; - dma->out_fr = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + dma->out_fr = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; - dma->out_rl = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + dma->out_rl = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; - dma->out_rr = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + dma->out_rr = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; - dma->out_c = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + dma->out_c = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; dma->sample_count_out -= 10; return; @@ -1235,17 +1233,17 @@ cmi8x38_poll(void *priv) case 6: if ((dma->fifo_end - dma->fifo_pos) >= 12) { - dma->out_fl = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + dma->out_fl = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; - dma->out_fr = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + dma->out_fr = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; - dma->out_rl = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + dma->out_rl = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; - dma->out_rr = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + dma->out_rr = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; - dma->out_c = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + dma->out_c = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; - dma->out_lfe = *((uint16_t *) &dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); + dma->out_lfe = AS_U16(dma->fifo[dma->fifo_pos & (sizeof(dma->fifo) - 1)]); dma->fifo_pos += 2; dma->sample_count_out -= 12; return; @@ -1265,7 +1263,7 @@ cmi8x38_poll(void *priv) *out_l = *out_r = 0; /* Stop playback if DMA is disabled. */ - if ((*((uint32_t *) &dev->io_regs[0x00]) & (0x00010001 << dma->id)) != (0x00010000 << dma->id)) { + if ((AS_U32(dev->io_regs[0x00]) & (0x00010001 << dma->id)) != (0x00010000 << dma->id)) { cmi8x38_log("CMI8x38: Stopping playback of DMA channel %d\n", dma->id); dma->playback_enabled = 0; } diff --git a/src/sound/snd_cs423x.c b/src/sound/snd_cs423x.c index 5905fb64e..15ad71782 100644 --- a/src/sound/snd_cs423x.c +++ b/src/sound/snd_cs423x.c @@ -1,18 +1,16 @@ /* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * Crystal CS423x (SBPro/WSS compatible sound chips) emulation. + * Crystal CS423x (SBPro/WSS compatible sound chips) emulation. * + * Authors: RichardG, * - * - * Authors: RichardG, - * - * Copyright 2021-2025 RichardG. + * Copyright 2021-2025 RichardG. */ #include #include diff --git a/src/sound/snd_mpu401.c b/src/sound/snd_mpu401.c index bec2ed39c..87c191cec 100644 --- a/src/sound/snd_mpu401.c +++ b/src/sound/snd_mpu401.c @@ -1,20 +1,20 @@ /* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * Roland MPU-401 emulation. + * Roland MPU-401 emulation. * - * Authors: DOSBox Team, - * Miran Grca, - * TheCollector1995, + * Authors: DOSBox Team, + * Miran Grca, + * TheCollector1995, * - * Copyright 2008-2024 DOSBox Team. - * Copyright 2016-2024 Miran Grca. - * Copyright 2016-2024 TheCollector1995. + * Copyright 2008-2024 DOSBox Team. + * Copyright 2016-2024 Miran Grca. + * Copyright 2016-2024 TheCollector1995. */ #include #include diff --git a/src/sound/snd_opl.c b/src/sound/snd_opl.c index 1ee687f1e..6bbd634a7 100644 --- a/src/sound/snd_opl.c +++ b/src/sound/snd_opl.c @@ -36,150 +36,152 @@ static uint32_t fm_dev_inst[FM_DRV_MAX][FM_MAX]; uint8_t -fm_driver_get(int chip_id, fm_drv_t *drv) +fm_driver_get_ex(int chip_id, fm_drv_t *drv, int is_48k) { + void *flag_48k = is_48k ? ((void *) FM_FORCE_48K) : NULL; + switch (chip_id) { case FM_YM2149: /* SSG */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ym2149_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ym2149_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YM3526: /* OPL */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ym3526_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ym3526_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_Y8950: /* MSX-Audio (OPL with ADPCM) */ *drv = ymfm_drv; - drv->priv = device_add_inst(&y8950_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&y8950_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YM3812: /* OPL2 */ if (fm_driver == FM_DRV_NUKED) { - *drv = nuked_opl_drv; - drv->priv = device_add_inst(&ym3812_nuked_device, fm_dev_inst[fm_driver][chip_id]++); + *drv = is_48k ? nuked_opl_drv_48k : nuked_opl_drv; + drv->priv = device_add_inst_params(&ym3812_nuked_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); } else { *drv = ymfm_drv; - drv->priv = device_add_inst(&ym3812_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ym3812_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); } break; case FM_YMF262: /* OPL3 */ if (fm_driver == FM_DRV_NUKED) { - *drv = nuked_opl_drv; - drv->priv = device_add_inst(&ymf262_nuked_device, fm_dev_inst[fm_driver][chip_id]++); + *drv = is_48k ? nuked_opl_drv_48k : nuked_opl_drv; + drv->priv = device_add_inst_params(&ymf262_nuked_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); } else { *drv = ymfm_drv; - drv->priv = device_add_inst(&ymf262_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ymf262_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); } break; case FM_YMF289B: /* OPL3-L */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ymf289b_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ymf289b_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YMF278B: /* OPL4 */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ymf278b_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ymf278b_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YM2413: /* OPLL */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ym2413_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ym2413_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YM2423: /* OPLL-X */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ym2423_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ym2423_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YMF281: /* OPLLP */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ymf281_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ymf281_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_DS1001: /* Konami VRC7 MMC */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ds1001_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ds1001_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YM2151: /* OPM */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ym2151_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ym2151_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YM2203: /* OPN */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ym2203_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ym2203_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YM2608: /* OPNA */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ym2608_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ym2608_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YMF288: /* OPN3L */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ymf288_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ymf288_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YM2610: /* OPNB */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ym2610_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ym2610_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YM2610B: /* OPNB2 */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ym2610b_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ym2610b_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YM2612: /* OPN2 */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ym2612_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ym2612_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YM3438: /* OPN2C */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ym3438_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ym3438_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YMF276: /* OPN2L */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ymf276_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ymf276_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YM2164: /* OPP */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ym2164_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ym2164_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_YM3806: /* OPQ */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ym3806_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ym3806_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; #if 0 case FM_YMF271: /* OPX */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ymf271_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ymf271_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; #endif case FM_YM2414: /* OPZ */ *drv = ymfm_drv; - drv->priv = device_add_inst(&ym2414_ymfm_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ym2414_ymfm_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; case FM_ESFM: *drv = esfmu_opl_drv; - drv->priv = device_add_inst(&esfm_esfmu_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&esfm_esfmu_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; #ifdef USE_LIBSERIALPORT case FM_OPL2BOARD: *drv = ymfm_opl2board_drv; - drv->priv = device_add_inst(&ym_opl2board_device, fm_dev_inst[fm_driver][chip_id]++); + drv->priv = device_add_inst_params(&ym_opl2board_device, fm_dev_inst[fm_driver][chip_id]++, flag_48k); break; #endif @@ -189,3 +191,9 @@ fm_driver_get(int chip_id, fm_drv_t *drv) return 1; }; + +uint8_t +fm_driver_get(int chip_id, fm_drv_t *drv) +{ + return fm_driver_get_ex(chip_id, drv, 0); +} diff --git a/src/sound/snd_opl2board.c b/src/sound/snd_opl2board.c index 632ad85f1..e8d877222 100644 --- a/src/sound/snd_opl2board.c +++ b/src/sound/snd_opl2board.c @@ -7,7 +7,6 @@ * This file is part of the 86Box distribution. * * Interface to the OPL2Board External audio device (USB) - * * * Authors: Jose Phillips * Fred N. van Kempen, @@ -17,7 +16,6 @@ * Copyright 2017-2020 Fred N. van Kempen. * Copyright 2016-2020 Miran Grca. */ - #include #include #include diff --git a/src/sound/snd_opl_esfm.c b/src/sound/snd_opl_esfm.c index b80d264d5..a05f1f52c 100644 --- a/src/sound/snd_opl_esfm.c +++ b/src/sound/snd_opl_esfm.c @@ -8,7 +8,6 @@ * * ESFMu ESFM emulator. * - * * Authors: Fred N. van Kempen, * Miran Grca, * Alexey Khokholov (Nuke.YKT) @@ -19,7 +18,6 @@ * Copyright 2013-2018 Alexey Khokholov (Nuke.YKT) * Copyright 2024 Cacodemon345 */ - #include #include #include diff --git a/src/sound/snd_opl_nuked.c b/src/sound/snd_opl_nuked.c index 60f5ed2a6..a69b2e758 100644 --- a/src/sound/snd_opl_nuked.c +++ b/src/sound/snd_opl_nuked.c @@ -1460,6 +1460,15 @@ OPL3_GenerateStream(opl3_chip *chip, int32_t *sndptr, uint32_t numsamples) } } +void +OPL3_GenerateResampledStream(opl3_chip *chip, int32_t *sndptr, uint32_t numsamples) +{ + for (uint_fast32_t i = 0; i < numsamples; i++) { + OPL3_GenerateResampled(chip, sndptr); + sndptr += 2; + } +} + static void nuked_timer_tick(nuked_drv_t *dev, int tmr) { @@ -1525,32 +1534,6 @@ nuked_drv_set_do_cycles(void *priv, int8_t do_cycles) dev->flags &= ~FLAG_CYCLES; } -static void * -nuked_drv_init(const device_t *info) -{ - nuked_drv_t *dev = (nuked_drv_t *) calloc(1, sizeof(nuked_drv_t)); - dev->flags = FLAG_CYCLES; - if (info->local == FM_YMF262) - dev->flags |= FLAG_OPL3; - else - dev->status = 0x06; - - /* Initialize the NukedOPL object. */ - OPL3_Reset(&dev->opl, FREQ_49716); - - timer_add(&dev->timers[0], nuked_timer_1, dev, 0); - timer_add(&dev->timers[1], nuked_timer_2, dev, 0); - - return dev; -} - -static void -nuked_drv_close(void *priv) -{ - nuked_drv_t *dev = (nuked_drv_t *) priv; - free(dev); -} - static int32_t * nuked_drv_update(void *priv) { @@ -1560,8 +1543,8 @@ nuked_drv_update(void *priv) return dev->buffer; OPL3_GenerateStream(&dev->opl, - &dev->buffer[dev->pos * 2], - music_pos_global - dev->pos); + &dev->buffer[dev->pos * 2], + music_pos_global - dev->pos); for (; dev->pos < music_pos_global; dev->pos++) { dev->buffer[dev->pos * 2] /= 2; @@ -1571,6 +1554,26 @@ nuked_drv_update(void *priv) return dev->buffer; } +static int32_t * +nuked_drv_update_48k(void *priv) +{ + nuked_drv_t *dev = (nuked_drv_t *) priv; + + if (dev->pos >= sound_pos_global) + return dev->buffer; + + OPL3_GenerateResampledStream(&dev->opl, + &dev->buffer[dev->pos * 2], + sound_pos_global - dev->pos); + + for (; dev->pos < sound_pos_global; dev->pos++) { + dev->buffer[dev->pos * 2] /= 2; + dev->buffer[(dev->pos * 2) + 1] /= 2; + } + + return dev->buffer; +} + static uint8_t nuked_drv_read(uint16_t port, void *priv) { @@ -1579,7 +1582,7 @@ nuked_drv_read(uint16_t port, void *priv) if (dev->flags & FLAG_CYCLES) cycles -= ((int) (isa_timing * 8)); - nuked_drv_update(dev); + dev->update(dev); uint8_t ret = 0xff; @@ -1598,7 +1601,8 @@ static void nuked_drv_write(uint16_t port, uint8_t val, void *priv) { nuked_drv_t *dev = (nuked_drv_t *) priv; - nuked_drv_update(dev); + + dev->update(dev); if ((port & 0x0001) == 0x0001) { OPL3_WriteRegBuffered(&dev->opl, dev->port, val); @@ -1649,6 +1653,40 @@ nuked_drv_reset_buffer(void *priv) dev->pos = 0; } +static void +nuked_drv_close(void *priv) +{ + nuked_drv_t *dev = (nuked_drv_t *) priv; + free(dev); +} + +static void * +nuked_drv_init(const device_t *info) +{ + nuked_drv_t *dev = (nuked_drv_t *) calloc(1, sizeof(nuked_drv_t)); + dev->flags = FLAG_CYCLES; + if ((info->local & FM_TYPE_MASK) == FM_YMF262) + dev->flags |= FLAG_OPL3; + else + dev->status = 0x06; + + dev->is_48k = !!(info->local & FM_FORCE_48K); + + /* Initialize the NukedOPL object. */ + if (dev->is_48k) { + dev->update = nuked_drv_update_48k; + OPL3_Reset(&dev->opl, FREQ_48000); + } else { + dev->update = nuked_drv_update; + OPL3_Reset(&dev->opl, FREQ_49716); + } + + timer_add(&dev->timers[0], nuked_timer_1, dev, 0); + timer_add(&dev->timers[1], nuked_timer_2, dev, 0); + + return dev; +} + const device_t ym3812_nuked_device = { .name = "Yamaha YM3812 OPL2 (NUKED)", .internal_name = "ym3812_nuked", @@ -1686,3 +1724,13 @@ const fm_drv_t nuked_opl_drv = { .priv = NULL, .generate = NULL, }; + +const fm_drv_t nuked_opl_drv_48k = { + .read = &nuked_drv_read, + .write = &nuked_drv_write, + .update = &nuked_drv_update_48k, + .reset_buffer = &nuked_drv_reset_buffer, + .set_do_cycles = &nuked_drv_set_do_cycles, + .priv = NULL, + .generate = NULL, +}; diff --git a/src/sound/snd_opl_ymfm.cpp b/src/sound/snd_opl_ymfm.cpp index fb00401d5..37363aa74 100644 --- a/src/sound/snd_opl_ymfm.cpp +++ b/src/sound/snd_opl_ymfm.cpp @@ -8,7 +8,6 @@ * * Interface to the YMFM emulator. * - * * Authors: Adrien Moulin, * * Copyright 2022 Adrien Moulin. @@ -57,11 +56,12 @@ enum { class YMFMChipBase { public: - YMFMChipBase(UNUSED(uint32_t clock), fm_type type, uint32_t samplerate) + YMFMChipBase(UNUSED(uint32_t clock), fm_type type, uint32_t samplerate, int is_48k) : m_buf_pos(0) , m_flags(0) , m_type(type) , m_samplerate(samplerate) + , m_48k(is_48k) { memset(m_buffer, 0, sizeof(m_buffer)); } @@ -75,11 +75,13 @@ public: void set_do_cycles(int8_t do_cycles) { do_cycles ? m_flags |= FLAG_CYCLES : m_flags &= ~FLAG_CYCLES; } int32_t *buffer() const { return (int32_t *) m_buffer; } void reset_buffer() { m_buf_pos = 0; } + int is_48k() const { return m_48k; } virtual uint32_t sample_rate() const = 0; virtual void write(uint16_t addr, uint8_t data) = 0; virtual void generate(int32_t *data, uint32_t num_samples) = 0; + virtual void generate_resampled(int32_t *data, uint32_t num_samples) = 0; virtual int32_t *update() = 0; virtual uint8_t read(uint16_t addr) = 0; virtual void set_clock(uint32_t clock) = 0; @@ -91,17 +93,19 @@ protected: int8_t m_flags; fm_type m_type; uint32_t m_samplerate; + int m_48k; }; template class YMFMChip : public YMFMChipBase, public ymfm::ymfm_interface { public: - YMFMChip(uint32_t clock, fm_type type, uint32_t samplerate) - : YMFMChipBase(clock, type, samplerate) + YMFMChip(uint32_t clock, fm_type type, uint32_t samplerate, int m_48k) + : YMFMChipBase(clock, type, samplerate, m_48k) , m_chip(*this) , m_clock(clock) , m_samplerate(samplerate) , m_samplecnt(0) + , m_48k(0) { memset(m_samples, 0, sizeof(m_samples)); memset(m_oldsamples, 0, sizeof(m_oldsamples)); @@ -110,7 +114,10 @@ public: m_subtract[0] = 80.0; m_subtract[1] = 320.0; m_type = type; - m_buf_pos_global = (samplerate == FREQ_49716) ? &music_pos_global : &wavetable_pos_global; + if (m_48k) + m_buf_pos_global = &sound_pos_global; + else + m_buf_pos_global = (samplerate == FREQ_49716) ? &music_pos_global : &wavetable_pos_global; if (m_type == FM_YMF278B) { if (rom_load_linear("roms/sound/yamaha/yrw801.rom", 0, 0x200000, 0, m_yrw801) == 0) { @@ -177,14 +184,8 @@ public: } } -#if 0 virtual void generate_resampled(int32_t *data, uint32_t num_samples) override { - if ((m_samplerate == FREQ_49716) || (m_samplerate == FREQ_44100)) { - generate(data, num_samples); - return; - } - for (uint32_t i = 0; i < num_samples; i++) { while (m_samplecnt >= m_rateratio) { m_oldsamples[0] = m_samples[0]; @@ -218,14 +219,16 @@ public: m_samplecnt += 1 << RSM_FRAC; } } -#endif virtual int32_t *update() override { if (m_buf_pos >= *m_buf_pos_global) return m_buffer; - generate(&m_buffer[m_buf_pos * 2], *m_buf_pos_global - m_buf_pos); + if (m_48k) + generate_resampled(&m_buffer[m_buf_pos * 2], *m_buf_pos_global - m_buf_pos); + else + generate(&m_buffer[m_buf_pos * 2], *m_buf_pos_global - m_buf_pos); for (; m_buf_pos < *m_buf_pos_global; m_buf_pos++) { m_buffer[m_buf_pos * 2] /= 2; @@ -288,6 +291,8 @@ private: int32_t m_samplecnt; int32_t m_oldsamples[2]; int32_t m_samples[2]; + + int m_48k; }; extern "C" { @@ -326,127 +331,128 @@ static void * ymfm_drv_init(const device_t *info) { YMFMChipBase *fm; + int is_48k = !!(info->local & FM_FORCE_48K); - switch (info->local) { + switch (info->local & FM_TYPE_MASK) { case FM_YM2149: /* OPL */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2149, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2149, FREQ_49716, is_48k); break; case FM_YM3526: /* OPL */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM3526, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM3526, FREQ_49716, is_48k); break; case FM_Y8950: /* MSX-Audio (OPL with ADPCM) */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_Y8950, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_Y8950, FREQ_49716, is_48k); break; default: case FM_YM3812: /* OPL2 */ - fm = (YMFMChipBase *) new YMFMChip(3579545, FM_YM3812, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(3579545, FM_YM3812, FREQ_49716, is_48k); break; case FM_YMF262: /* OPL3 */ - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YMF262, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YMF262, FREQ_49716, is_48k); break; case FM_YMF289B: /* OPL3-L */ /* According to the datasheet, we should be using 33868800, but YMFM appears to cheat and does it using the same values as the YMF262. */ - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YMF289B, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YMF289B, FREQ_49716, is_48k); break; case FM_YMF278B: /* OPL4 */ - fm = (YMFMChipBase *) new YMFMChip(33868800, FM_YMF278B, FREQ_44100); + fm = (YMFMChipBase *) new YMFMChip(33868800, FM_YMF278B, FREQ_44100, is_48k); break; case FM_YM2413: /* OPLL */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2413, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2413, FREQ_49716, is_48k); break; case FM_YM2423: /* OPLL-X */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2423, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2423, FREQ_49716, is_48k); break; case FM_YMF281: /* OPLLP */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YMF281, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YMF281, FREQ_49716, is_48k); break; case FM_DS1001: /* Konami VRC7 MMC */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_DS1001, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_DS1001, FREQ_49716, is_48k); break; case FM_YM2151: /* OPM */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2151, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2151, FREQ_49716, is_48k); break; case FM_YM2203: /* OPN */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2203, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2203, FREQ_49716, is_48k); break; case FM_YM2608: /* OPNA */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2608, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2608, FREQ_49716, is_48k); break; case FM_YMF288: /* OPN3L */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YMF288, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YMF288, FREQ_49716, is_48k); break; case FM_YM2610: /* OPNB */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2610, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2610, FREQ_49716, is_48k); break; case FM_YM2610B: /* OPNB2 */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2610B, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2610B, FREQ_49716, is_48k); break; case FM_YM2612: /* OPN2 */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2612, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2612, FREQ_49716, is_48k); break; case FM_YM3438: /* OPN2C */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM3438, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM3438, FREQ_49716, is_48k); break; case FM_YMF276: /* OPN2L */ // TODO: Check function call, rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YMF276, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YMF276, FREQ_49716, is_48k); break; case FM_YM2164: /* OPP */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2164, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2164, FREQ_49716, is_48k); break; case FM_YM3806: /* OPQ */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM3806, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM3806, FREQ_49716, is_48k); break; #if 0 case FM_YMF271: /* OPX */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YMF271, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YMF271, FREQ_49716, is_48k); break; #endif case FM_YM2414: /* OPZ */ // TODO: Check rates and frequency - fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2414, FREQ_49716); + fm = (YMFMChipBase *) new YMFMChip(14318181, FM_YM2414, FREQ_49716, is_48k); break; } @@ -524,8 +530,10 @@ ymfm_drv_generate(void *priv, int32_t *data, uint32_t num_samples) { YMFMChipBase *drv = (YMFMChipBase *) priv; - // drv->generate_resampled(data, num_samples); - drv->generate(data, num_samples); + if (drv->is_48k()) + drv->generate_resampled(data, num_samples); + else + drv->generate(data, num_samples); } const device_t ym2149_ymfm_device = { diff --git a/src/sound/snd_optimc.c b/src/sound/snd_optimc.c index 274bbd568..c6f25aadf 100644 --- a/src/sound/snd_optimc.c +++ b/src/sound/snd_optimc.c @@ -8,15 +8,12 @@ * * OPTi MediaCHIPS 82C929A (also known as OPTi MAD16 Pro) audio controller emulation. * - * - * * Authors: Cacodemon345 * Eluan Costa Miranda * * Copyright 2022 Cacodemon345. * Copyright 2020 Eluan Costa Miranda. */ - #include #include #include diff --git a/src/sound/snd_sb_dsp.c b/src/sound/snd_sb_dsp.c index 76956c417..80f6c9555 100644 --- a/src/sound/snd_sb_dsp.c +++ b/src/sound/snd_sb_dsp.c @@ -515,7 +515,7 @@ sb_dsp_reset(sb_dsp_t *dsp) dsp->sb_command = 0; dsp->sb_8_length = 0xffff; - dsp->sb_8_autolen = 0xffff; + dsp->sb_8_autolen = 0x7fff; dsp->sb_irq8 = 0; dsp->sb_irq16 = 0; diff --git a/src/sound/snd_speaker.c b/src/sound/snd_speaker.c index 063554875..a780861f8 100644 --- a/src/sound/snd_speaker.c +++ b/src/sound/snd_speaker.c @@ -1,20 +1,18 @@ /* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * Emulation of the PC speaker. + * Emulation of the PC speaker. * + * Authors: Sarah Walker, + * Miran Grca, * - * - * Authors: Sarah Walker, - * Miran Grca, - * - * Copyright 2008-2019 Sarah Walker. - * Copyright 2016-2019 Miran Grca. + * Copyright 2008-2019 Sarah Walker. + * Copyright 2016-2019 Miran Grca. */ #include #include diff --git a/src/sound/snd_wss.c b/src/sound/snd_wss.c index 874638a80..aa5166fa6 100644 --- a/src/sound/snd_wss.c +++ b/src/sound/snd_wss.c @@ -1,20 +1,18 @@ /* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * Windows Sound System emulation. + * Windows Sound System emulation. * + * Authors: Sarah Walker, + * TheCollector1995, * - * - * Authors: Sarah Walker, - * TheCollector1995, - * - * Copyright 2012-2018 Sarah Walker. - * Copyright 2018 TheCollector1995. + * Copyright 2012-2018 Sarah Walker. + * Copyright 2018 TheCollector1995. */ #include #include diff --git a/src/sound/snd_ymf701.c b/src/sound/snd_ymf701.c index ff2f9f78a..3b3529320 100644 --- a/src/sound/snd_ymf701.c +++ b/src/sound/snd_ymf701.c @@ -8,8 +8,6 @@ * * Yamaha YMF-701 (OPL3-SA) audio controller emulation. * - * - * * Authors: Cacodemon345 * Eluan Costa Miranda * win2kgamer @@ -18,7 +16,6 @@ * Copyright 2020 Eluan Costa Miranda. * Copyright 2025 win2kgamer */ - #include #include #include diff --git a/src/sound/snd_ymf71x.c b/src/sound/snd_ymf71x.c new file mode 100644 index 000000000..116a0966d --- /dev/null +++ b/src/sound/snd_ymf71x.c @@ -0,0 +1,878 @@ +/* + * 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. + * + * Yamaha YMF-71x (OPL3-SA2/3) audio controller emulation. + * + * Authors: Cacodemon345 + * Eluan Costa Miranda + * win2kgamer + * + * Copyright 2022 Cacodemon345. + * Copyright 2020 Eluan Costa Miranda. + * Copyright 2025 win2kgamer + */ +#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/midi.h> +#include <86box/timer.h> +#include <86box/pic.h> +#include <86box/sound.h> +#include <86box/gameport.h> +#include <86box/snd_ad1848.h> +#include <86box/snd_sb.h> +#include <86box/mem.h> +#include <86box/rom.h> +#include <86box/plat_unused.h> +#include <86box/log.h> +#include <86box/i2c.h> +#include <86box/isapnp.h> +#include <86box/nvr.h> +#include <86box/snd_opl.h> +#include <86box/filters.h> +#include "cpu.h" + +#define PNP_ROM_YMF718 "roms/sound/ymf71x/UFC-101.BIN" +#define PNP_ROM_YMF719 "roms/sound/ymf71x/PnP1.BIN" + +#define YMF71X_NO_EEPROM 0x100 + +#ifdef ENABLE_YMF71X_LOG +int ymf71x_do_log = ENABLE_YMF71X_LOG; + +static void +ymf71x_log(void *priv, const char *fmt, ...) +{ + if (ymf71x_do_log) { + va_list ap; + va_start(ap, fmt); + log_out(priv, fmt, ap); + va_end(ap); + } +} +#else +# define ymf71x_log(fmt, ...) +#endif + +static const uint8_t ymf71x_init_key[32] = { 0xB1, 0xD8, 0x6C, 0x36, 0x9B, 0x4D, 0xA6, 0xD3, /* "YAMAHA Key" from the datasheet */ + 0x69, 0xB4, 0x5A, 0xAD, 0xD6, 0xEB, 0x75, 0xBA, + 0xDD, 0xEE, 0xF7, 0x7B, 0x3D, 0x9E, 0xCF, 0x67, + 0x33, 0x19, 0x8C, 0x46, 0xA3, 0x51, 0xA8, 0x54 }; + +/* Reversed attenuation values borrowed from snd_sb.c */ +/* YMF-71x master volume attenuation is -30dB when all bits are 1, 0dB when all bits are 0 */ +static const double ymf71x_att_2dbstep_4bits[] = { + 32767.0, 26027.0, 20674.0, 16422.0, 13044.0, 10362.0, 8230.0, 6537.0, + 5192.0, 4125.0, 3276.0, 2602.0, 2067.0, 1641.0, 1304.0, 164.0 +}; + +/* Taken from the SoundBlaster code, not quite correct but provides the desired effect + without causing distortion when applied to CD audio (at lower settings, highest settings + still do this to CD audio) */ +static const double ymf71x_bass_treble_3bits[] = { + 0, 0.25892541, 0.584893192, 1, 1.511886431, 2.16227766, 3, 4.011872336 +}; + + +typedef struct ymf71x_t { + uint8_t type; + + uint16_t cur_sb_addr; + uint16_t cur_wss_addr; + uint16_t cur_mpu401_addr; + uint16_t cur_opl_addr; + uint16_t cur_ctrl_addr; + + int cur_sb_irq; + int cur_sb_dma; + int cur_wss_enabled; + int cur_wss_irq; + int cur_wss_dma; + int cur_mpu401_irq; + void *gameport; + + ad1848_t ad1848; + mpu_t *mpu; + + sb_t *sb; + uint8_t index; + uint8_t regs[0x20]; + uint8_t max_reg; + double master_l; + double master_r; + + void *pnp_card; + uint8_t pnp_rom[512]; + uint8_t key_pos : 5; + uint8_t configidx; + uint8_t ramwrite_enable; + uint8_t ram_data[512]; + uint16_t ram_addr; + isapnp_device_config_t *ymf71x_pnp_config; + + void * log; /* New logging system */ +} ymf71x_t; + +static void +ymf71x_config_write(uint16_t addr, uint8_t val, void *priv) +{ + ymf71x_t *ymf71x = (ymf71x_t *) priv; + + ymf71x_log(ymf71x->log, "Config Write port = %04X, val = %02X\n", addr, val); + + if (addr == 0x279) { + if (ymf71x->key_pos == 0x00) + ymf71x->key_pos = 0x01; + /* Check for YAMAHA Key */ + if (val == ymf71x_init_key[ymf71x->key_pos]) { + ymf71x->key_pos++; + if (!ymf71x->key_pos) { + ymf71x_log(ymf71x->log, "YMF71x: Config unlocked\n"); + /* Force CSN to 0x81 */ + isapnp_set_csn(ymf71x->pnp_card, 0x81); + /* Set card to SLEEP state */ + isapnp_enable_card(ymf71x->pnp_card, ISAPNP_CARD_FORCE_SLEEP); + } + } + ymf71x->configidx = val; + } + if (addr == 0xA79) { + if ((ymf71x->configidx == 0x21) && (val & 0x01)) { + ymf71x_log(ymf71x->log, "Enable internal RAM write\n"); + ymf71x->ramwrite_enable = 1; + } + if ((ymf71x->configidx == 0x21) && (val == 0x00)) { + ymf71x_log(ymf71x->log, "Disable internal RAM write\n"); + isapnp_update_card_rom(ymf71x->pnp_card, &ymf71x->ram_data[0], 512); + } + if ((ymf71x->configidx == 0x20) && (ymf71x->ramwrite_enable == 0x01)) { + ymf71x_log(ymf71x->log, "Write to internal RAM addr %04X, val %02X\n", ymf71x->ram_addr, val); + ymf71x->ram_data[ymf71x->ram_addr++] = val; + } + } +} + +static uint8_t +ymf71x_wss_read(uint16_t addr, void *priv) +{ + ymf71x_t *ymf71x = (ymf71x_t *) priv; + uint8_t ret = 0x00; + uint8_t port = addr - ymf71x->cur_wss_addr; + + switch (port) { + case 0: + switch (ymf71x->cur_wss_irq) { + case 7: + ret |= 0x08; + break; + case 9: + ret |= 0x10; + break; + case 10: + ret |= 0x18; + break; + case 11: + ret |= 0x20; + break; + default: + break; + } + switch (ymf71x->cur_wss_dma) { + case 0: + ret |= 0x01; + break; + case 1: + ret |= 0x02; + break; + case 3: + ret |= 0x03; + break; + default: + break; + } + break; + case 3: + ret = 0x04; + break; + default: + ret = 0x04; + break; + } + ymf71x_log(ymf71x->log, "WSS Read: addr = %02X, ret = %02X\n", addr, ret); + return ret; + +} + +static void +ymf71x_wss_write(uint16_t addr, uint8_t val, void *priv) +{ + ymf71x_t *ymf71x = (ymf71x_t *) priv; + uint8_t port = addr - ymf71x->cur_wss_addr; + + ymf71x_log(ymf71x->log, "WSS Write: addr = %02X, val = %02X\n", addr, val); + switch (port) { + case 0: + break; + default: + break; + } +} + +static void +ymf71x_update_mastervol(void *priv) +{ + ymf71x_t *ymf71x = (ymf71x_t *) priv; + /* Master volume attenuation */ + if (ymf71x->regs[0x07] & 0x80) + ymf71x->master_l = 0; + else + ymf71x->master_l = ymf71x_att_2dbstep_4bits[ymf71x->regs[0x07] & 0x0F] / 32767.0; + + if (ymf71x->regs[0x08] & 0x80) + ymf71x->master_r = 0; + else + ymf71x->master_r = ymf71x_att_2dbstep_4bits[ymf71x->regs[0x08] & 0x0F] / 32767.0; +} + +static void +ymf71x_reg_write(uint16_t addr, uint8_t val, void *priv) +{ + ymf71x_t *ymf71x = (ymf71x_t *) priv; + uint8_t port = addr - ymf71x->cur_ctrl_addr; + + switch (port) { + case 0x00: /* Index */ + ymf71x->index = val; + break; + case 0x01: /* Data */ + if (ymf71x->index <= ymf71x->max_reg) { + switch (ymf71x->index) { + case 0x01: /* Power Management */ + ymf71x->regs[0x01] = val; + break; + case 0x02: /* System Control */ + ymf71x->regs[0x02] = val; + break; + case 0x03: /* Interrupt Channel Config */ + ymf71x->regs[0x03] = val; + break; + case 0x04: /* IRQ-A Status (RO) */ + break; + case 0x05: /* IRQ-B Status (RO) */ + break; + case 0x06: /* DMA Config */ + ymf71x->regs[0x06] = val; + break; + case 0x07: /* Master Volume Left Channel */ + ymf71x->regs[0x07] = val; + ymf71x_update_mastervol(ymf71x); + break; + case 0x08: /* Master Volume Right Channel */ + ymf71x->regs[0x08] = val; + ymf71x_update_mastervol(ymf71x); + break; + case 0x09: /* Mic Volume */ + ymf71x->regs[0x09] = val; + break; + case 0x0A: /* Miscellaneous */ + ymf71x->regs[0x0A] = ((val & 0xf0) | ymf71x->type); + break; + case 0x0B ... 0x0E: /* WSS DMA Base Counter */ + ymf71x->regs[ymf71x->index] = val; + break; + case 0x0F: /* WSS Interrupt Scan (SA3) */ + ymf71x->regs[0x0F] = val; + break; + case 0x10: /* SB Internal State Scan (SA3) */ + ymf71x->regs[0x10] = val; + break; + case 0x11: /* SB Internal State Scan (SA3) */ + ymf71x->regs[0x11] = val; + break; + case 0x12: /* Digital Block Partial Power Down (SA3) */ + ymf71x->regs[0x12] = val; + break; + case 0x13: /* Analog Block Partial Power Down (SA3) */ + ymf71x->regs[0x13] = val; + break; + case 0x14: /* 3D Enhanced Control Wide (SA3) */ + ymf71x->regs[0x14] = val; + break; + case 0x15: /* 3D Enhanced Control Bass (SA3) */ + ymf71x->regs[0x15] = val; + break; + case 0x16: /* 3D Enhanced Control Treble (SA3) */ + ymf71x->regs[0x16] = val; + break; + case 0x17: /* Hardware Volume Interrupt Channel Config (SA3) */ + ymf71x->regs[0x17] = val; + break; + default: + break; + } + } + break; + default: + break; + } + ymf71x_log(ymf71x->log, "Write: addr = %02X, val = %02X\n", addr, val); +} + +static uint8_t +ymf71x_reg_read(uint16_t addr, void *priv) +{ + ymf71x_t *ymf71x = (ymf71x_t *) priv; + uint8_t temp = 0xFF; + uint8_t port = addr - ymf71x->cur_ctrl_addr; + + switch (port) { + case 0x00: /* Index */ + temp = ymf71x->index; + break; + case 0x01: /* Data */ + if (ymf71x->index <= ymf71x->max_reg) { + if (ymf71x->index == 0x04) { /* Read IRQ-A status reg */ + temp = 0; + if (ymf71x->regs[0x03] & 0x01) + temp |= ((ymf71x->ad1848.regs[24] >> 4) & 0x07); + if (ymf71x->regs[0x03] & 0x02) + temp |= ((ymf71x->sb->dsp.sb_irq8) ? 8: 0); + } + else if (ymf71x->index == 0x05) { /* Read IRQ-B status reg */ + temp = 0; + if (ymf71x->regs[0x03] & 0x10) + temp |= ((ymf71x->ad1848.regs[24] >> 4) & 0x07); + if (ymf71x->regs[0x03] & 0x20) + temp |= ((ymf71x->sb->dsp.sb_irq8) ? 8: 0); + } + else + temp = ymf71x->regs[ymf71x->index]; + } + break; + default: + break; + } + + ymf71x_log(ymf71x->log, "Read: addr = %02X, ret = %02X\n", addr, temp); + return temp; +} + +static void +ymf71x_pnp_config_changed(uint8_t ld, isapnp_device_config_t *config, void *priv) +{ + ymf71x_t *ymf71x = (ymf71x_t *) priv; + + ymf71x_log(ymf71x->log, "PnP Config changed\n"); + + switch (ld) { + case 0: /* WSS/OPL3/SBPro/MPU401/CTRL */ + if (ymf71x->cur_wss_addr) { + io_removehandler(ymf71x->cur_wss_addr, 0x0004, ymf71x_wss_read, NULL, NULL, ymf71x_wss_write, NULL, NULL, ymf71x); + io_removehandler(ymf71x->cur_wss_addr + 0x0004, 0x0004, ad1848_read, NULL, NULL, ad1848_write, NULL, NULL, &ymf71x->ad1848); + ymf71x->cur_wss_addr = 0; + ymf71x->cur_wss_enabled = 0; + } + + if (ymf71x->cur_opl_addr) { + io_removehandler(ymf71x->cur_opl_addr, 4, ymf71x->sb->opl.read, NULL, NULL, ymf71x->sb->opl.write, NULL, NULL, ymf71x->sb->opl.priv); + ymf71x->cur_opl_addr = 0; + } + + if (ymf71x->cur_sb_addr) { + sb_dsp_setaddr(&ymf71x->sb->dsp, 0); + io_removehandler(ymf71x->cur_sb_addr, 4, ymf71x->sb->opl.read, NULL, NULL, ymf71x->sb->opl.write, NULL, NULL, ymf71x->sb->opl.priv); + io_removehandler(ymf71x->cur_sb_addr + 8, 2, ymf71x->sb->opl.read, NULL, NULL, ymf71x->sb->opl.write, NULL, NULL, ymf71x->sb->opl.priv); + io_removehandler(ymf71x->cur_sb_addr + 4, 2, sb_ct1345_mixer_read, NULL, NULL, sb_ct1345_mixer_write, NULL, NULL, ymf71x->sb); + ymf71x->cur_sb_addr = 0; + } + + if (ymf71x->cur_ctrl_addr) { + io_removehandler(ymf71x->cur_ctrl_addr, 2, ymf71x_reg_read, NULL, NULL, ymf71x_reg_write, NULL, NULL, ymf71x); + } + + ad1848_setirq(&ymf71x->ad1848, 0); + sb_dsp_setirq(&ymf71x->sb->dsp, 0); + + ad1848_setdma(&ymf71x->ad1848, 0); + sb_dsp_setdma8(&ymf71x->sb->dsp, 0); + + if (config->activate) { + if (config->io[0].base != ISAPNP_IO_DISABLED) { + ymf71x->cur_sb_addr = config->io[0].base; + ymf71x_log(ymf71x->log, "Updating SB DSP I/O port, SB Addr = %04X\n", ymf71x->cur_sb_addr); + sb_dsp_setaddr(&ymf71x->sb->dsp, ymf71x->cur_sb_addr); + io_sethandler(ymf71x->cur_sb_addr, 4, ymf71x->sb->opl.read, NULL, NULL, ymf71x->sb->opl.write, NULL, NULL, ymf71x->sb->opl.priv); + io_sethandler(ymf71x->cur_sb_addr + 8, 2, ymf71x->sb->opl.read, NULL, NULL, ymf71x->sb->opl.write, NULL, NULL, ymf71x->sb->opl.priv); + io_sethandler(ymf71x->cur_sb_addr + 4, 2, sb_ct1345_mixer_read, NULL, NULL, sb_ct1345_mixer_write, NULL, NULL, ymf71x->sb); + } + + if (config->io[1].base != ISAPNP_IO_DISABLED) { + ymf71x->cur_wss_addr = config->io[1].base; + ymf71x->cur_wss_enabled = 1; + ymf71x_log(ymf71x->log, "Updating WSS I/O port, WSS Addr = %04X\n", ymf71x->cur_wss_addr); + io_sethandler(ymf71x->cur_wss_addr, 0x0004, ymf71x_wss_read, NULL, NULL, ymf71x_wss_write, NULL, NULL, ymf71x); + io_sethandler(ymf71x->cur_wss_addr + 0x0004, 0x0004, ad1848_read, NULL, NULL, ad1848_write, NULL, NULL, &ymf71x->ad1848); + } + + if (config->io[2].base != ISAPNP_IO_DISABLED) { + ymf71x->cur_opl_addr = config->io[2].base; + ymf71x_log(ymf71x->log, "Updating OPL I/O port, OPL Addr = %04X\n", ymf71x->cur_opl_addr); + io_sethandler(ymf71x->cur_opl_addr, 4, ymf71x->sb->opl.read, NULL, NULL, ymf71x->sb->opl.write, NULL, NULL, ymf71x->sb->opl.priv); + } + + if (config->io[3].base != ISAPNP_IO_DISABLED) { + ymf71x->cur_mpu401_addr = config->io[3].base; + ymf71x_log(ymf71x->log, "Updating MPU401 I/O port, MPU Addr = %04X\n", ymf71x->cur_mpu401_addr); + mpu401_change_addr(ymf71x->mpu, ymf71x->cur_mpu401_addr); + } + + if (config->io[4].base != ISAPNP_IO_DISABLED) { + ymf71x->cur_ctrl_addr = config->io[4].base; + ymf71x_log(ymf71x->log, "Updating CTRL I/O port, CTRL Addr = %04X\n", ymf71x->cur_ctrl_addr); + io_sethandler(ymf71x->cur_ctrl_addr, 2, ymf71x_reg_read, NULL, NULL, ymf71x_reg_write, NULL, NULL, ymf71x); + } + + if (config->irq[0].irq != ISAPNP_IRQ_DISABLED) { + if (ymf71x->regs[0x03] & 0x01) { + ad1848_setirq(&ymf71x->ad1848, config->irq[0].irq); + ymf71x->cur_wss_irq = config->irq[0].irq; + ymf71x_log(ymf71x->log, "Setting WSS IRQ to IRQ-A (%04X)\n", ymf71x->cur_wss_irq); + } + if (ymf71x->regs[0x03] & 0x02) { + sb_dsp_setirq(&ymf71x->sb->dsp, config->irq[0].irq); + ymf71x->cur_sb_irq = config->irq[0].irq; + ymf71x_log(ymf71x->log, "Setting SB IRQ to IRQ-A (%04X)\n", ymf71x->cur_sb_irq); + } + if (ymf71x->regs[0x03] & 0x04) { + mpu401_setirq(ymf71x->mpu, config->irq[0].irq); + ymf71x->cur_mpu401_irq = config->irq[0].irq; + ymf71x_log(ymf71x->log, "Setting MPU401 IRQ to IRQ-A (%04X)\n", ymf71x->cur_mpu401_irq); + } + } + + if (config->irq[1].irq != ISAPNP_IRQ_DISABLED) { + if (ymf71x->regs[0x03] & 0x10) { + ad1848_setirq(&ymf71x->ad1848, config->irq[1].irq); + ymf71x->cur_wss_irq = config->irq[1].irq; + ymf71x_log(ymf71x->log, "Setting WSS IRQ to IRQ-B (%04X)\n", ymf71x->cur_wss_irq); + } + if (ymf71x->regs[0x03] & 0x20) { + sb_dsp_setirq(&ymf71x->sb->dsp, config->irq[1].irq); + ymf71x->cur_sb_irq = config->irq[1].irq; + ymf71x_log(ymf71x->log, "Setting SB IRQ to IRQ-B (%04X)\n", ymf71x->cur_sb_irq); + } + if (ymf71x->regs[0x03] & 0x40) { + mpu401_setirq(ymf71x->mpu, config->irq[1].irq); + ymf71x->cur_mpu401_irq = config->irq[1].irq; + ymf71x_log(ymf71x->log, "Setting MPU401 IRQ to IRQ-B (%04X)\n", ymf71x->cur_mpu401_irq); + } + } + + if (config->dma[0].dma != ISAPNP_DMA_DISABLED) { + if (ymf71x->regs[0x06] & 0x01) { + ad1848_setdma(&ymf71x->ad1848, config->dma[0].dma); + ymf71x->cur_wss_dma = config->dma[0].dma; + ymf71x_log(ymf71x->log, "Setting WSS DMA to DMA-A (%04X)\n", ymf71x->cur_wss_dma); + } + if (ymf71x->regs[0x06] & 0x04) { + sb_dsp_setdma8(&ymf71x->sb->dsp, config->dma[0].dma); + ymf71x->cur_sb_dma = config->dma[0].dma; + ymf71x_log(ymf71x->log, "Setting SB DMA to DMA-A (%04X)\n", ymf71x->cur_sb_dma); + } + } + + if (config->dma[1].dma != ISAPNP_DMA_DISABLED) { + if (ymf71x->regs[0x06] & 0x10) { + ad1848_setdma(&ymf71x->ad1848, config->dma[1].dma); + ymf71x->cur_wss_dma = config->dma[1].dma; + ymf71x_log(ymf71x->log, "Setting WSS DMA to DMA-B (%04X)\n", ymf71x->cur_wss_dma); + } + if (ymf71x->regs[0x06] & 0x40) { + sb_dsp_setdma8(&ymf71x->sb->dsp, config->dma[1].dma); + ymf71x->cur_sb_dma = config->dma[1].dma; + ymf71x_log(ymf71x->log, "Setting SB DMA to DMA-B (%04X)\n", ymf71x->cur_sb_dma); + } + } + } + break; + + case 1: /* Game Port */ + if (ymf71x->gameport) + gameport_remap(ymf71x->gameport, (config->activate && (config->io[0].base != ISAPNP_IO_DISABLED)) ? config->io[0].base : 0); + break; + default: + break; + } +} + +void +ymf71x_filter_cd_audio(int channel, double *buffer, void *priv) +{ + ymf71x_t *ymf71x = (ymf71x_t *) priv; + const double cd_vol = channel ? ymf71x->ad1848.cd_vol_r : ymf71x->ad1848.cd_vol_l; + double master = channel ? ymf71x->master_r : ymf71x->master_l; + double c = ((*buffer * cd_vol / 3.0) * master) / 65536.0; + double bass_treble; + + if ((ymf71x->regs[0x15] & 0x07) != 0x00) { + bass_treble = ymf71x_bass_treble_3bits[(ymf71x->regs[0x15] & 0x07)]; + + c += (low_iir(2, 0, c) * bass_treble); + } + + if (((ymf71x->regs[0x15] >> 4) & 0x07) != 0x00) { + bass_treble = ymf71x_bass_treble_3bits[((ymf71x->regs[0x15] >> 4) & 0x07)]; + + c += (low_iir(2, 1, c) * bass_treble); + } + + if ((ymf71x->regs[0x16] & 0x07) != 0x00) { + bass_treble = ymf71x_bass_treble_3bits[ymf71x->regs[0x16] & 0x07]; + + c += (high_iir(2, 0, c) * bass_treble); + } + + if (((ymf71x->regs[0x16] >> 4) & 0x07) != 0x00) { + bass_treble = ymf71x_bass_treble_3bits[(ymf71x->regs[0x16] >> 4) & 0x07]; + + c += (high_iir(2, 1, c) * bass_treble); + } + + *buffer = c; +} + +static void +ymf71x_filter_opl(void *priv, double *out_l, double *out_r) +{ + ymf71x_t *ymf71x = (ymf71x_t *) priv; + double bass_treble; + + /* Don't play audio if the FM DAC or OPL3 digital sections are powered down */ + if ( (!(ymf71x->regs[0x01] & 0x23)) && (!(ymf71x->regs[0x12] & 0x10)) && (!(ymf71x->regs[0x13] & 0x10)) ) { + if ((ymf71x->regs[0x15] & 0x07) != 0x00) { + bass_treble = ymf71x_bass_treble_3bits[(ymf71x->regs[0x15] & 0x07)]; + + *out_l += (low_iir(1, 0, *out_l) * bass_treble); + } + + if (((ymf71x->regs[0x15] >> 4) & 0x07) != 0x00) { + bass_treble = ymf71x_bass_treble_3bits[((ymf71x->regs[0x15] >> 4) & 0x07)]; + + *out_r += (low_iir(1, 1, *out_r) * bass_treble); + } + + if ((ymf71x->regs[0x16] & 0x07) != 0x00) { + bass_treble = ymf71x_bass_treble_3bits[ymf71x->regs[0x16] & 0x07]; + + *out_l += (high_iir(1, 0, *out_l) * bass_treble); + } + + if (((ymf71x->regs[0x16] >> 4) & 0x07) != 0x00) { + bass_treble = ymf71x_bass_treble_3bits[(ymf71x->regs[0x16] >> 4) & 0x07]; + + *out_r += (high_iir(1, 1, *out_r) * bass_treble); + } + + *out_l *= ymf71x->master_l; + *out_r *= ymf71x->master_r; + + if (ymf71x->cur_wss_enabled) { + ad1848_filter_channel((void *) &ymf71x->ad1848, AD1848_AUX2, out_l, out_r); + } + } +} + +static void +ymf71x_get_buffer(int32_t *buffer, int len, void *priv) +{ + ymf71x_t *ymf71x = (ymf71x_t *) priv; + + /* wss part */ + + /* Don't play audio if the WSS Playback analog or digital sections are powered down */ + if ( (!(ymf71x->regs[0x01] & 0x23)) && (!(ymf71x->regs[0x12] & 0x04)) && (!(ymf71x->regs[0x13] & 0x04)) ) { + ad1848_update(&ymf71x->ad1848); + for (int c = 0; c < len * 2; c += 2) { + double out_l = 0.0; + double out_r = 0.0; + double bass_treble; + + out_l += (ymf71x->ad1848.buffer[c] * ymf71x->master_l); + out_r += (ymf71x->ad1848.buffer[c +1] * ymf71x->master_r); + + if ((ymf71x->regs[0x15] & 0x07) != 0x00) { + bass_treble = ymf71x_bass_treble_3bits[(ymf71x->regs[0x15] & 0x07)]; + + out_l += (low_iir(0, 0, out_l) * bass_treble); + } + + if (((ymf71x->regs[0x15] >> 4) & 0x07) != 0x00) { + bass_treble = ymf71x_bass_treble_3bits[((ymf71x->regs[0x15] >> 4) & 0x07)]; + + out_r += (low_iir(0, 1, out_r) * bass_treble); + } + + if ((ymf71x->regs[0x16] & 0x07) != 0x00) { + bass_treble = ymf71x_bass_treble_3bits[ymf71x->regs[0x16] & 0x07]; + + out_l += (high_iir(0, 0, out_l) * bass_treble); + } + + if (((ymf71x->regs[0x16] >> 4) & 0x07) != 0x00) { + bass_treble = ymf71x_bass_treble_3bits[(ymf71x->regs[0x16] >> 4) & 0x07]; + + out_r += (high_iir(0, 1, out_r) * bass_treble); + } + + out_l *= ymf71x->master_l; + out_r *= ymf71x->master_r; + + buffer[c] += (int32_t) out_l; + buffer[c + 1] += (int32_t) out_r; + } + + ymf71x->ad1848.pos = 0; + } + + /* sbprov2 part */ + /* Don't play audio if the SB Compatibility analog or digital sections are powered down */ + if ( (!(ymf71x->regs[0x01] & 0x23)) && (!(ymf71x->regs[0x12] & 0x02)) && (!(ymf71x->regs[0x13] & 0x02)) ) { + sb_get_buffer_sbpro(buffer, len, ymf71x->sb); + } +} + +static void * +ymf71x_init(const device_t *info) +{ + ymf71x_t *ymf71x = calloc(1, sizeof(ymf71x_t)); + + ymf71x->type = (info->local & 0x0F); + + ymf71x->cur_wss_addr = 0; + ymf71x->cur_sb_addr = 0; + ymf71x->cur_sb_irq = 5; + ymf71x->cur_wss_enabled = 0; + ymf71x->cur_sb_dma = 1; + ymf71x->cur_mpu401_irq = 5; + ymf71x->cur_mpu401_addr = 0; + ymf71x->cur_wss_dma = 0; + ymf71x->cur_wss_irq = 11; + + ymf71x->regs[0x00] = 0xFF; + ymf71x->regs[0x01] = 0x00; + ymf71x->regs[0x02] = 0x00; + ymf71x->regs[0x03] = 0x69; /* IRQ-A = WSS + OPL3, IRQ-B = SB+MPU401 */ + ymf71x->regs[0x04] = 0x00; + ymf71x->regs[0x05] = 0x00; + ymf71x->regs[0x06] = 0x61; /* DMA-A = WSS Playback, DMA-B = WSS Capture + SBPro */ + ymf71x->regs[0x07] = 0x07; + ymf71x->regs[0x08] = 0x07; + ymf71x->regs[0x09] = 0x88; + ymf71x->regs[0x0A] = (0x80 | ymf71x->type); + ymf71x->regs[0x0B] = 0xFF; + ymf71x->regs[0x0C] = 0xFF; + ymf71x->regs[0x0D] = 0xFF; + ymf71x->regs[0x0E] = 0xFF; + ymf71x->regs[0x0F] = 0x00; + ymf71x->regs[0x10] = 0x00; + ymf71x->regs[0x11] = 0x00; + ymf71x->regs[0x12] = 0x00; + ymf71x->regs[0x13] = 0x00; + ymf71x->regs[0x14] = 0x00; + ymf71x->regs[0x15] = 0x00; + ymf71x->regs[0x16] = 0x00; + ymf71x->regs[0x17] = 0x00; + + if (ymf71x->type == 0x02) + ymf71x->max_reg = 0x17; + else + ymf71x->max_reg = 0x0E; + + ymf71x->log = log_open("YMF71x"); + + ymf71x->gameport = gameport_add(&gameport_pnp_device); + + ad1848_init(&ymf71x->ad1848, AD1848_TYPE_CS4231); + + ymf71x->sb = calloc(1, sizeof(sb_t)); + ymf71x->sb->opl_enabled = 1; + + sb_dsp_set_real_opl(&ymf71x->sb->dsp, 1); + sb_dsp_init(&ymf71x->sb->dsp, SBPRO2_DSP_302, SB_SUBTYPE_DEFAULT, ymf71x); + sb_ct1345_mixer_reset(ymf71x->sb); + + ymf71x->sb->opl_mixer = ymf71x; + ymf71x->sb->opl_mix = ymf71x_filter_opl; + + fm_driver_get(FM_YMF262, &ymf71x->sb->opl); + + sound_add_handler(ymf71x_get_buffer, ymf71x); + music_add_handler(sb_get_music_buffer_sbpro, ymf71x->sb); + ad1848_set_cd_audio_channel(&ymf71x->ad1848, AD1848_AUX1); + sound_set_cd_audio_filter(NULL, NULL); /* Seems to be necessary for the filter below to apply */ + sound_set_cd_audio_filter(ymf71x_filter_cd_audio, ymf71x); + + ymf71x->mpu = (mpu_t *) calloc(1, sizeof(mpu_t)); + mpu401_init(ymf71x->mpu, ymf71x->cur_mpu401_addr, ymf71x->cur_mpu401_irq, M_UART, device_get_config_int("receive_input401")); + + if (device_get_config_int("receive_input")) + midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &ymf71x->sb->dsp); + + if (!(info->local & YMF71X_NO_EEPROM)) { + const char *pnp_rom_file = NULL; + uint16_t pnp_rom_len = 512; + switch (info->local) { + case 0x01: + pnp_rom_file = PNP_ROM_YMF718; + break; + + case 0x02: + pnp_rom_file = PNP_ROM_YMF719; + break; + + default: + break; + } + + uint8_t *pnp_rom = NULL; + if (pnp_rom_file) { + FILE *fp = rom_fopen(pnp_rom_file, "rb"); + if (fp) { + if (fread(ymf71x->pnp_rom, 1, pnp_rom_len, fp) == pnp_rom_len) + pnp_rom = ymf71x->pnp_rom; + fclose(fp); + } + } + ymf71x->pnp_card = isapnp_add_card(pnp_rom, sizeof(ymf71x->pnp_rom), ymf71x_pnp_config_changed, + NULL, NULL, NULL, ymf71x); + } + else + ymf71x->pnp_card = isapnp_add_card(NULL, 0, ymf71x_pnp_config_changed, NULL, NULL, NULL, ymf71x); + + io_sethandler(0x0279, 0x0001, NULL, NULL, NULL, ymf71x_config_write, NULL, NULL, ymf71x); + io_sethandler(0x0A79, 0x0001, NULL, NULL, NULL, ymf71x_config_write, NULL, NULL, ymf71x); + + ymf71x_update_mastervol(ymf71x); + + return ymf71x; +} + +static void +ymf71x_close(void *priv) +{ + ymf71x_t *ymf71x = (ymf71x_t *) priv; + + if (ymf71x->log != NULL) { + log_close(ymf71x->log); + ymf71x->log = NULL; + } + + sb_close(ymf71x->sb); + free(ymf71x->mpu); + free(priv); +} + +static int +ymf718_available(void) +{ + return rom_present(PNP_ROM_YMF718); +} + +static int +ymf719_available(void) +{ + return rom_present(PNP_ROM_YMF719); +} + +static void +ymf71x_speed_changed(void *priv) +{ + ymf71x_t *ymf71x = (ymf71x_t *) priv; + + ad1848_speed_changed(&ymf71x->ad1848); + sb_speed_changed(ymf71x->sb); +} + +static const device_config_t ymf71x_config[] = { + // clang-format off + { + .name = "receive_input", + .description = "Receive MIDI input", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 1, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, + { + .name = "receive_input401", + .description = "Receive MIDI input (MPU-401)", + .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 ymf715_onboard_device = { + .name = "Yamaha YMF-715 Onboard (OPL3-SA3)", + .internal_name = "ymf715_onboard", + .flags = DEVICE_ISA16, + .local = 0x102, + .init = ymf71x_init, + .close = ymf71x_close, + .reset = NULL, + .available = NULL, + .speed_changed = ymf71x_speed_changed, + .force_redraw = NULL, + .config = ymf71x_config +}; + +const device_t ymf718_device = { + .name = "Yamaha YMF-718 (OPL3-SA2)", + .internal_name = "ymf718", + .flags = DEVICE_ISA16, + .local = 0x01, + .init = ymf71x_init, + .close = ymf71x_close, + .reset = NULL, + .available = ymf718_available, + .speed_changed = ymf71x_speed_changed, + .force_redraw = NULL, + .config = ymf71x_config +}; + +const device_t ymf719_device = { + .name = "Yamaha YMF-719 (OPL3-SA3)", + .internal_name = "ymf719", + .flags = DEVICE_ISA16, + .local = 0x02, + .init = ymf71x_init, + .close = ymf71x_close, + .reset = NULL, + .available = ymf719_available, + .speed_changed = ymf71x_speed_changed, + .force_redraw = NULL, + .config = ymf71x_config +}; diff --git a/src/sound/sndio.c b/src/sound/sndio.c index 7459dc130..6363163a2 100644 --- a/src/sound/sndio.c +++ b/src/sound/sndio.c @@ -1,17 +1,16 @@ /* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * Interface to sndio + * Interface to sndio * + * Authors: Nishi * - * Authors: Nishi - * - * Copyright 2025 Nishi. + * Copyright 2025 Nishi. */ #include #include @@ -19,7 +18,6 @@ #include #include #include - #include #include <86box/86box.h> @@ -31,10 +29,11 @@ #define I_WT 2 #define I_CD 3 #define I_MIDI 4 +#define I_FDD 5 -static struct sio_hdl* audio[5] = { NULL, NULL, NULL, NULL, NULL }; -static struct sio_par info[5]; -static int freqs[5] = { SOUND_FREQ, MUSIC_FREQ, WT_FREQ, CD_FREQ, 0 }; +static struct sio_hdl* audio[6] = {NULL, NULL, NULL, NULL, NULL, NULL}; +static struct sio_par info[6]; +static int freqs[6] = { SOUND_FREQ, MUSIC_FREQ, WT_FREQ, CD_FREQ, SOUND_FREQ, 0 }; void closeal(void) @@ -148,7 +147,13 @@ givealbuffer_midi(const void *buf, const uint32_t size) { givealbuffer_common(buf, I_MIDI, (int) size); } - + +void +givealbuffer_fdd(const void *buf, const uint32_t size) +{ + givealbuffer_common(buf, I_FDD, (int) size); +} + void al_set_midi(const int freq, UNUSED(const int buf_size)) { diff --git a/src/sound/sound.c b/src/sound/sound.c index 8a755aea0..9373f067e 100644 --- a/src/sound/sound.c +++ b/src/sound/sound.c @@ -8,8 +8,6 @@ * * Sound emulation core. * - * - * * Authors: Sarah Walker, * Miran Grca, * Jasmine Iwanek, @@ -38,6 +36,7 @@ #include <86box/timer.h> #include <86box/snd_mpu401.h> #include <86box/sound.h> +#include <86box/fdd_audio.h> typedef struct { const device_t *device; @@ -91,6 +90,12 @@ static int cd_buf_update = CD_BUFLEN / SOUNDBUFLEN; static volatile int cdaudioon = 0; static int cd_thread_enable = 0; +static thread_t *sound_fdd_thread_h; +static event_t *sound_fdd_event; +static event_t *sound_fdd_start_event; +static volatile int fddaudioon = 0; +static int fdd_thread_enable = 0; + static void (*filter_cd_audio)(int channel, double *buffer, void *priv) = NULL; static void *filter_cd_audio_p = NULL; @@ -160,6 +165,8 @@ static const SOUND_CARD sound_cards[] = { { &sb_vibra16xv_device }, { &wss_device }, { &ymf701_device }, + { &ymf718_device }, + { &ymf719_device }, /* MCA */ { &adlib_mca_device }, { &ess_chipchat_16_mca_device }, @@ -597,6 +604,9 @@ sound_poll(UNUSED(void *priv)) } } + if (fdd_thread_enable) { + thread_set_event(sound_fdd_event); + } sound_pos_global = 0; } } @@ -698,17 +708,14 @@ sound_reset(void) inital(); timer_add(&sound_poll_timer, sound_poll, NULL, 1); - sound_handlers_num = 0; memset(sound_handlers, 0x00, 8 * sizeof(sound_handler_t)); timer_add(&music_poll_timer, music_poll, NULL, 1); - music_handlers_num = 0; memset(music_handlers, 0x00, 8 * sizeof(sound_handler_t)); timer_add(&wavetable_poll_timer, wavetable_poll, NULL, 1); - wavetable_handlers_num = 0; memset(wavetable_handlers, 0x00, 8 * sizeof(sound_handler_t)); @@ -785,3 +792,61 @@ sound_cd_thread_reset(void) cd_thread_enable = available_cdrom_drives ? 1 : 0; } + +static void +sound_fdd_thread(UNUSED(void *param)) +{ + thread_set_event(sound_fdd_start_event); + while (fddaudioon) { + thread_wait_event(sound_fdd_event, -1); + thread_reset_event(sound_fdd_event); + + if (!fddaudioon) + break; + + static float fdd_float_buffer[SOUNDBUFLEN * 2]; + memset(fdd_float_buffer, 0, sizeof(fdd_float_buffer)); + fdd_audio_callback((int16_t*)fdd_float_buffer, SOUNDBUFLEN * 2); + givealbuffer_fdd(fdd_float_buffer, SOUNDBUFLEN * 2); + } +} + +void +sound_fdd_thread_init(void) +{ + if (!fddaudioon) { + fddaudioon = 1; + fdd_thread_enable = 1; + + sound_fdd_start_event = thread_create_event(); + sound_fdd_event = thread_create_event(); + sound_fdd_thread_h = thread_create(sound_fdd_thread, NULL); + + thread_wait_event(sound_fdd_start_event, -1); + thread_reset_event(sound_fdd_start_event); + } +} + +void +sound_fdd_thread_end(void) +{ + if (fddaudioon) { + fddaudioon = 0; + fdd_thread_enable = 0; + + thread_set_event(sound_fdd_event); + thread_wait(sound_fdd_thread_h); + + if (sound_fdd_event) { + thread_destroy_event(sound_fdd_event); + sound_fdd_event = NULL; + } + + sound_fdd_thread_h = NULL; + + if (sound_fdd_start_event) { + thread_destroy_event(sound_fdd_start_event); + sound_fdd_start_event = NULL; + } + } +} \ No newline at end of file diff --git a/src/sound/xaudio2.c b/src/sound/xaudio2.c index b526fa72f..8596c2a49 100644 --- a/src/sound/xaudio2.c +++ b/src/sound/xaudio2.c @@ -1,18 +1,16 @@ /* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * Interface to the XAudio2 audio processing library. + * Interface to the XAudio2 audio processing library. * + * Authors: Cacodemon345 * - * - * Authors: Cacodemon345 - * - * Copyright 2022 Cacodemon345. + * Copyright 2022 Cacodemon345. */ #include #include @@ -55,6 +53,7 @@ static IXAudio2SourceVoice *srcvoicemusic = NULL; static IXAudio2SourceVoice *srcvoicewt = NULL; static IXAudio2SourceVoice *srcvoicemidi = NULL; static IXAudio2SourceVoice *srcvoicecd = NULL; +static IXAudio2SourceVoice *srcvoicefdd = NULL; #define FREQ SOUND_FREQ #define BUFLEN SOUNDBUFLEN @@ -180,11 +179,18 @@ inital(void) (void) IXAudio2_CreateSourceVoice(xaudio2, &srcvoicecd, &fmt, 0, 2.0f, &callbacks, NULL, NULL); + fmt.nSamplesPerSec = FREQ; + fmt.nBlockAlign = fmt.nChannels * fmt.wBitsPerSample / 8; + fmt.nAvgBytesPerSec = fmt.nSamplesPerSec * fmt.nBlockAlign; + + (void) IXAudio2_CreateSourceVoice(xaudio2, &srcvoicefdd, &fmt, 0, 2.0f, &callbacks, NULL, NULL); + (void) IXAudio2SourceVoice_SetVolume(srcvoice, 1, XAUDIO2_COMMIT_NOW); (void) IXAudio2SourceVoice_Start(srcvoice, 0, XAUDIO2_COMMIT_NOW); (void) IXAudio2SourceVoice_Start(srcvoicecd, 0, XAUDIO2_COMMIT_NOW); (void) IXAudio2SourceVoice_Start(srcvoicemusic, 0, XAUDIO2_COMMIT_NOW); (void) IXAudio2SourceVoice_Start(srcvoicewt, 0, XAUDIO2_COMMIT_NOW); + (void) IXAudio2SourceVoice_Start(srcvoicefdd, 0, XAUDIO2_COMMIT_NOW); const char *mdn = midi_out_device_get_internal_name(midi_output_device_current); @@ -215,6 +221,8 @@ closeal(void) (void) IXAudio2SourceVoice_FlushSourceBuffers(srcvoicewt); (void) IXAudio2SourceVoice_Stop(srcvoicecd, 0, XAUDIO2_COMMIT_NOW); (void) IXAudio2SourceVoice_FlushSourceBuffers(srcvoicecd); + (void) IXAudio2SourceVoice_Stop(srcvoicefdd, 0, XAUDIO2_COMMIT_NOW); + (void) IXAudio2SourceVoice_FlushSourceBuffers(srcvoicefdd); if (srcvoicemidi) { (void) IXAudio2SourceVoice_Stop(srcvoicemidi, 0, XAUDIO2_COMMIT_NOW); (void) IXAudio2SourceVoice_FlushSourceBuffers(srcvoicemidi); @@ -222,6 +230,7 @@ closeal(void) } IXAudio2SourceVoice_DestroyVoice(srcvoicewt); IXAudio2SourceVoice_DestroyVoice(srcvoicecd); + IXAudio2SourceVoice_DestroyVoice(srcvoicefdd); IXAudio2SourceVoice_DestroyVoice(srcvoicemusic); IXAudio2SourceVoice_DestroyVoice(srcvoice); IXAudio2MasteringVoice_DestroyVoice(mastervoice); @@ -229,6 +238,7 @@ closeal(void) srcvoice = NULL; srcvoicecd = NULL; srcvoicemidi = NULL; + srcvoicefdd = NULL; mastervoice = NULL; xaudio2 = NULL; @@ -290,6 +300,18 @@ givealbuffer_cd(const void *buf) givealbuffer_common(buf, srcvoicecd, CD_BUFLEN << 1); } +void +givealbuffer_fdd(const void *buf, const uint32_t size) +{ + if (!initialized) + return; + + if (!srcvoicefdd) + return; + + givealbuffer_common(buf, srcvoicefdd, size); +} + void al_set_midi(const int freq, const int buf_size) { @@ -323,4 +345,4 @@ void givealbuffer_midi(const void *buf, const uint32_t size) { givealbuffer_common(buf, srcvoicemidi, size); -} +} \ No newline at end of file diff --git a/src/unix/dummy_cdrom_ioctl.c b/src/unix/dummy_cdrom_ioctl.c index 8dffc6758..af8679ecc 100644 --- a/src/unix/dummy_cdrom_ioctl.c +++ b/src/unix/dummy_cdrom_ioctl.c @@ -8,8 +8,6 @@ * * Win32 CD-ROM support via IOCTL. * - * - * * Authors: TheCollector1995, , * Miran Grca, * diff --git a/src/unix/unix.c b/src/unix/unix.c index 70cf5b87c..ee13284fd 100644 --- a/src/unix/unix.c +++ b/src/unix/unix.c @@ -405,11 +405,19 @@ path_append_filename(char *dest, const char *s1, const char *s2) int plat_dir_check(char *path) { - struct stat dummy; - if (stat(path, &dummy) < 0) { + struct stat stats; + if (stat(path, &stats) < 0) return 0; - } - return S_ISDIR(dummy.st_mode); + return S_ISDIR(stats.st_mode); +} + +int +plat_file_check(const char *path) +{ + struct stat stats; + if (stat(path, &stats) < 0) + return 0; + return !S_ISDIR(stats.st_mode); } int diff --git a/src/unix/unix_cdrom.c b/src/unix/unix_cdrom.c index 09aaa5092..daf13cb9a 100644 --- a/src/unix/unix_cdrom.c +++ b/src/unix/unix_cdrom.c @@ -8,15 +8,12 @@ * * Handle the platform-side of CDROM/RDisk/MO drives. * - * - * * Authors: Miran Grca, * Fred N. van Kempen, * * Copyright 2016-2018 Miran Grca. * Copyright 2017-2018 Fred N. van Kempen. */ - #include #include #include diff --git a/src/unix/unix_serial_passthrough.c b/src/unix/unix_serial_passthrough.c index fb74f67b3..0fcfbe5b1 100644 --- a/src/unix/unix_serial_passthrough.c +++ b/src/unix/unix_serial_passthrough.c @@ -1,21 +1,19 @@ /* - * 86Box A hypervisor and IBM PC system emulator that specializes in - * running old operating systems and software designed for IBM - * PC systems and compatibles from 1981 through fairly recent - * system designs based on the PCI bus. + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * Definitions for platform specific serial to host passthrough + * Definitions for platform specific serial to host passthrough * + * Authors: Andreas J. Reichel , + * Jasmine Iwanek * - * Authors: Andreas J. Reichel , - * Jasmine Iwanek - * - * Copyright 2021 Andreas J. Reichel. - * Copyright 2021-2025 Jasmine Iwanek. + * Copyright 2021 Andreas J. Reichel. + * Copyright 2021-2025 Jasmine Iwanek. */ - #ifndef __APPLE__ # define _XOPEN_SOURCE 500 # define _DEFAULT_SOURCE 1 diff --git a/src/upi42.c b/src/upi42.c index 50f5c44c9..f29f8a307 100644 --- a/src/upi42.c +++ b/src/upi42.c @@ -8,8 +8,6 @@ * * Intel UPI-42/MCS-48 microcontroller emulation. * - * - * * Authors: RichardG, * * Copyright 2022 RichardG. @@ -875,7 +873,7 @@ upi42_exec(void *priv) } /* Fetch instruction. */ - uint32_t fetchdat = *((uint32_t *) &upi42->rom[upi42->pc]); + uint32_t fetchdat = AS_U32(upi42->rom[upi42->pc]); /* Decode instruction. */ uint8_t insn = fetchdat & 0xff; diff --git a/src/usb.c b/src/usb.c index 222062f4f..c305f4806 100644 --- a/src/usb.c +++ b/src/usb.c @@ -9,8 +9,6 @@ * Universal Serial Bus emulation (currently dummy UHCI and * OHCI). * - * - * * Authors: Miran Grca, * * Copyright 2020 Miran Grca. diff --git a/src/utils/ini.c b/src/utils/ini.c index 47e792594..3ca4c7943 100644 --- a/src/utils/ini.c +++ b/src/utils/ini.c @@ -8,8 +8,6 @@ * * Configuration file handler. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, @@ -25,7 +23,6 @@ * it on Windows XP, and possibly also Vista. Use the * -DANSI_CFG for use on these systems. */ - #include #include #include diff --git a/src/utils/random.c b/src/utils/random.c index 58abb15eb..6ed6c1d0c 100644 --- a/src/utils/random.c +++ b/src/utils/random.c @@ -9,8 +9,6 @@ * A better random number generation, used for floppy weak bits * and network MAC address generation. * - * - * * Authors: Miran Grca, * * Copyright 2016-2018 Miran Grca. diff --git a/src/video/agpgart.c b/src/video/agpgart.c index bf1976b73..6ce5508a0 100644 --- a/src/video/agpgart.c +++ b/src/video/agpgart.c @@ -8,8 +8,6 @@ * * AGP Graphics Address Remapping Table remapping emulation. * - * - * * Authors: RichardG, * * Copyright 2021 RichardG. diff --git a/src/video/clockgen/vid_clockgen_av9194.c b/src/video/clockgen/vid_clockgen_av9194.c index 951f3519c..2f52db151 100644 --- a/src/video/clockgen/vid_clockgen_av9194.c +++ b/src/video/clockgen/vid_clockgen_av9194.c @@ -10,8 +10,6 @@ * * Used by the S3 86c801 (V7-Mirage) card. * - * - * * Authors: Miran Grca, * * Copyright 2016-2018 Miran Grca. diff --git a/src/video/clockgen/vid_clockgen_icd2061.c b/src/video/clockgen/vid_clockgen_icd2061.c index a7f0286f2..bbb4f306f 100644 --- a/src/video/clockgen/vid_clockgen_icd2061.c +++ b/src/video/clockgen/vid_clockgen_icd2061.c @@ -14,8 +14,6 @@ * Used by ET4000w32/p (Diamond Stealth 32) and the S3 * Vision964 family. * - * - * * Authors: Miran Grca, * * Copyright 2016-2018 Miran Grca. diff --git a/src/video/clockgen/vid_clockgen_ics2494.c b/src/video/clockgen/vid_clockgen_ics2494.c index 33a74fe62..f9f4fbcb1 100644 --- a/src/video/clockgen/vid_clockgen_ics2494.c +++ b/src/video/clockgen/vid_clockgen_ics2494.c @@ -10,8 +10,6 @@ * * Used by the AMI S3 924. * - * - * * Authors: Miran Grca, * * Copyright 2020 Miran Grca. diff --git a/src/video/clockgen/vid_clockgen_ics2595.c b/src/video/clockgen/vid_clockgen_ics2595.c index b5da3d7e2..1ee61eb02 100644 --- a/src/video/clockgen/vid_clockgen_ics2595.c +++ b/src/video/clockgen/vid_clockgen_ics2595.c @@ -8,8 +8,6 @@ * * ICS2595 clock chip emulation. Used by ATI Mach64. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/nv/nv_rivatimer.c b/src/video/nv/nv_rivatimer.c index 12d40c026..b28042eab 100644 --- a/src/video/nv/nv_rivatimer.c +++ b/src/video/nv/nv_rivatimer.c @@ -8,8 +8,6 @@ * * Fast, high-frequency, CPU-independent timer. * - * - * * Authors: Connor Hyde, I need a better email address ;^) * * Copyright 2024-2025 starfrost diff --git a/src/video/ramdac/vid_ramdac_ati68860.c b/src/video/ramdac/vid_ramdac_ati68860.c index 4411f2ee2..0f40a4515 100644 --- a/src/video/ramdac/vid_ramdac_ati68860.c +++ b/src/video/ramdac/vid_ramdac_ati68860.c @@ -28,8 +28,6 @@ * 7 If set can remove "snow" in some cases * (A860_Delay_L ?) ?? * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/ramdac/vid_ramdac_ati68875.c b/src/video/ramdac/vid_ramdac_ati68875.c index 4de0ed3d9..12d39ad05 100644 --- a/src/video/ramdac/vid_ramdac_ati68875.c +++ b/src/video/ramdac/vid_ramdac_ati68875.c @@ -8,8 +8,6 @@ * * Emulation of the Mach32-compatible ATI 68875 RAMDAC and clones. * - * - * * Authors: TheCollector1995. * * Copyright 2022-2023 TheCollector1995. diff --git a/src/video/ramdac/vid_ramdac_att20c49x.c b/src/video/ramdac/vid_ramdac_att20c49x.c index 7815f79be..2d8d6a304 100644 --- a/src/video/ramdac/vid_ramdac_att20c49x.c +++ b/src/video/ramdac/vid_ramdac_att20c49x.c @@ -8,8 +8,6 @@ * * Emulation of a AT&T 20c490/491 and 492/493 RAMDAC. * - * - * * Authors: Miran Grca, * * Copyright 2016-2018 Miran Grca. diff --git a/src/video/ramdac/vid_ramdac_att2xc498.c b/src/video/ramdac/vid_ramdac_att2xc498.c index f52b1432f..141ffa4b4 100644 --- a/src/video/ramdac/vid_ramdac_att2xc498.c +++ b/src/video/ramdac/vid_ramdac_att2xc498.c @@ -8,8 +8,6 @@ * * Emulation of a AT&T 2xc498 RAMDAC. * - * - * * Authors: Miran Grca, * * Copyright 2016-2018 Miran Grca. diff --git a/src/video/ramdac/vid_ramdac_bt481.c b/src/video/ramdac/vid_ramdac_bt481.c index 1b81e2dc7..829d1f5a3 100644 --- a/src/video/ramdac/vid_ramdac_bt481.c +++ b/src/video/ramdac/vid_ramdac_bt481.c @@ -9,8 +9,6 @@ * Emulation of the Brooktree BT481 true colour RAMDAC * family. * - * - * * Authors: TheCollector1995. * * Copyright 2024 TheCollector1995. diff --git a/src/video/ramdac/vid_ramdac_bt48x.c b/src/video/ramdac/vid_ramdac_bt48x.c index 7ae96dfbd..be6499990 100644 --- a/src/video/ramdac/vid_ramdac_bt48x.c +++ b/src/video/ramdac/vid_ramdac_bt48x.c @@ -9,8 +9,6 @@ * Emulation of the Brooktree BT484-485A true colour RAMDAC * family. * - * - * * Authors: Miran Grca, * TheCollector1995, * diff --git a/src/video/ramdac/vid_ramdac_ibm_rgb528.c b/src/video/ramdac/vid_ramdac_ibm_rgb528.c index 2f1d57240..bded466d1 100644 --- a/src/video/ramdac/vid_ramdac_ibm_rgb528.c +++ b/src/video/ramdac/vid_ramdac_ibm_rgb528.c @@ -8,8 +8,6 @@ * * Emulation of the IBM RGB 528 true colour RAMDAC. * - * - * * Authors: Miran Grca, * * Copyright 2020 Miran Grca. diff --git a/src/video/ramdac/vid_ramdac_sc1148x.c b/src/video/ramdac/vid_ramdac_sc1148x.c index 0ebcb49b6..d508787b3 100644 --- a/src/video/ramdac/vid_ramdac_sc1148x.c +++ b/src/video/ramdac/vid_ramdac_sc1148x.c @@ -10,8 +10,6 @@ * * Used by the S3 911 and 924 chips. * - * - * * Authors: TheCollector1995, * * Copyright 2020 TheCollector1995. diff --git a/src/video/ramdac/vid_ramdac_sc1502x.c b/src/video/ramdac/vid_ramdac_sc1502x.c index 972e0d895..e427cdfb6 100644 --- a/src/video/ramdac/vid_ramdac_sc1502x.c +++ b/src/video/ramdac/vid_ramdac_sc1502x.c @@ -10,8 +10,6 @@ * * Used by the TLIVESA1 driver for ET4000. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/ramdac/vid_ramdac_sdac.c b/src/video/ramdac/vid_ramdac_sdac.c index 4e6deacdc..2b2890307 100644 --- a/src/video/ramdac/vid_ramdac_sdac.c +++ b/src/video/ramdac/vid_ramdac_sdac.c @@ -8,8 +8,6 @@ * * 87C716 'SDAC' true colour RAMDAC emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/ramdac/vid_ramdac_stg1702.c b/src/video/ramdac/vid_ramdac_stg1702.c index 85d492ce7..8a2d008dd 100644 --- a/src/video/ramdac/vid_ramdac_stg1702.c +++ b/src/video/ramdac/vid_ramdac_stg1702.c @@ -8,8 +8,6 @@ * * STG1702 true colour RAMDAC emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/ramdac/vid_ramdac_tkd8001.c b/src/video/ramdac/vid_ramdac_tkd8001.c index c8ad1c421..7b1ab4d36 100644 --- a/src/video/ramdac/vid_ramdac_tkd8001.c +++ b/src/video/ramdac/vid_ramdac_tkd8001.c @@ -8,8 +8,6 @@ * * Trident TKD8001 RAMDAC emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/ramdac/vid_ramdac_tvp3026.c b/src/video/ramdac/vid_ramdac_tvp3026.c index bd5a83fd0..1958fa588 100644 --- a/src/video/ramdac/vid_ramdac_tvp3026.c +++ b/src/video/ramdac/vid_ramdac_tvp3026.c @@ -9,7 +9,6 @@ * Emulation of the Texas Instruments TVP3026 true colour RAMDAC * family. * - * * TODO: Clock and other parts. * * Authors: TheCollector1995, diff --git a/src/video/vid_8514a.c b/src/video/vid_8514a.c index 7b747ddc0..d521c07d5 100644 --- a/src/video/vid_8514a.c +++ b/src/video/vid_8514a.c @@ -9,8 +9,6 @@ * Emulation of the 8514/A card from IBM for the MCA bus and * ISA bus clones. * - * - * * Authors: TheCollector1995. * * Copyright 2022-2024 TheCollector1995. diff --git a/src/video/vid_ati18800.c b/src/video/vid_ati18800.c index 11124a35b..a7d479235 100644 --- a/src/video/vid_ati18800.c +++ b/src/video/vid_ati18800.c @@ -8,8 +8,6 @@ * * ATI 18800 emulation (VGA Edge-16) * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_ati28800.c b/src/video/vid_ati28800.c index 205d934ee..2fe46bea3 100644 --- a/src/video/vid_ati28800.c +++ b/src/video/vid_ati28800.c @@ -8,8 +8,6 @@ * * ATI 28800 emulation (VGA Charger and Korean VGA) * - * - * * Authors: Sarah Walker, * Miran Grca, * greatpsycho, diff --git a/src/video/vid_ati_eeprom.c b/src/video/vid_ati_eeprom.c index a057f1f39..84cbffedb 100644 --- a/src/video/vid_ati_eeprom.c +++ b/src/video/vid_ati_eeprom.c @@ -8,8 +8,6 @@ * * Emulation of the EEPROM on select ATI cards. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_ati_mach64.c b/src/video/vid_ati_mach64.c index 324023db1..221af0d3f 100644 --- a/src/video/vid_ati_mach64.c +++ b/src/video/vid_ati_mach64.c @@ -8,8 +8,6 @@ * * ATi Mach64 graphics card emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * @@ -41,6 +39,7 @@ #include <86box/vid_svga.h> #include <86box/vid_svga_render.h> #include <86box/vid_ati_eeprom.h> +#include <86box/bswap.h> #ifdef CLAMP # undef CLAMP @@ -82,6 +81,7 @@ enum { typedef struct mach64_t { mem_mapping_t linear_mapping; mem_mapping_t mmio_mapping; + mem_mapping_t linear_mapping_big_endian; mem_mapping_t mmio_linear_mapping; mem_mapping_t mmio_linear_mapping_2; @@ -100,6 +100,8 @@ typedef struct mach64_t { uint8_t pci_slot; uint8_t irq_state; + uint8_t on_board; + uint8_t pci_regs[256]; uint8_t int_line; @@ -274,7 +276,7 @@ typedef struct mach64_t { uint32_t cur_clr0; uint32_t cur_clr1; - uint32_t overlay_dat[1024]; + uint32_t overlay_dat[2048]; uint32_t overlay_graphics_key_clr; uint32_t overlay_graphics_key_msk; uint32_t overlay_video_key_clr; @@ -288,12 +290,17 @@ typedef struct mach64_t { uint32_t scaler_height_width; int scaler_format; int scaler_update; + int scaler_yuv_aper; uint32_t buf_offset[2]; uint32_t buf_pitch[2]; int overlay_v_acc; + uint32_t overlay_uv_addr; + uint32_t overlay_cur_y; + uint32_t overlay_base; + uint8_t thread_run; void *i2c; void *ddc; @@ -383,6 +390,9 @@ void mach64_ext_writeb(uint32_t addr, uint8_t val, void *priv); void mach64_ext_writew(uint32_t addr, uint16_t val, void *priv); void mach64_ext_writel(uint32_t addr, uint32_t val, void *priv); +uint8_t mach64_readb_be(uint32_t addr, void *priv); +void mach64_writeb_be(uint32_t addr, uint8_t val, void *priv); + #ifdef ENABLE_MACH64_LOG int mach64_do_log = ENABLE_MACH64_LOG; @@ -593,6 +603,7 @@ mach64_updatemapping(mach64_t *mach64) mach64_log("Update mapping - PCI disabled\n"); mem_mapping_disable(&svga->mapping); mem_mapping_disable(&mach64->linear_mapping); + mem_mapping_disable(&mach64->linear_mapping_big_endian); mem_mapping_disable(&mach64->mmio_mapping); mem_mapping_disable(&mach64->mmio_linear_mapping); mem_mapping_disable(&mach64->mmio_linear_mapping_2); @@ -647,14 +658,16 @@ mach64_updatemapping(mach64_t *mach64) } } else { /*2*8 MB aperture*/ - mem_mapping_set_addr(&mach64->linear_mapping, mach64->linear_base, (8 << 20) - 0x4000); - mem_mapping_set_addr(&mach64->mmio_linear_mapping, mach64->linear_base + ((8 << 20) - 0x4000), 0x4000); - mem_mapping_set_addr(&mach64->mmio_linear_mapping_2, mach64->linear_base + ((16 << 20) - 0x4000), 0x4000); + mem_mapping_set_addr(&mach64->linear_mapping, mach64->linear_base, (8 << 20) - 4096); + mem_mapping_set_addr(&mach64->mmio_linear_mapping, mach64->linear_base + ((8 << 20) - 4096), 4096); + mem_mapping_set_addr(&mach64->linear_mapping_big_endian, mach64->linear_base + (8 << 20), (8 << 20) - 0x1000); + mem_mapping_set_addr(&mach64->mmio_linear_mapping_2, mach64->linear_base + ((16 << 20) - 0x1000), 0x1000); } } else { mem_mapping_disable(&mach64->linear_mapping); mem_mapping_disable(&mach64->mmio_linear_mapping); mem_mapping_disable(&mach64->mmio_linear_mapping_2); + mem_mapping_disable(&mach64->linear_mapping_big_endian); } } @@ -2312,8 +2325,11 @@ mach64_vblank_start(svga_t *svga) svga->overlay.ena = (mach64->overlay_scale_cntl & OVERLAY_EN) && (overlay_cmp_mix != 1); - mach64->overlay_v_acc = 0; - mach64->scaler_update = 1; + mach64->overlay_v_acc = 0; + mach64->scaler_update = 1; + mach64->overlay_uv_addr = svga->overlay.addr; + mach64->overlay_cur_y = 0; + mach64->overlay_base = svga->overlay.addr; } uint8_t @@ -2391,6 +2407,10 @@ mach64_ext_readb(uint32_t addr, void *priv) case 0x4a: ret = mach64->scaler_format; break; + + case 0x4b: + ret = mach64->scaler_yuv_aper; + break; default: ret = 0xff; @@ -2560,7 +2580,7 @@ mach64_ext_readb(uint32_t addr, void *priv) case 0xc7: READ8(addr, mach64->dac_cntl); - if (mach64->type == MACH64_VT2) { + if (mach64->type >= MACH64_VT2) { ret &= 0xf9; if (i2c_gpio_get_scl(mach64->i2c)) ret |= 0x04; @@ -2959,7 +2979,8 @@ mach64_ext_readw(uint32_t addr, void *priv) if (!(addr & 0x400)) { mach64_log("mach64_ext_readw: addr=%04x\n", addr); - ret = 0xffff; + ret = mach64_ext_readb(addr, priv); + ret |= mach64_ext_readb(addr + 1, priv) << 8; } else switch (addr & 0x3ff) { case 0xb4: @@ -2988,7 +3009,8 @@ mach64_ext_readl(uint32_t addr, void *priv) if (!(addr & 0x400)) { mach64_log("mach64_ext_readl: addr=%04x\n", addr); - ret = 0xffffffff; + ret = mach64_ext_readw(addr, priv); + ret |= mach64_ext_readw(addr + 2, priv) << 16; } else switch (addr & 0x3ff) { case 0x18: @@ -3089,6 +3111,10 @@ mach64_ext_writeb(uint32_t addr, uint8_t val, void *priv) case 0x4a: mach64->scaler_format = val & 0xf; break; + + case 0x4b: + mach64->scaler_yuv_aper = val; + break; case 0x80: case 0x81: @@ -4108,76 +4134,113 @@ mach64_int_hwcursor_draw(svga_t *svga, int displine) } \ } while (0) -#define DECODE_VYUY422() \ - do { \ - for (x = 0; x < mach64->svga.overlay_latch.cur_xsize; x += 2) { \ - uint8_t y1, y2; \ - int8_t u, v; \ - int dR, dG, dB; \ - int r, g, b; \ - \ - y1 = src[0]; \ - u = src[1] - 0x80; \ - y2 = src[2]; \ - v = src[3] - 0x80; \ - src += 4; \ - \ - dR = (359 * v) >> 8; \ - dG = (88 * u + 183 * v) >> 8; \ - dB = (453 * u) >> 8; \ - \ - r = y1 + dR; \ - CLAMP(r); \ - g = y1 - dG; \ - CLAMP(g); \ - b = y1 + dB; \ - CLAMP(b); \ - mach64->overlay_dat[x] = (r << 16) | (g << 8) | b; \ - \ - r = y2 + dR; \ - CLAMP(r); \ - g = y2 - dG; \ - CLAMP(g); \ - b = y2 + dB; \ - CLAMP(b); \ - mach64->overlay_dat[x + 1] = (r << 16) | (g << 8) | b; \ - } \ +#define DECODE_VYUY422() \ + do { \ + for (x = 0; x < src_w; x += 1) { \ + uint8_t y1, y2; \ + int8_t u, v; \ + int dR, dG, dB; \ + int r, g, b; \ + \ + y1 = src[0]; \ + u = src[1] - 0x80; \ + y2 = src[2]; \ + v = src[3] - 0x80; \ + src += 4; \ + \ + dR = (359 * v) >> 8; \ + dG = (88 * u + 183 * v) >> 8; \ + dB = (453 * u) >> 8; \ + \ + r = y1 + dR; \ + CLAMP(r); \ + g = y1 - dG; \ + CLAMP(g); \ + b = y1 + dB; \ + CLAMP(b); \ + mach64->overlay_dat[x * 2] = (r << 16) | (g << 8) | b; \ + \ + r = y2 + dR; \ + CLAMP(r); \ + g = y2 - dG; \ + CLAMP(g); \ + b = y2 + dB; \ + CLAMP(b); \ + mach64->overlay_dat[(x * 2) + 1] = (r << 16) | (g << 8) | b; \ + } \ } while (0) -#define DECODE_YVYU422() \ - do { \ - for (x = 0; x < mach64->svga.overlay_latch.cur_xsize; x += 2) { \ - uint8_t y1, y2; \ - int8_t u, v; \ - int dR, dG, dB; \ - int r, g, b; \ - \ - u = src[0] - 0x80; \ - y1 = src[1]; \ - v = src[2] - 0x80; \ - y2 = src[3]; \ - src += 4; \ - \ - dR = (359 * v) >> 8; \ - dG = (88 * u + 183 * v) >> 8; \ - dB = (453 * u) >> 8; \ - \ - r = y1 + dR; \ - CLAMP(r); \ - g = y1 - dG; \ - CLAMP(g); \ - b = y1 + dB; \ - CLAMP(b); \ - mach64->overlay_dat[x] = (r << 16) | (g << 8) | b; \ - \ - r = y2 + dR; \ - CLAMP(r); \ - g = y2 - dG; \ - CLAMP(g); \ - b = y2 + dB; \ - CLAMP(b); \ - mach64->overlay_dat[x + 1] = (r << 16) | (g << 8) | b; \ - } \ +#define DECODE_YVYU422() \ + do { \ + for (x = 0; x < src_w; x += 1) { \ + uint8_t y1, y2; \ + int8_t u, v; \ + int dR, dG, dB; \ + int r, g, b; \ + \ + u = src[0] - 0x80; \ + y1 = src[1]; \ + v = src[2] - 0x80; \ + y2 = src[3]; \ + src += 4; \ + \ + dR = (359 * v) >> 8; \ + dG = (88 * u + 183 * v) >> 8; \ + dB = (453 * u) >> 8; \ + \ + r = y1 + dR; \ + CLAMP(r); \ + g = y1 - dG; \ + CLAMP(g); \ + b = y1 + dB; \ + CLAMP(b); \ + mach64->overlay_dat[x * 2] = (r << 16) | (g << 8) | b; \ + \ + r = y2 + dR; \ + CLAMP(r); \ + g = y2 - dG; \ + CLAMP(g); \ + b = y2 + dB; \ + CLAMP(b); \ + mach64->overlay_dat[(x * 2) + 1] = (r << 16) | (g << 8) | b; \ + } \ + } while (0) + +#define DECODE_YUV12_PACKED() \ + do { \ + for (x = 0; x < src_w; x += 1) { \ + uint8_t y1, y2; \ + int8_t u, v; \ + int dR, dG, dB; \ + int r, g, b; \ + \ + u = uvsrc[3] - 0x80; \ + y1 = src[0]; \ + v = uvsrc[2] - 0x80; \ + y2 = src[1]; \ + src += 4; \ + uvsrc += 4; \ + \ + dR = (359 * v) >> 8; \ + dG = (88 * u + 183 * v) >> 8; \ + dB = (453 * u) >> 8; \ + \ + r = y1 + dR; \ + CLAMP(r); \ + g = y1 - dG; \ + CLAMP(g); \ + b = y1 + dB; \ + CLAMP(b); \ + mach64->overlay_dat[x * 2] = (r << 16) | (g << 8) | b; \ + \ + r = y2 + dR; \ + CLAMP(r); \ + g = y2 - dG; \ + CLAMP(g); \ + b = y2 + dB; \ + CLAMP(b); \ + mach64->overlay_dat[(x * 2) + 1] = (r << 16) | (g << 8) | b; \ + } \ } while (0) void @@ -4187,11 +4250,13 @@ mach64_overlay_draw(svga_t *svga, int displine) int x; int h_acc = 0; int h_max = (mach64->scaler_height_width >> 16) & 0x3ff; + int src_w = h_max; int h_inc = mach64->overlay_scale_inc >> 16; int v_max = mach64->scaler_height_width & 0x3ff; int v_inc = mach64->overlay_scale_inc & 0xffff; uint32_t *p; uint8_t *src = &svga->vram[svga->overlay.addr]; + uint8_t *uvsrc = src; int old_y = mach64->overlay_v_acc; int y_diff; int video_key_fn = mach64->overlay_key_cntl & 5; @@ -4200,6 +4265,11 @@ mach64_overlay_draw(svga_t *svga, int displine) p = &buffer32->line[displine][svga->x_add + mach64->svga.overlay_latch.x]; + if (mach64->overlay_cur_y >= 2) { + /* Avoid corrupt UV data on YUV12 packed modes */ + uvsrc = &svga->vram[mach64->overlay_base + svga->overlay.pitch * 2 * (!(mach64->overlay_cur_y & 1) ? (mach64->overlay_cur_y + 1) : mach64->overlay_cur_y)]; + } + if (mach64->scaler_update) { switch (mach64->scaler_format) { case 0x3: @@ -4211,6 +4281,9 @@ mach64_overlay_draw(svga_t *svga, int displine) case 0x6: DECODE_ARGB8888(); break; + case 0xa: + DECODE_YUV12_PACKED(); + break; case 0xb: DECODE_VYUY422(); break; @@ -4219,7 +4292,7 @@ mach64_overlay_draw(svga_t *svga, int displine) break; default: - mach64_log("Unknown Mach64 scaler format %x\n", mach64->scaler_format); + pclog("Unknown Mach64 scaler format %x\n", mach64->scaler_format); /*Fill buffer with something recognisably wrong*/ for (x = 0; x < mach64->svga.overlay_latch.cur_xsize; x++) mach64->overlay_dat[x] = 0xff00ff; @@ -4356,6 +4429,7 @@ mach64_overlay_draw(svga_t *svga, int displine) svga->overlay.addr += svga->overlay.pitch * 2 * y_diff; mach64->scaler_update = y_diff; + mach64->overlay_cur_y += y_diff; } static void @@ -4391,7 +4465,7 @@ mach64_io_remove(mach64_t *mach64) io_removehandler(0x01ce, 0x0002, mach64_in, NULL, NULL, mach64_out, NULL, NULL, mach64); if (mach64->block_decoded_io && mach64->block_decoded_io < 0x10000) - io_removehandler(mach64->block_decoded_io, 0x0400, mach64_block_inb, mach64_block_inw, mach64_block_inl, mach64_block_outb, mach64_block_outw, mach64_block_outl, mach64); + io_removehandler(mach64->block_decoded_io, 0x0100, mach64_block_inb, mach64_block_inw, mach64_block_inl, mach64_block_outb, mach64_block_outw, mach64_block_outl, mach64); } static void @@ -4431,7 +4505,7 @@ mach64_io_set(mach64_t *mach64) io_sethandler(0x01ce, 0x0002, mach64_in, NULL, NULL, mach64_out, NULL, NULL, mach64); if (mach64->use_block_decoded_io && mach64->block_decoded_io && mach64->block_decoded_io < 0x10000) - io_sethandler(mach64->block_decoded_io, 0x0400, mach64_block_inb, mach64_block_inw, mach64_block_inl, mach64_block_outb, mach64_block_outw, mach64_block_outl, mach64); + io_sethandler(mach64->block_decoded_io, 0x0100, mach64_block_inb, mach64_block_inw, mach64_block_inl, mach64_block_outb, mach64_block_outw, mach64_block_outl, mach64); } static uint8_t @@ -4480,7 +4554,6 @@ static void mach64_write_linear(uint32_t addr, uint8_t val, void *priv) { svga_t *svga = (svga_t *) priv; - cycles -= svga->monitor->mon_video_timing_write_b; addr &= svga->decode_mask; @@ -4509,10 +4582,38 @@ mach64_writew_linear(uint32_t addr, uint16_t val, void *priv) static void mach64_writel_linear(uint32_t addr, uint32_t val, void *priv) { - svga_t *svga = (svga_t *) priv; + svga_t *svga = (svga_t *) priv; + mach64_t *mach64 = (mach64_t *) svga->priv; cycles -= svga->monitor->mon_video_timing_write_l; + if (((mach64->scaler_yuv_aper >> 4) & 0xc) && !!(addr & 0x800000) == !(mach64->scaler_yuv_aper & 0x20)) { + uint32_t offset_from_base = addr & 0x7FFFFF; + if (addr & 0x800000) bswap32s(&val); + if (((mach64->scaler_yuv_aper >> 4) & 0xc) == 0x4) { // Y plane + offset_from_base <<= 1; + svga->vram[offset_from_base & svga->vram_mask] = (val & 0xFF); + svga->vram[(offset_from_base + 1) & svga->vram_mask] = ((val >> 8) & 0xFF); + svga->vram[(offset_from_base + 4) & svga->vram_mask] = ((val >> 16) & 0xFF); + svga->vram[(offset_from_base + 5) & svga->vram_mask] = ((val >> 24) & 0xFF); + } + else if (((mach64->scaler_yuv_aper >> 4) & 0xc) == 0x8 || ((mach64->scaler_yuv_aper >> 4) & 0xc) == 0xc) { + offset_from_base <<= 2; + if (((mach64->scaler_yuv_aper >> 4) & 0xc) == 0x8) { // U plane + svga->vram[(offset_from_base + 3) & svga->vram_mask] = (val & 0xFF); + svga->vram[(offset_from_base + 7) & svga->vram_mask] = ((val >> 8) & 0xFF); + svga->vram[(offset_from_base + 11) & svga->vram_mask] = ((val >> 16) & 0xFF); + svga->vram[(offset_from_base + 15) & svga->vram_mask] = ((val >> 24) & 0xFF); + } else { // V plane + svga->vram[(offset_from_base + 2) & svga->vram_mask] = (val & 0xFF); + svga->vram[(offset_from_base + 6) & svga->vram_mask] = ((val >> 8) & 0xFF); + svga->vram[(offset_from_base + 10) & svga->vram_mask] = ((val >> 16) & 0xFF); + svga->vram[(offset_from_base + 14) & svga->vram_mask] = ((val >> 24) & 0xFF); + } + } + return; + } + addr &= svga->decode_mask; if (addr >= svga->vram_max) return; @@ -4521,6 +4622,42 @@ mach64_writel_linear(uint32_t addr, uint32_t val, void *priv) *(uint32_t *) &svga->vram[addr] = val; } +uint8_t +mach64_readb_be(uint32_t addr, void *priv) +{ + return mach64_read_linear(addr, priv); +} + +uint16_t +mach64_readw_be(uint32_t addr, void *priv) +{ + return bswap16(mach64_readw_linear(addr, priv)); +} + +uint32_t +mach64_readl_be(uint32_t addr, void *priv) +{ + return bswap32(mach64_readl_linear(addr, priv)); +} + +void +mach64_writeb_be(uint32_t addr, uint8_t val, void *priv) +{ + return mach64_write_linear(addr, val, priv); +} + +void +mach64_writew_be(uint32_t addr, uint16_t val, void *priv) +{ + return mach64_writew_linear(addr, bswap16(val), priv); +} + +void +mach64_writel_be(uint32_t addr, uint32_t val, void *priv) +{ + return mach64_writel_linear(addr, bswap32(val), priv); +} + uint8_t mach64_pci_read(UNUSED(int func), int addr, void *priv) { @@ -4566,30 +4703,31 @@ mach64_pci_read(UNUSED(int func), int addr, void *priv) return mach64->linear_base >> 24; case 0x14: - if (mach64->type == MACH64_VT2) + if (mach64->type >= MACH64_VT2) return 0x01; /*Block decoded IO address*/ return 0x00; case 0x15: - if (mach64->type == MACH64_VT2) + if (mach64->type >= MACH64_VT2) return mach64->block_decoded_io >> 8; return 0x00; case 0x16: - if (mach64->type == MACH64_VT2) + if (mach64->type >= MACH64_VT2) return mach64->block_decoded_io >> 16; return 0x00; case 0x17: - if (mach64->type == MACH64_VT2) + if (mach64->type >= MACH64_VT2) return mach64->block_decoded_io >> 24; return 0x00; + case 0x30: - return mach64->pci_regs[0x30] & 0x01; /*BIOS ROM address*/ + return (mach64->on_board) ? 0 : (mach64->pci_regs[0x30] & 0x01); /*BIOS ROM address*/ case 0x31: return 0x00; case 0x32: - return mach64->pci_regs[0x32]; + return (mach64->on_board) ? 0 : mach64->pci_regs[0x32]; case 0x33: - return mach64->pci_regs[0x33]; + return (mach64->on_board) ? 0 : mach64->pci_regs[0x33]; case 0x3c: return mach64->int_line; @@ -4621,7 +4759,7 @@ mach64_pci_write(UNUSED(int func), int addr, uint8_t val, void *priv) break; case 0x12: - if (mach64->type == MACH64_VT2) + if (mach64->type >= MACH64_VT2) val = 0; mach64->linear_base = (mach64->linear_base & 0xff000000) | ((val & 0x80) << 16); mach64_updatemapping(mach64); @@ -4632,16 +4770,16 @@ mach64_pci_write(UNUSED(int func), int addr, uint8_t val, void *priv) break; case 0x15: - if (mach64->type == MACH64_VT2) { + if (mach64->type >= MACH64_VT2) { if (mach64->pci_regs[PCI_REG_COMMAND] & PCI_COMMAND_IO) mach64_io_remove(mach64); - mach64->block_decoded_io = (mach64->block_decoded_io & 0xffff0000) | ((val & 0xfc) << 8); + mach64->block_decoded_io = (mach64->block_decoded_io & 0xffff0000) | ((val & 0xff) << 8); if (mach64->pci_regs[PCI_REG_COMMAND] & PCI_COMMAND_IO) mach64_io_set(mach64); } break; case 0x16: - if (mach64->type == MACH64_VT2) { + if (mach64->type >= MACH64_VT2) { if (mach64->pci_regs[PCI_REG_COMMAND] & PCI_COMMAND_IO) mach64_io_remove(mach64); mach64->block_decoded_io = (mach64->block_decoded_io & 0xff00fc00) | (val << 16); @@ -4650,7 +4788,7 @@ mach64_pci_write(UNUSED(int func), int addr, uint8_t val, void *priv) } break; case 0x17: - if (mach64->type == MACH64_VT2) { + if (mach64->type >= MACH64_VT2) { if (mach64->pci_regs[PCI_REG_COMMAND] & PCI_COMMAND_IO) mach64_io_remove(mach64); mach64->block_decoded_io = (mach64->block_decoded_io & 0x00fffc00) | (val << 24); @@ -4662,6 +4800,7 @@ mach64_pci_write(UNUSED(int func), int addr, uint8_t val, void *priv) case 0x30: case 0x32: case 0x33: + if (mach64->on_board) return; mach64->pci_regs[addr] = val; if (mach64->pci_regs[0x30] & 0x01) { uint32_t biosaddr = (mach64->pci_regs[0x32] << 16) | (mach64->pci_regs[0x33] << 24); @@ -4681,7 +4820,7 @@ mach64_pci_write(UNUSED(int func), int addr, uint8_t val, void *priv) if (mach64->pci_regs[PCI_REG_COMMAND] & PCI_COMMAND_IO) mach64_io_remove(mach64); mach64->io_base = val & 0x03; - if (mach64->type == MACH64_VT2) + if (mach64->type >= MACH64_VT2) mach64->use_block_decoded_io = val & 0x04; if (mach64->pci_regs[PCI_REG_COMMAND] & PCI_COMMAND_IO) mach64_io_set(mach64); @@ -4702,7 +4841,7 @@ mach64_common_init(const device_t *info) svga = &mach64->svga; mach64->type = info->local & 0xff; - mach64->vram_size = device_get_config_int("memory"); + mach64->vram_size = (info->local & (1 << 20)) ? 4 : device_get_config_int("memory"); mach64->vram_mask = (mach64->vram_size << 20) - 1; if (mach64->type > MACH64_GX) @@ -4719,9 +4858,10 @@ mach64_common_init(const device_t *info) mach64_overlay_draw); mem_mapping_add(&mach64->linear_mapping, 0, 0, mach64_read_linear, mach64_readw_linear, mach64_readl_linear, mach64_write_linear, mach64_writew_linear, mach64_writel_linear, NULL, MEM_MAPPING_EXTERNAL, svga); + mem_mapping_add(&mach64->linear_mapping_big_endian, 0, 0, mach64_readb_be, mach64_readw_be, mach64_readl_be, mach64_writeb_be, mach64_writew_be, mach64_writel_be, NULL, MEM_MAPPING_EXTERNAL, svga); mem_mapping_add(&mach64->mmio_linear_mapping, 0, 0, mach64_ext_readb, mach64_ext_readw, mach64_ext_readl, mach64_ext_writeb, mach64_ext_writew, mach64_ext_writel, NULL, MEM_MAPPING_EXTERNAL, mach64); mem_mapping_add(&mach64->mmio_linear_mapping_2, 0, 0, mach64_ext_readb, mach64_ext_readw, mach64_ext_readl, mach64_ext_writeb, mach64_ext_writew, mach64_ext_writel, NULL, MEM_MAPPING_EXTERNAL, mach64); - mem_mapping_add(&mach64->mmio_mapping, 0xbc000, 0x04000, mach64_ext_readb, mach64_ext_readw, mach64_ext_readl, mach64_ext_writeb, mach64_ext_writew, mach64_ext_writel, NULL, MEM_MAPPING_EXTERNAL, mach64); + mem_mapping_add(&mach64->mmio_mapping, 0xbf000, 0x1000, mach64_ext_readb, mach64_ext_readw, mach64_ext_readl, mach64_ext_writeb, mach64_ext_writew, mach64_ext_writel, NULL, MEM_MAPPING_EXTERNAL, mach64); mem_mapping_disable(&mach64->mmio_mapping); mach64_io_set(mach64); diff --git a/src/video/vid_ati_mach8.c b/src/video/vid_ati_mach8.c index 24293ab1d..b0642c0de 100644 --- a/src/video/vid_ati_mach8.c +++ b/src/video/vid_ati_mach8.c @@ -9,8 +9,6 @@ * Emulation of the 8514/A-compatible Mach8 and Mach32 graphics * chips from ATI for the ISA/VLB/MCA/PCI buses. * - * - * * Authors: TheCollector1995. * * Copyright 2022-2024 TheCollector1995. diff --git a/src/video/vid_bochs_vbe.c b/src/video/vid_bochs_vbe.c index 0ea268ef7..ea0b8872b 100644 --- a/src/video/vid_bochs_vbe.c +++ b/src/video/vid_bochs_vbe.c @@ -23,7 +23,6 @@ * * See https://gitlab.freedesktop.org/xorg/lib/libxcvt/-/blob/master/COPYING for libxcvt license details */ - #include #include #include diff --git a/src/video/vid_cga_colorplus.c b/src/video/vid_cga_colorplus.c index 15d53d543..8b5f1daf7 100644 --- a/src/video/vid_cga_colorplus.c +++ b/src/video/vid_cga_colorplus.c @@ -8,8 +8,6 @@ * * Plantronics ColorPlus emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_cga_comp.c b/src/video/vid_cga_comp.c index a316f79fb..2e3fb8d68 100644 --- a/src/video/vid_cga_comp.c +++ b/src/video/vid_cga_comp.c @@ -9,8 +9,6 @@ * IBM CGA composite filter, borrowed from reenigne's DOSBox * patch and ported to C. * - * - * * Authors: reenigne, * Miran Grca, * diff --git a/src/video/vid_cga_compaq.c b/src/video/vid_cga_compaq.c index 81b063248..6168b7752 100644 --- a/src/video/vid_cga_compaq.c +++ b/src/video/vid_cga_compaq.c @@ -8,8 +8,6 @@ * * Emulation of the Compaq CGA graphics cards. * - * - * * Authors: John Elliott, * Sarah Walker, * Miran Grca, diff --git a/src/video/vid_cga_compaq_plasma.c b/src/video/vid_cga_compaq_plasma.c index b281cf93f..b894daa9f 100644 --- a/src/video/vid_cga_compaq_plasma.c +++ b/src/video/vid_cga_compaq_plasma.c @@ -8,8 +8,6 @@ * * Emulation of the plasma displays on early Compaq Portables and laptops. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_cga_ncr.c b/src/video/vid_cga_ncr.c index eb4474a40..6b0f15f65 100644 --- a/src/video/vid_cga_ncr.c +++ b/src/video/vid_cga_ncr.c @@ -8,8 +8,6 @@ * * Emulation of the NCR NGA (K511, K201) video cards. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, @@ -20,7 +18,6 @@ * Copyright 2017-2019 Fred N. van Kempen. * Copyright 2020 EngiNerd. */ - #include #include #include diff --git a/src/video/vid_cga_olivetti.c b/src/video/vid_cga_olivetti.c index 147529f6e..4cb845684 100644 --- a/src/video/vid_cga_olivetti.c +++ b/src/video/vid_cga_olivetti.c @@ -9,8 +9,6 @@ * Emulation of the Olivetti OGC 8-bit ISA (GO708) and * M21/M24/M28 16-bit bus (GO317/318/380/709) video cards. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, @@ -21,7 +19,6 @@ * Copyright 2017-2019 Fred N. van Kempen. * Copyright 2020 EngiNerd. */ - #include #include #include diff --git a/src/video/vid_cga_toshiba_t1000.c b/src/video/vid_cga_toshiba_t1000.c index 2fd382272..894d28a56 100644 --- a/src/video/vid_cga_toshiba_t1000.c +++ b/src/video/vid_cga_toshiba_t1000.c @@ -9,8 +9,6 @@ * Implementation of the Toshiba T1000 plasma display, which * has a fixed resolution of 640x200 pixels. * - * - * * Authors: Fred N. van Kempen, * Miran Grca, * John Elliott, diff --git a/src/video/vid_cga_toshiba_t3100e.c b/src/video/vid_cga_toshiba_t3100e.c index e3eb673c8..25f079204 100644 --- a/src/video/vid_cga_toshiba_t3100e.c +++ b/src/video/vid_cga_toshiba_t3100e.c @@ -22,8 +22,6 @@ * 61 50 52 0F 19 06 19 19 02 0D 0B 0C MONO * 2D 28 22 0A 67 00 64 67 02 03 06 07 640x400 * - * - * * Authors: Fred N. van Kempen, * Miran Grca, * John Elliott, diff --git a/src/video/vid_chips_69000.c b/src/video/vid_chips_69000.c index c63bfc70a..ef48207e1 100644 --- a/src/video/vid_chips_69000.c +++ b/src/video/vid_chips_69000.c @@ -8,8 +8,6 @@ * * C&T 69000 emulation. * - * - * * Authors: Cacodemon345 * * Copyright 2023-2024 Cacodemon345 diff --git a/src/video/vid_cl54xx.c b/src/video/vid_cl54xx.c index 0a43ab4ce..abdde1622 100644 --- a/src/video/vid_cl54xx.c +++ b/src/video/vid_cl54xx.c @@ -9,8 +9,6 @@ * Emulation of select Cirrus Logic cards (CL-GD 5428, * CL-GD 5429, CL-GD 5430, CL-GD 5434 and CL-GD 5436 are supported). * - * - * * Authors: Miran Grca, * tonioni, * TheCollector1995, @@ -4339,7 +4337,7 @@ gd54xx_init(const device_t *info) case CIRRUS_ID_CLGD5436: if ((info->local & 0x200) && - !strstr(machine_get_internal_name(), "sb486pv")) { + (machines[machine].init != machine_at_sb486pv_init)) { romfn = NULL; gd54xx->has_bios = 0; } else diff --git a/src/video/vid_ddc.c b/src/video/vid_ddc.c index ba6ac2a6d..dd1bdc0a1 100644 --- a/src/video/vid_ddc.c +++ b/src/video/vid_ddc.c @@ -8,8 +8,6 @@ * * DDC monitor emulation. * - * - * * Authors: RichardG, * * Copyright 2020 RichardG. diff --git a/src/video/vid_ddc_edid_custom.c b/src/video/vid_ddc_edid_custom.c index 2febde67e..4442fac10 100644 --- a/src/video/vid_ddc_edid_custom.c +++ b/src/video/vid_ddc_edid_custom.c @@ -8,15 +8,12 @@ * * Custom monitor EDID file loader. * - * - * * Authors: Cacodemon345, * David Hrdlička, * * Copyright 2025 Cacodemon. * Copyright 2025 David Hrdlička. */ - #include #include #include diff --git a/src/video/vid_ega.c b/src/video/vid_ega.c index d25861681..61df063ba 100644 --- a/src/video/vid_ega.c +++ b/src/video/vid_ega.c @@ -9,8 +9,6 @@ * Emulation of the EGA and Chips & Technologies SuperEGA * graphics cards. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_ega_render.c b/src/video/vid_ega_render.c index c1c44dfdb..1c1c0161e 100644 --- a/src/video/vid_ega_render.c +++ b/src/video/vid_ega_render.c @@ -8,8 +8,6 @@ * * EGA renderers. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_et3000.c b/src/video/vid_et3000.c index a75a63829..d86d25363 100644 --- a/src/video/vid_et3000.c +++ b/src/video/vid_et3000.c @@ -8,8 +8,6 @@ * * Emulation of the Tseng Labs ET3000. * - * - * * Authors: Miran Grca, * * Copyright 2016-2018 Miran Grca. diff --git a/src/video/vid_et4000.c b/src/video/vid_et4000.c index b19aad20a..1a8a767e2 100644 --- a/src/video/vid_et4000.c +++ b/src/video/vid_et4000.c @@ -8,8 +8,6 @@ * * Emulation of the Tseng Labs ET4000. * - * - * * Authors: Fred N. van Kempen, * Miran Grca, * GreatPsycho, diff --git a/src/video/vid_et4000w32.c b/src/video/vid_et4000w32.c index 181c3a833..05de0dbea 100644 --- a/src/video/vid_et4000w32.c +++ b/src/video/vid_et4000w32.c @@ -10,8 +10,6 @@ * * Known bugs: Accelerator doesn't work in planar modes * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_genius.c b/src/video/vid_genius.c index 366fa25e1..472217d30 100644 --- a/src/video/vid_genius.c +++ b/src/video/vid_genius.c @@ -8,8 +8,6 @@ * * MDSI Genius VHR emulation. * - * - * * Authors: John Elliott, * Miran Grca, * diff --git a/src/video/vid_hercules.c b/src/video/vid_hercules.c index 15b9e69cd..758b041af 100644 --- a/src/video/vid_hercules.c +++ b/src/video/vid_hercules.c @@ -8,8 +8,6 @@ * * Hercules emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_hercules_incolor.c b/src/video/vid_hercules_incolor.c index 6e3b6a6d2..b9be0765e 100644 --- a/src/video/vid_hercules_incolor.c +++ b/src/video/vid_hercules_incolor.c @@ -8,8 +8,6 @@ * * Hercules InColor emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_hercules_plus.c b/src/video/vid_hercules_plus.c index c6b442ce0..25b44ad70 100644 --- a/src/video/vid_hercules_plus.c +++ b/src/video/vid_hercules_plus.c @@ -8,8 +8,6 @@ * * Hercules Plus emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_ht216.c b/src/video/vid_ht216.c index 3ba814870..005cc6dfa 100644 --- a/src/video/vid_ht216.c +++ b/src/video/vid_ht216.c @@ -8,8 +8,6 @@ * * Video 7 VGA 1024i emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_im1024.c b/src/video/vid_im1024.c index a77ad09c3..1ade8badb 100644 --- a/src/video/vid_im1024.c +++ b/src/video/vid_im1024.c @@ -38,8 +38,6 @@ * This is implemented by holding a FIFO of unlimited depth in * the IM1024 to receive the data. * - * - * * Authors: Fred N. van Kempen, * John Elliott, * diff --git a/src/video/vid_mda.c b/src/video/vid_mda.c index 184ad7fdd..f530419f2 100644 --- a/src/video/vid_mda.c +++ b/src/video/vid_mda.c @@ -8,8 +8,6 @@ * * IBM Monochrome Display and Printer Adapter emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * Connor Hyde, diff --git a/src/video/vid_mga.c b/src/video/vid_mga.c index 564136428..5aadd71f6 100644 --- a/src/video/vid_mga.c +++ b/src/video/vid_mga.c @@ -8,8 +8,6 @@ * * Matrox MGA graphics card emulation. * - * - * * Authors: Sarah Walker, * * Copyright 2008-2020 Sarah Walker. @@ -3753,10 +3751,10 @@ blit_iload_iload(mystique_t *mystique, uint32_t data, int size) case MACCESS_PWIDTH_24: if (mystique->dwgreg.xdst >= mystique->dwgreg.cxleft && mystique->dwgreg.xdst <= mystique->dwgreg.cxright && mystique->dwgreg.ydst_lin >= mystique->dwgreg.ytop && mystique->dwgreg.ydst_lin <= mystique->dwgreg.ybot) { - uint32_t old_dst = *((uint32_t *) &svga->vram[((mystique->dwgreg.ydst_lin + mystique->dwgreg.xdst) * 3) & mystique->vram_mask]); + uint32_t old_dst = AS_U32(svga->vram[((mystique->dwgreg.ydst_lin + mystique->dwgreg.xdst) * 3) & mystique->vram_mask]); dst = bitop(data64, old_dst, mystique->dwgreg.dwgctrl_running); - *((uint32_t *) &svga->vram[((mystique->dwgreg.ydst_lin + mystique->dwgreg.xdst) * 3) & mystique->vram_mask]) = (dst & 0xffffff) | (old_dst & 0xff000000); + AS_U32(svga->vram[((mystique->dwgreg.ydst_lin + mystique->dwgreg.xdst) * 3) & mystique->vram_mask]) = (dst & 0xffffff) | (old_dst & 0xff000000); svga->changedvram[(((mystique->dwgreg.ydst_lin + mystique->dwgreg.xdst) * 3) & mystique->vram_mask) >> 12] = changeframecount; } diff --git a/src/video/vid_oak_oti.c b/src/video/vid_oak_oti.c index 4ea0b21e4..d8e3a89e4 100644 --- a/src/video/vid_oak_oti.c +++ b/src/video/vid_oak_oti.c @@ -8,8 +8,6 @@ * * Oak OTI037C/67/077 emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_paradise.c b/src/video/vid_paradise.c index ff1013232..48796fcc7 100644 --- a/src/video/vid_paradise.c +++ b/src/video/vid_paradise.c @@ -10,8 +10,6 @@ * PC2086, PC3086 use PVGA1A * MegaPC uses W90C11A * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_pcjr.c b/src/video/vid_pcjr.c index 62ce9b61d..fe982980c 100644 --- a/src/video/vid_pcjr.c +++ b/src/video/vid_pcjr.c @@ -8,7 +8,6 @@ * * IBM PCjr video subsystem emulation * - * * Authors: Sarah Walker, * Miran Grca, * Connor Hyde / starfrost @@ -18,7 +17,6 @@ * Copyright 2017-2019 Fred N. van Kempen. * Copyright 2025 starfrost */ - #include #include #include diff --git a/src/video/vid_pgc.c b/src/video/vid_pgc.c index 63126955c..73fde302d 100644 --- a/src/video/vid_pgc.c +++ b/src/video/vid_pgc.c @@ -44,8 +44,6 @@ * * This is expected to be done shortly. * - * - * * Authors: Fred N. van Kempen, * John Elliott, * diff --git a/src/video/vid_ps55da2.c b/src/video/vid_ps55da2.c index 938e4bf6b..a97d2aa84 100644 --- a/src/video/vid_ps55da2.c +++ b/src/video/vid_ps55da2.c @@ -22,7 +22,6 @@ * * Copyright 2024-2025 Akamaki. */ - #include #include #include @@ -96,20 +95,20 @@ #define DA2_POSID_L 0xfe /* [Identification] - POS ID SYS ID - EFFFh * Display Adapter (PS/55 Model 5571-S0A) [Toledo] - E013h * Layout Display Terminal (PS/55-5571 RPQ model) [LDT] - EFFEh * Display Adapter II (I/O 3E0:0A = xx0x xxxx) [Atlas] - |- FFF2h Display Adapter B2 (I/O 3E0:0A = xx1x xxxx) (PS/55 Model 5530Z-SX) - |- FDFEh Display Adapter B2 (I/O 3E0:0A = xx1x xxxx) (PS/55 Model 5550-V2) - |- * Display Adapter III,V (I/O 3E0:0A = xx1x xxxx) - ECECh FF4Fh Display Adapter B1 (PS/55 Model 5531Z-SX) [Atlas-KENT] - |- * Display Adapter IV - ECCEh * Display Adapter IV - 901Fh * Display Adapter A2 - 901Dh * Display Adapter A1 [Atlas II] - 901Eh * Plasma Display Adapter - EFD8h * Display Adapter/J [Atlas-SP2] + POS ID SYS ID + EFFFh * Display Adapter (PS/55 Model 5571-S0A) [Toledo] + E013h * Layout Display Terminal (PS/55-5571 RPQ model) [LDT] + EFFEh * Display Adapter II (I/O 3E0:0A = xx0x xxxx) [Atlas] + |- FFF2h Display Adapter B2 (I/O 3E0:0A = xx1x xxxx) (PS/55 Model 5530Z-SX) + |- FDFEh Display Adapter B2 (I/O 3E0:0A = xx1x xxxx) (PS/55 Model 5550-V2) + |- * Display Adapter III,V (I/O 3E0:0A = xx1x xxxx) + ECECh FF4Fh Display Adapter B1 (PS/55 Model 5531Z-SX) [Atlas-KENT] + |- * Display Adapter IV + ECCEh * Display Adapter IV + 901Fh * Display Adapter A2 + 901Dh * Display Adapter A1 [Atlas II] + 901Eh * Plasma Display Adapter + EFD8h * Display Adapter/J [Atlas-SP2] [Japanese DOS and Display Adapter compatibility] | | | 5605JBK | 5605PAA | 5605PCA | 5605PDE | 5605PAW | 5605PXB | diff --git a/src/video/vid_rtg310x.c b/src/video/vid_rtg310x.c index 813d30bf3..76b8d8f3f 100644 --- a/src/video/vid_rtg310x.c +++ b/src/video/vid_rtg310x.c @@ -8,8 +8,6 @@ * * Emulation of the Realtek RTG series of VGA ISA chips. * - * - * * Authors: TheCollector1995, * * Copyright 2021 TheCollector1995. diff --git a/src/video/vid_s3.c b/src/video/vid_s3.c index e3176381a..2333d68b7 100644 --- a/src/video/vid_s3.c +++ b/src/video/vid_s3.c @@ -8,8 +8,6 @@ * * S3 emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * @@ -530,9 +528,8 @@ s3_queue(s3_t *s3, uint32_t addr, uint32_t val, uint32_t type) if (FIFO_FULL) { thread_reset_event(s3->fifo_not_full_event); - if (FIFO_FULL) { + if (FIFO_FULL) thread_wait_event(s3->fifo_not_full_event, -1); /*Wait for room in ringbuffer*/ - } } fifo->val = val; diff --git a/src/video/vid_s3_virge.c b/src/video/vid_s3_virge.c index d8356df4a..8a139793c 100644 --- a/src/video/vid_s3_virge.c +++ b/src/video/vid_s3_virge.c @@ -8,8 +8,6 @@ * * S3 ViRGE emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * @@ -1954,9 +1952,9 @@ s3_virge_mmio_write_l(uint32_t addr, uint32_t val, void *priv) break; case 0x8190: virge->streams.sec_ctrl = val; - virge->streams.dda_horiz_accumulator = val & 0xfff; - if (val & 0x1000) - virge->streams.dda_horiz_accumulator |= ~0xfff; + virge->streams.dda_horiz_accumulator = val & 0x7ff; + if (val & 0x800) + virge->streams.dda_horiz_accumulator |= ~0x7ff; virge->streams.sdif = (val >> 24) & 7; break; @@ -1969,9 +1967,9 @@ s3_virge_mmio_write_l(uint32_t addr, uint32_t val, void *priv) if (val & 0x800) virge->streams.k1_horiz_scale |= ~0x7ff; - virge->streams.k2_horiz_scale = (val >> 16) & 0x7ff; - if ((val >> 16) & 0x800) - virge->streams.k2_horiz_scale |= ~0x7ff; + virge->streams.k2_horiz_scale = (val >> 16) & 0x3ff; + if ((val >> 16) & 0x400) + virge->streams.k2_horiz_scale |= ~0x3ff; svga_recalctimings(svga); svga->fullchange = changeframecount; @@ -2027,14 +2025,14 @@ s3_virge_mmio_write_l(uint32_t addr, uint32_t val, void *priv) virge->streams.k1_vert_scale |= ~0x7ff; break; case 0x81e4: - virge->streams.k2_vert_scale = val & 0x7ff; - if (val & 0x800) - virge->streams.k2_vert_scale |= ~0x7ff; + virge->streams.k2_vert_scale = val & 0x3ff; + if (val & 0x400) + virge->streams.k2_vert_scale |= ~0x3ff; break; case 0x81e8: - virge->streams.dda_vert_accumulator = val & 0xfff; - if (val & 0x1000) - virge->streams.dda_vert_accumulator |= ~0xfff; + virge->streams.dda_vert_accumulator = val & 0x7ff; + if (val & 0x800) + virge->streams.dda_vert_accumulator |= ~0x7ff; svga_recalctimings(svga); svga->fullchange = changeframecount; diff --git a/src/video/vid_sigma.c b/src/video/vid_sigma.c index 9f71773ad..4759bb7af 100644 --- a/src/video/vid_sigma.c +++ b/src/video/vid_sigma.c @@ -8,8 +8,6 @@ * * Sigma Color 400 emulation. * - * - * * Authors: John Elliott, * * Copyright 2018 John Elliott. diff --git a/src/video/vid_svga.c b/src/video/vid_svga.c index cbbf98ab4..03f829e74 100644 --- a/src/video/vid_svga.c +++ b/src/video/vid_svga.c @@ -11,8 +11,6 @@ * This is intended to be used by another SVGA driver, * and not as a card in its own right. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_svga_render.c b/src/video/vid_svga_render.c index 92228243f..25b3cd946 100644 --- a/src/video/vid_svga_render.c +++ b/src/video/vid_svga_render.c @@ -8,8 +8,6 @@ * * SVGA renderers. * - * - * * Authors: Sarah Walker, * Miran Grca, * @@ -157,7 +155,7 @@ svga_render_text_40(svga_t *svga) svga->lastline_draw = svga->displine; if (svga->fullchange) { - p = &svga->monitor->target_buffer->line[svga->displine + svga->y_add][svga->x_add]; + p = &svga->monitor->target_buffer->line[(svga->displine + svga->y_add) & 2047][(svga->x_add) & 2047]; xinc = (svga->seqregs[1] & 1) ? 16 : 18; for (int x = 0; x < (svga->hdisp + svga->scrollcache); x += xinc) { @@ -240,7 +238,7 @@ svga_render_text_80(svga_t *svga) svga->lastline_draw = svga->displine; if (svga->fullchange) { - p = &svga->monitor->target_buffer->line[svga->displine + svga->y_add][svga->x_add]; + p = &svga->monitor->target_buffer->line[(svga->displine + svga->y_add) & 2047][(svga->x_add) & 2047]; xinc = (svga->seqregs[1] & 1) ? 8 : 9; static uint32_t col = 0x00000000; diff --git a/src/video/vid_table.c b/src/video/vid_table.c index 20a8f311d..4e76e150d 100644 --- a/src/video/vid_table.c +++ b/src/video/vid_table.c @@ -8,8 +8,6 @@ * * Define all known video cards. * - * - * * Authors: Miran Grca, * Fred N. van Kempen, * diff --git a/src/video/vid_tandy.c b/src/video/vid_tandy.c index d680aba17..09fec5052 100644 --- a/src/video/vid_tandy.c +++ b/src/video/vid_tandy.c @@ -8,8 +8,6 @@ * * Tandy 1000 video emulation * - * - * * Authors: Sarah Walker, * Miran Grca, * Connor Hyde / starfrost, diff --git a/src/video/vid_tgui9440.c b/src/video/vid_tgui9440.c index 6a0e1ca5e..2fd4ba482 100644 --- a/src/video/vid_tgui9440.c +++ b/src/video/vid_tgui9440.c @@ -47,8 +47,6 @@ * access size or host data has any affect, but the Windows 3.1 * driver always reads bytes and write words of 0xffff. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_ti_cf62011.c b/src/video/vid_ti_cf62011.c index fcc046cb4..afea65374 100644 --- a/src/video/vid_ti_cf62011.c +++ b/src/video/vid_ti_cf62011.c @@ -42,8 +42,6 @@ * which are the same as the XGA. It supports up to 1MB of VRAM, * but we lock it down to 512K. The PS/1 2122 had 256K. * - * - * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, diff --git a/src/video/vid_tvga.c b/src/video/vid_tvga.c index 51ab132ca..0a436178b 100644 --- a/src/video/vid_tvga.c +++ b/src/video/vid_tvga.c @@ -8,8 +8,6 @@ * * Trident TVGA (8900D) emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_vga.c b/src/video/vid_vga.c index 4cde5ba01..1d3db4645 100644 --- a/src/video/vid_vga.c +++ b/src/video/vid_vga.c @@ -8,8 +8,6 @@ * * IBM VGA emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_voodoo.c b/src/video/vid_voodoo.c index 57ddbf64d..fe02b7811 100644 --- a/src/video/vid_voodoo.c +++ b/src/video/vid_voodoo.c @@ -8,8 +8,6 @@ * * Voodoo Graphics, 2, Banshee, 3 emulation. * - * - * * Authors: Sarah Walker, * leilei * diff --git a/src/video/vid_voodoo_banshee.c b/src/video/vid_voodoo_banshee.c index 7bd94a34a..abccff860 100644 --- a/src/video/vid_voodoo_banshee.c +++ b/src/video/vid_voodoo_banshee.c @@ -8,8 +8,6 @@ * * Voodoo Banshee and 3 specific emulation. * - * - * * Authors: Sarah Walker, * * Copyright 2008-2020 Sarah Walker. diff --git a/src/video/vid_voodoo_banshee_blitter.c b/src/video/vid_voodoo_banshee_blitter.c index ad92d580f..ac8cb172d 100644 --- a/src/video/vid_voodoo_banshee_blitter.c +++ b/src/video/vid_voodoo_banshee_blitter.c @@ -1,3 +1,17 @@ +/* + * 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. + * + * 3DFX Voodoo emulation. + * + * Authors: Sarah Walker, + * + * Copyright 2008-2020 Sarah Walker. + */ /*Current issues : - missing YUV blits (YUV -> 32-bit, 24-bit, or 16-bit RGB now done) - missing wait for vsync diff --git a/src/video/vid_voodoo_blitter.c b/src/video/vid_voodoo_blitter.c index 6ea2edcc3..0d2c9e103 100644 --- a/src/video/vid_voodoo_blitter.c +++ b/src/video/vid_voodoo_blitter.c @@ -8,8 +8,6 @@ * * 3DFX Voodoo emulation. * - * - * * Authors: Sarah Walker, * * Copyright 2008-2020 Sarah Walker. diff --git a/src/video/vid_voodoo_display.c b/src/video/vid_voodoo_display.c index d04376941..3595d8b89 100644 --- a/src/video/vid_voodoo_display.c +++ b/src/video/vid_voodoo_display.c @@ -8,8 +8,6 @@ * * 3DFX Voodoo emulation. * - * - * * Authors: Sarah Walker, * * Copyright 2008-2020 Sarah Walker. diff --git a/src/video/vid_voodoo_fb.c b/src/video/vid_voodoo_fb.c index ddf68360f..cb5a614d4 100644 --- a/src/video/vid_voodoo_fb.c +++ b/src/video/vid_voodoo_fb.c @@ -8,8 +8,6 @@ * * 3DFX Voodoo emulation. * - * - * * Authors: Sarah Walker, * * Copyright 2008-2020 Sarah Walker. diff --git a/src/video/vid_voodoo_fifo.c b/src/video/vid_voodoo_fifo.c index 83be0f7bb..612ca4c18 100644 --- a/src/video/vid_voodoo_fifo.c +++ b/src/video/vid_voodoo_fifo.c @@ -8,8 +8,6 @@ * * 3DFX Voodoo emulation. * - * - * * Authors: Sarah Walker, * * Copyright 2008-2020 Sarah Walker. diff --git a/src/video/vid_voodoo_reg.c b/src/video/vid_voodoo_reg.c index 82dfde354..38ac42845 100644 --- a/src/video/vid_voodoo_reg.c +++ b/src/video/vid_voodoo_reg.c @@ -8,8 +8,6 @@ * * 3DFX Voodoo emulation. * - * - * * Authors: Sarah Walker, * * Copyright 2008-2020 Sarah Walker. diff --git a/src/video/vid_voodoo_render.c b/src/video/vid_voodoo_render.c index 6bd80ec08..9c1204bd3 100644 --- a/src/video/vid_voodoo_render.c +++ b/src/video/vid_voodoo_render.c @@ -8,8 +8,6 @@ * * 3DFX Voodoo emulation. * - * - * * Authors: Sarah Walker, * * Copyright 2008-2020 Sarah Walker. diff --git a/src/video/vid_voodoo_setup.c b/src/video/vid_voodoo_setup.c index 11f4ff861..d148876eb 100644 --- a/src/video/vid_voodoo_setup.c +++ b/src/video/vid_voodoo_setup.c @@ -8,8 +8,6 @@ * * 3DFX Voodoo emulation. * - * - * * Authors: Sarah Walker, * * Copyright 2008-2020 Sarah Walker. diff --git a/src/video/vid_voodoo_texture.c b/src/video/vid_voodoo_texture.c index f6894ec0f..7651866fd 100644 --- a/src/video/vid_voodoo_texture.c +++ b/src/video/vid_voodoo_texture.c @@ -8,8 +8,6 @@ * * 3DFX Voodoo emulation. * - * - * * Authors: Sarah Walker, * * Copyright 2008-2020 Sarah Walker. diff --git a/src/video/vid_wy700.c b/src/video/vid_wy700.c index c00541113..bd9ba9386 100644 --- a/src/video/vid_wy700.c +++ b/src/video/vid_wy700.c @@ -8,8 +8,6 @@ * * Wyse-700 emulation. * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/video/vid_xga.c b/src/video/vid_xga.c index 8de29a2e6..0a9822006 100644 --- a/src/video/vid_xga.c +++ b/src/video/vid_xga.c @@ -8,8 +8,6 @@ * * IBM XGA emulation. * - * - * * Authors: TheCollector1995. * * Copyright 2022 TheCollector1995. @@ -2718,15 +2716,15 @@ xga_hwcursor_draw(svga_t *svga, int displine) if (x >= idx) { switch (comb) { case 0x00: - /* Cursor Color 1 */ + /* Cursor Color 1 */ p[x_pos] = xga->hwc_color0; break; case 0x01: - /* Cursor Color 2 */ + /* Cursor Color 2 */ p[x_pos] = xga->hwc_color1; break; case 0x03: - /* Complement */ + /* Complement */ p[x_pos] ^= 0xffffff; break; diff --git a/src/video/video.c b/src/video/video.c index e2f2801d3..859794142 100644 --- a/src/video/video.c +++ b/src/video/video.c @@ -40,8 +40,6 @@ * W = 3 bus clocks * L = 4 bus clocks * - * - * * Authors: Sarah Walker, * Miran Grca, * diff --git a/src/vnc.c b/src/vnc.c index cd9911b02..d440aa21b 100644 --- a/src/vnc.c +++ b/src/vnc.c @@ -8,8 +8,6 @@ * * Implement the VNC remote renderer with LibVNCServer. * - * - * * Authors: Fred N. van Kempen, * Based on raw code by RichardG, * diff --git a/src/vnc_keymap.c b/src/vnc_keymap.c index 599ba1d9b..b801546c2 100644 --- a/src/vnc_keymap.c +++ b/src/vnc_keymap.c @@ -22,8 +22,6 @@ * NOTE: The values are as defined in the Microsoft document named * "Keyboard Scan Code Specification", version 1.3a of 2000/03/16. * - * - * * Authors: Fred N. van Kempen, * Based on raw code by RichardG, *