Each CISO file has a header with 32 KiB (32768 bytes). The first 4 bytes are the magic "CISO". The next 4 bytes are a 4 byte integer stored in little endian (intel format but not network byte order).

The MAP

The map uses the rest of the head (32760 bytes). Each byte represents a ISO block with given block size. A '1' means that the block is stored in the file, a '0' means that it is not stored (and is logical filled with zeros).

If reading from a CISO it is good to transform the map into a other map:

It seems that block_size must be a multiple of WII_SECTOR_SIZE (= 32 KiB = 32768).

To store a complete Wii disc with 4 699 979 776 bytes the block size must be at least 5*32=160 KiB and for double layer 320 KiB.

When extracting a disc from WBFS the uLoader software uses the WBFS sector size (multiple of 2 MiB) as CISO block size. The 'isotociso' tool (part of uLoader source) uses a fixed block size of 4 MiB. These block sizes are much larger and the ciso files grow a litle bit.

My Questions:

Is the block size always a multiple of 32768 (32 KiB)?

Must the block size be a power 2?

Is there a importand minimal CISO block size?

Does a USB loader need a max block limitation to limit the size of the internal mapping table?