Skip to content

Test repository to show how easy it is to compile applications for the Sega Dreamcast, with just a browser.

Notifications You must be signed in to change notification settings

hurricane-src/Test_Kos_Codespace

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 

Repository files navigation

This is a test repository to show how easy it is to compile applications for the Sega Dreamcast, with just a browser.

To launch in your Web Browser a Visual Studio Code session that can compile for Dreamcast:

  • Click on the green "Code" button
  • Select the "Codespaces" Tab
  • Click on "Create codespace on main"
    • Create codespace on main
    • Github will create a codespace for you, this will take a couple of minutes the first time, but will be faster afterwards.

This will launch Visual Studio Code in the browser, with:

  • the sh-elf/arm compilers available in the terminal,
  • the kos environ.sh sourced,
  • dc-tool-ip installed

Tips:

  • Helper commands to launch in the Terminal (inside your codespace: File-View-Terminal):
    • To add the Kos examples to your VSCode workspace:
      • code -a /opt/toolchains/dc/kos/examples
    • To go to the kos folder:
      • cd /opt/toolchains/dc
    • To compile an example & send the .elf to your broadband adapter (BBA): something like:
      • cd /opt/toolchains/dc/kos/examples/dreamcast/hello
      • make
      • dc-tool-ip -t 192.168.1.200 -x hello.elf
        • (with 192.168.1.200 being the ip address of your BBA)
        • Notes:
          • By default, Codespaces can only access the BBA if it is reachable via the internet (ie, addresses like 192.168.0.xxx, 192.168.1.xxx or 10.0.0.xxx, ... are not reachable)
          • If you want Codespaces to be able to access the BBA when it is only reachable via your internal network, check this link
  • When you have finished working with your codespace, click on the green "Code" button again, and on the 3 dots next to your codespace to stop your container from running. This will save you some free execution minutes (default idle timeout is 30 minutes, and you get 120 free core hours per month).

Notes:

  • This is just a very simple test (by somebody who just started using Docker & Codespaces), hence could be improved a lot, eg by:
    • including (regular) gcc, dc-tool-ip, gdb, ... in the docker image
    • trying to keep the docker image as small as possible, and/or use several separate images
    • automate the building of the toolchain / kos on a regular base, and put that in docker image(s), to benefit from the latest changes
    • adding extra VSCode configuration
    • adding integration with an emulator to be able to test things without real hardware
    • adding compilation for Naomi
    • adding a prebuild
    • selecting a more powerful machine with more cores (default = 2 cores)
  • If you want to use Codespaces in your own github repository, just
    • add a ".devcontainer" folder, with
      • at least a "devcontainer.json" file,
      • (optionally, a Dockerfile if you want to specify your commands to build a container, instead of using a pre-built Docker image)
    • Tip: when launching your codespace for a 2nd time, be sure to do a git pull at the start inside your codespace to be in line with your repo, it will save you some problems.

Thanks:

About

Test repository to show how easy it is to compile applications for the Sega Dreamcast, with just a browser.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 100.0%