chirp8-engine
CC65-Advanced-Optimizations
chirp8-engine | CC65-Advanced-Optimizations | |
---|---|---|
1 | 2 | |
4 | 115 | |
- | - | |
6.8 | 0.6 | |
4 months ago | about 1 year ago | |
Rust | C | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
chirp8-engine
-
Rust on the MOS 6502: Beyond Fibonacci
The value add is not in the parts that interface with the C64 internals; probably using C for that would make for nicer code. But I wanted to push as much into Rust as I could in the short amount of time I spent on this.
The real advantage of using Rust is in the actual program logic. E.g. the instructions are decoded into an algebraic datatype (in https://github.com/gergoerdi/chirp8-engine/blob/7623353a8bf0...) and then that is consumed in the virtual CPU (https://github.com/gergoerdi/chirp8-engine/blob/7623353a8bf0...). Rust's case-of-case optimization takes care of avoiding the intermediate data representation at runtime.
CC65-Advanced-Optimizations
-
Assembly programming on the Commodore 64
I'd like to suggest trying C, using cc65. Assembly knowledge is useful, but working in C is much easier and fast enough most of the time. Here's a nice guide on how to write C code that runs fast on a C64: https://github.com/ilmenit/CC65-Advanced-Optimizations
-
Rust on the MOS 6502: Beyond Fibonacci
The cool thing about LLVM-MOS specifically it that by using the zero page as virtual registers you sort-of get the same output with 'regular' code as opposed to this 'global variables' style of programming.
I recall a tutorial for 'cc65 optimizations'[0] which basically destroys a well-structured C program in order to do all of these optimizations (like making everything global) and it was absolutely terrible, code-wise. Well, the end result was probably fine, but it's just a shame these 'optimizations' were needed.
[0] I think it was this one: https://github.com/ilmenit/CC65-Advanced-Optimizations
What are some alternatives?
embassy - Modern embedded framework, using Rust and async.
llvm-mos-ferris-demo
nrf-softdevice
rust-mos - Empowering everyone to build reliable and efficient software.
Rust-chip8_emulator - Rust chip8 emulator in terminal
nrf-hal - A Rust HAL for the nRF family of devices
scaters - A Chip 8 Emulator Written in Rust and SDL2
a800-rust-test