In software engineering, porting is the process of adapting software for the purpose of achieving some form of execution in a computing environment that is different from the one that a given program (meant for such execution) was originally designed for (e.g., different CPU, operating system, or third party library). The term is also used when software/hardware is changed to make them usable in different environments. [1] [2]
Software is portable when the cost of porting it to a new platform is significantly less than the cost of writing it from scratch. The lower the cost of porting software relative to its implementation cost, the more portable it is said to be. This is distinct from cross-platform software, which is designed from the ground up without any single "native" platform.
The term "port" is derived from the Latin portāre , meaning "to carry". [3] When code is not compatible with a particular operating system or architecture, the code must be "carried" to the new system.
The term is not generally applied to the process of adapting software to run with less memory on the same CPU and operating system.
Software developers often claim that the software they write is portable , meaning that little effort is needed to adapt it to a new environment. The amount of effort actually needed depends on several factors, including the extent to which the original environment (the source platform) differs from the new environment (the target platform), the experience of the original authors in knowing which programming language constructs and third party library calls are unlikely to be portable, and the amount of effort invested by the original authors in only using portable constructs (platform specific constructs often provide a cheaper solution).
The number of significantly different CPUs and operating systems used on the desktop today is much smaller than in the past. The dominance of the x86 architecture means that most desktop software is never ported to a different CPU. In that same market, the choice of operating systems has effectively been reduced to three: Microsoft Windows, macOS, and Linux. However, in the embedded systems and mobile markets, portability remains a significant issue, with the ARM being a widely used alternative.
International standards, such as those promulgated by the ISO, greatly facilitate porting by specifying details of the computing environment in a way that helps reduce differences between different standards-conforming platforms. Writing software that stays within the bounds specified by these standards represents a practical although nontrivial effort. Porting such a program between two standards-compliant platforms (such as POSIX.1) can be just a matter of loading the source code and recompiling it on the new platform, but practitioners often find that various minor corrections are required, due to subtle platform differences. Most standards suffer from "gray areas" where differences in interpretation of standards lead to small variations from platform to platform.
There also exists an ever-increasing number of tools to facilitate porting, such as the GNU Compiler Collection, which provides consistent programming languages on different platforms, and Autotools, which automates the detection of minor variations in the environment and adapts the software accordingly before compilation.
The compilers for some high-level programming languages (e.g. Eiffel, Esterel) gain portability by outputting source code in another high level intermediate language (such as C) for which compilers for many platforms are generally available.
Two activities related to (but distinct from) porting are emulating and cross-compiling.
Instead of translating directly into machine code, modern compilers translate to a machine independent intermediate code in order to enhance portability of the compiler and minimize design efforts. The intermediate language defines a virtual machine that can execute all programs written in the intermediate language (a machine is defined by its language and vice versa). [4] The intermediate code instructions are translated into equivalent machine code sequences by a code generator to create executable code. It is also possible to skip the generation of machine code by actually implementing an interpreter or JIT for the virtual machine. [5]
The use of intermediate code enhances portability of the compiler, because only the machine dependent code (the interpreter or the code generator) of the compiler itself needs to be ported to the target machine. The remainder of the compiler can be imported as intermediate code and then further processed by the ported code generator or interpreter, thus producing the compiler software or directly executing the intermediate code on the interpreter. The machine independent part can be developed and tested on another machine (the host machine). This greatly reduces design efforts, because the machine independent part needs to be developed only once to create portable intermediate code. [6]
An interpreter is less complex and therefore easier to port than a code generator, because it is not able to do code optimizations due to its limited view of the program code (it only sees one instruction at a time, and users need a sequence to do optimization). Some interpreters are extremely easy to port, because they only make minimal assumptions about the instruction set of the underlying hardware. As a result, the virtual machine is even simpler than the target CPU. [7]
Writing the compiler sources entirely in the programming language the compiler is supposed to translate, makes the following approach, better known as compiler bootstrapping , feasible on the target machine:
The difficult part of coding the optimization routines is done using the high-level language instead of the assembly language of the target.
According to the designers of the BCPL language, interpreted code (in the BCPL case) is more compact than machine code, typically by a factor of two to one. Interpreted code however runs about ten times slower than compiled code on the same machine. [8]
The designers of the Java programming language try to take advantage of the compactness of interpreted code, because a Java program may need to be transmitted over the Internet before execution can start on the target's Java virtual machine (JVM).
Porting is also the term used when a video game designed to run on one platform, be it an arcade, video game console, or personal computer, is converted to run on a different platform, perhaps with some minor differences. [9] From the beginning of video games through to the 1990s, "ports", at the time often known as "conversions", were often not true ports, but rather reworked versions of the games due to the limitations of different systems. For example, the 1982 game The Hobbit , a text adventure augmented with graphic images, has significantly different graphic styles across the range of personal computers that its ports were developed for. [10] However, many 21st century video games are developed using software (often in C++) that can output code for one or more consoles as well as for a PC without the need for actual porting (instead relying on the common porting of individual component libraries). [10]
Porting arcade games to home systems with inferior hardware was difficult. The ported version of Pac-Man for the Atari 2600 omitted many of the visual features of the original game to compensate for the lack of ROM space and the hardware struggled when multiple ghosts appeared on the screen creating a flickering effect. The poor performance of the Atari 2600 Pac-Man is cited by some scholars as a cause of the video game crash of 1983. [11]
Many early ports suffered significant gameplay quality issues because computers greatly differed. [12] Richard Garriott stated in 1984 at Origins Game Fair that Origin Systems developed video games for the Apple II first then ported them to Commodore 64 and Atari 8-bit computers, because the latter machines' sprites and other sophisticated features made porting from them to Apple "far more difficult, perhaps even impossible". [13] Reviews complained of ports that suffered from "Apple conversionitis", [14] retaining the Apple's "lousy sound and black-white-green-purple graphics"; [15] [16] after Garriott's statement, when Dan Bunten asked "Atari and Commodore people in the audience, are you happy with the Apple rewrites?" the audience shouted "No!" Garriott responded, "[otherwise] the Apple version will never get done. From a publisher's point of view that's not money wise". [13]
Others worked differently. Ozark Softscape, for example, wrote M.U.L.E. for the Atari first because it preferred to develop for the most advanced computers, removing or altering features as necessary during porting. Such a policy was not always feasible; Bunten stated that "M.U.L.E. can't be done for an Apple", [12] and that the non-Atari versions of The Seven Cities of Gold were inferior. [17] Compute!'s Gazette wrote in 1986 that when porting from Atari to Commodore the original was usually superior. The latter's games' quality improved when developers began creating new software for it in late 1983, the magazine stated. [18]
In porting arcade games, the terms "arcade perfect" or "arcade accurate" were often used to describe how closely the gameplay, graphics, and other assets on the ported version matched the arcade version. Many arcade ports in the early 1980s were far from arcade perfect as home consoles and computers lacked the sophisticated hardware in arcade games, but games could still approximate the gameplay. Notably, Space Invaders on the Atari VCS became the console's killer app despite its differences, [19] while the later Pac-Man port was notorious for its deviations from the arcade version. [20] Arcade-accurate games became more prevalent starting in the 1990s as home consoles caught up to the power of arcade systems. Notably, the Neo Geo system from SNK, which was introduced as a multi-game arcade system, would also be offered as a home console with the same specifications. This allowed arcade perfect games to be played at home. [10]
A "console port" is a game that was originally or primarily made for a console before a version is created which can be played on a personal computer. The process of porting games from console to PC is often regarded more cynically than other types of port due to the more powerful hardware some PCs have even at console launch being underutilized, partially due to console hardware being fixed throughout each generation as newer PCs constantly become even more powerful. While broadly similar today, some architectural differences persist, such as the use of unified memory and smaller OSs on consoles. Other objections arise from user interface differences conventional to consoles, such as gamepads, TFUIs accompanied by narrow FoV, fixed checkpoints, online restricted to official servers or P2P, poor or no modding support, as well as the generally greater reliance among console developers on internal hard coding and defaults instead of external APIs and configurability, all of which may require expensive deep reaching redesign to avoid a "lazy" feeling port to PC. [21]
The Atari 5200 SuperSystem or simply Atari 5200 is a home video game console introduced in 1982 by Atari, Inc. as a higher-end complement for the popular Atari Video Computer System. The VCS was renamed to Atari 2600 at the time of the 5200's launch. Created to compete with Mattel's Intellivision, the 5200 wound up a direct competitor of ColecoVision shortly after its release. While the Coleco system shipped with the first home version of Nintendo's Donkey Kong, the 5200 included the 1978 arcade game Super Breakout, which had already appeared on previous Atari home platforms.
The Atari 7800 ProSystem, or simply the Atari 7800, is a home video game console officially released by Atari Corporation in 1986 as the successor to both the Atari 2600 and Atari 5200. It can run almost all Atari 2600 cartridges, making it one of the first consoles with backward compatibility. It shipped with a different joystick than the 2600-standard CX40 and included Pole Position II as the pack-in game. The European model has a gamepad instead of a joystick. Most of the early releases for the system are ports of 1981–1983 arcade video games. The final wave of 7800 cartridges are closer in style to what was available on other late 1980s consoles, such as Scrapyard Dog and Midnight Mutants.
BCPL is a procedural, imperative, and structured programming language. Originally intended for writing compilers for other languages, BCPL is no longer in common use. However, its influence is still felt because a stripped down and syntactically changed version of BCPL, called B, was the language on which the C programming language was based. BCPL introduced several features of many modern programming languages, including using curly braces to delimit code blocks. BCPL was first implemented by Martin Richards of the University of Cambridge in 1967.
In computing, a compiler is a computer program that translates computer code written in one programming language into another language. The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a low-level programming language to create an executable program.
The Commodore 64, also known as the C64, is an 8-bit home computer introduced in January 1982 by Commodore International. It has been listed in the Guinness World Records as the highest-selling single computer model of all time, with independent estimates placing the number sold between 12.5 and 17 million units. Volume production started in early 1982, marketing in August for US$595. Preceded by the VIC-20 and Commodore PET, the C64 took its name from its 64 kilobytes(65,536 bytes) of RAM. With support for multicolor sprites and a custom chip for waveform generation, the C64 could create superior visuals and audio compared to systems without such custom hardware.
In computing, a virtual machine (VM) is the virtualization or emulation of a computer system. Virtual machines are based on computer architectures and provide the functionality of a physical computer. Their implementations may involve specialized hardware, software, or a combination of the two. Virtual machines differ and are organized by their function, shown here:
In computer science, an interpreter is a computer program that directly executes instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program. An interpreter generally uses one of the following strategies for program execution:
In computing, cross-platform software is computer software that is designed to work in several computing platforms. Some cross-platform software requires a separate build for each platform, but some can be directly run on any platform without special preparation, being written in an interpreted language or compiled to portable bytecode for which the interpreters or run-time packages are common or standard components of all supported platforms.
Bytecode is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references that encode the result of compiler parsing and performing semantic analysis of things like type, scope, and nesting depths of program objects.
MAME is a free and open-source emulator designed to recreate the hardware of arcade games, video game consoles, old computers and other systems in software on modern personal computers and other platforms. Its intention is to preserve gaming history by preventing vintage video games from being lost or forgotten. It does this by emulating the inner workings of the emulated machines; the ability to actually play the video games is considered "a nice side effect". Joystiq has listed MAME as an application that every Windows and Mac gamer should have.
The Bally Astrocade is a second-generation home video game console and simple computer system designed by a team at Midway, at that time the videogame division of Bally. It was originally announced as the "Bally Home Library Computer" in October 1977 and initially made available for mail order in December 1977. But due to production delays, the units were first released to stores in April 1978 and its branding changed to "Bally Professional Arcade". It was marketed only for a limited time before Bally decided to exit the market. The rights were later picked up by a third-party company, who re-released it and sold it until around 1984. The Astrocade is particularly notable for its very powerful graphics capabilities for the time of release, and for the difficulty in accessing those capabilities.
Marble Madness is an arcade video game designed by Mark Cerny and published by Atari Games in 1984. It is a platform game in which the player must guide a marble through six courses, populated with obstacles and enemies, within a time limit. The player controls the marble by using a trackball. Marble Madness is known for using innovative game technologies: it was Atari's first to use the Atari System 1 hardware, the first to be programmed in the C programming language, and one of the first to use true stereo sound.
XPL, for expert's programming language is a programming language based on PL/I, a portable one-pass compiler written in its own language, and a parser generator tool for easily implementing similar compilers for other languages. XPL was designed in 1967 as a way to teach compiler design principles and as starting point for students to build compilers for their own languages.
Multi Emulator Super System (MESS) was an emulator for various consoles and computer systems, based on the MAME core. It used to be a standalone program, but is now integrated into MAME . MESS emulated portable and console gaming systems, computer platforms, and calculators. The project strived for accuracy and portability and therefore was not always the fastest emulator for any one particular system. Its accuracy made it also useful for homebrew game development.
A personal computer game, also known as a computer game or abbreviated PC game, is a video game played on a personal computer (PC). The term PC game has been popularly used since the 1990s referring specifically to games on "Wintel" which has dominated the computer industry since.
Atari Program Exchange (APX) was a division of Atari, Inc. that sold software via mail-order for Atari 8-bit computers from 1981 until 1984. Quarterly APX catalogs were sent to all registered Atari 8-bit owners. APX encouraged any programmer, not just professionals, to submit video games, educational software, applications, and utilities. A few internally developed Atari products were sold through APX, such as Atari Pascal, the developer handbook De Re Atari, and a port of the arcade video game Kangaroo.
A translator or programming language processor is a computer program that converts the programming instructions written in human convenient form into machine language codes that the computers understand and process. It is a generic term that can refer to a compiler, assembler, or interpreter—anything that converts code from one computer language into another. These include translations between high-level and human-readable computer languages such as C++ and Java, intermediate-level languages such as Java bytecode, low-level languages such as the assembly language and machine code, and between similar levels of language on different computing platforms, as well as from any of these to any other of these.
In computing, an emulator is hardware or software that enables one computer system to behave like another computer system. An emulator typically enables the host system to run software or use peripheral devices designed for the guest system. Emulation refers to the ability of a computer program in an electronic device to emulate another program or device.
.. discusses .. portability of .. Fortran
Origin: Of multiple origins. Partly a borrowing from French. Partly a borrowing from Latin. Etymons: French porter; Latin portāre. ... 1. trans. To carry, bear, or convey; to bring.