https://github.com/dkm/ada-dreamcast-helloworld
https://github.com/dkm/ada-dreamcast-helloworld
ada dreamcast kallistios sh4
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dkm/ada-dreamcast-helloworld
- Owner: dkm
- Created: 2024-02-09T15:04:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-28T19:49:23.000Z (over 1 year ago)
- Last Synced: 2025-04-02T14:11:31.611Z (about 1 year ago)
- Topics: ada, dreamcast, kallistios, sh4
- Language: Ada
- Homepage:
- Size: 10.4 MB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING3
Awesome Lists containing this project
- awesome-dreamcast - Ada Hello World - Hello World example using the Ada language by [Marc Poulhiès](https://poulhies.fr/) (Languages)
README
# Ada hello world on DreamCast
Thanks to [rust-for-dreamcast](https://github.com/darcagn/rust-for-dreamcast/)!
The rotating cube has been directly ported from the Rust example.
## Requirements
* Ada-enabled [KallistiOS toolchain](https://github.com/dkm/KallistiOS)
* [KallistiOS Ada Runtime](https://github.com/dkm/kallistios_ada_runtime)
* gprbuild (18 from debian is too old, 22 is known to work). Use
[GNAT-FSF-builds
releases](https://github.com/alire-project/GNAT-FSF-builds/releases/tag/gprbuild-22.0.0-1)
for example.
## 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.
``` sh
$ 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
- Clone [KallistiOS Ada Runtime](https://github.com/dkm/kallistios_ada_runtime):
``` sh
$ cd $SOME_ROOT && git clone https://github.com/dkm/kallistios_ada_runtime.git
```
- Clone this repository:
``` sh
$ cd $SOME_ROOT && git clone https://github.com/dkm/ada-dreamcast-helloworld.git
```
- Generate bindings and texture files
``` sh
$ gen.sh
```
- Build the applications
``` sh
$ cd $SOME_ROOT/dchelloworld/ && gprbuild -f dchelloworld.gpr -XRUNTIME_BUILD=Production
```
Execute with `lxdream` if you don't have a DreamCast (like me!).
``` sh
$ lxdream-nitro -u -e ./bin/gldemo2
```

## Debug
- run the emulator
``` sh
$ lxdream-nitro --gdb-sh4=1235 -n -u -e ./bin/dchelloworld
```
- attach `gdb`
``` sh
$ gdb-multiarch --eval "target remote localhost:1235" bin/dchelloworld
```
Break on `init` or `__ada_dchelloworld`.