I'm also new to the forums but have been reading a lot of information on here and getting into CRT retro gamming as I mentioned in the introduction thread.
I have created some code for a Raspberry Pi running Rasbian to interface with any GBS board (8200 or 8220). This programs the register settings in the scaling chip, the TVIA Trueview 5725, directly via I2C at 3.3V. The on board MTV230GMV microcontroller, sometimes going by rebadged labels such as GBS800MV, is bypassed by shorting the jumper on Port 8 (P8). This puts it into In System Programming (ISP) mode, which means it can't interfere with the custom settings being programmed.
Here is a short list of the improvements I have been able to get working thus far:
- Pure line double mode, allowing correct 30Hz drop shadows with no interpolation
- YPbPr component output, with Sync on Luma included
- Resolution changes, including 576p50Hz
- Correct 50Hz input, this works on some versions of the original firmware and not others
- Finer control of the scaling and image position
- Control of the image processing chain to adjust all sorts of image quality settings
- Over sampling of the output using 4x oversampling of the pixel/dot clock
This has allowed me to create, save and recall settings for 240p and 480i RGB to 480p YPbPr, as well as 288p and 576i RGB to 576p YPbPr.
I am in the process of documenting my code for posting on GitHub. In the meantime I'll post more information to see what interest others have in this work.
This is a picture of my testing setup at the moment:
Raspberry Pi (Raspbian) gbs-control example code
For Release v0.3
Probably the last version I will make. This adds colour correction, dynamic de-interlace, extra video modes and component sync level adjustment.
For Release v0.2
An updated version is now avaliable with 1080p 60Hz RGBHV and YPbPr modes added. All YPbPr modes should now use a correct sync level. See the change log below or on github for a small summary.
For Release v0.1
I have finally put together a package that can be easily installed on a fresh install of Raspbian on a Raspberry Pi. This is to allow others to try out the settings I have made if they want. I'm not sure if I will be able to update this at all, I'm now going to concentrate on reading and writing to the GBS micro. I'm sure the quality of the code is very poor seeing as this is my first time doing this sort of thing.
My GitHub repo is here: https://github.com/dooklink/gbs-control
The readme on the GitHub page should cover how to use this. All you should need to do is install Raspbian on a Raspbery Pi and run the following command while connected to the internet:
Code: Select all
curl https://raw.githubusercontent.com/dooklink/gbs-control/master/install-gbs-control.sh | bash
There are four things required for this to work:
- Composite video port connected to Green RCA Luma input of the GBS board
- I2C SDA, SCL & GND connected between the Pi and Port 5 of the GBS board (Do not use port 6!!)
- A usb keyboard, wireless is fine
- P8 jumper shorted on GBS board
For Release v0.3
Shouldn't cause and issues with any models, but bug reports are welcome
For Release v0.2
I've added code to detect rev1 Model B boards. This should allow for direct installation on these boards, but I haven't testing this myself.
For Release v0.1
I was trying to make sure the scripts would work with any version of the raspberry pi, but I have given up on that for now. This means you will need a rev2 Model B or any other raspberry pi. I believe only the very early rev1 Model B use the old i2c port, most should use the new port. Also, the user needs to be the default "pi" as I have assumed the home directory is "/home/pi".
Code: Select all
gbs-control change log ====================== Version 0.3 Colour adjustment menu - Brightness, Contrast, Saturation and Hue Dynamic De-interlace - detect and change de-interlace mode automatically New Settings Added -YPbPr 1080p 50Hz modes -YPbPr 720p 50Hz modes -YPbPr 720p 60Hz modes -RGBHV 1080p 50 to 60Hz modes -RGBHV 720p 60Hz modes -RGBHV 720p 50 to 60Hz modes -RGBHV 800x600 50 to 60 Hz scaled 567i mode -RGBHV 1280x960 60Hz and 50 to 60Hz modes -RGBHV 1280x1024 60Hz and 50 to 60Hz modes -RGBHV 320x240p 60 to 120Hz Double Scan mode (for 31kHz CRTs) -RGBHV 320x240p from 640x480p 60Hz downscaling mode (for 15kHz CRTs) Sync Level Adjust added, used for component YPbPr output Spelling in Menu fixed "Rasberry" -> "Raspberry" Version added to Menu Title (v0.3) Load and Delete menus now use whiptail interface, allows for scroll bar Fixed Right Ctrl hot-key in Triggerhappy con-fig Device Tree support added to install script (kernel 3.18+) Version 0.2 New Settings Added -YPbPr 1080p 60Hz modes -YPbPr 480p & 576p standard 0.3V fixed sync -RGBHV 800x600@60Hz modes for line doubled 288p/576i on a VESA timing -RGBHV 1920x1080@60Hz modes Settings can now be deleted from menu Installer updated to work with RPi model B rev 1 (untested) Version 0.1 Initial release version
(edit: added 13/06/2015)
As you may know RGB signals are normally 0.7v pk-pk. A component luma signal (or SOG) have an added 0.3v sync level underneath, making the signal 1.0v pk-pk total. The GBS board has a resistor that sets the maximum output range of the video DAC. This is set to create 0.7v pk-pk signals only, which explains the issues with component thus far. Version 0.3 of gbs-control has a sync level setting to adjust this to attempt to get the best compromise between sync stablility and brightness levels for a standard GBS board set for a 0.7v signal. A value of 194 should achieve 0.3v sync levels, but with reduced video range.
However, there is a hardware mod to get correct 1.0v pk-pk output. The formula in the programming guide is:
- Vout = (1.25 * 2046 * Rout) / (846 * Riref)
Hardware Information & Comparison
Original Firmware Problems
The original firmware had many issues for use with low res gamming content, particularly for us PAL 50Hz users. I have seen and read about lots of these issues before I started work on my custom settings. The most obvious is the deinterlacing applied to progressive 15Khz sources. I have been able to get around this issue with an odd glitch. I have not been able to get 240p input working without using the deinterlacer, but It can be tricked into doing an exact line doubling. And by disabling the vertical scaling engine and setting the output resolution to exactly double the input the results are very sharp.
The most frustrating for myself, was the 50Hz performance. I knew this board was hit and miss with 50Hz, but fagins YouTube video review of the SLG-In-A-Box shows that the unit can work with a 50Hz Megadrive. But that's when my trouble started. I bought a GBS board locally from a PC & Arcade shop. The first board I bought worked with 50Hz input, but had insane amounts of noise in the image. Here are some images from that board with Sonic spinball on the Megadrive.
50Hz Noise, with just sync signal:
And yet here it is in 60Hz:
I got that board exchanged for a replacement. The new board was better, but not by much. I tried every power supply you can imagine. Many have said that power supplies can cause issues. I feel this is rubbish, I run my custom settings from a single 1.2A phone charger powering a Raspberry Pi, GBS board, Sync Strike and SLG3000. The GBS board runs at 3.3V and 1.8V via either a 3.3V linear regulator or a buck convertor and a 1.8V linear regulator. Any small voltage ripple or changes at the input shouldn't cause any issue. Latter on I needed to buy another GBS scaler as I bricked my first and the second one doesn't even sync to 50Hz inputs. However, the 5725 scaler chip can do 50Hz easy. If you want to try a quick kludge yourself do the following:
- Input 60Hz and setup as normal
- Move the image up with the controls about 5-10%
- Short Port 8 with a jumper or some wire
- Input a 50Hz signal and it should work just fine
Datasheets & Component Overview
Here is a Google drive folder with PDF datasheets for some of the chips on the GBS boards, as well as a link to a web view of a leaked 5725 programming guide.
It is this guide that has allowed me to do anything with the board at all. However, it isn't complete and some settings I gleamed from a what appears to be a clone chip.
(edit: I have the PDF of the programming guide, another forum member bought it as well.)
EDIT 2022.03.13: Update google drive link due to Google's 'security updates'.
To complete something that can be flashed to the GBS board would be the end goal of this work. That is something that is going to take a fair while to accomplish. I've been in contact with bencao74 about this as I thought he would be interested in it, as he sells these. So I now ask you guys to respond and let me know if this project is worthwhile continuing. It started out as a small project for fun, but If others can help port the settings over to the on board controller, then this board could become a proper entry level gamming scaler for those without the dough for an XRGB Mini.
Also, I'll try and respond to questions as best I can.