From Bulbapedia, the community-driven Pokémon encyclopedia.
Tweaking, sometimes called holepunching to commemorate its discoverer (a GameSpot forums member by the name of "Holepunch"), is a glitch in Diamond, Pearl, Platinum, HeartGold, and SoulSilver Versions that causes the game to fail to load the graphics of an area.
What causes the effect
Maps in Diamond and Pearl are broken up into 32-step by 32-step squares that are visible at any one time, with nine of these squares loaded at any given time. When a player crosses over the game's various "load lines", located halfway across these 32×32 squares, the next area is loaded to memory, while the previous is unloaded. Through this, the overworld becomes a seamless area.
Using the bicycle in the fourth gear, however, can cause the player to move too fast for the game to load the areas properly, especially if he or she changes direction while doing so to cross over the two load lines in the center of a square nearly simultaneously. Doing so triggers a race condition bug, causing varying effects such as a black area, a white area, or even a fully-loaded area to load, freeze the game, or change your Z-axis location.
The distortion caused by tweaking can be solved easily by crossing a load line away from the distortion, as when the section is loaded again, it will be normal. It can also be solved by looking at a different menu screen, then returning to the overworld.
By tweaking in a specific manner in an area that has buildings that the player can enter, as well as forcing the game to load the section in such a way that the player can walk into the dark area, buildings can be entered through their currently invisible and not properly loaded walls. By reloading the map while the player is inside of the building, behind the warp to the actual inside of the building, and walking south, the player can end up on the inside of the building, but in the void area around the normally accessible portion, somewhat like the Surf glitch. Like the Surf glitch, a way can be found through the interconnecting area of this void to Newmoon Island and the Flower Paradise, where Darkrai and Shaymin reside. Arceus is yet to be found with this glitch, due to the lack of a flag needed by the obtaining of the Azure Flute. Tweaking has also been used to explore a beta Jubilife Condominiums third and fourth floor, in which the player can obtain a Focus Band.
Although graphics of HeartGold, SoulSilver, and Platinum Versions are loaded in a different manner to Diamond and Pearl, the areas are loaded the same, which means tweaking can still occur, but it is harder to do so.
The same risks associated with the Surf glitch, such as locking oneself in the Mystery Zone, are found here. It may also cause the game to become permanently frozen, requiring a new game to be started.
A website dedicated to Tweaking