Best options for Commodore 128 video out?

May 22, 2019
229
108
43
I kind of wondered if there may be a better way to take the Digital RGBI to HDMI modern Digital. I figured the signal differences are to great for a simple solution. RGB is for driving the electron guns in a CRT. I expect modern Digital HDMI/DVI are optimized for LCD technology and don't have that same throwback compatibility
Yes, that's essentially what's going on. RGBI (or CGA) isn't really "digital." It's bi-state analog.

Digital is an unfortunate, overloaded term. Essentially, it just means that a circuit is recognized as being "on" or "off", without any intermediate state. However, the common use of the term implies that a digital signal is really a bitstream signal, meaning bits and bytes are encoded in the stream.

CGA is a great example of a bi-state analog signal, because there are no bits or bytes in the signal. Each color line is on or off, but there's no division from one pixel to the next. Without a logical grouping of bits into bytes, the signal doesn't really qualify as "bitstream digital", in the sense that an RS-232 connection would. Instead, the pins and the electron gun on the CRT have a 1:1 relationship. When the pin is high, a pixel on the screen lights up. When the pin is low, the pixel does not light up. Because of this design, CGA is only useful for video information. You can't use CGA to send an MP3 file, for example.

DVI, on the other hand, is an actual bitstream interface. For each color channel, a series of bits is transmitted. Those bits have a logical division, with a definite spacing between bits. Those bits are grouped in 10-bit symbols, and those symbols are decoded into 8-bit bytes. This is truly a digital, bitstream interface that, with changes to the firmware driving the transmitter, could actually carry binary payloads, such as am MP3 file or a spreadsheet.

What's interesting is that DVI splits the signal into three physical channels, like CGA and VGA do. I think the reason for this is to allow for pixels to be decoded and displayed at exactly the same time. This also makes it possible to process DVI signals in parallel.

What you'd have to do is build a digital encoder for each channel that, essentially turns two lines from the CGA signal into a single byte of DVI data. The "I" line would feed the low bits of the byte, and the color line would feed the high bit.

R=0, I=0: 0000 0000 or 00h
R=0, I=1: 0101 0101 or 55h
R=1, I=0: 1010 1010 or AAh
R=1, I=1: 1111 1111 or FFh

(taken from https://en.wikipedia.org/wiki/Color_Graphics_Adapter#Color_palette )

This is just one color, and that has to be done a total of 3 times, one for red, green, and blue. In an FPGA, this would be three separate logic blocks that then feed the DVI or HDMI encoder.

As you can imagine, it's probably simpler to just use an analog circuit to feed an off-the-shelf VGA circuit... which is how someone came up with the original CGA2VGA circuit for the Commodore 128 (and, presumably, IBM PC.)
 

Markeno

Member
Jul 19, 2019
50
30
18
hobbytronics.home.blog
As I expected it is a bit more work that I am interested in, and apparently about anyone else as there is no such product as far as I have seen. Not to mention well above my abilities and understanding of the subject.

Anyways, I did finally figure it was worth risking connecting up the circuit to my C128. It doesn't work. I am not sure what is wrong at this point. It may be my vintage 7400 setup as the XOR gate. If I swap it with the Mono Composite, then I get Mono Composite out of it. I am seeing "something", a blue something on the screen where the text should be when the 7400 is connected for the Sync instead so something is operating. Maybe the 7400 is slow, maybe something else is wrong. It is one ugly looking mess of wires and components.
 

Mike

New Member
Good on you for taking a shot, though. It certainly looks beyond me, but I've been considering ordering a bunch of parts and just having a go anyway.

I do wish there was a better way to test this stuff first, rather than just plugging it into the C128 though, heh. I just got an EPROM programmer the other day, and it was definitely very nerve-wracking to shove a home made cartridge into a real computer for the first time, and that was just a C64 that I had at least one other working version of.
 

Markeno

Member
Jul 19, 2019
50
30
18
hobbytronics.home.blog
The issue was not the 7400. I get the same thing with the proper XOR ic. Ya, I don't like plugging unknown hardware into these things. I did what checking and what testing I could before doing so, which was verifying the XOR. Having it on a limited power supply and watching for any spike on that. I don't know what is wrong. I will look up the "resistor" based circuit again and give it a try. Somehow I had missed it, but H2Obession has a "Ultimate" converter design that does the Brown color correction (and Dark Grey I think too). Still if I can't get the regular one working, I expect that one won't either. I haven't given up yet. I prefer to work things out than give up and buy something premade if I can. Still you quickly get over the cost of a premade unit if you can find one available by buying too many parts.
 
  • Like
Reactions: TomXP411 and Mike

Markeno

Member
Jul 19, 2019
50
30
18
hobbytronics.home.blog
20190814_213846.jpg20190814_214400.jpg
I had found the schematic of a simpler resistor and circuit with a little mosfet that I figured I would try. Dark Green looks a bit off, maybe the basic command was wrong. The first time I turned it on it was a bit glitched. I turned it back on and it came up to the proper screen as seen in the first picture.

So the C128 is working properly, the SCART to HDMI works, and the HDMI to VGA works.

I may have wired something wrong on H2Obsession's design. I will go back and see if I can get it up and running. In the mess of wires on the breadboard just about anything could be wrong. With the "Ultimate" version with the Brown fix it would certainly be superior to this one I just tried out. But it is good to find it is all in good working order too. I was wanting to verify that it can work and wasn't a hardware problem with something, and I am glad it is just something with the circuit. When I get it working, I will put the info together on how it is wired up, which won't be using the 7400 IC. For the Brown Fix it needs 3 XOR Gates so one 7486 is far better than 3 7400s..
 
  • Like
Reactions: Mike and TomXP411

Markeno

Member
Jul 19, 2019
50
30
18
hobbytronics.home.blog
It was just simply following a schematic. Nothing special, I just likely did something wrong with the other circuit, or had a bad connection on the breadboard somewhere. I am going to try H2Obsession's "Ultimate" circuit, which includes color correction. I just need to wait on the one 74148 to arrive. I hope the HC model works for this, I should have had an LS ic I believe. It is my hobby to mess with electronics so I don't mind getting a few spares to tinker with.
 

Markeno

Member
Jul 19, 2019
50
30
18
hobbytronics.home.blog
Some progress. I am still not able to get the CSYNC to work. . I DID get the colors though. I have not seen Brown or anything on a real CRT with a C128. It does have the Brown fix in the circuit design I am trying out. I am having to use the Monochrome Composite for the Sync though on this test. There is a little gitter, you can see there on the White line and the Light Gray. I need to get rid of that it is quite distracting. I found the SCART wasn't switching over to RGB when feeding it the 2.5Volts on the blanking pin, by putting the full 5Volts it did switch from Composite over to RGB. This possibly means the H2Obsession circuit was working. Of course I ripped it off of the breadboard to put this circuit on instead.. I really should clear some of my boards off.. I'll see about getting the sync sorted out it may be my 7486's fault, who knows and see if that fixes the gitter. If I get something working well, I will setup a thread with proper diagrams etc.




20190824_002749.jpg
 
  • Like
Reactions: TomXP411 and Mike