Gamecube Rehacked: Viper Mod/Cobra BIOS reverse engineered, open source code released

Code:
********************************************************************************
*                                                                              *
*                      Once again we are proud to say :                        *
*                  " An alle : Maulhalten, jetzt, sofort ! "                   *
*                                                                              *
*            -- The senior members of Utopia present you today : --            *
* - Anaconda04 - A viperfree Cobra04 DVD-R boot core recode in pure assembly - *
*                                                                              *
********************************************************************************

>>> The story :
Some time ago the worlds first Gamecube Modchip called "Viper" was released,
basically for the homebrew development scene to allow people to start their
applications directly at power-on of the GC. Pretty fast an application called
"Cobra" got available for it , which allows people to boot their DVD-Rs on the
gamecube. Starting of version 0.2 this application reached version 0.4 upto
now , running pretty stable on all available GC drives ( 04 , 06 and 08 ).
This application uses a special , undocumented feature on the Modchip binding
it "tight" to the Viper. Being sure that the possibility of booting DVD-Rs is
not something special of the Viper we decided to find out whats going on inside
this Cobra application. And here is the result - presented to you as open-source
to allow the community to explore and use the possibilies without using the
- in our eyes - too expensive modchip. 

>>> The stuff :
The included file "Anaconda04.S" is a full documented application source which
results in a run-able core for booting DVD-Rs. The steps it performs are as 
follows:

- Initialize the diskdrive into a reset state (by setting HW register cc003024)
- Unlock the drives' debug feature by sending two special commands named
  "ff 01 MATSHITA 02 00" and "ff 00 DVD-GAME 03 00"
- Sending some small codeblock into the drives' memory by using a command named
  "fe 01 01 00 <memoryoffset> <datalength> <data>"
- Starting this codeblock by hooking it into a system call within the drive
  resulting in the known (?) states of the bootphase of Cobra04
  (laser off, motor off, delay to swap, motor on, laser on)
- Unlocking the drive by performing a ReadDiscID command (A8000040) to be able
  to read sectors
- Enable audio streaming depending on the setup of the DiscID
- Reading , parsing and starting the apploader of the swapped disc , resulting
  in booting the application on it

As stated above, this is a complete homemade recode of just the boot core, 
no videooutput or messages are delivered during the run. Except from the
derived data within the "DriveCode" table this code is not affiliated with
the original Cobra04 code. We decided to use the data in its original state,
as the team around Mentalcube (the designers of the Cobra application) did a
well job while choosing the neccesary patches within the drive. The patchcode
is generic for all drive versions , so no need for different tables.
We leave it to the community to create some fancy GUI for it if they want,
as we just did it for the proof-of-concept and to end the countless discussions
around whats going on within the Cobra and Viper. We are even not familiar with
tools like PSOLoad, SDLoad or whatever-Load as we are using our own technique to
execute code on our GCs, but due to the simplyness of the code there should be
no problem at all to run this snippet with those things.

>>> The instruction to do :
To assemble the code you can use the free and widely available DevkitPPC.
Simply perform those steps for generating an executable .bin file:
- powerpc-elf-gcc.exe -Wl,-Ttext,0x81700000 -o Anaconda04.elf Anaconda04.S
- powerpc-elf-strip.exe --strip-debug --strip-all --discard-all
  -o Anaconda04r.elf -F elf32-powerpc Anaconda04.elf
- powerpc-elf-objcopy.exe -I elf32-powerpc -O binary Anaconda04r.elf
  Anaconda04.bin

An example .bin file already assembled with those tools is included within
this package. Upload this file to 0x81700000 and jump to this address. Other
addresses can be easily used by changing the parameter to powerpc-elf-gcc.
Please keep in mind that you have to bypass your lidswitch in some way (e.g.
rubberband) to make the code work correctly.

>>> The final talking and teasing :
And now a few words to the Mentalcube crew (and those who are interested in
some techstuff ) :
At first, we "bow down" infront of you ! You did a well job, either by finding
out all the neccessary steps and ofcourse for all the implemented crypting and
obfuscating on both sides , GC and the drive 8] . Creating a loader by patching
running code inside the drive, which then loads another loader to 0x8226 which
finally loads the patchcode to 0x8502 by offsetting bytes inside the firmware
is really a nice idea for obfuscation. And ofcourse you used the side-effect
that the commands of the drive are bitwise interpreted, so you could easily
hide them by putting alot of trash inside and around them. Even the idea to
hide the two unlock commands by a backward-turned value - statemachine was
pretty genious . Oh, and did you find out the Break 0 register functionality
to patch the firmware on your own, or did you just read the right passage
within the CPUs' manual ;-) ?

Finally , you did some "unluckily" flaws to the last states of your coding
which allowed us to present this release today :
- The idea of forbidding to read back memory from the drive should have been
  done inside one of the loaders and not by sending direct offset memorypatch
  commands - that allowed us to read the entire memory while stepping through
  the sent commands.
- the 8 bytes-from-expanded-(71)-inquiry-to-D4 & xor-stream-from-D8
  vipercommand thingie was neat and we thought this will be a hellish thing to
  reverse ... but as you encrypt the sending of the offsets you had to do it
  backwards in the second loader which we just recoded - or even better -
  NOP out the xoring in the loader - voila - basically the last sent table
  gives what a (0x)BABE wants ;-) .
  
Apart from this we say again , this was a really nice job done by Mentalcube.
Too bad they tried to bind it to the Viper and still didnt open their code
after this period of time. And we just want to clarify an important point :
We dont take nor want any credits for the possibility of booting DVD-Rs on
the GC, this was entirely made by the Mentalcube crew - we just opened this
to the members of the community who dont have a Viper around (for whatever
reasons) by de-obfuscating and recoding it into this piece of easy-to-use code.
We decided to release this code now because we think its time that people see
whats the mystery behind the Cobra code and give the chance to set up some nice
projects based on this , like we are thinking about some sort of DVD-Player
for the GC or other things.
Please keep in mind that playing copies of games you dont own is highly illegal
and in no way meant as superior function of this code ! 

Use this code at your own risk, no responsibility is taken for its functionality
at your place or exploded/fucked up GCs, drives, vipers, users, computers, DVDs,
hamsters, cats, dogs, lost wifes and everything else that may happen :-) ...
You can use this code freely in any way you like as long as you keep some
credits inside to Mentalcube and Utopia. 


Over and out - Wildlight/Utopia , 21.02.2005
 
God's Hand said:
GC "hacking" is a joke. Nothing these days is as easy as DC was.

pledgetothedcordie4fe.jpg
 
captmcblack said:
But this didn't yield GCN backups before, so I imagine it wouldn't now.

...right? Those aren't possible, I thought...

Did you even read that? GC backup have existed for quite some time and the viper chip allows them to boot off a dvd-r
 
No, I know you're supposedly able to load ripped GCN code through the BBA via game exploits, and I understand that the mod is supposed to eliminate the need for exploits...but as far as I know, there isn't a disk type that can fit in a 'Cube.

Besides, there aren't images of GCN discs, just rips, right?
 
captmcblack said:
No, I know you're supposedly able to load ripped GCN code through the BBA via game exploits, and I understand that the mod is supposed to eliminate the need for exploits...but as far as I know, there isn't a disk type that can fit in a 'Cube.

Besides, there aren't images of GCN discs, just rips, right?


COBRA FOR VIPER GC V0.4 - (19th of january, 2005)

We promised you we would fix the latest drive issue within a week, so
here is the version 0.4 of your favorite Viper GC BIOS! If you had tons of disc errors, you'll enjoy this new Cobra. Look at troubleshooting section for more info. Apart from that nothing was changed, but there will be much more in the next release! Oh yeah... you can flash this release from DVD if you already have Cobra 0.3 installed!

What's the Cobra BIOS ? A special BIOS specially tailored for your Viper GC that allows yo to run your backups (and now homebrew code!) from the GC drive using DVD(-/+)R or Mini-DVD(+/-)R! You can also enjoy imports (originals or backups) without the need of a boot disc.
 
captmcblack said:
No, I know you're supposedly able to load ripped GCN code through the BBA via game exploits, and I understand that the mod is supposed to eliminate the need for exploits...but as far as I know, there isn't a disk type that can fit in a 'Cube.

Besides, there aren't images of GCN discs, just rips, right?

You can remove the lid and fit a DVD-r perfectly in there or you can buy mini dvd-rs
 
captmcblack said:
No, I know you're supposedly able to load ripped GCN code through the BBA via game exploits, and I understand that the mod is supposed to eliminate the need for exploits...but as far as I know, there isn't a disk type that can fit in a 'Cube.

Besides, there aren't images of GCN discs, just rips, right?
you mean like the mini dvd-rs you can buy at the store? and hell with this, you can take the top off and boot full sized dvds anyway if you want to.
 
Ah, from what I've heard the Xbox is fairly difficult to mod. Soldering and stuff. Even the softmods are flakey.
 
lockii said:
Ah, from what I've heard the Xbox is fairly difficult to mod. Soldering and stuff. Even the softmods are flakey.

That depend on which version of XBOX you have. You can buy solderless modchips for version 1.0-1.5. There aren't any solderless for 1.6-1.6b yet, but that is because the motherboard is pretty different, someone will eventually make a solderless version for it.
 
catfish said:

DC was way easier. You didn't even need a modchip for that.

Although the xbox has proved much more useful. I didn't have to take my sega and my SNES with me when I moved, plus I have a nice home media center.
 
Comparing any console that requires hardware mod, to Dreamcast, where all you needed is some blank CDs, is pointless.

Nowadays, even PS2 is easier to hack than Xbox. All you need is any HDD to plug in, and that's about it, no soldering or anything.

Gamecube, on the other hand... Nintendo did amazing job protecting that thing.
 
wow, apparently, two proof of concept compiles have been made of the source, and they work...

one for PSUL (The PSO Exploit) and one for SDLoad (the Action Replay -> Memcard SDCard Adapter exploit)
 
lockii said:
Ah, from what I've heard the Xbox is fairly difficult to mod. Soldering and stuff. Even the softmods are flakey.

From what I've seen, there's only 1 point that makes the Xbox modding moderately difficult. Other than that 1 point, everything is simple if you can follow some instructions. Not as easy as Dreamcast but it becomes a more useful machine than a Dreamcast. Basically another computer for me that only plays games, movies and music :P
 
I think the GC hack is very pointless in some ways - games don't work 100% and having to a) Butcher your cube to play some pir8* game is just way too ugly/hardcore. At least with PS2/Xbox, its easy enough to do and your console still looks normal.
 
Odnetnin said:
I think the GC hack is very pointless in some ways - games don't work 100% and having to a) Butcher your cube to play some pir8* game is just way too ugly/hardcore. At least with PS2/Xbox, its easy enough to do and your console still looks normal.
AFAIK if you use only mini dvdr you do not have to butcher anything.
 
lockii said:
Ah, from what I've heard the Xbox is fairly difficult to mod. Soldering and stuff. Even the softmods are flakey.
Hotswapping the hard drive seems to give pretty good results, though, provided you don't fry anything. I guess it really depends on if you're willing to risk all your hardware dying horribly.
 
Wario64 said:
Gamecube 'backups' have been made long ago. Getting them to run is the tricky part

The whole GC modchip + boot disc + game 'backups' are fairly common out here now. Looks fairly easy.
 
So what does this mean?
Will there be an "utopia" disc for GC without the need of a chip?
A boot-disc you can burn yourself instead of buying a Freeloader?
 
Benedict said:
So what does this mean?
Will there be an "utopia" disc for GC without the need of a chip?
A boot-disc you can burn yourself instead of buying a Freeloader?

That depends on what you mean by "boot disc." There are a few methods to get it to work.

1) Any version of Action Replay Disc + SD Memory Adapter + SDload + Anaconda =Working(I got this to work)
2) Max Drive Pro Disc + Max Drive Memory Card + Anaconda = Uncorfirmed
3) PSO Ep1+2 Disc + BBA + Anaconda = Working(Got this working too)

Only problem I am having now is media compatibility. I am having some sucess with Ritek Mini DVD-R.
 
Lets try to keep this simple.

How do you run GC backups on a GC?

IS it possible without messing with the console itself?
 
Deg said:
Lets try to keep this simple.

How do you run GC backups on a GC?

IS it possible without messing with the console itself?


Hmmmm. You would need to open-up the GC to tape down the lidsensor. That's pretty much the only thing you have to mess with for the GC, unless you want to remove the lid so that you can run full size DVD-R. Or if you can't get the GC to read any media, you would probably have to tweak with the potentiometer for the laser...... I AM TRYING TO KEEP THIS SIMPLE.

After taping down the lid-sensor, to run the GC backups, you would need one of the setup from above. I am going to use #3 since anaconda was released for that method originally. You need a copy of PSO Ep 1+2 and BBA, you would also need to setup the networking part of PSO(You have to search for this yourself).

After setting up everything and hook your GC to your PC(or through a router), you need to read the instructions(I am not sure if I can tell you what to do exactly) that are included with the compiled anaconda from some website *cough*maxconsole*cough*.

This is pretty much the simplest method for PSO+BBA......
 
tenchir said:
That depends on what you mean by "boot disc." There are a few methods to get it to work.

1) Any version of Action Replay Disc + SD Memory Adapter + SDload + Anaconda =Working(I got this to work)
2) Max Drive Pro Disc + Max Drive Memory Card + Anaconda = Uncorfirmed
3) PSO Ep1+2 Disc + BBA + Anaconda = Working(Got this working too)

Only problem I am having now is media compatibility. I am having some sucess with Ritek Mini DVD-R.

You basically just run the .dol from the sd adapter and it works?? Wow. I wonder if the same works with the Max Drive... have you heard anything?
 
lockii said:
Ah, from what I've heard the Xbox is fairly difficult to mod. Soldering and stuff. Even the softmods are flakey.

The only bad bit about it is soldering 1 wire to the d0 point. There is diagrams on exactly how to do it and as long as you are careful it's done under an hour. Obviously it's not as easy as burning a disc with disc juggler and playing copied games, but a modded xbox's abilities are far greater than a DC. I mean XBMC is an amazingly professional application. We have a modded xbox sitting in our lounge and when bored we just use XBMC to look at the latest new release movie trailers, straight from the apple site.

Awesome.

I would never bother with a softmod....
 
catfish said:
We have a modded xbox sitting in our lounge and when bored we just use XBMC to look at the latest new release movie trailers, straight from the apple site.

Sorry for derailing the thread, how do you do this? (I have XBMC)
 
junkster said:
Sorry for derailing the thread, how do you do this? (I have XBMC)

got the latest version? just go to the big S symbol in the bottom right corner of the screen (or one of the funny looking buttons if you have slightly older) should bring up a menu of things, there is lot's of options in there like Reboot, dashboard etc etc. One of them should be Apple, or trailers or something.
 
You need the AppleQT trailer script or whatever. I forgot the directions, but if you search for another thread about XBOX Media Center on here, you'll find the instructions
 
bobble said:
You basically just run the .dol from the sd adapter and it works?? Wow. I wonder if the same works with the Max Drive... have you heard anything?


Someone from the maxconsole forum said they got it to work, I can't verify it because I don't have a Max Drive(or Pro).
 
Top Bottom