ostis icon indicating copy to clipboard operation
ostis copied to clipboard

Define a device model

Open larsbrinkhoff opened this issue 8 years ago • 7 comments

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

larsbrinkhoff avatar Mar 16 '16 12:03 larsbrinkhoff