
Build for the SNES in a modern language.
R65 brings structs, enums, traits and a type checker to the 65816, and compiles them to assembly you'd be happy to have written yourself.














Made with R65
All examples →
Classic Kong
Classic Kong Complete, originally written in C. The R65 port replaces every line with type-safe R65 and reproduces the original gameplay frame-for-frame: four stages, the cutscenes, and the game-over sequence.
Everything you need to ship a cart
The compiler
Type checking, automatic REP/SEP, register allocation and 10+ optimization passes, emitting plain WLA-DX assembly.
Learn more →stdlibStandard library
sneslib, math with the hardware multiplier, strings, console text, U32/I32/F32 and fixed-point types.
Learn more →mesen-gdbDebugger & tests
Source-level symbols in Mesen, plus a headless runner that asserts on registers and memory.
Learn more →playgroundTry it in the browser
Compile R65 to assembly without installing anything, then run the examples in an emulator.
Learn more →instruction per enemy.
Mark a struct #[soa] and every array of it is stored one array per field. A method call on an element compiles to a single indexed DEC: no stride multiply, no pointer.
enemy.r65 #[soa] struct Enemy { kind: u8, hp: u8, x: u16 } impl Enemy { fn hurt(self) { self.hp = self.hp - 1; } } #[lowram] static mut POOL: [Enemy; 16]; fn tick() { for i in 0..16 { POOL[i].hurt(); } }
r65c output tick: LDX #$00 loop: CPX #$10 BCS done DEC $0210,X ; POOL__hp INX BRA loop done: RTS