Skip to content

dkm/ada-dreamcast-helloworld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ada hello world on DreamCast

Thanks to rust-for-dreamcast! The rotating cube has been directly ported from the Rust example.

Requirements

Building instructions

Toolchain

To build the KallistiOS toolchain, you need a matching GNAT compiler. More specifically, if you're attempting to build GCC-14 for the Dreamcast, you must use GCC-14 on the host along with the GNAT compiler and tools at version 14.

$ cd $SOME_ROOT && git clone -b dkm/ada_support https://github.com/dkm/KallistiOS.git

And follow the regular KallistiOS build instructions.

The sample Hello world + OpenGL example

$ cd $SOME_ROOT && git clone https://github.com/dkm/kallistios_ada_runtime.git
  • Clone this repository:
$ cd $SOME_ROOT && git clone https://github.com/dkm/ada-dreamcast-helloworld.git
  • Generate bindings and texture files
$ gen.sh
  • Build the applications
$ cd $SOME_ROOT/dchelloworld/ && gprbuild  -f  dchelloworld.gpr -XRUNTIME_BUILD=Production

Execute with lxdream if you don't have a DreamCast (like me!).

$ lxdream-nitro  -u -e ./bin/gldemo2

Rotating cube with Ada logo.

Debug

  • run the emulator
$ lxdream-nitro --gdb-sh4=1235 -n  -u -e ./bin/dchelloworld
  • attach gdb
$ gdb-multiarch  --eval "target remote localhost:1235" bin/dchelloworld

Break on init or __ada_dchelloworld.