1 // license:BSD-3-Clause
2 // copyright-holders:Takahiro Nogi, Uki
3 /******************************************************************************
4
5 Video Hardware for Video System Mahjong series.
6
7 Driver by Takahiro Nogi <nogi@kt.rim.or.jp> 2001/02/04 -
8
9 ******************************************************************************/
10
11 #include "emu.h"
12 #include "includes/fromanc2.h"
13
14 /******************************************************************************
15
16 Callbacks for the TileMap code
17
18 ******************************************************************************/
19
20 template<int VRAM, int Layer>
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_tile_info)21 TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_tile_info)
22 {
23 int tile = (m_videoram[VRAM][Layer][tile_index] & 0x3fff) | (m_gfxbank[VRAM][Layer] << 14);
24 int color = (m_videoram[VRAM][Layer][tile_index] & 0xc000) >> 14;
25
26 tileinfo.set(Layer, tile, color, 0);
27 }
28
29 template<int VRAM, int Layer>
TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_tile_info)30 TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_tile_info)
31 {
32 int tile = m_videoram[VRAM][Layer][tile_index] | (m_gfxbank[VRAM][Layer] << 16);
33
34 tileinfo.set(Layer, tile, 0, 0);
35 }
36
37
38 /******************************************************************************
39
40 Memory handlers
41
42 ******************************************************************************/
43
fromanc2_dispvram_w(offs_t offset,uint16_t data,uint16_t mem_mask,int vram,int layer)44 inline void fromanc2_state::fromanc2_dispvram_w( offs_t offset, uint16_t data, uint16_t mem_mask, int vram, int layer )
45 {
46 layer += (offset < 0x1000) ? 0 : 1;
47
48 COMBINE_DATA(&m_videoram[vram][layer][offset & 0x0fff]);
49 m_tilemap[vram][layer]->mark_tile_dirty(offset & 0x0fff);
50 }
51
fromanc2_videoram_0_w(offs_t offset,uint16_t data,uint16_t mem_mask)52 void fromanc2_state::fromanc2_videoram_0_w(offs_t offset, uint16_t data, uint16_t mem_mask){ fromanc2_dispvram_w(offset, data, mem_mask, 0, 0); }
fromanc2_videoram_1_w(offs_t offset,uint16_t data,uint16_t mem_mask)53 void fromanc2_state::fromanc2_videoram_1_w(offs_t offset, uint16_t data, uint16_t mem_mask){ fromanc2_dispvram_w(offset, data, mem_mask, 0, 2); }
fromanc2_videoram_2_w(offs_t offset,uint16_t data,uint16_t mem_mask)54 void fromanc2_state::fromanc2_videoram_2_w(offs_t offset, uint16_t data, uint16_t mem_mask){ fromanc2_dispvram_w(offset, data, mem_mask, 1, 0); }
fromanc2_videoram_3_w(offs_t offset,uint16_t data,uint16_t mem_mask)55 void fromanc2_state::fromanc2_videoram_3_w(offs_t offset, uint16_t data, uint16_t mem_mask){ fromanc2_dispvram_w(offset, data, mem_mask, 1, 2); }
56
fromanc2_gfxreg_0_w(offs_t offset,uint16_t data)57 void fromanc2_state::fromanc2_gfxreg_0_w(offs_t offset, uint16_t data)
58 {
59 switch (offset)
60 {
61 case 0x00: m_scrollx[0][0] = -(data - 0x000); break;
62 case 0x01: m_scrolly[0][0] = -(data - 0x000); break;
63 case 0x02: m_scrollx[0][1] = -(data - 0x004); break;
64 case 0x03: m_scrolly[0][1] = -(data - 0x000); break;
65 // offset 0x04 - 0x11 unknown
66 default: break;
67 }
68 }
69
fromanc2_gfxreg_1_w(offs_t offset,uint16_t data)70 void fromanc2_state::fromanc2_gfxreg_1_w(offs_t offset, uint16_t data)
71 {
72 switch (offset)
73 {
74 case 0x00: m_scrollx[1][0] = -(data - 0x1be); break;
75 case 0x01: m_scrolly[1][0] = -(data - 0x1ef); break;
76 case 0x02: m_scrollx[1][1] = -(data - 0x1c2); break;
77 case 0x03: m_scrolly[1][1] = -(data - 0x1ef); break;
78 // offset 0x04 - 0x11 unknown
79 default: break;
80 }
81 }
82
fromanc2_gfxreg_2_w(offs_t offset,uint16_t data)83 void fromanc2_state::fromanc2_gfxreg_2_w(offs_t offset, uint16_t data)
84 {
85 switch (offset)
86 {
87 case 0x00: m_scrollx[0][2] = -(data - 0x1c0); break;
88 case 0x01: m_scrolly[0][2] = -(data - 0x1ef); break;
89 case 0x02: m_scrollx[0][3] = -(data - 0x1c3); break;
90 case 0x03: m_scrolly[0][3] = -(data - 0x1ef); break;
91 // offset 0x04 - 0x11 unknown
92 default: break;
93 }
94 }
95
fromanc2_gfxreg_3_w(offs_t offset,uint16_t data)96 void fromanc2_state::fromanc2_gfxreg_3_w(offs_t offset, uint16_t data)
97 {
98 switch (offset)
99 {
100 case 0x00: m_scrollx[1][2] = -(data - 0x1bf); break;
101 case 0x01: m_scrolly[1][2] = -(data - 0x1ef); break;
102 case 0x02: m_scrollx[1][3] = -(data - 0x1c3); break;
103 case 0x03: m_scrolly[1][3] = -(data - 0x1ef); break;
104 // offset 0x04 - 0x11 unknown
105 default: break;
106 }
107 }
108
fromanc2_gfxbank_0_w(uint16_t data)109 void fromanc2_state::fromanc2_gfxbank_0_w(uint16_t data)
110 {
111 m_gfxbank[0][0] = (data & 0x000f) >> 0;
112 m_gfxbank[0][1] = (data & 0x00f0) >> 4;
113 m_gfxbank[0][2] = (data & 0x0f00) >> 8;
114 m_gfxbank[0][3] = (data & 0xf000) >> 12;
115 m_tilemap[0][0]->mark_all_dirty();
116 m_tilemap[0][1]->mark_all_dirty();
117 m_tilemap[0][2]->mark_all_dirty();
118 m_tilemap[0][3]->mark_all_dirty();
119 }
120
fromanc2_gfxbank_1_w(uint16_t data)121 void fromanc2_state::fromanc2_gfxbank_1_w(uint16_t data)
122 {
123 m_gfxbank[1][0] = (data & 0x000f) >> 0;
124 m_gfxbank[1][1] = (data & 0x00f0) >> 4;
125 m_gfxbank[1][2] = (data & 0x0f00) >> 8;
126 m_gfxbank[1][3] = (data & 0xf000) >> 12;
127 m_tilemap[1][0]->mark_all_dirty();
128 m_tilemap[1][1]->mark_all_dirty();
129 m_tilemap[1][2]->mark_all_dirty();
130 m_tilemap[1][3]->mark_all_dirty();
131 }
132
133
fromancr_vram_w(offs_t offset,uint16_t data,uint16_t mem_mask,int layer)134 inline void fromanc2_state::fromancr_vram_w(offs_t offset, uint16_t data, uint16_t mem_mask, int layer )
135 {
136 int vram = (offset < 0x1000) ? 0 : 1;
137
138 COMBINE_DATA(&m_videoram[vram][layer][offset & 0x0fff]);
139 m_tilemap[vram][layer]->mark_tile_dirty(offset & 0x0fff);
140 }
141
fromancr_videoram_0_w(offs_t offset,uint16_t data,uint16_t mem_mask)142 void fromanc2_state::fromancr_videoram_0_w(offs_t offset, uint16_t data, uint16_t mem_mask){ fromancr_vram_w(offset, data, mem_mask, 1); }
fromancr_videoram_1_w(offs_t offset,uint16_t data,uint16_t mem_mask)143 void fromanc2_state::fromancr_videoram_1_w(offs_t offset, uint16_t data, uint16_t mem_mask){ fromancr_vram_w(offset, data, mem_mask, 0); }
fromancr_videoram_2_w(offs_t offset,uint16_t data,uint16_t mem_mask)144 void fromanc2_state::fromancr_videoram_2_w(offs_t offset, uint16_t data, uint16_t mem_mask){ fromancr_vram_w(offset, data, mem_mask, 2); }
145
fromancr_gfxreg_0_w(offs_t offset,uint16_t data)146 void fromanc2_state::fromancr_gfxreg_0_w(offs_t offset, uint16_t data)
147 {
148 switch (offset)
149 {
150 case 0x00: m_scrollx[0][0] = -(data - 0x1bf); break;
151 case 0x01: m_scrolly[0][0] = -(data - 0x1ef); break;
152 case 0x02: m_scrollx[1][0] = -(data - 0x1c3); break;
153 case 0x03: m_scrolly[1][0] = -(data - 0x1ef); break;
154 // offset 0x04 - 0x11 unknown
155 default: break;
156 }
157 }
158
fromancr_gfxreg_1_w(offs_t offset,uint16_t data)159 void fromanc2_state::fromancr_gfxreg_1_w(offs_t offset, uint16_t data)
160 {
161 switch (offset)
162 {
163 case 0x00: m_scrollx[0][1] = -(data - 0x000); break;
164 case 0x01: m_scrolly[0][1] = -(data - 0x000); break;
165 case 0x02: m_scrollx[1][1] = -(data - 0x004); break;
166 case 0x03: m_scrolly[1][1] = -(data - 0x000); break;
167 // offset 0x04 - 0x11 unknown
168 default: break;
169 }
170 }
171
fromancr_gfxbank_w(int data)172 void fromanc2_state::fromancr_gfxbank_w( int data )
173 {
174 m_gfxbank[0][0] = (data & 0x0010) >> 4; // BG (1P)
175 m_gfxbank[0][1] = (data & 0xf000) >> 12; // FG (1P)
176 m_gfxbank[1][0] = (data & 0x0008) >> 3; // BG (2P)
177 m_gfxbank[1][1] = (data & 0x0f00) >> 8; // FG (2P)
178 m_tilemap[0][0]->mark_all_dirty();
179 m_tilemap[0][1]->mark_all_dirty();
180 m_tilemap[1][0]->mark_all_dirty();
181 m_tilemap[1][1]->mark_all_dirty();
182 }
183
184
fromanc4_vram_w(offs_t offset,uint16_t data,uint16_t mem_mask,int layer)185 inline void fromanc2_state::fromanc4_vram_w( offs_t offset, uint16_t data, uint16_t mem_mask, int layer )
186 {
187 int vram = (offset < 0x4000) ? 0 : 1;
188
189 COMBINE_DATA(&m_videoram[vram][layer][offset & 0x3fff]);
190 m_tilemap[vram][layer]->mark_tile_dirty(offset & 0x3fff);
191 }
192
fromanc4_videoram_0_w(offs_t offset,uint16_t data,uint16_t mem_mask)193 void fromanc2_state::fromanc4_videoram_0_w(offs_t offset, uint16_t data, uint16_t mem_mask){ fromanc4_vram_w(offset, data, mem_mask, 2); }
fromanc4_videoram_1_w(offs_t offset,uint16_t data,uint16_t mem_mask)194 void fromanc2_state::fromanc4_videoram_1_w(offs_t offset, uint16_t data, uint16_t mem_mask){ fromanc4_vram_w(offset, data, mem_mask, 1); }
fromanc4_videoram_2_w(offs_t offset,uint16_t data,uint16_t mem_mask)195 void fromanc2_state::fromanc4_videoram_2_w(offs_t offset, uint16_t data, uint16_t mem_mask){ fromanc4_vram_w(offset, data, mem_mask, 0); }
196
fromanc4_gfxreg_0_w(offs_t offset,uint16_t data)197 void fromanc2_state::fromanc4_gfxreg_0_w(offs_t offset, uint16_t data)
198 {
199 switch (offset)
200 {
201 case 0x00: m_scrollx[0][2] = -(data - 0xfbb); break;
202 case 0x01: m_scrolly[0][2] = -(data - 0x1e4); break;
203 case 0x02: m_scrollx[1][2] = -(data - 0xfbb); break;
204 case 0x03: m_scrolly[1][2] = -(data - 0x1e4); break;
205 case 0x05: m_gfxbank[0][2] = (data & 0x000f) >> 0;
206 m_gfxbank[1][2] = (data & 0x0f00) >> 8;
207 m_tilemap[0][2]->mark_all_dirty();
208 m_tilemap[1][2]->mark_all_dirty();
209 break;
210 // offset 0x04, 0x06 - 0x11 unknown
211 default: break;
212 }
213 }
214
fromanc4_gfxreg_1_w(offs_t offset,uint16_t data)215 void fromanc2_state::fromanc4_gfxreg_1_w(offs_t offset, uint16_t data)
216 {
217 switch (offset)
218 {
219 case 0x00: m_scrollx[0][1] = -(data - 0xfba); break;
220 case 0x01: m_scrolly[0][1] = -(data - 0x1e4); break;
221 case 0x02: m_scrollx[1][1] = -(data - 0xfba); break;
222 case 0x03: m_scrolly[1][1] = -(data - 0x1e4); break;
223 case 0x05: m_gfxbank[0][1] = (data & 0x000f) >> 0;
224 m_gfxbank[1][1] = (data & 0x0f00) >> 8;
225 m_tilemap[0][1]->mark_all_dirty();
226 m_tilemap[1][1]->mark_all_dirty();
227 break;
228 // offset 0x04, 0x06 - 0x11 unknown
229 default: break;
230 }
231 }
232
fromanc4_gfxreg_2_w(offs_t offset,uint16_t data)233 void fromanc2_state::fromanc4_gfxreg_2_w(offs_t offset, uint16_t data)
234 {
235 switch (offset)
236 {
237 case 0x00: m_scrollx[0][0] = -(data - 0xfbb); break;
238 case 0x01: m_scrolly[0][0] = -(data - 0x1e4); break;
239 case 0x02: m_scrollx[1][0] = -(data - 0xfbb); break;
240 case 0x03: m_scrolly[1][0] = -(data - 0x1e4); break;
241 case 0x05: m_gfxbank[0][0] = (data & 0x000f) >> 0;
242 m_gfxbank[1][0] = (data & 0x0f00) >> 8;
243 m_tilemap[0][0]->mark_all_dirty();
244 m_tilemap[1][0]->mark_all_dirty();
245 break;
246 // offset 0x04, 0x06 - 0x11 unknown
247 default: break;
248 }
249 }
250
251
252 /******************************************************************************
253
254 Start the video hardware emulation.
255
256 ******************************************************************************/
257
VIDEO_START_MEMBER(fromanc2_state,fromanc2)258 VIDEO_START_MEMBER(fromanc2_state,fromanc2)
259 {
260 m_tilemap[0][0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromanc2_get_tile_info<0, 0>))), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
261 m_tilemap[0][1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromanc2_get_tile_info<0, 1>))), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
262 m_tilemap[0][2] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromanc2_get_tile_info<0, 2>))), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
263 m_tilemap[0][3] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromanc2_get_tile_info<0, 3>))), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
264 m_tilemap[1][0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromanc2_get_tile_info<1, 0>))), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
265 m_tilemap[1][1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromanc2_get_tile_info<1, 1>))), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
266 m_tilemap[1][2] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromanc2_get_tile_info<1, 2>))), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
267 m_tilemap[1][3] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromanc2_get_tile_info<1, 3>))), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
268
269 for (int screen = 0; screen < 2; screen++)
270 {
271 palette_device &palette = (screen == 0 ? *m_lpalette : *m_rpalette);
272 for (int tmap = 0; tmap < 4; tmap++)
273 {
274 m_videoram[screen][tmap] = std::make_unique<uint16_t[]>((64 * 64));
275 m_tilemap[screen][tmap]->set_palette(palette);
276 if (tmap != 0) m_tilemap[screen][tmap]->set_transparent_pen(0x000);
277 }
278 }
279
280 save_pointer(NAME(m_videoram[0][0]), (64 * 64));
281 save_pointer(NAME(m_videoram[0][1]), (64 * 64));
282 save_pointer(NAME(m_videoram[0][2]), (64 * 64));
283 save_pointer(NAME(m_videoram[0][3]), (64 * 64));
284 save_pointer(NAME(m_videoram[1][0]), (64 * 64));
285 save_pointer(NAME(m_videoram[1][1]), (64 * 64));
286 save_pointer(NAME(m_videoram[1][2]), (64 * 64));
287 save_pointer(NAME(m_videoram[1][3]), (64 * 64));
288 save_item(NAME(m_scrollx[0]));
289 save_item(NAME(m_scrollx[1]));
290 save_item(NAME(m_scrolly[0]));
291 save_item(NAME(m_scrolly[1]));
292 save_item(NAME(m_gfxbank[0]));
293 save_item(NAME(m_gfxbank[1]));
294 }
295
VIDEO_START_MEMBER(fromanc2_state,fromancr)296 VIDEO_START_MEMBER(fromanc2_state,fromancr)
297 {
298 m_tilemap[0][0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromancr_get_tile_info<0, 0>))), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
299 m_tilemap[0][1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromancr_get_tile_info<0, 1>))), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
300 m_tilemap[0][2] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromancr_get_tile_info<0, 2>))), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
301 m_tilemap[0][3] = nullptr;
302 m_tilemap[1][0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromancr_get_tile_info<1, 0>))), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
303 m_tilemap[1][1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromancr_get_tile_info<1, 1>))), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
304 m_tilemap[1][2] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromancr_get_tile_info<1, 2>))), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
305 m_tilemap[1][3] = nullptr;
306
307 for (int screen = 0; screen < 2; screen++)
308 {
309 palette_device &palette = (screen == 0 ? *m_lpalette : *m_rpalette);
310 for (int tmap = 0; tmap < 3; tmap++)
311 {
312 m_videoram[screen][tmap] = std::make_unique<uint16_t[]>((64 * 64));
313 m_tilemap[screen][tmap]->set_palette(palette);
314 if (tmap != 0) m_tilemap[screen][tmap]->set_transparent_pen(0x0ff);
315 }
316 }
317
318 save_pointer(NAME(m_videoram[0][0]), (64 * 64));
319 save_pointer(NAME(m_videoram[0][1]), (64 * 64));
320 save_pointer(NAME(m_videoram[0][2]), (64 * 64));
321 save_pointer(NAME(m_videoram[1][0]), (64 * 64));
322 save_pointer(NAME(m_videoram[1][1]), (64 * 64));
323 save_pointer(NAME(m_videoram[1][2]), (64 * 64));
324 save_item(NAME(m_scrollx[0]));
325 save_item(NAME(m_scrollx[1]));
326 save_item(NAME(m_scrolly[0]));
327 save_item(NAME(m_scrolly[1]));
328 save_item(NAME(m_gfxbank[0]));
329 save_item(NAME(m_gfxbank[1]));
330 }
331
VIDEO_START_MEMBER(fromanc2_state,fromanc4)332 VIDEO_START_MEMBER(fromanc2_state,fromanc4)
333 {
334 m_tilemap[0][0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromancr_get_tile_info<0, 0>))), TILEMAP_SCAN_ROWS, 8, 8, 256, 64);
335 m_tilemap[0][1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromancr_get_tile_info<0, 1>))), TILEMAP_SCAN_ROWS, 8, 8, 256, 64);
336 m_tilemap[0][2] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromancr_get_tile_info<0, 2>))), TILEMAP_SCAN_ROWS, 8, 8, 256, 64);
337 m_tilemap[0][3] = nullptr;
338 m_tilemap[1][0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromancr_get_tile_info<1, 0>))), TILEMAP_SCAN_ROWS, 8, 8, 256, 64);
339 m_tilemap[1][1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromancr_get_tile_info<1, 1>))), TILEMAP_SCAN_ROWS, 8, 8, 256, 64);
340 m_tilemap[1][2] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&fromanc2_state::fromancr_get_tile_info<1, 2>))), TILEMAP_SCAN_ROWS, 8, 8, 256, 64);
341 m_tilemap[1][3] = nullptr;
342
343 for (int screen = 0; screen < 2; screen++)
344 {
345 palette_device &palette = (screen == 0 ? *m_lpalette : *m_rpalette);
346 for (int tmap = 0; tmap < 3; tmap++)
347 {
348 m_videoram[screen][tmap] = std::make_unique<uint16_t[]>((256 * 64));
349 m_tilemap[screen][tmap]->set_palette(palette);
350 if (tmap != 0) m_tilemap[screen][tmap]->set_transparent_pen(0x000);
351 }
352 }
353
354 save_pointer(NAME(m_videoram[0][0]), (256 * 64));
355 save_pointer(NAME(m_videoram[0][1]), (256 * 64));
356 save_pointer(NAME(m_videoram[0][2]), (256 * 64));
357 save_pointer(NAME(m_videoram[1][0]), (256 * 64));
358 save_pointer(NAME(m_videoram[1][1]), (256 * 64));
359 save_pointer(NAME(m_videoram[1][2]), (256 * 64));
360 save_item(NAME(m_scrollx[0]));
361 save_item(NAME(m_scrollx[1]));
362 save_item(NAME(m_scrolly[0]));
363 save_item(NAME(m_scrolly[1]));
364 save_item(NAME(m_gfxbank[0]));
365 save_item(NAME(m_gfxbank[1]));
366 }
367
368 /******************************************************************************
369
370 Display refresh
371
372 ******************************************************************************/
373
screen_update_left(screen_device & screen,bitmap_ind16 & bitmap,const rectangle & cliprect)374 uint32_t fromanc2_state::screen_update_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
375 {
376 int i;
377
378 for (i = 0; i < 4; i++)
379 {
380 if (m_tilemap[0][i])
381 {
382 m_tilemap[0][i]->set_scrollx(0, -m_scrollx[0][i]);
383 m_tilemap[0][i]->set_scrolly(0, -m_scrolly[0][i]);
384 m_tilemap[0][i]->draw(screen, bitmap, cliprect, 0, 0);
385 }
386 }
387
388 return 0;
389 }
390
screen_update_right(screen_device & screen,bitmap_ind16 & bitmap,const rectangle & cliprect)391 uint32_t fromanc2_state::screen_update_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
392 {
393 int i;
394
395 for (i = 0; i < 4; i++)
396 {
397 if (m_tilemap[1][i])
398 {
399 m_tilemap[1][i]->set_scrollx(0, -m_scrollx[1][i]);
400 m_tilemap[1][i]->set_scrolly(0, -m_scrolly[1][i]);
401 m_tilemap[1][i]->draw(screen, bitmap, cliprect, 0, 0);
402 }
403 }
404
405 return 0;
406 }
407