Video Capture of a Real Oric on a PC !!!

This is the right place to discuss on how to implement hardware vsync, adding a VIA or AY chipset, puting multiple roms, or how to design a new flash expansion card.
User avatar
waskol
Flight Lieutenant
Posts: 414
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Video Capture of a Real Oric on a PC !!!

Post by waskol »

For the moment, it is just an idea, but rather easy to realize.
The idea is to link the rgb output of the Oric to the "video in" of the PC (that means you have a vivo graphic card or a video capture card)

- That can permit to record some video.
- Use the screen of the PC as an output monitor, while surfing on www.defence-force.org
- screenshots of special coding tricks not available on emulators
- and, i am sure, a lot more

How to ?
- first, you have to build a cable in order to link your RGB output on the Oric side to the Composite input of your capture device (I did it, so you can... nah I am not an electronics specialist :D ). For this you have to build it following the instructions given in Theoric n°8 page 36 (you can find it on the web).
- A detail : in Theoric it is said that the level of grey should be computed with this formula :
LevelOfGrey(%)=0.30*Red+0.59*Blue+0.11*Green
It should be, instead :
LevelOfGrey(%)=0.30*Red+0.59*Green+0.11*Blue
So you will have to intervert the Rv resistor (initially for the green) and the Rb one (initially for the Blue)
I will come back on this later on...

- Now, if you built your cable, and plug your Oric on a TV, you should obtain a clear and neat image made of greys instead of colors (the signal is no TTL compatible if i understood). This is the same kind of black and white composite output there was on the Amiga computers (like the one I got 2 days age : an Amiga 2000 :P )

- Then if you plug your Oric on the "Video in" and use a video capture software, you will see on the screen of your PC a very nice video of your oric made of different levels of grey.

Here the idea I have (but I do not have time to realize it for now : I have a game for the Oric to finish before) :
- Try to answer the question : how many levels of greys are there ?
--> Answer : 8 !!! (one for each color of the Oric).

Let's take the theoric formula :
LevelOfGrey(%)=0.30*Red+0.59*Blue+0.11*Green

And let's try to convert the 8 colors of our Oric in values of grey :
black=0.30*0+0.59*0+0.11*0=0%
blue=0.30*0+0.59*1+0.11*0=59%
green=0.30*0+.059*0+0.11*1=11%
yellow (=red+green)=0.30*1+0.59*0+0.11*1=41%
.... and so forth

and you obtain this Grey level correspondance with respect to the Oric colors, from darker to lighter :
0% --> Black
11% -->Green
30% -->Red
41% --> Yellow
59% --> Blue
70% --> Cyan
89% --> Magenta
100%--> White

OK, this is obtain with what say the magazine, which is not good at all : the yellow is Darker than the Blue !!!!

No, if we build the cable with our formula (Green and Blue switched), we obtain this chart :
0% --> Black
11% -->Blue
30% -->Red
41% --> Magenta
59% --> Green
70% --> Cyan
89% --> Yellow
100%--> White

This seems more "natural" to me...

OK, now, we need a capture software able to convert "on the fly" the greys into Oric colors in order to show all of that on our PC screen.
Theorically, the image, made up of greys is coded in RGB, and each value of Red, Green and Blue of our pixels should be equal and in the interval of 0 and 255 (1 byte for each, 255 means 100%).
Thus, we should obtain for each RGB component those discret values :
0, 28, 76, 104, 150, 178, 226 and 255.
Of course, our signal is not "perfect", and the greys of our image are a bit distorded, wich means that the real RGB component values do not match exactly our chart but differ slightly.
Which means that we have to think now in terms of some intervals of grey values in order to convert each frame of our video into an Oric colorized one :
if we get a value between : We surely have to colorize it in :
0 and 14 Black
15 and 52 Blue
53 and 90 Red
91 and 127 Magenta
128 and 164 Green
165 and 202 Cyan
203 and 240 Yellow
241 and 255 White

I don't know much about Linux, so I will explain how to do it in windows (basicly) :
- We have t use DirectShow in our Program :
- We have to put a capture filter (this is already done by DirectShow)
- Filter the Video Input with a "Sample Grabber Filter" (that is our work, and this permit to colorize our video, frame after frame
- and then send it to the Video render output (also provided by directshow)

Well, another project, but if you feel to do it yourself, let me know ...

For the moment, it is much like a vaporware, but who knows :wink:
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

I don't know if it would work, but I have to admit that the idea of converting Black and White to color based on the intensity is simply a stroke of pure genius :)

Respect !
mmu_man
Flight Lieutenant
Posts: 322
Joined: Thu Sep 21, 2006 7:45 pm
Location: 26000 Valence, FRANCE
Contact:

Post by mmu_man »

Except the values might have to be scaled depending on the input levels at the card. But it's doable.
One can probably make a vhook filter for ffmpeg in a day or so (unix command line proggy, but it builds in windows as well).
Post Reply