~ubuntu-branches/ubuntu/raring/mame/raring-proposed

« back to all changes in this revision

Viewing changes to mess/src/mame/drivers/espial.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
 
 Espial hardware games
4
 
 
5
 
Espial: The Orca logo is displayed, but looks to be "blacked out" via the
6
 
        color proms by having 0x1c & 0x1d set to black.
7
 
 
8
 
TODO:
9
 
- merge with zodiack.c
10
 
 
11
 
Stephh's notes (based on the games Z80 code and some tests) :
12
 
 
13
 
1) 'espial*'
14
 
 
15
 
  - The games read both players controls for player 2 when "Cabinet" is set
16
 
    to "Upright" (code at 0x0321).
17
 
  - The games read both buttons status regardless of settings. They are
18
 
    then comnbined if Dip Switch is set to "1" (code at 0x32a).
19
 
  - The "CRE." displayed at the bottom right of the screen is in fact
20
 
    not really the number of credits (especially when coinage isn't 1C_1C)
21
 
    as it relies on a transformation of real number of credits (stored at
22
 
    0x5802) based on settings (coins needed stored at 0x5806 and credits
23
 
    awarded at 0x5804). Check code at 0x080b which displays the odd value.
24
 
 
25
 
2) 'netwars'
26
 
 
27
 
  - The game reads both players controls for player 2 when "Cabinet" is set
28
 
    to "Upright" (code at 0x038e).
29
 
  - The "CREDIT" displayed at the bottom right of the screen is in fact
30
 
    not really the number of credits (especially when coinage isn't 1C_1C)
31
 
    as it relies on a transformation of real number of credits (stored at
32
 
    0x5802) based on settings (coins needed stored at 0x5806 and credits
33
 
    awarded at 0x5804). Check code at 0x0147 which displays the odd value.
34
 
  - When you get a perfect in the bonus game, you are only awarded 1000 points
35
 
    even if the game tells you that you have been awarded 10000 points.
36
 
 
37
 
***************************************************************************/
38
 
 
39
 
#include "emu.h"
40
 
#include "includes/espial.h"
41
 
#include "cpu/z80/z80.h"
42
 
#include "sound/ay8910.h"
43
 
 
44
 
 
45
 
 
46
 
 
47
 
static MACHINE_RESET( espial )
48
 
{
49
 
        espial_state *state = machine.driver_data<espial_state>();
50
 
 
51
 
        state->m_flipscreen = 0;
52
 
 
53
 
        state->m_main_nmi_enabled = FALSE;
54
 
        state->m_sound_nmi_enabled = FALSE;
55
 
}
56
 
 
57
 
static MACHINE_START( espial )
58
 
{
59
 
        espial_state *state = machine.driver_data<espial_state>();
60
 
 
61
 
        state->m_maincpu = machine.device("maincpu");
62
 
        state->m_audiocpu = machine.device("audiocpu");
63
 
 
64
 
        //state_save_register_global_array(machine, mcu_out[1]);
65
 
        state->save_item(NAME(state->m_sound_nmi_enabled));
66
 
}
67
 
 
68
 
 
69
 
static WRITE8_HANDLER( espial_master_interrupt_enable_w )
70
 
{
71
 
        espial_state *state = space->machine().driver_data<espial_state>();
72
 
        state->m_main_nmi_enabled = ~(data & 1);
73
 
}
74
 
 
75
 
 
76
 
WRITE8_HANDLER( espial_sound_nmi_enable_w )
77
 
{
78
 
        espial_state *state = space->machine().driver_data<espial_state>();
79
 
        state->m_sound_nmi_enabled = data & 1;
80
 
}
81
 
 
82
 
static TIMER_DEVICE_CALLBACK( espial_scanline )
83
 
{
84
 
        espial_state *state = timer.machine().driver_data<espial_state>();
85
 
        int scanline = param;
86
 
 
87
 
        if(scanline == 240 && state->m_main_nmi_enabled) // vblank-out irq
88
 
                cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
89
 
 
90
 
        if(scanline == 16) // timer irq, checks soundlatch port then updates some sound related work RAM buffers
91
 
                cputag_set_input_line(timer.machine(), "maincpu", 0, HOLD_LINE);
92
 
}
93
 
 
94
 
 
95
 
INTERRUPT_GEN( espial_sound_nmi_gen )
96
 
{
97
 
        espial_state *state = device->machine().driver_data<espial_state>();
98
 
 
99
 
        if (state->m_sound_nmi_enabled)
100
 
                nmi_line_pulse(device);
101
 
}
102
 
 
103
 
 
104
 
static WRITE8_HANDLER( espial_master_soundlatch_w )
105
 
{
106
 
        espial_state *state = space->machine().driver_data<espial_state>();
107
 
        soundlatch_w(space, offset, data);
108
 
        device_set_input_line(state->m_audiocpu, 0, HOLD_LINE);
109
 
}
110
 
 
111
 
 
112
 
static ADDRESS_MAP_START( espial_map, AS_PROGRAM, 8 )
113
 
        AM_RANGE(0x0000, 0x4fff) AM_ROM
114
 
        AM_RANGE(0x5800, 0x5fff) AM_RAM
115
 
        AM_RANGE(0x6081, 0x6081) AM_READ_PORT("IN0")
116
 
        AM_RANGE(0x6082, 0x6082) AM_READ_PORT("DSW1")
117
 
        AM_RANGE(0x6083, 0x6083) AM_READ_PORT("IN1")
118
 
        AM_RANGE(0x6084, 0x6084) AM_READ_PORT("IN2")
119
 
        AM_RANGE(0x6090, 0x6090) AM_READWRITE(soundlatch2_r, espial_master_soundlatch_w)
120
 
        AM_RANGE(0x7000, 0x7000) AM_READWRITE(watchdog_reset_r, watchdog_reset_w)
121
 
        AM_RANGE(0x7100, 0x7100) AM_WRITE(espial_master_interrupt_enable_w)
122
 
        AM_RANGE(0x7200, 0x7200) AM_WRITE(espial_flipscreen_w)
123
 
        AM_RANGE(0x8000, 0x801f) AM_RAM AM_BASE_MEMBER(espial_state, m_spriteram_1)
124
 
        AM_RANGE(0x8020, 0x803f) AM_READONLY
125
 
        AM_RANGE(0x8400, 0x87ff) AM_RAM_WRITE(espial_videoram_w) AM_BASE_MEMBER(espial_state, m_videoram)
126
 
        AM_RANGE(0x8800, 0x880f) AM_WRITEONLY AM_BASE_MEMBER(espial_state, m_spriteram_3)
127
 
        AM_RANGE(0x8c00, 0x8fff) AM_RAM_WRITE(espial_attributeram_w) AM_BASE_MEMBER(espial_state, m_attributeram)
128
 
        AM_RANGE(0x9000, 0x901f) AM_RAM AM_BASE_MEMBER(espial_state, m_spriteram_2)
129
 
        AM_RANGE(0x9020, 0x903f) AM_RAM_WRITE(espial_scrollram_w) AM_BASE_MEMBER(espial_state, m_scrollram)
130
 
        AM_RANGE(0x9400, 0x97ff) AM_RAM_WRITE(espial_colorram_w) AM_BASE_MEMBER(espial_state, m_colorram)
131
 
        AM_RANGE(0xc000, 0xcfff) AM_ROM
132
 
ADDRESS_MAP_END
133
 
 
134
 
 
135
 
/* there are a lot of unmapped reads from all over memory as the
136
 
   code uses POP instructions in a delay loop */
137
 
static ADDRESS_MAP_START( netwars_map, AS_PROGRAM, 8 )
138
 
        AM_RANGE(0x0000, 0x3fff) AM_ROM
139
 
        AM_RANGE(0x5800, 0x5fff) AM_RAM
140
 
        AM_RANGE(0x6081, 0x6081) AM_READ_PORT("IN0")
141
 
        AM_RANGE(0x6082, 0x6082) AM_READ_PORT("DSW1")
142
 
        AM_RANGE(0x6083, 0x6083) AM_READ_PORT("IN1")
143
 
        AM_RANGE(0x6084, 0x6084) AM_READ_PORT("IN2")
144
 
        AM_RANGE(0x6090, 0x6090) AM_READWRITE(soundlatch2_r, espial_master_soundlatch_w)
145
 
        AM_RANGE(0x7000, 0x7000) AM_READWRITE(watchdog_reset_r, watchdog_reset_w)
146
 
        AM_RANGE(0x7100, 0x7100) AM_WRITE(espial_master_interrupt_enable_w)
147
 
        AM_RANGE(0x7200, 0x7200) AM_WRITE(espial_flipscreen_w)
148
 
        AM_RANGE(0x8000, 0x801f) AM_RAM AM_BASE_MEMBER(espial_state, m_spriteram_1)
149
 
        AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(espial_videoram_w) AM_BASE_MEMBER(espial_state, m_videoram)
150
 
        AM_RANGE(0x8800, 0x880f) AM_RAM AM_BASE_MEMBER(espial_state, m_spriteram_3)
151
 
        AM_RANGE(0x8800, 0x8fff) AM_RAM_WRITE(espial_attributeram_w) AM_BASE_MEMBER(espial_state, m_attributeram)
152
 
        AM_RANGE(0x9000, 0x901f) AM_RAM AM_BASE_MEMBER(espial_state, m_spriteram_2)
153
 
        AM_RANGE(0x9020, 0x903f) AM_RAM_WRITE(espial_scrollram_w) AM_BASE_MEMBER(espial_state, m_scrollram)
154
 
        AM_RANGE(0x9000, 0x97ff) AM_RAM_WRITE(espial_colorram_w) AM_BASE_MEMBER(espial_state, m_colorram)
155
 
ADDRESS_MAP_END
156
 
 
157
 
 
158
 
static ADDRESS_MAP_START( espial_sound_map, AS_PROGRAM, 8 )
159
 
        AM_RANGE(0x0000, 0x1fff) AM_ROM
160
 
        AM_RANGE(0x2000, 0x23ff) AM_RAM
161
 
        AM_RANGE(0x4000, 0x4000) AM_WRITE(espial_sound_nmi_enable_w)
162
 
        AM_RANGE(0x6000, 0x6000) AM_READWRITE(soundlatch_r, soundlatch2_w)
163
 
ADDRESS_MAP_END
164
 
 
165
 
static ADDRESS_MAP_START( espial_sound_io_map, AS_IO, 8 )
166
 
        ADDRESS_MAP_GLOBAL_MASK(0xff)
167
 
        AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_address_data_w)
168
 
ADDRESS_MAP_END
169
 
 
170
 
 
171
 
/* verified from Z80 code */
172
 
static INPUT_PORTS_START( espial )
173
 
        PORT_START("IN0")
174
 
        PORT_DIPNAME( 0x01, 0x00, "Number of Buttons" )
175
 
        PORT_DIPSETTING(    0x01, "1" )
176
 
        PORT_DIPSETTING(    0x00, "2" )
177
 
        PORT_DIPNAME( 0x02, 0x02, "Enemy Bullets Vulnerable" )  /* you can shoot bullets */
178
 
        PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
179
 
        PORT_DIPSETTING(    0x02, DEF_STR( On ) )
180
 
        PORT_DIPUNUSED( 0x04, IP_ACTIVE_HIGH )
181
 
        PORT_DIPUNUSED( 0x08, IP_ACTIVE_HIGH )
182
 
        PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
183
 
        PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
184
 
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 )
185
 
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
186
 
 
187
 
        PORT_START("DSW1")
188
 
        PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
189
 
        PORT_DIPSETTING(    0x00, "3" )
190
 
        PORT_DIPSETTING(    0x01, "4" )
191
 
        PORT_DIPSETTING(    0x02, "5" )
192
 
        PORT_DIPSETTING(    0x03, "6" )
193
 
        PORT_DIPNAME( 0x1c, 0x00, DEF_STR( Coinage ) )
194
 
        PORT_DIPSETTING(    0x14, DEF_STR( 2C_1C ) )
195
 
        PORT_DIPSETTING(    0x18, DEF_STR( 3C_2C ) )
196
 
        PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
197
 
        PORT_DIPSETTING(    0x04, DEF_STR( 1C_2C ) )
198
 
        PORT_DIPSETTING(    0x08, DEF_STR( 1C_3C ) )
199
 
        PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
200
 
        PORT_DIPSETTING(    0x10, DEF_STR( 1C_6C ) )
201
 
        PORT_DIPSETTING(    0x1c, DEF_STR( Free_Play ) )
202
 
        PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) )       /* code at 0x43e1 in 'espial' and 0x44b5 in 'espialu' */
203
 
        PORT_DIPSETTING(        0x00, "20k 70k 70k+" )              /* last bonus life at 980k : max. 15 bonus lives */
204
 
        PORT_DIPSETTING(        0x20, "50k 100k 100k+" )            /* last bonus life at 900k : max. 10 bonus lives */
205
 
        PORT_DIPNAME( 0x40, 0x40, DEF_STR( Cabinet ) )
206
 
        PORT_DIPSETTING(        0x40, DEF_STR( Upright ) )
207
 
        PORT_DIPSETTING(        0x00, DEF_STR( Cocktail ) )
208
 
        PORT_DIPNAME( 0x80, 0x00, "Reset on Check Error" )
209
 
        PORT_DIPSETTING(    0x80, DEF_STR( No ) )
210
 
        PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
211
 
 
212
 
        PORT_START("IN1")
213
 
        PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
214
 
        PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
215
 
        PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_COCKTAIL
216
 
        PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
217
 
        PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )    PORT_8WAY PORT_COCKTAIL
218
 
        PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )  PORT_8WAY
219
 
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_COCKTAIL
220
 
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
221
 
 
222
 
        PORT_START("IN2")
223
 
        PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
224
 
        PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 )
225
 
        PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
226
 
        PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
227
 
        PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )    PORT_8WAY
228
 
        PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
229
 
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 )
230
 
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )  PORT_8WAY
231
 
INPUT_PORTS_END
232
 
 
233
 
 
234
 
/* verified from Z80 code */
235
 
static INPUT_PORTS_START( netwars )
236
 
        PORT_START("IN0")
237
 
        PORT_DIPUNUSED( 0x01, IP_ACTIVE_HIGH )
238
 
        PORT_DIPNAME( 0x02, 0x00, DEF_STR( Difficulty ) )       /* when enemies shoot - code at 0x2216 */
239
 
        PORT_DIPSETTING(    0x00, DEF_STR( Easy ) )
240
 
        PORT_DIPSETTING(    0x02, DEF_STR( Hard ) )
241
 
        PORT_DIPUNUSED( 0x04, IP_ACTIVE_HIGH )
242
 
        PORT_DIPUNUSED( 0x08, IP_ACTIVE_HIGH )                  /* no effect due to code at 0x0e0a */
243
 
        PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
244
 
        PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
245
 
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
246
 
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
247
 
 
248
 
        PORT_START("DSW1")
249
 
        PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
250
 
        PORT_DIPSETTING(    0x00, "3" )
251
 
        PORT_DIPSETTING(    0x01, "4" )
252
 
        PORT_DIPSETTING(    0x02, "5" )
253
 
        PORT_DIPSETTING(    0x03, "6" )
254
 
        PORT_DIPNAME( 0x1c, 0x00, DEF_STR( Coinage ) )
255
 
        PORT_DIPSETTING(    0x14, DEF_STR( 2C_1C ) )
256
 
        PORT_DIPSETTING(    0x18, DEF_STR( 3C_2C ) )
257
 
        PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
258
 
        PORT_DIPSETTING(    0x04, DEF_STR( 1C_2C ) )
259
 
        PORT_DIPSETTING(    0x08, DEF_STR( 1C_3C ) )
260
 
        PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
261
 
        PORT_DIPSETTING(    0x10, DEF_STR( 1C_6C ) )
262
 
        PORT_DIPSETTING(    0x1c, DEF_STR( Free_Play ) )
263
 
        PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) )       /* code at 0x2383 */
264
 
        PORT_DIPSETTING(        0x00, "20k and 50k" )
265
 
        PORT_DIPSETTING(        0x20, "40k and 70k" )
266
 
        PORT_DIPNAME( 0x40, 0x40, DEF_STR( Cabinet ) )
267
 
        PORT_DIPSETTING(        0x40, DEF_STR( Upright ) )
268
 
        PORT_DIPSETTING(        0x00, DEF_STR( Cocktail ) )
269
 
        PORT_DIPNAME( 0x80, 0x00, "Reset on Check Error" )
270
 
        PORT_DIPSETTING(    0x80, DEF_STR( No ) )
271
 
        PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
272
 
 
273
 
        PORT_START("IN1")
274
 
        PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
275
 
        PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
276
 
        PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )  PORT_4WAY PORT_COCKTAIL
277
 
        PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
278
 
        PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )    PORT_4WAY PORT_COCKTAIL
279
 
        PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )  PORT_4WAY
280
 
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )  PORT_4WAY PORT_COCKTAIL
281
 
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
282
 
 
283
 
        PORT_START("IN2")
284
 
        PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
285
 
        PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 )
286
 
        PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
287
 
        PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
288
 
        PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )    PORT_4WAY
289
 
        PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
290
 
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 )
291
 
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )  PORT_4WAY
292
 
INPUT_PORTS_END
293
 
 
294
 
 
295
 
static const gfx_layout charlayout =
296
 
{
297
 
        8,8,
298
 
        RGN_FRAC(2,2),
299
 
        2,
300
 
        { 0, 4 },
301
 
        { STEP4(0,1), STEP4(8*8,1) },
302
 
        { STEP8(0,8) },
303
 
        16*8
304
 
};
305
 
 
306
 
static const gfx_layout spritelayout =
307
 
{
308
 
        16,16,
309
 
        RGN_FRAC(1,2),
310
 
        2,
311
 
        { RGN_FRAC(0,2), RGN_FRAC(1,2) },
312
 
        { STEP8(0,1), STEP8(8*8,1) },
313
 
        { STEP8(0,8), STEP8(16*8,8) },
314
 
        32*8
315
 
};
316
 
 
317
 
 
318
 
static GFXDECODE_START( espial )
319
 
        GFXDECODE_ENTRY( "gfx1", 0, charlayout,    0, 64 )
320
 
        GFXDECODE_ENTRY( "gfx2", 0, spritelayout,  0, 64 )
321
 
GFXDECODE_END
322
 
 
323
 
 
324
 
 
325
 
 
326
 
static MACHINE_CONFIG_START( espial, espial_state )
327
 
 
328
 
        /* basic machine hardware */
329
 
        MCFG_CPU_ADD("maincpu", Z80, 3072000)   /* 3.072 MHz */
330
 
        MCFG_CPU_PROGRAM_MAP(espial_map)
331
 
        MCFG_TIMER_ADD_SCANLINE("scantimer", espial_scanline, "screen", 0, 1)
332
 
 
333
 
        MCFG_CPU_ADD("audiocpu", Z80, 3072000)  /* 2 MHz?????? */
334
 
        MCFG_CPU_PROGRAM_MAP(espial_sound_map)
335
 
        MCFG_CPU_IO_MAP(espial_sound_io_map)
336
 
        MCFG_CPU_PERIODIC_INT(espial_sound_nmi_gen,4*60)
337
 
 
338
 
        MCFG_MACHINE_RESET(espial)
339
 
        MCFG_MACHINE_START(espial)
340
 
 
341
 
        /* video hardware */
342
 
        MCFG_SCREEN_ADD("screen", RASTER)
343
 
        MCFG_SCREEN_REFRESH_RATE(60)
344
 
        MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
345
 
        MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
346
 
        MCFG_SCREEN_SIZE(32*8, 32*8)
347
 
        MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
348
 
        MCFG_SCREEN_UPDATE(espial)
349
 
 
350
 
        MCFG_GFXDECODE(espial)
351
 
        MCFG_PALETTE_LENGTH(256)
352
 
 
353
 
        MCFG_PALETTE_INIT(espial)
354
 
        MCFG_VIDEO_START(espial)
355
 
 
356
 
        /* sound hardware */
357
 
        MCFG_SPEAKER_STANDARD_MONO("mono")
358
 
        MCFG_SOUND_ADD("aysnd", AY8910, 1500000)
359
 
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
360
 
MACHINE_CONFIG_END
361
 
 
362
 
static MACHINE_CONFIG_DERIVED( netwars, espial )
363
 
 
364
 
        /* basic machine hardware */
365
 
 
366
 
        MCFG_CPU_MODIFY("maincpu")
367
 
        MCFG_CPU_PROGRAM_MAP(netwars_map)
368
 
 
369
 
        /* video hardware */
370
 
        MCFG_SCREEN_MODIFY("screen")
371
 
        MCFG_SCREEN_SIZE(32*8, 64*8)
372
 
 
373
 
        MCFG_VIDEO_START(netwars)
374
 
MACHINE_CONFIG_END
375
 
 
376
 
 
377
 
 
378
 
/***************************************************************************
379
 
 
380
 
  Game driver(s)
381
 
 
382
 
***************************************************************************/
383
 
 
384
 
ROM_START( espial )
385
 
        ROM_REGION( 0x10000, "maincpu", 0 )
386
 
        ROM_LOAD( "esp3.4f",      0x0000, 0x2000, CRC(0973c8a4) SHA1(d1fc6775870710b3dfea4e58a937ab996021adb1) )
387
 
        ROM_LOAD( "esp4.4h",      0x2000, 0x2000, CRC(6034d7e5) SHA1(62c9699088f4ee1c69ec10a2f82feddd4083efef) )
388
 
        ROM_LOAD( "esp6.bin",     0x4000, 0x1000, CRC(357025b4) SHA1(8bc62f564fcbe37bd490452b2d569d1981f76db1) )
389
 
        ROM_LOAD( "esp5.bin",     0xc000, 0x1000, CRC(d03a2fc4) SHA1(791d70e4354350507f4c39d6115c046254168895) )
390
 
 
391
 
        ROM_REGION( 0x10000, "audiocpu", 0 )
392
 
        ROM_LOAD( "esp1.4n",      0x0000, 0x1000, CRC(fc7729e9) SHA1(96dfec574521fa4fe2588fbac2ef1caba6c1b884) )
393
 
        ROM_LOAD( "esp2.4r",      0x1000, 0x1000, CRC(e4e256da) SHA1(8007471405bdcf90e29657a3ac2c2f84c9db7c9b) )
394
 
 
395
 
        ROM_REGION( 0x3000, "gfx1", 0 )
396
 
        ROM_LOAD( "espial8.4b",   0x0000, 0x2000, CRC(2f43036f) SHA1(316e9fab778d6c0abb0b6673aba33dfbe44b1262) )
397
 
        ROM_LOAD( "espial7.4a",   0x2000, 0x1000, CRC(ebfef046) SHA1(5aa6efb7254fb42e814c1a29c5363f2d0727452f) )
398
 
 
399
 
        ROM_REGION( 0x2000, "gfx2", 0 )
400
 
        ROM_LOAD( "espial10.4e",  0x0000, 0x1000, CRC(de80fbc1) SHA1(f5601eac8cb35a92c51bf81e5ac5a2b79bcde28f) )
401
 
        ROM_LOAD( "espial9.4d",   0x1000, 0x1000, CRC(48c258a0) SHA1(55e72b9072ddc05f848e5a6fae159c554102010b) )
402
 
 
403
 
        ROM_REGION( 0x0200, "proms", 0 ) /* The MMI6301 Bipolar PROM is compatible to the 82s129 */
404
 
        ROM_LOAD( "mmi6301.1f",   0x0000, 0x0100, CRC(d12de557) SHA1(53e8a57dfab677cc5b9cdd83d2fbeb93169bcefd) ) /* palette low 4 bits */
405
 
        ROM_LOAD( "mmi6301.1h",   0x0100, 0x0100, CRC(4c84fe70) SHA1(7ac52bd5b19663b9526ecb678e61db9939d2285d) ) /* palette high 4 bits */
406
 
ROM_END
407
 
 
408
 
ROM_START( espialu )
409
 
        ROM_REGION( 0x10000, "maincpu", 0 )
410
 
        ROM_LOAD( "espial3.4f",   0x0000, 0x2000, CRC(10f1da30) SHA1(8954ca3c7fccb8dd8433015ee303bb75a98f3474) )
411
 
        ROM_LOAD( "espial4.4h",   0x2000, 0x2000, CRC(d2adbe39) SHA1(13c6041fd0e7c49988af89e3bab1b20999336928) )
412
 
        ROM_LOAD( "espial.6",     0x4000, 0x1000, CRC(baa60bc1) SHA1(fc3d3f2e0316efb31161b28984fc8bd94473b783) )
413
 
        ROM_LOAD( "espial.5",     0xc000, 0x1000, CRC(6d7bbfc1) SHA1(d886a76ce4a23c1310135bf1e4ffeda6d44625e7) )
414
 
 
415
 
        ROM_REGION( 0x10000, "audiocpu", 0 )
416
 
        ROM_LOAD( "espial1.4n",   0x0000, 0x1000, CRC(1e5ec20b) SHA1(f3bee38737321edf2d1ea753124421416441666e) )
417
 
        ROM_LOAD( "espial2.4r",   0x1000, 0x1000, CRC(3431bb97) SHA1(97343bfb5e49cd1d26799723d8c5a31eff7b1170) )
418
 
 
419
 
        ROM_REGION( 0x3000, "gfx1", 0 )
420
 
        ROM_LOAD( "espial8.4b",   0x0000, 0x2000, CRC(2f43036f) SHA1(316e9fab778d6c0abb0b6673aba33dfbe44b1262) )
421
 
        ROM_LOAD( "espial7.4a",   0x2000, 0x1000, CRC(ebfef046) SHA1(5aa6efb7254fb42e814c1a29c5363f2d0727452f) )
422
 
 
423
 
        ROM_REGION( 0x2000, "gfx2", 0 )
424
 
        ROM_LOAD( "espial10.4e",  0x0000, 0x1000, CRC(de80fbc1) SHA1(f5601eac8cb35a92c51bf81e5ac5a2b79bcde28f) )
425
 
        ROM_LOAD( "espial9.4d",   0x1000, 0x1000, CRC(48c258a0) SHA1(55e72b9072ddc05f848e5a6fae159c554102010b) )
426
 
 
427
 
        ROM_REGION( 0x0200, "proms", 0 ) /* The MMI6301 Bipolar PROM is compatible to the 82s129 */
428
 
        ROM_LOAD( "mmi6301.1f",   0x0000, 0x0100, CRC(d12de557) SHA1(53e8a57dfab677cc5b9cdd83d2fbeb93169bcefd) ) /* palette low 4 bits */
429
 
        ROM_LOAD( "mmi6301.1h",   0x0100, 0x0100, CRC(4c84fe70) SHA1(7ac52bd5b19663b9526ecb678e61db9939d2285d) ) /* palette high 4 bits */
430
 
ROM_END
431
 
 
432
 
ROM_START( netwars )
433
 
        ROM_REGION( 0x10000, "maincpu", 0 )
434
 
        ROM_LOAD( "netw3.4f",     0x0000, 0x2000, CRC(8e782991) SHA1(4fd533035b61b7006ef94300bb63474fb9e1c9f0) )
435
 
        ROM_LOAD( "netw4.4h",     0x2000, 0x2000, CRC(6e219f61) SHA1(a27304017251777be501861e106a670fff078d54) )
436
 
 
437
 
        ROM_REGION( 0x10000, "audiocpu", 0 )
438
 
        ROM_LOAD( "netw1.4n",     0x0000, 0x1000, CRC(53939e16) SHA1(938f505db0cfcfafb751378ae0c139b7f32404cb) )
439
 
        ROM_LOAD( "netw2.4r",     0x1000, 0x1000, CRC(c096317a) SHA1(e61a3e9107481fd80309172a1a9a431903e02489) )
440
 
 
441
 
        ROM_REGION( 0x4000, "gfx1", 0 )
442
 
        ROM_LOAD( "netw8.4b",     0x0000, 0x2000, CRC(2320277e) SHA1(4e05f6833de89f8f7cc0a0d1cbec03656f8b54a1) )
443
 
        ROM_LOAD( "netw7.4a",     0x2000, 0x2000, CRC(25cc5b7f) SHA1(2e089c3d5f8ebba676a959ba71bc9c1750312721) )
444
 
 
445
 
        ROM_REGION( 0x2000, "gfx2", 0 )
446
 
        ROM_LOAD( "netw10.4e",    0x0000, 0x1000, CRC(87b65625) SHA1(a702726c0fbe7669604f48bf2c19a54031645731) )
447
 
        ROM_LOAD( "netw9.4d",     0x1000, 0x1000, CRC(830d0218) SHA1(c726a4a9dd1f10279f79cbe5fdd693a62d9d3ac5) )
448
 
 
449
 
        ROM_REGION( 0x0200, "proms", 0 ) /* The MMI6301 Bipolar PROM is compatible to the 82s129 */
450
 
        ROM_LOAD( "mmi6301.1f",   0x0000, 0x0100, CRC(f3ae1fe2) SHA1(4f259f8da3c9ecdc6010f83b6abc1371366bd0ab) ) /* palette low 4 bits */
451
 
        ROM_LOAD( "mmi6301.1h",   0x0100, 0x0100, CRC(c44c3771) SHA1(c86125fac28fafc744957258bf3bb5a6dc664b54) ) /* palette high 4 bits */
452
 
ROM_END
453
 
 
454
 
 
455
 
 
456
 
GAME( 1983, espial,  0,      espial,  espial,  0, ROT0,  "Orca / Thunderbolt", "Espial (Europe)", GAME_SUPPORTS_SAVE )
457
 
GAME( 1983, espialu, espial, espial,  espial,  0, ROT0,  "Orca / Thunderbolt", "Espial (US?)", GAME_SUPPORTS_SAVE )
458
 
GAME( 1983, netwars, 0,      netwars, netwars, 0, ROT90, "Orca (Esco Trading Co license)", "Net Wars", GAME_SUPPORTS_SAVE )