I created an emulator for a RISC-V 32 bit cpu inside of Roblox, after lots of hours spent debugging, it finally works!
For the Linux image, I used one built from cnlohr’s emulator on GitHub, his is written in C and was really helpful for debugging and fixing mine.
The emulator supports 32 bit integers, multiplication, division, basic math and bitwise operations.
It currently takes between 3-8 minutes to load and boot into Linux, depending on the speed of your device.
The emulator runs 64 MiB of memory and has no MMU.
The terminal supports basic ANSI escape codes for colors, bold text, italics.
Aside from the Welcome UI not able to be closed, and leaving it idle too long breaking it (inputs do nothing), I see no issues with this.
Have you considered trying to get something like the legacy DamnSmallLinux on this?
50mb means fast download (no idea what the size of the current one is), requires far less specs than what you’re stating (can run on 16mb opposed to the 64mb you’ve got here) and could potentially be easier to code a proper UI for (note: I don’t have any idea how hard it was to get the shell working to begin with)
…although with EditableImage you could theoretically have a really tiny resolution screen full of squares - I’d imagine the refresh rate would suck, but 800x600, or even 400x300 sounds plausible (admittedly at a 1 frame per whenever speed)
I’ll definitely try and make the welcome ui closable, and the emulator itself too. The inputs doing nothing is a tricky problem to debug but I’ll try my best to fix it as soon as possible!
Currently, it does not run an os like DSL, it runs only the kernel, made with buildroot and uses busybox, which means it’s only 3-4mb BUT since it’s only a kernel, it can not do much, so I really want to try something like DSL and use editableimages for the display.
Currently the kernel is just loaded into the start of the RAM, and I’ll try getting an MMU working or something similar so that I can have operating systems on it without a million tweaks and fixes. The UI is not that complicated, just a rich text textlabel in a screen with a UI drag thing.