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
|
/***************************************************************************
Bashkiria-2M video driver by Miodrag Milanovic
28/03/2008 Preliminary driver.
****************************************************************************/
#include "emu.h"
#include "includes/b2m.h"
#include "machine/ram.h"
VIDEO_START( b2m )
{
}
SCREEN_UPDATE_IND16( b2m )
{
b2m_state *state = screen.machine().driver_data<b2m_state>();
UINT8 code1;
UINT8 code2;
UINT8 col;
int y, x, b;
UINT8 *ram = screen.machine().device<ram_device>(RAM_TAG)->pointer();
for (x = 0; x < 48; x++)
{
for (y = 0; y < 256; y++)
{
if (state->m_b2m_video_page==0) {
code1 = ram[0x11000 + x*256 + ((y + state->m_b2m_video_scroll) & 0xff)];
code2 = ram[0x15000 + x*256 + ((y + state->m_b2m_video_scroll) & 0xff)];
} else {
code1 = ram[0x19000 + x*256 + ((y + state->m_b2m_video_scroll) & 0xff)];
code2 = ram[0x1d000 + x*256 + ((y + state->m_b2m_video_scroll) & 0xff)];
}
for (b = 7; b >= 0; b--)
{
col = (((code2 >> b) & 0x01)<<1) + ((code1 >> b) & 0x01);
bitmap.pix16(y, x*8+b) = col;
}
}
}
return 0;
}
static const rgb_t b2m_palette[4] = {
MAKE_RGB(0x00, 0x00, 0x00), // 0
MAKE_RGB(0x00, 0x00, 0x00), // 1
MAKE_RGB(0x00, 0x00, 0x00), // 2
MAKE_RGB(0x00, 0x00, 0x00), // 3
};
PALETTE_INIT( b2m )
{
palette_set_colors(machine, 0, b2m_palette, ARRAY_LENGTH(b2m_palette));
}
|