WiiRd forum

Wii & Gamecube Hacking => WiiRD Remote Debugger => Topic started by: dash on October 07, 2010, 04:18:54 PM

Title: Quick Questions
Post by: dash on October 07, 2010, 04:18:54 PM
I'm using linux and I prefer command line interfaces to point and click GUI's... I was wondering if anyone could answer these:

1) Is the WiiRD PC side API for communication with the USB Gecko actually written in pascal? Has anyone ported it to 'c' yet?
2) Is the Wii side of the debugger incorporated into libogc by default? Say could one debug homebrew apps by just having the USB Gecko present?
3) Has anyone implemented an artwork viewer for any game? For example you probe the game, figure out how the 3D models are stored, then write an application on the PC side to retreive models over the USB Gecko interface and display them, maybe using OpenGL?
4) Ditto for question #3 as regards sound effects?
5) Is there a limit to how big the patches can be? Suppose you wanted to supply alternate textures or different 3D models for a game (such as New Super Mario Bros Wii). Could you modify the code to access files on the SD card to pull in alternate data than the real data in the game?

Thanks
PS 1991 I used to hack sega genesis games, the machine had 64K bytes of ram. Finding where health and lives stored was easy, you'd just look for bytes that were increasing or decreasing (5, 4, 3, 2, etc) as you lose a life. Funny how the techniques stay the same over the years... I actually fixed a bug in the game Micro Machines where the blue car had more mass than the red car and could unfairly push it all over the place. Patch applied after the fact to the BIN image...
Title: Re: Quick Questions
Post by: dcx2 on October 07, 2010, 06:01:11 PM
I can understand why you prefer CLI, but I think you would find the GUI to be much faster for integrating the large amount of data involved in hacking.  There are a lot of things that the GUI will do for you that would be quite tedious to do by hand; for instance, watching memory change via Memory Viewer in real time, viewing the disassembly instead of machine code, parsing the stack so it can display the call stack.

1) WiiRD Console was implemented in Delphi, I thought.  The console and the GUI have been merged and ported to C# in a project called Gecko.NET.  The code for Gecko.NET is available on Google Code; http://wiird.l0nk.org/forum/index.php/topic,6833.0.html  It is mostly compatible with mono, although it still needs a little love...

2) I'm not sure.  Maybe one of the other devs can cover this one.  I think you might be able to use Gecko OS rebooter function to load and debug homebrew apps, maybe?  Or channel loading?

3) WiiRDGUI and Gecko.NET have File System Table (FST) tabs.  These tabs can automatically parse the directory structure for you, so you can see where the models are stored.  I believe you can even download the models and then open them in e.g. Hammer or something like that.  Gecko.NET can also automatically generate GCT codes that swap one model for another by directly modifying the FST.

4) Ditto for #3 in regards to FST.

5) I know Gecko OS supports patching, but I'm not too sure on the details.  There was once a very active Brawl+ community.  However, there's a newer project called Riivolution that is supposed to support patching via the SD card.  I don't think it has any size restrictions.  It has been used, for example, to provide an unofficial language patch for the game Fatal Frame 4, so that users outside of NTSC-J can play the game.  I believe they also made new outfit models for the game, too.

Re: PS, it's actually pretty hard to patch the actual game without something like Gecko OS or Riivolution.  Games are signed with crypto (AES, I think?).  In order to run your own game, you need Nintendo's key, or you need to patch the Wii's firmware so that it will accept forged signatures.
Title: Re: Quick Questions
Post by: Romaap on October 07, 2010, 06:43:28 PM
Quote from: dash on October 07, 2010, 04:18:54 PM
2) Is the Wii side of the debugger incorporated into libogc by default? Say could one debug homebrew apps by just having the USB Gecko present?
Yes it is, you can debug Homebrew Applications with your USB Gecko.
All the information you need is found here (http://wiibrew.org/wiki/Debugging) on Wiibrew.

Although I find the GUI version of the debugger very unstable, but I guess you wont notice that since you would use the CL version I guess. :)


Quote from: dcx2 on October 07, 2010, 06:01:11 PM
2) I'm not sure.  Maybe one of the other devs can cover this one.  I think you might be able to use Gecko OS rebooter function to load and debug homebrew apps, maybe?  Or channel loading?
Unfortunately this would not work, since libogc is different to Nintendo's official SDK it will have its standard Subroutines at other places.
So when Gecko tries to hook to one of the subroutines from Nintendo's SDK it will just be a random address in a libogc compiled Application.
Title: Re: Quick Questions
Post by: dash on October 07, 2010, 06:47:20 PM
Quote from: dcx2 on October 07, 2010, 06:01:11 PM
I can understand why you prefer CLI, but I think you would find the GUI to be much faster for integrating the large amount of data involved in hacking.  There are a lot of things that the GUI will do for you that would be quite tedious to do by hand; for instance, watching memory change via Memory Viewer in real time, viewing the disassembly instead of machine code, parsing the stack so it can display the call stack.

1) WiiRD Console was implemented in Delphi, I thought.  The console and the GUI have been merged and ported to C# in a project called Gecko.NET.  The code for Gecko.NET is available on Google Code; http://wiird.l0nk.org/forum/index.php/topic,6833.0.html  It is mostly compatible with mono, although it still needs a little love...

Thanks for your response. Somehow when I see .NET I think .SHIT, sort of a pavlovian response related to my absolute disgust of all things M$. I'll never use .NET or even an open source equivalent if one exists. I guess I'll be stuck doing the 'c' port of the basic low level functionality myself then. No big deal... My USB Gecko has to arrive in the mail first though.
Title: Re: Quick Questions
Post by: dcx2 on October 07, 2010, 06:57:17 PM
Quote from: Romaap on October 07, 2010, 06:43:28 PM
Quote from: dcx2 on October 07, 2010, 06:01:11 PM
2) I'm not sure.  Maybe one of the other devs can cover this one.  I think you might be able to use Gecko OS rebooter function to load and debug homebrew apps, maybe?  Or channel loading?
Unfortunately this would not work, since libogc is different to Nintendo's official SDK it will have its standard Subroutines at other places.
So when Gecko tries to hook to one of the subroutines from Nintendo's SDK it will just be a random address in a libogc compiled Application.

That just means we need a different hook for libogc, right?


Quote from: dash on October 07, 2010, 06:47:20 PM
Somehow when I see .NET I think .SHIT, sort of a pavlovian response related to my absolute disgust of all things M$. I'll never use .NET or even an open source equivalent if one exists.

Oh, I see.  You're one of those types of Linux people.  Have fun re-inventing the wheel.
Title: Re: Quick Questions
Post by: Romaap on October 07, 2010, 07:01:42 PM
Quote from: dcx2 on October 07, 2010, 06:57:17 PM
Quote from: Romaap on October 07, 2010, 06:43:28 PM
Quote from: dcx2 on October 07, 2010, 06:01:11 PM
2) I'm not sure.  Maybe one of the other devs can cover this one.  I think you might be able to use Gecko OS rebooter function to load and debug homebrew apps, maybe?  Or channel loading?
Unfortunately this would not work, since libogc is different to Nintendo's official SDK it will have its standard Subroutines at other places.
So when Gecko tries to hook to one of the subroutines from Nintendo's SDK it will just be a random address in a libogc compiled Application.

That just means we need a different hook for libogc, right?
As far as I know, yes that would work.

Unless Gecko wants to be in a place which is used by libogc, then we should also need to find another place for the codehandler to be.
Title: Re: Quick Questions
Post by: dash on October 07, 2010, 07:57:13 PM
Quote from: dcx2 on October 07, 2010, 06:57:17 PMOh, I see.  You're one of those types of Linux people.  Have fun re-inventing the wheel.

Err, actually it would be avoiding bloat that I never wanted in the first place. As in a GUI. A mouse is a very low bandwidth input device. Besides which I don't necessarily want to be manually doing the operations, rather a program would automate things...
Title: Re: Quick Questions
Post by: dcx2 on October 07, 2010, 09:04:15 PM
A keyboard has about the same bandwidth as a mouse.  We've got multiple GB of RAM and multiple GHz of processing power.  The USB Gecko is a glorified serial port.

You have a pre-existing prejudice that you're attempting to justify after-the-fact.  You even admitted it - your pavlovian response to any Microsoft product, even one that has been ported for Linux.

I don't want you to misunderstand me.  I don't hate C, or the idea of porting the interface.  What I can't stand is the righteous attitude of yours that I see shared by many in the Linux community.  You try to sugar-coat the attitude with excuses like 'GUIs are bloated', but I bet you're using X right now.

Feel free to port the interface, but like I said...you're going to be re-inventing the wheel.  It takes a long time to write the features included in the GUIs, and that's time that you could have spent writing codes instead.  And any process you want to automate could just as easily be automated with the GUI...it's a shame that you wouldn't want to share such features with the rest of the community.
Title: Re: Quick Questions
Post by: dash on October 07, 2010, 09:25:48 PM
Quote from: dcx2 on October 07, 2010, 09:04:15 PMI don't want you to misunderstand me.  I don't hate C, or the idea of porting the interface.  What I can't stand is the righteous attitude of yours that I see shared by many in the Linux community.  You try to sugar-coat the attitude with excuses like 'GUIs are bloated', but I bet you're using X right now.

Did you actually use the words righteous attitude? If that isn't the pot calling the kettle black.

While we're on the subject, I'll assume you were instrumental in the choice of going with .NET for a platform to develop a user interface. Here are some questions:

o Why choose a closed source, buggy, locked down operating system for what you want (clearly) to be a community project?

o Why do you assume developers will be using a microsoft OS? Because if you are going to use .NET, you're pretty much eliminating any linux or OSX users right off the bat. You know, those ones that already have thriving communities.

o Why do you assume that it's OK to require the .NET development infrastructure? Doesn't that cost money, on top of the OS itself? Oh, I get it. You pirated the OS, and you pirated the .NET development infrastructure. Silly of me to have thought otherwise, considering this Wii hacking arena we're playing in.

o What happens when .NET vanishes, when M$ stops supporting it? Can you port your .NET code elsewhere easily? Or will it vanish too? If you had used GTK+ or equivalent, your GUI would work everywhere. Windows, linux, OSX, Android. Whatever. But your .NET choice is... rather limiting. GTK will exist forever. .NET is microsoft's latest flash in the pan. I've seen 'em come and go.

I think you're trying to justify your choice of the .NET framework after the fact, when it comes right down to it. Face it, it was Just Plain Wrong. And now you're getting a taste of one of the issues -- when developers for reasons of their own decide to opt out and go their own way. Strange that you get so defensive and rude about it...

.NET. It's the next step up from Script Kiddie. Can it even be called programming? I suppose it's all relative, isn't it.

Do you know the only possible reason why someone would go with .NET is because it is easy? Like playing in a sandbox. Do you not see the irony of choosing a closed development platform in order to create an open hacking environment somewhere else? Quite funny, actually.

Now as to my specific requirements, I never use GUI based debuggers. I always use command line ones. It's just the way I'm wired. GUI's are fine for some things, like paint programs. But not for debugging. I don't even use these IDE's. Just a text editor and Makefiles for me.
Title: Re: Quick Questions
Post by: dcx2 on October 07, 2010, 10:07:37 PM
Yes, I did use "righteous attitude".

Quote from: dash on October 07, 2010, 06:47:20 PM
Somehow when I see .NET I think .SHIT, sort of a pavlovian response related to my absolute disgust of all things M$. I'll never use .NET or even an open source equivalent if one exists.

Please, show me where I said I would never use Linux or CLI for anything, ever.  I would consider that especially amusing since I actually put forth effort into making Gecko.NET run on mono.  Any "righteous attitude" I had is purely a result of your refusal to use someone else's wheel.

But while we're on the subject...

1) I didn't choose to use .NET.  Link did.  http://wiird.l0nk.org/forum/index.php/topic,6833.msg58990.html#msg58990

Mono is the open-source implementation of .NET that allows you to run them in Linux.  So no, you aren't "locked down" to a "closed source, buggy" operating system (words which again demonstrate your righteous attitude).  For that matter, at least one user runs Gecko.NET on a Mac via Virtual Machine.

And finally...well....considering how we want people to actually use this software, it might be nice if it was written for an OS that most of them have.

2) There's an app called MonoDevelop that will let you code for .NET apps in Linux.  So we aren't eliminating Linux users.  I'm sure Visual Studio can run in a VM, too...so we aren't eliminating Macs either.

3) Whoa there...you clearly have no clue WTF you are talking about.  If you have Windows, you can download and build Gecko.NET from source for free.  The .NET framework does not cost a penny.  Visual Studio Express does not cost a penny.

And then you have the audacity to claim that the Wii hacking scene supports piracy?  You're clearly new here.  We hate pirates.  We ban the discussion of backup/USB loaders from this forum.  Gecko OS can only load original Wii discs.  Team Twiizers has gone out of their way to make life harder for pirates by banning apps that use cIOS from Wiibrew.

BTW, my copy of Windows XP came bundled with my laptop.  Believe it or not, I don't mind paying for software.  I like to support developers.  They have children who need to eat and go to college.

4) What happens when .NET vanishes or loses support?  Well gee, I guess when .NET "vanishes", the magic goblins come to my PC in the middle of the night and uninstall it while I'm not looking.   :rolleyes:

BTW, good luck watching .NET "come and go".  It's been here for over 8 years.  That's some "flash in the pan".

---

Regarding the rest of your post...you're trying desperately to troll me, aren't you?  You used the wrong d-word.  I wasn't getting defensive.  I was being dismissive.  I've seen your type before, and your type is what ruins the Linux community.

Just remember, while you complain about how "easy" .NET is, that you're still using printf and scanf from a library that was written by someone else.  Real programmers write to the video card buffer and read from the keyboard BIOS buffer with system calls!   :rolleyes:

BTW, are you still using that bloated GUI called X?
Title: Re: Quick Questions
Post by: dcx2 on October 07, 2010, 10:43:34 PM
Visual Studio Express 2008 does not cost money.  http://www.microsoft.com/express/Downloads/#Visual_Studio_2008_Express_Downloads

QuoteVisual Studio 2008 Express Editions are free development tools.

EDIT: for that matter, VS2010 Express is also free.  http://www.microsoft.com/express/Downloads/#Visual_Studio_2010_Express_Downloads

Title: Re: Quick Questions
Post by: dcx2 on October 07, 2010, 11:02:43 PM
Aww, you don't have to think that.  It's not like you were irrationally refusing to use the open-source port of some framework because of pre-existing prejudices toward the original developers of the framework.  You didn't accuse me of being a pirate, nor did you attempt to belittle my programming skills with ad hominem attacks like "script kiddie".

dash is just disrespectful.  It's a quite common problem among Linux enthusiasts.  They don't believe in co-existing with other solutions; other solutions are just *wrong*.  Linux snobs are part of what keeps the masses from adopting Linux...and oddly, I bet dash prefers it that way.

What's the difference between a Windows user and a Linux user?  A Windows user doesn't care if you're running Linux.
Title: Re: Quick Questions
Post by: hawkeye2777 on October 07, 2010, 11:31:35 PM
What would be the benefits to a complete CLI (other than using less resources)? I can't think of any instances while hacking the Wii where running a couple of scripts would be more efficient than using the GUI. Maybe it's just me.
Title: Re: Quick Questions
Post by: dash on October 07, 2010, 11:32:42 PM
Quote from: dcx2 on October 07, 2010, 11:02:43 PMdash is just disrespectful.  It's a quite common problem among Linux enthusiasts.  They don't believe in co-existing with other solutions; other solutions are just *wrong*.  Linux snobs are part of what keeps the masses from adopting Linux...and oddly, I bet dash prefers it that way.

Strawman "argument", as is most of what you write. Not worthy of response.

One parting comment: You probably use devkitppc to build code for the Wii, right? And that's just a port of gcc. Which is part of the GNU suite. And the people that made that happen consciously made choices to NOT go down the path of things like .NET. You live life in blissful ignorance, not taking a stand, not understanding how decisions you make affect the world. There is right and wrong in the world. Good and evil. Microsoft is evil, they've demonstrated that endlessly.  I'm done with interacting with you. And if you're typical of what this community has to offer, perhaps I'm done interacting with it as well.

Title: Re: Quick Questions
Post by: dash on October 07, 2010, 11:35:29 PM
Quote from: hawkeye2777 on October 07, 2010, 11:31:35 PM
What would be the benefits to a complete CLI (other than using less resources)? I can't think of any instances while hacking the Wii where running a couple of scripts would be more efficient than using the GUI. Maybe it's just me.

What if you wanted a tool to examine and display data structures (such as 3D models) in a game? Something that is very specific to an individual game. It uses the USB Gecko and the embedded debugger for IO but nothing else.

If you have a GUI you lock yourself into just one thing. There is more to the world than just coming up with a hack to give the player infinite lives...
Title: Re: Quick Questions
Post by: dcx2 on October 08, 2010, 12:26:50 AM
"strawman"?  Something tells me you don't actually know what that means...a straw man argument is where I pretend you said something you didn't actually say, and then refute your pretend argument because it's easier than refuting your actual argument.

However, my response directly refutes the lies in your post.  i.e. that we pirate Visual Studio, that you can't run .NET on Linux, that .NET will come and go...those are your arguments.  I can quote you on them.  That's not a straw man.

And the next time you decide to share this primitive Machiavellian world view where Microsoft is "evil", just remember how much more money Bill Gates has donated to charity than you.

BTW: check out Shadow's model hacks.  I'm pretty sure she wrote those codes with the GUI...  http://wiird.l0nk.org/forum/index.php/topic,1840.msg51373.html#msg51373
Title: Re: Quick Questions
Post by: dash on October 08, 2010, 02:48:23 AM
Quote from: Mathew_Wi on October 08, 2010, 12:24:25 AM
Removed.

I'm very much wondering why I joined actually. Goodbye, and congratulations to all for driving away a potential contributor.
Title: Re: Quick Questions
Post by: James0x57 on October 08, 2010, 03:48:25 AM
Dude, you can contribute anything you want; just don't upload your antagonizing attitude as an attachment. That is far more bloat than M$'s extra baggage.


You project yourself as capable, so if you want to contribute, you probably will. And if you don't want to, then... we'll see you if we see you. *shrugs*
Title: Re: Quick Questions
Post by: dcx2 on October 08, 2010, 08:38:55 AM
I'll never understand Linux snobs.  You try to help them, and they bust out their holier-than-thou attitude on you because you don't do it their way.  And when you react negatively to their condescending demeanor, then start attacking you like you're the rude one.  They'll slander you ("script kiddie" or "pirate") without knowing a single thing about you.  When you call them out on their weak arguments they just yell "strawman!" and run away.

In my experience, that type of person only makes negative contributions to a project.

EDIT: in case it is necessary to clarify, because I may have been more abrasive than intended...I do not believe all Linux users are snobs.  I *like* Linux - on my router, desktop, netbook, and phone.  Link, hawkeye2777, giantpune, myself (who I only really know because they chime in on mono)...any number of other users I am unaware of...we coexist just fine.  They even tolerate how I pay less attention to the mono side, and that makes me feel bad and want to devote some time to it.

Regular users may have a preference one way or the other...but no one busts out the religion on you.  The religion is what makes one a snob, and probably what sets me off... :(
Title: Re: Quick Questions
Post by: Link on October 08, 2010, 09:56:37 AM
To end this in short: the WiiRd console has been ported.. it was Delphi code however I adjusted it to compile on FreePascal on Linux.. the binaries are even availible: http://wiird.l0nk.org/projectfiles/ - both x86 and amd64 (x86 version not compatible with amd64 libftdi versions). Also the source code is there in wrd0.9.3-src.zip .

What you need is libftdi - however, without additional memory searching programs or GCT creation programs.. the console app is hardly usable.. but you can use it! And no GUI, no X-Server involved!
However, just accept most people here are Windows users.. noone of us would send a developer for the Linux platform into the corner.. if someone seriously needs input on how to create Linux stuff, we're here! However, do not expect us as Windows users to create perfect ports. After all: WiiRd or Gecko.net are mostly developed by us FOR us. We try to keep the interface community friendly, however a typical example for Gecko.net: there is no pointer search yet as dcx2 and me both use other ways to search pointers (I personally disassemble) - thus while I still want to do it is has low priority - same for Linux. We do not get money, we do not get donations - so do not expect much to happen there.

And before I am blamed as Windows nerd.. this forum is running on a Linux server. A Linux server I completely set up from installation to Apache setup, Mail server setup with custom authentication, self-written PAM modules and whatever. I do LOVE(!) Linux as a server operating system, I prefer it much over Windows servers here. But as a typical daily use operating system, I still stick to Windows. Admittedly probably because I am also a PC gamer and Linux still lacks many many games!
Title: Re: Quick Questions
Post by: antidote on October 29, 2010, 06:59:09 AM
I love linux, and i support it massively, however dash is just being a completely egotistic prick, Microsoft is not evil :rolleyes: nor is .NET, which was drawn up by IBM and partners and passed by the EMCA not Microsoft. Microsoft is just a developer of one version of the CLR and have no legal claim to anything BUT Their implementation of it, C# IS cross platform as it was DESIGNED to be.

Now really, .NET locks people into windows? Wow, i've never heard such something that uneducated in a while, dash a word of advice from one Linux user to another: DO SOME RESEARCH. dcx has been on the right track from minute one while you've been ragging on Microsoft since your second post. .NET is an excellent platform and WON'T be "vanishing" from the internet or our computers for a long time.
Title: Re: Quick Questions
Post by: Nuke on October 29, 2010, 11:39:05 AM
Something is only 'Free' if you value your time as worthless. Mono develop can help speed up developing Linux apps a great deal, so for sure its a great thing.

If you truly wanted to make a cross platform GUI, I think GLUT (Open GL) is probably a good solution, but it would be massively time consuming as you will need to create all the widget, buttons etc yourself.

Edit: There is also QT and Wxwidgets but I have never used them.
Title: Re: Quick Questions
Post by: Panda On Smack on October 29, 2010, 11:56:40 AM
dash the douche? Having a mid-life crisis?

QuotePride is before a crash, and a haughty spirit before stumbling.
Better is it to be lowly in spirit with the meek ones than to divide spoil with the self-exalted ones.

I wanna see this btw
http://www.youtube.com/watch?v=Oo-cIGVaOYE

Title: Re: Quick Questions
Post by: Panda On Smack on October 29, 2010, 12:10:42 PM
on an unrelated note you should all watch this:

http://www.youtube.com/watch?v=GxY5fDn5sjQ
Title: Re: Quick Questions
Post by: megazig on November 02, 2010, 06:45:11 AM
Quote from: Nuke on October 29, 2010, 11:39:05 AM
Something is only 'Free' if you value your time as worthless. Mono develop can help speed up developing Linux apps a great deal, so for sure its a great thing.

If you truly wanted to make a cross platform GUI, I think GLUT (Open GL) is probably a good solution, but it would be massively time consuming as you will need to create all the widget, buttons etc yourself.

Edit: There is also QT and Wxwidgets but I have never used them.


Qt is my solution. makes my gecko PC app a breeze to run. also made the modular aspect very nice for having game specific loading of windows and tools