Uploaded December 2022 | Updated September 2026, 6 days ago
This video shows off riscv-vscript, which is a port of mini-rv32ima to VScript (Squirrel 3)
In this video, I demonstrate Linux built for riscv (rv32) running inside of VScript via riscv-vscript.
github.com/Joshua-Ashton/riscv-vscript
___
This is basically just a raw port of mini-rv32ima to Squirrel3.
Rather annoying as Squirrel has no fixed/small size or unsigned types.
So we have to emulate all of that and all the logic for it is '*fun*'.
We map the player_say game event to map player text to the UART interface.
It supports basically everything you could ever want, but do
not consider it in any way conformant.
It can boot the Linux kernel, run coremark, run sha256sum and get
a correct results, etc.
It can even shutdown with `halt -f` and it actually shuts down
the risc-v computer and cleans up the entity responsible for
the Think function.
I was very close to giving up many times writing this code.
Luckily mini-rv32ima has a single-step register dump mode.
All of the debugging was done via enabling single-step, and a fixed elapsed_us
and diff-ing the single-step outputs to see where we diverge.
Special thanks to cnlohr for nerdsniping me with this tiny rv32 implementation
I was very surprised how understandable it was, and how little it takes
to have a rv32 implementation capable of actually being usable!
This code was all made in a tea-infused 6 hour coding session.
This video shows off riscv-vscript, which is a port of mini-rv32ima to VScript (Squirrel 3)
In this video, I demonstrate Linux built for riscv (rv32) running inside of VScript via riscv-vscript.
github.com/Joshua-Ashton/riscv-vscript
___
This is basically just a raw port of mini-rv32ima to Squirrel3.
Rather annoying as Squirrel has no fixed/small size or unsigned types.
So we have to emulate all of that and all the logic for it is '*fun*'.
We map the player_say game event to map player text to the UART interface.
It supports basically everything you could ever want, but do
not consider it in any way conformant.
It can boot the Linux kernel, run coremark, run sha256sum and get
a correct results, etc.
It can even shutdown with `halt -f` and it actually shuts down
the risc-v computer and cleans up the entity responsible for
the Think function.
I was very close to giving up many times writing this code.
Luckily mini-rv32ima has a single-step register dump mode.
All of the debugging was done via enabling single-step, and a fixed elapsed_us
and diff-ing the single-step outputs to see where we diverge.
Special thanks to cnlohr for nerdsniping me with this tiny rv32 implementation
I was very surprised how understandable it was, and how little it takes
to have a rv32 implementation capable of actually being usable!
This code was all made in a tea-infused 6 hour coding session.