Compare commits
1 Commits
agent/w100
...
linkgap-cl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2401bcb5c0 |
@@ -772,7 +772,7 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
IPLSection("channelTitle", [
|
||||
Object(Equivalent, "scene/channelTitle/iplChannelTitle.cpp"),
|
||||
Object(Matching, "scene/channelTitle/iplChannelTitle.cpp"),
|
||||
]
|
||||
),
|
||||
IPLSection("faceSelect", [
|
||||
@@ -1908,7 +1908,7 @@ config.libs = [
|
||||
[
|
||||
Object(Matching, "core/eggAllocator.cpp"),
|
||||
Object(Matching, "core/eggAudioArcPlayerMgr.cpp"),
|
||||
Object(Equivalent, "core/eggAudioExpMgr.cpp"),
|
||||
Object(Matching, "core/eggAudioExpMgr.cpp"),
|
||||
Object(Matching, "core/eggAudioFxMgr.cpp"),
|
||||
Object(Matching, "core/eggAudioMgr.cpp"),
|
||||
Object(Matching, "core/eggAudioHeapMgr.cpp"),
|
||||
|
||||
@@ -34,14 +34,14 @@ namespace gui {
|
||||
virtual void draw(Mtx& mtx) {} // 0x14 (0x05)
|
||||
virtual void draw() {} // 0x18 (0x06)
|
||||
|
||||
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
virtual ~Interface(); // 0x1C (0x07)
|
||||
#else
|
||||
virtual ~Interface() {} // 0x1C (0x07)
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_WINDOW_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
#if defined(IPL_GC_WINDOW_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
class __declspec(novtable) EventHandler {
|
||||
#else
|
||||
class EventHandler {
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace ipl {
|
||||
mbDisableCon(bDisableCon) {}
|
||||
#endif
|
||||
|
||||
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
virtual ~PaneManager();
|
||||
#else
|
||||
virtual ~PaneManager() {}
|
||||
|
||||
@@ -103,7 +103,11 @@ namespace ipl {
|
||||
*/
|
||||
Object(EGG::Heap* heap, nand::LayoutFile* file, const char* directory, const char* fileName);
|
||||
|
||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
virtual ~Object() {}
|
||||
#else
|
||||
virtual ~Object();
|
||||
#endif
|
||||
|
||||
void initLocationAdjust();
|
||||
|
||||
|
||||
@@ -145,6 +145,13 @@ namespace ipl {
|
||||
mpCommonFile = commonFile;
|
||||
mpLangFile = langFile;
|
||||
}
|
||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
virtual ~LangFile() {}
|
||||
virtual void read() {}
|
||||
virtual bool isFinished() { return false; }
|
||||
virtual int checkData() { return 0; }
|
||||
virtual bool isFatalError() { return false; }
|
||||
#else
|
||||
virtual ~LangFile(); // 0x08
|
||||
|
||||
virtual void read(); // 0x0C
|
||||
@@ -152,6 +159,7 @@ namespace ipl {
|
||||
virtual bool isFinished(); // 0x14
|
||||
virtual int checkData(); // 0x18
|
||||
virtual bool isFatalError(); // 0x1C
|
||||
#endif
|
||||
|
||||
File* getCmnFile() const { return mpCommonFile; }
|
||||
File* getLangFile() const { return mpLangFile; }
|
||||
@@ -165,7 +173,11 @@ namespace ipl {
|
||||
public:
|
||||
LayoutFile(EGG::Heap* heap, const char* dirName, const char* fileName, ARCHandle* arc, bool bIsNandFile);
|
||||
LayoutFile(File* commonFile, File* langFile = NULL) : LangFile(commonFile, langFile) {}
|
||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
virtual ~LayoutFile() {} // 0x08
|
||||
#else
|
||||
virtual ~LayoutFile(); // 0x08
|
||||
#endif
|
||||
};
|
||||
} // namespace nand
|
||||
} // namespace ipl
|
||||
|
||||
@@ -38,6 +38,19 @@ namespace EGG {
|
||||
|
||||
virtual void calc(); // 0x30
|
||||
|
||||
#ifdef EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, u32 id); // 0x34
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, unsigned int id); // 0x38
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, const char* pName); // 0x3C
|
||||
|
||||
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, u32 id); // 0x44
|
||||
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, unsigned int id); // 0x44
|
||||
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, const char* pName); // 0x48
|
||||
|
||||
virtual bool holdSound(nw4r::snd::SoundHandle* pHandle, u32 id); // 0x50
|
||||
virtual bool holdSound(nw4r::snd::SoundHandle* pHandle, unsigned int id); // 0x50
|
||||
virtual bool holdSound(nw4r::snd::SoundHandle* pHandle, const char* pName); // 0x58
|
||||
#else
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, u32 id) { return mSoundArchivePlayer.StartSound(pHandle, id); } // 0x34
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, unsigned int id) { return mSoundArchivePlayer.StartSound(pHandle, id); } // 0x38
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, const char* pName) NO_INLINE {
|
||||
@@ -66,6 +79,7 @@ namespace EGG {
|
||||
u32 id = changeNameToId(pName);
|
||||
return mSoundArchivePlayer.HoldSound(pHandle, id);
|
||||
} // 0x58
|
||||
#endif
|
||||
|
||||
u32 changeNameToId(const char* pName) { return mpArchive->ConvertLabelStringToSoundId(pName); }
|
||||
const char* changeIdToName(u32 id) { return mpArchive->GetSoundLabelString(id); }
|
||||
|
||||
@@ -19,6 +19,10 @@ namespace EGG {
|
||||
|
||||
~SoundHeapMgr() { destroySoundHeap(); }
|
||||
|
||||
#ifdef EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS
|
||||
virtual bool loadState(s32 id); // 0x08
|
||||
virtual s32 getCurrentLevel(); // 0x0C
|
||||
#else
|
||||
virtual bool loadState(s32 id) {
|
||||
#ifdef IPL_SOUND_MATCHING
|
||||
if (id > 0 && mHeap.GetCurrentLevel() >= id) {
|
||||
@@ -35,6 +39,7 @@ namespace EGG {
|
||||
} // 0x08
|
||||
|
||||
virtual s32 getCurrentLevel() { return mHeap.GetCurrentLevel(); } // 0x0C
|
||||
#endif
|
||||
|
||||
s32 saveState() { return mHeap.SaveState(); }
|
||||
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
#define EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS
|
||||
|
||||
#include <egg/core.h>
|
||||
|
||||
namespace EGG {
|
||||
class Sample : public SimpleAudioMgrWithFx {
|
||||
public:
|
||||
Sample();
|
||||
virtual ~Sample();
|
||||
};
|
||||
|
||||
Sample::Sample() {
|
||||
}
|
||||
|
||||
Sample::~Sample() {
|
||||
}
|
||||
|
||||
SimpleAudioMgrWithFx::SimpleAudioMgrWithFx() {
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,13 @@ namespace nw4r {
|
||||
template <typename T>
|
||||
class AutoLock : private NonCopyable {
|
||||
public:
|
||||
#ifdef EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS
|
||||
explicit AutoLock(T& rLockObj);
|
||||
~AutoLock();
|
||||
#else
|
||||
explicit AutoLock(T& rLockObj) : mLockObj(rLockObj) { Lock(rLockObj); }
|
||||
~AutoLock() { Unlock(mLockObj); }
|
||||
#endif
|
||||
|
||||
private:
|
||||
T& mLockObj; // 0x00
|
||||
|
||||
@@ -69,16 +69,7 @@ void NETMD5GetDigest(NETMD5Context* context, void* digest) {
|
||||
}
|
||||
|
||||
#define ROTATE(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
|
||||
#define STEP(a, b, c, d, f, word, n) \
|
||||
do { \
|
||||
u32* _p = (word); \
|
||||
u32 _k = *constant; \
|
||||
u32 _xw = __lwbrx(_p, 0); \
|
||||
u32 _wc = __lwbrx(_p, 0) + _k; \
|
||||
(a) += (f); \
|
||||
(a) = (b) + ((_wc + (a)) << (n) | (_xw + (_k + (a))) >> (32 - (n))); \
|
||||
++constant; \
|
||||
} while (0)
|
||||
#define STEP(a, b, c, d, f, word, n) ((a) += (f), (a) = (b) + ROTATE(__lwbrx(0, (int)(word)) + (*constant + (a)), n))
|
||||
|
||||
static void ProcessBlock(NETMD5Context* context) {
|
||||
static u32 constants[64] = {0xD76AA478, 0xE8C7B756, 0x242070DB, 0xC1BDCEEE, 0xF57C0FAF, 0x4787C62A, 0xA8304613, 0xFD469501, 0x698098D8, 0x8B44F7AF, 0xFFFF5BB1, 0x895CD7BE, 0x6B901122, 0xFD987193, 0xA679438E, 0x49B40821, 0xF61E2562, 0xC040B340, 0x265E5A51, 0xE9B6C7AA, 0xD62F105D, 0x02441453, 0xD8A1E681, 0xE7D3FBC8, 0x21E1CDE6, 0xC33707D6, 0xF4D50D87, 0x455A14ED, 0xA9E3E905, 0xFCEFA3F8, 0x676F02D9, 0x8D2A4C8A, 0xFFFA3942, 0x8771F681, 0x6D9D6122, 0xFDE5380C, 0xA4BEEA44, 0x4BDECFA9, 0xF6BB4B60, 0xBEBFBC70, 0x289B7EC6, 0xEAA127FA, 0xD4EF3085, 0x04881D05, 0xD9D4D039, 0xE6DB99E5, 0x1FA27CF8, 0xC4AC5665, 0xF4292244, 0x432AFF97, 0xAB9423A7, 0xFC93A039, 0x655B59C3, 0x8F0CCC92, 0xFFEFF47D, 0x85845DD1, 0x6FA87E4F, 0xFE2CE6E0, 0xA3014314, 0x4E0811A1, 0xF7537E82, 0xBD3AF235, 0x2AD7D2BB, 0xEB86D391};
|
||||
@@ -92,30 +83,30 @@ static void ProcessBlock(NETMD5Context* context) {
|
||||
block = context->buffer32;
|
||||
word = block;
|
||||
constant = constants;
|
||||
for (round = 0; round < 4; ++round) {
|
||||
STEP(a,b,c,d,(b & c) | (~b & d),word++,7);
|
||||
STEP(d,a,b,c,(a & b) | (~a & c),word++,12);
|
||||
STEP(c,d,a,b,(d & a) | (~d & b),word++,17);
|
||||
STEP(b,c,d,a,(c & d) | (~c & a),word++,22);
|
||||
}
|
||||
index = indices;
|
||||
for (round = 0; round < 4; ++round) {
|
||||
STEP(a,b,c,d,(b & d) | (c & ~d),block + *index++,5);
|
||||
STEP(d,a,b,c,(a & c) | (b & ~c),block + *index++,9);
|
||||
STEP(c,d,a,b,(d & b) | (a & ~b),block + *index++,14);
|
||||
STEP(b,c,d,a,(c & a) | (d & ~a),block + *index++,20);
|
||||
STEP(a,b,c,d,(b & c) | (~b & d),word,7); ++word; ++constant;
|
||||
STEP(d,a,b,c,(a & b) | (~a & c),word,12); ++word; ++constant;
|
||||
STEP(c,d,a,b,(d & a) | (~d & b),word,17); ++word; ++constant;
|
||||
STEP(b,c,d,a,(c & d) | (~c & a),word,22); ++word; ++constant;
|
||||
}
|
||||
for (round = 0; round < 4; ++round) {
|
||||
STEP(a,b,c,d,d ^ b ^ c,block + *index++,4);
|
||||
STEP(d,a,b,c,c ^ a ^ b,block + *index++,11);
|
||||
STEP(c,d,a,b,b ^ d ^ a,block + *index++,16);
|
||||
STEP(b,c,d,a,a ^ c ^ d,block + *index++,23);
|
||||
STEP(a,b,c,d,(b & d) | (c & ~d),block + *index,5); ++index; ++constant;
|
||||
STEP(d,a,b,c,(a & c) | (b & ~c),block + *index,9); ++index; ++constant;
|
||||
STEP(c,d,a,b,(d & b) | (a & ~b),block + *index,14); ++index; ++constant;
|
||||
STEP(b,c,d,a,(c & a) | (d & ~a),block + *index,20); ++index; ++constant;
|
||||
}
|
||||
for (round = 0; round < 4; ++round) {
|
||||
STEP(a,b,c,d,c ^ (b | ~d),block + *index++,6);
|
||||
STEP(d,a,b,c,b ^ (a | ~c),block + *index++,10);
|
||||
STEP(c,d,a,b,a ^ (d | ~b),block + *index++,15);
|
||||
STEP(b,c,d,a,d ^ (c | ~a),block + *index++,21);
|
||||
STEP(a,b,c,d,d ^ b ^ c,block + *index,4); ++index; ++constant;
|
||||
STEP(d,a,b,c,c ^ a ^ b,block + *index,11); ++index; ++constant;
|
||||
STEP(c,d,a,b,b ^ d ^ a,block + *index,16); ++index; ++constant;
|
||||
STEP(b,c,d,a,a ^ c ^ d,block + *index,23); ++index; ++constant;
|
||||
}
|
||||
for (round = 0; round < 4; ++round) {
|
||||
STEP(a,b,c,d,c ^ (b | ~d),block + *index,6); ++index; ++constant;
|
||||
STEP(d,a,b,c,b ^ (a | ~c),block + *index,10); ++index; ++constant;
|
||||
STEP(c,d,a,b,a ^ (d | ~b),block + *index,15); ++index; ++constant;
|
||||
STEP(b,c,d,a,d ^ (c | ~a),block + *index,21); ++index; ++constant;
|
||||
}
|
||||
context->a += a;
|
||||
context->b += b;
|
||||
|
||||
@@ -77,15 +77,14 @@ s32 NHTTPi_compareTokenN_HdrRecvBuf(const NHTTPResponseInfo* response, s32 posit
|
||||
NHTTPi_HDRBUFLIST* block;
|
||||
s32 offset;
|
||||
s8 character;
|
||||
if(position<limit) {
|
||||
FindHeaderBlock(response,position,&block,&offset);
|
||||
if(position>=limit) return -1;
|
||||
FindHeaderBlock(response,position,&block,&offset);
|
||||
character=ReadHeaderChar(response,&block,&offset);
|
||||
while(LowerCase(character)==LowerCase(*token)) {
|
||||
if(*token==0 || *token==' ' || *token==delimiter || position==limit-1) return 0;
|
||||
character=ReadHeaderChar(response,&block,&offset);
|
||||
while(LowerCase(character)==LowerCase(*token)) {
|
||||
if(*token==0 || *token==' ' || *token==delimiter || position==limit-1) return 0;
|
||||
character=ReadHeaderChar(response,&block,&offset);
|
||||
++position;
|
||||
++token;
|
||||
}
|
||||
++position;
|
||||
++token;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -127,18 +127,12 @@ s32 NHTTPi_intToStr(char* destination, u32 value) {
|
||||
}
|
||||
|
||||
s32 NHTTPi_compareToken(const char* left, const char* right) {
|
||||
int leftCharacter, rightCharacter;
|
||||
s8 leftByte;
|
||||
goto loop;
|
||||
for (;;) {
|
||||
if((s8)*left==0 || (s8)*left==' ') return 0;
|
||||
++left; ++right;
|
||||
loop:
|
||||
rightCharacter=*right + 0x20;
|
||||
if(!((*right>='A') & (*right<='Z'))) rightCharacter=*right;
|
||||
leftByte=(s8)*left;
|
||||
leftCharacter=LowerCase(leftByte);
|
||||
int rightCharacter=LowerCase(*right);
|
||||
int leftCharacter=LowerCase(*left);
|
||||
if(leftCharacter!=rightCharacter) break;
|
||||
if(*left==0 || *left==' ') return 0;
|
||||
++left; ++right;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ int SOiIsBufferAddrCheck(void);
|
||||
void* SOiAlloc(u32, s32);
|
||||
void SOiFree(u32, void*, s32);
|
||||
|
||||
static int soSocketRegistered[2];
|
||||
const char* __SOCKETVersion ="<< RVL_SDK - SOCKET \trelease build: Dec 12 2008 03:06:17 (0x4199_60831) >>";
|
||||
static int soSocketRegistered;
|
||||
const char* __SOCKETVersion="<< RVL_SDK - SOCKET \trelease build: Dec 12 2008 03:06:17 (0x4199_60831) >>";
|
||||
|
||||
typedef struct SocketRequest { int socket; int type; int protocol; } SocketRequest;
|
||||
typedef struct AddressRequest { int socket; int hasAddress; SOSockAddr address; } AddressRequest;
|
||||
@@ -30,17 +30,23 @@ typedef struct InetRequest {
|
||||
union { struct { int family; u8 address[16]; } reply; u8 replyBlock[32]; };
|
||||
char text[1];
|
||||
} InetRequest;
|
||||
typedef struct RecvRequest {
|
||||
IOSIoVector vectors[4];
|
||||
typedef struct RecvPayload {
|
||||
union { struct { int socket; int flags; } command; u8 commandBlock[32]; };
|
||||
SOSockAddr address;
|
||||
} RecvPayload;
|
||||
typedef struct RecvRequest {
|
||||
IOSIoVector vectors[4];
|
||||
RecvPayload payload;
|
||||
} RecvRequest;
|
||||
typedef struct SendCmd {
|
||||
int socket; int flags; int hasAddress; SOSockAddr address;
|
||||
} SendCmd;
|
||||
typedef struct SendCommand {
|
||||
int socket;
|
||||
int flags;
|
||||
int hasAddress;
|
||||
SOSockAddr address;
|
||||
} SendCommand;
|
||||
typedef struct SendRequest {
|
||||
IOSIoVector vectors[4];
|
||||
SendCmd command;
|
||||
SendCommand command;
|
||||
} SendRequest;
|
||||
|
||||
static int RecvFrom(const char*, int, void*, int, int, SOSockAddr*);
|
||||
@@ -50,7 +56,7 @@ int SOSocket(int family, int type, int protocol) {
|
||||
s32 rm;
|
||||
SocketRequest* request;
|
||||
int result;
|
||||
if(!soSocketRegistered[0]) { OSRegisterVersion(__SOCKETVersion); soSocketRegistered[0]=1; }
|
||||
if(!soSocketRegistered) { OSRegisterVersion(__SOCKETVersion); soSocketRegistered=1; }
|
||||
if((result=SOiPrepare(NULL,&rm))==0) {
|
||||
if(family==23) result=-5;
|
||||
else {
|
||||
@@ -90,7 +96,7 @@ int SOBind(int socket, void* address) {
|
||||
int result;
|
||||
AddressRequest* request;
|
||||
if((result=SOiPrepare(NULL,&rm))==0) {
|
||||
if(!address || addr->len>8 || addr->len<8) result=-28;
|
||||
if(!addr || addr->len>8 || addr->len<8) result=-28;
|
||||
else {
|
||||
request=SOiAlloc(12,64);
|
||||
if(!request) result=-49;
|
||||
@@ -112,7 +118,7 @@ int SOConnect(int socket, void* address) {
|
||||
int result;
|
||||
AddressRequest* request;
|
||||
if((result=SOiPrepare(NULL,&rm))==0) {
|
||||
if(!address || addr->len>8 || addr->len<8) result=-28;
|
||||
if(!addr || addr->len>8 || addr->len<8) result=-28;
|
||||
else {
|
||||
request=SOiAlloc(12,64);
|
||||
if(!request) result=-49;
|
||||
@@ -128,24 +134,26 @@ int SOConnect(int socket, void* address) {
|
||||
return result;
|
||||
}
|
||||
|
||||
int SOGetSockName(int socket, SOSockAddr* address) {
|
||||
int SOGetSockName(int socket, void* address) {
|
||||
int size;
|
||||
int result;
|
||||
s32 rm;
|
||||
NameRequest* request;
|
||||
SOSockAddr* addr;
|
||||
SOSockAddr* reply;
|
||||
NameRequest* request;
|
||||
addr=address;
|
||||
if((result=SOiPrepare(NULL,&rm))==0) {
|
||||
if(!address || address->len>8 || address->len<8) result=-28;
|
||||
if(!addr || addr->len>8 || addr->len<8) result=-28;
|
||||
else {
|
||||
size=(address->len+63)&~31;
|
||||
size=(addr->len+63)&~31;
|
||||
request=SOiAlloc(12,size);
|
||||
if(!request) result=-49;
|
||||
else {
|
||||
request->socket=socket;
|
||||
reply=&request->address;
|
||||
memcpy(reply,address,address->len);
|
||||
result=IOS_Ioctl(rm,7,request,4,reply,address->len);
|
||||
if(result>=0) memcpy(address,reply,reply->len);
|
||||
memcpy(reply,addr,addr->len);
|
||||
result=IOS_Ioctl(rm,7,request,4,reply,addr->len);
|
||||
if(result>=0) memcpy(addr,reply,reply->len);
|
||||
SOiFree(12,request,size);
|
||||
}
|
||||
}
|
||||
@@ -199,8 +207,10 @@ int SOShutdown(int socket, int how) {
|
||||
}
|
||||
|
||||
int SOPoll(SOPollFD* fds, unsigned int count, s64 timeout) {
|
||||
s32 size;
|
||||
s32 bytes;
|
||||
s32 result;
|
||||
s32 rm;
|
||||
s32 size,bytes,result;
|
||||
PollRequest* request;
|
||||
SOPollFD* reply;
|
||||
if((result=SOiPrepare(NULL,&rm))==0) {
|
||||
@@ -257,11 +267,17 @@ char* SOInetNtoA(SOInAddr address) {
|
||||
|
||||
int SOInetPtoN(int family, const char* text, void* address) {
|
||||
s32 rm;
|
||||
int size,temporary,result,bytes;
|
||||
int temporary;
|
||||
int size;
|
||||
int result;
|
||||
int bytes;
|
||||
InetRequest* request;
|
||||
if((result=SOiPrepareTempRm(NULL,&rm,&temporary))==0) {
|
||||
bytes=0;
|
||||
switch(family) { case 2: bytes=4; break; default: break; }
|
||||
switch (family) {
|
||||
case 2: bytes=4; break;
|
||||
default: break;
|
||||
}
|
||||
if(!bytes) result=-5;
|
||||
else if(!text) result=-28;
|
||||
else {
|
||||
@@ -288,11 +304,14 @@ u32 SOHtoNl(u32 value) { return value; }
|
||||
u16 SOHtoNs(u16 value) { return value; }
|
||||
|
||||
static inline int DirectBuffer(const void* data, int length) {
|
||||
BOOL direct=FALSE;
|
||||
BOOL aligned=FALSE;
|
||||
BOOL accessible;
|
||||
BOOL direct;
|
||||
BOOL aligned;
|
||||
direct=FALSE;
|
||||
aligned=FALSE;
|
||||
if(((u32)data&31)==0 && length%32==0) aligned=TRUE;
|
||||
if(aligned) {
|
||||
BOOL accessible=TRUE;
|
||||
accessible=TRUE;
|
||||
if(SOiIsBufferAddrCheck()) {
|
||||
BOOL inMemory=FALSE;
|
||||
if(((u32)data&0x1fffffff)>=0x10000000 && ((u32)data&0x1fffffff)<0x18000000) inMemory=TRUE;
|
||||
@@ -305,11 +324,13 @@ static inline int DirectBuffer(const void* data, int length) {
|
||||
|
||||
static int RecvFrom(const char* name, int socket, void* data, int length, int flags, SOSockAddr* address) {
|
||||
s32 rm;
|
||||
int result,size;
|
||||
RecvRequest* request;
|
||||
void* buffer;
|
||||
SOSockAddr* reply;
|
||||
int size;
|
||||
BOOL direct;
|
||||
RecvRequest* request;
|
||||
RecvPayload* payload;
|
||||
int result;
|
||||
SOSockAddr* reply;
|
||||
if(length>32768) length=32768;
|
||||
if((result=SOiPrepare(name,&rm))==0) {
|
||||
if(address && (address->len>8 || address->len<8)) result=-28;
|
||||
@@ -317,31 +338,31 @@ static int RecvFrom(const char* name, int socket, void* data, int length, int fl
|
||||
else {
|
||||
direct=TRUE;
|
||||
if(length && !DirectBuffer(data,length)) direct=FALSE;
|
||||
size=((address==0 ? 0 : address->len)+95)&~31;
|
||||
size=((address == NULL ? 0 : address->len)+95)&~31;
|
||||
request=SOiAlloc(12,size);
|
||||
if(!direct) buffer=SOiAlloc(13,(length+31)&~31);
|
||||
if(direct == FALSE) buffer=SOiAlloc(13,(length+31)&~31);
|
||||
else buffer=data;
|
||||
if(!request || !buffer) result=-49;
|
||||
else {
|
||||
request->command.socket=socket; request->command.flags=flags;
|
||||
reply=&request->address;
|
||||
request->vectors[0].base=(u8*)&request->command; request->vectors[0].length=8;
|
||||
payload=&request->payload;
|
||||
payload->command.socket=socket; payload->command.flags=flags;
|
||||
reply=&payload->address;
|
||||
request->vectors[0].base=(u8*)payload; request->vectors[0].length=8;
|
||||
request->vectors[1].base=buffer; request->vectors[1].length=length;
|
||||
if(!address) {
|
||||
request->vectors[2].base=NULL; request->vectors[2].length=0;
|
||||
result=IOS_Ioctlv(rm,12,1,2,request->vectors);
|
||||
} else {
|
||||
memcpy(reply,(SOSockAddr*)address,address->len);
|
||||
memcpy(reply,address,address->len);
|
||||
request->vectors[2].base=(u8*)reply; request->vectors[2].length=address->len;
|
||||
result=IOS_Ioctlv(rm,12,1,2,request->vectors);
|
||||
if(result>=0) {
|
||||
u32 bytes=address->len;
|
||||
memcpy(address,reply,bytes>reply->len?reply->len:bytes);
|
||||
memcpy(address,reply,address->len > reply->len ? reply->len : address->len);
|
||||
}
|
||||
}
|
||||
if(result>=0 && !direct) memcpy(data,buffer,length);
|
||||
if(result>=0 && direct == FALSE) memcpy(data,buffer,length);
|
||||
}
|
||||
if(!direct) SOiFree(13,buffer,(length+31)&~31);
|
||||
if(direct == FALSE) SOiFree(13,buffer,(length+31)&~31);
|
||||
SOiFree(12,request,size);
|
||||
}
|
||||
result=SOiConclude(name,result);
|
||||
@@ -350,11 +371,12 @@ static int RecvFrom(const char* name, int socket, void* data, int length, int fl
|
||||
}
|
||||
|
||||
static int SendTo(const char* name, int socket, const void* data, int length, int flags, const SOSockAddr* address) {
|
||||
BOOL direct;
|
||||
void* buffer;
|
||||
int result;
|
||||
s32 rm;
|
||||
void* buffer;
|
||||
BOOL direct;
|
||||
SendRequest* request;
|
||||
SendCommand* command;
|
||||
if((result=SOiPrepare(name,&rm))==0) {
|
||||
if(address && (address->len>8 || address->len<8)) result=-28;
|
||||
else if(length<0 || (length>0 && !data)) result=-28;
|
||||
@@ -362,23 +384,23 @@ static int SendTo(const char* name, int socket, const void* data, int length, in
|
||||
direct=TRUE;
|
||||
if(length && !DirectBuffer(data,length)) direct=FALSE;
|
||||
request=SOiAlloc(12,96);
|
||||
if(direct==0) buffer=SOiAlloc(14,(length+31)&~31);
|
||||
if(direct == FALSE) buffer=SOiAlloc(14,(length+31)&~31);
|
||||
else buffer=(void*)data;
|
||||
if(!request || !buffer) result=-49;
|
||||
else {
|
||||
SendCmd* cmd=&request->command;
|
||||
cmd->socket=socket; cmd->flags=flags;
|
||||
if(!address) cmd->hasAddress=0;
|
||||
command = &request->command;
|
||||
command->socket=socket; command->flags=flags;
|
||||
if(!address) command->hasAddress=0;
|
||||
else {
|
||||
cmd->hasAddress=1;
|
||||
memcpy(&cmd->address,address,address->len);
|
||||
command->hasAddress=1;
|
||||
memcpy(&command->address,address,address->len);
|
||||
}
|
||||
if(!direct) memcpy(buffer,data,length);
|
||||
if(direct == FALSE) memcpy(buffer,data,length);
|
||||
request->vectors[0].base=buffer; request->vectors[0].length=length;
|
||||
request->vectors[1].base=(u8*)cmd; request->vectors[1].length=40;
|
||||
request->vectors[1].base=(u8*)command; request->vectors[1].length=40;
|
||||
result=IOS_Ioctlv(rm,13,2,0,request->vectors);
|
||||
}
|
||||
if(!direct) SOiFree(14,buffer,(length+31)&~31);
|
||||
if(direct == FALSE) SOiFree(14,buffer,(length+31)&~31);
|
||||
SOiFree(12,request,96);
|
||||
}
|
||||
result=SOiConclude(name,result);
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
# netmisc leaf — attempt log (agent/w1005/netmisc)
|
||||
|
||||
DOL gate: units stay NonMatching → sha1 26116613f624061ba99c8d1a299aaa6efa85670d holds.
|
||||
|
||||
## This wave's wins
|
||||
- NHTTPi_compareTokenN_HdrRecvBuf: 126/124 -> 124/124 insn-equal (+66 regalloc/sched diffs).
|
||||
Lever: `if(position<limit){...} return -1;` wrap instead of `if(position>=limit) return -1;`
|
||||
early-return — makes the -1 return share the tail (same idiom as sibling fns in the TU).
|
||||
`int character` tried: regresses to 122/124 (drops needed extsb's) — orig uses `s8`.
|
||||
|
||||
## Open fns (all insn-equal unless noted) — documented walls
|
||||
- NHTTPi_compareToken (stdlib): 45/45, 8d. Web-color swap: base homes carried `leftByte`
|
||||
byte-web in r31 + rightChar-select in r12; mine inverts. `li r7,0x5a`/`li r9,0` order swap.
|
||||
Tried: leftLC-first body order (+r30 save, 47/45 revert), char/s8/u8 leftByte, (s8)*left /
|
||||
(int)leftByte / *left check operands, entry-hoisted `leftByte=...` before goto (inert),
|
||||
`(const s8*)` uniform typing (identical). Wall: which web wins the lone callee slot is
|
||||
allocator-internal; base's `extsb. r0,r31` needs the s8-typed shared web pinned r31 —
|
||||
every form either pins the wrong web (r31->rightChar) or breaks the carried-web CSE.
|
||||
- NHTTPi_strnicmp: 51/51, 2d. Pure `li` materialization order: base `li r9,0x5a` before
|
||||
`li r10,0`; mine swapped. The 0-web is the subfc/adde carry base for `>='A'`.
|
||||
Tried: conjunct swap in LowerCase (breaks the whole subfc/adde idiom -> 47/51),
|
||||
a/b lowercase order (12d), decl order a/b (20d). Wall: constant-web numbering.
|
||||
- NHTTPi_Base64Encode: 119/119, 58d. Insn-equal, unrolled-2x loop. Whole-iteration
|
||||
list-schedule interleave: base loads s0,s1 then computes; mine pulls s2 load forward.
|
||||
Tried: named c0/c1/c2 locals (+4 insns), operand-order `(s1>>4)+((s0&3)<<4)` (61d),
|
||||
`*output++` pointer form (identical 58d). Wall: list-scheduler priority.
|
||||
- SOGetSockName: 63/63, 3d. memcpy arg-marshal mr order: base r4,r5-load,r3; mine r3,r4,r5.
|
||||
Tried: reply-assign before socket store, `&request->address` direct, `size` as 3rd arg
|
||||
(still r5-copy at same slot). Wall: arg-copy scheduling.
|
||||
- SOGetInterfaceOpt: 119/119, 5d. level/option color rotation: base level->r26,option->r25;
|
||||
mine level->r25,option->r28. option-store-first flips option to r25 but swaps the two
|
||||
stw's emission order (3d, offsets right order wrong). Check-order/operand variants inert.
|
||||
Wall: arg-web coloring + store emit order can't both match from this source shape.
|
||||
- RecvFrom: 174/174, 65d. Uniform +1 arg-window shift (mine r24-r29 vs base r25-r30) —
|
||||
base pins one more callee web somewhere; "+1 pinned web" wall family.
|
||||
- SendTo: ~98% similar family (not diffed this wave).
|
||||
- md5 ProcessBlock: 306/306, 275d -> best 261d. Whole-fn web-coloring permutation.
|
||||
Decoded base's homes: block->r8, const->r9, word->r4, a->r0 (arithmetic-only web wins
|
||||
r0; r0 is ineligible as indexed-load base so word can't take it), b,c,d->r5,6,7.
|
||||
All-volatile allocation (only r29-31 callee). Moving state loads before/after pointer
|
||||
inits, stmt vs decl-init, `&block[*index++]` — allocator homes unchanged (block->r0 mine).
|
||||
Wall: which web is "first-created" for r0 is not driven by source order here.
|
||||
- aes AESiEncryptBlock: 158/158, ~134d; AESiDecryptBlock: 249/251 (-2 insns + big regalloc).
|
||||
Decrypt tail: base `xor r0,r5,r0; xor r0,r6,r0` before last stw — 4-term xor-tree
|
||||
reassociation differs; not yet decoded. Both fns are the same wholesale-color wall at
|
||||
larger scale (unrolled/flat straight-line code, no calls).
|
||||
- NHTTPi_compareTokenN_HdrRecvBuf residual: 124/124 insn-equal, 66d — "+1 callee web"
|
||||
family: base uses _savegpr_25 (pins char byte r25) + frame 0x30 vs mine _savegpr_26/0x20.
|
||||
|
||||
## Notes
|
||||
- Every remaining diff is insn-equal regalloc/scheduling/web-creation-order — the same
|
||||
allocator-internal family documented in nwc.attempts.md (waves 14-26) and linkgap.
|
||||
- No unit is single-fn-blocked; no unit at whole-100% -> no configure.py flips this wave.
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <private/os.h>
|
||||
#include <private/wpad.h>
|
||||
|
||||
#pragma dont_instantiate ipl::math::HermiteIntp<float>
|
||||
|
||||
|
||||
#undef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user