Skip to content

Commit 95c3626

Browse files
authored
Fix Wii splits for EXI2_GDEV_GCN/main.c (#3102)
1 parent a790efa commit 95c3626

File tree

5 files changed

+19
-12
lines changed

5 files changed

+19
-12
lines changed

config/DZDE01/splits.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4121,7 +4121,7 @@ TRK_MINNOW_revolution/debugger/embedded/MetroTRK/Os/revolution/target_options.c:
41214121
TRK_MINNOW_revolution/debugger/embedded/MetroTRK/Os/revolution/UDP_Stubs.c:
41224122
.text start:0x80395078 end:0x803950C0
41234123

4124-
TRK_MINNOW_revolution/gamedev/cust_connection/cc/exi2/GCN/EXI2_DDH_GCN/main.c:
4124+
TRK_MINNOW_revolution/gamedev/cust_connection/cc/exi2/GCN/EXI2_GDEV_GCN/main.c:
41254125
.text start:0x803950C0 end:0x80395380
41264126
.bss start:0x804F72A0 end:0x804F77BC
41274127
.sbss start:0x804FBAC8 end:0x804FBAD0

config/RZDE01_02/splits.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4343,7 +4343,7 @@ TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/target_options.c:
43434343
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/UDP_Stubs.c:
43444344
.text start:0x803B7BF8 end:0x803B7C40
43454345

4346-
TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_DDH_GCN/main.c:
4346+
TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_GDEV_GCN/main.c:
43474347
.text start:0x803B7C40 end:0x803B7F00
43484348
.bss start:0x8051D080 end:0x8051D59C
43494349
.sbss start:0x80521998 end:0x805219A0

config/RZDJ01/splits.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4337,7 +4337,7 @@ TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/target_options.c:
43374337
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/UDP_Stubs.c:
43384338
.text start:0x803B96A8 end:0x803B96F0
43394339

4340-
TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_DDH_GCN/main.c:
4340+
TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_GDEV_GCN/main.c:
43414341
.text start:0x803B96F0 end:0x803B99B0
43424342
.bss start:0x8051AF00 end:0x8051B41C
43434343
.sbss start:0x8051F808 end:0x8051F810

config/RZDP01/splits.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4340,7 +4340,7 @@ TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/target_options.c:
43404340
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/UDP_Stubs.c:
43414341
.text start:0x803B8078 end:0x803B80C0
43424342

4343-
TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_DDH_GCN/main.c:
4343+
TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_GDEV_GCN/main.c:
43444344
.text start:0x803B80C0 end:0x803B8380
43454345
.bss start:0x8051D980 end:0x8051DE9C
43464346
.sbss start:0x80522158 end:0x80522160

src/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_GDEV_GCN/main.c

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
#include "TRK_MINNOW_DOLPHIN/utils/common/CircleBuffer.h"
22
#include "TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h"
3+
#include "global.h"
34
#include <dolphin/db.h>
45
#include <dolphin/amc/AmcExi2Comm.h>
56

67
#define GDEV_BUF_SIZE (0x500)
78

9+
#if PLATFORM_GCN
10+
#define TRACE(...) MWTRACE(__VA_ARGS__)
11+
#else
12+
#define TRACE(...) ((void)0)
13+
#endif
14+
815
static CircleBuffer gRecvCB;
916

1017
static u8 gRecvBuf[GDEV_BUF_SIZE];
1118

1219
static BOOL gIsInitialized;
1320

1421
int gdev_cc_initialize(void* inputPendingPtrRef, EXICallback monitorCallback) {
15-
MWTRACE(1, "CALLING EXI2_Init\n");
22+
TRACE(1, "CALLING EXI2_Init\n");
1623
DBInitComm(inputPendingPtrRef, (int*)monitorCallback);
17-
MWTRACE(1, "DONE CALLING EXI2_Init\n");
24+
TRACE(1, "DONE CALLING EXI2_Init\n");
1825
CircleBufferInitialize(&gRecvCB, gRecvBuf, GDEV_BUF_SIZE);
1926
return 0;
2027
}
@@ -47,7 +54,7 @@ int gdev_cc_read(u8* data, int size) {
4754
return -0x2711;
4855
}
4956

50-
MWTRACE(1, "Expected packet size : 0x%08x (%ld)\n", size, size);
57+
TRACE(1, "Expected packet size : 0x%08x (%ld)\n", size, size);
5158

5259
p1 = size;
5360
p2 = size;
@@ -65,7 +72,7 @@ int gdev_cc_read(u8* data, int size) {
6572
if (retval == 0) {
6673
CircleBufferReadBytes(&gRecvCB, data, p1);
6774
} else {
68-
MWTRACE(8, "cc_read : error reading bytes from EXI2 %ld\n", retval);
75+
TRACE(8, "cc_read : error reading bytes from EXI2 %ld\n", retval);
6976
}
7077

7178
return retval;
@@ -80,14 +87,14 @@ int gdev_cc_write(const u8* bytes, int length) {
8087
n_copy = length;
8188

8289
if (gIsInitialized == FALSE) {
83-
MWTRACE(8, "cc not initialized\n");
90+
TRACE(8, "cc not initialized\n");
8491
return -0x2711;
8592
}
8693

87-
MWTRACE(8, "cc_write : Output data 0x%08x %ld bytes\n", bytes, length);
94+
TRACE(8, "cc_write : Output data 0x%08x %ld bytes\n", bytes, length);
8895

8996
while (n_copy > 0) {
90-
MWTRACE(1, "cc_write sending %ld bytes\n", n_copy);
97+
TRACE(1, "cc_write sending %ld bytes\n", n_copy);
9198
exi2Len = DBWrite((const void*)hexCopy, n_copy);
9299
if (exi2Len == AMC_EXI_NO_ERROR) {
93100
break;
@@ -110,7 +117,7 @@ int gdev_cc_post_stop() {
110117
}
111118

112119
int gdev_cc_peek() {
113-
int poll;
120+
s32 poll;
114121
u8 buff[GDEV_BUF_SIZE];
115122

116123
poll = DBQueryData();

0 commit comments

Comments
 (0)