3 ms·
This is the quote any emulator dev should write on top of its desk: > <the emulator> should never, ever trust the software it is running to be sane. Console g
by Narann 10y ago
This is the quote any emulator dev should write on top of its desk:
> <the emulator> should never, ever trust the software it is running to be sane.
Console games always does weird things the only way to check is real hardware, that's why writing a good emulator is hard, because you must have a way to quickly test a particular behavior on hardware.
- byuu 10y agoWe like to romanticize our favorite games as being written by people as passionate as we are about said games. But the reality is that most (though certainly not all!!) of them are primarily there for a paycheck. They're expected to work on new systems with poor debugging capabilities, and get games out as fast as possible. So naturally, they end up having lots of gross hacks and erroneous code just to get things working and ship the game. My favorite bug so far was a game that read from a write-only register in a loop until a certain bit was set. That bit could never have been set under normal conditions, so it was freezing in emulators. Turns out that the game had a DMA channel running during each scanline, and after a few million iterations of the loop, the stars would align and the DMA channel would read a byte from memory that had the required bit set, and that value would be floating on the bus, followed immediately by reading from said undefined memory location. Since nothing would respond to it, it would reuse that DMA byte fetch, and exit the loop. Even more fun, to test on real hardware, I was using a copier device. But said copier device pulled the data bus lines low whenever an unmapped region was accessed, which effectively broke the game on the copier as well. It took me two weeks of full-time work to track down that bug and exhaust all other possibilities for what was happening. I can't begin to imagine why that loop was in the shipped game, nor why it only ever triggered once during hitting one of many buttons (this one required to finish the level), in stage 6-2 of the game.
- ryanplant-au 10y agoI'm going to have nightmares after reading that. I don't know you do it.
- GFK_of_xmaspast 10y ago> We like to romanticize our favorite games as being written by people as passionate as we are about said games. See also the speedrunning community which often relies on all sorts of "fun" little bugs.