Skip to content

Commit 4ac8ccf

Browse files
committed
main/scrctrl: match .data, .sbss, .bss
1 parent 1646049 commit 4ac8ccf

File tree

9 files changed

+448
-118
lines changed

9 files changed

+448
-118
lines changed

config/p3.jul12.slinky.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ segments:
277277

278278
- { path: src/main/cdctrl.c.o }
279279
- { path: asm/data/main/stdat.data.s.o }
280-
- { path: asm/data/main/scrctrl.data.s.o }
280+
#- { path: asm/data/main/scrctrl.data.s.o }
281+
- { path: src/main/scrctrl.c.o }
281282
- { path: src/main/sprite.c.o }
282283
- { path: src/main/fadectrl.c.o }
283284
- { path: asm/data/main/subt.data.s.o }
@@ -849,7 +850,7 @@ segments:
849850

850851
- { path: src/main/cdctrl.c.o }
851852
- { path: src/main/stdat.c.o }
852-
- { path: asm/data/main/scrctrl.sbss.s.o }
853+
- { path: src/main/scrctrl.c.o }
853854
- { path: src/main/sprite.c.o }
854855
- { path: src/main/fadectrl.c.o }
855856
- { path: src/main/subt.c.o }
@@ -961,7 +962,7 @@ segments:
961962

962963
- { path: asm/data/main/cdctrl.bss.s.o }
963964
- { path: src/main/stdat.c.o }
964-
- { path: asm/data/main/scrctrl.bss.s.o }
965+
- { path: src/main/scrctrl.c.o }
965966
- { path: src/main/sprite.c.o }
966967
- { path: src/main/fadectrl.c.o }
967968
- { path: src/main/subt.c.o }

config/p3.jul12.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ segments:
196196
- [0x808D8, .data, os/tim2]
197197

198198
- [0x808F0, data, main/stdat]
199-
- [0x83258, data, main/scrctrl]
199+
- [0x83258, .data, main/scrctrl]
200200
- [0x84B88, .data, main/fadectrl]
201201
- [0x84BA0, data, main/subt]
202202
- [0x85478, data, main/drawctrl]
@@ -406,7 +406,7 @@ segments:
406406
- { type: .sbss, vram: 0x00399a2c, name: os/usrmem }
407407

408408
- { type: .sbss, vram: 0x00399a34, name: main/cdctrl }
409-
- { type: sbss, vram: 0x00399a38, name: main/scrctrl }
409+
- { type: .sbss, vram: 0x00399a38, name: main/scrctrl }
410410
- { type: .sbss, vram: 0x00399a44, name: main/sprite }
411411
- { type: .sbss, vram: 0x00399a48, name: main/subt }
412412
- { type: sbss, vram: 0x00399a4c, name: main/drawctrl }
@@ -446,7 +446,7 @@ segments:
446446
- { type: .bss, vram: 0x01c5d380, name: os/tim2 }
447447

448448
- { type: bss, vram: 0x01c5e000, name: main/cdctrl }
449-
- { type: bss, vram: 0x01c5f030, name: main/scrctrl }
449+
- { type: .bss, vram: 0x01c5f030, name: main/scrctrl }
450450
- { type: .bss, vram: 0x01c65b80, name: main/sprite }
451451
- { type: .bss, vram: 0x01c6db90, name: main/fadectrl }
452452
- { type: .bss, vram: 0x01c6dba0, name: main/subt }

include/main/etc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ typedef enum {
143143
DTBL_ENUM_VS_2_ABATTLE2_1 = 47,
144144
DTBL_ENUM_VS_2_ABATTLE2_2 = 48,
145145
DTBL_ENUM_MAX_CNT = 49,
146-
DTBL_ENUM_VS_TOP = 0
146+
DTBL_ENUM_VS_TOP = 0,
147147
} DRAW_TBL_ENUM;
148148

149149
typedef enum {

include/main/scrctrl.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,11 @@ typedef struct { // 0x20
656656
/* 0x0c */ u_char map[10][2];
657657
} BN_NUM_TYPE;
658658

659+
enum {
660+
BN_KANJI_TXT = 0,
661+
BN_SUUJI_TXT = 1
662+
};
663+
659664
int GetCurrentTblNumber(void);
660665

661666
DISP_LEVEL RANK_LEVEL2DISP_LEVEL(RANK_LEVEL lvl);

src/main/drawctrl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,7 +1429,7 @@ void Cl2MixTrans(int now_T, int max_T, u_char *cl2_0_pp, u_char *cl2_1_pp) {
14291429
};
14301430

14311431
sceGsSetDefLoadImage(&l_image, trTbp0, trTbw, typemode[trType0], 0, 0, trW, trH);
1432-
FlushCache(0);
1432+
FlushCache(WRITEBACK_DCACHE);
14331433

14341434
sceGsExecLoadImage(&l_image, (u_long128*)dat_pp);
14351435
sceGsSyncPath(0, 0);
@@ -1633,7 +1633,7 @@ int DrawVramLocalCopy(void *para_pp, int frame, int first_f, int useDisp, int dr
16331633
dbp = DrawGetTbpPos(drDisp);
16341634

16351635
GGsSetLocalMoveImage(&mi, dbp, 10, SCE_GS_PSMCT32, 0, 0, sbp, 10, SCE_GS_PSMCT32, 0, 0, 640, 224, 0);
1636-
FlushCache(0);
1636+
FlushCache(WRITEBACK_DCACHE);
16371637

16381638
GGsExecLocalMoveImage(&mi);
16391639
sceGsSyncPath(0, 0);
@@ -1658,7 +1658,7 @@ int DrawVramLocalCopy2(void *para_pp, int frame, int first_f, int useDisp, int d
16581658
dbp = DrawGetTbpPos(drDisp);
16591659

16601660
GGsSetLocalMoveImage(&mi, dbp, 10, SCE_GS_PSMCT32, 0, 0, sbp, 10, SCE_GS_PSMCT32, 0, 0, 640, 224, 0);
1661-
FlushCache(0);
1661+
FlushCache(WRITEBACK_DCACHE);
16621662

16631663
GGsExecLocalMoveImage(&mi);
16641664
sceGsSyncPath(0, 0);

src/main/etc.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void GlobalPlySet(GLOBAL_DATA *gl_pp, PLAY_STEP stp, int stage_num) {
191191

192192
switch (stp) {
193193
case PSTEP_SERIAL:
194-
global_data.draw_tbl_top = 0;
194+
global_data.draw_tbl_top = DTBL_ENUM_SERIAL_TOP;
195195

196196
gply_pp = &global_data.global_ply[3];
197197
gply_pp->player_code = PCODE_NONE;
@@ -202,7 +202,7 @@ void GlobalPlySet(GLOBAL_DATA *gl_pp, PLAY_STEP stp, int stage_num) {
202202
gply_pp->tap_lvl_tmp = 0;
203203
break;
204204
case PSTEP_XTR:
205-
global_data.draw_tbl_top = 0;
205+
global_data.draw_tbl_top = DTBL_ENUM_SERIAL_TOP;
206206

207207
gply_pp = &global_data.global_ply[3];
208208
gply_pp->player_code = PCODE_NONE;
@@ -278,7 +278,7 @@ void GlobalPlySet(GLOBAL_DATA *gl_pp, PLAY_STEP stp, int stage_num) {
278278
ExamDispPlySet(gply_pp, 0);
279279
break;
280280
case PSTEP_BONUS:
281-
global_data.draw_tbl_top = 0;
281+
global_data.draw_tbl_top = DTBL_ENUM_BN_TOP;
282282

283283
gply_pp = &global_data.global_ply[1];
284284
gply_pp->player_code = PCODE_TEACHER;
@@ -298,7 +298,7 @@ void GlobalPlySet(GLOBAL_DATA *gl_pp, PLAY_STEP stp, int stage_num) {
298298
ExamDispPlySet(gply_pp, 0);
299299
break;
300300
case PSTEP_VS:
301-
global_data.draw_tbl_top = 0;
301+
global_data.draw_tbl_top = DTBL_ENUM_VS_TOP;
302302

303303
gply_pp = &global_data.global_ply[2];
304304
gply_pp->player_code = PCODE_BOXY;
@@ -659,8 +659,8 @@ HKLV_SNDREC_ENUM inCmnHookMaxLinePknum(int stg, int line) {
659659

660660
int inCmnHookSet(int stg) {
661661
int cnt, ret;
662-
663-
ret = 0;
662+
663+
ret = DTBL_ENUM_HOOK_TOP;
664664
cnt = inCmnHookMaxLineCnt(stg);
665665

666666
if (cnt == 0) {

src/main/mbar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ static void clrColorBuffer(int id) {
135135
cbp = PR_TEX0(tim2_dat_pp).CBP;
136136

137137
sceGsSetDefLoadImage(&tp_tmp_72, cbp, 1, cpsm, 0, 0, 8, 2);
138-
FlushCache(0);
138+
FlushCache(WRITEBACK_DCACHE);
139139

140140
sceGsExecLoadImage(&tp_tmp_72, (u_long128*)tr_adr);
141141
sceGsSyncPath(0, 0);

0 commit comments

Comments
 (0)