mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 01:25:33 -07:00
Merge branch 'master' of ssh://github.com/86Box/86Box into cleanup30
# Conflicts: # src/cdrom/cdrom_image.c # src/cdrom/cdrom_image_backend.c
This commit is contained in:
55
.ci/build.sh
55
.ci/build.sh
@@ -568,59 +568,64 @@ then
|
||||
fi
|
||||
else
|
||||
cwd_root=$(pwd)
|
||||
cache_dir="$HOME/86box-build-cache"
|
||||
[ ! -d "$cache_dir" ] && mkdir -p "$cache_dir"
|
||||
|
||||
if grep -q "OPENAL:BOOL=ON" build/CMakeCache.txt
|
||||
then
|
||||
# Build openal-soft 1.21.1 manually to fix audio issues. This is a temporary
|
||||
# workaround until a newer version of openal-soft trickles down to Debian repos.
|
||||
if [ -d "openal-soft-1.21.1" ]
|
||||
prefix="$cache_dir/openal-soft-1.21.1"
|
||||
if [ -d "$prefix" ]
|
||||
then
|
||||
rm -rf openal-soft-1.21.1/build
|
||||
rm -rf "$prefix/build"
|
||||
else
|
||||
wget -qO - https://github.com/kcat/openal-soft/archive/refs/tags/1.21.1.tar.gz | tar zxf -
|
||||
wget -qO - https://github.com/kcat/openal-soft/archive/refs/tags/1.21.1.tar.gz | tar zxf - -C "$cache_dir" || rm -rf "$prefix"
|
||||
fi
|
||||
cmake -G Ninja -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" -S openal-soft-1.21.1 -B openal-soft-1.21.1/build || exit 99
|
||||
cmake --build openal-soft-1.21.1/build -j$(nproc) || exit 99
|
||||
cmake --install openal-soft-1.21.1/build || exit 99
|
||||
cmake -G Ninja -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" -S "$prefix" -B "$prefix/build" || exit 99
|
||||
cmake --build "$prefix/build" -j$(nproc) || exit 99
|
||||
cmake --install "$prefix/build" || exit 99
|
||||
|
||||
# Build SDL2 without sound systems.
|
||||
sdl_ss=OFF
|
||||
else
|
||||
# Build FAudio 22.03 manually to remove the dependency on GStreamer. This is a temporary
|
||||
# workaround until a newer version of FAudio trickles down to Debian repos.
|
||||
if [ -d "FAudio-22.03" ]
|
||||
prefix="$cache_dir/FAudio-22.03"
|
||||
if [ -d "$prefix" ]
|
||||
then
|
||||
rm -rf FAudio-22.03/build
|
||||
rm -rf "$prefix/build"
|
||||
else
|
||||
wget -qO - https://github.com/FNA-XNA/FAudio/archive/refs/tags/22.03.tar.gz | tar zxf -
|
||||
wget -qO - https://github.com/FNA-XNA/FAudio/archive/refs/tags/22.03.tar.gz | tar zxf - -C "$cache_dir" || rm -rf "$prefix"
|
||||
fi
|
||||
cmake -G Ninja -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" -S FAudio-22.03 -B FAudio-22.03/build || exit 99
|
||||
cmake --build FAudio-22.03/build -j$(nproc) || exit 99
|
||||
cmake --install FAudio-22.03/build || exit 99
|
||||
cmake -G Ninja -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" -S "$prefix" -B "$prefix/build" || exit 99
|
||||
cmake --build "$prefix/build" -j$(nproc) || exit 99
|
||||
cmake --install "$prefix/build" || exit 99
|
||||
|
||||
# Build SDL2 with sound systems.
|
||||
sdl_ss=ON
|
||||
fi
|
||||
|
||||
# Build rtmidi without JACK support to remove the dependency on libjack.
|
||||
if [ -d "rtmidi-4.0.0" ]
|
||||
prefix="$cache_dir/rtmidi-4.0.0"
|
||||
if [ -d "$prefix" ]
|
||||
then
|
||||
rm -rf rtmidi-4.0.0/build
|
||||
rm -rf "$prefix/build"
|
||||
else
|
||||
wget -qO - http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-4.0.0.tar.gz | tar zxf -
|
||||
wget -qO - https://github.com/thestk/rtmidi/archive/refs/tags/4.0.0.tar.gz | tar zxf - -C "$cache_dir" || rm -rf "$prefix"
|
||||
fi
|
||||
cmake -G Ninja -D RTMIDI_API_JACK=OFF -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" -S rtmidi-4.0.0 -B rtmidi-4.0.0/build || exit 99
|
||||
cmake --build rtmidi-4.0.0/build -j$(nproc) || exit 99
|
||||
cmake --install rtmidi-4.0.0/build || exit 99
|
||||
cmake -G Ninja -D RTMIDI_API_JACK=OFF -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" -S "$prefix" -B "$prefix/build" || exit 99
|
||||
cmake --build "$prefix/build" -j$(nproc) || exit 99
|
||||
cmake --install "$prefix/build" || exit 99
|
||||
|
||||
# Build SDL2 for joystick and FAudio support, with most components
|
||||
# disabled to remove the dependencies on PulseAudio and libdrm.
|
||||
if [ ! -d "SDL2-2.0.20" ]
|
||||
prefix="$cache_dir/SDL2-2.0.20"
|
||||
if [ ! -d "$prefix" ]
|
||||
then
|
||||
wget -qO - https://www.libsdl.org/release/SDL2-2.0.20.tar.gz | tar zxf -
|
||||
wget -qO - https://www.libsdl.org/release/SDL2-2.0.20.tar.gz | tar zxf - -C "$cache_dir" || rm -rf "$prefix"
|
||||
fi
|
||||
rm -rf sdlbuild
|
||||
mkdir sdlbuild
|
||||
rm -rf "$cache_dir/sdlbuild"
|
||||
cmake -G Ninja -D SDL_DISKAUDIO=OFF -D SDL_DIRECTFB_SHARED=OFF -D SDL_OPENGL=OFF -D SDL_OPENGLES=OFF -D SDL_OSS=OFF -D SDL_ALSA=$sdl_ss \
|
||||
-D SDL_ALSA_SHARED=$sdl_ss -D SDL_JACK=$sdl_ss -D SDL_JACK_SHARED=$sdl_ss -D SDL_ESD=OFF -D SDL_ESD_SHARED=OFF -D SDL_PIPEWIRE=$sdl_ss \
|
||||
-D SDL_PIPEWIRE_SHARED=$sdl_ss -D SDL_PULSEAUDIO=$sdl_ss -D SDL_PULSEAUDIO_SHARED=$sdl_ss -D SDL_ARTS=OFF -D SDL_ARTS_SHARED=OFF \
|
||||
@@ -628,10 +633,10 @@ else
|
||||
-D SDL_FUSIONSOUND_SHARED=OFF -D SDL_LIBSAMPLERATE=$sdl_ss -D SDL_LIBSAMPLERATE_SHARED=$sdl_ss -D SDL_X11=OFF -D SDL_X11_SHARED=OFF \
|
||||
-D SDL_WAYLAND=OFF -D SDL_WAYLAND_SHARED=OFF -D SDL_WAYLAND_LIBDECOR=OFF -D SDL_WAYLAND_LIBDECOR_SHARED=OFF -D SDL_WAYLAND_QT_TOUCH=OFF \
|
||||
-D SDL_RPI=OFF -D SDL_VIVANTE=OFF -D SDL_VULKAN=OFF -D SDL_KMSDRM=OFF -D SDL_KMSDRM_SHARED=OFF -D SDL_OFFSCREEN=OFF \
|
||||
-D SDL_HIDAPI_JOYSTICK=ON -D SDL_VIRTUAL_JOYSTICK=ON -D SDL_SHARED=ON -D SDL_STATIC=OFF -S SDL2-2.0.20 -B sdlbuild \
|
||||
-D SDL_HIDAPI_JOYSTICK=ON -D SDL_VIRTUAL_JOYSTICK=ON -D SDL_SHARED=ON -D SDL_STATIC=OFF -S "$prefix" -B "$cache_dir/sdlbuild" \
|
||||
-D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" || exit 99
|
||||
cmake --build sdlbuild -j$(nproc) || exit 99
|
||||
cmake --install sdlbuild || exit 99
|
||||
cmake --build "$cache_dir/sdlbuild" -j$(nproc) || exit 99
|
||||
cmake --install "$cache_dir/sdlbuild" || exit 99
|
||||
|
||||
# Archive Discord Game SDK library.
|
||||
7z e -y -o"archive_tmp/usr/lib" discord_game_sdk.zip "lib/$arch_discord/discord_game_sdk.so"
|
||||
|
||||
@@ -35,7 +35,7 @@ if(MUNT_EXTERNAL)
|
||||
endif()
|
||||
|
||||
project(86Box
|
||||
VERSION 3.3
|
||||
VERSION 3.4
|
||||
DESCRIPTION "Emulator of x86-based systems"
|
||||
HOMEPAGE_URL "https://86box.net"
|
||||
LANGUAGES C CXX)
|
||||
@@ -114,6 +114,7 @@ if(HAIKU)
|
||||
set(RTMIDI OFF)
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
|
||||
|
||||
@@ -127,6 +128,7 @@ option(OPENAL "OpenAL"
|
||||
option(RTMIDI "RtMidi" ON)
|
||||
option(FLUIDSYNTH "FluidSynth" ON)
|
||||
option(MUNT "MUNT" ON)
|
||||
option(VNC "VNC renderer" OFF)
|
||||
option(DINPUT "DirectInput" OFF)
|
||||
option(CPPTHREADS "C++11 threads" ON)
|
||||
option(NEW_DYNAREC "Use the PCem v15 (\"new\") dynamic recompiler" OFF)
|
||||
@@ -140,21 +142,21 @@ option(QT "Qt GUI"
|
||||
# Option Description Def. Condition Otherwise
|
||||
# ------ ----------- ---- --------- ---------
|
||||
cmake_dependent_option(AMD_K5 "AMD K5" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(AN430TX "Intel AN430TX" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(CYRIX_6X86 "Cyrix 6x86" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(DESKPRO386 "Compaq Deskpro 386" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(GUSMAX "Gravis UltraSound MAX" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(ISAMEM_RAMPAGE "AST Rampage" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(ISAMEM_IAB "Intel Above Board" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(ISAMEM_BRAT "BocaRAM/AT" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(LASERXT "VTech Laser XT" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(MGA "Matrox Mystique graphics adapters" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(NO_SIO "Machines without emulated Super I/O chips" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(OLIVETTI "Olivetti M290" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(OPEN_AT "OpenAT" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(PAS16 "Pro Audio Spectrum 16" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(SIO_DETECT "Super I/O Detection Helper" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(TANDY_ISA "Tandy PSG ISA clone boards" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(VGAWONDER "ATI VGA Wonder (ATI-18800)" ON "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(VNC "VNC renderer" OFF "DEV_BRANCH" OFF)
|
||||
cmake_dependent_option(XL24 "ATI VGA Wonder XL24 (ATI-28800-6)" ON "DEV_BRANCH" OFF)
|
||||
|
||||
# Ditto but for Qt
|
||||
|
||||
189
src/86box.c
189
src/86box.c
@@ -37,7 +37,6 @@
|
||||
#ifdef __APPLE__
|
||||
#include <string.h>
|
||||
#include <dispatch/dispatch.h>
|
||||
#include "mac/macOSXGlue.h"
|
||||
#ifdef __aarch64__
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
@@ -92,7 +91,9 @@
|
||||
#include <86box/snd_speaker.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/ui.h>
|
||||
#include <86box/path.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/thread.h>
|
||||
#include <86box/version.h>
|
||||
#include <86box/gdbstub.h>
|
||||
|
||||
@@ -173,7 +174,6 @@ int confirm_reset = 1; /* (C) enable reset confirmation */
|
||||
int confirm_exit = 1; /* (C) enable exit confirmation */
|
||||
int confirm_save = 1; /* (C) enable save confirmation */
|
||||
int enable_discord = 0; /* (C) enable Discord integration */
|
||||
int enable_crashdump = 0; /* (C) enable crash dump */
|
||||
|
||||
/* Statistics. */
|
||||
extern int mmuflush;
|
||||
@@ -385,48 +385,6 @@ pc_log(const char *fmt, ...)
|
||||
#define pc_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
void
|
||||
add_rom_path(const char* path)
|
||||
{
|
||||
static char cwd[1024];
|
||||
memset(cwd, 0x00, sizeof(cwd));
|
||||
rom_path_t* cur_rom_path = &rom_paths;
|
||||
while (cur_rom_path->next != NULL) {
|
||||
cur_rom_path = cur_rom_path->next;
|
||||
}
|
||||
if (!plat_path_abs((char*)path)) {
|
||||
/*
|
||||
* This looks like a relative path.
|
||||
*
|
||||
* Add it to the current working directory
|
||||
* to convert it (back) to an absolute path.
|
||||
*/
|
||||
plat_getcwd(cwd, 1024);
|
||||
plat_path_slash(cwd);
|
||||
snprintf(cur_rom_path->rom_path, 1024, "%s%s%c", cwd, path, 0);
|
||||
}
|
||||
else {
|
||||
/*
|
||||
* The user-provided path seems like an
|
||||
* absolute path, so just use that.
|
||||
*/
|
||||
strncpy(cur_rom_path->rom_path, path, 1024);
|
||||
}
|
||||
plat_path_slash(cur_rom_path->rom_path);
|
||||
cur_rom_path->next = calloc(1, sizeof(rom_path_t));
|
||||
}
|
||||
|
||||
// Copied over from Unix code, which in turn is lifted from musl. Needed for parsing XDG_DATA_DIRS.
|
||||
static char *local_strsep(char **str, const char *sep)
|
||||
{
|
||||
char *s = *str, *end;
|
||||
if (!s) return NULL;
|
||||
end = s + strcspn(s, sep);
|
||||
if (*end) *end++ = 0;
|
||||
else end = 0;
|
||||
*str = end;
|
||||
return s;
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform initial startup of the PC.
|
||||
@@ -438,23 +396,37 @@ static char *local_strsep(char **str, const char *sep)
|
||||
int
|
||||
pc_init(int argc, char *argv[])
|
||||
{
|
||||
char path[2048], path2[2048];
|
||||
char *ppath = NULL, *rpath = NULL;
|
||||
char *cfg = NULL, *p;
|
||||
#if !defined(__APPLE__) && !defined(_WIN32)
|
||||
char *appimage;
|
||||
#endif
|
||||
char temp[128];
|
||||
char temp[2048];
|
||||
struct tm *info;
|
||||
time_t now;
|
||||
int c, vmrp = 0;
|
||||
int c;
|
||||
int ng = 0, lvmp = 0;
|
||||
#ifdef _WIN32
|
||||
uint32_t *uid, *shwnd;
|
||||
#endif
|
||||
uint32_t lang_init = 0;
|
||||
|
||||
/* Grab the executable's full path. */
|
||||
plat_get_exe_name(exe_path, sizeof(exe_path)-1);
|
||||
p = plat_get_filename(exe_path);
|
||||
p = path_get_filename(exe_path);
|
||||
*p = '\0';
|
||||
#if defined(__APPLE__)
|
||||
c = strlen(exe_path);
|
||||
if ((c >= 16) && !strcmp(&exe_path[c - 16], "/Contents/MacOS/")) {
|
||||
exe_path[c - 16] = '\0';
|
||||
p = path_get_filename(exe_path);
|
||||
*p = '\0';
|
||||
}
|
||||
#elif !defined(_WIN32)
|
||||
/* Grab the actual path if we are an AppImage. */
|
||||
p = getenv("APPIMAGE");
|
||||
if (p && (p[0] != '\0'))
|
||||
path_get_dirname(exe_path, p);
|
||||
#endif
|
||||
|
||||
path_slash(exe_path);
|
||||
|
||||
/*
|
||||
* Get the current working directory.
|
||||
@@ -467,9 +439,6 @@ pc_init(int argc, char *argv[])
|
||||
plat_getcwd(usr_path, sizeof(usr_path) - 1);
|
||||
plat_getcwd(rom_path, sizeof(rom_path) - 1);
|
||||
|
||||
memset(path, 0x00, sizeof(path));
|
||||
memset(path2, 0x00, sizeof(path));
|
||||
|
||||
for (c=1; c<argc; c++) {
|
||||
if (argv[c][0] != '-') break;
|
||||
|
||||
@@ -478,12 +447,11 @@ usage:
|
||||
printf("\nUsage: 86box [options] [cfg-file]\n\n");
|
||||
printf("Valid options are:\n\n");
|
||||
printf("-? or --help - show this information\n");
|
||||
#ifdef _WIN32
|
||||
printf("-A or --crashdump - enables crashdump on exception\n");
|
||||
#endif
|
||||
printf("-C or --config path - set 'path' to be config file\n");
|
||||
#ifdef _WIN32
|
||||
printf("-D or --debug - force debug output logging\n");
|
||||
#endif
|
||||
#if 0
|
||||
printf("-E or --nographic - forces the old behavior\n");
|
||||
#endif
|
||||
printf("-F or --fullscreen - start in fullscreen mode\n");
|
||||
@@ -492,7 +460,6 @@ usage:
|
||||
printf("-H or --hwnd id,hwnd - sends back the main dialog's hwnd\n");
|
||||
#endif
|
||||
printf("-L or --logfile path - set 'path' to be the logfile\n");
|
||||
printf("-M or --vmrompath - ROM path is roms subdirectory inside the userfiles path\n");
|
||||
printf("-N or --noconfirm - do not ask for confirmation on quit\n");
|
||||
printf("-O or --dumpcfg - dump config file after loading\n");
|
||||
printf("-P or --vmpath path - set 'path' to be root for vm\n");
|
||||
@@ -502,9 +469,6 @@ usage:
|
||||
printf("-Z or --lastvmpath - the last parameter is VM path rather than config\n");
|
||||
printf("\nA config file can be specified. If none is, the default file will be used.\n");
|
||||
return(0);
|
||||
} else if (!strcasecmp(argv[c], "--vmrompath") ||
|
||||
!strcasecmp(argv[c], "-M")) {
|
||||
vmrp = 1;
|
||||
} else if (!strcasecmp(argv[c], "--lastvmpath") ||
|
||||
!strcasecmp(argv[c], "-Z")) {
|
||||
lvmp = 1;
|
||||
@@ -534,13 +498,13 @@ usage:
|
||||
!strcasecmp(argv[c], "-P")) {
|
||||
if ((c+1) == argc) goto usage;
|
||||
|
||||
strcpy(path, argv[++c]);
|
||||
ppath = argv[++c];
|
||||
} else if (!strcasecmp(argv[c], "--rompath") ||
|
||||
!strcasecmp(argv[c], "-R")) {
|
||||
if ((c+1) == argc) goto usage;
|
||||
|
||||
strcpy(path2, argv[++c]);
|
||||
add_rom_path(path2);
|
||||
rpath = argv[++c];
|
||||
rom_add_path(rpath);
|
||||
} else if (!strcasecmp(argv[c], "--config") ||
|
||||
!strcasecmp(argv[c], "-C")) {
|
||||
if ((c+1) == argc) goto usage;
|
||||
@@ -558,9 +522,6 @@ usage:
|
||||
!strcasecmp(argv[c], "-N")) {
|
||||
confirm_exit_cmdl = 0;
|
||||
#ifdef _WIN32
|
||||
} else if (!strcasecmp(argv[c], "--crashdump") ||
|
||||
!strcasecmp(argv[c], "-A")) {
|
||||
enable_crashdump = 1;
|
||||
} else if (!strcasecmp(argv[c], "--hwnd") ||
|
||||
!strcasecmp(argv[c], "-H")) {
|
||||
|
||||
@@ -597,15 +558,15 @@ usage:
|
||||
/* One argument (config file) allowed. */
|
||||
if (c < argc) {
|
||||
if (lvmp)
|
||||
strcpy(path, argv[c++]);
|
||||
ppath = argv[c++];
|
||||
else
|
||||
cfg = argv[c++];
|
||||
}
|
||||
|
||||
if (c != argc) goto usage;
|
||||
|
||||
plat_path_slash(usr_path);
|
||||
plat_path_slash(rom_path);
|
||||
path_slash(usr_path);
|
||||
path_slash(rom_path);
|
||||
|
||||
/*
|
||||
* If the user provided a path for files, use that
|
||||
@@ -613,21 +574,21 @@ usage:
|
||||
* make sure that if that was a relative path, we
|
||||
* make it absolute.
|
||||
*/
|
||||
if (path[0] != '\0') {
|
||||
if (! plat_path_abs(path)) {
|
||||
if (ppath != NULL) {
|
||||
if (! path_abs(ppath)) {
|
||||
/*
|
||||
* This looks like a relative path.
|
||||
*
|
||||
* Add it to the current working directory
|
||||
* to convert it (back) to an absolute path.
|
||||
*/
|
||||
strcat(usr_path, path);
|
||||
strcat(usr_path, ppath);
|
||||
} else {
|
||||
/*
|
||||
* The user-provided path seems like an
|
||||
* absolute path, so just use that.
|
||||
*/
|
||||
strcpy(usr_path, path);
|
||||
strcpy(usr_path, ppath);
|
||||
}
|
||||
|
||||
/* If the specified path does not yet exist,
|
||||
@@ -636,42 +597,13 @@ usage:
|
||||
plat_dir_create(usr_path);
|
||||
}
|
||||
|
||||
if (vmrp) {
|
||||
char vmrppath[1024] = { 0 };
|
||||
strcpy(vmrppath, usr_path);
|
||||
plat_path_slash(vmrppath);
|
||||
strcat(vmrppath, "roms");
|
||||
plat_path_slash(vmrppath);
|
||||
add_rom_path(vmrppath);
|
||||
if (path2[0] == '\0') {
|
||||
strcpy(path2, vmrppath);
|
||||
}
|
||||
}
|
||||
// Add the VM-local ROM path.
|
||||
path_append_filename(temp, usr_path, "roms");
|
||||
rom_add_path(temp);
|
||||
|
||||
{
|
||||
char default_rom_path[1024] = { 0 };
|
||||
#if defined(__APPLE__)
|
||||
getDefaultROMPath(default_rom_path);
|
||||
#elif !defined(_WIN32)
|
||||
appimage = getenv("APPIMAGE");
|
||||
if (appimage && (appimage[0] != '\0')) {
|
||||
plat_get_dirname(default_rom_path, appimage);
|
||||
plat_path_slash(default_rom_path);
|
||||
strcat(default_rom_path, "roms");
|
||||
plat_path_slash(default_rom_path);
|
||||
}
|
||||
#endif
|
||||
if (default_rom_path[0] == '\0') {
|
||||
plat_getcwd(default_rom_path, 1024);
|
||||
plat_path_slash(default_rom_path);
|
||||
snprintf(default_rom_path, 1024, "%s%s%c", default_rom_path, "roms", 0);
|
||||
plat_path_slash(default_rom_path);
|
||||
}
|
||||
add_rom_path(default_rom_path);
|
||||
if (path2[0] == '\0') {
|
||||
strcpy(path2, default_rom_path);
|
||||
}
|
||||
}
|
||||
// Add the standard ROM path in the same directory as the executable.
|
||||
path_append_filename(temp, exe_path, "roms");
|
||||
rom_add_path(temp);
|
||||
|
||||
plat_init_rom_paths();
|
||||
|
||||
@@ -681,21 +613,21 @@ usage:
|
||||
* make sure that if that was a relative path, we
|
||||
* make it absolute.
|
||||
*/
|
||||
if (path2[0] != '\0') {
|
||||
if (! plat_path_abs(path2)) {
|
||||
if (rpath != NULL) {
|
||||
if (! path_abs(rpath)) {
|
||||
/*
|
||||
* This looks like a relative path.
|
||||
*
|
||||
* Add it to the current working directory
|
||||
* to convert it (back) to an absolute path.
|
||||
*/
|
||||
strcat(rom_path, path2);
|
||||
strcat(rom_path, rpath);
|
||||
} else {
|
||||
/*
|
||||
* The user-provided path seems like an
|
||||
* absolute path, so just use that.
|
||||
*/
|
||||
strcpy(rom_path, path2);
|
||||
strcpy(rom_path, rpath);
|
||||
}
|
||||
|
||||
/* If the specified path does not yet exist,
|
||||
@@ -717,7 +649,7 @@ usage:
|
||||
* This can happen when people load a config
|
||||
* file using the UI, for example.
|
||||
*/
|
||||
p = plat_get_filename(cfg);
|
||||
p = path_get_filename(cfg);
|
||||
if (cfg != p) {
|
||||
/*
|
||||
* OK, the configuration file name has a
|
||||
@@ -732,19 +664,19 @@ usage:
|
||||
* Otherwise, assume the pathname given is
|
||||
* relative to whatever the usr_path is.
|
||||
*/
|
||||
if (plat_path_abs(cfg))
|
||||
if (path_abs(cfg))
|
||||
strcpy(usr_path, cfg);
|
||||
else
|
||||
strcat(usr_path, cfg);
|
||||
}
|
||||
|
||||
/* Make sure we have a trailing backslash. */
|
||||
plat_path_slash(usr_path);
|
||||
path_slash(usr_path);
|
||||
if (rom_path[0] != '\0')
|
||||
plat_path_slash(rom_path);
|
||||
path_slash(rom_path);
|
||||
|
||||
/* At this point, we can safely create the full path name. */
|
||||
plat_append_filename(cfg_path, usr_path, p);
|
||||
path_append_filename(cfg_path, usr_path, p);
|
||||
|
||||
/*
|
||||
* Get the current directory's name
|
||||
@@ -755,8 +687,8 @@ usage:
|
||||
*/
|
||||
if (strlen(vm_name) == 0) {
|
||||
char ltemp[1024] = { '\0'};
|
||||
plat_get_dirname(ltemp, usr_path);
|
||||
strcpy(vm_name, plat_get_filename(ltemp));
|
||||
path_get_dirname(ltemp, usr_path);
|
||||
strcpy(vm_name, path_get_filename(ltemp));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -771,19 +703,10 @@ usage:
|
||||
pclog("# VM: %s\n#\n", vm_name);
|
||||
pclog("# Emulator path: %s\n", exe_path);
|
||||
pclog("# Userfiles path: %s\n", usr_path);
|
||||
if (rom_paths.next) {
|
||||
rom_path_t* cur_rom_path = &rom_paths;
|
||||
while (cur_rom_path->next) {
|
||||
pclog("# ROM path: %s\n", cur_rom_path->rom_path);
|
||||
cur_rom_path = cur_rom_path->next;
|
||||
}
|
||||
for(rom_path_t *rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) {
|
||||
pclog("# ROM path: %s\n", rom_path->path);
|
||||
}
|
||||
else
|
||||
#ifndef _WIN32
|
||||
pclog("# ROM path: %sroms/\n", exe_path);
|
||||
#else
|
||||
pclog("# ROM path: %sroms\\\n", exe_path);
|
||||
#endif
|
||||
|
||||
pclog("# Configuration file: %s\n#\n\n", cfg_path);
|
||||
/*
|
||||
* We are about to read the configuration file, which MAY
|
||||
@@ -1254,7 +1177,7 @@ pc_close(thread_t *ptr)
|
||||
#ifdef __APPLE__
|
||||
static void _ui_window_title(void *s)
|
||||
{
|
||||
ui_window_title((const wchar_t *) s);
|
||||
ui_window_title((wchar_t *) s);
|
||||
free(s);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -172,7 +172,6 @@ EXTRAS :=
|
||||
|
||||
|
||||
AUTODEP := n
|
||||
CRASHDUMP := n
|
||||
DEBUG := n
|
||||
OPTIM := n
|
||||
X64 := n
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
* Copyright 2015-2019 Miran Grca.
|
||||
* Copyright 2017-2019 bit.
|
||||
*/
|
||||
#define __USE_LARGEFILE64
|
||||
#define _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#include <inttypes.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
@@ -29,6 +26,7 @@
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include <86box/config.h>
|
||||
#include <86box/path.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/scsi_device.h>
|
||||
#include <86box/cdrom_image_backend.h>
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2002-2020 The DOSBox Team.
|
||||
*/
|
||||
#define _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#include <ctype.h>
|
||||
#include <inttypes.h>
|
||||
@@ -34,10 +32,10 @@
|
||||
#endif
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include <86box/cdrom_image_backend.h>
|
||||
#include <86box/path.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/cdrom_image_backend.h>
|
||||
|
||||
#define CDROM_BCD(x) (((x) % 10) | (((x) / 10) << 4))
|
||||
|
||||
#define MAX_LINE_LENGTH 512
|
||||
#define MAX_FILENAME_LENGTH 256
|
||||
@@ -804,7 +802,7 @@ cdi_load_cue(cd_img_t *cdi, const char *cuefile)
|
||||
|
||||
/* Get a copy of the filename into pathname, we need it later. */
|
||||
memset(pathname, 0, MAX_FILENAME_LENGTH * sizeof(char));
|
||||
plat_get_dirname(pathname, cuefile);
|
||||
path_get_dirname(pathname, cuefile);
|
||||
|
||||
/* Open the file. */
|
||||
fp = plat_fopen(cuefile, "r");
|
||||
@@ -959,7 +957,7 @@ cdi_load_cue(cd_img_t *cdi, const char *cuefile)
|
||||
|
||||
if (!strcmp(type, "BINARY")) {
|
||||
memset(temp, 0, MAX_FILENAME_LENGTH * sizeof(char));
|
||||
plat_append_filename(filename, pathname, ansi);
|
||||
path_append_filename(filename, pathname, ansi);
|
||||
trk.file = track_file_init(filename, &error);
|
||||
}
|
||||
if (error) {
|
||||
|
||||
@@ -23,7 +23,7 @@ if(DYNAREC)
|
||||
target_sources(dynarec PRIVATE codegen_x86-64.c
|
||||
codegen_accumulate_x86-64.c)
|
||||
else()
|
||||
message(SEND_ERROR
|
||||
message(SEND_ERROR
|
||||
"Dynarec is incompatible with target platform ${ARCH}")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -23,12 +23,12 @@ static inline int find_host_xmm_reg()
|
||||
}
|
||||
static inline void call(codeblock_t *block, uintptr_t func)
|
||||
{
|
||||
uintptr_t diff = func - (uintptr_t)&block->data[block_pos + 5];
|
||||
intptr_t diff = (intptr_t)(func - (uintptr_t)&block->data[block_pos + 5]);
|
||||
|
||||
codegen_reg_loaded[0] = codegen_reg_loaded[1] = codegen_reg_loaded[2] = codegen_reg_loaded[3] = 0;
|
||||
codegen_reg_loaded[4] = codegen_reg_loaded[5] = codegen_reg_loaded[6] = codegen_reg_loaded[7] = 0;
|
||||
|
||||
if (diff >= -0x80000000ULL && diff < 0x7fffffffULL)
|
||||
if (diff >= -0x80000000LL && diff < 0x7fffffffLL)
|
||||
{
|
||||
addbyte(0xE8); /*CALL*/
|
||||
addlong((uint32_t)diff);
|
||||
|
||||
@@ -43,7 +43,7 @@ if(DYNAREC)
|
||||
target_sources(dynarec PRIVATE codegen_backend_arm.c
|
||||
codegen_backend_arm_ops.c codegen_backend_arm_uops.c)
|
||||
else()
|
||||
message(SEND_ERROR
|
||||
message(SEND_ERROR
|
||||
"Dynarec is incompatible with target platform ${ARCH}")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#if defined WIN32 || defined _WIN32 || defined _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
void *codegen_mem_load_byte;
|
||||
void *codegen_mem_load_word;
|
||||
@@ -310,7 +311,7 @@ void codegen_backend_init()
|
||||
block->data = codeblock_allocator_get_ptr(block->head_mem_block);
|
||||
block_write_data = block->data;
|
||||
build_loadstore_routines(&codeblock[block_current]);
|
||||
printf("block_pos=%i\n", block_pos);
|
||||
//pclog("block_pos=%i\n", block_pos);
|
||||
|
||||
codegen_fp_round = &block_write_data[block_pos];
|
||||
build_fp_round_routine(&codeblock[block_current]);
|
||||
|
||||
@@ -74,7 +74,6 @@ static void build_load_routine(codeblock_t *block, int size, int is_float)
|
||||
{
|
||||
uint32_t *branch_offset;
|
||||
uint32_t *misaligned_offset;
|
||||
int offset;
|
||||
|
||||
/*In - W0 = address
|
||||
Out - W0 = data, W1 = abrt*/
|
||||
@@ -143,7 +142,6 @@ static void build_store_routine(codeblock_t *block, int size, int is_float)
|
||||
{
|
||||
uint32_t *branch_offset;
|
||||
uint32_t *misaligned_offset;
|
||||
int offset;
|
||||
|
||||
/*In - R0 = address, R1 = data
|
||||
Out - R1 = abrt*/
|
||||
@@ -283,12 +281,6 @@ void codegen_backend_init()
|
||||
{
|
||||
codeblock_t *block;
|
||||
int c;
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
void *start;
|
||||
size_t len;
|
||||
long pagesize = sysconf(_SC_PAGESIZE);
|
||||
long pagemask = ~(pagesize - 1);
|
||||
#endif
|
||||
|
||||
codeblock = malloc(BLOCK_SIZE * sizeof(codeblock_t));
|
||||
codeblock_hash = malloc(HASH_SIZE * sizeof(codeblock_t *));
|
||||
|
||||
@@ -270,12 +270,6 @@ static inline int imm_is_imm16(uint32_t imm_data)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
static inline int imm_is_imm12(uint32_t imm_data)
|
||||
{
|
||||
if (!(imm_data & 0xfffff000) || !(imm_data & 0xff000fff))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void codegen_allocate_new_block(codeblock_t *block);
|
||||
|
||||
|
||||
@@ -294,12 +294,6 @@ void codegen_backend_init()
|
||||
{
|
||||
codeblock_t *block;
|
||||
int c;
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
void *start;
|
||||
size_t len;
|
||||
long pagesize = sysconf(_SC_PAGESIZE);
|
||||
long pagemask = ~(pagesize - 1);
|
||||
#endif
|
||||
|
||||
codeblock = malloc(BLOCK_SIZE * sizeof(codeblock_t));
|
||||
codeblock_hash = malloc(HASH_SIZE * sizeof(codeblock_t *));
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
|
||||
static inline void call(codeblock_t *block, uintptr_t func)
|
||||
{
|
||||
uintptr_t diff;
|
||||
intptr_t diff;
|
||||
|
||||
codegen_alloc_bytes(block, 5);
|
||||
diff = func - (uintptr_t)&block_write_data[block_pos + 5];
|
||||
diff = (intptr_t)(func - (uintptr_t)&block_write_data[block_pos + 5]);
|
||||
|
||||
if (diff >= -0x80000000 && diff < 0x7fffffff)
|
||||
if (diff >= -0x80000000LL && diff < 0x7fffffffLL)
|
||||
{
|
||||
codegen_addbyte(block, 0xE8); /*CALL*/
|
||||
codegen_addlong(block, (uint32_t)diff);
|
||||
@@ -48,12 +48,12 @@ static inline void call(codeblock_t *block, uintptr_t func)
|
||||
|
||||
static inline void jmp(codeblock_t *block, uintptr_t func)
|
||||
{
|
||||
uintptr_t diff;
|
||||
intptr_t diff;
|
||||
|
||||
codegen_alloc_bytes(block, 5);
|
||||
diff = func - (uintptr_t)&block_write_data[block_pos + 5];
|
||||
diff = (intptr_t)(func - (uintptr_t)&block_write_data[block_pos + 5]);
|
||||
|
||||
if (diff >= -0x80000000 && diff < 0x7fffffff)
|
||||
if (diff >= -0x80000000LL && diff < 0x7fffffffLL)
|
||||
{
|
||||
codegen_addbyte(block, 0xe9); /*JMP*/
|
||||
codegen_addlong(block, (uint32_t)diff);
|
||||
|
||||
@@ -268,12 +268,7 @@ void codegen_backend_init()
|
||||
{
|
||||
codeblock_t *block;
|
||||
int c;
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
void *start;
|
||||
size_t len;
|
||||
long pagesize = sysconf(_SC_PAGESIZE);
|
||||
long pagemask = ~(pagesize - 1);
|
||||
#endif
|
||||
|
||||
codeblock = malloc(BLOCK_SIZE * sizeof(codeblock_t));
|
||||
codeblock_hash = malloc(HASH_SIZE * sizeof(codeblock_t *));
|
||||
|
||||
|
||||
@@ -513,7 +513,7 @@ void codegen_reg_write_imm(codeblock_t *block, ir_reg_t ir_reg, uint32_t imm_dat
|
||||
|
||||
case REG_DWORD:
|
||||
if ((uintptr_t)p < 256)
|
||||
codegen_direct_write_32_imm_stack(block, (int)p, imm_data);
|
||||
codegen_direct_write_32_imm_stack(block, (int)((uintptr_t) p), imm_data);
|
||||
else
|
||||
codegen_direct_write_32_imm(block, p, imm_data);
|
||||
break;
|
||||
|
||||
15
src/config.c
15
src/config.c
@@ -63,6 +63,7 @@
|
||||
#include <86box/midi.h>
|
||||
#include <86box/snd_mpu401.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/path.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/plat_dir.h>
|
||||
#include <86box/ui.h>
|
||||
@@ -1422,12 +1423,12 @@ load_hard_disks(void)
|
||||
wcsncpy(hdd[c].fn, &wp[wcslen(usr_path)], sizeof_w(hdd[c].fn));
|
||||
} else
|
||||
#endif
|
||||
if (plat_path_abs(p)) {
|
||||
if (path_abs(p)) {
|
||||
strncpy(hdd[c].fn, p, sizeof(hdd[c].fn) - 1);
|
||||
} else {
|
||||
plat_append_filename(hdd[c].fn, usr_path, p);
|
||||
path_append_filename(hdd[c].fn, usr_path, p);
|
||||
}
|
||||
plat_path_normalize(hdd[c].fn);
|
||||
path_normalize(hdd[c].fn);
|
||||
|
||||
/* If disk is empty or invalid, mark it for deletion. */
|
||||
if (! hdd_is_valid(c)) {
|
||||
@@ -2421,12 +2422,12 @@ save_machine(void)
|
||||
|
||||
if (fpu_type == 0)
|
||||
config_delete_var(cat, "fpu_type");
|
||||
else
|
||||
else
|
||||
config_set_string(cat, "fpu_type", (char *) fpu_get_internal_name(cpu_f, cpu, fpu_type));
|
||||
|
||||
//Write the mem_size explicitly to the setttings in order to help managers to display it without having the actual machine table
|
||||
config_delete_var(cat, "mem_size");
|
||||
config_set_int(cat, "mem_size", mem_size);
|
||||
config_delete_var(cat, "mem_size");
|
||||
config_set_int(cat, "mem_size", mem_size);
|
||||
|
||||
config_set_int(cat, "cpu_use_dynarec", cpu_use_dynarec);
|
||||
|
||||
@@ -2841,7 +2842,7 @@ save_hard_disks(void)
|
||||
|
||||
sprintf(temp, "hdd_%02i_fn", c+1);
|
||||
if (hdd_is_valid(c) && (strlen(hdd[c].fn) != 0)) {
|
||||
plat_path_normalize(hdd[c].fn);
|
||||
path_normalize(hdd[c].fn);
|
||||
if (!strnicmp(hdd[c].fn, usr_path, strlen(usr_path)))
|
||||
config_set_string(cat, temp, &hdd[c].fn[strlen(usr_path)]);
|
||||
else
|
||||
|
||||
@@ -33,6 +33,11 @@
|
||||
#include "codegen_backend.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef IS_DYNAREC
|
||||
#undef IS_DYNAREC
|
||||
#endif
|
||||
|
||||
#include "386_common.h"
|
||||
|
||||
#if defined(__APPLE__) && defined(__aarch64__)
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
|
||||
#define CPU_BLOCK_END() cpu_block_end = 1
|
||||
|
||||
#ifndef IS_DYNAREC
|
||||
#define IS_DYNAREC
|
||||
#endif
|
||||
|
||||
#include "386_common.h"
|
||||
|
||||
|
||||
|
||||
@@ -195,7 +195,11 @@ extern void x386_dynarec_log(const char *fmt, ...);
|
||||
#include "x86_ops_mul.h"
|
||||
#include "x86_ops_pmode.h"
|
||||
#include "x86_ops_prefix.h"
|
||||
#ifdef IS_DYNAREC
|
||||
#include "x86_ops_rep_dyn.h"
|
||||
#else
|
||||
#include "x86_ops_rep.h"
|
||||
#endif
|
||||
#include "x86_ops_ret.h"
|
||||
#include "x86_ops_set.h"
|
||||
#include "x86_ops_stack.h"
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
#ifdef IS_DYNAREC
|
||||
#define BS_common(start, end, dir, dest, time) \
|
||||
flags_rebuild(); \
|
||||
if (temp) \
|
||||
{ \
|
||||
int c; \
|
||||
cpu_state.flags &= ~Z_FLAG; \
|
||||
for (c = start; c != end; c += dir) \
|
||||
{ \
|
||||
CLOCK_CYCLES(time); \
|
||||
if (temp & (1 << c)) \
|
||||
{ \
|
||||
dest = c; \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
else \
|
||||
cpu_state.flags |= Z_FLAG;
|
||||
#else
|
||||
#define BS_common(start, end, dir, dest, time) \
|
||||
flags_rebuild(); \
|
||||
instr_cycles = 0; \
|
||||
@@ -18,11 +38,14 @@
|
||||
} \
|
||||
else \
|
||||
cpu_state.flags |= Z_FLAG;
|
||||
#endif
|
||||
|
||||
static int opBSF_w_a16(uint32_t fetchdat)
|
||||
{
|
||||
uint16_t temp;
|
||||
#ifndef IS_DYNAREC
|
||||
int instr_cycles = 0;
|
||||
#endif
|
||||
|
||||
fetch_ea_16(fetchdat);
|
||||
if (cpu_mod != 3)
|
||||
@@ -32,14 +55,18 @@ static int opBSF_w_a16(uint32_t fetchdat)
|
||||
BS_common(0, 16, 1, cpu_state.regs[cpu_reg].w, (is486) ? 1 : 3);
|
||||
|
||||
CLOCK_CYCLES((is486) ? 6 : 10);
|
||||
#ifndef IS_DYNAREC
|
||||
instr_cycles += ((is486) ? 6 : 10);
|
||||
PREFETCH_RUN(instr_cycles, 2, rmdat, (cpu_mod == 3) ? 0:1,0,0,0, 0);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
static int opBSF_w_a32(uint32_t fetchdat)
|
||||
{
|
||||
uint16_t temp;
|
||||
#ifndef IS_DYNAREC
|
||||
int instr_cycles = 0;
|
||||
#endif
|
||||
|
||||
fetch_ea_32(fetchdat);
|
||||
if (cpu_mod != 3)
|
||||
@@ -49,14 +76,18 @@ static int opBSF_w_a32(uint32_t fetchdat)
|
||||
BS_common(0, 16, 1, cpu_state.regs[cpu_reg].w, (is486) ? 1 : 3);
|
||||
|
||||
CLOCK_CYCLES((is486) ? 6 : 10);
|
||||
#ifndef IS_DYNAREC
|
||||
instr_cycles += ((is486) ? 6 : 10);
|
||||
PREFETCH_RUN(instr_cycles, 2, rmdat, (cpu_mod == 3) ? 0:1,0,0,0, 1);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
static int opBSF_l_a16(uint32_t fetchdat)
|
||||
{
|
||||
uint32_t temp;
|
||||
#ifndef IS_DYNAREC
|
||||
int instr_cycles = 0;
|
||||
#endif
|
||||
|
||||
fetch_ea_16(fetchdat);
|
||||
if (cpu_mod != 3)
|
||||
@@ -66,14 +97,18 @@ static int opBSF_l_a16(uint32_t fetchdat)
|
||||
BS_common(0, 32, 1, cpu_state.regs[cpu_reg].l, (is486) ? 1 : 3);
|
||||
|
||||
CLOCK_CYCLES((is486) ? 6 : 10);
|
||||
#ifndef IS_DYNAREC
|
||||
instr_cycles += ((is486) ? 6 : 10);
|
||||
PREFETCH_RUN(instr_cycles, 2, rmdat, 0,(cpu_mod == 3) ? 0:1,0,0, 0);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
static int opBSF_l_a32(uint32_t fetchdat)
|
||||
{
|
||||
uint32_t temp;
|
||||
#ifndef IS_DYNAREC
|
||||
int instr_cycles = 0;
|
||||
#endif
|
||||
|
||||
fetch_ea_32(fetchdat);
|
||||
if (cpu_mod != 3)
|
||||
@@ -83,15 +118,19 @@ static int opBSF_l_a32(uint32_t fetchdat)
|
||||
BS_common(0, 32, 1, cpu_state.regs[cpu_reg].l, (is486) ? 1 : 3);
|
||||
|
||||
CLOCK_CYCLES((is486) ? 6 : 10);
|
||||
#ifndef IS_DYNAREC
|
||||
instr_cycles += ((is486) ? 6 : 10);
|
||||
PREFETCH_RUN(instr_cycles, 2, rmdat, 0,(cpu_mod == 3) ? 0:1,0,0, 1);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int opBSR_w_a16(uint32_t fetchdat)
|
||||
{
|
||||
uint16_t temp;
|
||||
#ifndef IS_DYNAREC
|
||||
int instr_cycles = 0;
|
||||
#endif
|
||||
|
||||
fetch_ea_16(fetchdat);
|
||||
if (cpu_mod != 3)
|
||||
@@ -101,14 +140,18 @@ static int opBSR_w_a16(uint32_t fetchdat)
|
||||
BS_common(15, -1, -1, cpu_state.regs[cpu_reg].w, 3);
|
||||
|
||||
CLOCK_CYCLES((is486) ? 6 : 10);
|
||||
#ifndef IS_DYNAREC
|
||||
instr_cycles += ((is486) ? 6 : 10);
|
||||
PREFETCH_RUN(instr_cycles, 2, rmdat, (cpu_mod == 3) ? 0:1,0,0,0, 0);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
static int opBSR_w_a32(uint32_t fetchdat)
|
||||
{
|
||||
uint16_t temp;
|
||||
#ifndef IS_DYNAREC
|
||||
int instr_cycles = 0;
|
||||
#endif
|
||||
|
||||
fetch_ea_32(fetchdat);
|
||||
if (cpu_mod != 3)
|
||||
@@ -118,14 +161,18 @@ static int opBSR_w_a32(uint32_t fetchdat)
|
||||
BS_common(15, -1, -1, cpu_state.regs[cpu_reg].w, 3);
|
||||
|
||||
CLOCK_CYCLES((is486) ? 6 : 10);
|
||||
#ifndef IS_DYNAREC
|
||||
instr_cycles += ((is486) ? 6 : 10);
|
||||
PREFETCH_RUN(instr_cycles, 2, rmdat, (cpu_mod == 3) ? 0:1,0,0,0, 1);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
static int opBSR_l_a16(uint32_t fetchdat)
|
||||
{
|
||||
uint32_t temp;
|
||||
#ifndef IS_DYNAREC
|
||||
int instr_cycles = 0;
|
||||
#endif
|
||||
|
||||
fetch_ea_16(fetchdat);
|
||||
if (cpu_mod != 3)
|
||||
@@ -135,14 +182,18 @@ static int opBSR_l_a16(uint32_t fetchdat)
|
||||
BS_common(31, -1, -1, cpu_state.regs[cpu_reg].l, 3);
|
||||
|
||||
CLOCK_CYCLES((is486) ? 6 : 10);
|
||||
#ifndef IS_DYNAREC
|
||||
instr_cycles += ((is486) ? 6 : 10);
|
||||
PREFETCH_RUN(instr_cycles, 2, rmdat, 0,(cpu_mod == 3) ? 0:1,0,0, 0);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
static int opBSR_l_a32(uint32_t fetchdat)
|
||||
{
|
||||
uint32_t temp;
|
||||
#ifndef IS_DYNAREC
|
||||
int instr_cycles = 0;
|
||||
#endif
|
||||
|
||||
fetch_ea_32(fetchdat);
|
||||
if (cpu_mod != 3)
|
||||
@@ -152,7 +203,9 @@ static int opBSR_l_a32(uint32_t fetchdat)
|
||||
BS_common(31, -1, -1, cpu_state.regs[cpu_reg].l, 3);
|
||||
|
||||
CLOCK_CYCLES((is486) ? 6 : 10);
|
||||
#ifndef IS_DYNAREC
|
||||
instr_cycles += ((is486) ? 6 : 10);
|
||||
PREFETCH_RUN(instr_cycles, 2, rmdat, 0,(cpu_mod == 3) ? 0:1,0,0, 1);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
703
src/cpu/x86_ops_rep_dyn.h
Normal file
703
src/cpu/x86_ops_rep_dyn.h
Normal file
@@ -0,0 +1,703 @@
|
||||
#define REP_OPS(size, CNT_REG, SRC_REG, DEST_REG) \
|
||||
static int opREP_INSB_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
addr64 = 0x00000000; \
|
||||
\
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
uint8_t temp; \
|
||||
\
|
||||
SEG_CHECK_WRITE(&cpu_state.seg_es); \
|
||||
check_io_perm(DX); \
|
||||
CHECK_WRITE(&cpu_state.seg_es, DEST_REG, DEST_REG); \
|
||||
high_page = 0; \
|
||||
do_mmut_wb(es, DEST_REG, &addr64); \
|
||||
if (cpu_state.abrt) return 1; \
|
||||
temp = inb(DX); \
|
||||
writememb_n(es, DEST_REG, addr64, temp); if (cpu_state.abrt) return 1; \
|
||||
\
|
||||
if (cpu_state.flags & D_FLAG) DEST_REG--; \
|
||||
else DEST_REG++; \
|
||||
CNT_REG--; \
|
||||
cycles -= 15; \
|
||||
} \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
static int opREP_INSW_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
addr64a[0] = addr64a[1] = 0x00000000; \
|
||||
\
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
uint16_t temp; \
|
||||
\
|
||||
SEG_CHECK_WRITE(&cpu_state.seg_es); \
|
||||
check_io_perm(DX); \
|
||||
check_io_perm(DX+1); \
|
||||
CHECK_WRITE(&cpu_state.seg_es, DEST_REG, DEST_REG + 1UL); \
|
||||
high_page = 0; \
|
||||
do_mmut_ww(es, DEST_REG, addr64a); \
|
||||
if (cpu_state.abrt) return 1; \
|
||||
temp = inw(DX); \
|
||||
writememw_n(es, DEST_REG, addr64a, temp); if (cpu_state.abrt) return 1; \
|
||||
\
|
||||
if (cpu_state.flags & D_FLAG) DEST_REG -= 2; \
|
||||
else DEST_REG += 2; \
|
||||
CNT_REG--; \
|
||||
cycles -= 15; \
|
||||
} \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
static int opREP_INSL_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
addr64a[0] = addr64a[1] = addr64a[2] = addr64a[3] = 0x00000000; \
|
||||
\
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
uint32_t temp; \
|
||||
\
|
||||
SEG_CHECK_WRITE(&cpu_state.seg_es); \
|
||||
check_io_perm(DX); \
|
||||
check_io_perm(DX+1); \
|
||||
check_io_perm(DX+2); \
|
||||
check_io_perm(DX+3); \
|
||||
CHECK_WRITE(&cpu_state.seg_es, DEST_REG, DEST_REG + 3UL); \
|
||||
high_page = 0; \
|
||||
do_mmut_wl(es, DEST_REG, addr64a); \
|
||||
if (cpu_state.abrt) return 1; \
|
||||
temp = inl(DX); \
|
||||
writememl_n(es, DEST_REG, addr64a, temp); if (cpu_state.abrt) return 1; \
|
||||
\
|
||||
if (cpu_state.flags & D_FLAG) DEST_REG -= 4; \
|
||||
else DEST_REG += 4; \
|
||||
CNT_REG--; \
|
||||
cycles -= 15; \
|
||||
} \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
\
|
||||
static int opREP_OUTSB_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
uint8_t temp; \
|
||||
SEG_CHECK_READ(cpu_state.ea_seg); \
|
||||
CHECK_READ(cpu_state.ea_seg, SRC_REG, SRC_REG); \
|
||||
temp = readmemb(cpu_state.ea_seg->base, SRC_REG); if (cpu_state.abrt) return 1; \
|
||||
check_io_perm(DX); \
|
||||
outb(DX, temp); \
|
||||
if (cpu_state.flags & D_FLAG) SRC_REG--; \
|
||||
else SRC_REG++; \
|
||||
CNT_REG--; \
|
||||
cycles -= 14; \
|
||||
} \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
static int opREP_OUTSW_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
uint16_t temp; \
|
||||
SEG_CHECK_READ(cpu_state.ea_seg); \
|
||||
CHECK_READ(cpu_state.ea_seg, SRC_REG, SRC_REG + 1UL); \
|
||||
temp = readmemw(cpu_state.ea_seg->base, SRC_REG); if (cpu_state.abrt) return 1; \
|
||||
check_io_perm(DX); \
|
||||
check_io_perm(DX+1); \
|
||||
outw(DX, temp); \
|
||||
if (cpu_state.flags & D_FLAG) SRC_REG -= 2; \
|
||||
else SRC_REG += 2; \
|
||||
CNT_REG--; \
|
||||
cycles -= 14; \
|
||||
} \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
static int opREP_OUTSL_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
uint32_t temp; \
|
||||
SEG_CHECK_READ(cpu_state.ea_seg); \
|
||||
CHECK_READ(cpu_state.ea_seg, SRC_REG, SRC_REG + 3UL); \
|
||||
temp = readmeml(cpu_state.ea_seg->base, SRC_REG); if (cpu_state.abrt) return 1; \
|
||||
check_io_perm(DX); \
|
||||
check_io_perm(DX+1); \
|
||||
check_io_perm(DX+2); \
|
||||
check_io_perm(DX+3); \
|
||||
outl(DX, temp); \
|
||||
if (cpu_state.flags & D_FLAG) SRC_REG -= 4; \
|
||||
else SRC_REG += 4; \
|
||||
CNT_REG--; \
|
||||
cycles -= 14; \
|
||||
} \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
\
|
||||
static int opREP_MOVSB_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
|
||||
addr64 = addr64_2 = 0x00000000; \
|
||||
if (trap) \
|
||||
cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
SEG_CHECK_READ(cpu_state.ea_seg); \
|
||||
SEG_CHECK_WRITE(&cpu_state.seg_es); \
|
||||
} \
|
||||
while (CNT_REG > 0) \
|
||||
{ \
|
||||
uint8_t temp; \
|
||||
\
|
||||
CHECK_READ_REP(cpu_state.ea_seg, SRC_REG, SRC_REG); \
|
||||
high_page = 0; \
|
||||
do_mmut_rb(cpu_state.ea_seg->base, SRC_REG, &addr64) ; \
|
||||
if (cpu_state.abrt) break; \
|
||||
CHECK_WRITE_REP(&cpu_state.seg_es, DEST_REG, DEST_REG); \
|
||||
do_mmut_wb(es, DEST_REG, &addr64_2); \
|
||||
if (cpu_state.abrt) break; \
|
||||
temp = readmemb_n(cpu_state.ea_seg->base, SRC_REG, addr64); if (cpu_state.abrt) return 1; \
|
||||
writememb_n(es, DEST_REG, addr64_2, temp); if (cpu_state.abrt) return 1; \
|
||||
\
|
||||
if (cpu_state.flags & D_FLAG) { DEST_REG--; SRC_REG--; } \
|
||||
else { DEST_REG++; SRC_REG++; } \
|
||||
CNT_REG--; \
|
||||
cycles -= is486 ? 3 : 4; \
|
||||
if (cycles < cycles_end) \
|
||||
break; \
|
||||
} \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
static int opREP_MOVSW_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
|
||||
addr64a[0] = addr64a[1] = 0x00000000; \
|
||||
addr64a_2[0] = addr64a_2[1] = 0x00000000; \
|
||||
if (trap) \
|
||||
cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
SEG_CHECK_READ(cpu_state.ea_seg); \
|
||||
SEG_CHECK_WRITE(&cpu_state.seg_es); \
|
||||
} \
|
||||
while (CNT_REG > 0) \
|
||||
{ \
|
||||
uint16_t temp; \
|
||||
\
|
||||
CHECK_READ_REP(cpu_state.ea_seg, SRC_REG, SRC_REG + 1UL); \
|
||||
high_page = 0; \
|
||||
do_mmut_rw(cpu_state.ea_seg->base, SRC_REG, addr64a); \
|
||||
if (cpu_state.abrt) break; \
|
||||
CHECK_WRITE_REP(&cpu_state.seg_es, DEST_REG, DEST_REG + 1UL); \
|
||||
do_mmut_ww(es, DEST_REG, addr64a_2); \
|
||||
if (cpu_state.abrt) break; \
|
||||
temp = readmemw_n(cpu_state.ea_seg->base, SRC_REG, addr64a); if (cpu_state.abrt) return 1; \
|
||||
writememw_n(es, DEST_REG, addr64a_2, temp); if (cpu_state.abrt) return 1; \
|
||||
\
|
||||
if (cpu_state.flags & D_FLAG) { DEST_REG -= 2; SRC_REG -= 2; } \
|
||||
else { DEST_REG += 2; SRC_REG += 2; } \
|
||||
CNT_REG--; \
|
||||
cycles -= is486 ? 3 : 4; \
|
||||
if (cycles < cycles_end) \
|
||||
break; \
|
||||
} \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
static int opREP_MOVSL_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
|
||||
addr64a[0] = addr64a[1] = addr64a[2] = addr64a[3] = 0x00000000; \
|
||||
addr64a_2[0] = addr64a_2[1] = addr64a_2[2] = addr64a_2[3] = 0x00000000; \
|
||||
if (trap) \
|
||||
cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
SEG_CHECK_READ(cpu_state.ea_seg); \
|
||||
SEG_CHECK_WRITE(&cpu_state.seg_es); \
|
||||
} \
|
||||
while (CNT_REG > 0) \
|
||||
{ \
|
||||
uint32_t temp; \
|
||||
\
|
||||
CHECK_READ_REP(cpu_state.ea_seg, SRC_REG, SRC_REG + 3UL); \
|
||||
high_page = 0; \
|
||||
do_mmut_rl(cpu_state.ea_seg->base, SRC_REG, addr64a); \
|
||||
if (cpu_state.abrt) break; \
|
||||
CHECK_WRITE_REP(&cpu_state.seg_es, DEST_REG, DEST_REG + 3UL); \
|
||||
do_mmut_wl(es, DEST_REG, addr64a_2); \
|
||||
if (cpu_state.abrt) break; \
|
||||
temp = readmeml_n(cpu_state.ea_seg->base, SRC_REG, addr64a); if (cpu_state.abrt) return 1; \
|
||||
writememl_n(es, DEST_REG, addr64a_2, temp); if (cpu_state.abrt) return 1; \
|
||||
\
|
||||
if (cpu_state.flags & D_FLAG) { DEST_REG -= 4; SRC_REG -= 4; } \
|
||||
else { DEST_REG += 4; SRC_REG += 4; } \
|
||||
CNT_REG--; \
|
||||
cycles -= is486 ? 3 : 4; \
|
||||
if (cycles < cycles_end) \
|
||||
break; \
|
||||
} \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
\
|
||||
\
|
||||
static int opREP_STOSB_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
|
||||
if (trap) \
|
||||
cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \
|
||||
if (CNT_REG > 0) \
|
||||
SEG_CHECK_WRITE(&cpu_state.seg_es); \
|
||||
while (CNT_REG > 0) \
|
||||
{ \
|
||||
CHECK_WRITE_REP(&cpu_state.seg_es, DEST_REG, DEST_REG); \
|
||||
writememb(es, DEST_REG, AL); if (cpu_state.abrt) return 1; \
|
||||
if (cpu_state.flags & D_FLAG) DEST_REG--; \
|
||||
else DEST_REG++; \
|
||||
CNT_REG--; \
|
||||
cycles -= is486 ? 4 : 5; \
|
||||
if (cycles < cycles_end) \
|
||||
break; \
|
||||
} \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
static int opREP_STOSW_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
|
||||
if (trap) \
|
||||
cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \
|
||||
if (CNT_REG > 0) \
|
||||
SEG_CHECK_WRITE(&cpu_state.seg_es); \
|
||||
while (CNT_REG > 0) \
|
||||
{ \
|
||||
CHECK_WRITE_REP(&cpu_state.seg_es, DEST_REG, DEST_REG + 1UL); \
|
||||
writememw(es, DEST_REG, AX); if (cpu_state.abrt) return 1; \
|
||||
if (cpu_state.flags & D_FLAG) DEST_REG -= 2; \
|
||||
else DEST_REG += 2; \
|
||||
CNT_REG--; \
|
||||
cycles -= is486 ? 4 : 5; \
|
||||
if (cycles < cycles_end) \
|
||||
break; \
|
||||
} \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
static int opREP_STOSL_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
|
||||
if (trap) \
|
||||
cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \
|
||||
if (CNT_REG > 0) \
|
||||
SEG_CHECK_WRITE(&cpu_state.seg_es); \
|
||||
while (CNT_REG > 0) \
|
||||
{ \
|
||||
CHECK_WRITE_REP(&cpu_state.seg_es, DEST_REG, DEST_REG + 3UL); \
|
||||
writememl(es, DEST_REG, EAX); if (cpu_state.abrt) return 1; \
|
||||
if (cpu_state.flags & D_FLAG) DEST_REG -= 4; \
|
||||
else DEST_REG += 4; \
|
||||
CNT_REG--; \
|
||||
cycles -= is486 ? 4 : 5; \
|
||||
if (cycles < cycles_end) \
|
||||
break; \
|
||||
} \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
\
|
||||
static int opREP_LODSB_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
|
||||
if (trap) \
|
||||
cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \
|
||||
if (CNT_REG > 0) \
|
||||
SEG_CHECK_READ(cpu_state.ea_seg); \
|
||||
while (CNT_REG > 0) \
|
||||
{ \
|
||||
CHECK_READ_REP(cpu_state.ea_seg, SRC_REG, SRC_REG); \
|
||||
AL = readmemb(cpu_state.ea_seg->base, SRC_REG); if (cpu_state.abrt) return 1; \
|
||||
if (cpu_state.flags & D_FLAG) SRC_REG--; \
|
||||
else SRC_REG++; \
|
||||
CNT_REG--; \
|
||||
cycles -= is486 ? 4 : 5; \
|
||||
if (cycles < cycles_end) \
|
||||
break; \
|
||||
} \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
static int opREP_LODSW_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
|
||||
if (trap) \
|
||||
cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \
|
||||
if (CNT_REG > 0) \
|
||||
SEG_CHECK_READ(cpu_state.ea_seg); \
|
||||
while (CNT_REG > 0) \
|
||||
{ \
|
||||
CHECK_READ_REP(cpu_state.ea_seg, SRC_REG, SRC_REG + 1UL); \
|
||||
AX = readmemw(cpu_state.ea_seg->base, SRC_REG); if (cpu_state.abrt) return 1; \
|
||||
if (cpu_state.flags & D_FLAG) SRC_REG -= 2; \
|
||||
else SRC_REG += 2; \
|
||||
CNT_REG--; \
|
||||
cycles -= is486 ? 4 : 5; \
|
||||
if (cycles < cycles_end) \
|
||||
break; \
|
||||
} \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
static int opREP_LODSL_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
|
||||
if (trap) \
|
||||
cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \
|
||||
if (CNT_REG > 0) \
|
||||
SEG_CHECK_READ(cpu_state.ea_seg); \
|
||||
while (CNT_REG > 0) \
|
||||
{ \
|
||||
CHECK_READ_REP(cpu_state.ea_seg, SRC_REG, SRC_REG + 3UL); \
|
||||
EAX = readmeml(cpu_state.ea_seg->base, SRC_REG); if (cpu_state.abrt) return 1; \
|
||||
if (cpu_state.flags & D_FLAG) SRC_REG -= 4; \
|
||||
else SRC_REG += 4; \
|
||||
CNT_REG--; \
|
||||
cycles -= is486 ? 4 : 5; \
|
||||
if (cycles < cycles_end) \
|
||||
break; \
|
||||
} \
|
||||
if (CNT_REG > 0) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
|
||||
|
||||
#define CHEK_READ(a, b, c)
|
||||
|
||||
|
||||
#define REP_OPS_CMPS_SCAS(size, CNT_REG, SRC_REG, DEST_REG, FV) \
|
||||
static int opREP_CMPSB_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
int tempz; \
|
||||
\
|
||||
addr64 = addr64_2 = 0x00000000; \
|
||||
\
|
||||
tempz = FV; \
|
||||
if ((CNT_REG > 0) && (FV == tempz)) \
|
||||
{ \
|
||||
uint8_t temp, temp2; \
|
||||
SEG_CHECK_READ(cpu_state.ea_seg); \
|
||||
SEG_CHECK_READ(&cpu_state.seg_es); \
|
||||
CHECK_READ(cpu_state.ea_seg, SRC_REG, SRC_REG); \
|
||||
high_page = uncached = 0; \
|
||||
do_mmut_rb(cpu_state.ea_seg->base, SRC_REG, &addr64); \
|
||||
if (cpu_state.abrt) return 1; \
|
||||
CHECK_READ(&cpu_state.seg_es, DEST_REG, DEST_REG); \
|
||||
do_mmut_rb2(es, DEST_REG, &addr64_2); \
|
||||
if (cpu_state.abrt) return 1; \
|
||||
temp = readmemb_n(cpu_state.ea_seg->base, SRC_REG, addr64); if (cpu_state.abrt) return 1; \
|
||||
if (uncached) \
|
||||
readlookup2[(uint32_t)(es+DEST_REG)>>12] = old_rl2; \
|
||||
temp2 = readmemb_n(es, DEST_REG, addr64_2); if (cpu_state.abrt) return 1; \
|
||||
if (uncached) \
|
||||
readlookup2[(uint32_t)(es+DEST_REG)>>12] = (uintptr_t) LOOKUP_INV; \
|
||||
\
|
||||
if (cpu_state.flags & D_FLAG) { DEST_REG--; SRC_REG--; } \
|
||||
else { DEST_REG++; SRC_REG++; } \
|
||||
CNT_REG--; \
|
||||
cycles -= is486 ? 7 : 9; \
|
||||
setsub8(temp, temp2); \
|
||||
tempz = (ZF_SET()) ? 1 : 0; \
|
||||
} \
|
||||
if ((CNT_REG > 0) && (FV == tempz)) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
static int opREP_CMPSW_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
int tempz; \
|
||||
\
|
||||
addr64a[0] = addr64a[1] = 0x00000000; \
|
||||
addr64a_2[0] = addr64a_2[1] = 0x00000000; \
|
||||
\
|
||||
tempz = FV; \
|
||||
if ((CNT_REG > 0) && (FV == tempz)) \
|
||||
{ \
|
||||
uint16_t temp, temp2; \
|
||||
SEG_CHECK_READ(cpu_state.ea_seg); \
|
||||
SEG_CHECK_READ(&cpu_state.seg_es); \
|
||||
CHECK_READ(cpu_state.ea_seg, SRC_REG, SRC_REG + 1UL); \
|
||||
high_page = uncached = 0; \
|
||||
do_mmut_rw(cpu_state.ea_seg->base, SRC_REG, addr64a); \
|
||||
if (cpu_state.abrt) return 1; \
|
||||
CHECK_READ(&cpu_state.seg_es, DEST_REG, DEST_REG + 1UL); \
|
||||
do_mmut_rw2(es, DEST_REG, addr64a_2); \
|
||||
if (cpu_state.abrt) return 1; \
|
||||
temp = readmemw_n(cpu_state.ea_seg->base, SRC_REG, addr64a); if (cpu_state.abrt) return 1; \
|
||||
if (uncached) \
|
||||
readlookup2[(uint32_t)(es+DEST_REG)>>12] = old_rl2; \
|
||||
temp2 = readmemw_n(es, DEST_REG, addr64a_2); if (cpu_state.abrt) return 1; \
|
||||
if (uncached) \
|
||||
readlookup2[(uint32_t)(es+DEST_REG)>>12] = (uintptr_t) LOOKUP_INV; \
|
||||
\
|
||||
if (cpu_state.flags & D_FLAG) { DEST_REG -= 2; SRC_REG -= 2; } \
|
||||
else { DEST_REG += 2; SRC_REG += 2; } \
|
||||
CNT_REG--; \
|
||||
cycles -= is486 ? 7 : 9; \
|
||||
setsub16(temp, temp2); \
|
||||
tempz = (ZF_SET()) ? 1 : 0; \
|
||||
} \
|
||||
if ((CNT_REG > 0) && (FV == tempz)) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
static int opREP_CMPSL_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
int tempz; \
|
||||
\
|
||||
addr64a[0] = addr64a[1] = addr64a[2] = addr64a[3] = 0x00000000; \
|
||||
addr64a_2[0] = addr64a_2[1] = addr64a_2[2] = addr64a_2[3] = 0x00000000; \
|
||||
\
|
||||
tempz = FV; \
|
||||
if ((CNT_REG > 0) && (FV == tempz)) \
|
||||
{ \
|
||||
uint32_t temp, temp2; \
|
||||
SEG_CHECK_READ(cpu_state.ea_seg); \
|
||||
SEG_CHECK_READ(&cpu_state.seg_es); \
|
||||
CHECK_READ(cpu_state.ea_seg, SRC_REG, SRC_REG + 3UL); \
|
||||
high_page = uncached = 0; \
|
||||
do_mmut_rl(cpu_state.ea_seg->base, SRC_REG, addr64a); \
|
||||
if (cpu_state.abrt) return 1; \
|
||||
CHECK_READ(&cpu_state.seg_es, DEST_REG, DEST_REG + 3UL); \
|
||||
do_mmut_rl2(es, DEST_REG, addr64a_2); \
|
||||
if (cpu_state.abrt) return 1; \
|
||||
temp = readmeml_n(cpu_state.ea_seg->base, SRC_REG, addr64a); if (cpu_state.abrt) return 1; \
|
||||
if (uncached) \
|
||||
readlookup2[(uint32_t)(es+DEST_REG)>>12] = old_rl2; \
|
||||
temp2 = readmeml_n(es, DEST_REG, addr64a_2); if (cpu_state.abrt) return 1; \
|
||||
if (uncached) \
|
||||
readlookup2[(uint32_t)(es+DEST_REG)>>12] = (uintptr_t) LOOKUP_INV; \
|
||||
\
|
||||
if (cpu_state.flags & D_FLAG) { DEST_REG -= 4; SRC_REG -= 4; } \
|
||||
else { DEST_REG += 4; SRC_REG += 4; } \
|
||||
CNT_REG--; \
|
||||
cycles -= is486 ? 7 : 9; \
|
||||
setsub32(temp, temp2); \
|
||||
tempz = (ZF_SET()) ? 1 : 0; \
|
||||
} \
|
||||
if ((CNT_REG > 0) && (FV == tempz)) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
\
|
||||
static int opREP_SCASB_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
int tempz; \
|
||||
int cycles_end = cycles - 1000; \
|
||||
if (trap) \
|
||||
cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \
|
||||
tempz = FV; \
|
||||
if ((CNT_REG > 0) && (FV == tempz)) \
|
||||
SEG_CHECK_READ(&cpu_state.seg_es); \
|
||||
while ((CNT_REG > 0) && (FV == tempz)) \
|
||||
{ \
|
||||
CHECK_READ_REP(&cpu_state.seg_es, DEST_REG, DEST_REG); \
|
||||
uint8_t temp = readmemb(es, DEST_REG); if (cpu_state.abrt) break;\
|
||||
setsub8(AL, temp); \
|
||||
tempz = (ZF_SET()) ? 1 : 0; \
|
||||
if (cpu_state.flags & D_FLAG) DEST_REG--; \
|
||||
else DEST_REG++; \
|
||||
CNT_REG--; \
|
||||
cycles -= is486 ? 5 : 8; \
|
||||
if (cycles < cycles_end) \
|
||||
break; \
|
||||
} \
|
||||
if ((CNT_REG > 0) && (FV == tempz)) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
static int opREP_SCASW_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
int tempz; \
|
||||
int cycles_end = cycles - 1000; \
|
||||
if (trap) \
|
||||
cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \
|
||||
tempz = FV; \
|
||||
if ((CNT_REG > 0) && (FV == tempz)) \
|
||||
SEG_CHECK_READ(&cpu_state.seg_es); \
|
||||
while ((CNT_REG > 0) && (FV == tempz)) \
|
||||
{ \
|
||||
CHECK_READ_REP(&cpu_state.seg_es, DEST_REG, DEST_REG + 1UL); \
|
||||
uint16_t temp = readmemw(es, DEST_REG); if (cpu_state.abrt) break;\
|
||||
setsub16(AX, temp); \
|
||||
tempz = (ZF_SET()) ? 1 : 0; \
|
||||
if (cpu_state.flags & D_FLAG) DEST_REG -= 2; \
|
||||
else DEST_REG += 2; \
|
||||
CNT_REG--; \
|
||||
cycles -= is486 ? 5 : 8; \
|
||||
if (cycles < cycles_end) \
|
||||
break; \
|
||||
} \
|
||||
if ((CNT_REG > 0) && (FV == tempz)) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
} \
|
||||
static int opREP_SCASL_ ## size(uint32_t fetchdat) \
|
||||
{ \
|
||||
int tempz; \
|
||||
int cycles_end = cycles - 1000; \
|
||||
if (trap) \
|
||||
cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \
|
||||
tempz = FV; \
|
||||
if ((CNT_REG > 0) && (FV == tempz)) \
|
||||
SEG_CHECK_READ(&cpu_state.seg_es); \
|
||||
while ((CNT_REG > 0) && (FV == tempz)) \
|
||||
{ \
|
||||
CHECK_READ_REP(&cpu_state.seg_es, DEST_REG, DEST_REG + 3UL); \
|
||||
uint32_t temp = readmeml(es, DEST_REG); if (cpu_state.abrt) break;\
|
||||
setsub32(EAX, temp); \
|
||||
tempz = (ZF_SET()) ? 1 : 0; \
|
||||
if (cpu_state.flags & D_FLAG) DEST_REG -= 4; \
|
||||
else DEST_REG += 4; \
|
||||
CNT_REG--; \
|
||||
cycles -= is486 ? 5 : 8; \
|
||||
if (cycles < cycles_end) \
|
||||
break; \
|
||||
} \
|
||||
if ((CNT_REG > 0) && (FV == tempz)) \
|
||||
{ \
|
||||
CPU_BLOCK_END(); \
|
||||
cpu_state.pc = cpu_state.oldpc; \
|
||||
return 1; \
|
||||
} \
|
||||
return cpu_state.abrt; \
|
||||
}
|
||||
|
||||
REP_OPS(a16, CX, SI, DI)
|
||||
REP_OPS(a32, ECX, ESI, EDI)
|
||||
REP_OPS_CMPS_SCAS(a16_NE, CX, SI, DI, 0)
|
||||
REP_OPS_CMPS_SCAS(a16_E, CX, SI, DI, 1)
|
||||
REP_OPS_CMPS_SCAS(a32_NE, ECX, ESI, EDI, 0)
|
||||
REP_OPS_CMPS_SCAS(a32_E, ECX, ESI, EDI, 1)
|
||||
|
||||
static int opREPNE(uint32_t fetchdat)
|
||||
{
|
||||
fetchdat = fastreadl(cs + cpu_state.pc);
|
||||
if (cpu_state.abrt) return 1;
|
||||
cpu_state.pc++;
|
||||
|
||||
CLOCK_CYCLES(2);
|
||||
if (x86_opcodes_REPNE[(fetchdat & 0xff) | cpu_state.op32])
|
||||
return x86_opcodes_REPNE[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
|
||||
return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
|
||||
}
|
||||
static int opREPE(uint32_t fetchdat)
|
||||
{
|
||||
fetchdat = fastreadl(cs + cpu_state.pc);
|
||||
if (cpu_state.abrt) return 1;
|
||||
cpu_state.pc++;
|
||||
|
||||
CLOCK_CYCLES(2);
|
||||
if (x86_opcodes_REPE[(fetchdat & 0xff) | cpu_state.op32])
|
||||
return x86_opcodes_REPE[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
|
||||
return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
|
||||
}
|
||||
@@ -321,7 +321,9 @@ static int opENTER_w(uint32_t fetchdat)
|
||||
uint16_t offset;
|
||||
int count;
|
||||
uint32_t tempEBP, tempESP, frame_ptr;
|
||||
#ifndef IS_DYNAREC
|
||||
int reads = 0, writes = 1, instr_cycles = 0;
|
||||
#endif
|
||||
uint16_t tempw;
|
||||
|
||||
offset = getwordf();
|
||||
@@ -342,20 +344,26 @@ static int opENTER_w(uint32_t fetchdat)
|
||||
PUSH_W(tempw);
|
||||
if (cpu_state.abrt) { ESP = tempESP; EBP = tempEBP; return 1; }
|
||||
CLOCK_CYCLES((is486) ? 3 : 4);
|
||||
#ifndef IS_DYNAREC
|
||||
reads++; writes++; instr_cycles += (is486) ? 3 : 4;
|
||||
#endif
|
||||
}
|
||||
PUSH_W(frame_ptr);
|
||||
if (cpu_state.abrt) { ESP = tempESP; EBP = tempEBP; return 1; }
|
||||
CLOCK_CYCLES((is486) ? 3 : 5);
|
||||
#ifndef IS_DYNAREC
|
||||
writes++; instr_cycles += (is486) ? 3 : 5;
|
||||
#endif
|
||||
}
|
||||
BP = frame_ptr;
|
||||
|
||||
if (stack32) ESP -= offset;
|
||||
else SP -= offset;
|
||||
CLOCK_CYCLES((is486) ? 14 : 10);
|
||||
#ifndef IS_DYNAREC
|
||||
instr_cycles += (is486) ? 14 : 10;
|
||||
PREFETCH_RUN(instr_cycles, 3, -1, reads,0,writes,0, 0);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
static int opENTER_l(uint32_t fetchdat)
|
||||
@@ -363,7 +371,9 @@ static int opENTER_l(uint32_t fetchdat)
|
||||
uint16_t offset;
|
||||
int count;
|
||||
uint32_t tempEBP, tempESP, frame_ptr;
|
||||
#ifndef IS_DYNAREC
|
||||
int reads = 0, writes = 1, instr_cycles = 0;
|
||||
#endif
|
||||
uint32_t templ;
|
||||
|
||||
offset = getwordf();
|
||||
@@ -383,20 +393,26 @@ static int opENTER_l(uint32_t fetchdat)
|
||||
PUSH_L(templ);
|
||||
if (cpu_state.abrt) { ESP = tempESP; EBP = tempEBP; return 1; }
|
||||
CLOCK_CYCLES((is486) ? 3 : 4);
|
||||
#ifndef IS_DYNAREC
|
||||
reads++; writes++; instr_cycles += (is486) ? 3 : 4;
|
||||
#endif
|
||||
}
|
||||
PUSH_L(frame_ptr);
|
||||
if (cpu_state.abrt) { ESP = tempESP; EBP = tempEBP; return 1; }
|
||||
CLOCK_CYCLES((is486) ? 3 : 5);
|
||||
#ifndef IS_DYNAREC
|
||||
writes++; instr_cycles += (is486) ? 3 : 5;
|
||||
#endif
|
||||
}
|
||||
EBP = frame_ptr;
|
||||
|
||||
if (stack32) ESP -= offset;
|
||||
else SP -= offset;
|
||||
CLOCK_CYCLES((is486) ? 14 : 10);
|
||||
#ifndef IS_DYNAREC
|
||||
instr_cycles += (is486) ? 14 : 10;
|
||||
PREFETCH_RUN(instr_cycles, 3, -1, reads,0,writes,0, 0);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -258,9 +258,6 @@ do_seg_load(x86seg *s, uint16_t *segdat)
|
||||
else
|
||||
cpu_cur_status |= CPU_STATUS_NOTFLATSS;
|
||||
}
|
||||
|
||||
if (s->base == 0xffffffff)
|
||||
fatal("do_seg_load(): %04X%04X%04X%04X\n", segdat[3], segdat[2], segdat[1], segdat[0]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -31,8 +31,7 @@
|
||||
|
||||
#define CLAMP(a, min, max) (((a) < (min)) ? (min) : (((a) > (max)) ? (max) : (a)))
|
||||
/* Formulas and factors derived from Linux's gl518sm.c driver. */
|
||||
#define GL518SM_RPMDIV(r, d) (CLAMP((r), 1, 960000) * (d))
|
||||
#define GL518SM_RPM_TO_REG(r, d) ((r) ? CLAMP((480000 + GL518SM_RPMDIV(r, d) / 2) / GL518SM_RPMDIV(r, d), 1, 255) : 0)
|
||||
#define GL518SM_RPM_TO_REG(r, d) ((r) ? CLAMP((480000 + (r) * (d) / 2) / (r) * (d), 1, 255) : 0)
|
||||
#define GL518SM_VOLTAGE_TO_REG(v) ((uint8_t) round((v) / 19.0))
|
||||
#define GL518SM_VDD_TO_REG(v) ((uint8_t) (((v) * 4) / 95.0))
|
||||
|
||||
|
||||
@@ -683,16 +683,34 @@ isamem_close(void *priv)
|
||||
static const device_config_t ibmxt_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"size", "Memory Size", CONFIG_SPINNER, "", 128, "",
|
||||
{ 0, 512, 16 },
|
||||
{ { 0 } }
|
||||
.name = "size",
|
||||
.description = "Memory Size",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 128,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 512,
|
||||
.step = 16
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{
|
||||
"start", "Start Address", CONFIG_SPINNER, "", 256, "",
|
||||
{ 0, 576, 64 },
|
||||
{ { 0 } }
|
||||
.name = "start",
|
||||
.description = "Start Address",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 256,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 576,
|
||||
.step = 64
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -713,16 +731,34 @@ static const device_t ibmxt_device = {
|
||||
static const device_config_t genericxt_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"size", "Memory Size", CONFIG_SPINNER, "", 16, "",
|
||||
{ 0, 640, 16 },
|
||||
{ { 0 } }
|
||||
.name = "size",
|
||||
.description = "Memory Size",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 16,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 640,
|
||||
.step = 16
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{
|
||||
"start", "Start Address", CONFIG_SPINNER, "", 0, "",
|
||||
{ 0, 624, 16 },
|
||||
{ { 0 } }
|
||||
.name = "start",
|
||||
.description = "Start Address",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 624,
|
||||
.step = 16
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -743,16 +779,34 @@ static const device_t genericxt_device = {
|
||||
static const device_config_t msramcard_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"size", "Memory Size", CONFIG_SPINNER, "", 64, "",
|
||||
{ 0, 256, 64 },
|
||||
{ { 0 } }
|
||||
.name = "size",
|
||||
.description = "Memory Size",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 64,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 256,
|
||||
.step = 64
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{
|
||||
"start", "Start Address", CONFIG_SPINNER, "", 0, "",
|
||||
{ 0, 624, 64 },
|
||||
{ { 0 } }
|
||||
.name = "start",
|
||||
.description = "Start Address",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 624,
|
||||
.step = 64
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -773,16 +827,34 @@ static const device_t msramcard_device = {
|
||||
static const device_config_t mssystemcard_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"size", "Memory Size", CONFIG_SPINNER, "", 64, "",
|
||||
{ 0, 256, 64 },
|
||||
{ { 0 } }
|
||||
.name = "size",
|
||||
.description = "Memory Size",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 64,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 256,
|
||||
.step = 64
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{
|
||||
"start", "Start Address", CONFIG_SPINNER, "", 0, "",
|
||||
{ 0, 624, 64 },
|
||||
{ { 0 } }
|
||||
.name = "start",
|
||||
.description = "Start Address",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 624,
|
||||
.step = 64
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -803,16 +875,34 @@ static const device_t mssystemcard_device = {
|
||||
static const device_config_t ibmat_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"size", "Memory Size", CONFIG_SPINNER, "", 512, "",
|
||||
{ 0, 12288, 512 },
|
||||
{ { 0 } }
|
||||
.name = "size",
|
||||
.description = "Memory Size",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 512,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 12288,
|
||||
.step = 512
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{
|
||||
"start", "Start Address", CONFIG_SPINNER, "", 512, "",
|
||||
{ 0, 15872, 512 },
|
||||
{ { 0 } }
|
||||
.name = "start",
|
||||
.description = "Start Address",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 512,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 15872,
|
||||
.step = 512
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -833,16 +923,34 @@ static const device_t ibmat_device = {
|
||||
static const device_config_t genericat_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"size", "Memory Size", CONFIG_SPINNER, "", 512, "",
|
||||
{ 0, 16384, 512 },
|
||||
{ { 0 } }
|
||||
.name = "size",
|
||||
.description = "Memory Size",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 512,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 16384,
|
||||
.step = 512
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{
|
||||
"start", "Start Address", CONFIG_SPINNER, "", 512, "",
|
||||
{ 0, 15872, 128 },
|
||||
{ { 0 } }
|
||||
.name = "start",
|
||||
.description = "Start Address",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 512,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 15872,
|
||||
.step = 128
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -863,16 +971,34 @@ static const device_t genericat_device = {
|
||||
static const device_config_t p5pak_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"size", "Memory Size", CONFIG_SPINNER, "", 128, "",
|
||||
{ 0, 384, 64 },
|
||||
{ { 0 } }
|
||||
.name = "size",
|
||||
.description = "Memory Size",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 128,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 384,
|
||||
.step = 64
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{
|
||||
"start", "Start Address", CONFIG_SPINNER, "", 512, "",
|
||||
{ 64, 576, 64 },
|
||||
{ { 0 } }
|
||||
.name = "start",
|
||||
.description = "Start Address",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 512,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 64,
|
||||
.max = 576,
|
||||
.step = 64
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -894,16 +1020,34 @@ static const device_t p5pak_device = {
|
||||
static const device_config_t a6pak_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"size", "Memory Size", CONFIG_SPINNER, "", 64, "",
|
||||
{ 0, 576, 64 },
|
||||
{ { 0 } }
|
||||
.name = "size",
|
||||
.description = "Memory Size",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 64,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 576,
|
||||
.step = 64
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{
|
||||
"start", "Start Address", CONFIG_SPINNER, "", 256, "",
|
||||
{ 64, 512, 64 },
|
||||
{ { 0 } }
|
||||
.name = "start",
|
||||
.description = "Start Address",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 256,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 64,
|
||||
.max = 512,
|
||||
.step = 64
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -924,22 +1068,37 @@ static const device_t a6pak_device = {
|
||||
static const device_config_t ems5150_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"size", "Memory Size", CONFIG_SPINNER, "", 256, "",
|
||||
{ 0, 2048, 64 },
|
||||
{ { 0 } }
|
||||
.name = "size",
|
||||
.description = "Memory Size",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 256,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 2048,
|
||||
.step = 64
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0, "", { 0 },
|
||||
{
|
||||
{ "Disabled", 0x0000 },
|
||||
{ "Board 1", 0x0208 },
|
||||
{ "Board 2", 0x020a },
|
||||
{ "Board 3", 0x020c },
|
||||
{ "Board 4", 0x020e },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Disabled", .value = 0x0000 },
|
||||
{ .description = "Board 1", .value = 0x0208 },
|
||||
{ .description = "Board 2", .value = 0x020a },
|
||||
{ .description = "Board 3", .value = 0x020c },
|
||||
{ .description = "Board 4", .value = 0x020e },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -960,58 +1119,109 @@ static const device_t ems5150_device = {
|
||||
static const device_config_t ev159_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"size", "Memory Size", CONFIG_SPINNER, "", 512, "",
|
||||
{ 0, 3072, 512 },
|
||||
{ { 0 } }
|
||||
.name = "size",
|
||||
.description = "Memory Size",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 512,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 3072,
|
||||
.step = 512
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{
|
||||
"start", "Start Address", CONFIG_SPINNER, "", 0, "",
|
||||
{ 0, 16128, 128 },
|
||||
{ { 0 } }
|
||||
.name = "start",
|
||||
.description = "Start Address",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 16128,
|
||||
.step = 128
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{
|
||||
"length", "Contiguous Size", CONFIG_SPINNER, "", 0, "",
|
||||
{ 0, 16384, 128 },
|
||||
{ { 0 } }
|
||||
.name = "length",
|
||||
.description = "Contiguous Size",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 16384,
|
||||
.step = 128
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{
|
||||
"width", "I/O Width", CONFIG_SELECTION, "", 0, "", { 0 },
|
||||
{
|
||||
{ "8-bit", 0 },
|
||||
{ "16-bit", 1 },
|
||||
{ "" }
|
||||
.name = "width",
|
||||
.description = "I/O Width",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "8-bit", .value = 0 },
|
||||
{ .description = "16-bit", .value = 1 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"speed", "Transfer Speed", CONFIG_SELECTION, "", 0, "", { 0 },
|
||||
{
|
||||
{ "Standard (150ns)", 0 },
|
||||
{ "High-Speed (120ns)", 1 },
|
||||
{ "" }
|
||||
.name = "speed",
|
||||
.description = "Transfer Speed",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Standard (150ns)", .value = 0 },
|
||||
{ .description = "High-Speed (120ns)", .value = 1 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"ems", "EMS mode", CONFIG_SELECTION, "", 0, "", { 0 },
|
||||
{
|
||||
{ "Disabled", 0 },
|
||||
{ "Enabled", 1 },
|
||||
{ "" }
|
||||
.name = "ems",
|
||||
.description = "EMS mode",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Disabled", .value = 0 },
|
||||
{ .description = "Enabled", .value = 1 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x0258, "", { 0 },
|
||||
{
|
||||
{ "208H", 0x0208 },
|
||||
{ "218H", 0x0218 },
|
||||
{ "258H", 0x0258 },
|
||||
{ "268H", 0x0268 },
|
||||
{ "2A8H", 0x02A8 },
|
||||
{ "2B8H", 0x02B8 },
|
||||
{ "2E8H", 0x02E8 },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x0258,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "208H", .value = 0x0208 },
|
||||
{ .description = "218H", .value = 0x0218 },
|
||||
{ .description = "258H", .value = 0x0258 },
|
||||
{ .description = "268H", .value = 0x0268 },
|
||||
{ .description = "2A8H", .value = 0x02A8 },
|
||||
{ .description = "2B8H", .value = 0x02B8 },
|
||||
{ .description = "2E8H", .value = 0x02E8 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -1033,47 +1243,79 @@ static const device_t ev159_device = {
|
||||
static const device_config_t brat_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x0258, "", { 0 },
|
||||
{
|
||||
{ "208H", 0x0208 },
|
||||
{ "218H", 0x0218 },
|
||||
{ "258H", 0x0258 },
|
||||
{ "268H", 0x0268 },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x0258,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "208H", .value = 0x0208 },
|
||||
{ .description = "218H", .value = 0x0218 },
|
||||
{ .description = "258H", .value = 0x0258 },
|
||||
{ .description = "268H", .value = 0x0268 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"frame", "Frame Address", CONFIG_HEX20, "", 0, "", { 0 },
|
||||
{
|
||||
{ "Disabled", 0x00000 },
|
||||
{ "D000H", 0xD0000 },
|
||||
{ "E000H", 0xE0000 },
|
||||
{ "" }
|
||||
.name = "frame",
|
||||
.description = "Frame Address",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Disabled", .value = 0x00000 },
|
||||
{ .description = "D000H", .value = 0xD0000 },
|
||||
{ .description = "E000H", .value = 0xE0000 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"width", "I/O Width", CONFIG_SELECTION, "", 8, "", { 0 },
|
||||
{
|
||||
{ "8-bit", 8 },
|
||||
{ "16-bit", 16 },
|
||||
{ "" }
|
||||
.name = "width",
|
||||
.description = "I/O Width",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 8,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "8-bit", .value = 8 },
|
||||
{ .description = "16-bit", .value = 16 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"speed", "Transfer Speed", CONFIG_SELECTION, "", 0, "", { 0 },
|
||||
{
|
||||
{ "Standard", 0 },
|
||||
{ "High-Speed", 1 },
|
||||
{ "" }
|
||||
.name = "speed",
|
||||
.description = "Transfer Speed",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Standard", .value = 0 },
|
||||
{ .description = "High-Speed", .value = 1 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"size", "Memory Size", CONFIG_SPINNER, "", 128,
|
||||
"",
|
||||
{ 0, 8192, 512 },
|
||||
{ { 0 } }
|
||||
.name = "size",
|
||||
.description = "Memory Size",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 128,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 8192,
|
||||
.step = 512
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -1096,50 +1338,83 @@ static const device_t brat_device = {
|
||||
static const device_config_t rampage_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x0258, "", { 0 },
|
||||
{
|
||||
{ "208H", 0x0208 },
|
||||
{ "218H", 0x0218 },
|
||||
{ "258H", 0x0258 },
|
||||
{ "268H", 0x0268 },
|
||||
{ "2A8H", 0x02A8 },
|
||||
{ "2B8H", 0x02B8 },
|
||||
{ "2E8H", 0x02E8 },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x0258,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "208H", .value = 0x0208 },
|
||||
{ .description = "218H", .value = 0x0218 },
|
||||
{ .description = "258H", .value = 0x0258 },
|
||||
{ .description = "268H", .value = 0x0268 },
|
||||
{ .description = "2A8H", .value = 0x02A8 },
|
||||
{ .description = "2B8H", .value = 0x02B8 },
|
||||
{ .description = "2E8H", .value = 0x02E8 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"frame", "Frame Address", CONFIG_HEX20, "", 0, "", { 0 },
|
||||
{
|
||||
{ "Disabled", 0x00000 },
|
||||
{ "C000H", 0xC0000 },
|
||||
{ "D000H", 0xD0000 },
|
||||
{ "E000H", 0xE0000 },
|
||||
{ "" }
|
||||
.name = "frame",
|
||||
.description = "Frame Address",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Disabled", .value = 0x00000 },
|
||||
{ .description = "C000H", .value = 0xC0000 },
|
||||
{ .description = "D000H", .value = 0xD0000 },
|
||||
{ .description = "E000H", .value = 0xE0000 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"width", "I/O Width", CONFIG_SELECTION, "", 8, "", { 0 },
|
||||
{
|
||||
{ "8-bit", 8 },
|
||||
{ "16-bit", 16 },
|
||||
{ "" }
|
||||
.name = "width",
|
||||
.description = "I/O Width",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 8,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "8-bit", .value = 8 },
|
||||
{ .description = "16-bit", .value = 16 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"speed", "Transfer Speed", CONFIG_SELECTION, "", 0, "", { 0 },
|
||||
{
|
||||
{ "Standard", 0 },
|
||||
{ "High-Speed", 1 },
|
||||
{ "" }
|
||||
.name = "speed",
|
||||
.description = "Transfer Speed",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Standard", .value = 0 },
|
||||
{ .description = "High-Speed", .value = 1 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"size", "Memory Size", CONFIG_SPINNER, "", 128, "",
|
||||
{ 0, 8192, 128 },
|
||||
{ { 0 } }
|
||||
.name = "size",
|
||||
.description = "Memory Size",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 128,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 8192,
|
||||
.step = 128
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -1162,50 +1437,83 @@ static const device_t rampage_device = {
|
||||
static const device_config_t iab_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x0258, "", { 0 },
|
||||
{
|
||||
{ "208H", 0x0208 },
|
||||
{ "218H", 0x0218 },
|
||||
{ "258H", 0x0258 },
|
||||
{ "268H", 0x0268 },
|
||||
{ "2A8H", 0x02A8 },
|
||||
{ "2B8H", 0x02B8 },
|
||||
{ "2E8H", 0x02E8 },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x0258,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "208H", .value = 0x0208 },
|
||||
{ .description = "218H", .value = 0x0218 },
|
||||
{ .description = "258H", .value = 0x0258 },
|
||||
{ .description = "268H", .value = 0x0268 },
|
||||
{ .description = "2A8H", .value = 0x02A8 },
|
||||
{ .description = "2B8H", .value = 0x02B8 },
|
||||
{ .description = "2E8H", .value = 0x02E8 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"frame", "Frame Address", CONFIG_HEX20, "", 0, "", { 0 },
|
||||
{
|
||||
{ "Disabled", 0x00000 },
|
||||
{ "C000H", 0xC0000 },
|
||||
{ "D000H", 0xD0000 },
|
||||
{ "E000H", 0xE0000 },
|
||||
{ "" }
|
||||
.name = "frame",
|
||||
.description = "Frame Address",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Disabled", .value = 0x00000 },
|
||||
{ .description = "C000H", .value = 0xC0000 },
|
||||
{ .description = "D000H", .value = 0xD0000 },
|
||||
{ .description = "E000H", .value = 0xE0000 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"width", "I/O Width", CONFIG_SELECTION, "", 8, "", { 0 },
|
||||
{
|
||||
{ "8-bit", 8 },
|
||||
{ "16-bit", 16 },
|
||||
{ "" }
|
||||
.name = "width",
|
||||
.description = "I/O Width",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 8,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "8-bit", .value = 8 },
|
||||
{ .description = "16-bit", .value = 16 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"speed", "Transfer Speed", CONFIG_SELECTION, "", 0, "", { 0 },
|
||||
{
|
||||
{ "Standard", 0 },
|
||||
{ "High-Speed", 1 },
|
||||
{ "" }
|
||||
.name = "speed",
|
||||
.description = "Transfer Speed",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Standard", .value = 0 },
|
||||
{ .description = "High-Speed", .value = 1 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"size", "Memory Size", CONFIG_SPINNER, "", 128, "",
|
||||
{ 0, 8192, 128 },
|
||||
{ { 0 } }
|
||||
.name = "size",
|
||||
.description = "Memory Size",
|
||||
.type = CONFIG_SPINNER,
|
||||
.default_string = "",
|
||||
.default_int = 128,
|
||||
.file_filter = "",
|
||||
.spinner = {
|
||||
.min = 0,
|
||||
.max = 8192,
|
||||
.step = 128
|
||||
},
|
||||
.selection = { { 0 } }
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
|
||||
@@ -696,71 +696,120 @@ bm_init(const device_t *info)
|
||||
static const device_config_t lt_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x23c, "", { 0 }, {
|
||||
{ "0x230", 0x230 },
|
||||
{ "0x234", 0x234 },
|
||||
{ "0x238", 0x238 },
|
||||
{ "0x23C", 0x23c },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x23c,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "0x230", .value = 0x230 },
|
||||
{ .description = "0x234", .value = 0x234 },
|
||||
{ .description = "0x238", .value = 0x238 },
|
||||
{ .description = "0x23C", .value = 0x23c },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, {
|
||||
{ "IRQ 2", 2 },
|
||||
{ "IRQ 3", 3 },
|
||||
{ "IRQ 4", 4 },
|
||||
{ "IRQ 5", 5 },
|
||||
{ "" }
|
||||
.name = "irq",
|
||||
.description = "IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 5,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "IRQ 2", .value = 2 },
|
||||
{ .description = "IRQ 3", .value = 3 },
|
||||
{ .description = "IRQ 4", .value = 4 },
|
||||
{ .description = "IRQ 5", .value = 5 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"hz", "Hz", CONFIG_SELECTION, "", 45, "", { 0 }, {
|
||||
{ "Non-timed (original)", 0 },
|
||||
{ "30 Hz (JMP2 = 1)", 30 },
|
||||
{ "45 Hz (JMP2 not populated)", 45 },
|
||||
{ "60 Hz (JMP 2 = 2)", 60 },
|
||||
{ "" }
|
||||
.name = "hz",
|
||||
.description = "Hz",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 45,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Non-timed (original)", .value = 0 },
|
||||
{ .description = "30 Hz (JMP2 = 1)", .value = 30 },
|
||||
{ .description = "45 Hz (JMP2 not populated)", .value = 45 },
|
||||
{ .description = "60 Hz (JMP 2 = 2)", .value = 60 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"buttons", "Buttons", CONFIG_SELECTION, "", 2, "", { 0 }, {
|
||||
{ "Two", 2 },
|
||||
{ "Three", 3 },
|
||||
{ "" }
|
||||
.name = "buttons",
|
||||
.description = "Buttons",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 2,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Two", .value = 2 },
|
||||
{ .description = "Three", .value = 3 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const device_config_t ms_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x23c, "", { 0 }, {
|
||||
{ "0x230", 0x230 },
|
||||
{ "0x234", 0x234 },
|
||||
{ "0x238", 0x238 },
|
||||
{ "0x23C", 0x23c },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x23c,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "0x230", .value = 0x230 },
|
||||
{ .description = "0x234", .value = 0x234 },
|
||||
{ .description = "0x238", .value = 0x238 },
|
||||
{ .description = "0x23C", .value = 0x23c },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, {
|
||||
{ "IRQ 2", 2 },
|
||||
{ "IRQ 3", 3 },
|
||||
{ "IRQ 4", 4 },
|
||||
{ "IRQ 5", 5 },
|
||||
{ "" }
|
||||
.name = "irq",
|
||||
.description = "IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 5,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "IRQ 2", .value = 2 },
|
||||
{ .description = "IRQ 3", .value = 3 },
|
||||
{ .description = "IRQ 4", .value = 4 },
|
||||
{ .description = "IRQ 5", .value = 5 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"buttons", "Buttons", CONFIG_SELECTION, "", 2, "", { 0 }, {
|
||||
{ "Two", 2 },
|
||||
{ "Three", 3 },
|
||||
{ "" }
|
||||
.name = "buttons",
|
||||
.description = "Buttons",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 2,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Two", .value = 2 },
|
||||
{ .description = "Three", .value = 3 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
|
||||
@@ -332,15 +332,22 @@ ps2_close(void *priv)
|
||||
static const device_config_t ps2_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"buttons", "Buttons", CONFIG_SELECTION, "", 2, "", { 0 }, {
|
||||
{ "Two", 2 },
|
||||
{ "Three", 3 },
|
||||
{ "Wheel", 4 },
|
||||
{ "" }
|
||||
.name = "buttons",
|
||||
.description = "Buttons",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 2,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Two", .value = 2 },
|
||||
{ .description = "Three", .value = 3 },
|
||||
{ .description = "Wheel", .value = 4 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"", "", -1
|
||||
.name = "", .description = "", .type = CONFIG_END
|
||||
}
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -828,50 +828,76 @@ sermouse_init(const device_t *info)
|
||||
return(dev);
|
||||
}
|
||||
|
||||
|
||||
static const device_config_t mssermouse_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"port", "Serial Port", CONFIG_SELECTION, "", 0, "", { 0 }, {
|
||||
{ "COM1", 0 },
|
||||
{ "COM2", 1 },
|
||||
{ "COM3", 2 },
|
||||
{ "COM4", 3 },
|
||||
{ "" }
|
||||
.name = "port",
|
||||
.description = "Serial Port",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "COM1", .value = 0 },
|
||||
{ .description = "COM2", .value = 1 },
|
||||
{ .description = "COM3", .value = 2 },
|
||||
{ .description = "COM4", .value = 3 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"buttons", "Buttons", CONFIG_SELECTION, "", 2, "", { 0 }, {
|
||||
{ "Two", 2 },
|
||||
{ "Three", 3 },
|
||||
{ "Wheel", 4 },
|
||||
{ "" }
|
||||
.name = "buttons",
|
||||
.description = "Buttons",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 2,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Two", .value = 2 },
|
||||
{ .description = "Three", .value = 3 },
|
||||
{ .description = "Wheel", .value = 4 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
|
||||
static const device_config_t ltsermouse_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"port", "Serial Port", CONFIG_SELECTION, "", 0, "", { 0 }, {
|
||||
{ "COM1", 0 },
|
||||
{ "COM2", 1 },
|
||||
{ "COM3", 2 },
|
||||
{ "COM4", 3 },
|
||||
{ "" }
|
||||
.name = "port",
|
||||
.description = "Serial Port",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "COM1", .value = 0 },
|
||||
{ .description = "COM2", .value = 1 },
|
||||
{ .description = "COM3", .value = 2 },
|
||||
{ .description = "COM4", .value = 3 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"buttons", "Buttons", CONFIG_SELECTION, "", 2, "", { 0 }, {
|
||||
{ "Two", 2 },
|
||||
{ "Three", 3 },
|
||||
{ "" }
|
||||
.name = "buttons",
|
||||
.description = "Buttons",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 2,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Two", .value = 2 },
|
||||
{ .description = "Three", .value = 3 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
|
||||
@@ -139,7 +139,6 @@ postcard_close(UNUSED(void *priv))
|
||||
NULL, NULL, NULL, postcard_write, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
const device_t postcard_device = {
|
||||
.name = "POST Card",
|
||||
.internal_name = "postcard",
|
||||
|
||||
@@ -88,6 +88,8 @@ discord_update_activity(int paused)
|
||||
if (paren)
|
||||
*(paren - 1) = '\0';
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-truncation"
|
||||
if (strlen(vm_name) < 100)
|
||||
{
|
||||
snprintf(activity.details, sizeof(activity.details), "Running \"%s\"", vm_name);
|
||||
@@ -98,6 +100,7 @@ discord_update_activity(int paused)
|
||||
strncpy(activity.details, strchr(machine_getname(), ']') + 2, sizeof(activity.details) - 1);
|
||||
snprintf(activity.state, sizeof(activity.state), "%s/%s", cpufamily, cpu_s->name);
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
activity.timestamps.start = time(NULL);
|
||||
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
*/
|
||||
#define _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
@@ -843,7 +841,6 @@ wd1007vse1_available(void)
|
||||
return(rom_present(BIOS_FILE));
|
||||
}
|
||||
|
||||
|
||||
const device_t esdi_at_wd1007vse1_device = {
|
||||
.name = "Western Digital WD1007V-SE1 (ESDI)",
|
||||
.internal_name = "esdi_at",
|
||||
|
||||
@@ -1178,7 +1178,6 @@ esdi_available(void)
|
||||
return(rom_present(BIOS_FILE_L) && rom_present(BIOS_FILE_H));
|
||||
}
|
||||
|
||||
|
||||
const device_t esdi_ps2_device = {
|
||||
.name = "IBM PS/2 ESDI Fixed Disk Adapter (MCA)",
|
||||
.internal_name = "esdi_mca",
|
||||
|
||||
@@ -17,9 +17,6 @@
|
||||
* Copyright 2008-2020 Sarah Walker.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
*/
|
||||
#define __USE_LARGEFILE64
|
||||
#define _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
@@ -3062,7 +3059,6 @@ ide_close(void *priv)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const device_t ide_isa_device = {
|
||||
.name = "ISA PC/AT IDE Controller",
|
||||
.internal_name = "ide_isa",
|
||||
@@ -3150,42 +3146,54 @@ const device_t ide_pci_2ch_device = {
|
||||
// clang-format off
|
||||
static const device_config_t ide_ter_config[] = {
|
||||
{
|
||||
"irq", "IRQ", CONFIG_SELECTION, "", 10, "", { 0 },
|
||||
{
|
||||
{ "Plug and Play", -1 },
|
||||
{ "IRQ 2", 2 },
|
||||
{ "IRQ 3", 3 },
|
||||
{ "IRQ 4", 4 },
|
||||
{ "IRQ 5", 5 },
|
||||
{ "IRQ 7", 7 },
|
||||
{ "IRQ 9", 9 },
|
||||
{ "IRQ 10", 10 },
|
||||
{ "IRQ 11", 11 },
|
||||
{ "IRQ 12", 12 },
|
||||
{ "" }
|
||||
.name = "irq",
|
||||
.description = "IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 10,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Plug and Play", .value = -1 },
|
||||
{ .description = "IRQ 2", .value = 2 },
|
||||
{ .description = "IRQ 3", .value = 3 },
|
||||
{ .description = "IRQ 4", .value = 4 },
|
||||
{ .description = "IRQ 5", .value = 5 },
|
||||
{ .description = "IRQ 7", .value = 7 },
|
||||
{ .description = "IRQ 9", .value = 9 },
|
||||
{ .description = "IRQ 10", .value = 10 },
|
||||
{ .description = "IRQ 11", .value = 11 },
|
||||
{ .description = "IRQ 12", .value = 12 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_config_t ide_qua_config[] = {
|
||||
{
|
||||
"irq", "IRQ", CONFIG_SELECTION, "", 11, "", { 0 },
|
||||
{
|
||||
{ "Plug and Play", -1 },
|
||||
{ "IRQ 2", 2 },
|
||||
{ "IRQ 3", 3 },
|
||||
{ "IRQ 4", 4 },
|
||||
{ "IRQ 5", 5 },
|
||||
{ "IRQ 7", 7 },
|
||||
{ "IRQ 9", 9 },
|
||||
{ "IRQ 10", 10 },
|
||||
{ "IRQ 11", 11 },
|
||||
{ "IRQ 12", 12 },
|
||||
{ "" }
|
||||
.name = "irq",
|
||||
.description = "IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 11,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Plug and Play", .value = -1 },
|
||||
{ .description = "IRQ 2", .value = 2 },
|
||||
{ .description = "IRQ 3", .value = 3 },
|
||||
{ .description = "IRQ 4", .value = 4 },
|
||||
{ .description = "IRQ 5", .value = 5 },
|
||||
{ .description = "IRQ 7", .value = 7 },
|
||||
{ .description = "IRQ 9", .value = 9 },
|
||||
{ .description = "IRQ 10", .value = 10 },
|
||||
{ .description = "IRQ 11", .value = 11 },
|
||||
{ .description = "IRQ 12", .value = 12 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
||||
@@ -491,7 +491,6 @@ cmd640_init(const device_t *info)
|
||||
return dev;
|
||||
}
|
||||
|
||||
|
||||
const device_t ide_cmd640_vlb_device = {
|
||||
.name = "CMD PCI-0640B VLB",
|
||||
.internal_name = "ide_cmd640_vlb",
|
||||
|
||||
@@ -406,7 +406,6 @@ cmd646_init(const device_t *info)
|
||||
return dev;
|
||||
}
|
||||
|
||||
|
||||
const device_t ide_cmd646_device = {
|
||||
.name = "CMD PCI-0646",
|
||||
.internal_name = "ide_cmd646",
|
||||
|
||||
@@ -311,7 +311,6 @@ opti611_init(const device_t *info)
|
||||
return dev;
|
||||
}
|
||||
|
||||
|
||||
const device_t ide_opti611_vlb_device = {
|
||||
.name = "OPTi 82C611/82C611A VLB",
|
||||
.internal_name = "ide_opti611_vlb",
|
||||
|
||||
@@ -584,7 +584,6 @@ static void
|
||||
return dev;
|
||||
}
|
||||
|
||||
|
||||
const device_t sff8038i_device =
|
||||
{
|
||||
.name = "SFF-8038i IDE Bus Master",
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
* Copyright 2008-2019 Sarah Walker.
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
*/
|
||||
#define __USE_LARGEFILE64
|
||||
#define _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
@@ -767,7 +764,6 @@ mfm_close(void *priv)
|
||||
ui_sb_update_icon(SB_HDD|HDD_BUS_MFM, 0);
|
||||
}
|
||||
|
||||
|
||||
const device_t st506_at_wd1003_device = {
|
||||
.name = "WD1003 AT MFM/RLL Controller",
|
||||
.internal_name = "st506_at",
|
||||
|
||||
@@ -67,9 +67,6 @@
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
#define __USE_LARGEFILE64
|
||||
#define _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
@@ -1638,122 +1635,194 @@ wd1004a_27x_available(void)
|
||||
// clang-format off
|
||||
static const device_config_t dtc_config[] = {
|
||||
{
|
||||
"bios_addr", "BIOS address", CONFIG_HEX20, "", 0xc8000, "", { 0 },
|
||||
{
|
||||
{ "Disabled", 0x00000 },
|
||||
{ "C800H", 0xc8000 },
|
||||
{ "CA00H", 0xca000 },
|
||||
{ "D800H", 0xd8000 },
|
||||
{ "F400H", 0xf4000 },
|
||||
{ "" }
|
||||
.name = "bios_addr",
|
||||
.description = "BIOS address",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "",
|
||||
.default_int = 0xc8000,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Disabled", .value = 0x00000 },
|
||||
{ .description = "C800H", .value = 0xc8000 },
|
||||
{ .description = "CA00H", .value = 0xca000 },
|
||||
{ .description = "D800H", .value = 0xd8000 },
|
||||
{ .description = "F400H", .value = 0xf4000 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_config_t st11_config[] = {
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x0320, "", { 0 },
|
||||
{
|
||||
{ "320H", 0x0320 },
|
||||
{ "324H", 0x0324 },
|
||||
{ "328H", 0x0328 },
|
||||
{ "32CH", 0x032c },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x0320,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "320H", .value = 0x0320 },
|
||||
{ .description = "324H", .value = 0x0324 },
|
||||
{ .description = "328H", .value = 0x0328 },
|
||||
{ .description = "32CH", .value = 0x032c },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 },
|
||||
{
|
||||
{ "IRQ 2", 2 },
|
||||
{ "IRQ 5", 5 },
|
||||
{ "" }
|
||||
.name = "irq",
|
||||
.description = "IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 5,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "IRQ 2", .value = 2 },
|
||||
{ .description = "IRQ 5", .value = 5 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"bios_addr", "BIOS address", CONFIG_HEX20, "", 0xc8000, "", { 0 },
|
||||
{
|
||||
{ "Disabled", 0x00000 },
|
||||
{ "C800H", 0xc8000 },
|
||||
{ "D000H", 0xd0000 },
|
||||
{ "D800H", 0xd8000 },
|
||||
{ "E000H", 0xe0000 },
|
||||
{ "" }
|
||||
.name = "bios_addr",
|
||||
.description = "BIOS address",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "",
|
||||
.default_int = 0xc8000,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Disabled", .value = 0x00000 },
|
||||
{ .description = "C800H", .value = 0xc8000 },
|
||||
{ .description = "D000H", .value = 0xd0000 },
|
||||
{ .description = "D800H", .value = 0xd8000 },
|
||||
{ .description = "E000H", .value = 0xe0000 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"revision", "Board Revision", CONFIG_SELECTION, "", 19, "", { 0 },
|
||||
{
|
||||
{ "Rev. 05 (v1.7)", 5 },
|
||||
{ "Rev. 19 (v2.0)", 19 },
|
||||
{ "" }
|
||||
.name = "revision",
|
||||
.description = "Board Revision",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 19,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Rev. 05 (v1.7)", .value = 5 },
|
||||
{ .description = "Rev. 19 (v2.0)", .value = 19 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_config_t wd_config[] = {
|
||||
{
|
||||
"bios_addr", "BIOS address", CONFIG_HEX20, "", 0xc8000, "", { 0 },
|
||||
{
|
||||
{ "Disabled", 0x00000 },
|
||||
{ "C800H", 0xc8000 },
|
||||
{ "" }
|
||||
.name = "bios_addr",
|
||||
.description = "BIOS address",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "",
|
||||
.default_int = 0xc8000,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Disabled", .value = 0x00000 },
|
||||
{ .description = "C800H", .value = 0xc8000 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x0320, "", { 0 },
|
||||
{
|
||||
{ "320H", 0x0320 },
|
||||
{ "324H", 0x0324 },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x0320,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "320H", .value = 0x0320 },
|
||||
{ .description = "324H", .value = 0x0324 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 },
|
||||
{
|
||||
{ "IRQ 2", 2 },
|
||||
{ "IRQ 5", 5 },
|
||||
{ "" }
|
||||
.name = "irq",
|
||||
.description = "IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 5,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "IRQ 2", .value = 2 },
|
||||
{ .description = "IRQ 5", .value = 5 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_config_t wd_rll_config[] = {
|
||||
{
|
||||
"bios_addr", "BIOS address", CONFIG_HEX20, "", 0xc8000, "", { 0 },
|
||||
{
|
||||
{ "Disabled", 0x00000 },
|
||||
{ "C800H", 0xc8000 },
|
||||
{ "" }
|
||||
.name = "bios_addr",
|
||||
.description = "BIOS address",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "",
|
||||
.default_int = 0xc8000,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Disabled", .value = 0x00000 },
|
||||
{ .description = "C800H", .value = 0xc8000 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x0320, "", { 0 },
|
||||
{
|
||||
{ "320H", 0x0320 },
|
||||
{ "324H", 0x0324 },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x0320,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "320H", .value = 0x0320 },
|
||||
{ .description = "324H", .value = 0x0324 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 },
|
||||
{
|
||||
{ "IRQ 2", 2 },
|
||||
{ "IRQ 5", 5 },
|
||||
{ "" }
|
||||
.name = "irq",
|
||||
.description = "IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 5,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "IRQ 2", .value = 2 },
|
||||
{ .description = "IRQ 5", .value = 5 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"translate", "Translate 26 -> 17", CONFIG_SELECTION, "", 0, "", { 0 },
|
||||
{
|
||||
{ "Off", 0 },
|
||||
{ "On", 1 },
|
||||
{ "" }
|
||||
.name = "translate",
|
||||
.description = "Translate 26 -> 17",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Off", .value = 0 },
|
||||
{ .description = "On", .value = 1 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_config_t wd1004a_config[] = {
|
||||
@@ -1799,7 +1868,7 @@ static const device_config_t wd1004a_config[] = {
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ .name = "", .description = "", .type = -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_config_t wd1004_rll_config[] = {
|
||||
@@ -1864,7 +1933,7 @@ static const device_config_t wd1004_rll_config[] = {
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ .name = "", .description = "", .type = -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
|
||||
@@ -84,9 +84,6 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#define __USE_LARGEFILE64
|
||||
#define _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
@@ -1102,34 +1099,51 @@ xta_close(void *priv)
|
||||
free(dev);
|
||||
}
|
||||
|
||||
|
||||
static const device_config_t wdxt150_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x0320, "", { 0 }, /*W2*/
|
||||
{
|
||||
{ "320H", 0x0320 },
|
||||
{ "324H", 0x0324 },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x0320,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 }, /*W2*/
|
||||
.selection = {
|
||||
{ .description = "320H", .value = 0x0320 },
|
||||
{ .description = "324H", .value = 0x0324 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, /*W3*/
|
||||
{
|
||||
{ "IRQ 5", 5 },
|
||||
{ "IRQ 4", 4 },
|
||||
{ "" }
|
||||
.name = "irq",
|
||||
.description = "IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 5,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 }, /*W3*/
|
||||
.selection = {
|
||||
{ .description = "IRQ 5", .value = 5 },
|
||||
{ .description = "IRQ 4", .value = 4 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"bios_addr", "BIOS Address", CONFIG_HEX20, "", 0xc8000, "", { 0 }, /*W1*/
|
||||
{
|
||||
{ "C800H", 0xc8000 },
|
||||
{ "CA00H", 0xca000 },
|
||||
{ "" }
|
||||
.name = "bios_addr",
|
||||
.description = "BIOS Address",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "",
|
||||
.default_int = 0xc8000,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 }, /*W1*/
|
||||
.selection = {
|
||||
{ .description = "C800H", .value = 0xc8000 },
|
||||
{ .description = "CA00H", .value = 0xca000 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format off
|
||||
};
|
||||
|
||||
|
||||
@@ -259,7 +259,6 @@ xtide_at_close(void *priv)
|
||||
free(xtide);
|
||||
}
|
||||
|
||||
|
||||
const device_t xtide_device = {
|
||||
.name = "PC/XT XTIDE",
|
||||
.internal_name = "xtide",
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2017,2018 Fred N. van Kempen.
|
||||
*/
|
||||
#define _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
@@ -29,6 +27,7 @@
|
||||
#include <errno.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include <86box/path.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/random.h>
|
||||
#include <86box/hdd.h>
|
||||
@@ -78,7 +77,7 @@ hdd_image_log(const char *fmt, ...)
|
||||
int
|
||||
image_is_hdi(const char *s)
|
||||
{
|
||||
if (! strcasecmp(plat_get_extension((char *) s), "HDI"))
|
||||
if (! strcasecmp(path_get_extension((char *) s), "HDI"))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
@@ -92,7 +91,7 @@ image_is_hdx(const char *s, int check_signature)
|
||||
uint64_t filelen;
|
||||
uint64_t signature;
|
||||
|
||||
if (! strcasecmp(plat_get_extension((char *) s), "HDX")) {
|
||||
if (! strcasecmp(path_get_extension((char *) s), "HDX")) {
|
||||
if (check_signature) {
|
||||
f = plat_fopen(s, "rb");
|
||||
if (!f)
|
||||
@@ -126,7 +125,7 @@ image_is_vhd(const char *s, int check_signature)
|
||||
{
|
||||
FILE* f;
|
||||
|
||||
if (! strcasecmp(plat_get_extension((char *) s), "VHD")) {
|
||||
if (! strcasecmp(path_get_extension((char *) s), "VHD")) {
|
||||
if (check_signature) {
|
||||
f = plat_fopen(s, "rb");
|
||||
if (!f)
|
||||
@@ -253,7 +252,7 @@ hdd_image_load(int id)
|
||||
|
||||
memset(empty_sector, 0, sizeof(empty_sector));
|
||||
if (fn) {
|
||||
plat_path_normalize(fn);
|
||||
path_normalize(fn);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <86box/device.h>
|
||||
#include <86box/scsi_device.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/path.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/ui.h>
|
||||
#include <86box/hdc.h>
|
||||
@@ -332,7 +333,7 @@ mo_load_abort(mo_t *dev)
|
||||
int
|
||||
image_is_mdi(const char *s)
|
||||
{
|
||||
if (! strcasecmp(plat_get_extension((char *) s), "MDI"))
|
||||
if (! strcasecmp(path_get_extension((char *) s), "MDI"))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
@@ -114,14 +114,20 @@ static int b215_available(void)
|
||||
static const device_config_t b215_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"bios_addr", "BIOS Address:", CONFIG_HEX20, "", 0xca000, "", { 0 },
|
||||
{
|
||||
{ "CA00H", 0xca000 },
|
||||
{ "CC00H", 0xcc000 },
|
||||
{ "" }
|
||||
.name = "bios_addr",
|
||||
.description = "BIOS Address:",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "",
|
||||
.default_int = 0xca000,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "CA00H", .value = 0xca000 },
|
||||
{ .description = "CC00H", .value = 0xcc000 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -138,4 +144,3 @@ const device_t fdc_b215_device = {
|
||||
.force_redraw = NULL,
|
||||
.config = b215_config
|
||||
};
|
||||
|
||||
|
||||
@@ -124,16 +124,22 @@ static int pii_158_available(void)
|
||||
static const device_config_t pii_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"bios_addr", "BIOS Address:", CONFIG_HEX20, "", 0xce000, "", { 0 },
|
||||
{
|
||||
{ "Disabled", 0 },
|
||||
{ "CA00H", 0xca000 },
|
||||
{ "CC00H", 0xcc000 },
|
||||
{ "CE00H", 0xce000 },
|
||||
{ "" }
|
||||
.name = "bios_addr",
|
||||
.description = "BIOS Address:",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "",
|
||||
.default_int = 0xce000,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Disabled", .value = 0 },
|
||||
{ .description = "CA00H", .value = 0xca000 },
|
||||
{ .description = "CC00H", .value = 0xcc000 },
|
||||
{ .description = "CE00H", .value = 0xce000 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/path.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/ui.h>
|
||||
#include <86box/fdd.h>
|
||||
@@ -485,7 +486,7 @@ fdd_load(int drive, char *fn)
|
||||
|
||||
if (!fn)
|
||||
return;
|
||||
p = plat_get_extension(fn);
|
||||
p = path_get_extension(fn);
|
||||
if (!p)
|
||||
return;
|
||||
f = plat_fopen(fn, "rb");
|
||||
|
||||
@@ -148,8 +148,6 @@ track_is_xdf(int drive, int side, int track)
|
||||
int max_high_id, expected_high_count, expected_low_count;
|
||||
uint8_t *r_map;
|
||||
uint8_t *n_map;
|
||||
char *data_base;
|
||||
char *cur_data;
|
||||
|
||||
effective_sectors = xdf_sectors = high_sectors = low_sectors = 0;
|
||||
|
||||
@@ -162,7 +160,6 @@ track_is_xdf(int drive, int side, int track)
|
||||
(dev->tracks[track][side].params[3] != 19)) return(0);
|
||||
|
||||
r_map = (uint8_t *)(dev->buffer + dev->tracks[track][side].r_map_offs);
|
||||
data_base = dev->buffer + dev->tracks[track][side].data_offs;
|
||||
|
||||
if (! track) {
|
||||
if (dev->tracks[track][side].params[4] != 2) return(0);
|
||||
@@ -197,7 +194,6 @@ track_is_xdf(int drive, int side, int track)
|
||||
|
||||
n_map = (uint8_t *) (dev->buffer + dev->tracks[track][side].n_map_offs);
|
||||
|
||||
cur_data = data_base;
|
||||
for (i = 0; i < dev->tracks[track][side].params[3]; i++) {
|
||||
effective_sectors++;
|
||||
if (!(r_map[i]) && !(n_map[i]))
|
||||
@@ -207,7 +203,6 @@ track_is_xdf(int drive, int side, int track)
|
||||
xdf_sectors++;
|
||||
dev->xdf_ordered_pos[(int) r_map[i]][side] = i;
|
||||
}
|
||||
cur_data += (128 << ((uint32_t) n_map[i]));
|
||||
}
|
||||
|
||||
if ((effective_sectors == 3) && (xdf_sectors == 3)) {
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <86box/86box.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/config.h>
|
||||
#include <86box/path.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdd_86f.h>
|
||||
@@ -644,7 +645,7 @@ img_load(int drive, char *fn)
|
||||
int size;
|
||||
int i;
|
||||
|
||||
ext = plat_get_extension(fn);
|
||||
ext = path_get_extension(fn);
|
||||
|
||||
d86f_unregister(drive);
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#else
|
||||
# include <arpa/inet.h>
|
||||
# include <sys/socket.h>
|
||||
# include <errno.h>
|
||||
#endif
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
@@ -37,6 +38,7 @@
|
||||
#include <86box/io.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/thread.h>
|
||||
#include <86box/gdbstub.h>
|
||||
|
||||
#define FAST_RESPONSE(s) \
|
||||
@@ -954,7 +956,7 @@ e14:
|
||||
/* Add our supported features to the end. */
|
||||
if (client->response_pos < (sizeof(client->response) - 1))
|
||||
client->response_pos += snprintf(&client->response[client->response_pos], sizeof(client->response) - client->response_pos,
|
||||
"PacketSize=%X;swbreak+;hwbreak+;qXfer:features:read+", sizeof(client->packet) - 1);
|
||||
"PacketSize=%lX;swbreak+;hwbreak+;qXfer:features:read+", sizeof(client->packet) - 1);
|
||||
break;
|
||||
} else if (!strcmp(client->response, "Xfer")) {
|
||||
/* Read the transfer object. */
|
||||
@@ -1101,6 +1103,7 @@ unknown:
|
||||
|
||||
case 'z': /* remove break/watchpoint */
|
||||
case 'Z': /* insert break/watchpoint */
|
||||
{
|
||||
gdbstub_breakpoint_t *breakpoint, *prev_breakpoint = NULL, **first_breakpoint;
|
||||
|
||||
/* Parse breakpoint type. */
|
||||
@@ -1222,6 +1225,7 @@ unknown:
|
||||
|
||||
/* Respond positively. */
|
||||
goto ok;
|
||||
}
|
||||
}
|
||||
end:
|
||||
/* Send response. */
|
||||
@@ -1655,7 +1659,11 @@ gdbstub_init()
|
||||
.sin_port = htons(port)
|
||||
};
|
||||
if (bind(gdbstub_socket, (struct sockaddr *) &bind_addr, sizeof(bind_addr)) == -1) {
|
||||
#ifdef _WIN32
|
||||
pclog("GDB Stub: Failed to bind on port %d (%d)\n", port, WSAGetLastError());
|
||||
#else
|
||||
pclog("GDB Stup: Failed to bind on port %d (%d)\n", port, errno);
|
||||
#endif
|
||||
gdbstub_socket = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
#ifdef MAX
|
||||
#undef MAX
|
||||
#endif
|
||||
#ifdef ABS
|
||||
#undef ABS
|
||||
#endif
|
||||
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
@@ -123,7 +126,6 @@ extern int confirm_reset, /* (C) enable reset confirmation */
|
||||
confirm_exit, /* (C) enable exit confirmation */
|
||||
confirm_save; /* (C) enable save confirmation */
|
||||
extern int enable_discord; /* (C) enable Discord integration */
|
||||
extern int enable_crashdump; /* (C) enable crash dump */
|
||||
|
||||
extern int is_pentium; /* TODO: Move back to cpu/cpu.h when it's figured out,
|
||||
how to remove that hack from the ET4000/W32p. */
|
||||
|
||||
@@ -90,7 +90,7 @@ typedef struct {
|
||||
const char *default_string;
|
||||
int default_int;
|
||||
const char *file_filter;
|
||||
device_config_spinner_t spinner;
|
||||
const device_config_spinner_t spinner;
|
||||
const device_config_selection_t selection[16];
|
||||
} device_config_t;
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
#ifndef EMU_GDBSTUB_H
|
||||
#define EMU_GDBSTUB_H
|
||||
#include <stdint.h>
|
||||
#include <86box/mem.h>
|
||||
|
||||
#define GDBSTUB_MEM_READ 0
|
||||
|
||||
@@ -22,76 +22,122 @@
|
||||
#ifndef EMU_MACHINE_H
|
||||
# define EMU_MACHINE_H
|
||||
|
||||
|
||||
/* Machine feature flags. */
|
||||
// #define MACHINE_PC 0x00000000 /* PC architecture */
|
||||
/* Feature flags for features. */
|
||||
#define MACHINE_NONMI 0x00000001 /* sys does not have NMI's */
|
||||
#define MACHINE_BUS_NONE 0x00000000 /* sys has no bus */
|
||||
/* Feature flags for BUS'es. */
|
||||
#define MACHINE_BUS_ISA 0x00000004 /* sys has ISA bus */
|
||||
#define MACHINE_BUS_ISA16 0x00000008 /* sys has ISA16 bus - PC/AT architecture */
|
||||
#define MACHINE_BUS_CBUS 0x00000010 /* sys has C-BUS bus */
|
||||
#define MACHINE_BUS_PS2 0x00000020 /* system has PS/2 keyboard and mouse ports */
|
||||
#define MACHINE_BUS_EISA 0x00000040 /* sys has EISA bus */
|
||||
#define MACHINE_BUS_VLB 0x00000080 /* sys has VL bus */
|
||||
#define MACHINE_BUS_MCA 0x00000100 /* sys has MCA bus */
|
||||
#define MACHINE_BUS_PCI 0x00000200 /* sys has PCI bus */
|
||||
#define MACHINE_BUS_PCMCIA 0x00000400 /* sys has PCMCIA bus */
|
||||
#define MACHINE_BUS_AGP 0x00000800 /* sys has AGP bus */
|
||||
#define MACHINE_BUS_AC97 0x00080000 /* sys has AC97 bus (ACR/AMR/CNR slot) */
|
||||
#define MACHINE_BUS_ISA 0x00000001 /* sys has ISA bus */
|
||||
#define MACHINE_BUS_CARTRIDGE 0x00000002 /* sys has two cartridge bays */
|
||||
#define MACHINE_BUS_ISA16 0x00000004 /* sys has ISA16 bus - PC/AT architecture */
|
||||
#define MACHINE_BUS_CBUS 0x00000008 /* sys has C-BUS bus */
|
||||
#define MACHINE_BUS_PS2 0x00000010 /* system has PS/2 keyboard and mouse ports */
|
||||
#define MACHINE_BUS_EISA 0x00000020 /* sys has EISA bus */
|
||||
#define MACHINE_BUS_VLB 0x00000040 /* sys has VL bus */
|
||||
#define MACHINE_BUS_MCA 0x00000080 /* sys has MCA bus */
|
||||
#define MACHINE_BUS_PCI 0x00000100 /* sys has PCI bus */
|
||||
#define MACHINE_BUS_PCMCIA 0x00000200 /* sys has PCMCIA bus */
|
||||
#define MACHINE_BUS_AGP 0x00000400 /* sys has AGP bus */
|
||||
#define MACHINE_BUS_AC97 0x00000800 /* sys has AC97 bus (ACR/AMR/CNR slot) */
|
||||
/* Aliases. */
|
||||
#define MACHINE_CARTRIDGE (MACHINE_BUS_CARTRIDGE) /* sys has two cartridge bays */
|
||||
/* Combined flags. */
|
||||
#define MACHINE_PC 0x00000004 /* sys is PC/XT-compatible (ISA) */
|
||||
#define MACHINE_AT 0x0000000C /* sys is AT-compatible (ISA + ISA16) */
|
||||
#define MACHINE_PC98 0x00000010 /* sys is NEC PC-98x1 series */
|
||||
#define MACHINE_EISA 0x0000004C /* sys is AT-compatible with EISA */
|
||||
#define MACHINE_VLB 0x0000008C /* sys is AT-compatible with VLB */
|
||||
#define MACHINE_VLB98 0x00000090 /* sys is NEC PC-98x1 series with VLB (did that even exist?) */
|
||||
#define MACHINE_VLBE 0x000000CC /* sys is AT-compatible with EISA and VLB */
|
||||
#define MACHINE_MCA 0x00000100 /* sys is MCA */
|
||||
#define MACHINE_PCI 0x0000020C /* sys is AT-compatible with PCI */
|
||||
#define MACHINE_PCI98 0x00000210 /* sys is NEC PC-98x1 series with PCI */
|
||||
#define MACHINE_PCIE 0x0000024C /* sys is AT-compatible with PCI, and EISA */
|
||||
#define MACHINE_PCIV 0x0000028C /* sys is AT-compatible with PCI and VLB */
|
||||
#define MACHINE_PCIVE 0x000002CC /* sys is AT-compatible with PCI, VLB, and EISA */
|
||||
#define MACHINE_PCMCIA 0x00000400 /* sys is AT-compatible laptop with PCMCIA */
|
||||
#define MACHINE_AGP 0x00000A0C /* sys is AT-compatible with AGP */
|
||||
#define MACHINE_AGP98 0x00000A10 /* sys is NEC PC-98x1 series with AGP (did that even exist?) */
|
||||
/* Feature flags for miscellaneous internal devices. */
|
||||
#define MACHINE_VIDEO 0x00001000 /* sys has int video */
|
||||
#define MACHINE_VIDEO_ONLY 0x00002000 /* sys has fixed video */
|
||||
#define MACHINE_MOUSE 0x00004000 /* sys has int mouse */
|
||||
#define MACHINE_SOUND 0x00008000 /* sys has int sound */
|
||||
#define MACHINE_FDC 0x00010000 /* sys has int FDC */
|
||||
#define MACHINE_NIC 0x00020000 /* sys has int NIC */
|
||||
#define MACHINE_GAMEPORT 0x00040000 /* sys has int game port */
|
||||
/* Combined flags. */
|
||||
#define MACHINE_VIDEO_FIXED 0x00003000 /* sys has fixed int video */
|
||||
/* Feature flags for internal storage controllers. */
|
||||
#define MACHINE_HDC 0x07FC0000 /* sys has int HDC */
|
||||
#define MACHINE_MFM 0x00100000 /* sys has int MFM/RLL */
|
||||
#define MACHINE_XTA 0x00200000 /* sys has int XTA */
|
||||
#define MACHINE_ESDI 0x00400000 /* sys has int ESDI */
|
||||
#define MACHINE_IDE_PRI 0x00800000 /* sys has int pri IDE/ATAPI */
|
||||
#define MACHINE_IDE_SEC 0x01000000 /* sys has int sec IDE/ATAPI */
|
||||
#define MACHINE_IDE_TER 0x02000000 /* sys has int ter IDE/ATAPI */
|
||||
#define MACHINE_IDE_QUA 0x04000000 /* sys has int qua IDE/ATAPI */
|
||||
#define MACHINE_SCSI_PRI 0x08000000 /* sys has int pri SCSI */
|
||||
#define MACHINE_SCSI_SEC 0x10000000 /* sys has int sec SCSI */
|
||||
#define MACHINE_USB 0x20000000 /* sys has int USB */
|
||||
/* Combined flags. */
|
||||
#define MACHINE_IDE 0x00800000 /* sys has int single IDE/ATAPI - mark as pri IDE/ATAPI */
|
||||
#define MACHINE_IDE_DUAL 0x01800000 /* sys has int dual IDE/ATAPI - mark as both pri and sec IDE/ATAPI */
|
||||
#define MACHINE_IDE_QUAD 0x07800000 /* sys has int quad IDE/ATAPI - mark as dual + both ter and and qua IDE/ATAPI */
|
||||
#define MACHINE_SCSI 0x08000000 /* sys has int single SCSI - mark as pri SCSI */
|
||||
#define MACHINE_SCSI_DUAL 0x18000000 /* sys has int dual SCSI - mark as both pri and sec SCSI */
|
||||
#define MACHINE_CARTRIDGE 0x20000000 /* sys has two cartridge bays */
|
||||
#define MACHINE_PC (MACHINE_BUS_ISA) /* sys is PC/XT-compatible (ISA) */
|
||||
#define MACHINE_AT (MACHINE_BUS_ISA | MACHINE_BUS_ISA16) /* sys is AT-compatible (ISA + ISA16) */
|
||||
#define MACHINE_PC98 (MACHINE_BUS_CBUS) /* sys is NEC PC-98x1 series */
|
||||
#define MACHINE_EISA (MACHINE_BUS_EISA | MACHINE_AT) /* sys is AT-compatible with EISA */
|
||||
#define MACHINE_VLB (MACHINE_BUS_VLB | MACHINE_AT) /* sys is AT-compatible with VLB */
|
||||
#define MACHINE_VLB98 (MACHINE_BUS_VLB | MACHINE_PC98) /* sys is NEC PC-98x1 series with VLB (did that even exist?) */
|
||||
#define MACHINE_VLBE (MACHINE_BUS_VLB | MACHINE_EISA) /* sys is AT-compatible with EISA and VLB */
|
||||
#define MACHINE_MCA (MACHINE_BUS_MCA) /* sys is MCA */
|
||||
#define MACHINE_PCI (MACHINE_BUS_PCI | MACHINE_AT) /* sys is AT-compatible with PCI */
|
||||
#define MACHINE_PCI98 (MACHINE_BUS_PCI | MACHINE_PC98) /* sys is NEC PC-98x1 series with PCI */
|
||||
#define MACHINE_PCIE (MACHINE_BUS_PCI | MACHINE_EISA) /* sys is AT-compatible with PCI, and EISA */
|
||||
#define MACHINE_PCIV (MACHINE_BUS_PCI | MACHINE_VLB) /* sys is AT-compatible with PCI and VLB */
|
||||
#define MACHINE_PCIVE (MACHINE_BUS_PCI | MACHINE_VLBE) /* sys is AT-compatible with PCI, VLB, and EISA */
|
||||
#define MACHINE_PCMCIA (MACHINE_BUS_PCMCIA | MACHINE_AT) /* sys is AT-compatible laptop with PCMCIA */
|
||||
#define MACHINE_AGP (MACHINE_BUS_AGP | MACHINE_PCI) /* sys is AT-compatible with AGP */
|
||||
#define MACHINE_AGP98 (MACHINE_BUS_AGP | MACHINE_PCI98) /* sys is NEC PC-98x1 series with AGP (did that even exist?) */
|
||||
|
||||
#define IS_ARCH(m, a) ((machines[m].flags & (a)) ? 1 : 0)
|
||||
#define IS_AT(m) (((machines[m].flags & 0x00000FC8) && !(machines[m].flags & MACHINE_PC98)) ? 1 : 0)
|
||||
#define MACHINE_PCJR (MACHINE_PC | MACHINE_CARTRIDGE) /* sys is PCjr */
|
||||
#define MACHINE_PS2 (MACHINE_AT | MACHINE_BUS_PS2) /* sys is PS/2 */
|
||||
#define MACHINE_PS2_MCA (MACHINE_MCA | MACHINE_BUS_PS2) /* sys is MCA PS/2 */
|
||||
#define MACHINE_PS2_VLB (MACHINE_VLB | MACHINE_BUS_PS2) /* sys is VLB PS/2 */
|
||||
#define MACHINE_PS2_PCI (MACHINE_PCI | MACHINE_BUS_PS2) /* sys is PCI PS/2 */
|
||||
#define MACHINE_PS2_PCIV (MACHINE_PCIV | MACHINE_BUS_PS2) /* sys is VLB/PCI PS/2 */
|
||||
#define MACHINE_PS2_AGP (MACHINE_AGP | MACHINE_BUS_PS2) /* sys is AGP PS/2 */
|
||||
#define MACHINE_PS2_A97 (MACHINE_PS2_AGP | MACHINE_BUS_AC97) /* sys is AGP/AC97 PS/2 */
|
||||
#define MACHINE_PS2_NOISA (MACHINE_PS2_AGP & ~MACHINE_AT) /* sys is AGP PS/2 without ISA */
|
||||
#define MACHINE_PS2_NOI97 (MACHINE_PS2_A97 & ~MACHINE_AT) /* sys is AGP/AC97 PS/2 without ISA */
|
||||
/* Feature flags for miscellaneous internal devices. */
|
||||
#define MACHINE_FLAGS_NONE 0x00000000 /* sys has no int devices */
|
||||
#define MACHINE_VIDEO 0x00000001 /* sys has int video */
|
||||
#define MACHINE_VIDEO_ONLY 0x00000002 /* sys has fixed video */
|
||||
#define MACHINE_MOUSE 0x00000004 /* sys has int mouse */
|
||||
#define MACHINE_FDC 0x00000008 /* sys has int FDC */
|
||||
#define MACHINE_LPT_PRI 0x00000010 /* sys has int pri LPT */
|
||||
#define MACHINE_LPT_SEC 0x00000020 /* sys has int sec LPT */
|
||||
#define MACHINE_UART_PRI 0x00000040 /* sys has int pri UART */
|
||||
#define MACHINE_UART_SEC 0x00000080 /* sys has int sec UART */
|
||||
#define MACHINE_UART_TER 0x00000100 /* sys has int ter UART */
|
||||
#define MACHINE_UART_QUA 0x00000200 /* sys has int qua UART */
|
||||
#define MACHINE_GAMEPORT 0x00000400 /* sys has int game port */
|
||||
#define MACHINE_SOUND 0x00000800 /* sys has int sound */
|
||||
#define MACHINE_NIC 0x00001000 /* sys has int NIC */
|
||||
#define MACHINE_MODEM 0x00002000 /* sys has int modem */
|
||||
/* Feature flags for advanced devices. */
|
||||
#define MACHINE_APM 0x00004000 /* sys has APM */
|
||||
#define MACHINE_ACPI 0x00008000 /* sys has ACPI */
|
||||
#define MACHINE_HWM 0x00010000 /* sys has hw monitor */
|
||||
/* Combined flags. */
|
||||
#define MACHINE_VIDEO_FIXED (MACHINE_VIDEO | MACHINE_VIDEO_ONLY) /* sys has fixed int video */
|
||||
#define MACHINE_SUPER_IO (MACHINE_FDC | MACHINE_LPT_PRI | MACHINE_UART_PRI | MACHINE_UART_SEC)
|
||||
#define MACHINE_SUPER_IO_GAME (MACHINE_SUPER_IO | MACHINE_GAMEPORT)
|
||||
#define MACHINE_SUPER_IO_DUAL (MACHINE_SUPER_IO | MACHINE_LPT_SEC | MACHINE_UART_TER | MACHINE_UART_QUA)
|
||||
#define MACHINE_AV (MACHINE_VIDEO | MACHINE_SOUND) /* sys has video and sound */
|
||||
#define MACHINE_AG (MACHINE_SOUND | MACHINE_GAMEPORT) /* sys has sound and game port */
|
||||
/* Feature flags for internal storage controllers. */
|
||||
#define MACHINE_HDC 0x03FE0000 /* sys has int HDC */
|
||||
#define MACHINE_MFM 0x00020000 /* sys has int MFM/RLL */
|
||||
#define MACHINE_XTA 0x00040000 /* sys has int XTA */
|
||||
#define MACHINE_ESDI 0x00080000 /* sys has int ESDI */
|
||||
#define MACHINE_IDE_PRI 0x00100000 /* sys has int pri IDE/ATAPI */
|
||||
#define MACHINE_IDE_SEC 0x00200000 /* sys has int sec IDE/ATAPI */
|
||||
#define MACHINE_IDE_TER 0x00400000 /* sys has int ter IDE/ATAPI */
|
||||
#define MACHINE_IDE_QUA 0x00800000 /* sys has int qua IDE/ATAPI */
|
||||
#define MACHINE_SCSI_PRI 0x01000000 /* sys has int pri SCSI */
|
||||
#define MACHINE_SCSI_SEC 0x02000000 /* sys has int sec SCSI */
|
||||
#define MACHINE_USB_PRI 0x04000000 /* sys has int pri USB */
|
||||
#define MACHINE_USB_SEC 0x08000000 /* sys has int sec USB */
|
||||
/* Combined flags. */
|
||||
#define MACHINE_IDE (MACHINE_IDE_PRI) /* sys has int single IDE/ATAPI - mark as pri IDE/ATAPI */
|
||||
#define MACHINE_IDE_DUAL (MACHINE_IDE_PRI | MACHINE_IDE_SEC) /* sys has int dual IDE/ATAPI - mark as both pri and sec IDE/ATAPI */
|
||||
#define MACHINE_IDE_DUALTQ (MACHINE_IDE_TER | MACHINE_IDE_QUA)
|
||||
#define MACHINE_IDE_QUAD (MACHINE_IDE_DUAL | MACHINE_IDE_DUALTQ) /* sys has int quad IDE/ATAPI - mark as dual + both ter and and qua IDE/ATAPI */
|
||||
#define MACHINE_SCSI (MACHINE_SCSI_PRI) /* sys has int single SCSI - mark as pri SCSI */
|
||||
#define MACHINE_SCSI_DUAL (MACHINE_SCSI_PRI | MACHINE_SCSI_SEC) /* sys has int dual SCSI - mark as both pri and sec SCSI */
|
||||
#define MACHINE_USB (MACHINE_USB_PRI)
|
||||
#define MACHINE_USB_DUAL (MACHINE_USB_PRI | MACHINE_USB_SEC)
|
||||
/* Special combined flags. */
|
||||
#define MACHINE_PIIX (MACHINE_IDE_DUAL)
|
||||
#define MACHINE_PIIX3 (MACHINE_PIIX | MACHINE_USB)
|
||||
/* TODO: ACPI flag. */
|
||||
#define MACHINE_PIIX4 (MACHINE_PIIX3 | MACHINE_ACPI)
|
||||
|
||||
#define IS_ARCH(m, a) ((machines[m].bus_flags & (a)) ? 1 : 0)
|
||||
#define IS_AT(m) (((machines[m].bus_flags & (MACHINE_BUS_ISA16 | MACHINE_BUS_EISA | MACHINE_BUS_VLB | MACHINE_BUS_MCA | MACHINE_BUS_PCI | MACHINE_BUS_PCMCIA | MACHINE_BUS_AGP | MACHINE_BUS_AC97)) && !(machines[m].bus_flags & MACHINE_PC98)) ? 1 : 0)
|
||||
|
||||
#define CPU_BLOCK(...) (const uint8_t[]) {__VA_ARGS__, 0}
|
||||
#define MACHINE_MULTIPLIER_FIXED -1, -1
|
||||
|
||||
#define CPU_BLOCK_NONE 0
|
||||
#define CPU_BLOCK_QDI_FMB CPU_BLOCK(CPU_WINCHIP, CPU_WINCHIP2, CPU_Cx6x86, CPU_Cx6x86L, CPU_Cx6x86MX)
|
||||
#define CPU_BLOCK_SOYO_4SAW2 CPU_BLOCK(CPU_i486SX, CPU_i486DX, CPU_Am486SX, CPU_Am486DX)
|
||||
|
||||
/* Make sure it's always an invalid value to avoid misdetections. */
|
||||
#if (defined __amd64__ || defined _M_X64 || defined __aarch64__ || defined _M_ARM64)
|
||||
#define MACHINE_AVAILABLE 0xffffffffffffffffULL
|
||||
#else
|
||||
#define MACHINE_AVAILABLE 0xffffffff
|
||||
#endif
|
||||
|
||||
enum {
|
||||
MACHINE_TYPE_NONE = 0,
|
||||
@@ -121,69 +167,130 @@ enum {
|
||||
MACHINE_TYPE_MAX
|
||||
};
|
||||
|
||||
enum {
|
||||
MACHINE_CHIPSET_NONE = 0,
|
||||
MACHINE_CHIPSET_DISCRETE,
|
||||
MACHINE_CHIPSET_PROPRIETARY,
|
||||
MACHINE_CHIPSET_GC100A,
|
||||
MACHINE_CHIPSET_GC103,
|
||||
MACHINE_CHIPSET_HT18,
|
||||
MACHINE_CHIPSET_ACC_2168,
|
||||
MACHINE_CHIPSET_ALI_M1217,
|
||||
MACHINE_CHIPSET_ALI_M6117,
|
||||
MACHINE_CHIPSET_ALI_M1409,
|
||||
MACHINE_CHIPSET_ALI_M1429,
|
||||
MACHINE_CHIPSET_ALI_M1429G,
|
||||
MACHINE_CHIPSET_ALI_M1489,
|
||||
MACHINE_CHIPSET_ALI_ALADDIN_IV_PLUS,
|
||||
MACHINE_CHIPSET_ALI_ALADDIN_V,
|
||||
MACHINE_CHIPSET_ALI_ALADDIN_PRO_II,
|
||||
MACHINE_CHIPSET_SCAT,
|
||||
MACHINE_CHIPSET_NEAT,
|
||||
MACHINE_CHIPSET_CT_386,
|
||||
MACHINE_CHIPSET_CT_CS4031,
|
||||
MACHINE_CHIPSET_CONTAQ_82C596,
|
||||
MACHINE_CHIPSET_CONTAQ_82C597,
|
||||
MACHINE_CHIPSET_IMS_8848,
|
||||
MACHINE_CHIPSET_INTEL_82335,
|
||||
MACHINE_CHIPSET_INTEL_420TX,
|
||||
MACHINE_CHIPSET_INTEL_420ZX,
|
||||
MACHINE_CHIPSET_INTEL_420EX,
|
||||
MACHINE_CHIPSET_INTEL_430LX,
|
||||
MACHINE_CHIPSET_INTEL_430NX,
|
||||
MACHINE_CHIPSET_INTEL_430FX,
|
||||
MACHINE_CHIPSET_INTEL_430HX,
|
||||
MACHINE_CHIPSET_INTEL_430VX,
|
||||
MACHINE_CHIPSET_INTEL_430TX,
|
||||
MACHINE_CHIPSET_INTEL_450KX,
|
||||
MACHINE_CHIPSET_INTEL_440FX,
|
||||
MACHINE_CHIPSET_INTEL_440EX,
|
||||
MACHINE_CHIPSET_INTEL_440LX,
|
||||
MACHINE_CHIPSET_INTEL_440BX,
|
||||
MACHINE_CHIPSET_INTEL_440ZX,
|
||||
MACHINE_CHIPSET_INTEL_440GX,
|
||||
MACHINE_CHIPSET_OPTI_283,
|
||||
MACHINE_CHIPSET_OPTI_291,
|
||||
MACHINE_CHIPSET_OPTI_493,
|
||||
MACHINE_CHIPSET_OPTI_495,
|
||||
MACHINE_CHIPSET_OPTI_499,
|
||||
MACHINE_CHIPSET_OPTI_895_802G,
|
||||
MACHINE_CHIPSET_OPTI_547_597,
|
||||
MACHINE_CHIPSET_SARC_RC2016A,
|
||||
MACHINE_CHIPSET_SIS_310,
|
||||
MACHINE_CHIPSET_SIS_401,
|
||||
MACHINE_CHIPSET_SIS_460,
|
||||
MACHINE_CHIPSET_SIS_461,
|
||||
MACHINE_CHIPSET_SIS_471,
|
||||
MACHINE_CHIPSET_SIS_496,
|
||||
MACHINE_CHIPSET_SIS_501,
|
||||
MACHINE_CHIPSET_SIS_5511,
|
||||
MACHINE_CHIPSET_SIS_5571,
|
||||
MACHINE_CHIPSET_SMSC_VICTORYBX_66,
|
||||
MACHINE_CHIPSET_STPC_CLIENT,
|
||||
MACHINE_CHIPSET_STPC_CONSUMER_II,
|
||||
MACHINE_CHIPSET_STPC_ELITE,
|
||||
MACHINE_CHIPSET_STPC_ATLAS,
|
||||
MACHINE_CHIPSET_SYMPHONY_SL82C460,
|
||||
MACHINE_CHIPSET_UMC_UM82C480,
|
||||
MACHINE_CHIPSET_UMC_UM82C491,
|
||||
MACHINE_CHIPSET_UMC_UM8881,
|
||||
MACHINE_CHIPSET_UMC_UM8890BF,
|
||||
MACHINE_CHIPSET_VIA_VT82C495,
|
||||
MACHINE_CHIPSET_VIA_VT82C496G,
|
||||
MACHINE_CHIPSET_VIA_APOLLO_VPX,
|
||||
MACHINE_CHIPSET_VIA_APOLLO_VP3,
|
||||
MACHINE_CHIPSET_VIA_APOLLO_MVP3,
|
||||
MACHINE_CHIPSET_VIA_APOLLO_PRO,
|
||||
MACHINE_CHIPSET_VIA_APOLLO_PRO_133,
|
||||
MACHINE_CHIPSET_VIA_APOLLO_PRO_133A,
|
||||
MACHINE_CHIPSET_VLSI_SCAMP,
|
||||
MACHINE_CHIPSET_VLSI_VL82C480,
|
||||
MACHINE_CHIPSET_VLSI_VL82C481,
|
||||
MACHINE_CHIPSET_VLSI_VL82C486,
|
||||
MACHINE_CHIPSET_WD76C10,
|
||||
MACHINE_CHIPSET_MAX
|
||||
};
|
||||
|
||||
typedef struct _machine_type_ {
|
||||
typedef struct _machine_filter_ {
|
||||
const char *name;
|
||||
const char id;
|
||||
} machine_type_t;
|
||||
} machine_filter_t;
|
||||
|
||||
|
||||
#ifdef NEW_STRUCT
|
||||
typedef struct _machine_ {
|
||||
const char *name;
|
||||
const char *internal_name;
|
||||
const char type;
|
||||
const char *name;
|
||||
const char *internal_name;
|
||||
uint32_t type;
|
||||
uint32_t chipset;
|
||||
int (*init)(const struct _machine_ *);
|
||||
uintptr_t pad, pad0, pad1, pad2;
|
||||
uint32_t cpu_package;
|
||||
const uint8_t *cpu_block;
|
||||
uint32_t cpu_min_bus;
|
||||
uint32_t cpu_max_bus;
|
||||
uint16_t cpu_min_voltage;
|
||||
uint16_t cpu_max_voltage;
|
||||
float cpu_min_multi;
|
||||
float cpu_max_multi;
|
||||
uintptr_t bus_flags;
|
||||
uintptr_t flags;
|
||||
uint32_t min_ram, max_ram;
|
||||
int ram_granularity;
|
||||
int nvrmask;
|
||||
#ifdef EMU_DEVICE_H
|
||||
const device_t *device;
|
||||
const device_t *(*get_device)(void);
|
||||
const device_t *(*get_vid_device)(void);
|
||||
#else
|
||||
void *device;
|
||||
#endif
|
||||
struct {
|
||||
const char *name;
|
||||
#ifdef EMU_CPU_H
|
||||
CPU *cpus;
|
||||
#else
|
||||
void *cpus;
|
||||
#endif
|
||||
} cpu[5];
|
||||
int flags;
|
||||
uint32_t min_ram, max_ram;
|
||||
int ram_granularity;
|
||||
int nvrmask;
|
||||
} machine_t;
|
||||
#else
|
||||
typedef struct _machine_ {
|
||||
const char *name;
|
||||
const char *internal_name;
|
||||
const char type;
|
||||
uint32_t cpu_package;
|
||||
const uint8_t *cpu_block;
|
||||
uint32_t cpu_min_bus;
|
||||
uint32_t cpu_max_bus;
|
||||
uint16_t cpu_min_voltage;
|
||||
uint16_t cpu_max_voltage;
|
||||
double cpu_min_multi;
|
||||
double cpu_max_multi;
|
||||
int flags;
|
||||
uint32_t min_ram, max_ram;
|
||||
int ram_granularity;
|
||||
int nvrmask;
|
||||
int (*init)(const struct _machine_ *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
const device_t *(*get_device)(void);
|
||||
#else
|
||||
void *get_device;
|
||||
void *get_device;
|
||||
void *get_vid_device;
|
||||
#endif
|
||||
} machine_t;
|
||||
#endif
|
||||
|
||||
|
||||
/* Global variables. */
|
||||
extern const machine_type_t machine_types[];
|
||||
extern const machine_t machines[];
|
||||
extern int bios_only;
|
||||
extern int machine;
|
||||
|
||||
extern const machine_filter_t machine_types[],
|
||||
machine_chipsets[];
|
||||
extern const machine_t machines[];
|
||||
extern int bios_only;
|
||||
extern int machine;
|
||||
|
||||
/* Core functions. */
|
||||
extern int machine_count(void);
|
||||
@@ -197,15 +304,15 @@ extern void machine_init(void);
|
||||
extern const device_t *machine_getdevice(int m);
|
||||
#endif
|
||||
extern char *machine_get_internal_name_ex(int m);
|
||||
extern int machine_get_nvrmask(int m);
|
||||
extern int machine_has_flags(int m, int flags);
|
||||
extern int machine_has_bus(int m, int bus_flags);
|
||||
extern int machine_has_cartridge(int m);
|
||||
extern int machine_get_min_ram(int m);
|
||||
extern int machine_get_max_ram(int m);
|
||||
extern int machine_get_ram_granularity(int m);
|
||||
extern int machine_get_type(int m);
|
||||
extern void machine_close(void);
|
||||
extern int machine_get_nvrmask(int m);
|
||||
extern int machine_has_flags(int m, int flags);
|
||||
extern int machine_has_bus(int m, int bus_flags);
|
||||
extern int machine_has_cartridge(int m);
|
||||
extern int machine_get_min_ram(int m);
|
||||
extern int machine_get_max_ram(int m);
|
||||
extern int machine_get_ram_granularity(int m);
|
||||
extern int machine_get_type(int m);
|
||||
extern void machine_close(void);
|
||||
|
||||
|
||||
/* Initialization functions for boards and systems. */
|
||||
@@ -407,7 +514,9 @@ extern int machine_at_cmdpc_init(const machine_t *);
|
||||
extern int machine_at_portableii_init(const machine_t *);
|
||||
extern int machine_at_portableiii_init(const machine_t *);
|
||||
extern int machine_at_portableiii386_init(const machine_t *);
|
||||
#if defined(DEV_BRANCH) && defined(USE_DESKPRO386)
|
||||
extern int machine_at_deskpro386_init(const machine_t *);
|
||||
#endif
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *at_cpqiii_get_device(void);
|
||||
#endif
|
||||
@@ -513,7 +622,7 @@ extern int machine_at_i430vx_init(const machine_t *);
|
||||
|
||||
extern int machine_at_nupro592_init(const machine_t *);
|
||||
extern int machine_at_tx97_init(const machine_t *);
|
||||
#if defined(DEV_BRANCH) && defined(NO_SIO)
|
||||
#if defined(DEV_BRANCH) && defined(USE_AN430TX)
|
||||
extern int machine_at_an430tx_init(const machine_t *);
|
||||
#endif
|
||||
extern int machine_at_ym430tx_init(const machine_t *);
|
||||
@@ -749,5 +858,4 @@ extern int machine_xt_xi8088_init(const machine_t *);
|
||||
extern const device_t *xi8088_get_device(void);
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*EMU_MACHINE_H*/
|
||||
|
||||
@@ -93,6 +93,8 @@ extern const device_t ps_nvr_device;
|
||||
extern const device_t amstrad_nvr_device;
|
||||
extern const device_t ibmat_nvr_device;
|
||||
extern const device_t piix4_nvr_device;
|
||||
extern const device_t ps_no_nmi_nvr_device;
|
||||
extern const device_t amstrad_no_nmi_nvr_device;
|
||||
extern const device_t ami_1992_nvr_device;
|
||||
extern const device_t ami_1994_nvr_device;
|
||||
extern const device_t ami_1995_nvr_device;
|
||||
|
||||
7
src/include/86box/path.h
Normal file
7
src/include/86box/path.h
Normal file
@@ -0,0 +1,7 @@
|
||||
extern void path_get_dirname(char *dest, const char *path);
|
||||
extern char *path_get_filename(char *s);
|
||||
extern char *path_get_extension(char *s);
|
||||
extern void path_append_filename(char *dest, const char *s1, const char *s2);
|
||||
extern void path_slash(char *path);
|
||||
extern void path_normalize(char *path);
|
||||
extern int path_abs(char *path);
|
||||
@@ -105,15 +105,6 @@ extern int plat_chdir(char *path);
|
||||
extern void plat_tempfile(char *bufp, char *prefix, char *suffix);
|
||||
extern void plat_get_exe_name(char *s, int size);
|
||||
extern void plat_init_rom_paths();
|
||||
extern char *plat_get_basename(const char *path);
|
||||
extern void plat_get_dirname(char *dest, const char *path);
|
||||
extern char *plat_get_filename(char *s);
|
||||
extern char *plat_get_extension(char *s);
|
||||
extern void plat_append_filename(char *dest, const char *s1, const char *s2);
|
||||
extern void plat_put_backslash(char *s);
|
||||
extern void plat_path_slash(char *path);
|
||||
extern void plat_path_normalize(char *path);
|
||||
extern int plat_path_abs(char *path);
|
||||
extern int plat_dir_check(char *path);
|
||||
extern int plat_dir_create(char *path);
|
||||
extern void *plat_mmap(size_t size, uint8_t executable);
|
||||
@@ -169,47 +160,6 @@ extern int ioctl_open(uint8_t id, char d);
|
||||
extern void ioctl_reset(uint8_t id);
|
||||
extern void ioctl_close(uint8_t id);
|
||||
|
||||
#ifdef __APPLE__
|
||||
#define thread_t plat_thread_t
|
||||
#define event_t plat_event_t
|
||||
#define mutex_t plat_mutex_t
|
||||
|
||||
#define thread_create plat_thread_create
|
||||
#define thread_wait plat_thread_wait
|
||||
#define thread_create_event plat_thread_create_event
|
||||
#define thread_set_event plat_thread_set_event
|
||||
#define thread_reset_event plat_thread_reset_event
|
||||
#define thread_wait_event plat_thread_wait_event
|
||||
#define thread_destroy_event plat_thread_destroy_event
|
||||
|
||||
#define thread_create_mutex plat_thread_create_mutex
|
||||
#define thread_create_mutex_with_spin_count plat_thread_create_mutex_with_spin_count
|
||||
#define thread_close_mutex plat_thread_close_mutex
|
||||
#define thread_wait_mutex plat_thread_wait_mutex
|
||||
#define thread_release_mutex plat_thread_release_mutex
|
||||
#endif
|
||||
|
||||
/* Thread support. */
|
||||
typedef void thread_t;
|
||||
typedef void event_t;
|
||||
typedef void mutex_t;
|
||||
|
||||
extern thread_t *thread_create(void (*thread_func)(void *param), void *param);
|
||||
extern int thread_wait(thread_t *arg);
|
||||
extern event_t *thread_create_event(void);
|
||||
extern void thread_set_event(event_t *arg);
|
||||
extern void thread_reset_event(event_t *arg);
|
||||
extern int thread_wait_event(event_t *arg, int timeout);
|
||||
extern void thread_destroy_event(event_t *arg);
|
||||
|
||||
#define MUTEX_DEFAULT_SPIN_COUNT 1024
|
||||
|
||||
extern mutex_t *thread_create_mutex(void);
|
||||
extern void thread_close_mutex(mutex_t *arg);
|
||||
extern int thread_test_mutex(mutex_t *arg);
|
||||
extern int thread_wait_mutex(mutex_t *arg);
|
||||
extern int thread_release_mutex(mutex_t *mutex);
|
||||
|
||||
/* Other stuff. */
|
||||
extern void startblit(void);
|
||||
extern void endblit(void);
|
||||
|
||||
@@ -42,13 +42,13 @@ typedef struct {
|
||||
|
||||
|
||||
typedef struct rom_path_t {
|
||||
char rom_path[1024];
|
||||
char path[1024];
|
||||
struct rom_path_t* next;
|
||||
} rom_path_t;
|
||||
|
||||
extern rom_path_t rom_paths;
|
||||
|
||||
extern void add_rom_path(const char* path);
|
||||
extern void rom_add_path(const char* path);
|
||||
|
||||
extern uint8_t rom_read(uint32_t addr, void *p);
|
||||
extern uint16_t rom_readw(uint32_t addr, void *p);
|
||||
|
||||
46
src/include/86box/thread.h
Normal file
46
src/include/86box/thread.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#define thread_t plat_thread_t
|
||||
#define event_t plat_event_t
|
||||
#define mutex_t plat_mutex_t
|
||||
|
||||
#define thread_create plat_thread_create
|
||||
#define thread_wait plat_thread_wait
|
||||
#define thread_create_event plat_thread_create_event
|
||||
#define thread_set_event plat_thread_set_event
|
||||
#define thread_reset_event plat_thread_reset_event
|
||||
#define thread_wait_event plat_thread_wait_event
|
||||
#define thread_destroy_event plat_thread_destroy_event
|
||||
|
||||
#define thread_create_mutex plat_thread_create_mutex
|
||||
#define thread_create_mutex_with_spin_count plat_thread_create_mutex_with_spin_count
|
||||
#define thread_close_mutex plat_thread_close_mutex
|
||||
#define thread_wait_mutex plat_thread_wait_mutex
|
||||
#define thread_release_mutex plat_thread_release_mutex
|
||||
#endif
|
||||
|
||||
/* Thread support. */
|
||||
typedef void thread_t;
|
||||
typedef void event_t;
|
||||
typedef void mutex_t;
|
||||
|
||||
extern thread_t *thread_create(void (*thread_func)(void *param), void *param);
|
||||
extern int thread_wait(thread_t *arg);
|
||||
extern event_t *thread_create_event(void);
|
||||
extern void thread_set_event(event_t *arg);
|
||||
extern void thread_reset_event(event_t *arg);
|
||||
extern int thread_wait_event(event_t *arg, int timeout);
|
||||
extern void thread_destroy_event(event_t *arg);
|
||||
|
||||
extern mutex_t *thread_create_mutex(void);
|
||||
extern void thread_close_mutex(mutex_t *arg);
|
||||
extern int thread_test_mutex(mutex_t *arg);
|
||||
extern int thread_wait_mutex(mutex_t *arg);
|
||||
extern int thread_release_mutex(mutex_t *mutex);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -158,7 +158,7 @@ typedef struct svga_t
|
||||
|
||||
/*Force CRTC to dword mode, regardless of CR14/CR17. Required for S3 enhanced mode*/
|
||||
int force_dword_mode;
|
||||
|
||||
|
||||
int force_old_addr;
|
||||
|
||||
int remap_required;
|
||||
|
||||
@@ -20,6 +20,11 @@
|
||||
|
||||
#define LOD_MASK (LOD_TMIRROR_S | LOD_TMIRROR_T)
|
||||
|
||||
/* Suppress a false positive warning on gcc that causes excessive build log spam */
|
||||
#if __GNUC__ >= 10
|
||||
#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
||||
#endif
|
||||
|
||||
typedef struct voodoo_x86_data_t
|
||||
{
|
||||
uint8_t code_block[BLOCK_SIZE];
|
||||
|
||||
@@ -20,6 +20,11 @@
|
||||
|
||||
#define LOD_MASK (LOD_TMIRROR_S | LOD_TMIRROR_T)
|
||||
|
||||
/* Suppress a false positive warning on gcc that causes excessive build log spam */
|
||||
#if __GNUC__ >= 10
|
||||
#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
||||
#endif
|
||||
|
||||
typedef struct voodoo_x86_data_t
|
||||
{
|
||||
uint8_t code_block[BLOCK_SIZE];
|
||||
|
||||
@@ -120,7 +120,6 @@ extern uint8_t filterindex;
|
||||
|
||||
|
||||
extern void ResizeWindowByClientArea(HWND hwnd, int width, int height);
|
||||
extern void InitCrashDump(void);
|
||||
|
||||
/* Emulator start/stop support functions. */
|
||||
extern void do_start(void);
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
#define EMU_NAME "86Box"
|
||||
#define EMU_NAME_W LSTR(EMU_NAME)
|
||||
|
||||
#define EMU_VERSION "3.3"
|
||||
#define EMU_VERSION "3.4"
|
||||
#define EMU_VERSION_W LSTR(EMU_VERSION)
|
||||
#define EMU_VERSION_EX "3.30"
|
||||
#define EMU_VERSION_EX "3.40"
|
||||
#define EMU_VERSION_MAJ 3
|
||||
#define EMU_VERSION_MIN 3
|
||||
#define EMU_VERSION_MIN 4
|
||||
#define EMU_VERSION_PATCH 0
|
||||
|
||||
#define EMU_BUILD_NUM 0
|
||||
|
||||
@@ -29,7 +29,7 @@ else()
|
||||
endif()
|
||||
|
||||
target_link_libraries(86Box "-framework AppKit")
|
||||
target_sources(86Box PRIVATE macOSXGlue.m ${APP_ICON_MACOSX})
|
||||
target_sources(86Box PRIVATE ${APP_ICON_MACOSX})
|
||||
|
||||
# Make sure the icon is copied to the bundle
|
||||
set_source_files_properties(${APP_ICON_MACOSX}
|
||||
@@ -48,7 +48,6 @@ configure_file(Info.plist.in Info.plist @ONLY)
|
||||
set_target_properties(86Box
|
||||
PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
||||
|
||||
set(CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "-o linker-signed")
|
||||
set(XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES")
|
||||
set(XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "-")
|
||||
#set(XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES")
|
||||
#set(XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "-")
|
||||
#set(XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${CMAKE_CURRENT_SOURCE_DIR}/mac/codesign/dev/app.entitlements)
|
||||
|
||||
@@ -24,15 +24,19 @@ add_library(mch OBJECT machine.c machine_table.c m_xt.c m_xt_compaq.c
|
||||
m_at_sockets7.c m_at_socket8.c m_at_slot1.c m_at_slot2.c m_at_socket370.c
|
||||
m_at_misc.c)
|
||||
|
||||
if(AN430TX)
|
||||
target_compile_definitions(mch PRIVATE USE_AN430TX)
|
||||
endif()
|
||||
|
||||
if(DESKPRO386)
|
||||
target_compile_definitions(mch PRIVATE USE_DESKPRO386)
|
||||
endif()
|
||||
|
||||
if(LASERXT)
|
||||
target_sources(mch PRIVATE m_xt_laserxt.c)
|
||||
target_compile_definitions(mch PRIVATE USE_LASERXT)
|
||||
endif()
|
||||
|
||||
if(NO_SIO)
|
||||
target_compile_definitions(mch PRIVATE NO_SIO)
|
||||
endif()
|
||||
|
||||
if(OPEN_AT)
|
||||
target_compile_definitions(mch PRIVATE USE_OPEN_AT)
|
||||
endif()
|
||||
|
||||
@@ -669,7 +669,6 @@ vid_speed_change_1512(void *priv)
|
||||
recalc_timings_1512(vid);
|
||||
}
|
||||
|
||||
|
||||
device_config_t vid_1512_config[] = {
|
||||
{
|
||||
.name = "display_type",
|
||||
@@ -720,7 +719,7 @@ device_config_t vid_1512_config[] = {
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ .name = "", .description = "", .type = -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t vid_1512_device = {
|
||||
@@ -903,7 +902,7 @@ device_config_t vid_1640_config[] = {
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ .name = "", .description = "", .type = -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t vid_1640_device = {
|
||||
@@ -1788,7 +1787,7 @@ device_config_t vid_200_config[] = {
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ .name = "", .description = "", .type = -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t vid_200_device = {
|
||||
@@ -1892,7 +1891,7 @@ device_config_t vid_ppc512_config[] = {
|
||||
.default_string = "",
|
||||
.default_int = 0
|
||||
},
|
||||
{ .name = "", .description = "", .type = -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t vid_ppc512_device = {
|
||||
@@ -1930,7 +1929,7 @@ device_config_t vid_pc2086_config[] = {
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t vid_pc2086_device = {
|
||||
@@ -1968,7 +1967,7 @@ device_config_t vid_pc3086_config[] = {
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ .name = "", .description = "", .type = -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t vid_pc3086_device = {
|
||||
@@ -2348,7 +2347,16 @@ machine_amstrad_init(const machine_t *model, int type)
|
||||
memset(ams, 0x00, sizeof(amstrad_t));
|
||||
ams->type = type;
|
||||
|
||||
device_add(&amstrad_nvr_device);
|
||||
switch(type) {
|
||||
case AMS_PC200:
|
||||
case AMS_PPC512:
|
||||
device_add(&amstrad_no_nmi_nvr_device);
|
||||
break;
|
||||
|
||||
default:
|
||||
device_add(&amstrad_nvr_device);
|
||||
break;
|
||||
}
|
||||
|
||||
machine_common_init(model);
|
||||
|
||||
|
||||
@@ -716,7 +716,7 @@ const device_config_t compaq_plasma_config[] = {
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ .name = "", .description = "", .type = -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t compaq_plasma_device = {
|
||||
@@ -893,6 +893,7 @@ machine_at_portableiii386_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if defined(DEV_BRANCH) && defined(USE_DESKPRO386)
|
||||
int
|
||||
machine_at_deskpro386_init(const machine_t *model)
|
||||
{
|
||||
@@ -908,3 +909,4 @@ machine_at_deskpro386_init(const machine_t *model)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -689,7 +689,7 @@ machine_at_tx97_init(const machine_t *model)
|
||||
}
|
||||
|
||||
|
||||
#if defined(DEV_BRANCH) && defined(NO_SIO)
|
||||
#if defined(DEV_BRANCH) && defined(USE_AN430TX)
|
||||
int
|
||||
machine_at_an430tx_init(const machine_t *model)
|
||||
{
|
||||
|
||||
@@ -678,10 +678,10 @@ static const device_config_t europc_config[] = {
|
||||
.selection = {
|
||||
{ .description = "Disabled (250h)", .value = 0 },
|
||||
{ .description = "Enabled (350h)", .value = 1 },
|
||||
{ "" }
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{ .name = "", .description = "", .type = -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
const device_t europc_device = {
|
||||
|
||||
@@ -784,7 +784,7 @@ static const device_config_t pcjr_config[] = {
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ .name = "", .description = "", .type = -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t pcjr_device = {
|
||||
|
||||
@@ -82,9 +82,6 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#define __USE_LARGEFILE64
|
||||
#define _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -401,7 +401,10 @@ static void model_50_write(uint16_t port, uint8_t val)
|
||||
|
||||
static void model_55sx_mem_recalc(void)
|
||||
{
|
||||
int i, j, state, enabled_mem = 0;
|
||||
int i, j, state;
|
||||
#ifdef ENABLE_PS2_MCA_LOG
|
||||
int enabled_mem = 0;
|
||||
#endif
|
||||
int base = 0, remap_size = (ps2.option[3] & 0x10) ? 384 : 256;
|
||||
int bit_mask = 0x00, max_rows = 4;
|
||||
int bank_to_rows[16] = { 4, 2, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 2, 1, 0 };
|
||||
@@ -424,14 +427,18 @@ static void model_55sx_mem_recalc(void)
|
||||
if (ps2.memory_bank[i] & (1 << j)) {
|
||||
ps2_mca_log("Set memory at %06X-%06X to internal\n", (base * 1024), (base * 1024) + (((base > 0) ? 1024 : 640) * 1024) - 1);
|
||||
mem_set_mem_state(base * 1024, ((base > 0) ? 1024 : 640) * 1024, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL);
|
||||
#ifdef ENABLE_PS2_MCA_LOG
|
||||
enabled_mem += 1024;
|
||||
#endif
|
||||
bit_mask |= (1 << (j + (i << 2)));
|
||||
}
|
||||
base += 1024;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_PS2_MCA_LOG
|
||||
ps2_mca_log("Enabled memory: %i kB (%02X)\n", enabled_mem, bit_mask);
|
||||
#endif
|
||||
|
||||
if (ps2.option[3] & 0x10)
|
||||
{
|
||||
@@ -1348,7 +1355,7 @@ machine_ps2_common_init(const machine_t *model)
|
||||
|
||||
dma16_init();
|
||||
ps2_dma_init();
|
||||
device_add(&ps_nvr_device);
|
||||
device_add(&ps_no_nmi_nvr_device);
|
||||
pic2_init();
|
||||
|
||||
pit_ps2_init();
|
||||
|
||||
@@ -1157,7 +1157,7 @@ static const device_config_t vid_config[] = {
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{ .name = "", .description = "", .type = -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_t vid_device = {
|
||||
|
||||
@@ -586,7 +586,6 @@ m19_vid_init(m19_vid_t *vid)
|
||||
device_context_restore();
|
||||
}
|
||||
|
||||
|
||||
const device_t m24_kbd_device = {
|
||||
.name = "Olivetti M24 keyboard and mouse",
|
||||
.internal_name = "m24_kbd",
|
||||
@@ -616,7 +615,7 @@ const device_config_t m19_vid_config[] = {
|
||||
{ .description = "Green Monochrome", .value = 1 },
|
||||
{ .description = "Amber Monochrome", .value = 2 },
|
||||
{ .description = "Gray Monochrome", .value = 3 },
|
||||
{ .description = "" }
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -626,7 +625,7 @@ const device_config_t m19_vid_config[] = {
|
||||
.default_string = "",
|
||||
.default_int = 1,
|
||||
},
|
||||
{ .name = "", .description = "", .type = -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
const device_t m19_vid_device = {
|
||||
|
||||
@@ -745,16 +745,9 @@ static const device_config_t t1000_config[] = {
|
||||
.name = "display_language",
|
||||
.description = "Language",
|
||||
.type = CONFIG_SELECTION,
|
||||
.selection =
|
||||
{
|
||||
{
|
||||
.description = "USA",
|
||||
.value = 0
|
||||
},
|
||||
{
|
||||
.description = "Danish",
|
||||
.value = 1
|
||||
}
|
||||
.selection = {
|
||||
{ .description = "USA", .value = 0 },
|
||||
{ .description = "Danish", .value = 1 }
|
||||
},
|
||||
.default_int = 0
|
||||
},
|
||||
@@ -763,7 +756,8 @@ static const device_config_t t1000_config[] = {
|
||||
.description = "Enable backlight",
|
||||
.type = CONFIG_BINARY,
|
||||
.default_string = "",
|
||||
.default_int = 1 },
|
||||
.default_int = 1
|
||||
},
|
||||
{
|
||||
.name = "invert",
|
||||
.description = "Invert colors",
|
||||
@@ -771,7 +765,7 @@ static const device_config_t t1000_config[] = {
|
||||
.default_string = "",
|
||||
.default_int = 0
|
||||
},
|
||||
{ .type = -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
const device_t t1000_video_device = {
|
||||
|
||||
@@ -160,7 +160,7 @@ static const device_config_t xi8088_config[] = {
|
||||
.type = CONFIG_BINARY,
|
||||
.default_int = 0
|
||||
},
|
||||
{ .type = -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
const device_t xi8088_device = {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2210,8 +2210,6 @@ void
|
||||
mem_invalidate_range(uint32_t start_addr, uint32_t end_addr)
|
||||
{
|
||||
#ifdef USE_NEW_DYNAREC
|
||||
int byte_offset;
|
||||
uint64_t byte_mask;
|
||||
page_t *p;
|
||||
|
||||
start_addr &= ~PAGE_MASK_MASK;
|
||||
|
||||
123
src/mem/rom.c
123
src/mem/rom.c
@@ -33,6 +33,7 @@
|
||||
#include "cpu.h"
|
||||
#include <86box/mem.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/path.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/m_xt_xi8088.h>
|
||||
@@ -57,47 +58,59 @@ rom_log(const char *fmt, ...)
|
||||
#define rom_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
void
|
||||
rom_add_path(const char* path)
|
||||
{
|
||||
char cwd[1024] = { 0 };
|
||||
|
||||
rom_path_t* rom_path = &rom_paths;
|
||||
|
||||
if (rom_paths.path[0] != '\0')
|
||||
{
|
||||
// Iterate to the end of the list.
|
||||
while (rom_path->next != NULL) {
|
||||
rom_path = rom_path->next;
|
||||
}
|
||||
|
||||
// Allocate the new entry.
|
||||
rom_path = rom_path->next = calloc(1, sizeof(rom_path_t));
|
||||
}
|
||||
|
||||
// Save the path, turning it into absolute if needed.
|
||||
if (!path_abs((char*) path)) {
|
||||
plat_getcwd(cwd, sizeof(cwd));
|
||||
path_slash(cwd);
|
||||
snprintf(rom_path->path, sizeof(rom_path->path), "%s%s", cwd, path);
|
||||
} else {
|
||||
snprintf(rom_path->path, sizeof(rom_path->path), "%s", path);
|
||||
}
|
||||
|
||||
// Ensure the path ends with a separator.
|
||||
path_slash(rom_path->path);
|
||||
}
|
||||
|
||||
|
||||
FILE *
|
||||
rom_fopen(char *fn, char *mode)
|
||||
{
|
||||
char temp[1024];
|
||||
char *fn2;
|
||||
rom_path_t *rom_path;
|
||||
FILE *fp = NULL;
|
||||
|
||||
if ((strstr(fn, "roms/") == fn) || (strstr(fn, "roms\\") == fn)) {
|
||||
/* Relative path */
|
||||
fn2 = (char *) malloc(strlen(fn) + 1);
|
||||
memcpy(fn2, fn, strlen(fn) + 1);
|
||||
if (strstr(fn, "roms/") == fn) {
|
||||
/* Relative path */
|
||||
for (rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) {
|
||||
path_append_filename(temp, rom_path->path, fn + 5);
|
||||
|
||||
if (rom_paths.next) {
|
||||
rom_path_t* cur_rom_path = &rom_paths;
|
||||
memset(fn2, 0x00, strlen(fn) + 1);
|
||||
memcpy(fn2, &(fn[5]), strlen(fn) - 4);
|
||||
|
||||
while (cur_rom_path->next) {
|
||||
memset(temp, 0, sizeof(temp));
|
||||
plat_append_filename(temp, cur_rom_path->rom_path, fn2);
|
||||
if (rom_present(temp)) {
|
||||
break;
|
||||
if ((fp = plat_fopen(temp, mode)) != NULL) {
|
||||
return fp;
|
||||
}
|
||||
cur_rom_path = cur_rom_path->next;
|
||||
}
|
||||
} else {
|
||||
/* Make sure to make it a backslash, just in case there's malformed
|
||||
code calling us that assumes Windows. */
|
||||
if (fn2[4] == '\\')
|
||||
fn2[4] = '/';
|
||||
|
||||
plat_append_filename(temp, exe_path, fn2);
|
||||
}
|
||||
|
||||
free(fn2);
|
||||
fn2 = NULL;
|
||||
|
||||
return(plat_fopen(temp, mode));
|
||||
return fp;
|
||||
} else {
|
||||
/* Absolute path */
|
||||
return(plat_fopen(fn, mode));
|
||||
/* Absolute path */
|
||||
return plat_fopen(fn, mode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,54 +118,30 @@ rom_fopen(char *fn, char *mode)
|
||||
int
|
||||
rom_getfile(char *fn, char *s, int size)
|
||||
{
|
||||
char temp[1024] = {'\0'};
|
||||
char *fn2;
|
||||
int retval = 0;
|
||||
char temp[1024];
|
||||
rom_path_t *rom_path;
|
||||
|
||||
if ((strstr(fn, "roms/") == fn) || (strstr(fn, "roms\\") == fn)) {
|
||||
/* Relative path */
|
||||
fn2 = (char *) malloc(strlen(fn) + 1);
|
||||
memcpy(fn2, fn, strlen(fn) + 1);
|
||||
if (strstr(fn, "roms/") == fn) {
|
||||
/* Relative path */
|
||||
for (rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) {
|
||||
path_append_filename(temp, rom_path->path, fn + 5);
|
||||
|
||||
if (rom_paths.next) {
|
||||
rom_path_t* cur_rom_path = &rom_paths;
|
||||
memset(fn2, 0x00, strlen(fn) + 1);
|
||||
memcpy(fn2, &(fn[5]), strlen(fn) - 4);
|
||||
|
||||
while (cur_rom_path->next) {
|
||||
memset(temp, 0, sizeof(temp));
|
||||
plat_append_filename(temp, cur_rom_path->rom_path, fn2);
|
||||
if (rom_present(temp)) {
|
||||
strncpy(s, temp, size);
|
||||
retval = 1;
|
||||
break;
|
||||
return 1;
|
||||
}
|
||||
cur_rom_path = cur_rom_path->next;
|
||||
}
|
||||
} else {
|
||||
/* Make sure to make it a backslash, just in case there's malformed
|
||||
code calling us that assumes Windows. */
|
||||
if (fn2[4] == '\\')
|
||||
fn2[4] = '/';
|
||||
|
||||
plat_append_filename(temp, exe_path, fn2);
|
||||
if (rom_present(temp)) {
|
||||
strncpy(s, temp, size);
|
||||
retval = 1;
|
||||
}
|
||||
}
|
||||
|
||||
free(fn2);
|
||||
fn2 = NULL;
|
||||
return 0;
|
||||
} else {
|
||||
/* Absolute path */
|
||||
if (rom_present(fn)) {
|
||||
strncpy(s, fn, size);
|
||||
retval = 1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return(retval);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -163,8 +152,8 @@ rom_present(char *fn)
|
||||
|
||||
f = rom_fopen(fn, "rb");
|
||||
if (f != NULL) {
|
||||
(void)fclose(f);
|
||||
return(1);
|
||||
(void)fclose(f);
|
||||
return(1);
|
||||
}
|
||||
|
||||
return(0);
|
||||
|
||||
@@ -405,7 +405,7 @@ void
|
||||
spd_write_drbs_with_ext(uint8_t *regs, uint8_t reg_min, uint8_t reg_max, uint8_t drb_unit)
|
||||
{
|
||||
uint8_t row, dimm, drb;
|
||||
uint16_t size, row_val, rows[SPD_MAX_SLOTS];
|
||||
uint16_t size, row_val = 0, rows[SPD_MAX_SLOTS];
|
||||
int shift;
|
||||
|
||||
/* No SPD: split SIMMs into pairs as if they were "DIMM"s. */
|
||||
|
||||
@@ -635,59 +635,88 @@ threec503_nic_close(void *priv)
|
||||
free(dev);
|
||||
}
|
||||
|
||||
|
||||
static const device_config_t threec503_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x300, "", { 0 },
|
||||
{
|
||||
{ "0x250", 0x250 },
|
||||
{ "0x280", 0x280 },
|
||||
{ "0x2a0", 0x2a0 },
|
||||
{ "0x2e0", 0x2e0 },
|
||||
{ "0x300", 0x300 },
|
||||
{ "0x310", 0x310 },
|
||||
{ "0x330", 0x330 },
|
||||
{ "0x350", 0x350 },
|
||||
{ "", 0 }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x300,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "0x250", .value = 0x250 },
|
||||
{ .description = "0x280", .value = 0x280 },
|
||||
{ .description = "0x2a0", .value = 0x2a0 },
|
||||
{ .description = "0x2e0", .value = 0x2e0 },
|
||||
{ .description = "0x300", .value = 0x300 },
|
||||
{ .description = "0x310", .value = 0x310 },
|
||||
{ .description = "0x330", .value = 0x330 },
|
||||
{ .description = "0x350", .value = 0x350 },
|
||||
{ .description = "", .value = 0 }
|
||||
},
|
||||
},
|
||||
{
|
||||
"irq", "IRQ", CONFIG_SELECTION, "", 3, "", { 0 },
|
||||
{
|
||||
{ "IRQ 2", 2 },
|
||||
{ "IRQ 3", 3 },
|
||||
{ "IRQ 4", 4 },
|
||||
{ "IRQ 5", 5 },
|
||||
{ "", 0 }
|
||||
.name = "irq",
|
||||
.description = "IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 3,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "IRQ 2", .value = 2 },
|
||||
{ .description = "IRQ 3", .value = 3 },
|
||||
{ .description = "IRQ 4", .value = 4 },
|
||||
{ .description = "IRQ 5", .value = 5 },
|
||||
{ .description = "", .value = 0 }
|
||||
},
|
||||
},
|
||||
{
|
||||
"dma", "DMA", CONFIG_SELECTION, "", 3, "", { 0 },
|
||||
{
|
||||
{ "DMA 1", 1 },
|
||||
{ "DMA 2", 2 },
|
||||
{ "DMA 3", 3 },
|
||||
{ "", 0 }
|
||||
.name = "dma",
|
||||
.description = "DMA",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 3,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "DMA 1", .value = 1 },
|
||||
{ .description = "DMA 2", .value = 2 },
|
||||
{ .description = "DMA 3", .value = 3 },
|
||||
{ .description = "", .value = 0 }
|
||||
},
|
||||
},
|
||||
{
|
||||
"mac", "MAC Address", CONFIG_MAC, "", -1, "", { 0 },
|
||||
{
|
||||
{ "", 0 }
|
||||
.name = "mac",
|
||||
.description = "MAC Address",
|
||||
.type = CONFIG_MAC,
|
||||
.default_string = "",
|
||||
.default_int = -1,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "", .value = 0 }
|
||||
},
|
||||
},
|
||||
{
|
||||
"bios_addr", "BIOS address", CONFIG_HEX20, "", 0xCC000, "", { 0 },
|
||||
{
|
||||
{ "DC00", 0xDC000 },
|
||||
{ "D800", 0xD8000 },
|
||||
{ "C800", 0xC8000 },
|
||||
{ "CC00", 0xCC000 },
|
||||
{ "", 0 }
|
||||
.name = "bios_addr",
|
||||
.description = "BIOS address",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "",
|
||||
.default_int = 0xCC000,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "DC00", .value = 0xDC000 },
|
||||
{ .description = "D800", .value = 0xD8000 },
|
||||
{ .description = "C800", .value = 0xC8000 },
|
||||
{ .description = "CC00", .value = 0xCC000 },
|
||||
{ .description = "", .value = 0 }
|
||||
},
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format off
|
||||
};
|
||||
|
||||
|
||||
@@ -1110,7 +1110,6 @@ dp8390_close(void *priv)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const device_t dp8390_device = {
|
||||
.name = "DP8390 Network Interface Controller",
|
||||
.internal_name = "dp8390",
|
||||
|
||||
@@ -1142,86 +1142,152 @@ nic_close(void *priv)
|
||||
// clang-format off
|
||||
static const device_config_t ne1000_config[] = {
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x300, "", { 0 },
|
||||
{
|
||||
{ "0x280", 0x280 },
|
||||
{ "0x300", 0x300 },
|
||||
{ "0x320", 0x320 },
|
||||
{ "0x340", 0x340 },
|
||||
{ "0x360", 0x360 },
|
||||
{ "0x380", 0x380 },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x300,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "0x280", .value = 0x280 },
|
||||
{ .description = "0x300", .value = 0x300 },
|
||||
{ .description = "0x320", .value = 0x320 },
|
||||
{ .description = "0x340", .value = 0x340 },
|
||||
{ .description = "0x360", .value = 0x360 },
|
||||
{ .description = "0x380", .value = 0x380 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"irq", "IRQ", CONFIG_SELECTION, "", 3, "", { 0 },
|
||||
{
|
||||
{ "IRQ 2", 2 },
|
||||
{ "IRQ 3", 3 },
|
||||
{ "IRQ 5", 5 },
|
||||
{ "IRQ 7", 7 },
|
||||
{ "IRQ 10", 10 },
|
||||
{ "IRQ 11", 11 },
|
||||
{ "" }
|
||||
.name = "irq",
|
||||
.description = "IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 3,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "IRQ 2", .value = 2 },
|
||||
{ .description = "IRQ 3", .value = 3 },
|
||||
{ .description = "IRQ 5", .value = 5 },
|
||||
{ .description = "IRQ 7", .value = 7 },
|
||||
{ .description = "IRQ 10", .value = 10 },
|
||||
{ .description = "IRQ 11", .value = 11 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{ "mac", "MAC Address", CONFIG_MAC, "", -1 },
|
||||
{ "", "", -1 }
|
||||
{
|
||||
.name = "mac",
|
||||
.description = "MAC Address",
|
||||
.type = CONFIG_MAC,
|
||||
.default_string = "",
|
||||
.default_int = -1
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_config_t ne2000_config[] = {
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x300, "", { 0 },
|
||||
{
|
||||
{ "0x280", 0x280 },
|
||||
{ "0x300", 0x300 },
|
||||
{ "0x320", 0x320 },
|
||||
{ "0x340", 0x340 },
|
||||
{ "0x360", 0x360 },
|
||||
{ "0x380", 0x380 },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x300,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "0x280", .value = 0x280 },
|
||||
{ .description = "0x300", .value = 0x300 },
|
||||
{ .description = "0x320", .value = 0x320 },
|
||||
{ .description = "0x340", .value = 0x340 },
|
||||
{ .description = "0x360", .value = 0x360 },
|
||||
{ .description = "0x380", .value = 0x380 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"irq", "IRQ", CONFIG_SELECTION, "", 10, "", { 0 },
|
||||
{
|
||||
{ "IRQ 2", 2 },
|
||||
{ "IRQ 3", 3 },
|
||||
{ "IRQ 5", 5 },
|
||||
{ "IRQ 7", 7 },
|
||||
{ "IRQ 10", 10 },
|
||||
{ "IRQ 11", 11 },
|
||||
{ "" }
|
||||
.name = "irq",
|
||||
.description = "IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 10,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "IRQ 2", .value = 2 },
|
||||
{ .description = "IRQ 3", .value = 3 },
|
||||
{ .description = "IRQ 5", .value = 5 },
|
||||
{ .description = "IRQ 7", .value = 7 },
|
||||
{ .description = "IRQ 10", .value = 10 },
|
||||
{ .description = "IRQ 11", .value = 11 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{ "mac", "MAC Address", CONFIG_MAC, "", -1 },
|
||||
{
|
||||
"bios_addr", "BIOS address", CONFIG_HEX20, "", 0, "", { 0 },
|
||||
{
|
||||
{ "Disabled", 0x00000 },
|
||||
{ "D000", 0xD0000 },
|
||||
{ "D800", 0xD8000 },
|
||||
{ "C800", 0xC8000 },
|
||||
{ "" }
|
||||
.name = "mac",
|
||||
.description = "MAC Address",
|
||||
.type = CONFIG_MAC,
|
||||
.default_string = "",
|
||||
.default_int = -1
|
||||
},
|
||||
{
|
||||
.name = "bios_addr",
|
||||
.description = "BIOS address",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Disabled", .value = 0x00000 },
|
||||
{ .description = "D000", .value = 0xD0000 },
|
||||
{ .description = "D800", .value = 0xD8000 },
|
||||
{ .description = "C800", .value = 0xC8000 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{ "", "", -1 }
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_config_t rtl8019as_config[] = {
|
||||
{ "mac", "MAC Address", CONFIG_MAC, "", -1 },
|
||||
{ "", "", -1 }
|
||||
{
|
||||
.name = "mac",
|
||||
.description = "MAC Address",
|
||||
.type = CONFIG_MAC,
|
||||
.default_string = "",
|
||||
.default_int = -1
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_config_t rtl8029as_config[] = {
|
||||
{ "bios", "Enable BIOS", CONFIG_BINARY, "", 0 },
|
||||
{ "mac", "MAC Address", CONFIG_MAC, "", -1 },
|
||||
{ "", "", -1 }
|
||||
{
|
||||
.name = "bios",
|
||||
.description = "Enable BIOS",
|
||||
.type = CONFIG_BINARY,
|
||||
.default_string = "",
|
||||
.default_int = 0
|
||||
},
|
||||
{
|
||||
.name = "mac",
|
||||
.description = "MAC Address",
|
||||
.type = CONFIG_MAC,
|
||||
.default_string = "",
|
||||
.default_int = -1
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_config_t mca_mac_config[] = {
|
||||
{ "mac", "MAC Address", CONFIG_MAC, "", -1 },
|
||||
{ "", "", -1 }
|
||||
{
|
||||
.name = "mac",
|
||||
.description = "MAC Address",
|
||||
.type = CONFIG_MAC,
|
||||
.default_string = "",
|
||||
.default_int = -1
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
#include <86box/device.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/plat_dynld.h>
|
||||
#include <86box/thread.h>
|
||||
#include <86box/network.h>
|
||||
|
||||
|
||||
@@ -122,6 +123,7 @@ static const unsigned char
|
||||
*(*f_pcap_next)(void *,void *);
|
||||
static int (*f_pcap_sendpacket)(void *,const unsigned char *,int);
|
||||
static void (*f_pcap_close)(void *);
|
||||
static int (*f_pcap_setnonblock)(void*, int, char*);
|
||||
static dllimp_t pcap_imports[] = {
|
||||
{ "pcap_lib_version", &f_pcap_lib_version },
|
||||
{ "pcap_findalldevs", &f_pcap_findalldevs },
|
||||
@@ -132,6 +134,7 @@ static dllimp_t pcap_imports[] = {
|
||||
{ "pcap_next", &f_pcap_next },
|
||||
{ "pcap_sendpacket", &f_pcap_sendpacket },
|
||||
{ "pcap_close", &f_pcap_close },
|
||||
{ "pcap_setnonblock", &f_pcap_setnonblock },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
|
||||
@@ -382,6 +385,9 @@ net_pcap_reset(const netcard_t *card, uint8_t *mac)
|
||||
pcap_log(" Unable to open device: %s!\n", network_host);
|
||||
return(-1);
|
||||
}
|
||||
if (f_pcap_setnonblock((void*)pcap, 1, errbuf) != 0)
|
||||
pcap_log("PCAP: failed nonblock %s\n", errbuf);
|
||||
|
||||
pcap_log("PCAP: interface: %s\n", network_host);
|
||||
|
||||
/* Create a MAC address based packet filter. */
|
||||
|
||||
@@ -3078,68 +3078,116 @@ pcnet_close(void *priv)
|
||||
|
||||
// clang-format off
|
||||
static const device_config_t pcnet_pci_config[] = {
|
||||
{ "mac", "MAC Address", CONFIG_MAC, "", -1 },
|
||||
{ "", "", -1 }
|
||||
{
|
||||
.name = "mac",
|
||||
.description = "MAC Address",
|
||||
.type = CONFIG_MAC,
|
||||
.default_string = "",
|
||||
.default_int = -1
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_config_t pcnet_isa_config[] = {
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x300, "", { 0 },
|
||||
{
|
||||
{ "0x300", 0x300 },
|
||||
{ "0x320", 0x320 },
|
||||
{ "0x340", 0x340 },
|
||||
{ "0x360", 0x360 },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x300,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "0x300", .value = 0x300 },
|
||||
{ .description = "0x320", .value = 0x320 },
|
||||
{ .description = "0x340", .value = 0x340 },
|
||||
{ .description = "0x360", .value = 0x360 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"irq", "IRQ", CONFIG_SELECTION, "", 3, "", { 0 },
|
||||
{
|
||||
{ "IRQ 3", 3 },
|
||||
{ "IRQ 4", 4 },
|
||||
{ "IRQ 5", 5 },
|
||||
{ "IRQ 9", 9 },
|
||||
{ "" }
|
||||
.name = "irq",
|
||||
.description = "IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 3,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "IRQ 3", .value = 3 },
|
||||
{ .description = "IRQ 4", .value = 4 },
|
||||
{ .description = "IRQ 5", .value = 5 },
|
||||
{ .description = "IRQ 9", .value = 9 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"dma", "DMA channel", CONFIG_SELECTION, "", 5, "", { 0 },
|
||||
{
|
||||
{ "DMA 3", 3 },
|
||||
{ "DMA 5", 5 },
|
||||
{ "DMA 6", 6 },
|
||||
{ "DMA 7", 7 },
|
||||
{ "" }
|
||||
.name = "dma",
|
||||
.description = "DMA channel",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 5,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "DMA 3", .value = 3 },
|
||||
{ .description = "DMA 5", .value = 5 },
|
||||
{ .description = "DMA 6", .value = 6 },
|
||||
{ .description = "DMA 7", .value = 7 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{ "mac", "MAC Address", CONFIG_MAC, "", -1 },
|
||||
{ "", "", -1 }
|
||||
{
|
||||
.name = "mac",
|
||||
.description = "MAC Address",
|
||||
.type = CONFIG_MAC,
|
||||
.default_string = "",
|
||||
.default_int = -1
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_config_t pcnet_vlb_config[] = {
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x300, "", { 0 },
|
||||
{
|
||||
{ "0x300", 0x300 },
|
||||
{ "0x320", 0x320 },
|
||||
{ "0x340", 0x340 },
|
||||
{ "0x360", 0x360 },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x300,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "0x300", .value = 0x300 },
|
||||
{ .description = "0x320", .value = 0x320 },
|
||||
{ .description = "0x340", .value = 0x340 },
|
||||
{ .description = "0x360", .value = 0x360 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"irq", "IRQ", CONFIG_SELECTION, "", 3, "", { 0 },
|
||||
{
|
||||
{ "IRQ 3", 3 },
|
||||
{ "IRQ 4", 4 },
|
||||
{ "IRQ 5", 5 },
|
||||
{ "IRQ 9", 9 },
|
||||
{ "" }
|
||||
.name = "irq",
|
||||
.description = "IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 3,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "IRQ 3", .value = 3 },
|
||||
{ .description = "IRQ 4", .value = 4 },
|
||||
{ .description = "IRQ 5", .value = 5 },
|
||||
{ .description = "IRQ 9", .value = 9 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{ "mac", "MAC Address", CONFIG_MAC, "", -1 },
|
||||
{ "", "", -1 }
|
||||
{
|
||||
.name = "mac",
|
||||
.description = "MAC Address",
|
||||
.type = CONFIG_MAC,
|
||||
.default_string = "",
|
||||
.default_int = -1
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
||||
@@ -490,7 +490,6 @@ plip_close(void *priv)
|
||||
free(priv);
|
||||
}
|
||||
|
||||
|
||||
const lpt_device_t lpt_plip_device = {
|
||||
.name = "Parallel Line Internet Protocol",
|
||||
.internal_name = "plip",
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <86box/86box.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/thread.h>
|
||||
#include <86box/network.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/timer.h>
|
||||
|
||||
@@ -738,156 +738,246 @@ wd_close(void *priv)
|
||||
// clang-format off
|
||||
static const device_config_t wd8003_config[] = {
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x300, "", { 0 },
|
||||
{
|
||||
{ "0x240", 0x240 },
|
||||
{ "0x280", 0x280 },
|
||||
{ "0x300", 0x300 },
|
||||
{ "0x380", 0x380 },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x300,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "0x240", .value = 0x240 },
|
||||
{ .description = "0x280", .value = 0x280 },
|
||||
{ .description = "0x300", .value = 0x300 },
|
||||
{ .description = "0x380", .value = 0x380 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"irq", "IRQ", CONFIG_SELECTION, "", 3, "", { 0 },
|
||||
{
|
||||
{ "IRQ 2", 2 },
|
||||
{ "IRQ 3", 3 },
|
||||
{ "IRQ 5", 5 },
|
||||
{ "IRQ 7", 7 },
|
||||
{ "" }
|
||||
.name = "irq",
|
||||
.description = "IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 3,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "IRQ 2", .value = 2 },
|
||||
{ .description = "IRQ 3", .value = 3 },
|
||||
{ .description = "IRQ 5", .value = 5 },
|
||||
{ .description = "IRQ 7", .value = 7 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"ram_addr", "RAM address", CONFIG_HEX20, "", 0xD0000, "", { 0 },
|
||||
{
|
||||
{ "C800", 0xC8000 },
|
||||
{ "CC00", 0xCC000 },
|
||||
{ "D000", 0xD0000 },
|
||||
{ "D400", 0xD4000 },
|
||||
{ "D800", 0xD8000 },
|
||||
{ "DC00", 0xDC000 },
|
||||
{ "" }
|
||||
.name = "ram_addr",
|
||||
.description = "RAM address",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "",
|
||||
.default_int = 0xD0000,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "C800", .value = 0xC8000 },
|
||||
{ .description = "CC00", .value = 0xCC000 },
|
||||
{ .description = "D000", .value = 0xD0000 },
|
||||
{ .description = "D400", .value = 0xD4000 },
|
||||
{ .description = "D800", .value = 0xD8000 },
|
||||
{ .description = "DC00", .value = 0xDC000 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{ "mac", "MAC Address", CONFIG_MAC, "", -1 },
|
||||
{ "", "", -1 }
|
||||
{
|
||||
.name = "mac",
|
||||
.description = "MAC Address",
|
||||
.type = CONFIG_MAC,
|
||||
.default_string = "",
|
||||
.default_int = -1
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_config_t wd8003eb_config[] = {
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x280, "", { 0 },
|
||||
{
|
||||
{ "0x200", 0x200 },
|
||||
{ "0x220", 0x220 },
|
||||
{ "0x240", 0x240 },
|
||||
{ "0x260", 0x260 },
|
||||
{ "0x280", 0x280 },
|
||||
{ "0x2A0", 0x2A0 },
|
||||
{ "0x2C0", 0x2C0 },
|
||||
{ "0x300", 0x300 },
|
||||
{ "0x340", 0x340 },
|
||||
{ "0x380", 0x380 },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x280,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "0x200", .value = 0x200 },
|
||||
{ .description = "0x220", .value = 0x220 },
|
||||
{ .description = "0x240", .value = 0x240 },
|
||||
{ .description = "0x260", .value = 0x260 },
|
||||
{ .description = "0x280", .value = 0x280 },
|
||||
{ .description = "0x2A0", .value = 0x2A0 },
|
||||
{ .description = "0x2C0", .value = 0x2C0 },
|
||||
{ .description = "0x300", .value = 0x300 },
|
||||
{ .description = "0x340", .value = 0x340 },
|
||||
{ .description = "0x380", .value = 0x380 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"irq", "IRQ", CONFIG_SELECTION, "", 3, "", { 0 },
|
||||
{
|
||||
{ "IRQ 2/9", 9 },
|
||||
{ "IRQ 3", 3 },
|
||||
{ "IRQ 4", 4 },
|
||||
{ "IRQ 7", 7 },
|
||||
{ "" }
|
||||
.name = "irq",
|
||||
.description = "IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 3,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "IRQ 2/9", .value = 9 },
|
||||
{ .description = "IRQ 3", .value = 3 },
|
||||
{ .description = "IRQ 4", .value = 4 },
|
||||
{ .description = "IRQ 7", .value = 7 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"ram_addr", "RAM address", CONFIG_HEX20, "", 0xD0000, "", { 0 },
|
||||
{
|
||||
{ "C000", 0xC0000 },
|
||||
{ "C400", 0xC4000 },
|
||||
{ "C800", 0xC8000 },
|
||||
{ "CC00", 0xCC000 },
|
||||
{ "D000", 0xD0000 },
|
||||
{ "D400", 0xD4000 },
|
||||
{ "D800", 0xD8000 },
|
||||
{ "DC00", 0xDC000 },
|
||||
{ "" }
|
||||
.name = "ram_addr",
|
||||
.description = "RAM address",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "",
|
||||
.default_int = 0xD0000,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "C000", .value = 0xC0000 },
|
||||
{ .description = "C400", .value = 0xC4000 },
|
||||
{ .description = "C800", .value = 0xC8000 },
|
||||
{ .description = "CC00", .value = 0xCC000 },
|
||||
{ .description = "D000", .value = 0xD0000 },
|
||||
{ .description = "D400", .value = 0xD4000 },
|
||||
{ .description = "D800", .value = 0xD8000 },
|
||||
{ .description = "DC00", .value = 0xDC000 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"ram_size", "RAM size", CONFIG_SELECTION, "", 8192, "", { 0 },
|
||||
{
|
||||
{ "8 kB", 8192 },
|
||||
{ "32 kB", 32768 },
|
||||
{ "" }
|
||||
.name = "ram_size",
|
||||
.description = "RAM size",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 8192,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "8 kB", .value = 8192 },
|
||||
{ .description = "32 kB", .value = 32768 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{ "mac", "MAC Address", CONFIG_MAC, "", -1 },
|
||||
{ "", "", -1 }
|
||||
{
|
||||
.name = "mac",
|
||||
.description = "MAC Address",
|
||||
.type = CONFIG_MAC,
|
||||
.default_string = "",
|
||||
.default_int = -1
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
/* WD8013EBT configuration and defaults set according to this site:
|
||||
http://www.stack.nl/~marcolz/network/wd80x3.html#WD8013EBT */
|
||||
static const device_config_t wd8013_config[] = {
|
||||
{
|
||||
"base", "Address", CONFIG_HEX16, "", 0x280, "", { 0 },
|
||||
{
|
||||
{ "0x200", 0x200 },
|
||||
{ "0x220", 0x220 },
|
||||
{ "0x240", 0x240 },
|
||||
{ "0x260", 0x260 },
|
||||
{ "0x280", 0x280 },
|
||||
{ "0x2A0", 0x2A0 },
|
||||
{ "0x2C0", 0x2C0 },
|
||||
{ "0x300", 0x300 },
|
||||
{ "0x340", 0x340 },
|
||||
{ "0x380", 0x380 },
|
||||
{ "" }
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
.type = CONFIG_HEX16,
|
||||
.default_string = "",
|
||||
.default_int = 0x280,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "0x200", .value = 0x200 },
|
||||
{ .description = "0x220", .value = 0x220 },
|
||||
{ .description = "0x240", .value = 0x240 },
|
||||
{ .description = "0x260", .value = 0x260 },
|
||||
{ .description = "0x280", .value = 0x280 },
|
||||
{ .description = "0x2A0", .value = 0x2A0 },
|
||||
{ .description = "0x2C0", .value = 0x2C0 },
|
||||
{ .description = "0x300", .value = 0x300 },
|
||||
{ .description = "0x340", .value = 0x340 },
|
||||
{ .description = "0x380", .value = 0x380 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"irq", "IRQ", CONFIG_SELECTION, "", 3, "", { 0 },
|
||||
{
|
||||
{ "IRQ 2/9", 9 },
|
||||
{ "IRQ 3", 3 },
|
||||
{ "IRQ 4", 4 },
|
||||
{ "IRQ 5", 5 },
|
||||
{ "IRQ 7", 7 },
|
||||
{ "IRQ 10", 10 },
|
||||
{ "IRQ 11", 11 },
|
||||
{ "IRQ 15", 15 },
|
||||
{ "" }
|
||||
.name = "irq",
|
||||
.description = "IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 3,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "IRQ 2/9", .value = 9 },
|
||||
{ .description = "IRQ 3", .value = 3 },
|
||||
{ .description = "IRQ 4", .value = 4 },
|
||||
{ .description = "IRQ 5", .value = 5 },
|
||||
{ .description = "IRQ 7", .value = 7 },
|
||||
{ .description = "IRQ 10", .value = 10 },
|
||||
{ .description = "IRQ 11", .value = 11 },
|
||||
{ .description = "IRQ 15", .value = 15 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"ram_addr", "RAM address", CONFIG_HEX20, "", 0xD0000, "", { 0 },
|
||||
{
|
||||
{ "C000", 0xC0000 },
|
||||
{ "C400", 0xC4000 },
|
||||
{ "C800", 0xC8000 },
|
||||
{ "CC00", 0xCC000 },
|
||||
{ "D000", 0xD0000 },
|
||||
{ "D400", 0xD4000 },
|
||||
{ "D800", 0xD8000 },
|
||||
{ "DC00", 0xDC000 },
|
||||
{ "" }
|
||||
.name = "ram_addr",
|
||||
.description = "RAM address",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "",
|
||||
.default_int = 0xD0000,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "C000", .value = 0xC0000 },
|
||||
{ .description = "C400", .value = 0xC4000 },
|
||||
{ .description = "C800", .value = 0xC8000 },
|
||||
{ .description = "CC00", .value = 0xCC000 },
|
||||
{ .description = "D000", .value = 0xD0000 },
|
||||
{ .description = "D400", .value = 0xD4000 },
|
||||
{ .description = "D800", .value = 0xD8000 },
|
||||
{ .description = "DC00", .value = 0xDC000 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
"ram_size", "RAM size", CONFIG_SELECTION, "", 16384, "", { 0 },
|
||||
{
|
||||
{ "16 kB", 16384 },
|
||||
{ "64 kB", 65536 },
|
||||
{ "" }
|
||||
.name = "ram_size",
|
||||
.description = "RAM size",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 16384,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "16 kB", .value = 16384 },
|
||||
{ .description = "64 kB", .value = 65536 },
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{ "mac", "MAC Address", CONFIG_MAC, "", -1 },
|
||||
{ "", "", -1 }
|
||||
{
|
||||
.name = "mac",
|
||||
.description = "MAC Address",
|
||||
.type = CONFIG_MAC,
|
||||
.default_string = "",
|
||||
.default_int = -1
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
static const device_config_t mca_mac_config[] = {
|
||||
{ "mac", "MAC Address", CONFIG_MAC, "", -1 },
|
||||
{ "", "", -1 }
|
||||
{
|
||||
.name = "mac",
|
||||
.description = "MAC Address",
|
||||
.type = CONFIG_MAC,
|
||||
.default_string = "",
|
||||
.default_int = -1
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
#include <86box/device.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/thread.h>
|
||||
#include <86box/ui.h>
|
||||
#include <86box/network.h>
|
||||
#include <86box/net_3c503.h>
|
||||
@@ -541,12 +542,12 @@ network_reset(void)
|
||||
|
||||
network_log("NETWORK: set up for %s, card='%s'\n",
|
||||
(network_type==NET_TYPE_SLIRP)?"SLiRP":"Pcap",
|
||||
net_cards[network_card].name);
|
||||
net_cards[network_card].device->name);
|
||||
|
||||
/* Add the (new?) card to the I/O system. */
|
||||
if (net_cards[network_card].device) {
|
||||
network_log("NETWORK: adding device '%s'\n",
|
||||
net_cards[network_card].name);
|
||||
net_cards[network_card].device->name);
|
||||
device_add(net_cards[network_card].device);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
#include <86box/machine.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/path.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/nvr.h>
|
||||
|
||||
@@ -213,7 +214,7 @@ nvr_path(char *str)
|
||||
plat_dir_create(temp);
|
||||
|
||||
/* Now append the actual filename. */
|
||||
plat_path_slash(temp);
|
||||
path_slash(temp);
|
||||
strcat(temp, str);
|
||||
|
||||
return(temp);
|
||||
|
||||
38
src/nvr_at.c
38
src/nvr_at.c
@@ -290,11 +290,12 @@
|
||||
|
||||
#define RTC_REGS 14 /* number of registers */
|
||||
|
||||
#define FLAG_AMI_1992_HACK 0x01
|
||||
#define FLAG_AMI_1994_HACK 0x02
|
||||
#define FLAG_AMI_1995_HACK 0x04
|
||||
#define FLAG_P6RP4_HACK 0x08
|
||||
#define FLAG_PIIX4 0x10
|
||||
#define FLAG_NO_NMI 0x01
|
||||
#define FLAG_AMI_1992_HACK 0x02
|
||||
#define FLAG_AMI_1994_HACK 0x04
|
||||
#define FLAG_AMI_1995_HACK 0x08
|
||||
#define FLAG_P6RP4_HACK 0x10
|
||||
#define FLAG_PIIX4 0x20
|
||||
|
||||
|
||||
typedef struct {
|
||||
@@ -667,8 +668,7 @@ nvr_write(uint16_t addr, uint8_t val, void *priv)
|
||||
local->addr[addr_id] = (local->addr[addr_id] & 0x7f) | 0x80;
|
||||
if (local->bank[addr_id] > 0)
|
||||
local->addr[addr_id] = (local->addr[addr_id] & 0x7f) | (0x80 * local->bank[addr_id]);
|
||||
if (!(machines[machine].flags & MACHINE_MCA) &&
|
||||
!(machines[machine].flags & MACHINE_NONMI))
|
||||
if (!(local->flags & FLAG_NO_NMI))
|
||||
nmi_mask = (~val & 0x80);
|
||||
}
|
||||
}
|
||||
@@ -1033,12 +1033,16 @@ nvr_at_init(const device_t *info)
|
||||
nvr->irq = 8;
|
||||
local->cent = RTC_CENTURY_PS;
|
||||
local->def = 0x00;
|
||||
if (info->local & 8)
|
||||
local->flags |= FLAG_NO_NMI;
|
||||
break;
|
||||
|
||||
case 3: /* Amstrad PC's */
|
||||
nvr->irq = 1;
|
||||
local->cent = RTC_CENTURY_AT;
|
||||
local->def = 0xff;
|
||||
if (info->local & 8)
|
||||
local->flags |= FLAG_NO_NMI;
|
||||
break;
|
||||
|
||||
case 4: /* IBM AT */
|
||||
@@ -1204,6 +1208,26 @@ const device_t piix4_nvr_device = {
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t ps_no_nmi_nvr_device = {
|
||||
"PS/1 or PS/2 NVRAM (No NMI)",
|
||||
"ps1_nvr",
|
||||
DEVICE_PS2,
|
||||
10,
|
||||
nvr_at_init, nvr_at_close, nvr_at_reset,
|
||||
{ NULL }, nvr_at_speed_changed,
|
||||
NULL
|
||||
};
|
||||
|
||||
const device_t amstrad_no_nmi_nvr_device = {
|
||||
"Amstrad NVRAM (No NMI)",
|
||||
"amstrad_nvr",
|
||||
DEVICE_ISA | DEVICE_AT,
|
||||
11,
|
||||
nvr_at_init, nvr_at_close, nvr_at_reset,
|
||||
{ NULL }, nvr_at_speed_changed,
|
||||
NULL
|
||||
};
|
||||
|
||||
const device_t ami_1992_nvr_device = {
|
||||
.name = "AMI Color 1992 PC/AT NVRAM",
|
||||
.internal_name = "ami_1992_nvr",
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
#include <86box/mem.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/path.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/plat_dynld.h>
|
||||
#include <86box/ui.h>
|
||||
@@ -88,6 +89,8 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
# define PATH_FREETYPE_DLL "freetype.dll"
|
||||
#elif defined __APPLE__
|
||||
# define PATH_FREETYPE_DLL "libfreetype.dylib"
|
||||
#else
|
||||
# define PATH_FREETYPE_DLL "libfreetype.so.6"
|
||||
#endif
|
||||
@@ -594,7 +597,7 @@ update_font(escp_t *dev)
|
||||
|
||||
/* Create a full pathname for the ROM file. */
|
||||
strcpy(path, dev->fontpath);
|
||||
plat_path_slash(path);
|
||||
path_slash(path);
|
||||
strcat(path, fn);
|
||||
|
||||
escp_log("Temp file=%s\n", path);
|
||||
@@ -2060,14 +2063,14 @@ escp_init(void *lpt)
|
||||
}
|
||||
|
||||
strcpy(dev->fontpath, exe_path);
|
||||
plat_path_slash(dev->fontpath);
|
||||
path_slash(dev->fontpath);
|
||||
strcat(dev->fontpath, "roms/printer/fonts/");
|
||||
|
||||
/* Create the full path for the page images. */
|
||||
plat_append_filename(dev->pagepath, usr_path, "printer");
|
||||
path_append_filename(dev->pagepath, usr_path, "printer");
|
||||
if (! plat_dir_check(dev->pagepath))
|
||||
plat_dir_create(dev->pagepath);
|
||||
plat_path_slash(dev->pagepath);
|
||||
path_slash(dev->pagepath);
|
||||
|
||||
dev->page_width = PAGE_WIDTH;
|
||||
dev->page_height = PAGE_HEIGHT;
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/path.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/plat_dynld.h>
|
||||
#include <86box/ui.h>
|
||||
@@ -152,7 +153,7 @@ convert_to_pdf(ps_t *dev)
|
||||
char input_fn[1024], output_fn[1024], *gsargv[9];
|
||||
|
||||
strcpy(input_fn, dev->printer_path);
|
||||
plat_path_slash(input_fn);
|
||||
path_slash(input_fn);
|
||||
strcat(input_fn, dev->filename);
|
||||
|
||||
strcpy(output_fn, input_fn);
|
||||
@@ -206,7 +207,7 @@ write_buffer(ps_t *dev, bool finish)
|
||||
plat_tempfile(dev->filename, NULL, ".ps");
|
||||
|
||||
strcpy(path, dev->printer_path);
|
||||
plat_path_slash(path);
|
||||
path_slash(path);
|
||||
strcat(path, dev->filename);
|
||||
|
||||
fp = plat_fopen(path, "a");
|
||||
@@ -365,10 +366,10 @@ ps_init(void *lpt)
|
||||
|
||||
/* Cache print folder path. */
|
||||
memset(dev->printer_path, 0x00, sizeof(dev->printer_path));
|
||||
plat_append_filename(dev->printer_path, usr_path, "printer");
|
||||
path_append_filename(dev->printer_path, usr_path, "printer");
|
||||
if (!plat_dir_check(dev->printer_path))
|
||||
plat_dir_create(dev->printer_path);
|
||||
plat_path_slash(dev->printer_path);
|
||||
path_slash(dev->printer_path);
|
||||
|
||||
timer_add(&dev->pulse_timer, pulse_timer, dev, 0);
|
||||
timer_add(&dev->timeout_timer, timeout_timer, dev, 0);
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
#include <86box/device.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/path.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/printer.h>
|
||||
@@ -150,10 +151,10 @@ dump_page(prnt_t *dev)
|
||||
|
||||
/* Create the full path for this file. */
|
||||
memset(path, 0x00, sizeof(path));
|
||||
plat_append_filename(path, usr_path, "printer");
|
||||
path_append_filename(path, usr_path, "printer");
|
||||
if (! plat_dir_check(path))
|
||||
plat_dir_create(path);
|
||||
plat_path_slash(path);
|
||||
path_slash(path);
|
||||
strcat(path, dev->filename);
|
||||
|
||||
/* Create the file. */
|
||||
|
||||
@@ -22,6 +22,14 @@ endif()
|
||||
find_package(Threads REQUIRED)
|
||||
find_package(Qt${QT_MAJOR} COMPONENTS Core Widgets Network OpenGL REQUIRED)
|
||||
find_package(Qt${QT_MAJOR}LinguistTools REQUIRED)
|
||||
# TODO: Is this the correct way to do this, and is it required on any
|
||||
# other platforms or with Qt 5?
|
||||
if(APPLE AND USE_QT6)
|
||||
find_package(Qt6Gui/Qt6QCocoaIntegrationPlugin REQUIRED)
|
||||
find_package(Qt6Widgets/Qt6QMacStylePlugin REQUIRED)
|
||||
find_package(Qt6Gui/Qt6QICOPlugin REQUIRED)
|
||||
find_package(Qt6Gui/Qt6QICNSPlugin REQUIRED)
|
||||
endif()
|
||||
|
||||
add_library(plat STATIC
|
||||
qt.c
|
||||
@@ -232,17 +240,13 @@ if (APPLE AND CMAKE_MACOSX_BUNDLE)
|
||||
set(INSTALL_CMAKE_DIR "${prefix}/Resources")
|
||||
|
||||
# using the install_qt5_plugin to add Qt plugins into the macOS app bundle
|
||||
if (USE_QT6)
|
||||
install_qt5_plugin("Qt6::QCocoaIntegrationPlugin" QT_PLUGINS ${prefix})
|
||||
else()
|
||||
install_qt5_plugin("Qt5::QCocoaIntegrationPlugin" QT_PLUGINS ${prefix})
|
||||
install_qt5_plugin("Qt5::QMacStylePlugin" QT_PLUGINS ${prefix})
|
||||
install_qt5_plugin("Qt5::QICOPlugin" QT_PLUGINS ${prefix})
|
||||
install_qt5_plugin("Qt5::QICNSPlugin" QT_PLUGINS ${prefix})
|
||||
endif()
|
||||
|
||||
install_qt5_plugin("Qt${QT_MAJOR}::QCocoaIntegrationPlugin" QT_PLUGINS ${prefix})
|
||||
install_qt5_plugin("Qt${QT_MAJOR}::QMacStylePlugin" QT_PLUGINS ${prefix})
|
||||
install_qt5_plugin("Qt${QT_MAJOR}::QICOPlugin" QT_PLUGINS ${prefix})
|
||||
install_qt5_plugin("Qt${QT_MAJOR}::QICNSPlugin" QT_PLUGINS ${prefix})
|
||||
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
|
||||
"[Paths]\nPlugins = ${_qt_plugin_dir}\n")
|
||||
"[Paths]\nPlugins = PlugIns\n")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
|
||||
DESTINATION "${INSTALL_CMAKE_DIR}")
|
||||
|
||||
@@ -253,8 +257,8 @@ if (APPLE AND CMAKE_MACOSX_BUNDLE)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Append Qt's lib folder which is two levels above Qt5Widgets_DIR
|
||||
list(APPEND DIRS "${Qt5Widgets_DIR}/../..")
|
||||
# Append Qt's lib folder which is two levels above Qt*Widgets_DIR
|
||||
list(APPEND DIRS "${Qt${QT_MAJOR}Widgets_DIR}/../..")
|
||||
|
||||
include(InstallRequiredSystemLibraries)
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
* Joystick support
|
||||
@@ -56,7 +56,7 @@ void evdev_thread_func()
|
||||
{
|
||||
while (!stopped)
|
||||
{
|
||||
for (int i = 0; i < evdev_mice.size(); i++)
|
||||
for (unsigned int i = 0; i < evdev_mice.size(); i++)
|
||||
{
|
||||
struct input_event ev;
|
||||
int rc = libevdev_next_event(evdev_mice[i].second, LIBEVDEV_READ_FLAG_NORMAL, &ev);
|
||||
@@ -67,7 +67,7 @@ void evdev_thread_func()
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < evdev_mice.size(); i++)
|
||||
for (unsigned int i = 0; i < evdev_mice.size(); i++)
|
||||
{
|
||||
libevdev_free(evdev_mice[i].second);
|
||||
close(evdev_mice[i].first);
|
||||
|
||||
@@ -117,7 +117,7 @@ void DeviceConfig::ConfigureDevice(const _device_* device, int instance, Setting
|
||||
cbox->setObjectName(config->name);
|
||||
auto* model = cbox->model();
|
||||
int currentIndex = -1;
|
||||
int selected;
|
||||
int selected = 0;
|
||||
switch (config->type) {
|
||||
case CONFIG_SELECTION:
|
||||
selected = config_get_int(device_context.name, const_cast<char*>(config->name), config->default_int);
|
||||
@@ -130,7 +130,7 @@ void DeviceConfig::ConfigureDevice(const _device_* device, int instance, Setting
|
||||
break;
|
||||
}
|
||||
|
||||
for (auto* sel = config->selection; (sel->description != nullptr) && (strlen(sel->description) > 0); ++sel) {
|
||||
for (auto* sel = config->selection; (sel != nullptr) && (sel->description != nullptr) && (strlen(sel->description) > 0); ++sel) {
|
||||
int row = Models::AddEntry(model, sel->description, sel->value);
|
||||
if (selected == sel->value) {
|
||||
currentIndex = row;
|
||||
|
||||
@@ -564,7 +564,7 @@ void HarddiskDialog::onExistingFileSelected(const QString &fileName) {
|
||||
else if (((size % 3072) == 0) && (size <= 53477376))
|
||||
heads = 6;
|
||||
else {
|
||||
int i;
|
||||
uint32_t i;
|
||||
for (i = 5; i < 16; i++) {
|
||||
if (((size % (i << 9)) == 0) && (size <= ((i * 17) << 19)))
|
||||
break;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user