More linting in src/include/86box
This commit is contained in:
@@ -105,55 +105,55 @@ extern uint64_t instru_run_ms;
|
|||||||
#define window_w monitor_settings[0].mon_window_w
|
#define window_w monitor_settings[0].mon_window_w
|
||||||
#define window_h monitor_settings[0].mon_window_h
|
#define window_h monitor_settings[0].mon_window_h
|
||||||
extern int window_remember;
|
extern int window_remember;
|
||||||
extern int vid_resize; /* (C) allow resizing */
|
extern int vid_resize; /* (C) allow resizing */
|
||||||
extern int invert_display; /* (C) invert the display */
|
extern int invert_display; /* (C) invert the display */
|
||||||
extern int suppress_overscan; /* (C) suppress overscans */
|
extern int suppress_overscan; /* (C) suppress overscans */
|
||||||
extern uint32_t lang_id; /* (C) language code identifier */
|
extern uint32_t lang_id; /* (C) language code identifier */
|
||||||
extern char icon_set[256]; /* (C) iconset identifier */
|
extern char icon_set[256]; /* (C) iconset identifier */
|
||||||
extern int scale; /* (C) screen scale factor */
|
extern int scale; /* (C) screen scale factor */
|
||||||
extern int dpi_scale; /* (C) DPI scaling of the emulated screen */
|
extern int dpi_scale; /* (C) DPI scaling of the emulated screen */
|
||||||
extern int vid_api; /* (C) video renderer */
|
extern int vid_api; /* (C) video renderer */
|
||||||
extern int vid_cga_contrast; /* (C) video */
|
extern int vid_cga_contrast; /* (C) video */
|
||||||
extern int video_fullscreen; /* (C) video */
|
extern int video_fullscreen; /* (C) video */
|
||||||
extern int video_fullscreen_first; /* (C) video */
|
extern int video_fullscreen_first; /* (C) video */
|
||||||
extern int video_fullscreen_scale; /* (C) video */
|
extern int video_fullscreen_scale; /* (C) video */
|
||||||
extern int enable_overscan; /* (C) video */
|
extern int enable_overscan; /* (C) video */
|
||||||
extern int force_43; /* (C) video */
|
extern int force_43; /* (C) video */
|
||||||
extern int video_filter_method; /* (C) video */
|
extern int video_filter_method; /* (C) video */
|
||||||
extern int video_vsync; /* (C) video */
|
extern int video_vsync; /* (C) video */
|
||||||
extern int video_framerate; /* (C) video */
|
extern int video_framerate; /* (C) video */
|
||||||
extern int gfxcard[2]; /* (C) graphics/video card */
|
extern int gfxcard[2]; /* (C) graphics/video card */
|
||||||
extern char video_shader[512]; /* (C) video */
|
extern char video_shader[512]; /* (C) video */
|
||||||
extern int bugger_enabled; /* (C) enable ISAbugger */
|
extern int bugger_enabled; /* (C) enable ISAbugger */
|
||||||
extern int postcard_enabled; /* (C) enable POST card */
|
extern int postcard_enabled; /* (C) enable POST card */
|
||||||
extern int isamem_type[]; /* (C) enable ISA mem cards */
|
extern int isamem_type[]; /* (C) enable ISA mem cards */
|
||||||
extern int isartc_type; /* (C) enable ISA RTC card */
|
extern int isartc_type; /* (C) enable ISA RTC card */
|
||||||
extern int sound_is_float; /* (C) sound uses FP values */
|
extern int sound_is_float; /* (C) sound uses FP values */
|
||||||
extern int voodoo_enabled; /* (C) video option */
|
extern int voodoo_enabled; /* (C) video option */
|
||||||
extern int ibm8514_standalone_enabled; /* (C) video option */
|
extern int ibm8514_standalone_enabled; /* (C) video option */
|
||||||
extern int xga_standalone_enabled; /* (C) video option */
|
extern int xga_standalone_enabled; /* (C) video option */
|
||||||
extern uint32_t mem_size; /* (C) memory size (Installed on system board) */
|
extern uint32_t mem_size; /* (C) memory size (Installed on system board) */
|
||||||
extern uint32_t isa_mem_size; /* (C) memory size (ISA Memory Cards) */
|
extern uint32_t isa_mem_size; /* (C) memory size (ISA Memory Cards) */
|
||||||
extern int cpu; /* (C) cpu type */
|
extern int cpu; /* (C) cpu type */
|
||||||
extern int cpu_use_dynarec; /* (C) cpu uses/needs Dyna */
|
extern int cpu_use_dynarec; /* (C) cpu uses/needs Dyna */
|
||||||
extern int fpu_type; /* (C) fpu type */
|
extern int fpu_type; /* (C) fpu type */
|
||||||
extern int fpu_softfloat; /* (C) fpu uses softfloat */
|
extern int fpu_softfloat; /* (C) fpu uses softfloat */
|
||||||
extern int time_sync; /* (C) enable time sync */
|
extern int time_sync; /* (C) enable time sync */
|
||||||
extern int hdd_format_type; /* (C) hard disk file format */
|
extern int hdd_format_type; /* (C) hard disk file format */
|
||||||
extern int confirm_reset; /* (C) enable reset confirmation */
|
extern int confirm_reset; /* (C) enable reset confirmation */
|
||||||
extern int confirm_exit; /* (C) enable exit confirmation */
|
extern int confirm_exit; /* (C) enable exit confirmation */
|
||||||
extern int confirm_save; /* (C) enable save confirmation */
|
extern int confirm_save; /* (C) enable save confirmation */
|
||||||
extern int enable_discord; /* (C) enable Discord integration */
|
extern int enable_discord; /* (C) enable Discord integration */
|
||||||
|
|
||||||
extern int fixed_size_x;
|
extern int fixed_size_x;
|
||||||
extern int fixed_size_y;
|
extern int fixed_size_y;
|
||||||
extern double mouse_sensitivity; /* (C) Mouse sensitivity scale */
|
extern double mouse_sensitivity; /* (C) Mouse sensitivity scale */
|
||||||
#ifdef _Atomic
|
#ifdef _Atomic
|
||||||
extern _Atomic double mouse_x_error; /* Mouse error accumulator - Y */
|
extern _Atomic double mouse_x_error; /* Mouse error accumulator - Y */
|
||||||
extern _Atomic double mouse_y_error; /* Mouse error accumulator - Y */
|
extern _Atomic double mouse_y_error; /* Mouse error accumulator - Y */
|
||||||
#endif
|
#endif
|
||||||
extern int pit_mode; /* (C) force setting PIT mode */
|
extern int pit_mode; /* (C) force setting PIT mode */
|
||||||
extern int fm_driver; /* (C) select FM sound driver */
|
extern int fm_driver; /* (C) select FM sound driver */
|
||||||
|
|
||||||
extern char exe_path[2048]; /* path (dir) of executable */
|
extern char exe_path[2048]; /* path (dir) of executable */
|
||||||
extern char usr_path[1024]; /* path (dir) of user data */
|
extern char usr_path[1024]; /* path (dir) of user data */
|
||||||
|
@@ -46,29 +46,29 @@
|
|||||||
# define bswap_16(x) \
|
# define bswap_16(x) \
|
||||||
( \
|
( \
|
||||||
((uint16_t)( \
|
((uint16_t)( \
|
||||||
(((uint16_t)(x) & (uint16_t)0x00ffU) << 8) | \
|
(((uint16_t)(x) & (uint16_t)0x00ffU) << 8) | \
|
||||||
(((uint16_t)(x) & (uint16_t)0xff00U) >> 8) )) \
|
(((uint16_t)(x) & (uint16_t)0xff00U) >> 8) )) \
|
||||||
)
|
)
|
||||||
|
|
||||||
# define bswap_32(x) \
|
# define bswap_32(x) \
|
||||||
( \
|
( \
|
||||||
((uint32_t)( \
|
((uint32_t)( \
|
||||||
(((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
|
(((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
|
||||||
(((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
|
(((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
|
||||||
(((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \
|
(((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \
|
||||||
(((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24) )) \
|
(((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24) )) \
|
||||||
)
|
)
|
||||||
|
|
||||||
# define bswap_64(x) \
|
# define bswap_64(x) \
|
||||||
( \
|
( \
|
||||||
((uint64_t)( \
|
((uint64_t)( \
|
||||||
(uint64_t)(((uint64_t)(x) & (uint64_t)0x00000000000000ffULL) << 56) | \
|
(uint64_t)(((uint64_t)(x) & (uint64_t)0x00000000000000ffULL) << 56) | \
|
||||||
(uint64_t)(((uint64_t)(x) & (uint64_t)0x000000000000ff00ULL) << 40) | \
|
(uint64_t)(((uint64_t)(x) & (uint64_t)0x000000000000ff00ULL) << 40) | \
|
||||||
(uint64_t)(((uint64_t)(x) & (uint64_t)0x0000000000ff0000ULL) << 24) | \
|
(uint64_t)(((uint64_t)(x) & (uint64_t)0x0000000000ff0000ULL) << 24) | \
|
||||||
(uint64_t)(((uint64_t)(x) & (uint64_t)0x00000000ff000000ULL) << 8) | \
|
(uint64_t)(((uint64_t)(x) & (uint64_t)0x00000000ff000000ULL) << 8) | \
|
||||||
(uint64_t)(((uint64_t)(x) & (uint64_t)0x000000ff00000000ULL) >> 8) | \
|
(uint64_t)(((uint64_t)(x) & (uint64_t)0x000000ff00000000ULL) >> 8) | \
|
||||||
(uint64_t)(((uint64_t)(x) & (uint64_t)0x0000ff0000000000ULL) >> 24) | \
|
(uint64_t)(((uint64_t)(x) & (uint64_t)0x0000ff0000000000ULL) >> 24) | \
|
||||||
(uint64_t)(((uint64_t)(x) & (uint64_t)0x00ff000000000000ULL) >> 40) | \
|
(uint64_t)(((uint64_t)(x) & (uint64_t)0x00ff000000000000ULL) >> 40) | \
|
||||||
(uint64_t)(((uint64_t)(x) & (uint64_t)0xff00000000000000ULL) >> 56) )) \
|
(uint64_t)(((uint64_t)(x) & (uint64_t)0xff00000000000000ULL) >> 56) )) \
|
||||||
)
|
)
|
||||||
#endif /*HAVE_BYTESWAP_H*/
|
#endif /*HAVE_BYTESWAP_H*/
|
||||||
|
@@ -191,10 +191,10 @@ typedef struct cdrom {
|
|||||||
|
|
||||||
void *image;
|
void *image;
|
||||||
|
|
||||||
void (*insert)(void *p);
|
void (*insert)(void *priv);
|
||||||
void (*close)(void *p);
|
void (*close)(void *priv);
|
||||||
uint32_t (*get_volume)(void *p, int channel);
|
uint32_t (*get_volume)(void *priv, int channel);
|
||||||
uint32_t (*get_channel)(void *p, int channel);
|
uint32_t (*get_channel)(void *priv, int channel);
|
||||||
|
|
||||||
int16_t cd_buffer[BUF_SIZE];
|
int16_t cd_buffer[BUF_SIZE];
|
||||||
} cdrom_t;
|
} cdrom_t;
|
||||||
|
@@ -45,17 +45,17 @@ typedef struct SMSF {
|
|||||||
} TMSF;
|
} TMSF;
|
||||||
|
|
||||||
/* Track file struct. */
|
/* Track file struct. */
|
||||||
typedef struct {
|
typedef struct track_file_t {
|
||||||
int (*read)(void *p, uint8_t *buffer, uint64_t seek, size_t count);
|
int (*read)(void *priv, uint8_t *buffer, uint64_t seek, size_t count);
|
||||||
uint64_t (*get_length)(void *p);
|
uint64_t (*get_length)(void *priv);
|
||||||
void (*close)(void *p);
|
void (*close)(void *priv);
|
||||||
|
|
||||||
char fn[260];
|
char fn[260];
|
||||||
FILE *file;
|
FILE *fp;
|
||||||
void *priv;
|
void *priv;
|
||||||
} track_file_t;
|
} track_file_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct track_t {
|
||||||
int number;
|
int number;
|
||||||
int track_number;
|
int track_number;
|
||||||
int attr;
|
int attr;
|
||||||
@@ -70,7 +70,7 @@ typedef struct {
|
|||||||
track_file_t *file;
|
track_file_t *file;
|
||||||
} track_t;
|
} track_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct cd_img_t {
|
||||||
int tracks_num;
|
int tracks_num;
|
||||||
track_t *tracks;
|
track_t *tracks;
|
||||||
} cd_img_t;
|
} cd_img_t;
|
||||||
@@ -97,9 +97,9 @@ extern int cdi_has_data_track(cd_img_t *cdi);
|
|||||||
extern int cdi_has_audio_track(cd_img_t *cdi);
|
extern int cdi_has_audio_track(cd_img_t *cdi);
|
||||||
|
|
||||||
/* Virtual ISO functions. */
|
/* Virtual ISO functions. */
|
||||||
extern int viso_read(void *p, uint8_t *buffer, uint64_t seek, size_t count);
|
extern int viso_read(void *priv, uint8_t *buffer, uint64_t seek, size_t count);
|
||||||
extern uint64_t viso_get_length(void *p);
|
extern uint64_t viso_get_length(void *priv);
|
||||||
extern void viso_close(void *p);
|
extern void viso_close(void *priv);
|
||||||
extern track_file_t *viso_init(const char *dirname, int *error);
|
extern track_file_t *viso_init(const char *dirname, int *error);
|
||||||
|
|
||||||
#endif /*CDROM_IMAGE_BACKEND_H*/
|
#endif /*CDROM_IMAGE_BACKEND_H*/
|
||||||
|
@@ -21,7 +21,7 @@ extern int cdrom_interface_current;
|
|||||||
|
|
||||||
extern void cdrom_interface_reset(void);
|
extern void cdrom_interface_reset(void);
|
||||||
|
|
||||||
extern char *cdrom_interface_get_internal_name(int cdinterface);
|
extern const char *cdrom_interface_get_internal_name(int cdinterface);
|
||||||
extern int cdrom_interface_get_from_internal_name(char *s);
|
extern int cdrom_interface_get_from_internal_name(char *s);
|
||||||
extern int cdrom_interface_has_config(int cdinterface);
|
extern int cdrom_interface_has_config(int cdinterface);
|
||||||
extern const device_t *cdrom_interface_get_device(int cdinterface);
|
extern const device_t *cdrom_interface_get_device(int cdinterface);
|
||||||
|
@@ -28,21 +28,21 @@ extern "C" {
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
typedef struct storage_cfg_t {
|
typedef struct storage_cfg_t {
|
||||||
uint8_t id;
|
uint8_t id;
|
||||||
uint8_t bus_type; /* Bus type: IDE, SCSI, etc. */
|
uint8_t bus_type; /* Bus type: IDE, SCSI, etc. */
|
||||||
uint8_t bus, : 4; /* ID of the bus (for example, for IDE,
|
uint8_t bus : 4; /* ID of the bus (for example, for IDE,
|
||||||
0 = primary, 1 = secondary, etc. */
|
0 = primary, 1 = secondary, etc. */
|
||||||
uint8_t bus_id, : 4; /* ID of the device on the bus */
|
uint8_t bus_id : 4; /* ID of the device on the bus */
|
||||||
uint8_t type; /* Type flags, interpretation depends
|
uint8_t type; /* Type flags, interpretation depends
|
||||||
on the device */
|
on the device */
|
||||||
uint8_t is_image; /* This is only used for CD-ROM:
|
uint8_t is_image; /* This is only used for CD-ROM:
|
||||||
0 = Image;
|
0 = Image;
|
||||||
1 = Host drive */
|
1 = Host drive */
|
||||||
|
|
||||||
wchar_t path[1024]; /* Name of current image file or
|
wchar_t path[1024]; /* Name of current image file or
|
||||||
host drive */
|
host drive */
|
||||||
|
|
||||||
uint32_t spt; /* Physical geometry parameters */
|
uint32_t spt; /* Physical geometry parameters */
|
||||||
uint32_t hpc;
|
uint32_t hpc;
|
||||||
uint32_t tracks;
|
uint32_t tracks;
|
||||||
} storage_cfg_t;
|
} storage_cfg_t;
|
||||||
|
@@ -161,36 +161,36 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void device_init(void);
|
extern void device_init(void);
|
||||||
extern void device_set_context(device_context_t *c, const device_t *d, int inst);
|
extern void device_set_context(device_context_t *c, const device_t *dev, int inst);
|
||||||
extern void device_context(const device_t *d);
|
extern void device_context(const device_t *dev);
|
||||||
extern void device_context_inst(const device_t *d, int inst);
|
extern void device_context_inst(const device_t *dev, int inst);
|
||||||
extern void device_context_restore(void);
|
extern void device_context_restore(void);
|
||||||
extern void *device_add(const device_t *d);
|
extern void *device_add(const device_t *d);
|
||||||
extern void *device_add_parameters(const device_t *d, void *params);
|
extern void *device_add_parameters(const device_t *dev, void *params);
|
||||||
extern void device_add_ex(const device_t *d, void *priv);
|
extern void device_add_ex(const device_t *dev, void *priv);
|
||||||
extern void device_add_ex_parameters(const device_t *d, void *priv, void *params);
|
extern void device_add_ex_parameters(const device_t *dev, void *priv, void *params);
|
||||||
extern void *device_add_inst(const device_t *d, int inst);
|
extern void *device_add_inst(const device_t *dev, int inst);
|
||||||
extern void *device_add_inst_parameters(const device_t *d, int inst, void *params);
|
extern void *device_add_inst_parameters(const device_t *dev, int inst, void *params);
|
||||||
extern void device_add_inst_ex(const device_t *d, void *priv, int inst);
|
extern void device_add_inst_ex(const device_t *dev, void *priv, int inst);
|
||||||
extern void device_add_inst_ex_parameters(const device_t *d, void *priv, int inst, void *params);
|
extern void device_add_inst_ex_parameters(const device_t *dev, void *priv, int inst, void *params);
|
||||||
extern void *device_cadd(const device_t *d, const device_t *cd);
|
extern void *device_cadd(const device_t *dev, const device_t *cd);
|
||||||
extern void *device_cadd_parameters(const device_t *d, const device_t *cd, void *params);
|
extern void *device_cadd_parameters(const device_t *dev, const device_t *cd, void *params);
|
||||||
extern void device_cadd_ex(const device_t *d, const device_t *cd, void *priv);
|
extern void device_cadd_ex(const device_t *dev, const device_t *cd, void *priv);
|
||||||
extern void device_cadd_ex_parameters(const device_t *d, const device_t *cd, void *priv, void *params);
|
extern void device_cadd_ex_parameters(const device_t *dev, const device_t *cd, void *priv, void *params);
|
||||||
extern void *device_cadd_inst(const device_t *d, const device_t *cd, int inst);
|
extern void *device_cadd_inst(const device_t *dev, const device_t *cd, int inst);
|
||||||
extern void *device_cadd_inst_parameters(const device_t *d, const device_t *cd, int inst, void *params);
|
extern void *device_cadd_inst_parameters(const device_t *dev, const device_t *cd, int inst, void *params);
|
||||||
extern void device_cadd_inst_ex(const device_t *d, const device_t *cd, void *priv, int inst);
|
extern void device_cadd_inst_ex(const device_t *dev, const device_t *cd, void *priv, int inst);
|
||||||
extern void device_cadd_inst_ex_parameters(const device_t *d, const device_t *cd, void *priv, int inst, void *params);
|
extern void device_cadd_inst_ex_parameters(const device_t *dev, const device_t *cd, void *priv, int inst, void *params);
|
||||||
extern void device_close_all(void);
|
extern void device_close_all(void);
|
||||||
extern void device_reset_all(uint32_t match_flags);
|
extern void device_reset_all(uint32_t match_flags);
|
||||||
extern void *device_get_priv(const device_t *d);
|
extern void *device_get_priv(const device_t *dev);
|
||||||
extern int device_available(const device_t *d);
|
extern int device_available(const device_t *dev);
|
||||||
extern int device_poll(const device_t *d);
|
extern int device_poll(const device_t *dev);
|
||||||
extern void device_speed_changed(void);
|
extern void device_speed_changed(void);
|
||||||
extern void device_force_redraw(void);
|
extern void device_force_redraw(void);
|
||||||
extern void device_get_name(const device_t *d, int bus, char *name);
|
extern void device_get_name(const device_t *dev, int bus, char *name);
|
||||||
extern int device_has_config(const device_t *d);
|
extern int device_has_config(const device_t *dev);
|
||||||
extern const char *device_get_bios_file(const device_t *d, const char *internal_name, int file_no);
|
extern const char *device_get_bios_file(const device_t *dev, const char *internal_name, int file_no);
|
||||||
|
|
||||||
extern int device_is_valid(const device_t *, int m);
|
extern int device_is_valid(const device_t *, int m);
|
||||||
|
|
||||||
@@ -207,7 +207,7 @@ extern const char *device_get_config_string(const char *name);
|
|||||||
extern const int device_get_instance(void);
|
extern const int device_get_instance(void);
|
||||||
#define device_get_config_bios device_get_config_string
|
#define device_get_config_bios device_get_config_string
|
||||||
|
|
||||||
extern char *device_get_internal_name(const device_t *d);
|
extern const char *device_get_internal_name(const device_t *dev);
|
||||||
|
|
||||||
extern int machine_get_config_int(char *s);
|
extern int machine_get_config_int(char *s);
|
||||||
extern char *machine_get_config_string(char *s);
|
extern char *machine_get_config_string(char *s);
|
||||||
|
@@ -35,7 +35,7 @@ extern const device_t fdc_monster_device;
|
|||||||
|
|
||||||
extern void fdc_card_init(void);
|
extern void fdc_card_init(void);
|
||||||
|
|
||||||
extern char *fdc_card_get_internal_name(int card);
|
extern const char *fdc_card_get_internal_name(int card);
|
||||||
extern int fdc_card_get_from_internal_name(char *s);
|
extern int fdc_card_get_from_internal_name(char *s);
|
||||||
extern const device_t *fdc_card_getdevice(int card);
|
extern const device_t *fdc_card_getdevice(int card);
|
||||||
extern int fdc_card_has_config(int card);
|
extern int fdc_card_has_config(int card);
|
||||||
|
@@ -136,7 +136,7 @@ typedef union {
|
|||||||
|
|
||||||
void fdd_calccrc(uint8_t byte, crc_t *crc_var);
|
void fdd_calccrc(uint8_t byte, crc_t *crc_var);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct d86f_handler_t {
|
||||||
uint16_t (*disk_flags)(int drive);
|
uint16_t (*disk_flags)(int drive);
|
||||||
uint16_t (*side_flags)(int drive);
|
uint16_t (*side_flags)(int drive);
|
||||||
void (*writeback)(int drive);
|
void (*writeback)(int drive);
|
||||||
@@ -162,7 +162,7 @@ extern const uint8_t xdf_physical_sectors[2][2];
|
|||||||
extern const uint8_t xdf_gap3_sizes[2][2];
|
extern const uint8_t xdf_gap3_sizes[2][2];
|
||||||
extern const uint16_t xdf_trackx_spos[2][8];
|
extern const uint16_t xdf_trackx_spos[2][8];
|
||||||
|
|
||||||
typedef struct {
|
typedef struct xdf_id_t {
|
||||||
uint8_t h;
|
uint8_t h;
|
||||||
uint8_t r;
|
uint8_t r;
|
||||||
} xdf_id_t;
|
} xdf_id_t;
|
||||||
@@ -175,14 +175,14 @@ typedef union {
|
|||||||
extern const xdf_sector_t xdf_img_layout[2][2][46];
|
extern const xdf_sector_t xdf_img_layout[2][2][46];
|
||||||
extern const xdf_sector_t xdf_disk_layout[2][2][38];
|
extern const xdf_sector_t xdf_disk_layout[2][2][38];
|
||||||
|
|
||||||
typedef struct {
|
typedef struct sector_id_fields_t {
|
||||||
uint8_t c;
|
uint8_t c;
|
||||||
uint8_t h;
|
uint8_t h;
|
||||||
uint8_t r;
|
uint8_t r;
|
||||||
uint8_t n;
|
uint8_t n;
|
||||||
} sector_id_fields_t;
|
} sector_id_fields_t;
|
||||||
|
|
||||||
typedef union {
|
typedef union sector_id_t {
|
||||||
uint32_t dword;
|
uint32_t dword;
|
||||||
uint8_t byte_array[4];
|
uint8_t byte_array[4];
|
||||||
sector_id_fields_t id;
|
sector_id_fields_t id;
|
||||||
|
@@ -12,24 +12,29 @@
|
|||||||
*
|
*
|
||||||
* Copyright 2023 Miran Grca.
|
* Copyright 2023 Miran Grca.
|
||||||
*/
|
*/
|
||||||
#define FIFO(size) \
|
#define FIFO(size) \
|
||||||
typedef struct \
|
typedef struct { \
|
||||||
{ \
|
int start; \
|
||||||
int start, end, \
|
int end; \
|
||||||
trigger_len, len, \
|
int trigger_len; \
|
||||||
empty, overrun, \
|
int len; \
|
||||||
full, ready, \
|
int empty; \
|
||||||
d_empty, d_overrun, \
|
int overrun; \
|
||||||
d_full, d_ready; \
|
int full; \
|
||||||
\
|
int ready; \
|
||||||
void *priv; \
|
int d_empty; \
|
||||||
\
|
int d_overrun; \
|
||||||
void (*d_empty_evt)(void *); \
|
int d_full; \
|
||||||
void (*d_overrun_evt)(void *); \
|
int d_ready; \
|
||||||
void (*d_full_evt)(void *); \
|
\
|
||||||
void (*d_ready_evt)(void *); \
|
void *priv; \
|
||||||
\
|
\
|
||||||
uint8_t buf[size]; \
|
void (*d_empty_evt)(void *); \
|
||||||
|
void (*d_overrun_evt)(void *); \
|
||||||
|
void (*d_full_evt)(void *); \
|
||||||
|
void (*d_ready_evt)(void *); \
|
||||||
|
\
|
||||||
|
uint8_t buf[size]; \
|
||||||
} fifo## size ##_t;
|
} fifo## size ##_t;
|
||||||
|
|
||||||
FIFO()
|
FIFO()
|
||||||
@@ -65,4 +70,4 @@ extern void fifo_set_priv(void *priv, void *sub_priv);
|
|||||||
extern void fifo_reset(void *priv);
|
extern void fifo_reset(void *priv);
|
||||||
extern void fifo_reset_evt(void *priv);
|
extern void fifo_reset_evt(void *priv);
|
||||||
extern void fifo_close(void *priv);
|
extern void fifo_close(void *priv);
|
||||||
extern void * fifo_init(int len);
|
extern void *fifo_init(int len);
|
||||||
|
@@ -95,7 +95,7 @@ extern const device_t xtide_at_ps2_device; /* xtide_at_ps2 */
|
|||||||
extern void hdc_init(void);
|
extern void hdc_init(void);
|
||||||
extern void hdc_reset(void);
|
extern void hdc_reset(void);
|
||||||
|
|
||||||
extern char *hdc_get_internal_name(int hdc);
|
extern const char *hdc_get_internal_name(int hdc);
|
||||||
extern int hdc_get_from_internal_name(char *s);
|
extern int hdc_get_from_internal_name(char *s);
|
||||||
extern int hdc_has_config(int hdc);
|
extern int hdc_has_config(int hdc);
|
||||||
extern const device_t *hdc_get_device(int hdc);
|
extern const device_t *hdc_get_device(int hdc);
|
||||||
|
@@ -85,15 +85,15 @@ typedef struct ide_s {
|
|||||||
int interrupt_drq;
|
int interrupt_drq;
|
||||||
double pending_delay;
|
double pending_delay;
|
||||||
|
|
||||||
int (*get_max)(int ide_has_dma, int type);
|
int (*get_max)(int ide_has_dma, int type);
|
||||||
int (*get_timings)(int ide_has_dma, int type);
|
int (*get_timings)(int ide_has_dma, int type);
|
||||||
void (*identify)(struct ide_s *ide, int ide_has_dma);
|
void (*identify)(struct ide_s *ide, int ide_has_dma);
|
||||||
void (*stop)(scsi_common_t *sc);
|
void (*stop)(scsi_common_t *sc);
|
||||||
void (*packet_command)(scsi_common_t *sc, uint8_t *cdb);
|
void (*packet_command)(scsi_common_t *sc, uint8_t *cdb);
|
||||||
void (*device_reset)(scsi_common_t *sc);
|
void (*device_reset)(scsi_common_t *sc);
|
||||||
uint8_t (*phase_data_out)(scsi_common_t *sc);
|
uint8_t (*phase_data_out)(scsi_common_t *sc);
|
||||||
void (*command_stop)(scsi_common_t *sc);
|
void (*command_stop)(scsi_common_t *sc);
|
||||||
void (*bus_master_error)(scsi_common_t *sc);
|
void (*bus_master_error)(scsi_common_t *sc);
|
||||||
} ide_t;
|
} ide_t;
|
||||||
|
|
||||||
extern ide_t *ide_drives[IDE_NUM];
|
extern ide_t *ide_drives[IDE_NUM];
|
||||||
@@ -180,9 +180,9 @@ extern void ide_set_board_callback(uint8_t board, double callback);
|
|||||||
extern void ide_padstr(char *str, const char *src, int len);
|
extern void ide_padstr(char *str, const char *src, int len);
|
||||||
extern void ide_padstr8(uint8_t *buf, int buf_size, const char *src);
|
extern void ide_padstr8(uint8_t *buf, int buf_size, const char *src);
|
||||||
|
|
||||||
extern int (*ide_bus_master_dma)(int channel, uint8_t *data, int transfer_length, int out, void *priv);
|
extern int (*ide_bus_master_dma)(int channel, uint8_t *data, int transfer_length, int out, void *priv);
|
||||||
extern void (*ide_bus_master_set_irq)(int channel, void *priv);
|
extern void (*ide_bus_master_set_irq)(int channel, void *priv);
|
||||||
extern void *ide_bus_master_priv[2];
|
extern void *ide_bus_master_priv[2];
|
||||||
|
|
||||||
extern uint8_t ide_read_ali_75(void);
|
extern uint8_t ide_read_ali_75(void);
|
||||||
extern uint8_t ide_read_ali_76(void);
|
extern uint8_t ide_read_ali_76(void);
|
||||||
|
@@ -51,14 +51,14 @@ typedef struct i8080 {
|
|||||||
uint16_t oldpc;
|
uint16_t oldpc;
|
||||||
uint16_t ei;
|
uint16_t ei;
|
||||||
uint32_t pmembase;
|
uint32_t pmembase;
|
||||||
uint32_t dmembase; /* Base from where i8080 starts. */
|
uint32_t dmembase; /* Base from where i8080 starts. */
|
||||||
uint8_t emulated; /* 0 = not emulated, use separate registers, 1 = emulated, use x86 registers. */
|
uint8_t emulated; /* 0 = not emulated, use separate registers, 1 = emulated, use x86 registers. */
|
||||||
uint16_t *cpu_flags;
|
uint16_t *cpu_flags;
|
||||||
void (*writemembyte)(uint32_t, uint8_t);
|
void (*writemembyte)(uint32_t, uint8_t);
|
||||||
uint8_t (*readmembyte)(uint32_t);
|
uint8_t (*readmembyte)(uint32_t);
|
||||||
void (*startclock)(void);
|
void (*startclock)(void);
|
||||||
void (*endclock)(void);
|
void (*endclock)(void);
|
||||||
void (*checkinterrupts)(void);
|
void (*checkinterrupts)(void);
|
||||||
uint8_t (*fetchinstruction)(void *);
|
uint8_t (*fetchinstruction)(void *);
|
||||||
} i8080;
|
} i8080;
|
||||||
|
|
||||||
|
@@ -55,7 +55,7 @@ extern "C" {
|
|||||||
/* Functions. */
|
/* Functions. */
|
||||||
extern void isartc_reset(void);
|
extern void isartc_reset(void);
|
||||||
|
|
||||||
extern char *isartc_get_internal_name(int t);
|
extern const char *isartc_get_internal_name(int t);
|
||||||
extern int isartc_get_from_internal_name(char *s);
|
extern int isartc_get_from_internal_name(char *s);
|
||||||
extern const device_t *isartc_get_device(int t);
|
extern const device_t *isartc_get_device(int t);
|
||||||
|
|
||||||
|
@@ -47,7 +47,7 @@ typedef struct kbc_at_port_t {
|
|||||||
|
|
||||||
void *priv;
|
void *priv;
|
||||||
|
|
||||||
void (*poll)(void *priv);
|
void (*poll)(void *priv);
|
||||||
} kbc_at_port_t;
|
} kbc_at_port_t;
|
||||||
|
|
||||||
/* Used by the AT / PS/2 common device, keyboard, and mouse. */
|
/* Used by the AT / PS/2 common device, keyboard, and mouse. */
|
||||||
|
@@ -21,13 +21,13 @@ typedef struct lpt_device_t {
|
|||||||
const char *name;
|
const char *name;
|
||||||
const char *internal_name;
|
const char *internal_name;
|
||||||
|
|
||||||
void *(*init)(void *lpt);
|
void *(*init)(void *lpt);
|
||||||
void (*close)(void *p);
|
void (*close)(void *priv);
|
||||||
void (*write_data)(uint8_t val, void *p);
|
void (*write_data)(uint8_t val, void *priv);
|
||||||
void (*write_ctrl)(uint8_t val, void *p);
|
void (*write_ctrl)(uint8_t val, void *priv);
|
||||||
uint8_t (*read_data)(void *p);
|
uint8_t (*read_data)(void *priv);
|
||||||
uint8_t (*read_status)(void *p);
|
uint8_t (*read_status)(void *priv);
|
||||||
uint8_t (*read_ctrl)(void *p);
|
uint8_t (*read_ctrl)(void *priv);
|
||||||
} lpt_device_t;
|
} lpt_device_t;
|
||||||
|
|
||||||
extern void lpt_init(void);
|
extern void lpt_init(void);
|
||||||
@@ -65,7 +65,7 @@ extern void lpt1_remove_ams(void);
|
|||||||
void lpt_devices_init(void);
|
void lpt_devices_init(void);
|
||||||
void lpt_devices_close(void);
|
void lpt_devices_close(void);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct lpt_port_t {
|
||||||
uint8_t enabled;
|
uint8_t enabled;
|
||||||
uint8_t irq;
|
uint8_t irq;
|
||||||
uint8_t dat;
|
uint8_t dat;
|
||||||
|
@@ -288,16 +288,17 @@ typedef struct _machine_cpu_ {
|
|||||||
} machine_cpu_t;
|
} machine_cpu_t;
|
||||||
|
|
||||||
typedef struct _machine_memory_ {
|
typedef struct _machine_memory_ {
|
||||||
uint32_t min, max;
|
uint32_t min;
|
||||||
|
uint32_t max;
|
||||||
int step;
|
int step;
|
||||||
} machine_memory_t;
|
} machine_memory_t;
|
||||||
|
|
||||||
typedef struct _machine_ {
|
typedef struct _machine_ {
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *internal_name;
|
const char *internal_name;
|
||||||
uint32_t type;
|
uint32_t type;
|
||||||
uintptr_t chipset;
|
uintptr_t chipset;
|
||||||
int (*init)(const struct _machine_ *);
|
int (*init)(const struct _machine_ *);
|
||||||
uintptr_t pad;
|
uintptr_t pad;
|
||||||
uintptr_t pad0;
|
uintptr_t pad0;
|
||||||
uintptr_t pad1;
|
uintptr_t pad1;
|
||||||
@@ -339,18 +340,18 @@ typedef struct _machine_ {
|
|||||||
/* Global variables. */
|
/* Global variables. */
|
||||||
extern const machine_filter_t machine_types[];
|
extern const machine_filter_t machine_types[];
|
||||||
extern const machine_filter_t machine_chipsets[];
|
extern const machine_filter_t machine_chipsets[];
|
||||||
extern const machine_t machines[];
|
extern const machine_t machines[];
|
||||||
extern int bios_only;
|
extern int bios_only;
|
||||||
extern int machine;
|
extern int machine;
|
||||||
|
|
||||||
/* Core functions. */
|
/* Core functions. */
|
||||||
extern int machine_count(void);
|
extern int machine_count(void);
|
||||||
extern int machine_available(int m);
|
extern int machine_available(int m);
|
||||||
extern char *machine_getname(void);
|
extern const char *machine_getname(void);
|
||||||
extern char *machine_getname_ex(int m);
|
extern const char *machine_getname_ex(int m);
|
||||||
extern char *machine_get_internal_name(void);
|
extern const char *machine_get_internal_name(void);
|
||||||
extern int machine_get_machine_from_internal_name(char *s);
|
extern int machine_get_machine_from_internal_name(const char *s);
|
||||||
extern void machine_init(void);
|
extern void machine_init(void);
|
||||||
#ifdef EMU_DEVICE_H
|
#ifdef EMU_DEVICE_H
|
||||||
extern const device_t *machine_get_kbc_device(int m);
|
extern const device_t *machine_get_kbc_device(int m);
|
||||||
extern const device_t *machine_get_device(int m);
|
extern const device_t *machine_get_device(int m);
|
||||||
@@ -360,18 +361,18 @@ extern const device_t *machine_get_vid_device(int m);
|
|||||||
extern const device_t *machine_get_snd_device(int m);
|
extern const device_t *machine_get_snd_device(int m);
|
||||||
extern const device_t *machine_get_net_device(int m);
|
extern const device_t *machine_get_net_device(int m);
|
||||||
#endif
|
#endif
|
||||||
extern char *machine_get_internal_name_ex(int m);
|
extern const char *machine_get_internal_name_ex(int m);
|
||||||
extern int machine_get_nvrmask(int m);
|
extern int machine_get_nvrmask(int m);
|
||||||
extern int machine_has_flags(int m, int flags);
|
extern int machine_has_flags(int m, int flags);
|
||||||
extern int machine_has_bus(int m, int bus_flags);
|
extern int machine_has_bus(int m, int bus_flags);
|
||||||
extern int machine_has_cartridge(int m);
|
extern int machine_has_cartridge(int m);
|
||||||
extern int machine_get_min_ram(int m);
|
extern int machine_get_min_ram(int m);
|
||||||
extern int machine_get_max_ram(int m);
|
extern int machine_get_max_ram(int m);
|
||||||
extern int machine_get_ram_granularity(int m);
|
extern int machine_get_ram_granularity(int m);
|
||||||
extern int machine_get_type(int m);
|
extern int machine_get_type(int m);
|
||||||
extern void machine_close(void);
|
extern void machine_close(void);
|
||||||
extern int machine_has_mouse(void);
|
extern int machine_has_mouse(void);
|
||||||
extern int machine_is_sony(void);
|
extern int machine_is_sony(void);
|
||||||
|
|
||||||
extern uint8_t machine_get_p1(void);
|
extern uint8_t machine_get_p1(void);
|
||||||
extern void machine_load_p1(int m);
|
extern void machine_load_p1(int m);
|
||||||
|
@@ -9,8 +9,8 @@ extern uint8_t MIDI_evt_len[256];
|
|||||||
extern int midi_output_device_current;
|
extern int midi_output_device_current;
|
||||||
extern int midi_input_device_current;
|
extern int midi_input_device_current;
|
||||||
|
|
||||||
extern void (*input_msg)(void *p, uint8_t *msg, uint32_t len);
|
extern void (*input_msg)(void *priv, uint8_t *msg, uint32_t len);
|
||||||
extern int (*input_sysex)(void *p, uint8_t *buf, uint32_t len, int abort);
|
extern int (*input_sysex)(void *priv, uint8_t *buf, uint32_t len, int abort);
|
||||||
extern void *midi_in_p;
|
extern void *midi_in_p;
|
||||||
|
|
||||||
extern int midi_out_device_available(int card);
|
extern int midi_out_device_available(int card);
|
||||||
@@ -19,14 +19,14 @@ extern int midi_in_device_available(int card);
|
|||||||
const device_t *midi_out_device_getdevice(int card);
|
const device_t *midi_out_device_getdevice(int card);
|
||||||
const device_t *midi_in_device_getdevice(int card);
|
const device_t *midi_in_device_getdevice(int card);
|
||||||
#endif
|
#endif
|
||||||
extern int midi_out_device_has_config(int card);
|
extern int midi_out_device_has_config(int card);
|
||||||
extern int midi_in_device_has_config(int card);
|
extern int midi_in_device_has_config(int card);
|
||||||
extern char *midi_out_device_get_internal_name(int card);
|
extern const char *midi_out_device_get_internal_name(int card);
|
||||||
extern char *midi_in_device_get_internal_name(int card);
|
extern const char *midi_in_device_get_internal_name(int card);
|
||||||
extern int midi_out_device_get_from_internal_name(char *s);
|
extern int midi_out_device_get_from_internal_name(char *s);
|
||||||
extern int midi_in_device_get_from_internal_name(char *s);
|
extern int midi_in_device_get_from_internal_name(char *s);
|
||||||
extern void midi_out_device_init(void);
|
extern void midi_out_device_init(void);
|
||||||
extern void midi_in_device_init(void);
|
extern void midi_in_device_init(void);
|
||||||
|
|
||||||
typedef struct midi_device_t {
|
typedef struct midi_device_t {
|
||||||
void (*play_sysex)(uint8_t *sysex, unsigned int len);
|
void (*play_sysex)(uint8_t *sysex, unsigned int len);
|
||||||
@@ -78,7 +78,7 @@ extern void midi_raw_out_byte(uint8_t val);
|
|||||||
extern void midi_clear_buffer(void);
|
extern void midi_clear_buffer(void);
|
||||||
extern void midi_poll(void);
|
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 *priv);
|
extern void midi_in_handler(int set, void (*msg)(void *priv, uint8_t *msg, uint32_t len), int (*sysex)(void *priv, uint8_t *buffer, uint32_t len, int abort), void *priv);
|
||||||
extern void midi_in_handlers_clear(void);
|
extern void midi_in_handlers_clear(void);
|
||||||
extern void midi_in_msg(uint8_t *msg, uint32_t len);
|
extern void midi_in_msg(uint8_t *msg, uint32_t len);
|
||||||
extern void midi_in_sysex(uint8_t *buffer, uint32_t len);
|
extern void midi_in_sysex(uint8_t *buffer, uint32_t len);
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#define MO_TIME 10.0
|
#define MO_TIME 10.0
|
||||||
|
|
||||||
#define MO_IMAGE_HISTORY 4
|
#define MO_IMAGE_HISTORY 4
|
||||||
|
|
||||||
typedef struct mo_type_t {
|
typedef struct mo_type_t {
|
||||||
uint32_t sectors;
|
uint32_t sectors;
|
||||||
@@ -109,7 +109,7 @@ typedef struct mo_drive_t {
|
|||||||
uint8_t pad;
|
uint8_t pad;
|
||||||
uint8_t pad0;
|
uint8_t pad0;
|
||||||
|
|
||||||
FILE *f;
|
FILE *fp;
|
||||||
void *priv;
|
void *priv;
|
||||||
|
|
||||||
char image_path[1024];
|
char image_path[1024];
|
||||||
|
@@ -103,8 +103,8 @@ extern void mouse_get_abs_coords(double *x_abs, double *y_abs);
|
|||||||
extern void mouse_process(void);
|
extern void mouse_process(void);
|
||||||
extern void mouse_set_poll_ex(void (*poll_ex)(void));
|
extern void mouse_set_poll_ex(void (*poll_ex)(void));
|
||||||
extern void mouse_set_poll(int (*f)(void *), void *);
|
extern void mouse_set_poll(int (*f)(void *), void *);
|
||||||
extern char * mouse_get_name(int mouse);
|
extern const char * mouse_get_name(int mouse);
|
||||||
extern char * mouse_get_internal_name(int mouse);
|
extern const char * mouse_get_internal_name(int mouse);
|
||||||
extern int mouse_get_from_internal_name(char *s);
|
extern int mouse_get_from_internal_name(char *s);
|
||||||
extern int mouse_has_config(int mouse);
|
extern int mouse_has_config(int mouse);
|
||||||
#ifdef EMU_DEVICE_H
|
#ifdef EMU_DEVICE_H
|
||||||
|
@@ -194,7 +194,7 @@ extern int network_dev_available(int);
|
|||||||
extern int network_dev_to_id(char *);
|
extern int network_dev_to_id(char *);
|
||||||
extern int network_card_available(int);
|
extern int network_card_available(int);
|
||||||
extern int network_card_has_config(int);
|
extern int network_card_has_config(int);
|
||||||
extern char *network_card_get_internal_name(int);
|
extern const char *network_card_get_internal_name(int);
|
||||||
extern int network_card_get_from_internal_name(char *);
|
extern int network_card_get_from_internal_name(char *);
|
||||||
extern const device_t *network_card_getdevice(int);
|
extern const device_t *network_card_getdevice(int);
|
||||||
|
|
||||||
|
@@ -11,6 +11,6 @@ extern int nmi_auto_clear;
|
|||||||
|
|
||||||
extern void nmi_init(void);
|
extern void nmi_init(void);
|
||||||
|
|
||||||
extern void nmi_write(uint16_t port, uint8_t val, void *p);
|
extern void nmi_write(uint16_t port, uint8_t val, void *priv);
|
||||||
|
|
||||||
#endif /*EMU_NMI_H*/
|
#endif /*EMU_NMI_H*/
|
||||||
|
@@ -25,11 +25,11 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void plat_serpt_write(void *p, uint8_t data);
|
extern void plat_serpt_write(void *priv, uint8_t data);
|
||||||
extern int plat_serpt_read(void *p, uint8_t *data);
|
extern int plat_serpt_read(void *priv, uint8_t *data);
|
||||||
extern int plat_serpt_open_device(void *p);
|
extern int plat_serpt_open_device(void *priv);
|
||||||
extern void plat_serpt_close(void *p);
|
extern void plat_serpt_close(void *priv);
|
||||||
extern void plat_serpt_set_params(void *p);
|
extern void plat_serpt_set_params(void *priv);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -48,9 +48,9 @@ extern rom_path_t rom_paths;
|
|||||||
|
|
||||||
extern void rom_add_path(const char *path);
|
extern void rom_add_path(const char *path);
|
||||||
|
|
||||||
extern uint8_t rom_read(uint32_t addr, void *p);
|
extern uint8_t rom_read(uint32_t addr, void *priv);
|
||||||
extern uint16_t rom_readw(uint32_t addr, void *p);
|
extern uint16_t rom_readw(uint32_t addr, void *priv);
|
||||||
extern uint32_t rom_readl(uint32_t addr, void *p);
|
extern uint32_t rom_readl(uint32_t addr, void *priv);
|
||||||
|
|
||||||
extern FILE *rom_fopen(const 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_getfile(char *fn, char *s, int size);
|
||||||
|
@@ -18,8 +18,7 @@
|
|||||||
#ifndef EMU_ROW_H
|
#ifndef EMU_ROW_H
|
||||||
# define EMU_ROW_H
|
# define EMU_ROW_H
|
||||||
|
|
||||||
typedef struct _row_
|
typedef struct _row_ {
|
||||||
{
|
|
||||||
struct _smram_ *prev;
|
struct _smram_ *prev;
|
||||||
struct _smram_ *next;
|
struct _smram_ *next;
|
||||||
|
|
||||||
@@ -35,12 +34,9 @@ typedef struct _row_
|
|||||||
uint32_t boundary;
|
uint32_t boundary;
|
||||||
} row_t;
|
} row_t;
|
||||||
|
|
||||||
|
|
||||||
extern void row_disable(uint8_t row_id);
|
extern void row_disable(uint8_t row_id);
|
||||||
extern void row_set_boundary(uint8_t row_id, uint32_t boundary);
|
extern void row_set_boundary(uint8_t row_id, uint32_t boundary);
|
||||||
|
|
||||||
|
|
||||||
extern device_t row_device;
|
extern device_t row_device;
|
||||||
|
|
||||||
|
|
||||||
#endif /*EMU_ROW_H*/
|
#endif /*EMU_ROW_H*/
|
||||||
|
@@ -33,9 +33,9 @@ extern int scsi_card_available(int card);
|
|||||||
#ifdef EMU_DEVICE_H
|
#ifdef EMU_DEVICE_H
|
||||||
extern const device_t *scsi_card_getdevice(int card);
|
extern const device_t *scsi_card_getdevice(int card);
|
||||||
#endif
|
#endif
|
||||||
extern int scsi_card_has_config(int card);
|
extern int scsi_card_has_config(int card);
|
||||||
extern char *scsi_card_get_internal_name(int card);
|
extern const char *scsi_card_get_internal_name(int card);
|
||||||
extern int scsi_card_get_from_internal_name(char *s);
|
extern int scsi_card_get_from_internal_name(char *s);
|
||||||
extern void scsi_card_init(void);
|
extern void scsi_card_init(void);
|
||||||
|
|
||||||
#endif /*EMU_SCSI_H*/
|
#endif /*EMU_SCSI_H*/
|
||||||
|
@@ -8,6 +8,6 @@ extern const device_t aha154xcf_device;
|
|||||||
extern const device_t aha154xcp_device;
|
extern const device_t aha154xcp_device;
|
||||||
extern const device_t aha1640_device;
|
extern const device_t aha1640_device;
|
||||||
|
|
||||||
extern void aha_device_reset(void *p);
|
extern void aha_device_reset(void *priv);
|
||||||
|
|
||||||
#endif /*SCSI_AHA154X_H*/
|
#endif /*SCSI_AHA154X_H*/
|
||||||
|
@@ -29,6 +29,6 @@ extern const device_t buslogic_445s_device;
|
|||||||
extern const device_t buslogic_445c_device;
|
extern const device_t buslogic_445c_device;
|
||||||
extern const device_t buslogic_958d_pci_device;
|
extern const device_t buslogic_958d_pci_device;
|
||||||
|
|
||||||
extern void BuslogicDeviceReset(void *p);
|
extern void BuslogicDeviceReset(void *priv);
|
||||||
|
|
||||||
#endif /*SCSI_BUSLOGIC_H*/
|
#endif /*SCSI_BUSLOGIC_H*/
|
||||||
|
@@ -63,7 +63,7 @@ typedef struct scsi_cdrom_t {
|
|||||||
|
|
||||||
mode_sense_pages_t ms_pages_saved_sony;
|
mode_sense_pages_t ms_pages_saved_sony;
|
||||||
mode_sense_pages_t ms_drive_status_pages_saved;
|
mode_sense_pages_t ms_drive_status_pages_saved;
|
||||||
int sony_vendor;
|
int sony_vendor;
|
||||||
} scsi_cdrom_t;
|
} scsi_cdrom_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -347,7 +347,7 @@ typedef struct mode_sense_pages_t {
|
|||||||
typedef struct scsi_common_s {
|
typedef struct scsi_common_s {
|
||||||
mode_sense_pages_t ms_pages_saved;
|
mode_sense_pages_t ms_pages_saved;
|
||||||
|
|
||||||
void *p;
|
void *priv;
|
||||||
|
|
||||||
uint8_t *temp_buffer;
|
uint8_t *temp_buffer;
|
||||||
uint8_t atapi_cdb[16]; /* This is atapi_cdb in ATAPI-supporting devices,
|
uint8_t atapi_cdb[16]; /* This is atapi_cdb in ATAPI-supporting devices,
|
||||||
@@ -393,11 +393,11 @@ typedef struct scsi_device_t {
|
|||||||
|
|
||||||
scsi_common_t *sc;
|
scsi_common_t *sc;
|
||||||
|
|
||||||
void (*command)(scsi_common_t *sc, uint8_t *cdb);
|
void (*command)(scsi_common_t *sc, uint8_t *cdb);
|
||||||
void (*request_sense)(scsi_common_t *sc, uint8_t *buffer, uint8_t alloc_length);
|
void (*request_sense)(scsi_common_t *sc, uint8_t *buffer, uint8_t alloc_length);
|
||||||
void (*reset)(scsi_common_t *sc);
|
void (*reset)(scsi_common_t *sc);
|
||||||
uint8_t (*phase_data_out)(scsi_common_t *sc);
|
uint8_t (*phase_data_out)(scsi_common_t *sc);
|
||||||
void (*command_stop)(scsi_common_t *sc);
|
void (*command_stop)(scsi_common_t *sc);
|
||||||
} scsi_device_t;
|
} scsi_device_t;
|
||||||
|
|
||||||
/* These are based on the INQUIRY values. */
|
/* These are based on the INQUIRY values. */
|
||||||
|
@@ -22,10 +22,10 @@ typedef struct scsi_disk_t {
|
|||||||
hard_disk_t *drv;
|
hard_disk_t *drv;
|
||||||
|
|
||||||
uint8_t *temp_buffer;
|
uint8_t *temp_buffer;
|
||||||
uint8_t pad[16]; /* This is atapi_cdb in ATAPI-supporting devices,
|
uint8_t pad[16]; /* This is atapi_cdb in ATAPI-supporting devices,
|
||||||
and pad in SCSI-only devices. */
|
and pad in SCSI-only devices. */
|
||||||
uint8_t current_cdb[16];
|
uint8_t current_cdb[16];
|
||||||
uint8_t sense[256];
|
uint8_t sense[256];
|
||||||
|
|
||||||
uint8_t status;
|
uint8_t status;
|
||||||
uint8_t phase;
|
uint8_t phase;
|
||||||
|
@@ -256,11 +256,11 @@ typedef struct Mailbox32_t {
|
|||||||
Bytes 18 through 18+n-1, where n=size of CDB Command Descriptor Block */
|
Bytes 18 through 18+n-1, where n=size of CDB Command Descriptor Block */
|
||||||
|
|
||||||
typedef struct CCB32_t {
|
typedef struct CCB32_t {
|
||||||
uint8_t Opcode;
|
uint8_t Opcode;
|
||||||
uint8_t Reserved1 : 3,
|
uint8_t Reserved1 : 3;
|
||||||
ControlByte : 2,
|
uint8_t ControlByte : 2;
|
||||||
TagQueued : 1,
|
uint8_t TagQueued : 1;
|
||||||
QueueTag : 2;
|
uint8_t QueueTag : 2;
|
||||||
uint8_t CdbLength;
|
uint8_t CdbLength;
|
||||||
uint8_t RequestSenseLength;
|
uint8_t RequestSenseLength;
|
||||||
uint32_t DataLength;
|
uint32_t DataLength;
|
||||||
@@ -269,9 +269,9 @@ typedef struct CCB32_t {
|
|||||||
uint8_t HostStatus;
|
uint8_t HostStatus;
|
||||||
uint8_t TargetStatus;
|
uint8_t TargetStatus;
|
||||||
uint8_t Id;
|
uint8_t Id;
|
||||||
uint8_t Lun : 5,
|
uint8_t Lun : 5;
|
||||||
LegacyTagEnable : 1,
|
uint8_t LegacyTagEnable : 1;
|
||||||
LegacyQueueTag : 2;
|
uint8_t LegacyQueueTag : 2;
|
||||||
uint8_t Cdb[12];
|
uint8_t Cdb[12];
|
||||||
uint8_t Reserved3[6];
|
uint8_t Reserved3[6];
|
||||||
uint32_t SensePointer;
|
uint32_t SensePointer;
|
||||||
@@ -296,9 +296,9 @@ typedef struct CCB_t {
|
|||||||
|
|
||||||
typedef struct CCBC_t {
|
typedef struct CCBC_t {
|
||||||
uint8_t Opcode;
|
uint8_t Opcode;
|
||||||
uint8_t Pad1 : 3,
|
uint8_t Pad1 : 3;
|
||||||
ControlByte : 2,
|
uint8_t ControlByte : 2;
|
||||||
Pad2 : 3;
|
uint8_t Pad2 : 3;
|
||||||
uint8_t CdbLength;
|
uint8_t CdbLength;
|
||||||
uint8_t RequestSenseLength;
|
uint8_t RequestSenseLength;
|
||||||
uint8_t Pad3[9];
|
uint8_t Pad3[9];
|
||||||
@@ -311,8 +311,8 @@ typedef struct CCBC_t {
|
|||||||
|
|
||||||
typedef union CCBU_t {
|
typedef union CCBU_t {
|
||||||
CCB32 new;
|
CCB32 new;
|
||||||
CCB old;
|
CCB old;
|
||||||
CCBC common;
|
CCBC common;
|
||||||
} CCBU;
|
} CCBU;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -329,9 +329,9 @@ typedef struct {
|
|||||||
|
|
||||||
typedef struct BIOSCMD_t {
|
typedef struct BIOSCMD_t {
|
||||||
uint8_t command;
|
uint8_t command;
|
||||||
uint8_t lun : 3,
|
uint8_t lun : 3;
|
||||||
reserved : 2,
|
uint8_t reserved : 2;
|
||||||
id : 3;
|
uint8_t id : 3;
|
||||||
union {
|
union {
|
||||||
struct chs_t {
|
struct chs_t {
|
||||||
uint16_t cyl;
|
uint16_t cyl;
|
||||||
@@ -345,7 +345,7 @@ typedef struct BIOSCMD_t {
|
|||||||
uint8_t lba3; /* LSB */
|
uint8_t lba3; /* LSB */
|
||||||
} lba;
|
} lba;
|
||||||
} u;
|
} u;
|
||||||
uint8_t secount;
|
uint8_t secount;
|
||||||
addr24_t dma_address;
|
addr24_t dma_address;
|
||||||
} BIOSCMD;
|
} BIOSCMD;
|
||||||
|
|
||||||
@@ -379,7 +379,7 @@ typedef struct x54x_t {
|
|||||||
int8_t DmaChannel;
|
int8_t DmaChannel;
|
||||||
int8_t HostID;
|
int8_t HostID;
|
||||||
|
|
||||||
uint8_t callback_phase : 4;
|
uint8_t callback_phase : 4;
|
||||||
uint8_t callback_sub_phase : 4;
|
uint8_t callback_sub_phase : 4;
|
||||||
uint8_t scsi_cmd_phase;
|
uint8_t scsi_cmd_phase;
|
||||||
uint8_t bus;
|
uint8_t bus;
|
||||||
@@ -482,31 +482,31 @@ typedef struct x54x_t {
|
|||||||
void *ven_data;
|
void *ven_data;
|
||||||
|
|
||||||
/* Pointer to a function that performs vendor-specific operation during the timer callback */
|
/* Pointer to a function that performs vendor-specific operation during the timer callback */
|
||||||
void (*ven_callback)(void *p);
|
void (*ven_callback)(void *priv);
|
||||||
/* Pointer to a function that executes the second parameter phase of the vendor-specific command */
|
/* Pointer to a function that executes the second parameter phase of the vendor-specific command */
|
||||||
void (*ven_cmd_phase1)(void *p);
|
void (*ven_cmd_phase1)(void *priv);
|
||||||
/* Pointer to a function that gets the host adapter ID in case it has to be read from a non-standard location */
|
/* Pointer to a function that gets the host adapter ID in case it has to be read from a non-standard location */
|
||||||
uint8_t (*ven_get_host_id)(void *p);
|
uint8_t (*ven_get_host_id)(void *priv);
|
||||||
/* Pointer to a function that updates the IRQ in the vendor-specific space */
|
/* Pointer to a function that updates the IRQ in the vendor-specific space */
|
||||||
uint8_t (*ven_get_irq)(void *p);
|
uint8_t (*ven_get_irq)(void *priv);
|
||||||
/* Pointer to a function that updates the DMA channel in the vendor-specific space */
|
/* Pointer to a function that updates the DMA channel in the vendor-specific space */
|
||||||
uint8_t (*ven_get_dma)(void *p);
|
uint8_t (*ven_get_dma)(void *priv);
|
||||||
/* Pointer to a function that returns whether command is fast */
|
/* Pointer to a function that returns whether command is fast */
|
||||||
uint8_t (*ven_cmd_is_fast)(void *p);
|
uint8_t (*ven_cmd_is_fast)(void *priv);
|
||||||
/* Pointer to a function that executes vendor-specific fast path commands */
|
/* Pointer to a function that executes vendor-specific fast path commands */
|
||||||
uint8_t (*ven_fast_cmds)(void *p, uint8_t cmd);
|
uint8_t (*ven_fast_cmds)(void *priv, uint8_t cmd);
|
||||||
/* Pointer to a function that gets the parameter length for vendor-specific commands */
|
/* Pointer to a function that gets the parameter length for vendor-specific commands */
|
||||||
uint8_t (*get_ven_param_len)(void *p);
|
uint8_t (*get_ven_param_len)(void *priv);
|
||||||
/* Pointer to a function that executes vendor-specific commands and returns whether or not to suppress the IRQ */
|
/* Pointer to a function that executes vendor-specific commands and returns whether or not to suppress the IRQ */
|
||||||
uint8_t (*ven_cmds)(void *p);
|
uint8_t (*ven_cmds)(void *priv);
|
||||||
/* Pointer to a function that fills in the vendor-specific setup data */
|
/* Pointer to a function that fills in the vendor-specific setup data */
|
||||||
void (*get_ven_data)(void *p);
|
void (*get_ven_data)(void *priv);
|
||||||
/* Pointer to a function that determines if the mode is aggressive */
|
/* Pointer to a function that determines if the mode is aggressive */
|
||||||
uint8_t (*is_aggressive_mode)(void *p);
|
uint8_t (*is_aggressive_mode)(void *priv);
|
||||||
/* Pointer to a function that returns interrupt type (0 = edge, 1 = level) */
|
/* Pointer to a function that returns interrupt type (0 = edge, 1 = level) */
|
||||||
uint8_t (*interrupt_type)(void *p);
|
uint8_t (*interrupt_type)(void *priv);
|
||||||
/* Pointer to a function that resets vendor-specific data */
|
/* Pointer to a function that resets vendor-specific data */
|
||||||
void (*ven_reset)(void *p);
|
void (*ven_reset)(void *priv);
|
||||||
|
|
||||||
rom_t bios; /* BIOS memory descriptor */
|
rom_t bios; /* BIOS memory descriptor */
|
||||||
rom_t uppersck; /* BIOS memory descriptor */
|
rom_t uppersck; /* BIOS memory descriptor */
|
||||||
|
@@ -91,10 +91,10 @@ typedef struct serial_s {
|
|||||||
} serial_t;
|
} serial_t;
|
||||||
|
|
||||||
typedef struct serial_device_s {
|
typedef struct serial_device_s {
|
||||||
void (*rcr_callback)(struct serial_s *serial, void *p);
|
void (*rcr_callback)(struct serial_s *serial, void *priv);
|
||||||
void (*dev_write)(struct serial_s *serial, void *p, uint8_t data);
|
void (*dev_write)(struct serial_s *serial, void *priv, uint8_t data);
|
||||||
void (*lcr_callback)(struct serial_s *serial, void *p, uint8_t lcr);
|
void (*lcr_callback)(struct serial_s *serial, void *priv, uint8_t lcr);
|
||||||
void (*transmit_period_callback)(struct serial_s *serial, void *p, double transmit_period);
|
void (*transmit_period_callback)(struct serial_s *serial, void *priv, double transmit_period);
|
||||||
void *priv;
|
void *priv;
|
||||||
serial_t *serial;
|
serial_t *serial;
|
||||||
} serial_device_t;
|
} serial_device_t;
|
||||||
@@ -106,10 +106,10 @@ typedef struct serial_port_s {
|
|||||||
extern serial_port_t com_ports[SERIAL_MAX];
|
extern serial_port_t com_ports[SERIAL_MAX];
|
||||||
|
|
||||||
extern serial_t *serial_attach_ex(int port,
|
extern serial_t *serial_attach_ex(int port,
|
||||||
void (*rcr_callback)(struct serial_s *serial, void *p),
|
void (*rcr_callback)(struct serial_s *serial, void *priv),
|
||||||
void (*dev_write)(struct serial_s *serial, void *p, uint8_t data),
|
void (*dev_write)(struct serial_s *serial, void *priv, uint8_t data),
|
||||||
void (*transmit_period_callback)(struct serial_s *serial, void *p, double transmit_period),
|
void (*transmit_period_callback)(struct serial_s *serial, void *priv, double transmit_period),
|
||||||
void (*lcr_callback)(struct serial_s *serial, void *p, uint8_t data_bits),
|
void (*lcr_callback)(struct serial_s *serial, void *priv, uint8_t data_bits),
|
||||||
void *priv);
|
void *priv);
|
||||||
|
|
||||||
#define serial_attach(port, rcr_callback, dev_write, priv) \
|
#define serial_attach(port, rcr_callback, dev_write, priv) \
|
||||||
|
@@ -67,8 +67,8 @@ typedef struct ad1848_t {
|
|||||||
int16_t buffer[SOUNDBUFLEN * 2];
|
int16_t buffer[SOUNDBUFLEN * 2];
|
||||||
int pos;
|
int pos;
|
||||||
|
|
||||||
void *cram_priv,
|
void *cram_priv;
|
||||||
(*cram_write)(uint16_t addr, uint8_t val, void *priv);
|
void (*cram_write)(uint16_t addr, uint8_t val, void *priv);
|
||||||
uint8_t (*cram_read)(uint16_t addr, void *priv);
|
uint8_t (*cram_read)(uint16_t addr, void *priv);
|
||||||
} ad1848_t;
|
} ad1848_t;
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#ifndef SOUND_AZT2316A_H
|
#ifndef SOUND_AZT2316A_H
|
||||||
#define SOUND_AZT2316A_H
|
#define SOUND_AZT2316A_H
|
||||||
|
|
||||||
extern void azt2316a_enable_wss(uint8_t enable, void *p);
|
extern void azt2316a_enable_wss(uint8_t enable, void *priv);
|
||||||
|
|
||||||
#endif /*SOUND_AZT2316A*/
|
#endif /*SOUND_AZT2316A*/
|
||||||
|
@@ -27,7 +27,7 @@ typedef struct cms_t {
|
|||||||
} cms_t;
|
} cms_t;
|
||||||
|
|
||||||
extern void cms_update(cms_t *cms);
|
extern void cms_update(cms_t *cms);
|
||||||
extern void cms_write(uint16_t addr, uint8_t val, void *p);
|
extern void cms_write(uint16_t addr, uint8_t val, void *priv);
|
||||||
extern uint8_t cms_read(uint16_t addr, void *p);
|
extern uint8_t cms_read(uint16_t addr, void *priv);
|
||||||
|
|
||||||
#endif /*SOUND_CMS_H*/
|
#endif /*SOUND_CMS_H*/
|
||||||
|
@@ -177,9 +177,9 @@ typedef struct mpu_t {
|
|||||||
pc_timer_t mpu401_event_callback;
|
pc_timer_t mpu401_event_callback;
|
||||||
pc_timer_t mpu401_eoi_callback;
|
pc_timer_t mpu401_eoi_callback;
|
||||||
pc_timer_t mpu401_reset_callback;
|
pc_timer_t mpu401_reset_callback;
|
||||||
void (*ext_irq_update)(void *priv, int set);
|
void (*ext_irq_update)(void *priv, int set);
|
||||||
int (*ext_irq_pending)(void *priv);
|
int (*ext_irq_pending)(void *priv);
|
||||||
void *priv;
|
void *priv;
|
||||||
} mpu_t;
|
} mpu_t;
|
||||||
|
|
||||||
extern int mpu401_standalone_enable;
|
extern int mpu401_standalone_enable;
|
||||||
@@ -197,7 +197,7 @@ extern void mpu401_init(mpu_t *mpu, uint16_t addr, int irq, int mode, int rec
|
|||||||
extern void mpu401_device_add(void);
|
extern void mpu401_device_add(void);
|
||||||
extern void mpu401_irq_attach(mpu_t *mpu, void (*ext_irq_update)(void *priv, int set), int (*ext_irq_pending)(void *priv), void *priv);
|
extern void mpu401_irq_attach(mpu_t *mpu, void (*ext_irq_update)(void *priv, int set), int (*ext_irq_pending)(void *priv), void *priv);
|
||||||
|
|
||||||
extern int MPU401_InputSysex(void *p, uint8_t *buffer, uint32_t len, int abort);
|
extern int MPU401_InputSysex(void *priv, uint8_t *buffer, uint32_t len, int abort);
|
||||||
extern void MPU401_InputMsg(void *p, uint8_t *msg, uint32_t len);
|
extern void MPU401_InputMsg(void *priv, uint8_t *msg, uint32_t len);
|
||||||
|
|
||||||
#endif /*SOUND_MPU401_H*/
|
#endif /*SOUND_MPU401_H*/
|
||||||
|
@@ -32,12 +32,12 @@ enum fm_driver {
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef struct fm_drv_t {
|
typedef struct fm_drv_t {
|
||||||
uint8_t (*read)(uint16_t port, void *priv);
|
uint8_t (*read)(uint16_t port, void *priv);
|
||||||
void (*write)(uint16_t port, uint8_t val, void *priv);
|
void (*write)(uint16_t port, uint8_t val, void *priv);
|
||||||
int32_t *(*update)(void *priv);
|
int32_t *(*update)(void *priv);
|
||||||
void (*reset_buffer)(void *priv);
|
void (*reset_buffer)(void *priv);
|
||||||
void (*set_do_cycles)(void *priv, int8_t do_cycles);
|
void (*set_do_cycles)(void *priv, int8_t do_cycles);
|
||||||
void *priv;
|
void *priv;
|
||||||
} fm_drv_t;
|
} fm_drv_t;
|
||||||
|
|
||||||
extern uint8_t fm_driver_get(int chip_id, fm_drv_t *drv);
|
extern uint8_t fm_driver_get(int chip_id, fm_drv_t *drv);
|
||||||
|
@@ -5,11 +5,11 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
void *sid_init(void);
|
void *sid_init(void);
|
||||||
void sid_close(void *p);
|
void sid_close(void *priv);
|
||||||
void sid_reset(void *p);
|
void sid_reset(void *priv);
|
||||||
uint8_t sid_read(uint16_t addr, void *p);
|
uint8_t sid_read(uint16_t addr, void *priv);
|
||||||
void sid_write(uint16_t addr, uint8_t val, void *p);
|
void sid_write(uint16_t addr, uint8_t val, void *priv);
|
||||||
void sid_fillbuf(int16_t *buf, int len, void *p);
|
void sid_fillbuf(int16_t *buf, int len, void *priv);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -152,18 +152,18 @@ typedef struct sb_t {
|
|||||||
void (*opl_mix)(void*, double*, double*);
|
void (*opl_mix)(void*, double*, double*);
|
||||||
} sb_t;
|
} sb_t;
|
||||||
|
|
||||||
extern void sb_ct1345_mixer_write(uint16_t addr, uint8_t val, void *p);
|
extern void sb_ct1345_mixer_write(uint16_t addr, uint8_t val, void *priv);
|
||||||
extern uint8_t sb_ct1345_mixer_read(uint16_t addr, void *p);
|
extern uint8_t sb_ct1345_mixer_read(uint16_t addr, void *priv);
|
||||||
extern void sb_ct1345_mixer_reset(sb_t *sb);
|
extern void sb_ct1345_mixer_reset(sb_t *sb);
|
||||||
|
|
||||||
extern void sb_ct1745_mixer_write(uint16_t addr, uint8_t val, void *p);
|
extern void sb_ct1745_mixer_write(uint16_t addr, uint8_t val, void *priv);
|
||||||
extern uint8_t sb_ct1745_mixer_read(uint16_t addr, void *p);
|
extern uint8_t sb_ct1745_mixer_read(uint16_t addr, void *priv);
|
||||||
extern void sb_ct1745_mixer_reset(sb_t *sb);
|
extern void sb_ct1745_mixer_reset(sb_t *sb);
|
||||||
|
|
||||||
extern void sb_get_buffer_sbpro(int32_t *buffer, int len, void *p);
|
extern void sb_get_buffer_sbpro(int32_t *buffer, int len, void *priv);
|
||||||
extern void sbpro_filter_cd_audio(int channel, double *buffer, void *p);
|
extern void sbpro_filter_cd_audio(int channel, double *buffer, void *priv);
|
||||||
extern void sb16_awe32_filter_cd_audio(int channel, double *buffer, void *p);
|
extern void sb16_awe32_filter_cd_audio(int channel, double *buffer, void *priv);
|
||||||
extern void sb_close(void *p);
|
extern void sb_close(void *priv);
|
||||||
extern void sb_speed_changed(void *p);
|
extern void sb_speed_changed(void *priv);
|
||||||
|
|
||||||
#endif /*SOUND_SND_SB_H*/
|
#endif /*SOUND_SND_SB_H*/
|
||||||
|
@@ -132,9 +132,9 @@ typedef struct sb_dsp_t {
|
|||||||
mpu_t *mpu;
|
mpu_t *mpu;
|
||||||
} sb_dsp_t;
|
} sb_dsp_t;
|
||||||
|
|
||||||
void sb_dsp_input_msg(void *p, uint8_t *msg, uint32_t len);
|
void sb_dsp_input_msg(void *priv, uint8_t *msg, uint32_t len);
|
||||||
|
|
||||||
int sb_dsp_input_sysex(void *p, uint8_t *buffer, uint32_t len, int abort);
|
int sb_dsp_input_sysex(void *priv, uint8_t *buffer, uint32_t len, int abort);
|
||||||
|
|
||||||
void sb_dsp_set_mpu(sb_dsp_t *dsp, mpu_t *src_mpu);
|
void sb_dsp_set_mpu(sb_dsp_t *dsp, mpu_t *src_mpu);
|
||||||
|
|
||||||
|
@@ -50,21 +50,21 @@ extern int sound_pos_global;
|
|||||||
extern int sound_card_current[SOUND_CARD_MAX];
|
extern int sound_card_current[SOUND_CARD_MAX];
|
||||||
|
|
||||||
extern void sound_add_handler(void (*get_buffer)(int32_t *buffer,
|
extern void sound_add_handler(void (*get_buffer)(int32_t *buffer,
|
||||||
int len, void *p),
|
int len, void *priv),
|
||||||
void *p);
|
void *priv);
|
||||||
extern void sound_set_cd_audio_filter(void (*filter)(int channel,
|
extern void sound_set_cd_audio_filter(void (*filter)(int channel,
|
||||||
double *buffer, void *p),
|
double *buffer, void *priv),
|
||||||
void *p);
|
void *priv);
|
||||||
|
|
||||||
extern int sound_card_available(int card);
|
extern int sound_card_available(int card);
|
||||||
#ifdef EMU_DEVICE_H
|
#ifdef EMU_DEVICE_H
|
||||||
extern const device_t *sound_card_getdevice(int card);
|
extern const device_t *sound_card_getdevice(int card);
|
||||||
#endif
|
#endif
|
||||||
extern int sound_card_has_config(int card);
|
extern int sound_card_has_config(int card);
|
||||||
extern char *sound_card_get_internal_name(int card);
|
extern const char *sound_card_get_internal_name(int card);
|
||||||
extern int sound_card_get_from_internal_name(const char *s);
|
extern int sound_card_get_from_internal_name(const char *s);
|
||||||
extern void sound_card_init(void);
|
extern void sound_card_init(void);
|
||||||
extern void sound_set_cd_volume(unsigned int vol_l, unsigned int vol_r);
|
extern void sound_set_cd_volume(unsigned int vol_l, unsigned int vol_r);
|
||||||
|
|
||||||
extern void sound_speed_changed(void);
|
extern void sound_speed_changed(void);
|
||||||
|
|
||||||
|
@@ -12,8 +12,7 @@
|
|||||||
#define TIMER_ENABLED 1
|
#define TIMER_ENABLED 1
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
typedef struct ts_struct_t
|
typedef struct ts_struct_t {
|
||||||
{
|
|
||||||
uint32_t frac;
|
uint32_t frac;
|
||||||
uint32_t integer;
|
uint32_t integer;
|
||||||
} ts_struct_t;
|
} ts_struct_t;
|
||||||
|
@@ -22,11 +22,12 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct
|
typedef struct usb_t {
|
||||||
{
|
uint8_t uhci_io[32];
|
||||||
uint8_t uhci_io[32], ohci_mmio[4096];
|
uint8_t ohci_mmio[4096];
|
||||||
uint16_t uhci_io_base;
|
uint16_t uhci_io_base;
|
||||||
int uhci_enable, ohci_enable;
|
int uhci_enable;
|
||||||
|
int ohci_enable;
|
||||||
uint32_t ohci_mem_base;
|
uint32_t ohci_mem_base;
|
||||||
mem_mapping_t ohci_mmio_mapping;
|
mem_mapping_t ohci_mmio_mapping;
|
||||||
} usb_t;
|
} usb_t;
|
||||||
|
@@ -7,12 +7,12 @@ typedef struct colorplus_t {
|
|||||||
} colorplus_t;
|
} colorplus_t;
|
||||||
|
|
||||||
void colorplus_init(colorplus_t *colorplus);
|
void colorplus_init(colorplus_t *colorplus);
|
||||||
void colorplus_out(uint16_t addr, uint8_t val, void *p);
|
void colorplus_out(uint16_t addr, uint8_t val, void *priv);
|
||||||
uint8_t colorplus_in(uint16_t addr, void *p);
|
uint8_t colorplus_in(uint16_t addr, void *priv);
|
||||||
void colorplus_write(uint32_t addr, uint8_t val, void *p);
|
void colorplus_write(uint32_t addr, uint8_t val, void *priv);
|
||||||
uint8_t colorplus_read(uint32_t addr, void *p);
|
uint8_t colorplus_read(uint32_t addr, void *priv);
|
||||||
void colorplus_recalctimings(colorplus_t *colorplus);
|
void colorplus_recalctimings(colorplus_t *colorplus);
|
||||||
void colorplus_poll(void *p);
|
void colorplus_poll(void *priv);
|
||||||
|
|
||||||
extern const device_t colorplus_device;
|
extern const device_t colorplus_device;
|
||||||
|
|
||||||
|
@@ -40,19 +40,19 @@ typedef struct {
|
|||||||
int firstline;
|
int firstline;
|
||||||
int lastline;
|
int lastline;
|
||||||
|
|
||||||
int linepos;
|
int linepos;
|
||||||
int displine;
|
int displine;
|
||||||
int vc;
|
int vc;
|
||||||
int sc;
|
int sc;
|
||||||
uint16_t ma;
|
uint16_t ma;
|
||||||
uint16_t maback;
|
uint16_t maback;
|
||||||
int con;
|
int con;
|
||||||
int coff;
|
int coff;
|
||||||
int cursoron;
|
int cursoron;
|
||||||
int dispon;
|
int dispon;
|
||||||
int blink;
|
int blink;
|
||||||
int vsynctime;
|
int vsynctime;
|
||||||
int vadj;
|
int vadj;
|
||||||
|
|
||||||
int lp_ff;
|
int lp_ff;
|
||||||
int fullchange;
|
int fullchange;
|
||||||
|
@@ -45,9 +45,9 @@ typedef struct pgc_cl {
|
|||||||
typedef struct pgc_cmd {
|
typedef struct pgc_cmd {
|
||||||
char ascii[6];
|
char ascii[6];
|
||||||
uint8_t hex;
|
uint8_t hex;
|
||||||
void (*handler)(struct pgc *);
|
void (*handler)(struct pgc *);
|
||||||
int (*parser)(struct pgc *, pgc_cl_t *, int);
|
int (*parser)(struct pgc *, pgc_cl_t *, int);
|
||||||
int p;
|
int p;
|
||||||
} pgc_cmd_t;
|
} pgc_cmd_t;
|
||||||
|
|
||||||
typedef struct pgc {
|
typedef struct pgc {
|
||||||
@@ -71,10 +71,12 @@ typedef struct pgc {
|
|||||||
uint8_t hex_command;
|
uint8_t hex_command;
|
||||||
uint32_t palette[256];
|
uint32_t palette[256];
|
||||||
uint32_t userpal[256];
|
uint32_t userpal[256];
|
||||||
uint32_t maxw, maxh; /* maximum framebuffer size */
|
uint32_t maxw; /* maximum framebuffer size - Width */
|
||||||
uint32_t visw, vish; /* maximum screen size */
|
uint32_t maxh; /* maximum framebuffer size - Height */
|
||||||
|
uint32_t visw; /* maximum screen size - Width */
|
||||||
|
uint32_t vish; /* maximum screen size - Height */
|
||||||
uint32_t screenw;
|
uint32_t screenw;
|
||||||
uint32_t screenh;
|
uint32_t screenh;
|
||||||
int16_t pan_x;
|
int16_t pan_x;
|
||||||
int16_t pan_y;
|
int16_t pan_y;
|
||||||
uint16_t win_x1;
|
uint16_t win_x1;
|
||||||
|
@@ -350,8 +350,7 @@ typedef struct voodoo_t {
|
|||||||
int h_disp;
|
int h_disp;
|
||||||
int v_retrace;
|
int v_retrace;
|
||||||
|
|
||||||
struct
|
struct {
|
||||||
{
|
|
||||||
uint32_t y[4];
|
uint32_t y[4];
|
||||||
uint32_t i[4];
|
uint32_t i[4];
|
||||||
uint32_t q[4];
|
uint32_t q[4];
|
||||||
@@ -489,8 +488,7 @@ typedef struct voodoo_t {
|
|||||||
|
|
||||||
uint32_t leftOverlayBuf;
|
uint32_t leftOverlayBuf;
|
||||||
|
|
||||||
struct
|
struct {
|
||||||
{
|
|
||||||
int dst_x;
|
int dst_x;
|
||||||
int dst_y;
|
int dst_y;
|
||||||
int cur_x;
|
int cur_x;
|
||||||
@@ -501,8 +499,7 @@ typedef struct voodoo_t {
|
|||||||
int dst_stride;
|
int dst_stride;
|
||||||
} blt;
|
} blt;
|
||||||
|
|
||||||
struct
|
struct {
|
||||||
{
|
|
||||||
uint32_t bresError0;
|
uint32_t bresError0;
|
||||||
uint32_t bresError1;
|
uint32_t bresError1;
|
||||||
uint32_t clip0Min;
|
uint32_t clip0Min;
|
||||||
@@ -590,8 +587,7 @@ typedef struct voodoo_t {
|
|||||||
int line_bit_mask_size;
|
int line_bit_mask_size;
|
||||||
} banshee_blt;
|
} banshee_blt;
|
||||||
|
|
||||||
struct
|
struct {
|
||||||
{
|
|
||||||
uint32_t vidOverlayStartCoords;
|
uint32_t vidOverlayStartCoords;
|
||||||
uint32_t vidOverlayEndScreenCoords;
|
uint32_t vidOverlayEndScreenCoords;
|
||||||
uint32_t vidOverlayDudx;
|
uint32_t vidOverlayDudx;
|
||||||
@@ -671,7 +667,7 @@ typedef struct voodoo_t {
|
|||||||
uint8_t *vram;
|
uint8_t *vram;
|
||||||
uint8_t *changedvram;
|
uint8_t *changedvram;
|
||||||
|
|
||||||
void *p;
|
void *priv;
|
||||||
uint8_t monitor_index;
|
uint8_t monitor_index;
|
||||||
} voodoo_t;
|
} voodoo_t;
|
||||||
|
|
||||||
|
@@ -24,6 +24,6 @@ void voodoo_pixelclock_update(voodoo_t *voodoo);
|
|||||||
void voodoo_generate_filter_v1(voodoo_t *voodoo);
|
void voodoo_generate_filter_v1(voodoo_t *voodoo);
|
||||||
void voodoo_generate_filter_v2(voodoo_t *voodoo);
|
void voodoo_generate_filter_v2(voodoo_t *voodoo);
|
||||||
void voodoo_threshold_check(voodoo_t *voodoo);
|
void voodoo_threshold_check(voodoo_t *voodoo);
|
||||||
void voodoo_callback(void *p);
|
void voodoo_callback(void *priv);
|
||||||
|
|
||||||
#endif /*VIDEO_VOODOO_DISPLAY_H*/
|
#endif /*VIDEO_VOODOO_DISPLAY_H*/
|
||||||
|
@@ -19,9 +19,9 @@
|
|||||||
#ifndef VIDEO_VOODOO_FB_H
|
#ifndef VIDEO_VOODOO_FB_H
|
||||||
#define VIDEO_VOODOO_FB_H
|
#define VIDEO_VOODOO_FB_H
|
||||||
|
|
||||||
uint16_t voodoo_fb_readw(uint32_t addr, void *p);
|
uint16_t voodoo_fb_readw(uint32_t addr, void *priv);
|
||||||
uint32_t voodoo_fb_readl(uint32_t addr, void *p);
|
uint32_t voodoo_fb_readl(uint32_t addr, void *priv);
|
||||||
void voodoo_fb_writew(uint32_t addr, uint16_t val, void *p);
|
void voodoo_fb_writew(uint32_t addr, uint16_t val, void *priv);
|
||||||
void voodoo_fb_writel(uint32_t addr, uint32_t val, void *p);
|
void voodoo_fb_writel(uint32_t addr, uint32_t val, void *priv);
|
||||||
|
|
||||||
#endif /*VIDEO_VOODOO_FB_H*/
|
#endif /*VIDEO_VOODOO_FB_H*/
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
void voodoo_wake_fifo_thread(voodoo_t *voodoo);
|
void voodoo_wake_fifo_thread(voodoo_t *voodoo);
|
||||||
void voodoo_wake_fifo_thread_now(voodoo_t *voodoo);
|
void voodoo_wake_fifo_thread_now(voodoo_t *voodoo);
|
||||||
void voodoo_wake_timer(void *p);
|
void voodoo_wake_timer(void *priv);
|
||||||
void voodoo_queue_command(voodoo_t *voodoo, uint32_t addr_type, uint32_t val);
|
void voodoo_queue_command(voodoo_t *voodoo, uint32_t addr_type, uint32_t val);
|
||||||
void voodoo_flush(voodoo_t *voodoo);
|
void voodoo_flush(voodoo_t *voodoo);
|
||||||
void voodoo_wake_fifo_threads(voodoo_set_t *set, voodoo_t *voodoo);
|
void voodoo_wake_fifo_threads(voodoo_set_t *set, voodoo_t *voodoo);
|
||||||
|
@@ -19,6 +19,6 @@
|
|||||||
#ifndef VIDEO_VOODOO_REG_H
|
#ifndef VIDEO_VOODOO_REG_H
|
||||||
#define VIDEO_VOODOO_REG_H
|
#define VIDEO_VOODOO_REG_H
|
||||||
|
|
||||||
void voodoo_reg_writel(uint32_t addr, uint32_t val, void *p);
|
void voodoo_reg_writel(uint32_t addr, uint32_t val, void *priv);
|
||||||
|
|
||||||
#endif /*VIDEO_VOODOO_REG_H*/
|
#endif /*VIDEO_VOODOO_REG_H*/
|
||||||
|
@@ -36,7 +36,7 @@ static const uint32_t texture_offset[LOD_MAX + 3] = {
|
|||||||
void voodoo_recalc_tex12(voodoo_t *voodoo, int tmu);
|
void voodoo_recalc_tex12(voodoo_t *voodoo, int tmu);
|
||||||
void voodoo_recalc_tex3(voodoo_t *voodoo, int tmu);
|
void voodoo_recalc_tex3(voodoo_t *voodoo, int tmu);
|
||||||
void voodoo_use_texture(voodoo_t *voodoo, voodoo_params_t *params, int tmu);
|
void voodoo_use_texture(voodoo_t *voodoo, voodoo_params_t *params, int tmu);
|
||||||
void voodoo_tex_writel(uint32_t addr, uint32_t val, void *p);
|
void voodoo_tex_writel(uint32_t addr, uint32_t val, void *priv);
|
||||||
void flush_texture_cache(voodoo_t *voodoo, uint32_t dirty_addr, int tmu);
|
void flush_texture_cache(voodoo_t *voodoo, uint32_t dirty_addr, int tmu);
|
||||||
|
|
||||||
#endif /* VIDEO_VOODOO_TEXTURE_H*/
|
#endif /* VIDEO_VOODOO_TEXTURE_H*/
|
||||||
|
@@ -229,17 +229,17 @@ extern int video_card_available(int card);
|
|||||||
#ifdef EMU_DEVICE_H
|
#ifdef EMU_DEVICE_H
|
||||||
extern const device_t *video_card_getdevice(int card);
|
extern const device_t *video_card_getdevice(int card);
|
||||||
#endif
|
#endif
|
||||||
extern int video_card_has_config(int card);
|
extern int video_card_has_config(int card);
|
||||||
extern char *video_get_internal_name(int card);
|
extern const char *video_get_internal_name(int card);
|
||||||
extern int video_get_video_from_internal_name(char *s);
|
extern int video_get_video_from_internal_name(char *s);
|
||||||
extern int video_card_get_flags(int card);
|
extern int video_card_get_flags(int card);
|
||||||
extern int video_is_mda(void);
|
extern int video_is_mda(void);
|
||||||
extern int video_is_cga(void);
|
extern int video_is_cga(void);
|
||||||
extern int video_is_ega_vga(void);
|
extern int video_is_ega_vga(void);
|
||||||
extern int video_is_8514(void);
|
extern int video_is_8514(void);
|
||||||
extern int video_is_xga(void);
|
extern int video_is_xga(void);
|
||||||
extern void video_inform_monitor(int type, const video_timings_t *ptr, int monitor_index);
|
extern void video_inform_monitor(int type, const video_timings_t *ptr, int monitor_index);
|
||||||
extern int video_get_type_monitor(int monitor_index);
|
extern int video_get_type_monitor(int monitor_index);
|
||||||
|
|
||||||
extern void video_setblit(void (*blit)(int, int, int, int, int));
|
extern void video_setblit(void (*blit)(int, int, int, int, int));
|
||||||
extern void video_blend(int x, int y);
|
extern void video_blend(int x, int y);
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#define ZIP_250_SECTORS (489532)
|
#define ZIP_250_SECTORS (489532)
|
||||||
|
|
||||||
#define ZIP_IMAGE_HISTORY 4
|
#define ZIP_IMAGE_HISTORY 4
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
ZIP_BUS_DISABLED = 0,
|
ZIP_BUS_DISABLED = 0,
|
||||||
@@ -57,7 +57,7 @@ typedef struct zip_drive_t {
|
|||||||
uint8_t pad;
|
uint8_t pad;
|
||||||
uint8_t pad0;
|
uint8_t pad0;
|
||||||
|
|
||||||
FILE *f;
|
FILE *fp;
|
||||||
void *priv;
|
void *priv;
|
||||||
|
|
||||||
char image_path[1024];
|
char image_path[1024];
|
||||||
|
Reference in New Issue
Block a user