mirror of
https://github.com/86Box/86Box.git
synced 2026-02-23 01:48:21 -07:00
Merge branch 'master' of https://github.com/86Box/86Box
This commit is contained in:
87
.ci/build.sh
87
.ci/build.sh
@@ -48,6 +48,13 @@
|
||||
# architecture when invoking build.sh (either standalone or as part of an universal build)
|
||||
# - port and sed are called through sudo to manage dependencies; make sure those are configured
|
||||
# as NOPASSWD in /etc/sudoers if you're doing unattended builds
|
||||
# - Binaries are ad-hoc signed by default; specify a keychain name in ~/86box-keychain-name.txt
|
||||
# and password in ~/86box-keychain-password.txt to sign binaries with the first developer
|
||||
# certificate found inside that keychain.
|
||||
# - Notarization uses credentials stored in the same keychain used for signing. To save these
|
||||
# credentials, you must find the keychain's file path, run notarytool store-credentials with
|
||||
# --keychain pointed at that path, and specify the profile name you passed to notarytool in
|
||||
# ~/86box-keychain-notarytool.txt
|
||||
#
|
||||
|
||||
# Define common functions.
|
||||
@@ -126,6 +133,70 @@ save_buildtag() {
|
||||
return $?
|
||||
}
|
||||
|
||||
mac_keychain() {
|
||||
keychain_name=$(cat ~/86box-keychain-name.txt)
|
||||
if [ -n "$keychain_name" ]
|
||||
then
|
||||
echo $keychain_name
|
||||
security list-keychains -d user -s $(security list-keychains -d user | grep -Fv "/$keychain_name" | sed -e s/\ \*\"//g) "$keychain_name"
|
||||
security unlock-keychain -p "$(cat ~/86box-keychain-password.txt)" "$keychain_name"
|
||||
return $?
|
||||
fi
|
||||
}
|
||||
mac_signidentity() {
|
||||
if keychain_name=$(mac_keychain)
|
||||
then
|
||||
if [ -n "$keychain_name" ]
|
||||
then
|
||||
cert_name=$(security find-identity -v -p codesigning "$keychain_name" | perl -nle 'print for /([0-9A-F]+) "Developer ID Application: /')
|
||||
if [ -n "$cert_name" ]
|
||||
then
|
||||
echo [-] Using signing certificate [$cert_name] in keychain [$keychain_name] >&2
|
||||
echo "--keychain $keychain_name -s $cert_name"
|
||||
return 0
|
||||
else
|
||||
err="Keychain [$keychain_name] has no developer certificate"
|
||||
fi
|
||||
else
|
||||
err="No keychain specified"
|
||||
fi
|
||||
else
|
||||
err="Keychain [$keychain_name] failed to unlock"
|
||||
fi
|
||||
echo [!] $err, falling back to ad-hoc signing >&2
|
||||
echo "-s -"
|
||||
}
|
||||
mac_notarize() {
|
||||
if keychain_name=$(mac_keychain)
|
||||
then
|
||||
if [ -n "$keychain_name" ]
|
||||
then
|
||||
keychain_profile=$(cat ~/86box-keychain-notarytool.txt)
|
||||
if [ -n "$keychain_profile" ]
|
||||
then
|
||||
keychain_path=$(security list-keychains -d user | grep -F "/$keychain_name" | sed -e s/\ \*\"//g)
|
||||
if [ -n "$keychain_path" ]
|
||||
then
|
||||
echo [-] Notarizing with profile [$keychain_profile] in keychain [$keychain_name]
|
||||
# FIXME: needs a stapling system
|
||||
xcrun notarytool submit "$1" --keychain-profile "$keychain_profile" --keychain "$keychain_path" --no-wait
|
||||
return $?
|
||||
else
|
||||
err="File path for keychain [$keychain_name] not found"
|
||||
fi
|
||||
else
|
||||
err="No keychain profile specified"
|
||||
fi
|
||||
else
|
||||
err="No keychain specified"
|
||||
fi
|
||||
else
|
||||
err="Keychain [$keychain_name] failed to unlock"
|
||||
fi
|
||||
echo [!] $err, skipping notarization
|
||||
return 1
|
||||
}
|
||||
|
||||
# Set common variables.
|
||||
project=86Box
|
||||
cwd=$(pwd)
|
||||
@@ -472,12 +543,13 @@ then
|
||||
mv "archive_tmp_universal/$merge_src.app" "$app_bundle_name"
|
||||
|
||||
# Sign final app bundle.
|
||||
arch -"$(uname -m)" codesign --force --deep -s - "$app_bundle_name"
|
||||
arch -"$(uname -m)" codesign --force --deep $(mac_signidentity) -o runtime --entitlements src/mac/entitlements.plist --timestamp "$app_bundle_name"
|
||||
|
||||
# Create zip.
|
||||
echo [-] Creating artifact archive
|
||||
cd archive_tmp
|
||||
zip --symlinks -r "$cwd/$package_name.zip" .
|
||||
zip_name="$cwd/$package_name.zip"
|
||||
zip --symlinks -r "$zip_name" .
|
||||
status=$?
|
||||
|
||||
# Check if the archival succeeded.
|
||||
@@ -487,6 +559,9 @@ then
|
||||
exit 7
|
||||
fi
|
||||
|
||||
# Notarize the compressed app bundle.
|
||||
mac_notarize "$zip_name"
|
||||
|
||||
# All good.
|
||||
echo [-] Universal build of [$package_name] for [$arch] with flags [$cmake_flags] successful
|
||||
exit 0
|
||||
@@ -905,7 +980,7 @@ then
|
||||
fi
|
||||
|
||||
# Sign app bundle, unless we're in an universal build.
|
||||
[ $skip_archive -eq 0 ] && codesign --force --deep -s - "archive_tmp/"*".app"
|
||||
[ $skip_archive -eq 0 ] && codesign --force --deep $(mac_signidentity) -o runtime --entitlements src/mac/entitlements.plist --timestamp "archive_tmp/"*".app"
|
||||
elif [ "$BUILD_TAG" = "precondition" ]
|
||||
then
|
||||
# Continue with no app bundle on a dry build.
|
||||
@@ -1104,7 +1179,8 @@ elif is_mac
|
||||
then
|
||||
# Create zip.
|
||||
cd archive_tmp
|
||||
zip --symlinks -r "$cwd/$package_name.zip" .
|
||||
zip_name="$cwd/$package_name.zip"
|
||||
zip --symlinks -r "$zip_name" .
|
||||
status=$?
|
||||
else
|
||||
# Determine AppImage runtime architecture.
|
||||
@@ -1180,6 +1256,9 @@ then
|
||||
exit 7
|
||||
fi
|
||||
|
||||
# Notarize the compressed app bundle if we're on macOS.
|
||||
is_mac && mac_notarize "$zip_name"
|
||||
|
||||
# All good.
|
||||
echo [-] Build of [$package_name] for [$arch] with flags [$cmake_flags] successful
|
||||
exit 0
|
||||
|
||||
2
.github/workflows/cmake_linux.yml
vendored
2
.github/workflows/cmake_linux.yml
vendored
@@ -3,6 +3,7 @@ name: CMake (Linux)
|
||||
on:
|
||||
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
paths:
|
||||
- src/**
|
||||
- cmake/**
|
||||
@@ -14,6 +15,7 @@ on:
|
||||
- "!**/Makefile*"
|
||||
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
paths:
|
||||
- src/**
|
||||
- cmake/**
|
||||
|
||||
2
.github/workflows/cmake_macos.yml
vendored
2
.github/workflows/cmake_macos.yml
vendored
@@ -3,6 +3,7 @@ name: CMake (macos)
|
||||
on:
|
||||
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
paths:
|
||||
- src/**
|
||||
- cmake/**
|
||||
@@ -14,6 +15,7 @@ on:
|
||||
- "!**/Makefile*"
|
||||
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
paths:
|
||||
- src/**
|
||||
- cmake/**
|
||||
|
||||
2
.github/workflows/cmake_windows_msys2.yml
vendored
2
.github/workflows/cmake_windows_msys2.yml
vendored
@@ -3,6 +3,7 @@ name: CMake (Windows, msys2)
|
||||
on:
|
||||
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
paths:
|
||||
- src/**
|
||||
- cmake/**
|
||||
@@ -14,6 +15,7 @@ on:
|
||||
- "!**/Makefile*"
|
||||
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
paths:
|
||||
- src/**
|
||||
- cmake/**
|
||||
|
||||
@@ -36,7 +36,7 @@ if(MUNT_EXTERNAL)
|
||||
endif()
|
||||
|
||||
project(86Box
|
||||
VERSION 5.0
|
||||
VERSION 5.0.1
|
||||
DESCRIPTION "Emulator of x86-based systems"
|
||||
HOMEPAGE_URL "https://86box.net"
|
||||
LANGUAGES C CXX)
|
||||
|
||||
4
debian/changelog
vendored
4
debian/changelog
vendored
@@ -1,5 +1,5 @@
|
||||
86box (5.0) UNRELEASED; urgency=medium
|
||||
86box (5.0.1) UNRELEASED; urgency=medium
|
||||
|
||||
* Bump release.
|
||||
|
||||
-- Jasmine Iwanek <jriwanek@gmail.com> Wed, 16 Apr 2025 22:08:04 +0200
|
||||
-- Jasmine Iwanek <jriwanek@gmail.com> Sun, 24 Aug 2025 15:20:01 +0200
|
||||
|
||||
215
src/86box.c
215
src/86box.c
@@ -211,12 +211,16 @@ int video_fullscreen_scale_maximized = 0; /* (C) Whether
|
||||
also apply when maximized. */
|
||||
int do_auto_pause = 0; /* (C) Auto-pause the emulator on focus
|
||||
loss */
|
||||
int force_constant_mouse = 0; /* (C) Force constant updating of the mouse */
|
||||
int hook_enabled = 1; /* (C) Keyboard hook is enabled */
|
||||
int test_mode = 0; /* (C) Test mode */
|
||||
char uuid[MAX_UUID_LEN] = { '\0' }; /* (C) UUID or machine identifier */
|
||||
int sound_muted = 0; /* (C) Is sound muted? */
|
||||
int jumpered_internal_ecp_dma = 0; /* (C) Jumpered internal EPC DMA */
|
||||
int inhibit_multimedia_keys; /* (G) Inhibit multimedia keys on Windows. */
|
||||
int force_10ms; /* (C) Force 10ms CPU frame intervals. */
|
||||
int vmm_disabled = 0; /* (G) disable built-in manager */
|
||||
char vmm_path_cfg[1024] = { '\0' }; /* (G) VMs path (unless -E is used)*/
|
||||
|
||||
int other_ide_present = 0; /* IDE controllers from non-IDE cards are
|
||||
present */
|
||||
@@ -224,39 +228,58 @@ int other_scsi_present = 0; /* SCSI contro
|
||||
present */
|
||||
|
||||
int is_pcjr = 0; /* The current machine is PCjr. */
|
||||
int portable_mode = 0; /* We are running in portable mode
|
||||
(global dirs = exe path) */
|
||||
|
||||
// Accelerator key array
|
||||
struct accelKey acc_keys[NUM_ACCELS];
|
||||
|
||||
// Default accelerator key values
|
||||
struct accelKey def_acc_keys[NUM_ACCELS] = {
|
||||
{ .name="send_ctrl_alt_del", .desc="Send Control+Alt+Del",
|
||||
.seq="Ctrl+F12" },
|
||||
|
||||
{ .name="send_ctrl_alt_esc", .desc="Send Control+Alt+Escape",
|
||||
.seq="Ctrl+F10" },
|
||||
|
||||
{ .name="fullscreen", .desc="Toggle fullscreen",
|
||||
.seq="Ctrl+Alt+PgUp" },
|
||||
|
||||
{ .name="screenshot", .desc="Screenshot",
|
||||
.seq="Ctrl+F11" },
|
||||
|
||||
{ .name="release_mouse", .desc="Release mouse pointer",
|
||||
.seq="Ctrl+End" },
|
||||
|
||||
{ .name="hard_reset", .desc="Hard reset",
|
||||
.seq="Ctrl+Alt+F12" },
|
||||
|
||||
{ .name="pause", .desc="Toggle pause",
|
||||
.seq="Ctrl+Alt+F1" },
|
||||
|
||||
{ .name="mute", .desc="Toggle mute",
|
||||
.seq="Ctrl+Alt+M" }
|
||||
{
|
||||
.name="send_ctrl_alt_del",
|
||||
.desc="Send Control+Alt+Del",
|
||||
.seq="Ctrl+F12"
|
||||
},
|
||||
{
|
||||
.name="send_ctrl_alt_esc",
|
||||
.desc="Send Control+Alt+Escape",
|
||||
.seq="Ctrl+F10"
|
||||
},
|
||||
{
|
||||
.name="fullscreen",
|
||||
.desc="Toggle fullscreen",
|
||||
.seq="Ctrl+Alt+PgUp"
|
||||
},
|
||||
{
|
||||
.name="screenshot",
|
||||
.desc="Screenshot",
|
||||
.seq="Ctrl+F11"
|
||||
},
|
||||
{
|
||||
.name="release_mouse",
|
||||
.desc="Release mouse pointer",
|
||||
.seq="Ctrl+End"
|
||||
},
|
||||
{
|
||||
.name="hard_reset",
|
||||
.desc="Hard reset",
|
||||
.seq="Ctrl+Alt+F12"
|
||||
},
|
||||
{
|
||||
.name="pause",
|
||||
.desc="Toggle pause",
|
||||
.seq="Ctrl+Alt+F1"
|
||||
},
|
||||
{
|
||||
.name="mute",
|
||||
.desc="Toggle mute",
|
||||
.seq="Ctrl+Alt+M"
|
||||
}
|
||||
};
|
||||
|
||||
char vmm_path[1024] = { '\0'}; /* TEMPORARY - VM manager path to scan for VMs */
|
||||
int vmm_enabled = 0;
|
||||
char vmm_path[1024] = { '\0' }; /* VM manager path to scan for VMs */
|
||||
int start_vmm = 1;
|
||||
|
||||
/* Statistics. */
|
||||
extern int mmuflush;
|
||||
@@ -629,7 +652,7 @@ pc_show_usage(char *s)
|
||||
#ifdef _WIN32
|
||||
"-D or --debug\t\t\t- force debug output logging\n"
|
||||
#endif
|
||||
#if 1
|
||||
#ifndef USE_SDL_UI
|
||||
"-E or --vmmpath\t\t- vm manager path\n"
|
||||
#endif
|
||||
"-F or --fullscreen\t\t- start in fullscreen mode\n"
|
||||
@@ -705,9 +728,6 @@ pc_init(int argc, char *argv[])
|
||||
time_t now;
|
||||
int c;
|
||||
int lvmp = 0;
|
||||
#ifdef DEPRECATE_USAGE
|
||||
int deprecated = 1;
|
||||
#endif
|
||||
#ifdef ENABLE_NG
|
||||
int ng = 0;
|
||||
#endif
|
||||
@@ -728,10 +748,6 @@ pc_init(int argc, char *argv[])
|
||||
p = path_get_filename(exe_path);
|
||||
*p = '\0';
|
||||
}
|
||||
if (!strncmp(exe_path, "/private/var/folders/", 21)) {
|
||||
ui_msgbox_header(MBX_FATAL, L"App Translocation", EMU_NAME_W L" cannot determine the emulated machine's location due to a macOS security feature. Please move the " EMU_NAME_W L" app to another folder (not /Applications), or make a copy of it and open that copy instead.");
|
||||
return 0;
|
||||
}
|
||||
#elif !defined(_WIN32)
|
||||
/* Grab the actual path if we are an AppImage. */
|
||||
p = getenv("APPIMAGE");
|
||||
@@ -739,8 +755,23 @@ pc_init(int argc, char *argv[])
|
||||
path_get_dirname(exe_path, p);
|
||||
#endif
|
||||
|
||||
path_normalize(exe_path);
|
||||
path_slash(exe_path);
|
||||
|
||||
/*
|
||||
* Determine if we are running in portable mode.
|
||||
*
|
||||
* We enable portable mode if the EXE path
|
||||
* contains the global config file.
|
||||
*/
|
||||
path_append_filename(temp, exe_path, GLOBAL_CONFIG_FILE);
|
||||
|
||||
FILE *fp = fopen(temp, "r");
|
||||
if (fp) {
|
||||
portable_mode = 1;
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the current working directory.
|
||||
*
|
||||
@@ -773,7 +804,7 @@ usage:
|
||||
} else if (!strcasecmp(argv[c], "--debug") || !strcasecmp(argv[c], "-D")) {
|
||||
force_debug = 1;
|
||||
#endif
|
||||
//#ifdef ENABLE_NG
|
||||
#ifndef USE_SDL_UI
|
||||
} else if (!strcasecmp(argv[c], "--vmmpath") ||
|
||||
!strcasecmp(argv[c], "-E")) {
|
||||
/* Using this variable for vm manager path
|
||||
@@ -784,7 +815,7 @@ usage:
|
||||
memcpy(vmm_path, vp, sizeof(vmm_path));
|
||||
else
|
||||
memcpy(vmm_path, vp, strlen(vp) + 1);
|
||||
//#endif
|
||||
#endif
|
||||
} else if (!strcasecmp(argv[c], "--fullscreen") || !strcasecmp(argv[c], "-F")) {
|
||||
start_in_fullscreen = 1;
|
||||
} else if (!strcasecmp(argv[c], "--logfile") || !strcasecmp(argv[c], "-L")) {
|
||||
@@ -797,9 +828,7 @@ usage:
|
||||
goto usage;
|
||||
|
||||
ppath = argv[++c];
|
||||
#ifdef DEPRECATE_USAGE
|
||||
deprecated = 0;
|
||||
#endif
|
||||
start_vmm = 0;
|
||||
} else if (!strcasecmp(argv[c], "--rompath") || !strcasecmp(argv[c], "-R")) {
|
||||
if ((c + 1) == argc)
|
||||
goto usage;
|
||||
@@ -811,9 +840,7 @@ usage:
|
||||
goto usage;
|
||||
|
||||
cfg = argv[++c];
|
||||
#ifdef DEPRECATE_USAGE
|
||||
deprecated = 0;
|
||||
#endif
|
||||
start_vmm = 0;
|
||||
} else if (!strcasecmp(argv[c], "--global") || !strcasecmp(argv[c], "-O")) {
|
||||
if ((c + 1) == argc || plat_dir_check(argv[c + 1]))
|
||||
goto usage;
|
||||
@@ -922,21 +949,12 @@ usage:
|
||||
else
|
||||
cfg = argv[c++];
|
||||
|
||||
#ifdef DEPRECATE_USAGE
|
||||
deprecated = 0;
|
||||
#endif
|
||||
start_vmm = 0;
|
||||
}
|
||||
|
||||
if (c != argc)
|
||||
goto usage;
|
||||
|
||||
#ifdef DEPRECATE_USAGE
|
||||
if (deprecated)
|
||||
pc_show_usage("Running 86Box without a specified VM path and/or configuration\n"
|
||||
"file has been deprected. Please specify one or use a manager\n"
|
||||
"(Avalonia 86 is recommended).\n\n");
|
||||
#endif
|
||||
|
||||
path_slash(usr_path);
|
||||
path_slash(rom_path);
|
||||
|
||||
@@ -1053,7 +1071,7 @@ usage:
|
||||
/* Build the global configuration file path. */
|
||||
if (global == NULL) {
|
||||
plat_get_global_config_dir(global_cfg_path, sizeof(global_cfg_path));
|
||||
path_append_filename(global_cfg_path, global_cfg_path, CONFIG_FILE);
|
||||
path_append_filename(global_cfg_path, global_cfg_path, GLOBAL_CONFIG_FILE);
|
||||
} else {
|
||||
strncpy(global_cfg_path, global, sizeof(global_cfg_path) - 1);
|
||||
}
|
||||
@@ -1081,6 +1099,8 @@ usage:
|
||||
#ifdef _WIN32
|
||||
if (localtime_s(&time_buf, &now) == 0)
|
||||
info = &time_buf;
|
||||
else
|
||||
info = NULL;
|
||||
#else
|
||||
info = localtime_r(&now, &time_buf);
|
||||
#endif
|
||||
@@ -1092,21 +1112,54 @@ usage:
|
||||
|
||||
pclog("#\n# %ls v%ls logfile, created %s\n#\n",
|
||||
EMU_NAME_W, EMU_VERSION_FULL_W, temp);
|
||||
pclog("# VM: %s\n#\n", vm_name);
|
||||
|
||||
if (portable_mode) {
|
||||
pclog("# Portable mode enabled.\n");
|
||||
}
|
||||
|
||||
pclog("# Emulator path: %s\n", exe_path);
|
||||
pclog("# Userfiles path: %s\n", usr_path);
|
||||
for (rom_path_t *rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) {
|
||||
pclog("# ROM path: %s\n", rom_path->path);
|
||||
}
|
||||
|
||||
pclog("# Global configuration file: %s\n", global_cfg_path);
|
||||
pclog("# Configuration file: %s\n#\n\n", cfg_path);
|
||||
if (strlen(vmm_path) != 0) {
|
||||
vmm_enabled = 1;
|
||||
pclog("# VM Manager enabled. Path: %s\n", vmm_path);
|
||||
|
||||
/* Load the global configuration file. */
|
||||
config_load_global();
|
||||
config_save_global(); // hack
|
||||
|
||||
/* Determine whether to start the VM manager. */
|
||||
#ifndef USE_SDL_UI
|
||||
if (vmm_disabled && start_vmm)
|
||||
#endif
|
||||
{
|
||||
start_vmm = 0;
|
||||
#ifdef __APPLE__
|
||||
if (!strncmp(exe_path, "/private/var/folders/", 21)) {
|
||||
ui_msgbox_header(MBX_FATAL, L"App Translocation", EMU_NAME_W L" cannot determine the emulated machine's location due to a macOS security feature. Please move the " EMU_NAME_W L" app to another folder (not /Applications), or make a copy of it and open that copy instead.");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!vmm_enabled) {
|
||||
#ifndef USE_SDL_UI
|
||||
if (strlen(vmm_path) != 0) {
|
||||
/* -E specified on the command line. */
|
||||
start_vmm = 1;
|
||||
} else {
|
||||
strncpy(vmm_path, vmm_path_cfg, sizeof(vmm_path) - 1);
|
||||
}
|
||||
|
||||
if (start_vmm) {
|
||||
pclog("# VM Manager enabled. Path: %s\n", vmm_path);
|
||||
strncpy(usr_path, vmm_path, sizeof(usr_path) - 1);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
pclog("# VM: %s\n#\n", vm_name);
|
||||
pclog("# Configuration file: %s\n#\n\n", cfg_path);
|
||||
pclog("# Userfiles path: %s\n", usr_path);
|
||||
|
||||
for (rom_path_t *rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) {
|
||||
pclog("# ROM path: %s\n", rom_path->path);
|
||||
}
|
||||
|
||||
/*
|
||||
* We are about to read the configuration file, which MAY
|
||||
* put data into global variables (the hard- and floppy
|
||||
@@ -1183,11 +1236,10 @@ pc_full_speed(void)
|
||||
|
||||
/* Initialize modules, ran once, after pc_init. */
|
||||
int
|
||||
pc_init_modules(void)
|
||||
pc_init_roms(void)
|
||||
{
|
||||
int c;
|
||||
int m;
|
||||
wchar_t temp[512];
|
||||
char tempc[512];
|
||||
|
||||
if (dump_missing) {
|
||||
@@ -1226,6 +1278,16 @@ pc_init_modules(void)
|
||||
}
|
||||
pc_log("A total of %d ROM sets have been loaded.\n", c);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
pc_init_modules(void)
|
||||
{
|
||||
int c;
|
||||
wchar_t temp[512];
|
||||
char tempc[512];
|
||||
|
||||
/* Load the ROMs for the selected machine. */
|
||||
if (!machine_available(machine)) {
|
||||
swprintf(temp, sizeof_w(temp), plat_get_string(STRING_HW_NOT_AVAILABLE_MACHINE), machine_getname());
|
||||
@@ -1573,8 +1635,9 @@ pc_reset_hard_init(void)
|
||||
the chances of the SCSI controller ending up on the bridge. */
|
||||
video_voodoo_init();
|
||||
|
||||
if (joystick_type)
|
||||
gameport_update_joystick_type(); /* installs game port if no device provides one, must be late */
|
||||
/* installs first game port if no device provides one, must be late */
|
||||
if (joystick_type[0])
|
||||
gameport_update_joystick_type(0);
|
||||
|
||||
ui_sb_update_panes();
|
||||
|
||||
@@ -1782,7 +1845,7 @@ pc_run(void)
|
||||
#ifdef USE_GDBSTUB /* avoid a KBC FIFO overflow when CPU emulation is stalled */
|
||||
}
|
||||
#endif
|
||||
joystick_process();
|
||||
joystick_process(0); // Gameport 0
|
||||
endblit();
|
||||
|
||||
/* Done with this frame, update statistics. */
|
||||
@@ -1987,13 +2050,11 @@ do_pause(int p)
|
||||
|
||||
// Helper to find an accelerator key and return it's index in acc_keys
|
||||
int FindAccelerator(const char *name) {
|
||||
for(int x=0;x<NUM_ACCELS;x++)
|
||||
{
|
||||
if(strcmp(acc_keys[x].name, name) == 0)
|
||||
{
|
||||
return(x);
|
||||
}
|
||||
}
|
||||
// No key was found
|
||||
return -1;
|
||||
for (int x = 0; x < NUM_ACCELS; x++) {
|
||||
if(strcmp(acc_keys[x].name, name) == 0)
|
||||
return(x);
|
||||
}
|
||||
|
||||
// No key was found
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,9 @@ add_library(cdrom OBJECT
|
||||
cdrom_image_viso.c
|
||||
cdrom_mke.c
|
||||
)
|
||||
if(NOT WIN32)
|
||||
target_include_directories(86Box PRIVATE PkgConfig::SNDFILE)
|
||||
endif()
|
||||
target_link_libraries(86Box PkgConfig::SNDFILE)
|
||||
|
||||
if(CDROM_MITSUMI)
|
||||
|
||||
@@ -941,6 +941,13 @@ image_process(cd_image_t *img)
|
||||
}
|
||||
}
|
||||
|
||||
if ((ci->type == INDEX_NORMAL) && (((int64_t) ci->file_start) < 0LL)) {
|
||||
ci->type = INDEX_ZERO;
|
||||
ci->length = 150;
|
||||
ci->file_start = 0ULL;
|
||||
ci->file_length = 0ULL;
|
||||
}
|
||||
|
||||
if ((ci->type < INDEX_SPECIAL) || (ci->type > INDEX_NORMAL)) {
|
||||
image_log(img->log, " [TRACK ] %02X, INDEX %02X, ATTR %02X,\n",
|
||||
ci->type, j,
|
||||
@@ -1470,6 +1477,7 @@ image_load_cue(cd_image_t *img, const char *cuefile)
|
||||
uint8_t session = 1;
|
||||
int last_t = -1;
|
||||
int is_viso = 0;
|
||||
int lo_cmd = 0;
|
||||
int lead[3] = { 0 };
|
||||
int error;
|
||||
char pathname[MAX_FILENAME_LENGTH];
|
||||
@@ -1604,6 +1612,9 @@ image_load_cue(cd_image_t *img, const char *cuefile)
|
||||
last_t = t;
|
||||
ct = image_insert_track(img, session, t);
|
||||
|
||||
for (int i = 2; i >= 0; i--)
|
||||
ct->idx[i].type = INDEX_NONE;
|
||||
|
||||
ct->form = 0;
|
||||
ct->mode = 0;
|
||||
|
||||
@@ -1707,6 +1718,7 @@ image_load_cue(cd_image_t *img, const char *cuefile)
|
||||
if (space < (line + strlen(line))) {
|
||||
(void) image_cue_get_keyword(&command, &space);
|
||||
if (!strcmp(command, "LEAD-OUT")) {
|
||||
lo_cmd = 1;
|
||||
ct = &(img->tracks[lead[2]]);
|
||||
/*
|
||||
Mark it this way so file pointers on it are not
|
||||
@@ -1723,6 +1735,25 @@ image_load_cue(cd_image_t *img, const char *cuefile)
|
||||
image_log(img->log, " [LEAD-OUT] Initialization %s\n",
|
||||
success ? "successful" : "failed");
|
||||
} else if (!strcmp(command, "SESSION")) {
|
||||
if (!lo_cmd) {
|
||||
ct = &(img->tracks[lead[2]]);
|
||||
/*
|
||||
Mark it this way so file pointers on it are not
|
||||
going to be adjusted.
|
||||
*/
|
||||
last_t = -1;
|
||||
ct->sector_size = last;
|
||||
ci = &(ct->idx[1]);
|
||||
ci->type = INDEX_ZERO;
|
||||
ci->file = tf;
|
||||
ci->file_start = 0;
|
||||
ci->file_length = 0;
|
||||
ci->length = (2 * 60 * 75) + (30 * 75);
|
||||
|
||||
image_log(img->log, " [LEAD-OUT] Initialization successful\n");
|
||||
}
|
||||
|
||||
lo_cmd = 0;
|
||||
session = image_cue_get_number(&space);
|
||||
|
||||
if (session > 1) {
|
||||
@@ -2073,10 +2104,8 @@ image_load_mds(cd_image_t *img, const char *mdsfile)
|
||||
char fn[2048] = { 0 };
|
||||
fseek(fp, mds_footer.fn_offs, SEEK_SET);
|
||||
if (mds_footer.fn_is_wide) {
|
||||
int len = 0;
|
||||
for (int i = 0; i < 256; i++) {
|
||||
fread(&(wfn[i]), 1, 2, fp);
|
||||
len++;
|
||||
if (wfn[i] == 0x0000)
|
||||
break;
|
||||
}
|
||||
@@ -2414,10 +2443,10 @@ image_read_sector(const void *local, uint8_t *buffer,
|
||||
}
|
||||
}
|
||||
|
||||
if (idx->type >= INDEX_NORMAL) {
|
||||
if (idx->type >= INDEX_NORMAL)
|
||||
/* Read the data from the file. */
|
||||
ret = idx->file->read(idx->file, buffer, seek, trk->sector_size);
|
||||
} else
|
||||
else
|
||||
/* Index is not in the file, no read to fail here. */
|
||||
ret = 1;
|
||||
|
||||
|
||||
@@ -30,12 +30,15 @@ add_library(chipset OBJECT
|
||||
ali1621.c
|
||||
ali6117.c
|
||||
ali1409.c
|
||||
headland.c
|
||||
ims8848.c
|
||||
intel_82335.c
|
||||
compaq.c
|
||||
compaq_386.c
|
||||
contaq_82c59x.c
|
||||
cs4031.c
|
||||
grid1520.c
|
||||
gc100.c
|
||||
headland.c
|
||||
ims8848.c
|
||||
intel_82335.c
|
||||
intel_420ex.c
|
||||
intel_4x0.c
|
||||
intel_i450kx.c
|
||||
@@ -43,6 +46,7 @@ add_library(chipset OBJECT
|
||||
intel_piix.c
|
||||
isa486c.c
|
||||
../ioapic.c
|
||||
laserxt.c
|
||||
neat.c
|
||||
olivetti_eva.c
|
||||
opti283.c
|
||||
@@ -55,6 +59,8 @@ add_library(chipset OBJECT
|
||||
opti822.c
|
||||
opti895.c
|
||||
opti5x7.c
|
||||
philips.c
|
||||
sanyo.c
|
||||
scamp.c
|
||||
scat.c
|
||||
sis_85c310.c
|
||||
@@ -77,10 +83,9 @@ add_library(chipset OBJECT
|
||||
sis_5595_pmu.c
|
||||
sis_55xx.c
|
||||
sl82c461.c
|
||||
stpc.c
|
||||
via_vt82c49x.c
|
||||
via_vt82c505.c
|
||||
gc100.c
|
||||
stpc.c
|
||||
umc_8886.c
|
||||
umc_hb4.c
|
||||
umc_8890.c
|
||||
|
||||
@@ -28,9 +28,10 @@
|
||||
#include <86box/timer.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/device.h>
|
||||
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/nmi.h>
|
||||
#include <86box/pic.h>
|
||||
@@ -485,6 +486,9 @@ ali1489_init(UNUSED(const device_t *info))
|
||||
dev->port_92 = device_add(&port_92_pci_device);
|
||||
dev->smram = smram_add();
|
||||
|
||||
if (machine_get_kbc_device(machine) == NULL)
|
||||
device_add_params(&kbc_at_device, (void *) KBC_VEN_ALI);
|
||||
|
||||
ali1489_defaults(dev);
|
||||
|
||||
return dev;
|
||||
|
||||
135
src/chipset/compaq.c
Normal file
135
src/chipset/compaq.c
Normal file
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Emulation of the Compaq 386 memory controller.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2023 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include <math.h>
|
||||
#include <86box/86box.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/io.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_cga.h>
|
||||
#include <86box/vid_cga_comp.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/chipset.h>
|
||||
|
||||
/* Compaq Deskpro 386 remaps RAM from 0xA0000-0xFFFFF to 0xFA0000-0xFFFFFF */
|
||||
typedef struct cpq_t {
|
||||
mem_mapping_t ram_mapping;
|
||||
} cpq_t;
|
||||
|
||||
static uint8_t
|
||||
read_ram(uint32_t addr, UNUSED(void *priv))
|
||||
{
|
||||
addr = (addr & 0x7ffff) + 0x80000;
|
||||
addreadlookup(mem_logical_addr, addr);
|
||||
|
||||
return (ram[addr]);
|
||||
}
|
||||
|
||||
static uint16_t
|
||||
read_ramw(uint32_t addr, UNUSED(void *priv))
|
||||
{
|
||||
addr = (addr & 0x7ffff) + 0x80000;
|
||||
addreadlookup(mem_logical_addr, addr);
|
||||
|
||||
return (*(uint16_t *) &ram[addr]);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
read_raml(uint32_t addr, UNUSED(void *priv))
|
||||
{
|
||||
addr = (addr & 0x7ffff) + 0x80000;
|
||||
addreadlookup(mem_logical_addr, addr);
|
||||
|
||||
return (*(uint32_t *) &ram[addr]);
|
||||
}
|
||||
|
||||
static void
|
||||
write_ram(uint32_t addr, uint8_t val, UNUSED(void *priv))
|
||||
{
|
||||
addr = (addr & 0x7ffff) + 0x80000;
|
||||
addwritelookup(mem_logical_addr, addr);
|
||||
|
||||
mem_write_ramb_page(addr, val, &pages[addr >> 12]);
|
||||
}
|
||||
|
||||
static void
|
||||
write_ramw(uint32_t addr, uint16_t val, UNUSED(void *priv))
|
||||
{
|
||||
addr = (addr & 0x7ffff) + 0x80000;
|
||||
addwritelookup(mem_logical_addr, addr);
|
||||
|
||||
mem_write_ramw_page(addr, val, &pages[addr >> 12]);
|
||||
}
|
||||
|
||||
static void
|
||||
write_raml(uint32_t addr, uint32_t val, UNUSED(void *priv))
|
||||
{
|
||||
addr = (addr & 0x7ffff) + 0x80000;
|
||||
addwritelookup(mem_logical_addr, addr);
|
||||
|
||||
mem_write_raml_page(addr, val, &pages[addr >> 12]);
|
||||
}
|
||||
|
||||
static void
|
||||
compaq_close(void *priv)
|
||||
{
|
||||
cpq_t *dev = (cpq_t *) priv;
|
||||
|
||||
free(dev);
|
||||
}
|
||||
|
||||
static void *
|
||||
compaq_init(UNUSED(const device_t *info))
|
||||
{
|
||||
cpq_t *dev = (cpq_t *) calloc(1, sizeof(cpq_t));
|
||||
|
||||
mem_remap_top(384);
|
||||
mem_mapping_add(&dev->ram_mapping, 0xfa0000, 0x60000,
|
||||
read_ram, read_ramw, read_raml,
|
||||
write_ram, write_ramw, write_raml,
|
||||
0xa0000 + ram, MEM_MAPPING_INTERNAL, NULL);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
const device_t compaq_device = {
|
||||
.name = "Compaq Memory Control",
|
||||
.internal_name = "compaq",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = compaq_init,
|
||||
.close = compaq_close,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <86box/rom.h>
|
||||
#include <86box/vid_cga.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/chipset.h>
|
||||
|
||||
#define GRID_APPROM_SELECT 0x440
|
||||
#define GRID_APPROM_ENABLE 0x405
|
||||
@@ -317,7 +318,7 @@ static void grid_reset(void *priv) {
|
||||
dev->grid_rom_select = 0;
|
||||
}
|
||||
|
||||
const device_t grid_device = {
|
||||
const device_t grid1520_device = {
|
||||
.name = "GRiDcase 1520 chipset",
|
||||
.internal_name = "grid1520",
|
||||
.flags = 0,
|
||||
@@ -330,26 +331,3 @@ const device_t grid_device = {
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
int machine_at_grid1520_init(const machine_t *model) {
|
||||
int ret = 0;
|
||||
|
||||
ret = bios_load_linear("roms/machines/grid1520/grid1520_891025.rom",
|
||||
0x000f8000, 0x8000, 0);
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_ide_init(model);
|
||||
mem_remap_top(384);
|
||||
|
||||
device_add(&kbc_at_device);
|
||||
// for now just select CGA with amber monitor
|
||||
//device_add(&cga_device);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add(&grid_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -47,6 +47,7 @@
|
||||
#include <86box/hdc_ide.h>
|
||||
#include <86box/hdc_ide_sff8038i.h>
|
||||
#include <86box/usb.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/smbus.h>
|
||||
#include <86box/chipset.h>
|
||||
@@ -618,6 +619,13 @@ piix_write(int func, int addr, uint8_t val, void *priv)
|
||||
}
|
||||
break;
|
||||
case 0x76:
|
||||
if (dev->type > 1)
|
||||
fregs[addr] = val & 0x87;
|
||||
else if (dev->type <= 4)
|
||||
fregs[addr] = val & 0x8f;
|
||||
if ((dev->type == 1) && machine_has_jumpered_ecp_dma(machine, MACHINE_DMA_USE_MBDMA))
|
||||
lpt1_dma(((val & 0x08) || ((val & 0x07) == 0x04)) ? 0xff : (val & 0x07));
|
||||
break;
|
||||
case 0x77:
|
||||
if (dev->type > 1)
|
||||
fregs[addr] = val & 0x87;
|
||||
|
||||
@@ -1,4 +1,23 @@
|
||||
/*This is the chipset used in the LaserXT series model*/
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Implementation of the VTech LaserXT chipset.
|
||||
*
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Jasmine Iwanek, <jriwanek@gmail.com>
|
||||
*
|
||||
* Copyright 2008-2025 Sarah Walker.
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
* Copyright 2017-2025 Fred N. van Kempen.
|
||||
* Copyright 2025 Jasmine Iwanek.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
@@ -452,53 +471,3 @@ const device_t lxt3_device = {
|
||||
.force_redraw = NULL,
|
||||
.config = lxt3_config
|
||||
};
|
||||
|
||||
static void
|
||||
machine_xt_laserxt_common_init(const machine_t *model,int is_lxt3)
|
||||
{
|
||||
machine_common_init(model);
|
||||
|
||||
pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_xt_device);
|
||||
|
||||
nmi_init();
|
||||
standalone_gameport_type = &gameport_200_device;
|
||||
|
||||
device_add(is_lxt3 ? &lxt3_device : &laserxt_device);
|
||||
|
||||
device_add(&kbc_xt_lxt3_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_xt_laserxt_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ltxt/27c64.bin",
|
||||
0x000fe000, 8192, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_xt_laserxt_common_init(model, 0);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_xt_lxt3_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/lxt3/27c64d.bin",
|
||||
0x000fe000, 8192, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_xt_laserxt_common_init(model, 1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -8,11 +8,9 @@
|
||||
*
|
||||
* Emulation of the Philips XT-compatible machines.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: EngiNerd <webmaster.crrc@yahoo.it>
|
||||
*
|
||||
* Copyright 2020-2021 EngiNerd.
|
||||
* Copyright 2020-2025 EngiNerd.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
@@ -148,60 +146,3 @@ const device_t philips_device = {
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
void
|
||||
machine_xt_philips_common_init(const machine_t *model)
|
||||
{
|
||||
machine_common_init(model);
|
||||
|
||||
pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt);
|
||||
|
||||
nmi_init();
|
||||
|
||||
standalone_gameport_type = &gameport_200_device;
|
||||
|
||||
device_add(&kbc_pc_device);
|
||||
|
||||
device_add(&philips_device);
|
||||
|
||||
device_add(&xta_hd20_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_xt_p3105_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p3105/philipsnms9100.bin",
|
||||
0x000fc000, 16384, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_xt_philips_common_init(model);
|
||||
|
||||
/* On-board FDC cannot be disabled */
|
||||
device_add(&fdc_xt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_xt_p3120_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p3120/philips_p3120.bin",
|
||||
0x000f8000, 32768, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_xt_philips_common_init(model);
|
||||
|
||||
device_add(&gc100a_device);
|
||||
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
123
src/chipset/sanyo.c
Normal file
123
src/chipset/sanyo.c
Normal file
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Emulation of the Philips XT-compatible machines.
|
||||
*
|
||||
* Authors: EngiNerd <webmaster.crrc@yahoo.it>
|
||||
*
|
||||
* Copyright 2020-2025 EngiNerd.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include <86box/nmi.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/timer.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/gameport.h>
|
||||
#include <86box/ibm_5161.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
typedef struct sanyo_t {
|
||||
uint8_t reg;
|
||||
} sanyo_t;
|
||||
|
||||
#ifdef ENABLE_SANYO_LOG
|
||||
int sanyo_do_log = ENABLE_SANYO_LOG;
|
||||
|
||||
static void
|
||||
sanyo_log(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
if (sanyo_do_log) {
|
||||
va_start(ap, fmt);
|
||||
pclog_ex(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
#else
|
||||
# define sanyo_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
static void
|
||||
sanyo_write(uint16_t port, uint8_t val, void *priv)
|
||||
{
|
||||
sanyo_t *dev = (sanyo_t *) priv;
|
||||
|
||||
dev->reg = val;
|
||||
|
||||
cpu_waitstates = !(val & 0x01);
|
||||
cpu_update_waitstates();
|
||||
|
||||
sanyo_log("Sanyo MBC-17 Mainboard: Write %02x at %02x\n", val, port);
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
sanyo_read(uint16_t port, void *priv)
|
||||
{
|
||||
const sanyo_t *dev = (sanyo_t *) priv;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
ret = dev->reg;
|
||||
|
||||
sanyo_log("Sanyo MBC-17 Mainboard: Read %02x at %02x\n", ret, port);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
sanyo_close(void *priv)
|
||||
{
|
||||
sanyo_t *dev = (sanyo_t *) priv;
|
||||
|
||||
free(dev);
|
||||
}
|
||||
|
||||
static void *
|
||||
sanyo_init(UNUSED(const device_t *info))
|
||||
{
|
||||
sanyo_t *dev = (sanyo_t *) calloc(1, sizeof(sanyo_t));
|
||||
|
||||
dev->reg = cpu_waitstates ? 0x00 : 0x01;
|
||||
|
||||
io_sethandler(0x0063, 0x01, sanyo_read, NULL, NULL, sanyo_write, NULL, NULL, dev);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
const device_t sanyo_device = {
|
||||
.name = "Sanyo MBC-17 Mainboard",
|
||||
.internal_name = "sanyo",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = sanyo_init,
|
||||
.close = sanyo_close,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
@@ -24,8 +24,9 @@
|
||||
#include <86box/io.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/timer.h>
|
||||
|
||||
#include <86box/dma.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/hdd.h>
|
||||
@@ -319,6 +320,8 @@ sis_5513_00_pci_to_isa_write(int addr, uint8_t val, sis_5513_pci_to_isa_t *dev)
|
||||
|
||||
case 0x62: /* On-board Device DMA Control Register */
|
||||
dev->pci_conf[addr] = val;
|
||||
if (machine_has_jumpered_ecp_dma(machine, MACHINE_DMA_USE_MBDMA))
|
||||
lpt1_dma(((val & 0x08) || ((val & 0x07) == 0x04)) ? 0xff : (val & 0x07));
|
||||
break;
|
||||
|
||||
case 0x63: /* IDEIRQ Remapping Control Register */
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/apm.h>
|
||||
#include <86box/acpi.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/hdd.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
@@ -166,6 +167,8 @@ sis_5571_init(UNUSED(const device_t *info))
|
||||
dev->ide = device_add_linked(&sis_5572_ide_device, dev->sis);
|
||||
dev->usb = device_add_linked(&sis_5572_usb_device, dev->sis);
|
||||
|
||||
device_add_params(&kbc_at_device, (void *) KBC_VEN_SIS);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/apm.h>
|
||||
#include <86box/acpi.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/hdd.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
@@ -166,6 +167,8 @@ sis_5581_init(UNUSED(const device_t *info))
|
||||
dev->ide = device_add_linked(&sis_5582_ide_device, dev->sis);
|
||||
dev->usb = device_add_linked(&sis_5582_usb_device, dev->sis);
|
||||
|
||||
device_add_params(&kbc_at_device, (void *) KBC_VEN_SIS);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/apm.h>
|
||||
#include <86box/acpi.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/hdd.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
@@ -178,6 +179,8 @@ sis_5591_init(UNUSED(const device_t *info))
|
||||
else
|
||||
dev->pmu = device_add_linked(&sis_5595_pmu_device, dev->sis);
|
||||
|
||||
device_add_params(&kbc_at_device, (void *) KBC_VEN_SIS);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/apm.h>
|
||||
#include <86box/acpi.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/hdd.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
@@ -178,6 +179,8 @@ sis_5600_init(UNUSED(const device_t *info))
|
||||
else
|
||||
dev->pmu = device_add_linked(&sis_5595_pmu_device, dev->sis);
|
||||
|
||||
device_add_params(&kbc_at_device, (void *) KBC_VEN_SIS);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
|
||||
@@ -419,6 +419,9 @@ umc_8886_init(const device_t *info)
|
||||
device_add(&ide_um8673f_device);
|
||||
}
|
||||
|
||||
if (machine_get_kbc_device(machine) == NULL)
|
||||
device_add_params(&kbc_at_device, (void *) KBC_VEN_UMC);
|
||||
|
||||
umc_8886_reset(dev);
|
||||
|
||||
return dev;
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
#include <86box/hdc_ide_sff8038i.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/usb.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/smbus.h>
|
||||
@@ -1774,6 +1775,38 @@ pipc_init(const device_t *info)
|
||||
acpi_set_irq_mode(dev->acpi, 0);
|
||||
}
|
||||
|
||||
uint32_t kbc_params = 0x00424600;
|
||||
/*
|
||||
NOTE: The VIA VT82C42N returns 0x46 ('F') in command 0xA1 (so it
|
||||
emulates the AMI KF/AMIKey KBC firmware), and 0x42 ('B') in
|
||||
command 0xAF.
|
||||
|
||||
The version on the VIA VT82C686B southbridge also returns
|
||||
'F' in command 0xA1, but 0x45 ('E') in command 0xAF.
|
||||
The version on the VIA VT82C586B southbridge also returns
|
||||
'F' in command 0xA1, but 0x44 ('D') in command 0xAF.
|
||||
The version on the VIA VT82C586A southbridge also returns
|
||||
'F' in command 0xA1, but 0x43 ('C') in command 0xAF.
|
||||
*/
|
||||
switch (dev->local) {
|
||||
/* 596A, 596B, 686B, and 8231 are guesses because we have no probes yet. */
|
||||
case VIA_PIPC_586A: case VIA_PIPC_596A:
|
||||
kbc_params = 0x00434600;
|
||||
break;
|
||||
case VIA_PIPC_586B: case VIA_PIPC_596B:
|
||||
kbc_params = 0x00444600;
|
||||
break;
|
||||
case VIA_PIPC_686A: case VIA_PIPC_686B:
|
||||
case VIA_PIPC_8231:
|
||||
kbc_params = 0x00454600;
|
||||
break;
|
||||
}
|
||||
|
||||
kbc_params |= KBC_VEN_VIA;
|
||||
|
||||
if (machine_get_kbc_device(machine) == NULL)
|
||||
device_add_params(&kbc_at_device, (void *) (uintptr_t) kbc_params);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
|
||||
183
src/config.c
183
src/config.c
@@ -136,6 +136,21 @@ load_global(void)
|
||||
mouse_sensitivity = 0.1;
|
||||
else if (mouse_sensitivity > 2.0)
|
||||
mouse_sensitivity = 2.0;
|
||||
|
||||
vmm_disabled = ini_section_get_int(cat, "vmm_disabled", 0);
|
||||
|
||||
p = ini_section_get_string(cat, "vmm_path", NULL);
|
||||
if (p != NULL) {
|
||||
/* Convert relative paths to absolute in portable mode */
|
||||
if (portable_mode && !path_abs(p)) {
|
||||
path_append_filename(vmm_path_cfg, exe_path, p);
|
||||
path_normalize(vmm_path_cfg);
|
||||
} else {
|
||||
strncpy(vmm_path_cfg, p, sizeof(vmm_path_cfg) - 1);
|
||||
}
|
||||
} else {
|
||||
plat_get_vmm_dir(vmm_path_cfg, sizeof(vmm_path_cfg));
|
||||
}
|
||||
}
|
||||
|
||||
/* Load "General" section. */
|
||||
@@ -224,6 +239,7 @@ load_general(void)
|
||||
}
|
||||
|
||||
do_auto_pause = ini_section_get_int(cat, "do_auto_pause", 0);
|
||||
force_constant_mouse = ini_section_get_int(cat, "force_constant_mouse", 0);
|
||||
|
||||
p = ini_section_get_string(cat, "uuid", NULL);
|
||||
if (p != NULL)
|
||||
@@ -472,6 +488,12 @@ load_video(void)
|
||||
show_second_monitors = !!ini_section_get_int(cat, "show_second_monitors", 1);
|
||||
video_fullscreen_scale_maximized = !!ini_section_get_int(cat, "video_fullscreen_scale_maximized", 0);
|
||||
|
||||
vid_cga_comp_brightness = ini_section_get_int(cat, "vid_cga_comp_brightness", 0);
|
||||
vid_cga_comp_sharpness = ini_section_get_int(cat, "vid_cga_comp_sharpness", 0);
|
||||
vid_cga_comp_contrast = ini_section_get_int(cat, "vid_cga_comp_contrast", 100);
|
||||
vid_cga_comp_hue = ini_section_get_int(cat, "vid_cga_comp_hue", 0);
|
||||
vid_cga_comp_saturation = ini_section_get_int(cat, "vid_cga_comp_saturation", 100);
|
||||
|
||||
// TODO
|
||||
for (uint8_t i = 1; i < GFXCARD_MAX; i ++) {
|
||||
p = ini_section_get_string(cat, "gfxcard_2", NULL);
|
||||
@@ -514,62 +536,63 @@ load_input_devices(void)
|
||||
else
|
||||
mouse_type = 0;
|
||||
|
||||
uint8_t joy_insn = 0;
|
||||
p = ini_section_get_string(cat, "joystick_type", NULL);
|
||||
if (p != NULL) {
|
||||
joystick_type = joystick_get_from_internal_name(p);
|
||||
joystick_type[joy_insn] = joystick_get_from_internal_name(p);
|
||||
|
||||
if (!joystick_type) {
|
||||
if (!joystick_type[joy_insn]) {
|
||||
/* Try to read an integer for backwards compatibility with old configs */
|
||||
if (!strcmp(p, "0"))
|
||||
/* Workaround for ini_section_get_int returning 0 on non-integer data */
|
||||
joystick_type = joystick_get_from_internal_name("2axis_2button");
|
||||
joystick_type[joy_insn] = joystick_get_from_internal_name("2axis_2button");
|
||||
else {
|
||||
int js = ini_section_get_int(cat, "joystick_type", 8);
|
||||
switch (js) {
|
||||
case JS_TYPE_2AXIS_4BUTTON:
|
||||
joystick_type = joystick_get_from_internal_name("2axis_4button");
|
||||
joystick_type[joy_insn] = joystick_get_from_internal_name("2axis_4button");
|
||||
break;
|
||||
case JS_TYPE_2AXIS_6BUTTON:
|
||||
joystick_type = joystick_get_from_internal_name("2axis_6button");
|
||||
joystick_type[joy_insn] = joystick_get_from_internal_name("2axis_6button");
|
||||
break;
|
||||
case JS_TYPE_2AXIS_8BUTTON:
|
||||
joystick_type = joystick_get_from_internal_name("2axis_8button");
|
||||
joystick_type[joy_insn] = joystick_get_from_internal_name("2axis_8button");
|
||||
break;
|
||||
case JS_TYPE_4AXIS_4BUTTON:
|
||||
joystick_type = joystick_get_from_internal_name("4axis_4button");
|
||||
joystick_type[joy_insn] = joystick_get_from_internal_name("4axis_4button");
|
||||
break;
|
||||
case JS_TYPE_CH_FLIGHTSTICK_PRO:
|
||||
joystick_type = joystick_get_from_internal_name("ch_flightstick_pro");
|
||||
joystick_type[joy_insn] = joystick_get_from_internal_name("ch_flightstick_pro");
|
||||
break;
|
||||
case JS_TYPE_SIDEWINDER_PAD:
|
||||
joystick_type = joystick_get_from_internal_name("sidewinder_pad");
|
||||
joystick_type[joy_insn] = joystick_get_from_internal_name("sidewinder_pad");
|
||||
break;
|
||||
case JS_TYPE_THRUSTMASTER_FCS:
|
||||
joystick_type = joystick_get_from_internal_name("thrustmaster_fcs");
|
||||
joystick_type[joy_insn] = joystick_get_from_internal_name("thrustmaster_fcs");
|
||||
break;
|
||||
default:
|
||||
joystick_type = JS_TYPE_NONE;
|
||||
joystick_type[joy_insn] = JS_TYPE_NONE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
joystick_type = JS_TYPE_NONE;
|
||||
joystick_type[joy_insn] = JS_TYPE_NONE;
|
||||
|
||||
for (int js = 0; js < joystick_get_max_joysticks(joystick_type); js++) {
|
||||
for (int js = 0; js < joystick_get_max_joysticks(joystick_type[joy_insn]); js++) {
|
||||
sprintf(temp, "joystick_%i_nr", js);
|
||||
joystick_state[0][js].plat_joystick_nr = ini_section_get_int(cat, temp, 0);
|
||||
|
||||
if (joystick_state[0][js].plat_joystick_nr) {
|
||||
for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type); axis_nr++) {
|
||||
for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type[joy_insn]); axis_nr++) {
|
||||
sprintf(temp, "joystick_%i_axis_%i", js, axis_nr);
|
||||
joystick_state[0][js].axis_mapping[axis_nr] = ini_section_get_int(cat, temp, axis_nr);
|
||||
}
|
||||
for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type); button_nr++) {
|
||||
for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type[joy_insn]); button_nr++) {
|
||||
sprintf(temp, "joystick_%i_button_%i", js, button_nr);
|
||||
joystick_state[0][js].button_mapping[button_nr] = ini_section_get_int(cat, temp, button_nr);
|
||||
}
|
||||
for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type); pov_nr++) {
|
||||
for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type[joy_insn]); pov_nr++) {
|
||||
sprintf(temp, "joystick_%i_pov_%i", js, pov_nr);
|
||||
p = ini_section_get_string(cat, temp, "0, 0");
|
||||
joystick_state[0][js].pov_mapping[pov_nr][0] = joystick_state[0][js].pov_mapping[pov_nr][1] = 0;
|
||||
@@ -798,6 +821,14 @@ load_ports(void)
|
||||
char temp[512];
|
||||
memset(temp, 0, sizeof(temp));
|
||||
|
||||
int has_jumpers = machine_has_jumpered_ecp_dma(machine, DMA_ANY);
|
||||
int def_jumper = machine_get_default_jumpered_ecp_dma(machine);
|
||||
|
||||
jumpered_internal_ecp_dma = ini_section_get_int(cat, "jumpered_internal_ecp_dma", def_jumper);
|
||||
|
||||
if (!has_jumpers || (jumpered_internal_ecp_dma == def_jumper))
|
||||
ini_section_delete_var(cat, "jumpered_internal_ecp_dma");
|
||||
|
||||
for (int c = 0; c < (SERIAL_MAX - 1); c++) {
|
||||
sprintf(temp, "serial%d_enabled", c + 1);
|
||||
com_ports[c].enabled = !!ini_section_get_int(cat, temp, (c >= 2) ? 0 : 1);
|
||||
@@ -1596,7 +1627,7 @@ load_other_removable_devices(void)
|
||||
|
||||
sprintf(temp, "zip_%02i_image_path", c + 1);
|
||||
p = ini_section_get_string(cat, temp, "");
|
||||
|
||||
|
||||
sprintf(temp, "zip_%02i_writeprot", c + 1);
|
||||
rdisk_drives[c].read_only = ini_section_get_int(cat, temp, 0);
|
||||
ini_section_delete_var(cat, temp);
|
||||
@@ -1700,7 +1731,7 @@ load_other_removable_devices(void)
|
||||
|
||||
sprintf(temp, "rdisk_%02i_image_path", c + 1);
|
||||
p = ini_section_get_string(cat, temp, "");
|
||||
|
||||
|
||||
sprintf(temp, "rdisk_%02i_writeprot", c + 1);
|
||||
rdisk_drives[c].read_only = ini_section_get_int(cat, temp, 0);
|
||||
ini_section_delete_var(cat, temp);
|
||||
@@ -1990,13 +2021,9 @@ load_keybinds(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* Load the specified or a default configuration file. */
|
||||
void
|
||||
config_load(void)
|
||||
config_load_global(void)
|
||||
{
|
||||
int i;
|
||||
ini_section_t c;
|
||||
|
||||
config_log("Loading global config file '%s'...\n", global_cfg_path);
|
||||
|
||||
global = ini_read(global_cfg_path);
|
||||
@@ -2004,13 +2031,19 @@ config_load(void)
|
||||
if (global == NULL) {
|
||||
global = ini_new();
|
||||
|
||||
lang_id = plat_language_code(DEFAULT_LANGUAGE);
|
||||
|
||||
config_log("Global config file not present or invalid!\n");
|
||||
} else {
|
||||
load_global();
|
||||
}
|
||||
|
||||
load_global();
|
||||
}
|
||||
|
||||
/* Load the specified or a default configuration file. */
|
||||
void
|
||||
config_load(void)
|
||||
{
|
||||
int i;
|
||||
ini_section_t c;
|
||||
|
||||
config_log("Loading VM config file '%s'...\n", cfg_path);
|
||||
|
||||
memset(hdd, 0, sizeof(hard_disk_t));
|
||||
@@ -2028,13 +2061,14 @@ config_load(void)
|
||||
cpu_f = (cpu_family_t *) &cpu_families[0];
|
||||
cpu = 0;
|
||||
|
||||
kbd_req_capture = 0;
|
||||
hide_status_bar = 0;
|
||||
hide_tool_bar = 0;
|
||||
scale = 1;
|
||||
machine = machine_get_machine_from_internal_name("ibmpc");
|
||||
dpi_scale = 1;
|
||||
do_auto_pause = 0;
|
||||
kbd_req_capture = 0;
|
||||
hide_status_bar = 0;
|
||||
hide_tool_bar = 0;
|
||||
scale = 1;
|
||||
machine = machine_get_machine_from_internal_name("ibmpc");
|
||||
dpi_scale = 1;
|
||||
do_auto_pause = 0;
|
||||
force_constant_mouse = 0;
|
||||
|
||||
cpu_override_interpreter = 0;
|
||||
|
||||
@@ -2050,6 +2084,8 @@ config_load(void)
|
||||
for (int i = 0; i < HDC_MAX; i++)
|
||||
hdc_current[i] = hdc_get_from_internal_name("none");
|
||||
|
||||
jumpered_internal_ecp_dma = -1;
|
||||
|
||||
com_ports[0].enabled = 1;
|
||||
com_ports[1].enabled = 1;
|
||||
for (i = 2; i < (SERIAL_MAX - 1); i++)
|
||||
@@ -2178,6 +2214,22 @@ save_global(void)
|
||||
ini_section_set_double(cat, "mouse_sensitivity", mouse_sensitivity);
|
||||
else
|
||||
ini_section_delete_var(cat, "mouse_sensitivity");
|
||||
|
||||
if (vmm_disabled != 0)
|
||||
ini_section_set_int(cat, "vmm_disabled", vmm_disabled);
|
||||
else
|
||||
ini_section_delete_var(cat, "vmm_disabled");
|
||||
|
||||
if (vmm_path_cfg[0] != 0) {
|
||||
/* Save path as relative to the EXE path in portable mode */
|
||||
if (portable_mode && path_abs(vmm_path_cfg) && !strnicmp(vmm_path_cfg, exe_path, strlen(exe_path))) {
|
||||
ini_section_set_string(cat, "vmm_path", &vmm_path_cfg[strlen(exe_path)]);
|
||||
} else {
|
||||
ini_section_set_string(cat, "vmm_path", vmm_path_cfg);
|
||||
}
|
||||
} else {
|
||||
ini_section_delete_var(cat, "vmm_path");
|
||||
}
|
||||
}
|
||||
|
||||
/* Save "General" section. */
|
||||
@@ -2312,6 +2364,11 @@ save_general(void)
|
||||
else
|
||||
ini_section_delete_var(cat, "do_auto_pause");
|
||||
|
||||
if (force_constant_mouse)
|
||||
ini_section_set_int(cat, "force_constant_mouse", force_constant_mouse);
|
||||
else
|
||||
ini_section_delete_var(cat, "force_constant_mouse");
|
||||
|
||||
char cpu_buf[128] = { 0 };
|
||||
plat_get_cpu_string(cpu_buf, 128);
|
||||
ini_section_set_string(cat, "host_cpu", cpu_buf);
|
||||
@@ -2430,6 +2487,32 @@ save_video(void)
|
||||
ini_section_set_string(cat, "gfxcard",
|
||||
video_get_internal_name(gfxcard[0]));
|
||||
|
||||
|
||||
if (vid_cga_comp_brightness)
|
||||
ini_section_set_int(cat, "vid_cga_comp_brightness", vid_cga_comp_brightness);
|
||||
else
|
||||
ini_section_delete_var(cat, "vid_cga_comp_brightness");
|
||||
|
||||
if (vid_cga_comp_sharpness)
|
||||
ini_section_set_int(cat, "vid_cga_comp_sharpness", vid_cga_comp_sharpness);
|
||||
else
|
||||
ini_section_delete_var(cat, "vid_cga_comp_sharpness");
|
||||
|
||||
if (vid_cga_comp_contrast != 100)
|
||||
ini_section_set_int(cat, "vid_cga_comp_contrast", vid_cga_comp_contrast);
|
||||
else
|
||||
ini_section_delete_var(cat, "vid_cga_comp_contrast");
|
||||
|
||||
if (vid_cga_comp_hue)
|
||||
ini_section_set_int(cat, "vid_cga_comp_hue", vid_cga_comp_hue);
|
||||
else
|
||||
ini_section_delete_var(cat, "vid_cga_comp_hue");
|
||||
|
||||
if (vid_cga_comp_saturation != 100)
|
||||
ini_section_set_int(cat, "vid_cga_comp_saturation", vid_cga_comp_saturation);
|
||||
else
|
||||
ini_section_delete_var(cat, "vid_cga_comp_saturation");
|
||||
|
||||
if (voodoo_enabled == 0)
|
||||
ini_section_delete_var(cat, "voodoo");
|
||||
else
|
||||
@@ -2483,7 +2566,8 @@ save_input_devices(void)
|
||||
|
||||
ini_section_set_string(cat, "mouse_type", mouse_get_internal_name(mouse_type));
|
||||
|
||||
if (!joystick_type) {
|
||||
uint8_t joy_insn = 0;
|
||||
if (!joystick_type[joy_insn]) {
|
||||
ini_section_delete_var(cat, "joystick_type");
|
||||
|
||||
for (int js = 0; js < MAX_PLAT_JOYSTICKS; js++) {
|
||||
@@ -2504,22 +2588,22 @@ save_input_devices(void)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ini_section_set_string(cat, "joystick_type", joystick_get_internal_name(joystick_type));
|
||||
ini_section_set_string(cat, "joystick_type", joystick_get_internal_name(joystick_type[joy_insn]));
|
||||
|
||||
for (int js = 0; js < joystick_get_max_joysticks(joystick_type); js++) {
|
||||
for (int js = 0; js < joystick_get_max_joysticks(joystick_type[joy_insn]); js++) {
|
||||
sprintf(tmp2, "joystick_%i_nr", js);
|
||||
ini_section_set_int(cat, tmp2, joystick_state[0][js].plat_joystick_nr);
|
||||
|
||||
if (joystick_state[0][js].plat_joystick_nr) {
|
||||
for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type); axis_nr++) {
|
||||
for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type[joy_insn]); axis_nr++) {
|
||||
sprintf(tmp2, "joystick_%i_axis_%i", js, axis_nr);
|
||||
ini_section_set_int(cat, tmp2, joystick_state[0][js].axis_mapping[axis_nr]);
|
||||
}
|
||||
for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type); button_nr++) {
|
||||
for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type[joy_insn]); button_nr++) {
|
||||
sprintf(tmp2, "joystick_%i_button_%i", js, button_nr);
|
||||
ini_section_set_int(cat, tmp2, joystick_state[0][js].button_mapping[button_nr]);
|
||||
}
|
||||
for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type); pov_nr++) {
|
||||
for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type[joy_insn]); pov_nr++) {
|
||||
sprintf(tmp2, "joystick_%i_pov_%i", js, pov_nr);
|
||||
sprintf(temp, "%i, %i", joystick_state[0][js].pov_mapping[pov_nr][0],
|
||||
joystick_state[0][js].pov_mapping[pov_nr][1]);
|
||||
@@ -2711,6 +2795,14 @@ save_ports(void)
|
||||
ini_section_t cat = ini_find_or_create_section(config, "Ports (COM & LPT)");
|
||||
char temp[512];
|
||||
|
||||
int has_jumpers = machine_has_jumpered_ecp_dma(machine, DMA_ANY);
|
||||
int def_jumper = machine_get_default_jumpered_ecp_dma(machine);
|
||||
|
||||
if (!has_jumpers || (jumpered_internal_ecp_dma == def_jumper))
|
||||
ini_section_delete_var(cat, "jumpered_internal_ecp_dma");
|
||||
else
|
||||
ini_section_set_int(cat, "jumpered_internal_ecp_dma", jumpered_internal_ecp_dma);
|
||||
|
||||
for (int c = 0; c < (SERIAL_MAX - 1); c++) {
|
||||
sprintf(temp, "serial%d_enabled", c + 1);
|
||||
if (((c < 2) && com_ports[c].enabled) || ((c >= 2) && !com_ports[c].enabled))
|
||||
@@ -3402,11 +3494,16 @@ save_other_removable_devices(void)
|
||||
}
|
||||
|
||||
void
|
||||
config_save(void)
|
||||
config_save_global(void)
|
||||
{
|
||||
save_global(); /* Global */
|
||||
ini_write(global, global_cfg_path);
|
||||
|
||||
ini_write(global, global_cfg_path);
|
||||
}
|
||||
|
||||
void
|
||||
config_save(void)
|
||||
{
|
||||
save_general(); /* General */
|
||||
for (uint8_t i = 0; i < MONITORS_NUM; i++)
|
||||
save_monitor(i); /* Monitors */
|
||||
@@ -3427,6 +3524,8 @@ config_save(void)
|
||||
save_keybinds(); /* Key bindings */
|
||||
|
||||
ini_write(config, cfg_path);
|
||||
|
||||
config_save_global();
|
||||
}
|
||||
|
||||
ini_t
|
||||
|
||||
@@ -283,7 +283,7 @@ reset_common(int hard)
|
||||
cr0 = 1 << 30;
|
||||
else
|
||||
cr0 = 0;
|
||||
if (is386 && !is486 && (fpu_type == FPU_387))
|
||||
if (is386 && !is486 && ((fpu_type == FPU_387) || (fpu_type == FPU_NONE)))
|
||||
cr0 |= 0x10;
|
||||
cpu_cache_int_enabled = 0;
|
||||
cpu_update_waitstates();
|
||||
|
||||
@@ -54,6 +54,7 @@ add_library(dev OBJECT
|
||||
pci_bridge.c
|
||||
phoenix_486_jumper.c
|
||||
postcard.c
|
||||
radisys_config.c
|
||||
serial.c
|
||||
serial_passthrough.c
|
||||
smbus_ali7101.c
|
||||
@@ -61,6 +62,7 @@ add_library(dev OBJECT
|
||||
smbus_sis5595.c
|
||||
tulip_jumper.c
|
||||
unittester.c
|
||||
zenith_scratchpad.c
|
||||
)
|
||||
|
||||
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT MSVC)
|
||||
|
||||
1248
src/device/kbc_at.c
1248
src/device/kbc_at.c
File diff suppressed because it is too large
Load Diff
@@ -25,12 +25,14 @@
|
||||
#include <86box/network.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
|
||||
static int next_inst = 0;
|
||||
int lpt_3bc_used = 0;
|
||||
static int next_inst = 0;
|
||||
static int lpt_3bc_used = 0;
|
||||
|
||||
lpt_port_t lpt_ports[PARALLEL_MAX];
|
||||
static lpt_t *lpt1;
|
||||
|
||||
lpt_device_t lpt_devs[PARALLEL_MAX];
|
||||
lpt_port_t lpt_ports[PARALLEL_MAX];
|
||||
|
||||
lpt_device_t lpt_devs[PARALLEL_MAX];
|
||||
|
||||
const lpt_device_t lpt_none_device = {
|
||||
.name = "None",
|
||||
@@ -825,6 +827,13 @@ lpt_port_dma(lpt_t *dev, const uint8_t dma)
|
||||
lpt_log("Port %i DMA = %02X\n", dev->id, dma);
|
||||
}
|
||||
|
||||
void
|
||||
lpt1_dma(const uint8_t dma)
|
||||
{
|
||||
if (lpt1 != NULL)
|
||||
lpt_port_dma(lpt1, dma);
|
||||
}
|
||||
|
||||
void
|
||||
lpt_port_remove(lpt_t *dev)
|
||||
{
|
||||
@@ -894,6 +903,9 @@ lpt_close(void *priv)
|
||||
|
||||
}
|
||||
|
||||
if (lpt1 == dev)
|
||||
lpt1 = NULL;
|
||||
|
||||
free(dev);
|
||||
}
|
||||
|
||||
@@ -962,7 +974,10 @@ lpt_init(const device_t *info)
|
||||
|
||||
dev->addr = 0xffff;
|
||||
dev->irq = 0xff;
|
||||
dev->dma = 0xff;
|
||||
if ((jumpered_internal_ecp_dma >= 0) && (jumpered_internal_ecp_dma != 4))
|
||||
dev->dma = jumpered_internal_ecp_dma;
|
||||
else
|
||||
dev->dma = 0xff;
|
||||
dev->enable_irq = 0x00;
|
||||
dev->cfg_regs_enabled = 0;
|
||||
dev->ext = 0;
|
||||
@@ -1005,6 +1020,9 @@ lpt_init(const device_t *info)
|
||||
if (!(info->local & 0xfff00000))
|
||||
next_inst++;
|
||||
|
||||
if (lpt1 == NULL)
|
||||
lpt1 = dev;
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
|
||||
@@ -559,7 +559,7 @@ mouse_get_buttons_ex(void)
|
||||
void
|
||||
mouse_set_sample_rate(double new_rate)
|
||||
{
|
||||
mouse_timed = (new_rate > 0.0);
|
||||
mouse_timed = !force_constant_mouse && (new_rate > 0.0);
|
||||
|
||||
timer_stop(&mouse_timer);
|
||||
|
||||
@@ -568,6 +568,12 @@ mouse_set_sample_rate(double new_rate)
|
||||
timer_on_auto(&mouse_timer, 1000000.0 / sample_rate);
|
||||
}
|
||||
|
||||
void
|
||||
mouse_update_sample_rate(void)
|
||||
{
|
||||
mouse_set_sample_rate(sample_rate);
|
||||
}
|
||||
|
||||
/* Callback from the hardware driver. */
|
||||
void
|
||||
mouse_set_buttons(int buttons)
|
||||
@@ -676,8 +682,7 @@ mouse_reset(void)
|
||||
/* Clear local data. */
|
||||
mouse_clear_coords();
|
||||
mouse_clear_buttons();
|
||||
mouse_input_mode = 0;
|
||||
mouse_timed = 1;
|
||||
mouse_input_mode = 0;
|
||||
|
||||
/* If no mouse configured, we're done. */
|
||||
if (mouse_type == 0)
|
||||
@@ -686,8 +691,7 @@ mouse_reset(void)
|
||||
timer_add(&mouse_timer, mouse_timer_poll, NULL, 0);
|
||||
|
||||
/* Poll at 100 Hz, the default of a PS/2 mouse. */
|
||||
sample_rate = 100.0;
|
||||
timer_on_auto(&mouse_timer, 1000000.0 / sample_rate);
|
||||
mouse_set_sample_rate(100.0);
|
||||
|
||||
if ((mouse_type > 1) && (mouse_devices[mouse_type].device != NULL))
|
||||
mouse_priv = device_add(mouse_devices[mouse_type].device);
|
||||
|
||||
@@ -226,6 +226,8 @@ mouse_upc_port_2_write(uint16_t port, uint8_t val, void *priv)
|
||||
|
||||
if (dev->status & (STAT_CLEAR | STAT_RESET)) {
|
||||
/* TODO: Silently reset the mouse. */
|
||||
dev->status &= ~STAT_RX_FULL;
|
||||
dev->status |= (STAT_DEV_IDLE | STAT_TX_IDLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
89
src/device/radisys_config.c
Normal file
89
src/device/radisys_config.c
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Implementation of the Radisys EPC-2012 Configuration registers.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2025 Miran Grca.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/timer.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
typedef struct radisys_config_t {
|
||||
uint8_t regs[2];
|
||||
} radisys_config_t;
|
||||
|
||||
static uint8_t
|
||||
radisys_config_read(uint16_t port, void *priv)
|
||||
{
|
||||
radisys_config_t *dev = (radisys_config_t *) priv;
|
||||
uint8_t ret = dev->regs[port & 0x0001];
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
radisys_config_write(uint16_t port, uint8_t val, void *priv)
|
||||
{
|
||||
radisys_config_t *dev = (radisys_config_t *) priv;
|
||||
|
||||
dev->regs[port & 0x0001] = val;
|
||||
|
||||
if (!(port & 0x0001) && machine_has_jumpered_ecp_dma(machine, MACHINE_DMA_USE_CONFIG))
|
||||
lpt1_dma((val & 0x02) ? 3 : 1);
|
||||
}
|
||||
|
||||
static void
|
||||
radisys_config_close(void *priv)
|
||||
{
|
||||
radisys_config_t *dev = (radisys_config_t *) priv;
|
||||
|
||||
free(dev);
|
||||
}
|
||||
|
||||
static void *
|
||||
radisys_config_init(UNUSED(const device_t *info))
|
||||
{
|
||||
/* We have to return something non-NULL. */
|
||||
radisys_config_t *dev = (radisys_config_t *) calloc(1, sizeof(radisys_config_t));
|
||||
|
||||
/* 370h is also supported. */
|
||||
io_sethandler(0x0270, 0x0002, radisys_config_read, NULL, NULL, radisys_config_write, NULL, NULL, dev);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
const device_t radisys_config_device = {
|
||||
.name = "Radisys EPC-2012 Configuration",
|
||||
.internal_name = "radisys_config",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = radisys_config_init,
|
||||
.close = radisys_config_close,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
@@ -47,6 +47,7 @@
|
||||
#include <86box/io.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/chipset.h>
|
||||
|
||||
typedef struct {
|
||||
mem_mapping_t scratchpad_mapping;
|
||||
@@ -94,7 +95,7 @@ zenith_scratchpad_close(void *priv)
|
||||
free(dev);
|
||||
}
|
||||
|
||||
static const device_t zenith_scratchpad_device = {
|
||||
const device_t zenith_scratchpad_device = {
|
||||
.name = "Zenith scratchpad RAM",
|
||||
.internal_name = "zenith_scratchpad",
|
||||
.flags = 0,
|
||||
@@ -107,104 +108,3 @@ static const device_t zenith_scratchpad_device = {
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
void
|
||||
machine_zenith_init(const machine_t *model)
|
||||
{
|
||||
machine_common_init(model);
|
||||
|
||||
device_add(&zenith_scratchpad_device);
|
||||
|
||||
pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt);
|
||||
|
||||
device_add(&kbc_xt_zenith_device);
|
||||
|
||||
nmi_init();
|
||||
}
|
||||
|
||||
/*
|
||||
* Current bugs and limitations:
|
||||
* - missing NVRAM implementation
|
||||
*/
|
||||
int
|
||||
machine_xt_z184_init(const machine_t *model)
|
||||
{
|
||||
lpt_t *lpt = NULL;
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/zdsupers/z184m v3.1d.10d",
|
||||
0x000f8000, 32768, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_zenith_init(model);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_xt_device);
|
||||
|
||||
lpt = device_add_inst(&lpt_port_device, 1);
|
||||
lpt_port_remove(lpt);
|
||||
lpt_port_setup(lpt, LPT2_ADDR);
|
||||
lpt_set_next_inst(255);
|
||||
|
||||
device_add(&ns8250_device);
|
||||
/* So that serial_standalone_init() won't do anything. */
|
||||
serial_set_next_inst(SERIAL_MAX - 1);
|
||||
|
||||
device_add(&cga_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_xt_z151_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
ret = bios_load_linear("roms/machines/zdsz151/444-229-18.bin",
|
||||
0x000fc000, 32768, 0);
|
||||
if (ret) {
|
||||
bios_load_aux_linear("roms/machines/zdsz151/444-260-18.bin",
|
||||
0x000f8000, 16384, 0);
|
||||
}
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_zenith_init(model);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_xt_tandy_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Current bugs and limitations:
|
||||
* - Memory board support for EMS currently missing
|
||||
*/
|
||||
int
|
||||
machine_xt_z159_init(const machine_t *model)
|
||||
{
|
||||
lpt_t *lpt = NULL;
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/zdsz159/z159m v2.9e.10d",
|
||||
0x000f8000, 32768, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_zenith_init(model);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_xt_tandy_device);
|
||||
|
||||
/* parallel port is on the memory board */
|
||||
lpt = device_add_inst(&lpt_port_device, 1);
|
||||
lpt_port_remove(lpt);
|
||||
lpt_port_setup(lpt, LPT2_ADDR);
|
||||
lpt_set_next_inst(255);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -23,6 +23,7 @@ add_library(hdd OBJECT
|
||||
hdc_st506_xt.c
|
||||
hdc_st506_at.c
|
||||
hdc_xta.c
|
||||
hdc_xta_ps1.c
|
||||
hdc_esdi_at.c
|
||||
hdc_esdi_mca.c
|
||||
hdc_xtide.c
|
||||
|
||||
@@ -480,7 +480,7 @@ static int
|
||||
ide_get_max(const ide_t *ide, const int type)
|
||||
{
|
||||
const int ata_4 = ide_is_ata4(ide_boards[ide->board]);
|
||||
const int max[2][4] = { { 0, -1, -1, -1 }, { 4, 2, 2, 5 } };
|
||||
const int max[2][4] = { { 3, -1, -1, -1 }, { 4, 2, 2, 5 } };
|
||||
int ret;
|
||||
|
||||
if (ide->type == IDE_ATAPI)
|
||||
@@ -495,7 +495,7 @@ static int
|
||||
ide_get_timings(const ide_t *ide, const int type)
|
||||
{
|
||||
const int ata_4 = ide_is_ata4(ide_boards[ide->board]);
|
||||
const int timings[2][3] = { { 0, 0, 0 }, { 120, 120, 0 } };
|
||||
const int timings[2][3] = { { 0, 240, 180 }, { 120, 120, 120 } };
|
||||
int ret;
|
||||
|
||||
if (ide->type == IDE_ATAPI)
|
||||
@@ -666,8 +666,9 @@ ide_identify(ide_t *ide)
|
||||
ide->buffer[88] = 0x0000;
|
||||
|
||||
if (max_pio >= 3) {
|
||||
ide->buffer[49] |= 0x0c00;
|
||||
ide->buffer[53] |= 0x0002;
|
||||
ide->buffer[67] = ide_get_timings(ide, TIMINGS_PIO);
|
||||
ide->buffer[67] = ide_get_timings(ide, TIMINGS_PIO_FC);
|
||||
ide->buffer[68] = ide_get_timings(ide, TIMINGS_PIO_FC);
|
||||
for (i = 3; i <= max_pio; i++)
|
||||
ide->buffer[64] |= (1 << (i - 3));
|
||||
@@ -710,12 +711,8 @@ ide_identify(ide_t *ide)
|
||||
}
|
||||
|
||||
if (ide->mdma_mode != -1) {
|
||||
d = (ide->mdma_mode & 0xff);
|
||||
d <<= 8;
|
||||
if ((ide->mdma_mode & 0x300) == 0x000) {
|
||||
if ((ide->mdma_mode & 0xff) >= 3)
|
||||
ide->buffer[64] |= d;
|
||||
} else if ((ide->mdma_mode & 0x300) == 0x100)
|
||||
d = (ide->mdma_mode & 0xff) << 8;
|
||||
if ((ide->mdma_mode & 0x300) == 0x100)
|
||||
ide->buffer[62] |= d;
|
||||
else if ((ide->mdma_mode & 0x300) == 0x200)
|
||||
ide->buffer[63] |= d;
|
||||
@@ -829,6 +826,7 @@ ide_set_features(ide_t *ide)
|
||||
int mode;
|
||||
int submode;
|
||||
int max;
|
||||
int max_pio_submode;
|
||||
|
||||
features = ide->tf->cylprecomp;
|
||||
features_data = ide->tf->secount;
|
||||
@@ -844,9 +842,10 @@ ide_set_features(ide_t *ide)
|
||||
|
||||
switch (mode) {
|
||||
case 0x00: /* PIO default */
|
||||
if (submode != 0)
|
||||
max = ide_get_max(ide, TYPE_PIO);
|
||||
max_pio_submode = (max >= 3) ? 1 : 0;
|
||||
if (submode > max_pio_submode)
|
||||
return 0;
|
||||
max = ide_get_max(ide, TYPE_PIO);
|
||||
ide->mdma_mode = (1 << max);
|
||||
ide_log("IDE %02X: Setting DPIO mode: %02X, %08X\n", ide->channel,
|
||||
submode, ide->mdma_mode);
|
||||
|
||||
@@ -45,7 +45,7 @@ typedef struct cmd640_t {
|
||||
uint8_t pci;
|
||||
uint8_t irq_state;
|
||||
uint8_t pci_slot;
|
||||
uint8_t pad0;
|
||||
uint8_t force_on;
|
||||
uint8_t regs[256];
|
||||
uint32_t local;
|
||||
int irq_mode[2];
|
||||
@@ -143,7 +143,7 @@ cmd640_ide_handlers(cmd640_t *dev)
|
||||
ide_set_base(0, main);
|
||||
ide_set_side(0, side);
|
||||
|
||||
if (dev->regs[0x04] & 0x01)
|
||||
if ((dev->regs[0x04] & 0x01) || dev->force_on)
|
||||
ide_pri_enable();
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ cmd640_ide_handlers(cmd640_t *dev)
|
||||
ide_set_base(1, main);
|
||||
ide_set_side(1, side);
|
||||
|
||||
if ((dev->regs[0x04] & 0x01) && (dev->regs[0x51] & 0x08))
|
||||
if (((dev->regs[0x04] & 0x01) || dev->force_on) && (dev->regs[0x51] & 0x08))
|
||||
ide_sec_enable();
|
||||
}
|
||||
}
|
||||
@@ -512,6 +512,7 @@ cmd640_init(const device_t *info)
|
||||
dev->local = info->local;
|
||||
|
||||
dev->channels = ((info->local & 0x60000) >> 17) & 0x03;
|
||||
dev->force_on = !!(info->local & 0x100000);
|
||||
|
||||
if (info->flags & DEVICE_PCI) {
|
||||
device_add(&ide_pci_2ch_device);
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
|
||||
#define WD_REV_1_BIOS_FILE "roms/hdd/xta/idexywd2.bin"
|
||||
#define WD_REV_2_BIOS_FILE "roms/hdd/xta/infowdbios.rom"
|
||||
#define PC3086_BIOS_FILE "roms/machines/pc3086/c800.bin"
|
||||
#define ST50X_BIOS_FILE "roms/hdd/xta/ST05XBIO.BIN"
|
||||
#define PC5086_BIOS_FILE "roms/machines/pc5086/c800.bin"
|
||||
|
||||
@@ -1032,7 +1033,7 @@ xta_init_common(const device_t *info, int type)
|
||||
fn = (char *) device_get_bios_file(info, bios_rev, 0);
|
||||
/* Revision 2 actually supports 2 drives using drive select. */
|
||||
if (!strcmp(bios_rev, "rev_1"))
|
||||
max = 1;
|
||||
max = 1;
|
||||
#ifdef SELECTABLE_BASE
|
||||
dev->base = device_get_config_hex16("base");
|
||||
#else
|
||||
@@ -1041,15 +1042,22 @@ xta_init_common(const device_t *info, int type)
|
||||
dev->irq = device_get_config_int("irq");
|
||||
dev->rom_addr = device_get_config_hex20("bios_addr");
|
||||
dev->dma = 3;
|
||||
case 1: /* Amstrad PC3086 */
|
||||
dev->name = "WDXT-150 PC3086";
|
||||
dev->rom_addr = 0xc8000;
|
||||
fn = PC3086_BIOS_FILE;
|
||||
dev->base = 0x0320;
|
||||
dev->irq = 5;
|
||||
dev->dma = 3;
|
||||
break;
|
||||
|
||||
case 1: /* EuroPC */
|
||||
case 3: /* Amstrad PC5086 */
|
||||
case 2: /* EuroPC */
|
||||
case 5: /* Amstrad PC5086 */
|
||||
switch (dev->type) {
|
||||
case 1:
|
||||
case 2:
|
||||
dev->name = "HD20";
|
||||
break;
|
||||
case 3:
|
||||
case 5:
|
||||
dev->name = "ST-50X PC5086";
|
||||
dev->rom_addr = 0xc8000;
|
||||
fn = PC5086_BIOS_FILE;
|
||||
@@ -1060,10 +1068,10 @@ xta_init_common(const device_t *info, int type)
|
||||
dev->irq = 5;
|
||||
dev->dma = 3;
|
||||
break;
|
||||
case 2: /* Seagate ST-05X Standalone */
|
||||
case 3: /* Seagate ST-05X Standalone */
|
||||
case 4: /* Seagate ST-05X Standalone secondary device */
|
||||
switch (dev->type) {
|
||||
case 2:
|
||||
case 3:
|
||||
dev->name = "ST-50X PRI";
|
||||
dev->rom_addr = device_get_config_hex20("bios_addr");
|
||||
fn = ST50X_BIOS_FILE;
|
||||
@@ -1206,7 +1214,51 @@ xta_init_common(const device_t *info, int type)
|
||||
else
|
||||
dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x02 << (c << 1));
|
||||
}
|
||||
} else if ((dev->type >= 2) && (dev->type <= 4)) {
|
||||
} else if (dev->type == 1) {
|
||||
/*
|
||||
WDXT-150, Revision 3 (Amstrad PC3086) switches:
|
||||
- Drive 0, bits 1,0:
|
||||
- With bit 4 set:
|
||||
- 0,0 = 612/4/17;
|
||||
- 0,1 = 615/6/17;
|
||||
- 1,0 = 977/5/17;
|
||||
- 1,1 = 615/4/17.
|
||||
- With bit 4 clear:
|
||||
- 0,0 = 971/4/17;
|
||||
- 0,1 = 976/6/17;
|
||||
- 1,0 = 1024/5/17;
|
||||
- 1,1 = 976/4/17.
|
||||
- Drive 1, bits 3,2:
|
||||
- With bit 4 set:
|
||||
- 0,0 = 612/4/17;
|
||||
- 0,1 = 615/6/17;
|
||||
- 1,0 = 977/5/17;
|
||||
- 1,1 = 615/4/17.
|
||||
- With bit 4 clear:
|
||||
- 0,0 = 971/4/17;
|
||||
- 0,1 = 976/6/17;
|
||||
- 1,0 = 1024/5/17;
|
||||
- 1,1 = 976/4/17.
|
||||
*/
|
||||
if (drive->tracks == 971)
|
||||
dev->sw = ((dev->sw & 0xef) & (c ? 0xf3 : 0xfc)) | (0x00 << (c << 1));
|
||||
else if (drive->tracks == 976) {
|
||||
if (drive->hpc == 6)
|
||||
dev->sw = ((dev->sw & 0xef) & (c ? 0xf3 : 0xfc)) | (0x01 << (c << 1));
|
||||
else
|
||||
dev->sw = ((dev->sw & 0xef) & (c ? 0xf3 : 0xfc)) | (0x03 << (c << 1));
|
||||
} else if (drive->tracks == 1024)
|
||||
dev->sw = ((dev->sw & 0xef) & (c ? 0xf3 : 0xfc)) | (0x02 << (c << 1));
|
||||
else if (drive->tracks == 615) {
|
||||
if (drive->hpc == 6)
|
||||
dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x01 << (c << 1));
|
||||
else
|
||||
dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x03 << (c << 1));
|
||||
} else if (drive->tracks == 612)
|
||||
dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x00 << (c << 1));
|
||||
else
|
||||
dev->sw = (dev->sw & (c ? 0xf3 : 0xfc)) | (0x02 << (c << 1));
|
||||
} else if ((dev->type >= 3) && (dev->type <= 5)) {
|
||||
/*
|
||||
Bits 1, 0:
|
||||
- 1, 1 = 615/4/17 (20 MB);
|
||||
@@ -1418,11 +1470,25 @@ const device_t xta_wdxt150_device = {
|
||||
.config = wdxt150_config
|
||||
};
|
||||
|
||||
const device_t xta_wdxt150_pc3086_device = {
|
||||
.name = "WDXT-150 XTA Fixed Disk Controller (PC3086)",
|
||||
.internal_name = "xta_wdxt150",
|
||||
.flags = DEVICE_ISA,
|
||||
.local = 1,
|
||||
.init = xta_init,
|
||||
.close = xta_close,
|
||||
.reset = NULL,
|
||||
.available = NULL /*xta_available*/,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = wdxt150_config
|
||||
};
|
||||
|
||||
const device_t xta_hd20_device = {
|
||||
.name = "EuroPC HD20 Fixed Disk Controller",
|
||||
.internal_name = "xta_hd20",
|
||||
.flags = DEVICE_ISA,
|
||||
.local = 1,
|
||||
.local = 2,
|
||||
.init = xta_init,
|
||||
.close = xta_close,
|
||||
.reset = NULL,
|
||||
@@ -1436,7 +1502,7 @@ const device_t xta_st50x_device = {
|
||||
.name = "ST-50X Fixed Disk Controller",
|
||||
.internal_name = "xta_st50x",
|
||||
.flags = DEVICE_ISA,
|
||||
.local = 2,
|
||||
.local = 3,
|
||||
.init = xta_st50x_init,
|
||||
.close = xta_st50x_close,
|
||||
.reset = NULL,
|
||||
@@ -1447,10 +1513,10 @@ const device_t xta_st50x_device = {
|
||||
};
|
||||
|
||||
const device_t xta_st50x_pc5086_device = {
|
||||
.name = "ST-50X Fixed Disk Controller (PC5086)",
|
||||
.name = "ST-50X Fixed Disk Controller (PC5086)",
|
||||
.internal_name = "xta_st50x_pc5086",
|
||||
.flags = DEVICE_ISA,
|
||||
.local = 3,
|
||||
.local = 5,
|
||||
.init = xta_init,
|
||||
.close = xta_close,
|
||||
.reset = NULL,
|
||||
|
||||
@@ -2016,7 +2016,7 @@ mo_get_max(UNUSED(const ide_t *ide), const int ide_has_dma, const int type)
|
||||
|
||||
switch (type) {
|
||||
case TYPE_PIO:
|
||||
ret = ide_has_dma ? 3 : 0;
|
||||
ret = 3;
|
||||
break;
|
||||
case TYPE_SDMA:
|
||||
default:
|
||||
@@ -2043,10 +2043,10 @@ mo_get_timings(UNUSED(const ide_t *ide), const int ide_has_dma, const int type)
|
||||
ret = ide_has_dma ? 0x96 : 0;
|
||||
break;
|
||||
case TIMINGS_PIO:
|
||||
ret = ide_has_dma ? 0xb4 : 0;
|
||||
ret = 0xf0;
|
||||
break;
|
||||
case TIMINGS_PIO_FC:
|
||||
ret = ide_has_dma ? 0xb4 : 0;
|
||||
ret = 0xb4;
|
||||
break;
|
||||
default:
|
||||
ret = 0;
|
||||
|
||||
@@ -2090,7 +2090,7 @@ rdisk_get_max(UNUSED(const ide_t *ide), const int ide_has_dma, const int type)
|
||||
|
||||
switch (type) {
|
||||
case TYPE_PIO:
|
||||
ret = ide_has_dma ? 3 : 0;
|
||||
ret = 3;
|
||||
break;
|
||||
case TYPE_SDMA:
|
||||
default:
|
||||
@@ -2117,10 +2117,10 @@ rdisk_get_timings(UNUSED(const ide_t *ide), const int ide_has_dma, const int typ
|
||||
ret = ide_has_dma ? 0x96 : 0;
|
||||
break;
|
||||
case TIMINGS_PIO:
|
||||
ret = ide_has_dma ? 0xb4 : 0;
|
||||
ret = 0xf0;
|
||||
break;
|
||||
case TIMINGS_PIO_FC:
|
||||
ret = ide_has_dma ? 0xb4 : 0;
|
||||
ret = 0xb4;
|
||||
break;
|
||||
default:
|
||||
ret = 0;
|
||||
|
||||
@@ -65,7 +65,7 @@ typedef struct _joystick_instance_ {
|
||||
void *dat;
|
||||
} joystick_instance_t;
|
||||
|
||||
int joystick_type = JS_TYPE_NONE;
|
||||
int joystick_type[GAMEPORT_MAX] = { JS_TYPE_NONE, JS_TYPE_NONE };
|
||||
|
||||
static const joystick_t joystick_none = {
|
||||
.name = "None",
|
||||
@@ -299,17 +299,17 @@ timer_over(void *priv)
|
||||
}
|
||||
|
||||
void
|
||||
gameport_update_joystick_type(void)
|
||||
gameport_update_joystick_type(uint8_t gp)
|
||||
{
|
||||
/* Add a standalone game port if a joystick is enabled but no other game ports exist. */
|
||||
if (standalone_gameport_type)
|
||||
gameport_add(standalone_gameport_type);
|
||||
|
||||
/* Reset the joystick interface. */
|
||||
if (joystick_instance[0]) {
|
||||
joystick_instance[0]->intf->close(joystick_instance[0]->dat);
|
||||
joystick_instance[0]->intf = joysticks[joystick_type].joystick;
|
||||
joystick_instance[0]->dat = joystick_instance[0]->intf->init();
|
||||
if (joystick_instance[gp]) {
|
||||
joystick_instance[gp]->intf->close(joystick_instance[gp]->dat);
|
||||
joystick_instance[gp]->intf = joysticks[joystick_type[gp]].joystick;
|
||||
joystick_instance[gp]->dat = joystick_instance[gp]->intf->init();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -393,24 +393,27 @@ gameport_init(const device_t *info)
|
||||
{
|
||||
gameport_t *dev = calloc(1, sizeof(gameport_t));
|
||||
|
||||
// TODO: Later we'll actually support more than one gameport
|
||||
uint8_t joy_insn = 0;
|
||||
|
||||
/* Allocate global instance. */
|
||||
if (!joystick_instance[0] && joystick_type) {
|
||||
joystick_instance[0] = calloc(1, sizeof(joystick_instance_t));
|
||||
if (!joystick_instance[joy_insn] && joystick_type[joy_insn]) {
|
||||
joystick_instance[joy_insn] = calloc(1, sizeof(joystick_instance_t));
|
||||
|
||||
// For each analog joystick axis
|
||||
for (uint8_t i = 0; i < 4; i++) {
|
||||
joystick_instance[0]->axis[i].joystick = joystick_instance[0];
|
||||
joystick_instance[joy_insn]->axis[i].joystick = joystick_instance[joy_insn];
|
||||
|
||||
joystick_instance[0]->axis[i].axis_nr = i;
|
||||
joystick_instance[joy_insn]->axis[i].axis_nr = i;
|
||||
|
||||
timer_add(&joystick_instance[0]->axis[i].timer, timer_over, &joystick_instance[0]->axis[i], 0);
|
||||
timer_add(&joystick_instance[joy_insn]->axis[i].timer, timer_over, &joystick_instance[joy_insn]->axis[i], 0);
|
||||
}
|
||||
|
||||
joystick_instance[0]->intf = joysticks[joystick_type].joystick;
|
||||
joystick_instance[0]->dat = joystick_instance[0]->intf->init();
|
||||
joystick_instance[joy_insn]->intf = joysticks[joystick_type[joy_insn]].joystick;
|
||||
joystick_instance[joy_insn]->dat = joystick_instance[joy_insn]->intf->init();
|
||||
}
|
||||
|
||||
dev->joystick = joystick_instance[0];
|
||||
dev->joystick = joystick_instance[joy_insn];
|
||||
|
||||
/* Map game port to the default address. Not applicable on PnP-only ports. */
|
||||
dev->len = (info->local >> 16) & 0xff;
|
||||
@@ -475,15 +478,18 @@ gameport_close(void *priv)
|
||||
{
|
||||
gameport_t *dev = (gameport_t *) priv;
|
||||
|
||||
// TODO: Later we'll actually support more than one gameport
|
||||
uint8_t joy_insn = 0;
|
||||
|
||||
/* If this port was active, remove it from the active ports list. */
|
||||
gameport_remap(dev, 0);
|
||||
|
||||
/* Free the global instance here, if it wasn't already freed. */
|
||||
if (joystick_instance[0]) {
|
||||
joystick_instance[0]->intf->close(joystick_instance[0]->dat);
|
||||
if (joystick_instance[joy_insn]) {
|
||||
joystick_instance[joy_insn]->intf->close(joystick_instance[joy_insn]->dat);
|
||||
|
||||
free(joystick_instance[0]);
|
||||
joystick_instance[0] = NULL;
|
||||
free(joystick_instance[joy_insn]);
|
||||
joystick_instance[joy_insn] = NULL;
|
||||
}
|
||||
|
||||
free(dev);
|
||||
@@ -793,7 +799,7 @@ gameport_available(int port)
|
||||
|
||||
/* UI */
|
||||
const device_t *
|
||||
gameport_getdevice(int port)
|
||||
gameport_get_device(int port)
|
||||
{
|
||||
return (gameports[port].device);
|
||||
}
|
||||
|
||||
@@ -38,9 +38,12 @@
|
||||
#define SCREEN_RES_Y 480
|
||||
|
||||
/* Filename and pathname info. */
|
||||
#define CONFIG_FILE "86box.cfg"
|
||||
#define NVR_PATH "nvr"
|
||||
#define SCREENSHOT_PATH "screenshots"
|
||||
#define CONFIG_FILE "86box.cfg"
|
||||
#define GLOBAL_CONFIG_FILE "86box_global.cfg"
|
||||
#define NVR_PATH "nvr"
|
||||
#define SCREENSHOT_PATH "screenshots"
|
||||
#define VMM_PATH "Virtual Machines"
|
||||
#define VMM_PATH_WINDOWS "86Box VMs"
|
||||
|
||||
/* Recently used images */
|
||||
#define MAX_PREV_IMAGES 10
|
||||
@@ -115,16 +118,21 @@ extern uint64_t instru_run_ms;
|
||||
#define window_y monitor_settings[0].mon_window_y
|
||||
#define window_w monitor_settings[0].mon_window_w
|
||||
#define window_h monitor_settings[0].mon_window_h
|
||||
extern int inhibit_multimedia_keys; /* (C) Inhibit multimedia keys on Windows. */
|
||||
extern int inhibit_multimedia_keys; /* (G) Inhibit multimedia keys on Windows. */
|
||||
extern int window_remember;
|
||||
extern int vid_resize; /* (C) allow resizing */
|
||||
extern int invert_display; /* (C) invert the display */
|
||||
extern int suppress_overscan; /* (C) suppress overscans */
|
||||
extern int lang_id; /* (C) language id */
|
||||
extern int lang_id; /* (G) language id */
|
||||
extern int scale; /* (C) screen scale factor */
|
||||
extern int dpi_scale; /* (C) DPI scaling of the emulated screen */
|
||||
extern int vid_api; /* (C) video renderer */
|
||||
extern int vid_cga_contrast; /* (C) video */
|
||||
extern int vid_cga_comp_brightness; /* (C) CGA composite brightness */
|
||||
extern int vid_cga_comp_sharpness; /* (C) CGA composite sharpness */
|
||||
extern int vid_cga_comp_hue; /* (C) CGA composite hue */
|
||||
extern int vid_cga_comp_saturation; /* (C) CGA composite saturation */
|
||||
extern int vid_cga_comp_contrast; /* (C) CGA composite saturation */
|
||||
extern int video_fullscreen; /* (C) video */
|
||||
extern int video_fullscreen_scale; /* (C) video */
|
||||
extern int enable_overscan; /* (C) video */
|
||||
@@ -154,11 +162,12 @@ extern int fpu_type; /* (C) fpu type */
|
||||
extern int fpu_softfloat; /* (C) fpu uses softfloat */
|
||||
extern int time_sync; /* (C) enable time sync */
|
||||
extern int hdd_format_type; /* (C) hard disk file format */
|
||||
extern int confirm_reset; /* (C) enable reset confirmation */
|
||||
extern int confirm_exit; /* (C) enable exit confirmation */
|
||||
extern int confirm_save; /* (C) enable save confirmation */
|
||||
extern int confirm_reset; /* (G) enable reset confirmation */
|
||||
extern int confirm_exit; /* (G) enable exit confirmation */
|
||||
extern int confirm_save; /* (G) enable save confirmation */
|
||||
extern int enable_discord; /* (C) enable Discord integration */
|
||||
extern int force_10ms; /* (C) force 10ms CPU frame interval */
|
||||
extern int jumpered_internal_ecp_dma; /* (C) Jumpered internal EPC DMA */
|
||||
extern int other_ide_present; /* IDE controllers from non-IDE cards are present */
|
||||
extern int other_scsi_present; /* SCSI controllers from non-SCSI cards are present */
|
||||
extern int is_pcjr; /* The current machine is PCjr. */
|
||||
@@ -169,7 +178,8 @@ extern int fixed_size_y;
|
||||
extern int sound_muted; /* (C) Is sound muted? */
|
||||
extern int do_auto_pause; /* (C) Auto-pause the emulator on focus loss */
|
||||
extern int auto_paused;
|
||||
extern double mouse_sensitivity; /* (C) Mouse sensitivity scale */
|
||||
extern int force_constant_mouse; /* (C) Force constant updating of the mouse */
|
||||
extern double mouse_sensitivity; /* (G) Mouse sensitivity scale */
|
||||
#ifdef _Atomic
|
||||
extern _Atomic double mouse_x_error; /* Mouse error accumulator - Y */
|
||||
extern _Atomic double mouse_y_error; /* Mouse error accumulator - Y */
|
||||
@@ -177,15 +187,20 @@ extern _Atomic double mouse_y_error; /* Mouse error accumulator - Y */
|
||||
extern int pit_mode; /* (C) force setting PIT mode */
|
||||
extern int fm_driver; /* (C) select FM sound driver */
|
||||
extern int hook_enabled; /* (C) Keyboard hook is enabled */
|
||||
extern int vmm_disabled; /* (G) disable built-in manager */
|
||||
extern char vmm_path_cfg[1024]; /* (G) VMs path (unless -E is used) */
|
||||
|
||||
extern char exe_path[2048]; /* path (dir) of executable */
|
||||
extern char usr_path[1024]; /* path (dir) of user data */
|
||||
extern char cfg_path[1024]; /* full path of config file */
|
||||
extern char exe_path[2048]; /* path (dir) of executable */
|
||||
extern char usr_path[1024]; /* path (dir) of user data */
|
||||
extern char cfg_path[1024]; /* full path of config file */
|
||||
extern char global_cfg_path[1024]; /* full path of global config file */
|
||||
extern int open_dir_usr_path; /* default file open dialog directory of usr_path */
|
||||
extern char uuid[MAX_UUID_LEN]; /* UUID or machine identifier */
|
||||
extern char vmm_path[1024]; /* VM Manager path to scan (temporary) */
|
||||
extern int vmm_enabled;
|
||||
extern int open_dir_usr_path; /* default file open dialog directory of usr_path */
|
||||
extern char uuid[MAX_UUID_LEN]; /* UUID or machine identifier */
|
||||
extern char vmm_path[1024]; /* VM Manager path to scan */
|
||||
extern int start_vmm; /* the current execution will start the manager */
|
||||
extern int portable_mode; /* we are running in portable mode
|
||||
(global dirs = exe path) */
|
||||
|
||||
#ifndef USE_NEW_DYNAREC
|
||||
extern FILE *stdlog; /* file to log output to */
|
||||
#endif
|
||||
@@ -213,6 +228,7 @@ extern void update_mouse_msg(void);
|
||||
#if 0
|
||||
extern void pc_reload(wchar_t *fn);
|
||||
#endif
|
||||
extern int pc_init_roms(void);
|
||||
extern int pc_init_modules(void);
|
||||
extern int pc_init(int argc, char *argv[]);
|
||||
extern void pc_close(void *threadid);
|
||||
|
||||
@@ -42,6 +42,8 @@ extern const device_t amd640_device;
|
||||
extern const device_t isa486c_device;
|
||||
|
||||
/* Compaq */
|
||||
extern const device_t compaq_device;
|
||||
|
||||
extern const device_t compaq_386_device;
|
||||
extern const device_t compaq_genoa_device;
|
||||
|
||||
@@ -64,6 +66,9 @@ extern const device_t cs4031_device;
|
||||
extern const device_t gc100_device;
|
||||
extern const device_t gc100a_device;
|
||||
|
||||
/* GRiDcase */
|
||||
extern const device_t grid1520_device;
|
||||
|
||||
/* Headland */
|
||||
extern const device_t headland_gc10x_device;
|
||||
extern const device_t headland_gc113_device;
|
||||
@@ -114,6 +119,10 @@ extern const device_t slc90e66_device;
|
||||
|
||||
extern const device_t ioapic_device;
|
||||
|
||||
/* VTech */
|
||||
extern const device_t laserxt_device;
|
||||
extern const device_t lxt3_device;
|
||||
|
||||
/* Olivetti */
|
||||
extern const device_t olivetti_eva_device;
|
||||
|
||||
@@ -126,6 +135,7 @@ extern const device_t opti481_device;
|
||||
extern const device_t opti493_device;
|
||||
extern const device_t opti495slc_device;
|
||||
extern const device_t opti495sx_device;
|
||||
extern const device_t opti496_device;
|
||||
extern const device_t opti498_device;
|
||||
extern const device_t opti499_device;
|
||||
extern const device_t opti601_device;
|
||||
@@ -138,6 +148,12 @@ extern const device_t opti895_device;
|
||||
extern const device_t opti5x7_device;
|
||||
extern const device_t opti5x7_pci_device;
|
||||
|
||||
/* Philips */
|
||||
extern const device_t philips_device;
|
||||
|
||||
/* Sanyo */
|
||||
extern const device_t sanyo_device;
|
||||
|
||||
/* SiS */
|
||||
extern const device_t rabbit_device;
|
||||
extern const device_t sis_85c401_device;
|
||||
@@ -212,4 +228,8 @@ extern const device_t nec_mate_unk_device;
|
||||
|
||||
extern const device_t phoenix_486_jumper_device;
|
||||
extern const device_t phoenix_486_jumper_pci_device;
|
||||
|
||||
extern const device_t radisys_config_device;
|
||||
|
||||
extern const device_t zenith_scratchpad_device;
|
||||
#endif /*EMU_CHIPSET_H*/
|
||||
|
||||
@@ -137,7 +137,9 @@ typedef struct config_t {
|
||||
} config_t;
|
||||
#endif
|
||||
|
||||
extern void config_load_global(void);
|
||||
extern void config_load(void);
|
||||
extern void config_save_global(void);
|
||||
extern void config_save(void);
|
||||
|
||||
#ifdef EMU_INI_H
|
||||
|
||||
@@ -119,7 +119,7 @@ extern "C" {
|
||||
|
||||
extern int gameport_available(int port);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *gameport_getdevice(int port);
|
||||
extern const device_t *gameport_get_device(int port);
|
||||
#endif
|
||||
extern int gameport_has_config(int port);
|
||||
extern const char *gameport_get_internal_name(int port);
|
||||
@@ -151,11 +151,11 @@ extern plat_joystick_state_t plat_joystick_state[MAX_PLAT_JOYSTICKS];
|
||||
extern joystick_state_t joystick_state[GAMEPORT_MAX][MAX_JOYSTICKS];
|
||||
extern int joysticks_present;
|
||||
|
||||
extern int joystick_type;
|
||||
extern int joystick_type[GAMEPORT_MAX];
|
||||
|
||||
extern void joystick_init(void);
|
||||
extern void joystick_close(void);
|
||||
extern void joystick_process(void);
|
||||
extern void joystick_process(uint8_t gp);
|
||||
|
||||
extern const char *joystick_get_name(int js);
|
||||
extern const char *joystick_get_internal_name(int js);
|
||||
@@ -168,7 +168,7 @@ extern const char *joystick_get_axis_name(int js, int id);
|
||||
extern const char *joystick_get_button_name(int js, int id);
|
||||
extern const char *joystick_get_pov_name(int js, int id);
|
||||
|
||||
extern void gameport_update_joystick_type(void);
|
||||
extern void gameport_update_joystick_type(uint8_t gp);
|
||||
extern void gameport_remap(void *priv, uint16_t address);
|
||||
extern void *gameport_add(const device_t *gameport_type);
|
||||
|
||||
|
||||
@@ -106,9 +106,10 @@ extern const device_t ide_qua_pnp_device;
|
||||
extern const device_t mcide_device;
|
||||
|
||||
extern const device_t xta_wdxt150_device; /* xta_wdxt150 */
|
||||
extern const device_t xta_wdxt150_pc3086_device; /* xta_wdxt150 (PC3086) */
|
||||
extern const device_t xta_hd20_device; /* EuroPC internal */
|
||||
extern const device_t xta_st50x_device; /* ST-50X */
|
||||
extern const device_t xta_st50x_pc5086_device; /* ST-50X (PC-5086) */
|
||||
extern const device_t xta_st50x_pc5086_device; /* ST-50X (PC5086) */
|
||||
|
||||
extern const device_t xtide_device; /* xtide_xt */
|
||||
extern const device_t xtide_at_device; /* xtide_at */
|
||||
|
||||
@@ -118,101 +118,42 @@ typedef struct scancode {
|
||||
const uint8_t brk[4];
|
||||
} scancode;
|
||||
|
||||
#define STATE_SHIFT_MASK 0x22
|
||||
#define STATE_RSHIFT 0x20
|
||||
#define STATE_LSHIFT 0x02
|
||||
#define STATE_SHIFT_MASK 0x22
|
||||
#define STATE_RSHIFT 0x20
|
||||
#define STATE_LSHIFT 0x02
|
||||
|
||||
#define FAKE_LSHIFT_ON 0x100
|
||||
#define FAKE_LSHIFT_OFF 0x101
|
||||
#define LSHIFT_ON 0x102
|
||||
#define LSHIFT_OFF 0x103
|
||||
#define RSHIFT_ON 0x104
|
||||
#define RSHIFT_OFF 0x105
|
||||
#define FAKE_LSHIFT_ON 0x100
|
||||
#define FAKE_LSHIFT_OFF 0x101
|
||||
#define LSHIFT_ON 0x102
|
||||
#define LSHIFT_OFF 0x103
|
||||
#define RSHIFT_ON 0x104
|
||||
#define RSHIFT_OFF 0x105
|
||||
|
||||
/* KBC #define's */
|
||||
/* IBM-style controllers */
|
||||
#define KBC_IBM_PC_XT 0x0000 /* IBM PC/XT */
|
||||
#define KBC_IBM_PCJR 0x0001 /* IBM PCjr */
|
||||
#define KBC_IBM_TYPE_1 0x0002 /* IBM AT / PS/2 Type 1 */
|
||||
#define KBC_IBM_TYPE_2 0x0003 /* IBM PS/2 Type 2 */
|
||||
#define KBC_AMI_ACCESS_METHODS 0x0004 /* Access Methods AMI */
|
||||
#define KBC_JU_JET 0x0005 /* Ju-Jet */
|
||||
/* OEM proprietary */
|
||||
#define KBC_TANDY 0x0011 /* Tandy 1000/1000HX */
|
||||
#define KBC_TANDY_SL2 0x0012 /* Tandy 1000SL2 */
|
||||
#define KBC_AMSTRAD 0x0013 /* Amstrad */
|
||||
#define KBC_OLIVETTI_XT 0x0014 /* Olivetti XT */
|
||||
#define KBC_OLIVETTI 0x0015 /* Olivetti AT */
|
||||
#define KBC_TOSHIBA 0x0016 /* Toshiba AT */
|
||||
#define KBC_COMPAQ 0x0017 /* Compaq */
|
||||
#define KBC_NCR 0x0018 /* NCR */
|
||||
#define KBC_QUADTEL 0x0019 /* Quadtel */
|
||||
#define KBC_SIEMENS 0x001A /* Siemens */
|
||||
/* Phoenix MultiKey/42 */
|
||||
#define PHOENIX_MK42_105 0x0521 /* Phoenix MultiKey/42 1.05 */
|
||||
#define PHOENIX_MK42_129 0x2921 /* Phoenix MultiKey/42 1.29 */
|
||||
#define PHOENIX_MK42_138 0x3821 /* Phoenix MultiKey/42 1.38 */
|
||||
#define PHOENIX_MK42_140 0x3821 /* Phoenix MultiKey/42 1.40 */
|
||||
#define PHOENIX_MKC42_214 0x1422 /* Phoenix MultiKey/C42 2.14 */
|
||||
#define PHOENIX_MK42I_416 0x1624 /* Phoenix MultiKey/42i 4.16 */
|
||||
#define PHOENIX_MK42I_419 0x1924 /* Phoenix MultiKey/42i 4.19 */
|
||||
/* AMI 0x3x */
|
||||
#define KBC_ACER_V30 0x0030 /* Acer (0xA1 returns nothing, 0xAF returns 0x00) */
|
||||
#define KBC_AMI_MEGAKEY_SUPER_IO 0x0035 /* AMI '5' MegaKey 1994 NSC (and SM(S)C?) */
|
||||
#define KBC_AMI_8 0x0038 /* AMI '8' */
|
||||
/* AMI 0x4x */
|
||||
#define KBC_AMI_B 0x0042 /* AMI 'B' */
|
||||
#define KBC_AMI_D 0x0044 /* AMI 'D' */
|
||||
#define KBC_AMI_E 0x0045 /* AMI 'E' */
|
||||
#define KBC_AMIKEY 0x0046 /* AMI 'F'/AMIKEY */
|
||||
#define KBC_AMIKEY_2 0x0048 /* AMI 'H'/AMIEY-2 */
|
||||
#define KBC_MR 0x004D /* MR 'M' - Temporary classification until we get a dump */
|
||||
/* AMI 0x5x */
|
||||
#define KBC_AMI_MEGAKEY_1993 0x0050 /* AMI 'P' MegaKey 1993 */
|
||||
#define KBC_AMI_MEGAKEY_1994 0x0052 /* AMI 'R' MegaKey 1994 - 0xA0 returns 1993 copyright */
|
||||
#define KBC_AMI_TRIGEM 0x005A /* TriGem AMI 'Z' (1990 AMI copyright) */
|
||||
/* AMI 0x6x */
|
||||
#define KBC_TANDON 0x0061 /* Tandon 'a' - Temporary classification until we get a dump */
|
||||
/* Holtek */
|
||||
#define KBC_HT_REGIONAL_6542 0x1046 /* Holtek 'F' (Regional 6542) */
|
||||
#define KBC_HT_HT6542B_BESTKEY 0x1048 /* Holtek 'H' (Holtek HT6542B, BestKey) */
|
||||
/* AMI 0x0x clone without command 0xA0 */
|
||||
#define KBC_UNK_00 0x2000 /* Unknown 0x00 */
|
||||
#define KBC_UNK_01 0x2001 /* Unknown 0x01 */
|
||||
/* AMI 0x3x clone without command 0xA0 */
|
||||
#define KBC_UNK_7 0x2037 /* Unknown '7' - Temporary classification until we get a dump */
|
||||
#define KBC_UNK_9 0x2037 /* Unknown '9' - Temporary classification until we get a dump */
|
||||
#define KBC_JETKEY_NO_VER 0x2038 /* No-version JetKey '8' */
|
||||
/* AMI 0x4x clone without command 0xA0 */
|
||||
#define KBC_UNK_A 0x2041 /* Unknown 'A' - Temporary classification until we get a dump */
|
||||
#define KBC_JETKEY_5_W83C42 0x2046 /* JetKey 5.0 'F' and Winbond W83C42 */
|
||||
#define KBC_UNK_G 0x2047 /* Unknown 'G' - Temporary classification until we get a dump */
|
||||
#define KBC_MB_300E_SIS 0x2048 /* MB-300E Non-VIA 'H' and SiS 5582/559x */
|
||||
#define KBC_UNK_L 0x204C /* Unknown 'L' - Temporary classification until we get a dump */
|
||||
/* AMI 0x0x clone with command 0xA0 (Get Copyright String) only returning 0x00 */
|
||||
#define KBC_VPC_2007 0x3000 /* Microsoft Virtual PC 2007 - everything returns 0x00 */
|
||||
/* AMI 0x4x clone with command 0xA0 (Get Copyright String) only returning 0x00 */
|
||||
#define KBC_ALI_M148X 0x3045 /* ALi M148x 'E'/'U' (0xA1 actually returns 'F' but BIOS shows 'E' or 'U') */
|
||||
#define KBC_LANCE_UTRON 0x3046 /* Lance LT38C41 'F', Utron */
|
||||
/* AMI 0x5x clone with command 0xA0 (Get Copyright String) only returning 0x00 */
|
||||
#define KBC_SARC_6042 0x3055 /* SARC 6042 'U' */
|
||||
/* Award and clones */
|
||||
#define KBC_AWARD 0x4200 /* Award (0xA1 returns 0x00) - Temporary classification until we get \
|
||||
the real 0xAF return */
|
||||
#define KBC_VIA_VT82C4XN 0x4246 /* VIA VT82C41N, VT82C4N (0xA1 returns 'F') */
|
||||
#define KBC_VIA_VT82C586A 0x4346 /* VIA VT82C586A (0xA1 returns 'F') */
|
||||
#define KBC_VIA_VT82C586B 0x4446 /* VIA VT82C586B (0xA1 returns 'F') */
|
||||
#define KBC_VIA_VT82C686B 0x4546 /* VIA VT82C686B (0xA1 returns 'F') */
|
||||
/* UMC */
|
||||
#define KBC_UMC_UM8886 0x5048 /* UMC UM8886 'H' */
|
||||
/* IBM-style controllers with inverted P1 video type bit polarity */
|
||||
#define KBC_IBM_TYPE_1_XI8088 0x8000 /* Xi8088: IBM Type 1 */
|
||||
/* AMI (this is the 0xA1 revision byte) with inverted P1 video type bit polarity */
|
||||
#define KBC_ACER_V30_INV 0x8030 /* Acer (0xA1 returns nothing, 0xAF returns 0x00) */
|
||||
/* Holtek with inverted P1 video type bit polarity */
|
||||
#define KBC_HT_HT6542B_XI8088 0x9048 /* Xi8088: Holtek 'H' (Holtek HT6542B, BestKey) */
|
||||
/* Award and clones with inverted P1 video type bit polarity */
|
||||
#define KBC_VIA_VT82C4XN_XI8088 0xC246 /* Xi8088: VIA VT82C41N, VT82C4N (0xA1 returns 'F') */
|
||||
#define KBC_VEN_GENERIC 0x00
|
||||
#define KBC_VEN_ACER 0x01
|
||||
#define KBC_VEN_ALI 0x02
|
||||
#define KBC_VEN_AMI 0x03
|
||||
#define KBC_VEN_AMI_TRIGEM 0x04
|
||||
#define KBC_VEN_AWARD 0x05
|
||||
#define KBC_VEN_CHIPS 0x06
|
||||
#define KBC_VEN_COMPAQ 0x07
|
||||
#define KBC_VEN_HOLTEK 0x08
|
||||
#define KBC_VEN_IBM 0x09
|
||||
#define KBC_VEN_NCR 0x0a
|
||||
#define KBC_VEN_OLIVETTI 0x0b
|
||||
#define KBC_VEN_QUADTEL 0x0c
|
||||
#define KBC_VEN_PHOENIX 0x0d
|
||||
#define KBC_VEN_SIEMENS 0x0e
|
||||
#define KBC_VEN_TOSHIBA 0x0f
|
||||
#define KBC_VEN_VIA 0x10
|
||||
#define KBC_VEN_UMC 0x11
|
||||
#define KBC_VEN_SIS 0x12
|
||||
#define KBC_VEN_MASK 0x1f
|
||||
|
||||
#define KBC_FLAG_IS_ASIC 0x80000000
|
||||
#define KBC_FLAG_IS_CLONE 0x40000000
|
||||
#define KBC_FLAG_IS_GREEN 0x20000000
|
||||
#define KBC_FLAG_IS_TYPE2 0x10000000
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -256,36 +197,8 @@ extern const device_t kbc_xt_zenith_device;
|
||||
extern const device_t kbc_xt_hyundai_device;
|
||||
extern const device_t kbc_xt_fe2010_device;
|
||||
extern const device_t kbc_xtclone_device;
|
||||
|
||||
extern const device_t kbc_at_device;
|
||||
extern const device_t kbc_at_ami_device;
|
||||
extern const device_t kbc_at_compaq_device;
|
||||
extern const device_t kbc_at_phoenix_device;
|
||||
extern const device_t kbc_at_ncr_device;
|
||||
extern const device_t kbc_at_olivetti_device;
|
||||
extern const device_t kbc_at_siemens_device;
|
||||
extern const device_t kbc_at_tg_ami_device;
|
||||
extern const device_t kbc_at_toshiba_device;
|
||||
extern const device_t kbc_ps2_device;
|
||||
extern const device_t kbc_ps2_ps1_device;
|
||||
extern const device_t kbc_ps2_ps1_pci_device;
|
||||
extern const device_t kbc_ps2_xi8088_device;
|
||||
extern const device_t kbc_ps2_ami_device;
|
||||
extern const device_t kbc_ps2_compaq_device;
|
||||
extern const device_t kbc_ps2_holtek_device;
|
||||
extern const device_t kbc_ps2_mca_1_device;
|
||||
extern const device_t kbc_ps2_mca_2_device;
|
||||
extern const device_t kbc_ps2_olivetti_device;
|
||||
extern const device_t kbc_ps2_phoenix_device;
|
||||
extern const device_t kbc_ps2_quadtel_device;
|
||||
extern const device_t kbc_ps2_tg_ami_device;
|
||||
extern const device_t kbc_ps2_tg_ami_green_device;
|
||||
extern const device_t kbc_ps2_pci_device;
|
||||
extern const device_t kbc_ps2_ami_pci_device;
|
||||
extern const device_t kbc_ps2_intel_ami_pci_device;
|
||||
extern const device_t kbc_ps2_acer_pci_device;
|
||||
extern const device_t kbc_ps2_ali_pci_device;
|
||||
extern const device_t kbc_ps2_phoenix_pci_device;
|
||||
extern const device_t kbc_ps2_tg_ami_pci_device;
|
||||
|
||||
extern const device_t keyboard_pc_xt_device;
|
||||
extern const device_t keyboard_at_device;
|
||||
|
||||
@@ -139,6 +139,7 @@ extern void lpt_set_cnfgb_readout(lpt_t *dev, const uint8_t cnfgb
|
||||
extern void lpt_port_setup(lpt_t *dev, uint16_t port);
|
||||
extern void lpt_port_irq(lpt_t *dev, uint8_t irq);
|
||||
extern void lpt_port_dma(lpt_t *dev, uint8_t dma);
|
||||
extern void lpt1_dma(const uint8_t dma);
|
||||
extern void lpt_port_remove(lpt_t *dev);
|
||||
extern void lpt1_remove_ams(lpt_t *dev);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -114,6 +114,7 @@ extern void mouse_subtract_w(int *delta_w, int min, int max, int inve
|
||||
extern void mouse_set_buttons_ex(int b);
|
||||
extern int mouse_get_buttons_ex(void);
|
||||
extern void mouse_set_sample_rate(double new_rate);
|
||||
extern void mouse_update_sample_rate(void);
|
||||
extern void mouse_set_buttons(int buttons);
|
||||
extern void mouse_get_abs_coords(double *x_abs, double *y_abs);
|
||||
extern void mouse_process(void);
|
||||
|
||||
@@ -146,6 +146,7 @@ extern void plat_get_exe_name(char *s, int size);
|
||||
extern void plat_get_global_config_dir(char *outbuf, size_t len);
|
||||
extern void plat_get_global_data_dir(char *outbuf, size_t len);
|
||||
extern void plat_get_temp_dir(char *outbuf, uint8_t len);
|
||||
extern void plat_get_vmm_dir(char *outbuf, size_t len);
|
||||
extern void plat_init_rom_paths(void);
|
||||
extern int plat_dir_check(char *path);
|
||||
extern int plat_dir_create(char *path);
|
||||
|
||||
@@ -28,6 +28,15 @@ extern const device_t f82c606_device;
|
||||
extern const device_t f82c710_device;
|
||||
extern const device_t f82c710_pc5086_device;
|
||||
|
||||
/* Commodore */
|
||||
extern const device_t cbm_io_device;
|
||||
|
||||
/* Dataworld 90C50 (COMBAT) */
|
||||
#define DW90C50_IDE 0x00001
|
||||
|
||||
extern const device_t dw90c50_device;
|
||||
|
||||
extern const device_t pc87310_device;
|
||||
/* SM(S)C */
|
||||
#define FDC37C651 0x00051
|
||||
#define FDC37C661 0x00061
|
||||
|
||||
@@ -67,8 +67,6 @@ typedef union {
|
||||
|
||||
typedef struct ibm8514_t {
|
||||
rom_t bios_rom;
|
||||
rom_t bios_rom2;
|
||||
mem_mapping_t bios_mapping;
|
||||
uint8_t *rom1;
|
||||
uint8_t *rom2;
|
||||
hwcursor8514_t hwcursor;
|
||||
@@ -107,6 +105,8 @@ typedef struct ibm8514_t {
|
||||
uint64_t dispofftime;
|
||||
|
||||
struct {
|
||||
uint16_t scratch0;
|
||||
uint16_t scratch1;
|
||||
uint16_t subsys_cntl;
|
||||
uint16_t setup_md;
|
||||
uint16_t advfunc_cntl;
|
||||
@@ -253,6 +253,7 @@ typedef struct ibm8514_t {
|
||||
int vdisp;
|
||||
int vdisp2;
|
||||
int disp_cntl;
|
||||
int disp_cntl_2;
|
||||
int interlace;
|
||||
uint16_t subsys_cntl;
|
||||
uint8_t subsys_stat;
|
||||
@@ -277,6 +278,7 @@ typedef struct ibm8514_t {
|
||||
int _8514on;
|
||||
int _8514crt;
|
||||
PALETTE _8514pal;
|
||||
uint8_t ven_clock;
|
||||
|
||||
latch8514_t latch;
|
||||
|
||||
|
||||
@@ -109,6 +109,7 @@ typedef struct mach_t {
|
||||
uint16_t src_y;
|
||||
int16_t bres_count;
|
||||
uint16_t clock_sel;
|
||||
uint16_t clock_sel_mode;
|
||||
uint16_t crt_pitch;
|
||||
uint16_t ge_pitch;
|
||||
uint16_t src_pitch;
|
||||
|
||||
@@ -21,11 +21,13 @@
|
||||
#ifndef VIDEO_CGA_COMP_H
|
||||
#define VIDEO_CGA_COMP_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#define Bitu unsigned int
|
||||
#define bool uint8_t
|
||||
|
||||
void update_cga16_color(uint8_t cgamode);
|
||||
void cga_comp_init(int revision);
|
||||
void cga_comp_reload(int new_brightness, int new_saturation, int new_sharpness, int new_hue, int new_contrast);
|
||||
uint32_t *Composite_Process(uint8_t cgamode, uint8_t border, uint32_t blocks /*, bool doublewidth*/, uint32_t *TempLine);
|
||||
|
||||
#endif /*VIDEO_CGA_COMP_H*/
|
||||
|
||||
@@ -140,6 +140,7 @@ typedef struct svga_t {
|
||||
int vblankend;
|
||||
int render_line_offset;
|
||||
int start_retrace_latch;
|
||||
int vga_mode;
|
||||
|
||||
/*The three variables below allow us to implement memory maps like that seen on a 1MB Trio64 :
|
||||
0MB-1MB - VRAM
|
||||
@@ -347,6 +348,8 @@ extern void ati8514_out(uint16_t addr, uint8_t val, void *priv);
|
||||
extern uint8_t ati8514_in(uint16_t addr, void *priv);
|
||||
extern void ati8514_recalctimings(svga_t *svga);
|
||||
extern uint8_t ati8514_mca_read(int port, void *priv);
|
||||
extern uint8_t ati8514_rom_readb(uint32_t addr, void *priv);
|
||||
extern uint16_t ati8514_rom_readw(uint32_t addr, void *priv);
|
||||
extern void ati8514_mca_write(int port, uint8_t val, void *priv);
|
||||
extern void ati8514_pos_write(uint16_t port, uint8_t val, void *priv);
|
||||
extern void ati8514_init(svga_t *svga, void *ext8514, void *dev8514);
|
||||
@@ -497,9 +500,12 @@ extern const device_t bt485a_ramdac_device;
|
||||
extern const device_t gendac_ramdac_device;
|
||||
extern const device_t ibm_rgb528_ramdac_device;
|
||||
extern const device_t ics2494an_305_device;
|
||||
extern const device_t ati18810_device;
|
||||
extern const device_t ati18811_0_device;
|
||||
extern const device_t ati18811_1_device;
|
||||
extern const device_t ati18810_28800_device;
|
||||
extern const device_t ati18811_0_28800_device;
|
||||
extern const device_t ati18811_1_28800_device;
|
||||
extern const device_t ati18810_mach32_device;
|
||||
extern const device_t ati18811_0_mach32_device;
|
||||
extern const device_t ati18811_1_mach32_device;
|
||||
extern const device_t ics2595_device;
|
||||
extern const device_t icd2061_device;
|
||||
extern const device_t ics9161_device;
|
||||
|
||||
72
src/include/86box/vid_v6355.h
Normal file
72
src/include/86box/vid_v6355.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Emulation of the old and new IBM CGA graphics cards.
|
||||
*
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Connor Hyde / starfrost, <mario64crashed@gmail.com>
|
||||
*
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2025 starfrost (refactoring).
|
||||
*/
|
||||
|
||||
#ifndef VIDEO_V6355_H
|
||||
#define VIDEO_V6355_H
|
||||
|
||||
typedef struct v6355_t {
|
||||
mem_mapping_t mapping;
|
||||
|
||||
uint8_t cgastat;
|
||||
uint8_t cgamode;
|
||||
uint8_t cgacol;
|
||||
|
||||
uint8_t pad[3];
|
||||
uint8_t crtc[32];
|
||||
uint8_t v6355data[106];
|
||||
uint8_t charbuffer[256];
|
||||
|
||||
uint16_t ma;
|
||||
uint16_t maback;
|
||||
|
||||
/* The V6355 has its own set of registers, as well as the emulated MC6845 */
|
||||
int v6355reg;
|
||||
int crtcreg;
|
||||
int fontbase;
|
||||
int linepos;
|
||||
int displine;
|
||||
int sc;
|
||||
int vc;
|
||||
int cgadispon;
|
||||
int con;
|
||||
int coff;
|
||||
int cursoron;
|
||||
int cgablink;
|
||||
int vsynctime;
|
||||
int vadj;
|
||||
int oddeven;
|
||||
int display_type;
|
||||
int firstline;
|
||||
int lastline;
|
||||
int drawcursor;
|
||||
int revision;
|
||||
int rgb_type;
|
||||
int double_type;
|
||||
|
||||
uint32_t v6355pal[16];
|
||||
|
||||
uint64_t dispontime;
|
||||
uint64_t dispofftime;
|
||||
|
||||
pc_timer_t timer;
|
||||
|
||||
uint8_t * vram;
|
||||
} v6355_t;
|
||||
|
||||
#endif /*VIDEO_V6355_H*/
|
||||
@@ -139,6 +139,8 @@ typedef struct monitor_t {
|
||||
int mon_cga_palette_static; /* Whether it should not be freed by the API. */
|
||||
const video_timings_t *mon_vid_timings;
|
||||
int mon_vid_type;
|
||||
atomic_bool mon_interlace;
|
||||
atomic_bool mon_composite;
|
||||
struct blit_data_struct *mon_blit_data_ptr;
|
||||
} monitor_t;
|
||||
|
||||
@@ -401,11 +403,10 @@ extern const device_t gd5446_pci_device;
|
||||
extern const device_t gd5446_stb_pci_device;
|
||||
extern const device_t gd5480_pci_device;
|
||||
|
||||
|
||||
/* IBM CGA*/
|
||||
/* IBM CGA */
|
||||
extern const device_t cga_device;
|
||||
|
||||
/* pravetz CGA */
|
||||
/* Pravetz CGA */
|
||||
extern const device_t cga_pravetz_device;
|
||||
|
||||
/* Compaq CGA */
|
||||
@@ -575,7 +576,6 @@ extern const device_t s3_diamond_stealth_2000pro_pci_device;
|
||||
extern const device_t s3_virge_385_pci_device;
|
||||
extern const device_t s3_virge_357_pci_device;
|
||||
extern const device_t s3_virge_357_agp_device;
|
||||
extern const device_t s3_diamond_stealth_4000_pci_device;
|
||||
extern const device_t s3_diamond_stealth_4000_agp_device;
|
||||
extern const device_t s3_trio3d2x_pci_device;
|
||||
extern const device_t s3_trio3d2x_agp_device;
|
||||
@@ -634,6 +634,9 @@ extern const device_t nv3t_device_agp;
|
||||
/* Wyse 700 */
|
||||
extern const device_t wy700_device;
|
||||
|
||||
/* Yamaha V6355 */
|
||||
extern const device_t v6355d_device;
|
||||
|
||||
/* Tandy */
|
||||
extern const device_t tandy_1000_video_device;
|
||||
extern const device_t tandy_1000hx_video_device;
|
||||
|
||||
@@ -52,4 +52,4 @@ set_target_properties(86Box
|
||||
|
||||
#set(XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES")
|
||||
#set(XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "-")
|
||||
#set(XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${CMAKE_CURRENT_SOURCE_DIR}/mac/codesign/dev/app.entitlements)
|
||||
#set(XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${CMAKE_CURRENT_SOURCE_DIR}/mac/entitlements.plist)
|
||||
|
||||
10
src/mac/entitlements.plist
Normal file
10
src/mac/entitlements.plist
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -19,40 +19,41 @@ add_library(mch OBJECT
|
||||
machine.c
|
||||
machine_table.c
|
||||
m_xt.c
|
||||
m_xt_compaq.c
|
||||
m_xt_laserxt.c
|
||||
m_xt_philips.c
|
||||
m_xt_t1000.c
|
||||
m_xt_xi8088.c
|
||||
m_xt_zenith.c
|
||||
m_pcjr.c
|
||||
m_amstrad.c
|
||||
m_amstrad_pc5x86.c
|
||||
m_europc.c
|
||||
m_elt.c
|
||||
m_xt_olivetti.c
|
||||
m_tandy.c
|
||||
m_v86p.c
|
||||
m_at.c
|
||||
m_at_commodore.c
|
||||
m_at_grid.c
|
||||
m_at_t3100e.c
|
||||
m_ps1.c
|
||||
m_ps1_hdc.c
|
||||
m_ps2_isa.c
|
||||
m_ps2_mca.c
|
||||
m_at_compaq.c
|
||||
m_at_common.c
|
||||
m_at_286.c
|
||||
m_at_386sx.c
|
||||
m_at_m6117.c
|
||||
m_at_386dx.c
|
||||
m_at_486slc.c
|
||||
m_at_386dx_486.c
|
||||
m_at_socket1.c
|
||||
m_at_socket2.c
|
||||
m_at_socket3.c
|
||||
m_at_socket3_pci.c
|
||||
m_at_486_misc.c
|
||||
m_at_socket4.c
|
||||
m_at_socket4_5.c
|
||||
m_at_socket5.c
|
||||
m_at_socket7_3v.c
|
||||
m_at_socket7.c
|
||||
m_at_sockets7.c
|
||||
m_at_socket8.c
|
||||
m_at_slot1.c
|
||||
m_at_slot1_2.c
|
||||
m_at_slot1_socket370.c
|
||||
m_at_slot2.c
|
||||
m_at_socket370.c
|
||||
m_at_misc.c
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/sound.h>
|
||||
#include <86box/snd_speaker.h>
|
||||
#include <86box/video.h>
|
||||
@@ -2966,6 +2967,7 @@ machine_amstrad_init(const machine_t *model, int type)
|
||||
device_context(&vid_pc3086_device);
|
||||
ams->language = device_get_config_int("language");
|
||||
device_context_restore();
|
||||
device_add(&xta_wdxt150_pc3086_device);
|
||||
device_add(¶dise_pvga1a_pc3086_device);
|
||||
break;
|
||||
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Amstrad PC5086 and PC5286 emulation.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2025 Miran Grca.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the:
|
||||
*
|
||||
* Free Software Foundation, Inc.
|
||||
* 59 Temple Place - Suite 330
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <86box/86box.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/device.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/sio.h>
|
||||
|
||||
int
|
||||
machine_pc5086_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/pc5086/sys_rom.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_common_init(model);
|
||||
|
||||
device_add(&ct_82c100_device);
|
||||
device_add(&f82c710_pc5086_device);
|
||||
|
||||
device_add(&kbc_xt_device);
|
||||
|
||||
device_add(&amstrad_megapc_nvr_device); /* NVR that is initialized to all 0x00's. */
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1,410 +0,0 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Standard PC/AT implementation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Jasmine Iwanek, <jriwanek@gmail.com>
|
||||
*
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2008-2020 Sarah Walker.
|
||||
* Copyright 2025 Jasmine Iwanek.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the:
|
||||
*
|
||||
* Free Software Foundation, Inc.
|
||||
* 59 Temple Place - Suite 330
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/dma.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/gameport.h>
|
||||
#include <86box/ibm_5161.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/port_6x.h>
|
||||
#include <86box/machine.h>
|
||||
|
||||
void
|
||||
machine_at_common_init_ex(const machine_t *model, int type)
|
||||
{
|
||||
machine_common_init(model);
|
||||
|
||||
refresh_at_enable = 1;
|
||||
pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_at);
|
||||
pic2_init();
|
||||
dma16_init();
|
||||
|
||||
if (!(type & 4))
|
||||
device_add(&port_6x_device);
|
||||
type &= 3;
|
||||
|
||||
if (type == 1)
|
||||
device_add(&ibmat_nvr_device);
|
||||
else if (type == 0)
|
||||
device_add(&at_nvr_device);
|
||||
|
||||
standalone_gameport_type = &gameport_device;
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_common_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init_ex(model, 0);
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&kbc_at_device);
|
||||
}
|
||||
|
||||
static void
|
||||
machine_at_ibm_common_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init_ex(model, 1);
|
||||
|
||||
device_add(&kbc_at_device);
|
||||
|
||||
mem_remap_top(384);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_ps2_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&kbc_ps2_device);
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_common_ide_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_ibm_common_ide_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init_ex(model, 1);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_ide_init(const machine_t *model)
|
||||
{
|
||||
machine_at_init(model);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_ps2_ide_init(const machine_t *model)
|
||||
{
|
||||
machine_at_ps2_init(model);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
}
|
||||
|
||||
static const device_config_t ibmat_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
.name = "bios",
|
||||
.description = "BIOS Version",
|
||||
.type = CONFIG_BIOS,
|
||||
.default_string = "ibm5170_111585",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.bios = {
|
||||
{
|
||||
.name = "62X082x (11/15/85)",
|
||||
.internal_name = "ibm5170_111585",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 2,
|
||||
.local = 0,
|
||||
.size = 65536,
|
||||
.files = { "roms/machines/ibmat/BIOS_5170_15NOV85_U27.BIN", "roms/machines/ibmat/BIOS_5170_15NOV85_U47.BIN", "" }
|
||||
},
|
||||
{
|
||||
.name = "61X9266 (11/15/85) (Alt)",
|
||||
.internal_name = "ibm5170_111585_alt",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 2,
|
||||
.local = 0,
|
||||
.size = 65536,
|
||||
.files = { "roms/machines/ibmat/BIOS_5170_15NOV85_U27_61X9266.BIN", "roms/machines/ibmat/BIOS_5170_15NOV85_U47_61X9265.BIN", "" }
|
||||
},
|
||||
{
|
||||
.name = "648009x (06/10/85)",
|
||||
.internal_name = "ibm5170_061085",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 2,
|
||||
.local = 0,
|
||||
.size = 65536,
|
||||
.files = { "roms/machines/ibmat/BIOS_5170_10JUN85_U27.BIN", "roms/machines/ibmat/BIOS_5170_10JUN85_U47.BIN", "" }
|
||||
},
|
||||
{
|
||||
.name = "618102x (01/10/84)",
|
||||
.internal_name = "ibm5170_011084",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 2,
|
||||
.local = 0,
|
||||
.size = 65536,
|
||||
.files = { "roms/machines/ibmat/BIOS_5170_10JAN84_U27.BIN", "roms/machines/ibmat/BIOS_5170_10JAN84_U47.BIN", "" }
|
||||
},
|
||||
// The following are Diagnostic ROMs.
|
||||
{
|
||||
.name = "Supersoft Diagnostics",
|
||||
.internal_name = "diag_supersoft",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 2,
|
||||
.local = 2,
|
||||
.size = 65536,
|
||||
.files = { "roms/machines/diagnostic/5170_EVEN_LOW_U27_27256.bin", "roms/machines/diagnostic/5170_ODD_HIGH_U47_27256.bin", "" }
|
||||
},
|
||||
|
||||
{ .files_no = 0 }
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "enable_5161",
|
||||
.description = "IBM 5161 Expansion Unit",
|
||||
.type = CONFIG_BINARY,
|
||||
.default_int = 0
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const device_t ibmat_device = {
|
||||
.name = "IBM AT",
|
||||
.internal_name = "ibmat_device",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = NULL,
|
||||
.close = NULL,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = ibmat_config
|
||||
};
|
||||
|
||||
int
|
||||
machine_at_ibm_init(const machine_t *model)
|
||||
{
|
||||
int ret = 0;
|
||||
uint8_t enable_5161;
|
||||
const char *fn[2];
|
||||
|
||||
/* No ROMs available. */
|
||||
if (!device_available(model->device))
|
||||
return ret;
|
||||
|
||||
device_context(model->device);
|
||||
enable_5161 = machine_get_config_int("enable_5161");
|
||||
fn[0] = device_get_bios_file(model->device, device_get_config_bios("bios"), 0);
|
||||
fn[1] = device_get_bios_file(model->device, device_get_config_bios("bios"), 1);
|
||||
ret = bios_load_interleaved(fn[0], fn[1], 0x000f0000, 65536, 0);
|
||||
device_context_restore();
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
if (enable_5161)
|
||||
device_add(&ibm_5161_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* IBM AT machines with custom BIOSes */
|
||||
int
|
||||
machine_at_ibmatquadtel_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/ibmatquadtel/BIOS_30MAR90_U27_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN",
|
||||
"roms/machines/ibmatquadtel/BIOS_30MAR90_U47_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ibmatami_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/ibmatami/BIOS_5170_30APR89_U27_AMI_27256.BIN",
|
||||
"roms/machines/ibmatami/BIOS_5170_30APR89_U47_AMI_27256.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ibmatpx_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Even.bin",
|
||||
"roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Odd.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const device_config_t ibmxt286_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
.name = "enable_5161",
|
||||
.description = "IBM 5161 Expansion Unit",
|
||||
.type = CONFIG_BINARY,
|
||||
.default_int = 0
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const device_t ibmxt286_device = {
|
||||
.name = "IBM XT Model 286",
|
||||
.internal_name = "ibmxt286_device",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = NULL,
|
||||
.close = NULL,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = ibmxt286_config
|
||||
};
|
||||
|
||||
int
|
||||
machine_at_ibmxt286_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
uint8_t enable_5161;
|
||||
|
||||
device_context(model->device);
|
||||
enable_5161 = machine_get_config_int("enable_5161");
|
||||
device_context_restore();
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/ibmxt286/bios_5162_21apr86_u34_78x7460_27256.bin",
|
||||
"roms/machines/ibmxt286/bios_5162_21apr86_u35_78x7461_27256.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
if (enable_5161)
|
||||
device_add(&ibm_5161_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_pb286_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/pb286/LB_V332P.BIN",
|
||||
"roms/machines/pb286/HB_V332P.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_siemens_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/siemens/286BIOS.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 1);
|
||||
|
||||
device_add(&kbc_at_siemens_device);
|
||||
|
||||
mem_remap_top(384);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/ibm_5161.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/port_6x.h>
|
||||
#define USE_SIO_DETECT
|
||||
@@ -40,10 +41,310 @@
|
||||
#include <86box/serial.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_cga.h>
|
||||
#include <86box/vid_cga_comp.h>
|
||||
#include <86box/flash.h>
|
||||
#include <86box/machine.h>
|
||||
|
||||
/* ISA */
|
||||
static const device_config_t ibmat_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
.name = "bios",
|
||||
.description = "BIOS Version",
|
||||
.type = CONFIG_BIOS,
|
||||
.default_string = "ibm5170_111585",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.bios = {
|
||||
{
|
||||
.name = "62X082x (11/15/85)",
|
||||
.internal_name = "ibm5170_111585",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 2,
|
||||
.local = 0,
|
||||
.size = 65536,
|
||||
.files = { "roms/machines/ibmat/BIOS_5170_15NOV85_U27.BIN", "roms/machines/ibmat/BIOS_5170_15NOV85_U47.BIN", "" }
|
||||
},
|
||||
{
|
||||
.name = "61X9266 (11/15/85) (Alt)",
|
||||
.internal_name = "ibm5170_111585_alt",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 2,
|
||||
.local = 0,
|
||||
.size = 65536,
|
||||
.files = { "roms/machines/ibmat/BIOS_5170_15NOV85_U27_61X9266.BIN", "roms/machines/ibmat/BIOS_5170_15NOV85_U47_61X9265.BIN", "" }
|
||||
},
|
||||
{
|
||||
.name = "648009x (06/10/85)",
|
||||
.internal_name = "ibm5170_061085",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 2,
|
||||
.local = 0,
|
||||
.size = 65536,
|
||||
.files = { "roms/machines/ibmat/BIOS_5170_10JUN85_U27.BIN", "roms/machines/ibmat/BIOS_5170_10JUN85_U47.BIN", "" }
|
||||
},
|
||||
{
|
||||
.name = "618102x (01/10/84)",
|
||||
.internal_name = "ibm5170_011084",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 2,
|
||||
.local = 0,
|
||||
.size = 65536,
|
||||
.files = { "roms/machines/ibmat/BIOS_5170_10JAN84_U27.BIN", "roms/machines/ibmat/BIOS_5170_10JAN84_U47.BIN", "" }
|
||||
},
|
||||
// The following are Diagnostic ROMs.
|
||||
{
|
||||
.name = "Supersoft Diagnostics",
|
||||
.internal_name = "diag_supersoft",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 2,
|
||||
.local = 2,
|
||||
.size = 65536,
|
||||
.files = { "roms/machines/diagnostic/5170_EVEN_LOW_U27_27256.bin", "roms/machines/diagnostic/5170_ODD_HIGH_U47_27256.bin", "" }
|
||||
},
|
||||
|
||||
{ .files_no = 0 }
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "enable_5161",
|
||||
.description = "IBM 5161 Expansion Unit",
|
||||
.type = CONFIG_BINARY,
|
||||
.default_int = 0
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const device_t ibmat_device = {
|
||||
.name = "IBM AT",
|
||||
.internal_name = "ibmat_device",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = NULL,
|
||||
.close = NULL,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = ibmat_config
|
||||
};
|
||||
|
||||
static void
|
||||
machine_at_ibm_common_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init_ex(model, 1);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
mem_remap_top(384);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ibmat_init(const machine_t *model)
|
||||
{
|
||||
int ret = 0;
|
||||
uint8_t enable_5161;
|
||||
const char *fn[2];
|
||||
|
||||
/* No ROMs available. */
|
||||
if (!device_available(model->device))
|
||||
return ret;
|
||||
|
||||
device_context(model->device);
|
||||
enable_5161 = machine_get_config_int("enable_5161");
|
||||
fn[0] = device_get_bios_file(model->device, device_get_config_bios("bios"), 0);
|
||||
fn[1] = device_get_bios_file(model->device, device_get_config_bios("bios"), 1);
|
||||
ret = bios_load_interleaved(fn[0], fn[1], 0x000f0000, 65536, 0);
|
||||
device_context_restore();
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
if (enable_5161)
|
||||
device_add(&ibm_5161_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const device_config_t ibmxt286_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
.name = "enable_5161",
|
||||
.description = "IBM 5161 Expansion Unit",
|
||||
.type = CONFIG_BINARY,
|
||||
.default_int = 0
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const device_t ibmxt286_device = {
|
||||
.name = "IBM XT Model 286",
|
||||
.internal_name = "ibmxt286_device",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = NULL,
|
||||
.close = NULL,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = ibmxt286_config
|
||||
};
|
||||
|
||||
int
|
||||
machine_at_ibmxt286_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
uint8_t enable_5161;
|
||||
|
||||
device_context(model->device);
|
||||
enable_5161 = machine_get_config_int("enable_5161");
|
||||
device_context_restore();
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/ibmxt286/bios_5162_21apr86_u34_78x7460_27256.bin",
|
||||
"roms/machines/ibmxt286/bios_5162_21apr86_u35_78x7461_27256.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
if (enable_5161)
|
||||
device_add(&ibm_5161_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ibmatami_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/ibmatami/BIOS_5170_30APR89_U27_AMI_27256.BIN",
|
||||
"roms/machines/ibmatami/BIOS_5170_30APR89_U47_AMI_27256.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_cmdpc_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/cmdpc30/commodore pc 30 iii even.bin",
|
||||
"roms/machines/cmdpc30/commodore pc 30 iii odd.bin",
|
||||
0x000f8000, 32768, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_init(model);
|
||||
|
||||
mem_remap_top(384);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add(&cbm_io_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_portableii_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleavedr("roms/machines/portableii/109740-001.rom",
|
||||
"roms/machines/portableii/109739-001.rom",
|
||||
0x000f8000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
video_reset(gfxcard[0]);
|
||||
|
||||
device_add(&compaq_device);
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_portableiii_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linearr("roms/machines/portableiii/K Combined.bin",
|
||||
0x000f8000, 65536, 0);
|
||||
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
video_reset(gfxcard[0]);
|
||||
|
||||
if (hdc_current[0] == HDC_INTERNAL)
|
||||
device_add(&ide_isa_device);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&compaq_plasma_device);
|
||||
|
||||
device_add(&compaq_device);
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_grid1520_init(const machine_t *model) {
|
||||
int ret = 0;
|
||||
|
||||
ret = bios_load_linear("roms/machines/grid1520/grid1520_891025.rom",
|
||||
0x000f8000, 0x8000, 0);
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_ide_init(model);
|
||||
mem_remap_top(384);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
// for now just select CGA with amber monitor
|
||||
//device_add(&cga_device);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add(&grid1520_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_mr286_init(const machine_t *model)
|
||||
{
|
||||
@@ -57,7 +358,7 @@ machine_at_mr286_init(const machine_t *model)
|
||||
return ret;
|
||||
|
||||
machine_at_common_ide_init(model);
|
||||
device_add(&kbc_at_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
@@ -65,6 +366,23 @@ machine_at_mr286_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
machine_ncr_p1_handler(void)
|
||||
{
|
||||
/* switch settings
|
||||
* bit 7: keyboard disable
|
||||
* bit 6: display type (0 color, 1 mono)
|
||||
* bit 5: power-on default speed (0 high, 1 low)
|
||||
* bit 4: sense RAM size (0 unsupported, 1 512k on system board)
|
||||
* bit 3: coprocessor detect
|
||||
* bit 2: unused
|
||||
* bit 1: high/auto speed
|
||||
* bit 0: dma mode
|
||||
*/
|
||||
/* (B0 or F0) | 0x04 | (display on bit 6) | (fpu on bit 3) */
|
||||
return (video_is_mda() ? 0x40 : 0x00) | (hasfpu ? 0x08 : 0x00) | 0x90;
|
||||
}
|
||||
|
||||
/*
|
||||
* Current bugs:
|
||||
* - ctrl-alt-del produces an 8042 error
|
||||
@@ -82,7 +400,7 @@ machine_at_pc8_init(const machine_t *model)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add(&kbc_at_ncr_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
@@ -110,7 +428,125 @@ machine_at_m290_init(const machine_t *model)
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add(&kbc_at_olivetti_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ibmatpx_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Even.bin",
|
||||
"roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Odd.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ibmatquadtel_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/ibmatquadtel/BIOS_30MAR90_U27_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN",
|
||||
"roms/machines/ibmatquadtel/BIOS_30MAR90_U47_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_pb286_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/pb286/LB_V332P.BIN",
|
||||
"roms/machines/pb286/HB_V332P.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_mbc17_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/mbc17/SAT200C_U45EVEN_FB3H2.bin",
|
||||
"roms/machines/mbc17/SAT200C_U44ODD_FB3J2.bin",
|
||||
0x000f8000, 32768, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_ide_init(model);
|
||||
device_add(&sanyo_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ax286_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/ax286/AM27C512@DIP28_even.BIN",
|
||||
"roms/machines/ax286/AM27C512@DIP28_odd.BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_ide_init(model);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_siemens_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/siemens/286BIOS.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 1);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
mem_remap_top(384);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -126,7 +562,7 @@ machine_at_ctat_common_init(const machine_t *model)
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add(&kbc_at_phoenix_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -159,7 +595,7 @@ machine_at_super286c_init(const machine_t *model)
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&kbc_at_ami_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
@@ -233,7 +669,7 @@ machine_at_quadt286_init(const machine_t *model)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add(&kbc_at_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
@@ -246,7 +682,7 @@ machine_at_quadt286_init(const machine_t *model)
|
||||
void
|
||||
machine_at_headland_common_init(const machine_t *model, int type)
|
||||
{
|
||||
device_add(&kbc_at_ami_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if ((type != 2) && (fdc_current[0] == FDC_INTERNAL))
|
||||
device_add(&fdc_at_device);
|
||||
@@ -299,7 +735,7 @@ machine_at_ataripc4_init(const machine_t *model)
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add(&kbc_at_ami_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -322,7 +758,7 @@ machine_at_neat_ami_init(const machine_t *model)
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add(&kbc_at_ami_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -352,7 +788,7 @@ machine_at_3302_init(const machine_t *model)
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(machine_get_vid_device(machine));
|
||||
|
||||
device_add(&kbc_at_ncr_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -369,7 +805,7 @@ machine_at_px286_init(const machine_t *model)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add(&kbc_at_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
@@ -379,23 +815,38 @@ machine_at_px286_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SCAMP */
|
||||
int
|
||||
machine_at_pc7286_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/pc7286/PC7286 BIOS (AM27C010@DIP32).BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&gd5401_onboard_device);
|
||||
|
||||
device_add_params(&dw90c50_device, (void *) DW90C50_IDE);
|
||||
device_add(&vl82c113_device); /* The keyboard controller is part of the VL82c113. */
|
||||
|
||||
device_add(&vlsi_scamp_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SCAT */
|
||||
static void
|
||||
machine_at_scat_init(const machine_t *model, int is_v4, int is_ami)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
if (machines[machine].bus_flags & MACHINE_BUS_PS2) {
|
||||
if (is_ami)
|
||||
device_add(&kbc_ps2_ami_device);
|
||||
else
|
||||
device_add(&kbc_ps2_device);
|
||||
} else {
|
||||
if (is_ami)
|
||||
device_add(&kbc_at_ami_device);
|
||||
else
|
||||
device_add(&kbc_at_device);
|
||||
}
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (is_v4)
|
||||
device_add(&scat_4_device);
|
||||
@@ -403,6 +854,30 @@ machine_at_scat_init(const machine_t *model, int is_v4, int is_ami)
|
||||
device_add(&scat_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_pc5286_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/pc5286/PC5286",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
/* Patch the checksum to avoid checksum error. */
|
||||
if (rom[0xffff] == 0x2c)
|
||||
rom[0xffff] = 0x2b;
|
||||
|
||||
machine_at_scat_init(model, 1, 0);
|
||||
|
||||
device_add(&f82c710_device);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_gw286ct_init(const machine_t *model)
|
||||
{
|
||||
@@ -414,10 +889,10 @@ machine_at_gw286ct_init(const machine_t *model)
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
device_add(&f82c710_device);
|
||||
|
||||
machine_at_scat_init(model, 1, 0);
|
||||
|
||||
device_add(&f82c710_device);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
|
||||
return ret;
|
||||
|
||||
395
src/machine/m_at_386dx.c
Normal file
395
src/machine/m_at_386dx.c
Normal file
@@ -0,0 +1,395 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Implementation of 386DX machines.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/timer.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/dma.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/gameport.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/sio.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/port_6x.h>
|
||||
#include <86box/port_92.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_cga.h>
|
||||
#include <86box/vid_cga_comp.h>
|
||||
#include <86box/flash.h>
|
||||
#include <86box/scsi_ncr53c8xx.h>
|
||||
#include <86box/hwm.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/sound.h>
|
||||
|
||||
/* ISA */
|
||||
uint8_t
|
||||
machine_compaq_p1_handler(void)
|
||||
{
|
||||
return machine_generic_p1_handler() | (hasfpu ? 0x00 : 0x04);
|
||||
}
|
||||
|
||||
static void
|
||||
machine_at_deskpro386_common_init(const machine_t *model)
|
||||
{
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
video_reset(gfxcard[0]);
|
||||
|
||||
device_add(&compaq_386_device);
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_deskpro386_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linearr("roms/machines/deskpro386/1986-09-04-HI.json.bin",
|
||||
0x000f8000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_deskpro386_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_deskpro386_05_1988_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linearr("roms/machines/deskpro386/1988-05-10.json.bin",
|
||||
0x000f8000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_deskpro386_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_portableiii386_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linearr("roms/machines/portableiii/P.2 Combined.bin",
|
||||
0x000f0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
video_reset(gfxcard[0]);
|
||||
|
||||
if (hdc_current[0] == HDC_INTERNAL)
|
||||
device_add(&ide_isa_device);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&compaq_plasma_device);
|
||||
|
||||
device_add(&compaq_386_device);
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_micronics386_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/micronics386/386-Micronics-09-00021-EVEN.BIN",
|
||||
"roms/machines/micronics386/386-Micronics-09-00021-ODD.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_init(model);
|
||||
|
||||
device_add(&port_92_device);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_micronics386px_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/micronics386/386-Micronics-09-00021-LO.BIN",
|
||||
"roms/machines/micronics386/386-Micronics-09-00021-HI.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_init(model);
|
||||
|
||||
device_add(&port_92_device);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* ACC 2168 */
|
||||
int
|
||||
machine_at_acc386_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/acc386/acc386.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&acc2168_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* C&T 386/AT */
|
||||
int
|
||||
machine_at_ecs386_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/ecs386/AMI BIOS for ECS-386_32 motherboard - L chip.bin",
|
||||
"roms/machines/ecs386/AMI BIOS for ECS-386_32 motherboard - H chip.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&cs8230_device);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_spc6000a_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/spc6000a/3c80.u27",
|
||||
"roms/machines/spc6000a/9f80.u26",
|
||||
0x000f8000, 32768, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 1);
|
||||
|
||||
device_add(&cs8230_device);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_tandy4000_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/tandy4000/BIOS Tandy 4000 v1.03.01.bin",
|
||||
0x000f8000, 32768, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&cs8230_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* ALi M1429 */
|
||||
int
|
||||
machine_at_ecs386v_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ecs386v/PANDA_386V.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&ali1429_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* OPTi 391 */
|
||||
int
|
||||
machine_at_dataexpert386wb_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/dataexpert386wb/st0386-wb-ver2-0-618f078c738cb397184464.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&opti391_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* OPTi 495SLC */
|
||||
int
|
||||
machine_at_opti495_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/award495/opt495s.awa",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&opti495slc_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SiS 310 */
|
||||
int
|
||||
machine_at_asus3863364k_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/asus3863364k/am27c512dip28-64b53c26be3d8160533563.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&rabbit_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_asus386_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/asus386/ASUS_ISA-386C_BIOS.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&rabbit_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -62,7 +62,7 @@ machine_at_pc916sx_init(const machine_t *model)
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&kbc_at_ncr_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
mem_remap_top(384);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
@@ -84,7 +84,7 @@ machine_at_quadt386sx_init(const machine_t *model)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add(&kbc_at_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
@@ -152,7 +152,7 @@ machine_at_pbl300sx_init(const machine_t *model)
|
||||
machine_at_common_init(model);
|
||||
device_add(&acc2036_device);
|
||||
|
||||
device_add(&kbc_ps2_phoenix_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&um866x_device, (void *) (UM82C862F | UM866X_IDE_PRI));
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
@@ -178,7 +178,8 @@ machine_at_arb1374_init(const machine_t *model)
|
||||
device_add(&ali1217_device);
|
||||
device_add(&ide_isa_device);
|
||||
device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0 | W83XX7_IDE_PRI));
|
||||
device_add(&kbc_ps2_ami_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -199,7 +200,8 @@ machine_at_sbc350a_init(const machine_t *model)
|
||||
device_add(&ali1217_device);
|
||||
device_add(&ide_isa_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI));
|
||||
device_add(&kbc_ps2_ami_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -224,7 +226,7 @@ machine_at_flytech386_init(const machine_t *model)
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&tvga8900d_device);
|
||||
|
||||
device_add(&kbc_at_ami_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -244,7 +246,8 @@ machine_at_325ax_init(const machine_t *model)
|
||||
|
||||
device_add(&ali1217_device);
|
||||
device_add(&fdc_at_device);
|
||||
device_add(&kbc_at_ami_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -264,7 +267,8 @@ machine_at_mr1217_init(const machine_t *model)
|
||||
|
||||
device_add(&ali1217_device);
|
||||
device_add(&fdc_at_device);
|
||||
device_add(&kbc_at_ami_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -284,6 +288,7 @@ machine_at_acer100t_init(const machine_t *model)
|
||||
machine_at_ps2_ide_init(model);
|
||||
|
||||
device_add(&ali1409_device);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&oti077_acer100t_device);
|
||||
|
||||
@@ -333,7 +338,7 @@ machine_at_adi386sx_init(const machine_t *model)
|
||||
device_add(&amstrad_megapc_nvr_device); /* NVR that is initialized to all 0x00's. */
|
||||
|
||||
device_add(&intel_82335_device);
|
||||
device_add(&kbc_at_ami_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
@@ -356,7 +361,7 @@ machine_at_shuttle386sx_init(const machine_t *model)
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&intel_82335_device);
|
||||
device_add(&kbc_at_ami_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
@@ -379,7 +384,7 @@ machine_at_cmdsl386sx16_init(const machine_t *model)
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&kbc_ps2_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
@@ -429,7 +434,7 @@ machine_at_if386sx_init(const machine_t *model)
|
||||
machine_at_common_init_ex(model, 2);
|
||||
device_add(&amstrad_megapc_nvr_device); /* NVR that is initialized to all 0x00's. */
|
||||
|
||||
device_add(&kbc_at_phoenix_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
device_add(&neat_sx_device);
|
||||
|
||||
@@ -447,6 +452,29 @@ machine_at_if386sx_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* OPTi 283 */
|
||||
int
|
||||
machine_at_svc386sxp1_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/svc386sxp1/svc-386sx-am27c512dip28-6468c04f09d89320349795.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&opti283_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* OPTi 291 */
|
||||
int
|
||||
machine_at_awardsx_init(const machine_t *model)
|
||||
@@ -501,10 +529,7 @@ machine_at_scamp_common_init(const machine_t *model, int is_ps2)
|
||||
{
|
||||
machine_at_common_ide_init(model);
|
||||
|
||||
if (is_ps2)
|
||||
device_add(&kbc_ps2_ami_device);
|
||||
else
|
||||
device_add(&kbc_at_ami_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
@@ -622,7 +647,7 @@ machine_at_scatsx_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&kbc_at_ami_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
@@ -664,7 +689,7 @@ machine_at_wd76c10_init(const machine_t *model)
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(¶dise_wd90c11_megapc_device);
|
||||
|
||||
device_add(&kbc_ps2_quadtel_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
device_add(&wd76c10_device);
|
||||
|
||||
|
||||
210
src/machine/m_at_486_misc.c
Normal file
210
src/machine/m_at_486_misc.c
Normal file
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Implementation of 486 Miscellaneous machines.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/timer.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/dma.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/gameport.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/sio.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/port_6x.h>
|
||||
#include <86box/port_92.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/flash.h>
|
||||
#include <86box/scsi_ncr53c8xx.h>
|
||||
#include <86box/hwm.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/sound.h>
|
||||
|
||||
/* STPC Client */
|
||||
int
|
||||
machine_at_itoxstar_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/itoxstar/STARA.ROM",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x1F, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI));
|
||||
device_add(&stpc_client_device);
|
||||
device_add(&sst_flash_29ee020_device);
|
||||
device_add(&w83781d_device); /* fans: Chassis, CPU, unused; temperatures: Chassis, CPU, unused */
|
||||
hwm_values.fans[2] = 0; /* unused */
|
||||
hwm_values.temperatures[2] = 0; /* unused */
|
||||
hwm_values.voltages[0] = 0; /* Vcore unused */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* STPC Consumer-II */
|
||||
int
|
||||
machine_at_arb1423c_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/arb1423c/A1423C.v12",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x1F, PCI_CARD_NORMAL, 1, 0, 0, 0);
|
||||
pci_register_slot(0x1E, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x1D, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI));
|
||||
device_add(&stpc_consumer2_device);
|
||||
device_add(&winbond_flash_w29c020_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_arb1479_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/arb1479/1479A.rom",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x1F, PCI_CARD_NORMAL, 1, 0, 0, 0);
|
||||
pci_register_slot(0x1E, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x1D, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI));
|
||||
device_add(&stpc_consumer2_device);
|
||||
device_add(&winbond_flash_w29c020_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_iach488_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/iach488/FH48800B.980",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add_params(&w83977_device, (void *) (W83977F | W83977_AMI));
|
||||
device_add(&stpc_consumer2_device);
|
||||
device_add(&sst_flash_29ee020_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* STPC Elite */
|
||||
int
|
||||
machine_at_pcm9340_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/pcm9340/9340v110.bin",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x1D, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x1E, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x1F, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
device_add_inst_params(&w83977_device, 1, (void *) (W83977F | W83977_AMI));
|
||||
device_add_inst_params(&w83977_device, 2, (void *) W83977F);
|
||||
device_add(&stpc_elite_device);
|
||||
device_add(&sst_flash_29ee020_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* STPC Atlas */
|
||||
int
|
||||
machine_at_pcm5330_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/pcm5330/5330_13b.bin",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0C, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0D, PCI_CARD_SOUTHBRIDGE_IDE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0E, PCI_CARD_SOUTHBRIDGE_USB, 1, 2, 3, 4);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
device_add(&stpc_serial_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977F | W83977_370 | W83977_AMI));
|
||||
device_add(&stpc_atlas_device);
|
||||
device_add(&sst_flash_29ee020_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
72
src/machine/m_at_486slc.c
Normal file
72
src/machine/m_at_486slc.c
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Implementation of 486SLC machines.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/timer.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/dma.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/gameport.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/sio.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/port_6x.h>
|
||||
#include <86box/port_92.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/flash.h>
|
||||
#include <86box/scsi_ncr53c8xx.h>
|
||||
#include <86box/hwm.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/sound.h>
|
||||
|
||||
/* OPTi 283 */
|
||||
int
|
||||
machine_at_rycleopardlx_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/rycleopardlx/486-RYC-Leopard-LX.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&opti283_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1,127 +0,0 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Implementation of the Commodore PC3 system.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
*
|
||||
* Copyright 2017-2018 Fred N. van Kempen.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the:
|
||||
*
|
||||
* Free Software Foundation, Inc.
|
||||
* 59 Temple Place - Suite 330
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/serial.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
static serial_t *cmd_uart;
|
||||
static lpt_t *cmd_lpt;
|
||||
|
||||
static void
|
||||
cbm_io_write(UNUSED(uint16_t port), uint8_t val, UNUSED(void *priv))
|
||||
{
|
||||
lpt_port_remove(cmd_lpt);
|
||||
|
||||
switch (val & 3) {
|
||||
case 1:
|
||||
lpt_port_setup(cmd_lpt, LPT_MDA_ADDR);
|
||||
break;
|
||||
case 2:
|
||||
lpt_port_setup(cmd_lpt, LPT1_ADDR);
|
||||
break;
|
||||
case 3:
|
||||
lpt_port_setup(cmd_lpt, LPT2_ADDR);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (val & 0xc) {
|
||||
case 0x4:
|
||||
serial_setup(cmd_uart, COM2_ADDR, COM2_IRQ);
|
||||
break;
|
||||
case 0x8:
|
||||
serial_setup(cmd_uart, COM1_ADDR, COM1_IRQ);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
cbm_io_init(void)
|
||||
{
|
||||
io_sethandler(0x0230, 0x0001, NULL, NULL, NULL, cbm_io_write, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_cmdpc_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/cmdpc30/commodore pc 30 iii even.bin",
|
||||
"roms/machines/cmdpc30/commodore pc 30 iii odd.bin",
|
||||
0x000f8000, 32768, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_init(model);
|
||||
|
||||
mem_remap_top(384);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
cmd_uart = device_add(&ns8250_device);
|
||||
serial_set_next_inst(1);
|
||||
|
||||
cmd_lpt = device_add(&lpt_port_device);
|
||||
lpt_set_next_inst(1);
|
||||
|
||||
cbm_io_init();
|
||||
|
||||
return ret;
|
||||
}
|
||||
139
src/machine/m_at_common.c
Normal file
139
src/machine/m_at_common.c
Normal file
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Implementation of the common initialization functions for
|
||||
* the PC/AT and copatible machines.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Jasmine Iwanek, <jriwanek@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
* Copyright 2008-2025 Sarah Walker.
|
||||
* Copyright 2025 Jasmine Iwanek.
|
||||
* Copyright 2017-2025 Fred N. van Kempen.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the:
|
||||
*
|
||||
* Free Software Foundation, Inc.
|
||||
* 59 Temple Place - Suite 330
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/dma.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/gameport.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/port_6x.h>
|
||||
#include <86box/machine.h>
|
||||
|
||||
void
|
||||
machine_at_common_init_ex(const machine_t *model, int type)
|
||||
{
|
||||
machine_common_init(model);
|
||||
|
||||
refresh_at_enable = 1;
|
||||
pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_at);
|
||||
pic2_init();
|
||||
dma16_init();
|
||||
|
||||
if (!(type & 4))
|
||||
device_add(&port_6x_device);
|
||||
type &= 3;
|
||||
|
||||
if (type == 1)
|
||||
device_add(&ibmat_nvr_device);
|
||||
else if (type == 0)
|
||||
device_add(&at_nvr_device);
|
||||
|
||||
standalone_gameport_type = &gameport_device;
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_common_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init_ex(model, 0);
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_ps2_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_common_ide_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_ibm_common_ide_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init_ex(model, 1);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_ide_init(const machine_t *model)
|
||||
{
|
||||
machine_at_init(model);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_ps2_ide_init(const machine_t *model)
|
||||
{
|
||||
machine_at_ps2_init(model);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,251 +0,0 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Emulation of various Compaq PC's.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* TheCollector1995, <mariogplayer@gmail.com>
|
||||
*
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include <math.h>
|
||||
#include <86box/86box.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/io.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_cga.h>
|
||||
#include <86box/vid_cga_comp.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
enum {
|
||||
COMPAQ_PORTABLEII = 0,
|
||||
COMPAQ_PORTABLEIII,
|
||||
COMPAQ_PORTABLEIII386,
|
||||
COMPAQ_DESKPRO386,
|
||||
COMPAQ_DESKPRO386_05_1988
|
||||
};
|
||||
|
||||
static int compaq_machine_type = 0;
|
||||
|
||||
/* Compaq Deskpro 386 remaps RAM from 0xA0000-0xFFFFF to 0xFA0000-0xFFFFFF */
|
||||
static mem_mapping_t ram_mapping;
|
||||
|
||||
|
||||
static uint8_t
|
||||
read_ram(uint32_t addr, UNUSED(void *priv))
|
||||
{
|
||||
addr = (addr & 0x7ffff) + 0x80000;
|
||||
addreadlookup(mem_logical_addr, addr);
|
||||
|
||||
return (ram[addr]);
|
||||
}
|
||||
|
||||
static uint16_t
|
||||
read_ramw(uint32_t addr, UNUSED(void *priv))
|
||||
{
|
||||
addr = (addr & 0x7ffff) + 0x80000;
|
||||
addreadlookup(mem_logical_addr, addr);
|
||||
|
||||
return (*(uint16_t *) &ram[addr]);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
read_raml(uint32_t addr, UNUSED(void *priv))
|
||||
{
|
||||
addr = (addr & 0x7ffff) + 0x80000;
|
||||
addreadlookup(mem_logical_addr, addr);
|
||||
|
||||
return (*(uint32_t *) &ram[addr]);
|
||||
}
|
||||
|
||||
static void
|
||||
write_ram(uint32_t addr, uint8_t val, UNUSED(void *priv))
|
||||
{
|
||||
addr = (addr & 0x7ffff) + 0x80000;
|
||||
addwritelookup(mem_logical_addr, addr);
|
||||
|
||||
mem_write_ramb_page(addr, val, &pages[addr >> 12]);
|
||||
}
|
||||
|
||||
static void
|
||||
write_ramw(uint32_t addr, uint16_t val, UNUSED(void *priv))
|
||||
{
|
||||
addr = (addr & 0x7ffff) + 0x80000;
|
||||
addwritelookup(mem_logical_addr, addr);
|
||||
|
||||
mem_write_ramw_page(addr, val, &pages[addr >> 12]);
|
||||
}
|
||||
|
||||
static void
|
||||
write_raml(uint32_t addr, uint32_t val, UNUSED(void *priv))
|
||||
{
|
||||
addr = (addr & 0x7ffff) + 0x80000;
|
||||
addwritelookup(mem_logical_addr, addr);
|
||||
|
||||
mem_write_raml_page(addr, val, &pages[addr >> 12]);
|
||||
}
|
||||
|
||||
static void
|
||||
machine_at_compaq_init(const machine_t *model, int type)
|
||||
{
|
||||
compaq_machine_type = type;
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
if (type < COMPAQ_PORTABLEIII386) {
|
||||
mem_remap_top(384);
|
||||
mem_mapping_add(&ram_mapping, 0xfa0000, 0x60000,
|
||||
read_ram, read_ramw, read_raml,
|
||||
write_ram, write_ramw, write_raml,
|
||||
0xa0000 + ram, MEM_MAPPING_INTERNAL, NULL);
|
||||
}
|
||||
|
||||
video_reset(gfxcard[0]);
|
||||
|
||||
switch (type) {
|
||||
case COMPAQ_PORTABLEII:
|
||||
machine_at_common_init(model);
|
||||
device_add(&kbc_at_compaq_device);
|
||||
break;
|
||||
|
||||
case COMPAQ_PORTABLEIII:
|
||||
if (hdc_current[0] == HDC_INTERNAL)
|
||||
device_add(&ide_isa_device);
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&compaq_plasma_device);
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add(&kbc_at_compaq_device);
|
||||
break;
|
||||
|
||||
case COMPAQ_PORTABLEIII386:
|
||||
if (hdc_current[0] == HDC_INTERNAL)
|
||||
device_add(&ide_isa_device);
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&compaq_plasma_device);
|
||||
device_add(&compaq_386_device);
|
||||
machine_at_common_init(model);
|
||||
device_add(&kbc_at_compaq_device);
|
||||
break;
|
||||
|
||||
case COMPAQ_DESKPRO386:
|
||||
case COMPAQ_DESKPRO386_05_1988:
|
||||
device_add(&compaq_386_device);
|
||||
machine_at_common_init(model);
|
||||
device_add(&kbc_at_compaq_device);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_portableii_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleavedr("roms/machines/portableii/109740-001.rom",
|
||||
"roms/machines/portableii/109739-001.rom",
|
||||
0x000f8000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_compaq_init(model, COMPAQ_PORTABLEII);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_portableiii_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linearr("roms/machines/portableiii/K Combined.bin",
|
||||
0x000f8000, 65536, 0);
|
||||
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_compaq_init(model, COMPAQ_PORTABLEIII);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_portableiii386_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linearr("roms/machines/portableiii/P.2 Combined.bin",
|
||||
0x000f0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_compaq_init(model, COMPAQ_PORTABLEIII386);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_deskpro386_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linearr("roms/machines/deskpro386/1986-09-04-HI.json.bin",
|
||||
0x000f8000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_compaq_init(model, COMPAQ_DESKPRO386);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_deskpro386_05_1988_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linearr("roms/machines/deskpro386/1988-05-10.json.bin",
|
||||
0x000f8000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_compaq_init(model, COMPAQ_DESKPRO386_05_1988);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -59,7 +59,7 @@ machine_at_pja511m_init(const machine_t *model)
|
||||
|
||||
device_add_inst_params(&fdc37c669_device, 1, (void *) FDC37C6XX_IDE_PRI);
|
||||
device_add_inst_params(&fdc37c669_device, 2, (void *) 0);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&ali6117d_device);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
@@ -80,7 +80,7 @@ machine_at_prox1332_init(const machine_t *model)
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add_params(&fdc37c669_device, (void *) FDC37C6XX_370);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&ali6117d_device);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
|
||||
@@ -8,11 +8,9 @@
|
||||
*
|
||||
* Implementation of Miscellaneous, Fake, Hypervisor machines.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -8,11 +8,9 @@
|
||||
*
|
||||
* Implementation of Slot 1 machines.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
@@ -40,6 +38,39 @@
|
||||
#include <86box/clock.h>
|
||||
#include <86box/snd_ac97.h>
|
||||
|
||||
/* ALi ALADDiN-PRO II */
|
||||
int
|
||||
machine_at_m729_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/m729/M729NEW.BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE_IDE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x03, PCI_CARD_SOUTHBRIDGE_PMU, 1, 2, 3, 4);
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE_USB, 1, 2, 3, 4);
|
||||
pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
device_add(&ali1621_device);
|
||||
device_add(&ali1543c_device); /* +0 */
|
||||
device_add(&winbond_flash_w29c010_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 512);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* i440FX */
|
||||
int
|
||||
machine_at_acerv62x_init(const machine_t *model)
|
||||
{
|
||||
@@ -109,7 +140,7 @@ machine_at_kn97_init(const machine_t *model)
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
device_add(&i440fx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add(&kbc_ps2_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0));
|
||||
device_add(&intel_flash_bxt_device);
|
||||
device_add(&lm78_device); /* fans: Chassis, CPU, Power; temperature: MB */
|
||||
@@ -119,6 +150,7 @@ machine_at_kn97_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* i440LX */
|
||||
int
|
||||
machine_at_lx6_init(const machine_t *model)
|
||||
{
|
||||
@@ -250,6 +282,7 @@ machine_at_ma30d_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* i440EX */
|
||||
int
|
||||
machine_at_p6i440e2_init(const machine_t *model)
|
||||
{
|
||||
@@ -281,109 +314,7 @@ machine_at_p6i440e2_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p2bls_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p2bls/1014ls.003",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x04, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x06, PCI_CARD_SCSI, 4, 1, 2, 3);
|
||||
pci_register_slot(0x07, PCI_CARD_NETWORK, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440bx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
#if 0
|
||||
device_add(ics9xxx_get(ICS9150_08)); /* setting proper speeds requires some interaction with the AS97127F ASIC */
|
||||
#endif
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0xF, 256);
|
||||
device_add(&w83781d_device); /* fans: Chassis, CPU, Power; temperatures: MB, unused, CPU */
|
||||
hwm_values.temperatures[1] = 0; /* unused */
|
||||
hwm_values.temperatures[2] -= 3; /* CPU offset */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_lgibmx7g_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/lgibmx7g/ms6119.331",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440bx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&winbond_flash_w29c020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p3bf_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p3bf/1008f.004",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x04, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440bx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(ics9xxx_get(ICS9250_08));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0xF, 256);
|
||||
device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */
|
||||
hwm_values.voltages[4] = hwm_values.voltages[5]; /* +12V reading not in line with other boards; appears to be close to the -12V reading */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* i440BX */
|
||||
int
|
||||
machine_at_bf6_init(const machine_t *model)
|
||||
{
|
||||
@@ -447,6 +378,79 @@ machine_at_bx6_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p2bls_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p2bls/1014ls.003",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x04, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x06, PCI_CARD_SCSI, 4, 1, 2, 3);
|
||||
pci_register_slot(0x07, PCI_CARD_NETWORK, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440bx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
#if 0
|
||||
device_add(ics9xxx_get(ICS9150_08)); /* setting proper speeds requires some interaction with the AS97127F ASIC */
|
||||
#endif
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0xF, 256);
|
||||
device_add(&w83781d_device); /* fans: Chassis, CPU, Power; temperatures: MB, unused, CPU */
|
||||
hwm_values.temperatures[1] = 0; /* unused */
|
||||
hwm_values.temperatures[2] -= 3; /* CPU offset */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p3bf_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p3bf/1008f.004",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x04, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440bx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(ics9xxx_get(ICS9250_08));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0xF, 256);
|
||||
device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */
|
||||
hwm_values.voltages[4] = hwm_values.voltages[5]; /* +12V reading not in line with other boards; appears to be close to the -12V reading */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ax6bc_init(const machine_t *model)
|
||||
{
|
||||
@@ -479,36 +483,6 @@ machine_at_ax6bc_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_atc6310bxii_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/atc6310bxii/6310s102.bin",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440bx_device);
|
||||
device_add(&slc90e66_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_686bx_init(const machine_t *model)
|
||||
{
|
||||
@@ -545,6 +519,36 @@ machine_at_686bx_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_lgibmx7g_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/lgibmx7g/ms6119.331",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440bx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&winbond_flash_w29c020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p6sba_init(const machine_t *model)
|
||||
{
|
||||
@@ -619,6 +623,131 @@ machine_at_s1846_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* i440ZX */
|
||||
int
|
||||
machine_at_vei8_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/vei8/QHW1001.BIN",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440zx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&fdc37m60x_device, (void *) (FDC37XXX2 | FDC37XXXX_370));
|
||||
device_add(ics9xxx_get(ICS9250_08));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x3, 512);
|
||||
device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
machine_at_ms6168_common_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x14, PCI_CARD_SOUND, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440zx_device);
|
||||
device_add(&piix4e_device);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&voodoo_3_2000_agp_onboard_8m_device);
|
||||
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&intel_flash_bxt_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x3, 256);
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL) {
|
||||
device_add(machine_get_snd_device(machine));
|
||||
device_add(&cs4297_device);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ms6168_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ms6168/w6168ims.130",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ms6168_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_borapro_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/borapro/MS6168V2.50",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ms6168_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SMSC VictoryBX-66 */
|
||||
int
|
||||
machine_at_atc6310bxii_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/atc6310bxii/6310s102.bin",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440bx_device);
|
||||
device_add(&slc90e66_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* VIA Apollo Pro */
|
||||
int
|
||||
machine_at_ficka6130_init(const machine_t *model)
|
||||
{
|
||||
@@ -643,13 +772,13 @@ machine_at_ficka6130_init(const machine_t *model)
|
||||
device_add(&via_apro_device);
|
||||
device_add(&via_vt82c596a_device);
|
||||
device_add_params(&w83877_device, (void *) (W83877TF | W83877_3F0));
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add(&sst_flash_29ee020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* VIA Apollo Pro 133 */
|
||||
int
|
||||
machine_at_p3v133_init(const machine_t *model)
|
||||
{
|
||||
@@ -686,6 +815,7 @@ machine_at_p3v133_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* VIA Apollo Pro 133A */
|
||||
int
|
||||
machine_at_p3v4x_init(const machine_t *model)
|
||||
{
|
||||
@@ -761,129 +891,7 @@ machine_at_gt694va_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_vei8_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/vei8/QHW1001.BIN",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440zx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&fdc37m60x_device, (void *) (FDC37XXX2 | FDC37XXXX_370));
|
||||
device_add(ics9xxx_get(ICS9250_08));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x3, 512);
|
||||
device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
machine_at_ms6168_common_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x14, PCI_CARD_SOUND, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440zx_device);
|
||||
device_add(&piix4e_device);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&voodoo_3_2000_agp_onboard_8m_device);
|
||||
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&intel_flash_bxt_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x3, 256);
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL) {
|
||||
device_add(machine_get_snd_device(machine));
|
||||
device_add(&cs4297_device);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_borapro_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/borapro/MS6168V2.50",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ms6168_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ms6168_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ms6168/w6168ims.130",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ms6168_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_m729_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/m729/M729NEW.BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE_IDE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x03, PCI_CARD_SOUTHBRIDGE_PMU, 1, 2, 3, 4);
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE_USB, 1, 2, 3, 4);
|
||||
pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
device_add(&ali1621_device);
|
||||
device_add(&ali1543c_device); /* +0 */
|
||||
device_add(&winbond_flash_w29c010_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 512);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SiS 5600 */
|
||||
int
|
||||
machine_at_p6f99_init(const machine_t *model)
|
||||
{
|
||||
@@ -907,7 +915,6 @@ machine_at_p6f99_init(const machine_t *model)
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x02, PCI_CARD_AGPBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&sis_5600_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add(&it8661f_device);
|
||||
device_add(&winbond_flash_w29c020_device);
|
||||
|
||||
@@ -940,7 +947,6 @@ machine_at_m747_init(const machine_t *model)
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x02, PCI_CARD_AGPBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&sis_5600_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add(&it8661f_device);
|
||||
device_add(&winbond_flash_w29c020_device);
|
||||
|
||||
|
||||
78
src/machine/m_at_slot1_2.c
Normal file
78
src/machine/m_at_slot1_2.c
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Implementation of Slot 1/2 machines.
|
||||
*
|
||||
* Slot 2 is quite a rare type of Slot. Used mostly by Pentium
|
||||
* II and III Xeons.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/flash.h>
|
||||
#include <86box/sio.h>
|
||||
#include <86box/hwm.h>
|
||||
#include <86box/spd.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/clock.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/machine.h>
|
||||
|
||||
/* i440GX */
|
||||
int
|
||||
machine_at_fw6400gx_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/fw6400gx/FWGX1211.ROM",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 4);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0);
|
||||
|
||||
device_add(&i440gx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&pc87309_device, (void *) (PCX730X_15C | PCX730X_AMI | PC87309_PC87309));
|
||||
device_add(ics9xxx_get(ICS9250_08));
|
||||
device_add(&sst_flash_29ee020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0xF, 512);
|
||||
device_add(&w83781d_device); /* fans: Chassis, Power, CPU; temperatures: System, CPU, unused */
|
||||
hwm_values.temperatures[3] = 0; /* unused */
|
||||
hwm_values.voltages[1] = 1500; /* Vtt */
|
||||
|
||||
return ret;
|
||||
}
|
||||
151
src/machine/m_at_slot1_socket370.c
Normal file
151
src/machine/m_at_slot1_socket370.c
Normal file
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Implementation of Slot 1/Socket 370 machines machines.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/flash.h>
|
||||
#include <86box/sio.h>
|
||||
#include <86box/hwm.h>
|
||||
#include <86box/spd.h>
|
||||
#include <86box/video.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/machine.h>
|
||||
#include <86box/clock.h>
|
||||
#include <86box/sound.h>
|
||||
#include <86box/snd_ac97.h>
|
||||
|
||||
/* i440BX */
|
||||
int
|
||||
machine_at_prosignias31x_bx_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/prosignias31x_bx/p6bxt-ap-092600.bin",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0d, PCI_CARD_SOUND, 4, 3, 2, 1); /* assumed */
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440bx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&winbond_flash_w29c020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
device_add(&gl520sm_2d_device); /* fans: CPU, Chassis; temperature: System */
|
||||
hwm_values.temperatures[0] += 2; /* System offset */
|
||||
hwm_values.temperatures[1] += 2; /* CPU offset */
|
||||
hwm_values.voltages[0] = 3300; /* Vcore and 3.3V are swapped */
|
||||
hwm_values.voltages[2] = hwm_get_vcore();
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL)
|
||||
device_add(&cmi8738_onboard_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_s1857_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/s1857/BX57200A.ROM",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0F, PCI_CARD_SOUND, 1, 0, 0, 0);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440bx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&intel_flash_bxt_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL) {
|
||||
device_add(machine_get_snd_device(machine));
|
||||
device_add(&cs4297_device); /* no good pictures, but the marking looks like CS4297 from a distance */
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* VIA Apollo Pro 133 */
|
||||
int
|
||||
machine_at_p6bat_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p6bat/bata+56.BIN",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0d, PCI_CARD_NORMAL, 4, 3, 2, 1);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&via_apro133_device);
|
||||
device_add(&via_vt82c596b_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL)
|
||||
device_add(&cmi8738_onboard_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -10,11 +10,9 @@
|
||||
*
|
||||
* Slot 2 is quite a rare type of Slot. Used mostly by Pentium II & III Xeons
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
@@ -40,6 +38,7 @@
|
||||
#include "cpu.h"
|
||||
#include <86box/machine.h>
|
||||
|
||||
/* i440GX */
|
||||
int
|
||||
machine_at_6gxu_init(const machine_t *model)
|
||||
{
|
||||
@@ -111,40 +110,3 @@ machine_at_s2dge_init(const machine_t *model)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_fw6400gx_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/fw6400gx/FWGX1211.ROM",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 4);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 0, 0);
|
||||
|
||||
device_add(&i440gx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&pc87309_device, (void *) (PCX730X_15C | PCX730X_AMI | PC87309_PC87309));
|
||||
device_add(ics9xxx_get(ICS9250_08));
|
||||
device_add(&sst_flash_29ee020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0xF, 512);
|
||||
device_add(&w83781d_device); /* fans: Chassis, Power, CPU; temperatures: System, CPU, unused */
|
||||
hwm_values.temperatures[3] = 0; /* unused */
|
||||
hwm_values.voltages[1] = 1500; /* Vtt */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
428
src/machine/m_at_socket1.c
Normal file
428
src/machine/m_at_socket1.c
Normal file
@@ -0,0 +1,428 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Implementation of Socket 168 and 1 machines.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/timer.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/dma.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/gameport.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/sio.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/port_6x.h>
|
||||
#include <86box/port_92.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/flash.h>
|
||||
#include <86box/scsi_ncr53c8xx.h>
|
||||
#include <86box/hwm.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/sound.h>
|
||||
|
||||
/* CS4031 */
|
||||
int
|
||||
machine_at_cs4031_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/cs4031/CHIPS_1.AMI",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&cs4031_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* OPTi 381 */
|
||||
int
|
||||
machine_at_ga486l_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ga486l/ga-486l_bios.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&opti381_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* OPTi 493 */
|
||||
int
|
||||
machine_at_svc486wb_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/svc486wb/svc486wb-AM27C512DIP28.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&opti493_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&ide_isa_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* OPTi 498 */
|
||||
int
|
||||
machine_at_mvi486_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/mvi486/MVI627.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&opti498_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
device_add_params(&pc873xx_device, (void *) (PCX73XX_IDE_PRI | PCX730X_398));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SiS 401 */
|
||||
static void
|
||||
machine_at_sis401_common_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&sis_85c401_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_isa486_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/isa486/ISA-486.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_sis401_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_sis401_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/sis401/SIS401-2.AMI",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_sis401_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SiS 460 */
|
||||
int
|
||||
machine_at_av4_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/av4/amibios_486dx_isa_bios_aa4025963.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&sis_85c460_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SiS 471 */
|
||||
int
|
||||
machine_at_advantage40xxd_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/advantage40xxd/AST101.09A",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add(&sis_85c471_device);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(machine_get_vid_device(machine));
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&um866x_device, (void *) (UM82C863F | UM866X_IDE_PRI));
|
||||
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Symphony SL42C460 */
|
||||
int
|
||||
machine_at_dtk461_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/dtk461/DTK.BIO",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add(&sl82c461_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* VIA VT82C495 */
|
||||
int
|
||||
machine_at_486vchd_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/486vchd/486-4386-VC-HD.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&via_vt82c49x_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* VLSI 82C480 */
|
||||
int
|
||||
machine_at_vect486vl_init(const machine_t *model) // has HDC problems
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/vect486vl/aa0500.ami",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(machine_get_vid_device(machine));
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
device_add(&vl82c480_device);
|
||||
|
||||
device_add(&vl82c113_device);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* VLSI 82C481 */
|
||||
int
|
||||
machine_at_d824_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/d824/fts-biosupdated824noflashbiosepromv320-320334-160.bin",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(machine_get_vid_device(machine));
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
device_add(&vl82c480_device);
|
||||
|
||||
/*
|
||||
Technically, it should be the VL82C114 but we do not have
|
||||
a proper datasheet of it that tells us the registers.
|
||||
*/
|
||||
device_add(&vl82c113_device);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C651);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* VLSI 82C486 */
|
||||
int
|
||||
machine_at_tuliptc38_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/tuliptc38/TULIP1.BIN",
|
||||
0x000f0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
device_add(&vl82c486_device);
|
||||
device_add(&tulip_jumper_device);
|
||||
|
||||
device_add(&vl82c113_device);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI));
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL) {
|
||||
bios_load_aux_linear("roms/machines/tuliptc38/VBIOS.BIN",
|
||||
0x000c0000, 32768, 0);
|
||||
|
||||
device_add(machine_get_vid_device(machine));
|
||||
} else for (uint16_t i = 0; i < 32768; i++)
|
||||
rom[i] = mem_readb_phys(0x000c0000 + i);
|
||||
|
||||
mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000);
|
||||
mem_mapping_set_exec(&bios_mapping, rom);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* ZyMOS Poach */
|
||||
int
|
||||
machine_at_isa486c_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/isa486c/asus-isa-486c-401a0-040591-657e2c17a0218417632602.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&isa486c_device);
|
||||
device_add(&port_92_key_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_genoa486_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/genoa486/AMI486.BIO",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&compaq_genoa_device);
|
||||
device_add(&port_92_key_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
379
src/machine/m_at_socket2.c
Normal file
379
src/machine/m_at_socket2.c
Normal file
@@ -0,0 +1,379 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Implementation of Socket 2 machines.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/timer.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/dma.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/gameport.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/sio.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/port_6x.h>
|
||||
#include <86box/port_92.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/flash.h>
|
||||
#include <86box/scsi_ncr53c8xx.h>
|
||||
#include <86box/hwm.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/sound.h>
|
||||
|
||||
/* ACC 2168 */
|
||||
int
|
||||
machine_at_pb410a_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/pb410a/pb410a.080337.4abf.u25.bin",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ibm_common_ide_init(model);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
device_add(&acc3221_device);
|
||||
device_add(&acc2168_device);
|
||||
|
||||
device_add(&phoenix_486_jumper_device);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(machine_get_vid_device(machine));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* ALi M1429G */
|
||||
int
|
||||
machine_at_acera1g_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/acera1g/4alo001.bin",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add(&ali1429g_device);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&gd5428_onboard_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
device_add_params(&pc87310_device, (void *) (PC87310_ALI));
|
||||
device_add(&ide_ali5213_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
machine_at_ali1429_common_init(const machine_t *model, int is_green)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
if (is_green)
|
||||
device_add(&ali1429g_device);
|
||||
else
|
||||
device_add(&ali1429_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_winbios1429_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/win486/ali1429g.amw",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ali1429_common_init(model, 1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ali1429_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ali1429/ami486.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_ali1429_common_init(model, 0);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* i420TX */
|
||||
int
|
||||
machine_at_pci400ca_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/pci400ca/486-AA008851.BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SCSI, 1, 2, 3, 4);
|
||||
pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
device_add(&sio_device);
|
||||
|
||||
device_add(&intel_flash_bxt_ami_device);
|
||||
|
||||
device_add(&i420tx_device);
|
||||
device_add(&ncr53c810_onboard_pci_device);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* IMS 8848 */
|
||||
int
|
||||
machine_at_g486ip_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/g486ip/G486IP.BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
device_add(&ami_1992_nvr_device);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 03 = Slot 1 */
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 05 = Slot 3 */
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
device_add(&ims8848_device);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* OPTi 499 */
|
||||
int
|
||||
machine_at_cobalt_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/cobalt/Cobalt_2.3.BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&opti499_device);
|
||||
device_add(&ide_opti611_vlb_device);
|
||||
device_add(&ide_isa_sec_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(machine_get_vid_device(machine));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_cougar_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/cougar/COUGRMRB.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add(&ide_vlb_device);
|
||||
|
||||
device_add(&opti499_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI));
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SiS 461 */
|
||||
int
|
||||
machine_at_decpclpv_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/decpclpv/bios.bin",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&sis_85c461_device);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(machine_get_vid_device(machine));
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
device_add(&ide_isa_2ch_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C663 | FDC37C6XX_IDE_PRI));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_dell466np_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/dell466np/466np.bin",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add(&sis_85c461_device);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(machine_get_vid_device(machine));
|
||||
else {
|
||||
for (uint16_t i = 0; i < 32768; i++)
|
||||
rom[i] = mem_readb_phys(0x000c0000 + i);
|
||||
}
|
||||
mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000);
|
||||
mem_mapping_set_exec(&bios_mapping, rom);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C661 | FDC37C6XX_IDE_PRI));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_valuepoint433_init(const machine_t *model) // hangs without the PS/2 mouse
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/valuepoint433/$IMAGEP.FLH",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_ide_init(model);
|
||||
device_add(&sis_85c461_device);
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&et4000w32_onboard_device);
|
||||
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C661 | FDC37C6XX_IDE_PRI));
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* VLSI 82C480 */
|
||||
int
|
||||
machine_at_martin_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/martin/NONSCSI.ROM",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
device_add(&vl82c480_device);
|
||||
device_add(&vl82c113_device);
|
||||
|
||||
device_add(&ide_vlb_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI));
|
||||
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
434
src/machine/m_at_socket3.c
Normal file
434
src/machine/m_at_socket3.c
Normal file
@@ -0,0 +1,434 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Implementation of Socket 3 machines.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/timer.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/dma.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/gameport.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/sio.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/port_6x.h>
|
||||
#include <86box/port_92.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/flash.h>
|
||||
#include <86box/scsi_ncr53c8xx.h>
|
||||
#include <86box/hwm.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/sound.h>
|
||||
|
||||
/* ALi M1429G */
|
||||
int
|
||||
machine_at_atc1762_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/atc1762/atc1762.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add(&ali1429g_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ecsal486_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ecsal486/ECS_AL486.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&ali1429g_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ap4100aa_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ap4100aa/M27C512DIP28.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
device_add(&ami_1994_nvr_device);
|
||||
device_add(&ali1429g_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
device_add(&ide_vlb_device);
|
||||
device_add_params(&um866x_device, (void *) UM8663BF);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Contaq 82C596A */
|
||||
int
|
||||
machine_at_4gpv5_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/4gpv5/4GPV5.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add(&contaq_82c596a_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Contaq 82C597 */
|
||||
int
|
||||
machine_at_greenb_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/greenb/4gpv31-ami-1993-8273517.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add(&contaq_82c597_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* OPTi 895 */
|
||||
static void
|
||||
machine_at_403tg_common_init(const machine_t *model, int nvr_hack)
|
||||
{
|
||||
if (nvr_hack) {
|
||||
machine_at_common_init_ex(model, 2);
|
||||
device_add(&ami_1994_nvr_device);
|
||||
} else
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&opti895_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_403tg_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/403tg/403TG.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_403tg_common_init(model, 0);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_403tg_d_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/403tg_d/J403TGRevD.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_403tg_common_init(model, 1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_403tg_d_mr_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/403tg_d/MRBiosOPT895.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_403tg_common_init(model, 0);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SiS 461 */
|
||||
int
|
||||
machine_at_acerv10_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/acerv10/ALL.BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&sis_85c461_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SiS 471 */
|
||||
static void
|
||||
machine_at_sis_85c471_common_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add(&sis_85c471_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_win471_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/win471/486-SiS_AC0360136.BIN",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_sis_85c471_common_init(model);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_vi15g_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/vi15g/vi15gr23.rom",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_sis_85c471_common_init(model);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_vli486sv2g_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/vli486sv2g/0402.001",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_sis_85c471_common_init(model);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_dvent4xx_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/dvent4xx/Venturis466_BIOS.BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add(&sis_85c471_device);
|
||||
device_add(&ide_cmd640_vlb_pri_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC));
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(machine_get_vid_device(machine));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_dtk486_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/dtk486/4siw005.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_sis_85c471_common_init(model);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ami471_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ami471/SIS471BE.AMI",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_sis_85c471_common_init(model);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_px471_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/px471/SIS471A1.PHO",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_sis_85c471_common_init(model);
|
||||
|
||||
device_add(&ide_vlb_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_tg486g_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/tg486g/tg486g.bin",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
device_add(&amstrad_megapc_nvr_device);
|
||||
device_add(&sis_85c471_device);
|
||||
device_add(&ide_isa_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI));
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (gfxcard[0] != VID_INTERNAL) {
|
||||
for (uint16_t i = 0; i < 32768; i++)
|
||||
rom[i] = mem_readb_phys(0x000c0000 + i);
|
||||
}
|
||||
mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000);
|
||||
mem_mapping_set_exec(&bios_mapping, rom);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -6,13 +6,11 @@
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Implementation of Socket 370(PGA370) machines.
|
||||
*
|
||||
*
|
||||
* Implementation of Socket 370 (PGA370) machines.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
@@ -40,6 +38,7 @@
|
||||
#include <86box/sound.h>
|
||||
#include <86box/snd_ac97.h>
|
||||
|
||||
/* i440LX */
|
||||
int
|
||||
machine_at_s370slm_init(const machine_t *model)
|
||||
{
|
||||
@@ -73,12 +72,13 @@ machine_at_s370slm_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* i440BX */
|
||||
int
|
||||
machine_at_prosignias31x_bx_init(const machine_t *model)
|
||||
machine_at_awo671r_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/prosignias31x_bx/p6bxt-ap-092600.bin",
|
||||
ret = bios_load_linear("roms/machines/awo671r/a08139c.bin",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
@@ -89,35 +89,30 @@ machine_at_prosignias31x_bx_init(const machine_t *model)
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0d, PCI_CARD_SOUND, 4, 3, 2, 1); /* assumed */
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0D, PCI_CARD_VIDEO, 2, 3, 4, 1);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440bx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&winbond_flash_w29c020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
device_add(&gl520sm_2d_device); /* fans: CPU, Chassis; temperature: System */
|
||||
hwm_values.temperatures[0] += 2; /* System offset */
|
||||
hwm_values.temperatures[1] += 2; /* CPU offset */
|
||||
hwm_values.voltages[0] = 3300; /* Vcore and 3.3V are swapped */
|
||||
hwm_values.voltages[2] = hwm_get_vcore();
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL)
|
||||
device_add(&cmi8738_onboard_device);
|
||||
device_add_inst_params(&w83977_device, 1, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add_inst_params(&w83977_device, 2, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(machine_get_vid_device(machine));
|
||||
spd_register(SPD_TYPE_SDRAM, 0x3, 256);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_s1857_init(const machine_t *model)
|
||||
machine_at_ambx133_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/s1857/BX57200A.ROM",
|
||||
ret = bios_load_linear("roms/machines/ambx133/mkbx2vg2.bin",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
@@ -128,91 +123,21 @@ machine_at_s1857_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(0x0F, PCI_CARD_SOUND, 1, 0, 0, 0);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440bx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&intel_flash_bxt_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL) {
|
||||
device_add(machine_get_snd_device(machine));
|
||||
device_add(&cs4297_device); /* no good pictures, but the marking looks like CS4297 from a distance */
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p6bap_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p6bap/bapa14a.BIN",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0d, PCI_CARD_NORMAL, 4, 3, 2, 1);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&via_apro133a_device); /* Rebranded as ET82C693A */
|
||||
device_add(&via_vt82c596b_device); /* Rebranded as ET82C696B */
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL)
|
||||
device_add(&cmi8738_onboard_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p6bat_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p6bat/bata+56.BIN",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0d, PCI_CARD_NORMAL, 4, 3, 2, 1);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&via_apro133_device);
|
||||
device_add(&via_vt82c596b_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL)
|
||||
device_add(&cmi8738_onboard_device);
|
||||
device_add(&gl518sm_2d_device); /* fans: CPUFAN1, CPUFAN2; temperature: CPU */
|
||||
hwm_values.fans[1] += 500;
|
||||
hwm_values.temperatures[0] += 4; /* CPU offset */
|
||||
hwm_values.voltages[1] = RESISTOR_DIVIDER(12000, 10, 2); /* different 12V divider in BIOS (10K/2K?) */
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -253,6 +178,39 @@ machine_at_cubx_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* i440ZX */
|
||||
int
|
||||
machine_at_63a1_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/63a1/63a-q3.bin",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); /* Integrated Sound? */
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440zx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&intel_flash_bxt_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x3, 256);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SMSC VictoryBX-66 */
|
||||
int
|
||||
machine_at_atc7020bxii_init(const machine_t *model)
|
||||
{
|
||||
@@ -308,7 +266,6 @@ machine_at_m773_init(const machine_t *model)
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440bx_device);
|
||||
device_add(&slc90e66_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add(&it8671f_device);
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x3, 256);
|
||||
@@ -324,106 +281,7 @@ machine_at_m773_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ambx133_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ambx133/mkbx2vg2.bin",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440bx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
device_add(&gl518sm_2d_device); /* fans: CPUFAN1, CPUFAN2; temperature: CPU */
|
||||
hwm_values.fans[1] += 500;
|
||||
hwm_values.temperatures[0] += 4; /* CPU offset */
|
||||
hwm_values.voltages[1] = RESISTOR_DIVIDER(12000, 10, 2); /* different 12V divider in BIOS (10K/2K?) */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_awo671r_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/awo671r/a08139c.bin",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0D, PCI_CARD_VIDEO, 2, 3, 4, 1);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440bx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_inst_params(&w83977_device, 1, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add_inst_params(&w83977_device, 2, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(machine_get_vid_device(machine));
|
||||
spd_register(SPD_TYPE_SDRAM, 0x3, 256);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_63a1_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/63a1/63a-q3.bin",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); /* Integrated Sound? */
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i440zx_device);
|
||||
device_add(&piix4e_device);
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&intel_flash_bxt_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x3, 256);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* VIA Apollo Pro */
|
||||
int
|
||||
machine_at_apas3_init(const machine_t *model)
|
||||
{
|
||||
@@ -448,13 +306,85 @@ machine_at_apas3_init(const machine_t *model)
|
||||
device_add(&via_apro_device);
|
||||
device_add(&via_vt82c586b_device);
|
||||
device_add_params(&fdc37c669_device, (void *) 0);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* VIA Apollo Pro 133 */
|
||||
int
|
||||
machine_at_p6bap_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p6bap/bapa14a.BIN",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0a, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0c, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0d, PCI_CARD_NORMAL, 4, 3, 2, 1);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&via_apro133a_device); /* Rebranded as ET82C693A */
|
||||
device_add(&via_vt82c596b_device); /* Rebranded as ET82C696B */
|
||||
device_add_params(&w83977_device, (void *) (W83977EF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL)
|
||||
device_add(&cmi8738_onboard_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* VIA Apollo Pro 133A */
|
||||
int
|
||||
machine_at_6via90ap_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/6via90ap/90ap10.bin",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&via_apro133a_device);
|
||||
device_add(&via_vt82c686b_device); /* fans: CPU1, CPU2; temperatures: CPU, System, unused */
|
||||
device_add(ics9xxx_get(ICS9250_18));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 1024);
|
||||
hwm_values.temperatures[0] += 2; /* CPU offset */
|
||||
hwm_values.temperatures[1] += 2; /* System offset */
|
||||
hwm_values.temperatures[2] = 0; /* unused */
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL)
|
||||
device_add(&alc100_device); /* ALC100P identified on similar Acorp boards (694TA, 6VIA90A1) */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_cuv4xls_init(const machine_t *model)
|
||||
{
|
||||
@@ -482,7 +412,6 @@ machine_at_cuv4xls_init(const machine_t *model)
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&via_apro133a_device);
|
||||
device_add(&via_vt82c686b_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add(ics9xxx_get(ICS9250_18));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0xF, 1024);
|
||||
@@ -494,44 +423,7 @@ machine_at_cuv4xls_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_6via90ap_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/6via90ap/90ap10.bin",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&via_apro133a_device);
|
||||
device_add(&via_vt82c686b_device); /* fans: CPU1, CPU2; temperatures: CPU, System, unused */
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add(ics9xxx_get(ICS9250_18));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 1024);
|
||||
hwm_values.temperatures[0] += 2; /* CPU offset */
|
||||
hwm_values.temperatures[1] += 2; /* System offset */
|
||||
hwm_values.temperatures[2] = 0; /* unused */
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL)
|
||||
device_add(&alc100_device); /* ALC100P identified on similar Acorp boards (694TA, 6VIA90A1) */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SiS 600 */
|
||||
int
|
||||
machine_at_7sbb_init(const machine_t *model)
|
||||
{
|
||||
@@ -553,7 +445,6 @@ machine_at_7sbb_init(const machine_t *model)
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x02, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&sis_5600_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add(&it8661f_device);
|
||||
device_add(&sst_flash_29ee020_device); /* assumed */
|
||||
|
||||
|
||||
1471
src/machine/m_at_socket3_pci.c
Normal file
1471
src/machine/m_at_socket3_pci.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -8,11 +8,9 @@
|
||||
*
|
||||
* Implementation of Socket 4 machines.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
@@ -41,41 +39,7 @@
|
||||
#include <86box/video.h>
|
||||
#include <86box/machine.h>
|
||||
|
||||
int
|
||||
machine_at_v12p_init(const machine_t *model)
|
||||
|
||||
{
|
||||
int ret = 0;
|
||||
const char* fn;
|
||||
|
||||
/* No ROMs available */
|
||||
if (!device_available(model->device))
|
||||
return ret;
|
||||
|
||||
device_context(model->device);
|
||||
fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0);
|
||||
ret = bios_load_linear(fn, 0x000e0000, 131072, 0);
|
||||
device_context_restore();
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SCSI, 1, 4, 3, 2);
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 2, 1, 4, 3);
|
||||
pci_register_slot(0x03, PCI_CARD_NORMAL, 3, 2, 1, 4);
|
||||
pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 0, 0, 0);
|
||||
pci_register_slot(0x05, PCI_CARD_NORMAL, 0, 0, 0, 0);
|
||||
device_add(&i430lx_device);
|
||||
device_add(&kbc_ps2_acer_pci_device);
|
||||
device_add(&sio_zb_device);
|
||||
device_add_params(&pc87310_device, (void *) (PC87310_ALI));
|
||||
device_add(&amd_am28f010_flash_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* i430LX */
|
||||
static const device_config_t v12p_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
@@ -112,49 +76,72 @@ const device_t v12p_device = {
|
||||
.config = v12p_config
|
||||
};
|
||||
|
||||
void
|
||||
machine_at_premiere_common_init(const machine_t *model, int pci_switch)
|
||||
int
|
||||
machine_at_v12p_init(const machine_t *model)
|
||||
{
|
||||
int ret = 0;
|
||||
const char* fn;
|
||||
|
||||
/* No ROMs available */
|
||||
if (!device_available(model->device))
|
||||
return ret;
|
||||
|
||||
device_context(model->device);
|
||||
fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0);
|
||||
ret = bios_load_linear(fn, 0x000e0000, 131072, 0);
|
||||
device_context_restore();
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&ide_isa_device);
|
||||
pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SCSI, 1, 4, 3, 2);
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 2, 1, 4, 3);
|
||||
pci_register_slot(0x03, PCI_CARD_NORMAL, 3, 2, 1, 4);
|
||||
pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 0, 0, 0);
|
||||
pci_register_slot(0x05, PCI_CARD_NORMAL, 0, 0, 0, 0);
|
||||
device_add(&i430lx_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&sio_zb_device);
|
||||
device_add_params(&pc87310_device, (void *) (PC87310_ALI));
|
||||
device_add(&amd_am28f010_flash_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ambradp60_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear_combined("roms/machines/ambradp60/1004AF1P.BIO",
|
||||
"roms/machines/ambradp60/1004AF1P.BI1",
|
||||
0x1c000, 128);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
device_add(&amstrad_megapc_nvr_device);
|
||||
device_add(&ide_pci_2ch_device);
|
||||
device_add(&ide_pci_device);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_2 | pci_switch);
|
||||
pci_init(PCI_CONFIG_TYPE_2);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4);
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4);
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&kbc_ps2_phoenix_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&sio_zb_device);
|
||||
device_add(&ide_rz1000_pci_single_channel_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC));
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI));
|
||||
device_add(&intel_flash_bxt_ami_device);
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_sp4_common_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
device_add(&i430lx_device);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
/* Excluded: 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F, 10, 11, 12, 13, 14 */
|
||||
pci_register_slot(0x0D, PCI_CARD_IDE, 1, 2, 3, 4);
|
||||
/* Excluded: 02, 03*, 04*, 05*, 06*, 07*, 08* */
|
||||
/* Slots: 09 (04), 0A (03), 0B (02), 0C (07) */
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
device_add(&sis_85c50x_device);
|
||||
device_add(&ide_cmd640_pci_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -178,7 +165,7 @@ machine_at_excaliburpci_init(const machine_t *model)
|
||||
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(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&ide_cmd640_pci_legacy_only_device);
|
||||
|
||||
device_add(&i430lx_device);
|
||||
@@ -208,11 +195,11 @@ machine_at_p5mp3_init(const machine_t *model)
|
||||
pci_register_slot(0x03, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 03 = Slot 3 */
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&fdc_at_device);
|
||||
device_add(&kbc_ps2_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
device_add(&i430lx_device);
|
||||
device_add(&sio_zb_device);
|
||||
device_add(&catalyst_flash_device);
|
||||
device_add(&i430lx_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -243,7 +230,7 @@ machine_at_dellxp60_init(const machine_t *model)
|
||||
pci_register_slot(0x06, PCI_CARD_NORMAL, 2, 1, 3, 4);
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&i430lx_device);
|
||||
device_add(&kbc_ps2_phoenix_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&sio_zb_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
device_add(&intel_flash_bxt_ami_device);
|
||||
@@ -274,7 +261,7 @@ machine_at_opti560l_init(const machine_t *model)
|
||||
pci_register_slot(0x08, PCI_CARD_NORMAL, 2, 1, 3, 4);
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&i430lx_device);
|
||||
device_add(&kbc_ps2_phoenix_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&sio_zb_device);
|
||||
device_add_params(&i82091aa_device, (void *) I82091AA_022);
|
||||
device_add(&intel_flash_bxt_ami_device);
|
||||
@@ -282,34 +269,40 @@ machine_at_opti560l_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_award_common_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 03 = Slot 1 */
|
||||
pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */
|
||||
pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 05 = Slot 3 */
|
||||
pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 06 = Slot 4 */
|
||||
pci_register_slot(0x07, PCI_CARD_SCSI, 1, 2, 3, 4); /* 07 = SCSI */
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&sio_zb_device);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ambradp60_init(const machine_t *model)
|
||||
machine_at_586is_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear_combined("roms/machines/ambradp60/1004AF1P.BIO",
|
||||
"roms/machines/ambradp60/1004AF1P.BI1",
|
||||
0x1c000, 128);
|
||||
ret = bios_load_linear("roms/machines/586is/IS.34",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
device_add(&amstrad_megapc_nvr_device);
|
||||
device_add(&ide_pci_device);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_2);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4);
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4);
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&kbc_ps2_phoenix_device);
|
||||
device_add(&sio_zb_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI));
|
||||
device_add(&intel_flash_bxt_ami_device);
|
||||
machine_at_award_common_init(model);
|
||||
|
||||
device_add(&i430lx_device);
|
||||
|
||||
@@ -339,7 +332,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(&kbc_ps2_ps1_pci_device);
|
||||
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));
|
||||
device_add(&intel_flash_bxt_ami_device);
|
||||
@@ -352,6 +345,28 @@ machine_at_valuepointp60_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_premiere_common_init(const machine_t *model, int pci_switch)
|
||||
{
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
device_add(&amstrad_megapc_nvr_device);
|
||||
device_add(&ide_pci_2ch_device);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_2 | pci_switch);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4);
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4);
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&sio_zb_device);
|
||||
device_add(&ide_rz1000_pci_single_channel_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC));
|
||||
device_add(&intel_flash_bxt_ami_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_revenge_init(const machine_t *model)
|
||||
{
|
||||
@@ -371,42 +386,32 @@ machine_at_revenge_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_award_common_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 03 = Slot 1 */
|
||||
pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 04 = Slot 2 */
|
||||
pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 05 = Slot 3 */
|
||||
pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 06 = Slot 4 */
|
||||
pci_register_slot(0x07, PCI_CARD_SCSI, 1, 2, 3, 4); /* 07 = SCSI */
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add(&kbc_at_ami_device);
|
||||
device_add(&sio_zb_device);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_586is_init(const machine_t *model)
|
||||
machine_at_m5pi_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/586is/IS.34",
|
||||
ret = bios_load_linear_inverted("roms/machines/m5pi/M5PI10R.BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_award_common_init(model);
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&i430lx_device);
|
||||
pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0f, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0c, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&i430lx_device);
|
||||
device_add(&sio_zb_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&ide_w83769f_pci_single_channel_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC));
|
||||
device_add(&intel_flash_bxt_ami_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -439,7 +444,7 @@ machine_at_pb520r_init(const machine_t *model)
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&gd5434_onboard_pci_device);
|
||||
|
||||
device_add(&kbc_ps2_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&sio_zb_device);
|
||||
device_add_params(&i82091aa_device, (void *) (I82091AA_022 | I82091AA_IDE_PRI));
|
||||
device_add(&intel_flash_bxt_ami_device);
|
||||
@@ -447,32 +452,24 @@ machine_at_pb520r_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* OPTi 597 */
|
||||
int
|
||||
machine_at_m5pi_init(const machine_t *model)
|
||||
machine_at_excalibur_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear_inverted("roms/machines/m5pi/M5PI10R.BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
ret = bios_load_linear_inverted("roms/machines/excalibur/S75P.ROM",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0f, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0c, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0b, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&i430lx_device);
|
||||
device_add(&sio_zb_device);
|
||||
device_add(&kbc_ps2_phoenix_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);
|
||||
device_add(&opti5x7_device);
|
||||
device_add(&ide_opti611_vlb_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C661);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -500,7 +497,7 @@ machine_at_globalyst330_p5_init(const machine_t *model)
|
||||
device_add(&opti5x7_pci_device);
|
||||
device_add(&opti822_device);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
device_add(&kbc_at_ami_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
@@ -508,27 +505,6 @@ machine_at_globalyst330_p5_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_excalibur_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear_inverted("roms/machines/excalibur/S75P.ROM",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&opti5x7_device);
|
||||
device_add(&ide_opti611_vlb_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C661);
|
||||
device_add(&kbc_ps2_intel_ami_pci_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p5vl_init(const machine_t *model)
|
||||
{
|
||||
@@ -544,7 +520,6 @@ machine_at_p5vl_init(const machine_t *model)
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 5, 6, 7, 8);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 9, 10, 11, 12);
|
||||
@@ -553,7 +528,7 @@ machine_at_p5vl_init(const machine_t *model)
|
||||
device_add(&opti5x7_pci_device);
|
||||
device_add(&opti822_device);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
device_add(&kbc_at_ami_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
@@ -561,6 +536,7 @@ machine_at_p5vl_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SiS 501 */
|
||||
int
|
||||
machine_at_excaliburpci2_init(const machine_t *model)
|
||||
{
|
||||
@@ -584,7 +560,7 @@ machine_at_excaliburpci2_init(const machine_t *model)
|
||||
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(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&ide_cmd640_pci_legacy_only_device);
|
||||
|
||||
device_add(&sis_85c50x_device);
|
||||
@@ -593,6 +569,29 @@ machine_at_excaliburpci2_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_sp4_common_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
/* Excluded: 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F, 10, 11, 12, 13, 14 */
|
||||
pci_register_slot(0x0D, PCI_CARD_IDE, 1, 2, 3, 4);
|
||||
/* Excluded: 02, 03*, 04*, 05*, 06*, 07*, 08* */
|
||||
/* Slots: 09 (04), 0A (03), 0B (02), 0C (07) */
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
device_add(&sis_85c50x_device);
|
||||
device_add(&ide_cmd640_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p5sp4_init(const machine_t *model)
|
||||
{
|
||||
@@ -608,3 +607,33 @@ machine_at_p5sp4_init(const machine_t *model)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ecs50x_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ecs50x/ECSSi5piaio.BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x02, PCI_CARD_IDE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
device_add(&sis_85c50x_device);
|
||||
device_add_params(&ide_cmd640_pci_device, (void *) 0x100000);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
72
src/machine/m_at_socket4_5.c
Normal file
72
src/machine/m_at_socket4_5.c
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Implementation of Socket 4/5 machines.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/flash.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/scsi_ncr53c8xx.h>
|
||||
#include <86box/sio.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/machine.h>
|
||||
|
||||
/* OPTi 597 */
|
||||
int
|
||||
machine_at_pci56001_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/pci56001/AWARD_ISA_PCI_586_non_PNP_SN_013870745_1994.BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 5, 6, 7, 8);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 9, 10, 11, 12);
|
||||
pci_register_slot(0x14, PCI_CARD_NORMAL, 13, 14, 15, 16);
|
||||
|
||||
device_add(&opti5x7_pci_device);
|
||||
device_add(&opti822_device);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -8,11 +8,9 @@
|
||||
*
|
||||
* Implementation of Socket 5 machines.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
@@ -42,13 +40,14 @@
|
||||
#include <86box/machine.h>
|
||||
#include <86box/sound.h>
|
||||
|
||||
/* i430NX */
|
||||
int
|
||||
machine_at_plato_init(const machine_t *model)
|
||||
machine_at_ambradp90_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear_combined("roms/machines/plato/1016ax1_.bio",
|
||||
"roms/machines/plato/1016ax1_.bi1",
|
||||
ret = bios_load_linear_combined("roms/machines/ambradp90/1002AX1P.BIO",
|
||||
"roms/machines/ambradp90/1002AX1P.BI1",
|
||||
0x1d000, 128);
|
||||
|
||||
if (bios_only || !ret)
|
||||
@@ -61,6 +60,36 @@ machine_at_plato_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p54np4_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p54np4/asus-642accdebcb75833703472.bin",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add(&ide_vlb_2ch_device);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_2 | PCI_CAN_SWITCH_TYPE);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 07 = Slot 1 */
|
||||
pci_register_slot(0x06, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 06 = Slot 2 */
|
||||
pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 05 = Slot 3 */
|
||||
pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 04 = Slot 4 */
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&i430nx_device);
|
||||
device_add(&sio_zb_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI));
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_dellplato_init(const machine_t *model)
|
||||
{
|
||||
@@ -81,36 +110,38 @@ machine_at_dellplato_init(const machine_t *model)
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_d842_init(const machine_t *model)
|
||||
|
||||
machine_at_586ip_init(const machine_t *model)
|
||||
{
|
||||
int ret = 0;
|
||||
const char* fn;
|
||||
int ret;
|
||||
|
||||
/* No ROMs available */
|
||||
if (!device_available(model->device))
|
||||
ret = bios_load_linear("roms/machines/586ip/IP.20",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
device_context(model->device);
|
||||
fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0);
|
||||
ret = bios_load_linear(fn, 0x000e0000, 131072, 0);
|
||||
device_context_restore();
|
||||
machine_at_award_common_init(model);
|
||||
|
||||
device_add(&i430nx_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_plato_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear_combined("roms/machines/plato/1016ax1_.bio",
|
||||
"roms/machines/plato/1016ax1_.bi1",
|
||||
0x1d000, 128);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_premiere_common_init(model, PCI_CAN_SWITCH_TYPE);
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&ide_pci_2ch_device);
|
||||
pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); /* Onboard */
|
||||
pci_register_slot(0x03, PCI_CARD_VIDEO, 4, 0, 0, 0); /* Onboard */
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); /* Slot 01 */
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); /* Slot 02 */
|
||||
|
||||
device_add(&kbc_ps2_pci_device);
|
||||
device_add(&i430nx_device);
|
||||
device_add(&sio_zb_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -160,72 +191,39 @@ const device_t d842_device = {
|
||||
};
|
||||
|
||||
int
|
||||
machine_at_ambradp90_init(const machine_t *model)
|
||||
machine_at_d842_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
int ret = 0;
|
||||
const char* fn;
|
||||
|
||||
ret = bios_load_linear_combined("roms/machines/ambradp90/1002AX1P.BIO",
|
||||
"roms/machines/ambradp90/1002AX1P.BI1",
|
||||
0x1d000, 128);
|
||||
|
||||
if (bios_only || !ret)
|
||||
/* No ROMs available */
|
||||
if (!device_available(model->device))
|
||||
return ret;
|
||||
|
||||
machine_at_premiere_common_init(model, PCI_CAN_SWITCH_TYPE);
|
||||
|
||||
device_add(&i430nx_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p54np4_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p54np4/asus-642accdebcb75833703472.bin",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
device_context(model->device);
|
||||
fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0);
|
||||
ret = bios_load_linear(fn, 0x000e0000, 131072, 0);
|
||||
device_context_restore();
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_add(&ide_vlb_2ch_device);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_2 | PCI_CAN_SWITCH_TYPE);
|
||||
device_add(&ide_pci_2ch_device);
|
||||
pci_init(PCI_CONFIG_TYPE_2 | PCI_NO_IRQ_STEERING);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_NORMAL, 1, 2, 3, 4); /* 07 = Slot 1 */
|
||||
pci_register_slot(0x06, PCI_CARD_NORMAL, 2, 3, 4, 1); /* 06 = Slot 2 */
|
||||
pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); /* 05 = Slot 3 */
|
||||
pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 1, 2, 3); /* 04 = Slot 4 */
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); /* Onboard */
|
||||
pci_register_slot(0x03, PCI_CARD_VIDEO, 4, 0, 0, 0); /* Onboard */
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); /* Slot 01 */
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); /* Slot 02 */
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&i430nx_device);
|
||||
device_add(&sio_zb_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI));
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_586ip_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/586ip/IP.20",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_award_common_init(model);
|
||||
|
||||
device_add(&i430nx_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_tek932_init(const machine_t *model)
|
||||
{
|
||||
@@ -246,7 +244,7 @@ machine_at_tek932_init(const machine_t *model)
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4);
|
||||
device_add(&kbc_ps2_intel_ami_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&i430nx_device);
|
||||
device_add(&sio_zb_device);
|
||||
device_add(&ide_vlb_device);
|
||||
@@ -256,6 +254,7 @@ machine_at_tek932_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* i430FX */
|
||||
int
|
||||
machine_at_acerv30_init(const machine_t *model)
|
||||
{
|
||||
@@ -278,7 +277,7 @@ machine_at_acerv30_init(const machine_t *model)
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_device);
|
||||
device_add(&kbc_ps2_acer_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
@@ -307,7 +306,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(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_device);
|
||||
device_add_params(&pc873xx_device, (void *) (PC87332 | PCX730X_398));
|
||||
@@ -343,7 +342,7 @@ machine_at_optiplexgxl_init(const machine_t *model)
|
||||
if (sound_card_current[0] == SOUND_INTERNAL)
|
||||
machine_snd = device_add(machine_get_snd_device(machine));
|
||||
|
||||
device_add(&kbc_ps2_phoenix_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_device);
|
||||
device_add_params(&pc873xx_device, (void *) (PC87332 | PCX730X_02E));
|
||||
@@ -386,6 +385,35 @@ machine_at_zappa_gpio_init(void)
|
||||
machine_set_gpio_default(gpio);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_pt2000_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ficpt2000/PT2000_v1.01.BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_device);
|
||||
device_add_params(&pc873xx_device, (void *) (PC87332 | PCX730X_398));
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_zappa_init(const machine_t *model)
|
||||
{
|
||||
@@ -434,7 +462,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(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
@@ -463,7 +491,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(&kbc_ps2_tg_ami_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
@@ -472,13 +500,13 @@ machine_at_hawk_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* OPTi 597 */
|
||||
int
|
||||
machine_at_pt2000_init(const machine_t *model)
|
||||
machine_at_ncselp90_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ficpt2000/PT2000_v1.01.BIN",
|
||||
ret = bios_load_linear("roms/machines/ncselp90/elegancep90.bin",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
@@ -487,40 +515,18 @@ machine_at_pt2000_init(const machine_t *model)
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
/* Should be VIA, but we do not emulate that yet. */
|
||||
device_add(&kbc_ps2_holtek_device);
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_device);
|
||||
device_add_params(&pc873xx_device, (void *) (PC87332 | PCX730X_398));
|
||||
device_add(&intel_flash_bxt_device);
|
||||
pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_pat54pv_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/pat54pv/PAT54PV.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&opti5x7_device);
|
||||
device_add(&kbc_ps2_intel_ami_pci_device);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
device_add(&opti5x7_pci_device);
|
||||
device_add(&opti822_device);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&ide_opti611_vlb_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC));
|
||||
device_add(&ide_vlb_2ch_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -547,7 +553,7 @@ machine_at_hot543_init(const machine_t *model)
|
||||
device_add(&opti5x7_pci_device);
|
||||
device_add(&opti822_device);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
device_add(&kbc_at_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
@@ -556,35 +562,30 @@ machine_at_hot543_init(const machine_t *model)
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ncselp90_init(const machine_t *model)
|
||||
machine_at_pat54pv_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ncselp90/elegancep90.bin",
|
||||
0x000e0000, 131072, 0);
|
||||
ret = bios_load_linear("roms/machines/pat54pv/PAT54PV.bin",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
device_add(&opti5x7_device);
|
||||
|
||||
device_add(&opti5x7_pci_device);
|
||||
device_add(&opti822_device);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add(&ide_opti611_vlb_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC));
|
||||
device_add(&ide_vlb_2ch_device);
|
||||
machine_force_ps2(1);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SiS 501 */
|
||||
int
|
||||
machine_at_p54sp4_init(const machine_t *model)
|
||||
{
|
||||
@@ -625,7 +626,7 @@ machine_at_sq588_init(const machine_t *model)
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
device_add(&sis_85c50x_device);
|
||||
device_add(&ide_cmd640_pci_single_channel_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC));
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
@@ -654,7 +655,7 @@ machine_at_p54sps_init(const machine_t *model)
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
device_add(&sis_85c50x_device);
|
||||
device_add(&ide_pci_2ch_device);
|
||||
device_add(&kbc_at_ami_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89));
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
@@ -685,13 +686,14 @@ machine_at_ms5109_init(const machine_t *model)
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
device_add(&sis_550x_85c503_device);
|
||||
device_add(&ide_w83769f_pci_device);
|
||||
device_add(&kbc_ps2_ami_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89));
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SiS 5501 */
|
||||
int
|
||||
machine_at_torino_init(const machine_t *model)
|
||||
{
|
||||
@@ -719,13 +721,14 @@ machine_at_torino_init(const machine_t *model)
|
||||
|
||||
device_add(&sis_550x_85c503_device);
|
||||
device_add(&ide_um8673f_device);
|
||||
device_add(&kbc_ps2_tg_ami_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
device_add(&intel_flash_bxt_ami_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* UMC 889x */
|
||||
int
|
||||
machine_at_hot539_init(const machine_t *model)
|
||||
{
|
||||
@@ -751,7 +754,7 @@ machine_at_hot539_init(const machine_t *model)
|
||||
device_add(&umc_8890_device);
|
||||
device_add(&umc_8886af_device);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&um866x_device, (void *) UM8663AF);
|
||||
|
||||
return ret;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,11 +8,9 @@
|
||||
*
|
||||
* Implementation of Socket 7 (Single Voltage) machines.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
@@ -43,6 +41,87 @@
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/sound.h>
|
||||
|
||||
/* i430FX */
|
||||
static void
|
||||
machine_at_p54tp4xe_common_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p54tp4xe_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p54tp4xe/t15i0302.awd",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_p54tp4xe_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p54tp4xe_mr_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p54tp4xe/TRITON.BIO",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_p54tp4xe_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_exp8551_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/exp8551/AMI20.BIO",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_device);
|
||||
device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89));
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
machine_at_thor_gpio_init(void)
|
||||
{
|
||||
@@ -112,86 +191,6 @@ machine_at_thor_common_init(const machine_t *model, int has_video)
|
||||
device_add(&intel_flash_bxt_ami_device);
|
||||
}
|
||||
|
||||
static void
|
||||
machine_at_p54tp4xe_common_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p54tp4xe_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p54tp4xe/t15i0302.awd",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_p54tp4xe_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p54tp4xe_mr_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p54tp4xe/TRITON.BIO",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_p54tp4xe_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_exp8551_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/exp8551/AMI20.BIO",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_device);
|
||||
device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89));
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_gw2katx_init(const machine_t *model)
|
||||
{
|
||||
@@ -209,6 +208,38 @@ machine_at_gw2katx_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_vectra54_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/vectra54/GT0724.22",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0D, PCI_CARD_VIDEO, 0, 0, 0, 0);
|
||||
pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x07, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x08, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&s3_phoenix_trio64_onboard_pci_device);
|
||||
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_device);
|
||||
device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_NORMAL));
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_thor_init(const machine_t *model)
|
||||
{
|
||||
@@ -388,7 +419,7 @@ machine_at_ms5119_init(const machine_t *model)
|
||||
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89));
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
@@ -481,7 +512,7 @@ machine_at_mb500n_init(const machine_t *model)
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&kbc_ps2_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_no_mirq_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
@@ -513,7 +544,7 @@ machine_at_fmb_init(const machine_t *model)
|
||||
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_no_mirq_device);
|
||||
device_add(&kbc_at_ami_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89));
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
@@ -521,11 +552,11 @@ machine_at_fmb_init(const machine_t *model)
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_acerm3a_init(const machine_t *model)
|
||||
machine_at_acerv35n_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/acerm3a/r01-b3.bin",
|
||||
ret = bios_load_linear("roms/machines/acerv35n/v35nd1s1.bin",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
@@ -536,15 +567,15 @@ machine_at_acerm3a_init(const machine_t *model)
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x10, PCI_CARD_VIDEO, 4, 0, 0, 0);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
device_add(&i430hx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_NORMAL));
|
||||
|
||||
/* The chip is not marked FR but the BIOS accesses register 06h of GPIO. */
|
||||
device_add_params(&fdc37c93x_device, (void *) (FDC37XXX5 | FDC37C93X_FR));
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
return ret;
|
||||
@@ -573,7 +604,7 @@ machine_at_ap53_init(const machine_t *model)
|
||||
pci_register_slot(0x06, PCI_CARD_VIDEO, 1, 2, 3, 4);
|
||||
device_add(&i430hx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&fdc37c669_device, (void *) 0);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
@@ -602,7 +633,7 @@ machine_at_8500tuc_init(const machine_t *model)
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&i430hx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&um8669f_device, (void *) 0);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
@@ -651,7 +682,6 @@ const device_t d943_device = {
|
||||
|
||||
int
|
||||
machine_at_d943_init(const machine_t *model)
|
||||
|
||||
{
|
||||
int ret = 0;
|
||||
const char* fn;
|
||||
@@ -677,7 +707,7 @@ machine_at_d943_init(const machine_t *model)
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 3, 2, 4);
|
||||
device_add(&i430hx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add(&kbc_ps2_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
spd_register(SPD_TYPE_EDO, 0x7, 256);
|
||||
@@ -691,6 +721,7 @@ machine_at_d943_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* i430VX */
|
||||
int
|
||||
machine_at_gw2kma_init(const machine_t *model)
|
||||
{
|
||||
@@ -727,6 +758,110 @@ machine_at_gw2kma_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SiS 5501 */
|
||||
static const device_config_t c5sbm2_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
.name = "bios",
|
||||
.description = "BIOS Version",
|
||||
.type = CONFIG_BIOS,
|
||||
.default_string = "5sbm2",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.bios = {
|
||||
{ .name = "AwardBIOS v4.50GP - Revision 07/17/1995", .internal_name = "5sbm2_v450gp", .bios_type = BIOS_NORMAL,
|
||||
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/5SBM0717.BIN", "" } },
|
||||
{ .name = "AwardBIOS v4.50PG - Revision 03/26/1996", .internal_name = "5sbm2", .bios_type = BIOS_NORMAL,
|
||||
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/5SBM0326.BIN", "" } },
|
||||
{ .name = "AwardBIOS v4.51PG - Revision 2.2 (by Unicore Software)", .internal_name = "5sbm2_451pg", .bios_type = BIOS_NORMAL,
|
||||
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/2A5ICC3A.BIN", "" } },
|
||||
{ .files_no = 0 }
|
||||
},
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const device_t c5sbm2_device = {
|
||||
.name = "Chaintech 5SBM/5SBM2 (M103)",
|
||||
.internal_name = "5sbm2_device",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = NULL,
|
||||
.close = NULL,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = c5sbm2_config
|
||||
};
|
||||
|
||||
int
|
||||
machine_at_5sbm2_init(const machine_t *model)
|
||||
{
|
||||
int ret = 0;
|
||||
const char* fn;
|
||||
|
||||
/* No ROMs available */
|
||||
if (!device_available(model->device))
|
||||
return ret;
|
||||
|
||||
device_context(model->device);
|
||||
fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0);
|
||||
ret = bios_load_linear(fn, 0x000e0000, 131072, 0);
|
||||
device_context_restore();
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&sis_550x_device);
|
||||
device_add_params(&um866x_device, (void *) UM8663AF);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SiS 5511 */
|
||||
int
|
||||
machine_at_amis727_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/amis727/S727p.rom",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0xFE, 0xFF, 0, 0);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
|
||||
device_add(&sis_5511_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const device_config_t ap5s_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
@@ -791,176 +926,13 @@ machine_at_ap5s_init(const machine_t *model)
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
|
||||
device_add(&sis_5511_device);
|
||||
device_add(&kbc_ps2_ami_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ms5124_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ms5124/AG77.ROM",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0xFE, 0xFF, 0, 0);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
|
||||
device_add(&sis_5511_device);
|
||||
device_add(&kbc_ps2_ami_device);
|
||||
device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_88));
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_amis727_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/amis727/S727p.rom",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0xFE, 0xFF, 0, 0);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
|
||||
device_add(&sis_5511_device);
|
||||
device_add(&kbc_ps2_intel_ami_pci_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_vectra54_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/vectra54/GT0724.22",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0D, PCI_CARD_VIDEO, 0, 0, 0, 0);
|
||||
pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x07, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x08, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&s3_phoenix_trio64_onboard_pci_device);
|
||||
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_device);
|
||||
device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_NORMAL));
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const device_config_t c5sbm2_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
.name = "bios",
|
||||
.description = "BIOS Version",
|
||||
.type = CONFIG_BIOS,
|
||||
.default_string = "5sbm2",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.bios = {
|
||||
{ .name = "AwardBIOS v4.50GP - Revision 07/17/1995", .internal_name = "5sbm2_v450gp", .bios_type = BIOS_NORMAL,
|
||||
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/5SBM0717.BIN", "" } },
|
||||
{ .name = "AwardBIOS v4.50PG - Revision 03/26/1996", .internal_name = "5sbm2", .bios_type = BIOS_NORMAL,
|
||||
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/5SBM0326.BIN", "" } },
|
||||
{ .name = "AwardBIOS v4.51PG - Revision 2.2 (by Unicore Software)", .internal_name = "5sbm2_451pg", .bios_type = BIOS_NORMAL,
|
||||
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/5sbm2/2A5ICC3A.BIN", "" } },
|
||||
{ .files_no = 0 }
|
||||
},
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const device_t c5sbm2_device = {
|
||||
.name = "Chaintech 5SBM/5SBM2 (M103)",
|
||||
.internal_name = "5sbm2_device",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = NULL,
|
||||
.close = NULL,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = c5sbm2_config
|
||||
};
|
||||
|
||||
int
|
||||
machine_at_5sbm2_init(const machine_t *model)
|
||||
{
|
||||
int ret = 0;
|
||||
const char* fn;
|
||||
|
||||
/* No ROMs available */
|
||||
if (!device_available(model->device))
|
||||
return ret;
|
||||
|
||||
device_context(model->device);
|
||||
fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0);
|
||||
ret = bios_load_linear(fn, 0x000e0000, 131072, 0);
|
||||
device_context_restore();
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
|
||||
device_add(&kbc_at_ami_device);
|
||||
device_add(&sis_550x_device);
|
||||
device_add_params(&um866x_device, (void *) UM8663AF);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_pc140_6260_init(const machine_t *model)
|
||||
{
|
||||
@@ -985,9 +957,38 @@ machine_at_pc140_6260_init(const machine_t *model)
|
||||
device_add(&gd5436_onboard_pci_device);
|
||||
|
||||
device_add(&sis_5511_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&fdc37c669_device, (void *) 0);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ms5124_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ms5124/AG77.ROM",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0xFE, 0xFF, 0, 0);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
|
||||
device_add(&sis_5511_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_88));
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -8,11 +8,9 @@
|
||||
*
|
||||
* Implementation of Socket 8 machines.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
@@ -40,6 +38,7 @@
|
||||
#include "cpu.h"
|
||||
#include <86box/machine.h>
|
||||
|
||||
/* i450KX */
|
||||
int
|
||||
machine_at_ap61_init(const machine_t *model)
|
||||
{
|
||||
@@ -65,10 +64,9 @@ machine_at_ap61_init(const machine_t *model)
|
||||
device_add(&i450kx_device);
|
||||
device_add(&sio_zb_device);
|
||||
device_add(&ide_cmd646_device);
|
||||
device_add(&kbc_ps2_acer_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
// device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -100,71 +98,86 @@ machine_at_p6rp4_init(const machine_t *model)
|
||||
device_add(&sio_zb_device);
|
||||
device_add(&ide_cmd646_device);
|
||||
/* Input port bit 2 must be 1 or CMOS Setup is disabled. */
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const device_config_t ficpo6000_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
.name = "bios",
|
||||
.description = "BIOS Version",
|
||||
.type = CONFIG_BIOS,
|
||||
.default_string = "405F03C",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 }, /*W1*/
|
||||
.bios = {
|
||||
{ .name = "PhoenixBIOS 4.05 - Revision 405F03C (CD-ROM Boot support)", .internal_name = "405F03C", .bios_type = BIOS_NORMAL,
|
||||
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/ficpo6000/405F03C.ROM", "" } },
|
||||
{ .name = "PhoenixBIOS 4.05 - Revision 405F05C (No CD-ROM Boot support)", .internal_name = "405F05C", .bios_type = BIOS_NORMAL,
|
||||
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/ficpo6000/405F05C.ROM", "" } },
|
||||
{ .files_no = 0 }
|
||||
},
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const device_t ficpo6000_device = {
|
||||
.name = "FIC PO-6000",
|
||||
.internal_name = "ficpo6000_device",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = NULL,
|
||||
.close = NULL,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = ficpo6000_config
|
||||
};
|
||||
|
||||
int
|
||||
machine_at_686nx_init(const machine_t *model)
|
||||
machine_at_ficpo6000_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
int ret = 0;
|
||||
const char* fn;
|
||||
|
||||
ret = bios_load_linear("roms/machines/686nx/6nx.140",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
/* No ROMs available */
|
||||
if (!device_available(model->device))
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
device_context(model->device);
|
||||
fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0);
|
||||
ret = bios_load_linear(fn, 0x000e0000, 131072, 0);
|
||||
device_context_restore();
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
device_add(&i440fx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add(&kbc_ps2_ami_pci_device); // Uses the AMIKEY keyboard controller
|
||||
device_add_params(&um8669f_device, (void *) 0);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_mb600n_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/mb600n/60915cs.rom",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
device_add(&i440fx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(&fdc37c669_device, (void *) 0);
|
||||
pci_register_slot(0x19, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x14, PCI_CARD_NORTHBRIDGE_SEC, 0, 0, 0, 0);
|
||||
pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0c, PCI_CARD_IDE, 0, 0, 0, 0);
|
||||
device_add(&i450kx_device);
|
||||
device_add(&sio_zb_device);
|
||||
device_add(&ide_cmd646_device);
|
||||
/* Input port bit 2 must be 1 or CMOS Setup is disabled. */
|
||||
device_add_params(&pc87306_device, (void *) PCX730X_PHOENIX_42);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* i440FX */
|
||||
int
|
||||
machine_at_acerv60n_init(const machine_t *model)
|
||||
{
|
||||
@@ -196,11 +209,27 @@ machine_at_acerv60n_init(const machine_t *model)
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_lgibmx61_init(const machine_t *model)
|
||||
machine_at_p65up5_cp6nd_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/lgibmx61/bios.rom",
|
||||
ret = bios_load_linear("roms/machines/p65up5/ND6I0218.AWD",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_p65up5_common_init(model, &i440fx_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_8600ttc_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/8600ttc/TTC0715B.ROM",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
@@ -211,51 +240,15 @@ machine_at_lgibmx61_init(const machine_t *model)
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
device_add(&i440fx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add(&kbc_ps2_ami_device);
|
||||
device_add_params(&w83877_device, (void *) (W83877F | W83877_250));
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_vs440fx_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear_combined2("roms/machines/vs440fx/1018CS1_.BIO",
|
||||
"roms/machines/vs440fx/1018CS1_.BI1",
|
||||
"roms/machines/vs440fx/1018CS1_.BI2",
|
||||
"roms/machines/vs440fx/1018CS1_.BI3",
|
||||
"roms/machines/vs440fx/1018CS1_.RCV",
|
||||
0x3a000, 128);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&i440fx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add_params(&pc87307_device, (void *) (PCX730X_AMI | PCX7307_PC87307));
|
||||
|
||||
device_add(&intel_flash_bxt_ami_device);
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL)
|
||||
device_add(machine_get_snd_device(machine));
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&fdc37c669_device, (void *) 0);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -332,6 +325,35 @@ machine_at_gw2kvenus_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_686nx_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/686nx/6nx.140",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
device_add(&i440fx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&um8669f_device, (void *) 0);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ap440fx_init(const machine_t *model)
|
||||
{
|
||||
@@ -371,11 +393,47 @@ machine_at_ap440fx_init(const machine_t *model)
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_8600ttc_init(const machine_t *model)
|
||||
machine_at_vs440fx_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/8600ttc/TTC0715B.ROM",
|
||||
ret = bios_load_linear_combined2("roms/machines/vs440fx/1018CS1_.BIO",
|
||||
"roms/machines/vs440fx/1018CS1_.BI1",
|
||||
"roms/machines/vs440fx/1018CS1_.BI2",
|
||||
"roms/machines/vs440fx/1018CS1_.BI3",
|
||||
"roms/machines/vs440fx/1018CS1_.RCV",
|
||||
0x3a000, 128);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&i440fx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add_params(&pc87307_device, (void *) (PCX730X_AMI | PCX7307_PC87307));
|
||||
|
||||
device_add(&intel_flash_bxt_ami_device);
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL)
|
||||
device_add(machine_get_snd_device(machine));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_lgibmx61_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/lgibmx61/bios.rom",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
@@ -386,15 +444,15 @@ machine_at_8600ttc_init(const machine_t *model)
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
device_add(&i440fx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(&fdc37c669_device, (void *) 0);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&w83877_device, (void *) (W83877F | W83877_250));
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -427,39 +485,31 @@ machine_at_m6mi_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
machine_at_p65up5_common_init(const machine_t *model, const device_t *northbridge)
|
||||
{
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
device_add(northbridge);
|
||||
device_add(&piix3_ioapic_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0));
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
device_add(&ioapic_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p65up5_cp6nd_init(const machine_t *model)
|
||||
machine_at_mb600n_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/p65up5/ND6I0218.AWD",
|
||||
ret = bios_load_linear("roms/machines/mb600n/60915cs.rom",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_p65up5_common_init(model, &i440fx_device);
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
device_add(&i440fx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add_params(&fdc37c669_device, (void *) 0);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -8,11 +8,9 @@
|
||||
*
|
||||
* Implementation of Super Socket 7 machines.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
@@ -40,6 +38,7 @@
|
||||
#include <86box/snd_ac97.h>
|
||||
#include <86box/clock.h>
|
||||
|
||||
/* ALi ALADDiN V */
|
||||
int
|
||||
machine_at_p5a_init(const machine_t *model)
|
||||
{
|
||||
@@ -207,6 +206,7 @@ machine_at_5ax_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* VIA MVP3 */
|
||||
int
|
||||
machine_at_ax59pro_init(const machine_t *model)
|
||||
{
|
||||
@@ -231,7 +231,6 @@ machine_at_ax59pro_init(const machine_t *model)
|
||||
|
||||
device_add(&via_mvp3_device);
|
||||
device_add(&via_vt82c586b_device);
|
||||
device_add(&kbc_ps2_pci_device);
|
||||
device_add_params(&w83877_device, (void *) (W83877TF | W83877_250));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
@@ -239,6 +238,37 @@ machine_at_ax59pro_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_delhi3_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/delhi3/DELHI3.ROM",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
|
||||
device_add(&via_mvp3_device);
|
||||
device_add(&via_vt82c596a_device);
|
||||
device_add_params(&w83877_device, (void *) (W83877TF | W83877_250));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x3, 256);
|
||||
|
||||
if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine))
|
||||
device_add(machine_get_snd_device(machine));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_mvp3_init(const machine_t *model)
|
||||
{
|
||||
@@ -262,7 +292,6 @@ machine_at_mvp3_init(const machine_t *model)
|
||||
|
||||
device_add(&via_mvp3_device);
|
||||
device_add(&via_vt82c586b_device);
|
||||
device_add(&kbc_ps2_pci_device);
|
||||
device_add_params(&w83877_device, (void *) (W83877TF | W83877_3F0));
|
||||
device_add(&sst_flash_39sf010_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x3, 256);
|
||||
@@ -294,7 +323,6 @@ machine_at_ficva503a_init(const machine_t *model)
|
||||
|
||||
device_add(&via_mvp3_device);
|
||||
device_add(&via_vt82c686a_device); /* fans: CPU1, Chassis; temperatures: CPU, System, unused */
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
hwm_values.temperatures[0] += 2; /* CPU offset */
|
||||
@@ -332,7 +360,6 @@ machine_at_5emapro_init(const machine_t *model)
|
||||
|
||||
device_add(&via_mvp3_device); /* Rebranded as EQ82C6638 */
|
||||
device_add(&via_vt82c686a_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add(&sst_flash_39sf010_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
device_add(&via_vt82c686_hwm_device); /* fans: CPU1, Chassis; temperatures: CPU, System, unused */
|
||||
@@ -343,38 +370,7 @@ machine_at_5emapro_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_delhi3_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/delhi3/DELHI3.ROM",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
|
||||
device_add(&via_mvp3_device);
|
||||
device_add(&via_vt82c596a_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(&w83877_device, (void *) (W83877TF | W83877_250));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x3, 256);
|
||||
|
||||
if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine))
|
||||
device_add(machine_get_snd_device(machine));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* SiS 5591 */
|
||||
int
|
||||
machine_at_5sg100_init(const machine_t *model)
|
||||
{
|
||||
@@ -397,7 +393,6 @@ machine_at_5sg100_init(const machine_t *model)
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x02, PCI_CARD_AGPBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&sis_5591_1997_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(&w83877_device, (void *) (W83877TF | W83877_3F0));
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
|
||||
|
||||
@@ -117,15 +117,13 @@
|
||||
* bit 2 set for single-pixel LCD font
|
||||
* bits 0,1 for display font
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Authors: John Elliott, <jce@seasip.info>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* John Elliott, <jce@seasip.info>
|
||||
*
|
||||
* Copyright 2017-2018 Fred N. van Kempen.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2008-2018 John Elliott.
|
||||
* Copyright 2008-2025 John Elliott.
|
||||
* Copyright 2017-2025 Fred N. van Kempen.
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -796,6 +794,12 @@ upper_write_raml(uint32_t addr, uint32_t val, void *priv)
|
||||
*(uint32_t *) &ram[addr] = val;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
machine_t3100e_p1_handler(void)
|
||||
{
|
||||
return (t3100e_mono_get() & 1) ? 0xff : 0xbf;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_t3100e_init(const machine_t *model)
|
||||
{
|
||||
@@ -813,11 +817,10 @@ machine_at_t3100e_init(const machine_t *model)
|
||||
|
||||
machine_at_common_ide_init(model);
|
||||
|
||||
device_add(&kbc_at_toshiba_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL) {
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
}
|
||||
|
||||
/* Hook up system control port */
|
||||
io_sethandler(0x8084, 0x0001,
|
||||
|
||||
@@ -625,7 +625,7 @@ europc_boot(UNUSED(const device_t *info))
|
||||
mouse_bus_set_irq(sys->mouse, 2);
|
||||
/* Configure the port for (Bus Mouse Compatible) Mouse. */
|
||||
b |= 0x01;
|
||||
} else if (joystick_type)
|
||||
} else if (joystick_type[0])
|
||||
b |= 0x02; /* enable port as joysticks */
|
||||
sys->nvr.regs[MRTC_CONF_C] = b;
|
||||
|
||||
|
||||
@@ -395,13 +395,22 @@ ps1_common_init(const machine_t *model)
|
||||
dma16_init();
|
||||
pic2_init();
|
||||
|
||||
device_add(&kbc_ps2_ps1_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&port_6x_device);
|
||||
|
||||
/* Audio uses ports 200h and 202-207h, so only initialize gameport on 201h. */
|
||||
standalone_gameport_type = &gameport_201_device;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
machine_ps1_p1_handler(void)
|
||||
{
|
||||
const uint8_t current_drive = fdc_get_current_drive();
|
||||
|
||||
/* (B0 or F0) | (fdd_is_525(current_drive) on bit 6) */
|
||||
return 0xb0 | (fdd_is_525(current_drive) ? 0x40 : 0x00);
|
||||
}
|
||||
|
||||
int
|
||||
machine_ps1_m2011_init(const machine_t *model)
|
||||
{
|
||||
|
||||
@@ -201,7 +201,7 @@ ps2_isa_common_init(const machine_t *model)
|
||||
dma16_init();
|
||||
pic2_init();
|
||||
|
||||
device_add(&kbc_ps2_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&port_6x_ps2_device);
|
||||
}
|
||||
|
||||
|
||||
@@ -1160,7 +1160,6 @@ ps2_mca_board_model_50_init(void)
|
||||
|
||||
mem_remap_top(384);
|
||||
mca_init(4);
|
||||
device_add(&kbc_ps2_mca_2_device);
|
||||
|
||||
ps2.planar_read = model_50_read;
|
||||
ps2.planar_write = model_50_write;
|
||||
@@ -1181,7 +1180,6 @@ ps2_mca_board_model_60_init(void)
|
||||
|
||||
mem_remap_top(384);
|
||||
mca_init(8);
|
||||
device_add(&kbc_ps2_mca_2_device);
|
||||
|
||||
ps2.planar_read = model_50_read;
|
||||
ps2.planar_write = model_50_write;
|
||||
@@ -1241,7 +1239,6 @@ ps2_mca_board_model_55sx_init(int has_sec_nvram, int slots)
|
||||
}
|
||||
|
||||
mca_init(slots);
|
||||
device_add(&kbc_ps2_mca_1_device);
|
||||
|
||||
if (has_sec_nvram)
|
||||
device_add(&ps2_nvr_55ls_device);
|
||||
@@ -1420,7 +1417,6 @@ ps2_mca_board_model_70_type34_init(int is_type4, int slots)
|
||||
|
||||
ps2.split_addr = mem_size * 1024;
|
||||
mca_init(slots);
|
||||
device_add(&kbc_ps2_mca_1_device);
|
||||
|
||||
ps2.planar_read = model_70_type3_read;
|
||||
ps2.planar_write = model_70_type3_write;
|
||||
@@ -1513,7 +1509,6 @@ ps2_mca_board_model_80_type2_init(void)
|
||||
|
||||
ps2.split_addr = mem_size * 1024;
|
||||
mca_init(8);
|
||||
device_add(&kbc_ps2_mca_1_device);
|
||||
|
||||
ps2.planar_read = model_80_read;
|
||||
ps2.planar_write = model_80_write;
|
||||
@@ -1628,6 +1623,8 @@ machine_ps2_model_50_init(const machine_t *model)
|
||||
ps2.planar_id = 0xfbff;
|
||||
ps2_mca_board_model_50_init();
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1651,6 +1648,8 @@ machine_ps2_model_60_init(const machine_t *model)
|
||||
ps2.planar_id = 0xf7ff;
|
||||
ps2_mca_board_model_60_init();
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1671,6 +1670,8 @@ machine_ps2_model_55sx_init(const machine_t *model)
|
||||
ps2.planar_id = 0xfbff;
|
||||
ps2_mca_board_model_55sx_init(0, 4);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1691,6 +1692,8 @@ machine_ps2_model_65sx_init(const machine_t *model)
|
||||
ps2.planar_id = 0xe3ff;
|
||||
ps2_mca_board_model_55sx_init(1, 8);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1711,6 +1714,8 @@ machine_ps2_model_70_type3_init(const machine_t *model)
|
||||
ps2.planar_id = 0xf9ff;
|
||||
ps2_mca_board_model_70_type34_init(0, 4);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1731,6 +1736,8 @@ machine_ps2_model_80_init(const machine_t *model)
|
||||
ps2.planar_id = 0xfdff;
|
||||
ps2_mca_board_model_80_type2_init();
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1751,6 +1758,8 @@ machine_ps2_model_80_axx_init(const machine_t *model)
|
||||
ps2.planar_id = 0xfff9;
|
||||
ps2_mca_board_model_70_type34_init(0, 8);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1771,6 +1780,8 @@ machine_ps2_model_70_type4_init(const machine_t *model)
|
||||
ps2.planar_id = 0xf9ff;
|
||||
ps2_mca_board_model_70_type34_init(1, 4);
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1782,7 +1793,6 @@ ps55_mca_board_model_50t_init(void)
|
||||
ps2.split_addr = mem_size * 1024;
|
||||
/* The slot 5 is reserved for the Integrated Fixed Disk II (an internal ESDI hard drive). */
|
||||
mca_init(5);
|
||||
device_add(&kbc_ps2_mca_1_device);
|
||||
|
||||
ps2.planar_read = ps55_model_50t_read;
|
||||
ps2.planar_write = ps55_model_50tv_write;
|
||||
@@ -1826,7 +1836,6 @@ ps55_mca_board_model_50v_init(void)
|
||||
ps2.split_addr = mem_size * 1024;
|
||||
/* The slot 5 is reserved for the Integrated Fixed Disk II (an internal ESDI hard drive). */
|
||||
mca_init(5);
|
||||
device_add(&kbc_ps2_mca_1_device);
|
||||
|
||||
ps2.planar_read = ps55_model_50v_read;
|
||||
ps2.planar_write = ps55_model_50tv_write;
|
||||
@@ -1878,7 +1887,7 @@ ps55_mca_board_model_50v_init(void)
|
||||
}
|
||||
|
||||
int
|
||||
machine_ps55_model_50t_init(const machine_t* model)
|
||||
machine_ps55_model_50t_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -1903,11 +1912,13 @@ machine_ps55_model_50t_init(const machine_t* model)
|
||||
ps2.planar_id = 0xffee;
|
||||
ps55_mca_board_model_50t_init();
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_ps55_model_50v_init(const machine_t* model)
|
||||
machine_ps55_model_50v_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -1928,5 +1939,7 @@ machine_ps55_model_50v_init(const machine_t* model)
|
||||
ps2.planar_id = 0xf1ff;
|
||||
ps55_mca_board_model_50v_init();
|
||||
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,95 +0,0 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Emulation of various Compaq XT-class PC's.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* TheCollector1995, <mariogplayer@gmail.com>
|
||||
*
|
||||
* Copyright 2008-2019 Sarah Walker.
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <86box/86box.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/nmi.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/gameport.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/machine.h>
|
||||
|
||||
int
|
||||
machine_xt_compaq_deskpro_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/deskpro/Compaq - BIOS - Revision J - 106265-002.bin",
|
||||
0x000fe000, 8192, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_common_init(model);
|
||||
|
||||
pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt);
|
||||
|
||||
device_add(&kbc_xt_compaq_device);
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_xt_device);
|
||||
nmi_init();
|
||||
standalone_gameport_type = &gameport_200_device;
|
||||
|
||||
lpt_t *lpt = device_add_inst(&lpt_port_device, 1);
|
||||
lpt_port_setup(lpt, LPT_MDA_ADDR);
|
||||
lpt_set_3bc_used(1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_xt_compaq_portable_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/portable/compaq portable plus 100666-001 rev c u47.bin",
|
||||
0x000fe000, 8192, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_common_init(model);
|
||||
|
||||
pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt);
|
||||
|
||||
device_add(&kbc_xt_compaq_device);
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_xt_device);
|
||||
nmi_init();
|
||||
if (joystick_type)
|
||||
device_add(&gameport_200_device);
|
||||
|
||||
lpt_t *lpt = device_add_inst(&lpt_port_device, 1);
|
||||
lpt_port_setup(lpt, LPT_MDA_ADDR);
|
||||
lpt_set_3bc_used(1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -2397,7 +2397,7 @@ machine_xt_m240_init(const machine_t *model)
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device); /* io.c logs clearly show it using port 3F7 */
|
||||
|
||||
if (joystick_type)
|
||||
if (joystick_type[0])
|
||||
device_add(&gameport_200_device);
|
||||
|
||||
nmi_init();
|
||||
|
||||
@@ -204,7 +204,7 @@ machine_xt_xi8088_init(const machine_t *model)
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
device_add(&kbc_ps2_xi8088_device);
|
||||
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
|
||||
device_add(&port_6x_xi8088_device);
|
||||
nmi_init();
|
||||
device_add(&ibmat_nvr_device);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user