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.
I might later question this decision.
I liked how each "hardware" example was roughly one self-contained file. In the
"input_keyboard" case, this is no longer true.
This improves ttf-convert slightly:
- variable size glyphs
- initialize metrics for glyphs with zero-size bitmaps (e.g "space")
- move the font/serialization structures to a common header
The keyboard example includes keyboard layout data for the HSS-0129 (Japanese)
Sega Saturn keyboard.