diff --git a/src/machine/m_xt_ibm5550.c b/src/machine/m_xt_ibm5550.c index 2edb547a4..ccc55578b 100644 --- a/src/machine/m_xt_ibm5550.c +++ b/src/machine/m_xt_ibm5550.c @@ -862,7 +862,7 @@ epoch_render_text(epoch_t *epoch) } /* Drawing text cursor */ drawcursor = ((epoch->memaddr == epoch->cursoraddr) && epoch->cursorvisible && epoch->cursoron); - if (drawcursor && epoch->scanline >= epoch->crtc[LC_CURSOR_ROW_START] && epoch->scanline <= epoch->crtc[LC_CURSOR_ROW_END]) { + if (drawcursor) { // int cursorwidth = (epoch->crtc[LC_COMPATIBILITY] & 0x20 ? 26 : 13); int cursorwidth = epoch->char_width; int cursorcolor = 2; /* Choose color 2 if mode 8 */ @@ -1140,11 +1140,25 @@ epoch_poll(void *priv) // if (epoch->attrc[LV_CURSOR_CONTROL] & 0x01) /* cursor blinking */ // { // epoch->cursoron = (epoch->blink | 1) & epoch->blinkconf; - epoch->cursoron = 1; + // epoch->cursoron = 1; // } else { // epoch->cursoron = 0; // } - if (!(epoch->blink & (0x10 - 1))) /* force redrawing for cursor and blink attribute */ + switch (epoch->crtc[LC_CURSOR_ROW_START] & 0x60) { + case 0x20: + epoch->cursoron = 0; + break; + case 0x60: + epoch->cursoron = epoch->blink & 0x10; + break; + case 0x40: + epoch->cursoron = epoch->blink & 0x08; + break; + default: + epoch->cursoron = 1; + break; + } + if (!(epoch->blink & (0x08 - 2))) /* force redrawing for cursor and blink attribute */ epoch->fullchange = changeframecount; } epoch->blink++; diff --git a/src/video/vid_ps55da2.c b/src/video/vid_ps55da2.c index a1d7fe25f..9dffcdf97 100644 --- a/src/video/vid_ps55da2.c +++ b/src/video/vid_ps55da2.c @@ -2055,7 +2055,7 @@ da2_render_text(da2_t *da2) } /* Drawing text cursor */ drawcursor = ((da2->memaddr == da2->cursoraddr) && da2->cursorvisible && da2->cursoron); - if (drawcursor && da2->scanline >= da2->crtc[LC_CURSOR_ROW_START] && da2->scanline <= da2->crtc[LC_CURSOR_ROW_END]) { + if (drawcursor) { int cursorwidth = (da2->crtc[LC_COMPATIBILITY] & 0x20 ? 26 : 13); int cursorcolor = (colormode) ? IRGBtoBGRI(da2->attrc[LV_CURSOR_COLOR]) : 2; /* Choose color 2 if mode 8 */ fg = (colormode) ? getPS55ForeColor(attr, da2) : ((attr & 0x08) ? 3 : 2);