sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
libsecr-common.h
Go to the documentation of this file.
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright (c) 2009 jimmikaelkael
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
16
17#ifndef __LIBSECR_COMMON_H__
18#define __LIBSECR_COMMON_H__
19
20#include <tamtypes.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
27typedef struct SecrBitBlockData
28{
30 u32 size;
32 u32 flags;
33 u8 checksum[8];
35
36typedef struct SecrBitTableHeader
37{
42 u8 pad1;
43 u8 pad2;
44 u8 pad3;
45} SecrBitTableHeader_t;
46
48typedef struct SecrBitTable
49{
50 SecrBitTableHeader_t header;
54
56typedef struct KELF_Header
57{
58 u8 UserHeader[16];
63 u16 unknown5;
65 u16 flags;
68 u32 mg_zones;
70
71extern int SecrCardBootHeader(int port, int slot, void *buffer, SecrBitTable_t *BitTable, s32 *pSize);
72extern int SecrCardBootBlock(void *src, void *dst, unsigned int size);
73extern void *SecrCardBootFile(int port, int slot, void *buffer);
74extern int SecrDiskBootHeader(void *buffer, SecrBitTable_t *BitTable, s32 *pSize);
75extern int SecrDiskBootBlock(void *src, void *dst, unsigned int size);
76extern void *SecrDiskBootFile(void *buffer);
77
78/* FOLLOWING EXPORTS ARE ONLY AVAILABLE IN SPECIAL SECRMAN OR FREESECR */
79extern int SecrDownloadHeader(int port, int slot, void *buffer, SecrBitTable_t *BitTable, s32 *pSize);
80extern int SecrDownloadBlock(void *src, unsigned int size);
81extern void *SecrDownloadFile(int port, int slot, void *buffer);
82extern int SecrDownloadGetKbit(int port, int slot, void *kbit);
83extern int SecrDownloadGetKc(int port, int slot, void *kbit);
84extern int SecrDownloadGetICVPS2(void *icvps2);
85
86#ifdef __cplusplus
87}
88#endif
89
90#endif /* __LIBSECR_COMMON_H__ */
struct KELF_Header SecrKELFHeader_t
struct SecrBitTable SecrBitTable_t
struct SecrBitBlockData SecrBitBlockData_t
SecrBitBlockData_t blocks[63]