diff options
Diffstat (limited to 'io')
| -rw-r--r-- | io/model.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/io/model.cpp b/io/model.cpp index 7d4e2b3..a05c719 100644 --- a/io/model.cpp +++ b/io/model.cpp | |||
| @@ -54,7 +54,7 @@ void iomodel::load_evt(std::istream &fh) { | |||
| 54 | // +time advances time by relative increment | 54 | // +time advances time by relative increment |
| 55 | // regname=value/mask adds event that sets regname = (regname & ~mask) | value | 55 | // regname=value/mask adds event that sets regname = (regname & ~mask) | value |
| 56 | // regname=value adds event that sets regname = value | 56 | // regname=value adds event that sets regname = value |
| 57 | // $x adds event that writes x (a single character) to the keyboard buffer (TT_BITS=0x??01/0xFF01) | 57 | // $x adds events that input the remaining line (excluding trailing whitespace) character-at-a-time with 1000 cycles between them |
| 58 | // FIXME: add assertions | 58 | // FIXME: add assertions |
| 59 | // FIXME: add DMA | 59 | // FIXME: add DMA |
| 60 | for (std::string line; std::getline(fh, line); ) { | 60 | for (std::string line; std::getline(fh, line); ) { |
| @@ -72,7 +72,10 @@ void iomodel::load_evt(std::istream &fh) { | |||
| 72 | assert(end && *end == '\0'); | 72 | assert(end && *end == '\0'); |
| 73 | load_time += step; | 73 | load_time += step; |
| 74 | } else if (line[0] == '$') { | 74 | } else if (line[0] == '$') { |
| 75 | log.emplace(load_time, event(TT_BITS, (line[1] << 8) | TTI_FLAG, TTI_DATA | TTI_FLAG)); | 75 | for (unsigned int i = 1; i < line.size(); ++i) { |
| 76 | log.emplace(load_time, event(TT_BITS, (line[i] << 8) | TTI_FLAG, TTI_DATA | TTI_FLAG)); | ||
| 77 | load_time += 1000; | ||
| 78 | } | ||
| 76 | } else { | 79 | } else { |
| 77 | auto eqpos = line.find('='); | 80 | auto eqpos = line.find('='); |
| 78 | assert(eqpos != std::string::npos); | 81 | assert(eqpos != std::string::npos); |
