97
97
***************************************************************************/
99
WRITE8_HANDLER( tankbust_background_videoram_w )
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);
105
READ8_HANDLER( tankbust_background_videoram_r )
107
tankbust_state *state = space->machine().driver_data<tankbust_state>();
108
return state->m_videoram[offset];
111
WRITE8_HANDLER( tankbust_background_colorram_w )
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);
117
READ8_HANDLER( tankbust_background_colorram_r )
119
tankbust_state *state = space->machine().driver_data<tankbust_state>();
120
return state->m_colorram[offset];
123
WRITE8_HANDLER( tankbust_txtram_w )
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);
129
READ8_HANDLER( tankbust_txtram_r )
131
tankbust_state *state = space->machine().driver_data<tankbust_state>();
132
return state->m_txtram[offset];
137
WRITE8_HANDLER( tankbust_xscroll_w )
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)
101
m_videoram[offset] = data;
102
m_bg_tilemap->mark_tile_dirty(offset);
104
READ8_MEMBER(tankbust_state::tankbust_background_videoram_r)
106
return m_videoram[offset];
109
WRITE8_MEMBER(tankbust_state::tankbust_background_colorram_w)
111
m_colorram[offset] = data;
112
m_bg_tilemap->mark_tile_dirty(offset);
114
READ8_MEMBER(tankbust_state::tankbust_background_colorram_r)
116
return m_colorram[offset];
119
WRITE8_MEMBER(tankbust_state::tankbust_txtram_w)
121
m_txtram[offset] = data;
122
m_txt_tilemap->mark_tile_dirty(offset);
124
READ8_MEMBER(tankbust_state::tankbust_txtram_r)
126
return m_txtram[offset];
131
WRITE8_MEMBER(tankbust_state::tankbust_xscroll_w)
133
if( m_xscroll[offset] != data )
144
state->m_xscroll[offset] = data;
137
m_xscroll[offset] = data;
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 );
150
//popmessage("x=%02x %02x", state->m_xscroll[0], state->m_xscroll[1]);
143
//popmessage("x=%02x %02x", m_xscroll[0], m_xscroll[1]);
154
WRITE8_HANDLER( tankbust_yscroll_w )
147
WRITE8_MEMBER(tankbust_state::tankbust_yscroll_w)
156
tankbust_state *state = space->machine().driver_data<tankbust_state>();
157
if( state->m_yscroll[offset] != data )
149
if( m_yscroll[offset] != data )
161
state->m_yscroll[offset] = data;
162
y = state->m_yscroll[0];
153
m_yscroll[offset] = data;
163
155
if (y>=0x80) y-=0x100;
164
state->m_bg_tilemap->set_scrolly(0, y );
156
m_bg_tilemap->set_scrolly(0, y );
166
//popmessage("y=%02x %02x", state->m_yscroll[0], state->m_yscroll[1]);
158
//popmessage("y=%02x %02x", m_yscroll[0], m_yscroll[1]);
169
161
/***************************************************************************