Email or username:

Password:

Forgot your password?
Matt Keeter

Over the past few months, I went down the rabbit hole (hah) of @neauoire 's Uxn + Varvara computer, and have re-emerged with an emulator!

It's especially fast, written in safe Rust, and runs both natively and in the browser:
mattkeeter.com/projects/raven/

Here's the full writeup:
mattkeeter.com/projects/raven

Screenshot of the Potato desktop environment, with a dithered raven wallpaper
Screenshot of a browser window, with hundreds of bouncing pink bunnies
24 comments
Matt Keeter

@avi @neauoire

you joke, but this exercise did leave me wondering whether using a stack-based VM in Fidget could lead to faster evaluation or easier JIT compilation...

Avi Bryant

@mjk @neauoire there’s certainly lots of prior art there in forth and smalltalk with threaded code interpreters and JITs.

William D. Jones

@avi @mjk @neauoire What is Fidget? If I did a JIT, UXN is probably what I would target.

Alas, the only JIT code that I've ever been able to remotely follow is mupen64_plus's, and that's JITs MIPS to ARM/x86/a few others (register machine to register machine). So there would be a further learning curve to unstackify UXN to ARM/x86/etc.

Matt Keeter

@cr1901 @avi Fidget is docs.rs/fidget/ , a JIT for rendering implicit surfaces (among other things!)

It's mostly unrelated to Uxn; the only similarity is that both are bytecode-based VMs.

Capital

@mjk @neauoire Fourtette runs nice and smooth and the audio has no issues 😃

Kapunta

@mjk @neauoire you can't drag and drop on a touchscreen. can you add a button for loading a file?

Matt Keeter

@kapunta Done, let me know if it doesn't work!

Matt Keeter

@kapunta
Not sure what's going on! It works for me in both Firefox (desktop) and Safari (mobile), and I don't have an Android device to test on.

Is there a way to check the browser console for errors?

tbsp

@mjk Sorry to hear the audio device gave you so much trouble. I don't think the spec has been updated since the reference implementation had the updated audio device by @bd merged.

Bad Diode

@mjk congrats! I enjoyed the writeup, and was already familiar with your blog. In particular I’m looking forward to try the reverse linear register allocator. Thanks for sharing!

⛧ esoterik ⛧

@mjk wow! this is very impressive! ✨✨✨

Devine Lu Linvega

@mjk Wow, that's amazing. I've been away from the internet for a few days, I'm so glad to see this, once I have a bit more bandwidth I'd love to try and build it, I've only tested the js frontend and it runs everything well.

I think the only port missing is the expansion port? Trying to run the most complicated rom(oquonie), I get this:

panicked at raven-uxn/src/lib.rs:495:26:
range end index 458496 out of range for slice of length 65280

Matt Keeter

@neauoire

It should be working now 😎

(I had missed that overflow data from the ROM should be copied into expansion memory, and had to fix a few other issues along the way)

Screenshot of Oquonie, running in the web demo UI
Devine Lu Linvega

@mjk amazing! you've got yourself a varvara computer. I've enjoyed the write up, I was wondering, would it be alright if I added the emulator link to awesome-uxn.

If you could improve the docs in any way based on things that tripped you, what would you change or add?

Matt Keeter

@neauoire

🎉

Adding the link to awesome-uxn would be great!

The trickiest part was definitely the audio device; it seems like the docs haven't been updated yet for the current design.

Other than that, it was mostly a bunch of small corner cases (some documented here: github.com/mkeeter/raven/tree/). The demo ROMs were incredibly helpful for bringup + debugging!

Devine Lu Linvega

@mjk Oh these are excellent points for the controller and file io, I'll add these to the varvara docs :)

The audio device docs will be updated in the fall, I've fallen behind on this, I meant to make demos and things for it.

Go Up