Share to: share facebook share twitter share wa share telegram print page

Porting

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.

Etymology

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).

History

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.

Porting compilers

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:

  1. Port the interpreter. This needs to be coded in assembly code, using an already present assembler on the target.
  2. Adapt the source of the code generator to the new machine.
  3. Execute the adapted source using the interpreter with the code generator source as input. This will generate the machine code for the code generator.

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 of video games

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 made for a console before an identical version is created which can be played on a personal computer. This term has been widely used by the gaming community. The process of porting a game from a console to a PC is often regarded negatively due to the higher levels of performance that computers generally have being underutilized, partially due to console hardware being fixed throughout their run (with games being developed for console specs), while PCs become more powerful as hardware evolves, but also due to ported games sometimes being poorly optimized for PCs, or lazily ported. While broadly similar, architectural differences may exist such as the use of unified memory on a console.

See also

References

  1. ^ Whitten, D.E.; Demaine, P.A.D. (March 1975). "A machine and configuration independent Fortran: Portable Fortran". IEEE Transactions on Software Engineering. SE-1 (1): 111–124. doi:10.1109/TSE.1975.6312825. S2CID 16485156.
  2. ^ "Portability Issues". .. discusses .. portability of .. Fortran
  3. ^ "port, v.2". Oxford English Dictionary (OED Online). Oxford University Press. Retrieved December 21, 2017. 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.
  4. ^ Tanenbaum 1984, p. 3, § 1.1 Languages, Levels, and Virtual Machines describes the terms and their relations.
  5. ^ Tanenbaum 1984, p. 2. Ch. 1 Introduction explains translation and interpretation.
  6. ^ Richards & Whitby-Strevens 1984, p. 124, § 7.1 Introduction explains compiler portability using intermediate code.
  7. ^ Richards & Whitby-Strevens 1984, p. 133, § 7.4 The bootstrapping process and INTCODE explains the role of the INTCODE interpreter.
  8. ^ Richards & Whitby-Strevens 1984, p. 136, § 7.4.3 Example gives an example translation of a BCPL program into INTCODE for the interpreter.
  9. ^ Wolf, Mark J. P. (2008). "Glossary". The Video Game Explosion: A History from PONG to Playstation and Beyond. Bloomsbury Academic. p. 315. ISBN 978-0-313-33868-7.
  10. ^ a b c Grabarczyk, Pawel; Aarseth, Espen (2019), Port or conversion? An ontological framework for classifying game versions | DiGRA Conference 2019
  11. ^ Nicoll, Benjamin (2015). "Bridging the Gap: The Neo Geo, the Media Imaginary, and the Domestication of Arcade Games". Games and Culture. doi:10.1177/1555412015590048. S2CID 147981978.
  12. ^ a b Bunten, Dan (December 1984). "Dispatches / Insights From the Strategy Game Design Front". Computer Gaming World. p. 40. Retrieved 31 October 2013.
  13. ^ a b "The CGW Computer Game Conference". Computer Gaming World (panel discussion). October 1984. p. 30. Retrieved 31 October 2013.
  14. ^ Dunnington, Benn; Brown, Mark R.; Malcolm, Tom (January–February 1987). "64/128 Gallery". Info. pp. 14–21.
  15. ^ Stanton, Jeffrey; Wells, Robert P.; Rochowansky, Sandra; Mellid, Michael, eds. (1984). The Addison-Wesley Book of Atari Software. Addison-Wesley. pp. 12, 21, 44, 126. ISBN 0-201-16454-X.
  16. ^ Bernstein, Harvey (May 1985). "Beyond Castle Wolfenstein". Antic. p. 83. Retrieved 8 January 2015.
  17. ^ Bunten, Dan. "The Game Collection". Ozark Softscape M.U.L.E. Retrieved 2017-10-04.
  18. ^ Yakal, Kathy (June 1986). "The Evolution of Commodore Graphics". Compute!'s Gazette. pp. 34–42. Retrieved 2019-06-18.
  19. ^ Kent, Steven (2001). Ultimate History of Video Games. Three Rivers Press. p. 190. ISBN 0-7615-3643-4.
  20. ^ Kent, Steven (2001). "The Fall". The Ultimate History of Video Games. Three Rivers Press. pp. 237–239. ISBN 978-0-7615-3643-7.

Read other articles:

Questa voce sull'argomento centri abitati del Kentucky è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. Segui i suggerimenti del progetto di riferimento. Bowling GreencomuneBowling Green – Veduta LocalizzazioneStato Stati Uniti Stato federato Kentucky ConteaWarren TerritorioCoordinate36°58′53.76″N 86°26′39.84″W / 36.9816°N 86.4444°W36.9816; -86.4444 (Bowling Green)Coordinate: 36°58′53.76″N 86°26′39.84″W&#…

Halaman ini berisi artikel tentang desa. Untuk kegunaan lain, lihat CIMI (disambiguasi). CimiMunisipalitasCimiKoordinat: 41°03′21″N 48°34′00″E / 41.05583°N 48.56667°E / 41.05583; 48.56667Koordinat: 41°03′21″N 48°34′00″E / 41.05583°N 48.56667°E / 41.05583; 48.56667Negara AzerbaijanRayonQubaPopulasi[butuh rujukan] • Total1.082Zona waktuUTC+4 (AZT) • Musim panas (DST)UTC+5 (AZT) Cimi (juga D…

1973 television movie directed by Dan Curtis Bram Stoker's DraculaRelease posterAlso known asDraculaGenreGothic horrorWritten byRichard MathesonDirected byDan CurtisStarringJack PalanceSimon WardNigel DavenportPamela BrownFiona LewisPenelope HornerMusic byRobert CobertCountry of originUnited KingdomOriginal languagesEnglishHungarianProductionProducersDan CurtisRobert Singer (associate producer)CinematographyOswald MorrisEditorRichard A. HarrisRunning time100 minutesProduction companyLatglen Ltd.…

United States historic place in Chicago, Illinois United States historic placeOld Town Triangle Historic DistrictU.S. National Register of Historic PlacesU.S. Historic districtChicago Landmark An Old Town sign at Wells Street and North AvenueShow map of Chicago metropolitan areaShow map of IllinoisShow map of the United StatesLocationChicago, Illinois, U.S.Coordinates41°54′40″N 87°38′22″W / 41.9111°N 87.6395°W / 41.9111; -87.6395Built1872Architectural sty…

Stadium in Memphis, Tennessee, United States Simmons Bank Liberty StadiumThe Simmons Bank Liberty Stadium as seen from above.Simmons Bank Liberty StadiumLocation in TennesseeShow map of TennesseeSimmons Bank Liberty StadiumLocation in the United StatesShow map of the United StatesFormer namesMemphis Memorial Stadium (1965–1975) Liberty Bowl Memorial Stadium (1975–2022)Address335 South Hollywood StreetLocationMemphis, TennesseeCoordinates35°7′16″N 89°58′39″W / 35.121…

Salah satu contoh kubah bawang. Contoh ini diambil dari gereja yang berada di Andst, Denmark. Kubah bawang atau Onion dome adalah salah satu bentuk arsitektur kubah. Artikel bertopik bangunan dan struktur ini adalah sebuah rintisan. Anda dapat membantu Wikipedia dengan mengembangkannya.lbs

25°42′29″N 32°38′40″E / 25.70806°N 32.64444°E / 25.70806; 32.64444 متحف التحنيط إحداثيات 25°42′29″N 32°38′40″E / 25.708026°N 32.644476°E / 25.708026; 32.644476 معلومات عامة الموقع الأقصر  العنوان بالأقصر على كورنيش النيل شمال معبد الأقصر القرية أو المدينة بالأقصر الدولة مصر المؤسس المجلس الأ…

Historic site in Queensland, AustraliaUanda2015Location27 Clifton Street, Wilston, City of Brisbane, Queensland, AustraliaCoordinates27°26′17″S 153°01′13″E / 27.438°S 153.0202°E / -27.438; 153.0202Design period1919–1930s (interwar period)Built1928ArchitectNellie McCredie Queensland Heritage RegisterOfficial nameUandaTypestate heritage (built, landscape)Designated24 March 2000Reference no.601156Significant period1920s (fabric, historical)Significant comp…

Questa voce sull'argomento stagioni delle società calcistiche italiane è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. Segui i suggerimenti del progetto di riferimento. Voce principale: Unione Sportiva Pistoiese. Unione Sportiva PistoieseStagione 1926-1927Sport calcio Squadra Pistoiese Allenatore György Kőszegy Presidente Pindaro Polandri Prima Divisione3º posto nel girone C 1925-1926 1927-1928 Si invita a seguire il modello di voce Questa pagina…

Questa voce sull'argomento stagioni delle società calcistiche italiane è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. Segui i suggerimenti del progetto di riferimento. Voce principale: Associazione Calcio Chioggia Sottomarina. F.B.C. Union ClodiaSottomarinaStagione 1975-1976Sport calcio SquadraClodiense Società Sportiva Dilettantistica Allenatore Livio Fongaro Presidente Teofilo Sanson Serie C14º posto nel girone A. Maggiori presenzeCampionato: Lomont…

Convair R3Y TradewindUn R3Y-1 Tradewind in volo radente sulla baia di San Francisco nei pressi della NAS Alameda.DescrizioneCostruttoreConvair Data ordine27 maggio 1946 Data primo volo25 febbraio 1954 (R3Y-1) Data entrata in servizio1956 (R3Y-1) Data ritiro dal servizio1958 Utilizzatore principale U.S. Navy Esemplari11 (R3Y)2 (P5Y) Dimensioni e pesiTavole prospettiche Lunghezza42,26 m (139 ft 8 in) Apertura alare44,42 m (145 ft 9 in) Altezza15,68 m (51 ft 5 in) Superficie alare195,3 m² (2 …

Artikel ini mungkin termasuk rintisan permanen. Artikel dapat dikatakan layak, tetapi sumbernya terbatas. Bantulah untuk menambahkan referensi atau sumber tepercaya jika memungkinkan. Leo SutantoLahir19 Desember 1947 (umur 76)Jakarta, IndonesiaPekerjaanProduser filmpenyuntingTahun aktif1996—sekarangSuami/istriElly Yanti NoorAnak4 Leo Sutanto (lahir 19 Desember 1947) adalah produser film dan penyunting Indonesia. Ia dikenal sebagai produser sekaligus pendiri rumah produksi SinemArt. F…

Submersible used for rescue of people from disabled submarines and submersibles This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Deep-submergence rescue vehicle – news · newspapers · books · scholar · JSTOR (February 2014) (Learn how and when to remove this message) The US Navy's DSRV-1 Mystic docked to a L…

Comic book superhero Comics character DeadmanDeadman as depicted on the cover of The Deadman Collection (2001). Art by Neal Adams.Publication informationPublisherDC ComicsFirst appearanceStrange Adventures #205 (October 1967)Created byArnold Drake (writer)Carmine Infantino (artist)In-story informationAlter egoBoston BrandSpeciesGhostTeam affiliationsJustice League DarkSeven Soldiers of VictorySentinels of MagicJustice LeagueAbilities Flight Invisibility Intangibility Possession Expertise in acro…

此條目可能包含不适用或被曲解的引用资料,部分内容的准确性无法被证實。 (2023年1月5日)请协助校核其中的错误以改善这篇条目。详情请参见条目的讨论页。 各国相关 主題列表 索引 国内生产总值 石油储量 国防预算 武装部队(军事) 官方语言 人口統計 人口密度 生育率 出生率 死亡率 自杀率 谋杀率 失业率 储蓄率 识字率 出口额 进口额 煤产量 发电量 监禁率 死刑 国债 外…

Deaf sign language used in the US Sandy River Valley SignNative toUnited StatesRegionSandy River Valley, MaineEra19th centuryLanguage familyMartha's Vineyard Sign Language?Language codesISO 639-3None (mis)GlottologNone Sandy River Valley Sign Language was a village sign language of the 19th-century Sandy River Valley in Maine. Together with the more famous Martha's Vineyard Sign Language and Henniker Sign Language, it was one of three local languages which formed the basis of American Sign …

American politician Katherine Fernandez RundleRundle in 2022State Attorney for Miami-Dade CountyIncumbentAssumed office March 12, 1993Preceded byJanet Reno Personal detailsBorn (1950-03-01) March 1, 1950 (age 74)Washington, D.C., U.S.Political partyDemocraticEducationUniversity of Miami (BA, MA)University of Cambridge (LLB)WebsiteOfficial website Katherine Fernandez Rundle (born March 1, 1950) is the current State Attorney for Miami-Dade County in Florida. Education Rundle received a B.…

Campionato mondiale di Formula 1 1961Edizione n. 12 del Campionato mondiale di Formula 1 Dati generaliInizio14 maggio Termine8 ottobre Prove8 Titoli in palioPiloti Phil Hillsu Ferrari 156 F1 Costruttori Ferrari Altre edizioniPrecedente - Successiva Edizione in corso Il campionato mondiale di Formula 1 1961 organizzato dalla FIA è stato, nella storia della categoria, il 12° ad assegnare il Campionato Piloti e il 4° ad assegnare il Campionato Costruttori. È iniziato il 14 maggio ed è term…

العلاقات الغامبية المولدوفية غامبيا مولدوفا   غامبيا   مولدوفا تعديل مصدري - تعديل   العلاقات الغامبية المولدوفية هي العلاقات الثنائية التي تجمع بين غامبيا ومولدوفا.[1][2][3][4][5] مقارنة بين البلدين هذه مقارنة عامة ومرجعية للدولتين: وجه المقارن…

Island west of Taiwan. Dongding IslandNative name: 東碇島 / 東椗島GeographyLocationIn the Taiwan Strait, Jinhu Township, Kinmen County (Quemoy), Fujian, Republic of China (Taiwan)[1][2][3][4][5]Area0.0160 km2 (0.0062 sq mi)[6]AdministrationRepublic of China (Taiwan)ProvinceFujianCountyKinmen (Quemoy)Urban TownshipJinhuAdditional informationTime zoneNational Standard Time (UTC+8) Dongding Islandclass=notpageimage| Location of Do…

Kembali kehalaman sebelumnya