Commit Graph

1120 Commits

Author SHA1 Message Date
GreaseMonkey
d3897b57e8 Handle SVGA 8bit RAMDAC for Voodoo Banshee cards 2023-11-26 11:54:01 +13:00
GreaseMonkey
c8c9fa2f91 Implement 4bpp graphics mode blink properly on VGA
Closes #3447
2023-11-23 13:12:09 +13:00
GreaseMonkey
7de7ea3fe1 Clean up unused variable 2023-11-23 10:08:52 +13:00
GreaseMonkey
81d285b883 Force 8bpp highres SVGA modes to "bypass" the shifter entirely
The current implementation still uses the shifter forced to Shift 256 mode to keep things generic, but we can always opt for a separate scanline renderer.
2023-11-23 10:04:04 +13:00
GreaseMonkey
d19fe700f5 Use 8bpp renderer when attrregs.0x10.6 is set instead of when gdcreg.0x05.6 is set
This allows correct emulation of the 4bpp chunky mode which is supported by many but not all chipsets.
See discussion #3840 on GitHub.
2023-11-23 09:58:16 +13:00
TC1995
a3fa181b01 8-bit renderer fix about the Tseng cards:
Seems the Tseng cards are as incompatible as the S3 cards in terms of pure IBM VGA emulation, especially the chain4 stuff, so accomodate the fix to the renderer. Fixes 8bpp rendering on Tseng cards when invoked.
2023-11-21 20:06:12 +01:00
GreaseMonkey
9903e12e69 (S)VGA: Update graphics mode blink behaviour to match something more feasible 2023-11-21 19:39:30 +13:00
GreaseMonkey
220d5fa237 (S)VGA: Do redraws if blink is enabled in graphics mode too
Easy test case in QBASIC:

    SCREEN 10
    PSET (2,0),2

There should be a blinking pixel in the top-left.
2023-11-21 19:32:43 +13:00
GreaseMonkey
81b8150a6b (S)VGA: Increment CRTC address just before it needs to be used
This gives more likely behaviour when one loads more often than the address is incremented.
The behaviour matches an Intel GMA 4500MHD (2008) which is the earliest hardware I'm able to test right now.
2023-11-21 19:25:26 +13:00
GreaseMonkey
2166ae0fb7 Get S3 Trio working in mode 13h + Mode-X again
Outside of that, we're now using the remappers properly.
2023-11-21 16:55:54 +13:00
GreaseMonkey
cfda3e1cce Add 8bpp support to the 4bpp renderer (breaks S3 Trio)
It appears that the S3 Trio does something weird with its 8bpp modes.
Specifically, it seems to ignore some of the flags needed for dword mode.

I will keep looking into that and see if I can find a good solution.
2023-11-21 15:40:44 +13:00
GreaseMonkey
9703ccec45 Initial merge of VGA 2bpp/4bpp lo/hi res renderers
About half of it was taken from the EGA renderer.

Also, the "force_old_addr" hack is kept here for now.
2023-11-21 11:33:04 +13:00
GreaseMonkey
1f5d00fe55 Generate CGA-to-EGA tables in video.c; Remove redundant table generation in vid_ega.c 2023-11-21 10:26:13 +13:00
RichardG867
9bcece63fc Fix some random comments which have been bugging me 2023-11-10 17:27:30 -03:00
TC1995
45f0ecc87e Forgot to apply the correction to the ATI 68860 ramdac, should clear the compile warnings. 2023-11-09 23:58:58 +01:00
TC1995
6c356df9e7 More and more video changes and fixes (8514/A and compatibles):
1. Made the 8514/A mode switch to VGA and viceversa (including ATI mode) actually usable and eliminating the last bugs related to them. Fixes 8514/A mode in OS/2 1.x/2.x (both IBM and Microsoft).
2. More sanity checks to the 8514/A and XGA pointers. Should fix emulator crashes on hard resets.
2023-11-08 23:47:16 +01:00
TC1995
53512a2510 More S3 blitting fixes:
Toggling the RSF bit is now applied to reads too. Fixes wrong colors on Solaris using true color mode and possibly other stuff too.
2023-11-01 21:59:49 +01:00
TC1995
5c9dabdc03 S3 accel command fixes:
X/Y coordinates are corrected for real even while wrapping. Fixes Trio64V+/Trio64V2 Win9x desktop icons as well as OS/2 software cursor madness.
2023-10-31 18:54:49 +01:00
TC1995
38a6c0f1e1 Trident TGUI9440/96x0 Bresenham update:
1. Its execution is exactly (actually 99%) the same as the S3 Bresenham procedure, so I thought of making the Bresenham command of the TGUI9440/96x0 behave like the s3 one but adapted to use Trident's ports and meanings and now OS/2 and Windows lines in certain programs work fine.
2023-10-24 23:08:17 +02:00
OBattler
8184d71aa6 Removing the remaining unnecessary files that should not have been committed. 2023-10-21 08:13:22 +02:00
OBattler
28e2eb3ce5 More Sound Blaster 16+ / ViBRA 16 fixes, added optional PC speaker control via the Sound Blaster 16+ / ViBRA 16, and removed some left-over temporary code from device.c. 2023-10-21 06:53:11 +02:00
TC1995
00edd8cfbc Mach64 (both GX and VT2) 24bpp mono pattern fix placed in.
Fixes wrong colors in patterns on various operating systems and possibly other stuff too.
2023-10-20 20:41:57 +02:00
TC1995
0440d37387 Small mach32/svga mapping fix (actually fixes font rendering on win3.1x using the Mach32 2.6 drivers) 2023-10-19 01:32:52 +02:00
TC1995
da5b93d980 S3 fixes:
Bit 11 of ports 0x82e8 and 0x86e8 (Current X and Current Y positions registers, respectively) are taken into account again without conflicting with OS/2 Warp 3/4's software cursor, fixes blitting issues with Neptune Build 5111.1's S3 driver and possibly some other builds and other stuff.
2023-10-17 19:33:07 +02:00
OBattler
8464401886 Fixed a small CL-GD 5480 bug. 2023-10-17 05:39:17 +02:00
TC1995
85bdf40a1c VGA/XGA memory fix.
the XGA memory test takes account of Win3.x' XGA memory test again without conflicting XGAKIT's test, fixes DOS-based boxes using Win3.x XGA drivers in 386 mode.
2023-10-15 19:27:33 +02:00
TC1995
38e63ec9c6 Compaq Plasma fixes:
Fixed the blinking/test cursor of said built-in video on Portable III/386.
2023-10-14 20:15:04 +02:00
OBattler
7013949310 Made sure the dummy "None"/"Internal" devices never get initialized and fixed some PCI AGP bridge mess (including AGP-less 440BX/ZX/GX erroneously initializing the 440LX/EX AGP bridge), fixes #3696. 2023-10-14 06:45:45 +02:00
OBattler
531bb61146 Fxied the last warnings. 2023-10-14 00:27:33 +02:00
OBattler
dc44e37f62 Fixed the warnings reported by lemondrops. 2023-10-13 23:03:37 +02:00
OBattler
d80effddd1 Removed an unused variable. 2023-10-11 18:51:50 +02:00
TC1995
6913de32c5 More video fixes:
ATI Mach64 is temporarily unthreaded because of blitter desyncing.
ATI Mach32 now returns to ATI mode from IBM mode and vice versa more correctly.
Make the IBM 8514/A compatible poll not run if a 3D add-on card (Voodoo1/2) takes precedence (seen on a Mach32 PCI and Voodoo2 3D combo).
Finally ended the mess ups of the TGUI9440/96x0 pitch, it actually was the CRTC offset reg (SVGA CRTC 0x13) that defined it with some shifting based on the BPP.
2023-10-11 18:46:15 +02:00
OBattler
9fd8fc14ef Added sanity checks to the ATi 68860 RAM DAC code. 2023-10-11 17:52:47 +02:00
OBattler
881844dd32 Do not call 8514/A or XGA recalculate timings functions until the function pointer is non-NULL. 2023-10-10 00:49:44 +02:00
OBattler
39d10899ac Sanitized some video code to avoid #include's inside headers, and added guards to include/86box/thread.h. 2023-10-09 20:14:03 +02:00
Jasmine Iwanek
197e817ea3 Remove several unused variables 2023-10-08 13:32:43 -04:00
TC1995
097fa229bd Fix compilation. 2023-09-30 22:21:09 +02:00
TC1995
6802c0593b Video, Storage and MCA changes/fixes.
1. Cirrus Logic GD54xx, Paradise/WD VGA now reset the interlace once a text mode is issued if not done automatically.
2. Paradise/WD's 15/16bpp modes using the 800x600 resolution now have the correct ma_latch, should fix most operating systems drivers using this combo.
3. More fixes (hopefully) to the accelerated pitch and rowoffset of the Trident TGUI cards (9440AGi and 96x0XGi), should fix issues with delayed displays mode changes under various operating systems (e.g.: Win3.1x).
4. Preliminary implementation of the Area Fill command of XGA, which is issued while using various painting and/or calc utilities on Win3.1x (IBM XGA updated drivers, e.g.: 2.12).
5. Preliminary (and incomplete) 4bpp XGA mode.
6. The XGA memory test for the 0xa5 using writes (used by various operating systems) no longer conflicts with DOS' XGAKIT's memory detection.
7. Small ROP fixes to both XGA and 8514/A.
8. Re-organized the mapping of the Mach32 chipset, especially when to enable the ATI mode or switching back to IBM mode, should fix LFB conflicts with various operating systems.
9. According to The OS/2 Museum, the Adaptec AHA-154xB series of SCSI cards fail the ASPI4DOS.SYS 3.36 signature check, so now make the changes accordingly.
10. Remove useless and crashy bios-less option of the Trantor T128.
11. The Image Manager 1024 card can also be used on a XT (although only if it has a V20/V30).
12. Re-organized the IBM PS/2 model 60 initialization as well as its right POS machine ID (though an update to sc.exe is still required for the POST memory amount to work normally).
2023-09-30 22:08:08 +02:00
OBattler
5f83768d98 Fixed includes in video/vid_s3.c. 2023-08-24 01:13:39 +02:00
OBattler
46b086cf22 Missing header include in video/vid_s3.c. 2023-08-24 01:06:38 +02:00
OBattler
ca58764ac3 Unmarked fallthroughs: vid_s3.c. 2023-08-24 00:57:53 +02:00
TC1995
498bc6aa8c More 8514/A related fixes:
Replaced svga->bpp == 24 with dev->accel_bpp == 24 as well as proper ATI graphics engine offsets added to 24bpp mode in the 8514/A rectangle fill commands (cmd 2, 3, 4) as well as on a command val of 8514/A bitblt (mainly 0xc2b5, actual cmd 6). This should fix 24bpp mode under Windows/NT and other operating systems, like OS/2 2.x/Warp.
2023-08-24 00:47:26 +02:00
TC1995
23a2923724 More XGA fixes:
These make XGAKIT report 1MB of VRAM (from DOS).
2023-08-24 00:30:21 +02:00
Jasmine Iwanek
28db0d37df Merge branch 'master' into tc1995 2023-08-23 14:46:28 -04:00
Miran Grča
7f06e697cb Merge pull request #3623 from jriwanek-forks/cleaning
Latest round of sonarlint work
2023-08-23 20:42:39 +02:00
OBattler
ae231add5c The on-board CL-GD 5430's now have a NULL avilable() function. 2023-08-23 20:41:54 +02:00
TC1995
e2fbf5df3f Assorted TGUI9440/96x0 fixes:
Fixed the Win98 Trident PCI (and 9440 VLB) card accelerator pitch while maintaining compatibility with other OSes, despite being undocumented (this is at least an attempt to fix it properly based on the logs).
2023-08-23 19:58:18 +02:00
OBattler
2bff7c3910 The IBM PC330 on-board CL-GD 5430 is now correctly VLB and not PCI. 2023-08-23 18:05:58 +02:00
Jasmine Iwanek
b8c4dee3bf More linting in src 2023-08-23 04:15:58 -04:00
Jasmine Iwanek
506d548b38 More linting in src/video 2023-08-23 00:50:52 -04:00