diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2012-09-18 08:43:04 +0000 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2012-09-18 08:43:04 +0000 |
commit | 7e40ce54f21d854327fbe56a5c989014602462ff (patch) | |
tree | 310b268b8424a7eb6b8bffd5b87e808b8c7ccb5e /src/mess | |
parent | 8196b6177882559f277b0688f4f210e352cce6be (diff) |
changed most of screen.machine() to machine() (no whatsnew)
Diffstat (limited to 'src/mess')
82 files changed, 254 insertions, 254 deletions
diff --git a/src/mess/drivers/apexc.c b/src/mess/drivers/apexc.c index a4abc82eba8..614c9b8c1fa 100644 --- a/src/mess/drivers/apexc.c +++ b/src/mess/drivers/apexc.c @@ -598,26 +598,26 @@ UINT32 apexc_state::screen_update_apexc(screen_device &screen, bitmap_ind16 &bit char the_char; bitmap.fill(0, /*machine().visible_area*/panel_window); - apexc_draw_string(screen.machine(), bitmap, "power", 8, 0, 0); - apexc_draw_string(screen.machine(), bitmap, "running", 8, 8, 0); - apexc_draw_string(screen.machine(), bitmap, "data :", 0, 24, 0); + apexc_draw_string(machine(), bitmap, "power", 8, 0, 0); + apexc_draw_string(machine(), bitmap, "running", 8, 8, 0); + apexc_draw_string(machine(), bitmap, "data :", 0, 24, 0); copybitmap(bitmap, *m_bitmap, 0, 0, 0, 0, teletyper_window); apexc_draw_led(bitmap, 0, 0, 1); - apexc_draw_led(bitmap, 0, 8, screen.machine().device("maincpu")->state().state_int(APEXC_STATE)); + apexc_draw_led(bitmap, 0, 8, machine().device("maincpu")->state().state_int(APEXC_STATE)); for (i=0; i<32; i++) { apexc_draw_led(bitmap, i*8, 32, (m_panel_data_reg << i) & 0x80000000UL); the_char = '0' + ((i + 1) % 10); - apexc_draw_char(screen.machine(), bitmap, the_char, i*8, 40, 0); + apexc_draw_char(machine(), bitmap, the_char, i*8, 40, 0); if (((i + 1) % 10) == 0) { the_char = '0' + ((i + 1) / 10); - apexc_draw_char(screen.machine(), bitmap, the_char, i*8, 48, 0); + apexc_draw_char(machine(), bitmap, the_char, i*8, 48, 0); } } return 0; diff --git a/src/mess/drivers/bml3.c b/src/mess/drivers/bml3.c index 0d2a0218296..c03772758d6 100644 --- a/src/mess/drivers/bml3.c +++ b/src/mess/drivers/bml3.c @@ -186,8 +186,8 @@ UINT32 bml3_state::screen_update_bml3(screen_device &screen, bitmap_ind16 &bitma { case 0x00: cursor_on = 1; break; //always on case 0x20: cursor_on = 0; break; //always off - case 0x40: if(screen.machine().primary_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink - case 0x60: if(screen.machine().primary_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink + case 0x40: if(machine().primary_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink + case 0x60: if(machine().primary_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink } if(cursor_on) diff --git a/src/mess/drivers/c65.c b/src/mess/drivers/c65.c index cf52f64af08..50b8ab1ee34 100644 --- a/src/mess/drivers/c65.c +++ b/src/mess/drivers/c65.c @@ -234,7 +234,7 @@ static CBM_IEC_INTERFACE( cbm_iec_intf ) UINT32 c65_state::screen_update_c65(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - device_t *vic3 = screen.machine().device("vic3"); + device_t *vic3 = machine().device("vic3"); vic3_video_update(vic3, bitmap, cliprect); return 0; diff --git a/src/mess/drivers/cybiko.c b/src/mess/drivers/cybiko.c index 64a1c5e845f..64a8d63be59 100644 --- a/src/mess/drivers/cybiko.c +++ b/src/mess/drivers/cybiko.c @@ -301,7 +301,7 @@ void cybiko_state::palette_init() UINT32 cybiko_state::screen_update_cybiko(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - hd66421_device *hd66421 = screen.machine().device<hd66421_device>( "hd66421" ); + hd66421_device *hd66421 = machine().device<hd66421_device>( "hd66421" ); hd66421->update_screen(bitmap, cliprect); return 0; } diff --git a/src/mess/drivers/einstein.c b/src/mess/drivers/einstein.c index 28dc76d8f69..7dd4cc01937 100644 --- a/src/mess/drivers/einstein.c +++ b/src/mess/drivers/einstein.c @@ -485,7 +485,7 @@ UINT32 einstein_state::screen_update_einstein2(screen_device &screen, bitmap_rgb if (&screen == m_color_screen) { - tms9929a_device *tms9929a = screen.machine().device<tms9929a_device>( "tms9929a" ); + tms9929a_device *tms9929a = machine().device<tms9929a_device>( "tms9929a" ); const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); bitmap_ind16 &src = tms9929a->get_bitmap(); for (int y = cliprect.min_y; y <= cliprect.max_y; y++) diff --git a/src/mess/drivers/fp6000.c b/src/mess/drivers/fp6000.c index e7c3bb55d4e..3c8696e0a69 100644 --- a/src/mess/drivers/fp6000.c +++ b/src/mess/drivers/fp6000.c @@ -94,7 +94,7 @@ UINT32 fp6000_state::screen_update_fp6000(screen_device &screen, bitmap_ind16 &b int dot = (m_gvram[count] >> (12-xi*4)) & 0xf; if(y < 400 && x*4+xi < 640) /* TODO: safety check */ - bitmap.pix16(y, x*4+xi) = screen.machine().pens[dot]; + bitmap.pix16(y, x*4+xi) = machine().pens[dot]; } count++; @@ -117,7 +117,7 @@ UINT32 fp6000_state::screen_update_fp6000(screen_device &screen, bitmap_ind16 &b if(pen != -1) if(y*mc6845_tile_height < 400 && x*8+xi < 640) /* TODO: safety check */ - bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = screen.machine().pens[pen]; + bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = machine().pens[pen]; } } } @@ -132,7 +132,7 @@ UINT32 fp6000_state::screen_update_fp6000(screen_device &screen, bitmap_ind16 &b { x = mc6845_cursor_addr % mc6845_h_display; y = mc6845_cursor_addr / mc6845_h_display; - bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = screen.machine().pens[7]; + bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = machine().pens[7]; } } } diff --git a/src/mess/drivers/interact.c b/src/mess/drivers/interact.c index 4d0705bff84..38e7a6c50f2 100644 --- a/src/mess/drivers/interact.c +++ b/src/mess/drivers/interact.c @@ -134,7 +134,7 @@ UINT32 interact_state::screen_update_interact(screen_device &screen, bitmap_ind1 { UINT8 *videoram = m_videoram; screen.set_visible_area(0, 113, 0, 75); - hector_hr( screen.machine(), bitmap, videoram, 77, 32); + hector_hr( machine(), bitmap, videoram, 77, 32); return 0; } diff --git a/src/mess/drivers/ipds.c b/src/mess/drivers/ipds.c index 27a5f89a9b8..a2093b63a41 100644 --- a/src/mess/drivers/ipds.c +++ b/src/mess/drivers/ipds.c @@ -117,7 +117,7 @@ const i8275_interface ipds_i8275_interface = UINT32 ipds_state::screen_update_ipds(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - device_t *devconf = screen.machine().device("i8275"); + device_t *devconf = machine().device("i8275"); i8275_update( devconf, bitmap, cliprect); copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect); return 0; diff --git a/src/mess/drivers/itt3030.c b/src/mess/drivers/itt3030.c index eb15a7a334c..6277a4dcb49 100644 --- a/src/mess/drivers/itt3030.c +++ b/src/mess/drivers/itt3030.c @@ -55,16 +55,16 @@ READ8_MEMBER(itt3030_state::unk2_r) return 0x40; } -UINT32 itt3030_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) +UINT32 itt3030_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = *screen.machine().device("maincpu")->memory().space(AS_PROGRAM); + address_space &space = *machine().device("maincpu")->memory().space(AS_PROGRAM); for(int y = 0; y < 24; y++ ) { for(int x = 0; x < 80; x++ ) { UINT8 code = space.read_byte(0x3000 + x + y*128); - drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], code , 0, 0,0, x*8,y*16); + drawgfx_opaque(bitmap, cliprect, machine().gfx[0], code , 0, 0,0, x*8,y*16); } } diff --git a/src/mess/drivers/jr200.c b/src/mess/drivers/jr200.c index d1c5aa28e9f..80555b0ead8 100644 --- a/src/mess/drivers/jr200.c +++ b/src/mess/drivers/jr200.c @@ -158,12 +158,12 @@ UINT32 jr200_state::screen_update_jr200(screen_device &screen, bitmap_ind16 &bit } else // tile mode { - gfx_data = screen.machine().root_device().memregion(attr & 0x40 ? "pcg" : "gfx_ram")->base(); + gfx_data = machine().root_device().memregion(attr & 0x40 ? "pcg" : "gfx_ram")->base(); pen = (gfx_data[(tile*8)+yi]>>(7-xi) & 1) ? (attr & 0x7) : ((attr & 0x38) >> 3); } - bitmap.pix16(y*8+yi+16, x*8+xi+16) = screen.machine().pens[pen]; + bitmap.pix16(y*8+yi+16, x*8+xi+16) = machine().pens[pen]; } } } diff --git a/src/mess/drivers/m20.c b/src/mess/drivers/m20.c index e32a4ac7be0..8d05a6c1da1 100644 --- a/src/mess/drivers/m20.c +++ b/src/mess/drivers/m20.c @@ -112,7 +112,7 @@ UINT32 m20_state::screen_update_m20(screen_device &screen, bitmap_rgb32 &bitmap, UINT8 pen; UINT32 count; - bitmap.fill(get_black_pen(screen.machine()), cliprect); + bitmap.fill(get_black_pen(machine()), cliprect); count = (0); @@ -125,7 +125,7 @@ UINT32 m20_state::screen_update_m20(screen_device &screen, bitmap_rgb32 &bitmap, pen = (m_p_videoram[count]) >> (15 - i) & 1; if (screen.visible_area().contains(x + i, y)) - bitmap.pix32(y, x + i) = screen.machine().pens[pen]; + bitmap.pix32(y, x + i) = machine().pens[pen]; } count++; diff --git a/src/mess/drivers/mbc200.c b/src/mess/drivers/mbc200.c index 9dbc74ce6f8..d1d1e01ff8b 100644 --- a/src/mess/drivers/mbc200.c +++ b/src/mess/drivers/mbc200.c @@ -170,7 +170,7 @@ UINT32 mbc200_state::screen_update_mbc200(screen_device &screen, bitmap_ind16 &b dot = (m_vram[count] >> (7-xi)) & 1; if(y*4+yi < 400 && x*8+xi < 640) /* TODO: safety check */ - bitmap.pix16(y*4+yi, x*8+xi) = screen.machine().pens[dot]; + bitmap.pix16(y*4+yi, x*8+xi) = machine().pens[dot]; } count++; diff --git a/src/mess/drivers/multi16.c b/src/mess/drivers/multi16.c index 8c85f9dc531..49aa682349b 100644 --- a/src/mess/drivers/multi16.c +++ b/src/mess/drivers/multi16.c @@ -75,7 +75,7 @@ UINT32 multi16_state::screen_update_multi16(screen_device &screen, bitmap_ind16 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]; + bitmap.pix16(y, x*16+xi) = machine().pens[dot]; } count++; diff --git a/src/mess/drivers/multi8.c b/src/mess/drivers/multi8.c index 884a023c37e..55e45a3ec0e 100644 --- a/src/mess/drivers/multi8.c +++ b/src/mess/drivers/multi8.c @@ -148,7 +148,7 @@ UINT32 multi8_state::screen_update_multi8(screen_device &screen, bitmap_ind16 &b else color = (pen_b) | (pen_r << 1) | (pen_g << 2); - multi8_draw_pixel(screen.machine(),bitmap, y, x*8+xi,m_pen_clut[color], 0); + multi8_draw_pixel(machine(),bitmap, y, x*8+xi,m_pen_clut[color], 0); } count++; } @@ -176,11 +176,11 @@ UINT32 multi8_state::screen_update_multi8(screen_device &screen, bitmap_ind16 &b pen = (m_p_chargen[tile*8+yi] >> (7-xi) & 1) ? color : 0; if(pen) - multi8_draw_pixel(screen.machine(),bitmap, y*mc6845_tile_height+yi, x*8+xi, pen, (m_display_reg & 0x40) == 0x00); + multi8_draw_pixel(machine(),bitmap, y*mc6845_tile_height+yi, x*8+xi, pen, (m_display_reg & 0x40) == 0x00); } } - //drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], tile,color >> 5, 0, 0, x*8, y*8); + //drawgfx_opaque(bitmap, cliprect, machine().gfx[0], tile,color >> 5, 0, 0, x*8, y*8); // draw cursor if(mc6845_cursor_addr+0xc000 == count) @@ -192,8 +192,8 @@ UINT32 multi8_state::screen_update_multi8(screen_device &screen, bitmap_ind16 &b { case 0x00: cursor_on = 1; break; //always on case 0x20: cursor_on = 0; break; //always off - case 0x40: if(screen.machine().primary_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink - case 0x60: if(screen.machine().primary_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink + case 0x40: if(machine().primary_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink + case 0x60: if(machine().primary_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink } if(cursor_on) @@ -201,7 +201,7 @@ UINT32 multi8_state::screen_update_multi8(screen_device &screen, bitmap_ind16 &b for (yc=0; yc<(mc6845_tile_height-(mc6845_cursor_y_start & 7)); yc++) { for (xc=0; xc<8; xc++) - multi8_draw_pixel(screen.machine(),bitmap, y*mc6845_tile_height+yc, x*8+xc,0x07,(m_display_reg & 0x40) == 0x00); + multi8_draw_pixel(machine(),bitmap, y*mc6845_tile_height+yc, x*8+xc,0x07,(m_display_reg & 0x40) == 0x00); } } diff --git a/src/mess/drivers/myb3k.c b/src/mess/drivers/myb3k.c index f714c5ea71b..1c95437cb74 100644 --- a/src/mess/drivers/myb3k.c +++ b/src/mess/drivers/myb3k.c @@ -91,7 +91,7 @@ UINT32 myb3k_state::screen_update_myb3k(screen_device &screen, bitmap_ind16 &bit dot = 0; if(y*mc6845_tile_height+yi < 200 && x*8+xi < 320) /* TODO: safety check */ - bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = screen.machine().pens[dot]; + bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = machine().pens[dot]; } } } diff --git a/src/mess/drivers/mz2000.c b/src/mess/drivers/mz2000.c index 3b920411cb0..78be141a360 100644 --- a/src/mess/drivers/mz2000.c +++ b/src/mess/drivers/mz2000.c @@ -87,8 +87,8 @@ void mz2000_state::video_start() UINT32 mz2000_state::screen_update_mz2000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT8 *tvram = screen.machine().root_device().memregion("tvram")->base(); - UINT8 *gvram = screen.machine().root_device().memregion("gvram")->base(); + UINT8 *tvram = machine().root_device().memregion("tvram")->base(); + UINT8 *gvram = machine().root_device().memregion("gvram")->base(); UINT8 *gfx_data = memregion("chargen")->base(); int x,y,xi,yi; UINT8 x_size; @@ -108,8 +108,8 @@ UINT32 mz2000_state::screen_update_mz2000(screen_device &screen, bitmap_ind16 &b pen |= ((gvram[count+0xc000] >> (xi)) & 1) ? 4 : 0; //G pen &= m_gvram_mask; - bitmap.pix16(y*2+0, x+xi) = screen.machine().pens[pen]; - bitmap.pix16(y*2+1, x+xi) = screen.machine().pens[pen]; + bitmap.pix16(y*2+0, x+xi) = machine().pens[pen]; + bitmap.pix16(y*2+1, x+xi) = machine().pens[pen]; } count++; } @@ -149,27 +149,27 @@ UINT32 mz2000_state::screen_update_mz2000(screen_device &screen, bitmap_ind16 &b { if(m_width80 == 0) { - bitmap.pix16(res_y, res_x*2+0) = screen.machine().pens[pen]; - bitmap.pix16(res_y, res_x*2+1) = screen.machine().pens[pen]; + bitmap.pix16(res_y, res_x*2+0) = machine().pens[pen]; + bitmap.pix16(res_y, res_x*2+1) = machine().pens[pen]; } else { - bitmap.pix16(res_y, res_x) = screen.machine().pens[pen]; + bitmap.pix16(res_y, res_x) = machine().pens[pen]; } } else { if(m_width80 == 0) { - bitmap.pix16(res_y*2+0, res_x*2+0) = screen.machine().pens[pen]; - bitmap.pix16(res_y*2+0, res_x*2+1) = screen.machine().pens[pen]; - bitmap.pix16(res_y*2+1, res_x*2+0) = screen.machine().pens[pen]; - bitmap.pix16(res_y*2+1, res_x*2+1) = screen.machine().pens[pen]; + bitmap.pix16(res_y*2+0, res_x*2+0) = machine().pens[pen]; + bitmap.pix16(res_y*2+0, res_x*2+1) = machine().pens[pen]; + bitmap.pix16(res_y*2+1, res_x*2+0) = machine().pens[pen]; + bitmap.pix16(res_y*2+1, res_x*2+1) = machine().pens[pen]; } else { - bitmap.pix16(res_y*2+0, res_x) = screen.machine().pens[pen]; - bitmap.pix16(res_y*2+1, res_x) = screen.machine().pens[pen]; + bitmap.pix16(res_y*2+0, res_x) = machine().pens[pen]; + bitmap.pix16(res_y*2+1, res_x) = machine().pens[pen]; } } } diff --git a/src/mess/drivers/mz2500.c b/src/mess/drivers/mz2500.c index 2fbe4f30128..9f8ab7ef96c 100644 --- a/src/mess/drivers/mz2500.c +++ b/src/mess/drivers/mz2500.c @@ -634,11 +634,11 @@ static void draw_cg_screen(running_machine &machine, bitmap_ind16 &bitmap,const UINT32 mz2500_state::screen_update_mz2500(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - bitmap.fill(screen.machine().pens[0], cliprect); //TODO: correct? + bitmap.fill(machine().pens[0], cliprect); //TODO: correct? - draw_cg_screen(screen.machine(),bitmap,cliprect,0); - draw_tv_screen(screen.machine(),bitmap,cliprect); - draw_cg_screen(screen.machine(),bitmap,cliprect,1); + draw_cg_screen(machine(),bitmap,cliprect,0); + draw_tv_screen(machine(),bitmap,cliprect); + draw_cg_screen(machine(),bitmap,cliprect,1); // popmessage("%02x (%02x %02x) (%02x %02x) (%02x %02x) (%02x %02x)",m_cg_reg[0x0f],m_cg_reg[0x10],m_cg_reg[0x11],m_cg_reg[0x12],m_cg_reg[0x13],m_cg_reg[0x14],m_cg_reg[0x15],m_cg_reg[0x16],m_cg_reg[0x17]); // popmessage("%02x",m_text_reg[0x0f]); diff --git a/src/mess/drivers/paso1600.c b/src/mess/drivers/paso1600.c index 5ccfc51aacb..ed7adee43e4 100644 --- a/src/mess/drivers/paso1600.c +++ b/src/mess/drivers/paso1600.c @@ -90,10 +90,10 @@ UINT32 paso1600_state::screen_update_paso1600(screen_device &screen, bitmap_ind1 UINT32 count; static int test_x; - if(screen.machine().input().code_pressed(KEYCODE_Z)) + if(machine().input().code_pressed(KEYCODE_Z)) test_x++; - if(screen.machine().input().code_pressed(KEYCODE_X)) + if(machine().input().code_pressed(KEYCODE_X)) test_x--; popmessage("%d",test_x); @@ -111,7 +111,7 @@ UINT32 paso1600_state::screen_update_paso1600(screen_device &screen, bitmap_ind1 int pen = (m_p_gvram[count] >> xi) & 1; if(y < 475 && x*16+xi < 640) /* TODO: safety check */ - bitmap.pix16(y, x*16+xi) = screen.machine().pens[pen]; + bitmap.pix16(y, x*16+xi) = machine().pens[pen]; } count++; @@ -140,7 +140,7 @@ UINT32 paso1600_state::screen_update_paso1600(screen_device &screen, bitmap_ind1 //if(pen != -1) if(y*19 < 475 && x*8+xi < 640) /* TODO: safety check */ - bitmap.pix16(y*19+yi, x*8+xi) = screen.machine().pens[pen]; + bitmap.pix16(y*19+yi, x*8+xi) = machine().pens[pen]; } } } @@ -156,7 +156,7 @@ UINT32 paso1600_state::screen_update_paso1600(screen_device &screen, bitmap_ind1 { x = mc6845_cursor_addr % mc6845_h_display; y = mc6845_cursor_addr / mc6845_h_display; - bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = screen.machine().pens[7]; + bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = machine().pens[7]; } } } diff --git a/src/mess/drivers/pasogo.c b/src/mess/drivers/pasogo.c index 132df23f45b..4e421a8f497 100644 --- a/src/mess/drivers/pasogo.c +++ b/src/mess/drivers/pasogo.c @@ -394,7 +394,7 @@ void pasogo_state::palette_init() UINT32 pasogo_state::screen_update_pasogo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { //static int width=-1,height=-1; - UINT8 *rom = screen.machine().root_device().memregion("maincpu")->base()+0xb8000; + UINT8 *rom = machine().root_device().memregion("maincpu")->base()+0xb8000; static const UINT16 c[]={ 3, 0 }; int x,y; // plot_box(bitmap, 0, 0, 64/*bitmap.width*/, bitmap.height, 0); diff --git a/src/mess/drivers/pasopia7.c b/src/mess/drivers/pasopia7.c index 01306186cab..18f9ba2832b 100644 --- a/src/mess/drivers/pasopia7.c +++ b/src/mess/drivers/pasopia7.c @@ -309,16 +309,16 @@ UINT32 pasopia7_state::screen_update_pasopia7(screen_device &screen, bitmap_ind1 { int width; - bitmap.fill(screen.machine().pens[0], cliprect); + bitmap.fill(machine().pens[0], cliprect); width = m_x_width ? 80 : 40; if(m_gfx_mode) - draw_mixed_screen(screen.machine(),bitmap,cliprect,width); + draw_mixed_screen(machine(),bitmap,cliprect,width); else { - draw_cg4_screen(screen.machine(),bitmap,cliprect,width); - draw_tv_screen(screen.machine(),bitmap,cliprect,width); + draw_cg4_screen(machine(),bitmap,cliprect,width); + draw_tv_screen(machine(),bitmap,cliprect,width); } return 0; diff --git a/src/mess/drivers/pc100.c b/src/mess/drivers/pc100.c index b56ce11d4be..bfc4b9d6b21 100644 --- a/src/mess/drivers/pc100.c +++ b/src/mess/drivers/pc100.c @@ -96,7 +96,7 @@ UINT32 pc100_state::screen_update_pc100(screen_device &screen, bitmap_ind16 &bit dot |= pen[pen_i]<<pen_i; if(y < 512 && x*16+xi < 768) /* TODO: safety check */ - bitmap.pix16(y, x*16+xi) = screen.machine().pens[dot]; + bitmap.pix16(y, x*16+xi) = machine().pens[dot]; } count++; diff --git a/src/mess/drivers/pc6001.c b/src/mess/drivers/pc6001.c index 145a279a447..0a5699527bb 100644 --- a/src/mess/drivers/pc6001.c +++ b/src/mess/drivers/pc6001.c @@ -508,7 +508,7 @@ static void pc6001_screen_draw(running_machine &machine, bitmap_ind16 &bitmap,co UINT32 pc6001_state::screen_update_pc6001(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - pc6001_screen_draw(screen.machine(),bitmap,cliprect,1); + pc6001_screen_draw(machine(),bitmap,cliprect,1); return 0; } @@ -551,9 +551,9 @@ UINT32 pc6001_state::screen_update_pc6001m2(screen_device &screen, bitmap_ind16 color |= ((pen[1] & 2) << 2); if (cliprect.contains((x+i)*2+0, y)) - bitmap.pix16(y, (x+i)*2+0) = screen.machine().pens[color]; + bitmap.pix16(y, (x+i)*2+0) = machine().pens[color]; if (cliprect.contains((x+i)*2+1, y)) - bitmap.pix16(y, (x+i)*2+1) = screen.machine().pens[color]; + bitmap.pix16(y, (x+i)*2+1) = machine().pens[color]; } count++; @@ -599,7 +599,7 @@ UINT32 pc6001_state::screen_update_pc6001m2(screen_device &screen, bitmap_ind16 } if (cliprect.contains(x+i, y)) - bitmap.pix16(y, (x+i)) = screen.machine().pens[color]; + bitmap.pix16(y, (x+i)) = machine().pens[color]; } count++; @@ -610,7 +610,7 @@ UINT32 pc6001_state::screen_update_pc6001m2(screen_device &screen, bitmap_ind16 else if(m_exgfx_text_mode) { int xi,yi,pen,fgcol,bgcol,color; - UINT8 *gfx_data = screen.machine().root_device().memregion("gfx1")->base(); + UINT8 *gfx_data = machine().root_device().memregion("gfx1")->base(); for(y=0;y<20;y++) { @@ -639,7 +639,7 @@ UINT32 pc6001_state::screen_update_pc6001m2(screen_device &screen, bitmap_ind16 color = pen ? fgcol : bgcol; if (cliprect.contains(x*8+xi, y*12+yi)) - bitmap.pix16(((y*12+yi)), (x*8+xi)) = screen.machine().pens[color]; + bitmap.pix16(((y*12+yi)), (x*8+xi)) = machine().pens[color]; } } } @@ -648,7 +648,7 @@ UINT32 pc6001_state::screen_update_pc6001m2(screen_device &screen, bitmap_ind16 else { attr = m_video_ram[0]; - pc6001_screen_draw(screen.machine(),bitmap,cliprect,0); + pc6001_screen_draw(machine(),bitmap,cliprect,0); } return 0; @@ -683,7 +683,7 @@ UINT32 pc6001_state::screen_update_pc6001sr(screen_device &screen, bitmap_ind16 color = pen ? fgcol : bgcol; if (cliprect.contains(x*8+xi, y*12+yi)) - bitmap.pix16(((y*12+yi)), (x*8+xi)) = screen.machine().pens[color]; + bitmap.pix16(((y*12+yi)), (x*8+xi)) = machine().pens[color]; } } } @@ -702,42 +702,42 @@ UINT32 pc6001_state::screen_update_pc6001sr(screen_device &screen, bitmap_ind16 color = m_video_ram[count] & 0x0f; if (cliprect.contains(x+0, y+0)) - bitmap.pix16((y+0), (x+0)) = screen.machine().pens[color+0x10]; + bitmap.pix16((y+0), (x+0)) = machine().pens[color+0x10]; color = (m_video_ram[count] & 0xf0) >> 4; if (cliprect.contains(x+1, y+0)) - bitmap.pix16((y+0), (x+1)) = screen.machine().pens[color+0x10]; + bitmap.pix16((y+0), (x+1)) = machine().pens[color+0x10]; color = m_video_ram[count+1] & 0x0f; if (cliprect.contains(x+2, y+0)) - bitmap.pix16((y+0), (x+2)) = screen.machine().pens[color+0x10]; + bitmap.pix16((y+0), (x+2)) = machine().pens[color+0x10]; color = (m_video_ram[count+1] & 0xf0) >> 4; if (cliprect.contains(x+3, y+0)) - bitmap.pix16((y+0), (x+3)) = screen.machine().pens[color+0x10]; + bitmap.pix16((y+0), (x+3)) = machine().pens[color+0x10]; color = m_video_ram[count+2] & 0x0f; if (cliprect.contains(x+0, y+1)) - bitmap.pix16((y+1), (x+0)) = screen.machine().pens[color+0x10]; + bitmap.pix16((y+1), (x+0)) = machine().pens[color+0x10]; color = (m_video_ram[count+2] & 0xf0) >> 4; if (cliprect.contains(x+1, y+1)) - bitmap.pix16((y+1), (x+1)) = screen.machine().pens[color+0x10]; + bitmap.pix16((y+1), (x+1)) = machine().pens[color+0x10]; color = m_video_ram[count+3] & 0x0f; if (cliprect.contains(x+2, y+1)) - bitmap.pix16((y+1), (x+2)) = screen.machine().pens[color+0x10]; + bitmap.pix16((y+1), (x+2)) = machine().pens[color+0x10]; color = (m_video_ram[count+3] & 0xf0) >> 4; if (cliprect.contains(x+3, y+1)) - bitmap.pix16((y+1), (x+3)) = screen.machine().pens[color+0x10]; + bitmap.pix16((y+1), (x+3)) = machine().pens[color+0x10]; count+=4; diff --git a/src/mess/drivers/pc8801.c b/src/mess/drivers/pc8801.c index 66f174370f1..6dbf67a1224 100644 --- a/src/mess/drivers/pc8801.c +++ b/src/mess/drivers/pc8801.c @@ -825,9 +825,9 @@ void pc8801_state::draw_text(bitmap_ind16 &bitmap,int y_size, UINT8 width) } } -UINT32 pc8801_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) +UINT32 pc8801_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - bitmap.fill(screen.machine().pens[0], cliprect); + bitmap.fill(machine().pens[0], cliprect); // popmessage("%04x %04x %02x",m_dma_address[2],m_dma_counter[2],m_dmac_mode); diff --git a/src/mess/drivers/pc88va.c b/src/mess/drivers/pc88va.c index 8c7c8ea5b38..af89c13894a 100644 --- a/src/mess/drivers/pc88va.c +++ b/src/mess/drivers/pc88va.c @@ -447,8 +447,8 @@ UINT32 pc88va_state::screen_update_pc88va(screen_device &screen, bitmap_rgb32 &b { switch(cur_pri_lv & 3) // (palette color mode) { - case 0: draw_text(screen.machine(),bitmap,cliprect); break; - case 1: if(m_tsp.spr_on) { draw_sprites(screen.machine(),bitmap,cliprect); } break; + case 0: draw_text(machine(),bitmap,cliprect); break; + case 1: if(m_tsp.spr_on) { draw_sprites(machine(),bitmap,cliprect); } break; case 2: /* A = graphic 0 */ break; case 3: /* B = graphic 1 */ break; } diff --git a/src/mess/drivers/pk8000.c b/src/mess/drivers/pk8000.c index dc36410cf1f..e92147c7ac9 100644 --- a/src/mess/drivers/pk8000.c +++ b/src/mess/drivers/pk8000.c @@ -331,7 +331,7 @@ void pk8000_state::video_start() UINT32 pk8000_state::screen_update_pk8000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - return pk8000_video_update(screen, bitmap, cliprect, screen.machine().device<ram_device>(RAM_TAG)->pointer()); + return pk8000_video_update(screen, bitmap, cliprect, machine().device<ram_device>(RAM_TAG)->pointer()); } /* Machine driver */ diff --git a/src/mess/drivers/pv1000.c b/src/mess/drivers/pv1000.c index a86405a42c5..54dd3e75e30 100644 --- a/src/mess/drivers/pv1000.c +++ b/src/mess/drivers/pv1000.c @@ -279,12 +279,12 @@ UINT32 pv1000_state::screen_update_pv1000(screen_device &screen, bitmap_ind16 &b if ( tile < 0xe0 ) { tile += ( m_io_regs[7] * 8 ); - drawgfx_opaque( bitmap, cliprect, screen.machine().gfx[0], tile, 0, 0, 0, x*8, y*8 ); + drawgfx_opaque( bitmap, cliprect, machine().gfx[0], tile, 0, 0, 0, x*8, y*8 ); } else { tile -= 0xe0; - drawgfx_opaque( bitmap, cliprect, screen.machine().gfx[1], tile, 0, 0, 0, x*8, y*8 ); + drawgfx_opaque( bitmap, cliprect, machine().gfx[1], tile, 0, 0, 0, x*8, y*8 ); } } } diff --git a/src/mess/drivers/rainbow.c b/src/mess/drivers/rainbow.c index 11bb6bf8757..837393785d6 100644 --- a/src/mess/drivers/rainbow.c +++ b/src/mess/drivers/rainbow.c @@ -207,7 +207,7 @@ void rainbow_state::machine_reset() UINT32 rainbow_state::screen_update_rainbow(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - device_t *devconf = screen.machine().device("vt100_video"); + device_t *devconf = machine().device("vt100_video"); rainbow_video_update( devconf, bitmap, cliprect); return 0; } diff --git a/src/mess/drivers/sm1800.c b/src/mess/drivers/sm1800.c index 9f59571dc0f..752e6b78650 100644 --- a/src/mess/drivers/sm1800.c +++ b/src/mess/drivers/sm1800.c @@ -86,7 +86,7 @@ void sm1800_state::video_start() UINT32 sm1800_state::screen_update_sm1800(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - device_t *devconf = screen.machine().device("i8275"); + device_t *devconf = machine().device("i8275"); i8275_update( devconf, bitmap, cliprect); copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect); return 0; diff --git a/src/mess/drivers/smc777.c b/src/mess/drivers/smc777.c index 20cd1a91945..c8b272ecea9 100644 --- a/src/mess/drivers/smc777.c +++ b/src/mess/drivers/smc777.c @@ -102,12 +102,12 @@ UINT32 smc777_state::screen_update_smc777(screen_device &screen, bitmap_ind16 &b { int x,y,yi; UINT16 count; - UINT8 *vram = screen.machine().root_device().memregion("vram")->base(); - UINT8 *attr = screen.machine().root_device().memregion("attr")->base(); + UINT8 *vram = machine().root_device().memregion("vram")->base(); + UINT8 *attr = machine().root_device().memregion("attr")->base(); UINT8 *gram = memregion("fbuf")->base(); int x_width; - bitmap.fill(screen.machine().pens[m_backdrop_pen], cliprect); + bitmap.fill(machine().pens[m_backdrop_pen], cliprect); x_width = (m_display_reg & 0x80) ? 2 : 4; @@ -125,23 +125,23 @@ UINT32 smc777_state::screen_update_smc777(screen_device &screen, bitmap_ind16 &b /* todo: clean this up! */ if(x_width == 2) { - bitmap.pix16(y+yi+CRTC_MIN_Y, x*2+0+CRTC_MIN_X) = screen.machine().pens[color]; + bitmap.pix16(y+yi+CRTC_MIN_Y, x*2+0+CRTC_MIN_X) = machine().pens[color]; } else { - bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+0+CRTC_MIN_X) = screen.machine().pens[color]; - bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+1+CRTC_MIN_X) = screen.machine().pens[color]; + bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+0+CRTC_MIN_X) = machine().pens[color]; + bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+1+CRTC_MIN_X) = machine().pens[color]; } color = (gram[count] & 0x0f) >> 0; if(x_width == 2) { - bitmap.pix16(y+yi+CRTC_MIN_Y, x*2+1+CRTC_MIN_X) = screen.machine().pens[color]; + bitmap.pix16(y+yi+CRTC_MIN_Y, x*2+1+CRTC_MIN_X) = machine().pens[color]; } else { - bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+2+CRTC_MIN_X) = screen.machine().pens[color]; - bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+3+CRTC_MIN_X) = screen.machine().pens[color]; + bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+2+CRTC_MIN_X) = machine().pens[color]; + bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+3+CRTC_MIN_X) = machine().pens[color]; } count++; @@ -181,20 +181,20 @@ UINT32 smc777_state::screen_update_smc777(screen_device &screen, bitmap_ind16 &b case 3: bk_pen = (color ^ 0xf); break; //complementary } - if(blink && screen.machine().primary_screen->frame_number() & 0x10) //blinking, used by Dragon's Alphabet + if(blink && machine().primary_screen->frame_number() & 0x10) //blinking, used by Dragon's Alphabet color = bk_pen; for(yi=0;yi<8;yi++) { for(xi=0;xi<8;xi++) { - UINT8 *gfx_data = screen.machine().root_device().memregion("pcg")->base(); + UINT8 *gfx_data = machine().root_device().memregion("pcg")->base(); int pen; pen = ((gfx_data[tile*8+yi]>>(7-xi)) & 1) ? (color+m_pal_mode) : bk_pen; if(pen != -1) - bitmap.pix16(y*8+CRTC_MIN_Y+yi, x*8+CRTC_MIN_X+xi) = screen.machine().pens[pen]; + bitmap.pix16(y*8+CRTC_MIN_Y+yi, x*8+CRTC_MIN_X+xi) = machine().pens[pen]; } } @@ -208,8 +208,8 @@ UINT32 smc777_state::screen_update_smc777(screen_device &screen, bitmap_ind16 &b { case 0x00: cursor_on = 1; break; //always on case 0x20: cursor_on = 0; break; //always off - case 0x40: if(screen.machine().primary_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink - case 0x60: if(screen.machine().primary_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink + case 0x40: if(machine().primary_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink + case 0x60: if(machine().primary_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink } if(cursor_on) @@ -218,7 +218,7 @@ UINT32 smc777_state::screen_update_smc777(screen_device &screen, bitmap_ind16 &b { for(xc=0;xc<8;xc++) { - bitmap.pix16(y*8+CRTC_MIN_Y-yc+7, x*8+CRTC_MIN_X+xc) = screen.machine().pens[0x7]; + bitmap.pix16(y*8+CRTC_MIN_Y-yc+7, x*8+CRTC_MIN_X+xc) = machine().pens[0x7]; } } } diff --git a/src/mess/drivers/ssem.c b/src/mess/drivers/ssem.c index fe9d8d191c5..b315aed26b6 100644 --- a/src/mess/drivers/ssem.c +++ b/src/mess/drivers/ssem.c @@ -446,7 +446,7 @@ static void glyph_print(running_machine &machine, bitmap_rgb32 &bitmap, INT32 x, UINT32 ssem_state::screen_update_ssem(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { UINT32 line = 0; - device_t *ssem_cpu = screen.machine().device("maincpu"); + device_t *ssem_cpu = machine().device("maincpu"); UINT32 accum = ssem_cpu->state().state_int(SSEM_A); UINT32 bit = 0; UINT32 word = 0; @@ -461,11 +461,11 @@ UINT32 ssem_state::screen_update_ssem(screen_device &screen, bitmap_rgb32 &bitma { if(word & (1 << (31 - bit))) { - glyph_print(screen.machine(), bitmap, bit << 3, line << 3, "%c", line == m_store_line ? 4 : 2); + glyph_print(machine(), bitmap, bit << 3, line << 3, "%c", line == m_store_line ? 4 : 2); } else { - glyph_print(screen.machine(), bitmap, bit << 3, line << 3, "%c", line == m_store_line ? 3 : 1); + glyph_print(machine(), bitmap, bit << 3, line << 3, "%c", line == m_store_line ? 3 : 1); } } } @@ -474,11 +474,11 @@ UINT32 ssem_state::screen_update_ssem(screen_device &screen, bitmap_rgb32 &bitma { if(accum & (1 << bit)) { - glyph_print(screen.machine(), bitmap, bit << 3, 264, "%c", 2); + glyph_print(machine(), bitmap, bit << 3, 264, "%c", 2); } else { - glyph_print(screen.machine(), bitmap, bit << 3, 264, "%c", 1); + glyph_print(machine(), bitmap, bit << 3, 264, "%c", 1); } } @@ -486,7 +486,7 @@ UINT32 ssem_state::screen_update_ssem(screen_device &screen, bitmap_rgb32 &bitma (m_store[(m_store_line << 2) | 1] << 16) | (m_store[(m_store_line << 2) | 2] << 8) | (m_store[(m_store_line << 2) | 3] << 0)); - glyph_print(screen.machine(), bitmap, 0, 272, "LINE:%02d VALUE:%08x HALT:%d", m_store_line, word, ssem_cpu->state().state_int(SSEM_HALT)); + glyph_print(machine(), bitmap, 0, 272, "LINE:%02d VALUE:%08x HALT:%d", m_store_line, word, ssem_cpu->state().state_int(SSEM_HALT)); return 0; } diff --git a/src/mess/drivers/supracan.c b/src/mess/drivers/supracan.c index b648fe7c90d..6866fddfcb5 100644 --- a/src/mess/drivers/supracan.c +++ b/src/mess/drivers/supracan.c @@ -780,7 +780,7 @@ UINT32 supracan_state::screen_update_supracan(screen_device &screen, bitmap_ind1 m_sprite_final_bitmap.fill(0x00, visarea); bitmap.fill(0x80, visarea); - draw_sprites(screen.machine(), m_sprite_final_bitmap, visarea); + draw_sprites(machine(), m_sprite_final_bitmap, visarea); } } else @@ -789,7 +789,7 @@ UINT32 supracan_state::screen_update_supracan(screen_device &screen, bitmap_ind1 m_sprite_final_bitmap.fill(0x00, cliprect); bitmap.fill(0x80, cliprect); - draw_sprites(screen.machine(), m_sprite_final_bitmap, cliprect); + draw_sprites(machine(), m_sprite_final_bitmap, cliprect); } @@ -829,9 +829,9 @@ UINT32 supracan_state::screen_update_supracan(screen_device &screen, bitmap_ind1 if (priority==pri) { // tilemap_num = layer; - which_tilemap_size = get_tilemap_dimensions(screen.machine(), xsize, ysize, layer); + which_tilemap_size = get_tilemap_dimensions(machine(), xsize, ysize, layer); bitmap_ind16 &src_bitmap = m_tilemap_sizes[layer][which_tilemap_size]->pixmap(); - int gfx_region = supracan_tilemap_get_region(screen.machine(), layer); + int gfx_region = supracan_tilemap_get_region(machine(), layer); int transmask = 0xff; switch (gfx_region) @@ -953,12 +953,12 @@ UINT32 supracan_state::screen_update_supracan(screen_device &screen, bitmap_ind1 if (m_vram[m_roz_unk_base0/2 + y]) // incxx = 0, no draw? - supracan_suprnova_draw_roz(screen.machine(), bitmap, clip, m_tilemap_sizes[layer][which_tilemap_size], scrollx<<8, scrolly<<8, incxx<<8, incxy<<8, incyx<<8, incyy<<8, wrap, transmask); + supracan_suprnova_draw_roz(machine(), bitmap, clip, m_tilemap_sizes[layer][which_tilemap_size], scrollx<<8, scrolly<<8, incxx<<8, incxy<<8, incyx<<8, incyy<<8, wrap, transmask); } } else { - supracan_suprnova_draw_roz(screen.machine(), bitmap, cliprect, m_tilemap_sizes[layer][which_tilemap_size], scrollx<<8, scrolly<<8, incxx<<8, incxy<<8, incyx<<8, incyy<<8, wrap, transmask); + supracan_suprnova_draw_roz(machine(), bitmap, cliprect, m_tilemap_sizes[layer][which_tilemap_size], scrollx<<8, scrolly<<8, incxx<<8, incxy<<8, incyx<<8, incyy<<8, wrap, transmask); } } } diff --git a/src/mess/drivers/svision.c b/src/mess/drivers/svision.c index d767d183ba3..4372fbaf6c0 100644 --- a/src/mess/drivers/svision.c +++ b/src/mess/drivers/svision.c @@ -352,7 +352,7 @@ PALETTE_INIT_MEMBER(svision_state,svisionp) UINT32 svision_state::screen_update_svision(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - svision_state *state = screen.machine().driver_data<svision_state>(); + svision_state *state = machine().driver_data<svision_state>(); int x, y, i, j=XPOS/4+YPOS*0x30; UINT8 *videoram = m_videoram; @@ -384,7 +384,7 @@ UINT32 svision_state::screen_update_svision(screen_device &screen, bitmap_ind16 UINT32 svision_state::screen_update_tvlink(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - svision_state *state = screen.machine().driver_data<svision_state>(); + svision_state *state = machine().driver_data<svision_state>(); int x, y, i, j = XPOS/4+YPOS*0x30; UINT8 *videoram = m_videoram; @@ -409,7 +409,7 @@ UINT32 svision_state::screen_update_tvlink(screen_device &screen, bitmap_rgb32 & } else { - bitmap.plot_box(3, 0, 162, 159, screen.machine().pens[PALETTE_START]); + bitmap.plot_box(3, 0, 162, 159, machine().pens[PALETTE_START]); } return 0; } diff --git a/src/mess/drivers/ti99_2.c b/src/mess/drivers/ti99_2.c index bbc90c4eda2..51656ecd17f 100644 --- a/src/mess/drivers/ti99_2.c +++ b/src/mess/drivers/ti99_2.c @@ -169,7 +169,7 @@ UINT32 ti99_2_state::screen_update_ti99_2(screen_device &screen, bitmap_ind16 &b for (i = 0; i < 768; i++) { /* Is the char code masked or not ??? */ - drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], videoram[i] & 0x7F, 0, + drawgfx_opaque(bitmap, cliprect, machine().gfx[0], videoram[i] & 0x7F, 0, 0, 0, sx, sy); sx += 8; diff --git a/src/mess/drivers/tk80bs.c b/src/mess/drivers/tk80bs.c index 1d59d673037..1645398e958 100644 --- a/src/mess/drivers/tk80bs.c +++ b/src/mess/drivers/tk80bs.c @@ -273,7 +273,7 @@ UINT32 tk80bs_state::screen_update_tk80bs(screen_device &screen, bitmap_ind16 &b { int tile = m_p_videoram[count++]; - drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], tile, 0, 0, 0, x*8, y*8); + drawgfx_opaque(bitmap, cliprect, machine().gfx[0], tile, 0, 0, 0, x*8, y*8); } } diff --git a/src/mess/drivers/vboy.c b/src/mess/drivers/vboy.c index ddd0c9abe48..48b4956c5f9 100644 --- a/src/mess/drivers/vboy.c +++ b/src/mess/drivers/vboy.c @@ -488,7 +488,7 @@ UINT8 vboy_state::display_world(int num, bitmap_ind16 &bitmap, bool right, int & UINT32 vboy_state::screen_update_vboy_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - bitmap.fill(screen.machine().pens[m_vip_regs.BKCOL], cliprect); + bitmap.fill(machine().pens[m_vip_regs.BKCOL], cliprect); int cur_spt; if(!(m_vip_regs.DPCTRL & 2)) /* Don't bother if screen is off */ @@ -514,7 +514,7 @@ UINT32 vboy_state::screen_update_vboy_left(screen_device &screen, bitmap_ind16 & yi = ((y & 0x3)*2); pix = (pen >> yi) & 3; - bitmap.pix16(y, x) = screen.machine().pens[pix & 3]; + bitmap.pix16(y, x) = machine().pens[pix & 3]; } } } @@ -524,7 +524,7 @@ UINT32 vboy_state::screen_update_vboy_left(screen_device &screen, bitmap_ind16 & UINT32 vboy_state::screen_update_vboy_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - bitmap.fill(screen.machine().pens[m_vip_regs.BKCOL], cliprect); + bitmap.fill(machine().pens[m_vip_regs.BKCOL], cliprect); int cur_spt; if(!(m_vip_regs.DPCTRL & 2)) /* Don't bother if screen is off */ diff --git a/src/mess/drivers/vii.c b/src/mess/drivers/vii.c index 7bd8869a43b..6929501abbd 100644 --- a/src/mess/drivers/vii.c +++ b/src/mess/drivers/vii.c @@ -422,9 +422,9 @@ UINT32 vii_state::screen_update_vii(screen_device &screen, bitmap_rgb32 &bitmap, for(i = 0; i < 4; i++) { - vii_blit_page(screen.machine(), bitmap, cliprect, i, 0x40 * m_video_regs[0x20], m_video_regs + 0x10); - vii_blit_page(screen.machine(), bitmap, cliprect, i, 0x40 * m_video_regs[0x21], m_video_regs + 0x16); - vii_blit_sprites(screen.machine(), bitmap, cliprect, i); + vii_blit_page(machine(), bitmap, cliprect, i, 0x40 * m_video_regs[0x20], m_video_regs + 0x10); + vii_blit_page(machine(), bitmap, cliprect, i, 0x40 * m_video_regs[0x21], m_video_regs + 0x16); + vii_blit_sprites(machine(), bitmap, cliprect, i); } for(y = 0; y < 240; y++) diff --git a/src/mess/drivers/vt100.c b/src/mess/drivers/vt100.c index e169290d7af..0b92b583e6e 100644 --- a/src/mess/drivers/vt100.c +++ b/src/mess/drivers/vt100.c @@ -319,7 +319,7 @@ INPUT_PORTS_END UINT32 vt100_state::screen_update_vt100(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - device_t *devconf = screen.machine().device("vt100_video"); + device_t *devconf = machine().device("vt100_video"); vt_video_update( devconf, bitmap, cliprect); return 0; } diff --git a/src/mess/drivers/x1.c b/src/mess/drivers/x1.c index 7c6eea7b12f..08a3ea9ed06 100644 --- a/src/mess/drivers/x1.c +++ b/src/mess/drivers/x1.c @@ -547,9 +547,9 @@ UINT32 x1_state::screen_update_x1(screen_device &screen, bitmap_rgb32 &bitmap, c bitmap.fill(MAKE_ARGB(0xff,0x00,0x00,0x00), cliprect); - draw_gfxbitmap(screen.machine(),bitmap,cliprect,m_scrn_reg.disp_bank,m_scrn_reg.pri); - draw_fgtilemap(screen.machine(),bitmap,cliprect); - draw_gfxbitmap(screen.machine(),bitmap,cliprect,m_scrn_reg.disp_bank,m_scrn_reg.pri^0xff); + draw_gfxbitmap(machine(),bitmap,cliprect,m_scrn_reg.disp_bank,m_scrn_reg.pri); + draw_fgtilemap(machine(),bitmap,cliprect); + draw_gfxbitmap(machine(),bitmap,cliprect,m_scrn_reg.disp_bank,m_scrn_reg.pri^0xff); return 0; } diff --git a/src/mess/drivers/z100.c b/src/mess/drivers/z100.c index 3796c08b332..34e8c836950 100644 --- a/src/mess/drivers/z100.c +++ b/src/mess/drivers/z100.c @@ -262,7 +262,7 @@ UINT32 z100_state::screen_update_z100(screen_device &screen, bitmap_ind16 &bitma dot = m_display_mask; if(y*mc6845_tile_height+yi < 216 && x*8+xi < 640) /* TODO: safety check */ - bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = screen.machine().pens[dot]; + bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = machine().pens[dot]; } } } diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c index c5d2fac1988..3e514db1219 100644 --- a/src/mess/machine/amstrad.c +++ b/src/mess/machine/amstrad.c @@ -2422,7 +2422,7 @@ void amstrad_state::screen_eof_amstrad(screen_device &screen, bool state) // rising edge if (state) { - cpc_multiface2_device* mface2 = dynamic_cast<cpc_multiface2_device*>(get_expansion_device(screen.machine(),"multiface2")); + cpc_multiface2_device* mface2 = dynamic_cast<cpc_multiface2_device*>(get_expansion_device(machine(),"multiface2")); if(mface2 != NULL) { diff --git a/src/mess/machine/lisa.c b/src/mess/machine/lisa.c index ff26992f048..9eff06bf05c 100644 --- a/src/mess/machine/lisa.c +++ b/src/mess/machine/lisa.c @@ -838,7 +838,7 @@ UINT32 lisa_state::screen_update_lisa(screen_device &screen, bitmap_ind16 &bitma for (x = 0; x < resx; x++) // line_buffer[x] = (v[(x+y*resx)>>4] & (0x8000 >> ((x+y*resx) & 0xf))) ? 0 : 1; line_buffer[x] = (v[(x+y*resx)>>4] & (0x8000 >> (x & 0xf))) ? 0 : 1; - draw_scanline8(bitmap, 0, y, resx, line_buffer, screen.machine().pens); + draw_scanline8(bitmap, 0, y, resx, line_buffer, machine().pens); } return 0; } diff --git a/src/mess/machine/sms.c b/src/mess/machine/sms.c index 57b9b9edfbd..47da4fd4069 100644 --- a/src/mess/machine/sms.c +++ b/src/mess/machine/sms.c @@ -2192,7 +2192,7 @@ UINT32 sms_state::screen_update_sms1(screen_device &screen, bitmap_rgb32 &bitmap if (&screen != m_main_scr) { - sscope = screen.machine().root_device().ioport("SEGASCOPE")->read_safe(0x00); + sscope = machine().root_device().ioport("SEGASCOPE")->read_safe(0x00); if (!sscope) { occluded_view = 1; @@ -2219,7 +2219,7 @@ UINT32 sms_state::screen_update_sms1(screen_device &screen, bitmap_rgb32 &bitmap // save a copy of current bitmap for the binocular hack if (sscope) { - sscope_binocular_hack = screen.machine().root_device().ioport("SSCOPE_BINOCULAR")->read_safe(0x00); + sscope_binocular_hack = machine().root_device().ioport("SSCOPE_BINOCULAR")->read_safe(0x00); if (&screen == m_left_lcd) { @@ -2239,7 +2239,7 @@ UINT32 sms_state::screen_update_sms1(screen_device &screen, bitmap_rgb32 &bitmap // use the copied bitmap for the binocular hack if (sscope) { - sscope_binocular_hack = screen.machine().root_device().ioport("SSCOPE_BINOCULAR")->read_safe(0x00); + sscope_binocular_hack = machine().root_device().ioport("SSCOPE_BINOCULAR")->read_safe(0x00); if (&screen == m_left_lcd) { diff --git a/src/mess/video/ac1.c b/src/mess/video/ac1.c index e7fd46ddd62..74effeeb62c 100644 --- a/src/mess/video/ac1.c +++ b/src/mess/video/ac1.c @@ -29,14 +29,14 @@ void ac1_state::video_start() UINT32 ac1_state::screen_update_ac1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int x,y; - address_space &space = *screen.machine().device("maincpu")->memory().space(AS_PROGRAM); + address_space &space = *machine().device("maincpu")->memory().space(AS_PROGRAM); for(y = 0; y < 16; y++ ) { for(x = 0; x < 64; x++ ) { int code = space.read_byte(AC1_VIDEO_MEMORY + x + y*64); - drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], code , 0, 0,0, 63*6-x*6,15*8-y*8); + drawgfx_opaque(bitmap, cliprect, machine().gfx[0], code , 0, 0,0, 63*6-x*6,15*8-y*8); } } return 0; @@ -45,14 +45,14 @@ UINT32 ac1_state::screen_update_ac1(screen_device &screen, bitmap_ind16 &bitmap, UINT32 ac1_state::screen_update_ac1_32(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int x,y; - address_space &space = *screen.machine().device("maincpu")->memory().space(AS_PROGRAM); + address_space &space = *machine().device("maincpu")->memory().space(AS_PROGRAM); for(y = 0; y < 32; y++ ) { for(x = 0; x < 64; x++ ) { int code = space.read_byte(AC1_VIDEO_MEMORY + x + y*64); - drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], code , 0, 0,0, 63*6-x*6,31*8-y*8); + drawgfx_opaque(bitmap, cliprect, machine().gfx[0], code , 0, 0,0, 63*6-x*6,31*8-y*8); } } return 0; diff --git a/src/mess/video/apple1.c b/src/mess/video/apple1.c index 428db6b6002..aef42f7cd9c 100644 --- a/src/mess/video/apple1.c +++ b/src/mess/video/apple1.c @@ -393,7 +393,7 @@ static void apple1_vh_cursor_blink (running_machine &machine) UINT32 apple1_state::screen_update_apple1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - apple1_vh_cursor_blink(screen.machine()); - terminal_draw(screen.machine(), bitmap, cliprect, m_terminal); + apple1_vh_cursor_blink(machine()); + terminal_draw(machine(), bitmap, cliprect, m_terminal); return 0; } diff --git a/src/mess/video/apple2.c b/src/mess/video/apple2.c index 0f5e170b6af..f40edc079df 100644 --- a/src/mess/video/apple2.c +++ b/src/mess/video/apple2.c @@ -478,7 +478,7 @@ UINT32 apple2_state::screen_update_apple2(screen_device &screen, bitmap_ind16 &b UINT32 new_a2; /* calculate the m_flash value */ - m_flash = ((screen.machine().time() * 4).seconds & 1) ? 1 : 0; + m_flash = ((machine().time() * 4).seconds & 1) ? 1 : 0; /* read out relevant softswitch variables; to see what has changed */ new_a2 = effective_a2(this); diff --git a/src/mess/video/apple3.c b/src/mess/video/apple3.c index f14c2c1cd3e..c4b0b0f6ccf 100644 --- a/src/mess/video/apple3.c +++ b/src/mess/video/apple3.c @@ -369,28 +369,28 @@ UINT32 apple3_state::screen_update_apple3(screen_device &screen, bitmap_ind16 &b { case 0: case VAR_VM0: - apple3_video_text40(screen.machine(),bitmap); + apple3_video_text40(machine(),bitmap); break; case VAR_VM1: case VAR_VM1|VAR_VM0: - apple3_video_text80(screen.machine(),bitmap); + apple3_video_text80(machine(),bitmap); break; case VAR_VM3: - apple3_video_graphics_hgr(screen.machine(),bitmap); /* hgr mode */ + apple3_video_graphics_hgr(machine(),bitmap); /* hgr mode */ break; case VAR_VM3|VAR_VM0: - apple3_video_graphics_chgr(screen.machine(),bitmap); + apple3_video_graphics_chgr(machine(),bitmap); break; case VAR_VM3|VAR_VM1: - apple3_video_graphics_shgr(screen.machine(),bitmap); + apple3_video_graphics_shgr(machine(),bitmap); break; case VAR_VM3|VAR_VM1|VAR_VM0: - apple3_video_graphics_chires(screen.machine(),bitmap); + apple3_video_graphics_chires(machine(),bitmap); break; } return 0; diff --git a/src/mess/video/b2m.c b/src/mess/video/b2m.c index f1d3b4b972f..95bf24a6f7b 100644 --- a/src/mess/video/b2m.c +++ b/src/mess/video/b2m.c @@ -21,7 +21,7 @@ UINT32 b2m_state::screen_update_b2m(screen_device &screen, bitmap_ind16 &bitmap, UINT8 code2; UINT8 col; int y, x, b; - UINT8 *ram = screen.machine().device<ram_device>(RAM_TAG)->pointer(); + UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer(); for (x = 0; x < 48; x++) { diff --git a/src/mess/video/bbc.c b/src/mess/video/bbc.c index 7a8530fadf7..18688fc56b1 100644 --- a/src/mess/video/bbc.c +++ b/src/mess/video/bbc.c @@ -640,7 +640,7 @@ WRITE8_MEMBER(bbc_state::bbc_6845_w) UINT32 bbc_state::screen_update_bbc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - mc6845_device *mc6845 = screen.machine().device<mc6845_device>("mc6845"); + mc6845_device *mc6845 = machine().device<mc6845_device>("mc6845"); mc6845->update( bitmap, cliprect); return 0; @@ -665,7 +665,7 @@ UINT32 bbc_state::screen_update_bbc(screen_device &screen, bitmap_ind16 &bitmap, while((m_BBC_VSync)&&(c<60000)) { // Clock the 6845 - m6845_clock(screen.machine()); + m6845_clock(machine()); c++; } @@ -674,13 +674,13 @@ UINT32 bbc_state::screen_update_bbc(screen_device &screen, bitmap_ind16 &bitmap, // or until a timeout (this catches the 6845 with silly register values that would not give a VSYNC signal) while((!m_BBC_VSync)&&(c<60000)) { - if ((m_y_screen_pos>=cliprect.min_y) && (m_y_screen_pos<=cliprect.max_y)) (m_draw_function)(screen.machine()); + if ((m_y_screen_pos>=cliprect.min_y) && (m_y_screen_pos<=cliprect.max_y)) (m_draw_function)(machine()); // and check the cursor if (m_VideoULA_CR) BBC_Clock_CR(this); // Clock the 6845 - m6845_clock(screen.machine()); + m6845_clock(machine()); c++; } diff --git a/src/mess/video/cgenie.c b/src/mess/video/cgenie.c index c63085a5ef3..800838b8f5a 100644 --- a/src/mess/video/cgenie.c +++ b/src/mess/video/cgenie.c @@ -413,8 +413,8 @@ static void cgenie_refresh_tv_set(running_machine &machine, bitmap_ind16 &bitmap UINT32 cgenie_state::screen_update_cgenie(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { if( m_tv_mode ) - cgenie_refresh_tv_set(screen.machine(), bitmap, cliprect); + cgenie_refresh_tv_set(machine(), bitmap, cliprect); else - cgenie_refresh_monitor(screen.machine(), bitmap, cliprect); + cgenie_refresh_monitor(machine(), bitmap, cliprect); return 0; } diff --git a/src/mess/video/dai.c b/src/mess/video/dai.c index edd6e947ece..43340b568ea 100644 --- a/src/mess/video/dai.c +++ b/src/mess/video/dai.c @@ -57,7 +57,7 @@ void dai_state::video_start() UINT32 dai_state::screen_update_dai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = *screen.machine().device("maincpu")->memory().space(AS_PROGRAM); + address_space &space = *machine().device("maincpu")->memory().space(AS_PROGRAM); int i, j, k, l; UINT8* char_rom = memregion("gfx1")->base(); diff --git a/src/mess/video/fmtowns.c b/src/mess/video/fmtowns.c index f64385cde2c..361efeb146c 100644 --- a/src/mess/video/fmtowns.c +++ b/src/mess/video/fmtowns.c @@ -1814,36 +1814,36 @@ UINT32 towns_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, c if(!(m_video.towns_video_reg[1] & 0x01)) { - if(!screen.machine().input().code_pressed(KEYCODE_Q)) + if(!machine().input().code_pressed(KEYCODE_Q)) { if((m_video.towns_layer_ctrl & 0x03) != 0) - towns_crtc_draw_layer(screen.machine(),bitmap,&m_video.towns_crtc_layerscr[1],1); + towns_crtc_draw_layer(machine(),bitmap,&m_video.towns_crtc_layerscr[1],1); } - if(!screen.machine().input().code_pressed(KEYCODE_W)) + if(!machine().input().code_pressed(KEYCODE_W)) { if((m_video.towns_layer_ctrl & 0x0c) != 0) - towns_crtc_draw_layer(screen.machine(),bitmap,&m_video.towns_crtc_layerscr[0],0); + towns_crtc_draw_layer(machine(),bitmap,&m_video.towns_crtc_layerscr[0],0); } } else { - if(!screen.machine().input().code_pressed(KEYCODE_Q)) + if(!machine().input().code_pressed(KEYCODE_Q)) { if((m_video.towns_layer_ctrl & 0x0c) != 0) - towns_crtc_draw_layer(screen.machine(),bitmap,&m_video.towns_crtc_layerscr[0],0); + towns_crtc_draw_layer(machine(),bitmap,&m_video.towns_crtc_layerscr[0],0); } - if(!screen.machine().input().code_pressed(KEYCODE_W)) + if(!machine().input().code_pressed(KEYCODE_W)) { if((m_video.towns_layer_ctrl & 0x03) != 0) - towns_crtc_draw_layer(screen.machine(),bitmap,&m_video.towns_crtc_layerscr[1],1); + towns_crtc_draw_layer(machine(),bitmap,&m_video.towns_crtc_layerscr[1],1); } } #if 0 #ifdef SPR_DEBUG - if(screen.machine().input().code_pressed(KEYCODE_O)) + if(machine().input().code_pressed(KEYCODE_O)) pshift+=0x80; - if(screen.machine().input().code_pressed(KEYCODE_I)) + if(machine().input().code_pressed(KEYCODE_I)) pshift-=0x80; popmessage("Pixel shift = %08x",pshift); #endif diff --git a/src/mess/video/galeb.c b/src/mess/video/galeb.c index 8ffc5362f88..c49bafacbe0 100644 --- a/src/mess/video/galeb.c +++ b/src/mess/video/galeb.c @@ -36,7 +36,7 @@ UINT32 galeb_state::screen_update_galeb(screen_device &screen, bitmap_ind16 &bit for(x = 0; x < 48; x++ ) { int code = m_video_ram[15 + x + y*64]; - drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], code , 0, 0,0, x*8,y*8); + drawgfx_opaque(bitmap, cliprect, machine().gfx[0], code , 0, 0,0, x*8,y*8); } } return 0; diff --git a/src/mess/video/hec2video.c b/src/mess/video/hec2video.c index b1e72725bfc..c7c7e289f2e 100644 --- a/src/mess/video/hec2video.c +++ b/src/mess/video/hec2video.c @@ -125,18 +125,18 @@ UINT32 hec2hrp_state::screen_update_hec2hrp(screen_device &screen, bitmap_ind16 if (m_hector_flag_80c==0) { screen.set_visible_area(0, 243, 0, 227); - hector_hr( screen.machine(), bitmap , &videoram_HR[0], 227, 64); + hector_hr( machine(), bitmap , &videoram_HR[0], 227, 64); } else { screen.set_visible_area(0, 243*2, 0, 227); - hector_80c( screen.machine(), bitmap , &videoram_HR[0], 227, 64); + hector_80c( machine(), bitmap , &videoram_HR[0], 227, 64); } } else { screen.set_visible_area(0, 113, 0, 75); - hector_hr( screen.machine(), bitmap, videoram, 77, 32); + hector_hr( machine(), bitmap, videoram, 77, 32); } return 0; } diff --git a/src/mess/video/hp48.c b/src/mess/video/hp48.c index 195f2534e20..463cc71be11 100644 --- a/src/mess/video/hp48.c +++ b/src/mess/video/hp48.c @@ -129,8 +129,8 @@ void hp48_state::palette_init() UINT32 hp48_state::screen_update_hp48(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - hp48_state *state = screen.machine().driver_data<hp48_state>(); - address_space &space = *screen.machine().device("maincpu")->memory().space(AS_PROGRAM); + hp48_state *state = machine().driver_data<hp48_state>(); + address_space &space = *machine().device("maincpu")->memory().space(AS_PROGRAM); int x, y, xp, i, addr; int display = HP48_IO_4(0) >> 3; /* 1=on, 0=off */ int left_margin = HP48_IO_4(0) & 7; /* 0..7 pixels for main bitmap */ @@ -142,7 +142,7 @@ UINT32 hp48_state::screen_update_hp48(screen_device &screen, bitmap_ind16 &bitma int menu_start = HP48_IO_20(0x30) & ~1; /* menu bitmap address */ int fg = contrast + 2; - LOG(( "%f hp48 video_update called: ", screen.machine().time().as_double())); + LOG(( "%f hp48 video_update called: ", machine().time().as_double())); if ( !display || refresh ) { diff --git a/src/mess/video/intv.c b/src/mess/video/intv.c index 993a69b45de..b8c090a9fad 100644 --- a/src/mess/video/intv.c +++ b/src/mess/video/intv.c @@ -800,7 +800,7 @@ UINT32 intv_state::screen_update_intvkbd(screen_device &screen, bitmap_ind16 &bi { offs = current_row*64+x; drawgfx_transpen(bitmap, cliprect, - screen.machine().gfx[1], + machine().gfx[1], videoram[offs], 7, /* white */ 0,0, @@ -811,7 +811,7 @@ UINT32 intv_state::screen_update_intvkbd(screen_device &screen, bitmap_ind16 &bi /* draw the cursor as a solid white block */ /* (should use a filled rect here!) */ drawgfx_transpen(bitmap, cliprect, - screen.machine().gfx[1], + machine().gfx[1], 191, /* a block */ 7, /* white */ 0,0, diff --git a/src/mess/video/kramermc.c b/src/mess/video/kramermc.c index a059c141f8f..0335a26b3a2 100644 --- a/src/mess/video/kramermc.c +++ b/src/mess/video/kramermc.c @@ -30,14 +30,14 @@ void kramermc_state::video_start() UINT32 kramermc_state::screen_update_kramermc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int x,y; - address_space &space = *screen.machine().device("maincpu")->memory().space(AS_PROGRAM); + address_space &space = *machine().device("maincpu")->memory().space(AS_PROGRAM); for(y = 0; y < 16; y++ ) { for(x = 0; x < 64; x++ ) { int code = space.read_byte(KRAMERMC_VIDEO_MEMORY + x + y*64); - drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], code , 0, 0,0, x*8,y*8); + drawgfx_opaque(bitmap, cliprect, machine().gfx[0], code , 0, 0,0, x*8,y*8); } } return 0; diff --git a/src/mess/video/mac.c b/src/mess/video/mac.c index 0f973e1b3c8..67d860e7890 100644 --- a/src/mess/video/mac.c +++ b/src/mess/video/mac.c @@ -86,8 +86,8 @@ UINT32 mac_state::screen_update_mac(screen_device &screen, bitmap_ind16 &bitmap, UINT16 *line; int y, x, b; - video_base = screen.machine().device<ram_device>(RAM_TAG)->size() - (m_screen_buffer ? MAC_MAIN_SCREEN_BUF_OFFSET : MAC_ALT_SCREEN_BUF_OFFSET); - video_ram = (const UINT16 *) (screen.machine().device<ram_device>(RAM_TAG)->pointer() + video_base); + video_base = machine().device<ram_device>(RAM_TAG)->size() - (m_screen_buffer ? MAC_MAIN_SCREEN_BUF_OFFSET : MAC_ALT_SCREEN_BUF_OFFSET); + video_ram = (const UINT16 *) (machine().device<ram_device>(RAM_TAG)->pointer() + video_base); for (y = 0; y < MAC_V_VIS; y++) { @@ -373,7 +373,7 @@ UINT32 mac_state::screen_update_macrbv(screen_device &screen, bitmap_rgb32 &bitm { UINT32 *scanline; int x, y, hres, vres; - UINT8 *vram8 = (UINT8 *)screen.machine().device<ram_device>(RAM_TAG)->pointer(); + UINT8 *vram8 = (UINT8 *)machine().device<ram_device>(RAM_TAG)->pointer(); switch (m_rbv_montype) { diff --git a/src/mess/video/mz700.c b/src/mess/video/mz700.c index e10b1dbd201..00ee041cd32 100644 --- a/src/mess/video/mz700.c +++ b/src/mess/video/mz700.c @@ -51,7 +51,7 @@ UINT32 mz_state::screen_update_mz700(screen_device &screen, bitmap_ind16 &bitmap UINT8 *videoram = m_videoram; int offs; - bitmap.fill(get_black_pen(screen.machine()), cliprect); + bitmap.fill(get_black_pen(machine()), cliprect); for(offs = 0; offs < 40*25; offs++) { @@ -63,7 +63,7 @@ UINT32 mz_state::screen_update_mz700(screen_device &screen, bitmap_ind16 &bitmap color = m_colorram[offs]; code = videoram[offs] | (color & 0x80) << 1; - drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], code, color, 0, 0, sx, sy); + drawgfx_opaque(bitmap, cliprect, machine().gfx[0], code, color, 0, 0, sx, sy); } return 0; @@ -83,7 +83,7 @@ UINT32 mz_state::screen_update_mz800(screen_device &screen, bitmap_ind16 &bitmap { UINT8 *videoram = m_videoram; - bitmap.fill(get_black_pen(screen.machine()), cliprect); + bitmap.fill(get_black_pen(machine()), cliprect); if (m_mz700_mode) return SCREEN_UPDATE16_CALL_MEMBER(mz700); diff --git a/src/mess/video/nascom1.c b/src/mess/video/nascom1.c index 27e6e8e3662..7dba521bcfa 100644 --- a/src/mess/video/nascom1.c +++ b/src/mess/video/nascom1.c @@ -17,7 +17,7 @@ UINT32 nascom1_state::screen_update_nascom1(screen_device &screen, bitmap_ind16 for (sx = 0; sx < 48; sx++) { drawgfx_opaque (bitmap, cliprect, - screen.machine().gfx[0], videoram[0x03ca + sx], + machine().gfx[0], videoram[0x03ca + sx], 1, 0, 0, sx * 8, 0); } @@ -26,7 +26,7 @@ UINT32 nascom1_state::screen_update_nascom1(screen_device &screen, bitmap_ind16 for (sx = 0; sx < 48; sx++) { drawgfx_opaque (bitmap, cliprect, - screen.machine().gfx[0], videoram[0x000a + (sy * 64) + sx], + machine().gfx[0], videoram[0x000a + (sy * 64) + sx], 1, 0, 0, sx * 8, (sy + 1) * 16); } } @@ -41,7 +41,7 @@ UINT32 nascom1_state::screen_update_nascom2(screen_device &screen, bitmap_ind16 for (sx = 0; sx < 48; sx++) { drawgfx_opaque (bitmap, cliprect, - screen.machine().gfx[0], videoram[0x03ca + sx], + machine().gfx[0], videoram[0x03ca + sx], 1, 0, 0, sx * 8, 0); } @@ -50,7 +50,7 @@ UINT32 nascom1_state::screen_update_nascom2(screen_device &screen, bitmap_ind16 for (sx = 0; sx < 48; sx++) { drawgfx_opaque (bitmap, cliprect, - screen.machine().gfx[0], videoram[0x000a + (sy * 64) + sx], + machine().gfx[0], videoram[0x000a + (sy * 64) + sx], 1, 0, 0, sx * 8, (sy + 1) * 14); } } diff --git a/src/mess/video/nc.c b/src/mess/video/nc.c index e011d6dbfe0..b381e8523e6 100644 --- a/src/mess/video/nc.c +++ b/src/mess/video/nc.c @@ -90,7 +90,7 @@ UINT32 nc_state::screen_update_nc(screen_device &screen, bitmap_ind16 &bitmap, c { int by; /* 64 bytes per line */ - char *line_ptr = ((char*)screen.machine().device<ram_device>(RAM_TAG)->pointer()) + m_display_memory_start + (y<<6); + char *line_ptr = ((char*)machine().device<ram_device>(RAM_TAG)->pointer()) + m_display_memory_start + (y<<6); x = 0; for (by=0; by<width>>3; by++) diff --git a/src/mess/video/nes.c b/src/mess/video/nes.c index be9dc008668..0ff78cb5b77 100644 --- a/src/mess/video/nes.c +++ b/src/mess/video/nes.c @@ -47,7 +47,7 @@ UINT32 nes_state::screen_update_nes(screen_device &screen, bitmap_ind16 &bitmap, if (m_disk_expansion && m_pcb_id == NO_BOARD) { // latch this input so it doesn't go at warp speed - if ((screen.machine().root_device().ioport("FLIPDISK")->read() & 0x01) && (!m_last_frame_flip)) + if ((machine().root_device().ioport("FLIPDISK")->read() & 0x01) && (!m_last_frame_flip)) { m_last_frame_flip = 1; m_fds_current_side++; @@ -60,7 +60,7 @@ UINT32 nes_state::screen_update_nes(screen_device &screen, bitmap_ind16 &bitmap, popmessage("Disk set to side %d", m_fds_current_side); } - if (!(screen.machine().root_device().ioport("FLIPDISK")->read() & 0x01)) + if (!(machine().root_device().ioport("FLIPDISK")->read() & 0x01)) m_last_frame_flip = 0; } return 0; diff --git a/src/mess/video/ondra.c b/src/mess/video/ondra.c index 0e1087def14..5fd0d084526 100644 --- a/src/mess/video/ondra.c +++ b/src/mess/video/ondra.c @@ -29,8 +29,8 @@ UINT32 ondra_state::screen_update_ondra(screen_device &screen, bitmap_ind16 &bit { for (y = 127; y >=0; y--) { - code1 = screen.machine().device<ram_device>(RAM_TAG)->pointer()[0xd700 + Vaddr + 0x80]; - code2 = screen.machine().device<ram_device>(RAM_TAG)->pointer()[0xd700 + Vaddr + 0x00]; + code1 = machine().device<ram_device>(RAM_TAG)->pointer()[0xd700 + Vaddr + 0x80]; + code2 = machine().device<ram_device>(RAM_TAG)->pointer()[0xd700 + Vaddr + 0x00]; for (b = 0; b < 8; b++) { bitmap.pix16(2*y, x*8+b) = ((code1 << b) & 0x80) ? 1 : 0; diff --git a/src/mess/video/oric.c b/src/mess/video/oric.c index c0fc0678dd8..56248001860 100644 --- a/src/mess/video/oric.c +++ b/src/mess/video/oric.c @@ -182,10 +182,10 @@ UINT32 oric_state::screen_update_oric(screen_device &screen, bitmap_ind16 &bitma int x = 0; /* foreground colour white */ - oric_vh_update_attribute(screen.machine(),7); + oric_vh_update_attribute(machine(),7); /* background colour black */ - oric_vh_update_attribute(screen.machine(),(1<<3)); - oric_vh_update_attribute(screen.machine(),(1<<4)); + oric_vh_update_attribute(machine(),(1<<3)); + oric_vh_update_attribute(machine(),(1<<4)); for (byte_offset=0; byte_offset<40; byte_offset++) { @@ -213,12 +213,12 @@ UINT32 oric_state::screen_update_oric(screen_device &screen, bitmap_ind16 &bitma } /* fetch data */ - c = RAM ? RAM[read_addr] : screen.machine().device("maincpu")->memory().space(AS_PROGRAM)->read_byte(read_addr); + c = RAM ? RAM[read_addr] : machine().device("maincpu")->memory().space(AS_PROGRAM)->read_byte(read_addr); /* if bits 6 and 5 are zero, the byte contains a serial attribute */ if ((c & ((1 << 6) | (1 << 5))) == 0) { - oric_vh_update_attribute(screen.machine(), c); + oric_vh_update_attribute(machine(), c); /* display background colour when attribute has been found */ oric_vh_render_6pixels(bitmap, x, y, m_vh_state.active_foreground_colour, m_vh_state.active_background_colour, 0, (c & 0x080)); diff --git a/src/mess/video/orion.c b/src/mess/video/orion.c index 9ea7c54667a..769dca102da 100644 --- a/src/mess/video/orion.c +++ b/src/mess/video/orion.c @@ -24,7 +24,7 @@ UINT32 orion_state::screen_update_orion128(screen_device &screen, bitmap_ind16 & int part1addr = (3-((m_orion128_video_page & 3) | orionproshift)) * 0x4000; int part2addr = part1addr + 0x10000; int video_mode = m_orion128_video_mode & m_video_mode_mask; - UINT8 *ram = screen.machine().device<ram_device>(RAM_TAG)->pointer(); + UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer(); for (x = 0; x < m_orion128_video_width; x++) { diff --git a/src/mess/video/p2000m.c b/src/mess/video/p2000m.c index 9b9c874239b..0dfab3498a9 100644 --- a/src/mess/video/p2000m.c +++ b/src/mess/video/p2000m.c @@ -41,7 +41,7 @@ UINT32 p2000t_state::screen_update_p2000m(screen_device &screen, bitmap_ind16 &b if (code < 32) code = 32; } - drawgfxzoom_opaque (bitmap, cliprect, screen.machine().gfx[0], code, + drawgfxzoom_opaque (bitmap, cliprect, machine().gfx[0], code, videoram[offs + 2048] & 0x08 ? 0 : 1, 0, 0, sx, sy, 0x20000, 0x20000); if (videoram[offs] & 0x80) diff --git a/src/mess/video/pcw.c b/src/mess/video/pcw.c index 06bc04b4495..334cf6ff05e 100644 --- a/src/mess/video/pcw.c +++ b/src/mess/video/pcw.c @@ -92,14 +92,14 @@ UINT32 pcw_state::screen_update_pcw(screen_device &screen, bitmap_ind16 &bitmap, x = PCW_BORDER_WIDTH; - roller_ram_ptr = screen.machine().device<ram_device>(RAM_TAG)->pointer() + m_roller_ram_addr + roller_ram_offs; + roller_ram_ptr = machine().device<ram_device>(RAM_TAG)->pointer() + m_roller_ram_addr + roller_ram_offs; /* get line address */ /* b16-14 control which bank the line is to be found in, b13-3 the address in the bank (in 16-byte units), and b2-0 the offset. Thus a roller RAM address bbbxxxxxxxxxxxyyy indicates bank bbb, address 00xxxxxxxxxxx0yyy. */ line_data = ((unsigned char *)roller_ram_ptr)[0] | (((unsigned char *)roller_ram_ptr)[1]<<8); /* calculate address of pixel data */ - line_ptr = screen.machine().device<ram_device>(RAM_TAG)->pointer() + ((line_data & 0x0e000)<<1) + ((line_data & 0x01ff8)<<1) + (line_data & 0x07); + line_ptr = machine().device<ram_device>(RAM_TAG)->pointer() + ((line_data & 0x0e000)<<1) + ((line_data & 0x01ff8)<<1) + (line_data & 0x07); for (by=0; by<90; by++) { diff --git a/src/mess/video/pcw16.c b/src/mess/video/pcw16.c index 19d58460a60..5afe8d05d47 100644 --- a/src/mess/video/pcw16.c +++ b/src/mess/video/pcw16.c @@ -156,7 +156,7 @@ static void pcw16_vh_decode_mode2(pcw16_state *state, bitmap_ind16 &bitmap, int ***************************************************************************/ UINT32 pcw16_state::screen_update_pcw16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT8 *ram = screen.machine().device<ram_device>(RAM_TAG)->pointer(); + UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer(); unsigned char *pScanLine = (unsigned char *)ram + 0x0fc00; //0x03c00; //0x020FC00; int y; diff --git a/src/mess/video/pdp1.c b/src/mess/video/pdp1.c index 6bce0a03b34..7591ee92aa1 100644 --- a/src/mess/video/pdp1.c +++ b/src/mess/video/pdp1.c @@ -91,7 +91,7 @@ UINT32 pdp1_state::screen_update_pdp1(screen_device &screen, bitmap_ind16 &bitma crt_update(m_crt, bitmap); pdp1_draw_lightpen(this, bitmap); - pdp1_draw_panel(screen.machine(), m_panel_bitmap); + pdp1_draw_panel(machine(), m_panel_bitmap); copybitmap(bitmap, m_panel_bitmap, 0, 0, panel_window_offset_x, panel_window_offset_y, cliprect); copybitmap(bitmap, m_typewriter_bitmap, 0, 0, typewriter_window_offset_x, typewriter_window_offset_y, cliprect); diff --git a/src/mess/video/pet.c b/src/mess/video/pet.c index ba246e9e94e..5472b1cd7d8 100644 --- a/src/mess/video/pet.c +++ b/src/mess/video/pet.c @@ -75,7 +75,7 @@ UINT32 pet_state::screen_update_pet(screen_device &screen, bitmap_ind16 &bitmap, { for (x=0;x<40;x++, i++) { - drawgfx_opaque(bitmap, cliprect,screen.machine().gfx[m_font], + drawgfx_opaque(bitmap, cliprect,machine().gfx[m_font], videoram[i], 0, 0, 0, 8*x,8*y); } } diff --git a/src/mess/video/pk8020.c b/src/mess/video/pk8020.c index 107d6436011..b573961796c 100644 --- a/src/mess/video/pk8020.c +++ b/src/mess/video/pk8020.c @@ -19,7 +19,7 @@ UINT32 pk8020_state::screen_update_pk8020(screen_device &screen, bitmap_ind16 &b { int y, x, b, j; UINT8 *gfx = memregion("gfx1")->base(); - UINT8 *ram = screen.machine().device<ram_device>(RAM_TAG)->pointer(); + UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer(); for (y = 0; y < 16; y++) { diff --git a/src/mess/video/pp01.c b/src/mess/video/pp01.c index 90d2ee54d07..a74afaf609c 100644 --- a/src/mess/video/pp01.c +++ b/src/mess/video/pp01.c @@ -20,7 +20,7 @@ UINT32 pp01_state::screen_update_pp01(screen_device &screen, bitmap_ind16 &bitma UINT8 code_r,code_g,code_b; UINT8 col; int y, x, b; - UINT8 *ram = screen.machine().device<ram_device>(RAM_TAG)->pointer(); + UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer(); for (y = 0; y < 256; y++) { diff --git a/src/mess/video/primo.c b/src/mess/video/primo.c index a1212ae361b..0263922ddca 100644 --- a/src/mess/video/primo.c +++ b/src/mess/video/primo.c @@ -41,6 +41,6 @@ UINT32 primo_state::screen_update_primo(screen_device &screen, bitmap_ind16 &bit int primo_scanline; for (primo_scanline=0; primo_scanline<192; primo_scanline++) - primo_draw_scanline(screen.machine(), bitmap, primo_scanline); + primo_draw_scanline(machine(), bitmap, primo_scanline); return 0; } diff --git a/src/mess/video/radio86.c b/src/mess/video/radio86.c index 5c163fbf97a..1432730d650 100644 --- a/src/mess/video/radio86.c +++ b/src/mess/video/radio86.c @@ -109,7 +109,7 @@ I8275_DISPLAY_PIXELS(partner_display_pixels) UINT32 radio86_state::screen_update_radio86(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - device_t *devconf = screen.machine().device("i8275"); + device_t *devconf = machine().device("i8275"); i8275_update( devconf, bitmap, cliprect); copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect); return 0; diff --git a/src/mess/video/spectrum.c b/src/mess/video/spectrum.c index 82a6936de54..96d6bcc30f9 100644 --- a/src/mess/video/spectrum.c +++ b/src/mess/video/spectrum.c @@ -74,13 +74,13 @@ void spectrum_state::screen_eof_spectrum(screen_device &screen, bool state) /* Empty event buffer for undisplayed frames noting the last border colour (in case colours are not changed in the next frame). */ - NumItems = spectrum_EventList_NumEvents(screen.machine()); + NumItems = spectrum_EventList_NumEvents(machine()); if (NumItems) { - pItem = spectrum_EventList_GetFirstItem(screen.machine()); - spectrum_border_set_last_color ( screen.machine(), pItem[NumItems-1].Event_Data ); - spectrum_EventList_Reset(screen.machine()); - spectrum_EventList_SetOffsetStartTime ( screen.machine(), screen.machine().firstcpu->attotime_to_cycles(screen.scan_period() * screen.vpos()) ); + pItem = spectrum_EventList_GetFirstItem(machine()); + spectrum_border_set_last_color ( machine(), pItem[NumItems-1].Event_Data ); + spectrum_EventList_Reset(machine()); + spectrum_EventList_SetOffsetStartTime ( machine(), machine().firstcpu->attotime_to_cycles(screen.scan_period() * screen.vpos()) ); logerror ("Event log reset in callback fn.\n"); } } @@ -159,7 +159,7 @@ UINT32 spectrum_state::screen_update_spectrum(screen_device &screen, bitmap_ind1 } } - spectrum_border_draw(screen.machine(), bitmap, full_refresh, + spectrum_border_draw(machine(), bitmap, full_refresh, SPEC_TOP_BORDER, SPEC_DISPLAY_YSIZE, SPEC_BOTTOM_BORDER, SPEC_LEFT_BORDER, SPEC_DISPLAY_XSIZE, SPEC_RIGHT_BORDER, SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES, diff --git a/src/mess/video/ssystem3.c b/src/mess/video/ssystem3.c index 086c7ec21a5..68ca76087ac 100644 --- a/src/mess/video/ssystem3.c +++ b/src/mess/video/ssystem3.c @@ -204,7 +204,7 @@ UINT32 ssystem3_state::screen_update_ssystem3(screen_device &screen, bitmap_ind1 ssystem3_draw_led(bitmap, m_lcd.data[3]&1?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '3'); ssystem3_draw_led(bitmap, m_lcd.data[4]&1?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '4'); - if (screen.machine().root_device().ioport("Configuration")->read()&1) { // playfield(optional device) + if (machine().root_device().ioport("Configuration")->read()&1) { // playfield(optional device) static const int lcd_signs_on[]={ 0, // empty 1, // bauer @@ -221,7 +221,7 @@ UINT32 ssystem3_state::screen_update_ssystem3(screen_device &screen, bitmap_ind1 int figure, black; int xp=263+x*22; int yp=55+(y^7)*28; - ssystem3_playfield_getfigure(screen.machine(), x, y, &figure, &black); + ssystem3_playfield_getfigure(machine(), x, y, &figure, &black); ssystem3_draw_led(bitmap, lcd_signs_on[figure]&1?1:0, xp, yp, '6'); ssystem3_draw_led(bitmap, lcd_signs_on[figure]&2?1:0, xp, yp, '8'); ssystem3_draw_led(bitmap, lcd_signs_on[figure]&4?1:0, xp, yp, '9'); diff --git a/src/mess/video/super80.c b/src/mess/video/super80.c index 4f2d0a1c619..0e0984dbac1 100644 --- a/src/mess/video/super80.c +++ b/src/mess/video/super80.c @@ -76,15 +76,15 @@ void super80_state::screen_eof_super80m(screen_device &screen, bool state) if (state) { /* if we chose another palette or colour mode, enable it */ - UINT8 chosen_palette = (screen.machine().root_device().ioport("CONFIG")->read() & 0x60)>>5; // read colour dipswitches + UINT8 chosen_palette = (machine().root_device().ioport("CONFIG")->read() & 0x60)>>5; // read colour dipswitches if (chosen_palette != m_current_palette) // any changes? { m_current_palette = chosen_palette; // save new palette if (!m_current_palette) - palette_set_colors_rgb(screen.machine(), super80_comp_palette); // composite colour + palette_set_colors_rgb(machine(), super80_comp_palette); // composite colour else - palette_set_colors_rgb(screen.machine(), super80_rgb_palette); // rgb and b&w + palette_set_colors_rgb(machine(), super80_rgb_palette); // rgb and b&w } } } @@ -97,7 +97,7 @@ UINT32 super80_state::screen_update_super80(screen_device &screen, bitmap_ind16 output_set_value("cass_led",(m_shared & 0x20) ? 1 : 0); - if ((m_shared & 4) || (!(screen.machine().root_device().ioport("CONFIG")->read() & 4))) /* bit 2 of port F0 is high, OR user turned on config switch */ + if ((m_shared & 4) || (!(machine().root_device().ioport("CONFIG")->read() & 4))) /* bit 2 of port F0 is high, OR user turned on config switch */ screen_on++; for (y = 0; y < 16; y++) @@ -138,7 +138,7 @@ UINT32 super80_state::screen_update_super80d(screen_device &screen, bitmap_ind16 output_set_value("cass_led",(m_shared & 0x20) ? 1 : 0); - if ((m_shared & 4) || (!(screen.machine().root_device().ioport("CONFIG")->read() & 4))) /* bit 2 of port F0 is high, OR user turned on config switch */ + if ((m_shared & 4) || (!(machine().root_device().ioport("CONFIG")->read() & 4))) /* bit 2 of port F0 is high, OR user turned on config switch */ screen_on++; for (y = 0; y < 16; y++) @@ -179,7 +179,7 @@ UINT32 super80_state::screen_update_super80e(screen_device &screen, bitmap_ind16 output_set_value("cass_led",(m_shared & 0x20) ? 1 : 0); - if ((m_shared & 4) || (!(screen.machine().root_device().ioport("CONFIG")->read() & 4))) /* bit 2 of port F0 is high, OR user turned on config switch */ + if ((m_shared & 4) || (!(machine().root_device().ioport("CONFIG")->read() & 4))) /* bit 2 of port F0 is high, OR user turned on config switch */ screen_on++; for (y = 0; y < 16; y++) @@ -216,7 +216,7 @@ UINT32 super80_state::screen_update_super80m(screen_device &screen, bitmap_ind16 { UINT8 y,ra,chr=32,gfx,screen_on=0; UINT16 sy=0,ma=m_vidpg,x; - UINT8 col, bg=0, fg=0, options=screen.machine().root_device().ioport("CONFIG")->read(); + UINT8 col, bg=0, fg=0, options=machine().root_device().ioport("CONFIG")->read(); UINT8 *RAM = memregion("maincpu")->base(); /* get selected character generator */ @@ -384,7 +384,7 @@ UINT32 super80_state::screen_update_super80v(screen_device &screen, bitmap_rgb32 m_framecnt++; m_speed = m_mc6845_reg[10]&0x20, m_flash = m_mc6845_reg[10]&0x40; // cursor modes m_cursor = (m_mc6845_reg[14]<<8) | m_mc6845_reg[15]; // get cursor position - m_s_options=screen.machine().root_device().ioport("CONFIG")->read(); + m_s_options=machine().root_device().ioport("CONFIG")->read(); output_set_value("cass_led",(m_shared & 0x20) ? 1 : 0); m_6845->screen_update(screen, bitmap, cliprect); return 0; diff --git a/src/mess/video/timex.c b/src/mess/video/timex.c index ab23e138c9b..55569c0d43f 100644 --- a/src/mess/video/timex.c +++ b/src/mess/video/timex.c @@ -189,28 +189,28 @@ UINT32 spectrum_state::screen_update_ts2068(screen_device &screen, bitmap_ind16 /* 64 Column mode */ unsigned short inkcolor = (m_port_ff_data & 0x38) >> 3; for (count = 0; count < 192; count++) - ts2068_64col_scanline(screen.machine(),bitmap, count, TS2068_TOP_BORDER, inkcolor); + ts2068_64col_scanline(machine(),bitmap, count, TS2068_TOP_BORDER, inkcolor); } else if ((m_port_ff_data & 7) == 2) { /* Extended Color mode */ for (count = 0; count < 192; count++) - ts2068_hires_scanline(screen.machine(),bitmap, count, TS2068_TOP_BORDER); + ts2068_hires_scanline(machine(),bitmap, count, TS2068_TOP_BORDER); } else if ((m_port_ff_data & 7) == 1) { /* Screen 6000-7aff */ for (count = 0; count < 192; count++) - ts2068_lores_scanline(screen.machine(),bitmap, count, TS2068_TOP_BORDER, 1); + ts2068_lores_scanline(machine(),bitmap, count, TS2068_TOP_BORDER, 1); } else { /* Screen 4000-5aff */ for (count = 0; count < 192; count++) - ts2068_lores_scanline(screen.machine(),bitmap, count, TS2068_TOP_BORDER, 0); + ts2068_lores_scanline(machine(),bitmap, count, TS2068_TOP_BORDER, 0); } - spectrum_border_draw(screen.machine(), bitmap, full_refresh, + spectrum_border_draw(machine(), bitmap, full_refresh, TS2068_TOP_BORDER, SPEC_DISPLAY_YSIZE, TS2068_BOTTOM_BORDER, TS2068_LEFT_BORDER, TS2068_DISPLAY_XSIZE, TS2068_RIGHT_BORDER, SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES, @@ -229,28 +229,28 @@ UINT32 spectrum_state::screen_update_tc2048(screen_device &screen, bitmap_ind16 /* 64 Column mode */ unsigned short inkcolor = (m_port_ff_data & 0x38) >> 3; for (count = 0; count < 192; count++) - ts2068_64col_scanline(screen.machine(),bitmap, count, SPEC_TOP_BORDER, inkcolor); + ts2068_64col_scanline(machine(),bitmap, count, SPEC_TOP_BORDER, inkcolor); } else if ((m_port_ff_data & 7) == 2) { /* Extended Color mode */ for (count = 0; count < 192; count++) - ts2068_hires_scanline(screen.machine(),bitmap, count, SPEC_TOP_BORDER); + ts2068_hires_scanline(machine(),bitmap, count, SPEC_TOP_BORDER); } else if ((m_port_ff_data & 7) == 1) { /* Screen 6000-7aff */ for (count = 0; count < 192; count++) - ts2068_lores_scanline(screen.machine(),bitmap, count, SPEC_TOP_BORDER, 1); + ts2068_lores_scanline(machine(),bitmap, count, SPEC_TOP_BORDER, 1); } else { /* Screen 4000-5aff */ for (count = 0; count < 192; count++) - ts2068_lores_scanline(screen.machine(),bitmap, count, SPEC_TOP_BORDER, 0); + ts2068_lores_scanline(machine(),bitmap, count, SPEC_TOP_BORDER, 0); } - spectrum_border_draw(screen.machine(), bitmap, full_refresh, + spectrum_border_draw(machine(), bitmap, full_refresh, SPEC_TOP_BORDER, SPEC_DISPLAY_YSIZE, SPEC_BOTTOM_BORDER, TS2068_LEFT_BORDER, TS2068_DISPLAY_XSIZE, TS2068_RIGHT_BORDER, SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES, diff --git a/src/mess/video/tx0.c b/src/mess/video/tx0.c index d1b80896350..8796fec4e49 100644 --- a/src/mess/video/tx0.c +++ b/src/mess/video/tx0.c @@ -77,7 +77,7 @@ UINT32 tx0_state::screen_update_tx0(screen_device &screen, bitmap_ind16 &bitmap, { crt_update(m_crt, bitmap); - tx0_draw_panel(screen.machine(), m_panel_bitmap); + tx0_draw_panel(machine(), m_panel_bitmap); copybitmap(bitmap, m_panel_bitmap, 0, 0, panel_window_offset_x, panel_window_offset_y, cliprect); copybitmap(bitmap, m_typewriter_bitmap, 0, 0, typewriter_window_offset_x, typewriter_window_offset_y, cliprect); diff --git a/src/mess/video/ut88.c b/src/mess/video/ut88.c index 3526d66aca3..e7df67b38a7 100644 --- a/src/mess/video/ut88.c +++ b/src/mess/video/ut88.c @@ -35,7 +35,7 @@ UINT32 ut88_state::screen_update_ut88(screen_device &screen, bitmap_ind16 &bitma { int code = m_p_videoram[ x + y*64 ] & 0x7f; int attr = m_p_videoram[ x+1 + y*64 ] & 0x80; - drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], code | attr, 0, 0,0, x*8,y*8); + drawgfx_opaque(bitmap, cliprect, machine().gfx[0], code | attr, 0, 0,0, x*8,y*8); } } return 0; diff --git a/src/mess/video/vector06.c b/src/mess/video/vector06.c index 2bc4e5b6c9e..98b615f3ba6 100644 --- a/src/mess/video/vector06.c +++ b/src/mess/video/vector06.c @@ -19,7 +19,7 @@ UINT32 vector06_state::screen_update_vector06(screen_device &screen, bitmap_ind1 UINT8 code1,code2,code3,code4; UINT8 col; int y, x, b,draw_y; - UINT8 *ram = screen.machine().device<ram_device>(RAM_TAG)->pointer(); + UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer(); int width = (m_video_mode==0x00) ? 256 : 512; rectangle screen_area(0,width+64-1,0,256+64-1); diff --git a/src/mess/video/vtech2.c b/src/mess/video/vtech2.c index 5ebb2b2b2ee..e8abfc49601 100644 --- a/src/mess/video/vtech2.c +++ b/src/mess/video/vtech2.c @@ -142,7 +142,7 @@ UINT32 vtech2_state::screen_update_laser(screen_device &screen, bitmap_ind16 &bi sy = BORDER_V/2 + y; sx = BORDER_H/2 + x * 8; code = videoram[offs]; - drawgfx_opaque(bitmap,cliprect,screen.machine().gfx[2],code,color,0,0,sx,sy); + drawgfx_opaque(bitmap,cliprect,machine().gfx[2],code,color,0,0,sx,sy); } } break; @@ -162,7 +162,7 @@ UINT32 vtech2_state::screen_update_laser(screen_device &screen, bitmap_ind16 &bi sx = BORDER_H/2 + x * 16; code = videoram[offs]; color = videoram[offs+1]; - drawgfx_opaque(bitmap,cliprect,screen.machine().gfx[3],code,color,0,0,sx,sy); + drawgfx_opaque(bitmap,cliprect,machine().gfx[3],code,color,0,0,sx,sy); } } break; @@ -181,7 +181,7 @@ UINT32 vtech2_state::screen_update_laser(screen_device &screen, bitmap_ind16 &bi sy = BORDER_V/2 + y; sx = BORDER_H/2 + x * 8; code = videoram[offs]; - drawgfx_opaque(bitmap,cliprect,screen.machine().gfx[5],code,0,0,0,sx,sy); + drawgfx_opaque(bitmap,cliprect,machine().gfx[5],code,0,0,0,sx,sy); } } break; @@ -201,7 +201,7 @@ UINT32 vtech2_state::screen_update_laser(screen_device &screen, bitmap_ind16 &bi sy = BORDER_V/2 + y * 2; sx = BORDER_H/2 + x * 8; code = videoram[offs]; - drawgfx_opaque(bitmap,cliprect,screen.machine().gfx[6],code,0,0,0,sx,sy); + drawgfx_opaque(bitmap,cliprect,machine().gfx[6],code,0,0,0,sx,sy); } } break; @@ -220,7 +220,7 @@ UINT32 vtech2_state::screen_update_laser(screen_device &screen, bitmap_ind16 &bi sy = BORDER_V/2 + y; sx = BORDER_H/2 + x * 16; code = videoram[offs]; - drawgfx_opaque(bitmap,cliprect,screen.machine().gfx[3],code,color,0,0,sx,sy); + drawgfx_opaque(bitmap,cliprect,machine().gfx[3],code,color,0,0,sx,sy); } } break; @@ -240,7 +240,7 @@ UINT32 vtech2_state::screen_update_laser(screen_device &screen, bitmap_ind16 &bi sx = BORDER_H/2 + x * 32; code = videoram[offs]; color = videoram[offs+1]; - drawgfx_opaque(bitmap,cliprect,screen.machine().gfx[4],code,color,0,0,sx,sy); + drawgfx_opaque(bitmap,cliprect,machine().gfx[4],code,color,0,0,sx,sy); } } break; @@ -261,7 +261,7 @@ UINT32 vtech2_state::screen_update_laser(screen_device &screen, bitmap_ind16 &bi sy = BORDER_V/2 + y * 8; sx = BORDER_H/2 + x * 8; code = videoram[0x3800+offs]; - drawgfx_opaque(bitmap,cliprect,screen.machine().gfx[0],code,color,0,0,sx,sy); + drawgfx_opaque(bitmap,cliprect,machine().gfx[0],code,color,0,0,sx,sy); } } } @@ -278,7 +278,7 @@ UINT32 vtech2_state::screen_update_laser(screen_device &screen, bitmap_ind16 &bi sx = BORDER_H/2 + x * 16; code = videoram[0x3800+offs]; color = videoram[0x3801+offs]; - drawgfx_opaque(bitmap,cliprect,screen.machine().gfx[1],code,color,0,0,sx,sy); + drawgfx_opaque(bitmap,cliprect,machine().gfx[1],code,color,0,0,sx,sy); } } } diff --git a/src/mess/video/x68k.c b/src/mess/video/x68k.c index 507626ff2fc..0ec6cca5da6 100644 --- a/src/mess/video/x68k.c +++ b/src/mess/video/x68k.c @@ -1200,17 +1200,17 @@ UINT32 x68k_state::screen_update_x68000(screen_device &screen, bitmap_ind16 &bit rect.max_y = cliprect.max_y; // update tiles - //rom = screen.machine().root_device().memregion("user1")->base(); + //rom = machine().root_device().memregion("user1")->base(); for(x=0;x<256;x++) { if(m_video.tile16_dirty[x] != 0) { - screen.machine().gfx[1]->mark_dirty(x); + machine().gfx[1]->mark_dirty(x); m_video.tile16_dirty[x] = 0; } if(m_video.tile8_dirty[x] != 0) { - screen.machine().gfx[0]->mark_dirty(x); + machine().gfx[0]->mark_dirty(x); m_video.tile8_dirty[x] = 0; } } @@ -1219,12 +1219,12 @@ UINT32 x68k_state::screen_update_x68000(screen_device &screen, bitmap_ind16 &bit { // Graphics screen(s) if(priority == m_video.gfx_pri) - x68k_draw_gfx(screen.machine(),bitmap,rect); + x68k_draw_gfx(machine(),bitmap,rect); // Sprite / BG Tiles if(priority == m_video.sprite_pri /*&& (m_spritereg[0x404] & 0x0200)*/ && (m_video.reg[2] & 0x0040)) { - x68k_draw_sprites(screen.machine(), bitmap,1,rect); + x68k_draw_sprites(machine(), bitmap,1,rect); if((m_spritereg[0x404] & 0x0008)) { if((m_spritereg[0x404] & 0x0030) == 0x10) // BG1 TXSEL @@ -1240,7 +1240,7 @@ UINT32 x68k_state::screen_update_x68000(screen_device &screen, bitmap_ind16 &bit x68k_bg1->draw(bitmap,rect,0,0); } } - x68k_draw_sprites(screen.machine(),bitmap,2,rect); + x68k_draw_sprites(machine(),bitmap,2,rect); if((m_spritereg[0x404] & 0x0001)) { if((m_spritereg[0x404] & 0x0006) == 0x02) // BG0 TXSEL @@ -1256,7 +1256,7 @@ UINT32 x68k_state::screen_update_x68000(screen_device &screen, bitmap_ind16 &bit x68k_bg1->draw(bitmap,rect,0,0); } } - x68k_draw_sprites(screen.machine(),bitmap,3,rect); + x68k_draw_sprites(machine(),bitmap,3,rect); } // Text screen @@ -1265,24 +1265,24 @@ UINT32 x68k_state::screen_update_x68000(screen_device &screen, bitmap_ind16 &bit xscr = (m_crtc.reg[10] & 0x3ff); yscr = (m_crtc.reg[11] & 0x3ff); if(!(m_crtc.reg[20] & 0x1000)) // if text layer is set to buffer, then it's not visible - x68k_draw_text(screen.machine(),bitmap,xscr,yscr,rect); + x68k_draw_text(machine(),bitmap,xscr,yscr,rect); } } #ifdef MAME_DEBUG - if(screen.machine().input().code_pressed(KEYCODE_I)) + if(machine().input().code_pressed(KEYCODE_I)) { m_mfp.isra = 0; m_mfp.isrb = 0; // mfp_trigger_irq(MFP_IRQ_GPIP6); // machine().device("maincpu")->execute().set_input_line_and_vector(6,ASSERT_LINE,0x43); } - if(screen.machine().input().code_pressed(KEYCODE_9)) + if(machine().input().code_pressed(KEYCODE_9)) { m_sprite_shift--; popmessage("Sprite shift = %i",m_sprite_shift); } - if(screen.machine().input().code_pressed(KEYCODE_0)) + if(machine().input().code_pressed(KEYCODE_0)) { m_sprite_shift++; popmessage("Sprite shift = %i",m_sprite_shift); |