ostis
ostis copied to clipboard
Define a device model
struct mmu
is increasingly being abused for modelling hardware components. First diagnostics was added, and now interrupt handling has been included. Also, some entities that obviously model hardware components doesn't have a struct mmu
. Most likely, struct mmu
would be better off only handling MMU properties only.
I propose it would be a good idea to add a struct device
for modelling all devices. Here are some things to consider for such a model:
- MMU interface
- Bus interface
- Interrupts
- Diagnostics
- Recording state
- Signals
- Connecting outputs and inputs to other devices
- Multiple instantiation (e.g. ROM, ACIA)
- Timer callbacks
- Periodic calls
- Reset
- Handling user/configuration/script commands