How does a video game programmed in a PC get stored in a cartridge that can be played by a console?

837 views
0

How does a video game programmed in a PC get stored in a cartridge that can be played by a console?

In: Technology

Each console has their own proprietary coding language that only their machine understands. If a game is written in another language it is “ported” to the console language or visa-versa.

This is why, traditionally, ported PC games (PS4 or Xbox games to PC) are awful buggy messes.

This is also why emulators have poor performance. Emulators actively translate the foreign coding language into a language that a PC can understand.

So ultimately what gets run on any piece of hardware is machine code, instructions that the chips on that hardware can understand. You can program in any “high level” programming language and then compile it, which means turning it into machine code. It’s like translating from English to a region’s local language. You can “target” a specific set of hardware, say a Nintendo Switch, by compiling specific machine code and making sure you meet certain limitations. Generally, developers who want to make games for a console can request to buy a dev unit from the makers, which is a system that has all the same specs as a normal console but are otherwise meant for ease of testing. They make sure that their games run well enough on the target system before publishing the game.

The code that is written on the PC is just words. When the game developer is ready to run the game on a console, the code is translated into a special machine code that the console can understand. Most of the time, the code will be sent to the console over a serial cable, rather than writing it to a cartridge and then plugging that into a console. When it comes time to put the game onto a cartridge, the developer will use a special device that can read and write to the cartridge. This works just like how you can write data to a USB drive.