Commit Graph

262 Commits

Author SHA1 Message Date
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
OBattler
882aabf95d Diamond S3 86c911: Use the correct clock chip, fixes #4730. 2024-08-18 20:35:47 +02:00
TC1995
a0d662e9c5 S3 changes (and TVP3026) of the day (August 15th, 2024)
1. TVP3026: disable lut mapping on 24bpp modes (mainly the S3 Vision968 drivers which use the TVP3026 ramdac).
2. S3 Vision968 (MiroVideo 40SV Ergo): Corrected 1280x1024 24bpp resolution.
3. ViRGE class: limit the FIFO entries in the bitblt regs to less than 16 entries and make the Image Transfers FIFO writes wraparound to 1 and reads to 0 (to allow at least a read to a write in the thread without hanging the entire emulator). Fixes Win3.1 PBRUSH colors while keeping performance on par with PCem.
2024-08-15 23:04:48 +02:00
TC1995
5247214061 Video changes of the day (August 12th, 2024, S3/TGUI/SVGA))
SVGA: Added an indicator of the internal line to make matters easier for some vertical resolution problems.
TGUI 9400CXi: Fixed the basic acceleration as much as I could.
TGUI 9440AGi+: As with the line indicator, make matters easier for some resolution problems plus some refactoring of the bpp. Added write protection to some regs based on some documentation on the vt8601.
TGUI cursor: fixed the left edge of the cursor X offset.
S3: Apply the vblankstart = dispend statement only on enhanced modes, fixes vertical display on The Incredible Machine for DOS.
Commented out some excess logs.
2024-08-12 19:52:52 +02:00
OBattler
e377e58881 Assorted fixes and Dev branched the Matrox G100 and the PCL printer. 2024-07-26 00:39:11 +02:00
TC1995
bfb4602e85 S3 fixes of the day.
1. Ported the S3 ViRGE reset fix to the Pre-ViRGE cards.
2. Slight cleanup on the acceleration and logs.
3. Unused sequencer register data now return 0xff instead of 0. This fixes Scorched Earth 1.x on DOS using S3 Trio32/64/V+/V2/868/968 cards (on other S3 it works fine as is).
2024-06-26 22:51:34 +02:00
TC1995
e9f19ec32b Fix compile warning.
See above.
2024-05-29 23:54:39 +02:00
TC1995
ff5d5273ed Video changes part 2
1. Added the Diamond Stealth 64 Video VRAM 968-based card.
2. Removed the useless VLB-based Phoenix 868 and 968 cards.
3. The Diamond Stealth 64 Video VRAM specific drivers apparently use 0x83ca-0x83cb as aliases of the RAMDAC ports 0x83c6-0x83c7 (New MMIO mode). This makes the hardware cursor visible in those drivers on win3.1 using the IBM RGB RAMDAC.
4. A few more logs and sanity checks around LFB access and MMIO as well.
2024-05-29 23:45:00 +02:00
TC1995
1baae350dc More S3 changes/fixes.
S3 928:
When the pitch is 1280, make sure the proper horizontal resolution is displayed right (in this case, 1280x1024).

S3 Vision864:
Exclude it from the horizontal blank bits due to more issues that are TBD (like the Trio32 and 64 and up), this works around the mode issues under Windows 9x and more as well as fix 32bpp horizontal rendering in said chip.
2024-05-20 02:26:10 +02:00
OBattler
3e6b4aa9e1 S3 Trio64V+ VLB: Limit to a maximum of 2 MB video memory. 2024-03-06 22:51:24 +01:00
TC1995
c13272ec48 S3 80x cursor fixes:
1. The SPEA specific cards using the 801/5 chip apparently have an ID that's not 0xa0, rather, they either use 0xa2 or greater for the stepping. Fixes wrong colors in 800x600 modes and greater in 8bpp mode.
2. HWCursor addresses for 8bpp are now properly implemented if the 8bpp mode bit (CRTC3a bit 4) is checked, no longer relaying on GDCREG5 bit 6). Fixes garbage cursor in the SPEA 80x cards drivers (BigWin) using 8bpp mode.
2024-02-25 14:06:25 +01:00
cartifanwlr
c57dfed4e7 Fix the internal name of the S3 Trio64V+ VLB 2024-02-23 18:41:41 +03:00
OBattler
8cf8ccf3b3 Added the STB PowerGraph 64 Video (S3 Trio64V+ VLB). 2024-02-22 01:08:21 +01:00
TC1995
963b7eec04 Some temporary video changes regarding the horizontal display.
S3 side:
Temporary changes to match the release (due to tomorrow) of 86box. Said changes are about the horizontal display of the tvp3026-based S3 chips.

IBM/ATI 8514-based:
Temporarily commented out the hblank side of it due to htotal bugs.

TVP3026 side:
When the upper clock selection bits are 0 and when extended VGA modes are set, double the hdisp.
2024-02-20 18:41:51 +01:00
OBattler
873d8791e2 Override the (S)VGA blanking calculation for the S3 Trio32, Trio64, Trio64V+, and Trio64 V2/DX. 2024-02-18 21:34:13 +01:00
OBattler
4c3cceec69 Fixed off by one errors in (S)VGA horizontal blanking start calculation. 2024-02-18 17:54:14 +01:00
TC1995
536f10c60e S3 Pre-ViRGE 32bpp fixes:
32-bit toggleable regs are now written properly, fixes OS/2 32-bit color using S3 Pre-ViRGE drivers while keeping existing compatibility fine.
2024-02-14 20:36:43 +01:00
OBattler
3f8952a558 More (S)VGA horizontal blanking fixes and CPU CR0 bit 4 fixes. 2024-02-09 18:02:33 +01:00
OBattler
f3d585a1e1 Fix horizontal blanking calculation, fixes some S3 blanking excesses. 2024-02-07 00:11:02 +01:00
OBattler
3cfb9edb88 S3 Trio: Fix blanking calculation. 2024-02-03 22:52:41 +01:00
BurnedPinguin
fc834decb9 Merge branch '86Box:master' into machine_23 2024-01-27 09:34:42 +01:00
OBattler
6d3e9642ce SPEA Mercury P64V: Correctly caulculate the width at 1280x1024x24bpp. 2024-01-26 16:23:53 +01:00
BurnedPinguin
325c27de70 Merge branch '86Box:master' into machine_23 2024-01-18 11:51:46 +01:00
BurnedPinguin
5e59cb17cf Conflict resolution. 2024-01-18 11:45:21 +01:00
TC1995
e25fadc138 S3 true color update.
Reset bit 4 of the Misc Index register (from port 0xbee8) on mode changes.
2024-01-15 23:04:36 +01:00
OBattler
780f74bca0 S3: Fix 256-color modes on the Phoenix S3 Vision 968. 2024-01-14 01:40:24 +01:00
OBattler
b1c292a9e9 Sanitized the horizontal blanking adjustments a bit and fixed 640x480x8bpp on some S3 cards. 2024-01-13 22:04:20 +01:00
TC1995
de1e98d3ec Corrected S3 864 horizontal display. 2024-01-13 17:10:00 +01:00
OBattler
996530a94e Horizontal blanking calculation now takes into account horizontal timings multiplications and divisions, fixes a lot of S3 (and ViRGE) modes. 2024-01-13 03:54:56 +01:00
OBattler
ca4f5bad13 More horizontal blanking calculation fixes (and actually use blank start, not retrace start), fixes graphics cut-off on Voodoo on Windows 98 SE. 2024-01-13 00:41:45 +01:00
OBattler
cd0636ee04 Fixed horizontal retrace start and end extensions on almost every applicable card, fixes #4025. 2024-01-11 14:42:54 +01:00
Cacodemon345
8e9a2e0b79 Apply blanking extensions to more SVGA cards.
* Fix duplicated logic in vid_svga.c
* Voodoo 3/Banshee emulation now has blanking extensions applied
* S3 ViRGE and Matrox video cards as well
* Tseng ET4000-series cards as well
* Fix off-by-one error in vid_cl54xx.c

Trident cards are yet to be investigated. XGA and 8514/A are yet to be made blanking extensions compliant. Mach64, Paradise/WDC and OAK OTI cards remain as-is for now.
2024-01-11 01:48:49 +06:00
OBattler
d125caf776 Applied the blanking extensions to S3 Trio64V+ and V2/DX. 2024-01-10 09:27:07 +01:00