/* video/stlforce.c - see main driver for other notes */ #include "driver.h" static tilemap *stlforce_bg_tilemap, *stlforce_mlow_tilemap, *stlforce_mhigh_tilemap, *stlforce_tx_tilemap; extern UINT16 *stlforce_bg_videoram, *stlforce_mlow_videoram, *stlforce_mhigh_videoram, *stlforce_tx_videoram; extern UINT16 *stlforce_bg_scrollram, *stlforce_mlow_scrollram, *stlforce_mhigh_scrollram, *stlforce_vidattrram; extern UINT16 *stlforce_spriteram; int stlforce_sprxoffs; /* background, appears to be the bottom layer */ static TILE_GET_INFO( get_stlforce_bg_tile_info ) { int tileno,colour; tileno = stlforce_bg_videoram[tile_index] & 0x0fff; colour = stlforce_bg_videoram[tile_index] & 0xe000; colour = colour >> 13; SET_TILE_INFO(0,tileno,colour,0); } WRITE16_HANDLER( stlforce_bg_videoram_w ) { stlforce_bg_videoram[offset] = data; tilemap_mark_tile_dirty(stlforce_bg_tilemap,offset); } /* middle layer, low */ static TILE_GET_INFO( get_stlforce_mlow_tile_info ) { int tileno,colour; tileno = stlforce_mlow_videoram[tile_index] & 0x0fff; colour = stlforce_mlow_videoram[tile_index] & 0xe000; colour = colour >> 13; colour += 8; tileno += 0x1000; SET_TILE_INFO(0,tileno,colour,0); } WRITE16_HANDLER( stlforce_mlow_videoram_w ) { stlforce_mlow_videoram[offset] = data; tilemap_mark_tile_dirty(stlforce_mlow_tilemap,offset); } /* middle layer, high */ static TILE_GET_INFO( get_stlforce_mhigh_tile_info ) { int tileno,colour; tileno = stlforce_mhigh_videoram[tile_index] & 0x0fff; colour = stlforce_mhigh_videoram[tile_index] & 0xe000; colour = colour >> 13; colour += 16; tileno += 0x2000; SET_TILE_INFO(0,tileno,colour,0); } WRITE16_HANDLER( stlforce_mhigh_videoram_w ) { stlforce_mhigh_videoram[offset] = data; tilemap_mark_tile_dirty(stlforce_mhigh_tilemap,offset); } /* text layer, appears to be the top layer */ static TILE_GET_INFO( get_stlforce_tx_tile_info ) { int tileno,colour; tileno = stlforce_tx_videoram[tile_index] & 0x0fff; colour = stlforce_tx_videoram[tile_index] & 0xe000; colour = colour >> 13; tileno += 0xc000; colour += 24; SET_TILE_INFO(1,tileno,colour,0); } WRITE16_HANDLER( stlforce_tx_videoram_w ) { stlforce_tx_videoram[offset] = data; tilemap_mark_tile_dirty(stlforce_tx_tilemap,offset); } /* sprites - quite a bit still needs doing .. */ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ) { const UINT16 *source = stlforce_spriteram+0x0; const UINT16 *finish = stlforce_spriteram+0x800; const gfx_element *gfx = machine->gfx[2]; int ypos, xpos, attr, num; while( source