Merge remote-tracking branch 'origin/master' into cdrom_changes

This commit is contained in:
OBattler
2025-03-10 16:57:56 +01:00
57 changed files with 4887 additions and 2284 deletions

View File

@@ -126,7 +126,6 @@ extern int video_filter_method; /* (C) video */
extern int video_vsync; /* (C) video */
extern int video_framerate; /* (C) video */
extern int gfxcard[GFXCARD_MAX]; /* (C) graphics/video card */
extern char video_shader[512]; /* (C) video */
extern int bugger_enabled; /* (C) enable ISAbugger */
extern int novell_keycard_enabled; /* (C) enable Novell NetWare 2.x key card emulation. */
extern int postcard_enabled; /* (C) enable POST card */
@@ -188,6 +187,8 @@ extern FILE *stdlog; /* file to log output to */
#endif
extern int config_changed; /* config has changed */
extern __thread int is_cpu_thread; /* Is this the CPU thread? */
/* Function prototypes. */
#ifdef HAVE_STDARG_H
extern void pclog_ex(const char *fmt, va_list ap);

View File

@@ -137,12 +137,11 @@ typedef struct device_config_spinner_t {
typedef struct device_config_bios_t {
const char *name;
const char *internal_name;
int bios_type;
int files_no;
uint8_t bios_type;
uint8_t files_no;
uint32_t local;
uint32_t size;
void *dev1;
void *dev2;
void *dev[2];
const char *files[9];
} device_config_bios_t;
@@ -211,6 +210,11 @@ extern void device_speed_changed(void);
extern void device_force_redraw(void);
extern void device_get_name(const device_t *dev, int bus, char *name);
extern int device_has_config(const device_t *dev);
extern uint8_t device_get_bios_type(const device_t *dev, const char *internal_name);
extern uint8_t device_get_bios_num_files(const device_t *dev, const char *internal_name);
extern uint32_t device_get_bios_local(const device_t *dev, const char *internal_name);
extern uint32_t device_get_bios_file_size(const device_t *dev, const char *internal_name);
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 mch);

View File

@@ -99,10 +99,12 @@ extern const device_t mcide_device;
extern const device_t xta_wdxt150_device; /* xta_wdxt150 */
extern const device_t xta_hd20_device; /* EuroPC internal */
extern const device_t xtide_device; /* xtide_xt */
extern const device_t xtide_at_device; /* xtide_at */
extern const device_t xtide_acculogic_device; /* xtide_ps2 */
extern const device_t xtide_at_ps2_device; /* xtide_at_ps2 */
extern const device_t xtide_device; /* xtide_xt */
extern const device_t xtide_at_device; /* xtide_at */
extern const device_t xtide_at_2ch_device; /* xtide_at_2ch */
extern const device_t xtide_acculogic_device; /* xtide_ps2 */
extern const device_t xtide_at_ps2_device; /* xtide_at_ps2 */
extern const device_t xtide_at_ps2_2ch_device; /* xtide_at_ps2_2ch */
/* Miscellaneous */
extern const device_t lba_enhancer_device;

View File

@@ -31,6 +31,7 @@ typedef void *ini_section_t;
extern ini_t ini_new(void);
extern ini_t ini_read(const char *fn);
extern void ini_strip_quotes(ini_t ini);
extern void ini_write(ini_t ini, const char *fn);
extern void ini_dump(ini_t ini);
extern void ini_close(ini_t ini);
@@ -58,6 +59,7 @@ extern void ini_section_set_hex20(ini_section_t section, const char *name, i
extern void ini_section_set_mac(ini_section_t section, const char *name, int val);
extern void ini_section_set_string(ini_section_t section, const char *name, const char *val);
extern void ini_section_set_wstring(ini_section_t section, const char *name, wchar_t *val);
extern int ini_has_entry(ini_section_t self, const char *name);
#define ini_delete_var(ini, head, name) ini_section_delete_var(ini_find_section(ini, head), name)

View File

@@ -54,16 +54,16 @@ typedef struct kbc_at_port_t {
typedef struct atkbc_dev_t {
const char *name; /* name of this device */
uint8_t type;
uint8_t command;
uint8_t last_scan_code;
uint8_t state;
uint8_t resolution;
uint8_t rate;
uint8_t cmd_queue_start;
uint8_t cmd_queue_end;
uint8_t queue_start;
uint8_t queue_end;
uint8_t type;
uint8_t command;
uint8_t last_scan_code;
uint8_t state;
uint8_t resolution;
uint8_t rate;
uint8_t cmd_queue_start;
uint8_t cmd_queue_end;
uint8_t queue_start;
uint8_t queue_end;
uint16_t flags;

158
src/include/86box/qt-glsl.h Normal file
View File

@@ -0,0 +1,158 @@
#ifndef SRC_WX_GLSL_H_
#define SRC_WX_GLSL_H_
#define MAX_PREV 7
#define MAX_SHADERS 20
#define MAX_TEXTURES 20
#define MAX_PARAMETERS 100
#define MAX_USER_SHADERS 20
//#define SDL2_SHADER_DEBUG
struct shader_scale {
int mode[2];
float value[2];
};
struct shader_state {
float input_size[2];
float input_texture_size[2];
float output_texture_size[2];
float output_size[2];
float tex_coords[8];
};
struct shader_vbo {
int vertex_coord;
int tex_coord;
int color;
};
struct shader_texture {
int id;
int width;
int height;
int type;
int internal_format;
int format;
int min_filter;
int mag_filter;
int wrap_mode;
void *data;
int mipmap;
};
struct shader_lut_texture {
char name[50];
struct shader_texture texture;
};
struct shader_fbo {
int id;
struct shader_texture texture;
int srgb;
int mipmap_input;
};
struct shader_prev {
struct shader_fbo fbo;
struct shader_vbo vbo;
};
struct shader_input {
int texture;
int input_size;
int texture_size;
int tex_coord;
};
struct shader_uniforms {
int mvp_matrix;
int vertex_coord;
int tex_coord;
int color;
int texture;
int input_size;
int texture_size;
int output_size;
int frame_count;
int frame_direction;
struct shader_input orig;
struct shader_input pass[MAX_SHADERS];
struct shader_input prev_pass[MAX_SHADERS];
struct shader_input prev[MAX_PREV];
int parameters[MAX_PARAMETERS];
int lut_textures[MAX_TEXTURES];
};
struct shader_program {
int vertex_shader;
int fragment_shader;
int id;
};
struct shader_parameter {
char id[64];
char description[64];
float default_value;
float value;
float min;
float max;
float step;
};
struct shader_pass {
int active;
char alias[64];
int vertex_array;
int frame_count_mod;
struct shader_program program;
struct shader_uniforms uniforms;
struct shader_fbo fbo;
struct shader_vbo vbo;
struct shader_state state;
struct shader_scale scale;
};
struct glsl_shader {
int active;
char name[64];
int num_passes;
struct shader_pass passes[MAX_SHADERS];
int num_lut_textures;
struct shader_lut_texture lut_textures[MAX_TEXTURES];
int num_parameters;
struct shader_parameter parameters[MAX_PARAMETERS];
struct shader_pass prev_scene;
struct shader_prev prev[MAX_PREV + 1];
int last_prev_update;
int has_prev;
float shader_refresh_rate;
int input_filter_linear;
};
typedef struct glsl_t {
int num_shaders;
struct glsl_shader shaders[MAX_USER_SHADERS];
struct shader_pass scene;
struct shader_pass final_pass;
struct shader_pass fs_color;
#ifdef SDL2_SHADER_DEBUG
struct shader_pass debug;
#endif
int srgb;
} glsl_t;
#endif

View File

@@ -0,0 +1,59 @@
#ifndef SRC_WX_GLSLP_PARSER_H_
#define SRC_WX_GLSLP_PARSER_H_
#include "qt-glsl.h"
struct parameter {
char id[64];
char description[64];
float default_value;
float value;
float min;
float max;
float step;
};
struct texture {
char path[256];
char name[50];
int linear;
int mipmap;
char wrap_mode[50];
};
struct shader {
char shader_fn[1024];
char *shader_program;
char alias[64];
int filter_linear;
int float_framebuffer;
int srgb_framebuffer;
int mipmap_input;
int frame_count_mod;
char wrap_mode[50];
char scale_type_x[9], scale_type_y[9];
float scale_x, scale_y;
};
typedef struct glslp_t {
char name[64];
int num_shaders;
struct shader shaders[MAX_SHADERS];
int num_textures;
struct texture textures[MAX_TEXTURES];
int num_parameters;
struct parameter parameters[MAX_PARAMETERS];
int input_filter_linear;
} glslp_t;
void get_glslp_name(const char *f, char *s, int size);
glslp_t *glslp_parse(const char *f);
void glslp_free(glslp_t *p);
void glslp_read_shader_config(glslp_t *shader);
void glslp_write_shader_config(glslp_t *shader);
#endif /* SRC_WX_GLSLP_PARSER_H_ */

View File

@@ -52,7 +52,12 @@ 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 void rom_write(uint32_t addr, uint8_t val, void *priv);
extern void rom_writew(uint32_t addr, uint16_t val, void *priv);
extern void rom_writel(uint32_t addr, uint32_t val, void *priv);
extern void rom_get_full_path(char *dest, const char *fn);
extern FILE *rom_fopen(const char *fn, char *mode);
extern int rom_getfile(char *fn, char *s, int size);
extern int rom_present(const char *fn);