Skip to content

Comments

VT525 colour improvements#511

Merged
davidrg merged 12 commits intomasterfrom
vt525-colour-improvements
Nov 27, 2025
Merged

VT525 colour improvements#511
davidrg merged 12 commits intomasterfrom
vt525-colour-improvements

Conversation

@davidrg
Copy link
Owner

@davidrg davidrg commented Nov 12, 2025

Finish off as much of VT525 colour support as possible, and with it the Colour Text Extension

  • Add new VT525 colour palettes and fix operation of DECSTGLT.
  • Implement DECECM
  • Fix cursor colour when using the VT525 palette, and any other screen elements that are using inappropriate palette colours
  • Implement the DEC Alternate Colour Mode colour attribute quirk
  • Implement DECCTR
  • Add extension 22 to the DA response for the K95 terminal type

I think for now I'll leave off a command to let users view and customise the Alternate Colour Mode attribute colours as it seems unlikely to be used.

This reworks DECSTGLT to switch between three colour palettes, and adds three new VT525 colour palettes. Alternate Colour Mode now hides ANSI SGR colours, and the default colour map for this mode now matches the VT525.
This one is pretty easy as K95 already has a setting for it - SET TERM COLOR ERASE.

That setting only seemed to take effect on terminal reset though - I don't know if it was a bug or not, but it makes it less useful so I've changed it so that it applies immediately.
@davidrg davidrg linked an issue Nov 12, 2025 that may be closed by this pull request
Not sure how these slipped through the 64bit porting work...
The current_palette_max_index() function doesn't take a parameter, but rather than producing a warning the compiler was just falling over.
@j4james
Copy link

j4james commented Nov 12, 2025

I've got a little test script demonstrating the effects of DECECM which you can use to double check your implementation: https://gist.github.com/j4james/cac2cec7fe0df78e59eb52f9c8201599

VT525 screenshot showing DECECM set

VT525 screenshot showing DECECM set

VT525 screenshot showing DECECM reset

VT525 screenshot showing DECECM reset

@davidrg
Copy link
Owner Author

davidrg commented Nov 12, 2025

Thanks for that! I'll give it a go this evening, though I suspect the lack of left/right margin support in K95 may present some issues. That's next on my list after finishing off colour support though!

in RGB builds, as their default palette colours are black in the VT525 palette. Also fixed SHOW GUI not showing the VT525 palettes, and SET TERM COLOR CURSOR not properly updating the cursor colour
@davidrg
Copy link
Owner Author

davidrg commented Nov 14, 2025

I hope this if not correct than at least more correct than it was before! RGB colours are now converted to the nearest shade of grey in the mono palette when in that mode:
mono

And using SGR while in Alternate Colour mode results in the alternate colour indicies being applied, while text output before use of SGR is unaffected by being in Alternate Colour mode:
alternate
post-alternate

@davidrg
Copy link
Owner Author

davidrg commented Nov 17, 2025

One side of DECCTR done!
rgb
hls

Reports current colour palette values in either RGB or HLS format.
Should *always* run the compiler before committing...
Seems to be working fairly well.
I think everything required to claim this is implemented - DECRQCRA still needs to be fixed to report colour attributes, but DECRQCRA isn't covered by this extension so it can happen later.
@davidrg davidrg marked this pull request as ready for review November 27, 2025 06:33
@davidrg davidrg merged commit 2fe4f1c into master Nov 27, 2025
32 checks passed
@davidrg davidrg deleted the vt525-colour-improvements branch November 27, 2025 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default DECATC mappings

2 participants