Previous 199869 Revisions Next

r17676 Thursday 6th September, 2012 at 14:03:42 UTC by Miodrag Milanović
tc009xlvc modernized tilemap (no whatsnew)
[src/emu/machine]tc009xlvc.c tc009xlvc.h

trunk/src/emu/machine/tc009xlvc.c
r17675r17676
181181{
182182}
183183
184static TILE_GET_INFO_DEVICE( get_bg0_tile_info )
184TILE_GET_INFO_MEMBER(tc0091lvc_device::get_bg0_tile_info)
185185{
186   tc0091lvc_device *vdp = (tc0091lvc_device*)device;
187   int attr = vdp->m_vram0[2 * tile_index + 1];
188   int code = vdp->m_vram0[2 * tile_index]
186   int attr = m_vram0[2 * tile_index + 1];
187   int code = m_vram0[2 * tile_index]
189188         | ((attr & 0x03) << 8)
190         | ((vdp->m_vregs[(attr & 0xc) >> 2]) << 10);
189         | ((m_vregs[(attr & 0xc) >> 2]) << 10);
191190//          | (state->m_horshoes_gfxbank << 12);
192191
193   SET_TILE_INFO_DEVICE(
192   SET_TILE_INFO_MEMBER(
194193         0,
195194         code,
196195         (attr & 0xf0) >> 4,
197196         0);
198197}
199198
200static TILE_GET_INFO_DEVICE( get_bg1_tile_info )
199TILE_GET_INFO_MEMBER(tc0091lvc_device::get_bg1_tile_info)
201200{
202   tc0091lvc_device *vdp = (tc0091lvc_device*)device;
203   int attr = vdp->m_vram1[2 * tile_index + 1];
204   int code = vdp->m_vram1[2 * tile_index]
201   int attr = m_vram1[2 * tile_index + 1];
202   int code = m_vram1[2 * tile_index]
205203         | ((attr & 0x03) << 8)
206         | ((vdp->m_vregs[(attr & 0xc) >> 2]) << 10);
204         | ((m_vregs[(attr & 0xc) >> 2]) << 10);
207205//          | (state->m_horshoes_gfxbank << 12);
208206
209   SET_TILE_INFO_DEVICE(
207   SET_TILE_INFO_MEMBER(
210208         0,
211209         code,
212210         (attr & 0xf0) >> 4,
213211         0);
214212}
215213
216static TILE_GET_INFO_DEVICE( get_tx_tile_info )
214TILE_GET_INFO_MEMBER(tc0091lvc_device::get_tx_tile_info)
217215{
218   tc0091lvc_device *vdp = (tc0091lvc_device*)device;
219   int attr = vdp->m_tvram[2 * tile_index + 1];
220   UINT16 code = vdp->m_tvram[2 * tile_index]
216   int attr = m_tvram[2 * tile_index + 1];
217   UINT16 code = m_tvram[2 * tile_index]
221218         | ((attr & 0x07) << 8);
222219
223   SET_TILE_INFO_DEVICE(
224         vdp->m_gfx_index,
220   SET_TILE_INFO_MEMBER(
221         m_gfx_index,
225222         code,
226223         (attr & 0xf0) >> 4,
227224         0);
r17675r17676
258255   m_sprram = m_pcg_ram + 0xb000;
259256   m_sprram_buffer = auto_alloc_array_clear(machine(), UINT8, 0x400);
260257
261   tx_tilemap = tilemap_create_device(this, get_tx_tile_info,TILEMAP_SCAN_ROWS,8,8,64,32);
262   bg0_tilemap = tilemap_create_device(this, get_bg0_tile_info,TILEMAP_SCAN_ROWS,8,8,64,32);
263   bg1_tilemap = tilemap_create_device(this, get_bg1_tile_info,TILEMAP_SCAN_ROWS,8,8,64,32);
258   tx_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0091lvc_device::get_tx_tile_info),this),TILEMAP_SCAN_ROWS,8,8,64,32);
259   bg0_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0091lvc_device::get_bg0_tile_info),this),TILEMAP_SCAN_ROWS,8,8,64,32);
260   bg1_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0091lvc_device::get_bg1_tile_info),this),TILEMAP_SCAN_ROWS,8,8,64,32);
264261
265262   tx_tilemap->set_transparent_pen(0);
266263   bg0_tilemap->set_transparent_pen(0);
trunk/src/emu/machine/tc009xlvc.h
r17675r17676
4040   DECLARE_WRITE8_MEMBER( tc0091lvc_bg0_scroll_w );
4141   DECLARE_WRITE8_MEMBER( tc0091lvc_bg1_scroll_w );
4242
43   TILE_GET_INFO_MEMBER(get_bg0_tile_info);
44   TILE_GET_INFO_MEMBER(get_bg1_tile_info);
45   TILE_GET_INFO_MEMBER(get_tx_tile_info);
46
4347   UINT8 *m_palette_ram;
4448   UINT8 *m_vregs;
4549   UINT8 *m_bitmap_ram;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team