Jump to content

How are games ported?

EmmaMay

Hi, I was just wondering, how are games ported from one platform to another, say for example on the Wii there is the disc release of Super Mario All-Stars 25th Anniversary Edition which has the original NES mario games but enhanced (the box says), I was just wondering how games are ported from one system to another.

Link to comment
Share on other sites

Link to post
Share on other sites

Just saying, that game is just Super Mario All Stars from the SNES ported to the Wii.

 

Anyways, with those sort of games it's usually software emulation. Meaning the Wii runs a program that runs the original SNES code to play the game.

 

With hardware emulation there is physically some parts in a console or whatever to play the game (like the original PS3 had some PS2 hardware in it to run PS2 games, the SNES' GameBoy player had all the GameBoy hardware in it, etc.)

 

And you also have it that they can take the code and port it so it runs on the hardware of the new console. (so there would be no need for an emulator). A good example would be games on a console or PC that are ports of either a console or PC. they take the code and change some stuff to make it run on the other hardware

 

And another option is that the engine itself can port to different hardware. Like Unity3D can easily port to Android, iOS, PC, PS3 and much more. You may need to change a couple of system exclusive things (like add touchscreen support if you're going to a phone, add controller support if you are porting to a console, etc.)

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
Share on other sites

Link to post
Share on other sites

Either emulated, create a fake console.

 

Or rewritten, but that's about as rare as it gets since it takes way too long.

Location: Kaunas, Lithuania, Europe, Earth, Solar System, Local Interstellar Cloud, Local Bubble, Gould Belt, Orion Arm, Milky Way, Milky Way subgroup, Local Group, Virgo Supercluster, Laniakea, Pisces–Cetus Supercluster Complex, Observable universe, Universe.

Spoiler

12700, B660M Mortar DDR4, 32GB 3200C16 Viper Steel, 2TB SN570, EVGA Supernova G6 850W, be quiet! 500FX, EVGA 3070Ti FTW3 Ultra.

 

Link to comment
Share on other sites

Link to post
Share on other sites

Hi, I was just wondering, how are games ported from one platform to another, say for example on the Wii there is the disc release of Super Mario All-Stars 25th Anniversary Edition which has the original NES mario games but enhanced (the box says), I was just wondering how games are ported from one system to another.

Depends, sometimes the code can be "translated" and patched theoretically, sometimes its just emulated.

Link to comment
Share on other sites

Link to post
Share on other sites

Game (engine) programming student here!

 

Games are usually written in programming languages that can be compiled into machine code for various machines. Most games are written using C++, which you can compile for Windows, OSX, linux, Xbox, Playstation, raspberry pi, etc.
There is however an exception, which is when you communicate with the Operating System(OS). If you want to get the position for the mouse, for example, you'll have to ask the OS to get it. The function to get the position of the mouse will be different for every operating system. So what programmers do is create a new function that, if it's compiled on windows asks windows for the mouse position, if it's on OSX will ask OSX for the mouse position etc. We call this an interface, which is going to be the same for every OS, and an implementation which is going to be different for every other OS.

When you port a game, you will have to do this for every single interaction with the OS.

 

This is also the case with graphics libraries that are OS specific, like DirectX. If you write a rendering engine using DirectsX, you will have to create an interface to it and rewrite it to OpenGL (or soon Vulkan) if you want to support other operating systems.

In the case of these old games for SNES and NES, you can't really do this. That is because those were written in assembly, which is completely system specific. Nintendo probably rewrote those games from the ground up (or created an emulator which emulates that system).

I hope this gives you some insight in how games are ported.

Link to comment
Share on other sites

Link to post
Share on other sites

The higher level parts of the engine make calls to an api/platform abstraction layer which the makes calls to the api/platform.

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×