SONA SOUND DRIVER version 0.50
©2021-2022 Javier Degirolmo

This is an early release of the Sona sound driver. As such it's still missing
quite a bunch of important features, it's being released mostly for the sake of
Miniplanets REMIX Ver. and also so people can start experimenting with it.

Documentation and tooling is currently sparse, sorry.


=== How to use from asm ===

Copy the files from api-asm somewhere into your project and then include them
wherever it's most appropriate. Make sure that sonadef.68k is included before
the other two.

   sonadef.68k    Macros and other definitions
   sona.68k       The Sona API proper
   sonablob.68k   The program to copy into Z80 RAM

Call Sona_Init (no arguments needed) to initialize the sound driver. You can
then use the rest of the Sona API as needed.


=== Sona-related tools ===

The tools directory has a bunch of tools useful for working with Sona:

   - mml2sona converts music composed in MML into Sona tracks
   - tfi2spat converts TFM Maker instruments into Sona's FM format
   - eif2spat converts Echo FM instruments into Sona's FM format
   - wav2swav converts WAV files into Sona's PCM format
   - ewf2swav converts Echo PCM instruments into Sona's PCM format
   - blob2asm68k converts raw binary files into 68000 asm

None of them have external dependencies. If you're on *nix you should be able
to build them by typing `make` as usual, otherwise compile all the .c files and
link everything.


=== Z80 source code ===

The Z80 program source code is in src-z80. It was written for z80asm (see
https://savannah.nongnu.org/projects/z80asm/) but tried to keep the code as
assembler agnostic as possible. You may still need to do some tweaks (especially
the macro syntax).

Build buildme.z80, it will include everything else.

To use the resulting blob in the asm API, build build2asm68k (check the tools
directory) and then call it this way (replace filenames as needed), then replace
the original sonablob.68k with the new one:

   blob2asm68k z80.blob sonablob.68k Sona_Blob Sona_BlobSize

Alternatively, you can modify sonablob.68k to incbin your own blob.
