Merge branch 'master' into global-config-screenshot
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Main include file for the application.
|
||||
* Main include file for the application.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*f Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2021 Laci bá'
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2021 Laci bá'
|
||||
*/
|
||||
#ifndef EMU_86BOX_H
|
||||
#define EMU_86BOX_H
|
||||
@@ -162,7 +162,7 @@ extern void set_screen_size_monitor(int x, int y, int monitor_index);
|
||||
extern void reset_screen_size(void);
|
||||
extern void reset_screen_size_monitor(int monitor_index);
|
||||
extern void set_screen_size_natural(void);
|
||||
extern void update_mouse_msg();
|
||||
extern void update_mouse_msg(void);
|
||||
#if 0
|
||||
extern void pc_reload(wchar_t *fn);
|
||||
#endif
|
||||
|
||||
@@ -36,12 +36,12 @@
|
||||
*/
|
||||
|
||||
#ifndef BSWAP_H
|
||||
# define BSWAP_H
|
||||
#define BSWAP_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef HAVE_BYTESWAP_H
|
||||
#include <byteswap.h>
|
||||
# include <byteswap.h>
|
||||
#else
|
||||
# define bswap_16(x) \
|
||||
( \
|
||||
@@ -73,6 +73,7 @@
|
||||
)
|
||||
#endif /*HAVE_BYTESWAP_H*/
|
||||
|
||||
#if __GNUC__ >= 10
|
||||
#if defined __has_builtin && __has_builtin(__builtin_bswap16)
|
||||
#define bswap16(x) __builtin_bswap16(x)
|
||||
#else
|
||||
@@ -80,83 +81,111 @@ static __inline uint16_t bswap16(uint16_t x)
|
||||
{
|
||||
return bswap_16(x);
|
||||
}
|
||||
# endif
|
||||
#else
|
||||
static __inline uint16_t
|
||||
bswap16(uint16_t x)
|
||||
{
|
||||
return bswap_16(x);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined __has_builtin && __has_builtin(__builtin_bswap32)
|
||||
#define bswap32(x) __builtin_bswap32(x)
|
||||
#if __GNUC__ >= 10
|
||||
# if defined __has_builtin && __has_builtin(__builtin_bswap32)
|
||||
# define bswap32(x) __builtin_bswap32(x)
|
||||
# else
|
||||
static __inline uint32_t
|
||||
bswap32(uint32_t x)
|
||||
{
|
||||
return bswap_32(x);
|
||||
}
|
||||
# endif
|
||||
#else
|
||||
static __inline uint32_t bswap32(uint32_t x)
|
||||
static __inline uint32_t
|
||||
bswap32(uint32_t x)
|
||||
{
|
||||
return bswap_32(x);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined __has_builtin && __has_builtin(__builtin_bswap64)
|
||||
#define bswap64(x) __builtin_bswap64(x)
|
||||
#if __GNUC__ >= 10
|
||||
# if defined __has_builtin && __has_builtin(__builtin_bswap64)
|
||||
# define bswap64(x) __builtin_bswap64(x)
|
||||
# else
|
||||
static __inline uint64_t
|
||||
bswap64(uint64_t x)
|
||||
{
|
||||
return bswap_64(x);
|
||||
}
|
||||
# endif
|
||||
#else
|
||||
static __inline uint64_t bswap64(uint64_t x)
|
||||
static __inline uint64_t
|
||||
bswap64(uint64_t x)
|
||||
{
|
||||
return bswap_64(x);
|
||||
}
|
||||
#endif
|
||||
|
||||
static __inline void bswap16s(uint16_t *s)
|
||||
static __inline void
|
||||
bswap16s(uint16_t *s)
|
||||
{
|
||||
*s = bswap16(*s);
|
||||
}
|
||||
|
||||
static __inline void bswap32s(uint32_t *s)
|
||||
static __inline void
|
||||
bswap32s(uint32_t *s)
|
||||
{
|
||||
*s = bswap32(*s);
|
||||
}
|
||||
|
||||
static __inline void bswap64s(uint64_t *s)
|
||||
static __inline void
|
||||
bswap64s(uint64_t *s)
|
||||
{
|
||||
*s = bswap64(*s);
|
||||
}
|
||||
|
||||
#if defined(WORDS_BIGENDIAN)
|
||||
# define be_bswap(v, size) (v)
|
||||
# define le_bswap(v, size) bswap ## size(v)
|
||||
# define be_bswaps(v, size)
|
||||
# define le_bswaps(p, size) *p = bswap ## size(*p);
|
||||
# define be_bswap(v, size) (v)
|
||||
# define le_bswap(v, size) bswap##size(v)
|
||||
# define be_bswaps(v, size)
|
||||
# define le_bswaps(p, size) *p = bswap##size(*p);
|
||||
#else
|
||||
# define le_bswap(v, size) (v)
|
||||
# define be_bswap(v, size) bswap ## size(v)
|
||||
# define le_bswaps(v, size)
|
||||
# define be_bswaps(p, size) *p = bswap ## size(*p);
|
||||
# define le_bswap(v, size) (v)
|
||||
# define be_bswap(v, size) bswap##size(v)
|
||||
# define le_bswaps(v, size)
|
||||
# define be_bswaps(p, size) *p = bswap##size(*p);
|
||||
#endif
|
||||
|
||||
#define CPU_CONVERT(endian, size, type)\
|
||||
static __inline type endian ## size ## _to_cpu(type v)\
|
||||
{\
|
||||
return endian ## _bswap(v, size);\
|
||||
}\
|
||||
\
|
||||
static __inline type cpu_to_ ## endian ## size(type v)\
|
||||
{\
|
||||
return endian ## _bswap(v, size);\
|
||||
}\
|
||||
\
|
||||
static __inline void endian ## size ## _to_cpus(type *p)\
|
||||
{\
|
||||
endian ## _bswaps(p, size)\
|
||||
}\
|
||||
\
|
||||
static __inline void cpu_to_ ## endian ## size ## s(type *p)\
|
||||
{\
|
||||
endian ## _bswaps(p, size)\
|
||||
}\
|
||||
\
|
||||
static __inline type endian ## size ## _to_cpup(const type *p)\
|
||||
{\
|
||||
return endian ## size ## _to_cpu(*p);\
|
||||
}\
|
||||
\
|
||||
static __inline void cpu_to_ ## endian ## size ## w(type *p, type v)\
|
||||
{\
|
||||
*p = cpu_to_ ## endian ## size(v);\
|
||||
}
|
||||
#define CPU_CONVERT(endian, size, type) \
|
||||
static __inline type endian##size##_to_cpu(type v) \
|
||||
{ \
|
||||
return endian##_bswap(v, size); \
|
||||
} \
|
||||
\
|
||||
static __inline type cpu_to_##endian##size(type v) \
|
||||
{ \
|
||||
return endian##_bswap(v, size); \
|
||||
} \
|
||||
\
|
||||
static __inline void endian##size##_to_cpus(type *p) \
|
||||
{ \
|
||||
endian##_bswaps(p, size) \
|
||||
} \
|
||||
\
|
||||
static __inline void cpu_to_##endian##size##s(type *p) \
|
||||
{ \
|
||||
endian##_bswaps(p, size) \
|
||||
} \
|
||||
\
|
||||
static __inline type endian##size##_to_cpup(const type *p) \
|
||||
{ \
|
||||
return endian##size##_to_cpu(*p); \
|
||||
} \
|
||||
\
|
||||
static __inline void cpu_to_##endian##size##w(type *p, type v) \
|
||||
{ \
|
||||
*p = cpu_to_##endian##size(v); \
|
||||
}
|
||||
|
||||
CPU_CONVERT(be, 16, uint16_t)
|
||||
CPU_CONVERT(be, 32, uint32_t)
|
||||
@@ -170,27 +199,29 @@ CPU_CONVERT(le, 64, uint64_t)
|
||||
|
||||
#if defined(__i386__) || 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)
|
||||
#define le32_to_cpupu(p) le32_to_cpup(p)
|
||||
# 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)
|
||||
# define le32_to_cpupu(p) le32_to_cpup(p)
|
||||
|
||||
#define cpu_to_be16wu(p, v) cpu_to_be16w(p, v)
|
||||
#define cpu_to_be32wu(p, v) cpu_to_be32w(p, v)
|
||||
# define cpu_to_be16wu(p, v) cpu_to_be16w(p, v)
|
||||
# define cpu_to_be32wu(p, v) cpu_to_be32w(p, v)
|
||||
|
||||
#else
|
||||
|
||||
static __inline void cpu_to_le16wu(uint16_t *p, uint16_t v)
|
||||
static __inline void
|
||||
cpu_to_le16wu(uint16_t *p, uint16_t v)
|
||||
{
|
||||
uint8_t *p1 = (uint8_t *)p;
|
||||
uint8_t *p1 = (uint8_t *) p;
|
||||
|
||||
p1[0] = v & 0xff;
|
||||
p1[1] = v >> 8;
|
||||
}
|
||||
|
||||
static __inline void cpu_to_le32wu(uint32_t *p, uint32_t v)
|
||||
static __inline void
|
||||
cpu_to_le32wu(uint32_t *p, uint32_t v)
|
||||
{
|
||||
uint8_t *p1 = (uint8_t *)p;
|
||||
uint8_t *p1 = (uint8_t *) p;
|
||||
|
||||
p1[0] = v;
|
||||
p1[1] = v >> 8;
|
||||
@@ -198,29 +229,33 @@ static __inline void cpu_to_le32wu(uint32_t *p, uint32_t v)
|
||||
p1[3] = v >> 24;
|
||||
}
|
||||
|
||||
static __inline uint16_t le16_to_cpupu(const uint16_t *p)
|
||||
static __inline uint16_t
|
||||
le16_to_cpupu(const uint16_t *p)
|
||||
{
|
||||
const uint8_t *p1 = (const uint8_t *)p;
|
||||
const uint8_t *p1 = (const uint8_t *) p;
|
||||
return p1[0] | (p1[1] << 8);
|
||||
}
|
||||
|
||||
static __inline uint32_t le32_to_cpupu(const uint32_t *p)
|
||||
static __inline uint32_t
|
||||
le32_to_cpupu(const uint32_t *p)
|
||||
{
|
||||
const uint8_t *p1 = (const uint8_t *)p;
|
||||
const uint8_t *p1 = (const uint8_t *) p;
|
||||
return p1[0] | (p1[1] << 8) | (p1[2] << 16) | (p1[3] << 24);
|
||||
}
|
||||
|
||||
static __inline void cpu_to_be16wu(uint16_t *p, uint16_t v)
|
||||
static __inline void
|
||||
cpu_to_be16wu(uint16_t *p, uint16_t v)
|
||||
{
|
||||
uint8_t *p1 = (uint8_t *)p;
|
||||
uint8_t *p1 = (uint8_t *) p;
|
||||
|
||||
p1[0] = v >> 8;
|
||||
p1[1] = v & 0xff;
|
||||
}
|
||||
|
||||
static __inline void cpu_to_be32wu(uint32_t *p, uint32_t v)
|
||||
static __inline void
|
||||
cpu_to_be32wu(uint32_t *p, uint32_t v)
|
||||
{
|
||||
uint8_t *p1 = (uint8_t *)p;
|
||||
uint8_t *p1 = (uint8_t *) p;
|
||||
|
||||
p1[0] = v >> 24;
|
||||
p1[1] = v >> 16;
|
||||
@@ -231,9 +266,9 @@ static __inline void cpu_to_be32wu(uint32_t *p, uint32_t v)
|
||||
#endif
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#define cpu_to_32wu cpu_to_be32wu
|
||||
# define cpu_to_32wu cpu_to_be32wu
|
||||
#else
|
||||
#define cpu_to_32wu cpu_to_le32wu
|
||||
# define cpu_to_32wu cpu_to_le32wu
|
||||
#endif
|
||||
|
||||
#undef le_bswap
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Configuration file handler header.
|
||||
* Configuration file handler header.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker,
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Overdoze,
|
||||
* Authors: Sarah Walker,
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Overdoze,
|
||||
*
|
||||
* Copyright 2008-2017 Sarah Walker.
|
||||
* Copyright 2016,2017 Miran Grca.
|
||||
* Copyright 2017 Fred N. van Kempen.
|
||||
* Copyright 2008-2017 Sarah Walker.
|
||||
* Copyright 2016,2017 Miran Grca.
|
||||
* Copyright 2017 Fred N. van Kempen.
|
||||
*/
|
||||
#ifndef EMU_CONFIG_H
|
||||
#define EMU_CONFIG_H
|
||||
|
||||
@@ -23,11 +23,11 @@ extern "C" {
|
||||
|
||||
extern int discord_loaded;
|
||||
|
||||
extern int discord_load();
|
||||
extern void discord_init();
|
||||
extern void discord_close();
|
||||
extern int discord_load(void);
|
||||
extern void discord_init(void);
|
||||
extern void discord_close(void);
|
||||
extern void discord_update_activity(int paused);
|
||||
extern void discord_run_callbacks();
|
||||
extern void discord_run_callbacks(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Implementation of the NEC uPD-765 and compatible floppy disk
|
||||
* controller.
|
||||
* 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>
|
||||
* 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.
|
||||
* Copyright 2008-2020 Sarah Walker.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2018-2020 Fred N. van Kempen.
|
||||
*/
|
||||
#ifndef EMU_FDC_H
|
||||
#define EMU_FDC_H
|
||||
@@ -40,18 +40,18 @@ extern int fdc_type;
|
||||
#define FDC_QUATERNARY_IRQ 6
|
||||
#define FDC_QUATERNARY_DMA 2
|
||||
|
||||
#define FDC_FLAG_PCJR 0x01 /* PCjr */
|
||||
#define FDC_FLAG_DISKCHG_ACTLOW 0x02 /* Amstrad, PS/1, PS/2 ISA */
|
||||
#define FDC_FLAG_AT 0x04 /* AT+, PS/x */
|
||||
#define FDC_FLAG_PS1 0x08 /* PS/1, PS/2 ISA */
|
||||
#define FDC_FLAG_SUPERIO 0x10 /* Super I/O chips */
|
||||
#define FDC_FLAG_START_RWC_1 0x20 /* W83877F, W83977F */
|
||||
#define FDC_FLAG_MORE_TRACKS 0x40 /* W83877F, W83977F, PC87306, PC87309 */
|
||||
#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_UMC 0x400 /* UMC UM8398 */
|
||||
#define FDC_FLAG_ALI 0x800 /* ALi M512x / M1543C */
|
||||
#define FDC_FLAG_PCJR 0x01 /* PCjr */
|
||||
#define FDC_FLAG_DISKCHG_ACTLOW 0x02 /* Amstrad, PS/1, PS/2 ISA */
|
||||
#define FDC_FLAG_AT 0x04 /* AT+, PS/x */
|
||||
#define FDC_FLAG_PS1 0x08 /* PS/1, PS/2 ISA */
|
||||
#define FDC_FLAG_SUPERIO 0x10 /* Super I/O chips */
|
||||
#define FDC_FLAG_START_RWC_1 0x20 /* W83877F, W83977F */
|
||||
#define FDC_FLAG_MORE_TRACKS 0x40 /* W83877F, W83977F, PC87306, PC87309 */
|
||||
#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_UMC 0x400 /* UMC UM8398 */
|
||||
#define FDC_FLAG_ALI 0x800 /* ALi M512x / M1543C */
|
||||
#define FDC_FLAG_SEC 0x1000 /* Is Secondary */
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
/*
|
||||
* 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 floppy drive emulation.
|
||||
* Definitions for the floppy drive emulation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Authors: Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2018 Fred N. van Kempen.
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2018 Fred N. van Kempen.
|
||||
*/
|
||||
#ifndef EMU_FDD_H
|
||||
#define EMU_FDD_H
|
||||
|
||||
#define FDD_NUM 4
|
||||
#define FLOPPY_IMAGE_HISTORY 4
|
||||
#define SEEK_RECALIBRATE -999
|
||||
#define FDD_NUM 4
|
||||
#define FLOPPY_IMAGE_HISTORY 4
|
||||
#define SEEK_RECALIBRATE -999
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -42,9 +42,7 @@ extern int fdd_can_read_medium(int drive);
|
||||
extern int fdd_doublestep_40(int drive);
|
||||
extern int fdd_is_525(int drive);
|
||||
extern int fdd_is_dd(int drive);
|
||||
#if 0
|
||||
extern int fdd_is_hd(int drive);
|
||||
#endif
|
||||
extern int fdd_is_ed(int drive);
|
||||
extern int fdd_is_double_sided(int drive);
|
||||
extern void fdd_set_head(int drive, int head);
|
||||
@@ -87,7 +85,7 @@ typedef struct {
|
||||
|
||||
extern DRIVE drives[FDD_NUM];
|
||||
extern char floppyfns[FDD_NUM][512];
|
||||
extern char *fdd_image_history[FDD_NUM][FLOPPY_IMAGE_HISTORY];
|
||||
extern char *fdd_image_history[FDD_NUM][FLOPPY_IMAGE_HISTORY];
|
||||
extern pc_timer_t fdd_poll_time[FDD_NUM];
|
||||
extern int ui_writeprot[FDD_NUM];
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* 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 disk controller handler.
|
||||
* Definitions for the common disk controller handler.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
*/
|
||||
#ifndef EMU_HDC_H
|
||||
#define EMU_HDC_H
|
||||
@@ -28,21 +28,24 @@
|
||||
* least 7 devices, with each device being \
|
||||
* able to support 8 units, but hey... */
|
||||
|
||||
#define HDC_NONE 0
|
||||
#define HDC_INTERNAL 1
|
||||
|
||||
extern int hdc_current;
|
||||
|
||||
extern const device_t st506_xt_xebec_device; /* st506_xt_xebec */
|
||||
extern const device_t st506_xt_dtc5150x_device; /* st506_xt_dtc */
|
||||
extern const device_t st506_xt_st11_m_device; /* st506_xt_st11_m */
|
||||
extern const device_t st506_xt_st11_r_device; /* st506_xt_st11_m */
|
||||
extern const device_t st506_xt_wd1002a_wx1_device; /* st506_xt_wd1002a_wx1 */
|
||||
extern const device_t st506_xt_wd1002a_wx1_nobios_device; /* st506_xt_wd1002a_wx1 */
|
||||
extern const device_t st506_xt_wd1002a_27x_device; /* st506_xt_wd1002a_27x */
|
||||
extern const device_t st506_at_wd1003_device; /* st506_at_wd1003 */
|
||||
extern const device_t st506_xt_wd1004a_wx1_device; /* st506_xt_wd1004a_wx1 */
|
||||
extern const device_t st506_xt_wd1004_27x_device; /* st506_xt_wd1004_27x */
|
||||
extern const device_t st506_xt_wd1004a_27x_device; /* st506_xt_wd1004a_27x */
|
||||
extern const device_t st506_xt_victor_v86p_device; /* st506_xt_victor_v86p */
|
||||
extern const device_t st506_xt_toshiba_t1200_device; /* st506_xt_toshiba_t1200 */
|
||||
extern const device_t st506_xt_xebec_device; /* st506_xt_xebec */
|
||||
extern const device_t st506_xt_dtc5150x_device; /* st506_xt_dtc */
|
||||
extern const device_t st506_xt_st11_m_device; /* st506_xt_st11_m */
|
||||
extern const device_t st506_xt_st11_r_device; /* st506_xt_st11_m */
|
||||
extern const device_t st506_xt_wd1002a_wx1_device; /* st506_xt_wd1002a_wx1 */
|
||||
extern const device_t st506_xt_wd1002a_wx1_nobios_device; /* st506_xt_wd1002a_wx1 */
|
||||
extern const device_t st506_xt_wd1002a_27x_device; /* st506_xt_wd1002a_27x */
|
||||
extern const device_t st506_at_wd1003_device; /* st506_at_wd1003 */
|
||||
extern const device_t st506_xt_wd1004a_wx1_device; /* st506_xt_wd1004a_wx1 */
|
||||
extern const device_t st506_xt_wd1004_27x_device; /* st506_xt_wd1004_27x */
|
||||
extern const device_t st506_xt_wd1004a_27x_device; /* st506_xt_wd1004a_27x */
|
||||
extern const device_t st506_xt_victor_v86p_device; /* st506_xt_victor_v86p */
|
||||
extern const device_t st506_xt_toshiba_t1200_device; /* st506_xt_toshiba_t1200 */
|
||||
|
||||
extern const device_t esdi_at_wd1007vse1_device; /* esdi_at */
|
||||
extern const device_t esdi_ps2_device; /* esdi_mca */
|
||||
|
||||
@@ -18,7 +18,14 @@
|
||||
#ifndef EMU_HDD_H
|
||||
#define EMU_HDD_H
|
||||
|
||||
#define HDD_NUM 88 /* total of 88 images supported */
|
||||
#define IMG_FMT_RAW 0
|
||||
#define IMG_FMT_HDI 1
|
||||
#define IMG_FMT_HDX 2
|
||||
#define IMG_FMT_VHD_FIXED 3
|
||||
#define IMG_FMT_VHD_DYNAMIC 4
|
||||
#define IMG_FMT_VHD_DIFF 5
|
||||
|
||||
#define HDD_NUM 88 /* total of 88 images supported */
|
||||
|
||||
/* Hard Disk bus types. */
|
||||
#if 0
|
||||
@@ -206,7 +213,7 @@ extern int image_is_vhd(const char *s, int check_signature);
|
||||
extern double hdd_timing_write(hard_disk_t *hdd, uint32_t addr, uint32_t len);
|
||||
extern double hdd_timing_read(hard_disk_t *hdd, uint32_t addr, uint32_t len);
|
||||
extern double hdd_seek_get_time(hard_disk_t *hdd, uint32_t dst_addr, uint8_t operation, uint8_t continuous, double max_seek_time);
|
||||
int hdd_preset_get_num();
|
||||
int hdd_preset_get_num(void);
|
||||
const char *hdd_preset_getname(int preset);
|
||||
extern const char *hdd_preset_get_internal_name(int preset);
|
||||
extern int hdd_preset_get_from_internal_name(char *s);
|
||||
|
||||
@@ -38,7 +38,7 @@ typedef struct {
|
||||
} lm75_t;
|
||||
|
||||
/* hwm.c */
|
||||
extern uint16_t hwm_get_vcore();
|
||||
extern uint16_t hwm_get_vcore(void);
|
||||
|
||||
/* hwm_lm75.c */
|
||||
extern void lm75_remap(lm75_t *dev, uint8_t addr);
|
||||
|
||||
@@ -62,6 +62,6 @@ extern void i2c_gpio_close(void *dev_handle);
|
||||
extern void i2c_gpio_set(void *dev_handle, uint8_t scl, uint8_t sda);
|
||||
extern uint8_t i2c_gpio_get_scl(void *dev_handle);
|
||||
extern uint8_t i2c_gpio_get_sda(void *dev_handle);
|
||||
extern void *i2c_gpio_get_bus();
|
||||
extern void *i2c_gpio_get_bus(void *dev_handle);
|
||||
|
||||
#endif /*EMU_I2C_H*/
|
||||
|
||||
@@ -15,42 +15,46 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct i8080
|
||||
{
|
||||
union {
|
||||
typedef struct i8080 {
|
||||
union {
|
||||
uint16_t af; /* Intended in case we also go for μPD9002 emulation, which also has a Z80 emulation mode. */
|
||||
struct { uint8_t a, flags; };
|
||||
struct {
|
||||
uint8_t a, flags;
|
||||
};
|
||||
};
|
||||
union
|
||||
{
|
||||
union {
|
||||
uint16_t bc;
|
||||
struct { uint8_t b, c; };
|
||||
struct {
|
||||
uint8_t b, c;
|
||||
};
|
||||
};
|
||||
union
|
||||
{
|
||||
union {
|
||||
uint16_t de;
|
||||
struct { uint8_t d, e; };
|
||||
struct {
|
||||
uint8_t d, e;
|
||||
};
|
||||
};
|
||||
union
|
||||
{
|
||||
union {
|
||||
uint16_t hl;
|
||||
struct { uint8_t h, l; };
|
||||
struct {
|
||||
uint8_t h, l;
|
||||
};
|
||||
};
|
||||
uint16_t pc, sp;
|
||||
uint16_t oldpc, ei;
|
||||
uint32_t pmembase, dmembase; /* Base from where i8080 starts. */
|
||||
uint8_t emulated; /* 0 = not emulated, use separate registers, 1 = emulated, use x86 registers. */
|
||||
uint16_t* cpu_flags;
|
||||
uint16_t pc, sp;
|
||||
uint16_t oldpc, ei;
|
||||
uint32_t pmembase, dmembase; /* Base from where i8080 starts. */
|
||||
uint8_t emulated; /* 0 = not emulated, use separate registers, 1 = emulated, use x86 registers. */
|
||||
uint16_t *cpu_flags;
|
||||
void (*writemembyte)(uint32_t, uint8_t);
|
||||
uint8_t (*readmembyte)(uint32_t);
|
||||
void (*startclock)();
|
||||
void (*endclock)();
|
||||
void (*checkinterrupts)();
|
||||
uint8_t (*fetchinstruction)();
|
||||
void (*startclock)(void);
|
||||
void (*endclock)(void);
|
||||
void (*checkinterrupts)(void);
|
||||
uint8_t (*fetchinstruction)(void *);
|
||||
} i8080;
|
||||
|
||||
#define C_FLAG_I8080 (1 << 0)
|
||||
#define P_FLAG_I8080 (1 << 2)
|
||||
#define C_FLAG_I8080 (1 << 0)
|
||||
#define P_FLAG_I8080 (1 << 2)
|
||||
#define AC_FLAG_I8080 (1 << 4)
|
||||
#define Z_FLAG_I8080 (1 << 6)
|
||||
#define S_FLAG_I8080 (1 << 7)
|
||||
#define Z_FLAG_I8080 (1 << 6)
|
||||
#define S_FLAG_I8080 (1 << 7)
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Configuration file handler header.
|
||||
* Configuration file handler header.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker,
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Overdoze,
|
||||
* Authors: Sarah Walker,
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Overdoze,
|
||||
*
|
||||
* Copyright 2008-2017 Sarah Walker.
|
||||
* Copyright 2016,2017 Miran Grca.
|
||||
* Copyright 2008-2017 Sarah Walker.
|
||||
* Copyright 2016,2017 Miran Grca.
|
||||
*
|
||||
*/
|
||||
#ifndef EMU_INI_H
|
||||
@@ -48,7 +48,7 @@ extern void ini_section_set_double(ini_section_t section, char *name, double
|
||||
extern void ini_section_set_hex16(ini_section_t section, char *name, int val);
|
||||
extern void ini_section_set_hex20(ini_section_t section, char *name, int val);
|
||||
extern void ini_section_set_mac(ini_section_t section, char *name, int val);
|
||||
extern void ini_section_set_string(ini_section_t section, char *name, char *val);
|
||||
extern void ini_section_set_string(ini_section_t section, const char *name, const char *val);
|
||||
extern void ini_section_set_wstring(ini_section_t section, char *name, wchar_t *val);
|
||||
|
||||
#define ini_delete_var(ini, head, name) ini_section_delete_var(ini_find_section(ini, head), name)
|
||||
|
||||
@@ -15,126 +15,143 @@
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2017,2018 Fred N. van Kempen.
|
||||
* Copyright 2022 Jasmine Iwanek.
|
||||
*/
|
||||
|
||||
#ifndef LANG_UAGE_H
|
||||
#define LANG_UAGE_H
|
||||
|
||||
/* String IDs. */
|
||||
#define IDS_STRINGS 2048 // "86Box"
|
||||
#define IDS_2049 2049 // "Error"
|
||||
#define IDS_2050 2050 // "Fatal error"
|
||||
#define IDS_2051 2051 // " - PAUSED"
|
||||
#define IDS_2052 2052 // "Press Ctrl+Alt+PgDn..."
|
||||
#define IDS_2053 2053 // "Speed"
|
||||
#define IDS_2054 2054 // "ZIP %i (%03i): %ls"
|
||||
#define IDS_2055 2055 // "ZIP images (*.IM?)\0*.IM..."
|
||||
#define IDS_2056 2056 // "No usable ROM images found!"
|
||||
#define IDS_2057 2057 // "(empty)"
|
||||
#define IDS_2058 2058 // "ZIP images (*.IM?)\0*.IM..."
|
||||
#define IDS_2059 2059 // "(Turbo)"
|
||||
#define IDS_2060 2060 // "On"
|
||||
#define IDS_2061 2061 // "Off"
|
||||
#define IDS_2062 2062 // "All floppy images (*.DSK..."
|
||||
#define IDS_2063 2063 // "Machine ""%hs"" is not..."
|
||||
#define IDS_2064 2064 // "Video card ""%hs"" is not..."
|
||||
#define IDS_2065 2065 // "Machine"
|
||||
#define IDS_2066 2066 // "Display"
|
||||
#define IDS_2067 2067 // "Input devices"
|
||||
#define IDS_2068 2068 // "Sound"
|
||||
#define IDS_2069 2069 // "Network"
|
||||
#define IDS_2070 2070 // "Ports (COM & LPT)"
|
||||
#define IDS_2071 2071 // "Storage controllers"
|
||||
#define IDS_2072 2072 // "Hard disks"
|
||||
#define IDS_2073 2073 // "Floppy and CD-ROM drives"
|
||||
#define IDS_2074 2074 // "Other removable devices"
|
||||
#define IDS_2075 2075 // "Other peripherals"
|
||||
#define IDS_2076 2076 // "Surface-based images (*.8.."
|
||||
#define IDS_2077 2077 // "Click to capture mouse"
|
||||
#define IDS_2078 2078 // "Press F12-F8 to release mouse"
|
||||
#define IDS_2079 2079 // "Press F12-F8 or middle button.."
|
||||
#define IDS_2080 2080 // "Unable to initialize Flui.."
|
||||
#define IDS_2081 2081 // "Bus"
|
||||
#define IDS_2082 2082 // "File"
|
||||
#define IDS_2083 2083 // "C"
|
||||
#define IDS_2084 2084 // "H"
|
||||
#define IDS_2085 2085 // "S"
|
||||
#define IDS_2086 2086 // "MB"
|
||||
#define IDS_2087 2087 // "Check BPB"
|
||||
#define IDS_2088 2088 // "KB"
|
||||
#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"
|
||||
#define IDS_2093 2093 // "PCap failed to set up.."
|
||||
#define IDS_2094 2094 // "No PCap devices found"
|
||||
#define IDS_2095 2095 // "Invalid PCap device"
|
||||
#define IDS_2096 2096 // "Standard 2-button joystick(s)"
|
||||
#define IDS_2097 2097 // "Standard 4-button joystick"
|
||||
#define IDS_2098 2098 // "Standard 6-button joystick"
|
||||
#define IDS_2099 2099 // "Standard 8-button joystick"
|
||||
#define IDS_2100 2100 // "CH Flightstick Pro"
|
||||
#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 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"
|
||||
#define IDS_2109 2109 // "All floppy images (*.0??;*.."
|
||||
#define IDS_2110 2110 // "Unable to initialize Free.."
|
||||
#define IDS_2111 2111 // "Unable to initialize SDL..."
|
||||
#define IDS_2112 2112 // "Are you sure you want to..."
|
||||
#define IDS_STRINGS 2048 // "86Box"
|
||||
#define IDS_2049 2049 // "Error"
|
||||
#define IDS_2050 2050 // "Fatal error"
|
||||
#define IDS_2051 2051 // " - PAUSED"
|
||||
#define IDS_2052 2052 // "Press Ctrl+Alt+PgDn..."
|
||||
#define IDS_2053 2053 // "Speed"
|
||||
#define IDS_2054 2054 // "ZIP %i (%03i): %ls"
|
||||
#define IDS_2055 2055 // "ZIP images (*.IM?)\0*.IM..."
|
||||
#define IDS_2056 2056 // "No usable ROM images found!"
|
||||
#define IDS_2057 2057 // "(empty)"
|
||||
#define IDS_2058 2058 // "ZIP images (*.IM?)\0*.IM..."
|
||||
#define IDS_2059 2059 // "(Turbo)"
|
||||
#define IDS_2060 2060 // "On"
|
||||
#define IDS_2061 2061 // "Off"
|
||||
#define IDS_2062 2062 // "All floppy images (*.DSK..."
|
||||
#define IDS_2063 2063 // "Machine ""%hs"" is not..."
|
||||
#define IDS_2064 2064 // "Video card ""%hs"" is not..."
|
||||
#define IDS_2065 2065 // "Machine"
|
||||
#define IDS_2066 2066 // "Display"
|
||||
#define IDS_2067 2067 // "Input devices"
|
||||
#define IDS_2068 2068 // "Sound"
|
||||
#define IDS_2069 2069 // "Network"
|
||||
#define IDS_2070 2070 // "Ports (COM & LPT)"
|
||||
#define IDS_2071 2071 // "Storage controllers"
|
||||
#define IDS_2072 2072 // "Hard disks"
|
||||
#define IDS_2073 2073 // "Floppy and CD-ROM drives"
|
||||
#define IDS_2074 2074 // "Other removable devices"
|
||||
#define IDS_2075 2075 // "Other peripherals"
|
||||
#define IDS_2076 2076 // "Surface-based images (*.8.."
|
||||
#define IDS_2077 2077 // "Click to capture mouse"
|
||||
#define IDS_2078 2078 // "Press F12-F8 to release mouse"
|
||||
#define IDS_2079 2079 // "Press F12-F8 or middle button.."
|
||||
#define IDS_2080 2080 // "Unable to initialize Flui.."
|
||||
#define IDS_2081 2081 // "Bus"
|
||||
#define IDS_BUS IDS_2081 // "Bus"
|
||||
#define IDS_2082 2082 // "File"
|
||||
#define IDS_2083 2083 // "C"
|
||||
#define IDS_2084 2084 // "H"
|
||||
#define IDS_2085 2085 // "S"
|
||||
#define IDS_2086 2086 // "MB"
|
||||
#define IDS_MB IDS_2086 // "MB"
|
||||
#define IDS_2087 2087 // "Speed"
|
||||
|
||||
#define IDS_2088 2088 // "Check BPB"
|
||||
#define IDS_BPB IDS_2088 // "Check BPB"
|
||||
|
||||
#define IDS_2089 2089 // "KB"
|
||||
#define IDS_KB IDS_2089 // "KB"
|
||||
|
||||
#define IDS_2090 2090 // "Could not initialize the video..."
|
||||
|
||||
#define IDS_2091 2091 // "Default"
|
||||
#define IDS_DEFAULT IDS_2091 // "Default"
|
||||
|
||||
#define IDS_2092 2092 // "%i Wait state(s)"
|
||||
#define IDS_WS IDS_2092 // "%i Wait state(s)"
|
||||
|
||||
#define IDS_2093 2093 // "Type"
|
||||
#define IDS_TYPE IDS_2093 // "Type"
|
||||
|
||||
/* TODO */
|
||||
#define IDS_2094 2094 // "PCap failed to set up.."
|
||||
#define IDS_2095 2095 // "No PCap devices found"
|
||||
#define IDS_2096 2096 // "Invalid PCap device"
|
||||
#define IDS_2097 2097 // "Standard 2-button joystick(s)"
|
||||
#define IDS_2098 2098 // "Standard 4-button joystick"
|
||||
#define IDS_2099 2099 // "Standard 6-button joystick"
|
||||
#define IDS_2100 2100 // "Standard 8-button joystick"
|
||||
#define IDS_2101 2101 // "CH Flightstick Pro"
|
||||
#define IDS_2102 2102 // "Microsoft SideWinder Pad"
|
||||
#define IDS_2103 2103 // "Thrustmaster Flight Cont.."
|
||||
#define IDS_2104 2104 // "None"
|
||||
#define IDS_2105 2105 // "Unable to load keyboard..."
|
||||
#define IDS_2106 2106 // "Unable to register raw input."
|
||||
#define IDS_2107 2107 // "%u"
|
||||
#define IDS_2108 2108 // "%u MB (CHS: %i, %i, %i)"
|
||||
#define IDS_2109 2109 // "Floppy %i (%s): %ls"
|
||||
#define IDS_2110 2110 // "All floppy images (*.0??;*.."
|
||||
#define IDS_2111 2111 // "Unable to initialize Free.."
|
||||
#define IDS_2112 2112 // "Unable to initialize SDL..."
|
||||
#define IDS_2113 2113 // "Are you sure you want to..."
|
||||
#define IDS_2114 2114 // "Unable to initialize Ghostscript..."
|
||||
#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 // "Do you want to save the settings?"
|
||||
#define IDS_2122 2122 // "This will hard reset the emulated..."
|
||||
#define IDS_2123 2123 // "Save"
|
||||
#define IDS_2124 2124 // "About 86Box"
|
||||
#define IDS_2125 2125 // "86Box 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_2139 2139 // "MO images (*.IM?)\0*.IM?..."
|
||||
#define IDS_2140 2140 // "CD-ROM images (*.ISO;*.CU.."
|
||||
#define IDS_2141 2141 // "%hs Device Configuration"
|
||||
#define IDS_2142 2142 // "Monitor in sleep mode"
|
||||
#define IDS_2143 2143 // "OpenGL Shaders (*.GLSL)..."
|
||||
#define IDS_2144 2144 // "OpenGL options"
|
||||
#define IDS_2145 2145 // "You are loading an unsupported..."
|
||||
#define IDS_2146 2146 // "CPU type filtering based on..."
|
||||
#define IDS_2147 2147 // "Continue"
|
||||
#define IDS_2148 2148 // "Cassette: %s"
|
||||
#define IDS_2149 2149 // "Cassette images (*.PCM;*.RAW;*..."
|
||||
#define IDS_2150 2150 // "Cartridge %i: %ls"
|
||||
#define IDS_2151 2151 // "Cartridge images (*.JRC)\0*.JRC\0..."
|
||||
#define IDS_2152 2152 // "Error initializing renderer"
|
||||
#define IDS_2153 2153 // "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
|
||||
#define IDS_2154 2154 // "Resume execution"
|
||||
#define IDS_2155 2155 // "Pause execution"
|
||||
#define IDS_2156 2156 // "Press Ctrl+Alt+Del"
|
||||
#define IDS_2157 2157 // "Press Ctrl+Alt+Esc"
|
||||
#define IDS_2158 2158 // "Hard reset"
|
||||
#define IDS_2159 2159 // "ACPI shutdown"
|
||||
#define IDS_2160 2160 // "Settings"
|
||||
#define IDS_2161 2161 // "Early drive"
|
||||
#define IDS_2114 2114 // "Are you sure you want to..."
|
||||
#define IDS_2115 2115 // "Unable to initialize Ghostscript..."
|
||||
#define IDS_2116 2116 // "MO %i (%03i): %ls"
|
||||
#define IDS_2117 2117 // "MO images (*.IM?)\0*.IM..."
|
||||
#define IDS_2118 2118 // "Welcome to 86Box!"
|
||||
#define IDS_2119 2119 // "Internal controller"
|
||||
#define IDS_2120 2120 // "Exit"
|
||||
#define IDS_2121 2121 // "No ROMs found"
|
||||
#define IDS_2122 2122 // "Do you want to save the settings?"
|
||||
#define IDS_2123 2123 // "This will hard reset the emulated..."
|
||||
#define IDS_2124 2124 // "Save"
|
||||
#define IDS_2125 2125 // "About 86Box"
|
||||
#define IDS_2126 2126 // "86Box v" EMU_VERSION
|
||||
#define IDS_2127 2127 // "An emulator of old computers..."
|
||||
#define IDS_2128 2128 // "OK"
|
||||
#define IDS_2129 2129 // "Hardware not available"
|
||||
#define IDS_2130 2130 // "Make sure " LIB_NAME_PCAP "..."
|
||||
#define IDS_2131 2131 // "Invalid configuration"
|
||||
#define IDS_2132 2132 // LIB_NAME_FREETYPE " is required..."
|
||||
#define IDS_2133 2133 // LIB_NAME_GS " is required for...
|
||||
#define IDS_2134 2134 // LIB_NAME_FLUIDSYNTH " is required..."
|
||||
#define IDS_2135 2135 // "Entering fullscreen mode"
|
||||
#define IDS_2136 2136 // "Don't show this message again"
|
||||
#define IDS_2137 2137 // "Don't exit"
|
||||
#define IDS_2138 2138 // "Reset"
|
||||
#define IDS_2139 2139 // "Don't reset"
|
||||
#define IDS_2140 2140 // "MO images (*.IM?)\0*.IM?..."
|
||||
#define IDS_2141 2141 // "CD-ROM images (*.ISO;*.CU.."
|
||||
#define IDS_2142 2142 // "%hs Device Configuration"
|
||||
#define IDS_2143 2143 // "Monitor in sleep mode"
|
||||
#define IDS_2144 2144 // "OpenGL Shaders (*.GLSL)..."
|
||||
#define IDS_2145 2145 // "OpenGL options"
|
||||
#define IDS_2146 2146 // "You are loading an unsupported..."
|
||||
#define IDS_2147 2147 // "CPU type filtering based on..."
|
||||
#define IDS_2148 2148 // "Continue"
|
||||
#define IDS_2149 2149 // "Cassette: %s"
|
||||
#define IDS_2150 2150 // "Cassette images (*.PCM;*.RAW;*..."
|
||||
#define IDS_2151 2151 // "Cartridge %i: %ls"
|
||||
#define IDS_2152 2152 // "Cartridge images (*.JRC)\0*.JRC\0..."
|
||||
#define IDS_2153 2153 // "Error initializing renderer"
|
||||
#define IDS_2154 2154 // "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
|
||||
#define IDS_2155 2155 // "Resume execution"
|
||||
#define IDS_2156 2156 // "Pause execution"
|
||||
#define IDS_2157 2157 // "Press Ctrl+Alt+Del"
|
||||
#define IDS_2158 2158 // "Press Ctrl+Alt+Esc"
|
||||
#define IDS_2159 2159 // "Hard reset"
|
||||
#define IDS_2160 2160 // "ACPI shutdown"
|
||||
#define IDS_2161 2161 // "Settings"
|
||||
#define IDS_2162 2162 // "Early drive"
|
||||
|
||||
#define IDS_4096 4096 // "Hard disk (%s)"
|
||||
#define IDS_4097 4097 // "%01i:%01i"
|
||||
@@ -243,16 +260,16 @@
|
||||
|
||||
#define IDS_LANG_ENUS IDS_7168
|
||||
|
||||
#define STR_NUM_2048 114
|
||||
#define STR_NUM_2048 115
|
||||
// UNUSED: #define STR_NUM_3072 11
|
||||
#define STR_NUM_4096 40
|
||||
#define STR_NUM_4352 6
|
||||
#define STR_NUM_4608 6
|
||||
#define STR_NUM_5120 1
|
||||
#define STR_NUM_5376 7
|
||||
#define STR_NUM_5632 7
|
||||
#define STR_NUM_5888 24
|
||||
#define STR_NUM_6144 4
|
||||
#define STR_NUM_7168 1
|
||||
#define STR_NUM_4096 40
|
||||
#define STR_NUM_4352 6
|
||||
#define STR_NUM_4608 6
|
||||
#define STR_NUM_5120 1
|
||||
#define STR_NUM_5376 7
|
||||
#define STR_NUM_5632 7
|
||||
#define STR_NUM_5888 24
|
||||
#define STR_NUM_6144 4
|
||||
#define STR_NUM_7168 1
|
||||
|
||||
#endif /*LANG_UAGE_H*/
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
|
||||
extern const device_t xi8088_device;
|
||||
|
||||
uint8_t xi8088_turbo_get();
|
||||
uint8_t xi8088_turbo_get(void);
|
||||
void xi8088_turbo_set(uint8_t value);
|
||||
void xi8088_bios_128kb_set(int val);
|
||||
int xi8088_bios_128kb();
|
||||
int xi8088_bios_128kb(void);
|
||||
|
||||
#endif /*MACHINE_XI80888_H*/
|
||||
|
||||
@@ -127,7 +127,10 @@
|
||||
#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)
|
||||
|
||||
#define CPU_BLOCK(...) \
|
||||
(const uint8_t[]) { __VA_ARGS__, 0 }
|
||||
(const uint8_t[]) \
|
||||
{ \
|
||||
__VA_ARGS__, 0 \
|
||||
}
|
||||
#define MACHINE_MULTIPLIER_FIXED -1
|
||||
|
||||
#define CPU_BLOCK_NONE 0
|
||||
@@ -337,6 +340,7 @@ extern int machine_get_ram_granularity(int m);
|
||||
extern int machine_get_type(int m);
|
||||
extern void machine_close(void);
|
||||
extern int machine_has_mouse(void);
|
||||
extern int machine_is_sony(void);
|
||||
|
||||
extern uint8_t machine_get_p1(void);
|
||||
extern void machine_load_p1(int m);
|
||||
|
||||
@@ -27,6 +27,6 @@ typedef struct {
|
||||
|
||||
extern machine_status_t machine_status;
|
||||
|
||||
extern void machine_status_init();
|
||||
extern void machine_status_init(void);
|
||||
|
||||
#endif /*EMU_MACHINE_STATUS_H*/
|
||||
@@ -25,13 +25,13 @@ extern char *midi_out_device_get_internal_name(int card);
|
||||
extern char *midi_in_device_get_internal_name(int card);
|
||||
extern int midi_out_device_get_from_internal_name(char *s);
|
||||
extern int midi_in_device_get_from_internal_name(char *s);
|
||||
extern void midi_out_device_init();
|
||||
extern void midi_in_device_init();
|
||||
extern void midi_out_device_init(void);
|
||||
extern void midi_in_device_init(void);
|
||||
|
||||
typedef struct midi_device_t {
|
||||
void (*play_sysex)(uint8_t *sysex, unsigned int len);
|
||||
void (*play_msg)(uint8_t *msg);
|
||||
void (*poll)();
|
||||
void (*poll)(void);
|
||||
int (*write)(uint8_t val);
|
||||
} midi_device_t;
|
||||
|
||||
@@ -60,13 +60,13 @@ extern midi_t *midi_out, *midi_in;
|
||||
|
||||
extern void midi_out_init(midi_device_t *device);
|
||||
extern void midi_in_init(midi_device_t *device, midi_t **mididev);
|
||||
extern void midi_out_close();
|
||||
extern void midi_out_close(void);
|
||||
extern void midi_in_close(void);
|
||||
extern void midi_raw_out_rt_byte(uint8_t val);
|
||||
extern void midi_raw_out_thru_rt_byte(uint8_t val);
|
||||
extern void midi_raw_out_byte(uint8_t val);
|
||||
extern void midi_clear_buffer(void);
|
||||
extern void midi_poll();
|
||||
extern void midi_poll(void);
|
||||
|
||||
extern void midi_in_handler(int set, void (*msg)(void *p, uint8_t *msg, uint32_t len), int (*sysex)(void *p, uint8_t *buffer, uint32_t len, int abort), void *p);
|
||||
extern void midi_in_handlers_clear(void);
|
||||
|
||||
@@ -168,7 +168,7 @@ extern void mo_hard_reset(void);
|
||||
|
||||
extern void mo_reset(scsi_common_t *sc);
|
||||
extern int mo_load(mo_t *dev, char *fn);
|
||||
extern void mo_close();
|
||||
extern void mo_close(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
44
src/include/86box/net_3c501.h
Normal file
44
src/include/86box/net_3c501.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 86Box An emulator of (mostly) x86-based PC systems and devices,
|
||||
* using the ISA, EISA, VLB, MCA, and PCI system buses,
|
||||
* roughly spanning the era between 1981 and 1995.
|
||||
*
|
||||
* This file is part of the 86Box Project.
|
||||
*
|
||||
* Implementation of the following network controller:
|
||||
* - 3Com Etherlink 3c500/3c501 (ISA 8-bit).
|
||||
*
|
||||
*
|
||||
*
|
||||
* Based on @(#)Dev3C501.cpp Oracle (VirtualBox)
|
||||
*
|
||||
* Authors: TheCollector1995, <mariogplayer@gmail.com>
|
||||
* Oracle
|
||||
*
|
||||
* Copyright 2022 TheCollector1995.
|
||||
* Portions Copyright (C) 2022 Oracle and/or its affilitates.
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the:
|
||||
*
|
||||
* Free Software Foundation, Inc.
|
||||
* 59 Temple Place - Suite 330
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
#ifndef NET_3C501_H
|
||||
#define NET_3C501_H
|
||||
|
||||
extern const device_t threec501_device;
|
||||
|
||||
#endif /*NET_3C501_H*/
|
||||
@@ -89,14 +89,14 @@ enum {
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
int device_num;
|
||||
uint16_t device_num;
|
||||
int net_type;
|
||||
char host_dev_name[128];
|
||||
uint32_t link_state;
|
||||
} netcard_conf_t;
|
||||
|
||||
extern netcard_conf_t net_cards_conf[NET_CARD_MAX];
|
||||
extern int net_card_current;
|
||||
extern uint16_t net_card_current;
|
||||
|
||||
typedef int (*NETRXCB)(void *, uint8_t *, int);
|
||||
typedef int (*NETSETLINKSTATE)(void *, uint32_t link_state);
|
||||
@@ -135,7 +135,7 @@ struct _netcard_t {
|
||||
mutex_t *tx_mutex;
|
||||
mutex_t *rx_mutex;
|
||||
pc_timer_t timer;
|
||||
int card_num;
|
||||
uint16_t card_num;
|
||||
double byte_period;
|
||||
uint32_t led_timer;
|
||||
uint32_t led_state;
|
||||
|
||||
@@ -111,7 +111,7 @@ extern int nvr_save(void);
|
||||
|
||||
extern int nvr_is_leap(int year);
|
||||
extern int nvr_get_days(int month, int year);
|
||||
extern void nvr_time_sync();
|
||||
extern void nvr_time_sync(void);
|
||||
extern void nvr_time_get(struct tm *);
|
||||
extern void nvr_time_set(struct tm *);
|
||||
|
||||
|
||||
@@ -22,38 +22,38 @@
|
||||
#ifndef EMU_PCI_H
|
||||
#define EMU_PCI_H
|
||||
|
||||
#define PCI_REG_COMMAND 0x04
|
||||
#define PCI_REG_COMMAND 0x04
|
||||
|
||||
#define PCI_COMMAND_IO 0x01
|
||||
#define PCI_COMMAND_MEM 0x02
|
||||
#define PCI_COMMAND_IO 0x01
|
||||
#define PCI_COMMAND_MEM 0x02
|
||||
|
||||
#define PCI_NO_IRQ_STEERING 0x8000
|
||||
#define PCI_CAN_SWITCH_TYPE 0x10000
|
||||
#define PCI_NO_BRIDGES 0x20000
|
||||
#define PCI_ALWAYS_EXPOSE_DEV0 0x40000
|
||||
#define PCI_NO_IRQ_STEERING 0x8000
|
||||
#define PCI_CAN_SWITCH_TYPE 0x10000
|
||||
#define PCI_NO_BRIDGES 0x20000
|
||||
#define PCI_ALWAYS_EXPOSE_DEV0 0x40000
|
||||
|
||||
#define PCI_CONFIG_TYPE_1 1
|
||||
#define PCI_CONFIG_TYPE_2 2
|
||||
#define PCI_CONFIG_TYPE_1 1
|
||||
#define PCI_CONFIG_TYPE_2 2
|
||||
|
||||
#define PCI_CONFIG_TYPE_MASK 0x7fff
|
||||
#define PCI_CONFIG_TYPE_MASK 0x7fff
|
||||
|
||||
#define PCI_INTA 1
|
||||
#define PCI_INTB 2
|
||||
#define PCI_INTC 3
|
||||
#define PCI_INTD 4
|
||||
#define PCI_INTA 1
|
||||
#define PCI_INTB 2
|
||||
#define PCI_INTC 3
|
||||
#define PCI_INTD 4
|
||||
|
||||
#define PCI_MIRQ0 0
|
||||
#define PCI_MIRQ1 1
|
||||
#define PCI_MIRQ2 2
|
||||
#define PCI_MIRQ3 3
|
||||
#define PCI_MIRQ4 4
|
||||
#define PCI_MIRQ5 5
|
||||
#define PCI_MIRQ6 6
|
||||
#define PCI_MIRQ7 7
|
||||
#define PCI_MIRQ0 0
|
||||
#define PCI_MIRQ1 1
|
||||
#define PCI_MIRQ2 2
|
||||
#define PCI_MIRQ3 3
|
||||
#define PCI_MIRQ4 4
|
||||
#define PCI_MIRQ5 5
|
||||
#define PCI_MIRQ6 6
|
||||
#define PCI_MIRQ7 7
|
||||
|
||||
#define PCI_IRQ_DISABLED -1
|
||||
#define PCI_IRQ_DISABLED -1
|
||||
|
||||
#define PCI_ADD_STRICT 0x80
|
||||
#define PCI_ADD_STRICT 0x80
|
||||
|
||||
enum {
|
||||
PCI_CARD_NORTHBRIDGE = 0,
|
||||
@@ -113,7 +113,7 @@ extern uint8_t pci_get_int(uint8_t card, uint8_t pci_int);
|
||||
|
||||
extern void pci_reset(void);
|
||||
extern void pci_init(int type);
|
||||
extern uint8_t pci_register_bus();
|
||||
extern uint8_t pci_register_bus(void);
|
||||
extern void pci_set_pmc(uint8_t pmc);
|
||||
extern void pci_remap_bus(uint8_t bus_index, uint8_t bus_number);
|
||||
extern void pci_relocate_slot(int type, int new_slot);
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Define the various platform support functions.
|
||||
* Define the various platform support functions.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
* Copyright 2021 Laci bá'
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
* Copyright 2021 Laci bá'
|
||||
*/
|
||||
|
||||
#ifndef EMU_PLAT_H
|
||||
@@ -49,7 +49,7 @@ 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
|
||||
@@ -107,7 +107,7 @@ extern int plat_chdir(char *path);
|
||||
extern void plat_tempfile(char *bufp, char *prefix, char *suffix);
|
||||
extern void plat_get_exe_name(char *s, int size);
|
||||
extern void plat_get_global_config_dir(char* strptr);
|
||||
extern void plat_init_rom_paths();
|
||||
extern void plat_init_rom_paths(void);
|
||||
extern int plat_dir_check(char *path);
|
||||
extern int plat_dir_create(char *path);
|
||||
extern void *plat_mmap(size_t size, uint8_t executable);
|
||||
|
||||
@@ -19,24 +19,24 @@
|
||||
|
||||
/* Windows needs the POSIX re-implementations */
|
||||
#if defined(_WIN32)
|
||||
#ifdef _MAX_FNAME
|
||||
# define MAXNAMLEN _MAX_FNAME
|
||||
#else
|
||||
# define MAXNAMLEN 15
|
||||
#endif
|
||||
#define MAXDIRLEN 127
|
||||
# ifdef _MAX_FNAME
|
||||
# define MAXNAMLEN _MAX_FNAME
|
||||
# else
|
||||
# define MAXNAMLEN 15
|
||||
# endif
|
||||
# define MAXDIRLEN 127
|
||||
|
||||
struct dirent {
|
||||
long d_ino;
|
||||
unsigned short d_reclen;
|
||||
unsigned short d_off;
|
||||
#ifdef UNICODE
|
||||
# ifdef UNICODE
|
||||
wchar_t d_name[MAXNAMLEN + 1];
|
||||
#else
|
||||
# else
|
||||
char d_name[MAXNAMLEN + 1];
|
||||
#endif
|
||||
# endif
|
||||
};
|
||||
#define d_namlen d_reclen
|
||||
# define d_namlen d_reclen
|
||||
|
||||
typedef struct {
|
||||
short flags; /* internal flags */
|
||||
@@ -44,18 +44,18 @@ typedef struct {
|
||||
long handle; /* open handle to Win32 system */
|
||||
short sts; /* last known status code */
|
||||
char *dta; /* internal work data */
|
||||
#ifdef UNICODE
|
||||
# ifdef UNICODE
|
||||
wchar_t dir[MAXDIRLEN + 1]; /* open dir */
|
||||
#else
|
||||
# else
|
||||
char dir[MAXDIRLEN + 1]; /* open dir */
|
||||
#endif
|
||||
# endif
|
||||
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 *);
|
||||
@@ -64,11 +64,10 @@ extern long telldir(DIR *);
|
||||
extern void seekdir(DIR *, long);
|
||||
extern int closedir(DIR *);
|
||||
|
||||
#define rewinddir(dirp) seekdir(dirp, 0L)
|
||||
# define rewinddir(dirp) seekdir(dirp, 0L)
|
||||
#else
|
||||
/* On linux and macOS, use the standard functions and types */
|
||||
#include <sys/dir.h>
|
||||
# include <sys/dir.h>
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*PLAT_DIR_H*/
|
||||
|
||||
@@ -71,87 +71,90 @@
|
||||
#define IDT_MEMORY 1714 /* Memory: */
|
||||
|
||||
/* DLG_CFG_VIDEO */
|
||||
#define IDT_VIDEO 1715 /* Video: */
|
||||
#define IDT_VIDEO 1715 /* Video: */
|
||||
#define IDT_VIDEO_2 1716 /* Video 2: */
|
||||
|
||||
/* DLG_CFG_INPUT */
|
||||
#define IDT_MOUSE 1716 /* Mouse: */
|
||||
#define IDT_JOYSTICK 1717 /* Joystick: */
|
||||
#define IDT_MOUSE 1717 /* Mouse: */
|
||||
#define IDT_JOYSTICK 1718 /* Joystick: */
|
||||
|
||||
/* DLG_CFG_SOUND */
|
||||
#define IDT_SOUND 1718 /* Sound card: */
|
||||
#define IDT_MIDI_OUT 1719 /* MIDI Out Device: */
|
||||
#define IDT_MIDI_IN 1720 /* MIDI In Device: */
|
||||
#define IDT_SOUND 1719 /* Sound card: */
|
||||
#define IDT_MIDI_OUT 1720 /* MIDI Out Device: */
|
||||
#define IDT_MIDI_IN 1721 /* MIDI In Device: */
|
||||
|
||||
/* DLG_CFG_NETWORK */
|
||||
#define IDT_NET_TYPE 1721 /* Network type: */
|
||||
#define IDT_PCAP 1722 /* PCap device: */
|
||||
#define IDT_NET 1723 /* Network adapter: */
|
||||
#define IDT_NET_TYPE 1722 /* Network type: */
|
||||
#define IDT_PCAP 1723 /* PCap device: */
|
||||
#define IDT_NET 1724 /* Network adapter: */
|
||||
|
||||
/* DLG_CFG_PORTS */
|
||||
#define IDT_COM1 1724 /* COM1 Device: */
|
||||
#define IDT_COM2 1725 /* COM1 Device: */
|
||||
#define IDT_COM3 1726 /* COM1 Device: */
|
||||
#define IDT_COM4 1727 /* COM1 Device: */
|
||||
#define IDT_COM1 1725 /* COM1 Device: */
|
||||
#define IDT_COM2 1726 /* COM1 Device: */
|
||||
#define IDT_COM3 1727 /* COM1 Device: */
|
||||
#define IDT_COM4 1728 /* COM1 Device: */
|
||||
|
||||
#define IDT_LPT1 1728 /* LPT1 Device: */
|
||||
#define IDT_LPT2 1729 /* LPT2 Device: */
|
||||
#define IDT_LPT3 1730 /* LPT3 Device: */
|
||||
#define IDT_LPT4 1731 /* LPT4 Device: */
|
||||
#define IDT_LPT1 1729 /* LPT1 Device: */
|
||||
#define IDT_LPT2 1730 /* LPT2 Device: */
|
||||
#define IDT_LPT3 1731 /* LPT3 Device: */
|
||||
#define IDT_LPT4 1732 /* LPT4 Device: */
|
||||
|
||||
/* DLG_CFG_STORAGE */
|
||||
#define IDT_HDC 1732 /* HD Controller: */
|
||||
#define IDT_FDC 1733 /* Ext FD Controller: */
|
||||
#define IDT_SCSI_1 1734 /* SCSI Board #1: */
|
||||
#define IDT_SCSI_2 1735 /* SCSI Board #2: */
|
||||
#define IDT_SCSI_3 1736 /* SCSI Board #3: */
|
||||
#define IDT_SCSI_4 1737 /* SCSI Board #4: */
|
||||
#define IDT_HDC 1733 /* HD Controller: */
|
||||
#define IDT_FDC 1734 /* Ext FD Controller: */
|
||||
#define IDT_SCSI_1 1735 /* SCSI Board #1: */
|
||||
#define IDT_SCSI_2 1736 /* SCSI Board #2: */
|
||||
#define IDT_SCSI_3 1737 /* SCSI Board #3: */
|
||||
#define IDT_SCSI_4 1738 /* SCSI Board #4: */
|
||||
|
||||
/* DLG_CFG_HARD_DISKS */
|
||||
#define IDT_HDD 1738 /* Hard disks: */
|
||||
#define IDT_BUS 1739 /* Bus: */
|
||||
#define IDT_CHANNEL 1740 /* Channel: */
|
||||
#define IDT_ID 1741 /* ID: */
|
||||
#define IDT_LUN 1742 /* LUN: */
|
||||
#define IDT_HDD 1739 /* Hard disks: */
|
||||
#define IDT_BUS 1740 /* Bus: */
|
||||
#define IDT_CHANNEL 1741 /* Channel: */
|
||||
#define IDT_ID 1742 /* ID: */
|
||||
#define IDT_LUN 1743 /* LUN: */
|
||||
#define IDT_SPEED 1744 /* Speed: */
|
||||
|
||||
/* DLG_CFG_HARD_DISKS_ADD */
|
||||
#define IDT_SECTORS 1743 /* Sectors: */
|
||||
#define IDT_HEADS 1744 /* Heads: */
|
||||
#define IDT_CYLS 1745 /* Cylinders: */
|
||||
#define IDT_SIZE_MB 1746 /* Size (MB): */
|
||||
#define IDT_TYPE 1747 /* Type: */
|
||||
#define IDT_FILE_NAME 1748 /* File name: */
|
||||
#define IDT_IMG_FORMAT 1749 /* Image Format: */
|
||||
#define IDT_BLOCK_SIZE 1750 /* Block Size: */
|
||||
#define IDT_PROGRESS 1751 /* Progress: */
|
||||
#define IDT_SECTORS 1745 /* Sectors: */
|
||||
#define IDT_HEADS 1746 /* Heads: */
|
||||
#define IDT_CYLS 1747 /* Cylinders: */
|
||||
#define IDT_SIZE_MB 1748 /* Size (MB): */
|
||||
#define IDT_TYPE 1749 /* Type: */
|
||||
#define IDT_FILE_NAME 1750 /* File name: */
|
||||
#define IDT_IMG_FORMAT 1751 /* Image Format: */
|
||||
#define IDT_BLOCK_SIZE 1752 /* Block Size: */
|
||||
#define IDT_PROGRESS 1753 /* Progress: */
|
||||
|
||||
/* DLG_CFG_FLOPPY_AND_CDROM_DRIVES */
|
||||
#define IDT_FLOPPY_DRIVES 1752 /* Floppy drives: */
|
||||
#define IDT_FDD_TYPE 1753 /* Type: */
|
||||
#define IDT_CD_DRIVES 1754 /* CD-ROM drives: */
|
||||
#define IDT_CD_BUS 1755 /* Bus: */
|
||||
#define IDT_CD_ID 1756 /* ID: */
|
||||
#define IDT_CD_CHANNEL 1757 /* Channel: */
|
||||
#define IDT_CD_SPEED 1758 /* Speed: */
|
||||
#define IDT_FLOPPY_DRIVES 1754 /* Floppy drives: */
|
||||
#define IDT_FDD_TYPE 1755 /* Type: */
|
||||
#define IDT_CD_DRIVES 1756 /* CD-ROM drives: */
|
||||
#define IDT_CD_BUS 1757 /* Bus: */
|
||||
#define IDT_CD_ID 1758 /* ID: */
|
||||
#define IDT_CD_LUN 1759 /* LUN: */
|
||||
#define IDT_CD_CHANNEL 1760 /* Channel: */
|
||||
#define IDT_CD_SPEED 1761 /* Speed: */
|
||||
|
||||
/* DLG_CFG_OTHER_REMOVABLE_DEVICES */
|
||||
#define IDT_MO_DRIVES 1760 /* MO drives: */
|
||||
#define IDT_MO_BUS 1761 /* Bus: */
|
||||
#define IDT_MO_ID 1762 /* ID: */
|
||||
#define IDT_MO_CHANNEL 1763 /* Channel */
|
||||
#define IDT_MO_TYPE 1764 /* Type: */
|
||||
#define IDT_MO_DRIVES 1762 /* MO drives: */
|
||||
#define IDT_MO_BUS 1763 /* Bus: */
|
||||
#define IDT_MO_ID 1764 /* ID: */
|
||||
#define IDT_MO_CHANNEL 1765 /* Channel */
|
||||
#define IDT_MO_TYPE 1766 /* Type: */
|
||||
|
||||
#define IDT_ZIP_DRIVES 1765 /* ZIP drives: */
|
||||
#define IDT_ZIP_BUS 1766 /* Bus: */
|
||||
#define IDT_ZIP_ID 1767 /* ID: */
|
||||
#define IDT_ZIP_LUN 1768 /* LUN: */
|
||||
#define IDT_ZIP_CHANNEL 1769 /* Channel: */
|
||||
#define IDT_ZIP_DRIVES 1767 /* ZIP drives: */
|
||||
#define IDT_ZIP_BUS 1768 /* Bus: */
|
||||
#define IDT_ZIP_ID 1769 /* ID: */
|
||||
#define IDT_ZIP_LUN 1770 /* LUN: */
|
||||
#define IDT_ZIP_CHANNEL 1771 /* Channel: */
|
||||
|
||||
/* DLG_CFG_PERIPHERALS */
|
||||
#define IDT_ISARTC 1770 /* ISA RTC: */
|
||||
#define IDT_ISAMEM_1 1771 /* ISAMEM Board #1: */
|
||||
#define IDT_ISAMEM_2 1772 /* ISAMEM Board #2: */
|
||||
#define IDT_ISAMEM_3 1773 /* ISAMEM Board #3: */
|
||||
#define IDT_ISAMEM_4 1774 /* ISAMEM Board #4: */
|
||||
#define IDT_ISARTC 1772 /* ISA RTC: */
|
||||
#define IDT_ISAMEM_1 1773 /* ISAMEM Board #1: */
|
||||
#define IDT_ISAMEM_2 1774 /* ISAMEM Board #2: */
|
||||
#define IDT_ISAMEM_3 1775 /* ISAMEM Board #3: */
|
||||
#define IDT_ISAMEM_4 1776 /* ISAMEM Board #4: */
|
||||
|
||||
/*
|
||||
* To try to keep these organized, we now group the
|
||||
@@ -181,11 +184,13 @@
|
||||
|
||||
#define IDC_VIDEO 1020 /* video config */
|
||||
#define IDC_COMBO_VIDEO 1021
|
||||
#define IDC_CHECK_VOODOO 1022
|
||||
#define IDC_BUTTON_VOODOO 1023
|
||||
#define IDC_CHECK_IBM8514 1024
|
||||
#define IDC_CHECK_XGA 1025
|
||||
#define IDC_BUTTON_XGA 1026
|
||||
#define IDC_VIDEO_2 1022
|
||||
#define IDC_COMBO_VIDEO_2 1023
|
||||
#define IDC_CHECK_VOODOO 1024
|
||||
#define IDC_BUTTON_VOODOO 1025
|
||||
#define IDC_CHECK_IBM8514 1026
|
||||
#define IDC_CHECK_XGA 1027
|
||||
#define IDC_BUTTON_XGA 1028
|
||||
|
||||
#define IDC_INPUT 1030 /* input config */
|
||||
#define IDC_COMBO_MOUSE 1031
|
||||
@@ -323,19 +328,20 @@
|
||||
/* For the DeviceConfig code, re-do later. */
|
||||
#define IDC_CONFIG_BASE 1300
|
||||
#define IDC_CONFIGURE_VID 1300
|
||||
#define IDC_CONFIGURE_SND 1301
|
||||
#define IDC_CONFIGURE_VOODOO 1302
|
||||
#define IDC_CONFIGURE_MOD 1303
|
||||
#define IDC_CONFIGURE_NET_TYPE 1304
|
||||
#define IDC_CONFIGURE_BUSLOGIC 1305
|
||||
#define IDC_CONFIGURE_PCAP 1306
|
||||
#define IDC_CONFIGURE_NET 1307
|
||||
#define IDC_CONFIGURE_MIDI_OUT 1308
|
||||
#define IDC_CONFIGURE_MIDI_IN 1309
|
||||
#define IDC_JOY1 1310
|
||||
#define IDC_JOY2 1311
|
||||
#define IDC_JOY3 1312
|
||||
#define IDC_JOY4 1313
|
||||
#define IDC_CONFIGURE_VID_2 1301
|
||||
#define IDC_CONFIGURE_SND 1302
|
||||
#define IDC_CONFIGURE_VOODOO 1303
|
||||
#define IDC_CONFIGURE_MOD 1304
|
||||
#define IDC_CONFIGURE_NET_TYPE 1305
|
||||
#define IDC_CONFIGURE_BUSLOGIC 1306
|
||||
#define IDC_CONFIGURE_PCAP 1307
|
||||
#define IDC_CONFIGURE_NET 1308
|
||||
#define IDC_CONFIGURE_MIDI_OUT 1309
|
||||
#define IDC_CONFIGURE_MIDI_IN 1310
|
||||
#define IDC_JOY1 1311
|
||||
#define IDC_JOY2 1312
|
||||
#define IDC_JOY3 1313
|
||||
#define IDC_JOY4 1314
|
||||
#define IDC_HDTYPE 1380
|
||||
#define IDC_RENDER 1381
|
||||
#define IDC_STATUS 1382
|
||||
@@ -366,8 +372,9 @@
|
||||
#define IDM_VID_HIDE_TOOLBAR 40023
|
||||
#define IDM_UPDATE_ICONS 40030
|
||||
#define IDM_SND_GAIN 40031
|
||||
#define IDM_VID_RESIZE 40040
|
||||
#define IDM_VID_REMEMBER 40041
|
||||
#define IDM_VID_MONITORS 40040
|
||||
#define IDM_VID_RESIZE 40041
|
||||
#define IDM_VID_REMEMBER 40042
|
||||
#define IDM_VID_SDL_SW 40050
|
||||
#define IDM_VID_SDL_HW 40051
|
||||
#define IDM_VID_SDL_OPENGL 40052
|
||||
|
||||
@@ -51,38 +51,38 @@ extern uint8_t rom_read(uint32_t addr, void *p);
|
||||
extern uint16_t rom_readw(uint32_t addr, void *p);
|
||||
extern uint32_t rom_readl(uint32_t addr, void *p);
|
||||
|
||||
extern FILE *rom_fopen(char *fn, char *mode);
|
||||
extern FILE *rom_fopen(const char *fn, char *mode);
|
||||
extern int rom_getfile(char *fn, char *s, int size);
|
||||
extern int rom_present(char *fn);
|
||||
|
||||
extern int rom_load_linear_oddeven(char *fn, uint32_t addr, int sz,
|
||||
extern int rom_load_linear_oddeven(const char *fn, uint32_t addr, int sz,
|
||||
int off, uint8_t *ptr);
|
||||
extern int rom_load_linear(char *fn, uint32_t addr, int sz,
|
||||
extern int rom_load_linear(const char *fn, uint32_t addr, int sz,
|
||||
int off, uint8_t *ptr);
|
||||
extern int rom_load_interleaved(char *fnl, char *fnh, uint32_t addr,
|
||||
extern int rom_load_interleaved(const char *fnl, const char *fnh, uint32_t addr,
|
||||
int sz, int off, uint8_t *ptr);
|
||||
|
||||
extern uint8_t bios_read(uint32_t addr, void *priv);
|
||||
extern uint16_t bios_readw(uint32_t addr, void *priv);
|
||||
extern uint32_t bios_readl(uint32_t addr, void *priv);
|
||||
|
||||
extern int bios_load(char *fn1, char *fn2, uint32_t addr, int sz,
|
||||
extern int bios_load(const char *fn1, const char *fn2, uint32_t addr, int sz,
|
||||
int off, int flags);
|
||||
extern int bios_load_linear_combined(char *fn1, char *fn2,
|
||||
extern int bios_load_linear_combined(const char *fn1, const char *fn2,
|
||||
int sz, int off);
|
||||
extern int bios_load_linear_combined2(char *fn1, char *fn2,
|
||||
char *fn3, char *fn4, char *fn5,
|
||||
extern int bios_load_linear_combined2(const char *fn1, const char *fn2,
|
||||
const char *fn3, const char *fn4, const char *fn5,
|
||||
int sz, int off);
|
||||
extern int bios_load_linear_combined2_ex(char *fn1, char *fn2,
|
||||
char *fn3, char *fn4, char *fn5,
|
||||
extern int bios_load_linear_combined2_ex(const char *fn1, const char *fn2,
|
||||
const char *fn3, const char *fn4, const char *fn5,
|
||||
int sz, int off);
|
||||
|
||||
extern int rom_init(rom_t *rom, char *fn, uint32_t address, int size,
|
||||
extern int rom_init(rom_t *rom, const char *fn, uint32_t address, int size,
|
||||
int mask, int file_offset, uint32_t flags);
|
||||
extern int rom_init_oddeven(rom_t *rom, char *fn, uint32_t address, int size,
|
||||
extern int rom_init_oddeven(rom_t *rom, const char *fn, uint32_t address, int size,
|
||||
int mask, int file_offset, uint32_t flags);
|
||||
extern int rom_init_interleaved(rom_t *rom, char *fn_low,
|
||||
char *fn_high, uint32_t address,
|
||||
extern int rom_init_interleaved(rom_t *rom, const char *fn_low,
|
||||
const char *fn_high, uint32_t address,
|
||||
int size, int mask, int file_offset,
|
||||
uint32_t flags);
|
||||
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
* 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 NS8250/16450/16550/16650/16750/16850/16950
|
||||
* UART emulation.
|
||||
* Definitions for the NS8250/16450/16550/16650/16750/16850/16950
|
||||
* UART emulation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Author: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.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 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2008-2020 Sarah Walker.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
#ifndef EMU_SERIAL_H
|
||||
|
||||
@@ -66,6 +66,7 @@ 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_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_init(ad1848_t *ad1848, uint8_t type);
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ enum fm_type {
|
||||
FM_YM3812 = 0,
|
||||
FM_YMF262,
|
||||
FM_YMF289B,
|
||||
FM_YMF278B,
|
||||
FM_MAX
|
||||
};
|
||||
|
||||
@@ -51,6 +52,7 @@ extern const device_t ymf262_nuked_device;
|
||||
extern const device_t ym3812_ymfm_device;
|
||||
extern const device_t ymf262_ymfm_device;
|
||||
extern const device_t ymf289b_ymfm_device;
|
||||
extern const device_t ymf278b_ymfm_device;
|
||||
#endif
|
||||
|
||||
#endif /*SOUND_OPL_H*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void *sid_init();
|
||||
void *sid_init(void);
|
||||
void sid_close(void *p);
|
||||
void sid_reset(void *p);
|
||||
uint8_t sid_read(uint16_t addr, void *p);
|
||||
|
||||
@@ -147,6 +147,9 @@ typedef struct sb_t {
|
||||
pnp_rom[512];
|
||||
|
||||
uint16_t opl_pnp_addr;
|
||||
|
||||
void *opl_mixer;
|
||||
void (*opl_mix)(void*, double*, double*);
|
||||
} sb_t;
|
||||
|
||||
extern void sb_ct1345_mixer_write(uint16_t addr, uint8_t val, void *p);
|
||||
|
||||
@@ -25,7 +25,7 @@ extern int speaker_mute;
|
||||
extern int speaker_gated;
|
||||
extern int speaker_enable, was_speaker_enable;
|
||||
|
||||
extern void speaker_init();
|
||||
extern void speaker_init(void);
|
||||
|
||||
extern void speaker_set_count(uint8_t new_m, int new_count);
|
||||
extern void speaker_update(void);
|
||||
|
||||
@@ -81,6 +81,7 @@ extern const device_t adgold_device;
|
||||
/* Aztech Sound Galaxy 16 */
|
||||
extern const device_t azt2316a_device;
|
||||
extern const device_t acermagic_s20_device;
|
||||
extern const device_t mirosound_pcm10_device;
|
||||
extern const device_t azt1605_device;
|
||||
|
||||
/* Ensoniq AudioPCI */
|
||||
|
||||
@@ -68,8 +68,8 @@ void cga_poll(void *p);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_config_t cga_config[];
|
||||
|
||||
extern const device_t cga_device;
|
||||
extern const device_t cga_pravetz_device;
|
||||
extern const device_t cga_device;
|
||||
extern const device_t cga_pravetz_device;
|
||||
#endif
|
||||
|
||||
#endif /*VIDEO_CGA_H*/
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#define Bit8u uint8_t
|
||||
#define Bit32u uint32_t
|
||||
#define Bitu unsigned int
|
||||
#define bool uint8_t
|
||||
#define bool uint8_t
|
||||
|
||||
void update_cga16_color(uint8_t cgamode);
|
||||
void cga_comp_init(int revision);
|
||||
|
||||
@@ -42,7 +42,7 @@ void nga_write(uint32_t addr, uint8_t val, void *priv);
|
||||
uint8_t nga_read(uint32_t addr, void *priv);
|
||||
void nga_poll(void *priv);
|
||||
void nga_close(void *priv);
|
||||
void nga_mdaattr_rebuild();
|
||||
void nga_mdaattr_rebuild(void);
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_config_t nga_config[];
|
||||
|
||||
@@ -42,7 +42,7 @@ void ogc_write(uint32_t addr, uint8_t val, void *priv);
|
||||
uint8_t ogc_read(uint32_t addr, void *priv);
|
||||
void ogc_poll(void *priv);
|
||||
void ogc_close(void *priv);
|
||||
void ogc_mdaattr_rebuild();
|
||||
void ogc_mdaattr_rebuild(void);
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_config_t ogc_config[];
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Generic SVGA handling.
|
||||
* Generic SVGA handling.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2008-2020 Sarah Walker.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2008-2020 Sarah Walker.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#include <86box/thread.h>
|
||||
@@ -211,7 +211,7 @@ extern uint8_t svga_rotate[8][256];
|
||||
void svga_out(uint16_t addr, uint8_t val, void *p);
|
||||
uint8_t svga_in(uint16_t addr, void *p);
|
||||
|
||||
svga_t *svga_get_pri();
|
||||
svga_t *svga_get_pri(void);
|
||||
void svga_set_override(svga_t *svga, int val);
|
||||
|
||||
void svga_set_ramdac_type(svga_t *svga, int type);
|
||||
|
||||
@@ -2075,12 +2075,12 @@ voodoo_generate(uint8_t *code_block, voodoo_t *voodoo, voodoo_params_t *params,
|
||||
addbyte(0x05);
|
||||
addlong((uint32_t) &xmm_ff_b);
|
||||
}
|
||||
//#if 0
|
||||
// addbyte(0x66); /*MOVD state->out[EDI], XMM0*/
|
||||
// addbyte(0x0f);
|
||||
// addbyte(0x7e);
|
||||
// addbyte(0x87);
|
||||
// addlong(offsetof(voodoo_state_t, out));
|
||||
// #if 0
|
||||
// addbyte(0x66); /*MOVD state->out[EDI], XMM0*/
|
||||
// addbyte(0x0f);
|
||||
// addbyte(0x7e);
|
||||
// addbyte(0x87);
|
||||
// addlong(offsetof(voodoo_state_t, out));
|
||||
if (params->fogMode & FOG_ENABLE) {
|
||||
if (params->fogMode & FOG_CONSTANT) {
|
||||
addbyte(0x66); /*MOVD XMM3, params->fogColor[ESI]*/
|
||||
@@ -2695,7 +2695,7 @@ voodoo_generate(uint8_t *code_block, voodoo_t *voodoo, voodoo_params_t *params,
|
||||
addbyte(0x67);
|
||||
addbyte(0xc0);
|
||||
}
|
||||
//#endif
|
||||
// #endif
|
||||
|
||||
// addbyte(0x8b); /*MOV EDX, x (ESP+12)*/
|
||||
// addbyte(0x54);
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
#define TEX_CACHE_MAX 64
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <atomic>
|
||||
# include <atomic>
|
||||
using atomic_int = std::atomic<int>;
|
||||
#else
|
||||
#include <stdatomic.h>
|
||||
# include <stdatomic.h>
|
||||
#endif
|
||||
|
||||
enum {
|
||||
@@ -320,7 +320,7 @@ typedef struct voodoo_t {
|
||||
uint32_t cmdfifo_amin, cmdfifo_amax;
|
||||
int cmdfifo_holecount;
|
||||
|
||||
atomic_uint cmd_status;
|
||||
atomic_uint cmd_status;
|
||||
|
||||
uint32_t sSetupMode;
|
||||
vert_t verts[4];
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
#ifndef VIDEO_VOODOO_DITHER_H
|
||||
# define VIDEO_VOODOO_DITHER_H
|
||||
#define VIDEO_VOODOO_DITHER_H
|
||||
|
||||
static const uint8_t dither_rb[256][4][4] =
|
||||
{
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
* IBM XGA emulation.
|
||||
* IBM XGA emulation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: TheCollector1995.
|
||||
* Authors: TheCollector1995.
|
||||
*
|
||||
* Copyright 2022 TheCollector1995.
|
||||
* Copyright 2022 TheCollector1995.
|
||||
*/
|
||||
|
||||
#ifndef VIDEO_XGA_H
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
* IBM XGA emulation.
|
||||
* IBM XGA emulation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: TheCollector1995.
|
||||
* Authors: TheCollector1995.
|
||||
*
|
||||
* Copyright 2022 TheCollector1995.
|
||||
* Copyright 2022 TheCollector1995.
|
||||
*/
|
||||
|
||||
#ifndef VIDEO_XGA_DEVICE_H
|
||||
|
||||
@@ -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.
|
||||
@@ -520,12 +520,20 @@ extern const device_t ps1vga_mca_device;
|
||||
extern const device_t voodoo_device;
|
||||
extern const device_t voodoo_banshee_device;
|
||||
extern const device_t creative_voodoo_banshee_device;
|
||||
extern const device_t voodoo_3_1000_device;
|
||||
extern const device_t voodoo_3_1000_agp_device;
|
||||
extern const device_t voodoo_3_2000_device;
|
||||
extern const device_t voodoo_3_2000_agp_device;
|
||||
extern const device_t voodoo_3_2000_agp_onboard_8m_device;
|
||||
extern const device_t voodoo_3_3000_device;
|
||||
extern const device_t voodoo_3_3000_agp_device;
|
||||
extern const device_t voodoo_3_3500_agp_ntsc_device;
|
||||
extern const device_t voodoo_3_3500_agp_pal_device;
|
||||
extern const device_t compaq_voodoo_3_3500_agp_device;
|
||||
extern const device_t voodoo_3_3500_se_agp_device;
|
||||
extern const device_t voodoo_3_3500_si_agp_device;
|
||||
extern const device_t velocity_100_agp_device;
|
||||
extern const device_t velocity_200_agp_device;
|
||||
|
||||
/* Wyse 700 */
|
||||
extern const device_t wy700_device;
|
||||
|
||||
@@ -104,7 +104,8 @@ extern "C" {
|
||||
|
||||
extern HINSTANCE hinstance;
|
||||
extern HWND hwndMain,
|
||||
hwndRender;
|
||||
hwndRender,
|
||||
hwndRender2;
|
||||
extern HANDLE ghMutex;
|
||||
extern HICON hIcon[256];
|
||||
extern int dpi;
|
||||
@@ -147,9 +148,9 @@ extern int win_get_system_metrics(int i, int dpi);
|
||||
|
||||
extern LPARAM win_get_string(int id);
|
||||
|
||||
extern void win_clear_icon_set();
|
||||
extern void win_system_icon_set();
|
||||
extern void win_load_icon_set();
|
||||
extern void win_clear_icon_set(void);
|
||||
extern void win_system_icon_set(void);
|
||||
extern void win_load_icon_set(void);
|
||||
extern void win_get_icons_path(char *path_root);
|
||||
|
||||
extern intptr_t fdd_type_to_icon(int type);
|
||||
@@ -208,7 +209,7 @@ extern int MediaMenuHandler(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar
|
||||
/* Functions in win_toolbar.c */
|
||||
extern HWND hwndRebar;
|
||||
extern void ToolBarCreate(HWND hwndParent, HINSTANCE hInst);
|
||||
extern void ToolBarLoadIcons();
|
||||
extern void ToolBarLoadIcons(void);
|
||||
extern void ToolBarUpdatePause(int paused);
|
||||
|
||||
/* Functions in win_dialog.c: */
|
||||
@@ -222,8 +223,8 @@ extern int file_dlg_st(HWND hwnd, int i, char *fn, char *title, int save);
|
||||
extern wchar_t *BrowseFolder(wchar_t *saved_path, wchar_t *title);
|
||||
|
||||
/* Functions in win_media_menu.c */
|
||||
extern void media_menu_init();
|
||||
extern void media_menu_reset();
|
||||
extern void media_menu_init(void);
|
||||
extern void media_menu_reset(void);
|
||||
extern int media_menu_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
extern HMENU media_menu_get_cassette(void);
|
||||
extern HMENU media_menu_get_cartridge(int id);
|
||||
@@ -240,7 +241,7 @@ extern void media_menu_update_mo(int id);
|
||||
|
||||
/* Functions in win_ui.c */
|
||||
extern HMENU menuMain;
|
||||
extern void ResetAllMenus();
|
||||
extern void ResetAllMenus(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
#include <glad/glad.h>
|
||||
|
||||
GLuint load_custom_shaders(const char *path);
|
||||
GLuint load_default_shaders();
|
||||
GLuint load_default_shaders(void);
|
||||
|
||||
#endif /*!WIN_OPENGL_GLSLP_H*/
|
||||
|
||||
@@ -113,7 +113,7 @@ extern void zip_hard_reset(void);
|
||||
|
||||
extern void zip_reset(scsi_common_t *sc);
|
||||
extern int zip_load(zip_t *dev, char *fn);
|
||||
extern void zip_close();
|
||||
extern void zip_close(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifndef __FDI2RAW_H
|
||||
#define __FDI2RAW_H
|
||||
|
||||
#define uae_u8 uint8_t
|
||||
#define uae_u8 uint8_t
|
||||
#define uae_u16 uint16_t
|
||||
#define uae_u32 uint32_t
|
||||
|
||||
@@ -32,20 +32,20 @@ typedef struct fdi FDI;
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int fdi2raw_loadtrack (FDI*, uae_u16 *mfmbuf, uae_u16 *tracktiming, int track, int *tracklength, int *indexoffset, int *multirev, int mfm);
|
||||
extern int fdi2raw_loadtrack(FDI *, uae_u16 *mfmbuf, uae_u16 *tracktiming, int track, int *tracklength, int *indexoffset, int *multirev, int mfm);
|
||||
|
||||
extern int fdi2raw_loadrevolution (FDI*, uae_u16 *mfmbuf, uae_u16 *tracktiming, int track, int *tracklength, int mfm);
|
||||
extern int fdi2raw_loadrevolution(FDI *, uae_u16 *mfmbuf, uae_u16 *tracktiming, int track, int *tracklength, int mfm);
|
||||
|
||||
extern FDI *fdi2raw_header(FILE *f);
|
||||
extern void fdi2raw_header_free (FDI *);
|
||||
extern int fdi2raw_get_last_track(FDI *);
|
||||
extern int fdi2raw_get_num_sector (FDI *);
|
||||
extern int fdi2raw_get_last_head(FDI *);
|
||||
extern int fdi2raw_get_type (FDI *);
|
||||
extern int fdi2raw_get_bit_rate (FDI *);
|
||||
extern int fdi2raw_get_rotation (FDI *);
|
||||
extern int fdi2raw_get_write_protect (FDI *);
|
||||
extern int fdi2raw_get_tpi (FDI *);
|
||||
extern void fdi2raw_header_free(FDI *);
|
||||
extern int fdi2raw_get_last_track(FDI *);
|
||||
extern int fdi2raw_get_num_sector(FDI *);
|
||||
extern int fdi2raw_get_last_head(FDI *);
|
||||
extern int fdi2raw_get_type(FDI *);
|
||||
extern int fdi2raw_get_bit_rate(FDI *);
|
||||
extern int fdi2raw_get_rotation(FDI *);
|
||||
extern int fdi2raw_get_write_protect(FDI *);
|
||||
extern int fdi2raw_get_tpi(FDI *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -1,115 +1,113 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Minimal reimplementation of GLib for libslirp.
|
||||
* Minimal reimplementation of GLib for libslirp.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Author: RichardG, <richardg867@gmail.com>
|
||||
* Authors: RichardG, <richardg867@gmail.com>
|
||||
*
|
||||
* Copyright 2020 RichardG.
|
||||
* Copyright 2020 RichardG.
|
||||
*/
|
||||
#ifndef TINYGLIB_H
|
||||
# define TINYGLIB_H
|
||||
#define TINYGLIB_H
|
||||
|
||||
/* Define this to bypass TinyGLib and use full GLib instead. */
|
||||
#ifdef TINYGLIB_USE_GLIB
|
||||
#include <glib.h>
|
||||
# include <glib.h>
|
||||
#else
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
|
||||
# include <stdarg.h>
|
||||
# include <stdint.h>
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# define HAVE_STDARG_H
|
||||
# include <86box/86box.h>
|
||||
|
||||
/* Definitions */
|
||||
|
||||
#define G_LITTLE_ENDIAN 1234
|
||||
#define G_BIG_ENDIAN 4321
|
||||
#define G_PDP_ENDIAN 3412
|
||||
#ifdef __BYTE_ORDER__
|
||||
# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define G_BYTE_ORDER G_LITTLE_ENDIAN
|
||||
# elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define G_BYTE_ORDER G_BIG_ENDIAN
|
||||
# elif __BYTE_ORDER__ == __ORDER_PDP_ENDIAN__
|
||||
# define G_BYTE_ORDER G_PDP_ENDIAN
|
||||
# endif
|
||||
#endif
|
||||
#ifndef G_BYTE_ORDER
|
||||
# define G_LITTLE_ENDIAN 1234
|
||||
# define G_BIG_ENDIAN 4321
|
||||
# define G_PDP_ENDIAN 3412
|
||||
# ifdef __BYTE_ORDER__
|
||||
# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
# define G_BYTE_ORDER G_LITTLE_ENDIAN
|
||||
# elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
# define G_BYTE_ORDER G_BIG_ENDIAN
|
||||
# elif __BYTE_ORDER__ == __ORDER_PDP_ENDIAN__
|
||||
# define G_BYTE_ORDER G_PDP_ENDIAN
|
||||
# endif
|
||||
# endif
|
||||
# ifndef G_BYTE_ORDER
|
||||
/* Safe to assume LE for MSVC, as Windows is LE on all architectures. */
|
||||
# define G_BYTE_ORDER G_LITTLE_ENDIAN
|
||||
#endif
|
||||
# define G_BYTE_ORDER G_LITTLE_ENDIAN
|
||||
# endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# define G_OS_WIN32 1
|
||||
#else
|
||||
# define G_OS_UNIX 1
|
||||
#endif
|
||||
# ifdef _WIN32
|
||||
# define G_OS_WIN32 1
|
||||
# else
|
||||
# define G_OS_UNIX 1
|
||||
# endif
|
||||
|
||||
#define G_SPAWN_SEARCH_PATH 0
|
||||
|
||||
#if defined(__LP64__) || defined(__LLP64__) || defined(_WIN64)
|
||||
# define GLIB_SIZEOF_VOID_P 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
|
||||
#endif
|
||||
# define G_SPAWN_SEARCH_PATH 0
|
||||
|
||||
# if defined(__LP64__) || defined(__LLP64__) || defined(_WIN64)
|
||||
# define GLIB_SIZEOF_VOID_P 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
|
||||
# endif
|
||||
|
||||
/* 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
|
||||
# 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
|
||||
#define gint16 int16_t
|
||||
#define gint32 int32_t
|
||||
#define gint64 int64_t
|
||||
#define glong long
|
||||
#define GPid void *
|
||||
#define gpointer void *
|
||||
#define gsize size_t
|
||||
#define GSpawnFlags void *
|
||||
#define GSpawnChildSetupFunc void *
|
||||
#define gssize ssize_t
|
||||
#define GString char
|
||||
#define GStrv char **
|
||||
#define guint unsigned int
|
||||
#define guint16 uint16_t
|
||||
#define guint32 uint32_t
|
||||
#define guint64 uint64_t
|
||||
# define gboolean int
|
||||
# define gchar char
|
||||
# define gint int
|
||||
# define gint16 int16_t
|
||||
# define gint32 int32_t
|
||||
# define gint64 int64_t
|
||||
# define glong long
|
||||
# define GPid void *
|
||||
# define gpointer void *
|
||||
# define gsize size_t
|
||||
# define GSpawnFlags void *
|
||||
# define GSpawnChildSetupFunc void *
|
||||
# define gssize ssize_t
|
||||
# define GString char
|
||||
# define GStrv char **
|
||||
# define guint unsigned int
|
||||
# define guint16 uint16_t
|
||||
# define guint32 uint32_t
|
||||
# define guint64 uint64_t
|
||||
|
||||
typedef struct _GDebugKey {
|
||||
char key[32];
|
||||
int val;
|
||||
int val;
|
||||
} GDebugKey;
|
||||
|
||||
typedef struct _GError {
|
||||
@@ -120,80 +118,86 @@ typedef struct _GRand {
|
||||
uint8_t dummy;
|
||||
} GRand;
|
||||
|
||||
|
||||
/* Functions */
|
||||
extern gboolean g_spawn_async_with_fds(const gchar *working_directory, gchar **argv,
|
||||
extern gboolean g_spawn_async_with_fds(const gchar *working_directory, gchar **argv,
|
||||
gchar **envp, GSpawnFlags flags,
|
||||
GSpawnChildSetupFunc child_setup,
|
||||
gpointer user_data, GPid *child_pid, gint stdin_fd,
|
||||
gint stdout_fd, gint stderr_fd, GError **error);
|
||||
extern GString *g_string_new(gchar *base);
|
||||
extern gchar *g_string_free(GString *string, gboolean free_segment);
|
||||
extern gchar *g_strstr_len(const gchar *haystack, gssize haystack_len, const gchar *needle);
|
||||
extern guint g_strv_length(gchar **str_array);
|
||||
|
||||
extern GString *g_string_new(gchar *base);
|
||||
extern gchar *g_string_free(GString *string, gboolean free_segment);
|
||||
extern gchar *g_strstr_len(const gchar *haystack, gssize haystack_len, const gchar *needle);
|
||||
extern guint g_strv_length(gchar **str_array);
|
||||
|
||||
/* Macros */
|
||||
#define tinyglib_pclog(f, s, ...) pclog("TinyGLib " f "(): " s "\n", ##__VA_ARGS__)
|
||||
# define tinyglib_pclog(f, s, ...) pclog("TinyGLib " f "(): " s "\n", ##__VA_ARGS__)
|
||||
|
||||
#define GLIB_CHECK_VERSION(a, b, c) 1
|
||||
#ifdef __GNUC__
|
||||
# define G_GNUC_PRINTF(format_idx, arg_idx) __attribute__((__format__ (__printf__, format_idx, arg_idx)))
|
||||
#else
|
||||
# define G_GNUC_PRINTF(format_idx, arg_idx)
|
||||
#endif
|
||||
#define G_N_ELEMENTS(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||
#define G_STATIC_ASSERT(e) /* this should probably do something */
|
||||
#define G_UNLIKELY(e) (e)
|
||||
|
||||
#define g_assert(e) do { if (!(e)) fatal("TinyGLib g_assert(" #e ")\n"); } while (0)
|
||||
#ifdef __GNUC__
|
||||
# define g_assert_not_reached __builtin_unreachable
|
||||
#else
|
||||
# ifdef _MSC_VER
|
||||
# define g_assert_not_reached() __assume(0)
|
||||
# else
|
||||
# define g_assert_not_reached()
|
||||
# endif
|
||||
#endif
|
||||
#define g_critical(s, ...) fatal("TinyGLib g_critical(): " s "\n", ##__VA_ARGS__)
|
||||
#ifdef TINYGLIB_DEBUG
|
||||
# define g_debug(s, ...) tinyglib_pclog("g_debug", s, ##__VA_ARGS__)
|
||||
#else
|
||||
# define g_debug(s, ...)
|
||||
#endif
|
||||
#define g_error(s, ...) tinyglib_pclog("g_error", s, ##__VA_ARGS__)
|
||||
#define g_error_free(err)
|
||||
#define g_malloc0(s) calloc(1, s)
|
||||
#define g_new(t, n) (t *) malloc(sizeof(t) * n)
|
||||
#define g_new0(t, n) (t *) calloc(n, sizeof(t))
|
||||
#ifdef TINYGLIB_DEBUG
|
||||
# define g_parse_debug_string(s, k, n) ((!!sizeof(k)) * -1) /* unimplemented; always enables all debug flags */
|
||||
#else
|
||||
# define g_parse_debug_string(s, k, n) (!sizeof(k))
|
||||
#endif
|
||||
#define g_rand_int_range(r, min, max) (rand() % (max + 1 - min) + min)
|
||||
#define g_rand_new() calloc(1, sizeof(GRand))
|
||||
#define g_return_val_if_fail(e, v) if (!(e)) return (v)
|
||||
#define g_shell_parse_argv(a, b, c, d) !!(sizeof(b)) /* unimplemented */
|
||||
#define g_strdup(str) ((str) ? strdup(str) : NULL)
|
||||
#define g_warn_if_fail(e) do { if (!(e)) pclog("TinyGLib g_warn_if_fail(" #e ")\n"); } while (0)
|
||||
#define g_warn_if_reached() pclog("TinyGLib g_warn_if_reached()\n")
|
||||
#define g_warning(s, ...) tinyglib_pclog("g_warning", s, ##__VA_ARGS__)
|
||||
# define GLIB_CHECK_VERSION(a, b, c) 1
|
||||
# ifdef __GNUC__
|
||||
# define G_GNUC_PRINTF(format_idx, arg_idx) __attribute__((__format__(__printf__, format_idx, arg_idx)))
|
||||
# else
|
||||
# define G_GNUC_PRINTF(format_idx, arg_idx)
|
||||
# endif
|
||||
# define G_N_ELEMENTS(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||
# define G_STATIC_ASSERT(e) /* this should probably do something */
|
||||
# define G_UNLIKELY(e) (e)
|
||||
|
||||
# define g_assert(e) \
|
||||
do { \
|
||||
if (!(e)) \
|
||||
fatal("TinyGLib g_assert(" #e ")\n"); \
|
||||
} while (0)
|
||||
# ifdef __GNUC__
|
||||
# define g_assert_not_reached __builtin_unreachable
|
||||
# else
|
||||
# ifdef _MSC_VER
|
||||
# define g_assert_not_reached() __assume(0)
|
||||
# else
|
||||
# define g_assert_not_reached()
|
||||
# endif
|
||||
# endif
|
||||
# define g_critical(s, ...) fatal("TinyGLib g_critical(): " s "\n", ##__VA_ARGS__)
|
||||
# ifdef TINYGLIB_DEBUG
|
||||
# define g_debug(s, ...) tinyglib_pclog("g_debug", s, ##__VA_ARGS__)
|
||||
# else
|
||||
# define g_debug(s, ...)
|
||||
# endif
|
||||
# define g_error(s, ...) tinyglib_pclog("g_error", s, ##__VA_ARGS__)
|
||||
# define g_error_free(err)
|
||||
# define g_malloc0(s) calloc(1, s)
|
||||
# define g_new(t, n) (t *) malloc(sizeof(t) * n)
|
||||
# define g_new0(t, n) (t *) calloc(n, sizeof(t))
|
||||
# ifdef TINYGLIB_DEBUG
|
||||
# define g_parse_debug_string(s, k, n) ((!!sizeof(k)) * -1) /* unimplemented; always enables all debug flags */
|
||||
# else
|
||||
# define g_parse_debug_string(s, k, n) (!sizeof(k))
|
||||
# endif
|
||||
# define g_rand_int_range(r, min, max) (rand() % (max + 1 - min) + min)
|
||||
# define g_rand_new() calloc(1, sizeof(GRand))
|
||||
# define g_return_val_if_fail(e, v) \
|
||||
if (!(e)) \
|
||||
return (v)
|
||||
# define g_shell_parse_argv(a, b, c, d) !!(sizeof(b)) /* unimplemented */
|
||||
# define g_strdup(str) ((str) ? strdup(str) : NULL)
|
||||
# define g_warn_if_fail(e) \
|
||||
do { \
|
||||
if (!(e)) \
|
||||
pclog("TinyGLib g_warn_if_fail(" #e ")\n"); \
|
||||
} while (0)
|
||||
# define g_warn_if_reached() pclog("TinyGLib g_warn_if_reached()\n")
|
||||
# define g_warning(s, ...) tinyglib_pclog("g_warning", s, ##__VA_ARGS__)
|
||||
|
||||
/* Remapped functions */
|
||||
#define g_free free
|
||||
#define g_getenv getenv
|
||||
#define g_malloc malloc
|
||||
#define g_rand_free free
|
||||
#define g_realloc realloc
|
||||
#define g_snprintf snprintf
|
||||
#define g_strerror strerror
|
||||
#define g_strfreev free
|
||||
#define g_string_append_printf sprintf /* unimplemented */
|
||||
#define g_vsnprintf vsnprintf
|
||||
|
||||
# define g_free free
|
||||
# define g_getenv getenv
|
||||
# define g_malloc malloc
|
||||
# define g_rand_free free
|
||||
# define g_realloc realloc
|
||||
# define g_snprintf snprintf
|
||||
# define g_strerror strerror
|
||||
# define g_strfreev free
|
||||
# define g_string_append_printf sprintf /* unimplemented */
|
||||
# define g_vsnprintf vsnprintf
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user