s3: added Diamond Stealth 3D 2000 Pro card. [Malice, Barry Rodewald]

This commit is contained in:
mahlemiut 2014-04-26 11:20:04 +00:00
parent bb221d260a
commit 9d9042e639
5 changed files with 160 additions and 2 deletions

View File

@ -88,5 +88,6 @@ SLOT_INTERFACE_START( pc_isa16_cards )
SLOT_INTERFACE("svga_s3", ISA16_SVGA_S3)
SLOT_INTERFACE("s3virge", ISA16_S3VIRGE)
SLOT_INTERFACE("s3virgedx", ISA16_S3VIRGEDX)
SLOT_INTERFACE("dms3d2kp", ISA16_DMS3D2KPRO)
SLOT_INTERFACE("gfxultra", ISA16_VGA_GFXULTRA)
SLOT_INTERFACE_END

View File

@ -16,9 +16,10 @@
const device_type S3VIRGE = &device_creator<s3virge_vga_device>;
const device_type S3VIRGEDX = &device_creator<s3virgedx_vga_device>;
const device_type S3VIRGEDX1 = &device_creator<s3virgedx_rev1_vga_device>;
s3virge_vga_device::s3virge_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: s3_vga_device(mconfig, S3VIRGE, "S3VIRGE", tag, owner, clock, "s3virge_vga", __FILE__)
: s3_vga_device(mconfig, S3VIRGE, "S3 86C325", tag, owner, clock, "virge_vga", __FILE__)
{
}
@ -28,7 +29,17 @@ s3virge_vga_device::s3virge_vga_device(const machine_config &mconfig, device_typ
}
s3virgedx_vga_device::s3virgedx_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: s3virge_vga_device(mconfig, S3VIRGEDX, "S3VIRGEDX", tag, owner, clock, "s3virgedx_vga", __FILE__)
: s3virge_vga_device(mconfig, S3VIRGEDX, "S3 86C375", tag, owner, clock, "virgedx_vga", __FILE__)
{
}
s3virgedx_vga_device::s3virgedx_vga_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: s3virge_vga_device(mconfig, type, name, tag, owner, clock, shortname, source)
{
}
s3virgedx_rev1_vga_device::s3virgedx_rev1_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: s3virgedx_vga_device(mconfig, S3VIRGEDX1, "S3 86C375 (rev 1)", tag, owner, clock, "virgedx_r1", __FILE__)
{
}
@ -83,6 +94,17 @@ void s3virgedx_vga_device::device_start()
s3.id_cr30 = 0xe1; // CR30
}
void s3virgedx_rev1_vga_device::device_start()
{
s3virge_vga_device::device_start();
// set device ID
s3.id_high = 0x8a; // CR2D
s3.id_low = 0x01; // CR2E
s3.revision = 0x01; // CR2F
s3.id_cr30 = 0xe1; // CR30
}
void s3virge_vga_device::device_reset()
{
vga_device::device_reset();
@ -99,6 +121,15 @@ void s3virgedx_vga_device::device_reset()
s3.strapping = 0x000f0912;
}
void s3virgedx_rev1_vga_device::device_reset()
{
vga_device::device_reset();
// Power-on strapping bits. Sampled at reset, but can be modified later.
// These are based on results from a Diamond Stealth 3D 2000 Pro (Virge/DX based)
// bits 8-15 are still unknown, S3ID doesn't show config register 2 (CR37)
s3.strapping = 0x0aff0912;
}
UINT8 s3virge_vga_device::s3_crtc_reg_read(UINT8 index)
{
UINT8 res;

View File

@ -50,6 +50,21 @@ class s3virgedx_vga_device : public s3virge_vga_device
public:
// construction/destruction
s3virgedx_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
s3virgedx_vga_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
protected:
// device-level overrides
virtual void device_start();
virtual void device_reset();
};
// ======================> s3virgedx_vga_device
class s3virgedx_rev1_vga_device : public s3virgedx_vga_device
{
public:
// construction/destruction
s3virgedx_rev1_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
protected:
// device-level overrides
@ -60,5 +75,6 @@ protected:
// device type definition
extern const device_type S3VIRGE;
extern const device_type S3VIRGEDX;
extern const device_type S3VIRGEDX1;
#endif /* S3VIRGE_H_ */

View File

@ -283,3 +283,91 @@ void isa16_s3virgedx_device::device_start()
void isa16_s3virgedx_device::device_reset()
{
}
/*
* Diamond Stealth 3D 2000 Pro
*/
static MACHINE_CONFIG_FRAGMENT( vga_stealth3d2kpro )
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL_25_1748MHz,900,0,640,526,0,480)
MCFG_SCREEN_UPDATE_DEVICE("vga", s3virgedx_rev1_vga_device, screen_update)
MCFG_PALETTE_ADD("palette", 0x100)
MCFG_DEVICE_ADD("vga", S3VIRGEDX1, 0)
MACHINE_CONFIG_END
ROM_START( stealth3d2kpro )
ROM_REGION(0x8000,"stealth3d", 0)
ROM_LOAD("virgedxdiamond.bin", 0x00000, 0x8000, CRC(58b0dcda) SHA1(b13ae6b04db6fc05a76d924ddf2efe150b823029) )
ROM_END
//**************************************************************************
// GLOBAL VARIABLES
//**************************************************************************
const device_type ISA16_DMS3D2KPRO = &device_creator<isa16_stealth3d2kpro_device>;
//-------------------------------------------------
// machine_config_additions - device-specific
// machine configurations
//-------------------------------------------------
machine_config_constructor isa16_stealth3d2kpro_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( vga_stealth3d2kpro );
}
//-------------------------------------------------
// rom_region - device-specific ROM region
//-------------------------------------------------
const rom_entry *isa16_stealth3d2kpro_device::device_rom_region() const
{
return ROM_NAME( stealth3d2kpro );
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// isa16_vga_device - constructor
//-------------------------------------------------
isa16_stealth3d2kpro_device::isa16_stealth3d2kpro_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, ISA16_DMS3D2KPRO, "Diamond Stealth 3D 2000 Pro", tag, owner, clock, "dms3d2kp", __FILE__),
device_isa16_card_interface(mconfig, *this)
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
READ8_MEMBER(isa16_stealth3d2kpro_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
void isa16_stealth3d2kpro_device::device_start()
{
set_isa_device();
m_vga = subdevice<s3virgedx_vga_device>("vga");
m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "svga", "stealth3d");
m_isa->install_device(0x03b0, 0x03bf, 0, 0, read8_delegate(FUNC(s3virge_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03b0_w),m_vga));
m_isa->install_device(0x03c0, 0x03cf, 0, 0, read8_delegate(FUNC(s3virge_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03c0_w),m_vga));
m_isa->install_device(0x03d0, 0x03df, 0, 0, read8_delegate(FUNC(s3virge_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03d0_w),m_vga));
m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(s3virge_vga_device::mem_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::mem_w),m_vga));
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void isa16_stealth3d2kpro_device::device_reset()
{
}

View File

@ -78,10 +78,32 @@ private:
s3virgedx_vga_device *m_vga;
};
class isa16_stealth3d2kpro_device :
public device_t,
public device_isa16_card_interface
{
public:
// construction/destruction
isa16_stealth3d2kpro_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const;
virtual const rom_entry *device_rom_region() const;
DECLARE_READ8_MEMBER(input_port_0_r);
protected:
// device-level overrides
virtual void device_start();
virtual void device_reset();
private:
s3virgedx_vga_device *m_vga;
};
// device type definition
extern const device_type ISA16_SVGA_S3;
extern const device_type ISA16_S3VIRGE;
extern const device_type ISA16_S3VIRGEDX;
extern const device_type ISA16_DMS3D2KPRO;
#endif /* __ISA_VGA_H__ */