2017-10-11 05:40:44 -04:00
|
|
|
/*
|
2022-02-26 23:31:28 -05: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-02-26 23:31:28 -05:00
|
|
|
* This file is part of the 86Box distribution.
|
2017-10-11 05:40:44 -04:00
|
|
|
*
|
2022-02-26 23:31:28 -05: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-02-26 23:31:28 -05:00
|
|
|
* Authors: Miran Grca, <mgrca8@gmail.com>
|
|
|
|
|
* Fred N. van Kempen, <decwiz@yahoo.com>
|
2017-10-11 05:40:44 -04:00
|
|
|
*
|
2022-02-26 23:31:28 -05: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 {
|
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
|
|
|
};
|
|
|
|
|
|
2022-08-31 19:19:29 -04:00
|
|
|
// clang-format off
|
2018-03-19 01:02:04 +01:00
|
|
|
static const VIDEO_CARD
|
2017-10-11 05:40:44 -04:00
|
|
|
video_cards[] = {
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &vid_none_device },
|
|
|
|
|
{ &vid_internal_device },
|
|
|
|
|
{ &atiega_device },
|
|
|
|
|
{ &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 },
|
|
|
|
|
{ &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 },
|
|
|
|
|
{ &et4000_isa_device },
|
|
|
|
|
{ &et4000w32_device },
|
|
|
|
|
{ &et4000w32i_isa_device },
|
|
|
|
|
{ &vga_device },
|
|
|
|
|
{ &v7_vga_1024i_device },
|
|
|
|
|
{ &wy700_device },
|
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 },
|
|
|
|
|
{ &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 },
|
|
|
|
|
{ &gd5436_pci_device },
|
|
|
|
|
{ &gd5440_pci_device },
|
|
|
|
|
{ &gd5446_pci_device },
|
|
|
|
|
{ &gd5446_stb_pci_device },
|
|
|
|
|
{ &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 },
|
2020-04-20 14:50:03 +02:00
|
|
|
#if defined(DEV_BRANCH) && defined(USE_MGA)
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &millennium_device },
|
|
|
|
|
{ &mystique_device },
|
|
|
|
|
{ &mystique_220_device },
|
2020-04-20 14:50:03 +02:00
|
|
|
#endif
|
2022-02-26 23:31:28 -05:00
|
|
|
{ &tgui9440_pci_device },
|
|
|
|
|
{ &tgui9660_pci_device },
|
|
|
|
|
{ &tgui9680_pci_device },
|
|
|
|
|
{ &voodoo_banshee_device },
|
|
|
|
|
{ &creative_voodoo_banshee_device },
|
|
|
|
|
{ &voodoo_3_2000_device },
|
|
|
|
|
{ &voodoo_3_3000_device },
|
|
|
|
|
{ &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 },
|
|
|
|
|
{ &voodoo_3_2000_agp_device },
|
|
|
|
|
{ &voodoo_3_3000_agp_device },
|
|
|
|
|
{ NULL }
|
2017-10-11 05:40:44 -04:00
|
|
|
};
|
2022-08-31 19:19:29 -04:00
|
|
|
// clang-format on
|
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
|
|
|
|
|
|
|
|
vid_table_log("VIDEO: reset (gfxcard=%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);
|
|
|
|
|
|
2018-04-25 23:51:13 +02:00
|
|
|
/* Do not initialize internal cards here. */
|
2022-08-31 19:19:29 -04:00
|
|
|
if (!(card == VID_NONE) && !(card == VID_INTERNAL) && !machine_has_flags(machine, MACHINE_VIDEO_ONLY)) {
|
2022-09-14 13:17:07 +02:00
|
|
|
vid_table_log("VIDEO: initializing '%s'\n", video_cards[card].device->name);
|
2018-04-25 23:51:13 +02:00
|
|
|
|
2022-08-31 19:19:29 -04:00
|
|
|
video_prepare();
|
2018-09-19 20:13:32 +02:00
|
|
|
|
2022-08-31 19:19:29 -04:00
|
|
|
/* Initialize the video card. */
|
|
|
|
|
device_add(video_cards[card].device);
|
2022-07-07 14:34:59 +06:00
|
|
|
}
|
2022-07-04 01:50:42 +06:00
|
|
|
|
2022-07-07 14:34:59 +06:00
|
|
|
if (!(card == VID_NONE)
|
|
|
|
|
&& !machine_has_flags(machine, MACHINE_VIDEO_ONLY)
|
|
|
|
|
&& gfxcard_2 != 0
|
2022-07-10 13:35:48 +06:00
|
|
|
&& (video_cards[gfxcard_2].flags != video_cards[gfxcard].flags)
|
|
|
|
|
&& device_is_valid(video_card_getdevice(gfxcard_2), machine)) {
|
2022-07-04 01:50:42 +06:00
|
|
|
video_monitor_init(1);
|
|
|
|
|
monitor_index_global = 1;
|
2022-07-10 13:35:48 +06:00
|
|
|
device_add(video_cards[gfxcard_2].device);
|
2022-07-04 01:50:42 +06:00
|
|
|
monitor_index_global = 0;
|
|
|
|
|
}
|
2017-10-11 05:40:44 -04:00
|
|
|
|
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);
|
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)
|
2022-08-31 19:19:29 -04:00
|
|
|
return (device_available(video_cards[card].device));
|
2017-10-11 05:40:44 -04:00
|
|
|
|
2022-08-31 19:19:29 -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)
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char *
|
|
|
|
|
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) {
|
2022-08-31 19:19:29 -04:00
|
|
|
if (!strcmp((char *) video_cards[c].device->internal_name, s))
|
|
|
|
|
return (c);
|
|
|
|
|
c++;
|
2017-10-11 05:40:44 -04:00
|
|
|
}
|
|
|
|
|
|
2022-08-31 19:19:29 -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
|
|
|
}
|