×
Home Articles Devlogs Tutorials Research Videos Projects

Emulating an emulator inside itself. Meet Blink

4 Jan, 2023
19K Views

It's Wednesday and i feel like doing something fun. How about playing with an emulator? Blink is a new CPU emulator written in C, made by Justine Tunney. Besides having a really cool name, blink has a lot of impressive features and some of them will blow your mind!

BLAZINGLY FAST!!!

Blink is at least 2 times faster than QEMU, and it is even capable of emulating QEMU. I have not done benchmarks (yet) but trust me 😑

That's rather impressive for a relatively new emulator. Only time can tell how much faster it will get with further work and optimizations. Starting fast is always a good thing. You know what they say, fast is ehhhh... good! good!

Very tiny

How small can an emulator be? Blink occupies only 157Kb. Would be interesting to see how this size changes as more features are added.

Built-in debugger (without gdb)

It's a small, fast emulator but there's more! Blink comes with blinkenlights; a nice debugger that runs in the terminal. Much like GDB but way cooler.

Reverse debugging

The TUI looks cool but it's best feature isn't just the looks, but Reverse-Debugging. One of the newest and most impressive features of Blinkenlights is reverse-debugging. It can go back in time during program execution. Now imagine all the things you can do with that. You can not only single-step forwards but also backwards during execution. That's pretty impressive if you ask me.

Can it emulate GCC? 😏

Blink can emulate GCC. blink emulates itself

Can it emulate Itself? 🤯

Just when you thought it was over, Blink emulates Blink Emulating a program. VERY COOL! blink emulates itself

Conclusion

Blink is a rather impressive project. Justine Tunney and other contributors deserve some accolades for their work. You can check out Blink on github.

Readme Card