Change Games Video Output Resolution?

All your homebrew software needs & discussion
Post Reply
User avatar
Link83
Posts: 9
Joined: Mon Feb 28, 2011 3:46 pm

Change Games Video Output Resolution?

Post by Link83 » Sun Mar 06, 2016 5:56 pm

Hi all,
So recently I have been reading about the GameCube HDMI mod:-
http://www.videogameperfection.com/2015 ... -gamecube/
and I noticed in the screenshots the black border around the edge of the screen:-
Image
I had already noticed this black border before when viewing the Wii U's vWii mode over HDMI.

After some googling and reading through the SDK documentation, I understand the default internal render mode for the GameCube (and Wii) is 640x480, rather than the 720x480 required by HDMI. In addition in the "GX.us.pdf" I found this:-
Image
So Nintendo recommended trimming off 16 pixels from the top and bottom of the screen in order to allow for overscan on a CRT TV.

This leads to an actual resolution of 640x448, which causes a black border around the edge of the screen when viewed over HDMI.

However in the "VI.us.pdf" I read this:-
Image
Which I believe means the GameCube can technically output 720x480.

...and then I read this:-
Image

This lead me to the following question - could we modify a games binary so that the internal rendering resolution (Commonly 640x448) is scaled to the full video output resolution of 720x480?

This could proove really handy for HDMI modded GameCube's, and perhaps even the vWii could benefit as well.

If this is possible i'm not sure which resolution we would want to scale to in order to maintain the original aspect ratio.
-688x480 should provide the largest image whilst maintaining the 640x448 aspect ratio.
-704x480 is the recommend number of active pixels:-
https://en.wikipedia.org/wiki/Overscan# ... 702_or_704
-720x480 is the resolution specified for HDMI.

I hope that this isnt a stupid question, and I look forward to reading any replies :)
User avatar
tesla246
Posts: 121
Joined: Tue Dec 11, 2012 1:48 pm

Re: Change Games Video Output Resolution?

Post by tesla246 » Sun Mar 06, 2016 8:44 pm

That is an interesting thought you have and I will be extremely interested if any of the pro's can elaborate on this matter. The thought of something similar occurred to me as well. If it is okay with you I will ask here since it may be of relevance.

Would it be theoretically possibles to change the rendering resolution of gamecube games? I have been thinking of a (slightly) higher rendering resolution to better accommodate standard upscaler algorithms; 720x540 or, if possible, preferably 960x540. This would dramatically increase picture quality due to the following benefits;

-Clean integer multiple scaling to 1920x1080. Now 960x540 would fit precisely 4 times in 1080p (2 times width and height) and 720x540 would basically upscale to 4:3 1080p, which may in turn be stretched to fill the screen to 16:9, similar to how the cube outputs a 16:9 aspect ratio in a 4:3 signal. This would allow for very clean scaling although a separate upscale board would be required as I believe your TV does not support said resolutions through HDMI (or does it?).
-No longer black bars or slight overscan depending on the games, as you have pointed out, that really bothers me.
-Along with the HDMI mod it would allow for drastically improved picture quality due to the pixel perfect scaling. It would bring the cube as far as it can get into the era of HDTV and would look awesome.

Another thing that may be interesting is the PAL resolution of 640x576. Maybe that can be the solution to 720x540. Also, if there ever is a chance of overclocking the system clock we may be able to up the resolution to 960x540. The gpu apparently ran fine at 202mhz prior to launch but they revised the specs to a clean multiple of the cpu, which got increased in clock rate, so there may be some ground to gain. Hell, if mega releases a ram expansion to serial port 1 we might even turn it into a Wii (only half joking there) :D.
Last edited by tesla246 on Sat Mar 12, 2016 8:54 pm, edited 1 time in total.
Dream mod: HI-speed port device utilizing 4:4:4 RGB 32 bit colour, 720p video and variable refresh rate. :shock:
Favourite mod: GC Loader flashed with latest swiss.
Eagerly awaiting a normal, form-factor wise, wireless controller with rumble. :)
tueidj
Posts: 564
Joined: Fri May 03, 2013 6:57 am

Re: Change Games Video Output Resolution?

Post by tueidj » Mon Mar 07, 2016 2:27 am

Devolution already adjusts the horizontal scaling to fit screens better. Changing the vertical scaling requires more memory which isn't always feasible.

The internal framebuffer has a maximum size of 640x528, so forget any ideas about increasing it.
User avatar
Link83
Posts: 9
Joined: Mon Feb 28, 2011 3:46 pm

Re: Change Games Video Output Resolution?

Post by Link83 » Mon Mar 07, 2016 5:16 pm

tueidj wrote:Devolution already adjusts the horizontal scaling to fit screens better. Changing the vertical scaling requires more memory which isn't always feasible.
Thanks for the reply tuedj :) What resolution does Devolution adjust the horizontal scaling to? and how much extra memory would be required for vertical scaling from 448 to 480 lines? I would love to know more about how this scaling is implimented.

I just think it would be great if we could get an "Overscan Reduction" on/off option added to Swiss, and perhaps some Wii backup loaders like Cfg and GX.
User avatar
Extrems
Posts: 1312
Joined: Tue Aug 17, 2010 10:40 pm
Location: Québec, Canada
Contact:

Re: Change Games Video Output Resolution?

Post by Extrems » Mon Mar 07, 2016 7:00 pm

If I wanted to maximize image quality, I'd be looking to remove scaling.
Link83 wrote:I would love to know more about how this scaling is implimented.
It's a simple lerp.
User avatar
Link83
Posts: 9
Joined: Mon Feb 28, 2011 3:46 pm

Re: Change Games Video Output Resolution?

Post by Link83 » Mon Mar 07, 2016 10:09 pm

Extrems wrote:If I wanted to maximize image quality, I'd be looking to remove scaling.
Hmm, I figured that since 720x480 is neither 4:3 or 16:9 there is going to have to be some sort of scaling before the image is displayed - no matter what we do.

I thought if the GameCube was doing the scaling itself then that would be the best option?
User avatar
Extrems
Posts: 1312
Joined: Tue Aug 17, 2010 10:40 pm
Location: Québec, Canada
Contact:

Re: Change Games Video Output Resolution?

Post by Extrems » Mon Mar 07, 2016 10:27 pm

You're scaling twice, first with a very small factor.
User avatar
Link83
Posts: 9
Joined: Mon Feb 28, 2011 3:46 pm

Re: Change Games Video Output Resolution?

Post by Link83 » Tue Mar 08, 2016 11:06 am

Hmm, so I guess if we wanted to remove the black border but with as few scaling artifacts as possible we would need the HDMI mod to offer different modes/options to scale the 640x448 original resolution upto 1080p? e.g. 4:3 mode, 16:9 mode, 1:1 mode (Perhaps double the resolution to 1280x896)
User avatar
Extrems
Posts: 1312
Joined: Tue Aug 17, 2010 10:40 pm
Location: Québec, Canada
Contact:

Re: Change Games Video Output Resolution?

Post by Extrems » Tue Mar 08, 2016 11:30 am

Just get a capture device, you can process the picture however you want.
User avatar
tesla246
Posts: 121
Joined: Tue Dec 11, 2012 1:48 pm

Re: Change Games Video Output Resolution?

Post by tesla246 » Tue Mar 08, 2016 8:35 pm

tueidj wrote:The internal framebuffer has a maximum size of 640x528, so forget any ideas about increasing it.
Dreams crushed :shock:
Though I have red somewhere on this forums it supports 1024x640 in YUV 8-bit 4:2:0 mode. Here is the link (2nd post):

viewtopic.php?t=2583
Not to say we should target the full resolution of that (the cube probably could'nt handle that), but just ever so slightly an increase, like 720x540, as I explained above. I also feel in games the cube was never really pushed towards its limits in most games, so there may be some headroom. So would that mean 8-bit colours? If so, I understand why it may not work.

Now, forgive me for being such a persistent prick, and I'm mostly talking out of my arse here, but I just find this stuff rather interesting.
Last edited by tesla246 on Fri Mar 11, 2016 4:38 pm, edited 2 times in total.
Dream mod: HI-speed port device utilizing 4:4:4 RGB 32 bit colour, 720p video and variable refresh rate. :shock:
Favourite mod: GC Loader flashed with latest swiss.
Eagerly awaiting a normal, form-factor wise, wireless controller with rumble. :)
tueidj
Posts: 564
Joined: Fri May 03, 2013 6:57 am

Re: Change Games Video Output Resolution?

Post by tueidj » Wed Mar 09, 2016 4:58 am

You can't do any drawing in that mode though, it's designed for video playback so it's pretty useless for games.
User avatar
tesla246
Posts: 121
Joined: Tue Dec 11, 2012 1:48 pm

Re: Change Games Video Output Resolution?

Post by tesla246 » Fri Mar 11, 2016 4:56 pm

So I have been thinking about this a little more and, as previously discussed, anything above the internal framebuffer would not be possible without ''tiliing'', correct? So the next best thing would be using the full framebuffer (NTSC) of 640x480 for rendering. Now is my question: would it be theoretically possible to alter the rendering resolution in to full 640x480?

I apologize for going on and on about this, but I do believe with the upcoming HDMI mod which may reveal certain ''imperfections'', there will be a benefit for rendering in this resolution:

-Full 640x480 frame; the cube adds 40 (inactive?) black pixels on each side for the 480i 720x480 video standard the TV recognizes, right? So Rendering in this ''full'' resolution gives all the games the same aspect ratio internally. So there would no longer be any need to manually adjust the zoom modes on a game per game basis on the tv in order to fully see the picture due to overscan/underscan. This will also eliminate black bars: we will see the full picture for every game.

-Another side effect of the scaler (which tuedj explained somewhere on this forum) is artifacts in the form of ''horizontal lines'' on certain games rendering below the full 640x480, due to the use of the gamecube internal scaling lower resolution games to 640x480p. This effect can be seen on many games that use lower resolution. Am I correct in assuming that those effects caused by the horizxontal scaler will no longer be present when using a full 640x480 picture? This would benefit PQ greatly as it can be really disturbing.
Last edited by tesla246 on Tue Jun 28, 2016 5:33 pm, edited 1 time in total.
Dream mod: HI-speed port device utilizing 4:4:4 RGB 32 bit colour, 720p video and variable refresh rate. :shock:
Favourite mod: GC Loader flashed with latest swiss.
Eagerly awaiting a normal, form-factor wise, wireless controller with rumble. :)
User avatar
Extrems
Posts: 1312
Joined: Tue Aug 17, 2010 10:40 pm
Location: Québec, Canada
Contact:

Re: Change Games Video Output Resolution?

Post by Extrems » Fri Mar 11, 2016 5:10 pm

Most games hardcode pixel positions/dimensions all over the place, the only exception I know of is Luigi's Mansion.
User avatar
tesla246
Posts: 121
Joined: Tue Dec 11, 2012 1:48 pm

Re: Change Games Video Output Resolution?

Post by tesla246 » Sat Mar 12, 2016 3:08 pm

Ah so does hardcode mean it is possible in theory, but would require a complete overhaul of the code?
Dream mod: HI-speed port device utilizing 4:4:4 RGB 32 bit colour, 720p video and variable refresh rate. :shock:
Favourite mod: GC Loader flashed with latest swiss.
Eagerly awaiting a normal, form-factor wise, wireless controller with rumble. :)
User avatar
tesla246
Posts: 121
Joined: Tue Dec 11, 2012 1:48 pm

Re: Change Games Video Output Resolution?

Post by tesla246 » Tue Jun 28, 2016 5:32 pm

So is it at all possible to change the internal rendering resolution of games to 640x480? I have been playing a little with a hexeditor and Luigi's Mansion and found the values 640480 [80 02 E0 01] (1 time) and 480640 [E0 01 80 02] (also 1 time). I searched in the whole ISO file I tried altering the values to 608448 but the game freezes at the nintendo logo (though on dolphin emulator it boots fine).

Of course, I found stand alone values of [80 02] and [E0 01] all over the place. Would those need to be changed as well, or would this just not be possible so I can finally put this idea to rest?
Dream mod: HI-speed port device utilizing 4:4:4 RGB 32 bit colour, 720p video and variable refresh rate. :shock:
Favourite mod: GC Loader flashed with latest swiss.
Eagerly awaiting a normal, form-factor wise, wireless controller with rumble. :)
User avatar
Sierron
Posts: 160
Joined: Mon Apr 18, 2016 11:33 pm
Location: Germany

Re: Change Games Video Output Resolution?

Post by Sierron » Tue Jun 28, 2016 7:47 pm

Do you even know what those values stand for? Could be anything pretty much.
tesla246 wrote:Of course, I found stand alone values of [80 02] and [E0 01] all over the place. Would those need to be changed as well, or would this just not be possible so I can finally put this idea to rest?
I'm sure this isn't going to work out as you imagine it would be.
Own a couple PAL and JPN cubes. And three BBAs. Homeland and PSO I/II.
tueidj
Posts: 564
Joined: Fri May 03, 2013 6:57 am

Re: Change Games Video Output Resolution?

Post by tueidj » Wed Jun 29, 2016 3:50 am

Also those are little-endian hex values, GC is big-endian.
User avatar
tesla246
Posts: 121
Joined: Tue Dec 11, 2012 1:48 pm

Re: Change Games Video Output Resolution?

Post by tesla246 » Wed Jun 29, 2016 2:17 pm

That's what I feared.

So how would resolution be specified in a hexeditor in order to track it down? Or would it require a different method and if so, what may that be? I'm a little new to hacking so anyone knows something to point me in the right direction? What would I need to learn?
Dream mod: HI-speed port device utilizing 4:4:4 RGB 32 bit colour, 720p video and variable refresh rate. :shock:
Favourite mod: GC Loader flashed with latest swiss.
Eagerly awaiting a normal, form-factor wise, wireless controller with rumble. :)
novenary
Posts: 1754
Joined: Mon Dec 30, 2013 7:50 am

Re: Change Games Video Output Resolution?

Post by novenary » Wed Jun 29, 2016 8:18 pm

What you want to do requires a tremendous amount of work, per game. It's not worth it, just give it up. If you don't like the black border, you can use the crop function on your TV.
wiiztec
Posts: 2
Joined: Thu Mar 04, 2021 8:20 am

Re: Change Games Video Output Resolution?

Post by wiiztec » Sun Apr 25, 2021 3:51 am

I've been trying to do this in Wii games with gecko codes,I found resolution floating points in brawl and nsmbwii so far, and I can shrink the screen with them but trying to expand it to eliminate underscan with it just results in the screen being cropped at the original boundaries
strayan
Posts: 1
Joined: Fri Oct 08, 2021 3:21 pm

Re: Change Games Video Output Resolution?

Post by strayan » Fri Oct 08, 2021 3:29 pm

I recommend the Extron DSC 301 HD scaler. It gives you complete control of the horizontal and vertical width of the image.

If you have a gcvideo based device then toggling the “Fix resolution” setting can also solve the problem on some displays.
Post Reply