Created
June 28, 2022 22:03
-
-
Save bit-hack/691793f704dfc7a2ddb5a4c6e78d7cb2 to your computer and use it in GitHub Desktop.
blaster.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------- | |
PORTS | |
---------------------------------------------------------------- | |
PORT_DSP_RESET = PORT_BASE + 0x6, // wo | |
PORT_DSP_READ_DATA = PORT_BASE + 0xA, // ro | |
// returns 0xAA after reset | |
PORT_DSP_WRITE_CMD_DATA = PORT_BASE + 0xC, // w | |
PORT_DSP_WRITE_BUF_STATUS = PORT_BASE + 0xC, // r | |
// MSB set when not ready | |
PORT_DSP_READ_BUF_STATUS = PORT_BASE + 0xE, // ro | |
// clears 8bit IRQ | |
// returns 0xff if ready for read else 0x7f | |
---------------------------------------------------------------- | |
COMMANDS | |
---------------------------------------------------------------- | |
DSP_CMD_PCM8_OUT = 0x10, data | |
DSP_CMD_PCM8_SC_OUT = 0x14, lenLSB, lenMSB | |
// { lenMSB, lenLSB } number of bytes to output | |
// clears 8bit IRQ | |
DSP_CMD_MIDI_OUT = 0x38, data | |
// output single byte to midi interface | |
DSP_CMD_TIME_CONST = 0x40, tcMSB | |
// tc = 65536 - (256000000 / sample_rate) | |
// sample_rate = 1000000 / (256 - tcMSB) | |
DSP_CMD_DAC_PAUSE = 0x80, lenLSB, lenMSB | |
DSP_CMD_DMA_PAUSE = 0xD0, | |
DSP_CMD_DAC_ON = 0xD1, | |
DSP_CMD_DAC_OFF = 0xD3, | |
DSP_CMD_DMA_CONTINUE = 0xD4, | |
DSP_CMD_DSP_VERSION = 0xE1, <read> verMajor, verMinor | |
// returns 0x01, 0x05 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment