Model3.cpp: Comment describing scan line timing.

This commit is contained in:
Bart Trzynadlowski 2023-09-25 14:45:57 +02:00 committed by GitHub
parent 801945d066
commit 7867c0145e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2045,7 +2045,16 @@ void CModel3::RunMainBoardFrame(void)
{
UINT32 start = CThread::GetTicks();
// Compute display timings
/*
* Compute display timings. Refresh rate is 57.524160 Hz and we assume frame timing is the same as System 24:
*
* - 25 scanlines from /VSYNC high to /BLANK high (top border)
* - 384 scanlines from /BLANK high to /BLANK low (active display)
* - 11 scanlines from /BLANK low to /VSYNC low (bottom border)
* - 4 scanlines from /VSYNC low to /VSYNC high (vertical sync. pulse)
*
* 424 lines total: 384 display and 40 blanking/vsync.
*/
unsigned ppcCycles = m_config["PowerPCFrequency"].ValueAs<unsigned>() * 1000000;
unsigned frameCycles = (unsigned)((float)ppcCycles / 57.524160f);
unsigned lineCycles = frameCycles / 424;