Codes
WiiRd forum
December 01, 2021, 12:33:30 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]
  Print  
Author Topic: GPF Converter  (Read 2441 times)
dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« on: June 05, 2011, 05:29:03 PM »

http://www.mediafire.com/download/7p4x4339pzfligp/GPFConveter.zip

This is a simple app.  Just plug 00/02/04/06 codes into the textbox, press "Save GPF", and it will create a proper gpf file for you to use with Gecko OS.

Name the gpf file after your game.  For instance, Tales of Symphonia is RT4EAF, so I named my file "RT4EAF.gpf".  Place the resulting file in SD:\patch\ (e.g. SD:\patch\RT4EAF.gpf )

GPF files are codes that are written only once, right after the game loads.  So a data hack (like inf health) won't work because it must write during each frame to work.  But just about every ASM patch works.  Data tables that are only read from (e.g. Tales' encounter and experience tables) also work.

This is useful if you have a ton of codes and you're hitting the code limit.  You can put the ASM patches into a gpf file to save code space.

EDIT:

BTW, the text box is cleared of all non-code related info.  So you can copy and paste pretty liberally into it.  You do not need the *'s, but if they are there from whatever you copy from, they get parsed out.


* gpfconverter.GIF (9.44 KB, 378x377 - viewed 95 times.)
« Last Edit: June 19, 2013, 03:00:28 AM by dcx2 » Logged

hetoan2
Moderator
Legendary Member
*****

Karma: 348
Posts: 2279


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


WWW
« Reply #1 on: June 05, 2011, 06:05:57 PM »

Nice. It's a shame that games like call of duty reload the assembly when you move between different sections of the game. Sad
Logged



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

and youtube...
http://youtube.com/hetoan2
dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #2 on: June 13, 2011, 03:34:03 PM »

I can throw up the source tonight.  You might want to steal the method I use for stripping text from the input and reducing it to just code types for your own converter.
Logged

dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #3 on: June 13, 2011, 04:42:52 PM »

In summary, I read the contents into a string[] array, one element for each line.

Then I used regular expressions to remove every line from the string[] that didn't match the pattern "8 hex digits, followed by white space, followed by 8 hex digits".

Then, I stripped all non-hex, non-whitespace characters from a line.
Logged

dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #4 on: June 13, 2011, 11:55:37 PM »

Regex will give you a headache if you stare at it too long.

if (Regex.Match(codesToSanitize[ i], @"^[0-9A-F]{8}\s[0-9A-F]{8}$").Success)

The @ prefix on a string literal spares you the agony of manually escaping characters like \ etc.  The ^ means "match the beginning of the line" (lines were sanitized before this snippet).  The [0-9A-F] means "match any hex digit".  The {8} means "match 8 of them".  \s means "match whitespace".  The $ means "match the end of the line".

Source is attached.  All the action happens in GPFConveter.cs.

* GPFConveter.zip (14.14 KB - downloaded 39 times.)
« Last Edit: June 13, 2011, 11:57:17 PM by dcx2 » Logged

James0x57
Database Admin
Leader
Legendary Member
*****

Karma: 70
Posts: 1546

Gamertag: James0x57


WWW
« Reply #5 on: June 14, 2011, 09:19:57 PM »

codesToSanitize is an array of single lines from the input?

If it's not necessarily a single line then it will match this too:
00000000
00000001

(unless multiline mode is default or previously set?)
Logged


dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #6 on: June 14, 2011, 09:29:27 PM »

The TextBox.Text property is Split using \r and \n delimiters before being parsed.
Logged

Pages: [1]
  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!