diff --git a/src/config.c b/src/config.c index 110d93b9c..78929e1dc 100644 --- a/src/config.c +++ b/src/config.c @@ -8,7 +8,7 @@ * * Configuration file handler. * - * Version: @(#)config.c 1.0.53 2018/09/19 + * Version: @(#)config.c 1.0.54 2018/09/19 * * Authors: Sarah Walker, * Miran Grca, @@ -818,8 +818,6 @@ load_hard_disks(void) wchar_t *wp; uint32_t max_spt, max_hpc, max_tracks; uint32_t board = 0, dev = 0; - /* FIXME: Remove in a month. */ - int lun; memset(temp, '\0', sizeof(temp)); for (c=0; c>1, c&1); @@ -922,21 +913,6 @@ load_hard_disks(void) } else config_delete_var(cat, temp); - /* FIXME: Remove in a month. */ - sprintf(temp, "hdd_%02i_scsi_location", c+1); - if (hdd[c].bus == HDD_BUS_SCSI) { - p = config_get_string(cat, temp, NULL); - - if (p) { - sscanf(p, "%02i:%02i", - (int *)&hdd[c].scsi_id, (int *)&lun); - - if (hdd[c].scsi_id > 15) - hdd[c].scsi_id = 15; - } - } - config_delete_var(cat, temp); - memset(hdd[c].fn, 0x00, sizeof(hdd[c].fn)); memset(hdd[c].prev_fn, 0x00, sizeof(hdd[c].prev_fn)); sprintf(temp, "hdd_%02i_fn", c+1); @@ -975,10 +951,6 @@ load_hard_disks(void) sprintf(temp, "hdd_%02i_scsi_id", c+1); config_delete_var(cat, temp); - /* FIXME: Remove in a month. */ - sprintf(temp, "hdd_%02i_scsi_location", c+1); - config_delete_var(cat, temp); - sprintf(temp, "hdd_%02i_fn", c+1); config_delete_var(cat, temp); } @@ -1074,8 +1046,6 @@ load_other_removable_devices(void) unsigned int board = 0, dev = 0; wchar_t *wp; int c; - /* FIXME: Remove in a month. */ - int lun; memset(temp, 0x00, sizeof(temp)); for (c=0; c 15) - cdrom_drives[c].scsi_device_id = 15; - } - } - config_delete_var(cat, temp); } sprintf(temp, "cdrom_%02i_image_path", c+1); @@ -1176,10 +1132,6 @@ load_other_removable_devices(void) sprintf(temp, "cdrom_%02i_scsi_id", c+1); config_delete_var(cat, temp); - /* FIXME: Remove in a month. */ - sprintf(temp, "cdrom_%02i_scsi_location", c+1); - config_delete_var(cat, temp); - sprintf(temp, "cdrom_%02i_image_path", c+1); config_delete_var(cat, temp); } @@ -1221,20 +1173,6 @@ load_other_removable_devices(void) zip_drives[c].scsi_device_id = 15; } else config_delete_var(cat, temp); - - /* FIXME: Remove in a month. */ - sprintf(temp, "zip_%02i_scsi_location", c+1); - if (zip_drives[c].bus_type == CDROM_BUS_SCSI) { - p = config_get_string(cat, temp, NULL); - if (p) { - sscanf(p, "%02u:%02u", - &zip_drives[c].scsi_device_id, &lun); - - if (zip_drives[c].scsi_device_id > 15) - zip_drives[c].scsi_device_id = 15; - } - } - config_delete_var(cat, temp); } sprintf(temp, "zip_%02i_image_path", c+1); @@ -1273,10 +1211,6 @@ load_other_removable_devices(void) sprintf(temp, "zip_%02i_scsi_id", c+1); config_delete_var(cat, temp); - /* FIXME: Remove in a month. */ - sprintf(temp, "zip_%02i_scsi_location", c+1); - config_delete_var(cat, temp); - sprintf(temp, "zip_%02i_image_path", c+1); config_delete_var(cat, temp); } @@ -1310,7 +1244,7 @@ config_load(void) #endif scale = 1; machine = machine_get_machine_from_internal_name("ibmpc"); - gfxcard = VID_CGA; + gfxcard = video_get_video_from_internal_name("cga"); vid_api = plat_vidapi("default"); time_sync = TIME_SYNC_ENABLED; joystick_type = 7; @@ -1511,7 +1445,7 @@ save_video(void) char *cat = "Video"; config_set_string(cat, "gfxcard", - video_get_internal_name(video_old_to_new(gfxcard))); + video_get_internal_name(gfxcard)); if (voodoo_enabled == 0) config_delete_var(cat, "voodoo"); diff --git a/src/pc.c b/src/pc.c index f3dafd4fe..0c5b5f054 100644 --- a/src/pc.c +++ b/src/pc.c @@ -8,7 +8,7 @@ * * Main emulator module where most things are controlled. * - * Version: @(#)pc.c 1.0.77 2018/09/19 + * Version: @(#)pc.c 1.0.78 2018/09/19 * * Authors: Sarah Walker, * Miran Grca, @@ -139,8 +139,6 @@ int atfullspeed; int cpuspeed2; int clockrate; -int gfx_present[VID_MAX]; /* should not be here */ - wchar_t exe_path[1024]; /* path (dir) of executable */ wchar_t usr_path[1024]; /* path (dir) of user data */ wchar_t cfg_path[1024]; /* full path of config file */ @@ -619,21 +617,21 @@ again: } /* Make sure we have a usable video card. */ - for (c=0; c=0; c--) { - if (gfx_present[c]) { + c = 0; + while (video_get_internal_name(c) != NULL) { + if (video_card_available(c)) { gfxcard = c; config_save(); /* This can loop if all cards now bad.. */ goto again2; } + c++; } } diff --git a/src/video/vid_ati28800.c b/src/video/vid_ati28800.c index 355261bd5..1bc2d50a8 100644 --- a/src/video/vid_ati28800.c +++ b/src/video/vid_ati28800.c @@ -8,7 +8,7 @@ * * ATI 28800 emulation (VGA Charger and Korean VGA) * - * Version: @(#)vid_ati28800.c 1.0.21 2018/09/19 + * Version: @(#)vid_ati28800.c 1.0.22 2018/09/19 * * Authors: Sarah Walker, * Miran Grca, @@ -41,6 +41,11 @@ #include "vid_sc1502x_ramdac.h" +#define VGAWONDERXL 1 +#if defined(DEV_BRANCH) && defined(USE_XL24) +#define VGAWONDERXL24 2 +#endif + #define BIOS_ATIKOR_PATH L"roms/video/ati28800/atikorvga.bin" #define FONT_ATIKOR_PATH L"roms/video/ati28800/ati_ksc5601.rom" @@ -495,7 +500,7 @@ ati28800_init(const device_t *info) ati28800->memory = device_get_config_int("memory"); switch(info->local) { - case VID_VGAWONDERXL: + case VGAWONDERXL: ati28800->id = 6; rom_init_interleaved(&ati28800->bios_rom, BIOS_VGAXL_EVEN_PATH, @@ -505,7 +510,7 @@ ati28800_init(const device_t *info) break; #if defined(DEV_BRANCH) && defined(USE_XL24) - case VID_VGAWONDERXL24: + case VGAWONDERXL24: ati28800->id = 6; rom_init_interleaved(&ati28800->bios_rom, BIOS_XL24_EVEN_PATH, @@ -541,12 +546,12 @@ ati28800_init(const device_t *info) switch (info->local) { - case VID_VGAWONDERXL: + case VGAWONDERXL: ati_eeprom_load(&ati28800->eeprom, L"ati28800xl.nvr", 0); break; #if defined(DEV_BRANCH) && defined(USE_XL24) - case VID_VGAWONDERXL24: + case VGAWONDERXL24: ati_eeprom_load(&ati28800->eeprom, L"ati28800xl24.nvr", 0); break; #endif @@ -698,7 +703,7 @@ const device_t compaq_ati28800_device = { "Compaq ATI-28800", DEVICE_ISA, - VID_VGAWONDERXL, + VGAWONDERXL, ati28800_init, ati28800_close, NULL, compaq_ati28800_available, ati28800_speed_changed, @@ -711,7 +716,7 @@ const device_t ati28800_wonderxl24_device = { "ATI-28800 (VGA Wonder XL24)", DEVICE_ISA, - VID_VGAWONDERXL24, + VGAWONDERXL24, ati28800_init, ati28800_close, NULL, ati28800_wonderxl24_available, ati28800_speed_changed, diff --git a/src/video/vid_table.c b/src/video/vid_table.c index 19123815a..c72a49e19 100644 --- a/src/video/vid_table.c +++ b/src/video/vid_table.c @@ -8,7 +8,7 @@ * * Define all known video cards. * - * Version: @(#)vid_table.c 1.0.37 2018/09/19 + * Version: @(#)vid_table.c 1.0.38 2018/09/19 * * Authors: Miran Grca, * Fred N. van Kempen, @@ -64,7 +64,6 @@ typedef struct { const char *name; const char *internal_name; const device_t *device; - int legacy_id; } VIDEO_CARD; @@ -72,99 +71,99 @@ static video_timings_t timing_default = {VIDEO_ISA, 8, 16, 32, 8, 16, 32}; static const VIDEO_CARD video_cards[] = { - { "None", "none", NULL, VID_NONE }, - { "Internal", "internal", NULL, VID_INTERNAL }, - { "[ISA] ATI Graphics Pro Turbo (Mach64 GX)", "mach64gx_isa", &mach64gx_isa_device, VID_MACH64GX_ISA }, - { "[ISA] ATI Korean VGA (ATI-28800-5)", "ati28800k", &ati28800k_device, VID_ATIKOREANVGA }, - { "[ISA] ATI VGA-88 (ATI-18800-1)", "ati18800v", &ati18800_vga88_device, VID_VGA88 }, - { "[ISA] ATI VGA Charger (ATI-28800-5)", "ati28800", &ati28800_device, VID_VGACHARGER }, - { "[ISA] ATI VGA Edge-16 (ATI-18800-5)", "ati18800", &ati18800_device, VID_VGAEDGE16 }, + { "None", "none", NULL }, + { "Internal", "internal", NULL }, + { "[ISA] ATI Graphics Pro Turbo (Mach64 GX)", "mach64gx_isa", &mach64gx_isa_device }, + { "[ISA] ATI Korean VGA (ATI-28800-5)", "ati28800k", &ati28800k_device }, + { "[ISA] ATI VGA-88 (ATI-18800-1)", "ati18800v", &ati18800_vga88_device }, + { "[ISA] ATI VGA Charger (ATI-28800-5)", "ati28800", &ati28800_device }, + { "[ISA] ATI VGA Edge-16 (ATI-18800-5)", "ati18800", &ati18800_device }, #if defined(DEV_BRANCH) && defined(USE_VGAWONDER) - { "[ISA] ATI VGA Wonder (ATI-18800)", "ati18800w", &ati18800_wonder_device, VID_VGAWONDER }, + { "[ISA] ATI VGA Wonder (ATI-18800)", "ati18800w", &ati18800_wonder_device }, #endif #if defined(DEV_BRANCH) && defined(USE_XL24) - { "[ISA] ATI VGA Wonder XL24 (ATI-28800-6)", "ati28800w", &ati28800_wonderxl24_device, VID_VGAWONDERXL24 }, + { "[ISA] ATI VGA Wonder XL24 (ATI-28800-6)", "ati28800w", &ati28800_wonderxl24_device }, #endif - { "[ISA] CGA", "cga", &cga_device, VID_CGA }, - { "[ISA] Chips & Technologies SuperEGA", "superega", &sega_device, VID_SUPER_EGA }, - { "[ISA] Cirrus Logic CL-GD 5428", "cl_gd5428_isa", &gd5428_isa_device, VID_CL_GD5428_ISA }, - { "[ISA] Cirrus Logic CL-GD 5429", "cl_gd5429_isa", &gd5429_isa_device, VID_CL_GD5429_ISA }, - { "[ISA] Cirrus Logic CL-GD 5434", "cl_gd5434_isa", &gd5434_isa_device, VID_CL_GD5434_ISA }, - { "[ISA] Compaq ATI VGA Wonder XL (ATI-28800-5)", "compaq_ati28800", &compaq_ati28800_device, VID_VGAWONDERXL }, - { "[ISA] Compaq CGA", "compaq_cga", &compaq_cga_device, VID_COMPAQ_CGA }, - { "[ISA] Compaq CGA 2", "compaq_cga_2", &compaq_cga_2_device, VID_COMPAQ_CGA_2 }, - { "[ISA] Compaq EGA", "compaq_ega", &cpqega_device, VID_COMPAQ_EGA }, - { "[ISA] EGA", "ega", &ega_device, VID_EGA }, - { "[ISA] Hercules", "hercules", &hercules_device, VID_HERCULES }, - { "[ISA] Hercules Plus", "hercules_plus", &herculesplus_device, VID_HERCULESPLUS }, - { "[ISA] Hercules InColor", "incolor", &incolor_device, VID_INCOLOR }, - { "[ISA] MDA", "mda", &mda_device, VID_MDA }, - { "[ISA] MDSI Genius", "genius", &genius_device, VID_GENIUS }, - { "[ISA] OAK OTI-037C", "oti037c", &oti037c_device, VID_OTI037C }, - { "[ISA] OAK OTI-067", "oti067", &oti067_device, VID_OTI067 }, - { "[ISA] OAK OTI-077", "oti077", &oti077_device, VID_OTI077 }, - { "[ISA] Paradise PVGA1A", "pvga1a", ¶dise_pvga1a_device, VID_PVGA1A }, - { "[ISA] Paradise WD90C11-LR", "wd90c11", ¶dise_wd90c11_device, VID_WD90C11 }, - { "[ISA] Paradise WD90C30-LR", "wd90c30", ¶dise_wd90c30_device, VID_WD90C30 }, - { "[ISA] Plantronics ColorPlus", "plantronics", &colorplus_device, VID_COLORPLUS }, + { "[ISA] CGA", "cga", &cga_device }, + { "[ISA] Chips & Technologies SuperEGA", "superega", &sega_device }, + { "[ISA] Cirrus Logic CL-GD 5428", "cl_gd5428_isa", &gd5428_isa_device }, + { "[ISA] Cirrus Logic CL-GD 5429", "cl_gd5429_isa", &gd5429_isa_device }, + { "[ISA] Cirrus Logic CL-GD 5434", "cl_gd5434_isa", &gd5434_isa_device }, + { "[ISA] Compaq ATI VGA Wonder XL (ATI-28800-5)", "compaq_ati28800", &compaq_ati28800_device }, + { "[ISA] Compaq CGA", "compaq_cga", &compaq_cga_device }, + { "[ISA] Compaq CGA 2", "compaq_cga_2", &compaq_cga_2_device }, + { "[ISA] Compaq EGA", "compaq_ega", &cpqega_device }, + { "[ISA] EGA", "ega", &ega_device }, + { "[ISA] Hercules", "hercules", &hercules_device }, + { "[ISA] Hercules Plus", "hercules_plus", &herculesplus_device }, + { "[ISA] Hercules InColor", "incolor", &incolor_device }, + { "[ISA] MDA", "mda", &mda_device }, + { "[ISA] MDSI Genius", "genius", &genius_device }, + { "[ISA] OAK OTI-037C", "oti037c", &oti037c_device }, + { "[ISA] OAK OTI-067", "oti067", &oti067_device }, + { "[ISA] OAK OTI-077", "oti077", &oti077_device }, + { "[ISA] Paradise PVGA1A", "pvga1a", ¶dise_pvga1a_device }, + { "[ISA] Paradise WD90C11-LR", "wd90c11", ¶dise_wd90c11_device }, + { "[ISA] Paradise WD90C30-LR", "wd90c30", ¶dise_wd90c30_device }, + { "[ISA] Plantronics ColorPlus", "plantronics", &colorplus_device }, #if defined(DEV_BRANCH) && defined(USE_TI) - { "[ISA] TI CF62011 SVGA", "ti_cf62011", &ti_cf62011_device, VID_TICF62011 }, + { "[ISA] TI CF62011 SVGA", "ti_cf62011", &ti_cf62011_device }, #endif - {"[ISA] Trident TVGA8900D", "tvga8900d", &tvga8900d_device, VID_TVGA }, - {"[ISA] Trigem Korean VGA (ET4000AX)", "tgkorvga", &et4000k_isa_device, VID_TGKOREANVGA }, - {"[ISA] Tseng ET4000AX", "et4000ax", &et4000_isa_device, VID_ET4000_ISA }, - {"[ISA] VGA", "vga", &vga_device, VID_VGA }, - {"[ISA] Wyse 700", "wy700", &wy700_device, VID_WY700 }, - {"[MCA] Tseng ET4000AX", "et4000mca", &et4000_mca_device, VID_ET4000_MCA }, - {"[PCI] ATI Graphics Pro Turbo (Mach64 GX)", "mach64gx_pci", &mach64gx_pci_device, VID_MACH64GX_PCI }, - {"[PCI] ATI Video Xpression (Mach64 VT2)", "mach64vt2", &mach64vt2_device, VID_MACH64VT2 }, - {"[PCI] Cardex Tseng ET4000/w32p", "et4000w32p_pci", &et4000w32p_cardex_pci_device, VID_ET4000W32_CARDEX_PCI }, - {"[PCI] Cirrus Logic CL-GD 5430", "cl_gd5430_pci", &gd5430_pci_device, VID_CL_GD5430_PCI }, - {"[PCI] Cirrus Logic CL-GD 5434", "cl_gd5434_pci", &gd5434_pci_device, VID_CL_GD5434_PCI }, - {"[PCI] Cirrus Logic CL-GD 5436", "cl_gd5436_pci", &gd5436_pci_device, VID_CL_GD5436_PCI }, - {"[PCI] Cirrus Logic CL-GD 5440", "cl_gd5440_pci", &gd5440_pci_device, VID_CL_GD5440_PCI }, - {"[PCI] Cirrus Logic CL-GD 5446", "cl_gd5446_pci", &gd5446_pci_device, VID_CL_GD5446_PCI }, - {"[PCI] Cirrus Logic CL-GD 5480", "cl_gd5480_pci", &gd5480_pci_device, VID_CL_GD5480_PCI }, + {"[ISA] Trident TVGA8900D", "tvga8900d", &tvga8900d_device }, + {"[ISA] Trigem Korean VGA (ET4000AX)", "tgkorvga", &et4000k_isa_device }, + {"[ISA] Tseng ET4000AX", "et4000ax", &et4000_isa_device }, + {"[ISA] VGA", "vga", &vga_device }, + {"[ISA] Wyse 700", "wy700", &wy700_device }, + {"[MCA] Tseng ET4000AX", "et4000mca", &et4000_mca_device }, + {"[PCI] ATI Graphics Pro Turbo (Mach64 GX)", "mach64gx_pci", &mach64gx_pci_device }, + {"[PCI] ATI Video Xpression (Mach64 VT2)", "mach64vt2", &mach64vt2_device }, + {"[PCI] Cardex Tseng ET4000/w32p", "et4000w32p_pci", &et4000w32p_cardex_pci_device }, + {"[PCI] Cirrus Logic CL-GD 5430", "cl_gd5430_pci", &gd5430_pci_device, }, + {"[PCI] Cirrus Logic CL-GD 5434", "cl_gd5434_pci", &gd5434_pci_device }, + {"[PCI] Cirrus Logic CL-GD 5436", "cl_gd5436_pci", &gd5436_pci_device }, + {"[PCI] Cirrus Logic CL-GD 5440", "cl_gd5440_pci", &gd5440_pci_device }, + {"[PCI] Cirrus Logic CL-GD 5446", "cl_gd5446_pci", &gd5446_pci_device }, + {"[PCI] Cirrus Logic CL-GD 5480", "cl_gd5480_pci", &gd5480_pci_device }, #if defined(DEV_BRANCH) && defined(USE_STEALTH32) - {"[PCI] Diamond Stealth 32 (Tseng ET4000/w32p)", "stealth32_pci", &et4000w32p_pci_device, VID_ET4000W32_PCI }, + {"[PCI] Diamond Stealth 32 (Tseng ET4000/w32p)", "stealth32_pci", &et4000w32p_pci_device }, #endif - {"[PCI] Diamond Stealth 3D 2000 (S3 ViRGE)", "stealth3d_2000_pci", &s3_virge_pci_device, VID_VIRGE_PCI }, - {"[PCI] Diamond Stealth 3D 3000 (S3 ViRGE/VX)", "stealth3d_3000_pci", &s3_virge_988_pci_device, VID_VIRGEVX_PCI }, - {"[PCI] Diamond Stealth 64 DRAM (S3 Trio64)", "stealth64d_pci", &s3_diamond_stealth64_pci_device, VID_STEALTH64_PCI }, - {"[PCI] ExpertColor DSV3868P CF55 (S3 Vision868)", "expertcolor_pci", &s3_expertcolor_pci_device, VID_EXPERTCOLOR_PCI }, - {"[PCI] Number Nine 9FX (S3 Trio64)", "n9_9fx_pci", &s3_9fx_pci_device, VID_N9_9FX_PCI }, - {"[PCI] Paradise Bahamas 64 (S3 Vision864)", "bahamas64_pci", &s3_bahamas64_pci_device, VID_BAHAMAS64_PCI }, - {"[PCI] Phoenix S3 Vision864", "px_vision864_pci", &s3_phoenix_vision864_pci_device, VID_PHOENIX_VISION864_PCI }, - {"[PCI] Phoenix S3 Trio32", "px_trio32_pci", &s3_phoenix_trio32_pci_device, VID_PHOENIX_TRIO32_PCI }, - {"[PCI] Phoenix S3 Trio64", "px_trio64_pci", &s3_phoenix_trio64_pci_device, VID_PHOENIX_TRIO64_PCI }, - {"[PCI] S3 ViRGE/DX", "virge375_pci", &s3_virge_375_pci_device, VID_VIRGEDX_PCI }, - {"[PCI] S3 ViRGE/DX (VBE 2.0)", "virge375_vbe20_pci", &s3_virge_375_4_pci_device, VID_VIRGEDX4_PCI }, - {"[PCI] STB Nitro 64V (CL-GD 5446)", "cl_gd5446_stb_pci", &gd5446_stb_pci_device, VID_CL_GD5446_STB_PCI }, - {"[PCI] Trident TGUI9440", "tgui9440_pci", &tgui9440_pci_device, VID_TGUI9440_PCI }, - {"[VLB] ATI Graphics Pro Turbo (Mach64 GX)", "mach64gx_vlb", &mach64gx_vlb_device, VID_MACH64GX_VLB }, - {"[VLB] Cardex Tseng ET4000/w32p", "et4000w32p_vlb", &et4000w32p_cardex_vlb_device, VID_ET4000W32_CARDEX_VLB }, - {"[VLB] Cirrus Logic CL-GD 5428", "cl_gd5428_vlb", &gd5428_vlb_device, VID_CL_GD5428_VLB }, - {"[VLB] Cirrus Logic CL-GD 5429", "cl_gd5429_vlb", &gd5429_vlb_device, VID_CL_GD5429_VLB }, - {"[VLB] Cirrus Logic CL-GD 5434", "cl_gd5434_vlb", &gd5434_vlb_device, VID_CL_GD5434_VLB }, + {"[PCI] Diamond Stealth 3D 2000 (S3 ViRGE)", "stealth3d_2000_pci", &s3_virge_pci_device }, + {"[PCI] Diamond Stealth 3D 3000 (S3 ViRGE/VX)", "stealth3d_3000_pci", &s3_virge_988_pci_device }, + {"[PCI] Diamond Stealth 64 DRAM (S3 Trio64)", "stealth64d_pci", &s3_diamond_stealth64_pci_device }, + {"[PCI] ExpertColor DSV3868P CF55 (S3 Vision868)", "expertcolor_pci", &s3_expertcolor_pci_device }, + {"[PCI] Number Nine 9FX (S3 Trio64)", "n9_9fx_pci", &s3_9fx_pci_device }, + {"[PCI] Paradise Bahamas 64 (S3 Vision864)", "bahamas64_pci", &s3_bahamas64_pci_device }, + {"[PCI] Phoenix S3 Vision864", "px_vision864_pci", &s3_phoenix_vision864_pci_device }, + {"[PCI] Phoenix S3 Trio32", "px_trio32_pci", &s3_phoenix_trio32_pci_device }, + {"[PCI] Phoenix S3 Trio64", "px_trio64_pci", &s3_phoenix_trio64_pci_device }, + {"[PCI] S3 ViRGE/DX", "virge375_pci", &s3_virge_375_pci_device }, + {"[PCI] S3 ViRGE/DX (VBE 2.0)", "virge375_vbe20_pci", &s3_virge_375_4_pci_device }, + {"[PCI] STB Nitro 64V (CL-GD 5446)", "cl_gd5446_stb_pci", &gd5446_stb_pci_device }, + {"[PCI] Trident TGUI9440", "tgui9440_pci", &tgui9440_pci_device }, + {"[VLB] ATI Graphics Pro Turbo (Mach64 GX)", "mach64gx_vlb", &mach64gx_vlb_device }, + {"[VLB] Cardex Tseng ET4000/w32p", "et4000w32p_vlb", &et4000w32p_cardex_vlb_device }, + {"[VLB] Cirrus Logic CL-GD 5428", "cl_gd5428_vlb", &gd5428_vlb_device }, + {"[VLB] Cirrus Logic CL-GD 5429", "cl_gd5429_vlb", &gd5429_vlb_device }, + {"[VLB] Cirrus Logic CL-GD 5434", "cl_gd5434_vlb", &gd5434_vlb_device }, #if defined(DEV_BRANCH) && defined(USE_STEALTH32) - {"[VLB] Diamond Stealth 32 (Tseng ET4000/w32p)", "stealth32_vlb", &et4000w32p_vlb_device, VID_ET4000W32_VLB }, + {"[VLB] Diamond Stealth 32 (Tseng ET4000/w32p)", "stealth32_vlb", &et4000w32p_vlb_device }, #endif - {"[VLB] Diamond SpeedStar PRO (CL-GD 5426)", "cl_gd5426_vlb", &gd5426_vlb_device, VID_CL_GD5426_VLB }, - {"[VLB] Diamond SpeedStar PRO SE (CL-GD 5430)", "cl_gd5430_vlb", &gd5430_vlb_device, VID_CL_GD5430_VLB }, - {"[VLB] Diamond Stealth 3D 2000 (S3 ViRGE)", "stealth3d_2000_vlb", &s3_virge_vlb_device, VID_VIRGE_VLB }, - {"[VLB] Diamond Stealth 3D 3000 (S3 ViRGE/VX)", "stealth3d_3000_vlb", &s3_virge_988_vlb_device, VID_VIRGEVX_VLB }, - {"[VLB] Diamond Stealth 64 DRAM (S3 Trio64)", "stealth64d_vlb", &s3_diamond_stealth64_vlb_device, VID_STEALTH64_VLB }, - {"[VLB] ExpertColor DSV3868P CF55 (S3 Vision868)", "expertcolor_vlb", &s3_expertcolor_vlb_device, VID_EXPERTCOLOR_VLB }, - {"[VLB] Number Nine 9FX (S3 Trio64)", "n9_9fx_vlb", &s3_9fx_vlb_device, VID_N9_9FX_VLB }, - {"[VLB] Paradise Bahamas 64 (S3 Vision864)", "bahamas64_vlb", &s3_bahamas64_vlb_device, VID_BAHAMAS64_VLB }, - {"[VLB] Phoenix S3 Vision864", "px_vision864_vlb", &s3_phoenix_vision864_vlb_device, VID_PHOENIX_VISION864_VLB }, - {"[VLB] Phoenix S3 Trio32", "px_trio32_vlb", &s3_phoenix_trio32_vlb_device, VID_PHOENIX_TRIO32_VLB }, - {"[VLB] Phoenix S3 Trio64", "px_trio64_vlb", &s3_phoenix_trio64_vlb_device, VID_PHOENIX_TRIO64_VLB }, - {"[VLB] S3 ViRGE/DX", "virge375_vlb", &s3_virge_375_vlb_device, VID_VIRGEDX_VLB }, - {"[VLB] S3 ViRGE/DX (VBE 2.0)", "virge375_vbe20_vlb", &s3_virge_375_4_vlb_device, VID_VIRGEDX4_VLB }, - {"[VLB] Trident TGUI9400CXi", "tgui9400cxi_vlb", &tgui9400cxi_device, VID_TGUI9400CXI }, - {"[VLB] Trident TGUI9440", "tgui9440_vlb", &tgui9440_vlb_device, VID_TGUI9440_VLB }, - {"", "", NULL, -1 } + {"[VLB] Diamond SpeedStar PRO (CL-GD 5426)", "cl_gd5426_vlb", &gd5426_vlb_device }, + {"[VLB] Diamond SpeedStar PRO SE (CL-GD 5430)", "cl_gd5430_vlb", &gd5430_vlb_device }, + {"[VLB] Diamond Stealth 3D 2000 (S3 ViRGE)", "stealth3d_2000_vlb", &s3_virge_vlb_device }, + {"[VLB] Diamond Stealth 3D 3000 (S3 ViRGE/VX)", "stealth3d_3000_vlb", &s3_virge_988_vlb_device }, + {"[VLB] Diamond Stealth 64 DRAM (S3 Trio64)", "stealth64d_vlb", &s3_diamond_stealth64_vlb_device }, + {"[VLB] ExpertColor DSV3868P CF55 (S3 Vision868)", "expertcolor_vlb", &s3_expertcolor_vlb_device }, + {"[VLB] Number Nine 9FX (S3 Trio64)", "n9_9fx_vlb", &s3_9fx_vlb_device }, + {"[VLB] Paradise Bahamas 64 (S3 Vision864)", "bahamas64_vlb", &s3_bahamas64_vlb_device }, + {"[VLB] Phoenix S3 Vision864", "px_vision864_vlb", &s3_phoenix_vision864_vlb_device }, + {"[VLB] Phoenix S3 Trio32", "px_trio32_vlb", &s3_phoenix_trio32_vlb_device }, + {"[VLB] Phoenix S3 Trio64", "px_trio64_vlb", &s3_phoenix_trio64_vlb_device }, + {"[VLB] S3 ViRGE/DX", "virge375_vlb", &s3_virge_375_vlb_device }, + {"[VLB] S3 ViRGE/DX (VBE 2.0)", "virge375_vbe20_vlb", &s3_virge_375_4_vlb_device }, + {"[VLB] Trident TGUI9400CXi", "tgui9400cxi_vlb", &tgui9400cxi_device }, + {"[VLB] Trident TGUI9440", "tgui9440_vlb", &tgui9440_vlb_device }, + {"", "", NULL } }; @@ -207,14 +206,14 @@ video_reset(int card) /* Do not initialize internal cards here. */ if (!(card == VID_NONE) && \ !(card == VID_INTERNAL) && !machines[machine].fixed_gfxcard) { - vid_table_log("VIDEO: initializing '%s'\n", video_cards[video_old_to_new(card)].name); + vid_table_log("VIDEO: initializing '%s'\n", video_cards[card].name); /* 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); /* Initialize the video card. */ - device_add(video_cards[video_old_to_new(card)].device); + device_add(video_cards[card].device); } /* Enable the Voodoo if configured. */ @@ -261,7 +260,7 @@ video_card_getid(char *s) { int c = 0; - while (video_cards[c].legacy_id != -1) { + while (video_cards[c].name != NULL) { if (!strcmp((char *) video_cards[c].name, s)) return(c); c++; @@ -271,28 +270,6 @@ video_card_getid(char *s) } -int -video_old_to_new(int card) -{ - int c = 0; - - while (video_cards[c].legacy_id != -1) { - if (video_cards[c].legacy_id == card) - return(c); - c++; - } - - return(0); -} - - -int -video_new_to_old(int card) -{ - return(video_cards[card].legacy_id); -} - - char * video_get_internal_name(int card) { @@ -305,9 +282,9 @@ video_get_video_from_internal_name(char *s) { int c = 0; - while (video_cards[c].legacy_id != -1) { + while (video_cards[c].name != NULL) { if (!strcmp((char *) video_cards[c].internal_name, s)) - return(video_cards[c].legacy_id); + return(c); c++; } diff --git a/src/video/video.h b/src/video/video.h index 263a800e6..a86cb8df9 100644 --- a/src/video/video.h +++ b/src/video/video.h @@ -28,99 +28,7 @@ enum { VID_NONE = 0, - VID_INTERNAL, - VID_CGA, - VID_COMPAQ_CGA, /* Compaq CGA */ - VID_COMPAQ_CGA_2, /* Compaq CGA 2 */ - VID_COLORPLUS, /* Plantronics ColorPlus */ - VID_WY700, /* Wyse 700 */ - VID_MDA, - VID_GENIUS, /* MDSI Genius */ - VID_HERCULES, - VID_HERCULESPLUS, - VID_INCOLOR, /* Hercules InColor */ - VID_EGA, /* Using IBM EGA BIOS */ - VID_COMPAQ_EGA, /* Compaq EGA */ - VID_SUPER_EGA, /* Using Chips & Technologies SuperEGA BIOS */ - VID_VGA, /* IBM VGA */ - VID_TVGA, /* Using Trident TVGA8900D BIOS */ - VID_ET4000_ISA, /* Tseng ET4000 */ - VID_ET4000_MCA, /* Tseng ET4000 */ - VID_TGKOREANVGA, /*Trigem Korean VGA(Tseng ET4000AX)*/ - VID_ET4000W32_CARDEX_VLB, /* Tseng ET4000/W32p (Cardex) VLB */ - VID_ET4000W32_CARDEX_PCI, /* Tseng ET4000/W32p (Cardex) PCI */ -#if defined(DEV_BRANCH) && defined(USE_STEALTH32) - VID_ET4000W32_VLB, /* Tseng ET4000/W32p (Diamond Stealth 32) VLB */ - VID_ET4000W32_PCI, /* Tseng ET4000/W32p (Diamond Stealth 32) PCI */ -#endif - VID_BAHAMAS64_VLB, /* S3 Vision864 (Paradise Bahamas 64) VLB */ - VID_BAHAMAS64_PCI, /* S3 Vision864 (Paradise Bahamas 64) PCI */ - VID_N9_9FX_VLB, /* S3 764/Trio64 (Number Nine 9FX) VLB */ - VID_N9_9FX_PCI, /* S3 764/Trio64 (Number Nine 9FX) PCI */ - VID_TGUI9400CXI, /* Trident TGUI9400CXi VLB */ - VID_TGUI9440_VLB, /* Trident TGUI9440AGi VLB */ - VID_TGUI9440_PCI, /* Trident TGUI9440AGi PCI */ - VID_ATIKOREANVGA, /*ATI Korean VGA (28800-5)*/ - VID_VGA88, /* ATI VGA-88 (18800-1) */ - VID_VGAEDGE16, /* ATI VGA Edge-16 (18800-1) */ - VID_VGACHARGER, /* ATI VGA Charger (28800-5) */ -#if defined(DEV_BRANCH) && defined(USE_VGAWONDER) - VID_VGAWONDER, /* Compaq ATI VGA Wonder (18800) */ -#endif - VID_VGAWONDERXL, /* Compaq ATI VGA Wonder XL (28800-5) */ -#if defined(DEV_BRANCH) && defined(USE_XL24) - VID_VGAWONDERXL24, /* Compaq ATI VGA Wonder XL24 (28800-6) */ -#endif - VID_MACH64GX_ISA, /* ATI Graphics Pro Turbo (Mach64) ISA */ - VID_MACH64GX_VLB, /* ATI Graphics Pro Turbo (Mach64) VLB */ - VID_MACH64GX_PCI, /* ATI Graphics Pro Turbo (Mach64) PCI */ - VID_MACH64VT2, /* ATI Mach64 VT2 */ - VID_CL_GD5424_ISA, /* Cirrus Logic CL-GD 5424 ISA */ - VID_CL_GD5424_VLB, /* Cirrus Logic CL-GD 5424 VLB */ - VID_CL_GD5426_VLB, /* Diamond SpeedStar PRO (Cirrus Logic CL-GD 5426) VLB */ - VID_CL_GD5428_ISA, /* Cirrus Logic CL-GD 5428 ISA */ - VID_CL_GD5428_VLB, /* Cirrus Logic CL-GD 5428 VLB */ - VID_CL_GD5429_ISA, /* Cirrus Logic CL-GD 5429 ISA */ - VID_CL_GD5429_VLB, /* Cirrus Logic CL-GD 5429 VLB */ - VID_CL_GD5430_VLB, /* Diamond SpeedStar PRO SE (Cirrus Logic CL-GD 5430) VLB */ - VID_CL_GD5430_PCI, /* Cirrus Logic CL-GD 5430 PCI */ - VID_CL_GD5434_ISA, /* Cirrus Logic CL-GD 5434 ISA */ - VID_CL_GD5434_VLB, /* Cirrus Logic CL-GD 5434 VLB */ - VID_CL_GD5434_PCI, /* Cirrus Logic CL-GD 5434 PCI */ - VID_CL_GD5436_PCI, /* Cirrus Logic CL-GD 5436 PCI */ - VID_CL_GD5440_PCI, /* Cirrus Logic CL-GD 5440 PCI */ - VID_CL_GD5446_PCI, /* Cirrus Logic CL-GD 5446 PCI */ - VID_CL_GD5446_STB_PCI, /* STB Nitro 64V (Cirrus Logic CL-GD 5446) PCI */ - VID_CL_GD5480_PCI, /* Cirrus Logic CL-GD 5480 PCI */ - VID_EXPERTCOLOR_VLB, /* S3 Vision868 (ExpertColor DSV3868P CF55) VLB */ - VID_EXPERTCOLOR_PCI, /* S3 Vision868 (ExpertColor DSV3868P CF55) PCI */ - VID_OTI037C, /* Oak OTI-037C */ - VID_OTI067, /* Oak OTI-067 */ - VID_OTI077, /* Oak OTI-077 */ - VID_PVGA1A, /* Paradise PVGA1A Standalone */ - VID_WD90C11, /* Paradise WD90C11-LR Standalone */ - VID_WD90C30, /* Paradise WD90C30-LR Standalone */ - VID_PHOENIX_VISION864_VLB, /* S3 Vision864 (Phoenix) VLB */ - VID_PHOENIX_VISION864_PCI, /* S3 Vision864 (Phoenix) PCI */ - VID_PHOENIX_TRIO32_VLB, /* S3 732/Trio32 (Phoenix) VLB */ - VID_PHOENIX_TRIO32_PCI, /* S3 732/Trio32 (Phoenix) PCI */ - VID_PHOENIX_TRIO64_VLB, /* S3 764/Trio64 (Phoenix) VLB */ - VID_PHOENIX_TRIO64_PCI, /* S3 764/Trio64 (Phoenix) PCI */ - VID_STEALTH64_VLB, /* S3 Trio64 (Diamond Stealth 64) VLB */ - VID_STEALTH64_PCI, /* S3 Trio64 (Diamond Stealth 64) PCI */ -#if defined(DEV_BRANCH) && defined(USE_TI) - VID_TICF62011, /* TI CF62011 */ -#endif - VID_VIRGE_VLB, /* S3 Virge VLB */ - VID_VIRGE_PCI, /* S3 Virge PCI */ - VID_VIRGEDX_VLB, /* S3 Virge/DX VLB */ - VID_VIRGEDX_PCI, /* S3 Virge/DX PCI */ - VID_VIRGEDX4_VLB, /* S3 Virge/DX (VBE 2.0) VLB */ - VID_VIRGEDX4_PCI, /* S3 Virge/DX (VBE 2.0) PCI */ - VID_VIRGEVX_VLB, /* S3 Virge/VX VLB */ - VID_VIRGEVX_PCI, /* S3 Virge/VX PCI */ - - VID_MAX + VID_INTERNAL }; enum { @@ -171,7 +79,6 @@ typedef struct { typedef rgb_t PALETTE[256]; -extern int gfx_present[VID_MAX]; extern int egareads, egawrites; extern int changeframecount; @@ -231,8 +138,6 @@ extern const device_t *video_card_getdevice(int card); #endif extern int video_card_has_config(int card); extern int video_card_getid(char *s); -extern int video_old_to_new(int card); -extern int video_new_to_old(int card); extern char *video_get_internal_name(int card); extern int video_get_video_from_internal_name(char *s); extern int video_is_mda(void); diff --git a/src/win/win_settings.c b/src/win/win_settings.c index 612e00fb0..41ffe3920 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -8,7 +8,7 @@ * * Windows 86Box Settings dialog handler. * - * Version: @(#)win_settings.c 1.0.61 2018/09/12 + * Version: @(#)win_settings.c 1.0.62 2018/09/19 * * Authors: Miran Grca, * David Hrdlička, @@ -813,11 +813,11 @@ recalc_vid_list(HWND hdlg) if (!s[0]) break; - if (video_card_available(c) && gfx_present[video_new_to_old(c)] && + if (video_card_available(c) && device_is_valid(video_card_getdevice(c), machines[temp_machine].flags)) { mbstowcs(szText, s, strlen(s) + 1); SendMessage(h, CB_ADDSTRING, 0, (LPARAM) szText); - if (video_new_to_old(c) == temp_gfxcard) { + if (c == temp_gfxcard) { SendMessage(h, CB_SETCURSEL, d, 0); found_card = 1; } @@ -887,7 +887,7 @@ win_settings_video_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) SendMessage(h, CB_GETLBTEXT, SendMessage(h, CB_GETCURSEL, 0, 0), (LPARAM) lptsTemp); wcstombs(stransi, lptsTemp, 512); gfx = video_card_getid(stransi); - temp_gfxcard = video_new_to_old(gfx); + temp_gfxcard = gfx; h = GetDlgItem(hdlg, IDC_CONFIGURE_VID); if (video_card_has_config(gfx)) @@ -933,7 +933,7 @@ win_settings_video_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) h = GetDlgItem(hdlg, IDC_COMBO_VIDEO); SendMessage(h, CB_GETLBTEXT, SendMessage(h, CB_GETCURSEL, 0, 0), (LPARAM) lptsTemp); wcstombs(stransi, lptsTemp, 512); - temp_gfxcard = video_new_to_old(video_card_getid(stransi)); + temp_gfxcard = video_card_getid(stransi); h = GetDlgItem(hdlg, IDC_CHECK_VOODOO); temp_voodoo = SendMessage(h, BM_GETCHECK, 0, 0); @@ -1092,16 +1092,6 @@ win_settings_input_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) static int mpu401_present(void) { -#if 0 - char *n; - - n = sound_card_get_internal_name(temp_sound_card); - if (n != NULL) { - if (!strcmp(n, "sb16") || !strcmp(n, "sbawe32")) - return 1; - } -#endif - return temp_mpu401 ? 1 : 0; } @@ -1109,22 +1099,9 @@ mpu401_present(void) int mpu401_standalone_allow(void) { -#if 0 - char *n, *md; -#else char *md; -#endif -#if 0 - n = sound_card_get_internal_name(temp_sound_card); -#endif md = midi_device_get_internal_name(temp_midi_device); -#if 0 - if (n != NULL) { - if (!strcmp(n, "sb16") || !strcmp(n, "sbawe32")) - return 0; - } -#endif if (md != NULL) { if (!strcmp(md, "none"))