2017-10-11 05:40:44 -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.
|
|
|
|
|
*
|
|
|
|
|
* This file is part of the 86Box distribution.
|
|
|
|
|
*
|
|
|
|
|
* Define all known video cards.
|
|
|
|
|
*
|
2020-03-25 00:46:02 +02:00
|
|
|
*
|
2017-10-11 05:40:44 -04:00
|
|
|
*
|
|
|
|
|
* Authors: Miran Grca, <mgrca8@gmail.com>
|
|
|
|
|
* Fred N. van Kempen, <decwiz@yahoo.com>
|
|
|
|
|
*
|
2020-01-17 21:03:26 +01: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>
|
2017-10-11 05:40:44 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2018-03-19 08:01:13 +01:00
|
|
|
const char *internal_name;
|
2018-03-19 01:02:04 +01:00
|
|
|
const device_t *device;
|
2017-10-11 05:40:44 -04:00
|
|
|
} VIDEO_CARD;
|
|
|
|
|
|
|
|
|
|
|
2018-09-19 20:13:32 +02:00
|
|
|
static video_timings_t timing_default = {VIDEO_ISA, 8, 16, 32, 8, 16, 32};
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
|
2018-03-19 01:02:04 +01:00
|
|
|
static const VIDEO_CARD
|
2017-10-11 05:40:44 -04:00
|
|
|
video_cards[] = {
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "none", NULL },
|
|
|
|
|
{ "internal", NULL },
|
|
|
|
|
{ "egawonder800", &atiega_device },
|
|
|
|
|
{ "mach64gx_isa", &mach64gx_isa_device },
|
|
|
|
|
{ "ati28800k", &ati28800k_device },
|
|
|
|
|
{ "ati18800v", &ati18800_vga88_device },
|
|
|
|
|
{ "ati28800", &ati28800_device },
|
2021-10-24 19:06:05 +02:00
|
|
|
{ "compaq_ati28800", &compaq_ati28800_device },
|
|
|
|
|
#if defined(DEV_BRANCH) && defined(USE_XL24)
|
|
|
|
|
{ "ati28800w", &ati28800_wonderxl24_device },
|
|
|
|
|
#endif
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "ati18800", &ati18800_device },
|
2018-04-25 23:51:13 +02:00
|
|
|
#if defined(DEV_BRANCH) && defined(USE_VGAWONDER)
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "ati18800w", &ati18800_wonder_device },
|
2018-03-11 18:31:47 +01:00
|
|
|
#endif
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "cga", &cga_device },
|
|
|
|
|
{ "superega", &sega_device },
|
|
|
|
|
{ "cl_gd5401_isa", &gd5401_isa_device },
|
|
|
|
|
{ "cl_gd5402_isa", &gd5402_isa_device },
|
|
|
|
|
{ "cl_gd5420_isa", &gd5420_isa_device },
|
|
|
|
|
{ "cl_gd5422_isa", &gd5422_isa_device },
|
2021-11-18 23:58:04 +01:00
|
|
|
{ "cl_gd5426_isa", &gd5426_isa_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "cl_gd5426_diamond_a1_isa", &gd5426_diamond_speedstar_pro_a1_isa_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "cl_gd5428_isa", &gd5428_isa_device },
|
|
|
|
|
{ "cl_gd5429_isa", &gd5429_isa_device },
|
|
|
|
|
{ "cl_gd5434_isa", &gd5434_isa_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "cl_gd5434_diamond_a3_isa", &gd5434_diamond_speedstar_64_a3_isa_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "compaq_cga", &compaq_cga_device },
|
|
|
|
|
{ "compaq_cga_2", &compaq_cga_2_device },
|
|
|
|
|
{ "compaq_ega", &cpqega_device },
|
|
|
|
|
{ "ega", &ega_device },
|
|
|
|
|
{ "g2_gc205", &g2_gc205_device },
|
|
|
|
|
{ "hercules", &hercules_device },
|
|
|
|
|
{ "hercules_plus", &herculesplus_device },
|
|
|
|
|
{ "incolor", &incolor_device },
|
|
|
|
|
{ "im1024", &im1024_device },
|
|
|
|
|
{ "iskra_ega", &iskra_ega_device },
|
|
|
|
|
{ "kasan16vga", &et4000_kasan_isa_device },
|
|
|
|
|
{ "mda", &mda_device },
|
|
|
|
|
{ "genius", &genius_device },
|
2021-03-25 06:32:10 +01:00
|
|
|
{ "nga", &nga_device },
|
2020-12-07 16:57:12 +03:00
|
|
|
{ "ogc", &ogc_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "oti037c", &oti037c_device },
|
|
|
|
|
{ "oti067", &oti067_device },
|
|
|
|
|
{ "oti077", &oti077_device },
|
|
|
|
|
{ "pvga1a", ¶dise_pvga1a_device },
|
|
|
|
|
{ "wd90c11", ¶dise_wd90c11_device },
|
|
|
|
|
{ "wd90c30", ¶dise_wd90c30_device },
|
|
|
|
|
{ "plantronics", &colorplus_device },
|
|
|
|
|
{ "pgc", &pgc_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "radius_isa", &radius_svga_multiview_isa_device },
|
|
|
|
|
{ "rtg3106", &realtek_rtg3106_device },
|
|
|
|
|
{ "stealthvram_isa", &s3_diamond_stealth_vram_isa_device },
|
2021-09-03 00:05:43 +02:00
|
|
|
{ "orchid_s3_911", &s3_orchid_86c911_isa_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "ami_s3_924", &s3_ami_86c924_isa_device },
|
2021-09-03 00:05:43 +02:00
|
|
|
{ "metheus928_isa", &s3_metheus_86c928_isa_device },
|
|
|
|
|
{ "px_86c801_isa", &s3_phoenix_86c801_isa_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "px_s3_v7_801_isa", &s3_spea_mirage_86c801_isa_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "sigma400", &sigma_device },
|
|
|
|
|
{ "tvga8900b", &tvga8900b_device },
|
|
|
|
|
{ "tvga8900d", &tvga8900d_device },
|
|
|
|
|
{ "tvga9000b", &tvga9000b_device },
|
|
|
|
|
{ "tgkorvga", &et4000k_isa_device },
|
2021-02-18 21:55:39 +01:00
|
|
|
{ "et2000", &et2000_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "et4000ax", &et4000_isa_device },
|
2021-03-16 16:48:24 +01:00
|
|
|
{ "et4000w32", &et4000w32_device },
|
2021-03-24 19:06:38 +01:00
|
|
|
{ "et4000w32i", &et4000w32i_isa_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "vga", &vga_device },
|
|
|
|
|
{ "v7_vga_1024i", &v7_vga_1024i_device },
|
|
|
|
|
{ "wy700", &wy700_device },
|
|
|
|
|
{ "ibm1mbsvga", &gd5428_mca_device },
|
|
|
|
|
{ "et4000mca", &et4000_mca_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "radius_mc", &radius_svga_multiview_mca_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "mach64gx_pci", &mach64gx_pci_device },
|
|
|
|
|
{ "mach64vt2", &mach64vt2_device },
|
2021-11-18 23:58:04 +01:00
|
|
|
{ "et4000w32p_revc_pci", &et4000w32p_revc_pci_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "et4000w32p_pci", &et4000w32p_cardex_pci_device },
|
2021-03-25 06:32:10 +01:00
|
|
|
{ "et4000w32p_nc_pci", &et4000w32p_noncardex_pci_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "cl_gd5430_pci", &gd5430_pci_device, },
|
|
|
|
|
{ "cl_gd5434_pci", &gd5434_pci_device },
|
|
|
|
|
{ "cl_gd5436_pci", &gd5436_pci_device },
|
|
|
|
|
{ "cl_gd5440_pci", &gd5440_pci_device },
|
|
|
|
|
{ "cl_gd5446_pci", &gd5446_pci_device },
|
2021-11-18 23:58:04 +01:00
|
|
|
{ "cl_gd5446_stb_pci", &gd5446_stb_pci_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "cl_gd5480_pci", &gd5480_pci_device },
|
2020-11-18 00:21:07 +01:00
|
|
|
{ "ctl3d_banshee_pci", &creative_voodoo_banshee_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "stealth32_pci", &et4000w32p_pci_device },
|
|
|
|
|
{ "stealth64v_pci", &s3_diamond_stealth64_964_pci_device },
|
2020-12-08 22:56:45 +01:00
|
|
|
{ "elsawin2kprox_964_pci", &s3_elsa_winner2000_pro_x_964_pci_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "mirocrystal20sv_pci", &s3_mirocrystal_20sv_964_pci_device },
|
2021-09-03 00:05:43 +02:00
|
|
|
{ "bahamas64_pci", &s3_bahamas64_pci_device },
|
|
|
|
|
{ "px_vision864_pci", &s3_phoenix_vision864_pci_device },
|
|
|
|
|
{ "stealthse_pci", &s3_diamond_stealth_se_pci_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "px_trio32_pci", &s3_phoenix_trio32_pci_device },
|
2021-09-03 00:05:43 +02:00
|
|
|
{ "stealth64d_pci", &s3_diamond_stealth64_pci_device },
|
|
|
|
|
{ "n9_9fx_pci", &s3_9fx_pci_device },
|
|
|
|
|
{ "px_trio64_pci", &s3_phoenix_trio64_pci_device },
|
2020-12-08 22:56:45 +01:00
|
|
|
{ "elsawin2kprox_pci", &s3_elsa_winner2000_pro_x_pci_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "mirovideo40sv_pci", &s3_mirovideo_40sv_ergo_968_pci_device },
|
|
|
|
|
{ "n9_9fx_771_pci", &s3_9fx_771_pci_device },
|
2021-09-11 22:02:31 +02:00
|
|
|
{ "px_vision968_pci", &s3_phoenix_vision968_pci_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "spea_mercury64p_pci", &s3_spea_mercury_p64v_pci_device },
|
|
|
|
|
{ "n9_9fx_531_pci", &s3_9fx_531_pci_device },
|
2021-09-03 00:05:43 +02:00
|
|
|
{ "px_vision868_pci", &s3_phoenix_vision868_pci_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "px_trio64vplus_pci", &s3_phoenix_trio64vplus_pci_device },
|
2021-09-03 00:05:43 +02:00
|
|
|
{ "trio64v2dx_pci", &s3_trio64v2_dx_pci_device },
|
2021-09-26 21:13:47 +02:00
|
|
|
{ "virge325_pci", &s3_virge_325_pci_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "stealth3d_2000_pci", &s3_diamond_stealth_2000_pci_device },
|
|
|
|
|
{ "stealth3d_3000_pci", &s3_diamond_stealth_3000_pci_device },
|
2021-09-26 21:13:47 +02:00
|
|
|
{ "virge375_pci", &s3_virge_375_pci_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "stealth3d_2000pro_pci", &s3_diamond_stealth_2000pro_pci_device },
|
2021-09-26 21:13:47 +02:00
|
|
|
{ "virge385_pci", &s3_virge_385_pci_device },
|
|
|
|
|
{ "virge357_pci", &s3_virge_357_pci_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "stealth3d_4000_pci", &s3_diamond_stealth_4000_pci_device },
|
2021-09-26 21:13:47 +02:00
|
|
|
{ "trio3d2x", &s3_trio3d2x_pci_device },
|
2020-04-20 14:50:03 +02:00
|
|
|
#if defined(DEV_BRANCH) && defined(USE_MGA)
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "mystique", &mystique_device },
|
|
|
|
|
{ "mystique_220", &mystique_220_device },
|
2020-04-20 14:50:03 +02:00
|
|
|
#endif
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "tgui9440_pci", &tgui9440_pci_device },
|
2021-07-11 15:06:23 +02:00
|
|
|
{ "tgui9660_pci", &tgui9660_pci_device },
|
2021-07-03 23:16:49 +02:00
|
|
|
{ "tgui9680_pci", &tgui9680_pci_device },
|
2020-11-23 14:48:48 -03:00
|
|
|
{ "voodoo_banshee_pci", &voodoo_banshee_device },
|
2020-11-18 00:21:07 +01:00
|
|
|
{ "voodoo3_2k_pci", &voodoo_3_2000_device },
|
|
|
|
|
{ "voodoo3_3k_pci", &voodoo_3_3000_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "mach64gx_vlb", &mach64gx_vlb_device },
|
2021-03-25 06:32:10 +01:00
|
|
|
{ "et4000w32i_vlb", &et4000w32i_vlb_device },
|
2021-11-18 23:58:04 +01:00
|
|
|
{ "et4000w32p_revc_vlb", &et4000w32p_revc_vlb_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "et4000w32p_vlb", &et4000w32p_cardex_vlb_device },
|
2021-11-18 23:58:04 +01:00
|
|
|
{ "stealth32_vlb", &et4000w32p_vlb_device },
|
2021-03-25 06:32:10 +01:00
|
|
|
{ "et4000w32p_nc_vlb", &et4000w32p_noncardex_vlb_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "cl_gd5424_vlb", &gd5424_vlb_device },
|
2021-11-18 23:58:04 +01:00
|
|
|
{ "cl_gd5426_vlb", &gd5426_vlb_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "cl_gd5428_vlb", &gd5428_vlb_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "cl_gd5428_diamond_b1_vlb", &gd5428_diamond_speedstar_pro_b1_vlb_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "cl_gd5429_vlb", &gd5429_vlb_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "cl_gd5430_vlb", &gd5430_diamond_speedstar_pro_se_a8_vlb_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "cl_gd5434_vlb", &gd5434_vlb_device },
|
|
|
|
|
{ "metheus928_vlb", &s3_metheus_86c928_vlb_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "mirocrystal8s_vlb", &s3_mirocrystal_8s_805_vlb_device },
|
|
|
|
|
{ "mirocrystal10sd_vlb", &s3_mirocrystal_10sd_805_vlb_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "px_86c805_vlb", &s3_phoenix_86c805_vlb_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "px_s3_v7_805_vlb", &s3_spea_mirage_86c805_vlb_device },
|
2021-09-03 00:05:43 +02:00
|
|
|
{ "stealth64v_vlb", &s3_diamond_stealth64_964_vlb_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "mirocrystal20sv_vlb", &s3_mirocrystal_20sv_964_vlb_device },
|
|
|
|
|
{ "mirocrystal20sd_vlb", &s3_mirocrystal_20sd_864_vlb_device },
|
2021-09-03 00:05:43 +02:00
|
|
|
{ "bahamas64_vlb", &s3_bahamas64_vlb_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "px_vision864_vlb", &s3_phoenix_vision864_vlb_device },
|
2021-09-03 00:05:43 +02:00
|
|
|
{ "stealthse_vlb", &s3_diamond_stealth_se_vlb_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "px_trio32_vlb", &s3_phoenix_trio32_vlb_device },
|
2021-09-03 00:05:43 +02:00
|
|
|
{ "stealth64d_vlb", &s3_diamond_stealth64_vlb_device },
|
|
|
|
|
{ "n9_9fx_vlb", &s3_9fx_vlb_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "px_trio64_vlb", &s3_phoenix_trio64_vlb_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "spea_miragep64_vlb", &s3_spea_mirage_p64_vlb_device },
|
2021-09-11 22:02:31 +02:00
|
|
|
{ "px_vision968_vlb", &s3_phoenix_vision968_vlb_device },
|
2021-09-03 00:05:43 +02:00
|
|
|
{ "px_vision868_vlb", &s3_phoenix_vision868_vlb_device },
|
|
|
|
|
{ "ht216_32", &ht216_32_standalone_device },
|
2020-11-16 00:01:21 +01:00
|
|
|
{ "tgui9400cxi_vlb", &tgui9400cxi_device },
|
|
|
|
|
{ "tgui9440_vlb", &tgui9440_vlb_device },
|
2021-09-26 21:13:47 +02:00
|
|
|
{ "virge357_agp", &s3_virge_357_agp_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "stealth3d_4000_agp", &s3_diamond_stealth_4000_agp_device },
|
|
|
|
|
{ "trio3d2x_agp", &s3_trio3d2x_agp_device },
|
|
|
|
|
{ "velocity100_agp", &velocity_100_agp_device },
|
2021-03-14 21:31:02 -03:00
|
|
|
{ "voodoo3_2k_agp", &voodoo_3_2000_agp_device },
|
|
|
|
|
{ "voodoo3_3k_agp", &voodoo_3_3000_agp_device },
|
2021-11-21 13:17:30 -03:00
|
|
|
{ "", NULL }
|
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) {
|
|
|
|
|
va_start(ap, fmt);
|
|
|
|
|
pclog_ex(fmt, ap);
|
|
|
|
|
va_end(ap);
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-10-22 04:22:00 +02:00
|
|
|
#else
|
|
|
|
|
#define vid_table_log(fmt, ...)
|
|
|
|
|
#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)
|
|
|
|
|
{
|
|
|
|
|
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) {
|
|
|
|
|
free(fontdatksc5601);
|
|
|
|
|
fontdatksc5601 = NULL;
|
|
|
|
|
}
|
2017-10-11 05:40:44 -04:00
|
|
|
|
2017-11-08 16:29:54 -05:00
|
|
|
/* Reset the CGA palette. */
|
|
|
|
|
cga_palette = 0;
|
|
|
|
|
cgapal_rebuild();
|
2017-10-11 05:40:44 -04:00
|
|
|
|
2018-11-01 10:52:27 +01:00
|
|
|
/* Reset the blend. */
|
|
|
|
|
herc_blend = 0;
|
|
|
|
|
|
2021-08-21 18:19:10 +02:00
|
|
|
/* 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(VIDEO_FLAG_TYPE_SPECIAL, &timing_default);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
video_pre_reset(int card)
|
|
|
|
|
{
|
|
|
|
|
if ((card == VID_NONE) || \
|
2021-12-13 01:23:06 +01:00
|
|
|
(card == VID_INTERNAL) || machine_has_flags(machine, MACHINE_VIDEO_ONLY))
|
2021-08-21 18:19:10 +02:00
|
|
|
video_prepare();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
video_reset(int card)
|
|
|
|
|
{
|
|
|
|
|
/* This is needed to avoid duplicate resets. */
|
|
|
|
|
if ((video_get_type() != VIDEO_FLAG_TYPE_NONE) && was_reset)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
vid_table_log("VIDEO: reset (gfxcard=%d, internal=%d)\n",
|
2021-12-13 01:23:06 +01:00
|
|
|
card, machine_has_flags(machine, MACHINE_VIDEO) ? 1 : 0);
|
2021-08-21 18:19:10 +02:00
|
|
|
|
|
|
|
|
loadfont("roms/video/mda/mda.rom", 0);
|
|
|
|
|
|
2018-04-25 23:51:13 +02:00
|
|
|
/* Do not initialize internal cards here. */
|
2018-09-19 20:13:32 +02:00
|
|
|
if (!(card == VID_NONE) && \
|
2021-12-13 01:23:06 +01:00
|
|
|
!(card == VID_INTERNAL) && !machine_has_flags(machine, MACHINE_VIDEO_ONLY)) {
|
2018-09-19 20:46:42 +02:00
|
|
|
vid_table_log("VIDEO: initializing '%s'\n", video_cards[card].name);
|
2018-04-25 23:51:13 +02:00
|
|
|
|
2021-08-21 18:19:10 +02:00
|
|
|
video_prepare();
|
2018-09-19 20:13:32 +02:00
|
|
|
|
2018-04-25 23:51:13 +02:00
|
|
|
/* Initialize the video card. */
|
2018-09-19 20:46:42 +02:00
|
|
|
device_add(video_cards[card].device);
|
2018-04-25 23:51:13 +02:00
|
|
|
}
|
2017-10-11 05:40:44 -04:00
|
|
|
|
2017-11-08 16:29:54 -05:00
|
|
|
/* Enable the Voodoo if configured. */
|
|
|
|
|
if (voodoo_enabled)
|
|
|
|
|
device_add(&voodoo_device);
|
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
|
|
|
|
|
|
|
|
was_reset = 1;
|
2017-10-11 05:40:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
video_card_available(int card)
|
|
|
|
|
{
|
|
|
|
|
if (video_cards[card].device)
|
|
|
|
|
return(device_available(video_cards[card].device));
|
|
|
|
|
|
|
|
|
|
return(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2018-03-19 01:02:04 +01:00
|
|
|
const device_t *
|
2017-10-11 05:40:44 -04:00
|
|
|
video_card_getdevice(int card)
|
|
|
|
|
{
|
|
|
|
|
return(video_cards[card].device);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
video_card_has_config(int card)
|
|
|
|
|
{
|
2017-11-05 01:57:04 -05:00
|
|
|
if (video_cards[card].device == NULL) return(0);
|
|
|
|
|
|
2017-10-11 05:40:44 -04:00
|
|
|
return(video_cards[card].device->config ? 1 : 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char *
|
|
|
|
|
video_get_internal_name(int card)
|
|
|
|
|
{
|
2018-02-18 10:32:51 +01:00
|
|
|
return((char *) video_cards[card].internal_name);
|
2017-10-11 05:40:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
video_get_video_from_internal_name(char *s)
|
|
|
|
|
{
|
|
|
|
|
int c = 0;
|
|
|
|
|
|
2020-11-16 00:01:21 +01:00
|
|
|
while (strcmp(video_cards[c].internal_name, "") != 0) {
|
2018-02-18 10:32:51 +01:00
|
|
|
if (!strcmp((char *) video_cards[c].internal_name, s))
|
2018-09-19 20:46:42 +02:00
|
|
|
return(c);
|
2017-10-11 05:40:44 -04:00
|
|
|
c++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return(0);
|
|
|
|
|
}
|
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
|
|
|
}
|