ROM hacking: Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
imported>Cyberlink420
imported>Cipher Nox
 
Line 1: Line 1:
{{short description|Editing technique for video games}}
{{short description|Editing technique for video games}}
{{About|modifications to ROM images of video games|video games unofficially produced by hobbyists for closed systems|Homebrew (video games)}}
{{About|modifications to ROM images of video games|video games unofficially produced by hobbyists for closed systems|Homebrew (video games)|modifications to video games in general|Video game modding}}


'''ROM hacking''' is the process of [[Modding|modifying]] a [[ROM image|ROM image or ROM file]] to alter the contents contained within, usually of a [[video game]] to alter the game's [[graphics]], [[dialogue]], [[Level (video games)|level]]s, [[gameplay]], and/or other elements. This is usually done by technically inclined video game fans to improve an old game of importance, as a creative outlet, or to essentially make ''new'', unofficial games using the old game's engine.
'''ROM hacking''' is the process of [[Modding|modifying]] a [[ROM image|ROM image or ROM file]] to change or alter the contents contained within, usually of a [[video game]] to alter the game's [[graphics]], [[dialogue]], [[Level (video games)|level]]s, [[gameplay]], or other elements.


ROM [[Hacker (hobbyist)|hacking]] is generally accomplished through use of a [[hex editor]] (a program for editing non-textual data) and various specialized tools such as [[tile-based video game|tile]] editors, and game-specific tools which are generally used for editing levels, items, and the like, although more advanced tools such as [[assembly language|assemblers]] and [[debugger]]s are occasionally used. Once ready, they are usually [[#Distribution|distributed]] on the [[Internet]] for others to play on an [[Console emulator|emulator]] or a games console.<ref name="dictionary">{{cite web|url=http://www.romhacking.net/dictionary/?page=dictionary|title=Dictionary of ROM hacking terms|website=ROMhacking.net}}</ref>
ROM [[Hacker (hobbyist)|hacking]] is usually done by technically inclined video game fans, often created as a fun way of playing the original games by redesigning the old game with new graphics, levels, items, mechanics and other features while keeping the core gameplay the same, in effect creating either an improved or an entirely different version of the original game. In general, they are typically done to improve an old game of importance, as a creative outlet, or to essentially make new (unofficial) games using the old game's engine.


Many ROM hacks today are typically created as a fun way of playing the original games, as they typically redesign the game with new mechanics, graphics, levels, and other features while keeping most if not all of the items the same, effectively creating either an improved or an entirely different version of the original games. Some hacks are also created to unlock and/or reimplement features that existed in the game's code but are not utilized in-game, especially for when rediscovering or restoring old beta content that was hidden away from the final game's release.
ROM hacking is generally accomplished through use of a [[hex editor]] (a program for editing non-textual data) and various specialized tools such as [[tile-based video game|tile]] editors, and game-specific tools which are generally used for editing levels, items, and the like, although more advanced tools such as [[assembly language|assemblers]] and [[debugger]]s are occasionally used. Once ready, they are usually [[#Distribution|distributed]] on the [[Internet]] for others to play on an [[Console emulator|emulator]] or a games console.<ref name="dictionary">{{cite web|url=http://www.romhacking.net/dictionary/?page=dictionary|title=Dictionary of ROM hacking terms|website=ROMhacking.net}}</ref>


[[Fan translation of video games|Fan translation]] (known as "translation hacking" within the ROM hacking community) is another type of ROM hacking; there are also anti-censorship hacks that exist to restore a game to its original state, which is often seen with older games that were imported, as publishers' content policies for video games (most notably, [[Nintendo]]'s) were much stricter in the United States than Japan or Europe; [[Speedrunning|randomizers]] are also available for certain games, which are designed to shuffle entity placements from within the games.<ref>{{Cite web|title=The BIG List of Video Game Randomizers|url=https://www.debigare.com/randomizers/|access-date=2020-07-10|website=Guillaume Fortin-Debigaré|language=en}}</ref> Although much of the method applies to both types of hacking, this article focuses on "creative hacking" such as editing game levels.
[[Fan translation of video games|Fan translation]] (known as "translation hacking" within the ROM hacking community) is another type of ROM hacking; there are also anti-censorship hacks that exist to restore a game to its original state, which is often seen with older games that were imported, as publishers' content policies for video games (most notably, [[Nintendo]]'s) were much stricter in the United States than in Japan or Europe; [[Speedrunning|randomizers]] are also available for certain games, which are designed to shuffle entity placements from within the games;<ref>{{Cite web|title=The BIG List of Video Game Randomizers|url=https://www.debigare.com/randomizers/|access-date=2020-07-10|website=Guillaume Fortin-Debigaré|language=en}}</ref> some hacks are also created to unlock or reimplement features that exist in the game's code but are not used in-game, especially when rediscovering and restoring old [[Software release life cycle#Beta|beta]] content that was hidden away from the game's final release. Although much of the method applies to both types of hacking, this article focuses on "creative hacking" such as editing game levels.


==Communities==
==Communities==
<!-- Deleted image removed: [[File:Comparebrownred.PNG|frame|Screenshots comparing the world maps in ''[[Pokémon Red]]'' (original game, left) and ''Pokémon Brown'' (hacked game, right) {{ffdc|1=Comparebrownred.PNG|log=2013 December 20}}]] -->
Most hacking groups offer web space for hosting hacks and screenshots (sometimes only hosting hacks by the group's members and hosting almost any hack), a message board, and often have an [[Internet Relay Chat|IRC]] channel. Several hacking groups and individuals have also created guides for beginners to get into grips with ROM hacking for the first time, such as the ''Rom Hacking Bible'' for the [[Nintendo Entertainment System|NES]] that was written in the mid-to-late 1990s,<ref>{{Cite web |title=NES - Rom Hacking Bible - NES - By SeRiAlKLR - GameFAQs |url=https://gamefaqs.gamespot.com/nes/916386-nes/faqs/2948 |access-date=2024-08-05 |website=gamefaqs.gamespot.com}}</ref> as well as guides designed for those who wanted to learn how to add or change things from start to finish.


Most hacking groups offer web space for hosting hacks and screenshots (sometimes only hosting hacks by the group's members and hosting almost any hack), a message board, and often have an [[Internet Relay Chat|IRC]] channel. Several hacking groups have also created guides that aims to help beginners get into grips with ROM hacking for the first time, including the legendary "Rom Hacking Bible" for the [[Nintendo Entertainment System|NES]] written in the mid-to-late 1990s,<ref>{{Cite web |title=NES - Rom Hacking Bible - NES - By SeRiAlKLR - GameFAQs |url=https://gamefaqs.gamespot.com/nes/916386-nes/faqs/2948 |access-date=2024-08-05 |website=gamefaqs.gamespot.com}}</ref> as well as guides that are designed for those that wanted to learn how to add or change things from start to finish.
There are many sites on the internet dedicated to world of ROM hacking, with each of them focusing on several hacks and translations of games across multiple series, franchises and platforms. One of the most popular sites dedicated to ROM hacking of video games was {{Anchor|Romhacking.net}}ROMhacking.net, which first went online in late 2005. From its inception up until 2024, it served as a hub related to all things ROM hacking, hosting a repository of hacks, translations, utilities, documents, and patches for many well-known and obscure video games from the [[Third generation of video game consoles|third generation]] up to the [[Seventh generation of video game consoles|seventh generation]]. ROMhacking.com was the immediate predecessor of ROMhacking.net, which launched five years earlier in 2000 as "The Whirlpool" and was briefly renamed as ROMhacking.org between 2001 and 2002 before returning to its original name afterwards and then went offline in late 2004.<ref>{{cite web |title=The Legacy - ROMhacking.com/ROMhacking.org |url=https://www.romhacking.net/about/#romhackcom |website=ROMhacking.net |access-date=27 August 2024}}</ref><ref>{{Cite web|url=https://romhack.ing/help/about|title=Help - About|website=RHDI|access-date=2 April 2025}}</ref>


There are many sites on the internet dedicated to world of ROM hacking, with each site focusing on several hacks and translations of several different games across multiple series, franchises and platforms. One of the most popular sites dedicated to ROM hacking of video games was {{Anchor|Romhacking.net}}ROMhacking.net, which first went online in late 2005. From its inception up until 2024, it served as a hub related to all things ROM hacking, hosting a repository of hacks, translations, utilities, documents, and patches for many well-known and obscure video games from the [[Third generation of video game consoles|third generation]] up to the [[Seventh generation of video game consoles|seventh generation]]. ROMhacking.com was the immediate predecessor of ROMhacking.net, which launched five years earlier in 2000 as "The Whirlpool" and was briefly renamed as ROMhacking.org between 2001 and 2002 before returning to its original name afterwards and then went offline in late 2004.<ref>{{cite web |title=The Legacy - ROMhacking.com/ROMhacking.org |url=https://www.romhacking.net/about/#romhackcom |website=ROMhacking.net |access-date=27 August 2024}}</ref><ref>{{Cite web|url=https://romhack.ing/help/about|title=Help - About|website=RHDI|access-date=2 April 2025}}</ref>
{{asof|2024|8|1}}, ROMhacking.net has been relegated into being a read-only news site for ROM hacking projects after transitioning into the new format on that day after nearly 20 years of hosting on the site due to various reasons beyond the site's control; its former database and files have been archived on the [[Internet Archive]] on the same day of the announcement. New submissions were also permanently closed on the same day as well, and all downloads on the site will remain available for as long as the site maintainers can handle.<ref>{{cite news |author1=Joshua Wolens |date=2 August 2024 |title=Founder takes down the Nexus Mods of romhacking after 20 years because 'lines were crossed' by 'a most dishonest and hate filled group,' but others tell a different story |url=https://www.pcgamer.com/gaming-industry/founder-takes-down-the-nexus-mods-of-romhacking-after-20-years-because-lines-were-crossed-by-a-most-dishonest-and-hate-filled-group-but-others-tell-a-different-story/ |access-date=2 August 2024 |work=PC Gamer |language=en}}</ref><ref>{{cite news |author1=Catherine Lewis |title=20-year-old romhack site that was a treasure trove of Pokemon fan games and JRPG translations winds down after achieving "almost everything it set out to do" |url=https://www.gamesradar.com/games/20-year-old-romhack-site-that-was-a-treasure-trove-of-pokemon-fan-games-and-jrpg-translations-winds-down-after-achieving-almost-everything-it-set-out-to-do/ |access-date=2 August 2024 |work=gamesradar |date=2 August 2024 |language=en}}</ref><ref>{{cite web |last1=McWhertor |first1=Michael |title=The best ROM hack website is shutting down after nearly 20 years |url=https://www.polygon.com/24211944/romhacking-net-closure-internet-archive-downloads |website=Polygon |access-date=2 August 2024 |date=2 August 2024}}</ref><ref name="rhdn_readonly">{{cite web |title=Site: ROMhacking.net Moves to News Only, Database and File Archive Released to Internet Archive |url=https://www.romhacking.net/forum/index.php?topic=39405.0 |website=ROMhacking.net |access-date=27 August 2024}}</ref> The spiritual successor to ROMhacking.net, {{Anchor|Romhack.ing}}Romhack.ing (RHDI), was launched as an alpha release on 15 August 2024, two weeks after ROMhacking.net transitioned into the read-only format, and then opened for public registration on 1 March 2025.
 
{{asof|2024|8|1}}, ROMhacking.net is now relegated into being a read-only news site for ROM hacking projects after transitioning into the new format on that day after nearly 20 years of hosting on the site due to various reasons beyond the site's control; its former database and files have been archived on the [[Internet Archive]] on the same day of the announcement. New submissions were also permanently closed on the same day as well, and all downloads on the site will remain available for as long as the site maintainers can handle.<ref>{{cite news |author1=Joshua Wolens |date=2 August 2024 |title=Founder takes down the Nexus Mods of romhacking after 20 years because 'lines were crossed' by 'a most dishonest and hate filled group,' but others tell a different story |url=https://www.pcgamer.com/gaming-industry/founder-takes-down-the-nexus-mods-of-romhacking-after-20-years-because-lines-were-crossed-by-a-most-dishonest-and-hate-filled-group-but-others-tell-a-different-story/ |access-date=2 August 2024 |work=PC Gamer |language=en}}</ref><ref>{{cite news |author1=Catherine Lewis |title=20-year-old romhack site that was a treasure trove of Pokemon fan games and JRPG translations winds down after achieving "almost everything it set out to do" |url=https://www.gamesradar.com/games/20-year-old-romhack-site-that-was-a-treasure-trove-of-pokemon-fan-games-and-jrpg-translations-winds-down-after-achieving-almost-everything-it-set-out-to-do/ |access-date=2 August 2024 |work=gamesradar |date=2 August 2024 |language=en}}</ref><ref>{{cite web |last1=McWhertor |first1=Michael |title=The best ROM hack website is shutting down after nearly 20 years |url=https://www.polygon.com/24211944/romhacking-net-closure-internet-archive-downloads |website=Polygon |access-date=2 August 2024 |date=2 August 2024}}</ref><ref name="rhdn_readonly">{{cite web |title=Site: ROMhacking.net Moves to News Only, Database and File Archive Released to Internet Archive |url=https://www.romhacking.net/forum/index.php?topic=39405.0 |website=ROMhacking.net |access-date=27 August 2024}}</ref> The spiritual successor to ROMhacking.net, {{Anchor|Romhack.ing}}Romhack.ing (RHDI), was launched as an alpha release on 15 August 2024 and opened for registration on 1 March 2025.


==Methods==
==Methods==
Line 23: Line 21:


===Hex editing===
===Hex editing===
A [[hex editor]] is one of the most fundamental tools in any ROM hacker's repertoire. Hex editors are usually used for editing text, and for editing other data for which the structure is known (for example, item properties), and [[#Assembly hacking|Assembly hacking]].
[[File:ImHex screenshot.png|thumb|right|300px|[[ImHex]], a modern hex editor, visualizing file structures and data entropy. Such tools are used in ROM hacking to identify and modify specific data patterns within a game's binary code.]]
One of the most basic skills of ROM hacking is ''hex editing'', which refers to directly modifying the [[hexadecimal]] data of a video game using a [[hex editor]]. A hex editor is one of the most fundamental tools in any ROM hacker's repertoire, and is typically used for editing text, editing other data for which the structure is known (for example, item properties), and [[#Assembly hacking|assembly hacking]].


Editing text is one of the most basic forms of hacking. Many games do not store their text in [[ASCII]] form, and because of this, some specialized hex editors have been developed, which can be told what byte values correspond to what letter(s) of the alphabet, to facilitate text editing; a file that defines these byte=letter relationships is called a "table" file. Other games use simple text compression techniques (such as [[byte pair encoding]], also called [[dual tile encoding]] or DTE, in which certain combinations of two or more letters are encoded as one byte) which a suitably equipped hex editor can facilitate editing.
Editing text is one of the most basic forms of hacking. Many games do not store their text in [[ASCII]] form, and because of this, some specialized hex editors have been developed to tell what byte values correspond to the letters of the alphabet to facilitate text editing; a file that defines these byte=letter relationships is called a "table" file. Other games use simple text compression techniques (such as [[byte pair encoding]], also called [[dual tile encoding]] or DTE, in which certain combinations of two or more letters are encoded as one byte) which a suitably equipped hex editor can facilitate editing.


A hex editor is the tool of choice for editing things such as character/item properties if the structure and location of this data are known and there is no game-specific editor for the game that can edit this information. Some intrepid hackers also perform [[#Level editing|level editing]] with a hex editor, but this is extremely difficult (except on games whose level storage format closely resembles how it is presented in a hex editor).
A hex editor is the tool of choice for editing things such as character/item properties if the structure and location of this data are known and there is no game-specific editor for the game that can edit this information. Some intrepid hackers also perform [[#Level editing|level editing]] with a hex editor, but this is extremely difficult (except on games whose level storage format closely resembles how it is presented in a hex editor).


===Graphics editing===
===Graphics editing===
<!-- Deleted image removed: [[File:Comparison of Dragon Warrior and Dragoon X Omega.png|thumb|Comparison of battle graphics in ''[[Dragon Warrior]]'' (above) and a hack of it, ''Dragoon X Omega'' (below).  {{deletable image-caption|Friday, 27 December 2013}}]] -->
Another basic hacking skill is ''graphics hacking'', which is changing the appearance of the game's environments, characters, fonts, or other such things. The format of graphics data varies from console to console, but most of the early ones ([[NES]], [[Super Nintendo Entertainment System|Super NES]], [[Game Boy]], etc.) store graphics in [[Tile-based video game|tiles]], which are 8x8-[[pixel]] units of data, which are arranged on-screen to produce the desired result. Editing these tiles is also possible with a hex editor, but is generally accomplished with a tile editor (such as [http://segaretro.org/Tile_Layer_Pro ''Tile Layer''] or [https://github.com/toruzz/TileMolester ''Tile Molester'']), which can graphically display the ROM data, as well as finding and editing tiles.
 
Another basic hacking skill is graphics hacking, which is changing the appearance of the game's environments, characters, fonts, or other such things. The format of graphics data varies from console to console, but most of the early ones (NES, Super NES, Game Boy, etc.) store graphics in [[Tile-based video game|tiles]], which are 8x8-[[pixel]] units of data, which are arranged on-screen to produce the desired result. Editing these tiles is also possible with a hex editor, but is generally accomplished with a tile editor (such as [http://segaretro.org/Tile_Layer_Pro ''Tile Layer''] or [https://github.com/toruzz/TileMolester ''Tile Molester'']), which can graphically display the ROM data, as well as finding and editing tiles.


Graphics hacks can range from simple edits (such as giving [[Mario]] an [[afro]] or [[Luigi (character)|Luigi]] a [[golf club]]) to "porting" characters from one game to another (such as creating [[pixelation|pixelated]] ("retro-styled") sprites of later generation [[List of Pokémon|Pokémon]] for use with Generation I-V Pokémon games<ref>{{Cite web |last= |date=2019-04-13 |title=Pokemon Rom Hacks List: GBC, GBC & NDS - PokemonCoders |url=https://www.pokemoncoders.com/pokemon-rom-hacks/ |access-date=2023-03-08 |website=PokemonCoders |language=en-US}}</ref>), to full-blown thematic changes (usually with accompanying palette changes; see below).
Graphics hacks can range from simple edits (such as giving [[Mario]] an [[afro]] or [[Luigi (character)|Luigi]] a [[golf club]]) to "porting" characters from one game to another (such as creating [[pixel art|pixelated]] ("retro-styled") sprites of [[List of Pokémon|later generation Pokémon]] for use with [[Pokémon (video game series)#1996–1998: First generation|Generation I]]-[[Pokémon (video game series)#2010–2012: Fifth generation|V]] [[Pokémon (video game series)|Pokémon]] games<ref>{{Cite web |last= |date=2019-04-13 |title=Pokemon Rom Hacks List: GBC, GBC & NDS - PokemonCoders |url=https://www.pokemoncoders.com/pokemon-rom-hacks/ |access-date=2023-03-08 |website=PokemonCoders |language=en-US}}</ref>), to full-blown thematic changes (usually with accompanying palette changes; see below).


More sophisticated graphics hacking involves changing more than just tiles and colors, but also on how the tiles are arranged, or tile groups generated, giving more flexibility and control over the final appearance. This is accomplished through hex editing or a specialized tool (either for a specific game or a specific system). An example of this approach was the incomplete ''Pokémon Torzach'', a [[Pokémon FireRed]] hack of that attempts to add a whole new generation of Pokémon and tiles to the game. It was able to achieve some desirable results with the tools that were currently available at the time.<ref name="Pokemon FireRed ROM Hacks">{{cite web |title=Pokemon FireRed ROM Hacks |url=https://www.pokemoncoders.com/pokemon-fire-red-rom-hacks/ |website=PokemonCoders.com|date=11 March 2019 }}</ref> ''Super Mario Land 2 DX: 6 Golden Coins'' is another example of graphics hacking, which is an enhanced version of the [[Super Mario Land 2: 6 Golden Coins|original game]] that added, among others, full-color support (the original game was greyscale-only) and some quality-of-life improvements, such as fixes with screen flickering issues from the original game.<ref>{{Cite web|url=https://arstechnica.com/gaming/2017/12/a-christmas-gift-from-game-boy-rom-hackers-super-mario-land-2-in-color/|title=A Christmas gift from Game Boy ROM hackers: ''Super Mario Land 2'' in color|last=Machkovech|first=Sam|date=25 December 2017|website=Ars Technica|access-date=18 February 2023}}</ref>
More sophisticated graphics hacking involves changing more than just tiles and colors, but also on how the tiles are arranged, or tile groups generated, giving more flexibility and control over the final appearance. This is accomplished through hex editing or a specialized tool (either for a specific game or a specific system). An example of this approach was the incomplete ''Pokémon Torzach'', a ''[[Pokémon FireRed]]'' hack that attempts to add a whole new generation of Pokémon and tiles to the game. Though the hack has long since been discontinued, it was able to achieve some desirable results with the tools that were currently available at the time.<ref name="Pokemon FireRed ROM Hacks">{{cite web |title=Pokemon FireRed ROM Hacks |url=https://www.pokemoncoders.com/pokemon-fire-red-rom-hacks/ |website=PokemonCoders.com|date=11 March 2019 }}</ref> ''Super Mario Land 2 DX: 6 Golden Coins'' is another example, which is an enhanced version of the [[Super Mario Land 2: 6 Golden Coins|original game]] that notably added full-color support to the game (the original game was only in greyscale) as well as some quality-of-life improvements such as fixes with screen flickering issues from the original game.<ref>{{Cite web|url=https://arstechnica.com/gaming/2017/12/a-christmas-gift-from-game-boy-rom-hackers-super-mario-land-2-in-color/|title=A Christmas gift from Game Boy ROM hackers: ''Super Mario Land 2'' in color|last=Machkovech|first=Sam|date=25 December 2017|website=Ars Technica|access-date=18 February 2023}}</ref>
<!-- Deleted image removed: [[File:Advance map screen.png|left|thumb|225px|Screenshot of Advance Map, an editor for Pokémon games for the GBA]] -->


===Palette editing===
===Palette editing===
 
Another common form of hacking is ''palette hacking'', where color values are modified to change the colors a player sees in the game (this often goes hand-in-hand with [[#Graphics editing|graphics hacking]]); Palette values are commonly stored in [[Hexadecimal|Hex]]. This is fairly easy for NES games, the graphics of which use a pre-defined set of colors among which a game selects (using a [[YIQ]]-based color palette); palette hacking in this case entails changing which of those colors are selected. The matter is slightly more complicated with Super NES games as well as games for other systems (including [[Sega Genesis|Sega Mega Drive (Genesis)]] games), which store absolute [[RGB]] color values. Palette editors are usually simple and often are with level editors or game-specific graphics editors.
Another common form of hacking is ''palette hacking'', where color values are modified to change the colors a player sees in the game (this often goes hand-in-hand with [[#Graphics editing|graphics hacking]]); Palette values are commonly stored in [[Hexadecimal|Hex]]. This is fairly easy for [[Nintendo Entertainment System|NES]] games, the graphics of which use a pre-defined set of colors among which a game selects (using a [[YIQ]]-based color palette); palette hacking in this case entails changing which of those colors are selected. The matter is slightly more complicated with [[Super Nintendo Entertainment System|Super NES]] games as well as games for other systems (which includes [[Sega Genesis|Sega Mega Drive (Genesis)]] games), which store absolute [[RGB]] color values. Palette editors are usually simple and often are with level editors or game-specific graphics editors.


===Level editing===
===Level editing===
 
One of the most popular forms of ROM hacking, ''level editing'' entails modifying or redesigning a game's levels or maps. This is almost exclusively done with an editor specially tailored for a particular game (called a [[level editor]]). Level edits can be done to make the game more challenging, to alter the flow of the game's plot, or just to give something new to an old game. Combined with extensive graphics hacking, the game can take on a very different look and feel.
One of the most popular forms of ROM hacking, level editing entails modifying or redesigning a game's levels or maps. This is almost exclusively done with an editor specially tailored for a particular game (called a ''[[level editor]]''). Level edits can be done to make the game more challenging, to alter the flow of the game's plot, or just to give something new to an old game. Combined with extensive graphics hacking, the game can take on a very different look and feel.


===Data editing===
===Data editing===
A core component of many hacks (especially of [[role-playing video game]]s) is editing data such as character, item, and enemy properties. This is usually done either "by hand" (with a hex editor) if the location and structure of the data is known, or with a game-specific editor that has this functionality. Through this, a hacker can alter how weapons work, how strong enemies are or how they act, etc. This can be done to make the game easier or harder or to create new scenarios for the player to face.
A core component of many hacks (especially of [[role-playing video game]]s) is editing data such as character, item, and enemy properties. This is usually done either "by hand" (with a hex editor) if the location and structure of the data is known, or with a game-specific editor that has this functionality. Through this, a hacker can alter how weapons work, how strong enemies are or how they act, etc. This can be done to make the game easier or harder or to create new scenarios for the player to face.


===Assembly hacking===
===Assembly hacking===
 
The most powerful, and arguably the most difficult, hacking technique is editing the game's actual code, a process called ''assembly hacking'' or ''ASM hacking'' ("ASM" is short for "[[assembly language|assembly]]", referring to the low-level programming language that gets executed by the CPU).<ref name="dictionary"/> There is no set pattern for assembly hacking, as the code varies widely from game to game, but most skilled assembly hackers either use an [[Console emulator|emulator]] equipped with a built-in debugger or tracer, or run the ROM through a [[disassembler]], then analyze the code and modify it using a hex editor or assembler according to their needs. While quite challenging compared to the relatively simple methods listed above, "anything" is possible with assembly hacking, usually within the limitations of the hardware and software of the gaming platform. This can range from altering enemy [[Game artificial intelligence|AI]] to changing how graphics are generated. If the developers used a [[Programming language#Typed versus untyped languages|typed language]], a hacker may be able to compile their code for the game in the same language if they have access to a proper compiler. One such example would be using [[C (programming language)|C]] to hack [[Nintendo 64]] games, since [[MIPS architecture|MIPS]]-[[GNU Compiler Collection|GCC]] can compile code for the Nintendo 64.<ref>{{cite web|url=https://code.google.com/p/vg64tools/source/browse/#svn/n64/z64actor/trunk |title=vg64tools - Project Hosting on Google Code |access-date=2009-09-09}}</ref><ref>{{cite web |url=http://sites.google.com/site/messiaen64/pong_of_death |title=Super Mario 64: Pong Of Death (messiaen) |access-date=2009-09-09 |archive-date=2011-10-10 |archive-url=https://web.archive.org/web/20111010104312/http://sites.google.com/site/messiaen64/pong_of_death |url-status=dead }}</ref>
The most powerful, and arguably the most difficult, hacking technique is editing the game's actual code, a process called ''ASM hacking'' ("ASM" means "[[assembly language|assembly]]", referring to the low-level programming language that gets executed by the CPU).<ref name="dictionary"/> There is no set pattern for ASM hacking, as the code varies widely from game to game, but most skilled ASM hackers either use an [[Console emulator|emulator]] equipped with a built-in debugger or tracer, or run the ROM through a [[disassembler]], then analyze the code and modify it using a hex editor or assembler according to their needs. While quite challenging compared to the relatively simple methods listed above, ''anything'' is possible with ASM hacking, usually within the limitations of the hardware and software of the gaming platform. This can range from altering enemy [[Game artificial intelligence|AI]] to changing how graphics are generated. If the developers used a [[Programming language#Typed versus untyped languages|typed language]], the hacker may be able to compile their code for the game in the same language if they have access to a proper compiler. One such example would be using [[C (programming language)|C]] to hack [[Nintendo 64]] games, since [[MIPS architecture|MIPS]]-[[GNU Compiler Collection|GCC]] can compile code for the Nintendo 64.<ref>{{cite web|url=https://code.google.com/p/vg64tools/source/browse/#svn/n64/z64actor/trunk |title=vg64tools - Project Hosting on Google Code |access-date=2009-09-09}}</ref><ref>{{cite web |url=http://sites.google.com/site/messiaen64/pong_of_death |title=Super Mario 64: Pong Of Death (messiaen) |access-date=2009-09-09 |archive-date=2011-10-10 |archive-url=https://web.archive.org/web/20111010104312/http://sites.google.com/site/messiaen64/pong_of_death |url-status=dead }}</ref>


===Music hacking===
===Music hacking===
Music hacks are relatively rare in most hacks, due to the wide variety of ways games store music data (hence the difficulty in locating and modifying this data) as well as the difficulties in composing new music (or porting music from another game). As music cracking is very uncommon, many hacks do not have any ported/composed music added in. Exceptions exist, however, such as the most recent ''[[Super Mario World]]'' hacks where custom music can have new instruments not found in the original game. Other games that have music hacking as part of their research and hacking communities are the NES ''[[Mega Man]]'' games, ''[[Final Fantasy VI]]'', and the Mega Drive (Genesis) ''[[Sonic the Hedgehog]]'' games.
A relatively uncommon method of ROM hacking is ''music hacking'', which is replacing music tracks (or sound effects) of a game with new ones (either as new compositions, arrangements, or direct ports from other games), or in some cases modifying the data of music tracks (and sound effects) directly via tools such as a hex editor. Music hacks are relatively rare, due to the wide variety of ways games store music data (hence the difficulty in locating and modifying this data) as well as the difficulties in composing new music (or porting music from another game). As music hacking is very uncommon, many hacks do not have any ported/composed music added in. Despite this, some hacks such as the most recent ''[[Super Mario World]]'' hacks for example utilize this approach to include custom-made music tracks, sometimes even having new instruments that are not found in the original game. Other games that have utilized music hacking as part of their research and hacking communities include the NES ''[[Mega Man]]'' games, ''[[Final Fantasy VI]]'', and the Mega Drive (Genesis) ''[[Sonic the Hedgehog]]'' games.


As many Game Boy Advance games use the M4A Engine (informally called "Sappy Driver" and officially known as "MusicPlayer2000" or MP2k) for music, the program SapTapper can be used to hack Game Boy Advance music data. Various other utilities were created to work with the engine such as [https://web.archive.org/web/20160306150654/http://www.pokemonhackersonline.com/showthread.php?t=120-Wataru-Kun-s-Ultimate-Pok-mon-Music-Hacking-Guide Sappy 2006]. Another instance of the same engine being used between games is on the Nintendo 64 where most games use the same format; albeit with different sound banks for each game. A utility known as the [https://github.com/jombo23/N64-Tools/tree/master/N64MidiTool N64 Midi Tool] was created to edit the sequences that the majority of Nintendo 64 games use, however it does not cover first-party N64 titles that use a slightly different engine such as ''[[Super Mario 64]]''.
As many Game Boy Advance games use the M4A Engine (informally called "Sappy Driver" and officially known as "MusicPlayer2000" or MP2k) for music, the program SapTapper can be used to hack Game Boy Advance music data. Various other utilities were created to work with the engine such as [https://web.archive.org/web/20160306150654/http://www.pokemonhackersonline.com/showthread.php?t=120-Wataru-Kun-s-Ultimate-Pok-mon-Music-Hacking-Guide Sappy 2006]. Another instance of the same engine being used between games is on the Nintendo 64 where most games use the same format; albeit with different sound banks for each game. A utility known as the [https://github.com/jombo23/N64-Tools/tree/master/N64MidiTool N64 Midi Tool] was created to edit the sequences that the majority of Nintendo 64 games use, however it does not cover first-party N64 titles that use a slightly different engine such as ''[[Super Mario 64]]''.


On the Sega Mega Drive (Genesis), several games made for the system had its music and sound effects created under a single sound engine commonly known as "SMPS" (also known as "Sound-Source" by some developers), which has been offered in both [[Motorola 68000|68000]] and [[Zilog Z80|Z80]]-based versions.<ref>{{cite web|url=https://vgmpf.com/Wiki/index.php?title=Mega_Drive/Genesis_Sound_Driver_List#Sega|title=Mega Drive/Genesis Sound Driver List|website=Video Game Music Preservation Foundation}}</ref><ref name="smps">{{cite web|url=http://segaretro.org/SMPS|title=SMPS|website=Sega Retro}}</ref> This sound engine, leveraging both the [[YM2612]] and [[SN76489]] sound chips of the console, was predominantly used in a wide variety of Japanese-developed games for the system (including Sega's first-party games),<ref name="smps" /> with some games providing modified versions of the sound engine tailored to a specific game. The SMPS engine has been researched for decades by many hackers,<ref>{{cite web|url=http://forums.sonicretro.org/index.php?showtopic=32473|title=Valley Bell's SMPS Research|website=Sonic and Sega Retro Message Board|date=December 31, 2013}}</ref> which led to the creation of various utilities<ref>{{cite web|url=http://info.sonicretro.org/Sonic_Hacking_Utilities#Sound_Editors|title=Sonic Hacking Utilities|website=Sonic Retro}}</ref> that can alter and create music (and sound effects) for games using the SMPS engine (most notably the ''Sonic the Hedgehog'' games in particular); many of the compositions and arrangements made under the SMPS engine had eventually made their way onto the [[Steam Workshop]].<ref name="steamworkshopsmd">{{cite web|url=http://steamcommunity.com/workshop/about/?appid=34270|title=Steam Workshop :: SEGA Mega Drive & Genesis Classics|website=steamcommunity.com}}</ref>
The Sega Mega Drive (Genesis) has a handful of games using a first-party sound engine commonly known as "SMPS" (also known as "Sound-Source" by some developers) for composing music and sound effects, which has been offered in both [[Motorola 68000|68000]] and [[Zilog Z80|Z80]]-based versions.<ref>{{cite web|url=https://vgmpf.com/Wiki/index.php?title=Mega_Drive/Genesis_Sound_Driver_List#Sega|title=Mega Drive/Genesis Sound Driver List|website=Video Game Music Preservation Foundation}}</ref><ref name="smps">{{cite web|url=http://segaretro.org/SMPS|title=SMPS|website=Sega Retro}}</ref> The sound engine, leveraging both the [[YM2612]] and [[SN76489]] sound chips of the console, was predominantly used in a wide variety of Japanese-developed games for the system (including Sega's first-party games),<ref name="smps" /> with some games providing modified versions of the sound engine tailored to a specific game. It has gained decades of research and [[reverse engineering]] by many hackers,<ref>{{cite web|url=http://forums.sonicretro.org/index.php?showtopic=32473|title=Valley Bell's SMPS Research|website=Sonic and Sega Retro Message Board|date=December 31, 2013}}</ref> which led to the creation of various utilities<ref>{{cite web|url=http://info.sonicretro.org/Sonic_Hacking_Utilities#Sound_Editors|title=Sonic Hacking Utilities|website=Sonic Retro}}</ref> that can alter and create music (and sound effects) for games using the SMPS engine (most notably the ''Sonic the Hedgehog'' games in particular); many of the compositions and arrangements made under the SMPS engine had eventually made their way onto the [[Steam Workshop]].<ref name="steamworkshopsmd">{{cite web|url=http://steamcommunity.com/workshop/about/?appid=34270|title=Steam Workshop :: SEGA Mega Drive & Genesis Classics|website=steamcommunity.com}}</ref>


===ROM expansion===
===ROM expansion===
 
Generally speaking, a ROM hacker cannot normally add content to a game, but change existing content. This can be overcome through a method known as ''ROM expansion'', whereby the total size of the ROM image is increased, making room for more content and, in turn, a larger game. The difficulty in doing this varies depending on the system for which the game was made. For example, expanding an NES ROM may be difficult or even impossible due to the [[Multi-Memory Controller|mapper]] used by the game. For example, if a mapper allows 16 ROM banks and all of them are used, expanding the ROM further is impossible without somehow converting the game to another mapper, which could be easy or extremely difficult. On the other hand, expanding an SNES game (and even a Mega Drive (Genesis) game for that matter) is (relatively) straightforward. To utilize the added space, parts of the game code have to be modified or rewritten (see [[#Assembly hacking|Assembly hacking]] above) so the game knows where to look. Another type of ROM expansion that is fairly easy to do is [[Game Boy Advance]] ROMs, which are generally small but the memory space available sometimes exceeds it by multiples of up to 17.
Generally speaking, a ROM hacker cannot normally '''add''' content to a game, but merely '''change''' existing content. This limit can be overcome through ''ROM expansion'', whereby the total size of the ROM image is increased, making room for more content and, in turn, a larger game. The difficulty in doing this varies depending on the system for which the game was made. For example, expanding an NES ROM may be difficult or even impossible due to the [[Multi-Memory Controller|mapper]] used by the game. For example, if a mapper allows 16 ROM banks and all of them are used, expanding the ROM further is impossible without somehow converting the game to another mapper, which could be easy or extremely difficult. On the other hand, expanding an SNES game (and even a Mega Drive (Genesis) game for that matter) is (relatively) straightforward. To utilize the added space, parts of the game code have to be modified or rewritten (see [[#Assembly hacking|Assembly hacking]] above) so the game knows where to look. Another type of ''ROM expansion'' that is fairly easy is [[Game Boy Advance]] ROMs. The ROMs themselves are generally small, but the memory space available sometimes exceeds it by multiples of up to 17.


==Distribution==
==Distribution==
 
Once a hack is completed (or an incomplete version is deemed suitable for an interim release) it is released onto the Internet for others to play. The generally accepted way to do this is by making an [[unofficial patch]] (in IPS format or others) that can be applied to the unmodified ROM.<ref name="dictionary"/> This, and usually some form of documentation, is put in an archive file and uploaded somewhere. IPS is a format for [[File comparison|recording the differences]] between two binary files (in this case, between the unmodified and hacked ROMs) and is suitable for ROM hacks.<ref>{{cite web |title=Pokemon Rom Hacks |url=https://www.inversegamer.com/best-pokemon-rom-hacks |website=InverseGamer.com |date=20 September 2020 |access-date=31 March 2021}}</ref> IPS is still used today for small patches—however, as ROMs became larger in size, this format fell out of use, leading to a few file formats being created such as NINJA and PPF (also known as "[[PlayStation]] Patch Format"). PPF is still used today to patch large files such as [[ISO image]]s (including [[CD-ROM]] images) as well as [[Nintendo 64]] games. A new patch format, UPS, has also been developed by the ROM hacking community, designed to be the successor to IPS and PPF.<ref>{{cite web|url=http://www.romhacking.net/forum/index.php/topic,6059.0.html|title=New patching format, UPS, debuts today|website=www.romhacking.net|date=27 September 2023 }}</ref>
Once a hack is completed (or an incomplete version is deemed suitable for an interim release) it is released onto the Internet for others to play. The generally accepted way to do this is by making an [[unofficial patch]] (in IPS format or others) that can be applied to the unmodified ROM.<ref name="dictionary"/> This, and usually some form of documentation, is put in an archive file and uploaded somewhere. IPS is a format for [[File comparison|recording the differences]] between two binary files (in this case, between the unmodified and hacked ROMs) and is suitable for ROM hacks.<ref>{{cite web |title=Pokemon Rom Hacks |url=https://www.inversegamer.com/best-pokemon-rom-hacks |website=InverseGamer.com |date=20 September 2020 |access-date=31 March 2021}}</ref> IPS is still used today for small patches—however, as ROMs became larger, this format became useless, leading to quite a few file formats being created—such as NINJA and PPF (also known as "[[PlayStation]] Patch Format"). PPF is still used today, particularly to patch large files such as ISO [[CD-ROM]] images as well as [[Nintendo 64]] games. A new patch format, UPS, has also been developed by the ROM hacking community, designed to be the successor to IPS and PPF.<ref>{{cite web|url=http://www.romhacking.net/forum/index.php/topic,6059.0.html|title=New patching format, UPS, debuts today|website=www.romhacking.net|date=27 September 2023 }}</ref>
A more recent patching format, the APS patching system, has also been developed by a devoted Game Boy Advance ROM hacker.<ref>{{cite web|url=http://www.pokecommunity.com/member.php?u=28656|title=The PokéCommunity Forums - View Profile: HackMew|website=www.pokecommunity.com|date=27 June 2006 }}</ref> Compared to other patching formats, the APS system is more space efficient, is reversible, and is faster than its predecessor.<ref>{{cite web|url=http://www.pokecommunity.com/showpost.php?p=2488977&postcount=1&highlight#A-Ptch|title= Newest patching format, APS, recently released|website=www.pokecommunity.com|date= 20 May 2007}}</ref>
A more recent patching format, the APS patching system, has also been developed by a devoted Game Boy Advance ROM hacker.<ref>{{cite web|url=http://www.pokecommunity.com/member.php?u=28656|title=The PokéCommunity Forums - View Profile: HackMew|website=www.pokecommunity.com|date=27 June 2006 }}</ref> Compared to other patching formats, the APS system is more space efficient, is reversible, and is faster than its predecessor.<ref>{{cite web|url=http://www.pokecommunity.com/showpost.php?p=2488977&postcount=1&highlight#A-Ptch|title= Newest patching format, APS, recently released|website=www.pokecommunity.com|date= 20 May 2007}}</ref>


The main purpose of distributing a hack in patch form is to avoid the legal aspects of distributing entire ROM images; the patch records only what has ''changed'' in the ROM, hence distributing it does not usually distribute parts of the original game. {{Citation needed span|date=September 2024|reason=A claim of legality without source|This practice would have also potentially eliminated any copyright issues that may occur with distributing unofficial patches for the ROMs themselves.}} A patch is also normally drastically smaller than a full ROM image (an NES ROM can run anywhere from 8&nbsp;KB to 2&nbsp;MB; a Super NES ROM can run from 256&nbsp;KB to 6&nbsp;MB; and Mega Drive (Genesis) ROMs can run from 512&nbsp;KB to 4&nbsp;MB).
The main purpose of distributing a hack in patch form is to avoid the legal aspects of distributing entire ROM images; the patch records only what has ''changed'' in the ROM, hence distributing it does not usually distribute parts of the original game. {{Citation needed span|date=September 2024|reason=A claim of legality without source|This practice would have potentially eliminated any copyright issues that may occur when distributing unofficial patches for the ROMs themselves.}} A patch is also normally drastically smaller than a full ROM image (an NES ROM can run anywhere from 8&nbsp;KB to 2&nbsp;MB; a Super NES ROM can run from 256&nbsp;KB to 6&nbsp;MB; and Mega Drive (Genesis) ROMs can run from 512&nbsp;KB to 4&nbsp;MB).


In a novel example of legal distribution, Sega released a [[Steam (service)|Steam]]-based virtual hub for its previous collection of Mega Drive (Genesis) games, entitled ''[[Sega Mega Drive Classic Collection#Sega Mega Drive Classics Hub|Sega Mega Drive Classics Hub]]''. The ''Hub'', besides allowing players to play emulated versions of these older games, takes advantage of Steam's support for user-created content through the Steam Workshop, officially allowing the distribution of ROM hacks of any of the offered games.<ref>{{cite web | url = http://www.eurogamer.net/articles/2016-04-29-modders-are-already-having-fun-with-sega-mega-drive-classics-on-steam | title = Modders are already having fun with Sega Mega Drive classics on Steam | first = Wesley | last = Yin-Poole | date = April 29, 2016 | access-date = May 3, 2016 | work = [[Eurogamer]] }}</ref><ref name="steamworkshopsmd" />
In a novel example of legal distribution, Sega released a [[Steam (service)|Steam]]-based virtual hub for its previous collection of Mega Drive (Genesis) games, entitled ''[[Sega Mega Drive Classic Collection#Sega Mega Drive Classics Hub|Sega Mega Drive Classics Hub]]''. The ''Hub'', besides allowing players to play emulated versions of these older games, takes advantage of Steam's support for user-created content through the Steam Workshop, officially allowing the distribution of ROM hacks of any of the offered games.<ref>{{cite web | url = http://www.eurogamer.net/articles/2016-04-29-modders-are-already-having-fun-with-sega-mega-drive-classics-on-steam | title = Modders are already having fun with Sega Mega Drive classics on Steam | first = Wesley | last = Yin-Poole | date = April 29, 2016 | access-date = May 3, 2016 | work = [[Eurogamer]] }}</ref><ref name="steamworkshopsmd" />


==Usage==
==Usage==
Patched ROMs are often played on emulators, however, it is possible to play patched ROMs on the original hardware.<ref>{{cite web|url=http://callanbrown.com/index.php?option=com_content&view=article&id=59:basic-nes-reproduction-moai-kun&catid=36:home-console-projects&Itemid=61|title=Basic NES Reproduction}}</ref> The destination cartridge could be the original cartridge from which the initial unpatched ROM was pulled (which usually involves replacing the original ROM chip with a new one), or another compatible cartridge of the same type, such as flash cartridges. This is particularly popular for [[Fan translation (video gaming)|fan translations]], [[Homebrew (video games)|homebrew games]], prototypes, games for which ROM cartridges were never produced, or for games that require exact timing or other elements of the original hardware that are not available in emulators.
Patched ROMs are often played on emulators, however, it is possible to play patched ROMs on the original hardware.<ref>{{cite web|url=http://callanbrown.com/index.php?option=com_content&view=article&id=59:basic-nes-reproduction-moai-kun&catid=36:home-console-projects&Itemid=61|title=Basic NES Reproduction}}</ref> The destination [[ROM cartridge|cartridge]] could be the original cartridge from which the initial unpatched ROM was pulled (which usually involves replacing the original ROM chip with a new one), or another compatible cartridge of the same type, such as flash cartridges. In the case of optical media, this involves [[Optical disc authoring|burning]] the patched game onto a recordable optical disc such as a [[CD-R]]. This is particularly popular for [[Fan translation (video gaming)|fan translations]], [[Homebrew (video games)|homebrew games]], prototypes, games for which ROM cartridges or optical discs were never produced, or for games that require exact timing or other elements of the original hardware that are not available in emulators.


==Systems and games==
==Systems and games==
The majority of ROM hacking is done on [[Nintendo Entertainment System|NES]] and [[Super Nintendo Entertainment System|SNES]] games (including [[Sega Genesis|Sega Mega Drive (Genesis)]] games to an extent), since such games are small and simple compared to games of more advanced consoles such as the [[Nintendo 64]] or [[Nintendo DS]]. Games for the [[Game Boy]], [[Game Boy Color]] and [[Game Boy Advance]] are also popular for hacking, as well as games for the [[PlayStation (console)|PlayStation]] to a lesser extent. However, games intended for more recent consoles are not exempt from hacking, and as computers have become faster over time and more programs and utilities have been written, more PlayStation, Nintendo 64 and Nintendo DS hacks have emerged.
The majority of ROM hacking is done on [[Nintendo Entertainment System|NES]] and [[Super Nintendo Entertainment System|SNES]] games, since such games are small and simple compared to games of more advanced consoles such as the [[Nintendo 64]] or [[Nintendo DS]]. Games for the [[Game Boy]], [[Game Boy Color]] and [[Game Boy Advance]] are also popular for hacking, as well as games for the [[PlayStation (console)|PlayStation]] and the [[Sega Genesis|Sega Mega Drive (Genesis)]] to a lesser extent. However, games intended for more recent consoles are not exempt from hacking, and as computers have become faster over time and more programs and utilities have been written, more PlayStation, Sega Mega Drive (Genesis), Nintendo 64 and Nintendo DS hacks have emerged.


<!-- This paragraph isn't here to list every single game that has been hacked, just the most commonly hacked ones. -->
<!-- This paragraph isn't here to list every single game that has been hacked, just the most commonly hacked ones. -->
Line 86: Line 76:
A notable hacked arcade game was ''[[Street Fighter II: Rainbow Edition]]'', which featured increased game speed and new special moves. The success of this game prompted Capcom to release ''[[Street Fighter II: Hyper Fighting]]'' as an official response.
A notable hacked arcade game was ''[[Street Fighter II: Rainbow Edition]]'', which featured increased game speed and new special moves. The success of this game prompted Capcom to release ''[[Street Fighter II: Hyper Fighting]]'' as an official response.


''[[Your Sinclair]]'' magazine published a monthly column called "Program Pitstop". This focused mainly on [[Cheating in video games|cheat]] hacks for games, but also featured both a level map printer<ref>{{cite web|url=http://www.worldofspectrum.org/showmag.cgi?mag=YourSinclair/Issue20/Pages/YourSinclair2000054.jpg|title=World of Spectrum - Forced Redirect|website=www.worldofspectrum.org}}</ref> for the original ''[[Gauntlet (1985 video game)|Gauntlet]]'', as well as a full level editor<ref>{{cite web|url=http://www.worldofspectrum.org/showmag.cgi?mag=YourSinclair/Issue31/Pages/YourSinclair3100093.jpg|title=World of Spectrum - Forced Redirect|website=www.worldofspectrum.org}}</ref> for the same game.
''[[Your Sinclair]]'' magazine published a monthly column called "Program Pitstop". This focused mainly on [[Cheating in video games|cheat]] hacks for games, but also featured a level map printer<ref>{{cite web|url=http://www.worldofspectrum.org/showmag.cgi?mag=YourSinclair/Issue20/Pages/YourSinclair2000054.jpg|title=World of Spectrum - Forced Redirect|website=www.worldofspectrum.org}}</ref> for the original ''[[Gauntlet (1985 video game)|Gauntlet]]'', as well as a full level editor<ref>{{cite web|url=http://www.worldofspectrum.org/showmag.cgi?mag=YourSinclair/Issue31/Pages/YourSinclair3100093.jpg|title=World of Spectrum - Forced Redirect|website=www.worldofspectrum.org}}</ref> for the same game.


==See also==
==See also==
Line 98: Line 88:
* [[Video game modding]]
* [[Video game modding]]
* [[Undubbing]]
* [[Undubbing]]
* [[Kaizo]]
* [[Twin Eagles Group]]
* [[Twin Eagles Group]]


Line 116: Line 107:
{{Firmware and booting}}
{{Firmware and booting}}


[[Category:Emulation terminology]]
[[Category:Video game modding]]
[[Category:Video game modding]]
[[Category:Hacker culture]]
[[Category:Hacker culture]]

Latest revision as of 00:00, 23 December 2025

Template:Short description Script error: No such module "about".

ROM hacking is the process of modifying a ROM image or ROM file to change or alter the contents contained within, usually of a video game to alter the game's graphics, dialogue, levels, gameplay, or other elements.

ROM hacking is usually done by technically inclined video game fans, often created as a fun way of playing the original games by redesigning the old game with new graphics, levels, items, mechanics and other features while keeping the core gameplay the same, in effect creating either an improved or an entirely different version of the original game. In general, they are typically done to improve an old game of importance, as a creative outlet, or to essentially make new (unofficial) games using the old game's engine.

ROM hacking is generally accomplished through use of a hex editor (a program for editing non-textual data) and various specialized tools such as tile editors, and game-specific tools which are generally used for editing levels, items, and the like, although more advanced tools such as assemblers and debuggers are occasionally used. Once ready, they are usually distributed on the Internet for others to play on an emulator or a games console.[1]

Fan translation (known as "translation hacking" within the ROM hacking community) is another type of ROM hacking; there are also anti-censorship hacks that exist to restore a game to its original state, which is often seen with older games that were imported, as publishers' content policies for video games (most notably, Nintendo's) were much stricter in the United States than in Japan or Europe; randomizers are also available for certain games, which are designed to shuffle entity placements from within the games;[2] some hacks are also created to unlock or reimplement features that exist in the game's code but are not used in-game, especially when rediscovering and restoring old beta content that was hidden away from the game's final release. Although much of the method applies to both types of hacking, this article focuses on "creative hacking" such as editing game levels.

Communities

Most hacking groups offer web space for hosting hacks and screenshots (sometimes only hosting hacks by the group's members and hosting almost any hack), a message board, and often have an IRC channel. Several hacking groups and individuals have also created guides for beginners to get into grips with ROM hacking for the first time, such as the Rom Hacking Bible for the NES that was written in the mid-to-late 1990s,[3] as well as guides designed for those who wanted to learn how to add or change things from start to finish.

There are many sites on the internet dedicated to world of ROM hacking, with each of them focusing on several hacks and translations of games across multiple series, franchises and platforms. One of the most popular sites dedicated to ROM hacking of video games was Script error: No such module "anchor".ROMhacking.net, which first went online in late 2005. From its inception up until 2024, it served as a hub related to all things ROM hacking, hosting a repository of hacks, translations, utilities, documents, and patches for many well-known and obscure video games from the third generation up to the seventh generation. ROMhacking.com was the immediate predecessor of ROMhacking.net, which launched five years earlier in 2000 as "The Whirlpool" and was briefly renamed as ROMhacking.org between 2001 and 2002 before returning to its original name afterwards and then went offline in late 2004.[4][5]

since 1 August 2024Template:Dated maintenance category (articles)Script error: No such module "Check for unknown parameters"., ROMhacking.net has been relegated into being a read-only news site for ROM hacking projects after transitioning into the new format on that day after nearly 20 years of hosting on the site due to various reasons beyond the site's control; its former database and files have been archived on the Internet Archive on the same day of the announcement. New submissions were also permanently closed on the same day as well, and all downloads on the site will remain available for as long as the site maintainers can handle.[6][7][8][9] The spiritual successor to ROMhacking.net, Script error: No such module "anchor".Romhack.ing (RHDI), was launched as an alpha release on 15 August 2024, two weeks after ROMhacking.net transitioned into the read-only format, and then opened for public registration on 1 March 2025.

Methods

Having been created by many different programmers or programming teams, ROM data can be very diverse.

Hex editing

File:ImHex screenshot.png
ImHex, a modern hex editor, visualizing file structures and data entropy. Such tools are used in ROM hacking to identify and modify specific data patterns within a game's binary code.

One of the most basic skills of ROM hacking is hex editing, which refers to directly modifying the hexadecimal data of a video game using a hex editor. A hex editor is one of the most fundamental tools in any ROM hacker's repertoire, and is typically used for editing text, editing other data for which the structure is known (for example, item properties), and assembly hacking.

Editing text is one of the most basic forms of hacking. Many games do not store their text in ASCII form, and because of this, some specialized hex editors have been developed to tell what byte values correspond to the letters of the alphabet to facilitate text editing; a file that defines these byte=letter relationships is called a "table" file. Other games use simple text compression techniques (such as byte pair encoding, also called dual tile encoding or DTE, in which certain combinations of two or more letters are encoded as one byte) which a suitably equipped hex editor can facilitate editing.

A hex editor is the tool of choice for editing things such as character/item properties if the structure and location of this data are known and there is no game-specific editor for the game that can edit this information. Some intrepid hackers also perform level editing with a hex editor, but this is extremely difficult (except on games whose level storage format closely resembles how it is presented in a hex editor).

Graphics editing

Another basic hacking skill is graphics hacking, which is changing the appearance of the game's environments, characters, fonts, or other such things. The format of graphics data varies from console to console, but most of the early ones (NES, Super NES, Game Boy, etc.) store graphics in tiles, which are 8x8-pixel units of data, which are arranged on-screen to produce the desired result. Editing these tiles is also possible with a hex editor, but is generally accomplished with a tile editor (such as Tile Layer or Tile Molester), which can graphically display the ROM data, as well as finding and editing tiles.

Graphics hacks can range from simple edits (such as giving Mario an afro or Luigi a golf club) to "porting" characters from one game to another (such as creating pixelated ("retro-styled") sprites of later generation Pokémon for use with Generation I-V Pokémon games[10]), to full-blown thematic changes (usually with accompanying palette changes; see below).

More sophisticated graphics hacking involves changing more than just tiles and colors, but also on how the tiles are arranged, or tile groups generated, giving more flexibility and control over the final appearance. This is accomplished through hex editing or a specialized tool (either for a specific game or a specific system). An example of this approach was the incomplete Pokémon Torzach, a Pokémon FireRed hack that attempts to add a whole new generation of Pokémon and tiles to the game. Though the hack has long since been discontinued, it was able to achieve some desirable results with the tools that were currently available at the time.[11] Super Mario Land 2 DX: 6 Golden Coins is another example, which is an enhanced version of the original game that notably added full-color support to the game (the original game was only in greyscale) as well as some quality-of-life improvements such as fixes with screen flickering issues from the original game.[12]

Palette editing

Another common form of hacking is palette hacking, where color values are modified to change the colors a player sees in the game (this often goes hand-in-hand with graphics hacking); Palette values are commonly stored in Hex. This is fairly easy for NES games, the graphics of which use a pre-defined set of colors among which a game selects (using a YIQ-based color palette); palette hacking in this case entails changing which of those colors are selected. The matter is slightly more complicated with Super NES games as well as games for other systems (including Sega Mega Drive (Genesis) games), which store absolute RGB color values. Palette editors are usually simple and often are with level editors or game-specific graphics editors.

Level editing

One of the most popular forms of ROM hacking, level editing entails modifying or redesigning a game's levels or maps. This is almost exclusively done with an editor specially tailored for a particular game (called a level editor). Level edits can be done to make the game more challenging, to alter the flow of the game's plot, or just to give something new to an old game. Combined with extensive graphics hacking, the game can take on a very different look and feel.

Data editing

A core component of many hacks (especially of role-playing video games) is editing data such as character, item, and enemy properties. This is usually done either "by hand" (with a hex editor) if the location and structure of the data is known, or with a game-specific editor that has this functionality. Through this, a hacker can alter how weapons work, how strong enemies are or how they act, etc. This can be done to make the game easier or harder or to create new scenarios for the player to face.

Assembly hacking

The most powerful, and arguably the most difficult, hacking technique is editing the game's actual code, a process called assembly hacking or ASM hacking ("ASM" is short for "assembly", referring to the low-level programming language that gets executed by the CPU).[1] There is no set pattern for assembly hacking, as the code varies widely from game to game, but most skilled assembly hackers either use an emulator equipped with a built-in debugger or tracer, or run the ROM through a disassembler, then analyze the code and modify it using a hex editor or assembler according to their needs. While quite challenging compared to the relatively simple methods listed above, "anything" is possible with assembly hacking, usually within the limitations of the hardware and software of the gaming platform. This can range from altering enemy AI to changing how graphics are generated. If the developers used a typed language, a hacker may be able to compile their code for the game in the same language if they have access to a proper compiler. One such example would be using C to hack Nintendo 64 games, since MIPS-GCC can compile code for the Nintendo 64.[13][14]

Music hacking

A relatively uncommon method of ROM hacking is music hacking, which is replacing music tracks (or sound effects) of a game with new ones (either as new compositions, arrangements, or direct ports from other games), or in some cases modifying the data of music tracks (and sound effects) directly via tools such as a hex editor. Music hacks are relatively rare, due to the wide variety of ways games store music data (hence the difficulty in locating and modifying this data) as well as the difficulties in composing new music (or porting music from another game). As music hacking is very uncommon, many hacks do not have any ported/composed music added in. Despite this, some hacks such as the most recent Super Mario World hacks for example utilize this approach to include custom-made music tracks, sometimes even having new instruments that are not found in the original game. Other games that have utilized music hacking as part of their research and hacking communities include the NES Mega Man games, Final Fantasy VI, and the Mega Drive (Genesis) Sonic the Hedgehog games.

As many Game Boy Advance games use the M4A Engine (informally called "Sappy Driver" and officially known as "MusicPlayer2000" or MP2k) for music, the program SapTapper can be used to hack Game Boy Advance music data. Various other utilities were created to work with the engine such as Sappy 2006. Another instance of the same engine being used between games is on the Nintendo 64 where most games use the same format; albeit with different sound banks for each game. A utility known as the N64 Midi Tool was created to edit the sequences that the majority of Nintendo 64 games use, however it does not cover first-party N64 titles that use a slightly different engine such as Super Mario 64.

The Sega Mega Drive (Genesis) has a handful of games using a first-party sound engine commonly known as "SMPS" (also known as "Sound-Source" by some developers) for composing music and sound effects, which has been offered in both 68000 and Z80-based versions.[15][16] The sound engine, leveraging both the YM2612 and SN76489 sound chips of the console, was predominantly used in a wide variety of Japanese-developed games for the system (including Sega's first-party games),[16] with some games providing modified versions of the sound engine tailored to a specific game. It has gained decades of research and reverse engineering by many hackers,[17] which led to the creation of various utilities[18] that can alter and create music (and sound effects) for games using the SMPS engine (most notably the Sonic the Hedgehog games in particular); many of the compositions and arrangements made under the SMPS engine had eventually made their way onto the Steam Workshop.[19]

ROM expansion

Generally speaking, a ROM hacker cannot normally add content to a game, but change existing content. This can be overcome through a method known as ROM expansion, whereby the total size of the ROM image is increased, making room for more content and, in turn, a larger game. The difficulty in doing this varies depending on the system for which the game was made. For example, expanding an NES ROM may be difficult or even impossible due to the mapper used by the game. For example, if a mapper allows 16 ROM banks and all of them are used, expanding the ROM further is impossible without somehow converting the game to another mapper, which could be easy or extremely difficult. On the other hand, expanding an SNES game (and even a Mega Drive (Genesis) game for that matter) is (relatively) straightforward. To utilize the added space, parts of the game code have to be modified or rewritten (see Assembly hacking above) so the game knows where to look. Another type of ROM expansion that is fairly easy to do is Game Boy Advance ROMs, which are generally small but the memory space available sometimes exceeds it by multiples of up to 17.

Distribution

Once a hack is completed (or an incomplete version is deemed suitable for an interim release) it is released onto the Internet for others to play. The generally accepted way to do this is by making an unofficial patch (in IPS format or others) that can be applied to the unmodified ROM.[1] This, and usually some form of documentation, is put in an archive file and uploaded somewhere. IPS is a format for recording the differences between two binary files (in this case, between the unmodified and hacked ROMs) and is suitable for ROM hacks.[20] IPS is still used today for small patches—however, as ROMs became larger in size, this format fell out of use, leading to a few file formats being created such as NINJA and PPF (also known as "PlayStation Patch Format"). PPF is still used today to patch large files such as ISO images (including CD-ROM images) as well as Nintendo 64 games. A new patch format, UPS, has also been developed by the ROM hacking community, designed to be the successor to IPS and PPF.[21] A more recent patching format, the APS patching system, has also been developed by a devoted Game Boy Advance ROM hacker.[22] Compared to other patching formats, the APS system is more space efficient, is reversible, and is faster than its predecessor.[23]

The main purpose of distributing a hack in patch form is to avoid the legal aspects of distributing entire ROM images; the patch records only what has changed in the ROM, hence distributing it does not usually distribute parts of the original game. Template:Citation needed span A patch is also normally drastically smaller than a full ROM image (an NES ROM can run anywhere from 8 KB to 2 MB; a Super NES ROM can run from 256 KB to 6 MB; and Mega Drive (Genesis) ROMs can run from 512 KB to 4 MB).

In a novel example of legal distribution, Sega released a Steam-based virtual hub for its previous collection of Mega Drive (Genesis) games, entitled Sega Mega Drive Classics Hub. The Hub, besides allowing players to play emulated versions of these older games, takes advantage of Steam's support for user-created content through the Steam Workshop, officially allowing the distribution of ROM hacks of any of the offered games.[24][19]

Usage

Patched ROMs are often played on emulators, however, it is possible to play patched ROMs on the original hardware.[25] The destination cartridge could be the original cartridge from which the initial unpatched ROM was pulled (which usually involves replacing the original ROM chip with a new one), or another compatible cartridge of the same type, such as flash cartridges. In the case of optical media, this involves burning the patched game onto a recordable optical disc such as a CD-R. This is particularly popular for fan translations, homebrew games, prototypes, games for which ROM cartridges or optical discs were never produced, or for games that require exact timing or other elements of the original hardware that are not available in emulators.

Systems and games

The majority of ROM hacking is done on NES and SNES games, since such games are small and simple compared to games of more advanced consoles such as the Nintendo 64 or Nintendo DS. Games for the Game Boy, Game Boy Color and Game Boy Advance are also popular for hacking, as well as games for the PlayStation and the Sega Mega Drive (Genesis) to a lesser extent. However, games intended for more recent consoles are not exempt from hacking, and as computers have become faster over time and more programs and utilities have been written, more PlayStation, Sega Mega Drive (Genesis), Nintendo 64 and Nintendo DS hacks have emerged.

Of these, popular games to play are popular games to hack; many hacks have been released of games of the Sonic the Hedgehog series, Mario series, Mario Kart series, Pokémon series, Chip's Challenge, Castlevania, Final Fantasy, The Legend of Zelda, Mega Man series, Fire Emblem series, EarthBound, Super Metroid, and many others.

A notable hacked arcade game was Street Fighter II: Rainbow Edition, which featured increased game speed and new special moves. The success of this game prompted Capcom to release Street Fighter II: Hyper Fighting as an official response.

Your Sinclair magazine published a monthly column called "Program Pitstop". This focused mainly on cheat hacks for games, but also featured a level map printer[26] for the original Gauntlet, as well as a full level editor[27] for the same game.

See also

References

<templatestyles src="Reflist/styles.css" />

  1. a b c Script error: No such module "citation/CS1".
  2. Script error: No such module "citation/CS1".
  3. Script error: No such module "citation/CS1".
  4. Script error: No such module "citation/CS1".
  5. Script error: No such module "citation/CS1".
  6. Script error: No such module "citation/CS1".
  7. Script error: No such module "citation/CS1".
  8. Script error: No such module "citation/CS1".
  9. Script error: No such module "citation/CS1".
  10. Script error: No such module "citation/CS1".
  11. Script error: No such module "citation/CS1".
  12. Script error: No such module "citation/CS1".
  13. Script error: No such module "citation/CS1".
  14. Script error: No such module "citation/CS1".
  15. Script error: No such module "citation/CS1".
  16. a b Script error: No such module "citation/CS1".
  17. Script error: No such module "citation/CS1".
  18. Script error: No such module "citation/CS1".
  19. a b Script error: No such module "citation/CS1".
  20. Script error: No such module "citation/CS1".
  21. Script error: No such module "citation/CS1".
  22. Script error: No such module "citation/CS1".
  23. Script error: No such module "citation/CS1".
  24. Script error: No such module "citation/CS1".
  25. Script error: No such module "citation/CS1".
  26. Script error: No such module "citation/CS1".
  27. Script error: No such module "citation/CS1".

Script error: No such module "Check for unknown parameters". <templatestyles src="Refbegin/styles.css" />

  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".

Template:Firmware and booting