It is currently Sun Oct 22, 2017 1:54 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 79 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: Mon Feb 20, 2017 4:23 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
@fred - I added a delay of 3 PPU cycles, there's no flickering scores in those games. By the way, your test displays correct triangles if I press down and right a few times. Is this correct or... should be fine since the startup?


Top
 Profile  
 
PostPosted: Mon Feb 20, 2017 5:19 pm 
Offline

Joined: Fri Dec 30, 2011 7:15 am
Posts: 41
Location: Sweden
Pressing down and right makes the 2006 write happen later so it's likely it should be that way, yes. I don't know what an actual nes shows.

tepples: Neato image! Too bad i placed the tiles on row 0. I'll try to lower them, but adjusting any timing is a real pain, haha. Adjusting just about anything is a pain - I'd remove up/down and make left/right smarter and display the current dot offset if I could simply add it.


Top
 Profile  
 
PostPosted: Mon Feb 20, 2017 6:06 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
fred wrote:
Pressing down and right makes the 2006 write happen later so it's likely it should be that way, yes. I don't know what an actual nes shows.

I got bad triangles in older versions of my emulator. I believe to be in the right way. ^_^;;


Top
 Profile  
 
PostPosted: Tue Feb 21, 2017 7:48 am 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 710
Location: New York, NY
fred wrote:
Pressing down and right makes the 2006 write happen later so it's likely it should be that way, yes. I don't know what an actual nes shows.


Thanks for getting the ball rolling on this test ROM. Can we get it onto real hardware to see if the PPU v-register write delay actually exists? And, possibly to measure that delay?


Top
 Profile  
 
PostPosted: Tue Feb 21, 2017 9:05 am 
Offline

Joined: Fri Dec 30, 2011 7:15 am
Posts: 41
Location: Sweden
Turns out it wasn't too bad to simplify the controls! Phew. Also managed to print the current offset. I'd still like to add an explanation in there and move the tiles down, but that's for another time.

Press right or left to increase or decrease the dot offset by one, respectively.

For example, in nintedulator: the second "sta 0x2006" starts at dots 236-237 at offset 0, and dots 244-245 at offset 8 (max).
Offset 0-5: t->v happens before the Y inc.
Offset 6: t->v happens both before and after the Y inc. (shakes)
Offset 7-8: t->v happens after the Y inc.

Do note that this is simply what nintendulator does, other emulators and hardware might differ.

As per usual, you can get the latest version from github (direct link to the rom).


Top
 Profile  
 
PostPosted: Tue Feb 21, 2017 9:58 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
fred wrote:
For example, in nintedulator: the second "sta 0x2006" starts at dots 236-237 at offset 0, and dots 244-245 at offset 8 (max).
Offset 0-5: t->v happens before the Y inc.
Offset 6: t->v happens both before and after the Y inc. (shakes)
Offset 7-8: t->v happens after the Y inc.

Triangles are OK on offset 7 here.


Top
 Profile  
 
PostPosted: Tue Feb 21, 2017 3:05 pm 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 285
I made the change on Mesen to see the impact it could have.
It seems to fix Bart vs. the Space Mutants (USA), and doesn't break anything that I have noticed.

Out of the 223 automatic test roms I run on Mesen, only the following had a different visual output after the change:
Code:
50) full_palette failed (477)
51) full_palette_smooth failed (325)
206) NEStress failed (80)
218) test_ppu_read_buffer failed (19)
Number in parenthesis = number of frames that do not match the original recording for the test.
Note that all 4 tests still pass, it's just that some frames have been affected by the change.

On top of the test roms, I also have 49 game test scenarios, a few of them have changes:
Code:
10) Dragon Ball 3 - Gokuu Den (J) [!] failed (114)
17) Crisis Force (J) [!] failed (1)
29) Megaman III (U) [!] failed (293)
33) Super Mario Bros. 3 (J) (PRG1) [!] failed (3)
34) Castlevania III - Dracula's Curse (U) [!] failed (1)
36) Laser Invasion (U) [!] failed (1)
38) Klax (Tengen) [!] failed (2)
39) Skull & Crossbones (Tengen) [!] failed (178)
46) Fantastic Adventures of Dizzy, The (USA) failed (42)
48) MiG 29 - Soviet Fighter (USA) failed (222)
(Also: The Battletoads test is not affected by this change, but my test only covers the loading of level 1, it doesn't test the potential freezes on level 2)

I've checked all the games with a large amount of changed frames (>10) and visually, they appear to be no better or worse than before. All of these games have "glitches" on the screen due to imperfect screen splits, so I am assuming that the way the glitch displays may be slightly affected by this change.

Pre-fix, Mesen only displays the test's triangles properly at offset 7 & 8. (Offset 6 = unstable picture)
Post-fix, the triangles display properly for offsets 5, 6, 7 & 8. (Offset 4 = unstable picture)

So, this would still need to be validated on a NES, but it seems like the delay on the VRAM update after a $2006 write may actually be a thing.

Edit: It also fixes the screen shaking during the introduction sequence in Wizards & Warriors III (USA).


Top
 Profile  
 
PostPosted: Wed Feb 22, 2017 9:31 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 710
Location: New York, NY
Related to this discussion, does NMI suppression suggest that asserting NMI is actually delayed by a few PPU cycles? Meaning, the suppression is just a consequence of the delay (i.e. the flag is changed before the delay expired; so, it had no effect).


Top
 Profile  
 
PostPosted: Thu Feb 23, 2017 2:52 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
zeroone wrote:
Related to this discussion, does NMI suppression suggest that asserting NMI is actually delayed by a few PPU cycles? Meaning, the suppression is just a consequence of the delay (i.e. the flag is changed before the delay expired; so, it had no effect).

What's the relationship between $2006 delay and... NMIs? What?


Top
 Profile  
 
PostPosted: Sat Feb 25, 2017 1:51 pm 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 285
Is there any chance someone could run fred's test on a NES and see what the results are? (i.e how are the triangles displayed for each of the 8 offset values)
The actual result is probably hidden on CRTs due to overscan, but I'm assuming capture cards should still be able to record it?

At the moment, (in Mesen) this change fixes Bart vs. the Space Mutants and Wizards & Warriors III. It also lets me remove an old patch I had implemented for Kick Master (and Kick Master still works correctly). Also, it makes blargg's full palette demo perfectly centered, instead of left aligned (and sometimes having 1 pixel cut off on the left side of the screen).


Top
 Profile  
 
PostPosted: Sat Feb 25, 2017 3:11 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 710
Location: New York, NY
The status bar in Bart vs. the Space Mutants and the castle scene in the intro of Wizards & Warriors III shake in Nintendulator 975, but they do not shake in Nintendulator 970. The primary difference between them is that version 970 contains a hack in which the X and Y increments occur 4 PPU cycles earlier than their actual scheduled times. It sounds likely that the delayed v-register write may fix that problem there also.

What was the Kick Master issue?


Top
 Profile  
 
PostPosted: Sat Feb 25, 2017 3:21 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
zeroone wrote:
What was the Kick Master issue?

viewtopic.php?p=172287#p172287


Top
 Profile  
 
PostPosted: Sat Feb 25, 2017 3:38 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 710
Location: New York, NY
That link does not describe the Kick Masters issue. Was the title screen shaking?

Incredible Crash Dummies shakes in Nintendulator 975, but not in 970. The 970 hack actually seems to solve a lot of problems.


Top
 Profile  
 
PostPosted: Sat Feb 25, 2017 4:34 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
zeroone wrote:
That link does not describe the Kick Masters issue. Was the title screen shaking?

Incredible Crash Dummies shakes in Nintendulator 975, but not in 970. The 970 hack actually seems to solve a lot of problems.

How so?
The Kick Master issue was caused by a race condition (write to $2006 at the same time as the cycle 256 Y scrolling increment). The game expects the $2006 value to win and the scrolling increment to be ignored (but it wasn't), which produced the weird effect on the title screen.


And... Crash Dummies is NOT a MMC3, but a submapper with a different IRQ behaviour.


Top
 Profile  
 
PostPosted: Sat Feb 25, 2017 4:40 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 710
Location: New York, NY
Zepper wrote:
How so?
The Kick Master issue was caused by a race condition (write to $2006 at the same time as the cycle 256 Y scrolling increment). The game expects the $2006 value to win and the scrolling increment to be ignored (but it wasn't), which produced the weird effect on the title screen.


And... Crash Dummies is NOT a MMC3, but a submapper with a different IRQ behaviour.


Thanks. But, that describes the cause. I'm still unclear of the observed symptoms. Was the title screen shaking?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 79 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group