#ifndef XBOX_REGION_H_INCLUDED
#define XBOX_REGION_H_INCLUDED

#include <stddef.h>
#include <stdint.h>

typedef enum {
    XB_REGION_US_CANADA      = 0x00000001U,
    XB_REGION_JAPAN          = 0x00000002U,
    XB_REGION_EUROPE_AU_NZ   = 0x00000004U,
    XB_REGION_REST_OF_WORLD  = 0x00000008U,
    XB_REGION_MANUFACTURING  = 0x80000000U
} XboxRegion;

/* Formats an Original Xbox XBE certificate GameRegion bit mask.
 * The result describes the XBE execution region, not a television standard.
 * Returns false only when the output buffer is unusable. */
int xbox_region_format(uint32_t mask, char *output, size_t output_size);

#endif
