.hack//Fragment Patcher

.hack//Fragment Patcher is a homebrew application for the PS2 and the emulator PCSX2 that will allow the user to play the game in english without the need to download a modified copy of the game. With this anyone with a copy of the original game can pop it into their ps2 (or PC through the emulator), run the homebrew and play.

The patch is in development and currently has the following features:

  • DNAS Bypass and able to connect to Alkalime’s Lobby Server
  • Basic ground work for translations (Currently only Chaos gate is translated)
  • EXP Loss on death for Mulitplayer has been disabled.
  • Item loss from not saving before quitting has been disabled.

I made the code open source so anyone can read through it. I am still rather new to PS2 homebrew development so if the code doesn’t look that great, that’s because it’s probably not.
The code can be found on my github here.

Once I have a majority of the translations in place, I will make a binary release here.

.hack//fragment Patcher





Setting up PCSX2 for Socom 2 and Xlink Kai

Why should I use PCSX2 over a Playstation 2?

Well if you already have a PS2 setup and you don’t care about better looking visuals then PCSX2 really isn’t for you. However if you don’t wish to use a PS2 anymore or can’t be bothered but would like to play Socom2 again this this would be for you. You can expect a cleaner looking game, smoother visuals and the ability to easily use custom patches / content (Harry62’s r0005 patch for instance).





The following has updated:

  • Uploaded a new pcsx2.zip file because I forgot to include the memory card. If you download it again all you need to do is take the socomCard.ps2 from the memory cards folder and add it into your memorycards folder in your pcsx2 folder.
  • Added a trouble shooting section with some known fixes from the community that have had some issues.
  • Added instructions on installing the HDD map packs.

Continue reading “Setting up PCSX2 for Socom 2 and Xlink Kai”

Ps2Dis: Extending and relocating a string

Programs and files needed:

Any Hex editor. In this example I am using HxD though.
HACK_00.ELF (This is found on your .hack.//Fragment disk.) (This is also the online ELF for the game, the single player version is HACK_01.ELF


Socom 2 Imposter Maker by Dark Killer ( I used this to convert text to hexadecimal. It’s not needed but it makes it quicker.)


When translating this game from Japanese to English you tend to run into space constraints when dealing with how many letters you can cram in a memory location.  The problem came up where a translation wasn’t correct and since there just wasn’t room to actually have the correct text it instead was made to be something else. As a quick example the Twinblade spell “Tiger Claws” is currently just “Claws”.

A way to fix this issue

In the game .hack//fragment strings are loaded in by pointers.
For this example I am going to show how we can extend a string past the limit it currently has.
Currently I have a level 15 Blademaster that knows the spell Vak Slash and I want to call it something else, something longer.

So we open up PS2Dis and take the HACK_00.ELF and drag it over to PS2Dis. Press Control G and type the following “Vak Slash”, you should see something like this:
ps2Dis Label List

Continue reading “Ps2Dis: Extending and relocating a string”

MSSQL Sub Query

This is written using Microsoft SQL Server however a lot of this can carry over just fine to other SQL variants with little change. I am also using SQL Management Studio 2016 when writing this query. This can be found here.

Sub queries come handy when you need to return data from multiple tables but need that data Summed up or some form of calculation done on them. This isn’t the only scenario where these are useful but in this example that’s what I will be doing.

The example below does not require you to create any tables as everything is done in memory.

Creating our tables:

	FirstName VARCHAR(25), 
	LastName VARCHAR(25)
	ItemName VARCHAR(150), 
	PricePerUnit NUMERIC(5,2)
	UserID INT, 
	ItemID INT, 
	AmountSold INT


The “@” tells SQL Server that we are creating a variable and in this case the data type for that variable is a table.

IDENTITY(1,1) means that this field auto increments. This is great for Primary keys so you do not have to know what the last ID was, it will do that for you and insert it.

Now we want to insert data into these table so we have something to lookup later on.

Insert statements:

Continue reading “MSSQL Sub Query”

Wallpaper-Changer (source code)

This version of the wallpaper changer is based on my original code that was written in VB.NET. I chose to re-write this program mainly because the original code was horrible and I’ve been wanting to move a lot of my older programs over to C#.

The main purpose for this program was to be used in windows XP since this wasn’t a feature that it had. It never really worked in a way that I wanted it to (originally) so this re-write corrects a lot of the issues that the original had. I decided to post it on github with the hopes that someone may find it useful in some way.

The code as is isn’t complete. There are some changes I plan on making (currently it just does jpgs) but as the code is , it works.

The code can be found below:

Wallpaper-Changer Github

Sys Clock (Source Code)

Sys Clock is a simple program I wrote to show the current day of the week, Time, and full date. I came up with the idea for this while playing a game that did not display what time it currently was. Since I played in full screen windowed, an always on top program worked perfectly for this situation. The window for the program can either be locked in place or moved around based on user input.

Sys Clock


Source Code can be found on my github.

C# Allow only 1 instance of a form to be opened

While working on some programs dealing with multiple forms, I ran into an issue where I would end up with more than 1 instance of the same form being created. This came up when using a form as an MDI parent and then trying to open another form as a child to the parent form. When the child form would open, you could continue opening new instances of that same form while the one prior was still opened.

The code below will check to see if it already exists and if it doesn’t assign the new form as a child to the mdi parent form and open it.


//Code that handles Child forms. May be adding more code to this down the road for customization.
        //No need to write the same code for every form
        private void CreateMDIChild(Form childForm)
            //Checks if child form already exists. Only open if it does not exist in the collection
            FormCollection allForms = Application.OpenForms;
            bool formOpened = false; //Assume that this form does not already exist
            foreach (Form frm in allForms)
                if (frm.Name == childForm.Name)
                    //Tried to open form here however it throws an error about the collection being modified. So we create a bool and if the form exists
                    //set it to true
                    formOpened = true;
            //As long as formOpened is false we can open the new form as a child form to the parent
            if (formOpened == false)
                childForm.MdiParent = this;

Using the method

private void loginRegisterToolStripMenuItem_Click(object sender, EventArgs e)
            CreateMDIChild(new frm_LoginRegister());

Reflector Preventer


This program makes it harder for someone to decompile your program with reflector.
How to use:
Select your .net compiled program and click patch.
To make it so you are able to open the binary with reflector simply select the file and click “Restore File”

This program may throw false positives with some anti virus software.