Author Topic: GX4000 video-processing questions  (Read 8535 times)

0 Members and 1 Guest are viewing this topic.

Offline ArcadeTV

  • CPC664
  • ***
  • Posts: 50
  • Country: de
  • RGB or Nothing!
    • index.php?action=treasury
    • Me on circuit-board.de
    • Awards
GX4000 video-processing questions
« on: 03:27, 28 October 14 »
I just got a brand new boxed GX4000 today which I think is a pretty solid system and I asked myself why I never got one before...

The only thing that bothers me a little is that it only runs in 50Hz, but I guess since it was only released in Europe and I haven't seen any jumpers or pins to change that, I'll have to live with it.
I'd like to get a bit deeper into the rgb-video-conversion-schematic in the system. I have the service manual and the DAC-part is what I'm after.
See, I dunno if y'all know the difference between a 1st-Revision Super NES and the 2nd Revision/1CHIP-Mainboard...
The first rev had pretty blurry video while the newer revs all had a very crisp picture. That's because Nintendo built the PPU to make pixels bleed to one side by manipulating the attenuation of the raising edge of the signal.



Back in the days this was not a bug, it was a feature - details that would normally look like pixel-soup looked like a gradient or like the system could output more colors than it could actually handle.
Why do I tell you this? Because I've seen the very same effect on the GX4000, but it was more obvious.
Have look at this, do you see the pixels are sharp on the left and bleeding to the right?



I think since the video-circuit of the GX is much more 'open' than the snes I would like to know if this effect can be manipulated or eliminated...


So, if I may ask, I'd love to get info on this 3 topics:
-Can the GX4000 run in 60Hz?
-If I wanted to bypass the rgb-signal and run them through my own ths7314-based-encoder, where should i tap the signals from?
-does anybody know the peak-to-peak levels of the rgb signals? I would measure them with my scope bit I'd need a pure white screen for that and I only have burning rubber at hand. Alternatively: Do you know a game that can be paused when a pure white screen is visible?

Thanks!
like
0
No reactions

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 12.500
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
    • Awards
Re: GX4000 video-processing questions
« Reply #1 on: 11:41, 28 October 14 »
Hi ArcadeTV,
     First off, no, I don't think the GX4000 has any way of being switched to 60Hz. Secondly, the GX4000 has two sets of RGB signals: The monitor port, which is driven directly from the DAC and also the SCART socket, which is being driven by a CXA1145. Which ones are you refering to? Generally the system works like this: The ASIC produces 4 bit data for each of the RGB. Taping from here gives you the absolute purest values because they haven't been manipulated yet, but your circuit will need to have 3x 4bit DACs to convert these to analogue values. The next point for taping (purest Analogue signal) can be taken from the outputs of the GX DAC (Pins 17, 16,15) which go directly to the monitor port. These signals are protected with 4.7V Zener diodes so they wont fry the monitor if the DAC fails. These three signals also get fed to the CXA1145 to drive the SCART socket. The CXA1145 should be outputing about 0.7V P-P on these RGB pins.

Incidently, the CXA1145 also produces a very clean S-Video signal directly from the IC without any extra parts (except an S-Video socket).

Bryce.
like
0
No reactions

Offline ArcadeTV

  • CPC664
  • ***
  • Posts: 50
  • Country: de
  • RGB or Nothing!
    • index.php?action=treasury
    • Me on circuit-board.de
    • Awards
Re: GX4000 video-processing questions
« Reply #2 on: 13:17, 28 October 14 »
Thanks for this comprehensive info!
Since I got the system yesterday I used a scart-plug (should have mentioned that), I also suspected the output from the Din-socket to be different since it's before the CXA in the schematic but I didn't make a cable yet.
I know from other systems such as the sega consoles that the input on the cxa for rgb is around 1Vpp. I suspect the output from the cxa to be 1.4Vpp because the signals will be attenueated to 0.7Vpp inside any TV/Monitor that is terminated with 75Ohms but I have no measurements yet. If this is true the rgb-cable from the monitor-port will need 75Ohms in series on the rgb lines.
Building 3x 4bit DACs to convert the signals from the ASIC to analogue values sounds very tempting but I have no clue how to do that so I guess I will experiment with the GX DAC. Could you provide a schematic for a custom 4bit-DAC? That would be absolutely great :)
Is there a way to force the system to output a pure white (or 100% red or 100%  green or 100% blue) screen somehow? I see there are some homebrews so maybe one of the software-gurus here would be able to create something like that which can be burned to an eeprom and run on the system...

btw, I have successfully bypassed the encoders of other systems (mega drive, master system, neo geo aes) to get the best-looking video from these consoles. The results are nothing but awesome, all I had to figure out was a suitable voltage devider for the input on the ths7314. As an example: inside any console I did the rgb-bypass I measured the Vpp-level of the rgb coming from the vdp while displaying a pure white screen. Let's pretent the reading was 4.5Vpp with a load of 9.8KOhm (which is the voltage devider [5K6 in series plus 4K2 to GND] between the vdp and the cxa-encoder). I have written my own calculator for this: http://arcade-tv.de/neo/
Input our readings as follows: Vpp is 4.5 and load is 9800. Click on calculate and my tool will give you the correct voltage devider for the THS7314 to get a level of 0.7Vpp on the input.
See my twitter page for pcb-layouts and example screen-photos after the bypass.

Anyways, Thanks for everything so far! This is very much appreciated!
I'll report back as soon as I've had time to mess around with it.
like
0
No reactions

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 12.500
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
    • Awards
Re: GX4000 video-processing questions
« Reply #3 on: 14:55, 28 October 14 »
According to the CXA1145 Datasheet, the RGB outputs are actually 0.71V P-P, but can vary between 0.64 and 0.78 (I've attached the datasheet). RGB input on the CXA saturates at 1V P-P so supplying more is pointless (you just waste the upper/lower definition).

To emulate white output in hardware you can remove capacitors C113, C114 and C115 (isolates the CXA from the GX RGB) and supply 1V P-P signals directly to the RGB inputs. With 3 simple pots as voltage dividers you can go through all combinations of colours.

Regarding self-made DACs. I would assume that the GX DAC is non-linear and different for each channel, so without knowing its curves you would need to do a lot of experimenting to get it right. Easier to just use the GX one.

Bryce.
« Last Edit: 15:00, 28 October 14 by Bryce »
like
0
No reactions

Offline ArcadeTV

  • CPC664
  • ***
  • Posts: 50
  • Country: de
  • RGB or Nothing!
    • index.php?action=treasury
    • Me on circuit-board.de
    • Awards
Re: GX4000 video-processing questions
« Reply #4 on: 15:09, 28 October 14 »
Thanks! Already had the datasheet ;-)
Emulating solid color-screens like this is a very nice idea, but i'm afraid that's not what i'm after... i wanna see if i can bypass the cxa for good and get the signals right after the d/a-conversion. Let's hope that the blur-effect is not appied within the 40464 then I'd have to get the digital rgb from the asic and go through conversion-hell ;-)
Thanks Bryce, good stuff!
like
0
No reactions

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 12.500
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
    • Awards
Re: GX4000 video-processing questions
« Reply #5 on: 15:20, 28 October 14 »
You can take the RGB signals directly from the monitor port. That's what I did for my S-Video adapter: RGB SVideo - CPCWiki and it works perfectly. They are about 1.1V P-P, but for most purposes this is fine.

Bryce.
like
0
No reactions

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
    • Awards
Re: GX4000 video-processing questions
« Reply #6 on: 20:39, 28 October 14 »
The GX4000 can run in 50 or 60 Hz or other frequencies, it depends on the software. In detail, the way you program the CRTC.


However, 50 Hz games will only run at 50 Hz (without exchanging the crystal oscillator).

like
0
No reactions
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline ArcadeTV

  • CPC664
  • ***
  • Posts: 50
  • Country: de
  • RGB or Nothing!
    • index.php?action=treasury
    • Me on circuit-board.de
    • Awards
Re: GX4000 video-processing questions
« Reply #7 on: 21:03, 28 October 14 »
You have my full attention  :)

I've only seen 1 Xtal on the board, something with 39....MHz, this one?
Would it make sense to patch a game to 60Hz??
like
0
No reactions

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
    • Awards
Re: GX4000 video-processing questions
« Reply #8 on: 22:06, 28 October 14 »
Well, maybe not a patch, but an additional switch for choosing one out of two crystals. Well, in this case I guess it would work with the 6128 Plus. I'm not so familiar with the GX4000 video output. Guess you would need to use a monitor then instead of a TV.


Anybody got any experiences here?


(Also check out the 6 MHz thread for CPC 6128).

like
0
No reactions
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline ArcadeTV

  • CPC664
  • ***
  • Posts: 50
  • Country: de
  • RGB or Nothing!
    • index.php?action=treasury
    • Me on circuit-board.de
    • Awards
Re: GX4000 video-processing questions
« Reply #9 on: 00:03, 29 October 14 »
I took the time to make a cable from the DIN to scart on my TV. Guess what  :o The Blur-Effect is gone but the levels are veeery low. Too low for a TV so the picture is far too dark. I had to turn up the brighness and contrast controls to the max to take these shots:




I have to wait for my additional cart to arrive and use an eeprom with the test-programm to measure the Vpp of the RGB-lines with my scope..
Once I know the levels I can try my THS7314-based amp on the signals.
like
0
No reactions

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
    • Awards
Re: GX4000 video-processing questions
« Reply #10 on: 18:25, 29 October 14 »
Looks very clear though!  :)
like
0
No reactions
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline ArcadeTV

  • CPC664
  • ***
  • Posts: 50
  • Country: de
  • RGB or Nothing!
    • index.php?action=treasury
    • Me on circuit-board.de
    • Awards
Re: GX4000 video-processing questions
« Reply #11 on: 20:51, 29 October 14 »
so... I made some progress today...

I kicked out the RF-module and grabbed the RGB lines from the 40464's output-pins. I utilised a 9-pin mini-Din-Connector that I had salvaged from an old Mega Drive 2 board I had lying around.
Still I don't have a donor-cart to run the diagnostic tool and measure the Vpp-levels accurately, but from what I had I just guessed the levels must have been something around the right 0.7Vpp - Guess I was right ;-)
To being able to compare the different outputs I left everything else intact and just added my connector.



The picture is pretty good overall, maybe only a very small voltage devider on the THS7314 and I'm satisfied with the picture-output... BUT (!) ...
...the blur effect is also very visible in this setup  :'(














This means the pixel-bleeding was not visible in my previous setup without the amp but it was there all the time!

Here's what I did until now if someone is interested:




I will have to build my own 4-Bit-DAC now.
Never did this before and if anybody is willing to explain what the 40464 is doing and how to get there on foot that would be pretty amazing you guys  ::)

If the custom DAC fails to remove the blur-effect then this proofs that it's generated within the ASIC, which would be "Kacke" but that's how it is then.
like
0
No reactions

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
    • Awards
Re: GX4000 video-processing questions
« Reply #12 on: 21:10, 29 October 14 »
Sorry for the question... Do you think there is a big difference between the old RF picture and the new mod?
(It's hard to tell from the images, but you know in person).

like
0
No reactions
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline ArcadeTV

  • CPC664
  • ***
  • Posts: 50
  • Country: de
  • RGB or Nothing!
    • index.php?action=treasury
    • Me on circuit-board.de
    • Awards
Re: GX4000 video-processing questions
« Reply #13 on: 21:15, 29 October 14 »
I'm truly surprised that you ask  :o
but HELL, YES, it's the very same difference as if you were using only the RF-OUT before and now switch to real RGB via Scart.
It's like someone turned on the lights  8)
If you have a GX4000 then please just plug a Scart-Cable (male on both ends) into it and use it on an RGB-capable CRT-Screen please!
like
0
No reactions

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 12.500
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
    • Awards
Re: GX4000 video-processing questions
« Reply #14 on: 22:37, 29 October 14 »
The ASIC can't create the fade, it's a 4 bit value. The blur will be caused by the DAC or the output termination. The RGB signal peaks aren't dropping back to 0 fast enough. Try adding a 75R resistor to GND from each of them and see if that helps.

Bryce.
like
0
No reactions

Offline MacDeath

  • Chaotic post writer and mock-up specialist
  • Supporter
  • 6128 Plus
  • *
  • Posts: 4.076
  • Country: fr
    • Awards
Re: GX4000 video-processing questions
« Reply #15 on: 22:46, 29 October 14 »
The scanlines are really marked on your pictures.
I never saw that much scanline on a CPC/PLUS using its native monitor.


isn't the GX4000 supposed to run 49.9 hz instead of 50hz ? (or something like that)

Also to run video at 60hz... wouldn't it simply slows the CPU actually as Video circuit would read more often into the (V)RAM ?


Also there was this discussion with talks about the video frequency of CPC (so also for PLUS/GX4000 I guess)
Yagol4CPC alpha release


Quote
To complement, you may like to know that in the CPC firmware there is provision to increase this frequency to 60 Hz, which suits the NTCS standard. There is one bridge in the board for this setting, the firmware detects its state when it boots and re-programs the CRTC to match the selected frequency (either 50(.08)Hz or 60(.someting)Hz).
In real practice I believe this wasn't used as long as the computer came with its own monitor, but I'm not sure, maybe in the USA market they came configured for 60Hz.
Not quite sure about the ASIC on PLUS/GX4000 though.
« Last Edit: 22:49, 29 October 14 by MacDeath »
like
0
No reactions

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
    • Awards
Re: GX4000 video-processing questions
« Reply #16 on: 23:50, 29 October 14 »
Also to run video at 60hz... wouldn't it simply slows the CPU actually as Video circuit would read more often into the (V)RAM ?


It would read the same amount of data (still 16 KB V-RAM).


Savings occur in case of the border, this speeds up fps.

like
0
No reactions
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline ArcadeTV

  • CPC664
  • ***
  • Posts: 50
  • Country: de
  • RGB or Nothing!
    • index.php?action=treasury
    • Me on circuit-board.de
    • Awards
Re: GX4000 video-processing questions
« Reply #17 on: 12:36, 30 October 14 »
@Bryce
75Ohms-to-GND on the RGB-lines makes no difference, I just tried that.

@MacDeath
The scanlines only seem to be that strong, it's a 14" Studio-Monitor (Sony PVM 14L4) and I had to come real close with the camera.


So, next on my list is rebuilding the DAC (40464).
Any suggestion on how I should get started?

Thanks guys! Having fun with y'all! :-)
like
0
No reactions

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 12.500
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
    • Awards
Re: GX4000 video-processing questions
« Reply #18 on: 13:47, 30 October 14 »
To experiment the most, I would make an R2R ladder for each colour. You could then vary the resistor values to experiment with the linearity.

Otherwise I'd go for 3 DAC0808 or similar from NS, although this will be a bit more complicated. They are 8 bit  DACs, so you would use just the lower 4 bits (upper bits grounded), but you will need extra circuitry to set the range, compensation and a voltage reference. It will also add a few nanoseconds latency into the video circuit (although I suspect the Amstrad part does this too).

Bryce.
like
0
No reactions

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 4.059
  • Country: fr
    • ?area=showdonations;u=4
    • Awards
Re: GX4000 video-processing questions
« Reply #19 on: 14:24, 30 October 14 »
They are 8 bit  DACs, so you would use just the lower 4 bits (upper bits grounded)
The level should be not enough doing that, no? May be better to double each lines for using the full range...
bit0 -> 0,1
bit1 -> 2,3
bit2 -> 4,5
bit3 -> 6,7
like
0
No reactions
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 12.500
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
    • Awards
Re: GX4000 video-processing questions
« Reply #20 on: 14:32, 30 October 14 »
You can't do that! That would give a really strange non-linearity. The level is decided by the Vref and range settings. so you decide what value 0000 or 1111 gives at the output pin.

Bryce.
like
0
No reactions

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 4.059
  • Country: fr
    • ?area=showdonations;u=4
    • Awards
Re: GX4000 video-processing questions
« Reply #21 on: 16:00, 30 October 14 »
As I know, that will just transform a 8bit DAC to a 4bit DAC???

00000000
00000011
00001100
00001111
00110000
00110011
00111100
00111111
11000000
11000011
11001100
11001111
11110000
11110011
11111100
11111111

Vref is used to define the full range, the DAC don't know that you only want to use the 4LSB ?  ???
« Last Edit: 16:01, 30 October 14 by TotO »
like
0
No reactions
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 12.500
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
    • Awards
Re: GX4000 video-processing questions
« Reply #22 on: 17:50, 30 October 14 »
As I know, that will just transform a 8bit DAC to a 4bit DAC???

00000000
00000011
00001100
00001111
00110000
00110011
00111100
00111111
11000000
11000011
11001100
11001111
11110000
11110011
11111100
11111111

Vref is used to define the full range, the DAC don't know that you only want to use the 4LSB ?  ???

Yes, so if I want 1111 = 1V (as the case is here). I set Vref at about 17V. The resolution is still
4 bit and I haven't added further resistors to the network (each resistor will have tolerences that
effect the accuracy).

Either way, for something like what ArcadeTV wants to do, I'd use a discrete R2R ladder, because it's so
much easier to tune and has no latency.

Bryce.
like
0
No reactions

Offline ArcadeTV

  • CPC664
  • ***
  • Posts: 50
  • Country: de
  • RGB or Nothing!
    • index.php?action=treasury
    • Me on circuit-board.de
    • Awards
Re: GX4000 video-processing questions
« Reply #23 on: 12:42, 24 March 15 »
It's been a while since I worked on this, but now that the wonderful C4CPC-Flashcart is here I had the chance to run the diagnosis-software and finally I was able to display a pure white screen for measuring the Vpp of the video signals.

Bryce was right, the fading/blur happends definitely inside the DAC. I tapped the R, G and B signals from varios sources and they all had it, even when I tapped RGB right from the DAC-outputs and amped the signals using my trusty THS7314. Picture was nice, but still had the blur-effect.

I want to rebuild the DAC with an R2R ladder now but I can't do the math behind that.

Here's what I see on the scope while the system is displaying a pure white screen on the input of the DAC-IC:


R0 to R3 all look the same.
The Vpp is 4.92V, I need to build the R2R-ladder with a maximum output-level of 0.7V, that would be the correct input level for the THS7314 that I'm going to use for amping the signals.

I've never build a DAC before, I understand its concept and the function of a voltage-devider but I need some help please to calculate the values for R and R2.
Also in an R2R there should be an opamp I guess, I'm pretty lost because I wouldn't know which one would be suitable for my application.

Any help with this is very much appreciated, thanks guys.
like
0
No reactions

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 12.500
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
    • Awards
Re: GX4000 video-processing questions
« Reply #24 on: 13:16, 24 March 15 »
There's two ways you could do it. Either you could calculate the exact resistor values to get 1111 = 0.7V - This would involve choosing very strange resistor values and probably be a complete mess. Or you build an R2R ladder using preferred resistor values and then use an additional divider to bring the voltage down to what you need. You could use an op-amp too, but it's not really necessary.

Bryce.
like
0
No reactions