sega-saturn-gamedev-baremetal

Compile C++ programs for Sega Saturn with a custom SH2 cross-compiler toolchain.

1|Updated Jan 17, 2026
One-click install
npx skills add https://github.com/celsowm/libsaturn --skill sega-saturn-gamedev-baremetal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sega-saturn-gamedev-baremetal
Source: https://github.com/celsowm/libsaturn/tree/main/.SKILLS/sega-saturn-gamedev
Command: npx skills add https://github.com/celsowm/libsaturn --skill sega-saturn-gamedev-baremetal

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill empowers developers to create Sega Saturn games and tools using a completely bare-metal approach, bypassing external SDKs like SGL or libyaul for maximum control and performance.

Core Features & Use Cases

  • Full Bare-Metal Control: Compile your own cross-compiler, write custom startup code (crt0.s), and define your own linker scripts for precise memory management.
  • Direct Hardware Access: Interact directly with Sega Saturn hardware components like VDP1, VDP2, SCU, and SMPC via C++ and inline SH2 assembly.
  • Optimized Math & 3D: Utilize fixed-point math, vector operations, and matrix transformations for efficient 3D rendering without relying on floating-point performance penalties.
  • Use Case: Develop a custom 2D or 3D game engine, a low-level graphics library, or a homebrew application for the Sega Saturn, gaining deep insights into its architecture.

Quick Start

Use the sega-saturn-gamedev-baremetal skill to compile a simple Saturn C++ program using the provided toolchain and linker script.

Frequently Asked Questions about sega-saturn-gamedev-baremetal

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I develop Sega Saturn games in bare-metal C++ without an SDK?

You develop Sega Saturn games in bare-metal C++ by compiling a custom SH2 cross-compiler toolchain and writing custom startup code with linker scripts. This approach bypasses external SDKs like SGL or libyaul, using direct hardware access APIs for maximum control and performance.

How do I access VDP1 and VDP2 hardware components directly in C++?

You access VDP1 and VDP2 directly in C++ using provided C++ abstractions and inline SH2 assembly. This enables direct interaction with hardware components like SCU and SMPC for creating custom game engines and low-level graphics libraries.

What is the best way to handle 3D math on Sega Saturn hardware?

The best way to handle 3D math on Sega Saturn is by utilizing optimized fixed-point math routines. This approach uses vector operations and matrix transformations for efficient rendering, avoiding the performance penalties associated with floating-point operations on the hardware.

Can I build a custom game engine for the Sega Saturn using this bare-metal approach?

Yes, you can build a custom game engine for the Sega Saturn using this bare-metal approach. The Skill provides C++ abstractions for VDP1, VDP2, SCU, and SMPC, along with optimized math routines, enabling the creation of custom 2D or 3D game engines and homebrew applications.

How do I compile a Sega Saturn ISO image with custom startup code?

To compile a Sega Saturn ISO image with custom startup code, you use the provided custom SH2 cross-compiler toolchain alongside your own `crt0.s` file and linker scripts. This setup facilitates building ISO images with precise control over memory management.

Why bypass SGL or libyaul for Sega Saturn homebrew development?

Bypassing SGL or libyaul for Sega Saturn homebrew development grants full bare-metal control for maximum performance. Writing custom startup code and interacting directly with hardware components like VDP1 and VDP2 provides deep insights into the console's architecture.