mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
upd7220: correct lr in graphics mode (nw)
This commit is contained in:
parent
da69fbd0f8
commit
82a4df91ac
@ -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
|
||||
|
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user