shmups.system11.org

Shmups Forum
 
* FAQ    * Search
 * Register  * Login 
It is currently Sun Apr 30, 2017 1:09 am View unanswered posts
View active topics



Post new topic Reply to topic  [ 288 posts ]  Go to page 1, 2, 3, 4, 5 ... 10  Next
Author Message
 Post subject: GBS 8200/8220 CFW Project
PostPosted: Tue Nov 11, 2014 9:01 am 


User avatar

Joined: 07 Nov 2014
Posts: 85
Location: Australia
Here is a project that I've been working on for the GBS scaler boards. I'm not well versed in posting these kinds of things, so this could be a bit confusing for the moment.
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.

Small Summary
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

I have created some python and bash scripts that allow for a black and white interactive menu from the Raspberry Pi's composite acting as pure Luma.
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:
Image


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

Installation:
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:
curl https://raw.githubusercontent.com/dooklink/gbs-control/master/install-gbs-control.sh | bash


Connections:
There are four things required for this to work:
  1. Composite video port connected to Green RCA Luma input of the GBS board
  2. I2C SDA, SCL & GND connected between the Pi and Port 5 of the GBS board (Do not use port 6!!)
  3. A usb keyboard, wireless is fine
  4. P8 jumper shorted on GBS board

Here is a pinout diagram for the rev2 and later boards: http://pi.gadgetoid.com/pinout/i2c

Compatibility Notes:
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".

Change Log:
Spoiler: show
Code:
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


Component Video Sync Levels
(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)

Where Vout is the max voltage level before double termination, that is 0.7v * 2 to get 1.4v. Rout equals the output resistance, 75 ohms. And Riref is the setting resistor, normally 150 ohms on the PCB. This give a value 0f 1.48v pk-pk max for the normal GBS boards, which is slightly above the expected 1.4v pk-pk. If the total series value of the Riref resistance can be changed to around 111 ohms, then the output voltage would be 2.0v pk-pk, or 1.0v pk-pk when terminated. I have fitted a switch to one of my boards with a 430 ohm (100 + 330) resistance that can be switch in parallel with the PCB 150 ohm resistor. This gives the option of 150 ohm for 0.7v signals, or 111 ohm for 1.0v signals. So those that want better component output can try this. Use the default sync level of 146 in the menu for 0.3v sync with this mod. The Iref resistor is shown below, it is connected to the sixth pin along, and then to ground.

Image Image

Hardware Information & Comparison

Image Image

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:
Image

50Hz Noise, with just sync signal:
Image

And yet here it is in 60Hz:
Image

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:

  1. Input 60Hz and setup as normal
  2. Move the image up with the controls about 5-10%
  3. Short Port 8 with a jumper or some wire
  4. Input a 50Hz signal and it should work just fine

A shift in the image occurs due to the placement of the low res content in the total frame in PAL vs NTSC timings.

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.)

Image
Google Drive

Future Work
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.


Last edited by dooklink on Sat Jun 13, 2015 8:35 am, edited 7 times in total.

Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Tue Nov 11, 2014 9:32 am 


User avatar

Joined: 06 Mar 2006
Posts: 10305
Location: Germany
FANTASTIC work! Seriously.

Your image links give me 403 errors though.


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Tue Nov 11, 2014 9:34 am 


User avatar

Joined: 07 Nov 2014
Posts: 85
Location: Australia
Fudoh wrote:
FANTASTIC work! Seriously.

Your image links give me 403 errors though.


Oh no, I new that shouldn't work but did it anyway. Must be time limited.

edit: Okay should be fixed now.


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Tue Nov 11, 2014 10:42 am 


User avatar

Joined: 05 Nov 2013
Posts: 4718
Location: EU
Wow. :shock:
Does that mean we will be able to flash a custom firmware into the GBS ?
Sorry I didn't get much of the technical part but if this can be achieved by the average guy using a computer it is definitely great news considering the price and availability of those boards.
_________________
Image


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Tue Nov 11, 2014 11:03 am 


User avatar

Joined: 07 Nov 2014
Posts: 85
Location: Australia
Xyga wrote:
Wow. :shock:
Does that mean we will be able to flash a custom firmware into the GBS ?
Sorry I didn't get much of the technical part but if this can be achieved by the average guy using a computer it is definitely great news considering the price and availability of those boards.


The answer is yes, but with some work. The settings I have pretty much finished. They are not that hard to change and add to. The problem is I've tried to write to the MTV230 and ended up erasing it completely on one board. The Chinese love using Intel 8051 core CPUs as they are IP free now, and cloned and added to in silicon. The MTV230 has OSD output and measures the sync inputs for timing. But Programming for it is not as easy.

Then there is the matter of flashing once a firmware is avaliable. This would require an interfacing board with USB to make it easy for most people. I was thinking something like the SLG-In-A-Box but with USB for firmware updates.


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Tue Nov 11, 2014 11:11 am 


User avatar

Joined: 30 Jan 2012
Posts: 17
Wow, that's pretty impressive. :D But I guess there's no way to get rid of the GBS8220's analog interference "wind" pattern?


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Tue Nov 11, 2014 11:30 am 


User avatar

Joined: 16 Sep 2011
Posts: 1127
Location: Germany
Great work! Maybe I can get some use out of my GBS-8220 and SLG3000 again.


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Tue Nov 11, 2014 11:39 am 


User avatar

Joined: 07 Nov 2014
Posts: 85
Location: Australia
ikari_01 wrote:
Wow, that's pretty impressive. :D But I guess there's no way to get rid of the GBS8220's analog interference "wind" pattern?

Wind pattern? I'm not sure what you mean. Do you mean the horizontal scaling artifacts? Or do you mean signal to noise ratio on single colour sections.


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Tue Nov 11, 2014 12:37 pm 


User avatar

Joined: 30 Jan 2012
Posts: 17
On my GBS8220 the entire image is overlaid with jittery stripes, looks a bit like RF interference. They are independent of picture content. But maybe my unit is just a little bit crappier than most ;)


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Tue Nov 11, 2014 1:00 pm 


User avatar

Joined: 07 Nov 2014
Posts: 85
Location: Australia
ikari_01 wrote:
On my GBS8220 the entire image is overlaid with jittery stripes, looks a bit like RF interference. They are independent of picture content. But maybe my unit is just a little bit crappier than most ;)


Hrm, that sounds terrible. Is it anything like the 50Hz noise In my OP. What does it look like if you turn down all the pots to zero picture?
I don't think that is normal. This signal type is quite important, is this RGB or YPbPr, 50 or 60 Hz?


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Tue Nov 11, 2014 1:12 pm 



Joined: 19 Mar 2010
Posts: 1647
Location: UK
It's weird as I have had a few people state they can't get PAL 50hz working right on these boards. I have two and they both work fine.

Would be good to have information on a working programming solution and code available. Looks like I'll have to get myself a Pi. :mrgreen:
_________________
The FaginRS500 YouTube Channel of gaming related shizz


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Tue Nov 11, 2014 1:15 pm 


User avatar

Joined: 30 Jan 2012
Posts: 17
RGB (output), problem is independent of the input signal or refresh rate. It doesn't look like the "dot clouds" you have at 50Hz.
Maybe I can get around to wiring it up again sometime.


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Tue Nov 11, 2014 2:02 pm 


User avatar

Joined: 07 Nov 2014
Posts: 85
Location: Australia
fagin wrote:
It's weird as I have had a few people state they can't get PAL 50hz working right on these boards. I have two and they both work fine.

Would be good to have information on a working programming solution and code available. Looks like I'll have to get myself a Pi. :mrgreen:


Yeah, I expected for it to work form your videos, big fan btw 8) . My first two boards had the sparkles through them and my third can't do 50Hz.
My third board I bought from Jammaboards.com, or thier Ebay store at least. They list it as having special firmware changed by the manufacturer to work with Midway 55Hz cabs I believe.


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Tue Nov 11, 2014 5:44 pm 


User avatar

Joined: 19 Jan 2013
Posts: 387
Another awesome line doubler/upscaling project!

The GBS-8200 is so relatively cheap, that if it can be turned into something more useful for a few extra $, that would be awesome. I also didn't realize the TruView chip did line doubling, and not just frame buffering.

By all means, keep working on this project. I think the community here would be very excited about a GBS-8200 soft hack with the added features you listed.


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Tue Nov 11, 2014 9:01 pm 



Joined: 11 Nov 2014
Posts: 1
Coincidentally I ordered a HD9800 V5.0 board today, so this is very interesting. I understand there isn't any real difference between the HD9800 and the GBS8200, so would you expect this to work on the HD9800 too?

I'm hoping to use it mainly to play my Playstation 2 at 480i on my LCD monitor.


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Tue Nov 11, 2014 11:17 pm 


User avatar

Joined: 30 Apr 2012
Posts: 1698
Location: Kentucky
If it ends in the sale of preflashed GBS boards (as I assume home flashing would lead to buying more hardware), I'm definitely interested. If the line doubling mode is lagless I could use it with my EDTV plasma to bypass its horrible processing of 240p content.

Though of course Crafty Mech is supposedly working on something that would let me do that same thing... :P


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Wed Nov 12, 2014 8:04 am 



Joined: 15 Aug 2013
Posts: 10
damn, this is gooood news! :mrgreen:


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Wed Nov 12, 2014 10:35 am 


User avatar

Joined: 09 Sep 2008
Posts: 223
Location: The Netherlands
graubart wrote:
damn, this is gooood news! :mrgreen:


+1 Keep working on it. :D Indeed, a Plug&Play board with modified firmware would be awesome.

BTW, what was the response of Bencao74? Is he interested to include this in the SLG-in-a-box, once finished?


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Wed Nov 12, 2014 12:33 pm 


User avatar

Joined: 30 Aug 2010
Posts: 328
Yes, we`re in mail exchange and hopefully work out a solution that is easy to use. First I'll support with some hardware and stuff. I was completely thrilled when I got the mail about firmware hack of the gbs8200, so I asked twice ;)
_________________
ArcadeForge http://www.arcadeforge.de
Blog
http://www.zurborg.info


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Wed Nov 12, 2014 1:24 pm 


User avatar

Joined: 09 Sep 2008
Posts: 223
Location: The Netherlands
bencao74 wrote:
...... I was completely thrilled when I got the mail about firmware hack of the gbs8200, so I asked twice ;)


:lol:


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Wed Nov 12, 2014 2:13 pm 


User avatar

Joined: 16 Sep 2011
Posts: 1127
Location: Germany
I hope there will be some kind people who own a Raspberry Pi that are willing to update the firmware for others :)


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Thu Nov 13, 2014 3:23 am 



Joined: 13 Jul 2014
Posts: 14
This sounds really awesome. Even if you need to buy a pi and a GBS that is still good price wise. Most useful I think would be the pure line doubler and component out. A cheap way to hook up consoles to flat screens without compatibility issues.


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Thu Nov 13, 2014 3:32 am 


User avatar

Joined: 07 Nov 2014
Posts: 85
Location: Australia
I have to mention that the line doubling I'm referring to still uses the deinterlacer, just without interpolation. 30hz drop shadows and the striped sprite test in the 240p test suite display correctly. But lag is still an issue.

Also, I refer to this as line doubled as I can disable the vertical scaling process in the chip. So 240p/480i in, 480p out. This will be true even at higher output resolutions. Think of it as a resolution inside a resolution. Kind of like a virtual canvas that is output on the actual output resolution.


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Thu Nov 13, 2014 9:14 pm 



Joined: 19 Mar 2010
Posts: 1647
Location: UK
Is this effectively the same as motion adaptive deinterlacing, that is used with say the HD PRO boards.
_________________
The FaginRS500 YouTube Channel of gaming related shizz


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Thu Nov 13, 2014 9:15 pm 



Joined: 19 Mar 2010
Posts: 1647
Location: UK
bencao74 wrote:
Yes, we`re in mail exchange and hopefully work out a solution that is easy to use. First I'll support with some hardware and stuff. I was completely thrilled when I got the mail about firmware hack of the gbs8200, so I asked twice ;)


Get it sorted.... I need another top gadget to review! :mrgreen:
_________________
The FaginRS500 YouTube Channel of gaming related shizz


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Thu Nov 13, 2014 10:02 pm 


User avatar

Joined: 07 Nov 2014
Posts: 85
Location: Australia
fagin wrote:
Is this effectively the same as motion adaptive deinterlacing, that is used with say the HD PRO boards.

They use the same chip, so if you enable it then yes. There are a bunch of settings for noise remove and motion adaption that I think are quite useless.


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Thu Nov 20, 2014 3:39 am 


User avatar

Joined: 07 Nov 2014
Posts: 85
Location: Australia
Just updated the OP with links to my raspberry pi scripts.


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Thu Nov 20, 2014 8:05 am 


User avatar

Joined: 18 Jan 2010
Posts: 680
Location: Poland
So, what are the minimum requirements? Obviously a GBS scaler and any Raspberry? Any model or does it have to be a specific model?


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Thu Nov 20, 2014 8:12 am 


User avatar

Joined: 07 Nov 2014
Posts: 85
Location: Australia
matrigs wrote:
So, what are the minimum requirements? Obviously a GBS scaler and any Raspberry? Or does it have to be a specific model?

It really could be any model. I just haven't made the code adaptive to the changed I2C port. The very early model B rev1 is different from model B rev2 and I believe the rest. All of the i2ctools commands would need changing to '-y 0' rather than '-y 1'. See the bottom of this page for more details: https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c


Top
 Offline Profile  
 
 Post subject: Re: GBS 8200/8220 CFW Project
PostPosted: Thu Nov 20, 2014 12:36 pm 


User avatar

Joined: 17 Jan 2010
Posts: 13
Could you also send the i2c commands with a $5 Arduino or does it need the power of a linux operating system?


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 288 posts ]  Go to page 1, 2, 3, 4, 5 ... 10  Next

All times are UTC


Who is online

Users browsing this forum: superg and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Space Pilot 3K template by Jakob Persson
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group