Difference (Unl) shakes in my emulator
Moderator: Moderators
Difference (Unl) shakes in my emulator
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.
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?
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?
Re: Difference (Unl) shakes in my emulator
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.
Re: Difference (Unl) shakes in my emulator
Interesting. What about if it coincides with an X-increment? Do you have a link to more information about this race condition?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.
Edit: Also, a $2006 write might not affect the v register. What if it only updates the t register?
Re: Difference (Unl) shakes in my emulator
The only information is in this discussion, here.
-
- Posts: 184
- Joined: Wed Jun 15, 2016 11:49 am
Re: Difference (Unl) shakes in my emulator
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?
Are you sure it's not an IRQ timing issue?
Re: Difference (Unl) shakes in my emulator
Unless the MMC3 test ROMs are not enough... My emulator passes in all tests.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?
Re: Difference (Unl) shakes in my emulator
It does not shake in Nintendulator 970. Here is the write $2006 code for that version:
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.
Code: Select all
static void __fastcall Write6 (int Val)
{
if (HVTog)
{
IntReg &= 0x00FF;
IntReg |= (Val & 0x3F) << 8;
}
else
{
IntReg &= 0x7F00;
IntReg |= Val;
VRAMAddr = IntReg;
}
HVTog = !HVTog;
}
I will carefullly read through your thread. I see it mentions Kick Master title screen issues, but I never noticed any.
Re: Difference (Unl) shakes in my emulator
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.zeroone wrote: There is no indication of write suppression that I can see.
Re: Difference (Unl) shakes in my emulator
Here's the Nintendulator 970 code for the Y-increment: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.
Code: Select all
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;
Re: Difference (Unl) shakes in my emulator
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.
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.
Re: Difference (Unl) shakes in my emulator
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.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.
I prefer not to add in hacks to make specific games function. Even if the test ROMs pass, it may break some other games.
-
- Posts: 184
- Joined: Wed Jun 15, 2016 11:49 am
Re: Difference (Unl) shakes in my emulator
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.
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.
Re: Difference (Unl) shakes in my emulator
You're misunderstanding the things again. It's unrelated with the MMC3 IRQ test ROMs!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.
Re: Difference (Unl) shakes in my emulator
This game does not appear to run correctly in NO$NES. The green bar does not render properly.
Re: Difference (Unl) shakes in my emulator
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.
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.