- ret = fscanf(emulator_in, "%c %hx %hx %hx\n", &type, &tick, &a, &b);
- if (ret == EOF) {
- printf ("no more data, exiting simulation\n");
- exit(0);
+ if (!fgets(line, sizeof (line), emulator_in)) {
+ if (++ao_eof_read >= 1000) {
+ printf ("no more data, exiting simulation\n");
+ exit(0);
+ }
+ ao_adc_static.tick += 10;
+ ao_insert();