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

new bsnes-plus debugging features
http://forums.nesdev.com/viewtopic.php?f=12&t=16625
Page 1 of 2

Author:  Benny [ Wed Oct 25, 2017 11:12 pm ]
Post subject:  new bsnes-plus debugging features

Hi everyone,

a few days ago I finished some debugging feature plans I had for bsnes-plus in order to debug some games I work on.

As it would be nice to maybe create a pull request to maybe merge it into the original bsnes-plus version I'd like to have some people to test the new feature.

You can download and compile it from this page:
https://github.com/BenjaminSchulte/bsnes-plus

Image

New features of the debugger are:

  • The disassembler and debugger are now merged into one window.
  • The disassembler has some simple syntax highlighting
  • The disassembler supports WLA symbol files (located as .sym file in the same directory as the ROM)
  • The disassembler displays the address names instead of the addresses, if known
  • You can follow JMP and BRA addresses by clicking on them
  • You can toggle breakpoints by clicking on the address
  • You can name addresses by right clicking on the line
  • There is an index of all names (=Symbol) which can be filtered
  • You can add comments to disassembled lines
  • There is a feature to break on BRK opcodes
  • You can pass --break-immediately to the disassembler to debug from the very beginning
  • A new debug port which allows you the log static messages directly from your ROM
  • The disassembler tries to figure out the upfollowing code, even if its the first time you disassemble it
  • Displays some simple loops
  • If activated, all names and comments will be stored in a .sym file when closing the emulator for next time

However, as I only work with a few original ROMs, I didn't really test the new emulator very well, so I'd like you to test the new features and let me know:

  • Does this actually work on Mac and Windows? (I only work using Linux)
  • Did I accidentally remove an important feature?
  • Is there a must-have-feature you really, really would miss here?
  • I only tested the main CPU, the other processors should still work but have very limited features. Does this still work?
  • Are there some new bugs I missed? (If so, please let me know which game and how to reproduce)

Have a great day!

Author:  dougeff [ Thu Oct 26, 2017 4:42 am ]
Post subject:  Re: new bsnes-plus debugging features

Looks great

It would be easier to test if there were a windows binary exe. I personally don't have QT installed, for one thing. So, I don't really want to try to make my own.

Author:  HihiDanni [ Thu Oct 26, 2017 5:10 am ]
Post subject:  Re: new bsnes-plus debugging features

This looks quite comprehensive! The ability to load symbols from a file is something I'd find very useful, but I use CA65 as my assembler instead of WLA, so the symbol files probably won't be compatible.

Author:  Revenant [ Thu Oct 26, 2017 7:46 am ]
Post subject:  Re: new bsnes-plus debugging features

I've been following your work on this since I saw it pop up on GitHub, very nice work!

I haven't personally tried using it yet, but revamping the disassembler/tracer has been high on my to-do list for a long time. I think after the next upcoming (hopefully soon) release of bsnes-plus I'd love to consider integrating this into a future release as well.

HihiDanni wrote:
This looks quite comprehensive! The ability to load symbols from a file is something I'd find very useful, but I use CA65 as my assembler instead of WLA, so the symbol files probably won't be compatible.


ca65 symbol file support was a to-do item for me as well, since it's what I've been using for my recent SNES work as well. I don't think it should be too difficult to support both.

Author:  nicklausw [ Thu Oct 26, 2017 7:37 pm ]
Post subject:  Re: new bsnes-plus debugging features

HihiDanni wrote:
This looks quite comprehensive! The ability to load symbols from a file is something I'd find very useful, but I use CA65 as my assembler instead of WLA, so the symbol files probably won't be compatible.

Depending on the structure of ca65's symbol files, you could do what I did and have a lua script convert to WLA format for you.

Author:  adam_smasher [ Fri Oct 27, 2017 8:37 am ]
Post subject:  Re: new bsnes-plus debugging features

This looks amazing!

Author:  Reaper_Man [ Wed Nov 01, 2017 1:55 am ]
Post subject:  Re: new bsnes-plus debugging features

I would try it, but I got an exception error when I tried to run mingw trying to get it to compile on win10 x64. Unfortunately it doesn't really give me much else to work with, and I should go to bed. :/

Author:  Revenant [ Fri Nov 03, 2017 8:33 pm ]
Post subject:  Re: new bsnes-plus debugging features

http://revenant1.net/bsnes-plus-benny-win64.zip

Note: building out of the box fails on Windows because "ERROR" is already defined in wingdi.h, which conflicts with the DebugPrintCommand::Level enum. I suggest using mixed-case names for enum values instead.

Either way, this looks really great so far! I haven't tested it extensively to make sure everything behaves as it should but I'm excited about this nonetheless.

Author:  tepples [ Fri Nov 03, 2017 8:51 pm ]
Post subject:  Re: new bsnes-plus debugging features

If wingdi.h is Windows Graphics Device Interface, then what's the header for Windows Graphics Device Interface Next Generation Subsystem?

Author:  Benny [ Wed Nov 08, 2017 1:05 am ]
Post subject:  Re: new bsnes-plus debugging features

Thank you for the feedback (and for compiling it on Windows). :)

I was quite a little busy with my main job and other current SNES project so I didn't check here for a while. I think I'll try to fix the windows version by the end of the next week and also check out the CA65 assembler in order to also support their symbol files later.

Author:  Reaper_Man [ Mon Nov 13, 2017 12:30 pm ]
Post subject:  Re: new bsnes-plus debugging features

Got to try it, and the layout is great, I just wish there was a simple dump feature so I can save say a subroutine to a file.

Author:  nitro2k01 [ Tue Nov 14, 2017 2:09 am ]
Post subject:  Re: new bsnes-plus debugging features

tepples wrote:
If wingdi.h is Windows Graphics Device Interface, then what's the header for Windows Graphics Device Interface Next Generation Subsystem?

Image

Author:  Benny [ Tue Nov 14, 2017 6:44 am ]
Post subject:  Re: new bsnes-plus debugging features

Today I implemented a basic support for symbol files generated by the ca65 -Ln parameter.

Because no symbol file currently supports comments (Well, surely because it's actually no "symbol") the .sym file will be replaced by a different file format if bsnes is closed (if not deactivated in the debuggers options). Maybe someday this could go into a separate file or so.

I also added "exporting a dump" to my personal ToDo list, but I don't have that much time currently, due to two other big projects :)

Author:  Benny [ Wed Nov 15, 2017 10:53 am ]
Post subject:  Re: new bsnes-plus debugging features

Today I implemented a simple measurement tool. I did not test it very well and already know a lot of stuff which need to be implemented, until you can really use this in your daily life.

Image

Currently you can measure values from memory or from VCounter and do calculations between each measurement.

What's still missing:
- There are no labels/numbers on the preview graph, so you don't really know what value it is.
- The configuration is not saved, so you will always have to reconfigure everything
- Graphs can not be compared
- It's not tested very well
- Did not test it on windows
- Should be configurable/triggerable using the debug-port $420E, which currently only allowed to print debug messages.
- Would be great to have breakpoints configurable if some calculations exceeded some limits
- There is no documentation :D

Author:  psycopathicteen [ Wed Nov 15, 2017 6:29 pm ]
Post subject:  Re: new bsnes-plus debugging features

Does this work with SA-1 games? I want to see if I can hack KSS and SMRPG to work without a SA-1 chip.

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