Experimental video encoder changer - Try it!

Hello there!

After some long hours (took two days btw) I finally made it work, this should go nicely with resolution saving. But note that it is somewhat unfinished.

For those not yet aware the video encoder is an analog thing that happens before the image goes through the cables and to the TV, to quote Vague Rant: “The video encoder can scale the image’s width to as wide as 720 pixels” How is it useful? Well, the Wii has very thin pixels, in most cases the pixels’ width won’t be the same as the platform RA is displaying. Sure, unless you don’t care about accuracy this won’t matter to you, I only became interested when I saw how wide GBA games are supposed to look(square pixels) and without correction GBA games will look like a square!

Anyways the idea is to fix this problem either for accuracy or simply because it looks better, Vague Rant submitted this as an issue in github, but I think it’s safe to say it was ignored.

So far I have only compiled one core as a test, it is using recently updated code so expect bugs.

https://www.dropbox.com/s/3h8i5xnr8mf4z2n/vba_next.dol

Here’s how it works, the name of the feature is “Set Screen Width” and is placed in the video options, below “Screen Resolution”, currently as I stated earlier it is not completely finished, by this I mean that in the options “Set Screen Width” will only work as a display for the current value e.g. “644”.

Once you load the .dol, the config will be created with an additional option called: “video_viwidth = 640” this is the default and the lowest value you will need to manually edit this to use it, the valid values are from 640 to 720 BUT you use even numbers. e.g. 640, 642, 644, 704, 708, etc. if you don’t follow this you won’t see your display.

I will try much later to make it changeable in the settings, but my coding skills are nonexistent, I made this happen with logic and trial and error.

Please note that the latest RA has a different retroarch.cfg layout so make a backup, in other words you need to use something like wiixplorer to load the dol, exit, edit the config and load again to see the difference. For a list of accurate values see the “Recommendations for optimal video settings” stickied thread. In the case of VBA Next you’ll wanna use 704 if using 640x480 or 668 if using 608x480, for accuracy.

This is great work, SuperrSonic. Definitely seems like 90% of the work is done, very impressive and hopefully not too hard for the devs to incorporate into Wii builds.

I’m currently using it with the settings I suggested for widescreen users in the other thread: screen resolution 530x480p, custom ratio 25,0: 480x480 and screen width of 656. The resulting pixel aspect ratio is a blisteringly square 5248:5247. Measured by hand/eye, it’s obviously impossible to see that five-thousandth of a difference. It looks fantastic.

As for whether this issue has been ignored by the devs … I’d rather say it seems to be on the back burner … over at a friend’s house. :wink: I had a chat about the issue over in IRC a few months back and it was agreed that the wealth of information on the subject would be very helpful when ToadKing got around to working on it. It might be worth dropping in again to draw attention to your progress here.

Do you have a diff to current source you could offer to anyone interested in getting this into mainline? Even with the many great things that seem to be coming in 1.1, this one would definitely be my dream feature. Fingers crossed, we can have ideal PARs for all RetroArch cores in the near future.

I’m still wanting to try this, do you happen to know how well this would work on a Wii U gamepad? All the 480 lines would be seen at least. (I don’t have one yet, just curious)

Oh, well I had no idea, I don’t visit IRC channels.

I submitted a pull request and it got merged. It seems they even fixed some screw ups I did when making it show up only on GC/Wii builds. :smiley:

I don’t have a Wii U either, but as long as the console itself was set to 16:9 I think this should work correctly, since that’s the only way the GamePad knows what aspect ratio to use. I imagine it would look pretty great.

That’s fantastic news! Now I’m more excited than ever for 1.1. Thanks very much for going to all this effort.

This is the most important feature yet. Thank you. I compiled my own Retroarch Wii, but I don’t see “Set Screen Width.” What’s wrong?

I don’t know, it’s still there in the latest source, did you check the video options thoroughly? Are you certain you’re on the latest source? Either way I recommend using the source from October 24, it’s the most usable source because the latest source has an issue with RGUI when changing the horizontal resolution.

https://github.com/libretro/RetroArch/t … b2aa9c6bb8

I checked out that comit, compiled again, and I still can’t see the menu option underneath “Screen Resolution.”

make -f Makefile.wii.salamander clean
make -f Makefile.wii.salamander
...
devkitPro/devkitPPC/bin/powerpc-eabi-gcc -Wall -std=gnu99 -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float
...

“GEKKO” is defined. What the heck is “salamander?”

It’s what’s used to compile the boot.dol.

You need to download the source of a core, compile it; usually “make -f makefile.libretro platform=wii” and it will output an .a file, then rename that to libretro.a and place it in the root of the retroarch source folder. And do “make -f makefile.griffin platform=wii” to get the .dol of the core.

It’s not the first thing you see in video options but it’s around there.

So “griffin” is the codename of the thing that wraps libretro stuff around each compiled core? That’s… uh… not how I expected RetroArch to work (what the heck), but I know you’re correct. I was wondering why core builds produce static link libraries. Too bad that’s not documented.

Even though your change is logically generic to all cores, it physically needs to be compiled into each core? Logically general settings would be in the common code area (boot.dol). This is a surprise.

Thank you for your help. I’ll let you know if it works.

Minor corrections:

make -f Makefile.griffin platform=wii

libretro_wii.a

Yes, the boot.dol is literally a forwarder that reads retroarch.cfg for the last loaded core and simply boots it, nothing more.

Yeah it’s libretro_wii.a, my bad sorry.

It works, as in “I can play with all the new settings and stuff.” Why doesn’t “Screen Resolution” work anymore? Please don’t tell me that I have to use a custom aspect ratio and use “Custom Ratio” to position and size the viewport. That’s nice and Unusable, plus, how do I pick interlaced/progressive, etc.?

Screen resolutions don’t work anymore? They do in the October source which is the RA version I currently use. Custom ratio and viewports were taken out for some reason but they still work manually by editing the config.

RA reads the currently set signal, so if you’re using 480i even with component cables it will use that.

EDIT: Custom ratio was moved and is slightly different but still works. Also works alongside integer scaling but has to be centered manually.

I’m using the commit that you posted. Changing “Screen Resolution” does nothing. I’m using a physical Wii and component cables.

You have to press ‘A’ to update the screen.

Oh my. You are awesome. Thank you, I’ll have to try later.

It works.