Merge branch 'master' into tandy-shake

This commit is contained in:
pixel-jupiter
2025-09-19 15:15:03 +03:00
191 changed files with 5171 additions and 21437 deletions

View File

@@ -202,6 +202,7 @@ extern char vmm_path[1024]; /* VM Manager path to scan */
extern int start_vmm; /* the current execution will start the manager */
extern int portable_mode; /* we are running in portable mode
(global dirs = exe path) */
extern int global_cfg_overridden; /* global config file was overriden on command line */
extern int monitor_edid; /* (C) Which EDID to use. 0=default, 1=custom. */
extern char monitor_edid_path[1024]; /* (C) Path to custom EDID */

View File

@@ -163,7 +163,7 @@ CPU_CONVERT(le, 64, uint64_t)
/* unaligned versions (optimized for frequent unaligned accesses)*/
#if defined(__i386__) || defined(__powerpc__)
#if defined(__powerpc__)
# define cpu_to_le16wu(p, v) cpu_to_le16w(p, v)
# define cpu_to_le32wu(p, v) cpu_to_le32w(p, v)
# define le16_to_cpupu(p) le16_to_cpup(p)

View File

@@ -30,6 +30,7 @@
#define HDC_MAX 4
extern int hdc_current[HDC_MAX];
extern int hdc_onboard_enabled;
extern const device_t st506_xt_xebec_device; /* st506_xt_xebec */
extern const device_t st506_xt_wdxt_gen_device; /* st506_xt_wdxt_gen */

View File

@@ -174,11 +174,7 @@
#define CPU_BLOCK_NONE 0
/* Make sure it's always an invalid value to avoid misdetections. */
#if (defined __amd64__ || defined _M_X64 || defined __aarch64__ || defined _M_ARM64)
# define MACHINE_AVAILABLE 0xffffffffffffffffULL
#else
# define MACHINE_AVAILABLE 0xffffffff
#endif
#define MACHINE_AVAILABLE 0xffffffffffffffffULL
enum {
MACHINE_TYPE_NONE = 0,
@@ -498,6 +494,7 @@ extern int machine_at_cmdpc_init(const machine_t *);
extern int machine_at_portableii_init(const machine_t *);
extern int machine_at_portableiii_init(const machine_t *);
extern int machine_at_grid1520_init(const machine_t *);
extern int machine_at_pc900_init(const machine_t *);
extern int machine_at_mr286_init(const machine_t *);
extern int machine_at_pc8_init(const machine_t *);
extern int machine_at_m290_init(const machine_t *);
@@ -515,19 +512,19 @@ extern int machine_at_dells200_init(const machine_t *);
extern int machine_at_super286c_init(const machine_t *);
extern int machine_at_at122_init(const machine_t *);
extern int machine_at_tuliptc7_init(const machine_t *);
/* Wells American A*Star with custom award BIOS. */
extern int machine_at_wellamerastar_init(const machine_t *);
/* GC103 */
extern int machine_at_quadt286_init(const machine_t *);
extern void machine_at_headland_common_init(const machine_t *model, int type);
extern int machine_at_tg286m_init(const machine_t *);
/* Wells American A*Star with custom award BIOS. */
extern int machine_at_wellamerastar_init(const machine_t *);
/* NEAT */
extern int machine_at_px286_init(const machine_t *);
extern int machine_at_ataripc4_init(const machine_t *);
extern int machine_at_neat_ami_init(const machine_t *);
extern int machine_at_3302_init(const machine_t *);
extern int machine_at_px286_init(const machine_t *);
/* SCAMP */
extern int machine_at_pc7286_init(const machine_t *);
@@ -557,8 +554,8 @@ extern const device_t pbl300sx_device;
extern int machine_at_pbl300sx_init(const machine_t *);
/* ALi M1217 */
extern int machine_at_arb1374_init(const machine_t *);
extern int machine_at_sbc350a_init(const machine_t *);
extern int machine_at_arb1374_init(const machine_t *);
extern int machine_at_flytech386_init(const machine_t *);
#ifdef EMU_DEVICE_H
extern const device_t c325ax_device;
@@ -608,6 +605,10 @@ extern int machine_at_wd76c10_init(const machine_t *);
extern int machine_at_pja511m_init(const machine_t *);
extern int machine_at_prox1332_init(const machine_t *);
/* m_at_486slc.c */
/* OPTi 283 */
extern int machine_at_rycleopardlx_init(const machine_t *);
/* m_at_386dx.c */
/* ISA */
#ifdef EMU_DEVICE_H
@@ -639,10 +640,6 @@ extern int machine_at_opti495_init(const machine_t *);
extern int machine_at_asus3863364k_init(const machine_t *);
extern int machine_at_asus386_init(const machine_t *);
/* m_at_486slc.c */
/* OPTi 283 */
extern int machine_at_rycleopardlx_init(const machine_t *);
/* m_at_386dx_486.c */
/* ALi M1429G */
extern int machine_at_exp4349_init(const machine_t *);
@@ -995,6 +992,9 @@ extern int machine_at_cu430hx_init(const machine_t *);
extern const device_t tc430hx_device;
#endif
extern int machine_at_tc430hx_init(const machine_t *);
#ifdef EMU_DEVICE_H
extern const device_t m7shi_device;
#endif
extern int machine_at_m7shi_init(const machine_t *);
extern int machine_at_epc2102_init(const machine_t *);
extern int machine_at_pcv90_init(const machine_t *);
@@ -1127,12 +1127,18 @@ extern int machine_at_p6i440e2_init(const machine_t *);
/* i440BX */
extern int machine_at_bf6_init(const machine_t *);
#ifdef EMU_DEVICE_H
extern const device_t bx6_device;
#endif
extern int machine_at_bx6_init(const machine_t *);
extern int machine_at_ax6bc_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_686bx_init(const machine_t *);
extern int machine_at_lgibmx7g_init(const machine_t *);
#ifdef EMU_DEVICE_H
extern const device_t ms6119_device;
#endif
extern int machine_at_ms6119_init(const machine_t *);
extern int machine_at_p6sba_init(const machine_t *);
extern int machine_at_s1846_init(const machine_t *);
@@ -1319,7 +1325,11 @@ extern const device_t jukopc_device;
extern int machine_xt_jukopc_init(const machine_t *);
extern int machine_xt_kaypropc_init(const machine_t *);
extern int machine_xt_micoms_xl7turbo_init(const machine_t *);
#ifdef EMU_DEVICE_H
extern const device_t pc500_device;
#endif
extern int machine_xt_pc500_init(const machine_t *);
extern int machine_xt_pc500plus_init(const machine_t *);
extern int machine_xt_pc700_init(const machine_t *);
extern int machine_xt_pc4i_init(const machine_t *);
extern int machine_xt_openxt_init(const machine_t *);

View File

@@ -265,24 +265,17 @@ extern uint32_t biosmask;
extern uint32_t biosaddr;
extern int readlookup[256];
#if (!(defined __amd64__ || defined _M_X64 || defined __aarch64__ || defined _M_ARM64))
extern uintptr_t *readlookup2;
#endif
extern uintptr_t old_rl2;
extern uint8_t uncached;
extern int readlnext;
extern int writelookup[256];
#if (!(defined __amd64__ || defined _M_X64 || defined __aarch64__ || defined _M_ARM64))
extern uintptr_t *writelookup2;
#endif
extern int writelnext;
extern uint32_t ram_mapped_addr[64];
extern uint8_t page_ff[4096];
extern mem_mapping_t ram_low_mapping;
#if 1
extern mem_mapping_t ram_mid_mapping;
#endif
extern mem_mapping_t ram_remapped_mapping;
extern mem_mapping_t ram_high_mapping;
extern mem_mapping_t ram_2gb_mapping;
@@ -292,16 +285,11 @@ extern mem_mapping_t bios_high_mapping;
extern uint32_t mem_logical_addr;
extern page_t *pages;
#if (!(defined __amd64__ || defined _M_X64 || defined __aarch64__ || defined _M_ARM64))
extern page_t **page_lookup;
#endif
#if (defined __amd64__ || defined _M_X64 || defined __aarch64__ || defined _M_ARM64)
/* The lookup tables. */
extern page_t *page_lookup[1048576];
extern uintptr_t readlookup2[1048576];
extern uintptr_t writelookup2[1048576];
#endif
extern uint32_t get_phys_virt;
extern uint32_t get_phys_phys;
@@ -470,9 +458,6 @@ extern void mem_a20_init(void);
extern void mem_a20_recalc(void);
extern void mem_init(void);
#if (!(defined __amd64__ || defined _M_X64 || defined __aarch64__ || defined _M_ARM64))
extern void mem_free(void);
#endif
extern void mem_close(void);
extern void mem_zero(void);
extern void mem_reset(void);

View File

@@ -140,6 +140,7 @@ typedef struct mo_t {
void * log;
uint8_t *buffer;
size_t buffer_sz;
uint8_t atapi_cdb[16];
uint8_t current_cdb[16];
uint8_t sense[256];

View File

@@ -105,6 +105,7 @@ typedef struct netcard_conf_t {
extern netcard_conf_t net_cards_conf[NET_CARD_MAX];
extern uint16_t net_card_current;
extern int slirp_card_num;
typedef int (*NETRXCB)(void *, uint8_t *, int);
typedef int (*NETSETLINKSTATE)(void *, uint32_t link_state);

View File

@@ -1,3 +1,4 @@
extern char *path_get_basename(const char *path);
extern void path_get_dirname(char *dest, const char *path);
extern char *path_get_filename(char *s);
extern char *path_get_extension(char *s);
@@ -5,4 +6,4 @@ extern void path_append_filename(char *dest, const char *s1, const char *s2);
extern void path_slash(char *path);
extern const char *path_get_slash(char *path);
extern void path_normalize(char *path);
extern int path_abs(char *path);
extern int path_abs(char *path);

View File

@@ -117,6 +117,7 @@ typedef struct rdisk_t {
void *log;
uint8_t *buffer;
size_t buffer_sz;
uint8_t atapi_cdb[16];
uint8_t current_cdb[16];
uint8_t sense[256];

View File

@@ -36,6 +36,7 @@ typedef struct scsi_cdrom_t {
void * log;
uint8_t * buffer;
size_t buffer_sz;
uint8_t atapi_cdb[16];
uint8_t current_cdb[16];
uint8_t sense[256];

View File

@@ -388,6 +388,7 @@ typedef struct scsi_common_s {
void * log;
uint8_t * temp_buffer;
size_t temp_buffer_sz;
/*
This is atapi_cdb in ATAPI-supporting devices,
and pad in SCSI-only devices.

View File

@@ -29,6 +29,7 @@ typedef struct scsi_disk_t {
void * log;
uint8_t * temp_buffer;
size_t temp_buffer_sz;
uint8_t atapi_cdb[16];
uint8_t current_cdb[16];
uint8_t sense[256];

View File

@@ -32,6 +32,14 @@ enum {
AD1848_TYPE_CS4235 = 6
};
enum {
AD1848_AUX1 = 2,
AD1848_AUX2 = 4,
AD1848_OUT = 6,
AD1848_LINE_IN = 18,
AD1848_MONO = 26
};
typedef struct ad1848_t {
uint8_t type;
uint8_t index;
@@ -47,6 +55,7 @@ typedef struct ad1848_t {
int16_t out_l;
int16_t out_r;
int8_t cd_vol_reg;
double cd_vol_l;
double cd_vol_r;
int fm_vol_l;
@@ -69,6 +78,8 @@ typedef struct ad1848_t {
pc_timer_t timer_count;
uint64_t timer_latch;
pc_timer_t cs4231a_irq_timer;
int16_t buffer[SOUNDBUFLEN * 2];
int pos;
@@ -86,8 +97,9 @@ extern void ad1848_write(uint16_t addr, uint8_t val, void *priv);
extern void ad1848_update(ad1848_t *ad1848);
extern void ad1848_speed_changed(ad1848_t *ad1848);
extern void ad1848_set_cd_audio_channel(void *priv, int channel);
extern void ad1848_filter_cd_audio(int channel, double *buffer, void *priv);
extern void ad1848_filter_aux2(void* priv, double* out_l, double* out_r);
extern void ad1848_filter_channel(void* priv, int channel, double* out_l, double* out_r);
extern void ad1848_init(ad1848_t *ad1848, uint8_t type);

View File

@@ -199,8 +199,8 @@ typedef struct emu8k_voice_t {
* something, similarly to targets and current, but... of what?
* what is curious is that if they are already zero, they are not written to, so it really
* looks like they are information about the status of the channel. (lfo position maybe?) */
uint32_t unknown_data0_4;
uint32_t unknown_data0_5;
uint32_t z2;
uint32_t z1;
union {
uint32_t psst;
struct {
@@ -229,7 +229,7 @@ typedef struct emu8k_voice_t {
};
#define CCCA_FILTQ_GET(ccca) (ccca >> 28)
#define CCCA_FILTQ_SET(ccca, q) ccca = (ccca & 0x0FFFFFFF) | (q << 28)
/* Bit 27 should always be zero */
/* Bit 27 should always be zero on EMU8000 */
#define CCCA_DMA_ACTIVE(ccca) (ccca & 0x04000000)
#define CCCA_DMA_WRITE_MODE(ccca) (ccca & 0x02000000)
#define CCCA_DMA_WRITE_RIGHT(ccca) (ccca & 0x01000000)
@@ -316,7 +316,9 @@ typedef struct emu8k_voice_t {
int env_engine_on;
emu8k_mem_internal_t addr, loop_start, loop_end;
emu8k_mem_internal_t addr;
emu8k_mem_internal_t loop_start;
emu8k_mem_internal_t loop_end;
int32_t initial_att;
int32_t initial_filter;

View File

@@ -203,9 +203,11 @@ extern const device_t es1373_onboard_device;
extern const device_t ct5880_device;
extern const device_t ct5880_onboard_device;
/* Gravis UltraSound and UltraSound Max */
/* Gravis UltraSound family */
extern const device_t gus_device;
extern const device_t gus_v37_device;
extern const device_t gus_max_device;
extern const device_t gus_ace_device;
/* IBM PS/1 Audio Card */
extern const device_t ps1snd_device;
@@ -236,6 +238,9 @@ extern const device_t tndy_device;
extern const device_t wss_device;
extern const device_t ncr_business_audio_device;
/* Yamaha YMF-7xx */
extern const device_t ymf701_device;
#ifdef USE_LIBSERIALPORT
/* External Audio device OPL2Board (Host Connected hardware)*/
extern const device_t opl2board_device;

View File

@@ -0,0 +1,38 @@
/*
* 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.
*
* ICD2061 clock generator emulation.
* Also emulates the ICS9161 which is the same as the ICD2016,
* but without the need for tuning (which is irrelevant in
* emulation anyway).
*
* Used by ET4000w32/p (Diamond Stealth 32) and the S3
* Vision964 family.
*
*
*
* Authors: Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2016-2018 Miran Grca.
*/
#ifndef VIDEO_CLOCKGEN_ICD2061_H
#define VIDEO_CLOCKGEN_ICD2061_H
typedef struct icd2061_t {
float freq[3];
float ref_clock;
int count;
int bit_count;
int unlocked;
int state;
uint32_t data;
uint32_t ctrl;
} icd2061_t;
#endif // VIDEO_CLOCKGEN_ICD2061_H

View File

@@ -20,8 +20,9 @@
#ifndef EMU_VID_DDC_H
#define EMU_VID_DDC_H
extern void *ddc_init(void *i2c);
extern void ddc_close(void *eeprom);
extern void *ddc_create_default_edid(ssize_t* size_out);
extern void *ddc_init(void *i2c);
extern void ddc_close(void *eeprom);
extern size_t ddc_create_default_edid(uint8_t **size_out);
extern size_t ddc_load_edid(char *path, uint8_t *buf, size_t size);
#endif /*EMU_VID_DDC_H*/

View File

@@ -141,6 +141,10 @@ typedef struct svga_t {
int render_line_offset;
int start_retrace_latch;
int vga_mode;
int half_pixel;
int clock_multiplier;
int true_color_bypass;
int multiplexing_rate;
/*The three variables below allow us to implement memory maps like that seen on a 1MB Trio64 :
0MB-1MB - VRAM
@@ -449,6 +453,7 @@ extern void ibm_rgb528_ramdac_set_ref_clock(void *priv, svga_t *svga, float r
extern void icd2061_write(void *priv, int val);
extern float icd2061_getclock(int clock, void *priv);
extern void icd2061_set_ref_clock(void *priv, float ref_clock);
/* The code is the same, the #define's are so that the correct name can be used. */
# define ics9161_write icd2061_write
@@ -465,6 +470,8 @@ extern uint8_t sc1148x_ramdac_in(uint16_t addr, int rs2, void *priv, svga_t *svg
extern void sc1502x_ramdac_out(uint16_t addr, uint8_t val, void *priv, svga_t *svga);
extern uint8_t sc1502x_ramdac_in(uint16_t addr, void *priv, svga_t *svga);
extern void sc1502x_rs2_ramdac_out(uint16_t addr, int rs2, uint8_t val, void *priv, svga_t *svga);
extern uint8_t sc1502x_rs2_ramdac_in(uint16_t addr, int rs2, void *priv, svga_t *svga);
extern void sdac_ramdac_out(uint16_t addr, int rs2, uint8_t val, void *priv, svga_t *svga);
extern uint8_t sdac_ramdac_in(uint16_t addr, int rs2, void *priv, svga_t *svga);
@@ -516,6 +523,7 @@ extern const device_t sc11487_ramdac_device;
extern const device_t sc11486_ramdac_device;
extern const device_t sc11484_nors2_ramdac_device;
extern const device_t sc1502x_ramdac_device;
extern const device_t sc1502x_rs2_ramdac_device;
extern const device_t sdac_ramdac_device;
extern const device_t stg_ramdac_device;
extern const device_t tkd8001_ramdac_device;

View File

@@ -1,7 +1,7 @@
#ifndef VIDEO_VOODOO_RENDER_H
#define VIDEO_VOODOO_RENDER_H
#if !(defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _M_IX86 || defined __amd64__ || defined _M_X64)
#if !(defined __amd64__ || defined _M_X64)
# define NO_CODEGEN
#endif

View File

@@ -412,7 +412,7 @@ extern const device_t cga_pravetz_device;
/* Compaq CGA */
extern const device_t compaq_cga_device;
extern const device_t compaq_cga_2_device;
extern const device_t compaq_plasma_device;
extern const device_t compaq_plasma_device;
/* Olivetti OGC */
extern const device_t ogc_device;
@@ -513,8 +513,11 @@ extern const device_t realtek_rtg3106_device;
extern const device_t s3_orchid_86c911_isa_device;
extern const device_t s3_diamond_stealth_vram_isa_device;
extern const device_t s3_ami_86c924_isa_device;
extern const device_t s3_elsa_winner1000_86c928_vlb_device;
extern const device_t s3_elsa_winner2000_86c928_isa_device;
extern const device_t s3_metheus_86c928_isa_device;
extern const device_t s3_metheus_86c928_vlb_device;
extern const device_t s3_elsa_winner1000_86c928_pci_device;
extern const device_t s3_spea_mercury_lite_86c928_pci_device;
extern const device_t s3_spea_mirage_86c801_isa_device;
extern const device_t s3_winner1000_805_isa_device;
@@ -635,9 +638,9 @@ extern const device_t wy700_device;
extern const device_t v6355d_device;
/* Tandy */
extern const device_t tandy_1000_video_device;
extern const device_t tandy_1000hx_video_device;
extern const device_t tandy_1000sl_video_device;
extern const device_t tandy_1000_video_device;
extern const device_t tandy_1000hx_video_device;
extern const device_t tandy_1000sl_video_device;
#endif