Emulation
-
Breaking and fixing the RISC-V Store-Conditional instructions
Trying to debug the Linux boot process on the emuriscv RISC-V emulator has led me to discover another fun bug, one that appears when you don’t read the specification as thoroughly as you should. The …Windows 2000 on an ARM Pinebook
I thought it would be fun to run Windows 2000 on a Pinebook - a nice little ARM-powered laptop. As there is no version targetting this architecture, we have to use an emulator. QEMU is a nice free …(Mis)understanding RISC-V ecalls and syscalls
After spending some time with emuriscv and attempting to boot Linux into a shell I realized that I’m doing something really wrong regarding system calls. RISC-V offers an ecall (Environment Call) …RISC-V supervisor mode
RISC-V features multiple privilege levels (machine, hypervisor, supervisor and user mode). The cores (harts) power up in machine mode, which is mandatory in all RISC-V implementations. Operating …CHIP-8 in hardware - part 3 (drawing, VGA)
In the last part I ended up with a partially working CPU with most of the single-clock instructions implemented. So far, all of the testing was done in simulator only, and it’s about time to to get a …CHIP-8 emulator in C
CHIP-8 is one of the most popular target architectures for aspiring emulator writers. I’m planning to implement it in hardware, so I thought that writing a software emulator/interpreter would be …MCPU emulator (and ATTiny85 port)
MCPU is a neat minimal 8-bit CPU (CPU design by Tim Boescke in 2001, cpldcpu@opencores.org ) - see its opencores project file and GitHub repo . It fits into 32 macrocells on a CPLD and can operate on …Writing a monitor console for emuriscv
As a follow up to the previous post Debugging things running in your emulator I thought it would be nice to write a monitor console for the emuriscv RISC-V emulator. With a monitor console one can …Updating the RISC-V Linux environment
As I planned to work some more on the emuriscv RISC-V emulator, I wanted to upgrade from Linux 4.15 and buildroot from 2018 to something more recent. Buildroot-2020-02 supports compiling the image …Test-driven emulator development
Test-driven development is a software development process where you write a test before writing a code that satisfies that test, then refactor and continuously validate that the requirements are still …Debugging things running in your emulator
You’ve written an emulator, how do you debug anything running inside? In this post I’ll try to describe what I did (and thought of doing), starting from the most crude methods. Using the IDE and debug …Building up a RISC-V Linux with Buildroot
A friend told me about a cool new open-source instruction set architecture called RISC-V (pronounced risk-five). As I wanted to learn more about the architecture, I decided writing an RISC-V emulator …Fantasy console on a console
Back in April 2019 I decided to get into emulation and thought about writing a simple one. I read about the MOS 6502 microprocessor and it looked promising as it was used in famous products such as …