gecko.net screencapture

Started by Stuff, September 30, 2011, 04:31:18 AM

Previous topic - Next topic

Stuff

How does this work? Is there like a known area in memory that handles the screen? I feel stupid asking this. >.>
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm

Bully@Wiiplaza

it would be great if someone finds a way to screen-cap to the sd card using a gecko code. :(
You weren´t first with that question though :D
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

matt123337

Quote from: Bully@Wiiplaza on September 30, 2011, 11:02:46 AM
it would be great if someone finds a way to screen-cap to the sd card using a gecko code. :(
You weren´t first with that question though :D
For that, you would have to have a full (well, at least just writing) SD card filesystem as a cheat code. Storing it as a.bmp wouldn't be very hard tho...

I could be possible to do with the 32kb mem hack tho...

Bully@Wiiplaza

My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

biolizard89

Quote from: Stuff on September 30, 2011, 04:31:18 AM
How does this work? Is there like a known area in memory that handles the screen? I feel stupid asking this. >.>
There are two framebuffers on the GC/Wii (EFB and XFB), both of which are fairly simple to dump and are generally independent of the game.  I know GCNrd could dump both; I'm not certain which one Gecko.NET dumps.

Y.S.

#5
Gecko.net captures the screen this way:
[spoiler]public Image Screenshot()
       {
           MemoryStream analyze;

           //Dump video registers
           analyze = new MemoryStream();
           Dump(0xCC002000, 0xCC002080, analyze);
           analyze.Seek(0, SeekOrigin.Begin);
           Byte[] viregs = new Byte[128];
           analyze.Read(viregs, 0, 128);
           analyze.Close();

           //Extract width, height and offset in memory
           UInt32  swidth = (UInt32)(viregs[0x49] << 3);
           UInt32 sheight = (UInt32)(((viregs[0] << 5) | (viregs[1] >> 3)) & 0x07FE);
           UInt32 soffset = (UInt32)((viregs[0x1D] << 16) | (viregs[0x1E] << 8 ) | viregs[0x1F]);
           if ( (viregs[0x1C] & 0x10) == 0x10)
               soffset <<= 5;
           soffset += 0x80000000;
           soffset -= (UInt32)((viregs[0x1C] & 0xF) << 3);

           //Dump video data
           analyze = new MemoryStream();
           Dump(soffset, soffset + sheight * swidth * 2, analyze);
           analyze.Seek(0, SeekOrigin.Begin);

           if (sheight > 600) //Progressive mode!
           {
               sheight = sheight / 2;
               swidth = swidth * 2;
           }

           Bitmap b = ProcessImage(swidth, sheight, analyze);
           analyze.Close();

           return b;
       }[/spoiler]
http://www.google.com/codesearch#HsfwLymuR-k/trunk/GeckoDotNET/Gecko%20dNet/USBGecko.cs&q=viregs%20package:http://geckowii%5C.googlecode%5C.com&l=1792

Stuff

I guess it would've made sense to look at the source code. >.<

I did want to be able to add screenshot functions to any game with a code. I'm sure I wasn't the first to want this. But from what everyone says, it might be too big of a code since you need to add sd card access to it. I had a thread before about the screencap on FFCC because that one is nice and can be done anywhere, if I'm not mistaken. With the extended code list it might fit. Can't the extended codelist work at the end of the main codelist? So that it could be used for more than debugging. I mean, "screencap anywhere" would be kind of useless if it needs a code that's only useful with a usbgecko. And then have "screencap anywhere" in a what's-it-called file so that it gets sent once or whatever. (not sure how that works. Just know extended code list is amazing and gecko os has unexplored functions)
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm