Post subject: bsnes (bizhawk) dissassembly help
Active player (261)
Joined: 12/13/2016
Posts: 352
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?
Site Admin, Skilled player (1254)
Joined: 4/17/2010
Posts: 11478
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
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.
Post subject: Re: bsnes (bizhawk) dissassembly help
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
ruadath wrote:
I can't scroll wherever I want in the disassembly window
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.
ruadath wrote:
I can't step [...] In addition, I think that the disassembler is breaking "near" the place where breakpoints are set rather than exactly on top of them
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.
ruadath wrote:
is there a different tool I should be using?
There's bsnes-plus, which might allow stepping (I haven't used it myself - building it on Windows is difficult).
Active player (261)
Joined: 12/13/2016
Posts: 352
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)
Site Admin, Skilled player (1254)
Joined: 4/17/2010
Posts: 11478
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
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.
Active player (261)
Joined: 12/13/2016
Posts: 352
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?
Amaraticando
It/Its
Editor, Player (159)
Joined: 1/10/2012
Posts: 673
Location: Brazil
$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
Editor, Expert player (2073)
Joined: 6/15/2005
Posts: 3282
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.