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.
(https://lh4.googleusercontent.com/-QVag4GjXc4c/VE7ufGINQgI/AAAAAAAAJ0A/fjZb6bmh224/s640/IMG_1261.jpg)
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?
(https://lh5.googleusercontent.com/-S7GLMo6cmZA/VE7rSqesyhI/AAAAAAAAJzM/1EzSinDX1tk/s800/20141027_205306.jpg)
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!
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.
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/ (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.
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.
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!
You can take the RGB signals directly from the monitor port. That's what I did for my S-Video adapter: RGB SVideo - CPCWiki (http://www.cpcwiki.eu/index.php/RGB_SVideo) and it works perfectly. They are about 1.1V P-P, but for most purposes this is fine.
Bryce.
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).
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??
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).
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:
(https://lh5.googleusercontent.com/-IxJBDW8fqy8/VFAGvsviuUI/AAAAAAAAJ04/soYRRL7WrbI/s800/20141028_215308.jpg)
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.
Looks very clear though! :)
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.
(https://lh4.googleusercontent.com/-_qko9n9DXK8/VFEwzI1uRnI/AAAAAAAAJ3E/DkCpLTOXfog/s800/20141029_190726.jpg)
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 :'(
(https://lh4.googleusercontent.com/-TSrMdjBHqMs/VFEwxv9Uo6I/AAAAAAAAJ28/6yXZxh00wOY/s800/20141029_190736.jpg)
(https://lh6.googleusercontent.com/-80LtVomoqWk/VFEwt6UdpvI/AAAAAAAAJ2s/-tTxUAhB_KQ/s800/20141029_190831.jpg)
(https://lh4.googleusercontent.com/-tJ1q4VSe2qo/VFEwqYAJVFI/AAAAAAAAJ2c/Aq5VLk-TkCw/s800/20141029_190843.jpg)
(https://lh5.googleusercontent.com/-SLViZjTvpww/VFEwnyls5iI/AAAAAAAAJ2U/I7R_4rwqRmM/s800/20141029_190908.jpg)
(https://lh6.googleusercontent.com/-gDzoUKkUV5k/VFEwmRArImI/AAAAAAAAJ2M/Re9MEWEdn_U/s800/20141029_190915.jpg)
(https://lh5.googleusercontent.com/-PhbbuT2VXvU/VFEwkh61n_I/AAAAAAAAJ2E/dOAcfShiEtI/s800/20141029_191011.jpg)
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:
(https://lh5.googleusercontent.com/-VehxHCbloh4/VFEykqK9YvI/AAAAAAAAJ3Q/-40G-suYiNg/s800/gx4000_rgb_bypass_v1.png)
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.
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).
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!
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.
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 (http://www.cpcwiki.eu/forum/applications/yagol4cpc-alpha-release/msg88242/#msg88242)
QuoteTo 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.
Quote from: MacDeath on 21:46, 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.
@Bryce (http://www.cpcwiki.eu/forum/index.php?action=profile;u=225)
75Ohms-to-GND on the RGB-lines makes no difference, I just tried that.
@MacDeath (http://www.cpcwiki.eu/forum/index.php?action=profile;u=221)
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! :-)
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.
Quote from: Bryce on 12:47, 30 October 14They 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
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.
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 ? ???
Quote from: TotO on 15: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 ? ???
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.
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:
(https://lh6.googleusercontent.com/-_B9JrCiswKg/VRCO4AxVPPI/AAAAAAAALU4/OAM3LyUwrFE/s800/r3.jpg)
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.
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.
I've been reading this
Digital to Analog Conversion (http://www.play-hookey.com/analog/analog_and_digital/d2a_converter.html)
and I thought it would be related to the opamp when he wrote
QuoteUnfortunately, there are several practical problems with this circuit. First, most digital logic gates do not accurately produce 0 and +5 volts at their outputs. Therefore, the resulting analog voltages will be close, but not really accurate. In addition, the different input resistors will load the digital circuit outputs differently, which will almost certainly result in different voltages being applied to the summer inputs.
I have no experience in this - what values shall I use for the resistors to start with.
And I guess the circuit will look like this in the end...
(http://www.play-hookey.com/analog/analog_and_digital/images/4-bit_r-2r_d2a_noninv.gif)
Let's take a similar circuit. I've used a general purpose Op-Amp (LM318) here, but any general purpose Op-Amp that's fast enough will do.
The R2R resistors: The actual values aren't that important as the R2R is a proportional circuit. The current is much more important than the voltage in this case. If the value of R is too low you'll be pulling too much current from the TTL outputs and you'll damage the chip (in this case the ASIC!). If the values are too high the current at the Op-Amps input will be below the Op-Amps Input bias current and the Op-Amp won't output anything. I've choosen 10K/20K (so as not to clutter the schematic), but 100K/200K would also be fine as the LM318 has an Ib of just 120nA. (Just for info: with 10K/20K you'll pull about 125µA per pin at 100K/200K you'll pull about 12.5µA per pin - both high enough to bias the Op-Amp).
The only resistor value you really need to calculate is Rf, the Op-Amp feedback resistor. I would suggest calculating this roughly and using a suitable variable resistor to tune the circuit when it's built. The calculation will only be rough because it's ignoring certain losses in the circuit etc.
The maths: You can calculate the voltage at Vout with: Vout = 1.66 x (Rf/2R) x Dec where Dec is the decimal value on the bus.
So Vmax is approx. 25 x (Rf/2R)
Hope that helped.
Bryce.
Note: To those who are about to post "Aaargghh, that's all wild approximations and you've rounded off the figures" - Yes, This is a simple Video DAC with a variable resistor to tune it. I'm not trying to design the input stage of a Keithley precision DMM here, just some rough figures.
Yes, that helped a lot. I can absolutely work with that.
A heartfelt THANK YOU to you Mr. Bryce ^^
If you need to "sharpen the edges" (ie: picture is still blurred), try adding a 10pf capacitor in parallel with Rf.
Bryce.
Could it be that the lines need to be inverted first?
I'm getting strange results and it all points to the 4 bits of each color coming from the ASIC.
Right now the TV-screen is veeery dark, when I turn up the brightness real hard I can see the image but it's inverted. This is definitely not related to the order of LSB to MSB.
I'm not a pro so I have to ask, when using a 74**04 logic ic to invert the signals first, do I need to add any parts besides the IC and maybe a 100nF bypass-cap?
Thanks!
Try swapping pins 2 and 3 on the op-amp. To adjust the brightness vary the value of Rf slightly.
Bryce.
Just wanted to say that I haven't abandoned this project...
2015 was a really tuff year and I just couldn't find the time and encouragement to dig deeper.
Anyways, I've had some results with the diy-DAC -
the pixels were as sharp as they could ever be :) but the colors felt wrong somehow.
I'll prepare a summary in the next couple'o'days so if you don't mind I'll be bugging you a little more with this :D
Why is it that the outputs of the 40464 (which are also the monitor connectors) are so dark? I wired up an RGBs connector to the 40464 on my GX4000 to bypass most of the video circuitry yesterday and I also have to turn the brightness, contrast and saturation to 100% to see a picture, and it is still quite dark. I can put an amplifier there, but shouldn't they really be enough already? The original 6128/464 machines don't do this, and as far as I understand people are using SCART cables on plus machines without the issue?
Can you explain exactly how you wired it up. Didi you disconnect the 40464 output pins from the PCB to isolate them from the rest of the circuit? How did you terminate the signals?
Bryce.
Quote from: Bryce on 10:24, 18 February 16
Can you explain exactly how you wired it up. Didi you disconnect the 40464 output pins from the PCB to isolate them from the rest of the circuit? How did you terminate the signals?
Bryce.
I've got 220 ohm in series from the 40464 RGB pins to the connector and have cut the traces from them after the diodes (D132-D134, which are actually pairs of diodes contrary to the schematic) so the diodes are still in circuit. It's wired from pins 17,16,15 as RGB, pin 10 as GND and direct to the ASIC (pin 118 IIRC) for sync (I don't have a resistor on the sync line, but I don't think that is the problem as it is syncing fine).
Is 220 ohm too much? Shall I try 75?
Quote from: Munchausen on 10:19, 18 February 16
Why is it that the outputs of the 40464 (which are also the monitor connectors) are so dark? I wired up an RGBs connector to the 40464 on my GX4000 to bypass most of the video circuitry yesterday and I also have to turn the brightness, contrast and saturation to 100% to see a picture, and it is still quite dark. I can put an amplifier there, but shouldn't they really be enough already? The original 6128/464 machines don't do this, and as far as I understand people are using SCART cables on plus machines without the issue?
Some point to not forget :
- 40464 output level will be different whether you power the GX4000 with 5V or 12V. With 5V, they will be lower.
- The SCART output are buffered
- the CM14 monitor has 100 ohm input, a TV or normal monitor usually have 75 ohm input.
Quote from: gerald on 10:47, 18 February 16
Some point to not forget :
- 40464 output level will be different whether you power the GX4000 with 5V or 12V. With 5V, they will be lower.
- The SCART output are buffered
- the CM14 monitor has 100 ohm input, a TV or normal monitor usually have 75 ohm input.
Yeah, so I'm not using the SCART buffering. I'm powering with 12V. I also tried with no resistors and it has the same effect. This is to a GBS8200 in fact, but I also tried on an LCD monitor and it has the same issue.
So I tried with:
75ohms
75ohms and 220uF cap
No change. Also, I tried through one of Bryce's s-video converters, and I get no picture with that. Think I need to make an amp.