xref: /rust-libc-0.2.174/src/psp.rs (revision 8d68ec6f)
1 //! PSP C type definitions
2 //!
3 //! These type declarations are not enough, as they must be ultimately resolved
4 //! by the linker. Crates that use these definitions must, somewhere in the
5 //! crate graph, include a stub provider crate such as the `psp` crate.
6 
7 use c_void;
8 
9 pub type c_schar = i8;
10 pub type c_uchar = u8;
11 pub type c_short = i16;
12 pub type c_ushort = u16;
13 pub type c_int = i32;
14 pub type c_uint = u32;
15 pub type c_float = f32;
16 pub type c_double = f64;
17 pub type c_longlong = i64;
18 pub type c_ulonglong = u64;
19 pub type intmax_t = i64;
20 pub type uintmax_t = u64;
21 
22 pub type size_t = usize;
23 pub type ptrdiff_t = isize;
24 pub type intptr_t = isize;
25 pub type uintptr_t = usize;
26 pub type ssize_t = isize;
27 
28 pub type c_char = u8;
29 pub type c_long = i64;
30 pub type c_ulong = u64;
31 
32 pub type SceKernelVTimerHandler = unsafe extern "C" fn(
33     uid: SceUid,
34     arg1: *mut SceKernelSysClock,
35     arg2: *mut SceKernelSysClock,
36     arg3: *mut c_void,
37 ) -> u32;
38 
39 pub type SceKernelVTimerHandlerWide =
40     unsafe extern "C" fn(uid: SceUid, arg1: i64, arg2: i64, arg3: *mut c_void) -> u32;
41 
42 pub type SceKernelThreadEventHandler =
43     unsafe extern "C" fn(mask: i32, thid: SceUid, common: *mut c_void) -> i32;
44 
45 pub type SceKernelAlarmHandler = unsafe extern "C" fn(common: *mut c_void) -> u32;
46 
47 pub type SceKernelCallbackFunction =
48     unsafe extern "C" fn(arg1: i32, arg2: i32, arg: *mut c_void) -> i32;
49 
50 pub type SceKernelThreadEntry = unsafe extern "C" fn(args: usize, argp: *mut c_void) -> i32;
51 
52 pub type PowerCallback = extern "C" fn(unknown: i32, power_info: i32);
53 
54 pub type IoPermissions = i32;
55 
56 pub type UmdCallback = fn(unknown: i32, event: i32) -> i32;
57 
58 pub type SceMpegRingbufferCb =
59     ::Option<unsafe extern "C" fn(data: *mut c_void, num_packets: i32, param: *mut c_void) -> i32>;
60 
61 pub type GuCallback = ::Option<extern "C" fn(id: i32, arg: *mut c_void)>;
62 pub type GuSwapBuffersCallback =
63     ::Option<extern "C" fn(display: *mut *mut c_void, render: *mut *mut c_void)>;
64 
65 pub type SceNetAdhocctlHandler =
66     ::Option<unsafe extern "C" fn(flag: i32, error: i32, unknown: *mut c_void)>;
67 
68 pub type AdhocMatchingCallback = ::Option<
69     unsafe extern "C" fn(
70         matching_id: i32,
71         event: i32,
72         mac: *mut u8,
73         opt_len: i32,
74         opt_data: *mut c_void,
75     ),
76 >;
77 
78 pub type SceNetApctlHandler = ::Option<
79     unsafe extern "C" fn(oldState: i32, newState: i32, event: i32, error: i32, pArg: *mut c_void),
80 >;
81 
82 pub type HttpMallocFunction = ::Option<unsafe extern "C" fn(size: usize) -> *mut c_void>;
83 pub type HttpReallocFunction =
84     ::Option<unsafe extern "C" fn(p: *mut c_void, size: usize) -> *mut c_void>;
85 pub type HttpFreeFunction = ::Option<unsafe extern "C" fn(p: *mut c_void)>;
86 pub type HttpPasswordCB = ::Option<
87     unsafe extern "C" fn(
88         request: i32,
89         auth_type: HttpAuthType,
90         realm: *const u8,
91         username: *mut u8,
92         password: *mut u8,
93         need_entity: i32,
94         entity_body: *mut *mut u8,
95         entity_size: *mut usize,
96         save: *mut i32,
97     ) -> i32,
98 >;
99 
100 pub type socklen_t = u32;
101 
102 e! {
103     #[repr(u32)]
104     pub enum AudioFormat {
105         Stereo = 0,
106         Mono = 0x10,
107     }
108 
109     #[repr(u32)]
110     pub enum DisplayMode {
111         Lcd = 0,
112     }
113 
114     #[repr(u32)]
115     pub enum DisplayPixelFormat {
116         Psm5650 = 0,
117         Psm5551 = 1,
118         Psm4444 = 2,
119         Psm8888 = 3,
120     }
121 
122     #[repr(u32)]
123     pub enum DisplaySetBufSync {
124         Immediate = 0,
125         NextFrame = 1,
126     }
127 
128     #[repr(i32)]
129     pub enum AudioOutputFrequency {
130         Khz48 = 48000,
131         Khz44_1 = 44100,
132         Khz32 = 32000,
133         Khz24 = 24000,
134         Khz22_05 = 22050,
135         Khz16 = 16000,
136         Khz12 = 12000,
137         Khz11_025 = 11025,
138         Khz8 = 8000,
139     }
140 
141     #[repr(i32)]
142     pub enum AudioInputFrequency {
143         Khz44_1 = 44100,
144         Khz22_05 = 22050,
145         Khz11_025 = 11025,
146     }
147 
148     #[repr(u32)]
149     pub enum CtrlMode {
150         Digital = 0,
151         Analog,
152     }
153 
154     #[repr(i32)]
155     pub enum GeMatrixType {
156         Bone0 = 0,
157         Bone1,
158         Bone2,
159         Bone3,
160         Bone4,
161         Bone5,
162         Bone6,
163         Bone7,
164         World,
165         View,
166         Projection,
167         TexGen,
168     }
169 
170     #[repr(i32)]
171     pub enum GeListState {
172         Done = 0,
173         Queued,
174         DrawingDone,
175         StallReached,
176         CancelDone,
177     }
178 
179     #[repr(u8)]
180     pub enum GeCommand {
181         Nop = 0,
182         Vaddr = 0x1,
183         Iaddr = 0x2,
184         Prim = 0x4,
185         Bezier = 0x5,
186         Spline = 0x6,
187         BoundingBox = 0x7,
188         Jump = 0x8,
189         BJump = 0x9,
190         Call = 0xa,
191         Ret = 0xb,
192         End = 0xc,
193         Signal = 0xe,
194         Finish = 0xf,
195         Base = 0x10,
196         VertexType = 0x12,
197         OffsetAddr = 0x13,
198         Origin = 0x14,
199         Region1 = 0x15,
200         Region2 = 0x16,
201         LightingEnable = 0x17,
202         LightEnable0 = 0x18,
203         LightEnable1 = 0x19,
204         LightEnable2 = 0x1a,
205         LightEnable3 = 0x1b,
206         DepthClampEnable = 0x1c,
207         CullFaceEnable = 0x1d,
208         TextureMapEnable = 0x1e,
209         FogEnable = 0x1f,
210         DitherEnable = 0x20,
211         AlphaBlendEnable = 0x21,
212         AlphaTestEnable = 0x22,
213         ZTestEnable = 0x23,
214         StencilTestEnable = 0x24,
215         AntiAliasEnable = 0x25,
216         PatchCullEnable = 0x26,
217         ColorTestEnable = 0x27,
218         LogicOpEnable = 0x28,
219         BoneMatrixNumber = 0x2a,
220         BoneMatrixData = 0x2b,
221         MorphWeight0 = 0x2c,
222         MorphWeight1 = 0x2d,
223         MorphWeight2 = 0x2e,
224         MorphWeight3 = 0x2f,
225         MorphWeight4 = 0x30,
226         MorphWeight5 = 0x31,
227         MorphWeight6 = 0x32,
228         MorphWeight7 = 0x33,
229         PatchDivision = 0x36,
230         PatchPrimitive = 0x37,
231         PatchFacing = 0x38,
232         WorldMatrixNumber = 0x3a,
233         WorldMatrixData = 0x3b,
234         ViewMatrixNumber = 0x3c,
235         ViewMatrixData = 0x3d,
236         ProjMatrixNumber = 0x3e,
237         ProjMatrixData = 0x3f,
238         TGenMatrixNumber = 0x40,
239         TGenMatrixData = 0x41,
240         ViewportXScale = 0x42,
241         ViewportYScale = 0x43,
242         ViewportZScale = 0x44,
243         ViewportXCenter = 0x45,
244         ViewportYCenter = 0x46,
245         ViewportZCenter = 0x47,
246         TexScaleU = 0x48,
247         TexScaleV = 0x49,
248         TexOffsetU = 0x4a,
249         TexOffsetV = 0x4b,
250         OffsetX = 0x4c,
251         OffsetY = 0x4d,
252         ShadeMode = 0x50,
253         ReverseNormal = 0x51,
254         MaterialUpdate = 0x53,
255         MaterialEmissive = 0x54,
256         MaterialAmbient = 0x55,
257         MaterialDiffuse = 0x56,
258         MaterialSpecular = 0x57,
259         MaterialAlpha = 0x58,
260         MaterialSpecularCoef = 0x5b,
261         AmbientColor = 0x5c,
262         AmbientAlpha = 0x5d,
263         LightMode = 0x5e,
264         LightType0 = 0x5f,
265         LightType1 = 0x60,
266         LightType2 = 0x61,
267         LightType3 = 0x62,
268         Light0X = 0x63,
269         Light0Y,
270         Light0Z,
271         Light1X,
272         Light1Y,
273         Light1Z,
274         Light2X,
275         Light2Y,
276         Light2Z,
277         Light3X,
278         Light3Y,
279         Light3Z,
280         Light0DirectionX = 0x6f,
281         Light0DirectionY,
282         Light0DirectionZ,
283         Light1DirectionX,
284         Light1DirectionY,
285         Light1DirectionZ,
286         Light2DirectionX,
287         Light2DirectionY,
288         Light2DirectionZ,
289         Light3DirectionX,
290         Light3DirectionY,
291         Light3DirectionZ,
292         Light0ConstantAtten = 0x7b,
293         Light0LinearAtten,
294         Light0QuadtraticAtten,
295         Light1ConstantAtten,
296         Light1LinearAtten,
297         Light1QuadtraticAtten,
298         Light2ConstantAtten,
299         Light2LinearAtten,
300         Light2QuadtraticAtten,
301         Light3ConstantAtten,
302         Light3LinearAtten,
303         Light3QuadtraticAtten,
304         Light0ExponentAtten = 0x87,
305         Light1ExponentAtten,
306         Light2ExponentAtten,
307         Light3ExponentAtten,
308         Light0CutoffAtten = 0x8b,
309         Light1CutoffAtten,
310         Light2CutoffAtten,
311         Light3CutoffAtten,
312         Light0Ambient = 0x8f,
313         Light0Diffuse,
314         Light0Specular,
315         Light1Ambient,
316         Light1Diffuse,
317         Light1Specular,
318         Light2Ambient,
319         Light2Diffuse,
320         Light2Specular,
321         Light3Ambient,
322         Light3Diffuse,
323         Light3Specular,
324         Cull = 0x9b,
325         FrameBufPtr = 0x9c,
326         FrameBufWidth = 0x9d,
327         ZBufPtr = 0x9e,
328         ZBufWidth = 0x9f,
329         TexAddr0 = 0xa0,
330         TexAddr1,
331         TexAddr2,
332         TexAddr3,
333         TexAddr4,
334         TexAddr5,
335         TexAddr6,
336         TexAddr7,
337         TexBufWidth0 = 0xa8,
338         TexBufWidth1,
339         TexBufWidth2,
340         TexBufWidth3,
341         TexBufWidth4,
342         TexBufWidth5,
343         TexBufWidth6,
344         TexBufWidth7,
345         ClutAddr = 0xb0,
346         ClutAddrUpper = 0xb1,
347         TransferSrc,
348         TransferSrcW,
349         TransferDst,
350         TransferDstW,
351         TexSize0 = 0xb8,
352         TexSize1,
353         TexSize2,
354         TexSize3,
355         TexSize4,
356         TexSize5,
357         TexSize6,
358         TexSize7,
359         TexMapMode = 0xc0,
360         TexShadeLs = 0xc1,
361         TexMode = 0xc2,
362         TexFormat = 0xc3,
363         LoadClut = 0xc4,
364         ClutFormat = 0xc5,
365         TexFilter = 0xc6,
366         TexWrap = 0xc7,
367         TexLevel = 0xc8,
368         TexFunc = 0xc9,
369         TexEnvColor = 0xca,
370         TexFlush = 0xcb,
371         TexSync = 0xcc,
372         Fog1 = 0xcd,
373         Fog2 = 0xce,
374         FogColor = 0xcf,
375         TexLodSlope = 0xd0,
376         FramebufPixFormat = 0xd2,
377         ClearMode = 0xd3,
378         Scissor1 = 0xd4,
379         Scissor2 = 0xd5,
380         MinZ = 0xd6,
381         MaxZ = 0xd7,
382         ColorTest = 0xd8,
383         ColorRef = 0xd9,
384         ColorTestmask = 0xda,
385         AlphaTest = 0xdb,
386         StencilTest = 0xdc,
387         StencilOp = 0xdd,
388         ZTest = 0xde,
389         BlendMode = 0xdf,
390         BlendFixedA = 0xe0,
391         BlendFixedB = 0xe1,
392         Dith0 = 0xe2,
393         Dith1,
394         Dith2,
395         Dith3,
396         LogicOp = 0xe6,
397         ZWriteDisable = 0xe7,
398         MaskRgb = 0xe8,
399         MaskAlpha = 0xe9,
400         TransferStart = 0xea,
401         TransferSrcPos = 0xeb,
402         TransferDstPos = 0xec,
403         TransferSize = 0xee,
404         Vscx = 0xf0,
405         Vscy = 0xf1,
406         Vscz = 0xf2,
407         Vtcs = 0xf3,
408         Vtct = 0xf4,
409         Vtcq = 0xf5,
410         Vcv = 0xf6,
411         Vap = 0xf7,
412         Vfc = 0xf8,
413         Vscv = 0xf9,
414 
415         Unknown03 = 0x03,
416         Unknown0D = 0x0d,
417         Unknown11 = 0x11,
418         Unknown29 = 0x29,
419         Unknown34 = 0x34,
420         Unknown35 = 0x35,
421         Unknown39 = 0x39,
422         Unknown4E = 0x4e,
423         Unknown4F = 0x4f,
424         Unknown52 = 0x52,
425         Unknown59 = 0x59,
426         Unknown5A = 0x5a,
427         UnknownB6 = 0xb6,
428         UnknownB7 = 0xb7,
429         UnknownD1 = 0xd1,
430         UnknownED = 0xed,
431         UnknownEF = 0xef,
432         UnknownFA = 0xfa,
433         UnknownFB = 0xfb,
434         UnknownFC = 0xfc,
435         UnknownFD = 0xfd,
436         UnknownFE = 0xfe,
437         NopFF = 0xff,
438     }
439 
440     #[repr(i32)]
441     pub enum SceSysMemPartitionId {
442         SceKernelUnknownPartition = 0,
443         SceKernelPrimaryKernelPartition = 1,
444         SceKernelPrimaryUserPartition = 2,
445         SceKernelOtherKernelPartition1 = 3,
446         SceKernelOtherKernelPartition2 = 4,
447         SceKernelVshellPARTITION = 5,
448         SceKernelScUserPartition = 6,
449         SceKernelMeUserPartition = 7,
450         SceKernelExtendedScKernelPartition = 8,
451         SceKernelExtendedSc2KernelPartition = 9,
452         SceKernelExtendedMeKernelPartition = 10,
453         SceKernelVshellKernelPartition = 11,
454         SceKernelExtendedKernelPartition = 12,
455     }
456 
457     #[repr(i32)]
458     pub enum SceSysMemBlockTypes {
459         Low = 0,
460         High,
461         Addr,
462     }
463 
464     #[repr(u32)]
465     pub enum Interrupt {
466         Gpio = 4,
467         Ata = 5,
468         Umd = 6,
469         Mscm0 = 7,
470         Wlan = 8,
471         Audio = 10,
472         I2c = 12,
473         Sircs = 14,
474         Systimer0 = 15,
475         Systimer1 = 16,
476         Systimer2 = 17,
477         Systimer3 = 18,
478         Thread0 = 19,
479         Nand = 20,
480         Dmacplus = 21,
481         Dma0 = 22,
482         Dma1 = 23,
483         Memlmd = 24,
484         Ge = 25,
485         Vblank = 30,
486         Mecodec = 31,
487         Hpremote = 36,
488         Mscm1 = 60,
489         Mscm2 = 61,
490         Thread1 = 65,
491         Interrupt = 66,
492     }
493 
494     #[repr(u32)]
495     pub enum SubInterrupt {
496         Gpio = Interrupt::Gpio as u32,
497         Ata = Interrupt::Ata as u32,
498         Umd = Interrupt::Umd as u32,
499         Dmacplus = Interrupt::Dmacplus as u32,
500         Ge = Interrupt::Ge as u32,
501         Display = Interrupt::Vblank as u32,
502     }
503 
504     #[repr(u32)]
505     pub enum SceKernelIdListType {
506         Thread = 1,
507         Semaphore = 2,
508         EventFlag = 3,
509         Mbox = 4,
510         Vpl = 5,
511         Fpl = 6,
512         Mpipe = 7,
513         Callback = 8,
514         ThreadEventHandler = 9,
515         Alarm = 10,
516         VTimer = 11,
517         SleepThread = 64,
518         DelayThread = 65,
519         SuspendThread = 66,
520         DormantThread = 67,
521     }
522 
523     #[repr(i32)]
524     pub enum UsbCamResolution {
525         Px160_120 = 0,
526         Px176_144 = 1,
527         Px320_240 = 2,
528         Px352_288 = 3,
529         Px640_480 = 4,
530         Px1024_768 = 5,
531         Px1280_960 = 6,
532         Px480_272 = 7,
533         Px360_272 = 8,
534     }
535 
536     #[repr(i32)]
537     pub enum UsbCamResolutionEx {
538         Px160_120 = 0,
539         Px176_144 = 1,
540         Px320_240 = 2,
541         Px352_288 = 3,
542         Px360_272 = 4,
543         Px480_272 = 5,
544         Px640_480 = 6,
545         Px1024_768 = 7,
546         Px1280_960 = 8,
547     }
548 
549     #[repr(i32)]
550     pub enum UsbCamDelay {
551         NoDelay = 0,
552         Delay10Sec = 1,
553         Delay20Sec = 2,
554         Delay30Sec = 3,
555     }
556 
557     #[repr(i32)]
558     pub enum UsbCamFrameRate {
559         Fps3_75 = 0,
560         Fps5 = 1,
561         Fps7_5 = 2,
562         Fps10 = 3,
563         Fps15 = 4,
564         Fps20 = 5,
565         Fps30 = 6,
566         Fps60 = 7,
567     }
568 
569     #[repr(i32)]
570     pub enum UsbCamWb {
571         Auto = 0,
572         Daylight = 1,
573         Fluorescent = 2,
574         Incadescent = 3,
575     }
576 
577     #[repr(i32)]
578     pub enum UsbCamEffectMode {
579         Normal = 0,
580         Negative = 1,
581         Blackwhite = 2,
582         Sepia = 3,
583         Blue = 4,
584         Red = 5,
585         Green = 6,
586     }
587 
588     #[repr(i32)]
589     pub enum UsbCamEvLevel {
590         Pos2_0 = 0,
591         Pos1_7 = 1,
592         Pos1_5 = 2,
593         Pos1_3 = 3,
594         Pos1_0 = 4,
595         Pos0_7 = 5,
596         Pos0_5 = 6,
597         Pos0_3 = 7,
598         Zero = 8,
599         Neg0_3,
600         Neg0_5,
601         Neg0_7,
602         Neg1_0,
603         Neg1_3,
604         Neg1_5,
605         Neg1_7,
606         Neg2_0,
607     }
608 
609     #[repr(i32)]
610     pub enum RtcCheckValidError {
611         InvalidYear = -1,
612         InvalidMonth = -2,
613         InvalidDay = -3,
614         InvalidHour = -4,
615         InvalidMinutes = -5,
616         InvalidSeconds = -6,
617         InvalidMicroseconds = -7,
618     }
619 
620     #[repr(u32)]
621     pub enum PowerTick {
622         All = 0,
623         Suspend = 1,
624         Display = 6,
625     }
626 
627     #[repr(u32)]
628     pub enum IoAssignPerms {
629         RdWr = 0,
630         RdOnly = 1,
631     }
632 
633     #[repr(u32)]
634     pub enum IoWhence {
635         Set = 0,
636         Cur = 1,
637         End = 2,
638     }
639 
640     #[repr(u32)]
641     pub enum UmdType {
642         Game = 0x10,
643         Video = 0x20,
644         Audio = 0x40,
645     }
646 
647     #[repr(u32)]
648     pub enum GuPrimitive {
649         Points = 0,
650         Lines = 1,
651         LineStrip = 2,
652         Triangles = 3,
653         TriangleStrip = 4,
654         TriangleFan = 5,
655         Sprites = 6,
656     }
657 
658     #[repr(u32)]
659     pub enum PatchPrimitive {
660         Points = 0,
661         LineStrip = 2,
662         TriangleStrip = 4,
663     }
664 
665     #[repr(u32)]
666     pub enum GuState {
667         AlphaTest = 0,
668         DepthTest = 1,
669         ScissorTest = 2,
670         StencilTest = 3,
671         Blend = 4,
672         CullFace = 5,
673         Dither = 6,
674         Fog = 7,
675         ClipPlanes = 8,
676         Texture2D = 9,
677         Lighting = 10,
678         Light0 = 11,
679         Light1 = 12,
680         Light2 = 13,
681         Light3 = 14,
682         LineSmooth = 15,
683         PatchCullFace = 16,
684         ColorTest = 17,
685         ColorLogicOp = 18,
686         FaceNormalReverse = 19,
687         PatchFace = 20,
688         Fragment2X = 21,
689     }
690 
691     #[repr(u32)]
692     pub enum MatrixMode {
693         Projection = 0,
694         View = 1,
695         Model = 2,
696         Texture = 3,
697     }
698 
699     #[repr(u32)]
700     pub enum TexturePixelFormat {
701         Psm5650 = 0,
702         Psm5551 = 1,
703         Psm4444 = 2,
704         Psm8888 = 3,
705         PsmT4 = 4,
706         PsmT8 = 5,
707         PsmT16 = 6,
708         PsmT32 = 7,
709         PsmDxt1 = 8,
710         PsmDxt3 = 9,
711         PsmDxt5 = 10,
712     }
713 
714     #[repr(u32)]
715     pub enum SplineMode {
716         FillFill = 0,
717         OpenFill = 1,
718         FillOpen = 2,
719         OpenOpen = 3,
720     }
721 
722     #[repr(u32)]
723     pub enum ShadingModel {
724         Flat = 0,
725         Smooth = 1,
726     }
727 
728     #[repr(u32)]
729     pub enum LogicalOperation {
730         Clear = 0,
731         And = 1,
732         AndReverse = 2,
733         Copy = 3,
734         AndInverted = 4,
735         Noop = 5,
736         Xor = 6,
737         Or = 7,
738         Nor = 8,
739         Equiv = 9,
740         Inverted = 10,
741         OrReverse = 11,
742         CopyInverted = 12,
743         OrInverted = 13,
744         Nand = 14,
745         Set = 15,
746     }
747 
748     #[repr(u32)]
749     pub enum TextureFilter {
750         Nearest = 0,
751         Linear = 1,
752         NearestMipmapNearest = 4,
753         LinearMipmapNearest = 5,
754         NearestMipmapLinear = 6,
755         LinearMipmapLinear = 7,
756     }
757 
758     #[repr(u32)]
759     pub enum TextureMapMode {
760         TextureCoords = 0,
761         TextureMatrix = 1,
762         EnvironmentMap = 2,
763     }
764 
765     #[repr(u32)]
766     pub enum TextureLevelMode {
767         Auto = 0,
768         Const = 1,
769         Slope = 2,
770     }
771 
772     #[repr(u32)]
773     pub enum TextureProjectionMapMode {
774         Position = 0,
775         Uv = 1,
776         NormalizedNormal = 2,
777         Normal = 3,
778     }
779 
780     #[repr(u32)]
781     pub enum GuTexWrapMode {
782         Repeat = 0,
783         Clamp = 1,
784     }
785 
786     #[repr(u32)]
787     pub enum FrontFaceDirection {
788         Clockwise = 0,
789         CounterClockwise = 1,
790     }
791 
792     #[repr(u32)]
793     pub enum AlphaFunc {
794         Never = 0,
795         Always,
796         Equal,
797         NotEqual,
798         Less,
799         LessOrEqual,
800         Greater,
801         GreaterOrEqual,
802     }
803 
804     #[repr(u32)]
805     pub enum StencilFunc {
806         Never = 0,
807         Always,
808         Equal,
809         NotEqual,
810         Less,
811         LessOrEqual,
812         Greater,
813         GreaterOrEqual,
814     }
815 
816     #[repr(u32)]
817     pub enum ColorFunc {
818         Never = 0,
819         Always,
820         Equal,
821         NotEqual,
822     }
823 
824     #[repr(u32)]
825     pub enum DepthFunc {
826         Never = 0,
827         Always,
828         Equal,
829         NotEqual,
830         Less,
831         LessOrEqual,
832         Greater,
833         GreaterOrEqual,
834     }
835 
836     #[repr(u32)]
837     pub enum TextureEffect {
838         Modulate = 0,
839         Decal = 1,
840         Blend = 2,
841         Replace = 3,
842         Add = 4,
843     }
844 
845     #[repr(u32)]
846     pub enum TextureColorComponent {
847         Rgb = 0,
848         Rgba = 1,
849     }
850 
851     #[repr(u32)]
852     pub enum MipmapLevel {
853         None = 0,
854         Level1,
855         Level2,
856         Level3,
857         Level4,
858         Level5,
859         Level6,
860         Level7,
861     }
862 
863     #[repr(u32)]
864     pub enum BlendOp {
865         Add = 0,
866         Subtract = 1,
867         ReverseSubtract = 2,
868         Min = 3,
869         Max = 4,
870         Abs = 5,
871     }
872 
873     #[repr(u32)]
874     pub enum BlendSrc {
875         SrcColor = 0,
876         OneMinusSrcColor = 1,
877         SrcAlpha = 2,
878         OneMinusSrcAlpha = 3,
879         Fix = 10,
880     }
881 
882     #[repr(u32)]
883     pub enum BlendDst {
884         DstColor = 0,
885         OneMinusDstColor = 1,
886         DstAlpha = 4,
887         OneMinusDstAlpha = 5,
888         Fix = 10,
889     }
890 
891     #[repr(u32)]
892     pub enum StencilOperation {
893         Keep = 0,
894         Zero = 1,
895         Replace = 2,
896         Invert = 3,
897         Incr = 4,
898         Decr = 5,
899     }
900 
901     #[repr(u32)]
902     pub enum LightMode {
903         SingleColor = 0,
904         SeparateSpecularColor = 1,
905     }
906 
907     #[repr(u32)]
908     pub enum LightType {
909         Directional = 0,
910         Pointlight = 1,
911         Spotlight = 2,
912     }
913 
914     #[repr(u32)]
915     pub enum GuContextType {
916         Direct = 0,
917         Call = 1,
918         Send = 2,
919     }
920 
921     #[repr(u32)]
922     pub enum GuQueueMode {
923         Tail = 0,
924         Head = 1,
925     }
926 
927     #[repr(u32)]
928     pub enum GuSyncMode {
929         Finish = 0,
930         Signal = 1,
931         Done = 2,
932         List = 3,
933         Send = 4,
934     }
935 
936     #[repr(u32)]
937     pub enum GuSyncBehavior {
938         Wait = 0,
939         NoWait = 1,
940     }
941 
942     #[repr(u32)]
943     pub enum GuCallbackId {
944         Signal = 1,
945         Finish = 4,
946     }
947 
948     #[repr(u32)]
949     pub enum SignalBehavior {
950         Suspend = 1,
951         Continue = 2,
952     }
953 
954     #[repr(u32)]
955     pub enum ClutPixelFormat {
956         Psm5650 = 0,
957         Psm5551 = 1,
958         Psm4444 = 2,
959         Psm8888 = 3,
960     }
961 
962     #[repr(C)]
963     pub enum KeyType {
964         Directory = 1,
965         Integer = 2,
966         String = 3,
967         Bytes = 4,
968     }
969 
970     #[repr(u32)]
971     pub enum UtilityMsgDialogMode {
972         Error,
973         Text,
974     }
975 
976     #[repr(u32)]
977     pub enum UtilityMsgDialogPressed {
978         Unknown1,
979         Yes,
980         No,
981         Back,
982     }
983 
984     #[repr(u32)]
985     pub enum UtilityDialogButtonAccept {
986         Circle,
987         Cross,
988     }
989 
990     #[repr(u32)]
991     pub enum SceUtilityOskInputLanguage {
992         Default,
993         Japanese,
994         English,
995         French,
996         Spanish,
997         German,
998         Italian,
999         Dutch,
1000         Portugese,
1001         Russian,
1002         Korean,
1003     }
1004 
1005     #[repr(u32)]
1006     pub enum SceUtilityOskInputType {
1007         All,
1008         LatinDigit,
1009         LatinSymbol,
1010         LatinLowercase = 4,
1011         LatinUppercase = 8,
1012         JapaneseDigit = 0x100,
1013         JapaneseSymbol = 0x200,
1014         JapaneseLowercase = 0x400,
1015         JapaneseUppercase = 0x800,
1016         JapaneseHiragana = 0x1000,
1017         JapaneseHalfWidthKatakana = 0x2000,
1018         JapaneseKatakana = 0x4000,
1019         JapaneseKanji = 0x8000,
1020         RussianLowercase = 0x10000,
1021         RussianUppercase = 0x20000,
1022         Korean = 0x40000,
1023         Url = 0x80000,
1024     }
1025 
1026     #[repr(u32)]
1027     pub enum SceUtilityOskState {
1028         None,
1029         Initializing,
1030         Initialized,
1031         Visible,
1032         Quit,
1033         Finished,
1034     }
1035 
1036     #[repr(u32)]
1037     pub enum SceUtilityOskResult {
1038         Unchanged,
1039         Cancelled,
1040         Changed,
1041     }
1042 
1043     #[repr(u32)]
1044     pub enum SystemParamLanguage {
1045         Japanese,
1046         English,
1047         French,
1048         Spanish,
1049         German,
1050         Italian,
1051         Dutch,
1052         Portugese,
1053         Russian,
1054         Korean,
1055         ChineseTraditional,
1056         ChineseSimplified,
1057     }
1058 
1059     #[repr(u32)]
1060     pub enum SystemParamId {
1061         StringNickname = 1,
1062         AdhocChannel,
1063         WlanPowerSave,
1064         DateFormat,
1065         TimeFormat,
1066         Timezone,
1067         DaylightSavings,
1068         Language,
1069         Unknown,
1070     }
1071 
1072     #[repr(u32)]
1073     pub enum SystemParamAdhocChannel {
1074         ChannelAutomatic = 0,
1075         Channel1 = 1,
1076         Channel6 = 6,
1077         Channel11 = 11,
1078     }
1079 
1080     #[repr(u32)]
1081     pub enum SystemParamWlanPowerSaveState {
1082         Off,
1083         On,
1084     }
1085 
1086     #[repr(u32)]
1087     pub enum SystemParamDateFormat {
1088         YYYYMMDD,
1089         MMDDYYYY,
1090         DDMMYYYY,
1091     }
1092 
1093     #[repr(u32)]
1094     pub enum SystemParamTimeFormat {
1095         Hour24,
1096         Hour12,
1097     }
1098 
1099     #[repr(u32)]
1100     pub enum SystemParamDaylightSavings {
1101         Std,
1102         Dst,
1103     }
1104 
1105     #[repr(u32)]
1106     pub enum AvModule {
1107         AvCodec,
1108         SasCore,
1109         Atrac3Plus,
1110         MpegBase,
1111         Mp3,
1112         Vaudio,
1113         Aac,
1114         G729,
1115     }
1116 
1117     #[repr(u32)]
1118     pub enum Module {
1119         NetCommon = 0x100,
1120         NetAdhoc,
1121         NetInet,
1122         NetParseUri,
1123         NetHttp,
1124         NetSsl,
1125 
1126         UsbPspCm = 0x200,
1127         UsbMic,
1128         UsbCam,
1129         UsbGps,
1130 
1131         AvCodec = 0x300,
1132         AvSascore,
1133         AvAtrac3Plus,
1134         AvMpegBase,
1135         AvMp3,
1136         AvVaudio,
1137         AvAac,
1138         AvG729,
1139 
1140         NpCommon = 0x400,
1141         NpService,
1142         NpMatching2,
1143         NpDrm = 0x500,
1144 
1145         Irda = 0x600,
1146     }
1147 
1148     #[repr(u32)]
1149     pub enum NetModule {
1150         NetCommon = 1,
1151         NetAdhoc,
1152         NetInet,
1153         NetParseUri,
1154         NetHttp,
1155         NetSsl,
1156     }
1157 
1158     #[repr(u32)]
1159     pub enum UsbModule {
1160         UsbPspCm = 1,
1161         UsbAcc,
1162         UsbMic,
1163         UsbCam,
1164         UsbGps,
1165     }
1166 
1167     #[repr(u32)]
1168     pub enum NetParam {
1169         Name,
1170         Ssid,
1171         Secure,
1172         WepKey,
1173         IsStaticIp,
1174         Ip,
1175         NetMask,
1176         Route,
1177         ManualDns,
1178         PrimaryDns,
1179         SecondaryDns,
1180         ProxyUser,
1181         ProxyPass,
1182         UseProxy,
1183         ProxyServer,
1184         ProxyPort,
1185         Unknown1,
1186         Unknown2,
1187     }
1188 
1189     #[repr(u32)]
1190     pub enum UtilityNetconfAction {
1191         ConnectAP,
1192         DisplayStatus,
1193         ConnectAdhoc,
1194     }
1195 
1196     #[repr(u32)]
1197     pub enum UtilitySavedataMode {
1198         AutoLoad,
1199         AutoSave,
1200         Load,
1201         Save,
1202         ListLoad,
1203         ListSave,
1204         ListDelete,
1205         Delete,
1206     }
1207 
1208     #[repr(u32)]
1209     pub enum UtilitySavedataFocus {
1210         Unknown1,
1211         FirstList,
1212         LastList,
1213         Latest,
1214         Oldest,
1215         Unknown2,
1216         Unknown3,
1217         FirstEmpty,
1218         LastEmpty,
1219     }
1220 
1221     #[repr(u32)]
1222     pub enum UtilityGameSharingMode {
1223         Single = 1,
1224         Multiple,
1225     }
1226 
1227     #[repr(u32)]
1228     pub enum UtilityGameSharingDataType {
1229         File = 1,
1230         Memory,
1231     }
1232 
1233     #[repr(u32)]
1234     pub enum UtilityHtmlViewerInterfaceMode {
1235         Full,
1236         Limited,
1237         None,
1238     }
1239 
1240     #[repr(u32)]
1241     pub enum UtilityHtmlViewerCookieMode {
1242         Disabled = 0,
1243         Enabled,
1244         Confirm,
1245         Default,
1246     }
1247 
1248     #[repr(u32)]
1249     pub enum UtilityHtmlViewerTextSize {
1250         Large,
1251         Normal,
1252         Small,
1253     }
1254 
1255     #[repr(u32)]
1256     pub enum UtilityHtmlViewerDisplayMode {
1257         Normal,
1258         Fit,
1259         SmartFit,
1260     }
1261 
1262     #[repr(u32)]
1263     pub enum UtilityHtmlViewerConnectMode {
1264         Last,
1265         ManualOnce,
1266         ManualAll,
1267     }
1268 
1269     #[repr(u32)]
1270     pub enum UtilityHtmlViewerDisconnectMode {
1271         Enable,
1272         Disable,
1273         Confirm,
1274     }
1275 
1276     #[repr(u32)]
1277     pub enum ScePspnetAdhocPtpState {
1278         Closed,
1279         Listen,
1280         SynSent,
1281         SynReceived,
1282         Established,
1283     }
1284 
1285     #[repr(u32)]
1286     pub enum AdhocMatchingMode {
1287         Host = 1,
1288         Client,
1289         Ptp,
1290     }
1291 
1292     #[repr(u32)]
1293     pub enum ApctlState {
1294         Disconnected,
1295         Scanning,
1296         Joining,
1297         GettingIp,
1298         GotIp,
1299         EapAuth,
1300         KeyExchange,
1301     }
1302 
1303     #[repr(u32)]
1304     pub enum ApctlEvent {
1305         ConnectRequest,
1306         ScanRequest,
1307         ScanComplete,
1308         Established,
1309         GetIp,
1310         DisconnectRequest,
1311         Error,
1312         Info,
1313         EapAuth,
1314         KeyExchange,
1315         Reconnect,
1316     }
1317 
1318     #[repr(u32)]
1319     pub enum ApctlInfo {
1320         ProfileName,
1321         Bssid,
1322         Ssid,
1323         SsidLength,
1324         SecurityType,
1325         Strength,
1326         Channel,
1327         PowerSave,
1328         Ip,
1329         SubnetMask,
1330         Gateway,
1331         PrimaryDns,
1332         SecondaryDns,
1333         UseProxy,
1334         ProxyUrl,
1335         ProxyPort,
1336         EapType,
1337         StartBrowser,
1338         Wifisp,
1339     }
1340 
1341     #[repr(u32)]
1342     pub enum ApctlInfoSecurityType {
1343         None,
1344         Wep,
1345         Wpa,
1346     }
1347 
1348     #[repr(u32)]
1349     pub enum HttpMethod {
1350         Get,
1351         Post,
1352         Head,
1353     }
1354 
1355     #[repr(u32)]
1356     pub enum HttpAuthType {
1357         Basic,
1358         Digest,
1359     }
1360 }
1361 
1362 s_paren! {
1363     #[repr(transparent)]
1364     pub struct SceUid(pub i32);
1365 
1366     #[repr(transparent)]
1367     #[allow(dead_code)]
1368     pub struct SceMpeg(*mut *mut c_void);
1369 
1370     #[repr(transparent)]
1371     #[allow(dead_code)]
1372     pub struct SceMpegStream(*mut c_void);
1373 
1374     #[repr(transparent)]
1375     pub struct Mp3Handle(pub i32);
1376 
1377     #[repr(transparent)]
1378     #[allow(dead_code)]
1379     pub struct RegHandle(u32);
1380 }
1381 
1382 s! {
1383     pub struct sockaddr {
1384         pub sa_len: u8,
1385         pub sa_family: u8,
1386         pub sa_data: [u8;14],
1387     }
1388 
1389     pub struct in_addr {
1390         pub s_addr: u32,
1391     }
1392 
1393     pub struct AudioInputParams {
1394         pub unknown1: i32,
1395         pub gain: i32,
1396         pub unknown2: i32,
1397         pub unknown3: i32,
1398         pub unknown4: i32,
1399         pub unknown5: i32,
1400     }
1401 
1402     pub struct Atrac3BufferInfo {
1403         pub puc_write_position_first_buf: *mut u8,
1404         pub ui_writable_byte_first_buf: u32,
1405         pub ui_min_write_byte_first_buf: u32,
1406         pub ui_read_position_first_buf: u32,
1407         pub puc_write_position_second_buf: *mut u8,
1408         pub ui_writable_byte_second_buf: u32,
1409         pub ui_min_write_byte_second_buf: u32,
1410         pub ui_read_position_second_buf: u32,
1411     }
1412 
1413     pub struct SceCtrlData {
1414         pub timestamp: u32,
1415         pub buttons: i32,
1416         pub lx: u8,
1417         pub ly: u8,
1418         pub rsrv: [u8; 6],
1419     }
1420 
1421     pub struct SceCtrlLatch {
1422         pub ui_make: u32,
1423         pub ui_break: u32,
1424         pub ui_press: u32,
1425         pub ui_release: u32,
1426     }
1427 
1428     pub struct GeStack {
1429         pub stack: [u32; 8],
1430     }
1431 
1432     pub struct GeCallbackData {
1433         pub signal_func: ::Option<extern "C" fn(id: i32, arg: *mut c_void)>,
1434         pub signal_arg: *mut c_void,
1435         pub finish_func: ::Option<extern "C" fn(id: i32, arg: *mut c_void)>,
1436         pub finish_arg: *mut c_void,
1437     }
1438 
1439     pub struct GeListArgs {
1440         pub size: u32,
1441         pub context: *mut GeContext,
1442         pub num_stacks: u32,
1443         pub stacks: *mut GeStack,
1444     }
1445 
1446     pub struct GeBreakParam {
1447         pub buf: [u32; 4],
1448     }
1449 
1450     pub struct SceKernelLoadExecParam {
1451         pub size: usize,
1452         pub args: usize,
1453         pub argp: *mut c_void,
1454         pub key: *const u8,
1455     }
1456 
1457     pub struct timeval {
1458         pub tv_sec: i32,
1459         pub tv_usec: i32,
1460     }
1461 
1462     pub struct timezone {
1463         pub tz_minutes_west: i32,
1464         pub tz_dst_time: i32,
1465     }
1466 
1467     pub struct IntrHandlerOptionParam {
1468         size: i32,
1469         entry: u32,
1470         common: u32,
1471         gp: u32,
1472         intr_code: u16,
1473         sub_count: u16,
1474         intr_level: u16,
1475         enabled: u16,
1476         calls: u32,
1477         field_1c: u32,
1478         total_clock_lo: u32,
1479         total_clock_hi: u32,
1480         min_clock_lo: u32,
1481         min_clock_hi: u32,
1482         max_clock_lo: u32,
1483         max_clock_hi: u32,
1484     }
1485 
1486     pub struct SceKernelLMOption {
1487         pub size: usize,
1488         pub m_pid_text: SceUid,
1489         pub m_pid_data: SceUid,
1490         pub flags: u32,
1491         pub position: u8,
1492         pub access: u8,
1493         pub c_reserved: [u8; 2usize],
1494     }
1495 
1496     pub struct SceKernelSMOption {
1497         pub size: usize,
1498         pub m_pid_stack: SceUid,
1499         pub stack_size: usize,
1500         pub priority: i32,
1501         pub attribute: u32,
1502     }
1503 
1504     pub struct SceKernelModuleInfo {
1505         pub size: usize,
1506         pub n_segment: u8,
1507         pub reserved: [u8; 3usize],
1508         pub segment_addr: [i32; 4usize],
1509         pub segment_size: [i32; 4usize],
1510         pub entry_addr: u32,
1511         pub gp_value: u32,
1512         pub text_addr: u32,
1513         pub text_size: u32,
1514         pub data_size: u32,
1515         pub bss_size: u32,
1516         pub attribute: u16,
1517         pub version: [u8; 2usize],
1518         pub name: [u8; 28usize],
1519     }
1520 
1521     pub struct DebugProfilerRegs {
1522         pub enable: u32,
1523         pub systemck: u32,
1524         pub cpuck: u32,
1525         pub internal: u32,
1526         pub memory: u32,
1527         pub copz: u32,
1528         pub vfpu: u32,
1529         pub sleep: u32,
1530         pub bus_access: u32,
1531         pub uncached_load: u32,
1532         pub uncached_store: u32,
1533         pub cached_load: u32,
1534         pub cached_store: u32,
1535         pub i_miss: u32,
1536         pub d_miss: u32,
1537         pub d_writeback: u32,
1538         pub cop0_inst: u32,
1539         pub fpu_inst: u32,
1540         pub vfpu_inst: u32,
1541         pub local_bus: u32,
1542     }
1543 
1544     pub struct SceKernelSysClock {
1545         pub low: u32,
1546         pub hi: u32,
1547     }
1548 
1549     pub struct SceKernelThreadOptParam {
1550         pub size: usize,
1551         pub stack_mpid: SceUid,
1552     }
1553 
1554     pub struct SceKernelThreadInfo {
1555         pub size: usize,
1556         pub name: [u8; 32],
1557         pub attr: u32,
1558         pub status: i32,
1559         pub entry: SceKernelThreadEntry,
1560         pub stack: *mut c_void,
1561         pub stack_size: i32,
1562         pub gp_reg: *mut c_void,
1563         pub init_priority: i32,
1564         pub current_priority: i32,
1565         pub wait_type: i32,
1566         pub wait_id: SceUid,
1567         pub wakeup_count: i32,
1568         pub exit_status: i32,
1569         pub run_clocks: SceKernelSysClock,
1570         pub intr_preempt_count: u32,
1571         pub thread_preempt_count: u32,
1572         pub release_count: u32,
1573     }
1574 
1575     pub struct SceKernelThreadRunStatus {
1576         pub size: usize,
1577         pub status: i32,
1578         pub current_priority: i32,
1579         pub wait_type: i32,
1580         pub wait_id: i32,
1581         pub wakeup_count: i32,
1582         pub run_clocks: SceKernelSysClock,
1583         pub intr_preempt_count: u32,
1584         pub thread_preempt_count: u32,
1585         pub release_count: u32,
1586     }
1587 
1588     pub struct SceKernelSemaOptParam {
1589         pub size: usize,
1590     }
1591 
1592     pub struct SceKernelSemaInfo {
1593         pub size: usize,
1594         pub name: [u8; 32],
1595         pub attr: u32,
1596         pub init_count: i32,
1597         pub current_count: i32,
1598         pub max_count: i32,
1599         pub num_wait_threads: i32,
1600     }
1601 
1602     pub struct SceKernelEventFlagInfo {
1603         pub size: usize,
1604         pub name: [u8; 32],
1605         pub attr: u32,
1606         pub init_pattern: u32,
1607         pub current_pattern: u32,
1608         pub num_wait_threads: i32,
1609     }
1610 
1611     pub struct SceKernelEventFlagOptParam {
1612         pub size: usize,
1613     }
1614 
1615     pub struct SceKernelMbxOptParam {
1616         pub size: usize,
1617     }
1618 
1619     pub struct SceKernelMbxInfo {
1620         pub size: usize,
1621         pub name: [u8; 32usize],
1622         pub attr: u32,
1623         pub num_wait_threads: i32,
1624         pub num_messages: i32,
1625         pub first_message: *mut c_void,
1626     }
1627 
1628     pub struct SceKernelVTimerInfo {
1629         pub size: usize,
1630         pub name: [u8; 32],
1631         pub active: i32,
1632         pub base: SceKernelSysClock,
1633         pub current: SceKernelSysClock,
1634         pub schedule: SceKernelSysClock,
1635         pub handler: SceKernelVTimerHandler,
1636         pub common: *mut c_void,
1637     }
1638 
1639     pub struct SceKernelThreadEventHandlerInfo {
1640         pub size: usize,
1641         pub name: [u8; 32],
1642         pub thread_id: SceUid,
1643         pub mask: i32,
1644         pub handler: SceKernelThreadEventHandler,
1645         pub common: *mut c_void,
1646     }
1647 
1648     pub struct SceKernelAlarmInfo {
1649         pub size: usize,
1650         pub schedule: SceKernelSysClock,
1651         pub handler: SceKernelAlarmHandler,
1652         pub common: *mut c_void,
1653     }
1654 
1655     pub struct SceKernelSystemStatus {
1656         pub size: usize,
1657         pub status: u32,
1658         pub idle_clocks: SceKernelSysClock,
1659         pub comes_out_of_idle_count: u32,
1660         pub thread_switch_count: u32,
1661         pub vfpu_switch_count: u32,
1662     }
1663 
1664     pub struct SceKernelMppInfo {
1665         pub size: usize,
1666         pub name: [u8; 32],
1667         pub attr: u32,
1668         pub buf_size: i32,
1669         pub free_size: i32,
1670         pub num_send_wait_threads: i32,
1671         pub num_receive_wait_threads: i32,
1672     }
1673 
1674     pub struct SceKernelVplOptParam {
1675         pub size: usize,
1676     }
1677 
1678     pub struct SceKernelVplInfo {
1679         pub size: usize,
1680         pub name: [u8; 32],
1681         pub attr: u32,
1682         pub pool_size: i32,
1683         pub free_size: i32,
1684         pub num_wait_threads: i32,
1685     }
1686 
1687     pub struct SceKernelFplOptParam {
1688         pub size: usize,
1689     }
1690 
1691     pub struct SceKernelFplInfo {
1692         pub size: usize,
1693         pub name: [u8; 32usize],
1694         pub attr: u32,
1695         pub block_size: i32,
1696         pub num_blocks: i32,
1697         pub free_blocks: i32,
1698         pub num_wait_threads: i32,
1699     }
1700 
1701     pub struct SceKernelVTimerOptParam {
1702         pub size: usize,
1703     }
1704 
1705     pub struct SceKernelCallbackInfo {
1706         pub size: usize,
1707         pub name: [u8; 32usize],
1708         pub thread_id: SceUid,
1709         pub callback: SceKernelCallbackFunction,
1710         pub common: *mut c_void,
1711         pub notify_count: i32,
1712         pub notify_arg: i32,
1713     }
1714 
1715     pub struct UsbCamSetupStillParam {
1716         pub size: i32,
1717         pub resolution: UsbCamResolution,
1718         pub jpeg_size: i32,
1719         pub reverse_flags: i32,
1720         pub delay: UsbCamDelay,
1721         pub comp_level: i32,
1722     }
1723 
1724     pub struct UsbCamSetupStillExParam {
1725         pub size: i32,
1726         pub unk: u32,
1727         pub resolution: UsbCamResolutionEx,
1728         pub jpeg_size: i32,
1729         pub comp_level: i32,
1730         pub unk2: u32,
1731         pub unk3: u32,
1732         pub flip: i32,
1733         pub mirror: i32,
1734         pub delay: UsbCamDelay,
1735         pub unk4: [u32; 5usize],
1736     }
1737 
1738     pub struct UsbCamSetupVideoParam {
1739         pub size: i32,
1740         pub resolution: UsbCamResolution,
1741         pub framerate: UsbCamFrameRate,
1742         pub white_balance: UsbCamWb,
1743         pub saturation: i32,
1744         pub brightness: i32,
1745         pub contrast: i32,
1746         pub sharpness: i32,
1747         pub effect_mode: UsbCamEffectMode,
1748         pub frame_size: i32,
1749         pub unk: u32,
1750         pub evl_evel: UsbCamEvLevel,
1751     }
1752 
1753     pub struct UsbCamSetupVideoExParam {
1754         pub size: i32,
1755         pub unk: u32,
1756         pub resolution: UsbCamResolutionEx,
1757         pub framerate: UsbCamFrameRate,
1758         pub unk2: u32,
1759         pub unk3: u32,
1760         pub white_balance: UsbCamWb,
1761         pub saturation: i32,
1762         pub brightness: i32,
1763         pub contrast: i32,
1764         pub sharpness: i32,
1765         pub unk4: u32,
1766         pub unk5: u32,
1767         pub unk6: [u32; 3usize],
1768         pub effect_mode: UsbCamEffectMode,
1769         pub unk7: u32,
1770         pub unk8: u32,
1771         pub unk9: u32,
1772         pub unk10: u32,
1773         pub unk11: u32,
1774         pub frame_size: i32,
1775         pub unk12: u32,
1776         pub ev_level: UsbCamEvLevel,
1777     }
1778 
1779     pub struct ScePspDateTime {
1780         pub year: u16,
1781         pub month: u16,
1782         pub day: u16,
1783         pub hour: u16,
1784         pub minutes: u16,
1785         pub seconds: u16,
1786         pub microseconds: u32,
1787     }
1788 
1789     pub struct SceIoStat {
1790         pub st_mode: i32,
1791         pub st_attr: i32,
1792         pub st_size: i64,
1793         pub st_ctime: ScePspDateTime,
1794         pub st_atime: ScePspDateTime,
1795         pub st_mtime: ScePspDateTime,
1796         pub st_private: [u32; 6usize],
1797     }
1798 
1799     pub struct UmdInfo {
1800         pub size: u32,
1801         pub type_: UmdType,
1802     }
1803 
1804     pub struct SceMpegRingbuffer {
1805         pub packets: i32,
1806         pub unk0: u32,
1807         pub unk1: u32,
1808         pub unk2: u32,
1809         pub unk3: u32,
1810         pub data: *mut c_void,
1811         pub callback: SceMpegRingbufferCb,
1812         pub cb_param: *mut c_void,
1813         pub unk4: u32,
1814         pub unk5: u32,
1815         pub sce_mpeg: *mut c_void,
1816     }
1817 
1818     pub struct SceMpegAu {
1819         pub pts_msb: u32,
1820         pub pts: u32,
1821         pub dts_msb: u32,
1822         pub dts: u32,
1823         pub es_buffer: u32,
1824         pub au_size: u32,
1825     }
1826 
1827     pub struct SceMpegAvcMode {
1828         pub unk0: i32,
1829         pub pixel_format: super::DisplayPixelFormat,
1830     }
1831 
1832     #[repr(align(64))]
1833     pub struct SceMpegLLI {
1834         pub src: *mut c_void,
1835         pub dst: *mut c_void,
1836         pub next: *mut c_void,
1837         pub size: i32,
1838     }
1839 
1840     #[repr(align(64))]
1841     pub struct SceMpegYCrCbBuffer {
1842         pub frame_buffer_height16: i32,
1843         pub frame_buffer_width16: i32,
1844         pub unknown: i32,
1845         pub unknown2: i32,
1846         pub y_buffer: *mut c_void,
1847         pub y_buffer2: *mut c_void,
1848         pub cr_buffer: *mut c_void,
1849         pub cb_buffer: *mut c_void,
1850         pub cr_buffer2: *mut c_void,
1851         pub cb_buffer2: *mut c_void,
1852 
1853         pub frame_height: i32,
1854         pub frame_width: i32,
1855         pub frame_buffer_width: i32,
1856         pub unknown3: [i32; 11usize],
1857     }
1858 
1859     pub struct ScePspSRect {
1860         pub x: i16,
1861         pub y: i16,
1862         pub w: i16,
1863         pub h: i16,
1864     }
1865 
1866     pub struct ScePspIRect {
1867         pub x: i32,
1868         pub y: i32,
1869         pub w: i32,
1870         pub h: i32,
1871     }
1872 
1873     pub struct ScePspL64Rect {
1874         pub x: u64,
1875         pub y: u64,
1876         pub w: u64,
1877         pub h: u64,
1878     }
1879 
1880     pub struct ScePspSVector2 {
1881         pub x: i16,
1882         pub y: i16,
1883     }
1884 
1885     pub struct ScePspIVector2 {
1886         pub x: i32,
1887         pub y: i32,
1888     }
1889 
1890     pub struct ScePspL64Vector2 {
1891         pub x: u64,
1892         pub y: u64,
1893     }
1894 
1895     pub struct ScePspSVector3 {
1896         pub x: i16,
1897         pub y: i16,
1898         pub z: i16,
1899     }
1900 
1901     pub struct ScePspIVector3 {
1902         pub x: i32,
1903         pub y: i32,
1904         pub z: i32,
1905     }
1906 
1907     pub struct ScePspL64Vector3 {
1908         pub x: u64,
1909         pub y: u64,
1910         pub z: u64,
1911     }
1912 
1913     pub struct ScePspSVector4 {
1914         pub x: i16,
1915         pub y: i16,
1916         pub z: i16,
1917         pub w: i16,
1918     }
1919 
1920     pub struct ScePspIVector4 {
1921         pub x: i32,
1922         pub y: i32,
1923         pub z: i32,
1924         pub w: i32,
1925     }
1926 
1927     pub struct ScePspL64Vector4 {
1928         pub x: u64,
1929         pub y: u64,
1930         pub z: u64,
1931         pub w: u64,
1932     }
1933 
1934     pub struct ScePspIMatrix2 {
1935         pub x: ScePspIVector2,
1936         pub y: ScePspIVector2,
1937     }
1938 
1939     pub struct ScePspIMatrix3 {
1940         pub x: ScePspIVector3,
1941         pub y: ScePspIVector3,
1942         pub z: ScePspIVector3,
1943     }
1944 
1945     #[repr(align(16))]
1946     pub struct ScePspIMatrix4 {
1947         pub x: ScePspIVector4,
1948         pub y: ScePspIVector4,
1949         pub z: ScePspIVector4,
1950         pub w: ScePspIVector4,
1951     }
1952 
1953     pub struct ScePspIMatrix4Unaligned {
1954         pub x: ScePspIVector4,
1955         pub y: ScePspIVector4,
1956         pub z: ScePspIVector4,
1957         pub w: ScePspIVector4,
1958     }
1959 
1960     pub struct SceMp3InitArg {
1961         pub mp3_stream_start: u32,
1962         pub unk1: u32,
1963         pub mp3_stream_end: u32,
1964         pub unk2: u32,
1965         pub mp3_buf: *mut c_void,
1966         pub mp3_buf_size: i32,
1967         pub pcm_buf: *mut c_void,
1968         pub pcm_buf_size: i32,
1969     }
1970 
1971     pub struct OpenPSID {
1972         pub data: [u8; 16usize],
1973     }
1974 
1975     pub struct UtilityDialogCommon {
1976         pub size: u32,
1977         pub language: SystemParamLanguage,
1978         pub button_accept: UtilityDialogButtonAccept,
1979         pub graphics_thread: i32,
1980         pub access_thread: i32,
1981         pub font_thread: i32,
1982         pub sound_thread: i32,
1983         pub result: i32,
1984         pub reserved: [i32; 4usize],
1985     }
1986 
1987     pub struct UtilityNetconfAdhoc {
1988         pub name: [u8; 8usize],
1989         pub timeout: u32,
1990     }
1991 
1992     pub struct UtilityNetconfData {
1993         pub base: UtilityDialogCommon,
1994         pub action: UtilityNetconfAction,
1995         pub adhocparam: *mut UtilityNetconfAdhoc,
1996         pub hotspot: i32,
1997         pub hotspot_connected: i32,
1998         pub wifisp: i32,
1999     }
2000 
2001     pub struct UtilitySavedataFileData {
2002         pub buf: *mut c_void,
2003         pub buf_size: usize,
2004         pub size: usize,
2005         pub unknown: i32,
2006     }
2007 
2008     pub struct UtilitySavedataListSaveNewData {
2009         pub icon0: UtilitySavedataFileData,
2010         pub title: *mut u8,
2011     }
2012 
2013     pub struct UtilityGameSharingParams {
2014         pub base: UtilityDialogCommon,
2015         pub unknown1: i32,
2016         pub unknown2: i32,
2017         pub name: [u8; 8usize],
2018         pub unknown3: i32,
2019         pub unknown4: i32,
2020         pub unknown5: i32,
2021         pub result: i32,
2022         pub filepath: *mut u8,
2023         pub mode: UtilityGameSharingMode,
2024         pub datatype: UtilityGameSharingDataType,
2025         pub data: *mut c_void,
2026         pub datasize: u32,
2027     }
2028 
2029     pub struct UtilityHtmlViewerParam {
2030         pub base: UtilityDialogCommon,
2031         pub memaddr: *mut c_void,
2032         pub memsize: u32,
2033         pub unknown1: i32,
2034         pub unknown2: i32,
2035         pub initialurl: *mut u8,
2036         pub numtabs: u32,
2037         pub interfacemode: UtilityHtmlViewerInterfaceMode,
2038         pub options: i32,
2039         pub dldirname: *mut u8,
2040         pub dlfilename: *mut u8,
2041         pub uldirname: *mut u8,
2042         pub ulfilename: *mut u8,
2043         pub cookiemode: UtilityHtmlViewerCookieMode,
2044         pub unknown3: u32,
2045         pub homeurl: *mut u8,
2046         pub textsize: UtilityHtmlViewerTextSize,
2047         pub displaymode: UtilityHtmlViewerDisplayMode,
2048         pub connectmode: UtilityHtmlViewerConnectMode,
2049         pub disconnectmode: UtilityHtmlViewerDisconnectMode,
2050         pub memused: u32,
2051         pub unknown4: [i32; 10usize],
2052     }
2053 
2054     pub struct SceUtilityOskData {
2055         pub unk_00: i32,
2056         pub unk_04: i32,
2057         pub language: SceUtilityOskInputLanguage,
2058         pub unk_12: i32,
2059         pub inputtype: SceUtilityOskInputType,
2060         pub lines: i32,
2061         pub unk_24: i32,
2062         pub desc: *mut u16,
2063         pub intext: *mut u16,
2064         pub outtextlength: i32,
2065         pub outtext: *mut u16,
2066         pub result: SceUtilityOskResult,
2067         pub outtextlimit: i32,
2068     }
2069 
2070     pub struct SceUtilityOskParams {
2071         pub base: UtilityDialogCommon,
2072         pub datacount: i32,
2073         pub data: *mut SceUtilityOskData,
2074         pub state: SceUtilityOskState,
2075         pub unk_60: i32,
2076     }
2077 
2078     pub struct SceNetMallocStat {
2079         pub pool: i32,
2080         pub maximum: i32,
2081         pub free: i32,
2082     }
2083 
2084     pub struct SceNetAdhocctlAdhocId {
2085         pub unknown: i32,
2086         pub adhoc_id: [u8; 9usize],
2087         pub unk: [u8; 3usize],
2088     }
2089 
2090     pub struct SceNetAdhocctlScanInfo {
2091         pub next: *mut SceNetAdhocctlScanInfo,
2092         pub channel: i32,
2093         pub name: [u8; 8usize],
2094         pub bssid: [u8; 6usize],
2095         pub unknown: [u8; 2usize],
2096         pub unknown2: i32,
2097     }
2098 
2099     pub struct SceNetAdhocctlGameModeInfo {
2100         pub count: i32,
2101         pub macs: [[u8; 6usize]; 16usize],
2102     }
2103 
2104     pub struct SceNetAdhocPtpStat {
2105         pub next: *mut SceNetAdhocPtpStat,
2106         pub ptp_id: i32,
2107         pub mac: [u8; 6usize],
2108         pub peermac: [u8; 6usize],
2109         pub port: u16,
2110         pub peerport: u16,
2111         pub sent_data: u32,
2112         pub rcvd_data: u32,
2113         pub state: ScePspnetAdhocPtpState,
2114     }
2115 
2116     pub struct SceNetAdhocPdpStat {
2117         pub next: *mut SceNetAdhocPdpStat,
2118         pub pdp_id: i32,
2119         pub mac: [u8; 6usize],
2120         pub port: u16,
2121         pub rcvd_data: u32,
2122     }
2123 
2124     pub struct AdhocPoolStat {
2125         pub size: i32,
2126         pub maxsize: i32,
2127         pub freesize: i32,
2128     }
2129 }
2130 
2131 s_no_extra_traits! {
2132     #[allow(missing_debug_implementations)]
2133     pub struct GeContext {
2134         pub context: [u32; 512],
2135     }
2136 
2137     #[allow(missing_debug_implementations)]
2138     pub struct SceKernelUtilsSha1Context {
2139         pub h: [u32; 5usize],
2140         pub us_remains: u16,
2141         pub us_computed: u16,
2142         pub ull_total_len: u64,
2143         pub buf: [u8; 64usize],
2144     }
2145 
2146     #[allow(missing_debug_implementations)]
2147     pub struct SceKernelUtilsMt19937Context {
2148         pub count: u32,
2149         pub state: [u32; 624usize],
2150     }
2151 
2152     #[allow(missing_debug_implementations)]
2153     pub struct SceKernelUtilsMd5Context {
2154         pub h: [u32; 4usize],
2155         pub pad: u32,
2156         pub us_remains: u16,
2157         pub us_computed: u16,
2158         pub ull_total_len: u64,
2159         pub buf: [u8; 64usize],
2160     }
2161 
2162     #[allow(missing_debug_implementations)]
2163     pub struct SceIoDirent {
2164         pub d_stat: SceIoStat,
2165         pub d_name: [u8; 256usize],
2166         pub d_private: *mut c_void,
2167         pub dummy: i32,
2168     }
2169 
2170     #[cfg_attr(feature = "extra_traits", derive(Debug))]
2171     pub struct ScePspFRect {
2172         pub x: f32,
2173         pub y: f32,
2174         pub w: f32,
2175         pub h: f32,
2176     }
2177 
2178     #[repr(align(16))]
2179     #[cfg_attr(feature = "extra_traits", derive(Debug))]
2180     pub struct ScePspFVector3 {
2181         pub x: f32,
2182         pub y: f32,
2183         pub z: f32,
2184     }
2185 
2186     #[repr(align(16))]
2187     #[cfg_attr(feature = "extra_traits", derive(Debug))]
2188     pub struct ScePspFVector4 {
2189         pub x: f32,
2190         pub y: f32,
2191         pub z: f32,
2192         pub w: f32,
2193     }
2194 
2195     #[cfg_attr(feature = "extra_traits", derive(Debug))]
2196     pub struct ScePspFVector4Unaligned {
2197         pub x: f32,
2198         pub y: f32,
2199         pub z: f32,
2200         pub w: f32,
2201     }
2202 
2203     #[cfg_attr(feature = "extra_traits", derive(Debug))]
2204     pub struct ScePspFVector2 {
2205         pub x: f32,
2206         pub y: f32,
2207     }
2208 
2209     #[cfg_attr(feature = "extra_traits", derive(Debug))]
2210     pub struct ScePspFMatrix2 {
2211         pub x: ScePspFVector2,
2212         pub y: ScePspFVector2,
2213     }
2214 
2215     #[cfg_attr(feature = "extra_traits", derive(Debug))]
2216     pub struct ScePspFMatrix3 {
2217         pub x: ScePspFVector3,
2218         pub y: ScePspFVector3,
2219         pub z: ScePspFVector3,
2220     }
2221 
2222     #[cfg_attr(feature = "extra_traits", derive(Debug))]
2223     #[repr(align(16))]
2224     pub struct ScePspFMatrix4 {
2225         pub x: ScePspFVector4,
2226         pub y: ScePspFVector4,
2227         pub z: ScePspFVector4,
2228         pub w: ScePspFVector4,
2229     }
2230 
2231     #[allow(missing_debug_implementations)]
2232     pub struct ScePspFMatrix4Unaligned {
2233         pub x: ScePspFVector4,
2234         pub y: ScePspFVector4,
2235         pub z: ScePspFVector4,
2236         pub w: ScePspFVector4,
2237     }
2238 
2239     #[allow(missing_debug_implementations)]
2240     pub union ScePspVector3 {
2241         pub fv: ScePspFVector3,
2242         pub iv: ScePspIVector3,
2243         pub f: [f32; 3usize],
2244         pub i: [i32; 3usize],
2245     }
2246 
2247     #[allow(missing_debug_implementations)]
2248     pub union ScePspVector4 {
2249         pub fv: ScePspFVector4,
2250         pub iv: ScePspIVector4,
2251         pub qw: u128,
2252         pub f: [f32; 4usize],
2253         pub i: [i32; 4usize],
2254     }
2255 
2256     #[allow(missing_debug_implementations)]
2257     pub union ScePspMatrix2 {
2258         pub fm: ScePspFMatrix2,
2259         pub im: ScePspIMatrix2,
2260         pub fv: [ScePspFVector2; 2usize],
2261         pub iv: [ScePspIVector2; 2usize],
2262         pub v: [ScePspVector2; 2usize],
2263         pub f: [[f32; 2usize]; 2usize],
2264         pub i: [[i32; 2usize]; 2usize],
2265     }
2266 
2267     #[allow(missing_debug_implementations)]
2268     pub union ScePspMatrix3 {
2269         pub fm: ScePspFMatrix3,
2270         pub im: ScePspIMatrix3,
2271         pub fv: [ScePspFVector3; 3usize],
2272         pub iv: [ScePspIVector3; 3usize],
2273         pub v: [ScePspVector3; 3usize],
2274         pub f: [[f32; 3usize]; 3usize],
2275         pub i: [[i32; 3usize]; 3usize],
2276     }
2277 
2278     #[allow(missing_debug_implementations)]
2279     pub union ScePspVector2 {
2280         pub fv: ScePspFVector2,
2281         pub iv: ScePspIVector2,
2282         pub f: [f32; 2usize],
2283         pub i: [i32; 2usize],
2284     }
2285 
2286     #[allow(missing_debug_implementations)]
2287     pub union ScePspMatrix4 {
2288         pub fm: ScePspFMatrix4,
2289         pub im: ScePspIMatrix4,
2290         pub fv: [ScePspFVector4; 4usize],
2291         pub iv: [ScePspIVector4; 4usize],
2292         pub v: [ScePspVector4; 4usize],
2293         pub f: [[f32; 4usize]; 4usize],
2294         pub i: [[i32; 4usize]; 4usize],
2295     }
2296 
2297     #[allow(missing_debug_implementations)]
2298     pub struct Key {
2299         pub key_type: KeyType,
2300         pub name: [u8; 256usize],
2301         pub name_len: u32,
2302         pub unk2: u32,
2303         pub unk3: u32,
2304     }
2305 
2306     #[allow(missing_debug_implementations)]
2307     pub struct UtilityMsgDialogParams {
2308         pub base: UtilityDialogCommon,
2309         pub unknown: i32,
2310         pub mode: UtilityMsgDialogMode,
2311         pub error_value: u32,
2312         pub message: [u8; 512usize],
2313         pub options: i32,
2314         pub button_pressed: UtilityMsgDialogPressed,
2315     }
2316 
2317     #[allow(missing_debug_implementations)]
2318     pub union UtilityNetData {
2319         pub as_uint: u32,
2320         pub as_string: [u8; 128usize],
2321     }
2322 
2323     #[allow(missing_debug_implementations)]
2324     pub struct UtilitySavedataSFOParam {
2325         pub title: [u8; 128usize],
2326         pub savedata_title: [u8; 128usize],
2327         pub detail: [u8; 1024usize],
2328         pub parental_level: u8,
2329         pub unknown: [u8; 3usize],
2330     }
2331 
2332     #[allow(missing_debug_implementations)]
2333     pub struct SceUtilitySavedataParam {
2334         pub base: UtilityDialogCommon,
2335         pub mode: UtilitySavedataMode,
2336         pub unknown1: i32,
2337         pub overwrite: i32,
2338         pub game_name: [u8; 13usize],
2339         pub reserved: [u8; 3usize],
2340         pub save_name: [u8; 20usize],
2341         pub save_name_list: *mut [u8; 20usize],
2342         pub file_name: [u8; 13usize],
2343         pub reserved1: [u8; 3usize],
2344         pub data_buf: *mut c_void,
2345         pub data_buf_size: usize,
2346         pub data_size: usize,
2347         pub sfo_param: UtilitySavedataSFOParam,
2348         pub icon0_file_data: UtilitySavedataFileData,
2349         pub icon1_file_data: UtilitySavedataFileData,
2350         pub pic1_file_data: UtilitySavedataFileData,
2351         pub snd0_file_data: UtilitySavedataFileData,
2352         pub new_data: *mut UtilitySavedataListSaveNewData,
2353         pub focus: UtilitySavedataFocus,
2354         pub unknown2: [i32; 4usize],
2355         pub key: [u8; 16],
2356         pub unknown3: [u8; 20],
2357     }
2358 
2359     #[allow(missing_debug_implementations)]
2360     pub struct SceNetAdhocctlPeerInfo {
2361         pub next: *mut SceNetAdhocctlPeerInfo,
2362         pub nickname: [u8; 128usize],
2363         pub mac: [u8; 6usize],
2364         pub unknown: [u8; 6usize],
2365         pub timestamp: u32,
2366     }
2367 
2368     #[allow(missing_debug_implementations)]
2369     pub struct SceNetAdhocctlParams {
2370         pub channel: i32,
2371         pub name: [u8; 8usize],
2372         pub bssid: [u8; 6usize],
2373         pub nickname: [u8; 128usize],
2374     }
2375 
2376     #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))]
2377     pub union SceNetApctlInfo {
2378         pub name: [u8; 64usize],
2379         pub bssid: [u8; 6usize],
2380         pub ssid: [u8; 32usize],
2381         pub ssid_length: u32,
2382         pub security_type: u32,
2383         pub strength: u8,
2384         pub channel: u8,
2385         pub power_save: u8,
2386         pub ip: [u8; 16usize],
2387         pub sub_net_mask: [u8; 16usize],
2388         pub gateway: [u8; 16usize],
2389         pub primary_dns: [u8; 16usize],
2390         pub secondary_dns: [u8; 16usize],
2391         pub use_proxy: u32,
2392         pub proxy_url: [u8; 128usize],
2393         pub proxy_port: u16,
2394         pub eap_type: u32,
2395         pub start_browser: u32,
2396         pub wifisp: u32,
2397     }
2398 }
2399 
2400 pub const INT_MIN: c_int = -2147483648;
2401 pub const INT_MAX: c_int = 2147483647;
2402 
2403 pub const AUDIO_VOLUME_MAX: u32 = 0x8000;
2404 pub const AUDIO_CHANNEL_MAX: u32 = 8;
2405 pub const AUDIO_NEXT_CHANNEL: i32 = -1;
2406 pub const AUDIO_SAMPLE_MIN: u32 = 64;
2407 pub const AUDIO_SAMPLE_MAX: u32 = 65472;
2408 
2409 pub const PSP_CTRL_SELECT: i32 = 0x000001;
2410 pub const PSP_CTRL_START: i32 = 0x000008;
2411 pub const PSP_CTRL_UP: i32 = 0x000010;
2412 pub const PSP_CTRL_RIGHT: i32 = 0x000020;
2413 pub const PSP_CTRL_DOWN: i32 = 0x000040;
2414 pub const PSP_CTRL_LEFT: i32 = 0x000080;
2415 pub const PSP_CTRL_LTRIGGER: i32 = 0x000100;
2416 pub const PSP_CTRL_RTRIGGER: i32 = 0x000200;
2417 pub const PSP_CTRL_TRIANGLE: i32 = 0x001000;
2418 pub const PSP_CTRL_CIRCLE: i32 = 0x002000;
2419 pub const PSP_CTRL_CROSS: i32 = 0x004000;
2420 pub const PSP_CTRL_SQUARE: i32 = 0x008000;
2421 pub const PSP_CTRL_HOME: i32 = 0x010000;
2422 pub const PSP_CTRL_HOLD: i32 = 0x020000;
2423 pub const PSP_CTRL_NOTE: i32 = 0x800000;
2424 pub const PSP_CTRL_SCREEN: i32 = 0x400000;
2425 pub const PSP_CTRL_VOLUP: i32 = 0x100000;
2426 pub const PSP_CTRL_VOLDOWN: i32 = 0x200000;
2427 pub const PSP_CTRL_WLAN_UP: i32 = 0x040000;
2428 pub const PSP_CTRL_REMOTE: i32 = 0x080000;
2429 pub const PSP_CTRL_DISC: i32 = 0x1000000;
2430 pub const PSP_CTRL_MS: i32 = 0x2000000;
2431 
2432 pub const USB_CAM_PID: i32 = 0x282;
2433 pub const USB_BUS_DRIVER_NAME: &str = "USBBusDriver";
2434 pub const USB_CAM_DRIVER_NAME: &str = "USBCamDriver";
2435 pub const USB_CAM_MIC_DRIVER_NAME: &str = "USBCamMicDriver";
2436 pub const USB_STOR_DRIVER_NAME: &str = "USBStor_Driver";
2437 
2438 pub const ACTIVATED: i32 = 0x200;
2439 pub const CONNECTED: i32 = 0x020;
2440 pub const ESTABLISHED: i32 = 0x002;
2441 
2442 pub const USB_CAM_FLIP: i32 = 1;
2443 pub const USB_CAM_MIRROR: i32 = 0x100;
2444 
2445 pub const THREAD_ATTR_VFPU: i32 = 0x00004000;
2446 pub const THREAD_ATTR_USER: i32 = 0x80000000;
2447 pub const THREAD_ATTR_USBWLAN: i32 = 0xa0000000;
2448 pub const THREAD_ATTR_VSH: i32 = 0xc0000000;
2449 pub const THREAD_ATTR_SCRATCH_SRAM: i32 = 0x00008000;
2450 pub const THREAD_ATTR_NO_FILLSTACK: i32 = 0x00100000;
2451 pub const THREAD_ATTR_CLEAR_STACK: i32 = 0x00200000;
2452 
2453 pub const EVENT_WAIT_MULTIPLE: i32 = 0x200;
2454 
2455 pub const EVENT_WAIT_AND: i32 = 0;
2456 pub const EVENT_WAIT_OR: i32 = 1;
2457 pub const EVENT_WAIT_CLEAR: i32 = 0x20;
2458 
2459 pub const POWER_INFO_POWER_SWITCH: i32 = 0x80000000;
2460 pub const POWER_INFO_HOLD_SWITCH: i32 = 0x40000000;
2461 pub const POWER_INFO_STANDBY: i32 = 0x00080000;
2462 pub const POWER_INFO_RESUME_COMPLETE: i32 = 0x00040000;
2463 pub const POWER_INFO_RESUMING: i32 = 0x00020000;
2464 pub const POWER_INFO_SUSPENDING: i32 = 0x00010000;
2465 pub const POWER_INFO_AC_POWER: i32 = 0x00001000;
2466 pub const POWER_INFO_BATTERY_LOW: i32 = 0x00000100;
2467 pub const POWER_INFO_BATTERY_EXIST: i32 = 0x00000080;
2468 pub const POWER_INFO_BATTERY_POWER: i32 = 0x0000007;
2469 
2470 pub const FIO_S_IFLNK: i32 = 0x4000;
2471 pub const FIO_S_IFDIR: i32 = 0x1000;
2472 pub const FIO_S_IFREG: i32 = 0x2000;
2473 pub const FIO_S_ISUID: i32 = 0x0800;
2474 pub const FIO_S_ISGID: i32 = 0x0400;
2475 pub const FIO_S_ISVTX: i32 = 0x0200;
2476 pub const FIO_S_IRUSR: i32 = 0x0100;
2477 pub const FIO_S_IWUSR: i32 = 0x0080;
2478 pub const FIO_S_IXUSR: i32 = 0x0040;
2479 pub const FIO_S_IRGRP: i32 = 0x0020;
2480 pub const FIO_S_IWGRP: i32 = 0x0010;
2481 pub const FIO_S_IXGRP: i32 = 0x0008;
2482 pub const FIO_S_IROTH: i32 = 0x0004;
2483 pub const FIO_S_IWOTH: i32 = 0x0002;
2484 pub const FIO_S_IXOTH: i32 = 0x0001;
2485 
2486 pub const FIO_SO_IFLNK: i32 = 0x0008;
2487 pub const FIO_SO_IFDIR: i32 = 0x0010;
2488 pub const FIO_SO_IFREG: i32 = 0x0020;
2489 pub const FIO_SO_IROTH: i32 = 0x0004;
2490 pub const FIO_SO_IWOTH: i32 = 0x0002;
2491 pub const FIO_SO_IXOTH: i32 = 0x0001;
2492 
2493 pub const PSP_O_RD_ONLY: i32 = 0x0001;
2494 pub const PSP_O_WR_ONLY: i32 = 0x0002;
2495 pub const PSP_O_RD_WR: i32 = 0x0003;
2496 pub const PSP_O_NBLOCK: i32 = 0x0004;
2497 pub const PSP_O_DIR: i32 = 0x0008;
2498 pub const PSP_O_APPEND: i32 = 0x0100;
2499 pub const PSP_O_CREAT: i32 = 0x0200;
2500 pub const PSP_O_TRUNC: i32 = 0x0400;
2501 pub const PSP_O_EXCL: i32 = 0x0800;
2502 pub const PSP_O_NO_WAIT: i32 = 0x8000;
2503 
2504 pub const UMD_NOT_PRESENT: i32 = 0x01;
2505 pub const UMD_PRESENT: i32 = 0x02;
2506 pub const UMD_CHANGED: i32 = 0x04;
2507 pub const UMD_INITING: i32 = 0x08;
2508 pub const UMD_INITED: i32 = 0x10;
2509 pub const UMD_READY: i32 = 0x20;
2510 
2511 pub const PLAY_PAUSE: i32 = 0x1;
2512 pub const FORWARD: i32 = 0x4;
2513 pub const BACK: i32 = 0x8;
2514 pub const VOL_UP: i32 = 0x10;
2515 pub const VOL_DOWN: i32 = 0x20;
2516 pub const HOLD: i32 = 0x80;
2517 
2518 pub const GU_PI: f32 = 3.141593;
2519 
2520 pub const GU_TEXTURE_8BIT: i32 = 1;
2521 pub const GU_TEXTURE_16BIT: i32 = 2;
2522 pub const GU_TEXTURE_32BITF: i32 = 3;
2523 pub const GU_COLOR_5650: i32 = 4 << 2;
2524 pub const GU_COLOR_5551: i32 = 5 << 2;
2525 pub const GU_COLOR_4444: i32 = 6 << 2;
2526 pub const GU_COLOR_8888: i32 = 7 << 2;
2527 pub const GU_NORMAL_8BIT: i32 = 1 << 5;
2528 pub const GU_NORMAL_16BIT: i32 = 2 << 5;
2529 pub const GU_NORMAL_32BITF: i32 = 3 << 5;
2530 pub const GU_VERTEX_8BIT: i32 = 1 << 7;
2531 pub const GU_VERTEX_16BIT: i32 = 2 << 7;
2532 pub const GU_VERTEX_32BITF: i32 = 3 << 7;
2533 pub const GU_WEIGHT_8BIT: i32 = 1 << 9;
2534 pub const GU_WEIGHT_16BIT: i32 = 2 << 9;
2535 pub const GU_WEIGHT_32BITF: i32 = 3 << 9;
2536 pub const GU_INDEX_8BIT: i32 = 1 << 11;
2537 pub const GU_INDEX_16BIT: i32 = 2 << 11;
2538 pub const GU_WEIGHTS1: i32 = (((1 - 1) & 7) << 14) as i32;
2539 pub const GU_WEIGHTS2: i32 = (((2 - 1) & 7) << 14) as i32;
2540 pub const GU_WEIGHTS3: i32 = (((3 - 1) & 7) << 14) as i32;
2541 pub const GU_WEIGHTS4: i32 = (((4 - 1) & 7) << 14) as i32;
2542 pub const GU_WEIGHTS5: i32 = (((5 - 1) & 7) << 14) as i32;
2543 pub const GU_WEIGHTS6: i32 = (((6 - 1) & 7) << 14) as i32;
2544 pub const GU_WEIGHTS7: i32 = (((7 - 1) & 7) << 14) as i32;
2545 pub const GU_WEIGHTS8: i32 = (((8 - 1) & 7) << 14) as i32;
2546 pub const GU_VERTICES1: i32 = (((1 - 1) & 7) << 18) as i32;
2547 pub const GU_VERTICES2: i32 = (((2 - 1) & 7) << 18) as i32;
2548 pub const GU_VERTICES3: i32 = (((3 - 1) & 7) << 18) as i32;
2549 pub const GU_VERTICES4: i32 = (((4 - 1) & 7) << 18) as i32;
2550 pub const GU_VERTICES5: i32 = (((5 - 1) & 7) << 18) as i32;
2551 pub const GU_VERTICES6: i32 = (((6 - 1) & 7) << 18) as i32;
2552 pub const GU_VERTICES7: i32 = (((7 - 1) & 7) << 18) as i32;
2553 pub const GU_VERTICES8: i32 = (((8 - 1) & 7) << 18) as i32;
2554 pub const GU_TRANSFORM_2D: i32 = 1 << 23;
2555 pub const GU_TRANSFORM_3D: i32 = 0;
2556 
2557 pub const GU_COLOR_BUFFER_BIT: i32 = 1;
2558 pub const GU_STENCIL_BUFFER_BIT: i32 = 2;
2559 pub const GU_DEPTH_BUFFER_BIT: i32 = 4;
2560 pub const GU_FAST_CLEAR_BIT: i32 = 16;
2561 
2562 pub const GU_AMBIENT: i32 = 1;
2563 pub const GU_DIFFUSE: i32 = 2;
2564 pub const GU_SPECULAR: i32 = 4;
2565 pub const GU_UNKNOWN_LIGHT_COMPONENT: i32 = 8;
2566 
2567 pub const SYSTEM_REGISTRY: [u8; 7] = *b"/system";
2568 pub const REG_KEYNAME_SIZE: u32 = 27;
2569 
2570 pub const UTILITY_MSGDIALOG_ERROR: i32 = 0;
2571 pub const UTILITY_MSGDIALOG_TEXT: i32 = 1;
2572 pub const UTILITY_MSGDIALOG_YES_NO_BUTTONS: i32 = 0x10;
2573 pub const UTILITY_MSGDIALOG_DEFAULT_NO: i32 = 0x100;
2574 
2575 pub const UTILITY_HTMLVIEWER_OPEN_SCE_START_PAGE: i32 = 0x000001;
2576 pub const UTILITY_HTMLVIEWER_DISABLE_STARTUP_LIMITS: i32 = 0x000002;
2577 pub const UTILITY_HTMLVIEWER_DISABLE_EXIT_DIALOG: i32 = 0x000004;
2578 pub const UTILITY_HTMLVIEWER_DISABLE_CURSOR: i32 = 0x000008;
2579 pub const UTILITY_HTMLVIEWER_DISABLE_DOWNLOAD_COMPLETE_DIALOG: i32 = 0x000010;
2580 pub const UTILITY_HTMLVIEWER_DISABLE_DOWNLOAD_START_DIALOG: i32 = 0x000020;
2581 pub const UTILITY_HTMLVIEWER_DISABLE_DOWNLOAD_DESTINATION_DIALOG: i32 = 0x000040;
2582 pub const UTILITY_HTMLVIEWER_LOCK_DOWNLOAD_DESTINATION_DIALOG: i32 = 0x000080;
2583 pub const UTILITY_HTMLVIEWER_DISABLE_TAB_DISPLAY: i32 = 0x000100;
2584 pub const UTILITY_HTMLVIEWER_ENABLE_ANALOG_HOLD: i32 = 0x000200;
2585 pub const UTILITY_HTMLVIEWER_ENABLE_FLASH: i32 = 0x000400;
2586 pub const UTILITY_HTMLVIEWER_DISABLE_LRTRIGGER: i32 = 0x000800;
2587 
2588 extern "C" {
2589     pub fn sceAudioChReserve(channel: i32, sample_count: i32, format: AudioFormat) -> i32;
2590     pub fn sceAudioChRelease(channel: i32) -> i32;
2591     pub fn sceAudioOutput(channel: i32, vol: i32, buf: *mut c_void) -> i32;
2592     pub fn sceAudioOutputBlocking(channel: i32, vol: i32, buf: *mut c_void) -> i32;
2593     pub fn sceAudioOutputPanned(
2594         channel: i32,
2595         left_vol: i32,
2596         right_vol: i32,
2597         buf: *mut c_void,
2598     ) -> i32;
2599     pub fn sceAudioOutputPannedBlocking(
2600         channel: i32,
2601         left_vol: i32,
2602         right_vol: i32,
2603         buf: *mut c_void,
2604     ) -> i32;
2605     pub fn sceAudioGetChannelRestLen(channel: i32) -> i32;
2606     pub fn sceAudioGetChannelRestLength(channel: i32) -> i32;
2607     pub fn sceAudioSetChannelDataLen(channel: i32, sample_count: i32) -> i32;
2608     pub fn sceAudioChangeChannelConfig(channel: i32, format: AudioFormat) -> i32;
2609     pub fn sceAudioChangeChannelVolume(channel: i32, left_vol: i32, right_vol: i32) -> i32;
2610     pub fn sceAudioOutput2Reserve(sample_count: i32) -> i32;
2611     pub fn sceAudioOutput2Release() -> i32;
2612     pub fn sceAudioOutput2ChangeLength(sample_count: i32) -> i32;
2613     pub fn sceAudioOutput2OutputBlocking(vol: i32, buf: *mut c_void) -> i32;
2614     pub fn sceAudioOutput2GetRestSample() -> i32;
2615     pub fn sceAudioSRCChReserve(
2616         sample_count: i32,
2617         freq: AudioOutputFrequency,
2618         channels: i32,
2619     ) -> i32;
2620     pub fn sceAudioSRCChRelease() -> i32;
2621     pub fn sceAudioSRCOutputBlocking(vol: i32, buf: *mut c_void) -> i32;
2622     pub fn sceAudioInputInit(unknown1: i32, gain: i32, unknown2: i32) -> i32;
2623     pub fn sceAudioInputInitEx(params: *mut AudioInputParams) -> i32;
2624     pub fn sceAudioInputBlocking(sample_count: i32, freq: AudioInputFrequency, buf: *mut c_void);
2625     pub fn sceAudioInput(sample_count: i32, freq: AudioInputFrequency, buf: *mut c_void);
2626     pub fn sceAudioGetInputLength() -> i32;
2627     pub fn sceAudioWaitInputEnd() -> i32;
2628     pub fn sceAudioPollInputEnd() -> i32;
2629 
2630     pub fn sceAtracGetAtracID(ui_codec_type: u32) -> i32;
2631     pub fn sceAtracSetDataAndGetID(buf: *mut c_void, bufsize: usize) -> i32;
2632     pub fn sceAtracDecodeData(
2633         atrac_id: i32,
2634         out_samples: *mut u16,
2635         out_n: *mut i32,
2636         out_end: *mut i32,
2637         out_remain_frame: *mut i32,
2638     ) -> i32;
2639     pub fn sceAtracGetRemainFrame(atrac_id: i32, out_remain_frame: *mut i32) -> i32;
2640     pub fn sceAtracGetStreamDataInfo(
2641         atrac_id: i32,
2642         write_pointer: *mut *mut u8,
2643         available_bytes: *mut u32,
2644         read_offset: *mut u32,
2645     ) -> i32;
2646     pub fn sceAtracAddStreamData(atrac_id: i32, bytes_to_add: u32) -> i32;
2647     pub fn sceAtracGetBitrate(atrac_id: i32, out_bitrate: *mut i32) -> i32;
2648     pub fn sceAtracSetLoopNum(atrac_id: i32, nloops: i32) -> i32;
2649     pub fn sceAtracReleaseAtracID(atrac_id: i32) -> i32;
2650     pub fn sceAtracGetNextSample(atrac_id: i32, out_n: *mut i32) -> i32;
2651     pub fn sceAtracGetMaxSample(atrac_id: i32, out_max: *mut i32) -> i32;
2652     pub fn sceAtracGetBufferInfoForReseting(
2653         atrac_id: i32,
2654         ui_sample: u32,
2655         pbuffer_info: *mut Atrac3BufferInfo,
2656     ) -> i32;
2657     pub fn sceAtracGetChannel(atrac_id: i32, pui_channel: *mut u32) -> i32;
2658     pub fn sceAtracGetInternalErrorInfo(atrac_id: i32, pi_result: *mut i32) -> i32;
2659     pub fn sceAtracGetLoopStatus(
2660         atrac_id: i32,
2661         pi_loop_num: *mut i32,
2662         pui_loop_status: *mut u32,
2663     ) -> i32;
2664     pub fn sceAtracGetNextDecodePosition(atrac_id: i32, pui_sample_position: *mut u32) -> i32;
2665     pub fn sceAtracGetSecondBufferInfo(
2666         atrac_id: i32,
2667         pui_position: *mut u32,
2668         pui_data_byte: *mut u32,
2669     ) -> i32;
2670     pub fn sceAtracGetSoundSample(
2671         atrac_id: i32,
2672         pi_end_sample: *mut i32,
2673         pi_loop_start_sample: *mut i32,
2674         pi_loop_end_sample: *mut i32,
2675     ) -> i32;
2676     pub fn sceAtracResetPlayPosition(
2677         atrac_id: i32,
2678         ui_sample: u32,
2679         ui_write_byte_first_buf: u32,
2680         ui_write_byte_second_buf: u32,
2681     ) -> i32;
2682     pub fn sceAtracSetData(atrac_id: i32, puc_buffer_addr: *mut u8, ui_buffer_byte: u32) -> i32;
2683     pub fn sceAtracSetHalfwayBuffer(
2684         atrac_id: i32,
2685         puc_buffer_addr: *mut u8,
2686         ui_read_byte: u32,
2687         ui_buffer_byte: u32,
2688     ) -> i32;
2689     pub fn sceAtracSetHalfwayBufferAndGetID(
2690         puc_buffer_addr: *mut u8,
2691         ui_read_byte: u32,
2692         ui_buffer_byte: u32,
2693     ) -> i32;
2694     pub fn sceAtracSetSecondBuffer(
2695         atrac_id: i32,
2696         puc_second_buffer_addr: *mut u8,
2697         ui_second_buffer_byte: u32,
2698     ) -> i32;
2699 
2700     pub fn sceCtrlSetSamplingCycle(cycle: i32) -> i32;
2701     pub fn sceCtrlGetSamplingCycle(pcycle: *mut i32) -> i32;
2702     pub fn sceCtrlSetSamplingMode(mode: CtrlMode) -> i32;
2703     pub fn sceCtrlGetSamplingMode(pmode: *mut i32) -> i32;
2704     pub fn sceCtrlPeekBufferPositive(pad_data: *mut SceCtrlData, count: i32) -> i32;
2705     pub fn sceCtrlPeekBufferNegative(pad_data: *mut SceCtrlData, count: i32) -> i32;
2706     pub fn sceCtrlReadBufferPositive(pad_data: *mut SceCtrlData, count: i32) -> i32;
2707     pub fn sceCtrlReadBufferNegative(pad_data: *mut SceCtrlData, count: i32) -> i32;
2708     pub fn sceCtrlPeekLatch(latch_data: *mut SceCtrlLatch) -> i32;
2709     pub fn sceCtrlReadLatch(latch_data: *mut SceCtrlLatch) -> i32;
2710     pub fn sceCtrlSetIdleCancelThreshold(idlereset: i32, idleback: i32) -> i32;
2711     pub fn sceCtrlGetIdleCancelThreshold(idlereset: *mut i32, idleback: *mut i32) -> i32;
2712 
2713     pub fn sceDisplaySetMode(mode: DisplayMode, width: usize, height: usize) -> u32;
2714     pub fn sceDisplayGetMode(pmode: *mut i32, pwidth: *mut i32, pheight: *mut i32) -> i32;
2715     pub fn sceDisplaySetFrameBuf(
2716         top_addr: *const u8,
2717         buffer_width: usize,
2718         pixel_format: DisplayPixelFormat,
2719         sync: DisplaySetBufSync,
2720     ) -> u32;
2721     pub fn sceDisplayGetFrameBuf(
2722         top_addr: *mut *mut c_void,
2723         buffer_width: *mut usize,
2724         pixel_format: *mut DisplayPixelFormat,
2725         sync: DisplaySetBufSync,
2726     ) -> i32;
2727     pub fn sceDisplayGetVcount() -> u32;
2728     pub fn sceDisplayWaitVblank() -> i32;
2729     pub fn sceDisplayWaitVblankCB() -> i32;
2730     pub fn sceDisplayWaitVblankStart() -> i32;
2731     pub fn sceDisplayWaitVblankStartCB() -> i32;
2732     pub fn sceDisplayGetAccumulatedHcount() -> i32;
2733     pub fn sceDisplayGetCurrentHcount() -> i32;
2734     pub fn sceDisplayGetFramePerSec() -> f32;
2735     pub fn sceDisplayIsForeground() -> i32;
2736     pub fn sceDisplayIsVblank() -> i32;
2737 
2738     pub fn sceGeEdramGetSize() -> u32;
2739     pub fn sceGeEdramGetAddr() -> *mut u8;
2740     pub fn sceGeEdramSetAddrTranslation(width: i32) -> i32;
2741     pub fn sceGeGetCmd(cmd: i32) -> u32;
2742     pub fn sceGeGetMtx(type_: GeMatrixType, matrix: *mut c_void) -> i32;
2743     pub fn sceGeGetStack(stack_id: i32, stack: *mut GeStack) -> i32;
2744     pub fn sceGeSaveContext(context: *mut GeContext) -> i32;
2745     pub fn sceGeRestoreContext(context: *const GeContext) -> i32;
2746     pub fn sceGeListEnQueue(
2747         list: *const c_void,
2748         stall: *mut c_void,
2749         cbid: i32,
2750         arg: *mut GeListArgs,
2751     ) -> i32;
2752     pub fn sceGeListEnQueueHead(
2753         list: *const c_void,
2754         stall: *mut c_void,
2755         cbid: i32,
2756         arg: *mut GeListArgs,
2757     ) -> i32;
2758     pub fn sceGeListDeQueue(qid: i32) -> i32;
2759     pub fn sceGeListUpdateStallAddr(qid: i32, stall: *mut c_void) -> i32;
2760     pub fn sceGeListSync(qid: i32, sync_type: i32) -> GeListState;
2761     pub fn sceGeDrawSync(sync_type: i32) -> GeListState;
2762     pub fn sceGeBreak(mode: i32, p_param: *mut GeBreakParam) -> i32;
2763     pub fn sceGeContinue() -> i32;
2764     pub fn sceGeSetCallback(cb: *mut GeCallbackData) -> i32;
2765     pub fn sceGeUnsetCallback(cbid: i32) -> i32;
2766 
2767     pub fn sceKernelExitGame();
2768     pub fn sceKernelRegisterExitCallback(id: SceUid) -> i32;
2769     pub fn sceKernelLoadExec(file: *const u8, param: *mut SceKernelLoadExecParam) -> i32;
2770 
2771     pub fn sceKernelAllocPartitionMemory(
2772         partition: SceSysMemPartitionId,
2773         name: *const u8,
2774         type_: SceSysMemBlockTypes,
2775         size: u32,
2776         addr: *mut c_void,
2777     ) -> SceUid;
2778     pub fn sceKernelGetBlockHeadAddr(blockid: SceUid) -> *mut c_void;
2779     pub fn sceKernelFreePartitionMemory(blockid: SceUid) -> i32;
2780     pub fn sceKernelTotalFreeMemSize() -> usize;
2781     pub fn sceKernelMaxFreeMemSize() -> usize;
2782     pub fn sceKernelDevkitVersion() -> u32;
2783     pub fn sceKernelSetCompiledSdkVersion(version: u32) -> i32;
2784     pub fn sceKernelGetCompiledSdkVersion() -> u32;
2785 
2786     pub fn sceKernelLibcTime(t: *mut i32) -> i32;
2787     pub fn sceKernelLibcClock() -> u32;
2788     pub fn sceKernelLibcGettimeofday(tp: *mut timeval, tzp: *mut timezone) -> i32;
2789     pub fn sceKernelDcacheWritebackAll();
2790     pub fn sceKernelDcacheWritebackInvalidateAll();
2791     pub fn sceKernelDcacheWritebackRange(p: *const c_void, size: u32);
2792     pub fn sceKernelDcacheWritebackInvalidateRange(p: *const c_void, size: u32);
2793     pub fn sceKernelDcacheInvalidateRange(p: *const c_void, size: u32);
2794     pub fn sceKernelIcacheInvalidateAll();
2795     pub fn sceKernelIcacheInvalidateRange(p: *const c_void, size: u32);
2796     pub fn sceKernelUtilsMt19937Init(ctx: *mut SceKernelUtilsMt19937Context, seed: u32) -> i32;
2797     pub fn sceKernelUtilsMt19937UInt(ctx: *mut SceKernelUtilsMt19937Context) -> u32;
2798     pub fn sceKernelUtilsMd5Digest(data: *mut u8, size: u32, digest: *mut u8) -> i32;
2799     pub fn sceKernelUtilsMd5BlockInit(ctx: *mut SceKernelUtilsMd5Context) -> i32;
2800     pub fn sceKernelUtilsMd5BlockUpdate(
2801         ctx: *mut SceKernelUtilsMd5Context,
2802         data: *mut u8,
2803         size: u32,
2804     ) -> i32;
2805     pub fn sceKernelUtilsMd5BlockResult(ctx: *mut SceKernelUtilsMd5Context, digest: *mut u8)
2806         -> i32;
2807     pub fn sceKernelUtilsSha1Digest(data: *mut u8, size: u32, digest: *mut u8) -> i32;
2808     pub fn sceKernelUtilsSha1BlockInit(ctx: *mut SceKernelUtilsSha1Context) -> i32;
2809     pub fn sceKernelUtilsSha1BlockUpdate(
2810         ctx: *mut SceKernelUtilsSha1Context,
2811         data: *mut u8,
2812         size: u32,
2813     ) -> i32;
2814     pub fn sceKernelUtilsSha1BlockResult(
2815         ctx: *mut SceKernelUtilsSha1Context,
2816         digest: *mut u8,
2817     ) -> i32;
2818 
2819     pub fn sceKernelRegisterSubIntrHandler(
2820         int_no: i32,
2821         no: i32,
2822         handler: *mut c_void,
2823         arg: *mut c_void,
2824     ) -> i32;
2825     pub fn sceKernelReleaseSubIntrHandler(int_no: i32, no: i32) -> i32;
2826     pub fn sceKernelEnableSubIntr(int_no: i32, no: i32) -> i32;
2827     pub fn sceKernelDisableSubIntr(int_no: i32, no: i32) -> i32;
2828     pub fn QueryIntrHandlerInfo(
2829         intr_code: SceUid,
2830         sub_intr_code: SceUid,
2831         data: *mut IntrHandlerOptionParam,
2832     ) -> i32;
2833 
2834     pub fn sceKernelCpuSuspendIntr() -> u32;
2835     pub fn sceKernelCpuResumeIntr(flags: u32);
2836     pub fn sceKernelCpuResumeIntrWithSync(flags: u32);
2837     pub fn sceKernelIsCpuIntrSuspended(flags: u32) -> i32;
2838     pub fn sceKernelIsCpuIntrEnable() -> i32;
2839 
2840     pub fn sceKernelLoadModule(
2841         path: *const u8,
2842         flags: i32,
2843         option: *mut SceKernelLMOption,
2844     ) -> SceUid;
2845     pub fn sceKernelLoadModuleMs(
2846         path: *const u8,
2847         flags: i32,
2848         option: *mut SceKernelLMOption,
2849     ) -> SceUid;
2850     pub fn sceKernelLoadModuleByID(
2851         fid: SceUid,
2852         flags: i32,
2853         option: *mut SceKernelLMOption,
2854     ) -> SceUid;
2855     pub fn sceKernelLoadModuleBufferUsbWlan(
2856         buf_size: usize,
2857         buf: *mut c_void,
2858         flags: i32,
2859         option: *mut SceKernelLMOption,
2860     ) -> SceUid;
2861     pub fn sceKernelStartModule(
2862         mod_id: SceUid,
2863         arg_size: usize,
2864         argp: *mut c_void,
2865         status: *mut i32,
2866         option: *mut SceKernelSMOption,
2867     ) -> i32;
2868     pub fn sceKernelStopModule(
2869         mod_id: SceUid,
2870         arg_size: usize,
2871         argp: *mut c_void,
2872         status: *mut i32,
2873         option: *mut SceKernelSMOption,
2874     ) -> i32;
2875     pub fn sceKernelUnloadModule(mod_id: SceUid) -> i32;
2876     pub fn sceKernelSelfStopUnloadModule(unknown: i32, arg_size: usize, argp: *mut c_void) -> i32;
2877     pub fn sceKernelStopUnloadSelfModule(
2878         arg_size: usize,
2879         argp: *mut c_void,
2880         status: *mut i32,
2881         option: *mut SceKernelSMOption,
2882     ) -> i32;
2883     pub fn sceKernelQueryModuleInfo(mod_id: SceUid, info: *mut SceKernelModuleInfo) -> i32;
2884     pub fn sceKernelGetModuleIdList(
2885         read_buf: *mut SceUid,
2886         read_buf_size: i32,
2887         id_count: *mut i32,
2888     ) -> i32;
2889 
2890     pub fn sceKernelVolatileMemLock(unk: i32, ptr: *mut *mut c_void, size: *mut i32) -> i32;
2891     pub fn sceKernelVolatileMemTryLock(unk: i32, ptr: *mut *mut c_void, size: *mut i32) -> i32;
2892     pub fn sceKernelVolatileMemUnlock(unk: i32) -> i32;
2893 
2894     pub fn sceKernelStdin() -> SceUid;
2895     pub fn sceKernelStdout() -> SceUid;
2896     pub fn sceKernelStderr() -> SceUid;
2897 
2898     pub fn sceKernelGetThreadmanIdType(uid: SceUid) -> SceKernelIdListType;
2899     pub fn sceKernelCreateThread(
2900         name: *const u8,
2901         entry: SceKernelThreadEntry,
2902         init_priority: i32,
2903         stack_size: i32,
2904         attr: i32,
2905         option: *mut SceKernelThreadOptParam,
2906     ) -> SceUid;
2907     pub fn sceKernelDeleteThread(thid: SceUid) -> i32;
2908     pub fn sceKernelStartThread(id: SceUid, arg_len: usize, arg_p: *mut c_void) -> i32;
2909     pub fn sceKernelExitThread(status: i32) -> i32;
2910     pub fn sceKernelExitDeleteThread(status: i32) -> i32;
2911     pub fn sceKernelTerminateThread(thid: SceUid) -> i32;
2912     pub fn sceKernelTerminateDeleteThread(thid: SceUid) -> i32;
2913     pub fn sceKernelSuspendDispatchThread() -> i32;
2914     pub fn sceKernelResumeDispatchThread(state: i32) -> i32;
2915     pub fn sceKernelSleepThread() -> i32;
2916     pub fn sceKernelSleepThreadCB() -> i32;
2917     pub fn sceKernelWakeupThread(thid: SceUid) -> i32;
2918     pub fn sceKernelCancelWakeupThread(thid: SceUid) -> i32;
2919     pub fn sceKernelSuspendThread(thid: SceUid) -> i32;
2920     pub fn sceKernelResumeThread(thid: SceUid) -> i32;
2921     pub fn sceKernelWaitThreadEnd(thid: SceUid, timeout: *mut u32) -> i32;
2922     pub fn sceKernelWaitThreadEndCB(thid: SceUid, timeout: *mut u32) -> i32;
2923     pub fn sceKernelDelayThread(delay: u32) -> i32;
2924     pub fn sceKernelDelayThreadCB(delay: u32) -> i32;
2925     pub fn sceKernelDelaySysClockThread(delay: *mut SceKernelSysClock) -> i32;
2926     pub fn sceKernelDelaySysClockThreadCB(delay: *mut SceKernelSysClock) -> i32;
2927     pub fn sceKernelChangeCurrentThreadAttr(unknown: i32, attr: i32) -> i32;
2928     pub fn sceKernelChangeThreadPriority(thid: SceUid, priority: i32) -> i32;
2929     pub fn sceKernelRotateThreadReadyQueue(priority: i32) -> i32;
2930     pub fn sceKernelReleaseWaitThread(thid: SceUid) -> i32;
2931     pub fn sceKernelGetThreadId() -> i32;
2932     pub fn sceKernelGetThreadCurrentPriority() -> i32;
2933     pub fn sceKernelGetThreadExitStatus(thid: SceUid) -> i32;
2934     pub fn sceKernelCheckThreadStack() -> i32;
2935     pub fn sceKernelGetThreadStackFreeSize(thid: SceUid) -> i32;
2936     pub fn sceKernelReferThreadStatus(thid: SceUid, info: *mut SceKernelThreadInfo) -> i32;
2937     pub fn sceKernelReferThreadRunStatus(
2938         thid: SceUid,
2939         status: *mut SceKernelThreadRunStatus,
2940     ) -> i32;
2941     pub fn sceKernelCreateSema(
2942         name: *const u8,
2943         attr: u32,
2944         init_val: i32,
2945         max_val: i32,
2946         option: *mut SceKernelSemaOptParam,
2947     ) -> SceUid;
2948     pub fn sceKernelDeleteSema(sema_id: SceUid) -> i32;
2949     pub fn sceKernelSignalSema(sema_id: SceUid, signal: i32) -> i32;
2950     pub fn sceKernelWaitSema(sema_id: SceUid, signal: i32, timeout: *mut u32) -> i32;
2951     pub fn sceKernelWaitSemaCB(sema_id: SceUid, signal: i32, timeout: *mut u32) -> i32;
2952     pub fn sceKernelPollSema(sema_id: SceUid, signal: i32) -> i32;
2953     pub fn sceKernelReferSemaStatus(sema_id: SceUid, info: *mut SceKernelSemaInfo) -> i32;
2954     pub fn sceKernelCreateEventFlag(
2955         name: *const u8,
2956         attr: i32,
2957         bits: i32,
2958         opt: *mut SceKernelEventFlagOptParam,
2959     ) -> SceUid;
2960     pub fn sceKernelSetEventFlag(ev_id: SceUid, bits: u32) -> i32;
2961     pub fn sceKernelClearEventFlag(ev_id: SceUid, bits: u32) -> i32;
2962     pub fn sceKernelPollEventFlag(ev_id: SceUid, bits: u32, wait: i32, out_bits: *mut u32) -> i32;
2963     pub fn sceKernelWaitEventFlag(
2964         ev_id: SceUid,
2965         bits: u32,
2966         wait: i32,
2967         out_bits: *mut u32,
2968         timeout: *mut u32,
2969     ) -> i32;
2970     pub fn sceKernelWaitEventFlagCB(
2971         ev_id: SceUid,
2972         bits: u32,
2973         wait: i32,
2974         out_bits: *mut u32,
2975         timeout: *mut u32,
2976     ) -> i32;
2977     pub fn sceKernelDeleteEventFlag(ev_id: SceUid) -> i32;
2978     pub fn sceKernelReferEventFlagStatus(event: SceUid, status: *mut SceKernelEventFlagInfo)
2979         -> i32;
2980     pub fn sceKernelCreateMbx(
2981         name: *const u8,
2982         attr: u32,
2983         option: *mut SceKernelMbxOptParam,
2984     ) -> SceUid;
2985     pub fn sceKernelDeleteMbx(mbx_id: SceUid) -> i32;
2986     pub fn sceKernelSendMbx(mbx_id: SceUid, message: *mut c_void) -> i32;
2987     pub fn sceKernelReceiveMbx(mbx_id: SceUid, message: *mut *mut c_void, timeout: *mut u32)
2988         -> i32;
2989     pub fn sceKernelReceiveMbxCB(
2990         mbx_id: SceUid,
2991         message: *mut *mut c_void,
2992         timeout: *mut u32,
2993     ) -> i32;
2994     pub fn sceKernelPollMbx(mbx_id: SceUid, pmessage: *mut *mut c_void) -> i32;
2995     pub fn sceKernelCancelReceiveMbx(mbx_id: SceUid, num: *mut i32) -> i32;
2996     pub fn sceKernelReferMbxStatus(mbx_id: SceUid, info: *mut SceKernelMbxInfo) -> i32;
2997     pub fn sceKernelSetAlarm(
2998         clock: u32,
2999         handler: SceKernelAlarmHandler,
3000         common: *mut c_void,
3001     ) -> SceUid;
3002     pub fn sceKernelSetSysClockAlarm(
3003         clock: *mut SceKernelSysClock,
3004         handler: *mut SceKernelAlarmHandler,
3005         common: *mut c_void,
3006     ) -> SceUid;
3007     pub fn sceKernelCancelAlarm(alarm_id: SceUid) -> i32;
3008     pub fn sceKernelReferAlarmStatus(alarm_id: SceUid, info: *mut SceKernelAlarmInfo) -> i32;
3009     pub fn sceKernelCreateCallback(
3010         name: *const u8,
3011         func: SceKernelCallbackFunction,
3012         arg: *mut c_void,
3013     ) -> SceUid;
3014     pub fn sceKernelReferCallbackStatus(cb: SceUid, status: *mut SceKernelCallbackInfo) -> i32;
3015     pub fn sceKernelDeleteCallback(cb: SceUid) -> i32;
3016     pub fn sceKernelNotifyCallback(cb: SceUid, arg2: i32) -> i32;
3017     pub fn sceKernelCancelCallback(cb: SceUid) -> i32;
3018     pub fn sceKernelGetCallbackCount(cb: SceUid) -> i32;
3019     pub fn sceKernelCheckCallback() -> i32;
3020     pub fn sceKernelGetThreadmanIdList(
3021         type_: SceKernelIdListType,
3022         read_buf: *mut SceUid,
3023         read_buf_size: i32,
3024         id_count: *mut i32,
3025     ) -> i32;
3026     pub fn sceKernelReferSystemStatus(status: *mut SceKernelSystemStatus) -> i32;
3027     pub fn sceKernelCreateMsgPipe(
3028         name: *const u8,
3029         part: i32,
3030         attr: i32,
3031         unk1: *mut c_void,
3032         opt: *mut c_void,
3033     ) -> SceUid;
3034     pub fn sceKernelDeleteMsgPipe(uid: SceUid) -> i32;
3035     pub fn sceKernelSendMsgPipe(
3036         uid: SceUid,
3037         message: *mut c_void,
3038         size: u32,
3039         unk1: i32,
3040         unk2: *mut c_void,
3041         timeout: *mut u32,
3042     ) -> i32;
3043     pub fn sceKernelSendMsgPipeCB(
3044         uid: SceUid,
3045         message: *mut c_void,
3046         size: u32,
3047         unk1: i32,
3048         unk2: *mut c_void,
3049         timeout: *mut u32,
3050     ) -> i32;
3051     pub fn sceKernelTrySendMsgPipe(
3052         uid: SceUid,
3053         message: *mut c_void,
3054         size: u32,
3055         unk1: i32,
3056         unk2: *mut c_void,
3057     ) -> i32;
3058     pub fn sceKernelReceiveMsgPipe(
3059         uid: SceUid,
3060         message: *mut c_void,
3061         size: u32,
3062         unk1: i32,
3063         unk2: *mut c_void,
3064         timeout: *mut u32,
3065     ) -> i32;
3066     pub fn sceKernelReceiveMsgPipeCB(
3067         uid: SceUid,
3068         message: *mut c_void,
3069         size: u32,
3070         unk1: i32,
3071         unk2: *mut c_void,
3072         timeout: *mut u32,
3073     ) -> i32;
3074     pub fn sceKernelTryReceiveMsgPipe(
3075         uid: SceUid,
3076         message: *mut c_void,
3077         size: u32,
3078         unk1: i32,
3079         unk2: *mut c_void,
3080     ) -> i32;
3081     pub fn sceKernelCancelMsgPipe(uid: SceUid, send: *mut i32, recv: *mut i32) -> i32;
3082     pub fn sceKernelReferMsgPipeStatus(uid: SceUid, info: *mut SceKernelMppInfo) -> i32;
3083     pub fn sceKernelCreateVpl(
3084         name: *const u8,
3085         part: i32,
3086         attr: i32,
3087         size: u32,
3088         opt: *mut SceKernelVplOptParam,
3089     ) -> SceUid;
3090     pub fn sceKernelDeleteVpl(uid: SceUid) -> i32;
3091     pub fn sceKernelAllocateVpl(
3092         uid: SceUid,
3093         size: u32,
3094         data: *mut *mut c_void,
3095         timeout: *mut u32,
3096     ) -> i32;
3097     pub fn sceKernelAllocateVplCB(
3098         uid: SceUid,
3099         size: u32,
3100         data: *mut *mut c_void,
3101         timeout: *mut u32,
3102     ) -> i32;
3103     pub fn sceKernelTryAllocateVpl(uid: SceUid, size: u32, data: *mut *mut c_void) -> i32;
3104     pub fn sceKernelFreeVpl(uid: SceUid, data: *mut c_void) -> i32;
3105     pub fn sceKernelCancelVpl(uid: SceUid, num: *mut i32) -> i32;
3106     pub fn sceKernelReferVplStatus(uid: SceUid, info: *mut SceKernelVplInfo) -> i32;
3107     pub fn sceKernelCreateFpl(
3108         name: *const u8,
3109         part: i32,
3110         attr: i32,
3111         size: u32,
3112         blocks: u32,
3113         opt: *mut SceKernelFplOptParam,
3114     ) -> i32;
3115     pub fn sceKernelDeleteFpl(uid: SceUid) -> i32;
3116     pub fn sceKernelAllocateFpl(uid: SceUid, data: *mut *mut c_void, timeout: *mut u32) -> i32;
3117     pub fn sceKernelAllocateFplCB(uid: SceUid, data: *mut *mut c_void, timeout: *mut u32) -> i32;
3118     pub fn sceKernelTryAllocateFpl(uid: SceUid, data: *mut *mut c_void) -> i32;
3119     pub fn sceKernelFreeFpl(uid: SceUid, data: *mut c_void) -> i32;
3120     pub fn sceKernelCancelFpl(uid: SceUid, pnum: *mut i32) -> i32;
3121     pub fn sceKernelReferFplStatus(uid: SceUid, info: *mut SceKernelFplInfo) -> i32;
3122     pub fn sceKernelUSec2SysClock(usec: u32, clock: *mut SceKernelSysClock) -> i32;
3123     pub fn sceKernelUSec2SysClockWide(usec: u32) -> i64;
3124     pub fn sceKernelSysClock2USec(
3125         clock: *mut SceKernelSysClock,
3126         low: *mut u32,
3127         high: *mut u32,
3128     ) -> i32;
3129     pub fn sceKernelSysClock2USecWide(clock: i64, low: *mut u32, high: *mut u32) -> i32;
3130     pub fn sceKernelGetSystemTime(time: *mut SceKernelSysClock) -> i32;
3131     pub fn sceKernelGetSystemTimeWide() -> i64;
3132     pub fn sceKernelGetSystemTimeLow() -> u32;
3133     pub fn sceKernelCreateVTimer(name: *const u8, opt: *mut SceKernelVTimerOptParam) -> SceUid;
3134     pub fn sceKernelDeleteVTimer(uid: SceUid) -> i32;
3135     pub fn sceKernelGetVTimerBase(uid: SceUid, base: *mut SceKernelSysClock) -> i32;
3136     pub fn sceKernelGetVTimerBaseWide(uid: SceUid) -> i64;
3137     pub fn sceKernelGetVTimerTime(uid: SceUid, time: *mut SceKernelSysClock) -> i32;
3138     pub fn sceKernelGetVTimerTimeWide(uid: SceUid) -> i64;
3139     pub fn sceKernelSetVTimerTime(uid: SceUid, time: *mut SceKernelSysClock) -> i32;
3140     pub fn sceKernelSetVTimerTimeWide(uid: SceUid, time: i64) -> i64;
3141     pub fn sceKernelStartVTimer(uid: SceUid) -> i32;
3142     pub fn sceKernelStopVTimer(uid: SceUid) -> i32;
3143     pub fn sceKernelSetVTimerHandler(
3144         uid: SceUid,
3145         time: *mut SceKernelSysClock,
3146         handler: SceKernelVTimerHandler,
3147         common: *mut c_void,
3148     ) -> i32;
3149     pub fn sceKernelSetVTimerHandlerWide(
3150         uid: SceUid,
3151         time: i64,
3152         handler: SceKernelVTimerHandlerWide,
3153         common: *mut c_void,
3154     ) -> i32;
3155     pub fn sceKernelCancelVTimerHandler(uid: SceUid) -> i32;
3156     pub fn sceKernelReferVTimerStatus(uid: SceUid, info: *mut SceKernelVTimerInfo) -> i32;
3157     pub fn sceKernelRegisterThreadEventHandler(
3158         name: *const u8,
3159         thread_id: SceUid,
3160         mask: i32,
3161         handler: SceKernelThreadEventHandler,
3162         common: *mut c_void,
3163     ) -> SceUid;
3164     pub fn sceKernelReleaseThreadEventHandler(uid: SceUid) -> i32;
3165     pub fn sceKernelReferThreadEventHandlerStatus(
3166         uid: SceUid,
3167         info: *mut SceKernelThreadEventHandlerInfo,
3168     ) -> i32;
3169     pub fn sceKernelReferThreadProfiler() -> *mut DebugProfilerRegs;
3170     pub fn sceKernelReferGlobalProfiler() -> *mut DebugProfilerRegs;
3171 
3172     pub fn sceUsbStart(driver_name: *const u8, size: i32, args: *mut c_void) -> i32;
3173     pub fn sceUsbStop(driver_name: *const u8, size: i32, args: *mut c_void) -> i32;
3174     pub fn sceUsbActivate(pid: u32) -> i32;
3175     pub fn sceUsbDeactivate(pid: u32) -> i32;
3176     pub fn sceUsbGetState() -> i32;
3177     pub fn sceUsbGetDrvState(driver_name: *const u8) -> i32;
3178 }
3179 
3180 extern "C" {
3181     pub fn sceUsbCamSetupStill(param: *mut UsbCamSetupStillParam) -> i32;
3182     pub fn sceUsbCamSetupStillEx(param: *mut UsbCamSetupStillExParam) -> i32;
3183     pub fn sceUsbCamStillInputBlocking(buf: *mut u8, size: usize) -> i32;
3184     pub fn sceUsbCamStillInput(buf: *mut u8, size: usize) -> i32;
3185     pub fn sceUsbCamStillWaitInputEnd() -> i32;
3186     pub fn sceUsbCamStillPollInputEnd() -> i32;
3187     pub fn sceUsbCamStillCancelInput() -> i32;
3188     pub fn sceUsbCamStillGetInputLength() -> i32;
3189     pub fn sceUsbCamSetupVideo(
3190         param: *mut UsbCamSetupVideoParam,
3191         work_area: *mut c_void,
3192         work_area_size: i32,
3193     ) -> i32;
3194     pub fn sceUsbCamSetupVideoEx(
3195         param: *mut UsbCamSetupVideoExParam,
3196         work_area: *mut c_void,
3197         work_area_size: i32,
3198     ) -> i32;
3199     pub fn sceUsbCamStartVideo() -> i32;
3200     pub fn sceUsbCamStopVideo() -> i32;
3201     pub fn sceUsbCamReadVideoFrameBlocking(buf: *mut u8, size: usize) -> i32;
3202     pub fn sceUsbCamReadVideoFrame(buf: *mut u8, size: usize) -> i32;
3203     pub fn sceUsbCamWaitReadVideoFrameEnd() -> i32;
3204     pub fn sceUsbCamPollReadVideoFrameEnd() -> i32;
3205     pub fn sceUsbCamGetReadVideoFrameSize() -> i32;
3206     pub fn sceUsbCamSetSaturation(saturation: i32) -> i32;
3207     pub fn sceUsbCamSetBrightness(brightness: i32) -> i32;
3208     pub fn sceUsbCamSetContrast(contrast: i32) -> i32;
3209     pub fn sceUsbCamSetSharpness(sharpness: i32) -> i32;
3210     pub fn sceUsbCamSetImageEffectMode(effect_mode: UsbCamEffectMode) -> i32;
3211     pub fn sceUsbCamSetEvLevel(exposure_level: UsbCamEvLevel) -> i32;
3212     pub fn sceUsbCamSetReverseMode(reverse_flags: i32) -> i32;
3213     pub fn sceUsbCamSetZoom(zoom: i32) -> i32;
3214     pub fn sceUsbCamGetSaturation(saturation: *mut i32) -> i32;
3215     pub fn sceUsbCamGetBrightness(brightness: *mut i32) -> i32;
3216     pub fn sceUsbCamGetContrast(contrast: *mut i32) -> i32;
3217     pub fn sceUsbCamGetSharpness(sharpness: *mut i32) -> i32;
3218     pub fn sceUsbCamGetImageEffectMode(effect_mode: *mut UsbCamEffectMode) -> i32;
3219     pub fn sceUsbCamGetEvLevel(exposure_level: *mut UsbCamEvLevel) -> i32;
3220     pub fn sceUsbCamGetReverseMode(reverse_flags: *mut i32) -> i32;
3221     pub fn sceUsbCamGetZoom(zoom: *mut i32) -> i32;
3222     pub fn sceUsbCamAutoImageReverseSW(on: i32) -> i32;
3223     pub fn sceUsbCamGetAutoImageReverseState() -> i32;
3224     pub fn sceUsbCamGetLensDirection() -> i32;
3225 
3226     pub fn sceUsbstorBootRegisterNotify(event_flag: SceUid) -> i32;
3227     pub fn sceUsbstorBootUnregisterNotify(event_flag: u32) -> i32;
3228     pub fn sceUsbstorBootSetCapacity(size: u32) -> i32;
3229 
3230     pub fn scePowerRegisterCallback(slot: i32, cbid: SceUid) -> i32;
3231     pub fn scePowerUnregisterCallback(slot: i32) -> i32;
3232     pub fn scePowerIsPowerOnline() -> i32;
3233     pub fn scePowerIsBatteryExist() -> i32;
3234     pub fn scePowerIsBatteryCharging() -> i32;
3235     pub fn scePowerGetBatteryChargingStatus() -> i32;
3236     pub fn scePowerIsLowBattery() -> i32;
3237     pub fn scePowerGetBatteryLifePercent() -> i32;
3238     pub fn scePowerGetBatteryLifeTime() -> i32;
3239     pub fn scePowerGetBatteryTemp() -> i32;
3240     pub fn scePowerGetBatteryElec() -> i32;
3241     pub fn scePowerGetBatteryVolt() -> i32;
3242     pub fn scePowerSetCpuClockFrequency(cpufreq: i32) -> i32;
3243     pub fn scePowerSetBusClockFrequency(busfreq: i32) -> i32;
3244     pub fn scePowerGetCpuClockFrequency() -> i32;
3245     pub fn scePowerGetCpuClockFrequencyInt() -> i32;
3246     pub fn scePowerGetCpuClockFrequencyFloat() -> f32;
3247     pub fn scePowerGetBusClockFrequency() -> i32;
3248     pub fn scePowerGetBusClockFrequencyInt() -> i32;
3249     pub fn scePowerGetBusClockFrequencyFloat() -> f32;
3250     pub fn scePowerSetClockFrequency(pllfreq: i32, cpufreq: i32, busfreq: i32) -> i32;
3251     pub fn scePowerLock(unknown: i32) -> i32;
3252     pub fn scePowerUnlock(unknown: i32) -> i32;
3253     pub fn scePowerTick(t: PowerTick) -> i32;
3254     pub fn scePowerGetIdleTimer() -> i32;
3255     pub fn scePowerIdleTimerEnable(unknown: i32) -> i32;
3256     pub fn scePowerIdleTimerDisable(unknown: i32) -> i32;
3257     pub fn scePowerRequestStandby() -> i32;
3258     pub fn scePowerRequestSuspend() -> i32;
3259 
3260     pub fn sceWlanDevIsPowerOn() -> i32;
3261     pub fn sceWlanGetSwitchState() -> i32;
3262     pub fn sceWlanGetEtherAddr(ether_addr: *mut u8) -> i32;
3263 
3264     pub fn sceWlanDevAttach() -> i32;
3265     pub fn sceWlanDevDetach() -> i32;
3266 
3267     pub fn sceRtcGetTickResolution() -> u32;
3268     pub fn sceRtcGetCurrentTick(tick: *mut u64) -> i32;
3269     pub fn sceRtcGetCurrentClock(tm: *mut ScePspDateTime, tz: i32) -> i32;
3270     pub fn sceRtcGetCurrentClockLocalTime(tm: *mut ScePspDateTime) -> i32;
3271     pub fn sceRtcConvertUtcToLocalTime(tick_utc: *const u64, tick_local: *mut u64) -> i32;
3272     pub fn sceRtcConvertLocalTimeToUTC(tick_local: *const u64, tick_utc: *mut u64) -> i32;
3273     pub fn sceRtcIsLeapYear(year: i32) -> i32;
3274     pub fn sceRtcGetDaysInMonth(year: i32, month: i32) -> i32;
3275     pub fn sceRtcGetDayOfWeek(year: i32, month: i32, day: i32) -> i32;
3276     pub fn sceRtcCheckValid(date: *const ScePspDateTime) -> i32;
3277     pub fn sceRtcSetTick(date: *mut ScePspDateTime, tick: *const u64) -> i32;
3278     pub fn sceRtcGetTick(date: *const ScePspDateTime, tick: *mut u64) -> i32;
3279     pub fn sceRtcCompareTick(tick1: *const u64, tick2: *const u64) -> i32;
3280     pub fn sceRtcTickAddTicks(dest_tick: *mut u64, src_tick: *const u64, num_ticks: u64) -> i32;
3281     pub fn sceRtcTickAddMicroseconds(dest_tick: *mut u64, src_tick: *const u64, num_ms: u64)
3282         -> i32;
3283     pub fn sceRtcTickAddSeconds(dest_tick: *mut u64, src_tick: *const u64, num_seconds: u64)
3284         -> i32;
3285     pub fn sceRtcTickAddMinutes(dest_tick: *mut u64, src_tick: *const u64, num_minutes: u64)
3286         -> i32;
3287     pub fn sceRtcTickAddHours(dest_tick: *mut u64, src_tick: *const u64, num_hours: u64) -> i32;
3288     pub fn sceRtcTickAddDays(dest_tick: *mut u64, src_tick: *const u64, num_days: u64) -> i32;
3289     pub fn sceRtcTickAddWeeks(dest_tick: *mut u64, src_tick: *const u64, num_weeks: u64) -> i32;
3290     pub fn sceRtcTickAddMonths(dest_tick: *mut u64, src_tick: *const u64, num_months: u64) -> i32;
3291     pub fn sceRtcTickAddYears(dest_tick: *mut u64, src_tick: *const u64, num_years: u64) -> i32;
3292     pub fn sceRtcSetTime_t(date: *mut ScePspDateTime, time: u32) -> i32;
3293     pub fn sceRtcGetTime_t(date: *const ScePspDateTime, time: *mut u32) -> i32;
3294     pub fn sceRtcSetTime64_t(date: *mut ScePspDateTime, time: u64) -> i32;
3295     pub fn sceRtcGetTime64_t(date: *const ScePspDateTime, time: *mut u64) -> i32;
3296     pub fn sceRtcSetDosTime(date: *mut ScePspDateTime, dos_time: u32) -> i32;
3297     pub fn sceRtcGetDosTime(date: *mut ScePspDateTime, dos_time: u32) -> i32;
3298     pub fn sceRtcSetWin32FileTime(date: *mut ScePspDateTime, time: *mut u64) -> i32;
3299     pub fn sceRtcGetWin32FileTime(date: *mut ScePspDateTime, time: *mut u64) -> i32;
3300     pub fn sceRtcParseDateTime(dest_tick: *mut u64, date_string: *const u8) -> i32;
3301     pub fn sceRtcFormatRFC3339(
3302         psz_date_time: *mut char,
3303         p_utc: *const u64,
3304         time_zone_minutes: i32,
3305     ) -> i32;
3306     pub fn sceRtcFormatRFC3339LocalTime(psz_date_time: *mut char, p_utc: *const u64) -> i32;
3307     pub fn sceRtcParseRFC3339(p_utc: *mut u64, psz_date_time: *const u8) -> i32;
3308     pub fn sceRtcFormatRFC2822(
3309         psz_date_time: *mut char,
3310         p_utc: *const u64,
3311         time_zone_minutes: i32,
3312     ) -> i32;
3313     pub fn sceRtcFormatRFC2822LocalTime(psz_date_time: *mut char, p_utc: *const u64) -> i32;
3314 
3315     pub fn sceIoOpen(file: *const u8, flags: i32, permissions: IoPermissions) -> SceUid;
3316     pub fn sceIoOpenAsync(file: *const u8, flags: i32, permissions: IoPermissions) -> SceUid;
3317     pub fn sceIoClose(fd: SceUid) -> i32;
3318     pub fn sceIoCloseAsync(fd: SceUid) -> i32;
3319     pub fn sceIoRead(fd: SceUid, data: *mut c_void, size: u32) -> i32;
3320     pub fn sceIoReadAsync(fd: SceUid, data: *mut c_void, size: u32) -> i32;
3321     pub fn sceIoWrite(fd: SceUid, data: *const c_void, size: usize) -> i32;
3322     pub fn sceIoWriteAsync(fd: SceUid, data: *const c_void, size: u32) -> i32;
3323     pub fn sceIoLseek(fd: SceUid, offset: i64, whence: IoWhence) -> i64;
3324     pub fn sceIoLseekAsync(fd: SceUid, offset: i64, whence: IoWhence) -> i32;
3325     pub fn sceIoLseek32(fd: SceUid, offset: i32, whence: IoWhence) -> i32;
3326     pub fn sceIoLseek32Async(fd: SceUid, offset: i32, whence: IoWhence) -> i32;
3327     pub fn sceIoRemove(file: *const u8) -> i32;
3328     pub fn sceIoMkdir(dir: *const u8, mode: IoPermissions) -> i32;
3329     pub fn sceIoRmdir(path: *const u8) -> i32;
3330     pub fn sceIoChdir(path: *const u8) -> i32;
3331     pub fn sceIoRename(oldname: *const u8, newname: *const u8) -> i32;
3332     pub fn sceIoDopen(dirname: *const u8) -> SceUid;
3333     pub fn sceIoDread(fd: SceUid, dir: *mut SceIoDirent) -> i32;
3334     pub fn sceIoDclose(fd: SceUid) -> i32;
3335     pub fn sceIoDevctl(
3336         dev: *const u8,
3337         cmd: u32,
3338         indata: *mut c_void,
3339         inlen: i32,
3340         outdata: *mut c_void,
3341         outlen: i32,
3342     ) -> i32;
3343     pub fn sceIoAssign(
3344         dev1: *const u8,
3345         dev2: *const u8,
3346         dev3: *const u8,
3347         mode: IoAssignPerms,
3348         unk1: *mut c_void,
3349         unk2: i32,
3350     ) -> i32;
3351     pub fn sceIoUnassign(dev: *const u8) -> i32;
3352     pub fn sceIoGetstat(file: *const u8, stat: *mut SceIoStat) -> i32;
3353     pub fn sceIoChstat(file: *const u8, stat: *mut SceIoStat, bits: i32) -> i32;
3354     pub fn sceIoIoctl(
3355         fd: SceUid,
3356         cmd: u32,
3357         indata: *mut c_void,
3358         inlen: i32,
3359         outdata: *mut c_void,
3360         outlen: i32,
3361     ) -> i32;
3362     pub fn sceIoIoctlAsync(
3363         fd: SceUid,
3364         cmd: u32,
3365         indata: *mut c_void,
3366         inlen: i32,
3367         outdata: *mut c_void,
3368         outlen: i32,
3369     ) -> i32;
3370     pub fn sceIoSync(device: *const u8, unk: u32) -> i32;
3371     pub fn sceIoWaitAsync(fd: SceUid, res: *mut i64) -> i32;
3372     pub fn sceIoWaitAsyncCB(fd: SceUid, res: *mut i64) -> i32;
3373     pub fn sceIoPollAsync(fd: SceUid, res: *mut i64) -> i32;
3374     pub fn sceIoGetAsyncStat(fd: SceUid, poll: i32, res: *mut i64) -> i32;
3375     pub fn sceIoCancel(fd: SceUid) -> i32;
3376     pub fn sceIoGetDevType(fd: SceUid) -> i32;
3377     pub fn sceIoChangeAsyncPriority(fd: SceUid, pri: i32) -> i32;
3378     pub fn sceIoSetAsyncCallback(fd: SceUid, cb: SceUid, argp: *mut c_void) -> i32;
3379 
3380     pub fn sceJpegInitMJpeg() -> i32;
3381     pub fn sceJpegFinishMJpeg() -> i32;
3382     pub fn sceJpegCreateMJpeg(width: i32, height: i32) -> i32;
3383     pub fn sceJpegDeleteMJpeg() -> i32;
3384     pub fn sceJpegDecodeMJpeg(jpeg_buf: *mut u8, size: usize, rgba: *mut c_void, unk: u32) -> i32;
3385 
3386     pub fn sceUmdCheckMedium() -> i32;
3387     pub fn sceUmdGetDiscInfo(info: *mut UmdInfo) -> i32;
3388     pub fn sceUmdActivate(unit: i32, drive: *const u8) -> i32;
3389     pub fn sceUmdDeactivate(unit: i32, drive: *const u8) -> i32;
3390     pub fn sceUmdWaitDriveStat(state: i32) -> i32;
3391     pub fn sceUmdWaitDriveStatWithTimer(state: i32, timeout: u32) -> i32;
3392     pub fn sceUmdWaitDriveStatCB(state: i32, timeout: u32) -> i32;
3393     pub fn sceUmdCancelWaitDriveStat() -> i32;
3394     pub fn sceUmdGetDriveStat() -> i32;
3395     pub fn sceUmdGetErrorStat() -> i32;
3396     pub fn sceUmdRegisterUMDCallBack(cbid: i32) -> i32;
3397     pub fn sceUmdUnRegisterUMDCallBack(cbid: i32) -> i32;
3398     pub fn sceUmdReplacePermit() -> i32;
3399     pub fn sceUmdReplaceProhibit() -> i32;
3400 
3401     pub fn sceMpegInit() -> i32;
3402     pub fn sceMpegFinish();
3403     pub fn sceMpegRingbufferQueryMemSize(packets: i32) -> i32;
3404     pub fn sceMpegRingbufferConstruct(
3405         ringbuffer: *mut SceMpegRingbuffer,
3406         packets: i32,
3407         data: *mut c_void,
3408         size: i32,
3409         callback: SceMpegRingbufferCb,
3410         cb_param: *mut c_void,
3411     ) -> i32;
3412     pub fn sceMpegRingbufferDestruct(ringbuffer: *mut SceMpegRingbuffer);
3413     pub fn sceMpegRingbufferAvailableSize(ringbuffer: *mut SceMpegRingbuffer) -> i32;
3414     pub fn sceMpegRingbufferPut(
3415         ringbuffer: *mut SceMpegRingbuffer,
3416         num_packets: i32,
3417         available: i32,
3418     ) -> i32;
3419     pub fn sceMpegQueryMemSize(unk: i32) -> i32;
3420     pub fn sceMpegCreate(
3421         handle: SceMpeg,
3422         data: *mut c_void,
3423         size: i32,
3424         ringbuffer: *mut SceMpegRingbuffer,
3425         frame_width: i32,
3426         unk1: i32,
3427         unk2: i32,
3428     ) -> i32;
3429     pub fn sceMpegDelete(handle: SceMpeg);
3430     pub fn sceMpegQueryStreamOffset(handle: SceMpeg, buffer: *mut c_void, offset: *mut i32) -> i32;
3431     pub fn sceMpegQueryStreamSize(buffer: *mut c_void, size: *mut i32) -> i32;
3432     pub fn sceMpegRegistStream(handle: SceMpeg, stream_id: i32, unk: i32) -> SceMpegStream;
3433     pub fn sceMpegUnRegistStream(handle: SceMpeg, stream: SceMpegStream);
3434     pub fn sceMpegFlushAllStream(handle: SceMpeg) -> i32;
3435     pub fn sceMpegMallocAvcEsBuf(handle: SceMpeg) -> *mut c_void;
3436     pub fn sceMpegFreeAvcEsBuf(handle: SceMpeg, buf: *mut c_void);
3437     pub fn sceMpegQueryAtracEsSize(handle: SceMpeg, es_size: *mut i32, out_size: *mut i32) -> i32;
3438     pub fn sceMpegInitAu(handle: SceMpeg, es_buffer: *mut c_void, au: *mut SceMpegAu) -> i32;
3439     pub fn sceMpegGetAvcAu(
3440         handle: SceMpeg,
3441         stream: SceMpegStream,
3442         au: *mut SceMpegAu,
3443         unk: *mut i32,
3444     ) -> i32;
3445     pub fn sceMpegAvcDecodeMode(handle: SceMpeg, mode: *mut SceMpegAvcMode) -> i32;
3446     pub fn sceMpegAvcDecode(
3447         handle: SceMpeg,
3448         au: *mut SceMpegAu,
3449         iframe_width: i32,
3450         buffer: *mut c_void,
3451         init: *mut i32,
3452     ) -> i32;
3453     pub fn sceMpegAvcDecodeStop(
3454         handle: SceMpeg,
3455         frame_width: i32,
3456         buffer: *mut c_void,
3457         status: *mut i32,
3458     ) -> i32;
3459     pub fn sceMpegGetAtracAu(
3460         handle: SceMpeg,
3461         stream: SceMpegStream,
3462         au: *mut SceMpegAu,
3463         unk: *mut c_void,
3464     ) -> i32;
3465     pub fn sceMpegAtracDecode(
3466         handle: SceMpeg,
3467         au: *mut SceMpegAu,
3468         buffer: *mut c_void,
3469         init: i32,
3470     ) -> i32;
3471 
3472     pub fn sceMpegBaseYCrCbCopyVme(yuv_buffer: *mut c_void, buffer: *mut i32, type_: i32) -> i32;
3473     pub fn sceMpegBaseCscInit(width: i32) -> i32;
3474     pub fn sceMpegBaseCscVme(
3475         rgb_buffer: *mut c_void,
3476         rgb_buffer2: *mut c_void,
3477         width: i32,
3478         y_cr_cb_buffer: *mut SceMpegYCrCbBuffer,
3479     ) -> i32;
3480     pub fn sceMpegbase_BEA18F91(lli: *mut SceMpegLLI) -> i32;
3481 
3482     pub fn sceHprmPeekCurrentKey(key: *mut i32) -> i32;
3483     pub fn sceHprmPeekLatch(latch: *mut [u32; 4]) -> i32;
3484     pub fn sceHprmReadLatch(latch: *mut [u32; 4]) -> i32;
3485     pub fn sceHprmIsHeadphoneExist() -> i32;
3486     pub fn sceHprmIsRemoteExist() -> i32;
3487     pub fn sceHprmIsMicrophoneExist() -> i32;
3488 
3489     pub fn sceGuDepthBuffer(zbp: *mut c_void, zbw: i32);
3490     pub fn sceGuDispBuffer(width: i32, height: i32, dispbp: *mut c_void, dispbw: i32);
3491     pub fn sceGuDrawBuffer(psm: DisplayPixelFormat, fbp: *mut c_void, fbw: i32);
3492     pub fn sceGuDrawBufferList(psm: DisplayPixelFormat, fbp: *mut c_void, fbw: i32);
3493     pub fn sceGuDisplay(state: bool) -> bool;
3494     pub fn sceGuDepthFunc(function: DepthFunc);
3495     pub fn sceGuDepthMask(mask: i32);
3496     pub fn sceGuDepthOffset(offset: i32);
3497     pub fn sceGuDepthRange(near: i32, far: i32);
3498     pub fn sceGuFog(near: f32, far: f32, color: u32);
3499     pub fn sceGuInit();
3500     pub fn sceGuTerm();
3501     pub fn sceGuBreak(mode: i32);
3502     pub fn sceGuContinue();
3503     pub fn sceGuSetCallback(signal: GuCallbackId, callback: GuCallback) -> GuCallback;
3504     pub fn sceGuSignal(behavior: SignalBehavior, signal: i32);
3505     pub fn sceGuSendCommandf(cmd: GeCommand, argument: f32);
3506     pub fn sceGuSendCommandi(cmd: GeCommand, argument: i32);
3507     pub fn sceGuGetMemory(size: i32) -> *mut c_void;
3508     pub fn sceGuStart(context_type: GuContextType, list: *mut c_void);
3509     pub fn sceGuFinish() -> i32;
3510     pub fn sceGuFinishId(id: u32) -> i32;
3511     pub fn sceGuCallList(list: *const c_void);
3512     pub fn sceGuCallMode(mode: i32);
3513     pub fn sceGuCheckList() -> i32;
3514     pub fn sceGuSendList(mode: GuQueueMode, list: *const c_void, context: *mut GeContext);
3515     pub fn sceGuSwapBuffers() -> *mut c_void;
3516     pub fn sceGuSync(mode: GuSyncMode, behavior: GuSyncBehavior) -> GeListState;
3517     pub fn sceGuDrawArray(
3518         prim: GuPrimitive,
3519         vtype: i32,
3520         count: i32,
3521         indices: *const c_void,
3522         vertices: *const c_void,
3523     );
3524     pub fn sceGuBeginObject(
3525         vtype: i32,
3526         count: i32,
3527         indices: *const c_void,
3528         vertices: *const c_void,
3529     );
3530     pub fn sceGuEndObject();
3531     pub fn sceGuSetStatus(state: GuState, status: i32);
3532     pub fn sceGuGetStatus(state: GuState) -> bool;
3533     pub fn sceGuSetAllStatus(status: i32);
3534     pub fn sceGuGetAllStatus() -> i32;
3535     pub fn sceGuEnable(state: GuState);
3536     pub fn sceGuDisable(state: GuState);
3537     pub fn sceGuLight(light: i32, type_: LightType, components: i32, position: &ScePspFVector3);
3538     pub fn sceGuLightAtt(light: i32, atten0: f32, atten1: f32, atten2: f32);
3539     pub fn sceGuLightColor(light: i32, component: i32, color: u32);
3540     pub fn sceGuLightMode(mode: LightMode);
3541     pub fn sceGuLightSpot(light: i32, direction: &ScePspFVector3, exponent: f32, cutoff: f32);
3542     pub fn sceGuClear(flags: i32);
3543     pub fn sceGuClearColor(color: u32);
3544     pub fn sceGuClearDepth(depth: u32);
3545     pub fn sceGuClearStencil(stencil: u32);
3546     pub fn sceGuPixelMask(mask: u32);
3547     pub fn sceGuColor(color: u32);
3548     pub fn sceGuColorFunc(func: ColorFunc, color: u32, mask: u32);
3549     pub fn sceGuColorMaterial(components: i32);
3550     pub fn sceGuAlphaFunc(func: AlphaFunc, value: i32, mask: i32);
3551     pub fn sceGuAmbient(color: u32);
3552     pub fn sceGuAmbientColor(color: u32);
3553     pub fn sceGuBlendFunc(op: BlendOp, src: BlendSrc, dest: BlendDst, src_fix: u32, dest_fix: u32);
3554     pub fn sceGuMaterial(components: i32, color: u32);
3555     pub fn sceGuModelColor(emissive: u32, ambient: u32, diffuse: u32, specular: u32);
3556     pub fn sceGuStencilFunc(func: StencilFunc, ref_: i32, mask: i32);
3557     pub fn sceGuStencilOp(fail: StencilOperation, zfail: StencilOperation, zpass: StencilOperation);
3558     pub fn sceGuSpecular(power: f32);
3559     pub fn sceGuFrontFace(order: FrontFaceDirection);
3560     pub fn sceGuLogicalOp(op: LogicalOperation);
3561     pub fn sceGuSetDither(matrix: &ScePspIMatrix4);
3562     pub fn sceGuShadeModel(mode: ShadingModel);
3563     pub fn sceGuCopyImage(
3564         psm: DisplayPixelFormat,
3565         sx: i32,
3566         sy: i32,
3567         width: i32,
3568         height: i32,
3569         srcw: i32,
3570         src: *mut c_void,
3571         dx: i32,
3572         dy: i32,
3573         destw: i32,
3574         dest: *mut c_void,
3575     );
3576     pub fn sceGuTexEnvColor(color: u32);
3577     pub fn sceGuTexFilter(min: TextureFilter, mag: TextureFilter);
3578     pub fn sceGuTexFlush();
3579     pub fn sceGuTexFunc(tfx: TextureEffect, tcc: TextureColorComponent);
3580     pub fn sceGuTexImage(
3581         mipmap: MipmapLevel,
3582         width: i32,
3583         height: i32,
3584         tbw: i32,
3585         tbp: *const c_void,
3586     );
3587     pub fn sceGuTexLevelMode(mode: TextureLevelMode, bias: f32);
3588     pub fn sceGuTexMapMode(mode: TextureMapMode, a1: u32, a2: u32);
3589     pub fn sceGuTexMode(tpsm: TexturePixelFormat, maxmips: i32, a2: i32, swizzle: i32);
3590     pub fn sceGuTexOffset(u: f32, v: f32);
3591     pub fn sceGuTexProjMapMode(mode: TextureProjectionMapMode);
3592     pub fn sceGuTexScale(u: f32, v: f32);
3593     pub fn sceGuTexSlope(slope: f32);
3594     pub fn sceGuTexSync();
3595     pub fn sceGuTexWrap(u: GuTexWrapMode, v: GuTexWrapMode);
3596     pub fn sceGuClutLoad(num_blocks: i32, cbp: *const c_void);
3597     pub fn sceGuClutMode(cpsm: ClutPixelFormat, shift: u32, mask: u32, a3: u32);
3598     pub fn sceGuOffset(x: u32, y: u32);
3599     pub fn sceGuScissor(x: i32, y: i32, w: i32, h: i32);
3600     pub fn sceGuViewport(cx: i32, cy: i32, width: i32, height: i32);
3601     pub fn sceGuDrawBezier(
3602         v_type: i32,
3603         u_count: i32,
3604         v_count: i32,
3605         indices: *const c_void,
3606         vertices: *const c_void,
3607     );
3608     pub fn sceGuPatchDivide(ulevel: u32, vlevel: u32);
3609     pub fn sceGuPatchFrontFace(a0: u32);
3610     pub fn sceGuPatchPrim(prim: PatchPrimitive);
3611     pub fn sceGuDrawSpline(
3612         v_type: i32,
3613         u_count: i32,
3614         v_count: i32,
3615         u_edge: i32,
3616         v_edge: i32,
3617         indices: *const c_void,
3618         vertices: *const c_void,
3619     );
3620     pub fn sceGuSetMatrix(type_: MatrixMode, matrix: &ScePspFMatrix4);
3621     pub fn sceGuBoneMatrix(index: u32, matrix: &ScePspFMatrix4);
3622     pub fn sceGuMorphWeight(index: i32, weight: f32);
3623     pub fn sceGuDrawArrayN(
3624         primitive_type: GuPrimitive,
3625         v_type: i32,
3626         count: i32,
3627         a3: i32,
3628         indices: *const c_void,
3629         vertices: *const c_void,
3630     );
3631 
3632     pub fn sceGumDrawArray(
3633         prim: GuPrimitive,
3634         v_type: i32,
3635         count: i32,
3636         indices: *const c_void,
3637         vertices: *const c_void,
3638     );
3639     pub fn sceGumDrawArrayN(
3640         prim: GuPrimitive,
3641         v_type: i32,
3642         count: i32,
3643         a3: i32,
3644         indices: *const c_void,
3645         vertices: *const c_void,
3646     );
3647     pub fn sceGumDrawBezier(
3648         v_type: i32,
3649         u_count: i32,
3650         v_count: i32,
3651         indices: *const c_void,
3652         vertices: *const c_void,
3653     );
3654     pub fn sceGumDrawSpline(
3655         v_type: i32,
3656         u_count: i32,
3657         v_count: i32,
3658         u_edge: i32,
3659         v_edge: i32,
3660         indices: *const c_void,
3661         vertices: *const c_void,
3662     );
3663     pub fn sceGumFastInverse();
3664     pub fn sceGumFullInverse();
3665     pub fn sceGumLoadIdentity();
3666     pub fn sceGumLoadMatrix(m: &ScePspFMatrix4);
3667     pub fn sceGumLookAt(eye: &ScePspFVector3, center: &ScePspFVector3, up: &ScePspFVector3);
3668     pub fn sceGumMatrixMode(mode: MatrixMode);
3669     pub fn sceGumMultMatrix(m: &ScePspFMatrix4);
3670     pub fn sceGumOrtho(left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32);
3671     pub fn sceGumPerspective(fovy: f32, aspect: f32, near: f32, far: f32);
3672     pub fn sceGumPopMatrix();
3673     pub fn sceGumPushMatrix();
3674     pub fn sceGumRotateX(angle: f32);
3675     pub fn sceGumRotateY(angle: f32);
3676     pub fn sceGumRotateZ(angle: f32);
3677     pub fn sceGumRotateXYZ(v: &ScePspFVector3);
3678     pub fn sceGumRotateZYX(v: &ScePspFVector3);
3679     pub fn sceGumScale(v: &ScePspFVector3);
3680     pub fn sceGumStoreMatrix(m: &mut ScePspFMatrix4);
3681     pub fn sceGumTranslate(v: &ScePspFVector3);
3682     pub fn sceGumUpdateMatrix();
3683 
3684     pub fn sceMp3ReserveMp3Handle(args: *mut SceMp3InitArg) -> i32;
3685     pub fn sceMp3ReleaseMp3Handle(handle: Mp3Handle) -> i32;
3686     pub fn sceMp3InitResource() -> i32;
3687     pub fn sceMp3TermResource() -> i32;
3688     pub fn sceMp3Init(handle: Mp3Handle) -> i32;
3689     pub fn sceMp3Decode(handle: Mp3Handle, dst: *mut *mut i16) -> i32;
3690     pub fn sceMp3GetInfoToAddStreamData(
3691         handle: Mp3Handle,
3692         dst: *mut *mut u8,
3693         to_write: *mut i32,
3694         src_pos: *mut i32,
3695     ) -> i32;
3696     pub fn sceMp3NotifyAddStreamData(handle: Mp3Handle, size: i32) -> i32;
3697     pub fn sceMp3CheckStreamDataNeeded(handle: Mp3Handle) -> i32;
3698     pub fn sceMp3SetLoopNum(handle: Mp3Handle, loop_: i32) -> i32;
3699     pub fn sceMp3GetLoopNum(handle: Mp3Handle) -> i32;
3700     pub fn sceMp3GetSumDecodedSample(handle: Mp3Handle) -> i32;
3701     pub fn sceMp3GetMaxOutputSample(handle: Mp3Handle) -> i32;
3702     pub fn sceMp3GetSamplingRate(handle: Mp3Handle) -> i32;
3703     pub fn sceMp3GetBitRate(handle: Mp3Handle) -> i32;
3704     pub fn sceMp3GetMp3ChannelNum(handle: Mp3Handle) -> i32;
3705     pub fn sceMp3ResetPlayPosition(handle: Mp3Handle) -> i32;
3706 
3707     pub fn sceRegOpenRegistry(reg: *mut Key, mode: i32, handle: *mut RegHandle) -> i32;
3708     pub fn sceRegFlushRegistry(handle: RegHandle) -> i32;
3709     pub fn sceRegCloseRegistry(handle: RegHandle) -> i32;
3710     pub fn sceRegOpenCategory(
3711         handle: RegHandle,
3712         name: *const u8,
3713         mode: i32,
3714         dir_handle: *mut RegHandle,
3715     ) -> i32;
3716     pub fn sceRegRemoveCategory(handle: RegHandle, name: *const u8) -> i32;
3717     pub fn sceRegCloseCategory(dir_handle: RegHandle) -> i32;
3718     pub fn sceRegFlushCategory(dir_handle: RegHandle) -> i32;
3719     pub fn sceRegGetKeyInfo(
3720         dir_handle: RegHandle,
3721         name: *const u8,
3722         key_handle: *mut RegHandle,
3723         type_: *mut KeyType,
3724         size: *mut usize,
3725     ) -> i32;
3726     pub fn sceRegGetKeyInfoByName(
3727         dir_handle: RegHandle,
3728         name: *const u8,
3729         type_: *mut KeyType,
3730         size: *mut usize,
3731     ) -> i32;
3732     pub fn sceRegGetKeyValue(
3733         dir_handle: RegHandle,
3734         key_handle: RegHandle,
3735         buf: *mut c_void,
3736         size: usize,
3737     ) -> i32;
3738     pub fn sceRegGetKeyValueByName(
3739         dir_handle: RegHandle,
3740         name: *const u8,
3741         buf: *mut c_void,
3742         size: usize,
3743     ) -> i32;
3744     pub fn sceRegSetKeyValue(
3745         dir_handle: RegHandle,
3746         name: *const u8,
3747         buf: *const c_void,
3748         size: usize,
3749     ) -> i32;
3750     pub fn sceRegGetKeysNum(dir_handle: RegHandle, num: *mut i32) -> i32;
3751     pub fn sceRegGetKeys(dir_handle: RegHandle, buf: *mut u8, num: i32) -> i32;
3752     pub fn sceRegCreateKey(dir_handle: RegHandle, name: *const u8, type_: i32, size: usize) -> i32;
3753     pub fn sceRegRemoveRegistry(key: *mut Key) -> i32;
3754 
3755     pub fn sceOpenPSIDGetOpenPSID(openpsid: *mut OpenPSID) -> i32;
3756 
3757     pub fn sceUtilityMsgDialogInitStart(params: *mut UtilityMsgDialogParams) -> i32;
3758     pub fn sceUtilityMsgDialogShutdownStart();
3759     pub fn sceUtilityMsgDialogGetStatus() -> i32;
3760     pub fn sceUtilityMsgDialogUpdate(n: i32);
3761     pub fn sceUtilityMsgDialogAbort() -> i32;
3762     pub fn sceUtilityNetconfInitStart(data: *mut UtilityNetconfData) -> i32;
3763     pub fn sceUtilityNetconfShutdownStart() -> i32;
3764     pub fn sceUtilityNetconfUpdate(unknown: i32) -> i32;
3765     pub fn sceUtilityNetconfGetStatus() -> i32;
3766     pub fn sceUtilityCheckNetParam(id: i32) -> i32;
3767     pub fn sceUtilityGetNetParam(conf: i32, param: NetParam, data: *mut UtilityNetData) -> i32;
3768     pub fn sceUtilitySavedataInitStart(params: *mut SceUtilitySavedataParam) -> i32;
3769     pub fn sceUtilitySavedataGetStatus() -> i32;
3770     pub fn sceUtilitySavedataShutdownStart() -> i32;
3771     pub fn sceUtilitySavedataUpdate(unknown: i32);
3772     pub fn sceUtilityGameSharingInitStart(params: *mut UtilityGameSharingParams) -> i32;
3773     pub fn sceUtilityGameSharingShutdownStart();
3774     pub fn sceUtilityGameSharingGetStatus() -> i32;
3775     pub fn sceUtilityGameSharingUpdate(n: i32);
3776     pub fn sceUtilityHtmlViewerInitStart(params: *mut UtilityHtmlViewerParam) -> i32;
3777     pub fn sceUtilityHtmlViewerShutdownStart() -> i32;
3778     pub fn sceUtilityHtmlViewerUpdate(n: i32) -> i32;
3779     pub fn sceUtilityHtmlViewerGetStatus() -> i32;
3780     pub fn sceUtilitySetSystemParamInt(id: SystemParamId, value: i32) -> i32;
3781     pub fn sceUtilitySetSystemParamString(id: SystemParamId, str: *const u8) -> i32;
3782     pub fn sceUtilityGetSystemParamInt(id: SystemParamId, value: *mut i32) -> i32;
3783     pub fn sceUtilityGetSystemParamString(id: SystemParamId, str: *mut u8, len: i32) -> i32;
3784     pub fn sceUtilityOskInitStart(params: *mut SceUtilityOskParams) -> i32;
3785     pub fn sceUtilityOskShutdownStart() -> i32;
3786     pub fn sceUtilityOskUpdate(n: i32) -> i32;
3787     pub fn sceUtilityOskGetStatus() -> i32;
3788     pub fn sceUtilityLoadNetModule(module: NetModule) -> i32;
3789     pub fn sceUtilityUnloadNetModule(module: NetModule) -> i32;
3790     pub fn sceUtilityLoadAvModule(module: AvModule) -> i32;
3791     pub fn sceUtilityUnloadAvModule(module: AvModule) -> i32;
3792     pub fn sceUtilityLoadUsbModule(module: UsbModule) -> i32;
3793     pub fn sceUtilityUnloadUsbModule(module: UsbModule) -> i32;
3794     pub fn sceUtilityLoadModule(module: Module) -> i32;
3795     pub fn sceUtilityUnloadModule(module: Module) -> i32;
3796     pub fn sceUtilityCreateNetParam(conf: i32) -> i32;
3797     pub fn sceUtilitySetNetParam(param: NetParam, val: *const c_void) -> i32;
3798     pub fn sceUtilityCopyNetParam(src: i32, dest: i32) -> i32;
3799     pub fn sceUtilityDeleteNetParam(conf: i32) -> i32;
3800 
3801     pub fn sceNetInit(
3802         poolsize: i32,
3803         calloutprio: i32,
3804         calloutstack: i32,
3805         netintrprio: i32,
3806         netintrstack: i32,
3807     ) -> i32;
3808     pub fn sceNetTerm() -> i32;
3809     pub fn sceNetFreeThreadinfo(thid: i32) -> i32;
3810     pub fn sceNetThreadAbort(thid: i32) -> i32;
3811     pub fn sceNetEtherStrton(name: *mut u8, mac: *mut u8);
3812     pub fn sceNetEtherNtostr(mac: *mut u8, name: *mut u8);
3813     pub fn sceNetGetLocalEtherAddr(mac: *mut u8) -> i32;
3814     pub fn sceNetGetMallocStat(stat: *mut SceNetMallocStat) -> i32;
3815 
3816     pub fn sceNetAdhocctlInit(
3817         stacksize: i32,
3818         priority: i32,
3819         adhoc_id: *mut SceNetAdhocctlAdhocId,
3820     ) -> i32;
3821     pub fn sceNetAdhocctlTerm() -> i32;
3822     pub fn sceNetAdhocctlConnect(name: *const u8) -> i32;
3823     pub fn sceNetAdhocctlDisconnect() -> i32;
3824     pub fn sceNetAdhocctlGetState(event: *mut i32) -> i32;
3825     pub fn sceNetAdhocctlCreate(name: *const u8) -> i32;
3826     pub fn sceNetAdhocctlJoin(scaninfo: *mut SceNetAdhocctlScanInfo) -> i32;
3827     pub fn sceNetAdhocctlGetAdhocId(id: *mut SceNetAdhocctlAdhocId) -> i32;
3828     pub fn sceNetAdhocctlCreateEnterGameMode(
3829         name: *const u8,
3830         unknown: i32,
3831         num: i32,
3832         macs: *mut u8,
3833         timeout: u32,
3834         unknown2: i32,
3835     ) -> i32;
3836     pub fn sceNetAdhocctlJoinEnterGameMode(
3837         name: *const u8,
3838         hostmac: *mut u8,
3839         timeout: u32,
3840         unknown: i32,
3841     ) -> i32;
3842     pub fn sceNetAdhocctlGetGameModeInfo(gamemodeinfo: *mut SceNetAdhocctlGameModeInfo) -> i32;
3843     pub fn sceNetAdhocctlExitGameMode() -> i32;
3844     pub fn sceNetAdhocctlGetPeerList(length: *mut i32, buf: *mut c_void) -> i32;
3845     pub fn sceNetAdhocctlGetPeerInfo(
3846         mac: *mut u8,
3847         size: i32,
3848         peerinfo: *mut SceNetAdhocctlPeerInfo,
3849     ) -> i32;
3850     pub fn sceNetAdhocctlScan() -> i32;
3851     pub fn sceNetAdhocctlGetScanInfo(length: *mut i32, buf: *mut c_void) -> i32;
3852     pub fn sceNetAdhocctlAddHandler(handler: SceNetAdhocctlHandler, unknown: *mut c_void) -> i32;
3853     pub fn sceNetAdhocctlDelHandler(id: i32) -> i32;
3854     pub fn sceNetAdhocctlGetNameByAddr(mac: *mut u8, nickname: *mut u8) -> i32;
3855     pub fn sceNetAdhocctlGetAddrByName(
3856         nickname: *mut u8,
3857         length: *mut i32,
3858         buf: *mut c_void,
3859     ) -> i32;
3860     pub fn sceNetAdhocctlGetParameter(params: *mut SceNetAdhocctlParams) -> i32;
3861 
3862     pub fn sceNetAdhocInit() -> i32;
3863     pub fn sceNetAdhocTerm() -> i32;
3864     pub fn sceNetAdhocPdpCreate(mac: *mut u8, port: u16, buf_size: u32, unk1: i32) -> i32;
3865     pub fn sceNetAdhocPdpDelete(id: i32, unk1: i32) -> i32;
3866     pub fn sceNetAdhocPdpSend(
3867         id: i32,
3868         dest_mac_addr: *mut u8,
3869         port: u16,
3870         data: *mut c_void,
3871         len: u32,
3872         timeout: u32,
3873         nonblock: i32,
3874     ) -> i32;
3875     pub fn sceNetAdhocPdpRecv(
3876         id: i32,
3877         src_mac_addr: *mut u8,
3878         port: *mut u16,
3879         data: *mut c_void,
3880         data_length: *mut c_void,
3881         timeout: u32,
3882         nonblock: i32,
3883     ) -> i32;
3884     pub fn sceNetAdhocGetPdpStat(size: *mut i32, stat: *mut SceNetAdhocPdpStat) -> i32;
3885     pub fn sceNetAdhocGameModeCreateMaster(data: *mut c_void, size: i32) -> i32;
3886     pub fn sceNetAdhocGameModeCreateReplica(mac: *mut u8, data: *mut c_void, size: i32) -> i32;
3887     pub fn sceNetAdhocGameModeUpdateMaster() -> i32;
3888     pub fn sceNetAdhocGameModeUpdateReplica(id: i32, unk1: i32) -> i32;
3889     pub fn sceNetAdhocGameModeDeleteMaster() -> i32;
3890     pub fn sceNetAdhocGameModeDeleteReplica(id: i32) -> i32;
3891     pub fn sceNetAdhocPtpOpen(
3892         srcmac: *mut u8,
3893         srcport: u16,
3894         destmac: *mut u8,
3895         destport: u16,
3896         buf_size: u32,
3897         delay: u32,
3898         count: i32,
3899         unk1: i32,
3900     ) -> i32;
3901     pub fn sceNetAdhocPtpConnect(id: i32, timeout: u32, nonblock: i32) -> i32;
3902     pub fn sceNetAdhocPtpListen(
3903         srcmac: *mut u8,
3904         srcport: u16,
3905         buf_size: u32,
3906         delay: u32,
3907         count: i32,
3908         queue: i32,
3909         unk1: i32,
3910     ) -> i32;
3911     pub fn sceNetAdhocPtpAccept(
3912         id: i32,
3913         mac: *mut u8,
3914         port: *mut u16,
3915         timeout: u32,
3916         nonblock: i32,
3917     ) -> i32;
3918     pub fn sceNetAdhocPtpSend(
3919         id: i32,
3920         data: *mut c_void,
3921         data_size: *mut i32,
3922         timeout: u32,
3923         nonblock: i32,
3924     ) -> i32;
3925     pub fn sceNetAdhocPtpRecv(
3926         id: i32,
3927         data: *mut c_void,
3928         data_size: *mut i32,
3929         timeout: u32,
3930         nonblock: i32,
3931     ) -> i32;
3932     pub fn sceNetAdhocPtpFlush(id: i32, timeout: u32, nonblock: i32) -> i32;
3933     pub fn sceNetAdhocPtpClose(id: i32, unk1: i32) -> i32;
3934     pub fn sceNetAdhocGetPtpStat(size: *mut i32, stat: *mut SceNetAdhocPtpStat) -> i32;
3935 }
3936 
3937 extern "C" {
3938     pub fn sceNetAdhocMatchingInit(memsize: i32) -> i32;
3939     pub fn sceNetAdhocMatchingTerm() -> i32;
3940     pub fn sceNetAdhocMatchingCreate(
3941         mode: AdhocMatchingMode,
3942         max_peers: i32,
3943         port: u16,
3944         buf_size: i32,
3945         hello_delay: u32,
3946         ping_delay: u32,
3947         init_count: i32,
3948         msg_delay: u32,
3949         callback: AdhocMatchingCallback,
3950     ) -> i32;
3951     pub fn sceNetAdhocMatchingDelete(matching_id: i32) -> i32;
3952     pub fn sceNetAdhocMatchingStart(
3953         matching_id: i32,
3954         evth_pri: i32,
3955         evth_stack: i32,
3956         inth_pri: i32,
3957         inth_stack: i32,
3958         opt_len: i32,
3959         opt_data: *mut c_void,
3960     ) -> i32;
3961     pub fn sceNetAdhocMatchingStop(matching_id: i32) -> i32;
3962     pub fn sceNetAdhocMatchingSelectTarget(
3963         matching_id: i32,
3964         mac: *mut u8,
3965         opt_len: i32,
3966         opt_data: *mut c_void,
3967     ) -> i32;
3968     pub fn sceNetAdhocMatchingCancelTarget(matching_id: i32, mac: *mut u8) -> i32;
3969     pub fn sceNetAdhocMatchingCancelTargetWithOpt(
3970         matching_id: i32,
3971         mac: *mut u8,
3972         opt_len: i32,
3973         opt_data: *mut c_void,
3974     ) -> i32;
3975     pub fn sceNetAdhocMatchingSendData(
3976         matching_id: i32,
3977         mac: *mut u8,
3978         data_len: i32,
3979         data: *mut c_void,
3980     ) -> i32;
3981     pub fn sceNetAdhocMatchingAbortSendData(matching_id: i32, mac: *mut u8) -> i32;
3982     pub fn sceNetAdhocMatchingSetHelloOpt(
3983         matching_id: i32,
3984         opt_len: i32,
3985         opt_data: *mut c_void,
3986     ) -> i32;
3987     pub fn sceNetAdhocMatchingGetHelloOpt(
3988         matching_id: i32,
3989         opt_len: *mut i32,
3990         opt_data: *mut c_void,
3991     ) -> i32;
3992     pub fn sceNetAdhocMatchingGetMembers(
3993         matching_id: i32,
3994         length: *mut i32,
3995         buf: *mut c_void,
3996     ) -> i32;
3997     pub fn sceNetAdhocMatchingGetPoolMaxAlloc() -> i32;
3998     pub fn sceNetAdhocMatchingGetPoolStat(poolstat: *mut AdhocPoolStat) -> i32;
3999 }
4000 
4001 extern "C" {
4002     pub fn sceNetApctlInit(stack_size: i32, init_priority: i32) -> i32;
4003     pub fn sceNetApctlTerm() -> i32;
4004     pub fn sceNetApctlGetInfo(code: ApctlInfo, pinfo: *mut SceNetApctlInfo) -> i32;
4005     pub fn sceNetApctlAddHandler(handler: SceNetApctlHandler, parg: *mut c_void) -> i32;
4006     pub fn sceNetApctlDelHandler(handler_id: i32) -> i32;
4007     pub fn sceNetApctlConnect(conn_index: i32) -> i32;
4008     pub fn sceNetApctlDisconnect() -> i32;
4009     pub fn sceNetApctlGetState(pstate: *mut ApctlState) -> i32;
4010 
4011     pub fn sceNetInetInit() -> i32;
4012     pub fn sceNetInetTerm() -> i32;
4013     pub fn sceNetInetAccept(s: i32, addr: *mut sockaddr, addr_len: *mut socklen_t) -> i32;
4014     pub fn sceNetInetBind(s: i32, my_addr: *const sockaddr, addr_len: socklen_t) -> i32;
4015     pub fn sceNetInetConnect(s: i32, serv_addr: *const sockaddr, addr_len: socklen_t) -> i32;
4016     pub fn sceNetInetGetsockopt(
4017         s: i32,
4018         level: i32,
4019         opt_name: i32,
4020         opt_val: *mut c_void,
4021         optl_en: *mut socklen_t,
4022     ) -> i32;
4023     pub fn sceNetInetListen(s: i32, backlog: i32) -> i32;
4024     pub fn sceNetInetRecv(s: i32, buf: *mut c_void, len: usize, flags: i32) -> usize;
4025     pub fn sceNetInetRecvfrom(
4026         s: i32,
4027         buf: *mut c_void,
4028         flags: usize,
4029         arg1: i32,
4030         from: *mut sockaddr,
4031         from_len: *mut socklen_t,
4032     ) -> usize;
4033     pub fn sceNetInetSend(s: i32, buf: *const c_void, len: usize, flags: i32) -> usize;
4034     pub fn sceNetInetSendto(
4035         s: i32,
4036         buf: *const c_void,
4037         len: usize,
4038         flags: i32,
4039         to: *const sockaddr,
4040         to_len: socklen_t,
4041     ) -> usize;
4042     pub fn sceNetInetSetsockopt(
4043         s: i32,
4044         level: i32,
4045         opt_name: i32,
4046         opt_val: *const c_void,
4047         opt_len: socklen_t,
4048     ) -> i32;
4049     pub fn sceNetInetShutdown(s: i32, how: i32) -> i32;
4050     pub fn sceNetInetSocket(domain: i32, type_: i32, protocol: i32) -> i32;
4051     pub fn sceNetInetClose(s: i32) -> i32;
4052     pub fn sceNetInetGetErrno() -> i32;
4053 
4054     pub fn sceSslInit(unknown1: i32) -> i32;
4055     pub fn sceSslEnd() -> i32;
4056     pub fn sceSslGetUsedMemoryMax(memory: *mut u32) -> i32;
4057     pub fn sceSslGetUsedMemoryCurrent(memory: *mut u32) -> i32;
4058 
4059     pub fn sceHttpInit(unknown1: u32) -> i32;
4060     pub fn sceHttpEnd() -> i32;
4061     pub fn sceHttpCreateTemplate(agent: *mut u8, unknown1: i32, unknown2: i32) -> i32;
4062     pub fn sceHttpDeleteTemplate(templateid: i32) -> i32;
4063     pub fn sceHttpCreateConnection(
4064         templateid: i32,
4065         host: *mut u8,
4066         unknown1: *mut u8,
4067         port: u16,
4068         unknown2: i32,
4069     ) -> i32;
4070     pub fn sceHttpCreateConnectionWithURL(templateid: i32, url: *const u8, unknown1: i32) -> i32;
4071     pub fn sceHttpDeleteConnection(connection_id: i32) -> i32;
4072     pub fn sceHttpCreateRequest(
4073         connection_id: i32,
4074         method: HttpMethod,
4075         path: *mut u8,
4076         content_length: u64,
4077     ) -> i32;
4078     pub fn sceHttpCreateRequestWithURL(
4079         connection_id: i32,
4080         method: HttpMethod,
4081         url: *mut u8,
4082         content_length: u64,
4083     ) -> i32;
4084     pub fn sceHttpDeleteRequest(request_id: i32) -> i32;
4085     pub fn sceHttpSendRequest(request_id: i32, data: *mut c_void, data_size: u32) -> i32;
4086     pub fn sceHttpAbortRequest(request_id: i32) -> i32;
4087     pub fn sceHttpReadData(request_id: i32, data: *mut c_void, data_size: u32) -> i32;
4088     pub fn sceHttpGetContentLength(request_id: i32, content_length: *mut u64) -> i32;
4089     pub fn sceHttpGetStatusCode(request_id: i32, status_code: *mut i32) -> i32;
4090     pub fn sceHttpSetResolveTimeOut(id: i32, timeout: u32) -> i32;
4091     pub fn sceHttpSetResolveRetry(id: i32, count: i32) -> i32;
4092     pub fn sceHttpSetConnectTimeOut(id: i32, timeout: u32) -> i32;
4093     pub fn sceHttpSetSendTimeOut(id: i32, timeout: u32) -> i32;
4094     pub fn sceHttpSetRecvTimeOut(id: i32, timeout: u32) -> i32;
4095     pub fn sceHttpEnableKeepAlive(id: i32) -> i32;
4096     pub fn sceHttpDisableKeepAlive(id: i32) -> i32;
4097     pub fn sceHttpEnableRedirect(id: i32) -> i32;
4098     pub fn sceHttpDisableRedirect(id: i32) -> i32;
4099     pub fn sceHttpEnableCookie(id: i32) -> i32;
4100     pub fn sceHttpDisableCookie(id: i32) -> i32;
4101     pub fn sceHttpSaveSystemCookie() -> i32;
4102     pub fn sceHttpLoadSystemCookie() -> i32;
4103     pub fn sceHttpAddExtraHeader(id: i32, name: *mut u8, value: *mut u8, unknown1: i32) -> i32;
4104     pub fn sceHttpDeleteHeader(id: i32, name: *const u8) -> i32;
4105     pub fn sceHttpsInit(unknown1: i32, unknown2: i32, unknown3: i32, unknown4: i32) -> i32;
4106     pub fn sceHttpsEnd() -> i32;
4107     pub fn sceHttpsLoadDefaultCert(unknown1: i32, unknown2: i32) -> i32;
4108     pub fn sceHttpDisableAuth(id: i32) -> i32;
4109     pub fn sceHttpDisableCache(id: i32) -> i32;
4110     pub fn sceHttpEnableAuth(id: i32) -> i32;
4111     pub fn sceHttpEnableCache(id: i32) -> i32;
4112     pub fn sceHttpEndCache() -> i32;
4113     pub fn sceHttpGetAllHeader(request: i32, header: *mut *mut u8, header_size: *mut u32) -> i32;
4114     pub fn sceHttpGetNetworkErrno(request: i32, err_num: *mut i32) -> i32;
4115     pub fn sceHttpGetProxy(
4116         id: i32,
4117         activate_flag: *mut i32,
4118         mode: *mut i32,
4119         proxy_host: *mut u8,
4120         len: usize,
4121         proxy_port: *mut u16,
4122     ) -> i32;
4123     pub fn sceHttpInitCache(max_size: usize) -> i32;
4124     pub fn sceHttpSetAuthInfoCB(id: i32, cbfunc: HttpPasswordCB) -> i32;
4125     pub fn sceHttpSetProxy(
4126         id: i32,
4127         activate_flag: i32,
4128         mode: i32,
4129         new_proxy_host: *const u8,
4130         new_proxy_port: u16,
4131     ) -> i32;
4132     pub fn sceHttpSetResHeaderMaxSize(id: i32, header_size: u32) -> i32;
4133     pub fn sceHttpSetMallocFunction(
4134         malloc_func: HttpMallocFunction,
4135         free_func: HttpFreeFunction,
4136         realloc_func: HttpReallocFunction,
4137     ) -> i32;
4138 
4139     pub fn sceNetResolverInit() -> i32;
4140     pub fn sceNetResolverCreate(rid: *mut i32, buf: *mut c_void, buf_length: u32) -> i32;
4141     pub fn sceNetResolverDelete(rid: i32) -> i32;
4142     pub fn sceNetResolverStartNtoA(
4143         rid: i32,
4144         hostname: *const u8,
4145         addr: *mut in_addr,
4146         timeout: u32,
4147         retry: i32,
4148     ) -> i32;
4149     pub fn sceNetResolverStartAtoN(
4150         rid: i32,
4151         addr: *const in_addr,
4152         hostname: *mut u8,
4153         hostname_len: u32,
4154         timeout: u32,
4155         retry: i32,
4156     ) -> i32;
4157     pub fn sceNetResolverStop(rid: i32) -> i32;
4158     pub fn sceNetResolverTerm() -> i32;
4159 }
4160