PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
secrman.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 __SECRMAN_H__
17#define __SECRMAN_H__
18
19#include <types.h>
20#include <irx.h>
21#include <sio2man.h>
22#include <libsecr-common.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28typedef int (*McCommandHandler_t)(int port, int slot, sio2_transfer_data_t *sio2_trans_data);
29typedef int (*McDevIDHandler_t)(int port, int slot);
30
31extern void SecrSetMcCommandHandler(McCommandHandler_t handler);
32extern void SecrSetMcDevIDHandler(McDevIDHandler_t handler);
33
34extern int SecrAuthCard(int port, int slot, int cnum);
35extern int SecrAuthDongle(int port, int slot, int cnum);
36extern void SecrResetAuthCard(int port, int slot, int cnum);
37
38// El_isra: this was 0x1, 0x3 originally. but the IRX_ID macro on source code has 0x1, 0x4. just like arcade SECRMAN...
39#define secrman_IMPORTS_start DECLARE_IMPORT_TABLE(secrman, 1, 4)
40#define secrman_IMPORTS_end END_IMPORT_TABLE
41
42#define I_SecrSetMcCommandHandler DECLARE_IMPORT(4, SecrSetMcCommandHandler)
43#define I_SecrSetMcDevIDHandler DECLARE_IMPORT(5, SecrSetMcDevIDHandler)
44#define I_SecrAuthCard DECLARE_IMPORT(6, SecrAuthCard)
45#define I_SecrResetAuthCard DECLARE_IMPORT(7, SecrResetAuthCard)
46
47#define I_SecrCardBootHeader DECLARE_IMPORT(8, SecrCardBootHeader)
48#define I_SecrCardBootBlock DECLARE_IMPORT(9, SecrCardBootBlock)
49#define I_SecrCardBootFile DECLARE_IMPORT(10, SecrCardBootFile)
50#define I_SecrDiskBootHeader DECLARE_IMPORT(11, SecrDiskBootHeader)
51#define I_SecrDiskBootBlock DECLARE_IMPORT(12, SecrDiskBootBlock)
52#define I_SecrDiskBootFile DECLARE_IMPORT(13, SecrDiskBootFile)
53
54/* FOLLOWING EXPORTS ARE ONLY AVAILABLE IN SPECIAL SECRMAN OR FREESECR */
55#define I_SecrDownloadHeader DECLARE_IMPORT(14, SecrDownloadHeader)
56#define I_SecrDownloadBlock DECLARE_IMPORT(15, SecrDownloadBlock)
57#define I_SecrDownloadFile DECLARE_IMPORT(16, SecrDownloadFile)
58#define I_SecrDownloadGetKbit DECLARE_IMPORT(17, SecrDownloadGetKbit)
59#define I_SecrDownloadGetKc DECLARE_IMPORT(18, SecrDownloadGetKc)
60#define I_SecrDownloadGetICVPS2 DECLARE_IMPORT(19, SecrDownloadGetICVPS2)
61
62/* FOLLOWING EXPORTS ARE ONLY AVAILABLE IN ARCADE SECRMAN */
63#define I_SecrAuthDongle DECLARE_IMPORT(20, SecrAuthDongle)
64
65#ifdef __cplusplus
66}
67#endif
68
69#endif /* IOP_SECRMAN_H */