Skip to content

ZFEbHVUE/Batocera-CRT-Script

Repository files navigation

๐Ÿš€ Installation Instructions

โš ๏ธ Before you proceed with installation, please make sure your hardware is supported.
Check the ๐Ÿ’ป Hardware Compatibility list to confirm that your dGPU, APU, and setup are compatible with the CRT Script.
Attempting to install on unsupported hardware may result in display issues or failure to output a proper CRT signal.

๐Ÿ“š Full Documentation
Read the Wiki for detailed usage and configuration:
๐Ÿ”— Batocera-CRT-Script Wiki

โžก๏ธ Using a PC CRT Monitor?
If you are setting up Batocera with a PC CRT (31 kHz VGA/SVGA), follow this guide instead of the full 15 kHz workflow:
๐Ÿ”— PC CRT's & Setup Instructions

๐Ÿ“ฅ Install the Script
Follow the full setup guide here:
๐Ÿ”— Installation Instructions

๐Ÿ’ฌ Need Help?
Join the discussion on Discord:
๐Ÿ”— Discord: ##crt-x86_64


๐Ÿ“ Foreword

This project would not have been possible without the help of many skilled and passionate individuals:

๐Ÿ‘จโ€๐Ÿ’ป Core Developers & Contributors

  • ZFEbHVUE โ€“ Lead developer and main tester
  • Rion โ€“ CRT wizard and 15kHz support guru
  • myzar โ€“ NVIDIA driver and compatibility insights
  • jfroco โ€“ Early CRT output work for Batocera
  • rtissera โ€“ His knowledge, enthusiasm, and willingness made it possible to add 15kHz patches into Batocera
  • Substring โ€“ Maintainer of GroovyArcade and KMS/SDL improvements
  • Calamity โ€“ Develops and maintains the 15kHz Linux kernel patches, adding support for new AMD dGPUs/APUs and creating tools like CRT_EmuDriver, GroovyMAME, and Switchres
  • D0023R (Doozer) โ€“ Maintains the linux_kernel_15khz repository, ensuring Calamityโ€™s patches stay up-to-date with the latest Linux kernel versions
  • dmanlcf โ€“ Maintains 15kHz kernel patches for Batocera

๐Ÿ‘ฅ Contributors

  • Sirmagb โ€“ Geometry tool idea used in crt.sh
  • Yavimaya โ€“ Code contributions
  • fishcu โ€“ Shader author for pixel_aa_xform.slangp and box_filter_aa_xform.slangp

๐Ÿงช Testers

  • GecKoTDF โ€“ Hands-on CRT hardware testing
  • Sirmagb โ€“ Continued validation and feedback

๐ŸŽจ Special Thanks

  • krahsdevil โ€“ Created EmulationStation artwork and assets

๐Ÿ“– Wiki Readers & Fact Checkers

  • MarcoRetro โ€“ Provided key insights on RGB mod behavior and adapter compatibility

๐Ÿ–ฅ๏ธ CRT Setup Script Overview

This Bash script enables true CRT support in Batocera, including 15kHz, 25kHz, and 31kHz video output.
Batocera does not natively support CRT displays โ€” this script adds the full support needed for proper signal generation and resolution switching.


โœ… Key Features

  • ๐Ÿ•น๏ธ RetroArch (Libretro cores) and GroovyMAME are preconfigured to use the Switchres API for automatic resolution switching.

  • ๐Ÿ” Modeline Switching
    Fully integrates the Switchres tool (not the API) to handle resolution switching โ€” bypassing xrandr.

  • ๐Ÿง  EDID & APU Detection

    • Automatically detects AMD APUs when using the CableDeconn DP2VGA (listed on the Batocera Wiki).
    • Generates a custom EDID based on your selected monitor profile.
  • ๐Ÿ“ videomodes.conf Integration
    Resolutions are read from videomodes.conf, but Switchres handles switching, not xrandr.
    You may manually add resolutions, but be sure to test them with your monitor profile first.


โš ๏ธ Note on 320ร—240 Boot Resolution

320x240p as a boot resolution is not officially supported,
as EmulationStation themes do not currently support it in Batocera.


๐Ÿ–ผ๏ธ Monitor Profiles & Preconfigured Resolutions

  • Comes with 29 pre-configured monitor profiles supported by Switchres.

  • Each profile includes 50+ hand-picked resolutions, optimized for:

    • ๐ŸŽฎ Standalone Emulators (e.g., PCSX2, Dolphin)
    • ๐Ÿง Native Linux Games
    • ๐Ÿ“ฆ Non-Libretro Ports
    • ๐Ÿท Wine, Flatpak & Steam Games

๐Ÿ•น๏ธ RetroArch (Libretro cores) and GroovyMAME are preconfigured to use the Switchres API for automatic resolution switching.

๐Ÿ–ฅ๏ธ Monitor Profile Overview

These are the supported monitor profiles used in switchres.ini.
Each profile defines timings optimized for a specific CRT standard, arcade monitor, or PC display.


๐ŸŽฎ Generic CRT Standards (15kHz)

Profile Description
arcade_15 โœ… Recommended for most consumer CRT TVs โ€” safe and widely compatible
generic_15 โœ… Recommended fallback for general CRT use
ntsc Only for CRT chassis that support 59.94Hz only (rare)
pal Only for CRT chassis that support 50.00Hz only (rare)

๐Ÿ•น๏ธ Arcade CRT Profiles

Category Profile Names Notes
Fixed Frequency (15kHz) arcade_15, arcade_15ex Common for arcade cabinets using 15kHz monitors
Fixed Frequency (25/31kHz) arcade_25, arcade_31 Used for mid- and high-res arcade monitors
Multisync (15/25/31kHz) arcade_15_25, arcade_15_31, arcade_15_25_31 For multisync arcade monitors supporting all bands

๐Ÿ–ฅ๏ธ VESA & PC Monitor Profiles

Category Profile Names Notes
VESA GTF Modes vesa_480, vesa_600, vesa_768, vesa_1024 Mimics standard VESA timings
120Hz PC Modes pc_31_120, pc_70_120 For PC CRT monitors capable of 120Hz

๐Ÿงฐ Manufacturer-Specific Arcade Monitors

Manufacturer Models (Profile Names)
Hantarex h9110, polo, pstar
Wells Gardner k7000, k7131, d9200, d9400, d9800
Makvision m2929
Wei-Ya m3129
Nanao ms2930, ms929
Rodotron r666b

๐Ÿ”Ž More Info

โ— GPU Compatibility for CRT Output (15kHz)

Batocera's CRT output depends heavily on the GPU and driver capabilities. Here's what works โ€” and what doesnโ€™t โ€” for 15.7 kHz (240p/480i) video signals.


โœ… AMD GPUs โ€“ Recommended

Batocera includes the 15kHz kernel patchset, which enables full support for:

  • Low-resolution video modes (e.g. 320ร—240, 640ร—480i)
  • Custom modelines
  • Interlaced output
  • 15.7 kHz scanrates

This applies to both:

  • amdgpu and radeon drivers
  • Discrete GPUs (dGPUs) and APUs

๐Ÿ”— A curated list of supported AMD dGPUs and APUs using the AMDGPU driver is available in the wiki:
โžก๏ธ Supported dGPUs & APUs


โŒ Intel iGPUs โ€“ Not Supported

All Intel integrated GPUs โ€” across all generations โ€” are not compatible with CRT output at 15kHz due to hardcoded limitations in the Intel DRM driver (i915):

  • ๐Ÿšซ Minimum dotclock limits (~25 MHz), 15kHz video modes
  • ๐Ÿšซ Strict CVT/GTF-only modeline validation (non-EDID custom modelines are rejected)
  • ๐Ÿšซ No legacy CRTC interfaces for timing control
  • ๐Ÿšซ Tightly restricted DPLL clock generation
  • ๐Ÿšซ EDID dependency, which prevents unsupported resolutions from loading

โ— These are hardware and driver-level constraints, not solvable with 15kHz patches. Intel iGPUs are not supported for CRT output in Batocera.

Recommendation: Use a supported AMD GPU or APU instead.


โš ๏ธ NVIDIA GPUs โ€“ Limited and Fragile Support

โœ… Maxwell (1.0 โ€“ 2.0) via proprietary drivers

Batocera supports NVIDIA Maxwell architecture (GeForce GTX 750 through GTX 900 series) only with the official NVIDIA proprietary drivers for 15kHz CRT output.

โ„น๏ธ This is the only NVIDIA setup officially supported, and it works by chance โ€” not by design.
There is no guarantee future NVIDIA driver updates will preserve this compatibility.

๐Ÿ”— A curated list of supported NVIDIA Maxwell architecture is available in the wiki:
โžก๏ธ Supported NVIDIA Maxwell Cards

โš ๏ธ Older cards using open-source nouveau

Some NVIDIA GPUs (pre-Maxwell) may appear to work with CRT output using the open-source nouveau driver, but:

  • There is no support from the 15kHz patchset
  • Success is inconsistent, and varies by card/BIOS.

๐Ÿ”ง These cards are not recommended, and any success is coincidental.

Recommendation: Go with AMD for proper CRT support and future-proofing. We only provide official support for NVIDIA Maxwell cards using proprietary drivers, and even that may break at any time.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published