1 // license:BSD-3-Clause
2 // copyright-holders:Zsolt Vasvari, Couriersud
3 /***************************************************************************
4 
5 Burger Time
6 
7 driver by Zsolt Vasvari
8 
9 hardware description:
10 
11 Actually Lock'n'Chase is (C)1981 while Burger Time is (C)1982, so it might
12 be more accurate to say 'Lock'n'Chase hardware'.
13 
14 The bootleg called Cook Race runs on hardware similar but different. The fact
15 that it addresses the program ROMs in the range 0500-3fff instead of the usual
16 c000-ffff makes me suspect that it is a bootleg of the *tape system* version.
17 Little is known about that system, but it is quite likely that it would have
18 RAM in the range 0000-3fff and load the program there from tape.
19 
20 
21 This hardware is pretty straightforward, but has a couple of interesting
22 twists. There are two ports to the video and color RAMs, one normal access,
23 and one with X and Y coordinates swapped. The sprite RAM occupies the
24 first row of the swapped area, so it appears in the regular video RAM as
25 the first column of on the left side.
26 
27 These games don't have VBLANK interrupts, but instead an IRQ or NMI
28 (depending on the particular board) is generated when a coin is inserted.
29 
30 Some of the games also have a background playfield which, in the
31 case of Bump 'n' Jump and Zoar, can be scrolled vertically.
32 
33 These boards use two 8910's for sound, controlled by a dedicated 6502. The
34 main processor triggers an IRQ request when writing a command to the sound
35 CPU.
36 
37 
38 
39 Zoar (Data East, 1982)
40 Hardware info by Guru
41 
42 Top PCB
43 
44 DE-0123
45 |---------------------------------|
46 |UPC1181H   SW2         Z17.15B   |
47 |   VOL     SW1                  |-|
48 |                       Z16.13B  | |
49 |          2128         Z15.12B  | |
50 |                         X      | |
51 |        AY-3-8910        X      |-|
52 |           AY-3-8910    DIP24    |
53 |                    6502         |
54 |1                      Z13.6B    |
55 |8                               |-|
56 |W                      Z12.4B   | |
57 |A                               | |
58 |Y                      Z11.3B   | |
59 |                                |-|
60 |  555                  Z10.1B    |
61 |---------------------------------|
62 Notes:
63       6502      - clock 500.0kHz [12/24]
64       AY-3-8910 - clock 3.00MHz(both) [12/4]
65       2128      - 2k x8 SRAM == 6116
66       X         - Position for a socket, but not populated with anything
67       DIP24     - Empty socket. There are rumours that this socket would hold test mode code or something else.
68                   It's possible a factory test ROM did exist for factory-only testing as this was common with
69                   several manufacturers at the time. However the PCB came from the factory with this socket empty
70                   so it would be extremely unlikely to find a PCB with that socket populated.
71       SW1/2     - 8 position DIP switches
72                   To set cocktail mode, set DIP#1 SW7 & 8 OFF. The player has 2 buttons only and the screen will flip between PL1 & PL2
73                   To set upright mode, set DIP#1 SW7 & 8 ON. The player has 3 buttons and the screen will not flip between PL1 & PL2
74                   DIP Notes:
75                            SW1 #5 is unused
76                            SW1 #6 must remain OFF otherwise the game will not boot-up and just displays garbage.
77                            There is no TEST mode.
78                            SW2 #5 is listed in the manual as "Panel B". This enables or removes the 2nd button.
79                            There were two types of panels supplied, either cocktail or upright cabs. The cocktail panel
80                            doesn't have 3 buttons. The 2 buttons are air-air missile and air-ground missile/bomb and
81                            there's an extra button for accelerate on the 3 button panel. On the 2 button panel, button 1 is
82                            the air-air and air-ground missile/bomb weapon button and is auto selected based on the enemies on
83                            screen and the 2nd button is wired to accelerate. There is no button for manually selecting
84                            the missiles/bombs.
85 
86 Bottom PCB
87 
88 DE-0122
89 |---------------------------------|
90 |    Z08.15L     PB3  PB0   2128  |
91 |    Z07.14L     2128  |-------| |-|
92 |                2128  |       | | |
93 |    Z06.12L           | CPU-7 | | |
94 |                      |       | | |
95 |    Z05.11L           |       | |-|
96 |                      |-------|  |
97 |    Z04.9L                       |
98 |    Z03.8L               Z19.7B  |
99 |                    AM93425     |-|
100 |1   Z02.6L  AM93425 AM93425     | |
101 |0   Z01.5L  AM93425 AM93425 PB2 | |
102 |W   Z00.3L  AM93425  PB4   PB1  | |
103 |A   Z21.2L    PB4           555 |-|
104 |Y   Z20.1L                12MHz  |
105 |---------------------------------|
106 Notes:
107       CPU-7     - Epoxy block containing a 6502 clocked at 1.5MHz [12/8]
108                   and some 74xx logic chips
109       2128      - 2k x8 SRAM == 6116
110       AM93425   - 1k x1 SRAM == 2125
111       PB*       - PALs (not dumped, registered types)
112       Z19/20/21 - PROMs, type Harris 7603 (32 bytes), compatible with 82S123
113       VSync     - 57.4358Hz
114       HSync     - 15.6235kHz
115 
116 
117 Note on Lock'n'Chase:
118 
119 The watchdog test prints "WATCHDOG TEST ER". Just by looking at the code,
120 I can't see how it could print anything else, there is only one path it
121 can take. Should the game reset????
122 
123 
124 2008-07:
125 Verified dip locations for: btime (manual), bnj (dips listing), lnc (manual),
126 zoar (manual), disco (dips listing). Names of disco switches in DIPLOC are
127 not confirmed (manual needed, in the meanwhile I put generic SW1 & SW2).
128 
129 A few notes:
130 * All the documents says that DSW1 bit 7 is related to the cocktail mode
131     (either flipping the screen or changing the control panel)
132 * According to manuals, btime & bnj Service dips should have a different
133     effect, using 2 bits to access different tests (see commented out
134     settings below). This is normal, the tests are in sets btime3 & btimem
135 * How do country codes affect disco? are there other values other than
136     the ones in the manual?
137 * If/when tisland is fixed/working it needs its own inputs/DIPs (currently wrong using btime inputs/DIPs)
138 * Most games have SW2.8 on. This is normal because that bit is part of the vblank circuit.
139     Currently MAME can't show that as a DIPSW but it must be on regardless or those games won't boot.
140 * Some games have no sound or bad sound after a manual soft reset (F3). Use shift-F3 (hard reset).
141 * wtennis is not fully understood and has a reset hack to make it work but the real issue should be fixed.
142     Even with the hack it does not boot directly into the game, it stays on a test screen.
143     Reset the game with F3 (soft reset) or two shift-F3 hard resets to 'fix' it.
144 
145 ***************************************************************************/
146 
147 #include "emu.h"
148 #include "includes/btime.h"
149 
150 #include "cpu/m6502/m6502.h"
151 #include "sound/ay8910.h"
152 #include "sound/discrete.h"
153 #include "machine/decocpu7.h"
154 #include "machine/deco222.h"
155 #include "speaker.h"
156 
157 #define MASTER_CLOCK      XTAL(12'000'000)
158 #define HCLK             (MASTER_CLOCK/2)
159 #define HCLK1            (HCLK/2)
160 #define HCLK2            (HCLK1/2)
161 #define HCLK4            (HCLK2/2)
162 
163 enum
164 {
165 	AUDIO_ENABLE_DIRECT,        /* via direct address in memory map */
166 	AUDIO_ENABLE_AY8910         /* via ay-8910 port A */
167 };
168 
169 
audio_nmi_enable_w(uint8_t data)170 void btime_state::audio_nmi_enable_w(uint8_t data)
171 {
172 	/* for most games, this serves as the NMI enable for the audio CPU; however,
173 	   lnc and disco use bit 0 of the first AY-8910's port A instead; many other
174 	   games also write there in addition to this address */
175 	if (m_audio_nmi_enable_type == AUDIO_ENABLE_DIRECT)
176 		m_audionmi->in_w<0>(BIT(data, 0));
177 }
178 
ay_audio_nmi_enable_w(uint8_t data)179 void btime_state::ay_audio_nmi_enable_w(uint8_t data)
180 {
181 	/* port A bit 0, when 1, inhibits the NMI */
182 	if (m_audio_nmi_enable_type == AUDIO_ENABLE_AY8910)
183 		m_audionmi->in_w<0>(BIT(~data, 0));
184 }
185 
TIMER_DEVICE_CALLBACK_MEMBER(btime_state::audio_nmi_gen)186 TIMER_DEVICE_CALLBACK_MEMBER(btime_state::audio_nmi_gen)
187 {
188 	int scanline = param;
189 	m_audionmi->in_w<1>((scanline & 8) >> 3);
190 }
191 
btime_map(address_map & map)192 void btime_state::btime_map(address_map &map)
193 {
194 	map(0x0000, 0x07ff).ram().share("rambase");
195 	map(0x0c00, 0x0c0f).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
196 	map(0x1000, 0x13ff).ram().share("videoram");
197 	map(0x1400, 0x17ff).ram().share("colorram");
198 	map(0x1800, 0x1bff).rw(FUNC(btime_state::btime_mirrorvideoram_r), FUNC(btime_state::btime_mirrorvideoram_w));
199 	map(0x1c00, 0x1fff).rw(FUNC(btime_state::btime_mirrorcolorram_r), FUNC(btime_state::btime_mirrorcolorram_w));
200 	map(0x4000, 0x4000).portr("P1").nopw();
201 	map(0x4001, 0x4001).portr("P2");
202 	map(0x4002, 0x4002).portr("SYSTEM").w(FUNC(btime_state::btime_video_control_w));
203 	map(0x4003, 0x4003).portr("DSW1").w(m_soundlatch, FUNC(generic_latch_8_device::write));
204 	map(0x4004, 0x4004).portr("DSW2").w(FUNC(btime_state::bnj_scroll1_w));
205 	map(0xb000, 0xffff).rom();
206 }
207 
cookrace_map(address_map & map)208 void btime_state::cookrace_map(address_map &map)
209 {
210 	map(0x0000, 0x03ff).ram().share("rambase");
211 	map(0x0500, 0x3fff).rom();
212 	map(0xc000, 0xc3ff).ram().share("videoram");
213 	map(0xc400, 0xc7ff).ram().share("colorram");
214 	map(0xc800, 0xcbff).rw(FUNC(btime_state::btime_mirrorvideoram_r), FUNC(btime_state::btime_mirrorvideoram_w));
215 	map(0xcc00, 0xcfff).rw(FUNC(btime_state::btime_mirrorcolorram_r), FUNC(btime_state::btime_mirrorcolorram_w));
216 	map(0xd000, 0xd0ff).ram();                         /* background? */
217 	map(0xd100, 0xd3ff).ram();                         /* ? */
218 	map(0xd400, 0xd7ff).ram().share("bnj_bgram");
219 	map(0xe000, 0xe000).portr("DSW1").w(FUNC(btime_state::bnj_video_control_w));
220 	map(0xe300, 0xe300).portr("DSW1");   /* mirror address used on high score name entry */
221 													/* screen */
222 	map(0xe001, 0xe001).portr("DSW2").w(m_soundlatch, FUNC(generic_latch_8_device::write));
223 	map(0xe002, 0xe002).portr("P1");
224 	map(0xe003, 0xe003).portr("P2");
225 	map(0xe004, 0xe004).portr("SYSTEM");
226 	map(0xfff9, 0xffff).rom();
227 }
228 
tisland_map(address_map & map)229 void btime_state::tisland_map(address_map &map)
230 {
231 	map(0x0000, 0x07ff).ram().share("rambase");
232 	map(0x0c00, 0x0c0f).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
233 	map(0x1000, 0x13ff).ram().share("videoram");
234 	map(0x1400, 0x17ff).ram().share("colorram");
235 	map(0x1800, 0x1bff).rw(FUNC(btime_state::btime_mirrorvideoram_r), FUNC(btime_state::btime_mirrorvideoram_w));
236 	map(0x1c00, 0x1fff).rw(FUNC(btime_state::btime_mirrorcolorram_r), FUNC(btime_state::btime_mirrorcolorram_w));
237 	map(0x4000, 0x4000).portr("P1").nopw();
238 	map(0x4001, 0x4001).portr("P2");
239 	map(0x4002, 0x4002).portr("SYSTEM").w(FUNC(btime_state::btime_video_control_w));
240 	map(0x4003, 0x4003).portr("DSW1").w(m_soundlatch, FUNC(generic_latch_8_device::write));
241 	map(0x4004, 0x4004).portr("DSW2").w(FUNC(btime_state::bnj_scroll1_w));
242 	map(0x4005, 0x4005).w(FUNC(btime_state::bnj_scroll2_w));
243 	map(0x9000, 0xffff).rom();
244 }
245 
zoar_map(address_map & map)246 void btime_state::zoar_map(address_map &map)
247 {
248 	map(0x0000, 0x07ff).ram().share("rambase");
249 	map(0x8000, 0x83ff).writeonly().share("videoram");
250 	map(0x8400, 0x87ff).writeonly().share("colorram");
251 	map(0x8800, 0x8bff).w(FUNC(btime_state::btime_mirrorvideoram_w));
252 	map(0x8c00, 0x8fff).w(FUNC(btime_state::btime_mirrorcolorram_w));
253 	map(0x9000, 0x9000).w(FUNC(btime_state::zoar_video_control_w));
254 	map(0x9800, 0x9800).r(FUNC(btime_state::zoar_dsw1_read));
255 	map(0x9801, 0x9801).portr("DSW2");
256 	map(0x9802, 0x9802).portr("P1");
257 	map(0x9803, 0x9803).portr("P2");
258 	map(0x9800, 0x9803).writeonly().share("zoar_scrollram");
259 	map(0x9804, 0x9804).portr("SYSTEM").w(FUNC(btime_state::bnj_scroll2_w));
260 	map(0x9805, 0x9805).w(FUNC(btime_state::bnj_scroll1_w));
261 	map(0x9806, 0x9806).w(m_soundlatch, FUNC(generic_latch_8_device::write));
262 	map(0xd000, 0xffff).rom();
263 }
264 
lnc_map(address_map & map)265 void btime_state::lnc_map(address_map &map)
266 {
267 	map(0x0000, 0x3bff).ram().share("rambase");
268 	map(0x3c00, 0x3fff).ram().w(FUNC(btime_state::lnc_videoram_w)).share("videoram");
269 	map(0x7800, 0x7bff).writeonly().share("colorram");  /* this is just here to initialize the pointer */
270 	map(0x7c00, 0x7fff).rw(FUNC(btime_state::btime_mirrorvideoram_r), FUNC(btime_state::lnc_mirrorvideoram_w));
271 	map(0x8000, 0x8000).portr("DSW1").nopw();     /* ??? */
272 	map(0x8001, 0x8001).portr("DSW2").w(FUNC(btime_state::bnj_video_control_w));
273 	map(0x8003, 0x8003).writeonly().share("lnc_charbank");
274 	map(0x9000, 0x9000).portr("P1").nopw();     /* IRQ ack??? */
275 	map(0x9001, 0x9001).portr("P2");
276 	map(0x9002, 0x9002).portr("SYSTEM").w(m_soundlatch, FUNC(generic_latch_8_device::write));
277 	map(0xb000, 0xb1ff).ram();
278 	map(0xc000, 0xffff).rom();
279 }
280 
mmonkey_map(address_map & map)281 void btime_state::mmonkey_map(address_map &map)
282 {
283 	map(0x0000, 0x3bff).ram().share("rambase");
284 	map(0x3c00, 0x3fff).ram().w(FUNC(btime_state::lnc_videoram_w)).share("videoram");
285 	map(0x7800, 0x7bff).writeonly().share("colorram");      /* this is just here to initialize the pointer */
286 	map(0x7c00, 0x7fff).rw(FUNC(btime_state::btime_mirrorvideoram_r), FUNC(btime_state::lnc_mirrorvideoram_w));
287 	map(0x8000, 0x8000).portr("DSW1");
288 	map(0x8001, 0x8001).portr("DSW2").w(FUNC(btime_state::bnj_video_control_w));
289 	map(0x8003, 0x8003).writeonly().share("lnc_charbank");
290 	map(0x9000, 0x9000).portr("P1").nopw(); /* IRQ ack??? */
291 	map(0x9001, 0x9001).portr("P2");
292 	map(0x9002, 0x9002).portr("SYSTEM").w(m_soundlatch, FUNC(generic_latch_8_device::write));
293 	map(0xb000, 0xbfff).rw(FUNC(btime_state::mmonkey_protection_r), FUNC(btime_state::mmonkey_protection_w));
294 	map(0xc000, 0xffff).rom();
295 }
296 
bnj_map(address_map & map)297 void btime_state::bnj_map(address_map &map)
298 {
299 	map(0x0000, 0x07ff).ram().share("rambase");
300 	map(0x1000, 0x1000).portr("DSW1");
301 	map(0x1001, 0x1001).portr("DSW2").w(FUNC(btime_state::bnj_video_control_w));
302 	map(0x1002, 0x1002).portr("P1").w(m_soundlatch, FUNC(generic_latch_8_device::write));
303 	map(0x1003, 0x1003).portr("P2");
304 	map(0x1004, 0x1004).portr("SYSTEM");
305 	map(0x4000, 0x43ff).ram().share("videoram");
306 	map(0x4400, 0x47ff).ram().share("colorram");
307 	map(0x4800, 0x4bff).rw(FUNC(btime_state::btime_mirrorvideoram_r), FUNC(btime_state::btime_mirrorvideoram_w));
308 	map(0x4c00, 0x4fff).rw(FUNC(btime_state::btime_mirrorcolorram_r), FUNC(btime_state::btime_mirrorcolorram_w));
309 	map(0x5000, 0x51ff).ram().w(FUNC(btime_state::bnj_background_w)).share("bnj_bgram");
310 	map(0x5200, 0x53ff).ram();
311 	map(0x5400, 0x5400).w(FUNC(btime_state::bnj_scroll1_w));
312 	map(0x5800, 0x5800).w(FUNC(btime_state::bnj_scroll2_w));
313 	map(0x5c00, 0x5c0f).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
314 	map(0xa000, 0xffff).rom();
315 }
316 
disco_map(address_map & map)317 void btime_state::disco_map(address_map &map)
318 {
319 	map(0x0000, 0x04ff).ram().share("rambase");
320 	map(0x2000, 0x7fff).ram().w(FUNC(btime_state::deco_charram_w)).share("deco_charram");
321 	map(0x8000, 0x83ff).ram().share("videoram");
322 	map(0x8400, 0x87ff).ram().share("colorram");
323 	map(0x8800, 0x881f).ram().share("spriteram");
324 	map(0x9000, 0x9000).portr("SYSTEM");
325 	map(0x9200, 0x9200).portr("P1");
326 	map(0x9400, 0x9400).portr("P2");
327 	map(0x9800, 0x9800).portr("DSW1");
328 	map(0x9a00, 0x9a00).portr("DSW2").w(m_soundlatch, FUNC(generic_latch_8_device::write));
329 	map(0x9c00, 0x9c00).portr("VBLANK").w(FUNC(btime_state::disco_video_control_w));
330 	map(0xa000, 0xffff).rom();
331 }
332 
protenn_map(address_map & map)333 void btime_state::protenn_map(address_map &map)
334 {
335 	disco_map(map);
336 
337 	map(0x9a00, 0x9a00).unmapr();
338 	map(0x9a01, 0x9a01).portr("DSW2");
339 }
340 
audio_map(address_map & map)341 void btime_state::audio_map(address_map &map)
342 {
343 	map(0x0000, 0x03ff).mirror(0x1c00).ram().share("audio_rambase");
344 	map(0x2000, 0x3fff).w("ay1", FUNC(ay8910_device::data_w));
345 	map(0x4000, 0x5fff).w("ay1", FUNC(ay8910_device::address_w));
346 	map(0x6000, 0x7fff).w("ay2", FUNC(ay8910_device::data_w));
347 	map(0x8000, 0x9fff).w("ay2", FUNC(ay8910_device::address_w));
348 	map(0xa000, 0xbfff).r(m_soundlatch, FUNC(generic_latch_8_device::read));
349 	map(0xc000, 0xdfff).w(FUNC(btime_state::audio_nmi_enable_w));
350 	map(0xe000, 0xefff).mirror(0x1000).rom();
351 }
352 
disco_audio_map(address_map & map)353 void btime_state::disco_audio_map(address_map &map)
354 {
355 	map(0x0000, 0x03ff).ram();
356 	map(0x4000, 0x4fff).w("ay1", FUNC(ay8910_device::data_w));
357 	map(0x5000, 0x5fff).w("ay1", FUNC(ay8910_device::address_w));
358 	map(0x6000, 0x6fff).w("ay2", FUNC(ay8910_device::data_w));
359 	map(0x7000, 0x7fff).w("ay2", FUNC(ay8910_device::address_w));
360 	map(0x8000, 0x8fff).rw(m_soundlatch, FUNC(generic_latch_8_device::read), FUNC(generic_latch_8_device::acknowledge_w));
361 	map(0xf000, 0xffff).rom();
362 }
363 
364 
INPUT_CHANGED_MEMBER(btime_state::coin_inserted_irq_hi)365 INPUT_CHANGED_MEMBER(btime_state::coin_inserted_irq_hi)
366 {
367 	if (newval)
368 		m_maincpu->set_input_line(0, HOLD_LINE);
369 }
370 
INPUT_CHANGED_MEMBER(btime_state::coin_inserted_irq_lo)371 INPUT_CHANGED_MEMBER(btime_state::coin_inserted_irq_lo)
372 {
373 	if (!newval)
374 		m_maincpu->set_input_line(0, HOLD_LINE);
375 }
376 
INPUT_CHANGED_MEMBER(btime_state::coin_inserted_nmi_lo)377 INPUT_CHANGED_MEMBER(btime_state::coin_inserted_nmi_lo)
378 {
379 	m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
380 }
381 
382 
zoar_dsw1_read()383 uint8_t btime_state::zoar_dsw1_read()
384 {
385 	return (!m_screen->vblank() << 7) | (ioport("DSW1")->read() & 0x7f);
386 }
387 
388 static INPUT_PORTS_START( btime )
389 	PORT_START("P1")
390 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
391 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
392 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY
393 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
394 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
395 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
396 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
397 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
398 
399 	PORT_START("P2")
400 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
401 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
402 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
403 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
404 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
405 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
406 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
407 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
408 
409 	PORT_START("SYSTEM")
410 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
411 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
412 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT )
413 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
414 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
415 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
416 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_hi, 0)
417 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_hi, 0)
418 
419 	PORT_START("DSW1") // At location 15D on sound PCB
420 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )     PORT_DIPLOCATION("SW1:1,2")
421 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
422 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
423 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
424 	PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
425 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )     PORT_DIPLOCATION("SW1:3,4")
426 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
427 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
428 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
429 	PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
430 	PORT_DIPNAME( 0x10, 0x10, "Leave Off" )           PORT_DIPLOCATION("SW1:5") // Must be OFF. No test mode in ROM
431 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )                                  // so this locks up the game at boot-up if on
432 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
433 	PORT_DIPUNUSED_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW1:6" )
434 	PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) )    PORT_DIPLOCATION("SW1:7")
435 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
436 	PORT_DIPSETTING(    0x40, DEF_STR( Cocktail ) )
437 //  PORT_DIPNAME( 0x80, 0x00, "Screen" )              PORT_DIPLOCATION("SW1:8") // Manual states this is Screen Invert
438 //  PORT_DIPSETTING(    0x00, "Normal" )
439 //  PORT_DIPSETTING(    0x80, "Invert" )
440 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM  ) PORT_VBLANK("screen")  // Schematics show this is connected to DIP SW2.8
441 
442 	PORT_START("DSW2") // At location 14D on sound PCB
443 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )      PORT_DIPLOCATION("SW2:1")
444 	PORT_DIPSETTING(    0x01, "3" )
445 	PORT_DIPSETTING(    0x00, "5" )
446 	PORT_DIPNAME( 0x06, 0x02, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:2,3")
447 	PORT_DIPSETTING(    0x06, "10000" )
448 	PORT_DIPSETTING(    0x04, "15000" )
449 	PORT_DIPSETTING(    0x02, "20000"  )
450 	PORT_DIPSETTING(    0x00, "30000"  )
451 	PORT_DIPNAME( 0x08, 0x08, "Enemies" )             PORT_DIPLOCATION("SW2:4")
452 	PORT_DIPSETTING(    0x08, "4" )
453 	PORT_DIPSETTING(    0x00, "6" )
454 	PORT_DIPNAME( 0x10, 0x00, "End of Level Pepper" ) PORT_DIPLOCATION("SW2:5")
455 	PORT_DIPSETTING(    0x10, DEF_STR( No ) )
456 	PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
457 	PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW2:6" )  // should be OFF according to the manual
458 	PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" )  // should be OFF according to the manual
459 	PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" )  // should be OFF according to the manual
460 INPUT_PORTS_END
461 
462 static INPUT_PORTS_START( btime3 ) // Used for btime3 and btimem
463 		PORT_INCLUDE( btime )
464 
465 	PORT_MODIFY("DSW1")
466 	PORT_DIPNAME( 0x30, 0x30, "Test Mode" )     PORT_DIPLOCATION("SW1:5,6")
467 	PORT_DIPSETTING(    0x30, DEF_STR( Off ) )
468 	PORT_DIPSETTING(    0x00, "Sound Test Only" )
469 	PORT_DIPSETTING(    0x10, "Cross Hatch Only" )
470 	PORT_DIPSETTING(    0x20, "Normal Test" )  // Use Coin A to advance the tests
471 
472 	PORT_MODIFY("DSW2")
473 	PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:2,3")
474 	PORT_DIPSETTING(    0x06, "30000" )
475 	PORT_DIPSETTING(    0x04, "50000" )
476 	PORT_DIPSETTING(    0x02, "80000"  )
477 	PORT_DIPSETTING(    0x00, DEF_STR( None ) )
478 INPUT_PORTS_END
479 
480 static INPUT_PORTS_START( cookrace )
481 	PORT_START("P1")
482 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
483 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
484 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
485 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
486 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
487 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
488 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
489 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
490 
491 	PORT_START("P2")
492 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
493 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
494 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
495 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
496 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
497 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
498 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
499 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
500 
501 	PORT_START("SYSTEM")
502 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
503 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
504 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
505 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 )
506 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 )
507 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
508 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
509 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
510 
511 	PORT_START("DSW1")
512 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )       PORT_DIPLOCATION("SW1:1,2")
513 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
514 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
515 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
516 	PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
517 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )       PORT_DIPLOCATION("SW1:3,4")
518 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
519 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
520 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
521 	PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
522 	PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW1:5" )
523 	PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW1:6" )
524 	PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) )      PORT_DIPLOCATION("SW1:7")
525 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
526 	PORT_DIPSETTING(    0x40, DEF_STR( Cocktail ) )
527 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM  ) PORT_VBLANK("screen") // Actually DIP SW2.8
528 
529 	PORT_START("DSW2")
530 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )        PORT_DIPLOCATION("SW2:1")
531 	PORT_DIPSETTING(    0x01, "3" )
532 	PORT_DIPSETTING(    0x00, "5" )
533 	PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) )   PORT_DIPLOCATION("SW2:2,3")
534 	PORT_DIPSETTING(    0x06, "20000" )
535 	PORT_DIPSETTING(    0x04, "30000" )
536 	PORT_DIPSETTING(    0x02, "40000"  )
537 	PORT_DIPSETTING(    0x00, "50000"  )
538 	PORT_DIPNAME( 0x08, 0x08, "Enemies" )               PORT_DIPLOCATION("SW2:4")
539 	PORT_DIPSETTING(    0x08, "4" )
540 	PORT_DIPSETTING(    0x00, "6" )
541 	PORT_DIPNAME( 0x10, 0x10, "End of Level Pepper" )   PORT_DIPLOCATION("SW2:5")
542 	PORT_DIPSETTING(    0x10, DEF_STR( No ) )
543 	PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
544 	PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" )
545 	PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Difficulty ) )   PORT_DIPLOCATION("SW2:7,8")
546 	PORT_DIPSETTING(    0xc0, DEF_STR( Easy ) )
547 	PORT_DIPSETTING(    0x80, DEF_STR( Normal ) )
548 	PORT_DIPSETTING(    0x40, DEF_STR( Hard ) )
549 	PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
550 INPUT_PORTS_END
551 
552 static INPUT_PORTS_START( zoar )
553 	PORT_START("P1")
554 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
555 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
556 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
557 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
558 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
559 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
560 	PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
561 
562 	PORT_START("P2")
563 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
564 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
565 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
566 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
567 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
568 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
569 	PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
570 
571 	PORT_START("SYSTEM")
572 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
573 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
574 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 )
575 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL
576 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
577 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
578 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_lo, 0)
579 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_lo, 0)
580 
581 	PORT_START("DSW1")
582 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )   PORT_DIPLOCATION("SW1:1,2")
583 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
584 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
585 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
586 	PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
587 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )   PORT_DIPLOCATION("SW1:3,4")
588 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
589 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
590 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
591 	PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
592 	PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW1:5" )  // Manual says bit 5 & 6 have to stay off
593 	PORT_DIPNAME( 0x20, 0x20, "Leave Off" )         PORT_DIPLOCATION("SW1:6")  // Must be OFF. No test mode in ROM
594 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )                                 // so this locks up the game at boot-up when on
595 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
596 	PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) )  PORT_DIPLOCATION("SW1:7")
597 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
598 	PORT_DIPSETTING(    0x40, DEF_STR( Cocktail ) )
599 //  PORT_DIPNAME( 0x80, 0x00, "Screen" )            PORT_DIPLOCATION("SW1:8")  // Manual says Screen Invert but it is not implimented
600 //  PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
601 //  PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
602 	// I can't use PORT_VBLANK as players would have almost no time to enter their initials
603 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM )  // Actually DIP SW2.8
604 
605 	PORT_START("DSW2")
606 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )      PORT_DIPLOCATION("SW2:1")
607 	PORT_DIPSETTING(    0x01, "3" )
608 	PORT_DIPSETTING(    0x00, "5" )
609 	PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:2,3")
610 	PORT_DIPSETTING(    0x06, "5000" )
611 	PORT_DIPSETTING(    0x04, "10000" )
612 	PORT_DIPSETTING(    0x02, "15000"  )
613 	PORT_DIPSETTING(    0x00, "20000"  )
614 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:4")
615 	PORT_DIPSETTING(    0x08, DEF_STR( Easy ) )
616 	PORT_DIPSETTING(    0x00, DEF_STR( Hard ) )
617 	PORT_DIPNAME( 0x10, 0x00, "Number Of Buttons" )   PORT_DIPLOCATION("SW2:5")  // Manual says 'Panel B'
618 	PORT_DIPSETTING(    0x00, "3 (Manual Weapon Select)" )                       // This removes a button as the cocktail has less buttons
619 	PORT_DIPSETTING(    0x10, "2 (Auto Weapon Select)" )                         // See notes in this driver at around line 80
620 	PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW2:6" )  // These 3 switches have something to do with coinage
621 	PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW2:7" )  // See code at $d234. Feel free to figure them out
622 	PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW2:8" )  // Manual says to leave them off
623 INPUT_PORTS_END
624 
625 static INPUT_PORTS_START( lnc )
626 	PORT_START("P1")
627 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
628 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
629 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY
630 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
631 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
632 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
633 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
634 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
635 
636 	PORT_START("P2")
637 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
638 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
639 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
640 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
641 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
642 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
643 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
644 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
645 
646 	PORT_START("SYSTEM")
647 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
648 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
649 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
650 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
651 
652 	PORT_START("DSW1")
653 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
654 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
655 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
656 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
657 	PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
658 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4")
659 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
660 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
661 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
662 	PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
663 	PORT_DIPNAME( 0x30, 0x30, "Test Mode" ) PORT_DIPLOCATION("SW1:5,6")  // Manual says these bits are unused
664 	PORT_DIPSETTING(    0x30, DEF_STR( Off ) )
665 	PORT_DIPSETTING(    0x00, "RAM Test Only" )
666 	PORT_DIPSETTING(    0x20, "Watchdog Test Only" )
667 	PORT_DIPSETTING(    0x10, "All Tests" )  // Use Coin A to advance the tests
668 	PORT_DIPNAME( 0x40, 0x00, "Control Panel" ) PORT_DIPLOCATION("SW1:7")
669 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
670 	PORT_DIPSETTING(    0x40, DEF_STR( Cocktail ) )
671 //  PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:8")
672 //  PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
673 //  PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
674 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM  ) PORT_VBLANK("screen")  // Actually DIP SW2.8
675 
676 	PORT_START("DSW2")
677 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1")
678 	PORT_DIPSETTING(    0x01, "3" )
679 	PORT_DIPSETTING(    0x00, "5" )
680 	PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:2,3")
681 	PORT_DIPSETTING(    0x06, "15000" )
682 	PORT_DIPSETTING(    0x04, "20000" )
683 	PORT_DIPSETTING(    0x02, "30000" )
684 	PORT_DIPSETTING(    0x00, DEF_STR( None ) )
685 	PORT_DIPNAME( 0x08, 0x08, "Game Speed" ) PORT_DIPLOCATION("SW2:4")
686 	PORT_DIPSETTING(    0x08, "Slow" )
687 	PORT_DIPSETTING(    0x00, "Fast" )
688 	PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:5" )  // should be OFF according to the manual */
689 	PORT_DIPUNUSED_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" )  // should be OFF according to the manual */
690 	PORT_DIPUNUSED_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW2:7" )  // should be OFF according to the manual */
691 	PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" )  // should be OFF according to the manual */
692 INPUT_PORTS_END
693 
694 static INPUT_PORTS_START( wtennis )
695 	PORT_START("P1")
696 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
697 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
698 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
699 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
700 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
701 	PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN )
702 
703 	PORT_START("P2")
704 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
705 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
706 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
707 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
708 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
709 	PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN )
710 
711 	PORT_START("SYSTEM")
712 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
713 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
714 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
715 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
716 
717 	PORT_START("DSW1")
718 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_B ) )    PORT_DIPLOCATION("SW1:1,2")
719 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
720 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
721 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
722 	PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
723 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) )    PORT_DIPLOCATION("SW1:3,4")
724 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
725 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
726 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
727 	PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
728 	PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW1:5" )
729 	PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW1:6" )
730 	PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) )   PORT_DIPLOCATION("SW1:7")
731 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
732 	PORT_DIPSETTING(    0x40, DEF_STR( Cocktail ) )
733 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM  ) PORT_VBLANK("screen")  // Actually DIP SW2.8
734 
735 	PORT_START("DSW2")
736 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )        PORT_DIPLOCATION("SW2:1")
737 	PORT_DIPSETTING(    0x01, "2" )
738 	PORT_DIPSETTING(    0x00, "3" )
739 	PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) )   PORT_DIPLOCATION("SW2:2,3")
740 	PORT_DIPSETTING(    0x06, "10000" )
741 	PORT_DIPSETTING(    0x04, "20000" )
742 	PORT_DIPSETTING(    0x02, "30000" )
743 	PORT_DIPSETTING(    0x00, DEF_STR( None ) )
744 	PORT_DIPUNKNOWN_DIPLOC( 0x08, IP_ACTIVE_LOW, "SW2:4" )  // definitely used
745 	PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:5" )
746 	PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" )  // Switches 6,7,8
747 	PORT_DIPUNKNOWN_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW2:7" )  // have something to do
748 	PORT_DIPUNKNOWN_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" )  // with coinage.
749 INPUT_PORTS_END
750 
751 static INPUT_PORTS_START( mmonkey )
752 	PORT_START("P1")
753 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
754 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
755 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY
756 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
757 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
758 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
759 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
760 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
761 
762 	PORT_START("P2")
763 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
764 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
765 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
766 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
767 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
768 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
769 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
770 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
771 
772 	PORT_START("SYSTEM")
773 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
774 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
775 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
776 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
777 
778 	PORT_START("DSW1")
779 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )      PORT_DIPLOCATION("SW1:1,2")
780 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
781 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
782 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
783 	PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
784 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )      PORT_DIPLOCATION("SW1:3,4")
785 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
786 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
787 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
788 	PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
789 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Free_Play ) )   PORT_DIPLOCATION("SW1:5")
790 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
791 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
792 	PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW1:6" )  // almost certainly unused
793 	PORT_DIPNAME( 0x40, 0x00, "Control Panel" )        PORT_DIPLOCATION("SW1:7")
794 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
795 	PORT_DIPSETTING(    0x40, DEF_STR( Cocktail ) )
796 //  PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )     PORT_DIPLOCATION("SW1:8")
797 //  PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
798 //  PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
799 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM  ) PORT_VBLANK("screen")  // Actually DIP SW2.8
800 
801 	PORT_START("DSW2")
802 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )          PORT_DIPLOCATION("SW2:1")
803 	PORT_DIPSETTING(    0x01, "3" )
804 	PORT_DIPSETTING(    0x00, "5" )
805 	PORT_DIPNAME( 0x06, 0x00, DEF_STR( Bonus_Life ) )     PORT_DIPLOCATION("SW2:2,3")
806 	PORT_DIPSETTING(    0x02, "Every 15000" )
807 	PORT_DIPSETTING(    0x04, "Every 30000" )
808 	PORT_DIPSETTING(    0x00, "20000" )
809 	PORT_DIPSETTING(    0x06, DEF_STR( None ) )
810 	PORT_DIPNAME( 0x18, 0x08, DEF_STR( Difficulty ) )     PORT_DIPLOCATION("SW2:4,5")
811 	PORT_DIPSETTING(    0x18, DEF_STR( Easy ) )
812 	PORT_DIPSETTING(    0x08, DEF_STR( Medium ) )
813 	PORT_DIPSETTING(    0x10, DEF_STR( Hard ) )
814 	PORT_DIPSETTING(    0x00, "Level Skip Mode (Cheat)")
815 	PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW2:6" )  // almost certainly unused
816 	PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" )  // almost certainly unused
817 	PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" )
818 INPUT_PORTS_END
819 
820 static INPUT_PORTS_START( bnj )
821 	PORT_START("P1")
822 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
823 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
824 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
825 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
826 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
827 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
828 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
829 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
830 
831 	PORT_START("P2")
832 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
833 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
834 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
835 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
836 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
837 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
838 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
839 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
840 
841 	PORT_START("SYSTEM")
842 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT )
843 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
844 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
845 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
846 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
847 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
848 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
849 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
850 
851 	PORT_START("DSW1") // At location 8D
852 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
853 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
854 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
855 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
856 	PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
857 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4")
858 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
859 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
860 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
861 	PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
862 	PORT_DIPNAME( 0x30, 0x30, "Test Mode" ) PORT_DIPLOCATION("SW1:5,6")
863 	PORT_DIPSETTING(    0x30, DEF_STR( Off ) )
864 	PORT_DIPSETTING(    0x20, "All Tests" )  // Use Coin A to advance the tests
865 	PORT_DIPSETTING(    0x00, "RAM Test Only" )
866 	PORT_DIPSETTING(    0x10, "No Effect" )
867 	PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:7")
868 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
869 	PORT_DIPSETTING(    0x40, DEF_STR( Cocktail ) )
870 	// According to crazykong.com dips this should change the control layout
871 //  PORT_DIPNAME( 0x80, 0x00, "Control Panel" ) PORT_DIPLOCATION("SW1:8")
872 //  PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
873 //  PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
874 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM  ) PORT_VBLANK("screen")  // Schematics show this is connected to DIP SW2.8
875 
876 	PORT_START("DSW2") // At location 7D
877 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )          PORT_DIPLOCATION("SW2:1")
878 	PORT_DIPSETTING(    0x01, "3" )
879 	PORT_DIPSETTING(    0x00, "5" )
880 	PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) )     PORT_DIPLOCATION("SW2:2,3")
881 	PORT_DIPSETTING(    0x06, "Every 30000" )
882 	PORT_DIPSETTING(    0x04, "Every 70000" )
883 	PORT_DIPSETTING(    0x02, "20000 Only"  )
884 	PORT_DIPSETTING(    0x00, "30000 Only"  )
885 	PORT_DIPNAME( 0x08, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:4")
886 	PORT_DIPSETTING(    0x08, DEF_STR( No ) )
887 	PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
888 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) )     PORT_DIPLOCATION("SW2:5")
889 	PORT_DIPSETTING(    0x10, DEF_STR( Easy ) )
890 	PORT_DIPSETTING(    0x00, DEF_STR( Hard ) )
891 	PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" )  // it should be OFF according to the manual
892 	PORT_DIPUNKNOWN_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW2:7" )  // it should be OFF according to the manual
893 	PORT_DIPUNKNOWN_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" )  // it should be OFF according to the manual
894 INPUT_PORTS_END
895 
896 
897 static INPUT_PORTS_START( brubber ) // no test mode for brubber
898 		PORT_INCLUDE( bnj )
899 
900 		PORT_MODIFY("DSW1")
901 	PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW1:5" )
902 	PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW1:6" )
903 INPUT_PORTS_END
904 
905 
906 static INPUT_PORTS_START( caractn2 ) // Lives DIP changes in this set
907 		PORT_INCLUDE( brubber )
908 
909 		PORT_MODIFY("DSW2")
910 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1")
911 	PORT_DIPSETTING(    0x01, "2" )
912 	PORT_DIPSETTING(    0x00, "3" )
913 INPUT_PORTS_END
914 
915 static INPUT_PORTS_START( disco )
916 	PORT_START("P1")
917 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
918 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
919 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
920 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
921 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
922 	PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED )
923 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 )
924 
925 	PORT_START("P2")
926 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
927 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
928 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
929 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
930 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
931 	PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED )
932 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )
933 
934 	PORT_START("SYSTEM")
935 	PORT_BIT( 0x1f, IP_ACTIVE_LOW, IPT_UNUSED )
936 	PORT_BIT( 0x40, IP_ACTIVE_HIGH,IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_hi, 0)
937 	PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_hi, 0)
938 
939 	PORT_START("DSW1")
940 	PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) )     PORT_DIPLOCATION("SW1:!1,!2")
941 	PORT_DIPSETTING(    0x03, DEF_STR( 2C_1C ) )
942 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
943 	PORT_DIPSETTING(    0x01, DEF_STR( 1C_2C ) )
944 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_3C ) )
945 	PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_B ) )     PORT_DIPLOCATION("SW1:!3,!4")
946 	PORT_DIPSETTING(    0x0c, DEF_STR( 2C_1C ) )
947 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
948 	PORT_DIPSETTING(    0x04, DEF_STR( 1C_2C ) )
949 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_3C ) )
950 	PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW1:!5" )
951 	PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x00, "SW1:!6" )
952 	PORT_DIPNAME( 0x40, 0x40, "Control Panel" )       PORT_DIPLOCATION("SW1:!7")
953 	PORT_DIPSETTING(    0x40, DEF_STR( Upright ) )
954 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
955 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )    PORT_DIPLOCATION("SW1:!8")
956 	PORT_DIPSETTING(    0x80, DEF_STR( Upright ) )
957 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
958 
959 	PORT_START("DSW2")
960 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) )      PORT_DIPLOCATION("SW2:!1")
961 	PORT_DIPSETTING(    0x00, "3" )
962 	PORT_DIPSETTING(    0x01, "5" )
963 	PORT_DIPNAME( 0x06, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:!2,!3")
964 	PORT_DIPSETTING(    0x00, "10000" )
965 	PORT_DIPSETTING(    0x02, "20000" )
966 	PORT_DIPSETTING(    0x04, "30000" )
967 	PORT_DIPSETTING(    0x06, DEF_STR( None ) )
968 	PORT_DIPNAME( 0x08, 0x00, "Music Weapons" )       PORT_DIPLOCATION("SW2:!4")
969 	PORT_DIPSETTING(    0x00, "5" )
970 	PORT_DIPSETTING(    0x08, "8" )
971 	PORT_DIPNAME( 0x10, 0x00, "Game Speed" )          PORT_DIPLOCATION("SW2:!5")
972 	PORT_DIPSETTING(    0x00, "Slow" )
973 	PORT_DIPSETTING(    0x10, "Fast" )
974 	PORT_DIPNAME( 0xe0, 0x00, "Country Code" )        PORT_DIPLOCATION("SW2:!6,!7,!8")
975 	PORT_DIPSETTING(    0x00, "A" )
976 	PORT_DIPSETTING(    0x20, "B" )
977 	PORT_DIPSETTING(    0x40, "C" )
978 	PORT_DIPSETTING(    0x60, "D" )
979 	PORT_DIPSETTING(    0x80, "E" )
980 	PORT_DIPSETTING(    0xa0, "F" )
981 
982 	PORT_START("VBLANK")
983 	PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED )
984 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
985 INPUT_PORTS_END
986 
987 static INPUT_PORTS_START( protenn )
988 	PORT_START("P1")
989 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
990 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
991 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
992 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
993 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
994 	PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED )
995 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 )
996 
997 	PORT_START("P2")
998 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
999 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
1000 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
1001 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
1002 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
1003 	PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED )
1004 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )
1005 
1006 	PORT_START("SYSTEM")
1007 	PORT_BIT( 0x1f, IP_ACTIVE_LOW, IPT_UNUSED )
1008 	PORT_BIT( 0x40, IP_ACTIVE_HIGH,IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_hi, 0)
1009 	PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_hi, 0)
1010 
1011 	PORT_START("DSW1")
1012 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )       PORT_DIPLOCATION("SW1:1,2")
1013 	PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
1014 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
1015 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
1016 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
1017 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )       PORT_DIPLOCATION("SW1:3,4")
1018 	PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
1019 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
1020 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
1021 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
1022 	PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW1:5" )
1023 	PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW1:6" )
1024 	PORT_DIPNAME( 0x40, 0x40, "Control Panel" )         PORT_DIPLOCATION("SW1:7")
1025 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
1026 	PORT_DIPSETTING(    0x40, DEF_STR( Upright ) )
1027 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )      PORT_DIPLOCATION("SW1:8")
1028 	PORT_DIPSETTING(    0x80, DEF_STR( Upright ) )
1029 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
1030 
1031 	PORT_START("DSW2")
1032 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )        PORT_DIPLOCATION("SW2:1")
1033 	PORT_DIPSETTING(    0x01, "2" )
1034 	PORT_DIPSETTING(    0x00, "3" )
1035 	PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) )   PORT_DIPLOCATION("SW2:2,3")
1036 	PORT_DIPSETTING(    0x06, "10000" )
1037 	PORT_DIPSETTING(    0x04, "20000" )
1038 	PORT_DIPSETTING(    0x02, "30000" )
1039 	PORT_DIPSETTING(    0x00, DEF_STR( None ) )
1040 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Difficulty ) )   PORT_DIPLOCATION("SW2:4")
1041 	PORT_DIPSETTING(    0x08, "Amateur" )
1042 	PORT_DIPSETTING(    0x00, "Professional" )
1043 	PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:5" )
1044 	PORT_DIPNAME( 0xe0, 0xe0, "Country Code" )          PORT_DIPLOCATION("SW2:6,7,8")  // Listed as "DON'T CHANGE"
1045 	PORT_DIPSETTING(    0xe0, "A" )
1046 	PORT_DIPSETTING(    0xc0, "B" )
1047 	PORT_DIPSETTING(    0xa0, "C" )
1048 	PORT_DIPSETTING(    0x80, "D" )
1049 	PORT_DIPSETTING(    0x60, "E" )
1050 	PORT_DIPSETTING(    0x40, "F" )
1051 
1052 	PORT_START("VBLANK")
1053 	PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED )
1054 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
1055 INPUT_PORTS_END
1056 
1057 static INPUT_PORTS_START( sdtennis )
1058 	PORT_START("P1")
1059 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
1060 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
1061 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
1062 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
1063 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
1064 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1065 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
1066 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
1067 
1068 	PORT_START("P2")
1069 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
1070 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
1071 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
1072 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
1073 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
1074 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1075 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
1076 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
1077 
1078 	PORT_START("SYSTEM")
1079 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT )
1080 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
1081 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
1082 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
1083 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
1084 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1085 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
1086 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
1087 
1088 	PORT_START("DSW1")
1089 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )       PORT_DIPLOCATION("SW1:1,2")
1090 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
1091 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
1092 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
1093 	PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
1094 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )       PORT_DIPLOCATION("SW1:3,4")
1095 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
1096 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
1097 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
1098 	PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
1099 	PORT_DIPNAME( 0x30, 0x30, "Test Mode" )             PORT_DIPLOCATION("SW1:5,6")
1100 	PORT_DIPSETTING(    0x30, DEF_STR( Off ) )
1101 	PORT_DIPSETTING(    0x20, "All Tests" )  // Use Coin A to advance the tests
1102 	PORT_DIPSETTING(    0x00, "Video Tests Only" )
1103 	PORT_DIPSETTING(    0x10, "No Effect" )
1104 	PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) )      PORT_DIPLOCATION("SW1:7")
1105 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
1106 	PORT_DIPSETTING(    0x40, DEF_STR( Cocktail ) )
1107 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM  ) PORT_VBLANK("screen")  // Actually DIP SW2.8
1108 
1109 	PORT_START("DSW2")
1110 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )        PORT_DIPLOCATION("SW2:1")
1111 	PORT_DIPSETTING(    0x00, "1" )
1112 	PORT_DIPSETTING(    0x01, "2" )
1113 	PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) )   PORT_DIPLOCATION("SW2:2,3")
1114 	PORT_DIPSETTING(    0x06, "1 Set won" )
1115 	PORT_DIPSETTING(    0x04, "2 Sets won" )
1116 	PORT_DIPSETTING(    0x02, "3 Sets won"  )
1117 	PORT_DIPSETTING(    0x00, DEF_STR( None )  )
1118 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )      PORT_DIPLOCATION("SW2:4")  // Check code at 0xc55b
1119 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
1120 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1121 	PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:5" )  // Check code at 0xc5af
1122 	PORT_DIPNAME( 0xe0, 0xe0, "Copyright" )             PORT_DIPLOCATION("SW2:6,7,8")
1123 	PORT_DIPSETTING(    0xc0, "Data East USA" )
1124 	PORT_DIPSETTING(    0xe0, "Data East Corporation" )
1125 	PORT_DIPSETTING(    0x80, "Data East Corporation" )
1126 	PORT_DIPSETTING(    0x00, "Data East Corporation" )
1127 	PORT_DIPSETTING(    0x60, "Special: Coin A 3 Credits, Coin B 8 Credits" )
1128 	// Only two copyrights show. Other values are the same as 0xe0
1129 	// 0x60 gives a special coinage : COIN1 gives 3 credits and COIN2 gives 8 credits
1130 	// and the coinage DIP switches are ignored in this case
1131 INPUT_PORTS_END
1132 
1133 static const gfx_layout tile8layout =
1134 {
1135 	8,8,
1136 	RGN_FRAC(1,3),
1137 	3,
1138 	{ RGN_FRAC(2,3), RGN_FRAC(1,3), RGN_FRAC(0,3) },
1139 	{ STEP8(0,1) },
1140 	{ STEP8(0,8) },
1141 	8*8
1142 };
1143 
1144 static const gfx_layout disco_tile8layout =
1145 {
1146 	8,8,
1147 	0x6000/3/8,
1148 	3,
1149 	{ 0x4000*8, 0x2000*8, 0x0000*8 },
1150 	{ STEP8(0,1) },
1151 	{ STEP8(0,8) },
1152 	8*8
1153 };
1154 
1155 
1156 static const gfx_layout tile16layout =
1157 {
1158 	16,16,
1159 	RGN_FRAC(1,3),
1160 	3,
1161 	{ RGN_FRAC(2,3), RGN_FRAC(1,3), RGN_FRAC(0,3) },
1162 	{ STEP8(16*8,1), STEP8(0,1) },
1163 	{ STEP16(0,8) },
1164 	32*8
1165 };
1166 
1167 static const gfx_layout disco_tile16layout =
1168 {
1169 	16,16,
1170 	0x6000/3/32,
1171 	3,
1172 	{ 0x4000*8, 0x2000*8, 0x0000*8 },
1173 	{ STEP8(16*8,1), STEP8(0,1) },
1174 	{ STEP16(0,8) },
1175 	32*8
1176 };
1177 
1178 static const gfx_layout bnj_tile16layout =
1179 {
1180 	16,16,
1181 	RGN_FRAC(1,2),
1182 	3,
1183 	{ RGN_FRAC(1,2)+4, RGN_FRAC(0,2)+0, RGN_FRAC(0,2)+4 },
1184 	{ STEP4(3*16*8,1), STEP4(2*16*8,1), STEP4(1*16*8,1), STEP4(0*16*8,1) },
1185 	{ STEP16(0,8) },
1186 	64*8
1187 };
1188 
1189 static GFXDECODE_START( gfx_btime )
1190 	GFXDECODE_ENTRY( "gfx1", 0, tile8layout,     0, 1 ) /* char set #1 */
1191 	GFXDECODE_ENTRY( "gfx1", 0, tile16layout,    0, 1 ) /* sprites */
1192 	GFXDECODE_ENTRY( "gfx2", 0, tile16layout,    8, 1 ) /* background tiles */
1193 GFXDECODE_END
1194 
1195 static GFXDECODE_START( gfx_cookrace )
1196 	GFXDECODE_ENTRY( "gfx1", 0, tile8layout,     0, 1 ) /* char set #1 */
1197 	GFXDECODE_ENTRY( "gfx1", 0, tile16layout,    0, 1 ) /* sprites */
1198 	GFXDECODE_ENTRY( "gfx2", 0, tile8layout,     8, 1 ) /* background tiles */
1199 GFXDECODE_END
1200 
1201 static GFXDECODE_START( gfx_lnc )
1202 	GFXDECODE_ENTRY( "gfx1", 0, tile8layout,     0, 1 ) /* char set #1 */
1203 	GFXDECODE_ENTRY( "gfx1", 0, tile16layout,    0, 1 ) /* sprites */
1204 GFXDECODE_END
1205 
1206 static GFXDECODE_START( gfx_bnj )
1207 	GFXDECODE_ENTRY( "gfx1", 0, tile8layout,     0, 1 ) /* char set #1 */
1208 	GFXDECODE_ENTRY( "gfx1", 0, tile16layout,    0, 1 ) /* sprites */
1209 	GFXDECODE_ENTRY( "gfx2", 0, bnj_tile16layout,8, 1 ) /* background tiles */
1210 GFXDECODE_END
1211 
1212 static GFXDECODE_START( gfx_zoar )
1213 	GFXDECODE_ENTRY( "gfx1", 0, tile8layout,     0, 8 ) /* char set #1 */
1214 	GFXDECODE_ENTRY( "gfx3", 0, tile16layout,    0, 8 ) /* sprites */
1215 	GFXDECODE_ENTRY( "gfx2", 0, tile16layout,    0, 8 ) /* background tiles */
1216 GFXDECODE_END
1217 
1218 static GFXDECODE_START( gfx_disco )
1219 	GFXDECODE_ENTRY( nullptr, 0, disco_tile8layout,  0, 4 ) /* char set #1 */
1220 	GFXDECODE_ENTRY( nullptr, 0, disco_tile16layout, 0, 4 ) /* sprites */
1221 GFXDECODE_END
1222 
1223 /***************************************************************************
1224   Discrete Filtering and Mixing
1225 
1226   All values taken from Burger Time Schematics.
1227 
1228  ****************************************************************************/
1229 
1230 static const discrete_mixer_desc btime_sound_mixer_desc =
1231 	{DISC_MIXER_IS_OP_AMP,
1232 		{RES_K(100), RES_K(100)},
1233 		{0,0},  /* no variable resistors   */
1234 		{0,0},  /* no node capacitors      */
1235 		0,      /* no RI */
1236 		RES_K(10),
1237 		CAP_P(150),
1238 		0,      /* Modelled separately */
1239 		0, 1};
1240 
1241 /* R49 has 4.7k in schematics, but listed as 47k in bill of material
1242  * 47k gives proper low pass filtering
1243  *
1244  * Anoid measured R49 to R52 on a Burger Time pcb. These are
1245  * listed below
1246  */
1247 #define BTIME_R49   RES_K(47)   /* pcb: 47.4k */
1248 
1249 /* The input divider R51 R50 is not independent of R52, which
1250  * also depends on ay internal resistance.
1251  * FIXME: Develop proper model when I am retired.
1252  *
1253  * With R51 being 1K, the gain is way to high (23.5). Therefore R51
1254  * is set to 5k, but this is a hack. With the modification,
1255  * sound levels are in line with observations.
1256  * R51,R50,R52 and R49 verified on real pcb by Anoid.
1257  *
1258  * http://www.coinopvideogames.com/videogames01.php
1259  * There are two recordings from 1982 where the filtered sound is way louder
1260  * than the music. There is a later recording
1261  * http://www.coinopvideogames.com/videogames03.php
1262  * in which the filtered sounds have volumes closer to the music.
1263  *
1264  */
1265 
1266 #define BTIME_R52   RES_K(1)    /* pcb: .912k = 1K || 11k */
1267 #define BTIME_R51   RES_K(5)    /* pcb: .923k = 1k || 11k schematics 1k */
1268 #define BTIME_R50   RES_K(10)   /* pcb: 1.667k = 10k || 2k */
1269 
1270 static const discrete_op_amp_filt_info btime_opamp_desc =
1271 	{BTIME_R51, 0, BTIME_R50, 0, BTIME_R49, CAP_U(0.068), CAP_U(0.068), 0, 0, 5.0, -5.0};
1272 
1273 static DISCRETE_SOUND_START( btime_sound_discrete )
1274 
1275 	DISCRETE_INPUTX_STREAM(NODE_01, 0, 5.0/32767.0, 0)
1276 	DISCRETE_INPUTX_STREAM(NODE_02, 1, 5.0/32767.0, 0)
1277 	DISCRETE_INPUTX_STREAM(NODE_03, 2, 5.0/32767.0, 0)
1278 
1279 	DISCRETE_INPUTX_STREAM(NODE_04, 3, 5.0/32767.0, 0)
1280 	DISCRETE_INPUTX_STREAM(NODE_05, 4, 5.0/32767.0, 0)
1281 	DISCRETE_INPUTX_STREAM(NODE_06, 5, 5.0/32767.0, 0)
1282 
1283 	/* Mix 5 channels 1A, 1B, 1C, 2B, 2C directly */
1284 	DISCRETE_ADDER3(NODE_20, 1, NODE_01, NODE_02, NODE_03)
1285 	DISCRETE_ADDER3(NODE_21, 1, NODE_20, NODE_05, NODE_06)
1286 	DISCRETE_MULTIPLY(NODE_22, NODE_21, 0.2)
1287 
1288 	/* Filter of channel 2A */
1289 	DISCRETE_OP_AMP_FILTER(NODE_30, 1, NODE_04, NODE_NC, DISC_OP_AMP_FILTER_IS_BAND_PASS_1M, &btime_opamp_desc)
1290 
1291 	DISCRETE_MIXER2(NODE_40, 1, NODE_22, NODE_30, &btime_sound_mixer_desc)
1292 	DISCRETE_CRFILTER(NODE_41, NODE_40, RES_K(10), CAP_U(10))
1293 
1294 	/* Amplifier is upc1181H3
1295 	 *
1296 	 * http://www.ic-ts-histo.de/fad/ics/upc1181/upc1181.htm
1297 	 *
1298 	 * A linear frequency response is mentioned as well as a lower
1299 	 * edge frequency determined by cap on pin3, however no formula given.
1300 	 *
1301 	 * not modelled here
1302 	 */
1303 
1304 	/* Assuming a 4 Ohm impedance speaker */
1305 	DISCRETE_CRFILTER(NODE_43, NODE_41, 3.0, CAP_U(100))
1306 
1307 	DISCRETE_OUTPUT(NODE_43, 32767.0 / 5. * 35.0)
1308 
1309 DISCRETE_SOUND_END
1310 
1311 
MACHINE_START_MEMBER(btime_state,btime)1312 MACHINE_START_MEMBER(btime_state,btime)
1313 {
1314 	save_item(NAME(m_btime_palette));
1315 	save_item(NAME(m_bnj_scroll1));
1316 	save_item(NAME(m_bnj_scroll2));
1317 	save_item(NAME(m_btime_tilemap));
1318 }
1319 
MACHINE_START_MEMBER(btime_state,mmonkey)1320 MACHINE_START_MEMBER(btime_state,mmonkey)
1321 {
1322 	MACHINE_START_CALL_MEMBER(btime);
1323 
1324 	save_item(NAME(m_protection_command));
1325 	save_item(NAME(m_protection_status));
1326 	save_item(NAME(m_protection_value));
1327 	save_item(NAME(m_protection_ret));
1328 }
1329 
MACHINE_RESET_MEMBER(btime_state,btime)1330 MACHINE_RESET_MEMBER(btime_state,btime)
1331 {
1332 	/* by default, the audio NMI is disabled, except for bootlegs which don't use the enable */
1333 	if (m_audionmi.found())
1334 		m_audionmi->in_w<0>(0);
1335 
1336 	m_btime_palette = 0;
1337 	m_bnj_scroll1 = 0;
1338 	m_bnj_scroll2 = 0;
1339 	m_btime_tilemap[0] = 0;
1340 	m_btime_tilemap[1] = 0;
1341 	m_btime_tilemap[2] = 0;
1342 	m_btime_tilemap[3] = 0;
1343 }
1344 
MACHINE_RESET_MEMBER(btime_state,lnc)1345 MACHINE_RESET_MEMBER(btime_state,lnc)
1346 {
1347 	*m_lnc_charbank = 1;
1348 
1349 	MACHINE_RESET_CALL_MEMBER(btime);
1350 }
1351 
MACHINE_RESET_MEMBER(btime_state,mmonkey)1352 MACHINE_RESET_MEMBER(btime_state,mmonkey)
1353 {
1354 	MACHINE_RESET_CALL_MEMBER(lnc);
1355 
1356 	m_protection_command = 0;
1357 	m_protection_status = 0;
1358 	m_protection_value = 0;
1359 	m_protection_ret = 0;
1360 }
1361 
btime(machine_config & config)1362 void btime_state::btime(machine_config &config)
1363 {
1364 	/* basic machine hardware */
1365 	DECO_CPU7(config, m_maincpu, HCLK2);   /* selectable between H2/H4 via jumper */
1366 	m_maincpu->set_addrmap(AS_PROGRAM, &btime_state::btime_map);
1367 
1368 	M6502(config, m_audiocpu, HCLK1/3/2);
1369 	m_audiocpu->set_addrmap(AS_PROGRAM, &btime_state::audio_map);
1370 	TIMER(config, "8vck").configure_scanline(FUNC(btime_state::audio_nmi_gen), "screen", 0, 8);
1371 
1372 	INPUT_MERGER_ALL_HIGH(config, "audionmi").output_handler().set_inputline(m_audiocpu, INPUT_LINE_NMI);
1373 
1374 	/* video hardware */
1375 	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
1376 	m_screen->set_raw(HCLK, 384, 8, 248, 272, 8, 248);
1377 	m_screen->set_screen_update(FUNC(btime_state::screen_update_btime));
1378 	m_screen->set_palette(m_palette);
1379 
1380 	MCFG_MACHINE_START_OVERRIDE(btime_state,btime)
1381 	MCFG_MACHINE_RESET_OVERRIDE(btime_state,btime)
1382 
1383 	GFXDECODE(config, m_gfxdecode, m_palette, gfx_btime);
1384 	PALETTE(config, m_palette, FUNC(btime_state::btime_palette)).set_format(palette_device::BGR_233_inverted, 16);
1385 
1386 	/* sound hardware */
1387 	SPEAKER(config, "mono").front_center();
1388 
1389 	GENERIC_LATCH_8(config, m_soundlatch);
1390 	m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0);
1391 
1392 	ay8910_device &ay1(AY8910(config, "ay1", HCLK2));
1393 	ay1.set_flags(AY8910_DISCRETE_OUTPUT);
1394 	ay1.set_resistors_load(RES_K(5), RES_K(5), RES_K(5));
1395 	ay1.port_a_write_callback().set(FUNC(btime_state::ay_audio_nmi_enable_w));
1396 	ay1.add_route(0, "discrete", 1.0, 0);
1397 	ay1.add_route(1, "discrete", 1.0, 1);
1398 	ay1.add_route(2, "discrete", 1.0, 2);
1399 
1400 	ay8910_device &ay2(AY8910(config, "ay2", HCLK2));
1401 	ay2.set_flags(AY8910_DISCRETE_OUTPUT);
1402 	ay2.set_resistors_load(RES_K(1), RES_K(5), RES_K(5));
1403 	ay2.add_route(0, "discrete", 1.0, 3);
1404 	ay2.add_route(1, "discrete", 1.0, 4);
1405 	ay2.add_route(2, "discrete", 1.0, 5);
1406 
1407 	DISCRETE(config, "discrete", btime_sound_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
1408 }
1409 
1410 
cookrace(machine_config & config)1411 void btime_state::cookrace(machine_config &config)
1412 {
1413 	btime(config);
1414 
1415 	/* basic machine hardware */
1416 	DECO_C10707(config.replace(), m_maincpu, HCLK2);
1417 	m_maincpu->set_addrmap(AS_PROGRAM, &btime_state::cookrace_map);
1418 
1419 	m_audiocpu->set_addrmap(AS_PROGRAM, &btime_state::audio_map);
1420 
1421 	/* video hardware */
1422 	m_gfxdecode->set_info(gfx_cookrace);
1423 	m_screen->set_screen_update(FUNC(btime_state::screen_update_cookrace));
1424 }
1425 
1426 
lnc(machine_config & config)1427 void btime_state::lnc(machine_config &config)
1428 {
1429 	btime(config);
1430 
1431 	/* basic machine hardware */
1432 	DECO_C10707(config.replace(), m_maincpu, HCLK2);
1433 	m_maincpu->set_addrmap(AS_PROGRAM, &btime_state::lnc_map);
1434 
1435 	MCFG_MACHINE_RESET_OVERRIDE(btime_state,lnc)
1436 
1437 	/* video hardware */
1438 	m_gfxdecode->set_info(gfx_lnc);
1439 
1440 	m_palette->set_entries(8);
1441 	m_palette->set_init(FUNC(btime_state::lnc_palette));
1442 
1443 	m_screen->set_screen_update(FUNC(btime_state::screen_update_lnc));
1444 }
1445 
1446 
wtennis(machine_config & config)1447 void btime_state::wtennis(machine_config &config)
1448 {
1449 	lnc(config);
1450 
1451 	/* video hardware */
1452 	m_screen->set_screen_update(FUNC(btime_state::screen_update_eggs));
1453 }
1454 
1455 
mmonkey(machine_config & config)1456 void btime_state::mmonkey(machine_config &config)
1457 {
1458 	wtennis(config);
1459 
1460 	/* basic machine hardware */
1461 	m_maincpu->set_addrmap(AS_PROGRAM, &btime_state::mmonkey_map);
1462 
1463 	MCFG_MACHINE_START_OVERRIDE(btime_state,mmonkey)
1464 	MCFG_MACHINE_RESET_OVERRIDE(btime_state,mmonkey)
1465 }
1466 
bnj(machine_config & config)1467 void btime_state::bnj(machine_config &config)
1468 {
1469 	btime(config);
1470 
1471 	/* basic machine hardware */
1472 	DECO_C10707(config.replace(), m_maincpu, HCLK4);
1473 	m_maincpu->set_addrmap(AS_PROGRAM, &btime_state::bnj_map);
1474 
1475 	/* video hardware */
1476 	m_gfxdecode->set_info(gfx_bnj);
1477 
1478 	MCFG_VIDEO_START_OVERRIDE(btime_state,bnj)
1479 
1480 	m_screen->set_screen_update(FUNC(btime_state::screen_update_bnj));
1481 	m_screen->set_visarea(0*8, 32*8-1, 1*8, 31*8-1); // 256 * 240, confirmed
1482 }
1483 
1484 
sdtennis(machine_config & config)1485 void btime_state::sdtennis(machine_config &config)
1486 {
1487 	bnj(config);
1488 
1489 	/* basic machine hardware */
1490 	DECO_C10707(config.replace(), m_audiocpu, HCLK1/3/2);
1491 	m_audiocpu->set_addrmap(AS_PROGRAM, &btime_state::audio_map);
1492 }
1493 
1494 
zoar(machine_config & config)1495 void btime_state::zoar(machine_config &config)
1496 {
1497 	btime(config);
1498 
1499 	/* basic machine hardware */
1500 	m_maincpu->set_addrmap(AS_PROGRAM, &btime_state::zoar_map);
1501 
1502 	/* video hardware */
1503 	m_gfxdecode->set_info(gfx_zoar);
1504 
1505 	m_palette->set_entries(64);
1506 
1507 	m_screen->set_screen_update(FUNC(btime_state::screen_update_zoar));
1508 	m_screen->set_visarea(0*8, 32*8-1, 1*8, 31*8-1); // 256 * 240, confirmed
1509 
1510 	/* sound hardware */
1511 	ay8910_device &ay1(AY8910(config.replace(), "ay1", HCLK1));
1512 	ay1.add_route(ALL_OUTPUTS, "mono", 0.23);
1513 	ay1.set_flags(AY8910_DISCRETE_OUTPUT);
1514 	ay1.set_resistors_load(RES_K(5), RES_K(5), RES_K(5));
1515 	ay1.port_a_write_callback().set(FUNC(btime_state::ay_audio_nmi_enable_w));
1516 
1517 	ay8910_device &ay2(AY8910(config.replace(), "ay2", HCLK1));
1518 	ay2.add_route(ALL_OUTPUTS, "mono", 0.23);
1519 }
1520 
1521 
disco(machine_config & config)1522 void btime_state::disco(machine_config &config)
1523 {
1524 	btime(config);
1525 
1526 	/* basic machine hardware */
1527 	m_maincpu->set_clock(HCLK4);
1528 	m_maincpu->set_addrmap(AS_PROGRAM, &btime_state::disco_map);
1529 
1530 	m_audiocpu->set_addrmap(AS_PROGRAM, &btime_state::disco_audio_map);
1531 
1532 	m_soundlatch->set_separate_acknowledge(true);
1533 
1534 	/* video hardware */
1535 	m_gfxdecode->set_info(gfx_disco);
1536 	m_palette->set_entries(32);
1537 
1538 	MCFG_VIDEO_START_OVERRIDE(btime_state,disco)
1539 
1540 	m_screen->set_screen_update(FUNC(btime_state::screen_update_disco));
1541 }
1542 
1543 
protenn(machine_config & config)1544 void btime_state::protenn(machine_config &config)
1545 {
1546 	disco(config);
1547 
1548 	m_maincpu->set_addrmap(AS_PROGRAM, &btime_state::protenn_map);
1549 }
1550 
1551 
tisland(machine_config & config)1552 void btime_state::tisland(machine_config &config)
1553 {
1554 	btime(config);
1555 
1556 	/* basic machine hardware */
1557 	m_maincpu->set_addrmap(AS_PROGRAM, &btime_state::tisland_map);
1558 
1559 	/* video hardware */
1560 	m_gfxdecode->set_info(gfx_zoar);
1561 }
1562 
1563 
1564 /***************************************************************************
1565 
1566     Game driver(s)
1567 
1568 ***************************************************************************/
1569 
1570 ROM_START( btime )
1571 	ROM_REGION( 0x10000, "maincpu", 0 )
1572 	ROM_LOAD( "aa04.9b",      0xc000, 0x1000, CRC(368a25b5) SHA1(ed3f3712423979dcb351941fa85dce6a0a7bb16b) )
CRC(b4ba400d)1573 	ROM_LOAD( "aa06.13b",     0xd000, 0x1000, CRC(b4ba400d) SHA1(8c77397e934907bc47a739f263196a0f2f81ba3d) )
1574 	ROM_LOAD( "aa05.10b",     0xe000, 0x1000, CRC(8005bffa) SHA1(d0da4e360039f6a8d8142a4e8e05c1f90c0af68a) )
1575 	ROM_LOAD( "aa07.15b",     0xf000, 0x1000, CRC(086440ad) SHA1(4a32bc92f8ff5fbe112f56e62d2c03da8851a7b9) )
1576 
1577 	ROM_REGION( 0x10000, "audiocpu", 0 )
1578 	ROM_LOAD( "ab14.12h",     0xe000, 0x1000, CRC(f55e5211) SHA1(27940026d0c6212d1138d2fd88880df697218627) )
1579 
1580 	ROM_REGION( 0x6000, "gfx1", 0 )
1581 	ROM_LOAD( "aa12.7k",      0x0000, 0x1000, CRC(c4617243) SHA1(24204d591aa2c264a852ee9ba8c4be63efd97728) )    /* charset #1 */
1582 	ROM_LOAD( "ab13.9k",      0x1000, 0x1000, CRC(ac01042f) SHA1(e64b6381a9298eaf74e79fa5f1ea8e9596c58a49) )
1583 	ROM_LOAD( "ab10.10k",     0x2000, 0x1000, CRC(854a872a) SHA1(3d2ecfd54a5a9d68b53cf4b4ee1f2daa6aef2123) )
1584 	ROM_LOAD( "ab11.12k",     0x3000, 0x1000, CRC(d4848014) SHA1(0a55b091cd4e7f317c35defe13d5051b26042eee) )
1585 	ROM_LOAD( "aa8.13k",      0x4000, 0x1000, CRC(8650c788) SHA1(d9b1ee2d1f2fd66705d497c80252861b49aa9254) )
1586 	ROM_LOAD( "ab9.15k",      0x5000, 0x1000, CRC(8dec15e6) SHA1(b72633de6268ce16742bba4dcba835df860d6c2f) )
1587 
1588 	ROM_REGION( 0x1800, "gfx2", 0 )
1589 	ROM_LOAD( "ab00.1b",      0x0000, 0x0800, CRC(c7a14485) SHA1(6a0a8e6b7860859f22daa33634e34fbf91387659) )    /* charset #2 */
1590 	ROM_LOAD( "ab01.3b",      0x0800, 0x0800, CRC(25b49078) SHA1(4abdcbd4f3362c3e4463a1274731289f1a72d2e6) )
1591 	ROM_LOAD( "ab02.4b",      0x1000, 0x0800, CRC(b8ef56c3) SHA1(4a03bf011dc1fb2902f42587b1174b880cf06df1) )
1592 
1593 	ROM_REGION( 0x0800, "bg_map", 0 )   /* background tilemaps */
1594 	ROM_LOAD( "ab03.6b",      0x0000, 0x0800, CRC(d26bc1f3) SHA1(737af6e264183a1f151f277a07cf250d6abb3fd8) )
1595 ROM_END
1596 
1597 
1598 ROM_START( btime2 )
1599 	ROM_REGION( 0x10000, "maincpu", 0 )
1600 	ROM_LOAD( "aa04.9b2",     0xc000, 0x1000, CRC(a041e25b) SHA1(caaab3ae46619d0a87a8985d316411f23be0b696) )
1601 	ROM_LOAD( "aa06.13b",     0xd000, 0x1000, CRC(b4ba400d) SHA1(8c77397e934907bc47a739f263196a0f2f81ba3d) )
1602 	ROM_LOAD( "aa05.10b",     0xe000, 0x1000, CRC(8005bffa) SHA1(d0da4e360039f6a8d8142a4e8e05c1f90c0af68a) )
1603 	ROM_LOAD( "aa07.15b",     0xf000, 0x1000, CRC(086440ad) SHA1(4a32bc92f8ff5fbe112f56e62d2c03da8851a7b9) )
1604 
1605 	ROM_REGION( 0x10000, "audiocpu", 0 )
1606 	ROM_LOAD( "ab14.12h",     0xe000, 0x1000, CRC(f55e5211) SHA1(27940026d0c6212d1138d2fd88880df697218627) )
1607 
1608 	ROM_REGION( 0x6000, "gfx1", 0 )
1609 	ROM_LOAD( "aa12.7k",      0x0000, 0x1000, CRC(c4617243) SHA1(24204d591aa2c264a852ee9ba8c4be63efd97728) )    /* charset #1 */
1610 	ROM_LOAD( "ab13.9k",      0x1000, 0x1000, CRC(ac01042f) SHA1(e64b6381a9298eaf74e79fa5f1ea8e9596c58a49) )
1611 	ROM_LOAD( "ab10.10k",     0x2000, 0x1000, CRC(854a872a) SHA1(3d2ecfd54a5a9d68b53cf4b4ee1f2daa6aef2123) )
1612 	ROM_LOAD( "ab11.12k",     0x3000, 0x1000, CRC(d4848014) SHA1(0a55b091cd4e7f317c35defe13d5051b26042eee) )
1613 	ROM_LOAD( "aa8.13k",      0x4000, 0x1000, CRC(8650c788) SHA1(d9b1ee2d1f2fd66705d497c80252861b49aa9254) )
1614 	ROM_LOAD( "ab9.15k",      0x5000, 0x1000, CRC(8dec15e6) SHA1(b72633de6268ce16742bba4dcba835df860d6c2f) )
1615 
1616 	ROM_REGION( 0x1800, "gfx2", 0 )
1617 	ROM_LOAD( "ab00.1b",      0x0000, 0x0800, CRC(c7a14485) SHA1(6a0a8e6b7860859f22daa33634e34fbf91387659) )    /* charset #2 */
1618 	ROM_LOAD( "ab01.3b",      0x0800, 0x0800, CRC(25b49078) SHA1(4abdcbd4f3362c3e4463a1274731289f1a72d2e6) )
1619 	ROM_LOAD( "ab02.4b",      0x1000, 0x0800, CRC(b8ef56c3) SHA1(4a03bf011dc1fb2902f42587b1174b880cf06df1) )
1620 
1621 	ROM_REGION( 0x0800, "bg_map", 0 )   /* background tilemaps */
1622 	ROM_LOAD( "ab03.6b",      0x0000, 0x0800, CRC(d26bc1f3) SHA1(737af6e264183a1f151f277a07cf250d6abb3fd8) )
1623 ROM_END
1624 
1625 ROM_START( btime3 )
1626 	ROM_REGION( 0x10000, "maincpu", 0 )
1627 	ROM_LOAD( "ab05a-3.12b",  0xb000, 0x1000, CRC(12e9f58c) SHA1(c1a933c83255af431643451b4eb68dc755bf0f61) ) /* Revision 3 & Copyright 1982 DATA EAST USA. INC. */
1628 	ROM_LOAD( "ab04-3.9b",    0xc000, 0x1000, CRC(5d90c696) SHA1(7b1674e7b6249a2d806d81abd967adeeb51111be) )
1629 	ROM_LOAD( "ab06-3.13b",   0xd000, 0x1000, CRC(e0b993ad) SHA1(42674cc399a8281a9a6c6cdbe38f7e5a4b3e6cb9) )
1630 	ROM_LOAD( "ab05-3.10b",   0xe000, 0x1000, CRC(c2b44b7f) SHA1(03c972f4ca0a31a2689d2f2d4064d82732fb19b9) )
1631 	ROM_LOAD( "ab07-3.15b",   0xf000, 0x1000, CRC(91986594) SHA1(f163eb7b27b602ce61a2dee1ae221a6e1f84c43d) )
1632 
1633 	ROM_REGION( 0x10000, "audiocpu", 0 )
1634 	ROM_LOAD( "ab14-1.12h",   0xe000, 0x1000, CRC(f55e5211) SHA1(27940026d0c6212d1138d2fd88880df697218627) )
1635 
1636 	ROM_REGION( 0x6000, "gfx1", 0 )
1637 	ROM_LOAD( "ab12-1.7k",    0x0000, 0x1000, BAD_DUMP CRC(6c79f79f) SHA1(338009199b5889621693833d88c35abb8e9e38a2) ) /* ROM was damaged, not verified the same */   /* charset #1 */
1638 	ROM_LOAD( "ab13-1.9k",    0x1000, 0x1000, BAD_DUMP CRC(ac01042f) SHA1(e64b6381a9298eaf74e79fa5f1ea8e9596c58a49) ) /* ROM was damaged, not verified the same */
1639 	ROM_LOAD( "ab10-1.10k",   0x2000, 0x1000, CRC(854a872a) SHA1(3d2ecfd54a5a9d68b53cf4b4ee1f2daa6aef2123) )
1640 	ROM_LOAD( "ab11-1.12k",   0x3000, 0x1000, CRC(d4848014) SHA1(0a55b091cd4e7f317c35defe13d5051b26042eee) )
1641 	ROM_LOAD( "ab8-1.13k",    0x4000, 0x1000, BAD_DUMP CRC(70b35bbe) SHA1(ee8d70d6792ac4b8fe3de90c665457fedb94a7ba) ) /* ROM was damaged, not verified the same */
1642 	ROM_LOAD( "ab9-1.15k",    0x5000, 0x1000, BAD_DUMP CRC(8dec15e6) SHA1(b72633de6268ce16742bba4dcba835df860d6c2f) ) /* ROM was damaged, not verified the same */
1643 
1644 	ROM_REGION( 0x1800, "gfx2", 0 )
1645 	ROM_LOAD( "ab00-1.1b",    0x0000, 0x0800, CRC(c7a14485) SHA1(6a0a8e6b7860859f22daa33634e34fbf91387659) )
1646 	ROM_LOAD( "ab01-1.3b",    0x0800, 0x0800, BAD_DUMP CRC(25b49078) SHA1(4abdcbd4f3362c3e4463a1274731289f1a72d2e6) ) /* ROM was damaged, not verified the same */
1647 	ROM_LOAD( "ab02-1.4b",    0x1000, 0x0800, CRC(b8ef56c3) SHA1(4a03bf011dc1fb2902f42587b1174b880cf06df1) )
1648 
1649 	ROM_REGION( 0x0800, "bg_map", 0 )   /* background tilemaps */
1650 	ROM_LOAD( "ab03-3.6b",    0x0000, 0x0800, CRC(f699d797) SHA1(c09ba5e652f26683d90b6a5637e41adecc4f1afa) )
1651 ROM_END
1652 
1653 ROM_START( btimem )
1654 	ROM_REGION( 0x10000, "maincpu", 0 )
1655 	ROM_LOAD( "ab05a1.12b",   0xb000, 0x1000, CRC(0a98b230) SHA1(aeee4f6f0aaa27575b80261d03c5453cc6ebd646) )
1656 	ROM_LOAD( "ab04.9b",      0xc000, 0x1000, CRC(797e5f75) SHA1(35ea5fa4b8f3494adf7774b3946ed2540ac826ff) )
1657 	ROM_LOAD( "ab06.13b",     0xd000, 0x1000, CRC(c77f3f64) SHA1(f283087fad0a102fe92be7ce80ed18e64dc93b67) )
1658 	ROM_LOAD( "ab05.10b",     0xe000, 0x1000, CRC(b0d3640f) SHA1(6ba28971714ece6f1c04fa2dbf1f9f216ded7cfa) )
1659 	ROM_LOAD( "ab07.15b",     0xf000, 0x1000, CRC(a142f862) SHA1(39d7ef172d18874885f1b1542e885cc4287dc344) )
1660 
1661 	ROM_REGION( 0x10000, "audiocpu", 0 )
1662 	ROM_LOAD( "ab14.12h",     0xe000, 0x1000, CRC(f55e5211) SHA1(27940026d0c6212d1138d2fd88880df697218627) )
1663 
1664 	ROM_REGION( 0x6000, "gfx1", 0 )
1665 	ROM_LOAD( "ab12.7k",      0x0000, 0x1000, CRC(6c79f79f) SHA1(338009199b5889621693833d88c35abb8e9e38a2) )    /* charset #1 */
1666 	ROM_LOAD( "ab13.9k",      0x1000, 0x1000, CRC(ac01042f) SHA1(e64b6381a9298eaf74e79fa5f1ea8e9596c58a49) )
1667 	ROM_LOAD( "ab10.10k",     0x2000, 0x1000, CRC(854a872a) SHA1(3d2ecfd54a5a9d68b53cf4b4ee1f2daa6aef2123) )
1668 	ROM_LOAD( "ab11.12k",     0x3000, 0x1000, CRC(d4848014) SHA1(0a55b091cd4e7f317c35defe13d5051b26042eee) )
1669 	ROM_LOAD( "ab8.13k",      0x4000, 0x1000, CRC(70b35bbe) SHA1(ee8d70d6792ac4b8fe3de90c665457fedb94a7ba) )
1670 	ROM_LOAD( "ab9.15k",      0x5000, 0x1000, CRC(8dec15e6) SHA1(b72633de6268ce16742bba4dcba835df860d6c2f) )
1671 
1672 	ROM_REGION( 0x1800, "gfx2", 0 )
1673 	ROM_LOAD( "ab00.1b",      0x0000, 0x0800, CRC(c7a14485) SHA1(6a0a8e6b7860859f22daa33634e34fbf91387659) )    /* charset #2 */
1674 	ROM_LOAD( "ab01.3b",      0x0800, 0x0800, CRC(25b49078) SHA1(4abdcbd4f3362c3e4463a1274731289f1a72d2e6) )
1675 	ROM_LOAD( "ab02.4b",      0x1000, 0x0800, CRC(b8ef56c3) SHA1(4a03bf011dc1fb2902f42587b1174b880cf06df1) )
1676 
1677 	ROM_REGION( 0x0800, "bg_map", 0 )   /* background tilemaps */
1678 	ROM_LOAD( "ab03.6b",      0x0000, 0x0800, CRC(d26bc1f3) SHA1(737af6e264183a1f151f277a07cf250d6abb3fd8) )
1679 ROM_END
1680 
1681 ROM_START( cookrace )
1682 	ROM_REGION( 0x10000, "maincpu", 0 )
1683 	/* code is in the range 0500-3fff, encrypted */
1684 	ROM_LOAD( "1f.1",         0x0000, 0x2000, CRC(68759d32) SHA1(2112a6f17b871aefdb39739e47d4a9f368a2eb3c) )
1685 	ROM_LOAD( "2f.2",         0x2000, 0x2000, CRC(be7d72d1) SHA1(232d108098cb490e7c828aa4524ad09d3866ae18) )
1686 	ROM_LOAD( "2k",           0xffe0, 0x0020, CRC(e2553b3d) SHA1(0a38929cdb3f37c6e4bacc5c3f94c049b4352858) )    /* reset/interrupt vectors */
1687 
1688 	ROM_REGION( 0x10000, "audiocpu", 0 )
1689 	ROM_LOAD( "6f.6",         0xe000, 0x1000, CRC(6b8e0272) SHA1(372a891b7b357aea0297ba9bcae752c3c9d8c1be) ) /* starts at 0000, not f000; 0000-01ff is RAM */
1690 
1691 	ROM_REGION( 0x6000, "gfx1", 0 )
1692 	ROM_LOAD( "m8.7",         0x0000, 0x2000, CRC(a1a0d5a6) SHA1(e9583320e9c303407abfe02988b95403e5209c52) )  /* charset #1 */
1693 	ROM_LOAD( "m7.8",         0x2000, 0x2000, CRC(1104f497) SHA1(60abd05c2549fe014660c169011480beb191f36d) )
1694 	ROM_LOAD( "m6.9",         0x4000, 0x2000, CRC(d0d94477) SHA1(74ca9134a52cabe5769d714855b38a49632b9e40) )
1695 
1696 	ROM_REGION( 0x1800, "gfx2", 0 )
1697 	ROM_LOAD( "2f.3",         0x0000, 0x0800, CRC(28609a75) SHA1(ab5d02bc0a771227db820a79b16aa662fb2140cf) )  /* garbage?? */
1698 	ROM_CONTINUE(             0x0000, 0x0800 )              /* charset #2 */
1699 	ROM_LOAD( "4f.4",         0x0800, 0x0800, CRC(7742e771) SHA1(c938c5714273bd4f2a1beb23d781ecbe7b023e6d) )  /* garbage?? */
1700 	ROM_CONTINUE(             0x0800, 0x0800 )
1701 	ROM_LOAD( "5f.5",         0x1000, 0x0800, CRC(611c686f) SHA1(e2c45061597d3d1a855a625a906b5a17a87deb2c) )  /* garbage?? */
1702 	ROM_CONTINUE(             0x1000, 0x0800 )
1703 
1704 	ROM_REGION( 0x0040, "proms", 0 )
1705 	ROM_LOAD( "f9.clr",       0x0000, 0x0020, CRC(c2348c1d) SHA1(a7cc4b499b6c89c5966711f8bb922026c2978e1a) )    /* palette */
1706 	ROM_LOAD( "b7",           0x0020, 0x0020, CRC(e4268fa6) SHA1(93f74e633c3a19755e78e0e2883109cd8ccde9a8) )    /* unknown */
1707 ROM_END
1708 
1709 ROM_START( tisland )
1710 	ROM_REGION( 0x10000, "maincpu", 0 )
1711 	ROM_LOAD( "t-04.b7",      0xa000, 0x1000, CRC(641af7f9) SHA1(50cd8f2372725356bb5a66024084363f5c5a870d) )
1712 	ROM_RELOAD(               0x9000, 0x1000 )
1713 	ROM_LOAD( "t-07.b11",     0xb000, 0x1000, CRC(6af00c8b) SHA1(e3948ca36642d3c2a1f94b017893d6e2fe178bb0) )
1714 	ROM_LOAD( "t-05.b9",      0xc000, 0x1000, CRC(95b1a1d3) SHA1(5636580f26e839d1140838c7efc1cabc2cf06f6f) )
1715 	ROM_LOAD( "t-08.b13",     0xd000, 0x1000, CRC(b7bbc008) SHA1(751491eac90f46985c83a6c06088638bcd0c0f20) )
1716 	ROM_LOAD( "t-06.b10",     0xe000, 0x1000, CRC(5a6783cf) SHA1(f518290efec0fedb92432b4e3448aea2438b8448) )
1717 	ROM_LOAD( "t-09.b14",     0xf000, 0x1000, CRC(5b26771a) SHA1(31d86acba4b6549fc08a3947d6d6d1a470fcb9da) )
1718 
1719 	ROM_REGION( 0x10000, "audiocpu", 0 )
1720 	ROM_LOAD( "t-0a.j11",     0xe000, 0x1000, CRC(807e1652) SHA1(ccfee616dc0e34d10a0e62b9864fd987291bf176) )
1721 
1722 	ROM_REGION( 0x3000, "gfx1", 0 )
1723 	ROM_LOAD( "t-13.k14",     0x0000, 0x1000, CRC(95bdec2f) SHA1(201b9c53ea53a25535b619231d0d14e08c206ecf) )
1724 	ROM_LOAD( "t-10.k10",     0x1000, 0x1000, CRC(3ba416cb) SHA1(90c968f963ba6f52f979f28f62eaccc0e2911508) )
1725 	ROM_LOAD( "t-0d.k5",      0x2000, 0x1000, CRC(3d3e40b2) SHA1(90576c82500ce8eddbf4dd02e59ec4ccc3b13000) ) /* 8x8 tiles */
1726 
1727 	ROM_REGION( 0x1800, "gfx2", 0 ) /* bg tiles */
1728 	// also contains the (incomplete) bg tilemap data for 1 tilemap (0x400-0x7ff of every rom is same as bg_map region, leftover?) */
1729 	ROM_LOAD( "t-00.b1",      0x0000, 0x0800, CRC(05eaf899) SHA1(b03a1b7d985b4d841d6bbb213a32a33e324dff89) )    /* charset #2 */
1730 	ROM_LOAD( "t-01.b2",      0x0800, 0x0800, CRC(f692e9e0) SHA1(e07ef20de8e9387f1096412d42d14ed5e52bbbd9) )
1731 	ROM_LOAD( "t-02.b4",      0x1000, 0x0800, CRC(88396cae) SHA1(47233d91e9c7b14091a0050524fa49e1bc69311d) )
1732 
1733 	ROM_REGION( 0x6000, "gfx3", 0 )
1734 	ROM_LOAD( "t-11.k11",     0x0000, 0x1000, CRC(779cc47c) SHA1(8921b81d460232252fd5a3c9bb2ad0befc1421da) ) /* 16x16 tiles*/
1735 	ROM_LOAD( "t-12.k13",     0x1000, 0x1000, CRC(c804a8aa) SHA1(f8ce1da88443416b6cd276741a600104d36c3725) )
1736 	ROM_LOAD( "t-0e.k6",      0x2000, 0x1000, CRC(63aa2b22) SHA1(765c405b1948191f5bdf1d8c1e7f20acb0894195) )
1737 	ROM_LOAD( "t-0f.k8",      0x3000, 0x1000, CRC(3eeca392) SHA1(78deceea3628aed0a57cb4208d260a91a304695a) )
1738 	ROM_LOAD( "t-0b.k2",      0x4000, 0x1000, CRC(ec416f20) SHA1(20852ef9753b103c5ec03d5eede778c0e25fc059) )
1739 	ROM_LOAD( "t-0c.k4",      0x5000, 0x1000, CRC(428513a7) SHA1(aab97ee938dc743a2941f71f827c22b9dde8aef0) )
1740 
1741 	ROM_REGION( 0x1000, "bg_map", 0 ) /* bg tilemap data */
1742 	ROM_LOAD( "t-03.b5",      0x0000, 0x1000, CRC(68df6d50) SHA1(461acc39089faac36bf8a8d279fbb6c046ae0264) )
1743 ROM_END
1744 
1745 /* There is a flyer with a screen shot for Lock'n'Chase at:
1746    http://www.arcadeflyers.com/?page=flyer&db=videodb&id=608&image=1  */
1747 
1748 ROM_START( lnc )
1749 	ROM_REGION( 0x10000, "maincpu", 0 )
1750 	ROM_LOAD( "s3-3d",        0xc000, 0x1000, CRC(1ab4f2c2) SHA1(c5890b768172cd2e3912b84db5f71546969ad7e2) )
1751 	ROM_LOAD( "s2-3c",        0xd000, 0x1000, CRC(5e46b789) SHA1(00b2510e07eb565cb373db798dd537191b0b7cc8) )
1752 	ROM_LOAD( "s1-3b",        0xe000, 0x1000, CRC(1308a32e) SHA1(da64fe7b76f5ac8ac35460e6c789ab1e986c78ef) )
1753 	ROM_LOAD( "s0-3a",        0xf000, 0x1000, CRC(beb4b1fc) SHA1(166a96b5757946231f3619844366218065412935) )
1754 
1755 	ROM_REGION( 0x10000, "audiocpu", 0 )
1756 	ROM_LOAD( "sa-1h",        0xe000, 0x1000, CRC(379387ec) SHA1(29d37f04c64ed53a2573962dfa9c0623b89e0045) )
1757 
1758 	ROM_REGION( 0x6000, "gfx1", 0 )
1759 	ROM_LOAD( "s4-11l",       0x0000, 0x1000, CRC(a2162a9e) SHA1(2729cef805c8e863af540424faa1aca82d3525e2) )
1760 	ROM_LOAD( "s5-11m",       0x1000, 0x1000, CRC(12f1c2db) SHA1(004e25a53ffa197e1238dfa53c530f128cf40516) )
1761 	ROM_LOAD( "s6-13l",       0x2000, 0x1000, CRC(d21e2a57) SHA1(0462cd3a5be87da97ed1bd8b79f8822cd5a33cf1) )
1762 	ROM_LOAD( "s7-13m",       0x3000, 0x1000, CRC(c4f247cd) SHA1(2c86bf479169981daf0378eb0b3e1a600937aaf2) )
1763 	ROM_LOAD( "s8-15l",       0x4000, 0x1000, CRC(672a92d0) SHA1(1bc89f6a76873504aa0fcfa0c6a43e8546edde27) )
1764 	ROM_LOAD( "s9-15m",       0x5000, 0x1000, CRC(87c8ee9a) SHA1(158019b18bc3e5104bebeb241c077a706bf72ff2) )
1765 
1766 	ROM_REGION( 0x0040, "proms", 0 )
1767 	ROM_LOAD( "sc-5m",        0x0000, 0x0020, CRC(2a976ebe) SHA1(f3c1b0d98f431f9cd0d5fa009fafa1115aabe6e5) )    /* palette */
1768 	ROM_LOAD( "sb-4c",        0x0020, 0x0020, CRC(a29b4204) SHA1(7f15cae5c4aaa29638fb45029782dafd2b3d1484) )    /* RAS/CAS logic - not used */
1769 ROM_END
1770 
1771 
1772 // DE-0106C-0 with CPU-7 + GGM-02 DE-0087C-1
1773 ROM_START( protenn )
1774 	ROM_REGION( 0x10000, "maincpu", 0 ) // all 2732s
1775 	ROM_LOAD( "w5-t.1a",        0xa000, 0x1000, CRC(d75d708b) SHA1(6262b3e6e5ff94596606a184383833935aa7025f) )
1776 	ROM_LOAD( "w4-t.2a",        0xb000, 0x1000, CRC(9131ed87) SHA1(af2276a82e024bf00c6db02deb7f06ade89dd386) )
1777 	ROM_LOAD( "w3-t.4a",        0xc000, 0x1000, CRC(01dc0e71) SHA1(a359468fb9dab9cfadcf8ec22a4d7ce9341f4324) )
1778 	ROM_LOAD( "w2-t.6a",        0xd000, 0x1000, CRC(6253acec) SHA1(24aaac1cdea1c60f8ff05dff6c17ba3a0e732187) )
1779 	ROM_LOAD( "w1-t.8a",        0xe000, 0x1000, CRC(6faf561c) SHA1(7fd5430af4b3f255e2c01e9b092b960ebdca8d13) )
1780 	ROM_LOAD( "w0-t.9a",        0xf000, 0x1000, CRC(baa330ae) SHA1(b10c66d9a03b036d95926d0c0fe441bb7ca4015d) )
1781 
1782 	ROM_REGION( 0x10000, "audiocpu", 0 )
1783 	ROM_LOAD( "w6-t.1b",      0xf000, 0x1000, CRC(a6bcc2d1) SHA1(383cd170417256467dfce94939d6afa66518c6d2) ) // 2732
1784 
1785 	ROM_REGION( 0x6000, "gfx1", ROMREGION_ERASE00 )
1786 	// dynamically allocated
1787 
1788 	ROM_REGION( 0x0040, "proms", 0 ) // both 82S123s
1789 	ROM_LOAD( "8.8a",    0x0000, 0x0020, CRC(6a0006ac) SHA1(72265bc472fb7610af190130560ef507244ce41c) )   // palette
1790 	ROM_LOAD( "7.10j",   0x0020, 0x0020, CRC(27b004e3) SHA1(4b9960b99130281a3b07f44816001e5eabf7a6fc) )   // RAS/CAS logic - not used
1791 ROM_END
1792 
1793 
1794 /*This one doesn't have the (c) deco and the "pro" word at the title screen so I'm assuming it's a bootleg.*/
1795 ROM_START( protennb )
1796 	ROM_REGION( 0x10000, "maincpu", 0 )
1797 	ROM_LOAD( "t6.a1",        0xa000, 0x1000, CRC(e89cc295) SHA1(68f1578c4be816db6028a561d286b19553c87506) )
1798 	ROM_LOAD( "t5.a3",        0xb000, 0x1000, CRC(9131ed87) SHA1(af2276a82e024bf00c6db02deb7f06ade89dd386) )
1799 	ROM_LOAD( "t4.a4",        0xc000, 0x1000, CRC(01dc0e71) SHA1(a359468fb9dab9cfadcf8ec22a4d7ce9341f4324) )
1800 	ROM_LOAD( "t3.a6",        0xd000, 0x1000, CRC(6253acec) SHA1(24aaac1cdea1c60f8ff05dff6c17ba3a0e732187) )
1801 	ROM_LOAD( "t2.a8",        0xe000, 0x1000, CRC(6faf561c) SHA1(7fd5430af4b3f255e2c01e9b092b960ebdca8d13) )
1802 	ROM_LOAD( "t1.a9",        0xf000, 0x1000, CRC(baa330ae) SHA1(b10c66d9a03b036d95926d0c0fe441bb7ca4015d) )
1803 
1804 	ROM_REGION( 0x10000, "audiocpu", 0 )
1805 	ROM_LOAD( "t7.b1",        0xf000, 0x1000, CRC(a6bcc2d1) SHA1(383cd170417256467dfce94939d6afa66518c6d2) )
1806 
1807 	ROM_REGION( 0x6000, "gfx1", ROMREGION_ERASE00 )
1808 	/* dynamically allocated */
1809 
1810 	ROM_REGION( 0x0040, "proms", 0 )
1811 	ROM_LOAD( "82s123n.a8",    0x0000, 0x0020, CRC(6a0006ac) SHA1(72265bc472fb7610af190130560ef507244ce41c) )   /* palette */
1812 	ROM_LOAD( "82s123n.j10",   0x0020, 0x0020, CRC(27b004e3) SHA1(4b9960b99130281a3b07f44816001e5eabf7a6fc) )   /* RAS/CAS logic - not used */
1813 ROM_END
1814 
1815 ROM_START( wtennis )
1816 	ROM_REGION( 0x10000, "maincpu", 0 )
1817 	ROM_LOAD( "ten14.h4",     0xc000, 0x1000, CRC(f7b27303) SHA1(043476429bcc8def412f77d1f79a01586d984bfc) )
1818 	ROM_LOAD( "ten4.d4",      0xd000, 0x1000, CRC(e465d82c) SHA1(c357dcf17539150425574985afa559db2e6ab834) ) // was t4
1819 	ROM_LOAD( "ten3.c4",      0xe000, 0x1000, CRC(8f090eab) SHA1(baeef8ee05010bf44cf8865a22911f3d458df1b0) ) // was t3
1820 	ROM_LOAD( "ten2.a4",      0xf000, 0x1000, CRC(d2f9dd30) SHA1(1faa088806e8627b5e561d8b99054d295045dcfb) ) // was t2
1821 
1822 	ROM_REGION( 0x10000, "audiocpu", 0 )
1823 	ROM_LOAD( "ten1.h1",      0xe000, 0x1000, CRC(40737ea7) SHA1(27e8474028385574035d3982f9c576bb9bb3facd) ) /* was t1 - starts at 0000, not f000; 0000-01ff is RAM */
1824 
1825 	ROM_REGION( 0x6000, "gfx1", 0 )
1826 	ROM_LOAD( "ten7.l11",     0x0000, 0x1000, CRC(aa935169) SHA1(965f41a9fcf35ac7c899e79acd0a85ab588d5831) ) // was t7
1827 	ROM_LOAD( "ten10.m11",    0x1000, 0x1000, CRC(746be927) SHA1(a3361384437ac7c494fde92953c5aa5e3c104644) ) // was t10
1828 	ROM_LOAD( "ten6.l13",     0x2000, 0x1000, CRC(4fb8565d) SHA1(6de865e41dcba45190af0753baebf5ab66e4eeb4) ) // was t6
1829 	ROM_LOAD( "ten9.m13",     0x3000, 0x1000, CRC(4893286d) SHA1(f2c330286272b8d334b887bc4dd9608158249fc3) ) // was t9
1830 	ROM_LOAD( "ten5.l14",     0x4000, 0x1000, CRC(ea1efa5d) SHA1(dd8ef1991d74778e6844a669e6de649e1130ec79) ) // was t5
1831 	ROM_LOAD( "ten8.m14",     0x5000, 0x1000, CRC(542ace7b) SHA1(b1423d39302ad7d98c9223d8b1d6d062b7676dd9) ) // was t8
1832 
1833 	ROM_REGION( 0x0040, "proms", 0 )
1834 	ROM_LOAD( "mb7051.m5",    0x0000, 0x0020, CRC(f051cb28) SHA1(6aebccd38ba7887caff248c8acddb8e14526f1e7) )    /* palette */
1835 	ROM_LOAD( "sb-4c",        0x0020, 0x0020, CRC(a29b4204) SHA1(7f15cae5c4aaa29638fb45029782dafd2b3d1484) )    /* RAS/CAS logic - not used */
1836 ROM_END
1837 
1838 ROM_START( mmonkey )
1839 	ROM_REGION( 0x10000, "maincpu", 0 )
1840 	ROM_LOAD( "mmonkey.e4",   0xc000, 0x1000, CRC(8d31bf6a) SHA1(77b44d8e2b4db148727e7bfc5162c7e9e9cfc662) )
1841 	ROM_LOAD( "mmonkey.d4",   0xd000, 0x1000, CRC(e54f584a) SHA1(a03fef09f6a0bb6802b33b28c45548efb85cda5c) )
1842 	ROM_LOAD( "mmonkey.b4",   0xe000, 0x1000, CRC(399a161e) SHA1(0eb3c5031a7d8c7b14019e215b18dac24a9e70dd) )
1843 	ROM_LOAD( "mmonkey.a4",   0xf000, 0x1000, CRC(f7d3d1e3) SHA1(ff650a833e5e8975fe5b4a644ce6c35de5e04740) )
1844 
1845 	ROM_REGION( 0x10000, "audiocpu", 0 )
1846 	ROM_LOAD( "mmonkey.h1",   0xe000, 0x1000, CRC(5bcb2e81) SHA1(60fb8fd83c83b278e3aaf96f0b6dbefbc1eef0f7) )
1847 
1848 	ROM_REGION( 0x6000, "gfx1", 0 )
1849 	ROM_LOAD( "mmonkey.l11",  0x0000, 0x1000, CRC(b6aa8566) SHA1(bc90d4cfa9a221477d1989fea532621ce3e76439) )
1850 	ROM_LOAD( "mmonkey.m11",  0x1000, 0x1000, CRC(6cc4d0c4) SHA1(f43450e97dd0c6d0a269c06e4c4253d0814590e9) )
1851 	ROM_LOAD( "mmonkey.l13",  0x2000, 0x1000, CRC(2a343b7e) SHA1(1dba32a83db933096b9a9fbcfd8e0290aba76483) )
1852 	ROM_LOAD( "mmonkey.m13",  0x3000, 0x1000, CRC(0230b50d) SHA1(d62b5d1be35c8bf29483fb616cd7e3949a422e76) )
1853 	ROM_LOAD( "mmonkey.l14",  0x4000, 0x1000, CRC(922bb3e1) SHA1(72d2017e80bea7700a3a61a06882839ecffcabe8) )
1854 	ROM_LOAD( "mmonkey.m14",  0x5000, 0x1000, CRC(f943e28c) SHA1(6ff536a21f34cbb958f6d0f84791102938966ff3) )
1855 
1856 	ROM_REGION( 0x0040, "proms", 0 )
1857 	ROM_LOAD( "mmi6331.m5",   0x0000, 0x0020, CRC(55e28b32) SHA1(b73f85224738252dc8dbb38a54250dcfe1fc3ae3) )    /* palette */
1858 	ROM_LOAD( "sb-4c",        0x0020, 0x0020, CRC(a29b4204) SHA1(7f15cae5c4aaa29638fb45029782dafd2b3d1484) )    /* RAS/CAS logic - not used */
1859 ROM_END
1860 
1861 ROM_START( mmonkeyj )
1862 	ROM_REGION( 0x10000, "maincpu", 0 ) // all 2732
1863 	ROM_LOAD( "b00.e4",   0xc000, 0x1000, CRC(8d31bf6a) SHA1(77b44d8e2b4db148727e7bfc5162c7e9e9cfc662) )
1864 	ROM_LOAD( "b10.d4",   0xd000, 0x1000, CRC(e54f584a) SHA1(a03fef09f6a0bb6802b33b28c45548efb85cda5c) )
1865 	ROM_LOAD( "b20.b4",   0xe000, 0x1000, CRC(9f606767) SHA1(afd248e5bc05e3ee4b31545efe5d66a032cea275) )
1866 	ROM_LOAD( "b30.a4",   0xf000, 0x1000, CRC(a4e85439) SHA1(0455a520d6dbd5efa0598f80e48b88574135922a) )
1867 
1868 	ROM_REGION( 0x10000, "audiocpu", 0 )
1869 	ROM_LOAD( "b40.h1",   0xe000, 0x1000, CRC(5bcb2e81) SHA1(60fb8fd83c83b278e3aaf96f0b6dbefbc1eef0f7) ) // 2732
1870 
1871 	ROM_REGION( 0x6000, "gfx1", 0 ) // all 2732
1872 	ROM_LOAD( "b50.l11",  0x0000, 0x1000, CRC(b6aa8566) SHA1(bc90d4cfa9a221477d1989fea532621ce3e76439) )
1873 	ROM_LOAD( "b60.m11",  0x1000, 0x1000, CRC(6cc4d0c4) SHA1(f43450e97dd0c6d0a269c06e4c4253d0814590e9) )
1874 	ROM_LOAD( "b70.l13",  0x2000, 0x1000, CRC(2a343b7e) SHA1(1dba32a83db933096b9a9fbcfd8e0290aba76483) )
1875 	ROM_LOAD( "b80.m13",  0x3000, 0x1000, CRC(0230b50d) SHA1(d62b5d1be35c8bf29483fb616cd7e3949a422e76) )
1876 	ROM_LOAD( "b90.l14",  0x4000, 0x1000, CRC(922bb3e1) SHA1(72d2017e80bea7700a3a61a06882839ecffcabe8) )
1877 	ROM_LOAD( "ba0.m14",  0x5000, 0x1000, CRC(f943e28c) SHA1(6ff536a21f34cbb958f6d0f84791102938966ff3) )
1878 
1879 	ROM_REGION( 0x0040, "proms", 0 )
1880 	ROM_LOAD( "bc0.m5",       0x0000, 0x0020, CRC(55e28b32) SHA1(b73f85224738252dc8dbb38a54250dcfe1fc3ae3) )    /* 82S123, palette */
1881 	ROM_LOAD( "m3-7603-5.c4", 0x0020, 0x0020, BAD_DUMP CRC(a29b4204) SHA1(7f15cae5c4aaa29638fb45029782dafd2b3d1484) )    /* not dumped for this set - RAS/CAS logic - not used */
1882 ROM_END
1883 
1884 ROM_START( brubber )
1885 	ROM_REGION( 0x10000, "maincpu", 0 )
1886 	/* a000-bfff space for the service ROM */
1887 	ROM_LOAD( "brubber.12c",  0xc000, 0x2000, CRC(b5279c70) SHA1(5fb1c50040dc4e9444aed440e2c3cf4c79b72311) )
1888 	ROM_LOAD( "brubber.12d",  0xe000, 0x2000, CRC(b2ce51f5) SHA1(5e38ea24bcafef1faba023def96532abd6f97d38) )
1889 
1890 	ROM_REGION( 0x10000, "audiocpu", 0 )
1891 	ROM_LOAD( "bnj6c.bin",    0xe000, 0x1000, CRC(8c02f662) SHA1(1279d564e65fd3ccac25b1f9fbb40d910de2b544) )
1892 
1893 	ROM_REGION( 0x6000, "gfx1", 0 )
1894 	ROM_LOAD( "bnj4e.bin",    0x0000, 0x2000, CRC(b864d082) SHA1(cacf71fa6c0f7121d077381a0ff6222f534295ab) )
1895 	ROM_LOAD( "bnj4f.bin",    0x2000, 0x2000, CRC(6c31d77a) SHA1(5e52554f594f569527af4768d244cc40a7b4460a) )
1896 	ROM_LOAD( "bnj4h.bin",    0x4000, 0x2000, CRC(5824e6fb) SHA1(e98f0eb476b8f033f5cc70a6e503afc4e651fd45) )
1897 
1898 	ROM_REGION( 0x2000, "gfx2", 0 )
1899 	ROM_LOAD( "bnj10e.bin",   0x0000, 0x1000, CRC(f4e9eb49) SHA1(b356512d2ebd4e2005e76496b434e5ecebadb251) )
1900 	ROM_LOAD( "bnj10f.bin",   0x1000, 0x1000, CRC(a9ffacb4) SHA1(49d5f9c0b695f474197fbb761bacc065b6b5808a) )
1901 ROM_END
1902 
1903 
1904 /*
1905     Bump 'n Jump (Data East USA)
1906 
1907     Sound Board:
1908         CIS-1
1909         DATA EAST-0136
1910 
1911     Video Board:
1912         DSP-12
1913         DE-0135-2
1914 */
1915 
1916 ROM_START( bnj )
1917 	ROM_REGION( 0x10000, "maincpu", 0 )
1918 	ROM_LOAD( "ad08.12b",     0xa000, 0x2000, CRC(8d649bd5) SHA1(83105718c2d18ef75ca18ae92b34545cb939bc02) )
1919 	ROM_LOAD( "ad07.12c",     0xc000, 0x2000, CRC(7a27f5f4) SHA1(f62d752bb7a995e120ed4d642793c543f0ef13ca) )
1920 	ROM_LOAD( "ad06.12d",     0xe000, 0x2000, CRC(f855a2d2) SHA1(f231ed008537aeeeacbec64f485e9a96ab3441e1) )
1921 
1922 	ROM_REGION( 0x10000, "audiocpu", 0 )
1923 	ROM_LOAD( "ad05.6c",      0xe000, 0x1000, CRC(8c02f662) SHA1(1279d564e65fd3ccac25b1f9fbb40d910de2b544) )
1924 
1925 	ROM_REGION( 0x6000, "gfx1", 0 )
1926 	ROM_LOAD( "ad00.4e",      0x0000, 0x2000, CRC(b864d082) SHA1(cacf71fa6c0f7121d077381a0ff6222f534295ab) )
1927 	ROM_LOAD( "ad01.4f",      0x2000, 0x2000, CRC(6c31d77a) SHA1(5e52554f594f569527af4768d244cc40a7b4460a) )
1928 	ROM_LOAD( "ad02.4h",      0x4000, 0x2000, CRC(5824e6fb) SHA1(e98f0eb476b8f033f5cc70a6e503afc4e651fd45) )
1929 
1930 	ROM_REGION( 0x2000, "gfx2", 0 )
1931 	ROM_LOAD( "ad03.10e",     0x0000, 0x1000, CRC(f4e9eb49) SHA1(b356512d2ebd4e2005e76496b434e5ecebadb251) )
1932 	ROM_LOAD( "ad04.10f",     0x1000, 0x1000, CRC(a9ffacb4) SHA1(49d5f9c0b695f474197fbb761bacc065b6b5808a) )
1933 
1934 	ROM_REGION( 0x002d, "plds", 0 )
1935 	ROM_LOAD( "pb-5.10k.bin", 0x0000, 0x002c, CRC(dc72a65f) SHA1(d61c149d4df93a2074debf7c5e46557c6b06d10d) ) /* PAL10L8 */
1936 	ROM_LOAD( "pb-4.2d.bin",  0x002c, 0x0001, NO_DUMP ) /* PAL16R4CN - same as Car Action? */
1937 ROM_END
1938 
1939 ROM_START( bnjm )
1940 	ROM_REGION( 0x10000, "maincpu", 0 )
1941 	ROM_LOAD( "bnj12b.bin",   0xa000, 0x2000, CRC(ba3e3801) SHA1(56284076d938c33c1492a07281b936681eb09808) )
1942 	ROM_LOAD( "bnj12c.bin",   0xc000, 0x2000, CRC(fb3a2cdd) SHA1(4a964389cc8035b9264d4cb133eb6d3826e74b95) )
1943 	ROM_LOAD( "bnj12d.bin",   0xe000, 0x2000, CRC(b88bc99e) SHA1(08a4ddea4037f9e14d0d9f4262a1746b0a3a140c) )
1944 
1945 	ROM_REGION( 0x10000, "audiocpu", 0 )
1946 	ROM_LOAD( "bnj6c.bin",    0xe000, 0x1000, CRC(8c02f662) SHA1(1279d564e65fd3ccac25b1f9fbb40d910de2b544) )
1947 
1948 	ROM_REGION( 0x6000, "gfx1", 0 )
1949 	ROM_LOAD( "bnj4e.bin",    0x0000, 0x2000, CRC(b864d082) SHA1(cacf71fa6c0f7121d077381a0ff6222f534295ab) )
1950 	ROM_LOAD( "bnj4f.bin",    0x2000, 0x2000, CRC(6c31d77a) SHA1(5e52554f594f569527af4768d244cc40a7b4460a) )
1951 	ROM_LOAD( "bnj4h.bin",    0x4000, 0x2000, CRC(5824e6fb) SHA1(e98f0eb476b8f033f5cc70a6e503afc4e651fd45) )
1952 
1953 	ROM_REGION( 0x2000, "gfx2", 0 )
1954 	ROM_LOAD( "bnj10e.bin",   0x0000, 0x1000, CRC(f4e9eb49) SHA1(b356512d2ebd4e2005e76496b434e5ecebadb251) )
1955 	ROM_LOAD( "bnj10f.bin",   0x1000, 0x1000, CRC(a9ffacb4) SHA1(49d5f9c0b695f474197fbb761bacc065b6b5808a) )
1956 ROM_END
1957 
1958 ROM_START( caractn )
1959 	ROM_REGION( 0x10000, "maincpu", 0 )
1960 	/* a000-bfff space for the service ROM */
1961 	ROM_LOAD( "c7.12c",  0xc000, 0x2000, CRC(b5279c70) SHA1(5fb1c50040dc4e9444aed440e2c3cf4c79b72311) )
1962 	ROM_LOAD( "c6.12d",  0xe000, 0x2000, CRC(1d6957c4) SHA1(bd30f00187e56eef9adcc167dd752a3bb616454c) )
1963 
1964 	ROM_REGION( 0x10000, "audiocpu", 0 )
1965 	ROM_LOAD( "c5.6c",   0xe000, 0x1000, CRC(8c02f662) SHA1(1279d564e65fd3ccac25b1f9fbb40d910de2b544) )
1966 
1967 	ROM_REGION( 0x6000, "gfx1", 0 )
1968 	ROM_LOAD( "c0.4e",   0x0000, 0x2000, CRC(bf3ea732) SHA1(d98970b2dda8c3435506656909e5e3aa70d45652) )
1969 	ROM_LOAD( "c1.4f",   0x2000, 0x2000, CRC(9789f639) SHA1(77a4d494698718c052fa1967242a0e4fa263b6ad) )
1970 	ROM_LOAD( "c2.4h",   0x4000, 0x2000, CRC(51dcc111) SHA1(9753d682ba2f4fb4d3b14783ac35ad214bf788b5) )
1971 
1972 	ROM_REGION( 0x2000, "gfx2", 0 )
1973 	ROM_LOAD( "c3.10e",  0x0000, 0x1000, CRC(f4e9eb49) SHA1(b356512d2ebd4e2005e76496b434e5ecebadb251) )
1974 	ROM_LOAD( "c4.10f",  0x1000, 0x1000, CRC(a9ffacb4) SHA1(49d5f9c0b695f474197fbb761bacc065b6b5808a) )
1975 
1976 	ROM_REGION( 0x0040, "proms", 0 )
1977 	ROM_LOAD( "tbp18s030.11a",   0x0000, 0x020, CRC(318d25b9) SHA1(9a82619c94f5911d01ddf6b85f7e30cdc6f1d0a3) )  /* palette */
1978 	ROM_LOAD( "tbp18s030.cpu",   0x0020, 0x020, CRC(6b0c2942) SHA1(7d25acc753923b265792fc78f8fc70175c0e0ec2) )  /* RAS/CAS logic - not used */
1979 
1980 	ROM_REGION( 0x0140, "plds", 0 )
1981 	ROM_LOAD( "pal10l8.10k",   0x0000, 0x002c, CRC(dc72a65f) SHA1(d61c149d4df93a2074debf7c5e46557c6b06d10d) )
1982 	ROM_LOAD( "pal16r4a.2d",   0x0030, 0x0104, CRC(fd1f3aa2) SHA1(67f1e74fcfc0e2301204ed58b8c6e35d4866a344) )
1983 ROM_END
1984 
1985 ROM_START( caractn2 )
1986 	ROM_REGION( 0x10000, "maincpu", 0 )
1987 	/* a000-bfff space for the service ROM */
1988 	ROM_LOAD( "7.c12",   0xc000, 0x2000, CRC(406086aa) SHA1(711d547eeb73044930fb1fd15060dbd1e85339d6) ) /* 2 bytes difference, Lives DIP 2/3 instead of 3/5 */
1989 	ROM_LOAD( "c6.12d",  0xe000, 0x2000, CRC(1d6957c4) SHA1(bd30f00187e56eef9adcc167dd752a3bb616454c) )
1990 
1991 	ROM_REGION( 0x10000, "audiocpu", 0 )
1992 	ROM_LOAD( "c5.6c",   0xe000, 0x1000, CRC(8c02f662) SHA1(1279d564e65fd3ccac25b1f9fbb40d910de2b544) )
1993 
1994 	ROM_REGION( 0x6000, "gfx1", 0 )
1995 	ROM_LOAD( "c0.4e",   0x0000, 0x2000, CRC(bf3ea732) SHA1(d98970b2dda8c3435506656909e5e3aa70d45652) )
1996 	ROM_LOAD( "c1.4f",   0x2000, 0x2000, CRC(9789f639) SHA1(77a4d494698718c052fa1967242a0e4fa263b6ad) )
1997 	ROM_LOAD( "c2.4h",   0x4000, 0x2000, CRC(51dcc111) SHA1(9753d682ba2f4fb4d3b14783ac35ad214bf788b5) )
1998 
1999 	ROM_REGION( 0x2000, "gfx2", 0 )
2000 	ROM_LOAD( "c3.10e",  0x0000, 0x1000, CRC(f4e9eb49) SHA1(b356512d2ebd4e2005e76496b434e5ecebadb251) )
2001 	ROM_LOAD( "c4.10f",  0x1000, 0x1000, CRC(a9ffacb4) SHA1(49d5f9c0b695f474197fbb761bacc065b6b5808a) )
2002 
2003 	ROM_REGION( 0x0040, "proms", 0 )
2004 	ROM_LOAD( "tbp18s030.11a",   0x0000, 0x020, CRC(318d25b9) SHA1(9a82619c94f5911d01ddf6b85f7e30cdc6f1d0a3) )  /* palette */
2005 	ROM_LOAD( "tbp18s030.cpu",   0x0020, 0x020, CRC(6b0c2942) SHA1(7d25acc753923b265792fc78f8fc70175c0e0ec2) )  /* RAS/CAS logic - not used */
2006 
2007 	ROM_REGION( 0x0140, "plds", 0 )
2008 	ROM_LOAD( "pal10l8.10k",   0x0000, 0x002c, CRC(dc72a65f) SHA1(d61c149d4df93a2074debf7c5e46557c6b06d10d) )
2009 	ROM_LOAD( "pal16r4a.2d",   0x0030, 0x0104, CRC(fd1f3aa2) SHA1(67f1e74fcfc0e2301204ed58b8c6e35d4866a344) )
2010 ROM_END
2011 
2012 ROM_START( zoar )
2013 	ROM_REGION( 0x10000, "maincpu", 0 )
2014 	ROM_LOAD( "z15.12b", 0xd000, 0x1000, CRC(1f0cfdb7) SHA1(ce7e871f17c52b6eaf99cfb721e702e4f0e6bb25) )
2015 	ROM_LOAD( "z16.13b", 0xe000, 0x1000, CRC(7685999c) SHA1(fabe38d71e797ae0b04b5d3aba228b4c85d96185) )
2016 	ROM_LOAD( "z17.15b", 0xf000, 0x1000, CRC(619ea867) SHA1(0a3735384f03a1052d54ab799b5e37038d8ece2a) )
2017 
2018 	ROM_REGION( 0x10000, "audiocpu", 0 )
2019 	ROM_LOAD( "z09.13c", 0xe000, 0x1000, CRC(18d96ff1) SHA1(671d934a451e0b042450ea86d24c3751a39b38f8) )
2020 
2021 	ROM_REGION( 0x6000, "gfx1", 0 )
2022 	ROM_LOAD( "z00.3l",  0x0000, 0x1000, CRC(fd2dcb64) SHA1(1a49a6ec6ffd354d872b1af83d55ec96e8215b2b) )
2023 	ROM_LOAD( "z01.5l",  0x1000, 0x1000, CRC(74d3ca48) SHA1(2c75ea246f86a057467deb35ef6a6e72f667dd84) )
2024 	ROM_LOAD( "z03.8l",  0x2000, 0x1000, CRC(77b7df14) SHA1(a1cbc214fc849b7e3417b1156d1e4440ab67f631) )
2025 	ROM_LOAD( "z04.9l",  0x3000, 0x1000, CRC(9be786de) SHA1(480733a1438dffa4b0fac6f76bf84a0deec5d1fa) )
2026 	ROM_LOAD( "z06.12l", 0x4000, 0x1000, CRC(07638c71) SHA1(1a7fc49657ac7ac0033bd60c86663bd615079230) )
2027 	ROM_LOAD( "z07.14l", 0x5000, 0x1000, CRC(f4710f25) SHA1(08b4cc4252f83a689cded38d9a5a50f55ee6beee) )
2028 
2029 	ROM_REGION( 0x1800, "gfx2", 0 )
2030 	ROM_LOAD( "z10.1b",  0x0000, 0x0800, CRC(aa8bcab8) SHA1(81f1a9fd754fd6f8030ff6b5aa80c7670be9d02e) )
2031 	ROM_LOAD( "z11.3b",  0x0800, 0x0800, CRC(dcdad357) SHA1(d1569e1d38f14f5f457547e24df4f80f726c6157) )
2032 	ROM_LOAD( "z12.4b",  0x1000, 0x0800, CRC(ed317e40) SHA1(db70889af5f233ca71acf734abfbdb74b6a393c0) )
2033 
2034 	ROM_REGION( 0x3000, "gfx3", 0 )
2035 	ROM_LOAD( "z02.6l",  0x0000, 0x1000, CRC(d8c3c122) SHA1(841006cc84622e851df462a64696b64bb8cb62a1) )
2036 	ROM_LOAD( "z05.14l", 0x1000, 0x1000, CRC(05dc6b09) SHA1(197c720544a090e12980513b441a2b9cf04e212f) )
2037 	ROM_LOAD( "z08.15l", 0x2000, 0x1000, CRC(9a148551) SHA1(db92dd7552c6f76a062910f37a3fe3524fdffd38) )
2038 
2039 	ROM_REGION( 0x1000, "bg_map", 0 )   /* background tilemaps */
2040 	ROM_LOAD( "z13.6b",  0x0000, 0x1000, CRC(8fefa960) SHA1(614026aa71703dd3898e470f45730e5c6934b31b) )
2041 
2042 	ROM_REGION( 0x0060, "proms", 0 )
2043 	ROM_LOAD( "z20.1l",  0x0000, 0x0020, CRC(a63f0a07) SHA1(16532d3ac0536ad4b712005fd722ee8c14d02e9b) )
2044 	ROM_LOAD( "z21.2l",  0x0020, 0x0020, CRC(5e1e5788) SHA1(56068b209cc7c734bbcbb9858f40faa6474c8095) )
2045 	ROM_LOAD( "z19.7b",  0x0040, 0x0020, CRC(03ee3a96) SHA1(4acb4061ef0d8a1fab50207fc81a54bfa4c7455d) )
2046 ROM_END
2047 
2048 ROM_START( disco )
2049 	ROM_REGION( 0x10000, "maincpu", 0 )
2050 	ROM_LOAD( "disco.w5",     0xa000, 0x1000, CRC(b2c87b78) SHA1(4095f0052ff0ac35ecd2ec1c1e99d21283d336e1) )
2051 	ROM_LOAD( "disco.w4",     0xb000, 0x1000, CRC(ad7040ee) SHA1(287a4ff06edda4c66e2351e49a94212728aacb4e) )
2052 	ROM_LOAD( "disco.w3",     0xc000, 0x1000, CRC(12fb4f08) SHA1(d6095f20d8676df89b1459134b5521ac311ddded) )
2053 	ROM_LOAD( "disco.w2",     0xd000, 0x1000, CRC(73f6fb2f) SHA1(7b75b825d9bf7e512e054762500f79c18a276e1f) )
2054 	ROM_LOAD( "disco.w1",     0xe000, 0x1000, CRC(ee7b536b) SHA1(b2de5da15cee1d80391eafd0a08361803f859c89) )
2055 	ROM_LOAD( "disco.w0",     0xf000, 0x1000, CRC(7c26e76b) SHA1(952e91c4acc18d01b0e2c3efd764da8768f583da) )
2056 
2057 	ROM_REGION( 0x10000, "audiocpu", 0 )
2058 	ROM_LOAD( "disco.w6",     0xf000, 0x1000, CRC(d81e781e) SHA1(bde510bfed06a13bd56bf7ddbf220e7cf82f79b6) )
2059 
2060 	ROM_REGION( 0x0020, "proms", 0 )
2061 	ROM_LOAD( "disco.clr",    0x0000, 0x0020, CRC(a393f913) SHA1(42dce159283427064b3f5ce3a6e2189744ecd943) )
2062 ROM_END
2063 
2064 ROM_START( discof )
2065 	ROM_REGION( 0x10000, "maincpu", 0 )
2066 	ROM_LOAD( "w5-f.1a",     0xa000, 0x1000, CRC(9d53c71c) SHA1(53c410cfa4fbbfd08e1c3cf7aeba1c9627171a71) )
2067 	ROM_LOAD( "w4-f.2a",     0xb000, 0x1000, CRC(c1f8d747) SHA1(33f5fe73d1851ef4da670075d1aec1550e0417ce) )
2068 	ROM_LOAD( "w3-f.4a",     0xc000, 0x1000, CRC(9aadd252) SHA1(c6da7ef46333d525e676c59f03ccc908108b41ba) )
2069 	ROM_LOAD( "w2-f.6a",     0xd000, 0x1000, CRC(f131a5bb) SHA1(84b7dea112dce12e5cb235a13f6dc4edcfb18c06) )
2070 	ROM_LOAD( "w1-f.9a",     0xe000, 0x1000, CRC(a6ce9a19) SHA1(e8f380e17a21fb33504d6efe9d01d0f903fa25e1) )
2071 //  ROM_LOAD( "w1-f",        0xe000, 0x1000, CRC(c8ec57c5) SHA1(904a9ed0a7f1230c611bf473b9bc52e63eb56dbe) ) // 0x7d3 is 0x10 instead of 0x00, 1 bit different, looks out of place, bad?
2072 	ROM_LOAD( "w0-f.9a",     0xf000, 0x1000, CRC(b3787a92) SHA1(7f40621dc739c1108a5df43142ab04709a380219) )
2073 
2074 	ROM_REGION( 0x10000, "audiocpu", 0 )
2075 	ROM_LOAD( "w6-.1b",     0xf000, 0x1000, CRC(d81e781e) SHA1(bde510bfed06a13bd56bf7ddbf220e7cf82f79b6) )
2076 
2077 	ROM_REGION( 0x0020, "proms", 0 ) // board uses 2 proms, not 1
2078 	ROM_LOAD( "disco.clr",    0x0000, 0x0020, CRC(a393f913) SHA1(42dce159283427064b3f5ce3a6e2189744ecd943) )
2079 ROM_END
2080 
2081 ROM_START( sdtennis )
2082 	ROM_REGION( 0x10000, "maincpu", 0 )
2083 	ROM_LOAD( "ao_08.12b",  0xa000, 0x2000, CRC(6193724c) SHA1(97239c5aa8c8cd1812fba1b15be4d9a48eb0651a) )
2084 	ROM_LOAD( "ao_07.12c",  0xc000, 0x2000, CRC(064888db) SHA1(f7bb728ab3408bb553191d9e131a441db1b39666) )
2085 	ROM_LOAD( "ao_06.12d",  0xe000, 0x2000, CRC(413c984c) SHA1(1431df4db52d621ba39fd47dbd49da103b5c0bcf) )
2086 
2087 	ROM_REGION( 0x10000, "audiocpu", 0 )
2088 	ROM_LOAD( "ao_05.6c",    0xe000, 0x1000, CRC(46833e38) SHA1(420831149a566199d6a3c74ef3df0687b4ddcbe4) )
2089 
2090 	ROM_REGION( 0x6000, "gfx1", 0 )
2091 	ROM_LOAD( "ao_00.4e",    0x0000, 0x2000, CRC(f4e0cbd6) SHA1(a2ede0ce4a26957a5d3b62872a42b8979f5000aa) )
2092 	ROM_LOAD( "ao_01.4f",    0x2000, 0x2000, CRC(f99029da) SHA1(45bc56ff6284d02371d5e1cd5239be665f9e56c7) )
2093 	ROM_LOAD( "ao_02.4h",    0x4000, 0x2000, CRC(c3077555) SHA1(addfc67735dc22dfed9c4c4ec8d9dcf590c76737) )
2094 
2095 	ROM_REGION( 0x2000, "gfx2", 0 )
2096 	ROM_LOAD( "ao_03.10e",   0x0000, 0x1000, CRC(1977db9b) SHA1(d175974967fdeb608df668089fa2a14b2d1609e6) )
2097 	ROM_LOAD( "ao_04.10f",   0x1000, 0x1000, CRC(921952af) SHA1(4e9248f3493a5f4651278f27c11f507571242317) )
2098 ROM_END
2099 
2100 uint8_t btime_state::wtennis_reset_hack_r()
2101 {
2102 	uint8_t *RAM = memregion("maincpu")->base();
2103 
2104 	/* Otherwise the game goes into test mode and there is no way out that I
2105 	   can see.  I'm not sure how it can work, it probably somehow has to do
2106 	   with the tape system */
2107 
2108 	RAM[0xfc30] = 0;
2109 
2110 	return RAM[0xc15f];
2111 }
2112 
init_btime()2113 void btime_state::init_btime()
2114 {
2115 	m_audio_nmi_enable_type = AUDIO_ENABLE_DIRECT;
2116 }
2117 
init_zoar()2118 void btime_state::init_zoar()
2119 {
2120 	uint8_t *rom = memregion("maincpu")->base();
2121 
2122 	/* At location 0xD50A is what looks like an undocumented opcode. I tried
2123 	   implementing it given what opcode 0x23 should do, but it still didn't
2124 	   work in demo mode, this could be another protection.
2125 
2126 	   The ROM has been confirmed as good on multiple working PCBs, so this
2127 	   isn't a bitrot issue */
2128 	memset(&rom[0xd50a],0xea,8);
2129 
2130 	m_audio_nmi_enable_type = AUDIO_ENABLE_AY8910;
2131 }
2132 
init_tisland()2133 void btime_state::init_tisland()
2134 {
2135 	uint8_t *rom = memregion("maincpu")->base();
2136 
2137 	/* At location 0xa2b6 there's a strange RLA followed by a BPL that reads from an
2138 	   unmapped area that causes the game to fail in several circumstances.On the Cassette
2139 	   version the RLA (33) is in reality a BIT (24),so I'm guessing that there's something
2140 	   wrong going on in the encryption scheme.
2141 
2142 	   There are other locations with similar problems. These ROMs have NOT yet been
2143 	   confirmed on multiple PCBs, so this could still be a bad dump.
2144 	   */
2145 	memset(&rom[0xa2b6],0x24,1);
2146 
2147 	m_audio_nmi_enable_type = AUDIO_ENABLE_DIRECT;
2148 }
2149 
init_lnc()2150 void btime_state::init_lnc()
2151 {
2152 	m_audio_nmi_enable_type = AUDIO_ENABLE_AY8910;
2153 }
2154 
init_bnj()2155 void btime_state::init_bnj()
2156 {
2157 	m_audio_nmi_enable_type = AUDIO_ENABLE_DIRECT;
2158 }
2159 
init_disco()2160 void btime_state::init_disco()
2161 {
2162 	init_btime();
2163 	m_audio_nmi_enable_type = AUDIO_ENABLE_AY8910;
2164 }
2165 
init_cookrace()2166 void btime_state::init_cookrace()
2167 {
2168 	m_audiocpu->space(AS_PROGRAM).install_read_bank(0x0200, 0x0fff, "bank10");
2169 	membank("bank10")->set_base(memregion("audiocpu")->base() + 0xe200);
2170 	m_audio_nmi_enable_type = AUDIO_ENABLE_DIRECT;
2171 }
2172 
init_protennb()2173 void btime_state::init_protennb()
2174 {
2175 	init_btime();
2176 	m_audio_nmi_enable_type = AUDIO_ENABLE_AY8910;
2177 }
2178 
init_wtennis()2179 void btime_state::init_wtennis()
2180 {
2181 	m_maincpu->space(AS_PROGRAM).install_read_handler(0xc15f, 0xc15f, read8smo_delegate(*this, FUNC(btime_state::wtennis_reset_hack_r)));
2182 
2183 	m_audiocpu->space(AS_PROGRAM).install_read_bank(0x0200, 0x0fff, "bank10");
2184 	membank("bank10")->set_base(memregion("audiocpu")->base() + 0xe200);
2185 	m_audio_nmi_enable_type = AUDIO_ENABLE_AY8910;
2186 }
2187 
init_sdtennis()2188 void btime_state::init_sdtennis()
2189 {
2190 	m_audio_nmi_enable_type = AUDIO_ENABLE_DIRECT;
2191 }
2192 
2193 
2194 GAME( 1982, btime,    0,       btime,    btime,    btime_state, init_btime,    ROT270, "Data East Corporation",                "Burger Time (Data East set 1)",  MACHINE_SUPPORTS_SAVE )
2195 GAME( 1982, btime2,   btime,   btime,    btime,    btime_state, init_btime,    ROT270, "Data East Corporation",                "Burger Time (Data East set 2)",  MACHINE_SUPPORTS_SAVE )
2196 GAME( 1982, btime3,   btime,   btime,    btime3,   btime_state, init_btime,    ROT270, "Data East USA Inc.",                   "Burger Time (Data East USA)",    MACHINE_SUPPORTS_SAVE )
2197 GAME( 1982, btimem,   btime,   btime,    btime3,   btime_state, init_btime,    ROT270, "Data East (Bally Midway license)",     "Burger Time (Midway)",           MACHINE_SUPPORTS_SAVE )
2198 GAME( 1982, cookrace, btime,   cookrace, cookrace, btime_state, init_cookrace, ROT270, "bootleg",                              "Cook Race",                      MACHINE_SUPPORTS_SAVE )
2199 GAME( 1981, tisland,  0,       tisland,  btime,    btime_state, init_tisland,  ROT270, "Data East Corporation",                "Treasure Island",                MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
2200 GAME( 1981, lnc,      0,       lnc,      lnc,      btime_state, init_lnc,      ROT270, "Data East Corporation",                "Lock'n'Chase",                   MACHINE_SUPPORTS_SAVE )
2201 GAME( 1982, protenn,  0,       protenn,  protenn,  btime_state, init_protennb, ROT270, "Data East Corporation",                "Pro Tennis (Japan)",             MACHINE_SUPPORTS_SAVE )
2202 GAME( 1982, protennb, protenn, protenn,  protenn,  btime_state, init_protennb, ROT270, "bootleg",                              "Tennis (bootleg of Pro Tennis)", MACHINE_SUPPORTS_SAVE )
2203 GAME( 1982, wtennis,  0,       wtennis,  wtennis,  btime_state, init_wtennis,  ROT270, "bootleg",                              "World Tennis",                   MACHINE_SUPPORTS_SAVE )
2204 GAME( 1982, mmonkey,  0,       mmonkey,  mmonkey,  btime_state, init_lnc,      ROT270, "Technos Japan / Roller Tron",          "Minky Monkey",                   MACHINE_SUPPORTS_SAVE )
2205 GAME( 1982, mmonkeyj, mmonkey, mmonkey,  mmonkey,  btime_state, init_lnc,      ROT270, "Technos Japan / Roller Tron",          "Minky Monkey (Japan)",           MACHINE_SUPPORTS_SAVE )
2206 GAME( 1982, brubber,  0,       bnj,      brubber,  btime_state, init_bnj,      ROT270, "Data East",                            "Burnin' Rubber",                 MACHINE_SUPPORTS_SAVE )
2207 GAME( 1982, bnj,      brubber, bnj,      bnj,      btime_state, init_bnj,      ROT270, "Data East USA",                        "Bump 'n' Jump",                  MACHINE_SUPPORTS_SAVE )
2208 GAME( 1982, bnjm,     brubber, bnj,      bnj,      btime_state, init_bnj,      ROT270, "Data East USA (Bally Midway license)", "Bump 'n' Jump (Midway)",         MACHINE_SUPPORTS_SAVE )
2209 GAME( 1982, caractn,  brubber, bnj,      brubber,  btime_state, init_bnj,      ROT270, "bootleg",                              "Car Action (set 1)",             MACHINE_SUPPORTS_SAVE )
2210 GAME( 1982, caractn2, brubber, bnj,      caractn2, btime_state, init_bnj,      ROT270, "bootleg",                              "Car Action (set 2)",             MACHINE_SUPPORTS_SAVE )
2211 GAME( 1982, zoar,     0,       zoar,     zoar,     btime_state, init_zoar,     ROT270, "Data East USA",                        "Zoar",                           MACHINE_SUPPORTS_SAVE )
2212 GAME( 1982, disco,    0,       disco,    disco,    btime_state, init_disco,    ROT270, "Data East",                            "Disco No.1",                     MACHINE_SUPPORTS_SAVE )
2213 GAME( 1982, discof,   disco,   disco,    disco,    btime_state, init_disco,    ROT270, "Data East",                            "Disco No.1 (Rev.F)",             MACHINE_SUPPORTS_SAVE )
2214 GAME( 1983, sdtennis, 0,       sdtennis, sdtennis, btime_state, init_sdtennis, ROT270, "Data East Corporation",                "Super Doubles Tennis",           MACHINE_SUPPORTS_SAVE )
2215