Closed SegHaxx closed 3 years ago
Thanks! Contributions are very welcome.
the "dot stretcher" needs to happen after "widening" for correct rendering of double-width chars.
I have checked this against a real VT100. What information do you have about this?
I also checked a real VT220 and it does the stretching after.
I suspect the root of this is some mixed up address lines in the char gen roms? Is something clever being done in the hardware?
I just got the ROM images off the net, so I can't say for sure. I have read the Technical Manual but I didn't see anything about this. Your examination using GIMP certainly makes the image look odd.
FYI @masswerk
Hmmm interesting. I was looking at this page yeah: https://www.masswerk.at/nowgobang/2019/dec-crt-typography which probably nicked it from here https://vt100.net/dec/vt220/glyphs ?
A big problem I've had is most screenshots of old video terminals on the web are a bit vintage themselves, too fuzzy and low rez for accurate pixel peeping. Some well-exposed, sharp reference photos of some good reference screens with a modern DSLR would be very helpful.
Okay dug through the technical docs, and I may have figured out how this got confused. This block diagram implies the dot stretch happens last, maybe?
Going through the schematics, all I can gather is that most of this happens inside some opaque custom chips which doesn't tell us much.
However the important bit is in the tech docs, the dot stretcher is explained like this:
The dot stretcher is clocked by Dot Clock. So what does Dot Clock do during double-wide chars?
It's halved. Long story short, doing dot stretch before widening is effectively correct. I've corrected the patch.
I collected some screenshots here, and begged people to send me their photos: https://github.com/larsbrinkhoff/terminal-simulator/issues/5
I have since acquired a VT100 of my own so I can make reference photos.
I think "VID IN" is essentially the character graphics, which is fist passed to "DOT STRETCH DELAY". After that comes the "ATTRIBUTE LOGIC" which applies reverse video, underline, dim/bright, and blink.
Hmmm interesting. I was looking at this page yeah: https://www.masswerk.at/nowgobang/2019/dec-crt-typography which probably nicked it from here https://vt100.net/dec/vt220/glyphs ?
"probably nicked it" is a funny way of putting it – there are named credits and source links for every single image (2 in total), as well as remarks on how they were used/altered.
A big problem I've had is most screenshots of old video terminals on the web are a bit vintage themselves, too fuzzy and low rez for accurate pixel peeping. Some well-exposed, sharp reference photos of some good reference screens with a modern DSLR would be very helpful.
This is literally the opening proposition of that post.
Photo from real VT100.
Closeup to show details. Clearly the little gaps in n
, d
, h
, and g
aren't there.
Merged the "font ROM" fix. Thanks!
The plot thickens. I agree, definitely looks correct for VT-10x, but that photo of a VT-220:
https://user-images.githubusercontent.com/775050/119037360-2a4def80-b9b2-11eb-981b-5a6c81c4927a.jpg
Its showing the gaps? Oh well we can worry about that when we get to VT-220 emulation. :)
The chargen ROM as dumped (MAME, for instance) is correct. The Technical Manual explains how the low 4 bits of the chargen address are calculated: https://vt100.net/docs/vt100-tm/chapter4.html#S4.6.3.4
In short, the glyph scan addresses are 15, 0, 1, 2, ..., 8.
Hi, I fixed some rendering issues. First one is, the "dot stretcher" needs to happen after "widening" for correct rendering of double-width chars.
Second is #28. I tried the obvious fix,
scroll - 1
, but then it still wasn't quite right. After staring at vttest's character set screen a bit I figured out the first scanline of a cell was showing up on the next char, soif (scroll == 0) ++c;
did the trick.I suspect the root of this is some mixed up address lines in the char gen roms? Is something clever being done in the hardware? A cleaner fix would be to re-order the rom the way the code expects, but I wanted to confer with hardware experts before doing so.
Looking at the raw bits in GIMP confirms the ROM image itself is off. As the upper row is only visible in a few special chars, this would be easy for whoever dumped the ROM to overlook.
This all looks "more correct" to me but I do not have a real VT100 or any experience with one so this should be qualified against a real one. :)
My only experience with real text terminals was Wyse terminals at the library. If anyone is working on emulating Wyse terminals, let me know. I haven't even been able to find any ROM dumps for those. :(