2017-10-11 05:40:44 -04:00
|
|
|
/*
|
2022-11-05 21:44:11 -04:00
|
|
|
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
|
|
|
|
* running old operating systems and software designed for IBM
|
|
|
|
|
* PC systems and compatibles from 1981 through fairly recent
|
|
|
|
|
* system designs based on the PCI bus.
|
2017-10-11 05:40:44 -04:00
|
|
|
*
|
2022-11-05 21:44:11 -04:00
|
|
|
* This file is part of the 86Box distribution.
|
2017-10-11 05:40:44 -04:00
|
|
|
*
|
2022-11-05 21:44:11 -04:00
|
|
|
* Define all known video cards.
|
2017-10-11 05:40:44 -04:00
|
|
|
*
|
2020-03-25 00:46:02 +02:00
|
|
|
*
|
2017-10-11 05:40:44 -04:00
|
|
|
*
|
2022-11-05 21:44:11 -04:00
|
|
|
* Authors: Miran Grca, <mgrca8@gmail.com>
|
|
|
|
|
* Fred N. van Kempen, <decwiz@yahoo.com>
|
2017-10-11 05:40:44 -04:00
|
|
|
*
|
2022-11-05 21:44:11 -04:00
|
|
|
* Copyright 2016-2020 Miran Grca.
|
|
|
|
|
* Copyright 2017-2020 Fred N. van Kempen.
|
2017-10-11 05:40:44 -04:00
|
|
|
*/
|
2018-05-21 19:04:05 +02:00
|
|
|
#include <stdarg.h>
|
2017-10-11 05:40:44 -04:00
|
|
|
#include <stdint.h>
|
2018-05-21 19:04:05 +02:00
|
|
|
#include <stdio.h>
|
2017-10-11 05:40:44 -04:00
|
|
|
#include <stdlib.h>
|
2018-10-02 22:54:28 +02:00
|
|
|
#include <string.h>
|
2017-10-11 05:40:44 -04:00
|
|
|
#include <wchar.h>
|
2018-05-21 19:04:05 +02:00
|
|
|
#define HAVE_STDARG_H
|
2020-03-29 14:24:42 +02:00
|
|
|
#include <86box/86box.h>
|
|
|
|
|
#include <86box/timer.h>
|
|
|
|
|
#include <86box/machine.h>
|
|
|
|
|
#include <86box/mem.h>
|
|
|
|
|
#include <86box/device.h>
|
|
|
|
|
#include <86box/plat.h>
|
|
|
|
|
#include <86box/video.h>
|
|
|
|
|
#include <86box/vid_svga.h>
|
2017-10-11 05:40:44 -04:00
|
|
|
|
2020-03-29 14:24:42 +02:00
|
|
|
#include <86box/vid_cga.h>
|
|
|
|
|
#include <86box/vid_ega.h>
|
|
|
|
|
#include <86box/vid_colorplus.h>
|
|
|
|
|
#include <86box/vid_mda.h>
|
2023-07-14 23:38:04 +02:00
|
|
|
#include <86box/vid_xga_device.h>
|
2017-10-11 05:40:44 -04:00
|
|
|
|
2023-07-31 17:31:15 -04:00
|
|
|
typedef struct video_card_t {
|
2022-08-31 19:19:29 -04:00
|
|
|
const device_t *device;
|
|
|
|
|
int flags;
|
2017-10-11 05:40:44 -04:00
|
|
|
} VIDEO_CARD;
|
|
|
|
|
|
2022-08-31 19:19:29 -04:00
|
|
|
static video_timings_t timing_default = { .type = VIDEO_ISA, .write_b = 8, .write_w = 16, .write_l = 32, .read_b = 8, .read_w = 16, .read_l = 32 };
|
2018-09-19 20:13:32 +02:00
|
|
|
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
static int was_reset = 0;
|
|
|
|
|
|
2022-02-02 17:48:04 -05:00
|
|
|
static const device_t vid_none_device = {
|
2022-08-31 19:19:29 -04:00
|
|
|
.name = "None",
|
2022-04-09 20:09:14 -04:00
|
|
|
.internal_name = "none",
|
2022-08-31 19:19:29 -04:00
|
|
|
.flags = 0,
|
|
|
|
|
.local = 0,
|
|
|
|
|
.init = NULL,
|
|
|
|
|
.close = NULL,
|
|
|
|
|
.reset = NULL,
|
2022-04-09 20:09:14 -04:00
|
|
|
{ .available = NULL },
|
|
|
|
|
.speed_changed = NULL,
|
2022-08-31 19:19:29 -04:00
|
|
|
.force_redraw = NULL,
|
|
|
|
|
.config = NULL
|
2022-02-02 17:48:04 -05:00
|
|
|
};
|
|
|
|
|
static const device_t vid_internal_device = {
|
2022-08-31 19:19:29 -04:00
|
|
|
.name = "Internal",
|
2022-04-09 20:09:14 -04:00
|
|
|
.internal_name = "internal",
|
2022-08-31 19:19:29 -04:00
|
|
|
.flags = 0,
|
|
|
|
|
.local = 0,
|
|
|
|
|
.init = NULL,
|
|
|
|
|
.close = NULL,
|
|
|
|
|
.reset = NULL,
|
2022-04-09 20:09:14 -04:00
|
|
|
{ .available = NULL },
|
|
|
|
|
.speed_changed = NULL,
|
2022-08-31 19:19:29 -04:00
|
|
|
.force_redraw = NULL,
|
|
|
|
|
.config = NULL
|
2022-02-02 17:48:04 -05:00
|
|
|
};
|
|
|
|
|
|
2018-03-19 01:02:04 +01:00
|
|
|
static const VIDEO_CARD
|
2017-10-11 05:40:44 -04:00
|
|
|
video_cards[] = {
|
2022-11-19 08:49:04 -05:00
|
|
|
// clang-format off
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &vid_none_device },
|
|
|
|
|
{ &vid_internal_device },
|
2023-12-19 19:03:54 +01:00
|
|
|
{ &atiega800p_device },
|
2023-07-14 23:38:04 +02:00
|
|
|
{ &mach8_isa_device, VIDEO_FLAG_TYPE_8514 },
|
2023-08-11 20:32:56 -04:00
|
|
|
{ &mach32_isa_device, VIDEO_FLAG_TYPE_8514 },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &mach64gx_isa_device },
|
|
|
|
|
{ &ati28800k_device },
|
|
|
|
|
{ &ati18800_vga88_device },
|
|
|
|
|
{ &ati28800_device },
|
|
|
|
|
{ &compaq_ati28800_device },
|
2021-10-24 19:06:05 +02:00
|
|
|
#if defined(DEV_BRANCH) && defined(USE_XL24)
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &ati28800_wonderxl24_device },
|
2021-10-24 19:06:05 +02:00
|
|
|
#endif
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &ati18800_device },
|
2018-04-25 23:51:13 +02:00
|
|
|
#if defined(DEV_BRANCH) && defined(USE_VGAWONDER)
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &ati18800_wonder_device },
|
2018-03-11 18:31:47 +01:00
|
|
|
#endif
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &cga_device },
|
|
|
|
|
{ &sega_device },
|
|
|
|
|
{ &gd5401_isa_device },
|
|
|
|
|
{ &gd5402_isa_device },
|
|
|
|
|
{ &gd5420_isa_device },
|
|
|
|
|
{ &gd5422_isa_device },
|
|
|
|
|
{ &gd5426_isa_device },
|
|
|
|
|
{ &gd5426_diamond_speedstar_pro_a1_isa_device },
|
2022-07-27 17:43:28 -04:00
|
|
|
{ &gd5428_boca_isa_device },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &gd5428_isa_device },
|
|
|
|
|
{ &gd5429_isa_device },
|
|
|
|
|
{ &gd5434_isa_device },
|
|
|
|
|
{ &gd5434_diamond_speedstar_64_a3_isa_device },
|
|
|
|
|
{ &compaq_cga_device },
|
|
|
|
|
{ &compaq_cga_2_device },
|
|
|
|
|
{ &cpqega_device },
|
|
|
|
|
{ &ega_device },
|
|
|
|
|
{ &g2_gc205_device },
|
2022-07-07 14:34:59 +06:00
|
|
|
{ &hercules_device, VIDEO_FLAG_TYPE_MDA },
|
|
|
|
|
{ &herculesplus_device, VIDEO_FLAG_TYPE_MDA },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &incolor_device },
|
2023-07-14 23:38:04 +02:00
|
|
|
{ &inmos_isa_device, VIDEO_FLAG_TYPE_XGA },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &im1024_device },
|
|
|
|
|
{ &iskra_ega_device },
|
|
|
|
|
{ &et4000_kasan_isa_device },
|
2022-07-07 14:34:59 +06:00
|
|
|
{ &mda_device, VIDEO_FLAG_TYPE_MDA },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &genius_device },
|
|
|
|
|
{ &nga_device },
|
|
|
|
|
{ &ogc_device },
|
|
|
|
|
{ &oti037c_device },
|
|
|
|
|
{ &oti067_device },
|
|
|
|
|
{ &oti077_device },
|
|
|
|
|
{ ¶dise_pvga1a_device },
|
|
|
|
|
{ ¶dise_wd90c11_device },
|
|
|
|
|
{ ¶dise_wd90c30_device },
|
|
|
|
|
{ &colorplus_device },
|
|
|
|
|
{ &pgc_device },
|
2022-10-20 00:33:30 +02:00
|
|
|
{ &cga_pravetz_device },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &radius_svga_multiview_isa_device },
|
|
|
|
|
{ &realtek_rtg3106_device },
|
|
|
|
|
{ &s3_diamond_stealth_vram_isa_device },
|
|
|
|
|
{ &s3_orchid_86c911_isa_device },
|
|
|
|
|
{ &s3_ami_86c924_isa_device },
|
|
|
|
|
{ &s3_metheus_86c928_isa_device },
|
|
|
|
|
{ &s3_phoenix_86c801_isa_device },
|
|
|
|
|
{ &s3_spea_mirage_86c801_isa_device },
|
|
|
|
|
{ &sigma_device },
|
|
|
|
|
{ &tvga8900b_device },
|
|
|
|
|
{ &tvga8900d_device },
|
|
|
|
|
{ &tvga9000b_device },
|
2022-10-02 01:35:17 +06:00
|
|
|
{ &nec_sv9000_device },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &et4000k_isa_device },
|
|
|
|
|
{ &et2000_device },
|
2022-11-05 23:22:32 -04:00
|
|
|
{ &et3000_isa_device },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &et4000_isa_device },
|
|
|
|
|
{ &et4000w32_device },
|
|
|
|
|
{ &et4000w32i_isa_device },
|
|
|
|
|
{ &vga_device },
|
|
|
|
|
{ &v7_vga_1024i_device },
|
|
|
|
|
{ &wy700_device },
|
Video changes:
1. The passthrough from VGA to 8514/A and/or 8514/A to VGA no longer relies on hackish places where to switch from/to, instead, relying on port 0x3c3 of VGA doing so (though the Mach8/32 still needs some places where to manually switch from/to, mainly the MCA one when configuring the EEPROM).
2. Implemented the MCA behalf of the Mach32 and its corresponding reset function.
3. Properly implemented (more or less) true color, including 24-bit BGR rendering
4. Other fixes such as color patterns and mono patterns being more correct than before in various operating systems and in 24-bit true color.
5. Implemented the onboard Mach32 video of the IBM PS/ValuePoint P60 machine.
6. Made the onboard internal video detect when it's 8514/A compatible or not (CGA/EGA/MDA/VGA/etc.). If the former is selected, then the video monitor flag is used instead (for QT).
7. The TGUI9400 and 9440, if on VLB, now detect the right amount of memory if on 2MB.
8. Initial implementation of the ATI 68875 ramdac used by the Mach32 and made the ATI 68860 8514/A aware when selected with the Mach32AX PCI.
9. Separated the 8514/A ramdac ports from the VGA ramdac ports, allowing seamless transition from/to 8514/A/VGA.
10. Fixed a hdisp problem in the ET4000/W32 cards, where it was doubling the horizontal display in 15bpp+ graphics mode.
11. Removed the 0x3da/0x3ba port hack that was on the Mach8/32 code, relying on the (S)VGA core instead.
12. Reworked and simplified the TGUI9440 pitch register based on logging due to no documentation at all.
2023-08-12 00:00:46 +02:00
|
|
|
{ &mach32_mca_device, VIDEO_FLAG_TYPE_8514 },
|
2022-07-26 01:06:40 +06:00
|
|
|
{ &gd5426_mca_device },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &gd5428_mca_device },
|
|
|
|
|
{ &et4000_mca_device },
|
|
|
|
|
{ &radius_svga_multiview_mca_device },
|
2023-08-11 20:32:56 -04:00
|
|
|
{ &mach32_pci_device, VIDEO_FLAG_TYPE_8514 },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &mach64gx_pci_device },
|
|
|
|
|
{ &mach64vt2_device },
|
|
|
|
|
{ &et4000w32p_videomagic_revb_pci_device },
|
|
|
|
|
{ &et4000w32p_revc_pci_device },
|
|
|
|
|
{ &et4000w32p_cardex_pci_device },
|
|
|
|
|
{ &et4000w32p_noncardex_pci_device },
|
|
|
|
|
{ &et4000w32p_pci_device },
|
|
|
|
|
{ &gd5430_pci_device, },
|
|
|
|
|
{ &gd5434_pci_device },
|
2023-01-22 16:50:21 +06:00
|
|
|
{ &gd5436_pci_device, VIDEO_FLAG_TYPE_SPECIAL },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &gd5440_pci_device },
|
2023-01-22 16:50:21 +06:00
|
|
|
{ &gd5446_pci_device, VIDEO_FLAG_TYPE_SPECIAL },
|
|
|
|
|
{ &gd5446_stb_pci_device,VIDEO_FLAG_TYPE_SPECIAL },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &gd5480_pci_device },
|
|
|
|
|
{ &s3_spea_mercury_lite_86c928_pci_device },
|
|
|
|
|
{ &s3_diamond_stealth64_964_pci_device },
|
|
|
|
|
{ &s3_elsa_winner2000_pro_x_964_pci_device },
|
|
|
|
|
{ &s3_mirocrystal_20sv_964_pci_device },
|
|
|
|
|
{ &s3_bahamas64_pci_device },
|
|
|
|
|
{ &s3_phoenix_vision864_pci_device },
|
|
|
|
|
{ &s3_diamond_stealth_se_pci_device },
|
|
|
|
|
{ &s3_phoenix_trio32_pci_device },
|
|
|
|
|
{ &s3_diamond_stealth64_pci_device },
|
|
|
|
|
{ &s3_9fx_pci_device },
|
|
|
|
|
{ &s3_phoenix_trio64_pci_device },
|
|
|
|
|
{ &s3_elsa_winner2000_pro_x_pci_device },
|
|
|
|
|
{ &s3_mirovideo_40sv_ergo_968_pci_device },
|
|
|
|
|
{ &s3_9fx_771_pci_device },
|
|
|
|
|
{ &s3_phoenix_vision968_pci_device },
|
|
|
|
|
{ &s3_spea_mercury_p64v_pci_device },
|
|
|
|
|
{ &s3_9fx_531_pci_device },
|
|
|
|
|
{ &s3_phoenix_vision868_pci_device },
|
|
|
|
|
{ &s3_phoenix_trio64vplus_pci_device },
|
|
|
|
|
{ &s3_trio64v2_dx_pci_device },
|
|
|
|
|
{ &s3_virge_325_pci_device },
|
|
|
|
|
{ &s3_diamond_stealth_2000_pci_device },
|
|
|
|
|
{ &s3_diamond_stealth_3000_pci_device },
|
|
|
|
|
{ &s3_stb_velocity_3d_pci_device },
|
|
|
|
|
{ &s3_virge_375_pci_device },
|
|
|
|
|
{ &s3_diamond_stealth_2000pro_pci_device },
|
|
|
|
|
{ &s3_virge_385_pci_device },
|
|
|
|
|
{ &s3_virge_357_pci_device },
|
|
|
|
|
{ &s3_diamond_stealth_4000_pci_device },
|
|
|
|
|
{ &s3_trio3d2x_pci_device },
|
2023-12-16 20:17:55 +01:00
|
|
|
{ &millennium_device },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &mystique_device },
|
|
|
|
|
{ &mystique_220_device },
|
|
|
|
|
{ &tgui9440_pci_device },
|
|
|
|
|
{ &tgui9660_pci_device },
|
|
|
|
|
{ &tgui9680_pci_device },
|
|
|
|
|
{ &voodoo_banshee_device },
|
|
|
|
|
{ &creative_voodoo_banshee_device },
|
2022-11-10 13:06:47 -05:00
|
|
|
{ &voodoo_3_1000_device },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &voodoo_3_2000_device },
|
|
|
|
|
{ &voodoo_3_3000_device },
|
2023-08-11 20:32:56 -04:00
|
|
|
{ &mach32_vlb_device, VIDEO_FLAG_TYPE_8514 },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &mach64gx_vlb_device },
|
|
|
|
|
{ &et4000w32i_vlb_device },
|
|
|
|
|
{ &et4000w32p_videomagic_revb_vlb_device },
|
|
|
|
|
{ &et4000w32p_revc_vlb_device },
|
|
|
|
|
{ &et4000w32p_cardex_vlb_device },
|
|
|
|
|
{ &et4000w32p_vlb_device },
|
|
|
|
|
{ &et4000w32p_noncardex_vlb_device },
|
|
|
|
|
{ &gd5424_vlb_device },
|
|
|
|
|
{ &gd5426_vlb_device },
|
|
|
|
|
{ &gd5428_vlb_device },
|
|
|
|
|
{ &gd5428_diamond_speedstar_pro_b1_vlb_device },
|
|
|
|
|
{ &gd5429_vlb_device },
|
|
|
|
|
{ &gd5430_diamond_speedstar_pro_se_a8_vlb_device },
|
2022-07-28 20:39:34 -04:00
|
|
|
{ &gd5430_vlb_device },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &gd5434_vlb_device },
|
|
|
|
|
{ &s3_metheus_86c928_vlb_device },
|
|
|
|
|
{ &s3_mirocrystal_8s_805_vlb_device },
|
|
|
|
|
{ &s3_mirocrystal_10sd_805_vlb_device },
|
|
|
|
|
{ &s3_phoenix_86c805_vlb_device },
|
|
|
|
|
{ &s3_spea_mirage_86c805_vlb_device },
|
|
|
|
|
{ &s3_diamond_stealth64_964_vlb_device },
|
|
|
|
|
{ &s3_mirocrystal_20sv_964_vlb_device },
|
|
|
|
|
{ &s3_mirocrystal_20sd_864_vlb_device },
|
|
|
|
|
{ &s3_bahamas64_vlb_device },
|
|
|
|
|
{ &s3_phoenix_vision864_vlb_device },
|
|
|
|
|
{ &s3_diamond_stealth_se_vlb_device },
|
|
|
|
|
{ &s3_phoenix_trio32_vlb_device },
|
|
|
|
|
{ &s3_diamond_stealth64_vlb_device },
|
|
|
|
|
{ &s3_9fx_vlb_device },
|
|
|
|
|
{ &s3_phoenix_trio64_vlb_device },
|
|
|
|
|
{ &s3_spea_mirage_p64_vlb_device },
|
|
|
|
|
{ &s3_phoenix_vision968_vlb_device },
|
|
|
|
|
{ &s3_phoenix_vision868_vlb_device },
|
|
|
|
|
{ &ht216_32_standalone_device },
|
|
|
|
|
{ &tgui9400cxi_device },
|
|
|
|
|
{ &tgui9440_vlb_device },
|
|
|
|
|
{ &s3_virge_357_agp_device },
|
|
|
|
|
{ &s3_diamond_stealth_4000_agp_device },
|
|
|
|
|
{ &s3_trio3d2x_agp_device },
|
|
|
|
|
{ &velocity_100_agp_device },
|
2022-11-10 13:10:39 -05:00
|
|
|
{ &velocity_200_agp_device },
|
2022-11-10 13:06:47 -05:00
|
|
|
{ &voodoo_3_1000_agp_device },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &voodoo_3_2000_agp_device },
|
|
|
|
|
{ &voodoo_3_3000_agp_device },
|
2022-11-10 13:07:52 -05:00
|
|
|
{ &voodoo_3_3500_agp_ntsc_device },
|
|
|
|
|
{ &voodoo_3_3500_agp_pal_device },
|
2022-11-10 17:18:16 -05:00
|
|
|
{ &compaq_voodoo_3_3500_agp_device },
|
2022-11-10 17:19:50 -05:00
|
|
|
{ &voodoo_3_3500_se_agp_device },
|
2022-11-10 17:20:54 -05:00
|
|
|
{ &voodoo_3_3500_si_agp_device },
|
2022-02-26 23:31:28 -05:00
|
|
|
{ NULL }
|
2022-11-19 08:49:04 -05:00
|
|
|
// clang-format on
|
2022-11-13 16:38:48 -05:00
|
|
|
};
|
2017-10-11 05:40:44 -04:00
|
|
|
|
2018-05-21 19:04:05 +02:00
|
|
|
#ifdef ENABLE_VID_TABLE_LOG
|
|
|
|
|
int vid_table_do_log = ENABLE_VID_TABLE_LOG;
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
vid_table_log(const char *fmt, ...)
|
|
|
|
|
{
|
|
|
|
|
va_list ap;
|
|
|
|
|
|
|
|
|
|
if (vid_table_do_log) {
|
2022-08-31 19:19:29 -04:00
|
|
|
va_start(ap, fmt);
|
|
|
|
|
pclog_ex(fmt, ap);
|
|
|
|
|
va_end(ap);
|
2018-05-21 19:04:05 +02:00
|
|
|
}
|
|
|
|
|
}
|
2018-10-22 04:22:00 +02:00
|
|
|
#else
|
2022-08-31 19:19:29 -04:00
|
|
|
# define vid_table_log(fmt, ...)
|
2018-10-22 04:22:00 +02:00
|
|
|
#endif
|
2018-05-21 19:04:05 +02:00
|
|
|
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
void
|
|
|
|
|
video_reset_close(void)
|
|
|
|
|
{
|
2022-07-04 01:50:42 +06:00
|
|
|
for (int i = 1; i < MONITORS_NUM; i++)
|
|
|
|
|
video_monitor_close(i);
|
|
|
|
|
|
|
|
|
|
monitor_index_global = 0;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
video_inform(VIDEO_FLAG_TYPE_NONE, &timing_default);
|
2019-10-20 15:09:38 +02:00
|
|
|
was_reset = 0;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
}
|
|
|
|
|
|
2021-08-21 18:19:10 +02:00
|
|
|
static void
|
|
|
|
|
video_prepare(void)
|
2018-08-16 03:18:53 +02:00
|
|
|
{
|
2018-09-19 20:13:32 +02:00
|
|
|
/* Reset (deallocate) the video font arrays. */
|
2018-08-16 03:18:53 +02:00
|
|
|
if (fontdatksc5601) {
|
2022-08-31 19:19:29 -04:00
|
|
|
free(fontdatksc5601);
|
|
|
|
|
fontdatksc5601 = NULL;
|
2018-08-16 03:18:53 +02:00
|
|
|
}
|
2017-10-11 05:40:44 -04:00
|
|
|
|
2018-11-01 10:52:27 +01:00
|
|
|
/* Reset the blend. */
|
|
|
|
|
herc_blend = 0;
|
|
|
|
|
|
2022-07-06 17:44:43 +06:00
|
|
|
for (int i = 0; i < MONITORS_NUM; i++) {
|
|
|
|
|
/* Reset the CGA palette. */
|
2022-08-31 19:19:29 -04:00
|
|
|
if (monitors[i].mon_cga_palette)
|
|
|
|
|
*monitors[i].mon_cga_palette = 0;
|
2022-07-06 17:44:43 +06:00
|
|
|
cgapal_rebuild_monitor(i);
|
|
|
|
|
|
|
|
|
|
/* Do an inform on the default values, so that that there's some sane values initialized
|
|
|
|
|
even if the device init function does not do an inform of its own. */
|
|
|
|
|
video_inform_monitor(VIDEO_FLAG_TYPE_SPECIAL, &timing_default, i);
|
|
|
|
|
}
|
2021-08-21 18:19:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
video_pre_reset(int card)
|
|
|
|
|
{
|
2022-08-31 19:19:29 -04:00
|
|
|
if ((card == VID_NONE) || (card == VID_INTERNAL) || machine_has_flags(machine, MACHINE_VIDEO_ONLY))
|
|
|
|
|
video_prepare();
|
2021-08-21 18:19:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
video_reset(int card)
|
|
|
|
|
{
|
|
|
|
|
/* This is needed to avoid duplicate resets. */
|
|
|
|
|
if ((video_get_type() != VIDEO_FLAG_TYPE_NONE) && was_reset)
|
2022-08-31 19:19:29 -04:00
|
|
|
return;
|
2021-08-21 18:19:10 +02:00
|
|
|
|
2023-02-06 04:12:46 -05:00
|
|
|
vid_table_log("VIDEO: reset (gfxcard[0]=%d, internal=%d)\n",
|
2022-08-31 19:19:29 -04:00
|
|
|
card, machine_has_flags(machine, MACHINE_VIDEO) ? 1 : 0);
|
2021-08-21 18:19:10 +02:00
|
|
|
|
2022-07-04 01:50:42 +06:00
|
|
|
monitor_index_global = 0;
|
2021-08-21 18:19:10 +02:00
|
|
|
loadfont("roms/video/mda/mda.rom", 0);
|
|
|
|
|
|
2023-10-14 06:45:45 +02:00
|
|
|
if ((card != VID_NONE) && !machine_has_flags(machine, MACHINE_VIDEO_ONLY) &&
|
|
|
|
|
(gfxcard[1] > VID_INTERNAL) && device_is_valid(video_card_getdevice(gfxcard[1]), machine)) {
|
2022-07-04 01:50:42 +06:00
|
|
|
video_monitor_init(1);
|
|
|
|
|
monitor_index_global = 1;
|
2023-02-06 04:12:46 -05:00
|
|
|
device_add(video_cards[gfxcard[1]].device);
|
2022-07-04 01:50:42 +06:00
|
|
|
monitor_index_global = 0;
|
|
|
|
|
}
|
2017-10-11 05:40:44 -04:00
|
|
|
|
2023-08-07 03:35:23 +02:00
|
|
|
/* Do not initialize internal cards here. */
|
2023-10-14 06:45:45 +02:00
|
|
|
if ((card > VID_INTERNAL) && !machine_has_flags(machine, MACHINE_VIDEO_ONLY)) {
|
2023-08-07 03:35:23 +02:00
|
|
|
vid_table_log("VIDEO: initializing '%s'\n", video_cards[card].device->name);
|
|
|
|
|
|
|
|
|
|
video_prepare();
|
|
|
|
|
|
|
|
|
|
/* Initialize the video card. */
|
|
|
|
|
device_add(video_cards[card].device);
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-10 01:37:33 +02:00
|
|
|
was_reset = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
video_post_reset(void)
|
|
|
|
|
{
|
2023-08-22 17:56:55 +05:00
|
|
|
int ibm8514_has_vga = 0;
|
Video changes:
1. The passthrough from VGA to 8514/A and/or 8514/A to VGA no longer relies on hackish places where to switch from/to, instead, relying on port 0x3c3 of VGA doing so (though the Mach8/32 still needs some places where to manually switch from/to, mainly the MCA one when configuring the EEPROM).
2. Implemented the MCA behalf of the Mach32 and its corresponding reset function.
3. Properly implemented (more or less) true color, including 24-bit BGR rendering
4. Other fixes such as color patterns and mono patterns being more correct than before in various operating systems and in 24-bit true color.
5. Implemented the onboard Mach32 video of the IBM PS/ValuePoint P60 machine.
6. Made the onboard internal video detect when it's 8514/A compatible or not (CGA/EGA/MDA/VGA/etc.). If the former is selected, then the video monitor flag is used instead (for QT).
7. The TGUI9400 and 9440, if on VLB, now detect the right amount of memory if on 2MB.
8. Initial implementation of the ATI 68875 ramdac used by the Mach32 and made the ATI 68860 8514/A aware when selected with the Mach32AX PCI.
9. Separated the 8514/A ramdac ports from the VGA ramdac ports, allowing seamless transition from/to 8514/A/VGA.
10. Fixed a hdisp problem in the ET4000/W32 cards, where it was doubling the horizontal display in 15bpp+ graphics mode.
11. Removed the 0x3da/0x3ba port hack that was on the Mach8/32 code, relying on the (S)VGA core instead.
12. Reworked and simplified the TGUI9440 pitch register based on logging due to no documentation at all.
2023-08-12 00:00:46 +02:00
|
|
|
if (gfxcard[0] == VID_INTERNAL)
|
|
|
|
|
ibm8514_has_vga = (video_get_type_monitor(0) == VIDEO_FLAG_TYPE_8514);
|
|
|
|
|
else if (gfxcard[0] != VID_NONE)
|
|
|
|
|
ibm8514_has_vga = (video_card_get_flags(gfxcard[0]) == VIDEO_FLAG_TYPE_8514);
|
|
|
|
|
else
|
|
|
|
|
ibm8514_has_vga = 0;
|
|
|
|
|
|
|
|
|
|
if (ibm8514_has_vga)
|
2023-08-22 17:56:55 +05:00
|
|
|
ibm8514_active = 1;
|
Video changes:
1. The passthrough from VGA to 8514/A and/or 8514/A to VGA no longer relies on hackish places where to switch from/to, instead, relying on port 0x3c3 of VGA doing so (though the Mach8/32 still needs some places where to manually switch from/to, mainly the MCA one when configuring the EEPROM).
2. Implemented the MCA behalf of the Mach32 and its corresponding reset function.
3. Properly implemented (more or less) true color, including 24-bit BGR rendering
4. Other fixes such as color patterns and mono patterns being more correct than before in various operating systems and in 24-bit true color.
5. Implemented the onboard Mach32 video of the IBM PS/ValuePoint P60 machine.
6. Made the onboard internal video detect when it's 8514/A compatible or not (CGA/EGA/MDA/VGA/etc.). If the former is selected, then the video monitor flag is used instead (for QT).
7. The TGUI9400 and 9440, if on VLB, now detect the right amount of memory if on 2MB.
8. Initial implementation of the ATI 68875 ramdac used by the Mach32 and made the ATI 68860 8514/A aware when selected with the Mach32AX PCI.
9. Separated the 8514/A ramdac ports from the VGA ramdac ports, allowing seamless transition from/to 8514/A/VGA.
10. Fixed a hdisp problem in the ET4000/W32 cards, where it was doubling the horizontal display in 15bpp+ graphics mode.
11. Removed the 0x3da/0x3ba port hack that was on the Mach8/32 code, relying on the (S)VGA core instead.
12. Reworked and simplified the TGUI9440 pitch register based on logging due to no documentation at all.
2023-08-12 00:00:46 +02:00
|
|
|
|
2023-08-22 17:56:55 +05:00
|
|
|
if (ibm8514_standalone_enabled)
|
|
|
|
|
ibm8514_device_add();
|
2023-08-10 01:37:33 +02:00
|
|
|
|
2023-08-22 17:56:55 +05:00
|
|
|
if (xga_standalone_enabled)
|
Video changes:
1. The passthrough from VGA to 8514/A and/or 8514/A to VGA no longer relies on hackish places where to switch from/to, instead, relying on port 0x3c3 of VGA doing so (though the Mach8/32 still needs some places where to manually switch from/to, mainly the MCA one when configuring the EEPROM).
2. Implemented the MCA behalf of the Mach32 and its corresponding reset function.
3. Properly implemented (more or less) true color, including 24-bit BGR rendering
4. Other fixes such as color patterns and mono patterns being more correct than before in various operating systems and in 24-bit true color.
5. Implemented the onboard Mach32 video of the IBM PS/ValuePoint P60 machine.
6. Made the onboard internal video detect when it's 8514/A compatible or not (CGA/EGA/MDA/VGA/etc.). If the former is selected, then the video monitor flag is used instead (for QT).
7. The TGUI9400 and 9440, if on VLB, now detect the right amount of memory if on 2MB.
8. Initial implementation of the ATI 68875 ramdac used by the Mach32 and made the ATI 68860 8514/A aware when selected with the Mach32AX PCI.
9. Separated the 8514/A ramdac ports from the VGA ramdac ports, allowing seamless transition from/to 8514/A/VGA.
10. Fixed a hdisp problem in the ET4000/W32 cards, where it was doubling the horizontal display in 15bpp+ graphics mode.
11. Removed the 0x3da/0x3ba port hack that was on the Mach8/32 code, relying on the (S)VGA core instead.
12. Reworked and simplified the TGUI9440 pitch register based on logging due to no documentation at all.
2023-08-12 00:00:46 +02:00
|
|
|
xga_device_add();
|
|
|
|
|
|
2023-08-10 01:37:33 +02:00
|
|
|
/* Reset the graphics card (or do nothing if it was already done
|
|
|
|
|
by the machine's init function). */
|
|
|
|
|
video_reset(gfxcard[0]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
video_voodoo_init(void)
|
|
|
|
|
{
|
2017-11-08 16:29:54 -05:00
|
|
|
/* Enable the Voodoo if configured. */
|
|
|
|
|
if (voodoo_enabled)
|
2022-08-31 19:19:29 -04:00
|
|
|
device_add(&voodoo_device);
|
2017-10-11 05:40:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
video_card_available(int card)
|
|
|
|
|
{
|
|
|
|
|
if (video_cards[card].device)
|
2022-08-31 19:19:29 -04:00
|
|
|
return (device_available(video_cards[card].device));
|
2017-10-11 05:40:44 -04:00
|
|
|
|
2023-06-01 18:32:25 -04:00
|
|
|
return 1;
|
2017-10-11 05:40:44 -04:00
|
|
|
}
|
|
|
|
|
|
2022-07-07 14:34:59 +06:00
|
|
|
int
|
|
|
|
|
video_card_get_flags(int card)
|
|
|
|
|
{
|
|
|
|
|
return video_cards[card].flags;
|
|
|
|
|
}
|
2017-10-11 05:40:44 -04:00
|
|
|
|
2018-03-19 01:02:04 +01:00
|
|
|
const device_t *
|
2017-10-11 05:40:44 -04:00
|
|
|
video_card_getdevice(int card)
|
|
|
|
|
{
|
2022-08-31 19:19:29 -04:00
|
|
|
return (video_cards[card].device);
|
2017-10-11 05:40:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
video_card_has_config(int card)
|
|
|
|
|
{
|
2022-08-31 19:19:29 -04:00
|
|
|
if (video_cards[card].device == NULL)
|
2023-06-01 18:32:25 -04:00
|
|
|
return 0;
|
2017-11-05 01:57:04 -05:00
|
|
|
|
2022-08-31 19:19:29 -04:00
|
|
|
return (device_has_config(video_cards[card].device) ? 1 : 0);
|
2017-10-11 05:40:44 -04:00
|
|
|
}
|
|
|
|
|
|
2023-08-21 20:25:05 -04:00
|
|
|
const char *
|
2017-10-11 05:40:44 -04:00
|
|
|
video_get_internal_name(int card)
|
|
|
|
|
{
|
2022-02-03 03:10:06 +01:00
|
|
|
return device_get_internal_name(video_cards[card].device);
|
2017-10-11 05:40:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
video_get_video_from_internal_name(char *s)
|
|
|
|
|
{
|
|
|
|
|
int c = 0;
|
|
|
|
|
|
2022-02-03 03:10:06 +01:00
|
|
|
while (video_cards[c].device != NULL) {
|
2023-07-30 19:25:07 -04:00
|
|
|
if (!strcmp(video_cards[c].device->internal_name, s))
|
2023-06-01 18:32:25 -04:00
|
|
|
return c;
|
2022-08-31 19:19:29 -04:00
|
|
|
c++;
|
2017-10-11 05:40:44 -04:00
|
|
|
}
|
|
|
|
|
|
2023-06-01 18:32:25 -04:00
|
|
|
return 0;
|
2017-10-11 05:40:44 -04:00
|
|
|
}
|
2018-02-24 17:25:50 +01:00
|
|
|
|
2018-09-19 20:13:32 +02:00
|
|
|
int
|
|
|
|
|
video_is_mda(void)
|
2018-02-24 17:25:50 +01:00
|
|
|
{
|
2018-09-19 20:13:32 +02:00
|
|
|
return (video_get_type() == VIDEO_FLAG_TYPE_MDA);
|
2018-02-24 17:25:50 +01:00
|
|
|
}
|
|
|
|
|
|
2018-09-19 20:13:32 +02:00
|
|
|
int
|
|
|
|
|
video_is_cga(void)
|
2018-02-24 17:25:50 +01:00
|
|
|
{
|
2018-09-19 20:13:32 +02:00
|
|
|
return (video_get_type() == VIDEO_FLAG_TYPE_CGA);
|
2018-02-24 17:25:50 +01:00
|
|
|
}
|
|
|
|
|
|
2018-09-19 20:13:32 +02:00
|
|
|
int
|
|
|
|
|
video_is_ega_vga(void)
|
2018-02-24 17:25:50 +01:00
|
|
|
{
|
2018-09-19 20:13:32 +02:00
|
|
|
return (video_get_type() == VIDEO_FLAG_TYPE_SPECIAL);
|
2018-02-24 17:25:50 +01:00
|
|
|
}
|
2023-07-14 23:38:04 +02:00
|
|
|
|
|
|
|
|
int
|
|
|
|
|
video_is_8514(void)
|
|
|
|
|
{
|
|
|
|
|
return (video_get_type() == VIDEO_FLAG_TYPE_8514);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
video_is_xga(void)
|
|
|
|
|
{
|
|
|
|
|
return (video_get_type() == VIDEO_FLAG_TYPE_XGA);
|
|
|
|
|
}
|