Hacking MarioKart Pwns

Wiimm

Developer
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
The new WIT is out. You can simply use:
Code:
# create a mixed disc and use DATA partitions as source:
wit mix sourceimage1 sourceimage2 --dest outimage.iso

# to allow overlays and reduce image size add --overlay:
wit mix sourceimage1 sourceimage2 --dest outimage.iso --overlay

# to test the commands without creating a image add option --test
wit mix sourceimage1 sourceimage2 --dest outimage.iso --overlay --test

See http://wit.wiimm.de/wit/cmd-mix.html for details.
 

linuxares

The inadequate, autocratic beast!
Global Moderator
Joined
Aug 5, 2007
Messages
13,312
Trophies
2
XP
18,158
Country
Sweden
Is it possible to "scrub" tbe games first to make them smaller or does it delete important stuff for this hack?
 

Wiimm

Developer
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
linuxares said:
Is it possible to "scrub" tbe games first to make them smaller or does it delete important stuff for this hack?
Overlays works only with scrubbed images. Scrubbing means to detect unused areas (=holes) and ignore them while copying. The problem is, if you trim a partition (trim=compress together to remove unneeded areas) you must fake sign the partition and that is here unwanted.
 

WiiCrazy

Be water my friend!
Member
Joined
May 8, 2008
Messages
2,395
Trophies
0
Location
Istanbul
Website
www.tepetaklak.com
XP
387
Country
To trigger a hash check game should actually read the modified/deleted data on disc I guess.. So in theory one can work on the first game involved and zero out the unnecessary files so they can be used in the overlaying process.

@Wimm : Is it doable? It's more like a manual improvement to the overlaying process.. We would be building a game iso which contains partial files of disc 1 and partial files of disc 2... Is this possible considering the wii disc architecture?

About to consider the stuff for deletion (by deletion I mean leaving space for the other game) we can use an usb gecko under sneek and log the file accesses of the games...

This way (if possible) we can end up with an iso that can easily be burned to single layer dvds.
 

Wiimm

Developer
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
giantpune has already ask for it (I call it "file filter") to expand the unused areas of partitions. I'm thinking about this, the command syntax is open for such extensions.

In the moment I divide each partition into 2 parts and permute all partitions to find the best overlay. With a filter partitions becomes multiple holes. I have to built memory maps. This makes the whole overlay process much harder and slower.
 

WiiCrazy

Be water my friend!
Member
Joined
May 8, 2008
Messages
2,395
Trophies
0
Location
Istanbul
Website
www.tepetaklak.com
XP
387
Country
How is filtering done, is it fst based? I mean you specify the filenames in the respective partitions so that they are discarded?

About the interface, it could be a text file with the unique identifiers for files in it and that would be given to the command line program with just the name of the text file.

Can't comment on the partition setup though I have limited information regarding wii disc arch. Sure finding the best fitting gap among all the possible ones is an NP problem. But I don't think finding the best fitting gap is actually necessary in this scenario since one can remove enough files to create lots of gaps for the other disc to fit in. So an optimum solution is not needed actually.
 

VashTS

Beat it, son
Member
Joined
Mar 14, 2009
Messages
4,308
Trophies
1
Age
39
Location
Upstate NY
XP
3,756
Country
United States
is it possible to add a cIOS into an install partition? as in take a stubbed or unused IOS and replace that with a cIOS and let the update partition install that?

i assume you probably cannot use a fake signed IOS, the install partition probably won't like it. and i figure you guys would have thought of that already.
 

Wiimm

Developer
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
At the moment i permute the order of all source partitions to find out the best overlay. I need N! (=1*2*...*N) tries. Because I have 1 or 2 parts for each partition it was very easy to implement the overlay tests. Because of N! I limit the input partitions to 12 if using --overlay.

When using file filter I see 2 possibilities:[*] Filter out the files and find the largest hole. With this I can use the old overlay algorithm.[*] Manage multiple holes! This makes it much more complicated. Perhaps this algorithm is only used for 2 input images.

The filter is file based on FST. For extracting and listing of FST I have already a filter with positive and negative file patterns:
Extract of WIT docu:

Code:
*******************************************************************************
*******ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ Selecting files with --files=rulesÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ*******
*******************************************************************************

Some wit commands (DUMP, ILIST, EXTRACT) will operate with the files contained
by ISO images. The option --files=rule_list defines which files are processed.

Option syntax:
ÂÂÂÂ-FÂÂÂÂÂÂrule_list
ÂÂÂÂ--files rule_list
ÂÂÂÂ--files=rule_list
ÂÂÂÂÂÂÂÂ

'rule_list' is a semicolon separated list of rules. Each rules begin with a
plus sign fpr a allow rule or a minus sign for a deny rule. The options can
be used multiple times to define more and more rules.

Rule Syntax:
ÂÂÂÂrule_listÂÂ:= rule [ ';' rule_list ]
ÂÂÂÂruleÂÂÂÂÂÂ := skip_rule | std_rule | macro_call
ÂÂÂÂskip_ruleÂÂ:= number prefix pattern
ÂÂÂÂstd_ruleÂÂ := prefix pattern
ÂÂÂÂmacro_call := ':' pattern
ÂÂÂÂprefixÂÂÂÂ := '+' | '-'
ÂÂÂÂpatternÂÂÂÂ:= [char]...
ÂÂÂÂnumberÂÂÂÂ := '1'..'9' ['0'..'9']...

'pattern' is a file pattern including wildcards. The design is like 'rsync'.

The rule patterns are compared with the source path inside the ISO. A source
path looks like "DIRECTORY/FILE.EXT" without the partition prefix (example:
sys/boot.bin). The '/' at the beginning of the pattern is like a '^' in regular
expressions. If the pattern starts with a '/' then it is matched against the
beginning of the source path. Otherwise it is matched against the end of the
source path. To force matching against the end use a '$' as last character in
the pattern.

--------------------------------------------------------------------------------

This is a short description of the special characters:

ÂÂ /ÂÂ: At the beginning of pattern
ÂÂÂÂÂÂÂÂ => Match against the beginning of the source path

ÂÂ $ÂÂ: At the end of pattern
ÂÂÂÂÂÂÂÂ => Match against the end of the source path. This is the default if
ÂÂÂÂÂÂÂÂÂÂÂÂno '/' is at the beginning or the end of the pattern.

ÂÂ *ÂÂ: Match any number (zero or more) of characters but not '/'.

ÂÂ ** : Match any number (zero or more) of characters includingÂÂ'/'.
ÂÂ 
ÂÂ #ÂÂ: Match any number (one or more) of digit ('0'..'9').

ÂÂ ?ÂÂ: match exact 1 character but not '/'.

ÂÂ' ' : (SPACE) Match space and any control characters (ASCII 1..32).

[..] : Match 1 character of the list within the brackets. The list is
ÂÂÂÂÂÂÂÂanalyzed in the following way:
ÂÂÂÂÂÂÂÂ - If the first character is a '^' then characters not in the
ÂÂÂÂÂÂÂÂÂÂ list are matched.
ÂÂÂÂÂÂÂÂ - If the next character (behind optional '^') is a '+' or a '*'
ÂÂÂÂÂÂÂÂÂÂ then it is matched against the maximum possible characters.
ÂÂÂÂÂÂÂÂÂÂ A '+' means that at least one character must match.
ÂÂÂÂÂÂÂÂ - The list contains single characters 'c' or ranges 'x-y'.
ÂÂÂÂÂÂÂÂÂÂ To use a ']' it must be the first character. To use a '-' it
ÂÂÂÂÂÂÂÂÂÂ must be the first or last character.

{..} : This is a comma separated list of alternatives. It matches if
ÂÂÂÂÂÂÂÂat least one alternative match. {..} can be used recursively.

ÂÂ \c : Any character preceded by '\' looses its special meaning and
ÂÂÂÂÂÂÂÂis handled as normal character.


Pattern examples:

ÂÂÂÂÂÂ.wad : all files ending with '.wad'

ÂÂÂÂÂÂ*/ÂÂ : all directories but no files

ÂÂÂÂdir/ÂÂ : all directories which name ends with 'dir'.

ÂÂÂÂdir/*ÂÂ: all files in directories which name ends with 'dir'.

ÂÂÂÂdir/** : all files in (sub-)directories which name ends with 'dir'.

**/dir/** : all files in (sub-)directories which name is 'dir'.

/dir/
/dir/*
/dir/**ÂÂ : All files in the first level directory 'dir'
ÂÂÂÂÂÂÂÂÂÂÂÂ including sub directories.

/dir/*$ÂÂ : All files in in the first level directory 'dir'
ÂÂÂÂÂÂÂÂÂÂÂÂ excluding sub directories.

/dir/*.wad
ÂÂÂÂÂÂÂÂÂÂ : All '*.wad' files in the first level directory 'dir' excluding
ÂÂÂÂÂÂÂÂÂÂÂÂ sub directories and all files in directories named *.wad.
ÂÂÂÂÂÂÂÂÂÂÂÂ 
/DATA/dir/**.wad
ÂÂÂÂÂÂÂÂÂÂ : All '*.wad' files in in the first level directory 'dir'
ÂÂÂÂÂÂÂÂÂÂÂÂ including sub directories.


--------------------------------------------------------------------------------

Processing the Rule list:

Each option --filter= define a list of rules. Each file is checked against the
every rule on the list until a pattern matches the file name. If the rule
match the file name the rule prefix decide what to do. A '+' means include
the file and a '-' means exclude the file. A ':' (and the obsolete '=') calls
an internal macro to define a set of rules.

If a '+' or '-' is preceded by a decimal number the rule has a special
meaning. If '+' and the pattern does match then the following NUMBER rules are
skipped. If '-' and the pattern does not match then the following NUMBER rules
are skipped. 

If no rule match the prefix, the last rule in the list decide what to do.
If the last rule is a '+' rule than the file is excluded (opposite handling).
If the last rule is a '-' rule than the file is included.

A empty list means: include all files.


--------------------------------------------------------------------------------

Rule macros:

Rule macros are predefined rules to make live easier. Some of them exists
as positive (without prefix 'no') and as negative (with prefix 'no') rule.

:baseÂÂÂÂÂÂÂÂ:= +/*$
:nobaseÂÂÂÂ:= -/*$

ÂÂÂÂAllow or deny files of the base directory
ÂÂÂÂ(ticket.bin, tmd.bin, cert.bin, h3.bin),


:discÂÂÂÂÂÂÂÂ:= +/disc/
:nodiscÂÂÂÂ:= -/disc/

ÂÂÂÂAllow or deny files from the 'disc' directory.
ÂÂÂÂ(disc/header.bin, disc/region.bin)


:sysÂÂÂÂÂÂÂÂ:= +/sys/
:nosysÂÂÂÂÂÂÂÂ:= -/sys/

ÂÂÂÂAllow or deny files from the 'sys' directory.
ÂÂÂÂ(sys/boot.bin, sys/bi2.bin, sys/apploader.img, sys/main.dol, sys/fst.bin)


:filesÂÂÂÂÂÂÂÂ:= +/files/
:nofilesÂÂÂÂ:= -/files/

ÂÂÂÂAllow or deny files from the 'file' directory.
ÂÂÂÂThis are the real files of the ISO image.


:witÂÂÂÂÂÂÂÂ:= 2+/h3.bin; 1+/sys/fst.bin; +
:wwtÂÂÂÂÂÂÂÂ:= :wit

ÂÂÂÂAllow files that are used from wit and wwt to compose an ISO image.


:composeÂÂÂÂ:= 3+/disc/;2+/h3.bin;1+/sys/fst.bin;+

ÂÂÂÂAllow files that are needed from wit and wwt to compose an ISO image. This
ÂÂÂÂis like ':wit' expect that the optional files '/disc/*' are not included.


:sneekÂÂÂÂÂÂÂÂ:= 2+/h3.bin; 1+/disc/; +

ÂÂÂÂAllow files that SNEEK needs.


--------------------------------------------------------------------------------

Examples:

ÂÂ--filter +
ÂÂÂÂinclude all files

ÂÂ--filter -
ÂÂÂÂexclude all files

ÂÂ--filter +.wad
ÂÂÂÂinclude all '*.wad' files

ÂÂ--filter -.wad
ÂÂÂÂexclude all '*.wad' files

ÂÂ--filter '+.wad;-d'
ÂÂÂÂexclude all '*d' files but not '*.wad'

ÂÂ--filter '+.h3.bin;:sneek'
ÂÂÂÂsuppress for SNEEK unneeded files, but add 'h3.bin'.

For a implementation i need the following steps:[*] Extend the mix command to accept filter rules (and rule files). This should be easy.[*] Calculate a new usage map based on the filtered files. (seems to be easy with my new self written wiidisc lib)[*] Find the largest hole and look if the resulting image become smaller. (also easy)[*] Perhaps implement the new algorithm for multiple holes. This is the hardest part.
At the moment I thinking about all.
 

Wiimm

Developer
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
VashTS said:
is it possible to add a cIOS into an install partition? as in take a stubbed or unused IOS and replace that with a cIOS and let the update partition install that?
if you change the partition (add or modify a file, remap existing files, ...) the check sums are changed and you have to fake sign the partition -> that's forbidden here.

The only way is to ignore non used areas and perhaps unused files, which results in a "bad dump", because the FST points to non existing files. Access to an ignored files will halt the Wii.
 

wes11ph

Well-Known Member
Member
Joined
Jul 1, 2009
Messages
455
Trophies
0
Location
basement lvl-249
Website
Visit site
XP
86
Country
Afghanistan
taktularCBo said:
I hate German record industry "this video contains music of Sony Music and is not available in your Country".

non topic related...wtf
mellow.gif
 

HiBit

Well-Known Member
Member
Joined
Jun 19, 2009
Messages
481
Trophies
1
XP
200
Country
Gambia, The
wes11ph said:
non topic related...wtf
mellow.gif
I think if he can't view a video in this thread it's (a little bit) on topic.
wink.gif



Back to topic.
biggrin.gif

@taktularCBo
Use Google, there is a solution to view the video with an german ip:
http://www.google.de/webhp#hl=de&sourc...ideos+abspielen



@giantpune
Thanx for this info @ #1.

I own Indina pwns, but it can be fixed by nintendo.
Now i can run SSBB.
 

W hat

Rhythm Heaven Fan
Member
Joined
Feb 28, 2007
Messages
632
Trophies
1
XP
697
Country
United States
taktularCBo said:
I hate German record industry "this video contains music of Sony Music and is not available in your Country".

An important lesson on using music in Youtube videos.
 

vexing

Well-Known Member
Newcomer
Joined
Nov 16, 2009
Messages
65
Trophies
0
XP
27
Country
United States
why doesn't removing files screw up the check sum? is the check sum just checking the listed file structure and not the actual files?
it's not clear to me how mixing works either... is it setting the 2nd partition start address to somewhere within the first partition (where the data is 0s)?
 

taktularCBo

Well-Known Member
Member
Joined
Nov 8, 2009
Messages
368
Trophies
0
XP
43
Country
France
wes11ph said:
taktularCBo said:
I hate German record industry "this video contains music of Sony Music and is not available in your Country".

non topic related...wtf
mellow.gif
35mo4sm.jpg

yes, it shows up when i want to watch this video...so its at least a bit topic related
wink.gif

the funny or sad thing is, that sony is half owned by german BMG group
tongue.gif


@HiBit: Vielen Dank!
 

WiiCrazy

Be water my friend!
Member
Joined
May 8, 2008
Messages
2,395
Trophies
0
Location
Istanbul
Website
www.tepetaklak.com
XP
387
Country
vexing said:
why doesn't removing files screw up the check sum? is the check sum just checking the listed file structure and not the actual files?
it's not clear to me how mixing works either... is it setting the 2nd partition start address to somewhere within the first partition (where the data is 0s)?

It screws up but only when that data is needed and read from the disc... The idea is find those files that are not used during the workaround, use that space for something else
 

vexing

Well-Known Member
Newcomer
Joined
Nov 16, 2009
Messages
65
Trophies
0
XP
27
Country
United States
WiiCrazy said:
vexing said:
why doesn't removing files screw up the check sum? is the check sum just checking the listed file structure and not the actual files?
it's not clear to me how mixing works either... is it setting the 2nd partition start address to somewhere within the first partition (where the data is 0s)?

It screws up but only when that data is needed and read from the disc... The idea is find those files that are not used during the workaround, use that space for something else

it seems like only a tiny portion of the files would be used before the partition is switched. it's still not clear to me how this space is used by the second partition.
 

airline38

Well-Known Member
Member
Joined
Mar 28, 2010
Messages
741
Trophies
1
XP
807
Country
Taiwan
Wiimm said:
VashTS said:
is it possible to add a cIOS into an install partition? as in take a stubbed or unused IOS and replace that with a cIOS and let the update partition install that?
if you change the partition (add or modify a file, remap existing files, ...) the check sums are changed and you have to fake sign the partition -> that's forbidden here.

The only way is to ignore non used areas and perhaps unused files, which results in a "bad dump", because the FST points to non existing files. Access to an ignored files will halt the Wii.

Does this mean so far there is no way to shrink the merged ISO file size ?

I tried to use wit (v1.13a r1468) to mix (merge) mario kart + lego indiana with 'overlay' command. But the outimage.iso size is
still 8.21GB which I can't burn to a normal DL disc.

You mention earlier that the 'overlay' only works for a scrubbed iso file ? Does this mean we should scrub mario kart iso before using
wit with "--overlay" ?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Lol rappers still promoting crypto