Thanks to rust-for-dreamcast! The rotating cube has been directly ported from the Rust example.
- Ada-enabled KallistiOS toolchain
- KallistiOS Ada Runtime
- gprbuild (18 from debian is too old, 22 is known to work). Use GNAT-FSF-builds releases for example.
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.
- Clone KallistiOS Ada Runtime:
$ 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
- 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
.