Commit Graph

294 Commits

Author SHA1 Message Date
TC1995
2ee0f0e470 RAMDAC/Clock fixes to the S3 and ET4000AX cards
1. The S3 968-based Diamond Stealth 64 Video VRAM, using a 14mhz reference clock, now has its RGB528 fixed Pixel PLL reference divider set to its default value (0x07) per manual and reference clock. Fixes wrong refresh rates on said cards and others.
2. Added the ICS2494-324 clock generator to the ET4000AX. Fixes wrong refresh rates on this one too.
2025-10-20 20:32:41 +02:00
TC1995
f7a3ca4ccd Corrections to displays (October 18th, 2025) (rebase)
1. In the STG code, separated the STG1703 without its built-in clock as 1702 while keeping the one with the clock as 1703.
2. Added the ICS2494AN-324 clock generator used by the et4000w32 series.
3. Return 0x98 as the ID of the ATT498 ramdac.
4. Corrected the pixel clocks of the IBM RGB528 while keeping its current compatibility and exactness of the refresh rates of its clocks.
5. Added a variable reference clock of the SDAC/GenDAC for future use.
6. The clocks of the TVP3026 have been implemented for a while. Some corrections have been made (plus color key r/w).
7. Mach64 enhanced mode doesn't use scrollcache (bits 0-3 of attrregs 0x13), fixes some pixels being off (mainly in win3.1x)
8. Reorganized the cirrus 54xx built-in clock for proper refresh rates.
9. Proper reorganization of the et4000w32 series of chipsets and their cards supporting them, from cursor to clocks to ramdacs plus a 24bpp acceleration fix for the w32p series (about pixels being processed in bitblt).
10. Removed the PCI videomagic card as its bios doesn't have the PCIR header while making sure the plain ISA/VLB w32 and ISA only w32i (now named Axis Microdevice) support 2mb of vram properly.
11.  Added the Hercules Dynamite VL Pro based on the w32i chip (and VLB).
12. Initialize the et4000w32 cards with misc bit 0 set as well as crtc31 bit 6 for rs2 connection to the ramdac.
13. Refactored the S3 Pre-ViRGE code to have proper refresh rates and clocks and added the 805I as a member of the chips (ID 0xa8).
14. Replaced the S3 805I Elsa Winner 1000 ISA bios with a more supported one for our code using the SDAC.
15. Added proper 24bpp acceleration to the Visionx68 chips.
16. Fixed wrong colors in the 911/924 15/16bpp acceleration when used for the first time.
17. Match the ViRGE mapping to the pre-ViRGE one per manual/datasheet.
18. Correct as best as possible the TGUI9400 clocks.
2025-10-18 03:09:34 +02:00
Jasmine Iwanek
3c5190a0db Header cleanups (1/2) 2025-09-21 00:48:38 -04:00
TC1995
c3a6e826b4 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.
2025-09-15 17:48:24 +02:00
TC1995
3a703d0c0d Last minute changes for the high color S3 911/924 mode
Read mask initialized to 0xff allows proper colors on initial boot of Windows.
2025-09-09 00:18:14 +02:00
TC1995
8bb6444c7a Latest video fixes of the day (September 8th, 2025)
On soft-reset, reset the Misc Multifunc (0x0D/0x0E) values to sane defaults per manuals.
2025-09-08 22:59:34 +02:00
TC1995
a6becc3158 Major video changes and fixes of the day (September 7th, 2025)
1. Rewritten Sierra SC1502x RAMDAC code to match the manual, allowing proper BPP selection on cards which use it.
2. Added a reference clock variable for cards which have a different default one (ELSA cards namely) on the ICD2061 code.
3. Reorganized RAMDAC selection in the S3 code.
4. Added more ELSA Winner cards based on the 928 chip (ELSA Winner 2000 ISA, 1000 VLB and 1000 PCI based on 928PCI).
5. The horizontal override is now also enabled for ELSA Winner 1000 (928 VLB and PCI) cards with 32bpp set, to avoid wrong horizontal displays.
6. LFB in PCI mode doesn't have the same limitations as on VLB or ISA.
7. Added more hdisp adjustments for the Elsa cards.
8. Mono patterns are now more correct in ROPBLT acceleration (command 14), fixes blackness in some instances of Win95 (matching the 968 manual).
9. Minor cleanup on the accel registers.
2025-09-07 01:01:03 +02:00
TC1995
5f06561469 EEPROM use changes and misc (September 3rd, 2025)
1.Move the 93cxx EEPROM implementation to the mem directory since it's used by cards which are not nics (e.g.: DC390 SCSI and S3 ELSA cards).
2. DC390 specific: remove the implementation used there and use the generic one from mem (used to be on the network directory) as well as fixing bus reset when interrupts are related.
3. S3: when the 64k size is selected in the LFB, use the SVGA 64k mapping as LFB (0xA0000).
2025-09-03 00:49:27 +02:00
TC1995
0261e04365 S3 changes of the night (September 1st, 2025)
1. If a card uses the icd2061a clock, so be it in a better way.
2. Vertical display fixes for heights greater than 1024 pixels, e.g.: 1600x1200 on the ELSA 96x cards.
3. Misc fixes (ROPBLT).
4. 0x3ca and 0x3cb in read mode are actually different from writes.
2025-09-01 00:24:32 +02:00
OBattler
1b173963fe Fix the timings of the non-Elsa S3 Vision cards with the IBM RGB528 RAMDAC. 2025-08-31 20:44:40 +02:00
OBattler
28d678476d Implement the ELSA S3 EEPROM, the RGB528 RAMDAC clock selection, and fix split calculation on all the S3 cards (ViRGE included). 2025-08-31 19:35:04 +02:00
OBattler
3338a59283 S3 Trio32: Fix cursor in 15-bpp and 16-bpp mode. 2025-08-30 18:25:08 +02:00
Cacodemon345
5e0dd65738 Add color/chroma-keying to S3 Trio64V+ and Trio64V2/DX
Clean up some TODOs in Voodoo 3/Banshee code
2025-08-19 23:56:51 +06:00
TC1995
7e3788f063 S3 clock rate changes of the night (August 18th, 2025)
1. Correct the clock chip of the S3 928 (Metheus Premier 928) to use a ics2494 one (a board picture shows the CH9294, a clone of the ics2494/av9194).
2. Correct the 8bpp and high color refresh rates of the Metheus Premier 928 when either bt48x x2 clock multiplier is enabled or when hitting high color.
2025-08-18 01:47:35 +02:00
Cacodemon345
1d19d2a588 Fix refresh rate for 15/16-bpp modes on Trio64V+ 2025-08-17 17:51:59 +06:00
OBattler
42fa1dbe54 S3 Cards: Fix timings in some modes to account for double-clocking. 2025-08-11 13:34:58 +02:00
TC1995
1a5b4671e8 XGA/SVGA mode changes of the day (July 22nd, 2025)
1. If the VGA mapping is for a 0xA0000 map for a length of 0x10000, then disable XGA mode (this is independent of the XGA extended mode aperture mode 1 which is XGA's own 0xA0000 mapping).
2. Remove text mode ctrl-alt-del hack.
3. Fixed cursor x coordinate in the Trio32 using 15bpp/16bpp modes.
2025-07-22 20:45:54 +02:00
Daniel Gurney
aef9d1ed94 Revert "Merge branch 'bugfixes' into master"
This reverts commit 8250b57325, reversing
changes made to 6c643d05b8.
2025-07-01 03:04:14 +03:00
starfrost013
adb8b388a8 v_disp -> vdisp_latch; get rid of even more unused shit 2025-06-21 00:55:39 +01:00
starfrost013
bba8f4d499 Remove various unused ega_t fields and lots of unused 8514 stuff 2025-06-21 00:39:50 +01:00
starfrost013
dd7f3d0aae ma -> memaddr
ma_latch -> memaddr_latch
maback -> memaddr_backup
ca -> cursoraddr
sc -> scanline
oldsc -> scanline_old
2025-06-10 22:53:45 +01:00
TC1995
75e76899da S3 911/924 high color: check if rd_mask is not 0 (May 21st, 2025)
This fixes wrong colors in certain instances of Windows 95 builds' 911/924 drivers.
2025-05-21 13:43:23 +02:00
TC1995
cc6076f93b Late night S3 changes (May 9th, 2025)
1. Pixtrans on port 0xb2e8 is not available on 864/964 and up (including the trio64) due to color compare taking its place, fixes some graphical glitches in WinXP.
2. The DOS s3id utility identifies the 80x chips correctly, either it's 801 ISA or 805 VLB, but not 805 ISA even if they share the same id, but since it's an ISA card, identify the Elsa Winner 1000 805 ISA as a 801 card.
2025-05-09 02:23:56 +02:00
MaxwellS04
1f40db5d9e Fixed ROM path 2025-05-07 11:29:11 +07:00
MaxwellS04
5d929c7735 Move Winner 1000's RAMDAC to ATT491 2025-05-07 10:39:22 +07:00
MaxwellS04
6fb01cf592 Added ISA-specific 86c805 (ELSA Winner 1000)
Ported from my ELSA_Winner_Series branch.
2025-05-07 10:11:51 +07:00
TC1995
1b1d6bcf45 Some cleanup to the recent fixes on the S3 code (May 6th, 2025)
See above.
2025-05-06 20:17:23 +02:00
OBattler
4a417da09b S3: Revert the video BIOS change, it was not necessary. 2025-05-06 19:34:14 +02:00
OBattler
ef3f57b338 S3 Trio32 On-Board VLB: Actually use the DEC Venturis 4xx video BIOS. 2025-05-06 19:26:26 +02:00
TC1995
b1d409471c Fixes to the S3 911/924 of the night (May 4th, 2025)
1. Actually mostly workarounds to make it render normally without a hitch (I hope) using the Diamond Stealth VRAM 911-based 15bpp driver.
2. Updated logs.
2025-05-04 02:01:34 +02:00
TC1995
0da871f54e Vast overhaul to the 15bpp/16bpp accelerated mode of the 911/924.
1. See above, as best as possible, but manuals would be helpful.
2. Reverted the ramdac of the 924 to the sierra one because of a bug that triggers 24bpp mode when it shouldn't.
2025-04-29 00:39:26 +02:00
TC1995
1c98437e66 More display changes.
SVGA related:
If CRTC1/HDISP is odd (if bit 0 is set), then make it even accordingly, else leave it as is. Should fix some display skews.

S3 related:
Remove old code references (can still be accessed through history if one needs it).

8514/A compatible related:
Proper use of the htotal and hdisp timings.
2025-03-29 14:49:13 +01:00
OBattler
2c197000ea Removed the legacy #defines in device.h. 2025-02-14 07:39:21 +01:00
Jasmine Iwanek
d5d1d5c449 More cleanups to device structs 2025-02-08 01:28:25 -05:00
Jasmine Iwanek
5b894c32e6 Macro Cleaning 2025-02-08 01:28:24 -05:00
Jasmine Iwanek
81b8038bc5 Clean up .available & .poll 2025-02-01 03:38:52 -05:00
TC1995
b141967a31 8514/A and S3 minor change (January 26th, 2025)
1. Cosmetic changes.
2. Revert the position of the starting coordinates of the Short Stroke command, fixes some glitches in NT and elsewhere.
2025-01-26 17:57:39 +01:00
TC1995
9bc5f0dd05 8514/A and S3 changes of the late day (January 9th, 2025)
S3:
1. Cleaned up the Short Stroke command processing.
2. Proceed calculating the error term only when it's equal or greater than the line length (Draw Line, Command 1 and also applies to Short Strokes, Command 0).

8514/A compatibles:
1. Reworked the polygon draw type A processing.
2. As with the S3, reworked the way error term is handled in the processing, and on Command 5 (Draw Polygon Boundary Line).
2025-01-09 22:58:40 +01:00
TC1995
4c9fb63c74 S3 changes of the day (December 25th 2024, Christmas 2024 gift)
1. Initialize Multifunction indexes 0x0D and 0x0E properly, should fix inverted colors on S3 OS/2 Warp drivers.
2. Make the remaining Vision868/968 only ports handle the 32-bit toggling properly.
3. Cleanups
2024-12-25 19:47:23 +01:00
TC1995
e4739de5cc S3 and Cirrus updates of the first day of winter (December 21, 2024)
Cirrus 5436/46 and 5480.
Finally fixed the Solaris 2.6 font issue, was a dword swap one with color expansion.

S3.
1. Make 868/968 ignore horizontal skew, ergo horizontal override until a proper solution is found regarding hardware tests.
2. Fixed a minor mix issue with S3 911/924 Win3.1 drivers in 8bpp mode.
2024-12-21 00:11:34 +01:00
OBattler
463badd613 kB -> KB. 2024-11-19 04:08:21 +01:00
OBattler
09eb050423 More KB -> kB. 2024-11-12 01:45:58 +01:00
TC1995
36e42af7b2 S3 bank update (October 29th, 2024)
1. Simplified 4bpp rendering mode.
2. Implement CRTC31 bit 0 functionality which enables/disables the vendor banks. Fixes Diamond Stealth 64 964 VRAM (VLB/PCI) detection on NT 3.1 (and possibly other cards) while keeping NT 3.1 347.1's full screen Command Prompt test normal without garbage using the 911/924 chips.
2024-10-29 01:16:21 +01:00
TC1995
9c111584b5 Big video changes of the day (October 26th, 2024)
8514/A/Mach8/32:
Reworked the acceleration a bit as well as the mode switches from VGA to ATI/8514/A mode and viceversa based on the documentation. Fixes the Linux GUI fonts using the Mach32 driver (possibly Mach8 too) and other anomalies (still needs more work on the acceleration though).

PVGA:
Minor fixes to the banking.

S3-based (Pre-ViRGE):
1. Made the chip class use its own banking so that the Enhanced Mode mapping (equivalent to 64K-based A0000) is taken into account (per bit 3 of CRTC31, which forces the mapping to be 64K A0000, regardless of the GDCREG6 bits). Fixes NT 3.1 347.1's S3 driver.
2. Initial rework on 15bpp/16bpp accelerated mode of the 911/924 chips (currently not 100% bug free, I need help with this chips).

XGA-1/2:
Get rid of the linear endian reverse variable hack used by OS/2 and, instead, use the already declared ones more wisely, fixes OS/2 2.1 reversed fonts and keeps everything else working as it should.

Misc:
Added the BT481 RAMDAC for future card use.
2024-10-26 21:32:47 +02:00
OBattler
74b398be29 S3 non-ViRGE: Do not remove I/O handlers on ISA/VLB card reset, fixes soft reset, fixes #4866. 2024-09-28 14:34:45 +02:00
TC1995
962c9cdf2f S3 Pre-ViRGE changes of the day (September 26th, 2024)
1. Actually fix the remaining pinkish/reddish stuff in 32bpp modes properly (for real, especially OS/2 and possibly other stuff).
2. The Compare accel stuff is more sanitized.
3. When the BitBLT DY coordinates are negative, don't draw the pixels. This fixes some software cursor issues with OS/2's S3 3.03.xx drivers.
4. Reset the FIFO when the card is reset.
5. Indentation fixes (to be improved further however).
6. Implement bit 5 functionality of 0xBEE8 index 0xE (MULT_MISC) (and currently only in the Rectangle Fill command). This fixes missing text on I-O Data Vision968 specific drivers for Windows 3.10 Japanese (PC/AT compatible)
7. Moved the Streams engine out of the FIFO (like the ViRGE) as well as making all CRTC's of the Trio64V2 writable and SEQREGs from 0x10 onwards to make sure the Streams engine works properly.
8. Added a missing break from the RAMDAC read stuff.
9. Remove a leftover of PCem.
2024-09-26 23:18:38 +02:00
OBattler
6a5e9cdaba Fixed the S3 reset fix, fixes Windows 98 stuck on black screen on the S3 Trio64 on some machines. 2024-08-30 19:35:24 +02:00
OBattler
fe4ad0d4e1 S3: Make sure to absolutely restore everything to the original state on reset, even the contents of vram and changedvram, fixes #4768. 2024-08-30 06:01:52 +02:00
OBattler
818c268f75 S3 Vision x68: Fix PCI BAR to CRTC registers 59h/5Ah mask. 2024-08-28 20:21:47 +02:00
OBattler
ba859d7351 S3: Fixed CRTC to PCI BAR mapping, fixes #4745. 2024-08-26 04:36:23 +02:00