mirror of
https://github.com/86Box/86Box.git
synced 2026-02-25 04:45:31 -07:00
S3 928 and icd2061 mode rework (September 15th, 2025)
The rework resolves around implementing the clock multiplier and multiplexing rate of the bt485 ramdac alongside existing additional flags for eventual fixes (like cr31 bit 1) as well as the true color bypass (for 16-bit and true color modes). These, together, allow proper rendering of the generic VESA S3 drivers alongside non-VESA ELSA OEM drivers on various guests.
This commit is contained in:
38
src/include/86box/vid_clockgen_icd2061.h
Normal file
38
src/include/86box/vid_clockgen_icd2061.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* ICD2061 clock generator emulation.
|
||||
* Also emulates the ICS9161 which is the same as the ICD2016,
|
||||
* but without the need for tuning (which is irrelevant in
|
||||
* emulation anyway).
|
||||
*
|
||||
* Used by ET4000w32/p (Diamond Stealth 32) and the S3
|
||||
* Vision964 family.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
*/
|
||||
#ifndef VIDEO_CLOCKGEN_ICD2061_H
|
||||
#define VIDEO_CLOCKGEN_ICD2061_H
|
||||
|
||||
typedef struct icd2061_t {
|
||||
float freq[3];
|
||||
float ref_clock;
|
||||
|
||||
int count;
|
||||
int bit_count;
|
||||
int unlocked;
|
||||
int state;
|
||||
uint32_t data;
|
||||
uint32_t ctrl;
|
||||
} icd2061_t;
|
||||
|
||||
#endif // VIDEO_CLOCKGEN_ICD2061_H
|
||||
@@ -142,6 +142,9 @@ typedef struct svga_t {
|
||||
int start_retrace_latch;
|
||||
int vga_mode;
|
||||
int half_pixel;
|
||||
int clock_multiplier;
|
||||
int true_color_bypass;
|
||||
int multiplexing_rate;
|
||||
|
||||
/*The three variables below allow us to implement memory maps like that seen on a 1MB Trio64 :
|
||||
0MB-1MB - VRAM
|
||||
@@ -450,7 +453,7 @@ extern void ibm_rgb528_ramdac_set_ref_clock(void *priv, svga_t *svga, float r
|
||||
|
||||
extern void icd2061_write(void *priv, int val);
|
||||
extern float icd2061_getclock(int clock, void *priv);
|
||||
extern void icd2061_set_ref_clock(void *priv, svga_t *svga, float ref_clock);
|
||||
extern void icd2061_set_ref_clock(void *priv, float ref_clock);
|
||||
|
||||
/* The code is the same, the #define's are so that the correct name can be used. */
|
||||
# define ics9161_write icd2061_write
|
||||
|
||||
Reference in New Issue
Block a user