PS2SDK
PS2 Homebrew Libraries
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#ifndef __LIBSECR_COMMON_H__
17#define __LIBSECR_COMMON_H__
18
19#include <tamtypes.h>
20
22typedef struct SecrBitBlockData
23{
25 u32 size;
27 u32 flags;
28 u8 checksum[8];
30
31typedef struct SecrBitTableHeader
32{
37 u8 pad1;
38 u8 pad2;
39 u8 pad3;
41
49
51typedef struct KELF_Header
52{
53 u8 UserHeader[16];
58 u16 unknown5;
60 u16 flags;
63 u32 mg_zones;
65
66extern int SecrCardBootHeader(int port, int slot, void *buffer, SecrBitTable_t *BitTable, s32 *pSize);
67extern int SecrCardBootBlock(void *src, void *dst, unsigned int size);
68extern void *SecrCardBootFile(int port, int slot, void *buffer);
69extern int SecrDiskBootHeader(void *buffer, SecrBitTable_t *BitTable, s32 *pSize);
70extern int SecrDiskBootBlock(void *src, void *dst, unsigned int size);
71extern void *SecrDiskBootFile(void *buffer);
72
73/* FOLLOWING EXPORTS ARE ONLY AVAILABLE IN SPECIAL SECRMAN OR FREESECR */
74extern int SecrDownloadHeader(int port, int slot, void *buffer, SecrBitTable_t *BitTable, s32 *pSize);
75extern int SecrDownloadBlock(void *src, unsigned int size);
76extern void *SecrDownloadFile(int port, int slot, void *buffer);
77extern int SecrDownloadGetKbit(int port, int slot, void *kbit);
78extern int SecrDownloadGetKc(int port, int slot, void *kbit);
79extern int SecrDownloadGetICVPS2(void *icvps2);
80
81#endif /* __LIBSECR_COMMON_H__ */
struct KELF_Header SecrKELFHeader_t
struct SecrBitTable SecrBitTable_t
SecrBitBlockData_t blocks[63]
struct SecrBitBlockData SecrBitBlockData_t