Merge branch 'master' of ssh://github.com/86Box/86Box into feature/mtrr

# Conflicts:
#	src/include/86box/machine.h
#	src/machine/machine_table.c
#	src/mem/mem.c
This commit is contained in:
RichardG867
2020-06-19 13:41:26 -03:00
398 changed files with 9515 additions and 13938 deletions

View File

@@ -42,6 +42,10 @@
#endif
#define COPYRIGHT_YEAR "2020"
/* Web URL info. */
#define EMU_SITE L"86box.github.io"
#define EMU_ROMS_URL L"https://github.com/86Box/roms/releases/latest"
/* Filename and pathname info. */
#define CONFIG_FILE L"86box.cfg"
#define NVR_PATH L"nvr"
@@ -116,7 +120,7 @@ extern uint32_t mem_size; /* (C) memory size */
extern int cpu_manufacturer, /* (C) cpu manufacturer */
cpu, /* (C) cpu type */
cpu_use_dynarec, /* (C) cpu uses/needs Dyna */
enable_external_fpu; /* (C) enable external FPU */
fpu_type; /* (C) fpu type */
extern int time_sync; /* (C) enable time sync */
extern int network_type; /* (C) net provider type */
extern int network_card; /* (C) net interface num */

View File

@@ -32,21 +32,35 @@ extern const device_t headland_device;
extern const device_t headland_386_device;
/* Intel 4x0xX */
extern const device_t i420ex_device;
extern const device_t i420tx_device;
extern const device_t i420zx_device;
extern const device_t i430lx_device;
extern const device_t i430nx_device;
extern const device_t i430fx_device;
extern const device_t i430fx_pb640_device;
extern const device_t i430fx_rev02_device;
extern const device_t i430hx_device;
extern const device_t i430vx_device;
extern const device_t i430tx_device;
extern const device_t i440fx_device;
extern const device_t i440lx_device;
extern const device_t i440ex_device;
extern const device_t i440lx_device;
extern const device_t i440ex_device;
extern const device_t i440bx_device;
extern const device_t i440gx_device;
extern const device_t i440zx_device;
extern const device_t sio_device;
extern const device_t sio_zb_device;
extern const device_t piix_device;
extern const device_t piix_rev02_device;
extern const device_t piix3_device;
extern const device_t piix4_device;
extern const device_t piix4e_device;
extern const device_t slc90e66_device;
extern const device_t ioapic_device;
/* OPTi */
extern const device_t opti495_device;
extern const device_t opti5x7_device;
@@ -68,9 +82,12 @@ extern const device_t sis_85c50x_device;
/* VIA */
extern const device_t via_vpx_device;
extern const device_t via_vp3_device;
extern const device_t via_mvp3_device;
extern const device_t via_apro_device;
extern const device_t via_vp3_device;
extern const device_t via_mvp3_device;
extern const device_t via_apro_device;
extern const device_t via_vt82c586b_device;
extern const device_t via_vt82c596b_device;
/* VLSI */
extern const device_t vlsi_scamp_device;

View File

@@ -117,7 +117,8 @@ typedef struct {
parallel_enabled[3]; /* LPT1, LPT2, LPT3 enabled */
/* Other peripherals category */
int hdc, /* Hard disk controller */
int fdc_type, /* Floppy disk controller type */
hdc, /* Hard disk controller */
scsi_card, /* SCSI controller */
ide_ter_enabled, /* Tertiary IDE controller enabled */
ide_qua_enabled, /* Quaternary IDE controller enabled */

View File

@@ -46,19 +46,21 @@
typedef struct {
uint32_t ab, ac;
uint16_t cb;
int cc;
int wp;
uint8_t m, mode;
uint8_t page;
uint8_t stat, stat_rq;
uint8_t command;
int size;
uint8_t ps2_mode;
uint8_t arb_level;
uint16_t io_addr;
uint8_t m, mode, page, stat,
stat_rq, command,
ps2_mode, arb_level,
sg_command, sg_status,
ptr0, enabled,
ext_mode, page_l,
page_h, pad;
uint16_t cb, io_addr,
base, transfer_mode;
uint32_t ptr, ptr_cur,
addr,
ab, ac;
int cc, wp,
size, count,
eot;
} dma_t;
@@ -93,5 +95,13 @@ extern void dma_alias_remove_piix(void);
extern void dma_bm_read(uint32_t PhysAddress, uint8_t *DataRead, uint32_t TotalSize, int TransferSize);
extern void dma_bm_write(uint32_t PhysAddress, const uint8_t *DataWrite, uint32_t TotalSize, int TransferSize);
void dma_set_params(uint8_t advanced, uint32_t mask);
void dma_ext_mode_init(void);
void dma_high_page_init(void);
void dma_remove_sg(void);
void dma_set_sg_base(uint8_t sg_base);
#endif /*EMU_DMA_H*/

View File

@@ -22,6 +22,7 @@
#ifndef EMU_FDC_H
# define EMU_FDC_H
extern int fdc_type;
#define FDC_FLAG_PCJR 0x01 /* PCjr */
#define FDC_FLAG_DISKCHG_ACTLOW 0x02 /* Amstrad, PS/1, PS/2 ISA */
@@ -33,6 +34,7 @@
#define FDC_FLAG_NSC 0x80 /* PC87306, PC87309 */
#define FDC_FLAG_TOSHIBA 0x100 /* T1000, T1200 */
#define FDC_FLAG_AMSTRAD 0x200 /* Non-AT Amstrad machines */
#define FDC_FLAG_NSDP 0x400 /* DP8473N, DP8473V */
typedef struct {
@@ -178,7 +180,7 @@ extern const device_t fdc_at_ps1_device;
extern const device_t fdc_at_smc_device;
extern const device_t fdc_at_winbond_device;
extern const device_t fdc_at_nsc_device;
extern const device_t fdc_dp8473_device;
#endif
#endif /*EMU_FDC_H*/

View File

@@ -0,0 +1,42 @@
/*
* 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 NEC uPD-765 and compatible floppy disk
* controller.
*
*
*
* Authors: Sarah Walker, <tommowalker@tommowalker.co.uk>
* Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
*
* Copyright 2008-2020 Sarah Walker.
* Copyright 2016-2020 Miran Grca.
* Copyright 2018-2020 Fred N. van Kempen.
*/
#ifndef EMU_FDC_EXT_H
# define EMU_FDC_EXT_H
extern int fdc_type;
/* Controller types. */
#define FDC_INTERNAL 0
extern const device_t fdc_pii151b_device;
extern const device_t fdc_pii158b_device;
extern void fdc_card_init(void);
extern char *fdc_card_getname(int card);
extern char *fdc_card_get_internal_name(int card);
extern int fdc_card_get_from_internal_name(char *s);
extern const device_t *fdc_card_getdevice(int card);
extern int fdc_card_has_config(int card);
extern int fdc_card_available(int card);
#endif /*EMU_FDC_H*/

View File

@@ -29,7 +29,8 @@ enum
#ifdef SCSI_DEVICE_H
typedef struct ide_s {
uint8_t atastat, error,
uint8_t selected,
atastat, error,
command, fdisk;
int type, board,
irqstat, service,
@@ -49,6 +50,8 @@ typedef struct ide_s {
uint16_t *buffer;
uint8_t *sector_buffer;
pc_timer_t timer;
/* Stuff mostly used by ATAPI */
scsi_common_t *sc;
int interrupt_drq;
@@ -63,6 +66,8 @@ typedef struct ide_s {
void (*command_stop)(scsi_common_t *sc);
void (*bus_master_error)(scsi_common_t *sc);
} ide_t;
extern ide_t *ide_drives[IDE_NUM];
#endif
/* Type:
@@ -133,7 +138,10 @@ extern void ide_sec_disable(void);
extern void ide_board_set_force_ata3(int board, int force_ata3);
extern double ide_atapi_get_period(uint8_t channel);
extern void ide_set_callback(uint8_t channel, double callback);
#ifdef SCSI_DEVICE_H
extern void ide_set_callback(ide_t *ide, double callback);
#endif
extern void ide_set_board_callback(uint8_t board, double callback);
extern void ide_padstr(char *str, const char *src, int len);
extern void ide_padstr8(uint8_t *buf, int buf_size, const char *src);

View File

@@ -1,18 +0,0 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* Emulation of Intel System I/O PCI chip.
*
*
*
* Author: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Copyright 2008-2018 Sarah Walker.
* Copyright 2016-2018 Miran Grca.
*/
extern const device_t sio_device;
extern const device_t sio_zb_device;

View File

@@ -82,6 +82,7 @@ extern const device_t keyboard_ps2_quadtel_device;
extern const device_t keyboard_ps2_pci_device;
extern const device_t keyboard_ps2_ami_pci_device;
extern const device_t keyboard_ps2_intel_ami_pci_device;
extern const device_t keyboard_ps2_acer_pci_device;
#endif
extern void keyboard_init(void);

View File

@@ -22,10 +22,10 @@
/* String IDs. */
#define IDS_STRINGS 2048 // "86Box"
#define IDS_2049 2049 // "86Box Error"
#define IDS_2050 2050 // "86Box Fatal Error"
#define IDS_2051 2051 // "This will hard reset the.."
#define IDS_2052 2052 // "Use CTRL+ALT+PAGE DOWN.."
#define IDS_2049 2049 // "Error"
#define IDS_2050 2050 // "Fatal error"
#define IDS_2051 2051 // "Are you sure you want to save..."
#define IDS_2052 2052 // "Press CTRL+ALT+PAGE DOWN..."
#define IDS_2053 2053 // "Speed"
#define IDS_2054 2054 // "ZIP %i (%03i): %ls"
#define IDS_2055 2055 // "ZIP images (*.IM?)\0*.IM..."
@@ -36,8 +36,8 @@
#define IDS_2060 2060 // "On"
#define IDS_2061 2061 // "Off"
#define IDS_2062 2062 // "All floppy images (*.DSK..."
#define IDS_2063 2063 // "Configured ROM set not avai.."
#define IDS_2064 2064 // "Configured video BIOS not.."
#define IDS_2063 2063 // "Machine ""%S"" is not..."
#define IDS_2064 2064 // "Video card ""%S"" is not..."
#define IDS_2065 2065 // "Machine"
#define IDS_2066 2066 // "Display"
#define IDS_2067 2067 // "Input devices"
@@ -62,7 +62,7 @@
#define IDS_2086 2086 // "MB"
#define IDS_2087 2087 // "Check BPB"
#define IDS_2088 2088 // "KB"
#define IDS_2089 2089 // "Neither DirectDraw nor Dire.."
#define IDS_2089 2089 // "Could not initialize the video..."
#define IDS_2090 2090 // "Default"
#define IDS_2091 2091 // "%i Wait state(s)"
#define IDS_2092 2092 // "Type"
@@ -77,8 +77,8 @@
#define IDS_2101 2101 // "Microsoft SideWinder Pad"
#define IDS_2102 2102 // "Thrustmaster Flight Cont.."
#define IDS_2103 2103 // "None"
#define IDS_2104 2104 // "Unable to load Accelerators"
#define IDS_2105 2105 // "Unable to register Raw Input"
#define IDS_2104 2104 // "Unable to load keyboard..."
#define IDS_2105 2105 // "Unable to register raw input."
#define IDS_2106 2106 // "%u"
#define IDS_2107 2107 // "%u MB (CHS: %i, %i, %i)"
#define IDS_2108 2108 // "Floppy %i (%s): %ls"
@@ -91,6 +91,27 @@
#define IDS_2115 2115 // "MO %i (%03i): %ls"
#define IDS_2116 2116 // "MO images (*.IM?)\0*.IM..."
#define IDS_2117 2117 // "Welcome to 86Box!"
#define IDS_2118 2118 // "Internal controller"
#define IDS_2119 2119 // "Exit"
#define IDS_2120 2120 // "No ROMs found"
#define IDS_2121 2121 // "Save changes\nThis will hard..."
#define IDS_2122 2122 // "Discard changes\nAll changes..."
#define IDS_2123 2123 // "Cancel\nGo back to the..."
#define IDS_2124 2124 // "About " EMU_NAME
#define IDS_2125 2125 // EMU_NAME " v" EMU_VERSION
#define IDS_2126 2126 // "An emulator of old computers..."
#define IDS_2127 2127 // "OK"
#define IDS_2128 2128 // "Hardware not available"
#define IDS_2129 2129 // "Make sure " LIB_NAME_PCAP "..."
#define IDS_2130 2130 // "Invalid configuration"
#define IDS_2131 2131 // LIB_NAME_FREETYPE " is required..."
#define IDS_2132 2132 // LIB_NAME_GS " is required for...
#define IDS_2133 2133 // LIB_NAME_FLUIDSYNTH " is required..."
#define IDS_2134 2134 // "Entering fullscreen mode"
#define IDS_2135 2135 // "Don't show this message again"
#define IDS_2136 2136 // "Don't Exit"
#define IDS_2137 2137 // "Reset"
#define IDS_2138 2138 // "Don't Reset"
#define IDS_4096 4096 // "Hard disk (%s)"
#define IDS_4097 4097 // "%01i:%01i"
@@ -100,16 +121,24 @@
#define IDS_4101 4101 // "Custom (large)..."
#define IDS_4102 4102 // "Add New Hard Disk"
#define IDS_4103 4103 // "Add Existing Hard Disk"
#define IDS_4104 4104 // "Attempting to create a HDI ima.."
#define IDS_4105 4105 // "Attempting to create a spurio.."
#define IDS_4104 4104 // "HDI disk images cannot be..."
#define IDS_4105 4105 // "Disk images cannot be larger..."
#define IDS_4106 4106 // "Hard disk images (*.HDI;*.HD.."
#define IDS_4107 4107 // "Unable to open the file for read"
#define IDS_4108 4108 // "Unable to open the file for write"
#define IDS_4109 4109 // "HDI or HDX image with a sect.."
#define IDS_4110 4110 // "USB is not yet supported"
#define IDS_4111 4111 // "This image exists and will be.."
#define IDS_4112 4112 // "Please enter a valid file name"
#define IDS_4111 4111 // "Disk image file already exists"
#define IDS_4112 4112 // "Please specify a valid file name."
#define IDS_4113 4113 // "Remember to partition and fo.."
#define IDS_4114 4114 // "Make sure the file exists and..."
#define IDS_4115 4115 // "Make sure the file is being..."
#define IDS_4116 4116 // "Disk image too large"
#define IDS_4117 4117 // "Remember to partition and format..."
#define IDS_4118 4118 // "The selected file will be..."
#define IDS_4119 4119 // "Unsupported disk image"
#define IDS_4120 4120 // "Overwrite"
#define IDS_4121 4121 // "Don't Overwrite"
#define IDS_4352 4352 // "MFM/RLL"
#define IDS_4353 4353 // "XT IDE"
@@ -169,7 +198,7 @@
#define IDS_LANG_ENUS IDS_7168
#define STR_NUM_2048 70
#define STR_NUM_2048 71
#define STR_NUM_3072 11
#define STR_NUM_4096 18
#define STR_NUM_4352 7

View File

@@ -40,7 +40,7 @@
#define MACHINE_MOUSE 0x008000 /* sys has int mouse */
#define MACHINE_SOUND 0x010000 /* sys has int sound */
#define MACHINE_NONMI 0x020000 /* sys does not have NMI's */
#define MACHINE_COREBOOT 0x040000 /* sys has coreboot BIOS */
#define MACHINE_FDC 0x040000 /* sys has int FDC */
#else
#define MACHINE_PC 0x000000 /* PC architecture */
#define MACHINE_AT 0x000001 /* PC/AT architecture */
@@ -58,16 +58,44 @@
#define MACHINE_MOUSE 0x008000 /* sys has int mouse */
#define MACHINE_SOUND 0x010000 /* sys has int sound */
#define MACHINE_NONMI 0x020000 /* sys does not have NMI's */
#define MACHINE_COREBOOT 0x040000 /* sys has coreboot BIOS */
#define MACHINE_FDC 0x040000 /* sys has int FDC */
#endif
#define IS_ARCH(m, a) (machines[(m)].flags & (a)) ? 1 : 0;
enum {
MACHINE_TYPE_NONE = 0,
MACHINE_TYPE_8088,
MACHINE_TYPE_8086,
MACHINE_TYPE_286,
MACHINE_TYPE_386SX,
MACHINE_TYPE_386DX,
MACHINE_TYPE_486,
MACHINE_TYPE_SOCKET4,
MACHINE_TYPE_SOCKET5,
MACHINE_TYPE_SOCKET7_3V,
MACHINE_TYPE_SOCKET7,
MACHINE_TYPE_SOCKETS7,
MACHINE_TYPE_SOCKET8,
MACHINE_TYPE_SLOT1,
MACHINE_TYPE_SLOT2,
MACHINE_TYPE_SOCKET370,
MACHINE_TYPE_MAX
};
typedef struct _machine_type_ {
const char *name;
const char id;
} machine_type_t;
#ifdef NEW_STRUCT
typedef struct _machine_ {
const char *name;
const char *internal_name;
const char type;
#ifdef EMU_DEVICE_H
const device_t *device;
#else
@@ -90,6 +118,7 @@ typedef struct _machine_ {
typedef struct _machine_ {
const char *name;
const char *internal_name;
const char type;
struct {
const char *name;
#ifdef EMU_CPU_H
@@ -113,10 +142,11 @@ typedef struct _machine_ {
/* Global variables. */
extern const machine_t machines[];
extern int bios_only;
extern int machine;
extern int AT, PCI;
extern const machine_type_t machine_types[];
extern const machine_t machines[];
extern int bios_only;
extern int machine;
extern int AT, PCI;
/* Core functions. */
@@ -222,6 +252,7 @@ extern int machine_at_micronics386_init(const machine_t *);
extern int machine_at_pb410a_init(const machine_t *);
extern int machine_at_acera1g_init(const machine_t *);
extern int machine_at_ali1429_init(const machine_t *);
extern int machine_at_winbios1429_init(const machine_t *);
@@ -229,6 +260,7 @@ extern int machine_at_opti495_init(const machine_t *);
extern int machine_at_opti495_ami_init(const machine_t *);
extern int machine_at_opti495_mr_init(const machine_t *);
extern int machine_at_vli486sv2g_init(const machine_t *);
extern int machine_at_ami471_init(const machine_t *);
extern int machine_at_dtk486_init(const machine_t *);
extern int machine_at_px471_init(const machine_t *);
@@ -240,8 +272,11 @@ extern int machine_at_r418_init(const machine_t *);
extern int machine_at_ls486e_init(const machine_t *);
extern int machine_at_4dps_init(const machine_t *);
extern int machine_at_alfredo_init(const machine_t *);
#if defined(DEV_BRANCH) && defined(NO_SIO)
extern int machine_at_486sp3g_init(const machine_t *);
extern int machine_at_486ap4_init(const machine_t *);
#ifdef EMU_DEVICE_H
extern const device_t *at_acera1g_get_device(void);
#endif
/* m_at_commodore.c */
@@ -272,11 +307,13 @@ extern int machine_at_430nx_init(const machine_t *);
extern int machine_at_p54tp4xe_init(const machine_t *);
extern int machine_at_endeavor_init(const machine_t *);
extern int machine_at_zappa_init(const machine_t *);
extern int machine_at_gw2kzp_init(const machine_t *);
extern int machine_at_mb500n_init(const machine_t *);
#if defined(DEV_BRANCH) && defined(USE_VECTRA54)
extern int machine_at_vectra54_init(const machine_t *);
#endif
extern int machine_at_powermate_v_init(const machine_t *);
extern int machine_at_acerv30_init(const machine_t *);
#ifdef EMU_DEVICE_H
extern const device_t *at_endeavor_get_device(void);
@@ -286,6 +323,7 @@ extern const device_t *at_endeavor_get_device(void);
extern int machine_at_chariot_init(const machine_t *);
extern int machine_at_mr586_init(const machine_t *);
extern int machine_at_thor_init(const machine_t *);
extern int machine_at_gw2katx_init(const machine_t *);
extern int machine_at_mrthor_init(const machine_t *);
extern int machine_at_pb640_init(const machine_t *);
@@ -326,6 +364,10 @@ extern int machine_at_mvp3_init(const machine_t *);
/* m_at_socket8.c */
extern int machine_at_686nx_init(const machine_t *);
extern int machine_at_v60n_init(const machine_t *);
extern int machine_at_vs440fx_init(const machine_t *);
extern int machine_at_gw2kvs_init(const machine_t *);
extern int machine_at_ap440fx_init(const machine_t *);
extern int machine_at_mb600n_init(const machine_t *);
extern int machine_at_8500ttc_init(const machine_t *);
extern int machine_at_m6mi_init(const machine_t *);
@@ -338,27 +380,25 @@ extern int machine_at_p65up5_cp6nd_init(const machine_t *);
extern int machine_at_p65up5_cpknd_init(const machine_t *);
extern int machine_at_kn97_init(const machine_t *);
extern int machine_at_lx6_init(const machine_t *);
extern int machine_at_p6i440e2_init(const machine_t *);
extern int machine_at_p2bls_init(const machine_t *);
extern int machine_at_p3bf_init(const machine_t *);
extern int machine_at_bf6_init(const machine_t *);
extern int machine_at_ax6bc_init(const machine_t *);
extern int machine_at_atc6310bxii_init(const machine_t *);
#if defined(DEV_BRANCH) && defined(NO_SIO)
extern int machine_at_tsunamiatx_init(const machine_t *);
#endif
extern int machine_at_p6sba_init(const machine_t *);
#ifdef EMU_DEVICE_H
#if defined(DEV_BRANCH) && defined(NO_SIO)
extern const device_t *at_tsunamiatx_get_device(void);
#endif
#endif
/* m_at_slot2.c */
#if defined(DEV_BRANCH) && defined(NO_SIO)
extern int machine_at_6gxu_init(const machine_t *);
extern int machine_at_s2dge_init(const machine_t *);
#endif
/* m_at_socket370.c */
extern int machine_at_s370slm_init(const machine_t *);

View File

@@ -27,31 +27,45 @@
#define MEM_MAPPING_ROM 4 /* Executing from ROM may involve
* additional wait states. */
#define MEM_MAPPING_ROMCS 8 /* respond to ROMCS* */
#define MEM_MAPPING_SMRAM 16 /* on internal bus (RAM) but SMRAM */
#define MEM_MAP_TO_SHADOW_RAM_MASK 1
#define MEM_MAP_TO_RAM_ADDR_MASK 2
#define MEM_READ_ANY 0x00
#define MEM_READ_INTERNAL 0x10
#define MEM_READ_EXTERNAL 0x20
#define MEM_READ_DISABLED 0x30
#define MEM_READ_NORMAL 0x40 /* SMM only - means use the non-SMM state */
#define MEM_READ_EXTERNAL_EX 0x50 /* External but with internal exec - needed by the VIA Apollo Pro */
#define MEM_READ_ROMCS 0x60 /* EXTERNAL type + ROMC flag */
#define MEM_READ_EXTANY 0x70 /* Any EXTERNAL type */
#define MEM_READ_MASK 0xf0
/* _mem_state layout:
Bits 0 - 7: Normal write
Bits 8 -15: Normal read
Bits 16 -23: SMM write
Bits 24 -31: SMM read
*/
#define MEM_WRITE_ANY 0x00
#define MEM_WRITE_INTERNAL 0x01
#define MEM_WRITE_EXTERNAL 0x02
#define MEM_WRITE_DISABLED 0x03
#define MEM_WRITE_NORMAL 0x04 /* SMM only - means use the non-SMM state */
#define MEM_WRITE_EXTERNAL_EX 0x05
#define MEM_WRITE_ROMCS 0x06 /* EXTERNAL type + ROMC flag */
#define MEM_WRITE_EXTANY 0x07 /* Any EXTERNAL type */
#define MEM_WRITE_MASK 0x0f
#define MEM_READ_ANY 0x0000
#define MEM_READ_INTERNAL 0x0100
#define MEM_READ_EXTERNAL 0x0200
#define MEM_READ_DISABLED 0x0300
#define MEM_READ_NORMAL 0x0400 /* SMM only - means use the non-SMM state */
#define MEM_READ_EXTERNAL_EX 0x0500 /* External but with internal exec - needed by the VIA Apollo Pro */
#define MEM_READ_ROMCS 0x0600 /* EXTERNAL type + ROMC flag */
#define MEM_READ_EXTANY 0x0700 /* Any EXTERNAL type */
#define MEM_READ_SMRAM 0x1000
#define MEM_READ_SMRAM_EX 0x2000
#define MEM_READ_DISABLED_EX 0x4000
#define MEM_READ_MASK 0xff00
#define MEM_STATE_SMM_SHIFT 8
#define MEM_WRITE_ANY 0x0000
#define MEM_WRITE_INTERNAL 0x0001
#define MEM_WRITE_EXTERNAL 0x0002
#define MEM_WRITE_DISABLED 0x0003
#define MEM_WRITE_NORMAL 0x0004 /* SMM only - means use the non-SMM state */
#define MEM_WRITE_EXTERNAL_EX 0x0005
#define MEM_WRITE_ROMCS 0x0006 /* EXTERNAL type + ROMC flag */
#define MEM_WRITE_EXTANY 0x0007 /* Any EXTERNAL type */
#define MEM_WRITE_SMRAM 0x0010
#define MEM_WRITE_SMRAM_EX 0x0020
#define MEM_WRITE_DISABLED_EX 0x0040
#define MEM_WRITE_MASK 0x00ff
#define MEM_STATE_SMM_SHIFT 16
/* #define's for memory granularity, currently 16k, but may
change in the future - 4k works, less does not because of
@@ -80,6 +94,13 @@
#define MEM_GRANULARITY_PAGE (MEM_GRANULARITY_MASK & ~0xfff)
#endif
#define mem_set_mem_state_common(smm, base, size, state) mem_set_state(!!smm, 0, base, size, state)
#define mem_set_mem_state(base, size, state) mem_set_state(0, 0, base, size, state)
#define mem_set_mem_state_smm(base, size, state) mem_set_state(1, 0, base, size, state)
#define mem_set_mem_state_both(base, size, state) mem_set_state(2, 0, base, size, state)
#define mem_set_mem_state_smram(smm, base, size, is_smram) mem_set_state(!!smm, 1, base, size, is_smram)
#define mem_set_mem_state_smram_ex(smm, base, size, is_smram) mem_set_state(!!smm, 2, base, size, is_smram)
typedef struct _mem_mapping_ {
struct _mem_mapping_ *prev, *next;
@@ -162,7 +183,15 @@ typedef struct _page_ {
#endif
extern uint8_t *ram;
typedef struct
{
uint32_t size,
host_base,
ram_base;
} smram_t;
extern uint8_t *ram, *ram2;
extern uint32_t rammask;
extern uint8_t *rom;
@@ -185,6 +214,8 @@ extern mem_mapping_t base_mapping,
#endif
ram_remapped_mapping,
ram_high_mapping,
ram_2gb_mapping,
ram_smram_mapping[2],
bios_mapping,
bios_high_mapping;
@@ -193,7 +224,8 @@ extern uint32_t mem_logical_addr;
extern page_t *pages,
**page_lookup;
extern uint32_t get_phys_virt,get_phys_phys;
extern uint32_t get_phys_virt, get_phys_phys;
extern smram_t smram[2];
extern int shadowbios,
shadowbios_write;
@@ -276,10 +308,7 @@ extern void mem_mapping_disable(mem_mapping_t *);
extern void mem_mapping_enable(mem_mapping_t *);
extern void mem_mapping_recalc(uint64_t base, uint64_t size);
extern void mem_set_mem_state_common(int smm, uint32_t base, uint32_t size, int state);
extern void mem_set_mem_state(uint32_t base, uint32_t size, int state);
extern void mem_set_mem_state_smm(uint32_t base, uint32_t size, int state);
extern void mem_set_state(int smm, int mode, uint32_t base, uint32_t size, uint32_t state);
extern uint8_t mem_readb_phys(uint32_t addr);
extern uint16_t mem_readw_phys(uint32_t addr);
@@ -297,6 +326,13 @@ extern void mem_write_ram(uint32_t addr, uint8_t val, void *priv);
extern void mem_write_ramw(uint32_t addr, uint16_t val, void *priv);
extern void mem_write_raml(uint32_t addr, uint32_t val, void *priv);
extern uint8_t mem_read_smram(uint32_t addr, void *priv);
extern uint16_t mem_read_smramw(uint32_t addr, void *priv);
extern uint32_t mem_read_smraml(uint32_t addr, void *priv);
extern void mem_write_smram(uint32_t addr, uint8_t val, void *priv);
extern void mem_write_smramw(uint32_t addr, uint16_t val, void *priv);
extern void mem_write_smraml(uint32_t addr, uint32_t val, void *priv);
extern uint8_t mem_read_bios(uint32_t addr, void *priv);
extern uint16_t mem_read_biosw(uint32_t addr, void *priv);
extern uint32_t mem_read_biosl(uint32_t addr, void *priv);

View File

@@ -1,25 +0,0 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* Emulation of the Intel PIIX, PIIX3, PIIX4, PIIX4E, and SMSC
* SLC90E66 (Victory66) Xcelerators.
*
* Emulation core dispatcher.
*
*
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Copyright 2008-2020 Sarah Walker.
* Copyright 2016-2020 Miran Grca.
*/
extern const device_t piix_device;
extern const device_t piix_rev02_device;
extern const device_t piix3_device;
extern const device_t piix4_device;
extern const device_t piix4e_device;
extern const device_t slc90e66_device;

View File

@@ -11,6 +11,7 @@
*
*
* Author: RichardG, <richardg867@gmail.com>
*
* Copyright 2020 RichardG.
*/
#ifndef POSTCARD_H

View File

@@ -50,6 +50,7 @@
#define IDT_1705 1705 /* MB == IDC_TEXT_MB */
#define IDT_1706 1706 /* Memory: */
#define IDT_1707 1707 /* Video: */
#define IDT_1708 1708 /* Machine type: */
#define IDT_1709 1709 /* Mouse: */
#define IDT_1710 1710 /* Joystick: */
#define IDT_1711 1711 /* Sound card: */
@@ -98,6 +99,7 @@
#define IDT_1765 1765 /* Board #3: */
#define IDT_1766 1766 /* Board #4: */
#define IDT_1767 1767 /* ISA RTC: */
#define IDT_1768 1768 /* Ext FD Controller: */
/*
@@ -116,17 +118,18 @@
#define IDC_COMBO_LANG 1009
#endif
#define IDC_COMBO_MACHINE 1010 /* machine/cpu config */
#define IDC_CONFIGURE_MACHINE 1011
#define IDC_COMBO_CPU_TYPE 1012
#define IDC_COMBO_CPU 1013
#define IDC_CHECK_FPU 1014
#define IDC_COMBO_WS 1015
#define IDC_COMBO_MACHINE_TYPE 1010
#define IDC_COMBO_MACHINE 1011 /* machine/cpu config */
#define IDC_CONFIGURE_MACHINE 1012
#define IDC_COMBO_CPU_TYPE 1013
#define IDC_COMBO_CPU 1014
#define IDC_COMBO_FPU 1015
#define IDC_COMBO_WS 1016
#ifdef USE_DYNAREC
#define IDC_CHECK_DYNAREC 1016
#define IDC_CHECK_DYNAREC 1017
#endif
#define IDC_MEMTEXT 1017
#define IDC_MEMSPIN 1018
#define IDC_MEMTEXT 1018
#define IDC_MEMSPIN 1019
#define IDC_TEXT_MB IDT_1705
#define IDC_VIDEO 1030 /* video config */
@@ -178,6 +181,8 @@
#define IDC_CHECK_POSTCARD 1130
#define IDC_COMBO_ISARTC 1131
#define IDC_CONFIGURE_ISARTC 1132
#define IDC_COMBO_FDC 1133
#define IDC_CONFIGURE_FDC 1134
#define IDC_GROUP_ISAMEM 1140
#define IDC_COMBO_ISAMEM_1 1141
#define IDC_COMBO_ISAMEM_2 1142

View File

@@ -379,5 +379,6 @@ extern void scsi_device_command_phase0(scsi_device_t *dev, uint8_t *cdb);
extern void scsi_device_command_phase1(scsi_device_t *dev);
extern void scsi_device_command_stop(scsi_device_t *dev);
extern void scsi_device_close_all(void);
extern void scsi_device_init(void);
#endif /*SCSI_DEVICE_H*/

View File

@@ -26,6 +26,7 @@
extern const device_t ncr53c810_pci_device;
extern const device_t ncr53c810_onboard_pci_device;
extern const device_t ncr53c825a_pci_device;
extern const device_t ncr53c860_pci_device;
extern const device_t ncr53c875_pci_device;

View File

@@ -423,7 +423,7 @@ typedef struct {
PendingInterrupt, Lock,
target_data_len, pad0;
uint32_t Base, rom_addr, /* address of BIOS ROM */
uint32_t Base, fdc_address, rom_addr, /* address of BIOS ROM */
CmdParamLeft, Outgoing,
transfer_size;
@@ -486,6 +486,8 @@ typedef struct {
pc_timer_t timer, ResetCB;
Req_t Req;
fdc_t *fdc;
} x54x_t;

View File

@@ -25,6 +25,10 @@ extern const device_t fdc37c932fr_device;
extern const device_t fdc37c932qf_device;
extern const device_t fdc37c935_device;
extern const device_t pc87306_device;
extern const device_t pc87307_device;
extern const device_t pc87309_device;
extern const device_t pc87332_device;
extern const device_t pc97307_device;
extern const device_t sio_detect_device;
extern const device_t um8669f_device;
extern const device_t w83787f_device;

View File

@@ -36,8 +36,12 @@ extern "C" {
#define MBX_QUESTION_YN 4
#define MBX_FATAL 0x20
#define MBX_ANSI 0x80
#define MBX_LINKS 0x100
#define MBX_DONTASK 0x200
extern int ui_msgbox(int type, void *arg);
extern int ui_msgbox(int flags, void *message);
extern int ui_msgbox_header(int flags, void *header, void *message);
extern int ui_msgbox_ex(int flags, void *header, void *message, void *btn1, void *btn2, void *btn3);
extern void ui_check_menu_item(int id, int checked);

View File

@@ -1,21 +0,0 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* Emulation of the VIA Apollo MVP3 southbridge
*
*
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Melissa Goad, <mszoopers@protonmail.com>
*
* Copyright 2008-2020 Sarah Walker.
* Copyright 2016-2020 Miran Grca.
* Copyright 2020 Melissa Goad.
*/
extern const device_t via_vt82c586b_device;
extern const device_t via_vt82c596b_device;

View File

@@ -224,6 +224,7 @@ extern const device_t gd5426_vlb_device;
extern const device_t gd5428_isa_device;
extern const device_t gd5428_vlb_device;
extern const device_t gd5428_mca_device;
extern const device_t gd5428_a1g_device;
extern const device_t gd5429_isa_device;
extern const device_t gd5429_vlb_device;
extern const device_t gd5430_vlb_device;