Open source Drivechip

ViperGC/Qoob/etc
User avatar
liquitt
Posts: 1810
Joined: Thu Apr 01, 2010 5:43 am
Location: neverland

Re: Open source Drivechip

Post by liquitt » Tue Feb 15, 2011 10:14 pm

interesting that this pops up 5 years after the release and while everybody is talking about it.

come on - who's the author :P
please search before you ask - a lot has been discussed already!
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr

we also have a wiki filled with knowledge
http://is.gd/dX58Rm
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: Open source Drivechip

Post by emu_kidid » Tue Feb 15, 2011 10:20 pm

Haven't seen the author around for a while :(
Image
MrSporty
Posts: 43
Joined: Tue Feb 08, 2011 7:40 pm

Re: Open source Drivechip

Post by MrSporty » Wed Feb 16, 2011 7:57 am

Never been told but i always assumed the author was a user called Cheqmate. I remember chatting on IRC to him back in the day and he was very knowledgable about the inner workings of the GC (and Wii) drivecodes.
User avatar
andzlay
Posts: 447
Joined: Thu Jul 08, 2010 12:53 am
Location: Germany

Re: Open source Drivechip

Post by andzlay » Wed Feb 16, 2011 8:24 am

But really interesting posting... I got a Xeno 2.0 back in 2009 or more likely 2010 (not sure) from discoAzul (spanish shop).
MrSporty
Posts: 43
Joined: Tue Feb 08, 2011 7:40 pm

Re: Open source Drivechip

Post by MrSporty » Wed Feb 16, 2011 11:13 am

Quick dissasembly of the last 8 command long block.

Code: Select all

0x008674:	F474 740A08	MOV	$080A74,A0
0x008679:	F720 4C80		MOV	A0,($804C)
0x00867D:	F474 00D040	MOV	$40D000,A0
0x008682:	F000			JMP	(A0)
First two commands look to restore some sort of pointer within the drivecode. The last two obviosuly launch our main payload.
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: Open source Drivechip

Post by emu_kidid » Wed Feb 16, 2011 12:05 pm

:D nice work MrSporty. Yes, cheqmate, aka cheq, aka adhs.
Image
MrSporty
Posts: 43
Joined: Tue Feb 08, 2011 7:40 pm

Re: Open source Drivechip

Post by MrSporty » Wed Feb 16, 2011 1:17 pm

Ahh it makes more sense now. Its kinda like a springboard into launching our drivecode payload.

We upload a main block to 0x40D000, then a small "cleanup" routine to 0x008674 and then our final command overwrites what i assume to be an IRQ pointer.

The re-directed IRQ returns to our cleanup routine which restores the original IRQ pointer value and then jumps to our main payload.

Neat. Now to dissasemble the main payload
MrSporty
Posts: 43
Joined: Tue Feb 08, 2011 7:40 pm

Re: Open source Drivechip

Post by MrSporty » Wed Feb 16, 2011 7:05 pm

Yay, even more progress. Im currently spending a bit of time picking apart the main initial payload. As far as i can tell it basically repurposes the debug port to enable a much higher transmission speed. I also grabbed a more detailed pic of the transition between the regular debug commands and the faster xeno data.

Image

Pictured in this image you can see the speed of the clock (top most line) change from the debug speed of about 130us per bit to about 9us.

After having upped my L.A's sample rate, i was able to get a nice clear picture of the data. You can see that its still SPI data but at a much faster rate. :)
MrSporty
Posts: 43
Joined: Tue Feb 08, 2011 7:40 pm

Re: Open source Drivechip

Post by MrSporty » Thu Feb 17, 2011 9:17 pm

Phew, well after a short while sampling, chopping and coverting i now have the 2109 bytes of the main Xeno payload, Woot !

With a cursory glance it does look like valid drivecode but as i have yet to fully dissasemble the "high speed loader" i have no idea where in memory it is loaded or in how many parts.

It does look valid though. In the high speed loader there is this section of code:

Code: Select all

F4C000D140		MOV	($40D100),D0
F7484444		CMP 	$4444,D0
And in the main payload there is a string of bytes "4444F44000D140" Basically this is using the value 0x4444 at location $40D100 as a signature of data been written.

Im going to spend a bit of time knocking together a basic skeleton of code for an AVR and see what comes of sending just the data i have so far.

Then i will look at the start button functions.

Will keep you posted
Last edited by MrSporty on Thu Feb 17, 2011 9:55 pm, edited 1 time in total.
User avatar
KirovAir
Posts: 214
Joined: Sat Jan 22, 2011 12:13 pm
Location: Netherlands

Re: Open source Drivechip

Post by KirovAir » Thu Feb 17, 2011 9:31 pm

Great progress!
Very interesting reads here, following this daily. :)
"The only thing more dangerous than a hardware guru with a code patch is a programmer with a soldering iron."
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: Open source Drivechip

Post by emu_kidid » Thu Feb 17, 2011 10:00 pm

MrSporty, nice :)

Put some LED's on the AVR ;)
Image
MrSporty
Posts: 43
Joined: Tue Feb 08, 2011 7:40 pm

Re: Open source Drivechip

Post by MrSporty » Thu Feb 17, 2011 10:12 pm

Lol,i could make it look like kitt from knightrider but it wouldn't make it any more funtional :P

What was catching my interest is the credits payload that it can run via the start button. At first i thought it might be a way of loading swiss but as you mention, it patches the apploader which i assume only runs after a disk has booted.. so no real point cos if you can boot a disk , you can boot a disk with swiss on it.

Must a be a small file that credit payload. The high speed loader and final payload take up about 2.6k. With the SPI code it doesn't leave much more than about 5k on a standard Atmega8.
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: Open source Drivechip

Post by emu_kidid » Thu Feb 17, 2011 10:31 pm

MrSporty, yes, it's incredibly small but in essence you can implement a DOL loader if you fake a few reads more ;)

You basically would need to fake the disc authentication to make the cube think a disc is inserted, then fake the disc read id, the region check (0x45b? - I'd need to log what the ipl actually reads first to confirm since it's been too long) and just a part of the apploader.

The apploader as you probably know is executed by the ipl, it blindly calls it without validating that it's actually an apploaoder, so we could just write a piece of code that loads homebrew instead :)
Image
MrSporty
Posts: 43
Joined: Tue Feb 08, 2011 7:40 pm

Re: Open source Drivechip

Post by MrSporty » Sat Feb 19, 2011 12:23 pm

Just in case anyone is interested, here are the 2 main payloads for the Xeno1

Payload1 is the smaller high speed loader and associated commands.

Payload2 is the main piece of drive code loaded in the second instance
Attachments
Payload2.zip
Secondary Main Payload
(1.59 KiB) Downloaded 474 times
payload1.zip
Initial "High Speed Loader"
(329 Bytes) Downloaded 467 times
User avatar
bearteam
Posts: 152
Joined: Sat Feb 19, 2011 1:21 pm

Re: Open source Drivechip

Post by bearteam » Sat Feb 19, 2011 1:24 pm

I hope someone could continue this work and make it into a super GAMECUBE modchip like wiikey fusion which supports reading ISO directly from SD card :)
MrSporty
Posts: 43
Joined: Tue Feb 08, 2011 7:40 pm

Re: Open source Drivechip

Post by MrSporty » Sat Feb 19, 2011 1:27 pm

Not that its the final goal of this partiular project but if enough people contribute with any information they can, anything should be possible.
stuntpenguin007
Posts: 1
Joined: Tue Mar 22, 2011 9:21 pm

Re: Open source Drivechip

Post by stuntpenguin007 » Tue Mar 22, 2011 9:47 pm

I realize this is a month old bump, but I'm planning on building a gamecube drivechip based off of an arduino, and this thread looks like the exact same thing I'm trying to do. I'm new to embedded programming, so so some of my questions might be noobish.

I was reading through tmbinc's wiki: http://tmb.elitedvb.net/dvd-game/index. ... l_Commands and it says that a bit is read from SBI3 when SBT3 goes high. SBI3 being pin 4 and SBT3 being pin 2 of the debug connector. From what I can tell, SBT3 is always high. I think it's part of the 5V rail, because when I pull it high (don't worry, the GC was turned off :roll:), the power LED lights up.

After skimming this thread I saw that you said the debug connector uses SPI. This means there is a clock signal right? Would you mind giving me a pinout of the CN302 in terms of SPI?
MrSporty
Posts: 43
Joined: Tue Feb 08, 2011 7:40 pm

Re: Open source Drivechip

Post by MrSporty » Sat Mar 26, 2011 11:00 pm

Only reason i stopped this project is that the original source was released. Grab that and work out the pinout and all will be revealed.
User avatar
Dragoon
Posts: 323
Joined: Thu Jan 27, 2011 1:01 pm

Re: Open source Drivechip

Post by Dragoon » Sun Mar 27, 2011 11:21 am

litle problem, you can't compile :s
Image
skygames
Posts: 2
Joined: Tue May 03, 2011 2:40 pm

Re: Open source Drivechip

Post by skygames » Sat May 07, 2011 8:22 pm

:D Hello my friends thanks, wiikey is working on my gamecube, thanks to everyone who helped me without even knowing it, without it this topic would not be possible, I would still be trying to find a modchip fo my beloved cube.Image
Attachments
07052011312.jpg
(1.05 MiB) Not downloaded yet
Last edited by skygames on Sat May 14, 2011 6:42 pm, edited 1 time in total.
User avatar
Hugo_Peters
Posts: 96
Joined: Sun Apr 03, 2011 9:17 am
Location: The Netherlands
Contact:

Re: Open source Drivechip

Post by Hugo_Peters » Sat May 14, 2011 5:22 pm

skygames wrote::D Hello my friends thanks, wiikey is working on my gamecube, thanks to everyone who helped me without even knowing it, without it this topic would not be possible, I would still be trying to find a modchip fo my beloved cube.
Er, well I'm very happy for you, but you probably posted this into the wrong section.
Emu, what do you think?
Image
GameCube:
DOL-001 with WiiKey Fusion, Viper GC Extreme, SDGecko
User avatar
liquitt
Posts: 1810
Joined: Thu Apr 01, 2010 5:43 am
Location: neverland

Re: Open source Drivechip

Post by liquitt » Sat May 14, 2011 5:45 pm

Hugo_Peters wrote:
skygames wrote::D Hello my friends thanks, wiikey is working on my gamecube, thanks to everyone who helped me without even knowing it, without it this topic would not be possible, I would still be trying to find a modchip fo my beloved cube.
Er, well I'm very happy for you, but you probably posted this into the wrong section.
Emu, what do you think?
what do you mean?
please search before you ask - a lot has been discussed already!
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr

we also have a wiki filled with knowledge
http://is.gd/dX58Rm
User avatar
Hugo_Peters
Posts: 96
Joined: Sun Apr 03, 2011 9:17 am
Location: The Netherlands
Contact:

Re: Open source Drivechip

Post by Hugo_Peters » Sun May 15, 2011 6:47 pm

liquitt wrote:
Hugo_Peters wrote:
skygames wrote::D Hello my friends thanks, wiikey is working on my gamecube, thanks to everyone who helped me without even knowing it, without it this topic would not be possible, I would still be trying to find a modchip fo my beloved cube.
Er, well I'm very happy for you, but you probably posted this into the wrong section.
Emu, what do you think?
what do you mean?
I mean, what does Emu thinks of this misplaced post?
Image
GameCube:
DOL-001 with WiiKey Fusion, Viper GC Extreme, SDGecko
User avatar
liquitt
Posts: 1810
Joined: Thu Apr 01, 2010 5:43 am
Location: neverland

Re: Open source Drivechip

Post by liquitt » Sun May 15, 2011 7:07 pm

is it misplaced? thought he reflashed his wiikey somehow :D
please search before you ask - a lot has been discussed already!
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr

we also have a wiki filled with knowledge
http://is.gd/dX58Rm
User avatar
KirovAir
Posts: 214
Joined: Sat Jan 22, 2011 12:13 pm
Location: Netherlands

Re: Open source Drivechip

Post by KirovAir » Mon May 16, 2011 6:48 am

skygames wrote::D Hello my friends thanks, wiikey is working on my gamecube, thanks to everyone who helped me without even knowing it, without it this topic would not be possible, I would still be trying to find a modchip fo my beloved cube.Image
Nice job!
Also very handy, as there is a huge amount of Wiikeys compared to Xeno's. :)
"The only thing more dangerous than a hardware guru with a code patch is a programmer with a soldering iron."
Post Reply