VOGONS


First post, by GloriousCow

User metadata
Rank Member
Rank
Member

I'm a little confused by the behavior of the CGA cursor.

I was informed by a BIOS developer that I'm showing a single pixel tall cursor at the top of the screen in my emulator where the cursor shouldn't be visible.
This is also present in the menu of CGA_COMP where the cursor should be hidden. This is a condition where CursorStartLine = CursorEndLine = 0 and the cursor attribute bits are 00.

If this would hide the cursor, great. But the issue is my own test program shows that it does not:

cursor_small.JPG
Filename
cursor_small.JPG
File size
9.88 KiB
Views
348 views
File comment
one pixel cursor at top with cursor registers 0, 0
File license
Public domain

This code just does
mov ax, 000Ah ; Set CursorStartLine to 0
out dx, ax
mov ax, 000Bh ; Set CursorEndLine to 0
out dx, ax

Is there some other condition necessary to hide the cursor in this case?

MartyPC: A cycle-accurate IBM PC/XT emulator | https://github.com/dbalsom/martypc

Reply 1 of 2, by Scali

User metadata
Rank l33t
Rank
l33t

I believe you need to set bit 5 of the Cursor Start register to 1, and bit 6 to 0 to hide the cursor:
http://bitsavers.trailing-edge.com/components … Sheets/6845.pdf

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 2 of 2, by GloriousCow

User metadata
Rank Member
Rank
Member

sigh. I had a stupid bug in masking off the attribute bits, so I didn't see both the BIOS and CGA_COMP were in fact setting bits 5&6 to 01.

No use in having debug displays if they feed you bad information...

MartyPC: A cycle-accurate IBM PC/XT emulator | https://github.com/dbalsom/martypc