Menu

#687 Forced names for registers in debugger?

Win32
closed:fixed
None
5
2015-03-04
2015-01-25
rainwarrior
No

Register addresses like $2000 are now hard-coded to a particular set of names.

It was possible to create custom labels for these with the pre-existing debugging symbol feature, and using that method they could be customized to your liking.

The way it is now, we are forced to use these symbols. This obfuscates the disassembly for anyone unaccustomed to these particular names for the registers.

I believe this is due to this change in particular: https://sourceforge.net/p/fceultra/code/3074/

I'd like to request that this be optional at the very least. (Though, reverting it entirely would still leave the option to do it via the pre-existing method.)

Discussion

  • rainwarrior

    rainwarrior - 2015-03-03
    • status: open --> closed:fixed
    • assigned_to: rainwarrior
     
  • rainwarrior

    rainwarrior - 2015-03-03

    Changed to a #define for anyone who wants to apply this customization.

    In the future it might be good to restore, but as an option rather than hard-coded in/

    https://sourceforge.net/p/fceultra/code/3101/

     
  • feos

    feos - 2015-03-04

    The only other option is actually to have a .nl file for registers, but it would basically be the same all the time, unless someone is unhappy with the names. I estimated that case as rare enough to store these names to file and just hardcoded to what nesdev wiki has.

    Well, it might be sane to move the option to the client, but let's discuss the names instead: which names would you prefer?

    Can't you override the hardcoded names by using custom ones? My bad that I didn't test it back then.

     

    Last edit: feos 2015-03-04
  • rainwarrior

    rainwarrior - 2015-03-04

    I strongly prefer not to have names on the registers at all. I find the numbers easy to remember, and they're the only consistent set of names these will ever have. The code looks uniform in the debugger this way, and it will look the same in any other debugger too, which is an advantage for someone who switches between.

    I agree that if you want this on all the time, using .nl files is an awkward way to do it, but having no way to turn it off is a problem. Having to use .nl files to label $2000 as "$2000" would be a bit bizarre, I think.

    As an option in the software for the user I think it's fine to have. The setting should persist on close of FCEUX so it doesn't have to be toggled each time.

    So... as someone who doesn't want to use the names, I'm maybe not the best person to ask about what to name them, but here's a couple of thoughts anyway:
    - The wiki doesn't name the APU registers
    - $2000/2001 have distinct names (PPUCTRL/MASK) which I think is more helpful than PPU_CTRL_REG1/2
    - "REG" is a redundant suffix in general
    - "OAM" might be preferable to "SPR"
    - Choice of 1/2 for square/joy vs 0/1 is arbitrary, I've no suggestion about which is better (one of the reasons I prefer to look at the raw number)
    - $4015 might be better "APU_STATUS" or something with "STATUS" in it.
    - $4017 is also the frame counter when written (JOY2 is only for read)

     

Log in to post a comment.