diff --git a/src/devices/video/upd7220.cpp b/src/devices/video/upd7220.cpp index 070c9e4fbec..f9ee91a7140 100644 --- a/src/devices/video/upd7220.cpp +++ b/src/devices/video/upd7220.cpp @@ -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)); - isize = m_figs.m_d & 0x3ff; - /* Guess: D has presumably upper bits for ysize, QX-10 relies on this (TODO: check this on any real HW) */ - psize = ((m_figs.m_d & 0x400) + m_figs.m_dc) + 1; + /* QX10 may require upper bits for psize, VT240 requires the opposite */ + isize = m_figs.m_d; + psize = m_figs.m_dc + 1; for(int pi = 0; pi < psize; pi++) { 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 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++) { 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) { diff --git a/src/mame/drivers/vt240.cpp b/src/mame/drivers/vt240.cpp index cf50d554abb..31e3a5d5538 100644 --- a/src/mame/drivers/vt240.cpp +++ b/src/mame/drivers/vt240.cpp @@ -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)); for(int j = 0; j < 8; 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)) out = (out & ~m_mask) | (mem & m_mask); else