forked from maxton/LibOrbisPkg
-
Notifications
You must be signed in to change notification settings - Fork 13
/
PS4PKG.bt
852 lines (826 loc) · 36.4 KB
/
PS4PKG.bt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
#define PKG_PFS_IMAGE_FILE_NAME "pfs_image.dat"
#define PKG_CONTENT_ID_SIZE 0x30
#define PKG_HASH_SIZE 0x20
#define PKG_HEADER_SIZE 0x5A0
#define PKG_TABLE_ENTRY_SIZE 0x20
#define PKG_ENTRY_KEYSET_SIZE 0x20
#define PKG_ENTRY_KEYSET_ENC_SIZE 0x100
#define PKG_FLAG_FINALIZED (UINT32_C(1) << 31)
typedef enum <uint32> {
APP_TYPE_PAID_STANDALONE_FULL = 1,
APP_TYPE_UPGRADABLE = 2,
APP_TYPE_DEMO = 3,
APP_TYPE_FREEMIUM = 4,
} app_type_t;
typedef enum <uint32> {
DRM_TYPE_NONE = 0x0,
DRM_TYPE_PS4 = 0xF,
}drm_type_t;
typedef enum <uint32> {
CONTENT_TYPE_GD = 0x1A, /* pkg_ps4_app, pkg_ps4_patch, pkg_ps4_remaster */
CONTENT_TYPE_AC = 0x1B, /* pkg_ps4_ac_data, pkg_ps4_sf_theme, pkg_ps4_theme */
CONTENT_TYPE_AL = 0x1C, /* pkg_ps4_ac_nodata */
CONTENT_TYPE_DP = 0x1E, /* pkg_ps4_delta_patch */
} content_type_t;
typedef enum <uint32> {
IRO_TAG_SF_THEME = 0x1, /* SHAREfactory theme */
IRO_TAG_SS_THEME = 0x2, /* System Software theme */
} iro_tag_t;
#define PKG_FLAGS_VER_1 0x01000000
#define PKG_FLAGS_VER_2 0x02000000
#define PKG_FLAGS_INTERNAL 0x40000000
#define PKG_FLAGS_FINALIZED 0x80000000
#define PKG_CONTENT_FLAGS_FIRST_PATCH 0x00100000
#define PKG_CONTENT_FLAGS_PATCHGO 0x00200000
#define PKG_CONTENT_FLAGS_REMASTER 0x00400000
#define PKG_CONTENT_FLAGS_PS_CLOUD 0x00800000
#define PKG_CONTENT_FLAGS_GD_AC 0x02000000
#define PKG_CONTENT_FLAGS_NON_GAME 0x04000000
#define PKG_CONTENT_FLAGS_0x8000000 0x08000000 /* has data? */
#define PKG_CONTENT_FLAGS_SUBSEQUENT_PATCH 0x40000000
#define PKG_CONTENT_FLAGS_DELTA_PATCH 0x41000000
#define PKG_CONTENT_FLAGS_CUMULATIVE_PATCH 0x60000000
#define PKG_PFS_FLAG_NESTED_IMAGE 0x8000000000000000
typedef struct {
BigEndian();
char magic[4];
uint32 flags<format=hex>;
uint32 unk_0x08;
uint32 unk_0x0C; /* 0xF */
uint32 entry_count;
uint16 sc_entry_count;
uint16 entry_count_2; /* same as entry_count */
uint32 entry_table_offset<format=hex>;
uint32 main_ent_data_size;
uint64 body_offset<format=hex>;
uint64 body_size;
FSeek(0x10 + FTell());
char content_id[0x30]; /* PKG_CONTENT_ID_SIZE */
drm_type_t drm_type;
content_type_t content_type;
uint32 content_flags<format=hex>;
uint32 promote_size;
uint32 version_date<format=hex>;
uint32 version_hash;
uint32 unk_0x88; /* for delta patches only? */
uint32 unk_0x8C; /* for delta patches only? */
uint32 unk_0x90; /* for delta patches only? */
uint32 unk_0x94; /* for delta patches only? */
iro_tag_t iro_tag;
uint32 ekc_version; /* drm type version */
FSeek(0x100 - 0xA0 + FTell());
uchar sc_entries1_hash[0x20]; //PKG_HASH_SIZE
uchar sc_entries2_hash[0x20]; // PKG_HASH_SIZE
uchar digest_table_hash[0x20]; // PKG_HASH_SIZE
uchar body_digest[0x20]; // PKG_HASH_SIZE
FSeek(0x400 - 0x180 + FTell());
// TODO: i think these fields are actually members of element of container array
uint32 unk_0x400;
uint32 pfs_image_count;
uint64 pfs_flags<format=hex>;
uint64 pfs_image_offset<format=hex>;
uint64 pfs_image_size;
uint64 mount_image_offset<format=hex>;
uint64 mount_image_size;
uint64 package_size;
uint32 pfs_signed_size;
uint32 pfs_cache_size;
uchar pfs_image_digest[0x20]; // PKG_HASH_SIZE
uchar pfs_signed_digest[0x20]; // PKG_HASH_SIZE
uint64 pfs_split_size_nth_0;
uint64 pfs_split_size_nth_1;
FSeek(0xFE0);
uchar PackageDigest[32];
uchar PackageSignature[256];
} pkg_header;
typedef enum <uint32> {
PKG_ENTRY_ID__DIGESTS = 0x00000001,
PKG_ENTRY_ID__ENTRY_KEYS = 0x00000010,
PKG_ENTRY_ID__IMAGE_KEY = 0x00000020,
PKG_ENTRY_ID__GENERAL_DIGESTS = 0x00000080,
PKG_ENTRY_ID__METAS = 0x00000100,
PKG_ENTRY_ID__ENTRY_NAMES = 0x00000200,
PKG_ENTRY_ID__LICENSE_DAT = 0x00000400,
PKG_ENTRY_ID__LICENSE_INFO = 0x00000401,
PKG_ENTRY_ID__NPTITLE_DAT = 0x00000402,
PKG_ENTRY_ID__NPBIND_DAT = 0x00000403,
PKG_ENTRY_ID__SELFINFO_DAT = 0x00000404,
PKG_ENTRY_ID__IMAGEINFO_DAT = 0x00000406,
PKG_ENTRY_ID__TARGET_DELTAINFO_DAT = 0x00000407,
PKG_ENTRY_ID__ORIGIN_DELTAINFO_DAT = 0x00000408,
PKG_ENTRY_ID__PSRESERVED_DAT = 0x00000409,
PKG_ENTRY_ID__PARAM_SFO = 0x00001000,
PKG_ENTRY_ID__PLAYGO_CHUNK_DAT = 0x00001001,
PKG_ENTRY_ID__PLAYGO_CHUNK_SHA = 0x00001002,
PKG_ENTRY_ID__PLAYGO_MANIFEST_XML = 0x00001003,
PKG_ENTRY_ID__PRONUNCIATION_XML = 0x00001004,
PKG_ENTRY_ID__PRONUNCIATION_SIG = 0x00001005,
PKG_ENTRY_ID__PIC1_PNG = 0x00001006,
PKG_ENTRY_ID__PUBTOOLINFO_DAT = 0x00001007,
PKG_ENTRY_ID__APP__PLAYGO_CHUNK_DAT = 0x00001008,
PKG_ENTRY_ID__APP__PLAYGO_CHUNK_SHA = 0x00001009,
PKG_ENTRY_ID__APP__PLAYGO_MANIFEST_XML = 0x0000100A,
PKG_ENTRY_ID__SHAREPARAM_JSON = 0x0000100B,
PKG_ENTRY_ID__SHAREOVERLAYIMAGE_PNG = 0x0000100C,
PKG_ENTRY_ID__SAVE_DATA_PNG = 0x0000100D,
PKG_ENTRY_ID__SHAREPRIVACYGUARDIMAGE_PNG = 0x0000100E,
PKG_ENTRY_ID__ICON0_PNG = 0x00001200,
PKG_ENTRY_ID__ICON0_00_PNG = 0x00001201,
PKG_ENTRY_ID__ICON0_01_PNG = 0x00001202,
PKG_ENTRY_ID__ICON0_02_PNG = 0x00001203,
PKG_ENTRY_ID__ICON0_03_PNG = 0x00001204,
PKG_ENTRY_ID__ICON0_04_PNG = 0x00001205,
PKG_ENTRY_ID__ICON0_05_PNG = 0x00001206,
PKG_ENTRY_ID__ICON0_06_PNG = 0x00001207,
PKG_ENTRY_ID__ICON0_07_PNG = 0x00001208,
PKG_ENTRY_ID__ICON0_08_PNG = 0x00001209,
PKG_ENTRY_ID__ICON0_09_PNG = 0x0000120A,
PKG_ENTRY_ID__ICON0_10_PNG = 0x0000120B,
PKG_ENTRY_ID__ICON0_11_PNG = 0x0000120C,
PKG_ENTRY_ID__ICON0_12_PNG = 0x0000120D,
PKG_ENTRY_ID__ICON0_13_PNG = 0x0000120E,
PKG_ENTRY_ID__ICON0_14_PNG = 0x0000120F,
PKG_ENTRY_ID__ICON0_15_PNG = 0x00001210,
PKG_ENTRY_ID__ICON0_16_PNG = 0x00001211,
PKG_ENTRY_ID__ICON0_17_PNG = 0x00001212,
PKG_ENTRY_ID__ICON0_18_PNG = 0x00001213,
PKG_ENTRY_ID__ICON0_19_PNG = 0x00001214,
PKG_ENTRY_ID__ICON0_20_PNG = 0x00001215,
PKG_ENTRY_ID__ICON0_21_PNG = 0x00001216,
PKG_ENTRY_ID__ICON0_22_PNG = 0x00001217,
PKG_ENTRY_ID__ICON0_23_PNG = 0x00001218,
PKG_ENTRY_ID__ICON0_24_PNG = 0x00001219,
PKG_ENTRY_ID__ICON0_25_PNG = 0x0000121A,
PKG_ENTRY_ID__ICON0_26_PNG = 0x0000121B,
PKG_ENTRY_ID__ICON0_27_PNG = 0x0000121C,
PKG_ENTRY_ID__ICON0_28_PNG = 0x0000121D,
PKG_ENTRY_ID__ICON0_29_PNG = 0x0000121E,
PKG_ENTRY_ID__ICON0_30_PNG = 0x0000121F,
PKG_ENTRY_ID__PIC0_PNG = 0x00001220,
PKG_ENTRY_ID__SND0_AT9 = 0x00001240,
PKG_ENTRY_ID__PIC1_00_PNG = 0x00001241,
PKG_ENTRY_ID__PIC1_01_PNG = 0x00001242,
PKG_ENTRY_ID__PIC1_02_PNG = 0x00001243,
PKG_ENTRY_ID__PIC1_03_PNG = 0x00001244,
PKG_ENTRY_ID__PIC1_04_PNG = 0x00001245,
PKG_ENTRY_ID__PIC1_05_PNG = 0x00001246,
PKG_ENTRY_ID__PIC1_06_PNG = 0x00001247,
PKG_ENTRY_ID__PIC1_07_PNG = 0x00001248,
PKG_ENTRY_ID__PIC1_08_PNG = 0x00001249,
PKG_ENTRY_ID__PIC1_09_PNG = 0x0000124A,
PKG_ENTRY_ID__PIC1_10_PNG = 0x0000124B,
PKG_ENTRY_ID__PIC1_11_PNG = 0x0000124C,
PKG_ENTRY_ID__PIC1_12_PNG = 0x0000124D,
PKG_ENTRY_ID__PIC1_13_PNG = 0x0000124E,
PKG_ENTRY_ID__PIC1_14_PNG = 0x0000124F,
PKG_ENTRY_ID__PIC1_15_PNG = 0x00001250,
PKG_ENTRY_ID__PIC1_16_PNG = 0x00001251,
PKG_ENTRY_ID__PIC1_17_PNG = 0x00001252,
PKG_ENTRY_ID__PIC1_18_PNG = 0x00001253,
PKG_ENTRY_ID__PIC1_19_PNG = 0x00001254,
PKG_ENTRY_ID__PIC1_20_PNG = 0x00001255,
PKG_ENTRY_ID__PIC1_21_PNG = 0x00001256,
PKG_ENTRY_ID__PIC1_22_PNG = 0x00001257,
PKG_ENTRY_ID__PIC1_23_PNG = 0x00001258,
PKG_ENTRY_ID__PIC1_24_PNG = 0x00001259,
PKG_ENTRY_ID__PIC1_25_PNG = 0x0000125A,
PKG_ENTRY_ID__PIC1_26_PNG = 0x0000125B,
PKG_ENTRY_ID__PIC1_27_PNG = 0x0000125C,
PKG_ENTRY_ID__PIC1_28_PNG = 0x0000125D,
PKG_ENTRY_ID__PIC1_29_PNG = 0x0000125E,
PKG_ENTRY_ID__PIC1_30_PNG = 0x0000125F,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_XML = 0x00001260,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_00_XML = 0x00001261,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_01_XML = 0x00001262,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_02_XML = 0x00001263,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_03_XML = 0x00001264,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_04_XML = 0x00001265,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_05_XML = 0x00001266,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_06_XML = 0x00001267,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_07_XML = 0x00001268,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_08_XML = 0x00001269,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_09_XML = 0x0000126A,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_10_XML = 0x0000126B,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_11_XML = 0x0000126C,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_12_XML = 0x0000126D,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_13_XML = 0x0000126E,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_14_XML = 0x0000126F,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_15_XML = 0x00001270,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_16_XML = 0x00001271,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_17_XML = 0x00001272,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_18_XML = 0x00001273,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_19_XML = 0x00001274,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_20_XML = 0x00001275,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_21_XML = 0x00001276,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_22_XML = 0x00001277,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_23_XML = 0x00001278,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_24_XML = 0x00001279,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_25_XML = 0x0000127A,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_26_XML = 0x0000127B,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_27_XML = 0x0000127C,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_28_XML = 0x0000127D,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_29_XML = 0x0000127E,
PKG_ENTRY_ID__CHANGEINFO__CHANGEINFO_30_XML = 0x0000127F,
PKG_ENTRY_ID__ICON0_DDS = 0x00001280,
PKG_ENTRY_ID__ICON0_00_DDS = 0x00001281,
PKG_ENTRY_ID__ICON0_01_DDS = 0x00001282,
PKG_ENTRY_ID__ICON0_02_DDS = 0x00001283,
PKG_ENTRY_ID__ICON0_03_DDS = 0x00001284,
PKG_ENTRY_ID__ICON0_04_DDS = 0x00001285,
PKG_ENTRY_ID__ICON0_05_DDS = 0x00001286,
PKG_ENTRY_ID__ICON0_06_DDS = 0x00001287,
PKG_ENTRY_ID__ICON0_07_DDS = 0x00001288,
PKG_ENTRY_ID__ICON0_08_DDS = 0x00001289,
PKG_ENTRY_ID__ICON0_09_DDS = 0x0000128A,
PKG_ENTRY_ID__ICON0_10_DDS = 0x0000128B,
PKG_ENTRY_ID__ICON0_11_DDS = 0x0000128C,
PKG_ENTRY_ID__ICON0_12_DDS = 0x0000128D,
PKG_ENTRY_ID__ICON0_13_DDS = 0x0000128E,
PKG_ENTRY_ID__ICON0_14_DDS = 0x0000128F,
PKG_ENTRY_ID__ICON0_15_DDS = 0x00001290,
PKG_ENTRY_ID__ICON0_16_DDS = 0x00001291,
PKG_ENTRY_ID__ICON0_17_DDS = 0x00001292,
PKG_ENTRY_ID__ICON0_18_DDS = 0x00001293,
PKG_ENTRY_ID__ICON0_19_DDS = 0x00001294,
PKG_ENTRY_ID__ICON0_20_DDS = 0x00001295,
PKG_ENTRY_ID__ICON0_21_DDS = 0x00001296,
PKG_ENTRY_ID__ICON0_22_DDS = 0x00001297,
PKG_ENTRY_ID__ICON0_23_DDS = 0x00001298,
PKG_ENTRY_ID__ICON0_24_DDS = 0x00001299,
PKG_ENTRY_ID__ICON0_25_DDS = 0x0000129A,
PKG_ENTRY_ID__ICON0_26_DDS = 0x0000129B,
PKG_ENTRY_ID__ICON0_27_DDS = 0x0000129C,
PKG_ENTRY_ID__ICON0_28_DDS = 0x0000129D,
PKG_ENTRY_ID__ICON0_29_DDS = 0x0000129E,
PKG_ENTRY_ID__ICON0_30_DDS = 0x0000129F,
PKG_ENTRY_ID__PIC0_DDS = 0x000012A0,
PKG_ENTRY_ID__PIC1_DDS = 0x000012C0,
PKG_ENTRY_ID__PIC1_00_DDS = 0x000012C1,
PKG_ENTRY_ID__PIC1_01_DDS = 0x000012C2,
PKG_ENTRY_ID__PIC1_02_DDS = 0x000012C3,
PKG_ENTRY_ID__PIC1_03_DDS = 0x000012C4,
PKG_ENTRY_ID__PIC1_04_DDS = 0x000012C5,
PKG_ENTRY_ID__PIC1_05_DDS = 0x000012C6,
PKG_ENTRY_ID__PIC1_06_DDS = 0x000012C7,
PKG_ENTRY_ID__PIC1_07_DDS = 0x000012C8,
PKG_ENTRY_ID__PIC1_08_DDS = 0x000012C9,
PKG_ENTRY_ID__PIC1_09_DDS = 0x000012CA,
PKG_ENTRY_ID__PIC1_10_DDS = 0x000012CB,
PKG_ENTRY_ID__PIC1_11_DDS = 0x000012CC,
PKG_ENTRY_ID__PIC1_12_DDS = 0x000012CD,
PKG_ENTRY_ID__PIC1_13_DDS = 0x000012CE,
PKG_ENTRY_ID__PIC1_14_DDS = 0x000012CF,
PKG_ENTRY_ID__PIC1_15_DDS = 0x000012D0,
PKG_ENTRY_ID__PIC1_16_DDS = 0x000012D1,
PKG_ENTRY_ID__PIC1_17_DDS = 0x000012D2,
PKG_ENTRY_ID__PIC1_18_DDS = 0x000012D3,
PKG_ENTRY_ID__PIC1_19_DDS = 0x000012D4,
PKG_ENTRY_ID__PIC1_20_DDS = 0x000012D5,
PKG_ENTRY_ID__PIC1_21_DDS = 0x000012D6,
PKG_ENTRY_ID__PIC1_22_DDS = 0x000012D7,
PKG_ENTRY_ID__PIC1_23_DDS = 0x000012D8,
PKG_ENTRY_ID__PIC1_24_DDS = 0x000012D9,
PKG_ENTRY_ID__PIC1_25_DDS = 0x000012DA,
PKG_ENTRY_ID__PIC1_26_DDS = 0x000012DB,
PKG_ENTRY_ID__PIC1_27_DDS = 0x000012DC,
PKG_ENTRY_ID__PIC1_28_DDS = 0x000012DD,
PKG_ENTRY_ID__PIC1_29_DDS = 0x000012DE,
PKG_ENTRY_ID__PIC1_30_DDS = 0x000012DF,
PKG_ENTRY_ID__TROPHY__TROPHY00_TRP = 0x00001400,
PKG_ENTRY_ID__TROPHY__TROPHY01_TRP = 0x00001401,
PKG_ENTRY_ID__TROPHY__TROPHY02_TRP = 0x00001402,
PKG_ENTRY_ID__TROPHY__TROPHY03_TRP = 0x00001403,
PKG_ENTRY_ID__TROPHY__TROPHY04_TRP = 0x00001404,
PKG_ENTRY_ID__TROPHY__TROPHY05_TRP = 0x00001405,
PKG_ENTRY_ID__TROPHY__TROPHY06_TRP = 0x00001406,
PKG_ENTRY_ID__TROPHY__TROPHY07_TRP = 0x00001407,
PKG_ENTRY_ID__TROPHY__TROPHY08_TRP = 0x00001408,
PKG_ENTRY_ID__TROPHY__TROPHY09_TRP = 0x00001409,
PKG_ENTRY_ID__TROPHY__TROPHY10_TRP = 0x0000140A,
PKG_ENTRY_ID__TROPHY__TROPHY11_TRP = 0x0000140B,
PKG_ENTRY_ID__TROPHY__TROPHY12_TRP = 0x0000140C,
PKG_ENTRY_ID__TROPHY__TROPHY13_TRP = 0x0000140D,
PKG_ENTRY_ID__TROPHY__TROPHY14_TRP = 0x0000140E,
PKG_ENTRY_ID__TROPHY__TROPHY15_TRP = 0x0000140F,
PKG_ENTRY_ID__TROPHY__TROPHY16_TRP = 0x00001410,
PKG_ENTRY_ID__TROPHY__TROPHY17_TRP = 0x00001411,
PKG_ENTRY_ID__TROPHY__TROPHY18_TRP = 0x00001412,
PKG_ENTRY_ID__TROPHY__TROPHY19_TRP = 0x00001413,
PKG_ENTRY_ID__TROPHY__TROPHY20_TRP = 0x00001414,
PKG_ENTRY_ID__TROPHY__TROPHY21_TRP = 0x00001415,
PKG_ENTRY_ID__TROPHY__TROPHY22_TRP = 0x00001416,
PKG_ENTRY_ID__TROPHY__TROPHY23_TRP = 0x00001417,
PKG_ENTRY_ID__TROPHY__TROPHY24_TRP = 0x00001418,
PKG_ENTRY_ID__TROPHY__TROPHY25_TRP = 0x00001419,
PKG_ENTRY_ID__TROPHY__TROPHY26_TRP = 0x0000141A,
PKG_ENTRY_ID__TROPHY__TROPHY27_TRP = 0x0000141B,
PKG_ENTRY_ID__TROPHY__TROPHY28_TRP = 0x0000141C,
PKG_ENTRY_ID__TROPHY__TROPHY29_TRP = 0x0000141D,
PKG_ENTRY_ID__TROPHY__TROPHY30_TRP = 0x0000141E,
PKG_ENTRY_ID__TROPHY__TROPHY31_TRP = 0x0000141F,
PKG_ENTRY_ID__TROPHY__TROPHY32_TRP = 0x00001420,
PKG_ENTRY_ID__TROPHY__TROPHY33_TRP = 0x00001421,
PKG_ENTRY_ID__TROPHY__TROPHY34_TRP = 0x00001422,
PKG_ENTRY_ID__TROPHY__TROPHY35_TRP = 0x00001423,
PKG_ENTRY_ID__TROPHY__TROPHY36_TRP = 0x00001424,
PKG_ENTRY_ID__TROPHY__TROPHY37_TRP = 0x00001425,
PKG_ENTRY_ID__TROPHY__TROPHY38_TRP = 0x00001426,
PKG_ENTRY_ID__TROPHY__TROPHY39_TRP = 0x00001427,
PKG_ENTRY_ID__TROPHY__TROPHY40_TRP = 0x00001428,
PKG_ENTRY_ID__TROPHY__TROPHY41_TRP = 0x00001429,
PKG_ENTRY_ID__TROPHY__TROPHY42_TRP = 0x0000142A,
PKG_ENTRY_ID__TROPHY__TROPHY43_TRP = 0x0000142B,
PKG_ENTRY_ID__TROPHY__TROPHY44_TRP = 0x0000142C,
PKG_ENTRY_ID__TROPHY__TROPHY45_TRP = 0x0000142D,
PKG_ENTRY_ID__TROPHY__TROPHY46_TRP = 0x0000142E,
PKG_ENTRY_ID__TROPHY__TROPHY47_TRP = 0x0000142F,
PKG_ENTRY_ID__TROPHY__TROPHY48_TRP = 0x00001430,
PKG_ENTRY_ID__TROPHY__TROPHY49_TRP = 0x00001431,
PKG_ENTRY_ID__TROPHY__TROPHY50_TRP = 0x00001432,
PKG_ENTRY_ID__TROPHY__TROPHY51_TRP = 0x00001433,
PKG_ENTRY_ID__TROPHY__TROPHY52_TRP = 0x00001434,
PKG_ENTRY_ID__TROPHY__TROPHY53_TRP = 0x00001435,
PKG_ENTRY_ID__TROPHY__TROPHY54_TRP = 0x00001436,
PKG_ENTRY_ID__TROPHY__TROPHY55_TRP = 0x00001437,
PKG_ENTRY_ID__TROPHY__TROPHY56_TRP = 0x00001438,
PKG_ENTRY_ID__TROPHY__TROPHY57_TRP = 0x00001439,
PKG_ENTRY_ID__TROPHY__TROPHY58_TRP = 0x0000143A,
PKG_ENTRY_ID__TROPHY__TROPHY59_TRP = 0x0000143B,
PKG_ENTRY_ID__TROPHY__TROPHY60_TRP = 0x0000143C,
PKG_ENTRY_ID__TROPHY__TROPHY61_TRP = 0x0000143D,
PKG_ENTRY_ID__TROPHY__TROPHY62_TRP = 0x0000143E,
PKG_ENTRY_ID__TROPHY__TROPHY63_TRP = 0x0000143F,
PKG_ENTRY_ID__TROPHY__TROPHY64_TRP = 0x00001440,
PKG_ENTRY_ID__TROPHY__TROPHY65_TRP = 0x00001441,
PKG_ENTRY_ID__TROPHY__TROPHY66_TRP = 0x00001442,
PKG_ENTRY_ID__TROPHY__TROPHY67_TRP = 0x00001443,
PKG_ENTRY_ID__TROPHY__TROPHY68_TRP = 0x00001444,
PKG_ENTRY_ID__TROPHY__TROPHY69_TRP = 0x00001445,
PKG_ENTRY_ID__TROPHY__TROPHY70_TRP = 0x00001446,
PKG_ENTRY_ID__TROPHY__TROPHY71_TRP = 0x00001447,
PKG_ENTRY_ID__TROPHY__TROPHY72_TRP = 0x00001448,
PKG_ENTRY_ID__TROPHY__TROPHY73_TRP = 0x00001449,
PKG_ENTRY_ID__TROPHY__TROPHY74_TRP = 0x0000144A,
PKG_ENTRY_ID__TROPHY__TROPHY75_TRP = 0x0000144B,
PKG_ENTRY_ID__TROPHY__TROPHY76_TRP = 0x0000144C,
PKG_ENTRY_ID__TROPHY__TROPHY77_TRP = 0x0000144D,
PKG_ENTRY_ID__TROPHY__TROPHY78_TRP = 0x0000144E,
PKG_ENTRY_ID__TROPHY__TROPHY79_TRP = 0x0000144F,
PKG_ENTRY_ID__TROPHY__TROPHY80_TRP = 0x00001450,
PKG_ENTRY_ID__TROPHY__TROPHY81_TRP = 0x00001451,
PKG_ENTRY_ID__TROPHY__TROPHY82_TRP = 0x00001452,
PKG_ENTRY_ID__TROPHY__TROPHY83_TRP = 0x00001453,
PKG_ENTRY_ID__TROPHY__TROPHY84_TRP = 0x00001454,
PKG_ENTRY_ID__TROPHY__TROPHY85_TRP = 0x00001455,
PKG_ENTRY_ID__TROPHY__TROPHY86_TRP = 0x00001456,
PKG_ENTRY_ID__TROPHY__TROPHY87_TRP = 0x00001457,
PKG_ENTRY_ID__TROPHY__TROPHY88_TRP = 0x00001458,
PKG_ENTRY_ID__TROPHY__TROPHY89_TRP = 0x00001459,
PKG_ENTRY_ID__TROPHY__TROPHY90_TRP = 0x0000145A,
PKG_ENTRY_ID__TROPHY__TROPHY91_TRP = 0x0000145B,
PKG_ENTRY_ID__TROPHY__TROPHY92_TRP = 0x0000145C,
PKG_ENTRY_ID__TROPHY__TROPHY93_TRP = 0x0000145D,
PKG_ENTRY_ID__TROPHY__TROPHY94_TRP = 0x0000145E,
PKG_ENTRY_ID__TROPHY__TROPHY95_TRP = 0x0000145F,
PKG_ENTRY_ID__TROPHY__TROPHY96_TRP = 0x00001460,
PKG_ENTRY_ID__TROPHY__TROPHY97_TRP = 0x00001461,
PKG_ENTRY_ID__TROPHY__TROPHY98_TRP = 0x00001462,
PKG_ENTRY_ID__TROPHY__TROPHY99_TRP = 0x00001463,
PKG_ENTRY_ID__KEYMAP_RP__001_PNG = 0x00001600,
PKG_ENTRY_ID__KEYMAP_RP__002_PNG = 0x00001601,
PKG_ENTRY_ID__KEYMAP_RP__003_PNG = 0x00001602,
PKG_ENTRY_ID__KEYMAP_RP__004_PNG = 0x00001603,
PKG_ENTRY_ID__KEYMAP_RP__005_PNG = 0x00001604,
PKG_ENTRY_ID__KEYMAP_RP__006_PNG = 0x00001605,
PKG_ENTRY_ID__KEYMAP_RP__007_PNG = 0x00001606,
PKG_ENTRY_ID__KEYMAP_RP__008_PNG = 0x00001607,
PKG_ENTRY_ID__KEYMAP_RP__009_PNG = 0x00001608,
PKG_ENTRY_ID__KEYMAP_RP__010_PNG = 0x00001609,
PKG_ENTRY_ID__KEYMAP_RP__00__001_PNG = 0x00001610,
PKG_ENTRY_ID__KEYMAP_RP__00__002_PNG = 0x00001611,
PKG_ENTRY_ID__KEYMAP_RP__00__003_PNG = 0x00001612,
PKG_ENTRY_ID__KEYMAP_RP__00__004_PNG = 0x00001613,
PKG_ENTRY_ID__KEYMAP_RP__00__005_PNG = 0x00001614,
PKG_ENTRY_ID__KEYMAP_RP__00__006_PNG = 0x00001615,
PKG_ENTRY_ID__KEYMAP_RP__00__007_PNG = 0x00001616,
PKG_ENTRY_ID__KEYMAP_RP__00__008_PNG = 0x00001617,
PKG_ENTRY_ID__KEYMAP_RP__00__009_PNG = 0x00001618,
PKG_ENTRY_ID__KEYMAP_RP__00__010_PNG = 0x00001619,
PKG_ENTRY_ID__KEYMAP_RP__01__001_PNG = 0x00001620,
PKG_ENTRY_ID__KEYMAP_RP__01__002_PNG = 0x00001621,
PKG_ENTRY_ID__KEYMAP_RP__01__003_PNG = 0x00001622,
PKG_ENTRY_ID__KEYMAP_RP__01__004_PNG = 0x00001623,
PKG_ENTRY_ID__KEYMAP_RP__01__005_PNG = 0x00001624,
PKG_ENTRY_ID__KEYMAP_RP__01__006_PNG = 0x00001625,
PKG_ENTRY_ID__KEYMAP_RP__01__007_PNG = 0x00001626,
PKG_ENTRY_ID__KEYMAP_RP__01__008_PNG = 0x00001627,
PKG_ENTRY_ID__KEYMAP_RP__01__009_PNG = 0x00001628,
PKG_ENTRY_ID__KEYMAP_RP__01__010_PNG = 0x00001629,
PKG_ENTRY_ID__KEYMAP_RP__02__001_PNG = 0x00001630,
PKG_ENTRY_ID__KEYMAP_RP__02__002_PNG = 0x00001631,
PKG_ENTRY_ID__KEYMAP_RP__02__003_PNG = 0x00001632,
PKG_ENTRY_ID__KEYMAP_RP__02__004_PNG = 0x00001633,
PKG_ENTRY_ID__KEYMAP_RP__02__005_PNG = 0x00001634,
PKG_ENTRY_ID__KEYMAP_RP__02__006_PNG = 0x00001635,
PKG_ENTRY_ID__KEYMAP_RP__02__007_PNG = 0x00001636,
PKG_ENTRY_ID__KEYMAP_RP__02__008_PNG = 0x00001637,
PKG_ENTRY_ID__KEYMAP_RP__02__009_PNG = 0x00001638,
PKG_ENTRY_ID__KEYMAP_RP__02__010_PNG = 0x00001639,
PKG_ENTRY_ID__KEYMAP_RP__03__001_PNG = 0x00001640,
PKG_ENTRY_ID__KEYMAP_RP__03__002_PNG = 0x00001641,
PKG_ENTRY_ID__KEYMAP_RP__03__003_PNG = 0x00001642,
PKG_ENTRY_ID__KEYMAP_RP__03__004_PNG = 0x00001643,
PKG_ENTRY_ID__KEYMAP_RP__03__005_PNG = 0x00001644,
PKG_ENTRY_ID__KEYMAP_RP__03__006_PNG = 0x00001645,
PKG_ENTRY_ID__KEYMAP_RP__03__007_PNG = 0x00001646,
PKG_ENTRY_ID__KEYMAP_RP__03__008_PNG = 0x00001647,
PKG_ENTRY_ID__KEYMAP_RP__03__009_PNG = 0x00001648,
PKG_ENTRY_ID__KEYMAP_RP__03__010_PNG = 0x00001649,
PKG_ENTRY_ID__KEYMAP_RP__04__001_PNG = 0x00001650,
PKG_ENTRY_ID__KEYMAP_RP__04__002_PNG = 0x00001651,
PKG_ENTRY_ID__KEYMAP_RP__04__003_PNG = 0x00001652,
PKG_ENTRY_ID__KEYMAP_RP__04__004_PNG = 0x00001653,
PKG_ENTRY_ID__KEYMAP_RP__04__005_PNG = 0x00001654,
PKG_ENTRY_ID__KEYMAP_RP__04__006_PNG = 0x00001655,
PKG_ENTRY_ID__KEYMAP_RP__04__007_PNG = 0x00001656,
PKG_ENTRY_ID__KEYMAP_RP__04__008_PNG = 0x00001657,
PKG_ENTRY_ID__KEYMAP_RP__04__009_PNG = 0x00001658,
PKG_ENTRY_ID__KEYMAP_RP__04__010_PNG = 0x00001659,
PKG_ENTRY_ID__KEYMAP_RP__05__001_PNG = 0x00001660,
PKG_ENTRY_ID__KEYMAP_RP__05__002_PNG = 0x00001661,
PKG_ENTRY_ID__KEYMAP_RP__05__003_PNG = 0x00001662,
PKG_ENTRY_ID__KEYMAP_RP__05__004_PNG = 0x00001663,
PKG_ENTRY_ID__KEYMAP_RP__05__005_PNG = 0x00001664,
PKG_ENTRY_ID__KEYMAP_RP__05__006_PNG = 0x00001665,
PKG_ENTRY_ID__KEYMAP_RP__05__007_PNG = 0x00001666,
PKG_ENTRY_ID__KEYMAP_RP__05__008_PNG = 0x00001667,
PKG_ENTRY_ID__KEYMAP_RP__05__009_PNG = 0x00001668,
PKG_ENTRY_ID__KEYMAP_RP__05__010_PNG = 0x00001669,
PKG_ENTRY_ID__KEYMAP_RP__06__001_PNG = 0x00001670,
PKG_ENTRY_ID__KEYMAP_RP__06__002_PNG = 0x00001671,
PKG_ENTRY_ID__KEYMAP_RP__06__003_PNG = 0x00001672,
PKG_ENTRY_ID__KEYMAP_RP__06__004_PNG = 0x00001673,
PKG_ENTRY_ID__KEYMAP_RP__06__005_PNG = 0x00001674,
PKG_ENTRY_ID__KEYMAP_RP__06__006_PNG = 0x00001675,
PKG_ENTRY_ID__KEYMAP_RP__06__007_PNG = 0x00001676,
PKG_ENTRY_ID__KEYMAP_RP__06__008_PNG = 0x00001677,
PKG_ENTRY_ID__KEYMAP_RP__06__009_PNG = 0x00001678,
PKG_ENTRY_ID__KEYMAP_RP__06__010_PNG = 0x00001679,
PKG_ENTRY_ID__KEYMAP_RP__07__001_PNG = 0x00001680,
PKG_ENTRY_ID__KEYMAP_RP__07__002_PNG = 0x00001681,
PKG_ENTRY_ID__KEYMAP_RP__07__003_PNG = 0x00001682,
PKG_ENTRY_ID__KEYMAP_RP__07__004_PNG = 0x00001683,
PKG_ENTRY_ID__KEYMAP_RP__07__005_PNG = 0x00001684,
PKG_ENTRY_ID__KEYMAP_RP__07__006_PNG = 0x00001685,
PKG_ENTRY_ID__KEYMAP_RP__07__007_PNG = 0x00001686,
PKG_ENTRY_ID__KEYMAP_RP__07__008_PNG = 0x00001687,
PKG_ENTRY_ID__KEYMAP_RP__07__009_PNG = 0x00001688,
PKG_ENTRY_ID__KEYMAP_RP__07__010_PNG = 0x00001689,
PKG_ENTRY_ID__KEYMAP_RP__08__001_PNG = 0x00001690,
PKG_ENTRY_ID__KEYMAP_RP__08__002_PNG = 0x00001691,
PKG_ENTRY_ID__KEYMAP_RP__08__003_PNG = 0x00001692,
PKG_ENTRY_ID__KEYMAP_RP__08__004_PNG = 0x00001693,
PKG_ENTRY_ID__KEYMAP_RP__08__005_PNG = 0x00001694,
PKG_ENTRY_ID__KEYMAP_RP__08__006_PNG = 0x00001695,
PKG_ENTRY_ID__KEYMAP_RP__08__007_PNG = 0x00001696,
PKG_ENTRY_ID__KEYMAP_RP__08__008_PNG = 0x00001697,
PKG_ENTRY_ID__KEYMAP_RP__08__009_PNG = 0x00001698,
PKG_ENTRY_ID__KEYMAP_RP__08__010_PNG = 0x00001699,
PKG_ENTRY_ID__KEYMAP_RP__09__001_PNG = 0x000016A0,
PKG_ENTRY_ID__KEYMAP_RP__09__002_PNG = 0x000016A1,
PKG_ENTRY_ID__KEYMAP_RP__09__003_PNG = 0x000016A2,
PKG_ENTRY_ID__KEYMAP_RP__09__004_PNG = 0x000016A3,
PKG_ENTRY_ID__KEYMAP_RP__09__005_PNG = 0x000016A4,
PKG_ENTRY_ID__KEYMAP_RP__09__006_PNG = 0x000016A5,
PKG_ENTRY_ID__KEYMAP_RP__09__007_PNG = 0x000016A6,
PKG_ENTRY_ID__KEYMAP_RP__09__008_PNG = 0x000016A7,
PKG_ENTRY_ID__KEYMAP_RP__09__009_PNG = 0x000016A8,
PKG_ENTRY_ID__KEYMAP_RP__09__010_PNG = 0x000016A9,
PKG_ENTRY_ID__KEYMAP_RP__10__001_PNG = 0x000016B0,
PKG_ENTRY_ID__KEYMAP_RP__10__002_PNG = 0x000016B1,
PKG_ENTRY_ID__KEYMAP_RP__10__003_PNG = 0x000016B2,
PKG_ENTRY_ID__KEYMAP_RP__10__004_PNG = 0x000016B3,
PKG_ENTRY_ID__KEYMAP_RP__10__005_PNG = 0x000016B4,
PKG_ENTRY_ID__KEYMAP_RP__10__006_PNG = 0x000016B5,
PKG_ENTRY_ID__KEYMAP_RP__10__007_PNG = 0x000016B6,
PKG_ENTRY_ID__KEYMAP_RP__10__008_PNG = 0x000016B7,
PKG_ENTRY_ID__KEYMAP_RP__10__009_PNG = 0x000016B8,
PKG_ENTRY_ID__KEYMAP_RP__10__010_PNG = 0x000016B9,
PKG_ENTRY_ID__KEYMAP_RP__11__001_PNG = 0x000016C0,
PKG_ENTRY_ID__KEYMAP_RP__11__002_PNG = 0x000016C1,
PKG_ENTRY_ID__KEYMAP_RP__11__003_PNG = 0x000016C2,
PKG_ENTRY_ID__KEYMAP_RP__11__004_PNG = 0x000016C3,
PKG_ENTRY_ID__KEYMAP_RP__11__005_PNG = 0x000016C4,
PKG_ENTRY_ID__KEYMAP_RP__11__006_PNG = 0x000016C5,
PKG_ENTRY_ID__KEYMAP_RP__11__007_PNG = 0x000016C6,
PKG_ENTRY_ID__KEYMAP_RP__11__008_PNG = 0x000016C7,
PKG_ENTRY_ID__KEYMAP_RP__11__009_PNG = 0x000016C8,
PKG_ENTRY_ID__KEYMAP_RP__11__010_PNG = 0x000016C9,
PKG_ENTRY_ID__KEYMAP_RP__12__001_PNG = 0x000016D0,
PKG_ENTRY_ID__KEYMAP_RP__12__002_PNG = 0x000016D1,
PKG_ENTRY_ID__KEYMAP_RP__12__003_PNG = 0x000016D2,
PKG_ENTRY_ID__KEYMAP_RP__12__004_PNG = 0x000016D3,
PKG_ENTRY_ID__KEYMAP_RP__12__005_PNG = 0x000016D4,
PKG_ENTRY_ID__KEYMAP_RP__12__006_PNG = 0x000016D5,
PKG_ENTRY_ID__KEYMAP_RP__12__007_PNG = 0x000016D6,
PKG_ENTRY_ID__KEYMAP_RP__12__008_PNG = 0x000016D7,
PKG_ENTRY_ID__KEYMAP_RP__12__009_PNG = 0x000016D8,
PKG_ENTRY_ID__KEYMAP_RP__12__010_PNG = 0x000016D9,
PKG_ENTRY_ID__KEYMAP_RP__13__001_PNG = 0x000016E0,
PKG_ENTRY_ID__KEYMAP_RP__13__002_PNG = 0x000016E1,
PKG_ENTRY_ID__KEYMAP_RP__13__003_PNG = 0x000016E2,
PKG_ENTRY_ID__KEYMAP_RP__13__004_PNG = 0x000016E3,
PKG_ENTRY_ID__KEYMAP_RP__13__005_PNG = 0x000016E4,
PKG_ENTRY_ID__KEYMAP_RP__13__006_PNG = 0x000016E5,
PKG_ENTRY_ID__KEYMAP_RP__13__007_PNG = 0x000016E6,
PKG_ENTRY_ID__KEYMAP_RP__13__008_PNG = 0x000016E7,
PKG_ENTRY_ID__KEYMAP_RP__13__009_PNG = 0x000016E8,
PKG_ENTRY_ID__KEYMAP_RP__13__010_PNG = 0x000016E9,
PKG_ENTRY_ID__KEYMAP_RP__14__001_PNG = 0x000016F0,
PKG_ENTRY_ID__KEYMAP_RP__14__002_PNG = 0x000016F1,
PKG_ENTRY_ID__KEYMAP_RP__14__003_PNG = 0x000016F2,
PKG_ENTRY_ID__KEYMAP_RP__14__004_PNG = 0x000016F3,
PKG_ENTRY_ID__KEYMAP_RP__14__005_PNG = 0x000016F4,
PKG_ENTRY_ID__KEYMAP_RP__14__006_PNG = 0x000016F5,
PKG_ENTRY_ID__KEYMAP_RP__14__007_PNG = 0x000016F6,
PKG_ENTRY_ID__KEYMAP_RP__14__008_PNG = 0x000016F7,
PKG_ENTRY_ID__KEYMAP_RP__14__009_PNG = 0x000016F8,
PKG_ENTRY_ID__KEYMAP_RP__14__010_PNG = 0x000016F9,
PKG_ENTRY_ID__KEYMAP_RP__15__001_PNG = 0x00001700,
PKG_ENTRY_ID__KEYMAP_RP__15__002_PNG = 0x00001701,
PKG_ENTRY_ID__KEYMAP_RP__15__003_PNG = 0x00001702,
PKG_ENTRY_ID__KEYMAP_RP__15__004_PNG = 0x00001703,
PKG_ENTRY_ID__KEYMAP_RP__15__005_PNG = 0x00001704,
PKG_ENTRY_ID__KEYMAP_RP__15__006_PNG = 0x00001705,
PKG_ENTRY_ID__KEYMAP_RP__15__007_PNG = 0x00001706,
PKG_ENTRY_ID__KEYMAP_RP__15__008_PNG = 0x00001707,
PKG_ENTRY_ID__KEYMAP_RP__15__009_PNG = 0x00001708,
PKG_ENTRY_ID__KEYMAP_RP__15__010_PNG = 0x00001709,
PKG_ENTRY_ID__KEYMAP_RP__16__001_PNG = 0x00001710,
PKG_ENTRY_ID__KEYMAP_RP__16__002_PNG = 0x00001711,
PKG_ENTRY_ID__KEYMAP_RP__16__003_PNG = 0x00001712,
PKG_ENTRY_ID__KEYMAP_RP__16__004_PNG = 0x00001713,
PKG_ENTRY_ID__KEYMAP_RP__16__005_PNG = 0x00001714,
PKG_ENTRY_ID__KEYMAP_RP__16__006_PNG = 0x00001715,
PKG_ENTRY_ID__KEYMAP_RP__16__007_PNG = 0x00001716,
PKG_ENTRY_ID__KEYMAP_RP__16__008_PNG = 0x00001717,
PKG_ENTRY_ID__KEYMAP_RP__16__009_PNG = 0x00001718,
PKG_ENTRY_ID__KEYMAP_RP__16__010_PNG = 0x00001719,
PKG_ENTRY_ID__KEYMAP_RP__17__001_PNG = 0x00001720,
PKG_ENTRY_ID__KEYMAP_RP__17__002_PNG = 0x00001721,
PKG_ENTRY_ID__KEYMAP_RP__17__003_PNG = 0x00001722,
PKG_ENTRY_ID__KEYMAP_RP__17__004_PNG = 0x00001723,
PKG_ENTRY_ID__KEYMAP_RP__17__005_PNG = 0x00001724,
PKG_ENTRY_ID__KEYMAP_RP__17__006_PNG = 0x00001725,
PKG_ENTRY_ID__KEYMAP_RP__17__007_PNG = 0x00001726,
PKG_ENTRY_ID__KEYMAP_RP__17__008_PNG = 0x00001727,
PKG_ENTRY_ID__KEYMAP_RP__17__009_PNG = 0x00001728,
PKG_ENTRY_ID__KEYMAP_RP__17__010_PNG = 0x00001729,
PKG_ENTRY_ID__KEYMAP_RP__18__001_PNG = 0x00001730,
PKG_ENTRY_ID__KEYMAP_RP__18__002_PNG = 0x00001731,
PKG_ENTRY_ID__KEYMAP_RP__18__003_PNG = 0x00001732,
PKG_ENTRY_ID__KEYMAP_RP__18__004_PNG = 0x00001733,
PKG_ENTRY_ID__KEYMAP_RP__18__005_PNG = 0x00001734,
PKG_ENTRY_ID__KEYMAP_RP__18__006_PNG = 0x00001735,
PKG_ENTRY_ID__KEYMAP_RP__18__007_PNG = 0x00001736,
PKG_ENTRY_ID__KEYMAP_RP__18__008_PNG = 0x00001737,
PKG_ENTRY_ID__KEYMAP_RP__18__009_PNG = 0x00001738,
PKG_ENTRY_ID__KEYMAP_RP__18__010_PNG = 0x00001739,
PKG_ENTRY_ID__KEYMAP_RP__19__001_PNG = 0x00001740,
PKG_ENTRY_ID__KEYMAP_RP__19__002_PNG = 0x00001741,
PKG_ENTRY_ID__KEYMAP_RP__19__003_PNG = 0x00001742,
PKG_ENTRY_ID__KEYMAP_RP__19__004_PNG = 0x00001743,
PKG_ENTRY_ID__KEYMAP_RP__19__005_PNG = 0x00001744,
PKG_ENTRY_ID__KEYMAP_RP__19__006_PNG = 0x00001745,
PKG_ENTRY_ID__KEYMAP_RP__19__007_PNG = 0x00001746,
PKG_ENTRY_ID__KEYMAP_RP__19__008_PNG = 0x00001747,
PKG_ENTRY_ID__KEYMAP_RP__19__009_PNG = 0x00001748,
PKG_ENTRY_ID__KEYMAP_RP__19__010_PNG = 0x00001749,
PKG_ENTRY_ID__KEYMAP_RP__20__001_PNG = 0x00001750,
PKG_ENTRY_ID__KEYMAP_RP__20__002_PNG = 0x00001751,
PKG_ENTRY_ID__KEYMAP_RP__20__003_PNG = 0x00001752,
PKG_ENTRY_ID__KEYMAP_RP__20__004_PNG = 0x00001753,
PKG_ENTRY_ID__KEYMAP_RP__20__005_PNG = 0x00001754,
PKG_ENTRY_ID__KEYMAP_RP__20__006_PNG = 0x00001755,
PKG_ENTRY_ID__KEYMAP_RP__20__007_PNG = 0x00001756,
PKG_ENTRY_ID__KEYMAP_RP__20__008_PNG = 0x00001757,
PKG_ENTRY_ID__KEYMAP_RP__20__009_PNG = 0x00001758,
PKG_ENTRY_ID__KEYMAP_RP__20__010_PNG = 0x00001759,
PKG_ENTRY_ID__KEYMAP_RP__21__001_PNG = 0x00001760,
PKG_ENTRY_ID__KEYMAP_RP__21__002_PNG = 0x00001761,
PKG_ENTRY_ID__KEYMAP_RP__21__003_PNG = 0x00001762,
PKG_ENTRY_ID__KEYMAP_RP__21__004_PNG = 0x00001763,
PKG_ENTRY_ID__KEYMAP_RP__21__005_PNG = 0x00001764,
PKG_ENTRY_ID__KEYMAP_RP__21__006_PNG = 0x00001765,
PKG_ENTRY_ID__KEYMAP_RP__21__007_PNG = 0x00001766,
PKG_ENTRY_ID__KEYMAP_RP__21__008_PNG = 0x00001767,
PKG_ENTRY_ID__KEYMAP_RP__21__009_PNG = 0x00001768,
PKG_ENTRY_ID__KEYMAP_RP__21__010_PNG = 0x00001769,
PKG_ENTRY_ID__KEYMAP_RP__22__001_PNG = 0x00001770,
PKG_ENTRY_ID__KEYMAP_RP__22__002_PNG = 0x00001771,
PKG_ENTRY_ID__KEYMAP_RP__22__003_PNG = 0x00001772,
PKG_ENTRY_ID__KEYMAP_RP__22__004_PNG = 0x00001773,
PKG_ENTRY_ID__KEYMAP_RP__22__005_PNG = 0x00001774,
PKG_ENTRY_ID__KEYMAP_RP__22__006_PNG = 0x00001775,
PKG_ENTRY_ID__KEYMAP_RP__22__007_PNG = 0x00001776,
PKG_ENTRY_ID__KEYMAP_RP__22__008_PNG = 0x00001777,
PKG_ENTRY_ID__KEYMAP_RP__22__009_PNG = 0x00001778,
PKG_ENTRY_ID__KEYMAP_RP__22__010_PNG = 0x00001779,
PKG_ENTRY_ID__KEYMAP_RP__23__001_PNG = 0x00001780,
PKG_ENTRY_ID__KEYMAP_RP__23__002_PNG = 0x00001781,
PKG_ENTRY_ID__KEYMAP_RP__23__003_PNG = 0x00001782,
PKG_ENTRY_ID__KEYMAP_RP__23__004_PNG = 0x00001783,
PKG_ENTRY_ID__KEYMAP_RP__23__005_PNG = 0x00001784,
PKG_ENTRY_ID__KEYMAP_RP__23__006_PNG = 0x00001785,
PKG_ENTRY_ID__KEYMAP_RP__23__007_PNG = 0x00001786,
PKG_ENTRY_ID__KEYMAP_RP__23__008_PNG = 0x00001787,
PKG_ENTRY_ID__KEYMAP_RP__23__009_PNG = 0x00001788,
PKG_ENTRY_ID__KEYMAP_RP__23__010_PNG = 0x00001789,
PKG_ENTRY_ID__KEYMAP_RP__24__001_PNG = 0x00001790,
PKG_ENTRY_ID__KEYMAP_RP__24__002_PNG = 0x00001791,
PKG_ENTRY_ID__KEYMAP_RP__24__003_PNG = 0x00001792,
PKG_ENTRY_ID__KEYMAP_RP__24__004_PNG = 0x00001793,
PKG_ENTRY_ID__KEYMAP_RP__24__005_PNG = 0x00001794,
PKG_ENTRY_ID__KEYMAP_RP__24__006_PNG = 0x00001795,
PKG_ENTRY_ID__KEYMAP_RP__24__007_PNG = 0x00001796,
PKG_ENTRY_ID__KEYMAP_RP__24__008_PNG = 0x00001797,
PKG_ENTRY_ID__KEYMAP_RP__24__009_PNG = 0x00001798,
PKG_ENTRY_ID__KEYMAP_RP__24__010_PNG = 0x00001799,
PKG_ENTRY_ID__KEYMAP_RP__25__001_PNG = 0x000017A0,
PKG_ENTRY_ID__KEYMAP_RP__25__002_PNG = 0x000017A1,
PKG_ENTRY_ID__KEYMAP_RP__25__003_PNG = 0x000017A2,
PKG_ENTRY_ID__KEYMAP_RP__25__004_PNG = 0x000017A3,
PKG_ENTRY_ID__KEYMAP_RP__25__005_PNG = 0x000017A4,
PKG_ENTRY_ID__KEYMAP_RP__25__006_PNG = 0x000017A5,
PKG_ENTRY_ID__KEYMAP_RP__25__007_PNG = 0x000017A6,
PKG_ENTRY_ID__KEYMAP_RP__25__008_PNG = 0x000017A7,
PKG_ENTRY_ID__KEYMAP_RP__25__009_PNG = 0x000017A8,
PKG_ENTRY_ID__KEYMAP_RP__25__010_PNG = 0x000017A9,
PKG_ENTRY_ID__KEYMAP_RP__26__001_PNG = 0x000017B0,
PKG_ENTRY_ID__KEYMAP_RP__26__002_PNG = 0x000017B1,
PKG_ENTRY_ID__KEYMAP_RP__26__003_PNG = 0x000017B2,
PKG_ENTRY_ID__KEYMAP_RP__26__004_PNG = 0x000017B3,
PKG_ENTRY_ID__KEYMAP_RP__26__005_PNG = 0x000017B4,
PKG_ENTRY_ID__KEYMAP_RP__26__006_PNG = 0x000017B5,
PKG_ENTRY_ID__KEYMAP_RP__26__007_PNG = 0x000017B6,
PKG_ENTRY_ID__KEYMAP_RP__26__008_PNG = 0x000017B7,
PKG_ENTRY_ID__KEYMAP_RP__26__009_PNG = 0x000017B8,
PKG_ENTRY_ID__KEYMAP_RP__26__010_PNG = 0x000017B9,
PKG_ENTRY_ID__KEYMAP_RP__27__001_PNG = 0x000017C0,
PKG_ENTRY_ID__KEYMAP_RP__27__002_PNG = 0x000017C1,
PKG_ENTRY_ID__KEYMAP_RP__27__003_PNG = 0x000017C2,
PKG_ENTRY_ID__KEYMAP_RP__27__004_PNG = 0x000017C3,
PKG_ENTRY_ID__KEYMAP_RP__27__005_PNG = 0x000017C4,
PKG_ENTRY_ID__KEYMAP_RP__27__006_PNG = 0x000017C5,
PKG_ENTRY_ID__KEYMAP_RP__27__007_PNG = 0x000017C6,
PKG_ENTRY_ID__KEYMAP_RP__27__008_PNG = 0x000017C7,
PKG_ENTRY_ID__KEYMAP_RP__27__009_PNG = 0x000017C8,
PKG_ENTRY_ID__KEYMAP_RP__27__010_PNG = 0x000017C9,
PKG_ENTRY_ID__KEYMAP_RP__28__001_PNG = 0x000017D0,
PKG_ENTRY_ID__KEYMAP_RP__28__002_PNG = 0x000017D1,
PKG_ENTRY_ID__KEYMAP_RP__28__003_PNG = 0x000017D2,
PKG_ENTRY_ID__KEYMAP_RP__28__004_PNG = 0x000017D3,
PKG_ENTRY_ID__KEYMAP_RP__28__005_PNG = 0x000017D4,
PKG_ENTRY_ID__KEYMAP_RP__28__006_PNG = 0x000017D5,
PKG_ENTRY_ID__KEYMAP_RP__28__007_PNG = 0x000017D6,
PKG_ENTRY_ID__KEYMAP_RP__28__008_PNG = 0x000017D7,
PKG_ENTRY_ID__KEYMAP_RP__28__009_PNG = 0x000017D8,
PKG_ENTRY_ID__KEYMAP_RP__28__010_PNG = 0x000017D9,
PKG_ENTRY_ID__KEYMAP_RP__29__001_PNG = 0x000017E0,
PKG_ENTRY_ID__KEYMAP_RP__29__002_PNG = 0x000017E1,
PKG_ENTRY_ID__KEYMAP_RP__29__003_PNG = 0x000017E2,
PKG_ENTRY_ID__KEYMAP_RP__29__004_PNG = 0x000017E3,
PKG_ENTRY_ID__KEYMAP_RP__29__005_PNG = 0x000017E4,
PKG_ENTRY_ID__KEYMAP_RP__29__006_PNG = 0x000017E5,
PKG_ENTRY_ID__KEYMAP_RP__29__007_PNG = 0x000017E6,
PKG_ENTRY_ID__KEYMAP_RP__29__008_PNG = 0x000017E7,
PKG_ENTRY_ID__KEYMAP_RP__29__009_PNG = 0x000017E8,
PKG_ENTRY_ID__KEYMAP_RP__29__010_PNG = 0x000017E9,
PKG_ENTRY_ID__KEYMAP_RP__30__001_PNG = 0x000017F0,
PKG_ENTRY_ID__KEYMAP_RP__30__002_PNG = 0x000017F1,
PKG_ENTRY_ID__KEYMAP_RP__30__003_PNG = 0x000017F2,
PKG_ENTRY_ID__KEYMAP_RP__30__004_PNG = 0x000017F3,
PKG_ENTRY_ID__KEYMAP_RP__30__005_PNG = 0x000017F4,
PKG_ENTRY_ID__KEYMAP_RP__30__006_PNG = 0x000017F5,
PKG_ENTRY_ID__KEYMAP_RP__30__007_PNG = 0x000017F6,
PKG_ENTRY_ID__KEYMAP_RP__30__008_PNG = 0x000017F7,
PKG_ENTRY_ID__KEYMAP_RP__30__009_PNG = 0x000017F8,
PKG_ENTRY_ID__KEYMAP_RP__30__010_PNG = 0x000017F9,
} pkg_entry_id;
typedef struct pkg_table_entry_ {
pkg_entry_id id; // enum pkg_entry_id
uint32 name_table_offset;
uint32 encrypted : 1;
uint32 unk : 1;
uint32 sc_entry : 1;
uint32 unk2 : 29;
// 0x80000000 = encrypted flag
uint16 flags2;
uchar key_index : 4;
uchar unk3 : 4;
uchar unk4;
uint32 offset<format=hex>;
uint32 size;
uint64 pad;
} pkg_table_entry<read=ENTRY_READ>;
string get_string_from_table(char table[], uint offset)
{
string ret = "";
local uint i = 0;
for(i = offset; i < 256; i++){
if(table[i] == '\0'){
break;
}
ret += table[i];
}
return ret;
}
string ENTRY_READ(pkg_table_entry& ent){
if(ent.name_table_offset){
return get_string_from_table(entry_names, ent.name_table_offset);
}
return EnumToString(ent.id);
}
#define PKG_ENTRY_NAME__PARAM_SFO "param.sfo"
#define PKG_ENTRY_NAME__SHAREPARAM_JSON "shareparam.json"
#define PKG_SC_ENTRY_ID_START PKG_ENTRY_ID__LICENSE_DAT
struct pkg_entry_keyset {
uchar key[16];
uchar iv[16];
};
#define PKG_MAX_ENTRY_KEYS 7
#define PKG_CONTENT_ID_HASH_SIZE PKG_HASH_SIZE
#define PKG_ENTRY_KEYS_XHASHES_SIZE (PKG_MAX_ENTRY_KEYS * PKG_HASH_SIZE)
#define PKG_PASSCODE_KEY_SIZE 0x100
#define PKG_IMAGE_KEY_SIZE 0x100
#define PKG_ENTRY_KEY_SIZE 0x100
#define PKG_PLAYGO_CHUNK_HASH_TABLE_OFFSET 0x40
#define PKG_PLAYGO_CHUNK_HASH_SIZE 0x4
#define PKG_PLAYGO_PFS_CHUNK_SIZE 0x10000
#define PKG_SHAREPARAM_FILE_VERSION_MAJOR 1
#define PKG_SHAREPARAM_FILE_VERSION_MINOR 10
pkg_header header;
FSeek(header.entry_table_offset);
pkg_table_entry entries[header.entry_count];
local int i = 0;
for(i = 0; i < header.entry_count; i++) {
FSeek(entries[i].offset);
switch(entries[i].id)
{
case PKG_ENTRY_ID__DIGESTS:
uchar digests[entries[i].size];
break;
case PKG_ENTRY_ID__GENERAL_DIGESTS:
struct {
uchar unk[32];
uchar content_digest[32];
uchar game_digest[32];
uchar header_digest[32];
uchar system_digest[32];
uchar major_param_digest[32];
uchar param_digest[32];
} GeneralDigests;
break;
case PKG_ENTRY_ID__ENTRY_KEYS:
struct {
uchar seedDigest[32];
struct {
uchar digest[32];
} digests[7];
struct {
uchar key[256];
} keys[7];
} EntryKeys;
break;
case PKG_ENTRY_ID__IMAGE_KEY:
uchar image_key[entries[i].size];
break;
case PKG_ENTRY_ID__METAS:
// this is just a reference to itself
uchar entry_table[entries[i].size];
break;
case PKG_ENTRY_ID__ENTRY_NAMES:
char entry_names[entries[i].size];
break;
case PKG_ENTRY_ID__LICENSE_INFO:
uchar license_info[entries[i].size];
break;
case PKG_ENTRY_ID__LICENSE_DAT:
uchar license_dat[entries[i].size];
break;
case PKG_ENTRY_ID__PSRESERVED_DAT:
uchar psreserved_dat[entries[i].size];
break;
case PKG_ENTRY_ID__PARAM_SFO:
uchar param_sfo[entries[i].size];
break;
default:
struct {
uchar data[entries[i].size];
} entry_data<optimize=false>;
break;
}
}
FSeek(header.pfs_image_offset);
#include "PS4PFS.bt"
PFS_IMAGE pfs;