Merge pull request #5789 from 68bit/tv990-cursor-fix

tv990: cursor fix
This commit is contained in:
ajrhacker 2019-10-24 09:34:30 -04:00 committed by GitHub
commit 7c6c7724ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,13 +219,16 @@ uint32_t tv990_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
if((y < starty) || (y >= endy))
continue;
curchar = &vram[tvi1111_regs[i + 0x50]];
uint16_t row_offset = tvi1111_regs[i + 0x50];
curchar = &vram[row_offset];
int minx = tvi1111_regs[i + 0x30] >> 8;
int maxx = tvi1111_regs[i + 0x30] & 0xff;
if(maxx > m_width)
maxx = m_width;
uint16_t cursor_x = tvi1111_regs[0x16] - row_offset;
for (x = minx; x < maxx; x++)
{
uint8_t chr = curchar[x - minx] >> 8;
@ -237,8 +240,7 @@ uint32_t tv990_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
uint32_t palette[2];
int cursor_pos = tvi1111_regs[0x16] + 133;
if(BIT(tvi1111_regs[0x1b], 0) && (x == (cursor_pos % 134)) && (y == (cursor_pos / 134)))
if (BIT(tvi1111_regs[0x1b], 0) && x == cursor_x)
{
uint8_t attrchg;
if(tvi1111_regs[0x15] & 0xff00) // what does this really mean? it looks like a mask but that doesn't work in 8line char mode