Alhexx' Cy Girls NKP Format Analysis V1.00 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Hello and welcome to another of Alhexx' famous file format descriptions! ^_^ Well, taking a quick look at my homepage, I recognize that this is the first released description for around 2 years. Doh, I've been very lazy the last few years... Okay, enough of that. The format we want to take a look at this time is from the almost unknown PS2 game "Cy Girls" from Konami. The format is quite simple, altough a bit unusual. But okay, let's simply start with the structures we need: Header ------ struct CG_NKP_HEADER { unsigned long ulMagic; // 0x1A504B4E unsigned long ulFileSize; unsigned long ulReserved; // 0 unsigned long ulNumFiles; }; // 16 Bytes File Entry ---------- struct CG_NKP_FILE { unsigned long ulFileNameOffset; unsigned long ulFileOffset; }; // 8 Bytes I think there's nothing that needs to be explained in the header. But let's see the file entry. There is no filename stored in here, there's just the offset to the filename within this archive. So if you want to have the first file's filename, you will have to read the first CG_NKP_FILE struct, then seek to ulFileNameOffset in your archive and there you have your filename, terminated by a NULL-Char. Unfortunately, this format only saves offsets, no filesizes and no filename lengths... File Structure -------------- This is the structure of a NKP archive: -> CG_NKP_HEADER -> CG_NKP_FILE[ CG_NKP_HEADER.ulNumFiles ] -> 8 empty Bytes (0x00) -> Filenames (seperated by NULL-char) (-> Padding until address is a multiple of 16) -> File Entries I think this is self-explaining... Note: I don't know if every single file has to begin at an offset that is a multiple of 16, but I suppose yes... That's enough for today. ~~ Greetings Fly Out To: ~~ Cici ficedula Jackrabbitz Kaddy #17 Levitikus MatsuJin mirex Pitty Qhimm s_kaspar The SaiNt ... and everyone who misses his/her name here! Visit or contact me: -------------------- Home : http://www.alhexx.com Forum : http://forums.alhexx.com Mail : alhexx@alhexx.com - Alhexx 01:22 2006-02-22