b-em icon indicating copy to clipboard operation
b-em copied to clipboard

Documentation on configuration?

Open ZornsLemma opened this issue 1 year ago • 2 comments

Is there any documentation on how to configure b-em at runtime? I'm thinking of things like:

  • How to enable b-em's log_debug() output and where it goes to
  • Where b-em.cfg is searched for
  • How to edit the default configuration for the different models/add your own

I'm thinking I might have a go at knocking some documentation for this up myself, but obviously if it's already there and I've just missed it then I won't bother. :-)

Edited to add: In case it's not clear, these are all things I occasionally want to do and can never quite remember how to. I think I have previously worked out the answers for myself, but it took me a while to find them and I no longer remember what they were.

ZornsLemma avatar Apr 30 '23 20:04 ZornsLemma

I don't think any of this is documented, though obviously the code us there to read.

The official way to enable debug messages in a module is to re-run configure with, IIRC, --enable-debug but I tend to temporarily add #define_DEBUG to the top of the module I am trying to debug.

There is quite a bit of flexibility in the logging system but it is all driven by a bitmask and the details are buried in the logging.c module. You can, for example, have debug output go to stderr if you wish.

The various bits of a model config are, I think, split between model.c and config.c.

File locations are determined by OS-specific modules so linux.c and windows.c to use the preferred directories for that OS.

SteveFosdick avatar May 06 '23 00:05 SteveFosdick

Thanks for those pointers! I was having a bit of a look round the code earlier today to see if I could configure something. If there isn't already any documentation I might draft something out and send a pull request; even if it's incomplete it would be a starting point.

Incidentally - maybe this should be a new issue really - what I was trying to do today was override the "romsetup=swram" configuration. Obviously most of the time the more sideways RAM the better, but I'm doing some development on a program (Ozmoo) which auto-detects and uses as much sideways RAM as it can, and it gets annoying clicking through the ROM menu to disable a dozen banks of sideways RAM to test certain low memory cases. I'd kind of like the machine to start up with say 64K of RAM, but not 144K. I couldn't find a good way of doing this and resorted to a half-baked hack; is this something that's currently supported or would it require some tweaks to the config code? I wondered about adding support for saying "romnn=empty" in the config file and that tells b-em to leave that socket empty rather than putting sideways RAM in it.

ZornsLemma avatar May 06 '23 00:05 ZornsLemma