Why does nestest cycle count reset to 0?

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
nuker
Posts: 11
Joined: Tue Apr 25, 2017 1:10 pm

Why does nestest cycle count reset to 0?

Post by nuker »

I am just wondering why the cycle count for the nestest rom golden log goes from:

line 46: CYC: 333
line 47: CYC: 1

Is this something my emulator should be doing?
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Why does nestest cycle count reset to 0?

Post by lidnariq »

CYC is measuring PPU X coordinate. It should range from 0 through 340.
nuker
Posts: 11
Joined: Tue Apr 25, 2017 1:10 pm

Re: Why does nestest cycle count reset to 0?

Post by nuker »

lidnariq wrote:CYC is measuring PPU X coordinate. It should range from 0 through 340.
thanks for the response :). I am just trying to test my CPU at this moment and haven't started the PPU yet. Should I just print cycleCount % 341?
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Why does nestest cycle count reset to 0?

Post by lidnariq »

PPU cycles are three times as fast as CPU cycles, e.g. "LDA #0" will cause the CYC count to increase by 6. But otherwise that's ... probably safe?
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Why does nestest cycle count reset to 0?

Post by thefox »

Just ignore the CYC value when you compare the logs.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Post Reply