mirror of
https://github.com/holub/mame
synced 2025-06-07 05:13:46 +03:00
pci/virge_pci.cpp: add virgevx_pci stub
This commit is contained in:
parent
631a761aba
commit
1693281bbf
@ -128,6 +128,7 @@ void pci_cards(device_slot_interface &device)
|
|||||||
device.option_add("vision968", VISION968_PCI);
|
device.option_add("vision968", VISION968_PCI);
|
||||||
device.option_add("virge", VIRGE_PCI);
|
device.option_add("virge", VIRGE_PCI);
|
||||||
device.option_add("virgedx", VIRGEDX_PCI);
|
device.option_add("virgedx", VIRGEDX_PCI);
|
||||||
|
device.option_add("virgevx", VIRGEVX_PCI);
|
||||||
device.option_add("mga2064w", MGA2064W);
|
device.option_add("mga2064w", MGA2064W);
|
||||||
device.option_add("promotion3210", PROMOTION3210);
|
device.option_add("promotion3210", PROMOTION3210);
|
||||||
device.option_add("gd5446", GD5446_PCI);
|
device.option_add("gd5446", GD5446_PCI);
|
||||||
|
@ -7,6 +7,11 @@
|
|||||||
|
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
|
|
||||||
|
DEFINE_DEVICE_TYPE(VIRGE_PCI, virge_pci_device, "virge_pci", "S3 86C325 ViRGE")
|
||||||
|
DEFINE_DEVICE_TYPE(VIRGEVX_PCI, virgevx_pci_device, "virgevx_pci", "S3 86C988 ViRGE/VX")
|
||||||
|
DEFINE_DEVICE_TYPE(VIRGEDX_PCI, virgedx_pci_device, "virgedx_pci", "S3 86C375 ViRGE/DX")
|
||||||
|
//VIRGEGX_PCI, /DX with SGRAM/SDRAM support
|
||||||
|
|
||||||
virge_pci_device::virge_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
virge_pci_device::virge_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
: virge_pci_device(mconfig, VIRGE_PCI, tag, owner, clock)
|
: virge_pci_device(mconfig, VIRGE_PCI, tag, owner, clock)
|
||||||
{
|
{
|
||||||
@ -20,6 +25,11 @@ virge_pci_device::virge_pci_device(const machine_config &mconfig, device_type ty
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virgevx_pci_device::virgevx_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
|
: virge_pci_device(mconfig, VIRGEVX_PCI, tag, owner, clock)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
virgedx_pci_device::virgedx_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
virgedx_pci_device::virgedx_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
: virge_pci_device(mconfig, VIRGEDX_PCI, tag, owner, clock)
|
: virge_pci_device(mconfig, VIRGEDX_PCI, tag, owner, clock)
|
||||||
{
|
{
|
||||||
@ -173,6 +183,27 @@ void virge_pci_device::device_start()
|
|||||||
machine().save().register_postload(save_prepost_delegate(FUNC(virge_pci_device::postload), this));
|
machine().save().register_postload(save_prepost_delegate(FUNC(virge_pci_device::postload), this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void virgevx_pci_device::device_start()
|
||||||
|
{
|
||||||
|
set_ids(0x5333883d, 0x00, 0x030000, 0x000000);
|
||||||
|
pci_card_device::device_start();
|
||||||
|
|
||||||
|
add_rom(m_bios->base(),0x8000);
|
||||||
|
expansion_rom_base = 0xc0000;
|
||||||
|
|
||||||
|
add_map(64 * 1024 * 1024, M_MEM | M_DISABLED, FUNC(virgevx_pci_device::lfb_map));
|
||||||
|
set_map_address(0, 0x70000000);
|
||||||
|
|
||||||
|
command = 0x0000;
|
||||||
|
// DAC SNP / BME / MEM / I/O
|
||||||
|
command_mask = 0x27;
|
||||||
|
// medium DEVSELB
|
||||||
|
status = 0x0200;
|
||||||
|
|
||||||
|
remap_cb();
|
||||||
|
machine().save().register_postload(save_prepost_delegate(FUNC(virgevx_pci_device::postload), this));
|
||||||
|
}
|
||||||
|
|
||||||
void virgedx_pci_device::device_start()
|
void virgedx_pci_device::device_start()
|
||||||
{
|
{
|
||||||
set_ids(0x53338a01, 0x00, 0x030000, 0x000000);
|
set_ids(0x53338a01, 0x00, 0x030000, 0x000000);
|
||||||
@ -184,6 +215,12 @@ void virgedx_pci_device::device_start()
|
|||||||
add_map(64 * 1024 * 1024, M_MEM | M_DISABLED, FUNC(virge_pci_device::lfb_map));
|
add_map(64 * 1024 * 1024, M_MEM | M_DISABLED, FUNC(virge_pci_device::lfb_map));
|
||||||
set_map_address(0, 0x70000000);
|
set_map_address(0, 0x70000000);
|
||||||
|
|
||||||
|
command = 0x0000;
|
||||||
|
// DAC SNP / BME / MEM / I/O
|
||||||
|
command_mask = 0x27;
|
||||||
|
// medium DEVSELB
|
||||||
|
status = 0x0200;
|
||||||
|
|
||||||
remap_cb();
|
remap_cb();
|
||||||
machine().save().register_postload(save_prepost_delegate(FUNC(virgedx_pci_device::postload), this));
|
machine().save().register_postload(save_prepost_delegate(FUNC(virgedx_pci_device::postload), this));
|
||||||
}
|
}
|
||||||
@ -222,6 +259,19 @@ void virge_pci_device::device_add_mconfig(machine_config &config)
|
|||||||
m_vga->linear_config_changed().set(FUNC(virge_pci_device::linear_config_changed_w));
|
m_vga->linear_config_changed().set(FUNC(virge_pci_device::linear_config_changed_w));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void virgevx_pci_device::device_add_mconfig(machine_config &config)
|
||||||
|
{
|
||||||
|
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||||
|
screen.set_raw(XTAL(25'174'800), 900, 0, 640, 526, 0, 480);
|
||||||
|
screen.set_screen_update("vga", FUNC(s3virge_vga_device::screen_update));
|
||||||
|
|
||||||
|
S3VIRGEVX(config, m_vga, 0);
|
||||||
|
m_vga->set_screen("screen");
|
||||||
|
// 2MB, 4MB and 8MB, EDO RAM
|
||||||
|
m_vga->set_vram_size(0x400000);
|
||||||
|
m_vga->linear_config_changed().set(FUNC(virgevx_pci_device::linear_config_changed_w));
|
||||||
|
}
|
||||||
|
|
||||||
void virgedx_pci_device::device_add_mconfig(machine_config &config)
|
void virgedx_pci_device::device_add_mconfig(machine_config &config)
|
||||||
{
|
{
|
||||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||||
@ -247,6 +297,27 @@ ROM_START( virge_pci )
|
|||||||
ROM_IGNORE( 0x8000 )
|
ROM_IGNORE( 0x8000 )
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
|
const tiny_rom_entry *virge_pci_device::device_rom_region() const
|
||||||
|
{
|
||||||
|
return ROM_NAME( virge_pci );
|
||||||
|
}
|
||||||
|
|
||||||
|
ROM_START( virgevx_pci )
|
||||||
|
ROM_REGION(0x8000,"bios", 0)
|
||||||
|
ROM_DEFAULT_BIOS("dms3d3k")
|
||||||
|
|
||||||
|
// Vlask dump
|
||||||
|
// v2.xx BIOSes known to exist
|
||||||
|
ROM_SYSTEM_BIOS( 0, "dms3d3k", "Diamond Stealth 3D 3000 HQ v1.00" )
|
||||||
|
ROMX_LOAD("diamondstealth3000.vbi", 0x0000, 0x8000, CRC(c2423896) SHA1(fdab43f15da1d66bca286583f9da86873f3e22de), ROM_BIOS(0) )
|
||||||
|
ROM_END
|
||||||
|
|
||||||
|
const tiny_rom_entry *virgevx_pci_device::device_rom_region() const
|
||||||
|
{
|
||||||
|
return ROM_NAME( virgevx_pci );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ROM_START( virgedx_pci )
|
ROM_START( virgedx_pci )
|
||||||
ROM_REGION(0x8000,"bios", 0)
|
ROM_REGION(0x8000,"bios", 0)
|
||||||
ROM_DEFAULT_BIOS("virgedx")
|
ROM_DEFAULT_BIOS("virgedx")
|
||||||
@ -258,16 +329,7 @@ ROM_START( virgedx_pci )
|
|||||||
ROMX_LOAD("virgedxdiamond.bin", 0x00000, 0x8000, CRC(58b0dcda) SHA1(b13ae6b04db6fc05a76d924ddf2efe150b823029), ROM_BIOS(1) )
|
ROMX_LOAD("virgedxdiamond.bin", 0x00000, 0x8000, CRC(58b0dcda) SHA1(b13ae6b04db6fc05a76d924ddf2efe150b823029), ROM_BIOS(1) )
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
const tiny_rom_entry *virge_pci_device::device_rom_region() const
|
|
||||||
{
|
|
||||||
return ROM_NAME( virge_pci );
|
|
||||||
}
|
|
||||||
|
|
||||||
const tiny_rom_entry *virgedx_pci_device::device_rom_region() const
|
const tiny_rom_entry *virgedx_pci_device::device_rom_region() const
|
||||||
{
|
{
|
||||||
return ROM_NAME( virgedx_pci );
|
return ROM_NAME( virgedx_pci );
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINE_DEVICE_TYPE(VIRGE_PCI, virge_pci_device, "virge_pci", "S3 86C325 ViRGE")
|
|
||||||
DEFINE_DEVICE_TYPE(VIRGEDX_PCI, virgedx_pci_device, "virgedx_pci", "S3 86C375 ViRGE/DX")
|
|
||||||
//VIRGEGX_PCI, /DX with SGRAM/SDRAM support
|
|
||||||
|
@ -66,6 +66,27 @@ private:
|
|||||||
u32 get_vga_linear_address();
|
u32 get_vga_linear_address();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class virgevx_pci_device : public virge_pci_device
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
template <typename T>
|
||||||
|
virgevx_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag)
|
||||||
|
: virgevx_pci_device(mconfig, tag, owner, clock)
|
||||||
|
{
|
||||||
|
set_screen_tag(std::forward<T>(screen_tag));
|
||||||
|
}
|
||||||
|
virgevx_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void device_start() override ATTR_COLD;
|
||||||
|
virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
|
||||||
|
virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;
|
||||||
|
|
||||||
|
// required_device<s3virge_vga_device> m_vga;
|
||||||
|
// required_memory_region m_bios;
|
||||||
|
// optional_device<screen_device> m_screen;
|
||||||
|
};
|
||||||
|
|
||||||
class virgedx_pci_device : public virge_pci_device
|
class virgedx_pci_device : public virge_pci_device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -88,6 +109,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
DECLARE_DEVICE_TYPE(VIRGE_PCI, virge_pci_device)
|
DECLARE_DEVICE_TYPE(VIRGE_PCI, virge_pci_device)
|
||||||
|
DECLARE_DEVICE_TYPE(VIRGEVX_PCI, virgevx_pci_device)
|
||||||
DECLARE_DEVICE_TYPE(VIRGEDX_PCI, virgedx_pci_device)
|
DECLARE_DEVICE_TYPE(VIRGEDX_PCI, virgedx_pci_device)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
* - Fix PLL calculation for 1k+ width VESA modes (tends to either be too fast or too slow);
|
* - Fix PLL calculation for 1k+ width VESA modes (tends to either be too fast or too slow);
|
||||||
* - 1600x1200x4 needs line compare fix in downstream pc_vga (cuts too early);
|
* - 1600x1200x4 needs line compare fix in downstream pc_vga (cuts too early);
|
||||||
* - 1280x1024x16 draws 256 H and stupid high refresh rate;
|
* - 1280x1024x16 draws 256 H and stupid high refresh rate;
|
||||||
|
* - virgevx: stub, uses a beefier RAMDAC (can do up to 1600x1200x16 / 1280x1024x24)
|
||||||
*
|
*
|
||||||
* Notes:
|
* Notes:
|
||||||
* - Most Windows s3dsdk demos starts in software render (at least with win98se base S3 drivers,
|
* - Most Windows s3dsdk demos starts in software render (at least with win98se base S3 drivers,
|
||||||
@ -58,6 +59,7 @@
|
|||||||
#define CRTC_PORT_ADDR ((vga.miscellaneous_output & 1) ? 0x3d0 : 0x3b0)
|
#define CRTC_PORT_ADDR ((vga.miscellaneous_output & 1) ? 0x3d0 : 0x3b0)
|
||||||
|
|
||||||
DEFINE_DEVICE_TYPE(S3VIRGE, s3virge_vga_device, "virge_vga", "S3 86C325 VGA core")
|
DEFINE_DEVICE_TYPE(S3VIRGE, s3virge_vga_device, "virge_vga", "S3 86C325 VGA core")
|
||||||
|
DEFINE_DEVICE_TYPE(S3VIRGEVX, s3virgevx_vga_device, "virgevx_vga", "S3 86C988 VGA core")
|
||||||
DEFINE_DEVICE_TYPE(S3VIRGEDX, s3virgedx_vga_device, "virgedx_vga", "S3 86C375 VGA core")
|
DEFINE_DEVICE_TYPE(S3VIRGEDX, s3virgedx_vga_device, "virgedx_vga", "S3 86C375 VGA core")
|
||||||
DEFINE_DEVICE_TYPE(S3VIRGEDX1, s3virgedx_rev1_vga_device, "virgedx_vga_r1", "S3 86C375 (rev 1) VGA core")
|
DEFINE_DEVICE_TYPE(S3VIRGEDX1, s3virgedx_rev1_vga_device, "virgedx_vga_r1", "S3 86C375 (rev 1) VGA core")
|
||||||
|
|
||||||
@ -74,6 +76,13 @@ s3virge_vga_device::s3virge_vga_device(const machine_config &mconfig, device_typ
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s3virgevx_vga_device::s3virgevx_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
|
: s3virge_vga_device(mconfig, S3VIRGEVX, tag, owner, clock)
|
||||||
|
{
|
||||||
|
m_crtc_space_config = address_space_config("crtc_regs", ENDIANNESS_LITTLE, 8, 8, 0, address_map_constructor(FUNC(s3virgevx_vga_device::crtc_map), this));
|
||||||
|
m_seq_space_config = address_space_config("sequencer_regs", ENDIANNESS_LITTLE, 8, 8, 0, address_map_constructor(FUNC(s3virgevx_vga_device::sequencer_map), this));
|
||||||
|
}
|
||||||
|
|
||||||
s3virgedx_vga_device::s3virgedx_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
s3virgedx_vga_device::s3virgedx_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
: s3virgedx_vga_device(mconfig, S3VIRGEDX, tag, owner, clock)
|
: s3virgedx_vga_device(mconfig, S3VIRGEDX, tag, owner, clock)
|
||||||
{
|
{
|
||||||
@ -139,6 +148,17 @@ void s3virge_vga_device::device_start()
|
|||||||
s3.id_cr30 = 0xe1; // CR30
|
s3.id_cr30 = 0xe1; // CR30
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void s3virgevx_vga_device::device_start()
|
||||||
|
{
|
||||||
|
s3virge_vga_device::device_start();
|
||||||
|
|
||||||
|
// set device ID
|
||||||
|
s3.id_high = 0x88; // CR2D
|
||||||
|
s3.id_low = 0x3d; // CR2E
|
||||||
|
s3.revision = 0x00; // CR2F (value unknown)
|
||||||
|
s3.id_cr30 = 0xe1; // CR30
|
||||||
|
}
|
||||||
|
|
||||||
void s3virgedx_vga_device::device_start()
|
void s3virgedx_vga_device::device_start()
|
||||||
{
|
{
|
||||||
s3virge_vga_device::device_start();
|
s3virge_vga_device::device_start();
|
||||||
@ -190,6 +210,13 @@ void s3virge_vga_device::device_reset()
|
|||||||
s3d_reset();
|
s3d_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void s3virgevx_vga_device::device_reset()
|
||||||
|
{
|
||||||
|
s3virge_vga_device::device_reset();
|
||||||
|
// TODO: unverified
|
||||||
|
s3.strapping = 0x000f0912;
|
||||||
|
}
|
||||||
|
|
||||||
void s3virgedx_vga_device::device_reset()
|
void s3virgedx_vga_device::device_reset()
|
||||||
{
|
{
|
||||||
s3virge_vga_device::device_reset();
|
s3virge_vga_device::device_reset();
|
||||||
@ -430,6 +457,8 @@ void s3virge_vga_device::s3_define_video_mode()
|
|||||||
svga.rgb16_en = 0;
|
svga.rgb16_en = 0;
|
||||||
svga.rgb24_en = 0;
|
svga.rgb24_en = 0;
|
||||||
svga.rgb32_en = 0;
|
svga.rgb32_en = 0;
|
||||||
|
// TODO: virgevx has upgraded RAMDAC
|
||||||
|
// (overhauls color modes for accomodating 1600x1200 resolutions)
|
||||||
switch((s3.ext_misc_ctrl_2) >> 4)
|
switch((s3.ext_misc_ctrl_2) >> 4)
|
||||||
{
|
{
|
||||||
case 0x01: svga.rgb8_en = 1; break;
|
case 0x01: svga.rgb8_en = 1; break;
|
||||||
|
@ -195,6 +195,21 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// ======================> s3virgevx_vga_device
|
||||||
|
|
||||||
|
class s3virgevx_vga_device : public s3virge_vga_device
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
s3virgevx_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// s3virgevx_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
|
virtual void device_start() override ATTR_COLD;
|
||||||
|
virtual void device_reset() override ATTR_COLD;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// ======================> s3virgedx_vga_device
|
// ======================> s3virgedx_vga_device
|
||||||
|
|
||||||
class s3virgedx_vga_device : public s3virge_vga_device
|
class s3virgedx_vga_device : public s3virge_vga_device
|
||||||
@ -211,7 +226,7 @@ protected:
|
|||||||
virtual void device_reset() override ATTR_COLD;
|
virtual void device_reset() override ATTR_COLD;
|
||||||
};
|
};
|
||||||
|
|
||||||
// ======================> s3virgedx_vga_device
|
// ======================> s3virgedx_rev1_vga_device
|
||||||
|
|
||||||
class s3virgedx_rev1_vga_device : public s3virgedx_vga_device
|
class s3virgedx_rev1_vga_device : public s3virgedx_vga_device
|
||||||
{
|
{
|
||||||
@ -227,6 +242,7 @@ protected:
|
|||||||
|
|
||||||
// device type definition
|
// device type definition
|
||||||
DECLARE_DEVICE_TYPE(S3VIRGE, s3virge_vga_device)
|
DECLARE_DEVICE_TYPE(S3VIRGE, s3virge_vga_device)
|
||||||
|
DECLARE_DEVICE_TYPE(S3VIRGEVX, s3virgevx_vga_device)
|
||||||
DECLARE_DEVICE_TYPE(S3VIRGEDX, s3virgedx_vga_device)
|
DECLARE_DEVICE_TYPE(S3VIRGEDX, s3virgedx_vga_device)
|
||||||
DECLARE_DEVICE_TYPE(S3VIRGEDX1, s3virgedx_rev1_vga_device)
|
DECLARE_DEVICE_TYPE(S3VIRGEDX1, s3virgedx_rev1_vga_device)
|
||||||
|
|
||||||
|
@ -273,7 +273,7 @@ void przone_state::przone(machine_config &config)
|
|||||||
PCI_SLOT(config, "pci:1", pci_cards, 15, 0, 1, 2, 3, nullptr);
|
PCI_SLOT(config, "pci:1", pci_cards, 15, 0, 1, 2, 3, nullptr);
|
||||||
PCI_SLOT(config, "pci:2", pci_cards, 16, 1, 2, 3, 0, nullptr);
|
PCI_SLOT(config, "pci:2", pci_cards, 16, 1, 2, 3, 0, nullptr);
|
||||||
PCI_SLOT(config, "pci:3", pci_cards, 17, 2, 3, 0, 1, nullptr);
|
PCI_SLOT(config, "pci:3", pci_cards, 17, 2, 3, 0, 1, nullptr);
|
||||||
// TODO: virgevx
|
// TODO: has a stroke with virgevx
|
||||||
PCI_SLOT(config, "pci:4", pci_cards, 18, 3, 0, 1, 2, "virge");
|
PCI_SLOT(config, "pci:4", pci_cards, 18, 3, 0, 1, 2, "virge");
|
||||||
|
|
||||||
ISA16_SLOT(config, "board4", 0, "pci:07.0:isabus", isa_internal_devices, "fdc37c93x", true).set_option_machine_config("fdc37c93x", smc_superio_config);
|
ISA16_SLOT(config, "board4", 0, "pci:07.0:isabus", isa_internal_devices, "fdc37c93x", true).set_option_machine_config("fdc37c93x", smc_superio_config);
|
||||||
|
Loading…
Reference in New Issue
Block a user