trident: small WIP

This commit is contained in:
mahlemiut 2014-10-03 22:28:17 +00:00
parent 64f73d0985
commit ea926721e5
3 changed files with 16 additions and 11 deletions

View File

@ -60,7 +60,7 @@ const rom_entry *isa8_svga_tgui9680_device::device_rom_region() const
//-------------------------------------------------
isa8_svga_tgui9680_device::isa8_svga_tgui9680_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, ISA8_SVGA_TGUI9680, "Trident TGUI9680 Graphics Card", tag, owner, clock, "tgui9680", __FILE__),
device_t(mconfig, ISA8_SVGA_TGUI9680, "Trident TGUI9680 Graphics Card (BIOS X5.5 (02) 02/13/96)", tag, owner, clock, "tgui9680", __FILE__),
device_isa8_card_interface(mconfig, *this)
{
}
@ -89,6 +89,9 @@ void isa8_svga_tgui9680_device::device_start()
// uncomment to test Windows 3.1 TGUI9440AGi driver
// m_isa->install_memory(0x4400000, 0x45fffff, 0, 0, read8_delegate(FUNC(trident_vga_device::vram_r),m_vga), write8_delegate(FUNC(trident_vga_device::vram_w),m_vga));
// win95 drivers
m_isa->install_memory(0x4000000, 0x41fffff, 0, 0, read8_delegate(FUNC(trident_vga_device::vram_r),m_vga), write8_delegate(FUNC(trident_vga_device::vram_w),m_vga));
// acceleration ports
m_isa->install_device(0x2120, 0x21ff, 0, 0, read8_delegate(FUNC(trident_vga_device::accel_r),m_vga), write8_delegate(FUNC(trident_vga_device::accel_w),m_vga));
}

View File

@ -346,7 +346,6 @@ void trident_vga_device::trident_define_video_mode()
case 3: xtal = xtal / 1.5; break;
}
// TODO: determine when 8 bit modes are selected
svga.rgb8_en = svga.rgb15_en = svga.rgb16_en = svga.rgb32_en = 0;
switch((tri.pixel_depth & 0x0c) >> 2)
{
@ -377,7 +376,6 @@ UINT8 trident_vga_device::trident_seq_reg_read(UINT8 index)
case 0x0b:
res = svga.id;
tri.new_mode = true;
//debugger_break(machine());
break;
case 0x0c: // Power Up Mode register 1
res = tri.sr0c & 0xef;
@ -932,18 +930,20 @@ WRITE8_MEMBER(trident_vga_device::port_43c6_w)
}
}
// Trident refers to these registers as a LUTDAC
// Not much else is known. XFree86 uses register 4 for something related to DPMS
READ8_MEMBER(trident_vga_device::port_83c6_r)
{
UINT8 res = 0xff;
switch(offset)
{
case 2:
res = port_03c0_r(space,5,mem_mask);
if(LOG) logerror("Trident: 83c6 read %02x\n",res);
res = tri.lutdac_reg[tri.lutdac_index];
if(LOG) logerror("Trident: LUTDAC reg read %02x\n",res);
break;
case 4:
res = vga.sequencer.index;
if(LOG) logerror("Trident: 83c8 seq read %02x\n",res);
res = tri.lutdac_index;
if(LOG) logerror("Trident: LUTDAC index read %02x\n",res);
break;
}
return res;
@ -954,12 +954,12 @@ WRITE8_MEMBER(trident_vga_device::port_83c6_w)
switch(offset)
{
case 2:
if(LOG) logerror("Trident: 83c6 seq write %02x\n",data);
port_03c0_w(space,5,data,mem_mask);
if(LOG) logerror("Trident: LUTDAC reg write %02x\n",data);
tri.lutdac_reg[tri.lutdac_index] = data;
break;
case 4:
if(LOG) logerror("Trident: 83c8 seq index write %02x\n",data);
vga.sequencer.index = data;
if(LOG) logerror("Trident: LUTDAC index write %02x\n",data);
tri.lutdac_index = data;
break;
}
}

View File

@ -56,6 +56,8 @@ protected:
UINT8 cr29;
UINT8 cr39;
UINT8 dac;
UINT8 lutdac_reg[0x100];
UINT8 lutdac_index;
bool new_mode;
bool port_3c3;
UINT8 clock;