summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author angelosa <salese_corp_ltd@email.it>2018-01-29 15:48:01 +0100
committer angelosa <salese_corp_ltd@email.it>2018-01-29 15:50:14 +0100
commit062db0b875810100d85c840ad7c41e055aa376b2 (patch)
tree4e14f719d10d28418cc3bb4f2418c7b0dafdf75d
parent0bb0f5baa9cf1f30ccd8a6cd4cc7dc9ff4e9ccef (diff)
photoply.cpp: Added Cirrus Logic GD5446 VGA PCI device, now shows some legacy BIOS error (presumably needs PCI support to properly boot) [Angelo Salese]
-rw-r--r--src/devices/video/clgd542x.cpp13
-rw-r--r--src/devices/video/clgd542x.h11
-rw-r--r--src/mame/drivers/photoply.cpp26
3 files changed, 43 insertions, 7 deletions
diff --git a/src/devices/video/clgd542x.cpp b/src/devices/video/clgd542x.cpp
index 9897675ac09..fa3dd3c67f7 100644
--- a/src/devices/video/clgd542x.cpp
+++ b/src/devices/video/clgd542x.cpp
@@ -43,6 +43,7 @@
DEFINE_DEVICE_TYPE(CIRRUS_GD5428, cirrus_gd5428_device, "clgd5428", "Cirrus Logic GD5428")
DEFINE_DEVICE_TYPE(CIRRUS_GD5430, cirrus_gd5430_device, "clgd5430", "Cirrus Logic GD5430")
+DEFINE_DEVICE_TYPE(CIRRUS_GD5446, cirrus_gd5446_device, "clgd5446", "Cirrus Logic GD5446")
cirrus_gd5428_device::cirrus_gd5428_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
@@ -60,6 +61,11 @@ cirrus_gd5430_device::cirrus_gd5430_device(const machine_config &mconfig, const
{
}
+cirrus_gd5446_device::cirrus_gd5446_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : cirrus_gd5428_device(mconfig, CIRRUS_GD5446, tag, owner, clock)
+{
+}
+
void cirrus_gd5428_device::device_start()
{
zero();
@@ -96,6 +102,13 @@ void cirrus_gd5430_device::device_start()
m_chip_id = 0xa0; // GD5430 - Rev 0
}
+void cirrus_gd5446_device::device_start()
+{
+ cirrus_gd5428_device::device_start();
+ m_chip_id = 0x80 | 0x39; // GD5446
+}
+
+
void cirrus_gd5428_device::device_reset()
{
vga_device::device_reset();
diff --git a/src/devices/video/clgd542x.h b/src/devices/video/clgd542x.h
index a6bad5716ec..a54acb7460d 100644
--- a/src/devices/video/clgd542x.h
+++ b/src/devices/video/clgd542x.h
@@ -117,8 +117,19 @@ protected:
virtual void device_start() override;
};
+class cirrus_gd5446_device : public cirrus_gd5428_device
+{
+public:
+ cirrus_gd5446_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+protected:
+ virtual void device_start() override;
+};
+
+
// device type definition
DECLARE_DEVICE_TYPE(CIRRUS_GD5428, cirrus_gd5428_device)
DECLARE_DEVICE_TYPE(CIRRUS_GD5430, cirrus_gd5430_device)
+DECLARE_DEVICE_TYPE(CIRRUS_GD5446, cirrus_gd5446_device)
#endif // MAME_VIDEO_CLGD542X_H
diff --git a/src/mame/drivers/photoply.cpp b/src/mame/drivers/photoply.cpp
index a83a69ed263..84d84ace74c 100644
--- a/src/mame/drivers/photoply.cpp
+++ b/src/mame/drivers/photoply.cpp
@@ -8,6 +8,8 @@ Preliminary driver by Angelo Salese
TODO:
- Puts a FDC error, needs a DASM investigation / work-around.
+- VGA BIOS reports being a Cirrus Logic GD5436 / 5446, it is unknown what exactly this game uses.
+- PCI hookups (no idea about what this uses)
*******************************************************************************************************/
@@ -17,7 +19,7 @@ TODO:
#include "machine/pcshare.h"
#include "machine/pckeybrd.h"
#include "machine/idectrl.h"
-#include "video/pc_vga.h"
+#include "video/clgd542x.h"
class photoply_state : public pcat_base_state
{
@@ -27,7 +29,6 @@ public:
{
}
- uint8_t m_vga_address;
DECLARE_DRIVER_INIT(photoply);
virtual void machine_start() override;
@@ -38,7 +39,7 @@ public:
static ADDRESS_MAP_START( photoply_map, AS_PROGRAM, 32, photoply_state )
AM_RANGE(0x00000000, 0x0009ffff) AM_RAM
- AM_RANGE(0x000a0000, 0x000bffff) AM_DEVREADWRITE8("vga", vga_device, mem_r, mem_w, 0xffffffff) // VGA RAM
+ AM_RANGE(0x000a0000, 0x000bffff) AM_DEVREADWRITE8("vga", cirrus_gd5446_device, mem_r, mem_w, 0xffffffff)
AM_RANGE(0x000c0000, 0x000c7fff) AM_RAM AM_REGION("video_bios", 0) //???
AM_RANGE(0x000c8000, 0x000cffff) AM_RAM AM_REGION("video_bios", 0)
AM_RANGE(0x000d0000, 0x000dffff) AM_RAM AM_REGION("ex_bios", 0)
@@ -55,10 +56,14 @@ static ADDRESS_MAP_START( photoply_io, AS_IO, 32, photoply_state )
AM_RANGE(0x0278, 0x027f) AM_RAM //parallel port 2
AM_RANGE(0x0378, 0x037f) AM_RAM //parallel port
//AM_RANGE(0x03bc, 0x03bf) AM_RAM //parallel port 3
- 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", cirrus_gd5446_device, port_03b0_r, port_03b0_w, 0xffffffff)
+ AM_RANGE(0x03c0, 0x03cf) AM_DEVREADWRITE8("vga", cirrus_gd5446_device, port_03c0_r, port_03c0_w, 0xffffffff)
+ AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE8("vga", cirrus_gd5446_device, port_03d0_r, port_03d0_w, 0xffffffff)
+
AM_RANGE(0x03f0, 0x03f7) AM_DEVREADWRITE16("ide", ide_controller_device, read_cs1, write_cs1, 0xffffffff)
+
+ AM_RANGE(0x0cf8, 0x0cff) AM_DEVREADWRITE("pcibus", pci_bus_legacy_device, read, write)
+
ADDRESS_MAP_END
#define AT_KEYB_HELPER(bit, text, key1) \
@@ -129,7 +134,14 @@ MACHINE_CONFIG_START(photoply_state::photoply)
MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir6_w))
- MCFG_FRAGMENT_ADD( pcvideo_vga )
+ MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
+
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_RAW_PARAMS(XTAL(25'174'800),900,0,640,526,0,480)
+ MCFG_SCREEN_UPDATE_DEVICE("vga", cirrus_gd5446_device, screen_update)
+
+ MCFG_PALETTE_ADD("palette", 0x100)
+ MCFG_DEVICE_ADD("vga", CIRRUS_GD5446, 0)
MACHINE_CONFIG_END