timing fix for PCEngine from Barry @ forum
This commit is contained in:
parent
569125abfb
commit
5cd15b17cb
|
@ -625,15 +625,20 @@ INT32 PCEFrame()
|
||||||
PCECompileInputs();
|
PCECompileInputs();
|
||||||
|
|
||||||
INT32 nCyclesTotal = (INT32)((INT64)7159090 * nBurnCPUSpeedAdjust / (0x0100 * 60));
|
INT32 nCyclesTotal = (INT32)((INT64)7159090 * nBurnCPUSpeedAdjust / (0x0100 * 60));
|
||||||
|
INT32 nCyclesDone = 0;
|
||||||
|
INT32 nCyclesSegment = 0;
|
||||||
|
|
||||||
h6280Open(0);
|
h6280Open(0);
|
||||||
|
|
||||||
for (INT32 i = 0; i < 262; i++)
|
for (INT32 i = 0; i < 262; i++)
|
||||||
{
|
{
|
||||||
h6280Run(nCyclesTotal / 262);
|
INT32 nNext;
|
||||||
|
nNext = (i + 1) * nCyclesTotal / 262;
|
||||||
|
nCyclesSegment = nNext - nCyclesDone;
|
||||||
|
nCyclesDone += h6280Run(nCyclesSegment);
|
||||||
interrupt();
|
interrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pBurnSoundOut) {
|
if (pBurnSoundOut) {
|
||||||
c6280_update(pBurnSoundOut, nBurnSoundLen);
|
c6280_update(pBurnSoundOut, nBurnSoundLen);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue