The Makefile duplication was done out of laziness; the main Makefile
should be rewritten in a similar fashion to this one to allow
per-target selection of linker script.
This is now provided by default in saturn/common.mk.
Also updates moved header names, changed bit macro names, and changes
to the common.mk build process.
This adds both a midi generator and a midi type 1 simulator.
While I would have preferred to use an existing tool for this, I found
that timidity++ does not emit pitch wheel events correctly, and I
don't know of another widely-distributed tool that does midi-to-midi
format conversion.
The c++ and python versions were co-developed. I wrote one to test the
other. There is more cleanup to do, but `roundtrip.cpp` produces a
valid type 0 midi file given a type 1 or type 0 midi file as input.
This also adds nullptr checking to decref--it seemed the functions
needing nullptr checks immediately prior to the decref call was
beginning to exceed the functions that had "implied" nullptr checking
as a part of their natural flow-control.
This adds a new overwrite_line is very useful for dealing with
cow-related boilerplate.
There is some refactoring possible (and perhaps accidental correctness
improvement) if more functions used 'overwrite_line'.
This implements the "copy" portion of copy-and-paste and the "delete"
portion of cut-and-paste.
'backspace' was also partially refactored to share code with the new
'selection_delete'.
I am excited in how expressiveness/readability improved in 'backspace'
after selection_delete was implemented.
The Saturn BIOS does not (un)initialize the DSP. Without zeroizing the DSP
program, the SCSP DSP appears to have a program that continuously writes to
0x30000 through 0x3ffff in sound RAM, which has the effect of destroying any
samples stored there.
This demonstrates the most basic possible SCSP usage.
Strangely this does not work in Kronos, only in mednafen and on real
hardware. I'd like to find a hack, if possible, that fixes Kronos
playback.