This repository has been archived on 2022-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Luma3DS-3GX/sysmodules/loader/source
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
..
bps_patcher.cpp loader: Add support for BPS patches 2019-12-21 18:32:18 +01:00
bps_patcher.h loader: Add support for BPS patches 2019-12-21 18:32:18 +01:00
file_util.h loader: Add support for BPS patches 2019-12-21 18:32:18 +01:00
hbldr.c HBLDR_DebugNextApplicationByForce changes 2019-04-19 00:37:20 +02:00
hbldr.h HBLDR_DebugNextApplicationByForce changes 2019-04-19 00:37:20 +02:00
ifile.c ctrulib changes 2019-03-29 00:09:59 +01:00
ifile.h Change directory structure 2017-06-02 19:35:08 +02:00
loader.c Loader services refactor 2019-04-18 19:48:01 +02:00
loader.h Loader services refactor 2019-04-18 19:48:01 +02:00
main.c Loader services refactor 2019-04-18 19:48:01 +02:00
memory.c Use <string.h> & <3ds/exheader.h>, fix some bugs, etc. 2019-03-15 23:03:23 +01:00
memory.h Use <string.h> & <3ds/exheader.h>, fix some bugs, etc. 2019-03-15 23:03:23 +01:00
patcher.c loader: Add support for BPS patches 2019-12-21 18:32:18 +01:00
patcher.h Loader services refactor 2019-04-18 19:48:01 +02:00
romfsredir.h Do the same for romfs redit => get rid of armips; update README.md 2019-03-15 23:03:18 +01:00
romfsredir.s fix layeredfs regression 2019-04-21 12:15:50 +02:00
service_manager.c Loader services refactor 2019-04-18 19:48:01 +02:00
service_manager.h Loader services refactor 2019-04-18 19:48:01 +02:00
strings.c Use <string.h> & <3ds/exheader.h>, fix some bugs, etc. 2019-03-15 23:03:23 +01:00
strings.h Use <string.h> & <3ds/exheader.h>, fix some bugs, etc. 2019-03-15 23:03:23 +01:00
util.h Loader services refactor 2019-04-18 19:48:01 +02:00