Commit Graph

394 Commits

Author SHA1 Message Date
TuxSH
68b670f94f
Merge branch 'master' into toggle-power-button 2020-04-17 00:36:07 +02:00
TuxSH
5a83a46423
Merge pull request #1349 from leoetlino/bps
loader: Add support for BPS patches
2020-04-16 23:35:14 +02:00
TuxSH
8785fd0236 Use -Os for rosalina, pm, sm. Decrease gdb buffer sizes, etc. 2020-04-16 21:05:33 +01:00
TuxSH
a67e8e60c6 rosalina: screen_filter: save up around 10K using this simple trick 2020-04-16 19:50:18 +01:00
TuxSH
c7551a731c rosalina: revert errdisp ipc handling 2020-04-16 00:16:25 +01:00
TuxSH
d9c5437902 rosalina: revert menu thread stack size now that screen filters LUT is in .bss 2020-04-15 23:15:14 +01:00
TuxSH
55d51217d8 Fix hex parsing in patcher.c (langemu). Fixes #1375
Thanks @Lizardon1
2020-04-15 22:28:38 +01:00
Léo Lam
8233d4e226 loader: Add support for BPS patches
The BPS format allows distributing patches that are smaller and that do
not contain copyrighted content if data is relocated
(unlike non-trivial IPS patches).

This is essential for games such as Majora's Mask 3D that have three
barely different code revisions. Supporting all three versions would
demand an unreasonable amount of work; with BPS patches only one
version has to be supported.

The patcher is written in C++ in order to make it possible to share the
implementation with Citra and because a C version would be a lot more
ugly and tedious to write. The patcher is non-intrusive for the rest of
the codebase and self-contained so hopefully that isn't an issue.

This adds roughly ~0x500 bytes of code to the loader sysmodule.
Code looks reasonably optimised (in IDA). Tested and works on an o3DS.
2019-12-21 18:32:18 +01:00
Léo Lam
ca49956219 loader: Compile C++ code with -std=gnu++17 2019-12-21 17:49:58 +01:00
PabloMK7
5edfbfc1f7
Fix stack overflow on screen filters 2019-12-17 15:00:37 +01:00
TuxSH
dfd50d9d75
Merge pull request #1298 from LiquidFenrir/force-wifi
add wifi connection forcing to rosalina
2019-11-05 00:15:41 +00:00
TuxSH
1946941340
Merge pull request #1306 from lioncash/null
rosalina/gdb/server: Prevent potential null dereference case
2019-11-05 00:15:07 +00:00
TuxSH
31dae90dcd
Merge pull request #1307 from lioncash/null2
sm/notifications: Prevent potential null pointer dereference in ReceiveNotification
2019-11-05 00:14:49 +00:00
TuxSH
da8df54649
Merge pull request #1308 from lioncash/uninit
rosalina/errdisp: Correct uninitialized variable usage in ERRF_HandleCommands
2019-11-05 00:14:28 +00:00
TuxSH
0e1415299a
Merge pull request #1332 from Oreo639/errdisp
rosilina: save errdisp info before doing anything else
2019-11-05 00:14:07 +00:00
oreo639
0886b10619 rosilina: save errdisp info before doing anything else 2019-10-23 12:12:08 -07:00
nathan hitch
e8493d18c5 Add ability to offset ntp by any amount of minutes 2019-09-16 17:13:23 +09:30
Lioncash
60a8bf56c6 rosalina/errdisp: Correct uninitialized variable usage in ERRF_HandleCommands
This was previously using the value of the uninitialized sz variable
before it was actually assigned a value, rather than assigning the size
indicated within the command buffer.
2019-08-13 03:11:47 -04:00
Lioncash
c95b59c72e sm/notifications: Prevent potential null pointer dereference in ReceiveNotification
Based off the conditions, this is a potential null pointer dereference
that can occur. We need to check for null before accessing
nbPendingNotifications.

This is unlikely to occur in common usage, however it's a fairly
straightforward amendment.
2019-08-13 03:04:03 -04:00
Lioncash
7e14c83bdd rosalina/gdb/server: Prevent potential null dereference case
While unlikely to commonly occur, this is a trivially avoidable case.
2019-08-13 02:54:12 -04:00
TuxSH
a2e46919c1
Merge pull request #1305 from piepie62/master
Fix off-by-one error with extra cheat page
2019-08-12 21:11:21 +02:00
piepie62
a4befc29c8 Fix off-by-one error with extra cheat page 2019-08-12 00:58:16 -04:00
LiquidFenrir
93e87284aa follow changes in ctrulib PR 2019-07-23 00:13:17 +02:00
LiquidFenrir
236dbb043c add wifi connection forcing to rosalina
breaks regular auto connect until reboot
allows connecting to a wifi without internet (for example, for transferring stuff with 3dslink or ftpd/3DShell)
2019-07-21 19:05:37 +02:00
Léo Lam
c3b97999f5 loader: Fix boolean logic error 2019-07-07 15:06:15 +02:00
PabloMK7
f1b787c7d9
Merge pull request #3 from AuroraWright/master
Merge 10.0.1
2019-07-06 09:37:41 +02:00
selabnayr
3061001fb1 Switch to updating all 4 bytes of the IRQ mask, on the suggestion of profi200. 2019-07-05 15:37:54 -07:00
selabnayr
0bc51d5c34 Add an entry to the System Configuration menu to toggle disabling a short press of the power button triggering a software closure. 2019-07-05 15:04:38 -07:00
TuxSH
c913de1e67 Fix layeredfs, fix #1280 #1275 #1262 & others 2019-07-03 22:19:38 +02:00
TuxSH
c9a578734e Fix N3DS applications not closing properly (fix #1271, #1270, etc.) 2019-06-30 22:59:44 +02:00
TuxSH
37544a0eb9 Fix process list 2019-06-30 13:54:41 +02:00
PabloMK7
9705083b65 Fix conflicting files 2019-06-29 23:34:45 +02:00
TuxSH
3ad314a5ac Fix ntp menu (if user pressed A multiple times) 2019-06-29 17:05:43 +02:00
TuxSH
58a6a25eb3 ntp: also zero field 0x30001 2019-06-29 16:53:31 +02:00
PabloMK7
8168d2c2f9 Manually merge files 2019-06-29 16:26:03 +02:00
TuxSH
d4e1da0174 Update Rosalina credits 2019-06-29 12:21:25 +02:00
TuxSH
fde3b70d03 Fix info os cfwversion/memory by adding null terminator to xml files (thanks @fincs) 2019-06-28 23:44:09 +02:00
TuxSH
8c03702c7d pm: fix uninitialized variable bug (thanks @fincs !) 2019-06-28 20:43:06 +02:00
piepie62
10e823a9d5 Use bitflags 2019-06-24 15:42:32 -04:00
TuxSH
f4851cd533 fixed inverted condition in hio.c 2019-06-18 23:58:47 +02:00
TuxSH
39287d43e3 Fix null deref when connecting to port 4003 but force debug next app hasn't been selected 2019-06-18 00:02:32 +02:00
TuxSH
e989309771 Fix "disable debugger" finally 2019-06-16 22:06:05 +02:00
TuxSH
d989c45c3d Failed attempt w/ next app 2019-06-14 01:32:50 +02:00
TuxSH
84c5cf0661 Failed attempt at fixing disable debugger when 1+ sessions are open 2019-06-14 00:40:41 +02:00
Chromaryu
648541bb1f Add NTP_IP dynamic changes via -D or #define (#1261)
* Add define option on Makefile to change NTP_IP dynamically

* Remove Makefile -D option
2019-06-03 23:24:21 +02:00
TuxSH
af10782500 Merge branch 'ntp' 2019-06-03 00:58:37 +02:00
TuxSH
fe0e5ae83d Fix #1259 2019-06-03 00:58:07 +02:00
TuxSH
8e4af5c823 Add ntp client & rtc sync 2019-06-03 00:54:20 +02:00
Chris Feger
570a8d5222 CTRPF-AR Codes (#1259)
* Add most extended CTRPF codes

* Fix some stuff

* FIx a couple more things

* Make the loop break actually work

* Make break work properyly v2

* Clean up a bit

* Get rid of redundant assignment

* Fix off-by-one error

* Fix possible out-of-bounds

* Switch to statically allocated cheat page

* Style changes.
Awaiting further input for the last couple

* Use more booleans
2019-06-03 00:50:27 +02:00
TuxSH
2c8a1eb5c6 gdb hio: lseek returns 64-bit 2019-05-04 17:08:32 +02:00
TuxSH
23c40aeb8e gdb hio: add type l 2019-05-04 16:30:34 +02:00
TuxSH
c7c832a0dd Relicense gdbstub (with permission of contributors) 2019-05-03 21:06:10 +02:00
TuxSH
6423d0c1b3 gdb: fix hang when "debug next application" is used more than once 2019-05-01 19:37:46 +02:00
TuxSH
8b56098d64 Fix TIO encoding bug 2019-04-28 15:04:42 +02:00
TuxSH
2927bd5aa3 gdb: double packet size 2019-04-28 02:15:46 +02:00
TuxSH
d357db25f2 gdb TIO: fix mode and flags being swapped 2019-04-28 02:06:31 +02:00
TuxSH
9b3cc5391b tio fixes 2019-04-27 23:23:36 +02:00
TuxSH
54eeb97b24 Add GDB target IO support (called Host I/O by gdb), not working yet 2019-04-27 16:50:47 +02:00
piepie62
58ff96dc83 Merge origin into this branch 2019-04-23 08:24:50 -07:00
TuxSH
a5803d1b62
Merge pull request #1245 from piepie62/IFile-Fix
IFile: Fix reading past the end of file
2019-04-23 11:29:54 +02:00
TuxSH
eddb0988a0
Merge pull request #1243 from piepie62/master
Improve cheat execution parameters and handle CRLF properly
2019-04-23 11:29:04 +02:00
TuxSH
5d3585a33d fix gdb control C regression 2019-04-21 18:00:29 +02:00
TuxSH
4285736286 fix layeredfs regression 2019-04-21 12:15:50 +02:00
piepie62
32b8cf6172 Merge branch 'master' of https://github.com/AuroraWright/Luma3DS into Debuffer 2019-04-19 11:36:19 -07:00
TuxSH
687dfddd9f HBLDR_DebugNextApplicationByForce changes 2019-04-19 00:37:20 +02:00
piepie62
90a43089ba Debuffer cheat reading and strip whitespace
Effectively doubles the amount of cheats possible, while also getting rid of that annoying line limit
2019-04-18 14:01:46 -07:00
piepie62
1e0baeb30e Fix reading past the end of a file 2019-04-18 14:01:02 -07:00
piepie62
353f7d1705 Add bounds checking 2019-04-18 14:01:02 -07:00
piepie62
f5f3764f99 Improve cheat execution parameters and handle CRLF properly 2019-04-18 14:01:02 -07:00
TuxSH
eef22f8701 Fix "debug next process" with hbldr homebrew 2019-04-18 22:58:53 +02:00
TuxSH
9e1a9f2842 Implement HBLDR_DebugNextApplicationByForce
also prevent port 4003 (next application) from being extended-remote
2019-04-18 22:28:23 +02:00
TuxSH
0b33134f6c Loader services refactor 2019-04-18 19:48:01 +02:00
TuxSH
5c4d6c68b2 gdb: fix GDB_AttachToProcess returning success even when the process doesn't exist 2019-04-18 00:40:20 +02:00
TuxSH
89e42a457c gdb: hio: fix error parsing 2019-04-17 23:53:27 +02:00
TuxSH
17ca09346d gdb: fix multiple extended-remote issues, also fix possible race condtions 2019-04-17 23:12:29 +02:00
TuxSH
54de645dc3 pm: fix inverted condition 2019-04-17 02:03:02 +02:00
TuxSH
da6c02068b pm: fix reslimit bug 2019-04-17 01:31:03 +02:00
TuxSH
06bcb39721 always save errdisp to file; hio changes 2019-04-17 00:18:12 +02:00
piepie62
eab9a31dff Fix reading past the end of a file 2019-04-15 13:08:53 -07:00
piepie62
ff86ed2e77 Add bounds checking 2019-04-15 03:41:25 -07:00
piepie62
2fe1169423 Improve cheat execution parameters and handle CRLF properly 2019-04-14 23:12:14 -07:00
TuxSH
4c9fe186d7 gdb: hio support (untested yet) 2019-04-14 21:48:15 +02:00
TuxSH
e11cc090b2 gdb: add support to run new processes
Only titleId [mediaType [launchFlags]] is supported, and the launched title shouldn't rely on APT and all 3 parameters should be hex-encoded.

usage example, with titleId+mediaType:
(gdb) set remote file-exec 0004013000003702
(gdb) r 0
2019-04-13 19:18:47 +02:00
TuxSH
763a1de8d3 gdb: add extended-remote support, implement vAttach 2019-04-12 23:40:51 +02:00
TuxSH
e57b546dd4 gdb: rework meaning of selected/used 2019-04-10 23:38:10 +02:00
TuxSH
bd670cf87c gdb: add GDB_FindAllocatedContextByPid 2019-04-10 23:17:49 +02:00
TuxSH
1e0996c395 gdb: simply gdbstate 2019-04-09 23:59:05 +02:00
TuxSH
63736d7873 Refactor process detaching code 2019-03-31 22:58:36 +02:00
TuxSH
fb800bd4c9 Add support to force-debug applications before they start running code 2019-03-31 20:01:16 +02:00
TuxSH
219f38169f Update drawString (rosalina) 2019-03-31 17:04:07 +02:00
TuxSH
c688600d33 PMDBG_GetCurrentAppTitleId => PMDBG_GetCurrentAppTitleIdAndPid 2019-03-31 16:12:31 +02:00
TuxSH
ea14d8a186 gdb: avoid race conditions 2019-03-31 01:14:40 +01:00
TuxSH
cd18b85632 gdb: refactor port/ctx alloc 2019-03-31 00:24:45 +01:00
TuxSH
22ec031495 Add client code for new custom pm commands, use them, fix pm race conditions 2019-03-30 18:12:54 +01:00
TuxSH
43b998d37d Add new pmdbg commands: GetCurrentAppTitleId, DebugNextApplicationByForce, LaunchTitleDebug 2019-03-30 15:36:49 +01:00
TuxSH
127101a683 Fix debug bug 2019-03-30 15:05:49 +01:00
TuxSH
5955ca6957 Increase max number of sessions for pmdbg 2019-03-30 14:15:23 +01:00
TuxSH
dcddcfc94d Allow PMLAUNCHFLAG_QUEUE_DEBUG_APPLICATION for non-apps 2019-03-29 23:22:16 +01:00
TuxSH
1453d9adac cubic ninja users rejoice 2019-03-29 23:01:55 +01:00
TuxSH
ef034a87d4 revert fsldr change, fix null deref in pm 2019-03-29 22:40:54 +01:00
TuxSH
e688ec9257 move patches to pm 2019-03-29 19:07:24 +01:00
TuxSH
7177799021 Rosalina: delete "auto screenfilter restore on wakeup" functionality.
It was causing sleep mode wakeup issues and/or interfering with gsp in a
bad way.
2019-03-29 18:23:52 +01:00
TuxSH
1041d7c438 Add custom pm sysmodule 2019-03-29 00:32:45 +01:00
TuxSH
e57abad52f ctrulib changes 2019-03-29 00:09:59 +01:00
TuxSH
74bbfb95d3 service_manager: auto subscribe 2019-03-28 22:56:13 +01:00
TuxSH
8345f31c2a Fix wrong result code returned in GetServiceHandle 2019-03-27 21:56:13 +01:00
TuxSH
d44055d232 sm: simplify main loop logic 2019-03-27 20:36:40 +01:00
TuxSH
4a431b8fdf Fix bug in port closed handling 2019-03-26 23:15:37 +01:00
TuxSH
e2ed200509 Fix doPublishNotification bug 2019-03-26 20:53:48 +01:00
TuxSH
474eb3001b Introduce service_manager, also fix hb:ldr pm/pm race condition 2019-03-16 23:40:43 +01:00
TuxSH
f72d99d9b0 Fix wrong number of menus 2019-03-16 23:34:51 +01:00
TuxSH
a9a569c79d Remove useless rules 2019-03-16 18:11:46 +01:00
TuxSH
68b8c99ad0 Fix parallel building 2019-03-16 13:10:30 +01:00
TuxSH
6199f598e5 Add -nocodepadding to cxis as it ought to be 2019-03-15 23:03:25 +01:00
TuxSH
b92406afe2 Fix rebase 2019-03-15 23:03:25 +01:00
TuxSH
e64f267e4c Fix section declarations in .s files 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
9e7e967a5f Fix bss being PROGBITS, etc. 2019-03-15 23:03:22 +01:00
TuxSH
9fad2dff21 Add top-level Makefile for sysmodules 2019-03-15 23:03:20 +01:00
TuxSH
4b40dd52f4 Give a proper build system for each sysmodule, k11ext, arm11.
Previously, these Makefiles didn't correctly track header changes.
The project doesn't build as a whole, future commits will fix it.
2019-03-15 23:03:19 +01:00
TuxSH
6bd7070d38 Do the same for romfs redit => get rid of armips; update README.md 2019-03-15 23:03:18 +01:00
TuxSH
020236742f Fix gdbstub UB with IO 2019-03-15 22:37:04 +01:00
TuxSH
faeb0d9395 Fix strict-aliasing-related UB 2019-03-15 22:23:44 +01:00
TuxSH
b05f993221 Fix wrong memset size in screen_filters 2019-03-15 17:04:15 +01:00
TuxSH
a7100a1e7f Fix implicit fallthrough in debug.c 2019-02-28 19:08:39 +01:00
BuildTools
1c7b55ee1e Bump copyright year 2019-02-24 18:04:32 -07:00
TuxSH
f437d92374
Merge pull request #1065 from panicbit/screen_filter
Implement blue light filters
2019-02-21 19:48:07 +01:00
TuxSH
47916b2831
Fix menu thread stack overflow
sizeof(menuThreadStack) not matching 0x3000
2019-02-21 19:47:35 +01:00
Nanquitas
4b341e039a Merge branch 'master' of https://github.com/AuroraWright/Luma3DS 2018-11-15 13:49:35 +01:00
Nanquitas
1ae01c2406 GDB: add 'catchsvc' command to catch svc with IDA
Usage:
   - 'catchsvc 0' : Don't catch svcs
   - 'catchsvc 1' : Catch all svcs
   - 'catchsvc 1;19;24;32;' : Only catch svc 0x19, svc 0x24 and svc 0x32
2018-11-15 13:44:45 +01:00
Nanquitas
2182742708 Implement plugin loader 2018-11-15 13:38:19 +01:00
Aurora Wright
53622d777b Fix https://github.com/AuroraWright/Luma3DS/issues/1095 and https://github.com/AuroraWright/Luma3DS/issues/1118 2018-08-21 18:57:45 +02:00
tstambaugh92
2219b19d5f Fixed cheat functionality (#1117) 2018-08-09 14:21:16 +02:00
tstambaugh92
bc06b17823 Fixed cheat functionality (#1116)
Fixed functionality of BXXXXXXX codes
2018-08-07 12:50:48 +02:00
Nanquitas
0a87e41c66 socAccept: Fix an omitted comment, which masked a condition 2018-08-04 16:10:35 +02:00
Nanquitas
dd6e071dde socAccept: Fix an omitted comment, which masked a condition 2018-07-05 23:33:34 +02:00
Nanquitas
bec8daf028 Fix sleep issue (freeze) when InputRedirection is enabled 2018-06-23 23:06:18 +02:00
TuxSH
1600171ffa Bump copyright year 2018-06-14 18:13:57 +02:00
Nanquitas
8447c209a7
Fix GPU_PSC1_CNT address 2018-05-13 10:58:07 +02:00
panicbit
74a0b2feae Simplify color LUT writes 2018-04-16 01:28:57 +02:00
panicbit
71039fc248 Remove unnecassary permission declarations 2018-04-15 17:15:06 +02:00
panicbit
d0306609c3 Apply screen filter when waking up from standby 2018-04-15 16:26:20 +02:00
panicbit
d13cde3d7b Implement blue light filters in rosalina 2018-04-15 04:55:20 +02:00
panicbit
38f54fd2b6 Add parts of redshift to rosalina 2018-04-15 04:55:20 +02:00
panicbit
b5728e9c11 Add gpu color LUT registers to rosalina 2018-04-15 04:55:14 +02:00
TuxSH
a2177c0510 Fix menu entries (again) 2018-04-05 23:40:18 +02:00
Aurora
1182d3a627
Fix #1050 2018-03-23 02:49:16 +01:00
TuxSH
938cb6492f Revert "Revert "Switched from mapping target process memory to svcReadProcessMemory & svcWriteProcessMemory functions.""
This reverts commit 1fd689f5da.
2018-03-20 01:11:49 +01:00
Duckbill
6d4d80a798 Merge remote-tracking branch 'upstream/master' 2018-01-19 17:38:57 +03:00
TuxSH
76d274cfe2
getmemregions: userland never exceeds 0x40000000 2018-01-19 01:42:53 +01:00