NESDev and Strangulation Records messageboards
Forum Index | FAQ | New User | Login | Search

Previous ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectRe: OK, let's talk about accuracy...  
Posted byDisch
Posted on10/27/04 4:24 PM
From IP66.82.9.24  



Anyway, I assume your core runs RunPPU() on PPU reads/writes in order to work properly, doesn't it?

Yep. The final call to RunPPU in the above pasted code is just to make sure the PPU completed the full frame. But yeah... on PPU related register writes/reads, RunPPU is called to catch up the PPU to the current CPU timestamp (so that changes can take effect even midscanline if needed).

This includes not only $2xxx registers, but $4014 as well as mapper controlled CHR swapping and mirroring mode switching -- anything that could alter the PPU or what's being drawn.

Have you seen any side-effects while running things like this (I mean, any game behaving in a weird manner)?

Still having problems with Battletoads (level 2 locks up)... but everything else I've tried runs fantastic.

And the last one, could you explain in detail what that "NMI tweak" consists on? I haven't seen that anywhere..

Here's the post by BT which sort of explains it:

http://nesdev.parodius.com/cgi-bin/wwwthreads/showpost.pl?Board=NESemdev&Number=878&Search=true&Forum=All_Forums&Words=NMI%25202002&Match=And&Searchpage=0&Limit=25&Old=allposts

Basically, if the game runs a wait for VBlank loop like:

loop:
 LDA $2002
 BPL loop

problems come up if the game does that while NMIs are enabled. If you turn on the VBlank flag in 2002 at the same time you execute NMI (which is what you're supposed to do), these games will run their NMI code, and usually clear the VBlank flag in the process. When the NMI returns, the flag is off, and so the game never breaks out of its 2002 loop.

At the end of BT's post, he mentions the option of raising the VBlank flag, running the CPU for X cycles, then executing NMI (so that the 2002 loop will have the opportunity to acknowledge the VBlank flag before the NMI trips). However when I implimented this... it ended up breaking Q's scanline demo (and even some games, if I remember right). So I developed the tweak I mentioned before: NMI is still triggered at the same time as the VBlank flag is set... but if it occurs on a 2002 read, status gets pushed with the N flag set.

Like I mentioned before... Baseball Stars (MMC1) is the token game that gave me this trouble... so it might be one you want to check out for testing purposes. Before I implimented the tweak, all I got was a black screen.



-
Entire Thread
Subject  Posted byPosted On
*OK, let's talk about accuracy...  Muchaserres10/12/04 5:03 PM
.*Re: OK, let's talk about accuracy...  <_Hyde_>10/12/04 10:10 PM
..*Re: OK, let's talk about accuracy...  Muchaserres10/14/04 5:37 PM
...*Re: OK, let's talk about accuracy...  Disch10/14/04 7:29 PM
....*Re: OK, let's talk about accuracy...  Muchaserres10/16/04 10:09 PM
.....*Re: OK, let's talk about accuracy...  Disch10/17/04 00:03 AM
......*Re: OK, let's talk about accuracy...  Muchaserres10/25/04 4:44 PM
.......*Re: OK, let's talk about accuracy...  Disch10/25/04 5:52 PM
........*Re: OK, let's talk about accuracy...  Muchaserres10/27/04 1:26 PM
..........Re: OK, let's talk about accuracy...  Disch10/27/04 4:24 PM
..........*Re: OK, let's talk about accuracy...  Muchaserres10/27/04 4:49 PM
...........*Re: OK, let's talk about accuracy...  Disch10/27/04 5:36 PM
............*Re: OK, let's talk about accuracy...  <_Hyde_>10/28/04 3:30 PM
.............*Re: OK, let's talk about accuracy...  Muchaserres11/4/04 3:41 PM
..............*Re: OK, let's talk about accuracy...  Muchaserres11/7/04 12:03 PM
...............*Re: OK, let's talk about accuracy...  <_Hyde_>11/7/04 5:22 PM
................*Re: OK, let's talk about accuracy...  Muchaserres11/8/04 3:02 PM
.................*Re: OK, let's talk about accuracy...  <_Hyde_>11/8/04 4:59 PM
...............*Re: OK, let's talk about accuracy...  Muchaserres11/7/04 1:52 PM
..............*Re: OK, let's talk about accuracy...  Muchaserres11/4/04 3:45 PM
.............*Re: OK, let's talk about accuracy...  Disch10/28/04 9:14 PM
..............*Re: OK, let's talk about accuracy...  <_Hyde_>10/29/04 01:29 AM
...............*Re: OK, let's talk about accuracy...  Disch10/29/04 02:04 AM
................*Re: OK, let's talk about accuracy...  <_Hyde_>10/29/04 04:18 AM
.................*Re: OK, let's talk about accuracy...  Laughy11/8/04 03:26 AM
.............*Re: OK, let's talk about accuracy...  Muchaserres10/28/04 5:15 PM
..............*Re: OK, let's talk about accuracy...  <_Hyde_>10/29/04 01:33 AM
...............*Re: OK, let's talk about accuracy...  Muchaserres10/29/04 1:51 PM
................*Re: OK, let's talk about accuracy...  <_Hyde_>10/29/04 4:40 PM
.................*Re: OK, let's talk about accuracy...  Muchaserres10/31/04 07:58 AM
..................*Re: OK, let's talk about accuracy...  Nessie10/31/04 10:21 AM
...................*Re: OK, let's talk about accuracy...  Muchaserres11/4/04 3:27 PM
....*Re: OK, let's talk about accuracy...  Muchaserres10/14/04 8:05 PM
.*Re: OK, let's talk about accuracy...  Disch10/12/04 5:38 PM
..*Re: OK, let's talk about accuracy...  Muchaserres10/14/04 4:47 PM
.*Re: OK, let's talk about accuracy...  quietust10/12/04 5:28 PM
..*Re: OK, let's talk about accuracy...  quietust10/12/04 5:30 PM
...*Re: OK, let's talk about accuracy...  Muchaserres10/14/04 4:34 PM
Jump to

Memblers' homepage             Contact Me

Forums powered by WWWThreads Demo