User:Freem/Sound Drivers/MVSTracker

The MVSTracker driver exists in two versions:
 * 1) The original version by Ivan Mackintosh
 * 2) The modified version by Pascal and Kaneda

The latter version of the engine is able to target the Neo-Geo and Megadrive/Genesis. It splits out common routines and macros into separate files.

According to Jeff Kurtz, this driver does not work on hardware. It seems that the required wait times for the address and data writes are not in place. (This is true for both the original and modified versions.)

=Original Version (v0.1)= The original MVSTracker Z80 driver is contained in a file called.

Variables
From :
 * (byte) &mdash; Song position
 * (byte) &mdash; Song length
 * (byte) &mdash; Current working Frequency MSB
 * (byte) &mdash; Current working Frequency LSB
 * (byte) &mdash; Current working Block
 * (byte) &mdash; Current working instrument number
 * (byte) &mdash; Effect number
 * (byte) &mdash; Effect value
 * (byte[4]) &mdash; Current instrument number for each channel
 * (word) &mdash; Pattern position
 * (byte) &mdash; Pattern count(?)
 * (byte) &mdash; Tempo count
 * (byte) &mdash; Current tempo
 * (word) &mdash; Instrument start address?
 * (word) &mdash; Tune start address?
 * (byte) &mdash; Music playing flag
 * (byte) &mdash; Pattern break(?)
 * (byte) &mdash; Next ADPCM-A channel to use (cycled in NMI_ProcessADPCM)
 * (byte) &mdash; Current ADPCM-A channel to use

Macros

 * &mdash; define a byte in RAM?
 * &mdash; define a word in RAM?
 * &mdash; define a series of bytes in RAM?
 * &mdash; push af, do rst 0x08 (write to ports 4/5), pop af
 * &mdash; push af, do rst 0x10 (write to ports 6/7), pop af
 * &mdash; do rst 0x18; "instrument# 0..31 multiply by 32; result in de"

Code
(todo; this is going to take a bit to clean up and format into wiki syntax)

=Modified (v0.2, 08Sep2006 by Kaneda)= (todo)