#pragma once #include "pch.h" #include "NES/NesPpu.h" class NsfPpu final : public NesPpu { public: NsfPpu(NesConsole* console) : NesPpu(console) { } virtual ~NsfPpu() {} void UpdateTimings(ConsoleRegion region, bool overclockAllowed) override { NesPpu::UpdateTimings(region, false); } __forceinline void StoreSpriteAbsoluteAddress() { } __forceinline void StoreTileAbsoluteAddress() { } __forceinline void ProcessScanline() { } __forceinline void DrawPixel() { } void* OnBeforeSendFrame() { return nullptr; } void Reset(bool softReset) override { //Force a full reset of the PPU for NSFs. Otherwise, the option to prevent //PPU reset on console reset (Famicom behavior) prevents the time from //resetting to 0:00 when switching tracks. NesPpu::Reset(false); } void Run(uint64_t runTo) override { do { //Always need to run at least once, check condition at the end of the loop (slightly faster) if(_cycle < 340) { //Process cycles 1 to 340 _cycle++; } else { //Process cycle 0 ProcessScanlineFirstCycle(); } _masterClock += _masterClockDivider; _emu->ProcessPpuCycle(); } while(_masterClock + _masterClockDivider <= runTo); } };