Merged
Conversation
0cc9132 to
2ff1a50
Compare
This fake peripheral can be used to print to the emulator's stdout from the emulated software.
2ff1a50 to
6aa3423
Compare
giuliof
approved these changes
Aug 24, 2025
Contributor
giuliof
left a comment
There was a problem hiding this comment.
Approved, just added a note related to logging
This new module allows the connection of custom peripherals to the computer bus. This module can be used to implement user's mods.
6aa3423 to
5acad2c
Compare
giuliof
reviewed
Aug 24, 2025
0341b76 to
3206f2c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This branch implements a dynamic bus module, which can be used to register custom peripherals to the computer's bus.
The idea is that the standard configuration of the computer is statically described in the bus array in
bus.c.When a peripheral is not found in the main bus, then it is searched via the
ubus.cmodule.The
ubus.cmodule contains a small array where an user can register its own peripherals at runtime, by callingubus_register()and providing the necessary address range and callbacks for I/O.(Obviously this is not how it works on the real hardware, but it looks a reasonable way to implement user-built peripherals in the emulator, by separating the vanilla bus from the customized one)
Then, this branch also implements a
charmon.cfake write-only character based device: at the moment, it can be used by the emulated software to log data on the emulator's stdout, and also acts as an example of how to properly implement a custom peripheral module. (note the dynamic configuration via the user's conf file)Eventually, the
ubus.cmodule can also be used to implement the actual hardware mods that we are planning.