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

« back to all changes in this revision

Viewing changes to src/mame/drivers/shuuz.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
 *************************************/
47
47
 
48
 
static READ16_HANDLER( shuuz_atarivc_r )
 
48
READ16_MEMBER(shuuz_state::shuuz_atarivc_r)
49
49
{
50
 
        return atarivc_r(*space->machine().primary_screen, offset);
 
50
        return atarivc_r(*machine().primary_screen, offset);
51
51
}
52
52
 
53
53
 
54
 
static WRITE16_HANDLER( shuuz_atarivc_w )
 
54
WRITE16_MEMBER(shuuz_state::shuuz_atarivc_w)
55
55
{
56
 
        atarivc_w(*space->machine().primary_screen, offset, data, mem_mask);
 
56
        atarivc_w(*machine().primary_screen, offset, data, mem_mask);
57
57
}
58
58
 
59
59
 
80
80
}
81
81
 
82
82
 
83
 
static WRITE16_HANDLER( latch_w )
 
83
WRITE16_MEMBER(shuuz_state::latch_w)
84
84
{
85
85
}
86
86
 
92
92
 *
93
93
 *************************************/
94
94
 
95
 
static READ16_HANDLER( leta_r )
 
95
READ16_MEMBER(shuuz_state::leta_r)
96
96
{
97
 
        shuuz_state *state = space->machine().driver_data<shuuz_state>();
98
97
        /* trackball -- rotated 45 degrees? */
99
98
        int which = offset & 1;
100
99
 
101
100
        /* when reading the even ports, do a real analog port update */
102
101
        if (which == 0)
103
102
        {
104
 
                int dx = (INT8)input_port_read(space->machine(), "TRACKX");
105
 
                int dy = (INT8)input_port_read(space->machine(), "TRACKY");
 
103
                int dx = (INT8)ioport("TRACKX")->read();
 
104
                int dy = (INT8)ioport("TRACKY")->read();
106
105
 
107
 
                state->m_cur[0] = dx + dy;
108
 
                state->m_cur[1] = dx - dy;
 
106
                m_cur[0] = dx + dy;
 
107
                m_cur[1] = dx - dy;
109
108
        }
110
109
 
111
110
        /* clip the result to -0x3f to +0x3f to remove directional ambiguities */
112
 
        return state->m_cur[which];
 
111
        return m_cur[which];
113
112
}
114
113
 
115
114
 
120
119
 *
121
120
 *************************************/
122
121
 
123
 
static READ16_HANDLER( special_port0_r )
 
122
READ16_MEMBER(shuuz_state::special_port0_r)
124
123
{
125
 
        int result = input_port_read(space->machine(), "SYSTEM");
 
124
        int result = ioport("SYSTEM")->read();
126
125
 
127
 
        if ((result & 0x0800) && atarigen_get_hblank(*space->machine().primary_screen))
 
126
        if ((result & 0x0800) && atarigen_get_hblank(*machine().primary_screen))
128
127
                result &= ~0x0800;
129
128
 
130
129
        return result;
138
137
 *
139
138
 *************************************/
140
139
 
141
 
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16 )
 
140
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, shuuz_state )
142
141
        AM_RANGE(0x000000, 0x03ffff) AM_ROM
143
 
        AM_RANGE(0x100000, 0x100fff) AM_READWRITE(atarigen_eeprom_r, atarigen_eeprom_w) AM_SHARE("eeprom")
144
 
        AM_RANGE(0x101000, 0x101fff) AM_WRITE(atarigen_eeprom_enable_w)
 
142
        AM_RANGE(0x100000, 0x100fff) AM_READWRITE_LEGACY(atarigen_eeprom_r, atarigen_eeprom_w) AM_SHARE("eeprom")
 
143
        AM_RANGE(0x101000, 0x101fff) AM_WRITE_LEGACY(atarigen_eeprom_enable_w)
145
144
        AM_RANGE(0x102000, 0x102001) AM_WRITE(watchdog_reset16_w)
146
145
        AM_RANGE(0x103000, 0x103003) AM_READ(leta_r)
147
146
        AM_RANGE(0x105000, 0x105001) AM_READWRITE(special_port0_r, latch_w)
148
147
        AM_RANGE(0x105002, 0x105003) AM_READ_PORT("BUTTONS")
149
 
        AM_RANGE(0x106000, 0x106001) AM_DEVREADWRITE8_MODERN("oki", okim6295_device, read, write, 0x00ff)
 
148
        AM_RANGE(0x106000, 0x106001) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff)
150
149
        AM_RANGE(0x107000, 0x107007) AM_NOP
151
 
        AM_RANGE(0x3e0000, 0x3e087f) AM_RAM_WRITE(atarigen_666_paletteram_w) AM_BASE_GENERIC(paletteram)
152
 
        AM_RANGE(0x3effc0, 0x3effff) AM_READWRITE(shuuz_atarivc_r, shuuz_atarivc_w) AM_BASE_MEMBER(shuuz_state, m_atarivc_data)
153
 
        AM_RANGE(0x3f4000, 0x3f5eff) AM_RAM_WRITE(atarigen_playfield_latched_msb_w) AM_BASE_MEMBER(shuuz_state, m_playfield)
154
 
        AM_RANGE(0x3f5f00, 0x3f5f7f) AM_RAM AM_BASE_MEMBER(shuuz_state, m_atarivc_eof_data)
155
 
        AM_RANGE(0x3f5f80, 0x3f5fff) AM_READWRITE(atarimo_0_slipram_r, atarimo_0_slipram_w)
156
 
        AM_RANGE(0x3f6000, 0x3f7fff) AM_RAM_WRITE(atarigen_playfield_upper_w) AM_BASE_MEMBER(shuuz_state, m_playfield_upper)
 
150
        AM_RANGE(0x3e0000, 0x3e087f) AM_RAM_WRITE_LEGACY(atarigen_666_paletteram_w) AM_SHARE("paletteram")
 
151
        AM_RANGE(0x3effc0, 0x3effff) AM_READWRITE(shuuz_atarivc_r, shuuz_atarivc_w) AM_SHARE("atarivc_data")
 
152
        AM_RANGE(0x3f4000, 0x3f5eff) AM_RAM_WRITE_LEGACY(atarigen_playfield_latched_msb_w) AM_SHARE("playfield")
 
153
        AM_RANGE(0x3f5f00, 0x3f5f7f) AM_RAM AM_SHARE("atarivc_eof")
 
154
        AM_RANGE(0x3f5f80, 0x3f5fff) AM_READWRITE_LEGACY(atarimo_0_slipram_r, atarimo_0_slipram_w)
 
155
        AM_RANGE(0x3f6000, 0x3f7fff) AM_RAM_WRITE_LEGACY(atarigen_playfield_upper_w) AM_SHARE("playfield_up")
157
156
        AM_RANGE(0x3f8000, 0x3fcfff) AM_RAM
158
 
        AM_RANGE(0x3fd000, 0x3fd3ff) AM_READWRITE(atarimo_0_spriteram_r, atarimo_0_spriteram_w)
 
157
        AM_RANGE(0x3fd000, 0x3fd3ff) AM_READWRITE_LEGACY(atarimo_0_spriteram_r, atarimo_0_spriteram_w)
159
158
        AM_RANGE(0x3fd400, 0x3fffff) AM_RAM
160
159
ADDRESS_MAP_END
161
160
 
172
171
        PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
173
172
        PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
174
173
        PORT_BIT( 0x07fc, IP_ACTIVE_LOW, IPT_UNUSED )
175
 
        PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_VBLANK )
 
174
        PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
176
175
        PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED )
177
176
 
178
177
        PORT_START("BUTTONS")
199
198
        PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNUSED )
200
199
        PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Step Debug SW") PORT_CODE(KEYCODE_S)
201
200
        PORT_BIT( 0x0600, IP_ACTIVE_LOW, IPT_UNUSED )
202
 
        PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_VBLANK )
 
201
        PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
203
202
        PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Playfield Debug SW") PORT_CODE(KEYCODE_Y)
204
203
        PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Reset Debug SW") PORT_CODE(KEYCODE_E)
205
204
        PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Crosshair Debug SW") PORT_CODE(KEYCODE_C)