From 82a4df91aca89a3f9c63310aa2ee9a385368fc5d Mon Sep 17 00:00:00 2001 From: cracyc Date: Sat, 2 Jan 2016 19:17:12 -0600 Subject: [PATCH] upd7220: correct lr in graphics mode (nw) --- src/devices/video/upd7220.cpp | 4 ++-- src/mame/drivers/pc9801.cpp | 16 +--------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/devices/video/upd7220.cpp b/src/devices/video/upd7220.cpp index 7a4bb506aa3..23548f1ecd7 100644 --- a/src/devices/video/upd7220.cpp +++ b/src/devices/video/upd7220.cpp @@ -1623,10 +1623,10 @@ void upd7220_device::update_graphics(bitmap_rgb32 &bitmap, const rectangle &clip Quarth (PC-98xx) doesn't seem to use pitch here and it definitely wants bsy to be /2 to make scrolling to work. Xevious (PC-98xx) wants the pitch to be fixed at 80, and wants bsy to be /1 Dragon Buster (PC-98xx) contradicts with Xevious with regards of the pitch tho ... */ - addr = ((sad << 1) & 0x3ffff) + (y * (m_pitch << (im ? 0 : 1))); + addr = ((sad << 1) & 0x3ffff) + ((y / (mixed ? 1 : m_lr)) * (m_pitch << (im ? 0 : 1))); if (!m_display_cb.isnull()) - draw_graphics_line(bitmap, addr, y + ((bsy + m_vbp) / (mixed ? 1 : m_lr)), wd, (m_pitch << interlace)); + draw_graphics_line(bitmap, addr, y + bsy + m_vbp, wd, (m_pitch << interlace)); } } else diff --git a/src/mame/drivers/pc9801.cpp b/src/mame/drivers/pc9801.cpp index 8c151817379..a841bae629d 100644 --- a/src/mame/drivers/pc9801.cpp +++ b/src/mame/drivers/pc9801.cpp @@ -772,15 +772,11 @@ UPD7220_DISPLAY_PIXELS_MEMBER( pc9801_state::hgdc_display_pixels ) int xi; int res_x,res_y; UINT8 pen; - UINT8 interlace_on; UINT8 colors16_mode; if(m_video_ff[DISPLAY_REG] == 0) //screen is off return; -// popmessage("%02x %d",m_video_ff[INTERLACE_REG],machine().first_screen()->visible_area().max_y + 1); -// interlace_on = ((machine().first_screen()->visible_area().max_y + 1) >= 400) ? 1 : 0; - interlace_on = m_video_ff[INTERLACE_REG]; colors16_mode = (m_ex_video_ff[ANALOG_16_MODE]) ? 16 : 8; if(m_ex_video_ff[ANALOG_256_MODE]) @@ -812,17 +808,7 @@ UPD7220_DISPLAY_PIXELS_MEMBER( pc9801_state::hgdc_display_pixels ) pen|= ((m_video_ram_2[((address & 0x7fff) + (0x18000) + (m_vram_disp*0x20000)) >> 1] >> xi) & 1) ? 4 : 0; if(m_ex_video_ff[ANALOG_16_MODE]) pen|= ((m_video_ram_2[((address & 0x7fff) + (0) + (m_vram_disp*0x20000)) >> 1] >> xi) & 1) ? 8 : 0; - - if(interlace_on) - { - if(m_screen->visible_area().contains(res_x, res_y*2+0)) - bitmap.pix32(res_y*2+0, res_x) = palette[pen + colors16_mode]; - /* TODO: it looks like that PC-98xx can only display even lines ... */ - if(m_screen->visible_area().contains(res_x, res_y*2+1)) - bitmap.pix32(res_y*2+1, res_x) = palette[pen + colors16_mode]; - } - else - bitmap.pix32(res_y, res_x) = palette[pen + colors16_mode]; + bitmap.pix32(res_y, res_x) = palette[pen + colors16_mode]; } } }