GBS 8200/8220 CFW Project

The place for all discussion on gaming hardware
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

rama wrote:The UI is available if you have an ESP8266 or ESP32 board, using WiFi to display a nice control website.
Could you give a quick rundown on how this works? I have an ESP8266, but I have no idea how to connect to it
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

ESP8266 board hookup:
- GBS SCL: pin marked D15 or SCL
- GBS SDA: pin marked D14 or SDA
- GBS VSYNC: pin marked D7 or MOSI
- GBS GND to ESP8266 GND
- GBS Vcc (3.3V) to ESP8266 3.3V pin

Arduino integration:
https://github.com/esp8266/Arduino#inst ... ds-manager

Once installed, select your ESP8266 board (or similarly named clone) from the Tools > Boards menu.
Compile and upload as usual.

The ESP8266 will open an access point that can be connected to with SSID "gbs" and password "qqqqqqqq".
The control page will be on http://192.168.4.1
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

rama wrote:The ESP8266 will open an access point that can be connected to with SSID "gbs" and password "qqqqqqqq".
The control page will be on http://192.168.4.1
I should have been more clear. I have the ESP8266 all set up, it's just the wifi bit I don't get xD I figured there wasn't much configuration to do, but in any case, I can connect to the "gbs" access point, but entering the IP just says "this site cannot be reached"

Edit: Ok, it seems to work fine on my laptop, but it will not work on my phone... odd.
That's impressive. Alot of options to play with. I assume you plan to implement saving profiles for different consoles etc?

Also, I dunno if it's just my eyes, but with your latest update, the colours seem... warmer?
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

Maybe, if you had the auto ADC enabled in the sketch. I removed that.

You probably need to disable mobile data on your phone, else it tries to resolve the IP externally, for some reason.
I plan to make the ESP join your local network but that requires a step where you enter your credentials.
Those will have to be saved for next time, so that requires loading / saving stuff.
User options are next then ;)
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

Yeah, turns out a pin on the SCART cable must have been loose or something, I wiggled it in my gscartsw a bit and the color went back to normal... weird.

Yeah, turning mobile data off fixed it. What a chore... xD
Red_Delta
Posts: 4
Joined: Thu Nov 23, 2017 12:20 am

Re: GBS 8200/8220 CFW Project

Post by Red_Delta »

So I think I know why my nano wasnt working, apparently some chinese clone nanos have a problem with I2C. For my arduino pro mini I think its a similar issue. With that being said I do have my esp8226 up and running with the wifi interface and it is awesome. Thanks Rama!
culexus
Posts: 10
Joined: Tue Feb 06, 2018 10:46 pm

Re: GBS 8200/8220 CFW Project

Post by culexus »

what kind of esp8266 do you use? I have two types but never tested them out, do I need to run this with the arduino uno or is it a stand alone adapter? I have two types, on tiny and one big with many I/O.

Is it best to use this: https://www.ebay.com/itm/ESP8266-ESP-12 ... SwImRYSTVS

or this: https://www.ebay.com/itm/ESP-01S-ESP826 ... SwHMJYIHFW
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

You want the first one. That's the one I use (see the previous page to see how it hooked up to my GBS)
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

First one is better, yeah. I updated the guide a little, if you need help with the connections.
https://github.com/ramapcsx2/gbs-contro ... trol-panel

@AndehX:
I recommend powering the ESP8266 via the Vin / 5V supply pin now. If you don't already have it like that.

@Red_Delta:
Glad you like it :)
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

rama wrote:@AndehX:
I recommend powering the ESP8266 via the Vin / 5V supply pin now. If you don't already have it like that.
Sure ok, is the ESP 3.3v regulator better than the one on the GBS?
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

I prefer this now because the ESP modules require lots of current at times.
The GBS regulator can supply that much, but the install has to be careful, avoiding long wires / high resistance.
Additionally, using the ESP regulator enables its protections, which is always nice to have ;)

The only drawback is that the power consumption of the main supply increases a little.
It's going from like 2 watts to 2.2 watts ;p
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

how do I setup the ESP8266 as a wifi client? What do I need to edit?
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

Just install the latest sketch and run it. The ESP will open a new Access Point, named gbscontrol. Connect to it (use your mobile) and open the web browser.
Go to any page and you'll be redirected to the configuration page.
Here you can search for your WiFi and join it.
The ESP remembers this, so you only have to do it once.
(Or when moving locations. If it can't connect, it will open the configuration AP again.)

When it's configured, it will be reachable at http://gbscontrol/
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

rama wrote:Just install the latest sketch and run it. The ESP will open a new Access Point, named gbscontrol. Connect to it (use your mobile) and open the web browser.
Go to any page and you'll be redirected to the configuration page.
Here you can search for your WiFi and join it.
The ESP remembers this, so you only have to do it once.
(Or when moving locations. If it can't connect, it will open the configuration AP again.)

When it's configured, it will be reachable at http://gbscontrol/
Excellent stuff! Having a full configuration page is seriously cool.
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

Even better once we can load and save stuff ;)

I finally got around to adding the missing invert vertical sync option.
Now people with scanline generators can try inverting sync. Chances are good that it starts working, when it wouldn't before.
If it won't work with the standard 1280x960 presets, also try the Feedback Clock ones!

Note: Best not try this on a CRT. It probably won't like it at all.
culexus
Posts: 10
Joined: Tue Feb 06, 2018 10:46 pm

Re: GBS 8200/8220 CFW Project

Post by culexus »

Any screenshot of this gbscontrol web GUI in action? :) Im not at home for a while so no testing for at least 14 days :(

Thank you for good answers on the ESP :) I need to order some more parts now. :)
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

A while back you posted a pic of the color bleed test of the 240p test suite, where it looked razor sharp. How did you get it that crisp?
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

It requires tuning the ADC PLL divider on S5_12 for the console's crystal.
The current presets have been optimized for a PSX, but Mega Drive requires 3 to 4 notches up or down.
It's very specific to the console used, and I'm hoping that I can find some way to automatically do this.
(Trying to sample the ADC clock output, for example)

To get started, use a console that has a port of the 240p test suite available.
Show the color bleed pattern.
Use the web interface to send "Pll divider++" and see how the test pattern changes.

This is only to get you started. There's quite a few things to get right.
Perfect sampling is very hard!

Tip:
The feedback clock presets will be much easier to optimize, due to their nature of using the PLL feedback that's directly derived from the console sync.

Tip2:
If you get a perfectly blurry picture, then the PLL divider is correct, but the ADC sampling phase is not.
Hit "Advance Phase" a few times and it should switch to perfectly sharp.
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

Ok, I'll give that a try. In the mean time, I managed to get a VGA cable long enough to reach my capture card, so I did some direct captures. I discovered an interesting issue. There seems to be some kind of ghosting going on. You can see it clearly to the right of the yellow text:

Capture from GBS:
Image

Direct capture from the console:
Image
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

What you see is the low pass filters that help with aliasing that you get in your direct capture.
That aliasing can get pretty ugly, depending on the picture contents.
The filters are mostly off in the feedback clock preset, so try that.
Here's your direct capture, showing the same phenomenon, just that it isn't filtered:
Image

Oh, and the ADC gains for RGB are on 5_09, 5_0a and 5_0b. Set all 3 to 0x6f to adjust the brightness for this console.
(Command via Serial Monitor: s5s09s6f .. same for the others)
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

the feedback clock preset seems to look the same, except there's a bit more interference
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

Try with something that uses a 320px pixel clock, ie: something else than SNES.
256px requires a 1024xsomething preset for sharpness. I already tried it once, but it didn't look all that nice.

Even then, without some clever new method to sample the incoming video, the software can't know what to optimize for.

At this time, it's best you either work with the already pretty good general preset, or spend many hours tweaking it for your console.
I'll help with the tweaking part as best as time allows. Next up is preset saving / restoring.

Oh, and check your direct capture closely. Even this high quality commercial solution hasn't figured out the sample rate!
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

rama wrote:Try with something that uses a 320px pixel clock, ie: something else than SNES.
256px requires a 1024xsomething preset for sharpness. I already tried it once, but it didn't look all that nice.

Even then, without some clever new method to sample the incoming video, the software can't know what to optimize for.

At this time, it's best you either work with the already pretty good general preset, or spend many hours tweaking it for your console.
I'll help with the tweaking part as best as time allows. Next up is preset saving / restoring.

Oh, and check your direct capture closely. Even this high quality commercial solution hasn't figured out the sample rate!
Yeah no worries. I'm just throwing questions out to try and learn more about how this works. Yeah the direct capture shows a bit of interference too.
TobiasRieper
Posts: 57
Joined: Thu Sep 28, 2017 8:04 pm

Re: GBS 8200/8220 CFW Project

Post by TobiasRieper »

I have a couple of questions about this project if any one could help me that would be greatly appreciated.

Does using the arduino Uno affect the gbs board permanently? Ie what's the likely hood of me bricking it with this method)

Do I need the arduino Uno constantly connected to PC via usb?

What's the best way to power the arduino? Will it get power from the gbs board? I use a 5v 2a dc supply.

I apologise if these questions are obvious.

Does this setup work with the SlG3000 very well?
My systems are PAL, N64, PlayStation 1 and 2 and with the GBS Slg and Sync strike I get a fairly decent picture I'd just love to improve it.

I don't really know much about Arduino but I'll give it a shot! If anyone could point me I the right direction of how to program this thing with Ramas code that would be great.

I have haven't used a programing language since BASIC!
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

TobiasRieper wrote:
Does using the arduino Uno affect the gbs board permanently? Ie what's the likely hood of me bricking it with this method)
Slim to none.
TobiasRieper wrote: Do I need the arduino Uno constantly connected to PC via usb?
No. Only when updating.
TobiasRieper wrote:What's the best way to power the arduino? Will it get power from the gbs board? I use a 5v 2a dc supply.
Power it from the 5v supply. The Uno has its own 3.3v regulator.
TobiasRieper wrote:I apologise if these questions are obvious.

Does this setup work with the SlG3000 very well?
My systems are PAL, N64, PlayStation 1 and 2 and with the GBS Slg and Sync strike I get a fairly decent picture I'd just love to improve it.

I don't really know much about Arduino but I'll give it a shot! If anyone could point me I the right direction of how to program this thing with Ramas code that would be great.

I have haven't used a programing language since BASIC!
You program it using Arduino IDE. You can find it easily on Google. Also rama's guide on github should explain most things.
TobiasRieper
Posts: 57
Joined: Thu Sep 28, 2017 8:04 pm

Re: GBS 8200/8220 CFW Project

Post by TobiasRieper »

Thank you very much for your informative reply that clarifies everything at the moment. :) I'll order myself one of the Unos then. The wife's going to be a annoyed she hates it when I have a new 'project'.

I just love tinkering with things in my spare time. If we could get this board on par with an OSSC that would be amazing.
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

TobiasRieper wrote:Thank you very much for your informative reply that clarifies everything at the moment. :) I'll order myself one of the Unos then. The wife's going to be a annoyed she hates it when I have a new 'project'.

I just love tinkering with things in my spare time. If we could get this board on par with an OSSC that would be amazing.
To be honest, with the recent updates to gbscontrol, you're probably better off getting an ESP8266, rather than an Arduino
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

Yeah, get the ESP8266 ;)

This is my crude setup guide:
https://github.com/ramapcsx2/gbs-contro ... trol-panel
This board is pretty good, too. Recommended.
TobiasRieper
Posts: 57
Joined: Thu Sep 28, 2017 8:04 pm

Re: GBS 8200/8220 CFW Project

Post by TobiasRieper »

rama wrote:Yeah, get the ESP8266 ;)

This is my crude setup guide:
https://github.com/ramapcsx2/gbs-contro ... trol-panel
This board is pretty good, too. Recommended.
Damn just read your replies my order of the arduino has already been despatched.
Is being wireless the only advantage or having the esp8266 over the arduino Uno?

I got this an hour ago.. Thanks though guys :)
https://rover.ebay.com/rover/0/0/0?mpre ... 2907275972
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

The Arduino will work just fine but you won't have any control over the software.
Everything is automatic anyway, so at this time you don't loose much.

Get the Arduino running, see if you like the results. It's easy to change the control boards later, should you want to ;)
Post Reply