Fixed some video things, moved some ROM files.

Updated the ROM for OTI037C 9was corrupts.)
Dev-branched the ATI VGA Wonder card.
Re-worked some devbranch stuff.
This commit is contained in:
waltje
2018-04-09 02:22:09 -04:00
parent 7218ed207b
commit f258000cdb
12 changed files with 81 additions and 44 deletions

View File

@@ -8,7 +8,7 @@
* *
* Definitions for the device handler. * Definitions for the device handler.
* *
* Version: @(#)device.h 1.0.3 2018/03/15 * Version: @(#)device.h 1.0.4 2018/04/09
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -53,7 +53,7 @@
enum { enum {
DEVICE_NOT_WORKING = 1, /* does not currently work correctly and will be disabled in a release build*/ DEVICE_UNSTABLE = 1, /* unstable device, be cautious */
DEVICE_AT = 2, /* requires an AT-compatible system */ DEVICE_AT = 2, /* requires an AT-compatible system */
DEVICE_PS2 = 4, /* requires a PS/1 or PS/2 system */ DEVICE_PS2 = 4, /* requires a PS/1 or PS/2 system */
DEVICE_ISA = 8, /* requires the ISA bus */ DEVICE_ISA = 8, /* requires the ISA bus */

View File

@@ -12,7 +12,7 @@
* - pc2386 video BIOS is underdumped (16k instead of 24k) * - pc2386 video BIOS is underdumped (16k instead of 24k)
* - c386sx16 BIOS fails checksum * - c386sx16 BIOS fails checksum
* *
* Version: @(#)rom.c 1.0.10 2018/03/31 * Version: @(#)rom.c 1.0.11 2018/04/09
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -82,7 +82,8 @@ rom_present(wchar_t *fn)
if (f != NULL) { if (f != NULL) {
(void)fclose(f); (void)fclose(f);
return(1); return(1);
} } else
pclog("ROM: image for '%ls' not found!\n", fn);
return(0); return(0);
} }

View File

@@ -79,7 +79,7 @@
* FF88 - board model * FF88 - board model
* 3 = PAS16 * 3 = PAS16
* *
* Version: @(#)snd_pas16.c 1.0.4 2018/04/08 * Version: @(#)snd_pas16.c 1.0.5 2018/04/09
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -781,12 +781,12 @@ static void pas16_close(void *p)
free(pas16); free(pas16);
} }
const device_t pas16_device =
{ const device_t pas16_device = {
"Pro Audio Spectrum 16", "Pro Audio Spectrum 16",
DEVICE_ISA | DEVICE_NOT_WORKING, DEVICE_ISA | DEVICE_UNSTABLE,
0, 0,
pas16_init, pas16_close, NULL, pas16_init, pas16_close, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL NULL
}; };

View File

@@ -55,7 +55,7 @@
#define EMU_VER_MAJOR 0 #define EMU_VER_MAJOR 0
#define EMU_VER_MINOR 1 #define EMU_VER_MINOR 1
#define EMU_VER_REV 5 #define EMU_VER_REV 5
//#define EMU_VER_PATCH 1 #define EMU_VER_PATCH 1
/* Standard C preprocessor macros. */ /* Standard C preprocessor macros. */

View File

@@ -8,7 +8,7 @@
* *
* ATI 18800 emulation (VGA Edge-16) * ATI 18800 emulation (VGA Edge-16)
* *
* Version: @(#)vid_ati18800.c 1.0.6 2018/03/31 * Version: @(#)vid_ati18800.c 1.0.7 2018/04/09
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -93,7 +93,9 @@ static void ati18800_out(uint16_t addr, uint8_t val, void *p)
break; break;
case 0x1cf: case 0x1cf:
ati18800->regs[ati18800->index] = val; ati18800->regs[ati18800->index] = val;
#if 0
pclog("ATI 18800 ATI register write %02x %02x\n", ati18800->index, val); pclog("ATI 18800 ATI register write %02x %02x\n", ati18800->index, val);
#endif
switch (ati18800->index) switch (ati18800->index)
{ {
case 0xb0: case 0xb0:
@@ -174,7 +176,7 @@ static uint8_t ati18800_in(uint16_t addr, void *p)
temp = svga_in(addr, svga); temp = svga_in(addr, svga);
break; break;
} }
#ifndef RELEASE_BUILD #if 0
if (addr != 0x3da) pclog("%02X %04X:%04X\n", temp, CS,cpu_state.pc); if (addr != 0x3da) pclog("%02X %04X:%04X\n", temp, CS,cpu_state.pc);
#endif #endif
return temp; return temp;
@@ -208,16 +210,22 @@ static void *ati18800_init(const device_t *info)
memset(ati18800, 0, sizeof(ati18800_t)); memset(ati18800, 0, sizeof(ati18800_t));
switch (info->local) { switch (info->local) {
#if defined(DEV_BRANCH) && defined(USE_WONDER)
case ATI18800_WONDER: case ATI18800_WONDER:
default:
rom_init(&ati18800->bios_rom, BIOS_ROM_PATH_WONDER, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL); rom_init(&ati18800->bios_rom, BIOS_ROM_PATH_WONDER, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
break; break;
#endif
case ATI18800_VGA88: case ATI18800_VGA88:
rom_init(&ati18800->bios_rom, BIOS_ROM_PATH_VGA88, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL); rom_init(&ati18800->bios_rom, BIOS_ROM_PATH_VGA88, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
break; break;
case ATI18800_EDGE16: case ATI18800_EDGE16:
rom_init(&ati18800->bios_rom, BIOS_ROM_PATH_EDGE16, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL); rom_init(&ati18800->bios_rom, BIOS_ROM_PATH_EDGE16, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
break; break;
default:
break;
}; };
svga_init(&ati18800->svga, ati18800, 1 << 19, /*512kb*/ svga_init(&ati18800->svga, ati18800, 1 << 19, /*512kb*/
@@ -236,10 +244,12 @@ static void *ati18800_init(const device_t *info)
return ati18800; return ati18800;
} }
#if defined(DEV_BRANCH) && defined(USE_WONDER)
static int ati18800_wonder_available(void) static int ati18800_wonder_available(void)
{ {
return rom_present(BIOS_ROM_PATH_WONDER); return rom_present(BIOS_ROM_PATH_WONDER);
} }
#endif
static int ati18800_vga88_available(void) static int ati18800_vga88_available(void)
{ {
@@ -281,10 +291,13 @@ static void ati18800_add_status_info(char *s, int max_len, void *p)
svga_add_status_info(s, max_len, &ati18800->svga); svga_add_status_info(s, max_len, &ati18800->svga);
} }
#if defined(DEV_BRANCH) && defined(USE_WONDER)
const device_t ati18800_wonder_device = const device_t ati18800_wonder_device =
{ {
"ATI-18800", "ATI-18800",
DEVICE_ISA, ATI18800_WONDER, DEVICE_ISA | DEVICE_UNSTABLE,
ATI18800_WONDER,
ati18800_init, ati18800_init,
ati18800_close, ati18800_close,
NULL, NULL,
@@ -294,11 +307,13 @@ const device_t ati18800_wonder_device =
ati18800_add_status_info, ati18800_add_status_info,
NULL NULL
}; };
#endif
const device_t ati18800_vga88_device = const device_t ati18800_vga88_device =
{ {
"ATI-18800-1", "ATI-18800-1",
DEVICE_ISA, ATI18800_VGA88, DEVICE_ISA,
ATI18800_VGA88,
ati18800_init, ati18800_init,
ati18800_close, ati18800_close,
NULL, NULL,
@@ -312,7 +327,8 @@ const device_t ati18800_vga88_device =
const device_t ati18800_device = const device_t ati18800_device =
{ {
"ATI-18800-5", "ATI-18800-5",
DEVICE_ISA, ATI18800_EDGE16, DEVICE_ISA,
ATI18800_EDGE16,
ati18800_init, ati18800_init,
ati18800_close, ati18800_close,
NULL, NULL,

View File

@@ -648,7 +648,7 @@ const device_t compaq_ati28800_device = {
#if defined(DEV_BRANCH) && defined(USE_XL24) #if defined(DEV_BRANCH) && defined(USE_XL24)
const device_t ati28800_wonderxl24_device = { const device_t ati28800_wonderxl24_device = {
"ATI-28800 (VGA Wonder XL24)", "ATI-28800 (VGA Wonder XL24)",
DEVICE_ISA, DEVICE_ISA | DEVICE_UNSTABLE,
VID_VGAWONDERXL24, VID_VGAWONDERXL24,
ati28800_init, ati28800_close, NULL, ati28800_init, ati28800_close, NULL,
ati28800_wonderxl24_available, ati28800_wonderxl24_available,

View File

@@ -10,7 +10,7 @@
* *
* Known bugs: Accelerator doesn't work in planar modes * Known bugs: Accelerator doesn't work in planar modes
* *
* Version: @(#)vid_et4000w32.c 1.0.6 2018/03/31 * Version: @(#)vid_et4000w32.c 1.0.7 2018/04/09
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -1387,7 +1387,8 @@ const device_t et4000w32p_cardex_pci_device =
const device_t et4000w32p_vlb_device = const device_t et4000w32p_vlb_device =
{ {
"Tseng Labs ET4000/w32p VLB (Diamond)", "Tseng Labs ET4000/w32p VLB (Diamond)",
DEVICE_VLB, ET4000W32_DIAMOND, DEVICE_VLB | DEVICE_UNSTABLE,
ET4000W32_DIAMOND,
et4000w32p_init, et4000w32p_close, NULL, et4000w32p_init, et4000w32p_close, NULL,
et4000w32p_available, et4000w32p_available,
et4000w32p_speed_changed, et4000w32p_speed_changed,
@@ -1399,7 +1400,8 @@ const device_t et4000w32p_vlb_device =
const device_t et4000w32p_pci_device = const device_t et4000w32p_pci_device =
{ {
"Tseng Labs ET4000/w32p PCI (Diamond)", "Tseng Labs ET4000/w32p PCI (Diamond)",
DEVICE_PCI, ET4000W32_DIAMOND, DEVICE_PCI | DEVICE_UNSTABLE,
ET4000W32_DIAMOND,
et4000w32p_init, et4000w32p_close, NULL, et4000w32p_init, et4000w32p_close, NULL,
et4000w32p_available, et4000w32p_available,
et4000w32p_speed_changed, et4000w32p_speed_changed,

View File

@@ -8,7 +8,7 @@
* *
* Oak OTI037C/67/077 emulation. * Oak OTI037C/67/077 emulation.
* *
* Version: @(#)vid_oak_oti.c 1.0.8 2018/03/31 * Version: @(#)vid_oak_oti.c 1.0.9 2018/04/09
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -52,9 +52,7 @@
#define BIOS_37C_PATH L"video/oti/oti037c/bios.bin" #define BIOS_37C_PATH L"video/oti/oti037c/bios.bin"
#if 0 //#define BIOS_67_PATH L"video/oti/oti067.bin"
# define BIOS_67_PATH L"video/oti/bios.bin"
#endif
#define BIOS_77_PATH L"video/oti/oti077.vbi" #define BIOS_77_PATH L"video/oti/oti077.vbi"
@@ -290,7 +288,7 @@ oti_init(const device_t *info)
break; break;
case 2: case 2:
#if 0 #ifdef BIOS_67_PATH
romfn = BIOS_67_PATH; romfn = BIOS_67_PATH;
break; break;
#endif #endif
@@ -309,12 +307,14 @@ oti_init(const device_t *info)
oti_recalctimings, oti_in, oti_out, NULL, NULL); oti_recalctimings, oti_in, oti_out, NULL, NULL);
io_sethandler(0x03c0, 32, io_sethandler(0x03c0, 32,
oti_in, NULL, NULL, oti_out, NULL, NULL, oti); oti_in,NULL,NULL, oti_out,NULL,NULL, oti);
io_sethandler(0x46e8, 1, oti_pos_in,NULL,NULL, oti_pos_out,NULL,NULL, oti);
oti->svga.miscout = 1; io_sethandler(0x46e8, 1,
oti_pos_in,NULL,NULL, oti_pos_out,NULL,NULL, oti);
oti->regs[0] = 0x08; /* fixme: bios wants to read this at index 0? this index is undocumented */ oti->svga.miscout = 1;
oti->regs[0] = 0x08; /* fixme: bios wants to read this at index 0? this index is undocumented */
return(oti); return(oti);
} }
@@ -366,7 +366,7 @@ oti037c_available(void)
static int static int
oti067_available(void) oti067_available(void)
{ {
#if 0 #ifdef BIOS_67_PATH
return(rom_present(BIOS_67_PATH)); return(rom_present(BIOS_67_PATH));
#else #else
return(rom_present(BIOS_77_PATH)); return(rom_present(BIOS_77_PATH));
@@ -380,10 +380,10 @@ static const device_config_t oti067_config[] =
"memory", "Memory size", CONFIG_SELECTION, "", 512, "memory", "Memory size", CONFIG_SELECTION, "", 512,
{ {
{ {
"256 kB", 256 "256 KB", 256
}, },
{ {
"512 kB", 512 "512 KB", 512
}, },
{ {
"" ""
@@ -409,10 +409,10 @@ static const device_config_t oti077_config[] =
"memory", "Memory size", CONFIG_SELECTION, "", 1024, "memory", "Memory size", CONFIG_SELECTION, "", 1024,
{ {
{ {
"256 kB", 256 "256 KB", 256
}, },
{ {
"512 kB", 512 "512 KB", 512
}, },
{ {
"1 MB", 1024 "1 MB", 1024

View File

@@ -10,7 +10,7 @@
* *
* NOTE: ROM images need more/better organization per chipset. * NOTE: ROM images need more/better organization per chipset.
* *
* Version: @(#)vid_s3.c 1.0.7 2018/03/11 * Version: @(#)vid_s3.c 1.0.8 2018/04/09
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -2444,7 +2444,7 @@ static void *s3_phoenix_trio64_onboard_init(const device_t *info)
static void *s3_diamond_stealth64_init(const device_t *info) static void *s3_diamond_stealth64_init(const device_t *info)
{ {
s3_t *s3 = s3_trio64_init(info, L"video/s3/s3/stealt64.bin"); s3_t *s3 = s3_trio64_init(info, L"video/s3/s3/stealth64.bin");
if (device_get_config_int("memory") == 1) if (device_get_config_int("memory") == 1)
s3->svga.vram_max = 1 << 20; /*Phoenix BIOS does not expect VRAM to be mirrored*/ s3->svga.vram_max = 1 << 20; /*Phoenix BIOS does not expect VRAM to be mirrored*/
return s3; return s3;
@@ -2462,7 +2462,7 @@ static int s3_phoenix_trio64_available(void)
static int s3_diamond_stealth64_available(void) static int s3_diamond_stealth64_available(void)
{ {
return rom_present(L"video/s3/s3/stealt64.bin"); return rom_present(L"video/s3/s3/stealth64.bin");
} }
static void s3_close(void *p) static void s3_close(void *p)

View File

@@ -8,7 +8,7 @@
* *
* Define all known video cards. * Define all known video cards.
* *
* Version: @(#)vid_table.c 1.0.14 2018/04/03 * Version: @(#)vid_table.c 1.0.15 2018/04/09
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -106,7 +106,9 @@ video_cards[] = {
{"[ISA] ATI VGA-88 (ATI-18800-1)", "ati18800v", &ati18800_vga88_device, VID_VGA88, VIDEO_FLAG_TYPE_SPECIAL, {VIDEO_ISA, 8, 16, 32, 8, 16, 32}}, {"[ISA] ATI VGA-88 (ATI-18800-1)", "ati18800v", &ati18800_vga88_device, VID_VGA88, VIDEO_FLAG_TYPE_SPECIAL, {VIDEO_ISA, 8, 16, 32, 8, 16, 32}},
{"[ISA] ATI VGA Charger (ATI-28800-5)", "ati28800", &ati28800_device, VID_VGACHARGER, VIDEO_FLAG_TYPE_SPECIAL, {VIDEO_ISA, 3, 3, 6, 5, 5, 10}}, {"[ISA] ATI VGA Charger (ATI-28800-5)", "ati28800", &ati28800_device, VID_VGACHARGER, VIDEO_FLAG_TYPE_SPECIAL, {VIDEO_ISA, 3, 3, 6, 5, 5, 10}},
{"[ISA] ATI VGA Edge-16 (ATI-18800-5)", "ati18800", &ati18800_device, VID_VGAEDGE16, VIDEO_FLAG_TYPE_SPECIAL, {VIDEO_ISA, 8, 16, 32, 8, 16, 32}}, {"[ISA] ATI VGA Edge-16 (ATI-18800-5)", "ati18800", &ati18800_device, VID_VGAEDGE16, VIDEO_FLAG_TYPE_SPECIAL, {VIDEO_ISA, 8, 16, 32, 8, 16, 32}},
#if defined(DEV_BRANCH) && defined(USE_WONDER)
{"[ISA] ATI VGA Wonder (ATI-18800)", "ati18800w", &ati18800_wonder_device, VID_VGAWONDER, VIDEO_FLAG_TYPE_SPECIAL, {VIDEO_ISA, 8, 16, 32, 8, 16, 32}}, {"[ISA] ATI VGA Wonder (ATI-18800)", "ati18800w", &ati18800_wonder_device, VID_VGAWONDER, VIDEO_FLAG_TYPE_SPECIAL, {VIDEO_ISA, 8, 16, 32, 8, 16, 32}},
#endif
#if defined(DEV_BRANCH) && defined(USE_XL24) #if defined(DEV_BRANCH) && defined(USE_XL24)
{"[ISA] ATI VGA Wonder XL24 (ATI-28800-6)", "ati28800w", &ati28800_wonderxl24_device, VID_VGAWONDERXL24, VIDEO_FLAG_TYPE_SPECIAL, {VIDEO_ISA, 3, 3, 6, 5, 5, 10}}, {"[ISA] ATI VGA Wonder XL24 (ATI-28800-6)", "ati28800w", &ati28800_wonderxl24_device, VID_VGAWONDERXL24, VIDEO_FLAG_TYPE_SPECIAL, {VIDEO_ISA, 3, 3, 6, 5, 5, 10}},
#endif #endif

View File

@@ -8,7 +8,7 @@
# #
# Makefile for Windows systems using the MinGW32 environment. # Makefile for Windows systems using the MinGW32 environment.
# #
# Version: @(#)Makefile.mingw 1.0.21 2018/04/08 # Version: @(#)Makefile.mingw 1.0.22 2018/04/09
# #
# Author: Fred N. van Kempen, <decwiz@yahoo.com> # Author: Fred N. van Kempen, <decwiz@yahoo.com>
# #
@@ -137,6 +137,9 @@ endif
ifndef XL24 ifndef XL24
XL24 := n XL24 := n
endif endif
ifndef WONDER
WONDER := n
endif
# Name of the executable. # Name of the executable.
@@ -159,6 +162,7 @@ ifeq ($(DEV_BUILD), y)
PAS16 := y PAS16 := y
STEALTH32 := y STEALTH32 := y
XL24 := y XL24 := y
WONDER := y
endif endif
# WxWidgets basic info. Extract using the config program. # WxWidgets basic info. Extract using the config program.
@@ -444,6 +448,10 @@ ifeq ($(DEV_BRANCH), y)
DEVBROBJ += vid_icd2061.o DEVBROBJ += vid_icd2061.o
endif endif
ifeq ($(WONDER), y)
OPTS += -DUSE_WONDER
endif
ifeq ($(XL24), y) ifeq ($(XL24), y)
OPTS += -DUSE_XL24 OPTS += -DUSE_XL24
endif endif

View File

@@ -8,7 +8,7 @@
# #
# Makefile for Windows using Visual Studio 2015. # Makefile for Windows using Visual Studio 2015.
# #
# Version: @(#)Makefile.VC 1.0.6 2018/04/08 # Version: @(#)Makefile.VC 1.0.7 2018/04/09
# #
# Author: Fred N. van Kempen, <decwiz@yahoo.com> # Author: Fred N. van Kempen, <decwiz@yahoo.com>
# #
@@ -137,6 +137,9 @@ endif
ifndef XL24 ifndef XL24
XL24 := n XL24 := n
endif endif
ifndef WONDER
WONDER := n
endif
# Name of the executable. # Name of the executable.
@@ -159,6 +162,7 @@ ifeq ($(DEV_BUILD), y)
PAS16 := y PAS16 := y
STEALTH32 := y STEALTH32 := y
XL24 := y XL24 := y
WONDER := y
endif endif
# Where is the the WinPcap SDK? # Where is the the WinPcap SDK?
@@ -417,6 +421,10 @@ ifeq ($(DEV_BRANCH), y)
OPTS += -DUSE_XL24 OPTS += -DUSE_XL24
endif endif
ifeq ($(WONDER), y)
OPTS += -DUSE_WONDER
endif
ifeq ($(PAS16), y) ifeq ($(PAS16), y)
OPTS += -DUSE_PAS16 OPTS += -DUSE_PAS16
DEVBROBJ += snd_pas16.obj DEVBROBJ += snd_pas16.obj