ROM hacking
Encyclopedia
ROM hacking is the process of modifying a video game ROM image
ROM image
A ROM image, or ROM file, is a computer file which contains a copy of the data from a read-only memory chip, often from a video game cartridge, a computer's firmware, or from an arcade game's main board...

 to alter the game's graphics, dialogue, levels, gameplay, or other elements. This is usually done by technically inclined video game fans to breathe new life into a cherished old game, as a creative outlet, or to make essentially new unofficial games using the old game's engine.

ROM hacking is generally accomplished through use of a hex editor
Hex editor
A hex editor is a type of computer program that allows a user to manipulate the fundamental binary data that makes up computer files. Note that computer files can be very small to very large...

 (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
Assembly language
An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices. It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture...

 and debugger
Debugger
A debugger or debugging tool is a computer program that is used to test and debug other programs . The code to be examined might alternatively be running on an instruction set simulator , a technique that allows great power in its ability to halt when specific conditions are encountered but which...

s are occasionally used. Once ready, they are usually distributed on the Internet
Internet
The Internet is a global system of interconnected computer networks that use the standard Internet protocol suite to serve billions of users worldwide...

 for others to play on an emulator.

Fan translation
Fan translation
A fan translation, in video gaming, refers to an unofficial translation of a computer game or video game.The fan translation practice grew with the rise of video game console emulation in the late 1990s. A community of people developed that were interested in replaying and modifying the games they...

 (known as "translation hacking" within the ROM hacking community) is a 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
Nintendo
is a multinational corporation located in Kyoto, Japan. Founded on September 23, 1889 by Fusajiro Yamauchi, it produced handmade hanafuda cards. By 1963, the company had tried several small niche businesses, such as a cab company and a love hotel....

's) were much stricter in the United States than Japan or Europe. Although much of the methodology applies to both types of hacking, this article focuses on "creative hacking" such as editing game levels.

Communities

Many ROM hackers form or join groups for various reasons, such as for web space to host hacks and/or screenshots, for the support of or collaboration with other members of the group, for privileged status on the group's message board (if it has one), for the prestige associated with the group, or just for the comradeship. Many hackers, however, choose to go solo. Not all group members are necessarily ROM hackers themselves; some have "retired" from the craft, others offer services such as website and/or message board administration, and some simply offer guidance to aspiring ROM hackers.

Most hacking groups offer web space for hosting hacks and screenshots (sometimes only hosting hacks by the group's members, sometimes hosting almost any hack), a message board, and often have an IRC
Internet Relay Chat
Internet Relay Chat is a protocol for real-time Internet text messaging or synchronous conferencing. It is mainly designed for group communication in discussion forums, called channels, but also allows one-to-one communication via private message as well as chat and data transfer, including file...

 channel.

Methodology

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

Hex editing

A hex editor
Hex editor
A hex editor is a type of computer program that allows a user to manipulate the fundamental binary data that makes up computer files. Note that computer files can be very small to very large...

 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.

Editing text is one of the most basic forms of hacking. Many games do not store their text in ASCII
ASCII
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

 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
Byte pair encoding
Byte pair encoding or digram coding is a simple form of data compression in which the most common pair of consecutive bytes of data is replaced with a byte that does not occur within that data. A table of the replacements is required to rebuild the original data...

, 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 is 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 environs, 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
Tile-based game
A tile-based game is a game that uses tiles as one of the fundamental elements of play. Traditional tile-based games use small tiles as playing pieces for gambling or entertainment games...

, which are 8x8-pixel
Pixel
In digital imaging, a pixel, or pel, is a single point in a raster image, or the smallest addressable screen element in a display device; it is the smallest unit of picture that can be represented or controlled....

 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 display the ROM data in a graphical way, as well as editing tiles.

Graphics hacks can range from simple edits (such as giving Mario
Mario
is a fictional character in his video game series, created by Japanese video game designer Shigeru Miyamoto. Serving as Nintendo's mascot and the main protagonist of the series, Mario has appeared in over 200 video games since his creation...

 an afro
Afro
Afro, sometimes shortened to fro and also known as a "natural", is a hairstyle worn naturally by people with lengthy kinky hair texture or specifically styled in such a fashion by individuals with naturally curly or straight hair...

) to "porting" characters from one game to another, 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 the way in which 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 the specific game or a specific system). A good example of a graphics hack is the uncompleted Pokémon Torzach, a hack which attempted to add a whole new generation of Pokémon and tiles to the game. The hack has since been discontinued, but it still serves as a good example on what can be achieved with the tools available.

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
Hexadecimal
In mathematics and computer science, hexadecimal is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F to represent values ten to fifteen...

. This is fairly easy for NES
Nintendo Entertainment System
The Nintendo Entertainment System is an 8-bit video game console that was released by Nintendo in North America during 1985, in Europe during 1986 and Australia in 1987...

 games, the graphics of which use a pre-defined set of colors among which a game selects; palette hacking in this case entails changing which of those colors are selected. The matter is slightly more complicated with Super NES
Super Nintendo Entertainment System
The Super Nintendo Entertainment System is a 16-bit video game console that was released by Nintendo in North America, Europe, Australasia , and South America between 1990 and 1993. In Japan and Southeast Asia, the system is called the , or SFC for short...

 games and games for other systems, 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 editor
A level editor is a software tool used to design levels, maps, campaigns, etc and virtual worlds for a video game. In some cases the creator of a video game releases an official level editor for a game, but other times the community of fans step in to fill the void...

). 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 RPGs) 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 ASM hacking ("ASM" means "assembly
Assembly language
An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices. It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture...

", referring to the type of programming language used for early console games). 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 emulator equipped with a built-in debugger or tracer, or run the ROM through a disassembler
Disassembler
A disassembler is a computer program that translates machine language into assembly language—the inverse operation to that of an assembler. A disassembler differs from a decompiler, which targets a high-level language rather than an assembly language...

, 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 (of course, within the limits of the hardware/software of the gaming platform), ranging from altering enemy AI
Game artificial intelligence
Game artificial intelligence refers to techniques used in computer and video games to produce the illusion of intelligence in the behavior of non-player characters . The techniques used typically draw upon existing methods from the field of artificial intelligence...

 to changing how graphics are generated. (Of course, the possibilities are still limited by the hacker's ability to comprehend and modify the existing code.)

If the developers used a typed language, the hacker may be able to compile their own 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
Nintendo 64
The , often referred to as N64, was Nintendo′s third home video game console for the international market. Named for its 64-bit CPU, it was released in June 1996 in Japan, September 1996 in North America, March 1997 in Europe and Australia, September 1997 in France and December 1997 in Brazil...

 games, since MIPS
MIPS
MIPS may refer to:* Maharana Institute of Professional Studies, an institution in Kanpur, Uttar Pradesh, India* Mansehra International Public School and College, in Mansehra, Pakistan* Material input per unit of service, an economic efficiency indicator...

-GCC
GNU Compiler Collection
The GNU Compiler Collection is a compiler system produced by the GNU Project supporting various programming languages. GCC is a key component of the GNU toolchain...

 can compile code for the Nintendo 64.

Music hacking

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) and 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. The program SapTapper can be used to hack Gameboy Advance music data, however, as many Gameboy Advance games use the M4A Engine (also called "Sappy Driver") for music.

The most common form of hacking music is porting music from one ROM file to another, usually both made by the same company. Porting music from two files will almost always pose some type of problem, as the format is almost always different. A good example of music hacking would be the uncompleted hacked game Pokémon: The Legendary Ashes.

ROM expansion

Generally speaking, a ROM hacker cannot 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 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
Multi-Memory Controller
Multi-Memory Controllers or Memory Management Controllers are different kinds of special chips designed by various video game developers for use in Nintendo Entertainment System cartridges...

 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 a Super NES game is (relatively) straightforward. To utilize the added space, parts of the game code have to be modified or re-written (see Assembly hacking above) so the game knows where to look. The Game Boy Advance is generally considered the easiest to expand.

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. Sometimes the hack will simply crash before gameplay. The generally accepted way to fix this is by making a patch (in IPS format or others) that can be applied to the unmodified ROM. 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. IPS is still used today for small patches—however, as ROMs became larger in size, this format became useless, leading to quite a few file formats being created—such as NINJA and PPF ("PlayStation
PlayStation
The is a 32-bit fifth-generation video game console first released by Sony Computer Entertainment in Japan on December 3, .The PlayStation was the first of the PlayStation series of consoles and handheld game devices. The PlayStation 2 was the console's successor in 2000...

 Patch Format"). PPF is still used today, particularly to patch large files such as ISO CD images and Nintendo 64
Nintendo 64
The , often referred to as N64, was Nintendo′s third home video game console for the international market. Named for its 64-bit CPU, it was released in June 1996 in Japan, September 1996 in North America, March 1997 in Europe and Australia, September 1997 in France and December 1997 in Brazil...

 games. A new patch format, UPS, has also been developed by the ROM hacking community, designed to be the successor to IPS and PPF.
A more recent patching format, the APS patching system, has also been developed by a devoted Game Boy Advance ROM hacker. The APS system is more space efficient, reversible, and is faster than its predecessor.

The 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 distribute parts of the original game. A patch is also smaller than the full ROM image (an NES ROM can run anywhere from 8KB-2MB; a Super NES ROM can run from 256k-6MB). The use of patches does not eliminate copyright issues because the patches may be considered derivative work
Derivative work
In United States copyright law, a derivative work is an expressive creation that includes major, copyright-protected elements of an original, previously created first work .-Definition:...

s; however, corporations generally ignore them as long as they are not distributed with the ROMs.

Systems and games

The majority of ROM hacking is done on NES
Nintendo Entertainment System
The Nintendo Entertainment System is an 8-bit video game console that was released by Nintendo in North America during 1985, in Europe during 1986 and Australia in 1987...

  and Super NES
Super Nintendo Entertainment System
The Super Nintendo Entertainment System is a 16-bit video game console that was released by Nintendo in North America, Europe, Australasia , and South America between 1990 and 1993. In Japan and Southeast Asia, the system is called the , or SFC for short...

 games, since such games are small and simple compared to games of more advanced consoles such as the Nintendo 64
Nintendo 64
The , often referred to as N64, was Nintendo′s third home video game console for the international market. Named for its 64-bit CPU, it was released in June 1996 in Japan, September 1996 in North America, March 1997 in Europe and Australia, September 1997 in France and December 1997 in Brazil...

. Games for the Game Boy are also popular for hacking, as well as games for the Sega Mega Drive
Sega Mega Drive
The Sega Genesis is a fourth-generation video game console developed and produced by Sega. It was originally released in Japan in 1988 as , then in North America in 1989 as Sega Genesis, and in Europe, Australia and other PAL regions in 1990 as Mega Drive. The reason for the two names is that...

 to a lesser extent. But by no means are games for more recent consoles exempt from hacking, and indeed as computers get faster and more programs and utilities are written, one might expect to see more PlayStation
PlayStation
The is a 32-bit fifth-generation video game console first released by Sony Computer Entertainment in Japan on December 3, .The PlayStation was the first of the PlayStation series of consoles and handheld game devices. The PlayStation 2 was the console's successor in 2000...

 and Nintendo 64
Nintendo 64
The , often referred to as N64, was Nintendo′s third home video game console for the international market. Named for its 64-bit CPU, it was released in June 1996 in Japan, September 1996 in North America, March 1997 in Europe and Australia, September 1997 in France and December 1997 in Brazil...

 hacks.
Of these, popular games to play are popular games to hack; many hacks have been released of games of the Sonic the Hedgehog series, Super Mario Bros.
Super Mario Bros.
is a 1985 platform video game developed by Nintendo, published for the Nintendo Entertainment System as a sequel to the 1983 game Mario Bros. In Super Mario Bros., the player controls Mario as he travels through the Mushroom Kingdom in order to rescue Princess Toadstool from the antagonist...

series, Pokémon series, Chip's Challenge
Chip's Challenge
Chip's Challenge is a tile-based, puzzle video game for several systems, including the hand-held Atari Lynx, Amiga, Commodore 64, ZX Spectrum, DOS, and Windows . It has also been ported to the TI-84+ calculator and the TI-89 Titanium...

, Super Mario World
Super Mario World
, subtitled Super Mario Bros. 4 for its original Japanese release, is a platform video game developed and published by Nintendo as a pack-in launch title for the Super Famicom/Super Nintendo Entertainment System , and is the fourth game in the Super Mario series...

, Final Fantasy
Final Fantasy (video game)
is a fantasy role-playing video game created by Hironobu Sakaguchi, developed and first published in Japan by Square in 1987. It is the first game in Square's Final Fantasy series...

, The Legend of Zelda, games from the Mega Man series, Fire Emblem
Fire Emblem
is a fantasy tactical role-playing video game franchise developed by Intelligent Systems , the maker of Advance Wars , and published by Nintendo...

series, EarthBound
EarthBound
EarthBound, also known as EarthBound: The War Against Giygas! and released as in Japan, is a role-playing video game co-developed by Ape and HAL Laboratory and published by Nintendo for the Super Nintendo Entertainment System video game console...

, Super Mario 64
Super Mario 64
is a platform game, published by Nintendo and developed by its EAD division, for the Nintendo 64. Along with Pilotwings 64, it was one of the launch titles for the console. It was released in Japan on June 23, 1996, and later in North America, Europe, and Australia. Super Mario 64 has sold over...

, and many others.

External links

  • ROMhacking.net A repository of hacks, utilities, documents, and patches.
  • Zophar's Domain A site with some information and resources related to ROM hacking.
  • GameHacking.org A site with some information and resources related to ROM hacking.
  • Data Crystal Wiki A wiki
    Wiki
    A wiki is a website that allows the creation and editing of any number of interlinked web pages via a web browser using a simplified markup language or a WYSIWYG text editor. Wikis are typically powered by wiki software and are often used collaboratively by multiple users. Examples include...

    dedicated to ROM hacking.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK