Skip to main content
SNES · 65816 · WLA-DX

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.

Basic Platform · an R65 example ↗
Classic KongDizworld FlyerBasic PlatformSprite PriorityIris AnimationMosaic FadeWalk CycleSnake

Made with R65

All examples →
Classic Kong gameplay
Featured game

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.

1

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.

How #[soa] works →
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
~60,000CPU cycles per frame. Spend them on your game.
10+optimization passes, from STZ conversion to loop rotation.
16 MBof 24-bit address space, with near and far in the types.
MITlicensed. Use it for open-source and commercial games.

PRESS START

r65x init --platform snes my_game