Welcome, Guest!

Here are some links you may find helpful

Dreamcast Self-contained Dreamcast KallistiOS and Dreamshell dev environments using Docker

einsteinx2

Registered
Registered
Joined
Aug 8, 2019
Messages
49
Reaction score
44
Points
18
Location
Medellín, Colombia
Website
github.com
Why?

After spending a bunch of time getting Dreamcast development environments set up on macOS and finding some great PS2 and PS3 homebrew development Docker images, I decided to make similar ones for Dreamcast homebrew development. Since Docker is cross-platform, you can use these on Linux, macOS, or Windows as long as you have Docker installed (note that I don't use Windows and have not tested these there, so the instructions below may not work exactly as-is, but the images should work fine).

What?

I've created 2 separate images. The first is a standard KOS development environment, while the second is based on the first and applies the Dreamshell KOS source code patch to allow compilation of Dreamshell. Everything should be working fine, I've successfully built and ran a Dreamshell CDI image based on the latest source code in the Dreamshell repository as well as compiled some standard KOS homebrew. I'll try and keep these more or less updated as new KOS and Dreamshell updates come out, but for now they already work as-is.

If you're not familiar with Docker, first get it installed, then just pull the image you want from the Docker Hub (the docker run command below will do that automatically the first time). I also have the Dockerfiles hosted in Github repos so you can easily modify them to your liking (for example to add extra libraries, or update the Dreamshell KOS patch if it changes with new versions).

How?

Due to the extensive use of environment variables required to be loaded in Bash, unlike the PS2 and PS3 docker images you must first enter an interactive Bash shell to run make, but it's very simple.

Stock KallistOS

To use the KOS image to build any KallistOS homebrew, first cd into the source code directory of your homebrew project, then run the docker image to enter the interactive bash shell by running docker run -it --rm -v "$PWD:/src" einsteinx2/dcdev-kos, then build it by running make. You can now exit the Docker shell and the compiled program will be in the source code directory on your host machine. The Docker container will automatically be destroyed and recreated each time using this command, but the image will only be pulled once. If you'd like to keep the container alive to re-use, just remove the --rm flag and relaunch the container directly later to use it again (you'll have to look up the correct Docker command for that).

Dreamshell

To build Dreamshell, first clone the Dreamshell repository and cd into that directory, then run docker run -it --rm -v "$PWD:/src" einsteinx2/dcdev-dreamshell to enter the interactive bash shell, then run prep_build if this is the first build, then run make && make cdi. You can now exit the Docker shell and the cdi image and other build products will be in the Dreamshell directory on your host machine and can be run on your Dreamcast. The Docker container will automatically be destroyed and recreated each time using this command, but the image will only be pulled once. If you'd like to keep the container alive to re-use, just remove the --rm flag and relaunch the container directly later to use it again (you'll have to look up the correct Docker command for that).

There are also extra tools included in the images in the /opt/toolchains/dc/bin directory inside the images (which is in the PATH, so can be called without entering that directory), and I'll be adding more as I get around to it.

Links

Docker Hub pages

https://hub.docker.com/r/einsteinx2/dcdev-kos
dcdev-kos.svg
dcdev-kos.svg


https://hub.docker.com/r/einsteinx2/dcdev-dreamshell
dcdev-dreamshell.svg
dcdev-dreamshell.svg


Github repositories for the Dockerfiles (feel free to improve or add more tools and submit PRs!)
____________________________________________________________

Hopefully these images will help you to get started in Dreamcast homebrew development or modifying existing homebrew without going through the (potentially complicated) toolchain setup process.

Happy hacking!
 
Last edited:

neo

Registered
Registered
Joined
Feb 1, 2019
Messages
63
Reaction score
58
Points
18
AG User Name
Mrneo240
AG Join Date
06/08/2010
EDIT!
For anyone here in the future please use
https://hub.docker.com/r/haydenkow/nu_dckos

its a better image and will be updated more, also includes sh-elf-gdb for debugging what you wrote

Code:
empty

nice!

but why are they so large?


https://hub.docker.com/r/haydenkow/nu-dcdev & https://github.com/mrneo240/nu-dcdev

A Docker Image for Dreamcast Development



Cross-compile your Dreamcast homebrew projects inside a Docker container using KallistiOS.

Quick Start

Run this command in your project's root folder to build it inside a Docker container:
Code:
docker run --rm -v "${PWD}:/src" haydenkow/nu-dcdev make
 
Last edited:

einsteinx2

Registered
Registered
Joined
Aug 8, 2019
Messages
49
Reaction score
44
Points
18
Location
Medellín, Colombia
Website
github.com
Great question. I didn't do any size optimization on it at all, just a base Ubuntu image then downloaded the tools and compiled. There's probably a bunch of unneeded stuff in there. In fact I don't think I'm even removing any of the toolchain downloads or compile byproducts after building let alone cleaning up apt caches and stuff like you are.

I see yours is a multistage image, so that is probably saving a ton of space too. I'm just getting into Docker so I tried to keep it as simple as possible to just get something that worked and didn't play with multistage builds.

Until I posted them here I was just using these for myself, so I wasn't really concerned about space. Now that I've shared them, when I have a little free time I'll rework them to get the size down.
 
  • Like
Reactions: neo

neo

Registered
Registered
Joined
Feb 1, 2019
Messages
63
Reaction score
58
Points
18
AG User Name
Mrneo240
AG Join Date
06/08/2010
Great question. I didn't do any size optimization on it at all, just a base Ubuntu image then downloaded the tools and compiled. There's probably a bunch of unneeded stuff in there. In fact I don't think I'm even removing any of the toolchain downloads or compile byproducts after building let alone cleaning up apt caches and stuff like you are.

I see yours is a multistage image, so that is probably saving a ton of space too. I'm just getting into Docker so I tried to keep it as simple as possible to just get something that worked and didn't play with multistage builds.

Until I posted them here I was just using these for myself, so I wasn't really concerned about space. Now that I've shared them, when I have a little free time I'll rework them to get the size down.
Making that image was the result of me learning docker and how to with best practices.

I had a lot of help and guidance along the way, so don't think that was the first thing I managed to write.

Also I like that you made a dreamshell image. Very nice!

Please don't take of this as criticism, I do like what you're doing and I always always always am glad to see people doing stuff for the dc.

Rock on Einstein.

I hope to see some of your projects very soon.
 

neo

Registered
Registered
Joined
Feb 1, 2019
Messages
63
Reaction score
58
Points
18
AG User Name
Mrneo240
AG Join Date
06/08/2010
I want to eventually split that image up into 2 pieces, one with the toolchain compiled but not Kos so then new ready to go with most recent Kos containers can be built on demand fairly quickly.
 

einsteinx2

Registered
Registered
Joined
Aug 8, 2019
Messages
49
Reaction score
44
Points
18
Location
Medellín, Colombia
Website
github.com
No worries, I'm always open to constructive criticism. Looking forward to contributing what I can to the DC scene. The Dreamcast is possibly my favorite console of all time, and I love that something like KOS even exists not to mention stuff like the GDEMU. Super excited to see the development of new menu software. I tried to contact Neuroacid about the GDMENU source code, but didn't hear back (sounds like no one else did either). I wanted to work on my own as my first DC homebrew project, as it's something I'll personally use a lot, but didn't know how to talk to the GDEMU so I shelved it. So cool to see it reverse engineered!

I want to eventually split that image up into 2 pieces, one with the toolchain compiled but not Kos so then new ready to go with most recent Kos containers can be built on demand fairly quickly.

Great idea. I assume the toolchain dependencies don't change much and they take forever to build. I'll play around with the same concept, sort of like how my Dreamshell image is layered on top of the KOS image, making it much quicker to build. It would be cool to have 3 layers, one for the base toolchain, one for KOS, and one for Dreamshell. I found that even though Dreamshell's toolchain scripts use slightly different versions than KOS and have multiple patches, the only thing I needed to get it to work was to patch the KOS source and use the existing toolchain, so it should be possible.
 
Last edited:
  • Like
Reactions: neo

einsteinx2

Registered
Registered
Joined
Aug 8, 2019
Messages
49
Reaction score
44
Points
18
Location
Medellín, Colombia
Website
github.com
Just tried compiling openmenu using my docker image and it worked (haven't run it yet, but at least it compiled successfully), so at least it's cool to see it works for more than just example code :)

Looking forward to taking a look at the code and contributing when I have a moment.
 
  • Like
Reactions: neo

waiwainl

Registered
Registered
Joined
Jun 16, 2019
Messages
4
Reaction score
3
Points
3
AG User Name
waiwainl
AG Join Date
29-08-2016
Very cool! (y)
Going to try this out!
 
shape1
shape2
shape3
shape4
shape5
shape6
Top