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