60 Commits

Author SHA1 Message Date
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
TuxSH
44c1711805 Update copyright years 2022-03-13 18:00:00 +00:00
aspargas2
ee16c0b104 fix reading emunand sector 0 2022-03-13 16:26:08 +00:00
TuxSH
18f3783f52 Revert "Fix a few MCU-related bugs, gm9 should boot properly now"
This reverts commit 36ea48b4dc4e91b94f2cab81e54a56e9da259a9e.
2021-01-26 13:42:47 +00:00
TuxSH
36ea48b4dc Fix a few MCU-related bugs, gm9 should boot properly now
- Stop spamming mcu reads... use the GPIO pin to know if there's a MCU interrupt, instead
- Wait for the MCU interrupts to be raised when powering up LCD+backlights
- Also turn off LCD+backlight when needed
2021-01-26 13:38:37 +00:00
TuxSH
b5b5db6e8c Do not initialize the screens in the very common case where the user has only one payload, etc. 2021-01-26 13:38:37 +00:00
TuxSH
168647e0f8 Indicate how to boot safe_firm from 1.x/2.x 2020-12-18 23:59:51 +00:00
TuxSH
87fa35ccfd arm9 exception handlers: add arm9 mem dumping feature 2020-11-22 00:00:12 +00:00
TuxSH
df62e1901e arm9: mark drawFormattedString as printf-like function 2020-11-21 21:45:36 +00:00
TuxSH
555286ea47 Separate exception dump parser in another repo, add boot.3dsx to release command
https://github.com/LumaTeam/luma3ds_exception_dump_parser
2020-07-09 19:52:55 +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
daaeb97834 Don't do firmlaunch patches on safe_firm (because of USM) 2020-05-03 01:53:35 +01:00
TuxSH
166bdbeb7d Add option to run rosalina on N3DS SAFE_FIRM.
Also enables a qtm error bypass
2020-05-02 23:32:21 +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
TuxSH
67e28b2a82 arm9: check for combos again after the PIN has been entered/splash has been displayed 2020-04-17 01:01:35 +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
TuxSH
2cf04e8a83 Make Luma arm9 code properly write date when touching files 2019-06-03 23:15:30 +02:00
TuxSH
3e724e88a8 Fix crash dumps not saving properly 2019-04-19 10:01:00 +02:00
TuxSH
5f295c4227 increase i2c timeout 2019-04-07 16:13:14 +02:00
Aurora Wright
4f699ccb81 Fix external firm booting with old firms, minor style changes 2019-04-06 21:32:06 +07:00
TuxSH
70757e564d refactor latest commit 2019-04-05 00:55:13 +02:00
TuxSH
af822e5af5 Fix n3ds IPS screen issues/regression, closes #1236 2019-04-05 00:04:38 +02:00
TuxSH
8b51141f54 Fix latest commit 2019-03-15 23:03:25 +01:00
TuxSH
0195ab34e9 Fix itcm sections overwriting argv 2019-03-15 23:03:25 +01:00