Skip to content

Commit 55b10b0

Browse files
author
Duncan
committed
big check in
1 parent b3a1d96 commit 55b10b0

File tree

17,425 files changed

+33172
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

17,425 files changed

+33172
-67
lines changed

LICENSE.txt

Lines changed: 621 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
# Some License Nonsense
2+
3+
RetroCRT :: Utility suite to configure RetroPie for a CRT
4+
5+
Copyright (C) 2019 Duncan Brown (https://github.com/xovox)
6+
7+
This program is free software: you can redistribute it and/or modify
8+
it under the terms of the GNU General Public License as published by
9+
the Free Software Foundation, either version 3 of the License, or
10+
(at your option) any later version.
11+
12+
This program is distributed in the hope that it will be useful,
13+
but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
GNU General Public License for more details.
16+
17+
You should have received a copy of the GNU General Public License
18+
along with this program. If not, see <https://www.gnu.org/licenses/>.
19+
20+
# RetroCRT
21+
22+
Retro gaming with the $FREE [RetroPie](https://retropie.org.uk) Linux OS on a $35 [Raspberry Pi](https://www.raspberrypi.org) is pretty sweet, but instead of an HDTV... wouldn't you rather do it on a 20+ year old CRT?
23+
24+
This project brings the above projects into one easy to swallow integration!
25+
26+
NOTE: All games > 240p aren't currently supported since I'm focused on SD CRTs & progressive video
27+
28+
# Supported Hardware
29+
30+
* [RetroTink Ultimate](http://www.retrotink.com) is a board for the Raspberry Pi that gives you every analog connection you could want, in true 24-bit RGB color!
31+
* Component & RGB work well
32+
* S-Video & composite do not work 100%
33+
34+
# Future Supported Hardware
35+
36+
* Raspberry Pi built-in composite out (untested)
37+
* VGA666 (untested)
38+
39+
# Pre-Built Images
40+
41+
[The release page](https://github.com/xovox/RetroCRT/releases) has any, and all, pre-built images ready to go.
42+
43+
# See it in action!
44+
45+
* Installation: [![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/QwixXT4_c-0/0.jpg)](https://www.youtube.com/watch?v=QwixXT4_c-0)
46+
47+
# What You Get
48+
49+
* Easy installation!
50+
* Pixel-perfect console emulation!
51+
* Pixel-perfect arcade emulation for most games!
52+
* This is achieved with on-load screen resolution changes!
53+
* Automatic rotation for vertical games!
54+
* Installation of CRT Friendly EmulationStation themes!
55+
* No system messages on boot/shutdown/reboot!
56+
* No annoying EmulationStation yellow text!
57+
* 240p test suite roms for several platforms!
58+
* My unbridled enthusiasm about building this project!
59+
60+
## Emulator Compatibility
61+
62+
I'm aiming to cover everything available, but these are the only platforms I've thoroughly tested.
63+
64+
* arcade
65+
* fba
66+
* mame-libretro
67+
* mastersystem
68+
* megadrive
69+
* n64
70+
* neogeo
71+
* nes
72+
* pcengine
73+
* psx
74+
* retropie
75+
* sega32x
76+
* segacd
77+
* snes
78+
* supergrafx
79+
80+
# NTSC vs SECAM & PAL
81+
82+
Sadly, I don't have a SECAM or PAL setup to test everything on, I'll need someone else to do that for me.
83+
84+
# Installation
85+
86+
I'm assuming you're able to SSH in, or have a monitor & keyboard. I typically connect my Pi via Ethernet when I'm first configuring it for ease.
87+
88+
You can also do the initial configuration with a monitor hooked up to HDMI.
89+
90+
* [Enabling SSH](https://www.raspberrypi.org/documentation/remote-access/ssh/) on the official Raspbian docs.
91+
* This is best solved by putting your SD card in another machine and creating an empty file called 'ssh' in the boot partition.
92+
* [Wireless Connectivity](https://www.raspberrypi.org/documentation/configuration/wireless/README.md) is an option, but I prefer wired for simplicity.
93+
* SSH Clients
94+
* [Windows](https://www.raspberrypi.org/documentation/remote-access/ssh/windows.md)
95+
* [Linux & macOS](https://www.raspberrypi.org/documentation/remote-access/ssh/unix.md)
96+
97+
You can cut & paste this into your terminal.
98+
99+
```
100+
cd &&
101+
git clone https://github.com/xovox/RetroCRT &&
102+
cd RetroCRT &&
103+
/bin/bash ./retrocrt_setup.sh
104+
```
105+
106+
# TV Compatibility
107+
108+
## NTSC
109+
110+
| Make | Model | Tested | Issues | Tested By
111+
|------ |------- |-------- |-------- |-----------
112+
| Panasonic | CT-27D10 | Component | None | Duncan
113+
114+
# Troubleshooting
115+
116+
See the [troubleshooting doc](TROUBLESHOOTING.md).
117+
118+
# Tasks
119+
120+
* General
121+
- [ ] Reorganize repo, it grew too organically so things are scattered
122+
- [X] Build vanilla image people can directly write to their SD card
123+
* [Releases](https://github.com/xovox/RetroCRT/releases)
124+
125+
* Rotate Display
126+
- [X] Configured via standard config for RetroCRT.yml
127+
- [ ] Installs es-dev for vertical menuing
128+
- [X] ROM configs set for rotation
129+
- [ ] Template the ROM configs for custom rotation amount
130+
131+
* S-Video Output
132+
133+
This has been tested & we're only getting luma, not chroma. This will hopefully be fixed.
134+
135+
* 480i Output
136+
** I'm not sure that this is even possible, but it'd be great to have high res games working at native resolution
137+
** I've reached out to Mike Chi about this.
138+
139+
* Menuing
140+
Menu won't be named "RetroCRT", but a more generic name for all of the other RetroPie tools I'm working on
141+
- [X] Launched from RetroPie menu
142+
- [X] Updates
143+
- [X] Monitor Orientation
144+
145+
* Templatizing
146+
- [ ] ROM configs should be symlinks to a templated config
147+
148+
* Scripts
149+
- [X] Work well with other RetroPie scripts I'm writing
150+
- [X] Get rid of env, everything should be discrete scripts in $HOME/RetroPie/scripts/ or something
151+
152+
* On Start Script
153+
- [X] Use per-emulator timings
154+
- [X] Use per-game timings
155+
156+
* On End Script
157+
- [X] Revert to boot's hdmi_timings
158+
159+
* Script Installer
160+
- [X] Write installer wrapper
161+
162+
* Ansible Installer
163+
- [X] Create config.txt using template
164+
- [X] Push RetroArch configs
165+
- [X] Limit what systems we play
166+
- [X] Remove notification text on game start
167+
- [X] Install SD friendly ES themes
168+
169+
* Configs
170+
- [X] /boot/config.txt settings figured out
171+
- [X] Custom retroarch config for each rom
172+
173+
* Video
174+
- [X] Collect NTSC timings
175+
- [ ] Collect PAL timings
176+
- [X] Custom hdmi_timings for each rom via runcommand-onstart
177+
178+
# Footnotes
179+
180+
I am not affiliated with Mike Chi & RetroTink.
181+
182+
Shout out to [Vykran](https://github.com/Vykyan/retroTINK-setup) for the initial groundwork, though he seems to be PAL & I'm NTSC... which brought us to where we are now.
183+
184+
```
185+
.
186+
;\
187+
/ \
188+
`. i ,^^--.
189+
___ i \ / \ ,',^-_
190+
/ \ ! \ | | / / /
191+
\ / \ \ | ; ,__. | ,'
192+
4 | \ `. | / ( ` __>
193+
,_| |_. \ `-__> >. `---'\ /
194+
/,. ..\ `. `. | |
195+
U | | U `. \ ,--~ ~--.
196+
--~~~~--_ _--~~~~--_ _--~~~~--_ _--~~~~--_ \ _--~~~~--_ \ /_--~~~~--_ \
197+
`. ,' `. ,' `. ,' `. |,' `. \,' `.
198+
\ / \ / \ / \ / \ / \
199+
```
200+
201+
| |

RetroCRT.yml

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
---
2+
3+
##############################################################################
4+
# This file is part of RetroCRT (https://github.com/xovox/RetroCRT)
5+
#
6+
# RetroCRT is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# RetroCRT is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with RetroCRT. If not, see <https://www.gnu.org/licenses/>.
18+
##############################################################################
19+
20+
- hosts: "all"
21+
connection: "local"
22+
become: "yes"
23+
become_user: "root"
24+
25+
pre_tasks:
26+
27+
- name: "Reading Configs"
28+
set_fact:
29+
tv_region: "{{ lookup('env', 'tv_region') }}"
30+
retrocrt_timings: "{{ lookup('env', 'retrocrt_timings') }}"
31+
rotate_tv: "{{ lookup('env', 'rotate_tv') }}"
32+
rotate_es: "{{ lookup('env', 'rotate_es') }}"
33+
rotate_ra: "{{ lookup('env', 'rotate_ra') }}"
34+
segasixteen: "{{ lookup('env', 'segasixteen') }}"
35+
necsixteen: "{{ lookup('env', 'necsixteen') }}"
36+
37+
- name: "Set Default Timings"
38+
set_fact:
39+
default_timings: "{{ lookup('file', '{{ retrocrt_timings }}/default') }}"
40+
41+
# - name: "Are we NTSC"
42+
# set_fact:
43+
# segasixteen: "genesis"
44+
# segasixteenfull: "Genesis"
45+
# when: tv_region == "ntsc"
46+
47+
# - name: "Are we PAL"
48+
# set_fact:
49+
# segasixteen: "megadrive"
50+
# segasixteenfull: "Mega Drive"
51+
# when: tv_region == "pal"
52+
53+
- name: "Find / UUID"
54+
command: "findmnt --noheadings --output PARTUUID /"
55+
register: root_uuid
56+
57+
- name: "Find / Filesystem Type"
58+
command: "findmnt --noheadings --output FSTYPE /"
59+
register: root_fstype
60+
61+
tasks:
62+
63+
# vfat doesn't like the standard Ansible backup extension
64+
- name: "Backup /boot Configs"
65+
copy:
66+
src: "/boot/{{ item }}"
67+
dest: "/boot/{{ item }}.{{ ansible_date_time.epoch }}"
68+
with_items:
69+
- "cmdline.txt"
70+
- "config.txt"
71+
72+
- name: "Update /boot Configs"
73+
template:
74+
src: "templates/{{ item }}.j2"
75+
dest: "/boot/{{ item }}"
76+
with_items:
77+
- "cmdline.txt"
78+
- "config.txt"
79+
80+
- name: "Update EmulationStation Startup"
81+
template:
82+
src: "templates/autostart.sh.j2"
83+
dest: "/opt/retropie/configs/all/autostart.sh"
84+
85+
- name: "Create Menu Item"
86+
copy:
87+
src: "bin/RetroCRT.sh"
88+
dest: "/home/pi/RetroPie/retropiemenu/RetroCRT.sh"
89+
mode: 0755
90+
owner: "pi"
91+
group: "pi"
92+
93+
- name: "EmulationStation Systems List"
94+
template:
95+
src: "templates/es_systems.cfg.j2"
96+
dest: "/etc/emulationstation/es_systems.cfg"
97+
backup: "yes"
98+
owner: "root"
99+
group: "root"
100+
mode: 644
101+
102+
- name: "Copy RetroArch Configs"
103+
synchronize:
104+
src: "configs/retropie/"
105+
dest: "/opt/retropie/configs/"
106+
rsync_opts:
107+
- "--backup"
108+
- "--suffix .{{ansible_date_time.epoch}}"
109+
110+
- name: "Copy RetroArch ROM Configs"
111+
synchronize:
112+
src: "configs/roms/"
113+
dest: '/home/pi/RetroPie/roms/{{ item }}'
114+
rsync_opts:
115+
- "--backup"
116+
- "--suffix .{{ansible_date_time.epoch}}"
117+
with_items:
118+
- "arcade"
119+
- "fba"
120+
- "mame-libretro"
121+
- "mame-mame4all"
122+
123+
- name: "Disable RetroArch Notifications"
124+
lineinfile:
125+
dest: "/opt/retropie/configs/all/retroarch.cfg"
126+
backup: "yes"
127+
regexp: '^video_font_enable ='
128+
line: 'video_font_enable = "false"'
129+
130+
- name: "Fix Permissions"
131+
file:
132+
path: "{{ item }}"
133+
state: "directory"
134+
owner: "pi"
135+
group: "pi"
136+
recurse: "yes"
137+
with_items:
138+
- "/opt/retropie"
139+
- "/home/pi"
140+
141+
- name: "Install 240p Test Suite ROMs & ISOs"
142+
synchronize:
143+
src: "files/roms/"
144+
dest: "/home/pi/RetroPie/roms/"
145+
rsync_opts:
146+
- "--exclude README.md"
147+
148+
- name: "Download Theme: Freeplay"
149+
git:
150+
repo: "https://github.com/rxbrad/es-theme-freeplay"
151+
dest: "/etc/emulationstation/themes/Freeplay"
152+
153+
- name: "Download Theme: GBZ35"
154+
git:
155+
repo: "https://github.com/rxbrad/es-theme-gbz35"
156+
dest: "/etc/emulationstation/themes/GBZ35"
157+
158+
- name: "Download Theme: GBZ35 Dark"
159+
git:
160+
repo: "https://github.com/rxbrad/es-theme-gbz35-dark"
161+
dest: "/etc/emulationstation/themes/GBZ35-Dark"
162+
163+
- name: "Download Theme: TFT"
164+
git:
165+
repo: "https://github.com/anthonycaccese/es-theme-tft"
166+
dest: "/etc/emulationstation/themes/TFT"
167+
168+
- name: "Download Theme: Picade"
169+
git:
170+
repo: "https://github.com/anthonycaccese/es-theme-picade"
171+
dest: "/etc/emulationstation/themes/Picade"
172+
173+
- name: "Download Theme: Bubblegum"
174+
git:
175+
repo: "https://github.com/xovox/es-theme-bubblegum"
176+
dest: "/etc/emulationstation/themes/Bubblegum"
177+
178+
- name: "Download Theme: Honey"
179+
git:
180+
repo: "https://github.com/xovox/es-theme-honey"
181+
dest: "/etc/emulationstation/themes/Honey"

TROUBLESHOOTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Video Issues
2+
3+
## Image is too wide
4+
5+
You're not changing the horizontal resolution before starting the emulator, this is an issue with the /opt/retropie/configs/all/runcommand-onstart.sh script.
6+
7+
## Image is too narrow
8+
9+
RetroArch is ignoring our custom_viewport_width setting, and probably the height as well. This happens when you run the RetroPie updater.
10+
11+
# Sound Issues
12+
13+
## No Sound
14+
15+
You don't have audio set to go out the 3.5mm jack. This is set in RetroCRT's config.txt, it must have been overwritten.

0 commit comments

Comments
 (0)