Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation on configuration? #196

Open
ZornsLemma opened this issue Apr 30, 2023 · 2 comments
Open

Documentation on configuration? #196

ZornsLemma opened this issue Apr 30, 2023 · 2 comments

Comments

@ZornsLemma
Copy link
Contributor

ZornsLemma commented Apr 30, 2023

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.

@SteveFosdick
Copy link
Collaborator

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
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants