Skip to content

Commit

Permalink
Merge branch 'version/4.2' into svga_blank_reset
Browse files Browse the repository at this point in the history
  • Loading branch information
Cacodemon345 authored Mar 19, 2024
2 parents 1406c17 + d2c5420 commit dd8308f
Show file tree
Hide file tree
Showing 255 changed files with 5,053 additions and 35,949 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/codeql_windows_msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ jobs:
new: on
slug: -NDR
ui:
- name: Win32 GUI
qt: off
static: on
- name: Qt GUI
qt: on
static: off
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ CMakeLists.txt.user

# MacOS Finder stuff
.DS_Store

# clangd
.cache
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ option(RTMIDI "RtMidi"
option(FLUIDSYNTH "FluidSynth" ON)
option(MUNT "MUNT" ON)
option(VNC "VNC renderer" OFF)
option(DINPUT "DirectInput" OFF)
option(CPPTHREADS "C++11 threads" ON)
option(NEW_DYNAREC "Use the PCem v15 (\"new\") dynamic recompiler" OFF)
option(MINITRACE "Enable Chrome tracing using the modified minitrace library" OFF)
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ Performance may vary depending on both host and guest configuration. Most emulat
It is also recommended to use a manager application with 86Box for easier handling of multiple virtual machines.

* [86Box Manager](https://github.com/86Box/86BoxManager) by [Overdoze](https://github.com/daviunic) (Windows only)
* [Linbox-qt5](https://github.com/Dungeonseeker/linbox-qt5) by Dungeonseeker (Linux focused, should work on Windows though untested)
* [86Box Manager X](https://github.com/RetBox/86BoxManagerX) by [xafero](https://github.com/xafero) (Cross platform Port of 86Box Manager using Avalonia)
* [sl86](https://github.com/DDXofficial/sl86) by [DDX](https://github.com/DDXofficial) (Command-line 86Box machine manager written in Python)
* [Linbox-qt5](https://github.com/Dungeonseeker/linbox-qt5) by [Dungeonseeker](https://github.com/Dungeonseeker/) (Linux focused, should work on Windows though untested)
* [MacBox for 86Box](https://github.com/Moonif/MacBox) by [Moonif](https://github.com/Moonif) (MacOS only)

It is also possible to use 86Box on its own with the `--vmpath`/`-P` command line option.
Expand Down
16 changes: 13 additions & 3 deletions src/86box.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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 */
Expand All @@ -181,6 +183,7 @@ int gfxcard[2] = { 0, 0 }; /* (C) graphic
int show_second_monitors = 1; /* (C) show non-primary monitors */
int sound_is_float = 1; /* (C) sound uses FP values */
int voodoo_enabled = 0; /* (C) video option */
int lba_enhancer_enabled = 0; /* (C) enable Vision Systems LBA Enhancer */
int ibm8514_standalone_enabled = 0; /* (C) video option */
int xga_standalone_enabled = 0; /* (C) video option */
uint32_t mem_size = 0; /* (C) memory size (Installed on
Expand Down Expand Up @@ -1167,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.
*/
Expand Down Expand Up @@ -1227,6 +1231,12 @@ pc_reset_hard_init(void)
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);
Expand Down
200 changes: 0 additions & 200 deletions src/Makefile.local

This file was deleted.

3 changes: 3 additions & 0 deletions src/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1733,6 +1733,9 @@ acpi_reg_write_sis_5595(int size, uint16_t addr, uint8_t val, void *priv)
break;
case 0x1c:
dev->regs.gpe_pin = ((dev->regs.gpe_pin & ~(0xff << shift32)) | ((val & 0xff) << shift32));
if (!strcmp(machine_get_internal_name(), "m747") && (val & 0x10) &&
!(dev->regs.gpe_io & 0x00000010))
resetx86();
break;
case 0x1d:
dev->regs.gpe_pin = ((dev->regs.gpe_pin & ~(0x0f << shift32)) | ((val & 0x0f) << shift32));
Expand Down
32 changes: 30 additions & 2 deletions src/chipset/sis_5513_p2i.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ typedef struct sis_5513_pci_to_isa_t {
port_92_t *port_92;
void *pit;
nvr_t *nvr;
char *fn;
ddma_t *ddma;
acpi_t *acpi;
void *smbus;
Expand Down Expand Up @@ -1077,7 +1078,6 @@ sis_5513_11_pci_to_isa_reset(sis_5513_pci_to_isa_t *dev)
dev->sis->ide_bits_1_3_writable = 0;
dev->sis->usb_enabled = 0;

sis_5513_apc_reset(dev);
sis_5513_apc_recalc(dev, 0);
}

Expand Down Expand Up @@ -1132,7 +1132,6 @@ sis_5513_b0_pci_to_isa_reset(sis_5513_pci_to_isa_t *dev)

dev->sis->usb_enabled = 0;

sis_5513_apc_reset(dev);
sis_5513_apc_recalc(dev, 0);

if (dev->rev == 0x81)
Expand Down Expand Up @@ -1196,6 +1195,17 @@ static void
sis_5513_pci_to_isa_close(void *priv)
{
sis_5513_pci_to_isa_t *dev = (sis_5513_pci_to_isa_t *) priv;
FILE *fp = NULL;

fp = nvr_fopen(dev->fn, "wb");

if (fp != NULL) {
(void) fwrite(dev->apc_regs, 256, 1, fp);
fclose(fp);
}

if (dev->fn != NULL)
free(dev->fn);

free(dev);
}
Expand All @@ -1205,6 +1215,8 @@ sis_5513_pci_to_isa_init(UNUSED(const device_t *info))
{
sis_5513_pci_to_isa_t *dev = (sis_5513_pci_to_isa_t *) calloc(1, sizeof(sis_5513_pci_to_isa_t));
uint8_t pit_is_fast = (((pit_mode == -1) && is486) || (pit_mode == 1));
FILE *fp = NULL;
int c;

dev->rev = info->local;

Expand Down Expand Up @@ -1272,6 +1284,22 @@ sis_5513_pci_to_isa_init(UNUSED(const device_t *info))
dev->sis->acpi->priv = dev->sis;
acpi_set_slot(dev->sis->acpi, dev->sis->sb_pci_slot);
acpi_set_nvr(dev->sis->acpi, dev->nvr);

/* Set up the NVR file's name. */
c = strlen(machine_get_internal_name()) + 9;
dev->fn = (char *) malloc(c + 1);
sprintf(dev->fn, "%s_apc.nvr", machine_get_internal_name());

fp = nvr_fopen(dev->fn, "rb");

memset(dev->apc_regs, 0x00, sizeof(dev->apc_regs));
sis_5513_apc_reset(dev);
if (fp != NULL) {
if (fread(dev->apc_regs, 1, 256, fp) != 256)
fatal("sis_5513_pci_to_isa_init(): Error reading APC data\n");
fclose(fp);
}

acpi_set_irq_mode(dev->sis->acpi, 2);
break;
}
Expand Down
1 change: 0 additions & 1 deletion src/chipset/sis_5581_h2p.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ sis_5581_trap_update_devctl(sis_5581_host_to_pci_t *dev, uint8_t trap_id, uint8_
uint16_t addr, uint16_t size)
{
sis_5581_io_trap_t *trap = &dev->io_traps[trap_id];
enable = enable;

/* Set up Device I/O traps dynamically. */
if (enable && !trap->trap) {
Expand Down
Loading

0 comments on commit dd8308f

Please sign in to comment.