fix opl additional time counter status bit setting for the second timer
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3177
This commit is contained in:
parent
c8b4ac03a8
commit
bc593183b6
2 changed files with 6 additions and 2 deletions
|
@ -1922,6 +1922,7 @@ static unsigned char OPLRead(FM_OPL *OPL,int a)
|
|||
|
||||
#endif
|
||||
if (OPL->st[0]) {
|
||||
/* Timer A */
|
||||
if (OPL->TC[0]) OPL->TC[0]--;
|
||||
else {
|
||||
OPL->TC[0]=OPL->T[0]*20;
|
||||
|
@ -1929,10 +1930,11 @@ static unsigned char OPLRead(FM_OPL *OPL,int a)
|
|||
}
|
||||
}
|
||||
if (OPL->st[1]) {
|
||||
/* Timer B */
|
||||
if (OPL->TC[1]) OPL->TC[1]--;
|
||||
else {
|
||||
OPL->TC[1]=OPL->T[1]*20;
|
||||
OPL_STATUS_SET(OPL,0x40);
|
||||
OPL_STATUS_SET(OPL,0x20);
|
||||
}
|
||||
}
|
||||
return OPL->status & (OPL->statusmask|0x80);
|
||||
|
|
|
@ -2446,6 +2446,7 @@ static unsigned char OPL3Read(OPL3 *chip,int a)
|
|||
if( a==0 )
|
||||
{
|
||||
if (chip->st[0]) {
|
||||
/* Timer A */
|
||||
if (chip->TC[0]) chip->TC[0]--;
|
||||
else {
|
||||
chip->TC[0]=chip->T[0]*20;
|
||||
|
@ -2453,10 +2454,11 @@ static unsigned char OPL3Read(OPL3 *chip,int a)
|
|||
}
|
||||
}
|
||||
if (chip->st[1]) {
|
||||
/* Timer B */
|
||||
if (chip->TC[1]) chip->TC[1]--;
|
||||
else {
|
||||
chip->TC[1]=chip->T[1]*20;
|
||||
OPL3_STATUS_SET(chip,0x40);
|
||||
OPL3_STATUS_SET(chip,0x20);
|
||||
}
|
||||
}
|
||||
return chip->status;
|
||||
|
|
Loading…
Add table
Reference in a new issue