InformationI really liked some backgrounds on a virtual computer desktop of the first .Hack PS2 games and wanted them for my computer, so I got them.ContentGithub Repo
See here for more information on the .Hack franchines. So the PS2 game had some very spiffy unlockable backgrounds for the desktop within the 4 games, and I really wanted them. So, I went to work reverse engineering the game and finding them inside the game DVD disk, which coincidentally, allows access to all the games textures.
The source code is really not well organized and hard to understand, so I made a few modifications for the v1.01 release, but I really need to update it more... maybe later. I had already released this project a while back, with source code, IIRC, but never tried to really publicize it.
I may at some point write down the techniques I used to get at the data, which takes a lot of leaps of logic, guessing, and critical thinking... which is of course what all reverse engineering and hacking takes, which is why it’s so fun :-).
Project was originally titled HackStract.
Original ReadMe: (Slightly modified)
Why I made this program:
First, I believe this program will probably work on many Playstation/PS2 games (with a possibility of minor tailoring), unfortunately, I cannot find out if this is so, as I do not myself own a PS, PS2, or any games besides the .hack series (don’t ask). So hopefully, with this research, and provided source code, others may be able to make a fully functional utility for the PS’s that can extract this kind of content.
The Story:
One night after finally finishing the .hack games, I decided I wanted backgrounds from the .hack OS desktop for my real desktops. I scoured the internet to no avail, very disappointed that I was unable to find them. I decided to write this program then and there, which unfortunately, I put on my “to do” list and didn’t get to for about 6 months afterwards :-).
I worked hard on it when I had free time for about 2 days and extracted all the backgrounds that I wanted (there was one background that has problems which I will get to later on. See the source code comments), and I was going to drop the project there, but decided to go ahead and finish it up because other people might find my research useful.
The Functionality:
I gave the program simple functionality to be able to browse through all the pictures in the .hack discs. Unfortunately, there are lots of little bugs in there because I was unwilling to spend the extra time reverse engineering the rest of the format. My notes on the remaining bugs are as in the main source file.
How to use:
- Copy data.bin (from your .hackCD/data folder) to the directory this program is in. You can directly link to it on your DVD-rom drive if you edit the 1st uncommented line in the WinMain function (programming stuff).
- The listbox controls what picture is displayed on the screen or saved with the buttons.
- Space: goes to the next valid picture (not really needed anymore since at least 90% of the files show pictures).
- 1-9: Change the “width” of the picture. The program sometimes inaccurately judges the width (as I did not reverse engineer all the variables). This will be seen as 2 or more almost identical pictures side by side. 5 is the base, 1-4 makes it shrink in 50% intervals, 6-9 makes it grow in 50% intervals. (Example: cw1hsw00_4 should be setting 4).
- All other keys control the listbox as normal (pageup, pagedown, up, down, letters, end, home, etc) Listbox maintains focus.
- All files saved with the buttons are saved in the same folder that the program is executing in (where the data.bin is).
- Bitmaps are saved in palette format (usually 8bit/256 colors), as they are originally stored in that format.
Jeffrey Riaboy (Dakusan) 10/31/04
Screenshots and Game Desktop Backgrounds:
Screenshot
Game Desktop Backgrounds (Only a couple of the very many backgrounds are available here)
ConceptsReverse EngineeringNotesThis might be usable for other PC or console games, most likely more PS2 games, as they might use this same file archive format. The program might take a little tweaking for them however.UpdatesGitRepo for HackPics @ 2015-10-05 18:52:30
Continuing my attempt to get stuff moved over to GitHub, I just added a GitHub Repo for HackPics.
This is a rather old project that I originally created in late 2004. It had some minor modifications done to it in mid 2008 to help with the code clarity so others could work with it easier. I was requested to add it to GitHub a few weeks back, so here it is. Strangely enough, this has always been one of my most popular Projects. Always seems to happen with video game utilities/projects.
The rather long explanation of the project history and my findings regarding this project can be found in the request thread on my forum. Dakusan License v2.0 @ 2009-11-04 16:06:57 - Download
I have updated the licensing information across the board for my website and all its projects to the Dakusan License v2.0, a slightly modified version of the Original BSD License.
The Copyright page and all project downloads have been updated accordingly. Added Readme files to all project downloads @ 2009-09-19 05:35:19
Binary and source zip downloads for all Projects now have readme files in them, except as mentioned below.
This only applies to the Draw Image Project in Web Scripts, and not the Directory Manager project (The only project zip file now without a readme). HackPics v1.01 @ 2008-06-11 18:09:04 - Download
- The source code is really not well organized and hard to understand, so I made a few modifications for the v1.01 release, but I really need to update it more... maybe later.
- Added about window and version information
- Added window resizing routine to resize/move window controls and make sure background stays the proper color
- Updated project's page
- Updated screenshot to reflect new changes
- Updated contents
- Added original ReadMe to contents
- Removed obsolete WriteRam class
v1.01 SourceHackPics Project Upload @ 2006-11-10 21:06:12 - Download The .Hack//Game picture extractor was a reverse engineering project I did that extracts all the texture/picture(s) from the first 4 .Hack games. I did this because I badly wanted the backgrounds from the virtual desktop in the game. An example is included in the zip, which is the original release file from 2004. All you need is the original PS2 game discs and a DVD drive.To add comments, please go to the forum page for this project (guest comments are allowed for the Projects, Posts, and Updates Forums). Comments are owned by the user who posted them. We accept no responsibility for the contents of these comments.
|
I received an email 2 days ago regarding this project, and unfortunately, when I tried to reply, the email address given was invalid . I figured I'd post the email here in hopes that he may notice it. Alas.
Belial on 09/25/09 at 11:26:54 PM -0500
The original binary and source of the first version are available in the first update for the project (also on the project page in the update section).
I am unable to reproduce the bug you mentioned, and cannot help without getting more info on the problem.
You are also actually not the first person to mention/request the want to extract multiple pictures at a time. I did not include this in the program because I hadn't finished reverse engineering all the variables and some pictures needed to be manually adjusted. It had never occurred to me people might want to dump them en masse even if some of them didn't come out right :-).Re: HackPics on 07/27/11 11:39pm by Xu Yuan
Hello, Your HackPics tool from so long ago has been upgraded several times by other people by now, but it seems that none of them have yet put in Importing methods.
Just out of curiosity, how difficult is it to include such a function? The actual scope of hacking .hack has grown tremendously over the years and this is just one of the steps to create fully playable mods. Re: HackPics on 07/28/11 1:16am by Dakusan
Has it really been upgraded by other people? I had never heard ^_^; .
Importing would be a lot more difficult than extracting, and it also depends on how you would want it to work. For example, if you just want to overwrite individual pictures, you can just overwrite them directly in the data file with your new ones as long as they are not larger in size (byte wise). If you wanted to actually add new pictures without erasing old content, you would most likely have to know the complete structure of the data file and completely recompile it. There was still a lot in the file's structure I never worried about figuring out because I had no need for it.
Re: HackPics on 08/15/15 2:41am by Dakusan
Honestly, this was a project from over 11 years ago. I am shocked anyone is even still using it, as the games are mostly ~13 years old.
I don't remember what I changed between the 2 versions, but anyone is free to change them all they want (perhaps compare the 2 versions and see what you can do). As a matter of fact, I've heard that other people have updated this project themselves elsewhere.
If someone else wanted to work on it out there, I'd be happy to upload it to github with versions intact.
Just did a real quick check too. Looks like bitmaps are stored in their original 8 bit format (indexed colors). To fix any of the bitmaps that have transparency, the one transparent color index just needs to be replaced in the palette index. It's been a really long time, so I might not recall correctly, but I don't think I ever found where it stored what it considered the transparent color index. Perhaps it was always the same color.Re: HackPics on 09/24/15 6:52pm by Dakusan
Been absolutely swamped with work and hadn't gotten to it yet, though the light at the end of the tunnel is nigh. Was hoping to get it done by this coming Monday.Re: HackPics on 10/04/15 3:20am by Kamijou Touma
Still Waiting ;PRe: HackPics on 10/05/15 4:42am by Dakusan
ALMOST caught up with my backlog. It's finally at the top of my list, so I should be tackling it first thing tomorrow :-) Things are just too busy Re: HackPics on 10/05/15 11:43pm by Dakusan
[Edit]
Just for reference, the person that asked for this was being quite a jerk, and then deleted his posts after I wrote this.Apparently, some posts may have been magically erased from the forum, so no longer sure of the validity of this statement.OK, so I went back and did some research and searching, trying to refresh my memory on all this as it was all from almost a decade ago. I also put together the GIT repo that I said I would. It is at https://github.com/dakusan/HackPics .
The initial release was from 2004-10-31. At the time, it was called HackStract.
It was re-released under a new title on 2006-11-10, HackPics. I am unsure if there were any changes between the two versions, as I unfortunately do not have [easily accessible] backups, but I do not believe there was.
Version v1.0.1 was released on 2008-06-11. I changed its label from v1.01 to v1.0.1 in the GIT repository to help follow other changes I had already made.
The following are the changes I made in each commit between v1.0 and v1.0.1 (the current version).
Commit #1
- Changing the name of the project/files
- There was no functionality changes
Commit #2- Removed old useless, and unused libraries, and replaced them with standard libs.
- A few punctuation/capitalization/spelling fixes in comments
- There was no functionality changes whatsoever, besides some possibly better IO handling
Commit #3- No functionality changes. Mainly just file maintenance.
Commit #4- Added “About” window, executable icon, and executable version info
- Re-branded from “HackStract” to “HackPicks” within the primary source file (for window titles and such)
- Updated window and sub-window display information/dimensions. Made window resizing work better.
- The text for “Loading Info” and “Parsing Stats” is now centered on the screen
Commit #5So nothing important at all was changed from v1.0 (HackStract) to v1.0.1 (HackPics).
I had a lot of other people interested in the project over the many years since I created it. People asking about it, asking me if I could help them with their projects, or modifications of my project. So I did a little Googling just now, and found this: http://www.dothack.org/files/file/70-hackstract/ . It is called HackStract v2, release in June of 2008, and was a either a modification or complete rewrite of my work. I am unsure if it is a mislabel, but it says the Author’s name is “CyberConnect2”, which is the name of the company that created the //.Hack games, and he is obviously not affiliated with the company. However, he said that it was based upon my work, so we can safely assume that he took the research done from the reverse engineering I did, and did more. He seems to not have included the source with it, but it may be out there, somewhere.
My initial goal was to just extract the desktop backgrounds from the game, which I accomplished. I was never interested in making the extraction process perfect, but I am glad to see that others continued my work. If 2008 were like now, this most likely would have been done as a collaborative GitHub project, where they just built off mine. But 2008, and even-more so, 2004, were VERY different times. Most people would not even recognize the internet from then from what it is today.
[Edit] Fixed some formatting issues caused by Thunderbird when compiling thisRe: HackPics on 11/29/15 8:31pm by Kamijou Touma
Thx Dakusan ;P
I also stated before here that something deleted my posts before and that it was in fact not me. I believe your forums at one point had pruned me because i was unregistered.Re: HackPics on 11/29/15 11:42pm by Dakusan
If that is the case, I apologize, but you were being rather pushy. Everything I do, I do for free in my spare time, so it's frustrating when someone is pushy like that. I'm pretty sure I wouldn't have deleted the posts. I only delete users with 0 posts.
What do you mean by "A few people Believe that it was me who did this."?Re: HackPics on 11/29/15 11:51pm by Kamijou Touma
I didn't deleted any posts, the posts that i believe got "pruned" by the forums automatically where posted when i was a guest before i registered here.
If i came across as a jerk however for any of my posts then i do apologize. Re: HackPics on 12/02/15 12:51am by Dakusan
Ah, ok. The assumption that you had deleted the posts was a very large part of it. I had assumed you had just come in, "demanded" something, and then when I gave you an answer that made you realize your original statements were completely wrong, you had deleted them and decided to hide that you asked it. I didn't add that "Edit" note until a week or more later, when you had not responded, which I found to be unlikely as innocent coincidence since you had been asking once or more a week. It is very believable that the posts were somehow deleted by the forum. I'm doing better now about keeping backups.Re: HackPics on 12/07/15 12:25pm by Kamijou Touma
Btw that edit note is still there ;PRe: HackPics on 10/06/18 11:46pm by bl4ck0ut07@gmail.com
Hi, i asked on inbox , i was meaning if is possible to mod files with hackxtract , like replacingRe: HackPics on 10/12/18 12:27am by Dakusan
It is not possible with the program, and would not be easy if the image size was different than the original.
However, if I recall (this project is almost 15 years old, so I could be remembering wrong) they are stored in 24bit uncompressed bitmap format in the container file, so if you search with a hex editor in the original file for a byte string from the extracted picture, you can find it, and replace it with another bitmap of the same size.
If it isn't stored in 24bit uncompressed format, the extracted images will probably still be the same as the original in the container file and you can still search for them in there with a hex editor. And as long as you replace it with a bitmap of equal or less size, it should work.
When replacing, make sure to replace the entire bitmap file in the container, including the bitmap header.