Codes
WiiRd forum
October 04, 2024, 11:35:25 PM *
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 ... 12 13 [14] 15
  Print  
Author Topic: GeckoCodes.org  (Read 60720 times)
Stuff
Hacker
Sr. Member
*****

Karma: 31
Posts: 415


0x80000000 = -0


« Reply #195 on: July 24, 2012, 08:38:52 PM »

I think I heard something about geckocodes.org not being worked on for the time being, but whenever you get back to it, add this function to the ascii<->hex somehow.

Code:
function uni2utf8(u) {
    //C0 + (firstbyte*4) + something
    //0x, 4x, 8x, Cx
    //if ((byte & 0xC0) == 00, 40, 80, C0)do stuff
    //(byte & 0x3F) | 0x08
    if (u > 0x7F) {
        var magicNumba = 0xC000;
        magicNumba += ((u & 0xFF00) * 4);
        if ((u & 0x00C0) == 0x0040) magicNumba += 0x0100;
        if ((u & 0x00C0) == 0x0080) magicNumba += 0x0200;
        if ((u & 0x00C0) == 0x00C0) magicNumba += 0x0300;

        u &= 0x003F;
        u |= 0x0080;
        u += magicNumba;

        magicNumba = null;
    }
    return (u);
}

I ran into utf-8 characters > 7F and they were funky. I almost started a thread about it, but I did some research and came up with this function. For example ñ is 0xF1 but MH3 would rather use 0xC3B1. And this function will get you there. So idk. Add like a checkbox to trigger this function or something.
Logged

.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link tongue.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm
James0x57
Database Admin
Leader
Legendary Member
*****

Karma: 70
Posts: 1546

Gamertag: James0x57


WWW
« Reply #196 on: July 25, 2012, 03:05:54 AM »

Huh interesting. Any idea what the encoding is called- aside from "magicNumba"? I've never really looked into utf-8 characters in JS. ..could be useful for my job really soon though sooo let's keep talking here and I'll probably add that feature for everyone.
Logged


Stuff
Hacker
Sr. Member
*****

Karma: 31
Posts: 415


0x80000000 = -0


« Reply #197 on: July 25, 2012, 04:13:26 PM »

lol. I called it magicNumba because that's what that C number was looking like while I was trying to figure out the logic in the pattern. I thought you could just call the encoding utf-8. Guess I'll learn a little something talking about it. I googled c3b1 unicode and felt that utf-8 was the right way to call it. There was something saying that it's U+XXXX, whatever U is >.>. Then I ended up here: http://jeppesn.dk/utf-8.html

Maybe it's called two octets encoding? At the bottom of the page he says "You can see another table.." and that link shows the pattern easy to understand. Those accent As is how gecko.net sees those characters when you put it in ansi view. Otherwise, it doesn't see anything. Or sometimes it shows a box. It looks like that pattern goes on until character 0x07ff. Then the character takes up 3 bytes, but those are some funky digits. E0A0XX? http://www.utf8-chartable.de/unicode-utf8-table.pl

I guess there's more thinking to be done. MH3 only uses 256 characters, so you don't really need anything past C2BF. The funny thing is, it still knows that it's 1 character. In the title screen I replaced "Create" with "Cate" and it displayed "?ate" instead of "???ate". That's a fullwidth C (ef bc a3). FF23 wouldn't show like that. I got "?#eate" with FF23. But anyway,

U+07FF   ߿   df bf   
U+0800   ࠀ   e0 a0 80

The & 0x3F | 0x80 still applies, but for some reason after DF, it feels the need slip in an A0 to the magicNumba. idk. I wonder if there's a way to go from regular letters to fullwidth letters.

I don't think that answers your question, but I hope it helps somehow.
Logged

.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link tongue.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm
James0x57
Database Admin
Leader
Legendary Member
*****

Karma: 70
Posts: 1546

Gamertag: James0x57


WWW
« Reply #198 on: July 27, 2012, 01:45:18 AM »

Okay, I think I see it. It's breaking it down exactly like escaping does. Sooo escape and get hex values from each of the escaped characters SHOULD do the conversion like it is there..

*testing*

Yep yep, got it:
Code:

function utf8ToHex(input) {
var str=unescape(encodeURIComponent(input));
var output="";
for(var i=0; i<str.length; i++) {
var hx=str.charCodeAt(i).toString(16);
while(hx.length<2) hx="0"+hx;
output+=hx;
}
return output.toUpperCase();
}

function hexToUtf8(input) {
var output="";
for(var i=0; i<input.length; i+=2)
output+=String.fromCharCode("0x"+input.substr(i,2));
return decodeURIComponent(escape(output));
}



utf8ToHex("ñ"); // "C3B1"
hexToUtf8("C3B1"); // "ñ"
hexToUtf8(utf8ToHex("ñ")); // "ñ"

utf8ToHex("߿"); // "DFBF"
utf8ToHex("ࠀ"); // "E0A080"

Now to look at implementing it into the converter on geckocodes.
Logged


James0x57
Database Admin
Leader
Legendary Member
*****

Karma: 70
Posts: 1546

Gamertag: James0x57


WWW
« Reply #199 on: July 27, 2012, 02:25:41 AM »

UTF8 conversions added to GeckoCodes!

http://geckocodes.org/index.php?arsenal=3

Thanks for the idea and convo, Stuff!
Hope it helps. =)
Logged


Stuff
Hacker
Sr. Member
*****

Karma: 31
Posts: 415


0x80000000 = -0


« Reply #200 on: July 27, 2012, 04:17:27 AM »

That's awesome. Well I hope the convo helped you. Your welcome. You adding that to Geckocodes definitely helps. I'll be including arsenal.js in Mod code gen, if you don't mind. Those are some nice functions you got there.

idk if it matters, after my last post, I noticed that if you add 0xFEE0 to the regular characters, it leads to the fullwidth version of the letter. I'm not sure how useful that is. I just remember Bully@WiiPlaza made a name modifier for yugioh and it had something to do with fullwidth and halfwidth. That was back in the day, so I don't even know what I thought about the situation. I do remember saying that maybe the yugioh card names are in fullwidth or something, because I couldn't find any card names. Just throwing that out there because I said I wondered.
Logged

.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link tongue.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm
Bully@Wiiplaza
Hacker
Legendary Member
*****

Karma: 93
Posts: 1853


WWW
« Reply #201 on: July 27, 2012, 06:29:36 AM »

Yeah, there are ascii digits for Pokemon and Yugioh which do not match with the geckocodes conversion one. Would be great to have this supported aswell (if not too much demanding). It took me some time to figure that these are the name modifiers for each game! Shocked

There you go, both threads Wink
http://wiird.l0nk.org/forum/index.php/topic,9556.0.html
http://wiird.l0nk.org/forum/index.php/topic,9162.0.html
« Last Edit: July 27, 2012, 06:36:10 AM by Bully@Wiiplaza » Logged

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

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

~Bully
James0x57
Database Admin
Leader
Legendary Member
*****

Karma: 70
Posts: 1546

Gamertag: James0x57


WWW
« Reply #202 on: July 27, 2012, 06:49:57 AM »

@Stuff:

Technically it's copyrighted.. and some of the functions can be way better..
but if you still want to straight copy specific functions, I supose go ahead and include them in your own JS file BUT put credit to me in a comment in each of the functions you copy please.
//James0x57 of GeckoCodes.org


Aaaand there are 2 AJAX ones in there that you might want to use-- but you'll have to host the server side code for them yourself. (converting Hex <-> Float)
If you do need it, let me know and I'll share the PHP for them too. =)
Logged


James0x57
Database Admin
Leader
Legendary Member
*****

Karma: 70
Posts: 1546

Gamertag: James0x57


WWW
« Reply #203 on: July 27, 2012, 09:54:32 AM »

@Bully

Alright, took a while to wrap my head around it but I got it.

The encoding you found in those 2 games is using the UTF-8 "CodePoint" for the values and all of the ASCII characters have been converted to fullwidth.

Other games don't use the CodePoint and instead use the hex value. In the case for basic ASCII characters, these values are the same.


Music Note tests:
Code:
♪ -> UTF-8 hex value = 0xE299AA
♪ -> UTF-8 codepoint = 0x266A
0x266A as ASCII = &j
0x266A as a UTF-8 codepoint = ♪

I wrote these 2 functions to take any string and convert the ASCII characters to FullWidth Unicode characters (and reverse).
Should be a good starting point.
Code:
function asciiToFullWidth(input) {
var output="";
for(var i=0; i<input.length; i++) {
var chc=input.charCodeAt(i);
if(chc>=0x21 && chc<=0x7E) output+=String.fromCharCode(chc-0x21+0xFF01);
else if(chc==0x20) output+=String.fromCharCode(0x3000);
else output+=String.fromCharCode(chc);
}
return output;
}

function fullWidthToAscii(input) {
var output="";
for(var i=0; i<input.length; i++) {
var chc=input.charCodeAt(i);
if(chc>=0xFF01 && chc<=0xFF5E) output+=String.fromCharCode(chc+0x21-0xFF01);
else if(chc==0x3000) output+=String.fromCharCode(0x20);
else output+=String.fromCharCode(chc);
}
return output;
}

I have to go to bed since it's 2:55am and I have work in the morning. But I'll try to figure out a way to add this to the site too.
Logged


Bully@Wiiplaza
Hacker
Legendary Member
*****

Karma: 93
Posts: 1853


WWW
« Reply #204 on: July 27, 2012, 10:00:59 AM »

Thank you, James.
Much appreciated to have this on geckocodes soon. Smiley
Logged

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

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

~Bully
Stuff
Hacker
Sr. Member
*****

Karma: 31
Posts: 415


0x80000000 = -0


« Reply #205 on: July 27, 2012, 04:49:57 PM »

I noticed the getElementByID in the main function I wanted to use so I'll have to work around that. :/

But this is what I was gonna do: <script src="http://geckocodes.org/includes/arsenal.js" type="text/javascript"></script>

This way the file already has your copyright info and stuff cuz it's your file. Then I guess every time I call a function I could put a comment right there too. If that's not alright, I'll put it in one of my .js files and put credit to you in each function. I was looking at hex<->float, but I don't need it now. I just needed ascii->hex with the utf-8 stuff. What are your thoughts?

Also don't lose sleep on this stuff. It no bueno.
Logged

.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link tongue.

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

Karma: 348
Posts: 2279


I hack WiFi, but I don't cheat on WiFi ;)


WWW
« Reply #206 on: July 27, 2012, 09:34:22 PM »

For me the geckocodes php files are all fatal erroring Sad
Logged



Check out my site with codes obviously...
http://hetoan2.com/

and youtube...
http://youtube.com/hetoan2
James0x57
Database Admin
Leader
Legendary Member
*****

Karma: 70
Posts: 1546

Gamertag: James0x57


WWW
« Reply #207 on: July 27, 2012, 10:06:44 PM »

Geckocodes is fixed. LMZ updated the server to the current version of php. The case was in some ancient code I used on my personal site that I copied over to the first version of geckocodes. lol
Logged


Stuff
Hacker
Sr. Member
*****

Karma: 31
Posts: 415


0x80000000 = -0


« Reply #208 on: July 29, 2012, 09:21:04 PM »

I made FromASCII() more universal for myself. Dunno if you want to use it. Take a look at the .js if you want.
https://dl.dropbox.com/u/24514984/modcodes/js/geckocodes.js

I made that gecko06() for 06 codes. I think it's pretty cool. It'll help make modcodes gen a little neater soon. I haven't seen any 06 codes in the 90s so far, but it's still possible with this bad boy. You just gotta add the 4A line yourself. I realized how inconvenient that was and had to add that functionality. I fixed a few problems while I was at it too. You don't even need the full address. Or if you had a 06 code already, you can just slap it in there without editing the 06 out. See it in action in this test page:
https://dl.dropbox.com/u/24514984/modcodes/HTMLPage.htm
« Last Edit: July 29, 2012, 09:53:34 PM by Stuff » Logged

.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link tongue.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm
James0x57
Database Admin
Leader
Legendary Member
*****

Karma: 70
Posts: 1546

Gamertag: James0x57


WWW
« Reply #209 on: July 30, 2012, 07:06:23 AM »

@Bully I have your request built into the redesign- I think you'll like it.

@Stuff cool man. I like it prototyped to String like that. I got rid of the ASCII-specific functions completely on the redesign because the UTF-8 function properly encodes plain ASCII as well (since ASCII is a subset of UTF-8).

@everyone:
I am going to try very hard to launch the redesign on the database's 4th birthday. (Aug 7th, 2012)
Logged


Pages: 1 ... 12 13 [14] 15
  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!