More linting in src/include/86box
This commit is contained in:
@@ -191,10 +191,10 @@ typedef struct cdrom {
|
||||
|
||||
void *image;
|
||||
|
||||
void (*insert)(void *p);
|
||||
void (*close)(void *p);
|
||||
uint32_t (*get_volume)(void *p, int channel);
|
||||
uint32_t (*get_channel)(void *p, int channel);
|
||||
void (*insert)(void *priv);
|
||||
void (*close)(void *priv);
|
||||
uint32_t (*get_volume)(void *priv, int channel);
|
||||
uint32_t (*get_channel)(void *priv, int channel);
|
||||
|
||||
int16_t cd_buffer[BUF_SIZE];
|
||||
} cdrom_t;
|
||||
|
@@ -45,17 +45,17 @@ typedef struct SMSF {
|
||||
} TMSF;
|
||||
|
||||
/* Track file struct. */
|
||||
typedef struct {
|
||||
int (*read)(void *p, uint8_t *buffer, uint64_t seek, size_t count);
|
||||
uint64_t (*get_length)(void *p);
|
||||
void (*close)(void *p);
|
||||
typedef struct track_file_t {
|
||||
int (*read)(void *priv, uint8_t *buffer, uint64_t seek, size_t count);
|
||||
uint64_t (*get_length)(void *priv);
|
||||
void (*close)(void *priv);
|
||||
|
||||
char fn[260];
|
||||
FILE *file;
|
||||
FILE *fp;
|
||||
void *priv;
|
||||
} track_file_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct track_t {
|
||||
int number;
|
||||
int track_number;
|
||||
int attr;
|
||||
@@ -70,7 +70,7 @@ typedef struct {
|
||||
track_file_t *file;
|
||||
} track_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct cd_img_t {
|
||||
int tracks_num;
|
||||
track_t *tracks;
|
||||
} 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);
|
||||
|
||||
/* Virtual ISO functions. */
|
||||
extern int viso_read(void *p, uint8_t *buffer, uint64_t seek, size_t count);
|
||||
extern uint64_t viso_get_length(void *p);
|
||||
extern void viso_close(void *p);
|
||||
extern int viso_read(void *priv, uint8_t *buffer, uint64_t seek, size_t count);
|
||||
extern uint64_t viso_get_length(void *priv);
|
||||
extern void viso_close(void *priv);
|
||||
extern track_file_t *viso_init(const char *dirname, int *error);
|
||||
|
||||
#endif /*CDROM_IMAGE_BACKEND_H*/
|
||||
|
@@ -21,7 +21,7 @@ extern int cdrom_interface_current;
|
||||
|
||||
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_has_config(int cdinterface);
|
||||
extern const device_t *cdrom_interface_get_device(int cdinterface);
|
||||
|
@@ -30,9 +30,9 @@ extern "C" {
|
||||
typedef struct storage_cfg_t {
|
||||
uint8_t id;
|
||||
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. */
|
||||
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
|
||||
on the device */
|
||||
uint8_t is_image; /* This is only used for CD-ROM:
|
||||
|
@@ -161,36 +161,36 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
extern void device_init(void);
|
||||
extern void device_set_context(device_context_t *c, const device_t *d, int inst);
|
||||
extern void device_context(const device_t *d);
|
||||
extern void device_context_inst(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 *dev);
|
||||
extern void device_context_inst(const device_t *dev, int inst);
|
||||
extern void device_context_restore(void);
|
||||
extern void *device_add(const device_t *d);
|
||||
extern void *device_add_parameters(const device_t *d, void *params);
|
||||
extern void device_add_ex(const device_t *d, void *priv);
|
||||
extern void device_add_ex_parameters(const device_t *d, void *priv, void *params);
|
||||
extern void *device_add_inst(const device_t *d, int inst);
|
||||
extern void *device_add_inst_parameters(const device_t *d, int inst, void *params);
|
||||
extern void device_add_inst_ex(const device_t *d, void *priv, int inst);
|
||||
extern void device_add_inst_ex_parameters(const device_t *d, void *priv, int inst, void *params);
|
||||
extern void *device_cadd(const device_t *d, const device_t *cd);
|
||||
extern void *device_cadd_parameters(const device_t *d, 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_parameters(const device_t *d, 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_parameters(const device_t *d, 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_parameters(const device_t *d, const device_t *cd, void *priv, int inst, void *params);
|
||||
extern void *device_add_parameters(const device_t *dev, void *params);
|
||||
extern void device_add_ex(const device_t *dev, void *priv);
|
||||
extern void device_add_ex_parameters(const device_t *dev, void *priv, void *params);
|
||||
extern void *device_add_inst(const device_t *dev, int inst);
|
||||
extern void *device_add_inst_parameters(const device_t *dev, int inst, void *params);
|
||||
extern void device_add_inst_ex(const device_t *dev, void *priv, int inst);
|
||||
extern void device_add_inst_ex_parameters(const device_t *dev, void *priv, int inst, void *params);
|
||||
extern void *device_cadd(const device_t *dev, const device_t *cd);
|
||||
extern void *device_cadd_parameters(const device_t *dev, const device_t *cd, void *params);
|
||||
extern void device_cadd_ex(const device_t *dev, const device_t *cd, void *priv);
|
||||
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 *dev, const device_t *cd, int inst);
|
||||
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 *dev, const device_t *cd, void *priv, int inst);
|
||||
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_reset_all(uint32_t match_flags);
|
||||
extern void *device_get_priv(const device_t *d);
|
||||
extern int device_available(const device_t *d);
|
||||
extern int device_poll(const device_t *d);
|
||||
extern void *device_get_priv(const device_t *dev);
|
||||
extern int device_available(const device_t *dev);
|
||||
extern int device_poll(const device_t *dev);
|
||||
extern void device_speed_changed(void);
|
||||
extern void device_force_redraw(void);
|
||||
extern void device_get_name(const device_t *d, int bus, char *name);
|
||||
extern int device_has_config(const device_t *d);
|
||||
extern const char *device_get_bios_file(const device_t *d, const char *internal_name, int file_no);
|
||||
extern void device_get_name(const device_t *dev, int bus, char *name);
|
||||
extern int device_has_config(const device_t *dev);
|
||||
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);
|
||||
|
||||
@@ -207,7 +207,7 @@ extern const char *device_get_config_string(const char *name);
|
||||
extern const int device_get_instance(void);
|
||||
#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 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 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 const device_t *fdc_card_getdevice(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);
|
||||
|
||||
typedef struct {
|
||||
typedef struct d86f_handler_t {
|
||||
uint16_t (*disk_flags)(int drive);
|
||||
uint16_t (*side_flags)(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 uint16_t xdf_trackx_spos[2][8];
|
||||
|
||||
typedef struct {
|
||||
typedef struct xdf_id_t {
|
||||
uint8_t h;
|
||||
uint8_t r;
|
||||
} 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_disk_layout[2][2][38];
|
||||
|
||||
typedef struct {
|
||||
typedef struct sector_id_fields_t {
|
||||
uint8_t c;
|
||||
uint8_t h;
|
||||
uint8_t r;
|
||||
uint8_t n;
|
||||
} sector_id_fields_t;
|
||||
|
||||
typedef union {
|
||||
typedef union sector_id_t {
|
||||
uint32_t dword;
|
||||
uint8_t byte_array[4];
|
||||
sector_id_fields_t id;
|
||||
|
@@ -13,14 +13,19 @@
|
||||
* Copyright 2023 Miran Grca.
|
||||
*/
|
||||
#define FIFO(size) \
|
||||
typedef struct \
|
||||
{ \
|
||||
int start, end, \
|
||||
trigger_len, len, \
|
||||
empty, overrun, \
|
||||
full, ready, \
|
||||
d_empty, d_overrun, \
|
||||
d_full, d_ready; \
|
||||
typedef struct { \
|
||||
int start; \
|
||||
int end; \
|
||||
int trigger_len; \
|
||||
int len; \
|
||||
int empty; \
|
||||
int overrun; \
|
||||
int full; \
|
||||
int ready; \
|
||||
int d_empty; \
|
||||
int d_overrun; \
|
||||
int d_full; \
|
||||
int d_ready; \
|
||||
\
|
||||
void *priv; \
|
||||
\
|
||||
@@ -65,4 +70,4 @@ extern void fifo_set_priv(void *priv, void *sub_priv);
|
||||
extern void fifo_reset(void *priv);
|
||||
extern void fifo_reset_evt(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_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_has_config(int hdc);
|
||||
extern const device_t *hdc_get_device(int hdc);
|
||||
|
@@ -55,7 +55,7 @@ extern "C" {
|
||||
/* Functions. */
|
||||
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 const device_t *isartc_get_device(int t);
|
||||
|
||||
|
@@ -22,12 +22,12 @@ typedef struct lpt_device_t {
|
||||
const char *internal_name;
|
||||
|
||||
void *(*init)(void *lpt);
|
||||
void (*close)(void *p);
|
||||
void (*write_data)(uint8_t val, void *p);
|
||||
void (*write_ctrl)(uint8_t val, void *p);
|
||||
uint8_t (*read_data)(void *p);
|
||||
uint8_t (*read_status)(void *p);
|
||||
uint8_t (*read_ctrl)(void *p);
|
||||
void (*close)(void *priv);
|
||||
void (*write_data)(uint8_t val, void *priv);
|
||||
void (*write_ctrl)(uint8_t val, void *priv);
|
||||
uint8_t (*read_data)(void *priv);
|
||||
uint8_t (*read_status)(void *priv);
|
||||
uint8_t (*read_ctrl)(void *priv);
|
||||
} lpt_device_t;
|
||||
|
||||
extern void lpt_init(void);
|
||||
@@ -65,7 +65,7 @@ extern void lpt1_remove_ams(void);
|
||||
void lpt_devices_init(void);
|
||||
void lpt_devices_close(void);
|
||||
|
||||
typedef struct {
|
||||
typedef struct lpt_port_t {
|
||||
uint8_t enabled;
|
||||
uint8_t irq;
|
||||
uint8_t dat;
|
||||
|
@@ -288,7 +288,8 @@ typedef struct _machine_cpu_ {
|
||||
} machine_cpu_t;
|
||||
|
||||
typedef struct _machine_memory_ {
|
||||
uint32_t min, max;
|
||||
uint32_t min;
|
||||
uint32_t max;
|
||||
int step;
|
||||
} machine_memory_t;
|
||||
|
||||
@@ -346,10 +347,10 @@ extern int machine;
|
||||
/* Core functions. */
|
||||
extern int machine_count(void);
|
||||
extern int machine_available(int m);
|
||||
extern char *machine_getname(void);
|
||||
extern char *machine_getname_ex(int m);
|
||||
extern char *machine_get_internal_name(void);
|
||||
extern int machine_get_machine_from_internal_name(char *s);
|
||||
extern const char *machine_getname(void);
|
||||
extern const char *machine_getname_ex(int m);
|
||||
extern const char *machine_get_internal_name(void);
|
||||
extern int machine_get_machine_from_internal_name(const char *s);
|
||||
extern void machine_init(void);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *machine_get_kbc_device(int m);
|
||||
@@ -360,7 +361,7 @@ 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_net_device(int m);
|
||||
#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_has_flags(int m, int flags);
|
||||
extern int machine_has_bus(int m, int bus_flags);
|
||||
|
@@ -9,8 +9,8 @@ extern uint8_t MIDI_evt_len[256];
|
||||
extern int midi_output_device_current;
|
||||
extern int midi_input_device_current;
|
||||
|
||||
extern void (*input_msg)(void *p, uint8_t *msg, uint32_t len);
|
||||
extern int (*input_sysex)(void *p, uint8_t *buf, uint32_t len, int abort);
|
||||
extern void (*input_msg)(void *priv, uint8_t *msg, uint32_t len);
|
||||
extern int (*input_sysex)(void *priv, uint8_t *buf, uint32_t len, int abort);
|
||||
extern void *midi_in_p;
|
||||
|
||||
extern int midi_out_device_available(int card);
|
||||
@@ -21,8 +21,8 @@ const device_t *midi_in_device_getdevice(int card);
|
||||
#endif
|
||||
extern int midi_out_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 char *midi_in_device_get_internal_name(int card);
|
||||
extern const char *midi_out_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_in_device_get_from_internal_name(char *s);
|
||||
extern void midi_out_device_init(void);
|
||||
@@ -78,7 +78,7 @@ extern void midi_raw_out_byte(uint8_t val);
|
||||
extern void midi_clear_buffer(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_msg(uint8_t *msg, uint32_t len);
|
||||
extern void midi_in_sysex(uint8_t *buffer, uint32_t len);
|
||||
|
@@ -109,7 +109,7 @@ typedef struct mo_drive_t {
|
||||
uint8_t pad;
|
||||
uint8_t pad0;
|
||||
|
||||
FILE *f;
|
||||
FILE *fp;
|
||||
void *priv;
|
||||
|
||||
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_set_poll_ex(void (*poll_ex)(void));
|
||||
extern void mouse_set_poll(int (*f)(void *), void *);
|
||||
extern char * mouse_get_name(int mouse);
|
||||
extern char * mouse_get_internal_name(int mouse);
|
||||
extern const char * mouse_get_name(int mouse);
|
||||
extern const char * mouse_get_internal_name(int mouse);
|
||||
extern int mouse_get_from_internal_name(char *s);
|
||||
extern int mouse_has_config(int mouse);
|
||||
#ifdef EMU_DEVICE_H
|
||||
|
@@ -194,7 +194,7 @@ extern int network_dev_available(int);
|
||||
extern int network_dev_to_id(char *);
|
||||
extern int network_card_available(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 const device_t *network_card_getdevice(int);
|
||||
|
||||
|
@@ -11,6 +11,6 @@ extern int nmi_auto_clear;
|
||||
|
||||
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*/
|
||||
|
@@ -25,11 +25,11 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void plat_serpt_write(void *p, uint8_t data);
|
||||
extern int plat_serpt_read(void *p, uint8_t *data);
|
||||
extern int plat_serpt_open_device(void *p);
|
||||
extern void plat_serpt_close(void *p);
|
||||
extern void plat_serpt_set_params(void *p);
|
||||
extern void plat_serpt_write(void *priv, uint8_t data);
|
||||
extern int plat_serpt_read(void *priv, uint8_t *data);
|
||||
extern int plat_serpt_open_device(void *priv);
|
||||
extern void plat_serpt_close(void *priv);
|
||||
extern void plat_serpt_set_params(void *priv);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -48,9 +48,9 @@ extern rom_path_t rom_paths;
|
||||
|
||||
extern void rom_add_path(const char *path);
|
||||
|
||||
extern uint8_t rom_read(uint32_t addr, void *p);
|
||||
extern uint16_t rom_readw(uint32_t addr, void *p);
|
||||
extern uint32_t rom_readl(uint32_t addr, void *p);
|
||||
extern uint8_t rom_read(uint32_t addr, void *priv);
|
||||
extern uint16_t rom_readw(uint32_t addr, void *priv);
|
||||
extern uint32_t rom_readl(uint32_t addr, void *priv);
|
||||
|
||||
extern FILE *rom_fopen(const char *fn, char *mode);
|
||||
extern int rom_getfile(char *fn, char *s, int size);
|
||||
|
@@ -18,8 +18,7 @@
|
||||
#ifndef EMU_ROW_H
|
||||
# define EMU_ROW_H
|
||||
|
||||
typedef struct _row_
|
||||
{
|
||||
typedef struct _row_ {
|
||||
struct _smram_ *prev;
|
||||
struct _smram_ *next;
|
||||
|
||||
@@ -35,12 +34,9 @@ typedef struct _row_
|
||||
uint32_t boundary;
|
||||
} row_t;
|
||||
|
||||
|
||||
extern void row_disable(uint8_t row_id);
|
||||
extern void row_set_boundary(uint8_t row_id, uint32_t boundary);
|
||||
|
||||
|
||||
extern device_t row_device;
|
||||
|
||||
|
||||
#endif /*EMU_ROW_H*/
|
||||
|
@@ -34,7 +34,7 @@ extern int scsi_card_available(int card);
|
||||
extern const device_t *scsi_card_getdevice(int card);
|
||||
#endif
|
||||
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 void scsi_card_init(void);
|
||||
|
||||
|
@@ -8,6 +8,6 @@ extern const device_t aha154xcf_device;
|
||||
extern const device_t aha154xcp_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*/
|
||||
|
@@ -29,6 +29,6 @@ extern const device_t buslogic_445s_device;
|
||||
extern const device_t buslogic_445c_device;
|
||||
extern const device_t buslogic_958d_pci_device;
|
||||
|
||||
extern void BuslogicDeviceReset(void *p);
|
||||
extern void BuslogicDeviceReset(void *priv);
|
||||
|
||||
#endif /*SCSI_BUSLOGIC_H*/
|
||||
|
@@ -347,7 +347,7 @@ typedef struct mode_sense_pages_t {
|
||||
typedef struct scsi_common_s {
|
||||
mode_sense_pages_t ms_pages_saved;
|
||||
|
||||
void *p;
|
||||
void *priv;
|
||||
|
||||
uint8_t *temp_buffer;
|
||||
uint8_t atapi_cdb[16]; /* This is atapi_cdb in ATAPI-supporting devices,
|
||||
|
@@ -257,10 +257,10 @@ typedef struct Mailbox32_t {
|
||||
|
||||
typedef struct CCB32_t {
|
||||
uint8_t Opcode;
|
||||
uint8_t Reserved1 : 3,
|
||||
ControlByte : 2,
|
||||
TagQueued : 1,
|
||||
QueueTag : 2;
|
||||
uint8_t Reserved1 : 3;
|
||||
uint8_t ControlByte : 2;
|
||||
uint8_t TagQueued : 1;
|
||||
uint8_t QueueTag : 2;
|
||||
uint8_t CdbLength;
|
||||
uint8_t RequestSenseLength;
|
||||
uint32_t DataLength;
|
||||
@@ -269,9 +269,9 @@ typedef struct CCB32_t {
|
||||
uint8_t HostStatus;
|
||||
uint8_t TargetStatus;
|
||||
uint8_t Id;
|
||||
uint8_t Lun : 5,
|
||||
LegacyTagEnable : 1,
|
||||
LegacyQueueTag : 2;
|
||||
uint8_t Lun : 5;
|
||||
uint8_t LegacyTagEnable : 1;
|
||||
uint8_t LegacyQueueTag : 2;
|
||||
uint8_t Cdb[12];
|
||||
uint8_t Reserved3[6];
|
||||
uint32_t SensePointer;
|
||||
@@ -296,9 +296,9 @@ typedef struct CCB_t {
|
||||
|
||||
typedef struct CCBC_t {
|
||||
uint8_t Opcode;
|
||||
uint8_t Pad1 : 3,
|
||||
ControlByte : 2,
|
||||
Pad2 : 3;
|
||||
uint8_t Pad1 : 3;
|
||||
uint8_t ControlByte : 2;
|
||||
uint8_t Pad2 : 3;
|
||||
uint8_t CdbLength;
|
||||
uint8_t RequestSenseLength;
|
||||
uint8_t Pad3[9];
|
||||
@@ -329,9 +329,9 @@ typedef struct {
|
||||
|
||||
typedef struct BIOSCMD_t {
|
||||
uint8_t command;
|
||||
uint8_t lun : 3,
|
||||
reserved : 2,
|
||||
id : 3;
|
||||
uint8_t lun : 3;
|
||||
uint8_t reserved : 2;
|
||||
uint8_t id : 3;
|
||||
union {
|
||||
struct chs_t {
|
||||
uint16_t cyl;
|
||||
@@ -482,31 +482,31 @@ typedef struct x54x_t {
|
||||
void *ven_data;
|
||||
|
||||
/* 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 */
|
||||
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 */
|
||||
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 */
|
||||
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 */
|
||||
uint8_t (*ven_get_dma)(void *p);
|
||||
uint8_t (*ven_get_dma)(void *priv);
|
||||
/* 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 */
|
||||
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 */
|
||||
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 */
|
||||
uint8_t (*ven_cmds)(void *p);
|
||||
uint8_t (*ven_cmds)(void *priv);
|
||||
/* 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 */
|
||||
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) */
|
||||
uint8_t (*interrupt_type)(void *p);
|
||||
uint8_t (*interrupt_type)(void *priv);
|
||||
/* 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 uppersck; /* BIOS memory descriptor */
|
||||
|
@@ -91,10 +91,10 @@ typedef struct serial_s {
|
||||
} serial_t;
|
||||
|
||||
typedef struct serial_device_s {
|
||||
void (*rcr_callback)(struct serial_s *serial, void *p);
|
||||
void (*dev_write)(struct serial_s *serial, void *p, uint8_t data);
|
||||
void (*lcr_callback)(struct serial_s *serial, void *p, uint8_t lcr);
|
||||
void (*transmit_period_callback)(struct serial_s *serial, void *p, double transmit_period);
|
||||
void (*rcr_callback)(struct serial_s *serial, void *priv);
|
||||
void (*dev_write)(struct serial_s *serial, void *priv, uint8_t data);
|
||||
void (*lcr_callback)(struct serial_s *serial, void *priv, uint8_t lcr);
|
||||
void (*transmit_period_callback)(struct serial_s *serial, void *priv, double transmit_period);
|
||||
void *priv;
|
||||
serial_t *serial;
|
||||
} serial_device_t;
|
||||
@@ -106,10 +106,10 @@ typedef struct serial_port_s {
|
||||
extern serial_port_t com_ports[SERIAL_MAX];
|
||||
|
||||
extern serial_t *serial_attach_ex(int port,
|
||||
void (*rcr_callback)(struct serial_s *serial, void *p),
|
||||
void (*dev_write)(struct serial_s *serial, void *p, uint8_t data),
|
||||
void (*transmit_period_callback)(struct serial_s *serial, void *p, double transmit_period),
|
||||
void (*lcr_callback)(struct serial_s *serial, void *p, uint8_t data_bits),
|
||||
void (*rcr_callback)(struct serial_s *serial, void *priv),
|
||||
void (*dev_write)(struct serial_s *serial, void *priv, uint8_t data),
|
||||
void (*transmit_period_callback)(struct serial_s *serial, void *priv, double transmit_period),
|
||||
void (*lcr_callback)(struct serial_s *serial, void *priv, uint8_t data_bits),
|
||||
void *priv);
|
||||
|
||||
#define serial_attach(port, rcr_callback, dev_write, priv) \
|
||||
|
@@ -67,8 +67,8 @@ typedef struct ad1848_t {
|
||||
int16_t buffer[SOUNDBUFLEN * 2];
|
||||
int pos;
|
||||
|
||||
void *cram_priv,
|
||||
(*cram_write)(uint16_t addr, uint8_t val, void *priv);
|
||||
void *cram_priv;
|
||||
void (*cram_write)(uint16_t addr, uint8_t val, void *priv);
|
||||
uint8_t (*cram_read)(uint16_t addr, void *priv);
|
||||
} ad1848_t;
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#ifndef 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*/
|
||||
|
@@ -27,7 +27,7 @@ typedef struct cms_t {
|
||||
} cms_t;
|
||||
|
||||
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);
|
||||
extern void cms_write(uint16_t addr, uint8_t val, void *priv);
|
||||
extern uint8_t cms_read(uint16_t addr, void *priv);
|
||||
|
||||
#endif /*SOUND_CMS_H*/
|
||||
|
@@ -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_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 void MPU401_InputMsg(void *p, uint8_t *msg, uint32_t len);
|
||||
extern int MPU401_InputSysex(void *priv, uint8_t *buffer, uint32_t len, int abort);
|
||||
extern void MPU401_InputMsg(void *priv, uint8_t *msg, uint32_t len);
|
||||
|
||||
#endif /*SOUND_MPU401_H*/
|
||||
|
@@ -5,11 +5,11 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
void *sid_init(void);
|
||||
void sid_close(void *p);
|
||||
void sid_reset(void *p);
|
||||
uint8_t sid_read(uint16_t addr, void *p);
|
||||
void sid_write(uint16_t addr, uint8_t val, void *p);
|
||||
void sid_fillbuf(int16_t *buf, int len, void *p);
|
||||
void sid_close(void *priv);
|
||||
void sid_reset(void *priv);
|
||||
uint8_t sid_read(uint16_t addr, void *priv);
|
||||
void sid_write(uint16_t addr, uint8_t val, void *priv);
|
||||
void sid_fillbuf(int16_t *buf, int len, void *priv);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -152,18 +152,18 @@ typedef struct sb_t {
|
||||
void (*opl_mix)(void*, double*, double*);
|
||||
} sb_t;
|
||||
|
||||
extern void sb_ct1345_mixer_write(uint16_t addr, uint8_t val, void *p);
|
||||
extern uint8_t sb_ct1345_mixer_read(uint16_t addr, 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 *priv);
|
||||
extern void sb_ct1345_mixer_reset(sb_t *sb);
|
||||
|
||||
extern void sb_ct1745_mixer_write(uint16_t addr, uint8_t val, void *p);
|
||||
extern uint8_t sb_ct1745_mixer_read(uint16_t addr, 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 *priv);
|
||||
extern void sb_ct1745_mixer_reset(sb_t *sb);
|
||||
|
||||
extern void sb_get_buffer_sbpro(int32_t *buffer, int len, void *p);
|
||||
extern void sbpro_filter_cd_audio(int channel, double *buffer, void *p);
|
||||
extern void sb16_awe32_filter_cd_audio(int channel, double *buffer, void *p);
|
||||
extern void sb_close(void *p);
|
||||
extern void sb_speed_changed(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 *priv);
|
||||
extern void sb16_awe32_filter_cd_audio(int channel, double *buffer, void *priv);
|
||||
extern void sb_close(void *priv);
|
||||
extern void sb_speed_changed(void *priv);
|
||||
|
||||
#endif /*SOUND_SND_SB_H*/
|
||||
|
@@ -132,9 +132,9 @@ typedef struct sb_dsp_t {
|
||||
mpu_t *mpu;
|
||||
} 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);
|
||||
|
||||
|
@@ -50,18 +50,18 @@ extern int sound_pos_global;
|
||||
extern int sound_card_current[SOUND_CARD_MAX];
|
||||
|
||||
extern void sound_add_handler(void (*get_buffer)(int32_t *buffer,
|
||||
int len, void *p),
|
||||
void *p);
|
||||
int len, void *priv),
|
||||
void *priv);
|
||||
extern void sound_set_cd_audio_filter(void (*filter)(int channel,
|
||||
double *buffer, void *p),
|
||||
void *p);
|
||||
double *buffer, void *priv),
|
||||
void *priv);
|
||||
|
||||
extern int sound_card_available(int card);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *sound_card_getdevice(int card);
|
||||
#endif
|
||||
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 void sound_card_init(void);
|
||||
extern void sound_set_cd_volume(unsigned int vol_l, unsigned int vol_r);
|
||||
|
@@ -12,8 +12,7 @@
|
||||
#define TIMER_ENABLED 1
|
||||
|
||||
#pragma pack(push, 1)
|
||||
typedef struct ts_struct_t
|
||||
{
|
||||
typedef struct ts_struct_t {
|
||||
uint32_t frac;
|
||||
uint32_t integer;
|
||||
} ts_struct_t;
|
||||
|
@@ -22,11 +22,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t uhci_io[32], ohci_mmio[4096];
|
||||
typedef struct usb_t {
|
||||
uint8_t uhci_io[32];
|
||||
uint8_t ohci_mmio[4096];
|
||||
uint16_t uhci_io_base;
|
||||
int uhci_enable, ohci_enable;
|
||||
int uhci_enable;
|
||||
int ohci_enable;
|
||||
uint32_t ohci_mem_base;
|
||||
mem_mapping_t ohci_mmio_mapping;
|
||||
} usb_t;
|
||||
|
@@ -7,12 +7,12 @@ typedef struct colorplus_t {
|
||||
} colorplus_t;
|
||||
|
||||
void colorplus_init(colorplus_t *colorplus);
|
||||
void colorplus_out(uint16_t addr, uint8_t val, void *p);
|
||||
uint8_t colorplus_in(uint16_t addr, void *p);
|
||||
void colorplus_write(uint32_t addr, uint8_t val, void *p);
|
||||
uint8_t colorplus_read(uint32_t addr, void *p);
|
||||
void colorplus_out(uint16_t addr, uint8_t val, void *priv);
|
||||
uint8_t colorplus_in(uint16_t addr, void *priv);
|
||||
void colorplus_write(uint32_t addr, uint8_t val, void *priv);
|
||||
uint8_t colorplus_read(uint32_t addr, void *priv);
|
||||
void colorplus_recalctimings(colorplus_t *colorplus);
|
||||
void colorplus_poll(void *p);
|
||||
void colorplus_poll(void *priv);
|
||||
|
||||
extern const device_t colorplus_device;
|
||||
|
||||
|
@@ -71,8 +71,10 @@ typedef struct pgc {
|
||||
uint8_t hex_command;
|
||||
uint32_t palette[256];
|
||||
uint32_t userpal[256];
|
||||
uint32_t maxw, maxh; /* maximum framebuffer size */
|
||||
uint32_t visw, vish; /* maximum screen size */
|
||||
uint32_t maxw; /* maximum framebuffer size - Width */
|
||||
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 screenh;
|
||||
int16_t pan_x;
|
||||
|
@@ -350,8 +350,7 @@ typedef struct voodoo_t {
|
||||
int h_disp;
|
||||
int v_retrace;
|
||||
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
uint32_t y[4];
|
||||
uint32_t i[4];
|
||||
uint32_t q[4];
|
||||
@@ -489,8 +488,7 @@ typedef struct voodoo_t {
|
||||
|
||||
uint32_t leftOverlayBuf;
|
||||
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
int dst_x;
|
||||
int dst_y;
|
||||
int cur_x;
|
||||
@@ -501,8 +499,7 @@ typedef struct voodoo_t {
|
||||
int dst_stride;
|
||||
} blt;
|
||||
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
uint32_t bresError0;
|
||||
uint32_t bresError1;
|
||||
uint32_t clip0Min;
|
||||
@@ -590,8 +587,7 @@ typedef struct voodoo_t {
|
||||
int line_bit_mask_size;
|
||||
} banshee_blt;
|
||||
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
uint32_t vidOverlayStartCoords;
|
||||
uint32_t vidOverlayEndScreenCoords;
|
||||
uint32_t vidOverlayDudx;
|
||||
@@ -671,7 +667,7 @@ typedef struct voodoo_t {
|
||||
uint8_t *vram;
|
||||
uint8_t *changedvram;
|
||||
|
||||
void *p;
|
||||
void *priv;
|
||||
uint8_t monitor_index;
|
||||
} 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_v2(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*/
|
||||
|
@@ -19,9 +19,9 @@
|
||||
#ifndef VIDEO_VOODOO_FB_H
|
||||
#define VIDEO_VOODOO_FB_H
|
||||
|
||||
uint16_t voodoo_fb_readw(uint32_t addr, void *p);
|
||||
uint32_t voodoo_fb_readl(uint32_t addr, void *p);
|
||||
void voodoo_fb_writew(uint32_t addr, uint16_t val, void *p);
|
||||
void voodoo_fb_writel(uint32_t addr, uint32_t val, void *p);
|
||||
uint16_t voodoo_fb_readw(uint32_t addr, void *priv);
|
||||
uint32_t voodoo_fb_readl(uint32_t addr, void *priv);
|
||||
void voodoo_fb_writew(uint32_t addr, uint16_t val, void *priv);
|
||||
void voodoo_fb_writel(uint32_t addr, uint32_t val, void *priv);
|
||||
|
||||
#endif /*VIDEO_VOODOO_FB_H*/
|
||||
|
@@ -21,7 +21,7 @@
|
||||
|
||||
void voodoo_wake_fifo_thread(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_flush(voodoo_t *voodoo);
|
||||
void voodoo_wake_fifo_threads(voodoo_set_t *set, voodoo_t *voodoo);
|
||||
|
@@ -19,6 +19,6 @@
|
||||
#ifndef 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*/
|
||||
|
@@ -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_tex3(voodoo_t *voodoo, 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);
|
||||
|
||||
#endif /* VIDEO_VOODOO_TEXTURE_H*/
|
||||
|
@@ -230,7 +230,7 @@ extern int video_card_available(int card);
|
||||
extern const device_t *video_card_getdevice(int card);
|
||||
#endif
|
||||
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_card_get_flags(int card);
|
||||
extern int video_is_mda(void);
|
||||
|
@@ -57,7 +57,7 @@ typedef struct zip_drive_t {
|
||||
uint8_t pad;
|
||||
uint8_t pad0;
|
||||
|
||||
FILE *f;
|
||||
FILE *fp;
|
||||
void *priv;
|
||||
|
||||
char image_path[1024];
|
||||
|
Reference in New Issue
Block a user