Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
ROM hacking
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Methods== Having been created by many different programmers or programming teams, ROM data can be very diverse. ===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]]. 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. 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=== <!-- 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 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]] 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). 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> <!-- 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=== 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=== 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 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=== 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 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. 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> ===ROM expansion=== 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.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)