bsnes-plus icon indicating copy to clipboard operation
bsnes-plus copied to clipboard

Multiple symbol file loading

Open qwertymodo opened this issue 6 years ago • 1 comments

It would be nice if there was a way to load multiple symbol files for the same ROM. I know it currently loads one symbol file for each processor, but there are cases like ROM hacks where it might be nice to have one static symbol table reverse-engineered from the original game, and then another one generated by the assembler as you develop the hack. I can think of a couple of ways of implementing this.

  1. Load all symbol files matching a pattern like romname_*.cpu.sym which would allow for semantically meaningful naming, as opposed to just romname_1.cpu.sym, romname_2.cpu.sym, etc.

  2. Load all symbol files located in a subfolder named romname.sym in the same directory as the ROM file. The auto-saved symbol files would be saved to this directory (and could then be shortened to just cpu.sym, smp.sym, etc)

I like option 2, personally. It's a bit cleaner. The idea could even be extended to include things like the usage.bin file.

qwertymodo avatar Sep 02 '19 07:09 qwertymodo

Given that I'm eventually planning to support both self-contained ROM files as well as higan-style cartridge folders (believe it or not!), I think an ideal approach that leverages both of those formats might be to just:

  • for a single ROM file, continue loading symbol files that match the ROM name, like currently
  • for a cartridge folder, just load whatever symbol files exist in the folder (and when autosaving them basically just do what you describe in option 2 above)

Of course I can't make any promises about the timeframe of gaining support for cartridge folders, BML manifests, etc. but I'm definitely planning to and I think it'd be the easiest/most sensible to just handle loading multiple symbol files as part of that general concept.

devinacker avatar Sep 08 '19 02:09 devinacker