Skip to content

Commit

Permalink
Added the STB PowerGraph 64 Video (S3 Trio64V+ VLB).
Browse files Browse the repository at this point in the history
  • Loading branch information
OBattler committed Feb 22, 2024
1 parent fcabd35 commit 8cf8ccf
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/include/86box/video.h
Expand Up @@ -491,6 +491,7 @@ extern const device_t s3_spea_mirage_p64_vlb_device;
extern const device_t s3_phoenix_trio64_vlb_device;
extern const device_t s3_phoenix_trio64_onboard_pci_device;
extern const device_t s3_phoenix_trio64_pci_device;
extern const device_t s3_stb_powergraph_64_video_vlb_device;
extern const device_t s3_phoenix_trio64vplus_pci_device;
extern const device_t s3_phoenix_trio64vplus_onboard_pci_device;
extern const device_t s3_cardex_trio64vplus_pci_device;
Expand Down
36 changes: 35 additions & 1 deletion src/video/vid_s3.c
Expand Up @@ -63,6 +63,7 @@
#define ROM_PHOENIX_TRIO64 "roms/video/s3/86c764x1.bin"
#define ROM_DIAMOND_STEALTH64_764 "roms/video/s3/stealt64.bin"
#define ROM_TRIO64V2_DX_VBE20 "roms/video/s3/86c775_2.bin"
#define ROM_STB_POWERGRAPH_64_VIDEO "roms/video/s3/VBIOS.BIN"
#define ROM_PHOENIX_TRIO64VPLUS "roms/video/s3/64V1506.ROM"
#define ROM_CARDEX_TRIO64VPLUS "roms/video/s3/S3T64VP.VBI"
#define ROM_DIAMOND_STEALTH_SE "roms/video/s3/DiamondStealthSE.VBI"
Expand Down Expand Up @@ -94,6 +95,7 @@ enum {
S3_AMI_86C924,
S3_TRIO64V2_DX,
S3_TRIO64V2_DX_ONBOARD,
S3_STB_POWERGRAPH_64_VIDEO,
S3_PHOENIX_TRIO64VPLUS,
S3_PHOENIX_TRIO64VPLUS_ONBOARD,
S3_CARDEX_TRIO64VPLUS,
Expand Down Expand Up @@ -3079,7 +3081,8 @@ s3_in(uint16_t addr, void *priv)
temp = svga->seqregs[svga->seqaddr];
/* This is needed for the Intel Advanced/ATX's built-in S3 Trio64V+ BIOS to not
get stuck in an infinite loop. */
if (((s3->card_type == S3_PHOENIX_TRIO64VPLUS_ONBOARD) ||
if (((s3->card_type == S3_STB_POWERGRAPH_64_VIDEO) ||
(s3->card_type == S3_PHOENIX_TRIO64VPLUS_ONBOARD) ||
(s3->card_type == S3_CARDEX_TRIO64VPLUS)) && (svga->seqaddr == 0x17))
svga->seqregs[svga->seqaddr] ^= 0x01;
return temp;
Expand Down Expand Up @@ -9478,6 +9481,7 @@ s3_reset(void *priv)

case S3_PHOENIX_TRIO64:
case S3_PHOENIX_TRIO64_ONBOARD:
case S3_STB_POWERGRAPH_64_VIDEO:
case S3_CARDEX_TRIO64VPLUS:
case S3_PHOENIX_TRIO64VPLUS:
case S3_PHOENIX_TRIO64VPLUS_ONBOARD:
Expand Down Expand Up @@ -9721,6 +9725,14 @@ s3_init(const device_t *info)
else
video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_s3_trio64_vlb);
break;
case S3_STB_POWERGRAPH_64_VIDEO:
bios_fn = ROM_STB_POWERGRAPH_64_VIDEO;
chip = S3_TRIO64V;
if (info->flags & DEVICE_PCI)
video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_s3_trio64_pci);
else
video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_s3_trio64_vlb);
break;
case S3_PHOENIX_TRIO64VPLUS:
bios_fn = ROM_PHOENIX_TRIO64VPLUS;
chip = S3_TRIO64V;
Expand Down Expand Up @@ -10181,6 +10193,7 @@ s3_init(const device_t *info)

case S3_PHOENIX_TRIO64:
case S3_PHOENIX_TRIO64_ONBOARD:
case S3_STB_POWERGRAPH_64_VIDEO:
case S3_PHOENIX_TRIO64VPLUS:
case S3_PHOENIX_TRIO64VPLUS_ONBOARD:
case S3_CARDEX_TRIO64VPLUS:
Expand Down Expand Up @@ -10420,6 +10433,12 @@ s3_phoenix_trio64_available(void)
return rom_present(ROM_PHOENIX_TRIO64);
}

static int
s3_stb_powergraph_64_video_available(void)
{
return rom_present(ROM_STB_POWERGRAPH_64_VIDEO);
}

static int
s3_phoenix_trio64vplus_available(void)
{
Expand Down Expand Up @@ -11063,6 +11082,21 @@ const device_t s3_phoenix_trio64_pci_device = {
.config = s3_standard_config
};

const device_t s3_stb_powergraph_64_video_vlb_device = {
.name = "S3 Trio64V+ (STB PowerGraph 64 Video) VLB",
.name = "S3 Trio64V+ PCI (Phoenix)",
.internal_name = "px_trio64vplus_pci",
.flags = DEVICE_VLB,
.local = S3_STB_POWERGRAPH_64_VIDEO,
.init = s3_init,
.close = s3_close,
.reset = s3_reset,
{ .available = s3_stb_powergraph_64_video_available },
.speed_changed = s3_speed_changed,
.force_redraw = s3_force_redraw,
.config = s3_standard_config
};

const device_t s3_phoenix_trio64vplus_onboard_pci_device = {
.name = "S3 Trio64V+ PCI On-Board (Phoenix)",
.internal_name = "px_trio64vplus_onboard_pci",
Expand Down
1 change: 1 addition & 0 deletions src/video/vid_table.c
Expand Up @@ -254,6 +254,7 @@ video_cards[] = {
{ &s3_spea_mirage_p64_vlb_device },
{ &s3_phoenix_vision968_vlb_device },
{ &s3_phoenix_vision868_vlb_device },
{ &s3_stb_powergraph_64_video_vlb_device },
{ &ht216_32_standalone_device },
{ &tgui9400cxi_device },
{ &tgui9440_vlb_device },
Expand Down

0 comments on commit 8cf8ccf

Please sign in to comment.