I'll post everything here, if someone else wants to to take a look...
pak file format
-------------
The pak file format starts with a file header and a list that stores file name entries for some of the files in the pak (not for all). After that, there's a file header for each file stored in the pak file. This header stores the type of a file (called 'tag' in the source, for some reason it's stored in the file name entries as well), a unique identifier for this file (if the file has a name in the filename table, then the name has the same id), where in the pak this file is stored and a flag that says if the file is compressed or not (I'm not completely sure on this - but it's quite likely. Files which don't have this flag set look "normal" in a hex editor, files which have this file set look "compressed").
mpakdump takes a pak file and extracts all files found in it. Files are not decompressed, though - you can see in the filename if a file is compressed (compressed files start with 1, uncompressed files with 0). The filename table in the pak file is ignored.
File types
---------
There a several file types in a pak file. .txtr files are texture files. mtexdump takes an uncompressed (!) txtr file and converts it to a bti file (that's the image format used by mario sunshine, it required the least amount of code to convert to this format. You can use btidump to convert bti to dds, which is supported by most image viewers).
Here's a list of the other file types together with some notes:
STRG - strings (unicode or japanes shift-jis)
CMDL - model
TXTR - texture
CSKR
HINT
FRME
ANCS
ANIM
AFSM
DGRP
EVNT
FONT
CINF
MAPA uncompressed files start with 0xdeadd00d
MAPW uncompressed files start with 0xdeadf00d
MLVL uncompressed files start with 0xdeafbabe
MREA - level geometry, uncompressed files start with 0xdeadbeef
PART - particles?
PATH
SCAN
SAVW
SWHC
WPSC
ELSC
DPSC
CRSC
DUMB
CTWK - tweak
CSNG - midi data
Stuff to do:
- write a decompressor for the compressed files
- write viewers for the more interesting file types (mrea, followed by cmdl imo)
EDIT (three months later ;-) ): I wrote a decompressor for the compressed files, it is attached (mdecomp20051222.zip, source included). It takes a compressed file and decompresses it (if the input file is called "1_....", the output file is called "01_....").