Close

Emulator running at 144 kHz (not nearly fast enough)

A project log for TIS-100 (Geiger)

An ATTINY based TIS-100 Clone

big-boy-peteBig Boy Pete 06/08/2016 at 20:430 Comments

I updated the emulator file for Arduino. I simplified some of the logic, which makes the program file slightly bigger, but makes the program itself drastically shorter.

However, there's a problem. The compiled Arduino code is really inefficient for our simple operations.

Even if we weren't using 16 bit Ints we'd still have some problems with speed.

If every single one of our emulated operations took 10 clock ticks we'd still have an operational speed of 1.6 Mhz. Currently every single operation is taking upwards of 100 clock ticks.

In AVR architecture some operations like moving a value from one register to another takes 2 clock ticks, but 100 seems excessive for the simple code we have.

The solution for a faster emulator will likely be AVR targeted C. Although I do write in assembly, I'd rather do this sort of work in C, so I think it will be a good compromise between speed and power.

Discussions