Hacking SoftChip Backup Loader

requiem4d

Well-Known Member
OP
Member
Joined
Oct 25, 2008
Messages
181
Trophies
0
XP
54
Country
United States
As some of you know, I have been writing the SoftChip backup loader for the past few days. With today being Election Day here in the states, I set today as the target release date for the first alpha. Unfortunately, I was unable to meet my goals with the time restraints I have had. However, I do intend to keep my promise to the community, and am releasing the sources today.

This software is not affiliated with GBAtemp or any of its members or staff, myself excluded, and I request that while you may discuss anything related to the software here, if you have an issue that you need resolved, please do it at the google code site.

So.... Here it is. Please don't run it unless you know what you're doing. I'm not responsible for anything anybody uses it for. I share no responsibility if it bricks your wii, ruins your tv, kills your controllers, burns your house down, and/or shoots your dog.

I would also like to request that this doesn't become known as "Requiem's loader". Its official name is SoftChip, and it belongs to the community.

Official Website: http://www.softchip-mod.com/
Google Code Site: http://code.google.com/p/wii-softchip/

For those of you who wish to contribute, the official IRC channel is #SoftChip on Freenode.

Thanks to everyone for your patience and support.

Edit: 2008-11-05

The loader is working as of svn r7. Test away. Please fill out any issue reports that you're having on the Google Code site.

Edit: 2008-11-08

There is no official compiled .dol. This is pre-alpha software, and is intended primarily for developers until it hits alpha.

Edit: 2008-11-13

Added link to official website.
 

djdynamite123

Master Of Hardcore!
Banned
Joined
Sep 21, 2008
Messages
3,788
Trophies
0
Age
34
Location
Redcar, England UK
Website
www.djdynamite.bravehost.com
XP
91
Country
QUOTE said:
So.... Here it is. Please don't run it unless you know what you're doing. I'm not responsible for anything anybody uses it for. I share no responsibility if it bricks your wii, ruins your tv, kills your controllers, burns your house down, and/or shoots your dog.
lol, hope all goes well
 

TwinRetro

Former Staff
Former Staff
Joined
Aug 29, 2008
Messages
6,256
Trophies
0
Age
37
Location
Hiatus Hell
Website
yourmom.com
XP
4,593
Country
Djibouti
I am not a coder myself, but all I have to say is do not give up hope like so many coders I have seen come and go. if you look at the psp homebrew scene you'll know what I'm talking about.

Toukon!!!!
 

picano

Well-Known Member
Member
Joined
Aug 21, 2008
Messages
197
Trophies
0
Age
33
Location
Nebraska
Website
soifall.net
XP
250
Country
United States
Good work so far. --- Pointers can be a pain in the ass...

Anyway, glanced over the code... I was expecting something quite a bit more confusing. I'll try and take a look at it once I get another break from classes. Doubt I'll make any discoveries, but it's definitely interesting to see the inner workings.
 

requiem4d

Well-Known Member
OP
Member
Joined
Oct 25, 2008
Messages
181
Trophies
0
XP
54
Country
United States
The goal was to make this code as easy to understand as possible. If nobody can read it, nobody can write it. Thanks.
 

djdynamite123

Master Of Hardcore!
Banned
Joined
Sep 21, 2008
Messages
3,788
Trophies
0
Age
34
Location
Redcar, England UK
Website
www.djdynamite.bravehost.com
XP
91
Country
QUOTE said:
The goal was to make this code as easy to understand as possible. If nobody can read it, nobody can write it. Thank
Makes sense
smile.gif
 

WiiPower

Well-Known Member
Member
Joined
Oct 17, 2008
Messages
8,165
Trophies
0
XP
345
Country
Gambia, The
Annoying noob question:
Why do you use int and long instead of u32,u8,s32 etc.? All i know is, that the size of int and long vary from system to system, and i don't know the size of a long inside the wii. I think u32,u8,s32 etc. are unmissinterpretable.
 

requiem4d

Well-Known Member
OP
Member
Joined
Oct 25, 2008
Messages
181
Trophies
0
XP
54
Country
United States
The wii's sizes are the same from wii to wii. As it stands, this won't run on anything else. This was a "readability" concern for new coders not necessarily familiar with the libraries.
 

Arm the Homeless

Custom Title
Member
Joined
May 26, 2008
Messages
1,762
Trophies
0
Location
/home/andy/
Website
Visit site
XP
125
Country
United States
I know this is a alpha, not working release, but I got errors when I tried to compile it.
Code:
[email protected]:~/.devkitPro/haxx/wii-softchip-read-only/softchip$ make
main.cpp
SoftChip.cpp
/home/andy/.devkitPro/haxx/wii-softchip-read-only/softchip/source/SoftChip/SoftChip.cpp: In member function 'void SoftChip::Load()':
/home/andy/.devkitPro/haxx/wii-softchip-read-only/softchip/source/SoftChip/SoftChip.cpp:213: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'dword'
/home/andy/.devkitPro/haxx/wii-softchip-read-only/softchip/source/SoftChip/SoftChip.cpp:213: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'dword'
/home/andy/.devkitPro/haxx/wii-softchip-read-only/softchip/source/SoftChip/SoftChip.cpp:221: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'dword'
/home/andy/.devkitPro/haxx/wii-softchip-read-only/softchip/source/SoftChip/SoftChip.cpp:221: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'dword'
/home/andy/.devkitPro/haxx/wii-softchip-read-only/softchip/source/SoftChip/SoftChip.cpp:235: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'dword'
/home/andy/.devkitPro/haxx/wii-softchip-read-only/softchip/source/SoftChip/SoftChip.cpp:235: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'dword'
/home/andy/.devkitPro/haxx/wii-softchip-read-only/softchip/source/SoftChip/SoftChip.cpp:256: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'signed_blob*'
/home/andy/.devkitPro/haxx/wii-softchip-read-only/softchip/source/SoftChip/SoftChip.cpp:256: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'signed_blob*'
/home/andy/.devkitPro/haxx/wii-softchip-read-only/softchip/source/SoftChip/SoftChip.cpp:265: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'signed_blob*'
/home/andy/.devkitPro/haxx/wii-softchip-read-only/softchip/source/SoftChip/SoftChip.cpp:265: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'signed_blob*'
/home/andy/.devkitPro/haxx/wii-softchip-read-only/softchip/source/SoftChip/SoftChip.cpp:272: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'signed_blob*'
/home/andy/.devkitPro/haxx/wii-softchip-read-only/softchip/source/SoftChip/SoftChip.cpp:272: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'signed_blob*'
/home/andy/.devkitPro/haxx/wii-softchip-read-only/softchip/source/SoftChip/SoftChip.cpp: At global scope:
/home/andy/.devkitPro/haxx/wii-softchip-read-only/softchip/source/SoftChip/SoftChip.cpp:45: warning: 'void Report(const char*, ...)' defined but not used
DIP.cpp
cIOS.cpp
linking ... SoftChip.elf
output ... SoftChip.dol

Probably just GCC, I get that all the time. And the application still builds. But I dunno.
 

requiem4d

Well-Known Member
OP
Member
Joined
Oct 25, 2008
Messages
181
Trophies
0
XP
54
Country
United States
Those printfs are there just so that I know what address everything is located. Safe to ignore, unless someone feels like casting all of them.

I intend to cast them all to unsigned ints, but those warnings are low priority.

Edit:

Disregard that. I went ahead and fixed the warnings, and corrected a stupid typo in my email address.
 

roy_hu

Active Member
Newcomer
Joined
Oct 21, 2008
Messages
29
Trophies
0
XP
28
Country
United States
Great work! A couple of questions:

1. It works with cIOS 249 by default. Should I use wanikoko's, or wiigator's (v0.1 or v0.3?) I heard that they are the same, but I'm not sure.
2. Is it supposed to work with both 1:1 backups and decrypted backups, or just the 1:1 backups?
3. I don't require you to provide any guarantee, but I'm going to assume you had run your loader on your wii and it didn't break your wii. If you committed a change into the repository but didn't test it, please include a WARNING file at the top level of the repository.
4. I glanced over the source code, but don't have time to read it carefully yet. It's quite a surprise to me that apploader.bin is returning null, because you can basically rewrite wiigator's C code in C++. What's your guess?
 

FalcoX

New Member
Newbie
Joined
Nov 4, 2008
Messages
2
Trophies
0
Website
emupedia.com
XP
1
Country
United States
I'll take a look at the source when I get a chance. It intrigues me... however I doubt I'll be able to do anything with it. I've never played with Wii programs yet.
 

Seraph863

Active Member
Newcomer
Joined
Sep 26, 2008
Messages
41
Trophies
0
XP
7
Country
United States
VERY easy to read. I barely understand C++ coding, and I know it's only in a comment, but I think there may be a small typo.

DIP.cpp
Line 209 * Wait_CoverCose: Waits for the drive to announce cover is closed

Whereas on Line 216 it's referenced as
int DIP::Wait_CoverClose()


Again, I'm 99% sure that the typo is just in a comment, and does not effect the actual code.
 

Arm the Homeless

Custom Title
Member
Joined
May 26, 2008
Messages
1,762
Trophies
0
Location
/home/andy/
Website
Visit site
XP
125
Country
United States
Seraph863 said:
VERY easy to read. I barely understand C++ coding, and I know it's only in a comment, but I think there may be a small typo.

DIP.cpp
Line 209 * Wait_CoverCose: Waits for the drive to announce cover is closed

Whereas on Line 216 it's referenced as
int DIP::Wait_CoverClose()


Again, I'm 99% sure that the typo is just in a comment, and does not effect the actual code.
/* In C, this is a comment. */
// In C, this is also a comment

It does not affect anything. Just a mistyped comment. Not something like in Office Space where he misplaces the decimal in the virus.

EDIT: And also, you might not get too much coding help at GBATemp. I'm sure we're only rated a notch above MaxConsole.
Try Wiibrew Forums and if they won't help (they probably won't) try TehSkeen.
 

Seraph863

Active Member
Newcomer
Joined
Sep 26, 2008
Messages
41
Trophies
0
XP
7
Country
United States
Tehskeen probably won't help much, either. They strongly oppose a backup loader strictly due to the piracy issue. That's why Waninkoko's loader was leaked here, and not there, and that's why WiiGator is here, not there.

Thanks for confirming the typo was in the comment. I wasn't 100% positive about it.
 

Seraph863

Active Member
Newcomer
Joined
Sep 26, 2008
Messages
41
Trophies
0
XP
7
Country
United States
No... Soft mod. Just like Waninkoko's or WiiGator's. It's Software.

The proper name for this loader is called SoftChip. That's all.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • KenniesNewName @ KenniesNewName:
    Next gen will probably be all portable
    Gift
  • T @ trimesh:
    Some things (like Super Famicom games) just feel right when you play them using the original hardware and a CRT
    Gift
  • KenniesNewName @ KenniesNewName:
    The PS tablet
    Gift
  • mthrnite tempBOT: @ mthrnite
    switches the box from tv to game
    Gift
  • T @ trimesh:
    Not so sure about that - the tendency for "graphics uber alles" tends to lead to very high power consumption
    Gift
  • KenniesNewName @ KenniesNewName:
    If you look at what's now portability graphics are catching up to console quality
    Gift
  • KenniesNewName @ KenniesNewName:
    Nintendy is a huge example of not everyone caring about powerful specs most that do will be hardcore PC players anyway
    Gift
  • T @ trimesh:
    The thing is that the IATA rules impose a pretty hard limit of 100Wh on battery sizes for lithium batteries - and it doesn't look like Li is going away soon
    Gift
  • T @ trimesh:
    So if you want (say) 4 hours of runtime you need a maximum system-level power consumption of 25W
    Gift
  • KenniesNewName @ KenniesNewName:
    Yeah but we already have AAA titles looking fine on tablet form 1080p displays
    Gift
  • KenniesNewName @ KenniesNewName:
    Human eye can only tell so much of a difference
    Gift
  • T @ trimesh:
    For reference, the PS5 is rated at 350W and the Xbox series X at 275W - and that's console only, without any display
    Gift
  • KenniesNewName @ KenniesNewName:
    But the future always holds performance never know what the aliens will donate from their left over tech
    Gift
  • T @ trimesh:
    Maybe :) - but batteries have turned out to be a pretty hard problem
    Gift
  • KenniesNewName @ KenniesNewName:
    Like I said most that will truly care will already be hard core gaming pcers
    Gift
  • T @ trimesh:
    And DF subscribers :)
    Gift
  • KenniesNewName @ KenniesNewName:
    I bet you could find a neighbor with a ps5 and they'd have no idea what the word spec means
    Gift
  • T @ trimesh:
    Yeah probably - people on forums seem to care a lot, but they are heavily self-selected
    Gift
  • KenniesNewName @ KenniesNewName:
    Most on forums try to get a good learning of actual tech
    Gift
  • Dark_Phoras @ Dark_Phoras:
    Papaya, so good
    Gift
  • KenniesNewName @ KenniesNewName:
    Only 13 more titles to go on ps3 yay
    Gift
  • Dark_Phoras @ Dark_Phoras:
    I still have a remnant of the taste of the papaya
    Gift
  • Dark_Phoras @ Dark_Phoras:
    @KenniesNewName June will come sooner than the end of that process
    Gift
  • Psionic Roshambo @ Psionic Roshambo:
    PS3 had horrible speeds off the drive
    Gift
  • Psionic Roshambo @ Psionic Roshambo:
    I always wondered why, but I am pretty sure it was trying to reduce costs
    Gift
    Psionic Roshambo @ Psionic Roshambo: I always wondered why, but I am pretty sure it was trying to reduce costs