summaryrefslogtreecommitdiffstatshomepage
path: root/docs/man/jedutil.1
diff options
context:
space:
mode:
Diffstat (limited to 'docs/man/jedutil.1')
0 files changed, 0 insertions, 0 deletions
ef='#n54'>54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
// 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->int_callback().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::irq_w));
	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;
	}
}