cpm65 icon indicating copy to clipboard operation
cpm65 copied to clipboard

Fix VT52 terminal driver.

Open ivop opened this issue 9 months ago • 4 comments

Fixes the following bugs:

  • backspace goes to previous line, except for the top left corner.

Bug example: vt52-backspace-bug

  • enter on the second to last line does not skip a line anymore.

Bug example: vt52-bottom-border-bug

  • typing past the bottom right corner correctly scrolls up and does CR.

Bug example: vt52-bottom-wrap-bug

  • clear to end of screen now also clears the last line.

Bug example: vt52-clear-to-eos-bug

  • right border no longer one less than the screen width.

Bug example: vt52-right-border-bug

  • backspace in the top left corner does no longer erase the character under the cursor.

Bug example: vt52-top-left-bs-bug

There's still one issue left, and that is that ^H should not rubout the character left of the cursor, but only move the cursor. I could add a rubout flag which is set when DEL (127) is send, similar to how ADM-3A handles this. The original CP/M actually sends ^H space ^H when the backspace key is pressed, but your CCP uses DEL, which, according to the manual, VT52 terminals ignore when echoed to the screen :wink: ADM-3A calls DEL RUB and is indeed character 127. Long story short, I could make the VT52 terminal acknowledge DEL and make ^H a proper BS, i.e. cursor left with wrap to the previous line. What do you think?

ivop avatar May 03 '24 18:05 ivop