Tutorial  Updated

Retroarch Wiiflow Plugins: independent cores and pixel perfect scanlines

This is a little guide for widescreen wiiflow users, on how to correctly configure all Retroarch cores to reproduce the old games as they appeared on their original displays (CRT and portable consoles screens).
With Retroarch Wii, saving separate configurations it's not as straightforward as you may think, you need to "mod" the cores first.
The RA cores in this pack are already modded to save ALL settings everytime you quit, like Hexaeco does. I've not included my .cfg files because they're set for SD only and all paths may be different from yours. However with these modded cores and this guide, you can easily set everything up. You can also learn how to "mod" the cores yourself to save their own configurations.
Everyone is free to test and add updated or missing RA cores and share them here with the community.

Images are big, so you can verify scanlines accuracy zooming in

Megadrive / Game boy DMG
before:
Megadrive before.jpg Gameboy Before.jpg

after:
Megadrive after.jpg 1672617535707.jpg

real hardware:
Megadrive Real hardware.png GB DMG REAL.png

Arcade CPS3 / Game boy Advance
cps.jpg GBA.jpg

Arcade Mame
Arcade Aliens.jpg Arcade 1943.jpg

Arcade Neo Geo / Wonderswan Color
Neo Geo Metal Slug.jpgWonderswan Color.jpg


-This guide assumes that both your Wii console and TV are set to 16:9 aspect ratio
-I'm not using the newest RA cores from the latest Wiiflow Plugins Pack, because I can't get the scanlines to work with them. I've currently re-edited the older RA cores from the Plugins Pack Rev 6 (RA 1.7.6 through 1.8.8) to TOTALLY save separate configurations. They work really good even if they're less recent versions.
-Menus are rearranged differently between the various RA versions, the important settings are generally found in submenus called: Video, Options, Overlays.
-In a few cases, it's not possible to achieve pixel perfect resolution and aspect ratio on the Wii, because some games require a bigger vertical resolution than the wii or different pixel's aspect ratio than your TV.
-I removed non-working cores from Retroarch-Wii (e.g. Fceumm, snes9x_next), but I've included their RA-Hexaeco counterparts, plus some other Hexaeco cores as an alternative. This pack is not complete by any means, but the "main" emulators should be there.
-This guide partially works with RA Hexaeco. I couldn't edit the cores to save separate core-options files, only regular settings. But it can be possible, I guess.

INSTALLATION AND CONFIGURATION:

1 - Backup and then delete all your existing Retroarch files within wiiflow/plugins and on root.
Do it in order to prevent conflicts with configurations and to be able to restore your previous RA setup anytime.
Seriously, do a backup! I take no responsability if you don't.
DON'T delete the .ini files.
Make sure to make a backup of these folders, then delete all .dol and .cfg files contained:
retroarch
retr52rch
wiiflow/plugins/Retroarch-Wii
wiiflow/plugins/Arcade/MAME_2003_plus/mame_dols
wiiflow/plugins/Arcade/MAME_2003_plus/mame_alt_dols
wiiflow/plugins/Arcade/FBA_VM/dols
wiiflow/plugins/RA-HEXAECO

2 - Download my Cores Pack. Extract it and copy the content of each folder to the following paths:
wiiflow/plugins/Retroarch-Wii
wiiflow/plugins/Arcade/MAME_2003_plus
wiiflow/plugins/Arcade/FBA_VM
wiiflow/plugins/RA-HEXAECO
private/VTREX

* Don't forget to put the Bios files in the system directory. They're not included in this pack.
**The 'private' folder is included only for Vectrex overlays but it can also contain your SD wii channels.
DON'T delete it, just add the VTREX folder and its content to your private folder.

3 - Some .dol filenames have been changed.
Open "RA_cores_hex-editing.txt" to see all file names.
Update your plugins .ini files with the new .dol names.

4 - Open "RA_settings.txt" and follow directions to change the required settings for each core.

-END.

ENJOY YOUR GAMES WITH THIS NEW SETUP!
Post automatically merged:

Read the following tutorial to learn the process, if you want to add some missing cores or update them with new versions.

TUTORIAL: Retroarch Wii - per core configurations and pixel perfect scanlines

Preparing and hex editing the .dol files
Normally, all Retroarch cores save their settings in 2 global files: retroarch.cfg and retroarch-core-options.cfg.
This is where Retroarch fails, if you ask me. Some settings, like screen resolutions, can't be global because so many systems worked at different resolutions.
Furthermore, some cores like Genplus_GX or Gambatte, are each one emulating "groups" of machines, all requiring different video setups.
For example, all Sega consoles emulated by Genplus_GX use different resolutions, while Gambatte can use a different overlay grid and colorization for the DMG Game boy and the GBC. So, if you set Genplus_GX for the Game Gear, the same settings would then be used for the Megadrive too, forcing you to re-adjust settings each time. To prevent this madness, you first need to make duplicates of these cores and hex edit them so that they are treated as independent emulators.
- Make multiple copies of these cores, and rename them in a way that helps differentiate the platforms:


e.g.
gambatte_libretro_wii.dol
copied and renamed as:
gambatte_libretro_wii_DMG.dol
gambatte_libretro_wii_GBC.dol


All .dol files must be hex edited to save separate configurations, in order to prevent conflicts (thanks @Wiimpathy for his tutorial).
To make all cores completely independent, however, you must specify a new name for BOTH 'retroarch.cfg' AND 'retroarch-core-options.cfg':

- Open your .dol file with an hex editor
- In the search field, type .cfg and search for text
- Find and replace the text 'retroarch.cfg' with a name with the same lenght, which helps to identify it:

e.g.
retroarch.cfg --> original name
gamb_dmg_.cfg --> same lenght, name identifies Gambatte and DMG Game boy


There are multiple 'retroarch.cfg' entries, but the only one to change is the one next to 'system'

- Do the same with 'retroarch-core-options.cfg'.
In the file 'RA_cores_hex-editing.txt' you will see a complete list of the names I've used for .cfg files, as a reference.

e.g.
retroarch-core-options.cfg --> original name
gamb_dmg_-core-options.cfg --> same lenght, only the 'retroarch' part has been changed


- Save your file and copy this modified .dol to your sd card.
- Delete all residual .cfg files for that core in the retroarch root folder and retroarch/config
- Launch this dol. You should see a 'welcome' message on the first boot


1 - Disable all default filters
- Go to 'Settings' then 'Video'
- Set 'Bilinear filtering' to OFF
- Set 'Soft Filter' to OFF
- Set 'Deflicker' to OFF
- Go to 'Video' > 'Output' and click on 'Screen Resolution' to apply Deflicker OFF

Note: You can't really disable 'Bilinear Filtering' because of a little bug. Disabling Bilinear Filtering will just remove blur from menus, no changes in the game graphics. Sometimes it will occasionally disappear in Genplus_GX games, only to reappear later on when the game switches resolutions. Leave 'Bilinear Filtering' enabled only with Genplus_GX.


2 - Set up Screen Resolution (vertical Height)
The best result can be obtained if the game can be displayed at a pixel perfect scale (2x or 3x, depending on the case).
With some consoles (mostly Sega), before you work on the video resolution, you have to first set 'Borders' to 'FULL' in the 'Options' menu, because it will affect width and height in pixels.
- Launch your game and select 'Settings' > 'Video' > 'Scaling'
- Set 'Integer Scale' to ON.
- Select 'Custom Aspect Ratio height' and set it to 2x or 3x, depending on the original game resolution.
Take note of the chosen Height value (vertical resolution).
At this point, you will face 3 possible scenarios:

a) Vertical 2x resolution is 448px (e.g. Megadrive, SNES, many arcade games...).
This is optimal for the Wii, as it vertically takes up the entire screen and it's a pixel perfect scale.
- Change the 'Screen Resolution' from 'Default' to 640x448.

b) Vertical 2x resolution is bigger than 448px (e.g. NES, PC-engine, some arcade games, ...).
If the difference is minimal (e.g. 480 instead of 448 pixels) and you can see all the important stuff like health bars, inventory, etc.:
- Keep the default Screen Resolution (640x480)
If the difference is bigger, or you can't see important stuff like health bars, inventory, etc.:
- Reduce Screen Resolution to 640x448, renouncing to pixel perfect scaling

c) Portable consoles. A 3x scale will generally fit the screen, but if you find it too big and blocky, use a 2x custom scale.
- Use the default Screen Resolution (640x480)
- Choose a Custom Aspect Ratio of 2x or 3x
- Set 'Integer Scale' to OFF and adjust the X and Y position to center the picture


3 - Width adjustment
a) If your integer custom height is matching the vertical screen resolution (e.g. they're both 480px):
- Set 'Aspect Ratio' to 'Core Provided' or '4:3' or, '1:1 PAR', depending on the case. It will just shrink/stretch the picture horiontally.
Most emulators will look right in 4:3 mode but sometimes width proportions will not look right.
Try to find some circular or square shape in the game graphics, then try to switch between the above mentioned aspect ratios until they look correctly sized.
If it's still looking too thin, set 'Screen VI Width' to a greater value than 640, then click on 'Video' > 'Output' > 'Screen Resolution' to apply VI Width.

b) If your custom height is smaller than your vertical screen resolution (e.g. portable consoles at 2X scale), you have no other option than using:
- 'Aspect Ratio' = 'Custom'
On portable consoles the aspect ratio will look a little horizontally stretched, because the actual pixels aspect ratio was different. However, the difference is never too big and it's the only way to perfectly apply grid scanlines. In my opinion it's still better than a filtered image.
You can only try to adjust width by changing the appropriate settings on your TV, if available.


4 - Apply the correct scanlines overlay
- Go to 'Quick Menu' and select 'Onscreen Overlay' = 'ON'.
- Choose 'Overlay Preset' and select scanlines with the same resolution and scale of the game.
(open RA_settings.txt to see the correct overlays to use).
- Set 'Overlay Scale' to 1.00 and 'Overlay Opacity' to your liking (don't overdo it, or the screen will become too dark).


5 - Saving
Cores configuration files will be saved in the Retroarch folder on root
- When you quit the app, all settings are automatically saved in separate per-core .cfg files, similarly to RA Hexaeco.
- Make sure that 'Save Configuration on Exit' and 'Use Global Core Options File' are both set to 'ON'. They're generally found in 'Settings'>'Configuration' submenu.

Arcade games are a different story, each game is often a separate machine with its own resolution.
- Always use 'Save Game overrides' with Arcade games
See 'RA_cores_hex-editing.txt' for a full list of all the .cfg files that will be generated.


6 - "Locking" configuration
Once you're satisfied with the configuration, I suggest you to choose:
'Save Configuration on Exit' = 'OFF'.
This way you will prevent Retroarch to pointlessly save everytime.
You will also prevent to accidentally mess up with the configuration.
 

Attachments

  • RA_cores_hex-editing.txt
    5.4 KB · Views: 178
  • RA_ settings.txt
    19.5 KB · Views: 141
Last edited by Tetsuo Shima,

JuanMena

90's Kid, Old Skull Gamer & Artist
Member
Joined
Dec 17, 2019
Messages
5,017
Trophies
2
Age
30
Location
the 90's 💙
XP
10,668
Country
Mexico
.
Everyone is free to test and add updated or missing RA cores and share them here with the community
Thanks for this! Actually this option (Hex Edition) crossed my mind after attempting to use Notepad++, VisualBasic and DevC++ to modify a FILTER file.
I'll try this layer today and if I can come up with something interesting I'll share it.
 
  • Like
Reactions: Tetsuo Shima

Tetsuo Shima

Well-Known Member
OP
Member
Joined
Oct 29, 2008
Messages
1,877
Trophies
2
Age
45
XP
4,961
Country
Italy
Do you know at which point exactly overlays stopped working in retroarch?
What is the latest version where overlays were working?
Post automatically merged:

I've just found out a workaround for the Bilinear Filtering bug.
Disabling Bilinear Fitering will only remove blur from the RGUI's menus, but not in game.
To really remove it completely you also have to go to Settings > Onscreen Overlay and set:
Hide Overlay in Menu: OFF
The downside is that scanlines will be applied to all of your menus in RGUI, but it will finally remove blur from the games.
However I actually think that completely removing bilinear filtering actually makes things look worst (at least on modern Televisions). The image is too crisp and it will introduce some screen tearing when the game scrolls. I think it's better to not disable bilinear filtering when using modern TV's, while it can be required on CRT only.
 
Last edited by Tetsuo Shima,
  • Like
Reactions: cheloruiz79

cheloruiz79

Well-Known Member
Member
Joined
Oct 19, 2016
Messages
142
Trophies
0
Age
43
XP
1,842
Country
Puerto Rico
Glad for the appreciation.
Feel free to implement scanlines for your project using my tutorial.
As you can see I'm using older cores, which versione of retroarch are you using for you project?
I am using the new cores 1.14 but I am replacing them with the ones from your tutorial thank you very much
 

Tetsuo Shima

Well-Known Member
OP
Member
Joined
Oct 29, 2008
Messages
1,877
Trophies
2
Age
45
XP
4,961
Country
Italy
I'm trying to find a working snes9x_2010 core with working overlays, to include it in the pack in place of the hexaeco core. I found that 1.9.0 and 1.9.1 are working, but as soon as I launch Yoshi Island, it crashes and then it keeps on crashing with every other game I try afterwards.
Very strange, I'll try to remove game saves too
 
  • Like
Reactions: cheloruiz79

niuus

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
2,023
Trophies
1
XP
4,458
Country
Venezuela
I'm trying to find a working snes9x_2010 core with working overlays, to include it in the pack in place of the hexaeco core. I found that 1.9.0 and 1.9.1 are working, but as soon as I launch Yoshi Island, it crashes and then it keeps on crashing with every other game I try afterwards.
Very strange, I'll try to remove game saves too
Most likely not enough memory, I guess. Though I don't use many cores on the Wii (most of my favorites are arcade only), until now, the only core that displayed overlays for me was Cannonball.
 

cheloruiz79

Well-Known Member
Member
Joined
Oct 19, 2016
Messages
142
Trophies
0
Age
43
XP
1,842
Country
Puerto Rico
I'm trying to find a working snes9x_2010 core with working overlays, to include it in the pack in place of the hexaeco core. I found that 1.9.0 and 1.9.1 are working, but as soon as I launch Yoshi Island, it crashes and then it keeps on crashing with every other game I try afterwards.
Very strange, I'll try to remove game saves too
snes9x_2010 core 1.14 got the same problem
 
  • Like
Reactions: Tetsuo Shima

Tetsuo Shima

Well-Known Member
OP
Member
Joined
Oct 29, 2008
Messages
1,877
Trophies
2
Age
45
XP
4,961
Country
Italy
Thanks @niuus for your support. Maybe I'm using the wrong core? I've read that snes9x_2010 is the new name for snes9x_next, which I was always using with Yoshi Island and with good performances too. Desctiption on Github says: "Snes9x 2010. Port of Snes9x 1.52+ to Libretro (previously called SNES9x Next). Rewritten in C and several optimizations and speedhacks."
I'm trying to investigate on retroarch_salamander.cfg too, another novelty for me...
If I open it, there's only this one line: libretro_path = "nestopia_libretro_wii.dol"
I'm scratching my head... (I've never used nestopia)
When I hex edited the snes9x2010 .dol, I discovered that it's possible to change "retroarch_salamander.cfg" into "ra_snes9x_salamander.cfg" (same lenght). It effectively creates that file after quitting the emulator, and when opened as text it says: libretro_path = "snes9x2010_libretro_wii.dol" instead of nestopia, but the issue remains.
 
Last edited by Tetsuo Shima,
  • Like
Reactions: cheloruiz79

Tetsuo Shima

Well-Known Member
OP
Member
Joined
Oct 29, 2008
Messages
1,877
Trophies
2
Age
45
XP
4,961
Country
Italy
Ok I give up with snes9x libretro. I've tried cores from RA 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.9.4.
People always say they're the versions that work and that support overlays. With 1.10.x and above I could never make overlays work, which kills the purpose of this project.
With 1.9.x, after the first game launches (when it's launching), it just stop working the next time and it either freezes, or returns to wiiflow.
I'm tired of wasting time on something that's obviously broken. We have snes9x_next Hexaeco that works wonderfully.
It just pisses me off that with Hexaeco you can't even know which version was used because SuperSonic removed the information menu. Everything is top secret with Hexaeco, and just because of this I would gladly remove it from my setup, if only I had another option.
 

klonoa

Active Member
Newcomer
Joined
Mar 16, 2021
Messages
38
Trophies
0
Age
37
XP
495
Country
Turkey
thanks for the cores, but i couldn't get them work on my wii. your plugins are not showing up on my plugin selection screen.
i tried to create .ini files based on other plugins' .ini files but it didn't work.

i'm using retroarch only through wiiflow with the plugin pack and it works fine. i don't have the stand-alone build. i keep the "plugins" folder on my sd card.

so i was wondering if you can share your core .ini files. i really want to play with scanlines.
i don't know anything about hex editing either.

thanks in advance :)
 
Last edited by klonoa,
  • Like
Reactions: Tetsuo Shima

Tetsuo Shima

Well-Known Member
OP
Member
Joined
Oct 29, 2008
Messages
1,877
Trophies
2
Age
45
XP
4,961
Country
Italy
thanks for the cores, but i couldn't get them work on my wii. your plugins are not showing up on my plugin selection screen.
i tried to create .ini files based on other plugins' .ini files but it didn't work.

i'm using retroarch only through wiiflow with the plugin pack and it works fine. i don't have the stand-alone build. i keep the "plugins" folder on my sd card.

so i was wondering if you can share your core .ini files. i really want to play with scanlines.
i don't know anything about hex editing either.

thanks in advance :)
Sure, here you are. Not every .dol name was changed from the plugins pack, only the cores that were duplicated to be used for different systems without sharing the same configuration (gambatte and genplus gx).
However I've included in the zip file all the .ini files that I personally use.
Let me know how it goes.
 

Attachments

  • plugins ini.rar
    21.9 KB · Views: 111

klonoa

Active Member
Newcomer
Joined
Mar 16, 2021
Messages
38
Trophies
0
Age
37
XP
495
Country
Turkey
Sure, here you are. Not every .dol name was changed from the plugins pack, only the cores that were duplicated to be used for different systems without sharing the same configuration (gambatte and genplus gx).
However I've included in the zip file all the .ini files that I personally use.
Let me know how it goes.
thank you so much :D

thanks to your .ini files, all the cores are working fine now with scanlines except FCEUMM :(
it just doesn't load the games. it shows me a black screen then takes me back to wiiflow's plugin selection screen.

i took the fceumm.dol from ra-hexaco folder off your core pack, renamed it as "fceumm_libretro_wii.dol" and put in "retroarch-wii" folder (according to NES_fceumm_libretro.ini) but nothing changed.

i'm using the same rom path as you so i didn't change anything on .ini.

i couldn't understand why it does that.
if i load the .dol through WiiXplorer, it runs fine.
 

Tetsuo Shima

Well-Known Member
OP
Member
Joined
Oct 29, 2008
Messages
1,877
Trophies
2
Age
45
XP
4,961
Country
Italy
@klonoa sorry, my bad, I've included the wrong .ini file for fceumm.

Here is the correct one
No need to rename the file and move it to the retroarch-wii folder, use the hexaeco folder as shown in the ini .dol path
 

Attachments

  • NES_fceumm_HEXAECO.ini.zip
    398 bytes · Views: 102

klonoa

Active Member
Newcomer
Joined
Mar 16, 2021
Messages
38
Trophies
0
Age
37
XP
495
Country
Turkey
@klonoa sorry, my bad, I've included the wrong .ini file for fceumm.

Here is the correct one
No need to rename the file and move it to the retroarch-wii folder, use the hexaeco folder as shown in the ini .dol path
yes, it loads now without any problems :D
thanks again.

now i can play the nes titles with scanlines.
 

JuanMena

90's Kid, Old Skull Gamer & Artist
Member
Joined
Dec 17, 2019
Messages
5,017
Trophies
2
Age
30
Location
the 90's 💙
XP
10,668
Country
Mexico
Do you know at which point exactly overlays stopped working in retroarch?
What is the latest version where overlays were working?
I'm just noticing this... so sorry for bumping and sorry if you're not asking me. But I've personally ran this test a year ago.
@Tetsuo Shima
According to my tests, RetroArch-Wii 1.9.0 is working properly. From 1.9.1 onwards everything is broken.

Important to say, that, Overlays works with Cores from the 1.9.0 branch, but if I recall correctly, SNES Cores from this branch are not cooperating reliably.
Again, if I recall correctly, SNES Cores 1.9.0 goes as
follows regarding overlays:

- Snes9X: Won't show Overlay. Won't crash. Simply won't show it.
- Snes9x 2005: Crashes once you load an overlay and crashes if you had an Overlay active and then you load a rom.
- Snes9x 2005 PLUS: I remember this one working somewhat correctly. It would let me choose an Overlay and it wouldn't crash. But the Overlay will be visible only if you have general Video settings to "Scaling: Core Provided" and within the core's options "Video: NTSC" (or PAR? or DAR?)
- Snes9x 2010: Overlays works properly.

From RetroArch-Wii 1.9.1 onwards, seems like "devs" opted to ditch Overlays altogether in order to force the user to use Video Filters instead, but they'll slow down emulation a lot.

If I recall correctly, RetroArch-Wii 1.12.X solved the Video Filter speed issues with SNES cores, but Overlays are definitely not working at all from 1.9.1 up till newer versions.
 
Last edited by JuanMena,

Tetsuo Shima

Well-Known Member
OP
Member
Joined
Oct 29, 2008
Messages
1,877
Trophies
2
Age
45
XP
4,961
Country
Italy
I improved the Gameboy DMG overlay: now the grid mask is the same color as the lighter color, like on the real thing.
gb-dmg-real-png.345458
1696781109638.jpg
Here I attach the 2x and 3x version (the one in the photo above).
 

Attachments

  • DMG_grid_2x.png
    DMG_grid_2x.png
    14 KB · Views: 34
  • DMG_grid_3x.png
    DMG_grid_3x.png
    21.3 KB · Views: 32

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Sicklyboy @ Sicklyboy:
    Sup dude! Hope you're well
  • DinohScene @ DinohScene:
    pretty alright all things considering
  • DinohScene @ DinohScene:
    especially after the latest news!
  • Sicklyboy @ Sicklyboy:
    what's the latest news? 👀
  • DinohScene @ DinohScene:
    hubby and I can finally leave all of this financial hell behind us
    +1
  • DinohScene @ DinohScene:
    July 1st
    +1
  • Sicklyboy @ Sicklyboy:
    wonderful to hear!! :D
  • DinohScene @ DinohScene:
    still feels a little unreal to me, after so many delays and other things that gotten in the way
  • DinohScene @ DinohScene:
    already gotten the cats a new scratching paradise as a little celebration haha
  • Sicklyboy @ Sicklyboy:
    ahhhh that's awesome, I hope they're enjoying it :)
  • DinohScene @ DinohScene:
    Lady already claimed a platform and beaten Adolf out off off the house underneath it
  • DinohScene @ DinohScene:
    the fat one seems to have claimed the lower larger house
  • K3Nv2 @ K3Nv2:
    @DinohScene, promotion?
  • DinohScene @ DinohScene:
    nope, court ruling
  • DinohScene @ DinohScene:
    long story short; hubby is debt free and financially independent from July 1st onwards
  • K3Nv2 @ K3Nv2:
    UK courts actually doing justice :0
  • K3Nv2 @ K3Nv2:
    Congrats either way
  • DinohScene @ DinohScene:
    cheers!
  • DinohScene @ DinohScene:
    it's been a long journey
  • cearp @ cearp:
    nice to hear that buddy!
  • cearp @ cearp:
    now you can take on new debt :D (joking but that's actually

    life for most people)
  • DinohScene @ DinohScene:
    Nah, we won't take on debts lol
    +2
    DinohScene @ DinohScene: Nah, we won't take on debts lol +2