Custom configs for CRT using the built-in composite out
-
@sakitoshi Sorry if this is a "sacrilegious" question since the amount of work you have put into this is beyond laudable, but is there a "vanilla" or "Stripped down" way to do this without shaders? Meaning, is anything else in the settings and cfg files that you have provided made impossible or non functional (as opposed to simply worse looking subjectively) if shaders were left out?
I ask, because like another poster further up I also dislike blurring effects, and also am using dispmanx driver for latency reduction, but am keenly interested in using the resolutions and positioning that you've worked really hard on here.
-
@rc_cola I haven't tested but you can always try how good it looks for you, AFAIK the shaders will be simply ignored while using dispmanx.
the shaders don't blur the image per se, they just blend the pixels just enough to compensate for the incorrect resolution, just like upscaling 720p to 1080p but only in the horizontal axis, the vertical is pixel perfect. the horizontal resolution isn't as important as the vertical on crt tv's.
there are 3 cases where there is a shader that also handles the vertical scaling: arcade, pc and psone. those systems have a range of resolutions and the shader detects it and centers the image perfectly.
portable systems will also suffer a little, the pixel perfect mode should work fine (albeit with the same horizontal scaling issues than the rest), but the fullscreen configuration will look absolutely terrible and wonderswan/color will probably have an incorrect aspect ratio while rotated.TL;DR it should work but not as good.
EDIT: just tested and no, it doesn't work as intended.
dispmanx disables all the scaling altogether (except for the horizontal scaling using the aspect ratio setting strangely enough), the video is forced to be displayed at 480 instead of 448 causing uneven scaling. all that for a measly frame which is pretty much already gained by using a crt tv without converters.new TL;DR dispmanx causes more bad than good, do not use.
-
@sakitoshi I confirmed the same thing myself. Abandoning any hope of using that.
Thanks for the reply.
One more quick question: If I do a safe, fresh install of your settings and want to change exactly two things universally across all systems in retroarch.cfg, what is the "safe" way to do it without generating another .cfg file that unintentionally might create problems with the individual system retroarch.cfg sets that you have made?
Here's what I would like to do:
Universally in /configs/all/retroarch.cfg
audio_out_rate = "44100"
video_threaded = "false"
audio_driver = "alsa" (seems to have started with alsathreaded for some reason?)
input_polling_type = "0" (aka "Early" input polling. Still playing around with this one)Also specific to 8-bit cores only (gb/gbc/nes) I wanted to add the following to each individual system /configs/[system]/retroarch.cfg:
video_max_swapchain_images = "2"
video_frame_delay = "4" (or lower if I see a performance hit)When I first did a clean image install and then added your files, I strangely did not have a "real" retroarch.cfg file in the /all/ folder, just one that when opened was a skeleton file full of commented out descriptions and no actual settings. So from the ES main screen, I opened up the retroarch menu and made my tweaks above, but that generated a new file with ALL settings, not just the ones I had adjusted, and now I am a bit worried that some or all might be trampling on the individual core settings you so carefully crafted.
Thoughts?
And thanks again for all your hard work. Even while tweaking this, I am already in CRT heaven.
-
@rc_cola you can add those lines at the end of the skeleton retroarch.cfg that comes with a fresh install or do the changes directly in es like you just did, it doesn't matter.
the per system settings (/config/[system]/retroarch.cfg) take priority over the general settings (/config/all/retroarch.cfg), so it doesn't matter what is set in the general settings, it will be overtaken by the per system settings but only if is set there. -
UPDATES:
- Added support for Sega sg-1000.
- Little adjusts to Master System, Arcade and Gamegear.
- Arcade Mortal Kombat series looks way better now.
- The aspect ratio of Gamegear was adjusted to be close to real hardware.
Sega sg-1000 was almost the only fully funtional console without configurations, the only one left would be N64, but since N64 runs poorly on the libretro cores and standalone mupen looks good enough without any special configuration I prefer focusing on other tasks instead. I guess I'll add support for libretro mupen soon since there is little left to do and improve.
When I created the configuration for Master System I was using other methods to get the measures, it was very good but kinda unreliable. Later I learned a better way to do it and Master System was a little off (by 2 pixels to be exact).
In the previous to last update I introduced a shader to deal with variable vertical resolutions, Arcade machines being very unique I applied that new shader to its config, but as I did just a quick test I didn't noticed that Mortal Kombat was among arcades that use such off-spec resolutions that even with the new shader it was a problem. Now with some numbers changed the Mortal Kombat series (and hopefully other arcade games) should look acceptable enough. I say acceptable because arcade monitors are very different than consumer tv's, so it will never be perfect.
As I've never seen a Gamegear in person I didn't knew that its screen didn't used square pixels and as such its aspect ratio wasn't the same as its internal resolution (which is 160x144, same as the gameboy). Doing some research I found out that its screen is actually very close to 4:3, so I did some adjustments to make it look close to like it should.
-
@sakitoshi Thanks again for all your hard work on this. I've had more fun with my pi in the last few days than ever before bathing in the warm x-rays of the old CRT...
Quick Question(s): As discussed in this reddit topic, any way to reliably fit Kodi as a media core into this setup, at the last perhaps any advice on reliably forcing it into 480i mode/output?
Also, despite what themes I try, the ES menus seem very chopped off even though the systems are very nicely aligned. Since the individual system .cfg take priority as I udnerstand it, can overscan be re-enabled in the /boot/config.txt just to align emulationstation on my TV, or somewhere else?
If nothing else I can leave it alone, of course, but it seems that even on themes that are designed for 4:3 like pixel-tft (to my understanding anyway they are designed that way, I haven't changed anything in terms of the .xml files and resolutions), the help buttons and some of the screen are still chopped off on the sides and bottom mostly on my TV.
-
regarding the es menu, i think the best course of action is to create/modify a theme (e.g. gbz35-dark) specifically for smaller screens. i'm currently in the process of doing so for my 13" CRT which has rounded bezel corners, so i just have to cram all the elements in:
(quick image to demonstrate)
it's going to take time, but that's part of the fun as you say :)
-
Another Update:
- fixed pc engine games that use highres mode not displaying correctly.
- along side that tested mednafen supergrafx and it works fine with the new config, so it's safe to use it.
- added nintendo 64 support.
- fixed ports ignoring the 480i.txt override (this allows kodi to be displyed at 480i if you add a 480i.txt in the kodi config folder as instructed in the updated readme at github).
@RC_Cola sorry about the kodi thing, I barely use it and when I do is on an hd tv so I didn't noticed.
the overscan cannot be changed at run time and adding overscan to display emulationstation centered will break all the configuration, so it's a choice your poison situation, have a centered es or accurate console display emulation.
themes taking overscan into account would be the only solution, but I don't know how taxing would be for theme creators to create that variant or if it is posible to easily modify personally any theme to do it. but since a wide variety of themes have most of the information at the center I don't think that it is a big problem. -
More Updates:
- neogeo now uses a scaling shader like pc engine.
- several now unnecessary files removed from the neogeo config folder. be sure to remove the "FB Alpha" folder inside "config_crt" (or the whole "config_crt" folder if is the only thing inside) in your neogeo config folder.
- updated pc engine shader because of an (almost imperceptible on crt) uneven scaling issue.
A small update with little visual benefits really, but helps maintain things clean.
Neogeo uses 2 resolutions and I created profiles for the games using the 320 px wide mode (those were less numerous, so less files to create), with this scaling shader those profiles became useless so it's safe to delete them, it shouldn't hurt leaving them there for now at least, but you'll only be wasting space (2808 bytes is nothing to scream about though). -
@chipsnblip That makes sense. I found the main GitHub page here for creating my own theme, but what setting where would I modify if my sole intention is to take an existing theme like pixel-tft and make it fit RE: the grid like you showed above? Is there a "universal size" adjustment to make to an existing theme setup that works in an overscan-esque fashion like that?
Cheers
-
@sakitoshi Hey just a quick question if you have a second, if I am adding a per-core change from the default retroarch.cfg, for example, adding some input lag reduction settings at the cost of performance but only on my NES core, do I only need to append that change to the "vanilla" retroarch.cfg file in each config/core folder, or does in need to be changed in all of the 720p overlay/1080p overlay/crt/HDMI variants thereof that you have made for each supported core under this setup?
If I am reading the config files correctly the way you have them written, it would seem like it needs to go in all of them? Or is the plain retroarch.cfg under SNES, for example, still loaded when I have used runcommand to point that system towards the retroarch_crt.cfg file?
-
@rc_cola it has to be in all the configuration variants (720p/1080p/crt/hdmi as you pointed out) as the scripts to change the settings copy those files over the retroarch.cfg file of each system.
to explain it more easily, when you select for example the "set_all_systems_hdmi" script it overwrites each system retroarch.cfg with the contents of the retroarch_hdmi.cfg file. -
@sakitoshi Thanks, that's what I already did, so glad to hear my (admittedly minimal) effort wasn't in vain.
One more thing, just an aside, I noticed your configs for the GBA don't include a retroarch_crt.cfg file in the to_configs folder: Is that intentional, that it is unnecessary to have a separate config for that as opposed to the other mobile platforms?
Thanks
-
@rc_cola none of the portables has a retroarch_crt.cfg as they have 3 custom modes (save for wonderswan/color that only have 2), retroarch_border.cfg, retroarch_fullscreen.cfg and retroarch_pixelperfect.cfg
if you have a retroarch_crt.cfg in a portable you can safely delete it since isn't used and is probably a leftover.
-
Can I just say, as my first post here, that your configs - Sakitoshi, are the reason I got back into the Pi and a CRT.
When I purchased my first Pi, the original 3, I just couldn't get a decent quality picture out of composite.
Now I have a 3+, and your configs, on my Sony 28" Trinitron it looks amazing for composite. I would love to see it in proper RGB Scart, so I have ordered a Pi2scart.
I have a couple of questions, if you don't mind.
Sega Megadrive(Genesis) didn't work, just went back to ES. So I hit a key, seconds after selecting a game, and changed the emulator to Picodrive, and now it works. Any idea why Genesis Plus, wouldn't work ?
Other emulators that don't work, just send me back to ES, are..
Game & Watch - none of these work, just straight back to ES.
Dreamcast - same as above.
Sega CD - same again, back to ES. 32x works, but again I have to quickly press a key and select Picodrive.Also, I can't get into Retroarch, when running any emulator. Before your configs, I could hold X + Option and Retroarch shows up, now it just exits.
And lastly, is there any way I can rotate the vertical games so they all display horizontally ? My Sony Trinitron, is just too big and heavy to rotate the whole TV, so I need everything to be horizontal.
Thanks for all your hard work, really appreciate it. -
@john_rm_70 thanks for the compliment, the raspi analog tv out is tricky to get right even though the image is very clean for being composite.
as you mention rgb scart I assume that you live in pal territory, my configs are designed only for ntsc. I don't know how good are my configs for pal since I'm from an ntsc country and the only crt tv I have isn't multi-norm.
that being said, the emulators should at least boot correctly.dreamcast and game and watch: my configs don't touch those systems, so if something is wrong isn't because of my configs. you should uninstall and reinstall those systems from the retropie menu, that should fix them.
megadrive/genesis/sega cd/32x: similar to above, you should uninstall and reinstall genesis plus gx, that should fix the emulator.
retroarch: my configs don't change key bindings, maybe your global retroarch.cfg (the one at configs/all) is wrong. try reseting it to default by replacing its contents with this https://retropie.org.uk/docs/RetroArch/
vertical games: games can be rotated from the retroarch menu like always, but dealing with them is out of the scope of this project. trying to scale arcade games to a consumer tv was already a stretch, but since many enjoy them (myself included) and wasn't that hard to do it decently, I did it anyway, but vertical games are another beast. -
Thanks for the reply.
I know I'm in PAL region, I wanted a good set of NTSC configs for 60hz games, thats why I chose yours. Most of my original hardware, NES, SNES, Megadrive, etc.. has been hardware modded for 60hz, so I wanted 60hz in my Pi emulators as well.I will try a re-install of those emulators. When I first installed them I installed them from binary, not source, so perhaps I will try source - for the latest versions.
I will look into the "Global" retroarch config. Before I installed your configs, I could press X + Option, and up popped Retroarch. But now it doesn't, it now closes retroarch and I'm back in emustation.Yeah, these vertical games could be a problem. I simply cannot rotate such a massive beast of a 28" Trinitron TV, that wouldn't work. So, I guess I will have to find a work-around for now. Tweaking every game by hand would take weeks, or more, so I will be happy for a kind of 1-size-fits-all setting.
Thanks. -
@john_rm_70 said in Custom configs for CRT using the built-in composite out:
Yeah, these vertical games could be a problem. I simply cannot rotate such a massive beast of a 28" Trinitron TV, that wouldn't work. So, I guess I will have to find a work-around for now. Tweaking every game by hand would take weeks, or more, so I will be happy for a kind of 1-size-fits-all setting.
regarding vertical-oriented arcade games, perhaps a modification of the crt-pi-configs by @dankcusions would be fitting for this project?
-
@chipsnblip said in Custom configs for CRT using the built-in composite out:
@john_rm_70 said in Custom configs for CRT using the built-in composite out:
Yeah, these vertical games could be a problem. I simply cannot rotate such a massive beast of a 28" Trinitron TV, that wouldn't work. So, I guess I will have to find a work-around for now. Tweaking every game by hand would take weeks, or more, so I will be happy for a kind of 1-size-fits-all setting.
regarding vertical-oriented arcade games, perhaps a modification of the crt-pi-configs by @dankcusions would be fitting for this project?
Thanks for the link, I will take a look.
-
Just thought I would post this here, incase there are some in the PAL region who might get the same problems as me.
After a complete fresh reinstall of Retropi, setup roms and retroarch, it still didn't work properly. After some hunting around the config files I managed to find this linesdtv_mode=0 #Enables NTSC 480i mode.
And I changed it to PAL like so
sdtv_mode=2 # For composite PAL.
And now Retroarch UI shows up in any Retroarch emulator when pressing X + Hotkey.
I guess my TV was going out of range when trying to bring up the Retroarch UI, so all I got was nothing, even though it was there - just not being displayed.One last thing, and I agree with previous poster youxia, the TV shader used, really ruins the image quality, too much blur for my tastes. Disabling the shader via Retroarch UI really looks soooo much better.
Really happy with the image quality now, can't wait to see true RGB scart, when my Pi2scart arrives.
All thanks to Sakitoshi, for starting this. Great work.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.