Any accurate emulator with good debug features?

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

darkhog
Posts: 192
Joined: Tue Jun 28, 2011 2:39 pm

Any accurate emulator with good debug features?

Post by darkhog »

Or am I forced to use FCEUX?
User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2064
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: Any accurate emulator with good debug features?

Post by FrankenGraphics »

FCEUX has great debug features; it's my goto emulator out of habit.

Also check out https://www.mesen.ca/ and Nintendulator / NintendulatorDX
darkhog
Posts: 192
Joined: Tue Jun 28, 2011 2:39 pm

Re: Any accurate emulator with good debug features?

Post by darkhog »

I know FCEUX has good debug capabilities, but it's not very accurate when it comes to emulation. It's SNES9x of nes emulation. It's THAT inacurrate.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Any accurate emulator with good debug features?

Post by tepples »

I use FCEUX for Windows in Wine for debugging (because the SDL version doesn't have a debugger) and a PowerPak for accuracy.

Do you need the accuracy and the debug features to be active at the same time?
User avatar
rainwarrior
Posts: 8733
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Any accurate emulator with good debug features?

Post by rainwarrior »

FCEUX seems to have a poor reputation but I don't think it deserves it, and it's improved quite a lot in the past few years. (This commonly consulted table is several years out of date now.)

If you use the New PPU setting, FCEUX is very accurate in most respects. The CPU emulation is very good, and the PPU emulation is good more or less up until you want to do something very specific (e.g. anything using the phrase "horizontal blanking").

Nintendulator is better, but it's really rare that I'm doing something that's requires the specific things where it matters (and the better debugger is more than enough reason for me to stick with FCEUX). ...and to be honest, any time I'd be compelled to check Nintendulator, I'm going to be checking against real hardware as well, because ain't nothing perfect.
User avatar
Sumez
Posts: 919
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Any accurate emulator with good debug features?

Post by Sumez »

What issues do people have with FCEUX? I'd like to hear specifics.

It's my go-to emulator for testing due to its features, debugger, and helpful key button mappings, with Nintendulator helping out only if I need visual feedback on the OAM table. For accuracy and low input lag gameplay testing I use Nestopia.
If you're making something so unique that it won't work on FCEUX (I'm guessing we're talking super accurate timing related issues here??), but it works on a real NES or other more accurate emulators, are you sure there isn't a "better" way to do it?

To be honest, the only stuff I've been able to pinpoint in practice with "more accurate" emulators, has been poorly initialized memory or registers, which was absolutely only my own fault (most recently, only one emulator was able to remind me that I needed to manually disable MMC3's write lock on the SRAM address space)
User avatar
rainwarrior
Posts: 8733
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Any accurate emulator with good debug features?

Post by rainwarrior »

Sumez wrote:Nintendulator helping out only if I need visual feedback on the OAM table.
BTW tokumaru wrote a really nice Lua script for inspecting sprites in FCEUX: https://forums.nesdev.com/viewtopic.php ... 08#p181008

I also added OAM to the hex viewer, though I think it was after the last stable release, so you'd need an interim build to use it.
User avatar
gauauu
Posts: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Any accurate emulator with good debug features?

Post by gauauu »

rainwarrior wrote:
Sumez wrote:Nintendulator helping out only if I need visual feedback on the OAM table.
BTW tokumaru wrote a really nice Lua script for inspecting sprites in FCEUX: https://forums.nesdev.com/viewtopic.php ... 08#p181008

I also added OAM to the hex viewer, though I think it was after the last stable release, so you'd need an interim build to use it.
That's good to know. The poor sprite debugging is one of the things that often pushes me to use other emulators.

That said, I also use it as my primary debugger (like tepples, using the windows version in linux with wine), but I have run into a few places where it's not 100% accurate. But like Frankengraphics said, I also find mesen to be pretty good (I acutally prefer the UI of Mesen to fceux)
Sour
Posts: 891
Joined: Sun Feb 07, 2016 6:16 pm

Re: Any accurate emulator with good debug features?

Post by Sour »

At this point, I'd like to think Mesen has pretty much caught up with FCEUX in terms of debugging tools (and Mesen also offers a number of tools that FCEUX is missing) - if people still have things they can't get done in Mesen's debugger that works in FCEUX, I'm more than happy to take a look and fill in any gaps that remain.
Last edited by Sour on Tue Oct 24, 2017 1:41 pm, edited 1 time in total.
User avatar
rainwarrior
Posts: 8733
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Any accurate emulator with good debug features?

Post by rainwarrior »

Yeah, I really like the look of Mesen so far, but I haven't yet spent too much time with it yet mainly because I've got so much inertia with FCEUX (i.e. years of daily use, and a lot of familiarity with it from the inside). Have been meaning to give it a thorough test after I finish my current project.
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Any accurate emulator with good debug features?

Post by zeroone »

Nintaco also provides debugging tools as seen here.
User avatar
Sumez
Posts: 919
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Any accurate emulator with good debug features?

Post by Sumez »

rainwarrior wrote:
Sumez wrote:Nintendulator helping out only if I need visual feedback on the OAM table.
BTW tokumaru wrote a really nice Lua script for inspecting sprites in FCEUX: https://forums.nesdev.com/viewtopic.php ... 08#p181008

I also added OAM to the hex viewer, though I think it was after the last stable release, so you'd need an interim build to use it.
I was thinking of a more visual approach. Tokumaru's script is really nice! And painfully obvious, too...
I actually completely forgot, that Lua scripting is also one of the primary reasons I use FCEUX, it really helps out a lot with live debugging. That said, it's become less useful after I started defining variable addresses by using CA65's ".res" command, making them much more likely to move around between builds.
If I could somehow make my script read from the assembler's .dbg file to figure out variable locations, that would be really awesome.
User avatar
rainwarrior
Posts: 8733
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Any accurate emulator with good debug features?

Post by rainwarrior »

Sumez wrote:If I could somehow make my script read from the assembler's .dbg file to figure out variable locations, that would be really awesome.
Yeah, I have my python script that generates .NL files also spit out a header file for my lua script to reference addresses. For a long while I was doing it manually though, because I had arranged my ROM layout in a way that most of the addresses I cared about seldom changed.

Actually, on a related note I wish FCEUX breakpoints could reference debug symbols so they'd stay up to date between builds.
Sour
Posts: 891
Joined: Sun Feb 07, 2016 6:16 pm

Re: Any accurate emulator with good debug features?

Post by Sour »

I never added support for .nl files because (as far as I know) they don't support bank switching properly (e.g 2 different bytes in the rom can end up mapped to the same "address" in the .nl file) - correct me if I'm wrong, though. Mesen does support loading CC65's .dbg files directly, though.

Adding breakpoints based on debug symbols is an interesting idea, and does make a lot of sense for homebrew dev. Adding support for it should be relatively easy on my end.
User avatar
rainwarrior
Posts: 8733
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Any accurate emulator with good debug features?

Post by rainwarrior »

Sour wrote:I never added support for .nl files because (as far as I know) they don't support bank switching properly (e.g 2 different bytes in the rom can end up mapped to the same "address" in the .nl file) - correct me if I'm wrong, though. Mesen does support loading CC65's .dbg files directly, though.
Banking and .NL files kinda sucks, especially since they're based around iNES 16k "banks" rather than actual banking capabilities. The mapping conflict you're talking about can come up with <=8k banking mappers, though in practice it's probably not that hard to avoid or work around?

I'd rather just have one big file that maps ROM addresses to memory addresses than this mess of separate files for every 16k hunk. Direct support for .DBG is a much nicer idea. I wish it had a specification, though; it's been a bit volatile as a format, but maybe it's settled down at this point.
Post Reply