1. 4

  2. 4

    This is only mildly related, but I’m sitting on this RV32I emulator written in Rust I haven’t published anywhere yet.

    The original idea was to build something like RoboWar. There are a bunch of programming games already, that work on higher level languages. But the cool thing about RoboWar is that it gave you a certain number of points to spend on your robot on things like weapons, shields, but also CPU speed. You programmed some kind of assembler (a stack machine with an RPN-based language), and every instruction costs cycles. It’s the small scope that made it a lot of fun.

    So my emulator passes the RV32I test suite, can count cycles and suspend programs, but actually building something for it is rather tricky. Writing an emulator for a small instruction set is, like, umpteen times simpler than building a toolchain. :)

    I feel like RISC-V could be a cool target for these kinds of fun and also educational programs, though.