1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
/******************************************************************************
GAME-A-TRON gambling hardware
-----------------------------
*** Video Hardware ***
Written by Roberto Fresca.
Games running on this hardware:
* Poker 4-1, 1983, Game-A-Tron.
* Pull Tabs, 1983, Game-A-Tron.
*******************************************************************************/
#include "emu.h"
#include "includes/gatron.h"
WRITE8_HANDLER( gat_videoram_w )
{
gatron_state *state = space->machine().driver_data<gatron_state>();
UINT8 *videoram = state->m_videoram;
videoram[offset] = data;
tilemap_mark_tile_dirty(state->m_bg_tilemap, offset);
}
static TILE_GET_INFO( get_bg_tile_info )
{
gatron_state *state = machine.driver_data<gatron_state>();
UINT8 *videoram = state->m_videoram;
/* - bits -
7654 3210
xxxx xxxx tiles code.
only one color code
*/
int code = videoram[tile_index];
SET_TILE_INFO(0, code, 0, 0);
}
VIDEO_START( gat )
{
gatron_state *state = machine.driver_data<gatron_state>();
state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_cols, 8, 16, 48, 16);
}
SCREEN_UPDATE( gat )
{
gatron_state *state = screen->machine().driver_data<gatron_state>();
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
return 0;
}
PALETTE_INIT( gat )
{
}
|