15 comments

[ 2.9 ms ] story [ 43.4 ms ] thread
Sometimes I think “wouldn’t it be fun to try to write an emulator?”. And then I read things like this. When you’re up against things like emulating hardware to just throw away leading bits so that it will mask the mistakes of the original games’ programmers, maintaining an emulator starts to seem like a ridiculous task.
It really depends on what you're aiming for. Getting a simple console up and running without caring much about fidelity is a fun project for many people; Dolphin emulates a complex console and tries for 100% compatibility which makes it significantly more complex.
Agreed. Obviously the complexity of the console you are trying to emulate is a huge factor in just how much effort it will take to implement.
If you know about bits, bytes, and a rough idea of how they work you could write an emulator for a chip-8 system in a weekend.

It's a fun process, and I'd recommend it.

Followed by a GameBoy emulator if you're feeling a bit more adventurous. It's big enough to be challenging, but small enough that it can easily be done by one person.
The debugging of "5.0-10379 - VideoCommon: Constrain the array_base registers by booto" is just insane.

Props to the person ("booto") who managed to go through this, you are an example for any of us.

It's a nice debugging story, but I actually thought it was a bit anti-climactic.

I say that because hardware that ignores irrelevant address bits is not really a rare or surprising thing. The more primitive/simple the hardware the more this is likely to happen. After all, "why bother" checking those bits or piping them through to a memory bus if they couldn't possibly affect the result?

It was however a nice description of the process by which the bug was reproduced and analyzed! Also, props to whoever managed to isolate that repro case.

PS: If you're into crazy game bugs, here's another one: https://twitter.com/mmalex/status/1066111290580582403

Right, the behavior for "out of bounds" addressing is frequently (ab)used. Tagged pointers have been used in loads of stuff. I think x86_64 prohibits this and the MMU will fault if there are interesting things in the high bits, but it still works on aarch64 systems.
x86_64 disallows this because the 286 only used the lower 24 bits of a memory address, which made developer (ab)use the extra bits like you said. This causes all kinds of havok with some 486 variants and the Pentium, which did use the full 32 bits.

AMD's original x86_64 CPU (Opteron) only used the lower 48 bits of the address (I think modern cpus still do), so to prevent any future problems they disallowed using the upper 16 bits.

Most CPUs have used 42 bits for quite a while and only recently has Intel been making 48 bit addressing CPUs.
Dolphin is the gold standard all emulators should strive for.
MAME deserves a lot of respect too.
(comment deleted)
Dolphin progress reports are some of the best writeups out there. I love the weird tricks and hacks they have to figure out for even the most worthless of games.
My ex ruined my credit due to his incessant extravagant spending spree, I found myself in a big mess. I talked to a credit repair company and I was told that it would take me non less than a year to fix my credit. I was devastated, that's a very long time which I can't cope with. I looked online and came across Neo's contact, took the bold step of messaging him even though I was skeptical about the whole thing and to my greatest surprise, my credit was repaired 3 working days, my credit was restored from 337 -710. Tbh I was shocked and it didn't cost me too much. I advise you to contact him on (neogonzalezhacks at g mail dot com )for all credit issues, he replies quickly and you can text him on +1 773 688 9662 .