Skip to content

Commit

Permalink
Added libntfs support and changed the progress format
Browse files Browse the repository at this point in the history
- added libntfs support via (https://github.com/Maschell/libntfs-wiiu).
When dumping to a ntfs device creating the hash will be disabled because
of crashes.
- updated dynamic libs (and added them as a submodule)
- added logging
  • Loading branch information
Maschell committed Sep 10, 2017
1 parent 17fa15e commit 8864a55
Show file tree
Hide file tree
Showing 11 changed files with 759 additions and 52 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*.o
*.elf
*.d
build/.map
payload/*
arm_kernel/arm_kernel.bin
arm_kernel/arm_kernel_bin.h
arm_user/arm_user.bin
arm_user/arm_user_bin.h
odmhook/odmhook.bin
odmhook/odmhook_bin.h
wupserver/wupserver.bin
wupserver/wupserver_bin.h
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/dynamic_libs"]
path = src/dynamic_libs
url = https://github.com/Maschell/dynamic_libs
17 changes: 10 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ SOURCES := src \
src/fs \
src/system \
src/utils \
src/polarssl
src/polarssl \
src/utils
DATA :=

INCLUDES := src include payload
Expand All @@ -45,9 +46,9 @@ INCLUDES := src include payload
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS := -std=gnu11 -mrvl -mcpu=750 -meabi -mhard-float -ffast-math \
-O3 -Wall -Wextra -Wno-unused-parameter -Wno-strict-aliasing $(INCLUDE)
-D__wiiu__ -Wall -Wextra -Wno-unused-parameter -Wno-strict-aliasing -D_GNU_SOURCE $(INCLUDE)
CXXFLAGS := -std=gnu++11 -mrvl -mcpu=750 -meabi -mhard-float -ffast-math \
-O3 -Wall -Wextra -Wno-unused-parameter -Wno-strict-aliasing $(INCLUDE)
-D__wiiu__ -Wall -Wextra -Wno-unused-parameter -Wno-strict-aliasing -D_GNU_SOURCE $(INCLUDE)
ASFLAGS := -mregnames
LDFLAGS := -nostartfiles -Wl,-Map,$(notdir $@).map,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,malloc_usable_size,-wrap,_malloc_r,-wrap,_free_r,-wrap,_realloc_r,-wrap,_calloc_r,-wrap,_memalign_r,-wrap,_malloc_usable_size_r,-wrap,valloc,-wrap,_valloc_r,-wrap,_pvalloc_r,--gc-sections

Expand All @@ -57,14 +58,15 @@ MAKEFLAGS += --no-print-directory
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS := -lfat -liosuhax
LIBS := -lm -lgcc -lfat -lntfs -liosuhax

#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS := $(CURDIR) \
$(DEVKITPPC)/lib
$(DEVKITPPC)/lib \
$(DEVKITPPC)/lib/gcc/powerpc-eabi/4.8.2

#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
Expand Down Expand Up @@ -105,14 +107,15 @@ export OFILES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
#---------------------------------------------------------------------------------
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(PORTLIBS)/include -I$(PORTLIBS)/include/freetype2 \
-I$(CURDIR)/$(BUILD) -I$(LIBOGC_INC) \
-I$(PORTLIBS)/include -I$(PORTLIBS)/include/freetype2


#---------------------------------------------------------------------------------
# build a list of library paths
#---------------------------------------------------------------------------------
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
-L$(LIBOGC_LIB) -L$(PORTLIBS)/lib
-L$(PORTLIBS)/lib

export OUTPUT := $(CURDIR)/$(TARGET)
.PHONY: $(BUILD) clean install
Expand Down
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# wudump
dump raw images from a wiiu game disc
# Usage
Download and run the .elf from homebrew launcher with a fat32 sd card/usb device inserted that has at least 23.3gb free.
The files will be dumped in 2gb parts, you will have to merge them yourself afterwards if you need the full game.wud.
Download and run the .elf from homebrew launcher with a fat32 sd card/usb device or NTFS usb device inserted that has at least 23.3gb free.
On fat32 devices the files will be dumped in 2gb parts, you will have to merge them yourself afterwards if you need the full game.wud. On NTFS devices it will be dumped into a single file.

A full dump can take a little over one and a half hours.
After it has been dumped the wud parts, common.key and game.key will be in a "wudump" folder on your sd card/usb device, to get the full game.wud you will have to merge them.
After it has been dumped the wud, common.key and game.key will be in a "wudump" folder on your sd card/usb device.

## Merging the wud parts on FAT32 devices.
This step is not needed, when the file was dumped to a ntfs device.

To get the full game.wud with FAT32 devices you will have to merge them.
If you are on windows you can use something like this for example to merge them into a game.wud on a "wudump" folder on your C drive from a cmd in the sd/usb folder:
```
copy /b game_part1.wud + game_part2.wud + game_part3.wud + game_part4.wud + game_part5.wud + game_part6.wud + game_part7.wud + game_part8.wud + game_part9.wud + game_part10.wud + game_part11.wud + game_part12.wud C:\wudump\game.wud
```

## wud2app
If you would just like to install your game using wupinstaller then grab wud2app:
https://github.com/FIX94/wud2app/releases
If you dont want to merge all .wud files you can put wud2app into a folder on your pc and run it from a cmd with the wudump folder path as argument, for example if the sd/usb folder happens to be in "P:\wudump\WUP-P-TEST" on windows you can just run wud2app like:
Expand All @@ -23,3 +30,9 @@ wud2app common.key game.key game.wud
Make sure to copy the common.key and game.key into that folder as well if you use that method.

The folder it creates can just be installed by wupinstaller.

# Build
For building you need:
- [libfat](https://github.com/aliaspider/libfat/)
- [libiosuhax](https://github.com/dimok789/libiosuhax) (Build WITHOUT the WUT flag set.)
- [libntfs](https://github.com/Maschell/libntfs-wiiu) (Build with make wiiu-install)
15 changes: 0 additions & 15 deletions include/stdint.h

This file was deleted.

1 change: 1 addition & 0 deletions src/dynamic_libs
Submodule dynamic_libs added at 451c40
Loading

0 comments on commit 8864a55

Please sign in to comment.