wildbits/vtio: fix cursor synchronization and remove write-ahead attribute bleed - #386
rlucente-retro wants to merge 11 commits into
Conversation
|
changes are updated to the following |
|
Here's a simple script to recreate the issue. Just drop this into SCRIPTS and then run SCRIPTS/testme.txt The reason this happens is that the infocom interpreter calls ZUSL to update the status line. ZUSL only writes characters to the top line but because of attribute bleed over, an update to the status line will also cause the first character of normal game text on the second line to have reverse video attributes. This only happens on the wildbits platform and not Coco 3. ZUSL can be called multiple times during the game. Whenever a new location is is entered (of course) but also when you issue multiple commands at once like "n.climb tree.get egg.d.s.e" the screen scroll will also trigger a status line update after the "[more]" prompt is displayed. |
Summary of Changes
• Removed sta 1,x (introduced in 88742ef).
• Characters and attributes are written strictly to the active cell (,x), eliminating line-wrap attribute corruption across the right margin (Row 0 Column 79 → Row 1 Column 0) and avoiding stuck reverse video on mode changes (REVOFF).
• Updates Vicky II's dedicated hardware cursor color register (VKY_TXT_CURSOR_COLR_REG) with V.FBCol,u alongside VKY_TXT_CURSOR_X/Y_REG_L.
• Keeps the hardware cursor in sync with the active text color in hardware without modifying underlying VRAM attributes or corrupting existing text when moving the cursor.
• Clears the 6809 Carry flag on exit (andcc #^Carry) to prevent spurious OS-9 I/O driver errors.
• Wrapped EraseChar with explicit MMU mapping for text ($C2) and attributes ($C3) under interrupt masking to ensure backspaced cells are cleanly cleared and colored.
• Updated branch targets to ResetHandler from short (bra/bne) to long (lbra/lbne) to eliminate assembly byte-overflow errors.