summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/isa/mach32.cpp
diff options
context:
space:
mode:
author mahlemiut <bsr@xnet.co.nz>2018-01-02 11:30:28 +1300
committer mahlemiut <bsr@xnet.co.nz>2018-01-02 11:37:35 +1300
commit00c39c7dd5200f53b6b19ea996df172a2f68a2e0 (patch)
tree0572d06a24c420f9b99010e99c41c0eec9683c5e /src/devices/bus/isa/mach32.cpp
parentc527f0bd3c5bec4c5dc607a7f0e5d58dd01aaf48 (diff)
Some PC AT 2D accelerator updates:
- s3: Hardware pointer colour select is now reset on reading CR45, as per documentation. - mach8/mach32: limit sourcex/y to 11 bits, fixes mach32 detection in bundled win9x drivers. - mach32: mapped hardware pointer registers - mach32: added 8514/A compatible DAC registers, fixes I/O port conflict in DOS mach32 utilities, and 8ppp colours under win9x.
Diffstat (limited to 'src/devices/bus/isa/mach32.cpp')
-rw-r--r--src/devices/bus/isa/mach32.cpp89
1 files changed, 85 insertions, 4 deletions
diff --git a/src/devices/bus/isa/mach32.cpp b/src/devices/bus/isa/mach32.cpp
index 328072ca7a9..ecad0a425a0 100644
--- a/src/devices/bus/isa/mach32.cpp
+++ b/src/devices/bus/isa/mach32.cpp
@@ -14,7 +14,6 @@
#include "screen.h"
-
DEFINE_DEVICE_TYPE(ATIMACH32, mach32_device, "mach32", "ATi mach32")
DEFINE_DEVICE_TYPE(ATIMACH32_8514A, mach32_8514a_device, "mach32_8514a", "ATi mach32 (2D acceleration module)")
DEFINE_DEVICE_TYPE(ATIMACH64, mach64_device, "mach64", "ATi mach64")
@@ -55,7 +54,7 @@ MACHINE_CONFIG_END
void mach32_8514a_device::device_config_complete()
{
- m_vga = dynamic_cast<vga_device*>(owner());
+ m_vga = dynamic_cast<svga_device*>(owner());
}
void mach32_8514a_device::device_start()
@@ -65,10 +64,91 @@ void mach32_8514a_device::device_start()
// 177h 68800-LX
// 2F7h 68800-6
// The 68800-3 appears to return 0 for this field (undocumented)
- m_chip_ID = 0x000;
+ m_chip_ID = 0x17;
m_membounds = 0;
}
+// Configuration Status Register 1 (read only)
+// bit 0: Disable VGA: 0=VGA+8514/A, 1=8514/A only
+// bits 1-3: Bus Type: 0=16-bit ISA. 1=EISA, 2=16-bit MCA, 3=32-bit MCA, 4=LBus 386SX
+// 5=LBus 386DX, 6=LBus 486. 7=PCI
+// bits 4-6: RAM Type: 3=256Kx16 DRAM
+// bit 7: Chip Disable
+// bit 8: TST_VCTR_ENA: 1=delay memory write by 1/2 MCLK to test vector generation
+// bits 9-11: DAC Type: 0=ATI68830, 1=SC11483, 2=ATI68875, 3=Bt476, 4=Bt481, 5=ATI68860 (68800AX or higher)
+// The Graphics Ultra Pro has an ATI68875
+// bit 12: Enable internal uC address decode
+// bit 13-15: Card ID: ID when using multiple controllers
+READ16_MEMBER(mach32_8514a_device::mach32_config1_r)
+{
+ return 0x0430; // enable VGA, 16-bit ISA, 256Kx16 DRAM, ATI68875
+}
+
+// mach32 Hardware Pointer
+WRITE16_MEMBER(mach32_8514a_device::mach32_cursor_l_w)
+{
+ if(offset == 1)
+ m_cursor_address = (m_cursor_address & 0xf0000) | data;
+}
+
+WRITE16_MEMBER(mach32_8514a_device::mach32_cursor_h_w)
+{
+ if(offset == 1)
+ {
+ m_cursor_address = (m_cursor_address & 0x0ffff) | ((data & 0x000f) << 16);
+ m_cursor_enable = data & 0x8000;
+ if(m_cursor_enable) popmessage("mach32 Hardware Cursor enabled");
+ }
+}
+
+WRITE16_MEMBER(mach32_8514a_device::mach32_cursor_pos_h)
+{
+ if(offset == 1)
+ m_cursor_horizontal = data & 0x07ff;
+}
+
+WRITE16_MEMBER(mach32_8514a_device::mach32_cursor_pos_v)
+{
+ if(offset == 1)
+ m_cursor_vertical = data & 0x0fff;
+}
+
+WRITE16_MEMBER(mach32_8514a_device::mach32_cursor_colour_b_w)
+{
+ if(offset == 1)
+ {
+ m_cursor_colour0_b = data & 0xff;
+ m_cursor_colour1_b = data >> 8;
+ }
+}
+
+WRITE16_MEMBER(mach32_8514a_device::mach32_cursor_colour_0_w)
+{
+ if(offset == 1)
+ {
+ m_cursor_colour0_g = data & 0xff;
+ m_cursor_colour0_r = data >> 8;
+ }
+}
+
+WRITE16_MEMBER(mach32_8514a_device::mach32_cursor_colour_1_w)
+{
+ if(offset == 1)
+ {
+ m_cursor_colour1_g = data & 0xff;
+ m_cursor_colour1_r = data >> 8;
+ }
+}
+
+WRITE16_MEMBER(mach32_8514a_device::mach32_cursor_offset_w)
+{
+ if(offset == 1)
+ {
+ m_cursor_horizontal = data & 0x00ff;
+ m_cursor_vertical = data >> 8;
+ }
+}
+
void mach32_8514a_device::device_reset()
{
}
@@ -76,6 +156,7 @@ void mach32_8514a_device::device_reset()
void mach32_device::device_start()
{
ati_vga_device::device_start();
+ ati.vga_chip_id = 0x00; // correct?
}
void mach32_device::device_reset()
@@ -117,7 +198,7 @@ MACHINE_CONFIG_END
void mach64_8514a_device::device_config_complete()
{
- m_vga = dynamic_cast<vga_device*>(owner());
+ m_vga = dynamic_cast<svga_device*>(owner());
}
void mach64_8514a_device::device_start()