-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cursor Fixed in SuperCalc 1.0 #1055
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I've left a few comments
If possible, could you send me a disk image with the programs to reproduce the issues?
@copy floppy image attached image+asm.zip bug.com <- cursor position is not changed, but should go to (79,24) |
Thanks! |
The following issues are fixed:
If a DOS program sets the cursor out of the screen then it should be hidden, but v86 shows it.
You can reproduce it by running VC.com (Volkov Commander) and "View" (F3) any file.
The cursor will be at position (0,24), but VC sets it to (0,127) to hide
The following program can reproduce a bug:
v86 shows cursor at 0,24
expected: cursor is hidden
Solution: Remove range checks in VGAScreen.update_cursor in vga.js
If a DOS program sets the "Cursor Scan Line End" less than "Cursor Scan Line Start" then cursor also should be hidden.
v86 is trying to set a negative height:
Solution: Hide cursor if end <= start, see "update_cursor_scanline" function in screen.js
SuperCalc 1.0 is writing a word to I/O Port 3D5h.
v86 doesn't have a w16 handler and ignores such writes (and throws an assert error in debug.html).
As as result, cursor position is invalid or hidden.
Writing a word to the second consecutive register is allowed, so we can use w8 handler and treat the data (a word) as a byte, see io.js
The following program reproduces the bug:
After the fix, the cursor location is correct:
The cursor color and blinking is fixed in another PR.