Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dkm/ada-dreamcast-helloworld
https://github.com/dkm/ada-dreamcast-helloworld
ada dreamcast kallistios sh4
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dkm/ada-dreamcast-helloworld
- Owner: dkm
- Created: 2024-02-09T15:04:52.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-01T06:35:39.000Z (6 months ago)
- Last Synced: 2024-08-02T14:05:08.319Z (3 months ago)
- Topics: ada, dreamcast, kallistios, sh4
- Language: Ada
- Homepage:
- Size: 10.4 MB
- Stars: 2
- Watchers: 3
- 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
```
![Rotating cube with Ada logo.](./res/cube.gif)## 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`.