Skip to main content


More musings on #Rust:

I wonder if it would be possible to write an #SNES #ROM in Rust. It seems like exactly the kind of resource-constrained system that would be a prime candidate for that sort of thing. Unfortunately, it seems that the SNES used a custom processor, so it's very possible that I won't be able to specify it as a compile target. A quick search reveals that many people have made SNES emulators in Rust, but at a glace, I see nothing about writing ROMS.

I believe the original NES used an off-the-shelf processor (6502 if memory serves?). Perhaps that's more likely to be supported, but that may be a little too resource constrained.

I shall have to dig deeper into this idea. I love the idea of building a custom ROM rather than just pirating something off the internet.

Has anyone done anything like this? Links to any relevant resources would be very much appreciated.

reshared this

in reply to Jonathan Lamothe

Looks like the SNES used a Ricoh 5A22, which apparently was based on the 6502? Perhaps this is possible after all... though I don't want to speak too soon.
in reply to Jonathan Lamothe

The SNES CPU is based on the WDC 65C816, which is indeed able to run 6502 code but it also has 16-bit mode instructions with much larger memory address space.

I think the only general purpose computer to use this CPU was the Apple IIGS, so maybe look around to see if there's any Rust port to Apple IIGS.

in reply to Jonathan Lamothe

this folks have ported llvm to MOS6502: llvm-mos.org/wiki/Welcome

You can try to link rustc to that fork and add a new rustc target.

It will be a very long journey, but it is possible.

This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.

⇧