MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / OPLTimerOver

Function OPLTimerOver

src/Engine/Adlib/fmopl.cpp:1378–1399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1376}
1377
1378int OPLTimerOver(FM_OPL *OPL,int c)
1379{
1380 if( c )
1381 { /* Timer B */
1382 OPL_STATUS_SET(OPL,0x20);
1383 }
1384 else
1385 { /* Timer A */
1386 OPL_STATUS_SET(OPL,0x40);
1387 /* CSM mode key,TL control */
1388 if( OPL->mode & 0x80 )
1389 { /* CSM mode total level latch and auto key on */
1390 int ch;
1391 if(OPL->UpdateHandler) OPL->UpdateHandler(OPL->UpdateParam,0);
1392 for(ch=0;ch<9;ch++)
1393 CSMKeyControll( &OPL->P_CH[ch] );
1394 }
1395 }
1396 /* reload timer */
1397 if (OPL->TimerHandler) (OPL->TimerHandler)(OPL->TimerParam+c,(double)OPL->T[c]*OPL->TimerBase);
1398 return OPL->status>>7;
1399}

Callers

nothing calls this directly

Calls 2

OPL_STATUS_SETFunction · 0.85
CSMKeyControllFunction · 0.85

Tested by

no test coverage detected