1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
|
// license:GPL-2.0+
// copyright-holders:Felipe Sanches
/****************************************************************************
Skeleton driver for Sony U-Matic Videocassette Recorder
****************************************************************************/
#include "emu.h"
#include "cpu/z80/z80.h"
#include "machine/z80ctc.h"
class umatic_state : public driver_device
{
public:
umatic_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_ctc(*this, "ctc")
{
}
void umatic(machine_config &config);
uint8_t io_read(offs_t offset);
void io_write(offs_t offset, uint8_t data);
private:
void mem_map(address_map &map);
void io_map(address_map &map);
required_device<z80_device> m_maincpu;
required_device<z80ctc_device> m_ctc;
};
void umatic_state::io_write(offs_t offset, uint8_t data)
{
//FIXME!
}
uint8_t umatic_state::io_read(offs_t offset)
{
switch(offset & 7){
case 0: return 0; //FIXME!
case 1: return 0; //FIXME!
case 2: return 0; //FIXME!
case 3: return 0; //FIXME!
case 4: return 0x04; //FIXME!
case 5: return 0; //FIXME!
case 6: return 0; //FIXME!
case 7: return 0; //FIXME!
}
return 0;
}
void umatic_state::io_map(address_map &map)
{
map.unmap_value_high();
map.global_mask(0xff);
map(0x00, 0x03).mirror(0x7c).rw(m_ctc, FUNC(z80ctc_device::read), FUNC(z80ctc_device::write));
map(0x80, 0x87).mirror(0x78).rw(FUNC(umatic_state::io_read), FUNC(umatic_state::io_write));
}
void umatic_state::mem_map(address_map &map)
{
map(0x0000, 0x17ff).rom(); // 8k-byte EPROM at IC26, but only the first 6kb are mapped.
// And remaining unmapped content is all 0xFF.
map(0x1800, 0x1fff).ram(); // 2k-byte CXK5816PN-15L at IC17
}
static INPUT_PORTS_START(umatic)
INPUT_PORTS_END
void umatic_state::umatic(machine_config &config)
{
Z80(config, m_maincpu, 4.9152_MHz_XTAL / 2); // LH0080 SHARP
m_maincpu->set_addrmap(AS_PROGRAM, &umatic_state::mem_map);
m_maincpu->set_addrmap(AS_IO, &umatic_state::io_map);
// peripheral hardware
Z80CTC(config, m_ctc, 4.9152_MHz_XTAL / 16); // LH0082 SHARP
m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
//TODO: m_ctc->zc_callback<2>().set(...); // "search freq out" ?
}
ROM_START(vo5850pm)
ROM_REGION(0x2000, "maincpu", 0)
ROM_LOAD("2764_s68_ev1-25.ic26", 0x0000, 0x2000, CRC(7f3c191d) SHA1(4843399f86a15133e966c9e8992eafac03818916))
ROM_END
// YEAR NAME PARENT/COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
SYST(19??, vo5850pm, 0, 0, umatic, umatic, umatic_state, empty_init, "Sony", "U-Matic Videocassette Recorder VO-5850PM", MACHINE_IS_SKELETON)
|