diff options
Diffstat (limited to 'src/mame/drivers/mz3500.cpp')
-rw-r--r-- | src/mame/drivers/mz3500.cpp | 42 |
1 files changed, 16 insertions, 26 deletions
diff --git a/src/mame/drivers/mz3500.cpp b/src/mame/drivers/mz3500.cpp index 0b9b537c340..d9689c2afa1 100644 --- a/src/mame/drivers/mz3500.cpp +++ b/src/mame/drivers/mz3500.cpp @@ -167,39 +167,29 @@ UPD7220_DISPLAY_PIXELS_MEMBER( mz3500_state::hgdc_display_pixels ) UPD7220_DRAW_TEXT_LINE_MEMBER( mz3500_state::hgdc_draw_text ) { - const rgb_t *palette = m_palette->palette()->entry_list_raw(); - int x; - int xi,yi; - int tile; - int attr; - uint8_t tile_data; - uint8_t width80; - uint8_t char_size; - uint8_t hires; - uint8_t color_mode; + rgb_t const *const palette = m_palette->palette()->entry_list_raw(); // popmessage("%02x",m_crtc[6]); - color_mode = m_crtc[4] & 1; - width80 = (m_crtc[5] & 2) >> 1; - hires = (m_crtc[6] & 1); - char_size = (hires) ? 16 : 8; + uint8_t color_mode = m_crtc[4] & 1; + uint8_t width80 = (m_crtc[5] & 2) >> 1; + uint8_t hires = (m_crtc[6] & 1); + uint8_t char_size = (hires) ? 16 : 8; - for( x = 0; x < pitch; x++ ) + for( int x = 0; x < pitch; x++ ) { - tile = (m_video_ram[(((addr+x)*2) & 0x1fff) >> 1] & 0xff); - attr = ((m_video_ram[(((addr+x)*2+1) & 0x3ffff) >> 1] >> 8) & 0x0f); + int tile = (m_video_ram[(((addr+x)*2) & 0x1fff) >> 1] & 0xff); + int attr = ((m_video_ram[(((addr+x)*2+1) & 0x3ffff) >> 1] >> 8) & 0x0f); //if(hires) // tile <<= 1; - for( yi = 0; yi < lr; yi++) + for( int yi = 0; yi < lr; yi++) { - tile_data = m_char_rom[((tile*16+yi) & 0xfff) | (hires*0x1000)]; + uint8_t tile_data = m_char_rom[((tile*16+yi) & 0xfff) | (hires*0x1000)]; - for( xi = 0; xi < 8; xi++) + for( int xi = 0; xi < 8; xi++) { - int res_x,res_y; int pen; if(yi >= char_size) @@ -227,18 +217,18 @@ UPD7220_DRAW_TEXT_LINE_MEMBER( mz3500_state::hgdc_draw_text ) } } - res_x = x * 8 + xi; - res_y = y + yi; + int res_x = x * 8 + xi; + int res_y = y + yi; if(pen != -1) { if(!width80) { - bitmap.pix32(res_y, res_x*2+0) = palette[pen]; - bitmap.pix32(res_y, res_x*2+1) = palette[pen]; + bitmap.pix(res_y, res_x*2+0) = palette[pen]; + bitmap.pix(res_y, res_x*2+1) = palette[pen]; } else - bitmap.pix32(res_y, res_x) = palette[pen]; + bitmap.pix(res_y, res_x) = palette[pen]; } } } |