summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/video
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2012-09-13 11:15:32 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2012-09-13 11:15:32 +0000
commit219e664785890f52079bae7e74543920d638796a (patch)
tree774d1ab1e7d87ae4d2c1ef335dcef24a28a7d7e8 /src/mess/video
parentaf9a5e817d3eefdda79e801056b29167ecbcdef9 (diff)
Massive change, MACHINE_START\RESET, VIDEO_START\RESET and PALETTE_INIT changed to be members of state classes (no whatsnew)
Diffstat (limited to 'src/mess/video')
-rw-r--r--src/mess/video/a7800.c41
-rw-r--r--src/mess/video/ac1.c2
-rw-r--r--src/mess/video/advision.c4
-rw-r--r--src/mess/video/apple1.c11
-rw-r--r--src/mess/video/apple2.c26
-rw-r--r--src/mess/video/apple2gs.c11
-rw-r--r--src/mess/video/apple3.c11
-rw-r--r--src/mess/video/aquarius.c13
-rw-r--r--src/mess/video/arcadia.c29
-rw-r--r--src/mess/video/avigo.c6
-rw-r--r--src/mess/video/b2m.c6
-rw-r--r--src/mess/video/bbc.c16
-rw-r--r--src/mess/video/bk.c2
-rw-r--r--src/mess/video/busicom.c10
-rw-r--r--src/mess/video/cbmb.c10
-rw-r--r--src/mess/video/cgenie.c9
-rw-r--r--src/mess/video/channelf.c9
-rw-r--r--src/mess/video/comquest.c2
-rw-r--r--src/mess/video/dai.c6
-rw-r--r--src/mess/video/electron.c11
-rw-r--r--src/mess/video/epnick.c15
-rw-r--r--src/mess/video/fm7.c36
-rw-r--r--src/mess/video/galaxy.c11
-rw-r--r--src/mess/video/galeb.c2
-rw-r--r--src/mess/video/gamecom.c9
-rw-r--r--src/mess/video/gb.c50
-rw-r--r--src/mess/video/hec2video.c4
-rw-r--r--src/mess/video/hp48.c4
-rw-r--r--src/mess/video/intv.c37
-rw-r--r--src/mess/video/irisha.c2
-rw-r--r--src/mess/video/kaypro.c13
-rw-r--r--src/mess/video/kc.c4
-rw-r--r--src/mess/video/kramermc.c2
-rw-r--r--src/mess/video/kyocera.c10
-rw-r--r--src/mess/video/llc.c5
-rw-r--r--src/mess/video/lviv.c6
-rw-r--r--src/mess/video/mac.c168
-rw-r--r--src/mess/video/mbc55x.c14
-rw-r--r--src/mess/video/mbee.c55
-rw-r--r--src/mess/video/mc80.c7
-rw-r--r--src/mess/video/microtan.c11
-rw-r--r--src/mess/video/mikro80.c2
-rw-r--r--src/mess/video/mikromik.c10
-rw-r--r--src/mess/video/mz700.c15
-rw-r--r--src/mess/video/mz80.c5
-rw-r--r--src/mess/video/nc.c6
-rw-r--r--src/mess/video/nes.c12
-rw-r--r--src/mess/video/odyssey2.c51
-rw-r--r--src/mess/video/ondra.c5
-rw-r--r--src/mess/video/orao.c3
-rw-r--r--src/mess/video/oric.c27
-rw-r--r--src/mess/video/orion.c6
-rw-r--r--src/mess/video/p2000m.c5
-rw-r--r--src/mess/video/pc8401a.c10
-rw-r--r--src/mess/video/pcw.c11
-rw-r--r--src/mess/video/pcw16.c6
-rw-r--r--src/mess/video/pdp1.c15
-rw-r--r--src/mess/video/pecom.c13
-rw-r--r--src/mess/video/pk8020.c6
-rw-r--r--src/mess/video/pmd85.c6
-rw-r--r--src/mess/video/poly88.c5
-rw-r--r--src/mess/video/pp01.c6
-rw-r--r--src/mess/video/radio86.c4
-rw-r--r--src/mess/video/rmnimbus.c20
-rw-r--r--src/mess/video/sapi1.c7
-rw-r--r--src/mess/video/special.c21
-rw-r--r--src/mess/video/spectrum.c36
-rw-r--r--src/mess/video/ssystem3.c9
-rw-r--r--src/mess/video/super80.c20
-rw-r--r--src/mess/video/ti85.c49
-rw-r--r--src/mess/video/timex.c7
-rw-r--r--src/mess/video/trs80.c13
-rw-r--r--src/mess/video/tx0.c15
-rw-r--r--src/mess/video/ut88.c2
-rw-r--r--src/mess/video/vc4000.c49
-rw-r--r--src/mess/video/vector06.c6
-rw-r--r--src/mess/video/vtech2.c2
-rw-r--r--src/mess/video/x68k.c33
-rw-r--r--src/mess/video/z88.c8
-rw-r--r--src/mess/video/zx.c9
80 files changed, 583 insertions, 652 deletions
diff --git a/src/mess/video/a7800.c b/src/mess/video/a7800.c
index 6a780b79f9f..e78c5265918 100644
--- a/src/mess/video/a7800.c
+++ b/src/mess/video/a7800.c
@@ -48,34 +48,33 @@
Start the video hardware emulation.
***************************************************************************/
-VIDEO_START( a7800 )
+void a7800_state::video_start()
{
- a7800_state *state = machine.driver_data<a7800_state>();
int i;
for(i=0; i<8; i++)
{
- state->m_maria_palette[i][0]=0;
- state->m_maria_palette[i][1]=0;
- state->m_maria_palette[i][2]=0;
- state->m_maria_palette[i][3]=0;
+ m_maria_palette[i][0]=0;
+ m_maria_palette[i][1]=0;
+ m_maria_palette[i][2]=0;
+ m_maria_palette[i][3]=0;
}
- state->m_maria_write_mode=0;
- state->m_maria_scanline=0;
- state->m_maria_dmaon=0;
- state->m_maria_vblank=0x80;
- state->m_maria_dll=0;
- state->m_maria_dodma=0;
- state->m_maria_wsync=0;
-
- state->m_maria_color_kill = 0;
- state->m_maria_cwidth = 0;
- state->m_maria_bcntl = 0;
- state->m_maria_kangaroo = 0;
- state->m_maria_rm = 0;
-
- machine.primary_screen->register_screen_bitmap(state->m_bitmap);
+ m_maria_write_mode=0;
+ m_maria_scanline=0;
+ m_maria_dmaon=0;
+ m_maria_vblank=0x80;
+ m_maria_dll=0;
+ m_maria_dodma=0;
+ m_maria_wsync=0;
+
+ m_maria_color_kill = 0;
+ m_maria_cwidth = 0;
+ m_maria_bcntl = 0;
+ m_maria_kangaroo = 0;
+ m_maria_rm = 0;
+
+ machine().primary_screen->register_screen_bitmap(m_bitmap);
}
/***************************************************************************
diff --git a/src/mess/video/ac1.c b/src/mess/video/ac1.c
index 5dbda02b6b6..a9566b833ee 100644
--- a/src/mess/video/ac1.c
+++ b/src/mess/video/ac1.c
@@ -22,7 +22,7 @@ const gfx_layout ac1_charlayout =
8*8 /* size of one char */
};
-VIDEO_START( ac1 )
+void ac1_state::video_start()
{
}
diff --git a/src/mess/video/advision.c b/src/mess/video/advision.c
index 597d30c55cd..22adc2708e7 100644
--- a/src/mess/video/advision.c
+++ b/src/mess/video/advision.c
@@ -31,14 +31,14 @@ void advision_state::video_start()
***************************************************************************/
-PALETTE_INIT( advision )
+void advision_state::palette_init()
{
int i;
for( i = 0; i < 8; i++ )
{
/* 8 shades of RED */
- palette_set_color_rgb(machine, i, i * 0x22, 0x00, 0x00);
+ palette_set_color_rgb(machine(), i, i * 0x22, 0x00, 0x00);
}
}
diff --git a/src/mess/video/apple1.c b/src/mess/video/apple1.c
index c772c3bbc7d..f0d0243e594 100644
--- a/src/mess/video/apple1.c
+++ b/src/mess/video/apple1.c
@@ -228,19 +228,18 @@ static int apple1_getcursorcode(int original_code)
/**************************************************************************/
-VIDEO_START( apple1 )
+void apple1_state::video_start()
{
- apple1_state *state = machine.driver_data<apple1_state>();
- state->m_blink_on = 1; /* cursor is visible initially */
- state->m_terminal = terminal_create(
- machine,
+ m_blink_on = 1; /* cursor is visible initially */
+ m_terminal = terminal_create(
+ machine(),
0, /* graphics font 0 (the only one we have) */
32, /* Blank character is symbol 32 in the ROM */
8, /* use 8 bits for the character code */
apple1_getcursorcode,
40, 24); /* 40 columns, 24 rows */
- terminal_setcursor(state->m_terminal, 0, 0);
+ terminal_setcursor(m_terminal, 0, 0);
}
/* This function handles all writes to the video display. */
diff --git a/src/mess/video/apple2.c b/src/mess/video/apple2.c
index 45cf30ac2b6..b7f89132d65 100644
--- a/src/mess/video/apple2.c
+++ b/src/mess/video/apple2.c
@@ -442,35 +442,33 @@ void apple2_video_start(running_machine &machine, const UINT8 *vram, size_t vram
-VIDEO_START( apple2 )
+VIDEO_START_MEMBER(apple2_state,apple2)
{
- apple2_state *state = machine.driver_data<apple2_state>();
- apple2_video_start(machine, machine.device<ram_device>(RAM_TAG)->pointer(), machine.device<ram_device>(RAM_TAG)->size(), VAR_80COL | VAR_ALTCHARSET | VAR_DHIRES, 4);
+ apple2_video_start(machine(), machine().device<ram_device>(RAM_TAG)->pointer(), machine().device<ram_device>(RAM_TAG)->size(), VAR_80COL | VAR_ALTCHARSET | VAR_DHIRES, 4);
/* hack to fix the colors on apple2/apple2p */
- state->m_fgcolor = 0;
- state->m_bgcolor = 15;
+ m_fgcolor = 0;
+ m_bgcolor = 15;
- state->m_monochrome_dhr = false;
+ m_monochrome_dhr = false;
}
-VIDEO_START( apple2p )
+VIDEO_START_MEMBER(apple2_state,apple2p)
{
- apple2_state *state = machine.driver_data<apple2_state>();
- apple2_video_start(machine, machine.device<ram_device>(RAM_TAG)->pointer(), machine.device<ram_device>(RAM_TAG)->size(), VAR_80COL | VAR_ALTCHARSET | VAR_DHIRES, 8);
+ apple2_video_start(machine(), machine().device<ram_device>(RAM_TAG)->pointer(), machine().device<ram_device>(RAM_TAG)->size(), VAR_80COL | VAR_ALTCHARSET | VAR_DHIRES, 8);
/* hack to fix the colors on apple2/apple2p */
- state->m_fgcolor = 0;
- state->m_bgcolor = 15;
+ m_fgcolor = 0;
+ m_bgcolor = 15;
- state->m_monochrome_dhr = false;
+ m_monochrome_dhr = false;
}
-VIDEO_START( apple2e )
+VIDEO_START_MEMBER(apple2_state,apple2e)
{
- apple2_video_start(machine, machine.device<ram_device>(RAM_TAG)->pointer(), machine.device<ram_device>(RAM_TAG)->size(), 0, 8);
+ apple2_video_start(machine(), machine().device<ram_device>(RAM_TAG)->pointer(), machine().device<ram_device>(RAM_TAG)->size(), 0, 8);
}
diff --git a/src/mess/video/apple2gs.c b/src/mess/video/apple2gs.c
index d261a4561ab..cf8e684ca50 100644
--- a/src/mess/video/apple2gs.c
+++ b/src/mess/video/apple2gs.c
@@ -13,14 +13,13 @@
-VIDEO_START( apple2gs )
+VIDEO_START_MEMBER(apple2gs_state,apple2gs)
{
- apple2gs_state *state = machine.driver_data<apple2gs_state>();
- state->m_bordercolor = 0;
- apple2_video_start(machine, state->m_slowmem, 0x20000, 0, 8);
- state->m_legacy_gfx = auto_bitmap_ind16_alloc(machine, 560, 192);
+ m_bordercolor = 0;
+ apple2_video_start(machine(), m_slowmem, 0x20000, 0, 8);
+ m_legacy_gfx = auto_bitmap_ind16_alloc(machine(), 560, 192);
- state_save_register_item(machine, "BORDERCLR", NULL, 0, state->m_bordercolor);
+ state_save_register_item(machine(), "BORDERCLR", NULL, 0, m_bordercolor);
}
diff --git a/src/mess/video/apple3.c b/src/mess/video/apple3.c
index 130dbb51ded..cfcea2b8c7b 100644
--- a/src/mess/video/apple3.c
+++ b/src/mess/video/apple3.c
@@ -65,22 +65,21 @@ void apple3_write_charmem(running_machine &machine)
-VIDEO_START( apple3 )
+VIDEO_START_MEMBER(apple3_state,apple3)
{
- apple3_state *state = machine.driver_data<apple3_state>();
int i, j;
UINT32 v;
- state->m_char_mem = auto_alloc_array(machine, UINT8, 0x800);
- memset(state->m_char_mem, 0, 0x800);
+ m_char_mem = auto_alloc_array(machine(), UINT8, 0x800);
+ memset(m_char_mem, 0, 0x800);
- state->m_hgr_map = auto_alloc_array(machine, UINT32, 192);
+ m_hgr_map = auto_alloc_array(machine(), UINT32, 192);
for (i = 0; i < 24; i++)
{
v = text_map[i] - 0x0400;
for (j = 0; j < 8; j++)
{
- state->m_hgr_map[(i * 8) + j] = 0x2000 + v + (j * 0x400);
+ m_hgr_map[(i * 8) + j] = 0x2000 + v + (j * 0x400);
}
}
}
diff --git a/src/mess/video/aquarius.c b/src/mess/video/aquarius.c
index af5712d9c70..5999d1c4867 100644
--- a/src/mess/video/aquarius.c
+++ b/src/mess/video/aquarius.c
@@ -51,17 +51,17 @@ static const unsigned short aquarius_palette[] =
0,15, 1,15, 2,15, 3,15, 4,15, 5,15, 6,15, 7,15, 8,15, 9,15,10,15,11,15,12,15,13,15,14,15,15,15,
};
-PALETTE_INIT( aquarius )
+void aquarius_state::palette_init()
{
int i;
- machine.colortable = colortable_alloc(machine, 16);
+ machine().colortable = colortable_alloc(machine(), 16);
for (i = 0; i < 16; i++)
- colortable_palette_set_color(machine.colortable, i, aquarius_colors[i]);
+ colortable_palette_set_color(machine().colortable, i, aquarius_colors[i]);
for (i = 0; i < 512; i++)
- colortable_entry_set_value(machine.colortable, i, aquarius_palette[i]);
+ colortable_entry_set_value(machine().colortable, i, aquarius_palette[i]);
}
WRITE8_MEMBER(aquarius_state::aquarius_videoram_w)
@@ -88,10 +88,9 @@ TILE_GET_INFO_MEMBER(aquarius_state::aquarius_gettileinfo)
SET_TILE_INFO_MEMBER(bank, code, color, flags);
}
-VIDEO_START( aquarius )
+void aquarius_state::video_start()
{
- aquarius_state *state = machine.driver_data<aquarius_state>();
- state->m_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(aquarius_state::aquarius_gettileinfo),state), TILEMAP_SCAN_ROWS, 8, 8, 40, 25);
+ m_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(aquarius_state::aquarius_gettileinfo),this), TILEMAP_SCAN_ROWS, 8, 8, 40, 25);
}
SCREEN_UPDATE_IND16( aquarius )
diff --git a/src/mess/video/arcadia.c b/src/mess/video/arcadia.c
index 1d6ee322c13..d46866171bc 100644
--- a/src/mess/video/arcadia.c
+++ b/src/mess/video/arcadia.c
@@ -283,30 +283,29 @@ static const UINT8 chars[0x40][8]={
// 8x user defined
};
-VIDEO_START( arcadia )
+void arcadia_state::video_start()
{
- arcadia_state *state = machine.driver_data<arcadia_state>();
int i;
- memcpy(&state->m_chars, chars, sizeof(chars));
+ memcpy(&m_chars, chars, sizeof(chars));
for (i=0; i<0x40; i++)
{
- state->m_rectangle[i][0]=0;
- state->m_rectangle[i][4]=0;
- if (i&1) state->m_rectangle[i][0]|=3;
- if (i&2) state->m_rectangle[i][0]|=0x1c;
- if (i&4) state->m_rectangle[i][0]|=0xe0;
- if (i&8) state->m_rectangle[i][4]|=3;
- if (i&0x10) state->m_rectangle[i][4]|=0x1c;
- if (i&0x20) state->m_rectangle[i][4]|=0xe0;
- state->m_rectangle[i][1]=state->m_rectangle[i][2]=state->m_rectangle[i][3]=state->m_rectangle[i][0];
- state->m_rectangle[i][5]=state->m_rectangle[i][6]=state->m_rectangle[i][7]=state->m_rectangle[i][4];
+ m_rectangle[i][0]=0;
+ m_rectangle[i][4]=0;
+ if (i&1) m_rectangle[i][0]|=3;
+ if (i&2) m_rectangle[i][0]|=0x1c;
+ if (i&4) m_rectangle[i][0]|=0xe0;
+ if (i&8) m_rectangle[i][4]|=3;
+ if (i&0x10) m_rectangle[i][4]|=0x1c;
+ if (i&0x20) m_rectangle[i][4]|=0xe0;
+ m_rectangle[i][1]=m_rectangle[i][2]=m_rectangle[i][3]=m_rectangle[i][0];
+ m_rectangle[i][5]=m_rectangle[i][6]=m_rectangle[i][7]=m_rectangle[i][4];
}
{
- screen_device *screen = machine.first_screen();
+ screen_device *screen = machine().first_screen();
int width = screen->width();
int height = screen->height();
- state->m_bitmap = auto_bitmap_ind16_alloc(machine, width, height);
+ m_bitmap = auto_bitmap_ind16_alloc(machine(), width, height);
}
}
diff --git a/src/mess/video/avigo.c b/src/mess/video/avigo.c
index b2dbb7c0016..e1497ef3acb 100644
--- a/src/mess/video/avigo.c
+++ b/src/mess/video/avigo.c
@@ -76,10 +76,10 @@ void avigo_state::video_start()
}
/* Initialise the palette */
-PALETTE_INIT( avigo )
+void avigo_state::palette_init()
{
- palette_set_color(machine,0,MAKE_RGB(0xff,0xff,0xff)); /* white */
- palette_set_color(machine,1,MAKE_RGB(0x00,0x00,0x00)); /* black */
+ palette_set_color(machine(),0,MAKE_RGB(0xff,0xff,0xff)); /* white */
+ palette_set_color(machine(),1,MAKE_RGB(0x00,0x00,0x00)); /* black */
}
UINT32 avigo_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
diff --git a/src/mess/video/b2m.c b/src/mess/video/b2m.c
index 0eac9177bd4..11aa14e966d 100644
--- a/src/mess/video/b2m.c
+++ b/src/mess/video/b2m.c
@@ -11,7 +11,7 @@
#include "includes/b2m.h"
#include "machine/ram.h"
-VIDEO_START( b2m )
+void b2m_state::video_start()
{
}
@@ -53,7 +53,7 @@ static const rgb_t b2m_palette[4] = {
MAKE_RGB(0x00, 0x00, 0x00), // 3
};
-PALETTE_INIT( b2m )
+void b2m_state::palette_init()
{
- palette_set_colors(machine, 0, b2m_palette, ARRAY_LENGTH(b2m_palette));
+ palette_set_colors(machine(), 0, b2m_palette, ARRAY_LENGTH(b2m_palette));
}
diff --git a/src/mess/video/bbc.c b/src/mess/video/bbc.c
index 1e157562168..d9554e74fb2 100644
--- a/src/mess/video/bbc.c
+++ b/src/mess/video/bbc.c
@@ -367,24 +367,24 @@ static void common_init(running_machine &machine, int memorySize)
}
-VIDEO_START( bbca )
+VIDEO_START_MEMBER(bbc_state,bbca)
{
- common_init(machine,16);
+ common_init(machine(),16);
}
-VIDEO_START( bbcb )
+VIDEO_START_MEMBER(bbc_state,bbcb)
{
- common_init(machine,32);
+ common_init(machine(),32);
}
-VIDEO_START( bbcbp )
+VIDEO_START_MEMBER(bbc_state,bbcbp)
{
- common_init(machine,32);
+ common_init(machine(),32);
}
-VIDEO_START( bbcm )
+VIDEO_START_MEMBER(bbc_state,bbcm)
{
- common_init(machine,32);
+ common_init(machine(),32);
}
diff --git a/src/mess/video/bk.c b/src/mess/video/bk.c
index 4bcef82ada2..90a99053021 100644
--- a/src/mess/video/bk.c
+++ b/src/mess/video/bk.c
@@ -11,7 +11,7 @@
#include "includes/bk.h"
-VIDEO_START( bk0010 )
+void bk_state::video_start()
{
}
diff --git a/src/mess/video/busicom.c b/src/mess/video/busicom.c
index eb46431b559..1ad7c87d983 100644
--- a/src/mess/video/busicom.c
+++ b/src/mess/video/busicom.c
@@ -1812,7 +1812,7 @@ static const UINT8 printer_font[]= {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
-VIDEO_START( busicom )
+void busicom_state::video_start()
{
}
@@ -1846,14 +1846,14 @@ static const UINT8 color[] = { 0xFF,0xDB,0xB7,0x92,0x6E,0x49,0x25,0x00 };
static const UINT8 color_red[] = { 0xb0,0xb5,0xc0,0xc5,0xd0,0xd5,0xdf };
-PALETTE_INIT( busicom )
+void busicom_state::palette_init()
{
int i;
for(i=0;i<8;i++) {
- palette_set_color( machine, i, MAKE_RGB(color[i],color[i],color[i]) );
+ palette_set_color( machine(), i, MAKE_RGB(color[i],color[i],color[i]) );
}
- palette_set_color( machine, 8, MAKE_RGB(0xff,0xff,0xff) );
+ palette_set_color( machine(), 8, MAKE_RGB(0xff,0xff,0xff) );
for(i=0;i<7;i++) {
- palette_set_color( machine, i+9, MAKE_RGB(color_red[i],0x00,0x00) );
+ palette_set_color( machine(), i+9, MAKE_RGB(color_red[i],0x00,0x00) );
}
}
diff --git a/src/mess/video/cbmb.c b/src/mess/video/cbmb.c
index e1a91cb37b4..ccece9bcd56 100644
--- a/src/mess/video/cbmb.c
+++ b/src/mess/video/cbmb.c
@@ -10,7 +10,7 @@
-VIDEO_START( cbmb_crtc )
+VIDEO_START_MEMBER(cbmb_state,cbmb_crtc)
{
}
@@ -38,7 +38,7 @@ void cbm700_vh_init(running_machine &machine)
}
}
-VIDEO_START( cbm700 )
+VIDEO_START_MEMBER(cbmb_state,cbm700)
{
int i;
@@ -48,9 +48,9 @@ VIDEO_START( cbm700 )
// if( i < 176 || i > 223 )
{
int y;
- for( y = 0; y < machine.gfx[0]->height(); y++ ) {
- *const_cast<UINT8 *>(machine.gfx[0]->get_data(i) + y * machine.gfx[0]->rowbytes() + 8) = 0;
- *const_cast<UINT8 *>(machine.gfx[1]->get_data(i) + y * machine.gfx[1]->rowbytes() + 8) = 0;
+ for( y = 0; y < machine().gfx[0]->height(); y++ ) {
+ *const_cast<UINT8 *>(machine().gfx[0]->get_data(i) + y * machine().gfx[0]->rowbytes() + 8) = 0;
+ *const_cast<UINT8 *>(machine().gfx[1]->get_data(i) + y * machine().gfx[1]->rowbytes() + 8) = 0;
}
}
}
diff --git a/src/mess/video/cgenie.c b/src/mess/video/cgenie.c
index ba40c4f5cc3..689f00992bb 100644
--- a/src/mess/video/cgenie.c
+++ b/src/mess/video/cgenie.c
@@ -18,13 +18,12 @@
Start the video hardware emulation.
***************************************************************************/
-VIDEO_START( cgenie )
+void cgenie_state::video_start()
{
- cgenie_state *state = machine.driver_data<cgenie_state>();
- screen_device *screen = machine.first_screen();
+ screen_device *screen = machine().first_screen();
- screen->register_screen_bitmap(state->m_dlybitmap);
- screen->register_screen_bitmap(state->m_bitmap);
+ screen->register_screen_bitmap(m_dlybitmap);
+ screen->register_screen_bitmap(m_bitmap);
}
/***************************************************************************
diff --git a/src/mess/video/channelf.c b/src/mess/video/channelf.c
index 32ae62ffc2e..77ae2567158 100644
--- a/src/mess/video/channelf.c
+++ b/src/mess/video/channelf.c
@@ -29,15 +29,14 @@ static const UINT16 colormap[] = {
};
/* Initialise the palette */
-PALETTE_INIT( channelf )
+void channelf_state::palette_init()
{
- palette_set_colors(machine, 0, channelf_palette, ARRAY_LENGTH(channelf_palette));
+ palette_set_colors(machine(), 0, channelf_palette, ARRAY_LENGTH(channelf_palette));
}
-VIDEO_START( channelf )
+void channelf_state::video_start()
{
- channelf_state *state = machine.driver_data<channelf_state>();
- state->m_p_videoram = state->memregion("vram")->base();
+ m_p_videoram = memregion("vram")->base();
}
static int recalc_palette_offset(int reg1, int reg2)
diff --git a/src/mess/video/comquest.c b/src/mess/video/comquest.c
index be3daff283c..109b075fd69 100644
--- a/src/mess/video/comquest.c
+++ b/src/mess/video/comquest.c
@@ -2,7 +2,7 @@
#include "includes/comquest.h"
-VIDEO_START( comquest )
+void comquest_state::video_start()
{
}
diff --git a/src/mess/video/dai.c b/src/mess/video/dai.c
index 75868ac5224..895138ab858 100644
--- a/src/mess/video/dai.c
+++ b/src/mess/video/dai.c
@@ -40,18 +40,18 @@ const unsigned char dai_palette[16*3] =
};
-PALETTE_INIT( dai )
+void dai_state::palette_init()
{
int i;
for ( i = 0; i < sizeof(dai_palette) / 3; i++ )
{
- palette_set_color_rgb(machine, i, dai_palette[i * 3], dai_palette[i * 3 + 1], dai_palette[i * 3 + 2]);
+ palette_set_color_rgb(machine(), i, dai_palette[i * 3], dai_palette[i * 3 + 1], dai_palette[i * 3 + 2]);
}
}
-VIDEO_START( dai )
+void dai_state::video_start()
{
}
diff --git a/src/mess/video/electron.c b/src/mess/video/electron.c
index dfe58c69e03..dab1fe654c6 100644
--- a/src/mess/video/electron.c
+++ b/src/mess/video/electron.c
@@ -38,16 +38,15 @@ Mode changes are 'immediate', so any change in RAM access timing occurs exactly
static TIMER_CALLBACK( electron_scanline_interrupt );
-VIDEO_START( electron )
+void electron_state::video_start()
{
- electron_state *state = machine.driver_data<electron_state>();
int i;
for( i = 0; i < 256; i++ ) {
- state->m_map4[i] = ( ( i & 0x10 ) >> 3 ) | ( i & 0x01 );
- state->m_map16[i] = ( ( i & 0x40 ) >> 3 ) | ( ( i & 0x10 ) >> 2 ) | ( ( i & 0x04 ) >> 1 ) | ( i & 0x01 );
+ m_map4[i] = ( ( i & 0x10 ) >> 3 ) | ( i & 0x01 );
+ m_map16[i] = ( ( i & 0x40 ) >> 3 ) | ( ( i & 0x10 ) >> 2 ) | ( ( i & 0x04 ) >> 1 ) | ( i & 0x01 );
}
- state->m_scanline_timer = machine.scheduler().timer_alloc(FUNC(electron_scanline_interrupt));
- state->m_scanline_timer->adjust( machine.primary_screen->time_until_pos(0), 0, machine.primary_screen->scan_period() );
+ m_scanline_timer = machine().scheduler().timer_alloc(FUNC(electron_scanline_interrupt));
+ m_scanline_timer->adjust( machine().primary_screen->time_until_pos(0), 0, machine().primary_screen->scan_period() );
}
INLINE UINT8 read_vram( electron_state *state, UINT16 addr )
diff --git a/src/mess/video/epnick.c b/src/mess/video/epnick.c
index f5b6d7dca7d..eec9824b569 100644
--- a/src/mess/video/epnick.c
+++ b/src/mess/video/epnick.c
@@ -165,13 +165,13 @@ the NICK_GET_RED8, NICK_GET_GREEN8, NICK_GET_BLUE8 macros
return a 8-bit colour value for the index specified. */
/* initial the palette */
-PALETTE_INIT( epnick )
+void ep_state::palette_init()
{
int i;
for (i=0; i<256; i++)
{
- palette_set_color_rgb( machine, i, NICK_GET_RED8(i), NICK_GET_GREEN8(i), NICK_GET_BLUE8(i) );
+ palette_set_color_rgb( machine(), i, NICK_GET_RED8(i), NICK_GET_GREEN8(i), NICK_GET_BLUE8(i) );
}
}
@@ -1024,14 +1024,13 @@ static void Nick_DoScreen(NICK_STATE *nick, bitmap_ind16 &bm)
}
-VIDEO_START( epnick )
+void ep_state::video_start()
{
- ep_state *state = machine.driver_data<ep_state>();
- state->nick = auto_alloc_clear(machine, NICK_STATE);
+ nick = auto_alloc_clear(machine(), NICK_STATE);
- state->nick->videoram = machine.device<ram_device>(RAM_TAG)->pointer();
- Nick_Init(state->nick);
- machine.primary_screen->register_screen_bitmap(state->m_bitmap);
+ nick->videoram = machine().device<ram_device>(RAM_TAG)->pointer();
+ Nick_Init(nick);
+ machine().primary_screen->register_screen_bitmap(m_bitmap);
}
diff --git a/src/mess/video/fm7.c b/src/mess/video/fm7.c
index 3fa21ca656e..bad68be3a12 100644
--- a/src/mess/video/fm7.c
+++ b/src/mess/video/fm7.c
@@ -1494,22 +1494,21 @@ WRITE8_MEMBER(fm7_state::fm7_console_ram_banked_w)
RAM[0x1c000+offset] = data;
}
-VIDEO_START( fm7 )
+void fm7_state::video_start()
{
- fm7_state *state = machine.driver_data<fm7_state>();
- state->m_video.vram_access = 0;
- state->m_video.crt_enable = 0;
- state->m_video.vram_offset = 0x0000;
- state->m_video.vram_offset2 = 0x0000;
- state->m_video.sub_reset = 0;
- state->m_video.multi_page = 0;
- state->m_video.subrom = 0;
- state->m_video.cgrom = 0;
- state->m_video.fine_offset = 0;
- state->m_video.nmi_mask = 0;
- state->m_video.active_video_page = 0;
- state->m_video.display_video_page = 0;
- state->m_video.vsync_flag = 0;
+ m_video.vram_access = 0;
+ m_video.crt_enable = 0;
+ m_video.vram_offset = 0x0000;
+ m_video.vram_offset2 = 0x0000;
+ m_video.sub_reset = 0;
+ m_video.multi_page = 0;
+ m_video.subrom = 0;
+ m_video.cgrom = 0;
+ m_video.fine_offset = 0;
+ m_video.nmi_mask = 0;
+ m_video.active_video_page = 0;
+ m_video.display_video_page = 0;
+ m_video.vsync_flag = 0;
}
SCREEN_UPDATE_IND16( fm7 )
@@ -1601,13 +1600,12 @@ static const rgb_t fm7_initial_palette[8] = {
MAKE_RGB(0xff, 0xff, 0xff), // 7
};
-PALETTE_INIT( fm7 )
+void fm7_state::palette_init()
{
- fm7_state *state = machine.driver_data<fm7_state>();
int x;
- palette_set_colors(machine, 0, fm7_initial_palette, ARRAY_LENGTH(fm7_initial_palette));
+ palette_set_colors(machine(), 0, fm7_initial_palette, ARRAY_LENGTH(fm7_initial_palette));
for(x=0;x<8;x++)
- state->m_video.fm7_pal[x] = x;
+ m_video.fm7_pal[x] = x;
}
diff --git a/src/mess/video/galaxy.c b/src/mess/video/galaxy.c
index c62c3922d95..db652cecf24 100644
--- a/src/mess/video/galaxy.c
+++ b/src/mess/video/galaxy.c
@@ -110,15 +110,14 @@ void galaxy_set_timer(running_machine &machine)
state->m_gal_video_timer->adjust(attotime::zero, 0, attotime::from_hz(6144000 / 8));
}
-VIDEO_START( galaxy )
+void galaxy_state::video_start()
{
- galaxy_state *state = machine.driver_data<galaxy_state>();
- state->m_gal_cnt = 0;
+ m_gal_cnt = 0;
- state->m_gal_video_timer = machine.scheduler().timer_alloc(FUNC(gal_video));
- state->m_gal_video_timer->adjust(attotime::zero, 0, attotime::never);
+ m_gal_video_timer = machine().scheduler().timer_alloc(FUNC(gal_video));
+ m_gal_video_timer->adjust(attotime::zero, 0, attotime::never);
- machine.primary_screen->register_screen_bitmap(state->m_bitmap);
+ machine().primary_screen->register_screen_bitmap(m_bitmap);
}
SCREEN_UPDATE_IND16( galaxy )
diff --git a/src/mess/video/galeb.c b/src/mess/video/galeb.c
index a38fa53b2ae..697033d4f0b 100644
--- a/src/mess/video/galeb.c
+++ b/src/mess/video/galeb.c
@@ -23,7 +23,7 @@ const gfx_layout galeb_charlayout =
8*8 /* size of one char */
};
-VIDEO_START( galeb )
+void galeb_state::video_start()
{
}
diff --git a/src/mess/video/gamecom.c b/src/mess/video/gamecom.c
index ef903c07490..1f5420e7305 100644
--- a/src/mess/video/gamecom.c
+++ b/src/mess/video/gamecom.c
@@ -63,10 +63,9 @@ static TIMER_CALLBACK( gamecom_scanline )
state->m_scanline = ( state->m_scanline + 1 ) % Y_PIXELS;
}
-VIDEO_START( gamecom )
+void gamecom_state::video_start()
{
- gamecom_state *state = machine.driver_data<gamecom_state>();
- state->m_scanline_timer = machine.scheduler().timer_alloc(FUNC(gamecom_scanline));
- state->m_scanline_timer->adjust( machine.primary_screen->time_until_pos(0 ), 0, machine.primary_screen->scan_period() );
- machine.primary_screen->register_screen_bitmap(state->m_bitmap);
+ m_scanline_timer = machine().scheduler().timer_alloc(FUNC(gamecom_scanline));
+ m_scanline_timer->adjust( machine().primary_screen->time_until_pos(0 ), 0, machine().primary_screen->scan_period() );
+ machine().primary_screen->register_screen_bitmap(m_bitmap);
}
diff --git a/src/mess/video/gb.c b/src/mess/video/gb.c
index 5930af1dfef..dc036c7001d 100644
--- a/src/mess/video/gb.c
+++ b/src/mess/video/gb.c
@@ -77,27 +77,26 @@ static const unsigned char palette_megaduck[] = {
};
/* Initialise the palettes */
-PALETTE_INIT( gb )
+PALETTE_INIT_MEMBER(gb_state,gb)
{
int ii;
for( ii = 0; ii < 4; ii++)
{
- palette_set_color_rgb(machine, ii, palette[ii*3+0], palette[ii*3+1], palette[ii*3+2]);
+ palette_set_color_rgb(machine(), ii, palette[ii*3+0], palette[ii*3+1], palette[ii*3+2]);
}
}
-PALETTE_INIT( gbp )
+PALETTE_INIT_MEMBER(gb_state,gbp)
{
int ii;
for( ii = 0; ii < 4; ii++)
{
- palette_set_color_rgb(machine, ii, palette[(ii + 4)*3+0], palette[(ii + 4)*3+1], palette[(ii + 4)*3+2]);
+ palette_set_color_rgb(machine(), ii, palette[(ii + 4)*3+0], palette[(ii + 4)*3+1], palette[(ii + 4)*3+2]);
}
}
-PALETTE_INIT( sgb )
+PALETTE_INIT_MEMBER(gb_state,sgb)
{
- gb_state *state = machine.driver_data<gb_state>();
int ii, r, g, b;
for( ii = 0; ii < 32768; ii++ )
@@ -105,22 +104,21 @@ PALETTE_INIT( sgb )
r = (ii & 0x1F) << 3;
g = ((ii >> 5) & 0x1F) << 3;
b = ((ii >> 10) & 0x1F) << 3;
- palette_set_color_rgb(machine, ii, r, g, b );
+ palette_set_color_rgb(machine(), ii, r, g, b );
}
/* Some default colours for non-SGB games */
- state->m_sgb_pal[0] = 32767;
- state->m_sgb_pal[1] = 21140;
- state->m_sgb_pal[2] = 10570;
- state->m_sgb_pal[3] = 0;
+ m_sgb_pal[0] = 32767;
+ m_sgb_pal[1] = 21140;
+ m_sgb_pal[2] = 10570;
+ m_sgb_pal[3] = 0;
/* The rest of the colortable can be black */
for( ii = 4; ii < 8*16; ii++ )
- state->m_sgb_pal[ii] = 0;
+ m_sgb_pal[ii] = 0;
}
-PALETTE_INIT( gbc )
+PALETTE_INIT_MEMBER(gb_state,gbc)
{
- gb_state *state = machine.driver_data<gb_state>();
int ii, r, g, b;
for( ii = 0; ii < 32768; ii++ )
@@ -128,23 +126,23 @@ PALETTE_INIT( gbc )
r = (ii & 0x1F) << 3;
g = ((ii >> 5) & 0x1F) << 3;
b = ((ii >> 10) & 0x1F) << 3;
- palette_set_color_rgb( machine, ii, r, g, b );
+ palette_set_color_rgb( machine(), ii, r, g, b );
}
/* Background is initialised as white */
for( ii = 0; ii < 32; ii++ )
- state->m_lcd.cgb_bpal[ii] = 32767;
+ m_lcd.cgb_bpal[ii] = 32767;
/* Sprites are supposed to be uninitialized, but we'll make them black */
for( ii = 0; ii < 32; ii++ )
- state->m_lcd.cgb_spal[ii] = 0;
+ m_lcd.cgb_spal[ii] = 0;
}
-PALETTE_INIT( megaduck )
+PALETTE_INIT_MEMBER(gb_state,megaduck)
{
int ii;
for( ii = 0; ii < 4; ii++)
{
- palette_set_color_rgb(machine, ii, palette_megaduck[ii*3+0], palette_megaduck[ii*3+1], palette_megaduck[ii*3+2]);
+ palette_set_color_rgb(machine(), ii, palette_megaduck[ii*3+0], palette_megaduck[ii*3+1], palette_megaduck[ii*3+2]);
}
}
@@ -1201,18 +1199,16 @@ static TIMER_CALLBACK( gb_video_init_vbl )
machine.device("maincpu")->execute().set_input_line(VBL_INT, ASSERT_LINE );
}
-MACHINE_START( gb_video )
+MACHINE_START_MEMBER(gb_state,gb_video)
{
- gb_state *state = machine.driver_data<gb_state>();
- state->m_lcd.lcd_timer = machine.scheduler().timer_alloc(FUNC(gb_lcd_timer_proc));
- machine.primary_screen->register_screen_bitmap(state->m_bitmap);
+ m_lcd.lcd_timer = machine().scheduler().timer_alloc(FUNC(gb_lcd_timer_proc));
+ machine().primary_screen->register_screen_bitmap(m_bitmap);
}
-MACHINE_START( gbc_video )
+MACHINE_START_MEMBER(gb_state,gbc_video)
{
- gb_state *state = machine.driver_data<gb_state>();
- state->m_lcd.lcd_timer = machine.scheduler().timer_alloc(FUNC(gbc_lcd_timer_proc));
- machine.primary_screen->register_screen_bitmap(state->m_bitmap);
+ m_lcd.lcd_timer = machine().scheduler().timer_alloc(FUNC(gbc_lcd_timer_proc));
+ machine().primary_screen->register_screen_bitmap(m_bitmap);
}
UINT32 gb_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
diff --git a/src/mess/video/hec2video.c b/src/mess/video/hec2video.c
index 504e6de1f07..693d5a74733 100644
--- a/src/mess/video/hec2video.c
+++ b/src/mess/video/hec2video.c
@@ -111,9 +111,9 @@ void hector_80c(running_machine &machine, bitmap_ind16 &bitmap, UINT8 *page, int
}
-VIDEO_START( hec2hrp )
+VIDEO_START_MEMBER(hec2hrp_state,hec2hrp)
{
- Init_Hector_Palette(machine);
+ Init_Hector_Palette(machine());
}
SCREEN_UPDATE_IND16( hec2hrp )
diff --git a/src/mess/video/hp48.c b/src/mess/video/hp48.c
index 913e4576062..9f1b406516d 100644
--- a/src/mess/video/hp48.c
+++ b/src/mess/video/hp48.c
@@ -39,13 +39,13 @@ static const int hp48_fg_color[3] = { 0, 0, 64 }; /* dark blue */
FUNCTIONS
***************************************************************************/
-PALETTE_INIT ( hp48 )
+void hp48_state::palette_init()
{
int i;
for ( i = 0; i < 255; i++ )
{
float c = i/255.;
- palette_set_color( machine, i, MAKE_ARGB( 0, mix2(0,c), mix2(1,c), mix2(2,c) ) );
+ palette_set_color( machine(), i, MAKE_ARGB( 0, mix2(0,c), mix2(1,c), mix2(2,c) ) );
}
}
diff --git a/src/mess/video/intv.c b/src/mess/video/intv.c
index a91f9584f87..44ab0f4292e 100644
--- a/src/mess/video/intv.c
+++ b/src/mess/video/intv.c
@@ -34,19 +34,18 @@ INLINE void intv_plot_box(intv_state *state, bitmap_ind16 &bm, int x, int y, int
bm.plot_box(x * state->m_x_scale, y * state->m_y_scale, w * state->m_x_scale, h * state->m_y_scale, SET_COLOR(color));
}
-VIDEO_START( intv )
+void intv_state::video_start()
{
- intv_state *state = machine.driver_data<intv_state>();
//int i,j,k;
- state->m_tms9927_num_rows = 25;
+ m_tms9927_num_rows = 25;
- machine.primary_screen->register_screen_bitmap(state->m_bitmap);
+ machine().primary_screen->register_screen_bitmap(m_bitmap);
#if 0
for (i = 0; i < STIC_MOBS; i++)
{
- intv_sprite_type* s = &state->m_sprite[i];
+ intv_sprite_type* s = &m_sprite[i];
s->visible = 0;
s->xpos = 0;
s->ypos = 0;
@@ -67,28 +66,28 @@ VIDEO_START( intv )
{
for (k = 0; k < 128; k++)
{
- state->m_sprite_buffers[i][j][k] = 0;
+ m_sprite_buffers[i][j][k] = 0;
}
}
}
for(i = 0; i < STIC_REGISTERS; i++)
{
- state->m_stic_registers[i] = 0;
+ m_stic_registers[i] = 0;
}
- state->m_color_stack_mode = 0;
- state->m_color_stack_offset = 0;
- state->m_stic_handshake = 0;
- state->m_border_color = 0;
- state->m_col_delay = 0;
- state->m_row_delay = 0;
- state->m_left_edge_inhibit = 0;
- state->m_top_edge_inhibit = 0;
-
- state->m_gramdirty = 1;
+ m_color_stack_mode = 0;
+ m_color_stack_offset = 0;
+ m_stic_handshake = 0;
+ m_border_color = 0;
+ m_col_delay = 0;
+ m_row_delay = 0;
+ m_left_edge_inhibit = 0;
+ m_top_edge_inhibit = 0;
+
+ m_gramdirty = 1;
for(i=0;i<64;i++)
{
- state->m_gram[i] = 0;
- state->m_gramdirtybytes[i] = 1;
+ m_gram[i] = 0;
+ m_gramdirtybytes[i] = 1;
}
#endif
}
diff --git a/src/mess/video/irisha.c b/src/mess/video/irisha.c
index 79abea3a054..a8d2b18f2c5 100644
--- a/src/mess/video/irisha.c
+++ b/src/mess/video/irisha.c
@@ -11,7 +11,7 @@
#include "includes/irisha.h"
-VIDEO_START( irisha )
+void irisha_state::video_start()
{
}
diff --git a/src/mess/video/kaypro.c b/src/mess/video/kaypro.c
index 39fd7e866eb..2f222056691 100644
--- a/src/mess/video/kaypro.c
+++ b/src/mess/video/kaypro.c
@@ -9,11 +9,11 @@
************************************************************/
-PALETTE_INIT( kaypro )
+PALETTE_INIT_MEMBER(kaypro_state,kaypro)
{
- palette_set_color(machine, 0, RGB_BLACK); /* black */
- palette_set_color(machine, 1, MAKE_RGB(0, 220, 0)); /* green */
- palette_set_color(machine, 2, MAKE_RGB(0, 110, 0)); /* low intensity green */
+ palette_set_color(machine(), 0, RGB_BLACK); /* black */
+ palette_set_color(machine(), 1, MAKE_RGB(0, 220, 0)); /* green */
+ palette_set_color(machine(), 2, MAKE_RGB(0, 110, 0)); /* low intensity green */
}
SCREEN_UPDATE_IND16( kayproii )
@@ -313,8 +313,7 @@ WRITE8_MEMBER( kaypro_state::kaypro2x_videoram_w )
m_p_videoram[m_mc6845_video_address] = data;
}
-VIDEO_START( kaypro )
+VIDEO_START_MEMBER(kaypro_state,kaypro)
{
- kaypro_state *state = machine.driver_data<kaypro_state>();
- state->m_p_chargen = state->memregion("chargen")->base();
+ m_p_chargen = memregion("chargen")->base();
}
diff --git a/src/mess/video/kc.c b/src/mess/video/kc.c
index 1802f123920..ea12567e56a 100644
--- a/src/mess/video/kc.c
+++ b/src/mess/video/kc.c
@@ -45,10 +45,10 @@ static const UINT8 kc85_palette[KC85_PALETTE_SIZE * 3] =
/* Initialise the palette */
-PALETTE_INIT( kc85 )
+PALETTE_INIT_MEMBER(kc_state,kc85)
{
for (int i = 0; i < sizeof(kc85_palette) / 3; i++ )
- palette_set_color_rgb(machine, i, kc85_palette[i*3], kc85_palette[i*3+1], kc85_palette[i*3+2]);
+ palette_set_color_rgb(machine(), i, kc85_palette[i*3], kc85_palette[i*3+1], kc85_palette[i*3+2]);
}
/* set new blink state */
diff --git a/src/mess/video/kramermc.c b/src/mess/video/kramermc.c
index 13a1b52a0e8..f3f9ea13a17 100644
--- a/src/mess/video/kramermc.c
+++ b/src/mess/video/kramermc.c
@@ -23,7 +23,7 @@ const gfx_layout kramermc_charlayout =
8*8 /* size of one char */
};
-VIDEO_START( kramermc )
+void kramermc_state::video_start()
{
}
diff --git a/src/mess/video/kyocera.c b/src/mess/video/kyocera.c
index 1ffb9b43ab6..3793fe6b403 100644
--- a/src/mess/video/kyocera.c
+++ b/src/mess/video/kyocera.c
@@ -1,9 +1,9 @@
#include "includes/kyocera.h"
-static PALETTE_INIT( kc85 )
+PALETTE_INIT_MEMBER(kc85_state,kc85)
{
- palette_set_color(machine, 0, MAKE_RGB(138, 146, 148));
- palette_set_color(machine, 1, MAKE_RGB(92, 83, 88));
+ palette_set_color(machine(), 0, MAKE_RGB(138, 146, 148));
+ palette_set_color(machine(), 1, MAKE_RGB(92, 83, 88));
}
UINT32 kc85_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
@@ -50,7 +50,7 @@ MACHINE_CONFIG_FRAGMENT( kc85_video )
MCFG_DEFAULT_LAYOUT(layout_lcd)
MCFG_PALETTE_LENGTH(2)
- MCFG_PALETTE_INIT(kc85)
+ MCFG_PALETTE_INIT_OVERRIDE(kc85_state,kc85)
MCFG_HD44102_ADD(HD44102_0_TAG, SCREEN_TAG, 0, 0)
MCFG_HD44102_ADD(HD44102_1_TAG, SCREEN_TAG, 50, 0)
@@ -77,7 +77,7 @@ MACHINE_CONFIG_FRAGMENT( tandy200_video )
MCFG_DEFAULT_LAYOUT(layout_lcd)
MCFG_PALETTE_LENGTH(2)
- MCFG_PALETTE_INIT(kc85)
+ MCFG_PALETTE_INIT_OVERRIDE(kc85_state,kc85)
MCFG_HD61830_ADD(HD61830_TAG, XTAL_4_9152MHz/2/2, lcdc_intf)
MCFG_DEVICE_ADDRESS_MAP(AS_0, tandy200_lcdc)
diff --git a/src/mess/video/llc.c b/src/mess/video/llc.c
index 952bb4e39e1..21bf45b51c1 100644
--- a/src/mess/video/llc.c
+++ b/src/mess/video/llc.c
@@ -10,10 +10,9 @@
#include "includes/llc.h"
-VIDEO_START( llc )
+void llc_state::video_start()
{
- llc_state *state = machine.driver_data<llc_state>();
- state->m_p_chargen = state->memregion("chargen")->base();
+ m_p_chargen = memregion("chargen")->base();
}
SCREEN_UPDATE_IND16( llc1 )
diff --git a/src/mess/video/lviv.c b/src/mess/video/lviv.c
index 87956253f6f..c1b5ea3a515 100644
--- a/src/mess/video/lviv.c
+++ b/src/mess/video/lviv.c
@@ -24,12 +24,12 @@ const unsigned char lviv_palette[8*3] =
};
-PALETTE_INIT( lviv )
+void lviv_state::palette_init()
{
int i;
for ( i = 0; i < sizeof(lviv_palette) / 3; i++ ) {
- palette_set_color_rgb(machine, i, lviv_palette[i*3], lviv_palette[i*3+1], lviv_palette[i*3+2]);
+ palette_set_color_rgb(machine(), i, lviv_palette[i*3], lviv_palette[i*3+1], lviv_palette[i*3+2]);
}
}
@@ -59,7 +59,7 @@ void lviv_update_palette(running_machine &machine, UINT8 pal)
state->m_colortable[0][3] |= ((pal>>6)&0x01) ? 0x01 : 0x00;
}
-VIDEO_START( lviv )
+void lviv_state::video_start()
{
}
diff --git a/src/mess/video/mac.c b/src/mess/video/mac.c
index e8a524511d1..8446b0b6a54 100644
--- a/src/mess/video/mac.c
+++ b/src/mess/video/mac.c
@@ -56,22 +56,22 @@ Apple color FPD 01 11 10 (FPD = Full Page Display)
#include "includes/mac.h"
#include "machine/ram.h"
-PALETTE_INIT( mac )
+PALETTE_INIT_MEMBER(mac_state,mac)
{
- palette_set_color_rgb(machine, 0, 0xff, 0xff, 0xff);
- palette_set_color_rgb(machine, 1, 0x00, 0x00, 0x00);
+ palette_set_color_rgb(machine(), 0, 0xff, 0xff, 0xff);
+ palette_set_color_rgb(machine(), 1, 0x00, 0x00, 0x00);
}
// 4-level grayscale
-PALETTE_INIT( macgsc )
+PALETTE_INIT_MEMBER(mac_state,macgsc)
{
- palette_set_color_rgb(machine, 0, 0xff, 0xff, 0xff);
- palette_set_color_rgb(machine, 1, 0x7f, 0x7f, 0x7f);
- palette_set_color_rgb(machine, 2, 0x3f, 0x3f, 0x3f);
- palette_set_color_rgb(machine, 3, 0x00, 0x00, 0x00);
+ palette_set_color_rgb(machine(), 0, 0xff, 0xff, 0xff);
+ palette_set_color_rgb(machine(), 1, 0x7f, 0x7f, 0x7f);
+ palette_set_color_rgb(machine(), 2, 0x3f, 0x3f, 0x3f);
+ palette_set_color_rgb(machine(), 3, 0x00, 0x00, 0x00);
}
-VIDEO_START( mac )
+VIDEO_START_MEMBER(mac_state,mac)
{
}
@@ -216,43 +216,40 @@ SCREEN_UPDATE_IND16( macpb160 )
// IIci/IIsi RAM-Based Video (RBV) and children: V8, Eagle, Spice, VASP, Sonora
-VIDEO_START( macrbv )
+VIDEO_START_MEMBER(mac_state,macrbv)
{
}
-VIDEO_RESET(maceagle)
+VIDEO_RESET_MEMBER(mac_state,maceagle)
{
- mac_state *mac = machine.driver_data<mac_state>();
-
- mac->m_rbv_montype = 32;
- mac->m_rbv_palette[0xfe] = 0xffffff;
- mac->m_rbv_palette[0xff] = 0;
+ m_rbv_montype = 32;
+ m_rbv_palette[0xfe] = 0xffffff;
+ m_rbv_palette[0xff] = 0;
}
-VIDEO_RESET(macrbv)
+VIDEO_RESET_MEMBER(mac_state,macrbv)
{
- mac_state *mac = machine.driver_data<mac_state>();
rectangle visarea;
int htotal, vtotal;
double framerate;
int view;
- memset(mac->m_rbv_regs, 0, sizeof(mac->m_rbv_regs));
+ memset(m_rbv_regs, 0, sizeof(m_rbv_regs));
- mac->m_rbv_count = 0;
- mac->m_rbv_clutoffs = 0;
- mac->m_rbv_immed10wr = 0;
+ m_rbv_count = 0;
+ m_rbv_clutoffs = 0;
+ m_rbv_immed10wr = 0;
- mac->m_rbv_regs[2] = 0x7f;
- mac->m_rbv_regs[3] = 0;
+ m_rbv_regs[2] = 0x7f;
+ m_rbv_regs[3] = 0;
- mac->m_rbv_type = RBV_TYPE_RBV;
+ m_rbv_type = RBV_TYPE_RBV;
visarea.min_x = 0;
visarea.min_y = 0;
view = 0;
- mac->m_rbv_montype = machine.root_device().ioport("MONTYPE")->read_safe(2);
- switch (mac->m_rbv_montype)
+ m_rbv_montype = machine().root_device().ioport("MONTYPE")->read_safe(2);
+ switch (m_rbv_montype)
{
case 1: // 15" portrait display
visarea.max_x = 640-1;
@@ -282,39 +279,38 @@ VIDEO_RESET(macrbv)
}
// printf("RBV reset: monitor is %dx%d @ %f Hz\n", visarea.max_x+1, visarea.max_y+1, framerate);
- machine.primary_screen->configure(htotal, vtotal, visarea, HZ_TO_ATTOSECONDS(framerate));
- render_target *target = machine.render().first_target();
+ machine().primary_screen->configure(htotal, vtotal, visarea, HZ_TO_ATTOSECONDS(framerate));
+ render_target *target = machine().render().first_target();
target->set_view(view);
}
-VIDEO_RESET(macsonora)
+VIDEO_RESET_MEMBER(mac_state,macsonora)
{
- mac_state *mac = machine.driver_data<mac_state>();
rectangle visarea;
int htotal, vtotal;
double framerate;
- memset(mac->m_rbv_regs, 0, sizeof(mac->m_rbv_regs));
+ memset(m_rbv_regs, 0, sizeof(m_rbv_regs));
- mac->m_rbv_count = 0;
- mac->m_rbv_clutoffs = 0;
- mac->m_rbv_immed10wr = 0;
+ m_rbv_count = 0;
+ m_rbv_clutoffs = 0;
+ m_rbv_immed10wr = 0;
- mac->m_rbv_regs[2] = 0x7f;
- mac->m_rbv_regs[3] = 0;
+ m_rbv_regs[2] = 0x7f;
+ m_rbv_regs[3] = 0;
- mac->m_rbv_type = RBV_TYPE_SONORA;
+ m_rbv_type = RBV_TYPE_SONORA;
visarea.min_x = 0;
visarea.min_y = 0;
- mac->m_rbv_montype = machine.root_device().ioport("MONTYPE")->read_safe(2);
- switch (mac->m_rbv_montype)
+ m_rbv_montype = machine().root_device().ioport("MONTYPE")->read_safe(2);
+ switch (m_rbv_montype)
{
case 1: // 15" portrait display
visarea.max_x = 640-1;
visarea.max_y = 870-1;
- htotal = 832;
+ htotal = 832;
vtotal = 918;
framerate = 75.0;
break;
@@ -322,7 +318,7 @@ VIDEO_RESET(macsonora)
case 2: // 12" RGB
visarea.max_x = 512-1;
visarea.max_y = 384-1;
- htotal = 640;
+ htotal = 640;
vtotal = 407;
framerate = 60.15;
break;
@@ -331,53 +327,51 @@ VIDEO_RESET(macsonora)
default:
visarea.max_x = 640-1;
visarea.max_y = 480-1;
- htotal = 800;
+ htotal = 800;
vtotal = 525;
framerate = 59.94;
break;
}
// printf("RBV reset: monitor is %dx%d @ %f Hz\n", visarea.max_x+1, visarea.max_y+1, framerate);
- machine.primary_screen->configure(htotal, vtotal, visarea, HZ_TO_ATTOSECONDS(framerate));
+ machine().primary_screen->configure(htotal, vtotal, visarea, HZ_TO_ATTOSECONDS(framerate));
}
-VIDEO_START( macsonora )
+VIDEO_START_MEMBER(mac_state,macsonora)
{
- mac_state *mac = machine.driver_data<mac_state>();
- memset(mac->m_rbv_regs, 0, sizeof(mac->m_rbv_regs));
+ memset(m_rbv_regs, 0, sizeof(m_rbv_regs));
- mac->m_rbv_count = 0;
- mac->m_rbv_clutoffs = 0;
- mac->m_rbv_immed10wr = 0;
+ m_rbv_count = 0;
+ m_rbv_clutoffs = 0;
+ m_rbv_immed10wr = 0;
- mac->m_rbv_regs[2] = 0x7f;
- mac->m_rbv_regs[3] = 0;
- mac->m_rbv_regs[4] = 0x6;
- mac->m_rbv_regs[5] = 0x3;
+ m_rbv_regs[2] = 0x7f;
+ m_rbv_regs[3] = 0;
+ m_rbv_regs[4] = 0x6;
+ m_rbv_regs[5] = 0x3;
- mac->m_sonora_vctl[0] = 0x9f;
- mac->m_sonora_vctl[1] = 0;
- mac->m_sonora_vctl[2] = 0;
+ m_sonora_vctl[0] = 0x9f;
+ m_sonora_vctl[1] = 0;
+ m_sonora_vctl[2] = 0;
- mac->m_rbv_type = RBV_TYPE_SONORA;
+ m_rbv_type = RBV_TYPE_SONORA;
}
-VIDEO_START( macv8 )
+VIDEO_START_MEMBER(mac_state,macv8)
{
- mac_state *mac = machine.driver_data<mac_state>();
- memset(mac->m_rbv_regs, 0, sizeof(mac->m_rbv_regs));
+ memset(m_rbv_regs, 0, sizeof(m_rbv_regs));
- mac->m_rbv_count = 0;
- mac->m_rbv_clutoffs = 0;
- mac->m_rbv_immed10wr = 0;
+ m_rbv_count = 0;
+ m_rbv_clutoffs = 0;
+ m_rbv_immed10wr = 0;
- mac->m_rbv_regs[0] = 0x4f;
- mac->m_rbv_regs[1] = 0x06;
- mac->m_rbv_regs[2] = 0x7f;
+ m_rbv_regs[0] = 0x4f;
+ m_rbv_regs[1] = 0x06;
+ m_rbv_regs[2] = 0x7f;
- mac->m_rbv_type = RBV_TYPE_V8;
+ m_rbv_type = RBV_TYPE_V8;
}
SCREEN_UPDATE_RGB32( macrbv )
@@ -684,32 +678,28 @@ static TIMER_CALLBACK(dafb_cursor_tick)
mac->m_cursor_timer->adjust(mac->m_screen->time_until_pos(mac->m_cursor_line, 0), 0);
}
-VIDEO_START( macdafb )
+VIDEO_START_MEMBER(mac_state,macdafb)
{
- mac_state *mac = machine.driver_data<mac_state>();
+ m_vbl_timer = machine().scheduler().timer_alloc(FUNC(dafb_vbl_tick));
+ m_cursor_timer = machine().scheduler().timer_alloc(FUNC(dafb_cursor_tick));
- mac->m_vbl_timer = machine.scheduler().timer_alloc(FUNC(dafb_vbl_tick));
- mac->m_cursor_timer = machine.scheduler().timer_alloc(FUNC(dafb_cursor_tick));
-
- mac->m_vbl_timer->adjust(attotime::never);
- mac->m_cursor_timer->adjust(attotime::never);
+ m_vbl_timer->adjust(attotime::never);
+ m_cursor_timer->adjust(attotime::never);
}
-VIDEO_RESET(macdafb)
+VIDEO_RESET_MEMBER(mac_state,macdafb)
{
- mac_state *mac = machine.driver_data<mac_state>();
-
- mac->m_rbv_count = 0;
- mac->m_rbv_clutoffs = 0;
- mac->m_rbv_montype = 6;
- mac->m_rbv_vbltime = 0;
- mac->m_dafb_int_status = 0;
- mac->m_rbv_type = RBV_TYPE_DAFB;
- mac->m_dafb_mode = 0;
- mac->m_dafb_base = 0x1000;
- mac->m_dafb_stride = 256*4;
-
- memset(mac->m_rbv_palette, 0, sizeof(mac->m_rbv_palette));
+ m_rbv_count = 0;
+ m_rbv_clutoffs = 0;
+ m_rbv_montype = 6;
+ m_rbv_vbltime = 0;
+ m_dafb_int_status = 0;
+ m_rbv_type = RBV_TYPE_DAFB;
+ m_dafb_mode = 0;
+ m_dafb_base = 0x1000;
+ m_dafb_stride = 256*4;
+
+ memset(m_rbv_palette, 0, sizeof(m_rbv_palette));
}
READ32_MEMBER(mac_state::dafb_r)
diff --git a/src/mess/video/mbc55x.c b/src/mess/video/mbc55x.c
index 3757db084b7..4a6dc4ff0f5 100644
--- a/src/mess/video/mbc55x.c
+++ b/src/mess/video/mbc55x.c
@@ -173,24 +173,22 @@ const mc6845_interface mb55x_mc6845_intf =
NULL
};
-VIDEO_START( mbc55x )
+void mbc55x_state::video_start()
{
- mbc55x_state *mstate = machine.driver_data<mbc55x_state>();
- mstate->m_debug_video=0;
+ m_debug_video=0;
logerror("VIDEO_START\n");
- if (machine.debug_flags & DEBUG_FLAG_ENABLED)
+ if (machine().debug_flags & DEBUG_FLAG_ENABLED)
{
- debug_console_register_command(machine, "mbc55x_vid_debug", CMDFLAG_NONE, 0, 0, 1, video_debug);
+ debug_console_register_command(machine(), "mbc55x_vid_debug", CMDFLAG_NONE, 0, 0, 1, video_debug);
}
}
-VIDEO_RESET( mbc55x )
+void mbc55x_state::video_reset()
{
- mbc55x_state *mstate = machine.driver_data<mbc55x_state>();
// When we reset clear the video registers and video memory.
- memset(&mstate->m_video_mem,0,sizeof(mstate->m_video_mem));
+ memset(&m_video_mem,0,sizeof(m_video_mem));
logerror("Video reset\n");
}
diff --git a/src/mess/video/mbee.c b/src/mess/video/mbee.c
index be5e08c94db..f3402c6cd43 100644
--- a/src/mess/video/mbee.c
+++ b/src/mess/video/mbee.c
@@ -359,31 +359,28 @@ WRITE8_MEMBER ( mbee_state::m6545_data_w )
************************************************************/
-VIDEO_START( mbee )
+VIDEO_START_MEMBER(mbee_state,mbee)
{
- mbee_state *state = machine.driver_data<mbee_state>();
- state->m_p_videoram = machine.root_device().memregion("videoram")->base();
- state->m_p_gfxram = state->memregion("gfx")->base()+0x1000;
- state->m_is_premium = 0;
+ m_p_videoram = machine().root_device().memregion("videoram")->base();
+ m_p_gfxram = memregion("gfx")->base()+0x1000;
+ m_is_premium = 0;
}
-VIDEO_START( mbeeic )
+VIDEO_START_MEMBER(mbee_state,mbeeic)
{
- mbee_state *state = machine.driver_data<mbee_state>();
- state->m_p_videoram = machine.root_device().memregion("videoram")->base();
- state->m_p_colorram = machine.root_device().memregion("colorram")->base();
- state->m_p_gfxram = state->memregion("gfx")->base()+0x1000;
- state->m_is_premium = 0;
+ m_p_videoram = machine().root_device().memregion("videoram")->base();
+ m_p_colorram = machine().root_device().memregion("colorram")->base();
+ m_p_gfxram = memregion("gfx")->base()+0x1000;
+ m_is_premium = 0;
}
-VIDEO_START( mbeeppc )
+VIDEO_START_MEMBER(mbee_state,mbeeppc)
{
- mbee_state *state = machine.driver_data<mbee_state>();
- state->m_p_videoram = machine.root_device().memregion("videoram")->base();
- state->m_p_colorram = machine.root_device().memregion("colorram")->base();
- state->m_p_gfxram = machine.root_device().memregion("gfx")->base()+0x1000;
- state->m_p_attribram = state->memregion("attrib")->base();
- state->m_is_premium = 1;
+ m_p_videoram = machine().root_device().memregion("videoram")->base();
+ m_p_colorram = machine().root_device().memregion("colorram")->base();
+ m_p_gfxram = machine().root_device().memregion("gfx")->base()+0x1000;
+ m_p_attribram = memregion("attrib")->base();
+ m_is_premium = 1;
}
SCREEN_UPDATE_RGB32( mbee )
@@ -554,9 +551,9 @@ MC6845_UPDATE_ROW( mbeeppc_update_row )
************************************************************/
-PALETTE_INIT( mbeeic )
+PALETTE_INIT_MEMBER(mbee_state,mbeeic)
{
- const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
+ const UINT8 *color_prom = machine().root_device().memregion("proms")->base();
UINT16 i;
UINT8 r, b, g, k;
UINT8 level[] = { 0, 0x80, 0xff, 0xff }; /* off, half, full intensity */
@@ -567,7 +564,7 @@ PALETTE_INIT( mbeeic )
r = level[((i>>0)&1)|((i>>2)&2)];
g = level[((i>>1)&1)|((i>>3)&2)];
b = level[((i>>2)&1)|((i>>4)&2)];
- palette_set_color(machine, i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, MAKE_RGB(r, g, b));
}
/* set up foreground palette (64-95) by reading the prom */
@@ -577,14 +574,14 @@ PALETTE_INIT( mbeeic )
r = level[((k>>2)&1)|((k>>4)&2)];
g = level[((k>>1)&1)|((k>>3)&2)];
b = level[((k>>0)&1)|((k>>2)&2)];
- palette_set_color(machine, i|64, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i|64, MAKE_RGB(r, g, b));
}
}
-PALETTE_INIT( mbeepc85b )
+PALETTE_INIT_MEMBER(mbee_state,mbeepc85b)
{
- const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
+ const UINT8 *color_prom = machine().root_device().memregion("proms")->base();
UINT16 i;
UINT8 r, b, g, k;
UINT8 level[] = { 0, 0x80, 0x80, 0xff }; /* off, half, full intensity */
@@ -595,7 +592,7 @@ PALETTE_INIT( mbeepc85b )
r = level[((i>>0)&1)|((i>>2)&2)];
g = level[((i>>1)&1)|((i>>3)&2)];
b = level[((i>>2)&1)|((i>>4)&2)];
- palette_set_color(machine, i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, MAKE_RGB(r, g, b));
}
level[2] = 0xff;
@@ -607,12 +604,12 @@ PALETTE_INIT( mbeepc85b )
r = level[((k>>2)&1)|((k>>4)&2)];
g = level[((k>>1)&1)|((k>>3)&2)];
b = level[((k>>0)&1)|((k>>2)&2)];
- palette_set_color(machine, i|64, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i|64, MAKE_RGB(r, g, b));
}
}
-PALETTE_INIT( mbeeppc )
+PALETTE_INIT_MEMBER(mbee_state,mbeeppc)
{
UINT16 i;
UINT8 r, b, g;
@@ -623,7 +620,7 @@ PALETTE_INIT( mbeeppc )
r = (i & 1) ? 0xc0 : 0;
g = (i & 2) ? 0xc0 : 0;
b = (i & 4) ? 0xc0 : 0;
- palette_set_color(machine, i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, MAKE_RGB(r, g, b));
}
/* set up 8 high intensity colours */
@@ -632,7 +629,7 @@ PALETTE_INIT( mbeeppc )
r = (i & 1) ? 0xff : 0;
g = (i & 2) ? 0xff : 0;
b = (i & 4) ? 0xff : 0;
- palette_set_color(machine, i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, MAKE_RGB(r, g, b));
}
}
diff --git a/src/mess/video/mc80.c b/src/mess/video/mc80.c
index c327ef229da..604b9f338ca 100644
--- a/src/mess/video/mc80.c
+++ b/src/mess/video/mc80.c
@@ -92,7 +92,7 @@ static const UINT8 prom[] = {
-VIDEO_START( mc8020 )
+VIDEO_START_MEMBER(mc80_state,mc8020)
{
}
@@ -137,10 +137,9 @@ SCREEN_UPDATE_IND16( mc8020 )
/*****************************************************************************/
-VIDEO_START( mc8030 )
+VIDEO_START_MEMBER(mc80_state,mc8030)
{
- mc80_state *state = machine.driver_data<mc80_state>();
- state->m_p_videoram.set_target(state->memregion("vram")->base(),state->m_p_videoram.bytes());
+ m_p_videoram.set_target(memregion("vram")->base(),m_p_videoram.bytes());
}
SCREEN_UPDATE_IND16( mc8030 )
diff --git a/src/mess/video/microtan.c b/src/mess/video/microtan.c
index 1276121806e..d39e7c77a71 100644
--- a/src/mess/video/microtan.c
+++ b/src/mess/video/microtan.c
@@ -38,15 +38,14 @@ TILE_GET_INFO_MEMBER(microtan_state::get_bg_tile_info)
SET_TILE_INFO_MEMBER(gfxn, code, 0, 0);
}
-VIDEO_START( microtan )
+void microtan_state::video_start()
{
- microtan_state *state = machine.driver_data<microtan_state>();
- state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(microtan_state::get_bg_tile_info),state), TILEMAP_SCAN_ROWS,
+ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(microtan_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS,
8, 16, 32, 16);
- state->m_chunky_buffer = auto_alloc_array(machine, UINT8, 0x200);
- memset(state->m_chunky_buffer, 0, 0x200);
- state->m_chunky_graphics = 0;
+ m_chunky_buffer = auto_alloc_array(machine(), UINT8, 0x200);
+ memset(m_chunky_buffer, 0, 0x200);
+ m_chunky_graphics = 0;
}
SCREEN_UPDATE_IND16( microtan )
diff --git a/src/mess/video/mikro80.c b/src/mess/video/mikro80.c
index dcd10312f02..519e255b6f2 100644
--- a/src/mess/video/mikro80.c
+++ b/src/mess/video/mikro80.c
@@ -11,7 +11,7 @@
#include "includes/mikro80.h"
-VIDEO_START( mikro80 )
+void mikro80_state::video_start()
{
}
diff --git a/src/mess/video/mikromik.c b/src/mess/video/mikromik.c
index a939220e0f3..42a59c3c6b8 100644
--- a/src/mess/video/mikromik.c
+++ b/src/mess/video/mikromik.c
@@ -6,11 +6,11 @@
// PALETTE_INIT( mm1 )
//-------------------------------------------------
-static PALETTE_INIT( mm1 )
+PALETTE_INIT_MEMBER(mm1_state,mm1)
{
- palette_set_color(machine, 0, RGB_BLACK); /* black */
- palette_set_color_rgb(machine, 1, 0x00, 0xc0, 0x00); /* green */
- palette_set_color_rgb(machine, 2, 0x00, 0xff, 0x00); /* bright green */
+ palette_set_color(machine(), 0, RGB_BLACK); /* black */
+ palette_set_color_rgb(machine(), 1, 0x00, 0xc0, 0x00); /* green */
+ palette_set_color_rgb(machine(), 2, 0x00, 0xff, 0x00); /* bright green */
}
@@ -162,7 +162,7 @@ MACHINE_CONFIG_FRAGMENT( mm1m6_video )
MCFG_GFXDECODE(mm1)
MCFG_PALETTE_LENGTH(3)
- MCFG_PALETTE_INIT(mm1)
+ MCFG_PALETTE_INIT_OVERRIDE(mm1_state,mm1)
MCFG_I8275_ADD(I8275_TAG, crtc_intf)
MCFG_UPD7220_ADD(UPD7220_TAG, XTAL_18_720MHz/8, hgdc_intf, mm1_upd7220_map)
diff --git a/src/mess/video/mz700.c b/src/mess/video/mz700.c
index ba46629bc2b..96d1164d7d3 100644
--- a/src/mess/video/mz700.c
+++ b/src/mess/video/mz700.c
@@ -29,19 +29,19 @@
} while (0)
-PALETTE_INIT( mz700 )
+void mz_state::palette_init()
{
int i;
- machine.colortable = colortable_alloc(machine, 8);
+ machine().colortable = colortable_alloc(machine(), 8);
for (i = 0; i < 8; i++)
- colortable_palette_set_color(machine.colortable, i, MAKE_RGB((i & 2) ? 0xff : 0x00, (i & 4) ? 0xff : 0x00, (i & 1) ? 0xff : 0x00));
+ colortable_palette_set_color(machine().colortable, i, MAKE_RGB((i & 2) ? 0xff : 0x00, (i & 4) ? 0xff : 0x00, (i & 1) ? 0xff : 0x00));
for (i = 0; i < 256; i++)
{
- colortable_entry_set_value(machine.colortable, i*2, i & 7);
- colortable_entry_set_value(machine.colortable, i*2+1, (i >> 4) & 7);
+ colortable_entry_set_value(machine().colortable, i*2, i & 7);
+ colortable_entry_set_value(machine().colortable, i*2+1, (i >> 4) & 7);
}
}
@@ -76,10 +76,9 @@ SCREEN_UPDATE_IND16( mz700 )
MZ-800
***************************************************************************/
-VIDEO_START( mz800 )
+VIDEO_START_MEMBER(mz_state,mz800)
{
- mz_state *mz = machine.driver_data<mz_state>();
- machine.gfx[0]->set_source(mz->m_cgram);
+ machine().gfx[0]->set_source(m_cgram);
}
SCREEN_UPDATE_IND16( mz800 )
diff --git a/src/mess/video/mz80.c b/src/mess/video/mz80.c
index 19857cfdd8a..0f849b592e7 100644
--- a/src/mess/video/mz80.c
+++ b/src/mess/video/mz80.c
@@ -31,10 +31,9 @@ const gfx_layout mz80kj_charlayout =
};
/* Video hardware */
-VIDEO_START( mz80k )
+void mz80_state::video_start()
{
- mz80_state *state = machine.driver_data<mz80_state>();
- state->m_p_chargen = state->memregion("chargen")->base();
+ m_p_chargen = memregion("chargen")->base();
}
SCREEN_UPDATE_IND16( mz80k )
diff --git a/src/mess/video/nc.c b/src/mess/video/nc.c
index f80e56817b7..8ca065f23bc 100644
--- a/src/mess/video/nc.c
+++ b/src/mess/video/nc.c
@@ -14,7 +14,7 @@
Start the video hardware emulation.
***************************************************************************/
-VIDEO_START( nc )
+void nc_state::video_start()
{
}
@@ -35,9 +35,9 @@ static const rgb_t nc_palette[NC_NUM_COLOURS] =
/* Initialise the palette */
-PALETTE_INIT( nc )
+void nc_state::palette_init()
{
- palette_set_colors(machine, 0, nc_palette, ARRAY_LENGTH(nc_palette));
+ palette_set_colors(machine(), 0, nc_palette, ARRAY_LENGTH(nc_palette));
}
diff --git a/src/mess/video/nes.c b/src/mess/video/nes.c
index 7865d848d82..b819a7979bd 100644
--- a/src/mess/video/nes.c
+++ b/src/mess/video/nes.c
@@ -17,19 +17,17 @@ static void nes_vh_reset( running_machine &machine )
state->m_ppu->set_vidaccess_callback(nes_ppu_vidaccess);
}
-VIDEO_START( nes )
+void nes_state::video_start()
{
- nes_state *state = machine.driver_data<nes_state>();
- state->m_last_frame_flip = 0;
+ m_last_frame_flip = 0;
- machine.add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(nes_vh_reset),&machine));
+ machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(nes_vh_reset),&machine()));
}
-PALETTE_INIT( nes )
+void nes_state::palette_init()
{
- nes_state *state = machine.driver_data<nes_state>();
- state->m_ppu->init_palette(machine, 0);
+ m_ppu->init_palette(machine(), 0);
}
diff --git a/src/mess/video/odyssey2.c b/src/mess/video/odyssey2.c
index b70dfea8ba3..41bdb5ec91d 100644
--- a/src/mess/video/odyssey2.c
+++ b/src/mess/video/odyssey2.c
@@ -132,13 +132,13 @@ static const UINT8 o2_shape[0x40][8]={
-PALETTE_INIT( odyssey2 )
+void odyssey2_state::palette_init()
{
int i;
for ( i = 0; i < 24; i++ )
{
- palette_set_color_rgb( machine, i, odyssey2_colors[i*3], odyssey2_colors[i*3+1], odyssey2_colors[i*3+2] );
+ palette_set_color_rgb( machine(), i, odyssey2_colors[i*3], odyssey2_colors[i*3+1], odyssey2_colors[i*3+2] );
}
}
@@ -564,38 +564,37 @@ static TIMER_CALLBACK( i824x_hblank_callback )
***************************************************************************/
-VIDEO_START( odyssey2 )
+void odyssey2_state::video_start()
{
- odyssey2_state *state = machine.driver_data<odyssey2_state>();
- screen_device *screen = machine.first_screen();
+ screen_device *screen = machine().first_screen();
- memset(state->m_o2_vdc.reg, 0, 0x100);
+ memset(m_o2_vdc.reg, 0, 0x100);
- state->m_o2_snd_shift[0] = state->m_o2_snd_shift[1] = 0;
- state->m_x_beam_pos = 0;
- state->m_y_beam_pos = 0;
- state->m_control_status = 0;
- state->m_collision_status = 0;
- state->m_iff = 0;
- state->m_start_vpos = 0;
- state->m_start_vblank = 0;
- state->m_lum = 0;
+ m_o2_snd_shift[0] = m_o2_snd_shift[1] = 0;
+ m_x_beam_pos = 0;
+ m_y_beam_pos = 0;
+ m_control_status = 0;
+ m_collision_status = 0;
+ m_iff = 0;
+ m_start_vpos = 0;
+ m_start_vblank = 0;
+ m_lum = 0;
- state->m_o2_snd_shift[0] = machine.sample_rate() / 983;
- state->m_o2_snd_shift[1] = machine.sample_rate() / 3933;
+ m_o2_snd_shift[0] = machine().sample_rate() / 983;
+ m_o2_snd_shift[1] = machine().sample_rate() / 3933;
- state->m_start_vpos = I824X_START_Y;
- state->m_start_vblank = I824X_START_Y + I824X_SCREEN_HEIGHT;
- state->m_control_status = 0;
- state->m_iff = 0;
+ m_start_vpos = I824X_START_Y;
+ m_start_vblank = I824X_START_Y + I824X_SCREEN_HEIGHT;
+ m_control_status = 0;
+ m_iff = 0;
- screen->register_screen_bitmap(state->m_tmp_bitmap);
+ screen->register_screen_bitmap(m_tmp_bitmap);
- state->m_i824x_line_timer = machine.scheduler().timer_alloc(FUNC(i824x_scanline_callback));
- state->m_i824x_line_timer->adjust( machine.primary_screen->time_until_pos(1, I824X_START_ACTIVE_SCAN ), 0, machine.primary_screen->scan_period() );
+ m_i824x_line_timer = machine().scheduler().timer_alloc(FUNC(i824x_scanline_callback));
+ m_i824x_line_timer->adjust( machine().primary_screen->time_until_pos(1, I824X_START_ACTIVE_SCAN ), 0, machine().primary_screen->scan_period() );
- state->m_i824x_hblank_timer = machine.scheduler().timer_alloc(FUNC(i824x_hblank_callback));
- state->m_i824x_hblank_timer->adjust( machine.primary_screen->time_until_pos(1, I824X_END_ACTIVE_SCAN + 18 ), 0, machine.primary_screen->scan_period() );
+ m_i824x_hblank_timer = machine().scheduler().timer_alloc(FUNC(i824x_hblank_callback));
+ m_i824x_hblank_timer->adjust( machine().primary_screen->time_until_pos(1, I824X_END_ACTIVE_SCAN + 18 ), 0, machine().primary_screen->scan_period() );
}
/***************************************************************************
diff --git a/src/mess/video/ondra.c b/src/mess/video/ondra.c
index fcde0a77388..558b99e9f7b 100644
--- a/src/mess/video/ondra.c
+++ b/src/mess/video/ondra.c
@@ -13,10 +13,9 @@
-VIDEO_START( ondra )
+void ondra_state::video_start()
{
- ondra_state *state = machine.driver_data<ondra_state>();
- state->m_video_enable = 0;
+ m_video_enable = 0;
}
SCREEN_UPDATE_IND16( ondra )
diff --git a/src/mess/video/orao.c b/src/mess/video/orao.c
index 70e772128df..828f285572e 100644
--- a/src/mess/video/orao.c
+++ b/src/mess/video/orao.c
@@ -10,8 +10,7 @@
#include "emu.h"
#include "includes/orao.h"
-
-VIDEO_START( orao )
+void orao_state::video_start()
{
}
diff --git a/src/mess/video/oric.c b/src/mess/video/oric.c
index def59d749e1..fc4ba22ec74 100644
--- a/src/mess/video/oric.c
+++ b/src/mess/video/oric.c
@@ -286,23 +286,22 @@ SCREEN_UPDATE_IND16( oric )
}
-VIDEO_START( oric )
+void oric_state::video_start()
{
- oric_state *state = machine.driver_data<oric_state>();
// initialise variables
- state->m_vh_state.active_foreground_colour = 0;
- state->m_vh_state.active_background_colour = 0;
- state->m_vh_state.foreground_colour = 0;
- state->m_vh_state.background_colour = 0;
- state->m_vh_state.mode = 0;
- state->m_vh_state.text_attributes = 0;
- state->m_vh_state.read_addr = 0;
- state->m_vh_state.char_data = 0;
- state->m_vh_state.char_base = 0;
+ m_vh_state.active_foreground_colour = 0;
+ m_vh_state.active_background_colour = 0;
+ m_vh_state.foreground_colour = 0;
+ m_vh_state.background_colour = 0;
+ m_vh_state.mode = 0;
+ m_vh_state.text_attributes = 0;
+ m_vh_state.read_addr = 0;
+ m_vh_state.char_data = 0;
+ m_vh_state.char_base = 0;
/* initialise flash timer */
- state->m_vh_state.flash_count = 0;
- machine.scheduler().timer_pulse(attotime::from_hz(50), FUNC(oric_vh_timer_callback));
+ m_vh_state.flash_count = 0;
+ machine().scheduler().timer_pulse(attotime::from_hz(50), FUNC(oric_vh_timer_callback));
/* mode */
- oric_vh_update_attribute(machine,(1<<3)|(1<<4));
+ oric_vh_update_attribute(machine(),(1<<3)|(1<<4));
}
diff --git a/src/mess/video/orion.c b/src/mess/video/orion.c
index 75ccdd130cd..db2a2956b3e 100644
--- a/src/mess/video/orion.c
+++ b/src/mess/video/orion.c
@@ -12,7 +12,7 @@
#include "includes/orion.h"
#include "machine/ram.h"
-VIDEO_START( orion128 )
+VIDEO_START_MEMBER(orion_state,orion128)
{
}
@@ -108,9 +108,9 @@ static const rgb_t orion128_palette[18] = {
MAKE_RGB(0x32, 0xfa, 0xfa) // 11
};
-PALETTE_INIT( orion128 )
+PALETTE_INIT_MEMBER(orion_state,orion128 )
{
- palette_set_colors(machine, 0, orion128_palette, ARRAY_LENGTH(orion128_palette));
+ palette_set_colors(machine(), 0, orion128_palette, ARRAY_LENGTH(orion128_palette));
}
diff --git a/src/mess/video/p2000m.c b/src/mess/video/p2000m.c
index 72cc493471c..0f8875e6e65 100644
--- a/src/mess/video/p2000m.c
+++ b/src/mess/video/p2000m.c
@@ -11,10 +11,9 @@
-VIDEO_START( p2000m )
+VIDEO_START_MEMBER(p2000t_state,p2000m)
{
- p2000t_state *state = machine.driver_data<p2000t_state>();
- state->m_frame_count = 0;
+ m_frame_count = 0;
}
diff --git a/src/mess/video/pc8401a.c b/src/mess/video/pc8401a.c
index 85e7d886fe0..89070c6040c 100644
--- a/src/mess/video/pc8401a.c
+++ b/src/mess/video/pc8401a.c
@@ -3,10 +3,10 @@
/* PC-8401A */
-static PALETTE_INIT( pc8401a )
+PALETTE_INIT_MEMBER(pc8401a_state,pc8401a)
{
- palette_set_color(machine, 0, MAKE_RGB(39, 108, 51));
- palette_set_color(machine, 1, MAKE_RGB(16, 37, 84));
+ palette_set_color(machine(), 0, MAKE_RGB(39, 108, 51));
+ palette_set_color(machine(), 1, MAKE_RGB(16, 37, 84));
}
void pc8401a_state::video_start()
@@ -75,7 +75,7 @@ MACHINE_CONFIG_FRAGMENT( pc8401a_video )
// MCFG_DEFAULT_LAYOUT(layout_pc8401a)
MCFG_PALETTE_LENGTH(2)
- MCFG_PALETTE_INIT(pc8401a)
+ MCFG_PALETTE_INIT_OVERRIDE(pc8401a_state,pc8401a)
/* LCD */
MCFG_SCREEN_ADD(SCREEN_TAG, LCD)
@@ -91,7 +91,7 @@ MACHINE_CONFIG_FRAGMENT( pc8500_video )
MCFG_DEFAULT_LAYOUT(layout_pc8500)
MCFG_PALETTE_LENGTH(2+8)
- MCFG_PALETTE_INIT(pc8401a)
+ MCFG_PALETTE_INIT_OVERRIDE(pc8401a_state,pc8401a)
/* LCD */
MCFG_SCREEN_ADD(SCREEN_TAG, LCD)
diff --git a/src/mess/video/pcw.c b/src/mess/video/pcw.c
index 5c1b511422a..78f548532a3 100644
--- a/src/mess/video/pcw.c
+++ b/src/mess/video/pcw.c
@@ -19,13 +19,12 @@ INLINE void pcw_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color)
Start the video hardware emulation.
***************************************************************************/
-VIDEO_START( pcw )
+void pcw_state::video_start()
{
- pcw_state *state = machine.driver_data<pcw_state>();
rectangle rect(0, PCW_PRINTER_WIDTH - 1, 0, PCW_PRINTER_HEIGHT - 1);
- state->m_prn_output = auto_bitmap_ind16_alloc(machine,PCW_PRINTER_WIDTH,PCW_PRINTER_HEIGHT);
- state->m_prn_output->fill(1, rect);
+ m_prn_output = auto_bitmap_ind16_alloc(machine(),PCW_PRINTER_WIDTH,PCW_PRINTER_HEIGHT);
+ m_prn_output->fill(1, rect);
}
/* two colours */
@@ -43,9 +42,9 @@ static const rgb_t pcw_palette[PCW_NUM_COLOURS] =
/* Initialise the palette */
-PALETTE_INIT( pcw )
+void pcw_state::palette_init()
{
- palette_set_colors(machine, 0, pcw_palette, ARRAY_LENGTH(pcw_palette));
+ palette_set_colors(machine(), 0, pcw_palette, ARRAY_LENGTH(pcw_palette));
}
/***************************************************************************
diff --git a/src/mess/video/pcw16.c b/src/mess/video/pcw16.c
index 16fffc34b5a..07587e3b3b7 100644
--- a/src/mess/video/pcw16.c
+++ b/src/mess/video/pcw16.c
@@ -54,12 +54,12 @@ INLINE void pcw16_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color)
}
/* Initialise the palette */
-PALETTE_INIT( pcw16 )
+void pcw16_state::palette_init()
{
- palette_set_colors(machine, 0, pcw16_palette, ARRAY_LENGTH(pcw16_palette));
+ palette_set_colors(machine(), 0, pcw16_palette, ARRAY_LENGTH(pcw16_palette));
}
-VIDEO_START( pcw16 )
+void pcw16_state::video_start()
{
}
diff --git a/src/mess/video/pdp1.c b/src/mess/video/pdp1.c
index cd8e09bde8e..d17cd45e4d4 100644
--- a/src/mess/video/pdp1.c
+++ b/src/mess/video/pdp1.c
@@ -41,22 +41,21 @@ INLINE void pdp1_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color)
/*
video init
*/
-VIDEO_START( pdp1 )
+void pdp1_state::video_start()
{
- pdp1_state *state = machine.driver_data<pdp1_state>();
- state->m_typewriter_color = color_typewriter_black;
+ m_typewriter_color = color_typewriter_black;
/* alloc bitmaps for our private fun */
- state->m_panel_bitmap.allocate(panel_window_width, panel_window_height, BITMAP_FORMAT_IND16);
- state->m_typewriter_bitmap.allocate(typewriter_window_width, typewriter_window_height, BITMAP_FORMAT_IND16);
+ m_panel_bitmap.allocate(panel_window_width, panel_window_height, BITMAP_FORMAT_IND16);
+ m_typewriter_bitmap.allocate(typewriter_window_width, typewriter_window_height, BITMAP_FORMAT_IND16);
/* set up out bitmaps */
- pdp1_draw_panel_backdrop(machine, state->m_panel_bitmap);
+ pdp1_draw_panel_backdrop(machine(), m_panel_bitmap);
const rectangle typewriter_bitmap_bounds(0, typewriter_window_width-1, 0, typewriter_window_height-1);
- state->m_typewriter_bitmap.fill(pen_typewriter_bg, typewriter_bitmap_bounds);
+ m_typewriter_bitmap.fill(pen_typewriter_bg, typewriter_bitmap_bounds);
- state->m_crt = machine.device("crt");
+ m_crt = machine().device("crt");
}
diff --git a/src/mess/video/pecom.c b/src/mess/video/pecom.c
index b9e027dc125..811ce07bf5a 100644
--- a/src/mess/video/pecom.c
+++ b/src/mess/video/pecom.c
@@ -94,23 +94,22 @@ static CDP1869_INTERFACE( pecom_cdp1869_intf )
DEVCB_LINE(pecom_prd_w)
};
-static VIDEO_START( pecom )
+VIDEO_START_MEMBER(pecom_state,pecom)
{
- pecom_state *state = machine.driver_data<pecom_state>();
/* allocate memory */
- state->m_charram = auto_alloc_array(machine, UINT8, PECOM_CHAR_RAM_SIZE);
+ m_charram = auto_alloc_array(machine(), UINT8, PECOM_CHAR_RAM_SIZE);
/* register for state saving */
- state->save_item(NAME(state->m_reset));
- state->save_item(NAME(state->m_dma));
- state->save_pointer(NAME(state->m_charram), PECOM_CHAR_RAM_SIZE);
+ save_item(NAME(m_reset));
+ save_item(NAME(m_dma));
+ save_pointer(NAME(m_charram), PECOM_CHAR_RAM_SIZE);
}
MACHINE_CONFIG_FRAGMENT( pecom_video )
MCFG_CDP1869_SCREEN_PAL_ADD(CDP1869_TAG, SCREEN_TAG, CDP1869_DOT_CLK_PAL)
- MCFG_VIDEO_START(pecom)
+ MCFG_VIDEO_START_OVERRIDE(pecom_state,pecom)
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mess/video/pk8020.c b/src/mess/video/pk8020.c
index bbb55d0c138..a265879ea33 100644
--- a/src/mess/video/pk8020.c
+++ b/src/mess/video/pk8020.c
@@ -11,7 +11,7 @@
#include "includes/pk8020.h"
#include "machine/ram.h"
-VIDEO_START( pk8020 )
+void pk8020_state::video_start()
{
}
@@ -49,10 +49,10 @@ SCREEN_UPDATE_IND16( pk8020 )
return 0;
}
-PALETTE_INIT( pk8020 )
+void pk8020_state::palette_init()
{
int i;
for(i=0;i<16;i++) {
- palette_set_color( machine, i, MAKE_RGB(i*0x10,i*0x10,i*0x10) );
+ palette_set_color( machine(), i, MAKE_RGB(i*0x10,i*0x10,i*0x10) );
}
}
diff --git a/src/mess/video/pmd85.c b/src/mess/video/pmd85.c
index 7ead1c05c4f..36fc4d71945 100644
--- a/src/mess/video/pmd85.c
+++ b/src/mess/video/pmd85.c
@@ -19,16 +19,16 @@ const unsigned char pmd85_palette[3*3] =
0xff, 0xff, 0xff
};
-PALETTE_INIT( pmd85 )
+void pmd85_state::palette_init()
{
int i;
for ( i = 0; i < sizeof(pmd85_palette) / 3; i++ ) {
- palette_set_color_rgb(machine, i, pmd85_palette[i*3], pmd85_palette[i*3+1], pmd85_palette[i*3+2]);
+ palette_set_color_rgb(machine(), i, pmd85_palette[i*3], pmd85_palette[i*3+1], pmd85_palette[i*3+2]);
}
}
-VIDEO_START( pmd85 )
+void pmd85_state::video_start()
{
}
diff --git a/src/mess/video/poly88.c b/src/mess/video/poly88.c
index 40f7180537b..dbbbdee9dc5 100644
--- a/src/mess/video/poly88.c
+++ b/src/mess/video/poly88.c
@@ -21,10 +21,9 @@ static const UINT8 mcm6571a_shift[] =
1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0
};
-VIDEO_START( poly88 )
+void poly88_state::video_start()
{
- poly88_state *state = machine.driver_data<poly88_state>();
- state->m_FNT = state->memregion("chargen")->base();
+ m_FNT = memregion("chargen")->base();
}
SCREEN_UPDATE_IND16( poly88 )
diff --git a/src/mess/video/pp01.c b/src/mess/video/pp01.c
index 915c4ad791f..4f03d1dda6a 100644
--- a/src/mess/video/pp01.c
+++ b/src/mess/video/pp01.c
@@ -11,7 +11,7 @@
#include "includes/pp01.h"
#include "machine/ram.h"
-VIDEO_START( pp01 )
+void pp01_state::video_start()
{
}
@@ -51,7 +51,7 @@ static const rgb_t pp01_palette[8] = {
MAKE_RGB(0x80, 0x80, 0x80), // 7
};
-PALETTE_INIT( pp01 )
+void pp01_state::palette_init()
{
- palette_set_colors(machine, 0, pp01_palette, ARRAY_LENGTH(pp01_palette));
+ palette_set_colors(machine(), 0, pp01_palette, ARRAY_LENGTH(pp01_palette));
}
diff --git a/src/mess/video/radio86.c b/src/mess/video/radio86.c
index 98ea47de9fe..1e80a99efe4 100644
--- a/src/mess/video/radio86.c
+++ b/src/mess/video/radio86.c
@@ -122,8 +122,8 @@ static const rgb_t radio86_palette[3] = {
MAKE_RGB(0xff, 0xff, 0xff) // highlight
};
-PALETTE_INIT( radio86 )
+PALETTE_INIT_MEMBER(radio86_state,radio86)
{
- palette_set_colors(machine, 0, radio86_palette, ARRAY_LENGTH(radio86_palette));
+ palette_set_colors(machine(), 0, radio86_palette, ARRAY_LENGTH(radio86_palette));
}
diff --git a/src/mess/video/rmnimbus.c b/src/mess/video/rmnimbus.c
index 1da619921fb..cdddfa38e25 100644
--- a/src/mess/video/rmnimbus.c
+++ b/src/mess/video/rmnimbus.c
@@ -628,28 +628,26 @@ static void video_regdump(running_machine &machine, int ref, int params, const c
}
}
-VIDEO_START( nimbus )
+void rmnimbus_state::video_start()
{
- rmnimbus_state *state = machine.driver_data<rmnimbus_state>();
- state->m_debug_video=0;
+ m_debug_video=0;
logerror("VIDEO_START\n");
- if (machine.debug_flags & DEBUG_FLAG_ENABLED)
+ if (machine().debug_flags & DEBUG_FLAG_ENABLED)
{
- debug_console_register_command(machine, "nimbus_vid_debug", CMDFLAG_NONE, 0, 0, 1, video_debug);
- debug_console_register_command(machine, "nimbus_vid_regdump", CMDFLAG_NONE, 0, 0, 1, video_regdump);
+ debug_console_register_command(machine(), "nimbus_vid_debug", CMDFLAG_NONE, 0, 0, 1, video_debug);
+ debug_console_register_command(machine(), "nimbus_vid_regdump", CMDFLAG_NONE, 0, 0, 1, video_regdump);
}
}
-VIDEO_RESET( nimbus )
+void rmnimbus_state::video_reset()
{
- rmnimbus_state *state = machine.driver_data<rmnimbus_state>();
// When we reset clear the video registers and video memory.
- memset(&state->m_vidregs,0x00,sizeof(state->m_vidregs));
- memset(&state->m_video_mem,0,sizeof(state->m_video_mem));
+ memset(&m_vidregs,0x00,sizeof(m_vidregs));
+ memset(&m_video_mem,0,sizeof(m_video_mem));
- state->m_bpp=4; // bits per pixel
+ m_bpp=4; // bits per pixel
logerror("Video reset\n");
}
diff --git a/src/mess/video/sapi1.c b/src/mess/video/sapi1.c
index 1530ed4f8a2..176c7dedaff 100644
--- a/src/mess/video/sapi1.c
+++ b/src/mess/video/sapi1.c
@@ -84,10 +84,9 @@ static const UINT8 MHB2501[] = {
};
-VIDEO_START( sapi1 )
+VIDEO_START_MEMBER(sapi1_state,sapi1)
{
- sapi1_state *state = machine.driver_data<sapi1_state>();
- state->m_refresh_counter = 0;
+ m_refresh_counter = 0;
}
SCREEN_UPDATE_IND16( sapi1 )
@@ -140,7 +139,7 @@ SCREEN_UPDATE_IND16( sapi1 )
}
-VIDEO_START( sapizps3 )
+VIDEO_START_MEMBER(sapi1_state,sapizps3)
{
}
diff --git a/src/mess/video/special.c b/src/mess/video/special.c
index dae46d939ff..5237ddce0ac 100644
--- a/src/mess/video/special.c
+++ b/src/mess/video/special.c
@@ -10,7 +10,7 @@
#include "includes/special.h"
-VIDEO_START( special )
+VIDEO_START_MEMBER(special_state,special)
{
}
@@ -31,7 +31,7 @@ SCREEN_UPDATE_IND16( special )
}
return 0;
}
-VIDEO_START( specialp )
+VIDEO_START_MEMBER(special_state,specialp)
{
}
@@ -73,17 +73,16 @@ const rgb_t specimx_palette[16] = {
MAKE_RGB(0xff, 0xff, 0xff) // F
};
-PALETTE_INIT( specimx )
+PALETTE_INIT_MEMBER(special_state,specimx)
{
- palette_set_colors(machine, 0, specimx_palette, ARRAY_LENGTH(specimx_palette));
+ palette_set_colors(machine(), 0, specimx_palette, ARRAY_LENGTH(specimx_palette));
}
-VIDEO_START( specimx )
+VIDEO_START_MEMBER(special_state,specimx)
{
- special_state *state = machine.driver_data<special_state>();
- state->m_specimx_colorram = auto_alloc_array(machine, UINT8, 0x3000);
- memset(state->m_specimx_colorram,0x70,0x3000);
+ m_specimx_colorram = auto_alloc_array(machine(), UINT8, 0x3000);
+ memset(m_specimx_colorram,0x70,0x3000);
}
SCREEN_UPDATE_IND16( specimx )
@@ -116,13 +115,13 @@ static const rgb_t erik_palette[8] = {
MAKE_RGB(0xff, 0xff, 0xff) // 7
};
-PALETTE_INIT( erik )
+PALETTE_INIT_MEMBER(special_state,erik)
{
- palette_set_colors(machine, 0, erik_palette, ARRAY_LENGTH(erik_palette));
+ palette_set_colors(machine(), 0, erik_palette, ARRAY_LENGTH(erik_palette));
}
-VIDEO_START( erik )
+VIDEO_START_MEMBER(special_state,erik)
{
}
diff --git a/src/mess/video/spectrum.c b/src/mess/video/spectrum.c
index 6fbed0a07c4..b5d32100ebe 100644
--- a/src/mess/video/spectrum.c
+++ b/src/mess/video/spectrum.c
@@ -19,32 +19,30 @@
/***************************************************************************
Start the video hardware emulation.
***************************************************************************/
-VIDEO_START( spectrum )
+VIDEO_START_MEMBER(spectrum_state,spectrum)
{
- spectrum_state *state = machine.driver_data<spectrum_state>();
- state->m_LastDisplayedBorderColor = -1;
- state->m_frame_invert_count = 25;
- state->m_frame_number = 0;
- state->m_flash_invert = 0;
+ m_LastDisplayedBorderColor = -1;
+ m_frame_invert_count = 25;
+ m_frame_number = 0;
+ m_flash_invert = 0;
- spectrum_EventList_Initialise(machine, 30000);
+ spectrum_EventList_Initialise(machine(), 30000);
- state->m_retrace_cycles = SPEC_RETRACE_CYCLES;
+ m_retrace_cycles = SPEC_RETRACE_CYCLES;
- state->m_screen_location = state->m_video_ram;
+ m_screen_location = m_video_ram;
}
-VIDEO_START( spectrum_128 )
+VIDEO_START_MEMBER(spectrum_state,spectrum_128)
{
- spectrum_state *state = machine.driver_data<spectrum_state>();
- state->m_LastDisplayedBorderColor = -1;
- state->m_frame_invert_count = 25;
- state->m_frame_number = 0;
- state->m_flash_invert = 0;
+ m_LastDisplayedBorderColor = -1;
+ m_frame_invert_count = 25;
+ m_frame_number = 0;
+ m_flash_invert = 0;
- spectrum_EventList_Initialise(machine, 30000);
+ spectrum_EventList_Initialise(machine(), 30000);
- state->m_retrace_cycles = SPEC128_RETRACE_CYCLES;
+ m_retrace_cycles = SPEC128_RETRACE_CYCLES;
}
@@ -191,9 +189,9 @@ static const rgb_t spectrum_palette[16] = {
MAKE_RGB(0xff, 0xff, 0xff)
};
/* Initialise the palette */
-PALETTE_INIT( spectrum )
+PALETTE_INIT_MEMBER(spectrum_state,spectrum)
{
- palette_set_colors(machine, 0, spectrum_palette, ARRAY_LENGTH(spectrum_palette));
+ palette_set_colors(machine(), 0, spectrum_palette, ARRAY_LENGTH(spectrum_palette));
}
/***************************************************************************
diff --git a/src/mess/video/ssystem3.c b/src/mess/video/ssystem3.c
index 56e046c62de..82d1a3186b2 100644
--- a/src/mess/video/ssystem3.c
+++ b/src/mess/video/ssystem3.c
@@ -36,21 +36,20 @@ static const unsigned char ssystem3_palette[] =
};
-PALETTE_INIT( ssystem3 )
+void ssystem3_state::palette_init()
{
int i;
for ( i = 0; i < sizeof(ssystem3_palette) / 3; i++ ) {
- palette_set_color_rgb(machine, i, ssystem3_palette[i*3], ssystem3_palette[i*3+1], ssystem3_palette[i*3+2]);
+ palette_set_color_rgb(machine(), i, ssystem3_palette[i*3], ssystem3_palette[i*3+1], ssystem3_palette[i*3+2]);
}
}
-VIDEO_START( ssystem3 )
+void ssystem3_state::video_start()
{
- ssystem3_state *state = machine.driver_data<ssystem3_state>();
// artwork seams to need this
- state->m_videoram = auto_alloc_array(machine, UINT8, 6 * 2 + 24);
+ m_videoram = auto_alloc_array(machine(), UINT8, 6 * 2 + 24);
}
diff --git a/src/mess/video/super80.c b/src/mess/video/super80.c
index b5749e72ab3..f3c0a5b8915 100644
--- a/src/mess/video/super80.c
+++ b/src/mess/video/super80.c
@@ -63,9 +63,9 @@ static void palette_set_colors_rgb(running_machine &machine, const UINT8 *colors
}
}
-PALETTE_INIT( super80m )
+PALETTE_INIT_MEMBER(super80_state,super80m)
{
- palette_set_colors_rgb(machine, super80_rgb_palette);
+ palette_set_colors_rgb(machine(), super80_rgb_palette);
}
@@ -280,11 +280,10 @@ SCREEN_UPDATE_IND16( super80m )
return 0;
}
-VIDEO_START( super80 )
+VIDEO_START_MEMBER(super80_state,super80)
{
- super80_state *state = machine.driver_data<super80_state>();
- state->m_vidpg = 0xfe00;
- state->m_p_chargen = state->memregion("chargen")->base();
+ m_vidpg = 0xfe00;
+ m_p_chargen = memregion("chargen")->base();
}
/**************************** I/O PORTS *****************************************************************/
@@ -378,12 +377,11 @@ void super80_state::mc6845_cursor_configure()
if (curs_type == 3) for (i = r11; i < r10;i++) m_mc6845_cursor[i]=0; // now take a bite out of the middle
}
-VIDEO_START( super80v )
+VIDEO_START_MEMBER(super80_state,super80v)
{
- super80_state *state = machine.driver_data<super80_state>();
- state->m_p_pcgram = machine.root_device().memregion("maincpu")->base()+0xf000;
- state->m_p_videoram = machine.root_device().memregion("videoram")->base();
- state->m_p_colorram = state->memregion("colorram")->base();
+ m_p_pcgram = machine().root_device().memregion("maincpu")->base()+0xf000;
+ m_p_videoram = machine().root_device().memregion("videoram")->base();
+ m_p_colorram = memregion("colorram")->base();
}
SCREEN_UPDATE_RGB32( super80v )
diff --git a/src/mess/video/ti85.c b/src/mess/video/ti85.c
index 480c637660b..8b3335083f8 100644
--- a/src/mess/video/ti85.c
+++ b/src/mess/video/ti85.c
@@ -97,43 +97,42 @@ static const unsigned short ti85_palette[32][7] =
{ 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf }
};
-PALETTE_INIT( ti85 )
+void ti85_state::palette_init()
{
- ti85_state *state = machine.driver_data<ti85_state>();
UINT8 i, j, r, g, b;
- machine.colortable = colortable_alloc(machine, 224);
+ machine().colortable = colortable_alloc(machine(), 224);
for ( i = 0; i < 224; i++ )
{
r = ti85_colors[i][0]; g = ti85_colors[i][1]; b = ti85_colors[i][2];
- colortable_palette_set_color(machine.colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
}
for (i=0; i < 32; i++)
for (j=0; j < 7; j++)
- colortable_entry_set_value(machine.colortable, i*7+j, ti85_palette[i][j]);
+ colortable_entry_set_value(machine().colortable, i*7+j, ti85_palette[i][j]);
- if (!strncmp(machine.system().name, "ti81", 4))
+ if (!strncmp(machine().system().name, "ti81", 4))
{
- state->m_ti_video_memory_size = TI81_VIDEO_MEMORY_SIZE;
- state->m_ti_screen_x_size = TI81_SCREEN_X_SIZE;
- state->m_ti_screen_y_size = TI81_SCREEN_Y_SIZE;
- state->m_ti_number_of_frames = TI81_NUMBER_OF_FRAMES;
+ m_ti_video_memory_size = TI81_VIDEO_MEMORY_SIZE;
+ m_ti_screen_x_size = TI81_SCREEN_X_SIZE;
+ m_ti_screen_y_size = TI81_SCREEN_Y_SIZE;
+ m_ti_number_of_frames = TI81_NUMBER_OF_FRAMES;
}
- else if (!strncmp(machine.system().name, "ti85", 4))
+ else if (!strncmp(machine().system().name, "ti85", 4))
{
- state->m_ti_video_memory_size = TI85_VIDEO_MEMORY_SIZE;
- state->m_ti_screen_x_size = TI85_SCREEN_X_SIZE;
- state->m_ti_screen_y_size = TI85_SCREEN_Y_SIZE;
- state->m_ti_number_of_frames = TI85_NUMBER_OF_FRAMES;
+ m_ti_video_memory_size = TI85_VIDEO_MEMORY_SIZE;
+ m_ti_screen_x_size = TI85_SCREEN_X_SIZE;
+ m_ti_screen_y_size = TI85_SCREEN_Y_SIZE;
+ m_ti_number_of_frames = TI85_NUMBER_OF_FRAMES;
}
- else if (!strncmp(machine.system().name, "ti86", 4))
+ else if (!strncmp(machine().system().name, "ti86", 4))
{
- state->m_ti_video_memory_size = TI86_VIDEO_MEMORY_SIZE;
- state->m_ti_screen_x_size = TI86_SCREEN_X_SIZE;
- state->m_ti_screen_y_size = TI86_SCREEN_Y_SIZE;
- state->m_ti_number_of_frames = TI86_NUMBER_OF_FRAMES;
+ m_ti_video_memory_size = TI86_VIDEO_MEMORY_SIZE;
+ m_ti_screen_x_size = TI86_SCREEN_X_SIZE;
+ m_ti_screen_y_size = TI86_SCREEN_Y_SIZE;
+ m_ti_number_of_frames = TI86_NUMBER_OF_FRAMES;
}
else
{
@@ -141,10 +140,10 @@ PALETTE_INIT( ti85 )
return;
}
- state->m_frames = auto_alloc_array_clear(machine, UINT8, state->m_ti_number_of_frames*state->m_ti_video_memory_size);
+ m_frames = auto_alloc_array_clear(machine(), UINT8, m_ti_number_of_frames*m_ti_video_memory_size);
}
-VIDEO_START( ti85 )
+void ti85_state::video_start()
{
}
@@ -189,8 +188,8 @@ SCREEN_UPDATE_IND16( ti85 )
return 0;
}
-PALETTE_INIT( ti82 )
+PALETTE_INIT_MEMBER(ti85_state,ti82)
{
- palette_set_color(machine, 0, MAKE_RGB(160, 190, 170));
- palette_set_color(machine, 1, MAKE_RGB(83, 111, 138));
+ palette_set_color(machine(), 0, MAKE_RGB(160, 190, 170));
+ palette_set_color(machine(), 1, MAKE_RGB(83, 111, 138));
}
diff --git a/src/mess/video/timex.c b/src/mess/video/timex.c
index 79455ee29fd..4ba932594a0 100644
--- a/src/mess/video/timex.c
+++ b/src/mess/video/timex.c
@@ -23,11 +23,10 @@ INLINE void spectrum_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color
}
/* Update FLASH status for ts2068. Assumes flash update every 1/2s. */
-VIDEO_START( ts2068 )
+VIDEO_START_MEMBER(spectrum_state,ts2068)
{
- spectrum_state *state = machine.driver_data<spectrum_state>();
- VIDEO_START_CALL( spectrum );
- state->m_frame_invert_count = 30;
+ VIDEO_START_CALL_MEMBER( spectrum );
+ m_frame_invert_count = 30;
}
diff --git a/src/mess/video/trs80.c b/src/mess/video/trs80.c
index 2e7fa694a8d..05ef2fac462 100644
--- a/src/mess/video/trs80.c
+++ b/src/mess/video/trs80.c
@@ -42,12 +42,11 @@ WRITE8_MEMBER( trs80_state::trs80m4_88_w )
}
-VIDEO_START( trs80 )
+void trs80_state::video_start()
{
- trs80_state *state = machine.driver_data<trs80_state>();
- state->m_p_chargen = state->memregion("chargen")->base();
- state->m_size_store = 0xff;
- state->m_mode &= 2;
+ m_p_chargen = memregion("chargen")->base();
+ m_size_store = 0xff;
+ m_mode &= 2;
}
@@ -587,7 +586,7 @@ static const rgb_t lnw80_palette[] =
MAKE_RGB(0, 0, 0), // black
};
-PALETTE_INIT( lnw80 )
+PALETTE_INIT_MEMBER(trs80_state,lnw80)
{
- palette_set_colors(machine, 0, lnw80_palette, ARRAY_LENGTH(lnw80_palette));
+ palette_set_colors(machine(), 0, lnw80_palette, ARRAY_LENGTH(lnw80_palette));
}
diff --git a/src/mess/video/tx0.c b/src/mess/video/tx0.c
index 00c791e063d..2d11c94d076 100644
--- a/src/mess/video/tx0.c
+++ b/src/mess/video/tx0.c
@@ -27,22 +27,21 @@ static void tx0_draw_panel(running_machine &machine, bitmap_ind16 &bitmap);
/*
video init
*/
-VIDEO_START( tx0 )
+void tx0_state::video_start()
{
- tx0_state *state = machine.driver_data<tx0_state>();
- state->m_typewriter_color = color_typewriter_black;
+ m_typewriter_color = color_typewriter_black;
/* alloc bitmaps for our private fun */
- state->m_panel_bitmap.allocate(panel_window_width, panel_window_height, BITMAP_FORMAT_IND16);
- state->m_typewriter_bitmap.allocate(typewriter_window_width, typewriter_window_height, BITMAP_FORMAT_IND16);
+ m_panel_bitmap.allocate(panel_window_width, panel_window_height, BITMAP_FORMAT_IND16);
+ m_typewriter_bitmap.allocate(typewriter_window_width, typewriter_window_height, BITMAP_FORMAT_IND16);
/* set up out bitmaps */
- tx0_draw_panel_backdrop(machine, state->m_panel_bitmap);
+ tx0_draw_panel_backdrop(machine(), m_panel_bitmap);
const rectangle typewriter_bitmap_bounds(0, typewriter_window_width-1, 0, typewriter_window_height-1);
- state->m_typewriter_bitmap.fill(pen_typewriter_bg, typewriter_bitmap_bounds);
+ m_typewriter_bitmap.fill(pen_typewriter_bg, typewriter_bitmap_bounds);
- state->m_crt = machine.device("crt");
+ m_crt = machine().device("crt");
}
diff --git a/src/mess/video/ut88.c b/src/mess/video/ut88.c
index 3d77ad5caea..b4b607f0ed6 100644
--- a/src/mess/video/ut88.c
+++ b/src/mess/video/ut88.c
@@ -21,7 +21,7 @@ const gfx_layout ut88_charlayout =
8*8 /* size of one char */
};
-VIDEO_START( ut88 )
+VIDEO_START_MEMBER(ut88_state,ut88)
{
}
diff --git a/src/mess/video/vc4000.c b/src/mess/video/vc4000.c
index 0f52a9ba849..f01dc3b804c 100644
--- a/src/mess/video/vc4000.c
+++ b/src/mess/video/vc4000.c
@@ -22,43 +22,42 @@
-VIDEO_START(vc4000)
+void vc4000_state::video_start()
{
- vc4000_state *state = machine.driver_data<vc4000_state>();
- screen_device *screen = machine.first_screen();
+ screen_device *screen = machine().first_screen();
int i;
for (i=0;i<0x20; i++)
{
- state->m_sprite_collision[i]=0;
- if ((i&3)==3) state->m_sprite_collision[i]|=0x20;
- if ((i&5)==5) state->m_sprite_collision[i]|=0x10;
- if ((i&9)==9) state->m_sprite_collision[i]|=8;
- if ((i&6)==6) state->m_sprite_collision[i]|=4;
- if ((i&0xa)==0xa) state->m_sprite_collision[i]|=2;
- if ((i&0xc)==0xc) state->m_sprite_collision[i]|=1;
- state->m_background_collision[i]=0;
- if ((i&0x11)==0x11) state->m_background_collision[i]|=0x80;
- if ((i&0x12)==0x12) state->m_background_collision[i]|=0x40;
- if ((i&0x14)==0x14) state->m_background_collision[i]|=0x20;
- if ((i&0x18)==0x18) state->m_background_collision[i]|=0x10;
+ m_sprite_collision[i]=0;
+ if ((i&3)==3) m_sprite_collision[i]|=0x20;
+ if ((i&5)==5) m_sprite_collision[i]|=0x10;
+ if ((i&9)==9) m_sprite_collision[i]|=8;
+ if ((i&6)==6) m_sprite_collision[i]|=4;
+ if ((i&0xa)==0xa) m_sprite_collision[i]|=2;
+ if ((i&0xc)==0xc) m_sprite_collision[i]|=1;
+ m_background_collision[i]=0;
+ if ((i&0x11)==0x11) m_background_collision[i]|=0x80;
+ if ((i&0x12)==0x12) m_background_collision[i]|=0x40;
+ if ((i&0x14)==0x14) m_background_collision[i]|=0x20;
+ if ((i&0x18)==0x18) m_background_collision[i]|=0x10;
}
- state->m_joy1_x = STICKCENTRE;
- state->m_joy1_y = STICKCENTRE;
- state->m_joy2_x = STICKCENTRE;
- state->m_joy2_y = STICKCENTRE;
+ m_joy1_x = STICKCENTRE;
+ m_joy1_y = STICKCENTRE;
+ m_joy2_x = STICKCENTRE;
+ m_joy2_y = STICKCENTRE;
- memset(&state->m_video, 0, sizeof(state->m_video));
+ memset(&m_video, 0, sizeof(m_video));
for (i=0; i<3; i++)
{
- state->m_video.sprites[i].data = &state->m_video.reg.d.sprites[i];
- state->m_video.sprites[i].mask = 1 << i;
+ m_video.sprites[i].data = &m_video.reg.d.sprites[i];
+ m_video.sprites[i].mask = 1 << i;
}
- state->m_video.sprites[3].data = &state->m_video.reg.d.sprite4;
- state->m_video.sprites[3].mask = 1 << 3;
+ m_video.sprites[3].data = &m_video.reg.d.sprite4;
+ m_video.sprites[3].mask = 1 << 3;
- state->m_bitmap = auto_bitmap_ind16_alloc(machine, screen->width(), screen->height());
+ m_bitmap = auto_bitmap_ind16_alloc(machine(), screen->width(), screen->height());
}
INLINE UINT8 vc4000_joystick_return_to_centre(UINT8 joy)
diff --git a/src/mess/video/vector06.c b/src/mess/video/vector06.c
index 3446fbbaa37..a2ba2ad50c8 100644
--- a/src/mess/video/vector06.c
+++ b/src/mess/video/vector06.c
@@ -10,7 +10,7 @@
#include "includes/vector06.h"
-VIDEO_START( vector06 )
+void vector06_state::video_start()
{
}
@@ -53,8 +53,8 @@ SCREEN_UPDATE_IND16( vector06 )
return 0;
}
-PALETTE_INIT( vector06 )
+void vector06_state::palette_init()
{
for (UINT8 i=0; i<16; i++)
- palette_set_color( machine, i, RGB_BLACK );
+ palette_set_color( machine(), i, RGB_BLACK );
}
diff --git a/src/mess/video/vtech2.c b/src/mess/video/vtech2.c
index f24e0d786e3..a68037d2409 100644
--- a/src/mess/video/vtech2.c
+++ b/src/mess/video/vtech2.c
@@ -40,7 +40,7 @@
* 1 1 1 1 GR1 bank 3 0E000-0FFFF
*/
-VIDEO_START( laser )
+void vtech2_state::video_start()
{
}
diff --git a/src/mess/video/x68k.c b/src/mess/video/x68k.c
index 09cb0e5f2bb..68d0b048509 100644
--- a/src/mess/video/x68k.c
+++ b/src/mess/video/x68k.c
@@ -1054,7 +1054,7 @@ static void x68k_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, in
}
}
-PALETTE_INIT( x68000 )
+PALETTE_INIT_MEMBER(x68k_state,x68000)
{
int pal;
int r,g,b;
@@ -1064,7 +1064,7 @@ PALETTE_INIT( x68000 )
g = (pal & 0x7c00) >> 7;
r = (pal & 0x03e0) >> 2;
b = (pal & 0x001f) << 3;
- palette_set_color_rgb(machine,pal+512,r,g,b);
+ palette_set_color_rgb(machine(),pal+512,r,g,b);
}
}
@@ -1130,35 +1130,34 @@ TILE_GET_INFO_MEMBER(x68k_state::x68k_get_bg1_tile_16)
SET_TILE_INFO_MEMBER(1,code,colour+16,flags);
}
-VIDEO_START( x68000 )
+VIDEO_START_MEMBER(x68k_state,x68000)
{
- x68k_state *state = machine.driver_data<x68k_state>();
int gfx_index;
for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
- if (machine.gfx[gfx_index] == 0)
+ if (machine().gfx[gfx_index] == 0)
break;
/* create the char set (gfx will then be updated dynamically from RAM) */
- machine.gfx[gfx_index] = auto_alloc(machine, gfx_element(machine, x68k_pcg_8, machine.root_device().memregion("user1")->base(), 32, 0));
+ machine().gfx[gfx_index] = auto_alloc(machine(), gfx_element(machine(), x68k_pcg_8, machine().root_device().memregion("user1")->base(), 32, 0));
gfx_index++;
- machine.gfx[gfx_index] = auto_alloc(machine, gfx_element(machine, x68k_pcg_16, state->memregion("user1")->base(), 32, 0));
- machine.gfx[gfx_index]->set_colors(32);
+ machine().gfx[gfx_index] = auto_alloc(machine(), gfx_element(machine(), x68k_pcg_16, memregion("user1")->base(), 32, 0));
+ machine().gfx[gfx_index]->set_colors(32);
/* Tilemaps */
- state->m_bg0_8 = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(x68k_state::x68k_get_bg0_tile),state),TILEMAP_SCAN_ROWS,8,8,64,64);
- state->m_bg1_8 = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(x68k_state::x68k_get_bg1_tile),state),TILEMAP_SCAN_ROWS,8,8,64,64);
- state->m_bg0_16 = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(x68k_state::x68k_get_bg0_tile_16),state),TILEMAP_SCAN_ROWS,16,16,64,64);
- state->m_bg1_16 = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(x68k_state::x68k_get_bg1_tile_16),state),TILEMAP_SCAN_ROWS,16,16,64,64);
+ m_bg0_8 = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(x68k_state::x68k_get_bg0_tile),this),TILEMAP_SCAN_ROWS,8,8,64,64);
+ m_bg1_8 = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(x68k_state::x68k_get_bg1_tile),this),TILEMAP_SCAN_ROWS,8,8,64,64);
+ m_bg0_16 = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(x68k_state::x68k_get_bg0_tile_16),this),TILEMAP_SCAN_ROWS,16,16,64,64);
+ m_bg1_16 = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(x68k_state::x68k_get_bg1_tile_16),this),TILEMAP_SCAN_ROWS,16,16,64,64);
- state->m_bg0_8->set_transparent_pen(0);
- state->m_bg1_8->set_transparent_pen(0);
- state->m_bg0_16->set_transparent_pen(0);
- state->m_bg1_16->set_transparent_pen(0);
+ m_bg0_8->set_transparent_pen(0);
+ m_bg1_8->set_transparent_pen(0);
+ m_bg0_16->set_transparent_pen(0);
+ m_bg1_16->set_transparent_pen(0);
-// state->m_scanline_timer->adjust(attotime::zero, 0, attotime::from_hz(55.45)/568);
+// m_scanline_timer->adjust(attotime::zero, 0, attotime::from_hz(55.45)/568);
}
SCREEN_UPDATE_IND16( x68000 )
diff --git a/src/mess/video/z88.c b/src/mess/video/z88.c
index bb9548455e8..5eee6101db6 100644
--- a/src/mess/video/z88.c
+++ b/src/mess/video/z88.c
@@ -26,11 +26,11 @@ inline UINT8* z88_state::convert_address(UINT32 offset)
***************************************************************************/
// Initialise the palette
-PALETTE_INIT( z88 )
+void z88_state::palette_init()
{
- palette_set_color(machine, 0, MAKE_RGB(138, 146, 148));
- palette_set_color(machine, 1, MAKE_RGB(92, 83, 88));
- palette_set_color(machine, 2, MAKE_RGB(122, 126, 129));
+ palette_set_color(machine(), 0, MAKE_RGB(138, 146, 148));
+ palette_set_color(machine(), 1, MAKE_RGB(92, 83, 88));
+ palette_set_color(machine(), 2, MAKE_RGB(122, 126, 129));
}
/* temp - change to gfxelement structure */
diff --git a/src/mess/video/zx.c b/src/mess/video/zx.c
index a809ba7be29..aa68918f84f 100644
--- a/src/mess/video/zx.c
+++ b/src/mess/video/zx.c
@@ -190,12 +190,11 @@ void zx_ula_r(running_machine &machine, int offs, const char *region, const UINT
}
}
-VIDEO_START( zx )
+void zx_state::video_start()
{
- zx_state *state = machine.driver_data<zx_state>();
- state->m_ula_nmi = machine.scheduler().timer_alloc(FUNC(zx_ula_nmi));
- state->m_ula_irq_active = 0;
- machine.primary_screen->register_screen_bitmap(state->m_bitmap);
+ m_ula_nmi = machine().scheduler().timer_alloc(FUNC(zx_ula_nmi));
+ m_ula_irq_active = 0;
+ machine().primary_screen->register_screen_bitmap(m_bitmap);
}
SCREEN_VBLANK( zx )