TMS9918 not displaying color

Par cbmeeks

Supporter (8)

Portrait de cbmeeks

24-03-2022, 22:14

I hope it's OK for me to ask this here. I'm not sure where else I could ask.

This is not MSX specific so my apologies if my OT post is not welcomed.

Long story short, I am trying to connect a TMS9918 to an Arduino.

At the moment, I don't have any RAM connected. All I'm trying to do is cycle the background colors to see if it works. I've been following this video of someone who got this to work:

https://www.youtube.com/watch?v=QYom_OBcBCY&t=945s

Now, I have done everything he has and it *almost* works. I can see the screen cycle through the background colors but they are not actual color. Only shades of gray and white.

I have the composite out connected like in the attachment.

Composite Out

The only thing I don't have connected is the ferrite bead.

I can go into more detail but wanted to keep this brief in case being OT is not allowed.
Any help would be appreciated.

Thanks!

!login ou Inscrivez-vous pour poster

Par Grauw

Ascended (10623)

Portrait de Grauw

25-03-2022, 00:00

You likely have a TMS9928A or TMS9929A. They output Y (luminance) on pin 36 instead of COMVID.

If the chip says TMS9918A on the label, try to rub it with acetone and see if it comes off. Chinese chip markets like to relabel similar chips for no good reason.

As for the solution, you could try to get a true TMS9918A, or build a circuit to construct a composite video signal from Y, R-Y and B-Y. You can probably find a schematic for that in the service manual of some MSX that has a TMS9928A inside.

What would be a superior option though is, you could feed Y, R-Y and B-Y through three amplifiers and output component video, for what I reckon is the best picture quality.

Par cbmeeks

Supporter (8)

Portrait de cbmeeks

25-03-2022, 00:20

That's a great point and I considered that myself.

These are genuine TMS9918's. In fact, I pulled one from a working TI-99/4a and got the same thing. Plus, I put the ones I have into a TI-99/4a and confirmed they worked.

I'm really thinking that my crystal/caps are not accurate enough. Even though I got them from Mouser and Digikey. They "should" be on spec.

Just really running out of ideas. :-(

Par Parn

Paladin (800)

Portrait de Parn

25-03-2022, 01:45

I know this is a long shot, but have you considered using the simplified monitor interface circuit as indicated in the TI docs?

Par cbmeeks

Supporter (8)

Portrait de cbmeeks

25-03-2022, 03:54

Another great idea. And yeah. lol

Seriously, I have tried everything I can think of.

I read in the TMS docs that if the capacitance of the crystal is off, you can loose color. So that has to be it. I'm thinking these particular crystals I have along with my caps is just too out of spec. I even found a ferrite bead just to be consistent.

So I put the crystal output on my logic analyzer and it fluctuates from two frequencies. 10MHz and 12.5MHz. Which is way off for some reason.

Thinking it might be my breadboard, I soldered a small board with the crystal as close as I can get, caps as close, etc. Same thing.

When I bought these crystals, I confirmed they were the right frequency. However, I don't remember the tolerance. Mouser has one more version of that frequency that I don't have. So I've ordered that.

If the new crystal doesn't work, I may have to admit defeat. But what a painful road this has been!

At any rate, thanks for the help.

Par Wlcracks

Champion (475)

Portrait de Wlcracks

25-03-2022, 08:06

I am always amazed people get this stuff working in the first place on a breadboard. I always experiance bad contacts, ground loops and hf issues. But anyways.
You could examine the output for color information with oscilloscope with a rf probe, that could clear out a lot. I don't think its possible to measure a crystal with a logic analyser. The probes will load it down due to capacitance. Even with a expensive oscilloscope probe you could load the signal down sometimes.
The crystal and the capacitors are a team. The capacitors "c0g" and the specification of the crystal need to match. Not all crystals can "drive" the capacitors and will work on the input of the chip. Normally this could give clock drift.
The ferrite bead is to filter the supply, if the power supply is very noisy the color could be "killed" by the monitor.
Also the input resistance of the monitor needs to match.
There are some registers in the TMS that could possible send out a b/w signal too, not sure, but I would double check the right set of values for registers too.
The initial state of the Arduino could send floating signals, this could send obsolete information too, I don't know if your used pull up/down resistors and/or buffers.
Using a PAL TMS on a NTSC monitor only, and vice versa, could result in in black and white only.
conclusion: oscilloscope -> check color information on composite output

Par cbmeeks

Supporter (8)

Portrait de cbmeeks

28-03-2022, 20:49

I finally got it to work!!

Turns out, the crystal I got from Mouser and Digikey were not accurate enough.

I found another version from Mouser that was dead-on and now I get color.

For those that are curious, I listed my part number here:

Color

Thanks for your help!

Par Parn

Paladin (800)

Portrait de Parn

28-03-2022, 21:30

Great news, thanks for keeping us updated. Wink