Include guards on our headers
This commit is contained in:
@@ -34,8 +34,9 @@
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef BSWAP_H
|
||||
#define BSWAP_H
|
||||
# define BSWAP_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -228,4 +229,4 @@ static __inline void cpu_to_be32wu(uint32_t *p, uint32_t v)
|
||||
#undef le_bswaps
|
||||
#undef be_bswaps
|
||||
|
||||
#endif /* BSWAP_H */
|
||||
#endif /*BSWAP_H*/
|
||||
|
@@ -21,7 +21,7 @@
|
||||
|
||||
|
||||
#ifndef PCE_IBMPC_CASSETTE_H
|
||||
#define PCE_IBMPC_CASSETTE_H 1
|
||||
# define PCE_IBMPC_CASSETTE_H 1
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -170,4 +170,4 @@ extern int cassette_ui_writeprot;
|
||||
extern const device_t cassette_device;
|
||||
|
||||
|
||||
#endif
|
||||
#endif /*PCE_IBMPC_CASSETTE_H*/
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
*/
|
||||
#ifndef EMU_CDROM_H
|
||||
#define EMU_CDROM_H
|
||||
# define EMU_CDROM_H
|
||||
|
||||
|
||||
#define CDROM_NUM 4
|
||||
|
@@ -1,8 +1,9 @@
|
||||
/* Copyright holders: RichardG867, Tenshi
|
||||
see COPYING for more details
|
||||
*/
|
||||
|
||||
#ifndef CDROM_IMAGE_H
|
||||
#define CDROM_IMAGE_H
|
||||
# define CDROM_IMAGE_H
|
||||
|
||||
/* this header file lists the functions provided by
|
||||
various platform specific cdrom-ioctl files */
|
||||
@@ -23,4 +24,4 @@ extern void cdrom_set_null_handler(uint8_t id);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ! CDROM_IMAGE_H */
|
||||
#endif /*CDROM_IMAGE_H*/
|
||||
|
@@ -19,8 +19,9 @@
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2002-2020 The DOSBox Team.
|
||||
*/
|
||||
|
||||
#ifndef CDROM_IMAGE_BACKEND_H
|
||||
#define CDROM_IMAGE_BACKEND_H
|
||||
# define CDROM_IMAGE_BACKEND_H
|
||||
|
||||
#define RAW_SECTOR_SIZE 2352
|
||||
#define COOKED_SECTOR_SIZE 2048
|
||||
@@ -93,4 +94,4 @@ extern int cdi_has_audio_track(cd_img_t *cdi);
|
||||
|
||||
|
||||
|
||||
#endif /* ! CDROM_IMAGE_BACKEND_H */
|
||||
#endif /*CDROM_IMAGE_BACKEND_H*/
|
||||
|
@@ -1,3 +1,6 @@
|
||||
#ifndef EMU_FILTERS_H
|
||||
# define EMU_FILTERS_H
|
||||
|
||||
#define NCoef 2
|
||||
|
||||
/* fc=150Hz */
|
||||
@@ -399,3 +402,5 @@ static inline double low_fir_sb16(int c, int i, double NewSample)
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
#endif /*EMU_FILTERS_H*/
|
||||
|
@@ -14,6 +14,9 @@
|
||||
* Copyright 2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_FLASH_H
|
||||
# define EMU_FLASH_H
|
||||
|
||||
extern const device_t catalyst_flash_device;
|
||||
|
||||
extern const device_t intel_flash_bxt_ami_device;
|
||||
@@ -25,4 +28,6 @@ extern const device_t sst_flash_29ee020_device;
|
||||
extern const device_t winbond_flash_w29c020_device;
|
||||
extern const device_t sst_flash_39sf010_device;
|
||||
extern const device_t sst_flash_39sf020_device;
|
||||
extern const device_t sst_flash_39sf040_device;
|
||||
extern const device_t sst_flash_39sf040_device;
|
||||
|
||||
#endif /*EMU_FLASH_H*/
|
||||
|
@@ -16,6 +16,9 @@
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_HDC_IDE_SFF8038I_H
|
||||
# define EMU_HDC_IDE_SFF8038I_H
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t command, status,
|
||||
@@ -56,3 +59,5 @@ extern void sff_set_irq_mode(sff8038i_t *dev, int channel, int irq_mode);
|
||||
extern void sff_set_irq_pin(sff8038i_t *dev, int irq_pin);
|
||||
|
||||
extern void sff_set_irq_level(sff8038i_t *dev, int channel, int irq_level);
|
||||
|
||||
#endif /*EMU_HDC_IDE_SFF8038I_H*/
|
||||
|
@@ -1 +1,6 @@
|
||||
#ifndef EMU_I82335_H
|
||||
# define EMU_I82335_H
|
||||
|
||||
extern void i82335_init(void);
|
||||
|
||||
#endif /*EMU_I82335_H*/
|
||||
|
@@ -12,4 +12,9 @@
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_IBM_5161_H
|
||||
# define EMU_IBM_5161_H
|
||||
|
||||
extern const device_t ibm_5161_device;
|
||||
|
||||
#endif /*EMU_IBM_5151_H*/
|
||||
|
@@ -44,8 +44,9 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef ISAMEM_H
|
||||
# define ISAMEM_H
|
||||
|
||||
#ifndef EMU_ISAMEM_H
|
||||
# define EMU_ISAMEM_H
|
||||
|
||||
|
||||
#define ISAMEM_MAX 4 /* max #cards in system */
|
||||
@@ -74,4 +75,4 @@ extern const device_t *isamem_get_device(int t);
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*ISAMEM_H*/
|
||||
#endif /*EMU_ISAMEM_H*/
|
||||
|
@@ -14,6 +14,7 @@
|
||||
*
|
||||
* Copyright 2021 RichardG.
|
||||
*/
|
||||
|
||||
#ifndef EMU_ISAPNP_H
|
||||
# define EMU_ISAPNP_H
|
||||
# include <stdint.h>
|
||||
|
@@ -44,8 +44,9 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef ISARTC_H
|
||||
# define ISARTC_H
|
||||
|
||||
#ifndef EMU_ISARTC_H
|
||||
# define EMU_ISARTC_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -67,4 +68,4 @@ extern const device_t *isartc_get_device(int t);
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*ISARTC_H*/
|
||||
#endif /*EMU_ISARTC_H*/
|
||||
|
@@ -35,4 +35,9 @@
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef EMU_JOYSTICK_CH_FLIGHTSTICK_PRO_H
|
||||
# define EMU_JOYSTICK_CH_FLIGHTSTICK_PRO_H
|
||||
|
||||
extern const joystick_if_t joystick_ch_flightstick_pro;
|
||||
|
||||
#endif /*EMU_JOYSTICK_CH_FLIGHTSTICK_PRO_H*/
|
||||
|
@@ -35,6 +35,9 @@
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef EMU_JOYSTICK_STANDARD_H
|
||||
# define EMU_JOYSTICK_STANDARD_H
|
||||
|
||||
extern const joystick_if_t joystick_2axis_2button;
|
||||
extern const joystick_if_t joystick_2axis_4button;
|
||||
extern const joystick_if_t joystick_3axis_2button;
|
||||
@@ -42,3 +45,5 @@ extern const joystick_if_t joystick_3axis_4button;
|
||||
extern const joystick_if_t joystick_4axis_4button;
|
||||
extern const joystick_if_t joystick_2axis_6button;
|
||||
extern const joystick_if_t joystick_2axis_8button;
|
||||
|
||||
#endif /*EMU_JOYSTICK_STANDARD_H*/
|
||||
|
@@ -35,4 +35,9 @@
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef EMU_JOYSTICK_SW_PAD_H
|
||||
# define EMU_JOYSTICK_SW_PAD_H
|
||||
|
||||
extern const joystick_if_t joystick_sw_pad;
|
||||
|
||||
#endif /*EMU_JOYSTICK_SW_PAD_H*/
|
||||
|
@@ -35,4 +35,9 @@
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef EMU_JOYSTICK_TM_FCS_H
|
||||
# define EMU_JOYSTICK_TM_FCS_H
|
||||
|
||||
extern const joystick_if_t joystick_tm_fcs;
|
||||
|
||||
#endif /*EMU_JOYSTICK_TM_FCS_H*/
|
||||
|
@@ -18,6 +18,7 @@
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
#ifndef EMU_KEYBOARD_H
|
||||
# define EMU_KEYBOARD_H
|
||||
|
||||
|
@@ -16,6 +16,7 @@
|
||||
*
|
||||
* Copyright 2017,2018 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
#ifndef LANG_UAGE_H
|
||||
# define LANG_UAGE_H
|
||||
|
||||
|
@@ -16,6 +16,7 @@
|
||||
* Copyright 2021 Miran Grca.
|
||||
* Copyright 2021 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
#ifndef EMU_LOG_H
|
||||
# define EMU_LOG_H
|
||||
|
||||
|
@@ -16,6 +16,10 @@
|
||||
*
|
||||
* Copyright 2008-2019 Sarah Walker.
|
||||
*/
|
||||
|
||||
#ifndef MACHINE_AMSTRAD_H
|
||||
# define MACHINE_AMSTRAD_H
|
||||
|
||||
extern int amstrad_latch;
|
||||
|
||||
enum
|
||||
@@ -24,3 +28,5 @@ enum
|
||||
AMSTRAD_SW9,
|
||||
AMSTRAD_SW10
|
||||
};
|
||||
|
||||
#endif /*MACHINE_AMSTRAD.H*/
|
||||
|
@@ -36,6 +36,7 @@
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef MACHINE_T3100E_H
|
||||
# define MACHINE_T3100E_H
|
||||
|
||||
|
@@ -36,6 +36,7 @@
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef MACHINE_T1000_H
|
||||
# define MACHINE_T1000_H
|
||||
|
||||
|
@@ -1,3 +1,6 @@
|
||||
#ifndef MACHINE_XI80888_H
|
||||
# define MACHINE_XI80888_H
|
||||
|
||||
#include <86box/device.h>
|
||||
|
||||
extern const device_t xi8088_device;
|
||||
@@ -6,3 +9,5 @@ uint8_t xi8088_turbo_get();
|
||||
void xi8088_turbo_set(uint8_t value);
|
||||
void xi8088_bios_128kb_set(int val);
|
||||
int xi8088_bios_128kb();
|
||||
|
||||
#endif /*MACHINE_XI80888_H*/
|
||||
|
@@ -18,6 +18,7 @@
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
#ifndef EMU_MACHINE_H
|
||||
# define EMU_MACHINE_H
|
||||
|
||||
|
@@ -1,3 +1,6 @@
|
||||
#ifndef EMU_MCA_H
|
||||
# define EMU_MCA_H
|
||||
|
||||
extern void mca_init(int nr_cards);
|
||||
extern void mca_add(uint8_t (*read)(int addr, void *priv), void (*write)(int addr, uint8_t val, void *priv), uint8_t (*feedb)(void *priv), void (*reset)(void *priv), void *priv);
|
||||
extern void mca_set_index(int index);
|
||||
@@ -6,4 +9,6 @@ extern void mca_write(uint16_t port, uint8_t val);
|
||||
extern uint8_t mca_feedb(void);
|
||||
extern void mca_reset(void);
|
||||
|
||||
extern void ps2_cache_clean(void);
|
||||
extern void ps2_cache_clean(void);
|
||||
|
||||
#endif /*EMU_MCA_H*/
|
||||
|
@@ -18,6 +18,7 @@
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_MEM_H
|
||||
# define EMU_MEM_H
|
||||
|
||||
|
@@ -1,3 +1,6 @@
|
||||
#ifndef EMU_SOUND_RTMIDI_H
|
||||
# define EMU_SOUND_RTMIDI_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
@@ -10,4 +13,6 @@ extern void rtmidi_in_get_dev_name(int num, char *s);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /*EMU_SOUND_RTMIDI*/
|
||||
|
@@ -17,9 +17,9 @@
|
||||
*
|
||||
* Copyright 2020 Miran Grca.
|
||||
*/
|
||||
#ifndef EMU_MO_H
|
||||
#define EMU_MO_H
|
||||
|
||||
#ifndef EMU_MO_H
|
||||
# define EMU_MO_H
|
||||
|
||||
#define MO_NUM 4
|
||||
|
||||
|
@@ -16,10 +16,10 @@
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
#ifndef EMU_MOUSE_H
|
||||
# define EMU_MOUSE_H
|
||||
|
||||
|
||||
#define MOUSE_TYPE_NONE 0 /* no mouse configured */
|
||||
#define MOUSE_TYPE_INTERNAL 1 /* machine has internal mouse */
|
||||
#define MOUSE_TYPE_LOGIBUS 2 /* Logitech/ATI Bus Mouse */
|
||||
|
@@ -3,5 +3,4 @@
|
||||
|
||||
extern const device_t threec503_device;
|
||||
|
||||
|
||||
#endif /*NET_3C503_H*/
|
||||
|
@@ -16,6 +16,7 @@
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2008-2018 Bochs project.
|
||||
*/
|
||||
|
||||
#ifndef NET_DP8390_H
|
||||
# define NET_DP8390_H
|
||||
|
||||
|
@@ -32,6 +32,7 @@
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef NET_NE2000_H
|
||||
# define NET_NE2000_H
|
||||
|
||||
|
@@ -16,6 +16,7 @@
|
||||
* Copyright 2004-2019 Antony T Curtis
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef NET_PCNET_H
|
||||
# define NET_PCNET_H
|
||||
|
||||
|
@@ -13,6 +13,7 @@
|
||||
* Author: RichardG, <richardg867@gmail.com>
|
||||
* Copyright 2020 RichardG.
|
||||
*/
|
||||
|
||||
#ifndef NET_PLIP_H
|
||||
# define NET_PLIP_H
|
||||
# include <86box/device.h>
|
||||
|
@@ -40,6 +40,7 @@
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef NET_WD8003_H
|
||||
# define NET_WD8003_H
|
||||
|
||||
|
@@ -44,6 +44,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef EMU_NETWORK_H
|
||||
# define EMU_NETWORK_H
|
||||
# include <stdint.h>
|
||||
|
@@ -1,6 +1,10 @@
|
||||
/* Copyright holders: Sarah Walker
|
||||
see COPYING for more details
|
||||
*/
|
||||
|
||||
#ifndef EMU_NMI_H
|
||||
# define EMU_NMI_H
|
||||
|
||||
extern int nmi_mask;
|
||||
extern int nmi;
|
||||
extern int nmi_auto_clear;
|
||||
@@ -9,3 +13,5 @@ extern int nmi_auto_clear;
|
||||
extern void nmi_init(void);
|
||||
|
||||
extern void nmi_write(uint16_t port, uint8_t val, void *p);
|
||||
|
||||
#endif /*EMU_NMI_H*/
|
||||
|
@@ -1,130 +1,131 @@
|
||||
/*
|
||||
* VARCem Virtual ARchaeological Computer EMulator.
|
||||
* 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 VARCem Project.
|
||||
*
|
||||
* Definitions for the generic NVRAM/CMOS driver.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>,
|
||||
* David Hrdlička, <hrdlickadavid@outlook.com>
|
||||
*
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2018-2020 David Hrdlička.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with
|
||||
* or without modification, are permitted provided that the
|
||||
* following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the entire
|
||||
* above notice, this list of conditions and the following
|
||||
* disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names
|
||||
* of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EMU_NVR_H
|
||||
# define EMU_NVR_H
|
||||
|
||||
|
||||
#define NVR_MAXSIZE 512 /* max size of NVR data */
|
||||
|
||||
/* Conversion from BCD to Binary and vice versa. */
|
||||
#define RTC_BCD(x) (((x) % 10) | (((x) / 10) << 4))
|
||||
#define RTC_DCB(x) ((((x) & 0xf0) >> 4) * 10 + ((x) & 0x0f))
|
||||
#define RTC_BCDINC(x,y) RTC_BCD(RTC_DCB(x) + y)
|
||||
|
||||
/* Time sync options */
|
||||
#define TIME_SYNC_DISABLED 0
|
||||
#define TIME_SYNC_ENABLED 1
|
||||
#define TIME_SYNC_UTC 2
|
||||
|
||||
|
||||
/* Define a generic RTC/NVRAM device. */
|
||||
typedef struct _nvr_ {
|
||||
char *fn; /* pathname of image file */
|
||||
uint16_t size; /* device configuration */
|
||||
int8_t irq, is_new;
|
||||
|
||||
uint8_t onesec_cnt;
|
||||
pc_timer_t onesec_time;
|
||||
|
||||
void *data; /* local data */
|
||||
|
||||
/* Hooks to device functions. */
|
||||
void (*reset)(struct _nvr_ *);
|
||||
void (*start)(struct _nvr_ *);
|
||||
void (*tick)(struct _nvr_ *);
|
||||
void (*ven_save)(void);
|
||||
|
||||
uint8_t regs[NVR_MAXSIZE]; /* these are the registers */
|
||||
} nvr_t;
|
||||
|
||||
|
||||
extern int nvr_dosave;
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t at_nvr_old_device;
|
||||
extern const device_t at_nvr_device;
|
||||
extern const device_t ps_nvr_device;
|
||||
extern const device_t amstrad_nvr_device;
|
||||
extern const device_t ibmat_nvr_device;
|
||||
extern const device_t piix4_nvr_device;
|
||||
extern const device_t ami_1992_nvr_device;
|
||||
extern const device_t ami_1994_nvr_device;
|
||||
extern const device_t ami_1995_nvr_device;
|
||||
extern const device_t via_nvr_device;
|
||||
extern const device_t p6rp4_nvr_device;
|
||||
#endif
|
||||
|
||||
|
||||
extern void rtc_tick(void);
|
||||
|
||||
extern void nvr_init(nvr_t *);
|
||||
extern char *nvr_path(char *str);
|
||||
extern FILE *nvr_fopen(char *str, char *mode);
|
||||
extern int nvr_load(void);
|
||||
extern void nvr_close(void);
|
||||
extern void nvr_set_ven_save(void (*ven_save)(void));
|
||||
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_get(struct tm *);
|
||||
extern void nvr_time_set(struct tm *);
|
||||
|
||||
extern void nvr_reg_write(uint16_t reg, uint8_t val, void *priv);
|
||||
extern void nvr_at_handler(int set, uint16_t base, nvr_t *nvr);
|
||||
extern void nvr_at_sec_handler(int set, uint16_t base, nvr_t *nvr);
|
||||
extern void nvr_read_addr_set(int set, nvr_t *nvr);
|
||||
extern void nvr_wp_set(int set, int h, nvr_t *nvr);
|
||||
extern void nvr_via_wp_set(int set, int reg, nvr_t *nvr);
|
||||
extern void nvr_bank_set(int base, uint8_t bank, nvr_t *nvr);
|
||||
extern void nvr_lock_set(int base, int size, int lock, nvr_t *nvr);
|
||||
extern void nvr_irq_set(int irq, nvr_t *nvr);
|
||||
|
||||
|
||||
#endif /*EMU_NVR_H*/
|
||||
/*
|
||||
* VARCem Virtual ARchaeological Computer EMulator.
|
||||
* 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 VARCem Project.
|
||||
*
|
||||
* Definitions for the generic NVRAM/CMOS driver.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>,
|
||||
* David Hrdlička, <hrdlickadavid@outlook.com>
|
||||
*
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2018-2020 David Hrdlička.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with
|
||||
* or without modification, are permitted provided that the
|
||||
* following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the entire
|
||||
* above notice, this list of conditions and the following
|
||||
* disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names
|
||||
* of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef EMU_NVR_H
|
||||
# define EMU_NVR_H
|
||||
|
||||
|
||||
#define NVR_MAXSIZE 512 /* max size of NVR data */
|
||||
|
||||
/* Conversion from BCD to Binary and vice versa. */
|
||||
#define RTC_BCD(x) (((x) % 10) | (((x) / 10) << 4))
|
||||
#define RTC_DCB(x) ((((x) & 0xf0) >> 4) * 10 + ((x) & 0x0f))
|
||||
#define RTC_BCDINC(x,y) RTC_BCD(RTC_DCB(x) + y)
|
||||
|
||||
/* Time sync options */
|
||||
#define TIME_SYNC_DISABLED 0
|
||||
#define TIME_SYNC_ENABLED 1
|
||||
#define TIME_SYNC_UTC 2
|
||||
|
||||
|
||||
/* Define a generic RTC/NVRAM device. */
|
||||
typedef struct _nvr_ {
|
||||
char *fn; /* pathname of image file */
|
||||
uint16_t size; /* device configuration */
|
||||
int8_t irq, is_new;
|
||||
|
||||
uint8_t onesec_cnt;
|
||||
pc_timer_t onesec_time;
|
||||
|
||||
void *data; /* local data */
|
||||
|
||||
/* Hooks to device functions. */
|
||||
void (*reset)(struct _nvr_ *);
|
||||
void (*start)(struct _nvr_ *);
|
||||
void (*tick)(struct _nvr_ *);
|
||||
void (*ven_save)(void);
|
||||
|
||||
uint8_t regs[NVR_MAXSIZE]; /* these are the registers */
|
||||
} nvr_t;
|
||||
|
||||
|
||||
extern int nvr_dosave;
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t at_nvr_old_device;
|
||||
extern const device_t at_nvr_device;
|
||||
extern const device_t ps_nvr_device;
|
||||
extern const device_t amstrad_nvr_device;
|
||||
extern const device_t ibmat_nvr_device;
|
||||
extern const device_t piix4_nvr_device;
|
||||
extern const device_t ami_1992_nvr_device;
|
||||
extern const device_t ami_1994_nvr_device;
|
||||
extern const device_t ami_1995_nvr_device;
|
||||
extern const device_t via_nvr_device;
|
||||
extern const device_t p6rp4_nvr_device;
|
||||
#endif
|
||||
|
||||
|
||||
extern void rtc_tick(void);
|
||||
|
||||
extern void nvr_init(nvr_t *);
|
||||
extern char *nvr_path(char *str);
|
||||
extern FILE *nvr_fopen(char *str, char *mode);
|
||||
extern int nvr_load(void);
|
||||
extern void nvr_close(void);
|
||||
extern void nvr_set_ven_save(void (*ven_save)(void));
|
||||
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_get(struct tm *);
|
||||
extern void nvr_time_set(struct tm *);
|
||||
|
||||
extern void nvr_reg_write(uint16_t reg, uint8_t val, void *priv);
|
||||
extern void nvr_at_handler(int set, uint16_t base, nvr_t *nvr);
|
||||
extern void nvr_at_sec_handler(int set, uint16_t base, nvr_t *nvr);
|
||||
extern void nvr_read_addr_set(int set, nvr_t *nvr);
|
||||
extern void nvr_wp_set(int set, int h, nvr_t *nvr);
|
||||
extern void nvr_via_wp_set(int set, int reg, nvr_t *nvr);
|
||||
extern void nvr_bank_set(int base, uint8_t bank, nvr_t *nvr);
|
||||
extern void nvr_lock_set(int base, int size, int lock, nvr_t *nvr);
|
||||
extern void nvr_irq_set(int irq, nvr_t *nvr);
|
||||
|
||||
|
||||
#endif /*EMU_NVR_H*/
|
||||
|
@@ -34,6 +34,7 @@
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef EMU_NVRPS2_H
|
||||
# define EMU_NVRPS2_H
|
||||
|
||||
|
@@ -18,10 +18,10 @@
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2008-2020 Sarah Walker.
|
||||
*/
|
||||
|
||||
#ifndef EMU_PCI_H
|
||||
# define EMU_PCI_H
|
||||
|
||||
|
||||
#define PCI_REG_COMMAND 0x04
|
||||
|
||||
#define PCI_COMMAND_IO 0x01
|
||||
|
@@ -1 +1,6 @@
|
||||
#ifndef EMU_PCI_DUMMY_H
|
||||
# define EMU_PCI_DUMMY_H
|
||||
|
||||
extern void pci_dummy_init(void);
|
||||
|
||||
#endif /*EMU_PCI_DUMMY_H*/
|
||||
|
@@ -15,10 +15,10 @@
|
||||
* Copyright 2015-2020 Andrew Jenner.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_PIC_H
|
||||
# define EMU_PIC_H
|
||||
|
||||
|
||||
typedef struct pic {
|
||||
uint8_t icw1, icw2, icw3, icw4,
|
||||
imr, isr, irr, ocw2,
|
||||
|
@@ -14,6 +14,7 @@
|
||||
* Author: Miran Grca, <mgrca8@gmail.com>
|
||||
* Copyright 2019,2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_PIT_H
|
||||
# define EMU_PIT_H
|
||||
|
||||
|
@@ -17,6 +17,7 @@
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
* Copyright 2021 Laci bá'
|
||||
*/
|
||||
|
||||
#ifndef EMU_PLAT_H
|
||||
# define EMU_PLAT_H
|
||||
|
||||
|
@@ -13,10 +13,10 @@
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Copyright 2017 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
#ifndef PLAT_DIR_H
|
||||
# define PLAT_DIR_H
|
||||
|
||||
|
||||
#ifdef _MAX_FNAME
|
||||
# define MAXNAMLEN _MAX_FNAME
|
||||
#else
|
||||
|
@@ -13,10 +13,10 @@
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Copyright 2017 Fred N. van Kempen
|
||||
*/
|
||||
|
||||
#ifndef PLAT_DYNLD_H
|
||||
# define PLAT_DYNLD_H
|
||||
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
void *func;
|
||||
|
@@ -44,6 +44,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef EMU_PNG_STRUCT_H
|
||||
# define EMU_PNG_STRUCT_H
|
||||
|
||||
|
@@ -15,10 +15,10 @@
|
||||
*
|
||||
* Copyright 2021 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_PORT_6X_H
|
||||
# define EMU_PORT_6X_H
|
||||
|
||||
|
||||
#ifdef _TIMER_H_
|
||||
typedef struct
|
||||
{
|
||||
|
@@ -15,6 +15,7 @@
|
||||
*
|
||||
* Copyright 2019 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_PORT_92_H
|
||||
# define EMU_PORT_92_H
|
||||
|
||||
|
@@ -14,10 +14,10 @@
|
||||
*
|
||||
* Copyright 2020 RichardG.
|
||||
*/
|
||||
|
||||
#ifndef POSTCARD_H
|
||||
# define POSTCARD_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@@ -44,10 +44,10 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef PRINTER_H
|
||||
# define PRINTER_H
|
||||
|
||||
|
||||
#define FONT_FILE_DOTMATRIX "dotmatrix.ttf"
|
||||
|
||||
#define FONT_FILE_ROMAN "roman.ttf"
|
||||
|
@@ -1,3 +1,8 @@
|
||||
#ifndef EMU_PRT_DEVS_H
|
||||
# define EMU_PRT_DEVS_H
|
||||
|
||||
extern const lpt_device_t lpt_prt_text_device;
|
||||
extern const lpt_device_t lpt_prt_escp_device;
|
||||
extern const lpt_device_t lpt_prt_ps_device;
|
||||
extern const lpt_device_t lpt_prt_ps_device;
|
||||
|
||||
#endif /*EMU_PRT_DEVS_H*/
|
||||
|
@@ -14,12 +14,11 @@
|
||||
* Author: Miran Grca, <mgrca8@gmail.com>
|
||||
* Copyright 2016,2017 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_RANDOM_H
|
||||
# define EMU_RANDOM_H
|
||||
|
||||
|
||||
extern uint8_t random_generate(void);
|
||||
extern void random_init(void);
|
||||
|
||||
|
||||
#endif /*EMU_RANDOM_H*/
|
||||
|
@@ -19,10 +19,10 @@
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2018,2019 David Hrdlička.
|
||||
*/
|
||||
|
||||
#ifndef WIN_RESOURCE_H
|
||||
# define WIN_RESOURCE_H
|
||||
|
||||
|
||||
/* Dialog IDs. */
|
||||
#define DLG_ABOUT 101 /* top-level dialog */
|
||||
#define DLG_STATUS 102 /* top-level dialog */
|
||||
|
@@ -13,10 +13,10 @@
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Copyright 2018,2019 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
#ifndef EMU_ROM_H
|
||||
# define EMU_ROM_H
|
||||
|
||||
|
||||
#define FLAG_INT 1
|
||||
#define FLAG_INV 2
|
||||
#define FLAG_AUX 4
|
||||
|
@@ -19,7 +19,7 @@
|
||||
* Copyright 2017,2018 Fred N. van Kempen.
|
||||
*/
|
||||
#ifndef EMU_SCSI_H
|
||||
#define EMU_SCSI_H
|
||||
# define EMU_SCSI_H
|
||||
|
||||
extern int scsi_card_current[4];
|
||||
|
||||
|
@@ -9,6 +9,5 @@ extern const device_t aha154xcp_device;
|
||||
extern const device_t aha1640_device;
|
||||
|
||||
extern void aha_device_reset(void *p);
|
||||
|
||||
|
||||
|
||||
#endif /*SCSI_AHA154X_H*/
|
||||
|
@@ -19,7 +19,6 @@
|
||||
#ifndef SCSI_BUSLOGIC_H
|
||||
# define SCSI_BUSLOGIC_H
|
||||
|
||||
|
||||
extern const device_t buslogic_542b_device;
|
||||
extern const device_t buslogic_545s_device;
|
||||
extern const device_t buslogic_542bh_device;
|
||||
@@ -30,6 +29,5 @@ extern const device_t buslogic_445c_device;
|
||||
extern const device_t buslogic_958d_pci_device;
|
||||
|
||||
extern void BuslogicDeviceReset(void *p);
|
||||
|
||||
|
||||
|
||||
#endif /*SCSI_BUSLOGIC_H*/
|
||||
|
@@ -15,10 +15,10 @@
|
||||
*
|
||||
* Copyright 2018,2019 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_SCSI_CDROM_H
|
||||
#define EMU_SCSI_CDROM_H
|
||||
|
||||
|
||||
#define CDROM_TIME 10.0
|
||||
|
||||
|
||||
|
@@ -16,10 +16,10 @@
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
#ifndef SCSI_DEVICE_H
|
||||
# define SCSI_DEVICE_H
|
||||
|
||||
|
||||
/* Configuration. */
|
||||
#define SCSI_BUS_MAX 4 /* currently we support up to 4 controllers */
|
||||
|
||||
|
@@ -12,6 +12,8 @@
|
||||
* Copyright 2017,2018 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef SCSI_DISK_H
|
||||
# define SCSI_DISK_H
|
||||
|
||||
typedef struct {
|
||||
mode_sense_pages_t ms_pages_saved;
|
||||
@@ -48,3 +50,5 @@ extern scsi_disk_t *scsi_disk[HDD_NUM];
|
||||
|
||||
extern void scsi_disk_hard_reset(void);
|
||||
extern void scsi_disk_close(void);
|
||||
|
||||
#endif /*SCSI_DISK_H*/
|
||||
|
@@ -20,10 +20,10 @@
|
||||
* Copyright 2017-2018 TheCollector1995.
|
||||
* Copyright 2017,2018 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
#ifndef SCSI_NCR5380_H
|
||||
# define SCSI_NCR5380_H
|
||||
|
||||
|
||||
extern const device_t scsi_lcs6821n_device;
|
||||
extern const device_t scsi_rt1000b_device;
|
||||
extern const device_t scsi_t128_device;
|
||||
@@ -32,5 +32,4 @@ extern const device_t scsi_t130b_device;
|
||||
extern const device_t scsi_scsiat_device;
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*SCSI_NCR5380_H*/
|
||||
|
@@ -21,10 +21,10 @@
|
||||
* Copyright 2009-2018 Artyom Tarasenko.
|
||||
* Copyright 2017,2018 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef SCSI_NCR53C8XX_H
|
||||
# define SCSI_NCR53C8XX_H
|
||||
|
||||
|
||||
extern const device_t ncr53c810_pci_device;
|
||||
extern const device_t ncr53c810_onboard_pci_device;
|
||||
extern const device_t ncr53c815_pci_device;
|
||||
|
@@ -25,9 +25,7 @@
|
||||
#ifndef SCSI_PCSCSI_H
|
||||
# define SCSI_PCSCSI_H
|
||||
|
||||
|
||||
extern const device_t dc390_pci_device;
|
||||
extern const device_t ncr53c90_mca_device;
|
||||
|
||||
|
||||
|
||||
#endif /*SCSI_BUSLOGIC_H*/
|
||||
|
@@ -17,9 +17,10 @@
|
||||
* Copyright 2020 Sarah Walker.
|
||||
* Copyright 2020 TheCollector1995.
|
||||
*/
|
||||
|
||||
#ifndef SCSI_SPOCK_H
|
||||
# define SCSI_SPOCK_H
|
||||
|
||||
extern const device_t spock_device;
|
||||
|
||||
|
||||
#endif /*SCSI_SPOCK_H*/
|
@@ -20,9 +20,9 @@
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2017,2018 Fred N. van Kempen.
|
||||
*/
|
||||
#ifndef SCSI_X54X_H
|
||||
|
||||
#define SCSI_X54X_H
|
||||
#ifndef SCSI_X54X_H
|
||||
# define SCSI_X54X_H
|
||||
|
||||
#define SCSI_DELAY_TM 1 /* was 50 */
|
||||
|
||||
@@ -511,5 +511,4 @@ extern void *x54x_init(const device_t *info);
|
||||
extern void x54x_close(void *priv);
|
||||
extern void x54x_device_reset(void *priv);
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -19,10 +19,10 @@
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
#ifndef EMU_SERIAL_H
|
||||
# define EMU_SERIAL_H
|
||||
|
||||
|
||||
#define SERIAL_8250 0
|
||||
#define SERIAL_8250_PCJR 1
|
||||
#define SERIAL_16450 2
|
||||
@@ -101,5 +101,4 @@ extern const device_t ns16750_device;
|
||||
extern const device_t ns16850_device;
|
||||
extern const device_t ns16950_device;
|
||||
|
||||
|
||||
#endif /*EMU_SERIAL_H*/
|
||||
|
@@ -11,10 +11,10 @@
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
#ifndef EMU_SIO_H
|
||||
# define EMU_SIO_H
|
||||
|
||||
|
||||
extern void vt82c686_sio_write(uint8_t addr, uint8_t val, void *priv);
|
||||
|
||||
|
||||
@@ -83,5 +83,4 @@ extern const device_t w83977tf_device;
|
||||
extern const device_t w83977ef_device;
|
||||
extern const device_t w83977ef_370_device;
|
||||
|
||||
|
||||
#endif /*EMU_SIO_H*/
|
||||
|
@@ -14,6 +14,7 @@
|
||||
*
|
||||
* Copyright 2020 RichardG.
|
||||
*/
|
||||
|
||||
#ifndef EMU_SMBUS_PIIX4_H
|
||||
# define EMU_SMBUS_PIIX4_H
|
||||
|
||||
@@ -66,5 +67,4 @@ extern const device_t via_smbus_device;
|
||||
extern const device_t ali7101_smbus_device;
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*EMU_SMBUS_PIIX4_H*/
|
||||
|
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Definitions for the generic PIIX4-compatible SMBus host controller.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: RichardG, <richardg867@gmail.com>
|
||||
*
|
||||
* Copyright 2020 RichardG.
|
||||
*/
|
||||
#ifndef EMU_SMBUS_PIIX4_H
|
||||
# define EMU_SMBUS_PIIX4_H
|
||||
|
||||
|
||||
#define SMBUS_PIIX4_BLOCK_DATA_SIZE 32
|
||||
#define SMBUS_PIIX4_BLOCK_DATA_MASK (SMBUS_PIIX4_BLOCK_DATA_SIZE - 1)
|
||||
|
||||
|
||||
enum {
|
||||
SMBUS_PIIX4 = 0,
|
||||
SMBUS_VIA
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
uint32_t local;
|
||||
uint16_t io_base;
|
||||
int clock;
|
||||
double bit_period;
|
||||
uint8_t stat, next_stat, ctl, cmd, addr,
|
||||
data0, data1,
|
||||
index, data[SMBUS_PIIX4_BLOCK_DATA_SIZE];
|
||||
pc_timer_t response_timer;
|
||||
void *i2c;
|
||||
} smbus_piix4_t;
|
||||
|
||||
|
||||
extern void smbus_piix4_remap(smbus_piix4_t *dev, uint16_t new_io_base, uint8_t enable);
|
||||
extern void smbus_piix4_setclock(smbus_piix4_t *dev, int clock);
|
||||
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t piix4_smbus_device;
|
||||
extern const device_t via_smbus_device;
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*EMU_SMBUS_PIIX4_H*/
|
@@ -14,10 +14,10 @@
|
||||
*
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef EMU_SMRAM_H
|
||||
# define EMU_SMRAM_H
|
||||
|
||||
|
||||
typedef struct _smram_
|
||||
{
|
||||
struct _smram_ *prev, *next;
|
||||
@@ -62,5 +62,4 @@ extern void smram_state_change(smram_t *smr, int smm, int flags);
|
||||
/* Enables or disables the use of a separate SMRAM for addresses below A0000. */
|
||||
extern void smram_set_separate_smram(uint8_t set);
|
||||
|
||||
|
||||
#endif /*EMU_SMRAM_H*/
|
||||
|
@@ -14,9 +14,8 @@
|
||||
*
|
||||
* Copyright 2021 RichardG.
|
||||
*/
|
||||
#ifndef EMU_SND_AC97_H
|
||||
# define EMU_SND_AC97_H
|
||||
|
||||
#ifndef SOUND_AC97_H
|
||||
# define SOUND_AC97_H
|
||||
|
||||
#define AC97_VENDOR_ID(f, s, t, dev) ((((f) & 0xff) << 24) | (((s) & 0xff) << 16) | (((t) & 0xff) << 8) | ((dev) & 0xff))
|
||||
|
||||
@@ -153,5 +152,4 @@ extern const device_t wm9701a_device;
|
||||
extern const device_t ac97_via_device;
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
#endif /*SOUND_AC97_H*/
|
||||
|
@@ -19,6 +19,9 @@
|
||||
* Copyright 2021 RichardG.
|
||||
*/
|
||||
|
||||
#ifndef SOUND_AD1848_H
|
||||
# define SOUND_AD1848_H
|
||||
|
||||
enum {
|
||||
AD1848_TYPE_DEFAULT = 0,
|
||||
AD1848_TYPE_CS4248,
|
||||
@@ -66,3 +69,5 @@ extern void ad1848_speed_changed(ad1848_t *ad1848);
|
||||
extern void ad1848_filter_cd_audio(int channel, double *buffer, void *priv);
|
||||
|
||||
extern void ad1848_init(ad1848_t *ad1848, uint8_t type);
|
||||
|
||||
#endif /*SOUND_AD1848_H*/
|
||||
|
@@ -1 +1,6 @@
|
||||
extern void azt2316a_enable_wss(uint8_t enable, void *p);
|
||||
#ifndef SOUND_AZT2316A_H
|
||||
# define SOUND_AZT2316A_H
|
||||
|
||||
extern void azt2316a_enable_wss(uint8_t enable, void *p);
|
||||
|
||||
#endif /*SOUND_AZT2316A*/
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#ifndef SOUND_SND_CMS_H
|
||||
# define SOUND_SND_CMS_H
|
||||
#ifndef SOUND_CMS_H
|
||||
# define SOUND_CMS_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <86box/sound.h>
|
||||
@@ -32,4 +32,4 @@ extern void cms_update(cms_t *cms);
|
||||
extern void cms_write(uint16_t addr, uint8_t val, void *p);
|
||||
extern uint8_t cms_read(uint16_t addr, void *p);
|
||||
|
||||
#endif /*SOUND_SND_CMS_H*/
|
||||
#endif /*SOUND_CMS_H*/
|
||||
|
@@ -1,3 +1,5 @@
|
||||
#ifndef SOUND_EMU8K_H
|
||||
# define SOUND_EMU8K_H
|
||||
|
||||
/* All these defines are in samples, not in bytes. */
|
||||
#define EMU8K_MEM_ADDRESS_MASK 0xFFFFFF
|
||||
@@ -776,3 +778,5 @@ Treble Parameters:
|
||||
0xD308 0xD308 0xD308 0xD308 0xD308 0xD308 0xD3019 0xD32A 0xD34C 0xD36E 0xD36E 0xD36E
|
||||
0x0001 0x0001 0x0001 0x0001 0x0001 0x0002 0x0002 0x0002 0x0002 0x0002 0x0002 0x0002
|
||||
*/
|
||||
|
||||
#endif /*SOUND_EMU8K_H*/
|
||||
|
@@ -19,6 +19,7 @@
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2016-2020 TheCollector1995.
|
||||
*/
|
||||
|
||||
#ifndef SOUND_MPU401_H
|
||||
# define SOUND_MPU401_H
|
||||
|
||||
@@ -163,5 +164,4 @@ extern void mpu401_irq_attach(mpu_t *mpu, void (*ext_irq_update)(void *priv, int
|
||||
extern int MPU401_InputSysex(void *p, uint8_t *buffer, uint32_t len, int abort);
|
||||
extern void MPU401_InputMsg(void *p, uint8_t *msg, uint32_t len);
|
||||
|
||||
|
||||
#endif /*SOUND_MPU401_H*/
|
||||
|
@@ -17,7 +17,6 @@
|
||||
#ifndef SOUND_OPL_H
|
||||
# define SOUND_OPL_H
|
||||
|
||||
|
||||
typedef void (*tmrfunc)(void *priv, int timer, uint64_t period);
|
||||
|
||||
/* Define an OPLx chip. */
|
||||
@@ -53,5 +52,4 @@ extern void opl3_write(uint16_t port, uint8_t val, void *);
|
||||
extern void opl3_init(opl_t *);
|
||||
extern void opl3_update(opl_t *);
|
||||
|
||||
|
||||
#endif /*SOUND_OPL_H*/
|
||||
|
@@ -16,6 +16,7 @@
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef SOUND_OPL_NUKED_H
|
||||
# define SOUND_OPL_NUKED_H
|
||||
|
||||
@@ -31,5 +32,4 @@ extern void nuked_generate(void *, int32_t *buf);
|
||||
extern void nuked_generate_resampled(void *, int32_t *buf);
|
||||
extern void nuked_generate_stream(void *, int32_t *sndptr, uint32_t num);
|
||||
|
||||
|
||||
#endif /*SOUND_OPL_NUKED_H*/
|
||||
|
@@ -1,3 +1,6 @@
|
||||
#ifndef SOUND_RESID_H
|
||||
# define SOUND_RESID_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -10,3 +13,5 @@ extern "C" {
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*SOUND_RESID_H*/
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#ifndef SOUND_SND_SB_DSP_H
|
||||
#define SOUND_SND_SB_DSP_H
|
||||
# define SOUND_SND_SB_DSP_H
|
||||
|
||||
/*Sound Blaster Clones, for quirks*/
|
||||
#define SB_SUBTYPE_DEFAULT 0 /*Handle as a Creative card*/
|
||||
@@ -125,4 +125,4 @@ void sb_dsp_set_stereo(sb_dsp_t *dsp, int stereo);
|
||||
void sb_dsp_update(sb_dsp_t *dsp);
|
||||
void sb_update_mask(sb_dsp_t *dsp, int irqm8, int irqm16, int irqm401);
|
||||
|
||||
#endif /* SOUND_SND_SB_DSP_H */
|
||||
#endif /* SOUND_SND_SB_DSP_H */
|
||||
|
@@ -1,3 +1,6 @@
|
||||
#ifndef SOUND_SN76489_H
|
||||
# define SOUND_SN76489_H
|
||||
|
||||
enum
|
||||
{
|
||||
SN76496,
|
||||
@@ -31,3 +34,5 @@ typedef struct sn76489_t
|
||||
|
||||
void sn76489_init(sn76489_t *sn76489, uint16_t base, uint16_t size, int type, int freq);
|
||||
void sn74689_set_extra_divide(sn76489_t *sn76489, int enable);
|
||||
|
||||
#endif /*SOUND_SN76489_H*/
|
||||
|
@@ -16,6 +16,10 @@
|
||||
* Copyright 2008-2019 Sarah Walker.
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef SOUND_SPEAKER_H
|
||||
# define SOUND_SPEAKER_H
|
||||
|
||||
extern int speaker_mute;
|
||||
|
||||
extern int speaker_gated;
|
||||
@@ -26,3 +30,5 @@ extern void speaker_init();
|
||||
|
||||
extern void speaker_set_count(uint8_t new_m, int new_count);
|
||||
extern void speaker_update(void);
|
||||
|
||||
#endif /*SOUND_SPEAKER_H*/
|
||||
|
@@ -1,3 +1,6 @@
|
||||
#ifndef SOUND_YM7128_H
|
||||
# define SOUND_YM7128_H
|
||||
|
||||
typedef struct ym7128_t
|
||||
{
|
||||
int a0, sci;
|
||||
@@ -23,3 +26,5 @@ typedef struct ym7128_t
|
||||
void ym7128_init(ym7128_t *ym7128);
|
||||
void ym7128_write(ym7128_t *ym7128, uint8_t val);
|
||||
void ym7128_apply(ym7128_t *ym7128, int16_t *buffer, int len);
|
||||
|
||||
#endif /*SOUND_YM7128_H*/
|
||||
|
@@ -14,10 +14,10 @@
|
||||
*
|
||||
* Copyright 2020 RichardG.
|
||||
*/
|
||||
|
||||
#ifndef EMU_SPD_H
|
||||
# define EMU_SPD_H
|
||||
|
||||
|
||||
#define SPD_BASE_ADDR 0x50
|
||||
#define SPD_MAX_SLOTS 8
|
||||
#define SPD_DATA_SIZE 256
|
||||
@@ -110,5 +110,4 @@ extern void spd_write_drbs_with_ext(uint8_t *regs, uint8_t reg_min, uint8_t reg_
|
||||
extern void spd_write_drbs_interleaved(uint8_t *regs, uint8_t reg_min, uint8_t reg_max, uint8_t drb_unit);
|
||||
extern void spd_write_drbs_ali1621(uint8_t *regs, uint8_t reg_min, uint8_t reg_max);
|
||||
|
||||
|
||||
#endif /*EMU_SPD_H*/
|
||||
|
@@ -19,7 +19,6 @@
|
||||
#ifndef EMU_UI_H
|
||||
# define EMU_UI_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -80,5 +79,4 @@ extern void ui_sb_mt32lcd(char *str);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*EMU_UI_H*/
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#ifndef _UNIX_SDL_H
|
||||
#define _UNIX_SDL_H
|
||||
# define _UNIX_SDL_H
|
||||
|
||||
extern void sdl_close(void);
|
||||
extern int sdl_inits();
|
||||
extern int sdl_inith();
|
||||
@@ -9,4 +10,5 @@ extern void sdl_resize(int x, int y);
|
||||
extern void sdl_enable(int enable);
|
||||
extern void sdl_set_fs(int fs);
|
||||
extern void sdl_reload(void);
|
||||
#endif
|
||||
|
||||
#endif /*_UNIX_SDL_H*/
|
||||
|
@@ -14,6 +14,7 @@
|
||||
*
|
||||
* Copyright 2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef USB_H
|
||||
# define USB_H
|
||||
|
||||
@@ -44,5 +45,4 @@ extern void ohci_update_mem_mapping(usb_t *dev, uint8_t base1, uint8_t base2, u
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*USB_H*/
|
||||
|
@@ -1,3 +1,6 @@
|
||||
#ifndef VIDEO_ATI_EEPROM_H
|
||||
# define VIDEO_ATI_EEPROM_H
|
||||
|
||||
/* Copyright holders: Sarah Walker
|
||||
see COPYING for more details
|
||||
*/
|
||||
@@ -47,3 +50,5 @@ typedef struct ati_eeprom_t
|
||||
void ati_eeprom_load(ati_eeprom_t *eeprom, char *fn, int type);
|
||||
void ati_eeprom_write(ati_eeprom_t *eeprom, int ena, int clk, int dat);
|
||||
int ati_eeprom_read(ati_eeprom_t *eeprom);
|
||||
|
||||
#endif /*VIDEO_ATI_EEPROM_H*/
|
||||
|
@@ -15,6 +15,7 @@
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef VIDEO_CGA_H
|
||||
# define VIDEO_CGA_H
|
||||
|
||||
|
@@ -16,6 +16,7 @@
|
||||
* Copyright 2015-2018 reenigne.
|
||||
* Copyright 2015-2018 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef VIDEO_CGA_COMP_H
|
||||
# define VIDEO_CGA_COMP_H
|
||||
|
||||
|
@@ -1,3 +1,6 @@
|
||||
#ifndef VIDEO_COLORPLUS_H
|
||||
# define VIDEO_COLORPLUS_H
|
||||
|
||||
typedef struct colorplus_t
|
||||
{
|
||||
cga_t cga;
|
||||
@@ -13,3 +16,5 @@ void colorplus_recalctimings(colorplus_t *colorplus);
|
||||
void colorplus_poll(void *p);
|
||||
|
||||
extern const device_t colorplus_device;
|
||||
|
||||
#endif /*VIDEO_COLORPLUS_H*/
|
||||
|
@@ -16,6 +16,7 @@
|
||||
* Copyright 2008-2020 Sarah Walker.
|
||||
* Copyright 2020 RichardG.
|
||||
*/
|
||||
|
||||
#ifndef EMU_VID_DDC_H
|
||||
# define EMU_VID_DDC_H
|
||||
|
||||
|
@@ -17,6 +17,7 @@
|
||||
* Copyright 2008-2020 Sarah Walker.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#ifndef VIDEO_EGA_H
|
||||
# define VIDEO_EGA_H
|
||||
|
||||
@@ -129,5 +130,4 @@ void ega_render_4bpp_lowres(ega_t *ega);
|
||||
void ega_render_4bpp_highres(ega_t *ega);
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*VIDEO_EGA_H*/
|
||||
|
@@ -16,6 +16,7 @@
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2021 Jasmine Iwanek.
|
||||
*/
|
||||
|
||||
#ifndef VIDEO_HERCULES_H
|
||||
# define VIDEO_HERCULES_H
|
||||
|
||||
|
@@ -1,6 +1,10 @@
|
||||
/* Copyright holders: Sarah Walker
|
||||
see COPYING for more details
|
||||
*/
|
||||
|
||||
#ifndef VIDEO_MDA_H
|
||||
# define VIDEO_MDA_H
|
||||
|
||||
typedef struct mda_t
|
||||
{
|
||||
mem_mapping_t mapping;
|
||||
@@ -38,3 +42,5 @@ void mda_poll(void *p);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t mda_device;
|
||||
#endif
|
||||
|
||||
#endif /*VIDEO_MDA_H*/
|
||||
|
@@ -22,6 +22,9 @@
|
||||
* Copyright 2020 EngiNerd.
|
||||
*/
|
||||
|
||||
#ifndef VIDEO_NGA_H
|
||||
# define VIDEO_NGA_H
|
||||
|
||||
typedef struct nga_t {
|
||||
cga_t cga;
|
||||
/* unused in OGC, required for M19 video card structure idiom */
|
||||
@@ -46,3 +49,5 @@ void nga_mdaattr_rebuild();
|
||||
extern const device_config_t nga_config[];
|
||||
extern const device_t nga_device;
|
||||
#endif
|
||||
|
||||
#endif /*VIDEO_NGA_H*/
|
||||
|
@@ -22,6 +22,9 @@
|
||||
* Copyright 2020 EngiNerd.
|
||||
*/
|
||||
|
||||
#ifndef VIDEO_OGC_H
|
||||
# define VIDEO_OGC_H
|
||||
|
||||
typedef struct ogc_t {
|
||||
cga_t cga;
|
||||
/* unused in OGC, required for M19 video card structure idiom */
|
||||
@@ -46,3 +49,5 @@ void ogc_mdaattr_rebuild();
|
||||
extern const device_config_t ogc_config[];
|
||||
extern const device_t ogc_device;
|
||||
#endif
|
||||
|
||||
#endif /*VIDEO_OGC_H*/
|
||||
|
@@ -19,7 +19,6 @@
|
||||
#ifndef VID_PGC_H
|
||||
# define VID_PGC_H
|
||||
|
||||
|
||||
#define PGC_ERROR_RANGE 0x01
|
||||
#define PGC_ERROR_INTEGER 0x02
|
||||
#define PGC_ERROR_MEMORY 0x03
|
||||
@@ -181,5 +180,4 @@ extern int pgc_result_coord(pgc_t *, int32_t val);
|
||||
extern void pgc_hndl_lut8(pgc_t *);
|
||||
extern void pgc_hndl_lut8rd(pgc_t *);
|
||||
|
||||
|
||||
#endif /*VID_PGC_H*/
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user