Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Fix dynarec crashes on 3DS
|
|
This reverts commit dfcd7153048c2f6d479dfcd328ee2c0e1e0784ed.
|
|
After the dynarec writes new instructions, it has to flush the
instruction and data caches. Some of these flush operations are
privileged on the 3DS, so the clear cache functions have to run
through svcBackdoor. The Nintendo implementation (and CFW
reimplementation) of svcBackdoor has a problem where interrupts and
context switches will cause crashes.
Even though we can disable interrupts in the flush function, there's
still a window of time between svcBackdoor being called and the
function being run where an interrupt will corrupt the stack.
Luma3DS implemements a svcCustomBackdoor call we can use that also
runs a function in supervisor mode, but uses an implementation that
avoids this problem.
|
|
|
|
svcCreateThread doesn't fully set up thread vars, which causes
svcBreaks / crashes when calling certain functions -- reentrant ones,
for example. threadCreate, etc. are higher-level functions that do all
the correct setup and cleanup.
Since we're treating the thread structure as opaque, calling it an
int_32t seems OK.
|
|
When creating a thread, pcsx was scheduling threads on core 1, which
is the system core. This is usually prevented by the system. Instead,
it should schedule threads on the default core, as suggested by
3dbrew: https://www.3dbrew.org/wiki/Multi-threading
> Games usually create threads using -2.
In the future, we may be able to schedule threads on core 2 on New 3DS
only, if we find it gives better performance.
This was preventing the CDDA thread from starting, which was
preventing CD Audio from playing.
|
|
|
|
the frontend instead.
- dynamically allocate the recompiler cache, this will allow using the
recompiler even when the .bss section is relocated far from the .text
section (for example when using the hombrew loader).
|
|
|
|
needed svc access.
|
|
|
|
|
|
|
|
|
|
|