===========================
MidiTracker README
===========================
14-Feb-2017

This is the MidiTracker source package of version 1.2.5. Maybe someone can put it to good use.

At the time I wrote the program, assembler was my strongest programming language. Hence all source code is in .S files. :)

A few sample songs are included.


===========================
How To Build
===========================

I have used Asm-One which should be able to handle all preprocessor directives.

Follow these steps to build and run MT:

1. In Asm-One, load mt.s which includes all other files (Command: 'r').

2. Make some adaptations to mt.s:
a) mc68020 equ 1 -> 0 = 68000 build, 1 = 68020+ build
b) executable equ 0 -> 0 = build to run from Asm-One, 1 = build to save to disk
Set this to 1 if you want to build an executable, or 0 if you want to run it via 'js' from the assembler.
c) deutsch_locale equ 0 -> ignore this ;-)
d) incdir sd0:asm/
This was a reset-proof ramdisk device. I had all files stored there for speed-up during assembly. Change this path to where all other source files are located.

3. Assemble everything (Command: 'a'). If all goes well and there are no errors, the whole thing is assembled in a few seconds. Otherwise, go in-depth with each error and maybe seek some help.

4a. To run MT from Asm-One type 'js' (Command: 'js' -- as in, jump to subroutine at label 's').
For this step use 'executable equ 0' in step 2b.

*** instead of step 4a ***
4b. To save an executable to disk: type 'wb' (Command: 'wb' = write binary, not sure here... or was it 'wo'? Check the Asm-One docs if unsure).
For this step use 'executable equ 1' in step 2b.
Do not use 'wb' after quitting MT and returning from 'js'.


Assembly hint:
If you changed a file included by mt.s, type 'zi' (zap includes) in Asm-One to re-include all files.


===========================
Other Files
===========================

The file MidiTracker_E.sguide is used to generate an AmigaGuide help file. I used the tool 'sguide' to compile it.

--- mt-song-fileformat.txt
This file describes the .mt file format.
There are comments for each new file version. A file loader should check the version in the mtsong header, and load fields up to and including the version number indicated in the comment, or skip them if the version in the header is less than indicated in the comment.

--- mt.cat
This file is used to build .catalog files for English and German. Unfortunately I forgot how it was compiled. I guess there was a command line tool out there that could do that. Sorry!

--- mt-windows.gui
Can be opened using GadToolsBox. I have no recollection whether this file is used during compilation or not. :-o


===========================
Keyfile Maker
===========================

For the keyfile maker there was never an executable. I had always run it from within Asm-One (using 'js').

A MidiTracker keyfile is in fact a library. First you need to build a template file ('keyfilebody'). Then you run the keyfilemaker which inserts some checksums and the name of the licensee into that template. I know it's complicated, but I didn't think further at the time. :-o

To build and install a keyfile follow these steps:

1. In Asm-One, load 'keyfilebody.S' (Command: 'r') and assemble it (Command: 'a').

2. Write the binary to a file called 'keyfilebody' somewhere, maybe in ram: . (Command: 'wb' -> again, not sure about this command, please verify with Asm-One docs)

3. In Asm-One, load keyfilemaker.S (Command: 'r').

4. Change the line 'incdir asm:' to point to the path with all the other source files.

5. The macro NAME describes the name of the licensee. This name can later be seen somewhere in MT. Change this text to your liking.

6. At the bottom of the file, look for 'keyfile_start'. Change 'mt:keyfilebody' so it points to the file created in step 2.

7. Assemble the file (Command: 'a'). If there are any errors, check steps 4-6 or do something that makes sense to fix these errors. ;-)

8. Run the code (Command: 'js').

9. Your keyfile is now ready at ram:miditracker-key. Copy it to the same path with the MT executable (not sure here, maybe into libs: ?).


Anyway, Scott Watson, my good ol' beta tester (shout out when you read this ;-) ), has thankfully agreed to share his keyfile with the public. I consider MidiTracker now public domain, therefore anyone can do with the code as they like! Regarding keyfiles the decision to share is up to the keyfile owner. If you decide to share it with the public or other individuals, that is absolutely fine with me. (It is even recommended since it is difficult to build a new file from scratch.)


===========================
Contact
===========================

For questions you can email me at Sven Thoennissen <biochill@me.com>.
Good luck with MidiTracker!

Cheers,
Sven
