summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/drivers/multi16.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2012-09-17 15:00:31 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2012-09-17 15:00:31 +0000
commit5ddbca3e7a2327786fd92cc7443dd84257ba889a (patch)
treef6eb4b827714a8658ea246336342b03d6d7938e0 /src/mess/drivers/multi16.c
parentf27b07d0822f4ff52b95a1a0143f3c2313ea02ce (diff)
Modernized screen update calls (no whatsnew)
Diffstat (limited to 'src/mess/drivers/multi16.c')
-rw-r--r--src/mess/drivers/multi16.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/mess/drivers/multi16.c b/src/mess/drivers/multi16.c
index 3908e71b1c9..8c85f9dc531 100644
--- a/src/mess/drivers/multi16.c
+++ b/src/mess/drivers/multi16.c
@@ -32,6 +32,7 @@ public:
virtual void machine_start();
virtual void machine_reset();
virtual void video_start();
+ UINT32 screen_update_multi16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
};
@@ -39,27 +40,26 @@ void multi16_state::video_start()
{
}
-#define mc6845_h_char_total (state->m_crtc_vreg[0])
-#define mc6845_h_display (state->m_crtc_vreg[1])
-#define mc6845_h_sync_pos (state->m_crtc_vreg[2])
-#define mc6845_sync_width (state->m_crtc_vreg[3])
-#define mc6845_v_char_total (state->m_crtc_vreg[4])
-#define mc6845_v_total_adj (state->m_crtc_vreg[5])
-#define mc6845_v_display (state->m_crtc_vreg[6])
-#define mc6845_v_sync_pos (state->m_crtc_vreg[7])
-#define mc6845_mode_ctrl (state->m_crtc_vreg[8])
-#define mc6845_tile_height (state->m_crtc_vreg[9]+1)
-#define mc6845_cursor_y_start (state->m_crtc_vreg[0x0a])
-#define mc6845_cursor_y_end (state->m_crtc_vreg[0x0b])
-#define mc6845_start_addr (((state->m_crtc_vreg[0x0c]<<8) & 0x3f00) | (state->m_crtc_vreg[0x0d] & 0xff))
-#define mc6845_cursor_addr (((state->m_crtc_vreg[0x0e]<<8) & 0x3f00) | (state->m_crtc_vreg[0x0f] & 0xff))
-#define mc6845_light_pen_addr (((state->m_crtc_vreg[0x10]<<8) & 0x3f00) | (state->m_crtc_vreg[0x11] & 0xff))
-#define mc6845_update_addr (((state->m_crtc_vreg[0x12]<<8) & 0x3f00) | (state->m_crtc_vreg[0x13] & 0xff))
-
-
-static SCREEN_UPDATE_IND16( multi16 )
+#define mc6845_h_char_total (m_crtc_vreg[0])
+#define mc6845_h_display (m_crtc_vreg[1])
+#define mc6845_h_sync_pos (m_crtc_vreg[2])
+#define mc6845_sync_width (m_crtc_vreg[3])
+#define mc6845_v_char_total (m_crtc_vreg[4])
+#define mc6845_v_total_adj (m_crtc_vreg[5])
+#define mc6845_v_display (m_crtc_vreg[6])
+#define mc6845_v_sync_pos (m_crtc_vreg[7])
+#define mc6845_mode_ctrl (m_crtc_vreg[8])
+#define mc6845_tile_height (m_crtc_vreg[9]+1)
+#define mc6845_cursor_y_start (m_crtc_vreg[0x0a])
+#define mc6845_cursor_y_end (m_crtc_vreg[0x0b])
+#define mc6845_start_addr (((m_crtc_vreg[0x0c]<<8) & 0x3f00) | (m_crtc_vreg[0x0d] & 0xff))
+#define mc6845_cursor_addr (((m_crtc_vreg[0x0e]<<8) & 0x3f00) | (m_crtc_vreg[0x0f] & 0xff))
+#define mc6845_light_pen_addr (((m_crtc_vreg[0x10]<<8) & 0x3f00) | (m_crtc_vreg[0x11] & 0xff))
+#define mc6845_update_addr (((m_crtc_vreg[0x12]<<8) & 0x3f00) | (m_crtc_vreg[0x13] & 0xff))
+
+
+UINT32 multi16_state::screen_update_multi16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- multi16_state *state = screen.machine().driver_data<multi16_state>();
int x,y;
int count;
int xi;
@@ -72,7 +72,7 @@ static SCREEN_UPDATE_IND16( multi16 )
{
for(xi=0;xi<16;xi++)
{
- int dot = (BITSWAP16(state->m_p_vram[count],7,6,5,4,3,2,1,0,15,14,13,12,11,10,9,8) >> (15-xi)) & 0x1;
+ int dot = (BITSWAP16(m_p_vram[count],7,6,5,4,3,2,1,0,15,14,13,12,11,10,9,8) >> (15-xi)) & 0x1;
if(screen.visible_area().contains(x*16+xi, y))
bitmap.pix16(y, x*16+xi) = screen.machine().pens[dot];
@@ -171,7 +171,7 @@ static MACHINE_CONFIG_START( multi16, multi16_state )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
MCFG_SCREEN_SIZE(640, 200)
MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 200-1)
- MCFG_SCREEN_UPDATE_STATIC(multi16)
+ MCFG_SCREEN_UPDATE_DRIVER(multi16_state, screen_update_multi16)
MCFG_PALETTE_LENGTH(8)
/* Devices */