Romhacking.net

Romhacking => Personal Projects => Topic started by: Revenant on April 25, 2015, 04:58:14 pm

Title: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on April 25, 2015, 04:58:14 pm
Two new projects! Hooray! (They're both forks of byuu's programs so I'm putting them both in this thread. Why not?)

bsnes-plus (or bsnes+) is a fork of bsnes (based on bsnes-classic) intended to introduce some new features and improvements, mostly aimed at debugging.

Screenshots: 1 (https://dl.dropboxusercontent.com/u/43107309/bsnes-plus-registeredit.png) 2 (https://dl.dropboxusercontent.com/u/43107309/bsnes-plus-registeredit2.png) 3 (https://dl.dropboxusercontent.com/u/43107309/bsnes-plus-registeredit3.png) 4 (https://dl.dropboxusercontent.com/u/43107309/bsnes-plus-vramview.png) 5 (https://dl.dropboxusercontent.com/u/43107309/bsnes-plus-tilemap.png)

What's new
"Step over" and "step out" buttons in debugger
Improved debugger UI with register editing
Redesigned memory editor and breakpoint editor
Improved handling of address mirroring for breakpoints (extends to the entire address space, not just RAM)
Real-time code and data highlighting in memory editor, with fast searching for known code/data locations and unexplored regions
Cartridge ROM and RAM views in memory editor for mapper-agnostic analysis
Enhanced VRAM, sprite, and tilemap viewing
SA-1 disassembly and debugging
SA-1 bus and BW-RAM viewing and (partial) usage logging
Super FX disassembly and debugging
Super FX bus viewing and usage logging

Non-debugging features:

Satellaview / BS-X support
SPC file dumping
SPC output visualizer (keyboards & peak meters)
IPS and BPS soft patching
Multiple emulation improvements backported from bsnes/higan (mostly via bsnes-classic)

Coming soon
On-the-fly ROM saving and reloading from the memory editor for quick hacking and testing
More keyboard shortcuts for menus, etc.
Automatic saving/loading breakpoints between sessions
Similar addressing improvements for cheats

See the project on GitHub (https://github.com/devinacker/bsnes-plus) for more info and source.

Download
bsnes-plus v073+3a (Windows, 64-bit accuracy & compatibility) (https://github.com/devinacker/bsnes-plus/releases/download/v073%2B3a/bsnes-plus-073.3a-x64.rar)
bsnes-plus v073+3a (Windows, 32-bit compatibility) (https://github.com/devinacker/bsnes-plus/releases/download/v073%2B3a/bsnes-plus-073.3a.rar)

xkas-plus is my fork of the xkas v014 assembler. Among other changes, its biggest new features are:
Assembling directly to an IPS patch
Table file support
SNES ExLoROM / ExHiROM support
Ability to export defines and labels to a separate file (supports FCEUX and VICE debug symbols or regular assembly includes)
Additional architecture/platform support:

See the project on GitHub (https://github.com/devinacker/xkas-plus) for more info and source.

Download
xkas-plus v14+1 (Windows) (https://github.com/devinacker/xkas-plus/releases/download/v14%2B1/xkas-plus-14.1.zip)
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Lenophis on April 25, 2015, 06:53:12 pm
Coming soon
IPS soft patching
99% of the time when I've had problems, it's because I soft-patched a rom and I didn't realize it. This is a playing convenience, not a debugging "feature." I ask that this be left out or an option to disable its use.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on April 25, 2015, 07:10:25 pm
That was planned as a counterpart to UPS soft patching, which is already part of bsnes and is already optional.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: sics on April 26, 2015, 09:40:51 am
 Hola seria genial que le agregarle soporte para .7z y temporizador para cargar los estados.

Hi would you add great support .7z and timer to load states .
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: justin3009 on April 26, 2015, 09:55:33 am
Oh dear god I'll be trying this out as soon as possible.

Edit: Oop.  Missing libgomp-1.dll on launch.

Edit 2: Are we allowed to make feature requests at all?  Probably an easier one, but could we allow any button on the keyboard be used as a button assignment?  I know you have to use Shift + something to allow the shift key, but it'd be preferable if we could just use 'Shift' as a button.  Same thing with Ctrl.  I know later bSNES version allowed that, not sure if that's really a 'bad' idea or not though.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: DackR on April 26, 2015, 01:21:45 pm
Love what I see so far. Will be testing out SA-1 debugging a bit. Thanks so much for working on this. :)

I'm sure I'll have some feedback once I've actually used it.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on April 26, 2015, 01:44:06 pm
Oh dear god I'll be trying this out as soon as possible.

Edit: Oop.  Missing libgomp-1.dll on launch.

Fixed. I basically threw the snesfilter (and other) plugins in at the last minute without bothering to check their dependencies (compared to the program itself), but it should run now. Sorry about that

Quote
Edit 2: Are we allowed to make feature requests at all?  Probably an easier one, but could we allow any button on the keyboard be used as a button assignment?  I know you have to use Shift + something to allow the shift key, but it'd be preferable if we could just use 'Shift' as a button.  Same thing with Ctrl.  I know later bSNES version allowed that, not sure if that's really a 'bad' idea or not though.

Feature requests are definitely welcome. I plan to play around and make some changes to the frontend eventually and changing how inputs are setup might be part of that.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: mziab on April 26, 2015, 02:06:42 pm
Hola seria genial que le agregarle soporte para .7z y temporizador para cargar los estados.

Hi would you add great support .7z and timer to load states .

The version of bsnes this was forked from definitely had 7z support via snesreader. However, upon testing just now I see it doesn't seem to work with newer 7z files. Older ones seem to work just fine, though. Apparently, LZMA2 is not supported.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on April 26, 2015, 04:14:29 pm
Do you know if blargg's modified 7z code was ever updated since v073?
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: SC on April 26, 2015, 04:24:09 pm
SPC file dumping
How does it work?
Do I have to do that manually pressing a key?
Or is it automatically detected when a new song is played and then dumps it from the beginning to some folder specified previously?
The former is nice, but the latter would be awesome.

Anyway, awesome project here. I might use it in the future. :thumbsup:
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on April 26, 2015, 04:46:42 pm
There's an option for it in the Tools menu (next to the "capture screenshot" option). You can also bind it to a keyboard key. It'll wait until the next time a note plays and then dump the SPC to the "exported data" directory (which is by default the same directory as the ROM).
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: SC on April 26, 2015, 05:23:33 pm
Ah, so it is like the ol' ZSNES dump spc command.
Well, nice, but I hoped for it to be implemented the other way I described. You think that would be too difficult? ::)
It could be great, as it would make it easier to make very accurate OSV rips, unless there's another easier way I have missed all these years. :huh:
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: mziab on April 26, 2015, 05:31:56 pm
Do you know if blargg's modified 7z code was ever updated since v073?

vbam seems to use a somewhat newer version (http://sourceforge.net/p/vbam/code/HEAD/tree/trunk/fex/7z_C/) of blargg's File Extractor, which supports LZMA2 from the looks of it.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: STARWIN on April 26, 2015, 05:41:20 pm
I'll probably try to use this instead of geiger's the next time I mess with a SNES game. The effort is appreciated. Tested it a bit:

Currently the memory editor shows a constant amount of offsets at once. This should depend on the window height. Line length should probably depend on window width. (or in both cases an adjustable variable as an alternative. might even be better)

Disassembler window also seems to show only a constant amount of instructions. It won't let me read the current procedure very far, and it also won't try to disassemble surrounding memory (basically all those ... areas). A scrollable sliding disassembled window would be nice, like in FCEUX. Disassembler could also show the hex representation of the instructions in addition to the addresses.

The empty box in the memory editor instantly shifts the view to the address written. It also aligns the offsets by the input, which can be convenient. It could perhaps use a goto button next to it and wait for its press for better UI (mainly for new users).

If I break manually, the disassembler window won't update until I step. Not that it matters..
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on April 26, 2015, 05:53:02 pm
I definitely plan on reworking the memory viewer and other stuff; almost all of the debugger GUI is unchanged from the original bsnes debugger, but I'll be working on improving it as time goes on. I mostly wanted to get the actual debugging features and useful stuff ready before anything else.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: DaMarsMan on April 27, 2015, 06:13:25 pm
Looks like an interesting project.  :beer:


Having done some romhacking back in the day I can say quite confidently that I hate soft patching. I've had quite a few problems with it and I remember a lot of people who also did. I think it's important to remember adding features for the sake of having them can also add layers of complexity and bugs that you might not want.

Also, what's really the appeal of 7zip? I'm of the opinion that 7z for anything related to SNES is also a layer of complexity we need to move away from. There is no reason to not be working with raw files. 7zip was great when we had 60GB hard drives. What's the tradeoffs?


Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: mziab on April 27, 2015, 06:23:29 pm
While it can be argued compressing roms with 7zip makes increasingly little sense, the support for it was already there, self-contained and completely optional. The code just needed to be updated to use a more recent version of blargg's File Extractor to support newer archives compressed with LZMA2. Proactively removing a feature that was already there in bsnes doesn't really make sense, seeing as purists can just not use snesreader.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on April 27, 2015, 07:00:33 pm
Having done some romhacking back in the day I can say quite confidently that I hate soft patching. I've had quite a few problems with it and I remember a lot of people who also did. I think it's important to remember adding features for the sake of having them can also add layers of complexity and bugs that you might not want.

As I pointed out earlier in the thread, bsnes already supported soft patching long before I ever modified it; I'm just updating it to include a format that is still in common use. It always was and still will be a completely optional feature.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: SC on April 27, 2015, 09:05:17 pm
How does it work?
Do I have to do that manually pressing a key?
Or is it automatically detected when a new song is played and then dumps it from the beginning to some folder specified previously?
The former is nice, but the latter would be awesome.

Anyway, awesome project here. I might use it in the future. :thumbsup:
Ah, so it is like the ol' ZSNES dump spc command.
Well, nice, but I hoped for it to be implemented the other way I described. You think that would be too difficult? ::)
It could be great, as it would make it easier to make very accurate OSV rips, unless there's another easier way I have missed all these years. :huh:
Oh, Revenant, please could you answer my bolded underlined question there? Or anyone, if there's any other easy way to dump accurate SPCs from the exact beginning of playtime.
Feature requests are definitely welcome.
Thank you. :P
Sorry if it bothers you, I know it is an accessory part of your project, but...

Ah, at least I will be using it for pure romhacking/debugging. :crazy:

Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: mziab on April 28, 2015, 03:55:34 am
I can field that question. Commands like "play new song" are game-specific or rather engine-specific (games by the same developer tend to use the same engine). The SPC700 does not have a convenient abstraction like that. It's something developers need to implement by themselves. As such, adding a universal "detect when a new song is played and dump" feature isn't really feasible. Now, if it were a platform like NDS, where most games use high-level functions from the official SDK, that would be another story entirely.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Rotwang on April 29, 2015, 03:14:32 am
This is pretty snizzy-snaz!  :thumbsup:

I will throw in one feature request while the floor's open. No SNES debugger that I have seen has a memory window that refreshes as quickly as the one found in FCEUXD-SP. Is it at all possible to crank up the speed of the memory window auto-refresh to similar levels?
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on April 29, 2015, 07:28:56 am
I plan to change it to refresh once per frame once I start reworking parts of the original bsnes debugger GUI, so hopefully that should be fast enough.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Rotwang on April 30, 2015, 06:49:37 pm
Sounds awesome!
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Grimoire LD on April 30, 2015, 07:18:50 pm
While this looks great and everything appears to be adequately made, there is one problem that irks me though, I write my code in Hex, not in ASM. So I prefer to write A90A or C905 rather than LDA 0A or CMP 05 for instance. The issue with this is that you cannot continue writing after one byte, sure you can press left after filling in one byte but that seems needlessly mundane and a step backwards to what is provided by Geiger's SNES9X. Also if you do use that method and you go to the end of the line instead of cycling back to the next bit of hex as you'd imagine the writing cursor is within the address line, which is just sort of silly. Another issues I have is with pasting, when you go to paste it doesn't even write to code... it doesn't write to anything really.

All in all it is a great looking emulator with good compatibility but some of the more crucial debugging aspects are still a bit finnicky and need some work. A great effort though.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Rotwang on April 30, 2015, 09:40:52 pm
I'd kill someone in front of their own mother to have a SNES debugger with the same functionality as FCEUXD-SP.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on May 01, 2015, 12:28:28 am
While this looks great and everything appears to be adequately made, there is one problem that irks me though, I write my code in Hex, not in ASM. So I prefer to write A90A or C905 rather than LDA 0A or CMP 05 for instance. The issue with this is that you cannot continue writing after one byte, sure you can press left after filling in one byte but that seems needlessly mundane and a step backwards to what is provided by Geiger's SNES9X. Also if you do use that method and you go to the end of the line instead of cycling back to the next bit of hex as you'd imagine the writing cursor is within the address line, which is just sort of silly. Another issues I have is with pasting, when you go to paste it doesn't even write to code... it doesn't write to anything really.

All in all it is a great looking emulator with good compatibility but some of the more crucial debugging aspects are still a bit finnicky and need some work. A great effort though.

The hex editor is entirely a remnant of the original bsnes debugger. I'm rewriting it, don't worry.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Grimoire LD on May 01, 2015, 12:36:48 am
That is good to hear, you've done a great job so far and I will be keeping up with your updates to it.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: sics on May 02, 2015, 10:22:45 am
The version of bsnes this was forked from definitely had 7z support via snesreader. However, upon testing just now I see it doesn't seem to work with newer 7z files. Older ones seem to work just fine, though. Apparently, LZMA2 is not supported.

Genial  :beer:, ¡Es suficiente para mi con eso!
¿Sera capaz de reconocer extensiones erróneas?
 Me explico usualmente yo reemplazo las extensiones de mis roms comprimidos por una ficticia para poder tenerlo asociado con el emulador y poder ponerle un icono personlizado.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: SC on May 02, 2015, 02:59:40 pm
Genial  :beer:, ¡Es suficiente para mi con eso!
¿Sera capaz de reconocer extensiones erróneas?
 Me explico usualmente yo reemplazo las extensiones de mis roms comprimidos por una ficticia para poder tenerlo asociado con el emulador y poder ponerle un icono personlizado.
Proper Translation:
Great  :beer:, That's enough for me!
Will it be able to recognise erroneous file extensions?
I mean: I usually replace my compressed ROM file extensions by a fake one so to have it associated with an emulator and giving a custom icon to it.
sics, te sugiero que escribas en Inglés aquí, si fuese posible.
Si eres capaz de entender Inglés escrito, probablemente estés preparado para escribirlo tú mismo también.
Si alguna vez necesitas ayuda puedes decirmelo y si tengo tiempo trataré de ayudarte.
----
sics, I suggest you to write English here, if that's possible.
If you are capable to understand written English, you'll probably be ready to write it too.
If you ever need help you can ask me and I'll try to give you assistance if I find the time.

 :police: ;)
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: sics on May 03, 2015, 12:32:50 am
No soy capaz de leerlo, utilizo varios traductores para poder interpretarlo y aun así aveces lo interpreto mal. (http://www.bwass.org/bucket/Sonrisa.gif)
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Pennywise on May 03, 2015, 02:18:40 pm
Este forum es solo anglais. Tu necesitas apprendar anglais por este forum. Las reglas.

Hey, I know a little Spanish, terrible as it is.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: mopoz on May 04, 2015, 01:27:23 pm
The debug does not show the address to the FX-BUS?
Code: [Select]
00:e4ff a0 f3    lms r0,($01e6)  r0=$0000 SRAM=00:01E6 ALT1=0
...
00:e272 df       romb            ALT1=0 ALT2=0 ROMBR=$5c
00:e273 ef       getb            r0=$00a9 ROM=5C:FE06
...
00:e278 df       romb            ALT1=0 ALT2=0 ROMBR=$07
00:e279 df       getc            ROM=07:F8A9 COLR=$a3
It would be good like here :angel:
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: neagix on May 11, 2015, 12:55:35 pm
Great work! bsnes-plus is truly something that can replace the old Geiger's debugger, which is buggy and has no native support on Mac/Linux anyways..

What do you think about a few features I have been thinking on:

If you think these can be useful, I might try to contribute on github directly, although can't make promises :)
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: mziab on May 11, 2015, 01:08:35 pm
(advanced, maybe for later) different color for memory address that was never read/read only/written so far during the emulation

That one is already implemented. The memory viewer colors bytes red, blue or gray depending on whether they're code, data or unused so far.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: neagix on May 11, 2015, 01:09:57 pm
That one is already implemented. The memory viewer colors bytes red, blue or gray depending on whether they're code, data or unused so far.
Nice! Missed this one. But about data: still we could have a diversification about read and read-written?
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: badinsults on May 11, 2015, 03:33:42 pm
Very happy to have this project out. I was using an old version of bsnes for debugging, but with the latest version of Linux Mint, it was not possible to compile it without changing the source.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on May 11, 2015, 07:43:56 pm
Nice! Missed this one. But about data: still we could have a diversification about read and read-written?

The usage stats actually do track reads and writes separately, it's only the memory viewer that (currently) uses the same color for both.

On a related note, I was recently discussing reworking the usage tracking, including adding more specific usage contexts (see this github issue (https://github.com/devinacker/bsnes-plus/issues/10) for specifics). It'll most likely be an upstream change in bsnes-classic whenever that happens, but aside from that, I've also considered adding a way to customize the colors (including separate read/write colors if it'd be useful).

As for labels, I did plan to add support for those later on as well (probably similar to the way they are handled by the FCEUX debugger).

The debug does not show the address to the FX-BUS?

Right now, the SuperFX debugger only shows all the registers that are relevant to the current and previous instructions. I did this before writing the actual register editor, which makes it slightly redundant, and I might reduce it to showing the current instruction's registers to make room for other relevant info (like ROM/RAM access locations, such as in your example).
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: neagix on May 12, 2015, 08:12:37 am
The usage stats actually do track reads and writes separately, it's only the memory viewer that (currently) uses the same color for both.

On a related note, I was recently discussing reworking the usage tracking, including adding more specific usage contexts (see this github issue (https://github.com/devinacker/bsnes-plus/issues/10) for specifics). It'll most likely be an upstream change in bsnes-classic whenever that happens, but aside from that, I've also considered adding a way to customize the colors (including separate read/write colors if it'd be useful).
It can be useful only to understand when a variable that one assumes is only read (e.g. a constant) suddenly becomes written. Gives insight on usage patterns.

Other ideas from the top of my mind:

There should be github trackers for these?

Also, some old post of mine: http://neagix.blogspot.nl/2013/05/65c816-from-assembly-to-c-quest-for-die.html
I still have the source for that project of mine, as I was trying to extract context information from debugging/disassembly
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on May 16, 2015, 06:50:46 pm
Still slowly working on bsnes-plus in my spare time, but I also (finally) touched up xkas-plus a bit and added a link to binaries in the OP. Check it out!

Fun fact: KALE (http://www.romhacking.net/utilities/1064/) uses xkas-plus to generate limit-removing patches (https://github.com/devinacker/kale/tree/master/src/patches) (in IPS format) that can be applied from the editor, as an example of how I've extended it to be useful for systems other than the SNES.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: DackR on May 19, 2015, 03:09:15 pm
Wanted to say thanks again for working on this.

I downloaded the windows binaries for bsnes-plus and tried debugging Marvelous: Another Treasure Island, but the application crashes whenever I try to start a new game or load a saved game. This happens with the original ROM as well as with my current English build of the ROM. Just thought I'd mention it.

It looks like the source was updated recently, so I may need to set up a mingw environment on my PC to give building the latest version of bsnes-plus a shot. Maybe tonight.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: mziab on May 19, 2015, 04:43:16 pm
Yeah, I get the same crash. It seems like something broke along the way. I tried going back some commits and it didn't crash anymore. So I wanted to find the faulty commit, but couldn't reproduce the crash when doing a git bisect. AWJ and Revenant should probably take a closer look at this.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on May 19, 2015, 07:07:12 pm
The crash still happens with the latest git revision. I'll take a look later and see what's going on, thanks for pointing it out.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: TimeCop on May 19, 2015, 07:41:24 pm
Are you aware of bsnes mercury? It includes Super FX over clocking.

https://github.com/libretro/bsnes-mercury

Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on May 19, 2015, 09:03:52 pm
The crash still happens with the latest git revision. I'll take a look later and see what's going on, thanks for pointing it out.

Fixed (see this commit + comments (https://github.com/devinacker/bsnes-plus/commit/b85fd3a9bbe08af3d30f089cc8804ffabb76d515)).

Here's an up-to-date build. (http://revenant1.net/bsnes-plus-r123.rar)

Are you aware of bsnes mercury? It includes Super FX over clocking.

https://github.com/libretro/bsnes-mercury
I'm familiar with it, though I haven't used it before. Personally I'm not sure if SuperFX overclocking is the sort of thing I'm interested in adding to an accuracy-oriented emulator though.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: seznam88 on May 20, 2015, 09:35:36 am
Hi, I have a problem with this emulator, same with the original BSNES.
The game is working at stable 60 FPS but when playing, the screen stutters, no the game itself only the screen.
The screen it´s like this - Smooth......Stutters.......Smooth.......Stutters,. ..
But when the screen stutters the game is still at 60 FPS and it´s working good without any lags or crackling audio.
Why is this happening ?
Can you help me please ?
Thank you very much for help in advance :)
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: mziab on May 20, 2015, 10:40:06 am
Hi, I have a problem with this emulator, same with the original BSNES.
The game is working at stable 60 FPS but when playing, the screen stutters, no the game itself only the screen.
The screen it´s like this - Smooth......Stutters.......Smooth.......Stutters,. ..
But when the screen stutters the game is still at 60 FPS and it´s working good without any lags or crackling audio.
Why is this happening ?
Can you help me please ?
Thank you very much for help in advance :)

Have you tried various combinations of Sync Video and Sync Audio turned on and off? Changing the video and audio drivers in Configuration/Advanced may help too, as well as changing the input frequency and latency in the Audio tab.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: DackR on May 20, 2015, 11:26:21 am
Fixed (see this commit + comments (https://github.com/devinacker/bsnes-plus/commit/b85fd3a9bbe08af3d30f089cc8804ffabb76d515)).
Great turn-around time. You rock!
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: seznam88 on May 21, 2015, 08:15:17 am
Have you tried various combinations of Sync Video and Sync Audio turned on and off? Changing the video and audio drivers in Configuration/Advanced may help too, as well as changing the input frequency and latency in the Audio tab.
I tried all of it and nothing helps :(
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: DackR on May 21, 2015, 09:54:41 pm
I tried all of it and nothing helps :(
If your computer is lacking in available system memory, it can cause the symptoms you are suggesting. Not sure why you are posting about this issue here though.

Fixed (see this commit + comments (https://github.com/devinacker/bsnes-plus/commit/b85fd3a9bbe08af3d30f089cc8804ffabb76d515)).
I am eagerly awaiting the improvements to the memory editor. Love what's in there so far. I can see that Importing and exporting from the memory editor will be useful. All kinds of possibilities there.

A few suggestions (for memory editor and other areas):
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: SC on May 21, 2015, 11:35:52 pm
A few suggestions (for memory editor and other areas):
  • It may be helpful to label the search box. (nit-picky, i know)
  • Would be helpful to be able to add comments to different memory regions-- and be able to save and load these notes from a file-- or have them be automatically associated with a certain ROM. I would prefer to load the data files manually, however, because of how I change the filename of my WIP ROMs based on the current build revision.
  • Ability to save and load breakpoint definitions from a file.
  • I'd like to name/label my breakpoints. Is it bad that I'm obsessed with naming everything? I usually keep notes elsewhere, but this would negate the need.
Actually I'm the same too. :P
These would be very helpful whenever I hack a SFC game. ::)
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: seznam88 on May 22, 2015, 07:58:05 am
If your computer is lacking in available system memory, it can cause the symptoms you are suggesting. Not sure why you are posting about this issue here though.
I´m posting it here because it´s happening it for me with this emulator.

My system specs -
Windows 7 Ultimate x64
CPU - Intel Xeon Quad Core E5450 - 3.00 GHz
RAM - 4GB
GPU - NVIDIA Geforce GT 630 - 4GB

Is it weak for this emulator ?
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on May 23, 2015, 12:18:40 am
https://youtu.be/fZPjFJGzI88

Didn't have the time or motivation to work on useful debugging stuff lately, so I spent a couple of hours banging this out instead.

I'll be rewriting the memory and breakpoint editors soon, and will probably release again after that. In the meantime, EmuCR has daily snapshots now (http://www.emucr.com/search/label/bsnes-plus?&max-results=12) (which I haven't tested at all, so try them and see, I guess).
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: DackR on May 23, 2015, 09:31:19 pm
https://youtu.be/fZPjFJGzI88

Didn't have the time or motivation to work on useful debugging stuff lately, so I spent a couple of hours banging this out instead.

Now that is awesome. :)
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: AWJ on May 30, 2015, 04:51:10 pm
I'm genuinely curious why you would feel the need to add ZSNES-style SPC dumping to a "new" SNES emulator in 2015. I'd be very surprised to learn that any rippable SPC (i.e. excluding music engines that depend on 65816-side data streaming) from any game hasn't been long-since ripped by now, and call me elitist, but if anything we should be encouraging things like SPC ripping to be done by people who know what they're doing, not provide another way for ignorant newbies to do shitty one-click rips.

It seems to me that all you're doing by adding this feature is encouraging the proliferation of low-quality SPCs with missing lead notes or with sound effects mixed in, and at the same time begging your issue tracker to be flooded with "I cliced dump spc in tales of fantasia and it dun work, pls fix" unfixable bug reports.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on May 30, 2015, 10:38:42 pm
I'd be very surprised to learn that any rippable SPC (i.e. excluding music engines that depend on 65816-side data streaming) from any game hasn't been long-since ripped by now

I've personally ripped either missing songs or entire soundtracks for dozens of NES and SNES games within the past few years that simply didn't have complete sets available, and there are still quite a few SNES games that, to my knowledge, don't have complete SPC sets available for one reason or another (and that's only including games for which dumping playable SPCs is actually possible). Even beyond that, there have been dozens of other games which have recently had new SPCs added to sets that were previously assumed to be complete, whether it was music that was outright unused or just obscure enough to be missed by the majority of listeners, but it's not an entirely obsolete feature, and it's one that I've made use of very many times in other emulators (especially in conjunction with a debugger such as Geiger's), so there it is.

I don't expect bsnes-plus to ever come anywhere close to the level of usage among "ignorant newbies" as ZSNES and Snes9x, both of which have had the same feature since approximately the stone age. Adding it to one more emulator, especially a relatively niche one like this, really isn't lowering the barrier to entry for would-be SPC dumpers in any significant way.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: AWJ on June 01, 2015, 04:26:17 am
Point taken.

I've got another question for Revenant or for anyone who does SNES audio hacking: How useful do you consider the ability to disable individual audio channels (voices) in a SNES emulator?

I'm trying to remove redundant code to make the emulator easier for me to maintain and for Revenant to add new debugging features to, and the first thing I'm working on is the two different S-DSP implementations (that's the audio DSP, not the Pilotwings/Mario Kart one) One (the one I'm trying to get rid of) is the one written by blargg which is also used in later versions of snes9x and in many SPC music players; the other one is closely based on blargg's but rewritten by byuu to fit more directly into his framework and to match his coding style better. And one of the differences between the two DSP implementations is that blargg's supports disabling voices, but byuu's rewritten version doesn't. And I'm trying to decide whether to add that feature to byuu's when I make it the only S-DSP in bsnes-classic.

The thing is, in order to completely disable a voice from being heard, it's necessary to disable both its direct output and its echo output. blargg's DSP handles this, essentially, by continuously force-KOFFing the disabled voice(s). And the problem is that when you do the latter it's visible to software, since the echo buffer is in shared APU RAM. I doubt many (or any) games actually depend on reading back the echo buffer, but I'm still not entirely comfortable having a feature that looks deceptively cosmetic but actually can theoretically affect emulated program behavior (and I guess byuu wasn't either, which is why his version of the DSP code doesn't have any voice-disable capability)

I've never done any SNES audio work, but I know I find the ability to toggle video layers (BGs and sprites) very useful just as a quick way to see what layer a particular object or effect is on. And luckily, PPU layer toggling isn't visible to software in any way, just as long as an emulator still does the Range Over/Time Over tests even when sprites are disabled. But like I said, I have no idea if voice toggling is something people find indispensable, or if byuu added it to his UI just because it was already supported by blargg's code.

(If you just want to see what channel an instrument or sound effect is being played on, the "piano keyboard" window Revenant recently added to bsnes-plus can do that for you...)
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on June 25, 2015, 10:39:32 pm
I've never really had any use for disabling individual channels, other than for fun (and it can still be done in most other emulators and SPC players anyway...)

I'm not really opposed to taking it out if there's not another practical solution that doesn't interfere with accurate DSP emulation.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Nightcrawler on June 27, 2015, 04:43:41 pm
I would say it is about the same as the background analogy. It would be convenient to be able to disable channels in the emulator, however you can live without it. When I have had a need to disable a specific audio channel, I have usually done so temporarily in software and rebuilt.

If I were in your shoes and trying to streamline and simplify the code as such, I'd probably omit it. I don't think the added complexities are worthwhile for the feature even though I do think the feature itself would be a nice convenience.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: infidelity on July 28, 2015, 08:57:15 am
I know its only been a month since I last asked, but any new developments? I can relate to work being an inconvenience to doing stuff like this. I check a couple times a week for any new updates. Thanks again. :-)
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on July 30, 2015, 12:04:53 am
Crossposting my reply from nesdev, because why not

Quote
Hopefully I'll be working on it soon now that things have been slowing down at work, which has been eating up most of my programming time lately; developing C++/Qt applications like this one (and my other main projects as of late) is also what I do for a living, and sadly I don't have an unlimited amount of time to put into the same general thing every single day :P
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: oziphantom on August 01, 2015, 09:26:01 am
I've seen bSNES+ just miss breakpoints, I set it to just the first address. Then I made the both fields with the same address, still missed it. So I made the 2nd one a couple of bytes after, still missed. I had the X ticked.
Am I missing something?
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on August 01, 2015, 06:17:02 pm
Which ROM / what address / what were you doing to try to trip the breakpoint?
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: oziphantom on August 02, 2015, 04:15:45 am
HARVEST MOON SNES US smc with header

80C520

Moving from screen to screen. This address should fire when entering the farm during spring. The address show up as red in hex viewer. I've confirmed with Geiger's it does fire.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: justin3009 on August 02, 2015, 12:55:38 pm
Would it be possible to get this to work more appropriately with Super Mario RPG as well?

There's a certain chunk(s?) that are clearly read but you cannot log them, trace them or anything.  It's like they don't exist even when it's clearly right in your face.  It's something to do with the SA-1 chip that causes the problem with emulators.  There's also a really awkward bit of forcing bank switching repeatedly instead of just flipping them all on to display all data. I'm not sure if that last one is really workable but the first part is EXTREMELY important as it makes debugging certain things impossible.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on August 02, 2015, 12:59:10 pm
HARVEST MOON SNES US smc with header

80C520

Moving from screen to screen. This address should fire when entering the farm during spring. The address show up as red in hex viewer. I've confirmed with Geiger's it does fire.

I don't ever see 80C520 being executed, but I can put a breakpoint on a similar-looking section of code right before that and it breaks as expected when entering the farm:

(http://i.imgur.com/SyaCYue.png)

Would it be possible to get this to work more appropriately with Super Mario RPG as well?

There's a certain chunk(s?) that are clearly read but you cannot log them, trace them or anything.  It's like they don't exist even when it's clearly right in your face.  It's something to do with the SA-1 chip that causes the problem with emulators.  There's also a really awkward bit of forcing bank switching repeatedly instead of just flipping them all on to display all data. I'm not sure if that last one is really workable but the first part is EXTREMELY important as it makes debugging certain things impossible.

Can you be more specific?
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: justin3009 on August 02, 2015, 01:48:08 pm
$C0/9C96 is a culprit.  I wasn't able to set a breakpoint on it in any emulator except NO$SNES for some unknown reason.  Fairly certain it's how the game gets emulated due to having the SA-1 chip.  You can actually jump to that location and view it, but you cannot breakpoint it nor trace it, ever.  It's a graphical routine too so it's run fairly often.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on August 02, 2015, 02:16:05 pm
I'm able to get the debugger to break at that address several times in a row when entering areas from the overworld or moving between maps (such as entering/leaving Mario's house). Make sure you have "SA-1 bus" selected as the breakpoint source and that it's set as an execute ("X") breakpoint.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: justin3009 on August 02, 2015, 02:44:01 pm
..I somehow missed the SA-1 bus bit.  WELP.  That takes care of that then!  Thank ya there!
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: oziphantom on August 03, 2015, 02:29:20 am
I don't ever see 80C520 being executed, but I can put a breakpoint on a similar-looking section of code right before that and it breaks as expected when entering the farm:

(http://i.imgur.com/SyaCYue.png)

Can you be more specific?

Seems it is all a just so happens. The different address get called at the different time of day in the game. So when using BSnes I had moved out of the time for that first function but when I got to it in Geiger it was the right time of day. Sorry for wasting your time.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on November 09, 2015, 07:59:45 pm
It's been a while. Here's version 073+2. I didn't do everything with it that I actually wanted but I think it merits a new release at this point, and maybe this'll spur me to work on it more often. Download(s) in the original post.

Changelog [mostly scraped from commit messages in no particular order]:
Code: [Select]
Replaced original memory editor with a new, faster and better one [Revenant]
Added hotkeys for breaking and stepping in the debugger (F5 through F8) [Revenant]
Added new "Sound Viewer" window to tools menu [Revenant]
Removed "enable" checkbox from breakpoints, now enabled by R/W/X setting [Revenant]
Re-enabled quickload/save menus [Revenant]
Frame count added to CPU/SA1 traces [Revenant]
Fixed cycle timing issue introduced by debugger in previous release [Revenant]
Slightly improved SPC700, SA1 and SuperFX disassembly [Revenant]
Fixed MMIO mapping on SA1 bus (fixes crash with Marvelous and possibly others) [AWJ]
Various emulation, build, and other improvements [AWJ]
Backported various OpenGL, Direct3D, and rawinput fixes from bsnes 081+ [mziab]
Fixed potential GUI deadlock when Windows system menu is opened [Revenant]
Improved BPS/UPS/IPS soft patching support [mziab, Revenant]
snesreader no longer advertises RAR support that it doesn't actually have [mziab]
Backport newer File Extractor from VBA-M. LZMA2-compressed 7zip archives work now [mziab]
Various build fixes, mostly for clang / Mac OS [Optiroc, AWJ]
Nicer OSX app bundle (custom icon and retina support enabled) [Optiroc]

If there's something I was going to add / should have added but didn't, feel free to poke me about it anyway.

64-bit accuracy builds are still coming eventually.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: justin3009 on November 10, 2015, 07:03:23 am
Yeeeessss! I'll be checking this out in a couple days when I have time! I'm so glad you're still working on this!
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: DackR on November 11, 2015, 11:13:12 pm
Bravo! Been really enjoying some of the new features!

This is now my favorite snes debugger by far! Hot keys are the icing on the cake.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on November 14, 2015, 10:29:58 pm
64-bit builds (including accuracy) are now available in the OP.

Going forward I'll probably keep publishing both 64 and 32-bit builds (but most likely only 64-bit for accuracy).

November 17, 2015, 06:21:01 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I've uploaded newer 64-bit builds which should be a fair bit faster than the previous ones (blame me not bothering to switch away from outdated sjlj-based tools until now...)

If you were experiencing slower emulation with the x64 builds (especially with coprocessor-based games) that shouldn't be an issue anymore.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: DackR on November 21, 2015, 09:52:03 pm
After using the new version a bit- I have a new wish list.  >:D

Would you consider allowing for global debugger hot keys? I find myself with the main screen or the memory editor open when I wish to break/resume/step in the debugger. I love that there are hot keys at all though.  8)

Also noticed that copying data from the memory editor grabs 1 extra byte than what is highlighted. Copying data from multiple rows of data doesn't copy anything at all.

For the search function, which is heaven-sent, I wish it it would highlight the data as it is found and perhaps be able to continue the search without having to click on search to bring up the dialog again. (Unless I missed something.)

As always-- love, love, love, what you're working on here.  :thumbsup:
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: mziab on November 22, 2015, 09:13:12 am
I love the work being done on this. Looking forward to persistent breakpoints. What would be a real boon is something like the BG layer/tilemap viewer from VSNES. It's probably the only thing I still use ZSNES+VSNES for.

Anyway, the new memory viewer is too narrow when first opened, cutting off part of the the widget. I guess it's using some kind of hardcoded size, which is too little for the style and fonts I have set up. That's only a minor inconvenience, though.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: justin3009 on November 22, 2015, 12:57:17 pm
My only complaint so far at the moment is not being able to use 'Ctrl' and 'Shift' as keys :P

My default keys for SNES tends to be:

A = ]
X = [
Y = P
B = Right Ctrl
L = ;
R = '
Start = Enter
Select = Right Shift

All keys work there except for Ctrl and Shift which is really bothersome.  I could just change my keys but I'm ungodly picky since I've been using that same mapping for.. 12+ years now I believe.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: mziab on November 22, 2015, 01:10:17 pm
I remember this was a limitation in the early bsnes codebase caused by how modifiers were handled. Since then byuu seems to have rewritten the internals a couple of times, addressing that issue at one point.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: justin3009 on November 22, 2015, 03:31:04 pm
Yeah in the later bSNES versions it's remedied.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: mziab on December 04, 2015, 06:05:47 pm
After using the new build extensively, I have two minor usability suggestions.

It would be nice if the new memory viewer displayed the address when you click a byte. It would be a godsend when browsing the memory to find the right address and then e.g. copy it to a breakpoint. Actually, a context menu action to copy the currently selected address would be even better.

Another useful thing would be changing the background of the byte at the given address to yellow or something, so that you see where in the row it is. The old memory viewer just started the row at the address you input. This one always starts at the nearest multiple of 16, so in some cases I need to manually count the bytes to make sure I'm at the right place.

Anyway, I hope those requests are reasonable.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: zhade on April 20, 2016, 04:31:46 pm
I've been using the latest build lately, I love the breakpoint ranges so much !

but and as discussed here, the way the CTRL and SHIFT keys won't work is bothersome, To work around this limitation I made a small AutoHotKey script that changes the input of those keys to other keys (F6 to F12) and it seems to work perfectly for me so I thought I could share it with you guys.

I have not been able to make the RightAlt key work correctly.. it might be an issue with my keyboard.
I compiled the script to an executable file so anybody using windows can use it without the need to have AutoHotKey

here is the AHK script: (kind of self-explanatory)

Code: [Select]
#singleinstance force

#IfWinActive ahk_exe bsnes.exe

Enter::F12
LCtrl::F7
RCtrl::F6
vkDF::F6
LAlt::F9
LShift::F11
RShift::F10

note: vkDF stands for the RightCTRL key on my keyboard, I don't know if yours will trigger the normal "RCtrl" key or work like mine so I remaped both to the F6.

How to use / Issues:
- run the executable, it will stay open in the background, to close it right-click on the tray icon
- in bsnes, go set your controls like you would normally (binding Enter will bind F12 instead, so no need to bother binding the coresponding F keys)
- All keyboard shortcuts using a combination of keys won't work, for example, ALT+enter won't toggle fullscreen (even if you have not bound any button to ALT and/or ENTER), if you want you can use the tray icon menu to suspend the key remaping to be able to use such key shortcuts.
- The remaping only work with bsnes (actually, any program called "bsnes.exe" so it probably will work with other bsnes builds too), all other programs will receive the normal keystrokes.
- Trying to bind the RAlt key (at least on my computer) binds ALT+F7 instead and causes problems so you should avoid using it

Download bsnesKeyRemap (https://www.dropbox.com/s/8yysg2omrxyw8gf/bsnesKeyRemap.zip?dl=0)

if you don't trust running the executable, or want to modify the script to your needs, the full script (as shown above) is also included in the archive and you can get the latest version of AutoHotKey here (https://autohotkey.com/).

As you can see by the size of it.. this script is very basic so many things could be added to make it better like making the remaping work only when the "game" and "controls settings" windows are focused on to keep it from interfering with the debugger's windows.

It would also be fairly easy to add debugging hotkeys so that say CTRL+Q for example checks the "step SA-1" checkbox and clicks on "run" or any other thing that is already possible with the mouse, like unchecking all the breakpoints boxes by pressing CTRL+B to disable them all at once, and resetting the boxes back to their previous checked state by pressing CTRL+ALT+B for example. I've manged to do many small shortcuts like this for geiger' snes9x debugger but now that I can use the CTRL / SHIFT / ALT / ENTER keys with bsnes+.. I don't really see anything that geiger's debugger does better so I guess I should addapt my scripts to work with bsnes+ and at the same time if you guys are interested, I could make it customizable using a .ini file where each hotkey could be changed and features switched on/off to your liking.

Hopefully, if I do this, and do it right, it will give the chance to Revenant to focus on developping new / improving existing debugging tools :)
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on May 05, 2016, 12:11:53 am
I meant to mention this much earlier, but there's actually an undocumented setting for that in bsnes-qt.cfg (located in %AppData%/.bsnes/ on Windows, ~/.bsnes/ everywhere else). Changing "input.modifierEnable" from true to false will allow you to bind modifier keys by themselves instead of using them as part of key combos.

I added an actual checkbox for that (as well as "input.allowInvalidInput", which lets you press opposite directions on the D-pad at the same time) to the Input tab in the latest revision, which may or may not show up on EmuCR sometime in the next 24 hours, or you can modify the config file manually (and see what other interesting settings are available).
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: John Enigma on May 31, 2016, 12:54:41 am
From what I understand, or for what it looks like, from this bsnes fork version of yours, you look like you are turning the bsnes emulator into something like FCEUX (http://www.fceux.com/web/home.html) (in which it has NES romhacking & debugging tools, and a built-in hex editor). Isn't that right, Mr. (or Mrs.) @Revenant?
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: sics on July 09, 2016, 03:59:41 pm
Hi I would like to turn your work in my emulator header, but I have a problem, I use fictitious extensions currently in my ROMS to maintain separate sets of other compressed files, but this way I can not associate directly with the application.  :-\  :thumbsup:
(http://www.bwass.org/bucket/7sn.png)
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: STARWIN on July 10, 2016, 08:47:32 am
When a (R/W) breakpoint is hit, and I step, it just hits the breakpoint again, so I have to step again to actually step. Intended?

Trace logs could show the opcodes+operands in addition to the mnemonics.

I don't know how to disassemble anything else than what it decides to show. This gives a claustrophobic feeling.

edit: In a LoROM game if I set a breakpoint at the mirror $80-$BF, it won't trigger if mirrored is accessed. Intentional? Geiger's does.

edit2: Memory editor could show the exact offset of the selected cell.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on July 24, 2016, 04:30:20 pm
From what I understand, or for what it looks like, from this bsnes fork version of yours, you look like you are turning the bsnes emulator into something like FCEUX (http://www.fceux.com/web/home.html) (in which it has NES romhacking & debugging tools, and a built-in hex editor). Isn't that right, Mr. (or Mrs.) @Revenant?

Basically, yes. Well, the debugger was already there, but my goal is to make it more robust/usable (though unfortunately it's not quite as full-featured as the FCEUX debugger yet).

When a (R/W) breakpoint is hit, and I step, it just hits the breakpoint again, so I have to step again to actually step. Intended?

This can happen if a single instruction reads/writes two bytes that are both part of a single breakpoint's address range, or if a read+write breakpoint is triggered by a read-modify-write instruction (because the read and the write don't actually happen simultaneously). This is less "intentional" behavior and more just a side effect of how breakpoints were already implemented in bsnes.

Quote
Trace logs could show the opcodes+operands in addition to the mnemonics.

This is something I already wanted to add at some point, both to the debug/trace window and the disassembly window.

Quote
I don't know how to disassemble anything else than what it decides to show. This gives a claustrophobic feeling.

The disassembly window only shows stuff that has actually been marked as executed, within a certain distance around the current PC. This is another thing from the original bsnes debugger that I would like to improve eventually.

Quote
edit: In a LoROM game if I set a breakpoint at the mirror $80-$BF, it won't trigger if mirrored is accessed. Intentional? Geiger's does.

Right now, breakpoints only support address mirroring when specifying a single address, rather than a range of addresses, for performance reasons. (See this post (https://github.com/devinacker/bsnes-plus/issues/17) for an explanation.) This is something I might try to revise eventually. Keep in mind that if you're only breaking on a single address, you can leave the end of the address range blank.

Quote
edit2: Memory editor could show the exact offset of the selected cell.

This is another change to the memory editor that is already going to be in the next release.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on October 30, 2016, 12:20:14 am
Just to prove that this project is still alive, here's a spiffy new overhaul of the VRAM viewer, much thanks to UnDisbeliver:

(http://i.imgur.com/0UMv4WF.png)

Very well timed, too, because I've been gearing up to work on some other new graphics-related features (tilemap viewer, etc.) Now that I'm focusing on actual features again, another release should finally be not too far off.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: justin3009 on October 30, 2016, 09:48:49 am
Oh that is looking VERY nice!  I anxiously await the next update!

This may just me being nit picky, but is it plausible to make all the commands in trace logs to be in capital letters along with the offsets?  I may just be too used to Geiger's but it makes it a bit easier to read and notice some things when it's all caps.

Is there also a possibility of adding in a 'Reset Debug' kind of option like Geiger's where it resets the trace masking?
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Nightcrawler on October 30, 2016, 10:28:18 am
Just to prove that this project is still alive, here's a spiffy new overhaul of the VRAM viewer, much thanks to UnDisbeliver:

That looks nice! If you haven't already, you may want to look at VSNES for additional interface ideas. That screenshot reminded me of it being a bit similar. I still find myself loading up a savestate in VSNES over debuggers at times to get a nicer interface for evaluating of the state of the system and testing quick changes (obviously VSNES is limited in some areas for this not being an emulator).
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: DackR on November 01, 2016, 10:35:52 pm
Just to prove that this project is still alive, here's a spiffy new overhaul of the VRAM viewer, much thanks to UnDisbeliver:
Very well timed, too, because I've been gearing up to work on some other new graphics-related features (tilemap viewer, etc.) Now that I'm focusing on actual features again, another release should finally be not too far off.

Thanks for your work on bsnes-plus! It's been extremely useful.

I am going to try xkas-plus for the first time tonight since I'm currently unable to download bass v14 from byuu's website (which is what I've been using after switching from xkas a few months ago).

Please keep it up.

Edit: Just tried out xkas-plus and other than the absence of the rep directive (not really a big loss), everything works awesome. Thanks again.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Madsiur on November 02, 2016, 07:02:44 pm
I'm happy a new release is not too far away. I tend to use bsnes+ over SNES9X Debugger because Geiger's utility doesn't like my OS (Win 8.1), it tend to crash right after going into debugging.

I really like that VRAM viewer :D

Capital letter offsets is also a suggestion I second but it's not an issue as it is now.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on November 22, 2016, 09:52:48 pm
Over a year later, here's a new release, better than ever.

Windows 64-bit compatibility & accuracy (https://github.com/devinacker/bsnes-plus/releases/download/v073%2B3/bsnes-plus-073.3-x64.rar)
Windows 32-bit compatibility (https://github.com/devinacker/bsnes-plus/releases/download/v073%2B3/bsnes-plus-073.3.rar)

Things of interest:
Huge thanks to UnDisbeliever and LuigiBlood, respectively, for helping out with the first two of those things in the couple of weeks leading up to the release.

Hopefully it won't be another year before I release another one of these (yeah, that's what I said last time, isn't it?) I know there's still some stuff I probably said that I'd do (or that I want to do, anyway) that hasn't been done yet, but it'll happen. Thanks to everyone who motivated me to finally work on this again, especially recently.

Anyway, the rest of the boring changelog:

Code: [Select]
Added tilemap viewer, revamped VRAM viewer and improved OAM viewer [UnDisbeliever]
Added all BS-X/Satellaview support from bsnes-sx2 [LuigiBlood]
Added PPU breakpoint support to accuracy and performance builds [Revenant]
Added more comparison options to cheat search dialog [Grieverheart]
Added some command line debugger arguments (see `bsnes --help`) [UnDisbeliever]
Added debug window option to show H-count as either dots or clocks [Revenant]
Added option to use WDM instruction as a software breakpoint [Revenant]
Added "allow invalid input" and "allow modifier keys" to settings window [Revenant]
Updated MSU1 support to revision 2 (includes pause/resume support) [Revenant]
Improved handling of debug window GUI state when breaking/running/stepping [Revenant]
Expanded debug properties view for multiple chips on all 3 build profiles [Revenant]
Made power-on state (especially accuracy PPU) randomized the same way as higan [Revenant]
Memory viewer displays current address at bottom of window [Revenant]
Memory viewer now displays APU bus instead of just APU RAM [Revenant]
Memory viewer now displays (most) I/O registers as read-only values [Revenant]
Debug log files are now only opened if a game is actually open [Revenant]
Debugger switches between debug/main window depending on focus policy [Revenant]
Fixed flickering/blanking of game screen when changing/resizing windows [Revenant]
Fixed CPU bug w/ direct page wrapping in emulation mode [AWJ]
Fixed disassembly of PEA/PEI/PER instructions [AWJ]
Fixed some details of S-DD1 memory mapping [AWJ]
Fixed typing in native file dialogs triggering emulator hotkeys [Revenant]
Fixed debug events messing with emulation speed if turbo/slowdown keys were held [Revenant]
Fixed spurious debug events caused by dummy reads during SPC write instructions [Revenant]
Fixed file dialog path being cleared when cancelling a native file dialog [Revenant]
Fixed handling of $00Fx registers when dumping SPCs [Revenant]
Fixed "search next/prev" behavior when wrapping to beginning or end of memory [Revenant]
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: justin3009 on November 23, 2016, 03:38:17 pm
That Step in the debugger being fixed is a frikin god send.  Also that Tilemap viewer and VRAM viewer are just absolutely amazing.  You did a wonderful job on this!  I believe bsnes is now my main debugger.

The only couple nitpicks I have still have been said mainly.

1. It's just my personal taste but everything in the debugger being in CAPS would be a lot easier to read.
2. This is probably a bit much honestly but I'll throw it out there anyway.  Would it be possible to add more numbers of Save State slots that behave similar to SNES9X?  AKA:

F1 - Loads Slot 1
F2 - Loads Slot 2.. etc..

Shift F1 - Saves Slot 1
Shift F2 - Saves Slot 2 etc..

I was testing around with the few quick save states BSNES has currently and if you try using even one of the same key for load/save, it'll load and then save instead of loading or saving.

IE: Shift + F1 = Save Slot 1 but if you have F1 as the key to load that slot as well, it'll reload the save state and then save instead of just saving.  I think it needs to realize that Shift + F1 and F1 are completely separate key commands.

Even still, this is such a vast improvement over the original BSNES and it's far superior over SNES9X now with the Tilemap viewer and such.  Thank you so much for your hard work on this!
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: RetroGameFan9000 on November 24, 2016, 12:44:07 pm
I download the new version but when I opened, my antivirus blocked it.  :-[
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on November 24, 2016, 03:46:50 pm
1. It's just my personal taste but everything in the debugger being in CAPS would be a lot easier to read.
I can add that to the debugger options later, no problem.

I was testing around with the few quick save states BSNES has currently and if you try using even one of the same key for load/save, it'll load and then save instead of loading or saving.

IE: Shift + F1 = Save Slot 1 but if you have F1 as the key to load that slot as well, it'll reload the save state and then save instead of just saving.  I think it needs to realize that Shift + F1 and F1 are completely separate key commands.
Yikes, I'll have to check that out.

I download the new version but when I opened, my antivirus blocked it.  :-[
Do you know which file specifically gets flagged?

Either way, I can guarantee it's a false positive and you should ignore it and/or switch to a better antivirus.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: RetroGameFan9000 on November 24, 2016, 04:42:30 pm
Do you know which file specifically gets flagged?

Either way, I can guarantee it's a false positive and you should ignore it and/or switch to a better antivirus.
bsnes.exe. It was blocked by Avast. It says that file may be dangerous and they are testing it. I hope that the file is true negative.

EDIT: The file is safe.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: qwertymodo on November 24, 2016, 11:17:58 pm
The source is all up on github, I've built it myself several times.  Definitely safe.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: RedGuy on November 25, 2016, 07:45:52 am
Great work on the debugging features.  This is the first time I've tried any variant of bsnes and it along with the additional features have now become my new favorite snes tool.  Thanks for making the source code available.

The hotkey problem that Justin is having is due to how bsnes provides support for modifier as single keys.  The way it works right now is all modifiers work as single keys if you click the checkbox and any existing mappings that use modifier+key result in both pressed separately.  I added a temporary workaround that saves a single modifier key as both the modifier and the actual scancode pressed.  That looks to have solve the problem.  Now bsnes thinks you are pressing the modifier + another key (which happens to be itself).

I coded up a prototype memory location label tool which can be loaded/saved as an xml: http://i.imgur.com/njtlOkO.png
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: creaothceann on December 05, 2016, 02:25:53 pm
That looks nice! If you haven't already, you may want to look at VSNES for additional interface ideas. That screenshot reminded me of it being a bit similar. I still find myself loading up a savestate in VSNES over debuggers at times to get a nicer interface for evaluating of the state of the system and testing quick changes (obviously VSNES is limited in some areas for this not being an emulator).

 :)
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Revenant on December 19, 2016, 10:28:22 pm
Here is a minor release which fixes a few bugs of varying importance. I plan to start doing these more often, maybe monthly. Download links are in the OP as usual.

(justin3009: hopefully the issue with hotkeys and modifier keys should be fixed)

Code: [Select]
Fixed low-res scanlines being horizontally resized too much when fast-forwarding
  while a high-res screen mode is active (compat/performance builds only) [Revenant]
Fixed potential issue with modifier keys triggering multiple wrong inputs [Revenant]
Fixed potential crashes when nonexistent cart RAM would be mapped by a manifest
  and/or certain coprocessors (such as the SA1) [Revenant]
Fixed potential crash when tracing SA1/SuperFX with trace mask enabled [Revenant]
Fixed trace mask being wrongly enabled when loading a cartridge [Revenant]

I'll start addressing more of your ideas and issues once the holidays are over. I wanted to get a few things taken care of before then, but hopefully I can start to keep up more frequent official releases.
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: qwertymodo on December 20, 2016, 11:42:12 am
The memory location labeling would be an AMAZING feature to have. Hopefully there's some way to hide values, so you could build a list of all known values, but then decide which ones you actually want to view for a particular session (like the "watches" dialog in Visual Studio) or possibly an auto option that only displays values that have been accessed or modified in the session (like the "autos" dialog in VS).
Title: Re: bsnes-plus and xkas-plus (new SNES debugger and multiplatform assembler)
Post by: Nightcrawler on December 20, 2016, 08:39:14 pm
I'll start addressing more of your ideas and issues once the holidays are over. I wanted to get a few things taken care of before then, but hopefully I can start to keep up more frequent official releases.

Since you'll be working on things over the holidays, I figured I'd throw a new suggestion into the mix. ;D

"Special Tracing"

By that I mean outputting DMA, HDMA, IRQ, and NMI events. Geiger's debugger does this (except for IRQ I think) and it is extremely useful. It gives you a quick snapshot of what is going on during a frame and between frames without having to dig into the code details. It also gives you quick and easy offset starting points when trying to reverse engineer various happenings. Lastly, the H/V counts provided show when transfers are happening and whether or not you overran your hblank/vblank time. It saves much time to see all of that stuff at a glance. I didn't see any way to do these types of things in bsnes-plus.