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

« back to all changes in this revision

Viewing changes to src/mame/video/tankbust.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:
96
96
 
97
97
***************************************************************************/
98
98
 
99
 
WRITE8_HANDLER( tankbust_background_videoram_w )
100
 
{
101
 
        tankbust_state *state = space->machine().driver_data<tankbust_state>();
102
 
        state->m_videoram[offset] = data;
103
 
        state->m_bg_tilemap->mark_tile_dirty(offset);
104
 
}
105
 
READ8_HANDLER( tankbust_background_videoram_r )
106
 
{
107
 
        tankbust_state *state = space->machine().driver_data<tankbust_state>();
108
 
        return state->m_videoram[offset];
109
 
}
110
 
 
111
 
WRITE8_HANDLER( tankbust_background_colorram_w )
112
 
{
113
 
        tankbust_state *state = space->machine().driver_data<tankbust_state>();
114
 
        state->m_colorram[offset] = data;
115
 
        state->m_bg_tilemap->mark_tile_dirty(offset);
116
 
}
117
 
READ8_HANDLER( tankbust_background_colorram_r )
118
 
{
119
 
        tankbust_state *state = space->machine().driver_data<tankbust_state>();
120
 
        return state->m_colorram[offset];
121
 
}
122
 
 
123
 
WRITE8_HANDLER( tankbust_txtram_w )
124
 
{
125
 
        tankbust_state *state = space->machine().driver_data<tankbust_state>();
126
 
        state->m_txtram[offset] = data;
127
 
        state->m_txt_tilemap->mark_tile_dirty(offset);
128
 
}
129
 
READ8_HANDLER( tankbust_txtram_r )
130
 
{
131
 
        tankbust_state *state = space->machine().driver_data<tankbust_state>();
132
 
        return state->m_txtram[offset];
133
 
}
134
 
 
135
 
 
136
 
 
137
 
WRITE8_HANDLER( tankbust_xscroll_w )
138
 
{
139
 
        tankbust_state *state = space->machine().driver_data<tankbust_state>();
140
 
        if( state->m_xscroll[offset] != data )
 
99
WRITE8_MEMBER(tankbust_state::tankbust_background_videoram_w)
 
100
{
 
101
        m_videoram[offset] = data;
 
102
        m_bg_tilemap->mark_tile_dirty(offset);
 
103
}
 
104
READ8_MEMBER(tankbust_state::tankbust_background_videoram_r)
 
105
{
 
106
        return m_videoram[offset];
 
107
}
 
108
 
 
109
WRITE8_MEMBER(tankbust_state::tankbust_background_colorram_w)
 
110
{
 
111
        m_colorram[offset] = data;
 
112
        m_bg_tilemap->mark_tile_dirty(offset);
 
113
}
 
114
READ8_MEMBER(tankbust_state::tankbust_background_colorram_r)
 
115
{
 
116
        return m_colorram[offset];
 
117
}
 
118
 
 
119
WRITE8_MEMBER(tankbust_state::tankbust_txtram_w)
 
120
{
 
121
        m_txtram[offset] = data;
 
122
        m_txt_tilemap->mark_tile_dirty(offset);
 
123
}
 
124
READ8_MEMBER(tankbust_state::tankbust_txtram_r)
 
125
{
 
126
        return m_txtram[offset];
 
127
}
 
128
 
 
129
 
 
130
 
 
131
WRITE8_MEMBER(tankbust_state::tankbust_xscroll_w)
 
132
{
 
133
        if( m_xscroll[offset] != data )
141
134
        {
142
135
                int x;
143
136
 
144
 
                state->m_xscroll[offset] = data;
 
137
                m_xscroll[offset] = data;
145
138
 
146
 
                x = state->m_xscroll[0] + 256 * (state->m_xscroll[1]&1);
 
139
                x = m_xscroll[0] + 256 * (m_xscroll[1]&1);
147
140
                if (x>=0x100) x-=0x200;
148
 
                state->m_bg_tilemap->set_scrollx(0, x );
 
141
                m_bg_tilemap->set_scrollx(0, x );
149
142
        }
150
 
//popmessage("x=%02x %02x", state->m_xscroll[0], state->m_xscroll[1]);
 
143
//popmessage("x=%02x %02x", m_xscroll[0], m_xscroll[1]);
151
144
}
152
145
 
153
146
 
154
 
WRITE8_HANDLER( tankbust_yscroll_w )
 
147
WRITE8_MEMBER(tankbust_state::tankbust_yscroll_w)
155
148
{
156
 
        tankbust_state *state = space->machine().driver_data<tankbust_state>();
157
 
        if( state->m_yscroll[offset] != data )
 
149
        if( m_yscroll[offset] != data )
158
150
        {
159
151
                int y;
160
152
 
161
 
                state->m_yscroll[offset] = data;
162
 
                y = state->m_yscroll[0];
 
153
                m_yscroll[offset] = data;
 
154
                y = m_yscroll[0];
163
155
                if (y>=0x80) y-=0x100;
164
 
                state->m_bg_tilemap->set_scrolly(0, y );
 
156
                m_bg_tilemap->set_scrolly(0, y );
165
157
        }
166
 
//popmessage("y=%02x %02x", state->m_yscroll[0], state->m_yscroll[1]);
 
158
//popmessage("y=%02x %02x", m_yscroll[0], m_yscroll[1]);
167
159
}
168
160
 
169
161
/***************************************************************************
193
185
        UINT8 *spriteram = state->m_spriteram;
194
186
        int offs;
195
187
 
196
 
        for (offs = 0; offs < state->m_spriteram_size; offs += 4)
 
188
        for (offs = 0; offs < state->m_spriteram.bytes(); offs += 4)
197
189
        {
198
190
                int code,color,sx,sy,flipx,flipy;
199
191