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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
|
// license: BSD-3-Clause
// copyright-holders: Devin Acker
/***************************************************************************
Noise Toys Inc. "Jaminator"
This toy guitar was originally sold by Worlds of Wonder in 1990, along with
six optional ROM cartridges. In 1993, it was also licensed to Arrow Micro-Techs
(AMT) and Yamaha, who distributed it along with several new cartridges.
A message from the development team is used as ROM padding:
"""
(C)1990 Noise Toys Inc
Code by Steve Capps(MAD - Je t'aime beaucoup)
Hardware by Ray DuFlon
Music by Ed Bogas(Des - te amo)
"""
Main hardware:
U101: "DEVO" sound and mapper ASIC
("(C)1987 NOISE TOYS INC", "WOW DEVO 33073-01 CF61909N" or "AMT DEVO CF61909N")
U102: OKI MSM80C39
U104: 1Mbit mask ROM (DIP28, 23C1000 pinout)
TODO:
- Link cable
- Clickable layout?
***************************************************************************/
#include "emu.h"
#include "bus/generic/carts.h"
#include "bus/generic/slot.h"
#include "cpu/mcs48/mcs48.h"
#include "machine/rescap.h"
#include "sound/cf61909.h"
#include "sound/flt_biquad.h"
#include "sound/flt_rc.h"
#include "softlist_dev.h"
#include "speaker.h"
namespace {
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
class jaminator_state : public driver_device
{
public:
jaminator_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_devo(*this, "devo"),
m_cart(*this, "cart"),
m_inputs(*this, "COL%u", 1), // labeling from PCB silkscreen
m_bender(*this, "BENDER"),
m_led_power(*this, "led_power")
{ }
void jaminator(machine_config &config);
void input_sel_w(u8 data);
ioport_value input_r();
ioport_value bender_r();
// link cable not emulated yet, but output needs to be looped back too (used for starting songs, etc)
void link_data_w(u8 data) { m_link_data = data; }
ioport_value link_data_r() { return m_link_data; }
protected:
virtual void machine_start() override ATTR_COLD;
virtual void machine_reset() override ATTR_COLD;
private:
void main_map(address_map &map) ATTR_COLD;
void io_map(address_map &map) ATTR_COLD;
void sound_map(address_map &map) ATTR_COLD;
required_device<i8039_device> m_maincpu;
required_device<cf61909_device> m_devo;
required_device<generic_slot_device> m_cart;
required_ioport_array<7> m_inputs;
required_ioport m_bender;
output_finder<> m_led_power;
u8 m_input_sel;
u8 m_link_data;
};
//**************************************************************************
// ADDRESS MAPS
//**************************************************************************
void jaminator_state::main_map(address_map &map)
{
// TODO: program ROM banking for executable cartridges (do any exist?)
map(0x000, 0x7ff).mirror(0x800).rom().region("devo", 0);
}
void jaminator_state::io_map(address_map &map)
{
map(0x00, 0xff).rw(m_devo, FUNC(cf61909_device::read), FUNC(cf61909_device::write));
}
void jaminator_state::sound_map(address_map &map)
{
map(0x00000, 0x1ffff).rom().region("devo", 0);
map(0x20000, 0x3ffff).nopr(); // cart
}
//**************************************************************************
// INPUT PORT DEFINITIONS
//**************************************************************************
static INPUT_PORTS_START( jaminator )
PORT_START("COL1")
PORT_BIT(0x1, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("String 1")
PORT_BIT(0x2, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("String 2")
PORT_BIT(0x4, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("String 3")
PORT_BIT(0x8, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Start / Next")
PORT_START("COL2")
PORT_BIT(0x1, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Key 1")
PORT_BIT(0x2, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Key 2")
PORT_BIT(0x4, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Key 3")
PORT_BIT(0x8, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Key 4")
PORT_START("COL3")
PORT_BIT(0x1, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("Drum Pad 1")
PORT_BIT(0x2, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Drum Pad 2")
PORT_BIT(0x4, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("Drum Pad 3")
PORT_BIT(0x8, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Finale")
PORT_START("COL4")
PORT_BIT(0x1, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_1) PORT_NAME("Fret 1")
PORT_BIT(0x2, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_2) PORT_NAME("Fret 2")
PORT_BIT(0x4, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_3) PORT_NAME("Fret 3")
PORT_BIT(0x8, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_4) PORT_NAME("Fret 4")
PORT_START("COL5")
PORT_BIT(0x1, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_5) PORT_NAME("Fret 5")
PORT_BIT(0x2, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_6) PORT_NAME("Fret 6")
PORT_BIT(0x4, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_7) PORT_NAME("Fret 7")
PORT_BIT(0x8, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_8) PORT_NAME("Fret 8")
PORT_START("COL6")
PORT_BIT(0x1, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_9) PORT_NAME("Fret 9")
PORT_BIT(0x2, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_0) PORT_NAME("Fret 10")
PORT_BIT(0x4, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("Fret 11")
PORT_BIT(0x8, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_EQUALS) PORT_NAME("Fret 12")
PORT_START("COL7")
PORT_BIT(0xf, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(jaminator_state, bender_r)
PORT_START("BENDER")
PORT_BIT(0xff, 0x78, IPT_PADDLE) PORT_NAME("Bender Bar") PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_MINMAX(0x00, 0xef)
PORT_START("P1")
PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(jaminator_state, input_r)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OUTPUT ) // link cable clock
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(jaminator_state, link_data_w)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Select")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(jaminator_state, link_data_r)
PORT_START("P2")
PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT(0xf0, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(jaminator_state, input_sel_w)
/*
* T0 is connected to pin 1 on the link port, which is pulled up by a 10k resistor.
* Connecting it to ground causes percussion tracks to be omitted when playing songs
*/
PORT_START("T0")
PORT_CONFNAME(0x1, 0x1, "Percussion Tracks")
PORT_CONFSETTING(0x0, DEF_STR( Off ))
PORT_CONFSETTING(0x1, DEF_STR( On ))
INPUT_PORTS_END
//**************************************************************************
// MACHINE EMULATION
//**************************************************************************
void jaminator_state::machine_start()
{
m_led_power.resolve();
m_input_sel = 0;
m_link_data = 0;
if (m_cart->exists())
m_devo->space().install_read_handler(0x20000, 0x3ffff, read8sm_delegate(*m_cart, FUNC(generic_slot_device::read_rom)));
save_item(NAME(m_input_sel));
save_item(NAME(m_link_data));
}
//**************************************************************************
void jaminator_state::machine_reset()
{
m_led_power = 1;
}
//**************************************************************************
void jaminator_state::input_sel_w(u8 data)
{
m_input_sel = data & 0xf;
if (m_input_sel == 0x7)
{
m_led_power = 0;
m_devo->reset();
m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
}
//**************************************************************************
ioport_value jaminator_state::input_r()
{
if (m_input_sel < 0x7)
return m_inputs[m_input_sel]->read();
return 0;
}
//**************************************************************************
ioport_value jaminator_state::bender_r()
{
// the bender PCB only has 15 contact positions (0-14), but the ROM recognizes 16 values
static const u8 bendval[] = {
0xf, 0x7, 0x3, 0xb, 0x9, 0x1, 0x5, 0xd,
0xc, 0x4, 0x0, 0x8, 0xa, 0x2, 0x6, 0xe
};
return bendval[m_bender->read() >> 4];
}
//**************************************************************************
// MACHINE DEFINTIONS
//**************************************************************************
void jaminator_state::jaminator(machine_config &config)
{
I8039(config, m_maincpu, 11_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &jaminator_state::main_map);
m_maincpu->set_addrmap(AS_IO, &jaminator_state::io_map);
m_maincpu->p1_in_cb().set_ioport("P1");
m_maincpu->p1_out_cb().set_ioport("P1");
m_maincpu->p2_out_cb().set_ioport("P2");
m_maincpu->t0_in_cb().set_ioport("T0");
GENERIC_CARTSLOT(config, m_cart, generic_linear_slot, "jaminator", "bin");
SOFTWARE_LIST(config, "cart_list").set_original("jaminator");
SPEAKER(config, "speaker").front_center();
CF61909(config, m_devo, 11_MHz_XTAL);
m_devo->set_addrmap(0, &jaminator_state::sound_map);
m_devo->add_route(0, "rcfilter", 1.0);
m_maincpu->t1_in_cb().set(m_devo, FUNC(cf61909_device::sync_r));
filter_rc_device &rcfilter(FILTER_RC(config, "rcfilter"));
rcfilter.set_lowpass(RES_R(510) + RES_K(15), CAP_N(6.8));
rcfilter.add_route(0, "biquad", 1.0);
filter_biquad_device &biquad(FILTER_BIQUAD(config, "biquad"));
biquad.opamp_sk_lowpass_setup(RES_K(10), RES_K(10), RES_K(39), RES_K(1), CAP_N(6.8), CAP_N(6.8));
biquad.add_route(0, "speaker", 1.0);
}
//**************************************************************************
// ROM DEFINITIONS
//**************************************************************************
ROM_START( jaminator )
ROM_REGION(0x20000, "devo", 0)
ROM_LOAD("amta361.u104", 0x00000, 0x20000, CRC(f3f798ed) SHA1(08bef43e9689608f40a57b77724de5f6d2652693))
ROM_END
} // anonymous namespace
//**************************************************************************
// SYSTEM DRIVERS
//**************************************************************************
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
SYST( 1990, jaminator, 0, 0, jaminator, jaminator, jaminator_state, empty_init, "Noise Toys Inc.", "Jaminator", MACHINE_SUPPORTS_SAVE )
|