Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions config/RSPE01_01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18286,7 +18286,7 @@ XYPAL = .data:0x803B7230; // type:object size:0x30 scope:local align:8
@1049 = .data:0x803B7298; // type:object size:0x2B scope:local align:4 data:string
lbl_803B72C8 = .data:0x803B72C8; // type:object size:0x31 data:string
lbl_803B7300 = .data:0x803B7300; // type:object size:0x278 data:4byte
lbl_803B7578 = .data:0x803B7578; // type:object size:0x39 data:string
@1 = .data:0x803B7578; // type:object size:0x39 scope:local data:string
jumptable_803B75B8 = .data:0x803B75B8; // type:object size:0x84 scope:local
gap_08_803B763C_data = .data:0x803B763C; // type:object size:0x4 scope:global
@1838 = .data:0x803B7640; // type:object size:0x2C scope:local align:4
Expand Down Expand Up @@ -20365,7 +20365,7 @@ __SIVersion = .sdata:0x804BD9A0; // type:object size:0x4 scope:global data:4byte
gap_10_804BD9A4_sdata = .sdata:0x804BD9A4; // type:object size:0x4 scope:global
@1048 = .sdata:0x804BD9A8; // type:object size:0x6 scope:local align:4 data:string
__esFd = .sdata:0x804BD9B0; // type:object size:0x4 scope:local data:4byte
NETRexPPCVersionPrintableString = .sdata:0x804BD9B8; // type:object size:0x8 scope:global data:4byte
NETRexPPCVersionPrintableString = .sdata:0x804BD9B8; // type:object size:0x4 scope:global data:4byte
@1856 = .sdata:0x804BD9C0; // type:object size:0x2 scope:local align:4 data:byte
@1857 = .sdata:0x804BD9C4; // type:object size:0x2 scope:local align:4 data:string
@1858 = .sdata:0x804BD9C8; // type:object size:0x4 scope:local align:4 data:string
Expand Down Expand Up @@ -21828,8 +21828,7 @@ Initialized$694 = .sbss:0x804BF3DC; // type:object size:0x4 scope:local data:4by
cmdTypeAndStatus$877 = .sbss:0x804BF3E0; // type:object size:0x4 scope:local
__PADFixBits = .sbss:0x804BF3E4; // type:object size:0x4 scope:global data:4byte
SamplingRate = .sbss:0x804BF3E8; // type:object size:0x4 scope:local data:4byte
whenCached$690 = .sbss:0x804BF3F0; // type:object size:0x4 scope:global data:4byte
lbl_804BF3F4 = .sbss:0x804BF3F4; // type:object size:0x4 data:4byte
whenCached$690 = .sbss:0x804BF3F0; // type:object size:0x8 scope:global data:4byte
RdBufferMutex = .sbss:0x804BF3F8; // type:object size:0x4 scope:local data:4byte
WrBufferMutex = .sbss:0x804BF3FC; // type:object size:0x4 scope:local data:4byte
InstanceIdGen = .sbss:0x804BF400; // type:object size:0x4 scope:local data:4byte
Expand Down
4 changes: 2 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ def MatchingFor(*versions):
Object(Matching, "revolution/WENC/wenc.c"),
Object(NonMatching, "revolution/CNT/cnt.c"),
Object(Matching, "revolution/ESP/esp.c"),
Object(NonMatching, "revolution/NET/nettime.c"),
Object(Matching, "revolution/NET/nettime.c"),
Object(NonMatching, "revolution/NET/NETVersion.c"),
Object(NonMatching, "revolution/NWC24/NWC24StdApi.c"),
Object(Matching, "revolution/NWC24/NWC24FileApi.c"),
Expand All @@ -1040,7 +1040,7 @@ def MatchingFor(*versions):
Object(Matching, "revolution/NWC24/NWC24Parser.c"),
Object(NonMatching, "revolution/NWC24/NWC24MsgCommit.c"),
Object(Matching, "revolution/NWC24/NWC24Schedule.c"),
Object(NonMatching, "revolution/NWC24/NWC24DateParser.c"),
Object(Matching, "revolution/NWC24/NWC24DateParser.c"),
Object(Matching, "revolution/NWC24/NWC24FriendList.c"),
Object(Matching, "revolution/NWC24/NWC24SecretFList.c"),
Object(Matching, "revolution/NWC24/NWC24Time.c"),
Expand Down
5 changes: 5 additions & 0 deletions include/revolution/NWC24/NWC24DateParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
#include <types.h>

#include <revolution/NWC24/NWC24Types.h>
#include <revolution/NWC24/NWC24Utils.h>
#include <revolution/OS.h>
#ifdef __cplusplus
extern "C" {
#endif

NWC24Err NWC24iIsValidDate(u16 year, u8 month, u8 day);
NWC24Err NWC24iEpochSecondsToDate(NWC24Date* date, s64 timestamp);
NWC24Err NWC24iDateToOSCalendarTime(OSCalendarTime* time,
const NWC24Date* date);

#ifdef __cplusplus
}
Expand Down
5 changes: 5 additions & 0 deletions src/revolution/NET/NETVersion.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
static char* NETRexPPCVersionPrintableString = "<< REX-PPC 1.0.0.2 (RevoEX-1.0plus2) REL 070510173628 >>";

char* NETGetRexPPCVersionPrintable() {
return NETRexPPCVersionPrintableString;
}
35 changes: 35 additions & 0 deletions src/revolution/NET/nettime.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#include <revolution/NWC24.h>
#include <revolution/OS.h>

BOOL NETGetUniversalCalendar(OSCalendarTime* time) {
static s64 whenCached = 0;
NWC24Date date;
s64 universalTime;
s64 now;

if (whenCached == 0) {
goto update;
}
now = __OSGetSystemTime();
if (whenCached + OS_SEC_TO_TICKS(60) >= now) {
goto use_cache;
}
update:
NWC24iSynchronizeRtcCounter(FALSE);
now = __OSGetSystemTime();
whenCached = now;
use_cache:
if (NWC24iGetUniversalTime(&universalTime) < 0) {
goto error;
}
if (NWC24iEpochSecondsToDate(&date, universalTime) < 0) {
goto error;
}
if (NWC24iDateToOSCalendarTime(time, &date) < 0) {
goto error;
}
return TRUE;
error:
OSTicksToCalendarTime(OSGetTime(), time);
return FALSE;
}
Loading