mirror of
https://github.com/holub/mame
synced 2025-04-29 03:20:50 +03:00
upd7220: alternate drawing direction by line in gchrd (nw)
vt240: error--
This commit is contained in:
parent
e04ed6de3f
commit
e48008b516
@ -993,22 +993,35 @@ void upd7220_device::draw_char(int x, int y)
|
|||||||
|
|
||||||
LOG(("uPD7220 char check: %d %d %02x %08x %d %d %02x\n",x,y,m_figs.m_dir,m_ead,m_figs.m_d,m_figs.m_dc,m_figs.m_figure_type));
|
LOG(("uPD7220 char check: %d %d %02x %08x %d %d %02x\n",x,y,m_figs.m_dir,m_ead,m_figs.m_d,m_figs.m_dc,m_figs.m_figure_type));
|
||||||
|
|
||||||
isize = m_figs.m_d & 0x3ff;
|
/* QX10 may require upper bits for psize, VT240 requires the opposite */
|
||||||
/* Guess: D has presumably upper bits for ysize, QX-10 relies on this (TODO: check this on any real HW) */
|
isize = m_figs.m_d;
|
||||||
psize = ((m_figs.m_d & 0x400) + m_figs.m_dc) + 1;
|
psize = m_figs.m_dc + 1;
|
||||||
|
|
||||||
for(int pi = 0; pi < psize; pi++)
|
for(int pi = 0; pi < psize; pi++)
|
||||||
{
|
{
|
||||||
tile_data = (m_ra[((psize-1-pi) & 7) | 8] << 8) | m_ra[((psize-1-pi) & 7) | 8];
|
tile_data = (m_ra[((psize-1-pi) & 7) | 8] << 8) | m_ra[((psize-1-pi) & 7) | 8];
|
||||||
for(int pz = 0; pz <= m_gchr; pz++)
|
for(int pz = 0; pz <= m_gchr; pz++)
|
||||||
{
|
{
|
||||||
for(int ii = 0, curpixel = 0; ii < isize; ii++)
|
int ii = 0, curpixel = 0;
|
||||||
|
if(pi & 1)
|
||||||
|
{
|
||||||
|
ii = isize - 1;
|
||||||
|
curpixel = (isize * (m_gchr + 1)) - 1;
|
||||||
|
}
|
||||||
|
while(pi & 1 ? ii >= 0 : ii < isize)
|
||||||
{
|
{
|
||||||
for(int iz = 0; iz <= m_gchr; iz++)
|
for(int iz = 0; iz <= m_gchr; iz++)
|
||||||
{
|
{
|
||||||
draw_pixel(x + (curpixel * x_dir[m_figs.m_dir]), y + (curpixel * y_dir[m_figs.m_dir]), ii, tile_data);
|
draw_pixel(x + (curpixel * x_dir[m_figs.m_dir]), y + (curpixel * y_dir[m_figs.m_dir]), ii, tile_data);
|
||||||
curpixel++;
|
if(pi & 1)
|
||||||
|
curpixel--;
|
||||||
|
else
|
||||||
|
curpixel++;
|
||||||
}
|
}
|
||||||
|
if(pi & 1)
|
||||||
|
ii--;
|
||||||
|
else
|
||||||
|
ii++;
|
||||||
}
|
}
|
||||||
if(m_figs.m_figure_type == 2)
|
if(m_figs.m_figure_type == 2)
|
||||||
{
|
{
|
||||||
|
@ -372,7 +372,6 @@ WRITE16_MEMBER(vt240_state::vram_w)
|
|||||||
UINT8 out = 0, ifore = BIT(m_lu, (i ? 5 : 4)), iback = BIT(m_lu, (i ? 3 : 2));
|
UINT8 out = 0, ifore = BIT(m_lu, (i ? 5 : 4)), iback = BIT(m_lu, (i ? 3 : 2));
|
||||||
for(int j = 0; j < 8; j++)
|
for(int j = 0; j < 8; j++)
|
||||||
out |= BIT(chr, j) ? (ifore << j) : (iback << j);
|
out |= BIT(chr, j) ? (ifore << j) : (iback << j);
|
||||||
logerror("%x %x %x %x %x\n", chr, out, data, ifore, iback);
|
|
||||||
if(!BIT(m_reg0, 3))
|
if(!BIT(m_reg0, 3))
|
||||||
out = (out & ~m_mask) | (mem & m_mask);
|
out = (out & ~m_mask) | (mem & m_mask);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user