IanSB / RGBtoHDMI

Bare-metal Raspberry Pi project that provides pixel-perfect sampling of BBC Micro video and conversion to HDMI
GNU General Public License v3.0
134 stars 6 forks source link

Atari STe - can a 12 bit extender support Mono and Colour? #35

Open shooking opened 23 hours ago

shooking commented 23 hours ago

Hi there

fundamental question - should the RGBtoHDMI with 12 bit extender, suitably wired to an STe, allow low/medium colour and mono (shorting monitor 4 and 13)?

For my STFM I got it to work - had to modify profile on one system, worked with another "out of the box"

For my STe - colour worked when I chose the STe profile. Mono - I get just a black screen, verified via screen capture, and grid lines with debug. But I see the analog out. If I change sampling to 9 bits vsync I see signal partially getting thru

AtariSTeSamplingMenu9BitsVsync

Hints appreciated. I am about to wire in just the 0v 5v, mono and csync as a test. BUT there seems to be a lot of debate regarding the RGB resistor ordering. See my notes at end.

Finally - would be great if WIKI showed pinout of the 16 pin male connector for the 12 bit extender.

MY SYSTEMS

So I have two types of RGBTOHDMI systems

  1. RGBtoHD 12 bit issue 4 2018 - 20 Hoglet & IanB
  2. RGBtoHD 12 bit issue 7 2018 - 23 Hoglet & IanB

And two 12 bit extenders

  1. 12 bit adapter for RGBtoHD Issue 4 2022 IanB - struggled with STFM

  2. 12 bit adapter for RGBtoHD Issue 2 2020 IanB - worked with STFM, colour STe but not mono

  3. Atari STFM modified to 4Mb, CO78789

  4. Atari STe CA 4003290 1989

and final part of "complication" I have

  1. Pi Zero W V1.1 2017
  2. Pi Zero 2 2021

WHAT WORKS

Atari ST worked with with a lot of help from Mikerochip and Javi.

I used shifter chip. Issue 2 2020 adapter just worked. Issue 4 2022 worked with colour. Needed help with mono [reduce sample rate to 3bpp, modify palette to get b/w rather than yellow] Pi choice was irrelevant (other than 1.1 allows reset)

I moved to the STe - and well things are a bit odd.

I can get colour but not mono. Just a black screen. Capture shows black. Debug, show scanlines, show genlock ... displays something. I feed the analog signal to a VGA monitor and the picture is clear. The RGB is black BUT I modified AtariSTe Sampling to 9Bits Vsync and you can hopefully see the mono image in background. albeit geometry and position is off.

Any hints gratefully appreciated.

ONE HINT - would be nice to have a diagram of the IDC pins. I believe they are "standard" but there is some ambiguity on the silkscreen. There is standard triangle with corresponding pin 1. But then 4 pins along there is P4. It could mean ordering is Pin1 2 3 4 along long row. But seems to be normal pin 2 BELOW pin 1. A diagram on the wiki would be cool.

I have researched and found official cable agrees with Mikerochip's hints

STeRGB2HDMI

But I see other suggestions from pixelk - perhaps using an Amiga board?

AtariSTePixelK

Here's my comparison of these suggested resistors

AtariSTeSuggested Resistors

And here's my photo (sorry I am red/green colour blind so I make it same as above chart BUT I am confused why there is a blu2, B2 then recommendations to change ordering due to STe R3 really being R0? Could it be issue 4 fixes problem with issue 2 boards?

MySTeResistors_labels (2)

luciust commented 20 hours ago

Yes, for medium you don't need to change anything, it just works. For mono, you need to do extra work, but anyhow - it's best to adapt a Amiga pickup board - I've detailed this here (that's in English don't worry with the title): https://blog.jokielowie.com/en/blog/atari-st-ste-modyfikacja-sprzetowa-perfekcyjne-wyjscie-obrazu-hdmi-dzieki-projektowi-rgbtohdmi-oraz-raspberry-pi-zero

Please have a look, and I see you've already looked at Amiga board... For me - STF/STFM is not an issue, while STE - used the afomentioned pickup-board for first try and it works also for my friends - the purple wire shows the mono "hack": image

shooking commented 19 hours ago

I saw that thanks. I wasn't sure if the 12 bit extenders I got would work. If not (on the STe) I am OK with that - I will use MONO via VGA analog adaptor. All my monitors can handle it. I only have one monitor that could handle colour analog.

On your excellent write up I didn't understand the need to wire directly to chip. I will.re read.

I also don't understand why STFM works, but STe doesn't. I wonder if it is because the STE is using CSYNC rather than individual h and v.

luciust commented 17 hours ago

Actually - let me know which part was not clear - happy to change it if helps - primarly those are notes for me... So I don't have to remember it all.

CSYNC, or composite sync, can be described as a combined version of the HSYNC and VSYNC signals. Since CSYNC is defined by those two sub-components, and as you know HSYNC is horizontal sync and VSYNC is vertical sync and it is combined later for the RGBtoHDMI into CSYNC anyway. So - maybe you need to take a look at the STE profile? Show me your STE picture output and settings, maybe we will figure it out that way.

Definetly using the Amiga pickup solves any STE issues. Go for that! PCBs are very cheap today. I would send you one but it still would be more expensive than any 5 pcs from China.

shooking commented 17 hours ago

Hi and thanks. What I am unclear about is if the 12 bit extender board I got can be modified to allow mono. My guess is the STFM version, using the level shifter and separate syncs, is doing something different to the STe.

I also see some discussion about R0 to 3 being labelled incorrectly on an STe.

I understand syncs. From what I read the STe profile knows a CSYNC will be passed in. This leaves the spare pin to interpret mono. I was hoping that the 12 bit extender I got would work in mono mode.

I will see if I can hack my setup and/or order Amiga PCB.

Thanks again

luciust commented 17 hours ago

I think it is correctly passing the MONO signal to the RGBtoHDMI sampler, but my mind is elswere now. It is hooked up to bus transciever and then... sorry - magic happens. I think the actual answer might be in my communcation couple of years back on this or on hoglet76 github, so if you can find my old posts - that would probably shed some light.

IanSB commented 11 hours ago

@shooking

fundamental question - should the RGBtoHDMI with 12 bit extender, suitably wired to an STe, allow low/medium colour and mono (shorting monitor 4 and 13)?

Yes it should work with the mono signal fed to the Vsync input of RGBtoHDMI which is repurposed as a video input for mono mode. The mono sub profile should be auto selected when the sync signals switch to the higher refresh rate so confirm that the sub-profile shows as the mono one. (Auto selection is disabled when the menu is on screen so only call up the menu after switching)

Hints appreciated. I am about to wire in just the 0v 5v, mono and csync as a test. BUT there seems to be a lot of debate regarding the RGB resistor ordering. See my notes at end.

The problem with bit ordering is due to the way that the STE schematic numbered the bits.

On RGBtoHDMI the bits were always R3, R2, R1, R0 ; G3, G2, G1, G0 ; B3, B2, B1, B0 with the '3' being the most significant bit and '0' being the least significant bit.

On the ST there were only 3 bits each of RGB and they were numbered R2, R1, R0 and they could be mapped easily to the existing RGB inputs.

However on the STE an extra bit for each of RGB was added and this was the least significant bit but it was named R3, G3, B3 so the bit ordering was messed up. I presume this was so that the most significant 3 bits matched the ST but it meant that the bit order was R2, R1, R0, R3 etc.

The confusion arose from that as some users mapped them to RGBtoHDMI directly by number which messed up the bit order. Whereas the correct order is RGBtoHDMI R3, R2, R1, R0 to STE R2, R1, R0, R3 etc.

The easiest way to avoid confusion is to go by resistor values:

The smallest value RGB resistors are connected to RGBtoHDMI R3, G3, B3 The next largest value RGB resistors are connected to RGBtoHDMI R2, G2, B2 The next largest value RGB resistors are connected to RGBtoHDMI R1, G1, B1 The largest RGB resistor values are connected to RGBtoHDMI R0, G0, B0

shooking commented 11 hours ago

Thanks @IanSB I put diagrams based on your cable pins. I traced the 16 pin IDC to the R0 G0 B0 etc that flow to the 12 pin header and 4 pin riser.

Did u see my partial mono image if I chose 9 bit csync?

I am wondering if the mono is generated by the low RGB. I saw your reply to @bikerbob (same as you suggested above). I originally wired according to diagram above. But I can see from the resistors values this is incorrect when compared to your explanation. It worked - as in I got acceptable colour but I am red green colour blind :-(

Tomorrow I will solder some 90 deg header to the resistors ends and experiment with dupont cables.

Device works flawless on the STFM. Just can only get poor mono using 9 bit and vsync. Analog his res is fine. So I will wire according to resistor colours as per hints.

Thanks again for support. Would be great to have the IDC pinout diagram added to the wiki.

Best regards Steve

IanSB commented 11 hours ago

@shooking

Did u see my partial mono image if I chose 9 bit csync?

In that mode, the vsync input is used as one of the Green bits so that likely means that you have connected the mono signal to the vsync input correctly so maybe the problem is that the mono profile (which makes RGBtoHDMI look at the vsync input for video) isn't being selected properly. Try setting Autoswich to "Off" and then manually change the sub-profile to the mono sub-profile (when the STE is in mono mode)

Also post a screencap of the source summary page in mono mode and use the info menu to save the log and EDID and post log.txt from the SD card.