<?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=Voxel</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=Voxel"/>
	<link rel="alternate" type="text/html" href="https://dreamcast.wiki/Special:Contributions/Voxel"/>
	<updated>2026-05-12T21:24:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://dreamcast.wiki/wiki/index.php?title=Engine_%26_Library&amp;diff=3622</id>
		<title>Engine &amp; Library</title>
		<link rel="alternate" type="text/html" href="https://dreamcast.wiki/wiki/index.php?title=Engine_%26_Library&amp;diff=3622"/>
		<updated>2024-09-25T09:08:01Z</updated>

		<summary type="html">&lt;p&gt;Voxel: fix urls for LMP3D, gldc&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This list is an adaptation of the [https://github.com/dreamcastdevs/awesome-dreamcast awesome-dreamcast] repo on github.&lt;br /&gt;
&lt;br /&gt;
==Tutorial==&lt;br /&gt;
*[https://dreamcast.wiki Dreamcast.wiki] - A brand new wiki with up-to-date information about the Dreamcast.&lt;br /&gt;
*[https://dcemulation.org/index.php?title=Development DCEmu Developement Wiki] - Great resource to start. Somewhat incomplete in certain aspect.&lt;br /&gt;
*[https://github.com/dreamcastdevs/dreamcast_tutorial Dreamcast-tutorial Github] - A new-ish sets of tutorial with code example. Covers the basic (installing the toolchain, graphics, audio, controller)&lt;br /&gt;
&lt;br /&gt;
==Framework==&lt;br /&gt;
*[https://sourceforge.net/projects/cadcdev/ KOS] - The pseudo-OS that&#039;s been used in a lot of homebrew/indie.&lt;br /&gt;
*[https://www.dreamsdk.org DreamSDK] - A multitool environment made for Windows. Maintained by [SiZiOUS](User:SiZiOUS)&lt;br /&gt;
*[http://wiki.bennugd.org/index.php?title=Bennu_Wiki BennuGD] - A multi-platform engine&lt;br /&gt;
*[https://github.com/FaucetDC/WincastCE WincastCE] - An experimental windows CE shell (?)&lt;br /&gt;
*[https://github.com/DC-SWAT/DreamShell DreamShell] - The popular alternative operating system for loading games/app from SD Card and IDE Drive&lt;br /&gt;
*[[libronin]] - an independent development library created by the DreamSNES team&lt;br /&gt;
&lt;br /&gt;
==Engine==&lt;br /&gt;
*[[Simulant]] - A general purpose 2D-3D engine in active developement.&lt;br /&gt;
*[[nuQuake]] - Quake engine by MrNeo240&lt;br /&gt;
*[[RADquake]] - Quake engine by Ian Micheal&lt;br /&gt;
*[https://github.com/ianmicheal/Dreambor6.0 DreamBOR - unofficial] - OpenBOR dreamcast port forked an improved by Ian Michael&lt;br /&gt;
*[https://github.com/CaptainDreamcast/DolmexicaInfinite DolmexicaInfinite] - A Mugen-like engine for fighter games&lt;br /&gt;
*[[Antiruins]] - Minimal 2D game engine with Lua scripting by Lerabot.&lt;br /&gt;
&lt;br /&gt;
==Graphics==&lt;br /&gt;
*[https://gitlab.com/simulant/GLdc GLdc] - A OpenGL 1.2 implementation started by Kazade&lt;br /&gt;
*[https://github.com/Kannagi/LMP3D LMP3D] - A multi-platform 3D Lib. (*Looks abandoned but might be good for research*)&lt;br /&gt;
*[https://github.com/multimediamike/dreamroq DreamROQ] - A ROQ video player. (*Stable, no sound*)&lt;br /&gt;
&lt;br /&gt;
==Audio==&lt;br /&gt;
*[https://gitlab.com/simulant/ALdc ALdc] - A OpenAL 1.2 implementation started by Kazade&lt;br /&gt;
*https://github.com/Aurelien34/DreamcastAicaSoundDriver - A hardware accelerated S3M and sfx AICA driver.&lt;br /&gt;
&lt;br /&gt;
==VMU==&lt;br /&gt;
*[https://github.com/Protofall/Crayon-Utilities CrayonUtil] - Mostly tools for VMU icons, but also some texture converters. Made by [Protofall](https://github.com/Protofall)&lt;br /&gt;
&lt;br /&gt;
==Utilities==&lt;br /&gt;
*[https://github.com/CaptainDreamcast/prism Prism] - CaptainDreamcast&#039;s set of utilities for Physics, files loading, etc. (*untested*)&lt;br /&gt;
&lt;br /&gt;
==Memory Management==&lt;br /&gt;
&lt;br /&gt;
==Debugging==&lt;br /&gt;
&lt;br /&gt;
==Random==&lt;br /&gt;
*[https://github.com/Protofall/Homebrew-Tests Homebrew Tests (Protofall)]&lt;/div&gt;</summary>
		<author><name>Voxel</name></author>
	</entry>
	<entry>
		<id>https://dreamcast.wiki/wiki/index.php?title=Visual_Studio_Code&amp;diff=3618</id>
		<title>Visual Studio Code</title>
		<link rel="alternate" type="text/html" href="https://dreamcast.wiki/wiki/index.php?title=Visual_Studio_Code&amp;diff=3618"/>
		<updated>2024-09-21T07:09:12Z</updated>

		<summary type="html">&lt;p&gt;Voxel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a guide to setup your [https://code.visualstudio.com/ Visual Studio Code] project with debugging support on both on a real Dreamcast and with an emulator.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
To start with, this tutorial makes the following assumptions:&lt;br /&gt;
* You have already installed and [https://dreamcast.wiki/Getting_Started_with_Dreamcast_development set up your KallistiOS development environment]]&lt;br /&gt;
# if you want to be able to debug, be sure to compile gdb as specified on that page&lt;br /&gt;
* You have already downloaded and installed [https://code.visualstudio.com/ Visual Studio Code] (version 1.78.2 was used for this tutorial)&lt;br /&gt;
&lt;br /&gt;
== VSCode Setup ==&lt;br /&gt;
* Launch Visual Studio Code&lt;br /&gt;
* (optional but recommended) To keep your configuration settings, plugins, ... specific to Dreamcast projects only:&lt;br /&gt;
# Create a &amp;quot;Profile&amp;quot; (Menu: File-Preferences-Profiles) called &amp;quot;Dreamcast&amp;quot;&lt;br /&gt;
* Install the following extensions: (Menu: View-Extensions)&lt;br /&gt;
# Required:&lt;br /&gt;
## [https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools C/C++] from Microsoft&lt;br /&gt;
# Required only if you are using WSL (Windows Subsystem for Linux):&lt;br /&gt;
## [https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl WSL from Microsoft]&lt;br /&gt;
# (Not recommended at this moment:)&lt;br /&gt;
## ([https://marketplace.visualstudio.com/items?itemName=ms-vscode.makefile-tools Makefile Tools] from Microsoft: the current version (June 2023) is not really adapted for remote debugging)&lt;br /&gt;
&lt;br /&gt;
== Setup per Project ==&lt;br /&gt;
&lt;br /&gt;
=== Compilation ===&lt;br /&gt;
==== Preparation ====&lt;br /&gt;
(all the following steps happen in Visual Studio Code)&lt;br /&gt;
# Open the folder containing your project - eg: /opt/toolchains/dc/kos/examples/dreamcast/2ndmix:&lt;br /&gt;
##If you are using WSL:&lt;br /&gt;
###&amp;quot;F1&amp;quot; - &amp;quot;Connect To WSL&amp;quot;&lt;br /&gt;
##Menu: File-Open Folder...&lt;br /&gt;
# (if you are using Profiles) Make sure that the &amp;quot;Dreamcast&amp;quot; profile is selected (Menu: File-Preferences-Profiles)&lt;br /&gt;
#If you are using WSL, check that the C/C++ extension is correctly installed for WSL - if you get a warning like &amp;quot;install in WSL: Ubuntu&amp;quot;, do so.&lt;br /&gt;
# Create a new subfolder &amp;quot;.vscode&amp;quot;&lt;br /&gt;
# insert the following files in the &#039;&#039;&#039;&amp;quot;.vscode&amp;quot; subfolder&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;kos_environ.sh&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#set the KOS environtment variables&lt;br /&gt;
source /opt/toolchains/dc/kos/environ.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;kos_make.sh&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#set the KOS environtment variables&lt;br /&gt;
source /opt/toolchains/dc/kos/environ.sh&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;settings.json&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;C_Cpp.default.includePath&amp;quot;: [&lt;br /&gt;
        &amp;quot;${workspaceFolder}/**&amp;quot;,&lt;br /&gt;
        &amp;quot;/opt/toolchains/dc/kos/include/**&amp;quot;,&lt;br /&gt;
        &amp;quot;/opt/toolchains/dc/kos/kernel/arch/dreamcast/include/**&amp;quot;,&lt;br /&gt;
        &amp;quot;/opt/toolchains/dc/kos/addons/include/**&amp;quot;,&lt;br /&gt;
        &amp;quot;/opt/toolchains/dc/kos-ports/include/**&amp;quot;,&lt;br /&gt;
        &amp;quot;/opt/toolchains/dc/kos-ports/*/include/**&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;C_Cpp.default.defines&amp;quot;: [&lt;br /&gt;
            &amp;quot;_arch_dreamcast&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;C_Cpp.default.compilerPath&amp;quot;: &amp;quot;/opt/toolchains/dc/sh-elf/bin/sh-elf-gcc&amp;quot;,&lt;br /&gt;
    &amp;quot;C_Cpp.default.cStandard&amp;quot;: &amp;quot;c11&amp;quot;,&lt;br /&gt;
    &amp;quot;C_Cpp.default.cppStandard&amp;quot;: &amp;quot;c++17&amp;quot;,&lt;br /&gt;
    &amp;quot;C_Cpp.default.intelliSenseMode&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;terminal.integrated.defaultProfile.linux&amp;quot;: &amp;quot;kos-bash&amp;quot;,&lt;br /&gt;
    &amp;quot;terminal.integrated.profiles.linux&amp;quot;: {&lt;br /&gt;
        &amp;quot;kos-bash&amp;quot;: {&lt;br /&gt;
            &amp;quot;path&amp;quot;: &amp;quot;/usr/bin/bash&amp;quot;,&lt;br /&gt;
            &amp;quot;args&amp;quot;: [&amp;quot;--init-file&amp;quot;, &amp;quot;${workspaceFolder}/.vscode/kos_environ.sh&amp;quot; ],&lt;br /&gt;
            &amp;quot;overrideName&amp;quot;: true&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(TODO: to be tested for Mac/OSX: probably needs the 2 lines terminal.integrated.*.linux replaced with terminal.integrated.*.osx)&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;tasks.json&#039;&#039;&#039; &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;version&amp;quot;: &amp;quot;2.0.0&amp;quot;,&lt;br /&gt;
    &amp;quot;tasks&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Build&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;process&amp;quot;,&lt;br /&gt;
            &amp;quot;command&amp;quot;: &amp;quot;bash&amp;quot;,&lt;br /&gt;
            &amp;quot;args&amp;quot;: [&lt;br /&gt;
                &amp;quot;--init-file&amp;quot;, &amp;quot;${workspaceFolder}/.vscode/kos_make.sh&amp;quot;&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;group&amp;quot;: {&lt;br /&gt;
                &amp;quot;kind&amp;quot;: &amp;quot;build&amp;quot;,&lt;br /&gt;
                &amp;quot;isDefault&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
        },&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result should look like this:&lt;br /&gt;
{|&lt;br /&gt;
| [[File:Vscode cfg files.png|thumb]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
At this point, you should be able to compile applications for the Dreamcast!&lt;br /&gt;
&lt;br /&gt;
==== Compilation ====&lt;br /&gt;
You can compile via 2 ways:&lt;br /&gt;
# via the VSCode [https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette Command Palette] - &amp;quot;Tasks: Run Build Task&amp;quot;, or&lt;br /&gt;
# by opening a &amp;quot;kos-bash&amp;quot; terminal (Menu: View-Terminal if not visible yet, then click on the &amp;quot;+&amp;quot; to see the terminals to choose from, and select &amp;quot;kos-bash&amp;quot;), and typing &amp;quot;make&amp;quot;&lt;br /&gt;
In both cases, the compilation should generate an executable file, ending with .elf&lt;br /&gt;
&lt;br /&gt;
Note: &amp;quot;kos-bash&amp;quot; is a bash shell with the &amp;quot;source /opt/toolchains/dc/kos/environ.sh&amp;quot; already executed for you. It should be your default shell in VSCode as long as you used the settings.json mentioned above.&lt;br /&gt;
&lt;br /&gt;
==== Running a program ====&lt;br /&gt;
For this, we will use the &amp;quot;make run&amp;quot; command that you can find in many (all?) Makefiles of the KallistiOs project, to send and run the program on a real dreamcast:&lt;br /&gt;
&lt;br /&gt;
* Typically, one of the following tools is used to run a program for the Dreamcast:&lt;br /&gt;
# on a real Dreamcast:&lt;br /&gt;
##via an ethernet cable &amp;amp; a [https://dreamcast.wiki/Broadband_adapter Broadband] (BBA) or [https://dreamcast.wiki/LAN_adapter LAN] adapter: &#039;&#039;&#039;[https://dreamcast.wiki/Dcload-ip dcload-ip]&#039;&#039;&#039;&lt;br /&gt;
## via a [https://dreamcast.wiki/Coder%27s_cable coder&#039;s cable] &amp;amp; the serial port of the Dreamcast: &#039;&#039;&#039;[https://dreamcast.wiki/Dcload-serial dcload-serial]&#039;&#039;&#039;&lt;br /&gt;
# on an emulator, like lxdream-nitro&lt;br /&gt;
&lt;br /&gt;
* Make sure that the &#039;&#039;&#039;KOS_LOADER&#039;&#039;&#039; variable in &#039;&#039;&#039;/opt/toolchains/dc/kos/environ.sh&#039;&#039;&#039; is configured correctly:&lt;br /&gt;
&lt;br /&gt;
# for &#039;&#039;&#039;dcload-ip&#039;&#039;&#039; (example if the IP of the Dreamcast is 192.168.1.210):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export KOS_LOADER=&amp;quot;dc-tool-ip -t 192.168.1.210 -x&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# for &#039;&#039;&#039;dcload-serial&#039;&#039;&#039; (example if the Dreamcast is on serial port /dev/ttyS0):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export KOS_LOADER=&amp;quot;dc-tool-ser -t /dev/ttyS0 -x&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# for &#039;&#039;&#039;the emulator&#039;&#039;&#039; (example with lxdream-nitro):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export KOS_LOADER=&amp;quot;/opt/toolchains/dc/lxdream-nitro/builddir/lxdream-nitro -e&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If want to run it on a real Dreamcast, power it on with the dcload disc loaded, and wait for the blue screen&lt;br /&gt;
* Open a &amp;quot;kos-bash&amp;quot; terminal, and type: make run&lt;br /&gt;
* The program will be running on your Dreamcast or on the emulator !&lt;br /&gt;
* (If you ran the 2ndmix example, you can press the START button on the Dreamcast pad to exit)&lt;br /&gt;
* Note: be sure to not have a gdb_init(); line added in your code when you only want to run a program &amp;amp; not debug it.&lt;br /&gt;
&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
==== Preparation ====&lt;br /&gt;
* Make sure that you compiled gdb for the Dreamcast, ie &#039;&#039;&#039;/opt/toolchains/dc/sh-elf/bin/sh-elf-gdb&#039;&#039;&#039; should exist (cfr prerequisites)&lt;br /&gt;
* Debugging in Visual Studio Code is configured in a &#039;&#039;&#039;.vscode/launch.json&#039;&#039;&#039; file. You can add as many debugging configurations as you want inside that launch.json file, eg 1 for debugging on a dreamcast, 1 for debugging on an emulator, ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# insert the following files in the &#039;&#039;&#039;&amp;quot;.vscode&amp;quot; subfolder&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;launch.json&#039;&#039;&#039; (example with the IP of the Dreamcast = 192.168.1.210 for the BBA/LAN or /dev/ttyS0 for the serial cable):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;version&amp;quot;: &amp;quot;0.2.0&amp;quot;,&lt;br /&gt;
    &amp;quot;configurations&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;BBA_LAN&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;cppdbg&amp;quot;,&lt;br /&gt;
            &amp;quot;request&amp;quot;: &amp;quot;launch&amp;quot;,&lt;br /&gt;
            &amp;quot;preLaunchTask&amp;quot;: &amp;quot;Build&amp;quot;,&lt;br /&gt;
            &amp;quot;cwd&amp;quot;: &amp;quot;${workspaceFolder}&amp;quot;,&lt;br /&gt;
            &amp;quot;program&amp;quot;: &amp;quot;${workspaceFolder}/${workspaceFolderBasename}.elf&amp;quot;,&lt;br /&gt;
            //&amp;quot;program&amp;quot;: &amp;quot;${workspaceFolder}/2ndmix.elf&amp;quot;,&lt;br /&gt;
            &amp;quot;MIMode&amp;quot;: &amp;quot;gdb&amp;quot;,&lt;br /&gt;
            &amp;quot;miDebuggerPath&amp;quot;: &amp;quot;/opt/toolchains/dc/sh-elf/bin/sh-elf-gdb&amp;quot;,&lt;br /&gt;
            &amp;quot;miDebuggerServerAddress&amp;quot;:&amp;quot;localhost:2159&amp;quot;,//common misconception: we connect to the gdb server offered by dc-tool-ip, NOT to the Dreamcast directly !&lt;br /&gt;
            &amp;quot;debugServerPath&amp;quot;:&amp;quot;/opt/toolchains/dc/bin/dc-tool-ip&amp;quot;,&lt;br /&gt;
            &amp;quot;debugServerArgs&amp;quot;: &amp;quot;-g -t 192.168.1.210 -x ${workspaceFolder}/${workspaceFolderBasename}.elf&amp;quot;,&lt;br /&gt;
            //&amp;quot;debugServerArgs&amp;quot;: &amp;quot;-g -t 192.168.1.210 -x ${workspaceFolder}/2ndmix.elf&amp;quot;,&lt;br /&gt;
            //&amp;quot;stopAtEntry&amp;quot;: true,&lt;br /&gt;
            &amp;quot;externalConsole&amp;quot;: false,&lt;br /&gt;
            &amp;quot;avoidWindowsConsoleRedirection&amp;quot;: false,&lt;br /&gt;
            &amp;quot;internalConsoleOptions&amp;quot;: &amp;quot;openOnSessionStart&amp;quot;,&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;SERIAL&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;cppdbg&amp;quot;,&lt;br /&gt;
            &amp;quot;request&amp;quot;: &amp;quot;launch&amp;quot;,&lt;br /&gt;
            &amp;quot;preLaunchTask&amp;quot;: &amp;quot;Build&amp;quot;,&lt;br /&gt;
            &amp;quot;cwd&amp;quot;: &amp;quot;${workspaceFolder}&amp;quot;,&lt;br /&gt;
            &amp;quot;program&amp;quot;: &amp;quot;${workspaceFolder}/${workspaceFolderBasename}.elf&amp;quot;,&lt;br /&gt;
            //&amp;quot;program&amp;quot;: &amp;quot;${workspaceFolder}/2ndmix.elf&amp;quot;,&lt;br /&gt;
            &amp;quot;MIMode&amp;quot;: &amp;quot;gdb&amp;quot;,&lt;br /&gt;
            &amp;quot;miDebuggerPath&amp;quot;: &amp;quot;/opt/toolchains/dc/sh-elf/bin/sh-elf-gdb&amp;quot;,&lt;br /&gt;
            &amp;quot;miDebuggerServerAddress&amp;quot;:&amp;quot;localhost:2159&amp;quot;,//common misconception: we connect to the gdb server offered by dc-tool-ser, NOT to the Dreamcast directly !&lt;br /&gt;
            &amp;quot;debugServerPath&amp;quot;:&amp;quot;/opt/toolchains/dc/bin/dc-tool-ser&amp;quot;,&lt;br /&gt;
            &amp;quot;debugServerArgs&amp;quot;: &amp;quot;-g -t /dev/ttyS0 -x ${workspaceFolder}/${workspaceFolderBasename}.elf&amp;quot;,&lt;br /&gt;
            //&amp;quot;debugServerArgs&amp;quot;: &amp;quot;-g -t /dev/ttyS0 -x ${workspaceFolder}/2ndmix.elf&amp;quot;,&lt;br /&gt;
            //&amp;quot;stopAtEntry&amp;quot;: true,&lt;br /&gt;
            &amp;quot;externalConsole&amp;quot;: false,&lt;br /&gt;
            &amp;quot;avoidWindowsConsoleRedirection&amp;quot;: false,&lt;br /&gt;
            &amp;quot;internalConsoleOptions&amp;quot;: &amp;quot;openOnSessionStart&amp;quot;,&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;LXDream&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;cppdbg&amp;quot;,&lt;br /&gt;
            &amp;quot;request&amp;quot;: &amp;quot;launch&amp;quot;,&lt;br /&gt;
            &amp;quot;preLaunchTask&amp;quot;: &amp;quot;Build&amp;quot;,&lt;br /&gt;
            &amp;quot;cwd&amp;quot;: &amp;quot;${workspaceRoot}&amp;quot;,&lt;br /&gt;
            &amp;quot;program&amp;quot;: &amp;quot;${workspaceFolder}/${workspaceFolderBasename}.elf&amp;quot;,&lt;br /&gt;
            //&amp;quot;program&amp;quot;: &amp;quot;${workspaceFolder}/2ndmix.elf&amp;quot;,&lt;br /&gt;
            &amp;quot;miDebuggerPath&amp;quot;: &amp;quot;/opt/toolchains/dc/sh-elf/bin/sh-elf-gdb&amp;quot;,&lt;br /&gt;
            &amp;quot;setupCommands&amp;quot;: [{&lt;br /&gt;
                &amp;quot;text&amp;quot;: &amp;quot;set architecture sh&amp;quot;,&lt;br /&gt;
                &amp;quot;description&amp;quot;: &amp;quot;Set GDB Arch to SuperH&amp;quot;,&lt;br /&gt;
                &amp;quot;ignoreFailures&amp;quot; : false,&lt;br /&gt;
            }],&lt;br /&gt;
            &amp;quot;miDebuggerServerAddress&amp;quot;: &amp;quot;:9999&amp;quot;,&lt;br /&gt;
            // path to lxdream-nitro&lt;br /&gt;
            &amp;quot;debugServerPath&amp;quot;: &amp;quot;PATH_TO_LXDREAM&amp;quot;,&lt;br /&gt;
            // lxdream-nitro flags&lt;br /&gt;
            &amp;quot;debugServerArgs&amp;quot;: &amp;quot;--log=DEBUG --gdb-sh4=9999 -A null -e ${workspaceRoot}/${workspaceFolderBasename}.elf -n&amp;quot;,&lt;br /&gt;
            //&amp;quot;debugServerArgs&amp;quot;: &amp;quot;--log=DEBUG --gdb-sh4=9999 -A null -e ${workspaceRoot}/2ndmix.elf -n&amp;quot;,&lt;br /&gt;
            &amp;quot;filterStdout&amp;quot;: true,&lt;br /&gt;
            &amp;quot;filterStderr&amp;quot;: true,&lt;br /&gt;
            // run on connect&lt;br /&gt;
            &amp;quot;stopAtConnect&amp;quot;: false,&lt;br /&gt;
            // stop at main&lt;br /&gt;
            &amp;quot;stopAtEntry&amp;quot;: true,&lt;br /&gt;
            &amp;quot;externalConsole&amp;quot;: false,&lt;br /&gt;
            &amp;quot;avoidWindowsConsoleRedirection&amp;quot;: false,&lt;br /&gt;
            &amp;quot;internalConsoleOptions&amp;quot;: &amp;quot;openOnSessionStart&amp;quot;,&lt;br /&gt;
            &amp;quot;launchCompleteCommand&amp;quot;: &amp;quot;exec-run&amp;quot;,&lt;br /&gt;
            &amp;quot;serverStarted&amp;quot;: &amp;quot;SH4 GDB server running on port&amp;quot;,&lt;br /&gt;
            &amp;quot;useExtendedRemote&amp;quot;: true&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that for the 3 launch configurations above, you have 2 lines for &lt;br /&gt;
&amp;quot;program&amp;quot; and &amp;quot;debugServerArgs&amp;quot;, one of which is commented out.&lt;br /&gt;
${workspaceFolderBasename} is the name of your project directory (eg: 2ndmix), and if that matches the name of your target .elf file (eg: 2ndmix.elf), then you can use ${workspaceFolderBasename}.&lt;br /&gt;
If not, you can just use the other line by replacing ${workspaceFolderBasename} with the real .elf filename.&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need to replace &amp;quot;PATH_TO_LXDREAM&amp;quot; with the path to the emulator installed on your pc.&lt;br /&gt;
&lt;br /&gt;
==== Launching a Debug session ====&lt;br /&gt;
{|&lt;br /&gt;
| [[File:Vscode debugging.png|thumb|alt=Vscode debugging|Vscode debugging]]&lt;br /&gt;
|}&lt;br /&gt;
* put a line to initialize gdb in your code (1):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
gdb_init();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If using lxdream-nitro, a gdb server is already provided and so gdb_init() should ```not``` be called.&lt;br /&gt;
&lt;br /&gt;
TODO: conditional include&lt;br /&gt;
* insert a breakpoint &#039;&#039;&#039;AFTER&#039;&#039;&#039; this gdb_init(); line (1). You can&#039;t put a breakpoint before or on this line !&lt;br /&gt;
* If want to run it on a real Dreamcast, power it on with the dcload disc loaded, and wait for the blue screen&lt;br /&gt;
* Click on the &amp;quot;Debugger&amp;quot; icon (2) on the left&lt;br /&gt;
* Select the configuration you want to launch (BBA_LAN, SERIAL, or LXDream)(3)&lt;br /&gt;
* Click on the green arrow (&amp;quot;Start Debugging&amp;quot; - F5)(4)&lt;br /&gt;
&lt;br /&gt;
==== Tips ====&lt;br /&gt;
* If you want to print out the value of a variable to the console (Terminal) on the pc, add a line like this to your code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
dbglog(DBG_INFO, &amp;quot;value is: 0x%08X\n&amp;quot;, variable);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting Tips ====&lt;br /&gt;
* If the dc-tool app does not seem to react anymore:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo netstat -ap | grep :2159&lt;br /&gt;
sudo kill &amp;lt;pid&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
[https://forums.sonicretro.org/index.php?threads/setting-up-gdb-with-redream-in-linux.38824/ netstat tip source]&lt;br /&gt;
&lt;br /&gt;
[https://dcemulation.org/phpBB/viewtopic.php?t=105596&amp;amp;start=20 Original VSCode topic on dcemulation.org]&lt;/div&gt;</summary>
		<author><name>Voxel</name></author>
	</entry>
	<entry>
		<id>https://dreamcast.wiki/wiki/index.php?title=Dreamcast_emulators&amp;diff=3607</id>
		<title>Dreamcast emulators</title>
		<link rel="alternate" type="text/html" href="https://dreamcast.wiki/wiki/index.php?title=Dreamcast_emulators&amp;diff=3607"/>
		<updated>2024-09-10T06:17:31Z</updated>

		<summary type="html">&lt;p&gt;Voxel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Emulators can be very handy when you want to test code quickly, but can&#039;t be totally relied on. Some emulator are closer to the original console while some will run your game even if a real Dreamcast can&#039;t.&lt;br /&gt;
&lt;br /&gt;
==Reicast ==&lt;br /&gt;
*Official page: [https://reicast.com]&lt;br /&gt;
*Developed by: skmp, others. Derived from nullDC.&lt;br /&gt;
*Status: Active, Under rewrite&lt;br /&gt;
*Platform: Android, Windows, Linux, macOS, html5&lt;br /&gt;
===Supported features===&lt;br /&gt;
===Known issues===&lt;br /&gt;
*Extremely buggy&lt;br /&gt;
&lt;br /&gt;
==Redream==&lt;br /&gt;
*Official page: [https://redream.io]&lt;br /&gt;
*Developed by: inolen&lt;br /&gt;
*Status: Active&lt;br /&gt;
*Platform: Android, Windows, Linux, macOS&lt;br /&gt;
===Supported feature===&lt;br /&gt;
===Known issues===&lt;br /&gt;
*No sound support for homebrew with HLE bios&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==NullDC==&lt;br /&gt;
*Official page: [https://github.com/skmp/nulldc]&lt;br /&gt;
*Developed by: skmp, ZeZu, PsyMan&lt;br /&gt;
*Status: Inactive&lt;br /&gt;
*Platform: Windows&lt;br /&gt;
===Supported feature===&lt;br /&gt;
===Known issues===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==lxdream==&lt;br /&gt;
*Official page: [http://www.lxdream.org/news/]&lt;br /&gt;
*Developed by: nkeynes&lt;br /&gt;
*Status: Inactive&lt;br /&gt;
*Platform: Linux and macOS&lt;br /&gt;
===Supported feature===&lt;br /&gt;
-&#039;&#039;&#039;DEV&#039;&#039;&#039; Console support (printf)&lt;br /&gt;
===Known issues===&lt;br /&gt;
&lt;br /&gt;
==lxdream-nitro==&lt;br /&gt;
*Official page: [https://gitlab.com/simulant/community/lxdream-nitro]&lt;br /&gt;
*Platform: Linux and macOS&lt;br /&gt;
*A community-improved version of lxdream&lt;br /&gt;
===Known issues===&lt;br /&gt;
*No KOS cd access when using bundled HLE bios&lt;br /&gt;
&lt;br /&gt;
==Demul==&lt;br /&gt;
*Official page: [http://demul.emulation64.com/]&lt;br /&gt;
*Developed by: Wind, CaH4e3, ajax16384, DreamZzz, MetalliC&lt;br /&gt;
*Status: Inactive&lt;br /&gt;
*Platform: Windows&lt;br /&gt;
===Supported feature===&lt;br /&gt;
*MMU, Naomi 2&lt;br /&gt;
===Known issues===&lt;br /&gt;
&lt;br /&gt;
==WashingtonDC==&lt;br /&gt;
*Official page: [http://washemu.org/]&lt;br /&gt;
*Developed by: snickerbockers&lt;br /&gt;
*Status: Active&lt;br /&gt;
*Platform: Linux, Windows&lt;br /&gt;
===Supported feature===&lt;br /&gt;
*Console support (printf) via serial port&lt;br /&gt;
*remote GDB debugging&lt;br /&gt;
===Known issues===&lt;br /&gt;
*game compatibility&lt;br /&gt;
*Z-Fighting&lt;br /&gt;
&lt;br /&gt;
==MAME==&lt;br /&gt;
*Official page: [http://mamedev.org/]&lt;br /&gt;
*Developed by: MAME community&lt;br /&gt;
*Status: Active&lt;br /&gt;
*Platform: Linux, Windows&lt;br /&gt;
===Supported feature===&lt;br /&gt;
===Known issues===&lt;br /&gt;
*game compatibility&lt;br /&gt;
*speed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other older emulators==&lt;br /&gt;
These emulators are listed mostly for historical/archival reasons.&lt;br /&gt;
===Chankast===&lt;br /&gt;
*Chankast is a Dreamcast emulator for Windows. Released on May 29th, 2004, Chankast was the first publicly-released Dreamcast emulator to play commercial games playably. It is now considered outdated.&lt;br /&gt;
*Authors: baktery, unai and garrofi&lt;br /&gt;
*[http://www.chanka.org/ Homepage]&lt;br /&gt;
*Latest version: Alpha 0.25, 07/07/2004&lt;br /&gt;
===Makaron===&lt;br /&gt;
*Makaron&lt;br /&gt;
[[File:Swirly.jpg|thumb|Swirly running Megan Potter&#039;s Stars demo]]&lt;br /&gt;
===DreamEmu===&lt;br /&gt;
[[File:Dreamemu-01.jpg|thumb|DreamEmu running DC Space Invaders]]&lt;br /&gt;
* Developed by Lord Cheese, DreamEmu is an early Dreamcast emulator that can only run some tech demos and homebrew, last released on 10/28/02.&lt;br /&gt;
* Downloads: [https://files.dcemulation.org/software/dcemulators/dreamemu/dreamemu-0.0.4.1-bin-rel.zip 0.0.4.1], [https://files.dcemulation.org/software/dcemulators/dreamemu/dreamemu-003.zip v0.03 - 08/03/01], [https://files.dcemulation.org/software/dcemulators/dreamemu/dreamemu-002.zip v0.02], [https://files.dcemulation.org/software/dcemulators/dreamemu/dreamemu_001a.zip v0.01a]&lt;br /&gt;
* [http://www.dreamemu.net/ Homepage]&lt;br /&gt;
&lt;br /&gt;
===Dreamer===&lt;br /&gt;
*Developed by ElSemi in late 2000 into mid-2001, Dreamer was the first working and released Dreamcast emulator for PC.&lt;br /&gt;
*Latest version: Alpha 0.25 - Download [https://files.dcemulation.org/software/dcemulators/dreamer/dreamer002.zip v0.02]&lt;br /&gt;
*[Dreamer](http://emulatronia.com/dcemu.htm)&lt;br /&gt;
*SH4: All opcodes is emulated (100% have not been proven) interprets. Those of movements of data to memory and jumps are emulated using dynamic recompilación.&lt;br /&gt;
&lt;br /&gt;
*FPU: All opcodes emulated for want of the 2 specific instructions of the Dreamcast. &amp;gt; uses the interpreter - Slow.&lt;br /&gt;
&lt;br /&gt;
*PowerVR: The basic part of the hardware 2d works (Framebuffer correctly and control registries). It lacks the way of video 555. We are at the moment looking for information on the hardware 3d and display lists.&lt;br /&gt;
&lt;br /&gt;
*JoyPad: Emulated completely.&lt;br /&gt;
&lt;br /&gt;
*Maple Bus: The control registries have been identified and will be working shortly.&lt;br /&gt;
&lt;br /&gt;
*Sound: Nothing yet.&lt;br /&gt;
&lt;br /&gt;
*CDROM: Almost emulated.&lt;br /&gt;
&lt;br /&gt;
*DEBUGGER: The emulator takes integrated to debugger (that is a little patatero but it plays his role). Executing debugger implies that the execution of the program is much more slow. The handling keys are the following ones:&lt;br /&gt;
&lt;br /&gt;
*F5: Go (uninterrupted Execution)&amp;lt;br/&amp;gt;&lt;br /&gt;
*F7: Draw up Into (to execute entering the subroutines)&amp;lt;br/&amp;gt;&lt;br /&gt;
*F8: Step Over (To execute without entering the subroutines, does not work to 100%)&lt;br /&gt;
&lt;br /&gt;
*Commandos: The commandos are written in the inferior part of the window of the code:&amp;lt;br/&amp;gt;&lt;br /&gt;
**G (Just as F5)&amp;lt;br/&amp;gt;&lt;br /&gt;
**G direction (Executes until that direcci¢n. in hex)&amp;lt;br/&amp;gt;&lt;br /&gt;
**D direction (shows the memory of the specified direction. in hex)&amp;lt;br/&amp;gt;&lt;br /&gt;
**D registry (it shows the memory of the direction loaded in the chosen registry)&amp;lt;br/&amp;gt;&lt;br /&gt;
**And direction data (writes in the direction the specified data. 0-FF in hex)&amp;lt;br/&amp;gt;&lt;br /&gt;
**R registry value (loads the value in the registry. 0-FFFFFFFF in hex)&amp;lt;br/&amp;gt;&lt;br /&gt;
**S (it stops the single emulation works in Go way)&amp;lt;br/&amp;gt;&lt;br /&gt;
**F (it draws framebuffer)&amp;lt;br/&amp;gt;&lt;br /&gt;
**X (to leave)&amp;lt;br/&amp;gt;&lt;br /&gt;
**Z (reset, cracks, not to use)&amp;lt;br/&amp;gt;&lt;br /&gt;
**WD 0|1 (oculta|muestra window of data)&amp;lt;br/&amp;gt;&lt;br /&gt;
**WR 0|1 (oculta|muestra window of registries)&amp;lt;br/&amp;gt;&lt;br /&gt;
**WM 0|1 (oculta|muestra window of messages)&amp;lt;br/&amp;gt;&lt;br /&gt;
**WC 0|1 (oculta|muestra code window, nor is happened to you, but where you write)&lt;br /&gt;
&lt;br /&gt;
===Swirly===&lt;br /&gt;
*[Swirly](http://swirly.sourceforge.net/)&lt;/div&gt;</summary>
		<author><name>Voxel</name></author>
	</entry>
</feed>