photoply.cpp: Added Cirrus Logic GD5446 VGA PCI device, now shows some legacy BIOS error (presumably needs PCI support to properly boot) [Angelo Salese]

This commit is contained in:
angelosa 2018-01-29 15:48:01 +01:00
parent 0bb0f5baa9
commit 062db0b875
3 changed files with 43 additions and 7 deletions

View File

@ -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();

View File

@ -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

View File

@ -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