Re:Rust on the MOS 6502: Beyond Fibonacci
by fallat on Tuesday September 21, 2021 @08:05AM
(#28604178)
It looks like so much Rust code to generate the simplest of 6502 code. No thanks.
[ Parent
| on HN ]
Re:Rust on the MOS 6502: Beyond Fibonacci
by gergoerdi on Tuesday September 21, 2021 @09:22AM
(#28604774)
Did you look at chirp8-engine, or only chirp8-c64?
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.
Re:Rust on the MOS 6502: Beyond Fibonacci
by boomlinde on Tuesday September 21, 2021 @09:01AM
(#28604628)
No thanks indeed, but I completely agree with this sentiment from the article:
> It is worth pointing out that the amazing thing about chirp8-c64 is not how well it works, but that it works at all.