(MESS) cbm2: HRG cartridge WIP. (nw)

This commit is contained in:
Curt Coder 2014-01-08 15:39:28 +00:00
parent 2777a10ec5
commit 395af5982e
4 changed files with 82 additions and 49 deletions

View File

@ -71,18 +71,4 @@
</part>
</software>
<software name="graphic">
<description>High Resolution Graphics</description>
<year>198?</year>
<publisher>Commodore</publisher>
<part name="cart" interface="cbm2_cart">
<feature name="slot" value="graphic" />
<dataarea name="bank3" size="0x2000">
<rom name="324688-01.bin" size="0x2000" crc="863e9ef8" sha1="d75ffa97b2dd4e1baefe4acaa130daae866ab0e8" offset="0" />
</dataarea>
</part>
</software>
</softwarelist>

View File

@ -203,6 +203,7 @@ void cbm2_expansion_slot_device::write(address_space &space, offs_t offset, UINT
SLOT_INTERFACE_START( cbm2_expansion_cards )
SLOT_INTERFACE("24k", CBM2_24K)
SLOT_INTERFACE("hrga", CBM2_HRG_A)
SLOT_INTERFACE("hrgb", CBM2_HRG_B)
SLOT_INTERFACE_INTERNAL("standard", CBM2_STD)
SLOT_INTERFACE_INTERNAL("graphic", CBM2_GRAPHIC)
SLOT_INTERFACE_END

View File

@ -13,6 +13,8 @@
TODO:
http://www.wfking.de/hires.htm
- version A (EF9365, 512x512 interlaced, 1 page)
- version B (EF9366, 512x256 non-interlaced, 2 pages)
@ -36,24 +38,35 @@
// DEVICE DEFINITIONS
//**************************************************************************
const device_type CBM2_GRAPHIC = &device_creator<cbm2_graphic_cartridge_device>;
const device_type CBM2_HRG_A = &device_creator<cbm2_graphic_cartridge_a_device>;
const device_type CBM2_HRG_B = &device_creator<cbm2_graphic_cartridge_b_device>;
//-------------------------------------------------
// ef9365_interface gdp_intf
// ROM( cbm2_hrg )
//-------------------------------------------------
/*
static const ef9365_interface gdp_intf =
ROM_START( cbm2_hrg )
ROM_REGION( 0x2000, "bank3", 0 )
ROM_LOAD( "324688-01 sw gr 600.bin", 0x0000, 0x2000, CRC(863e9ef8) SHA1(d75ffa97b2dd4e1baefe4acaa130daae866ab0e8) )
ROM_END
//-------------------------------------------------
// rom_region - device-specific ROM region
//-------------------------------------------------
const rom_entry *cbm2_graphic_cartridge_device::device_rom_region() const
{
SCREEN_TAG
};
*/
return ROM_NAME( cbm2_hrg );
}
//-------------------------------------------------
// MACHINE_CONFIG_FRAGMENT( cbm2_graphic_a )
// MACHINE_CONFIG_FRAGMENT( cbm2_hrg_a )
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( cbm2_graphic_a )
static MACHINE_CONFIG_FRAGMENT( cbm2_hrg_a )
/* MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
MCFG_SCREEN_UPDATE_DEVICE(EF9365_TAG, ef9365_device, screen_update)
MCFG_SCREEN_SIZE(512, 512)
@ -66,10 +79,10 @@ MACHINE_CONFIG_END
//-------------------------------------------------
// MACHINE_CONFIG_FRAGMENT( cbm2_graphic_b )
// MACHINE_CONFIG_FRAGMENT( cbm2_hrg_b )
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( cbm2_graphic_b )
static MACHINE_CONFIG_FRAGMENT( cbm2_hrg_b )
/* MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
MCFG_SCREEN_UPDATE_DEVICE(EF9366_TAG, ef9366_device, screen_update)
MCFG_SCREEN_SIZE(512, 256)
@ -86,13 +99,14 @@ MACHINE_CONFIG_END
// machine configurations
//-------------------------------------------------
machine_config_constructor cbm2_graphic_cartridge_device::device_mconfig_additions() const
machine_config_constructor cbm2_graphic_cartridge_a_device::device_mconfig_additions() const
{
switch (m_variant)
{
default: return MACHINE_CONFIG_NAME( cbm2_graphic_a );
case TYPE_B: return MACHINE_CONFIG_NAME( cbm2_graphic_b );
}
return MACHINE_CONFIG_NAME( cbm2_hrg_a );
}
machine_config_constructor cbm2_graphic_cartridge_b_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( cbm2_hrg_b );
}
@ -105,11 +119,22 @@ machine_config_constructor cbm2_graphic_cartridge_device::device_mconfig_additio
// cbm2_graphic_cartridge_device - constructor
//-------------------------------------------------
cbm2_graphic_cartridge_device::cbm2_graphic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, CBM2_GRAPHIC, "CBM 500/600/700 High Resolution Graphics", tag, owner, clock, "cbm2_graphic", __FILE__),
cbm2_graphic_cartridge_device::cbm2_graphic_cartridge_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_cbm2_expansion_card_interface(mconfig, *this),
//m_gdc(*this, EF9365_TAG),
m_variant(TYPE_A)
m_bank3(*this, "bank3")
{
}
cbm2_graphic_cartridge_a_device::cbm2_graphic_cartridge_a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
cbm2_graphic_cartridge_device(mconfig, CBM2_HRG_A, "CBM 500/600/700 High Resolution Graphics (A)", tag, owner, clock, "cbm2_hrg", __FILE__)
//m_gdc(*this, EF9365_TAG)
{
}
cbm2_graphic_cartridge_b_device::cbm2_graphic_cartridge_b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
cbm2_graphic_cartridge_device(mconfig, CBM2_HRG_B, "CBM 500/600/700 High Resolution Graphics (B)", tag, owner, clock, "cbm2_hrg", __FILE__)
//m_gdc(*this, EF9366_TAG)
{
}
@ -143,7 +168,7 @@ UINT8 cbm2_graphic_cartridge_device::cbm2_bd_r(address_space &space, offs_t offs
{
if (offset < 0x7f80)
{
data = m_bank3[offset];
data = m_bank3->base()[offset & 0x1fff];
}
else if (offset == 0x7f90)
{

View File

@ -16,7 +16,6 @@
#include "emu.h"
#include "exp.h"
#include "video/ef9345.h"
@ -27,22 +26,17 @@
// ======================> cbm2_graphic_cartridge_device
class cbm2_graphic_cartridge_device : public device_t,
public device_cbm2_expansion_card_interface
public device_cbm2_expansion_card_interface
{
public:
// construction/destruction
cbm2_graphic_cartridge_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
cbm2_graphic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const;
virtual const rom_entry *device_rom_region() const;
protected:
enum
{
TYPE_A,
TYPE_B
};
// device-level overrides
virtual void device_start();
virtual void device_reset();
@ -52,14 +46,41 @@ protected:
virtual void cbm2_bd_w(address_space &space, offs_t offset, UINT8 data, int csbank1, int csbank2, int csbank3);
private:
//required_device<ef9345_device> m_gdc;
//required_device<ef9365_device> m_gdc;
required_memory_region m_bank3;
};
int m_variant;
// ======================> cbm2_graphic_cartridge_a_device
class cbm2_graphic_cartridge_a_device : public cbm2_graphic_cartridge_device
{
public:
// construction/destruction
cbm2_graphic_cartridge_a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const;
};
// ======================> cbm2_graphic_cartridge_b_device
class cbm2_graphic_cartridge_b_device : public cbm2_graphic_cartridge_device
{
public:
// construction/destruction
cbm2_graphic_cartridge_b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const;
};
// device type definition
extern const device_type CBM2_GRAPHIC;
extern const device_type CBM2_HRG_A;
extern const device_type CBM2_HRG_B;
#endif