Trying to get FME-7 IRQs right

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Trying to get FME-7 IRQs right

Post by koitsu »

I've now read the entire thread twice and I honestly can't figure out what the "correct" behaviour should be. Could we get a short/terse write-up that concisely explains what the proper behaviour should be? That should greatly help with submitted bug reports to emulator authors.
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Trying to get FME-7 IRQs right

Post by lidnariq »

Correct behavior: All writes to register "D" (i.e. writing to $Axxx after $0D has been written to $8xxx) should acknowledge the IRQ, regardless of the value written. Writes to registers "E" and "F" shouldn't.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Trying to get FME-7 IRQs right

Post by tepples »

Watch this space for progress of fixing FME-7 acknowledgment:
  • Nintendulator: In #nesdev, Quietust reports it fixed
  • FCEUX: I filed a bug report, and rainwarrior committed a fix (diff; Windows interim build).
  • Mednafen: I needed help with the registration form's CAPTCHA (and on identifying the mascot) on #nesdev, and then it took a while to receive registration confirmation from forum.fobby.net and a while after that for a moderator to approve the bug report.
  • Nestopia UE: GitHub issue report has been closed with a fix.
  • NO$NES: Haven't had time to download, install, and test, but the description of FME-7 in Everynes appears incomplete
  • RockNES, BizHawk: Reported fixed below
  • EverDrive: In #nesdev, tpw_rules said "krizz told me he'd fix it for everdrive"
  • PowerPak: In #nesdev, loopy reports that he has updated the FME-7 implementation in the mapper pack I use.
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Trying to get FME-7 IRQs right

Post by lidnariq »

lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Trying to get FME-7 IRQs right

Post by lidnariq »

Tested Nestopia UE patch:

Code: Select all

diff --git a/source/core/board/NstBoardSunsoftFme7.cpp b/source/core/board/NstBoardSunsoftFme7.cpp
index f3ee5d2..535456f 100644
--- a/source/core/board/NstBoardSunsoftFme7.cpp
+++ b/source/core/board/NstBoardSunsoftFme7.cpp
@@ -170,9 +170,8 @@ namespace Nes
 
                                                        irq.Update();
                                                        irq.unit.enabled = data & 0x01;
-
-                                                       if (!irq.Connect( data & 0x80 ))
-                                                               irq.ClearIRQ();
+                                                       irq.Connect( data & 0x80 );
+                                                       irq.ClearIRQ();
 
                                                        break;
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Trying to get FME-7 IRQs right

Post by koitsu »

Nestopia UE -- filed issue 124
zxbdragon
Posts: 498
Joined: Mon Dec 12, 2011 8:15 pm

Re: Trying to get FME-7 IRQs right

Post by zxbdragon »

You can provide the copyrighted FME-7 cassette transformed into flash cassette , The test results on FC/NES?
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: Trying to get FME-7 IRQs right

Post by Zepper »

RockNES seems OK.
tepples wrote:To save 16 cycles during vblank.

To eliminate unofficial opcodes as a factor in the test, I have added a second build-time option called AVOID_UNOFFICIAL_OPCODES, in addition to the existing build-time option called NESTOPIA_WORKAROUND, and built two more ROMs without unofficial opcodes, one with and one without the Nestopia workarounds. The ROMs built without unofficial opcodes behave (or misbehave) the same way in Mednafen as the corresponding ROMs with unofficial opcodes.
Works fine in RockNES now. The Nestopia version flashes the bottom of the image (around 40 or more lines).
Attachments
fme7acktest 000.bmp
zeromus
Posts: 13
Joined: Mon Jun 30, 2008 3:57 pm
Contact:

Re: Trying to get FME-7 IRQs right

Post by zeromus »

fixed in bizhawk's neshawk and quicknes cores in r9193
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Trying to get FME-7 IRQs right

Post by koitsu »

Nestopia UE issue 124 has been committed/fixed.

Binaries are usually made available over on EmuCR except it seems the last build they've offered is from 2014/10/07. I don't know what changed to make them stop doing builds, but I'll see if I can find out.

Edit: seems the builds on EmuCR aren't of master -- they're only when a new tag (I think) is made; the 2014/10/07 release correlates with the last/latest git tag 1.46.2. I'll see about asking if they can add one for master.
FrankWDoom
Posts: 260
Joined: Mon Jan 23, 2012 11:27 pm

Re: Trying to get FME-7 IRQs right

Post by FrankWDoom »

Does this still need testing on a real cart? I couldn't tell from the posts if someone actually did that.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Trying to get FME-7 IRQs right

Post by tepples »

l_oliveira ran it on a cart and got this result. The task has become to get emulators to give the same result.
Post Reply