1662 Commits

Author SHA1 Message Date
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
Bent
0c3f51815e Rosalina: Fix crash for external PMDBG_DebugNextApplicationByForce 2022-09-25 22:59:02 +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
3227b2ea4b Fix battery voltage calculation (thanks nocash) 2022-06-03 23:53:07 +01:00
TuxSH
e5e09c1e13 gdb: use 'swbreak' for bkpt too 2022-06-03 22:18:10 +01:00
TuxSH
4de0375bde kext: fix bug in rosalinaThreadLockPredicate (thanks @hax0kartik) 2022-05-21 20:19:36 +01:00
TuxSH
ea8f9f4667 loader: refactor part around HIO 2022-05-06 19:53:27 +01:00
TuxSH
6573fc4247 k11ext: fix wrong condition bug 2022-05-02 15:57:59 +01:00
TuxSH
65825020ab bootdiag: add process list dumping 2022-04-23 23:55:48 +02:00
TuxSH
e17ff09713 rosalina: Add define to print process creation time 2022-04-23 13:03:30 +02:00
TuxSH
b79717e848 ruh roh 2022-04-16 00:02:04 +01:00
TuxSH
c0eaf1ea3c Add option to toggle power to card slot.
Fixes #1202. This option is meant to be used when you have something like e.g. a flashcard that is misbehaving.
2022-04-15 21:41:23 +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
d957494d45 kext: even more perf improvements
Turns out the undef handler path is quite hot, as only one thread per core can have VFP enabled at a time.
2022-04-12 23:55:08 +01:00
TuxSH
1e95344588 bootdiag: forgot #else 2022-04-11 13:36:14 +01:00
TuxSH
cb398f1e4a ldr => ldrb 2022-04-11 01:06:59 +01:00
TuxSH
ef842dda2a Fix extremely obnoxious race-cond+uninit handle bug
This is mostly a libctru bug (well, sort of).

This can only happen to built-in sysmodules, and to
processes waiting for err:f, that fail to obtain
handles through svcConnectToPort first try; and only
prior to 11.0.

Prior to fw 11.0, kernel didn't zero-initialize output
handles, and thus the output handle gets filled with
junk (leaked kernel stack data) in case of failure.
Libctru does not account for this, and closes such
handles anyway (in srvInit, errfInit, and possibly
more).

The problem is that, in our case, that garbage was
equal to 0x8000, actually a valid handle, in fact
the first handle to be created (and not closed) in
a process... a handle to KAddressArbiter.

Accidentally closing this handle resulted in one or
more KIPs spin-waiting and starving core1, resulting
in an inability to boot.

We fix this simply by replicating what recent k11 does,
in kext (for svcConnectToPort). For srvGetServiceHandle,
add two layers of safety.
2022-04-10 22:19:32 +01:00
TuxSH
56be46b4bd rosalina: introduce bootdiag, tool to dump state of a process in early init 2022-04-10 21:43:19 +01:00
TuxSH
f32f3a4854 Fix config yet again 2022-04-10 01:31:56 +01:00
TuxSH
859b11a27d Fix k11ext regression 2022-04-10 00:05:36 +01:00
TuxSH
97ec1298e3 derp 2022-04-09 23:26:28 +01:00
TuxSH
188d86cb7f gdb: always pass current thread ID when stopping 2022-04-09 21:26:47 +01:00
TuxSH
01ebbf114c Restore extended-remote support & map <GDB PID>-><1 + 3DS PID> (breaking change)
Once more, the "official" gdb client is the one than is the least compliant to its very own stub specs (compared to, say, IDA)
2022-04-09 19:28:33 +01:00
TuxSH
2b5da40a1d arm9: util: make chrono non-static 2022-04-06 02:03:04 +01:00
TuxSH
c64f94bc82 kernel ext: perf improvements 2022-04-05 22:23:09 +01:00
TuxSH
3463effeae rosalina: add "time to boot to HM" in debug menu 2022-04-05 18:33:12 +01:00
TuxSH
c71474a668 Fix #1737 (screen filters CCT was OOB) 2022-03-31 01:16:02 +01:00
TuxSH
90d6420f38 Fix typo in swapFramebuffer, closes #1726 2022-03-28 21:21:41 +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
bc6e14ada7 ntp: more precise & also set system time
System time is what System Settings (only) changes; user time seems to be set periodically by HM.
2022-03-16 22:19:49 +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
26ea031f0e
Merge pull request #1623 from s5bug/master
Fix various things about the cheat system
2022-03-08 23:50:20 +00:00
TuxSH
8c3ae4a2fe Wait for B release before exiting rosalina menu
Closes #1701
2022-03-08 23:42:52 +00:00
Margen67
8cfc0bc709 Makefile: curl improvements
-f: Doesn't output a file on error.
-O: Gets filename from URL.
2022-03-07 22:22:14 +00:00
Gabe Cook
fd4d54a2cc Allow patches in the home menu 2022-03-07 22:19:43 +00:00
George-lewis
e9b8b0daef
Add ASCII View to Rosalina Process List (#1703) 2022-03-07 20:47:06 +00:00
Kookies
b83a0abb9d
Updated sysmodule Defines for latest libctru (#1669) 2021-08-27 06:46:36 +02:00
TuxSH
689de1b9f0
Merge pull request #1657 from mariohackandglitch/master
rosalina: fix temperature display
2021-07-16 17:39:20 +01:00
PabloMK7
352a59fd29
rosalina: fix temperature display
Added 3 leading spaces to the temperature display format string.
2021-07-16 18:23:50 +02:00
TuxSH
01661bb1e6
Merge pull request #1646 from mariohackandglitch/master
loader: fix fileOpen argument order
2021-06-29 00:38:51 +01:00
PabloMK7
caadb3ae5d
loader: fix fileOpen argument order 2021-06-29 01:20:38 +02:00
TuxSH
8e9a3bfc74 Fix #1638 2021-06-14 23:41:43 +01:00
TuxSH
99a2b8e3b2 Disable gcc 11 false positives 2021-04-30 19:08:50 +01:00
TuxSH
50c81f8165 loader: use fsMakePath 2021-04-30 19:01:13 +01:00