<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dreamcast.wiki/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=SiZiOUS</id>
	<title>dreamcast.wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://dreamcast.wiki/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=SiZiOUS"/>
	<link rel="alternate" type="text/html" href="https://dreamcast.wiki/Special:Contributions/SiZiOUS"/>
	<updated>2026-04-05T14:45:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://dreamcast.wiki/wiki/index.php?title=Using_Ruby_for_Sega_Dreamcast_development&amp;diff=3807</id>
		<title>Using Ruby for Sega Dreamcast development</title>
		<link rel="alternate" type="text/html" href="https://dreamcast.wiki/wiki/index.php?title=Using_Ruby_for_Sega_Dreamcast_development&amp;diff=3807"/>
		<updated>2025-08-07T21:09:50Z</updated>

		<summary type="html">&lt;p&gt;SiZiOUS: Major upgrade as mruby is now officially supported as kos-port.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to develop in [https://www.ruby-lang.org Ruby] for the Sega Dreamcast system using the [https://mruby.org/ mruby implementation]. This support was originally introduced by [[Yuji Yokoo]] in 2019.&lt;br /&gt;
&lt;br /&gt;
Like most Sega Dreamcast software, this project uses [[KallistiOS]] (KOS) as its base.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Debugging support has not been tested as of 2025.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* A working [[KallistiOS]] environment must be set up, including all necessary dependencies for building KallistiOS;&lt;br /&gt;
* You must build the [[KallistiOS]] library;&lt;br /&gt;
* You must have both &#039;&#039;ruby&#039;&#039; and &#039;&#039;bison&#039;&#039; installed (see the sections below).&lt;br /&gt;
&lt;br /&gt;
=== Installing prerequisites on Cygwin ===&lt;br /&gt;
&lt;br /&gt;
Launch the Cygwin setup utility, search for the &#039;&#039;ruby&#039;&#039; and &#039;&#039;bison&#039;&#039; packages, and install them.&lt;br /&gt;
&lt;br /&gt;
=== Installing prerequisites on DreamSDK ===&lt;br /&gt;
&lt;br /&gt;
Depending on the underlying environment installed with [[DreamSDK]], there are 2 possible cases:&lt;br /&gt;
&lt;br /&gt;
==== If you are using the modern MinGW-w64/MSYS2 foundation ====  &lt;br /&gt;
&lt;br /&gt;
No additional prerequisites are required — both Ruby and Bison are already preinstalled.&lt;br /&gt;
&lt;br /&gt;
==== If you are using the legacy MinGW/MSYS foundation ====&lt;br /&gt;
&lt;br /&gt;
Install manually the prerequisites:&lt;br /&gt;
* Install [https://rubyinstaller.org/ RubyInstaller], and ensure that the &#039;&#039;ruby&#039;&#039; command is available in your system &#039;&#039;PATH&#039;&#039;;&lt;br /&gt;
* Use the &#039;&#039;&#039;MinGW Installation Manager&#039;&#039;&#039; to install the &#039;&#039;msys-bison-bin&#039;&#039; package.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If you are using DreamSDK on Windows XP, you should install Ruby version 2.0.0 from [https://rubyinstaller.org/ RubyInstaller], as it is the last version compatible with that operating system.&lt;br /&gt;
&lt;br /&gt;
=== Installing prerequisites on GNU/Linux ===&lt;br /&gt;
&lt;br /&gt;
Use your distribution’s package manager to install the &#039;&#039;ruby&#039;&#039; and &#039;&#039;bison&#039;&#039; packages (e.g., run &#039;&#039;apt install ruby bison&#039;&#039; on Debian/Ubuntu).&lt;br /&gt;
&lt;br /&gt;
=== Installing prerequisites on macOS ===&lt;br /&gt;
&lt;br /&gt;
Install the &#039;&#039;ruby&#039;&#039; and &#039;&#039;bison&#039;&#039; packages using your preferred package manager (e.g., &#039;&#039;brew&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
=== Installing prerequisites on MinGW-w64/MSYS2 ===&lt;br /&gt;
&lt;br /&gt;
Run the following command in the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
 pacman -S ruby bison&lt;br /&gt;
&lt;br /&gt;
== Setting up mruby ==&lt;br /&gt;
&lt;br /&gt;
The recommended way to use mruby on Dreamcast is to install the &#039;&#039;&#039;mruby&#039;&#039;&#039; port from the [https://github.com/KallistiOS/kos-ports KallistiOS Ports repository].&lt;br /&gt;
&lt;br /&gt;
First of all, make sure to clone the kos-ports repository:&lt;br /&gt;
 cd /opt/toolchains/dc&lt;br /&gt;
 git clone https://github.com/KallistiOS/kos-ports.git .&lt;br /&gt;
&lt;br /&gt;
Then, run the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd /opt/toolchains/dc/kos-ports/mruby&lt;br /&gt;
 make install clean&lt;br /&gt;
&lt;br /&gt;
This will build the embedded mruby library (&#039;&#039;libmruby.a&#039;&#039;) along with the required host tools (mainly &#039;&#039;/opt/toolchains/dc/bin/mrbc&#039;&#039;) for the Dreamcast platform.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The configuration file is stored in &#039;&#039;build_config/dreamcast_shelf.rb&#039;&#039; in the [https://github.com/mruby/mruby mruby] official repository.&lt;br /&gt;
&lt;br /&gt;
== Using mruby in a Sega Dreamcast project ==&lt;br /&gt;
&lt;br /&gt;
Two example projects are included with [[KallistiOS]] in the &#039;&#039;/examples/dreamcast/mruby&#039;&#039; directory:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;dreampresent&#039;&#039;&#039; – A simple presentation tool (this needs the &#039;&#039;libpng&#039;&#039; port as well);&lt;br /&gt;
* &#039;&#039;&#039;mrbtris&#039;&#039;&#039; – A sample game.&lt;br /&gt;
&lt;br /&gt;
These examples were originally developed by [[Yuji Yokoo]] and correspond to the earlier stand-alone repositories. You can build them using the standard &#039;&#039;make&#039;&#039; command (assuming &#039;&#039;&#039;mruby&#039;&#039;&#039; and any additional required ports are properly installed via kos-ports).&lt;/div&gt;</summary>
		<author><name>SiZiOUS</name></author>
	</entry>
</feed>