* Make all bus-mastering-related variables atomic
* Do not, under any circumstances, attempt to read beyond PRIMEND and SECEND
This allows NT 4.0's Mystique drivers to work with busmastering enabled.
1. Reverted the packed chain4 and fb_only sides to 1 when extended mode is set, but with the call to svga_recalctimings removed from port 0x3df due to mode issues, this should fix all the MGA mode issues I know.
2. Cleaned up the rendering order in svga_recalctimings, especially 4bpp and 8bpp.
1. LFB access is now done properly through the right svga_read/write linear calls.
2. Lowres 8bpp mode and Packed/Extended 8bpp+ mode don't mix together, fixes Debian Woody matroxfb module when testing the modes while keeping other compatibility intact (basically enable packed stuff only when gdcreg5 bits 5-6 are 0 when extended mode is set).
3. Small cleanup in the line accel stuff.
1. Fixed wrong setting of highres and lowres mode of 8bpp, makes Transport Tycoon run properly on these ATI cards again.
2. 32-bit (RGBA) True Color is actually supported on the Mach32, but barely used, and the original code was wrong. This fix makes 32-bit True Color render the right colors.
1. Update svga->fast to account for packed chain mode toggles, fixes issues on Descent II for DOS using the Cirrus cards.
2. Re-organized ATI Mach8/32 LFB access as well as 8514/A/ATI mode toggles, should end the video mode issues once and for all.
3. Fixed a small but major pattern issue with IBM OS/2 1.30.1's XGA driver (not .2, which is fine as is).
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.
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.
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.
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.
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.
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.