summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2016-03-16 16:44:53 -0500
committer cracyc <cracyc@users.noreply.github.com>2016-03-16 16:45:33 -0500
commit804fa20d56f5fc1019da249d24acb63233e30bf0 (patch)
treea7465de03b255a99ceef6da6cfc989e83560ea0e
parent59a41ff1d793b64277f00021f51499060aa2c986 (diff)
pcat_dyn: make post text screen work with trident (nw)
-rw-r--r--src/devices/bus/isa/trident.cpp6
-rw-r--r--src/devices/machine/atapicdr.cpp12
-rw-r--r--src/devices/machine/atapicdr.h1
-rw-r--r--src/mame/drivers/pcat_dyn.cpp12
4 files changed, 19 insertions, 12 deletions
diff --git a/src/devices/bus/isa/trident.cpp b/src/devices/bus/isa/trident.cpp
index 4f47bdd7212..85b83d968cc 100644
--- a/src/devices/bus/isa/trident.cpp
+++ b/src/devices/bus/isa/trident.cpp
@@ -191,6 +191,7 @@ void trident_vga_device::device_reset()
// Windows 3.1 TGUI9440AGi drivers do not set the pointer colour registers?
tri.cursor_bg = 0x00000000;
tri.cursor_fg = 0xffffffff;
+ tri.pixel_depth = 0x10; //disable 8bpp mode by default
}
UINT32 trident_vga_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
@@ -443,7 +444,6 @@ void trident_vga_device::trident_seq_reg_write(UINT8 index, UINT8 data)
}
else
{
- if(LOG) logerror("Trident SR%02X: %s mode write %02x\n",index,tri.new_mode ? "new" : "old",data);
switch(index)
{
case 0x0b:
@@ -490,6 +490,7 @@ void trident_vga_device::trident_seq_reg_write(UINT8 index, UINT8 data)
if(!LOG) logerror("Trident: Sequencer index %02x read\n",index);
}
}
+ if(LOG) logerror("Trident SR%02X: %s mode write %02x\n",index,tri.new_mode ? "new" : "old",data);
}
UINT8 trident_vga_device::trident_crtc_reg_read(UINT8 index)
@@ -605,7 +606,6 @@ void trident_vga_device::trident_crtc_reg_write(UINT8 index, UINT8 data)
}
else
{
- if(LOG) logerror("Trident CR%02X: write %02x\n",index,data);
switch(index)
{
case 0x1e: // Module Testing Register
@@ -704,6 +704,7 @@ void trident_vga_device::trident_crtc_reg_write(UINT8 index, UINT8 data)
break;
}
}
+ if(LOG) logerror("Trident CR%02X: write %02x\n",index,data);
}
UINT8 trident_vga_device::trident_gc_reg_read(UINT8 index)
@@ -764,6 +765,7 @@ void trident_vga_device::trident_gc_reg_write(UINT8 index, UINT8 data)
break;
}
}
+ if(LOG) logerror("Trident GC%02X: write %02x\n",index,data);
}
READ8_MEMBER(trident_vga_device::port_03c0_r)
diff --git a/src/devices/machine/atapicdr.cpp b/src/devices/machine/atapicdr.cpp
index 151d8d1bb10..13fd79570dd 100644
--- a/src/devices/machine/atapicdr.cpp
+++ b/src/devices/machine/atapicdr.cpp
@@ -72,11 +72,15 @@ void atapi_cdrom_device::device_start()
m_identify_buffer[ 49 ] = 0x0600; // Word 49=Capabilities, IORDY may be disabled (bit_10), LBA Supported mandatory (bit_9)
- m_media_change = true;
-
atapi_hle_device::device_start();
}
+void atapi_cdrom_device::device_reset()
+{
+ atapi_hle_device::device_reset();
+ m_media_change = true;
+}
+
void atapi_cdrom_device::process_buffer()
{
if(m_cdrom != m_image->get_cdrom_file())
@@ -130,10 +134,10 @@ void atapi_cdrom_device::ExecCommand()
}
break;
case T10SPC_CMD_INQUIRY:
+ break;
case T10SPC_CMD_REQUEST_SENSE:
+ m_media_change = false;
break;
}
t10mmc::ExecCommand();
- if((command[0] == T10SPC_CMD_REQUEST_SENSE) && m_media_change)
- m_media_change = false;
}
diff --git a/src/devices/machine/atapicdr.h b/src/devices/machine/atapicdr.h
index 2c310113c5c..dc5220c000d 100644
--- a/src/devices/machine/atapicdr.h
+++ b/src/devices/machine/atapicdr.h
@@ -28,6 +28,7 @@ public:
protected:
// device-level overrides
virtual void device_start() override;
+ virtual void device_reset() override;
virtual machine_config_constructor device_mconfig_additions() const override;
virtual void perform_diagnostic() override;
diff --git a/src/mame/drivers/pcat_dyn.cpp b/src/mame/drivers/pcat_dyn.cpp
index 00b1a7df54d..baaa94626ee 100644
--- a/src/mame/drivers/pcat_dyn.cpp
+++ b/src/mame/drivers/pcat_dyn.cpp
@@ -23,7 +23,7 @@ If the output isn't satisfactory, it prints "I/O BOARD FAILURE".
#include "emu.h"
#include "cpu/i386/i386.h"
#include "machine/pcshare.h"
-#include "video/pc_vga.h"
+#include "bus/isa/trident.h"
#include "machine/bankdev.h"
#include "machine/ds128x.h"
#include "machine/ins8250.h"
@@ -56,7 +56,7 @@ WRITE8_MEMBER(pcat_dyn_state::bank2_w)
static ADDRESS_MAP_START( pcat_map, AS_PROGRAM, 32, pcat_dyn_state )
AM_RANGE(0x00000000, 0x0009ffff) AM_RAM
- AM_RANGE(0x000a0000, 0x000bffff) AM_DEVREADWRITE8("vga", vga_device, mem_r, mem_w, 0xffffffff)
+ AM_RANGE(0x000a0000, 0x000bffff) AM_DEVREADWRITE8("vga", trident_vga_device, mem_r, mem_w, 0xffffffff)
AM_RANGE(0x000c0000, 0x000c7fff) AM_ROM AM_REGION("video_bios", 0)
AM_RANGE(0x000d0000, 0x000d0fff) AM_ROM AM_REGION("game_prg", 0x0000) AM_WRITE8(bank1_w, 0xffffffff)
AM_RANGE(0x000d1000, 0x000d1fff) AM_ROM AM_REGION("game_prg", 0x1000) AM_WRITE8(bank2_w, 0xffffffff)
@@ -70,9 +70,9 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( pcat_io, AS_IO, 32, pcat_dyn_state )
AM_IMPORT_FROM(pcat32_io_common)
- AM_RANGE(0x03b0, 0x03bf) AM_DEVREADWRITE8("vga", vga_device, port_03b0_r, port_03b0_w, 0xffffffff)
- AM_RANGE(0x03c0, 0x03cf) AM_DEVREADWRITE8("vga", vga_device, port_03c0_r, port_03c0_w, 0xffffffff)
- AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE8("vga", vga_device, port_03d0_r, port_03d0_w, 0xffffffff)
+ AM_RANGE(0x03b0, 0x03bf) AM_DEVREADWRITE8("vga", trident_vga_device, port_03b0_r, port_03b0_w, 0xffffffff)
+ AM_RANGE(0x03c0, 0x03cf) AM_DEVREADWRITE8("vga", trident_vga_device, port_03c0_r, port_03c0_w, 0xffffffff)
+ AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE8("vga", trident_vga_device, port_03d0_r, port_03d0_w, 0xffffffff)
AM_RANGE(0x03f8, 0x03ff) AM_DEVREADWRITE8("ns16550", ns16550_device, ins8250_r, ins8250_w, 0xffffffff)
ADDRESS_MAP_END
@@ -126,7 +126,7 @@ static MACHINE_CONFIG_START( pcat_dyn, pcat_dyn_state )
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259_1", pic8259_device, inta_cb)
/* video hardware */
- MCFG_FRAGMENT_ADD( pcvideo_vga )
+ MCFG_FRAGMENT_ADD( pcvideo_trident_vga )
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_REFRESH_RATE(60)