SquirrelJME/SquirrelJME

View on GitHub
assets/developer-notes/stephanie-gawroriski/2016/07/25.mkd

Summary

Maintainability
Test Coverage
# 2016/07/25

## 10:36

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.

## 11:15

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.

## 11:50

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.

## 12:00

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.

## 18:56

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.

## 19:16

Just realized that my data input (which is not implemented) does not have
`EOFException`s, will need to remember that.