Line 60: |
Line 60: |
| | Unknown | | | Unknown |
| |} | | |} |
| + | |
| + | =ReceiveBufferInfo/SendBufferInfo= |
| + | (Information below is poorly verified against real hardware. Please help me verify them -- [[User:Wwylele|Wwylele]] ([[User talk:Wwylele|talk]])) |
| + | |
| + | The BufferInfo sections store data validity information for the two buffers |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Relative offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x4 |
| + | | Start index of valid packages |
| + | |- |
| + | | 0x4 |
| + | | 0x4 |
| + | | End index of valid packages |
| + | |- |
| + | | 0x8 |
| + | | 0x4 |
| + | | Number valid packages |
| + | |- |
| + | | 0xC |
| + | | 0x4 |
| + | | Unknown |
| + | |} |
| + | |
| + | =ReceiveBuffer/SendBuffer= |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Relative offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x8 * package_count (specified in Init parameter) |
| + | | PackageInfo{u32 offset_to_data_buffer, u32 data_length} |
| + | |- |
| + | | 0x8 * package_count |
| + | | buffer_size - 0x8 * package_count |
| + | | Data buffer |
| + | |} |
| + | |
| + | The buffers are two circular buffers. A new package is added to the end of previous package in the data buffer, with package info added to PackageInfo[end_index++]. Note that if an added package exceeds the end of the buffer, the exceeding data will be wrapped around to the beginning of the data buffer. |