mirror of
https://github.com/mamedev/mame.git
synced 2024-11-18 10:06:19 +01:00
[MESS] pet: Added skeleton for the CBM 8000 High Speed Graphics (324402-01) card. (nw)
This commit is contained in:
parent
d47b198686
commit
ad14b5f38d
5 changed files with 373 additions and 0 deletions
|
@ -711,4 +711,22 @@
|
|||
</part>
|
||||
</software>
|
||||
|
||||
<software name="hsgdemo">
|
||||
<description>CBM 8000 High Speed Graphics Demos</description>
|
||||
<year>198?</year>
|
||||
<publisher><unknown></publisher>
|
||||
|
||||
<part name="flop1" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="174848">
|
||||
<rom name="hsg-demos-01.d64" size="174848" crc="203cf196" sha1="465cc52a3a1d26c2c33dbd24a83c77b5c4b407f0" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
|
||||
<part name="flop2" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="1066496">
|
||||
<rom name="hsg-demos-02.d82" size="1066496" crc="769f91cb" sha1="d1b5b8724eb58cd37403ea36765c060c5c2d7e21" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
</softwarelist>
|
||||
|
|
|
@ -646,6 +646,7 @@ BUSOBJS += $(BUSOBJ)/pet/c2n.o
|
|||
BUSOBJS += $(BUSOBJ)/pet/diag264_lb_tape.o
|
||||
BUSOBJS += $(BUSOBJ)/pet/exp.o
|
||||
BUSOBJS += $(BUSOBJ)/pet/64k.o
|
||||
BUSOBJS += $(BUSOBJ)/pet/hsg.o
|
||||
BUSOBJS += $(BUSOBJ)/pet/superpet.o
|
||||
BUSOBJS += $(BUSOBJ)/pet/user.o
|
||||
BUSOBJS += $(BUSOBJ)/pet/diag.o
|
||||
|
|
|
@ -196,9 +196,12 @@ int pet_expansion_slot_device::phi2()
|
|||
|
||||
// slot devices
|
||||
#include "64k.h"
|
||||
#include "hsg.h"
|
||||
#include "superpet.h"
|
||||
|
||||
SLOT_INTERFACE_START( pet_expansion_cards )
|
||||
SLOT_INTERFACE("64k", PET_64K)
|
||||
SLOT_INTERFACE("hsga", CBM8000_HSG_A)
|
||||
SLOT_INTERFACE("hsgb", CBM8000_HSG_B)
|
||||
SLOT_INTERFACE("superpet", SUPERPET)
|
||||
SLOT_INTERFACE_END
|
||||
|
|
261
src/emu/bus/pet/hsg.c
Normal file
261
src/emu/bus/pet/hsg.c
Normal file
|
@ -0,0 +1,261 @@
|
|||
// license:BSD-3-Clause
|
||||
// copyright-holders:Curt Coder
|
||||
/**********************************************************************
|
||||
|
||||
CBM 8000 High Speed Graphics (324402-01) card emulation
|
||||
|
||||
Copyright MESS Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
/*
|
||||
|
||||
TODO:
|
||||
|
||||
http://www.6502.org/users/sjgray/computer/hsg/index.html
|
||||
|
||||
- version A (EF9365, 512x512 interlaced, 1 page)
|
||||
- version B (EF9366, 512x256 non-interlaced, 2 pages)
|
||||
|
||||
*/
|
||||
|
||||
#include "hsg.h"
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// MACROS/CONSTANTS
|
||||
//**************************************************************************
|
||||
|
||||
#define EF9365_TAG "ef9365"
|
||||
#define EF9366_TAG "ef9366"
|
||||
#define SCREEN_TAG "screen"
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type CBM8000_HSG_A = &device_creator<cbm8000_hsg_a_t>;
|
||||
const device_type CBM8000_HSG_B = &device_creator<cbm8000_hsg_b_t>;
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ROM( cbm8000_hsg )
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START( cbm8000_hsg )
|
||||
ROM_REGION( 0x1000, "9000", 0 )
|
||||
ROM_LOAD( "pet_hsg-ud12 on 8032 9000 (2532).bin", 0x0000, 0x1000, CRC(d651bf72) SHA1(d3d68228a5a8ec73fb39be860c00edb0d21bd1a9) )
|
||||
|
||||
ROM_REGION( 0x1000, "a000", 0 )
|
||||
ROM_LOAD( "324381-01 rev b s/w graphi", 0x0000, 0x1000, CRC(c8e3bff9) SHA1(12ed3176ddd632f52e91082ab574adcba2149684) )
|
||||
ROM_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// rom_region - device-specific ROM region
|
||||
//-------------------------------------------------
|
||||
|
||||
const rom_entry *cbm8000_hsg_t::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( cbm8000_hsg );
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// screen_update -
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT32 cbm8000_hsg_t::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// MACHINE_CONFIG_FRAGMENT( cbm8000_hsg_a )
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( cbm8000_hsg_a )
|
||||
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
|
||||
MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, cbm8000_hsg_t, screen_update)
|
||||
MCFG_SCREEN_SIZE(512, 512)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 512-1)
|
||||
MCFG_SCREEN_REFRESH_RATE(25)
|
||||
MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette")
|
||||
|
||||
//MCFG_DEVICE_ADD(EF9365_TAG, EF9365, 0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// MACHINE_CONFIG_FRAGMENT( cbm8000_hsg_b )
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( cbm8000_hsg_b )
|
||||
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
|
||||
MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, cbm8000_hsg_t, screen_update)
|
||||
MCFG_SCREEN_SIZE(512, 256)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
|
||||
MCFG_SCREEN_REFRESH_RATE(50)
|
||||
MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette")
|
||||
|
||||
//MCFG_DEVICE_ADD(EF9366_TAG, EF9366, 0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor cbm8000_hsg_a_t::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( cbm8000_hsg_a );
|
||||
}
|
||||
|
||||
machine_config_constructor cbm8000_hsg_b_t::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( cbm8000_hsg_b );
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// cbm8000_hsg_t - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
cbm8000_hsg_t::cbm8000_hsg_t(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_pet_expansion_card_interface(mconfig, *this),
|
||||
m_9000(*this, "9000"),
|
||||
m_a000(*this, "a000")
|
||||
{
|
||||
}
|
||||
|
||||
cbm8000_hsg_a_t::cbm8000_hsg_a_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
cbm8000_hsg_t(mconfig, CBM8000_HSG_A, "CBM 8000 High Speed Graphics (A)", tag, owner, clock, "cbm8000_hsg_a", __FILE__)
|
||||
//m_gdc(*this, EF9365_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
cbm8000_hsg_b_t::cbm8000_hsg_b_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
cbm8000_hsg_t(mconfig, CBM8000_HSG_B, "CBM 8000 High Speed Graphics (B)", tag, owner, clock, "cbm8000_hsg_b", __FILE__)
|
||||
//m_gdc(*this, EF9366_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void cbm8000_hsg_t::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void cbm8000_hsg_t::device_reset()
|
||||
{
|
||||
//m_gdc->reset();
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// pet_norom_r - NO ROM read
|
||||
//-------------------------------------------------
|
||||
|
||||
int cbm8000_hsg_t::pet_norom_r(address_space &space, offs_t offset, int sel)
|
||||
{
|
||||
return !(offset >= 0x9000 && offset < 0xaf00);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// pet_bd_r - buffered data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 cbm8000_hsg_t::pet_bd_r(address_space &space, offs_t offset, UINT8 data, int &sel)
|
||||
{
|
||||
switch (sel)
|
||||
{
|
||||
case pet_expansion_slot_device::SEL9:
|
||||
data = m_9000->base()[offset & 0xfff];
|
||||
break;
|
||||
|
||||
case pet_expansion_slot_device::SELA:
|
||||
if (offset < 0xaf00)
|
||||
{
|
||||
data = m_a000->base()[offset & 0xfff];
|
||||
}
|
||||
else if (offset == 0xaf10)
|
||||
{
|
||||
/*
|
||||
|
||||
bit description
|
||||
|
||||
0 light pen
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
|
||||
*/
|
||||
}
|
||||
else if (offset == 0xad30)
|
||||
{
|
||||
// hard copy
|
||||
}
|
||||
else if (offset >= 0xaf70 && offset < 0xaf80)
|
||||
{
|
||||
//data = m_gdc->data_r(space, offset & 0x0f);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// pet_bd_w - buffered data write
|
||||
//-------------------------------------------------
|
||||
|
||||
void cbm8000_hsg_t::pet_bd_w(address_space &space, offs_t offset, UINT8 data, int &sel)
|
||||
{
|
||||
if (offset == 0xaf00)
|
||||
{
|
||||
/*
|
||||
|
||||
bit description
|
||||
|
||||
0 hard copy (0=active)
|
||||
1 operating page select (version B)
|
||||
2
|
||||
3 read-modify-write (1=active)
|
||||
4 display switch (1=graphic)
|
||||
5 display page select (version B)
|
||||
6
|
||||
7
|
||||
|
||||
*/
|
||||
}
|
||||
else if (offset >= 0xaf70 && offset < 0xaf80)
|
||||
{
|
||||
//m_gdc->data_w(space, offset & 0x0f, data);
|
||||
}
|
||||
}
|
90
src/emu/bus/pet/hsg.h
Normal file
90
src/emu/bus/pet/hsg.h
Normal file
|
@ -0,0 +1,90 @@
|
|||
// license:BSD-3-Clause
|
||||
// copyright-holders:Curt Coder
|
||||
/**********************************************************************
|
||||
|
||||
CBM 8000 High Speed Graphics (324402-01) card emulation
|
||||
|
||||
Copyright MESS Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __CBM8000_HSG__
|
||||
#define __CBM8000_HSG__
|
||||
|
||||
#include "emu.h"
|
||||
#include "exp.h"
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> cbm8000_hsg_t
|
||||
|
||||
class cbm8000_hsg_t : public device_t,
|
||||
public device_pet_expansion_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
cbm8000_hsg_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
|
||||
cbm8000_hsg_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual const rom_entry *device_rom_region() const;
|
||||
|
||||
// device_pet_expansion_card_interface overrides
|
||||
virtual int pet_norom_r(address_space &space, offs_t offset, int sel);
|
||||
virtual UINT8 pet_bd_r(address_space &space, offs_t offset, UINT8 data, int &sel);
|
||||
virtual void pet_bd_w(address_space &space, offs_t offset, UINT8 data, int &sel);
|
||||
|
||||
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
private:
|
||||
//required_device<ef9365_device> m_gdc;
|
||||
required_memory_region m_9000;
|
||||
required_memory_region m_a000;
|
||||
};
|
||||
|
||||
|
||||
// ======================> cbm8000_hsg_a_t
|
||||
|
||||
class cbm8000_hsg_a_t : public cbm8000_hsg_t
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
cbm8000_hsg_a_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
};
|
||||
|
||||
|
||||
// ======================> cbm8000_hsg_b_t
|
||||
|
||||
class cbm8000_hsg_b_t : public cbm8000_hsg_t
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
cbm8000_hsg_b_t(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 CBM8000_HSG_A;
|
||||
extern const device_type CBM8000_HSG_B;
|
||||
|
||||
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue