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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
// license:BSD-3-Clause
// copyright-holders:Yochizo, Takahiro Nogi
/***************************************************************************
Functions to emulate the video hardware of the machine.
***************************************************************************/
#include "emu.h"
#include "includes/srmp2.h"
void srmp2_state::srmp2_palette(palette_device &palette) const
{
uint8_t const *const color_prom = memregion("proms")->base();
for (int i = 0; i < palette.entries(); i++)
{
int const col = (color_prom[i] << 8) + color_prom[i + palette.entries()];
palette.set_pen_color(i ^ 0x0f, pal5bit(col >> 10), pal5bit(col >> 5), pal5bit(col >> 0));
}
}
void srmp2_state::srmp3_palette(palette_device &palette) const
{
uint8_t const *const color_prom = memregion("proms")->base();
for (int i = 0; i < palette.entries(); i++)
{
int const col = (color_prom[i] << 8) + color_prom[i + palette.entries()];
palette.set_pen_color(i,pal5bit(col >> 10), pal5bit(col >> 5), pal5bit(col >> 0));
}
}
SETA001_SPRITE_GFXBANK_CB_MEMBER(srmp2_state::srmp3_gfxbank_callback)
{
return (code & 0x3fff) + ((code & 0x2000) ? (m_gfx_bank<<13) : 0);
}
uint32_t srmp2_state::screen_update_srmp2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
bitmap.fill(0x1ff, cliprect);
m_seta001->set_transpen(15);
m_seta001->set_colorbase(m_color_bank<<5);
m_seta001->set_fg_xoffsets( 0x10, 0x10 );
m_seta001->set_fg_yoffsets( 0x05, 0x07 );
m_seta001->set_bg_xoffsets( 0x00, 0x00 ); // bg not used?
m_seta001->set_bg_yoffsets( 0x00, 0x00 ); // bg not used?
m_seta001->draw_sprites(screen,bitmap,cliprect,0x1000);
return 0;
}
uint32_t srmp2_state::screen_update_srmp3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
bitmap.fill(0x1f0, cliprect);
m_seta001->set_fg_xoffsets( 0x10, 0x10 );
m_seta001->set_fg_yoffsets( 0x06, 0x06 );
m_seta001->set_bg_xoffsets( -0x01, 0x10 );
m_seta001->set_bg_yoffsets( -0x06, 0x06 );
m_seta001->draw_sprites(screen,bitmap,cliprect,0x1000);
return 0;
}
uint32_t srmp2_state::screen_update_mjyuugi(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
bitmap.fill(0x1f0, cliprect);
m_seta001->set_fg_xoffsets( 0x10, 0x10 );
m_seta001->set_fg_yoffsets( 0x06, 0x06 );
m_seta001->set_bg_yoffsets( 0x09, 0x07 );
m_seta001->set_spritelimit( 0x1ff-6 );
m_seta001->draw_sprites(screen,bitmap,cliprect,0x1000);
return 0;
}
|