1 // license:BSD-3-Clause
2 // copyright-holders:Curt Coder
3 /**********************************************************************
4
5 RCA VIP Tiny BASIC VP-700 emulation
6
7 **********************************************************************/
8
9 #include "emu.h"
10 #include "vp700.h"
11
12
13 //**************************************************************************
14 // DEVICE DEFINITIONS
15 //**************************************************************************
16
17 DEFINE_DEVICE_TYPE(VP700, vp700_device, "vp700", "VP-700 Expanded Tiny BASIC")
18
19
20 //-------------------------------------------------
21 // ROM( vp700 )
22 //-------------------------------------------------
23
ROM_START(vp700)24 ROM_START( vp700 )
25 ROM_REGION( 0x1000, "vp700", 0 )
26 ROM_LOAD( "vp700.bin", 0x0000, 0x1000, CRC(3f2b8524) SHA1(8fa88740cae82d8d62ea34891a657d3ca1fb732a) )
27 ROM_END
28
29
30 //-------------------------------------------------
31 // rom_region - device-specific ROM region
32 //-------------------------------------------------
33
34 const tiny_rom_entry *vp700_device::device_rom_region() const
35 {
36 return ROM_NAME( vp700 );
37 }
38
39
40
41 //**************************************************************************
42 // LIVE DEVICE
43 //**************************************************************************
44
45 //-------------------------------------------------
46 // vp700_device - constructor
47 //-------------------------------------------------
48
vp700_device(const machine_config & mconfig,const char * tag,device_t * owner,uint32_t clock)49 vp700_device::vp700_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
50 device_t(mconfig, VP700, tag, owner, clock),
51 device_vip_expansion_card_interface(mconfig, *this),
52 m_rom(*this, "vp700")
53 {
54 }
55
56
57 //-------------------------------------------------
58 // device_start - device-specific startup
59 //-------------------------------------------------
60
device_start()61 void vp700_device::device_start()
62 {
63 }
64
65
66 //-------------------------------------------------
67 // vip_program_r - program read
68 //-------------------------------------------------
69
vip_program_r(offs_t offset,int cs,int cdef,int * minh)70 uint8_t vp700_device::vip_program_r(offs_t offset, int cs, int cdef, int *minh)
71 {
72 uint8_t data = 0xff;
73
74 if (offset < 0x1000)
75 {
76 *minh = 1;
77
78 data = m_rom->base()[offset & 0xfff];
79 }
80
81 return data;
82 }
83