Let there be music
New intermediate goal: creating a demo that runs on a standard Amiga 500. This means kickstart 1.3 is back in the picture.
First step: let there be music! Most of the mod-player libraries I tried won't work on KS1.3, but then I found the awesome (and very recent) PTPlayer, made by PHX in Assembler. It's not entirely system friendly, but for a demo, that'll do.
That was - again - a steep hill to climb: figuring out how the compile the library and use it from a C program. The compiler started throwing weird stuff around like FAR and NEAR data descrepencies and what not. Errr... Whut ?
But after my usual approach: keep banging on things untill it works - I ended up with something that worked and that didn't look all that bad.
Code here on Github. It's a small wrapper function that enables me to just write
play_mod("somefile.mod") and be done with it. Nice.
Lessons learned:
- how to compile assembler code to an object
- how to link that object and call it from C code
- how to load a file from unknown size into chip memory
- how to clean up after myself, so I don't have to reboot the Amiga after each test because of a crash

Update: If you want to target 1.3 and want to be system-friendly: Stingray has patched the PTReplay.library to work with 1.3. Awesome!
Written on 07/11/2023 by Steffest
|