diff options
| author | 2019-01-25 23:12:15 +0000 | |
|---|---|---|
| committer | 2019-01-25 23:25:39 +0000 | |
| commit | 41f70ede7882674d6319a25235fb88a81ef9bb41 (patch) | |
| tree | 8335469eacb34ee7e59254c77b632fcf259b57d7 /src | |
| parent | 2dc5fdec9b835c33fcd04179bc0979a9c882f754 (diff) | |
bbc: Added the Logotron Sprite Board on the 1MHz bus (for use with Logotron Logo).
Diffstat (limited to 'src')
| -rw-r--r-- | src/devices/bus/bbc/1mhzbus/1mhzbus.cpp | 3 | ||||
| -rw-r--r-- | src/devices/bus/bbc/1mhzbus/sprite.cpp | 98 | ||||
| -rw-r--r-- | src/devices/bus/bbc/1mhzbus/sprite.h | 49 |
3 files changed, 150 insertions, 0 deletions
diff --git a/src/devices/bus/bbc/1mhzbus/1mhzbus.cpp b/src/devices/bus/bbc/1mhzbus/1mhzbus.cpp index 43cabfdfec3..ae0557dc580 100644 --- a/src/devices/bus/bbc/1mhzbus/1mhzbus.cpp +++ b/src/devices/bus/bbc/1mhzbus/1mhzbus.cpp @@ -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 */ } diff --git a/src/devices/bus/bbc/1mhzbus/sprite.cpp b/src/devices/bus/bbc/1mhzbus/sprite.cpp new file mode 100644 index 00000000000..d898e2cb630 --- /dev/null +++ b/src/devices/bus/bbc/1mhzbus/sprite.cpp @@ -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; + } +} diff --git a/src/devices/bus/bbc/1mhzbus/sprite.h b/src/devices/bus/bbc/1mhzbus/sprite.h new file mode 100644 index 00000000000..11fb532ac9d --- /dev/null +++ b/src/devices/bus/bbc/1mhzbus/sprite.h @@ -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 */ |
