Skip to content

Commit fd5fd59

Browse files
authored
Add files via upload
1 parent 08255d8 commit fd5fd59

File tree

17 files changed

+1131
-0
lines changed

17 files changed

+1131
-0
lines changed

readme.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
seedminer (beta v0.1) - zoogie
2+
3+
1. Buy a DSiWare Transfer compatible dsiware game and download it (if you don't already have one). EA Sudoku is a great choice, for example.
4+
2. Run stage1.3dsx on your 3ds. Make sure there aren't more than 1 sdmc:/Nintendo 3DS/20eaa90314ec7859... etc.
5+
directories there! Move the one(s) that aren't currently being used by the 3ds. You also need wifi on when you run this, similar to udsploit.
6+
You don't have to be connected to an access point -- the app does not contact any servers.
7+
3. It should dump movable_part1.sed. Take this file and put it in the stage2 folder.
8+
4. Run stage2.py (or stage3.exe) and it should generate movable_part2.sed.
9+
5. Place that file in the stage3/CPU_Conventional/ folder.
10+
6. Run the python script stage3_launcher.py (or exe, but that's hardcoded to 4 threads!). You can edit the number of CPU processes to use first
11+
(if the .py version) 4 is good for 2x cores and 8 for 4x cores, etc. Don't change # of computers unless you know what you are doing
12+
(experimental feature).
13+
Note: There will be multiple windows opened when stage3 is executed. Don't close them, each one is brute-forcing a specific area and closing
14+
even one could ruin your chance of getting the movable.sed.
15+
7. Wait until the stage3.exe process windows close and movable.sed is dumped. This could take 0-2 days on average but
16+
should get better as seedminer matures. Progress is saved if you have to quit. Changing the # of processes mid-brute force
17+
will mess up the saves and probably everything else.
18+
8. Now that you have your precious movable.sed (never lose it!), follow the directions at https://github.com/zoogie/TADpole for
19+
dumping/editing/rebuilding a dsiware export (TAD).
20+
9. Place the resulting <dsiware>_patched.bin in your sdmc:/Nintendo 3DS/ID0/ID1/Nintendo Dsiware/(here) minus the "_patched"
21+
10.Import it, and you should have dsiwarehax execution. Check 3ds.guide and follow the rest of the DSiware Transfer method.
22+
23+
Note: if you have a choice whether to run the stage.py or .exe, choose the script. Same with stage3_launcher.

stage1/Makefile

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
#---------------------------------------------------------------------------------
2+
.SUFFIXES:
3+
#---------------------------------------------------------------------------------
4+
5+
ifeq ($(strip $(DEVKITARM)),)
6+
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
7+
endif
8+
9+
TOPDIR ?= $(CURDIR)
10+
include $(DEVKITARM)/3ds_rules
11+
12+
#---------------------------------------------------------------------------------
13+
# TARGET is the name of the output
14+
# BUILD is the directory where object files & intermediate files will be placed
15+
# SOURCES is a list of directories containing source code
16+
# DATA is a list of directories containing data files
17+
# INCLUDES is a list of directories containing header files
18+
#
19+
# NO_SMDH: if set to anything, no SMDH file is generated.
20+
# ROMFS is the directory which contains the RomFS, relative to the Makefile (Optional)
21+
# APP_TITLE is the name of the app stored in the SMDH file (Optional)
22+
# APP_DESCRIPTION is the description of the app stored in the SMDH file (Optional)
23+
# APP_AUTHOR is the author of the app stored in the SMDH file (Optional)
24+
# ICON is the filename of the icon (.png), relative to the project folder.
25+
# If not set, it attempts to use one of the following (in this order):
26+
# - <Project name>.png
27+
# - icon.png
28+
# - <libctru folder>/default_icon.png
29+
#---------------------------------------------------------------------------------
30+
TARGET := $(notdir $(CURDIR))
31+
BUILD := build
32+
SOURCES := source
33+
DATA := data
34+
INCLUDES := include
35+
#ROMFS := romfs
36+
37+
#---------------------------------------------------------------------------------
38+
# options for code generation
39+
#---------------------------------------------------------------------------------
40+
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft
41+
42+
CFLAGS := -g -Wall -O2 -mword-relocations \
43+
-fomit-frame-pointer -ffunction-sections \
44+
$(ARCH)
45+
46+
CFLAGS += $(INCLUDE) -DARM11 -D_3DS
47+
48+
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
49+
50+
ASFLAGS := -g $(ARCH)
51+
LDFLAGS = -specs=3dsx.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
52+
53+
LIBS := -lctru -lm
54+
55+
#---------------------------------------------------------------------------------
56+
# list of directories containing libraries, this must be the top level containing
57+
# include and lib
58+
#---------------------------------------------------------------------------------
59+
LIBDIRS := $(CTRULIB)
60+
61+
62+
#---------------------------------------------------------------------------------
63+
# no real need to edit anything past this point unless you need to add additional
64+
# rules for different file extensions
65+
#---------------------------------------------------------------------------------
66+
ifneq ($(BUILD),$(notdir $(CURDIR)))
67+
#---------------------------------------------------------------------------------
68+
69+
export OUTPUT := $(CURDIR)/$(TARGET)
70+
export TOPDIR := $(CURDIR)
71+
72+
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
73+
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
74+
75+
export DEPSDIR := $(CURDIR)/$(BUILD)
76+
77+
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
78+
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
79+
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
80+
PICAFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.v.pica)))
81+
SHLISTFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.shlist)))
82+
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
83+
84+
#---------------------------------------------------------------------------------
85+
# use CXX for linking C++ projects, CC for standard C
86+
#---------------------------------------------------------------------------------
87+
ifeq ($(strip $(CPPFILES)),)
88+
#---------------------------------------------------------------------------------
89+
export LD := $(CC)
90+
#---------------------------------------------------------------------------------
91+
else
92+
#---------------------------------------------------------------------------------
93+
export LD := $(CXX)
94+
#---------------------------------------------------------------------------------
95+
endif
96+
#---------------------------------------------------------------------------------
97+
98+
export OFILES := $(addsuffix .o,$(BINFILES)) \
99+
$(PICAFILES:.v.pica=.shbin.o) $(SHLISTFILES:.shlist=.shbin.o) \
100+
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
101+
102+
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
103+
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
104+
-I$(CURDIR)/$(BUILD)
105+
106+
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
107+
108+
ifeq ($(strip $(ICON)),)
109+
icons := $(wildcard *.png)
110+
ifneq (,$(findstring $(TARGET).png,$(icons)))
111+
export APP_ICON := $(TOPDIR)/$(TARGET).png
112+
else
113+
ifneq (,$(findstring icon.png,$(icons)))
114+
export APP_ICON := $(TOPDIR)/icon.png
115+
endif
116+
endif
117+
else
118+
export APP_ICON := $(TOPDIR)/$(ICON)
119+
endif
120+
121+
ifeq ($(strip $(NO_SMDH)),)
122+
export _3DSXFLAGS += --smdh=$(CURDIR)/$(TARGET).smdh
123+
endif
124+
125+
ifneq ($(ROMFS),)
126+
export _3DSXFLAGS += --romfs=$(CURDIR)/$(ROMFS)
127+
endif
128+
129+
.PHONY: $(BUILD) clean all
130+
131+
#---------------------------------------------------------------------------------
132+
all: $(BUILD)
133+
134+
$(BUILD):
135+
@[ -d $@ ] || mkdir -p $@
136+
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
137+
138+
#---------------------------------------------------------------------------------
139+
clean:
140+
@echo clean ...
141+
@rm -fr $(BUILD) $(TARGET).3dsx $(OUTPUT).smdh $(TARGET).elf
142+
143+
144+
#---------------------------------------------------------------------------------
145+
else
146+
147+
DEPENDS := $(OFILES:.o=.d)
148+
149+
#---------------------------------------------------------------------------------
150+
# main targets
151+
#---------------------------------------------------------------------------------
152+
ifeq ($(strip $(NO_SMDH)),)
153+
$(OUTPUT).3dsx : $(OUTPUT).elf $(OUTPUT).smdh
154+
else
155+
$(OUTPUT).3dsx : $(OUTPUT).elf
156+
endif
157+
158+
$(OUTPUT).elf : $(OFILES)
159+
160+
#---------------------------------------------------------------------------------
161+
# you need a rule like this for each extension you use as binary data
162+
#---------------------------------------------------------------------------------
163+
%.bin.o : %.bin
164+
#---------------------------------------------------------------------------------
165+
@echo $(notdir $<)
166+
@$(bin2o)
167+
168+
#---------------------------------------------------------------------------------
169+
# rules for assembling GPU shaders
170+
#---------------------------------------------------------------------------------
171+
define shader-as
172+
$(eval CURBIN := $(patsubst %.shbin.o,%.shbin,$(notdir $@)))
173+
picasso -o $(CURBIN) $1
174+
bin2s $(CURBIN) | $(AS) -o $@
175+
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(CURBIN) | tr . _)`.h
176+
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(CURBIN) | tr . _)`.h
177+
echo "extern const u32" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(CURBIN) | tr . _)`.h
178+
endef
179+
180+
%.shbin.o : %.v.pica %.g.pica
181+
@echo $(notdir $^)
182+
@$(call shader-as,$^)
183+
184+
%.shbin.o : %.v.pica
185+
@echo $(notdir $<)
186+
@$(call shader-as,$<)
187+
188+
%.shbin.o : %.shlist
189+
@echo $(notdir $<)
190+
@$(call shader-as,$(foreach file,$(shell cat $<),$(dir $<)/$(file)))
191+
192+
-include $(DEPENDS)
193+
194+
#---------------------------------------------------------------------------------------
195+
endif
196+
#---------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)