Merge pull request #4297 from 86Box/version/4.2

Merge Version/4.2 into master.
This commit is contained in:
Miran Grča
2024-03-23 17:15:39 +01:00
committed by GitHub
228 changed files with 9747 additions and 42534 deletions

3
.gitignore vendored
View File

@@ -59,3 +59,6 @@ CMakeLists.txt.user
# MacOS Finder stuff
.DS_Store
# clangd
.cache

View File

@@ -136,9 +136,14 @@ option(NEW_DYNAREC "Use the PCem v15 (\"new\") dynamic recompiler"
option(MINITRACE "Enable Chrome tracing using the modified minitrace library" OFF)
option(GDBSTUB "Enable GDB stub server for debugging" OFF)
option(DEV_BRANCH "Development branch" OFF)
option(QT "Qt GUI" ON)
option(DISCORD "Discord Rich Presence support" ON)
if(WIN32)
set(QT ON)
else()
option(QT "Qt GUI" ON)
endif()
# Development branch features
#
# Option Description Def. Condition Otherwise
@@ -146,7 +151,6 @@ option(DISCORD "Discord Rich Presence support"
cmake_dependent_option(AMD_K5 "AMD K5" ON "DEV_BRANCH" OFF)
cmake_dependent_option(AN430TX "Intel AN430TX" ON "DEV_BRANCH" OFF)
cmake_dependent_option(CYRIX_6X86 "Cyrix 6x86" ON "DEV_BRANCH" OFF)
cmake_dependent_option(DESKPRO386 "Compaq Deskpro 386" ON "DEV_BRANCH" OFF)
cmake_dependent_option(GUSMAX "Gravis UltraSound MAX" ON "DEV_BRANCH" OFF)
cmake_dependent_option(ISAMEM_RAMPAGE "AST Rampage" ON "DEV_BRANCH" OFF)
cmake_dependent_option(ISAMEM_IAB "Intel Above Board" ON "DEV_BRANCH" OFF)
@@ -155,7 +159,6 @@ cmake_dependent_option(LASERXT "VTech Laser XT"
cmake_dependent_option(OLIVETTI "Olivetti M290" ON "DEV_BRANCH" OFF)
cmake_dependent_option(OPEN_AT "OpenAT" ON "DEV_BRANCH" OFF)
cmake_dependent_option(OPL4ML "OPL4-ML daughterboard" ON "DEV_BRANCH" OFF)
cmake_dependent_option(PAS16 "Pro Audio Spectrum 16" ON "DEV_BRANCH" OFF)
cmake_dependent_option(SIO_DETECT "Super I/O Detection Helper" ON "DEV_BRANCH" OFF)
cmake_dependent_option(VGAWONDER "ATI VGA Wonder (ATI-18800)" ON "DEV_BRANCH" OFF)
cmake_dependent_option(XL24 "ATI VGA Wonder XL24 (ATI-28800-6)" ON "DEV_BRANCH" OFF)

View File

@@ -26,12 +26,6 @@ then
fi
shift
# Extract version components.
newversion_maj=$(echo "$newversion" | cut -d. -f1)
newversion_min=$(echo "$newversion" | cut -d. -f2)
newversion_patch=$(echo "$newversion" | cut -d. -f3)
[ -z "$newversion_patch" ] && newversion_patch=0
if [ -z "${romversion}" ]; then
# Get the latest ROM release from the GitHub API.
romversion=$(curl --silent "https://api.github.com/repos/86Box/roms/releases/latest" |
@@ -62,12 +56,6 @@ patch_file() {
}
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/include_make/*/version.h EMU_VERSION 's/(#\s*define\s+EMU_VERSION\s+")[^"]+/\1'"$newversion"'/'
patch_file src/include_make/*/version.h EMU_VERSION_MAJ 's/(#\s*define\s+EMU_VERSION_MAJ\s+)[0-9]+/\1'"$newversion_maj"'/'
patch_file src/include_make/*/version.h EMU_VERSION_MIN 's/(#\s*define\s+EMU_VERSION_MIN\s+)[0-9]+/\1'"$newversion_min"'/'
patch_file src/include_make/*/version.h EMU_VERSION_PATCH 's/(#\s*define\s+EMU_VERSION_PATCH\s+)[0-9]+/\1'"$newversion_patch"'/'
patch_file src/include_make/*/version.h COPYRIGHT_YEAR 's/(#\s*define\s+COPYRIGHT_YEAR\s+)[0-9]+/\1'"$(date +%Y)"'/'
patch_file src/include_make/*/version.h EMU_DOCS_URL 's/(#\s*define\s+EMU_DOCS_URL\s+"https:\/\/[^\/]+\/en\/v)[^\/]+/\1'"$newversion_maj.$newversion_min"'/'
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'/'

View File

@@ -66,6 +66,7 @@
#include <86box/bugger.h>
#include <86box/postcard.h>
#include <86box/unittester.h>
#include <86box/novell_cardkey.h>
#include <86box/isamem.h>
#include <86box/isartc.h>
#include <86box/lpt.h>
@@ -173,6 +174,7 @@ char video_shader[512] = { '\0' }; /* (C) video *
bool serial_passthrough_enabled[SERIAL_MAX] = { 0, 0, 0, 0 }; /* (C) activation and kind of
pass-through for serial ports */
int bugger_enabled = 0; /* (C) enable ISAbugger */
int novell_keycard_enabled = 0; /* (C) enable Novell NetWare 2.x key card emulation. */
int postcard_enabled = 0; /* (C) enable POST card */
int unittester_enabled = 0; /* (C) enable unit tester device */
int isamem_type[ISAMEM_MAX] = { 0, 0, 0, 0 }; /* (C) enable ISA mem cards */
@@ -952,12 +954,12 @@ pc_init_modules(void)
/* Load the ROMs for the selected machine. */
if (!machine_available(machine)) {
swprintf(temp, sizeof_w(temp), plat_get_string(IDS_2063), machine_getname());
swprintf(temp, sizeof_w(temp), plat_get_string(STRING_HW_NOT_AVAILABLE_MACHINE), machine_getname());
c = 0;
machine = -1;
while (machine_get_internal_name_ex(c) != NULL) {
if (machine_available(c)) {
ui_msgbox_header(MBX_INFO, (wchar_t *) IDS_2129, temp);
ui_msgbox_header(MBX_INFO, plat_get_string(STRING_HW_NOT_AVAILABLE_TITLE), temp);
machine = c;
config_save();
break;
@@ -974,12 +976,12 @@ pc_init_modules(void)
if (!video_card_available(gfxcard[0])) {
memset(tempc, 0, sizeof(tempc));
device_get_name(video_card_getdevice(gfxcard[0]), 0, tempc);
swprintf(temp, sizeof_w(temp), plat_get_string(IDS_2064), tempc);
swprintf(temp, sizeof_w(temp), plat_get_string(STRING_HW_NOT_AVAILABLE_VIDEO), tempc);
c = 0;
while (video_get_internal_name(c) != NULL) {
gfxcard[0] = -1;
if (video_card_available(c)) {
ui_msgbox_header(MBX_INFO, (wchar_t *) IDS_2129, temp);
ui_msgbox_header(MBX_INFO, plat_get_string(STRING_HW_NOT_AVAILABLE_TITLE), temp);
gfxcard[0] = c;
config_save();
break;
@@ -995,8 +997,8 @@ pc_init_modules(void)
if (!video_card_available(gfxcard[1])) {
char tempc[512] = { 0 };
device_get_name(video_card_getdevice(gfxcard[1]), 0, tempc);
swprintf(temp, sizeof_w(temp), plat_get_string(IDS_2163), tempc);
ui_msgbox_header(MBX_INFO, (wchar_t *) IDS_2129, temp);
swprintf(temp, sizeof_w(temp), plat_get_string(STRING_HW_NOT_AVAILABLE_VIDEO2), tempc);
ui_msgbox_header(MBX_INFO, plat_get_string(STRING_HW_NOT_AVAILABLE_TITLE), temp);
gfxcard[1] = 0;
}
@@ -1168,13 +1170,14 @@ pc_reset_hard_init(void)
/* note: PLIP LPT side has to be initialized before the network side */
lpt_devices_init();
/* Reset and reconfigure the Network Card layer. */
network_reset();
/* Reset and reconfigure the serial ports. */
/* note: SLIP COM side has to be initialized before the network side */
serial_standalone_init();
serial_passthrough_init();
/* Reset and reconfigure the Network Card layer. */
network_reset();
/*
* Reset the mouse, this will attach it to any port needed.
*/
@@ -1227,10 +1230,13 @@ pc_reset_hard_init(void)
device_add(&postcard_device);
if (unittester_enabled)
device_add(&unittester_device);
if (lba_enhancer_enabled)
device_add(&lba_enhancer_device);
if (novell_keycard_enabled)
device_add(&novell_keycard_device);
if (IS_ARCH(machine, MACHINE_BUS_PCI)) {
pci_register_cards();
device_reset_all(DEVICE_PCI);
@@ -1283,17 +1289,17 @@ update_mouse_msg(void)
mbstowcs(wcpu, cpu_s->name, strlen(cpu_s->name) + 1);
#ifdef _WIN32
swprintf(mouse_msg[0], sizeof_w(mouse_msg[0]), L"%%i%%%% - %ls",
plat_get_string(IDS_2077));
plat_get_string(STRING_MOUSE_CAPTURE));
swprintf(mouse_msg[1], sizeof_w(mouse_msg[1]), L"%%i%%%% - %ls",
(mouse_get_buttons() > 2) ? plat_get_string(IDS_2078) : plat_get_string(IDS_2079));
(mouse_get_buttons() > 2) ? plat_get_string(STRING_MOUSE_RELEASE) : plat_get_string(STRING_MOUSE_RELEASE_MMB));
wcsncpy(mouse_msg[2], L"%i%%", sizeof_w(mouse_msg[2]));
#else
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(IDS_2077));
plat_get_string(STRING_MOUSE_CAPTURE));
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(IDS_2078) : plat_get_string(IDS_2079));
(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%%%% - %ls - %ls/%ls",
EMU_NAME_W, EMU_VERSION_FULL_W, wmachine, wcpufamily, wcpu);
#endif

View File

@@ -226,8 +226,6 @@ endif()
if (QT)
add_subdirectory(qt)
elseif(WIN32)
add_subdirectory(win)
else()
add_compile_definitions(USE_SDL_UI)
add_subdirectory(unix)

View File

@@ -1,200 +0,0 @@
#
# 86Box A hypervisor and IBM PC system emulator that specializes in
# running old operating systems and software designed for IBM
# PC systems and compatibles from 1981 through fairly recent
# system designs based on the PCI bus.
#
# This file is part of the 86Box distribution.
#
# Prefix for localizing the general Makefile.mingw for local
# settings, so we can avoid changing the main one for all of
# our local setups.
#
# Authors: Fred N. van Kempen, <decwiz@yahoo.com>
#
#########################################################################
# Anything here will override defaults in Makefile.MinGW. #
#########################################################################
# Name of the executable.
#PROG := 86box.exe
# Various compile-time options.
# -DROM_TRACE=0xc800 traces ROM access from segment C800
# -DIO_TRACE=0x66 traces I/O on port 0x66
# -DIO_CATCH enables I/O range catch logs
STUFF :=
# Add feature selections here.
# -DANSI_CFG forces the config file to ANSI encoding.
# Root logging:
# -DENABLE_ACPI_LOG=N sets logging level at N.
# -DENABLE_APM_LOG=N sets logging level at N.
# -DENABLE_BUGGER_LOG=N sets logging level at N.
# -DENABLE_CONFIG_LOG=N sets logging level at N.
# -DENABLE_DDMA_LOG=N sets logging level at N.
# -DENABLE_DEVICE_LOG=N sets logging level at N.
# -DENABLE_DMA_LOG=N sets logging level at N.
# -DENABLE_IO_LOG=N sets logging level at N.
# -DENABLE_IOAPIC_LOG=N sets logging level at N.
# -DENABLE_ISAMEM_LOG=N sets logging level at N.
# -DENABLE_ISARTC_LOG=N sets logging level at N.
# -DENABLE_KEYBOARD_AT_LOG=N sets logging level at N.
# -DENABLE_KEYBOARD_XT_LOG=N sets logging level at N.
# -DENABLE_LM75_LOG=N sets logging level at N.
# -DENABLE_LM78_LOG=N sets logging level at N.
# -DENABLE_MEM_LOG=N sets logging level at N.
# -DENABLE_MOUSE_LOG=N sets logging level at N.
# -DENABLE_MOUSE_BUS_LOG=N sets logging level at N.
# -DENABLE_MOUSE_PS2_LOG=N sets logging level at N.
# -DENABLE_MOUSE_SERIAL_LOG=N sets logging level at N.
# -DENABLE_NVR_LOG=N sets logging level at N.
# -DENABLE_PC_LOG=N sets logging level at N.
# -DENABLE_PCI_LOG=N sets logging level at N.
# -DENABLE_PIC_LOG=N sets logging level at N.
# -DENABLE_PIT_LOG=N sets logging level at N.
# -DENABLE_POSTCARD_LOG=N sets logging level at N.
# -DENABLE_ROM_LOG=N sets logging level at N.
# -DENABLE_SERIAL_LOG=N sets logging level at N.
# -DENABLE_SMBUS_LOG=N sets logging level at N.
# -DENABLE_SMBUS_PIIX4_LOG=N sets logging level at N.
# -DENABLE_SPD_LOG=N sets logging level at N.
# -DENABLE_USB_LOG=N sets logging level at N.
# -DENABLE_VNC_LOG=N sets logging level at N.
# -DENABLE_VNC_KEYMAP_LOG=N sets logging level at N.
# cdrom/ logging:
# -DENABLE_CDROM_LOG=N sets logging level at N.
# -DENABLE_CDROM_IMAGE_LOG=N sets logging level at N.
# -DENABLE_CDROM_IMAGE_BACKEND_LOG=N sets logging level at N.
# chipset/ logging:
# -DENABLE_I420EX_LOG=N sets logging level at N.
# -DENABLE_NEAT_LOG=N sets logging level at N.
# -DENABLE_OPTI495_LOG=N sets logging level at N.
# -DENABLE_OPTI895_LOG=N sets logging level at N.
# -DENABLE_PIIX_LOG=N sets logging level at N.
# -DENABLE_SIO_LOG=N sets logging level at N.
# -DENABLE_SIS_85C496_LOG=N sets logging level at N.
# codegen/, codegen_new/, cpu/ logging:
# -DENABLE_X86SEG_LOG=N sets logging level at N.
# cpu/ logging:
# -DENABLE_386_LOG=N sets logging level at N.
# -DENABLE_386_COMMON_LOG=N sets logging level at N.
# -DENABLE_386_DYNAREC_LOG=N sets logging level at N.
# -DENABLE_808X_LOG=N sets logging level at N.
# -DENABLE_CPU_LOG=N sets logging level at N.
# -DENABLE_FPU_LOG=N sets logging level at N.
# disk/ logging:
# -DENABLE_ESDI_AT_LOG=N sets logging level at N.
# -DENABLE_ESDI_MCA_LOG=N sets logging level at N.
# -DENABLE_HDC_LOG=N sets logging level at N.
# -DENABLE_HDD_IMAGE_LOG=N sets logging level at N.
# -DENABLE_IDE_LOG=N sets logging level at N.
# -DENABLE_MO_LOG=N sets logging level at N.
# -DENABLE_SFF_LOG=N sets logging level at N.
# -DENABLE_ST506_AT_LOG=N sets logging level at N.
# -DENABLE_ST506_XT_LOG=N sets logging level at N.
# -DENABLE_XTA_LOG=N sets logging level at N.
# -DENABLE_ZIP_LOG=N sets logging level at N.
# floppy/ logging:
# -DENABLE_D86F_LOG=N sets logging level at N.
# -DENABLE_FDC_LOG=N sets logging level at N.
# -DENABLE_FDD_LOG=N sets logging level at N.
# -DENABLE_FDI_LOG=N sets logging level at N.
# -DENABLE_FDI2RAW_LOG=N sets logging level at N.
# -DENABLE_IMD_LOG=N sets logging level at N.
# -DENABLE_IMG_LOG=N sets logging level at N.
# -DENABLE_JSON_LOG=N sets logging level at N.
# -DENABLE_MFM_LOG=N sets logging level at N.
# -DENABLE_TD0_LOG=N sets logging level at N.
# machine/ logging:
# -DENABLE_AMSTRAD_LOG=N sets logging level at N.
# -DENABLE_EUROPC_LOG=N sets logging level at N.
# -DENABLE_M24VID_LOG=N sets logging level at N.
# -DENABLE_MACHINE_LOG=N sets logging level at N.
# -DENABLE_PS1_HDC_LOG=N sets logging level at N.
# -DENABLE_PS2_MCA_LOG=N sets logging level at N.
# -DENABLE_TANDY_LOG=N sets logging level at N.
# -DENABLE_T1000_LOG=N sets logging level at N.
# -DENABLE_T3100E_LOG=N sets logging level at N.
# network/ logging:
# -DENABLE_3COM503_LOG=N sets logging level at N.
# -DENABLE_DP8390_LOG=N sets logging level at N.
# -DENABLE_NETWORK_LOG=N sets logging level at N.
# -DENABLE_NE2K_LOG=N sets logging level at N.
# -DENABLE_PCAP_LOG=N sets logging level at N.
# -DENABLE_PCNET_LOG=N sets logging level at N.
# -DENABLE_SLIRP_LOG=N sets logging level at N.
# -DENABLE_WD_LOG=N sets logging level at N.
# printer/ logging:
# -DENABLE_ESCP_LOG=N sets logging level at N.
# scsi/ logging:
# -DENABLE_AHA154X_LOG=N sets logging level at N.
# -DENABLE_BUSLOGIC_LOG=N sets logging level at N.
# -DENABLE_NCR5380_LOG=N sets logging level at N.
# -DENABLE_NCR53C8XX_LOG=N sets logging level at N.
# -DENABLE_SCSI_CDROM_LOG=N sets logging level at N.
# -DENABLE_SCSI_DISK_LOG=N sets logging level at N.
# -DENABLE_SPOCK_LOG=N sets logging level at N.
# -DENABLE_X54X_LOG=N sets logging level at N.
# sound/ logging:
# -DENABLE_ADLIB_LOG=N sets logging level at N.
# -DENABLE_AUDIOPCI_LOG=N sets logging level at N.
# -DENABLE_EMU8K_LOG=N sets logging level at N.
# -DENABLE_MPU401_LOG=N sets logging level at N.
# -DENABLE_PAS16_LOG=N sets logging level at N.
# -DENABLE_SB_LOG=N sets logging level at N.
# -DENABLE_SB_DSP_LOG=N sets logging level at N.
# -DENABLE_SOUND_LOG=N sets logging level at N.
# video/ logging:
# -DENABLE_ATI28800_LOG=N sets logging level at N.
# -DENABLE_MACH64_LOG=N sets logging level at N.
# -DENABLE_COMPAQ_CGA_LOG=N sets logging level at N.
# -DENABLE_ET4000W32_LOG=N sets logging level at N.
# -DENABLE_HT216_LOG=N sets logging level at N.
# -DENABLE_ICD2061_LOG=N sets logging level at N.
# -DENABLE_IM1024_LOG=N sets logging level at N.
# -DENABLE_PGC_LOG=N sets logging level at N.
# -DENABLE_S3_VIRGE_LOG=N sets logging level at N.
# -DENABLE_VID_TABLE_LOG=N sets logging level at N.
# -DENABLE_VIDEO_LOG=N sets logging level at N.
# -DENABLE_VOODOO_LOG=N sets logging level at N.
# win/ logging:
# -DENABLE_WIN_LOG=N sets logging level at N.
# -DENABLE_DISCORD_LOG=N sets logging level at N.
# -DENABLE_DYNLD_LOG=N sets logging level at N.
# -DENABLE_JOYSTICK_LOG=N sets logging level at N.
# -DENABLE_SDL_LOG=N sets logging level at N.
# -DENABLE_SETTINGS_LOG=N sets logging level at N.
EXTRAS :=
AUTODEP := n
DEBUG := n
OPTIM := n
X64 := n
RELEASE := n
USB := n
VNC := n
RDP := n
DEV_BUILD := n
DEV_BRANCH := n
CIRRUS := n
NE1000 := n
NV_RIVA := n
OPENAL := y
FLUIDSYNTH := y
MUNT := y
PAS16 := n
DYNAREC := y
#########################################################################
# Include the master Makefile.MinGW for the rest. #
#########################################################################
include win/Makefile.mingw
# End of Makefile.local.

View File

@@ -663,9 +663,9 @@ load_network(void)
if (nc->net_type == NET_TYPE_PCAP) {
if ((network_dev_to_id(p) == -1) || (network_ndev == 1)) {
if (network_ndev == 1)
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2095, (wchar_t *) IDS_2130);
ui_msgbox_header(MBX_ERROR, plat_get_string(STRING_PCAP_ERROR_NO_DEVICES), plat_get_string(STRING_PCAP_ERROR_DESC));
else if (network_dev_to_id(p) == -1)
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2096, (wchar_t *) IDS_2130);
ui_msgbox_header(MBX_ERROR, plat_get_string(STRING_PCAP_ERROR_INVALID_DEVICE), plat_get_string(STRING_PCAP_ERROR_DESC));
strcpy(nc->host_dev_name, "none");
} else
strncpy(nc->host_dev_name, p, sizeof(nc->host_dev_name) - 1);
@@ -710,9 +710,9 @@ load_network(void)
if (nc->net_type == NET_TYPE_PCAP) {
if ((network_dev_to_id(p) == -1) || (network_ndev == 1)) {
if (network_ndev == 1)
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2095, (wchar_t *) IDS_2130);
ui_msgbox_header(MBX_ERROR, plat_get_string(STRING_PCAP_ERROR_NO_DEVICES), plat_get_string(STRING_PCAP_ERROR_DESC));
else if (network_dev_to_id(p) == -1)
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2096, (wchar_t *) IDS_2130);
ui_msgbox_header(MBX_ERROR, plat_get_string(STRING_PCAP_ERROR_INVALID_DEVICE), plat_get_string(STRING_PCAP_ERROR_DESC));
strcpy(nc->host_dev_name, "none");
} else
strncpy(nc->host_dev_name, p, sizeof(nc->host_dev_name) - 1);
@@ -1570,9 +1570,10 @@ load_other_peripherals(void)
char *p;
char temp[512];
bugger_enabled = !!ini_section_get_int(cat, "bugger_enabled", 0);
postcard_enabled = !!ini_section_get_int(cat, "postcard_enabled", 0);
unittester_enabled = !!ini_section_get_int(cat, "unittester_enabled", 0);
bugger_enabled = !!ini_section_get_int(cat, "bugger_enabled", 0);
postcard_enabled = !!ini_section_get_int(cat, "postcard_enabled", 0);
unittester_enabled = !!ini_section_get_int(cat, "unittester_enabled", 0);
novell_keycard_enabled = !!ini_section_get_int(cat, "novell_keycard_enabled", 0);
for (uint8_t c = 0; c < ISAMEM_MAX; c++) {
sprintf(temp, "isamem%d_type", c);
@@ -2372,6 +2373,11 @@ save_other_peripherals(void)
else
ini_section_set_int(cat, "unittester_enabled", unittester_enabled);
if (novell_keycard_enabled == 0)
ini_section_delete_var(cat, "novell_keycard_enabled");
else
ini_section_set_int(cat, "novell_keycard_enabled", novell_keycard_enabled);
for (uint8_t c = 0; c < ISAMEM_MAX; c++) {
sprintf(temp, "isamem%d_type", c);
if (isamem_type[c] == 0)

View File

@@ -22,7 +22,8 @@ add_library(dev OBJECT bugger.c cassette.c cartridge.c hasp.c hwm.c hwm_lm75.c h
kbc_at.c kbc_at_dev.c
keyboard_at.c
mouse.c mouse_bus.c mouse_serial.c mouse_ps2.c nec_mate_unk.c phoenix_486_jumper.c
serial_passthrough.c)
serial_passthrough.c
novell_cardkey.c)
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_link_libraries(86Box atomic)

123
src/device/novell_cardkey.c Normal file
View File

@@ -0,0 +1,123 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Implementation of the Novell NetWare 2.x Key Card, which
* was used for anti-piracy protection.
*
*
* Authors: Cacodemon345
*
* Copyright 2024 Cacodemon345.
*/
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <86box/86box.h>
#include <86box/io.h>
#include <86box/device.h>
#include <86box/timer.h>
#include <86box/plat.h>
#include <86box/novell_cardkey.h>
typedef struct novell_cardkey_t
{
char serial_number_str[13];
} novell_cardkey_t;
static uint8_t
novell_cardkey_read(uint16_t port, void *priv)
{
novell_cardkey_t* cardkey = (novell_cardkey_t*)priv;
uint8_t val = 0x00;
switch (port) {
case 0x23A:
val = (((cardkey->serial_number_str[11] > 'A') ? ((cardkey->serial_number_str[11] - 'A') + 10) : (cardkey->serial_number_str[11] - '0')) << 4) | (((cardkey->serial_number_str[9] > 'A') ? ((cardkey->serial_number_str[9] - 'A') + 10) : (cardkey->serial_number_str[9] - '0')) << 4);
break;
case 0x23B:
val = (((cardkey->serial_number_str[10] > 'A') ? ((cardkey->serial_number_str[10] - 'A') + 10) : (cardkey->serial_number_str[10] - '0')) << 4) | (((cardkey->serial_number_str[8] > 'A') ? ((cardkey->serial_number_str[8] - 'A') + 10) : (cardkey->serial_number_str[8] - '0')) << 4);
break;
case 0x23C:
val = ((cardkey->serial_number_str[4] - '0') << 4) | ((cardkey->serial_number_str[2] - '0'));
break;
case 0x23D:
val = ((cardkey->serial_number_str[1] - '0') << 4) | ((cardkey->serial_number_str[6] - '0'));
break;
case 0x23E:
val = ((cardkey->serial_number_str[0] - '0') << 4) | ((cardkey->serial_number_str[7] - '0'));
break;
case 0x23F:
val = ((cardkey->serial_number_str[3] - '0') << 4) | ((cardkey->serial_number_str[5] - '0'));
break;
}
return val ^ 0xFF;
}
void* novell_cardkey_init(const device_t* info)
{
char sernumstr[13] = { '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 0 };
int i = 0;
novell_cardkey_t* cardkey = calloc(1, sizeof(novell_cardkey_t));
strncpy(sernumstr, device_get_config_string("serial_number"), sizeof(sernumstr) - 1);
for (i = 0; i < sizeof(sernumstr) - 4; i++) {
if (sernumstr[i] > '8' || sernumstr[i] < '0')
sernumstr[i] = '0';
}
if (sernumstr[8] > 'F' || sernumstr[8] < '0')
sernumstr[8] = '0';
if (sernumstr[9] > 'F' || sernumstr[9] < '0')
sernumstr[9] = '0';
if (sernumstr[10] > 'F' || sernumstr[10] < '0')
sernumstr[10] = '0';
if (sernumstr[11] > 'F' || sernumstr[11] < '0')
sernumstr[11] = '0';
sernumstr[12] = 0;
strncpy(cardkey->serial_number_str, sernumstr, sizeof(sernumstr));
io_sethandler(NOVELL_KEYCARD_ADDR, NOVELL_KEYCARD_ADDRLEN, novell_cardkey_read, NULL, NULL, NULL, NULL, NULL, cardkey);
return cardkey;
}
void novell_cardkey_close(void* priv)
{
free(priv);
}
static const device_config_t keycard_config[] = {
// clang-format off
{
.name = "serial_number",
.description = "Serial Number",
.type = CONFIG_STRING,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
};
const device_t novell_keycard_device = {
.name = "Novell Netware 2.x Key Card",
.internal_name = "mssystems",
.flags = DEVICE_ISA,
.local = 0,
.init = novell_cardkey_init,
.close = novell_cardkey_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = keycard_config
};

View File

@@ -432,6 +432,31 @@ serial_set_dcd(serial_t *dev, uint8_t enabled)
}
}
void
serial_set_ri(serial_t *dev, uint8_t enabled)
{
uint8_t prev_state = !!(dev->msr & 0x40);
if (dev->mctrl & 0x10)
return;
dev->msr &= ~0x40;
dev->msr |= (!!enabled) << 6;
dev->msr_set &= ~0x40;
dev->msr_set |= (!!enabled) << 6;
if (prev_state == 0 && (!!enabled) == 1) {
dev->msr |= 0x4;
dev->int_status |= SERIAL_INT_MSR;
serial_update_ints(dev);
}
}
int
serial_get_ri(serial_t *dev)
{
return !!(dev->msr & (1 << 6));
}
void
serial_set_clock_src(serial_t *dev, double clock_src)
{
@@ -570,6 +595,8 @@ serial_write(uint16_t addr, uint8_t val, void *priv)
serial_do_irq(dev, 0);
if ((val ^ dev->mctrl) & 0x10)
serial_reset_fifo(dev);
if (dev->sd && dev->sd->dtr_callback && (val ^ dev->mctrl) & 1)
dev->sd->dtr_callback(dev, val & 1, dev->sd->priv);
dev->mctrl = val;
if (val & 0x10) {
new_msr = (val & 0x0c) << 4;
@@ -797,6 +824,25 @@ serial_attach_ex(int port,
return sd->serial;
}
serial_t *
serial_attach_ex_2(int port,
void (*rcr_callback)(struct serial_s *serial, void *priv),
void (*dev_write)(struct serial_s *serial, void *priv, uint8_t data),
void (*dtr_callback)(struct serial_s *serial, int status, void *priv),
void *priv)
{
serial_device_t *sd = &serial_devices[port];
sd->rcr_callback = rcr_callback;
sd->dtr_callback = dtr_callback;
sd->dev_write = dev_write;
sd->transmit_period_callback = NULL;
sd->lcr_callback = NULL;
sd->priv = priv;
return sd->serial;
}
static void
serial_speed_changed(void *priv)
{

View File

@@ -50,51 +50,32 @@ hdd_string_to_bus(char *str, int cdrom)
if (!strcmp(str, "none"))
return HDD_BUS_DISABLED;
if (!strcmp(str, "mfm") || !strcmp(str, "rll")) {
if (!strcmp(str, "mfm")) {
if (cdrom) {
no_cdrom:
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2131, (wchar_t *) IDS_4099);
ui_msgbox_header(MBX_ERROR, plat_get_string(STRING_INVALID_CONFIG), plat_get_string(STRING_NO_ST506_ESDI_CDROM));
return 0;
}
return HDD_BUS_MFM;
}
/* FIXME: delete 'rll' in a year or so.. --FvK */
if (!strcmp(str, "esdi") || !strcmp(str, "rll")) {
if (!strcmp(str, "esdi")) {
if (cdrom)
goto no_cdrom;
return HDD_BUS_ESDI;
}
if (!strcmp(str, "ide_pio_only"))
return HDD_BUS_IDE;
if (!strcmp(str, "ide"))
return HDD_BUS_IDE;
if (!strcmp(str, "atapi_pio_only"))
return HDD_BUS_ATAPI;
if (!strcmp(str, "atapi"))
return HDD_BUS_ATAPI;
if (!strcmp(str, "eide"))
return HDD_BUS_IDE;
if (!strcmp(str, "xta"))
return HDD_BUS_XTA;
if (!strcmp(str, "atide"))
return HDD_BUS_IDE;
if (!strcmp(str, "ide_pio_and_dma"))
return HDD_BUS_IDE;
if (!strcmp(str, "atapi_pio_and_dma"))
return HDD_BUS_ATAPI;
if (!strcmp(str, "scsi"))
return HDD_BUS_SCSI;

View File

@@ -124,6 +124,7 @@ extern int video_framerate; /* (C) video */
extern int gfxcard[2]; /* (C) graphics/video card */
extern char video_shader[512]; /* (C) video */
extern int bugger_enabled; /* (C) enable ISAbugger */
extern int novell_keycard_enabled; /* (C) enable Novell NetWare 2.x key card emulation. */
extern int postcard_enabled; /* (C) enable POST card */
extern int unittester_enabled; /* (C) enable unit tester device */
extern int isamem_type[]; /* (C) enable ISA mem cards */

View File

@@ -1,3 +1,6 @@
#ifndef FIFO_H
#define FIFO_H
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
@@ -71,3 +74,5 @@ extern void fifo_reset(void *priv);
extern void fifo_reset_evt(void *priv);
extern void fifo_close(void *priv);
extern void *fifo_init(int len);
#endif /*FIFO_H*/

View File

@@ -1,283 +0,0 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Definitions for the language management module.
*
*
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
*
* Copyright 2017-2018 Fred N. van Kempen.
* Copyright 2022 Jasmine Iwanek.
*/
#ifndef LANG_UAGE_H
#define LANG_UAGE_H
/* String IDs. */
#define IDS_STRINGS 2048 // "86Box"
#define IDS_2049 2049 // "Error"
#define IDS_2050 2050 // "Fatal error"
#define IDS_2051 2051 // " - PAUSED"
#define IDS_2052 2052 // "Press Ctrl+Alt+PgDn..."
#define IDS_2053 2053 // "Speed"
#define IDS_2054 2054 // "ZIP %i (%03i): %ls"
#define IDS_2055 2055 // "ZIP images (*.IM?)\0*.IM..."
#define IDS_2056 2056 // "No usable ROM images found!"
#define IDS_2057 2057 // "(empty)"
#define IDS_2058 2058 // "ZIP images (*.IM?)\0*.IM..."
#define IDS_2059 2059 // "(Turbo)"
#define IDS_2060 2060 // "On"
#define IDS_2061 2061 // "Off"
#define IDS_2062 2062 // "All floppy images (*.DSK..."
#define IDS_2063 2063 // "Machine ""%hs"" is not..."
#define IDS_2064 2064 // "Video card ""%hs"" is not..."
#define IDS_2065 2065 // "Machine"
#define IDS_2066 2066 // "Display"
#define IDS_2067 2067 // "Input devices"
#define IDS_2068 2068 // "Sound"
#define IDS_2069 2069 // "Network"
#define IDS_2070 2070 // "Ports (COM & LPT)"
#define IDS_2071 2071 // "Storage controllers"
#define IDS_2072 2072 // "Hard disks"
#define IDS_2073 2073 // "Floppy and CD-ROM drives"
#define IDS_2074 2074 // "Other removable devices"
#define IDS_2075 2075 // "Other peripherals"
#define IDS_2076 2076 // "Surface-based images (*.8.."
#define IDS_2077 2077 // "Click to capture mouse"
#define IDS_2078 2078 // "Press F12-F8 to release mouse"
#define IDS_2079 2079 // "Press F12-F8 or middle button.."
#define IDS_2081 2081 // "Bus"
#define IDS_BUS IDS_2081 // "Bus"
#define IDS_2082 2082 // "File"
#define IDS_2083 2083 // "C"
#define IDS_2084 2084 // "H"
#define IDS_2085 2085 // "S"
#define IDS_2086 2086 // "MB"
#define IDS_MB IDS_2086 // "MB"
#define IDS_2087 2087 // "Speed"
#define IDS_2088 2088 // "Check BPB"
#define IDS_BPB IDS_2088 // "Check BPB"
#define IDS_2089 2089 // "KB"
#define IDS_KB IDS_2089 // "KB"
#define IDS_2090 2090 // "Could not initialize the video..."
#define IDS_2091 2091 // "Default"
#define IDS_DEFAULT IDS_2091 // "Default"
#define IDS_2092 2092 // "%i Wait state(s)"
#define IDS_WS IDS_2092 // "%i Wait state(s)"
#define IDS_2093 2093 // "Type"
#define IDS_TYPE IDS_2093 // "Type"
/* TODO */
#define IDS_2094 2094 // "PCap failed to set up.."
#define IDS_2095 2095 // "No PCap devices found"
#define IDS_2096 2096 // "Invalid PCap device"
#define IDS_2097 2097 // "Standard 2-button joystick(s)"
#define IDS_2098 2098 // "Standard 4-button joystick"
#define IDS_2099 2099 // "Standard 6-button joystick"
#define IDS_2100 2100 // "Standard 8-button joystick"
#define IDS_2101 2101 // "CH Flightstick Pro"
#define IDS_2102 2102 // "Microsoft SideWinder Pad"
#define IDS_2103 2103 // "Thrustmaster Flight Cont.."
#define IDS_2104 2104 // "None"
#define IDS_2105 2105 // "Unable to load keyboard..."
#define IDS_2106 2106 // "Unable to register raw input."
#define IDS_2107 2107 // "%u"
#define IDS_2108 2108 // "%u MB (CHS: %i, %i, %i)"
#define IDS_2109 2109 // "Floppy %i (%s): %ls"
#define IDS_2110 2110 // "All floppy images (*.0??;*.."
#define IDS_2113 2113 // "Are you sure you want to..."
#define IDS_2114 2114 // "Are you sure you want to..."
#define IDS_2115 2115 // "Unable to initialize Ghostscript..."
#define IDS_2116 2116 // "MO %i (%03i): %ls"
#define IDS_2117 2117 // "MO images (*.IM?)\0*.IM..."
#define IDS_2118 2118 // "Welcome to 86Box!"
#define IDS_2119 2119 // "Internal controller"
#define IDS_2120 2120 // "Exit"
#define IDS_2121 2121 // "No ROMs found"
#define IDS_2122 2122 // "Do you want to save the settings?"
#define IDS_2123 2123 // "This will hard reset the emulated..."
#define IDS_2124 2124 // "Save"
#define IDS_2125 2125 // "About 86Box"
#define IDS_2126 2126 // "86Box v" EMU_VERSION
#define IDS_2127 2127 // "An emulator of old computers..."
#define IDS_2128 2128 // "OK"
#define IDS_2129 2129 // "Hardware not available"
#define IDS_2130 2130 // "Make sure " LIB_NAME_PCAP "..."
#define IDS_2131 2131 // "Invalid configuration"
#define IDS_2133 2133 // LIB_NAME_GS " is required for...
#define IDS_2135 2135 // "Entering fullscreen mode"
#define IDS_2136 2136 // "Don't show this message again"
#define IDS_2137 2137 // "Don't exit"
#define IDS_2138 2138 // "Reset"
#define IDS_2139 2139 // "Don't reset"
#define IDS_2140 2140 // "MO images (*.IM?)\0*.IM?..."
#define IDS_2141 2141 // "CD-ROM images (*.ISO;*.CU.."
#define IDS_2142 2142 // "%hs Device Configuration"
#define IDS_2143 2143 // "Monitor in sleep mode"
#define IDS_2144 2144 // "OpenGL Shaders (*.GLSL)..."
#define IDS_2145 2145 // "OpenGL options"
#define IDS_2146 2146 // "You are loading an unsupported..."
#define IDS_2147 2147 // "CPU type filtering based on..."
#define IDS_2148 2148 // "Continue"
#define IDS_2149 2149 // "Cassette: %s"
#define IDS_2150 2150 // "Cassette images (*.PCM;*.RAW;*..."
#define IDS_2151 2151 // "Cartridge %i: %ls"
#define IDS_2152 2152 // "Cartridge images (*.JRC)\0*.JRC\0..."
#define IDS_2153 2153 // "Error initializing renderer"
#define IDS_2154 2154 // "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
#define IDS_2155 2155 // "Resume execution"
#define IDS_2156 2156 // "Pause execution"
#define IDS_2157 2157 // "Press Ctrl+Alt+Del"
#define IDS_2158 2158 // "Press Ctrl+Alt+Esc"
#define IDS_2159 2159 // "Hard reset"
#define IDS_2160 2160 // "ACPI shutdown"
#define IDS_2161 2161 // "Settings"
#define IDS_2162 2162 // "Early drive"
#define IDS_2163 2163 // "no dynarec"
#define IDS_2164 2164 // "old dynarec"
#define IDS_2165 2165 // "new dynarec"
#ifdef USE_DYNAREC
# ifdef USE_NEW_DYNAREC
# define IDS_DYNAREC IDS_2165
# else
# define IDS_DYNAREC IDS_2164
# endif
#else
# define IDS_DYNAREC IDS_2163
#endif
#define IDS_2166 2166 // "Video card #2 ""%hs"" is not..."
#define IDS_2167 2167 // "Network driver initialization failed"
#define IDS_2168 2168 // "The network configuration will be switched to the null driver"
#define IDS_4096 4096 // "Hard disk (%s)"
#define IDS_4097 4097 // "%01i:%01i"
#define IDS_4098 4098 // "%i"
#define IDS_4099 4099 // "MFM/RLL or ESDI CD-ROM driv.."
#define IDS_4100 4100 // "Custom..."
#define IDS_4101 4101 // "Custom (large)..."
#define IDS_4102 4102 // "Add New Hard Disk"
#define IDS_4103 4103 // "Add Existing Hard Disk"
#define IDS_4104 4104 // "HDI disk images cannot be..."
#define IDS_4105 4105 // "Disk images cannot be larger..."
#define IDS_4106 4106 // "Hard disk images (*.HDI;*.HD.."
#define IDS_4107 4107 // "Unable to open the file for read"
#define IDS_4108 4108 // "Unable to open the file for write"
#define IDS_4109 4109 // "HDI or HDX image with a sect.."
#define IDS_4110 4110 // "USB is not yet supported"
#define IDS_4111 4111 // "Disk image file already exists"
#define IDS_4112 4112 // "Please specify a valid file name."
#define IDS_4113 4113 // "Remember to partition and fo.."
#define IDS_4114 4114 // "Make sure the file exists and..."
#define IDS_4115 4115 // "Make sure the file is being..."
#define IDS_4116 4116 // "Disk image too large"
#define IDS_4117 4117 // "Remember to partition and format..."
#define IDS_4118 4118 // "The selected file will be..."
#define IDS_4119 4119 // "Unsupported disk image"
#define IDS_4120 4120 // "Overwrite"
#define IDS_4121 4121 // "Don't overwrite"
#define IDS_4122 4122 // "Raw image (.img)"
#define IDS_4123 4123 // "HDI image (.hdi)"
#define IDS_4124 4124 // "HDX image (.hdx)"
#define IDS_4125 4125 // "Fixed-size VHD (.vhd)"
#define IDS_4126 4126 // "Dynamic-size VHD (.vhd)"
#define IDS_4127 4127 // "Differencing VHD (.vhd)"
#define IDS_4128 4128 // "Large blocks (2 MB)"
#define IDS_4129 4129 // "Small blocks (512 KB)"
#define IDS_4130 4130 // "VHD files (*.VHD)\0*.VHD\0All..."
#define IDS_4131 4131 // "Select the parent VHD"
#define IDS_4132 4132 // "This could mean that the parent..."
#define IDS_4133 4133 // "Parent and child disk timestamps..."
#define IDS_4134 4134 // "Could not fix VHD timestamp."
#define IDS_4135 4135 // "%01i:%02i"
#define IDS_4352 4352 // "MFM/RLL"
#define IDS_4353 4353 // "XT IDE"
#define IDS_4354 4354 // "ESDI"
#define IDS_4355 4355 // "IDE"
#define IDS_4356 4356 // "ATAPI"
#define IDS_4357 4357 // "SCSI"
#define IDS_4608 4608 // "MFM/RLL (%01i:%01i)"
#define IDS_4609 4609 // "XT IDE (%01i:%01i)"
#define IDS_4610 4610 // "ESDI (%01i:%01i)"
#define IDS_4611 4611 // "IDE (%01i:%01i)"
#define IDS_4612 4612 // "ATAPI (%01i:%01i)"
#define IDS_4613 4613 // "SCSI (%02i:%02i)"
#define IDS_5120 5120 // "CD-ROM %i (%s): %s"
#define IDS_5376 5376 // "Disabled"
#define IDS_5377 5377 // <Reserved>
#define IDS_5378 5378 // <Reserved>
#define IDS_5379 5379 // <Reserved>
#define IDS_5380 5380 // <Reserved>
#define IDS_5381 5381 // "ATAPI"
#define IDS_5382 5382 // "SCSI"
#define IDS_5632 5632 // "Disabled"
#define IDS_5633 5633 // <Reserved>
#define IDS_5634 5634 // <Reserved>
#define IDS_5635 5635 // <Reserved>
#define IDS_5636 5636 // <Reserved>
#define IDS_5637 5637 // "ATAPI (%01i:%01i)"
#define IDS_5638 5638 // "SCSI (%02i:%02i)"
#define IDS_5888 5888 // "160 kB"
#define IDS_5889 5889 // "180 kB"
#define IDS_5890 5890 // "320 kB"
#define IDS_5891 5891 // "360 kB"
#define IDS_5892 5892 // "640 kB"
#define IDS_5893 5893 // "720 kB"
#define IDS_5894 5894 // "1.2 MB"
#define IDS_5895 5895 // "1.25 MB"
#define IDS_5896 5896 // "1.44 MB"
#define IDS_5897 5897 // "DMF (cluster 1024)"
#define IDS_5898 5898 // "DMF (cluster 2048)"
#define IDS_5899 5899 // "2.88 MB"
#define IDS_5900 5900 // "ZIP 100"
#define IDS_5901 5901 // "ZIP 250"
#define IDS_5902 5902 // "3.5\" 128 MB (ISO 10090)"
#define IDS_5903 5903 // "3.5\" 230 MB (ISO 13963)"
#define IDS_5904 5904 // "3.5\" 540 MB (ISO 15498)"
#define IDS_5905 5905 // "3.5\" 640 MB (ISO 15498)"
#define IDS_5906 5906 // "3.5\" 1.3 GB (GigaMO)"
#define IDS_5907 5907 // "3.5\" 2.3 GB (GigaMO 2)"
#define IDS_5908 5908 // "5.25\" 600 MB"
#define IDS_5909 5909 // "5.25\" 650 MB"
#define IDS_5910 5910 // "5.25\" 1 GB"
#define IDS_5911 5911 // "5.25\" 1.3 GB"
#define IDS_6144 6144 // "Perfect RPM"
#define IDS_6145 6145 // "1%% below perfect RPM"
#define IDS_6146 6146 // "1.5%% below perfect RPM"
#define IDS_6147 6147 // "2%% below perfect RPM"
#define IDS_7168 7168 // "(System Default)"
#define IDS_LANG_ENUS IDS_7168
#define STR_NUM_2048 121
// UNUSED: #define STR_NUM_3072 11
#define STR_NUM_4096 40
#define STR_NUM_4352 6
#define STR_NUM_4608 6
#define STR_NUM_5120 1
#define STR_NUM_5376 7
#define STR_NUM_5632 7
#define STR_NUM_5888 24
#define STR_NUM_6144 4
#define STR_NUM_7168 1
#endif /*LANG_UAGE_H*/

View File

@@ -451,6 +451,7 @@ extern int machine_at_quadt386sx_init(const machine_t *);
extern int machine_at_award286_init(const machine_t *);
extern int machine_at_gdc212m_init(const machine_t *);
extern int machine_at_gw286ct_init(const machine_t *);
extern int machine_at_senor_scat286_init(const machine_t *);
extern int machine_at_super286c_init(const machine_t *);
extern int machine_at_super286tr_init(const machine_t *);
extern int machine_at_spc4200p_init(const machine_t *);
@@ -492,6 +493,7 @@ extern int machine_at_ecs386_init(const machine_t *);
extern int machine_at_spc6000a_init(const machine_t *);
extern int machine_at_micronics386_init(const machine_t *);
extern int machine_at_ecs386v_init(const machine_t *);
extern int machine_at_tandy4000_init(const machine_t *);
extern int machine_at_rycleopardlx_init(const machine_t *);

View File

@@ -225,6 +225,9 @@ extern const device_t pcnet_am79c970a_device;
extern const device_t pcnet_am79c973_device;
extern const device_t pcnet_am79c973_onboard_device;
/* Modem */
extern const device_t modem_device;
/* PLIP */
#ifdef EMU_LPT_H
extern const lpt_device_t lpt_plip_device;

View File

@@ -0,0 +1,37 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Implementation of the Novell NetWare 2.x Key Card, which
* was used for anti-piracy protection.
*
*
* Authors: Cacodemon345
*
* Copyright 2024 Cacodemon345.
*/
#ifndef NOVELL_KEYCARD_H
#define NOVELL_KEYCARD_H
/* I/O port range used. */
#define NOVELL_KEYCARD_ADDR 0x23a
#define NOVELL_KEYCARD_ADDRLEN 6
#ifdef __cplusplus
extern "C" {
#endif
/* Global variables. */
extern const device_t novell_keycard_device;
/* Functions. */
#ifdef __cplusplus
}
#endif
#endif /*BUGGER_H*/

View File

@@ -42,6 +42,7 @@ typedef struct ctr_t {
int state;
int null_count;
int do_read_status;
int enable;
union {
int32_t count;
@@ -55,9 +56,11 @@ typedef struct ctr_t {
};
uint32_t l;
uint32_t lback;
uint32_t lback2;
void (*load_func)(uint8_t new_m, int new_count);
void (*out_func)(int new_out, int old_out);
void (*out_func)(int new_out, int old_out, void *priv);
} ctr_t;
typedef struct PIT {
@@ -68,8 +71,14 @@ typedef struct PIT {
ctr_t counters[3];
uint8_t ctrl;
uint64_t pit_const;
void *dev_priv;
} pit_t;
extern pit_t *ext_pit;
enum {
PIT_8253 = 0,
PIT_8254 = 1,
@@ -87,10 +96,11 @@ typedef struct pit_intf_t {
/* Sets if a counter's CLOCK input is from the timer or not - used by PCjr. */
void (*set_using_timer)(void *data, int counter_id, int using_timer);
/* Sets a counter's OUT output handler. */
void (*set_out_func)(void *data, int counter_id, void (*func)(int new_out, int old_out));
void (*set_out_func)(void *data, int counter_id, void (*func)(int new_out, int old_out, void *priv));
/* Sets a counter's load count handler. */
void (*set_load_func)(void *data, int counter_id, void (*func)(uint8_t new_m, int new_count));
void (*ctr_clock)(void *data, int counter_id);
void (*set_pit_const)(void *data, uint64_t pit_const);
void *data;
} pit_intf_t;
@@ -102,6 +112,7 @@ extern double PCICLK;
extern double AGPCLK;
extern uint64_t PITCONST;
extern uint64_t PAS16CONST;
extern uint64_t ISACONST;
extern uint64_t CGACONST;
extern uint64_t MDACONST;
@@ -112,21 +123,29 @@ extern uint64_t RTCCONST;
extern int refresh_at_enable;
/* Sets a counter's CLOCK input. */
extern void pit_ctr_set_clock(ctr_t *ctr, int clock);
extern void pit_change_pas16_const(double prescale);
extern pit_t *pit_common_init(int type, void (*out0)(int new_out, int old_out), void (*out1)(int new_out, int old_out));
extern void pit_set_pit_const(void *data, uint64_t pit_const);
/* Sets a counter's CLOCK input. */
extern void pit_ctr_set_clock(ctr_t *ctr, int clock, void *priv);
extern void pit_ctr_set_out_func(void *data, int counter_id, void (*func)(int new_out, int old_out, void *priv));
extern void pit_ctr_set_using_timer(void *data, int counter_id, int using_timer);
extern pit_t *pit_common_init(int type, void (*out0)(int new_out, int old_out, void *priv), void (*out1)(int new_out, int old_out, void *priv));
extern pit_t *pit_ps2_init(int type);
extern void pit_reset(pit_t *dev);
extern void pit_irq0_timer_ps2(int new_out, int old_out);
extern void pit_irq0_timer_ps2(int new_out, int old_out, void *priv);
extern void pit_refresh_timer_xt(int new_out, int old_out);
extern void pit_refresh_timer_at(int new_out, int old_out);
extern void pit_refresh_timer_xt(int new_out, int old_out, void *priv);
extern void pit_refresh_timer_at(int new_out, int old_out, void *priv);
extern void pit_speaker_timer(int new_out, int old_out);
extern void pit_speaker_timer(int new_out, int old_out, void *priv);
extern void pit_nmi_timer_ps2(int new_out, int old_out);
extern void pit_nmi_timer_ps2(int new_out, int old_out, void *priv);
extern void pit_set_clock(uint32_t clock);
extern void pit_handler(int set, uint16_t base, int size, void *priv);
@@ -135,6 +154,7 @@ extern uint8_t pit_read_reg(void *priv, uint8_t reg);
#ifdef EMU_DEVICE_H
extern const device_t i8253_device;
extern const device_t i8253_ext_io_device;
extern const device_t i8254_device;
extern const device_t i8254_sec_device;
extern const device_t i8254_ext_io_device;

View File

@@ -56,10 +56,14 @@ typedef struct ctrf_t {
};
uint32_t l;
uint64_t pit_const;
pc_timer_t timer;
void (*load_func)(uint8_t new_m, int new_count);
void (*out_func)(int new_out, int old_out);
void (*out_func)(int new_out, int old_out, void *priv);
void *priv;
} ctrf_t;
typedef struct pitf_t {
@@ -69,6 +73,8 @@ typedef struct pitf_t {
uint8_t ctrl;
} pitf_t;
extern void pitf_set_pit_const(void *data, uint64_t pit_const);
extern uint8_t pitf_read_reg(void *priv, uint8_t reg);
extern const pit_intf_t pit_fast_intf;

View File

@@ -30,7 +30,25 @@
#endif
/* String ID numbers. */
#include <86box/language.h>
enum {
STRING_MOUSE_CAPTURE, /* "Click to capture mouse" */
STRING_MOUSE_RELEASE, /* "Press F8+F12/Ctrl+End to release mouse" */
STRING_MOUSE_RELEASE_MMB, /* "Press F8+F12/Ctrl+End or middle button to release mouse" */
STRING_INVALID_CONFIG, /* "Invalid configuration" */
STRING_NO_ST506_ESDI_CDROM, /* "MFM/RLL or ESDI CD-ROM drives never existed" */
STRING_NET_ERROR, /* "Failed to initialize network driver" */
STRING_NET_ERROR_DESC, /* "The network configuration will be switched..." */
STRING_PCAP_ERROR_NO_DEVICES, /* "No PCap devices found" */
STRING_PCAP_ERROR_INVALID_DEVICE, /* "Invalid PCap device" */
STRING_PCAP_ERROR_DESC, /* "Make sure libpcap is installed..." */
STRING_GHOSTSCRIPT_ERROR_TITLE, /* "Unable to initialize Ghostscript" */
STRING_GHOSTSCRIPT_ERROR_DESC, /* "gsdll32.dll/gsdll64.dll/libgs is required..." */
STRING_HW_NOT_AVAILABLE_TITLE, /* "Hardware not available" */
STRING_HW_NOT_AVAILABLE_MACHINE, /* "Machine \"%hs\" is not available..." */
STRING_HW_NOT_AVAILABLE_VIDEO, /* "Video card \"%hs\" is not available..." */
STRING_HW_NOT_AVAILABLE_VIDEO2, /* "Video card #2 \"%hs\" is not available..." */
STRING_MONITOR_SLEEP /* "Monitor in sleep mode" */
};
/* The Win32 API uses _wcsicmp. */
#ifdef _WIN32
@@ -113,7 +131,6 @@ extern int hide_status_bar;
extern int hide_tool_bar;
/* System-related functions. */
extern char *fix_exe_path(char *str);
extern FILE *plat_fopen(const char *path, const char *mode);
extern FILE *plat_fopen64(const char *path, const char *mode);
extern void plat_remove(char *path);
@@ -129,29 +146,19 @@ extern void *plat_mmap(size_t size, uint8_t executable);
extern void plat_munmap(void *ptr, size_t size);
extern uint64_t plat_timer_read(void);
extern uint32_t plat_get_ticks(void);
extern uint32_t plat_get_micro_ticks(void);
extern void plat_delay_ms(uint32_t count);
extern void plat_pause(int p);
extern void plat_mouse_capture(int on);
extern int plat_vidapi(char *name);
extern char *plat_vidapi_name(int api);
extern int plat_setvid(int api);
extern void plat_vidsize(int x, int y);
extern void plat_setfullscreen(int on);
extern void plat_resize_monitor(int x, int y, int monitor_index);
extern void plat_resize(int x, int y, int monitor_index);
extern void plat_resize_request(int x, int y, int monitor_index);
extern void plat_resize(int x, int y);
extern void plat_vidapi_enable(int enabled);
extern void plat_vidapi_reload(void);
extern void plat_vid_reload_options(void);
extern uint32_t plat_language_code(char *langcode);
extern void plat_language_code_r(uint32_t lcid, char *outbuf, int len);
extern void plat_get_cpu_string(char *outbuf, uint8_t len);
extern double plat_get_dpi(void);
extern void plat_set_thread_name(void *thread, const char *name);
/* Resource management. */
extern void set_language(uint32_t id);
extern wchar_t *plat_get_string(int id);
/* Emulator start/stop support functions. */
@@ -183,17 +190,11 @@ extern void ioctl_close(uint8_t id);
/* Other stuff. */
extern void startblit(void);
extern void endblit(void);
extern void take_screenshot(void);
/* Conversion between UTF-8 and UTF-16. */
extern size_t mbstoc16s(uint16_t dst[], const char src[], int len);
extern size_t c16stombs(char dst[], const uint16_t src[], int len);
#ifdef MTR_ENABLED
extern void init_trace(void);
extern void shutdown_trace(void);
#endif
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,24 @@
#ifndef _WIN32
#define SOCKET int
#else
#include <winsock2.h>
#include <ws2tcpip.h>
#endif
enum net_socket_types
{
/* Only TCP is supported for now. */
NET_SOCKET_TCP
};
SOCKET plat_netsocket_create(int type);
SOCKET plat_netsocket_create_server(int type, unsigned short port);
void plat_netsocket_close(SOCKET socket);
SOCKET plat_netsocket_accept(SOCKET socket);
int plat_netsocket_connected(SOCKET socket); /* Returns -1 on trouble. */
int plat_netsocket_connect(SOCKET socket, const char* hostname, unsigned short port);
/* Returns 0 in case of inability to send. -1 in case of errors. */
int plat_netsocket_send(SOCKET socket, const unsigned char* data, unsigned int size, int *wouldblock);
int plat_netsocket_receive(SOCKET socket, unsigned char* data, unsigned int size, int *wouldblock);

View File

@@ -1,524 +0,0 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Windows resource defines.
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
* David Hrdlička, <hrdlickadavid@outlook.com>
*
* Copyright 2008-2019 Sarah Walker.
* Copyright 2016-2019 Miran Grca.
* Copyright 2018-2019 David Hrdlička.
* Copyright 2021-2022 Jasmine Iwanek.
*/
#ifndef WIN_RESOURCE_H
#define WIN_RESOURCE_H
/* Dialog IDs. */
#define DLG_ABOUT 101 /* top-level dialog */
#define DLG_STATUS 102 /* top-level dialog */
#define DLG_SND_GAIN 103 /* top-level dialog */
#define DLG_NEW_FLOPPY 104 /* top-level dialog */
#define DLG_SPECIFY_DIM 105 /* top-level dialog */
#define DLG_PREFERENCES 106 /* top-level dialog */
#define DLG_CONFIG 110 /* top-level dialog */
#define DLG_CFG_MACHINE 111 /* sub-dialog of config */
#define DLG_CFG_VIDEO 112 /* sub-dialog of config */
#define DLG_CFG_INPUT 113 /* sub-dialog of config */
#define DLG_CFG_SOUND 114 /* sub-dialog of config */
#define DLG_CFG_NETWORK 115 /* sub-dialog of config */
#define DLG_CFG_PORTS 116 /* sub-dialog of config */
#define DLG_CFG_STORAGE 117 /* sub-dialog of config */
#define DLG_CFG_HARD_DISKS 118 /* sub-dialog of config */
#define DLG_CFG_HARD_DISKS_ADD 119 /* sub-dialog of config */
#define DLG_CFG_FLOPPY_AND_CDROM_DRIVES 120 /* sub-dialog of config */
#define DLG_CFG_OTHER_REMOVABLE_DEVICES 121 /* sub-dialog of config */
#define DLG_CFG_PERIPHERALS 122 /* sub-dialog of config */
/* Static text label IDs. */
/* DLG_SND_GAIN */
#define IDT_GAIN 1700 /* Gain */
/* DLG_NEW_FLOPPY */
#define IDT_FLP_FILE_NAME 1701 /* File name: */
#define IDT_FLP_DISK_SIZE 1702 /* Disk size: */
#define IDT_FLP_RPM_MODE 1703 /* RPM mode: */
#define IDT_FLP_PROGRESS 1704 /* Progress: */
/* DLG_SPECIFY_DIM */
#define IDT_WIDTH 1705 /* ??? */
#define IDT_HEIGHT 1706 /* ??? */
/* DLG_CFG_MACHINE */
#define IDT_MACHINE_TYPE 1707 /* Machine type: */
#define IDT_MACHINE 1708 /* Machine: */
#define IDT_CPU_TYPE 1709 /* CPU type: */
#define IDT_CPU_SPEED 1710 /* CPU speed: */
#define IDT_FPU 1711 /* FPU: */
#define IDT_WAIT_STATES 1712 /* Wait states: */
#define IDT_MB 1713 /* MB == IDC_TEXT_MB */
#define IDT_MEMORY 1714 /* Memory: */
/* DLG_CFG_VIDEO */
#define IDT_VIDEO 1715 /* Video: */
#define IDT_VIDEO_2 1716 /* Video 2: */
/* DLG_CFG_INPUT */
#define IDT_MOUSE 1717 /* Mouse: */
#define IDT_JOYSTICK 1718 /* Joystick: */
/* DLG_CFG_SOUND */
#define IDT_SOUND1 1719 /* Sound card #1: */
#define IDT_SOUND2 1720 /* Sound card #2: */
#define IDT_SOUND3 1721 /* Sound card #3: */
#define IDT_SOUND4 1722 /* Sound card #4: */
#define IDT_MIDI_OUT 1723 /* MIDI Out Device: */
#define IDT_MIDI_IN 1724 /* MIDI In Device: */
/* DLG_CFG_NETWORK */
#define IDT_NET_TYPE 1725 /* Network type: */
#define IDT_PCAP 1726 /* PCap device: */
#define IDT_NET 1727 /* Network adapter: */
#define IDT_NET1 1728 /* Network adapter 1: */
#define IDT_NET2 1729 /* Network adapter 2: */
#define IDT_NET3 1730 /* Network adapter 3: */
#define IDT_NET4 1731 /* Network adapter 4: */
/* DLG_CFG_PORTS */
#define IDT_COM1 1732 /* COM1 Device: */
#define IDT_COM2 1733 /* COM1 Device: */
#define IDT_COM3 1734 /* COM1 Device: */
#define IDT_COM4 1735 /* COM1 Device: */
#define IDT_LPT1 1736 /* LPT1 Device: */
#define IDT_LPT2 1737 /* LPT2 Device: */
#define IDT_LPT3 1738 /* LPT3 Device: */
#define IDT_LPT4 1739 /* LPT4 Device: */
/* DLG_CFG_STORAGE */
#define IDT_HDC 1740 /* HD Controller: */
#define IDT_FDC 1741 /* Ext FD Controller: */
#define IDT_SCSI_1 1742 /* SCSI Board #1: */
#define IDT_SCSI_2 1743 /* SCSI Board #2: */
#define IDT_SCSI_3 1744 /* SCSI Board #3: */
#define IDT_SCSI_4 1745 /* SCSI Board #4: */
/* DLG_CFG_HARD_DISKS */
#define IDT_HDD 1746 /* Hard disks: */
#define IDT_BUS 1747 /* Bus: */
#define IDT_CHANNEL 1748 /* Channel: */
#define IDT_ID 1749 /* ID: */
#define IDT_LUN 1750 /* LUN: */
#define IDT_SPEED 1751 /* Speed: */
/* DLG_CFG_HARD_DISKS_ADD */
#define IDT_SECTORS 1752 /* Sectors: */
#define IDT_HEADS 1753 /* Heads: */
#define IDT_CYLS 1754 /* Cylinders: */
#define IDT_SIZE_MB 1755 /* Size (MB): */
#define IDT_TYPE 1756 /* Type: */
#define IDT_FILE_NAME 1757 /* File name: */
#define IDT_IMG_FORMAT 1758 /* Image Format: */
#define IDT_BLOCK_SIZE 1759 /* Block Size: */
#define IDT_PROGRESS 1760 /* Progress: */
/* DLG_CFG_FLOPPY_AND_CDROM_DRIVES */
#define IDT_FLOPPY_DRIVES 1761 /* Floppy drives: */
#define IDT_FDD_TYPE 1762 /* Type: */
#define IDT_CD_DRIVES 1763 /* CD-ROM drives: */
#define IDT_CD_BUS 1764 /* Bus: */
#define IDT_CD_ID 1765 /* ID: */
#define IDT_CD_LUN 1766 /* LUN: */
#define IDT_CD_CHANNEL 1767 /* Channel: */
#define IDT_CD_SPEED 1768 /* Speed: */
#define IDT_CD_TYPE 1769 /* Type: */
/* DLG_CFG_OTHER_REMOVABLE_DEVICES */
#define IDT_MO_DRIVES 1770 /* MO drives: */
#define IDT_MO_BUS 1771 /* Bus: */
#define IDT_MO_ID 1772 /* ID: */
#define IDT_MO_CHANNEL 1773 /* Channel */
#define IDT_MO_TYPE 1774 /* Type: */
#define IDT_ZIP_DRIVES 1775 /* ZIP drives: */
#define IDT_ZIP_BUS 1776 /* Bus: */
#define IDT_ZIP_ID 1777 /* ID: */
#define IDT_ZIP_LUN 1778 /* LUN: */
#define IDT_ZIP_CHANNEL 1779 /* Channel: */
/* DLG_CFG_PERIPHERALS */
#define IDT_ISARTC 1780 /* ISA RTC: */
#define IDT_ISAMEM_1 1781 /* ISAMEM Board #1: */
#define IDT_ISAMEM_2 1782 /* ISAMEM Board #2: */
#define IDT_ISAMEM_3 1783 /* ISAMEM Board #3: */
#define IDT_ISAMEM_4 1784 /* ISAMEM Board #4: */
/*
* To try to keep these organized, we now group the
* constants per dialog, as this allows easy adding
* and deleting items.
*/
#define IDC_SETTINGSCATLIST 1001 /* generic config */
#define IDC_CFILE 1002 /* Select File dialog */
#define IDC_TIME_SYNC 1005
#define IDC_RADIO_TS_DISABLED 1006
#define IDC_RADIO_TS_LOCAL 1007
#define IDC_RADIO_TS_UTC 1008
#define IDC_COMBO_MACHINE_TYPE 1010
#define IDC_COMBO_MACHINE 1011 /* machine/cpu config */
#define IDC_CONFIGURE_MACHINE 1012
#define IDC_COMBO_CPU_TYPE 1013
#define IDC_COMBO_CPU_SPEED 1014
#define IDC_COMBO_FPU 1015
#define IDC_COMBO_WS 1016
#ifdef USE_DYNAREC
# define IDC_CHECK_DYNAREC 1017
#endif
#define IDC_CHECK_SOFTFLOAT 1018
#define IDC_MEMTEXT 1019
#define IDC_MEMSPIN 1020
#define IDC_TEXT_MB IDT_MB
#define IDC_VIDEO 1021 /* video config */
#define IDC_COMBO_VIDEO 1022
#define IDC_VIDEO_2 1023
#define IDC_COMBO_VIDEO_2 1024
#define IDC_CHECK_VOODOO 1025
#define IDC_BUTTON_VOODOO 1026
#define IDC_CHECK_IBM8514 1027
#define IDC_CHECK_XGA 1028
#define IDC_BUTTON_XGA 1029
#define IDC_INPUT 1030 /* input config */
#define IDC_COMBO_MOUSE 1031
#define IDC_COMBO_JOYSTICK 1032
#define IDC_COMBO_JOY 1033
#define IDC_CONFIGURE_MOUSE 1034
#define IDC_SOUND 1040 /* sound config */
#define IDC_COMBO_SOUND1 1041
#define IDC_COMBO_SOUND2 1042
#define IDC_COMBO_SOUND3 1043
#define IDC_COMBO_SOUND4 1044
#define IDC_COMBO_MIDI_OUT 1045
#define IDC_CHECK_MPU401 1046
#define IDC_CONFIGURE_MPU401 1047
#define IDC_CHECK_FLOAT 1048
#define IDC_CONFIGURE_GUS 1049
#define IDC_COMBO_MIDI_IN 1050
#define IDC_CONFIGURE_CMS 1051
#define IDC_CONFIGURE_SSI 1052
#define IDC_FM_DRIVER 1053
#define IDC_RADIO_FM_DRV_NUKED 1054
#define IDC_RADIO_FM_DRV_YMFM 1055
#define IDC_COMBO_NET1_TYPE 1060 /* network config */
#define IDC_COMBO_NET2_TYPE 1061
#define IDC_COMBO_NET3_TYPE 1062
#define IDC_COMBO_NET4_TYPE 1063
#define IDC_COMBO_PCAP1 1064
#define IDC_COMBO_PCAP2 1065
#define IDC_COMBO_PCAP3 1066
#define IDC_COMBO_PCAP4 1067
#define IDC_COMBO_NET1 1068
#define IDC_COMBO_NET2 1069
#define IDC_COMBO_NET3 1070
#define IDC_COMBO_NET4 1071
#define IDC_COMBO_LPT1 1080 /* ports config */
#define IDC_COMBO_LPT2 1081
#define IDC_COMBO_LPT3 1082
#define IDC_COMBO_LPT4 1083
#define IDC_CHECK_SERIAL1 1084
#define IDC_CHECK_SERIAL2 1085
#define IDC_CHECK_SERIAL3 1086
#define IDC_CHECK_SERIAL4 1087
#define IDC_CHECK_PARALLEL1 1088
#define IDC_CHECK_PARALLEL2 1089
#define IDC_CHECK_PARALLEL3 1090
#define IDC_CHECK_PARALLEL4 1091
#define IDC_CHECK_SERIAL_PASS1 1092
#define IDC_CHECK_SERIAL_PASS2 1093
#define IDC_CHECK_SERIAL_PASS3 1094
#define IDC_CHECK_SERIAL_PASS4 1095
#define IDC_OTHER_PERIPH 1110 /* storage controllers config */
#define IDC_COMBO_HDC 1111
#define IDC_CONFIGURE_HDC 1112
#define IDC_CHECK_IDE_TER 1113
#define IDC_BUTTON_IDE_TER 1114
#define IDC_CHECK_IDE_QUA 1115
#define IDC_BUTTON_IDE_QUA 1116
#define IDC_GROUP_SCSI 1117
#define IDC_COMBO_SCSI_1 1118
#define IDC_COMBO_SCSI_2 1119
#define IDC_COMBO_SCSI_3 1120
#define IDC_COMBO_SCSI_4 1121
#define IDC_CONFIGURE_SCSI_1 1122
#define IDC_CONFIGURE_SCSI_2 1123
#define IDC_CONFIGURE_SCSI_3 1124
#define IDC_CONFIGURE_SCSI_4 1125
#define IDC_CHECK_CASSETTE 1126
#define IDC_HARD_DISKS 1130 /* hard disks config */
#define IDC_LIST_HARD_DISKS 1131
#define IDC_BUTTON_HDD_ADD_NEW 1132
#define IDC_BUTTON_HDD_ADD 1133
#define IDC_BUTTON_HDD_REMOVE 1134
#define IDC_COMBO_HD_BUS 1135
#define IDC_COMBO_HD_CHANNEL 1136
#define IDC_COMBO_HD_ID 1137
#define IDC_COMBO_HD_SPEED 1138
#define IDC_COMBO_HD_CHANNEL_IDE 1139
#define IDC_EDIT_HD_FILE_NAME 1140 /* add hard disk dialog */
#define IDC_EDIT_HD_SPT 1141
#define IDC_EDIT_HD_HPC 1142
#define IDC_EDIT_HD_CYL 1143
#define IDC_EDIT_HD_SIZE 1144
#define IDC_COMBO_HD_TYPE 1145
#define IDC_PBAR_IMG_CREATE 1146
#define IDC_COMBO_HD_IMG_FORMAT 1147
#define IDC_COMBO_HD_BLOCK_SIZE 1148
#define IDC_REMOV_DEVICES 1150 /* floppy and cd-rom drives config */
#define IDC_LIST_FLOPPY_DRIVES 1151
#define IDC_COMBO_FD_TYPE 1152
#define IDC_CHECKTURBO 1153
#define IDC_CHECKBPB 1154
#define IDC_LIST_CDROM_DRIVES 1155
#define IDC_COMBO_CD_BUS 1156
#define IDC_COMBO_CD_ID 1157
#define IDC_COMBO_CD_LUN 1158
#define IDC_COMBO_CD_CHANNEL_IDE 1159
#define IDC_COMBO_CD_TYPE 1160
#define IDC_LIST_ZIP_DRIVES 1170 /* other removable devices config */
#define IDC_COMBO_ZIP_BUS 1171
#define IDC_COMBO_ZIP_ID 1172
#define IDC_COMBO_ZIP_LUN 1173
#define IDC_COMBO_ZIP_CHANNEL_IDE 1174
#define IDC_CHECK250 1175
#define IDC_COMBO_CD_SPEED 1176
#define IDC_LIST_MO_DRIVES 1177
#define IDC_COMBO_MO_BUS 1178
#define IDC_COMBO_MO_ID 1179
#define IDC_COMBO_MO_LUN 1170
#define IDC_COMBO_MO_CHANNEL_IDE 1181
#define IDC_COMBO_MO_TYPE 1182
#define IDC_CHECK_BUGGER 1190 /* other periph config */
#define IDC_CHECK_POSTCARD 1191
#define IDC_COMBO_ISARTC 1192
#define IDC_CONFIGURE_ISARTC 1193
#define IDC_COMBO_FDC 1194
#define IDC_CONFIGURE_FDC 1195
#define IDC_GROUP_ISAMEM 1196
#define IDC_COMBO_ISAMEM_1 1197
#define IDC_COMBO_ISAMEM_2 1198
#define IDC_COMBO_ISAMEM_3 1199
#define IDC_COMBO_ISAMEM_4 1200
#define IDC_CONFIGURE_ISAMEM_1 1201
#define IDC_CONFIGURE_ISAMEM_2 1202
#define IDC_CONFIGURE_ISAMEM_3 1203
#define IDC_CONFIGURE_ISAMEM_4 1204
#define IDC_SLIDER_GAIN 1210 /* sound gain dialog */
#define IDC_EDIT_FILE_NAME 1220 /* new floppy image dialog */
#define IDC_COMBO_DISK_SIZE 1221
#define IDC_COMBO_RPM_MODE 1222
#define IDC_COMBO_LANG 1009 /* change language dialog */
#define IDC_COMBO_ICON 1010
#define IDC_CHECKBOX_GLOBAL 1300
#define IDC_BUTTON_DEFAULT 1302
#define IDC_BUTTON_DEFICON 1304
/* For the DeviceConfig code, re-do later. */
#define IDC_CONFIG_BASE 1300
#define IDC_CONFIGURE_VID 1300
#define IDC_CONFIGURE_VID_2 1301
#define IDC_CONFIGURE_SND1 1302
#define IDC_CONFIGURE_SND2 1303
#define IDC_CONFIGURE_SND3 1304
#define IDC_CONFIGURE_SND4 1305
#define IDC_CONFIGURE_VOODOO 1306
#define IDC_CONFIGURE_NET1_TYPE 1310
#define IDC_CONFIGURE_NET2_TYPE 1311
#define IDC_CONFIGURE_NET3_TYPE 1312
#define IDC_CONFIGURE_NET4_TYPE 1313
#define IDC_CONFIGURE_PCAP1 1314
#define IDC_CONFIGURE_PCAP2 1315
#define IDC_CONFIGURE_PCAP3 1316
#define IDC_CONFIGURE_PCAP4 1317
#define IDC_CONFIGURE_NET1 1318
#define IDC_CONFIGURE_NET2 1319
#define IDC_CONFIGURE_NET3 1320
#define IDC_CONFIGURE_NET4 1321
#define IDC_CONFIGURE_MIDI_OUT 1322
#define IDC_CONFIGURE_MIDI_IN 1323
#define IDC_CONFIGURE_SERIAL_PASS1 1324
#define IDC_CONFIGURE_SERIAL_PASS2 1325
#define IDC_CONFIGURE_SERIAL_PASS3 1326
#define IDC_CONFIGURE_SERIAL_PASS4 1327
#define IDC_JOY1 1330
#define IDC_JOY2 1331
#define IDC_JOY3 1332
#define IDC_JOY4 1333
#define IDC_HDTYPE 1380
#define IDC_RENDER 1381
#define IDC_STATUS 1382
#define IDC_EDIT_WIDTH 1400 /* specify main window dimensions dialog */
#define IDC_WIDTHSPIN 1401
#define IDC_EDIT_HEIGHT 1402
#define IDC_HEIGHTSPIN 1403
#define IDC_CHECK_LOCK_SIZE 1404
#define IDM_ABOUT 40001
#define IDC_ABOUT_ICON 65535
#define IDM_ACTION_KBD_REQ_CAPTURE 40010
#define IDM_ACTION_RCTRL_IS_LALT 40011
#define IDM_ACTION_SCREENSHOT 40012
#define IDM_ACTION_HRESET 40013
#define IDM_ACTION_RESET_CAD 40014
#define IDM_ACTION_EXIT 40015
#define IDM_ACTION_CTRL_ALT_ESC 40016
#define IDM_ACTION_PAUSE 40017
#ifdef MTR_ENABLED
# define IDM_ACTION_BEGIN_TRACE 40018
# define IDM_ACTION_END_TRACE 40019
# define IDM_ACTION_TRACE 40020
#endif
#define IDM_CONFIG 40021
#define IDM_VID_HIDE_STATUS_BAR 40022
#define IDM_VID_HIDE_TOOLBAR 40023
#define IDM_UPDATE_ICONS 40030
#define IDM_SND_GAIN 40031
#define IDM_VID_MONITORS 40040
#define IDM_VID_RESIZE 40041
#define IDM_VID_REMEMBER 40042
#define IDM_VID_SDL_SW 40050
#define IDM_VID_SDL_HW 40051
#define IDM_VID_SDL_OPENGL 40052
#define IDM_VID_OPENGL_CORE 40053
#ifdef USE_VNC
# define IDM_VID_VNC 40054
#endif
#define IDM_VID_SCALE_1X 40055
#define IDM_VID_SCALE_2X 40056
#define IDM_VID_SCALE_3X 40057
#define IDM_VID_SCALE_4X 40058
#define IDM_VID_SCALE_5X 40059
#define IDM_VID_SCALE_6X 40060
#define IDM_VID_SCALE_7X 40061
#define IDM_VID_SCALE_8X 40062
#define IDM_VID_SCALE_9X 40063
#define IDM_VID_SCALE_10X 40064
#define IDM_VID_HIDPI 40065
#define IDM_VID_FULLSCREEN 40066
#define IDM_VID_FS_FULL 40067
#define IDM_VID_FS_43 40068
#define IDM_VID_FS_KEEPRATIO 40069
#define IDM_VID_FS_INT 40070
#define IDM_VID_SPECIFY_DIM 40071
#define IDM_VID_FORCE43 40072
#define IDM_VID_OVERSCAN 40073
#define IDM_VID_INVERT 40074
#define IDM_VID_CGACON 40075
#define IDM_VID_GRAYCT_601 40076
#define IDM_VID_GRAYCT_709 40077
#define IDM_VID_GRAYCT_AVE 40078
#define IDM_VID_GRAY_RGB 40080
#define IDM_VID_GRAY_MONO 40081
#define IDM_VID_GRAY_AMBER 40082
#define IDM_VID_GRAY_GREEN 40083
#define IDM_VID_GRAY_WHITE 40084
#define IDM_VID_FILTER_NEAREST 40085
#define IDM_VID_FILTER_LINEAR 40086
#define IDM_MEDIA 40087
#define IDM_DOCS 40088
#define IDM_DISCORD 40090
#define IDM_PREFERENCES 40091
#define IDM_VID_GL_FPS_BLITTER 40100
#define IDM_VID_GL_FPS_25 40101
#define IDM_VID_GL_FPS_30 40102
#define IDM_VID_GL_FPS_50 40103
#define IDM_VID_GL_FPS_60 40104
#define IDM_VID_GL_FPS_75 40105
#define IDM_VID_GL_VSYNC 40106
#define IDM_VID_GL_SHADER 40107
#define IDM_VID_GL_NOSHADER 40108
/*
* We need 7 bits for CDROM (2 bits ID and 5 bits for host drive),
* and 5 bits for Removable Disks (5 bits for ID), so we use an
* 8bit (256 entries) space for these devices.
*/
#define IDM_CASSETTE_IMAGE_NEW 0x1200
#define IDM_CASSETTE_IMAGE_EXISTING 0x1300
#define IDM_CASSETTE_IMAGE_EXISTING_WP 0x1400
#define IDM_CASSETTE_RECORD 0x1500
#define IDM_CASSETTE_PLAY 0x1600
#define IDM_CASSETTE_REWIND 0x1700
#define IDM_CASSETTE_FAST_FORWARD 0x1800
#define IDM_CASSETTE_EJECT 0x1900
#define IDM_CARTRIDGE_IMAGE 0x2200
#define IDM_CARTRIDGE_EJECT 0x2300
#define IDM_FLOPPY_IMAGE_NEW 0x3200
#define IDM_FLOPPY_IMAGE_EXISTING 0x3300
#define IDM_FLOPPY_IMAGE_EXISTING_WP 0x3400
#define IDM_FLOPPY_EXPORT_TO_86F 0x3500
#define IDM_FLOPPY_EJECT 0x3600
#define IDM_CDROM_MUTE 0x4200
#define IDM_CDROM_EMPTY 0x4300
#define IDM_CDROM_RELOAD 0x4400
#define IDM_CDROM_IMAGE 0x4500
#define IDM_CDROM_DIR 0x4600
#define IDM_CDROM_HOST_DRIVE 0x4700
#define IDM_ZIP_IMAGE_NEW 0x5200
#define IDM_ZIP_IMAGE_EXISTING 0x5300
#define IDM_ZIP_IMAGE_EXISTING_WP 0x5400
#define IDM_ZIP_EJECT 0x5500
#define IDM_ZIP_RELOAD 0x5600
#define IDM_MO_IMAGE_NEW 0x6200
#define IDM_MO_IMAGE_EXISTING 0x6300
#define IDM_MO_IMAGE_EXISTING_WP 0x6400
#define IDM_MO_EJECT 0x6500
#define IDM_MO_RELOAD 0x6600
/* Next default values for new objects */
#ifdef APSTUDIO_INVOKED
# ifndef APSTUDIO_READONLY_SYMBOLS
# define _APS_NO_MFC 1
# define _APS_NEXT_RESOURCE_VALUE 1400
# define _APS_NEXT_COMMAND_VALUE 55000
# define _APS_NEXT_CONTROL_VALUE 1800
# define _APS_NEXT_SYMED_VALUE 200
# endif
#endif
#endif /*WIN_RESOURCE_H*/

View File

@@ -92,6 +92,7 @@ typedef struct serial_s {
typedef struct serial_device_s {
void (*rcr_callback)(struct serial_s *serial, void *priv);
void (*dtr_callback)(struct serial_s *serial, int status, void *priv);
void (*dev_write)(struct serial_s *serial, void *priv, uint8_t data);
void (*lcr_callback)(struct serial_s *serial, void *priv, uint8_t lcr);
void (*transmit_period_callback)(struct serial_s *serial, void *priv, double transmit_period);
@@ -112,6 +113,12 @@ extern serial_t *serial_attach_ex(int port,
void (*lcr_callback)(struct serial_s *serial, void *priv, uint8_t data_bits),
void *priv);
extern serial_t *serial_attach_ex_2(int port,
void (*rcr_callback)(struct serial_s *serial, void *priv),
void (*dev_write)(struct serial_s *serial, void *priv, uint8_t data),
void (*dtr_callback)(struct serial_s *serial, int status, void *priv),
void *priv);
#define serial_attach(port, rcr_callback, dev_write, priv) \
serial_attach_ex(port, rcr_callback, dev_write, NULL, NULL, priv);
@@ -129,6 +136,8 @@ extern void serial_device_timeout(void *priv);
extern void serial_set_cts(serial_t *dev, uint8_t enabled);
extern void serial_set_dsr(serial_t *dev, uint8_t enabled);
extern void serial_set_dcd(serial_t *dev, uint8_t enabled);
extern void serial_set_ri(serial_t *dev, uint8_t enabled);
extern int serial_get_ri(serial_t *dev);
extern const device_t ns8250_device;
extern const device_t ns8250_pcjr_device;

View File

@@ -22,7 +22,8 @@ enum fm_type {
FM_YMF262 = 1, /* OPL3 */
FM_YMF289B = 2, /* OPL3-L */
FM_YMF278B = 3, /* OPL 4 */
FM_MAX = 4
FM_ESFM = 4, /* ESFM */
FM_MAX = 5
};
enum fm_driver {
@@ -45,6 +46,7 @@ extern uint8_t fm_driver_get(int chip_id, fm_drv_t *drv);
extern const fm_drv_t nuked_opl_drv;
extern const fm_drv_t ymfm_drv;
extern const fm_drv_t esfmu_opl_drv;
#ifdef EMU_DEVICE_H
extern const device_t ym3812_nuked_device;
@@ -54,6 +56,8 @@ extern const device_t ym3812_ymfm_device;
extern const device_t ymf262_ymfm_device;
extern const device_t ymf289b_ymfm_device;
extern const device_t ymf278b_ymfm_device;
extern const device_t esfm_esfmu_device;
#endif
#endif /*SOUND_OPL_H*/

View File

@@ -126,6 +126,43 @@ typedef struct sb_ct1745_mixer_t {
int output_filter; /* for clones */
} sb_ct1745_mixer_t;
/* ESS AudioDrive */
typedef struct ess_mixer_t {
double master_l;
double master_r;
double voice_l;
double voice_r;
double fm_l;
double fm_r;
double cd_l;
double cd_r;
double line_l;
double line_r;
double mic_l;
double mic_r;
double auxb_l;
double auxb_r;
double speaker;
/*see sb_ct1745_mixer for values for input selector*/
int32_t input_selector;
/* extra values for input selector */
#define INPUT_MIXER_L 128
#define INPUT_MIXER_R 256
int input_filter;
int in_filter_freq;
int output_filter;
int stereo;
int stereo_isleft;
uint8_t index;
uint8_t regs[256];
uint8_t ess_id_str[4];
uint8_t ess_id_str_pos;
} ess_mixer_t;
typedef struct sb_t {
uint8_t cms_enabled;
uint8_t opl_enabled;
@@ -138,6 +175,7 @@ typedef struct sb_t {
sb_ct1335_mixer_t mixer_sb2;
sb_ct1345_mixer_t mixer_sbpro;
sb_ct1745_mixer_t mixer_sb16;
ess_mixer_t mixer_ess;
};
mpu_t *mpu;
emu8k_t emu8k;
@@ -163,6 +201,10 @@ extern void sb_ct1745_mixer_write(uint16_t addr, uint8_t val, void *priv);
extern uint8_t sb_ct1745_mixer_read(uint16_t addr, void *priv);
extern void sb_ct1745_mixer_reset(sb_t *sb);
extern void sb_ess_mixer_write(uint16_t addr, uint8_t val, void *priv);
extern uint8_t sb_ess_mixer_read(uint16_t addr, void *priv);
extern void sb_ess_mixer_reset(sb_t *sb);
extern void sb_get_buffer_sbpro(int32_t *buffer, int len, void *priv);
extern void sb_get_music_buffer_sbpro(int32_t *buffer, int len, void *priv);
extern void sbpro_filter_cd_audio(int channel, double *buffer, void *priv);

View File

@@ -1,10 +1,16 @@
#ifndef SOUND_SND_SB_DSP_H
#define SOUND_SND_SB_DSP_H
#include <86box/fifo.h>
/*Sound Blaster Clones, for quirks*/
#define SB_SUBTYPE_DEFAULT 0 /*Handle as a Creative card*/
#define SB_SUBTYPE_CLONE_AZT2316A_0X11 1 /*Aztech Sound Galaxy Pro 16 AB, DSP 3.1 - SBPRO2 clone*/
#define SB_SUBTYPE_CLONE_AZT1605_0X0C 2 /*Aztech Sound Galaxy Nova 16 Extra / Packard Bell Forte 16, DSP 2.1 - SBPRO2 clone*/
#define SB_SUBTYPE_ESS_ES1688 3 /* ESS Technology ES1688 */
/* ESS-related */
#define IS_ESS(dsp) ((dsp)->sb_subtype == SB_SUBTYPE_ESS_ES1688) /* check for future ESS cards here */
/* aztech-related */
#define IS_AZTECH(dsp) ((dsp)->sb_subtype == SB_SUBTYPE_CLONE_AZT2316A_0X11 || (dsp)->sb_subtype == SB_SUBTYPE_CLONE_AZT1605_0X0C) /* check for future AZT cards here */
@@ -125,6 +131,8 @@ typedef struct sb_dsp_t {
pc_timer_t wb_timer;
int wb_full;
pc_timer_t irq_timer;
int busy_count;
int record_pos_read;
@@ -135,6 +143,28 @@ typedef struct sb_dsp_t {
uint8_t azt_eeprom[AZTECH_EEPROM_SIZE]; /* the eeprom in the Aztech cards is attached to the DSP */
uint8_t ess_regs[256]; /* ESS registers. */
uint8_t ess_playback_mode;
uint8_t ess_extended_mode;
uint8_t ess_reload_len;
uint32_t ess_dma_counter;
/* IRQ status flags (0x22C) */
uint8_t ess_irq_generic;
uint8_t ess_irq_dmactr;
/* ESPCM */
fifo64_t *espcm_fifo;
uint8_t espcm_fifo_reset;
uint8_t espcm_mode; /* see ESPCM in "NON-PCM SAMPLE FORMATS" deflist in snd_sb_dsp.c */
uint8_t espcm_sample_idx;
uint8_t espcm_range;
uint8_t espcm_byte_buffer[4];
uint8_t espcm_code_buffer[19]; /* used for ESPCM_3 and for ESPCM_4 recording */
int8_t espcm_sample_buffer[19]; /* used for ESPCM_4 recording */
uint8_t espcm_table_index; /* used for ESPCM_3 */
uint8_t espcm_last_value; /* used for ESPCM_3 */
mpu_t *mpu;
} sb_dsp_t;

View File

@@ -123,10 +123,8 @@ extern const device_t cms_device;
/* Gravis UltraSound and UltraSound Max */
extern const device_t gus_device;
# if defined(DEV_BRANCH) && defined(USE_PAS16)
/* Pro Audio Spectrum 16 */
extern const device_t pas16_device;
# endif
/* IBM PS/1 Audio Card */
extern const device_t ps1snd_device;
@@ -184,6 +182,10 @@ extern const device_t cmi8338_onboard_device;
extern const device_t cmi8738_device;
extern const device_t cmi8738_onboard_device;
extern const device_t cmi8738_6ch_onboard_device;
/* ESS Technology */
extern const device_t ess_1688_device;
#endif
#endif /*EMU_SOUND_H*/

View File

@@ -42,9 +42,6 @@ extern "C" {
extern int ui_msgbox(int flags, void *message);
extern int ui_msgbox_header(int flags, void *header, void *message);
extern int ui_msgbox_ex(int flags, void *header, void *message, void *btn1, void *btn2, void *btn3);
extern void ui_check_menu_item(int id, int checked);
/* Status Bar functions. */
#define SB_ICON_WIDTH 24
@@ -60,16 +57,13 @@ extern void ui_check_menu_item(int id, int checked);
#define SB_TEXT 0x90
extern wchar_t *ui_window_title(wchar_t *s);
extern void ui_status_update(void);
extern void ui_hard_reset_completed(void);
extern void ui_init_monitor(int monitor_index);
extern void ui_deinit_monitor(int monitor_index);
extern int ui_sb_find_part(int tag);
extern void ui_sb_set_ready(int ready);
extern void ui_sb_update_panes(void);
extern void ui_sb_update_text(void);
extern void ui_sb_update_tip(int meaning);
extern void ui_sb_timer_callback(int pane);
extern void ui_sb_update_icon(int tag, int active);
extern void ui_sb_update_icon_state(int tag, int state);
extern void ui_sb_set_text_w(wchar_t *wstr);

View File

@@ -26,50 +26,7 @@
#ifndef UNICODE
# define UNICODE
#endif
#define BITMAP WINDOWS_BITMAP
#if 0
# ifdef _WIN32_WINNT
# undef _WIN32_WINNT
# define _WIN32_WINNT 0x0501
# endif
#endif
#include "resource.h"
#include <windows.h>
#undef BITMAP
/* DPI Awareness Context, copied from MinGW-w64 windef.h */
#ifndef _DPI_AWARENESS_CONTEXTS_
DECLARE_HANDLE(DPI_AWARENESS_CONTEXT);
# define DPI_AWARENESS_CONTEXT_UNAWARE ((DPI_AWARENESS_CONTEXT) -1)
# define DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ((DPI_AWARENESS_CONTEXT) -2)
# define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ((DPI_AWARENESS_CONTEXT) -3)
# define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((DPI_AWARENESS_CONTEXT) -4)
# define DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED ((DPI_AWARENESS_CONTEXT) -5)
#endif
#ifndef WM_DPICHANGED_AFTERPARENT
# define WM_DPICHANGED_AFTERPARENT 0x02E3
#endif
/* Class names and such. */
#define CLASS_NAME L"86BoxMainWnd"
#define MENU_NAME L"MainMenu"
#define ACCEL_NAME L"MainAccel"
#define SUB_CLASS_NAME L"86BoxSubWnd"
#define SB_CLASS_NAME L"86BoxStatusBar"
#define SB_MENU_NAME L"StatusBarMenu"
#define FS_CLASS_NAME L"86BoxFullScreen"
#define SDL_CLASS_NAME L"86BoxSDLWnd"
#define SDL_SUB_CLASS_NAME L"86BoxSDLSubWnd"
#define CASSETTE_SUBMENU_NAME L"CassetteSubmenu"
#define CARTRIDGE_SUBMENU_NAME L"CartridgeSubmenu"
#define FLOPPY_SUBMENU_NAME L"FloppySubmenu"
#define CDROM_SUBMENU_NAME L"CdromSubmenu"
#define ZIP_SUBMENU_NAME L"ZIPSubmenu"
#define MO_SUBMENU_NAME L"MOSubmenu"
#define VID_GL_SUBMENU L"VidGLSubMenu"
/* Application-specific window messages.
@@ -92,163 +49,4 @@ DECLARE_HANDLE(DPI_AWARENESS_CONTEXT);
/* The emulator has shut down. */
#define WM_HAS_SHUTDOWN 0x8897
#ifdef USE_VNC
# define RENDERERS_NUM 5
#else
# define RENDERERS_NUM 4
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern HINSTANCE hinstance;
extern HWND hwndMain;
extern HWND hwndRender;
extern HWND hwndRender2;
extern HANDLE ghMutex;
extern HICON hIcon[256];
extern int dpi;
extern RECT oldclip;
extern int sbar_height;
extern int tbar_height;
extern int user_resize;
extern int acp_utf8;
#if 0
extern int status_is_open;
#endif
extern char openfilestring[512];
extern WCHAR wopenfilestring[512];
extern uint8_t filterindex;
extern void ResizeWindowByClientArea(HWND hwnd, int width, int height);
/* Emulator start/stop support functions. */
extern void do_start(void);
extern void do_stop(void);
/* Internal platform support functions. */
extern int has_language_changed(uint32_t id);
extern void set_language(uint32_t id);
extern int get_vidpause(void);
extern void show_cursor(int);
extern void keyboard_getkeymap(void);
extern void keyboard_handle(PRAWINPUT raw);
extern void win_mouse_init(void);
extern void win_mouse_close(void);
extern void win_mouse_handle(PRAWINPUT raw);
extern void win_joystick_handle(PRAWINPUT raw);
extern void win_notify_dlg_open(void);
extern void win_notify_dlg_closed(void);
extern int win_get_dpi(HWND hwnd);
extern int win_get_system_metrics(int i, int dpi);
extern LPARAM win_get_string(int id);
extern void win_clear_icon_set(void);
extern void win_system_icon_set(void);
extern void win_load_icon_set(void);
extern void win_get_icons_path(char *path_root);
extern intptr_t fdd_type_to_icon(int type);
#ifdef EMU_DEVICE_H
extern uint8_t deviceconfig_open(HWND hwnd, const device_t *device);
extern uint8_t deviceconfig_inst_open(HWND hwnd, const device_t *device, int inst);
#endif
extern uint8_t joystickconfig_open(HWND hwnd, int joy_nr, int type);
extern int getfile(HWND hwnd, char *f, char *fn);
extern int getsfile(HWND hwnd, char *f, char *fn);
extern void hard_disk_add_open(HWND hwnd, int is_existing);
extern int hard_disk_was_added(void);
/* Platform UI support functions. */
extern int ui_init(int nCmdShow);
/* Functions in win_about.c: */
extern void AboutDialogCreate(HWND hwnd);
/* Functions in win_snd_gain.c: */
extern void SoundGainDialogCreate(HWND hwnd);
/* Functions in win_new_floppy.c: */
extern void NewFloppyDialogCreate(HWND hwnd, int id, int part);
/* Functions in win_specify_dim.c: */
extern void SpecifyDimensionsDialogCreate(HWND hwnd);
/* Functions in win_preferences.c: */
extern void PreferencesDlgCreate(HWND hwnd);
/* Functions in win_settings.c: */
#define SETTINGS_PAGE_MACHINE 0
#define SETTINGS_PAGE_VIDEO 1
#define SETTINGS_PAGE_INPUT 2
#define SETTINGS_PAGE_SOUND 3
#define SETTINGS_PAGE_NETWORK 4
#define SETTINGS_PAGE_PORTS 5
#define SETTINGS_PAGE_STORAGE 6
#define SETTINGS_PAGE_HARD_DISKS 7
#define SETTINGS_PAGE_FLOPPY_AND_CDROM_DRIVES 8
#define SETTINGS_PAGE_OTHER_REMOVABLE_DEVICES 9
#define SETTINGS_PAGE_PERIPHERALS 10
extern void win_settings_open(HWND hwnd);
extern void win_settings_open_ex(HWND hwnd, int category);
/* Functions in win_stbar.c: */
extern HWND hwndSBAR;
extern void StatusBarCreate(HWND hwndParent, uintptr_t idStatus, HINSTANCE hInst);
extern int MediaMenuHandler(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
/* Functions in win_toolbar.c */
extern HWND hwndRebar;
extern void ToolBarCreate(HWND hwndParent, HINSTANCE hInst);
extern void ToolBarLoadIcons(void);
extern void ToolBarUpdatePause(int paused);
/* Functions in win_dialog.c: */
/* Pass NULL in the title param to use the default title. */
extern int file_dlg_w(HWND hwnd, WCHAR *f, WCHAR *fn, WCHAR *title, int save);
extern int file_dlg(HWND hwnd, WCHAR *f, char *fn, char *title, int save);
extern int file_dlg_mb(HWND hwnd, char *f, char *fn, char *title, int save);
extern int file_dlg_w_st(HWND hwnd, int i, WCHAR *fn, char *title, int save);
extern int file_dlg_st(HWND hwnd, int i, char *fn, char *title, int save);
extern wchar_t *BrowseFolder(wchar_t *saved_path, wchar_t *title);
/* Functions in win_media_menu.c */
extern void media_menu_init(void);
extern void media_menu_reset(void);
extern int media_menu_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
extern HMENU media_menu_get_cassette(void);
extern HMENU media_menu_get_cartridge(int id);
extern HMENU media_menu_get_floppy(int id);
extern HMENU media_menu_get_cdrom(int id);
extern HMENU media_menu_get_zip(int id);
extern HMENU media_menu_get_mo(int id);
extern void media_menu_update_cassette(void);
extern void media_menu_update_cartridge(int id);
extern void media_menu_update_floppy(int id);
extern void media_menu_update_cdrom(int id);
extern void media_menu_update_zip(int id);
extern void media_menu_update_mo(int id);
/* Functions in win_ui.c */
extern HMENU menuMain;
extern void ResetAllMenus(void);
#ifdef __cplusplus
}
#endif
#endif /*PLAT_WIN_H*/

View File

@@ -1,29 +0,0 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Header file for OpenGL rendering module
*
* Authors: Teemu Korhonen
*
* Copyright 2021 Teemu Korhonen
*/
#ifndef WIN_OPENGL_H
#define WIN_OPENGL_H
#define UNICODE
#include <windows.h>
extern int opengl_init(HWND hwnd);
extern int opengl_pause(void);
extern void opengl_close(void);
extern void opengl_set_fs(int fs);
extern void opengl_resize(int w, int h);
extern void opengl_reload(void);
#endif /*!WIN_OPENGL_H*/

View File

@@ -1,24 +0,0 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Header file for shader file parser.
*
* Authors: Teemu Korhonen
*
* Copyright 2021 Teemu Korhonen
*/
#ifndef WIN_OPENGL_GLSLP_H
#define WIN_OPENGL_GLSLP_H
#include <glad/glad.h>
GLuint load_custom_shaders(const char *path);
GLuint load_default_shaders(void);
#endif /*!WIN_OPENGL_GLSLP_H*/

View File

@@ -1,63 +0,0 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Definitions for the libSDL2 rendering module.
*
*
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Michael Drüing, <michael@drueing.de>
*
* Copyright 2018-2019 Fred N. van Kempen.
* Copyright 2018-2019 Michael Drüing.
*
* Redistribution and use in source and binary forms, with
* or without modification, are permitted provided that the
* following conditions are met:
*
* 1. Redistributions of source code must retain the entire
* above notice, this list of conditions and the following
* disclaimer.
*
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names
* of its contributors may be used to endorse or promote
* products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (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 WIN_SDL_H
#define WIN_SDL_H
extern void sdl_close(void);
extern int sdl_inits(HWND h);
extern int sdl_inith(HWND h);
extern int sdl_initho(HWND h);
extern int sdl_pause(void);
extern void sdl_resize(int x, int y);
extern void sdl_enable(int enable);
extern void sdl_set_fs(int fs);
extern void sdl_reload(void);
#endif /*WIN_SDL_H*/

View File

@@ -1,49 +0,0 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Definitions for project version, branding, and external links.
*
*
*
* Authors: Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2020 Miran Grca.
*/
#define _LSTR(s) L ## s
#define LSTR(s) _LSTR(s)
/* Version info. */
#define EMU_NAME "86Box"
#define EMU_NAME_W LSTR(EMU_NAME)
#define EMU_VERSION "4.1.1"
#define EMU_VERSION_W LSTR(EMU_VERSION)
#define EMU_VERSION_EX "3.50" /* frozen due to IDE re-detection behavior on Windows */
#define EMU_VERSION_MAJ 4
#define EMU_VERSION_MIN 1
#define EMU_VERSION_PATCH 1
#define EMU_BUILD_NUM 0
#define EMU_VERSION_FULL EMU_VERSION
#define EMU_VERSION_FULL_W EMU_VERSION_W
#define COPYRIGHT_YEAR "2024"
/* Web URL info. */
#define EMU_SITE "86box.net"
#define EMU_SITE_W LSTR(EMU_SITE)
#define EMU_ROMS_URL "https://github.com/86Box/roms/releases/latest"
#define EMU_ROMS_URL_W LSTR(EMU_ROMS_URL)
#ifdef RELEASE_BUILD
# define EMU_DOCS_URL "https://86box.readthedocs.io/en/v4.1/"
#else
# define EMU_DOCS_URL "https://86box.readthedocs.io"
#endif
#define EMU_DOCS_URL_W LSTR(EMU_DOCS_URL)

View File

@@ -350,6 +350,25 @@ machine_at_gw286ct_init(const machine_t *model)
return ret;
}
int
machine_at_senor_scat286_init(const machine_t *model)
{
int ret;
ret = bios_load_linear("roms/machines/senor286/AMI-DSC2-1115-061390-K8.rom",
0x000f0000, 65536, 0);
if (bios_only || !ret)
return ret;
machine_at_scat_init(model, 0, 1);
if (fdc_type == FDC_INTERNAL)
device_add(&fdc_at_device);
return ret;
}
int
machine_at_super286c_init(const machine_t *model)
{

View File

@@ -90,6 +90,26 @@ machine_at_asus386_init(const machine_t *model)
return ret;
}
int
machine_at_tandy4000_init(const machine_t *model)
{
int ret;
ret = bios_load_linear("roms/machines/tandy4000/BIOS Tandy 4000 v1.03.01.bin",
0x000f8000, 32768, 0);
if (bios_only || !ret)
return ret;
machine_at_common_init(model);
device_add(&keyboard_at_device);
if (fdc_type == FDC_INTERNAL)
device_add(&fdc_at_device);
return ret;
}
static void
machine_at_sis401_common_init(const machine_t *model)
{

View File

@@ -633,7 +633,10 @@ compaq_plasma_init(UNUSED(const device_t *info))
memset(self, 0, sizeof(compaq_plasma_t));
video_inform(VIDEO_FLAG_TYPE_CGA, &timing_compaq_plasma);
loadfont_ex("roms/machines/portableiii/K Combined.bin", 11, 0x4bb2);
if (compaq_machine_type == COMPAQ_PORTABLEIII)
loadfont_ex("roms/machines/portableiii/K Combined.bin", 11, 0x4bb2);
else
loadfont_ex("roms/machines/portableiii/P.2 Combined.bin", 11, 0x4b49);
self->cga.composite = 0;
self->cga.revision = 0;
@@ -863,8 +866,8 @@ machine_at_portableiii386_init(const machine_t *model)
{
int ret;
ret = bios_load_linearr("roms/machines/portableiii/K Combined.bin",
0x000f8000, 65536, 0);
ret = bios_load_linearr("roms/machines/portableiii/P.2 Combined.bin",
0x000f0000, 131072, 0);
if (bios_only || !ret)
return ret;

View File

@@ -772,7 +772,7 @@ speed_changed(void *priv)
}
void
pit_irq0_timer_pcjr(int new_out, int old_out)
pit_irq0_timer_pcjr(int new_out, int old_out, UNUSED(void *priv))
{
if (new_out && !old_out) {
picint(1);

View File

@@ -156,7 +156,7 @@ machine_available(int m)
}
void
pit_irq0_timer(int new_out, int old_out)
pit_irq0_timer(int new_out, int old_out, UNUSED(void *priv))
{
if (new_out && !old_out)
picint(1);

View File

@@ -3726,6 +3726,45 @@ const machine_t machines[] = {
.net_device = NULL
},
{
.name = "[SCAT] Senor Science Co. SCAT-286-003",
.internal_name = "senorscat286",
.type = MACHINE_TYPE_286,
.chipset = MACHINE_CHIPSET_SCAT,
.init = machine_at_senor_scat286_init,
.p1_handler = NULL,
.gpio_handler = NULL,
.available_flag = MACHINE_AVAILABLE,
.gpio_acpi_handler = NULL,
.cpu = {
.package = CPU_PKG_286,
.block = CPU_BLOCK_NONE,
.min_bus = 0,
.max_bus = 0,
.min_voltage = 0,
.max_voltage = 0,
.min_multi = 0,
.max_multi = 0
},
.bus_flags = MACHINE_AT,
.flags = MACHINE_IDE,
.ram = {
.min = 1024,
.max = 4096,
.step = 1024
},
.nvrmask = 127,
.kbc_device = NULL,
.kbc_p1 = 0xff,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.snd_device = NULL,
.net_device = NULL
},
/* 286 machines that utilize the MCA bus */
/* Has IBM PS/2 Type 2 KBC firmware. */
{
@@ -5013,7 +5052,7 @@ const machine_t machines[] = {
.max = 14336,
.step = 1024
},
.nvrmask = 127,
.nvrmask = 63,
.kbc_device = NULL,
.kbc_p1 = 0xff,
.gpio = 0xffffffff,
@@ -5065,6 +5104,46 @@ const machine_t machines[] = {
.snd_device = NULL,
.net_device = NULL
},
/* Has IBM AT KBC firmware. */
{
.name = "[ISA] Tandy 4000",
.internal_name = "tandy4000",
.type = MACHINE_TYPE_386DX,
.chipset = MACHINE_CHIPSET_DISCRETE,
.init = machine_at_tandy4000_init,
.p1_handler = NULL,
.gpio_handler = NULL,
.available_flag = MACHINE_AVAILABLE,
.gpio_acpi_handler = NULL,
.cpu = {
.package = CPU_PKG_386DX,
.block = CPU_BLOCK_NONE,
.min_bus = 0,
.max_bus = 0,
.min_voltage = 0,
.max_voltage = 0,
.min_multi = 0,
.max_multi = 0
},
.bus_flags = MACHINE_AT,
.flags = MACHINE_APM,
.ram = {
.min = 1024,
.max = 16384,
.step = 1024
},
.nvrmask = 63,
.kbc_device = NULL,
.kbc_p1 = 0xff,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.snd_device = NULL,
.net_device = NULL
},
/* Has a Lance LT38C41 with AMI Megakey P KBC firmware */
{
.name = "[ALi M1429] ECS Panda 386V",

View File

@@ -15,7 +15,7 @@
set(net_sources)
list(APPEND net_sources network.c net_pcap.c net_slirp.c net_dp8390.c net_3c501.c
net_3c503.c net_ne2000.c net_pcnet.c net_wd8003.c net_plip.c net_event.c net_null.c
net_eeprom_nmc93cxx.c net_tulip.c net_rtl8139.c net_l80225.c)
net_eeprom_nmc93cxx.c net_tulip.c net_rtl8139.c net_l80225.c net_modem.c utils/getline.c)
find_package(PkgConfig REQUIRED)
pkg_check_modules(SLIRP REQUIRED IMPORTED_TARGET slirp)

1440
src/network/net_modem.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -365,7 +365,13 @@ net_pcap_prepare(netdev_t *list)
/* Try loading the DLL. */
#ifdef _WIN32
/* Add the Npcap directory to the DLL search path. */
char npcap_dir[512];
GetSystemDirectoryA(npcap_dir, 480);
strcat(npcap_dir, "\\Npcap");
SetDllDirectoryA(npcap_dir);
libpcap_handle = dynld_module("wpcap.dll", pcap_imports);
SetDllDirectoryA(NULL); /* reset the DLL search path */
#elif defined __APPLE__
libpcap_handle = dynld_module("libpcap.dylib", pcap_imports);
#else
@@ -494,7 +500,7 @@ net_pcap_init(const netcard_t *card, const uint8_t *mac_addr, void *priv, char *
pcap_log("PCAP: installing filter for MAC=%02x:%02x:%02x:%02x:%02x:%02x\n",
mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
sprintf(filter_exp,
"( ((ether dst ff:ff:ff:ff:ff:ff) or (ether dst %02x:%02x:%02x:%02x:%02x:%02x)) and not (ether src %02x:%02x:%02x:%02x:%02x:%02x) )",
"( ((ether broadcast) or (ether multicast) or (ether dst %02x:%02x:%02x:%02x:%02x:%02x)) and not (ether src %02x:%02x:%02x:%02x:%02x:%02x) )",
mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5],
mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
if (f_pcap_compile(pcap->pcap, &fp, filter_exp, 0, 0xffffffff) != -1) {

View File

@@ -26,7 +26,6 @@
#include <stdarg.h>
#define HAVE_STDARG_H
#include <86box/86box.h>
#include <86box/language.h>
#include <86box/lpt.h>
#include <86box/timer.h>
#include <86box/pit.h>

View File

@@ -37,6 +37,7 @@
#include <86box/ini.h>
#include <86box/config.h>
#include <86box/video.h>
#include <86box/bswap.h>
#define _SSIZE_T_DEFINED
#include <slirp/libslirp.h>
@@ -76,6 +77,29 @@ typedef struct net_slirp_t {
#endif
} net_slirp_t;
/* Pulled off from libslirp code. This is only needed for modem. */
#pragma pack(push, 1)
struct arphdr_local {
unsigned char h_dest[6]; /* destination eth addr */
unsigned char h_source[6]; /* source ether addr */
unsigned short h_proto; /* packet type ID field */
unsigned short ar_hrd; /* format of hardware address */
unsigned short ar_pro; /* format of protocol address */
unsigned char ar_hln; /* length of hardware address */
unsigned char ar_pln; /* length of protocol address */
unsigned short ar_op; /* ARP opcode (command) */
/*
* Ethernet looks like this : This bit is variable sized however...
*/
uint8_t ar_sha[6]; /* sender hardware address */
uint32_t ar_sip; /* sender IP address */
uint8_t ar_tha[6]; /* target hardware address */
uint32_t ar_tip; /* target IP address */
};
#pragma pack(pop)
#ifdef ENABLE_SLIRP_LOG
int slirp_do_log = ENABLE_SLIRP_LOG;
@@ -455,6 +479,32 @@ net_slirp_init(const netcard_t *card, const uint8_t *mac_addr, UNUSED(void *priv
#ifdef _WIN32
slirp->sock_event = CreateEvent(NULL, FALSE, FALSE, NULL);
#endif
if (!strcmp(network_card_get_internal_name(net_cards_conf[net_card_current].device_num), "modem")) {
/* Send a gratuitous ARP here to make SLiRP work properly with SLIP connections. */
struct arphdr_local arphdr;
/* ARP part. */
arphdr.ar_hrd = bswap16(1);
arphdr.ar_pro = bswap16(0x0800);
arphdr.ar_hln = 6;
arphdr.ar_pln = 4;
arphdr.ar_op = bswap16(1);
memcpy(&arphdr.ar_sha, mac_addr, 6);
memcpy(&arphdr.ar_tha, mac_addr, 6);
arphdr.ar_sip = dhcp.s_addr;
arphdr.ar_tip = dhcp.s_addr;
/* Ethernet header part. */
arphdr.h_proto = bswap16(0x0806);
memset(arphdr.h_dest, 0xff, 6);
memset(arphdr.h_source, 0x52, 6);
arphdr.h_source[2] = 0x0a;
arphdr.h_source[3] = 0x00;
arphdr.h_source[4] = slirp_card_num;
arphdr.h_source[5] = 2;
slirp_input(slirp->slirp, (const uint8_t *)&arphdr, sizeof(struct arphdr_local));
}
slirp_log("SLiRP: creating thread...\n");
slirp->poll_tid = thread_create(net_slirp_thread, slirp);

View File

@@ -136,6 +136,7 @@ static const device_t *net_cards[] = {
&dec_tulip_21140_vpc_device,
&dec_tulip_21040_device,
&pcnet_am79c960_vlb_device,
&modem_device,
NULL
};
@@ -453,6 +454,7 @@ netcard_t *
network_attach(void *card_drv, uint8_t *mac, NETRXCB rx, NETSETLINKSTATE set_link_state)
{
netcard_t *card = calloc(1, sizeof(netcard_t));
int net_type = net_cards_conf[net_card_current].net_type;
card->queued_pkt.data = calloc(1, NET_MAX_FRAME);
card->card_drv = card_drv;
card->rx = rx;
@@ -469,7 +471,12 @@ network_attach(void *card_drv, uint8_t *mac, NETRXCB rx, NETSETLINKSTATE set_lin
network_queue_init(&card->queues[i]);
}
switch (net_cards_conf[net_card_current].net_type) {
if (!strcmp(network_card_get_internal_name(net_cards_conf[net_card_current].device_num), "modem") && net_type >= NET_TYPE_PCAP) {
/* Force SLiRP here. Modem only operates on non-Ethernet frames. */
net_type = NET_TYPE_SLIRP;
}
switch (net_type) {
case NET_TYPE_SLIRP:
card->host_drv = net_slirp_drv;
card->host_drv.priv = card->host_drv.init(card, mac, NULL, net_drv_error);
@@ -497,7 +504,7 @@ network_attach(void *card_drv, uint8_t *mac, NETRXCB rx, NETSETLINKSTATE set_lin
if(net_cards_conf[net_card_current].net_type != NET_TYPE_NONE) {
// We're here because of a failure
swprintf(tempmsg, sizeof_w(tempmsg), L"%ls:<br /><br />%s<br /><br />%ls", plat_get_string(IDS_2167), net_drv_error, plat_get_string(IDS_2168));
swprintf(tempmsg, sizeof_w(tempmsg), L"%ls:<br /><br />%s<br /><br />%ls", plat_get_string(STRING_NET_ERROR), net_drv_error, plat_get_string(STRING_NET_ERROR_DESC));
ui_msgbox(MBX_ERROR, tempmsg);
net_cards_conf[net_card_current].net_type = NET_TYPE_NONE;
}

View File

@@ -1,296 +0,0 @@
/*
* VARCem Virtual ARchaeological Computer EMulator.
* An emulator of (mostly) x86-based PC systems and devices,
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
* spanning the era between 1981 and 1995.
*
* Simple program to show usage of (Win)Pcap.
*
* Based on the "libpcap" examples.
*
*
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
*
* Copyright 2017-2018 Fred N. van Kempen.
*
* Redistribution and use in source and binary forms, with
* or without modification, are permitted provided that the
* following conditions are met:
*
* 1. Redistributions of source code must retain the entire
* above notice, this list of conditions and the following
* disclaimer.
*
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names
* of its contributors may be used to endorse or promote
* products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdarg.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <ctype.h>
#include <pcap/pcap.h>
#include <time.h>
#define HAVE_STDARG_H
#include <86box/86box.h>
#include <86box/plat.h>
#include <86box/plat_dynld.h>
static void *pcap_handle; /* handle to WinPcap DLL */
/* Pointers to the real functions. */
static int (*f_pcap_findalldevs)(pcap_if_t **, char *);
static void (*f_pcap_freealldevs)(pcap_if_t *);
static pcap_t *(*f_pcap_open_live)(const char *, int, int, int, char *);
static int (*f_pcap_next_ex)(pcap_t *, struct pcap_pkthdr **, const unsigned char **);
static void (*f_pcap_close)(pcap_t *);
static dllimp_t pcap_imports[] = {
// clang-format off
{ "pcap_findalldevs", &f_pcap_findalldevs },
{ "pcap_freealldevs", &f_pcap_freealldevs },
{ "pcap_open_live", &f_pcap_open_live },
{ "pcap_next_ex", &f_pcap_next_ex },
{ "pcap_close", &f_pcap_close },
{ NULL, NULL },
// clang-format on
};
typedef struct {
char device[128];
char description[128];
} capdev_t;
/* Retrieve an easy-to-use list of devices. */
static int
get_devlist(capdev_t *list)
{
char errbuf[PCAP_ERRBUF_SIZE];
pcap_if_t *devlist;
int i = 0;
/* Retrieve the device list from the local machine */
if (f_pcap_findalldevs(&devlist, errbuf) == -1) {
fprintf(stderr, "Error in pcap_findalldevs_ex: %s\n", errbuf);
return (-1);
}
for (pcap_if_t *dev = devlist; dev != NULL; dev = dev->next) {
strcpy(list->device, dev->name);
if (dev->description)
strcpy(list->description, dev->description);
else
memset(list->description, '\0', sizeof(list->description));
list++;
i++;
}
/* Release the memory. */
f_pcap_freealldevs(devlist);
return i;
}
/* Simple HEXDUMP routine for raw data. */
static void
hex_dump(unsigned char *bufp, int len)
{
char asci[20];
unsigned char c;
long addr;
addr = 0;
while (len-- > 0) {
c = bufp[addr];
if ((addr % 16) == 0)
printf("%04lx %02x", addr, c);
else
printf(" %02x", c);
asci[addr & 15] = (uint8_t) isprint(c) ? c : '.';
if ((++addr % 16) == 0) {
asci[16] = '\0';
printf(" | %s |\n", asci);
}
}
if (addr % 16) {
while (addr % 16) {
printf(" ");
asci[addr & 15] = ' ';
addr++;
}
asci[16] = '\0';
printf(" | %s |\n", asci);
}
}
/* Print a standard Ethernet MAC address. */
static void
eth_praddr(unsigned char *ptr)
{
printf("%02x:%02x:%02x:%02x:%02x:%02x",
ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5]);
}
/* Print a standard Ethernet header. */
static int
eth_prhdr(unsigned char *ptr)
{
unsigned short type;
printf("Ethernet ");
eth_praddr(ptr + 6);
printf(" > ");
eth_praddr(ptr);
type = (ptr[12] << 8) | ptr[13];
printf(" type %04x\n", type);
return 14;
}
/* Capture packets from the network, and print them. */
static int
start_cap(char *dev)
{
char temp[PCAP_ERRBUF_SIZE];
struct pcap_pkthdr *hdr;
const unsigned char *pkt;
const struct tm *ltime;
time_t now;
pcap_t *pcap;
int rc;
/* Open the device for reading from it. */
pcap = f_pcap_open_live(dev,
1518, /* MTU */
1, /* promisc mode */
10, /* timeout */
temp);
if (pcap == NULL) {
fprintf(stderr, "Pcap: open_live(%s): %s\n", dev, temp);
return 2;
}
printf("Listening on '%s'..\n", dev);
for (;;) {
rc = f_pcap_next_ex(pcap, &hdr, &pkt);
if (rc < 0)
break;
/* Did we time out? */
if (rc == 0)
continue;
/* Convert the timestamp to readable format. */
now = hdr->ts.tv_sec;
ltime = localtime(&now);
strftime(temp, sizeof(temp), "%H:%M:%S", ltime);
/* Process and print the packet. */
printf("\n<< %s,%.6ld len=%u\n",
temp, hdr->ts.tv_usec, hdr->len);
rc = eth_prhdr((unsigned char *) pkt);
hex_dump((unsigned char *) pkt + rc, hdr->len - rc);
}
/* All done, close up. */
f_pcap_close(pcap);
return 0;
}
/* Show a list of available network interfaces. */
static void
show_devs(capdev_t *list, int num)
{
if (num > 0) {
printf("Available network interfaces:\n\n");
for (int i = 0; i < num; i++) {
printf(" %d - %s\n", i + 1, list->device);
if (list->description[0] != '\0')
printf(" (%s)\n", list->description);
else
printf(" (No description available)\n");
list++;
printf("\n");
}
} else {
printf("No interfaces found!\nMake sure WinPcap is installed.\n");
}
}
int
main(int argc, char **argv)
{
capdev_t interfaces[32];
int numdev;
int i;
/* Try loading the DLL. */
#ifdef _WIN32
pcap_handle = dynld_module("wpcap.dll", pcap_imports);
#elif defined __APPLE__
pcap_handle = dynld_module("libpcap.dylib", pcap_imports);
#else
pcap_handle = dynld_module("libpcap.so", pcap_imports);
#endif
if (pcap_handle == NULL) {
#ifdef _WIN32
fprintf(stderr, "Unable to load WinPcap DLL !\n");
#else
fprintf(stderr, "Unable to load libpcap.so !\n");
#endif
return 1;
}
/* Get the list. */
numdev = get_devlist(interfaces);
if (argc == 1) {
/* No arguments, just show the list. */
show_devs(interfaces, numdev);
dynld_close(pcap_handle);
return numdev;
}
/* Assume argument to be the interface number to listen on. */
i = atoi(argv[1]);
if (i < 0 || i > numdev) {
fprintf(stderr, "Invalid interface number %d !\n", i);
dynld_close(pcap_handle);
return 1;
}
/* Looks good, go and listen.. */
i = start_cap(interfaces[i - 1].device);
dynld_close(pcap_handle);
return i;
}

View File

@@ -0,0 +1,81 @@
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Christos Zoulas.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
ssize_t
local_getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp)
{
char *ptr, *eptr;
if (*buf == NULL || *bufsiz == 0) {
*bufsiz = BUFSIZ;
if ((*buf = malloc(*bufsiz)) == NULL)
return -1;
}
for (ptr = *buf, eptr = *buf + *bufsiz;;) {
int c = fgetc(fp);
if (c == -1) {
if (feof(fp)) {
ssize_t diff = (ssize_t)(ptr - *buf);
if (diff != 0) {
*ptr = '\0';
return diff;
}
}
return -1;
}
*ptr++ = c;
if (c == delimiter) {
*ptr = '\0';
return ptr - *buf;
}
if (ptr + 2 >= eptr) {
char *nbuf;
size_t nbufsiz = *bufsiz * 2;
ssize_t d = ptr - *buf;
if ((nbuf = realloc(*buf, nbufsiz)) == NULL)
return -1;
*buf = nbuf;
*bufsiz = nbufsiz;
eptr = nbuf + nbufsiz;
ptr = nbuf + d;
}
}
}
ssize_t
local_getline(char **buf, size_t *bufsiz, FILE *fp)
{
return local_getdelim(buf, bufsiz, '\n', fp);
}

164
src/pit.c
View File

@@ -47,6 +47,7 @@ pit_intf_t pit_devs[2];
double cpuclock;
double PITCONSTD;
double PAS16CONSTD;
double SYSCLK;
double isa_timing;
double bus_timing;
@@ -56,6 +57,7 @@ double PCICLK;
double AGPCLK;
uint64_t PITCONST;
uint64_t PAS16CONST;
uint64_t ISACONST;
uint64_t CGACONST;
uint64_t MDACONST;
@@ -94,13 +96,16 @@ pit_log(const char *fmt, ...)
#endif
static void
ctr_set_out(ctr_t *ctr, int out)
ctr_set_out(ctr_t *ctr, int out, void *priv)
{
pit_t *pit = (pit_t *)priv;
if (ctr == NULL)
return;
if (ctr->out_func != NULL)
ctr->out_func(out, ctr->out);
ctr->out_func(out, ctr->out, pit);
ctr->out = out;
}
@@ -146,8 +151,9 @@ ctr_load_count(ctr_t *ctr)
}
static void
ctr_tick(ctr_t *ctr)
ctr_tick(ctr_t *ctr, void *priv)
{
pit_t *pit = (pit_t *)priv;
uint8_t state = ctr->state;
if ((state & 0x03) == 0x01) {
@@ -155,7 +161,7 @@ ctr_tick(ctr_t *ctr)
ctr_load_count(ctr);
ctr->state++;
if (((ctr->m & 0x07) == 0x01) && (ctr->state == 2))
ctr_set_out(ctr, 0);
ctr_set_out(ctr, 0, pit);
} else switch (ctr->m & 0x07) {
case 0:
/* Interrupt on terminal count */
@@ -165,7 +171,7 @@ ctr_tick(ctr_t *ctr)
ctr_decrease_count(ctr);
if (ctr->count < 1) {
ctr->state = 3;
ctr_set_out(ctr, 1);
ctr_set_out(ctr, 1, pit);
}
}
break;
@@ -185,7 +191,7 @@ ctr_tick(ctr_t *ctr)
ctr_decrease_count(ctr);
if (ctr->count < 1) {
ctr->state = 3;
ctr_set_out(ctr, 1);
ctr_set_out(ctr, 1, pit);
}
}
break;
@@ -205,7 +211,7 @@ ctr_tick(ctr_t *ctr)
case 3:
ctr_load_count(ctr);
ctr->state = 2;
ctr_set_out(ctr, 1);
ctr_set_out(ctr, 1, pit);
break;
case 2:
if (ctr->gate == 0)
@@ -214,7 +220,7 @@ ctr_tick(ctr_t *ctr)
ctr_decrease_count(ctr);
if (ctr->count < 2) {
ctr->state = 3;
ctr_set_out(ctr, 0);
ctr_set_out(ctr, 0, pit);
}
}
break;
@@ -240,7 +246,7 @@ ctr_tick(ctr_t *ctr)
if (ctr->count < 0) {
ctr_load_count(ctr);
ctr->state = 3;
ctr_set_out(ctr, 0);
ctr_set_out(ctr, 0, pit);
} else if (ctr->newcount)
ctr->newcount = 0;
}
@@ -259,7 +265,7 @@ ctr_tick(ctr_t *ctr)
if (ctr->count < 0) {
ctr_load_count(ctr);
ctr->state = 2;
ctr_set_out(ctr, 1);
ctr_set_out(ctr, 1, pit);
} else if (ctr->newcount)
ctr->newcount = 0;
}
@@ -284,13 +290,13 @@ ctr_tick(ctr_t *ctr)
ctr_decrease_count(ctr);
if (ctr->count < 1) {
ctr->state = 3;
ctr_set_out(ctr, 0);
ctr_set_out(ctr, 0, pit);
}
}
break;
case 3:
ctr->state = 0;
ctr_set_out(ctr, 1);
ctr_set_out(ctr, 1, pit);
break;
default:
@@ -316,7 +322,7 @@ ctr_clock(void *data, int counter_id)
if (ctr->using_timer)
return;
ctr_tick(ctr);
ctr_tick(ctr, pit);
}
static void
@@ -351,7 +357,7 @@ ctr_load(ctr_t *ctr)
if (ctr->load_func != NULL)
ctr->load_func(ctr->m, ctr->l ? ctr->l : 0x10000);
pit_log("Counter loaded, state = %i, gate = %i\n", ctr->state, ctr->gate);
pit_log("Counter loaded, state = %i, gate = %i, latch = %i\n", ctr->state, ctr->gate, ctr->latch);
}
static __inline void
@@ -390,7 +396,7 @@ ctr_latch_count(ctr_t *ctr)
break;
}
pit_log("latched counter = %04X\n", ctr->rl & 0xffff);
pit_log("rm = %x, latched counter = %04X\n", ctr->rm & 0x03, ctr->rl & 0xffff);
}
uint16_t
@@ -415,7 +421,7 @@ pit_ctr_set_load_func(void *data, int counter_id, void (*func)(uint8_t new_m, in
}
void
pit_ctr_set_out_func(void *data, int counter_id, void (*func)(int new_out, int old_out))
pit_ctr_set_out_func(void *data, int counter_id, void (*func)(int new_out, int old_out, void *priv))
{
if (data == NULL)
return;
@@ -448,14 +454,14 @@ pit_ctr_set_gate(void *data, int counter_id, int gate)
/* Here we handle the rising edges. */
if (mode & 1) {
if (mode != 1)
ctr_set_out(ctr, 1);
ctr_set_out(ctr, 1, pit);
ctr->state = 1;
} else if (mode == 2)
ctr->state = 3;
} else if (old && !gate) {
/* Here we handle the lowering edges. */
if (mode & 2)
ctr_set_out(ctr, 1);
ctr_set_out(ctr, 1, pit);
}
break;
@@ -465,8 +471,9 @@ pit_ctr_set_gate(void *data, int counter_id, int gate)
}
static __inline void
pit_ctr_set_clock_common(ctr_t *ctr, int clock)
pit_ctr_set_clock_common(ctr_t *ctr, int clock, void *priv)
{
pit_t *pit = (pit_t *)priv;
int old = ctr->clock;
ctr->clock = clock;
@@ -484,18 +491,18 @@ pit_ctr_set_clock_common(ctr_t *ctr, int clock)
ctr->s1_det++; /* Falling edge. */
if (ctr->s1_det >= 2) {
ctr->s1_det = 0;
ctr_tick(ctr);
ctr_tick(ctr, pit);
}
}
} else if (old && !ctr->clock)
ctr_tick(ctr);
ctr_tick(ctr, pit);
}
}
void
pit_ctr_set_clock(ctr_t *ctr, int clock)
pit_ctr_set_clock(ctr_t *ctr, int clock, void *priv)
{
pit_ctr_set_clock_common(ctr, clock);
pit_ctr_set_clock_common(ctr, clock, priv);
}
void
@@ -516,9 +523,9 @@ pit_timer_over(void *priv)
dev->clock ^= 1;
for (uint8_t i = 0; i < 3; i++)
pit_ctr_set_clock_common(&dev->counters[i], dev->clock);
pit_ctr_set_clock_common(&dev->counters[i], dev->clock, dev);
timer_advance_u64(&dev->callback_timer, PITCONST >> 1ULL);
timer_advance_u64(&dev->callback_timer, dev->pit_const >> 1ULL);
}
static void
@@ -528,7 +535,8 @@ pit_write(uint16_t addr, uint8_t val, void *priv)
int t = (addr & 3);
ctr_t *ctr;
pit_log("[%04X:%08X] pit_write(%04X, %02X, %08X)\n", CS, cpu_state.pc, addr, val, priv);
if ((dev->flags & (PIT_8254 | PIT_EXT_IO)))
pit_log("[%04X:%08X] pit_write(%04X, %02X, %08X)\n", CS, cpu_state.pc, addr, val, priv);
switch (addr & 3) {
case 3: /* control */
@@ -544,7 +552,8 @@ pit_write(uint16_t addr, uint8_t val, void *priv)
ctr_latch_count(&dev->counters[1]);
if (val & 8)
ctr_latch_count(&dev->counters[2]);
pit_log("PIT %i: Initiated readback command\n", t);
if ((dev->flags & (PIT_8254 | PIT_EXT_IO)))
pit_log("PIT %i: Initiated readback command\n", t);
}
if (!(val & 0x10)) {
if (val & 2)
@@ -561,7 +570,8 @@ pit_write(uint16_t addr, uint8_t val, void *priv)
if (!(dev->ctrl & 0x30)) {
ctr_latch_count(ctr);
pit_log("PIT %i: Initiated latched read, %i bytes latched\n",
if ((dev->flags & (PIT_8254 | PIT_EXT_IO)))
pit_log("PIT %i: Initiated latched read, %i bytes latched\n",
t, ctr->latched);
} else {
ctr->ctrl = val;
@@ -571,14 +581,16 @@ pit_write(uint16_t addr, uint8_t val, void *priv)
ctr->m &= 3;
ctr->null_count = 1;
ctr->bcd = (ctr->ctrl & 0x01);
ctr_set_out(ctr, !!ctr->m);
ctr_set_out(ctr, !!ctr->m, dev);
ctr->state = 0;
if (ctr->latched) {
pit_log("PIT %i: Reload while counter is latched\n", t);
if ((dev->flags & (PIT_8254 | PIT_EXT_IO)))
pit_log("PIT %i: Reload while counter is latched\n", t);
ctr->rl--;
}
pit_log("PIT %i: M = %i, RM/WM = %i, State = %i, Out = %i\n", t, ctr->m, ctr->rm, ctr->state, ctr->out);
if ((dev->flags & (PIT_8254 | PIT_EXT_IO)))
pit_log("PIT %i: M = %i, RM/WM = %i, State = %i, Out = %i\n", t, ctr->m, ctr->rm, ctr->state, ctr->out);
}
}
break;
@@ -594,31 +606,44 @@ pit_write(uint16_t addr, uint8_t val, void *priv)
break;
case 1:
ctr->l = val;
ctr->lback = ctr->l;
ctr->lback2 = ctr->l;
if ((dev->flags & (PIT_8254 | PIT_EXT_IO)))
pit_log("PIT %i (1): Written byte %02X, latch now %04X\n", t, val, ctr->l);
if (ctr->m == 0)
ctr_set_out(ctr, 0);
ctr_set_out(ctr, 0, dev);
ctr_load(ctr);
break;
case 2:
ctr->l = (val << 8);
ctr->lback = ctr->l;
ctr->lback2 = ctr->l;
if ((dev->flags & (PIT_8254 | PIT_EXT_IO)))
pit_log("PIT %i (2): Written byte %02X, latch now %04X\n", t, val, ctr->l);
if (ctr->m == 0)
ctr_set_out(ctr, 0);
ctr_set_out(ctr, 0, dev);
ctr_load(ctr);
break;
case 3:
case 0x83:
if (ctr->wm & 0x80) {
ctr->l = (ctr->l & 0x00ff) | (val << 8);
pit_log("PIT %i: Written high byte %02X, latch now %04X\n", t, val, ctr->l);
ctr->lback = ctr->l;
ctr->lback2 = ctr->l;
if ((dev->flags & (PIT_8254 | PIT_EXT_IO)))
pit_log("PIT %i (0x83): Written high byte %02X, latch now %04X\n", t, val, ctr->l);
ctr_load(ctr);
} else {
ctr->l = (ctr->l & 0xff00) | val;
pit_log("PIT %i: Written low byte %02X, latch now %04X\n", t, val, ctr->l);
ctr->lback = ctr->l;
ctr->lback2 = ctr->l;
if ((dev->flags & (PIT_8254 | PIT_EXT_IO)))
pit_log("PIT %i (3): Written low byte %02X, latch now %04X\n", t, val, ctr->l);
if (ctr->m == 0) {
ctr->state = 0;
ctr_set_out(ctr, 0);
ctr_set_out(ctr, 0, dev);
}
}
if (ctr->wm & 0x80)
ctr->wm &= ~0x80;
else
@@ -749,13 +774,14 @@ pit_read(uint16_t addr, void *priv)
break;
}
pit_log("[%04X:%08X] pit_read(%04X, %08X) = %02X\n", CS, cpu_state.pc, addr, priv, ret);
if ((dev->flags & (PIT_8254 | PIT_EXT_IO)))
pit_log("[%04X:%08X] pit_read(%04X, %08X) = %02X\n", CS, cpu_state.pc, addr, priv, ret);
return ret;
}
void
pit_irq0_timer_ps2(int new_out, int old_out)
pit_irq0_timer_ps2(int new_out, int old_out, UNUSED(void *priv))
{
if (new_out && !old_out) {
picint(1);
@@ -770,21 +796,21 @@ pit_irq0_timer_ps2(int new_out, int old_out)
}
void
pit_refresh_timer_xt(int new_out, int old_out)
pit_refresh_timer_xt(int new_out, int old_out, UNUSED(void *priv))
{
if (new_out && !old_out)
dma_channel_read(0);
}
void
pit_refresh_timer_at(int new_out, int old_out)
pit_refresh_timer_at(int new_out, int old_out, UNUSED(void *priv))
{
if (refresh_at_enable && new_out && !old_out)
ppi.pb ^= 0x10;
}
void
pit_speaker_timer(int new_out, UNUSED(int old_out))
pit_speaker_timer(int new_out, UNUSED(int old_out), UNUSED(void *priv))
{
int l;
@@ -804,7 +830,7 @@ pit_speaker_timer(int new_out, UNUSED(int old_out))
}
void
pit_nmi_timer_ps2(int new_out, UNUSED(int old_out))
pit_nmi_timer_ps2(int new_out, UNUSED(int old_out), UNUSED(void *priv))
{
nmi = new_out;
@@ -849,6 +875,20 @@ pit_handler(int set, uint16_t base, int size, void *priv)
io_handler(set, base, size, pit_read, NULL, NULL, pit_write, NULL, NULL, priv);
}
void
pit_set_pit_const(void *data, uint64_t pit_const)
{
pit_t *pit = (pit_t *) data;
pit->pit_const = pit_const;
}
static void
pit_speed_changed(void *priv)
{
pit_set_pit_const(priv, PITCONST);
}
static void
pit_close(void *priv)
{
@@ -868,14 +908,18 @@ static void *
pit_init(const device_t *info)
{
pit_t *dev = (pit_t *) malloc(sizeof(pit_t));
pit_reset(dev);
pit_set_pit_const(dev, PITCONST);
if (!(dev->flags & PIT_PS2) && !(dev->flags & PIT_CUSTOM_CLOCK)) {
timer_add(&dev->callback_timer, pit_timer_over, (void *) dev, 0);
timer_set_delay_u64(&dev->callback_timer, PITCONST >> 1ULL);
timer_set_delay_u64(&dev->callback_timer, dev->pit_const >> 1ULL);
}
dev->flags = info->local;
dev->dev_priv = NULL;
if (!(dev->flags & PIT_EXT_IO)) {
io_sethandler((dev->flags & PIT_SECONDARY) ? 0x0048 : 0x0040, 0x0004,
@@ -894,6 +938,20 @@ const device_t i8253_device = {
.close = pit_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = pit_speed_changed,
.force_redraw = NULL,
.config = NULL
};
const device_t i8253_ext_io_device = {
.name = "Intel 8253 Programmable Interval Timer (External I/O)",
.internal_name = "i8253_ext_io",
.flags = DEVICE_ISA,
.local = PIT_8253 | PIT_EXT_IO,
.init = pit_init,
.close = pit_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
@@ -908,7 +966,7 @@ const device_t i8254_device = {
.close = pit_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.speed_changed = pit_speed_changed,
.force_redraw = NULL,
.config = NULL
};
@@ -922,7 +980,7 @@ const device_t i8254_sec_device = {
.close = pit_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.speed_changed = pit_speed_changed,
.force_redraw = NULL,
.config = NULL
};
@@ -950,13 +1008,13 @@ const device_t i8254_ps2_device = {
.close = pit_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.speed_changed = pit_speed_changed,
.force_redraw = NULL,
.config = NULL
};
pit_t *
pit_common_init(int type, void (*out0)(int new_out, int old_out), void (*out1)(int new_out, int old_out))
pit_common_init(int type, void (*out0)(int new_out, int old_out, void *priv), void (*out1)(int new_out, int old_out, void *priv))
{
void *pit;
@@ -1035,6 +1093,12 @@ pit_ps2_init(int type)
return pit;
}
void
pit_change_pas16_const(double prescale)
{
PAS16CONST = (uint64_t) ((PITCONSTD / prescale) * (double) (1ULL << 32));
}
void
pit_set_clock(uint32_t clock)
{
@@ -1130,6 +1194,9 @@ pit_set_clock(uint32_t clock)
TIMER_USEC = (uint64_t) ((cpuclock / 1000000.0) * (double) (1ULL << 32));
PAS16CONSTD = (cpuclock / 441000.0);
PAS16CONST = (uint64_t) (PITCONSTD * (double) (1ULL << 32));
isa_timing = (cpuclock / (double) cpu_isa_speed);
if (cpu_64bitbus)
bus_timing = (cpuclock / (cpu_busspeed / 2));
@@ -1161,5 +1228,6 @@ const pit_intf_t pit_classic_intf = {
&pit_ctr_set_out_func,
&pit_ctr_set_load_func,
&ctr_clock,
&pit_set_pit_const,
NULL,
};

View File

@@ -66,13 +66,15 @@ pit_log(const char *fmt, ...)
#endif
static void
pitf_ctr_set_out(ctrf_t *ctr, int out)
pitf_ctr_set_out(ctrf_t *ctr, int out, void *priv)
{
pitf_t *pit = (pitf_t *)priv;
if (ctr == NULL)
return;
if (ctr->out_func != NULL)
ctr->out_func(out, ctr->out);
ctr->out_func(out, ctr->out, pit);
ctr->out = out;
}
@@ -98,7 +100,7 @@ pitf_ctr_get_count(void *data, int counter_id)
}
static void
pitf_ctr_set_out_func(void *data, int counter_id, void (*func)(int new_out, int old_out))
pitf_ctr_set_out_func(void *data, int counter_id, void (*func)(int new_out, int old_out, void *priv))
{
if (data == NULL)
return;
@@ -124,7 +126,7 @@ static int
pitf_read_timer(ctrf_t *ctr)
{
if (ctr->using_timer && !(ctr->m == 3 && !ctr->gate) && timer_is_enabled(&ctr->timer)) {
int read = (int) ((timer_get_remaining_u64(&ctr->timer)) / PITCONST);
int read = (int) ((timer_get_remaining_u64(&ctr->timer)) / ctr->pit_const);
if (ctr->m == 2)
read++;
if (read < 0)
@@ -154,8 +156,9 @@ pitf_dump_and_disable_timer(ctrf_t *ctr)
}
static void
pitf_ctr_load(ctrf_t *ctr)
pitf_ctr_load(ctrf_t *ctr, void *priv)
{
pitf_t *pit = (pitf_t *)priv;
int l = ctr->l ? ctr->l : 0x10000;
ctr->newcount = 0;
@@ -165,8 +168,8 @@ pitf_ctr_load(ctrf_t *ctr)
case 0: /*Interrupt on terminal count*/
ctr->count = l;
if (ctr->using_timer)
timer_set_delay_u64(&ctr->timer, (uint64_t) (l * PITCONST));
pitf_ctr_set_out(ctr, 0);
timer_set_delay_u64(&ctr->timer, (uint64_t) (l * ctr->pit_const));
pitf_ctr_set_out(ctr, 0, pit);
ctr->thit = 0;
ctr->enabled = ctr->gate;
break;
@@ -177,8 +180,8 @@ pitf_ctr_load(ctrf_t *ctr)
if (ctr->initial) {
ctr->count = l - 1;
if (ctr->using_timer)
timer_set_delay_u64(&ctr->timer, (uint64_t) ((l - 1) * PITCONST));
pitf_ctr_set_out(ctr, 1);
timer_set_delay_u64(&ctr->timer, (uint64_t) ((l - 1) * ctr->pit_const));
pitf_ctr_set_out(ctr, 1, pit);
ctr->thit = 0;
}
ctr->enabled = ctr->gate;
@@ -187,8 +190,8 @@ pitf_ctr_load(ctrf_t *ctr)
if (ctr->initial) {
ctr->count = l;
if (ctr->using_timer)
timer_set_delay_u64(&ctr->timer, (uint64_t) (((l + 1) >> 1) * PITCONST));
pitf_ctr_set_out(ctr, 1);
timer_set_delay_u64(&ctr->timer, (uint64_t) (((l + 1) >> 1) * ctr->pit_const));
pitf_ctr_set_out(ctr, 1, pit);
ctr->thit = 0;
}
ctr->enabled = ctr->gate;
@@ -199,8 +202,8 @@ pitf_ctr_load(ctrf_t *ctr)
else {
ctr->count = l;
if (ctr->using_timer)
timer_set_delay_u64(&ctr->timer, (uint64_t) (l * PITCONST));
pitf_ctr_set_out(ctr, 0);
timer_set_delay_u64(&ctr->timer, (uint64_t) (l * ctr->pit_const));
pitf_ctr_set_out(ctr, 0, pit);
ctr->thit = 0;
}
ctr->enabled = ctr->gate;
@@ -223,8 +226,9 @@ pitf_ctr_load(ctrf_t *ctr)
}
static void
pitf_set_gate_no_timer(ctrf_t *ctr, int gate)
pitf_set_gate_no_timer(ctrf_t *ctr, int gate, void *priv)
{
pitf_t *pit = (pitf_t *)priv;
int l = ctr->l ? ctr->l : 0x10000;
if (ctr->disabled) {
@@ -236,7 +240,7 @@ pitf_set_gate_no_timer(ctrf_t *ctr, int gate)
case 0: /*Interrupt on terminal count*/
case 4: /*Software triggered stobe*/
if (ctr->using_timer && !ctr->running)
timer_set_delay_u64(&ctr->timer, (uint64_t) (l * PITCONST));
timer_set_delay_u64(&ctr->timer, (uint64_t) (l * ctr->pit_const));
ctr->enabled = gate;
break;
case 1: /*Hardware retriggerable one-shot*/
@@ -244,8 +248,8 @@ pitf_set_gate_no_timer(ctrf_t *ctr, int gate)
if (gate && !ctr->gate) {
ctr->count = l;
if (ctr->using_timer)
timer_set_delay_u64(&ctr->timer, (uint64_t) (l * PITCONST));
pitf_ctr_set_out(ctr, 0);
timer_set_delay_u64(&ctr->timer, (uint64_t) (l * ctr->pit_const));
pitf_ctr_set_out(ctr, 0, pit);
ctr->thit = 0;
ctr->enabled = 1;
}
@@ -254,8 +258,8 @@ pitf_set_gate_no_timer(ctrf_t *ctr, int gate)
if (gate && !ctr->gate) {
ctr->count = l - 1;
if (ctr->using_timer)
timer_set_delay_u64(&ctr->timer, (uint64_t) (l * PITCONST));
pitf_ctr_set_out(ctr, 1);
timer_set_delay_u64(&ctr->timer, (uint64_t) (l * ctr->pit_const));
pitf_ctr_set_out(ctr, 1, pit);
ctr->thit = 0;
}
ctr->enabled = gate;
@@ -264,8 +268,8 @@ pitf_set_gate_no_timer(ctrf_t *ctr, int gate)
if (gate && !ctr->gate) {
ctr->count = l;
if (ctr->using_timer)
timer_set_delay_u64(&ctr->timer, (uint64_t) (((l + 1) >> 1) * PITCONST));
pitf_ctr_set_out(ctr, 1);
timer_set_delay_u64(&ctr->timer, (uint64_t) (((l + 1) >> 1) * ctr->pit_const));
pitf_ctr_set_out(ctr, 1, pit);
ctr->thit = 0;
}
ctr->enabled = gate;
@@ -291,17 +295,18 @@ pitf_ctr_set_gate(void *data, int counter_id, int gate)
return;
}
pitf_set_gate_no_timer(ctr, gate);
pitf_set_gate_no_timer(ctr, gate, pit);
}
static void
pitf_over(ctrf_t *ctr)
pitf_over(ctrf_t *ctr, void *priv)
{
pitf_t *pit = (pitf_t *)priv;
int l = ctr->l ? ctr->l : 0x10000;
if (ctr->disabled) {
ctr->count += 0xffff;
if (ctr->using_timer)
timer_advance_u64(&ctr->timer, (uint64_t) (0xffff * PITCONST));
timer_advance_u64(&ctr->timer, (uint64_t) (0xffff * ctr->pit_const));
return;
}
@@ -309,62 +314,62 @@ pitf_over(ctrf_t *ctr)
case 0: /*Interrupt on terminal count*/
case 1: /*Hardware retriggerable one-shot*/
if (!ctr->thit)
pitf_ctr_set_out(ctr, 1);
pitf_ctr_set_out(ctr, 1, pit);
ctr->thit = 1;
ctr->count += 0xffff;
if (ctr->using_timer)
timer_advance_u64(&ctr->timer, (uint64_t) (0xffff * PITCONST));
timer_advance_u64(&ctr->timer, (uint64_t) (0xffff * ctr->pit_const));
break;
case 2: /*Rate generator*/
ctr->count += l;
if (ctr->using_timer)
timer_advance_u64(&ctr->timer, (uint64_t) (l * PITCONST));
pitf_ctr_set_out(ctr, 0);
pitf_ctr_set_out(ctr, 1);
timer_advance_u64(&ctr->timer, (uint64_t) (l * ctr->pit_const));
pitf_ctr_set_out(ctr, 0, pit);
pitf_ctr_set_out(ctr, 1, pit);
break;
case 3: /*Square wave mode*/
if (ctr->out) {
pitf_ctr_set_out(ctr, 0);
pitf_ctr_set_out(ctr, 0, pit);
ctr->count += (l >> 1);
if (ctr->using_timer)
timer_advance_u64(&ctr->timer, (uint64_t) ((l >> 1) * PITCONST));
timer_advance_u64(&ctr->timer, (uint64_t) ((l >> 1) * ctr->pit_const));
} else {
pitf_ctr_set_out(ctr, 1);
pitf_ctr_set_out(ctr, 1, pit);
ctr->count += ((l + 1) >> 1);
if (ctr->using_timer)
timer_advance_u64(&ctr->timer, (uint64_t) (((l + 1) >> 1) * PITCONST));
timer_advance_u64(&ctr->timer, (uint64_t) (((l + 1) >> 1) * ctr->pit_const));
}
#if 0
if (!t)
pclog("pit_over: square wave mode c=%x %lli %f\n", pit.c[t], tsc, PITCONST);
pclog("pit_over: square wave mode c=%x %lli %f\n", pit.c[t], tsc, ctr->pit_const);
#endif
break;
case 4: /*Software triggered strove*/
if (!ctr->thit) {
pitf_ctr_set_out(ctr, 0);
pitf_ctr_set_out(ctr, 1);
pitf_ctr_set_out(ctr, 0, pit);
pitf_ctr_set_out(ctr, 1, pit);
}
if (ctr->newcount) {
ctr->newcount = 0;
ctr->count += l;
if (ctr->using_timer)
timer_advance_u64(&ctr->timer, (uint64_t) (l * PITCONST));
timer_advance_u64(&ctr->timer, (uint64_t) (l * ctr->pit_const));
} else {
ctr->thit = 1;
ctr->count += 0xffff;
if (ctr->using_timer)
timer_advance_u64(&ctr->timer, (uint64_t) (0xffff * PITCONST));
timer_advance_u64(&ctr->timer, (uint64_t) (0xffff * ctr->pit_const));
}
break;
case 5: /*Hardware triggered strove*/
if (!ctr->thit) {
pitf_ctr_set_out(ctr, 0);
pitf_ctr_set_out(ctr, 1);
pitf_ctr_set_out(ctr, 0, pit);
pitf_ctr_set_out(ctr, 1, pit);
}
ctr->thit = 1;
ctr->count += 0xffff;
if (ctr->using_timer)
timer_advance_u64(&ctr->timer, (uint64_t) (0xffff * PITCONST));
timer_advance_u64(&ctr->timer, (uint64_t) (0xffff * ctr->pit_const));
break;
default:
@@ -453,9 +458,9 @@ pitf_write(uint16_t addr, uint8_t val, void *priv)
ctr->rereadlatch = 1;
ctr->initial = 1;
if (!ctr->m)
pitf_ctr_set_out(ctr, 0);
pitf_ctr_set_out(ctr, 0, dev);
else
pitf_ctr_set_out(ctr, 1);
pitf_ctr_set_out(ctr, 1, dev);
ctr->disabled = 1;
pit_log("PIT %i: M = %i, RM/WM = %i, State = %i, Out = %i\n", t, ctr->m, ctr->rm, ctr->state, ctr->out);
@@ -472,16 +477,16 @@ pitf_write(uint16_t addr, uint8_t val, void *priv)
switch (ctr->wm) {
case 1:
ctr->l = val;
pitf_ctr_load(ctr);
pitf_ctr_load(ctr, dev);
break;
case 2:
ctr->l = (val << 8);
pitf_ctr_load(ctr);
pitf_ctr_load(ctr, dev);
break;
case 0:
ctr->l &= 0xFF;
ctr->l |= (val << 8);
pitf_ctr_load(ctr);
pitf_ctr_load(ctr, dev);
ctr->wm = 3;
break;
case 3:
@@ -610,7 +615,8 @@ static void
pitf_timer_over(void *priv)
{
ctrf_t *ctr = (ctrf_t *) priv;
pitf_over(ctr);
pit_t *pit = (pit_t *)ctr->priv;
pitf_over(ctr, pit);
}
static void
@@ -627,7 +633,7 @@ pitf_ctr_clock(void *data, int counter_id)
ctr->count -= (ctr->m == 3) ? 2 : 1;
if (!ctr->count)
pitf_over(ctr);
pitf_over(ctr, pit);
}
static void
@@ -653,6 +659,24 @@ pitf_reset(pitf_t *dev)
dev->counters[2].gate = 0;
}
void
pitf_set_pit_const(void *data, uint64_t pit_const)
{
pitf_t *pit = (pitf_t *) data;
ctrf_t *ctr;
for (uint8_t i = 0; i < 3; i++) {
ctr = &pit->counters[i];
ctr->pit_const = pit_const;
}
}
static void
pitf_speed_changed(void *priv)
{
pitf_set_pit_const(priv, PITCONST);
}
static void
pitf_close(void *priv)
{
@@ -672,13 +696,17 @@ static void *
pitf_init(const device_t *info)
{
pitf_t *dev = (pitf_t *) malloc(sizeof(pitf_t));
pitf_reset(dev);
pitf_set_pit_const(dev, PITCONST);
dev->flags = info->local;
if (!(dev->flags & PIT_PS2) && !(dev->flags & PIT_CUSTOM_CLOCK)) {
for (int i = 0; i < 3; i++) {
ctrf_t *ctr = &dev->counters[i];
ctr->priv = dev;
timer_add(&ctr->timer, pitf_timer_over, (void *) ctr, 0);
}
}
@@ -700,7 +728,7 @@ const device_t i8253_fast_device = {
.close = pitf_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.speed_changed = pitf_speed_changed,
.force_redraw = NULL,
.config = NULL
};
@@ -714,7 +742,7 @@ const device_t i8254_fast_device = {
.close = pitf_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.speed_changed = pitf_speed_changed,
.force_redraw = NULL,
.config = NULL
};
@@ -728,7 +756,7 @@ const device_t i8254_sec_fast_device = {
.close = pitf_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.speed_changed = pitf_speed_changed,
.force_redraw = NULL,
.config = NULL
};
@@ -756,7 +784,7 @@ const device_t i8254_ps2_fast_device = {
.close = pitf_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.speed_changed = pitf_speed_changed,
.force_redraw = NULL,
.config = NULL
};
@@ -770,5 +798,6 @@ const pit_intf_t pit_fast_intf = {
&pitf_ctr_set_out_func,
&pitf_ctr_set_load_func,
&pitf_ctr_clock,
&pitf_set_pit_const,
NULL,
};

View File

@@ -23,7 +23,6 @@
#include <string.h>
#include <wchar.h>
#include <86box/86box.h>
#include <86box/language.h>
#include <86box/lpt.h>
#include <86box/timer.h>
#include <86box/pit.h>
@@ -352,7 +351,7 @@ ps_init(void *lpt)
}
#endif
if (ghostscript_handle == NULL) {
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2115, (wchar_t *) IDS_2133);
ui_msgbox_header(MBX_ERROR, plat_get_string(STRING_GHOSTSCRIPT_ERROR_TITLE), plat_get_string(STRING_GHOSTSCRIPT_ERROR_DESC));
} else {
if (gsapi_revision(&rev, sizeof(rev)) == 0) {
pclog("Loaded %s, rev %ld (%ld)\n", rev.product, rev.revision, rev.revisiondate);

View File

@@ -61,7 +61,6 @@ add_library(plat STATIC
add_library(ui STATIC
qt_ui.cpp
qt_cdrom.c
qt_mainwindow.cpp
qt_mainwindow.hpp
@@ -189,7 +188,7 @@ endif()
if(WIN32)
enable_language(RC)
target_sources(86Box PUBLIC ../win/86Box-qt.rc)
target_sources(86Box PUBLIC 86Box-qt.rc)
target_sources(plat PRIVATE win_dynld.c)
# CMake 3.22 messed this up for clang/clang++
@@ -198,8 +197,8 @@ if(WIN32)
# MSVC linker adds its own manifest to the executable, which fails if
# we include ours in 86Box.rc. We therefore need to pass the manifest
# directly as as a source file, so the linker can use that instead.
set_property(SOURCE ../win/86Box-qt.rc DIRECTORY .. PROPERTY COMPILE_DEFINITIONS NO_INCLUDE_MANIFEST)
target_sources(86Box PRIVATE ../win/86Box.manifest)
set_property(SOURCE 86Box-qt.rc DIRECTORY .. PROPERTY COMPILE_DEFINITIONS NO_INCLUDE_MANIFEST)
target_sources(86Box PRIVATE 86Box.manifest)
endif()
if (MINGW)
@@ -217,13 +216,13 @@ else()
endif()
if(WIN32 AND NOT MINGW)
target_sources(plat PRIVATE ../win/win_opendir.c)
target_sources(plat PRIVATE win_opendir.c)
endif()
if(WIN32)
target_sources(plat PRIVATE ../win/win_serial_passthrough.c)
target_sources(plat PRIVATE win_serial_passthrough.c win_netsocket.c)
else()
target_sources(plat PRIVATE ../unix/unix_serial_passthrough.c)
target_sources(plat PRIVATE ../unix/unix_serial_passthrough.c ../unix/unix_netsocket.c)
endif()
if (APPLE)

View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 142 KiB

View File

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 142 KiB

View File

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 145 KiB

View File

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 127 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Some files were not shown because too many files have changed in this diff Show More