Harry97 wrote:JDHalfrack wrote:No, you dork...

That is the offset within the file! So, what I posted there is just the header. that part of the header (and position 0x40) is the offset where the entrance locations are found. so, you need to go to 0x040438 in the file (remember, it's all stored as little endian). If you go to 0x040438, you get this section of data:
04 00 00 00 18 21 19 42 3F EC 92 40 5D AA 58 42 00 00 00 00 15 00 B4 C2 00 00 00 00 00 00 00 00 69 CC 91 41 3F EC 92 40 A0 20 8C 42 59 E8 FC 27 15 00 34 43 00 00 00 00 01 00 00 00 1D 6C 8F C1 3F EC 92 40 6A 02 8C 42 59 E8 FC 27 15 00 34 43 00 00 00 00 02 00 00 00 83 5B 1E C2 3F EC 92 40 4E 28 4F 42 00 00 00 00 15 00 B4 42 00 00 00 00 03 00 00 00.
The first 4 bytes are a counter. There are 4 coordinate locations stored here. Each section is 24 bytes long corresponding to a different "part" of the coordinates, and the last 4 bytes just a counter.
18 21 19 42 3F EC 92 40 5D AA 58 42 00 00 00 00 15 00 B4 C2 00 00 00 00 00 00 00 00
69 CC 91 41 3F EC 92 40 A0 20 8C 42 59 E8 FC 27 15 00 34 43 00 00 00 00 01 00 00 00
1D 6C 8F C1 3F EC 92 40 6A 02 8C 42 59 E8 FC 27 15 00 34 43 00 00 00 00 02 00 00 00
83 5B 1E C2 3F EC 92 40 4E 28 4F 42 00 00 00 00 15 00 B4 42 00 00 00 00 03 00 00 00
I haven't figured out what all of them mean (if anything), but each 4-byte section is stored as float values. They are at least related to the following: x-position, y-position, angle of running in, and a couple others that don't seem to make any lick of difference when I change them.
Also, I have no idea what the sets of coordinates for entry 02 and 03 correlate to. Entry 00 is the home team entrance, and entry 01 is the away team entrance.
Hope this helps clear up some confusion!

Yes that does clear up some confusion. Following the offset from the header is not something I often do, so while this may seem obvious to you, it's important to provide all the steps to get to the addresses that actually make the change. And yes I see that it's little endian, as in we have to reverse the order per byte to get the offset address.
It always makes sense after something is explained thoroughly, or after something is revealed. To give only the header wasn't so clear.
And yes I now see the area that is changed between the previous file and your new file. So what I'll do now is search those changed values in memory, perhaps I'll use and rename some save states on two separate builds, saved from the intro scene before they run out on to the field, one with your new file and one with the old and adjust values in that area of memory (0x040438) in real-time to see how it changes when adjustments are made. It's interesting because in the past I've found the stadium file in memory and made changes to the stadium file in memory, which is how I applied color codes to the crowd directly through the file.
However I did note that only *some* of the stadium file when accessed in memory is identical to the stadium file as it exists in file form. There are parts of the stadium file when accessed in memory that do not match the stadium file itself, while other parts (like the "per row" of crowd data) does match. If I'm not mistaken, the section after the header and before the crowd per row data starts is different, and areas after the end of the crowd per row data. It was confusing at first when I discovered this when making changes to the crowd colors through the stadium file, through memory changes to get the colors right then updating those *parts* by copy and pasting those changes from memory into the stadium file itself. Which was only possible through being on a PC and using cheat engine, as the PCSX2 debugger is really only useful for making individual code changes one code at a time.
In file comparing between your new file and the old one, I see that there's also a ton of
other changes in that stadium file. What else did you adjust? And more importantly,
can you explain how you got the crowds to show up in NCAA 06 for that Madden PS2 stadium? What specific addresses did you need to change to get them to show up? Was it a specific series of changes for each "row" section of crowd or was it somewhere else outside of the specific to each row of crowd data? Anotherwords, was it a single overarching code (value change) that got the crowds to show up or did you have to make the same value adjustments over and over again in each set of crowd per row data?
It was taken from Madden 08 PS2 right, the unedited M08 PS2 minor files for the Seahawks stadium and your edited major file? FYI you *may* have unknowingly used a NCAA 04-06 (Madden 04-06) crowd template to that stadium rather than the "much better" NCAA 07-11 (Madden PS2 07-12) crowd template which is why the crowd models look so big in this stadium. That's what appears to be going on but there's many changes in your file making it difficult to narrow down or understand what values caused the crowds to show up. If you compared (and used) codes (values) from an NCAA 06 stadium to get the crowd to show up in your Madden stadium, I would encourage you to use codes (the values) from a NCAA 07-11 converted stadium instead so you can improve the look of the crowd!
So, what happens when the stadium file loads into memory is that it loads exactly how it looks in the DAT file, byte-for-byte. But, almost immediately, it undergoes it's conversion process where the offsets in the memory get adjusted to the offsets in memory. so something like 10 05 00 00 gets changed to 4E 50 85 01 (or something like that). Then, immediately after that, all the data in the stadium file gets actually converted into the file formats the game "reads". So, the header and much of the first grouping of offset data remains the same as the actual file. However, all the images within the stadium file actually get compiled into their image format. This is what most of the changed data is. Not quite all of it.
Also, as far as the entrance coordinates go, you need to make sure they are edited in memory almost immediately after the stadium loads. As soon as the stadium loads, the coordinates are actually pulled from the file and stored in a separate section of memory (before the pregame intro even starts). It's this new section in memory where the game actually reads from.
The stadium I used for Seattle's stadium came from one of the PS2 Maddens (I don't recall which one). Both the major and all the minor parts. I made no changes to the minor parts (I think). The key to getting the crowds to show up was editing one of the float values. I used the logic you explained to me in one of your other posts here. Unfortunately, I don't recall which post, or what I needed to do! But, as an example, if you go to offset 0x1CE0, you see one of the fan sections. It starts like this:
07 00 00 00 28 00 00 00 3F 00 00 00 00 00 00 00
01 01 00 01 08 80 01 6C 30 80 00 00 00 40 02 30
12 04 00 00 00 00 00 00 03 01 00 01 09 80 30 64
27 31 20 40 6F 12 83 3A 37 89 A9 3E 6F 12 83 3A
27 31 20 40 23 DB 79 3D 37 89 A9 3E 23 DB 79 3D
.... so on and so forth ...
So, each section of the stadium starts with 48 bytes. I don't know what all of them mean (ChatGPT and I are working on deciphering all of it), but after those 48 bytes, for the fan sections, each group of 32 bytes following that deals with size and scaling of a row of fans (all little endian float values). So, in this example, this section of bytes is one row of fans:
27 31 20 40 6F 12 83 3A 37 89 A9 3E 6F 12 83 3A
27 31 20 40 23 DB 79 3D 37 89 A9 3E 23 DB 79 3D
One of those groupings of four (one of the float values), had to be adjusted across the board for all the fan sections in the stadium. Clearly the Madden version has a different way of interpreting those float values compared to the NCAA '06 version. Unfortunately, I'm just not sure I remember which float value... It's been a long time!
Again, hopefully all this is helpful for you and you continue having fun editing!