It is currently Sat Dec 16, 2017 11:33 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 79 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: Thu Feb 02, 2017 8:00 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 753
Location: New York, NY
GoodNES3.23b includes an unlicensed ROM called Difference. It's an MMC3 ROM and, as you can see in the animated GIF below, the green bar at the bottom shakes.

Image

This does not appear to happen in any other emulator. I never noticed issues with other MMC3 ROMs. Any suggestions for how to track down the source of this problem?


Top
 Profile  
 
PostPosted: Fri Feb 03, 2017 6:44 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
It's a race condition between $2006 and the Y-increment at PPU scanline cycle 256. If the $2006 write occurs a bit before cycle 256 (here after 254th), the Y-increment should NOT occur.


Top
 Profile  
 
PostPosted: Fri Feb 03, 2017 8:08 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 753
Location: New York, NY
Zepper wrote:
It's a race condition between $2006 and the Y-increment at PPU scanline cycle 256. If the $2006 write occurs a bit before cycle 256 (here after 254th), the Y-increment should NOT occur.


Interesting. What about if it coincides with an X-increment? Do you have a link to more information about this race condition?

Edit: Also, a $2006 write might not affect the v register. What if it only updates the t register?


Top
 Profile  
 
PostPosted: Sat Feb 04, 2017 4:34 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
The only information is in this discussion, here.


Top
 Profile  
 
PostPosted: Sat Feb 04, 2017 7:50 am 
Offline

Joined: Wed Jun 15, 2016 11:49 am
Posts: 65
Interesting, I'm not getting any shaking with or without accounting for the $2006 race condition.
Are you sure it's not an IRQ timing issue?


Top
 Profile  
 
PostPosted: Sat Feb 04, 2017 8:05 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
Alyosha_TAS wrote:
Interesting, I'm not getting any shaking with or without accounting for the $2006 race condition.
Are you sure it's not an IRQ timing issue?

Unless the MMC3 test ROMs are not enough... My emulator passes in all tests.


Top
 Profile  
 
PostPosted: Sat Feb 04, 2017 9:54 am 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 753
Location: New York, NY
It does not shake in Nintendulator 970. Here is the write $2006 code for that version:

Code:
static   void   __fastcall   Write6 (int Val)
{
   if (HVTog)
   {
      IntReg &= 0x00FF;
      IntReg |= (Val & 0x3F) << 8;
   }
   else
   {
      IntReg &= 0x7F00;
      IntReg |= Val;
      VRAMAddr = IntReg;
   }
   HVTog = !HVTog;
}


It updates the v register (VRAMAddr), the t register (IntReg) and the w register (HVTog) immediately. There is no indication of write suppression that I can see.

I will carefullly read through your thread. I see it mentions Kick Master title screen issues, but I never noticed any.


Top
 Profile  
 
PostPosted: Sat Feb 04, 2017 11:16 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
zeroone wrote:
There is no indication of write suppression that I can see.

Who said "write suppression"? I said that a write to $2006 may occur a few PPU cycles before the Y-increment at PPU cycle 256. If such write was done, the Y-increment should NOT occur. Otherwise, we'll have $2006 scroll value PLUS 1.


Top
 Profile  
 
PostPosted: Sat Feb 04, 2017 11:43 am 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 753
Location: New York, NY
Zepper wrote:
Who said "write suppression"? I said that a write to $2006 may occur a few PPU cycles before the Y-increment at PPU cycle 256. If such write was done, the Y-increment should NOT occur. Otherwise, we'll have $2006 scroll value PLUS 1.


Here's the Nintendulator 970 code for the Y-increment:

Code:
         if ((VRAMAddr & 0x7000) == 0x7000)
            {
               register int YScroll = VRAMAddr & 0x3E0;
               VRAMAddr &= 0xFFF;
               if (YScroll == 0x3A0)
                  VRAMAddr ^= 0xBA0;
               else if (YScroll == 0x3E0)
                  VRAMAddr ^= 0x3E0;
               else   VRAMAddr += 0x20;
            }
            else   VRAMAddr += 0x1000;


There is no check to see if a $2006 write occurred shortly before or after.


Top
 Profile  
 
PostPosted: Sat Feb 04, 2017 12:06 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
I didn't take such thing from Nintendulator. You're looking for something NULL. Don't be boring.
I already told you what's the issue regarding the score shaking. Probably it's an hack. Feel free to analyze a Nintendulator CPU log and compare it with yours... or ask Q directly.


Top
 Profile  
 
PostPosted: Sat Feb 04, 2017 12:17 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 753
Location: New York, NY
Zepper wrote:
I didn't take such thing from Nintendulator. You're looking for something NULL. Don't be boring.
I already told you what's the issue regarding the score shaking. Probably it's an hack. Feel free to analyze a Nintendulator CPU log and compare it with yours... or ask Q directly.


The green bar does not shake in Nintendulator. If it is a race condition, I would expect a similar check required in the Nintendulator code.

I prefer not to add in hacks to make specific games function. Even if the test ROMs pass, it may break some other games.


Top
 Profile  
 
PostPosted: Sat Feb 04, 2017 12:36 pm 
Offline

Joined: Wed Jun 15, 2016 11:49 am
Posts: 65
I'm not logging any $2006 race condition cases from Difference.
The log shows plenty from Kick Master so I'm pretty sure I'm logging and emualting it correctly.

I've never quite been confident in MMC3 IRQs so to me this is an interesting new test case. I'll try to see if there is any combination of things I can do to reproduce this shaking.


Top
 Profile  
 
PostPosted: Sat Feb 04, 2017 12:38 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
zeroone wrote:
I prefer not to add in hacks to make specific games function. Even if the test ROMs pass, it may break some other games.

You're misunderstanding the things again. It's unrelated with the MMC3 IRQ test ROMs!


Top
 Profile  
 
PostPosted: Sat Feb 04, 2017 1:50 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 753
Location: New York, NY
This game does not appear to run correctly in NO$NES. The green bar does not render properly.


Top
 Profile  
 
PostPosted: Sat Feb 04, 2017 7:11 pm 
Offline

Joined: Fri Dec 30, 2011 7:15 am
Posts: 43
Location: Sweden
I very briefly tested writes to 0x2006 a while back in visual nes. It did seem like setting vramaddr_v to vramaddr_t in the second write was delayed a few ticks (~3?). I don't know the inner workings of the ppu enough to tell for certain.

The status bar in bart vs the space mutants that relies on a 6-5-5-6 series of writes stops shaking in my emulator if i delay the v = t effect for 3 ppu ticks. My cpu-ppu sync is not good enough to prove anything though, as evident by battletoads stage 2 crashing even faster with this change.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: Bing [Bot], thefox 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