mirror of
https://github.com/86Box/86Box.git
synced 2026-02-23 01:48:21 -07:00
Merge upstream to master
This commit is contained in:
@@ -36,7 +36,7 @@ if(MUNT_EXTERNAL)
|
||||
endif()
|
||||
|
||||
project(86Box
|
||||
VERSION 5.2
|
||||
VERSION 6.0
|
||||
DESCRIPTION "Emulator of x86-based systems"
|
||||
HOMEPAGE_URL "https://86box.net"
|
||||
LANGUAGES C CXX)
|
||||
|
||||
78
README-UNIX-MODE-WITH-OSD.txt
Normal file
78
README-UNIX-MODE-WITH-OSD.txt
Normal file
@@ -0,0 +1,78 @@
|
||||
UNIX MODE WITH OSD
|
||||
|
||||
86Box supports running on the linux framebuffer without QT and without X, making the pc appear as a nearly native old machine.
|
||||
|
||||
running it that way is already supported but when doing it, 86box loses all menu and all abilities to mount floppies and CDs, it also becomes the owner of the entire pc with no way of quitting it or changing virtual console.
|
||||
|
||||
to overcome this, an on screen display menu is available that allows doing everything the textual console (src/unix/unix.c) does;
|
||||
mount/unmount all supported media like floppy and cd
|
||||
hard reset the machine
|
||||
quit 86box
|
||||
seeing the current performance %
|
||||
|
||||
key bindings:
|
||||
Right Control + F11 opens the osd
|
||||
|
||||
while is open:
|
||||
arrows up, down moves the cursor
|
||||
enter does the action, at mount options it enters a list of appropriate files (*.img, *.iso)
|
||||
ESC goes back to main or closes the OSD
|
||||
|
||||
current limitations:
|
||||
OSD can mount images to first floppy and first cd, secondary devices are not supported
|
||||
it does not show if an image is mounted or not
|
||||
the option "version" does actully print it, but it can't be seen beacuse its printed under 86box display
|
||||
extremely long filenames can overflow the blue window
|
||||
the title does actually overflow the window width :)
|
||||
|
||||
These are the steps to install a machine fully dedicated to 86Box and tuned to make it appear almost native.
|
||||
This works almost the same for on a Raspberry Pi
|
||||
|
||||
|
||||
1) install a vanilla Debian Trixie with netinst and without any graphical environment, or a "server" distro for RPI
|
||||
depending on the machine speed, this will make boot time extremely short
|
||||
|
||||
2) apt update if necessary
|
||||
|
||||
3) install git and almost all required packages
|
||||
apt install git build-essential cmake extra-cmake-modules pkg-config ninja-build libfreetype-dev libsdl2-dev libpng-dev libopenal-dev librtmidi-dev libfluidsynth-dev libsndfile1-dev libserialport-dev libevdev-dev libxkbcommon-dev libxkbcommon-x11-dev libslirp-dev
|
||||
|
||||
4) setup git and clone
|
||||
git@github.com:86Box/86Box.git
|
||||
git@github.com:86Box/roms.git
|
||||
|
||||
5) build (128 => super speed, too much for a 2GB machine)
|
||||
cd 86Box
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. --preset regular -D QT=OFF -D PREFER_STATIC=ON
|
||||
cmake --build regular -j 128
|
||||
cd ../../
|
||||
ln -s 86Box/build/regular/src/86Box 86Box.exe
|
||||
|
||||
6) boot
|
||||
as root so it can take complete ownership of the linux framebuffer
|
||||
|
||||
7) notes:
|
||||
- 86Box will complain to be unable to find readline, this is fine, we don't need the command line at all
|
||||
- ALSOFT will complain it can't connect to PipeWire, no problem, sounds will come from standard ALSA
|
||||
|
||||
8) additional steps
|
||||
add a new udev rule to automount any USB key to a known location so files in it can be listed in the OSD floppy/cd mount options
|
||||
|
||||
create /etc/udev/rules.d/99-automount.rules
|
||||
|
||||
with:
|
||||
ACTION=="add", ENV{ID_BUS}=="usb", ENV{ID_TYPE}=="disk", ENV{ID_FS_TYPE}=="exfat", RUN+="/usr/bin/systemd-mount --no-block --automount=yes --collect /dev/%k '/mnt'"
|
||||
|
||||
replicate this line for each filesystem you expect the usb key to be formatted, in this example "exfat"
|
||||
this is going to conflict if multiple keys are inserted, don't do it
|
||||
|
||||
final step
|
||||
configure some 86box vm using another pc with the GUI
|
||||
copy the VM definitions to this new pc and manually launch 86box from the textual command line
|
||||
optionally craft a boot menu to be shown in place of the login prompt or setup 86box as a debiasn service, it will start at boot
|
||||
just make sure the pc will be accessible via ssh or some other way, autobooting 86box canà make difficult terminating it
|
||||
|
||||
|
||||
|
||||
@@ -43,23 +43,33 @@ pretty_date() {
|
||||
|
||||
# Patch files.
|
||||
patch_file() {
|
||||
# Stop if the file doesn't exist.
|
||||
[ ! -e "$1" ] && return
|
||||
# Parse arguments.
|
||||
desc="$1"
|
||||
shift
|
||||
pattern="$1"
|
||||
shift
|
||||
|
||||
# Patch file.
|
||||
if sed -i -r -e "$3" "$1"
|
||||
then
|
||||
echo "[-] Patched $2 on $1"
|
||||
else
|
||||
echo "[!] Patching $2 on $1 failed"
|
||||
fi
|
||||
# Patch the specified files.
|
||||
for file in "$@"
|
||||
do
|
||||
# Skip file if it doesn't exist.
|
||||
[ ! -e "$file" ] && continue
|
||||
|
||||
# Patch file.
|
||||
if sed -i -r -e "$pattern" "$file"
|
||||
then
|
||||
echo "[-] Patched $desc in $file"
|
||||
else
|
||||
echo "[!] Patching $desc in $file failed"
|
||||
fi
|
||||
done
|
||||
}
|
||||
patch_file CMakeLists.txt VERSION 's/^(\s*VERSION ).+/\1'"$newversion"'/'
|
||||
patch_file vcpkg.json version-string 's/(^\s*"version-string"\s*:\s*")[^"]+/\1'"$newversion"'/'
|
||||
patch_file src/unix/assets/*.spec Version 's/(Version:\s+)[0-9].+/\1'"$newversion"'/'
|
||||
patch_file src/unix/assets/*.spec '%global romver' 's/(^%global\ romver\s+)[0-9]{8}/\1'"$romversion"'/'
|
||||
patch_file src/unix/assets/*.spec 'changelog version' 's/(^[*]\s.*>\s+)[0-9].+/\1'"$newversion"-1'/'
|
||||
patch_file src/unix/assets/*.spec 'changelog date' 's/(^[*]\s)[a-zA-Z]{3}\s[a-zA-Z]{3}\s[0-9]{2}\s[0-9]{4}/\1'"$(pretty_date)"'/'
|
||||
patch_file src/unix/assets/*.metainfo.xml release 's/(<release version=")[^"]+(" date=")[^"]+/\1'"$newversion"'\2'"$(date +%Y-%m-%d)"'/'
|
||||
patch_file debian/changelog 'changelog date' 's/> .+/> '"$(date -R)"'/'
|
||||
patch_file debian/changelog 'changelog version' 's/86box \(.+\)/86box \('"$newversion"'\)/'
|
||||
patch_file VERSION 's/^(\s*VERSION ).+/\1'"$newversion"'/' CMakeLists.txt
|
||||
patch_file version-string 's/(^\s*"version-string"\s*:\s*")[^"]+/\1'"$newversion"'/' vcpkg.json
|
||||
patch_file Version 's/(Version:\s+)[0-9].+/\1'"$newversion"'/' src/unix/assets/*.spec
|
||||
patch_file '%global romver' 's/(^%global\ romver\s+)[^\s]+/\1'"$romversion"'/' src/unix/assets/*.spec
|
||||
patch_file 'changelog version' 's/(^[*]\s.*>\s+)[0-9].+/\1'"$newversion"-1'/' src/unix/assets/*.spec
|
||||
patch_file 'changelog date' 's/(^[*]\s)[a-zA-Z]{3}\s[a-zA-Z]{3}\s[0-9]{2}\s[0-9]{4}/\1'"$(pretty_date)"'/' src/unix/assets/*.spec
|
||||
patch_file release 's/(<release version=")[^"]+(" date=")[^"]+/\1'"$newversion"'\2'"$(date +%Y-%m-%d)"'/' src/unix/assets/*.metainfo.xml
|
||||
patch_file 'changelog date' 's/> .+/> '"$(date -R)"'/' debian/changelog
|
||||
patch_file 'changelog version' 's/86box \(.+\)/86box \('"$newversion"'\)/' debian/changelog
|
||||
|
||||
4
debian/changelog
vendored
4
debian/changelog
vendored
@@ -1,5 +1,5 @@
|
||||
86box (5.2) UNRELEASED; urgency=medium
|
||||
86box (6.0) UNRELEASED; urgency=medium
|
||||
|
||||
* Bump release.
|
||||
|
||||
-- Jasmine Iwanek <jriwanek@gmail.com> Thu, 18 Sep 2025 04:25:57 +0200
|
||||
-- Jasmine Iwanek <jriwanek@gmail.com> Sun, 26 Oct 2025 17:41:47 +0100
|
||||
|
||||
17
src/86box.c
17
src/86box.c
@@ -1083,7 +1083,10 @@ usage:
|
||||
/* Build the global configuration file path. */
|
||||
if (global == NULL) {
|
||||
plat_get_global_config_dir(global_cfg_path, sizeof(global_cfg_path));
|
||||
path_append_filename(global_cfg_path, global_cfg_path, GLOBAL_CONFIG_FILE);
|
||||
// avoid strcpy global_cfg_path over itself (valgrind says it's bad...)
|
||||
// path_append_filename(global_cfg_path, global_cfg_path, GLOBAL_CONFIG_FILE);
|
||||
path_slash(global_cfg_path);
|
||||
strcat(global_cfg_path, GLOBAL_CONFIG_FILE);
|
||||
} else {
|
||||
strncpy(global_cfg_path, global, sizeof(global_cfg_path) - 1);
|
||||
}
|
||||
@@ -1737,19 +1740,19 @@ update_mouse_msg(void)
|
||||
*(wcp - 1) = L'\0';
|
||||
mbstowcs(wcpu, cpu_s->name, strlen(cpu_s->name) + 1);
|
||||
#ifdef _WIN32
|
||||
swprintf(mouse_msg[0], sizeof_w(mouse_msg[0]), L"%%i.%%i%%%% - %ls",
|
||||
swprintf(mouse_msg[0], sizeof_w(mouse_msg[0]), L"%%i%%%% - %ls",
|
||||
plat_get_string(STRING_MOUSE_CAPTURE));
|
||||
swprintf(mouse_msg[1], sizeof_w(mouse_msg[1]), L"%%i.%%i%%%% - %ls",
|
||||
swprintf(mouse_msg[1], sizeof_w(mouse_msg[1]), L"%%i%%%% - %ls",
|
||||
(mouse_get_buttons() > 2) ? plat_get_string(STRING_MOUSE_RELEASE) : plat_get_string(STRING_MOUSE_RELEASE_MMB));
|
||||
wcsncpy(mouse_msg[2], L"%i.%i%%", sizeof_w(mouse_msg[2]));
|
||||
#else
|
||||
swprintf(mouse_msg[0], sizeof_w(mouse_msg[0]), L"%ls v%ls - %%i.%%i%%%% - %ls - %ls/%ls - %ls",
|
||||
swprintf(mouse_msg[0], sizeof_w(mouse_msg[0]), L"%ls v%ls - %%i%%%% - %ls - %ls/%ls - %ls",
|
||||
EMU_NAME_W, EMU_VERSION_FULL_W, wmachine, wcpufamily, wcpu,
|
||||
plat_get_string(STRING_MOUSE_CAPTURE));
|
||||
swprintf(mouse_msg[1], sizeof_w(mouse_msg[1]), L"%ls v%ls - %%i.%%i%%%% - %ls - %ls/%ls - %ls",
|
||||
swprintf(mouse_msg[1], sizeof_w(mouse_msg[1]), L"%ls v%ls - %%i%%%% - %ls - %ls/%ls - %ls",
|
||||
EMU_NAME_W, EMU_VERSION_FULL_W, wmachine, wcpufamily, wcpu,
|
||||
(mouse_get_buttons() > 2) ? plat_get_string(STRING_MOUSE_RELEASE) : plat_get_string(STRING_MOUSE_RELEASE_MMB));
|
||||
swprintf(mouse_msg[2], sizeof_w(mouse_msg[2]), L"%ls v%ls - %%i.%%i%%%% - %ls - %ls/%ls",
|
||||
swprintf(mouse_msg[2], sizeof_w(mouse_msg[2]), L"%ls v%ls - %%i%%%% - %ls - %ls/%ls",
|
||||
EMU_NAME_W, EMU_VERSION_FULL_W, wmachine, wcpufamily, wcpu);
|
||||
#endif
|
||||
}
|
||||
@@ -1884,7 +1887,7 @@ pc_run(void)
|
||||
else
|
||||
fps = ((fps + 20) / 50) * 50;
|
||||
#endif
|
||||
swprintf(temp, sizeof_w(temp), mouse_msg[mouse_msg_idx], fps / (force_10ms ? 1 : 10), force_10ms ? 0 : (fps % 10));
|
||||
swprintf(temp, sizeof_w(temp), mouse_msg[mouse_msg_idx], fps / (force_10ms ? 1 : 10));
|
||||
#ifdef __APPLE__
|
||||
/* Needed due to modifying the UI on the non-main thread is a big no-no. */
|
||||
dispatch_async_f(dispatch_get_main_queue(), wcsdup((const wchar_t *) temp), _ui_window_title);
|
||||
|
||||
@@ -1803,6 +1803,16 @@ image_load_cue(cd_image_t *img, const char *cuefile)
|
||||
lo_cmd = 0;
|
||||
|
||||
image_log(img->log, " [SESSION ] Initialization successful\n");
|
||||
} else if (!strcmp(command, "TAOGAP")) {
|
||||
ci = &(ct->idx[2]);
|
||||
|
||||
ci->type = INDEX_ZERO;
|
||||
ci->file = tf;
|
||||
success = image_cue_get_frame(&frame, &line);
|
||||
ci->length = frame;
|
||||
|
||||
image_log(img->log, " [INDEX ] 02 (%8s): Initialization %s\n",
|
||||
cit[ci->type + 2], success ? "successful" : "failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1041,6 +1041,7 @@ static const device_config_t mke_config[] = {
|
||||
{ .description = "320H", .value = 0x320 },
|
||||
{ .description = "330H", .value = 0x330 },
|
||||
{ .description = "340H", .value = 0x340 },
|
||||
{ .description = "630H", .value = 0x630 },
|
||||
{ NULL }
|
||||
},
|
||||
.bios = { { 0 } }
|
||||
|
||||
@@ -8,25 +8,23 @@
|
||||
*
|
||||
* Implementation of the VLSI SuperCore and Wildcat chipsets.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* win2kgamer
|
||||
*
|
||||
* Copyright 2020-2025 Miran Grca.
|
||||
* Copyright 2025 win2kgamer
|
||||
*/
|
||||
|
||||
#ifdef ENABLE_VL82C59X_LOG
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#ifdef ENABLE_VL82C59X_LOG
|
||||
#define HAVE_STDARG_H
|
||||
#endif
|
||||
#include <86box/86box.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/device.h>
|
||||
@@ -138,21 +136,21 @@ vl82c59x_smram(vl82c59x_t *dev)
|
||||
|
||||
/* A/B region SMRAM seems to not be controlled by 591 reg 0x7C/SMRAM enable */
|
||||
/* Dell Dimension BIOS breaks if A0000 region is controlled by SMRAM enable */
|
||||
if (dev->pci_conf[0x64] & 0x55) {
|
||||
if (dev->pci_conf[0x64] & 0x55)
|
||||
smram_enable(dev->smram[0], 0x000a0000, 0x000a0000, 0x10000, dev->pci_conf[0x64] & 0xAA, dev->pci_conf[0x64] & 0x55);
|
||||
}
|
||||
if (dev->pci_conf[0x65] & 0x55) {
|
||||
|
||||
if (dev->pci_conf[0x65] & 0x55)
|
||||
smram_enable(dev->smram[1], 0x000b0000, 0x000b0000, 0x10000, dev->pci_conf[0x65] & 0xAA, dev->pci_conf[0x65] & 0x55);
|
||||
}
|
||||
|
||||
/* Handle E region SMRAM */
|
||||
if (dev->pci_conf[0x7C] & 0x80) {
|
||||
if (dev->pci_conf[0x68] & 0x05) {
|
||||
smram_enable(dev->smram[2], 0x000e0000, 0x000e0000, 0x8000, dev->pci_conf[0x68] & 0x0A, dev->pci_conf[0x68] & 0x05);
|
||||
}
|
||||
if (dev->pci_conf[0x68] & 0x50) {
|
||||
smram_enable(dev->smram[3], 0x000e8000, 0x000e8000, 0x8000, dev->pci_conf[0x68] & 0xA0, dev->pci_conf[0x68] & 0x50);
|
||||
}
|
||||
if (dev->pci_conf[0x68] & 0x05)
|
||||
smram_enable(dev->smram[2], 0x000e0000, 0x000e0000, 0x8000,
|
||||
dev->pci_conf[0x68] & 0x0a, dev->pci_conf[0x68] & 0x05);
|
||||
|
||||
if (dev->pci_conf[0x68] & 0x50)
|
||||
smram_enable(dev->smram[3], 0x000e8000, 0x000e8000, 0x8000,
|
||||
dev->pci_conf[0x68] & 0xa0, dev->pci_conf[0x68] & 0x50);
|
||||
}
|
||||
|
||||
flushmmucache();
|
||||
@@ -216,82 +214,62 @@ vl82c59x_write(int func, int addr, uint8_t val, void *priv)
|
||||
|
||||
vl82c59x_log(dev->log, "[%04X:%08X] VL82c591: [W] (%02X, %02X) = %02X\n", CS, cpu_state.pc, func, addr, val);
|
||||
|
||||
if (func == 0x00)
|
||||
switch (addr) {
|
||||
case 0x04:
|
||||
case 0x05: /* PCI Command Register */
|
||||
if (func == 0x00) switch (addr) {
|
||||
case 0x04: case 0x05: /* PCI Command Register */
|
||||
dev->pci_conf[addr] = val;
|
||||
break;
|
||||
case 0x54: /* Cache Control Register 1 */
|
||||
dev->pci_conf[addr] = val;
|
||||
cpu_cache_ext_enabled = (val & 0xc0);
|
||||
cpu_update_waitstates();
|
||||
break;
|
||||
case 0x55: /* Cache Control Register 2 */
|
||||
dev->pci_conf[addr] = val;
|
||||
cpu_cache_int_enabled = (val & 0x40);
|
||||
cpu_update_waitstates();
|
||||
break;
|
||||
case 0x58: /* RAMCFG0 */
|
||||
case 0x59: /* RAMCFG1 */
|
||||
dev->pci_conf[addr] = val;
|
||||
break;
|
||||
case 0x5a: /* Wildcat EDO RAM control */
|
||||
if (dev->type == 0x01)
|
||||
dev->pci_conf[addr] = val;
|
||||
break;
|
||||
case 0x54: /* Cache Control Register 1 */
|
||||
dev->pci_conf[addr] = val;
|
||||
cpu_cache_ext_enabled = (val & 0xc0);
|
||||
cpu_update_waitstates();
|
||||
break;
|
||||
case 0x55: /* Cache Control Register 2 */
|
||||
dev->pci_conf[addr] = val;
|
||||
cpu_cache_int_enabled = (val & 0x40);
|
||||
cpu_update_waitstates();
|
||||
break;
|
||||
case 0x58: /* RAMCFG0 */
|
||||
case 0x59: /* RAMCFG1 */
|
||||
dev->pci_conf[addr] = val;
|
||||
break;
|
||||
case 0x5A: /* Wildcat EDO RAM control */
|
||||
if (dev->type == 0x01) {
|
||||
dev->pci_conf[addr] = val;
|
||||
}
|
||||
break;
|
||||
case 0x5C: /* RAMCTL0 */
|
||||
case 0x5D: /* RAMCTL1 */
|
||||
case 0x5E: /* RAMCTL2 */
|
||||
case 0x5F:
|
||||
case 0x60:
|
||||
case 0x62:
|
||||
/* Apricot XEN-PC Ruby/Jade BIOS requires bit 2 to be set or */
|
||||
/* CMOS setup hangs on subsequent runs after NVRAM is initialized */
|
||||
dev->pci_conf[addr] = val;
|
||||
break;
|
||||
case 0x64: /* A-B SMRAM regs */
|
||||
case 0x65:
|
||||
dev->pci_conf[addr] = val;
|
||||
vl82c59x_smram(dev);
|
||||
break;
|
||||
case 0x66: /* Shadow RAM */
|
||||
case 0x67:
|
||||
case 0x68:
|
||||
case 0x69:
|
||||
dev->pci_conf[addr] = val;
|
||||
vl82c59x_recalc(dev);
|
||||
vl82c59x_smram(dev);
|
||||
break;
|
||||
case 0x6C: /* L2 Cacheability registers */
|
||||
case 0x6D:
|
||||
case 0x6E:
|
||||
case 0x6F:
|
||||
case 0x70:
|
||||
case 0x71:
|
||||
case 0x74: /* Suspected PMRA registers */
|
||||
case 0x75:
|
||||
case 0x76:
|
||||
case 0x78:
|
||||
case 0x79:
|
||||
case 0x7A:
|
||||
dev->pci_conf[addr] = val;
|
||||
break;
|
||||
case 0x7C: /* MISCSSET, bit 7 is SMRAM enable (for the E region) */
|
||||
/* io.c logging shows BIOSes setting Bit 7 here */
|
||||
dev->pci_conf[addr] = val;
|
||||
vl82c59x_smram(dev);
|
||||
break;
|
||||
case 0x7D: /* Unknown but seems Wildcat-specific, Zeos and PB600 BIOSes hang if bit 3 is writable */
|
||||
if (dev->type == 0x01) {
|
||||
dev->pci_conf[addr] = val & 0xf7;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (addr > 0x3F)
|
||||
vl82c59x_log(dev->log, "VL82c591: Unknown reg [W] (%02X, %02X) = %02X\n", func, addr, val);
|
||||
break;
|
||||
break;
|
||||
case 0x5c ... 0x5e: /* RAMCTL0-RAMCTL2 */
|
||||
case 0x5f ... 0x60:
|
||||
case 0x62:
|
||||
/* Apricot XEN-PC Ruby/Jade BIOS requires bit 2 to be set or */
|
||||
/* CMOS setup hangs on subsequent runs after NVRAM is initialized */
|
||||
dev->pci_conf[addr] = val;
|
||||
break;
|
||||
case 0x64 ... 0x65: /* A-B SMRAM regs */
|
||||
dev->pci_conf[addr] = val;
|
||||
vl82c59x_smram(dev);
|
||||
break;
|
||||
case 0x66 ... 0x69: /* Shadow RAM */
|
||||
dev->pci_conf[addr] = val;
|
||||
vl82c59x_recalc(dev);
|
||||
vl82c59x_smram(dev);
|
||||
break;
|
||||
case 0x6c ... 0x71: /* L2 Cacheability registers */
|
||||
case 0x74 ... 0x76: /* Suspected PMRA registers */
|
||||
case 0x78 ... 0x7a:
|
||||
dev->pci_conf[addr] = val;
|
||||
break;
|
||||
case 0x7c: /* MISCSSET, bit 7 is SMRAM enable (for the E region) */
|
||||
/* io.c logging shows BIOSes setting Bit 7 here */
|
||||
dev->pci_conf[addr] = val;
|
||||
vl82c59x_smram(dev);
|
||||
break;
|
||||
case 0x7d: /* Unknown but seems Wildcat-specific, Zeos and PB600 BIOSes hang if bit 3 is writable */
|
||||
if (dev->type == 0x01)
|
||||
dev->pci_conf[addr] = val & 0xf7;
|
||||
break;
|
||||
default:
|
||||
if (addr > 0x3f)
|
||||
vl82c59x_log(dev->log, "VL82c591: Unknown reg [W] (%02X, %02X) = %02X\n", func, addr, val);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -302,12 +280,10 @@ vl82c59x_read(int func, int addr, void *priv)
|
||||
const vl82c59x_t *dev = (vl82c59x_t *) priv;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
if (func == 0x00) {
|
||||
switch (addr) {
|
||||
default:
|
||||
ret = dev->pci_conf[addr];
|
||||
break;
|
||||
}
|
||||
if (func == 0x00) switch (addr) {
|
||||
default:
|
||||
ret = dev->pci_conf[addr];
|
||||
break;
|
||||
}
|
||||
|
||||
vl82c59x_log(dev->log, "[%04X:%08X] VL82c591: [R] (%02X, %02X) = %02X\n", CS, cpu_state.pc, func, addr, ret);
|
||||
@@ -324,110 +300,83 @@ vl82c59x_sb_write(int func, int addr, uint8_t val, void *priv)
|
||||
|
||||
vl82c59x_log(dev->log, "[%04X:%08X] VL82c593: [W] (%02X, %02X) = %02X\n", CS, cpu_state.pc, func, addr, val);
|
||||
|
||||
if (func == 0x00)
|
||||
switch (addr) {
|
||||
case 0x04:
|
||||
case 0x05: /* PCI Command Register */
|
||||
if (func == 0x00) switch (addr) {
|
||||
case 0x04 ... 0x05: /* PCI Command Register */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x50: /* MISCSETC */
|
||||
case 0x51: /* MISCSETB */
|
||||
case 0x52: /* MISCSETA */
|
||||
case 0x53:
|
||||
case 0x54:
|
||||
case 0x55:
|
||||
case 0x56:
|
||||
case 0x57:
|
||||
case 0x58:
|
||||
case 0x59:
|
||||
case 0x5A:
|
||||
/* Has at least one GPIO bit. Compaq Presario 700/900 586 BIOS */
|
||||
/* uses bit 2 as an output to set the onboard ES688's base I/O */
|
||||
/* address. Bit 2 cleared = 220, bit 2 set = 240 */
|
||||
case 0x5C: /* Interrupt Assertion Level Register */
|
||||
case 0x5D:
|
||||
case 0x50 ... 0x52: /* MISCSETC-MISCSETA */
|
||||
case 0x53 ... 0x5a:
|
||||
/* Has at least one GPIO bit. Compaq Presario 700/900 586 BIOS */
|
||||
/* uses bit 2 as an output to set the onboard ES688's base I/O */
|
||||
/* address. Bit 2 cleared = 220, bit 2 set = 240 */
|
||||
case 0x5c ... 0x5d: /* Interrupt Assertion Level Register */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x60: /* SMI Enable Register */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x61: /* SMI Status Register */
|
||||
dev->pci_conf_sb[addr] = 0x00;
|
||||
break;
|
||||
case 0x62: /* SMI I/O port high byte */
|
||||
case 0x63: /* SMI I/O port low byte */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
vl82c59x_set_pm_io(dev);
|
||||
break;
|
||||
case 0x64: /* System Event Enable Register 1 */
|
||||
case 0x66: /* System Event Enable Register 2 */
|
||||
case 0x68: /* System Event Enable Register 3 */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x65: /* System Event Status Register 1 */
|
||||
case 0x67: /* System Event Status Register 2 */
|
||||
case 0x69: /* System Event Status Register 3 */
|
||||
dev->pci_conf_sb[addr] = 0x00;
|
||||
break;
|
||||
case 0x6a: /* PCI Activity Control Register */
|
||||
/* Top 4 bits are Read/Clear */
|
||||
dev->pci_conf_sb[addr] = val & 0x0f;
|
||||
break;
|
||||
case 0x6b: /* Programmable I/O Range Register High Byte */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x6c: /* Programmable I/O Range Register Low Byte */
|
||||
case 0x6d: /* System Event Control Register/SMI Global Enable */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x60: /* SMI Enable Register */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x61: /* SMI Status Register */
|
||||
dev->pci_conf_sb[addr] = 0x00;
|
||||
break;
|
||||
case 0x62: /* SMI I/O port high byte */
|
||||
case 0x63: /* SMI I/O port low byte */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
vl82c59x_set_pm_io(dev);
|
||||
break;
|
||||
case 0x64: /* System Event Enable Register 1 */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x65: /* System Event Status Register 1 */
|
||||
dev->pci_conf_sb[addr] = 0x00;
|
||||
break;
|
||||
case 0x66: /* System Event Enable Register 2 */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x67: /* System Event Status Register 2 */
|
||||
dev->pci_conf_sb[addr] = 0x00;
|
||||
break;
|
||||
case 0x68: /* System Event Enable Register 3 */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x69: /* System Event Status Register 3 */
|
||||
dev->pci_conf_sb[addr] = 0x00;
|
||||
break;
|
||||
case 0x6A: /* PCI Activity Control Register */
|
||||
dev->pci_conf_sb[addr] = val & 0x0f; /* Top 4 bits are Read/Clear */
|
||||
break;
|
||||
case 0x6B: /* Programmable I/O Range Register High Byte */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x6C: /* Programmable I/O Range Register Low Byte */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x6D: /* System Event Control Register/SMI Global Enable */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x6E:
|
||||
case 0x6F:
|
||||
case 0x70:
|
||||
case 0x71:
|
||||
case 0x72: /* GPIO */
|
||||
/* Compaq Presario and Prolinea use bits 6-4 for setting ECP DMA */
|
||||
/* 011 (0x03) = DMA 3 (Default) */
|
||||
/* 100 (0x04) = DMA 0 */
|
||||
/* 111 (0x07) = DMA disabled */
|
||||
case 0x73: /* GPIO */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x74: /* PCI Interrupt Connection Register (PCIINT0/1) */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
irq = irq_array[val & 0x07];
|
||||
pci_set_irq_routing(PCI_INTA, (irq != 0) ? irq : PCI_IRQ_DISABLED);
|
||||
irq = irq_array[(val & 0x70) >> 4];
|
||||
pci_set_irq_routing(PCI_INTB, (irq != 0) ? irq : PCI_IRQ_DISABLED);
|
||||
break;
|
||||
case 0x75: /* PCI Interrupt Connection Register (PCIINT2/3) */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
irq = irq_array[val & 0x07];
|
||||
pci_set_irq_routing(PCI_INTC, (irq != 0) ? irq : PCI_IRQ_DISABLED);
|
||||
irq = irq_array[(val & 0x70) >> 4];
|
||||
pci_set_irq_routing(PCI_INTD, (irq != 0) ? irq : PCI_IRQ_DISABLED);
|
||||
break;
|
||||
case 0x76: /* PCI Interrupt Connection Register (ISA/PCIINT) */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x77:
|
||||
case 0x78:
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
default:
|
||||
if (addr > 0x3F)
|
||||
vl82c59x_log(dev->log, "VL82c593: Unknown reg [W] (%02X, %02X) = %02X\n", func, addr, val);
|
||||
break;
|
||||
case 0x6e ... 0x72: /* GPIO */
|
||||
/* Compaq Presario and Prolinea use bits 6-4 for setting ECP DMA */
|
||||
/* 011 (0x03) = DMA 3 (Default) */
|
||||
/* 100 (0x04) = DMA 0 */
|
||||
/* 111 (0x07) = DMA disabled */
|
||||
case 0x73: /* GPIO */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x74: /* PCI Interrupt Connection Register (PCIINT0/1) */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
irq = irq_array[val & 0x07];
|
||||
pci_set_irq_routing(PCI_INTA, (irq != 0) ? irq : PCI_IRQ_DISABLED);
|
||||
irq = irq_array[(val & 0x70) >> 4];
|
||||
pci_set_irq_routing(PCI_INTB, (irq != 0) ? irq : PCI_IRQ_DISABLED);
|
||||
break;
|
||||
case 0x75: /* PCI Interrupt Connection Register (PCIINT2/3) */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
irq = irq_array[val & 0x07];
|
||||
pci_set_irq_routing(PCI_INTC, (irq != 0) ? irq : PCI_IRQ_DISABLED);
|
||||
irq = irq_array[(val & 0x70) >> 4];
|
||||
pci_set_irq_routing(PCI_INTD, (irq != 0) ? irq : PCI_IRQ_DISABLED);
|
||||
break;
|
||||
case 0x76: /* PCI Interrupt Connection Register (ISA/PCIINT) */
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
case 0x77 ... 0x78:
|
||||
dev->pci_conf_sb[addr] = val;
|
||||
break;
|
||||
default:
|
||||
if (addr > 0x3f)
|
||||
vl82c59x_log(dev->log, "VL82c593: Unknown reg [W] (%02X, %02X) = %02X\n", func, addr, val);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
@@ -436,30 +385,29 @@ vl82c59x_sb_read(int func, int addr, void *priv)
|
||||
const vl82c59x_t *dev = (vl82c59x_t *) priv;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
if (func == 0x00)
|
||||
switch (addr) {
|
||||
case 0x69: /* Lower two bits are a CPU speed readout per Compaq's Prolinea E series TRG */
|
||||
/* Per the Prolinea TRG bits 5/3/1 of 593 reg 0x73 must be set to 1 to read the jumpers */
|
||||
if (dev->is_compaq && (dev->pci_conf_sb[0x73] & 0x2A)) {
|
||||
/* Set bit 2 to 1 as this is required for the Prolinea E to be properly identified
|
||||
in Compaq Computer Setup. */
|
||||
ret = (dev->pci_conf_sb[addr] | 0x04);
|
||||
if (cpu_busspeed <= 50000000)
|
||||
ret = (ret & 0xfd); /* 50MHz: Bit 1 = 0 */
|
||||
else
|
||||
ret = (ret | 0x02); /* 60MHz: Bit 1 = 1 */
|
||||
if (func == 0x00) switch (addr) {
|
||||
case 0x69:
|
||||
/* Lower two bits are a CPU speed readout per Compaq's Prolinea E series TRG */
|
||||
/* Per the Prolinea TRG bits 5/3/1 of 593 reg 0x73 must be set to 1 to read the jumpers */
|
||||
if (dev->is_compaq && (dev->pci_conf_sb[0x73] & 0x2A)) {
|
||||
/* Set bit 2 to 1 as this is required for the Prolinea E to be properly identified
|
||||
in Compaq Computer Setup. */
|
||||
ret = (dev->pci_conf_sb[addr] | 0x04);
|
||||
if (cpu_busspeed <= 50000000)
|
||||
ret = (ret & 0xfd); /* 50MHz: Bit 1 = 0 */
|
||||
else
|
||||
ret = (ret | 0x02); /* 60MHz: Bit 1 = 1 */
|
||||
|
||||
if (cpu_dmulti <= 1.5)
|
||||
ret = (ret | 0x01); /* 1.5x mult: Bit 0 = 1 */
|
||||
else
|
||||
ret = (ret & 0xfe); /* 2.0x mult: Bit 0 = 0 */
|
||||
} else {
|
||||
ret = dev->pci_conf_sb[addr];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (cpu_dmulti <= 1.5)
|
||||
ret = (ret | 0x01); /* 1.5x mult: Bit 0 = 1 */
|
||||
else
|
||||
ret = (ret & 0xfe); /* 2.0x mult: Bit 0 = 0 */
|
||||
} else
|
||||
ret = dev->pci_conf_sb[addr];
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
ret = dev->pci_conf_sb[addr];
|
||||
break;
|
||||
}
|
||||
|
||||
vl82c59x_log(dev->log, "[%04X:%08X] VL82c593: [R] (%02X, %02X) = %02X\n", CS, cpu_state.pc, func, addr, ret);
|
||||
|
||||
86
src/config.c
86
src/config.c
@@ -339,6 +339,7 @@ load_machine(void)
|
||||
{ .old = "infinia7200", .new = "tc430hx", .new_bios = "infinia7200" },
|
||||
{ .old = "dellvenus", .new = "vs440fx", .new_bios = "dellvenus" },
|
||||
{ .old = "gw2kvenus", .new = "vs440fx", .new_bios = "gw2kvenus" },
|
||||
{ .old = "lgibmx7g", .new = "ms6119", .new_bios = "lgibmx7g" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
@@ -569,6 +570,7 @@ load_input_devices(void)
|
||||
{
|
||||
ini_section_t cat = ini_find_section(config, "Input devices");
|
||||
char temp[512];
|
||||
char tmp2[32];
|
||||
char *p;
|
||||
|
||||
p = ini_section_get_string(cat, "keyboard_type", NULL);
|
||||
@@ -639,25 +641,34 @@ load_input_devices(void)
|
||||
} else
|
||||
joystick_type[joy_insn] = JS_TYPE_NONE;
|
||||
|
||||
uint8_t gp = 0;
|
||||
|
||||
for (int js = 0; js < joystick_get_max_joysticks(joystick_type[joy_insn]); js++) {
|
||||
sprintf(temp, "joystick_%i_nr", js);
|
||||
joystick_state[0][js].plat_joystick_nr = ini_section_get_int(cat, temp, 0);
|
||||
joystick_state[gp][js].plat_joystick_nr = ini_section_get_int(cat, temp, 0);
|
||||
|
||||
if (joystick_state[0][js].plat_joystick_nr) {
|
||||
if (joystick_state[gp][js].plat_joystick_nr) {
|
||||
// --- Load Axis Mappings ---
|
||||
for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type[joy_insn]); axis_nr++) {
|
||||
sprintf(temp, "joystick_%i_axis_%i", js, axis_nr);
|
||||
joystick_state[0][js].axis_mapping[axis_nr] = ini_section_get_int(cat, temp, axis_nr);
|
||||
joystick_state[gp][js].axis_mapping[axis_nr] = ini_section_get_int(cat, temp, axis_nr);
|
||||
}
|
||||
|
||||
// --- Load Button Mappings ---
|
||||
for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type[joy_insn]); button_nr++) {
|
||||
sprintf(temp, "joystick_%i_button_%i", js, button_nr);
|
||||
joystick_state[0][js].button_mapping[button_nr] = ini_section_get_int(cat, temp, button_nr);
|
||||
joystick_state[gp][js].button_mapping[button_nr] = ini_section_get_int(cat, temp, button_nr);
|
||||
}
|
||||
|
||||
// --- Load POV (Hat Switch) Mappings ---
|
||||
for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type[joy_insn]); pov_nr++) {
|
||||
sprintf(temp, "joystick_%i_pov_%i", js, pov_nr);
|
||||
p = ini_section_get_string(cat, temp, "0, 0");
|
||||
joystick_state[0][js].pov_mapping[pov_nr][0] = joystick_state[0][js].pov_mapping[pov_nr][1] = 0;
|
||||
sscanf(p, "%i, %i", &joystick_state[0][js].pov_mapping[pov_nr][0],
|
||||
&joystick_state[0][js].pov_mapping[pov_nr][1]);
|
||||
sprintf(tmp2, "%i, %i", 0, 0);
|
||||
p = ini_section_get_string(cat, temp, tmp2);
|
||||
joystick_state[gp][js].pov_mapping[pov_nr][0] = 0;
|
||||
joystick_state[gp][js].pov_mapping[pov_nr][1] = 0;
|
||||
sscanf(p, "%i, %i", &joystick_state[gp][js].pov_mapping[pov_nr][0],
|
||||
&joystick_state[gp][js].pov_mapping[pov_nr][1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1491,7 +1502,7 @@ load_floppy_and_cdrom_drives(void)
|
||||
sprintf(temp, "cdrom_%02i_type", c + 1);
|
||||
p = ini_section_get_string(cat, temp, cdrom[c].bus_type == CDROM_BUS_MKE ? "cr563" : "86cd");
|
||||
/* TODO: Configuration migration, remove when no longer needed. */
|
||||
int cdrom_type = cdrom_get_from_internal_name(p);
|
||||
int cdrom_type = cdrom_get_from_internal_name(!strcmp(p, "goldstar") ? "goldstar_r560b" : p);
|
||||
if (cdrom_type == -1) {
|
||||
cdrom_type = cdrom_get_from_name(p);
|
||||
if (cdrom_type == -1)
|
||||
@@ -2700,7 +2711,7 @@ save_input_devices(void)
|
||||
{
|
||||
ini_section_t cat = ini_find_or_create_section(config, "Input devices");
|
||||
char temp[512];
|
||||
char tmp2[512];
|
||||
char tmp2[32];
|
||||
|
||||
ini_section_set_string(cat, "keyboard_type", keyboard_get_internal_name(keyboard_type));
|
||||
|
||||
@@ -2711,53 +2722,64 @@ save_input_devices(void)
|
||||
ini_section_delete_var(cat, "joystick_type");
|
||||
|
||||
for (int js = 0; js < MAX_PLAT_JOYSTICKS; js++) {
|
||||
sprintf(tmp2, "joystick_%i_nr", js);
|
||||
ini_section_delete_var(cat, tmp2);
|
||||
sprintf(temp, "joystick_%i_nr", js);
|
||||
ini_section_delete_var(cat, temp);
|
||||
|
||||
// --- Save Axis Mappings ---
|
||||
for (int axis_nr = 0; axis_nr < MAX_JOY_AXES; axis_nr++) {
|
||||
sprintf(tmp2, "joystick_%i_axis_%i", js, axis_nr);
|
||||
ini_section_delete_var(cat, tmp2);
|
||||
sprintf(temp, "joystick_%i_axis_%i", js, axis_nr);
|
||||
ini_section_delete_var(cat, temp);
|
||||
}
|
||||
|
||||
// --- Save Button Mappings ---
|
||||
for (int button_nr = 0; button_nr < MAX_JOY_BUTTONS; button_nr++) {
|
||||
sprintf(tmp2, "joystick_%i_button_%i", js, button_nr);
|
||||
ini_section_delete_var(cat, tmp2);
|
||||
sprintf(temp, "joystick_%i_button_%i", js, button_nr);
|
||||
ini_section_delete_var(cat, temp);
|
||||
}
|
||||
|
||||
// --- Save POV (Hat Switch) Mappings ---
|
||||
for (int pov_nr = 0; pov_nr < MAX_JOY_POVS; pov_nr++) {
|
||||
sprintf(tmp2, "joystick_%i_pov_%i", js, pov_nr);
|
||||
ini_section_delete_var(cat, tmp2);
|
||||
sprintf(temp, "joystick_%i_pov_%i", js, pov_nr);
|
||||
ini_section_delete_var(cat, temp);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
uint8_t gp = 0;
|
||||
|
||||
ini_section_set_string(cat, "joystick_type", joystick_get_internal_name(joystick_type[joy_insn]));
|
||||
|
||||
for (int js = 0; js < joystick_get_max_joysticks(joystick_type[joy_insn]); js++) {
|
||||
sprintf(tmp2, "joystick_%i_nr", js);
|
||||
ini_section_set_int(cat, tmp2, joystick_state[0][js].plat_joystick_nr);
|
||||
sprintf(temp, "joystick_%i_nr", js);
|
||||
ini_section_set_int(cat, temp, joystick_state[gp][js].plat_joystick_nr);
|
||||
|
||||
if (joystick_state[0][js].plat_joystick_nr) {
|
||||
if (joystick_state[gp][js].plat_joystick_nr) {
|
||||
// --- Save Axis Mappings ---
|
||||
for (int axis_nr = 0; axis_nr < joystick_get_axis_count(joystick_type[joy_insn]); axis_nr++) {
|
||||
sprintf(tmp2, "joystick_%i_axis_%i", js, axis_nr);
|
||||
ini_section_set_int(cat, tmp2, joystick_state[0][js].axis_mapping[axis_nr]);
|
||||
sprintf(temp, "joystick_%i_axis_%i", js, axis_nr);
|
||||
ini_section_set_int(cat, temp, joystick_state[gp][js].axis_mapping[axis_nr]);
|
||||
}
|
||||
|
||||
// --- Save Button Mappings ---
|
||||
for (int button_nr = 0; button_nr < joystick_get_button_count(joystick_type[joy_insn]); button_nr++) {
|
||||
sprintf(tmp2, "joystick_%i_button_%i", js, button_nr);
|
||||
ini_section_set_int(cat, tmp2, joystick_state[0][js].button_mapping[button_nr]);
|
||||
sprintf(temp, "joystick_%i_button_%i", js, button_nr);
|
||||
ini_section_set_int(cat, temp, joystick_state[gp][js].button_mapping[button_nr]);
|
||||
}
|
||||
|
||||
// --- Save POV (Hat Switch) Mappings ---
|
||||
for (int pov_nr = 0; pov_nr < joystick_get_pov_count(joystick_type[joy_insn]); pov_nr++) {
|
||||
sprintf(tmp2, "joystick_%i_pov_%i", js, pov_nr);
|
||||
sprintf(temp, "%i, %i", joystick_state[0][js].pov_mapping[pov_nr][0],
|
||||
joystick_state[0][js].pov_mapping[pov_nr][1]);
|
||||
ini_section_set_string(cat, tmp2, temp);
|
||||
sprintf(temp, "joystick_%i_pov_%i", js, pov_nr);
|
||||
sprintf(tmp2, "%i, %i", joystick_state[gp][js].pov_mapping[pov_nr][0],
|
||||
joystick_state[gp][js].pov_mapping[pov_nr][1]);
|
||||
ini_section_set_string(cat, temp, tmp2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (tablet_tool_type != 1) {
|
||||
if (tablet_tool_type != 1)
|
||||
ini_section_set_int(cat, "tablet_tool_type", tablet_tool_type);
|
||||
} else {
|
||||
else
|
||||
ini_section_delete_var(cat, "tablet_tool_type");
|
||||
}
|
||||
|
||||
ini_delete_section_if_empty(config, cat);
|
||||
}
|
||||
|
||||
@@ -405,7 +405,7 @@ exec386_dynarec_dyn(void)
|
||||
uint64_t mask = (uint64_t) 1 << ((phys_addr >> PAGE_MASK_SHIFT) & PAGE_MASK_MASK);
|
||||
# ifdef USE_NEW_DYNAREC
|
||||
int byte_offset = (phys_addr >> PAGE_BYTE_MASK_SHIFT) & PAGE_BYTE_MASK_OFFSET_MASK;
|
||||
uint64_t byte_mask = 1ULL << (PAGE_BYTE_MASK_MASK & 0x3f);
|
||||
uint64_t byte_mask = 1ULL << (phys_addr & PAGE_BYTE_MASK_MASK);
|
||||
|
||||
if ((page->code_present_mask & mask) ||
|
||||
((page->mem != page_ff) && (page->byte_code_present_mask[byte_offset] & byte_mask)))
|
||||
|
||||
@@ -5319,6 +5319,40 @@ const cpu_family_t cpu_families[] = {
|
||||
.cache_write_cycles = 17,
|
||||
.atclk_div = 66
|
||||
},
|
||||
{
|
||||
.name = "570",
|
||||
.cpu_type = CPU_K6_2C,
|
||||
.fpus = fpus_internal,
|
||||
.rspeed = 570000000,
|
||||
.multi = 6.0,
|
||||
.voltage = 2300,
|
||||
.edx_reset = 0x58c,
|
||||
.cpuid_model = 0x58c,
|
||||
.cyrix_id = 0,
|
||||
.cpu_flags = CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC,
|
||||
.mem_read_cycles = 52,
|
||||
.mem_write_cycles = 52,
|
||||
.cache_read_cycles = 18,
|
||||
.cache_write_cycles = 18,
|
||||
.atclk_div = 68
|
||||
},
|
||||
{
|
||||
.name = "600 (570 OC)",
|
||||
.cpu_type = CPU_K6_2C,
|
||||
.fpus = fpus_internal,
|
||||
.rspeed = 600000000,
|
||||
.multi = 6.0,
|
||||
.voltage = 2300,
|
||||
.edx_reset = 0x58c,
|
||||
.cpuid_model = 0x58c,
|
||||
.cyrix_id = 0,
|
||||
.cpu_flags = CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC,
|
||||
.mem_read_cycles = 54,
|
||||
.mem_write_cycles = 54,
|
||||
.cache_read_cycles = 18,
|
||||
.cache_write_cycles = 18,
|
||||
.atclk_div = 72
|
||||
},
|
||||
{ .name = "", 0 }
|
||||
}
|
||||
}, {
|
||||
|
||||
@@ -143,7 +143,7 @@ x86_doabrt(int x86_abrt)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static inline void
|
||||
set_stack32(int s)
|
||||
{
|
||||
stack32 = s;
|
||||
@@ -154,7 +154,7 @@ set_stack32(int s)
|
||||
cpu_cur_status &= ~CPU_STATUS_STACK32;
|
||||
}
|
||||
|
||||
static void
|
||||
static inline void
|
||||
set_use32(int u)
|
||||
{
|
||||
use32 = u ? 0x300 : 0;
|
||||
@@ -202,7 +202,7 @@ do_seg_load(x86seg *s, uint16_t *segdat)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
static inline void
|
||||
do_seg_v86_init(x86seg *s)
|
||||
{
|
||||
s->access = 0xe2;
|
||||
@@ -761,7 +761,7 @@ loadcsjmp(uint16_t seg, uint32_t old_pc)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static inline void
|
||||
PUSHW(uint16_t v)
|
||||
{
|
||||
if (stack32) {
|
||||
@@ -777,7 +777,7 @@ PUSHW(uint16_t v)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static inline void
|
||||
PUSHL(uint32_t v)
|
||||
{
|
||||
if (cpu_16bitbus) {
|
||||
@@ -798,7 +798,7 @@ PUSHL(uint32_t v)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static inline void
|
||||
PUSHL_SEL(uint32_t v)
|
||||
{
|
||||
if (cpu_16bitbus) {
|
||||
@@ -819,7 +819,7 @@ PUSHL_SEL(uint32_t v)
|
||||
}
|
||||
}
|
||||
|
||||
static uint16_t
|
||||
static inline uint16_t
|
||||
POPW(void)
|
||||
{
|
||||
uint16_t tempw;
|
||||
@@ -837,7 +837,7 @@ POPW(void)
|
||||
return tempw;
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
static inline uint32_t
|
||||
POPL(void)
|
||||
{
|
||||
uint32_t templ;
|
||||
|
||||
146
src/device.c
146
src/device.c
@@ -396,143 +396,69 @@ device_available(const device_t *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
device_get_bios_type(const device_t *dev, const char *internal_name)
|
||||
static const device_config_bios_t *
|
||||
device_get_bios(const device_t *dev, const char *internal_name)
|
||||
{
|
||||
if (dev != NULL) {
|
||||
const device_config_t *config = dev->config;
|
||||
if (config != NULL) {
|
||||
while (config->type != CONFIG_END) {
|
||||
if (config->type == CONFIG_BIOS) {
|
||||
const device_config_bios_t *bios = (const device_config_bios_t *) config->bios;
|
||||
while ((bios != NULL) &&
|
||||
(bios->name != NULL) &&
|
||||
(bios->internal_name != NULL) &&
|
||||
(bios->files_no != 0)) {
|
||||
if (!strcmp(internal_name, bios->internal_name))
|
||||
return bios->bios_type;
|
||||
bios++;
|
||||
}
|
||||
while (config && (config->type != CONFIG_END)) {
|
||||
if (config->type == CONFIG_BIOS) {
|
||||
const device_config_bios_t *bios = (const device_config_bios_t *) config->bios;
|
||||
|
||||
/* Go through the ROMs in the device configuration. */
|
||||
while ((bios != NULL) &&
|
||||
(bios->name != NULL) &&
|
||||
(bios->internal_name != NULL) &&
|
||||
(bios->files_no != 0)) {
|
||||
if (!strcmp(internal_name, bios->internal_name))
|
||||
return bios;
|
||||
bios++;
|
||||
}
|
||||
config++;
|
||||
|
||||
/* Unknown value, fall back to the default ROMs. */
|
||||
if (strcmp(internal_name, config->default_string))
|
||||
return device_get_bios(dev, config->default_string);
|
||||
}
|
||||
config++;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
device_get_bios_type(const device_t *dev, const char *internal_name)
|
||||
{
|
||||
const device_config_bios_t *bios = device_get_bios(dev, internal_name);
|
||||
return bios ? bios->bios_type : 0;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
device_get_bios_num_files(const device_t *dev, const char *internal_name)
|
||||
{
|
||||
if (dev != NULL) {
|
||||
const device_config_t *config = dev->config;
|
||||
if (config != NULL) {
|
||||
while (config->type != CONFIG_END) {
|
||||
if (config->type == CONFIG_BIOS) {
|
||||
const device_config_bios_t *bios = (const device_config_bios_t *) config->bios;
|
||||
while ((bios != NULL) &&
|
||||
(bios->name != NULL) &&
|
||||
(bios->internal_name != NULL) &&
|
||||
(bios->files_no != 0)) {
|
||||
if (!strcmp(internal_name, bios->internal_name))
|
||||
return bios->files_no;
|
||||
bios++;
|
||||
}
|
||||
}
|
||||
config++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
const device_config_bios_t *bios = device_get_bios(dev, internal_name);
|
||||
return bios ? bios->files_no : 0;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
device_get_bios_local(const device_t *dev, const char *internal_name)
|
||||
{
|
||||
if (dev != NULL) {
|
||||
const device_config_t *config = dev->config;
|
||||
if (config != NULL) {
|
||||
while (config->type != CONFIG_END) {
|
||||
if (config->type == CONFIG_BIOS) {
|
||||
const device_config_bios_t *bios = (const device_config_bios_t *) config->bios;
|
||||
while ((bios != NULL) &&
|
||||
(bios->name != NULL) &&
|
||||
(bios->internal_name != NULL) &&
|
||||
(bios->files_no != 0)) {
|
||||
if (!strcmp(internal_name, bios->internal_name))
|
||||
return bios->local;
|
||||
bios++;
|
||||
}
|
||||
}
|
||||
config++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
const device_config_bios_t *bios = device_get_bios(dev, internal_name);
|
||||
return bios ? bios->local : 0;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
device_get_bios_file_size(const device_t *dev, const char *internal_name)
|
||||
{
|
||||
if (dev != NULL) {
|
||||
const device_config_t *config = dev->config;
|
||||
if (config != NULL) {
|
||||
while (config->type != CONFIG_END) {
|
||||
if (config->type == CONFIG_BIOS) {
|
||||
const device_config_bios_t *bios = (const device_config_bios_t *) config->bios;
|
||||
|
||||
/* Go through the ROM's in the device configuration. */
|
||||
while ((bios != NULL) &&
|
||||
(bios->name != NULL) &&
|
||||
(bios->internal_name != NULL) &&
|
||||
(bios->files_no != 0)) {
|
||||
if (!strcmp(internal_name, bios->internal_name))
|
||||
return bios->size;
|
||||
bios++;
|
||||
}
|
||||
}
|
||||
config++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
const device_config_bios_t *bios = device_get_bios(dev, internal_name);
|
||||
return bios ? bios->size : 0;
|
||||
}
|
||||
|
||||
const char *
|
||||
device_get_bios_file(const device_t *dev, const char *internal_name, int file_no)
|
||||
device_get_bios_file(const device_t *dev, const char *internal_name, unsigned int file_no)
|
||||
{
|
||||
if (dev != NULL) {
|
||||
const device_config_t *config = dev->config;
|
||||
if (config != NULL) {
|
||||
while (config->type != CONFIG_END) {
|
||||
if (config->type == CONFIG_BIOS) {
|
||||
const device_config_bios_t *bios = (const device_config_bios_t *) config->bios;
|
||||
|
||||
/* Go through the ROM's in the device configuration. */
|
||||
while ((bios != NULL) &&
|
||||
(bios->name != NULL) &&
|
||||
(bios->internal_name != NULL) &&
|
||||
(bios->files_no != 0)) {
|
||||
if (!strcmp(internal_name, bios->internal_name)) {
|
||||
if (file_no < bios->files_no)
|
||||
return bios->files[file_no];
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
bios++;
|
||||
}
|
||||
}
|
||||
config++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* A NULL device is never available. */
|
||||
return (NULL);
|
||||
const device_config_bios_t *bios = device_get_bios(dev, internal_name);
|
||||
return (bios && (file_no < bios->files_no)) ? bios->files[file_no] : NULL;
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
@@ -82,13 +82,14 @@
|
||||
#include <86box/pic.h>
|
||||
#include <86box/isartc.h>
|
||||
|
||||
#define ISARTC_EV170 0
|
||||
#define ISARTC_DTK 1
|
||||
#define ISARTC_P5PAK 2
|
||||
#define ISARTC_A6PAK 3
|
||||
#define ISARTC_VENDEX 4
|
||||
#define ISARTC_MPLUS2 5
|
||||
#define ISARTC_MM58167 10
|
||||
#define ISARTC_EV170 0
|
||||
#define ISARTC_DTK 1
|
||||
#define ISARTC_P5PAK 2
|
||||
#define ISARTC_A6PAK 3
|
||||
#define ISARTC_VENDEX 4
|
||||
#define ISARTC_MPLUS2 5
|
||||
#define ISARTC_RTC58167 6
|
||||
#define ISARTC_MM58167 10
|
||||
|
||||
#define ISARTC_ROM_MM58167_1 "roms/rtc/glatick/GLaTICK_0.8.8_NS_86B.ROM" /* Generic 58167, AST or EV-170 */
|
||||
#define ISARTC_ROM_MM58167_2 "roms/rtc/glatick/GLaTICK_0.8.8_NS_86B2.ROM" /* PII-147 */
|
||||
@@ -112,7 +113,8 @@ typedef struct rtcdev_t {
|
||||
void (*f_wr)(uint16_t, uint8_t, void *);
|
||||
uint8_t (*f_rd)(uint16_t, void *);
|
||||
int8_t year; /* register for YEAR value */
|
||||
char pad[3];
|
||||
int8_t century; /* register for CENTURY value */
|
||||
char pad[2];
|
||||
|
||||
nvr_t nvr; /* RTC/NVR */
|
||||
} rtcdev_t;
|
||||
@@ -318,9 +320,14 @@ mm67_time_get(nvr_t *nvr, struct tm *tm)
|
||||
tm->tm_year = regs[dev->year];
|
||||
if (dev->flags & FLAG_YEAR80)
|
||||
tm->tm_year += 80;
|
||||
#ifdef MM67_CENTURY
|
||||
tm->tm_year += (regs[MM67_CENTURY] * 100) - 1900;
|
||||
#endif
|
||||
|
||||
if ((dev->century != -1) && !(dev->flags & FLAG_YEAR80)) {
|
||||
if (dev->flags & FLAG_YEARBCD)
|
||||
tm->tm_year += (RTC_DCB(regs[dev->century]) * 100) - 1900;
|
||||
else
|
||||
tm->tm_year += (regs[dev->century] * 100) - 1900;
|
||||
}
|
||||
|
||||
#if ISARTC_DEBUG > 1
|
||||
isartc_log("ISARTC: get_time: year=%i [%02x]\n", tm->tm_year, regs[dev->year]);
|
||||
#endif
|
||||
@@ -350,9 +357,14 @@ mm67_time_set(nvr_t *nvr, struct tm *tm)
|
||||
regs[dev->year] = RTC_BCD(year % 100);
|
||||
else
|
||||
regs[dev->year] = year % 100;
|
||||
#ifdef MM67_CENTURY
|
||||
regs[MM67_CENTURY] = (year + 1900) / 100;
|
||||
#endif
|
||||
|
||||
if ((dev->year != -1) && !(dev->flags & FLAG_YEAR80)) {
|
||||
if (dev->flags & FLAG_YEARBCD)
|
||||
regs[dev->century] = RTC_BCD((year + 1900) / 100);
|
||||
else
|
||||
regs[dev->century] = (year + 1900) / 100;
|
||||
}
|
||||
|
||||
#if ISARTC_DEBUG > 1
|
||||
isartc_log("ISARTC: set_time: [%02x] year=%i (%i)\n", regs[dev->year], year, tm->tm_year);
|
||||
#endif
|
||||
@@ -473,9 +485,13 @@ mm67_write(uint16_t port, uint8_t val, void *priv)
|
||||
dev->nvr.regs[dev->year] = RTC_BCD(val);
|
||||
else
|
||||
dev->nvr.regs[dev->year] = val;
|
||||
#ifdef MM67_CENTURY
|
||||
dev->nvr.regs[MM67_CENTURY] = 19;
|
||||
#endif
|
||||
|
||||
if ((dev->century != -1) && !(dev->flags & FLAG_YEAR80)) {
|
||||
if (dev->flags & FLAG_YEARBCD)
|
||||
dev->nvr.regs[dev->century] = RTC_BCD(19);
|
||||
else
|
||||
dev->nvr.regs[dev->century] = (1900 + val) / 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -509,6 +525,73 @@ mm67_write(uint16_t port, uint8_t val, void *priv)
|
||||
}
|
||||
}
|
||||
|
||||
/* Multitech PC-500/PC-500+ onboard RTC 58167 device disigned to use I/O port
|
||||
* base+0 as register index and base+1 as register data read/write window,
|
||||
* according to the official RTC utilities SDATE.EXE, STIME.EXE, and TODAY.EXE
|
||||
*
|
||||
* the RTC utilities check the RTC millisecond counter first to deteminate the
|
||||
* presence of the RTC 58167 IC, so here implement the bogus_msec to fool them
|
||||
*/
|
||||
static uint8_t rtc58167_index = 0x00;
|
||||
|
||||
static uint8_t
|
||||
rtc58167_read(uint16_t port, void *priv)
|
||||
{
|
||||
uint8_t ret = 0xff;
|
||||
uint16_t bogus_msec = (uint16_t)((tsc * 1000) / cpu_s->rspeed);
|
||||
|
||||
switch (port)
|
||||
{
|
||||
case 0x2c0:
|
||||
case 0x300:
|
||||
ret = rtc58167_index;
|
||||
break;
|
||||
|
||||
case 0x2c1:
|
||||
case 0x301:
|
||||
switch (rtc58167_index)
|
||||
{
|
||||
case MM67_MSEC:
|
||||
ret = (uint8_t)(bogus_msec % 10) << 4;
|
||||
break;
|
||||
|
||||
case MM67_HUNTEN:
|
||||
ret = RTC_BCD((uint8_t)((bogus_msec / 10) % 100));
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = mm67_read(((port - 1) + rtc58167_index), priv);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
rtc58167_write(uint16_t port, uint8_t val, void *priv)
|
||||
{
|
||||
switch (port)
|
||||
{
|
||||
case 0x2c0:
|
||||
case 0x300:
|
||||
rtc58167_index = val;
|
||||
break;
|
||||
|
||||
case 0x2c1:
|
||||
case 0x301:
|
||||
mm67_write(((port - 1) + rtc58167_index), val, priv);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Generic code for all supported chips. *
|
||||
@@ -529,6 +612,7 @@ isartc_init(const device_t *info)
|
||||
dev->board = info->local;
|
||||
dev->irq = -1;
|
||||
dev->year = -1;
|
||||
dev->century = -1;
|
||||
dev->nvr.data = dev;
|
||||
dev->nvr.size = 16;
|
||||
|
||||
@@ -594,6 +678,20 @@ isartc_init(const device_t *info)
|
||||
dev->year = MM67_AL_DOM; /* year, NON STANDARD */
|
||||
break;
|
||||
|
||||
case ISARTC_RTC58167: /* Multitech PC-500/PC-500+ onboard RTC */
|
||||
dev->flags |= FLAG_YEARBCD;
|
||||
dev->base_addr = machine_get_config_int("rtc_port");
|
||||
dev->base_addrsz = 8;
|
||||
dev->irq = machine_get_config_int("rtc_irq");
|
||||
dev->f_rd = rtc58167_read;
|
||||
dev->f_wr = rtc58167_write;
|
||||
dev->nvr.reset = mm67_reset;
|
||||
dev->nvr.start = mm67_start;
|
||||
dev->nvr.tick = mm67_tick;
|
||||
dev->year = MM67_AL_HUNTEN; /* year, NON STANDARD */
|
||||
dev->century = MM67_AL_SEC; /* century, NON STANDARD */
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -929,18 +1027,32 @@ const device_t vendex_xt_rtc_onboard_device = {
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t rtc58167_device = {
|
||||
.name = "RTC 58167 IC (Multitech)",
|
||||
.internal_name = "rtc58167_xt_rtc",
|
||||
.flags = DEVICE_ISA,
|
||||
.local = ISARTC_RTC58167,
|
||||
.init = isartc_init,
|
||||
.close = isartc_close,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
static const struct {
|
||||
const device_t *dev;
|
||||
} boards[] = {
|
||||
// clang-format off
|
||||
{ &device_none },
|
||||
{ &ev170_device },
|
||||
{ &pii147_device },
|
||||
{ &p5pak_device },
|
||||
{ &a6pak_device },
|
||||
{ &mplus2_device },
|
||||
{ &mm58167_device },
|
||||
{ NULL }
|
||||
{ &device_none },
|
||||
{ &ev170_device },
|
||||
{ &pii147_device },
|
||||
{ &p5pak_device },
|
||||
{ &a6pak_device },
|
||||
{ &mplus2_device },
|
||||
{ &mm58167_device },
|
||||
{ NULL }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ serial_update_ints(serial_t *dev)
|
||||
}
|
||||
}
|
||||
|
||||
serial_do_irq(dev, !(dev->iir & 0x01) && ((dev->mctrl & 8) || (dev->type == SERIAL_8250_PCJR)));
|
||||
serial_do_irq(dev, !(dev->iir & 0x01) && ((dev->mctrl & 8) || ((dev->type == SERIAL_8250_PCJR_3F8) || (dev->type == SERIAL_8250_PCJR_2F8))));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -971,15 +971,20 @@ serial_init(const device_t *info)
|
||||
serial_setup(dev, COM4_ADDR, COM4_IRQ);
|
||||
else if (next_inst == 2)
|
||||
serial_setup(dev, COM3_ADDR, COM3_IRQ);
|
||||
else if ((next_inst == 1) || (info->local == SERIAL_8250_PCJR))
|
||||
else if ((next_inst == 1) || (info->local == SERIAL_8250_PCJR_2F8))
|
||||
serial_setup(dev, COM2_ADDR, COM2_IRQ);
|
||||
// TODO
|
||||
#if 0
|
||||
else if ((next_inst == 1) || (info->local == SERIAL_8250_PCJR_3F8))
|
||||
serial_setup(dev, COM1_ADDR, COM1_IRQ);
|
||||
#endif
|
||||
else if (next_inst == 0)
|
||||
serial_setup(dev, COM1_ADDR, COM1_IRQ);
|
||||
|
||||
/* Default to 1200,N,7. */
|
||||
dev->dlab = 96;
|
||||
dev->fcr = 0x06;
|
||||
if (info->local == SERIAL_8250_PCJR)
|
||||
if ((info->local == SERIAL_8250_PCJR_3F8) || (info->local == SERIAL_8250_PCJR_2F8))
|
||||
dev->clock_src = 1789500.0;
|
||||
else
|
||||
dev->clock_src = 1843200.0;
|
||||
@@ -1039,11 +1044,25 @@ const device_t ns8250_device = {
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t ns8250_pcjr_device = {
|
||||
.name = "National Semiconductor 8250(-compatible) UART for PCjr",
|
||||
.internal_name = "ns8250_pcjr",
|
||||
const device_t ns8250_pcjr_3f8_device = {
|
||||
.name = "National Semiconductor 8250(-compatible) UART for PCjr (0x3f8)",
|
||||
.internal_name = "ns8250_pcjr_3f8",
|
||||
.flags = 0,
|
||||
.local = SERIAL_8250_PCJR,
|
||||
.local = SERIAL_8250_PCJR_3F8,
|
||||
.init = serial_init,
|
||||
.close = serial_close,
|
||||
.reset = serial_reset,
|
||||
.available = NULL,
|
||||
.speed_changed = serial_speed_changed,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t ns8250_pcjr_2f8_device = {
|
||||
.name = "National Semiconductor 8250(-compatible) UART for PCjr (0x2f8)",
|
||||
.internal_name = "ns8250_pcjr_2f8",
|
||||
.flags = 0,
|
||||
.local = SERIAL_8250_PCJR_2F8,
|
||||
.init = serial_init,
|
||||
.close = serial_close,
|
||||
.reset = serial_reset,
|
||||
|
||||
@@ -1220,6 +1220,12 @@ esdi_mca_write(int port, uint8_t val, void *priv)
|
||||
|
||||
if (!(dev->pos_regs[3] & 8)) {
|
||||
switch (dev->pos_regs[3] & 7) {
|
||||
case 0:
|
||||
dev->bios = 0xc0000;
|
||||
break;
|
||||
case 1:
|
||||
dev->bios = 0xc4000;
|
||||
break;
|
||||
case 2:
|
||||
dev->bios = 0xc8000;
|
||||
break;
|
||||
|
||||
@@ -552,7 +552,10 @@ ide_hd_identify(const ide_t *ide)
|
||||
/* Serial Number */
|
||||
ide_padstr((char *) (ide->buffer + 10), "", 20);
|
||||
/* Firmware */
|
||||
ide_padstr((char *) (ide->buffer + 23), EMU_VERSION_EX, 8);
|
||||
if (hdd[ide->hdd_num].version_ex)
|
||||
ide_padstr((char *) (ide->buffer + 23), hdd[ide->hdd_num].version_ex, 8);
|
||||
else
|
||||
ide_padstr((char *) (ide->buffer + 23), EMU_VERSION_EX, 8);
|
||||
/* Model */
|
||||
if (hdd[ide->hdd_num].model)
|
||||
ide_padstr((char *) (ide->buffer + 27), hdd[ide->hdd_num].model, 40);
|
||||
|
||||
@@ -435,6 +435,7 @@ static hdd_preset_t hdd_speed_presets[] = {
|
||||
{ .name = "[Generic] 1998 (5400 RPM)", .internal_name = "1998_5400rpm", .zones = 16, .avg_spt = 300, .heads = 8, .rpm = 5400, .full_stroke_ms = 20, .track_seek_ms = 2, .rcache_num_seg = 8, .rcache_seg_size = 128, .max_multiple = 32 },
|
||||
{ .name = "[Generic] 2000 (7200 RPM)", .internal_name = "2000_7200rpm", .zones = 16, .avg_spt = 350, .heads = 6, .rpm = 7200, .full_stroke_ms = 15, .track_seek_ms = 2, .rcache_num_seg = 16, .rcache_seg_size = 128, .max_multiple = 32 },
|
||||
{ .name = "[PIO IDE] IBM WDA-L42", .internal_name = "WDAL42", .model = "WDA-L42", .zones = 1, .avg_spt = 85, .heads = 2, .rpm = 3600, .full_stroke_ms = 33, .track_seek_ms = 2.5, .rcache_num_seg = 1, .rcache_seg_size = 32, .max_multiple = 1 },
|
||||
{ .name = "[PIO-2] IBM DSAA-3270", .internal_name = "DSAA3270", .model = "DSAA-3270", .zones = 8, .avg_spt = 268, .heads = 2, .rpm = 4500, .full_stroke_ms = 25, .track_seek_ms = 2.1, .rcache_num_seg = 3, .rcache_seg_size = 32, .max_multiple = 8, .version_ex = "25505120" },
|
||||
{ .name = "[ATA-1] Conner CP3024", .internal_name = "CP3024", .model = "Conner Peripherals 20MB - CP3024", .zones = 1, .avg_spt = 33, .heads = 2, .rpm = 3500, .full_stroke_ms = 50, .track_seek_ms = 8, .rcache_num_seg = 1, .rcache_seg_size = 8, .max_multiple = 8 }, // Needed for GRiDcase 1520 to work
|
||||
{ .name = "[ATA-1] Conner CP3044", .internal_name = "CP3044", .model = "Conner Peripherals 40MB - CP3044", .zones = 1, .avg_spt = 40, .heads = 2, .rpm = 3500, .full_stroke_ms = 50, .track_seek_ms = 8, .rcache_num_seg = 1, .rcache_seg_size = 8, .max_multiple = 8 }, // Needed for GRiDcase 1520 to work
|
||||
{ .name = "[ATA-1] Conner CP3104", .internal_name = "CP3104", .model = "Conner Peripherals 104MB - CP3104", .zones = 1, .avg_spt = 33, .heads = 8, .rpm = 3500, .full_stroke_ms = 45, .track_seek_ms = 8, .rcache_num_seg = 4, .rcache_seg_size = 8, .max_multiple = 8 }, // Needed for GRiDcase 1520 to work
|
||||
@@ -522,6 +523,8 @@ static hdd_preset_t hdd_speed_presets[] = {
|
||||
{ .name = "[ATA-4] Quantum Fireball SE4.3A", .internal_name = "SE43A011", .model = "QUANTUM FIREBALL SE4.3A", .zones = 2, .avg_spt = 200, .heads = 4, .rpm = 5400, .full_stroke_ms = 20, .track_seek_ms = 2, .rcache_num_seg = 8, .rcache_seg_size = 128, .max_multiple = 16 },
|
||||
{ .name = "[ATA-4] Quantum Fireball SE6.4A", .internal_name = "SE64A011", .model = "QUANTUM FIREBALL SE6.4A", .zones = 3, .avg_spt = 200, .heads = 6, .rpm = 5400, .full_stroke_ms = 20, .track_seek_ms = 2, .rcache_num_seg = 8, .rcache_seg_size = 128, .max_multiple = 16 },
|
||||
{ .name = "[ATA-4] Quantum Fireball SE8.4A", .internal_name = "SE84A011", .model = "QUANTUM FIREBALL SE8.4A", .zones = 4, .avg_spt = 200, .heads = 8, .rpm = 5400, .full_stroke_ms = 20, .track_seek_ms = 2, .rcache_num_seg = 8, .rcache_seg_size = 128, .max_multiple = 16 },
|
||||
{ .name = "[ATA-4] Quantum Fireball EX12.7A", .internal_name = "EX12A012", .model = "QUANTUM FIREBALL EX12.7A", .zones = 4, .avg_spt = 200, .heads = 8, .rpm = 5400, .full_stroke_ms = 20, .track_seek_ms = 2, .rcache_num_seg = 8, .rcache_seg_size = 128, .max_multiple = 16, .version_ex = "A0A.0D00" },
|
||||
{ .name = "[ATA-4] Quantum Fireball LCT-08 (LA04A011)", .internal_name = "LA04A011", .model = "QUANTUM FIREBALLlct08 04", .zones = 8, .avg_spt = 280, .heads = 6, .rpm = 5400, .full_stroke_ms = 40, .track_seek_ms = 3, .rcache_num_seg = 8, .rcache_seg_size = 512, .max_multiple = 16, .version_ex = "A05.0X00" },
|
||||
{ .name = "[ATA-4] Seagate Medalist 2122", .internal_name = "ST32122A", .model = "ST32122A", .zones = 16, .avg_spt = 215, .heads = 2, .rpm = 4500, .full_stroke_ms = 23, .track_seek_ms = 3.8, .rcache_num_seg = 16, .rcache_seg_size = 128, .max_multiple = 16 },
|
||||
{ .name = "[ATA-4] Seagate Medalist 3321", .internal_name = "ST33221A", .model = "ST33221A", .zones = 16, .avg_spt = 210, .heads = 4, .rpm = 5400, .full_stroke_ms = 20, .track_seek_ms = 1.7, .rcache_num_seg = 16, .rcache_seg_size = 128, .max_multiple = 16 },
|
||||
{ .name = "[ATA-4] Seagate Medalist 4321", .internal_name = "ST34321A", .model = "ST34321A", .zones = 16, .avg_spt = 210, .heads = 4, .rpm = 5400, .full_stroke_ms = 20, .track_seek_ms = 2.2, .rcache_num_seg = 16, .rcache_seg_size = 128, .max_multiple = 16 },
|
||||
@@ -534,6 +537,7 @@ static hdd_preset_t hdd_speed_presets[] = {
|
||||
{ .name = "[ATA-4] Western Digital Caviar 23200", .internal_name = "AC23200", .model = "WDC AC23200LB", .zones = 16, .avg_spt = 210, .heads = 4, .rpm = 5400, .full_stroke_ms = 21, .track_seek_ms = 3, .rcache_num_seg = 8, .rcache_seg_size = 256, .max_multiple = 32 },
|
||||
{ .name = "[ATA-4] Western Digital Caviar 26400", .internal_name = "AC26400", .model = "WDC AC26400RN", .zones = 16, .avg_spt = 295, .heads = 5, .rpm = 5400, .full_stroke_ms = 21, .track_seek_ms = 3, .rcache_num_seg = 8, .rcache_seg_size = 512, .max_multiple = 32 },
|
||||
{ .name = "[ATA-4] Western Digital Caviar 33200", .internal_name = "AC33200", .model = "WDC AC33200LA", .zones = 16, .avg_spt = 310, .heads = 5, .rpm = 5200, .full_stroke_ms = 40, .track_seek_ms = 3, .rcache_num_seg = 16, .rcache_seg_size = 256, .max_multiple = 32 },
|
||||
{ .name = "[ATA-4] Western Digital Caviar 35100", .internal_name = "AC35100", .model = "WDC AC35100L", .zones = 16, .avg_spt = 315, .heads = 5, .rpm = 5400, .full_stroke_ms = 40, .track_seek_ms = 3, .rcache_num_seg = 16, .rcache_seg_size = 256, .max_multiple = 32, .version_ex = "09.09M08" },
|
||||
{ .name = "[ATA-5] IBM Travelstar 6GN", .internal_name = "DARA206000", .model = "IBM-DARA-206000", .zones = 12, .avg_spt = 292, .heads = 2, .rpm = 4200, .full_stroke_ms = 31, .track_seek_ms = 4, .rcache_num_seg = 16, .rcache_seg_size = 512, .max_multiple = 32 },
|
||||
{ .name = "[ATA-5] IBM Travelstar 9GN", .internal_name = "DARA209000", .model = "IBM-DARA-209000", .zones = 12, .avg_spt = 292, .heads = 3, .rpm = 4200, .full_stroke_ms = 31, .track_seek_ms = 4, .rcache_num_seg = 16, .rcache_seg_size = 512, .max_multiple = 32 },
|
||||
{ .name = "[ATA-5] IBM/Hitachi Travelstar 12GN", .internal_name = "DARA212000", .model = "IBM-DARA-212000", .zones = 12, .avg_spt = 292, .heads = 4, .rpm = 4200, .full_stroke_ms = 31, .track_seek_ms = 4, .rcache_num_seg = 16, .rcache_seg_size = 512, .max_multiple = 32 }, // Either Hitachi or IBM OEM
|
||||
@@ -621,6 +625,9 @@ hdd_preset_apply(int hdd_id)
|
||||
if (preset->model)
|
||||
hd->model = preset->model;
|
||||
|
||||
if (preset->version_ex)
|
||||
hd->version_ex = preset->version_ex;
|
||||
|
||||
if (!hd->speed_preset)
|
||||
return;
|
||||
|
||||
|
||||
@@ -88,27 +88,52 @@ static const joystick_t joystick_none = {
|
||||
static const struct {
|
||||
const joystick_t *joystick;
|
||||
} joysticks[] = {
|
||||
{ &joystick_none },
|
||||
{ &joystick_2axis_2button },
|
||||
{ &joystick_2button_gamepad },
|
||||
{ &joystick_2button_flight_yoke },
|
||||
{ &joystick_2axis_4button },
|
||||
{ &joystick_4button_gamepad },
|
||||
{ &joystick_4button_flight_yoke },
|
||||
{ &joystick_2axis_6button },
|
||||
{ &joystick_2axis_8button },
|
||||
{ &joystick_3axis_2button },
|
||||
{ &joystick_2button_yoke_throttle },
|
||||
{ &joystick_3axis_4button },
|
||||
{ &joystick_win95_steering_wheel },
|
||||
{ &joystick_4button_yoke_throttle },
|
||||
{ &joystick_4axis_4button },
|
||||
{ &joystick_ch_flightstick_pro },
|
||||
{ &joystick_ch_flightstick_pro_ch_pedals },
|
||||
{ &joystick_sw_pad },
|
||||
{ &joystick_tm_fcs },
|
||||
{ &joystick_tm_fcs_rcs },
|
||||
{ NULL }
|
||||
{ &joystick_none },
|
||||
{ &joystick_generic_paddle },
|
||||
{ &joystick_2axis_1button },
|
||||
{ &joystick_2axis_2button },
|
||||
{ &joystick_2axis_3button },
|
||||
{ &joystick_2axis_4button },
|
||||
{ &joystick_2axis_6button },
|
||||
{ &joystick_2axis_8button },
|
||||
{ &joystick_3axis_2button },
|
||||
{ &joystick_3axis_3button },
|
||||
{ &joystick_3axis_4button },
|
||||
{ &joystick_4axis_2button },
|
||||
{ &joystick_4axis_3button },
|
||||
{ &joystick_4axis_4button },
|
||||
{ &joystick_2button_gamepad },
|
||||
{ &joystick_3button_gamepad },
|
||||
{ &joystick_4button_gamepad },
|
||||
{ &joystick_6button_gamepad },
|
||||
{ &joystick_gravis_gamepad },
|
||||
{ &joystick_2button_flight_yoke },
|
||||
{ &joystick_3button_flight_yoke },
|
||||
{ &joystick_4button_flight_yoke },
|
||||
{ &joystick_2button_yoke_throttle },
|
||||
{ &joystick_3button_yoke_throttle },
|
||||
{ &joystick_4button_yoke_throttle },
|
||||
{ &joystick_steering_wheel_2_button },
|
||||
{ &joystick_steering_wheel_3_button },
|
||||
{ &joystick_steering_wheel_4_button },
|
||||
{ &joystick_ch_flightstick },
|
||||
{ &joystick_ch_flightstick_ch_pedals },
|
||||
{ &joystick_ch_flightstick_ch_pedals_pro },
|
||||
{ &joystick_ch_flightstick_pro },
|
||||
{ &joystick_ch_flightstick_pro_ch_pedals },
|
||||
{ &joystick_ch_flightstick_pro_ch_pedals_pro },
|
||||
{ &joystick_ch_virtual_pilot },
|
||||
{ &joystick_ch_virtual_pilot_ch_pedals },
|
||||
{ &joystick_ch_virtual_pilot_ch_pedals_pro },
|
||||
{ &joystick_ch_virtual_pilot_pro },
|
||||
{ &joystick_ch_virtual_pilot_pro_ch_pedals },
|
||||
{ &joystick_ch_virtual_pilot_pro_ch_pedals_pro },
|
||||
{ &joystick_sw_pad },
|
||||
{ &joystick_tm_fcs },
|
||||
{ &joystick_tm_fcs_rcs },
|
||||
{ &joystick_tm_formula_t1t2 },
|
||||
{ &joystick_tm_formula_t1t2wa },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static joystick_instance_t *joystick_instance[GAMEPORT_MAX] = { NULL, NULL };
|
||||
|
||||
@@ -10,9 +10,11 @@
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Jasmine Iwanek, <jriwanek@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
* Copyright 2021-2025 Jasmine Iwanek.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -42,132 +44,316 @@
|
||||
#include <86box/timer.h>
|
||||
#include <86box/gameport.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
static void *
|
||||
ch_flightstick_pro_init(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
ch_flightstick_pro_close(UNUSED(void *priv))
|
||||
{
|
||||
//
|
||||
}
|
||||
#include <86box/joystick.h>
|
||||
|
||||
static uint8_t
|
||||
ch_flightstick_pro_read(UNUSED(void *priv))
|
||||
{
|
||||
uint8_t gp = 0;
|
||||
uint8_t ret = 0xf0;
|
||||
|
||||
if (JOYSTICK_PRESENT(0, 0)) {
|
||||
if (joystick_state[0][0].button[0])
|
||||
if (JOYSTICK_PRESENT(gp, 0)) {
|
||||
if (joystick_state[gp][0].button[0])
|
||||
ret &= ~0x10;
|
||||
if (joystick_state[0][0].button[1])
|
||||
if (joystick_state[gp][0].button[1])
|
||||
ret &= ~0x20;
|
||||
if (joystick_state[0][0].button[2])
|
||||
if (joystick_state[gp][0].button[2])
|
||||
ret &= ~0x40;
|
||||
if (joystick_state[0][0].button[3])
|
||||
if (joystick_state[gp][0].button[3])
|
||||
ret &= ~0x80;
|
||||
if (joystick_state[0][0].pov[0] != -1) {
|
||||
if (joystick_state[0][0].pov[0] > 315 || joystick_state[0][0].pov[0] < 45)
|
||||
ret &= ~0xf0;
|
||||
else if (joystick_state[0][0].pov[0] >= 45 && joystick_state[0][0].pov[0] < 135)
|
||||
ret &= ~0xb0;
|
||||
else if (joystick_state[0][0].pov[0] >= 135 && joystick_state[0][0].pov[0] < 225)
|
||||
ret &= ~0x70;
|
||||
else if (joystick_state[0][0].pov[0] >= 225 && joystick_state[0][0].pov[0] < 315)
|
||||
ret &= ~0x30;
|
||||
|
||||
// POV Hat
|
||||
if (joystick_state[gp][0].pov[0] != -1) {
|
||||
// POV Up
|
||||
if ((joystick_state[gp][0].pov[0] > 315) || (joystick_state[gp][0].pov[0] < 45))
|
||||
ret &= ~0xf0; // 1, 2, 3, 4
|
||||
// POV Right
|
||||
else if ((joystick_state[gp][0].pov[0] >= 45) && (joystick_state[gp][0].pov[0] < 135))
|
||||
ret &= ~0xb0; // 1, 2, 4
|
||||
// POV Down
|
||||
else if ((joystick_state[gp][0].pov[0] >= 135) && (joystick_state[gp][0].pov[0] < 225))
|
||||
ret &= ~0x70; // 1, 2, 3
|
||||
// POV Left
|
||||
else if ((joystick_state[gp][0].pov[0] >= 225) && (joystick_state[gp][0].pov[0] < 315))
|
||||
ret &= ~0x30; // 1, 2
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
ch_flightstick_pro_write(UNUSED(void *priv))
|
||||
static uint8_t
|
||||
ch_virtual_pilot_pro_read(UNUSED(void *priv))
|
||||
{
|
||||
//
|
||||
}
|
||||
uint8_t gp = 0;
|
||||
uint8_t ret = 0xf0;
|
||||
|
||||
static int
|
||||
ch_flightstick_pro_read_axis(UNUSED(void *priv), int axis)
|
||||
{
|
||||
if (!JOYSTICK_PRESENT(0, 0))
|
||||
return AXIS_NOT_PRESENT;
|
||||
if (JOYSTICK_PRESENT(gp, 0)) {
|
||||
if (joystick_state[gp][0].button[0]) // 1
|
||||
ret &= ~0x10;
|
||||
if (joystick_state[gp][0].button[1]) // 2
|
||||
ret &= ~0x20;
|
||||
if (joystick_state[gp][0].button[2]) // 3
|
||||
ret &= ~0x40;
|
||||
if (joystick_state[gp][0].button[3]) // 4
|
||||
ret &= ~0x80;
|
||||
if (joystick_state[gp][0].button[4]) // 1, 3
|
||||
ret &= ~0x50;
|
||||
if (joystick_state[gp][0].button[5]) // 1, 4
|
||||
ret &= ~0x90;
|
||||
|
||||
switch (axis) {
|
||||
case 0:
|
||||
return joystick_state[0][0].axis[0];
|
||||
case 1:
|
||||
return joystick_state[0][0].axis[1];
|
||||
case 2:
|
||||
return 0;
|
||||
case 3:
|
||||
return joystick_state[0][0].axis[2];
|
||||
default:
|
||||
return 0;
|
||||
// Right POV Hat
|
||||
uint8_t pov_id = 0;
|
||||
|
||||
if (joystick_state[gp][0].pov[pov_id] != -1) {
|
||||
// POV Up
|
||||
if ((joystick_state[gp][0].pov[pov_id] > 315) || (joystick_state[gp][0].pov[pov_id] < 45))
|
||||
ret &= ~0xf0; // 1, 2, 3, 4
|
||||
// POV Right
|
||||
else if ((joystick_state[gp][0].pov[pov_id] >= 45) && (joystick_state[gp][0].pov[pov_id] < 135))
|
||||
ret &= ~0xb0; // 1, 2, 4
|
||||
// POV Down
|
||||
else if ((joystick_state[gp][0].pov[pov_id] >= 135) && (joystick_state[gp][0].pov[pov_id] < 225))
|
||||
ret &= ~0x70; // 1, 2, 3
|
||||
// POV Left
|
||||
else if ((joystick_state[gp][0].pov[pov_id] >= 225) && (joystick_state[gp][0].pov[pov_id] < 315))
|
||||
ret &= ~0x30; // 1, 2
|
||||
}
|
||||
|
||||
// Left POV Hat
|
||||
pov_id = 1;
|
||||
|
||||
if (joystick_state[gp][0].pov[pov_id] != -1) {
|
||||
// POV Up
|
||||
if ((joystick_state[gp][0].pov[pov_id] > 315) || (joystick_state[gp][0].pov[pov_id] < 45))
|
||||
ret &= ~0xe0; // 2, 3, 4
|
||||
// POV Right
|
||||
else if ((joystick_state[gp][0].pov[pov_id] >= 45) && (joystick_state[gp][0].pov[pov_id] < 135))
|
||||
ret &= ~0xa0; // 2, 4
|
||||
// POV Down
|
||||
else if ((joystick_state[gp][0].pov[pov_id] >= 135) && (joystick_state[gp][0].pov[pov_id] < 225))
|
||||
ret &= ~0x60; // 2, 3
|
||||
// POV Left
|
||||
else if ((joystick_state[gp][0].pov[pov_id] >= 225) && (joystick_state[gp][0].pov[pov_id] < 315))
|
||||
ret &= ~0xc0; // 3, 4
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
ch_flightstick_pro_ch_pedals_read_axis(UNUSED(void *priv), int axis)
|
||||
{
|
||||
if (!JOYSTICK_PRESENT(0, 0))
|
||||
return AXIS_NOT_PRESENT;
|
||||
const joystick_t joystick_ch_flightstick = {
|
||||
.name = "CH Flightstick",
|
||||
.internal_name = "ch_flightstick",
|
||||
.init = joystick_standard_init,
|
||||
.close = joystick_standard_close,
|
||||
.read = joystick_standard_read_2button,
|
||||
.write = joystick_standard_write,
|
||||
.read_axis = joystick_standard_read_axis_3axis_throttle,
|
||||
.a0_over = joystick_standard_a0_over,
|
||||
.axis_count = 3,
|
||||
.button_count = 2,
|
||||
.pov_count = 0,
|
||||
.max_joysticks = 1,
|
||||
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle" },
|
||||
.button_names = { "Trigger", "Button 2" },
|
||||
.pov_names = { NULL }
|
||||
};
|
||||
|
||||
switch (axis) {
|
||||
case 0:
|
||||
return joystick_state[0][0].axis[0];
|
||||
case 1:
|
||||
return joystick_state[0][0].axis[1];
|
||||
case 2:
|
||||
return joystick_state[0][0].axis[3];
|
||||
case 3:
|
||||
return joystick_state[0][0].axis[2];
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
const joystick_t joystick_ch_flightstick_ch_pedals = {
|
||||
.name = "CH Flightstick + CH Pedals",
|
||||
.internal_name = "ch_flightstick_ch_pedals",
|
||||
.init = joystick_standard_init,
|
||||
.close = joystick_standard_close,
|
||||
.read = joystick_standard_read_2button,
|
||||
.write = joystick_standard_write,
|
||||
.read_axis = joystick_standard_read_axis_4axis,
|
||||
.a0_over = joystick_standard_a0_over,
|
||||
.axis_count = 4,
|
||||
.button_count = 2,
|
||||
.pov_count = 0,
|
||||
.max_joysticks = 1,
|
||||
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle", "Rudder (Yaw)" },
|
||||
.button_names = { "Trigger", "Button 2" },
|
||||
.pov_names = { NULL }
|
||||
};
|
||||
|
||||
static void
|
||||
ch_flightstick_pro_a0_over(UNUSED(void *priv))
|
||||
{
|
||||
//
|
||||
}
|
||||
const joystick_t joystick_ch_flightstick_ch_pedals_pro = {
|
||||
.name = "CH Flightstick + CH Pedals Pro",
|
||||
.internal_name = "ch_flightstick_ch_pedals_pro",
|
||||
.init = joystick_standard_init,
|
||||
.close = joystick_standard_close,
|
||||
.read = joystick_standard_read_2button,
|
||||
.write = joystick_standard_write,
|
||||
.read_axis = joystick_standard_read_axis_4axis,
|
||||
.a0_over = joystick_standard_a0_over,
|
||||
.axis_count = 4,
|
||||
.button_count = 2,
|
||||
.pov_count = 0,
|
||||
.max_joysticks = 1,
|
||||
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Left Pedal", "Right Pedal" },
|
||||
.button_names = { "Trigger", "Button 2" },
|
||||
.pov_names = { NULL }
|
||||
};
|
||||
|
||||
const joystick_t joystick_ch_flightstick_pro = {
|
||||
.name = "CH Flightstick Pro",
|
||||
.internal_name = "ch_flightstick_pro",
|
||||
.init = ch_flightstick_pro_init,
|
||||
.close = ch_flightstick_pro_close,
|
||||
.init = joystick_standard_init,
|
||||
.close = joystick_standard_close,
|
||||
.read = ch_flightstick_pro_read,
|
||||
.write = ch_flightstick_pro_write,
|
||||
.read_axis = ch_flightstick_pro_read_axis,
|
||||
.a0_over = ch_flightstick_pro_a0_over,
|
||||
.write = joystick_standard_write,
|
||||
.read_axis = joystick_standard_read_axis_3axis_throttle,
|
||||
.a0_over = joystick_standard_a0_over,
|
||||
.axis_count = 3,
|
||||
.button_count = 4,
|
||||
.pov_count = 1,
|
||||
.max_joysticks = 1,
|
||||
.axis_names = { "X axis", "Y axis", "Throttle" },
|
||||
.button_names = { "Button 1", "Button 2", "Button 3", "Button 4" },
|
||||
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle" },
|
||||
.button_names = { "Trigger", "Button 2", "Button 3", "Button 4" },
|
||||
.pov_names = { "POV" }
|
||||
};
|
||||
|
||||
const joystick_t joystick_ch_flightstick_pro_ch_pedals = {
|
||||
.name = "CH Flightstick Pro + CH Pedals",
|
||||
.internal_name = "ch_flightstick_pro_ch_pedals",
|
||||
.init = ch_flightstick_pro_init,
|
||||
.close = ch_flightstick_pro_close,
|
||||
.init = joystick_standard_init,
|
||||
.close = joystick_standard_close,
|
||||
.read = ch_flightstick_pro_read,
|
||||
.write = ch_flightstick_pro_write,
|
||||
.read_axis = ch_flightstick_pro_ch_pedals_read_axis,
|
||||
.a0_over = ch_flightstick_pro_a0_over,
|
||||
.write = joystick_standard_write,
|
||||
.read_axis = joystick_standard_read_axis_4axis,
|
||||
.a0_over = joystick_standard_a0_over,
|
||||
.axis_count = 4,
|
||||
.button_count = 4,
|
||||
.pov_count = 1,
|
||||
.max_joysticks = 1,
|
||||
.axis_names = { "X axis", "Y axis", "Throttle", "Rudder" },
|
||||
.button_names = { "Button 1", "Button 2", "Button 3", "Button 4" },
|
||||
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle", "Rudder (Yaw)" },
|
||||
.button_names = { "Trigger", "Button 2", "Button 3", "Button 4" },
|
||||
.pov_names = { "POV" }
|
||||
};
|
||||
|
||||
const joystick_t joystick_ch_flightstick_pro_ch_pedals_pro = {
|
||||
.name = "CH Flightstick Pro + CH Pedals Pro",
|
||||
.internal_name = "ch_flightstick_pro_ch_pedals_pro",
|
||||
.init = joystick_standard_init,
|
||||
.close = joystick_standard_close,
|
||||
.read = ch_flightstick_pro_read,
|
||||
.write = joystick_standard_write,
|
||||
.read_axis = joystick_standard_read_axis_4axis,
|
||||
.a0_over = joystick_standard_a0_over,
|
||||
.axis_count = 4,
|
||||
.button_count = 4,
|
||||
.pov_count = 1,
|
||||
.max_joysticks = 1,
|
||||
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Left Pedal", "Right Pedal" },
|
||||
.button_names = { "Trigger", "Button 2", "Button 3", "Button 4" },
|
||||
.pov_names = { "POV" }
|
||||
};
|
||||
|
||||
const joystick_t joystick_ch_virtual_pilot = {
|
||||
.name = "CH Virtual Pilot",
|
||||
.internal_name = "ch_virtual_pilot",
|
||||
.init = joystick_standard_init,
|
||||
.close = joystick_standard_close,
|
||||
.read = joystick_standard_read_2button,
|
||||
.write = joystick_standard_write,
|
||||
.read_axis = joystick_standard_read_axis_3axis_throttle,
|
||||
.a0_over = joystick_standard_a0_over,
|
||||
.axis_count = 3,
|
||||
.button_count = 2,
|
||||
.pov_count = 0,
|
||||
.max_joysticks = 1,
|
||||
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle" },
|
||||
.button_names = { "Button 1", "Button 2" },
|
||||
.pov_names = { NULL }
|
||||
};
|
||||
|
||||
const joystick_t joystick_ch_virtual_pilot_ch_pedals = {
|
||||
.name = "CH Virtual Pilot + CH Pedals",
|
||||
.internal_name = "ch_virtual_pilot_ch_pedals",
|
||||
.init = joystick_standard_init,
|
||||
.close = joystick_standard_close,
|
||||
.read = joystick_standard_read_2button,
|
||||
.write = joystick_standard_write,
|
||||
.read_axis = joystick_standard_read_axis_4axis,
|
||||
.a0_over = joystick_standard_a0_over,
|
||||
.axis_count = 4,
|
||||
.button_count = 2,
|
||||
.pov_count = 0,
|
||||
.max_joysticks = 1,
|
||||
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle", "Rudder (Yaw)" },
|
||||
.button_names = { "Button 1", "Button 2" },
|
||||
.pov_names = { NULL }
|
||||
};
|
||||
|
||||
const joystick_t joystick_ch_virtual_pilot_ch_pedals_pro = {
|
||||
.name = "CH Virtual Pilot + CH Pedals Pro",
|
||||
.internal_name = "ch_virtual_pilot_ch_pedals_pro",
|
||||
.init = joystick_standard_init,
|
||||
.close = joystick_standard_close,
|
||||
.read = joystick_standard_read_2button,
|
||||
.write = joystick_standard_write,
|
||||
.read_axis = joystick_standard_read_axis_4axis,
|
||||
.a0_over = joystick_standard_a0_over,
|
||||
.axis_count = 4,
|
||||
.button_count = 2,
|
||||
.pov_count = 0,
|
||||
.max_joysticks = 1,
|
||||
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Left Pedal", "Right Pedal" },
|
||||
.button_names = { "Button 1", "Button 2" },
|
||||
.pov_names = { NULL }
|
||||
};
|
||||
|
||||
const joystick_t joystick_ch_virtual_pilot_pro = {
|
||||
.name = "CH Virtual Pilot Pro",
|
||||
.internal_name = "ch_virtual_pilot_pro",
|
||||
.init = joystick_standard_init,
|
||||
.close = joystick_standard_close,
|
||||
.read = ch_virtual_pilot_pro_read,
|
||||
.write = joystick_standard_write,
|
||||
.read_axis = joystick_standard_read_axis_3axis_throttle,
|
||||
.a0_over = joystick_standard_a0_over,
|
||||
.axis_count = 3,
|
||||
.button_count = 6,
|
||||
.pov_count = 2,
|
||||
.max_joysticks = 1,
|
||||
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle" },
|
||||
.button_names = { "Button 1", "Button 2", "Button 3", "Button 4", "Button 5", "Button 6" },
|
||||
.pov_names = { "Right POV", "Left POV" }
|
||||
};
|
||||
|
||||
const joystick_t joystick_ch_virtual_pilot_pro_ch_pedals = {
|
||||
.name = "CH Virtual Pilot Pro + CH Pedals",
|
||||
.internal_name = "ch_virtual_pilot_pro_ch_pedals",
|
||||
.init = joystick_standard_init,
|
||||
.close = joystick_standard_close,
|
||||
.read = ch_virtual_pilot_pro_read,
|
||||
.write = joystick_standard_write,
|
||||
.read_axis = joystick_standard_read_axis_4axis,
|
||||
.a0_over = joystick_standard_a0_over,
|
||||
.axis_count = 4,
|
||||
.button_count = 6,
|
||||
.pov_count = 2,
|
||||
.max_joysticks = 1,
|
||||
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle", "Rudder (Yaw)" },
|
||||
.button_names = { "Button 1", "Button 2", "Button 3", "Button 4", "Button 5", "Button 6" },
|
||||
.pov_names = { "Right POV", "Left POV" }
|
||||
};
|
||||
|
||||
const joystick_t joystick_ch_virtual_pilot_pro_ch_pedals_pro = {
|
||||
.name = "CH Virtual Pilot Pro + CH Pedals Pro",
|
||||
.internal_name = "ch_virtual_pilot_pro_ch_pedals_pro",
|
||||
.init = joystick_standard_init,
|
||||
.close = joystick_standard_close,
|
||||
.read = ch_virtual_pilot_pro_read,
|
||||
.write = joystick_standard_write,
|
||||
.read_axis = joystick_standard_read_axis_4axis,
|
||||
.a0_over = joystick_standard_a0_over,
|
||||
.axis_count = 4,
|
||||
.button_count = 6,
|
||||
.pov_count = 2,
|
||||
.max_joysticks = 1,
|
||||
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Left Pedal", "Right Pedal" },
|
||||
.button_names = { "Button 1", "Button 2", "Button 3", "Button 4", "Button 5", "Button 6" },
|
||||
.pov_names = { "Right POV", "Left POV" }
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -31,9 +31,11 @@
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Jasmine Iwanek, <jriwanek@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
* Copyright 2021-2025 Jasmine Iwanek.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -136,10 +138,11 @@ sw_close(void *priv)
|
||||
static uint8_t
|
||||
sw_read(void *priv)
|
||||
{
|
||||
uint8_t gp = 0;
|
||||
sw_data *sw = (sw_data *) priv;
|
||||
uint8_t temp = 0;
|
||||
|
||||
if (!JOYSTICK_PRESENT(0, 0))
|
||||
if (!JOYSTICK_PRESENT(gp, 0))
|
||||
return 0xff;
|
||||
|
||||
if (timer_is_enabled(&sw->poll_timer)) {
|
||||
@@ -162,10 +165,11 @@ sw_read(void *priv)
|
||||
static void
|
||||
sw_write(void *priv)
|
||||
{
|
||||
uint8_t gp = 0;
|
||||
sw_data *sw = (sw_data *) priv;
|
||||
int64_t time_since_last = timer_get_remaining_us(&sw->trigger_timer);
|
||||
|
||||
if (!JOYSTICK_PRESENT(0, 0))
|
||||
if (!JOYSTICK_PRESENT(gp, 0))
|
||||
return;
|
||||
|
||||
if (!sw->poll_left) {
|
||||
@@ -191,20 +195,20 @@ sw_write(void *priv)
|
||||
for (uint8_t js = 0; js < 4; js++) {
|
||||
uint16_t data = 0x3fff;
|
||||
|
||||
if (!JOYSTICK_PRESENT(0, js))
|
||||
if (!JOYSTICK_PRESENT(gp, js))
|
||||
break;
|
||||
|
||||
if (joystick_state[0][js].axis[1] < -16383)
|
||||
if (joystick_state[gp][js].axis[1] < -16383)
|
||||
data &= ~1;
|
||||
if (joystick_state[0][js].axis[1] > 16383)
|
||||
if (joystick_state[gp][js].axis[1] > 16383)
|
||||
data &= ~2;
|
||||
if (joystick_state[0][js].axis[0] > 16383)
|
||||
if (joystick_state[gp][js].axis[0] > 16383)
|
||||
data &= ~4;
|
||||
if (joystick_state[0][js].axis[0] < -16383)
|
||||
if (joystick_state[gp][js].axis[0] < -16383)
|
||||
data &= ~8;
|
||||
|
||||
for (uint8_t button_nr = 0; button_nr < 10; button_nr++) {
|
||||
if (joystick_state[0][js].button[button_nr])
|
||||
if (joystick_state[gp][js].button[button_nr])
|
||||
data &= ~(1 << (button_nr + 4));
|
||||
}
|
||||
|
||||
@@ -228,7 +232,9 @@ sw_write(void *priv)
|
||||
static int
|
||||
sw_read_axis(UNUSED(void *priv), UNUSED(int axis))
|
||||
{
|
||||
if (!JOYSTICK_PRESENT(0, 0))
|
||||
uint8_t gp = 0;
|
||||
|
||||
if (!JOYSTICK_PRESENT(gp, 0))
|
||||
return AXIS_NOT_PRESENT;
|
||||
|
||||
return 0; /*No analogue support on Sidewinder game pad*/
|
||||
|
||||
@@ -10,9 +10,11 @@
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Jasmine Iwanek, <jriwanek@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
* Copyright 2021-2025 Jasmine IWanek.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -42,69 +44,34 @@
|
||||
#include <86box/timer.h>
|
||||
#include <86box/gameport.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
static void *
|
||||
tm_fcs_init(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
tm_fcs_close(UNUSED(void *priv))
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
tm_fcs_read(UNUSED(void *priv))
|
||||
{
|
||||
uint8_t ret = 0xf0;
|
||||
|
||||
if (JOYSTICK_PRESENT(0, 0)) {
|
||||
if (joystick_state[0][0].button[0])
|
||||
ret &= ~0x10;
|
||||
if (joystick_state[0][0].button[1])
|
||||
ret &= ~0x20;
|
||||
if (joystick_state[0][0].button[2])
|
||||
ret &= ~0x40;
|
||||
if (joystick_state[0][0].button[3])
|
||||
ret &= ~0x80;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
tm_fcs_write(UNUSED(void *priv))
|
||||
{
|
||||
//
|
||||
}
|
||||
#include <86box/joystick.h>
|
||||
|
||||
static int
|
||||
tm_fcs_read_axis(UNUSED(void *priv), int axis)
|
||||
{
|
||||
if (!JOYSTICK_PRESENT(0, 0))
|
||||
uint8_t gp= 0;
|
||||
|
||||
if (!JOYSTICK_PRESENT(gp, 0))
|
||||
return AXIS_NOT_PRESENT;
|
||||
|
||||
switch (axis) {
|
||||
case 0:
|
||||
return joystick_state[0][0].axis[0];
|
||||
return joystick_state[gp][0].axis[0];
|
||||
case 1:
|
||||
return joystick_state[0][0].axis[1];
|
||||
case 2:
|
||||
return 0;
|
||||
return joystick_state[gp][0].axis[1];
|
||||
case 3:
|
||||
if (joystick_state[0][0].pov[0] == -1)
|
||||
if (joystick_state[gp][0].pov[0] == -1)
|
||||
return 32767;
|
||||
if (joystick_state[0][0].pov[0] > 315 || joystick_state[0][0].pov[0] < 45)
|
||||
if (joystick_state[gp][0].pov[0] > 315 || joystick_state[gp][0].pov[0] < 45)
|
||||
return -32768;
|
||||
if (joystick_state[0][0].pov[0] >= 45 && joystick_state[0][0].pov[0] < 135)
|
||||
if (joystick_state[gp][0].pov[0] >= 45 && joystick_state[gp][0].pov[0] < 135)
|
||||
return -16384;
|
||||
if (joystick_state[0][0].pov[0] >= 135 && joystick_state[0][0].pov[0] < 225)
|
||||
if (joystick_state[gp][0].pov[0] >= 135 && joystick_state[gp][0].pov[0] < 225)
|
||||
return 0;
|
||||
if (joystick_state[0][0].pov[0] >= 225 && joystick_state[0][0].pov[0] < 315)
|
||||
if (joystick_state[gp][0].pov[0] >= 225 && joystick_state[gp][0].pov[0] < 315)
|
||||
return 16384;
|
||||
return 0;
|
||||
case 2:
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
@@ -113,26 +80,28 @@ tm_fcs_read_axis(UNUSED(void *priv), int axis)
|
||||
static int
|
||||
tm_fcs_rcs_read_axis(UNUSED(void *priv), int axis)
|
||||
{
|
||||
if (!JOYSTICK_PRESENT(0, 0))
|
||||
uint8_t gp = 0;
|
||||
|
||||
if (!JOYSTICK_PRESENT(gp, 0))
|
||||
return AXIS_NOT_PRESENT;
|
||||
|
||||
switch (axis) {
|
||||
case 0:
|
||||
return joystick_state[0][0].axis[0];
|
||||
return joystick_state[gp][0].axis[0];
|
||||
case 1:
|
||||
return joystick_state[0][0].axis[1];
|
||||
return joystick_state[gp][0].axis[1];
|
||||
case 2:
|
||||
return joystick_state[0][0].axis[2];
|
||||
return joystick_state[gp][0].axis[2];
|
||||
case 3:
|
||||
if (joystick_state[0][0].pov[0] == -1)
|
||||
if (joystick_state[gp][0].pov[0] == -1)
|
||||
return 32767;
|
||||
if (joystick_state[0][0].pov[0] > 315 || joystick_state[0][0].pov[0] < 45)
|
||||
if (joystick_state[gp][0].pov[0] > 315 || joystick_state[gp][0].pov[0] < 45)
|
||||
return -32768;
|
||||
if (joystick_state[0][0].pov[0] >= 45 && joystick_state[0][0].pov[0] < 135)
|
||||
if (joystick_state[gp][0].pov[0] >= 45 && joystick_state[gp][0].pov[0] < 135)
|
||||
return -16384;
|
||||
if (joystick_state[0][0].pov[0] >= 135 && joystick_state[0][0].pov[0] < 225)
|
||||
if (joystick_state[gp][0].pov[0] >= 135 && joystick_state[gp][0].pov[0] < 225)
|
||||
return 0;
|
||||
if (joystick_state[0][0].pov[0] >= 225 && joystick_state[0][0].pov[0] < 315)
|
||||
if (joystick_state[gp][0].pov[0] >= 225 && joystick_state[gp][0].pov[0] < 315)
|
||||
return 16384;
|
||||
return 0;
|
||||
default:
|
||||
@@ -140,44 +109,38 @@ tm_fcs_rcs_read_axis(UNUSED(void *priv), int axis)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
tm_fcs_a0_over(UNUSED(void *priv))
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
const joystick_t joystick_tm_fcs = {
|
||||
.name = "Thrustmaster Flight Control System",
|
||||
.internal_name = "thrustmaster_fcs",
|
||||
.init = tm_fcs_init,
|
||||
.close = tm_fcs_close,
|
||||
.read = tm_fcs_read,
|
||||
.write = tm_fcs_write,
|
||||
.init = joystick_standard_init,
|
||||
.close = joystick_standard_close,
|
||||
.read = joystick_standard_read_4button,
|
||||
.write = joystick_standard_write,
|
||||
.read_axis = tm_fcs_read_axis,
|
||||
.a0_over = tm_fcs_a0_over,
|
||||
.a0_over = joystick_standard_a0_over,
|
||||
.axis_count = 2,
|
||||
.button_count = 4,
|
||||
.pov_count = 1,
|
||||
.max_joysticks = 1,
|
||||
.axis_names = { "X axis", "Y axis" },
|
||||
.button_names = { "Button 1", "Button 2", "Button 3", "Button 4" },
|
||||
.button_names = { "Trigger", "Button 2", "Button 3", "Button 4" },
|
||||
.pov_names = { "POV" }
|
||||
};
|
||||
|
||||
const joystick_t joystick_tm_fcs_rcs = {
|
||||
.name = "Thrustmaster FCS + Rudder Control System",
|
||||
.internal_name = "thrustmaster_fcs_rcs",
|
||||
.init = tm_fcs_init,
|
||||
.close = tm_fcs_close,
|
||||
.read = tm_fcs_read,
|
||||
.write = tm_fcs_write,
|
||||
.init = joystick_standard_init,
|
||||
.close = joystick_standard_close,
|
||||
.read = joystick_standard_read_4button,
|
||||
.write = joystick_standard_write,
|
||||
.read_axis = tm_fcs_rcs_read_axis,
|
||||
.a0_over = tm_fcs_a0_over,
|
||||
.a0_over = joystick_standard_a0_over,
|
||||
.axis_count = 3,
|
||||
.button_count = 4,
|
||||
.pov_count = 1,
|
||||
.max_joysticks = 1,
|
||||
.axis_names = { "X axis", "Y axis", "Rudder" },
|
||||
.button_names = { "Button 1", "Button 2", "Button 3", "Button 4" },
|
||||
.button_names = { "Trigger", "Button 2", "Button 3", "Button 4" },
|
||||
.pov_names = { "POV" }
|
||||
};
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the ACPI emulation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2020 Miran Grca.
|
||||
|
||||
@@ -8,13 +8,10 @@
|
||||
*
|
||||
* AGP Graphics Address Remapping Table remapping emulation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: RichardG, <richardg867@gmail.com>
|
||||
*
|
||||
* Copyright 2021 RichardG.
|
||||
*/
|
||||
|
||||
#ifndef EMU_AGPGART_H
|
||||
#define EMU_AGPGART_H
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the Advanced Power Management emulation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2019 Miran Grca.
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Various definitions for portable byte-swapping.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* neozeed,
|
||||
*
|
||||
@@ -34,7 +32,6 @@
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef BSWAP_H
|
||||
#define BSWAP_H
|
||||
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
*
|
||||
* Definitions for the BUGGER card.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 1989-2018 Fred N. van Kempen.
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the PCjr cartridge emulation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2021 Miran Grca.
|
||||
|
||||
@@ -138,8 +138,9 @@ static const struct cdrom_drive_types_s {
|
||||
{ "AZT", "CDA46802I", "1.15", "azt_cda", BUS_TYPE_IDE, 0, 4, 36, 0, 0, { 3, 0, 0, 0 } },
|
||||
{ "BTC", "CD-ROM BCD36XH", "U1.0", "btc_36xh", BUS_TYPE_IDE, 0, 36, 36, 0, 0, { 4, 2, 2, -1 } },
|
||||
{ "GOLDSTAR", "CRD-8160B", "3.14", "goldstar", BUS_TYPE_IDE, 0, 16, 36, 0, 0, { 4, 2, 2, -1 } },
|
||||
{ "GOLDSTAR", "CRD-8400B", "1.03", "goldstar_8400b", BUS_TYPE_IDE, 0, 40, 36, 0, 0, { 4, 2, 2, -1 } },
|
||||
/* TODO: Find an IDENTIFY and/or INQUIRY dump. */
|
||||
{ "GOLDSTAR", "GCD-R560B", "1.00", "goldstar", BUS_TYPE_IDE, 0, 6, 36, 0, 0, { 4, 2, 2, -1 } },
|
||||
{ "GOLDSTAR", "GCD-R560B", "1.00", "goldstar_r560b", BUS_TYPE_IDE, 0, 6, 36, 0, 0, { 4, 2, 2, -1 } },
|
||||
{ "HITACHI", "CDR-8130", "0020", "hitachi_r8130", BUS_TYPE_IDE, 0, 16, 36, 0, 0, { 4, 2, 2, -1 } },
|
||||
{ "HITACHI", "GD-7500", "A1 ", "hitachi_7500", BUS_TYPE_IDE, 0, 40, 36, 0, 0, { 4, 2, 2, 2 } }, /* DVD. */
|
||||
{ "HL-DT-ST", "CD-ROM GCR-8526B", "1.01", "hldtst_8526b", BUS_TYPE_IDE, 0, 52, 36, 0, 0, { 4, 2, 2, 2 } },
|
||||
@@ -174,6 +175,7 @@ static const struct cdrom_drive_types_s {
|
||||
{ "PHILIPS", "CD-ROM PCA403CD", "U31P", "philips_403", BUS_TYPE_IDE, 0, 40, 36, 0, 0, { 4, 2, 2, -1 } },
|
||||
{ "SONY", "CD-ROM CDU76", "1.0i", "sony_76", BUS_TYPE_IDE, 0, 4, 36, 0, 0, { 2, -1, -1, -1 } },
|
||||
{ "SONY", "CD-ROM CDU311", "3.0h", "sony_311", BUS_TYPE_IDE, 0, 8, 36, 0, 0, { 3, 2, 1, -1 } },
|
||||
{ "SONY", "CD-ROM CDU611", "2.2c", "sony_611", BUS_TYPE_IDE, 0, 24, 36, 0, 0, { 3, 2, 2, -1 } },
|
||||
{ "SONY", "CD-ROM CDU5225", "NYS4", "sony_5225", BUS_TYPE_IDE, 0, 52, 36, 0, 0, { 4, 2, 2, 4 } },
|
||||
{ "TEAC", "CD-516E", "1.0G", "teac_516e", BUS_TYPE_IDE, 0, 16, 36, 0, 0, { 3, 2, 2, -1 } },
|
||||
{ "TEAC", "CD-524EA", "3.0D", "teac_524ea", BUS_TYPE_IDE, 0, 24, 36, 0, 0, { 3, 2, 2, -1 } },
|
||||
@@ -183,6 +185,7 @@ static const struct cdrom_drive_types_s {
|
||||
{ "TOSHIBA", "CD-ROM XM-6202B", "1512", "toshiba_6202b", BUS_TYPE_IDE, 0, 32, 96, 0, 0, { 4, 2, 2, -1 } },
|
||||
{ "TOSHIBA", "CD-ROM XM-6402B", "1008", "toshiba_6402b", BUS_TYPE_IDE, 0, 32, 96, 0, 0, { 4, 2, 2, 2 } },
|
||||
{ "TOSHIBA", "CD-ROM XM-6702B", "1007", "toshiba_6720b", BUS_TYPE_IDE, 0, 48, 96, 0, 0, { 4, 2, 2, 2 } },
|
||||
{ "TOSHIBA", "DVD-ROM SD-M1202", "1020", "toshiba_m1202", BUS_TYPE_IDE, 0, 32, 96, 0, 1, { 4, 2, 2, 2 } },
|
||||
{ "TOSHIBA", "DVD-ROM SD-M1802", "1051", "toshiba_m1802", BUS_TYPE_IDE, 0, 48, 96, 0, 1, { 4, 2, 2, 2 } },
|
||||
{ "CHINON", "CD-ROM CDS-431", "H42 ", "chinon_431", BUS_TYPE_SCSI, 1, 1, 36, 1, 0, { -1, -1, -1, -1 } },
|
||||
{ "CHINON", "CD-ROM CDX-435", "M62 ", "chinon_435", BUS_TYPE_SCSI, 1, 2, 36, 1, 0, { -1, -1, -1, -1 } },
|
||||
@@ -227,6 +230,7 @@ static const struct cdrom_drive_types_s {
|
||||
{ "TOSHIBA", "CD-ROM XM-5701TA", "3136", "toshiba_5701a", BUS_TYPE_SCSI, 2, 12, 96, 0, 0, { -1, -1, -1, -1 } }, /* Tray. */
|
||||
{ "TOSHIBA", "DVD-ROM SD-M1401", "1008", "toshiba_m1401", BUS_TYPE_SCSI, 2, 40, 96, 0, 1, { -1, -1, -1, -1 } }, /* Tray. */
|
||||
{ "MATSHITA", "CR-562", "0.75", "cr562", BUS_TYPE_MKE , 0, 2, 0, 0, 0, { -1, -1, -1, -1 } },
|
||||
{ "MATSHITA", "CR-562", "0.76", "cr562_076", BUS_TYPE_MKE , 0, 2, 0, 0, 0, { -1, -1, -1, -1 } },
|
||||
{ "MATSHITA", "CR-562", "0.80", "cr562_080", BUS_TYPE_MKE , 0, 2, 0, 0, 0, { -1, -1, -1, -1 } },
|
||||
{ "MATSHITA", "CR-563", "0.75", "cr563", BUS_TYPE_MKE , 0, 2, 0, 0, 0, { -1, -1, -1, -1 } },
|
||||
{ "MATSHITA", "CR-563", "0.80", "cr563_080", BUS_TYPE_MKE , 0, 2, 0, 0, 0, { -1, -1, -1, -1 } },
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the common CD-ROM interface controller handler.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: TheCollector1995
|
||||
*
|
||||
* Copyright 2022 TheCollector1995.
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* Copyright 2022-2025 Miran Grca.
|
||||
* Copyright 2025 Cacodemon345.
|
||||
*/
|
||||
|
||||
#ifndef CDROM_MKE_H
|
||||
#define CDROM_MKE_H
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Handling of the emulated chipsets.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2019-2020 Miran Grca.
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for clock generator chips.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: RichardG, <richardg867@gmail.com>
|
||||
*
|
||||
* Copyright 2020 RichardG.
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the Distributed DMA emulation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2020 Miran Grca.
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the device handler.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
@@ -215,7 +213,7 @@ extern uint8_t device_get_bios_type(const device_t *dev, const char *interna
|
||||
extern uint8_t device_get_bios_num_files(const device_t *dev, const char *internal_name);
|
||||
extern uint32_t device_get_bios_local(const device_t *dev, const char *internal_name);
|
||||
extern uint32_t device_get_bios_file_size(const device_t *dev, const char *internal_name);
|
||||
extern const char *device_get_bios_file(const device_t *dev, const char *internal_name, int file_no);
|
||||
extern const char *device_get_bios_file(const device_t *dev, const char *internal_name, unsigned int file_no);
|
||||
|
||||
extern int device_is_valid(const device_t *, int mch);
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the Discord integration module.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: David Hrdlička, <hrdlickadavid@outlook.com>
|
||||
*
|
||||
* Copyright 2019 David Hrdlička.
|
||||
|
||||
@@ -8,13 +8,10 @@
|
||||
*
|
||||
* Header of the emulation of the PC speaker.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Jasmine Iwanek <jriwanek@gmail.com/>
|
||||
*
|
||||
* Copyright 2022 Jasmine Iwanek
|
||||
* Copyright 2022-2025 Jasmine Iwanek
|
||||
*/
|
||||
|
||||
#ifndef DISK_SIZES_H
|
||||
#define DISK_SIZES_H
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the Intel DMA controller.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
* Implementation of the NEC uPD-765 and compatible floppy disk
|
||||
* controller.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
* Implementation of the NEC uPD-765 and compatible floppy disk
|
||||
* controller.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Shared code for all the floppy modules.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2017-2018 Fred N. van Kempen.
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
* Implementation of the FDI floppy stream image format
|
||||
* interface to the FDI2RAW module.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the IMD floppy image format.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
* Implementation of the raw sector-based floppy image format,
|
||||
* as well as the Japanese FDI, CopyQM, and FDF formats.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Implementation of the HxC MFM image format.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2018 Miran Grca.
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* More info: https://www.pcjs.org/tools/diskimage/
|
||||
* pcjs disk module v2: https://github.com/jeffpar/pcjs/blob/master/machines/pcx86/modules/v2/disk.js
|
||||
*/
|
||||
|
||||
#ifndef EMU_FLOPPY_PCJS_H
|
||||
#define EMU_FLOPPY_PCJS_H
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the Teledisk floppy image format.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
|
||||
@@ -8,15 +8,12 @@
|
||||
*
|
||||
* Handling of the emulated flash devices.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Jasmine Iwanek, <jriwanek@gmail.com>
|
||||
*
|
||||
* Copyright 2020 Miran Grca.
|
||||
* Copyright 2022-2023 Jasmine Iwanek.
|
||||
*/
|
||||
|
||||
#ifndef EMU_FLASH_H
|
||||
#define EMU_FLASH_H
|
||||
|
||||
@@ -32,6 +29,7 @@ extern const device_t sst_flash_29ee020_device;
|
||||
|
||||
extern const device_t winbond_flash_w29c512_device;
|
||||
extern const device_t winbond_flash_w29c010_device;
|
||||
extern const device_t winbond_flash_w29c011a_device;
|
||||
extern const device_t winbond_flash_w29c020_device;
|
||||
extern const device_t winbond_flash_w29c040_device;
|
||||
|
||||
|
||||
@@ -172,29 +172,73 @@ extern void gameport_update_joystick_type(uint8_t gp);
|
||||
extern void gameport_remap(void *priv, uint16_t address);
|
||||
extern void *gameport_add(const device_t *gameport_type);
|
||||
|
||||
// Paddle Controllers
|
||||
extern const joystick_t joystick_generic_paddle;
|
||||
|
||||
// 2 axis Generic Joysticks
|
||||
extern const joystick_t joystick_2axis_1button;
|
||||
extern const joystick_t joystick_2axis_2button;
|
||||
extern const joystick_t joystick_2button_gamepad;
|
||||
extern const joystick_t joystick_2button_flight_yoke;
|
||||
extern const joystick_t joystick_2axis_3button;
|
||||
extern const joystick_t joystick_2axis_4button;
|
||||
extern const joystick_t joystick_4button_gamepad;
|
||||
extern const joystick_t joystick_4button_flight_yoke;
|
||||
extern const joystick_t joystick_3axis_2button;
|
||||
extern const joystick_t joystick_2button_yoke_throttle;
|
||||
extern const joystick_t joystick_3axis_4button;
|
||||
extern const joystick_t joystick_4button_yoke_throttle;
|
||||
extern const joystick_t joystick_win95_steering_wheel;
|
||||
extern const joystick_t joystick_4axis_4button;
|
||||
extern const joystick_t joystick_2axis_6button;
|
||||
extern const joystick_t joystick_2axis_8button;
|
||||
|
||||
// 3 axis Generic Joysticks
|
||||
extern const joystick_t joystick_3axis_2button;
|
||||
extern const joystick_t joystick_3axis_3button;
|
||||
extern const joystick_t joystick_3axis_4button;
|
||||
|
||||
// 4 axis Generic Joysticks
|
||||
extern const joystick_t joystick_4axis_2button;
|
||||
extern const joystick_t joystick_4axis_3button;
|
||||
extern const joystick_t joystick_4axis_4button;
|
||||
|
||||
// Generic Gamepads
|
||||
extern const joystick_t joystick_2button_gamepad;
|
||||
extern const joystick_t joystick_3button_gamepad;
|
||||
extern const joystick_t joystick_4button_gamepad;
|
||||
extern const joystick_t joystick_6button_gamepad;
|
||||
|
||||
extern const joystick_t joystick_gravis_gamepad;
|
||||
|
||||
// Generic Steering Wheels
|
||||
extern const joystick_t joystick_steering_wheel_2_button;
|
||||
extern const joystick_t joystick_steering_wheel_3_button;
|
||||
extern const joystick_t joystick_steering_wheel_4_button;
|
||||
|
||||
// Generic Flight Yokes
|
||||
extern const joystick_t joystick_2button_flight_yoke;
|
||||
extern const joystick_t joystick_4button_flight_yoke;
|
||||
extern const joystick_t joystick_3button_flight_yoke;
|
||||
|
||||
extern const joystick_t joystick_2button_yoke_throttle;
|
||||
extern const joystick_t joystick_3button_yoke_throttle;
|
||||
extern const joystick_t joystick_4button_yoke_throttle;
|
||||
|
||||
extern const joystick_t joystick_ch_flightstick;
|
||||
extern const joystick_t joystick_ch_flightstick_ch_pedals;
|
||||
extern const joystick_t joystick_ch_flightstick_ch_pedals_pro;
|
||||
|
||||
extern const joystick_t joystick_ch_flightstick_pro;
|
||||
extern const joystick_t joystick_ch_flightstick_pro_ch_pedals;
|
||||
extern const joystick_t joystick_ch_flightstick_pro_ch_pedals_pro;
|
||||
|
||||
extern const joystick_t joystick_ch_virtual_pilot;
|
||||
extern const joystick_t joystick_ch_virtual_pilot_ch_pedals;
|
||||
extern const joystick_t joystick_ch_virtual_pilot_ch_pedals_pro;
|
||||
|
||||
extern const joystick_t joystick_ch_virtual_pilot_pro;
|
||||
extern const joystick_t joystick_ch_virtual_pilot_pro_ch_pedals;
|
||||
extern const joystick_t joystick_ch_virtual_pilot_pro_ch_pedals_pro;
|
||||
|
||||
extern const joystick_t joystick_sw_pad;
|
||||
|
||||
extern const joystick_t joystick_tm_fcs;
|
||||
extern const joystick_t joystick_tm_fcs_rcs;
|
||||
|
||||
extern const joystick_t joystick_tm_formula_t1t2;
|
||||
extern const joystick_t joystick_tm_formula_t1t2wa;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the GDB stub server.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: RichardG, <richardg867@gmail.com>
|
||||
*
|
||||
* Copyright 2022 RichardG.
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the common disk controller handler.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
* Implementation of the IDE emulation for hard disks and ATAPI
|
||||
* CD-ROM devices.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Copyright 2008-2019 Sarah Walker.
|
||||
|
||||
@@ -8,20 +8,16 @@
|
||||
*
|
||||
* Emulation of the SFF-8038i IDE Bus Master.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2008-2020 Sarah Walker.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_HDC_IDE_SFF8038I_H
|
||||
#define EMU_HDC_IDE_SFF8038I_H
|
||||
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
IRQ_MODE_LEGACY = 0,
|
||||
IRQ_MODE_PCI_IRQ_PIN,
|
||||
IRQ_MODE_PCI_IRQ_LINE,
|
||||
@@ -33,8 +29,7 @@ enum
|
||||
IRQ_MODE_SIS_551X
|
||||
};
|
||||
|
||||
typedef struct sff8038i_t
|
||||
{
|
||||
typedef struct sff8038i_t {
|
||||
uint8_t command;
|
||||
uint8_t status;
|
||||
uint8_t ptr0;
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the hard disk image handler.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
@@ -101,6 +99,7 @@ typedef struct hdd_preset_t {
|
||||
uint32_t max_multiple;
|
||||
double full_stroke_ms;
|
||||
double track_seek_ms;
|
||||
const char *version_ex;
|
||||
} hdd_preset_t;
|
||||
|
||||
typedef struct hdd_cache_seg_t {
|
||||
@@ -188,6 +187,8 @@ typedef struct hard_disk_t {
|
||||
|
||||
const char *model;
|
||||
|
||||
const char *version_ex;
|
||||
|
||||
hdd_zone_t zones[HDD_MAX_ZONES];
|
||||
|
||||
hdd_cache_t cache;
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for hardware monitoring chips.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: RichardG, <richardg867@gmail.com>
|
||||
*
|
||||
* Copyright 2020 RichardG.
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the I2C handler.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: RichardG, <richardg867@gmail.com>
|
||||
*
|
||||
* Copyright 2020 RichardG.
|
||||
|
||||
@@ -8,13 +8,10 @@
|
||||
*
|
||||
* Emulation of the IBM Expansion Unit (5161).
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_IBM_5161_H
|
||||
#define EMU_IBM_5161_H
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Configuration file handler header.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
@@ -30,8 +28,10 @@ typedef void *ini_t;
|
||||
typedef void *ini_section_t;
|
||||
|
||||
extern ini_t ini_new(void);
|
||||
extern ini_t ini_read_ex(const char *fn, int is_rom);
|
||||
extern ini_t ini_read(const char *fn);
|
||||
extern void ini_strip_quotes(ini_t ini);
|
||||
extern void ini_write_ex(ini_t ini, const char *fn, int is_rom);
|
||||
extern void ini_write(ini_t ini, const char *fn);
|
||||
extern void ini_dump(ini_t ini);
|
||||
extern void ini_close(ini_t ini);
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the I/O handler.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
*
|
||||
* Definitions for the ISAMEM cards.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2018 Fred N. van Kempen.
|
||||
|
||||
@@ -8,13 +8,10 @@
|
||||
*
|
||||
* Definitions for ISA Plug and Play.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: RichardG, <richardg867@gmail.com>
|
||||
*
|
||||
* Copyright 2021 RichardG.
|
||||
*/
|
||||
|
||||
#ifndef EMU_ISAPNP_H
|
||||
#define EMU_ISAPNP_H
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
*
|
||||
* Definitions for the ISARTC cards.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2018 Fred N. van Kempen.
|
||||
|
||||
27
src/include/86box/joystick.h
Normal file
27
src/include/86box/joystick.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Definitions for the analog joystick handlers.
|
||||
*
|
||||
* Authors: Jasmine Iwanek, <jriwanek@gmail.com>
|
||||
*
|
||||
* Copyright 2025 Jasmine Iwanek.
|
||||
*/
|
||||
#ifndef EMU_JOYSTICK_H
|
||||
#define EMU_JOYSTICK_H
|
||||
|
||||
void *joystick_standard_init(void);
|
||||
void joystick_standard_close(UNUSED(void *priv));
|
||||
uint8_t joystick_standard_read_2button(UNUSED(void *priv));
|
||||
uint8_t joystick_standard_read_4button(UNUSED(void *priv));
|
||||
void joystick_standard_write(UNUSED(void *priv));
|
||||
int joystick_standard_read_axis_3axis_throttle(UNUSED(void *priv), int axis);
|
||||
int joystick_standard_read_axis_4axis(UNUSED(void *priv), int axis);
|
||||
void joystick_standard_a0_over(UNUSED(void *priv));
|
||||
|
||||
#endif /*EMU_JOYSTICK_H*/
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the keyboard interface.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
@@ -18,7 +16,6 @@
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
#ifndef EMU_KEYBOARD_H
|
||||
#define EMU_KEYBOARD_H
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* Copyright 2021-25 Fred N. van Kempen.
|
||||
* Copyright 2025 Connor Hyde.
|
||||
*/
|
||||
|
||||
#ifndef EMU_LOG_H
|
||||
#define EMU_LOG_H
|
||||
|
||||
|
||||
@@ -10,13 +10,10 @@
|
||||
* PC1512, PC1640 and PC200, including their keyboard, mouse and
|
||||
* video devices, as well as the PC2086 and PC3086 systems.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
*
|
||||
* Copyright 2008-2019 Sarah Walker.
|
||||
*/
|
||||
|
||||
#ifndef MACHINE_AMSTRAD_H
|
||||
#define MACHINE_AMSTRAD_H
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the Toshiba T3100e system.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* John Elliott, <jce@seasip.info>
|
||||
@@ -36,7 +34,6 @@
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef MACHINE_T3100E_H
|
||||
#define MACHINE_T3100E_H
|
||||
|
||||
|
||||
@@ -8,13 +8,10 @@
|
||||
*
|
||||
* Header files for the PCjr keyboard and video subsystems.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Connor Hyde, <mario64crashed@gmail.com>
|
||||
*
|
||||
* Copyright 2025 starfrost
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define PCJR_RGB 0
|
||||
@@ -27,8 +24,7 @@
|
||||
#define DOUBLE_INTERPOLATE_SRGB 2
|
||||
#define DOUBLE_INTERPOLATE_LINEAR 3
|
||||
|
||||
typedef struct pcjr_s
|
||||
{
|
||||
typedef struct pcjr_s {
|
||||
/* Video Controller stuff. */
|
||||
mem_mapping_t mapping;
|
||||
uint8_t crtc[32];
|
||||
@@ -46,7 +42,7 @@ typedef struct pcjr_s
|
||||
int scanline;
|
||||
int vc;
|
||||
int dispon;
|
||||
int cursorvisible; // Is the cursor visible on the current scanline?
|
||||
int cursorvisible; // Is the cursor visible on the current scanline?
|
||||
int cursoron;
|
||||
int blink;
|
||||
int vsynctime;
|
||||
@@ -63,13 +59,18 @@ typedef struct pcjr_s
|
||||
int apply_hd;
|
||||
int double_type;
|
||||
|
||||
/* Keyboard Controller stuff. */
|
||||
/* Keyboard Controller stuff. */
|
||||
int latched;
|
||||
int data;
|
||||
int serial_data[44];
|
||||
int serial_pos;
|
||||
uint8_t pa;
|
||||
uint8_t pb;
|
||||
|
||||
uint8_t option_modem;
|
||||
uint8_t option_fdc;
|
||||
uint8_t option_ir;
|
||||
|
||||
pc_timer_t send_delay_timer;
|
||||
|
||||
} pcjr_t;
|
||||
@@ -77,4 +78,4 @@ typedef struct pcjr_s
|
||||
void pcjr_recalc_timings(pcjr_t *pcjr);
|
||||
|
||||
// Note: This is a temporary solution until the pcjr video is made its own gfx card
|
||||
void pcjr_vid_init(pcjr_t *pcjr);
|
||||
void pcjr_vid_init(pcjr_t *pcjr);
|
||||
|
||||
@@ -8,13 +8,10 @@
|
||||
*
|
||||
* Header files for the Tandy keyboard and video subsystems.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Connor Hyde, <mario64crashed@gmail.com>
|
||||
*
|
||||
* Copyright 2025 starfrost
|
||||
*/
|
||||
|
||||
typedef struct t1kvid_t {
|
||||
mem_mapping_t mapping;
|
||||
mem_mapping_t vram_mapping;
|
||||
@@ -36,6 +33,13 @@ typedef struct t1kvid_t {
|
||||
uint8_t planar_ctrl;
|
||||
uint8_t lp_strobe;
|
||||
|
||||
uint8_t baseline_hsyncpos;
|
||||
uint8_t baseline_vsyncpos;
|
||||
bool baseline_ready;
|
||||
int hsync_offset;
|
||||
int vsync_offset;
|
||||
int vsync_offset_pending;
|
||||
|
||||
int linepos;
|
||||
int displine;
|
||||
int scanline;
|
||||
@@ -54,6 +58,7 @@ typedef struct t1kvid_t {
|
||||
uint64_t dispontime;
|
||||
uint64_t dispofftime;
|
||||
pc_timer_t timer;
|
||||
pc_timer_t calib_timer;
|
||||
int firstline;
|
||||
int lastline;
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the Toshiba T1000/T1200 machines.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* John Elliott, <jce@seasip.info>
|
||||
@@ -36,7 +34,6 @@
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef MACHINE_T1000_H
|
||||
#define MACHINE_T1000_H
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2025 Jasmine Iwanek.
|
||||
*/
|
||||
|
||||
#ifndef EMU_MACHINE_H
|
||||
#define EMU_MACHINE_H
|
||||
|
||||
@@ -497,6 +496,9 @@ extern int machine_at_portableii_init(const machine_t *);
|
||||
extern int machine_at_portableiii_init(const machine_t *);
|
||||
extern int machine_at_grid1520_init(const machine_t *);
|
||||
extern int machine_at_pc900_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t pc900_device;
|
||||
#endif
|
||||
extern int machine_at_mr286_init(const machine_t *);
|
||||
extern int machine_at_pc8_init(const machine_t *);
|
||||
extern int machine_at_m290_init(const machine_t *);
|
||||
@@ -633,6 +635,9 @@ extern int machine_at_tandy4000_init(const machine_t *);
|
||||
extern int machine_at_ecs386v_init(const machine_t *);
|
||||
|
||||
/* OPTi 391 */
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t dataexpert386wb_device;
|
||||
#endif
|
||||
extern int machine_at_dataexpert386wb_init(const machine_t *);
|
||||
|
||||
/* OPTi 495SLC */
|
||||
@@ -758,6 +763,7 @@ extern int machine_at_acerv10_init(const machine_t *);
|
||||
|
||||
/* SiS 471 */
|
||||
extern int machine_at_win471_init(const machine_t *);
|
||||
extern int machine_at_win471t_init(const machine_t *);
|
||||
extern int machine_at_vi15g_init(const machine_t *);
|
||||
extern int machine_at_vli486sv2g_init(const machine_t *);
|
||||
extern int machine_at_dvent4xx_init(const machine_t *);
|
||||
@@ -863,6 +869,9 @@ extern const device_t v12p_device;
|
||||
#endif
|
||||
extern int machine_at_v12p_init(const machine_t *);
|
||||
extern int machine_at_excaliburpci_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t p5mp3_device;
|
||||
#endif
|
||||
extern int machine_at_p5mp3_init(const machine_t *);
|
||||
extern int machine_at_opti560l_init(const machine_t *);
|
||||
extern void machine_at_award_common_init(const machine_t *);
|
||||
@@ -913,8 +922,18 @@ extern int machine_at_tek932_init(const machine_t *);
|
||||
extern int machine_at_acerv30_init(const machine_t *);
|
||||
extern int machine_at_apollo_init(const machine_t *);
|
||||
extern int machine_at_optiplexgxl_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t pt2000_device;
|
||||
#endif
|
||||
extern int machine_at_pt2000_init(const machine_t *);
|
||||
extern int machine_at_pc330_65x6_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t zappa_device;
|
||||
#endif
|
||||
extern int machine_at_zappa_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t powermatev_device;
|
||||
#endif
|
||||
extern int machine_at_powermatev_init(const machine_t *);
|
||||
extern int machine_at_hawk_init(const machine_t *);
|
||||
|
||||
@@ -951,16 +970,34 @@ extern const device_t p54tp4xe_device;
|
||||
#endif
|
||||
extern int machine_at_p54tp4xe_init(const machine_t *);
|
||||
extern int machine_at_exp8551_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t vectra52_device;
|
||||
#endif
|
||||
extern int machine_at_vectra52_init(const machine_t *);
|
||||
extern int machine_at_vectra500mt_init(const machine_t *);
|
||||
extern int machine_at_vectra54_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t thor_device;
|
||||
#endif
|
||||
extern int machine_at_thor_init(const machine_t *);
|
||||
extern uint32_t machine_at_monaco_gpio_handler(uint8_t write, uint32_t val);
|
||||
extern int machine_at_monaco_init(const machine_t *);
|
||||
extern uint32_t machine_at_endeavor_gpio_handler(uint8_t write, uint32_t val);
|
||||
extern int machine_at_endeavor_init(const machine_t *);
|
||||
extern int machine_at_atlantis_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t monaco_device;
|
||||
#endif
|
||||
extern int machine_at_monaco_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t ms5119_device;
|
||||
#endif
|
||||
extern int machine_at_ms5119_init(const machine_t *);
|
||||
extern int machine_at_pb640_init(const machine_t *);
|
||||
extern int machine_at_mb500n_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t fmb_device;
|
||||
#endif
|
||||
extern int machine_at_fmb_init(const machine_t *);
|
||||
|
||||
/* i430HX */
|
||||
@@ -1025,6 +1062,9 @@ extern int machine_at_8500tvxa_init(const machine_t *);
|
||||
extern int machine_at_presario2240_init(const machine_t *);
|
||||
extern int machine_at_presario4500_init(const machine_t *);
|
||||
extern int machine_at_dellhannibalp_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t p5vxb_device;
|
||||
#endif
|
||||
extern int machine_at_p5vxb_init(const machine_t *);
|
||||
extern int machine_at_p55va_init(const machine_t *);
|
||||
extern int machine_at_gw2kte_init(const machine_t *);
|
||||
@@ -1044,10 +1084,13 @@ extern int machine_at_tx97_init(const machine_t *);
|
||||
extern void machine_at_optiplex_21152_init(void);
|
||||
extern int machine_at_optiplexgn_init(const machine_t *);
|
||||
extern int machine_at_tomahawk_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t an430tx_device;
|
||||
#endif
|
||||
extern int machine_at_an430tx_init(const machine_t *);
|
||||
extern int machine_at_ym430tx_init(const machine_t *);
|
||||
extern int machine_at_thunderbolt_init(const machine_t *);
|
||||
extern int machine_at_ma23c_init(const machine_t *);
|
||||
extern int machine_at_an430tx_init(const machine_t *);
|
||||
extern int machine_at_mb540n_init(const machine_t *);
|
||||
extern int machine_at_56a5_init(const machine_t *);
|
||||
extern int machine_at_p5mms98_init(const machine_t *);
|
||||
@@ -1062,6 +1105,9 @@ extern int machine_at_via809ds_init(const machine_t *);
|
||||
|
||||
/* SiS 5571 */
|
||||
extern int machine_at_cb52xsi_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t ms5146_device;
|
||||
#endif
|
||||
extern int machine_at_ms5146_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t r534f_device;
|
||||
@@ -1089,14 +1135,21 @@ extern int machine_at_p5a_init(const machine_t *);
|
||||
extern int machine_at_m579_init(const machine_t *);
|
||||
extern int machine_at_gwlucas_init(const machine_t *);
|
||||
extern int machine_at_5aa_init(const machine_t *);
|
||||
extern int machine_at_5ax_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t g5x_device;
|
||||
#endif
|
||||
extern int machine_at_g5x_init(const machine_t *);
|
||||
|
||||
/* VIA MVP3 */
|
||||
extern int machine_at_ax59pro_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t delhi3_device;
|
||||
#endif
|
||||
extern int machine_at_delhi3_init(const machine_t *);
|
||||
extern int machine_at_mvp3_init(const machine_t *);
|
||||
extern int machine_at_ficva503a_init(const machine_t *);
|
||||
extern int machine_at_5emapro_init(const machine_t *);
|
||||
extern int machine_at_k6bv3p_a_init(const machine_t *);
|
||||
|
||||
/* SiS 5591 */
|
||||
extern int machine_at_5sg100_init(const machine_t *);
|
||||
@@ -1115,6 +1168,7 @@ extern int machine_at_acerv60n_init(const machine_t *);
|
||||
extern int machine_at_p65up5_cp6nd_init(const machine_t *);
|
||||
extern int machine_at_8600ttc_init(const machine_t *);
|
||||
extern int machine_at_686nx_init(const machine_t *);
|
||||
extern uint32_t machine_ap440fx_vs440fx_gpio_handler(uint8_t write, uint32_t val);
|
||||
extern int machine_at_ap440fx_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t vs440fx_device;
|
||||
@@ -1151,18 +1205,37 @@ extern int machine_at_bf6_init(const machine_t *);
|
||||
extern const device_t bx6_device;
|
||||
#endif
|
||||
extern int machine_at_bx6_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t ax6bc_device;
|
||||
#endif
|
||||
extern int machine_at_ax6bc_init(const machine_t *);
|
||||
extern int machine_at_p2bls_init(const machine_t *);
|
||||
extern int machine_at_p3bf_init(const machine_t *);
|
||||
extern int machine_at_686bx_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t ga686_device;
|
||||
#endif
|
||||
extern int machine_at_ga686_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t ms6119_device;
|
||||
#endif
|
||||
extern int machine_at_ms6119_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t ms6147_device;
|
||||
#endif
|
||||
extern int machine_at_ms6147_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t p6sba_device;
|
||||
#endif
|
||||
extern int machine_at_p6sba_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t s1846_device;
|
||||
#endif
|
||||
extern int machine_at_s1846_init(const machine_t *);
|
||||
|
||||
/* i440ZX */
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t vei8_device;
|
||||
#endif
|
||||
extern int machine_at_vei8_init(const machine_t *);
|
||||
extern int machine_at_ms6168_init(const machine_t *);
|
||||
extern int machine_at_borapro_init(const machine_t *);
|
||||
@@ -1190,6 +1263,9 @@ extern int machine_at_fw6400gx_init(const machine_t *);
|
||||
|
||||
/* m_at_slot1_socket370.c */
|
||||
/* i440BX */
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t prosignias31x_device;
|
||||
#endif
|
||||
extern int machine_at_prosignias31x_bx_init(const machine_t *);
|
||||
extern int machine_at_s1857_init(const machine_t *);
|
||||
|
||||
@@ -1332,6 +1408,9 @@ extern int machine_xt_ataripc3_init(const machine_t *);
|
||||
extern int machine_xt_bw230_init(const machine_t *);
|
||||
extern int machine_xt_mpc1600_init(const machine_t *);
|
||||
extern int machine_xt_compaq_portable_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t dtk_device;
|
||||
#endif
|
||||
extern int machine_xt_dtk_init(const machine_t *);
|
||||
extern int machine_xt_pcspirit_init(const machine_t *);
|
||||
extern int machine_genxt_init(const machine_t *);
|
||||
@@ -1349,7 +1428,13 @@ extern int machine_xt_micoms_xl7turbo_init(const machine_t *);
|
||||
extern const device_t pc500_device;
|
||||
#endif
|
||||
extern int machine_xt_pc500_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t pc500plus_device;
|
||||
#endif
|
||||
extern int machine_xt_pc500plus_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t pc700_device;
|
||||
#endif
|
||||
extern int machine_xt_pc700_init(const machine_t *);
|
||||
extern int machine_xt_pc4i_init(const machine_t *);
|
||||
extern int machine_xt_openxt_init(const machine_t *);
|
||||
|
||||
@@ -32,4 +32,4 @@ extern machine_status_t machine_status;
|
||||
|
||||
extern void machine_status_init(void);
|
||||
|
||||
#endif /*EMU_MACHINE_STATUS_H*/
|
||||
#endif /*EMU_MACHINE_STATUS_H*/
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the memory interface.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -18,7 +16,6 @@
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_MEM_H
|
||||
#define EMU_MEM_H
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
* Copyright 2020-2025 Miran Grca.
|
||||
* Copyright 2020-2025 Fred N. van Kempen
|
||||
*/
|
||||
|
||||
#ifndef EMU_MO_H
|
||||
#define EMU_MO_H
|
||||
|
||||
|
||||
@@ -8,15 +8,12 @@
|
||||
*
|
||||
* Definitions for the mouse driver.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
#ifndef EMU_MOUSE_H
|
||||
#define EMU_MOUSE_H
|
||||
|
||||
|
||||
@@ -8,15 +8,12 @@
|
||||
* Controller used by the WD family, NE1000/NE2000 family, and
|
||||
* 3Com 3C503 NIC's.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Bochs project,
|
||||
*
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2008-2018 Bochs project.
|
||||
*/
|
||||
|
||||
#ifndef NET_DP8390_H
|
||||
#define NET_DP8390_H
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ typedef struct net_evt_t {
|
||||
HANDLE handle;
|
||||
#else
|
||||
int fds[2];
|
||||
#endif
|
||||
#endif /* _WIN32 */
|
||||
} net_evt_t;
|
||||
|
||||
extern void net_event_init(net_evt_t *event);
|
||||
@@ -17,6 +17,6 @@ extern void net_event_close(net_evt_t *event);
|
||||
extern HANDLE net_event_get_handle(net_evt_t *event);
|
||||
#else
|
||||
extern int net_event_get_fd(net_evt_t *event);
|
||||
#endif
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#endif
|
||||
#endif /* EMU_NET_EVENT_H */
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the NE2000 ethernet controller.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2017-2018 Fred N. van Kempen.
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
* Emulation of the AMD PCnet LANCE NIC controller for both the ISA
|
||||
* and PCI buses.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* TheCollector1995, <mariogplayer@gmail.com>
|
||||
* Antony T Curtis
|
||||
@@ -16,7 +14,6 @@
|
||||
* Copyright 2004-2019 Antony T Curtis
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef NET_PCNET_H
|
||||
#define NET_PCNET_H
|
||||
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
* - SMC/WD 8013EBT (ISA 16-bit);
|
||||
* - SMC/WD 8013EP/A (MCA).
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* TheCollector1995, <mariogplayer@gmail.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -40,7 +38,6 @@
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef NET_WD8003_H
|
||||
#define NET_WD8003_H
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
*
|
||||
* Definitions for the network module.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
@@ -42,7 +40,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.
|
||||
*/
|
||||
|
||||
#ifndef EMU_NETWORK_H
|
||||
#define EMU_NETWORK_H
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
typedef struct nmc93cxx_eeprom_t {
|
||||
ati_eeprom_t dev;
|
||||
uint8_t addrbits;
|
||||
uint16_t size;
|
||||
char filename[1024];
|
||||
uint8_t addrbits;
|
||||
uint16_t size;
|
||||
char filename[1024];
|
||||
} nmc93cxx_eeprom_t;
|
||||
|
||||
typedef struct nmc93cxx_eeprom_params_t {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* Copyright holders: Sarah Walker
|
||||
see COPYING for more details
|
||||
*/
|
||||
|
||||
#ifndef EMU_NMI_H
|
||||
#define EMU_NMI_H
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* Implementation of the Novell NetWare 2.x Key Card, which
|
||||
* was used for anti-piracy protection.
|
||||
*
|
||||
*
|
||||
* Authors: Cacodemon345
|
||||
*
|
||||
* Copyright 2024 Cacodemon345.
|
||||
@@ -34,4 +33,4 @@ extern const device_t novell_keycard_device;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*BUGGER_H*/
|
||||
#endif /* NOVELL_KEYCARD_H */
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
*
|
||||
* Definitions for the generic NVRAM/CMOS driver.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>,
|
||||
* David Hrdlička, <hrdlickadavid@outlook.com>
|
||||
*
|
||||
@@ -44,7 +42,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.
|
||||
*/
|
||||
|
||||
#ifndef EMU_NVR_H
|
||||
#define EMU_NVR_H
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the PS/2 cmos/nvr device.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
*
|
||||
@@ -34,7 +32,6 @@
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef EMU_NVRPS2_H
|
||||
#define EMU_NVRPS2_H
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
* opl4_defines.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __OPL4_DEFINES_H
|
||||
#define __OPL4_DEFINES_H
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Definitions for the PCI handler module.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2023 Miran Grca.
|
||||
|
||||
@@ -15,15 +15,14 @@
|
||||
* Copyright 2015-2020 Andrew Jenner.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_PIC_H
|
||||
#define EMU_PIC_H
|
||||
|
||||
typedef struct pic_latch {
|
||||
uint8_t d;
|
||||
uint8_t e;
|
||||
uint8_t q;
|
||||
uint8_t nq;
|
||||
uint8_t d;
|
||||
uint8_t e;
|
||||
uint8_t q;
|
||||
uint8_t nq;
|
||||
} pic_latch_t;
|
||||
|
||||
typedef struct pic {
|
||||
|
||||
@@ -9,13 +9,10 @@
|
||||
* Header of the implementation of the Intel 8253/8254
|
||||
* Programmable Interval Timer.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2019-2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_PIT_H
|
||||
#define EMU_PIT_H
|
||||
|
||||
|
||||
@@ -9,13 +9,10 @@
|
||||
* Header of the implementation of the Intel 8253/8254
|
||||
* Programmable Interval Timer.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2019-2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_PIT_FAST_H
|
||||
#define EMU_PIT_FAST_H
|
||||
|
||||
@@ -55,9 +52,9 @@ typedef struct ctrf_t {
|
||||
};
|
||||
};
|
||||
|
||||
uint32_t l;
|
||||
uint32_t l;
|
||||
|
||||
uint64_t pit_const;
|
||||
uint64_t pit_const;
|
||||
|
||||
pc_timer_t timer;
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Define the various platform support functions.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
@@ -17,7 +15,6 @@
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
* Copyright 2021 Laci bá'
|
||||
*/
|
||||
|
||||
#ifndef EMU_PLAT_H
|
||||
#define EMU_PLAT_H
|
||||
|
||||
|
||||
@@ -8,14 +8,12 @@
|
||||
*
|
||||
* Definitions for platform specific serial to host passthrough.
|
||||
*
|
||||
*
|
||||
* Authors: Andreas J. Reichel <webmaster@6th-dimension.com>,
|
||||
* Jasmine Iwanek <jasmine@iwanek.co.uk>
|
||||
*
|
||||
* Copyright 2021 Andreas J. Reichel.
|
||||
* Copyright 2021-2022 Jasmine Iwanek.
|
||||
*/
|
||||
|
||||
#ifndef PLAT_CDROM_IOCTL_H
|
||||
#define PLAT_CDROM_IOCTL_H
|
||||
|
||||
@@ -31,4 +29,4 @@ extern void * ioctl_open(cdrom_t *dev, const char *drv);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* PLAT_CDROM_IOCTL_H */
|
||||
|
||||
@@ -8,13 +8,10 @@
|
||||
*
|
||||
* Definitions for the platform OpenDir module.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2017 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
#ifndef PLAT_DIR_H
|
||||
#define PLAT_DIR_H
|
||||
|
||||
|
||||
@@ -8,13 +8,10 @@
|
||||
*
|
||||
* Define the Dynamic Module Loader interface.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2017 Fred N. van Kempen
|
||||
*/
|
||||
|
||||
#ifndef PLAT_DYNLD_H
|
||||
#define PLAT_DYNLD_H
|
||||
|
||||
|
||||
@@ -8,13 +8,10 @@
|
||||
*
|
||||
* Define the various platform support functions.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Jasmine Iwanek, <jasmine@iwanek.co.uk>
|
||||
*
|
||||
* Copyright 2023 Jasmine Iwanek
|
||||
*/
|
||||
|
||||
#ifndef EMU_PLAT_FALLTHROUGH_H
|
||||
#define EMU_PLAT_FALLTHROUGH_H
|
||||
|
||||
|
||||
@@ -13,9 +13,8 @@
|
||||
* Jasmine Iwanek <jasmine@iwanek.co.uk>
|
||||
*
|
||||
* Copyright 2021 Andreas J. Reichel.
|
||||
* Copyright 2021-2022 Jasmine Iwanek.
|
||||
* Copyright 2021-2025 Jasmine Iwanek.
|
||||
*/
|
||||
|
||||
#ifndef PLAT_SERIAL_PASSTHROUGH_H
|
||||
#define PLAT_SERIAL_PASSTHROUGH_H
|
||||
|
||||
@@ -36,4 +35,4 @@ extern void plat_serpt_set_line_state(void *priv);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* PLAT_SERIAL_PASSTHROUGH_H */
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Define the various platform support functions.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
@@ -17,7 +15,6 @@
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
* Copyright 2021 Laci bá'
|
||||
*/
|
||||
|
||||
#ifndef EMU_PLAT_UNUSED_H
|
||||
#define EMU_PLAT_UNUSED_H
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
*
|
||||
* Definitions for the centralized PNG image handler.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2018 Fred N. van Kempen.
|
||||
@@ -42,7 +40,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.
|
||||
*/
|
||||
|
||||
#ifndef EMU_PNG_STRUCT_H
|
||||
#define EMU_PNG_STRUCT_H
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user