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

« back to all changes in this revision

Viewing changes to src/mame/drivers/spbactn.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Emmanuel Kasper, Jordi Mallach
  • Date: 2012-06-05 20:02:23 UTC
  • mfrom: (0.3.1) (0.1.4)
  • Revision ID: package-import@ubuntu.com-20120605200223-gnlpogjrg6oqe9md
Tags: 0.146-1
[ Emmanuel Kasper ]
* New upstream release
* Drop patch to fix man pages section and patches to link with flac 
  and jpeg system lib: all this has been pushed upstream by Cesare Falco
* Add DM-Upload-Allowed: yes field.

[ Jordi Mallach ]
* Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
* Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
  and set to the appropriate value.
* mame_manpage_section.patch: Change mame's manpage section to 6 (games),
  in the TH declaration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 as a basis for writing their game on, adding a couple of features such as the
13
13
 pixel layer.
14
14
 
 
15
The manual defines the controls as 4 push buttons:
 
16
 
 
17
   Left Push Buttons       Right Push Buttons
 
18
 
 
19
|   o    |      o       |    o    |      o       |
 
20
|--------+--------------+---------+--------------|
 
21
|Flipper | Shot & Shake | Flipper | Shot & Shake |
 
22
| Left   |    Left      |  Right  |    Right     |
 
23
|--------+--------------+---------+--------------|
 
24
 
 
25
 
15
26
-readme file--------------------------------------------------------------------
16
27
 
17
28
 Super Pinball Action
131
142
#include "includes/spbactn.h"
132
143
 
133
144
 
134
 
static WRITE16_HANDLER( soundcommand_w )
 
145
WRITE16_MEMBER(spbactn_state::soundcommand_w)
135
146
{
136
147
        if (ACCESSING_BITS_0_7)
137
148
        {
138
 
                soundlatch_w(space, offset, data & 0xff);
139
 
                cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
 
149
                soundlatch_byte_w(space, offset, data & 0xff);
 
150
                cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
140
151
        }
141
152
}
142
153
 
143
 
static ADDRESS_MAP_START( spbactn_map, AS_PROGRAM, 16 )
 
154
static ADDRESS_MAP_START( spbactn_map, AS_PROGRAM, 16, spbactn_state )
144
155
        AM_RANGE(0x00000, 0x3ffff) AM_ROM
145
156
        AM_RANGE(0x40000, 0x43fff) AM_RAM       // main ram
146
 
        AM_RANGE(0x50000, 0x50fff) AM_RAM AM_BASE_MEMBER(spbactn_state,m_spvideoram)
147
 
        AM_RANGE(0x60000, 0x67fff) AM_RAM AM_BASE_MEMBER(spbactn_state,m_fgvideoram)
148
 
        AM_RANGE(0x70000, 0x77fff) AM_RAM AM_BASE_MEMBER(spbactn_state,m_bgvideoram)
149
 
        AM_RANGE(0x80000, 0x827ff) AM_RAM_WRITE(paletteram16_xxxxBBBBGGGGRRRR_word_w) AM_BASE_GENERIC(paletteram)
 
157
        AM_RANGE(0x50000, 0x50fff) AM_RAM AM_SHARE("spvideoram")
 
158
        AM_RANGE(0x60000, 0x67fff) AM_RAM AM_SHARE("fgvideoram")
 
159
        AM_RANGE(0x70000, 0x77fff) AM_RAM AM_SHARE("bgvideoram")
 
160
        AM_RANGE(0x80000, 0x827ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_word_w) AM_SHARE("paletteram")
150
161
        AM_RANGE(0x90000, 0x90001) AM_READ_PORT("IN0")
151
162
        AM_RANGE(0x90010, 0x90011) AM_READ_PORT("IN1")
152
163
        AM_RANGE(0x90020, 0x90021) AM_READ_PORT("SYSTEM")
186
197
        AM_RANGE(0xa0206, 0xa0207) AM_WRITENOP
187
198
ADDRESS_MAP_END
188
199
 
189
 
static ADDRESS_MAP_START( spbactn_sound_map, AS_PROGRAM, 8 )
 
200
static ADDRESS_MAP_START( spbactn_sound_map, AS_PROGRAM, 8, spbactn_state )
190
201
        AM_RANGE(0x0000, 0xefff) AM_ROM
191
202
        AM_RANGE(0xf000, 0xf7ff) AM_RAM
192
 
        AM_RANGE(0xf800, 0xf800) AM_DEVREADWRITE_MODERN("oki", okim6295_device, read, write)
193
 
        AM_RANGE(0xf810, 0xf811) AM_DEVWRITE("ymsnd", ym3812_w)
 
203
        AM_RANGE(0xf800, 0xf800) AM_DEVREADWRITE("oki", okim6295_device, read, write)
 
204
        AM_RANGE(0xf810, 0xf811) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w)
194
205
 
195
206
        AM_RANGE(0xfc00, 0xfc00) AM_READNOP     AM_WRITENOP /* irq ack ?? */
196
 
        AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_r)
 
207
        AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_byte_r)
197
208
ADDRESS_MAP_END
198
209
 
199
210
 
203
214
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
204
215
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
205
216
        PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
206
 
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )            // Left flipper
207
 
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 )            // "Shake"
 
217
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Left Flippers" )
 
218
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME( "Launch Ball / Shake (Left Side)" )
208
219
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
209
220
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
210
221
 
213
224
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
214
225
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
215
226
        PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
216
 
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )            // "Shake" (duplicated)
217
 
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )            // Right flipper
 
227
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME( "Launch Ball / Shake (Right Side)" )
 
228
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME( "Right Flippers" )
218
229
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
219
230
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
220
231
 
221
232
        PORT_START("SYSTEM")
222
233
        PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
223
234
        PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
224
 
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )             // Press mulitple times for multiple players
 
235
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME( "Start" )  /* needed to avoid confusion with # of players. Press mulitple times for multiple players */
225
236
        PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
226
237
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
227
238
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
229
240
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
230
241
 
231
242
        PORT_START("DSW1")
232
 
        PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
 
243
        PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )           PORT_DIPLOCATION("SW1:1,2,3")
233
244
        PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )
234
245
        PORT_DIPSETTING(    0x03, DEF_STR( 3C_1C ) )
235
246
        PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
238
249
        PORT_DIPSETTING(    0x05, "1 Coin/1 Credit 2/3" )
239
250
        PORT_DIPSETTING(    0x06, DEF_STR( 1C_2C ) )
240
251
        PORT_DIPSETTING(    0x00, "1 Coin/1 Credit 5/6" )
241
 
        PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) )
 
252
        PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) )           PORT_DIPLOCATION("SW1:4,5,6")
242
253
        PORT_DIPSETTING(    0x10, DEF_STR( 4C_1C ) )
243
254
        PORT_DIPSETTING(    0x18, DEF_STR( 3C_1C ) )
244
255
        PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
247
258
        PORT_DIPSETTING(    0x28, "1 Coin/1 Credit 2/3" )
248
259
        PORT_DIPSETTING(    0x30, DEF_STR( 1C_2C ) )
249
260
        PORT_DIPSETTING(    0x00, "1 Coin/1 Credit 5/6" )
250
 
        PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) )            // Balls
 
261
        PORT_DIPNAME( 0xc0, 0xc0, "Balls" )                     PORT_DIPLOCATION("SW1:7,8")
251
262
        PORT_DIPSETTING(    0x00, "2" )
252
263
        PORT_DIPSETTING(    0xc0, "3" )
253
264
        PORT_DIPSETTING(    0x80, "4" )
254
265
        PORT_DIPSETTING(    0x40, "5" )
255
266
 
256
267
        PORT_START("DSW2")
257
 
        PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
 
268
        PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )       PORT_DIPLOCATION("SW2:1,2")
258
269
        PORT_DIPSETTING(    0x02, DEF_STR( Easy ) )
259
270
        PORT_DIPSETTING(    0x03, DEF_STR( Normal ) )
260
271
        PORT_DIPSETTING(    0x01, DEF_STR( Hard ) )
261
272
        PORT_DIPSETTING(    0x00, DEF_STR( Very_Hard ) )
262
 
        PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
 
273
        PORT_DIPNAME( 0x0c, 0x0c, "Extra Ball" )                PORT_DIPLOCATION("SW2:3,4")
263
274
        PORT_DIPSETTING(    0x04, "100k and 500k" )
264
275
        PORT_DIPSETTING(    0x0c, "200k and 800k" )
265
276
        PORT_DIPSETTING(    0x08, "200k" )
266
277
        PORT_DIPSETTING(    0x00, DEF_STR( None ) )
267
 
        PORT_DIPNAME( 0x10, 0x10, "Hit Difficulty" )            // From .xls file - WHAT does that mean ?
 
278
        PORT_DIPNAME( 0x10, 0x10, "Hit Difficulty" )            PORT_DIPLOCATION("SW2:5")       // From .xls file - WHAT does that mean ?
268
279
        PORT_DIPSETTING(    0x10, DEF_STR( Normal ) )
269
280
        PORT_DIPSETTING(    0x00, DEF_STR( Difficult ) )
270
 
        PORT_DIPNAME( 0x20, 0x20, "Display Instructions" )      // "Change Software" in .xls file
 
281
        PORT_DIPNAME( 0x20, 0x20, "Display Instructions" )      PORT_DIPLOCATION("SW2:6") /* Listed in manual as "Change Software", but seems to have no effect? */
271
282
        PORT_DIPSETTING(    0x00, DEF_STR( No ) )
272
283
        PORT_DIPSETTING(    0x20, DEF_STR( Yes ) )
273
 
        PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) )      // To be confirmed
 
284
        PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) )      PORT_DIPLOCATION("SW2:7") /* As listed in manual, but seems to have no effect? */
274
285
        PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
275
286
        PORT_DIPSETTING(    0x40, DEF_STR( On ) )
276
 
        PORT_DIPNAME( 0x80, 0x80, "Match" )                             // Check code at 0x00bf8c
 
287
        PORT_DIPNAME( 0x80, 0x80, "Match" )                     PORT_DIPLOCATION("SW2:8")       // Check code at 0x00bf8c
277
288
        PORT_DIPSETTING(    0x80, "1/20" )
278
289
        PORT_DIPSETTING(    0x00, "1/40" )
279
290
INPUT_PORTS_END
336
347
static MACHINE_CONFIG_START( spbactn, spbactn_state )
337
348
 
338
349
        /* basic machine hardware */
339
 
        MCFG_CPU_ADD("maincpu", M68000, 12000000)
 
350
        MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz)
340
351
        MCFG_CPU_PROGRAM_MAP(spbactn_map)
341
352
        MCFG_CPU_VBLANK_INT("screen", irq3_line_hold)
342
353
 
343
 
        MCFG_CPU_ADD("audiocpu", Z80, 4000000)  /* 4 MHz ??? */
 
354
        MCFG_CPU_ADD("audiocpu", Z80, XTAL_4MHz)
344
355
        MCFG_CPU_PROGRAM_MAP(spbactn_sound_map)
345
356
 
346
357
        /* video hardware */
359
370
        /* sound hardware */
360
371
        MCFG_SPEAKER_STANDARD_MONO("mono")
361
372
 
362
 
        MCFG_SOUND_ADD("ymsnd", YM3812, 3579545)
 
373
        MCFG_SOUND_ADD("ymsnd", YM3812, XTAL_4MHz) /* Was 3.579545MHz, a common clock, but no way to generate via on PCB OSCs */
363
374
        MCFG_SOUND_CONFIG(ym3812_config)
364
375
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
365
376
 
366
 
        MCFG_OKIM6295_ADD("oki", 1056000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
 
377
        MCFG_OKIM6295_ADD("oki", XTAL_4MHz/4, OKIM6295_PIN7_HIGH) /* Was 1.056MHz, a common clock, but no way to generate via on PCB OSCs. clock frequency & pin 7 not verified */
367
378
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
368
379
MACHINE_CONFIG_END
369
380