libctr9
Nintendo 3DS ARM9 library
ctr_headers.h File Reference
#include <stdint.h>
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  ctr_ncsd_cart_header
 Struct representing the NCSD header for carts. More...
 
struct  ctr_ncch_header
 Struct representing the NCCH header. More...
 

Functions

void ctr_ncsd_header_load (ctr_ncsd_cart_header *header, const uint8_t *data, size_t data_size)
 Loads the given ctr_ncsd_cart_header with the data from the actual NCSD cart header in memory. More...
 
void ctr_ncch_header_load (ctr_ncch_header *header, const uint8_t *data, size_t data_size)
 Loads the given ctr_ncch_header with the data from the actual NCCH header in memory. More...
 

Function Documentation

void ctr_ncch_header_load ( ctr_ncch_header header,
const uint8_t *  data,
size_t  data_size 
)

Loads the given ctr_ncch_header with the data from the actual NCCH header in memory.

Parameters
[out]headerStruct to load.
[in]dataPointer to NCCH in memory to load into header struct.
[in]data_sizeLength of the buffer in memory with the NCCH data. This function expects this number to be greater than or equal to 0x200, else the function refuses to load the struct, even partially.
Postcondition
If data_size >= 0x200, header is updated to include the parsed data from the NCSD header in memory, else nothing happens.
void ctr_ncsd_header_load ( ctr_ncsd_cart_header header,
const uint8_t *  data,
size_t  data_size 
)

Loads the given ctr_ncsd_cart_header with the data from the actual NCSD cart header in memory.

Parameters
[out]headerStruct to load.
[in]dataPointer to NCSD in memory to load into header struct.
[in]data_sizeLength of the buffer in memory with the NCSD data. This function expects this number to be greater than or equal to 0x200, else the function refuses to load the struct, even partially.
Postcondition
If data_size >= 0x200, header is updated to include the parsed data from the NCSD header in memory, else nothing happens.