Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Commit

Permalink
Finished(?) updating for using 3ds_ropkit. Removed some build options…
Browse files Browse the repository at this point in the history
… and made them the default. Removed the GAMECARD build options.
  • Loading branch information
yellows8 committed Jul 23, 2016
1 parent 55d874a commit 14fc273
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 500 deletions.
4 changes: 0 additions & 4 deletions Building.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@ The final built files are located under "finaloutput/", which are then used whil
Build options:
* "CODEBINPAYLOAD=path" Code binary payload to load into the launched process(default is the system web-browser). This will be included in the theme-data itself.
* "LOADSDPAYLOAD=1" Enable loading a code binary from SD for loading into the launched process("/menuhax_payload.bin"). The total size of the code(including additional code prior to the binary from SD) loaded into the process is 0x4000-bytes. Therefore, the max size of the code binary from SD is a bit less than 0x3000-bytes.
* "BOOTGAMECARD=1" Reboot the system via NSS:RebootSystem to launch the gamecard(region-free). This is handled right after the ROP for LOADROPBIN, if that's even enabled. If GAMECARD_PADCHECK isn't used, the ROP will always execute this without executing the title-launch + takeover ROP.
* "USE_PADCHECK=val" When set, at the very start of the menu ROP it will check if the current HID PAD state is set to the specified value. When they match, it continues the ROP, otherwise it returns to the homemenu code. This is done before writing to the framebuffers.
* "LOADSDCFG=1" When USE_PADCHECK was used, load a config file which overrides the value used for USE_PADCHECK, and can invert PADCHECK too if specified(see source code for details).
* "GAMECARD_PADCHECK=val" Similar to USE_PADCHECK except for BOOTGAMECARD: the BOOTGAMECARD ROP only gets executed when the specified HID PAD state matches the current one. After writing to framebufs the ROP will delay 3 seconds, then run this PADCHECK ROP.
* "EXITMENU=1" Terminate homemenu X seconds(see source) after getting code exec under the launched process.
* "ENABLE_LOADROPBIN=1" Load a homemenu ropbin then stack-pivot to it, see the Makefile HEAPBUF_ROPBIN_\* values for the load-address. When LOADSDPAYLOAD isn't used, the binary is the one specified by CODEBINPAYLOAD, otherwise it's loaded from a filepath which is different for each build, see the Makefile for that. The binary size should be <=0x10000-bytes.
* "ENABLE_HBLAUNCHER=1" When used with ENABLE_LOADROPBIN, setup the additional data needed by the hblauncher payload.
* "MENUROP_PATH={path}" Use the specified path for the "menurop" directory, instead of the default one which requires running generate_menurop_addrs.sh. To use the prebuilt menurop headers included with this repo, the following can be used: "MENUROP_PATH=menurop_prebuilt".
* "THEMEDATA_PATH={*decompressed* regular theme body_LZ filepath}" Build hax with the specified theme, instead of using the "default theme" one. Also note that compression during building takes a *lot* longer with this. This option is *not* recommended, use the LOADOTHER_THEMEDATA option instead.
* "LOADOTHER_THEMEDATA=1" When doing RET2MENU, re-run the theme-loading Home Menu code with different extdata file-paths(BGM file-paths are not changed). This allows loading actual themes while menuhax is installed.
Expand Down
22 changes: 1 addition & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,11 @@ ifneq ($(strip $(CODEBINPAYLOAD)),)
DEFINES := $(DEFINES) -DCODEBINPAYLOAD=\"$(CODEBINPAYLOAD)\" -DPAYLOADENABLED
endif

ifneq ($(strip $(BOOTGAMECARD)),)
PARAMS := $(PARAMS) BOOTGAMECARD=1
DEFINES := $(DEFINES) -DBOOTGAMECARD
endif

ifneq ($(strip $(USE_PADCHECK)),)
PARAMS := $(PARAMS) USE_PADCHECK=$(USE_PADCHECK)
DEFINES := $(DEFINES) -DUSE_PADCHECK=$(USE_PADCHECK)
endif

ifneq ($(strip $(LOADSDCFG)),)
PARAMS := $(PARAMS) LOADSDCFG=$(LOADSDCFG)
DEFINES := $(DEFINES) -DLOADSDCFG=$(LOADSDCFG)
endif

ifneq ($(strip $(GAMECARD_PADCHECK)),)
PARAMS := $(PARAMS) GAMECARD_PADCHECK=$(GAMECARD_PADCHECK)
DEFINES := $(DEFINES) -DGAMECARD_PADCHECK=$(GAMECARD_PADCHECK)
endif

ifneq ($(strip $(EXITMENU)),)
PARAMS := $(PARAMS) EXITMENU=1
DEFINES := $(DEFINES) -DEXITMENU
Expand All @@ -90,11 +75,6 @@ ifneq ($(strip $(ENABLE_LOADROPBIN)),)
DEFINES := $(DEFINES) -DENABLE_LOADROPBIN
endif

ifneq ($(strip $(ENABLE_HBLAUNCHER)),)
PARAMS := $(PARAMS) ENABLE_HBLAUNCHER=1
DEFINES := $(DEFINES) -DENABLE_HBLAUNCHER
endif

ifeq ($(strip $(MENUROP_PATH)),)
MENUROP_PATH := menurop
endif
Expand Down Expand Up @@ -143,7 +123,7 @@ BUILDMODULES_COMMAND :=
include Makefile_modules_include

defaultbuild:
make -f Makefile all --no-print-directory LOADSDPAYLOAD=1 USE_PADCHECK=0x200 ENABLE_LOADROPBIN=1 ENABLE_HBLAUNCHER=1 LOADSDCFG=1 LOADOTHER_THEMEDATA=1 ENABLE_IMAGEDISPLAY=1 ENABLE_IMAGEDISPLAY_SD=1 MENUROP_PATH=menurop_prebuilt
make -f Makefile all --no-print-directory LOADSDPAYLOAD=1 ENABLE_LOADROPBIN=1 LOADSDCFG=1 LOADOTHER_THEMEDATA=1 ENABLE_IMAGEDISPLAY=1 ENABLE_IMAGEDISPLAY_SD=1 MENUROP_PATH=menurop_prebuilt

all:
@mkdir -p finaloutput
Expand Down
Loading

0 comments on commit 14fc273

Please sign in to comment.