Merge branch 'master' of https://github.com/86Box/86Box.git into EngiNerd

This commit is contained in:
EngiNerd89
2020-12-19 21:31:33 +01:00
71 changed files with 1698 additions and 1196 deletions

View File

@@ -95,9 +95,7 @@ extern const device_t sis_85c461_device;
extern const device_t sis_85c471_device;
extern const device_t sis_85c496_device;
extern const device_t sis_85c496_ls486e_device;
#if defined(DEV_BRANCH) && defined(USE_SIS_85C50X)
extern const device_t sis_85c50x_device;
#endif
/* ST */
#if defined(DEV_BRANCH) && defined(USE_STPC)

View File

@@ -21,8 +21,8 @@
enum {
ICS9xxx_xx,
ICS9150_08,
#if 0
ICS9248_39,
#if 0
ICS9248_81,
ICS9248_95,
ICS9248_98,

View File

@@ -25,28 +25,33 @@
typedef struct {
uint16_t fans[4];
uint8_t temperatures[4];
uint16_t voltages[10];
uint16_t voltages[13];
} hwm_values_t;
typedef struct {
uint32_t local;
uint32_t local;
hwm_values_t *values;
void *as99127f;
uint8_t regs[8];
uint8_t addr_register;
uint8_t temp_idx;
uint8_t i2c_addr, i2c_state;
uint8_t as99127f_i2c_addr;
uint8_t regs[8];
uint8_t addr_register;
uint8_t i2c_addr: 7, i2c_state: 2;
} lm75_t;
/* hwm.c */
extern uint16_t hwm_get_vcore();
/* hwm_lm75.c */
extern void lm75_remap(lm75_t *dev, uint8_t addr);
extern uint8_t lm75_read(lm75_t *dev, uint8_t reg);
extern uint8_t lm75_write(lm75_t *dev, uint8_t reg, uint8_t val);
/* hwm_lm78.c */
extern uint8_t lm78_as99127f_read(void *priv, uint8_t reg);
extern uint8_t lm78_as99127f_write(void *priv, uint8_t reg, uint8_t val);
/* hwm_vt82c686.c */
extern void vt82c686_hwm_write(uint8_t addr, uint8_t val, void *priv);

View File

@@ -103,6 +103,7 @@ extern void keyboard_set_states(uint8_t cl, uint8_t nl, uint8_t sl);
extern int keyboard_recv(uint16_t key);
extern int keyboard_isfsexit(void);
extern int keyboard_ismsexit(void);
extern void keyboard_set_is_amstrad(int ams);
extern void keyboard_at_adddata_keyboard_raw(uint8_t val);
extern void keyboard_at_adddata_mouse(uint8_t val);

View File

@@ -85,6 +85,7 @@
#define IS_ARCH(m, a) (machines[m].flags & (a)) ? 1 : 0;
#define IS_AT(m) ((machines[m].flags & 0x00000FC8) && !(machines[m].flags & MACHINE_PC98)) ? 1 : 0;
#define CPU_BLOCK(...) (const uint8_t[]) {__VA_ARGS__, 0}
#define MACHINE_MULTIPLIER_FIXED -1, -1
@@ -145,7 +146,7 @@ typedef struct _machine_ {
const char *internal_name;
const char type;
uint32_t cpu_package;
uint64_t cpu_block;
const uint8_t *cpu_block;
uint32_t cpu_min_bus;
uint32_t cpu_max_bus;
uint16_t cpu_min_voltage;
@@ -301,6 +302,7 @@ extern int machine_at_403tg_init(const machine_t *);
extern int machine_at_pc330_6571_init(const machine_t *);
extern int machine_at_sis401_init(const machine_t *);
extern int machine_at_av4_init(const machine_t *);
extern int machine_at_valuepoint433_init(const machine_t *);
extern int machine_at_vli486sv2g_init(const machine_t *);
@@ -354,10 +356,8 @@ extern int machine_at_excalibur_init(const machine_t *);
extern int machine_at_batman_init(const machine_t *);
extern int machine_at_ambradp60_init(const machine_t *);
#if defined(DEV_BRANCH) && defined(USE_DELLS4)
extern int machine_at_dellxp60_init(const machine_t *);
extern int machine_at_opti560l_init(const machine_t *);
#endif
extern int machine_at_valuepointp60_init(const machine_t *);
extern int machine_at_p5mp3_init(const machine_t *);
extern int machine_at_pb520r_init(const machine_t *);
@@ -376,6 +376,10 @@ extern int machine_at_vectra54_init(const machine_t *);
extern int machine_at_powermate_v_init(const machine_t *);
extern int machine_at_acerv30_init(const machine_t *);
extern int machine_at_p5sp4_init(const machine_t *);
extern int machine_at_p54sp4_init(const machine_t *);
extern int machine_at_sq588_init(const machine_t *);
#ifdef EMU_DEVICE_H
extern const device_t *at_endeavor_get_device(void);
#define at_vectra54_get_device at_endeavor_get_device
@@ -469,6 +473,7 @@ extern int machine_at_p6sba_init(const machine_t *);
extern int machine_at_ergox365_init(const machine_t *);
#endif
extern int machine_at_ficka6130_init(const machine_t *);
extern int machine_at_p3v133_init(const machine_t *);
extern int machine_at_p3v4x_init(const machine_t *);
#ifdef EMU_DEVICE_H

View File

@@ -23,6 +23,7 @@ extern const device_t f82c710_device;
extern const device_t fdc37c661_device;
extern const device_t fdc37c663_device;
extern const device_t fdc37c665_device;
extern const device_t fdc37c665_ide_device;
extern const device_t fdc37c666_device;
extern const device_t fdc37c669_device;
extern const device_t fdc37c669_370_device;

View File

@@ -22,6 +22,7 @@
#define FLAG_ADDR_BY8 2
#define FLAG_EXT_WRITE 4
#define FLAG_LATCH8 8
#define FLAG_NOSKEW 16
typedef struct {

View File

@@ -9,13 +9,17 @@
#include <sys/mman.h>
#include <unistd.h>
#endif
#if WIN64
#if _WIN64
#define BITMAP windows_BITMAP
#include <windows.h>
#undef BITMAP
#endif
#ifdef _MSC_VER
#include <intrin.h>
#else
#include <xmmintrin.h>
#endif
#define BLOCK_NUM 8
#define BLOCK_MASK (BLOCK_NUM-1)
@@ -752,7 +756,7 @@ static inline void voodoo_generate(uint8_t *code_block, voodoo_t *voodoo, voodoo
addbyte(0x6f);
addbyte(0x07 | (3 << 3));
#if WIN64
#if _WIN64
addbyte(0x48); /*MOV RDI, RCX (voodoo_state)*/
addbyte(0x89);
addbyte(0xcf);
@@ -3428,7 +3432,7 @@ void voodoo_codegen_init(voodoo_t *voodoo)
{
int c;
#if WIN64
#if _WIN64
voodoo->codegen_data = VirtualAlloc(NULL, sizeof(voodoo_x86_data_t) * BLOCK_NUM * 4, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
#else
voodoo->codegen_data = mmap(0, sizeof(voodoo_x86_data_t) * BLOCK_NUM*4, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_ANON|MAP_PRIVATE, 0, 0);
@@ -3458,7 +3462,7 @@ void voodoo_codegen_init(voodoo_t *voodoo)
void voodoo_codegen_close(voodoo_t *voodoo)
{
#if WIN64
#if _WIN64
VirtualFree(voodoo->codegen_data, 0, MEM_RELEASE);
#else
munmap(voodoo->codegen_data, sizeof(voodoo_x86_data_t) * BLOCK_NUM*4);

View File

@@ -15,7 +15,11 @@
#undef BITMAP
#endif
#ifdef _MSC_VER
#include <intrin.h>
#else
#include <xmmintrin.h>
#endif
#define BLOCK_NUM 8
#define BLOCK_MASK (BLOCK_NUM-1)

View File

@@ -1,4 +1,4 @@
#if !(defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined WIN32 || defined _WIN32 || defined _WIN32) && !(defined __amd64__)
#if !(defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _M_IX86 || defined __amd64__ || defined _M_X64)
#define NO_CODEGEN
#endif

View File

@@ -16,6 +16,17 @@
#include "libslirp-version.h"
/* Windows does not define ssize_t, so we need to define it here. */
#ifndef _SSIZE_T_DEFINED
# define _SSIZE_T_DEFINED
# undef ssize_t
# ifdef _WIN64
# define ssize_t int64_t
# else
# define ssize_t int32_t
# endif
#endif
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -58,16 +58,17 @@
#define G_SPAWN_SEARCH_PATH 0
#if defined(__LP64__) || defined(__LLP64__)
#if defined(__LP64__) || defined(__LLP64__) || defined(_WIN64)
# define GLIB_SIZEOF_VOID_P 8
#else
# define GLIB_SIZEOF_VOID_P 4
#endif
#ifdef __LP64__
# define GLIB_SIZEOF_LONG 8
# if defined(__LLP64__) || defined(_WIN64)
# define GLIB_SIZEOF_LONG 4
# else
# define GLIB_SIZEOF_LONG 8
# endif
# define GLIB_SIZEOF_SIZE_T 8
# define GLIB_SIZEOF_SSIZE_T 8
#else
# define GLIB_SIZEOF_VOID_P 4
# define GLIB_SIZEOF_LONG 4
# define GLIB_SIZEOF_SIZE_T 4
# define GLIB_SIZEOF_SSIZE_T 4
@@ -76,6 +77,17 @@
/* Types */
/* Windows does not define ssize_t, so we need to define it here. */
#ifndef _SSIZE_T_DEFINED
# define _SSIZE_T_DEFINED
# undef ssize_t
# ifdef _WIN64
# define ssize_t int64_t
# else
# define ssize_t int32_t
# endif
#endif
#define gboolean int
#define gchar char
#define gint int