Best way to output SCART (RGB) from Pi 3?
-
@arkive said in Best way to output SCART (RGB) from Pi 3?:
Some of you here - OP especially - already have been through this trial of fire, and I'm hoping could help me out a bit. To be honest, the amount of configs & variables is fairly overwhelming, even to somebody who manages a mostly-stable modded Skyrim setup ;)
Ok, I just started on this again last night and had success! My SOLE premise was to get MAME/Arcade games working at 100% since I already physically own all the NES/SNES/Genesis/PS1 games of my youth.
My advice for you is to start with an fresh install of RetroPie. Load these settings into /boot/config.txt. These are what the makers of the Pi2SCART recommend you use:
disable_audio_dither=1 dtoverlay=vga666 enable_dpi_lcd=1 display_default_lcd=1 dpi_group=2 dpi_mode=87 hdmi_timings=320 1 16 30 34 240 1 2 3 22 0 0 0 60 0 6400000 1 #240p
Boot up the Pi, and start the copy process for some test MAME/Arcade/Genesis ROMs. While those are copying I would install the Pixel-TFT theme (otherwise it can be hard to read all the text in the game menus). Then go into the RetroPie menu > RetroArch settings, and change the RetroArch settings to the pixel perfect settings shown here:
https://www.hiscorebob.lu/tips-n-tricks/lakka-optimal-video-settings-for-240p/
Aspect ratio Index 1:1 (PAR 4:3) Windowed scale 1.0 Integer scale ON HW Bilinear Filtering OFF Threaded Video ON Vsync ON
(I forget if you have to save those settings or just exit back out)
Then go to /opt/retropie/configs/SYSTEM NAME HERE/retroarch.cfg file and add these lines to the systems in question (those are the "arcade", "mame-libreto" and "megadrive" for me. You want to add these three lines above the "# include" line:
aspect_ratio_index = "22" custom_viewport_width = "320" custom_viewport_height = "240"
After the ROM's are done copying reboot the Pi so those show up in the game lists. You can now try most MAME/Arcade games, AND Sega Genesis and they will play absolutely perfect. I mean I can switch back and forth from my real Sega Genesis console and the Pi and they're 95%+ identical (the only differences is the emulation itself which isn't 100% perfect - but pretty darn close).
Now, I say to test MAME/Arcade and Sega Genesis - and there's a reason for that. Sega Genesis is 320x240 resolution which is the setting you set the /boot/config.txt to in the "hdmi_timings" line. Most MAME/Arcade seems to be in 320x240 as well (or close enough that I don't notice anything stretching or looking weird for almost all of my 100 or so games I play).
The problem is now going to be twofold in getting things perfect for every system (like others have mentioned):
1.) The first hurdle is I have my 4x BVM/PVM's alignment set so every one of my 6 actual video game consoles I have hooked up are pretty decently centered and nothing major is cut off on the edges. It's not perfect, but decent. The Pi 3 is a different animal. I think I calculated it and it's 12% too large top to bottom, and maybe 9% too large left to right - that means important things like life meters and scores and such are cut off. You have two options here: you can manually adjust all your monitors H and V Space/phase/centering EVERY SINGLE TIME you want to use the Pi 3, then switch it back to the setting that works for your actual video game consoles (which is a major PITA to put it lightly). OR you embark on the funky 1600px tweak you're no doubt read about - I haven't had good luck getting this working but it seems like it's the ONLY way to get every system to work properly, but also seems like a TON of work as you basically (I think) have to set a custom viewport size for every single system...if not EVERY single game, to get it to resize the system/game correctly. Since this is MORE work than adjusting my monitors alignment settings, I've just been tweaking the monitor's settings itself instead (albeit on only my 1 main monitor).
2.) The second problem is since you set the /boot/config.txt to be in 320x240 resolution (which is fine for Sega Genesis, most of MAME, and any other 320x240 systems), you'll find that the systems which aren't in that exact 320x240 resolution will never be perfect (this to me, most importantly, means NES/SNES which is 256x224, will never be perfect when the resolution is set to 320x240 in /boot/config.txt). There seems to be three options here:
2A.) Use that complicated, doesn't work for everybody (although people SWEAR by it...just haven't been able to get it to work for myself), 1600px trick with a boatload of initial setup (but, in theory, fine after that). OR:
2B.) You need a second memory card setup for that /boot/config.txt hdmi_timings setting to be setup in 256x244 for NES and SNES (or manually edit the config.txt and reboot whenever you want to play NES/SNES). OR:
2C.) Live with some black bars (mainly) along the left and right side of the image while playing NES/SNES. I personally hate this, but I can't get the 1600px mode to work which is why I'm happy at the moment just with Arcade/MAME functioning properly (with a bonus of Genesis being good as well since it's at that same 320x240 resolution).
Hope the above super-long post helps (thankfully a lot of this came from my own notes ;) Basically, try the above and see what the Pi 3 is capable of on a PVM/BVM monitor with MAME and Sega Genesis - it really can be stunning and near/identical to the real thing. Then see if it's worth it to you to start trying the 1600px mode to get things even more perfect - that seems to be ideal with the resolution switching every single time you load a game to the proper systems' resolution (then after you're done a game it switches back to a regular non-1600px wide resolution so you can read the menus)...I just have to try it more to see if I can get it to work.
-
This may be of help:
http://www.retrotink.com/#Instructions
I wrote up instructions on how to switch to 1600 x 240 during gameplay and how to adjust each of the retroarch.cfg for each core. There's also a video version here:
The settings are for my component video adaptor hat but they should work for any other DPI-based adaptor as well. You'll need to adjust the overlay settings from dpi24 to vga666 to set it to 18-bit instead of 24-bit pixel mode.
-
So, uhm...RIP to my ol'Trinitron...(sob)....
No, seriously, it just died in the field of retro videogaming duty. Sad but true. Here`s what happened - might be a cautionary tale for some of you other RGB-explorers.
I started from scratch with a fresh Retropie install, following Dochartaigh's write up (thanks for that consolidated info, regardless of the final outcome :)
When I tried the Megadrive for the first time after that, it was okay-ish but not perfect - still misaligned a bit. Now, the problems started when trying to fine tune RetroArch settings - I put them in the first time before playing, and saved as separate config, but couldn't load that config within the game again without quitting the game itself- once you quit it goes to EmuStation and reverts to retroarch.cfg ...doh...(I didn't want to set "Save on exit" to ON - had bad experiences with it before)Anyway, then I tried to readjust it within the game - that's when the disaster struck. The main issue seems to be the Integer ON/OFF switch - sometimes, in combination with other settings perhaps, when you change it to ON, it increases the the custom resolution multiplier. I had it happen before, usually double up, which is annoying but harmless. This time it went something like 3 or maybe 4 times up - filling about quarter of the screen up with zoomed in RetroArch settings display. I thought it's probably nothing that quitting/rebooting couldn't cure, turned to adjust something on my PC and when I looked back couple minutes later the screen was dead and the power LED blinking (error code: "Protection circuit trip").
Damn. But, what can you do...I suppose when adding modern experimental stuff to decades old hardware sometimes stuff like that will happen. It's my first, and the damage is more sentimental than material (got this TV for about 40 bucks) so I'll take it as a harsh lesson. Annoying, because IQ on this TV was really outstanding. And since I'm moving abroad soon, I won't bother getting another one for at least few months.
Hopefully when I come back at least some of these resolution/scaling struggles will be resolved ;)
-
@mikechi2 said in Best way to output SCART (RGB) from Pi 3?:
This may be of help:
http://www.retrotink.com/#Instructions
I wrote up instructions on how to switch to 1600 x 240 during gameplay and how to adjust each of the retroarch.cfg for each core. There's also a video version here:
The settings are for my component video adaptor hat but they should work for any other DPI-based adaptor as well. You'll need to adjust the overlay settings from dpi24 to vga666 to set it to 18-bit instead of 24-bit pixel mode.
Thanks for the video! I will try the 1600px tweak (again) as soon as I can. I'm hoping it'll fix everything for me! Couple questions if you don't mind:
Comparing your config.txt, to ArcadeForge's Pi2SCART config.txt (which we've been talking about the Pi2SCART mostly in this topic which is why I mention that one specifically, you know, while we wait for your RGB model to come out ;) and you can see there's two line difference:
Yours:
disable_overscan=1 dpi_output_format=519
ArcadeForge/Pi2SCART:
disable_audio_dither=1 dtparam=audio=on
Which set of code should we use? (or is it mix and match, and if so, which?)
Also, your boot.cfg file on the instructions page of your site, and the content of the config.txt included in the "config file kit" (zip file), are also different by quite a few lines (this is from a REALLY quick glance):
dtparam=i2c_arm=off dtparam=i2s=off dtparam=spi=off enable_uart=0 dtparam=audio=on gpu_mem_256=128 gpu_mem_512=256 gpu_mem_1024=256 overscan_scale=1
For those of us trying this on a non-RetroTink product, should we leave out all those lines?
When we're editing the settings in retroarch.cfg for each system, for systems like Sega Genesis/Megadrive which is 320x240, and doesn't match anything in the examples in your chart, would I start at 1600 since that's 320 x 5? Then just see what custom_viewport_x/y needs to be adjusted to in order to center the image? Anything else we have to worry about when trying to get the best settings for a certain system?
Last, we've talked a bit about those pixel perfect settings I believe in this topic and others. Should we NOT touch those global RetroArch settings whatsoever? - Since it seems like you're turning the features you want on/off through the individual settings for each system in their retroarch.cfg? Thank you again for the help!
EDIT 1 Rainbow colors on a Pi2SCART with the RetroTink hdmi_timings...
EDIT 2* Definitely leave OUT
dpi_output_format=519
or you'll get funky rainbow colors on the Pi2SCART again for some reasonEDIT 3 Whenever I exit out of a game by using Select + Start my menu is still totally jacked up (it's a small sliver on the left side)... Tried this twice on two freshly formatted SD cards with RetroPie 4.1.0. ONLY changes I made to the stock system (besides programming my controller, connecting to wifi, and copying over some ROMs) was adding the onend/onstart files, and changing the boot/config.txt.
EDIT 4 Pi2SCART users can't use the settings in your onend/onstart files - the bit depth is wrong (the people on Pi2SCART's webpage told me). I used ArcadeForge's settings for those files and all is well! (well, still working on getting TATE games to work without rotating my 90 pound BVM sideways every time ;)
@arkive said in Best way to output SCART (RGB) from Pi 3?:
turned to adjust something on my PC and when I looked back couple minutes later the screen was dead and the power LED blinking (error code: "Protection circuit trip").
I've heard this can happen - but have never experienced it myself. I'm still kinda convinced it could have just been a bad coincidence. I've had the messed-up picture on my PVM's as well - and just make sure to turn them off as quick as I can just in case (then I remote SSH in and change whatever setting I just changed and try something else).
-
@arkive said in Best way to output SCART (RGB) from Pi 3?:
When I tried the Megadrive for the first time after that, it was okay-ish but not perfect - still misaligned a bit. Now, the problems started when trying to fine tune RetroArch settings - I put them in the first time before playing, and saved as separate config, but couldn't load that config within the game again without quitting the game itself- once you quit it goes to EmuStation and reverts to retroarch.cfg ...doh...(I didn't want to set "Save on exit" to ON - had bad experiences with it before)
Holy cow! Are you saying the settings messed up your TV?
-
@Dochartaigh Awesome I think you figured most of it out
The audio stuff from Pi2SCART doesn't really matter for any of the adaptors. I think it just turns off or on dithering. Honestly USB audio is the way to go.
Definitely use the kit -- I'll update the webpage soon. Argh, sorry so many settings my head is spinning.
"When we're editing the settings in retroarch.cfg for each system, for systems like Sega Genesis/Megadrive which is 320x240, and doesn't match anything in the examples in your chart, would I start at 1600 since that's 320 x 5? Then just see what custom_viewport_x/y needs to be adjusted to in order to center the image? Anything else we have to worry about when trying to get the best settings for a certain system?
Last, we've talked a bit about those pixel perfect settings I believe in this topic and others. Should we NOT touch those global RetroArch settings whatsoever? - Since it seems like you're turning the features you want on/off through the individual settings for each system in their retroarch.cfg? Thank you again for the help!"
That's exactly right! No other settings, only the viewport scaling and offset. Each core should override the global retroarch settings.
It sounds like you figured the rest of it out, thanks for the info - that'll really help non-RetroTINK users:
-comment out dpi_output_format=519 and modify the onend/onstart since they're all tooled for 888 RGB output.
-
@mikechi2 said in Best way to output SCART (RGB) from Pi 3?:
Holy cow! Are you saying the settings messed up your TV?
Well, maybe not THE settings - these are harmless, it was some unholy combination of the Integer On and maybe Aspect Ratio/Windowed Scale values - causing my Custom Viewport resolution to increase 3 or 4 - fold.
And when your TV dies in the exact moment when that happens - displaying an "overload" error - than it's extremely unlikely to be a coincidence ;)
-
If I may chime in, I've done a RGB to SCART cable (would also work with PVMs) and shared my settings if anyone's intersted:
https://retropie.org.uk/forum/topic/8476/retropie-240p-15-khz-rgb-scart-tv-guide
-
I couldn't resist and I got another CRT TV in. Life without one is just kinda bland ;)
Over last few weeks I was back in the Settings mode, trying to coax something out of these endless variations without much more success than before. Best I could do was a perfect (aka 1:1 pixels and filled screen) NeoGeo and sort-of-okay Megadrive. I also have a Wii and had more luck there with perfect Megadrive, SNES and NES. Wii however struggles with arcade and the emulation quality seems slightly weaker regarding aforementioned platforms- hence I persist with RPi.
So I went and tried the 1600px solution. It is sort of intimidating at first - but, by gods, it works! For the record, I'm on Pi2Scart and a 29" Trinitron TV. I did disable the dpi_output_format=519 line however apart from that the settings are unchanged, including the onend & onstart files. Not sure why AF folk say the bit depth is wrong in these, the IQ looks fine.
So, the 1600 fix works - on SNES, NeoGeo and NES. The doggone Master System doesn`t for some reason. The horizontal resolution is letterboxed when using the recommended Tink settings. Does it work for you guys who tried this solution? And any ideas why it fails on my setup? I have a similar problem on Wii as well, the best I could do there (and on RPi with non-Tink timings) is a centered but shrunk image with black bars all round.
Also curious if anybody tried microcomputers like ZX Spectrum/CPC/C64 to get to work using 1600px fix. In my case it fails, I tried to follow the template from other settings like SNES, but somehow it doesn't register and screen looks like a squashed vertical column, very narrow. I don't think the retroarch.cfg from core directories is being read for some reason (the one with #include line). Any ideas most appreciated.
EDIT: Some progress. I managed to get the assorted emu's core retroarch.cfg files to "activate" - it happened after setting SAVE ON EXIT to ON while in the RetroArch options (while in the emu). After that, the configs filled up with all the usual options (no more #include line) and now can be tweaked. It's also possible to sort the resolutions from within the emu's though that involves fiddling with the Integer/Custom Aspect/Custom Viewport settings - something I'm still convinced killed off my previous TV. So, proceed with caution.
However, it's all worth it...to see proper ZX Spectrum gfx on a CRT - 1st time in 30+ years - is something hard to describe. Incredible stuff. And arcade games, well, it's just simply
mindblowing - 2D art at its absolute best.These settings work for me now:
ZX Spectrum: CAR Width - 1600; CAR Height - 240
Amstrad CPC: CAR Width - 1536; CAR Height - 272 ......not actually perfect 1:1 but seems to work, seeing as Amstrad had a border, and actual game screen is fine
PC Engine: CAR Width - 1504; CAR Height - 240 .......1504 is odd, since it`s not a "proper" multiplier, but it works without any artifacts.This leaves the (cursed) Mastersystem and Commodore 64 - the latter being an odd animal since you need to install Vice separately and it doesn't seem to fall into regular RetroArch jurisdiction - own menu and config. I tried to edit the config, but the pic remains squashed horizontally. And, of course there`s the arcade jungle - some games worked fine, but most didn't, anyway, it's a challenge for next weekend.
-
Mastersystem is letterboxed by nature, the difference is on real hardware the border has the same colour as the background, Mastersystem's native resolution is 256x192
-
Ha! A border, you say. That would explain this quagmire...I know it`s 192px, just thought that maybe it somehow automagikally got stretched to fullscreen on a real one. I actually owned a Master System briefly about 15 years ago but don't remember any display details.
Just wish somebody mentioned this earlier, would save me a lot of time messing with the settings ;) However, why is this "border" not emulated?
Also, it's time to face the music, aka the Arcade Chaos. Any ideas on how to tackle this? Your post linked earlier says you set up resolutions "temporarily" for each game, which is something I was also doing, but that's a major hassle. Is there no way to set separate resolution for every title, which are then saved for later - maybe in this start-up menu: "Edit custom retroarch.cfg for this ROM"?
-
I am using the PI2scart adapter and I've tried the 1600 width hack. The in game menus of Retroarch are really stretched and It's impossible to navigate the menus and make per game modifications because I can barely see what I have picked in the menu. How do I change the width of specifically the Retroarch menus?
-
You need to edit all the retroarch.cfg files for the different systems when using a 1600 width, you can find the config files under /configs/ and then the respective system. Here's an example of the Nes config file that should work.
Settings made here will only override settings in the global retroarch.cfg if placed above the #include line
input_remapping_directory = "/opt/retropie/configs/nes/"
aspect_ratio_index = "22"
video_smooth = "false"
video_scale_integer = "true"
video_threaded = "false"
custom_viewport_width = "1600"
custom_viewport_height = "224"
custom_viewport_x = "0"
custom_viewport_y = "0"#include "/opt/retropie/configs/all/retroarch.cfg"
The you just need to edit the other config files and add the corrent custom_viewport_width and custom_viewport_height for each system you have.
-
@Dalton69 to be more specific it is the Retroarch menus, in game, that are being stretched out and not the gameplay. Before I updated Retroarch the menus where scaled in integer mode accordingly to the games custom viewport and everything was readable.
-
Ok, well the menus should look ok at 1600 as long as the resolution in the config.txt is set at the same. So what's the resolution setting in the config.txt file then? You can run two scripts to set a specific resolution before the game start to 1600 and then back to what ever is in your config.txt file as ES looks a bit weird at such a high resolution.
-
@Dalton69 I already have those onstart and onend scripts. I can only find the framebuffer resolution in the config file and I've already changed that...
-
It's a bizarre behaviour, I've never seen the in-game menu behave like that, in my case it always corresponds to the game resolution. This was problematic when the game itself was shrunk - before editing the custom_viewport and/or aspect/integer - I could only read the menu then because of my huge 29" display. Or, when the resolutions were going into 2x (or higher) mode, the menu was super stretched then and unusable.
I also recently "updated" through wifi but nothing has changed.
So, if you're saying that the game displays fine while the menu is messed up then I haben't a clue what's the reason. Recommend starting from scratch with a clean image/settings.
-
If it helps, this is how it looks. Very stretched out vertically but also a little horizontally.
-
Well I would say it's due to the fact you have aspect ratio = core provied. It should be custom so if you try the retroarch.cfg settings I posted for say Nes or change it to whatever system you are having issues with and then set the appropriate custom_viewport_width and custom_viewport_height then it should be fine provided that you have 1600px set in the onstart script.
I can also see that you are trying to use the psx emulator, is that the only one having issue or all emulators?
-
This post is deleted!
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.