The debugger in Mesen is very well done, but there are some features it doesn't seem to have that would be helpful for me.

When the debugger is open, Pause is disabled in the main emulator window. This makes things difficult if I want to break while something is happening on-screen, as I have to quickly switch to the debugger window, open the Debug menu, and choose Break. It would be nice if Pause caused the debugger to break instead when it's open. It'd also be nice to have an option to break whenever the debugger window becomes active.

Controller buttons can't be set to a certain state in the debugger, so there seems to be no way to, for example, keep the A button held while debugging. Something like checkboxes representing each button would work, at least for normal controllers.

Values in the Watch pane are only updated while breaking. It'd be nice to have it update every frame while the game is running too, or have an option for that.

It'd be nice if blocks in the debugger could be explicitly marked as data bytes or words, and show up as .db or .dw lines in the debugger even when "Show Only Disassembled Code" is checked.

Related to that, though this is a bit niche in comparison: the FDS BIOS has several functions that take pointer arguments inline after the jsr. Though you have the labels already, it'd be nice if it could actually show up as jsr LoadFiles / .dw $1234, $5678 and so on automatically.

Related to that, though this is a bit niche in comparison: the FDS BIOS has several functions that take pointer arguments inline after the jsr. Though you have the labels already, it'd be nice if it could actually show up as jsr LoadFiles / .dw $1234, $5678 and so on automatically.

There are a bunch of places throughout NES-land that do function parameters that way. nescom's clever-disasm calls it a TrailerParamRoutine.

Breaking when trying to pause would make a lot of sense - I'll add that. Breaking on debugger focus too (as an option).

Being able to set the controller's input is something someone else has asked for, too. It's mostly a matter of coming up with a proper UI and finding space to fit it in, too - I can't really add too much to the main debugger window if I want to keep it usable on lower resolution laptops. It would probably need to be some sort of separate tool window.Also, if you turn on the "Allow input when in the background" option, you can use a gamepad to hold down keys while in the debugger (won't work with a keyboard). It's far from ideal, but it's a workaround for that limitation atm.

An option to automatically update the watch should be fairly easy - initially I hadn't done that for performance concerns, but a lot has been done to speed up the expression evaluator since then, so it should be fine to update it once a frame or so (assuming there aren't hundreds of watch expressions)

Forcing specific blocks to show as bytes or words might be a bit tricky since there are already so many other options to control what is shown or not. Maybe the best way would be a general option to "Always show verified data" that would work with the other disassembly options + 3 actions: "Mark as data (bytes)", "Mark as data (words)" and "Clear data flag"? Would that be flexible enough for what you need to do?

As for arguments after JSR, I guess I could add some options to labels that would allow you to configure those (e.g name & size of each parameter)?

It's a feature I never use. I'm not a save state kind of guy. I would rather turn it off and save a few writes to my drive.

I doubt it'll have much of an impact on even an SSD's longevity (an hour of internet browsing most likely writes more cache data on a disk than Mesen would if you used it daily for a year), but I added an option to disable the screen (and turn off the disk reads/writes associated with it) along with another option to reset the game instead of resuming where you left off when clicking on a game (which is something other people have requested).

It's a feature I never use. I'm not a save state kind of guy. I would rather turn it off and save a few writes to my drive.

I doubt it'll have much of an impact on even an SSD's longevity (an hour of internet browsing most likely writes more cache data on a disk than Mesen would if you used it daily for a year), but I added an option to disable the screen (and turn off the disk reads/writes associated with it) along with another option to reset the game instead of resuming where you left off when clicking on a game (which is something other people have requested).

0.9.1 contains a number of improvements and new features related to HD Packs (including a tool to dump graphics into PNG files, new additions to the HDNes format that support conditional tile replacements, etc.)

On the debugger side of things (which might be what's most interesting to people here), some new features:-A "Step Back" action that allows you to step backwards into the execution and rewind time, 1 CPU instruction at a time. (thanks to thefox for the idea!)

-The ability to setup controller input from the debugger's main window:

Attachment:

DebuggerInput.png [ 8.46 KiB | Viewed 1474 times ]

You just need to click the buttons on the controller's image to activate/deactivate buttons. If any button is turned on via the debugger, the emulator will ignore all regular input for that player.

-Filtering in the trace logger via conditions - which means you can use the conditional expressions the debugger supports for breakpoints/etc to filter the trace log's output. e.g, if you wanted to log any writes for $8000-$FFFF, you could type in "IsWrite && Address >= $8000" to get only those:

Attachment:

TraceLogger.png [ 103.35 KiB | Viewed 1474 times ]

I also realized the Trace Logger's UI had terrible performance on Linux under Mono (at least on my VM), so I scrapped the standard textbox I was using for it and replaced it with the custom control I use for the code window. It should be at least an order of magnitude faster than before, and now supports auto-refresh (at 300ms intervals) with 30k instructions shown in the list (which was impossible even on Windows before).

On top of those, I implemented a few of the options that were asked by Nicole some posts above (e.g option to refresh the watch window while the game is running, option to break the debugger on focus, and allow breaking the debugger by using the Pause shortcut from the main window)

It also includes a number of bug fixes for the debugger in general and the emulation should run faster than before with the debugger attached (10-15% improvement).

If you find any issues or have any suggestions (for the debugger or otherwise), let me know!

If possible I'd request to make it possible to assign the mic to its own separate input, not like in FCEUX where it replaces the controller II START button when enabled. Makes it hard to test both inputs at the same time in my game.

No authentic console has both the microphone and player 2 Start. The RF, Twin, Titler, and TV models have player 4 Start (bit 1 of fourth read of $4017), but you can map that separately in (for example) FCEUX for Windows by enabling the Famicom 4-player adapter. The AV Famicom lacks a mic.

Or are you referring to famiclones that have both a mic jack and detachable controllers, such as the Analogue Nt mini?

I know there's no official Famicom or NES that have both, but for an emulator I see no reason to not have it all. It's convenient for developing purposes, allows testing setups that's not as easy to do on real hardware and I really see no problems with it. Nestopia has it.

Of course it's bad design for compatibility reasons to make a game that requires the use of either the mic or the controller II START/SELECT buttons, and I don't intend to do that.

Not sure what you mean by having 4-player adapter though? I do have that enabled in FCEUX and I still can't use the mic and con II Start at the same time.

Map a key to player 4 Start instead of player 2 Start, and use a controller reading routine that effectively ORs together the bits from controllers 1 and 3 and from controllers 2 and 4. That way, your game logic sees both the mic and player 2 Start.

Who is online

Users browsing this forum: No registered users and 6 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum