Skip to content

Commit

Permalink
Merge pull request roxas75#79 from dukesrg/noarmips
Browse files Browse the repository at this point in the history
noarmips
  • Loading branch information
AlbertoSONIC committed Jul 9, 2015
2 parents 09cdd6b + 19f0479 commit 20d3b08
Show file tree
Hide file tree
Showing 19 changed files with 324 additions and 353 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,12 @@ Requirements for Windows:
- git, clone this repository with the following command: *git clone --recursive https://github.com/roxas75/rxTools.git*
- [Python 2.7](https://www.python.org)
- [devkitPRO](http://sourceforge.net/projects/devkitpro) with devkitARM option and suboptions installed (in case make.exe fails with stack trace dump, install [GnuWin Make](http://gnuwin32.sourceforge.net) and place it in path before devkitPRO/msys/bin)
- [armips](https://github.com/Kingcom/armips) (for Windows [Visual Studio 2013 Express for Windows](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx) or higher is required to build armips)
- GCC (for Windows [MinGW](http://sourceforge.net/projects/mingw) with mingw32-base will be fine)
- [ImageMagick](http://www.imagemagick.org)

Requirements for GNU/Linux:
- [git](https://apps.ubuntu.com/cat/applications/git/), clone this repository with the following command: *git clone --recursive https://github.com/roxas75/rxTools.git*
- [devkitPRO and devkitARM](http://3dbrew.org/wiki/Setting_up_Development_Environment) (follow the tutorial for Linux)
- [armips](https://github.com/Kingcom/armips)
- [ImageMagick](http://www.imagemagick.org) (on Debian/Ubuntu, [install it using apt](https://apps.ubuntu.com/cat/applications/imagemagick/))

Just run **make** and rxTools.dat should be generated in the **release** folder, along with all the other packets.
Expand Down
57 changes: 33 additions & 24 deletions rxinstaller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,7 @@ ifneq ($(strip $(AUDIO)),)
endif
endif

#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
#---------------------------------------------------------------------------------
export LD := $(CC)
#---------------------------------------------------------------------------------
else
#---------------------------------------------------------------------------------
export LD := $(CXX)
#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------
export LD := arm-none-eabi-ld

export OFILES := $(addsuffix .o,$(BINFILES))\
$(PNGFILES:.png=.o)\
Expand Down Expand Up @@ -154,19 +142,26 @@ endif

#---------------------------------------------------------------------------------
all: data/mset4x.bin data/mset6x.bin $(BUILD)
make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
rm $(OUTPUT).elf

data/%.bin: $(BUILD)/%.elf data
$(OBJCOPY) -O binary $< $@

$(BUILD)/mset4x.elf: $(BUILD)/mset4x.o
$(LD) -e 0 -Ttext 0x00279400 $< -o $@

$(BUILD)/mset6x.elf: $(BUILD)/mset6x.o
$(LD) -e 0 -Ttext 0x00279400 $< -o $@

$(BUILD)/%.o: rop/%.s $(BUILD)
$(AS) $< -o $@

$(DATA):
mkdir $@

data/mset4x.bin: rop/mset4x.s
@mkdir -p data
@armips $<

data/mset6x.bin: rop/mset6x.s
@mkdir -p data
@armips $<

$(BUILD):
@mkdir -p $@
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
@rm $(OUTPUT).elf
mkdir -p $@

#---------------------------------------------------------------------------------
clean:
Expand All @@ -176,6 +171,20 @@ clean:
#---------------------------------------------------------------------------------
else

#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
#---------------------------------------------------------------------------------
export LD := $(CC)
#---------------------------------------------------------------------------------
else
#---------------------------------------------------------------------------------
export LD := $(CXX)
#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------

#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
Expand Down
121 changes: 43 additions & 78 deletions rxinstaller/rop/mset4x.s
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
//3DS memchunkhax & firmlaunchax from mset 4.x
//Roxas75
@3DS memchunkhax & firmlaunchax from mset 4.x
@Roxas75

.nds
.create "data/mset4x.bin", 0x279400
.arm
.align 4
.align 2

.definelabel pop_pc, 0x001002F9
.definelabel pop_r0, 0x00143D8C
.definelabel pop_r0_r2, 0x0010f2b9
.definelabel pop_r3, 0x0010538C
.definelabel pop_r1, 0x001549E1
.definelabel pop_r4_lr_bx_r1, 0x001182C0
.definelabel pop_r0_r4, 0x0016FE91
.definelabel add_sp_r3, 0x00143D60
.equ pop_pc, 0x001002F9
.equ pop_r0, 0x00143D8C
.equ pop_r0_r2, 0x0010f2b9
.equ pop_r3, 0x0010538C
.equ pop_r1, 0x001549E1
.equ pop_r4_lr_bx_r1, 0x001182C0
.equ pop_r0_r4, 0x0016FE91
.equ add_sp_r3, 0x00143D60

.definelabel YS_label, 0x00272BAE
.definelabel fs_mountsdmc, 0x0018F19C ; pops 3
.definelabel load_addr, 0x002B0000
.equ YS_label, 0x00272BAE
.equ fs_mountsdmc, 0x0018F19C @ pops 3
.equ load_addr, 0x002B0000

.definelabel read_nvram, 0x001334FC
.definelabel memcpy, 0x001BFA60
.definelabel svcSleepThread, 0x001AEA50
.definelabel filehandle, 0x00279000
.definelabel ifile_open, 0x001B82A8
.definelabel ifile_read, 0x001B3954
.definelabel ifile_write, 0x001B3B50
.definelabel ssl_dec, 0x0022EFA8
.equ read_nvram, 0x001334FC
.equ memcpy, 0x001BFA60
.equ svcSleepThread, 0x001AEA50
.equ filehandle, 0x00279000
.equ ifile_open, 0x001B82A8
.equ ifile_read, 0x001B3954
.equ ifile_write, 0x001B3B50
.equ ssl_dec, 0x0022EFA8

first_profile:

Expand All @@ -35,20 +33,14 @@ first_profile:
.word YS_label
.word 0xDEADBEEF
.word fs_mountsdmc
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.fill 3,4,0xDEADBEEF
.word pop_r0_r2
.word filehandle
.word 1
.word pop_r1
.word 0x00295E0C ; YS:/rxTools.dat
.word 0x00295E0C @ YS:/rxTools.dat
.word ifile_open+4
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.fill 5,4,0xDEADBEEF
.word pop_r0_r2
.word filehandle
.word load_addr
Expand All @@ -57,13 +49,8 @@ first_profile:
.word pop_r3
.word 0x9000
.word ifile_read+4
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word pop_r0_r4
.fill 6,4,0xDEADBEEF
.word pop_r0_r4
.word ssl_dec+4
.word 0x144cbc
.word load_addr
Expand All @@ -77,40 +64,28 @@ first_profile:
.word 0x9000
.word pop_pc
.word pop_r3
.word load_addr-jump_to_payload-4
@ .word load_addr-jump_to_payload-4
.word load_addr-_start-8

jump_to_payload:
.word add_sp_r3

.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.fill 16,4,0xDEADBEEF
_end:
.orga 0x100
@_orga100: .fill (0x100+_start-_orga100)/4,4,0xDEADBEEF
_orga100: .fill (0x100+_start-_orga100)/4,4,0

second_profile:
_start2:
.word 0x050F0005
.halfword 0x1D
dcw "rxTools"
.word 0
.halfword 0
.halfword 0x07
dcw "YS:/rxTools.dat"
.orga 0x150
.hword 0x001D
.string16 "rxTools"
.word 0x00000000
.hword 0x0007
.string16 "YS:/rxTools.dat"
.align 2
@_orga150: .fill (0x150+_start-_orga150)/4,4,0xDEADBEEF
_orga150: .fill (0x150+_start-_orga150)/4,4,0
.word 0x6E
.word 0
.word 0x0265021A
Expand All @@ -121,7 +96,8 @@ second_profile:
.word 0
.word 0x3A370052
.word 0x003F0001
.orga 0x1B4
@_orga1B4: .fill (0x1B4+_start-_orga1B4)/4,4,0xDEADBEEF
_orga1B4: .fill (0x1B4+_start-_orga1B4)/4,4,0

first_rop:
.word pop_r0_r2
Expand All @@ -136,17 +112,6 @@ second_profile:
.word add_sp_r3

_end2:
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF
.word 0xDEADBEEF


.fill 9,4,0xDEADBEEF

.pool
.close

0 comments on commit 20d3b08

Please sign in to comment.