Giter Site home page Giter Site logo

xovox / retrocrt Goto Github PK

View Code? Open in Web Editor NEW
41.0 3.0 6.0 17.66 MB

RetroPie on CRT! RetroTink, JAMMA, SCART & more!

License: GNU General Public License v3.0

Shell 71.18% C 18.35% Jinja 10.47%
raspberry-pi composite retropie crt games video rgb linux ntsc retropie-setup

retrocrt's Introduction

Some License Nonsense

RetroCRT :: Utility suite to configure RetroPie for a CRT

Copyright (C) 2021 Duncan Brown (https://github.com/xovox)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

RetroCRT's Future

I haven't needed to update RetroCRT for a while, everything works as I'd expect it to. There are features I'd like to add, but over all it's fairly mature.

RetroCRT

RetroCRT is a suite of tools designed to make RetroPie gaming on 15khz CRTs easy and user friendly. This only covers video output, JAMMA controls will be a separate project to increase maintainability.

The biggest advantage RetroCRT has over other RetroPie 15khz CRT toolsets/distributions is we're only updating configuration files line-by-line, so updating RetroPie should never be an issue. This means that RetroCRT should be able to coexist with RetroPie and probably almost everything else you're running.

RetroCRT Emulator Support

RetroCRT only supports Libretro cores, with a few exceptions. If you find a Libretro core that's not properly configured when you launch it, please see the issues page and file a new issue if you don't see your platform already requested

Installation

See the manual.

Supported Hardware

What You Get

  • My 240p EmulationStation theme, RetroCRT 240p!
  • Only updates required lines in configs, preserving your personal customizations!
  • 240p test suite roms for several console platforms!
  • Easy installation!
  • Pixel-perfect console emulation!
  • Pixel-perfect arcade emulation for most games!
    • This is achieved with on-load screen resolution changes!
  • Automatic rotation for vertical games!
  • Installation of additional 15khz CRT Friendly EmulationStation themes!
  • No system messages on boot/shutdown/reboot!
  • My unbridled enthusiasm about building this project!

Troubleshooting

Before doing anything else, update RetroCRT! You can do this in the RetroPie screen in EmulationStation.

If that doesn't fix it, see the troubleshooting doc.

Notes on Resolutions

This is a hobby project, so I've made moves to make everything as simple & maintainable as possible.
The platforms I've been using this on are calibrated exclusively for 320x240 & 1920x240, and that's how RetroCRT behaves. You will see black borders around games that are < 240p, this is by design, I calculate aspect ratios based on vertical resolution. For example, 224p is calculated as follows (1920 / 4

To keep my hobby project maintainable, RetroCRT will use only 2 resolutions while you use it: 320x240 for console & EmulationStation as well as game play running 1920x240. This means that any game that runs < 240 will have black borders. I calculate correct aspect ratios for all games based on vertical resolution by calculating vertical percentage times max horizontal output, like (224 / 240) * 1920 = 1785.60 which is rounded up to the nearest even #. Hardware output resolution of 224p for uncalibrated sets is eventually coming, but I don't have alot of time to maintain this project.

Media

Most of this media is outdated as it's based on my previous theme

Videos

Photo

Resources

  • The manual has a ton of info, read this to get up to speed

Footnotes

Splash music is Master Boot Record's After Burner

I am not affiliated with RetroPie, Mike Chi, RetroTink, pi2jamma, or anyone else. I'm doing this as a personal project.

Shout out to Vykran for the initial groundwork, though he seems to be PAL & I'm NTSC... which brought us to where we are now.

                                                       .
                                                       ;\
                                                      /  \
                                                      `.  i          ,^^--.
                                                   ___  i  \        /      \              ,',^-_
                                                  /   \ !   \       |       |            / /   /
                                                  \   /  \   \      |       ;      ,__. |    ,'
                                                   4 |    \   `.    |      /      (    `   __>
                                                 ,_| |_.   \    `-__>      >.      `---'\ /
                                                /,.   ..\   `.               `.         | |
                                                U |   | U     `.               \    ,--~   ~--.
--~~~~--_       _--~~~~--_       _--~~~~--_       _--~~~~--_    \  _--~~~~--_   \  /_--~~~~--_ \
         `.   ,'          `.   ,'          `.   ,'          `.  |,'          `.  \,'          `.
           \ /              \ /              \ /              \ /              \ /              \

retrocrt's People

Contributors

xovox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

retrocrt's Issues

RetroCRT v3.2 not rebooting

I find that when I download and burn the image to the SD card it will boot up, however, if I have to reboot my Raspberry Pi 3b for any reason it does not reboot.

MANUAL.md

this needs to be updated to point out how ansible works & the new rom cfg generator works

pi2jamma JAMMA controls

  • RetroCRT.yml should always compile, configure & install pikeyd165
  • /boot/retrocrt/pi2jamma
pi2jamma_controls=enable
  • autostart.sh
    • source pi2jamma config file & start pikeyd if enabled

on start/end scripts

I shouldn't be overwriting what's currently in place, but i should just add to the very top of them with blockinfile & a template

Garbled Colors on Sony Trinitron

Hello. I've tried following the instructions exactly how they were laid out. I'm using the RetroTink Ultimate and component cables on a Raspberry pi 3B+. I've updated everything and still end up with very bad colors. I also made sure that dpi_output_format=0 was correct in the config file before starting the process. Any help?

retrocrt.service

this may be better as an add-on package for RetroPie instead.

this is geared towards self-healing your retropie system

  • ensure autologin is enabled

  • ensure we have a good es_systems.cfg

  • backups written to /boot/retrocrt/backups/

    • /etc/emulationstation/es_systems.cfg
    • /home/pi/.config/retroarch
  • restores

    • these are tarballs created by backups, placed in this dir it'll unpack them

Figure out place to call attention to 240p vertical games

These are games that utilized 240 wide screens, which were then rotated. They supposedly look awesome

Andromeda
Battle Lane! Vol. 5
BlockBuster
Burger Time - looks weird
Burnin' Rubber
Cook Race
Cosmos
Crazy Blocks
Dark Warrior
Darwin 4078
Dazzler
Digger
Disco No.1
Dommy
Dorodon
Eggs
Gold Bug
Graplop
Heart Attack
Hero
Hunchback Olympic
Hunchback
IPM Invader
Jackal
Jumping Jack
Lady Bug
Lock'n'Chase
Logger
Minky Monkey
MotoRace USA
Mr. Do!
Mr. Do's Castle
Mr. Do!
Mr. Do vs. Unicorns
Mr. Du!
Mr. Jong
Mr. Lo!
Mustache Boy
Night Star
Noah's Ark
Outline
Pro Soccer
Radar Zone
Raiders
Red Clash
Rock Duck
Scrambled Egg
Shot Rider
Sky Chuter
Space Fortress
Space Raider
Strike Bowling
Superbike
Tennis
The Berenstain Bears in Big Paw's Cave
Tokushu Butai Jackal
Top Gunner
Traverse USA / Zippy Race
Treasure Island
Tugboat
Video Eight Ball
Wall Street
World Tennis
Yankee DO!
Youma Ninpou Chou
Zero Hour

Timings: Try using mme4crt directly

pi@retropie:~ $ ./mme4crt 320 240 60 0 0 2
width : 320
height : 240
freq : 60.000000
shift : 0
super res : 0
mode : 2
pi@retropie:~ $ Powering on HDMI with explicit settings (DMT mode 87)

nothing happens, sadly. guess i'm missing something dumb. probably need to use in conjunction with tvservice

No image with VGA666 using default timings, but these timings works OK.

I'm using a VGA 15 KHz LCD Philips TV, hdmi_timings=320 1 16 30 34 240 1 2 3 22 0 0 0 60 0 6400000 do not work, however hdmi_timings=320 1 10 30 40 240 1 6 5 12 0 0 0 60 0 6400000 1 do work perfect in my Philips monitor.
I just have to try with a real CRT monitor, but I need to combine H-Sync and V-Sync for that.

apt metadata not being updated by setup script

Following directions posted here: https://github.com/xovox/RetroCRT/blob/master/MANUAL.md

To "Update RetroPie":

Run RetroPie Setup from the RetroPie screen in EmulationStation
Option U "Update"
"Yes" to update installed packages
Update underlying OS packages

I was NOT able to do the above. The developer said to report it here and attach these screenshots of the error (this was a CRT Retropie build so excuse the screenshots). I can't really add anything else as I don't really know what this means TBH...

271961723_751944785772121_5121268300169067130_n
271635860_1152737902130243_3168849865248170145_n
271902447_625842125358210_6432303314763722873_n
)

lr-mame2003 tate mode not working

Enabling tate mode in retroarch to rotate vertical games results in the rotated content being scaled in the same viewport as displayed with screen horizontal.

Fix splash screens

This has been broken for a while now. Thankfully, I found a neat little tool & figured out how to use it! I'm so super clever! Look at me! Will any ever actually read this?!

this depends on the xml-twig-tools package

The following is really slow at 2 seconds on my straight 3B, but i can just cache the result so it'll be quick the next time.

xml_grep \
  --text_only \
  "/gameList/game[@id='mspacman']/image" \
  $HOME/RetroPie/roms/fba/gamelist.xml

Tag browser

Enable a way through the text UI to allow people to change their branch

  • switch between beta & main line release

update filesystems to use tmpfs for SD life extension

similar to, but not exactly, this

tmpfs /var/log tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1755 0 0 tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1755 0 0 tmpfs /var/cache/apt tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1755 0 0

RetroTink Ultimate RGB connector outputs horizontally squeezed video

Hi and thank you for this project.

The setup
I have a RetroTink Ultimate connect to a Raspberry Pi 3B+ and the output I use is the 15-pin RGB connector. I use the RGBHV instead of RGBS on the on-board switch, as the VGA to RGB SCART cable I got is not properly syncing the image when set to RGBS. The output is connect to a European PAL TV which properly supports NTSC, I use it with real NTSC hardware. I have updated RetroPie and then RetroCRT, following a reboot.

RetroCRT image: RetroCRT-20200108-rpi3.7z (latest in the time I write this)

The problem
The output video does not fill the screen in any emulated machine horizontally, it has black borders left and right like huge overscan. I tried with the ROMs you have already in your image and I also tried real cartridges with the corresponding ROM. As expected, there is no difference. Attached screenshots are from a NTSC/J SEGA Mega Drive Model 1 and the corresponding emulator. Tested on both SCART enabled, NTSC compatible TVs I have and the behavior is the same.
The output fills the screen when starting up in the intro video and while in the menus.

Configuration files
config.txt
retrocrt.txt

Screenshots

Main menu:
Main menu

RetroCRT Real Hardware
Phantom Gear RetroCRT Phantom Gear MD
Shadow Dancer RetroCRT Shadow Dancer MD
Shadow Dancer RetroCRT Shadow Dancer MD
240p Suite 320x224 Grid RetroCRT 240p Suite 320x224 Grid MD

As you can see there is a noticeable and annoying difference. I wonder if this is not happening on US CRT TVs via Component YPbPr.

Implement option for 1920x224 for uncalibrated sets

multiple users have complained that they're missing huge amounts of the screen on the top and bottom due to poor factory calibration

menu has been added to retrocrt_setup.sh, need to have it configured so everything that adjusts the resolution can read it and behave appropriately

  • RetroCRT.yml
    • new math for retroarch.cfg files
  • retrocrt_setup.sh
    • write /boot/retrocrt/retrocrt.txt
  • scripts/runcommand-onstart.d/50-gen_ra_config.sh
    • new math to center the image
  • scripts/runcommand-onend.d/99-set_screen_resolution.sh
    • not sure

Sega Genesis vs Megadrive Resolutions

I'm not sure, but I think that specifying integer scaling plus only dictating horizontal resolution is the way to go

NTSC: 320x224, 256x224
PAL: 320x240, 256x240

ROM .cfg file mangling

When writing ROM config files, like mspacman.zip.cfg, we should only change lines that we care about & not overwrite the entire file.

  • sed deletes all lines referring to settings we care about
  • we then add our lines with both bc & the if vertical/horizontal statements

Calculate hdmi_timings for Raspberry Pi 4

According to a RetroRGB article the DPI has changed from previous models (source?). In my own tests, I can confirm that video output for Raspberry Pi 4 Model B using the hdmi_timings provided in RetroCRT (RetroCRT3 "Dark Odyssey" Beta (20210617)) boot/config.txt files, that the video output no longer functions properly (black screen).

The original work to get the new hdmi_timings for Lakka appears to be from this forum post. These timings for Lakka are not suitable for EmulationStation in my experience. The resolution is scaled to a large horizontal value for what I'm assuming is pixel perfect scaling, with a matching pixel frequency. If relied on for solely rgui, the interface can be scaled accordingly. EmulationStation in my experience can not scale accordingly.

I found another user also attempting to solve these problems with the Raspberry Pi 4, although using the vga666 hat.

HDMI timings for RetroTink and other hats need to be configured to support Raspberry Pi 4.

I am not sure if anyone is working on this. I'll work on this when possible, although not my area of expertise.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.