Commit Graph

112 Commits

Author SHA1 Message Date
TC1995
f0d93aa00c Video clock changes of the day (August 20th, 2025)
Make the clocks of the ATI cards (pre-Mach64) more sane and precise (especially the Mach8/32).
2025-08-20 18:07:15 +02:00
TC1995
e4bc827ef4 ATI Pre-Mach64 (Mach8, Mach32) changes
Satisfy refresh rates correctly on said chips and add the clock chip of the add-on 8514/A Ultra.
2025-08-14 00:15:14 +02:00
TC1995
9b9f1a2610 8514/A (and XGA) compatible refresh rate fixes.
Correct the refresh rates of the 8514/A compatibles and XGA cards to match their real world rates.
2025-08-11 22:55:47 +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
TC1995
2ef029fb05 Fix one edge case of gpstatus stall.
Which fixes Win3.1's Mach32 2.3 4bpp driver stalling.
2025-07-05 11:01:25 +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
starfrost
8250b57325 Merge branch 'bugfixes' into master 2025-07-01 00:28:27 +01:00
TC1995
54b2f4237d Adjust the timings of the 8514/A and compatibles (June 30th, 2025) 2025-06-30 19:51:35 +02:00
TC1995
766bd1cfb9 Fix swapped value of the ramdacs used by the Mach32 PCI.
Now it correctly detects what's selected as the ramdac.
2025-06-29 00:42:27 +02:00
TC1995
5fbcbde4ba More fixes to the mode switching of the ATI/IBM 8514/A compatibles (June 28th, 2025)
The mode switching phase now takes account of the display enable/reset bits of port 0x22e8 (bits 5-6). Fixes Solaris mode switching and keeps everything else happy (I hope).
2025-06-28 20:55:14 +02:00
TC1995
07af9f12d7 Video: more changes and fixes of the day (June 26th, 2025)
1. Convert the ramdac types into an enumerator.
2. Make sure the 8514/A compatible ramdacs are, if in VGA mode, using VGA compatible ports and/or, in 8514/A mode, the 8514/A ports when needed, fixes color issues in 1280x1024 resolutions on NT 3.1 and various stuff using the Mach32.
3. Add pitch initialization on reset, fixes 8514/A display drivers on various stuff on Mach8/Mach32 cards.
2025-06-26 13:11:42 +02:00
starfrost013
7abb817012 clarify vga/8514 separation 2025-06-21 01:32:59 +01: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
TC1995
a92f7367f2 Fix mach8/32 win2000 blit regression (June 15th, 2025)
If the height is 1, then make sure Cur_X is used for the destination X start, otherwise, Dest_X_Start is the destination X start for the blit. This fixes some blit errors on Win2000's mach8/32 drivers.
2025-06-15 21:32:08 +02:00
starfrost013
317a5b7ade stat -> status; improve MDA register decoding; add MDA CRTC, register and mode enums 2025-06-11 17:37:15 +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
4a98cef2bf Cleaned up IBM/ATI 8514/A code (June 9th, 2025)
Replaced the magic numbers with actual enumerators for ease of understanding.
2025-06-09 17:31:56 +02:00
TC1995
06f4491193 Mach8 mode changes of the day (May 20th, 2025)
Make the previously Mach8 add-on only mode changes also available to the Graphics Ultra, should fix incorrect resolutions after switching from fullscreen DOS prompt to windowed and viceversa under Win98 (and SE).
2025-05-20 20:33:22 +02:00
TC1995
dbc2baebe9 Small ATI Mach8 changes (May 19th, 2025)
1. Report the ATI 28800 of the Graphics Ultra as 28800-6.
2. Access the upper word properly on vdisp.
3. Make sure there's enough vsyncstart/vtotal space for a full vertical display.
2025-05-19 22:22:03 +02:00
TC1995
6a6be85852 Late night fixes for the Mach8 (May 5th, 2025)
1. The Mach8 doesn't have separate graphics pitches a la Mach32 (68800-6 and up), fixes the rendering in some drivers for Windows.
2. Special case for the add-on Mach8 for the mode switching (resolution only).
2025-05-05 02:02:02 +02:00
TC1995
608ce2d155 Another stall fix for the mach8/32.
See above, covering the foreground and background select bits as well.
2025-05-04 02:04:41 +02:00
TC1995
8c736c7b9a Stall fix for the mach8/32 (April 30th, 2025)
See above.
2025-04-30 23:15:58 +02:00
TC1995
d623425efd Some more changes to the Mach8/32/8514/A side (April 29th, 2025)
1. Do not stall the guest when the passthrough mode is on, fixes hang ups in Windows 3.1 using the 2.3 drivers.
2. In the pitch register, make sure the passthrough goes on when needed only on the ATI Mach32, not 8, fixes mode on/off in text mode when needed.
3. Cosmetic changes and logs.
2025-04-29 00:57:03 +02:00
TC1995
d566a06202 Fix pitch regression of the ATI Mach8/32 side (April 28th, 2025)
This patch fixes the pitch that was originally 0 when specifying the 8514/A compatible side in the Mach8/32 cards, which should be 1024 for 8514/A compatible stuff.
2025-04-28 19:28:58 +02:00
TC1995
b7319cf60b Fix warnings and build. 2025-04-22 21:24:31 +02:00
TC1995
14ef3b75ac Vast fixes to the Mach8/32/8514/A compatible side (April 22nd 2025)
1. As tiring as it seems, XOR properly the passthrough bits for mode changes. Fixes everything tested as of now (Mach8/32).
2. Implemented separate destination and source GE pitch and offsets. Fixes Windows 3.1 mach8/32 drivers using devicebitmap enabled (or dmp=1).
3. Properly fixed high and true color patterns so that the aforementioned patterns are drawn correctly in various stuff.
4. Implemented in the best possible way the CRT offset (currently in on conjunction with the GE offset).
5. On ScanToX with bpp set to 24 and dpconfig 0x6211, optmize the SRC/CUR X-Y coordinates at the end of the blit.
6. For mode changes, don't call the mode change recalctimings function if we aren't in the appropriate bits of the respective ports.
7. Separate 8514/A compatible and Extended foreground/background selection implemented, fixes Windows 3.x ATI Ultra drivers from 1992 without hacks.
8. Clear the busy flags when needed without stalling the entire guests (but not the emulator itself) (Mach8/32).
9. The MMIO regs should be enabled only when the VGA aperture has reached a graphics mode (0xA000). This fixes NT 3.x mach drivers in true color mode and making Win3.1 drivers working without a hitch at the same time.
10. Actually implement the hardware 4bpp cursor properly on Mach32.
11. Cosmetic cleanups.
2025-04-22 21:15:05 +02:00
TC1995
5432c1dd13 8514/A compatible changes of the day (April 2nd, 2025)
1. Aliases are aliases, period.
2. Actually make the ports using bit 15 of their range use the command FIFO.
3. Improved the special ATI command 0xc2b5 in the IBM bitblt side, fixes cursor issues in 24bpp mode using OS/2.
4. When the FIFO is empty, clear the busy and available flags.
5. Also reapply a workaround for 24bpp foreground color patterns in ATI command Scan To X command, fixes patterns in OS/2 and possibly elsewhere.
6. Accelerated HiColor mode, in the IBM passthrough mode, should always be enabled, for now, as well as the Extended ATI Mach32 8bpp mode when prompted, fixes OS/2 booting into the GUI in HiColor mode.
7. Dummy data path configuration values on direct linedraw should not trigger a pixtrans read when it's not needed, fixes possible hang ups in IBM/ATI mode when the busy flag remains enabled.
2025-04-02 21:33:26 +02:00
TC1995
5ae5e99e41 Major changes on the 8514/A side again (March 30th, 2025)
1. The DX/DY coordinates for BitBLT are now signed again, fixes 8514/A cursor issues.
2. Made the busy/data available processor statuses more like the ATI one for more stability and no stalls, fixes Windows 3.x and IBM OS/2 1.x (possibly later ones too) that use the built-in 8514/A driver.
3. Made the mode switching clearer (through a note) regarding the shadow sets, this should make every program happy, I hope.
4. In the Mach32 series only, a first load of the CRT sets also initializes the GE offsets if the corresponding bit is set, fixes Mach8/32 mode tests in their eeprom and demoai with hdiload from ATI/IBM.
2025-03-30 22:06:16 +02:00
TC1995
ef588c118a Fixed log excess. 2025-03-29 20:36:00 +01:00
TC1995
5a4a939e02 More fixes to the 8514/A compatible side.
1. Use proper identification to what chips use what.
2. Apply some mode switch fixes to the ATI 8514/A Ultra and make 1024x768 87Hz interlaced the default mode if htotal is 0 and on ati8514_init.
3. Add the undocumented ports to the ATI 8514/A Ultra add-on as well.
2025-03-29 20:27:20 +01:00
TC1995
c91f2255ad Vast overhaul for the Mach8/32/8514/A (March 29th, 2025)
1. Implemented the FIFO test data to pass some tests of the Mach8 POST ROM and tests (not complete yet).
2. Overhauled the mode switches again, but this time with way less hacks and more on manual instructions.
3. Use a function pointer to determine if the Mach8 type used is a VGA combo or add-on.
4. Mach32 mode tests are no longer incorrectly green (was caused by improper pixtrans parts).
5. Implemented overscan color to the Mach32 as well as the CRT offset.
6. And fixed a PCI LFB GPF issue with the Mach32 2.3 drivers on Win3.1x.
7. Implemented memory boundary for both the Mach32 SVGA and its accelerator.
8. Added undocumented ports used by the FIFO (such as ports 0x8AEE and 0xEAEE).
9. Plus resetting the device right a la s3.
10. Temporarily switched the bus type of the Mach8 to 8-bit in both MCA and ISA variants.
2025-03-29 14:42:25 +01:00
TC1995
dad0a37ab3 Mach32 LFB changes (March 8th, 2025)
The Byte Write access of the LFB of the Mach32 was not correctly taking account of the subtraction of the address, this fixes possible graphics bugs using the LFB (Linear Aperture).
2025-03-08 20:58:49 +01:00
TC1995
5f833a0963 Mach32 LFB changes of the day (March 8th, 2025)
Do not subtract from the linear base when it's not in the range, should fix NT 3.x graphics bugs using the LFB.
2025-03-08 14:45:41 +01:00
TC1995
5c78fa5203 8514/A compatible changes of the day (March 6th, 2025)
1. Follow the Mach32 manual more closely regarding vblank support.
2. The subsystem status now takes account of the other bits more accurately.
3. The Mach32 PCI, when used with the ATI 68860 ramdac, has its own bpp's when in accelerator mode, separate from the VGA compatible side, so fix this accordingly.
4. Reset the vram when a mapping change occurs, should clear the messups in the ATI Mach8/32 accel video mode tests.
2025-03-06 16:03:11 +01:00
Cacodemon345
74368bfe7a Don't include cpu.h in timer.h
Change the name of the define used to indicate SVGA multi-monitor-capable cards
2025-03-06 19:26:11 +06:00
TC1995
71c9e69456 Mach32 changes of the day (February 20th, 2025)
1. Actually fix the LFB access by subtracting the linear base address from the current address when LFB/MMIO is on. This fixes blankness of certain Mach32 drivers on Win3.1x.
2. Apply a minor but important fix to the fonts used by said Win3.1x driver when the dpconfig activates bit 2 without bit 12 set (e.g.: 0x2255), ergo, issuing host data as monochrome without swapping it.
2025-02-20 15:35:56 +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
5f273265ae Assorted warning fixes 2025-02-02 03:24:50 -05:00
TC1995
d881321268 Minor ATI 8514/A Ultra add-on change of the night (February 1st, 2025)
Actually make it work on NT by setting bit 0 of the read only config2 reg.
2025-02-01 22:19:55 +01:00
Jasmine Iwanek
81b8038bc5 Clean up .available & .poll 2025-02-01 03:38:52 -05:00
TC1995
e61f3c8a5d Video changes of the day (January 26th, 2025)
XGA:
1. Added a proper poll so to have its timings independent of the SVGA core and changes its renderer accordingly, mainly a blank render one.
2. Workaround the Ctrl-Alt-Del reset of Windows 2.x so that it switches back to VGA text mode correctly when using the 0xA000 64K aperture (in vid_svga.c).

SVGA core:
Re-organized the way the different timers are organized so that the XGA and 8514/A pollers can coexist with the SVGA timer without conflicts.

ATI Mach32:
Reworked the true color renderer and made it a Mach32 exclusive due to its differences from the standard one. Fixes wrong rendered colors in NT using the 32bpp renderer in RGB mode.
2025-01-26 14:25:35 +01:00
TC1995
54a0bb8522 1st set of changes (video-related) of the day (January 16th, 2025)
ATI Mach8-based (add-on only):
Do not override the clone VGA banked mapping with the standard VGA when needed. Fixes issues with banked mapping with ATI 8514/A enabled on cards with clone mappings such as Cirrus, Video7, Paradise/WD, etc.
2025-01-16 22:37:52 +01:00
OBattler
463badd613 kB -> KB. 2024-11-19 04:08:21 +01:00
TC1995
afe95cd20c Video changes of the day (November 13th, 2024)
1. Finally add the ATI 8514/A Ultra add-on BIOS in both ISA and MCA variants (despite the ROM page failure on POST).
2. Fixed a mode switch bug in the Mach8 (both add-on and vga combo) when exiting the Win3.x GUI using the native drivers.
3. Corrected (best possible) the eeprom load of the Mach8 products.
4. Partial implementation of the FIFO on the 8514/A compatible products including Mach8/32 and plain IBM 8514/A.
2024-11-13 22:55:16 +01:00
OBattler
09eb050423 More KB -> kB. 2024-11-12 01:45:58 +01:00
TC1995
863b76a190 Fixing regressions of the mach32 (November 5th, 2024)
1. ATI Extended 8514/A mode may not use bit 5 of ATI reg 0xb0 sometimes but at the same time it won't use the standard VGA way of setting up 256+ colors, therefore, in the VGA DAC writes, use standard VGA way to revert to VGA mode in the writes instead of relying on bit 5 of ATI reg 0xb0 being enabled/disabled there. Fixes mode switches in VLB/PCI configurations using Windows 9x and possibly other stuff, ISA is unaffected and still works fine.
2. Added more logs and and remove/set I/O handlers correctly for the PCI side.
2024-11-05 01:08:13 +01:00
TC1995
c966538324 8514/A compatible changes on Mach32 of the day (November 3rd, 2024)
Mark the ATI extended 8514/A mode accordingly (that is, if bit 5 of ATI reg 0xb0 and using ATI extended ports at the same time). Fixes wrong colors in some instances using standard IBM 8514/A drivers on Mach32.
2024-11-03 23:21:18 +01:00
TC1995
fa69678a94 Even better (hopefully) way to fix the mode switches (November 3rd, 2024)
1. Added the missing call to mach32_updatemapping from port 0x3CF through its index 6.
2. If the accelerator DAC is active and the extended 256 color bit is on too then enable 8514/A mode when needed, otherwise it's VGA mode or decided by the passthrough/clock selection ports.
3. VGA DAC reads are redirected to the 8514/A DAC reads only when 8514/A mode is on.
2024-11-03 04:46:32 +01:00