Skip to content

Commit 5e70c45

Browse files
committed
prlib/wave: match
- `.lit4` - `.sbss` - `.bss` - UG_WaveDisp - CG_WaveDisp - WaveCtrlInit - WaveCtrlUpdate
1 parent 190ff8e commit 5e70c45

35 files changed

+341
-231
lines changed

README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ For any questions, we have a home at the [PS1/PS2 Decompilation Discord server](
1212
### Progress
1313
*For a more detailed view of the progress, please check our [decomp(dot)dev page](https://decomp.dev/parappadev/parappa2).*
1414

15-
#### EE main core
15+
#### EE Core
1616
| Folder | Progress | Description
17-
|------------|----------|------------
17+
|--------|----------|------------
1818
| `dbug` | ![progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/parappadev/parappa2/main/progress/dbug_progress.json) | Debug utilities (VRAM save, debug menus, etc.)
1919
| `os` | ![progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/parappadev/parappa2/main/progress/os_progress.json) | OS utilities (threading, pad, memory, etc.)
2020
| `iop_mdl` | ![progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/parappadev/parappa2/main/progress/iop_mdl_progress.json) | IOP module control routines
@@ -25,15 +25,10 @@ For any questions, we have a home at the [PS1/PS2 Decompilation Discord server](
2525

2626
#### IOP modules
2727
| Folder | Progress | Description
28-
|------------|----------|------------
28+
|--------|----------|------------
2929
| `wavep2` | ![progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/parappadev/parappa2/main/progress/wp2cd.total_progress.json) | Music and asset streaming
3030
| `tapctrl` | N/A | Voice and sound effect playback
3131

32-
#### VU1 microcode
33-
| Folder | Progress | Description
34-
|------------|----------|------------
35-
| N/A | N/A | N/A
36-
3732
### Contributing
3833

3934
Please see our [build](docs/build.md) and [decompilation](docs/decompilation.md) guides.

config/p3.jul12.slinky.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ segments:
697697
- { path: asm/data/prlib/mendererawful.lit4.s.o }
698698
- { path: asm/data/prlib/mendereralpha.lit4.s.o }
699699
- { path: asm/data/prlib/mendererdata.lit4.s.o }
700-
- { path: asm/data/prlib/wave.lit4.s.o }
700+
- { path: src/prlib/wave.cpp.o }
701701
- { path: src/prlib/dmaqueue.cpp.o }
702702
- { path: src/prlib/utility.cpp.o }
703703
- { path: src/prlib/tim2.cpp.o }
@@ -923,7 +923,7 @@ segments:
923923
- { path: asm/data/prlib/mendererawful.sbss.s.o }
924924
- { path: src/prlib/mendereralpha.cpp.o }
925925
- { path: src/prlib/mendererdata.cpp.o }
926-
- { path: asm/data/prlib/wave.sbss.s.o }
926+
- { path: src/prlib/wave.cpp.o }
927927
- { path: src/prlib/dmaqueue.cpp.o }
928928
- { path: src/prlib/utility.cpp.o }
929929
- { path: src/prlib/tim2.cpp.o }
@@ -1036,7 +1036,7 @@ segments:
10361036
- { path: asm/data/prlib/mendererawful.bss.s.o }
10371037
- { path: asm/data/prlib/mendereralpha.bss.s.o }
10381038
- { path: asm/data/prlib/mendererdata.bss.s.o }
1039-
- { path: asm/data/prlib/wave.bss.s.o }
1039+
- { path: src/prlib/wave.cpp.o }
10401040
- { path: src/prlib/dmaqueue.cpp.o }
10411041
- { path: src/prlib/utility.cpp.o }
10421042
- { path: src/prlib/tim2.cpp.o }

config/p3.jul12.symbol_addrs.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ cmngif_pri_cnt = 0x00399a1c; // type:s32 size:0x4
200200
cmnGifPkBase = 0x00399a20; // type:s32 size:0x4
201201
cmnGifPkCurrent = 0x00399a24; // size:0x4
202202
cmnGifPkEnd = 0x00399a28; // size:0x4
203-
cmnGifTr = 0x003daf50; // size:0x410
203+
cmnGifTr = 0x003daf50; // size:0x410 allow_duplicated:true
204204
cmnGifPacket = 0x003db360; // size:0x10
205205

206206
// os/usrmem.c
@@ -2174,6 +2174,8 @@ WaveCtrlUpdate__FP8WAVE_STRf
21742174
WV_SCREEN_W = 0x00399bc8;
21752175
WV_SCREEN_H = 0x00399bcc;
21762176

2177+
cmnGifTr = 0x01c84c40; // size:0x3880 allow_duplicated:true
2178+
21772179
// prlib/dmaqueue.cpp
21782180
__10PrDmaQueueUi = 0x001523f0; // type:func
21792181
_$_10PrDmaQueue = 0x00152458; // type:func

config/p3.jul12.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ segments:
338338
- [0x299240, lit4, prlib/mendererawful]
339339
- [0x299260, lit4, prlib/mendereralpha]
340340
- [0x299280, lit4, prlib/mendererdata]
341-
- [0x2992C0, lit4, prlib/wave]
341+
- [0x2992C0, .lit4, prlib/wave]
342342

343343
# .sdata
344344
- [0x299300, sdata]
@@ -427,7 +427,7 @@ segments:
427427
- { type: sbss, vram: 0x00399ba0, name: prlib/spadata }
428428
- { type: sbss, vram: 0x00399ba8, name: prlib/menderer }
429429
- { type: sbss, vram: 0x00399bb4, name: prlib/mendererawful }
430-
- { type: sbss, vram: 0x00399bc8, name: prlib/wave }
430+
- { type: .sbss, vram: 0x00399bc8, name: prlib/wave }
431431

432432
- { type: sbss, vram: 0x00399bd0, name: sdk/newlib }
433433

@@ -480,7 +480,7 @@ segments:
480480
- { type: bss, vram: 0x01c83ba0, name: prlib/mendererawful }
481481
- { type: bss, vram: 0x01c83bd0, name: prlib/mendereralpha }
482482
- { type: bss, vram: 0x01c83c10, name: prlib/mendererdata }
483-
- { type: bss, vram: 0x01c84c40, name: prlib/wave }
483+
- { type: .bss, vram: 0x01c84c40, name: prlib/wave }
484484
- { type: bss, vram: 0x01c884c0, name: prlib/camera }
485485

486486
- { type: bss, vram: 0x01c88500, name: sdk/scelib }

include/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ typedef float f32;
5757
#define PR_UNCACHED(addr) ((u_int)(addr) | 0x20000000)
5858
#define PR_UNCACHEDACCEL(addr) ((u_int)(addr) | 0x30000000)
5959

60-
#define PR_PADDING(name, x) char unk##name[x]
60+
#define PR_PADDING(name, x) char name[x]
6161

6262
#define PR_BREAK() asm("break")
6363

progress/prlib_progress.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"schemaVersion": 1, "label": "prlib", "message": "35.2777%", "color": "darkorange"}
1+
{"schemaVersion": 1, "label": "prlib", "message": "35.8333%", "color": "darkorange"}

progress/report.json

Lines changed: 54 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"measures": {
3-
"fuzzy_match_percent": 57.691273,
3+
"fuzzy_match_percent": 58.271904,
44
"total_code": "342284",
5-
"matched_code": "191908",
6-
"matched_code_percent": 56.066895,
7-
"total_data": "26121904",
8-
"matched_data": "26065248",
9-
"matched_data_percent": 99.78311,
5+
"matched_code": "193664",
6+
"matched_code_percent": 56.579918,
7+
"total_data": "26136440",
8+
"matched_data": "26079720",
9+
"matched_data_percent": 99.78298,
1010
"total_functions": 1429,
11-
"matched_functions": 1054,
12-
"matched_functions_percent": 73.75787,
11+
"matched_functions": 1058,
12+
"matched_functions_percent": 74.03779,
1313
"total_units": 70
1414
},
1515
"units": [
@@ -7876,14 +7876,14 @@
78767876
{
78777877
"name": "menu/p3mc",
78787878
"measures": {
7879-
"fuzzy_match_percent": 42.67668,
7879+
"fuzzy_match_percent": 49.300102,
78807880
"total_code": "11716",
7881-
"matched_code": "5000",
7882-
"matched_code_percent": 42.67668,
7881+
"matched_code": "5776",
7882+
"matched_code_percent": 49.300102,
78837883
"total_data": "1232",
78847884
"total_functions": 45,
7885-
"matched_functions": 33,
7886-
"matched_functions_percent": 73.333336,
7885+
"matched_functions": 35,
7886+
"matched_functions_percent": 77.77778,
78877887
"total_units": 1
78887888
},
78897889
"sections": [
@@ -7905,7 +7905,7 @@
79057905
{
79067906
"name": ".text",
79077907
"size": "11792",
7908-
"fuzzy_match_percent": 42.67668,
7908+
"fuzzy_match_percent": 49.300102,
79097909
"metadata": {}
79107910
}
79117911
],
@@ -7947,6 +7947,7 @@
79477947
{
79487948
"name": "_P3MC_ASC2SJIS",
79497949
"size": "248",
7950+
"fuzzy_match_percent": 100.0,
79507951
"metadata": {},
79517952
"address": "768"
79527953
},
@@ -7960,6 +7961,7 @@
79607961
{
79617962
"name": "_P3MC_SetBrowsInfo",
79627963
"size": "528",
7964+
"fuzzy_match_percent": 100.0,
79637965
"metadata": {},
79647966
"address": "1064"
79657967
},
@@ -12639,19 +12641,22 @@
1263912641
{
1264012642
"name": "prlib/wave",
1264112643
"measures": {
12642-
"fuzzy_match_percent": 17.886179,
12644+
"fuzzy_match_percent": 99.95935,
1264312645
"total_code": "1476",
12644-
"matched_code": "264",
12645-
"matched_code_percent": 17.886179,
12646-
"total_data": "16",
12646+
"matched_code": "1244",
12647+
"matched_code_percent": 84.281845,
12648+
"total_data": "14552",
12649+
"matched_data": "14472",
12650+
"matched_data_percent": 99.45025,
1264712651
"total_functions": 7,
12648-
"matched_functions": 3,
12649-
"matched_functions_percent": 42.857143,
12652+
"matched_functions": 5,
12653+
"matched_functions_percent": 71.42857,
1265012654
"total_units": 1
1265112655
},
1265212656
"sections": [
1265312657
{
1265412658
"name": ".bss",
12659+
"size": "14464",
1265512660
"fuzzy_match_percent": 100.0,
1265612661
"metadata": {}
1265712662
},
@@ -12660,15 +12665,26 @@
1266012665
"fuzzy_match_percent": 100.0,
1266112666
"metadata": {}
1266212667
},
12668+
{
12669+
"name": ".lit4",
12670+
"size": "64",
12671+
"metadata": {}
12672+
},
1266312673
{
1266412674
"name": ".rodata",
1266512675
"size": "16",
1266612676
"metadata": {}
1266712677
},
12678+
{
12679+
"name": ".sbss",
12680+
"size": "8",
12681+
"fuzzy_match_percent": 100.0,
12682+
"metadata": {}
12683+
},
1266812684
{
1266912685
"name": ".text",
1267012686
"size": "1488",
12671-
"fuzzy_match_percent": 17.886179,
12687+
"fuzzy_match_percent": 99.95935,
1267212688
"metadata": {}
1267312689
}
1267412690
],
@@ -12694,6 +12710,7 @@
1269412710
{
1269512711
"name": "UG_WaveDisp__FP8WAVE_STRP10sceGsFrameP12sceGifPacket",
1269612712
"size": "756",
12713+
"fuzzy_match_percent": 100.0,
1269712714
"metadata": {
1269812715
"demangled_name": "UG_WaveDisp(WAVE_STR*, sceGsFrame*, sceGifPacket*)"
1269912716
},
@@ -12702,6 +12719,7 @@
1270212719
{
1270312720
"name": "CG_WaveDisp__FP8WAVE_STRP10sceGsFrame",
1270412721
"size": "224",
12722+
"fuzzy_match_percent": 100.0,
1270512723
"metadata": {
1270612724
"demangled_name": "CG_WaveDisp(WAVE_STR*, sceGsFrame*)"
1270712725
},
@@ -12710,6 +12728,7 @@
1271012728
{
1271112729
"name": "WaveCtrlInit__FP8WAVE_STRss10WMODE_ENUM",
1271212730
"size": "180",
12731+
"fuzzy_match_percent": 99.77778,
1271312732
"metadata": {
1271412733
"demangled_name": "WaveCtrlInit(WAVE_STR*, short, short, WMODE_ENUM)"
1271512734
},
@@ -12727,6 +12746,7 @@
1272712746
{
1272812747
"name": "WaveCtrlUpdate__FP8WAVE_STRf",
1272912748
"size": "52",
12749+
"fuzzy_match_percent": 99.61539,
1273012750
"metadata": {
1273112751
"demangled_name": "WaveCtrlUpdate(WAVE_STR*, float)"
1273212752
},
@@ -13335,16 +13355,16 @@
1333513355
{
1333613356
"id": "menu",
1333713357
"measures": {
13338-
"fuzzy_match_percent": 43.177307,
13358+
"fuzzy_match_percent": 43.85296,
1333913359
"total_code": "114852",
13340-
"matched_code": "47244",
13341-
"matched_code_percent": 41.134678,
13360+
"matched_code": "48020",
13361+
"matched_code_percent": 41.81033,
1334213362
"total_data": "19812",
1334313363
"matched_data": "4204",
1334413364
"matched_data_percent": 21.219463,
1334513365
"total_functions": 374,
13346-
"matched_functions": 261,
13347-
"matched_functions_percent": 69.786095,
13366+
"matched_functions": 263,
13367+
"matched_functions_percent": 70.320854,
1334813368
"total_units": 9
1334913369
}
1335013370
},
@@ -13367,16 +13387,16 @@
1336713387
{
1336813388
"id": "prlib",
1336913389
"measures": {
13370-
"fuzzy_match_percent": 18.98488,
13390+
"fuzzy_match_percent": 20.457241,
1337113391
"total_code": "82276",
13372-
"matched_code": "15620",
13373-
"matched_code_percent": 18.98488,
13374-
"total_data": "3716",
13375-
"matched_data": "2492",
13376-
"matched_data_percent": 67.061356,
13392+
"matched_code": "16600",
13393+
"matched_code_percent": 20.175993,
13394+
"total_data": "18252",
13395+
"matched_data": "16964",
13396+
"matched_data_percent": 92.94324,
1337713397
"total_functions": 360,
13378-
"matched_functions": 127,
13379-
"matched_functions_percent": 35.27778,
13398+
"matched_functions": 129,
13399+
"matched_functions_percent": 35.833332,
1338013400
"total_units": 33
1338113401
}
1338213402
}

progress/total_progress.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"schemaVersion": 1, "label": "Total percentage", "message": "73.7578%", "color": "yellow"}
1+
{"schemaVersion": 1, "label": "Total percentage", "message": "74.0377%", "color": "yellow"}

src/prlib/animation.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ class SpaFileHeader {
1111
PR_PADDING(unk0, 0x14);
1212
float unk14;
1313
PR_PADDING(unk18, 0x38);
14-
SpaNodeAnimation** unk50;
14+
SpaNodeAnimation **unk50;
1515

1616
public:
1717
void Initialize();
1818

19-
bool IsNodeVisible(SpmNode* arg0, float arg1) const;
19+
bool IsNodeVisible(SpmNode *arg0, float arg1) const;
2020

2121
void ChangePointer();
2222
};

src/prlib/camera.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class SpcFileHeader {
1616
void ChangePointer();
1717

1818
template <typename T>
19-
T* CalculatePointer(T* offset) {
19+
T* CalculatePointer(T *offset) {
2020
if (!offset) {
2121
return NULL;
2222
}
@@ -31,17 +31,17 @@ class SpcFileHeader {
3131
PR_PADDING(unk8, 0x10);
3232
char mName[32];
3333
PR_PADDING(unk38, 0x3c);
34-
int* unk74;
34+
int *unk74;
3535
PR_PADDING(unk78, 0x10);
36-
SpaTrack<NaVECTOR<float, 4> >* unk88;
37-
SpaTrack<NaVECTOR<float, 4> >* unk8C;
38-
SpaTrack<float>* unk90;
39-
SpaTrack<float>* unk94;
36+
SpaTrack<NaVECTOR<float, 4> > *unk88;
37+
SpaTrack<NaVECTOR<float, 4> > *unk8C;
38+
SpaTrack<float> *unk90;
39+
SpaTrack<float> *unk94;
4040

4141
u_int mDepthLevel;
4242

43-
SpaTrack<float>* mFocalLenTrack;
44-
SpaTrack<float>* mDefocusLenTrack;
43+
SpaTrack<float> *mFocalLenTrack;
44+
SpaTrack<float> *mDefocusLenTrack;
4545
};
4646

4747
#endif /* PRLIB_CAMERA_H */

0 commit comments

Comments
 (0)