WiiRd forum

USB Gecko Related => USB Gecko Dev => Topic started by: biolizard89 on December 28, 2010, 10:43:54 PM



Title: GeckoTunnel - LAN Play + Ghost/Replay Recording for Wii (Public Alpha 3)
Post by: biolizard89 on December 28, 2010, 10:43:54 PM
EDIT: LAN Play is now supported in Public Alpha 3

I released the first public alpha of GeckoTunnel over at the Fuzziqer Software forums, and I figured people here might be interested.  GeckoTunnel is a tool to synchronize multiple Wii consoles using the USB Gecko.  It currently supports recording and playback of ghosts/replays, and will (hopefully) eventually support network play.  The only supported game at the moment is Sonic Adventure 2: Battle for GameCube (USA version), but I plan to support more games in the future.  I will also be releasing instructions for adding support for other games yourself, if you enjoy hacking (it's not particularly difficult).

This is a public alpha; don't be surprised if your Wii crashes occasionally.  That said, I would definitely like to hear what people think of it.  Bug reports and feature requests welcomed.

https://veclabs.posterous.com/pages/geckotunnel


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: Deathwolf on December 28, 2010, 10:48:03 PM
WTF nice tool !?  :o
if I understand it right, you can record/playback videos?


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: biolizard89 on December 29, 2010, 12:21:57 AM
WTF nice tool !?  :o
if I understand it right, you can record/playback videos?
Thanks.  Yes, if you have a supported game (currently the USA version of Sonic Adventure 2: Battle for GameCube), you tell GeckoTunnel (on the PC) to start recording, and then you play through the level on the Wii.  Tell GeckoTunnel to playback the file, and the gameplay will be played back on the Wii.  At the moment, it records player 1 and plays back to player 2, so you can race against a recording you made previously.

It works by transferring controller pad data, player XYZ coords, and other data over the USB Gecko.


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: Skiller on December 29, 2010, 04:28:08 AM
WTF nice tool !?  :o
if I understand it right, you can record/playback videos?
Thanks.  Yes, if you have a supported game (currently the USA version of Sonic Adventure 2: Battle for GameCube), you tell GeckoTunnel (on the PC) to start recording, and then you play through the level on the Wii.  Tell GeckoTunnel to playback the file, and the gameplay will be played back on the Wii.  At the moment, it records player 1 and plays back to player 2, so you can race against a recording you made previously.

It works by transferring controller pad data, player XYZ coords, and other data over the USB Gecko.

Ahh he was thinking more along the lines of alowing u to record  an AVI file .. not Data Catch...
Still nice app . :) would be intresting to see on games like Golden Eye lol


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: biolizard89 on December 29, 2010, 05:39:26 AM
WTF nice tool !?  :o
if I understand it right, you can record/playback videos?
Thanks.  Yes, if you have a supported game (currently the USA version of Sonic Adventure 2: Battle for GameCube), you tell GeckoTunnel (on the PC) to start recording, and then you play through the level on the Wii.  Tell GeckoTunnel to playback the file, and the gameplay will be played back on the Wii.  At the moment, it records player 1 and plays back to player 2, so you can race against a recording you made previously.

It works by transferring controller pad data, player XYZ coords, and other data over the USB Gecko.

Ahh he was thinking more along the lines of alowing u to record  an AVI file .. not Data Catch...
Still nice app . :) would be intresting to see on games like Golden Eye lol
Right, it doesn't record .avi files; the data it logs consists of game variables which can reconstruct the gameplay when put back into the game.  The advantage of this method is that it uses very little bandwidth... the eventual goal is to use this to enable online play of supported games, and the bandwidth usage is low enough that it would even work on dial-up (although it would lag due to ping).

And yes, there are a lot of games with which this would be fun.  Adding support for new games isn't very hard; I plan to publish instructions on doing so soon.


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: Nuke on December 29, 2010, 06:05:55 AM
Awesome,

Feel free to post / PM the source to the Client app and i'll port it to Mac / Linux for you.


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: Link on December 29, 2010, 09:00:41 AM
Wow, that's a great tool! Absolutely perfect work!


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: James0x57 on December 30, 2010, 05:47:19 PM
Dude, sweet! Great idea too. =D
I remember a similar tool on GCN but it was specifically for SSBMelee and you had to go through the lengthy PSO hack to boot homebrew..

How often does it capture the controller data though?

Will you have to deliberately slow the frame rate a tiny bit to try and keep it in sync when you program the online part?


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: biolizard89 on December 30, 2010, 07:27:57 PM
Dude, sweet! Great idea too. =D
I remember a similar tool on GCN but it was specifically for SSBMelee and you had to go through the lengthy PSO hack to boot homebrew..

How often does it capture the controller data though?

Will you have to deliberately slow the frame rate a tiny bit to try and keep it in sync when you program the online part?
Thanks James!  The GCN tool you're referring to is GCARS-CS by Fuzziqer; I was loosely involved in that project (beta tested, worked on adding additional games, although I wasn't involved in coding it).  My experience in that project was definitely helpful while writing GeckoTunnel.

GeckoTunnel captures controller data every frame.  (By contrast, GCARS-CS did so every 6th frame by default.)  Slowing the frame rate shouldn't be necessary when playing online; if lag causes data to not be received by the next frame, GeckoTunnel will simply send the Wii the data from the previous frame.  When the new data arrives, the game will be resynced by the XYZ coords, health, etc.

By the way, I think I may have neglected to mention in the readme that for controller data to work, the PadRead hook must be used.  I believe GeckoOS Mod calls this "Unknown1" but I can't remember for certain.  So for those of you who want to try it out, make sure you have the correct hook.

@Link: Thanks!

@Nuke: Thanks, I'll PM you when I have a chance.


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: James0x57 on December 30, 2010, 10:28:04 PM
Ah, delicious! Since almost everyone has Wii Sports and many have Wii Play, you might want to consider setting up defaults for those two games once you nail down the online stuff. Might be a "selling" point you could advertise. ^^

Thanks for sharing this here with us. =)


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: hetoan2 on December 31, 2010, 04:12:28 PM
i believe that mdmwii got something similar to this working for mario kart wii, the file with button presses is recorded by the game though, and then after dumped he figured out how to stick it back in the memory (while not in replay mode) to do a live replay of it.

although it helped that the feature was natively supported.

this is a great tool though, although this wouldn't work if the game doesn't take in the button presses from a certain address, right?


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: biolizard89 on December 31, 2010, 10:10:40 PM
@James: No problem.  Yes, Wii Sports is one of the games I'd like to support fairly early on, and Wii Play shouldn't be hard either.

@hetoan2: GeckoTunnel reads/writes to the controller data address, using the PadRead hook.  By doing this, anything it writes to that address is interpreted by the game as having come directly from the PadRead function (and thus will be considered as the latest controller data until the next frame).  If a game's PadRead can't be hooked, then there will be problems (although presumably a custom hook could be made).  On GameCube at least, I have not run across a game whose PadRead can't be hooked (I'm told that there are some on Wii, but haven't fully investigated those cases).

I hadn't heard about mdmwii's project, but yeah, GeckoTunnel reads/writes the data in real-time, which can allow for other more interesting enhancements than just replay recording (e.g. netplay).


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: hetoan2 on January 01, 2011, 12:01:46 PM
mdmwii didn't make a project, he was just messing around with it:

http://www.youtube.com/watch?v=JcAdWqGDUeA

thats a code he made which pretty much moves the downloaded TT data to the current player inputs, but he has done it with a USB Gecko I'm pretty sure.


Anyways, I've found an address in a game, and when I poke it, the game takes the inputs from there sometimes, I was wondering how this could be changed to make it directly take inputs (i presume i need to make a hook for it, although i havent the slightest idea on how to do that), that way I could either use a controller from my PC, or make rapid fire etc. Also, the game requires OSSleepThread hooktype to begin with, so if there's a gecko hook that would have worked, it wont here :\


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: biolizard89 on January 01, 2011, 08:41:38 PM
mdmwii didn't make a project, he was just messing around with it:

http://www.youtube.com/watch?v=JcAdWqGDUeA

thats a code he made which pretty much moves the downloaded TT data to the current player inputs, but he has done it with a USB Gecko I'm pretty sure.


Anyways, I've found an address in a game, and when I poke it, the game takes the inputs from there sometimes, I was wondering how this could be changed to make it directly take inputs (i presume i need to make a hook for it, although i havent the slightest idea on how to do that), that way I could either use a controller from my PC, or make rapid fire etc. Also, the game requires OSSleepThread hooktype to begin with, so if there's a gecko hook that would have worked, it wont here :\
You may have noticed that GeckoTunnel's readme says it aims to support "alternate input methods"; this is referring to controlling the GameCube/Wii game using USB controllers on a PC (or anything that can emulate them; GlovePIE would enable a huge amount of possibilities).  Doing this isn't hard, GeckoTunnel as-is will handle this without huge modifications; all I really need to do is link in an SDL or DirectInput library that produces the data in the standard GameCube/Wii format.  I already did this with the GameCube Broadband Adapter (with Fuzziqer's GCARS-CS) years ago; doing it on the USB Gecko with GeckoTunnel isn't much different.

Of course, this only works reliably if the PadRead function can be hooked. For a game that requires OSSleepThread, the way I would go about it would be setting a write BP on the pad data address, and writing a manual hook to the GeckoOS code handler into the resulting function using the C6 codetype.  I haven't actually done this, but that's what I would try.


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: hetoan2 on January 01, 2011, 10:31:45 PM
Erm, I get 80004290:  9D2CFFFF   stbu   r9,-1(r12)

doesn't that mean that it's already been hooked, seeing as thats in the gecko region :S


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: biolizard89 on January 04, 2011, 08:48:07 PM
Erm, I get 80004290:  9D2CFFFF   stbu   r9,-1(r12)

doesn't that mean that it's already been hooked, seeing as thats in the gecko region :S
Hmm, I'm not sure.  The Gecko code handler shouldn't be writing to stuff unless it's already hooked or you have a code enabled which writes there.  Sorry I can't be of more help.


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: biolizard89 on March 01, 2011, 07:11:19 AM
I'll be giving a talk on the research which Fuzziqer and I have done with GCARS-CS and GeckoTunnel at the University of Oklahoma Undergraduate Research Day Conference on March 26.  For an abstract of the talk, see http://veclabs.posterous.com/pages/publications-and-talks .  I hope to upload the talk onto YouTube shortly after the conference for the community to watch.


Title: Re: GeckoTunnel - Ghost/Replay Recorder for Wii
Post by: biolizard89 on January 03, 2012, 02:00:55 AM
New release Public Alpha 2 PadSim Edition.  This is the 5-player SSBM that I demoed a while back.  It has glitches (some of the controls don't work properly), but I haven't had time to fix them, so I figure I might as well post what I have.

See the link in the first post for the download.

(Hopefully we'll see more features soon...  ;) )

Happy New Year!


Title: Re: GeckoTunnel - LAN Play + Ghost/Replay Recording for Wii (Public Alpha 3)
Post by: biolizard89 on April 08, 2012, 07:33:17 AM
New Release: LAN Play is now working and released!  See the link in the first post of this thread.

Bug reports and suggestions welcome!


Title: Re: GeckoTunnel - LAN Play + Ghost/Replay Recording for Wii (Public Alpha 3)
Post by: [email protected] on April 08, 2012, 04:52:12 PM
sooo, which addresses do you need to make the replay stuff for other Wii games?
MKWii would probably be cool since we´ve got pretty much everything there.


Title: Re: GeckoTunnel - LAN Play + Ghost/Replay Recording for Wii (Public Alpha 3)
Post by: biolizard89 on April 08, 2012, 09:01:35 PM
sooo, which addresses do you need to make the replay stuff for other Wii games?
MKWii would probably be cool since we´ve got pretty much everything there.
At the moment, I'm rewriting the code that adds support for new games, because the current code doesn't play well with a lot of games.  Once that's finished, I would most likely need the data from a read/write breakpoint for each of the following variables:

Controller data (GameCube pad and/or Wiimote)
Player XYZ coordinates
Weapons
Anything else that might need to stay the same between different consoles to keep them synced.

Most likely I would only need the breakpoint data for a single player slot and a single level (I can hook the ASM where it broke to find the rest of the players).

I'll publish a full guide on this subject once I have the rewrite finished and tested, but that's basically how it should work.