From e76bb2ec7a6d1fe3313a4b1257d300bc745ed7da Mon Sep 17 00:00:00 2001 From: "Eric P. Nusbaum" Date: Thu, 21 Nov 2024 13:12:08 -0500 Subject: [PATCH] Add Frame Counter --- ADNES/Emulator.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ADNES/Emulator.cs b/ADNES/Emulator.cs index 512c6b2..a88cadd 100644 --- a/ADNES/Emulator.cs +++ b/ADNES/Emulator.cs @@ -56,6 +56,11 @@ public class Emulator( /// public long TotalPPUCycles => _ppu.Cycles; + /// + /// Total Frames Rendered by the NES Emulator + /// + public long TotalFrames; + /// /// Height of Frames Rendered by the NES Emulator /// @@ -199,6 +204,7 @@ private void Run() if (_ppu.FrameReady) { processFrameDelegate(_ppu.FrameBuffer); + TotalFrames++; _ppu.FrameReady = false; //Throttle our frame rate here to the desired rate (if required)