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

« back to all changes in this revision

Viewing changes to src/mame/drivers/cidelsa.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:
45
45
 
46
46
        int bank = BIT(data, 3);
47
47
 
48
 
        memory_set_bank(machine(), "bank1", bank);
 
48
        membank("bank1")->set_entry(bank);
49
49
}
50
50
 
51
51
WRITE8_MEMBER( draco_state::sound_g_w )
252
252
        AM_RANGE(0x01, 0x01) AM_DEVREAD("ic29", cdp1852_device, read) AM_DEVWRITE("ic32", cdp1852_device, write)
253
253
        AM_RANGE(0x02, 0x02) AM_DEVREAD("ic30", cdp1852_device, read)
254
254
        AM_RANGE(0x04, 0x04) AM_DEVREAD("ic31", cdp1852_device, read)
255
 
        AM_RANGE(0x03, 0x07) AM_WRITE_BASE(cidelsa_state, cdp1869_w)
 
255
        AM_RANGE(0x03, 0x07) AM_WRITE(cdp1869_w)
256
256
ADDRESS_MAP_END
257
257
 
258
258
static ADDRESS_MAP_START( draco_sound_map, AS_PROGRAM, 8, draco_state )
270
270
 
271
271
/* Input Ports */
272
272
 
273
 
static CUSTOM_INPUT( cdp1869_pcb_r )
 
273
CUSTOM_INPUT_MEMBER(cidelsa_state::cdp1869_pcb_r)
274
274
{
275
 
        cidelsa_state *state = field.machine().driver_data<cidelsa_state>();
276
275
 
277
 
        return state->m_cdp1869_pcb;
 
276
        return m_cdp1869_pcb;
278
277
}
279
278
 
280
 
static INPUT_CHANGED( ef_w )
 
279
INPUT_CHANGED_MEMBER(cidelsa_state::ef_w)
281
280
{
282
 
        cputag_set_input_line(field.machine(), CDP1802_TAG, (int)(FPTR)param, newval);
 
281
        cputag_set_input_line(machine(), CDP1802_TAG, (int)(FPTR)param, newval);
283
282
}
284
283
 
285
284
static INPUT_PORTS_START( destryer )
291
290
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // LF
292
291
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // FR
293
292
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
294
 
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_pcb_r, NULL)
 
293
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cidelsa_state,cdp1869_pcb_r, NULL)
295
294
 
296
295
        PORT_START("IN1")
297
296
        PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) )
317
316
 
318
317
        PORT_START("EF")
319
318
        PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) // inverted CDP1869 PRD, pushed
320
 
        PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF2)
321
 
        PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF3)
322
 
        PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF4)
 
319
        PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF2)
 
320
        PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF3)
 
321
        PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF4)
323
322
INPUT_PORTS_END
324
323
 
325
324
static INPUT_PORTS_START( altair )
331
330
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // LF
332
331
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // FR
333
332
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
334
 
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_pcb_r, NULL)
 
333
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cidelsa_state,cdp1869_pcb_r, NULL)
335
334
 
336
335
        PORT_START("IN1")
337
336
        PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) )
367
366
 
368
367
        PORT_START("EF")
369
368
        PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) // inverted CDP1869 PRD, pushed
370
 
        PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF2)
371
 
        PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF3)
372
 
        PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF4)
 
369
        PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF2)
 
370
        PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF3)
 
371
        PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF4)
373
372
INPUT_PORTS_END
374
373
 
375
374
static INPUT_PORTS_START( draco )
381
380
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
382
381
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
383
382
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
384
 
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_pcb_r, NULL)
 
383
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cidelsa_state,cdp1869_pcb_r, NULL)
385
384
 
386
385
        PORT_START("IN1")
387
386
        PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) )
419
418
 
420
419
        PORT_START("EF")
421
420
        PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) // CDP1869 PRD, pushed
422
 
        PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF2)
423
 
        PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF3)
424
 
        PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF4)
 
421
        PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF2)
 
422
        PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF3)
 
423
        PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF4)
425
424
INPUT_PORTS_END
426
425
 
427
426
/* Machine Start */
442
441
void draco_state::machine_start()
443
442
{
444
443
        /* setup COP402 memory banking */
445
 
        memory_configure_bank(machine(), "bank1", 0, 2, machine().region(COP402N_TAG)->base(), 0x400);
446
 
        memory_set_bank(machine(), "bank1", 0);
 
444
        membank("bank1")->configure_entries(0, 2, memregion(COP402N_TAG)->base(), 0x400);
 
445
        membank("bank1")->set_entry(0);
447
446
 
448
447
        /* register for state saving */
449
448
        save_item(NAME(m_reset));