Sorry for what is probably a noob question, but...
how do I actually use this thing? I can't scroll wherever I want in the disassembly window, I can't step, and there generally just doesn't seem to be much functionality in this feature. In addition, I think that the disassembler is breaking "near" the place where breakpoints are set rather than exactly on top of them, which is always annoying.
Am I doing something wrong, or is there a different tool I should be using?
EDIT: I can use the "seek" feature with limited success, but I'm still not entirely happy... can someone at least tell me how to get breakpoints to write stuff to log?
Joined: 4/17/2010
Posts: 11475
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
Debugger isn't working. Use trace logger instead. Or lua.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
The SNES has a native (65816) and emulation (6502) mode that determine the size of certain registers and the availability and functionality of certain opcodes, and games can switch between them basically at any time. So you can't know what a disassembly looks like without first executing it.
To speed up emulation, bsnes uses green threads. A component's thread runs for as long as possible until it has no other choice but to sync to another component, which includes the GUI.
There's bsnes-plus, which might allow stepping (I haven't used it myself - building it on Windows is difficult).
How do I get things to actually log to the trace logger? Right now I'm running my movie with the code data logger on in case that proves useful (though I'm not really sure what that does tbh)
Joined: 4/17/2010
Posts: 11475
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
So I finally got around to using the trace logger and it was working pretty well... until the following line:
c6947c: lda $004214 [004214] A:0001 X:6e91 Y:00e0 S:01de D:0000 DB:7e nvMxdizC V: 66 H: 430
c69480: plp A:00d4 X:6e91 Y:00e0 S:01de D:0000 DB:7e NvMxdizC V: 66 H: 460
So this should just be a load operation to the accumulator, but I'm not sure which domain its loading from! it gets a value of 00d4 even though the RAM value at $4214 is 0014... I figure that since there is an extra 00 after the $ (compare with for example, c6ad00: lda $143c [00143c]), it must be some other memory domain, but nor sure what it is or how to find it.
Help?
$004214 is not a mirror from $7E4214 (WRAM).
Only the first 0x2000 bytes from each bank (except 0x7E and 0x7F) are mirrors from bank 0x7E.
For instance, Address[$1234] = Address[$7E1234]
$4214 happens to be a hardware register:
https://wiki.superfamicom.org/snes/show/Registers
ruadath, if you need to use a debugger for SNES games, you can use Geiger's Snes9x Debugger. I tend to use that whenever I need to understand some functions that are hard to understand otherwise.
Edit: Fixed link.