Ms Pac-Man (Namco) Hacking Document v3.0 --------------------------------- Updated version by Techokami (techokami@holenet.info) This revised document contains new and updated information on Ms. Pac-Man for the NES. This pertains to the Namco version of the game, the Tengen ("Bootleg") version is vastly different and is outside of the scope of this document. All data (from v2.0) found/cracked by Dahrk Daiz (DahrkDaiz@hotmail.com) Reproduction of this document is forbidden. Copyright (C) 2003-2018 Maze Data ------------------------ Maze data is very easy to hack. The levels start at $0E79 in the ROM. If you look at the Pattern Tables with Nesticle, you'll see the tiles laid out before you. Each graphical tile directly corresponds with the level tile. So #1F in the Patter Tables is the upper left hand corner. This is also the corner on the maze. For you're reference here's each tile's object value. 00 - Empty space 01 - Power Pellet 03 - Normal Pellet 09 - Horizontal Bar for Ghost entrance 0A - Vertical Up End A 0B - Vertical Up End B 0C - Upper right corner A 0D - Upper left corner A 0E - Lower right corner A 0F - Lower left corner A 10 - Horizontal Bar 11 - Vertical Bar 12 - 3 Way Bar Up _|_ 13 - 3 Way Bar down 14 - 3 Way Bar left 15 - 3 War Bar right 16 - Right end Ghost entrance 17 - Left end ghost entrance 18 - Horizontal right end A 19 - Horizontal left end A 1A - Vertical Down End B 1B - Vertical Up end B 1C - Lower right corner B 1D - Upper right corner B 1E - Lower left Corner B 1F - Upper left corner B 21 - Horizontal right end B 22 - Horizontal left end B *Remaing objects can be used, they spell out NAMCO if used, replace them with other gfx if you wish* Now Ms. Pac-Man has a very simple form of data compression. By adding 40 (in hex) to any object, you get a repeat tile. Such as 03. 03 is a single pellet. Adding 40 in hex to it, we get 43, and we get 2 pellets. Adding 40 again, we get 83 and thats 3 pellets. Add 40 more and we get C3, which is 4 pellets in a row. This works for all objects. Unlike the Tengen version, tiles are not mirrored, meaning you can have assymetrical mazes! Each level is compiled of 22 X 28 tiles. Make sure each horizontal line adds up to 22 tiles and all together a maze should add up to 572 tiles. The first vertical tiles are usually blank except when you want to lead the player into a hole (that leads to the other side). Do note that compression does NOT go across rows! If a row has more than 22 tiles, the extra tiles will be ignored. There is NO ending byte. The game just keeps counting tiles until it reaches 28 rows of 22 tiles. Pallette Hacking --------------------------------------- Why include a doc on how to pallette hack an NES game? It's not as simple as you may think with this game. The game uses 1 pallette for all mazes. But 1 byte is changed in the pallette according to the level number. This creates dull palletes in your mazes, so I wrote a routine that reads 4 bytes for maze pallettes. At 000006529 in the ROM, repace the 3 bytes with this: 20 E0 F5 Thats JSR $F5E0 This is a jump to the new routine that will be written. Im not sure on how to use an assembler, but here is the routine I used for the new palette routine: PHP TYA PHA TXA PHA LDY $003E LDA $#00 LABEL CLC ADC $#04 DEY Y BNE LABEL TAX LDY $#00 LABEL 2 LDA $F60C, X STA $0180, Y INX INY CPY #04 BNE LABEL2 PLA TAX PLA TAY PLP RTS Place this code at 000075F0 in the ROM. Now each maze's pallette will be 4 bytes. This data must start at $00007620. Each level has a unique pallette with this routine. -------------------------------------------------------- Alternatively, you can download this IPS patch and apply it to your Ms Pac-Man (Namco) ROM. Remember, the pallette data must begin at $00007620 IPS: http://web.utk.edu/~thouk/pallette.ips Do note that this palette hack does not account for the level clear palette routine. Pellets ---------------------------- Each time a pellet tile is stored into memory, either compressed or not, 1 is added to the pellet count. There is only 1 byte for the number of pellets in a maze. So when the pellet count exceends 255, it resets to 0 and starts counting again. If you go over 255 (lets say by 20), then you'll eat 20 pellets and the level ends. So be sure to keep your pellet count under 255. One easy way to do this is to keep pellets away from the space surrounding the ghost trap. Pointers ------------------------------- The level pointer table starts at $0000097A. To convert a pointer to in-ROM levels, read the two byte pointers litte endian first. (i.e, you have pointer B78E read that as $8EB7. Add 10 bytes for ROM header and minus $8000. So B78E is read as 8EB7 + $10 = $8EC7 - $8000 = $0EC7. This is the actual in rom location of the level. Here's the ROM location and pointer of every level in the game, in the order they are stored: Stages: 1, 2, 26 00000E79 = $698E Stages: 3-5 00001034 = $2490 Stages: 6-9, 14-16, 22-24, 28 000011E4 = $D491 Stages: 10-13, 18-20, 29 000013A4 = $9493 Stages: 17, 30 0000155B = $4B95 Stage: 32 000016F3 = $E396 Unused Maze 1 00001895 = $8598 Unused Maze 2 00001A53 = $439A Unused Maze 3 00001B9D = $8D9B Stages: 21, 27, 31 00001D3B = $2B9D Unused Maze 4 00001EEB = $DB9E Unused Maze 5 000020C0 = $B0A0 Unused Maze 6 00002277 = $67A2 Unused Maze 7 00002430 = $20A4 Stage: 25 000025E4 = $D4A5 Unused Maze 8 0000278F = $7FA7 Unused Maze 9 (stored uncompressed) 00002936 = $26A9 Editing Starting Position ----------------------------- Every level has the same starting point. To change this, edit these bytes in the ROM. X position: 000065E1 Y position: 000065E2 Starting Lives ----------------------------- 0000450A contains one byte that controls how many lives the player begins with.