[Maintenance] Document relevant return values of PMD's AH=09h function

I'll leave a comprehensive, fully documented enum to interested
contributors, since that would involve research into basically the
entire history of the PC-9800 series, and even the clearly out-of-scope
PC-88VA. After all, PC-98 Touhou only needs to distinguish "OPN- /
PC-9801-26K-compatible sound sources handled by PMD.COM" from
"everything else", since all other PMD varieties are OPNA- /
PC-9801-86-compatible.

Part of P0139, funded by [Anonymous].
This commit is contained in:
nmlgc 2021-04-30 20:15:21 +02:00
parent d8ece227fd
commit 14cb1d3665
2 changed files with 9 additions and 2 deletions

View File

@ -12,7 +12,14 @@ typedef enum {
KAJA_GET_SONG_MEASURE = 0x05,
KAJA_GET_SONG_ADDRESS = 0x06,
KAJA_GET_VOLUME = 0x08,
PMD_GET_DRIVER_VERSION = 0x09,
// Returns the type of PMD driver in AL, as well as its version in DX.
// AL values relevant for PC-98 Touhou:
// • AL = 0xFF: Resident but no sound source
// • AL = 0x00: PMD.COM (for PC-9801-26K / OPN)
// • AL ≥ 0x01: Any other driver compatible to the PC-9801-86 / OPNA
PMD_GET_DRIVER_TYPE_AND_VERSION = 0x09,
PMD_GET_SE_ADDRESS = 0x0B,
PMD_SE_PLAY = 0x0C,
PMD_GET_WORKAREA_ADDRESS = 0x10,

View File

@ -7,7 +7,7 @@
bool16 snd_determine_mode(void)
{
_AH = PMD_GET_DRIVER_VERSION;
_AH = PMD_GET_DRIVER_TYPE_AND_VERSION;
geninterrupt(PMD);
_BX = false;
if(_AL != 0xFF) {