Remove various unused ega_t fields and lots of unused 8514 stuff

This commit is contained in:
starfrost013
2025-06-21 00:39:50 +01:00
parent c826294a96
commit bba8f4d499
11 changed files with 101 additions and 199 deletions

View File

@@ -18,6 +18,8 @@
#ifndef VIDEO_8514A_H
#define VIDEO_8514A_H
#include <stdbool.h>
#define INT_VSY (1 << 0)
#define INT_GE_BSY (1 << 1)
#define INT_FIFO_OVR (1 << 2)
@@ -92,18 +94,14 @@ typedef struct ibm8514_t {
int dac_r;
int dac_g;
int dac_b;
int internal_pitch;
int hwcursor_on;
int modechange;
uint64_t dispontime;
uint64_t dispofftime;
struct {
uint16_t subsys_cntl;
uint16_t setup_md;
uint16_t advfunc_cntl;
uint16_t advfunc_cntl_old;
uint16_t cur_y;
uint16_t cur_x;
int16_t destx;
@@ -132,35 +130,24 @@ typedef struct ibm8514_t {
int16_t clip_left;
int16_t clip_top;
uint8_t pix_trans[2];
int poly_draw;
int ssv_state;
int x1;
int x2;
int x3;
int y1;
int y2;
int temp_cnt;
int16_t dx_ibm;
int16_t dy_ibm;
int16_t cx;
int16_t cx_back;
int16_t cy;
int16_t oldcx;
/* oldcx was not used! */
int16_t oldcy;
int16_t sx;
int16_t sy;
int16_t dx;
int16_t dy;
int16_t err;
uint32_t src;
uint32_t dest;
int x_count;
int xx_count;
int y_count;
int input;
int input2;
int output;
int output2;
int ssv_len;
int ssv_len_back;
@@ -179,20 +166,12 @@ typedef struct ibm8514_t {
uint32_t dst_ge_offset;
uint16_t src_pitch;
uint16_t dst_pitch;
int64_t cur_x_24bpp;
int64_t cur_y_24bpp;
int64_t dest_x_24bpp;
int64_t dest_y_24bpp;
} accel;
uint16_t test;
int h_blankstart;
int h_blank_end_val;
int hblankstart;
int hblank_end_val;
int hblankend;
int hblank_ext;
int hblank_sub;
int v_total_reg;
int v_total;
@@ -202,12 +181,10 @@ typedef struct ibm8514_t {
int split;
int h_disp;
int h_total;
int h_sync_width;
int h_disp_time;
int rowoffset;
int dispon;
int hdisp_on;
int linecountff;
int hdispon;
int vc;
int linepos;
int oddeven;
@@ -241,9 +218,7 @@ typedef struct ibm8514_t {
int vsyncwidth;
int vtotal;
int v_disp;
int v_disp2;
int vdisp;
int vdisp2;
int disp_cntl;
int interlace;
uint16_t subsys_cntl;
@@ -255,15 +230,15 @@ typedef struct ibm8514_t {
int blitter_busy;
uint64_t blitter_time;
uint64_t status_time;
int pitch;
int ext_pitch;
int ext_crt_pitch;
ibm8514_extensions_t extensions;
int onboard;
int linear;
bool vram_is_512k;
uint32_t vram_amount;
int vram_512k_8514;
int vendor_mode;
int _8514on;
int _8514crt;

View File

@@ -13,14 +13,18 @@
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Connor Hyde / starfrost, <mario64crashed@gmail.com>
*
* Copyright 2008-2020 Sarah Walker.
* Copyright 2016-2020 Miran Grca.
* Copyright 2025 Connor Hyde.
*/
#ifndef VIDEO_EGA_H
#define VIDEO_EGA_H
#include <stdbool.h>
#if defined(EMU_MEM_H) && defined(EMU_ROM_H)
typedef struct ega_t {
mem_mapping_t mapping;
@@ -57,65 +61,52 @@ typedef struct ega_t {
uint16_t light_pen;
int vidclock;
int fast;
int extvram;
int vres;
int readmode;
int writemode;
int readplane;
int vrammask;
int chain4;
int chain2_read;
int chain2_write;
int cursorvisible;
int oddeven_page;
int oddeven_chain;
int vc;
int real_vc;
int scanline;
int dispon;
int hdisp_on;
int cursoron;
int blink;
int fullchange;
int linepos;
int vslines;
int linecountff;
int oddeven;
int lowres;
int interlace;
int linedbl;
int lindebl;
int rowcount;
int vtotal;
int dispend;
int vsyncstart;
int split;
int hdisp;
int hdisp_old;
int htotal;
int hdisp_time;
int rowoffset;
int vblankstart;
int scrollcache;
int firstline;
int lastline;
int firstline_draw;
int lastline_draw;
int x_add;
int y_add;
int displine;
int res_x;
int res_y;
int bpp;
int index;
int remap_required;
int actual_type;
int chipset;
int mono_display;
int32_t vidclock;
int32_t vres;
int32_t readmode;
int32_t writemode;
int32_t readplane;
int32_t vrammask;
int32_t chain4;
int32_t chain2_read;
int32_t chain2_write;
int32_t cursorvisible;
int32_t vc;
int32_t real_vc;
int32_t scanline;
int32_t dispon;
int32_t cursoron;
int32_t blink;
int32_t fullchange;
int32_t linepos;
int32_t vslines;
int32_t linecountff;
int32_t oddeven;
int32_t interlace;
int32_t linedbl;
int32_t rowcount;
int32_t vtotal;
int32_t dispend;
int32_t vsyncstart;
int32_t split;
int32_t hdisp;
int32_t htotal;
int32_t rowoffset;
int32_t vblankstart;
int32_t scrollcache;
int32_t firstline;
int32_t lastline;
int32_t firstline_draw;
int32_t lastline_draw;
int32_t x_add;
int32_t y_add;
int32_t displine;
int32_t index;
bool remap_required;
int32_t actual_type;
int32_t chipset;
int mda_attr_to_color_table[256][2][2];
int32_t mda_attr_to_color_table[256][2][2];
uint32_t charseta;
uint32_t charsetb;
@@ -164,7 +155,7 @@ extern const device_t jega_device;
extern const device_t jvga_device;
#endif
extern int update_overscan;
extern int32_t update_overscan;
#define DISPLAY_RGB 0
#define DISPLAY_COMPOSITE 1
@@ -174,7 +165,7 @@ extern int update_overscan;
#define DISPLAY_WHITE 5
#if defined(EMU_MEM_H) && defined(EMU_ROM_H)
extern void ega_init(ega_t *ega, int monitor_type, int is_mono);
extern void ega_init(ega_t *ega, int32_t monitor_type, int32_t is_mono);
extern void ega_recalctimings(struct ega_t *ega);
extern void ega_recalc_remap_func(struct ega_t *ega);
#endif
@@ -186,18 +177,18 @@ extern void ega_write(uint32_t addr, uint8_t val, void *priv);
extern uint8_t ega_read(uint32_t addr, void *priv);
extern void ega_set_type(void *priv, uint32_t local);
extern int firstline_draw;
extern int lastline_draw;
extern int displine;
extern int scanline;
extern int32_t firstline_draw;
extern int32_t lastline_draw;
extern int32_t displine;
extern int32_t scanline;
extern uint32_t memaddr;
extern uint32_t cursoraddr;
extern int cursorvisible;
extern int cursoron;
extern int cgablink;
extern int32_t cursorvisible;
extern int32_t cursoron;
extern int32_t cgablink;
extern int scrollcache;
extern int32_t scrollcache;
extern uint8_t edatlookup[4][4];
extern uint8_t egaremap2bpp[256];

View File

@@ -98,7 +98,6 @@ typedef struct svga_t {
int hdisp_time;
int rowoffset;
int dispon;
int hdisp_on;
int vc;
int scanline;
int linepos;