If you have any idea how to improve it or use more classes from simulide let me know.
The first thing that comes to my mind is the
"Memory controller".
This could be a separate object with methods to read, write, set the timings, etc.
This takes lots of complexity from the cpu class and it has it's own events, so probably most of the problems you mentioned with propagation delays could be solved.
I recently created a generic/configurable Memory controller for 8051 and 6502 ( src/mcusim/modules/memory/extmem.cpp ).
It is still very raw and it would need some modifications but you get the idea.
And I'm not sure if it's worth having a "generic" one or creating one for each device or type of memory.
In this case I would create a new one for dynamic memory.
In a first step something specific for the Z80, and maybe later it could be used to create a generic one.
Some problems I see:
- The
Mcu Monitor should be the one in simulide, we can't create an Mcu Monitor for each Microprocessor/Microcontroller.
-
Debugging this device is not possible as it is now.
- There is
no "DIP" package, only "Logic simbol".
I have been working to expand the capabilities of the "MCU" framework in simulide to be able to create devices like this.
As a proof of concept I used the 6502.
The Mcu Monitor and many other details still need some work, but it is roughly working.
So the only good solution I see is eventually porting your implementation to the current "MCU" framework.
Which souldn't be too hard:
- The files you sent would be the "core" files (with some modifications).
- Packages, Ports and some other details would be defined in xml files.
- Other problems can be solved by modifying the current "MCU" framework.
EDIT:I have been thinking about this and have a general idea:
- New "MPU" component: a variant of MCU without "load Firmware" and other things.
I will create a new class hierarchy to accommodate both variants in a way that all can use "Mcu Monitor", debugger, etc.
- Configurable "Mcu Monitor" that can be used for MCUs, MPUs and other.
I will wait for your implementation of "Z80 Monitor" and see what ideas come from that.