diff options
author | 2013-10-20 19:50:55 +0000 | |
---|---|---|
committer | 2013-10-20 19:50:55 +0000 | |
commit | d756fa8ec44d6572cf192a4883c1d7e00e5c47cc (patch) | |
tree | d3b88aec276826c5340bc13b5ac87113da5b7eb2 /src/emu/bus/vip/vp700.c | |
parent | 25f4c260a8bdb38430151d7488e725c24d20a0e9 (diff) |
(MESS) vip: Moved expansion and byte I/O ports under emu/bus. (nw)
Diffstat (limited to 'src/emu/bus/vip/vp700.c')
-rw-r--r-- | src/emu/bus/vip/vp700.c | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/src/emu/bus/vip/vp700.c b/src/emu/bus/vip/vp700.c new file mode 100644 index 00000000000..dda6b9e7bf6 --- /dev/null +++ b/src/emu/bus/vip/vp700.c @@ -0,0 +1,84 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + RCA VIP Tiny BASIC VP-700 emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#include "vp700.h" + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type VP700 = &device_creator<vp700_device>; + + +//------------------------------------------------- +// ROM( vp700 ) +//------------------------------------------------- + +ROM_START( vp700 ) + ROM_REGION( 0x1000, "vp700", 0 ) + ROM_LOAD( "vp700.bin", 0x0000, 0x1000, CRC(3f2b8524) SHA1(8fa88740cae82d8d62ea34891a657d3ca1fb732a) ) +ROM_END + + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +const rom_entry *vp700_device::device_rom_region() const +{ + return ROM_NAME( vp700 ); +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// vp700_device - constructor +//------------------------------------------------- + +vp700_device::vp700_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, VP700, "VP700", tag, owner, clock, "vp700", __FILE__), + device_vip_expansion_card_interface(mconfig, *this), + m_rom(*this, "vp700") +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void vp700_device::device_start() +{ +} + + +//------------------------------------------------- +// vip_program_r - program read +//------------------------------------------------- + +UINT8 vp700_device::vip_program_r(address_space &space, offs_t offset, int cs, int cdef, int *minh) +{ + UINT8 data = 0xff; + + if (offset < 0x1000) + { + *minh = 1; + + data = m_rom->base()[offset & 0xfff]; + } + + return data; +} |