flandreas / antares

Digital circuit learning platform
49 stars 6 forks source link

"Record mode" for use case creation #647

Closed flandreas closed 1 year ago

flandreas commented 1 year ago

When building Ben Eater's 8-bit computer, the test machine program had to be entered over and over again using DIP switches for address and data. The program was lost when the simulation was restarted.

Screenshot 2023-09-19 at 20 11 19

Generally, it would have been possible to create a use case using Antares Scripting that does the necessary data entry during a simulation run (although there is no DSL function so far for operating DIP switches).

However, this wouldn't have worked because the DIP switches and the "Write" button are controls in symbols. Such controls are not reachable by DSL scripts, and maybe never will.

The better and more general approach could be to provide a "Record mode" for use case creation that records all mouse clicks and key presses as a script (perhaps with a 2000 ns interval between the individual actions), and then allows the user to enter the entire machine program by just running the use case.

If Ben Eater's 8-bit computer memory would have been a RAM, then the RAM contents could have been stored in a file and re-loaded after each simulation start (or even extend RAM with the property "Read data on every simulation start" ROM already possesses). But the memory in this computer consists of 16 8-bit registers.