From WiiBrew
Jump to navigation Jump to search

CHANS is the system used by the Wii's system menu to display "dynamic" banners. It seems to be some form of bytecode. This page shall describe said bytecode and the header for CHANS files. You may find a CHANS file in the News Channel as content index 5.

Here is what is known of the structure for the header:

typedef struct{

	// all offsets are from 0x20
	u32 head;
	u32 version;
	u32 file_size;
	u8 unk[0x14];
	u8 unk2[0x10];
	u32 unk3;
	u32 unk4;
	u32 unk5;
	u32 unk6;
	///table 1 is made up of 8 byte chunks
	u32 table1_count;
	u32 table1_offset;
	///table2 is the method name list
	u32 table2_count;
	u32 table2_offset;
	///table3 is a string literal table, each string is in utf-8 and ended with 0x00240020 (.$. )
	u32 table3_count;
	u32 table3_offset;
	///possibly unused table
	u32 unk7;
	u32 unk8;
	u32 unknown_count_mybe;
	u32 unknown_offset;
} bacs_header;

typedef struct {
	u8 length;
	u8 padding;
	u16 offset;
} table2_key;

This data is in no way 100% complete, so far it works but table 1 and 2, but in future this could break with further files tested.

TODO: A lot! Keep adding data, people!