1 // license:BSD-3-Clause
2 // copyright-holders:David Graves
3 // thanks-to:Richard Bush
4 /***************************************************************************
5 
6 Operation Thunderbolt  (Taito)
7 ---------------------
8 
9 David Graves
10 
11 (this is based on the F2 driver by Bryan McPhail, Brad Oliver, Andrew Prime,
12 Nicola Salmoria. Thanks to Richard Bush and the Raine team, whose open
13 source was very helpful in many areas particularly the sprites.)
14 
15 *************************************************************************
16 
17 Operation Thunderbolt
18 Taito, 1988
19 
20 PCB Layout
21 ----------
22 
23 K1100381A
24 J1100166A MAIN PCB
25 |-----------------------------------------------------------------------|
26 |  VOL   VOL          TC0310FAM  YM3016 B67-13.40 16MHz 24MHz      PAL  |
27 |        TL074  |------|TC0310FAM TL074                                 |
28 |  MB3735 MB3735|TAITO |            Z80                                 |
29 |               |TC0140|            6264.46     26.686MHz    6116  6116 |
30 |               |SYT   |                                     6116  6116 |
31 |               |------|            YM2610                   6116  6116 |
32 |    ADC0808     B67-08.67                                   6116  6116 |
33 |          MB3771                  B67-07.44       |------|             |
34 |2               B67-06.66                         |TAITO |    |------| |
35 |8    |------|                                     |TC0020|    |TAITO | |
36 ||    |TAITO |               62256.57 62256.55     |VAR   |    |TC0050| |
37 |W    |TC0220|       |------|                      |------|    |VDZ   | |
38 |A    |IOC   |       |TAITO |            B67-05.43             |------| |
39 |Y    |------|       |TC0100|  6116.56                                  |
40 |                    |SCN   |       6116.54          |------|           |
41 |    DSWA  DSWB      |------|         B67-05.43      |TAITO |           |
42 |                                                    |TC0050|           |
43 |  93C46                     |------|                |VDZ   |           |
44 |     |------|    B67-23.64  |TAITO |   |----|       |------|  B67-04.4 |
45 |     |TAITO |               |TC0320|   | 6  |                          |
46 | 555 |TC0110|    B67-20.63  |OBR   |   | 8  |  PAL  |------|  B67-03.3 |
47 |     |PCR   |               |------|   | 0  |       |TAITO |           |
48 |     |------|    B67-15.62   62256.52  | 0  |  PAL  |TC0050|  B67-02.2 |
49 | 6264.73 6264.74                       | 0  |       |VDZ   |           |
50 |     TC0070RGB   B67-14.61   62256.51  |----|  PAL  |------|  B67-01.1 |
51 |-----------------------------------------------------------------------|
52 Notes:
53       68000 running at 12.000MHz [24/2]
54       Z80 running at 4.000MHz [24/6]
55       YM2610 running at 8.000MHz [16/2]
56       62256.51 & 52 - Main program 68000 work RAM
57       6264.46 - Sound program Z80 work RAM
58       62256.55 & 57 - Background RAM, tied to TC0100SCN
59       6116.56 & 54 - Sprite attribute/enable RAM, tied to TC0320OBR
60       Other 6116 RAM - Sprite RAM, connected to TC0020VAR & TC0050VDZ
61       6264.73 & 74 - Color RAM
62 
63       Taito Custom ICs -
64                          TC0220IOC
65                          TC0110PCR
66                          TC0140SYT
67                          TC0100SCN
68                          TC0320OBR
69                          TC0020VAR
70                          TC0050VDZ (x3)
71                          TC0070RGB (ceramic module)
72                          TC0310FAM (ceramic module)
73       VSync: 60.0552Hz
74       HSync: 15.4938kHz
75 
76       Note: The hardware outputs reversed video because the cabinet uses a mirror.
77       The video can't be flipped/reversed with the DIPs, it's fixed in hardware.
78 
79       PCB edge connector is 28-way non-JAMMA.
80       The gun is NOT a light gun, it uses two 5k-ohm potentiometers for the X-Y position
81 
82                Solder | Parts
83                -------+-------
84                Ground | 1 Ground
85                Ground | 2 Ground
86                   +5v | 3 +5v
87                   +5v | 4 +5v
88                   -5v | 5 -5v
89                   12v | 6 12v
90                   Key | 7 Key
91           - L Speaker | 8 + L Speaker
92           - R Speaker | 9 + R Speaker
93                       |10
94                       |11
95             1 P Start |12
96             2 P Start |13
97              1 P Bomb |14
98           1 P Trigger |15 2 P Bomb
99           2 P Trigger |16 Service Credit
100                Coin B |17 Coin A
101        Coin Counter B |18 Coin Counter A
102                       |19
103      2 P Gun Solenoid |20 1 P Gun Solenoid
104           Video Green |21 Video Red
105            Video Sync |22 Video Blue
106    2 P Gun X Position |23 Ground
107    2 P Gun Y Position |24 1 P Gun X Position
108                       |25 1 P Gun Y Position
109                       |26
110                Ground |27 Ground
111                Ground |28 Ground
112 
113 *************************************************************************
114 
115 Operation Thunderbolt operates on hardware very similar to the Taito Z
116 system, in particular the game Spacegun. The lightgun hardware in these
117 two (as well as the eeprom and calibration process) looks identical.
118 
119 The game has 4 separate layers of graphics - one 64x64 tiled scrolling
120 background plane of 8x8 tiles, a similar foreground plane, a sprite plane,
121 and a text plane with character definitions held in ram.
122 
123 The sprites are 16x8 tiles aggregated through a spritemap rom into 64x64
124 zoomable sprites.
125 
126 The main difference is that Operation Thunderbolt uses only a single 68000
127 CPU, whereas Spacegun has twin 68Ks. (Operation Thunderbolt has a Z80
128 taking over sound duties, which Spacegun doesn't.)
129 
130 
131 custom ICs
132 ----------
133 TC0020VAR     sprites??
134 TC0050VDZ x3  sprites??
135 TC0070RGB     video DAC
136 TC0100SCN     tilemaps
137 TC0110PCR     palette
138 TC0140SYT     main/sub CPU interface + sub cpu address decoder and I/O interface
139 TC0220IOC     I/O interface
140 TC0310FAM x2  sound volume and panning
141 TC0320OBR     sprites
142 
143 
144 memory map
145 ----------
146 68000:
147 
148 The address decoding is done by two PALs (IC37 and IC33). Part of the decoding,
149 and also interrupt control, is done by another PAL (IC36). Luckily this time,
150 the PALs HAVE been read, so the memory map is accurate :)
151 
152 Address                  Dir Data             Name      Description
153 ------------------------ --- ---------------- --------- -----------------------
154 000000xxxxxxxxxxxxxxxxx- R   xxxxxxxxxxxxxxxx TROM0     program ROM
155 000001xxxxxxxxxxxxxxxxx- R   xxxxxxxxxxxxxxxx TROM1     program ROM
156 00001000xxxxxxxxxxxxxxxx R/W xxxxxxxxxxxxxxxx TRAMH     work RAM
157 00001001-----------xxxx- R/W --------xxxxxxxx II/O      TC0220IOC
158 0001-----------------xxx R/W xxxxxxxxxxxxxxxx CLCS      TC0110PCR
159 0010--xxxxxxxxxxxxxxxxxx R/W xxxxxxxxxxxxxxxx SCCS      TC0100SCN
160 0011------------------xx R/W ------------xxxx SSCS      TC0140SYT
161 0100---------xxxxxxxxxxx R/W xxxxxxxxxxxxxxxx OBCS      TC0320OBR
162 0101----------------xxx- R/W --------xxxxxxxx A/DOE     ADC0808 A/D converter (for lightgun)
163 0110----------------000-   W ----------------           IRQ5 acknowledge (automatically enabled on reset)
164 0110----------------001-   W ---------------- 6PR       IRQ6 acknowledge (automatically enabled on reset)
165 0110----------------010-   W ---------------- n.c.
166 0110----------------011-   W ---------------- n.c.
167 0110----------------100-   W ---------------- n.c.
168 0110----------------101-   W ---------------- n.c.
169 0110----------------110-   W ---------------- n.c.
170 0110----------------111-   W ---------------- n.c.
171 
172 
173 Z80:
174 
175 all of the address decoding is done by the TC0140SYT, which uses address bits
176 A0 and A9-A15, and data bits D0-D3.
177 
178 Address          Dir Data     Name        Description
179 ---------------- --- -------- ----------- -----------------------
180 00xxxxxxxxxxxxxx R   xxxxxxxx ROM         program ROM (TC0140SYT ROMCS0 pin)
181 01xxxxxxxxxxxxxx R   xxxxxxxx ROM         program ROM (banked) (TC0140SYT ROMCS0, ROMA14 and ROMA15 pins)
182 110xxxxxxxxxxxxx R/W xxxxxxxx SRAM        work RAM (TC0140SYT RAMCS pin)
183 1110000-------xx R/W xxxxxxxx OP_T        YM2610 (TC0140SYT OPX pin)
184 1110001--------x R/W ----xxxx             TC0140SYT control
185 1110010-------00   W ---xxxxx CH1_VOLR_CT TC0310FAM #1 CS2 (TC0140SYT CSA pin)
186 1110010-------01   W ---xxxxx CH1_VOLF_CT TC0310FAM #1 CS1 (TC0140SYT CSA pin)
187 1110010-------10   W ---xxxxx CH2_VOLR_CT TC0310FAM #2 CS2 (TC0140SYT CSA pin)
188 1110010-------11   W ---xxxxx CH2_VOLF_CT TC0310FAM #2 CS1 (TC0140SYT CSA pin)
189 1110011---------   W                      ??
190 1110100---------
191 1110101--------- R   -------x ROTARY 1    TC0140SYT I/OA0 pin
192 1110101--------- R   ------x- ROTARY 2    TC0140SYT I/OA1 pin
193 1110101--------- R   -----x-- ROTARY 3    TC0140SYT I/OA2 pin
194 1110110---------
195 1110111---------   W                      ??
196 1111000---------   W                      ??
197 1111001---------   W ----xxxx             TC0140SYT ROM bankswitch
198 
199 
200 
201 Notes:
202 ------
203 - The game checks an external input called ROTARY in the schematics, not
204   mentioned in the manual. The ROTARY input controls the separation between
205   left and right players, the game adjusts the values written to the external
206   volume controller depending on it.
207   Possible values are: 111 (max) 011 (high) -01 (med) --0 (low). It's a
208   rotary control so only one bit is supposed to be low.
209 
210 (Changed set led output to proper output port.  --HowardC)
211 - The outputs I'm turning on are actually the gun solenoid outputs, which
212   would rattle the gun while firing.
213 
214 
215 - BM, 060108 - The original flyer for this game has screenshots which clearly
216   show the background is 4 pixels to the left on several game stages (you can
217   see the edge of sprites overlapping past the right edge).  Therefore I
218   do not believe the TC0100SCN problem mentioned above actually exists.  The
219   current emulation appears to be accurate.
220 
221 
222 Stephh's notes (based on the game M68000 code and some tests) :
223 
224 1) 'othunder', 'othundrj' and 'othunduo'
225 
226   - Region stored at 0x03fffe.w
227   - Sets :
228       * 'othunder' : region = 0x0003
229       * 'othundrj' : region = 0x0001
230       * 'othunduo' : region = 0x0002
231   - These 3 games are 100% the same, only region differs !
232   - Coinage relies on the region (code at 0x000db2) :
233       * 0x0001 (Japan) and 0x0002 (US) use TAITO_COINAGE_JAPAN_OLD
234       * 0x0003 (World) and 0x0004 (licensed to xxx) use TAITO_COINAGE_WORLD
235   - Notice screen only if region = 0x0001
236   - According to the manual, DSWB bit 6 determines continue pricing :
237 
238     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Continue_Price ) )
239     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
240     PORT_DIPSETTING(    0x40, "Same as Start" )
241 
242     However, many conditions are required to make it work due to code at 0x00e0c4 :
243       * region must not be 0x0001
244       * "Allow Continue" Dip Switch must be set to "Yes"
245       * coinage must be 2C_1C for both slots
246     This is why this Dip Switch has NO effect in the following sets :
247       * 'othunder' : coinage can't be 2C_1C for the 2 slots (coin B)
248       * 'othundrj' : region = 0x0001
249   - DSWB bit 7 ("Language") affects parts of the texts (not the ones in "demo mode")
250     but the voices are always in English regardless of the region !
251 
252 
253 2) 'othundu'
254 
255   - Region stored at 0x03fffe.w
256   - Sets :
257       * 'othundu' : region = 0x0002
258   - Comparison with 'othunder' :
259       * slightly different code at 0x023c4c
260       * additional data from 0x023eee to 0x0240ed (0x0200 bytes)
261       * same other notes as for 'othunder'
262 
263 
264 TODO:
265 -----
266 
267 - The "FIRE!" arrows pointing to padlocks are not in perfect sync with the
268   background scrolling. Should they?
269 
270 - The quality of the zoomed sprites could probably be better. Drawing them as
271   made by 16x8 tiles loses precision due to limitations of drawgfxzoom().
272 
273 - Schematics show a OBPRI output to control sprite priority. This doesn't seem
274   to be used however, and isn't hooked up. See tc0220ioc_w().
275 
276 ***************************************************************************/
277 
278 #include "emu.h"
279 #include "includes/othunder.h"
280 #include "includes/taitoipt.h"
281 #include "audio/taitosnd.h"
282 
283 #include "cpu/m68000/m68000.h"
284 #include "cpu/z80/z80.h"
285 #include "machine/adc0808.h"
286 #include "machine/eepromser.h"
287 #include "sound/2610intf.h"
288 #include "sound/flt_vol.h"
289 #include "screen.h"
290 #include "speaker.h"
291 
292 
293 /***********************************************************
294                 INTERRUPTS
295 ***********************************************************/
296 
irq_ack_w(offs_t offset,u16 data)297 void othunder_state::irq_ack_w(offs_t offset, u16 data)
298 {
299 	switch (offset)
300 	{
301 		case 0:
302 			m_maincpu->set_input_line(5, CLEAR_LINE);
303 			break;
304 
305 		case 1:
306 			m_maincpu->set_input_line(6, CLEAR_LINE);
307 			break;
308 	}
309 }
310 
WRITE_LINE_MEMBER(othunder_state::vblank_w)311 WRITE_LINE_MEMBER( othunder_state::vblank_w )
312 {
313 	if (state)
314 		m_maincpu->set_input_line(5, ASSERT_LINE);
315 }
316 
WRITE_LINE_MEMBER(othunder_state::adc_eoc_w)317 WRITE_LINE_MEMBER( othunder_state::adc_eoc_w )
318 {
319 	if (state)
320 		m_maincpu->set_input_line(6, ASSERT_LINE);
321 }
322 
323 
324 /******************************************************************
325                     EEPROM
326 
327 This is an earlier version of the eeprom used in some TaitoB games.
328 The eeprom unlock command is different, and the write/clock/reset
329 bits are different.
330 ******************************************************************/
331 
eeprom_w(u8 data)332 void othunder_state::eeprom_w(u8 data)
333 {
334 
335 /*              0000000x    SOL-1 (gun solenoid)
336                 000000x0    SOL-2 (gun solenoid)
337                 00000x00    OBPRI (sprite priority)
338                 0000x000    (unused)
339                 000x0000    eeprom reset (active low)
340                 00x00000    eeprom clock
341                 0x000000    eeprom in data
342                 x0000000    eeprom out data  */
343 
344 	/* Recoil Piston Motor Status */
345 	output().set_value("Player1_Recoil_Piston", data & 0x1 );
346 	output().set_value("Player2_Recoil_Piston", (data & 0x2) >>1 );
347 
348 	if (data & 4)
349 		popmessage("OBPRI SET!");
350 
351 	m_eeprom->di_write((data & 0x40) >> 6);
352 	m_eeprom->clk_write((data & 0x20) ? ASSERT_LINE : CLEAR_LINE);
353 	m_eeprom->cs_write((data & 0x10) ? ASSERT_LINE : CLEAR_LINE);
354 }
355 
coins_w(u8 data)356 void othunder_state::coins_w(u8 data)
357 {
358 	machine().bookkeeping().coin_lockout_w(0, ~data & 0x01);
359 	machine().bookkeeping().coin_lockout_w(1, ~data & 0x02);
360 	machine().bookkeeping().coin_counter_w(0, data & 0x04);
361 	machine().bookkeeping().coin_counter_w(1, data & 0x08);
362 }
363 
364 
365 /*****************************************
366             SOUND
367 *****************************************/
368 
sound_bankswitch_w(u8 data)369 void othunder_state::sound_bankswitch_w(u8 data)
370 {
371 	m_z80bank->set_entry(data & 3);
372 }
373 
tc0310fam_w(offs_t offset,u8 data)374 void othunder_state::tc0310fam_w(offs_t offset, u8 data)
375 {
376 	/* there are two TC0310FAM, one for CH1 and one for CH2 from the YM2610. The
377 	   PSG output is routed to both chips. */
378 	int voll, volr;
379 
380 	m_pan[offset] = data & 0x1f;
381 
382 	/* PSG output (single ANALOG OUT pin on the YM2610, but we have three channels
383 	   because we are using the AY-3-8910 emulation. */
384 	volr = (m_pan[0] + m_pan[2]) * 100 / (2 * 0x1f);
385 	voll = (m_pan[1] + m_pan[3]) * 100 / (2 * 0x1f);
386 	m_2610_0l->flt_volume_set_volume(voll / 100.0);
387 	m_2610_0r->flt_volume_set_volume(volr / 100.0);
388 
389 	/* CH1 */
390 	volr = m_pan[0] * 100 / 0x1f;
391 	voll = m_pan[1] * 100 / 0x1f;
392 	m_2610_1l->flt_volume_set_volume(voll / 100.0);
393 	m_2610_1r->flt_volume_set_volume(volr / 100.0);
394 
395 	/* CH2 */
396 	volr = m_pan[2] * 100 / 0x1f;
397 	voll = m_pan[3] * 100 / 0x1f;
398 	m_2610_2l->flt_volume_set_volume(voll / 100.0);
399 	m_2610_2r->flt_volume_set_volume(volr / 100.0);
400 }
401 
402 
403 /***********************************************************
404              MEMORY STRUCTURES
405 ***********************************************************/
406 
othunder_map(address_map & map)407 void othunder_state::othunder_map(address_map &map)
408 {
409 	map(0x000000, 0x07ffff).rom();
410 	map(0x080000, 0x08ffff).ram();
411 	map(0x090000, 0x09000f).rw(m_tc0220ioc, FUNC(tc0220ioc_device::read), FUNC(tc0220ioc_device::write)).umask16(0x00ff);
412 //  map(0x09000c, 0x09000d).nopw();   /* ?? (keeps writing 0x77) */
413 	map(0x100000, 0x100007).rw(m_tc0110pcr, FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_rbswap_word_w));   /* palette */
414 	map(0x200000, 0x20ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w));    /* tilemaps */
415 	map(0x220000, 0x22000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w));
416 	map(0x300001, 0x300001).w(m_tc0140syt, FUNC(tc0140syt_device::master_port_w));
417 	map(0x300003, 0x300003).rw(m_tc0140syt, FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w));
418 	map(0x400000, 0x4005ff).ram().share("spriteram");
419 	map(0x500000, 0x500007).rw("adc", FUNC(adc0808_device::data_r), FUNC(adc0808_device::address_offset_start_w)).umask16(0x00ff);
420 	map(0x600000, 0x600003).w(FUNC(othunder_state::irq_ack_w));
421 }
422 
423 
424 /***************************************************************************/
425 
z80_sound_map(address_map & map)426 void othunder_state::z80_sound_map(address_map &map)
427 {
428 	map(0x0000, 0x3fff).rom();
429 	map(0x4000, 0x7fff).bankr("z80bank");
430 	map(0xc000, 0xdfff).ram();
431 	map(0xe000, 0xe003).rw("ymsnd", FUNC(ym2610_device::read), FUNC(ym2610_device::write));
432 	map(0xe200, 0xe200).nopr().w(m_tc0140syt, FUNC(tc0140syt_device::slave_port_w));
433 	map(0xe201, 0xe201).rw(m_tc0140syt, FUNC(tc0140syt_device::slave_comm_r), FUNC(tc0140syt_device::slave_comm_w));
434 	map(0xe400, 0xe403).w(FUNC(othunder_state::tc0310fam_w)); /* pan */
435 	map(0xe600, 0xe600).nopw(); /* ? */
436 	map(0xea00, 0xea00).portr("ROTARY");  /* rotary input */
437 	map(0xee00, 0xee00).nopw(); /* ? */
438 	map(0xf000, 0xf000).nopw(); /* ? */
439 	map(0xf200, 0xf200).w(FUNC(othunder_state::sound_bankswitch_w));
440 }
441 
442 
443 
444 /***********************************************************
445              INPUT PORTS, DIPs
446 ***********************************************************/
447 
448 static INPUT_PORTS_START( othunder )
449 	/* 0x090000 -> 0x08a000 */
450 	PORT_START("DSWA")
451 	PORT_DIPUNUSED( 0x01, IP_ACTIVE_LOW )
452 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Allow_Continue ) )
453 	PORT_DIPSETTING(    0x00, DEF_STR( No ) )
454 	PORT_DIPSETTING(    0x02, DEF_STR( Yes ) )
455 	TAITO_DSWA_BITS_2_TO_3
456 	TAITO_COINAGE_WORLD
457 
458 	/* 0x090002 -> 0x08a002 */
459 	PORT_START("DSWB")
460 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
461 	PORT_DIPSETTING(    0x02, DEF_STR( Easy ) )
462 	PORT_DIPSETTING(    0x03, DEF_STR( Medium ) )
463 	PORT_DIPSETTING(    0x01, DEF_STR( Hard ) )
464 	PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
465 	PORT_DIPNAME( 0x0c, 0x0c, "Magazines/Rockets" )
466 	PORT_DIPSETTING(    0x0c, "5/3" )
467 	PORT_DIPSETTING(    0x08, "6/4" )
468 	PORT_DIPSETTING(    0x04, "7/5" )
469 	PORT_DIPSETTING(    0x00, "8/6" )
470 	PORT_DIPNAME( 0x30, 0x30, "Bullets per Magazine" )
471 	PORT_DIPSETTING(    0x00, "30" )
472 	PORT_DIPSETTING(    0x10, "35" )
473 	PORT_DIPSETTING(    0x30, "40" )
474 	PORT_DIPSETTING(    0x20, "50" )
475 	PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW )                        /* see notes */
476 	PORT_DIPNAME( 0x80, 0x00, DEF_STR( Language ) )
477 	PORT_DIPSETTING(    0x00, DEF_STR( English ) )
478 	PORT_DIPSETTING(    0x80, DEF_STR( Japanese ) )
479 
480 	PORT_START("IN0")
481 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
482 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
483 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
484 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
485 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
486 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
487 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
488 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
489 
490 	PORT_START("IN1")   /* unused */
491 	PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
492 
493 	PORT_START("IN2")
494 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
495 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
496 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
497 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
498 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
499 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
500 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
501 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
502 
503 	/* speed of 13 is compromise between moving aim around screen fast
504 	   enough and being accurate enough not to miss targets. 20 is too
505 	   inaccurate, and 10 is too slow. */
506 
507 	PORT_START("P1X")
508 	PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(13) PORT_REVERSE PORT_PLAYER(1)
509 
510 	PORT_START("P1Y")
511 	PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_CROSSHAIR(Y, 1.0, -0.057, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(13) PORT_PLAYER(1)
512 
513 	PORT_START("P2X")
514 	PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(13) PORT_REVERSE PORT_PLAYER(2)
515 
516 	PORT_START("P2Y")
517 	PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_CROSSHAIR(Y, 1.0, -0.057, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(13) PORT_PLAYER(2)
518 
519 	/* rotary volume control */
520 	PORT_START("ROTARY")
521 	PORT_CONFNAME( 0x07, 0x07, "Stereo Separation" )
522 	PORT_CONFSETTING(    0x07, "Maximum" )
523 	PORT_CONFSETTING(    0x03, DEF_STR( High ) )
524 	PORT_CONFSETTING(    0x01, DEF_STR( Medium ) )
525 	PORT_CONFSETTING(    0x00, DEF_STR( Low ) )
526 INPUT_PORTS_END
527 
528 static INPUT_PORTS_START( othundrj )
529 	PORT_INCLUDE( othunder )
530 
531 	PORT_MODIFY( "DSWA" )
532 	TAITO_COINAGE_JAPAN_OLD
533 INPUT_PORTS_END
534 
535 static INPUT_PORTS_START( othundu )
536 	PORT_INCLUDE( othundrj )
537 
538 	PORT_MODIFY( "DSWB" )
539 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Continue_Price ) )        /* see notes */
540 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
541 	PORT_DIPSETTING(    0x40, "Same as Start" )
542 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Language ) )
543 	PORT_DIPSETTING(    0x00, DEF_STR( English ) )
544 	PORT_DIPSETTING(    0x80, DEF_STR( Japanese ) )
545 INPUT_PORTS_END
546 
547 
548 
549 /***********************************************************
550                 GFX DECODING
551 ***********************************************************/
552 
553 static const gfx_layout tile16x8_layout =
554 {
555 	16,8,
556 	RGN_FRAC(1,1),
557 	4,
558 	{ STEP4(0,16) },
559 	{ STEP16(0,1) },
560 	{ STEP8(0,16*4) },
561 	64*8
562 };
563 
564 static GFXDECODE_START( gfx_othunder )
565 	GFXDECODE_ENTRY( "sprites", 0, tile16x8_layout, 0, 256 )   /* sprite parts */
566 GFXDECODE_END
567 
568 
569 /***********************************************************
570                  MACHINE DRIVERS
571 ***********************************************************/
572 
machine_start()573 void othunder_state::machine_start()
574 {
575 	m_z80bank->configure_entries(0, 4, memregion("audiocpu")->base(), 0x4000);
576 
577 	save_item(NAME(m_pan));
578 }
579 
othunder(machine_config & config)580 void othunder_state::othunder(machine_config &config)
581 {
582 	/* basic machine hardware */
583 	M68000(config, m_maincpu, 24_MHz_XTAL/2);
584 	m_maincpu->set_addrmap(AS_PROGRAM, &othunder_state::othunder_map);
585 
586 	Z80(config, m_audiocpu, 16_MHz_XTAL/2/2);
587 	m_audiocpu->set_addrmap(AS_PROGRAM, &othunder_state::z80_sound_map);
588 
589 	EEPROM_93C46_16BIT(config, m_eeprom);
590 
591 	adc0808_device &adc(ADC0808(config, "adc", 16_MHz_XTAL/2/2/8));
592 	adc.eoc_callback().set(FUNC(othunder_state::adc_eoc_w));
593 	adc.in_callback<0>().set_ioport("P1X");
594 	adc.in_callback<1>().set_ioport("P1Y");
595 	adc.in_callback<2>().set_ioport("P2X");
596 	adc.in_callback<3>().set_ioport("P2Y");
597 
598 	TC0220IOC(config, m_tc0220ioc, 0);
599 	m_tc0220ioc->read_0_callback().set_ioport("DSWA");
600 	m_tc0220ioc->read_1_callback().set_ioport("DSWB");
601 	m_tc0220ioc->read_2_callback().set_ioport("IN0");
602 	m_tc0220ioc->read_3_callback().set(m_eeprom, FUNC(eeprom_serial_93cxx_device::do_read)).lshift(7);
603 	m_tc0220ioc->write_3_callback().set(FUNC(othunder_state::eeprom_w));
604 	m_tc0220ioc->write_4_callback().set(FUNC(othunder_state::coins_w));
605 	m_tc0220ioc->read_7_callback().set_ioport("IN2");
606 
607 	/* video hardware */
608 	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
609 	screen.set_refresh_hz(60);
610 	screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
611 	screen.set_size(40*8, 32*8);
612 	screen.set_visarea(0*8, 40*8-1, 2*8, 32*8-1);
613 	screen.set_screen_update(FUNC(othunder_state::screen_update));
614 	screen.set_palette(m_tc0110pcr);
615 	screen.screen_vblank().set(FUNC(othunder_state::vblank_w));
616 
617 	GFXDECODE(config, m_gfxdecode, m_tc0110pcr, gfx_othunder);
618 
619 	TC0100SCN(config, m_tc0100scn, 0);
620 	m_tc0100scn->set_offsets(4, 0);
621 	m_tc0100scn->set_palette(m_tc0110pcr);
622 
623 	TC0110PCR(config, m_tc0110pcr, 0);
624 
625 	/* sound hardware */
626 	SPEAKER(config, "speaker").front_center();
627 
628 	ym2610_device &ymsnd(YM2610(config, "ymsnd", 16000000/2));
629 	ymsnd.irq_handler().set_inputline(m_audiocpu, 0);
630 	ymsnd.add_route(0, "2610.0l", 0.25);
631 	ymsnd.add_route(0, "2610.0r", 0.25);
632 	ymsnd.add_route(1, "2610.1l", 1.0);
633 	ymsnd.add_route(1, "2610.1r", 1.0);
634 	ymsnd.add_route(2, "2610.2l", 1.0);
635 	ymsnd.add_route(2, "2610.2r", 1.0);
636 
637 	FILTER_VOLUME(config, "2610.0l").add_route(ALL_OUTPUTS, "speaker", 1.0);
638 	FILTER_VOLUME(config, "2610.0r").add_route(ALL_OUTPUTS, "speaker", 1.0);
639 	FILTER_VOLUME(config, "2610.1l").add_route(ALL_OUTPUTS, "speaker", 1.0);
640 	FILTER_VOLUME(config, "2610.1r").add_route(ALL_OUTPUTS, "speaker", 1.0);
641 	FILTER_VOLUME(config, "2610.2l").add_route(ALL_OUTPUTS, "speaker", 1.0);
642 	FILTER_VOLUME(config, "2610.2r").add_route(ALL_OUTPUTS, "speaker", 1.0);
643 
644 	TC0140SYT(config, m_tc0140syt, 0);
645 	m_tc0140syt->set_master_tag(m_maincpu);
646 	m_tc0140syt->set_slave_tag(m_audiocpu);
647 }
648 
649 
650 /***************************************************************************
651                     DRIVERS
652 ***************************************************************************/
653 
654 ROM_START( othunder )
655 	ROM_REGION( 0x80000, "maincpu", 0 ) /* 512K for 68000 code */
656 	ROM_LOAD16_BYTE( "b67-20-1.ic63", 0x00000, 0x20000, CRC(851a453b) SHA1(48b8c379e78cd79463f1e24dc23816a97cf819b8) )
657 	ROM_LOAD16_BYTE( "b67-23-1.ic64", 0x00001, 0x20000, CRC(6e4f3d56) SHA1(99a29c0cbea0aea42355a036aa7f2174ca997872) )
658 	ROM_LOAD16_BYTE( "b67-14.ic61",   0x40000, 0x20000, CRC(7f3dd724) SHA1(2f2eeae0ee31e20082237b9a947c6848771eb73c) )
659 	ROM_LOAD16_BYTE( "b67-15.ic62",   0x40001, 0x20000, CRC(e84f62d0) SHA1(3b4a55a14dee7d592467fde9a75bde64deabd27d) )
660 
661 	ROM_REGION( 0x10000, "audiocpu", 0 )    /* sound cpu */
662 	ROM_LOAD( "b67-13.ic40",   0x00000, 0x10000, CRC(2936b4b1) SHA1(39b41643464dd89e456ab6eb15a0ff0aef30afde) )
663 
664 	ROM_REGION( 0x80000, "tc0100scn", 0 )
665 	ROM_LOAD16_WORD_SWAP( "b67-06.ic66", 0x00000, 0x80000, CRC(b9a38d64) SHA1(7ae8165b444d9da6ccdbc4a769535bcbb6738aaa) )     /* SCN */
666 
667 	ROM_REGION( 0x200000, "sprites", 0 )
668 	ROM_LOAD64_WORD_SWAP( "b67-01.ic1", 0x00000, 0x80000, CRC(81ad9acb) SHA1(d9ad3f6332c6ca6b9872da57526a8158a3cf5b2f) ) /* OBJ: each rom has 1 bitplane, forming 16x8 tiles */
669 	ROM_LOAD64_WORD_SWAP( "b67-02.ic2", 0x00002, 0x80000, CRC(c20cd2fb) SHA1(b015e1fe167e19826aa451b45cd143d66a6db83c) )
670 	ROM_LOAD64_WORD_SWAP( "b67-03.ic3", 0x00004, 0x80000, CRC(bc9019ed) SHA1(7eddc83d71be97ce6637e6b35c226d58e6c39c3f) )
671 	ROM_LOAD64_WORD_SWAP( "b67-04.ic4", 0x00006, 0x80000, CRC(2af4c8af) SHA1(b2ae7aad0c59ffc368811f4bd5546dbb6860f9a9) )
672 
673 	ROM_REGION16_LE( 0x80000, "sprmap_rom", 0 )
674 	ROM_LOAD16_WORD( "b67-05.ic43", 0x00000, 0x80000, CRC(9593e42b) SHA1(54b5538c302a1734ff4b752ab87a8c45d5c6b23d) )  /* index used to create 64x64 sprites on the fly */
675 
676 	ROM_REGION( 0x80000, "ymsnd", 0 )   /* ADPCM samples */
677 	ROM_LOAD( "b67-08.ic67", 0x00000, 0x80000, CRC(458f41fb) SHA1(acca7c95acd1ae7a1cc51fb7fe644ad6d00ff5ac) )
678 
679 	ROM_REGION( 0x80000, "ymsnd.deltat", 0 )    /* Delta-T samples */
680 	ROM_LOAD( "b67-07.ic44", 0x00000, 0x80000, CRC(4f834357) SHA1(f34705ce64870a8b24ec2639505079cc031fb719) )
681 
682 	ROM_REGION( 0x0800, "plds", 0 )
683 	ROM_LOAD( "plhs18p8b-b67-09.ic15", 0x0000, 0x0149, CRC(62035487) SHA1(5d9538ea9eabff324d274772b1e1fc9a9aec9100) )
684 	ROM_LOAD( "pal16l8a-b67-11.ic36",  0x0200, 0x0104, CRC(3177fb06) SHA1(c128277fe03342d9ec8da3c6e08a404a3f010547) )
685 	ROM_LOAD( "pal20l8b-b67-12.ic37",  0x0400, 0x0144, CRC(a47c2798) SHA1(8c963efd416b3f6586cb12afb9417dc95c2bc574) )
686 	ROM_LOAD( "pal20l8b-b67-10.ic33",  0x0600, 0x0144, CRC(4ced09c7) SHA1(519e6152cc5e4cb3ec24c4dc09101dddf22988aa) )
687 
688 	ROM_REGION16_BE( 0x80, "eeprom", 0 )
689 	ROM_LOAD16_WORD( "93c46_eeprom-othunder.ic86", 0x0000, 0x0080, CRC(3729b844) SHA1(f6bb41d293d1e47214f8b2d147991404f3278ebf) )
690 ROM_END
691 
692 ROM_START( othundero )
693 	ROM_REGION( 0x80000, "maincpu", 0 ) /* 512K for 68000 code */
694 	ROM_LOAD16_BYTE( "b67-20.ic63",   0x00000, 0x20000, CRC(21439ea2) SHA1(d5b5a194e9698cf43513c0d56146772e8132ab07) )
695 	ROM_LOAD16_BYTE( "b67-23.ic64",   0x00001, 0x20000, CRC(789e9daa) SHA1(15bb0eec68aeea0b9f55889566338c9ce0ac9b5e) )
696 	ROM_LOAD16_BYTE( "b67-14.ic61",   0x40000, 0x20000, CRC(7f3dd724) SHA1(2f2eeae0ee31e20082237b9a947c6848771eb73c) )
697 	ROM_LOAD16_BYTE( "b67-15.ic62",   0x40001, 0x20000, CRC(e84f62d0) SHA1(3b4a55a14dee7d592467fde9a75bde64deabd27d) )
698 
699 	ROM_REGION( 0x10000, "audiocpu", 0 )    /* sound cpu */
700 	ROM_LOAD( "b67-13.ic40",   0x00000, 0x10000, CRC(2936b4b1) SHA1(39b41643464dd89e456ab6eb15a0ff0aef30afde) )
701 
702 	ROM_REGION( 0x80000, "tc0100scn", 0 )
703 	ROM_LOAD16_WORD_SWAP( "b67-06.ic66", 0x00000, 0x80000, CRC(b9a38d64) SHA1(7ae8165b444d9da6ccdbc4a769535bcbb6738aaa) )     /* SCN */
704 
705 	ROM_REGION( 0x200000, "sprites", 0 )
706 	ROM_LOAD64_WORD_SWAP( "b67-01.ic1", 0x00000, 0x80000, CRC(81ad9acb) SHA1(d9ad3f6332c6ca6b9872da57526a8158a3cf5b2f) ) /* OBJ: each rom has 1 bitplane, forming 16x8 tiles */
707 	ROM_LOAD64_WORD_SWAP( "b67-02.ic2", 0x00002, 0x80000, CRC(c20cd2fb) SHA1(b015e1fe167e19826aa451b45cd143d66a6db83c) )
708 	ROM_LOAD64_WORD_SWAP( "b67-03.ic3", 0x00004, 0x80000, CRC(bc9019ed) SHA1(7eddc83d71be97ce6637e6b35c226d58e6c39c3f) )
709 	ROM_LOAD64_WORD_SWAP( "b67-04.ic4", 0x00006, 0x80000, CRC(2af4c8af) SHA1(b2ae7aad0c59ffc368811f4bd5546dbb6860f9a9) )
710 
711 	ROM_REGION16_LE( 0x80000, "sprmap_rom", 0 )
712 	ROM_LOAD16_WORD( "b67-05.ic43", 0x00000, 0x80000, CRC(9593e42b) SHA1(54b5538c302a1734ff4b752ab87a8c45d5c6b23d) )  /* index used to create 64x64 sprites on the fly */
713 
714 	ROM_REGION( 0x80000, "ymsnd", 0 )   /* ADPCM samples */
715 	ROM_LOAD( "b67-08.ic67", 0x00000, 0x80000, CRC(458f41fb) SHA1(acca7c95acd1ae7a1cc51fb7fe644ad6d00ff5ac) )
716 
717 	ROM_REGION( 0x80000, "ymsnd.deltat", 0 )    /* Delta-T samples */
718 	ROM_LOAD( "b67-07.ic44", 0x00000, 0x80000, CRC(4f834357) SHA1(f34705ce64870a8b24ec2639505079cc031fb719) )
719 
720 	ROM_REGION( 0x0800, "plds", 0 )
721 	ROM_LOAD( "plhs18p8b-b67-09.ic15", 0x0000, 0x0149, CRC(62035487) SHA1(5d9538ea9eabff324d274772b1e1fc9a9aec9100) )
722 	ROM_LOAD( "pal16l8a-b67-11.ic36",  0x0200, 0x0104, CRC(3177fb06) SHA1(c128277fe03342d9ec8da3c6e08a404a3f010547) )
723 	ROM_LOAD( "pal20l8b-b67-12.ic37",  0x0400, 0x0144, CRC(a47c2798) SHA1(8c963efd416b3f6586cb12afb9417dc95c2bc574) )
724 	ROM_LOAD( "pal20l8b-b67-10.ic33",  0x0600, 0x0144, CRC(4ced09c7) SHA1(519e6152cc5e4cb3ec24c4dc09101dddf22988aa) )
725 
726 	ROM_REGION16_BE( 0x80, "eeprom", 0 )
727 	ROM_LOAD16_WORD( "93c46_eeprom-othunder.ic86", 0x0000, 0x0080, CRC(3729b844) SHA1(f6bb41d293d1e47214f8b2d147991404f3278ebf) )
728 ROM_END
729 
730 ROM_START( othunderu )
731 	ROM_REGION( 0x80000, "maincpu", 0 ) /* 512K for 68000 code */
732 	ROM_LOAD16_BYTE( "b67-20-1.ic63", 0x00000, 0x20000, CRC(851a453b) SHA1(48b8c379e78cd79463f1e24dc23816a97cf819b8) )
733 	ROM_LOAD16_BYTE( "b67-22-1.ic64", 0x00001, 0x20000, CRC(19480dc0) SHA1(8bbc982c89f0878e7639330970df5aa93ecbb083) )
734 	ROM_LOAD16_BYTE( "b67-14.ic61",   0x40000, 0x20000, CRC(7f3dd724) SHA1(2f2eeae0ee31e20082237b9a947c6848771eb73c) )
735 	ROM_LOAD16_BYTE( "b67-15.ic62",   0x40001, 0x20000, CRC(e84f62d0) SHA1(3b4a55a14dee7d592467fde9a75bde64deabd27d) )
736 
737 	ROM_REGION( 0x10000, "audiocpu", 0 )    /* sound cpu */
738 	ROM_LOAD( "b67-13.ic40",   0x00000, 0x10000, CRC(2936b4b1) SHA1(39b41643464dd89e456ab6eb15a0ff0aef30afde) )
739 
740 	ROM_REGION( 0x80000, "tc0100scn", 0 )
741 	ROM_LOAD16_WORD_SWAP( "b67-06.ic66", 0x00000, 0x80000, CRC(b9a38d64) SHA1(7ae8165b444d9da6ccdbc4a769535bcbb6738aaa) )     /* SCN */
742 
743 	ROM_REGION( 0x200000, "sprites", 0 )
744 	ROM_LOAD64_WORD_SWAP( "b67-01.ic1", 0x00000, 0x80000, CRC(81ad9acb) SHA1(d9ad3f6332c6ca6b9872da57526a8158a3cf5b2f) ) /* OBJ: each rom has 1 bitplane, forming 16x8 tiles */
745 	ROM_LOAD64_WORD_SWAP( "b67-02.ic2", 0x00002, 0x80000, CRC(c20cd2fb) SHA1(b015e1fe167e19826aa451b45cd143d66a6db83c) )
746 	ROM_LOAD64_WORD_SWAP( "b67-03.ic3", 0x00004, 0x80000, CRC(bc9019ed) SHA1(7eddc83d71be97ce6637e6b35c226d58e6c39c3f) )
747 	ROM_LOAD64_WORD_SWAP( "b67-04.ic4", 0x00006, 0x80000, CRC(2af4c8af) SHA1(b2ae7aad0c59ffc368811f4bd5546dbb6860f9a9) )
748 
749 	ROM_REGION16_LE( 0x80000, "sprmap_rom", 0 )
750 	ROM_LOAD16_WORD( "b67-05.ic43", 0x00000, 0x80000, CRC(9593e42b) SHA1(54b5538c302a1734ff4b752ab87a8c45d5c6b23d) )  /* index used to create 64x64 sprites on the fly */
751 
752 	ROM_REGION( 0x80000, "ymsnd", 0 )   /* ADPCM samples */
753 	ROM_LOAD( "b67-08.ic67", 0x00000, 0x80000, CRC(458f41fb) SHA1(acca7c95acd1ae7a1cc51fb7fe644ad6d00ff5ac) )
754 
755 	ROM_REGION( 0x80000, "ymsnd.deltat", 0 )    /* Delta-T samples */
756 	ROM_LOAD( "b67-07.ic44", 0x00000, 0x80000, CRC(4f834357) SHA1(f34705ce64870a8b24ec2639505079cc031fb719) )
757 
758 	ROM_REGION( 0x0800, "plds", 0 )
759 	ROM_LOAD( "plhs18p8b-b67-09.ic15", 0x0000, 0x0149, CRC(62035487) SHA1(5d9538ea9eabff324d274772b1e1fc9a9aec9100) )
760 	ROM_LOAD( "pal16l8a-b67-11.ic36",  0x0200, 0x0104, CRC(3177fb06) SHA1(c128277fe03342d9ec8da3c6e08a404a3f010547) )
761 	ROM_LOAD( "pal20l8b-b67-12.ic37",  0x0400, 0x0144, CRC(a47c2798) SHA1(8c963efd416b3f6586cb12afb9417dc95c2bc574) )
762 	ROM_LOAD( "pal20l8b-b67-10.ic33",  0x0600, 0x0144, CRC(4ced09c7) SHA1(519e6152cc5e4cb3ec24c4dc09101dddf22988aa) )
763 
764 	ROM_REGION16_BE( 0x80, "eeprom", 0 )
765 	ROM_LOAD16_WORD( "93c46_eeprom-othunder.ic86", 0x0000, 0x0080, CRC(3729b844) SHA1(f6bb41d293d1e47214f8b2d147991404f3278ebf) )
766 ROM_END
767 
768 ROM_START( othunderuo )
769 	ROM_REGION( 0x80000, "maincpu", 0 ) /* 512K for 68000 code */
770 	ROM_LOAD16_BYTE( "b67-20.ic63",   0x00000, 0x20000, CRC(21439ea2) SHA1(d5b5a194e9698cf43513c0d56146772e8132ab07) )
771 	ROM_LOAD16_BYTE( "b67-22.ic64",   0x00001, 0x20000, CRC(0f99ad3c) SHA1(dd6c9e822470ca867ec01e642443a871e879bae5) )
772 	ROM_LOAD16_BYTE( "b67-14.ic61",   0x40000, 0x20000, CRC(7f3dd724) SHA1(2f2eeae0ee31e20082237b9a947c6848771eb73c) )
773 	ROM_LOAD16_BYTE( "b67-15.ic62",   0x40001, 0x20000, CRC(e84f62d0) SHA1(3b4a55a14dee7d592467fde9a75bde64deabd27d) )
774 
775 	ROM_REGION( 0x10000, "audiocpu", 0 )    /* sound cpu */
776 	ROM_LOAD( "b67-13.ic40",   0x00000, 0x10000, CRC(2936b4b1) SHA1(39b41643464dd89e456ab6eb15a0ff0aef30afde) )
777 
778 	ROM_REGION( 0x80000, "tc0100scn", 0 )
779 	ROM_LOAD16_WORD_SWAP( "b67-06.ic66", 0x00000, 0x80000, CRC(b9a38d64) SHA1(7ae8165b444d9da6ccdbc4a769535bcbb6738aaa) )     /* SCN */
780 
781 	ROM_REGION( 0x200000, "sprites", 0 )
782 	ROM_LOAD64_WORD_SWAP( "b67-01.ic1", 0x00000, 0x80000, CRC(81ad9acb) SHA1(d9ad3f6332c6ca6b9872da57526a8158a3cf5b2f) ) /* OBJ: each rom has 1 bitplane, forming 16x8 tiles */
783 	ROM_LOAD64_WORD_SWAP( "b67-02.ic2", 0x00002, 0x80000, CRC(c20cd2fb) SHA1(b015e1fe167e19826aa451b45cd143d66a6db83c) )
784 	ROM_LOAD64_WORD_SWAP( "b67-03.ic3", 0x00004, 0x80000, CRC(bc9019ed) SHA1(7eddc83d71be97ce6637e6b35c226d58e6c39c3f) )
785 	ROM_LOAD64_WORD_SWAP( "b67-04.ic4", 0x00006, 0x80000, CRC(2af4c8af) SHA1(b2ae7aad0c59ffc368811f4bd5546dbb6860f9a9) )
786 
787 	ROM_REGION16_LE( 0x80000, "sprmap_rom", 0 )
788 	ROM_LOAD16_WORD( "b67-05.ic43", 0x00000, 0x80000, CRC(9593e42b) SHA1(54b5538c302a1734ff4b752ab87a8c45d5c6b23d) )  /* index used to create 64x64 sprites on the fly */
789 
790 	ROM_REGION( 0x80000, "ymsnd", 0 )   /* ADPCM samples */
791 	ROM_LOAD( "b67-08.ic67", 0x00000, 0x80000, CRC(458f41fb) SHA1(acca7c95acd1ae7a1cc51fb7fe644ad6d00ff5ac) )
792 
793 	ROM_REGION( 0x80000, "ymsnd.deltat", 0 )    /* Delta-T samples */
794 	ROM_LOAD( "b67-07.ic44", 0x00000, 0x80000, CRC(4f834357) SHA1(f34705ce64870a8b24ec2639505079cc031fb719) )
795 
796 	ROM_REGION( 0x0800, "plds", 0 )
797 	ROM_LOAD( "plhs18p8b-b67-09.ic15", 0x0000, 0x0149, CRC(62035487) SHA1(5d9538ea9eabff324d274772b1e1fc9a9aec9100) )
798 	ROM_LOAD( "pal16l8a-b67-11.ic36",  0x0200, 0x0104, CRC(3177fb06) SHA1(c128277fe03342d9ec8da3c6e08a404a3f010547) )
799 	ROM_LOAD( "pal20l8b-b67-12.ic37",  0x0400, 0x0144, CRC(a47c2798) SHA1(8c963efd416b3f6586cb12afb9417dc95c2bc574) )
800 	ROM_LOAD( "pal20l8b-b67-10.ic33",  0x0600, 0x0144, CRC(4ced09c7) SHA1(519e6152cc5e4cb3ec24c4dc09101dddf22988aa) )
801 
802 	ROM_REGION16_BE( 0x80, "eeprom", 0 )
803 	ROM_LOAD16_WORD( "93c46_eeprom-othunder.ic86", 0x0000, 0x0080, CRC(3729b844) SHA1(f6bb41d293d1e47214f8b2d147991404f3278ebf) )
804 ROM_END
805 
806 ROM_START( othunderj )
807 	ROM_REGION( 0x80000, "maincpu", 0 ) /* 512K for 68000 code */
808 	ROM_LOAD16_BYTE( "b67-20.ic63",   0x00000, 0x20000, CRC(21439ea2) SHA1(d5b5a194e9698cf43513c0d56146772e8132ab07) )
809 	ROM_LOAD16_BYTE( "b67-21.ic64",   0x00001, 0x20000, CRC(9690fc86) SHA1(4e695554fc9cc91c5f8cff95dc290333bb56d571) )
810 	ROM_LOAD16_BYTE( "b67-14.ic61",   0x40000, 0x20000, CRC(7f3dd724) SHA1(2f2eeae0ee31e20082237b9a947c6848771eb73c) )
811 	ROM_LOAD16_BYTE( "b67-15.ic62",   0x40001, 0x20000, CRC(e84f62d0) SHA1(3b4a55a14dee7d592467fde9a75bde64deabd27d) )
812 
813 	ROM_REGION( 0x10000, "audiocpu", 0 )    /* sound cpu */
814 	ROM_LOAD( "b67-13.ic40",   0x00000, 0x10000, CRC(2936b4b1) SHA1(39b41643464dd89e456ab6eb15a0ff0aef30afde) )
815 
816 	ROM_REGION( 0x80000, "tc0100scn", 0 )
817 	ROM_LOAD16_WORD_SWAP( "b67-06.ic66", 0x00000, 0x80000, CRC(b9a38d64) SHA1(7ae8165b444d9da6ccdbc4a769535bcbb6738aaa) )     /* SCN */
818 
819 	ROM_REGION( 0x200000, "sprites", 0 )
820 	ROM_LOAD64_WORD_SWAP( "b67-01.ic1", 0x00000, 0x80000, CRC(81ad9acb) SHA1(d9ad3f6332c6ca6b9872da57526a8158a3cf5b2f) ) /* OBJ: each rom has 1 bitplane, forming 16x8 tiles */
821 	ROM_LOAD64_WORD_SWAP( "b67-02.ic2", 0x00002, 0x80000, CRC(c20cd2fb) SHA1(b015e1fe167e19826aa451b45cd143d66a6db83c) )
822 	ROM_LOAD64_WORD_SWAP( "b67-03.ic3", 0x00004, 0x80000, CRC(bc9019ed) SHA1(7eddc83d71be97ce6637e6b35c226d58e6c39c3f) )
823 	ROM_LOAD64_WORD_SWAP( "b67-04.ic4", 0x00006, 0x80000, CRC(2af4c8af) SHA1(b2ae7aad0c59ffc368811f4bd5546dbb6860f9a9) )
824 
825 	ROM_REGION16_LE( 0x80000, "sprmap_rom", 0 )
826 	ROM_LOAD16_WORD( "b67-05.ic43", 0x00000, 0x80000, CRC(9593e42b) SHA1(54b5538c302a1734ff4b752ab87a8c45d5c6b23d) )  /* index used to create 64x64 sprites on the fly */
827 
828 	ROM_REGION( 0x80000, "ymsnd", 0 )   /* ADPCM samples */
829 	ROM_LOAD( "b67-08.ic67", 0x00000, 0x80000, CRC(458f41fb) SHA1(acca7c95acd1ae7a1cc51fb7fe644ad6d00ff5ac) )
830 
831 	ROM_REGION( 0x80000, "ymsnd.deltat", 0 )    /* Delta-T samples */
832 	ROM_LOAD( "b67-07.ic44", 0x00000, 0x80000, CRC(4f834357) SHA1(f34705ce64870a8b24ec2639505079cc031fb719) )
833 
834 	ROM_REGION( 0x0800, "plds", 0 )
835 	ROM_LOAD( "plhs18p8b-b67-09.ic15", 0x0000, 0x0149, CRC(62035487) SHA1(5d9538ea9eabff324d274772b1e1fc9a9aec9100) )
836 	ROM_LOAD( "pal16l8a-b67-11.ic36",  0x0200, 0x0104, CRC(3177fb06) SHA1(c128277fe03342d9ec8da3c6e08a404a3f010547) )
837 	ROM_LOAD( "pal20l8b-b67-12.ic37",  0x0400, 0x0144, CRC(a47c2798) SHA1(8c963efd416b3f6586cb12afb9417dc95c2bc574) )
838 	ROM_LOAD( "pal20l8b-b67-10.ic33",  0x0600, 0x0144, CRC(4ced09c7) SHA1(519e6152cc5e4cb3ec24c4dc09101dddf22988aa) )
839 
840 	ROM_REGION16_BE( 0x80, "eeprom", 0 )
841 	ROM_LOAD16_WORD( "93c46_eeprom-othunder.ic86", 0x0000, 0x0080, CRC(3729b844) SHA1(f6bb41d293d1e47214f8b2d147991404f3278ebf) )
842 ROM_END
843 
844 ROM_START( othunderjsc ) // SC stands for Shopping Center. It was put in a smaller, single player cabinet aimed at children
845 	ROM_REGION( 0x80000, "maincpu", 0 ) /* 512K for 68000 code */
846 	ROM_LOAD16_BYTE( "b67-24.ic63",   0x00000, 0x20000, CRC(18670e0b) SHA1(d848623046905471e3f859db6f179e1e4b3e4d51) ) // 27C1001
847 	ROM_LOAD16_BYTE( "b67-25.ic64",   0x00001, 0x20000, CRC(3d422991) SHA1(22d18fdd9c4511774e0a4b246a293d27f7498735) ) // 27C1001
848 	ROM_LOAD16_BYTE( "b67-14.ic61",   0x40000, 0x20000, CRC(7f3dd724) SHA1(2f2eeae0ee31e20082237b9a947c6848771eb73c) )
849 	ROM_LOAD16_BYTE( "b67-15.ic62",   0x40001, 0x20000, CRC(e84f62d0) SHA1(3b4a55a14dee7d592467fde9a75bde64deabd27d) )
850 
851 	ROM_REGION( 0x10000, "audiocpu", 0 )    /* sound cpu */
852 	ROM_LOAD( "b67-13.ic40",   0x00000, 0x10000, CRC(2936b4b1) SHA1(39b41643464dd89e456ab6eb15a0ff0aef30afde) )
853 
854 	ROM_REGION( 0x80000, "tc0100scn", 0 )
855 	ROM_LOAD16_WORD_SWAP( "b67-06.ic66", 0x00000, 0x80000, CRC(b9a38d64) SHA1(7ae8165b444d9da6ccdbc4a769535bcbb6738aaa) )     /* SCN */
856 
857 	ROM_REGION( 0x200000, "sprites", 0 )
858 	ROM_LOAD64_WORD_SWAP( "b67-01.ic1", 0x00000, 0x80000, CRC(81ad9acb) SHA1(d9ad3f6332c6ca6b9872da57526a8158a3cf5b2f) ) /* OBJ: each rom has 1 bitplane, forming 16x8 tiles */
859 	ROM_LOAD64_WORD_SWAP( "b67-02.ic2", 0x00002, 0x80000, CRC(c20cd2fb) SHA1(b015e1fe167e19826aa451b45cd143d66a6db83c) )
860 	ROM_LOAD64_WORD_SWAP( "b67-03.ic3", 0x00004, 0x80000, CRC(bc9019ed) SHA1(7eddc83d71be97ce6637e6b35c226d58e6c39c3f) )
861 	ROM_LOAD64_WORD_SWAP( "b67-04.ic4", 0x00006, 0x80000, CRC(2af4c8af) SHA1(b2ae7aad0c59ffc368811f4bd5546dbb6860f9a9) )
862 
863 	ROM_REGION16_LE( 0x80000, "sprmap_rom", 0 )
864 	ROM_LOAD16_WORD( "b67-05.ic43", 0x00000, 0x80000, CRC(9593e42b) SHA1(54b5538c302a1734ff4b752ab87a8c45d5c6b23d) )  /* index used to create 64x64 sprites on the fly */
865 
866 	ROM_REGION( 0x80000, "ymsnd", 0 )   /* ADPCM samples */
867 	ROM_LOAD( "b67-08.ic67", 0x00000, 0x80000, CRC(458f41fb) SHA1(acca7c95acd1ae7a1cc51fb7fe644ad6d00ff5ac) )
868 
869 	ROM_REGION( 0x80000, "ymsnd.deltat", 0 )    /* Delta-T samples */
870 	ROM_LOAD( "b67-07.ic44", 0x00000, 0x80000, CRC(4f834357) SHA1(f34705ce64870a8b24ec2639505079cc031fb719) )
871 
872 	ROM_REGION( 0x0800, "plds", 0 )
873 	ROM_LOAD( "plhs18p8b-b67-09.ic15", 0x0000, 0x0149, CRC(62035487) SHA1(5d9538ea9eabff324d274772b1e1fc9a9aec9100) )
874 	ROM_LOAD( "pal16l8a-b67-11.ic36",  0x0200, 0x0104, CRC(3177fb06) SHA1(c128277fe03342d9ec8da3c6e08a404a3f010547) )
875 	ROM_LOAD( "pal20l8b-b67-12.ic37",  0x0400, 0x0144, CRC(a47c2798) SHA1(8c963efd416b3f6586cb12afb9417dc95c2bc574) )
876 	ROM_LOAD( "pal20l8b-b67-10.ic33",  0x0600, 0x0144, CRC(4ced09c7) SHA1(519e6152cc5e4cb3ec24c4dc09101dddf22988aa) )
877 
878 	ROM_REGION16_BE( 0x80, "eeprom", 0 )
879 	ROM_LOAD16_WORD( "93c46_eeprom-othunder.ic86", 0x0000, 0x0080, CRC(3729b844) SHA1(f6bb41d293d1e47214f8b2d147991404f3278ebf) )
880 ROM_END
881 
882 GAME( 1988, othunder,    0,        othunder, othunder, othunder_state, empty_init, ORIENTATION_FLIP_X, "Taito Corporation Japan",   "Operation Thunderbolt (World, rev 1)", MACHINE_SUPPORTS_SAVE )
883 GAME( 1988, othundero,   othunder, othunder, othunder, othunder_state, empty_init, ORIENTATION_FLIP_X, "Taito Corporation Japan",   "Operation Thunderbolt (World)",        MACHINE_SUPPORTS_SAVE )
884 GAME( 1988, othunderu,   othunder, othunder, othundu,  othunder_state, empty_init, ORIENTATION_FLIP_X, "Taito America Corporation", "Operation Thunderbolt (US, rev 1)",    MACHINE_SUPPORTS_SAVE )
885 GAME( 1988, othunderuo,  othunder, othunder, othundu,  othunder_state, empty_init, ORIENTATION_FLIP_X, "Taito America Corporation", "Operation Thunderbolt (US)",           MACHINE_SUPPORTS_SAVE )
886 GAME( 1988, othunderj,   othunder, othunder, othundrj, othunder_state, empty_init, ORIENTATION_FLIP_X, "Taito Corporation",         "Operation Thunderbolt (Japan)",        MACHINE_SUPPORTS_SAVE )
887 GAME( 1988, othunderjsc, othunder, othunder, othundrj, othunder_state, empty_init, ORIENTATION_FLIP_X, "Taito Corporation",         "Operation Thunderbolt (Japan, SC)",    MACHINE_SUPPORTS_SAVE )
888