So I need a good API and backend for the emulator. It must support TAS and have the ability to emulate a large number of systems quite easily.
I suppose for each system, I should have it where I simulate threads on a single CPU by saving and restoring CPU state as needed when a process is to be ran.
Ok, so there will just be a single constructor for the emulator which optionally takes an input and output stream. Due to the different systems that could be emulated in the same group, everything will be set to a master clock which is in nanoseconds.
However, this would essentially mean that emulation is limited to 1GHz because after that extra instructions in the middle would cause some problems. So I suppose I should step it up to the next level and make it picoseconds. This way 1THz systems can reasonably be emulated.
This means I need to determine when the next event occurs so it can be timed and recorded properly. The only thing that has to really be stored in replays is unknown information that comes outside of the emulated environment. So this means when a system is created, its details must be stored as such.
Just realized that my data input (which is not implemented) does not have
EOFExceptions, will need to remember that.