ACP_COMMAND_ENABLE_OR_DISABLE_XMA_CONTEXTS Structure

Command to enable or disable a series of XMA contexts.

Syntax

struct ACP_COMMAND_ENABLE_OR_DISABLE_XMA_CONTEXTS {
    UINT32 context[SHAPE_NUM_XMA_CONTEXT_BITFIELDS];
};  

Members

context
Bitfield of contexts, where the array element = context / 32, and the mask = 1 << (context % 32).

Remarks

If the command ACP_COMMAND_TYPE_DISABLE_XMA_CONTEXTS is issued, the ACP_MESSAGE_TYPE_COMMAND_COMPLETED message will be sent after all the XMA contexts are disabled and the decoder is no longer processing any of the contexts. This means that when the command completed message is received, a title is free to modify the context structures.

The reason why the command completed message is sent after the context is disabled by the decoder, and not simply after it is marked as disabled, is that the XMA decoder could be in the middle of an operation on the context, which cannot be interrupted. This behavior is the same as on the Xbox 360.

If the entire context array is initialized to zero, you can set the bit for each context index using the following:

      context[contextIndex >> SHAPE_XMA_CONTEXT_INDEX_SHIFT] |= 1 << (contextIndex & SHAPE_XMA_CONTEXT_BIT_MASK);  

Requirements

Header: Declared in acphal.h.

Library: Use acphal.lib.