void C64::endOfRasterline() { vic->endRasterline(); rasterlineCycle = 1; rasterline++; if (rasterline >= vic->getRasterlinesPerFrame()) { // Last rasterline of frame rasterline = 0; vic->endFrame(); frame++; // Increment time of day clocks every tenth of a second if (frame % (vic->getFramesPerSecond() / 10) == 0) { cia1->incrementTOD(); cia2->incrementTOD(); } // Take a snapshot once in a while if (frame % (vic->getFramesPerSecond() * 4) == 0) { takeSnapshot(); } // Execute remaining SID cycles sid->executeUntil(cycles); /* int diff = sid->resid->writePtr - sid->resid->readPtr; debug(2,"SID readCnt: %8d writeCnt: %8d readPtr: %8d writePtr: %8d diff: %8d volume:%d target:%d\n", sid->resid->readDataCnt, sid->resid->writeDataCnt, sid->resid->readPtr, sid->resid->writePtr, (diff > 0) ? diff : 44100 + diff,sid->resid->volume,sid->resid->targetVolume); sid->resid->readDataCnt = sid->resid->writeDataCnt = 0; */ // Execute the IEC bus iec->execute(); // Count some sheep (zzzzzz) ... if (!getWarp()) synchronizeTiming(); } }
void C64::endOfRasterline() { vic->endRasterline(); rasterlineCycle = 1; rasterline++; if (rasterline >= vic->getRasterlinesPerFrame()) { // Last rasterline of frame rasterline = 0; vic->endFrame(); frame++; // Increment time of day clocks every tenth of a second if (frame % (vic->getFramesPerSecond() / 10) == 0) { cia1->incrementTOD(); cia2->incrementTOD(); } // Take a snapshot once in a while if (frame % (vic->getFramesPerSecond() * 4) == 0) { takeSnapshot(); } // Execute remaining SID cycles // sid->execute(vic->getCyclesPerFrame()); sid->executeUntil(cycles); // Execute the IEC bus iec->execute(); // Count some sheep (zzzzzz) ... if (!getWarp()) synchronizeTiming(); } }