Hblank - Palette swap mid frame, etc....

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Hblank - Palette swap mid frame, etc....

Post by rainwarrior »

tokumaru wrote:
rainwarrior wrote:Yeah, what I'm vouching most for is Nintendulator's debugger's pixel timing feature. Like, don't try and do it by just visual output alone
The problem is that a pixel timing feature doesn't mean much if the visual output doesn't match what the hardware shows. It's not that Nintendulator is way off, so it's debugging features are indeed *very* useful, but in my old tests, Nestopia consistently outperformed Nintendulator for tiny timing issues like this, even if not by much, so I thought I'd mention it.
In my experience the visual output will usually match Nintendulator if you're within the tolerance range. (With enough leeway you can get it to work universally across hardware and many emulators too.)

If you're at the edge, that's where you tend to get problems. ...and if you're just going by visual you can't tell the edge from the middle of tolerance. The debugger makes that easy to target.

That's the problem with Nestopia for testing. Whether or not is has more accurate timing (unsure), it has no debugging features.

Of course, you could try to feel out the edges of the timing by writing a ROM that lets you adjust it on the fly (and outputs the relevant), and you could find the low/high point where it breaks. That'd probably get you the best info from a hardware test, and you could evaluate emulators with it too... (maybe one of us should write something like this... an hblank timing explorer ROM)
Sour
Posts: 891
Joined: Sun Feb 07, 2016 6:16 pm

Re: Hblank - Palette swap mid frame, etc....

Post by Sour »

rainwarrior wrote:Nintendulator's debugger's pixel timing feature
Is this an actual feature, or are you referring to the "ticks" textbox showing the CPU/PPU timing? I took a look and wasn't really able to see anything that Nintendulator has that Mesen & FCEUX's debuggers don't have in terms of showing the timing where instructions occur vs the PPU? (FCEUX's relatively low accuracy aside)

Mostly asking since if this is an actual useful feature in Nintendulator that I'm not aware of, I'd try to add something similar to Mesen.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Hblank - Palette swap mid frame, etc....

Post by rainwarrior »

Sour wrote:
rainwarrior wrote:Nintendulator's debugger's pixel timing feature
Is this an actual feature, or are you referring to the "ticks" textbox showing the CPU/PPU timing? I took a look and wasn't really able to see anything that Nintendulator has that Mesen & FCEUX's debuggers don't have in terms of showing the timing where instructions occur vs the PPU? (FCEUX's relatively low accuracy aside)
Yes, just showing the current pixel position of the scanline in the debugger while stepping is what I'm referring to. FCEUX has it as well, just the timing seems to be shifted slightly. I think generally the relative CPU timing of all of them is perfect but the specific timing of synchronization events like sprite 0 hit or when exactly PPU writes take effect, etc. is the source of divergence between emulators and each-other and hardware.

Edit: I've started a test ROM, not really any kind of conclusive result yet but trying to see how emulators differ in this regard: https://forums.nesdev.com/viewtopic.php?f=3&t=16308
Post Reply