Hello, everyone.
I'm interested in making a hack of Nintendo World Cup that allows players to select any of the 13 teams in versus mode, rather than only the 5 teams usually available. The team IDs range from 0x00 to 0x0C in order from top to bottom and left to right as displayed on the team select screen for the tournament mode (e.g. USA = 0x00, Holland = 0x01, Italy = 0x0C). I have been able to find the location in the ROM file that stores the team IDs for the 5 teams that can be chosen normally (0xD77A), and it is possible to change the values to enable other teams. However, this still limits the number of available teams to 5, and it also introduces graphical glitches (incorrect graphics being loaded for player heads, ball invisible), as depicted below.
Example of normal graphics
Example of graphical glitches when replacing USA with Argentina
I'm not very experienced with ROM hacking, so I'd like to get some help with this, be it someone looking at the ROM or just pointing me to a document that would be enlightening. Also, I have some more information about both ROM and RAM addresses, so feel free to ask about anything you think might be helpful.
Thank you in advance.
Update: I've been running two instances of FCEUXD SP simultaneously, selecting versus mode on one and tournament mode on the other in order to (hopefully) figure out what the differences are. I've been putting a conditional breakpoint on the reading of address $0000; this seems to store what button is being pressed at any given time, and pressing Start ($0000==#10) is the only way to select a mode. However, I would like to know if there are any better breakpoints that would stop execution when Start is pressed.
In order to figure out what differences there may be while selecting between the two modes, I dumped the RAM using the Hex Editor after the breakpoint occurred. I made two dumps of the RAM after selecting tournament mode in order to eliminate any addresses that wouldn't be relevant to deciding between the two modes (e.g. addresses that might contain what music is being played or will be played at any specific time). I'd also like any input about this technique for eliminating addresses, especially if there are better ways to go about it.
Thanks again.
Update 2: After spending a lot of time stepping through assembly code, I was only able to successfully determine the branch point that causes the password prompt to load or not. Getting tired of that, I decided to take a close look at the ROM with Tile Layer Pro. I probably should have done that when I first noticed the graphical glitches posted above. In any case, it appears that the upper head graphics (that aren't displayed correctly in the second picture above) are all stored at the offset that Tile Layer Pro calls 0x2E010. However, if you scroll down to 0x38C10, there are a series of twelve sets of upper head graphics. I'm pretty sure that these are the graphics for your team and the twelve opposing teams in the tournament mode. Then, starting at 0x3BC10, there are another six sets of graphics.
In summary, I believe that the graphics loaded on the right side of the PPU Viewer in FCEUXD SP for the player heads (the four lowest rows) are hardcoded into the ROM. When you select tournament mode or when one side in versus mode is the USA, the proper graphics from the first twelve sets is loaded. When the USA is not one of the teams in versus mode, the appropriate graphics from the six later sets are loaded (there are six ways to pair up the four non-USA teams available in versus mode). However, if you change the values at 0xD77A, the graphics loaded for the player heads are the letters visible at 0x20010 in Tile Layer Pro, leading to the results in the second picture linked above.
I guess this makes the game much harder to change, but I'd still like some feedback as to ways to possibly achieve what I want.