Unified screen update code of all Voodoo models and prepared Voodoo 1/2 for

tile-based updates and screen update locking. Some related changes in the init
and save/restore code are also included. The main update code has been moved
from bx_voodoo_vga_c to bx_voodoo_c and the required parameters are set up
depending on the model. The BX_LOCK/BX_UNLOCK and SET_TILE_UPDATED stuff still
needs to be added in the 3D core. Currently a redraw_area() hack makes the
Voodoo 1/2 screen updates work as expected.
This commit is contained in:
Volker Ruppert 2017-11-09 17:58:53 +00:00
parent b25ec2adcf
commit 49885211ad
3 changed files with 395 additions and 414 deletions

File diff suppressed because it is too large Load Diff

View File

@ -46,6 +46,11 @@ typedef struct {
int mode_change_timer_id; int mode_change_timer_id;
int vertical_timer_id; int vertical_timer_id;
Bit8u devfunc; Bit8u devfunc;
Bit16u max_xres;
Bit16u max_yres;
Bit16u num_x_tiles;
Bit16u num_y_tiles;
bx_bool *vga_tile_updated;
} bx_voodoo_t; } bx_voodoo_t;
@ -71,6 +76,9 @@ public:
static bx_bool update_timing(void); static bx_bool update_timing(void);
Bit8u get_model(void) {return s.model;} Bit8u get_model(void) {return s.model;}
void banshee_draw_hwcursor(unsigned xc, unsigned yc, bx_svga_tileinfo_t *info);
void set_tile_updated(unsigned xti, unsigned yti, bx_bool flag);
Bit32u banshee_blt_reg_read(Bit8u reg); Bit32u banshee_blt_reg_read(Bit8u reg);
void banshee_blt_reg_write(Bit8u reg, Bit32u value); void banshee_blt_reg_write(Bit8u reg, Bit32u value);
@ -127,18 +135,11 @@ public:
void banshee_update_mode(void); void banshee_update_mode(void);
void banshee_set_dac_mode(bx_bool mode); void banshee_set_dac_mode(bx_bool mode);
void banshee_set_vclk3(Bit32u value); void banshee_set_vclk3(Bit32u value);
void banshee_draw_hwcursor(unsigned xc, unsigned yc, bx_svga_tileinfo_t *info);
static Bit32u banshee_vga_read_handler(void *this_ptr, Bit32u address, unsigned io_len); static Bit32u banshee_vga_read_handler(void *this_ptr, Bit32u address, unsigned io_len);
static void banshee_vga_write_handler(void *this_ptr, Bit32u address, Bit32u value, unsigned io_len); static void banshee_vga_write_handler(void *this_ptr, Bit32u address, Bit32u value, unsigned io_len);
protected: protected:
virtual void update(void); virtual void update(void);
private:
struct {
bx_bool dac_8bit;
bx_bool half_mode;
} vbe;
}; };
#endif #endif

View File

@ -1721,7 +1721,9 @@ struct _banshee_info
Bit32u io[0x40]; /* I/O registers */ Bit32u io[0x40]; /* I/O registers */
Bit32u agp[0x80]; /* AGP registers */ Bit32u agp[0x80]; /* AGP registers */
Bit8u crtc[0x27]; /* VGA CRTC registers */ Bit8u crtc[0x27]; /* VGA CRTC registers */
Bit8u bpp; Bit8u disp_bpp;
bx_bool half_mode;
bx_bool dac_8bit;
struct { struct {
bx_bool enabled; bx_bool enabled;
bx_bool mode; bx_bool mode;