26 Commits

Author SHA1 Message Date
PabloMK7
bef642c04f Add volume slider override 2024-02-06 23:53:28 +01:00
TuxSH
6a2e1d4aa3 Patch legacy k11 to allow exception dispatching 2023-09-16 19:45:06 +02:00
TuxSH
c0e0f02443 Fix a LGY K11 bug where user TLS was not accessible to user mode 2023-09-14 00:28:37 +02:00
TuxSH
41edcde5c0 Add enable_dsi_external_filter and allow_updown_leftright_dsi 2023-07-17 01:11:43 +02:00
TuxSH
cf3cf12414 Add mechanism to patch TwlBg on the fly 2023-07-15 20:05:48 +02:00
PabloMK7
c055fb6f5e
Merge 3GX plugin loader fork (#1916)
This commit adds all the changes made to the 3GX plugin loader fork of Luma3DS. The most important features are:

- Add 3GX plugin loader support. New service added to rosalina: plg:ldr
- Add svcControlProcess, svcControlMemoryUnsafe and improve svcMapProcessMemoryEx (breaking change)
- Allow applications to override certain configurations depending on their needs:
    - Disable core2 thread redirection
    - Disable game patching for the next app
    - Force New 3DS speedup
    - Force next application in a specific memory mode
    - Block the opening of the Rosalina menu
- Add GDB commands to list all process handles and catch all SVC (latter is for IDA Pro as gdb client supports it)
- Other changes necessary for plugins to work properly. Please check changed files in this PR for more details. 

---------

Co-authored-by: PabloMK7 <hackyglitch@gmail.com>
Co-authored-by: Nanquitas <nath.doidi@gmail.com>
Co-authored-by: TuxSH <1922548+TuxSH@users.noreply.github.com>
2023-07-14 20:08:07 +02:00
TuxSH
97418ca9a1 Properly support arbitrarily-sized and uncompressed TwlBg/AgbBg
As we forgot to patch LGY k11, we were limited by the current size of the KIP.
That is not the case anymore and LGY k11 does support uncompressed KIPs.
2023-07-11 00:33:32 +02:00
PabloMK7
06c3215546 Add svcGetSystemInfo option to get booted firm path 2023-07-07 14:13:24 +02:00
TuxSH
777b43b285 rosalina: allow setting top and bot screen filters separately 2023-01-31 00:32:16 +00:00
TuxSH
8dd40158ca Add config persistence for new screen filters stuff 2023-01-21 18:28:53 +00:00
TuxSH
fe4bb0857b Implement autobooting into homebrew (3DS and DSi modes)
Add config option to autoboot into 3DS and DSi homebrew menu, without
going through Home Menu (nor launching it).

For 3DS homebrew, this requires homebrew built with libctru v2.0.0 or
later (v2.0.0 was released 2.5y ago).

We simulate a "reboot into title" to achieve this. This being said, when
launching stuff like Pokemon US/UM on O3DS, Home Menu reboots into
itself and not the game directly. This will cause Home Menu to crash if
you use this feature and configure it to use a non-default memory layout
(but if you don't, Home Menu will work just fine).
2023-01-03 15:30:07 +01:00
TuxSH
fcd08d6614 Patch kernel11 to remove checks on core2/3 thread creation
This stubs checks in SvcCreateThread and SvcSetProcessIdealProcessor
that applied when creating threads on core2 and core3. This allows
non-sysmodules to create threads on core3.

Please note, core2 access was already being automatically granted to
3dsx apps for a long time (this is controlled through a kernel flag),
and other apps that needed it had that flag too.
This commit thus changes nothing for all these applications.

Do not create threads on core3 unless you know exactly what you're doing.
On N3DS, gsp (GPU sysmodule) depends on qtm (head-tracking sysmodule) which
runs many threads at very high priority on core3. Running code that needs the
GPU (including printf) on core3 can thus result in thread starvation /
deadlock.

If you just need an extra application core, just use core2 as it is intended
for that exact purpose and is by default completely idle.

Closes #1668
2022-12-17 23:47:19 +01:00
TuxSH
676bbf0d88 Moved config file to INI, and more
- Add support for saving screen filters color temperature and NTP timezone offset (you still need to go to misc->save config)
- some advanced options moved to "in ini file only"; "patch games" is now enabled by default
- ntp: fix support for UTC+12 to +14
- remove deprecated custom svc 0x2e
2022-03-28 20:30:02 +01:00
TuxSH
704e08dc23 revert the memory map to the old one (mostly) 2020-05-18 22:15:34 +01:00
TuxSH
905837468c fix module loading 2020-05-18 21:05:36 +01:00
TuxSH
19d95782e1 kext: fix outer memory cacheability on newer versions 2020-05-18 20:48:54 +01:00
TuxSH
adda19ecb2 so bascially rosalina's image...
was in BASE (hardcoded by kernel) while its heaps were in SYSTEM. Fix this; also put the kext where BASE was.
2020-05-18 01:15:44 +01:00
TuxSH
cd68b66c03 change kext base address to 0x70000000 2020-04-28 02:39:57 +01:00
TuxSH
31891efbca Current year is 2020 2020-04-25 13:42:10 +01:00
TuxSH
58f3edda12 ARM => Arm 2020-04-25 13:17:23 +01:00
luigoalma
76dbdf45cf
Properly create BLX instruction
Rethinked and revised this function.
This previous one worked by "accident".
More a sheer luck of offsets on current firmware (as of writing)
But now, this is more mathematically correct way of creating a
THUMB -> ARM BLX instruction.
Also setting the new op in a set of 2 u16,
because patching code is in thumb.
2019-06-29 15:22:33 +01:00
Aurora Wright
4f699ccb81 Fix external firm booting with old firms, minor style changes 2019-04-06 21:32:06 +07:00
TuxSH
244409fc98 Change k11 mapping logic again 2019-03-15 23:03:24 +01:00
TuxSH
35ad240018 Rewrite k11ext mmu mapping func + linker script 2019-03-15 23:03:23 +01:00
TuxSH
d28e961adc Use <string.h> & <3ds/exheader.h>, fix some bugs, etc.
also fix all warnings and use -Werror
2019-03-15 23:03:23 +01:00
TuxSH
52cd950ca6 source => arm9/source 2019-03-15 23:03:20 +01:00