Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ID manager refactoring #1172

Merged
merged 29 commits into from Aug 24, 2015
Merged

ID manager refactoring #1172

merged 29 commits into from Aug 24, 2015

Conversation

Nekotekina
Copy link
Member

New functionality added ("fixed ID"). Allows to avoid some global variables.
Some functions also added which should have been in my previous PR.

@tambry
Copy link
Contributor

tambry commented Aug 12, 2015

@Nekotekina Could you look into implementing support for structs in callbacks? Since cellSail callbacks are required to pass a struct that contains the info about why the callback was called, etc. Passing a pointer or reference doesn't work.

@Nekotekina
Copy link
Member Author

C++ doesn't support reflection so you can't do much about such structs passed by value. Fortunately, it's rare. The only option is to decompose them manually according to their fields' displacement in GPRs, FPRs, VPRs registers and the stack. Here is a partial solution to cover CellSailEvent specific case:

union CellSailEvent
{
    be_t<u64> value;

    struct _data_t
    {
        be_t<u32> major;
        be_t<u32> minor;
    };
};

template<typename T, bool is_enum> struct cast_ppu_gpr;

template<> struct cast_ppu_gpr<CellSailEvent, false>
{
    force_inline static u64 to_gpr(const CellSailEvent& event)
    {
        return event.value;
    }
};

@danilaml
Copy link
Contributor

@Nekotekina are you still having trouble with irc? Have you tried something like https://kiwiirc.com/? It should work.

@tambry
Copy link
Contributor

tambry commented Aug 12, 2015

@Nekotekina Thank you very much, it works great.

@Nekotekina Nekotekina force-pushed the master branch 8 times, most recently from da9ac7f to b87e4d5 Compare August 14, 2015 21:30
@tambry
Copy link
Contributor

tambry commented Aug 15, 2015

@Nekotekina Not sure about other commands, but it would seem that socket() in libnet is broken on your branch compared to latest master. Couple games that use it are: Terraria and Puzzle Quest. My guess is, that Nekotekina@b1c5ff5 somehow broke it, but I'm not sure.

@Nekotekina
Copy link
Member Author

I didn't finish TLS allocator for sys_net and some other things yet.

Fixed UB in get_current_id()
ID manager refactoring, redundant "type" information removed
Since it's vector union type
Used ARMv7Thread instead of ARMv7Context in PSV HLE functions and
callbacks. However, interpreter still uses ARMv7Context.
Various PSV functions partially implemented:
sceKernelCreateEventFlag
sceKernelDeleteEventFlag
sceKernelOpenEventFlag
sceKernelCloseEventFlag
sceKernelWaitEventFlag
sceKernelWaitEventFlagCB
sceKernelPollEventFlag
sceKernelSetEventFlag
sceKernelClearEventFlag
sceKernelCancelEventFlag
sceKernelGetEventFlagInfo
sceKernelCreateSema
sceKernelDeleteSema
sceKernelCreateMutex
sceKernelDeleteMutex
sceKernelCreateCond
sceKernelDeleteCond
VFS::DeleteAll, VFS::GetDirSize, VFS::Exists, VFS::Rename
(VFS::RenameFile, VFS::RenameDir removed)
id_traits for file/dir descriptors
idm::get_current_id() removed, thread-local last ID
Method ptr for vm::ptr (renamed "of")
Method ref for vm::ptr (returns vm::ref)
Operator & for vm::ref (returns vm::ptr)
thread_t renamed to named_thread_t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants