Composite video generation

If you want to ask questions about how the machine works, peculiar details, the differences between models, here it is !
How to program the oric hardware (VIA, FDC, ...) is also welcome.
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Composite video generation

Post by ThomH »

I'm a circuit-reading dunce. Having opened with that, I was looking at the Oric schematic to try to learn a bit more about how composite video is generated. The relevant area seems to be along the top of the schematic, mostly to the right.

First point of great interest: there's a 256x4 PROM involved. Has anybody ever dumped that? From a photo of the motherboard, it looks like IC23, the TBP24SA10 just below the modulator.

Inputs appear to be:
  • pin 2: the R channel
  • pin 3: the G channel
  • pin 4: the B channel
  • pin 7: the sync channel, inverted (presumably so that high = sync?)
  • pin 1: the output of a sync-triggered 74LS123 (presumably a back porch timer, for the colour burst?)
  • pin 15: the output of a sync-triggered 74LS74 (a flip-flop; to achieve the alternating part of PAL?)
  • pins 5 and 6: the output of an independent 74LS74 (presumably a free-running colour subcarrier phase counter?)
Then the four outputs, pins 9, 10, 11 and 12, look like a resistor ladder for a (presumably highly non-linear) digital-to-analogue conversion.

Just from pin counting, that would appear to imply a very discrete approximation of the colour subcarrier (two input lines, so four values?), with only sixteen possible composite output levels?

Is there anybody that could dump the TBP24SA10?
User avatar
iss
Wing Commander
Posts: 1635
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Composite video generation

Post by iss »

It's already in the old posts ;).
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Re: Composite video generation

Post by ThomH »

iss wrote:It's already in the old posts ;).
Oh, with an 'N'! That looked like a smudge on the photo I grabbed.

That's really cool. I'll be able to test my guesses about the meanings of the other lines and report back. I wish I were better at electronics.
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Re: Composite video generation

Post by ThomH »

Seemingly confirmed. Indexing into that ROM is:

apRG Bscc

a = even or odd line; increments every sync
p = is in back porch; stays high for a while after sync to effect the colour burst
RGB = the colour channels
s = sync, active high;
cc = phase within the colour cycle, increments close to 1135 times per line

From which I can tell you immediately that 0 is the sync level; 4 is black; 14 is white.

On an odd line, 2, 4, 6, 4 is the colour burst; pure red is 8, 9, 5, 6; pure green is 8, 12, 10, 14; pure blue is 10, 6, 11, 7.

I presently have no idea whether it's a linear scale. The schematic I have (linked above) is too low quality to be able to read the resistor values. However it provisionally looks a lot like it might be: the colour burst has an peak to trough distance of 4 and that seems to more or less to hold for each of the colours individually. The values used for the colours then overlap — it doesn't seem like e.g. there's a huge jump as soon as the third bit is enabled.

Does anybody have a schematic or parts list in which the register values can be read?
User avatar
iss
Wing Commander
Posts: 1635
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Composite video generation

Post by iss »

Again the answer is hidden in old posts :).
or:
R16 = 1k Ohm
R17 = 2.2k Ohm
R18 = 3.9 kOhm
R19 = 8.2 kOhm
... and here is simulation for you ;).
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Re: Composite video generation

Post by ThomH »

Also from the repair guide, I was off about that phase counter. It's two independent signals in quadrature, not a direct counter. So it counts 00, 01, 11, 10. Close though.

I still have a phase error in detecting the colour burst but here's the very first 'working' output based on throwing direct composite level ROM values at my CRT emulation:
Screen Shot 2016-12-08 at 22.20.31.png
Versus the SCART reference shot:
Screen Shot 2016-12-08 at 20.19.04.png
So, yeah, that's not quite right. But it should be once the overall phase is correct.
User avatar
Chema
Game master
Posts: 3012
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Composite video generation

Post by Chema »

Impressive! This is too complex for me, I admit; however I'd like to point out that there is a variable resistor which lets the user modify the color "intensity" from b/w to something which was completely distorted but very bright :)

I am quite sure you are aware of it, but the color output of the Oric may be quite different depending on that value... I guess you'll go for colors which are similar to RGB and keep them fixed?
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Re: Composite video generation

Post by ThomH »

Chema wrote:Impressive! This is too complex for me, I admit; however I'd like to point out that there is a variable resistor which lets the user modify the color "intensity" from b/w to something which was completely distorted but very bright :)

I am quite sure you are aware of it, but the color output of the Oric may be quite different depending on that value... I guess you'll go for colors which are similar to RGB and keep them fixed?
I was completely unaware. But I've yet to give my emulated CRT the usual colour, brightness and sharpness controls too, so it feels likely that I'll just leave it fixed to a certain value it in the short term. First of all though, I need to fix my phase to get the real composite colours. Versus e.g. this colour wheel, mine look off by about a twelfth of a cycle. I'm sure I'll figure out how that's happening eventually.

I guess one interesting observation is that substituting XT2 at 8.8672575Mhz (twice the PAL colour subcarrier) for an equivalent at 7.1590909Mhz (twice the NTSC colour subcarrier) and switching the PROM would be sufficient to create an NTSC Oric. Oh, and a main ROM switch to start in 60Hz mode.
Post Reply