1 // license:BSD-3-Clause
2 // copyright-holders:AJR
3 /****************************************************************************
4
5 Skeleton driver for Korg DVP-1 MIDI vocoder.
6
7 ****************************************************************************/
8
9 #include "emu.h"
10 //#include "bus/midi/midi.h"
11 #include "cpu/upd7810/upd7810.h"
12 #include "cpu/tms32010/tms32010.h"
13 #include "machine/nvram.h"
14
15 class korgdvp1_state : public driver_device
16 {
17 public:
korgdvp1_state(const machine_config & mconfig,device_type type,const char * tag)18 korgdvp1_state(const machine_config &mconfig, device_type type, const char *tag)
19 : driver_device(mconfig, type, tag)
20 , m_maincpu(*this, "maincpu")
21 , m_dsp(*this, "dsp%u", 1U)
22 {
23 }
24
25 void dvp1(machine_config &config);
26
27 private:
28 u8 inputs_r();
29 u8 dsp_int_r();
30 void control_w(u8 data);
31 void leds_w(offs_t offset, u8 data);
32 void dsp_w(offs_t offset, u8 data);
33
34 void main_map(address_map &map);
35
36 required_device<upd7810_device> m_maincpu;
37 required_device_array<tms32010_device, 2> m_dsp;
38 };
39
40
inputs_r()41 u8 korgdvp1_state::inputs_r()
42 {
43 return 0xff;
44 }
45
dsp_int_r()46 u8 korgdvp1_state::dsp_int_r()
47 {
48 // PB3 = BUSY
49 // PB6 = INT0
50 // PB7 = INT1
51 return 0xff;
52 }
53
control_w(u8 data)54 void korgdvp1_state::control_w(u8 data)
55 {
56 // PB0, PB1 = input select (HC139)
57 // PB2 = MUTE
58 // PB4 = DSP RES
59 // PB5 = ROM/RAM
60 }
61
leds_w(offs_t offset,u8 data)62 void korgdvp1_state::leds_w(offs_t offset, u8 data)
63 {
64 for (int i = 0; i < 8; i++)
65 if (BIT(offset, i))
66 logerror("%s: Writing %02X to A%d LEDs\n", machine().describe_context(), data, i);
67 }
68
dsp_w(offs_t offset,u8 data)69 void korgdvp1_state::dsp_w(offs_t offset, u8 data)
70 {
71 for (int i = 0; i < 2; i++)
72 if (!BIT(offset, 9 - i))
73 logerror("%s: Writing %02X to DSP %d\n", machine().describe_context(), data, i + 1);
74 }
75
main_map(address_map & map)76 void korgdvp1_state::main_map(address_map &map)
77 {
78 map(0x0000, 0x7fff).rom().region("program", 0);
79 map(0x8000, 0x87ff).mirror(0x1800).ram().share("nvram");
80 map(0xa000, 0xa0ff).mirror(0x1f00).w(FUNC(korgdvp1_state::leds_w));
81 map(0xc000, 0xc000).select(0x300).mirror(0x1cff).w(FUNC(korgdvp1_state::dsp_w));
82 }
83
84
INPUT_PORTS_START(dvp1)85 static INPUT_PORTS_START(dvp1)
86 INPUT_PORTS_END
87
88 void korgdvp1_state::dvp1(machine_config &config)
89 {
90 UPD7810(config, m_maincpu, 12_MHz_XTAL); // µPD7811-161-36 (according to parts list) but with both mode pins pulled up
91 m_maincpu->set_addrmap(AS_PROGRAM, &korgdvp1_state::main_map);
92 m_maincpu->pa_in_cb().set(FUNC(korgdvp1_state::inputs_r));
93 m_maincpu->pb_in_cb().set(FUNC(korgdvp1_state::dsp_int_r));
94 m_maincpu->pb_out_cb().set(FUNC(korgdvp1_state::control_w));
95
96 NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // HM6116LP-4 + 3V lithium battery
97
98 TMS32010(config, m_dsp[0], 20_MHz_XTAL).set_disable();
99 TMS32010(config, m_dsp[1], 20_MHz_XTAL).set_disable();
100 }
101
102 ROM_START(dvp1)
103 ROM_REGION(0x8000, "program", 0) // Version: SEP 28, 1985
104 ROM_LOAD("850803.ic6", 0x0000, 0x8000, CRC(1170db85) SHA1(4ce773dd22c56982b9493f89dce62111eec596b3)) // MBM27256-25
105
106 ROM_REGION16_LE(0xc00, "dsp1", 0) // 1536 x 16 internal bootloader
107 ROM_LOAD("tms320m10nl.ic9", 0x000, 0xc00, NO_DUMP)
108
109 ROM_REGION16_LE(0xc00, "dsp2", 0) // 1536 x 16 internal bootloader (almost certainly identical to DSP 1)
110 ROM_LOAD("tms320m10nl.ic8", 0x000, 0xc00, NO_DUMP)
111 ROM_END
112
113 SYST(1985, dvp1, 0, 0, dvp1, dvp1, korgdvp1_state, empty_init, "Korg", "DVP-1 Digital Voice Processor", MACHINE_IS_SKELETON)
114