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, is there an easier way to adjust for pixel perfect scaling, or is the method still the same as you described a few months ago?

Going through the gbs, my SNES looks like this:

Image
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

It's still a hands-on procedure if you want test pictures to be perfect.
Some presets make it easier (1280x1024), some are harder to optimize (640x480).

Most sources work best with a 320px dot clock optimized sample rate, and the exception is, of course, SNES ;p
It's best if you don't aim for a perfect look on that test image, just try to move the sampling phase through the range and see if you can improve it a bit.
The web ui command is "advance phase". If you're on a PC, click on the button once, then hold the enter key for repeatedly sending the command.

I'm looking into ways to measure sampling performance but this isn't a function of the scaler chip.
I suppose commercial solutions have good ADC readouts and some kind of FFT solution for this.
There's nothing like that on this chip, but I'm looking for ways ;p
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

man it's incredibly difficult. I can't get it to look anywhere close to good on the SNES, and the Gamecube looks almost perfect, but I can't quite dial it in. I guess, it takes some getting used to first lol.
Ryoandr
Posts: 269
Joined: Mon Jun 12, 2017 4:12 am

Re: GBS 8200/8220 CFW Project

Post by Ryoandr »

wouldn't all 256 horizontal res systems be problematic ?
NES, SNES, some MD, most of PCE, many PS1.

I'm guessing the solution (for 480p at least) would be a larger res like 720x480 or 768x480.
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

768x480 or 1024x768 would be ideal for consoles that use 256 horizontal res.
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

Well, the GBS chip is a complex device.
Sharp pixels can be achieved in many ways, and not all of them require a fitting output resolution.
If you check the 240p test suite on PSX for example, the default presets are sharp for 256, 320 and 640 pix modes.
Only the 384 mode isn't perfect, but still good enough.

I'm not sure how AndehX's SNES look came to be. Possibly a low output resolution?
The GBS produces the best results with a high ADC sample rate and a high output resolution.
Lower res and even dot clock optimized modes have a 50% chance of looking bad at this time (re-roll your dice with a scaler reset :p).
Background:
- the oversampling decimation filters lock onto the pixel clock at random (restarts / filter toggles result in a different lock position)
- the ADC sampling phase locks in what seems like one of 4 positions, also randomly
When one of these 2 falls on a bad spot, and the other doesn't, the result will be blurry. If they're both "good" or "bad", the result is sharp.
This randomness is the reason I'm not pushing dot clock optimized modes at this time.
You can see this in action with the 640x480 presets, by the way. Simply select them via web ui repeatedly and check the image quality.

The randomness is quite annoying, and I hope to find a fix some day.
However, the general modes (1280x presets) work great for most systems, with even unoptimized sampling producing good results.
Somehow the SNES doesn't want to follow the trend though. It's worse with non 1Chip consoles, too.
Ryoandr
Posts: 269
Joined: Mon Jun 12, 2017 4:12 am

Re: GBS 8200/8220 CFW Project

Post by Ryoandr »

Would it be related to SNES (and NES also if modded) infamous burst offset, that delays the sync on odd (or even) frames ?
I think PCE also uses it.
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

Maybe not directly or 100% the reason, but it could contribute to jitter.

I've put up the dev branch again, trying out some changes. By chance this also has new YUV filter settings, which may work well on SNES.
Give it a try :)

1Chip on the default 1280x960 preset (which is far off of any 256px dot clock multiple):
Image


Here's a CPU-01 "v2" from 1991 in comparison. The classic SNES is much harder to work with.. :
Image
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

1280x960 1-chip SNES using the new dev build
Image

Not perfect, but definitely much better!

edit: After playing around a bit, I decided to try using a 256x224 template I made in photoshop (upscaled to 1024x896) and then scaled the SNES image in gbscontrol to fit the template. Tweaked the PLL and phase, and I managed to get this result:
Image

thanks PNG compression for butchering the clarity.
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

Yep, that's okay. Especially considering that no game looks like this test.
Tip: The 1280x1024 preset looks even better ;)

I find it more important that the test suite main menu looks good (or any actual game).
Image
Image
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

Yep, pretty happy with the results here.

Image

I'll play around with the 1280x1024 preset in a bit too!

Oh also, is there any plans to adjust the scanline setting? For me personally, they're a little faint. Maybe add a couple of extra settings for darker scanlines? maybe 25% 50% and 75% visibility? You can barely see them on bright reds and deep blues
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

I'll make them darker soon. Wanted to fix that but never got around to it :p
The actual strength per color is a hardware function. I have no control over it (remember scanlines are a hardware glitch / exploit).
I noticed that they're very weak on pure blue. It works out nicely in average content though, so I don't complain ;p

Edit:
Oh, and try the "peaking" feature when going for sharp pixels!
It's a pretty decent effect. With a little more tuning, I hope to make it a default in the future.
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

Cool. Look forward to the tweaked scanlines :P

I tried the peaking effect, and while subtle, it does give a nice boost to the sharpness of pixels.

Heres a shot of my Sega saturn using the same preset I used on the SNES (peaking on):
Image

and a photo of it up on my projector :P
Image
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

Ah, Saturn! A nice quality video machine, same as the PSX really.
That mesh shadow converted well, even through the capture card.
It helps that it's mostly 320px ;)

The last hints of blur on the shadow could be eliminated (reduced more) by an optimized sample phase.
I just don't know how to go about doing this automatically.
It feels like the chip provides enough data points to do something, but heck if I know :p

I wonder if the quality of the ADC sample clock shows in the clock signal output itself?
The clock can be output to a pin, then into the ESP8266, if that's worth anything.
User avatar
donluca
Posts: 852
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: GBS 8200/8220 CFW Project

Post by donluca »

AndehX wrote:thanks PNG compression for butchering the clarity.
Just a heads-up: PNG is an uncompressed format, maybe you're thinking of JPG which is, indeed, lossy. ;)
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

donluca wrote:
AndehX wrote:thanks PNG compression for butchering the clarity.
Just a heads-up: PNG is an uncompressed format, maybe you're thinking of JPG which is, indeed, lossy. ;)
not to go off topic here, but PNG images can 100% have lossy compression, but generally have much better compression than JPG
rama wrote:The last hints of blur on the shadow could be eliminated (reduced more) by an optimized sample phase.
I just don't know how to go about doing this automatically.
It feels like the chip provides enough data points to do something, but heck if I know :p

I wonder if the quality of the ADC sample clock shows in the clock signal output itself?
The clock can be output to a pin, then into the ESP8266, if that's worth anything.
Well I feel like you've come so far with this project that nothing is out of the question really. I'm sure for you it's a big learning experience.
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

Scanlines are more defined now :)
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

awesome, I'll give them a try tomorrow!
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

Scanlines look awesome. Just about perfect now!

Got an issue with the PS1 though. The default 1280x960 preset looks like this:

Image

The other presets are ok though.
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

Really? It's fine here.
Check if you're not loading a custom preset. Best to just clear the flash once.
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

I can flick between the 1280x960 and the 1280x1024 preset and the latter is always fine. Interestingly enough, the PS1 boot screen (480i) is fine, but when it switches to 240p, it looks all messed up.
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

That's odd. Any weird looking log output?
Can you try switching memory clocks?
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

switching memory clocks doesn't make a difference, and nothing shows in the serial monitor

Also tried 2 different PS1's (SCPH1003 and SCPH7003) and 2 different SCART cables. Same result

Edit: Nevermind. It seems to be an issue with my capture card, as it looks fine on my projector.

Edit2: I've also noticed with the latest dev build, I can no longer access the web ui via chrome on my PC. Only seems to work using my phone.
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

Okay, good luck fixing the capture card issue!

Can you check the WiFi problem a bit more?
Does the page load (and refresh) if you turn off your console?
In that case, the PLL EM field is disturbing the WiFi module too much, and my change to how the web page is delivered isn't retransmitting well enough.
The change conserves a lot of ESP8266 heap space, which is something I'd like to keep.
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

Ok, the web ui seems to work fine if I access it using the ip address rather than "http://gbscontrol"
On my phone "http://gbscontrol" works fine though.

The issue with my capture card is an odd one though, because 1280x1024 seems to work fine, unless I start moving the image around and stretching it, then it goes all corrupt again. When this happens, the capture card is reporting the resolution as 1600x900 instead of 1280x1024. Very weird.

Anyway, some scanline porn :D :
Image
User avatar
dwards
Posts: 35
Joined: Tue Nov 19, 2013 4:17 pm

Re: GBS 8200/8220 CFW Project

Post by dwards »

AndehX,

What projector is that? It seems really bright and clear.

dwards
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

It's an Acer H7550BD (discontinued now I think)

heres another photo of it:
Image
rama
Posts: 1373
Joined: Wed Mar 08, 2017 3:15 pm

Re: GBS 8200/8220 CFW Project

Post by rama »

This all looks pretty nice :)

For the capture card issue, it depends on what controls you use to move the image.
All the "Picture Control" stuff on top of the web page is very safe to use. Those controls never move the actual display timing markers.
If the card stumbles on any of those, then it must be analysing the active video, and failing on some unexpected pixels.

The controls further down the page do move the display timing markers.
Also, there's little protection against illegal conditions (such as moving sync pulses outside blanking borders).
I include those controls mainly for development convenience and some day, they should be hidden by default.
If the card chokes on any of those, try achieving the same result with the safer stuff ;p

For the WiFi, I suppose the latest change affected the DNS server somehow, but don't ask me how that's possible ><
User avatar
AndehX
Posts: 790
Joined: Sun Oct 18, 2015 11:37 pm

Re: GBS 8200/8220 CFW Project

Post by AndehX »

hmm "saveUserPrefs: open file failed"

?
User avatar
Syntax
Posts: 1776
Joined: Wed Aug 09, 2017 12:10 am
Location: Australia

Re: GBS 8200/8220 CFW Project

Post by Syntax »

What would cause constant sync/image loss but not report on the Webui?

Ive built a GBS for my brother and it works fine except its image is cutting out randomly.

Tried a 470 then a 1k on the sync line as im feeding TTL sync into it but it made no difference.
Post Reply