Posted by tack1234 5 days ago
This is my first ever C++ project, just like the CHIP-8 emulator was my first ever C (and emudev) project. It's so satisfying to write assembly and have your program spit out a ROM that actually runs in the emulator you wrote.
All code is written by me (a lot of it livestreaming) as evident by the quality, no AI.
The steepest part.. probably trying to do things efficiently, using string views instead of strings where relevant, references and also ranges + iterators in C++. The from_char function and how it reports errors (e.g. when the iterator it returns is the end of the provided range, there were no errors) etc.
From the conceptual standpoint, it felt way clearer to me from the start. I knew I "just" had to parse some input text and figure out the instructions into which it should be turned into. The actual lexing and parsing of the source code text character by character lead me to way more errors and debugging sessions than I expected, but that's probably just me being a bit rusty.
So I would say the emulator was harder to grasp at first, as I had no prior lower level experience, had no idea what a register or a stack pointer or a program counter is, etc.