Poll

Do you want to buy Richard42's 80-column VGA-display converter solution?

No
4 (8.2%)
I want one
33 (67.3%)
I want two
7 (14.3%)
I want more than two
5 (10.2%)

Total Members Voted: 46

Author Topic: C128 80-column display on modern devices  (Read 23098 times)

Joe1946 and 1 Guest are viewing this topic.

Offline tokra

  • VIC 20 user
  • ****
  • Posts: 122
  • Age: 40
  • Location: near Bremen
  • Activity:
    0%
  • Country: de
  • Reputation: 10
  • Gender: Male
  • With us since: 02/07/2010
    YearsYearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #25 on: July 08, 2011, 05:38 AM »
Thanks for your work! The more people try this, the beter!
(GBS-8220)
1. It only converts 60 hz.  This makes it pretty worthless for the Amiga, since most games and demos are 50hz.  This should be okay for my C128 though.
Hmm, the PAL C128 has 50 Hz as well. You can of course set the VDC-registers to 60 Hz again so that they are the same as on the US-version, but that's really more a workaround.

On the other hand I googled some forums regarding GBS-8220 and 50 Hz and found this:

http://shmups.system11.org/viewtopic.php?f=6&t=35423&start=120

Quote: "I put a 50hz Sega Master System on the 8220, and it converted it to 60hz and displayed that fine."

Hmmm.
Quote
2. The sync signals must be in the 0-2v range, and the input RGB signals must be in the 0-0.7v range.  So you need to use a resistor divider network to go from the TTL 5v levels of the C128 to the analog levels of the converter.

3. Here's the kicker: the GBS-8220 only takes composite sync for 15khz video.  So, you must use a 74 series logic chip (NAND or XOR) to combine H and V sync from the C128, then a resistor divider to get it down to 2v before feeding it to the converter.  I don't know if it can handle either positive or negative polarity; the amiga has negative and I got it working with that.
As I've mentioned earlier the C128 has a composite video signal with sync at 0.5V, see http://www.hardwarebook.info/C128_RGBI
Dabone mentioned earlier in this thread as well that the sync can be extracted by a LM1881-circuit.

Anyway, let us know if you are successfull. Right now I've tried the CM-397 (Ambery AV-1) and I instantly get an 8-color picture with it, even if highly over-saturated, probably because of the 5V-signal compared to the 0.7V the board expects. Haven't gotten around yet to the resistor-network to get this down to 0.7V and 16 colors. Maybe the CM-397 is the best solution anyways, although it's about twice as expensive. It seems like the GBS-8220 needs a lot more hacking to get it to work with the C128.

Then there's always the (industrial) GBS-8219:

http://www.jammaboards.com/store/cga-ega-mda-yuv-to-vga-industrial-xvga-box-converter-unit-gbs-8219-/prod_313.html

According to the manual this handles RGB-TTL directly. But, unfortunately it provides only 8 colors as well if I read the manual right. Plus, it's VERY expensive ($280)

Offline Richard42

  • KIM-1 user
  • **
  • Posts: 48
  • Location: Los Angeles
  • Activity:
    0%
  • Country: us
  • Reputation: 6
  • Gender: Male
  • With us since: 07/07/2011
    YearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #26 on: July 08, 2011, 02:40 PM »
You're correct; the GBS-8220 is no good for PAL C128 owners.  I also found a forum post from someone saying that he had 3 GBS-8220s, and one would take 50hz while the other two would not.  Seems pretty worthless for 50hz video; I guess it's not designed for it.

I did get the GBS-8220 working for 80-column mode on my NTSC C128 tonight.  It does not take positive polarity sync.  The sync signal must be composite, negative polarity, and less than 5v..  I used all the gates on a 74HCT00 NAND chip to make it work.  First I inverted the H and V sync signals (which are positive polarity) from the C128's RGB output, using 1 gate each.  Then I fed these 2 negative polarity outputs into one NAND gate to combine them, then fed that back into the last NAND gate to finally get a negative polarity composite sync.  Then I stuck a 470 or 580 or so ohm resistor on the output to drop the voltage, and the GBS-8220 synced to it perfectly.  Now I gotta work on getting the colors right and reducing all the horrible ringing in the RGB lines.

Offline tokra

  • VIC 20 user
  • ****
  • Posts: 122
  • Age: 40
  • Location: near Bremen
  • Activity:
    0%
  • Country: de
  • Reputation: 10
  • Gender: Male
  • With us since: 02/07/2010
    YearsYearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #27 on: July 08, 2011, 10:11 PM »
Great work! You can also set the VDC chip to PAL-mode by software to see if 50Hz works - it's a very flexible chip. Just type:

sys dec("cdcc"),127,0
sys dec("cdcc"),38,4
sys dec("cdcc"),32,7

These are the same values the C128 itself uses in its kernal. The kernal basically checks which VIC-chip you have and sets the VDC-registers accordingly.

Please let us know what comes out of this. Thanks!

Offline Richard42

  • KIM-1 user
  • **
  • Posts: 48
  • Location: Los Angeles
  • Activity:
    0%
  • Country: us
  • Reputation: 6
  • Gender: Male
  • With us since: 07/07/2011
    YearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #28 on: July 09, 2011, 11:37 PM »
Tokra, thanks for the info.  I tried that last night, and my GBS-8220 couldn't handle it.  I could see on my scope that the sync frequency was down to 50hz, and the composite sync signal still looked good, but the GBS-8220 said "No Signal".

I also got another Ambery AV-1 yesterday, and it works perfectly with my Amiga, in 50hz and 60hz modes.  It can handle interlaced and non-interlaced modes too.  My old one is definitely dead.  The image quality of the GBS-8220 is better than the AV-1.

Offline dmackey828

  • KIM-1 user
  • **
  • Posts: 20
  • Activity:
    0%
  • Country: 00
  • Reputation: 3
  • Gender: Male
  • With us since: 09/05/2009
    YearsYearsYearsYears
    • View Profile
    • The N2DVM Commodore Website.
Re: C128 80-column display on modern devices
« Reply #29 on: July 12, 2011, 02:19 AM »
You're correct; the GBS-8220 is no good for PAL C128 owners.  I also found a forum post from someone saying that he had 3 GBS-8220s, and one would take 50hz while the other two would not.  Seems pretty worthless for 50hz video; I guess it's not designed for it.

I did get the GBS-8220 working for 80-column mode on my NTSC C128 tonight.  It does not take positive polarity sync.  The sync signal must be composite, negative polarity, and less than 5v..  I used all the gates on a 74HCT00 NAND chip to make it work.  First I inverted the H and V sync signals (which are positive polarity) from the C128's RGB output, using 1 gate each.  Then I fed these 2 negative polarity outputs into one NAND gate to combine them, then fed that back into the last NAND gate to finally get a negative polarity composite sync.  Then I stuck a 470 or 580 or so ohm resistor on the output to drop the voltage, and the GBS-8220 synced to it perfectly.  Now I gotta work on getting the colors right and reducing all the horrible ringing in the RGB lines.

That's great! I have one of these boards but couldn't get it to work with straight thru wire connections. Since I'm no electronic genius, Any chance of some sort of drawing of what goes where etc.. ?

I originally bought one of the GBS-8220 boards from jammaboards.com in NJ so I could hook up my Jamma P.O.W and RASTAN Arcade PCB's to my 19" LCD.. Works Great for that.
Any more info would be great. I know a BUNCH of people that want their NTSC 128's hooked to an LCD in 80 Column.

Have a good one and thanks.

Offline Richard42

  • KIM-1 user
  • **
  • Posts: 48
  • Location: Los Angeles
  • Activity:
    0%
  • Country: us
  • Reputation: 6
  • Gender: Male
  • With us since: 07/07/2011
    YearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #30 on: July 12, 2011, 10:23 AM »
Yeah I can make a drawing, no problem.  The sync is easy to fix.  I'm going to try and play with the resistor values tonight to get good colors out of it.  Does anyone have a reference for how the colors ought to look?  All I have been able to find are a few web pages:

http://sites.google.com/site/h2obsession/CBM/C128/rgbi-s-video
http://home.comcast.net/~kkrausnick/c128-vga/

To really do it right (and make it work with other boards with different input impedances, not just the GBS-8220) would require buffer amps on the outputs as well.  Do you think there would be any interest in doing a small run of PC boards and selling a kit?  If I could get 10 or 20 people to express interest, I'd design a simple board and sell it at cost as a kit with the parts, probably about $20-30 each.

Offline tokra

  • VIC 20 user
  • ****
  • Posts: 122
  • Age: 40
  • Location: near Bremen
  • Activity:
    0%
  • Country: de
  • Reputation: 10
  • Gender: Male
  • With us since: 02/07/2010
    YearsYearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #31 on: July 13, 2011, 04:57 AM »
Thanks for checking with the 50Hz. You may also want to check these two VDC-demos I did earlier this year:

http://www.csdb.dk/release/?id=100511
http://www.csdb.dk/release/?id=100510

The first one is an interlace 640x480 screen mode which *should* be 60Hz. The other one is 480x252 at an unknown frequency. Would be nice to know if both work and how.

I'd be very interested in a PC board that can be connected to a converter. The Ambery AV-1 which I have can handle 50Hz and 60Hz both, so I'd prefer that. It also handles separate sync just fine. If there's a solution that fits multiple converters however all the better! If you go for broke you should also include the "brown fix" that corrects the dark yellow color to brown again as intended by the CGA-standard. We've talked about this earlier here:

http://www.commodore128.org/index.php?topic=3877.msg19331#msg19331

I'd prefer the solution linked in Wolfgang Moser's comp.sys.cbm posts but Hydrophilic's passive solutions look interesting as well. Those would be a lot easier to implement and if the results are good, you would save the need for an extra power supply.

And finally here's a picture of a Commodore 1902 in action:

http://robert.hurst-ri.us/images/commodore/C128D-1902-80col-colors.jpg

Offline Richard42

  • KIM-1 user
  • **
  • Posts: 48
  • Location: Los Angeles
  • Activity:
    0%
  • Country: us
  • Reputation: 6
  • Gender: Male
  • With us since: 07/07/2011
    YearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #32 on: July 13, 2011, 03:39 PM »
Darn it you made me bust out the XM1541 and hook up the 1571 drive to my old laptop.  Then I remembered that I nuked my old Ubuntu install and had to spend a couple of hours getting opencbm to build and run under the new ubuntu.  I forgot how much pain I went through a year ago to get that working.  now it's working; I've transferred one of your VDC-IHFLI disks (king tut).  it's too late to take it upstairs and test on the C128; I'll try it tomorrow.

Thanks for the info and links.  I'll get it working, and I suppose I'll do the brown fix as well.

Offline mhoney

  • Windows user
  • *
  • Posts: 4
  • Activity:
    0%
  • Reputation: 0
  • With us since: 22/07/2010
    YearsYearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #33 on: July 14, 2011, 02:50 AM »
I would definitely be interested in at least two of the boards mentioned.  I have been searching for an 80 column/LCD solution for a couple years.

Marc

Offline Richard42

  • KIM-1 user
  • **
  • Posts: 48
  • Location: Los Angeles
  • Activity:
    0%
  • Country: us
  • Reputation: 6
  • Gender: Male
  • With us since: 07/07/2011
    YearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #34 on: July 15, 2011, 06:22 AM »
Tokra,

I tried your VDC demos last night and neither of them worked correctly on my setup with the GBS-8220.

For the IHFLI demo, I tried the king-tut image.  It did go into a 60hz interlaced mode at 15.7khz horizontal, so 640x480 sounds correct.  I think the GBS-8220 was handling it correctly; it looked like a hi-res interlace mode.  But the image data was not correct; it looked like a mosaic of 8x8 pixel blocks.  It looked like it loaded in several passes, and in the middle I could see some shapes and outlines similar to the image on the CSDb webpage, but the final image still looked corrupted.

For the VDC-FLI demo, my scope said that the vertical frequency was 53 Hz.  That's weird; the horizontal was still 15.7khz.  The GBS8220 synced to the signal, and the image looked better than the IHFLI demo, but was still not correct.  It looked like a progressive mode (not interlaced), and seemed to me like it was a picture of a parrot.  But it was a bit corrupted.  From the appearance of the image, it looked like there were alternating groups of 4 or 8 lines that belonged together.  I think if I could take the odd groups, squeeze them horizontally by 2x and put them on the left half of the screen, then take the even groups and squeeze them by 2x horizontally and put them on the right half of the screen, maybe the image would have been correct.  I hit the space bar to go to the next image and the 1571 chugged along for a while and then the green light started blinking very fast on the drive.  Do you think I have a bad drive, or maybe got a bad data transfer?  I can't remember if the d64copy program will automatically verify the written disk data.

Offline tokra

  • VIC 20 user
  • ****
  • Posts: 122
  • Age: 40
  • Location: near Bremen
  • Activity:
    0%
  • Country: de
  • Reputation: 10
  • Gender: Male
  • With us since: 02/07/2010
    YearsYearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #35 on: July 15, 2011, 06:54 AM »
Can you maybe take photos with a digital camera of the monitor? This way I could better understand what's being displayed.

The IHFLI-mode loads a picture in 4 passes, there is a bitmap and color for each interlaced half. Does the picture have interlace-flicker on the GBS-8220?

I was never able to figure out what the frequency of FLI-mode itself was. Progressive is correct, it is NOT interlaced. 53 Hz sounds about right. How do you check this? Could I do this myself with a digital multimeter?

The .d64 image should work fine, haven't heard any other reports on it. I use a uIEC-device myself. I can highly recommend those! Much easier than converting to old floppy discs.

Once I finally get my CM-397 connected properly to my C128 I will do my own tests.

Offline Richard42

  • KIM-1 user
  • **
  • Posts: 48
  • Location: Los Angeles
  • Activity:
    0%
  • Country: us
  • Reputation: 6
  • Gender: Male
  • With us since: 07/07/2011
    YearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #36 on: July 15, 2011, 03:20 PM »
I have attached a number of images.  There are 3 screenshots from the oscilloscope, showing my generated CSYNC signal in the first channel and the blue analog signal in the 2nd.  One of these shows the sync timing for the normal NTSC Basic mode (60 hz), another one from your 60 Hz IHFLI mode (it's interlace, and I can see the flicker in the monitor; the GBS-8220 is handling it properly), and the last from the 53 Hz FLI mode.

For the interlace mode, the vsync pulse is much shorter, about half as long as in the other modes.  It looks like the HSYNC frequency is doubled but it's really not; the scope overlays multiple screens of data on top of each other.  The start time of the VSYNC pulse changes depending upon the interlace field being displayed (top field / bottom field, either aligned with HSYNC or half a cycle off).  Another odd thing I noticed is that it's outputting pixel data during the VSYNC pulse in IHFLI mode.

If your DVM measures frequency, you should be able to connect it to the HSYNC and VSYNC lines and check it yourself.  I also have a CM-397 (AV-1), and I can test with this in a few days when a get a new cable to cut up.

I have also included pictures of the monitor.

Offline tokra

  • VIC 20 user
  • ****
  • Posts: 122
  • Age: 40
  • Location: near Bremen
  • Activity:
    0%
  • Country: de
  • Reputation: 10
  • Gender: Male
  • With us since: 02/07/2010
    YearsYearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #37 on: July 16, 2011, 07:49 PM »
I have attached a number of images.  There are 3 screenshots from the oscilloscope, showing my generated CSYNC signal in the first channel and the blue analog signal in the 2nd.  One of these shows the sync timing for the normal NTSC Basic mode (60 hz), another one from your 60 Hz IHFLI mode (it's interlace, and I can see the flicker in the monitor; the GBS-8220 is handling it properly), and the last from the 53 Hz FLI mode.
Thanks, very interesting. So, the IHFLI-mode is 58 Hz? That's strange, since by earlier calculations it should be 60 Hz. Can you do some tests with the viewer program? In line 30 it says:

Code: [Select]
30 COLOR6,1:DATA4,131,5,3,6,131,7,127, ...Try changing the 131 after 4 and 6 to 132, 133, 134 and maybe 129, 128, 127 - this should affect the Hz-rate as it sets the number of total lines and total lines displayed. I'd be interested to see how this affects the Hz-rate.

Quote
For the interlace mode, the vsync pulse is much shorter, about half as long as in the other modes.  It looks like the HSYNC frequency is doubled but it's really not; the scope overlays multiple screens of data on top of each other.  The start time of the VSYNC pulse changes depending upon the interlace field being displayed (top field / bottom field, either aligned with HSYNC or half a cycle off).  Another odd thing I noticed is that it's outputting pixel data during the VSYNC pulse in IHFLI mode.
The reason for the pixel data is that register 6 (vertical lines displayed) is set to the same number as register 4 (vertical total lines). This seems to be a pre-requisite for Interlace-modes to work. Non-interlace modes do not use this and register 4 is always about 22 raster lines larger then register 4 to allow for the VSync to happen (the position of which is handled by register 7)
Quote
If your DVM measures frequency, you should be able to connect it to the HSYNC and VSYNC lines and check it yourself.
Sadly not...
Quote
I also have a CM-397 (AV-1), and I can test with this in a few days when a get a new cable to cut up.
I've set up my own CM-397 yesterday. I only have the 9-pin to 15-pin cable that makes it able to connect the C128 to it. No voltage reduction and only 8 colors. See the pictures attached. The FLI-mode works just fine, while the Interlace-mode just has the picture shifted a little to the bottom. The latter may be overcome by playing with registers 7 and maybe 24. I'd need to test that. Interestingly, the Interlace-mode shows NO flicker, so the picture processor in the CM-397 seems to merge the half-pictures.

I still have no idea why the GBS-8220 produces the strange results you are seeing. Could this possibly be due to the combined sync?

Offline Hydrophilic

  • 128D user
  • *******
  • Posts: 1214
  • Age: 41
  • Location: Earth... still!
  • Activity:
    0%
  • Reputation: 232
  • Gender: Male
  • With us since: 25/01/2007
    YearsYearsYearsYearsYearsYears
    • View Profile
    • H2Obsesson
Re: C128 80-column display on modern devices
« Reply #38 on: July 17, 2011, 10:12 PM »
Life has been keeping out of Commodore stuff recently, so I've missed a lot.  Let me try to catch up a bit.
 
As I recall, the C128 PRG states you need to double the sync "size" in interlaced mode.  Tokra could say for sure, but if the vertical sync width was not doubled in software, then that would explain why the interlaced v-sync is only half-width measured on a scope.
 
The two fields of video *should* have the v-sync offset by half a raster... this is how the TV/monitor (or in this case, possibly the video converter board) can distinguish the "top field" from the "bottom field" in an interlaced frame.  If you've ever seen a screen with the fields reversed, then you know how important this distinction is!
 
Strange that your DVM cannot measure the h or v sync frequency of the C128...  I will have to test this myself and report back...
 
Thanks for the info about the sync polarity of the C128 (positive)!  Disappointing, because it seems the standard for YCbCr is negative polarity... at least that's what the specs say for my television.  I guess it could work for some monitors that are sync ambivalant... but for most monitors the YCbCr hack I posted earlier would not work.  The good news is that sync signal is carried on the Y line as I guessed (at least according to the specs for my TV).  Before I could test that YCbCr circuit, my TV decided to die on me after a recent thunderstorm :(  It seems the only thing wrong is shorted 'kickback' diode across the main relay and maybe the transistor that drives the relay.  I've ordered replacment parts and hope that will fix it.  Would be a shame to have to scrap it, considering the excellent quality of the picture tube...
 
Slightly off-topic, I've heard that you can combine the chroma and luma signals from s-video into a composite signal using only a capactior.  However, it seems this would produce distorted color (I haven't tried it myself).  You might could compensate by adjusting the 'color intensity' control of your monitor / TV.  This is because, assuming the seperate luma and chroma signals have the same voltage, the combined output would be 'wrong' as the composite standard seems to call for the chroma to be at a lower voltage... you can read about and find a circuit here.
I'm kupo for kupo nuts!

Offline tokra

  • VIC 20 user
  • ****
  • Posts: 122
  • Age: 40
  • Location: near Bremen
  • Activity:
    0%
  • Country: de
  • Reputation: 10
  • Gender: Male
  • With us since: 02/07/2010
    YearsYearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #39 on: July 18, 2011, 12:26 AM »
Life has been keeping out of Commodore stuff recently, so I've missed a lot.  Let me try to catch up a bit.
Always nice to have your input. With concerted effort we may yet reveal the secrets the VDC has held for much too long ;D
Quote
As I recall, the C128 PRG states you need to double the sync "size" in interlaced mode.  Tokra could say for sure, but if the vertical sync width was not doubled in software, then that would explain why the interlaced v-sync is only half-width measured on a scope.
I've just read that in the C128 PRG. Apparantly you need to double the value in the higher bits of register 3. I've never done that or seen it in other interlaced modes. But it would explain what Richard42 is seeing. He could just amend the code like this:
Code: [Select]
30 COLOR6,1:DATA3,137,4,131,5,3,6,131,7,127, ...This should double the VSync size again. I'd be interested to see how/if that affects the Hz-rate as well.
Quote
Strange that your DVM cannot measure the h or v sync frequency of the C128...  I will have to test this myself and report back...
I'm no electronics engineer. I use the DVM mainly to check if a cable-connection is working. I've attached a picture of my DVM to this post. Can you let me know how I should set it and where to put the red and black testing-ends?
Quote
Thanks for the info about the sync polarity of the C128 (positive)!
As you mentioned earlier the newer VDC (8568) can change the sync polarity by software with register 37! Also it may be easier to extract the composite sync from the composite video on Pin 7 of the RGBI-connector on the C128. I'm wondering what polarity that one might have...

Offline Hydrophilic

  • 128D user
  • *******
  • Posts: 1214
  • Age: 41
  • Location: Earth... still!
  • Activity:
    0%
  • Reputation: 232
  • Gender: Male
  • With us since: 25/01/2007
    YearsYearsYearsYearsYearsYears
    • View Profile
    • H2Obsesson
Re: C128 80-column display on modern devices
« Reply #40 on: July 18, 2011, 06:33 PM »
It seems your DVM does not have a frequency function.  Most of them don't, so don't feel bad.  But if it did, I would guess you would attach black to ground and red to H.Sync / V.Sync (depending on which you want to check, probably V.Sync).
 
Looking at the schematic of the C128 and based on the report that VDC (normally) generates positive sync, then I would say that the composite signal generates a negative sync because their seems to be 3 inversions (an inverter followed by 2 transistors).  This makes sense to me because composite video is transmitted with a negative sync (at least for NTSC, probably PAL too).  Anyway, I've attached a relevant clip from the C128 schematic with my notes in blue.
I'm kupo for kupo nuts!

Offline Richard42

  • KIM-1 user
  • **
  • Posts: 48
  • Location: Los Angeles
  • Activity:
    0%
  • Country: us
  • Reputation: 6
  • Gender: Male
  • With us since: 07/07/2011
    YearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #41 on: July 19, 2011, 02:03 AM »
Thanks, very interesting. So, the IHFLI-mode is 58 Hz? That's strange, since by earlier calculations it should be 60 Hz. Can you do some tests with the viewer program? In line 30 it says:

I think the 58hz value is a fluke.  The displayed vsync value changes a bit over time; maybe I didn't have the trigger set up exactly right and it missed some pulses.

Does your VDC demo code require a 64k-upgraded VDC ram by any chance?  I only have the stock 16k VDC memory.

I rebuilt my converter circuit and have 16-colors working pretty well now.  I have a brown-fix, and it's tweaked so that the color looks pretty good.  I'll attach some pictures tonight.  The only problem is that I'm using a mosfet to pull down the green line, and the mosfet takes too many nanoseconds to pull down the line, so there's a bright yellow edge to the left of every group of brown pixels.  I haven't decided yet how to fix that.  I have some sample video op-amps coming this week from Analog Devices; I'm going to make further modifications to the circuit which will hopefully reduce the ringing and give a nice sharp picture.

I would recommend putting resistors in the sync lines of your cable that you are using with the AV-1.  I bought one of these a year ago and it died while I was using it with my amiga 1200.  I kind of suspect it may have died because of the excess voltage on the CSYNC line.  I think the arcade CGA converters really expect to see a 2v signal here.

Offline Richard42

  • KIM-1 user
  • **
  • Posts: 48
  • Location: Los Angeles
  • Activity:
    0%
  • Country: us
  • Reputation: 6
  • Gender: Male
  • With us since: 07/07/2011
    YearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #42 on: July 19, 2011, 02:14 AM »
Slightly off-topic, I've heard that you can combine the chroma and luma signals from s-video into a composite signal using only a capactior.  However, it seems this would produce distorted color (I haven't tried it myself).  You might could compensate by adjusting the 'color intensity' control of your monitor / TV.  This is because, assuming the seperate luma and chroma signals have the same voltage, the combined output would be 'wrong' as the composite standard seems to call for the chroma to be at a lower voltage... you can read about and find a circuit here.

This is correct.  I even have several cables with SVideo on one end and composite-RCA on the other.  It works with no problems.  The absolute chroma voltage level is actually not important, because the receiver will take the voltage reference from the color burst.  In the last month I did a lot of digging and research regarding NTSC composite and svideo signals due to some hardware hacking that I was doing on my sega 32x.

Offline tokra

  • VIC 20 user
  • ****
  • Posts: 122
  • Age: 40
  • Location: near Bremen
  • Activity:
    0%
  • Country: de
  • Reputation: 10
  • Gender: Male
  • With us since: 02/07/2010
    YearsYearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #43 on: July 19, 2011, 06:34 AM »
Quote
I think the 58hz value is a fluke.  The displayed vsync value changes a bit over time; maybe I didn't have the trigger set up exactly right and it missed some pulses.
Hmm, ok. Can you still try it with the changes to the program I suggested earlier? I'd be very interested if and by how much the frequency changes when you put the other values in registers 4 and 6 (from 127 to 134). Also if you can please add the value 137 for register 3, this should fix the length of the vsync-pulse to full length. Hope you can confirm that. I'd like to have the mode a compatible as possible and you are one of the few persons to have the right equipment. Your help is much appreciated :-)

I've highlighted the changes here:

30 COLOR6,1:DATA3,137,4,131,5,3,6,131,7,127, ...

Quote
Does your VDC demo code require a 64k-upgraded VDC ram by any chance?  I only have the stock 16k VDC memory.
The demo uses 64K memory. This probably explains the screwed up picture. However for measuring the frequency and Vsync-settings this doesn't really matter. 64K upgrades can be still bought on Ebay. Those are really easy to do as well (no soldering required!). I got two from there myself.

Quote
I rebuilt my converter circuit and have 16-colors working pretty well now.  I have a brown-fix, and it's tweaked so that the color looks pretty good.
Nice! Are you using a passive solution as suggested by Hydrophilic or the one that requires power as thought up by Wolfgang Moser (or even an own solution?)

Quote
I would recommend putting resistors in the sync lines of your cable that you are using with the AV-1.  I bought one of these a year ago and it died while I was using it with my amiga 1200.  I kind of suspect it may have died because of the excess voltage on the CSYNC line.  I think the arcade CGA converters really expect to see a 2v signal here.
Thanks for the advice, will do that ASAP.  Is it really 2V and not 0.7V?

Offline Hydrophilic

  • 128D user
  • *******
  • Posts: 1214
  • Age: 41
  • Location: Earth... still!
  • Activity:
    0%
  • Reputation: 232
  • Gender: Male
  • With us since: 25/01/2007
    YearsYearsYearsYearsYearsYears
    • View Profile
    • H2Obsesson
Re: C128 80-column display on modern devices
« Reply #44 on: July 19, 2011, 02:39 PM »
...I even have several cables with SVideo on one end and composite-RCA on the other.  It works with no problems... because the receiver will take the voltage reference from the color burst.
That's what I was thinking!  I guess the guy who built that circuit I linked was just over-engineering, or maybe he has a really fussy monitor...
 
Until you get 64k VRAM installed, you can view some images in Tokra's 8x1 video mode (non-interlaced) that runs on 16k VRAM with this viewer.  The image size is reduced from 480x252 down to 480x136 to fit in the smaller VRAM.   The user interface runs in 40-column mode and asks for a filename.  Because there are two files for each image, be sure to enter the filename without an extension.  It is designed and tested for NTSC, so it may not work on PAL.  So far there is no 16k version of Tokra's 8x2 interlace mode...
 
Could you provide a schematic of the circuit you're using, Richard42 ?  And more important, if you could find the time to test v-sync width using the changes Tokra suggested, that would be great.
I'm kupo for kupo nuts!

Offline Richard42

  • KIM-1 user
  • **
  • Posts: 48
  • Location: Los Angeles
  • Activity:
    0%
  • Country: us
  • Reputation: 6
  • Gender: Male
  • With us since: 07/07/2011
    YearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #45 on: July 20, 2011, 03:59 AM »
Could you provide a schematic of the circuit you're using, Richard42 ?  And more important, if you could find the time to test v-sync width using the changes Tokra suggested, that would be great.

I ran the tests last night and gathered data for you and Tokra.  My notes are at home, so I won't be able to send the actual numbers until later today.

But the change that you suggested (adding 3,137 to the DATA statement) did increase the width of the VSYNC pulse.  I didn't measure it exactly to make sure that it was identical to the pulse width of the regular 80-column mode, but it looks very close.

Regarding the schematic, are you primarily interested in the sync portion, or do you want the whole thing?  I ask because I haven't drawn up anything yet; the circuit is just on a breadboard.  I know that I'm going to change it at least once more before I'm happy with everything.  I wasn't planning to draw it up until I'm done with it.  At that point I'll draw it up in Eagle and do the board layout so that I can have the PCB manufactured.  Once it's in Eagle it will be trivial to print out or take a screenshot.

To make a long story short, if you just want the sync, I can sketch that out quickly and scan it. But if you want the whole thing, I would ask you to wait a while because it's not finalized.

Offline Richard42

  • KIM-1 user
  • **
  • Posts: 48
  • Location: Los Angeles
  • Activity:
    0%
  • Country: us
  • Reputation: 6
  • Gender: Male
  • With us since: 07/07/2011
    YearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #46 on: July 20, 2011, 01:04 PM »
Hmm, ok. Can you still try it with the changes to the program I suggested earlier? I'd be very interested if and by how much the frequency changes when you put the other values in registers 4 and 6 (from 127 to 134). Also if you can please add the value 137 for register 3, this should fix the length of the vsync-pulse to full length. Hope you can confirm that. I'd like to have the mode a compatible as possible and you are one of the few persons to have the right equipment. Your help is much appreciated :-)

I had to zoom out the display and use cursors to get stable results, but here is what I found on my NTSC C128:

Code: [Select]
Num   Vertical frequency
127   61.5 Hz
128   61.1 Hz
129   60.6 Hz
130   60.0 Hz
131   59.7 Hz
132   59.1 Hz
133   58.8 Hz
134   58.3 Hz

At the 2 higher frequencies (61.1 and 61.5), the GBS-8220 seemed to not sync right.  It did not give the "No Signal" screen, but the screen was frozen with some random looking data.  When I looked at the VSYNC signal on the scope, I could see that it had a different pattern.  In all the other modes, the VSYNC pulse on-time is either 254us or 259us long.  The HSYNC pulse on-time is always 5us and off-time is 58us.

So for normal modes, the VSYNC on-time width only varies by the HYSNC pulse width (5us), depending upon whether it's an even field or odd field.  But at the higher VSYNC frequencies (register value 127 and 128), the VSYNC pulse width switched between 223us and 291us depending upon the field.  That's probably why the GBS-8220 didn't like it.

The demo uses 64K memory. This probably explains the screwed up picture. However for measuring the frequency and Vsync-settings this doesn't really matter. 64K upgrades can be still bought on Ebay. Those are really easy to do as well (no soldering required!). I got two from there myself.

Is it also possible to desolder a couple of 4164 chips and replace them with 4464s?  I remember finding those for about $4 each; if that's doable I'd rather save the $$ and solder the 64k in.

Nice! Are you using a passive solution as suggested by Hydrophilic or the one that requires power as thought up by Wolfgang Moser (or even an own solution?)

It's active.  Not as convenient, but it puts the least stress on all the other components and should be compatible with more VGA converters than a passive circuit.  Plus I want to do the brown fix and I have an idea that might make the VGA colors closer to the 1902 monitor than what is possible with a passive circuit.

Thanks for the advice, will do that ASAP.  Is it really 2V and not 0.7V?

I think it was common for the arcade CGA boards to use 2v peak-peak composite sync.  I may have read about 1v csync signals, but never 0.7v.

Offline tokra

  • VIC 20 user
  • ****
  • Posts: 122
  • Age: 40
  • Location: near Bremen
  • Activity:
    0%
  • Country: de
  • Reputation: 10
  • Gender: Male
  • With us since: 02/07/2010
    YearsYearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #47 on: July 20, 2011, 05:04 PM »
Code: [Select]
Num   Vertical frequency
127   61.5 Hz
128   61.1 Hz
129   60.6 Hz
130   60.0 Hz
131   59.7 Hz
132   59.1 Hz
133   58.8 Hz
134   58.3 Hz

At the 2 higher frequencies (61.1 and 61.5), the GBS-8220 seemed to not sync right.  It did not give the "No Signal" screen, but the screen was frozen with some random looking data.  When I looked at the VSYNC signal on the scope, I could see that it had a different pattern.  In all the other modes, the VSYNC pulse on-time is either 254us or 259us long.  The HSYNC pulse on-time is always 5us and off-time is 58us.
Thank you very much for checking. One final question: Where these measurements with or without the change to register 3 (adding 3,137 to line 30)? Can you check if using or not using this change actually affects the frequency or not?
Quote
But at the higher VSYNC frequencies (register value 127 and 128), the VSYNC pulse width switched between 223us and 291us depending upon the field.
Hmm, that's really strange. I've tried the same setting on my 1901 and CM-397 converter, but they remained showing a stable picture. What you are seeing MAY have something to do with the register 7-setting (vertical sync-position) and/or the fact the sync will overlap with picture-data.
Quote
Is it also possible to desolder a couple of 4164 chips and replace them with 4464s?  I remember finding those for about $4 each; if that's doable I'd rather save the $$ and solder the 64k in.
According to my german "128er Sonderheft 44" you can desolder the 4164 and replace them by either 41464 or 50464 with 150ns or 120ns. In fact that's how my C128D was upgraded back in the day.
Quote
I think it was common for the arcade CGA boards to use 2v peak-peak composite sync.  I may have read about 1v csync signals, but never 0.7v.
Ok thanks, will keep that in mind for when/if I get my own "simple" converter ready.

Offline Richard42

  • KIM-1 user
  • **
  • Posts: 48
  • Location: Los Angeles
  • Activity:
    0%
  • Country: us
  • Reputation: 6
  • Gender: Male
  • With us since: 07/07/2011
    YearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #48 on: July 21, 2011, 02:06 PM »
Thank you very much for checking. One final question: Where these measurements with or without the change to register 3 (adding 3,137 to line 30)? Can you check if using or not using this change actually affects the frequency or not?

I ran it tonight without the 3,137 data, and the vertical frequencies were about the same (within margin of error; it was harder to see the vsync pulses because they were shorter).

Offline Richard42

  • KIM-1 user
  • **
  • Posts: 48
  • Location: Los Angeles
  • Activity:
    0%
  • Country: us
  • Reputation: 6
  • Gender: Male
  • With us since: 07/07/2011
    YearsYears
    • View Profile
Re: C128 80-column display on modern devices
« Reply #49 on: July 21, 2011, 02:19 PM »
I changed my mind and drew up schematics, because it was getting too complicated to do in my head.  All of the inputs (R,G,B,I,H,V) are buffered with a 74LS244 at the input.  The current circuit I have built up is the one labeled as "C128 Sync v2". My output section is all passive right now, similar to the second schematic image but without the op-amps or the I0 lines, and the resistors are all variable.  Next I'm going to build the Sync v3 circuit and add the AD8044 output op-amps.  I was supposed to get some samples at work today but they didn't arrive.  Any other EEs out there with tips for this circuit, please speak up.

 



Back to top