forked from emukidid/cleanrip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
148 lines (126 loc) · 2.74 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
/**
* CleanRip - main.h
* Copyright (C) 2010 emu_kidid
*
* CleanRip homepage: http://code.google.com/p/cleanrip/
* email address: [email protected]
*
*
* This program is free software; you can redistribute it and/
* or modify it under the terms of the GNU General Public Li-
* cence as published by the Free Software Foundation; either
* version 2 of the Licence, or any later version.
*
* This program is distributed in the hope that it will be use-
* ful, but WITHOUT ANY WARRANTY; without even the implied war-
* ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public Licence for more details.
*
**/
#ifndef MAIN_H
#define MAIN_H
#include <gccore.h>
#include <string.h>
#include <unistd.h>
#include <stdint.h>
#include <stdio.h>
#include <ogcsys.h>
#define WII_MAGIC 0x5D1C9EA3
#define NGC_MAGIC 0xC2339F3D
#define TYPE_USB 0
#define TYPE_SD 1
#define TYPE_M2LOADER 2
#define TYPE_FAT 0
#define TYPE_NTFS 1
#define READ_SIZE 0x10000
#define ONE_MEGABYTE 0x000200
#define ONE_GIGABYTE 0x080000
#define NGC_DISC_SIZE 0x0AE0B0
#define WII_D1_SIZE NGC_DISC_SIZE //Freeloader Wii (mini DVD size)
#define WII_D5_SIZE 0x230480
#define WII_D9_SIZE 0x3F69C0
#define HW_REG_BASE 0xcd800000
#define HW_ARMIRQMASK (HW_REG_BASE + 0x03c)
#define HW_ARMIRQFLAG (HW_REG_BASE + 0x038)
#define MAX_WII_OPTIONS 3
#define MAX_NGC_OPTIONS 3
// Version info
#define V_MAJOR 2
#define V_MID 2
#define V_MINOR 0
/*** 2D Video Globals ***/
extern GXRModeObj *vmode; /*** Graphics Mode Object ***/
extern u32 *xfb[2]; /*** Framebuffers ***/
extern int whichfb; /*** Frame buffer toggle ***/
extern u32 iosversion;
extern int verify_in_use;
extern int verify_disc_type;
extern int forceDatel;
u32 get_buttons_pressed();
void print_gecko(const char* fmt, ...);
const char* const get_game_name();
enum discTypes
{
IS_NGC_DISC=0,
IS_WII_DISC,
IS_DATEL_DISC,
IS_UNK_DISC
};
enum options
{
NGC_SHRINK_ISO=0,
NGC_ALIGN_FILES,
NGC_ALIGN_BOUNDARY,
WII_DUAL_LAYER,
WII_CHUNK_SIZE,
WII_NEWFILE
};
enum shrinkOptions
{
SHRINK_NONE=0,
SHRINK_PAD_GARBAGE,
SHRINK_ALL,
SHRINK_DELIM
};
enum alignOptions
{
ALIGN_ALL=0,
ALIGN_AUDIO,
ALIGN_DELIM
};
enum alignBoundaryOptions
{
ALIGN_32=0,
ALIGN_2,
ALIGN_512,
ALIGNB_DELIM
};
enum dualOptions
{
AUTO_DETECT=0,
SINGLE_MINI,
SINGLE_LAYER,
DUAL_LAYER,
DUAL_DELIM
};
enum chunkOptions
{
CHUNK_1GB=0,
CHUNK_2GB,
CHUNK_3GB,
CHUNK_MAX,
CHUNK_DELIM
};
enum newFileOptions
{
ASK_USER=0,
AUTO_CHUNK,
NEWFILE_DELIM
};
enum settingsAskStatus
{
NOT_ASKED,
ANSWER_YES,
ANSWER_NO
};
#endif