Off-the-Map Turf and Zone Glitches
Flying outside the normal bounds of the map was always a favorite exploit on the original edition of San Andreas on PS2. Over 170 extra gang turfs could be glitched on the map if the player flew far enough. But on PC the glitch doesn't work the same way. Only a dozen zones at the end of info,zon can be glitched using this trick on PC.
But there are nasty side effects to traveling off the map on PC. Most notably, the Taxi Glitch where no passengers spawn anywhere. But also the Toreno Glitch - during the Mike Toreno mission the Doherty zones might be altered, breaking the mission if both zones are glitched. There are also other problems associated with zone names not displaying properly; a lot of players probably wouldn't notice. The severity of the Taxi and Toreno glitches has led to a culture that avoids this glitch on PC by staying within the normal bounds of the map.
Now we have a map of the off-the-map sectors and can avoid the minefield of taxi glitches to navigate towards the treasures of finally glitching the Mafia onto our maps without resorting to editors or modding. There are existing turf exploits that allow CJ to boost the density of existing gangs and add them to other zones. But normally there are no mafia on the map. A map of the sectors should allow players to glitch specific gangs into the best of the few zones available for exploit.
The images below can be enlarged, but they are just a snapshot of a much larger Google Sheet. Once things have been tested and any bugs worked out of the map I'll look into options for hosting a large composite map. In the meantime, view access is available for my SA Zone Glitches Google Sheets. This is a new document and could use confirmation. So far everything looks good. All of my conflicts have been resolved.
SA Zone Glitches - PC
A special thanks to rhans for the inspiration to map the mafia glitch sectors, to Nick007J for technical support and digging the formulas out of the game, and Bender for his work on refining the PS2 map.
This glitch is reported to only work for the original edition of San Andreas, but that should include "downgraded" v1 executables on PC. Script and data files won't make a difference. Xbox players have reported the taxi glitch but I have no way to verify that the Xbox glitch can be mapped to the PC glitches.
This glitch is prevented by the SilentPatch. Apply the patch to avoid problems. Disable it if you want to experiment with glitching some turfs or zones. I'm not sure if the patch has an option for this.
Fixing Corrupt Zone Information: If you get into trouble by traveling off the map and are encountering the Taxi, Toreno, or other zone information glitches, GTASnP.com can fix that for you. It doesn't attempt to fix individual errors. Instead it will replace the entire zoneinfo structure with a copy of known quality stored for this purpose. This repair will not alter zonepop's gang data.
A "sector" describes a square of the 10 by 10 grid that fogs areas of the map that CJ has yet to explore. The sectors are 600 meters square and center on 0, 0 in Blueberry. The glitch is caused when the routine that unfogs the map gets coordinates that are outside of the expected range. A normal index of 0 through 99 will unfog a sector of the map. A negative index corrupts the end of the zone population structure that holds information on gang density. An index beyond 99 can corrupt the zone information associated with zone names.
There aren't many good reasons to corrupt zone information intentionally, and there are always taxi, toreno and zone name glitches lurking in this area, but rhans found that if he glitches the ID of the SAN_AND zone it will link the large underlying zone to JTE1, Julius Freeway East in LV. Whichever gang controls JTE1 will have it's color displayed over the entire map, and SAN_AND finally scores as under control in the stats. A similar glitch is SUNMA to the north, and if both sectors are glitched then JTN1 is linked to SAN_AND. This is a new glitch; the implications are not well understood.
Understanding the Data
In the Sheet, three rows are associated with each sector to form a square when bordered with the column width. The bottom row contains the formula for calculating an index based on CJ's location on the margins of the sheet. The index is linked to the record and byte descriptions by the lookup table for display in the other rows. The top row displays the record being glitched; these group in columns. The 2nd row describes which byte within the record is manipulated. All zones with the same index will produce the same glitch.
The glitch can only work on null bytes. If the value isn't 00 then the game thinks the sector has already been unlocked and it won't make any changes. Zone Information data (names, coordinates, IDs, etc) that can be glitched are shaded. Zone Population data (gang density) is shaded for standard gangs. Dealers, unused gangs, and color bytes are considered safe and are not shaded. The following post has more details on the formatting rules and the known effects of each type of glitch.
Open Sectors (-1 thru -4) is written not read, so we can't instantly unfog the whole map on PC by glitching an upper byte, but it counts as a new sector and will increase the count within the OpenSector integer by 1 every 5 seconds (detection cycle) while CJ is within the zone. The whole map will unfog at 80 so it shouldn't take long for the map to unfog if CJ hangs in the area for a while. The nZones WORD has data; the align bytes can be glitched but it won't matter.
ZonePop data is mostly empty, unless gangs are present. Otherwise, popcycle and ethnicity will always have data, and are immune from corruption. If gangs are present then dealers are too, anything glitched into this field will probably be adjusted by other game mechanics. The RGBA color bytes are updated regularly. Modders often have trouble getting their custom colors to stick. Everything else is gang density.
An important factor in intentionally glitching gangs is that given multiple gangs of equal density (01), the gang with the lowest index (ballas) has control of the turf. And since all the close gang zones are located to the south, you'll need to sneak around the upper gangs to give priority to your target. Mafia, in this case, as they are unique as the only gang with fully rounded gang data but no place to spawn in game. But any gang will do, and it might provide other opportunities for migrating gangd now that it's not such a random process.
On PC, the turf glitches are limited to negative indexes. The math works out to limit all damage to the last 14 records of the zonepop structure and a little of the 15th, but the damage in the 15th can't reach gang data, and there are 2 unused records in memory that aren't in the save, so in the end only 12 turfs can be manipulated with these exploits. However, once you've got the gang you want in the city you need them, other exploits can be used to spread them around.
Some of the zones that can be glitched already have regular densities for standard gangs (PLS, LIND3). It's possible to clear all gangs from a zone by natural means, but it requires a gang war that ends with a density of 256 for grove, wiping out all traces of gangs so you can start fresh. I still need to go through the data and mark these gang zones differently, and highlight the best choices for new gangs in each city.
On PS2, the glitches are reversed. Negative indexes to the south, and off the map to the distant north, will cause zone info corruption. The damage is limited to the last 7 entries. There doesn't appear to be any conflicts with missions, or advantages to intentional corruption. Positive indexes to the east and represent the popular gang glitches caused by flying off the map. This map might make hunting for your 173rd zone a little less random.
Zone Information - Here There Be Monster!
Monsters like the Taxi Glitch. But most of the zone info bytes contain data. The characters of the zone name, X and Y coordinates, ID (mostly), island - all contain useful data. There are a few exceptions. The character strings allow for 8 bytes, which can include as many as 7 letters and numbers but must terminate with a null character, 00. When the terminator byte on the second instance of SAN_AND is corrupt the game can't find the base map and won't look for passengers in the area.
SAN_AND uses all 7 characters, but a 3 letter zone (TOM) would have 5 null bytes following the text. The byte immediately after the text must be the null terminator, the rest don't matter. The initial version of this map/sheet uses a 7 + null template for all zones. It has been updated reflect the true length of each string.