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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Emmanuel Kasper, Félix Arreola Rodríguez, Jordi Mallach
  • Date: 2011-05-11 21:06:50 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110511210650-jizvh8a6x117y9hr
Tags: 0.142-1
[ Emmanuel Kasper ]
* New upstream release
* Set NOWERROR=1 to allow compiling with gcc-4.6
* Remove fix_powerpc_build.patch, as upstream has taken it in this release
* Add gnome-video-arcade front end as a suggested package

[ Félix Arreola Rodríguez ]
* Add kfreebsd-build.patch to quilt series, to fix build on kfreebsd

[ Jordi Mallach ]
* Remove unneeded and bogus addition of --with-quilt to the dh invocation.
* Add Cesare Falco (long time Ubuntu maintainer) to Uploaders, and wrap
  them into multiple lines.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
static INTERRUPT_GEN( pooyan_interrupt )
27
27
{
28
 
        pooyan_state *state = device->machine->driver_data<pooyan_state>();
 
28
        pooyan_state *state = device->machine().driver_data<pooyan_state>();
29
29
 
30
 
        if (state->irq_enable)
31
 
                cpu_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE);
 
30
        if (state->m_irq_enable)
 
31
                device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE);
32
32
}
33
33
 
34
34
 
35
35
static WRITE8_HANDLER( irq_enable_w )
36
36
{
37
 
        pooyan_state *state = space->machine->driver_data<pooyan_state>();
 
37
        pooyan_state *state = space->machine().driver_data<pooyan_state>();
38
38
 
39
 
        state->irq_enable = data & 1;
40
 
        if (!state->irq_enable)
41
 
                cpu_set_input_line(state->maincpu, INPUT_LINE_NMI, CLEAR_LINE);
 
39
        state->m_irq_enable = data & 1;
 
40
        if (!state->m_irq_enable)
 
41
                device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, CLEAR_LINE);
42
42
}
43
43
 
44
44
 
48
48
 *
49
49
 *************************************/
50
50
 
51
 
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
 
51
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8 )
52
52
        AM_RANGE(0x0000, 0x7fff) AM_ROM
53
 
        AM_RANGE(0x8000, 0x83ff) AM_RAM_WRITE(pooyan_colorram_w) AM_BASE_MEMBER(pooyan_state, colorram)
54
 
        AM_RANGE(0x8400, 0x87ff) AM_RAM_WRITE(pooyan_videoram_w) AM_BASE_MEMBER(pooyan_state, videoram)
 
53
        AM_RANGE(0x8000, 0x83ff) AM_RAM_WRITE(pooyan_colorram_w) AM_BASE_MEMBER(pooyan_state, m_colorram)
 
54
        AM_RANGE(0x8400, 0x87ff) AM_RAM_WRITE(pooyan_videoram_w) AM_BASE_MEMBER(pooyan_state, m_videoram)
55
55
        AM_RANGE(0x8800, 0x8fff) AM_RAM
56
 
        AM_RANGE(0x9000, 0x90ff) AM_MIRROR(0x0b00) AM_RAM AM_BASE_MEMBER(pooyan_state, spriteram)
57
 
        AM_RANGE(0x9400, 0x94ff) AM_MIRROR(0x0b00) AM_RAM AM_BASE_MEMBER(pooyan_state, spriteram2)
 
56
        AM_RANGE(0x9000, 0x90ff) AM_MIRROR(0x0b00) AM_RAM AM_BASE_MEMBER(pooyan_state, m_spriteram)
 
57
        AM_RANGE(0x9400, 0x94ff) AM_MIRROR(0x0b00) AM_RAM AM_BASE_MEMBER(pooyan_state, m_spriteram2)
58
58
        AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x5e7f) AM_READ_PORT("DSW1")
59
59
        AM_RANGE(0xa080, 0xa080) AM_MIRROR(0x5e1f) AM_READ_PORT("IN0")
60
60
        AM_RANGE(0xa0a0, 0xa0a0) AM_MIRROR(0x5e1f) AM_READ_PORT("IN1")
208
208
 
209
209
static MACHINE_START( pooyan )
210
210
{
211
 
        pooyan_state *state = machine->driver_data<pooyan_state>();
212
 
 
213
 
        state->maincpu = machine->device<cpu_device>("maincpu");
214
 
 
215
 
        state_save_register_global(machine, state->irq_enable);
 
211
        pooyan_state *state = machine.driver_data<pooyan_state>();
 
212
 
 
213
        state->m_maincpu = machine.device<cpu_device>("maincpu");
 
214
 
 
215
        state->save_item(NAME(state->m_irq_enable));
216
216
}
217
217
 
218
218
 
219
219
static MACHINE_RESET( pooyan )
220
220
{
221
 
        pooyan_state *state = machine->driver_data<pooyan_state>();
222
 
        state->irq_enable = 0;
 
221
        pooyan_state *state = machine.driver_data<pooyan_state>();
 
222
        state->m_irq_enable = 0;
223
223
}
224
224
 
225
225
 
239
239
        MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
240
240
        MCFG_SCREEN_SIZE(32*8, 32*8)
241
241
        MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
 
242
        MCFG_SCREEN_UPDATE(pooyan)
242
243
 
243
244
        MCFG_GFXDECODE(pooyan)
244
245
        MCFG_PALETTE_LENGTH(16*16+16*16)
245
246
 
246
247
        MCFG_PALETTE_INIT(pooyan)
247
248
        MCFG_VIDEO_START(pooyan)
248
 
        MCFG_VIDEO_UPDATE(pooyan)
249
249
 
250
250
        /* sound hardware */
251
251
        MCFG_FRAGMENT_ADD(timeplt_sound)