94 Commits

Author SHA1 Message Date
root
5a9f0df101 增加处理autorun的代码 2024-07-03 09:38:47 +08:00
PabloMK7
36df6d6a98 Bump version number 2024-02-07 01:07:37 +01:00
PabloMK7
bef642c04f Add volume slider override 2024-02-06 23:53:28 +01:00
Jade Herd
8cc294b3cb config: Boot chainloader menu option 2024-02-05 23:10:24 +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
035c50c625 Fix support for all older versions
- Move emuNAND hook to ITCM, fixing previously untested emuNAND support
  for 5.0 (and possibly more versions). This was a very long-standing
  bug
- Fix booting on versions 4.x to 8.x, and restore full support for 5.x
  to 8.x. All Arm11 custom sysmodules and k11ext have been disabled on
  4.x because the Luma3DS v13.0 changes couldn't be ported (this means
  no Rosalina and no region-free and such, and while I could restore
  some of the functionality, you should just update *after* installing
  Luma, like you've been instructed to)
2023-08-12 18:00:08 +02:00
PabloMK7
0f09900a2a Fix luma config softlock (#1931) 2023-07-25 20:42:18 +02:00
lifehackerhansol
3ecce3fc3e Don't copy to CTRNAND if building for exploit mode
While the copy to NAND process is generally a good idea for end users,
this can quickly get annoying for actual developers looking to test
low level stuff or contribute to Luma3DS if a testing FIRM gets sent to
the NAND.
2023-07-24 15:52:37 +02:00
TuxSH
f40a1cc47b Fix external module loading for firm modules such as TwlBg
Closes #1919 and #1921
2023-07-21 11:30:55 +02:00
TuxSH
11be450894 Use different error for /luma folder creation failure 2023-07-20 19:11:24 +02:00
PabloMK7
497e1904d5 Add an option to save an exit in the config menu. 2023-07-17 18:35:57 +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
b20c79eda4 Revert some recent change wrt. remounting due to driver issues 2023-07-14 19:23:49 +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
TuxSH
5b417189db Remove "Use EmuNAND FIRM with R" option
This is a leftover from the Gateway era that has long lost its utility
and that unnecessarily complicated the code base.

Please just load an external FIRM from SD card if you need something
similar.

Also refactor the multi-EmuNAND code and CTRNAND mounting code.
2023-07-09 00:28:17 +02:00
PabloMK7
06c3215546 Add svcGetSystemInfo option to get booted firm path 2023-07-07 14:13:24 +02:00
TuxSH
82d689b485 Fix build issues
Closes #1894
2023-06-16 21:28:08 +02:00
TuxSH
631dddeff8 Fix config text wrapping for hb autoboot 2023-03-28 22:24:07 +02:00
TuxSH
64eda63132 Update singleOptionsText 2023-03-28 19:53:11 +02:00
TuxSH
3e6399490c Hide "force audio output" option 2023-03-28 00:40:30 +02:00
TuxSH
4025f252c7 boot menu: clarify autoboot hb is meant to launch hbmenu 2023-03-27 23:44:18 +02:00
TuxSH
dc7edbd44f Fix handling negative screen filters values 2023-03-27 21:35:51 +02:00
TuxSH
ef1072f996 Add option to force audio routing to speakers, closes #1837
Also refactor ini file a little bit
2023-02-10 01:02:01 +00:00
TuxSH
1888e17b22 Add ability to force routing audio to headphones...
... even when HPs aren't inserted.

This is aimed at people using Bluetooth audio hw mods.

There are some software limitations, please read the INI/option
description.

Closes #1828.
2023-02-08 00:52:57 +00:00
TuxSH
5a5332a212 Do not always reboot to HM when autobooting HB
Also fix CRC calculation
2023-02-05 22:08:15 +00:00
TuxSH
777b43b285 rosalina: allow setting top and bot screen filters separately 2023-01-31 00:32:16 +00:00
TuxSH
7b97af473a Add ability to redirect app core1 threads to core2
N3DS-only option. See config.ini for details and context. This should
make very demanding games (those which already use 3x clockrate and L2C
by default, like Pokémon US/UM) between 5 to 15% faster. Not widely
tested, and can potentially break some games and other apps.
2023-01-24 22:05:57 +00:00
TuxSH
8dd40158ca Add config persistence for new screen filters stuff 2023-01-21 18:28:53 +00:00
TuxSH
5cdbfab54b Add build options to Makefile
For stuff like testing PASLR, *hax2x, khc3ds, etc.

Also fix a corner-case bug when changing the 3dsx app from itself to
itself, if its TID corresponds to the default.
2023-01-07 15:38:36 +00:00
TuxSH
da0b1a1389 Revert force-setting SysNAND when launching TWL Mode
This being said, neither legacy FIRM nor DSiWare actually support
EmuNAND; installing the same TWL title on both SysNAND and EmuNAND and
then launch it from EmuNAND will work though.

It is only when exiting AGB firm that we want to boot SysNAND no matter
what, because the save file has been written on a partition in SysNAND.

This is mainly to ensure we reboot to the proper NAND in case we reboot.
2023-01-03 21:31:37 +01: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
6fa80c959d Update FatFS from R0.13c to R0.15 2022-12-23 19:25:23 +01:00
TuxSH
a7b840e531 Fix upgrade process possibly copying non-Luma firms
Upgrade process always copied sdmc:/boot.firm to nand:/boot.firm even if
Luma3DS was chainloaded from another path.

Fix this by copying from argv[0], if Luma3DS was launched from the SD
card.

Also use "sdmc:" and "nand:" instead of "0:" and "1:" when using FatFS.

Closes #1776.
2022-12-23 14:48:35 +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
PabloMK7
71cf677b00 config: Ignore rest of pressed buttons (fixes #1769) 2022-09-25 23:01:21 +01:00
TuxSH
80aee6fdc1 Fix mcu firmware version check (byte order was inverted) 2022-06-10 22:55:18 +01:00
TuxSH
2c184cf7a3 Update chainloader version number 2022-06-04 22:27:31 +01:00
TuxSH
b79717e848 ruh roh 2022-04-16 00:02:04 +01:00
TuxSH
0e16e4c5fc config init: disable patch games by default; alter system settings version string by default 2022-04-13 21:56:07 +01:00
TuxSH
32d13dc117 Add boot9/boot11 dumping 2022-04-13 21:56:02 +01:00
TuxSH
f32f3a4854 Fix config yet again 2022-04-10 01:31:56 +01:00
TuxSH
97ec1298e3 derp 2022-04-09 23:26:28 +01:00
TuxSH
2b5da40a1d arm9: util: make chrono non-static 2022-04-06 02:03:04 +01:00
TuxSH
c71474a668 Fix #1737 (screen filters CCT was OOB) 2022-03-31 01:16:02 +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
d798ff0efc Move bootconfig to mcu free regs & copy boot.firm to NAND with each upgrade 2022-03-27 21:04:23 +01:00
TuxSH
fcdb6a7ab5 Add code to backup essential files 2022-03-26 23:09:55 +00:00