eli5: What does people mean when they say that a computer system runs on different architecture from another computer? Like when somebody says that an emulator can run N64 games faster theoretically but because of different architecture in practicality it cant?

812 views

eli5: What does people mean when they say that a computer system runs on different architecture from another computer? Like when somebody says that an emulator can run N64 games faster theoretically but because of different architecture in practicality it cant?

In: Technology

19 Answers

Anonymous 0 Comments

Processors each have their own language. In technical terms it’s what’s called an “Instruction Set Architecture”. It defines the words that that a computer uses to do things. For instance one computer might have use “ADD 2 2” to compute 2+2. While another computer might use “SUM 2 2”. When someone writes a piece of software like a video game, it gets compiled for a specific instruction set architecture based on the platform it’s going to be used on. When a program is compiled, it gets turned from the programming language (C/C++ for instance) into the language of the processor. You might hear this called “machine language”. So code that’s been compiled for one processor type can’t run in a different processor because the machines use different languages.

Another way to think of it is you want to tell someone hello. You could chose to say it in either Russian or English. If you say it in Russian, the English speakers won’t understand it, but if you say it in English, the Russian speakers won’t understand it. Your choice of language is like compiling the software.

Anonymous 0 Comments

To really get down to five year old level: the actual hardware, the computer chips inside the game consoles, is different. It’s designed different, it uses different codes, and it behaves different. Some of those “cpu architecture” terminologies are ARM, x86, x64, PowerPC, MIPS, RISC, and more.

Less five-year-old stuff:

The same programmed source code may sometimes be capable of working on multiple architectures, but once it’s compiled for a certain one it’s quite hard to decompile or recompile it for another without having access to the source code (which is usually something companies keep closely guarded.) Also it often takes a lot of work to write code that runs well without bugs on different architectures: for example x86 is a “32 bit” architecture which means that 4,294,967,295 (about four billion) is the largest number that that architecture can easily handle without lots of ugly workarounds. (If you tell a 32-bit computer to do 4294967295+1 it’ll say the answer is 0, and if you tell it to do 0-1 it’ll say the answer is 4294967295… unless you have negative numbers turned on but I won’t go into that right now.) A 64-bit architecture like x64 however can handle numbers as big as 18,446,744,073,709,551,615 (18 quintillion or 18 million billions) so a lot more math and detail can be handled. In other words, architecture matters and newer architectures help games look good and be fast.

One other big reason 64 bit architecture is increasingly popular is because programmers like to store dates and times as the number of seconds before or since January 1, 1970 GMT. (It can be negative to easily talk about dates before then too.) But as of this writing, it’s been 1,613,808,415 seconds since 1970. Since it can also be negative, that cuts our available numbers in half, to 2,147,483,647. So we only have 533,675,232 seconds left until we run out, which is just under seventeen years from now. This is called the “year 2038 problem,” much like Y2K, so we’ve got until then to upgrade or patch every single digital device that cares about what year it is. Fortunately with 64 bits, we can count up seconds for the next 292 billion years, so we shouldn’t have to worry about that anymore.

Anonymous 0 Comments

If you are emulating a cpu that has similar cpu instruction set and functionality as a modern computer then at worst you just map the game instruction to a modern cpu instruction. Some of the late 90s consoles had weird chips and weird ways of communicating between them. Just means you have times where too much happens at once to do all the processes necessary to simulate the state of the chips faithfully.

Jon burton that lead sonic the hedgehog game development at one point has some awesome videos explaining some of the weird hardware they had to support in the 90s.
https://youtube.com/c/GameHut

Anonymous 0 Comments

I’ll expand on the language metaphor that others have used. An “architecture” determines how the hardware works at a very basic level. It’s the language that the computer thinks in.

When you emulate another kind of computer, there’s basically one level of indirection going on. The emulator is creating a digital version of a different computer, for example a nintendo 64, that has to have all the different hardware of that computer in digital form. The languages that the two computers think in might not have a 1-1 mapping for words though. If I translate english to spanish, I can’t just go word by word. I have to consider the different grammar and adjust accordingly. That translation process takes time. Similarly, the digital hardware being emulated has to actually be running on the physical hardware of your actual computer. So the instructions are essentially being interpreted twice. First, they are interpreted by the emulated computer, and then translated to your computers language after.

Anonymous 0 Comments

Hmmm.

Architecture is basically how that computer runs at the most basic level.

All a computer is, is a bunch of really high tech light switches, on and off. Where it gets complicated is to figure out how they should be flipped and how to convert that into lets say a document, or a picture, or even a fully functioning video game.

So to do that we have to give the computer instructions. We would call that a program or a programming language. The catch is, it’s really freaking hard to actually tell the computer which switches to flip exactly when. What we do instead is tell it on a more human understandable level what we’d like it to do (do some addition here, print a message here.) When we write those instructions for the actual game, the computer then converts it into what is called machine language, which is basically telling it what switches to flip when.

Now here’s the catch. In the same way that every car and vacuum cleaner brand are different, so is every model of computer. And in the case of computers, it REALLY effects what order the switches will be flipped in.

In some cases, it can be a big enough difference that you can’t get old programs to run on new computers.

Now this is really a bigger problem with older programs running on newer things, because they were written for older computers which ran on older computer parts that used different machine language. So when we update them for new computers, even though the human readable part of the code works, when it gets translated to the machine code, the newer computer is essentially speaking a completely different language and can’t understand the program. So to get it to work we have to make significant and difficult changes to either the program that emulates the software or the software (game) itself. Most people, unless they are the original company who owned the game, don’t have access to the human readable code, because companies only sell the games in machine readable form to protect their product from pirates and other reasons. So when you’re emulating an old game and it’s not working because of the system architecture, it can be a really difficult problem to solve, because you don’t always know exactly what part of the program is causing the issue

Anonymous 0 Comments

Consider different architectures as different creatures. One (let say it is A-creature) with strong 6 legs and strong 2 arms, specialized to live in forests and climb trees, another one (B-creature) with 2 legs and 8 arms, specialized to live in flatlands. Consider a game is a dance. If a dance invented in B-creatures tribe and is performed heels over head, A-creature may perform this dance, but it will be slower and a bit clumsy, than if this dance will be performed by a B-creature.

Anonymous 0 Comments

It’s like building a car out of Duplo blocks or Lego blocks. They are both cars made from similar blocks but are entirely incompatible.

Anonymous 0 Comments

There are two levels of architecture: The Set of instructions that a processor can understand, and the micro-architecture (the implementation of those instructions, how the circuit is wired)

The set of instructions, for a 32 bit processor, would be a list of binary numbers with 32 digits. Using the RISC-V as an example: The first 7 bits select the format of operation, and depending of the format, the other bits will select an operation (e.g. add, subtract, jump, branch, shift, etc), the memory address where are stored the operands, and where the result should be stored, etc. (That’s what is machine code)

The micro-architecture is how everything is wired so that if you send that if you input the instructions of a certain architecture, the output will be correct (think of it like a calculator. If you type in any calculator “2 + 2 = “, the output will be 4, but how the calculator is wired changes between calculators.

So, when people say that a computer runs on a different architecture, it generally means the machine code that a processor A understands is different from processor B. But in the case of the N64 emulation the rabbit hole goes furher. The issue isn’t with the instruction set (actually, the MIPS is quite light to emulate), but with the separate chip that deals with graphics and audio (RSP). Some games had a microcode that changed the configuration of that chip, to optimize the graphic rendering (and those are the games that people have more headache to emulate). Also, for a long time, the development of n64 emulation was really messy.

Anonymous 0 Comments

Also extremely simply put, N64 for example was speaking japanese, your current intel PC is speaking american english, AMD is speaking british english, most android phone chips are speaking scottish, apple chips are speaking a specific dialect of irish, etc.

To run a program that was built for the N64 on an intel PC, you need something (emulator) to interpret from japanese to american english on the fly. It is not very efficient, but it can be done.
Same if you make a phone app that you want to run on a PC. You need something to emulate a phone environment for the app to be able to run.

There are also other factors. For example the N64 was like an old japanese man, speaking slowly, and the games were based on that speed.
New PCs are speaking like super fast on crack english, and they can translate japanese to english very fast, but the game isn’t built to be read and show that fast, so it basically slows things down on the emulator in order to time things as they were on the N64. And with that, it also slows down the translation.

You can in theory translate the game and then show it on the time it needs to, but it makes emulators much harder and difficult to make, so they are rarely being made like that.

Anonymous 0 Comments

ELI5 here:

Imagine that one system is built with rails, so, this system can only support trains, you can try to run a car or a bike on it but it won’t be good, the trip I’ll be full of bumps, crashes and you might need to stop before the destination.

We have another system that’s built with asphalt, it is a bit more versatile, can run cars, trucks and bikes, but you can’t run trains on it.

We have also another system, built with water, but this can run only boats, ships and submarines, it just can’t run trains or cars.

It’s pretty much the same with computers (and video games) they are built to calculate stuff in one specific way, whatever you want to run on it, you need it to be compatible.