07-14-2014, 11:08 AM
You try to ask @unknown or other dev.
Anyway you must fix savestate so that @hrydgard would merge to your code.
Anyway you must fix savestate so that @hrydgard would merge to your code.
(07-14-2014, 02:33 AM)AdamN Wrote:(07-13-2014, 10:39 PM)sum2012 Wrote: @AdamN callback exampleIn the code:
https://github.com/hrydgard/ppsspp/blob/....cpp#L1434
Is this mean that setRingAddr will be called everytime the callback completely executed?Code:PostPutAction *action = (PostPutAction *)__KernelCreateAction(actionPostPut); action->setRingAddr(ringbufferAddr); // TODO: Should call this multiple times until we get numPackets. // Normally this would be if it did not read enough, but also if available > packets. // Should ultimately return the TOTAL number of returned packets. u32 packetsThisRound = std::min(numPackets, (u32)ringbuffer->packets); u32 args[3] = {(u32)ringbuffer->data, packetsThisRound, (u32)ringbuffer->callback_args}; __KernelDirectMipsCall(ringbuffer->callback_addr, action, args, 3, false);
Because currently i'm using __KernelDirectMipsCall without action and __KernelDirectMipsCall returning even before the MIPS code being executed which cause an issue if another __KernelDirectMipsCall to the same callback address came in at the time the previous MIPS code is still executed.
And my current workaround is by using sleep_ms to make sure the MIPS is executed before calling another __KernelDirectMipsCall which isn't good since different code may need different time to executed and i still don't know whether the MIPS call is really done (ie. fully executed) or not with sleep_ms.
I want to be a crash fixer
PM me if you want to me look a game
PM me if you want to me look a game

