This is a playground for testing programming on the MEGA65 8-bit computer.
Update: See the mos-hardware
crate for using Rust on C64 inspired computers!
Amazingly, most core Rust features (no_std
only) seem to work, including iterators and functional style
programming.
The hello_rust
directory contains a simple example that compiles to a C64 .prg
using
llvm-mos from wrapped Rust code. It requires a working
Rust installation and the llvm-mos-sdk.
Compile and run on MEGA65 in c64 mode with:
cd hello_rust
make
make run # emulate in xemu
- Added convenience
peek
andpoke
- Begin mega66 rust module with hardware registers (see e.g. KickC headers)
- Inline assembler?
core::arch::asm
seem to work but unknown upcodes - Start in MEGA65 mode
- Wrap mega65-libc to Rust?
- Build
- Use cargo
- Avoid c wrapper
- https://github.com/mlund/mos-hardware
- http://forum.6502.org/viewtopic.php?p=84048#p84048
- https://gergo.erdi.hu/blog/2021-09-18-rust_on_the_mos_6502__beyond_fibonacci/
- Atari rust example
Because I like MEGA65 and I like Rust.