~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to mess/src/mame/drivers/othunder.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Jordi Mallach, Emmanuel Kasper
  • Date: 2011-12-19 22:56:27 UTC
  • mfrom: (0.1.2)
  • Revision ID: package-import@ubuntu.com-20111219225627-ub5oga1oys4ogqzm
Tags: 0.144-1
[ Jordi Mallach ]
* Fix syntax errors in DEP5 copyright file (lintian).
* Use a versioned copyright Format specification field.
* Update Vcs-* URLs.
* Move transitional packages to the new metapackages section, and make
  them priority extra.
* Remove references to GNU/Linux and MESS sources from copyright.
* Add build variables for s390x.
* Use .xz tarballs as it cuts 4MB for the upstream sources.
* Add nplayers.ini as a patch. Update copyright file to add CC-BY-SA-3.0.

[ Emmanuel Kasper ]
* New upstream release. Closes: #651538.
* Add Free Desktop compliant png icons of various sizes taken from
  the hydroxygen iconset
* Mess is now built from a new source package, to avoid possible source
  incompatibilities between mame and the mess overlay.
* Mame-tools are not built from the mame source package anymore, but
  from the mess source package

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 
3
 
Operation Thunderbolt  (Taito)
4
 
---------------------
5
 
 
6
 
David Graves
7
 
 
8
 
(this is based on the F2 driver by Bryan McPhail, Brad Oliver, Andrew Prime,
9
 
Nicola Salmoria. Thanks to Richard Bush and the Raine team, whose open
10
 
source was very helpful in many areas particularly the sprites.)
11
 
 
12
 
                *****
13
 
 
14
 
Operation Thunderbolt
15
 
Taito, 1988
16
 
 
17
 
PCB Layout
18
 
----------
19
 
 
20
 
K1100381A
21
 
J1100166A MAIN PCB
22
 
|-----------------------------------------------------------------------|
23
 
|     VOL     VOL        YM3016   B67-13.40  16MHz  24MHz               |
24
 
|                |------|                                           PAL |
25
 
|                |TAITO |         Z80                                   |
26
 
|                |TC0140|         6264          26.686MHz    6116  6116 |
27
 
|                |SYT   |                                    6116  6116 |
28
 
|                |------|         YM2610                     6116  6116 |
29
 
|    ADC0808     B67-08.67                                   6116  6116 |
30
 
|                                B67-07.44         |------|             |
31
 
|J               B67-06.66                         |TAITO |    |------| |
32
 
|A    |------|                                     |TC0020|    |TAITO | |
33
 
|M    |TAITO |                62256  62256         |VAR   |    |TC0050| |
34
 
|M    |TC0220|       |------|                      |------|    |VDZ   | |
35
 
|A    |IOC   |       |TAITO |                                  |------| |
36
 
|     |------|       |TC0100|  6116 6116                                |
37
 
|                    |SCN   |                        |------|           |
38
 
|    DSWA  DSWB      |------|         B67-05.43      |TAITO |           |
39
 
|                                                    |TC0050|           |
40
 
|                            |------|                |VDZ   |           |
41
 
|     |------|    B67-23.64  |TAITO |   |----|       |------|  B67-04.4 |
42
 
|     |TAITO |               |TC0320|   | 6  |                          |
43
 
| 555 |TC0110|    B67-20.63  |OBR   |   | 8  |  PAL  |------|  B67-03.3 |
44
 
|     |PCR   |               |------|   | 0  |       |TAITO |           |
45
 
|     |------|    B67-15.62    62256    | 0  |  PAL  |TC0050|  B67-02.2 |
46
 
|                                       | 0  |       |VDZ   |           |
47
 
|         6264    B67-14.61    62256    |----|  PAL  |------|  B67-01.1 |
48
 
|-----------------------------------------------------------------------|
49
 
Notes:
50
 
      68000 running at 12.000MHz [24/2]
51
 
      Z80 running at 4.000MHz [24/6]
52
 
      YM2610 running at 8.000MHz [16/2]
53
 
      Taito Custom ICs -
54
 
                         TC0220IOC
55
 
                         TC0110PCR
56
 
                         TC0140SYT
57
 
                         TC0100SCN
58
 
                         TC0320OBR
59
 
                         TC0020VAR
60
 
                         TC0050VDZ (x3)
61
 
 
62
 
 
63
 
Operation Thunderbolt operates on hardware very similar to the Taito Z
64
 
system, in particular the game Spacegun. The lightgun hardware in these
65
 
two (as well as the eerom and calibration process) looks identical.
66
 
 
67
 
The game has 4 separate layers of graphics - one 64x64 tiled scrolling
68
 
background plane of 8x8 tiles, a similar foreground plane, a sprite plane,
69
 
and a text plane with character definitions held in ram.
70
 
 
71
 
The sprites are 16x8 tiles aggregated through a spritemap rom into 64x64
72
 
zoomable sprites.
73
 
 
74
 
The main difference is that Operation Thunderbolt uses only a single 68000
75
 
CPU, whereas Spacegun has twin 68Ks. (Operation Thunderbolt has a Z80
76
 
taking over sound duties, which Spacegun doesn't.)
77
 
 
78
 
 
79
 
custom ICs
80
 
----------
81
 
TC0020VAR     sprites??
82
 
TC0050VDZ x3  sprites??
83
 
TC0070RGB     video DAC
84
 
TC0100SCN     tilemaps
85
 
TC0110PCR     palette
86
 
TC0140SYT     main/sub CPU interface + sub cpu address decoder and I/O interface
87
 
TC0220IOC     I/O interface
88
 
TC0310FAM x2  sound volume and panning
89
 
TC0320OBR     sprites
90
 
 
91
 
 
92
 
memory map
93
 
----------
94
 
68000:
95
 
 
96
 
The address decoding is done by two PALs (IC37 and IC33). Part of the decoding,
97
 
and also interrupt control, is done by another PAL (IC36). Luckily this time,
98
 
the PALs HAVE been read, so the memory map is accurate :)
99
 
 
100
 
Address                  Dir Data             Name      Description
101
 
------------------------ --- ---------------- --------- -----------------------
102
 
000000xxxxxxxxxxxxxxxxx- R   xxxxxxxxxxxxxxxx TROM0     program ROM
103
 
000001xxxxxxxxxxxxxxxxx- R   xxxxxxxxxxxxxxxx TROM1     program ROM
104
 
00001000xxxxxxxxxxxxxxxx R/W xxxxxxxxxxxxxxxx TRAMH     work RAM
105
 
00001001-----------xxxx- R/W --------xxxxxxxx II/O      TC0220IOC
106
 
0001-----------------xxx R/W xxxxxxxxxxxxxxxx CLCS      TC0110PCR
107
 
0010--xxxxxxxxxxxxxxxxxx R/W xxxxxxxxxxxxxxxx SCCS      TC0100SCN
108
 
0011------------------xx R/W ------------xxxx SSCS      TC0140SYT
109
 
0100---------xxxxxxxxxxx R/W xxxxxxxxxxxxxxxx OBCS      TC0320OBR
110
 
0101----------------xxx- R/W --------xxxxxxxx A/DOE     ADC0808 A/D converter (for lightgun)
111
 
0110----------------000-   W ----------------           IRQ5 acknowledge (automatically enabled on reset)
112
 
0110----------------001-   W ---------------- 6PR       IRQ6 acknowledge (automatically enabled on reset)
113
 
0110----------------010-   W ---------------- n.c.
114
 
0110----------------011-   W ---------------- n.c.
115
 
0110----------------100-   W ---------------- n.c.
116
 
0110----------------101-   W ---------------- n.c.
117
 
0110----------------110-   W ---------------- n.c.
118
 
0110----------------111-   W ---------------- n.c.
119
 
 
120
 
 
121
 
Z80:
122
 
 
123
 
all of the address decoding is done by the TC0140SYT, which uses address bits
124
 
A0 and A9-A15, and data bits D0-D3.
125
 
 
126
 
Address          Dir Data     Name        Description
127
 
---------------- --- -------- ----------- -----------------------
128
 
00xxxxxxxxxxxxxx R   xxxxxxxx ROM         program ROM (TC0140SYT ROMCS0 pin)
129
 
01xxxxxxxxxxxxxx R   xxxxxxxx ROM         program ROM (banked) (TC0140SYT ROMCS0, ROMA14 and ROMA15 pins)
130
 
110xxxxxxxxxxxxx R/W xxxxxxxx SRAM        work RAM (TC0140SYT RAMCS pin)
131
 
1110000-------xx R/W xxxxxxxx OP_T        YM2610 (TC0140SYT OPX pin)
132
 
1110001--------x R/W ----xxxx             TC0140SYT control
133
 
1110010-------00   W ---xxxxx CH1_VOLR_CT TC0310FAM #1 CS2 (TC0140SYT CSA pin)
134
 
1110010-------01   W ---xxxxx CH1_VOLF_CT TC0310FAM #1 CS1 (TC0140SYT CSA pin)
135
 
1110010-------10   W ---xxxxx CH2_VOLR_CT TC0310FAM #2 CS2 (TC0140SYT CSA pin)
136
 
1110010-------11   W ---xxxxx CH2_VOLF_CT TC0310FAM #2 CS1 (TC0140SYT CSA pin)
137
 
1110011---------   W                      ??
138
 
1110100---------
139
 
1110101--------- R   -------x ROTARY 1    TC0140SYT I/OA0 pin
140
 
1110101--------- R   ------x- ROTARY 2    TC0140SYT I/OA1 pin
141
 
1110101--------- R   -----x-- ROTARY 3    TC0140SYT I/OA2 pin
142
 
1110110---------
143
 
1110111---------   W                      ??
144
 
1111000---------   W                      ??
145
 
1111001---------   W ----xxxx             TC0140SYT ROM bankswitch
146
 
 
147
 
 
148
 
 
149
 
Notes:
150
 
------
151
 
- The game checks an external input called ROTARY in the schematics, not
152
 
  mentioned in the manual. The ROTARY input controls the separation between
153
 
  left and right players, the game adjusts the values written to the external
154
 
  volume controller depending on it.
155
 
  Possible values are: 111 (max) 011 (high) -01 (med) --0 (low). It's a
156
 
  rotary control so only one bit is supposed to be low.
157
 
 
158
 
(Changed set led output to proper output port.  --HowardC)
159
 
- The outputs I'm turning on are actually the gun solenoid outputs, which
160
 
  would rattle the gun while firing.
161
 
 
162
 
 
163
 
- BM, 060108 - The original flyer for this game has screenshots which clearly
164
 
  show the background is 4 pixels to the left on several game stages (you can
165
 
  see the edge of sprites overlapping past the right edge).  Therefore I
166
 
  do not believe the TC0100SCN problem mentioned above actually exists.  The
167
 
  current emulation appears to be accurate.
168
 
 
169
 
 
170
 
Stephh's notes (based on the game M68000 code and some tests) :
171
 
 
172
 
1) 'othunder', 'othundrj' and 'othunduo'
173
 
 
174
 
  - Region stored at 0x03fffe.w
175
 
  - Sets :
176
 
      * 'othunder' : region = 0x0003
177
 
      * 'othundrj' : region = 0x0001
178
 
      * 'othunduo' : region = 0x0002
179
 
  - These 3 games are 100% the same, only region differs !
180
 
  - Coinage relies on the region (code at 0x000db2) :
181
 
      * 0x0001 (Japan) and 0x0002 (US) use TAITO_COINAGE_JAPAN_OLD
182
 
      * 0x0003 (World) and 0x0004 (licensed to xxx) use TAITO_COINAGE_WORLD
183
 
  - Notice screen only if region = 0x0001
184
 
  - According to the manual, DSWB bit 6 determines continue pricing :
185
 
 
186
 
    PORT_DIPNAME( 0x40, 0x40, DEF_STR( Continue_Price ) )
187
 
    PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
188
 
    PORT_DIPSETTING(    0x40, "Same as Start" )
189
 
 
190
 
    However, many conditions are required to make it work due to code at 0x00e0c4 :
191
 
      * region must not be 0x0001
192
 
      * "Allow Continue" Dip Switch must be set to "Yes"
193
 
      * coinage must be 2C_1C for both slots
194
 
    This is why this Dip Switch has NO effect in the following sets :
195
 
      * 'othunder' : coinage can't be 2C_1C for the 2 slots (coin B)
196
 
      * 'othundrj' : region = 0x0001
197
 
  - DSWB bit 7 ("Language") affects parts of the texts (not the ones in "demo mode")
198
 
    but the voices are always in English regardless of the region !
199
 
 
200
 
 
201
 
2) 'othundu'
202
 
 
203
 
  - Region stored at 0x03fffe.w
204
 
  - Sets :
205
 
      * 'othundu' : region = 0x0002
206
 
  - Comparison with 'othunder' :
207
 
      * slightly different code at 0x023c4c
208
 
      * additional data from 0x023eee to 0x0240ed (0x0200 bytes)
209
 
      * same other notes as for 'othunder'
210
 
 
211
 
 
212
 
TODO:
213
 
-----
214
 
 
215
 
- With the correct clock speed of 12MHz for the 68000, garbage graphics remain
216
 
  over the Taito logo on startup. This seems to be a bug in the original which
217
 
  would have no effect if our timing was 100% right. The interrupt handling
218
 
  should be quite correct, it's derived straight from the schematics and PAL
219
 
  dump.
220
 
  The current workaround is to make the 68000 run at 13MHz. Lowering below
221
 
  12MHz would work as well, and possibly be closer to the real reason (wait
222
 
  states slowing the CPU down?)
223
 
 
224
 
- The "FIRE!" arrows pointing to padlocks are not in perfect sync with the
225
 
  background scrolling. Should they?
226
 
 
227
 
- The quality of the zoomed sprites could probably be better. Drawing them as
228
 
  made by 16x8 tiles loses precision due to limitations of drawgfxzoom().
229
 
 
230
 
- Schematics show a OBPRI output to control sprite priority. This doesn't seem
231
 
  to be used however, and isn't hooked up. See othunder_TC0220IOC_w().
232
 
 
233
 
***************************************************************************/
234
 
 
235
 
#include "emu.h"
236
 
#include "cpu/z80/z80.h"
237
 
#include "cpu/m68000/m68000.h"
238
 
#include "machine/eeprom.h"
239
 
#include "video/taitoic.h"
240
 
#include "machine/taitoio.h"
241
 
#include "audio/taitosnd.h"
242
 
#include "sound/2610intf.h"
243
 
#include "sound/flt_vol.h"
244
 
#include "includes/othunder.h"
245
 
#include "includes/taitoipt.h"
246
 
 
247
 
 
248
 
/***********************************************************
249
 
                INTERRUPTS
250
 
***********************************************************/
251
 
 
252
 
static void update_irq( running_machine &machine )
253
 
{
254
 
        othunder_state *state = machine.driver_data<othunder_state>();
255
 
        device_set_input_line(state->m_maincpu, 6, state->m_ad_irq ? ASSERT_LINE : CLEAR_LINE);
256
 
        device_set_input_line(state->m_maincpu, 5, state->m_vblank_irq ? ASSERT_LINE : CLEAR_LINE);
257
 
}
258
 
 
259
 
static WRITE16_HANDLER( irq_ack_w )
260
 
{
261
 
        othunder_state *state = space->machine().driver_data<othunder_state>();
262
 
 
263
 
        switch (offset)
264
 
        {
265
 
                case 0:
266
 
                        state->m_vblank_irq = 0;
267
 
                        break;
268
 
 
269
 
                case 1:
270
 
                        state->m_ad_irq = 0;
271
 
                        break;
272
 
        }
273
 
 
274
 
        update_irq(space->machine());
275
 
}
276
 
 
277
 
static INTERRUPT_GEN( vblank_interrupt )
278
 
{
279
 
        othunder_state *state = device->machine().driver_data<othunder_state>();
280
 
 
281
 
        state->m_vblank_irq = 1;
282
 
        update_irq(device->machine());
283
 
}
284
 
 
285
 
static TIMER_CALLBACK( ad_interrupt )
286
 
{
287
 
        othunder_state *state = machine.driver_data<othunder_state>();
288
 
 
289
 
        state->m_ad_irq = 1;
290
 
        update_irq(machine);
291
 
}
292
 
 
293
 
 
294
 
/******************************************************************
295
 
                    EEPROM
296
 
 
297
 
This is an earlier version of the eeprom used in some TaitoB games.
298
 
The eeprom unlock command is different, and the write/clock/reset
299
 
bits are different.
300
 
******************************************************************/
301
 
 
302
 
static const eeprom_interface eeprom_intf =
303
 
{
304
 
        6,                              /* address bits */
305
 
        16,                             /* data bits */
306
 
        "0110",                 /* read command */
307
 
        "0101",                 /* write command */
308
 
        "0111",                 /* erase command */
309
 
        "0100000000",   /* lock command */
310
 
        "0100111111"    /* unlock command */
311
 
};
312
 
 
313
 
static WRITE16_HANDLER( othunder_tc0220ioc_w )
314
 
{
315
 
        othunder_state *state = space->machine().driver_data<othunder_state>();
316
 
 
317
 
        if (ACCESSING_BITS_0_7)
318
 
        {
319
 
                switch (offset)
320
 
                {
321
 
                        case 0x03:
322
 
 
323
 
/*              0000000x    SOL-1 (gun solenoid)
324
 
                000000x0    SOL-2 (gun solenoid)
325
 
                00000x00    OBPRI (sprite priority)
326
 
                0000x000    (unused)
327
 
                000x0000    eeprom reset (active low)
328
 
                00x00000    eeprom clock
329
 
                0x000000    eeprom in data
330
 
                x0000000    eeprom out data  */
331
 
 
332
 
                                /* Recoil Piston Motor Status */
333
 
                                output_set_value("Player1_Recoil_Piston", data & 0x1 );
334
 
                                output_set_value("Player2_Recoil_Piston", (data & 0x2) >>1 );
335
 
 
336
 
                                if (data & 4)
337
 
                                        popmessage("OBPRI SET!");
338
 
 
339
 
                                state->m_eeprom->write_bit(data & 0x40);
340
 
                                state->m_eeprom->set_clock_line((data & 0x20) ? ASSERT_LINE : CLEAR_LINE);
341
 
                                state->m_eeprom->set_cs_line((data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
342
 
                                break;
343
 
 
344
 
                        default:
345
 
                                tc0220ioc_w(state->m_tc0220ioc, offset, data & 0xff);
346
 
                }
347
 
        }
348
 
}
349
 
 
350
 
 
351
 
/**********************************************************
352
 
            GAME INPUTS
353
 
**********************************************************/
354
 
 
355
 
static READ16_HANDLER( othunder_tc0220ioc_r )
356
 
{
357
 
        othunder_state *state = space->machine().driver_data<othunder_state>();
358
 
 
359
 
        switch (offset)
360
 
        {
361
 
                case 0x03:
362
 
                        return (state->m_eeprom->read_bit() & 1) << 7;
363
 
 
364
 
                default:
365
 
                        return tc0220ioc_r(state->m_tc0220ioc, offset);
366
 
        }
367
 
}
368
 
 
369
 
#define P1X_PORT_TAG     "P1X"
370
 
#define P1Y_PORT_TAG     "P1Y"
371
 
#define P2X_PORT_TAG     "P2X"
372
 
#define P2Y_PORT_TAG     "P2Y"
373
 
#define ROTARY_PORT_TAG  "ROTARY"
374
 
 
375
 
static READ16_HANDLER( othunder_lightgun_r )
376
 
{
377
 
        static const char *const portname[4] = { P1X_PORT_TAG, P1Y_PORT_TAG, P2X_PORT_TAG, P2Y_PORT_TAG };
378
 
        return input_port_read(space->machine(), portname[offset]);
379
 
}
380
 
 
381
 
static WRITE16_HANDLER( othunder_lightgun_w )
382
 
{
383
 
        /* A write starts the A/D conversion. An interrupt will be triggered when
384
 
       the conversion is complete.
385
 
       The ADC60808 clock is 512kHz. Conversion takes between 0 and 8 clock
386
 
       cycles, so would end in a maximum of 15.625us. We'll use 10. */
387
 
 
388
 
        space->machine().scheduler().timer_set(attotime::from_usec(10), FUNC(ad_interrupt));
389
 
}
390
 
 
391
 
 
392
 
/*****************************************
393
 
            SOUND
394
 
*****************************************/
395
 
 
396
 
static void reset_sound_region( running_machine &machine )
397
 
{
398
 
        othunder_state *state = machine.driver_data<othunder_state>();
399
 
        memory_set_bank(machine, "bank10", state->m_banknum);
400
 
}
401
 
 
402
 
 
403
 
static WRITE8_HANDLER( sound_bankswitch_w )
404
 
{
405
 
        othunder_state *state = space->machine().driver_data<othunder_state>();
406
 
        state->m_banknum = data & 7;
407
 
        reset_sound_region(space->machine());
408
 
}
409
 
 
410
 
static WRITE16_HANDLER( othunder_sound_w )
411
 
{
412
 
        othunder_state *state = space->machine().driver_data<othunder_state>();
413
 
        if (offset == 0)
414
 
                tc0140syt_port_w(state->m_tc0140syt, 0, data & 0xff);
415
 
        else if (offset == 1)
416
 
                tc0140syt_comm_w(state->m_tc0140syt, 0, data & 0xff);
417
 
}
418
 
 
419
 
static READ16_HANDLER( othunder_sound_r )
420
 
{
421
 
        othunder_state *state = space->machine().driver_data<othunder_state>();
422
 
        if (offset == 1)
423
 
                return ((tc0140syt_comm_r(state->m_tc0140syt, 0) & 0xff));
424
 
        else
425
 
                return 0;
426
 
}
427
 
 
428
 
static WRITE8_HANDLER( othunder_TC0310FAM_w )
429
 
{
430
 
        /* there are two TC0310FAM, one for CH1 and one for CH2 from the YM2610. The
431
 
       PSG output is routed to both chips. */
432
 
        othunder_state *state = space->machine().driver_data<othunder_state>();
433
 
        int voll, volr;
434
 
 
435
 
        state->m_pan[offset] = data & 0x1f;
436
 
 
437
 
        /* PSG output (single ANALOG OUT pin on the YM2610, but we have three channels
438
 
       because we are using the AY-3-8910 emulation. */
439
 
        volr = (state->m_pan[0] + state->m_pan[2]) * 100 / (2 * 0x1f);
440
 
        voll = (state->m_pan[1] + state->m_pan[3]) * 100 / (2 * 0x1f);
441
 
        flt_volume_set_volume(state->m_2610_0l, voll / 100.0);
442
 
        flt_volume_set_volume(state->m_2610_0r, volr / 100.0);
443
 
 
444
 
        /* CH1 */
445
 
        volr = state->m_pan[0] * 100 / 0x1f;
446
 
        voll = state->m_pan[1] * 100 / 0x1f;
447
 
        flt_volume_set_volume(state->m_2610_1l, voll / 100.0);
448
 
        flt_volume_set_volume(state->m_2610_1r, volr / 100.0);
449
 
 
450
 
        /* CH2 */
451
 
        volr = state->m_pan[2] * 100 / 0x1f;
452
 
        voll = state->m_pan[3] * 100 / 0x1f;
453
 
        flt_volume_set_volume(state->m_2610_2l, voll / 100.0);
454
 
        flt_volume_set_volume(state->m_2610_2r, volr / 100.0);
455
 
}
456
 
 
457
 
 
458
 
/***********************************************************
459
 
             MEMORY STRUCTURES
460
 
***********************************************************/
461
 
 
462
 
static ADDRESS_MAP_START( othunder_map, AS_PROGRAM, 16 )
463
 
        AM_RANGE(0x000000, 0x07ffff) AM_ROM
464
 
        AM_RANGE(0x080000, 0x08ffff) AM_RAM
465
 
        AM_RANGE(0x090000, 0x09000f) AM_READWRITE(othunder_tc0220ioc_r, othunder_tc0220ioc_w)
466
 
//  AM_RANGE(0x090006, 0x090007) AM_WRITE(eeprom_w)
467
 
//  AM_RANGE(0x09000c, 0x09000d) AM_WRITENOP   /* ?? (keeps writing 0x77) */
468
 
        AM_RANGE(0x100000, 0x100007) AM_DEVREADWRITE("tc0110pcr", tc0110pcr_word_r, tc0110pcr_step1_rbswap_word_w)      /* palette */
469
 
        AM_RANGE(0x200000, 0x20ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w)   /* tilemaps */
470
 
        AM_RANGE(0x220000, 0x22000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
471
 
        AM_RANGE(0x300000, 0x300003) AM_READWRITE(othunder_sound_r, othunder_sound_w)
472
 
        AM_RANGE(0x400000, 0x4005ff) AM_RAM AM_BASE_SIZE_MEMBER(othunder_state, m_spriteram, m_spriteram_size)
473
 
        AM_RANGE(0x500000, 0x500007) AM_READWRITE(othunder_lightgun_r, othunder_lightgun_w)
474
 
        AM_RANGE(0x600000, 0x600003) AM_WRITE(irq_ack_w)
475
 
ADDRESS_MAP_END
476
 
 
477
 
 
478
 
/***************************************************************************/
479
 
 
480
 
static ADDRESS_MAP_START( z80_sound_map, AS_PROGRAM, 8 )
481
 
        AM_RANGE(0x0000, 0x3fff) AM_ROM
482
 
        AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank10")
483
 
        AM_RANGE(0xc000, 0xdfff) AM_RAM
484
 
        AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE("ymsnd", ym2610_r, ym2610_w)
485
 
        AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_slave_port_w)
486
 
        AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
487
 
        AM_RANGE(0xe400, 0xe403) AM_WRITE(othunder_TC0310FAM_w) /* pan */
488
 
        AM_RANGE(0xe600, 0xe600) AM_WRITENOP /* ? */
489
 
        AM_RANGE(0xea00, 0xea00) AM_READ_PORT(ROTARY_PORT_TAG)  /* rotary input */
490
 
        AM_RANGE(0xee00, 0xee00) AM_WRITENOP /* ? */
491
 
        AM_RANGE(0xf000, 0xf000) AM_WRITENOP /* ? */
492
 
        AM_RANGE(0xf200, 0xf200) AM_WRITE(sound_bankswitch_w)
493
 
ADDRESS_MAP_END
494
 
 
495
 
 
496
 
 
497
 
/***********************************************************
498
 
             INPUT PORTS, DIPs
499
 
***********************************************************/
500
 
 
501
 
static INPUT_PORTS_START( othunder )
502
 
        /* 0x090000 -> 0x08a000 */
503
 
        PORT_START("DSWA")
504
 
        PORT_DIPUNUSED( 0x01, IP_ACTIVE_LOW )
505
 
        PORT_DIPNAME( 0x02, 0x02, DEF_STR( Allow_Continue ) )
506
 
        PORT_DIPSETTING(    0x00, DEF_STR( No ) )
507
 
        PORT_DIPSETTING(    0x02, DEF_STR( Yes ) )
508
 
        TAITO_DSWA_BITS_2_TO_3
509
 
        TAITO_COINAGE_WORLD
510
 
 
511
 
        /* 0x090002 -> 0x08a002 */
512
 
        PORT_START("DSWB")
513
 
        PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
514
 
        PORT_DIPSETTING(    0x02, DEF_STR( Easy ) )
515
 
        PORT_DIPSETTING(    0x03, DEF_STR( Medium ) )
516
 
        PORT_DIPSETTING(    0x01, DEF_STR( Hard ) )
517
 
        PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
518
 
        PORT_DIPNAME( 0x0c, 0x0c, "Magazines/Rockets" )
519
 
        PORT_DIPSETTING(    0x0c, "5/3" )
520
 
        PORT_DIPSETTING(    0x08, "6/4" )
521
 
        PORT_DIPSETTING(    0x04, "7/5" )
522
 
        PORT_DIPSETTING(    0x00, "8/6" )
523
 
        PORT_DIPNAME( 0x30, 0x30, "Bullets per Magazine" )
524
 
        PORT_DIPSETTING(    0x00, "30" )
525
 
        PORT_DIPSETTING(    0x10, "35" )
526
 
        PORT_DIPSETTING(    0x30, "40" )
527
 
        PORT_DIPSETTING(    0x20, "50" )
528
 
        PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW )                        /* see notes */
529
 
        PORT_DIPNAME( 0x80, 0x00, DEF_STR( Language ) )
530
 
        PORT_DIPSETTING(    0x00, DEF_STR( English ) )
531
 
        PORT_DIPSETTING(    0x80, DEF_STR( Japanese ) )
532
 
 
533
 
        PORT_START("IN0")
534
 
        PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
535
 
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
536
 
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
537
 
        PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
538
 
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
539
 
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
540
 
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
541
 
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
542
 
 
543
 
        PORT_START("IN1")       /* unused */
544
 
        PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
545
 
 
546
 
        PORT_START("IN2")
547
 
        PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
548
 
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
549
 
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
550
 
        PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
551
 
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
552
 
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
553
 
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
554
 
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
555
 
 
556
 
        /* speed of 13 is compromise between moving aim around screen fast
557
 
       enough and being accurate enough not to miss targets. 20 is too
558
 
       inaccurate, and 10 is too slow. */
559
 
 
560
 
        PORT_START(P1X_PORT_TAG)
561
 
        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)
562
 
 
563
 
        PORT_START(P1Y_PORT_TAG)
564
 
        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)
565
 
 
566
 
        PORT_START(P2X_PORT_TAG)
567
 
        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)
568
 
 
569
 
        PORT_START(P2Y_PORT_TAG)
570
 
        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)
571
 
 
572
 
        /* rotary volume control */
573
 
        PORT_START(ROTARY_PORT_TAG)
574
 
        PORT_CONFNAME( 0x07, 0x07, "Stereo Separation" )
575
 
        PORT_CONFSETTING(    0x07, "Maximum" )
576
 
        PORT_CONFSETTING(    0x03, DEF_STR( High ) )
577
 
        PORT_CONFSETTING(    0x01, DEF_STR( Medium ) )
578
 
        PORT_CONFSETTING(    0x00, DEF_STR( Low ) )
579
 
INPUT_PORTS_END
580
 
 
581
 
static INPUT_PORTS_START( othundrj )
582
 
        PORT_INCLUDE( othunder )
583
 
 
584
 
        PORT_MODIFY( "DSWA" )
585
 
        TAITO_COINAGE_JAPAN_OLD
586
 
INPUT_PORTS_END
587
 
 
588
 
static INPUT_PORTS_START( othundu )
589
 
        PORT_INCLUDE( othundrj )
590
 
 
591
 
        PORT_MODIFY( "DSWB" )
592
 
        PORT_DIPNAME( 0x40, 0x40, DEF_STR( Continue_Price ) )        /* see notes */
593
 
        PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
594
 
        PORT_DIPSETTING(    0x40, "Same as Start" )
595
 
INPUT_PORTS_END
596
 
 
597
 
 
598
 
 
599
 
/***********************************************************
600
 
                GFX DECODING
601
 
***********************************************************/
602
 
 
603
 
static const gfx_layout tile16x8_layout =
604
 
{
605
 
        16,8,
606
 
        RGN_FRAC(1,1),
607
 
        4,
608
 
        { 0, 8, 16, 24 },
609
 
        { 32, 33, 34, 35, 36, 37, 38, 39, 0, 1, 2, 3, 4, 5, 6, 7 },
610
 
        { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64 },
611
 
        64*8
612
 
};
613
 
 
614
 
static const gfx_layout charlayout =
615
 
{
616
 
        8,8,
617
 
        RGN_FRAC(1,1),
618
 
        4,
619
 
        { 0, 1, 2, 3 },
620
 
        { 2*4, 3*4, 0*4, 1*4, 6*4, 7*4, 4*4, 5*4 },
621
 
        { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
622
 
        32*8
623
 
};
624
 
 
625
 
static GFXDECODE_START( othunder )
626
 
        GFXDECODE_ENTRY( "gfx2", 0, tile16x8_layout, 0, 256 )   /* sprite parts */
627
 
        GFXDECODE_ENTRY( "gfx1", 0, charlayout,      0, 256 )   /* sprites & playfield */
628
 
GFXDECODE_END
629
 
 
630
 
 
631
 
 
632
 
/**************************************************************
633
 
                 YM2610 (SOUND)
634
 
**************************************************************/
635
 
 
636
 
/* handler called by the YM2610 emulator when the internal timers cause an IRQ */
637
 
static void irqhandler( device_t *device, int irq )
638
 
{
639
 
        othunder_state *state = device->machine().driver_data<othunder_state>();
640
 
        device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
641
 
}
642
 
 
643
 
static const ym2610_interface ym2610_config =
644
 
{
645
 
        irqhandler
646
 
};
647
 
 
648
 
 
649
 
 
650
 
/***********************************************************
651
 
                 MACHINE DRIVERS
652
 
***********************************************************/
653
 
 
654
 
static const tc0100scn_interface othunder_tc0100scn_intf =
655
 
{
656
 
        "screen",
657
 
        1, 2,           /* gfxnum, txnum */
658
 
        4, 0,           /* x_offset, y_offset */
659
 
        0, 0,           /* flip_xoff, flip_yoff */
660
 
        0, 0,           /* flip_text_xoff, flip_text_yoff */
661
 
        0, 0
662
 
};
663
 
 
664
 
static const tc0110pcr_interface othunder_tc0110pcr_intf =
665
 
{
666
 
        0
667
 
};
668
 
 
669
 
static const tc0220ioc_interface othunder_io_intf =
670
 
{
671
 
        DEVCB_INPUT_PORT("DSWA"), DEVCB_INPUT_PORT("DSWB"),
672
 
        DEVCB_INPUT_PORT("IN0"), DEVCB_INPUT_PORT("IN1"), DEVCB_INPUT_PORT("IN2")       /* port read handlers */
673
 
};
674
 
 
675
 
static const tc0140syt_interface othunder_tc0140syt_intf =
676
 
{
677
 
        "maincpu", "audiocpu"
678
 
};
679
 
 
680
 
static MACHINE_START( othunder )
681
 
{
682
 
        othunder_state *state = machine.driver_data<othunder_state>();
683
 
 
684
 
        memory_configure_bank(machine, "bank10", 0, 4, machine.region("audiocpu")->base() + 0xc000, 0x4000);
685
 
 
686
 
        state->m_maincpu = machine.device("maincpu");
687
 
        state->m_audiocpu = machine.device("audiocpu");
688
 
        state->m_eeprom = machine.device<eeprom_device>("eeprom");
689
 
        state->m_tc0220ioc = machine.device("tc0220ioc");
690
 
        state->m_tc0100scn = machine.device("tc0100scn");
691
 
        state->m_tc0110pcr = machine.device("tc0110pcr");
692
 
        state->m_tc0140syt = machine.device("tc0140syt");
693
 
        state->m_2610_0l = machine.device("2610.0l");
694
 
        state->m_2610_0r = machine.device("2610.0r");
695
 
        state->m_2610_1l = machine.device("2610.1l");
696
 
        state->m_2610_1r = machine.device("2610.1r");
697
 
        state->m_2610_2l = machine.device("2610.2l");
698
 
        state->m_2610_2r = machine.device("2610.2r");
699
 
 
700
 
        state->save_item(NAME(state->m_vblank_irq));
701
 
        state->save_item(NAME(state->m_ad_irq));
702
 
        state->save_item(NAME(state->m_banknum));
703
 
        state->save_item(NAME(state->m_pan));
704
 
        machine.save().register_postload(save_prepost_delegate(FUNC(reset_sound_region), &machine));
705
 
}
706
 
 
707
 
static MACHINE_RESET( othunder )
708
 
{
709
 
        othunder_state *state = machine.driver_data<othunder_state>();
710
 
 
711
 
        state->m_vblank_irq = 0;
712
 
        state->m_ad_irq = 0;
713
 
        state->m_banknum = 0;
714
 
}
715
 
 
716
 
static MACHINE_CONFIG_START( othunder, othunder_state )
717
 
 
718
 
        /* basic machine hardware */
719
 
//  MCFG_CPU_ADD("maincpu", M68000, 24000000/2 )   /* 12 MHz */
720
 
        MCFG_CPU_ADD("maincpu", M68000, 13000000 )      /* fixes garbage graphics on startup */
721
 
        MCFG_CPU_PROGRAM_MAP(othunder_map)
722
 
        MCFG_CPU_VBLANK_INT("screen", vblank_interrupt)
723
 
 
724
 
        MCFG_CPU_ADD("audiocpu", Z80,16000000/4 )       /* 4 MHz */
725
 
        MCFG_CPU_PROGRAM_MAP(z80_sound_map)
726
 
 
727
 
        MCFG_EEPROM_ADD("eeprom", eeprom_intf)
728
 
 
729
 
        MCFG_MACHINE_START(othunder)
730
 
        MCFG_MACHINE_RESET(othunder)
731
 
 
732
 
        MCFG_TC0220IOC_ADD("tc0220ioc", othunder_io_intf)
733
 
 
734
 
        /* video hardware */
735
 
        MCFG_SCREEN_ADD("screen", RASTER)
736
 
        MCFG_SCREEN_REFRESH_RATE(60)
737
 
        MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
738
 
        MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
739
 
        MCFG_SCREEN_SIZE(40*8, 32*8)
740
 
        MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 2*8, 32*8-1)
741
 
        MCFG_SCREEN_UPDATE(othunder)
742
 
 
743
 
        MCFG_GFXDECODE(othunder)
744
 
        MCFG_PALETTE_LENGTH(4096)
745
 
 
746
 
        MCFG_VIDEO_START(othunder)
747
 
 
748
 
        MCFG_TC0100SCN_ADD("tc0100scn", othunder_tc0100scn_intf)
749
 
        MCFG_TC0110PCR_ADD("tc0110pcr", othunder_tc0110pcr_intf)
750
 
 
751
 
        /* sound hardware */
752
 
        MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
753
 
 
754
 
        MCFG_SOUND_ADD("ymsnd", YM2610, 16000000/2)
755
 
        MCFG_SOUND_CONFIG(ym2610_config)
756
 
        MCFG_SOUND_ROUTE(0, "2610.0l", 0.25)
757
 
        MCFG_SOUND_ROUTE(0, "2610.0r", 0.25)
758
 
        MCFG_SOUND_ROUTE(1, "2610.1l", 1.0)
759
 
        MCFG_SOUND_ROUTE(1, "2610.1r", 1.0)
760
 
        MCFG_SOUND_ROUTE(2, "2610.2l", 1.0)
761
 
        MCFG_SOUND_ROUTE(2, "2610.2r", 1.0)
762
 
 
763
 
        MCFG_SOUND_ADD("2610.0l", FILTER_VOLUME, 0)
764
 
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
765
 
        MCFG_SOUND_ADD("2610.0r", FILTER_VOLUME, 0)
766
 
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
767
 
        MCFG_SOUND_ADD("2610.1l", FILTER_VOLUME, 0)
768
 
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
769
 
        MCFG_SOUND_ADD("2610.1r", FILTER_VOLUME, 0)
770
 
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
771
 
        MCFG_SOUND_ADD("2610.2l", FILTER_VOLUME, 0)
772
 
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
773
 
        MCFG_SOUND_ADD("2610.2r", FILTER_VOLUME, 0)
774
 
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
775
 
 
776
 
        MCFG_TC0140SYT_ADD("tc0140syt", othunder_tc0140syt_intf)
777
 
MACHINE_CONFIG_END
778
 
 
779
 
 
780
 
 
781
 
/***************************************************************************
782
 
                    DRIVERS
783
 
***************************************************************************/
784
 
 
785
 
ROM_START( othunder )
786
 
        ROM_REGION( 0x80000, "maincpu", 0 )     /* 512K for 68000 code */
787
 
        ROM_LOAD16_BYTE( "b67-20.63",   0x00000, 0x20000, CRC(21439ea2) SHA1(d5b5a194e9698cf43513c0d56146772e8132ab07) )
788
 
        ROM_LOAD16_BYTE( "b67-23.64",   0x00001, 0x20000, CRC(789e9daa) SHA1(15bb0eec68aeea0b9f55889566338c9ce0ac9b5e) )
789
 
        ROM_LOAD16_BYTE( "b67-14.61",   0x40000, 0x20000, CRC(7f3dd724) SHA1(2f2eeae0ee31e20082237b9a947c6848771eb73c) )
790
 
        ROM_LOAD16_BYTE( "b67-15.62",   0x40001, 0x20000, CRC(e84f62d0) SHA1(3b4a55a14dee7d592467fde9a75bde64deabd27d) )
791
 
 
792
 
        ROM_REGION( 0x1c000, "audiocpu", 0 )    /* sound cpu */
793
 
        ROM_LOAD( "b67-13.40",   0x00000, 0x04000, CRC(2936b4b1) SHA1(39b41643464dd89e456ab6eb15a0ff0aef30afde) )
794
 
        ROM_CONTINUE(            0x10000, 0x0c000 ) /* banked stuff */
795
 
 
796
 
        ROM_REGION( 0x80000, "gfx1", 0 )
797
 
        ROM_LOAD( "b67-06.66", 0x00000, 0x80000, CRC(b9a38d64) SHA1(7ae8165b444d9da6ccdbc4a769535bcbb6738aaa) )         /* SCN */
798
 
 
799
 
        ROM_REGION( 0x200000, "gfx2", 0 )
800
 
        ROM_LOAD32_BYTE( "b67-01", 0x00000, 0x80000, CRC(81ad9acb) SHA1(d9ad3f6332c6ca6b9872da57526a8158a3cf5b2f) )     /* OBJ: each rom has 1 bitplane, forming 16x8 tiles */
801
 
        ROM_LOAD32_BYTE( "b67-02", 0x00001, 0x80000, CRC(c20cd2fb) SHA1(b015e1fe167e19826aa451b45cd143d66a6db83c) )
802
 
        ROM_LOAD32_BYTE( "b67-03", 0x00002, 0x80000, CRC(bc9019ed) SHA1(7eddc83d71be97ce6637e6b35c226d58e6c39c3f) )
803
 
        ROM_LOAD32_BYTE( "b67-04", 0x00003, 0x80000, CRC(2af4c8af) SHA1(b2ae7aad0c59ffc368811f4bd5546dbb6860f9a9) )
804
 
 
805
 
        ROM_REGION16_LE( 0x80000, "user1", 0 )
806
 
        ROM_LOAD16_WORD( "b67-05.43", 0x00000, 0x80000, CRC(9593e42b) SHA1(54b5538c302a1734ff4b752ab87a8c45d5c6b23d) )  /* index used to create 64x64 sprites on the fly */
807
 
 
808
 
        ROM_REGION( 0x80000, "ymsnd", 0 )       /* ADPCM samples */
809
 
        ROM_LOAD( "b67-08", 0x00000, 0x80000, CRC(458f41fb) SHA1(acca7c95acd1ae7a1cc51fb7fe644ad6d00ff5ac) )
810
 
 
811
 
        ROM_REGION( 0x80000, "ymsnd.deltat", 0 )        /* Delta-T samples */
812
 
        ROM_LOAD( "b67-07", 0x00000, 0x80000, CRC(4f834357) SHA1(f34705ce64870a8b24ec2639505079cc031fb719) )
813
 
 
814
 
        ROM_REGION( 0x0800, "plds", 0 )
815
 
        ROM_LOAD( "plhs18p8b-b67-09.ic15", 0x0000, 0x0149, CRC(62035487) SHA1(5d9538ea9eabff324d274772b1e1fc9a9aec9100) )
816
 
        ROM_LOAD( "pal16l8a-b67-11.ic36",  0x0200, 0x0104, CRC(3177fb06) SHA1(c128277fe03342d9ec8da3c6e08a404a3f010547) )
817
 
        ROM_LOAD( "pal20l8b-b67-12.ic37",  0x0400, 0x0144, CRC(a47c2798) SHA1(8c963efd416b3f6586cb12afb9417dc95c2bc574) )
818
 
        ROM_LOAD( "pal20l8b-b67-10.ic33",  0x0600, 0x0144, CRC(4ced09c7) SHA1(519e6152cc5e4cb3ec24c4dc09101dddf22988aa) )
819
 
 
820
 
        ROM_REGION16_BE( 0x80, "eeprom", 0 )
821
 
        ROM_LOAD16_WORD( "eeprom-othunder.bin", 0x0000, 0x0080, CRC(3729b844) SHA1(f6bb41d293d1e47214f8b2d147991404f3278ebf) )
822
 
ROM_END
823
 
 
824
 
ROM_START( othunderu )
825
 
        ROM_REGION( 0x80000, "maincpu", 0 )     /* 512K for 68000 code */
826
 
        ROM_LOAD16_BYTE( "b67-20-1.63", 0x00000, 0x20000, CRC(851a453b) SHA1(48b8c379e78cd79463f1e24dc23816a97cf819b8) )
827
 
        ROM_LOAD16_BYTE( "b67-22-1.64", 0x00001, 0x20000, CRC(19480dc0) SHA1(8bbc982c89f0878e7639330970df5aa93ecbb083) )
828
 
        ROM_LOAD16_BYTE( "b67-14.61",   0x40000, 0x20000, CRC(7f3dd724) SHA1(2f2eeae0ee31e20082237b9a947c6848771eb73c) )
829
 
        ROM_LOAD16_BYTE( "b67-15.62",   0x40001, 0x20000, CRC(e84f62d0) SHA1(3b4a55a14dee7d592467fde9a75bde64deabd27d) )
830
 
 
831
 
        ROM_REGION( 0x1c000, "audiocpu", 0 )    /* sound cpu */
832
 
        ROM_LOAD( "b67-13.40",   0x00000, 0x04000, CRC(2936b4b1) SHA1(39b41643464dd89e456ab6eb15a0ff0aef30afde) )
833
 
        ROM_CONTINUE(            0x10000, 0x0c000 ) /* banked stuff */
834
 
 
835
 
        ROM_REGION( 0x80000, "gfx1", 0 )
836
 
        ROM_LOAD( "b67-06.66", 0x00000, 0x80000, CRC(b9a38d64) SHA1(7ae8165b444d9da6ccdbc4a769535bcbb6738aaa) )         /* SCN */
837
 
 
838
 
        ROM_REGION( 0x200000, "gfx2", 0 )
839
 
        ROM_LOAD32_BYTE( "b67-01", 0x00000, 0x80000, CRC(81ad9acb) SHA1(d9ad3f6332c6ca6b9872da57526a8158a3cf5b2f) )     /* OBJ: each rom has 1 bitplane, forming 16x8 tiles */
840
 
        ROM_LOAD32_BYTE( "b67-02", 0x00001, 0x80000, CRC(c20cd2fb) SHA1(b015e1fe167e19826aa451b45cd143d66a6db83c) )
841
 
        ROM_LOAD32_BYTE( "b67-03", 0x00002, 0x80000, CRC(bc9019ed) SHA1(7eddc83d71be97ce6637e6b35c226d58e6c39c3f) )
842
 
        ROM_LOAD32_BYTE( "b67-04", 0x00003, 0x80000, CRC(2af4c8af) SHA1(b2ae7aad0c59ffc368811f4bd5546dbb6860f9a9) )
843
 
 
844
 
        ROM_REGION16_LE( 0x80000, "user1", 0 )
845
 
        ROM_LOAD16_WORD( "b67-05.43", 0x00000, 0x80000, CRC(9593e42b) SHA1(54b5538c302a1734ff4b752ab87a8c45d5c6b23d) )  /* index used to create 64x64 sprites on the fly */
846
 
 
847
 
        ROM_REGION( 0x80000, "ymsnd", 0 )       /* ADPCM samples */
848
 
        ROM_LOAD( "b67-08", 0x00000, 0x80000, CRC(458f41fb) SHA1(acca7c95acd1ae7a1cc51fb7fe644ad6d00ff5ac) )
849
 
 
850
 
        ROM_REGION( 0x80000, "ymsnd.deltat", 0 )        /* Delta-T samples */
851
 
        ROM_LOAD( "b67-07", 0x00000, 0x80000, CRC(4f834357) SHA1(f34705ce64870a8b24ec2639505079cc031fb719) )
852
 
 
853
 
        ROM_REGION( 0x0800, "plds", 0 )
854
 
        ROM_LOAD( "plhs18p8b-b67-09.ic15", 0x0000, 0x0149, CRC(62035487) SHA1(5d9538ea9eabff324d274772b1e1fc9a9aec9100) )
855
 
        ROM_LOAD( "pal16l8a-b67-11.ic36",  0x0200, 0x0104, CRC(3177fb06) SHA1(c128277fe03342d9ec8da3c6e08a404a3f010547) )
856
 
        ROM_LOAD( "pal20l8b-b67-12.ic37",  0x0400, 0x0144, CRC(a47c2798) SHA1(8c963efd416b3f6586cb12afb9417dc95c2bc574) )
857
 
        ROM_LOAD( "pal20l8b-b67-10.ic33",  0x0600, 0x0144, CRC(4ced09c7) SHA1(519e6152cc5e4cb3ec24c4dc09101dddf22988aa) )
858
 
 
859
 
        ROM_REGION16_BE( 0x80, "eeprom", 0 )
860
 
        ROM_LOAD16_WORD( "eeprom-othunder.bin", 0x0000, 0x0080, CRC(3729b844) SHA1(f6bb41d293d1e47214f8b2d147991404f3278ebf) )
861
 
ROM_END
862
 
 
863
 
ROM_START( othunderuo )
864
 
        ROM_REGION( 0x80000, "maincpu", 0 )     /* 512K for 68000 code */
865
 
        ROM_LOAD16_BYTE( "b67-20.63",   0x00000, 0x20000, CRC(21439ea2) SHA1(d5b5a194e9698cf43513c0d56146772e8132ab07) )
866
 
        ROM_LOAD16_BYTE( "b67-22.64",   0x00001, 0x20000, CRC(0f99ad3c) SHA1(dd6c9e822470ca867ec01e642443a871e879bae5) )
867
 
        ROM_LOAD16_BYTE( "b67-14.61",   0x40000, 0x20000, CRC(7f3dd724) SHA1(2f2eeae0ee31e20082237b9a947c6848771eb73c) )
868
 
        ROM_LOAD16_BYTE( "b67-15.62",   0x40001, 0x20000, CRC(e84f62d0) SHA1(3b4a55a14dee7d592467fde9a75bde64deabd27d) )
869
 
 
870
 
        ROM_REGION( 0x1c000, "audiocpu", 0 )    /* sound cpu */
871
 
        ROM_LOAD( "b67-13.40",   0x00000, 0x04000, CRC(2936b4b1) SHA1(39b41643464dd89e456ab6eb15a0ff0aef30afde) )
872
 
        ROM_CONTINUE(            0x10000, 0x0c000 ) /* banked stuff */
873
 
 
874
 
        ROM_REGION( 0x80000, "gfx1", 0 )
875
 
        ROM_LOAD( "b67-06.66", 0x00000, 0x80000, CRC(b9a38d64) SHA1(7ae8165b444d9da6ccdbc4a769535bcbb6738aaa) )         /* SCN */
876
 
 
877
 
        ROM_REGION( 0x200000, "gfx2", 0 )
878
 
        ROM_LOAD32_BYTE( "b67-01", 0x00000, 0x80000, CRC(81ad9acb) SHA1(d9ad3f6332c6ca6b9872da57526a8158a3cf5b2f) )     /* OBJ: each rom has 1 bitplane, forming 16x8 tiles */
879
 
        ROM_LOAD32_BYTE( "b67-02", 0x00001, 0x80000, CRC(c20cd2fb) SHA1(b015e1fe167e19826aa451b45cd143d66a6db83c) )
880
 
        ROM_LOAD32_BYTE( "b67-03", 0x00002, 0x80000, CRC(bc9019ed) SHA1(7eddc83d71be97ce6637e6b35c226d58e6c39c3f) )
881
 
        ROM_LOAD32_BYTE( "b67-04", 0x00003, 0x80000, CRC(2af4c8af) SHA1(b2ae7aad0c59ffc368811f4bd5546dbb6860f9a9) )
882
 
 
883
 
        ROM_REGION16_LE( 0x80000, "user1", 0 )
884
 
        ROM_LOAD16_WORD( "b67-05.43", 0x00000, 0x80000, CRC(9593e42b) SHA1(54b5538c302a1734ff4b752ab87a8c45d5c6b23d) )  /* index used to create 64x64 sprites on the fly */
885
 
 
886
 
        ROM_REGION( 0x80000, "ymsnd", 0 )       /* ADPCM samples */
887
 
        ROM_LOAD( "b67-08", 0x00000, 0x80000, CRC(458f41fb) SHA1(acca7c95acd1ae7a1cc51fb7fe644ad6d00ff5ac) )
888
 
 
889
 
        ROM_REGION( 0x80000, "ymsnd.deltat", 0 )        /* Delta-T samples */
890
 
        ROM_LOAD( "b67-07", 0x00000, 0x80000, CRC(4f834357) SHA1(f34705ce64870a8b24ec2639505079cc031fb719) )
891
 
 
892
 
        ROM_REGION( 0x0800, "plds", 0 )
893
 
        ROM_LOAD( "plhs18p8b-b67-09.ic15", 0x0000, 0x0149, CRC(62035487) SHA1(5d9538ea9eabff324d274772b1e1fc9a9aec9100) )
894
 
        ROM_LOAD( "pal16l8a-b67-11.ic36",  0x0200, 0x0104, CRC(3177fb06) SHA1(c128277fe03342d9ec8da3c6e08a404a3f010547) )
895
 
        ROM_LOAD( "pal20l8b-b67-12.ic37",  0x0400, 0x0144, CRC(a47c2798) SHA1(8c963efd416b3f6586cb12afb9417dc95c2bc574) )
896
 
        ROM_LOAD( "pal20l8b-b67-10.ic33",  0x0600, 0x0144, CRC(4ced09c7) SHA1(519e6152cc5e4cb3ec24c4dc09101dddf22988aa) )
897
 
 
898
 
        ROM_REGION16_BE( 0x80, "eeprom", 0 )
899
 
        ROM_LOAD16_WORD( "eeprom-othunder.bin", 0x0000, 0x0080, CRC(3729b844) SHA1(f6bb41d293d1e47214f8b2d147991404f3278ebf) )
900
 
ROM_END
901
 
 
902
 
ROM_START( othunderj )
903
 
        ROM_REGION( 0x80000, "maincpu", 0 )     /* 512K for 68000 code */
904
 
        ROM_LOAD16_BYTE( "b67-20.63",   0x00000, 0x20000, CRC(21439ea2) SHA1(d5b5a194e9698cf43513c0d56146772e8132ab07) )
905
 
        ROM_LOAD16_BYTE( "b67-21.64",   0x00001, 0x20000, CRC(9690fc86) SHA1(4e695554fc9cc91c5f8cff95dc290333bb56d571) )
906
 
        ROM_LOAD16_BYTE( "b67-14.61",   0x40000, 0x20000, CRC(7f3dd724) SHA1(2f2eeae0ee31e20082237b9a947c6848771eb73c) )
907
 
        ROM_LOAD16_BYTE( "b67-15.62",   0x40001, 0x20000, CRC(e84f62d0) SHA1(3b4a55a14dee7d592467fde9a75bde64deabd27d) )
908
 
 
909
 
        ROM_REGION( 0x1c000, "audiocpu", 0 )    /* sound cpu */
910
 
        ROM_LOAD( "b67-13.40",   0x00000, 0x04000, CRC(2936b4b1) SHA1(39b41643464dd89e456ab6eb15a0ff0aef30afde) )
911
 
        ROM_CONTINUE(            0x10000, 0x0c000 ) /* banked stuff */
912
 
 
913
 
        ROM_REGION( 0x80000, "gfx1", 0 )
914
 
        ROM_LOAD( "b67-06.66", 0x00000, 0x80000, CRC(b9a38d64) SHA1(7ae8165b444d9da6ccdbc4a769535bcbb6738aaa) )         /* SCN */
915
 
 
916
 
        ROM_REGION( 0x200000, "gfx2", 0 )
917
 
        ROM_LOAD32_BYTE( "b67-01", 0x00000, 0x80000, CRC(81ad9acb) SHA1(d9ad3f6332c6ca6b9872da57526a8158a3cf5b2f) )     /* OBJ: each rom has 1 bitplane, forming 16x8 tiles */
918
 
        ROM_LOAD32_BYTE( "b67-02", 0x00001, 0x80000, CRC(c20cd2fb) SHA1(b015e1fe167e19826aa451b45cd143d66a6db83c) )
919
 
        ROM_LOAD32_BYTE( "b67-03", 0x00002, 0x80000, CRC(bc9019ed) SHA1(7eddc83d71be97ce6637e6b35c226d58e6c39c3f) )
920
 
        ROM_LOAD32_BYTE( "b67-04", 0x00003, 0x80000, CRC(2af4c8af) SHA1(b2ae7aad0c59ffc368811f4bd5546dbb6860f9a9) )
921
 
 
922
 
        ROM_REGION16_LE( 0x80000, "user1", 0 )
923
 
        ROM_LOAD16_WORD( "b67-05.43", 0x00000, 0x80000, CRC(9593e42b) SHA1(54b5538c302a1734ff4b752ab87a8c45d5c6b23d) )  /* index used to create 64x64 sprites on the fly */
924
 
 
925
 
        ROM_REGION( 0x80000, "ymsnd", 0 )       /* ADPCM samples */
926
 
        ROM_LOAD( "b67-08", 0x00000, 0x80000, CRC(458f41fb) SHA1(acca7c95acd1ae7a1cc51fb7fe644ad6d00ff5ac) )
927
 
 
928
 
        ROM_REGION( 0x80000, "ymsnd.deltat", 0 )        /* Delta-T samples */
929
 
        ROM_LOAD( "b67-07", 0x00000, 0x80000, CRC(4f834357) SHA1(f34705ce64870a8b24ec2639505079cc031fb719) )
930
 
 
931
 
        ROM_REGION( 0x0800, "plds", 0 )
932
 
        ROM_LOAD( "plhs18p8b-b67-09.ic15", 0x0000, 0x0149, CRC(62035487) SHA1(5d9538ea9eabff324d274772b1e1fc9a9aec9100) )
933
 
        ROM_LOAD( "pal16l8a-b67-11.ic36",  0x0200, 0x0104, CRC(3177fb06) SHA1(c128277fe03342d9ec8da3c6e08a404a3f010547) )
934
 
        ROM_LOAD( "pal20l8b-b67-12.ic37",  0x0400, 0x0144, CRC(a47c2798) SHA1(8c963efd416b3f6586cb12afb9417dc95c2bc574) )
935
 
        ROM_LOAD( "pal20l8b-b67-10.ic33",  0x0600, 0x0144, CRC(4ced09c7) SHA1(519e6152cc5e4cb3ec24c4dc09101dddf22988aa) )
936
 
 
937
 
        ROM_REGION16_BE( 0x80, "eeprom", 0 )
938
 
        ROM_LOAD16_WORD( "eeprom-othunder.bin", 0x0000, 0x0080, CRC(3729b844) SHA1(f6bb41d293d1e47214f8b2d147991404f3278ebf) )
939
 
ROM_END
940
 
 
941
 
 
942
 
 
943
 
GAME( 1988, othunder,   0,        othunder, othunder, 0, ORIENTATION_FLIP_X, "Taito Corporation Japan", "Operation Thunderbolt (World)", GAME_SUPPORTS_SAVE )
944
 
GAME( 1988, othunderu,  othunder, othunder, othundu,  0, ORIENTATION_FLIP_X, "Taito America Corporation", "Operation Thunderbolt (US)", GAME_SUPPORTS_SAVE )
945
 
GAME( 1988, othunderuo, othunder, othunder, othundu,  0, ORIENTATION_FLIP_X, "Taito America Corporation", "Operation Thunderbolt (US, older)", GAME_SUPPORTS_SAVE )
946
 
GAME( 1988, othunderj,  othunder, othunder, othundrj, 0, ORIENTATION_FLIP_X, "Taito Corporation", "Operation Thunderbolt (Japan)", GAME_SUPPORTS_SAVE )