<?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=Andrew.apperley</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=Andrew.apperley"/>
	<link rel="alternate" type="text/html" href="https://dreamcast.wiki/Special:Contributions/Andrew.apperley"/>
	<updated>2026-04-09T10:34:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://dreamcast.wiki/wiki/index.php?title=Objective-C_on_Dreamcast&amp;diff=3590</id>
		<title>Objective-C on Dreamcast</title>
		<link rel="alternate" type="text/html" href="https://dreamcast.wiki/wiki/index.php?title=Objective-C_on_Dreamcast&amp;diff=3590"/>
		<updated>2024-08-04T20:04:06Z</updated>

		<summary type="html">&lt;p&gt;Andrew.apperley: Added the example running and libs base instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===This article is actively being worked on=== &lt;br /&gt;
&#039;&#039;Work in progress - items to be added and/or edited&#039;&#039;:  It is subject to change and utilizes repo forks that might be significantly behind the mainline repos.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
=Introduction=&lt;br /&gt;
This article will cover the how to setup Objective-C and its Standard Library, Foundation. The following git repos will be used in this guide and will be described in more detail as we go:&lt;br /&gt;
* &#039;&#039;&#039;Tools-Make&#039;&#039;&#039; - provides a set of make files that are used to properly configure Foundation&lt;br /&gt;
* &#039;&#039;&#039;KOS&#039;&#039;&#039; - the main package for making Dreamcast Homebrew. We will need to patch your local git clone with pthread support&lt;br /&gt;
* &#039;&#039;&#039;Libs-Base&#039;&#039;&#039; - provides the Foundation library for Objective-C&lt;br /&gt;
* &#039;&#039;&#039;LibFFI&#039;&#039;&#039; - used for NSTimers and NSInvocation support&lt;br /&gt;
&lt;br /&gt;
Important note: If you haven&#039;t setup KOS yet, you must follow the [[Getting Started with Dreamcast development|Getting Started Guide]]. You can then come back and continue with this one.&lt;br /&gt;
&lt;br /&gt;
=Preparation=&lt;br /&gt;
We must first configure and install the prerequisites for Foundation. These include libffi and Tools-Make.&lt;br /&gt;
&lt;br /&gt;
== Libffi ==&lt;br /&gt;
==== Clone the repo ====&lt;br /&gt;
    git clone git@github.com:andrewapperley/libffi.git&lt;br /&gt;
&lt;br /&gt;
==== Execute the configure command ====&lt;br /&gt;
    CC=kos-cc CXX=kos-c++ ./configure --host=sh-elf --target=sh-elf&lt;br /&gt;
&lt;br /&gt;
==== Execute the make command ====&lt;br /&gt;
    make&lt;br /&gt;
&lt;br /&gt;
==== Execute the make install command ====&lt;br /&gt;
    make install&lt;br /&gt;
&lt;br /&gt;
== Tools Make ==&lt;br /&gt;
==== Clone the repo ====&lt;br /&gt;
    git clone git@github.com:andrewapperley/tools-make.git&lt;br /&gt;
&lt;br /&gt;
==== Switch to DC branch ====&lt;br /&gt;
    git fetch&lt;br /&gt;
    git checkout origin/DC&lt;br /&gt;
    git pull&lt;br /&gt;
&lt;br /&gt;
==== Execute the configure command ====&lt;br /&gt;
    CC=kos-cc CXX=kos-c++ ./configure --host=sh-elf --target=sh-elf --prefix=/opt/gnustep --enable-nxconstantstring --disable-tls --disable-icu --disable-iconv --disable-libdispatch --disable-xslt --disable-xml --enable-procfs-psinfo --enable-procfs&lt;br /&gt;
&lt;br /&gt;
==== Execute the make command ====&lt;br /&gt;
    make&lt;br /&gt;
&lt;br /&gt;
==== Execute the make install command ====&lt;br /&gt;
    make install&lt;br /&gt;
&lt;br /&gt;
== Libs Base ==&lt;br /&gt;
==== Clone the repo ====&lt;br /&gt;
    git clone git@github.com:andrewapperley/libs-base.git&lt;br /&gt;
&lt;br /&gt;
==== Switch to DC branch ====&lt;br /&gt;
    git fetch&lt;br /&gt;
    git checkout origin/DC&lt;br /&gt;
    git pull&lt;br /&gt;
&lt;br /&gt;
==== Execute the configure command ====&lt;br /&gt;
    CC=kos-cc CXX=kos-c++ ./configure --host=sh-elf --target=sh-elf --prefix=/opt/gnustep --enable-nxconstantstring --disable-tls --disable-icu --disable-iconv --disable-libdispatch --disable-xslt --disable-xml --enable-procfs-psinfo --enable-procfs&lt;br /&gt;
&lt;br /&gt;
==== Execute the make command ====&lt;br /&gt;
    make&lt;br /&gt;
&lt;br /&gt;
==== Execute the make install command ====&lt;br /&gt;
    make install&lt;br /&gt;
&lt;br /&gt;
=Running an example=&lt;br /&gt;
Currently the main KOS repo doesn&#039;t have pthread support added to master, for now you must have the pthreads branch rebased onto a local branch. I have gone ahead and done this on a personal fork. This shouldn&#039;t be the case forever and doing this has it&#039;s drawbacks, such as your branch falling behind the active development branch quite easily. &lt;br /&gt;
&lt;br /&gt;
You&#039;ll need to take the libgnustep-base.a, libffi.a, and the headers of each library and place them where KOS can find them. This needs to happen every time you alter the source files within those project folders.&lt;br /&gt;
&lt;br /&gt;
==== Switch to Objc branch ====&lt;br /&gt;
    git fetch&lt;br /&gt;
    git checkout origin/dc-objc&lt;br /&gt;
    git pull&lt;br /&gt;
&lt;br /&gt;
==== Execute the examples ====&lt;br /&gt;
    make ./examples/dreamcast/objc/runtime&lt;br /&gt;
    make ./examples/dreamcast/objc/foundation&lt;/div&gt;</summary>
		<author><name>Andrew.apperley</name></author>
	</entry>
	<entry>
		<id>https://dreamcast.wiki/wiki/index.php?title=Objective-C_on_Dreamcast&amp;diff=3559</id>
		<title>Objective-C on Dreamcast</title>
		<link rel="alternate" type="text/html" href="https://dreamcast.wiki/wiki/index.php?title=Objective-C_on_Dreamcast&amp;diff=3559"/>
		<updated>2024-06-06T20:49:51Z</updated>

		<summary type="html">&lt;p&gt;Andrew.apperley: Added the tools make section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===This article is actively being worked on=== &lt;br /&gt;
&#039;&#039;Work in progress - items to be added and/or edited&#039;&#039;:  It is subject to change and utilizes repo forks that might be significantly behind the mainline repos.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
=Introduction=&lt;br /&gt;
This article will cover the how to setup Objective-C and its Standard Library, Foundation. The following git repos will be used in this guide and will be described in more detail as we go:&lt;br /&gt;
* &#039;&#039;&#039;Tools-Make&#039;&#039;&#039; - provides a set of make files that are used to properly configure Foundation&lt;br /&gt;
* &#039;&#039;&#039;KOS&#039;&#039;&#039; - the main package for making Dreamcast Homebrew. We will need to patch your local git clone with pthread support&lt;br /&gt;
* &#039;&#039;&#039;Libs-Base&#039;&#039;&#039; - provides the Foundation library for Objective-C&lt;br /&gt;
* &#039;&#039;&#039;LibFFI&#039;&#039;&#039; - used for NSTimers and NSInvocation support&lt;br /&gt;
&lt;br /&gt;
Important note: If you haven&#039;t setup KOS yet, you must follow the [[Getting Started with Dreamcast development|Getting Started Guide]]. You can then come back and continue with this one.&lt;br /&gt;
&lt;br /&gt;
=Preparation=&lt;br /&gt;
We must first configure and install the prerequisites for Foundation. These include libffi and Tools-Make.&lt;br /&gt;
&lt;br /&gt;
== Libffi ==&lt;br /&gt;
==== Clone the repo ====&lt;br /&gt;
    git clone git@github.com:andrewapperley/libffi.git&lt;br /&gt;
&lt;br /&gt;
==== Execute the configure command ====&lt;br /&gt;
    CC=kos-cc CXX=kos-c++ ./configure --host=sh-elf --target=sh-elf&lt;br /&gt;
&lt;br /&gt;
==== Execute the make command ====&lt;br /&gt;
    make&lt;br /&gt;
&lt;br /&gt;
==== Execute the make install command ====&lt;br /&gt;
    make install&lt;br /&gt;
&lt;br /&gt;
== Tools Make ==&lt;br /&gt;
==== Clone the repo ====&lt;br /&gt;
    git clone git@github.com:andrewapperley/tools-make.git&lt;br /&gt;
&lt;br /&gt;
==== Switch to DC branch ====&lt;br /&gt;
    git fetch&lt;br /&gt;
    git checkout origin/DC&lt;br /&gt;
    git pull&lt;br /&gt;
&lt;br /&gt;
==== Execute the configure command ====&lt;br /&gt;
    CC=kos-cc CXX=kos-c++ ./configure --host=sh-elf --target=sh-elf --prefix=/opt/gnustep --enable-nxconstantstring --disable-tls --disable-icu --disable-iconv --disable-libdispatch --disable-xslt --disable-xml --enable-procfs-psinfo --enable-procfs&lt;br /&gt;
&lt;br /&gt;
==== Execute the make command ====&lt;br /&gt;
    make&lt;br /&gt;
&lt;br /&gt;
==== Execute the make install command ====&lt;br /&gt;
    make install&lt;/div&gt;</summary>
		<author><name>Andrew.apperley</name></author>
	</entry>
	<entry>
		<id>https://dreamcast.wiki/wiki/index.php?title=Objective-C_on_Dreamcast&amp;diff=3556</id>
		<title>Objective-C on Dreamcast</title>
		<link rel="alternate" type="text/html" href="https://dreamcast.wiki/wiki/index.php?title=Objective-C_on_Dreamcast&amp;diff=3556"/>
		<updated>2024-06-06T20:35:08Z</updated>

		<summary type="html">&lt;p&gt;Andrew.apperley: Added the libffi section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|type=warn|text=This article is a Work in Progress. It is subject to change and utilizes repo forks that might be significantly behind the mainline repo.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
=Introduction=&lt;br /&gt;
This article will cover the how to setup Obective-C and it&#039;s Standard Library Foundation. The following git repos will be used in this guide and will be described in more detail as we go:&lt;br /&gt;
* &#039;&#039;&#039;Tools-Make&#039;&#039;&#039; - provides a set of make files that are used to properly configure Foundation&lt;br /&gt;
* &#039;&#039;&#039;KOS&#039;&#039;&#039; - the main package for making Dreamcast Homebrew. We will need to patch your local git clone with pthread support&lt;br /&gt;
* &#039;&#039;&#039;Libs-Base&#039;&#039;&#039; - provides the Foundation library for Objective-C&lt;br /&gt;
* &#039;&#039;&#039;LibFFI&#039;&#039;&#039; - used for NSTimers and NSInvocation support&lt;br /&gt;
&lt;br /&gt;
Important note: If you haven&#039;t setup KOS yet, you must follow the [[Getting Started with Dreamcast development|Getting Started Guide]]. You can then come back and continue with this one.&lt;br /&gt;
&lt;br /&gt;
=Preparation=&lt;br /&gt;
We must first configure and install the prerequisites for Foundation. These include libffi and Tools-Make.&lt;br /&gt;
&lt;br /&gt;
== Libffi ==&lt;br /&gt;
==== Clone the ffi repo ====&lt;br /&gt;
    git clone git@github.com:andrewapperley/libffi.git&lt;br /&gt;
&lt;br /&gt;
==== Execute the configure command ====&lt;br /&gt;
    CC=kos-cc CXX=kos-c++ ./configure --host=sh-elf --target=sh-elf&lt;br /&gt;
&lt;br /&gt;
==== Execute the make command ====&lt;br /&gt;
    make&lt;br /&gt;
&lt;br /&gt;
==== Execute the make install command ====&lt;br /&gt;
    make install&lt;/div&gt;</summary>
		<author><name>Andrew.apperley</name></author>
	</entry>
	<entry>
		<id>https://dreamcast.wiki/wiki/index.php?title=Objective-C_on_Dreamcast&amp;diff=3555</id>
		<title>Objective-C on Dreamcast</title>
		<link rel="alternate" type="text/html" href="https://dreamcast.wiki/wiki/index.php?title=Objective-C_on_Dreamcast&amp;diff=3555"/>
		<updated>2024-05-30T14:14:02Z</updated>

		<summary type="html">&lt;p&gt;Andrew.apperley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
=Introduction=&lt;br /&gt;
This article will cover the how to setup Obective-C and it&#039;s Standard Library Foundation. The following git repos will be used in this guide and will be described in more detail as we go:&lt;br /&gt;
* &#039;&#039;&#039;Tools-Make&#039;&#039;&#039; - provides a set of make files that are used to properly configure Foundation&lt;br /&gt;
* &#039;&#039;&#039;KOS&#039;&#039;&#039; - the main package for making Dreamcast Homebrew. We will need to patch your local git clone with pthread support&lt;br /&gt;
* &#039;&#039;&#039;Libs-Base&#039;&#039;&#039; - provides the Foundation library for Objective-C&lt;br /&gt;
* &#039;&#039;&#039;LibFFI&#039;&#039;&#039; - used for NSTimers and NSInvocation support&lt;br /&gt;
&lt;br /&gt;
Important note: If you haven&#039;t setup KOS yet, you must follow the [[Getting Started with Dreamcast development|Getting Started Guide]]. You can then come back and continue with this one.&lt;/div&gt;</summary>
		<author><name>Andrew.apperley</name></author>
	</entry>
	<entry>
		<id>https://dreamcast.wiki/wiki/index.php?title=Objective-C_on_Dreamcast&amp;diff=3551</id>
		<title>Objective-C on Dreamcast</title>
		<link rel="alternate" type="text/html" href="https://dreamcast.wiki/wiki/index.php?title=Objective-C_on_Dreamcast&amp;diff=3551"/>
		<updated>2024-05-24T18:45:33Z</updated>

		<summary type="html">&lt;p&gt;Andrew.apperley: page contents will be added soon&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TODO&lt;/div&gt;</summary>
		<author><name>Andrew.apperley</name></author>
	</entry>
	<entry>
		<id>https://dreamcast.wiki/wiki/index.php?title=Programming_language_support&amp;diff=3550</id>
		<title>Programming language support</title>
		<link rel="alternate" type="text/html" href="https://dreamcast.wiki/wiki/index.php?title=Programming_language_support&amp;diff=3550"/>
		<updated>2024-05-24T18:44:10Z</updated>

		<summary type="html">&lt;p&gt;Andrew.apperley: /* Compiled languages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following languages can be used in Sega Dreamcast programming:&lt;br /&gt;
&lt;br /&gt;
=Assembly languages=&lt;br /&gt;
* &#039;&#039;&#039;SH4 assembly&#039;&#039;&#039;, as the native machine code for the Dreamcast&#039;s SuperH processor&lt;br /&gt;
* &#039;&#039;&#039;ARM assembly&#039;&#039;&#039;, as the native machine code for the Dreamcast&#039;s AICA ARM7DI sound processor&lt;br /&gt;
&lt;br /&gt;
=Compiled languages=&lt;br /&gt;
* &#039;&#039;&#039;C&#039;&#039;&#039;, the predominant language for Sega Dreamcast development, via the GCC C compiler.&lt;br /&gt;
* &#039;&#039;&#039;C++&#039;&#039;&#039;, commonly used and very well-supported, via the GCC C++ compiler.&lt;br /&gt;
* &#039;&#039;&#039;Objective-C&#039;&#039;&#039;, via the GCC Objective-C compiler. Preliminary support for Foundation framework via [https://gnustep.github.io/ GNUstep] is being developed. See [https://twitter.com/dinobj_c/status/1732399498977276154 Andrew Apperley&#039;s X account]. See [[Objective-c on Dreamcast]] for more information.&lt;br /&gt;
** The GNU &#039;&#039;&#039;Objective-C++&#039;&#039;&#039; extension is available as well.&lt;br /&gt;
* &#039;&#039;&#039;Rust&#039;&#039;&#039;, via rustc_codegen_gcc and libgccjit, or via gccrs. When using rustc_codegen_gcc, the core and alloc libraries are available, with bindings to KallistiOS being developed. See [[Rust on Dreamcast]] for more information.&lt;br /&gt;
* &#039;&#039;&#039;D&#039;&#039;&#039;, via the GCC D compiler. Early support, see [https://dreamcast.wiki/D_on_Dreamcast D on Dreamcast] for more information.&lt;br /&gt;
* &#039;&#039;&#039;Ada&#039;&#039;&#039;, via GNAT. [https://github.com/dkm/ada-dreamcast-helloworld Ada 3D cube demo] by [https://poulhies.fr/ Marc Poulhiès].&lt;br /&gt;
* &#039;&#039;&#039;Fortran&#039;&#039;&#039;, via GFortran. Requires some work to create a cross-compiler, but does work.&lt;br /&gt;
&lt;br /&gt;
=Scripting/Interpreted languages=&lt;br /&gt;
* Lua (available in [[kos-ports]])&lt;br /&gt;
* MicroPython (available in [[kos-ports]])&lt;br /&gt;
* Tcl (available in [[kos-ports]])&lt;br /&gt;
* mRuby (available in [[kos-ports]])&lt;br /&gt;
* AngelScript&lt;br /&gt;
* QuickJS&lt;/div&gt;</summary>
		<author><name>Andrew.apperley</name></author>
	</entry>
	<entry>
		<id>https://dreamcast.wiki/wiki/index.php?title=Programming_language_support&amp;diff=3549</id>
		<title>Programming language support</title>
		<link rel="alternate" type="text/html" href="https://dreamcast.wiki/wiki/index.php?title=Programming_language_support&amp;diff=3549"/>
		<updated>2024-05-24T18:43:40Z</updated>

		<summary type="html">&lt;p&gt;Andrew.apperley: Added link to objc on dc page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following languages can be used in Sega Dreamcast programming:&lt;br /&gt;
&lt;br /&gt;
=Assembly languages=&lt;br /&gt;
* &#039;&#039;&#039;SH4 assembly&#039;&#039;&#039;, as the native machine code for the Dreamcast&#039;s SuperH processor&lt;br /&gt;
* &#039;&#039;&#039;ARM assembly&#039;&#039;&#039;, as the native machine code for the Dreamcast&#039;s AICA ARM7DI sound processor&lt;br /&gt;
&lt;br /&gt;
=Compiled languages=&lt;br /&gt;
* &#039;&#039;&#039;C&#039;&#039;&#039;, the predominant language for Sega Dreamcast development, via the GCC C compiler.&lt;br /&gt;
* &#039;&#039;&#039;C++&#039;&#039;&#039;, commonly used and very well-supported, via the GCC C++ compiler.&lt;br /&gt;
* &#039;&#039;&#039;Objective-C&#039;&#039;&#039;, via the GCC Objective-C compiler. Preliminary support for Foundation framework via [https://gnustep.github.io/ GNUstep] is being developed. See [https://twitter.com/dinobj_c/status/1732399498977276154 Andrew Apperley&#039;s X account].&lt;br /&gt;
** The GNU &#039;&#039;&#039;Objective-C++&#039;&#039;&#039; extension is available as well.&lt;br /&gt;
See [[Objective-c on Dreamcast]] for more information.&lt;br /&gt;
* &#039;&#039;&#039;Rust&#039;&#039;&#039;, via rustc_codegen_gcc and libgccjit, or via gccrs. When using rustc_codegen_gcc, the core and alloc libraries are available, with bindings to KallistiOS being developed. See [[Rust on Dreamcast]] for more information.&lt;br /&gt;
* &#039;&#039;&#039;D&#039;&#039;&#039;, via the GCC D compiler. Early support, see [https://dreamcast.wiki/D_on_Dreamcast D on Dreamcast] for more information.&lt;br /&gt;
* &#039;&#039;&#039;Ada&#039;&#039;&#039;, via GNAT. [https://github.com/dkm/ada-dreamcast-helloworld Ada 3D cube demo] by [https://poulhies.fr/ Marc Poulhiès].&lt;br /&gt;
* &#039;&#039;&#039;Fortran&#039;&#039;&#039;, via GFortran. Requires some work to create a cross-compiler, but does work.&lt;br /&gt;
&lt;br /&gt;
=Scripting/Interpreted languages=&lt;br /&gt;
* Lua (available in [[kos-ports]])&lt;br /&gt;
* MicroPython (available in [[kos-ports]])&lt;br /&gt;
* Tcl (available in [[kos-ports]])&lt;br /&gt;
* mRuby (available in [[kos-ports]])&lt;br /&gt;
* AngelScript&lt;br /&gt;
* QuickJS&lt;/div&gt;</summary>
		<author><name>Andrew.apperley</name></author>
	</entry>
</feed>