nesdev.com
http://forums.nesdev.com/

Question about nestopia MMC5 emulation
http://forums.nesdev.com/viewtopic.php?f=3&t=17010
Page 1 of 2

Author:  *Spitfire_NES* [ Thu Feb 01, 2018 11:31 am ]
Post subject:  Question about nestopia MMC5 emulation

Hey all, been a while since I have posted but had a question. Recently, I was watching videos on castlevania III and came across this video:

https://www.youtube.com/watch?v=CJhwNRaOb0g

Fast forward to around to the 3:32 and look at the bottom of the status bar. It starts to bounce around uncontrollably. After watching a few vides of it in action on the real nes, it seems as if this is something that not supposed to happen. It seems to really rear it's head when going up and jumping up. It causes the bottom to shake harder.

Is this accurate behavior? I fired up nestopia 1.40 and undead to check it out, and indeed, it still does this and really does it on the clock tower level as you work your way up. Can someone confirm is this is supposed to happen? IS CIII one of those harder to emulate games?

Author:  dougeff [ Thu Feb 01, 2018 12:01 pm ]
Post subject:  Re: Question about nestopia MMC5 emulation

I just played it on a real NES.

This video is different from what I saw. There is some slight jitter on the screen split, but not this much.

Author:  *Spitfire_NES* [ Fri Feb 02, 2018 5:41 am ]
Post subject:  Re: Question about nestopia MMC5 emulation

Thanks for doing that dougeff. I guess something is obviously off somewhere. Maybe the irq perhaps?

Does anyone else have these issues with their emulator?

EDIT**

I looked at the image info in Nestopia, and noticed the mirroring is set to Horizontal, I changed it to Vertical like the mapper list said. No dice, it still bounces like crazy when going up on the first level and the clock tower level. Prob others too.

Author:  NewRisingSun [ Fri Feb 02, 2018 6:42 am ]
Post subject:  Re: Question about nestopia MMC5 emulation

Here is a 60p capture from actual hardware. I actually find emulators' artifacts to be less objectionable. Emulators seem to just reveal the screen underneath the status bar at different points between frames, while on actual hardware, mysterious white lines appear. I wonder how that happens.

I don't think it's that big an issue in this case. The Bandai Dragon Ball games have far dirtier screen splits on actual hardware.

Author:  LightStruk [ Fri Feb 02, 2018 7:43 am ]
Post subject:  Re: Question about nestopia MMC5 emulation

MMC5 has mapper-controllable mirroring. Altering the mirroring bits in the iNES header won't affect emulation.

Author:  Dwedit [ Fri Feb 02, 2018 3:21 pm ]
Post subject:  Re: Question about nestopia MMC5 emulation

Some emulators may use the mirroring bits in the rom header as a hint for their initial state though. This matters more for DxROM games misassigned as MMC3.

Author:  *Spitfire_NES* [ Fri Feb 02, 2018 4:43 pm ]
Post subject:  Re: Question about nestopia MMC5 emulation

Thanks for all the responses guys. In this case though, is this accurate emulation or an issue that needs to be corrected?

Author:  *Spitfire_NES* [ Sat Feb 03, 2018 2:40 pm ]
Post subject:  Re: Question about nestopia MMC5 emulation

Just ran another test using the famicom version. The Japanese version does not do this on nestopia. Is the Japanese version doing something different?

Author:  Dwedit [ Sat Feb 03, 2018 8:10 pm ]
Post subject:  Re: Question about nestopia MMC5 emulation

Japanese version is VRC6, not MMC5.

Author:  *Spitfire_NES* [ Sat Feb 03, 2018 8:15 pm ]
Post subject:  Re: Question about nestopia MMC5 emulation

Ahh yes. Correct. Thank you Dwedit. It is my assumption that possibly something is off in the MMC5 irq scanline counting. Are there any test roms available to validate this assumption?

Author:  Dwedit [ Sat Feb 03, 2018 9:35 pm ]
Post subject:  Re: Question about nestopia MMC5 emulation

Last time I looked over the MMC5 IRQ counter documentation, it was "black box that just works, timing unknown".

edit: Seems to trigger on the two end of line tile fetches?

Author:  Zepper [ Sun Feb 04, 2018 2:13 pm ]
Post subject:  Re: Question about nestopia MMC5 emulation

I'm guessing it's the same problem of the MMC3 IRQs, related to $2006. You must verify if writes to $2006 occur before the IRQ; otherwise, an extra clock is triggered... and the shaking you just see.

Author:  lidnariq [ Sun Feb 04, 2018 2:46 pm ]
Post subject:  Re: Question about nestopia MMC5 emulation

We know that the MMC5 counts scanlines by checking for three reads from the same address as long as PPU A13 is high (well, really, PPU /A13 is low). So access to $2006 shouldn't trivially screw it up the same way it screws up the MMC3.

We also know it knows when display is active or not.

Looking at the diagram on the wiki, those three reads should happen during dots 338, 340, and 2 ... Nestopia appears to trigger its counter on dot 0.

I don't think two dots of error should cause this much of a difference, but ???

Author:  *Spitfire_NES* [ Mon Feb 05, 2018 5:39 am ]
Post subject:  Re: Question about nestopia MMC5 emulation

Thanks guys for helping me look into this matter. :D

Is there a particular place I can be looking in the Nestopia MMC5 code to look for this? Hopefully a subtle change makes all the difference. I'll be the first to admit some of the more technical aspects are a little over my head, but hopefully the solution for this won't be too difficult.

It def seems like IRQ misfiring, not unlike the mickey's safari in letterland issue nestopia used to have.

Author:  koitsu [ Tue Feb 06, 2018 2:34 pm ]
Post subject:  Re: Question about nestopia MMC5 emulation

NestopiaUE source code: https://github.com/0ldsk00l/nestopia

File an Issue at https://github.com/0ldsk00l/nestopia/issues so that the author can fix it, or people interesting in contributing code/fixes can submit pull requests that tie in to said issue. You should reference this nesdev forum thread in the Issue.

Also, there are multiple revisions of MMC5, differences unknown. I only mention this because with MMC3 the IRQ counter differs based on revision and HW manufacturer. I also don't know if "MMC5" means "MMC5A" or not, because some have MMC5 silkscreening, while others have MMC5A (I didn't find any with MMC5B, but I believe it). Maybe more has been discussed off-board since then?

Page 1 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/