summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/lucky74.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/lucky74.c')
-rw-r--r--src/mame/video/lucky74.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/mame/video/lucky74.c b/src/mame/video/lucky74.c
index fc012d5dcde..a104cafcd2e 100644
--- a/src/mame/video/lucky74.c
+++ b/src/mame/video/lucky74.c
@@ -123,13 +123,13 @@ WRITE8_MEMBER(lucky74_state::lucky74_bg_colorram_w)
}
-PALETTE_INIT( lucky74 )
+void lucky74_state::palette_init()
/*
There are 2 states (see the technical notes).
We're constructing a double-sized palette with one half for each state.
*/
{
- const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
+ const UINT8 *color_prom = machine().root_device().memregion("proms")->base();
int i;
static const int resistances_rgb[4] = { 2000, 1000, 470, 220 };
double weights_r[4], weights_g[4], weights_b[4];
@@ -144,42 +144,42 @@ PALETTE_INIT( lucky74 )
{
int bit0, bit1, bit2, bit3, r1, g1, b1, r2, g2, b2;
- /* red component (state 1, PROM E6) */
+ /* red component (this 1, PROM E6) */
bit0 = (color_prom[0x000 + i] >> 0) & 0x01;
bit1 = (color_prom[0x000 + i] >> 1) & 0x01;
bit2 = (color_prom[0x000 + i] >> 2) & 0x01;
bit3 = (color_prom[0x000 + i] >> 3) & 0x01;
r1 = combine_4_weights(weights_r, bit0, bit1, bit2, bit3);
- /* red component (state 2, PROM E7) */
+ /* red component (this 2, PROM E7) */
bit0 = (color_prom[0x100 + i] >> 0) & 0x01;
bit1 = (color_prom[0x100 + i] >> 1) & 0x01;
bit2 = (color_prom[0x100 + i] >> 2) & 0x01;
bit3 = (color_prom[0x100 + i] >> 3) & 0x01;
r2 = combine_4_weights(weights_r, bit0, bit1, bit2, bit3);
- /* green component (state 1, PROM D6) */
+ /* green component (this 1, PROM D6) */
bit0 = (color_prom[0x200 + i] >> 0) & 0x01;
bit1 = (color_prom[0x200 + i] >> 1) & 0x01;
bit2 = (color_prom[0x200 + i] >> 2) & 0x01;
bit3 = (color_prom[0x200 + i] >> 3) & 0x01;
g1 = combine_4_weights(weights_g, bit0, bit1, bit2, bit3);
- /* green component (state 2, PROM D7) */
+ /* green component (this 2, PROM D7) */
bit0 = (color_prom[0x300 + i] >> 0) & 0x01;
bit1 = (color_prom[0x300 + i] >> 1) & 0x01;
bit2 = (color_prom[0x300 + i] >> 2) & 0x01;
bit3 = (color_prom[0x300 + i] >> 3) & 0x01;
g2 = combine_4_weights(weights_g, bit0, bit1, bit2, bit3);
- /* blue component (state 1, PROM C6) */
+ /* blue component (this 1, PROM C6) */
bit0 = (color_prom[0x400 + i] >> 0) & 0x01;
bit1 = (color_prom[0x400 + i] >> 1) & 0x01;
bit2 = (color_prom[0x400 + i] >> 2) & 0x01;
bit3 = (color_prom[0x400 + i] >> 3) & 0x01;
b1 = combine_4_weights(weights_b, bit0, bit1, bit2, bit3);
- /* blue component (state 2, PROM C7) */
+ /* blue component (this 2, PROM C7) */
bit0 = (color_prom[0x500 + i] >> 0) & 0x01;
bit1 = (color_prom[0x500 + i] >> 1) & 0x01;
bit2 = (color_prom[0x500 + i] >> 2) & 0x01;
@@ -188,10 +188,10 @@ PALETTE_INIT( lucky74 )
/* PROMs circuitry, 1st state */
- palette_set_color(machine, i, MAKE_RGB(r1, g1, b1));
+ palette_set_color(machine(), i, MAKE_RGB(r1, g1, b1));
/* PROMs circuitry, 2nd state */
- palette_set_color(machine, i + 256, MAKE_RGB(r2, g2, b2));
+ palette_set_color(machine(), i + 256, MAKE_RGB(r2, g2, b2));
}
}
@@ -227,13 +227,12 @@ TILE_GET_INFO_MEMBER(lucky74_state::get_bg_tile_info)
}
-VIDEO_START( lucky74 )
+void lucky74_state::video_start()
{
- lucky74_state *state = machine.driver_data<lucky74_state>();
- state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(lucky74_state::get_bg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- state->m_fg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(lucky74_state::get_fg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(lucky74_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_fg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(lucky74_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- state->m_fg_tilemap->set_transparent_pen(0);
+ m_fg_tilemap->set_transparent_pen(0);
}
SCREEN_UPDATE_IND16( lucky74 )