Search the Community: Showing results for tags 'Halo 1 Dev'.
Found 1 result
Kavawuvi posted a topic in Halo MCC: DevelopmentI figured that here would be a good place to put this here. Before someone asks for the difference between Custom Edition maps and CEA map files: aside from the ability to load tag data from external map files and different versions in the header, they're the same format as retail, so besides those two minor differences, all differences below also apply to Custom Edition maps. All of this information has been found from my work with Invader. Map Files Anyway, starting with the map file, itself, cache files are stored as 0x20000 byte (128 KiB) chunks which are each compressed using Deflate. This will signficantly negatively impact compression ratios, but it allows for threading for both compression and decompression. Unlike Xbox maps, the header is also compressed, so it is not possible to even identify a map file as a map file without decompressing it. The first number in the compressed file is a count (32-bit integer), followed by an array of file offsets to each block (32-bit integers). Each block is a size of the block when uncompressed (32-bit integer) followed by the Deflate stream. Using this, you can get the decompressed size by adding up the sizes. You can use Ceaflate to decompress and compress these files, but if you intend to use the map files with Invader, do not use Ceaflate to decompress them. Invader handles it automatically. Once you've got a decompressed map file, you may notice something: like retail maps, the engine version is 7, though the build string is different (01.00.01.0563 instead of either 01.00.00.0564 [maps that came with the retail disc] or 01.00.00.0563 [ui.map that came with the Halo PC dedicated server]). However, there is one key difference that will prevent many tag parsers from accessing the tag data in the map: the tag data address. Halo PC uses 0x40440000 and Halo CEA uses 0x40448000. Since the tag data header is the same size, tools that infer the tag data address based on the tag array pointer, such as Eschaton, will be able to work with the map as far as allowing you to view and edit tag data without having to update the tool. Also, there is another key difference that will prevent many tag parsers from accessing BSP tags in the map: BSP vertices are stored outside of the tag, and the lightmap pointers are meaningless here. Actually, the vertices are addressed based on file offset and size, so you'll have to use the offset values instead of the address values to find it. Fortunately, they're the same format, so they can be reintegrated back into a BSP tag and exported normally. invader-extract can already do this. There's one last difference: bitmaps and sounds are stored differently in CEA. They are not stored in bitmaps.map or sounds.map. All classic bitmaps are stored in inplace1.ipak (and referenced in the .imeta file), and all classic sounds are stored in fmod files. Also, the .fmeta contains information about file names and the uncompressed file size (which is read by the game and needs to be correct). These files not only store the data, itself, but also the actual attributes to the data. Therefore, the tag data for both the bitmap data and permutation data is actually not correct. Bitmap data can be determined by reading the .imeta and .ipak data and reading the data from that, and thankfully, MCC uses the same formats that Halo PC uses for classic bitmaps. However, sound data may not even use a format that stock Halo PC supports. How do I tell the difference between a Halo PC or CEA map? Technically, you can't safely do this if the maps are uncompressed. Here are a few scenarios: Yes, the build strings are different, but neither games read this value. Anyone can change these with a hex editor and it'd still be just as valid to either game. The only thing you can guarantee based on the header is whether or not something is a Custom Edition map. Yes, BSP vertices are stored differently, but the values used in one game aren't used in the other, so it is possible for either to be set to something that appears valid but isn't actually used. Yes, the tag data addresses are different, so usually the tag arrays will be different addresses, but this does not always have to be the case, and some map protections will exploit this for older, naive tag editors like Eschaton. The only reliable way I can think of for telling the difference between two maps is that CEA maps are compressed. invader-compress will also set its own 563 value in the header as the engine version when decompressed so it can still tell that the map is a CEA map. Ceaflate doesn't do that.