mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
bbc: Added the Logotron Sprite Board on the 1MHz bus (for use with Logotron Logo).
This commit is contained in:
parent
2dc5fdec9b
commit
41f70ede78
4 changed files with 152 additions and 0 deletions
|
@ -357,6 +357,8 @@ if (BUSES["BBC_1MHZBUS"]~=null) then
|
|||
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/m2000.h",
|
||||
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/opus3.cpp",
|
||||
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/opus3.h",
|
||||
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/sprite.cpp",
|
||||
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/sprite.h",
|
||||
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/cfa3000opt.cpp",
|
||||
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/cfa3000opt.h",
|
||||
}
|
||||
|
|
|
@ -142,6 +142,7 @@ WRITE8_MEMBER(bbc_1mhzbus_slot_device::jim_w)
|
|||
//#include "graduate.h"
|
||||
#include "beebsid.h"
|
||||
//#include "prisma3.h"
|
||||
#include "sprite.h"
|
||||
#include "cfa3000opt.h"
|
||||
|
||||
|
||||
|
@ -161,6 +162,7 @@ void bbc_1mhzbus_devices(device_slot_interface &device)
|
|||
//device.option_add("graduate", BBC_GRADUATE); /* The Torch Graduate G400/G800 */
|
||||
device.option_add("beebsid", BBC_BEEBSID); /* BeebSID */
|
||||
//device.option_add("prisma3", BBC_PRISMA3); /* PRISMA-3 - Millipede 1989 */
|
||||
device.option_add("sprite", BBC_SPRITE); /* Logotron Sprite Board */
|
||||
}
|
||||
|
||||
void bbcm_1mhzbus_devices(device_slot_interface &device)
|
||||
|
@ -183,5 +185,6 @@ void bbcm_1mhzbus_devices(device_slot_interface &device)
|
|||
//device.option_add("graduate", BBC_GRADUATE); /* The Torch Graduate G400/G800 */
|
||||
device.option_add("beebsid", BBC_BEEBSID); /* BeebSID */
|
||||
//device.option_add("prisma3", BBC_PRISMA3); /* PRISMA-3 - Millipede 1989 */
|
||||
device.option_add("sprite", BBC_SPRITE); /* Logotron Sprite Board */
|
||||
device.option_add("cfa3000opt", CFA3000_OPT); /* Henson CFA 3000 Option Board */
|
||||
}
|
||||
|
|
98
src/devices/bus/bbc/1mhzbus/sprite.cpp
Normal file
98
src/devices/bus/bbc/1mhzbus/sprite.cpp
Normal file
|
@ -0,0 +1,98 @@
|
|||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
Logotron Sprite Board
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "sprite.h"
|
||||
#include "screen.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
DEFINE_DEVICE_TYPE(BBC_SPRITE, bbc_sprite_device, "bbc_sprite", "Logotron Sprite Board");
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_sprite_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
TMS9129(config, m_vdp, 10.738635_MHz_XTAL);
|
||||
m_vdp->set_screen("screen");
|
||||
m_vdp->set_vram_size(0x4000);
|
||||
|
||||
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// bbc_sprite_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
bbc_sprite_device::bbc_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, BBC_SPRITE, tag, owner, clock)
|
||||
, device_bbc_1mhzbus_interface(mconfig, *this)
|
||||
, m_vdp(*this, "vdp")
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_sprite_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_sprite_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
READ8_MEMBER(bbc_sprite_device::fred_r)
|
||||
{
|
||||
uint8_t data = 0xff;
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0xa0:
|
||||
data = m_vdp->vram_read();
|
||||
break;
|
||||
case 0xa2:
|
||||
data = m_vdp->register_read();
|
||||
break;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(bbc_sprite_device::fred_w)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0xa1:
|
||||
m_vdp->vram_write(data);
|
||||
break;
|
||||
case 0xa3:
|
||||
m_vdp->register_write(data);
|
||||
break;
|
||||
}
|
||||
}
|
49
src/devices/bus/bbc/1mhzbus/sprite.h
Normal file
49
src/devices/bus/bbc/1mhzbus/sprite.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
Logotron Sprite Board
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
#ifndef MAME_BUS_BBC_1MHZBUS_SPRITE_H
|
||||
#define MAME_BUS_BBC_1MHZBUS_SPRITE_H
|
||||
|
||||
#include "1mhzbus.h"
|
||||
#include "video/tms9928a.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
class bbc_sprite_device:
|
||||
public device_t,
|
||||
public device_bbc_1mhzbus_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
bbc_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(fred_r) override;
|
||||
virtual DECLARE_WRITE8_MEMBER(fred_w) override;
|
||||
|
||||
private:
|
||||
required_device<tms9129_device> m_vdp;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(BBC_SPRITE, bbc_sprite_device);
|
||||
|
||||
|
||||
#endif /* MAME_BUS_BBC_1MHZBUS_SPRITE_H */
|
Loading…
Reference in a new issue