Commit Graph

4450 Commits

Author SHA1 Message Date
James Benton
f94acd4bd8 coreinit: Fix wrong argument type in OSCompareAndSwapAtomicEx64.
Would result in wrong endian value being stored in old!
2017-04-10 23:21:47 +01:00
James Benton
4fe97412e8 coreinit: Add 32 bit atomic exports.
Dunno if casting to a volatile std::atomic pointer is a good idea, but YOLO.
2017-04-10 23:21:16 +01:00
James Benton
177287820a coreinit: Process IPC driver callbacks on an IPC driver thread. 2017-04-07 01:18:46 +01:00
James Benton
c42bde8363 mcp: Implement some title list related functions. 2017-04-06 23:20:29 +01:00
James Benton
6f5b940810 Add support for enum flags. 2017-04-06 23:19:44 +01:00
James Benton
030a7d0e58 kernel: Add a DebugOutDevice which can be used for logging IOS commands. 2017-04-05 21:23:46 +01:00
James Benton
c2413fee89 sysapp: Allocate MCPSysProdSettings on stack for use in MCP_GetSysProdSettings. 2017-04-05 21:21:21 +01:00
James Benton
a012372a99 kernel: Fix loadAppXML function definition 2017-04-05 19:21:31 +01:00
James Benton
9d45073d4e coreinit: Fixup some headers. 2017-04-05 18:41:45 +01:00
James Benton
9b575fd7cb kernel: Make the XML loader functions public.
Will be used by MCP one day.
2017-04-05 18:41:29 +01:00
James Benton
f609bf41fa nsyskbd: Add nsyskbd module.
Stub out the KPR and SKBD functions which swkbd.rpl imports.
2017-04-05 18:40:49 +01:00
James Benton
499c072140 coreinit: Implement OSCopy{To,From}Clipboard. 2017-04-05 14:58:42 +01:00
James Benton
3e74588873 coreinit: Try load shared data fonts from mlc title 0005001B-10042400. 2017-04-05 14:57:25 +01:00
James Benton
70c743fa0e snd_core: Implement AXGetRendererFreq. 2017-04-05 11:48:35 +01:00
James Benton
1129e6d428 swkbd: Define and use character type swkbd_char_t. 2017-04-05 11:33:55 +01:00
James Benton
d323779da2 Fix Linux compile. 2017-04-05 01:28:42 +01:00
James Benton
4c29a042e8 kernel: Implement MCPDevice ioctl command MCPCommand::GetTitleId. 2017-04-05 01:18:19 +01:00
James Benton
5e9897af60 coreinit: Implement MCP_GetTitleId. 2017-04-05 01:17:49 +01:00
James Benton
f31a31cf38 coreinit: Implement MCP_GetOwnTitleInfo. 2017-04-05 01:04:07 +01:00
James Benton
597c85cefb snd_core: Stub some missing AX functions required by erreula.rpl 2017-04-05 00:36:22 +01:00
James Benton
a6a0e9dce1 coreinit: Implement OSSwitchFiber{Ex}. 2017-04-05 00:36:05 +01:00
James Benton
a24ef54811 coreinit: Implement OSDynLoad_IsModuleLoaded. 2017-04-05 00:35:46 +01:00
James Benton
cb1f436b91 coreinit: Implement OSGetUserStackPointer. 2017-04-04 23:37:42 +01:00
James Benton
e4c8f989f6 kernel: Add support for LLE of system modules.
Looks for system libraries in mlc/sys/title/00050010/1000400A/code/*.rpl
Will only load modules in config.system.lle_modules list.
2017-04-04 23:37:22 +01:00
James Benton
99ced19d38 coreinit: Add definition for IPCBufPool::MagicHeader 2017-04-04 23:27:36 +01:00
James Benton
7b63732f83 decaf-sdl: Fix type cast warning from double to float. 2017-04-04 22:52:01 +01:00
James Benton
7cf0e729d6 kernel: Add MCPDevice and port coreinit::MCP_* to use new device. 2017-04-04 22:41:50 +01:00
Andrew Church
2319031c95 binrec: Fix crash with CHAIN enabled. 2017-04-05 06:25:08 +09:00
Andrew Church
62020bb36c Only enable the glbinding command callback when debugging.
Enabling the callback introduces significant overhead; I've observed
slowdown of up to 35% in GPU-bound code, with the GPU thread spending
over 15% of its time just in malloc() and free() calls from glbinding.
2017-04-05 05:51:06 +09:00
Andrew Church
445c180972 Fix typo in libbinrec optimization flag name for --jit-opt-level=1. 2017-04-05 04:10:35 +09:00
James
d5cc8b16cd Merge pull request #413 from achurch/binrec-new-flags
jit: Support new libbinrec optimization flags.
2017-04-04 19:22:13 +01:00
Andrew Church
4375b1e6fd opengl: Copy occlusion query results asynchronously. 2017-04-05 03:01:13 +09:00
Andrew Church
14232b4bdb opengl: Don't read the streamout query unless/until its value is needed.
Also spin-wait on the query instead of blocking with glGetQueryObject
because some drivers (at least NVIDIA Linux 3xx-series drivers) are slow
to unblock when the query is completed.
2017-04-05 03:01:13 +09:00
Andrew Church
8e6d20f211 opengl: Don't retire command buffers until they finish executing. 2017-04-05 03:01:13 +09:00
Andrew Church
986f8443a2 Revert "Implement synchronization of the guest and host GPUs."
This reverts commits 51bc8a581b,
ed3b697b22, and most of
77ebab6ff9.

These commits have a significant (~50%) negative impact on performance.
2017-04-05 03:01:13 +09:00
Andrew Church
70d8e3c6e9 jit: Support new libbinrec optimization flags. 2017-04-05 02:28:43 +09:00
James Benton
89fcf81e35 gx2: Switch meaning of UserMemory flag to Gx2rAllocated.
Also fix a few other minor issues with GX2R functions.

Closes #412
2017-04-04 17:07:19 +01:00
James Benton
ad65e95f47 gx2: Stub GX2RSetBufferName. 2017-04-04 17:02:10 +01:00
James Benton
8f2e851626 coreinit: Stub OSGetArgcArgv. 2017-04-04 17:01:19 +01:00
James Benton
3e6a51e14a coreinit: Fix FSShutdown.
Actually does nothing, lolz.
2017-04-04 17:01:04 +01:00
James
00cf54bd6e Merge pull request #406 from achurch/audio-crash-fix
decaf-sdl: Fix crash when the system changes the audio frame size.
2017-04-04 13:12:08 +01:00
Andrew Church
3d78c1f9e7 jit: Inline code block lookups in the execution loop. 2017-04-04 20:47:26 +09:00
James Benton
9b26b69c9a Add breakpoint support to JIT. 2017-04-03 22:58:49 +01:00
James Benton
4c2049bf47 New JIT implementation using libbinrec. 2017-04-01 17:04:30 +01:00
James Benton
abbd4c7feb decaf: Change old internal_ kernel functions to RegisterInternalFuntion. 2017-04-01 16:40:44 +01:00
Andrew Church
e9d1aed1f1 decaf-sdl: Fix crash when the system changes the audio frame size.
If the actual output frame size is different from the requested size,
the audio callback would overrun the read buffer and crash with an
assertion failure.  Regression introduced in 2625308, which made the
frame size not be a power of two (Linux requires a power-of-two size).

Also sanity-check the other audio parameters returned by SDL_OpenAudio.
2017-03-29 19:36:24 +09:00
James Benton
1d29ab1092 pm4_capture: Add support for capturing a single frame. 2017-03-28 00:53:11 +01:00
James Benton
4a11c6624d pm4_capture: Fix bug where last frame would not be captured correctly. 2017-03-28 00:50:06 +01:00
James Benton
a1881fa48e kernel: Read cos.xml for permission to mount sdcard.
/dev/sdcard01 will now only be mounted if the game has permission to access
the sdcard. This is required because some awful code in One Piece misuses
coreinit::FSGetMountSource, which I'm going to assume only works on the
console because they do not have permission to access SD card.
2017-03-27 23:19:12 +01:00
James Benton
b57fe1a103 coreinit: Implement OSGetSecurityLevel. 2017-03-27 23:19:12 +01:00