PSV modules refactoring

This commit is contained in:
Nekotekina 2015-06-21 02:04:01 +03:00
parent 8229c0ed3d
commit bc9481db1b
129 changed files with 5000 additions and 4588 deletions

View file

@ -2,123 +2,9 @@
#include "Emu/System.h"
#include "Emu/ARMv7/PSVFuncList.h"
#include "sceNpCommon.h"
#include "sceNpBasic.h"
extern psv_log_base sceNpBasic;
enum SceNpBasicFriendListEventType : s32
{
SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_SYNC = 1,
SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_SYNC_DONE = 2,
SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_ADDED = 3,
SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_DELETED = 4
};
typedef vm::psv::ptr<void(SceNpBasicFriendListEventType eventType, vm::psv::ptr<const SceNpId> friendId, vm::psv::ptr<void> userdata)> SceNpBasicFriendListEventHandler;
enum SceNpBasicFriendOnlineStatusEventType : s32
{
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_EVENT_TYPE_SYNC = 1,
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_EVENT_TYPE_SYNC_DONE = 2,
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_EVENT_TYPE_UPDATED = 3
};
enum SceNpBasicFriendOnlineStatus : s32
{
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_UNKNOWN = 0,
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_OFFLINE = 1,
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_STANDBY = 2,
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_ONLINE_OUT_OF_CONTEXT = 3,
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_ONLINE_IN_CONTEXT = 4
};
typedef vm::psv::ptr<void(SceNpBasicFriendOnlineStatusEventType eventType, vm::psv::ptr<const SceNpId> friendId, SceNpBasicFriendOnlineStatus status, vm::psv::ptr<void> userdata)> SceNpBasicFriendOnlineStatusEventHandler;
enum SceNpBasicBlockListEventType : s32
{
SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_SYNC = 1,
SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_SYNC_DONE = 2,
SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_ADDED = 3,
SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_DELETED = 4
};
typedef vm::psv::ptr<void(SceNpBasicBlockListEventType eventType, vm::psv::ptr<const SceNpId> playerId, vm::psv::ptr<void> userdata)> SceNpBasicBlockListEventHandler;
enum SceNpBasicFriendGamePresenceEventType : s32
{
SCE_NP_BASIC_FRIEND_GAME_PRESENCE_EVENT_TYPE_SYNC = 1,
SCE_NP_BASIC_FRIEND_GAME_PRESENCE_EVENT_TYPE_SYNC_DONE = 2,
SCE_NP_BASIC_FRIEND_GAME_PRESENCE_EVENT_TYPE_UPDATED = 3
};
enum SceNpBasicInGamePresenceType
{
SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_UNKNOWN = -1,
SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_NONE = 0,
SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_DEFAULT = 1,
SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_JOINABLE = 2,
SCE_NP_BASIC_IN_GAME_PRESENCE_TYPE_MAX = 3
};
struct SceNpBasicInGamePresence
{
u32 sdkVersion;
SceNpBasicInGamePresenceType type;
char status[192];
u8 data[128];
u32 dataSize;
};
struct SceNpBasicGamePresence
{
u32 size;
char title[128];
SceNpBasicInGamePresence inGamePresence;
};
typedef vm::psv::ptr<void(SceNpBasicFriendGamePresenceEventType eventtype, vm::psv::ptr<const SceNpId> friendId, vm::psv::ptr<const SceNpBasicGamePresence> presence, vm::psv::ptr<void> userdata)> SceNpBasicFriendGamePresenceEventHandler;
struct SceNpBasicInGameDataMessage
{
u8 data[128];
u32 dataSize;
};
typedef vm::psv::ptr<void(vm::psv::ptr<const SceNpId> from, vm::psv::ptr<const SceNpBasicInGameDataMessage> message, vm::psv::ptr<void> userdata)> SceNpBasicInGameDataMessageEventHandler;
struct SceNpBasicEventHandlers
{
u32 sdkVersion;
SceNpBasicFriendListEventHandler friendListEventHandler;
SceNpBasicFriendOnlineStatusEventHandler friendOnlineStatusEventHandler;
SceNpBasicBlockListEventHandler blockListEventHandler;
SceNpBasicFriendGamePresenceEventHandler friendGamePresenceEventHandler;
SceNpBasicInGameDataMessageEventHandler inGameDataMessageEventHandler;
};
struct SceNpBasicPlaySessionLogDescription
{
char text[512];
};
struct SceNpBasicPlaySessionLog
{
u64 date;
SceNpId withWhom;
SceNpCommunicationId commId;
char title[128];
SceNpBasicPlaySessionLogDescription description;
};
enum SceNpBasicPlaySessionLogType : s32
{
SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_INVALID = -1,
SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_ALL = 0,
SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_BY_NP_COMM_ID = 1,
SCE_NP_BASIC_PLAY_SESSION_LOG_TYPE_MAX = 2
};
s32 sceNpBasicInit(vm::psv::ptr<void> opt)
s32 sceNpBasicInit(vm::ptr<void> opt)
{
throw __FUNCTION__;
}
@ -128,7 +14,7 @@ s32 sceNpBasicTerm(ARMv7Context&)
throw __FUNCTION__;
}
s32 sceNpBasicRegisterHandler(vm::psv::ptr<const SceNpBasicEventHandlers> handlers, vm::psv::ptr<const SceNpCommunicationId> context, vm::psv::ptr<void> userdata)
s32 sceNpBasicRegisterHandler(vm::ptr<const SceNpBasicEventHandlers> handlers, vm::ptr<const SceNpCommunicationId> context, vm::ptr<void> userdata)
{
throw __FUNCTION__;
}
@ -143,42 +29,42 @@ s32 sceNpBasicCheckCallback()
throw __FUNCTION__;
}
s32 sceNpBasicGetFriendOnlineStatus(vm::psv::ptr<const SceNpId> friendId, vm::psv::ptr<SceNpBasicFriendOnlineStatus> status)
s32 sceNpBasicGetFriendOnlineStatus(vm::ptr<const SceNpId> friendId, vm::ptr<SceNpBasicFriendOnlineStatus> status)
{
throw __FUNCTION__;
}
s32 sceNpBasicGetGamePresenceOfFriend(vm::psv::ptr<const SceNpId> friendId, vm::psv::ptr<SceNpBasicGamePresence> presence)
s32 sceNpBasicGetGamePresenceOfFriend(vm::ptr<const SceNpId> friendId, vm::ptr<SceNpBasicGamePresence> presence)
{
throw __FUNCTION__;
}
s32 sceNpBasicGetFriendListEntryCount(vm::psv::ptr<u32> count)
s32 sceNpBasicGetFriendListEntryCount(vm::ptr<u32> count)
{
throw __FUNCTION__;
}
s32 sceNpBasicGetFriendListEntries(u32 startIndex, vm::psv::ptr<SceNpId> entries, u32 numEntries, vm::psv::ptr<u32> retrieved)
s32 sceNpBasicGetFriendListEntries(u32 startIndex, vm::ptr<SceNpId> entries, u32 numEntries, vm::ptr<u32> retrieved)
{
throw __FUNCTION__;
}
s32 sceNpBasicGetBlockListEntryCount(vm::psv::ptr<u32> count)
s32 sceNpBasicGetBlockListEntryCount(vm::ptr<u32> count)
{
throw __FUNCTION__;
}
s32 sceNpBasicGetBlockListEntries(u32 startIndex, vm::psv::ptr<SceNpId> entries, u32 numEntries, vm::psv::ptr<u32> retrieved)
s32 sceNpBasicGetBlockListEntries(u32 startIndex, vm::ptr<SceNpId> entries, u32 numEntries, vm::ptr<u32> retrieved)
{
throw __FUNCTION__;
}
s32 sceNpBasicCheckIfPlayerIsBlocked(vm::psv::ptr<const SceNpId> player, vm::psv::ptr<u8> playerIsBlocked)
s32 sceNpBasicCheckIfPlayerIsBlocked(vm::ptr<const SceNpId> player, vm::ptr<u8> playerIsBlocked)
{
throw __FUNCTION__;
}
s32 sceNpBasicSetInGamePresence(vm::psv::ptr<const SceNpBasicInGamePresence> presence)
s32 sceNpBasicSetInGamePresence(vm::ptr<const SceNpBasicInGamePresence> presence)
{
throw __FUNCTION__;
}
@ -188,22 +74,22 @@ s32 sceNpBasicUnsetInGamePresence()
throw __FUNCTION__;
}
s32 sceNpBasicSendInGameDataMessage(vm::psv::ptr<const SceNpId> to, vm::psv::ptr<const SceNpBasicInGameDataMessage> message)
s32 sceNpBasicSendInGameDataMessage(vm::ptr<const SceNpId> to, vm::ptr<const SceNpBasicInGameDataMessage> message)
{
throw __FUNCTION__;
}
s32 sceNpBasicRecordPlaySessionLog(vm::psv::ptr<const SceNpId> withWhom, vm::psv::ptr<const SceNpBasicPlaySessionLogDescription> description)
s32 sceNpBasicRecordPlaySessionLog(vm::ptr<const SceNpId> withWhom, vm::ptr<const SceNpBasicPlaySessionLogDescription> description)
{
throw __FUNCTION__;
}
s32 sceNpBasicGetPlaySessionLogSize(SceNpBasicPlaySessionLogType type, vm::psv::ptr<u32> size)
s32 sceNpBasicGetPlaySessionLogSize(SceNpBasicPlaySessionLogType type, vm::ptr<u32> size)
{
throw __FUNCTION__;
}
s32 sceNpBasicGetPlaySessionLog(SceNpBasicPlaySessionLogType type, u32 index, vm::psv::ptr<SceNpBasicPlaySessionLog> log)
s32 sceNpBasicGetPlaySessionLog(SceNpBasicPlaySessionLogType type, u32 index, vm::ptr<SceNpBasicPlaySessionLog> log)
{
throw __FUNCTION__;
}
@ -215,6 +101,7 @@ psv_log_base sceNpBasic("SceNpBasic", []()
sceNpBasic.on_load = nullptr;
sceNpBasic.on_unload = nullptr;
sceNpBasic.on_stop = nullptr;
sceNpBasic.on_error = nullptr;
REG_FUNC(0xEFB91A99, sceNpBasicInit);
REG_FUNC(0x389BCB3B, sceNpBasicTerm);