From f793af18416a9b9325c5ed2a8e7a3988faf93c99 Mon Sep 17 00:00:00 2001 From: chaoskagami Date: Mon, 23 May 2016 03:00:47 -0400 Subject: [PATCH] More docs --- copy.sh | 19 +++++++++++-------- external/loader/README.md | 27 ++++++++++++++++----------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/copy.sh b/copy.sh index 4aaa3b0..b6e50f9 100644 --- a/copy.sh +++ b/copy.sh @@ -3,11 +3,14 @@ # This is just a helper script I use to copy shit to my own unit. # You don't and shouldn't need to use it. -mount /dev/sdb1 /media/cd || exit 0 -cp out/arm9loaderhax.bin /media/cd/anim/boot/none.bin || exit 0 -cp out/arm9loaderhax.bin /media/cd/anim/boot/r.bin || exit 0 -cp out/arm9loaderhax.bin /media/cd/anim/boot/l.bin || exit 0 -cp -r out/corbenik /media/cd/ || exit 0 -cp -r input/corbenik /media/cd/ || exit 0 -umount /media/cd || exit 0 -eject /dev/sdb || exit 0 +mnt=/media/sd +dev=/dev/sdc + +mount ${dev}1 $mnt || exit 0 +cp out/arm9loaderhax.bin $mnt/anim/boot/none.bin || exit 0 +cp out/arm9loaderhax.bin $mnt/anim/boot/r.bin || exit 0 +cp out/arm9loaderhax.bin $mnt/anim/boot/l.bin || exit 0 +cp -r out/corbenik $mnt/ || exit 0 +cp -r input/corbenik $mnt/ || exit 0 +umount $mnt || exit 0 +eject ${dev} || exit 0 diff --git a/external/loader/README.md b/external/loader/README.md index 2ef4f66..0ad8960 100644 --- a/external/loader/README.md +++ b/external/loader/README.md @@ -16,21 +16,26 @@ There is also support for SDMC reading (not found in original loader implementat which means that patches can be loaded from the SD card. Ultimately, there would be a patch system that supports easy loading of patches from the SD card. -At the moment this copy has support for resizing segments before loading the -executable. This means that segments can be appended to. Notably, this allows -ADDING code, not simply changing it. - -The text, data, and ro segments are handled separately to streamline segment -expansion and limit search space. +## Changes I've made A lot of the 'disassembled' looking code has been rewritten for readability, and many cruft-ish artifacts of it have been cleaned up. Some wrapper functions -have also been rewritten out of the code, and anything nigh-unreadable has -been documented when I figure out what it does. +have also been rewritten out of the code, and anything nigh-unreadable and +non-rewritable has been documented when I managed to figure out what it does. + +At the moment there is also experimental support for resizing segments before +loading the executable. This means that segments can be appended to. Notably, +this allows tacking on code to the end. + +The text, data, and ro segments are handled separately to streamline the new +segment resizing and limit search space to speed things up a tad. Why search +text, data and ro when you know it is in text? + +## Imported changes from other 3ds_injector forks -It has also been updated to the latest git ctrulib (in which FS_Archive is a u64, -not a struct.) Thanks, @TuxSH. It required manual conflict merged (my code is different) -but you provided the information needed to fix it up. +I updated it to the latest git ctrulib (in which FS_Archive is a u64, +not a struct.) @TuxSH did the work before me, it required manual conflict merges +but he provided the information needed to fix it up for the most part. ;P ## Build You need a working 3DS build environment with a fairly recent copy of devkitARM, -- 2.39.5