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

« back to all changes in this revision

Viewing changes to src/mame/drivers/wiping.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:
35
35
***************************************************************************/
36
36
#include "emu.h"
37
37
#include "cpu/z80/z80.h"
 
38
#include "audio/wiping.h"
38
39
#include "includes/wiping.h"
39
40
 
40
41
 
41
 
static UINT8 *sharedram1,*sharedram2;
42
 
 
43
42
static READ8_HANDLER( shared1_r )
44
43
{
45
 
        return sharedram1[offset];
 
44
        wiping_state *state = space->machine().driver_data<wiping_state>();
 
45
        return state->m_sharedram1[offset];
46
46
}
47
47
 
48
48
static READ8_HANDLER( shared2_r )
49
49
{
50
 
        return sharedram2[offset];
 
50
        wiping_state *state = space->machine().driver_data<wiping_state>();
 
51
        return state->m_sharedram2[offset];
51
52
}
52
53
 
53
54
static WRITE8_HANDLER( shared1_w )
54
55
{
55
 
        sharedram1[offset] = data;
 
56
        wiping_state *state = space->machine().driver_data<wiping_state>();
 
57
        state->m_sharedram1[offset] = data;
56
58
}
57
59
 
58
60
static WRITE8_HANDLER( shared2_w )
59
61
{
60
 
        sharedram2[offset] = data;
 
62
        wiping_state *state = space->machine().driver_data<wiping_state>();
 
63
        state->m_sharedram2[offset] = data;
61
64
}
62
65
 
63
66
 
69
72
 
70
73
        res = 0;
71
74
        for (i = 0; i < 8; i++)
72
 
                res |= ((input_port_read(space->machine, portnames[i]) >> offset) & 1) << i;
 
75
                res |= ((input_port_read(space->machine(), portnames[i]) >> offset) & 1) << i;
73
76
 
74
77
        return res;
75
78
}
77
80
static WRITE8_HANDLER( subcpu_reset_w )
78
81
{
79
82
        if (data & 1)
80
 
                cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, CLEAR_LINE);
 
83
                cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_RESET, CLEAR_LINE);
81
84
        else
82
 
                cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
 
85
                cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
83
86
}
84
87
 
85
88
 
86
 
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
 
89
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8 )
87
90
        AM_RANGE(0x0000, 0x5fff) AM_ROM
88
 
        AM_RANGE(0x8000, 0x83ff) AM_BASE(&wiping_videoram)
89
 
        AM_RANGE(0x8400, 0x87ff) AM_BASE(&wiping_colorram)
90
 
        AM_RANGE(0x8800, 0x88ff) AM_BASE_SIZE_GENERIC(spriteram)
 
91
        AM_RANGE(0x8000, 0x83ff) AM_BASE_MEMBER(wiping_state, m_videoram)
 
92
        AM_RANGE(0x8400, 0x87ff) AM_BASE_MEMBER(wiping_state, m_colorram)
 
93
        AM_RANGE(0x8800, 0x88ff) AM_BASE_SIZE_MEMBER(wiping_state, m_spriteram, m_spriteram_size)
91
94
        AM_RANGE(0x8000, 0x8bff) AM_RAM
92
 
        AM_RANGE(0x9000, 0x93ff) AM_READWRITE(shared1_r,shared1_w) AM_BASE(&sharedram1)
93
 
        AM_RANGE(0x9800, 0x9bff) AM_READWRITE(shared2_r,shared2_w) AM_BASE(&sharedram2)
 
95
        AM_RANGE(0x9000, 0x93ff) AM_READWRITE(shared1_r,shared1_w) AM_BASE_MEMBER(wiping_state, m_sharedram1)
 
96
        AM_RANGE(0x9800, 0x9bff) AM_READWRITE(shared2_r,shared2_w) AM_BASE_MEMBER(wiping_state, m_sharedram2)
94
97
        AM_RANGE(0xa000, 0xa000) AM_WRITE(interrupt_enable_w)
95
98
        AM_RANGE(0xa002, 0xa002) AM_WRITE(wiping_flipscreen_w)
96
99
        AM_RANGE(0xa003, 0xa003) AM_WRITE(subcpu_reset_w)
99
102
        AM_RANGE(0xb800, 0xb800) AM_WRITE(watchdog_reset_w)
100
103
ADDRESS_MAP_END
101
104
 
102
 
static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )
 
105
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8 )
103
106
        AM_RANGE(0x0000, 0x1fff) AM_ROM
104
107
        AM_RANGE(0x4000, 0x7fff) AM_DEVWRITE("wiping", wiping_sound_w)
105
108
        AM_RANGE(0x9000, 0x93ff) AM_READWRITE(shared1_r,shared1_w)
278
281
 
279
282
 
280
283
 
281
 
static MACHINE_CONFIG_START( wiping, driver_device )
 
284
static MACHINE_CONFIG_START( wiping, wiping_state )
282
285
 
283
286
        /* basic machine hardware */
284
287
        MCFG_CPU_ADD("maincpu", Z80,18432000/6) /* 3.072 MHz */
296
299
        MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
297
300
        MCFG_SCREEN_SIZE(36*8, 28*8)
298
301
        MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1)
 
302
        MCFG_SCREEN_UPDATE(wiping)
299
303
 
300
304
        MCFG_GFXDECODE(wiping)
301
305
        MCFG_PALETTE_LENGTH(64*4+64*4)
302
306
 
303
307
        MCFG_PALETTE_INIT(wiping)
304
 
        MCFG_VIDEO_UPDATE(wiping)
305
308
 
306
309
        /* sound hardware */
307
310
        MCFG_SPEAKER_STANDARD_MONO("mono")