-
Notifications
You must be signed in to change notification settings - Fork 5
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
Bill The Cat #30
Comments
Thank you for looking into the proliferation of Bills. Ah! A green background makes much more sense with the odd green outline I was seeing. Version 1 I got from the MS Kermit disks. Version 2 was my attempt to fix the background with transparency. Version 3 is just a test image I use when I want to show sixels but not mess with the current colormap. |
By the way, I've been thinking about ways I can embed a short comment in files with ReGIS/sixel. Have you got any suggestions? I suppose I could use |
OK. That all makes sense. But if I were you'd I'd just keep the Kermit version that you already have in the I think a palette like the one below should work on both the VT340 and VT240. The first four entries define the colors as expected for the VT240, entries 5 to 15 are just the default palette values for a VT340, and the last entry is a repeat of green again for the VT340 background color.
That's actually something I've tried to do in the past. I thought it'd be clever to use an You might have better luck with a custom Actually now I'm curious how well your VT340 copes with string sequences other than Edit: I've since checked my notes, and it looks like the VT320 and later terminals should all support |
I just had another horrible idea regarding comments in Sixel. Any bytes that aren't valid sixel values will be ignored, so if you're happy to embed your comments inside the DCS data sequence, you can use Unicode characters that look like ASCII, but obviously aren't in the ASCII range. The trick is that the UTF-8 encoding must also not use bytes from the C1 range. The first example I found that worked, was the fullwidth capital letter set from U+FF21 to U+FF3A. For example |
😆 Wow, I can't believe that actually works. I just tested it on the VT340 and it does render correctly. Or rather, the graphics render correctly, but of course the comment text looks like
As cool as that is, I think it might be better to stick to ASCII, which, as you implied, means it has to be outside the sixel bitmap DCS sequence. How about this for an idea: stick the comments in another DCS sequence. We've already seen that sixel images can be made up of multiple device control strings, as in this cat example. Please correct me if I'm wrong, but I believe using a previously unknown DCS sequence would work everywhere -- from an VT125 to the latest terminal emulator -- because the correct thing to do with an unknown DCS sequence is to ignore it. @j4james, do you know of any sixel capable devices that cannot handle unknown device control strings? There are over a thousand possible DCS strings.It looks like ANSI's rules for DCS strings were pretty lax, so DEC added some structure by adding the notion of Parameters, Intermediates, and a Final, just like normal control sequences.
Since the Final comes from the set 0x40..0x7E ( I don't know how many DCS strings DEC defined, but it was not close to a thousand.I've started doing some research on which DCS strings are already assigned, and so far I've seen this:
I suggest using DCS
(I'll post an example when I get a chance.) Footnotes
|
I'm almost certain there is at least one DEC terminal that supported some DCS operations, but other DCS sequences that it didn't recognise would have their data string output to the screen. I've checked the VT240, though, and that seems fine, so I'm not sure where I had that issue. I'll have to do some more digging.
According to DEC STD 070, the DCS Final should really be in the range 0x70..0x7E, same as for private control sequences (see section 3.5.4.1). I think one of the other DEC manuals may have given the range as 0x40..0x7E, but I suspect that was a mistake. I'm fairly certain that all the DEC DCS sequences use a final from the private range. With multiple intermediates, you'd still have thousands of options, but as you say, some terminals are not likely to cope with that. In fact, I think you'll find a number of terminals won't even cope with a single intermediate. I know that was a problem for some of the early DEC terminals too (at least for CSI sequences). This is one of the reasons why I try to avoid inventing new sequences. It's almost impossible to come up with something new without breaking somebody's terminal. I do like the your idea of a |
I had noticed that DEC Finals started at the letter I was basing the range 0x40 to 0x7E on the VT520 Reference Manual but the VT340 Text Programming Manual states the same thing: Is it possible DEC 070's recommendation to only use 0x70 to 0x7E was based on the presumption that only DEC employees would be reading it? |
I think it's more likely they were trying to leave the 0x40..0x6F range as reserved for ANSI standardization, and it's expected that all vendors would share the 0x70..0x7E finals for their private sequences. This is the exact same pattern that ANSI defined for the CSI sequences. And note that the VT340 and VT520 manuals also list the CSI final range as 0x40..0x7E, but DEC only uses 0x70..0x7E (as required by ANSI).
That makes sense. One way of looking at it is that the VT340 and VT520 manuals are telling users what finals they can expect to encounter in general, but the STD 070 manual is telling DEC terminal developers what range they should restrict themselves to so as to avoid conflict with future ANSI standards.
Btw, I eventually found out which terminal I was thinking of - it's the VK100. It supports ReGIS, so a |
See, this is why I'm glad you're helping me figure this out. I had no idea about the ANSI requirement that vendors stick to 0x70..0x7E for CSI. Now that I know that, I think your suggestion of
You have a VK100 GIGI? Those sound pretty neat, but the closest I've ever come to one is when I noticed that someone was trying to sell an empty GIGI box on eBay for way too much money.
I would have thought so, too, but I was reading the VT125 User Guide recently for my font upline-loading program. In the section on DCS it says, "if the [...] action does not apply to the device, [...] the device ignores the escape sequence entirely". Interestingly, it also seems to say that the VT125 can display sixel bitmaps. Although, of course, it doesn't name them as such. Instead it refers to the "DECwriter graphics protocol", "DECwriter control commands", "DECwriter descriptor data", "DECwriter graphics hardcopy descriptor", or "Hardcopy image data". Excerpt from User Guide showing VT125 sixel supportTable from Appendix F.3 comparing VT125 to VK100
|
Sadly not, but MAME has a partially working version that I've been experimenting with. The serial port doesn't seem to work, but you can still play around in local mode to see what sequences are supported and how they behave. It's got some really neat features.
Sorry, I wasn't very clear, but what I was trying to say was that the VK100 doesn't support Sixel, so it didn't meet the requirements of your original question, i.e. a sixel capable device that couldn't handle an unknown DCS.
Well that's a good sign. So then maybe it can be considered safe to use an unknown DCS on all the DEC sixel devices. Just not all the ReGIS devices.
It's a shame the VK100 couldn't also force the printer redirection with a media copy sequence though. Because it has a regular escape sequence for triggering a hard copy ( |
I noticed that you recently added another version of the "Bill The Cat" image (ef477b2), so I thought it's probably worth discussing. Because you've now got three different versions in this repo (plus an additional two duplicates), and every one of them is incorrect!
The oldest instance I've found was posted to the
comp.os.vms
newgroup back in 1989. It's possibly not the original source, but it's the only "correct" version I've seen. There's a copy of the message archived in Google Groups here:https://groups.google.com/g/comp.os.vms/c/7ns4E74ahK8/m/RUeKjxaGR9gJ
Note that it's in two parts: a sixel file with no palette definition, and a ReGIS file which defines the palette entries. In the sixel part, there are three colors in the order
#1
,#2
, and#3
, and since the palette isn't included, those map directly to color table entries 1, 2, and 3 (color 0 isn't referenced directly, but that is the background color). The actual palette values are defined in the ReGIS file as 0 = green, 1 = black, 2 = red, and 3 = white.So that gives you an image made up of black, red, and white pixels, on a green background. You can see below what it should look like (more or less). The mix of red and green render the cat in a shade of orange, and you can clearly see the black whiskers against the green background (which isn't the case in most other variants).
Now lets look at the versions that you've got in this repo:
sixeltests/cat.six
(alsokermitedemos/CAT.SIX
): This looks like someone attempted to convert the ReGIS palette to sixel (still separate from the main image), but the colors are in the wrong order because of a misunderstanding of how color entries are mapped.#0
is the first color defined, so that's sets color table entry 1 to green, when it should be black.#1
has a bug in the definition so that's ignored. That leaves#2
and#3
as the second and third valid definitions, so they correctly set color table entries 2 and 3 to red and white.The end result is that the black bits of the image are rendered in green, and the background that is meant to be green is black.
sixeltests/cat2.six
: This looks like an attempt to merge the two sixel parts fromcat.six
into one sixel image, and fixes the color definition for#1
.Because the palette is defined with the image, the numbers all map correctly. So
#1
is black,#2
is red, and#3
is white. But#0
is never referenced directly, so there is no green in the image, and since#3
is defined last, that make the background white when it should be green (at least on VT240 - it's assumedly still black on the VT340).sixeltests/cat3.six
(alsojerch/cat3.six
): This looks like a variant designed specifically for the VT340. The color numbers in the image have been remapped, with#1
changed to#0
.#2
left as#2
, and#3
changed to#15
. The color palette isn't included though.With a default VT340 palette that give you the colors black, red, and white, which is at least the correct hues for those pixels, but the green background is still not set correctly. And on a VT240,
#15
maps to color table entry 3, which is green rather than white, so that is completely wrong.The bottom line is that if you want to get this working correctly in a single sixel image on the VT340, you need a sixel palette definition that covers all sixteen entries, so you can set the last one (the background) to green.
But the easiest solution would be to use the ReGIS palette definition from the original. That should (I think) work on both the VT240 and VT340. I'd completely forgotten about that as an option when we were discussing portability in jerch/xterm-addon-image#41 (comment).
The text was updated successfully, but these errors were encountered: