It is currently Wed Nov 22, 2017 8:05 am

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Oct 25, 2017 11:12 pm 
Offline

Joined: Thu Oct 05, 2017 2:15 pm
Posts: 4
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!


Top
 Profile  
 
PostPosted: Thu Oct 26, 2017 4:42 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1828
Location: DIGDUG
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.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Thu Oct 26, 2017 5:10 am 
Offline
User avatar

Joined: Tue Apr 05, 2016 5:25 pm
Posts: 146
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.

_________________
SNES NTSC 2/1/3 1CHIP | serial number UN318588627


Top
 Profile  
 
PostPosted: Thu Oct 26, 2017 7:46 am 
Offline

Joined: Sat Apr 25, 2015 1:47 pm
Posts: 331
Location: FL
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.


Top
 Profile  
 
PostPosted: Thu Oct 26, 2017 7:37 pm 
Online
User avatar

Joined: Sat Jan 03, 2015 5:58 pm
Posts: 368
Location: ...
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.


Top
 Profile  
 
PostPosted: Fri Oct 27, 2017 8:37 am 
Offline

Joined: Sun Mar 27, 2011 10:49 am
Posts: 206
Location: NYC
This looks amazing!


Top
 Profile  
 
PostPosted: Wed Nov 01, 2017 1:55 am 
Offline

Joined: Sat Jun 17, 2006 2:31 pm
Posts: 45
Location: Austin, TX
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. :/


Top
 Profile  
 
PostPosted: Fri Nov 03, 2017 8:33 pm 
Offline

Joined: Sat Apr 25, 2015 1:47 pm
Posts: 331
Location: FL
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.


Top
 Profile  
 
PostPosted: Fri Nov 03, 2017 8:51 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19240
Location: NE Indiana, USA (NTSC)
If wingdi.h is Windows Graphics Device Interface, then what's the header for Windows Graphics Device Interface Next Generation Subsystem?


Top
 Profile  
 
PostPosted: Wed Nov 08, 2017 1:05 am 
Offline

Joined: Thu Oct 05, 2017 2:15 pm
Posts: 4
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.


Top
 Profile  
 
PostPosted: Mon Nov 13, 2017 12:30 pm 
Offline

Joined: Sat Jun 17, 2006 2:31 pm
Posts: 45
Location: Austin, TX
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.


Top
 Profile  
 
PostPosted: Tue Nov 14, 2017 2:09 am 
Offline

Joined: Sat Aug 28, 2010 9:01 am
Posts: 192
tepples wrote:
If wingdi.h is Windows Graphics Device Interface, then what's the header for Windows Graphics Device Interface Next Generation Subsystem?

Image

_________________
Gameboy Genius (Blog) - Gameboy development forum (+wiki and file area)


Top
 Profile  
 
PostPosted: Tue Nov 14, 2017 6:44 am 
Offline

Joined: Thu Oct 05, 2017 2:15 pm
Posts: 4
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 :)


Top
 Profile  
 
PostPosted: Wed Nov 15, 2017 10:53 am 
Offline

Joined: Thu Oct 05, 2017 2:15 pm
Posts: 4
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


Top
 Profile  
 
PostPosted: Wed Nov 15, 2017 6:29 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2363
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google [Bot] and 4 guests


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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group