stardot / b-em

An opensource BBC Micro emulator for Win32 and Linux
http://stardot.org.uk/forums/viewtopic.php?f=4&t=10823
GNU General Public License v2.0
112 stars 56 forks source link

Documentation on configuration? #196

Open ZornsLemma opened 1 year ago

ZornsLemma commented 1 year ago

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

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.

SteveFosdick commented 1 year ago

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.

ZornsLemma commented 1 year ago

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.