Merge remote-tracking branch 'upstream/master' into feature/ich2

This commit is contained in:
Jasmine Iwanek
2023-08-16 20:39:04 -04:00
134 changed files with 8378 additions and 7393 deletions

View File

@@ -191,6 +191,10 @@ jobs:
triplet: x64-windows-static
toolchain: ./cmake/llvm-win32-x86_64.cmake
vcvars: x64
# - name: ARM
# triplet: arm-windows-static
# toolchain: ./cmake/llvm-win32-arm.cmake
# vcvars: x64_arm
- name: ARM64
triplet: arm64-windows-static
toolchain: ./cmake/llvm-win32-aarch64.cmake
@@ -217,7 +221,7 @@ jobs:
- name: Setup NuGet Credentials
run: >
& (C:/vcpkg/vcpkg fetch nuget | tail -n 2)
& (C:/vcpkg/vcpkg --vcpkg-root "${{ env.VCPKG_ROOT }}" fetch nuget | tail -n 2)
sources add
-source "https://nuget.pkg.github.com/86Box/index.json"
-storepasswordincleartext

View File

@@ -2,6 +2,7 @@
=====
[![Build Status](https://ci.86box.net/job/86Box/badge/icon)](https://ci.86box.net/job/86Box/)
[![License](https://img.shields.io/github/license/86Box/86Box)](COPYING) [![Latest release](https://img.shields.io/github/release/86Box/86Box.svg)](https://github.com/86Box/86Box/releases) [![Downloads](https://img.shields.io/github/downloads/86Box/86Box/total.svg)](https://github.com/86Box/86Box/releases)
**86Box** is a low level x86 emulator that runs older operating systems and software designed for IBM PC systems and compatibles from 1981 through fairly recent system designs based on the PCI bus.

View File

@@ -1868,10 +1868,8 @@ cdrom_insert(uint8_t id)
{
cdrom_t *dev = &cdrom[id];
if (dev->bus_type) {
if (dev->insert)
dev->insert(dev->priv);
}
if (dev->bus_type && dev->insert)
dev->insert(dev->priv);
}
/* The mechanics of ejecting a CD-ROM from a drive. */

View File

@@ -17,8 +17,8 @@ add_library(chipset OBJECT 82c100.c acc2168.c cs8230.c ali1429.c ali1435.c ali14
ali1531.c ali1541.c ali1543.c ali1621.c ali6117.c headland.c ims8848.c intel_82335.c
compaq_386.c contaq_82c59x.c cs4031.c intel_420ex.c intel_4x0.c intel_i450kx.c
intel_815ep.c intel_ich2.c intel_sio.c intel_piix.c ../ioapic.c neat.c opti283.c opti291.c opti391.c opti495.c
opti822.c opti895.c opti5x7.c scamp.c scat.c sis_85c310.c sis_85c4xx.c sis_85c496.c
sis_85c50x.c sis_5511.c sis_5571.c via_vt82c49x.c via_vt82c505.c
opti602.c opti822.c opti895.c opti5x7.c scamp.c scat.c sis_85c310.c sis_85c4xx.c
sis_85c496.c sis_85c50x.c sis_5511.c sis_5571.c via_vt82c49x.c via_vt82c505.c
gc100.c stpc.c umc_8886.c umc_hb4.c
via_apollo.c via_pipc.c vl82c480.c wd76c10.c)

View File

@@ -100,9 +100,8 @@ typedef struct cpq_386_t {
static uint8_t
cpq_read_ram(uint32_t addr, void *priv)
{
cpq_ram_t *dev = (cpq_ram_t *) priv;
uint8_t ret = 0xff;
uint32_t old = addr;
const cpq_ram_t *dev = (cpq_ram_t *) priv;
uint8_t ret = 0xff;
addr = (addr - dev->virt_base) + dev->phys_base;
@@ -115,9 +114,8 @@ cpq_read_ram(uint32_t addr, void *priv)
static uint16_t
cpq_read_ramw(uint32_t addr, void *priv)
{
cpq_ram_t *dev = (cpq_ram_t *) priv;
uint16_t ret = 0xffff;
uint32_t old = addr;
const cpq_ram_t *dev = (cpq_ram_t *) priv;
uint16_t ret = 0xffff;
addr = (addr - dev->virt_base) + dev->phys_base;
@@ -130,9 +128,8 @@ cpq_read_ramw(uint32_t addr, void *priv)
static uint32_t
cpq_read_raml(uint32_t addr, void *priv)
{
cpq_ram_t *dev = (cpq_ram_t *) priv;
uint32_t ret = 0xffffffff;
uint32_t old = addr;
const cpq_ram_t *dev = (cpq_ram_t *) priv;
uint32_t ret = 0xffffffff;
addr = (addr - dev->virt_base) + dev->phys_base;
@@ -145,8 +142,7 @@ cpq_read_raml(uint32_t addr, void *priv)
static void
cpq_write_ram(uint32_t addr, uint8_t val, void *priv)
{
cpq_ram_t *dev = (cpq_ram_t *) priv;
uint32_t old = addr;
const cpq_ram_t *dev = (cpq_ram_t *) priv;
addr = (addr - dev->virt_base) + dev->phys_base;
@@ -157,8 +153,7 @@ cpq_write_ram(uint32_t addr, uint8_t val, void *priv)
static void
cpq_write_ramw(uint32_t addr, uint16_t val, void *priv)
{
cpq_ram_t *dev = (cpq_ram_t *) priv;
uint32_t old = addr;
const cpq_ram_t *dev = (cpq_ram_t *) priv;
addr = (addr - dev->virt_base) + dev->phys_base;
@@ -169,8 +164,7 @@ cpq_write_ramw(uint32_t addr, uint16_t val, void *priv)
static void
cpq_write_raml(uint32_t addr, uint32_t val, void *priv)
{
cpq_ram_t *dev = (cpq_ram_t *) priv;
uint32_t old = addr;
const cpq_ram_t *dev = (cpq_ram_t *) priv;
addr = (addr - dev->virt_base) + dev->phys_base;
@@ -181,8 +175,8 @@ cpq_write_raml(uint32_t addr, uint32_t val, void *priv)
static uint8_t
cpq_read_regs(uint32_t addr, void *priv)
{
cpq_386_t *dev = (cpq_386_t *) priv;
uint8_t ret = 0xff;
const cpq_386_t *dev = (cpq_386_t *) priv;
uint8_t ret = 0xff;
addr &= 0x00000fff;
@@ -195,6 +189,9 @@ cpq_read_regs(uint32_t addr, void *priv)
/* RAM Setup Port (Read/Write) */
ret = dev->regs[addr];
break;
default:
break;
}
return ret;
@@ -203,7 +200,6 @@ cpq_read_regs(uint32_t addr, void *priv)
static uint16_t
cpq_read_regsw(uint32_t addr, void *priv)
{
cpq_386_t *dev = (cpq_386_t *) priv;
uint16_t ret = 0xffff;
ret = cpq_read_regs(addr, priv);
@@ -215,7 +211,6 @@ cpq_read_regsw(uint32_t addr, void *priv)
static uint32_t
cpq_read_regsl(uint32_t addr, void *priv)
{
cpq_386_t *dev = (cpq_386_t *) priv;
uint32_t ret = 0xffffffff;
ret = cpq_read_regsw(addr, priv);
@@ -306,8 +301,6 @@ cpq_recalc_ram(cpq_386_t *dev)
uint8_t end;
uint8_t k;
uint32_t virt_base;
uint32_t virt_addr;
uint32_t phys_addr;
cpq_ram_t *cram;
for (uint16_t i = 0x10; i < sys_min_high; i++)
@@ -393,14 +386,15 @@ cpq_write_regs(uint32_t addr, uint8_t val, void *priv)
cpq_recalc_cache(dev);
}
break;
default:
break;
}
}
static void
cpq_write_regsw(uint32_t addr, uint16_t val, void *priv)
{
cpq_386_t *dev = (cpq_386_t *) priv;
cpq_write_regs(addr, val & 0xff, priv);
cpq_write_regs(addr + 1, (val >> 8) & 0xff, priv);
}
@@ -408,8 +402,6 @@ cpq_write_regsw(uint32_t addr, uint16_t val, void *priv)
static void
cpq_write_regsl(uint32_t addr, uint32_t val, void *priv)
{
cpq_386_t *dev = (cpq_386_t *) priv;
cpq_write_regsw(addr, val & 0xff, priv);
cpq_write_regsw(addr + 2, (val >> 16) & 0xff, priv);
}
@@ -436,11 +428,9 @@ compaq_ram_init(cpq_ram_t *dev)
static void
compaq_ram_diags_parse(cpq_386_t *dev)
{
uint8_t val = dev->regs[0x00000001];
uint8_t val = dev->regs[0x00000001];
uint32_t accum = 0x00100000;
val;
for (uint8_t i = 0; i < 4; i++) {
dev->ram_bases[i] = accum;
@@ -451,6 +441,9 @@ compaq_ram_diags_parse(cpq_386_t *dev)
case RAM_DIAG_H_SYS_RAM_4MB:
dev->ram_sizes[i] = 0x00400000;
break;
default:
break;
}
if (i == 0)
dev->ram_sizes[i] -= 0x00100000;
@@ -476,8 +469,6 @@ compaq_recalc_base_ram(cpq_386_t *dev)
uint8_t low_end = 0x00;
uint8_t high_start = 0x00;
uint8_t high_end = 0x00;
uint32_t phys_addr = 0x00000000;
uint32_t virt_addr = 0x00000000;
cpq_ram_t *cram;
switch (base_mem) {
@@ -618,7 +609,7 @@ compaq_386_close(void *priv)
}
static void *
compaq_386_init(const device_t *info)
compaq_386_init(UNUSED(const device_t *info))
{
cpq_386_t *dev = (cpq_386_t *) calloc(1, sizeof(cpq_386_t));
@@ -706,6 +697,9 @@ compaq_386_init(const device_t *info)
dev->regs[0x00000001] = RAM_DIAG_H_SYS_RAM_4MB | RAM_DIAG_H_MOD_A_RAM_4MB |
RAM_DIAG_H_MOD_B_RAM_4MB | RAM_DIAG_H_MOD_C_RAM_4MB;
break;
default:
break;
}
} else
dev->regs[0x00000001] = RAM_DIAG_H_SYS_RAM_1MB | RAM_DIAG_H_MOD_A_RAM_NONE |

238
src/chipset/opti602.c Normal file
View File

@@ -0,0 +1,238 @@
/*
* 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 OPTi 82C601/82C602 Buffer Devices.
*
* Authors: Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2023 Miran Grca.
*/
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#define HAVE_STDARG_H
#include <86box/86box.h>
#include "cpu.h"
#include <86box/io.h>
#include <86box/device.h>
#include <86box/mem.h>
#include <86box/timer.h>
#include <86box/nvr.h>
#include <86box/smram.h>
#include <86box/port_92.h>
#include <86box/chipset.h>
typedef struct opti602_t {
uint8_t idx;
uint8_t regs[256];
uint8_t gpio[32];
uint16_t gpio_base;
uint16_t gpio_mask;
uint16_t gpio_size;
nvr_t *nvr;
} opti602_t;
#ifdef ENABLE_OPTI602_LOG
int opti602_do_log = ENABLE_OPTI602_LOG;
static void
opti602_log(const char *fmt, ...)
{
va_list ap;
if (opti602_do_log) {
va_start(ap, fmt);
pclog_ex(fmt, ap);
va_end(ap);
}
}
#else
# define opti602_log(fmt, ...)
#endif
static void
opti602_gpio_write(uint16_t addr, uint8_t val, void *priv)
{
opti602_t *dev = (opti602_t *) priv;
dev->gpio[addr - dev->gpio_base] = val;
}
static uint8_t
opti602_gpio_read(uint16_t addr, void *priv)
{
opti602_t *dev = (opti602_t *) priv;
uint8_t ret = 0xff;
ret = dev->gpio[addr - dev->gpio_base];
return ret;
}
static void
opti602_gpio_recalc(opti602_t *dev)
{
if (dev->gpio_base != 0x0000)
io_removehandler(dev->gpio_base, dev->gpio_size, opti602_gpio_read, NULL, NULL, opti602_gpio_write, NULL, NULL, dev);
dev->gpio_base = dev->regs[0xf8];
dev->gpio_base |= (((uint16_t) dev->regs[0xf7]) << 8);
dev->gpio_size = 1 << ((dev->regs[0xf9] >> 2) & 0x07);
dev->gpio_mask = ~(dev->gpio_size - 1);
dev->gpio_base &= dev->gpio_mask;
dev->gpio_mask = ~dev->gpio_mask;
if (dev->gpio_base != 0x0000)
io_sethandler(dev->gpio_base, dev->gpio_size, opti602_gpio_read, NULL, NULL, opti602_gpio_write, NULL, NULL, dev);
}
static void
opti602_write(uint16_t addr, uint8_t val, void *priv)
{
opti602_t *dev = (opti602_t *) priv;
switch (addr) {
case 0x22:
dev->idx = val;
break;
case 0x24:
if ((dev->idx == 0xea) || ((dev->idx >= 0xf7) && (dev->idx <= 0xfa))) {
dev->regs[dev->idx] = val;
opti602_log("dev->regs[%04x] = %08x\n", dev->idx, val);
/* TODO: Registers 0x30-0x3F for OPTi 802GP and 898. */
switch (dev->idx) {
case 0xea:
/* GREEN Power Port */
break;
case 0xf7:
case 0xf8:
/* General Purpose Chip Select Registers */
opti602_gpio_recalc(dev);
break;
case 0xf9:
/* General Purpose Chip Select Register */
nvr_bank_set(0, !!(val & 0x20), dev->nvr);
opti602_gpio_recalc(dev);
break;
case 0xfa:
/* GPM Port */
break;
default:
break;
}
}
break;
default:
break;
}
}
static uint8_t
opti602_read(uint16_t addr, void *priv)
{
uint8_t ret = 0xff;
const opti602_t *dev = (opti602_t *) priv;
switch (addr) {
case 0x24:
if ((dev->idx == 0xea) || ((dev->idx >= 0xf7) && (dev->idx <= 0xfa))) {
ret = dev->regs[dev->idx];
if ((dev->idx == 0xfa) && (dev->regs[0xf9] & 0x40))
ret |= dev->regs[0xea];
}
break;
default:
break;
}
return ret;
}
static void
opti602_reset(void *priv)
{
opti602_t *dev = (opti602_t *) priv;
memset(dev->regs, 0x00, 256 * sizeof(uint8_t));
memset(dev->gpio, 0x00, 32 * sizeof(uint8_t));
dev->regs[0xfa] = 0x07;
dev->gpio[0x01] |= 0xfe;
nvr_bank_set(0, 0, dev->nvr);
opti602_gpio_recalc(dev);
}
static void
opti602_close(void *priv)
{
opti602_t *dev = (opti602_t *) priv;
free(dev);
}
static void *
opti602_init(const device_t *info)
{
opti602_t *dev = (opti602_t *) calloc(1, sizeof(opti602_t));
io_sethandler(0x0022, 0x0001, opti602_read, NULL, NULL, opti602_write, NULL, NULL, dev);
io_sethandler(0x0024, 0x0001, opti602_read, NULL, NULL, opti602_write, NULL, NULL, dev);
dev->nvr = device_add(&at_mb_nvr_device);
opti602_reset(dev);
return dev;
}
const device_t opti601_device = {
.name = "OPTi 82C601",
.internal_name = "opti601",
.flags = 0,
.local = 0,
.init = opti602_init,
.close = opti602_close,
.reset = opti602_reset,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
};
const device_t opti602_device = {
.name = "OPTi 82C602",
.internal_name = "opti602",
.flags = 0,
.local = 0,
.init = opti602_init,
.close = opti602_close,
.reset = opti602_reset,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
};

View File

@@ -140,6 +140,8 @@ opti895_write(uint16_t addr, uint8_t val, void *priv)
{
opti895_t *dev = (opti895_t *) priv;
opti895_log("opti895_write(%04X, %08X)\n", addr, val);
switch (addr) {
case 0x22:
dev->idx = val;
@@ -231,6 +233,8 @@ opti895_read(uint16_t addr, void *priv)
break;
}
opti895_log("opti895_read(%04X) = %02X\n", addr, ret);
return ret;
}

View File

@@ -10,13 +10,12 @@
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Melissa Goad, <mszoopers@protonmail.com>
* Authors: Miran Grca, <mgrca8@gmail.com>
* RichardG, <richardg867@gmail.com>
* Tiseno100,
*
* Copyright 2020 Miran Grca.
* Copyright 2020 Melissa Goad.
* Copyright 2020 RichardG.
* Copyright 2020 Tiseno100.
*/
#include <stdio.h>

View File

@@ -10,14 +10,10 @@
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Melissa Goad, <mszoopers@protonmail.com>
* Authors: Miran Grca, <mgrca8@gmail.com>
* RichardG, <richardg867@gmail.com>
*
* Copyright 2008-2020 Sarah Walker.
* Copyright 2016-2020 Miran Grca.
* Copyright 2020 Melissa Goad.
* Copyright 2020-2021 RichardG.
*/
#include <stdarg.h>

View File

@@ -1,6 +1,7 @@
#if defined __amd64__ || defined _M_X64
# include <stdint.h>
# include <inttypes.h>
# include <86box/86box.h>
# include "cpu.h"
# include <86box/mem.h>
@@ -125,7 +126,7 @@ host_x86_ADD64_REG_IMM(codeblock_t *block, int dst_reg, uint64_t imm_data)
codegen_alloc_bytes(block, 4);
codegen_addbyte4(block, 0x48, 0x83, 0xc0 | RM_OP_ADD | (dst_reg & 7), imm_data & 0xff); /*ADD dst_reg, imm_data*/
} else
fatal("ADD64_REG_IMM !is_imm8 %016llx\n", imm_data);
fatal("ADD64_REG_IMM !is_imm8 %016" PRIx64 "\n", imm_data);
}
void
host_x86_ADD8_REG_REG(codeblock_t *block, int dst_reg, int src_reg)
@@ -1614,7 +1615,7 @@ host_x86_SUB64_REG_IMM(codeblock_t *block, int dst_reg, uint64_t imm_data)
codegen_alloc_bytes(block, 4);
codegen_addbyte4(block, 0x48, 0x83, 0xc0 | RM_OP_SUB | (dst_reg & 7), imm_data & 0xff); /*SUB dst_reg, imm_data*/
} else
fatal("SUB64_REG_IMM !is_imm8 %016llx\n", imm_data);
fatal("SUB64_REG_IMM !is_imm8 %016" PRIx64 "\n", imm_data);
}
void
host_x86_SUB8_REG_REG(codeblock_t *block, int dst_reg, int src_reg)

View File

@@ -619,35 +619,35 @@ load_input_devices(void)
else {
c = ini_section_get_int(cat, "joystick_type", 8);
switch (c) {
case 1:
case JS_TYPE_2AXIS_4BUTTON:
joystick_type = joystick_get_from_internal_name("2axis_4button");
break;
case 2:
case JS_TYPE_2AXIS_6BUTTON:
joystick_type = joystick_get_from_internal_name("2axis_6button");
break;
case 3:
case JS_TYPE_2AXIS_8BUTTON:
joystick_type = joystick_get_from_internal_name("2axis_8button");
break;
case 4:
case JS_TYPE_4AXIS_4BUTTON:
joystick_type = joystick_get_from_internal_name("4axis_4button");
break;
case 5:
case JS_TYPE_CH_FLIGHTSTICK_PRO:
joystick_type = joystick_get_from_internal_name("ch_flightstick_pro");
break;
case 6:
case JS_TYPE_SIDEWINDER_PAD:
joystick_type = joystick_get_from_internal_name("sidewinder_pad");
break;
case 7:
case JS_TYPE_THRUSTMASTER_FCS:
joystick_type = joystick_get_from_internal_name("thrustmaster_fcs");
break;
default:
joystick_type = 0;
joystick_type = JS_TYPE_NONE;
break;
}
}
}
} else
joystick_type = 0;
joystick_type = JS_TYPE_NONE;
for (c = 0; c < joystick_get_max_joysticks(joystick_type); c++) {
sprintf(temp, "joystick_%i_nr", c);
@@ -2923,16 +2923,14 @@ save_floppy_and_cdrom_drives(void)
}
sprintf(temp, "cdrom_%02i_parameters", c + 1);
if (cdrom[c].bus_type == 0) {
if (cdrom[c].bus_type == 0)
ini_section_delete_var(cat, temp);
} else { /*In case one wants an ATAPI drive on SCSI and vice-versa.*/
if (cdrom[c].bus_type == CDROM_BUS_ATAPI) {
if (cdrom_drive_types[cdrom_get_type(c)].bus_type == BUS_TYPE_SCSI)
cdrom[c].bus_type = CDROM_BUS_SCSI;
} else if (cdrom[c].bus_type == CDROM_BUS_SCSI) {
if (cdrom_drive_types[cdrom_get_type(c)].bus_type == BUS_TYPE_IDE)
cdrom[c].bus_type = CDROM_BUS_ATAPI;
}
else {
/* In case one wants an ATAPI drive on SCSI and vice-versa. */
if ((cdrom_drive_types[cdrom_get_type(c)].bus_type != BUS_TYPE_BOTH) &&
(cdrom_drive_types[cdrom_get_type(c)].bus_type != cdrom[c].bus_type))
cdrom[c].bus_type = cdrom_drive_types[cdrom_get_type(c)].bus_type;
sprintf(tmp2, "%u, %s", cdrom[c].sound_on,
hdd_bus_to_string(cdrom[c].bus_type, 1));
ini_section_set_string(cat, temp, tmp2);

View File

@@ -77,7 +77,6 @@ x386_log(const char *fmt, ...)
static __inline void
fetch_ea_32_long(uint32_t rmdat)
{
eal_r = eal_w = NULL;
easeg = cpu_state.ea_seg->base;
if (cpu_rm == 4) {
uint8_t sib = rmdat >> 8;
@@ -122,19 +121,11 @@ fetch_ea_32_long(uint32_t rmdat)
cpu_state.eaaddr = getlong();
}
}
if (easeg != 0xFFFFFFFF && ((easeg + cpu_state.eaaddr) & 0xFFF) <= 0xFFC) {
uint32_t addr = easeg + cpu_state.eaaddr;
if (readlookup2[addr >> 12] != (uintptr_t) -1)
eal_r = (uint32_t *) (readlookup2[addr >> 12] + addr);
if (writelookup2[addr >> 12] != (uintptr_t) -1)
eal_w = (uint32_t *) (writelookup2[addr >> 12] + addr);
}
}
static __inline void
fetch_ea_16_long(uint32_t rmdat)
{
eal_r = eal_w = NULL;
easeg = cpu_state.ea_seg->base;
if (!cpu_mod && cpu_rm == 6) {
cpu_state.eaaddr = getword();
@@ -158,13 +149,6 @@ fetch_ea_16_long(uint32_t rmdat)
}
cpu_state.eaaddr &= 0xFFFF;
}
if (easeg != 0xFFFFFFFF && ((easeg + cpu_state.eaaddr) & 0xFFF) <= 0xFFC) {
uint32_t addr = easeg + cpu_state.eaaddr;
if (readlookup2[addr >> 12] != (uintptr_t) -1)
eal_r = (uint32_t *) (readlookup2[addr >> 12] + addr);
if (writelookup2[addr >> 12] != (uintptr_t) -1)
eal_w = (uint32_t *) (writelookup2[addr >> 12] + addr);
}
}
#define fetch_ea_16(rmdat) \
@@ -225,11 +209,23 @@ fetch_ea_16_long(uint32_t rmdat)
#define CLOCK_CYCLES_ALWAYS(c) cycles -= (c)
#define CHECK_READ_CS(chseg, low, high) \
if ((low < (chseg)->limit_low) || (high > (chseg)->limit_high)) \
x86gpf("Limit check (READ)", 0); \
if (msw & 1 && !(cpu_state.eflags & VM_FLAG) && !((chseg)->access & 0x80)) { \
if ((chseg) == &cpu_state.seg_ss) \
x86ss(NULL, (chseg)->seg & 0xfffc); \
else \
x86np("Read from seg not present", (chseg)->seg & 0xfffc); \
}
#include "386_ops.h"
void
exec386_2386(int cycs)
{
int ol;
int vector;
int tempi;
int cycdiff;
@@ -264,6 +260,12 @@ exec386_2386(int cycs)
cpu_state.ssegs = 0;
fetchdat = fastreadl_fetch(cs + cpu_state.pc);
ol = opcode_length[fetchdat & 0xff];
if (ol < 4) {
CHECK_READ_CS(&cpu_state.seg_cs, cpu_state.pc, cpu_state.pc + ol - 1);
} else {
CHECK_READ_CS(&cpu_state.seg_cs, cpu_state.pc, cpu_state.pc + 3);
}
if (!cpu_state.abrt) {
#ifdef ENABLE_386_LOG

View File

@@ -225,19 +225,19 @@ int checkio(uint32_t port, int mask);
static __inline uint8_t
fastreadb(uint32_t a)
{
return readmembl(a);
return readmembl_2386(a);
}
static __inline uint16_t
fastreadw(uint32_t a)
{
return readmemwl(a);
return readmemwl_2386(a);
}
static __inline uint32_t
fastreadl(uint32_t a)
{
return readmemll(a);
return readmemll_2386(a);
}
#else
static __inline uint8_t
@@ -351,7 +351,7 @@ fastreadw_fetch(uint32_t a)
return val;
}
return readmemwl(a);
return readmemwl_2386(a);
}
static __inline uint32_t
@@ -359,14 +359,14 @@ fastreadl_fetch(uint32_t a)
{
uint32_t val;
if ((a & 0xFFF) > 0xFFC) {
if (cpu_16bitbus || ((a & 0xFFF) > 0xFFC)) {
val = fastreadw_fetch(a);
if (opcode_length[val & 0xff] > 2)
val |= (fastreadw(a + 2) << 16);
return val;
}
return readmemll(a);
return readmemll_2386(a);
}
#else
static __inline uint16_t

View File

@@ -731,27 +731,51 @@ device_is_valid(const device_t *device, int m)
if (device == NULL)
return 1;
if ((device->flags & DEVICE_PCJR) && !machine_has_bus(m, MACHINE_BUS_PCJR))
return 0;
if ((device->flags & DEVICE_XTKBC) && machine_has_bus(m, MACHINE_BUS_ISA16) && !machine_has_bus(m, MACHINE_BUS_DM_KBC))
return 0;
if ((device->flags & DEVICE_AT) && !machine_has_bus(m, MACHINE_BUS_ISA16))
return 0;
if ((device->flags & DEVICE_CBUS) && !machine_has_bus(m, MACHINE_BUS_CBUS))
if ((device->flags & DEVICE_ATKBC) && !machine_has_bus(m, MACHINE_BUS_ISA16) && !machine_has_bus(m, MACHINE_BUS_DM_KBC))
return 0;
if ((device->flags & DEVICE_ISA) && !machine_has_bus(m, MACHINE_BUS_ISA))
return 0;
if ((device->flags & DEVICE_CBUS) && !machine_has_bus(m, MACHINE_BUS_CBUS))
return 0;
if ((device->flags & DEVICE_PCMCIA) && !machine_has_bus(m, MACHINE_BUS_PCMCIA))
return 0;
if ((device->flags & DEVICE_MCA) && !machine_has_bus(m, MACHINE_BUS_MCA))
return 0;
if ((device->flags & DEVICE_HIL) && !machine_has_bus(m, MACHINE_BUS_HIL))
return 0;
if ((device->flags & DEVICE_EISA) && !machine_has_bus(m, MACHINE_BUS_EISA))
return 0;
if ((device->flags & DEVICE_OLB) && !machine_has_bus(m, MACHINE_BUS_OLB))
return 0;
if ((device->flags & DEVICE_VLB) && !machine_has_bus(m, MACHINE_BUS_VLB))
return 0;
if ((device->flags & DEVICE_PCI) && !machine_has_bus(m, MACHINE_BUS_PCI))
return 0;
if ((device->flags & DEVICE_CARDBUS) && !machine_has_bus(m, MACHINE_BUS_CARDBUS))
return 0;
if ((device->flags & DEVICE_USB) && !machine_has_bus(m, MACHINE_BUS_USB))
return 0;
if ((device->flags & DEVICE_AGP) && !machine_has_bus(m, MACHINE_BUS_AGP))
return 0;

File diff suppressed because it is too large Load Diff

View File

@@ -8,9 +8,11 @@
*
* Implementation of PS/2 series Mouse devices.
*
* Authors: Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
*
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Copyright 2016-2023 Miran Grca.
* Copyright 2017-2023 Fred N. van Kempen.
*/
#include <stdarg.h>
#include <stdio.h>

View File

@@ -8,9 +8,9 @@
*
* Implementation of PS/2 series Mouse devices.
*
* Authors: Miran Grca, <mgrca8@gmail.com>
*
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Copyright 2023 Miran Grca.
*/
#include <stdarg.h>
#include <stdatomic.h>

View File

@@ -10,9 +10,9 @@
*
* TODO: Add the Genius Serial Mouse.
*
* Authors: Miran Grca, <mgrca8@gmail.com>
*
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Copyright 2023 Miran Grca.
*/
#include <math.h>
#include <stdarg.h>
@@ -193,8 +193,8 @@ sermouse_report_msystems(mouse_t *dev)
dev->buf[0] |= (b & 0x02) ? 0x00 : 0x01; /* right button */
dev->buf[1] = delta_x;
dev->buf[2] = delta_y;
dev->buf[2] = delta_x; /* same as byte 1 */
dev->buf[3] = delta_y; /* same as byte 2 */
dev->buf[3] = delta_x; /* same as byte 1 */
dev->buf[4] = delta_y; /* same as byte 2 */
return 5;
}
@@ -215,8 +215,6 @@ sermouse_report_3bp(mouse_t *dev)
dev->buf[0] |= (b & 0x02) ? 0x01 : 0x00; /* right button */
dev->buf[1] = delta_x;
dev->buf[2] = delta_y;
dev->buf[2] = delta_x; /* same as byte 1 */
dev->buf[3] = delta_y; /* same as byte 2 */
return 3;
}

View File

@@ -6,15 +6,16 @@
*
* This file is part of the 86Box distribution.
*
* Implementation of the Phoenix 486 Jumper Readout
* Implementation of the Phoenix 486 Jumper Readout.
*
*
*
* Authors: Tiseno100
* Authors: Miran Grca, <mgrca8@gmail.com>
* Tiseno100,
*
* Copyright 2020 Tiseno100
* Copyright 2020-2023 Miran Grca.
* Copyright 2020-2023 Tiseno100.
*/
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>

View File

@@ -29,13 +29,11 @@
#include <86box/postcard.h>
#include "cpu.h"
#define POSTCARDS_NUM 4
#define POSTCARD_MASK (POSTCARDS_NUM - 1)
uint8_t postcard_codes[POSTCARDS_NUM];
static uint16_t postcard_port;
static uint8_t postcard_written[POSTCARDS_NUM];
static uint8_t postcard_ports_num = 1;
static uint8_t postcard_codes[POSTCARDS_NUM];
static uint8_t postcard_prev_codes[POSTCARDS_NUM];
#define UISTR_LEN 32
static char postcard_str[UISTR_LEN]; /* UI output string */
@@ -66,8 +64,10 @@ static void
postcard_setui(void)
{
if (postcard_ports_num > 1) {
char ps[2][POSTCARDS_NUM][3] = { { 0 },
{ 0 } };
char ps[2][POSTCARDS_NUM][3] = { { { 0 },
{ 0 },
} };
for (uint8_t i = 0; i < POSTCARDS_NUM; i++) {
if (!postcard_written[i]) {
snprintf(ps[0][i], sizeof(ps[0][i]), "--");

View File

@@ -112,7 +112,7 @@ serial_do_irq(serial_t *dev, int set)
if (dev->irq != 0xff) {
if (set || (dev->irq_state != !!set))
picint_common(1 << dev->irq, !!(dev->type >= SERIAL_16450), set, &dev->irq_state);
if (dev->type >= SERIAL_16450)
if (dev->type < SERIAL_16450)
dev->irq_state = !!set;
}
}

View File

@@ -439,14 +439,13 @@ MVHDAPI int
mvhd_file_is_vhd(FILE* f)
{
uint8_t con_str[8];
size_t res;
if (f == NULL) {
return 0;
}
mvhd_fseeko64(f, -MVHD_FOOTER_SIZE, SEEK_END);
res = fread(con_str, sizeof con_str, 1, f);
(void) !fread(con_str, sizeof con_str, 1, f);
if (mvhd_is_conectix_str(con_str)) {
return 1;
}

View File

@@ -58,7 +58,7 @@ typedef struct _joystick_instance_ {
void *dat;
} joystick_instance_t;
int joystick_type = 0;
int joystick_type = JS_TYPE_NONE;
static const joystick_if_t joystick_none = {
.name = "None",
@@ -128,21 +128,21 @@ int gameport_instance_id = 0;
or writes, and ports at the standard 200h location are prioritized. */
static gameport_t *active_gameports = NULL;
char *
const char *
joystick_get_name(int js)
{
if (!joysticks[js].joystick)
return NULL;
return (char *) joysticks[js].joystick->name;
return joysticks[js].joystick->name;
}
char *
const char *
joystick_get_internal_name(int js)
{
if (joysticks[js].joystick == NULL)
return "";
return (char *) joysticks[js].joystick->internal_name;
return joysticks[js].joystick->internal_name;
}
int
@@ -151,7 +151,7 @@ joystick_get_from_internal_name(char *s)
int c = 0;
while (joysticks[c].joystick != NULL) {
if (!strcmp((char *) joysticks[c].joystick->internal_name, s))
if (!strcmp(joysticks[c].joystick->internal_name, s))
return c;
c++;
}
@@ -183,22 +183,22 @@ joystick_get_pov_count(int js)
return joysticks[js].joystick->pov_count;
}
char *
const char *
joystick_get_axis_name(int js, int id)
{
return (char *) joysticks[js].joystick->axis_names[id];
return joysticks[js].joystick->axis_names[id];
}
char *
const char *
joystick_get_button_name(int js, int id)
{
return (char *) joysticks[js].joystick->button_names[id];
return joysticks[js].joystick->button_names[id];
}
char *
const char *
joystick_get_pov_name(int js, int id)
{
return (char *) joysticks[js].joystick->pov_names[id];
return joysticks[js].joystick->pov_names[id];
}
static void
@@ -410,7 +410,7 @@ tmacm_init(UNUSED(const device_t *info))
dev = malloc(sizeof(gameport_t));
memset(dev, 0x00, sizeof(gameport_t));
port = device_get_config_hex16("port1_addr");
port = (uint16_t) device_get_config_hex16("port1_addr");
switch (port) {
case 0x201:
dev = gameport_add(&gameport_201_device);
@@ -428,7 +428,7 @@ tmacm_init(UNUSED(const device_t *info))
break;
}
port = device_get_config_hex16("port2_addr");
port = (uint16_t) device_get_config_hex16("port2_addr");
switch (port) {
case 0x209:
dev = gameport_add(&gameport_209_device);

View File

@@ -38,6 +38,9 @@
/* Default language 0xFFFF = from system, 0x409 = en-US */
#define DEFAULT_LANGUAGE 0x0409
#define POSTCARDS_NUM 4
#define POSTCARD_MASK (POSTCARDS_NUM - 1)
#ifdef MIN
# undef MIN
#endif
@@ -142,8 +145,6 @@ extern int confirm_exit; /* (C) enable exit confirmation */
extern int confirm_save; /* (C) enable save confirmation */
extern int enable_discord; /* (C) enable Discord integration */
extern int is_pentium; /* TODO: Move back to cpu/cpu.h when it's figured out,
how to remove that hack from the ET4000/W32p. */
extern int fixed_size_x;
extern int fixed_size_y;
extern double mouse_sensitivity; /* (C) Mouse sensitivity scale */
@@ -178,7 +179,7 @@ extern void reset_screen_size_monitor(int monitor_index);
extern void set_screen_size_natural(void);
extern void update_mouse_msg(void);
#if 0
extern void pc_reload(wchar_t *fn);
extern void pc_reload(wchar_t *fn);
#endif
extern int pc_init_modules(void);
extern int pc_init(int argc, char *argv[]);
@@ -207,7 +208,8 @@ extern double isa_timing;
extern int io_delay;
extern int framecountx;
extern volatile int cpu_thread_run;
extern volatile int cpu_thread_run;
extern uint8_t postcard_codes[POSTCARDS_NUM];
#ifdef __cplusplus
}

View File

@@ -1,5 +1,5 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* 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.

View File

@@ -60,12 +60,14 @@ enum {
CDROM_BUS_USB = 8
};
#define KNOWN_CDROM_DRIVE_TYPES 35
#define BUS_TYPE_ALL 0
#define BUS_TYPE_IDE 1
#define BUS_TYPE_SCSI 2
#define KNOWN_CDROM_DRIVE_TYPES 35
#define BUS_TYPE_IDE CDROM_BUS_ATAPI
#define BUS_TYPE_SCSI CDROM_BUS_SCSI
#define BUS_TYPE_BOTH -2
#define BUS_TYPE_NONE -1
static const struct {
static const struct
{
const char vendor[9];
const char model[17];
const char revision[5];
@@ -73,7 +75,7 @@ static const struct {
const char *internal_name;
const int bus_type;
} cdrom_drive_types[] = {
{ "86BOX", "CD-ROM", "1.00", "(ATAPI/SCSI) 86BOX CD-ROM 1.00", "86BOX_CD-ROM_1.00", BUS_TYPE_ALL }, /*1*/
{ "86BOX", "CD-ROM", "1.00", "(ATAPI/SCSI) 86BOX CD-ROM 1.00", "86BOX_CD-ROM_1.00", BUS_TYPE_BOTH }, /*1*/
{ "AZT", "CDA46802I", "1.15", "(ATAPI) AZT CDA46802I 1.15", "AZT_CDA46802I_1.15", BUS_TYPE_IDE }, /*2*/
{ "BTC", "CD-ROM BCD36XH", "U1.0", "(ATAPI) BTC CD-ROM BCD36XH U1.0", "BTC_CD-ROM_BCD36XH_U1.0", BUS_TYPE_IDE }, /*3*/
{ "GOLDSTAR", "CRD-8160B", "3.14", "(ATAPI) GOLDSTAR CRD-8160B 3.14", "GOLDSTAR_CRD-8160B_3.14", BUS_TYPE_IDE }, /*4*/
@@ -108,7 +110,7 @@ static const struct {
{ "TOSHIBA", "CD-ROM DRIVE:XM", "3433", "(SCSI) TOSHIBA CD-ROM DRIVE:XM 3433", "TOSHIBA_CD-ROM_DRIVEXM_3433", BUS_TYPE_SCSI }, /*33*/
{ "TOSHIBA", "CD-ROM XM-3301TA", "0272", "(SCSI) TOSHIBA CD-ROM XM-3301TA 0272", "TOSHIBA_CD-ROM_XM-3301TA_0272", BUS_TYPE_SCSI }, /*34*/
{ "TOSHIBA", "CD-ROM XM-5701TA", "3136", "(SCSI) TOSHIBA CD-ROM XM-5701TA 3136", "TOSHIBA_CD-ROM_XM-5701TA_3136", BUS_TYPE_SCSI }, /*35*/
{ "", "", "", "", "", -1 },
{ "", "", "", "", "", BUS_TYPE_NONE },
};
/* To shut up the GCC compilers. */

View File

@@ -1,18 +1,18 @@
/*
* 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.
* 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.
* This file is part of the 86Box distribution.
*
* Definitions for the common CD-ROM interface controller handler.
* Definitions for the common CD-ROM interface controller handler.
*
*
*
* Authors: TheCollector1995
* Authors: TheCollector1995
*
* Copyright 2022 TheCollector1995.
* Copyright 2022 TheCollector1995.
*/
#ifndef EMU_CDROM_INTERFACE_H
#define EMU_CDROM_INTERFACE_H

View File

@@ -115,6 +115,8 @@ extern const device_t opti283_device;
extern const device_t opti291_device;
extern const device_t opti493_device;
extern const device_t opti495_device;
extern const device_t opti601_device;
extern const device_t opti602_device;
extern const device_t opti802g_device;
extern const device_t opti802g_pci_device;
extern const device_t opti822_device;

View File

@@ -58,19 +58,26 @@
enum {
DEVICE_PCJR = 2, /* requires an IBM PCjr */
DEVICE_AT = 4, /* requires an AT-compatible system */
DEVICE_PS2 = 8, /* requires a PS/1 or PS/2 system */
DEVICE_ISA = 0x10, /* requires the ISA bus */
DEVICE_CBUS = 0x20, /* requires the C-BUS bus */
DEVICE_MCA = 0x40, /* requires the MCA bus */
DEVICE_EISA = 0x80, /* requires the EISA bus */
DEVICE_VLB = 0x100, /* requires the PCI bus */
DEVICE_PCI = 0x200, /* requires the VLB bus */
DEVICE_AGP = 0x400, /* requires the AGP bus */
DEVICE_AC97 = 0x800, /* requires the AC'97 bus */
DEVICE_COM = 0x1000, /* requires a serial port */
DEVICE_LPT = 0x2000, /* requires a parallel port */
DEVICE_KBC = 0x4000, /* is a keyboard controller */
DEVICE_XTKBC = 4, /* requires an XT-compatible keyboard controller */
DEVICE_AT = 8, /* requires an AT-compatible system */
DEVICE_ATKBC = 0x10, /* requires an AT-compatible keyboard controller */
DEVICE_PS2 = 0x20, /* requires a PS/1 or PS/2 system */
DEVICE_ISA = 0x40, /* requires the ISA bus */
DEVICE_CBUS = 0x80, /* requires the C-BUS bus */
DEVICE_PCMCIA = 0x100, /* requires the PCMCIA bus */
DEVICE_MCA = 0x200, /* requires the MCA bus */
DEVICE_HIL = 0x400, /* requires the HP HIL bus */
DEVICE_EISA = 0x800, /* requires the EISA bus */
DEVICE_OLB = 0x1000, /* requires the OPTi local bus */
DEVICE_VLB = 0x2000, /* requires the VLB bus */
DEVICE_PCI = 0x4000, /* requires the PCI bus */
DEVICE_CARDBUS = 0x8000, /* requires the CardBus bus */
DEVICE_USB = 0x10000, /* requires the USB bus */
DEVICE_AGP = 0x20000, /* requires the AGP bus */
DEVICE_AC97 = 0x40000, /* requires the AC'97 bus */
DEVICE_COM = 0x80000, /* requires a serial port */
DEVICE_LPT = 0x100000, /* requires a parallel port */
DEVICE_KBC = 0x200000, /* is a keyboard controller */
DEVICE_EXTPARAMS = 0x40000000, /* accepts extended parameters */

View File

@@ -24,6 +24,16 @@
#define MAX_PLAT_JOYSTICKS 8
#define MAX_JOYSTICKS 4
#define JS_TYPE_NONE 0
#define JS_TYPE_2AXIS_4BUTTON 1
#define JS_TYPE_2AXIS_6BUTTON 2
#define JS_TYPE_2AXIS_8BUTTON 3
#define JS_TYPE_4AXIS_4BUTTON 4
#define JS_TYPE_CH_FLIGHTSTICK_PRO 5
#define JS_TYPE_SIDEWINDER_PAD 6
#define JS_TYPE_THRUSTMASTER_FCS 7
#define POV_X 0x80000000
#define POV_Y 0x40000000
#define SLIDER 0x20000000
@@ -84,11 +94,11 @@ typedef struct joystick_if_t {
const char *internal_name;
void *(*init)(void);
void (*close)(void *p);
uint8_t (*read)(void *p);
void (*write)(void *p);
int (*read_axis)(void *p, int axis);
void (*a0_over)(void *p);
void (*close)(void *priv);
uint8_t (*read)(void *priv);
void (*write)(void *priv);
int (*read_axis)(void *priv, int axis);
void (*a0_over)(void *priv);
int axis_count;
int button_count;
@@ -133,16 +143,16 @@ extern void joystick_init(void);
extern void joystick_close(void);
extern void joystick_process(void);
extern char *joystick_get_name(int js);
extern char *joystick_get_internal_name(int js);
extern int joystick_get_from_internal_name(char *s);
extern int joystick_get_max_joysticks(int js);
extern int joystick_get_axis_count(int js);
extern int joystick_get_button_count(int js);
extern int joystick_get_pov_count(int js);
extern char *joystick_get_axis_name(int js, int id);
extern char *joystick_get_button_name(int js, int id);
extern char *joystick_get_pov_name(int js, int id);
extern const char *joystick_get_name(int js);
extern const char *joystick_get_internal_name(int js);
extern int joystick_get_from_internal_name(char *s);
extern int joystick_get_max_joysticks(int js);
extern int joystick_get_axis_count(int js);
extern int joystick_get_button_count(int js);
extern int joystick_get_pov_count(int js);
extern const char *joystick_get_axis_name(int js, int id);
extern const char *joystick_get_button_name(int js, int id);
extern const char *joystick_get_pov_name(int js, int id);
extern void gameport_update_joystick_type(void);
extern void gameport_remap(void *priv, uint16_t address);

View File

@@ -53,13 +53,13 @@ extern void lpt1_remove_ams(void);
#define lpt4_remove() lpt_port_remove(3)
#if 0
#define lpt5_init(a) lpt_port_init(4, a)
#define lpt5_irq(a) lpt_port_irq(4, a)
#define lpt5_remove() lpt_port_remove(4)
#define lpt5_init(a) lpt_port_init(4, a)
#define lpt5_irq(a) lpt_port_irq(4, a)
#define lpt5_remove() lpt_port_remove(4)
#define lpt6_init(a) lpt_port_init(5, a)
#define lpt6_irq(a) lpt_port_irq(5, a)
#define lpt6_remove() lpt_port_remove(5)
#define lpt6_init(a) lpt_port_init(5, a)
#define lpt6_irq(a) lpt_port_irq(5, a)
#define lpt6_remove() lpt_port_remove(5)
#endif
void lpt_devices_init(void);

View File

@@ -12,11 +12,11 @@
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <https://pcem-emulator.co.uk/>
* John Elliott, <jce@seasip.info>
*
* Copyright 2017-2018 Fred N. van Kempen.
* Copyright 2016-2018 Miran Grca.
* Copyright 2008-2018 Sarah Walker.
* Copyright 2008-2018 John Elliott.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -12,11 +12,11 @@
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <https://pcem-emulator.co.uk/>
* John Elliott, <jce@seasip.info>
*
* Copyright 2017-2018 Fred N. van Kempen.
* Copyright 2016-2018 Miran Grca.
* Copyright 2008-2018 Sarah Walker.
* Copyright 2008-2018 John Elliott.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -28,18 +28,25 @@
#define MACHINE_BUS_ISA 0x00000001 /* sys has ISA bus */
#define MACHINE_BUS_CASSETTE 0x00000002 /* sys has cassette port */
#define MACHINE_BUS_CARTRIDGE 0x00000004 /* sys has two cartridge bays */
#define MACHINE_BUS_ISA16 0x00000008 /* sys has ISA16 bus - PC/AT architecture */
#define MACHINE_BUS_CBUS 0x00000010 /* sys has C-BUS bus */
#define MACHINE_BUS_PS2_LATCH 0x00000020 /* system has PS/2 keyboard controller IRQ latch */
#define MACHINE_BUS_PS2_PORTS 0x00000040 /* system has PS/2 keyboard and mouse ports */
#define MACHINE_BUS_PCJR 0x00000008 /* sys has PCjr sidecar bus */
#define MACHINE_BUS_DM_KBC 0x00000010 /* system has keyboard controller that supports
both XT and AT keyboards */
#define MACHINE_BUS_ISA16 0x00000020 /* sys has ISA16 bus - PC/AT architecture */
#define MACHINE_BUS_CBUS 0x00000040 /* sys has C-BUS bus */
#define MACHINE_BUS_PCMCIA 0x00000080 /* sys has PCMCIA bus */
#define MACHINE_BUS_PS2_LATCH 0x00000100 /* system has PS/2 keyboard controller IRQ latch */
#define MACHINE_BUS_PS2_PORTS 0x00000200 /* system has PS/2 keyboard and mouse ports */
#define MACHINE_BUS_PS2 (MACHINE_BUS_PS2_LATCH | MACHINE_BUS_PS2_PORTS)
#define MACHINE_BUS_EISA 0x00000080 /* sys has EISA bus */
#define MACHINE_BUS_VLB 0x00000100 /* sys has VL bus */
#define MACHINE_BUS_MCA 0x00000200 /* sys has MCA bus */
#define MACHINE_BUS_PCI 0x00000400 /* sys has PCI bus */
#define MACHINE_BUS_PCMCIA 0x00000800 /* sys has PCMCIA bus */
#define MACHINE_BUS_AGP 0x00001000 /* sys has AGP bus */
#define MACHINE_BUS_AC97 0x00002000 /* sys has AC97 bus (ACR/AMR/CNR slot) */
#define MACHINE_BUS_HIL 0x00000400 /* system has HP HIL keyboard and mouse ports */
#define MACHINE_BUS_EISA 0x00000800 /* sys has EISA bus */
#define MACHINE_BUS_OLB 0x00001000 /* sys has OPTi local bus */
#define MACHINE_BUS_VLB 0x00002000 /* sys has VL bus */
#define MACHINE_BUS_MCA 0x00004000 /* sys has MCA bus */
#define MACHINE_BUS_PCI 0x00008000 /* sys has PCI bus */
#define MACHINE_BUS_CARDBUS 0x00010000 /* sys has CardBus bus */
#define MACHINE_BUS_USB 0x00020000 /* sys has USB bus */
#define MACHINE_BUS_AGP 0x00040000 /* sys has AGP bus */
#define MACHINE_BUS_AC97 0x00080000 /* sys has AC97 bus (ACR/AMR/CNR slot) */
/* Aliases. */
#define MACHINE_CASSETTE (MACHINE_BUS_CASSETTE) /* sys has cassette port */
#define MACHINE_CARTRIDGE (MACHINE_BUS_CARTRIDGE) /* sys has two cartridge bays */
@@ -73,61 +80,69 @@
#define MACHINE_PS2_NOISA (MACHINE_PS2_AGP & ~MACHINE_AT) /* sys is AGP PS/2 without ISA */
#define MACHINE_PS2_NOI97 (MACHINE_PS2_A97 & ~MACHINE_AT) /* sys is AGP/AC97 PS/2 without ISA */
/* Feature flags for miscellaneous internal devices. */
#define MACHINE_FLAGS_NONE 0x00000000 /* sys has no int devices */
#define MACHINE_VIDEO 0x00000001 /* sys has int video */
#define MACHINE_VIDEO_ONLY 0x00000002 /* sys has fixed video */
#define MACHINE_MOUSE 0x00000004 /* sys has int mouse */
#define MACHINE_FDC 0x00000008 /* sys has int FDC */
#define MACHINE_LPT_PRI 0x00000010 /* sys has int pri LPT */
#define MACHINE_LPT_SEC 0x00000020 /* sys has int sec LPT */
#define MACHINE_UART_PRI 0x00000040 /* sys has int pri UART */
#define MACHINE_UART_SEC 0x00000080 /* sys has int sec UART */
#define MACHINE_UART_TER 0x00000100 /* sys has int ter UART */
#define MACHINE_UART_QUA 0x00000200 /* sys has int qua UART */
#define MACHINE_GAMEPORT 0x00000400 /* sys has int game port */
#define MACHINE_SOUND 0x00000800 /* sys has int sound */
#define MACHINE_NIC 0x00001000 /* sys has int NIC */
#define MACHINE_MODEM 0x00002000 /* sys has int modem */
#define MACHINE_FLAGS_NONE 0x00000000 /* sys has no int devices */
#define MACHINE_SOFTFLOAT_ONLY 0x00000001 /* sys requires SoftFloat FPU */
#define MACHINE_VIDEO 0x00000002 /* sys has int video */
#define MACHINE_VIDEO_ONLY 0x00000004 /* sys has fixed video */
#define MACHINE_MOUSE 0x00000008 /* sys has int mouse */
#define MACHINE_FDC 0x00000010 /* sys has int FDC */
#define MACHINE_LPT_PRI 0x00000020 /* sys has int pri LPT */
#define MACHINE_LPT_SEC 0x00000040 /* sys has int sec LPT */
#define MACHINE_LPT_TER 0x00000080 /* sys has int ter LPT */
#define MACHINE_LPT_QUA 0x00000100 /* sys has int qua LPT */
#define MACHINE_UART_PRI 0x00000200 /* sys has int pri UART */
#define MACHINE_UART_SEC 0x00000400 /* sys has int sec UART */
#define MACHINE_UART_TER 0x00000800 /* sys has int ter UART */
#define MACHINE_UART_QUA 0x00001000 /* sys has int qua UART */
#define MACHINE_GAMEPORT 0x00002000 /* sys has int game port */
#define MACHINE_SOUND 0x00004000 /* sys has int sound */
#define MACHINE_NIC 0x00008000 /* sys has int NIC */
#define MACHINE_MODEM 0x00010000 /* sys has int modem */
/* Feature flags for advanced devices. */
#define MACHINE_APM 0x00004000 /* sys has APM */
#define MACHINE_ACPI 0x00008000 /* sys has ACPI */
#define MACHINE_HWM 0x00010000 /* sys has hw monitor */
/* Combined flags. */
#define MACHINE_VIDEO_FIXED (MACHINE_VIDEO | MACHINE_VIDEO_ONLY) /* sys has fixed int video */
#define MACHINE_SUPER_IO (MACHINE_FDC | MACHINE_LPT_PRI | MACHINE_UART_PRI | MACHINE_UART_SEC)
#define MACHINE_SUPER_IO_GAME (MACHINE_SUPER_IO | MACHINE_GAMEPORT)
#define MACHINE_SUPER_IO_DUAL (MACHINE_SUPER_IO | MACHINE_LPT_SEC | MACHINE_UART_TER | MACHINE_UART_QUA)
#define MACHINE_AV (MACHINE_VIDEO | MACHINE_SOUND) /* sys has video and sound */
#define MACHINE_AG (MACHINE_SOUND | MACHINE_GAMEPORT) /* sys has sound and game port */
#define MACHINE_APM 0x00020000 /* sys has APM */
#define MACHINE_ACPI 0x00040000 /* sys has ACPI */
#define MACHINE_HWM 0x00080000 /* sys has hw monitor */
#define MACHINE_COREBOOT 0x00100000 /* sys has coreboot BIOS */
/* Feature flags for internal storage controllers. */
#define MACHINE_HDC 0x03FE0000 /* sys has int HDC */
#define MACHINE_MFM 0x00020000 /* sys has int MFM/RLL */
#define MACHINE_XTA 0x00040000 /* sys has int XTA */
#define MACHINE_ESDI 0x00080000 /* sys has int ESDI */
#define MACHINE_IDE_PRI 0x00100000 /* sys has int pri IDE/ATAPI */
#define MACHINE_IDE_SEC 0x00200000 /* sys has int sec IDE/ATAPI */
#define MACHINE_IDE_TER 0x00400000 /* sys has int ter IDE/ATAPI */
#define MACHINE_IDE_QUA 0x00800000 /* sys has int qua IDE/ATAPI */
#define MACHINE_SCSI_PRI 0x01000000 /* sys has int pri SCSI */
#define MACHINE_SCSI_SEC 0x02000000 /* sys has int sec SCSI */
#define MACHINE_USB_PRI 0x04000000 /* sys has int pri USB */
#define MACHINE_USB_SEC 0x08000000 /* sys has int sec USB */
#define MACHINE_COREBOOT 0x10000000 /* sys has coreboot BIOS */
#define MACHINE_SOFTFLOAT_ONLY 0x20000000 /* sys requires softfloat FPU */
#define MACHINE_MFM 0x00200000 /* sys has int MFM/RLL */
#define MACHINE_XTA 0x00400000 /* sys has int XTA */
#define MACHINE_ESDI 0x00800000 /* sys has int ESDI */
#define MACHINE_IDE_PRI 0x01000000 /* sys has int pri IDE/ATAPI */
#define MACHINE_IDE_SEC 0x02000000 /* sys has int sec IDE/ATAPI */
#define MACHINE_IDE_TER 0x04000000 /* sys has int ter IDE/ATAPI */
#define MACHINE_IDE_QUA 0x08000000 /* sys has int qua IDE/ATAPI */
#define MACHINE_SCSI_PRI 0x10000000 /* sys has int pri SCSI */
#define MACHINE_SCSI_SEC 0x20000000 /* sys has int sec SCSI */
#define MACHINE_USB_PRI 0x40000000 /* sys has int pri USB */
#define MACHINE_USB_SEC 0x80000000 /* sys has int sec USB */
/* Combined flags. */
#define MACHINE_IDE (MACHINE_IDE_PRI) /* sys has int single IDE/ATAPI - mark as pri IDE/ATAPI */
#define MACHINE_IDE_DUAL (MACHINE_IDE_PRI | MACHINE_IDE_SEC) /* sys has int dual IDE/ATAPI - mark as both pri and sec IDE/ATAPI */
#define MACHINE_IDE_DUALTQ (MACHINE_IDE_TER | MACHINE_IDE_QUA)
#define MACHINE_IDE_QUAD (MACHINE_IDE_DUAL | MACHINE_IDE_DUALTQ) /* sys has int quad IDE/ATAPI - mark as dual + both ter and and qua IDE/ATAPI */
#define MACHINE_SCSI (MACHINE_SCSI_PRI) /* sys has int single SCSI - mark as pri SCSI */
#define MACHINE_SCSI_DUAL (MACHINE_SCSI_PRI | MACHINE_SCSI_SEC) /* sys has int dual SCSI - mark as both pri and sec SCSI */
#define MACHINE_USB (MACHINE_USB_PRI)
#define MACHINE_USB_DUAL (MACHINE_USB_PRI | MACHINE_USB_SEC)
#define MACHINE_LPT (MACHINE_LPT-PRI | MACHINE_LPT_SEC | \
MACHINE_LPT_TER | MACHINE_LPT_QUA)
#define MACHINE_UART (MACHINE_UART_PRI | MACHINE_UART_SEC | \
MACHINE_UART_TER | MACHINE_UART_QUA)
#define MACHINE_VIDEO_FIXED (MACHINE_VIDEO | MACHINE_VIDEO_ONLY) /* sys has fixed int video */
#define MACHINE_SUPER_IO (MACHINE_FDC | MACHINE_LPT_PRI | MACHINE_UART_PRI | MACHINE_UART_SEC)
#define MACHINE_SUPER_IO_GAME (MACHINE_SUPER_IO | MACHINE_GAMEPORT)
#define MACHINE_SUPER_IO_DUAL (MACHINE_SUPER_IO | MACHINE_LPT_SEC | \
MACHINE_UART_TER | MACHINE_UART_QUA)
#define MACHINE_AV (MACHINE_VIDEO | MACHINE_SOUND) /* sys has video and sound */
#define MACHINE_AG (MACHINE_SOUND | MACHINE_GAMEPORT) /* sys has sound and game port */
/* Combined flag for internal storage controllerss. */
#define MACHINE_IDE (MACHINE_IDE_PRI) /* sys has int single IDE/ATAPI - mark as pri IDE/ATAPI */
#define MACHINE_IDE_DUAL (MACHINE_IDE_PRI | MACHINE_IDE_SEC) /* sys has int dual IDE/ATAPI - mark as both pri and sec IDE/ATAPI */
#define MACHINE_IDE_DUALTQ (MACHINE_IDE_TER | MACHINE_IDE_QUA)
#define MACHINE_IDE_QUAD (MACHINE_IDE_DUAL | MACHINE_IDE_DUALTQ) /* sys has int quad IDE/ATAPI - mark as dual + both ter and and qua IDE/ATAPI */
#define MACHINE_SCSI (MACHINE_SCSI_PRI) /* sys has int single SCSI - mark as pri SCSI */
#define MACHINE_SCSI_DUAL (MACHINE_SCSI_PRI | MACHINE_SCSI_SEC) /* sys has int dual SCSI - mark as both pri and sec SCSI */
#define MACHINE_USB (MACHINE_USB_PRI)
#define MACHINE_USB_DUAL (MACHINE_USB_PRI | MACHINE_USB_SEC)
#define MACHINE_HDC (MACHINE_MFM | MACHINE_XTA | \
MACHINE_ESDI | MACHINE_IDE_QUAD | \
MACHINE_SCSI_DUAL | MACHINE_USB_DUAL)
/* Special combined flags. */
#define MACHINE_PIIX (MACHINE_IDE_DUAL)
#define MACHINE_PIIX3 (MACHINE_PIIX | MACHINE_USB)
/* TODO: ACPI flag. */
#define MACHINE_PIIX4 (MACHINE_PIIX3 | MACHINE_ACPI)
#define MACHINE_PIIX (MACHINE_IDE_DUAL)
#define MACHINE_PIIX3 (MACHINE_PIIX | MACHINE_USB)
#define MACHINE_PIIX4 (MACHINE_PIIX3 | MACHINE_ACPI)
#define IS_ARCH(m, a) ((machines[m].bus_flags & (a)) ? 1 : 0)
#define IS_AT(m) (((machines[m].bus_flags & (MACHINE_BUS_ISA16 | MACHINE_BUS_EISA | MACHINE_BUS_VLB | MACHINE_BUS_MCA | MACHINE_BUS_PCI | MACHINE_BUS_PCMCIA | MACHINE_BUS_AGP | MACHINE_BUS_AC97)) && !(machines[m].bus_flags & MACHINE_PC98)) ? 1 : 0)
@@ -304,8 +319,8 @@ typedef struct _machine_ {
void *kbc_device;
#endif /* EMU_DEVICE_H */
/* Bits:
7-0 Set bits are forced set on P1 (no forced set = 0x00);
15-8 Clear bits are forced clear on P1 (no foced clear = 0xff). */
7-0 Set bits are forced set on P1 (no forced set = 0x00);
15-8 Clear bits are forced clear on P1 (no foced clear = 0xff). */
uint16_t kbc_p1;
uint32_t gpio;
uint32_t gpio_acpi;

View File

@@ -65,7 +65,7 @@ extern const device_t mouse_logibus_device;
extern const device_t mouse_logibus_onboard_device;
extern const device_t mouse_msinport_device;
# ifdef USE_GENIBUS
extern const device_t mouse_genibus_device;
extern const device_t mouse_genibus_device;
# endif
extern const device_t mouse_mssystems_device;
extern const device_t mouse_msserial_device;

View File

@@ -11,7 +11,7 @@
*
*
*
* Based on @(#)Dev3C501.cpp Oracle (VirtualBox)
* Based on @(#)Dev3C501.cpp Oracle (VirtualBox)
*
* Authors: TheCollector1995, <mariogplayer@gmail.com>
* Oracle

View File

@@ -85,6 +85,7 @@ extern int nvr_dosave;
#ifdef EMU_DEVICE_H
extern const device_t at_nvr_old_device;
extern const device_t at_nvr_device;
extern const device_t at_mb_nvr_device;
extern const device_t ps_nvr_device;
extern const device_t amstrad_nvr_device;
extern const device_t amstrad_megapc_nvr_device;

View File

@@ -49,21 +49,12 @@ extern int strnicmp(const char *s1, const char *s2, size_t n);
# define ftello64 ftello
# define off64_t off_t
#elif defined(_MSC_VER)
// # define fopen64 fopen
// # define fopen64 fopen
# define fseeko64 _fseeki64
# define ftello64 _ftelli64
# define off64_t off_t
#endif
#if __has_attribute(fallthrough)
# define fallthrough __attribute__((fallthrough))
#else
# if __has_attribute(__fallthrough__)
# define fallthrough __attribute__((__fallthrough__))
# endif
# define fallthrough do {} while (0) /* fallthrough */
#endif
#ifdef _MSC_VER
# define UNUSED(arg) arg
#else
@@ -89,6 +80,19 @@ extern "C" {
# define ssize_t intptr_t
#endif
#ifdef _MSC_VER
# define fallthrough do {} while (0) /* fallthrough */
#else
# if __has_attribute(fallthrough)
# define fallthrough __attribute__((fallthrough))
# else
# if __has_attribute(__fallthrough__)
# define fallthrough __attribute__((__fallthrough__))
# endif
# define fallthrough do {} while (0) /* fallthrough */
# endif
#endif
/* Global variables residing in the platform module. */
extern int dopause; /* system is paused */
extern int mouse_capture; /* mouse is captured in app */

View File

@@ -40,23 +40,23 @@ struct dirent {
# define d_namlen d_reclen
typedef struct DIR_t {
short flags; /* internal flags */
short offset; /* offset of entry into dir */
long handle; /* open handle to Win32 system */
short sts; /* last known status code */
char *dta; /* internal work data */
short flags; /* internal flags */
short offset; /* offset of entry into dir */
long handle; /* open handle to Win32 system */
short sts; /* last known status code */
char *dta; /* internal work data */
# ifdef UNICODE
wchar_t dir[MAXDIRLEN + 1]; /* open dir */
wchar_t dir[MAXDIRLEN + 1]; /* open dir */
# else
char dir[MAXDIRLEN + 1]; /* open dir */
char dir[MAXDIRLEN + 1]; /* open dir */
# endif
struct dirent dent; /* actual directory entry */
struct dirent dent; /* actual directory entry */
} DIR;
/* Directory routine flags. */
# define DIR_F_LOWER 0x0001 /* force to lowercase */
# define DIR_F_SANE 0x0002 /* force this to sane path */
# define DIR_F_ISROOT 0x0010 /* this is the root directory */
# define DIR_F_LOWER 0x0001 /* force to lowercase */
# define DIR_F_SANE 0x0002 /* force this to sane path */
# define DIR_F_ISROOT 0x0010 /* this is the root directory */
/* Function prototypes. */
extern DIR *opendir(const char *);

View File

@@ -18,13 +18,17 @@
#ifndef EMU_PLAT_FALLTHROUGH_H
#define EMU_PLAT_FALLTHROUGH_H
#if __has_attribute(__fallthrough__)
# define fallthrough __attribute__((__fallthrough__))
#ifdef _MSC_VER
# define fallthrough do {} while (0) /* fallthrough */
#else
# if __has_attribute(fallthrough)
# define fallthrough __attribute__((fallthrough))
# else
# if __has_attribute(__fallthrough__)
# define fallthrough __attribute__((__fallthrough__))
# endif
# define fallthrough do {} while (0) /* fallthrough */
# endif
# define fallthrough do {} while (0) /* fallthrough */
#endif
#endif /*EMU_PLAT_FALLTHROUGH_H*/

View File

@@ -67,7 +67,7 @@
#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_MB 1713 /* MB == IDC_TEXT_MB */
#define IDT_MEMORY 1714 /* Memory: */
/* DLG_CFG_VIDEO */

View File

@@ -1,18 +1,18 @@
/*
* 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.
* 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.
* This file is part of the 86Box distribution.
*
* Definitions for the SMRAM interface.
* Definitions for the SMRAM interface.
*
*
*
* Authors: Miran Grca, <mgrca8@gmail.com>
* Authors: Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2016-2020 Miran Grca.
* Copyright 2016-2020 Miran Grca.
*/
#ifndef EMU_ROW_H
@@ -43,4 +43,4 @@ extern void row_set_boundary(uint8_t row_id, uint32_t boundary);
extern device_t row_device;
#endif /*EMU_ROW_H*/
#endif /*EMU_ROW_H*/

View File

@@ -30,32 +30,32 @@
#define NVR_SIZE 256 /* size of NVR */
/* EEPROM map and bit definitions. */
#define EE0_HOSTID 0x07 /* EE(0) [2:0] */
#define EE0_ALTFLOP 0x80 /* EE(0) [7] FDC at 370h */
#define EE1_IRQCH 0x07 /* EE(1) [3:0] */
#define EE1_DMACH 0x70 /* EE(1) [7:4] */
#define EE2_RMVOK 0x01 /* EE(2) [0] Support removable disks */
#define EE2_HABIOS 0x02 /* EE(2) [1] HA Bios Space Reserved */
#define EE2_INT19 0x04 /* EE(2) [2] HA Bios Controls INT19 */
#define EE2_DYNSCAN 0x08 /* EE(2) [3] Dynamically scan bus */
#define EE2_TWODRV 0x10 /* EE(2) [4] Allow more than 2 drives */
#define EE2_SEEKRET 0x20 /* EE(2) [5] Immediate return on seek */
#define EE2_EXT1G 0x80 /* EE(2) [7] Extended Translation >1GB */
#define EE3_SPEED 0x00 /* EE(3) [7:0] DMA Speed */
#define EE0_HOSTID 0x07 /* EE(0) [2:0] */
#define EE0_ALTFLOP 0x80 /* EE(0) [7] FDC at 370h */
#define EE1_IRQCH 0x07 /* EE(1) [3:0] */
#define EE1_DMACH 0x70 /* EE(1) [7:4] */
#define EE2_RMVOK 0x01 /* EE(2) [0] Support removable disks */
#define EE2_HABIOS 0x02 /* EE(2) [1] HA Bios Space Reserved */
#define EE2_INT19 0x04 /* EE(2) [2] HA Bios Controls INT19 */
#define EE2_DYNSCAN 0x08 /* EE(2) [3] Dynamically scan bus */
#define EE2_TWODRV 0x10 /* EE(2) [4] Allow more than 2 drives */
#define EE2_SEEKRET 0x20 /* EE(2) [5] Immediate return on seek */
#define EE2_EXT1G 0x80 /* EE(2) [7] Extended Translation >1GB */
#define EE3_SPEED 0x00 /* EE(3) [7:0] DMA Speed */
#define SPEED_33 0xFF
#define SPEED_50 0x00
#define SPEED_56 0x04
#define SPEED_67 0x01
#define SPEED_80 0x02
#define SPEED_10 0x03
#define EE4_FLOPTOK 0x80 /* EE(4) [7] Support Flopticals */
#define EE6_PARITY 0x01 /* EE(6) [0] parity check enable */
#define EE6_TERM 0x02 /* EE(6) [1] host term enable */
#define EE6_RSTBUS 0x04 /* EE(6) [2] reset SCSI bus on boot */
#define EEE_SYNC 0x01 /* EE(E) [0] Enable Sync Negotiation */
#define EEE_DISCON 0x02 /* EE(E) [1] Enable Disconnection */
#define EEE_FAST 0x04 /* EE(E) [2] Enable FAST SCSI */
#define EEE_START 0x08 /* EE(E) [3] Enable Start Unit */
#define EE4_FLOPTOK 0x80 /* EE(4) [7] Support Flopticals */
#define EE6_PARITY 0x01 /* EE(6) [0] parity check enable */
#define EE6_TERM 0x02 /* EE(6) [1] host term enable */
#define EE6_RSTBUS 0x04 /* EE(6) [2] reset SCSI bus on boot */
#define EEE_SYNC 0x01 /* EE(E) [0] Enable Sync Negotiation */
#define EEE_DISCON 0x02 /* EE(E) [1] Enable Disconnection */
#define EEE_FAST 0x04 /* EE(E) [2] Enable FAST SCSI */
#define EEE_START 0x08 /* EE(E) [3] Enable Start Unit */
/*
* Host Adapter I/O ports.
@@ -166,11 +166,11 @@
#define FOURTEEN_BYTES 0x00 /* Request Sense Buffer size */
#define NO_AUTO_REQUEST_SENSE 0x01 /* No Request Sense Buffer */
/* Bytes 4, 5 and 6 Data Length - Data transfer byte count */
/* Bytes 7, 8 and 9 Data Pointer - SGD List or Data Buffer */
/* Bytes 10, 11 and 12 Link Pointer - Next CCB in Linked List */
/* Byte 13 Command Link ID - TBD (I don't know yet) */
/* Byte 14 Host Status - Host Adapter status */
/* Bytes 4, 5 and 6 Data Length - Data transfer byte count */
/* Bytes 7, 8 and 9 Data Pointer - SGD List or Data Buffer */
/* Bytes 10, 11 and 12 Link Pointer - Next CCB in Linked List */
/* Byte 13 Command Link ID - TBD (I don't know yet) */
/* Byte 14 Host Status - Host Adapter status */
#define CCB_COMPLETE 0x00 /* CCB completed without error */
#define CCB_LINKED_COMPLETE 0x0A /* Linked command completed */
#define CCB_LINKED_COMPLETE_INT 0x0B /* Linked complete with intr */

View File

@@ -668,11 +668,11 @@ Short Delay Short Delay + Feedback
// Chorus Params
typedef struct {
WORD FbkLevel; // Feedback Level (0xE600-0xE6FF)
WORD Delay; // Delay (0-0x0DA3) [1/44100 sec]
WORD LfoDepth; // LFO Depth (0xBC00-0xBCFF)
DWORD DelayR; // Right Delay (0-0xFFFFFFFF) [1/256/44100 sec]
DWORD LfoFreq; // LFO Frequency (0-0xFFFFFFFF)
WORD FbkLevel; // Feedback Level (0xE600-0xE6FF)
WORD Delay; // Delay (0-0x0DA3) [1/44100 sec]
WORD LfoDepth; // LFO Depth (0xBC00-0xBCFF)
DWORD DelayR; // Right Delay (0-0xFFFFFFFF) [1/256/44100 sec]
DWORD LfoFreq; // LFO Frequency (0-0xFFFFFFFF)
} CHORUS_TYPE;

View File

@@ -8,7 +8,7 @@
*
* Definitions for the NukedOPL3 driver.
*
* Version: @(#)snd_opl_nuked.h 1.0.5 2020/07/16
* Version: @(#)snd_opl_nuked.h 1.0.5 2020/07/16
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>

View File

@@ -7,6 +7,7 @@
#define MAX_USEC64 1000000ULL
#define MAX_USEC 1000000.0
#define TIMER_PROCESS 4
#define TIMER_SPLIT 2
#define TIMER_ENABLED 1
@@ -117,6 +118,13 @@ timer_is_enabled(pc_timer_t *timer)
return !!(timer->flags & TIMER_ENABLED);
}
/*True if timer currently on*/
static __inline int
timer_is_on(pc_timer_t *timer)
{
return ((timer->flags & TIMER_ENABLED) && (timer->period > 0.0));
}
/*Return integer timestamp of timer*/
static __inline uint32_t
timer_get_ts_int(pc_timer_t *timer)

View File

@@ -42,6 +42,8 @@ typedef struct ibm8514_t {
int type;
int local;
int bpp;
int on;
int accel_bpp;
uint32_t vram_size;
uint32_t vram_mask;

View File

@@ -11,14 +11,10 @@
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
* Authors: Miran Grca, <mgrca8@gmail.com>
* EngiNerd, <webmaster.crrc@yahoo.it>
*
* Copyright 2008-2019 Sarah Walker.
* Copyright 2016-2019 Miran Grca.
* Copyright 2017-2019 Fred N. van Kempen.
* Copyright 2020 EngiNerd.
*/

View File

@@ -11,14 +11,10 @@
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
* Authors: Miran Grca, <mgrca8@gmail.com>
* EngiNerd, <webmaster.crrc@yahoo.it>
*
* Copyright 2008-2019 Sarah Walker.
* Copyright 2016-2019 Miran Grca.
* Copyright 2017-2019 Fred N. van Kempen.
* Copyright 2020 EngiNerd.
*/

View File

@@ -156,12 +156,12 @@ extern void pgc_sto_raster(pgc_t *, int16_t *x, int16_t *y);
extern void pgc_ito_raster(pgc_t *, int32_t *x, int32_t *y);
extern void pgc_dto_raster(pgc_t *, double *x, double *y);
#if 0
extern int pgc_input_byte(pgc_t *, uint8_t *val);
extern int pgc_output_byte(pgc_t *, uint8_t val);
extern int pgc_input_byte(pgc_t *, uint8_t *val);
extern int pgc_output_byte(pgc_t *, uint8_t val);
#endif
extern int pgc_output_string(pgc_t *, const char *val);
#if 0
extern int pgc_error_byte(pgc_t *, uint8_t val);
extern int pgc_error_byte(pgc_t *, uint8_t val);
#endif
extern int pgc_error_string(pgc_t *, const char *val);
extern int pgc_error(pgc_t *, int err);

View File

@@ -182,6 +182,7 @@ typedef struct svga_t {
hwcursor_t overlay_latch;
void (*render)(struct svga_t *svga);
void (*render8514)(struct svga_t *svga);
void (*recalctimings_ex)(struct svga_t *svga);
void (*video_out)(uint16_t addr, uint8_t val, void *priv);
@@ -271,7 +272,6 @@ typedef struct svga_t {
} svga_t;
extern int vga_on;
extern int ibm8514_on;
extern void ibm8514_poll(ibm8514_t *dev, svga_t *svga);
extern void ibm8514_recalctimings(svga_t *svga);

View File

@@ -1,18 +1,18 @@
/*
* 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.
* 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.
* This file is part of the 86Box distribution.
*
* 3DFX Voodoo emulation.
* 3DFX Voodoo emulation.
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
*
* Copyright 2008-2020 Sarah Walker.
* Copyright 2008-2020 Sarah Walker.
*/
#ifndef VIDEO_VOODOO_BLITTER_H

File diff suppressed because it is too large Load Diff

View File

@@ -152,7 +152,7 @@ extern int changeframecount;
extern volatile int screenshots;
#if 0
extern bitmap_t *buffer32;
extern bitmap_t *buffer32;
#endif
#define buffer32 (monitors[monitor_index_global].target_buffer)
#define pal_lookup (monitors[monitor_index_global].mon_pal_lookup)
@@ -179,7 +179,7 @@ extern bitmap_t *buffer32;
extern PALETTE cgapal;
extern PALETTE cgapal_mono[6];
#if 0
extern uint32_t pal_lookup[256];
extern uint32_t pal_lookup[256];
#endif
extern int video_fullscreen;
extern int video_fullscreen_scale;
@@ -352,6 +352,7 @@ extern const device_t gd5429_vlb_device;
extern const device_t gd5430_diamond_speedstar_pro_se_a8_vlb_device;
extern const device_t gd5430_vlb_device;
extern const device_t gd5430_pci_device;
extern const device_t gd5430_onboard_pci_device;
extern const device_t gd5434_isa_device;
extern const device_t gd5434_diamond_speedstar_64_a3_isa_device;
extern const device_t gd5434_onboard_pci_device;

View File

@@ -1299,7 +1299,7 @@ lcdm_poll(amsvid_t *vid)
drawcursor = ((mda->ma == ca) && mda->con && mda->cursoron);
blink = ((mda->blink & 16) && (mda->ctrl & 0x20) && (attr & 0x80) && !drawcursor);
lcd_draw_char_80(vid, &((buffer32->line[mda->displine]))[x * 8], chr, attr, drawcursor, blink, mda->sc, 0, mda->ctrl);
lcd_draw_char_80(vid, &(buffer32->line[mda->displine])[x * 8], chr, attr, drawcursor, blink, mda->sc, 0, mda->ctrl);
mda->ma++;
}
}
@@ -2005,10 +2005,8 @@ const device_t vid_pc3086_device = {
};
static void
ms_write(uint16_t addr, UNUSED(uint8_t val), void *priv)
ms_write(uint16_t addr, UNUSED(uint8_t val), UNUSED(void *priv))
{
amstrad_t *ams = (amstrad_t *) priv;
if ((addr == 0x78) || (addr == 0x79))
mouse_clear_x();
else
@@ -2016,11 +2014,10 @@ ms_write(uint16_t addr, UNUSED(uint8_t val), void *priv)
}
static uint8_t
ms_read(uint16_t addr, void *priv)
ms_read(uint16_t addr, UNUSED(void *priv))
{
amstrad_t *ams = (amstrad_t *) priv;
uint8_t ret;
int delta = 0;
uint8_t ret;
int delta = 0;
if ((addr == 0x78) || (addr == 0x79)) {
mouse_subtract_x(&delta, NULL, -128, 127, 0);

View File

@@ -10,11 +10,9 @@
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Authors: Miran Grca, <mgrca8@gmail.com>
* EngiNerd <webmaster.crrc@yahoo.it>
*
* Copyright 2010-2019 Sarah Walker.
* Copyright 2016-2019 Miran Grca.
* Copyright 2020 EngiNerd.
*/

View File

@@ -10,10 +10,8 @@
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Authors: Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2010-2020 Sarah Walker.
* Copyright 2016-2020 Miran Grca.
*/
#include <stdarg.h>
@@ -632,16 +630,24 @@ machine_at_pc330_6573_init(const machine_t *model) /* doesn't like every CPU oth
if (bios_only || !ret)
return ret;
machine_at_common_init(model);
machine_at_common_init_ex(model, 2);
device_add(&ide_vlb_2ch_device);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1);
pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2);
pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4);
pci_register_slot(0x0C, PCI_CARD_NORMAL, 5, 6, 7, 8);
pci_register_slot(0x0D, PCI_CARD_NORMAL, 9, 10, 11, 12);
/* This is a guess because the BIOS always gives it a video BIOS
and never gives it an IRQ, so it is impossible to known for
certain until we obtain PCI readouts from the real machine. */
pci_register_slot(0x0E, PCI_CARD_VIDEO, 13, 14, 15, 16);
device_add(&opti802g_pci_device);
if (gfxcard[0] == VID_INTERNAL)
device_add(&gd5430_onboard_pci_device);
device_add(&opti602_device);
device_add(&opti802g_device);
device_add(&opti822_device);
device_add(&keyboard_ps2_ami_device);
device_add(&fdc37c665_ide_device);
@@ -1568,7 +1574,7 @@ machine_at_ecs486_init(const machine_t *model)
device_add(&ide_cmd640_pci_legacy_only_device);
device_add(&fdc37c665_device);
device_add(&intel_flash_bxt_device);
device_add(&keyboard_at_ami_device);
device_add(&keyboard_ps2_ami_device);
return ret;
}
@@ -1717,7 +1723,7 @@ machine_at_spc7700plw_init(const machine_t *model)
device_add(&umc_8886af_device);
device_add(&fdc37c665_device);
device_add(&intel_flash_bxt_device);
device_add(&keyboard_at_ami_device);
device_add(&keyboard_ps2_ami_device);
return ret;
}

View File

@@ -705,8 +705,8 @@ const device_config_t compaq_plasma_config[] = {
// clang-format off
{
.name = "rgb_type",
.description = "RGB type",
.type = CONFIG_SELECTION,
.description = "RGB type",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 0,
.file_filter = "",

View File

@@ -10,10 +10,8 @@
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Authors: Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2010-2019 Sarah Walker.
* Copyright 2016-2019 Miran Grca.
*/
#include <stdio.h>

View File

@@ -10,10 +10,8 @@
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Authors: Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2010-2019 Sarah Walker.
* Copyright 2016-2019 Miran Grca.
*/
#include <stdio.h>
@@ -172,7 +170,7 @@ machine_at_zappa_init(const machine_t *model)
if (bios_only || !ret)
return ret;
machine_at_common_init(model);
machine_at_common_init_ex(model, 2);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);

View File

@@ -10,11 +10,8 @@
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Melissa Goad, <mszoopers@protonmail.com>
* Authors: Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2010-2020 Sarah Walker.
* Copyright 2016-2020 Miran Grca.
*
*/
@@ -189,7 +186,7 @@ machine_at_tc430hx_init(const machine_t *model)
if (bios_only || !ret)
return ret;
machine_at_common_init(model);
machine_at_common_init_ex(model, 2);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
@@ -224,7 +221,7 @@ machine_at_infinia7200_init(const machine_t *model)
if (bios_only || !ret)
return ret;
machine_at_common_init(model);
machine_at_common_init_ex(model, 2);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
@@ -260,7 +257,7 @@ machine_at_equium5200_init(const machine_t *model)
if (bios_only || !ret)
return ret;
machine_at_common_init(model);
machine_at_common_init_ex(model, 2);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
@@ -294,7 +291,7 @@ machine_at_pcv90_init(const machine_t *model)
if (bios_only || !ret)
return ret;
machine_at_common_init(model);
machine_at_common_init_ex(model, 2);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
@@ -550,7 +547,7 @@ machine_at_pb680_init(const machine_t *model)
if (bios_only || !ret)
return ret;
machine_at_common_init(model);
machine_at_common_init_ex(model, 2);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);

View File

@@ -10,11 +10,8 @@
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Melissa Goad, <mszoopers@protonmail.com>
* Authors: Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2010-2020 Sarah Walker.
* Copyright 2016-2020 Miran Grca.
*/
#include <stdio.h>
@@ -47,7 +44,7 @@
static void
machine_at_thor_common_init(const machine_t *model, int mr)
{
machine_at_common_init_ex(model, mr);
machine_at_common_init_ex(model, 2);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
@@ -61,9 +58,6 @@ machine_at_thor_common_init(const machine_t *model, int mr)
if (gfxcard[0] == VID_INTERNAL)
device_add(&s3_phoenix_trio64vplus_onboard_pci_device);
#if 0
device_add(&keyboard_ps2_ami_pci_device);
#endif
device_add(&keyboard_ps2_intel_ami_pci_device);
device_add(&i430fx_device);
device_add(&piix_device);
@@ -213,7 +207,7 @@ machine_at_endeavor_init(const machine_t *model)
if (bios_only || !ret)
return ret;
machine_at_common_init(model);
machine_at_common_init_ex(model, 2);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
@@ -276,7 +270,7 @@ machine_at_pb640_init(const machine_t *model)
if (bios_only || !ret)
return ret;
machine_at_common_init(model);
machine_at_common_init_ex(model, 2);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
@@ -458,7 +452,7 @@ machine_at_p55t2s_init(const machine_t *model)
if (bios_only || !ret)
return ret;
machine_at_common_init(model);
machine_at_common_init_ex(model, 2);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);

View File

@@ -10,13 +10,9 @@
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Melissa Goad, <mszoopers@protonmail.com>
* Authors: Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2010-2020 Sarah Walker.
* Copyright 2016-2020 Miran Grca.
* Copyright 2020 Melissa Goad.
*/
#include <stdio.h>
#include <stdint.h>

View File

@@ -121,11 +121,11 @@
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <https://pcem-emulator.co.uk/>
* John Elliott, <jce@seasip.info>
*
* Copyright 2017-2018 Fred N. van Kempen.
* Copyright 2016-2018 Miran Grca.
* Copyright 2008-2018 Sarah Walker.
* Copyright 2008-2018 John Elliott.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -26,11 +26,11 @@
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <https://pcem-emulator.co.uk/>
* John Elliott, <jce@seasip.info>
*
* Copyright 2017-2019 Fred N. van Kempen.
* Copyright 2016-2019 Miran Grca.
* Copyright 2008-2019 Sarah Walker.
* Copyright 2008-2019 John Elliott.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -1504,7 +1504,7 @@ m19_vid_init(m19_vid_t *vid)
#endif
/* OGC emulation part begin */
loadfont_ex("roms/machines/m19/BIOS.BIN", 1, 90);
loadfont("roms/machines/m19/MBM2764-30 8514 107 AB PCF3.BIN", 7);
/* composite is not working yet */
vid->ogc.cga.composite = 0; // (display_type != CGA_RGB);
vid->ogc.cga.revision = device_get_config_int("composite_type");
@@ -1916,6 +1916,7 @@ machine_xt_m19_init(const machine_t *model)
ret = bios_load_linear("roms/machines/m19/BIOS.BIN",
0x000fc000, 16384, 0);
ret &= rom_present("roms/machines/m19/MBM2764-30 8514 107 AB PCF3.BIN");
if (bios_only || !ret)
return ret;

View File

@@ -55,11 +55,11 @@
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <https://pcem-emulator.co.uk/>
* John Elliott, <jce@seasip.info>
*
* Copyright 2018-2019 Fred N. van Kempen.
* Copyright 2018-2019 Miran Grca.
* Copyright 2018-2019 Sarah Walker.
* Copyright 2018-2019 John Elliott.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -13,11 +13,11 @@
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <https://pcem-emulator.co.uk/>
* John Elliott, <jce@seasip.info>
*
* Copyright 2018-2019 Fred N. van Kempen.
* Copyright 2018-2019 Miran Grca.
* Copyright 2018-2019 Sarah Walker.
* Copyright 2018-2019 John Elliott.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -11,12 +11,12 @@
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Authors: Tux,
* Miran Grca, <mgrca8@gmail.com>
* TheCollector1995, <mariogplayer@gmail.com>
* EngiNerd <webmaster.crrc@yahoo.it>
*
* Copyright 2008-2019 Sarah Walker.
* Copyright 2016-2019 Tux.
* Copyright 2016-2019 Miran Grca.
* Copyright 2020 EngiNerd.
*/

View File

@@ -10,11 +10,9 @@
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Authors: Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
*
* Copyright 2008-2020 Sarah Walker.
* Copyright 2016-2020 Miran Grca.
* Copyright 2017-2020 Fred N. van Kempen.
*/
@@ -168,7 +166,7 @@ machine_common_init(UNUSED(const machine_t *model))
int pit_type = IS_AT(machine) ? PIT_8254 : PIT_8253;
/* Select fast PIT if needed */
if ((pit_mode == -1 && is486) || pit_mode == 1)
if (((pit_mode == -1) && is486) || (pit_mode == 1))
pit_type += 2;
pit_common_init(pit_type, pit_irq0_timer, NULL);

View File

@@ -13,11 +13,9 @@
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Authors: Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
*
* Copyright 2008-2020 Sarah Walker.
* Copyright 2016-2020 Miran Grca.
* Copyright 2017-2020 Fred N. van Kempen.
*/
@@ -6486,17 +6484,17 @@ const machine_t machines[] = {
.max_multi = 3.0
},
.bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE | MACHINE_APM,
.flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM,
.ram = {
.min = 1024,
.max = 65536,
.step = 1024
},
.nvrmask = 127,
.nvrmask = 255,
.kbc_device = NULL,
.kbc_p1 = 0,
.gpio = 0,
.device = NULL,
.device = &gd5430_onboard_pci_device,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
@@ -7073,7 +7071,7 @@ const machine_t machines[] = {
.min_multi = 0,
.max_multi = 0
},
.bus_flags = MACHINE_PCI,
.bus_flags = MACHINE_PCI | MACHINE_BUS_PS2_LATCH,
.flags = MACHINE_IDE_DUAL | MACHINE_APM,
.ram = {
.min = 1024,
@@ -8284,7 +8282,7 @@ const machine_t machines[] = {
.max = 131072,
.step = 8192
},
.nvrmask = 127,
.nvrmask = 255,
.kbc_device = NULL,
.kbc_p1 = 0,
.gpio = 0,
@@ -8725,7 +8723,7 @@ const machine_t machines[] = {
.max = 131072,
.step = 8192
},
.nvrmask = 127,
.nvrmask = 255,
.kbc_device = NULL,
.kbc_p1 = 0,
.gpio = 0,
@@ -8806,7 +8804,7 @@ const machine_t machines[] = {
.max = 131072,
.step = 8192
},
.nvrmask = 127,
.nvrmask = 255,
.kbc_device = NULL,
.kbc_p1 = 0,
.gpio = 0,
@@ -8847,7 +8845,7 @@ const machine_t machines[] = {
.max = 131072,
.step = 8192
},
.nvrmask = 127,
.nvrmask = 255,
.kbc_device = NULL,
.kbc_p1 = 0,
.gpio = 0,
@@ -8888,7 +8886,7 @@ const machine_t machines[] = {
.max = 131072,
.step = 8192
},
.nvrmask = 127,
.nvrmask = 255,
.kbc_device = NULL,
.kbc_p1 = 0,
.gpio = 0,
@@ -8967,7 +8965,7 @@ const machine_t machines[] = {
.max = 131072,
.step = 8192
},
.nvrmask = 127,
.nvrmask = 255,
.kbc_device = NULL,
.kbc_p1 = 0,
.gpio = 0,
@@ -9206,7 +9204,7 @@ const machine_t machines[] = {
.max = 786432,
.step = 8192
},
.nvrmask = 127,
.nvrmask = 255,
.kbc_device = NULL,
.kbc_p1 = 0,
.gpio = 0,
@@ -9610,7 +9608,7 @@ const machine_t machines[] = {
.max = 196608,
.step = 8192
},
.nvrmask = 127,
.nvrmask = 255,
.kbc_device = NULL,
.kbc_p1 = 0,
.gpio = 0,
@@ -9652,7 +9650,7 @@ const machine_t machines[] = {
.max = 196608,
.step = 8192
},
.nvrmask = 127,
.nvrmask = 255,
.kbc_device = NULL,
.kbc_p1 = 0,
.gpio = 0,
@@ -10048,7 +10046,7 @@ const machine_t machines[] = {
.max = 131072,
.step = 8192
},
.nvrmask = 127,
.nvrmask = 255,
.kbc_device = NULL,
.kbc_p1 = 0,
.gpio = 0,

View File

@@ -132,6 +132,7 @@ readmembl_2386(uint32_t addr)
{
mem_mapping_t *map;
uint64_t a;
uint8_t ret = 0xff;
GDBSTUB_MEM_ACCESS(addr, GDBSTUB_MEM_READ, 1);
@@ -145,15 +146,15 @@ readmembl_2386(uint32_t addr)
addr64 = (uint32_t) a;
if (a > 0xffffffffULL)
return 0xff;
return 0xff;
}
addr = (uint32_t) (addr64 & rammask);
map = read_mapping[addr >> MEM_GRANULARITY_BITS];
if (map && map->read_b)
return map->read_b(addr, map->priv);
ret = map->read_b(addr, map->priv);
return 0xff;
return ret;
}
@@ -190,6 +191,7 @@ uint8_t
readmembl_no_mmut_2386(uint32_t addr, uint32_t a64)
{
mem_mapping_t *map;
uint8_t ret = 0xff;
GDBSTUB_MEM_ACCESS(addr, GDBSTUB_MEM_READ, 1);
@@ -205,9 +207,9 @@ readmembl_no_mmut_2386(uint32_t addr, uint32_t a64)
map = read_mapping[addr >> MEM_GRANULARITY_BITS];
if (map && map->read_b)
return map->read_b(addr, map->priv);
ret = map->read_b(addr, map->priv);
return 0xff;
return ret;
}
@@ -241,6 +243,7 @@ readmemwl_2386(uint32_t addr)
mem_mapping_t *map;
int i;
uint64_t a;
uint16_t ret = 0xffff;
addr64a[0] = addr;
addr64a[1] = addr + 1;
@@ -283,14 +286,13 @@ readmemwl_2386(uint32_t addr)
map = read_mapping[addr >> MEM_GRANULARITY_BITS];
if (map && map->read_w)
return map->read_w(addr, map->priv);
if (map && map->read_b) {
return map->read_b(addr, map->priv) |
((uint16_t) (map->read_b(addr + 1, map->priv)) << 8);
ret = map->read_w(addr, map->priv);
else if (map && map->read_b) {
ret = map->read_b(addr, map->priv) |
((uint16_t) (map->read_b(addr + 1, map->priv)) << 8);
}
return 0xffff;
return ret;
}
@@ -361,6 +363,7 @@ uint16_t
readmemwl_no_mmut_2386(uint32_t addr, uint32_t *a64)
{
mem_mapping_t *map;
uint16_t ret = 0xffff;
GDBSTUB_MEM_ACCESS(addr, GDBSTUB_MEM_READ, 2);
@@ -391,14 +394,13 @@ readmemwl_no_mmut_2386(uint32_t addr, uint32_t *a64)
map = read_mapping[addr >> MEM_GRANULARITY_BITS];
if (map && map->read_w)
return map->read_w(addr, map->priv);
if (map && map->read_b) {
return map->read_b(addr, map->priv) |
((uint16_t) (map->read_b(addr + 1, map->priv)) << 8);
ret = map->read_w(addr, map->priv);
else if (map && map->read_b) {
ret = map->read_b(addr, map->priv) |
((uint16_t) (map->read_b(addr + 1, map->priv)) << 8);
}
return 0xffff;
return ret;
}

View File

@@ -10,14 +10,10 @@
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Melissa Goad, <mszoopers@protonmail.com>
* Authors: Miran Grca, <mgrca8@gmail.com>
* Jasmine Iwanek, <jriwanek@gmail.com>
*
* Copyright 2008-2020 Sarah Walker.
* Copyright 2016-2020 Miran Grca.
* Copyright 2020 Melody Goad.
* Copyright 2022-2023 Jasmine Iwanek.
*/
#include <stdio.h>

View File

@@ -194,11 +194,10 @@
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Mahod,
* Sarah Walker, <https://pcem-emulator.co.uk/>
*
* Copyright 2017-2020 Fred N. van Kempen.
* Copyright 2016-2020 Miran Grca.
* Copyright 2008-2020 Sarah Walker.
* Copyright 2016-2020 Mahod.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -296,6 +295,7 @@
#define FLAG_AMI_1995_HACK 0x08
#define FLAG_P6RP4_HACK 0x10
#define FLAG_PIIX4 0x20
#define FLAG_MULTI_BANK 0x40
typedef struct local_t {
int8_t stat;
@@ -560,6 +560,8 @@ timer_tick(nvr_t *nvr)
static void
nvr_reg_common_write(uint16_t reg, uint8_t val, nvr_t *nvr, local_t *local)
{
if (local->lock[reg])
return;
if ((reg == 0x2c) && (local->flags & FLAG_AMI_1994_HACK))
nvr->is_new = 0;
if ((reg == 0x2d) && (local->flags & FLAG_AMI_1992_HACK))
@@ -570,8 +572,6 @@ nvr_reg_common_write(uint16_t reg, uint8_t val, nvr_t *nvr, local_t *local)
return;
if ((reg >= 0xb8) && (reg <= 0xbf) && local->wp[1])
return;
if (local->lock[reg])
return;
if (nvr->regs[reg] != val) {
nvr->regs[reg] = val;
nvr_dosave = 1;
@@ -665,9 +665,12 @@ nvr_write(uint16_t addr, uint8_t val, void *priv)
} else {
local->addr[addr_id] = (val & (nvr->size - 1));
/* Some chipsets use a 256 byte NVRAM but ports 70h and 71h always access only 128 bytes. */
if (addr_id == 0x0)
if (addr_id == 0x0) {
local->addr[addr_id] &= 0x7f;
else if ((addr_id == 0x1) && (local->flags & FLAG_PIIX4))
/* Needed for OPTi 82C601/82C602 and NSC PC87306. */
if (local->flags & FLAG_MULTI_BANK)
local->addr[addr_id] |= (0x80 * local->bank[addr_id]);
} else if ((addr_id == 0x1) && (local->flags & FLAG_PIIX4))
local->addr[addr_id] = (local->addr[addr_id] & 0x7f) | 0x80;
if (local->bank[addr_id] > 0)
local->addr[addr_id] = (local->addr[addr_id] & 0x7f) | (0x80 * local->bank[addr_id]);
@@ -1081,6 +1084,12 @@ nvr_at_init(const device_t *info)
break;
}
if (info->local & 0x20)
local->def = 0x00;
if (info->local & 0x40)
local->flags |= FLAG_MULTI_BANK;
local->read_addr = 1;
/* Set up any local handlers here. */
@@ -1175,6 +1184,20 @@ const device_t at_nvr_device = {
.config = NULL
};
const device_t at_mb_nvr_device = {
.name = "PC/AT NVRAM",
.internal_name = "at_nvr",
.flags = DEVICE_ISA | DEVICE_AT,
.local = 0x40 | 0x20 | 1,
.init = nvr_at_init,
.close = nvr_at_close,
.reset = nvr_at_reset,
{ .available = NULL },
.speed_changed = nvr_at_speed_changed,
.force_redraw = NULL,
.config = NULL
};
const device_t ps_nvr_device = {
.name = "PS/1 or PS/2 NVRAM",
.internal_name = "ps_nvr",

View File

@@ -656,7 +656,7 @@ msgid "(empty)"
msgstr "(prázdné)"
msgid "All files"
msgstr "All files"
msgstr "Všechny soubory"
msgid "Turbo"
msgstr "Turbo"
@@ -932,10 +932,10 @@ msgid "Cartridge images"
msgstr "Obrazy cartridge"
msgid "Error initializing renderer"
msgstr "Error initializing renderer"
msgstr "Chyba při inicializaci vykreslovače"
msgid "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
msgstr "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
msgstr "Vykreslovač OpenGL (3.0 Core) se nepodařilo inicializovat. Použijte jiný renderer."
msgid "Resume execution"
msgstr "Obnovit"
@@ -1196,8 +1196,19 @@ msgid "(System Default)"
msgstr "(Výchozí nastavení systému)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Nepodařilo se inicializovat síťový ovladač"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Konfigurace sítě bude přepnuta na nulový ovladač"
msgid "PIT mode:"
msgstr "Režim PIT:"
msgid "Auto"
msgstr "Automatický"
msgid "Slow"
msgstr "Pomalý"
msgid "Fast"
msgstr "Rychlý"

View File

@@ -98,7 +98,7 @@ msgid "Filter method"
msgstr "Filteringmethode"
msgid "&Nearest"
msgstr "&Nearest"
msgstr "&Nächst"
msgid "&Linear"
msgstr "&Linear"
@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Systemstandard)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Netzwerktreiber konnte nicht initialisiert werden"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Die Netzwerkkonfiguration wird auf den Nulltreiber umgestellt"
msgid "PIT mode:"
msgstr "PIT-Modus:"
msgid "Auto"
msgstr "Auto"
msgid "Slow"
msgstr "Langsam"
msgid "Fast"
msgstr "Schnell"

View File

@@ -1201,3 +1201,15 @@ msgstr "Failed to initialize network driver"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgid "PIT mode:"
msgstr "PIT mode:"
msgid "Auto"
msgstr "Auto"
msgid "Slow"
msgstr "Slow"
msgid "Fast"
msgstr "Fast"

View File

@@ -1201,3 +1201,15 @@ msgstr "Failed to initialize network driver"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgid "PIT mode:"
msgstr "PIT mode:"
msgid "Auto"
msgstr "Auto"
msgid "Slow"
msgstr "Slow"
msgid "Fast"
msgstr "Fast"

View File

@@ -932,28 +932,28 @@ msgid "Cartridge images"
msgstr "Imágenes de Cartucho"
msgid "Error initializing renderer"
msgstr "Error initializing renderer"
msgstr "Error al inicializar el renderizador"
msgid "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
msgstr "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
msgstr "No se ha podido inicializar el renderizador OpenGL (3.0 Core). Utilice otro renderizador."
msgid "Resume execution"
msgstr "Resume execution"
msgstr "Retomar la ejecución"
msgid "Pause execution"
msgstr "Pause execution"
msgstr "Pausar la ejecución"
msgid "Press Ctrl+Alt+Del"
msgstr "Press Ctrl+Alt+Del"
msgstr "Pulsar Ctrl+Alt+Supr"
msgid "Press Ctrl+Alt+Esc"
msgstr "Press Ctrl+Alt+Esc"
msgstr "Pulsar Ctrl+Alt+Esc"
msgid "Hard reset"
msgstr "Hard reset"
msgid "ACPI shutdown"
msgstr "ACPI shutdown"
msgstr "Parada ACPI"
msgid "Hard disk (%s)"
msgstr "Disco duro (%s)"
@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Por defecto del sistema)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Error al inicializar el controlador de red"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "La configuración de red se cambiará al controlador nulo"
msgid "PIT mode:"
msgstr "Modalidad PIT:"
msgid "Auto"
msgstr "Automática"
msgid "Slow"
msgstr "Lenta"
msgid "Fast"
msgstr "Rápida"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Järjestelmän oletus)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Verkkoajurin alustaminen epäonnistui"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Verkkokokoonpano vaihtuu nolla-ajuriin"
msgid "PIT mode:"
msgstr "PIT-tila:"
msgid "Auto"
msgstr "Automaattinen"
msgid "Slow"
msgstr "Hidas"
msgid "Fast"
msgstr "Nopea"

View File

@@ -932,28 +932,28 @@ msgid "Cartridge images"
msgstr "Images cartouche"
msgid "Error initializing renderer"
msgstr "Error initializing renderer"
msgstr "Erreur d'initialisation du moteur de rendu"
msgid "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
msgstr "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
msgstr "Le moteur de rendu OpenGL (3.0 Core) n'a pas pu être initialisé. Utilisez un autre moteur de rendu."
msgid "Resume execution"
msgstr "Resume execution"
msgstr "Reprendre l'exécution"
msgid "Pause execution"
msgstr "Pause execution"
msgstr "Pause de l'exécution"
msgid "Press Ctrl+Alt+Del"
msgstr "Press Ctrl+Alt+Del"
msgstr "Appuyer sur Ctrl+Alt+Suppr."
msgid "Press Ctrl+Alt+Esc"
msgstr "Press Ctrl+Alt+Esc"
msgstr "Appuyer sur Ctrl+Alt+Esc"
msgid "Hard reset"
msgstr "Hard reset"
msgid "ACPI shutdown"
msgstr "ACPI shutdown"
msgstr "Arrêt ACPI"
msgid "Hard disk (%s)"
msgstr "Disque dur (%s)"
@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Défaut du système)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Échec de l'initialisation du pilote réseau"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "La configuration du réseau passera au pilote nul"
msgid "PIT mode:"
msgstr "Mode PIT:"
msgid "Auto"
msgstr "Auto"
msgid "Slow"
msgstr "Lent"
msgid "Fast"
msgstr "Rapide"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Zadana postavka operativnog sustava)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Neuspješno pokretanje mrežnog upravljačkog programa"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Konfiguracija mreže bit će prebačena na nulti upravljački program"
msgid "PIT mode:"
msgstr "PIT način:"
msgid "Auto"
msgstr "Auto"
msgid "Slow"
msgstr "Spori"
msgid "Fast"
msgstr "Brzi"

View File

@@ -938,22 +938,22 @@ msgid "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer
msgstr "Az OpenGL (3.0 Core) megjelenítő-motort nem sikerült inicializálni. Kérem használjon másik renderelőt."
msgid "Resume execution"
msgstr "Resume execution"
msgstr "Folytassa a végrehajtást"
msgid "Pause execution"
msgstr "Pause execution"
msgstr "Kivitelezés szüneteltetése"
msgid "Press Ctrl+Alt+Del"
msgstr "Press Ctrl+Alt+Del"
msgstr "Nyomja meg a Ctrl+Alt+Del"
msgid "Press Ctrl+Alt+Esc"
msgstr "Press Ctrl+Alt+Esc"
msgstr "Nyomja meg a Ctrl+Alt+Esc"
msgid "Hard reset"
msgstr "Hard reset"
msgstr "Hardveres újraindítás"
msgid "ACPI shutdown"
msgstr "ACPI shutdown"
msgstr "ACPI leállítás"
msgid "Hard disk (%s)"
msgstr "Merevlemez (%s)"
@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(A rendszer nyelve)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Nem sikerült inicializálni a hálózati illesztőprogramot"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "A hálózati konfiguráció átvált a null illesztőprogramra"
msgid "PIT mode:"
msgstr "PIT üzemmód:"
msgid "Auto"
msgstr "Automatikus"
msgid "Slow"
msgstr "Lassú"
msgid "Fast"
msgstr "Gyors"

View File

@@ -866,7 +866,7 @@ msgid "libpcap"
msgstr "libpcap"
msgid "Make sure libpcap is installed and that you are on a libpcap-compatible network connection."
msgstr "Controlla se libpcap è installato e che tu sia connesso ad una connessione libpcap compatibile."
msgstr "Controllare se libpcap è installato e che tu sia connesso ad una connessione libpcap compatibile."
msgid "Invalid configuration"
msgstr "Configurazione invalida"
@@ -932,28 +932,28 @@ msgid "Cartridge images"
msgstr "Immagini cartuccia"
msgid "Error initializing renderer"
msgstr "Error initializing renderer"
msgstr "Errore nell'inizializzazione del renderer"
msgid "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
msgstr "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
msgstr "Non è stato possibile inizializzare il renderer OpenGL (3.0 Core). Utilizzare un altro renderer."
msgid "Resume execution"
msgstr "Resume execution"
msgstr "Riprendere l'esecuzione"
msgid "Pause execution"
msgstr "Pause execution"
msgstr "Sospendere l'esecuzione"
msgid "Press Ctrl+Alt+Del"
msgstr "Press Ctrl+Alt+Del"
msgstr "Premere Ctrl+Alt+Canc"
msgid "Press Ctrl+Alt+Esc"
msgstr "Press Ctrl+Alt+Esc"
msgstr "Premere Ctrl+Alt+Esc"
msgid "Hard reset"
msgstr "Hard reset"
msgstr "Riavvia"
msgid "ACPI shutdown"
msgstr "ACPI shutdown"
msgstr "Arresto ACPI"
msgid "Hard disk (%s)"
msgstr "Hard disk (%s)"
@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Predefinito del sistema)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Impossibile inizializzare il driver di rete"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "La configurazione di rete verrà commutata sul driver nullo"
msgid "PIT mode:"
msgstr "Modalità PIT:"
msgid "Auto"
msgstr "Automatica"
msgid "Slow"
msgstr "Lenta"
msgid "Fast"
msgstr "Veloce"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(システム既定値)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "ネットワークドライバの初期化に失敗しました"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "ネットワーク設定がヌル・ドライバに切り替わる"
msgid "PIT mode:"
msgstr "PITモード:"
msgid "Auto"
msgstr "オート"
msgid "Slow"
msgstr "遅い"
msgid "Fast"
msgstr "速い"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(시스템 기본값)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "네트워크 드라이버를 초기화하지 못했습니다"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "네트워크 구성이 널 드라이버로 전환됩니다"
msgid "PIT mode:"
msgstr "PIT 모드:"
msgid "Auto"
msgstr "자동"
msgid "Slow"
msgstr "느린"
msgid "Fast"
msgstr "빠른"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Domyślne ustawienie systemowe)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Nie udało się zainicjować sterownika sieciowego"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Konfiguracja sieci zostanie przełączona na sterownik null"
msgid "PIT mode:"
msgstr "Tryb PIT:"
msgid "Auto"
msgstr "Automatyczny"
msgid "Slow"
msgstr "Powolny"
msgid "Fast"
msgstr "Szybki"

View File

@@ -1201,3 +1201,15 @@ msgstr "Falha ao inicializar o driver de rede"
msgid "The network configuration will be switched to the null driver"
msgstr "A configuração de rede será alterada para o driver nulo"
msgid "PIT mode:"
msgstr "Modo PIT:"
msgid "Auto"
msgstr "Automático"
msgid "Slow"
msgstr "Lento"
msgid "Fast"
msgstr "Rápido"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Padrão do sistema)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Falha ao inicializar o driver de rede"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "A configuração da rede será alterada para o controlador nulo"
msgid "PIT mode:"
msgstr "Modo PIT:"
msgid "Auto"
msgstr "Automático"
msgid "Slow"
msgstr "Lento"
msgid "Fast"
msgstr "Rápido"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Системный)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Не удалось инициализировать сетевой драйвер"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Сетевая конфигурация будет переключена на нулевой драйвер"
msgid "PIT mode:"
msgstr "Режим PIT:"
msgid "Auto"
msgstr "Авто"
msgid "Slow"
msgstr "Медленный"
msgid "Fast"
msgstr "Быстрый"

View File

@@ -944,10 +944,10 @@ msgid "Pause execution"
msgstr "Prekini izvajanje"
msgid "Press Ctrl+Alt+Del"
msgstr "Press Ctrl+Alt+Del"
msgstr "Pritisni Ctrl+Alt+Del"
msgid "Press Ctrl+Alt+Esc"
msgstr "Press Ctrl+Alt+Esc"
msgstr "Pritisni Ctrl+Alt+Esc"
msgid "Hard reset"
msgstr "Ponovni zagon"
@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Sistemsko privzeto)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Ni uspelo inicializirati omrežnega gonilnika"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Omrežne nastavitve bodo preklopljene na ničelni gonilnik"
msgid "PIT mode:"
msgstr "Način PIT:"
msgid "Auto"
msgstr "Samodejni"
msgid "Slow"
msgstr "Počasni"
msgid "Fast"
msgstr "Hitri"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Sistem Varsayılanı)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Ağ sürücüsü başlatılamadı"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Ağ yapılandırması null sürücüye geçirilecektir"
msgid "PIT mode:"
msgstr "PIT modu:"
msgid "Auto"
msgstr "Otomatik"
msgid "Slow"
msgstr "Yavaş"
msgid "Fast"
msgstr "Hızlı"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Системний)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Не вдалося ініціалізувати мережевий драйвер"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Конфігурацію мережі буде змінено на нульовий драйвер"
msgid "PIT mode:"
msgstr "Режим PIT:"
msgid "Auto"
msgstr "Авто"
msgid "Slow"
msgstr "Повільний"
msgid "Fast"
msgstr "Швидкий"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(系统默认)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "网络驱动程序初始化失败"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "网络配置将切换为空驱动程序"
msgid "PIT mode:"
msgstr "PIT 模式:"
msgid "Auto"
msgstr "汽车"
msgid "Slow"
msgstr "慢"
msgid "Fast"
msgstr "快速"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(系統預設)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "初始化網絡驅動程序失敗"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "網絡配置將切換為空驅動程序"
msgid "PIT mode:"
msgstr "點模式:"
msgid "Auto"
msgstr "汽車"
msgid "Slow"
msgstr "慢的"
msgid "Fast"
msgstr "快速地"

View File

@@ -10,8 +10,7 @@
*
*
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Authors: Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
*
* Copyright 2016-2018 Miran Grca.

View File

@@ -321,16 +321,16 @@ HarddiskDialog::onCreateNewFile()
ui->progressBar->setEnabled(true);
setResult(QDialog::Rejected);
quint64 size = ui->lineEditSize->text().toULongLong() << 20U;
uint32_t sector_size = 512;
quint64 size = (static_cast<uint64_t>(cylinders_) * static_cast<uint64_t>(heads_) * static_cast<uint64_t>(sectors_) * static_cast<uint64_t>(sector_size));
if (size > 0x1FFFFFFE00LL) {
QMessageBox::critical(this, tr("Disk image too large"), tr("Disk images cannot be larger than 127 GB."));
return;
}
int img_format = ui->comboBoxFormat->currentIndex();
uint32_t zero = 0;
uint32_t base = 0x1000;
uint32_t sector_size = 512;
int img_format = ui->comboBoxFormat->currentIndex();
uint32_t zero = 0;
uint32_t base = 0x1000;
auto fileName = ui->fileField->fileName();
QString expectedSuffix;

View File

@@ -72,12 +72,13 @@
<addaction name="actionRight_CTRL_is_left_ALT"/>
<addaction name="menuTablet_tool"/>
<addaction name="separator"/>
<addaction name="actionHard_Reset"/>
<addaction name="actionCtrl_Alt_Del"/>
<addaction name="separator"/>
<addaction name="actionPause"/>
<addaction name="actionCtrl_Alt_Esc"/>
<addaction name="separator"/>
<addaction name="actionPause"/>
<addaction name="actionACPI_Shutdown"/>
<addaction name="separator"/>
<addaction name="actionHard_Reset"/>
<addaction name="actionCtrl_Alt_Del"/>
<addaction name="separator"/>
<addaction name="actionExit"/>
</widget>
@@ -254,11 +255,12 @@
<bool>false</bool>
</attribute>
<addaction name="actionPause"/>
<addaction name="actionHard_Reset"/>
<addaction name="actionCtrl_Alt_Esc"/>
<addaction name="separator"/>
<addaction name="actionACPI_Shutdown"/>
<addaction name="separator"/>
<addaction name="actionHard_Reset"/>
<addaction name="actionCtrl_Alt_Del"/>
<addaction name="actionCtrl_Alt_Esc"/>
<addaction name="separator"/>
<addaction name="actionSettings"/>
</widget>
@@ -760,6 +762,9 @@
<property name="visible">
<bool>true</bool>
</property>
<property name="iconVisibleInMenu">
<bool>false</bool>
</property>
</action>
<action name="actionBegin_trace">
<property name="text">

View File

@@ -57,9 +57,6 @@ extern "C" {
struct mouseinputdata {
atomic_bool mouse_tablet_in_proximity;
std::atomic<double> x_abs;
std::atomic<double> y_abs;
char *mouse_type;
};
static mouseinputdata mousedata;
@@ -143,32 +140,6 @@ qt_mouse_capture(int on)
return;
}
void
RendererStack::mousePoll()
{
if (m_monitor_index >= 1) {
if (mouse_mode >= 1) {
mouse_x_abs = mousedata.x_abs;
mouse_y_abs = mousedata.y_abs;
if (!mouse_tablet_in_proximity)
mouse_tablet_in_proximity = mousedata.mouse_tablet_in_proximity;
}
return;
}
#ifdef Q_OS_WINDOWS
if (mouse_mode == 0) {
mouse_x_abs = mousedata.x_abs;
mouse_y_abs = mousedata.y_abs;
return;
}
#endif
mouse_x_abs = mousedata.x_abs;
mouse_y_abs = mousedata.y_abs;
mouse_tablet_in_proximity = mousedata.mouse_tablet_in_proximity;
}
int ignoreNextMouseEvent = 1;
void
RendererStack::mouseReleaseEvent(QMouseEvent *event)
@@ -269,7 +240,6 @@ RendererStack::mouseMoveEvent(QMouseEvent *event)
#endif
}
void
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
RendererStack::enterEvent(QEnterEvent *event)
@@ -556,11 +526,30 @@ RendererStack::event(QEvent* event)
{
if (event->type() == QEvent::MouseMove) {
QMouseEvent* mouse_event = (QMouseEvent*)event;
if (mouse_mode >= 1) {
mousedata.x_abs = (mouse_event->localPos().x()) / (long double)width();
mousedata.y_abs = (mouse_event->localPos().y()) / (long double)height();
if (m_monitor_index >= 1) {
if (mouse_mode >= 1) {
mouse_x_abs = (mouse_event->localPos().x()) / (long double)width();
mouse_y_abs = (mouse_event->localPos().y()) / (long double)height();
if (!mouse_tablet_in_proximity)
mouse_tablet_in_proximity = mousedata.mouse_tablet_in_proximity;
}
return QStackedWidget::event(event);
}
#ifdef Q_OS_WINDOWS
if (mouse_mode == 0) {
mouse_x_abs = (mouse_event->localPos().x()) / (long double)width();
mouse_y_abs = (mouse_event->localPos().y()) / (long double)height();
return QStackedWidget::event(event);
}
#endif
mouse_x_abs = (mouse_event->localPos().x()) / (long double)width();
mouse_y_abs = (mouse_event->localPos().y()) / (long double)height();
mouse_tablet_in_proximity = mousedata.mouse_tablet_in_proximity;
}
return QStackedWidget::event(event);
}

View File

@@ -88,7 +88,6 @@ public slots:
void blitCommon(int x, int y, int w, int h);
void blitRenderer(int x, int y, int w, int h);
void blitDummy(int x, int y, int w, int h);
void mousePoll();
private:
void createRenderer(Renderer renderer);

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