C128 RGBI / VDC questions ....

Started by Mark Smith, November 15, 2007, 11:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mark Smith

Hello,

(apologies for the rambling, I typed as a was thinking)

I'm just mulling over some thoughts about the whole C128 to VGA thing, mainly wondering what can be built to do the job (buying something is ok but I do like to think as well :-)

What I'm thinking is to take a sample of the the RGBI pins every tick of the Horizontal-Sync, then re-output 3 * 8bit values
I think the RGBI states equate to the following:

R G B I   Colour
0 0 0 0 - Black  
0 0 1 0 - Blue    
0 1 0 0 - Green
0 1 1 0 - Cyan
1 0 0 0 - Red
1 0 1 0 - Purple
1 1 0 0 - Brown
1 1 1 0 - Light Grey
0 0 0 1 - Dark Grey
0 0 1 1 - Bright blue
0 1 0 0 - Bright Green
0 1 1 1 - Bright cyan
1 0 0 1 - Bright Red
1 0 1 1 - Bright Purple
1 1 0 1 - Orange
1 1 1 1 - White

24bit values (3 * 8bit) for the colours could then be worked out, and those then fed into a triple DAC (like the ADV7120), this will then give a nice RGB output which can be fed into "something else".

So about the "something else" part .. and this is where my brain is straining ... I know of lots of parts that will happily take in an RGB input from the ADV7120, but is the output of the ADV7120 going to be anything we can work with.

I'm assuming that you'd use the Horizontal-Sync coming from the RGBI as the clock for both sampling the RGBI outputs and as the clock being fed into the ADV7120 so it can sample it's 8bit RGB inputs and it would in turn be put onto the Green output (sync on green) .. do I understand that right ?

Also is the RGBI output of the C128 interlaced or progressive ?  For every tick of the VSync is it alternating between odd and even fields ?  Or for every tick is the montor drawing a single frame ?

The more I think the more questions come to mind :-)
------------------------------------------------------------------------------------------------------------------

Commodore 128, 512K 1750 REU, 1581, 1571, 1541-II, MMC64 + MP3@64, Retro-Replay + RR-Net and a 1541 Ultimate with 16MB REU, IDE64 v4.1 + 4GB CF :-)

hydrophilic

Lost my post.  Darn the backspace!  Well it means you get the short version :)

Your equates look correct.  

It seems you could use a single transistor for each of R, G, B to produce an anolog signal for VGA.  Use another set of 3 transistors to scale each of these when Intensity is set.  That is, a triple DAC maybe more overkill, but maybe the ADV7120 is easier to use than 6 transistors.

The VDC normally produces progressive scan video but can be programmed for interlaced video.  It seems with proper programming, it could produce a signal most VGA monitors could live with, but I'm not a VGA expert.

Sounds like something fun to play with...

airship

Look at the schematic for the monochrome output for the VDC. Replace the RGB AND gates with a transistor array for each color that's similar to the one used for the ANDed RGB values. I think you're done.
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

coze

Hello there,
my first post on this forum :) I have a nice c128 sitting on my desk which I use mainly in c64 mode with MMC64. I'ld like to have a look at the c128 side and see what it's capable of. So I thought first I need a rgb-i adapter to connect it to my LCD screen. I think an analog RGB signal can be made from the rgb-i signals, but what is the horizontal frequency of the rgb-i signal ? 15 or 30 KHz ?

Mark Smith

15khz ... bit of a bummer these days ... but hey who knows maybe in a few months.
------------------------------------------------------------------------------------------------------------------

Commodore 128, 512K 1750 REU, 1581, 1571, 1541-II, MMC64 + MP3@64, Retro-Replay + RR-Net and a 1541 Ultimate with 16MB REU, IDE64 v4.1 + 4GB CF :-)

smf

Quote from: Mark Smith on November 15, 2007, 11:48 AM
I'm assuming that you'd use the Horizontal-Sync coming from the RGBI as the clock for both sampling the RGBI outputs and as the clock being fed into the ADV7120 so it can sample it's 8bit RGB inputs and it would in turn be put onto the Green output (sync on green) .. do I understand that right ?

Also is the RGBI output of the C128 interlaced or progressive ?  For every tick of the VSync is it alternating between odd and even fields ?  Or for every tick is the montor drawing a single frame ?

The more I think the more questions come to mind :-)

RGBI can be interlaced or progressive. In interlaced signals the vsync usually triggers and there is something in the sync that tells you whether it's odd or even frames.

horizontal sync only fires at the end of each line, not after every pixel. Ideally you'd work out the pixel clock the same way analogue lcd monitors do when you press the calibrate button. I know at least the 128dcr vdc can do more resolutions than the 128 vdc can. So you can't just hardcode it.

However if all you're doing is rgbi to analogue rgb at the same frame rate then you don't need to worry about sampling. Only if you're going to upscale it do you have to do anything funky.

There is a simple design that does a straight conversion. Or if you want to be able to define your own colours then a prom and resistor ladder will do it, you might be able to get away with a pal/gal too. The only problem you run into is that with this method then you need power.

The schematic here:

http://www.softwolves.pp.se/cbm/maskinvara/scart.en.html

Will give you something, but the colours might be "wrong". But it's cheap and needs no power. I'm actually tempted to try it though.

machinehead

Isn't this schematic a conversion from RGBI to Sync on Green? If so then this circuit, combined with any device that converts Sync on Green to VGA would work, wouldn't it?

Mark Smith

That schematic needs a few more bits to work .. it doesn't factor in h-sync or v-sync anywhere, so I've no idea how the TV would know what the hell was being thrown at it.

I've a post on the forums somewhere that shows a H-sync+V-sync to C-sync conversion and that then puts it into the Green channel for Sync on green, or you can put the C-sync to the relevant pin on scart  .. just not go to do anything lately .. running out of monitors and don;t have a TV in range of the C128 :-(

------------------------------------------------------------------------------------------------------------------

Commodore 128, 512K 1750 REU, 1581, 1571, 1541-II, MMC64 + MP3@64, Retro-Replay + RR-Net and a 1541 Ultimate with 16MB REU, IDE64 v4.1 + 4GB CF :-)

machinehead

If I used the schematic from www.softwolves.pp.se/pics/schema.gif.  and simply hooked up the H and V as incicated on the following inputs on the Highway CGA converter, wouldn't that work?

The Highway CGA card inputs:

Input 1 Sync Combine CGA:
Input 1 CGA: 6 Pin (R,G,B,GND,H/V,N.C.)

Input 2 SYNC Seperate CGA:
Input 2 CGA: 6 Pin (R,G,B,GND,H,V)

I am not an expert, just clueless! Help!

hydrophilic

I've never done it, but it looks Input #2 would work just fine.  I would try it first without the Intensity circuit.  If it works, then add that circuit.