Hacker News new | ask | show | jobs
by zerr 2906 days ago
While playing with the result (working emulator) can be exciting, the process of developing itself sounds quite mundane.
3 comments

It certainly starts off that way, but right about the time you have most of your opcodes written and can start stepping through your code, it becomes very exciting very quickly. "Ooh, now I have Tetris getting far enough that I think it's writing to tile memory; can I display that?" "Neat! I wonder if any other games are getting that far. How hard would it be to get the backgrounds working now?"

Suddenly every game you have in your library becomes puzzle box and either works (yay!) or much more often for a young emulator, breaks in a perplexing way. It creates a really rewarding feedback loop, where tiny changes to timers and status registers can have big sweeping effects on your tests. And all your tests are themselves games, and usually fun to explore anyway.

What makes you say that? Writing a Game Boy emulator is essentially implementing a whole computer system, in the case of the Game Boy one that can quickly give you gratifying results, but allows you to dive almost arbitrarily deep.

I’d state the opposite and claim that it’s actually one of the most fun and interesting things I’ve ever undertaken. In fact, I am more interested in the process than the actual product. There are tons of well working Game Boy emulators already.

But you're not creating a new computer system, you're not designing it. You have to exactly follow the specs, and the things mentioned by parent. Seems more like mundane and housekeeping stuff rather than creative.
Implementing a well-documented spec is fairly mundane, but figuring out that spec on your own is a fascinating puzzle. Emulators are full of curious little edge cases that can drive people to the point of obsession.

https://mgba.io/2017/05/29/holy-grail-bugs/

So? Just because you find it boring and mundane does not mean everyone else does. For me at least, there’s few things more thrilling than learning (and maybe mastering) a new thing. You think new systems start out in a vacuum?

Besides, part of the challenge is that there is no comprehensive spec for the Game Boy, so discovery through research and implementation is part of the process.

In contrast to the creativity that you can exercise along many dimensions of implementing an emulator, riding a bike or laying at a beach with a cocktail is hardly „creative“ at all, yet many people enjoy doing that as well (I certainly do). You said you might even enjoy playing with the resulting emulator, that seems even less creative to me.

Write your own spec. Then just start designing fun virtual machines. Make them do what they are not supposed to do in lieu of the hacker spirit :)
While programming I don't need to be creative all the time. I find it very pleasing to understand how this systems work and emulate them. I do confess though, that after a while and after understanding them some Opcode families can get a bit boring. But in general I do enjoy emulators very much and don't find them boring at all.