Skip to content

Commit aeecf14

Browse files
committed
main/main: match
- `.data` - `.sdata` - `.bss` - dummyPlay - gamePlayDisp
1 parent 6015494 commit aeecf14

File tree

16 files changed

+466
-259
lines changed

16 files changed

+466
-259
lines changed

config/p3.jul12.slinky.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ segments:
288288
- { path: src/main/etc.c.o }
289289
- { path: src/main/wipe.c.o }
290290
- { path: src/main/mcctrl.c.o }
291-
- { path: asm/data/main/main.data.s.o }
291+
- { path: src/main/main.c.o }
292292
- { path: src/main/cmnfile.c.o }
293293
- { path: src/main/p3str.c.o }
294294
- { path: src/main/commake.c.o }
@@ -747,9 +747,8 @@ segments:
747747
- { path: src/main/pack.c.o }
748748
- { path: src/main/etc.c.o }
749749
- { path: asm/data/main/wipe.sdata.s.o }
750-
#- { path: src/main/wipe.c.o }
751750
- { path: src/main/mcctrl.c.o }
752-
- { path: asm/data/main/main.sdata.s.o }
751+
- { path: src/main/main.c.o }
753752
- { path: src/main/cmnfile.c.o }
754753
- { path: src/main/p3str.c.o }
755754
- { path: src/main/commake.c.o }
@@ -973,7 +972,7 @@ segments:
973972
- { path: src/main/etc.c.o }
974973
- { path: src/main/wipe.c.o }
975974
- { path: src/main/mcctrl.c.o }
976-
- { path: asm/data/main/main.bss.s.o }
975+
- { path: src/main/main.c.o }
977976
- { path: src/main/cmnfile.c.o }
978977
- { path: asm/data/main/p3str.bss.s.o }
979978
- { path: asm/data/main/commake.bss.s.o }

config/p3.jul12.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ segments:
203203
- [0x86F10, .data, main/etc]
204204
- [0x87000, .data, main/wipe]
205205
- [0x87340, .data, main/mcctrl]
206-
- [0x87400, data, main/main]
206+
- [0x87400, .data, main/main]
207207
- [0x874F0, .data, main/commake]
208208

209209
- [0x87558, .data, menu/menudata]
@@ -359,7 +359,7 @@ segments:
359359
- [0x299558, sdata, main/mbar]
360360
- [0x299588, .sdata, main/etc]
361361
- [0x299598, sdata, main/wipe]
362-
- [0x2995D0, sdata, main/main]
362+
- [0x2995D0, .sdata, main/main]
363363
- [0x2996E0, .sdata, main/p3str]
364364

365365
- [0x2996F0, .sdata, menu/menudata]
@@ -455,7 +455,7 @@ segments:
455455
- { type: .bss, vram: 0x01c72000, name: main/pack }
456456
- { type: .bss, vram: 0x01c73018, name: main/etc }
457457
- { type: .bss, vram: 0x01c730e8, name: main/mcctrl }
458-
- { type: bss, vram: 0x01c77630, name: main/main }
458+
- { type: .bss, vram: 0x01c77630, name: main/main }
459459
- { type: bss, vram: 0x01c77640, name: main/p3str }
460460
- { type: bss, vram: 0x01c77700, name: main/commake }
461461

include/iop_mdl/tapctrl_rpc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
#include "common.h"
55

6+
#include "iop_mdl/tapctrl/tapctrl.h"
7+
68
int TapCtInit(void);
79
int TapCt(int command, int data1, int data2);
810

progress/report.json

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"measures": {
3-
"fuzzy_match_percent": 52.616074,
3+
"fuzzy_match_percent": 53.387363,
44
"total_code": "342284",
5-
"matched_code": "176260",
6-
"matched_code_percent": 51.495247,
7-
"total_data": "26082840",
8-
"matched_data": "26033176",
9-
"matched_data_percent": 99.80959,
5+
"matched_code": "178900",
6+
"matched_code_percent": 52.266537,
7+
"total_data": "26083368",
8+
"matched_data": "26033192",
9+
"matched_data_percent": 99.80763,
1010
"total_functions": 1429,
11-
"matched_functions": 1032,
12-
"matched_functions_percent": 72.21834,
11+
"matched_functions": 1034,
12+
"matched_functions_percent": 72.35829,
1313
"total_units": 70
1414
},
1515
"units": [
@@ -5474,25 +5474,29 @@
54745474
{
54755475
"name": "main/main",
54765476
"measures": {
5477-
"fuzzy_match_percent": 73.25365,
5477+
"fuzzy_match_percent": 99.99595,
54785478
"total_code": "9872",
5479-
"matched_code": "6764",
5480-
"matched_code_percent": 68.51701,
5481-
"total_data": "832",
5479+
"matched_code": "9404",
5480+
"matched_code_percent": 95.25932,
5481+
"total_data": "1360",
5482+
"matched_data": "16",
5483+
"matched_data_percent": 1.1764706,
54825484
"total_functions": 19,
5483-
"matched_functions": 16,
5484-
"matched_functions_percent": 84.210526,
5485+
"matched_functions": 18,
5486+
"matched_functions_percent": 94.73685,
54855487
"total_units": 1
54865488
},
54875489
"sections": [
54885490
{
54895491
"name": ".bss",
5492+
"size": "16",
54905493
"fuzzy_match_percent": 100.0,
54915494
"metadata": {}
54925495
},
54935496
{
54945497
"name": ".data",
5495-
"fuzzy_match_percent": 100.0,
5498+
"size": "240",
5499+
"fuzzy_match_percent": 89.166664,
54965500
"metadata": {}
54975501
},
54985502
{
@@ -5505,10 +5509,16 @@
55055509
"size": "824",
55065510
"metadata": {}
55075511
},
5512+
{
5513+
"name": ".sdata",
5514+
"size": "272",
5515+
"fuzzy_match_percent": 98.518524,
5516+
"metadata": {}
5517+
},
55085518
{
55095519
"name": ".text",
55105520
"size": "9896",
5511-
"fuzzy_match_percent": 73.25365,
5521+
"fuzzy_match_percent": 99.99595,
55125522
"metadata": {}
55135523
}
55145524
],
@@ -5523,6 +5533,7 @@
55235533
{
55245534
"name": "dummyPlay",
55255535
"size": "1744",
5536+
"fuzzy_match_percent": 100.0,
55265537
"metadata": {},
55275538
"address": "560"
55285539
},
@@ -5613,6 +5624,7 @@
56135624
{
56145625
"name": "gamePlayDisp",
56155626
"size": "896",
5627+
"fuzzy_match_percent": 100.0,
56165628
"metadata": {},
56175629
"address": "7088"
56185630
},
@@ -13253,16 +13265,16 @@
1325313265
{
1325413266
"id": "main",
1325513267
"measures": {
13256-
"fuzzy_match_percent": 77.44074,
13268+
"fuzzy_match_percent": 79.56916,
1325713269
"total_code": "124036",
13258-
"matched_code": "94564",
13259-
"matched_code_percent": 76.23916,
13260-
"total_data": "66156",
13261-
"matched_data": "56300",
13262-
"matched_data_percent": 85.101875,
13270+
"matched_code": "97204",
13271+
"matched_code_percent": 78.36758,
13272+
"total_data": "66684",
13273+
"matched_data": "56316",
13274+
"matched_data_percent": 84.45204,
1326313275
"total_functions": 570,
13264-
"matched_functions": 522,
13265-
"matched_functions_percent": 91.57895,
13276+
"matched_functions": 524,
13277+
"matched_functions_percent": 91.929825,
1326613278
"total_units": 17
1326713279
}
1326813280
},

src/iop_mdl/tapctrl/tapctrl.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#ifndef TAPCTRL_H
2+
#define TAPCTRL_H
3+
4+
#include "common.h"
5+
6+
#include <sdmacro.h>
7+
8+
/* TapCtrl commands */
9+
#define TAPCT_NONE (0)
10+
11+
#define TAPCT_INIT (0x0000) /* TapInit(allocsize) */
12+
#define TAPCT_CHANCLOSE (0x0050) /* TapChanClose(ch) */
13+
#define TAPCT_QUIT (0x0060) /* TapQuit() */
14+
#define TAPCT_SETEFFECTVOL (0x0080) /* TapSetEffectVolume(vol) */
15+
#define TAPCT_SETMASTERVOL (0x0090) /* TapSetMasterVolume(vol) */
16+
#define TAPCT_SETVOLUME (0x00a0) /* TapSetVolume(vol) */
17+
#define TAPCT_SETEFFECTMODE (0x00b0) /* TapSetEffectMode(mode, depth) */
18+
#define TAPCT_SDINIT (0x00c0) /* TapSdInit() */
19+
#define TAPCT_TAPREQ (0x00d0) /* TapTapReq(chan, id, stdat) */
20+
#define TAPCT_TAPSTOP (0x00e0) /* TapTapStop(id) */
21+
#define TAPCT_TAPVOLUME (0x00f0) /* TapTapVolume(id, vol) */
22+
#define TAPCT_ALLPAUSE (0x0100) /* TapAllPause() */
23+
#define TAPCT_ALLCONTINUE (0x0110) /* TapAllContinue() */
24+
#define TAPCT_TRANSCLEAR (0x0120) /* TapTransClear() */
25+
#define TAPCT_TAPVOLUMECHANGE (0x0130) /* TapTapVolumeChange(id, vol) */
26+
#define TAPCT_ALLOCSPU (0x8010) /* TapAllocSpu(chan, spu_adr) */
27+
#define TAPCT_ALLOCIOP (0x8020) /* TapAllocIop(chan, iop_size) */
28+
#define TAPCT_BDSPUTRANS (0x8030) /* TapBdSpuTrans(chan, ee_snd, size) */
29+
#define TAPCT_HDIOPTRANS (0x8040) /* TapHdIopTrans(chan, ee_hd, size) */
30+
#define TAPCT_TRANSCHECK (0x8070) /* TapTransCheck() */
31+
32+
/* TapCtrl module ID */
33+
#define TAPCT_DEV (0x8001)
34+
35+
#endif /* TAPCTRL_H */

src/iop_mdl/tapctrl_rpc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <stdio.h>
77

88
#define DATA_SIZE_NORMAL (16)
9-
#define TAPCT_DEV (0x8001)
109

1110
static u_int sbuff[16] PR_ALIGNED(64);
1211
static sceSifClientData gCd;

src/iop_mdl/wp2cd/iop/bgm_com.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,6 @@
77

88
#include <stdio.h>
99

10-
/* bgm_play.c */
11-
extern void BgmSetVolumeDirect(unsigned int vol);
12-
extern void BgmSetMasterVolume(unsigned int vol);
13-
extern void BgmCdInit(int mode);
14-
extern void BgmSdInit(int status);
15-
extern int BgmInit(int block_size);
16-
extern void BgmQuit(int status);
17-
extern int BgmOpen(char *filename);
18-
extern int BgmOpenFLoc(sceCdlFILE *fpLoc);
19-
extern void BgmClose(int status);
20-
extern int BgmPreLoad(void);
21-
extern void BgmPreLoadBack(void);
22-
extern int BgmReadBuffFull(void);
23-
extern int BgmStart(void);
24-
extern void BgmStop(unsigned int vol);
25-
extern void BgmSetVolume(unsigned int vol);
26-
extern void BgmSetMode(u_int maxChan);
27-
extern unsigned int BgmGetMode(void);
28-
extern int BgmSeek(unsigned int ofs);
29-
extern int BgmSeekFLoc(sceCdlFILE *fpLoc);
30-
extern void BgmSetChannel(u_int chan);
31-
extern void BgmSetTrPoint(u_int trpos);
32-
extern int BgmGetTime(void);
33-
extern int BgmGetTSample(void);
34-
extern int BgmGetCdErrCode(void);
35-
3610
static void* bgmFunc(unsigned int command, void *data, int size);
3711

3812
int gRpcArg[16];

src/iop_mdl/wp2cd/iop/bgm_entr.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "common.h"
1+
#include "../wp2cd.h"
22

33
#include <intrman.h>
44
#include <loadcore.h>
@@ -8,9 +8,6 @@
88

99
#include <stdio.h>
1010

11-
/* bgm_com.c */
12-
extern int sce_bgm_loop(void);
13-
1411
ModuleInfo Module = { "WaveP2_driver", 0x100 };
1512

1613
int start(void) {

src/iop_mdl/wp2cd/iop/bgm_play.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,42 +14,10 @@
1414
#define KB(x) (x*1024)
1515
#define SCTORS(x) (x/2048)
1616

17-
#define RDMODE_CD (0)
18-
#define RDMODE_PC (1)
19-
2017
int _PreLoadBack(int status);
2118
void _BgmStop(void);
2219
int _BgmPlay(int status);
2320

24-
typedef struct { // 0x30
25-
/* 0x00:0 */ unsigned int size : 32; /* File size (in sectors) */
26-
/* 0x04:0 */ unsigned int pos : 32;
27-
/* 0x08:0 */ unsigned int ofs : 32;
28-
/* 0x0c:0 */ unsigned int Channel : 32; /* Number of channels */
29-
/* 0x10 */ u_short ReqChan[2]; /* Channels reserved for audio [L&R channels] */
30-
/* 0x14 */ int TransPos;
31-
/* 0x18 */ int TransMax;
32-
/* 0x1c */ int Tr1Size; /* Total size of channels */
33-
/* 0x20 */ int StartTrPos; /* (Unused) */
34-
/* 0x24 */ int TransEEAdrs; /* Base addr. for EE transfers */
35-
/* 0x28 */ int TransId; /* DMA queuing identifier. */
36-
/* 0x2c */ int readBackFlag;
37-
} WAVEP2;
38-
39-
typedef struct { // 0x10
40-
/* 0x0 */ int buf_pos[2];
41-
/* 0x8 */ int TrackSize;
42-
/* 0xc */ int dbuf_flg;
43-
} SBUF;
44-
45-
typedef struct { // 0x10
46-
/* 0x0 */ u_int trSize;
47-
/* 0x4 */ u_int trAdr;
48-
/* 0x8 */ u_int pad1;
49-
/* 0xc */ u_int pad2;
50-
/* 0x10 */ u_char dat[0];
51-
} P3STR_TRH;
52-
5321
static int bug_bug_bug_flag = FALSE;
5422
static int fp_pc = -1;
5523
SBUF sbuf = {};

0 commit comments

Comments
 (0)