2015-03-15 22:26:44 +00:00
|
|
|
snd_kaja_interrupt proc
|
[Reverse-engineering] PMD and MMD function call wrapper
Well, the naming.
Even though only TH02 actually uses MIDI (and thus, the MMD driver), every
game since then contains interrupt instructions for both functions. We could
just name it "pmd", since it seems like that's what came first - the AH
numbers of the 6 functions that make up MMD's interrupt API are identical to
those of the equivalent functions in PMD, even including gaps in the numbering
for PMD functions that don't have an equivalent in MIDI. However, except for
the FM sound effect handling and the key display in TH05's Music Room, these 6
functions are all the games actually use. Also, we already distinguish between
PMD and MMD in the driver check functions, and it might be confusing to only
imply PMD from now on?
So, "kaja" it is, collectively referring to the shared aspects of both
drivers.
2014-11-26 19:03:58 +00:00
|
|
|
@@ax = word ptr (cPtrSize)
|
|
|
|
|
2015-02-23 10:47:22 +00:00
|
|
|
cmp _snd_bgm_mode, SND_BGM_OFF
|
[Reverse-engineering] PMD and MMD function call wrapper
Well, the naming.
Even though only TH02 actually uses MIDI (and thus, the MMD driver), every
game since then contains interrupt instructions for both functions. We could
just name it "pmd", since it seems like that's what came first - the AH
numbers of the 6 functions that make up MMD's interrupt API are identical to
those of the equivalent functions in PMD, even including gaps in the numbering
for PMD functions that don't have an equivalent in MIDI. However, except for
the FM sound effect handling and the key display in TH05's Music Room, these 6
functions are all the games actually use. Also, we already distinguish between
PMD and MMD in the driver check functions, and it might be confusing to only
imply PMD from now on?
So, "kaja" it is, collectively referring to the shared aspects of both
drivers.
2014-11-26 19:03:58 +00:00
|
|
|
jz short @@ret
|
|
|
|
mov bx, sp
|
|
|
|
mov ax, ss:[bx+@@ax]
|
2015-02-23 10:47:22 +00:00
|
|
|
cmp _snd_bgm_mode, SND_BGM_MIDI
|
[Reverse-engineering] PMD and MMD function call wrapper
Well, the naming.
Even though only TH02 actually uses MIDI (and thus, the MMD driver), every
game since then contains interrupt instructions for both functions. We could
just name it "pmd", since it seems like that's what came first - the AH
numbers of the 6 functions that make up MMD's interrupt API are identical to
those of the equivalent functions in PMD, even including gaps in the numbering
for PMD functions that don't have an equivalent in MIDI. However, except for
the FM sound effect handling and the key display in TH05's Music Room, these 6
functions are all the games actually use. Also, we already distinguish between
PMD and MMD in the driver check functions, and it might be confusing to only
imply PMD from now on?
So, "kaja" it is, collectively referring to the shared aspects of both
drivers.
2014-11-26 19:03:58 +00:00
|
|
|
jz short @@midi
|
|
|
|
int 60h
|
|
|
|
jmp short @@ret
|
|
|
|
|
|
|
|
@@midi:
|
|
|
|
int 61h
|
|
|
|
|
|
|
|
@@ret:
|
|
|
|
ret 2
|
2015-03-15 22:26:44 +00:00
|
|
|
snd_kaja_interrupt endp
|
[Reverse-engineering] PMD and MMD function call wrapper
Well, the naming.
Even though only TH02 actually uses MIDI (and thus, the MMD driver), every
game since then contains interrupt instructions for both functions. We could
just name it "pmd", since it seems like that's what came first - the AH
numbers of the 6 functions that make up MMD's interrupt API are identical to
those of the equivalent functions in PMD, even including gaps in the numbering
for PMD functions that don't have an equivalent in MIDI. However, except for
the FM sound effect handling and the key display in TH05's Music Room, these 6
functions are all the games actually use. Also, we already distinguish between
PMD and MMD in the driver check functions, and it might be confusing to only
imply PMD from now on?
So, "kaja" it is, collectively referring to the shared aspects of both
drivers.
2014-11-26 19:03:58 +00:00
|
|
|
nop ; word alignment
|