cjuniorfox / retropie-crt

Some scripting to enable retropie to run as 240p with some HDMI to analog adapter
GNU General Public License v3.0
2 stars 1 forks source link

Could not find x68000/retroarch.cfg when enabling CRT mode #1

Closed 2skoops closed 1 year ago

2skoops commented 1 year ago

When I first tried enabling the RetroPie option menu it failed, with the log saying that it couldn't find /opt/retropie/configa/x86000/retroarch.cfg. I'm on an older image I had set up a few years ago and didn't have that folder by default in my configs folder. After this failure I manually copied over all of the configs you had installed to /home/pi/retropie-crt/resources/opt/retropie/configs , and after that I re-ran the script and everything worked!

I'm not sure if I installed your script incorrectly, so maybe that's the problem. I ran the bash command from inside putty, and it installed everything to /home/pi/retropie-crt/

As a side note, I stumbled upon your post on retropie.org.uk and decided to give it a try, since I hadn't been having any luck getting my CRT working with the cheap HDMI-component converter I got on Amazon. I found other project and posts online, but none of the HDMI modes or timings were working for me, so I was about to give up on my converter. I'm really glad I checked out your script though because it's working great! Thanks!

cjuniorfox commented 1 year ago

Hi, Thank you for your feedback. I already know about that issue. I will fix soon as possible.

cjuniorfox commented 1 year ago

The issue has been fixed. May I ask you for the link to the converter that you bought? It's important to make sure that your converter isn´t doing any image processing at all. Because if so, it will not work and you'll need to replace your converter with another that does not apply any image processing. By advance, after the installation and configuration, if you still got a black screen, try to manually force the HDMI output at the config.txt, just adding the two lines below:

hdmi_force_hotplug=1 hdmi_drive=2

2skoops commented 1 year ago

I've been using this one by Portta. It doesn't have a scaler built in, but I'm not sure whether it's doing any other processing. I also tried this one but it's flakier and less reliable than the Portta.

I had already placed an order on AliExpress for some other random Chinese ones (this one and this one), so I'll test those out when they get here in a few weeks.

But like I said, with your scripts and the Portta one I am able to get good 480i output on my CRT! I am seeing some other issues, but I'm on an old image and old version of RetroPie, so I wanted to update and test with a new image before opening new issues here. In short though, the other things I've seen are:

  1. runcommand-onlaunch.sh doesn't seem to be getting called, but it seems to work if I rename it to runcommand-onstart.sh (ie. horizontal width changes for NES/SNES). I think this may be due to the old version of RetroPie I have.

  2. When I launch any game it looks like it's still 480i and not 240p (although I can tell something changed since horizontal width changes for NES/SNES). I don't see the defined scan lines I see with a real SNES (or with RetroPie over composite), and I see that flickering that is characteristic of interlaced video. Looking at your scripts it seems like everything except EmulationStation (ans possibly PSX) should default to 240p, but that's not what I'm seeing.

  3. If I open the RetroPie menu option to go back to HDMI my screen just goes blank.

  4. I see that you added basic support for composite as well, which I think is a great idea! This works for initially launching EmulationStation, but if I launch a game the screen just goes blank. If I try exiting the game the screen still stays blank. Looking at your scripts, it seems like the same codepath in chvideo.py that checks is_HDMI_connected() and calls set_composite_mode should still happen on launch/end, so I'm not sure what's happening.

I haven't tried debugging any of these issues further yet, and like I said, I didn't open issues for them because I wanted to test with a more recent RetroPie install first. I guess it would also be good to test with those other converters I ordered, but they won't get here until some time in November.

cjuniorfox commented 1 year ago

First of all, thank you for your feedback. The "run-command-start" executes just before the Retropie launching scripts while the "run-command-onload" runs after that. So I chose to load after for preventing some resolution-related settings to suppress the image setup done by the "consoledisp.py". If you was needed to rename the script, I assume that the version of Retropie you working with it's before the onload support.

About the composite video, I just added very basic support with not much testing just for switching between progressive and interlaced modes. I'll do further testing hoping for fixing the issues you have.

Regarding the HDMI timing not switching properly, just the vertical resolution without applying the progressive mode seems very strange to me. Maybe the issue it's related to the version of Python but I don't know. You can do some further checking by executing the " consoledisp" over the ssh session. Just call for "consoledisp nes", for example, to apply the video settings. Unfortunately, because the script resets the framebuffer, if you change the mode while some game it's running, the display will go back to TTY, but you'll be able to see what's happening. You can also add -v or -i to check the timings and call the vcgencmd to manually apply the HDMI timing.

But I hardly recommend the update of the Retropie to a newer version.

cjuniorfox commented 1 year ago

I did some testing with composite video and seems to be working as intended. The display mode switches to progressive upon entering into the game and falls back to interlaced returning to the EmulationStation. Unfortunately, because of the lack of a way to set the pixel clock when composite video mode it's enabled, Consoles like NES or SNES with 256 horizontal pixels instead of 320 will work ok, but with the 8x7 aspect ratio instead of the properly 4x3 expected.

2skoops commented 1 year ago

I had a chance to reimage to the latest RetroPie and test with that, and all four of the above points seem to be working now. runcommand-onlaunch.sh works on the new image as expected, all games are 240p instead of 480i, I can switch back to HDMI output, and composite is also working properly. Sorry for bringing up issues that were only affecting my previous image, but I'm excited to play around with this more on my new image. Thanks again for putting this script together!! I'll let you know if I run into anything else, but things seem to be working pretty well for me right now!