PPUADDR with Y increment? (MMC3)

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
Zepper
Formerly Fx3
Posts: 3190
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

PPUADDR with Y increment? (MMC3)

Post by Zepper » Wed Apr 06, 2016 3:52 pm

Technically, is possible to increment Y on PPU cycle 256 during a write to $2006? I have an unfixable problem with MMC3 IRQs - the game Kick Master has a waving title screen. I can fix it if I delay the IRQ by 2 PPU cycles, but the MMC3 tests are broken.

User avatar
Bregalad
Posts: 7767
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: PPUADDR with Y increment? (MMC3)

Post by Bregalad » Thu Apr 07, 2016 12:18 am

I do not understand your question. This increment happens automatically, assuming redering is on. So of course this is "possible".

User avatar
tokumaru
Posts: 11466
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: PPUADDR with Y increment? (MMC3)

Post by tokumaru » Thu Apr 07, 2016 12:25 am

I'm not sure what the question is either... Are you talking about manually clocking the MMC3's scanline counter by manipulating $2006?

User avatar
Zepper
Formerly Fx3
Posts: 3190
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: PPUADDR with Y increment? (MMC3)

Post by Zepper » Thu Apr 07, 2016 5:21 am

There's a conflict between increasing Y at 256th and writting to $2006. If Y is clocked after the write, the background is waving. Else, it's fine.

User avatar
zeroone
Posts: 929
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: PPUADDR with Y increment? (MMC3)

Post by zeroone » Thu Apr 07, 2016 6:33 am

Zepper wrote:There's a conflict between increasing Y at 256th and writting to $2006. If Y is clocked after the write, the background is waving. Else, it's fine.
That sounds very similar to the Battletoads stage 2 freezing issue.

User avatar
Disch
Posts: 1849
Joined: Wed Nov 10, 2004 6:47 pm

Re: PPUADDR with Y increment? (MMC3)

Post by Disch » Thu Apr 07, 2016 8:56 am

Zepper:

Can you guess what I'm going to say? :wink:

Tracelogs!

Let's see a trace of a frame with screwed-up lines, with scanline&cycle marked, and NMI/IRQ marked. Then we can see where your window to write is and why the game is writing outside that window.

User avatar
Zepper
Formerly Fx3
Posts: 3190
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: PPUADDR with Y increment? (MMC3)

Post by Zepper » Thu Apr 07, 2016 10:54 am

Disch wrote:Zepper:

Can you guess what I'm going to say? :wink:
Can you guess what I am going to reply? ^_^;;

Remember of the problem with sprite zero hits? You saw the tracelogs and said "the sprite zero hit is off by 1". Well, if I fix this "off by 1", the test ROMs are broken too.
So, it's the same. But okay, I'll post the tracelogs soon.

User avatar
Bregalad
Posts: 7767
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: PPUADDR with Y increment? (MMC3)

Post by Bregalad » Fri Apr 08, 2016 12:37 am

I don't understand the problem. Time your code so that your write always fall before the increment, or always fall after the increment, and your BG won't be shaking. It's a matter of adding or removing a few nops. No big deal.

User avatar
tokumaru
Posts: 11466
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: PPUADDR with Y increment? (MMC3)

Post by tokumaru » Fri Apr 08, 2016 12:48 am

Bregalad wrote:It's a matter of adding or removing a few nops. No big deal.
Except Zepper is coding an emulator, not an NES program. :wink:

Apparently, adjusting the emulator to accommodate some games makes it fail some accuracy tests.

User avatar
zeroone
Posts: 929
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: PPUADDR with Y increment? (MMC3)

Post by zeroone » Fri Apr 08, 2016 1:48 pm

Is there a way to deterministically synchronize game states between RockNES and Nintendulator to enable a comparison between the logs cycle-by-cycle?

User avatar
Zepper
Formerly Fx3
Posts: 3190
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: PPUADDR with Y increment? (MMC3)

Post by Zepper » Fri Apr 08, 2016 2:38 pm

zeroone wrote:
Zepper wrote:There's a conflict between increasing Y at 256th and writting to $2006. If Y is clocked after the write, the background is waving. Else, it's fine.
That sounds very similar to the Battletoads stage 2 freezing issue.
Well... perhaps. I'm unsure about Battletoads.
Regarding Nintendulator, no.... it's not necessary. Even converting its savestate file to RockNES format won't help too.

User avatar
zeroone
Posts: 929
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: PPUADDR with Y increment? (MMC3)

Post by zeroone » Fri Apr 08, 2016 3:35 pm

Zepper wrote:Regarding Nintendulator, no.... it's not necessary. Even converting its savestate file to RockNES format won't help too.
If you managed to do it, you could discover exactly why RockNES does not behave correctly.

User avatar
Zepper
Formerly Fx3
Posts: 3190
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: PPUADDR with Y increment? (MMC3)

Post by Zepper » Fri Apr 08, 2016 3:47 pm

zeroone wrote:
Zepper wrote:Regarding Nintendulator, no.... it's not necessary. Even converting its savestate file to RockNES format won't help too.
If you managed to do it, you could discover exactly why RockNES does not behave correctly.
AFAIK, such log does not bring the helpful information I need, but only a complete CPU disassembling.

Post Reply