Earlier quoted context omitted.
I am not sure you can not use `unsafe` in an embedded type of project. `unsafe` isn't necessarily bad, but when used at least makes it very clear where extra attention should be paid.
Emulating a system of a few 2Mhz with a 4x3Ghz chipset ought to be doable using managed memory.
Implementing a NES Emulator in Rust
31–40 of 93 posts
Re: Implementing a NES Emulator in Rust
#32Earlier quoted context omitted.
I am not sure you can not use `unsafe` in an embedded type of project. `unsafe` isn't necessarily bad, but when used at least makes it very clear where extra attention should be paid.
Emulating a system of a few 2Mhz with a 4x3Ghz chipset ought to be doable using managed memory.
In those old 8- and 16-bit machines all components usually ran completely synchronous for each clock tick, for instance if the video emulation runs out of sync with the CPU emulation for a tick or two, a write from the CPU to a video hardware register might not make it in time and you get garbage video output.
Modern asynchronous systems may need less (relative) host system performance for emulation, because the timing requirements between the different hardware components are much more relaxed.
Re: Implementing a NES Emulator in Rust
#33What is something that I can do to learn Rust better? I have been through the book, but that's it. What would help me really learn Rust?
Project Euler problems are pretty trivial (wrt coding) but might have some small useful nuggets. The code advent calendar from 2018 is pretty helpful too, and it’s much more code oriented than PE problems.
I’ve seen people suggest rewriting the GNU coreutils, and I really like the idea, but not quite enough to go sifting through all of the C headers and all to get to the finish line.
Honestly, it probably doesn’t matter much what you start coding as long as you’re coding.
Re: Implementing a NES Emulator in Rust
#34What is something that I can do to learn Rust better? I have been through the book, but that's it. What would help me really learn Rust?
Re: Implementing a NES Emulator in Rust
#35Re: Implementing a NES Emulator in Rust
#36What is something that I can do to learn Rust better? I have been through the book, but that's it. What would help me really learn Rust?
Seriously, the best thing to do for virtually all professional or hobby work is to get more experience with it. Choose a project with small enough scope to give you encouraging results to keep that feedback loop going.
Re: Implementing a NES Emulator in Rust
#37Question, what made it easier to build this in Rust than other languages? I know the advantages of Rust, but what exactly was the experience in this context?
It seems that unsafe references were used, so the advantages of Rust appear to have been somewhat relinquished in this case.
Regardless, I'm not even sure I'd say that memory safety is Rust's biggest advantage. It's certainly the headliner and it's critically important. But it's a really appealing package overall IMO.
Re: Implementing a NES Emulator in Rust
#38What is something that I can do to learn Rust better? I have been through the book, but that's it. What would help me really learn Rust?
"How do you get to Carnegie Hall?" Seriously, the best thing to do for virtually all professional or hobby work is to get more experience with it. Choose a project with small enough scope to give you encouraging results to keep that feedback loop going.
Re: Implementing a NES Emulator in Rust
#39Re: Implementing a NES Emulator in Rust
#40Question, what made it easier to build this in Rust than other languages? I know the advantages of Rust, but what exactly was the experience in this context?
The author doesn't really suggest that Rust was chosen for any particular reason. A few benefits are mentioned but they aren't really specific to emulators.