Codes
WiiRd forum
May 05, 2024, 11:49:02 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome on the new server

Update 4.3 - do NOT update!
Gecko 1.9.3.1
Should I get a USB Gecko, I wanna hack?
How do I use my USB Gecko
Where can I get WiiRd?
 
   Home   CODE DATABASE GAMEHACKING Help Search Login Register  
Pages: 1 2 [3]
  Print  
Author Topic: USB Gecko source codes - Hardware and Latest Gecko OS  (Read 25645 times)
dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #30 on: June 03, 2011, 01:59:22 PM »

Yeah.  It runs once, I think after the dol was loaded into memory, but before control is passed over to it.

Simple ASM patches (like nop'ing the stw) only need to be written once.  It won't work for data hacks like inf health because that needs constant writes, and it won't work for C2 codes because the C2's ASM won't be loaded into memory.  But when you're struggling to fit all your codes in, being able to load the simple ASM patches from something other than your GCT file can give you that little bit of room that you need.
Logged

biolizard89
Hacker
Sr. Member
*****

Karma: 22
Posts: 373

passport.10.biolizard89@spamgourmet.com biolizard89 biolizard89
« Reply #31 on: June 04, 2011, 07:17:25 PM »

I asked Mathew_Wi to update his GCT editor to include GPF support.  If he gets it working, then you can just take 04 codes from the database, drop them into his app, and it will spit out the GPF file that you can place on your SD card.  No need to mess with gameconfig.txt.
@WiiPower, does the new GeckoOS Mod with the newer code handler also support GPF's for GameCube games?  (I don't know anything about how GPF's are implemented, which is why I didn't look at that feature when I sent you the modified sourcecode.)
Logged
WiiPower
Hacker
Sr. Member
*****

Karma: 23
Posts: 288


« Reply #32 on: June 04, 2011, 11:06:18 PM »

Gecko OS mod does only support the code handler and a very small part of the gameconfig.txt stuff. And that only for wii games.
Logged
dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #33 on: August 14, 2011, 04:58:41 PM »

So I had this great idea.  Make an application that cuts and pastes new code handlers into the .dol of a homebrew app that's running an old code handler (e.g. Gecko OS Mod).  This idea is nice because then I can start releasing custom code handlers instead of having Gecko.NET patch them.

So I looked through Gecko OS Mod and pretty easily found the code handler binary blob.  Three copies, actually, which makes sense; codehandler, codehandlerslota, codehanderonly.

The same search on Gecko OS 1931...fails.  1932 fails as well.  I can't find the binary anywhere.  I searched both the dol and elf.  Maybe the elf is packed or something?
Logged

WiiPower
Hacker
Sr. Member
*****

Karma: 23
Posts: 288


« Reply #34 on: August 14, 2011, 05:13:27 PM »

If your code handler is bigger, i expect some problems when your code handler is bigger than the old one. And for Gecko OS mod, it would be easy as well to just add it to the source and recompile.
Logged
dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #35 on: August 14, 2011, 05:34:11 PM »

Yeah, there are some limitations on how much blank space is left at the end.  It seems like there's about 332 bytes of blank space at the end, and that's assuming I'm trying to patch the smallest code handler.

Recompiling isn't easy for me because I don't have devkitppc or any of that installed.  And I was hoping to make something generic so that anyone can patch any homebrew loader with any custom code handler.
Logged

WiiPower
Hacker
Sr. Member
*****

Karma: 23
Posts: 288


« Reply #36 on: August 15, 2011, 06:20:26 AM »

Yeah, there are some limitations on how much blank space is left at the end.  It seems like there's about 332 bytes of blank space at the end, and that's assuming I'm trying to patch the smallest code handler.

Recompiling isn't easy for me because I don't have devkitppc or any of that installed.  And I was hoping to make something generic so that anyone can patch any homebrew loader with any custom code handler.

Isn't that the reserved space for variables? So if your code handler is bigger, that space if moved and then overlaps something else. Well, i'm not very good at this, so i could be wrong.
Logged
dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #37 on: August 15, 2011, 12:54:17 PM »

The code handler sits in the reserved area of memory, 80001800 to 80003000.  However, the C array that the code handler is "stored" in (codehandler.h) is 0x10C0 bytes.  That puts the end of the code handler at 800028C0 - which is precisely where the code list begins.  The code list then consumes the remaining portion, from 800028C0 to 80003000.

The space isn't so much "moved", as it is "reduced" or "pushed back".  If I added 0x40 bytes of patches to the code handler, then I would push the start of the code list back to 80002900.  Technically I would be over-writing where variables are *supposed* to go, but it doesn't depend on the initial values and it wouldn't write to anything above 80003000.  It just means that the debugger would have fewer code lines to work with, which is already true when Gecko.NET connects.  EDIT: on second thought, this would also break SD Cheats, because the code list wouldn't be where the loader expected it to be.  This could probably be worked around with gameconfig.txt

I'll have to try manually splicing a new code handler in with a hex editor.  But none of this answers why I couldn't find the code handler in Gecko OS' dol or elf files.  Is there some sort of packing that can be done on homebrew executables?
« Last Edit: August 15, 2011, 03:12:11 PM by dcx2 » Logged

biolizard89
Hacker
Sr. Member
*****

Karma: 22
Posts: 373

passport.10.biolizard89@spamgourmet.com biolizard89 biolizard89
« Reply #38 on: August 15, 2011, 07:10:18 PM »

The code handler sits in the reserved area of memory, 80001800 to 80003000.  However, the C array that the code handler is "stored" in (codehandler.h) is 0x10C0 bytes.  That puts the end of the code handler at 800028C0 - which is precisely where the code list begins.  The code list then consumes the remaining portion, from 800028C0 to 80003000.

The space isn't so much "moved", as it is "reduced" or "pushed back".  If I added 0x40 bytes of patches to the code handler, then I would push the start of the code list back to 80002900.  Technically I would be over-writing where variables are *supposed* to go, but it doesn't depend on the initial values and it wouldn't write to anything above 80003000.  It just means that the debugger would have fewer code lines to work with, which is already true when Gecko.NET connects.  EDIT: on second thought, this would also break SD Cheats, because the code list wouldn't be where the loader expected it to be.  This could probably be worked around with gameconfig.txt

I'll have to try manually splicing a new code handler in with a hex editor.  But none of this answers why I couldn't find the code handler in Gecko OS' dol or elf files.  Is there some sort of packing that can be done on homebrew executables?
There are .dol compressors in existence; one of them is at http://www.fuzziqersoftware.com/projects.php .  So yes, that could be the reason why.
Logged
Pages: 1 2 [3]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!