News: 11 March 2016 - Forum Rules

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - krat0s

Pages: [1] 2
Going to explain this for you. I will try to make it simple but I don't have PS2Dis opened in front of me.
First open PS2Dis and load the main file which you already have done so. Then you should go in the Analyzer file menu and Invoke Analyzer.
Pressing F will open a tiny textbox when you can input the address in hex and jump right there. Since you posted that assembly here , it means you have figured that out.
PS2Dis does come with a small document explaining some basic operations I think.
To make changes you click on the instruction lines and press enter, edit the lines with the new opcodes then you press simply press enter again. At the moment that edit box has been closed and you see the new edited line in the main window, the change is already made. You can close PSDis and rebuild the iso and test to see if it works. Do you know how to properly deal with PS2 image replacement/generation?

Now, the ASM from that team notes is not an edited version. In fact it's from the game. In case you are wondering how that it is possible, it because the team used IDA Pro to dissamble , and it displays things a bit different. I know for  sure that it is from IDA Pro because of that var_ that you are having problems to update.
In the PS2Dis that you posted, it' almost the same code. Other members can prove it!
I will take only one line:
Code: [Select]
li $v0, 0x14  #sets the value of the register v0 to 0x14.  V0=0x14
In the PSDis for this line we have:
Code: [Select]
Addiu $v0 , zero , 0x14  # it mea  that in v0 will be stored the value of the addition of the zero and 0x14. Zero is an register which always holds the value zero. So v0=0+0x14 =0x14
See? It's the same thing for every line despite the fact that it looks different.

If the team notes are correct and the v0 is the text size which is always 0x14 then all you have to do is to go to the address of each
li $v0 , 0x14    of the different section of the notes an you will  of course see:
Addiu $v0 , zero , 0x14

Pres Enter on that line and change the "14". Leave the 0x as it is. This way you are changing the text size (if that is really text size and the previous translation team managed to reverse it successfully.) Obviosly , the value is in hex.
I would recommend setting the value to 0x12 , or 0x13 , values near the original value and see what happens.

June 09, 2017, 03:56:06 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Hi, I finslly had some free time and been dealing all day with this.
Tried editing in PS2Dis but for some reason it just won't save up the changes.
So.. went straight to IDA Pro, made some changes and boom:
Normal :

Smaller size , 0x10:

Changing colour:

Smaller text with new colour printed at lower than the image box:

So far I have:
Code: [Select]
//  Sub_1E6410(a0, a1, Flashing_Icon_Value , Colour , StartPointX , StartPointY , EndpointX , EndpointY);

a0 -  seems to be a structure contains the text and some other values. Not important and no need to change.

a1 -  Takes the following values: 0x02 , 0x03, 0x04 , 0x07, 0x08, 0x09, 0x0A, 0xc ,   0x14 ,  0x15  ,  0x16 , 0x17, 0x18   , 0x60 ,  0x61. They seem like control code but we will find out soon.

Flashing_Icon_value  - This is somehow related to that upside done flashing triangle but I don't know excatly how. It is 0x41 and any value bigger than 0x45 causes text corrupted , very strange value. I do not think that you need to deal with this. Leave it as it is. One thing i am sure though, setting it's value to 0 disables the icon and just the text is displayed.

Colour - yes, it's colour , I wonder how I didn't notice it before , all FFs correspond to white and everywhere the text is white. I still have to figure out how we will find correct value to make new colors display properly(the blur color you see in the screeshot above was my second random edot, the first one displayed nothing.)

StartPointX - X position when you want the text to start.
StartPointX - Y position when you want the text to start.

EndPointX - Now this is always 0x200 and that = 512. No need to change this i think. Read below.
EndPointX - Now this always 0x1C0 and that = 448. No need to change this i think. Read below.
Here is the interesting part! Go back to the PCSX2 screenshots and you see the title bar. You will notice 512x448, the resolution!. Now sure what these values do but I don't think there is any need to tamper them.

As for the text size you must change the value in v0.
Since PS2Dis is giving me a headache and getting IDA Pro is too much for you , I will make simple. I will list the hex offsets of the size value for each function so you can edit them.

(The DQT team has 9 section. Through trial and erro I managed to discover that the 9 secton/fragement of code (002EB8B8  -  002EB8E4)  handles the main menu printing.) Other routines do other stuff. It is up to you to check what this routines do and I suggest that you edit the size of one of them at a time, making it smaller or bigger and then keep playing the game. After identifying one section give back its original value and change the size for the other section, you get the point.

I am making an editor for you for today I spent too much time and the byte swap is giving me a headache.

Code: [Select]
Routine                       ELF hex size address/ try small values(0x10, 0x11 is quite good , even 0x18 is too big)
001EC898  -  001EC8C8      :  0x000EC918
0021F2C8  -  0021F2FC      :  0x0011F348
0022DE48  -  0022DE78      :  0x0012DEC8
0022E180  -  0022E1B0      :  0x0012E200
0023B170  -  0023B1A4      :  0x0013B1F0
0023C000  -  0023C03C      :  //Value is not set directly but loaded from somewhere!
002539F0  -  00253A18      :  0x00153A70
002EB8B8  -  002EB8E4      :  0x001EB938    // Main Menu!!
002F9BA0  -  002F9BCC      :  0x001F9C20

So just use any regular editor and as soon as you land in there you will see 14 and change to something small or bigger.
NOTE: To successfully edit the value you must edit 2 bytes, even the one after it. The 00. The byte after 14 is 00 and together they form:
0x1400  , however the bytes are reversed so we get 0x0014 ! This means that unless setting bigger than 255 values (which in this case you certainly don't , even 0x18 is really big), there is no need to mess with the other byte. Just go ahead edit only the 0x14 byte!

That's for now. Got to go, will try to find more details tomorrow.

So I totally had that eureka moment and finally figured it out. Well somewhat anyway, I got ps2dis and was able to plug in some of DQT's code, but wherever I tried to plug in any of the lines that have +var_160 or whatever, ps2dis doesn't seem to recognize it. I noticed the way the code is entered in the notes are slightly different then how it's actually entered in PS2dis, so Im sure it's a matter of entering it the right way. Any ideas?
What are you trying to do?
What are you changing in PS2Dis?
Post as many details as possible.

I am not that good at assembly but here is a try.
From what I see , the notes contains parts of setting up printing parameters for different parts of the game and then calling up the main printing function.  I have made a C version of just one of those example, they all seem to be almost the same, just that they set different value and then jump to what appears to be the main printing function. Note, I can be completely wrong here!

a0, a1, a2,a3 , tX registers are used for arguments.
sd instruction stores a doubleword at the speciffied address.Not sure what it is doing there, perhaps storing value to the stack, or to an array/structure.
Code: [Select]
seg000:001EC898   li $v0, 0x14                                v0 = 0x14 text size
seg000:001EC89C   sd $v0, 0x170+var_170($sp)                  0x170+var170(sp)  = v0 = 0x14
seg000:001EC8A0   daddu $a0, $s1, $0                          a0 =  s1;
seg000:001EC8A4   sd $v0, 0x170+var_168($sp)                  0x170+var_168($sp) = v0;
seg000:001EC8A8   daddu $a1, $s0, $0                          a1= s0
seg000:001EC8AC   li $a2, 0x41                                a2 = 0x41
seg000:001EC8B0   li $a3, 0xFFFFFFFF                          a3= 0xFFFFFFFF
seg000:001EC8B4   sd $v1, 0x170+var_160($sp)                  0x170+var_160($sp) = v1
seg000:001EC8B8   li $t0, 0x26                                t0 = 0x26
seg000:001EC8BC   li $t1, 0x16A                               t1 = 0x16A
seg000:001EC8C0   li $t2, 0x200                               t2 = 0x200
seg000:001EC8C4   jal sub_1E6410                             
seg000:001EC8C8   li $t3, 0x1C0                               t3 = 0x1c0

Code: [Select]
//         a0 , a1 , a2 , a3 ,      t0 ,       t1 ,         t2     t3;
int size , a0 , a1 , a2 , a3 , StartPoint ,StartPoint2 , char_nr , t3;
long unk1;   // 0x170+var170(sp)
long unk2    // 0x170+var_160($sp)
long unk3    //0x170+var_160($sp)

size = 0x14;
unknown1 = size;    // = 0x14
a0 = s1;  //No idea what s1 contains.
unk2 = s0;

unk2 =  size     // = 0x14
a1 = s0;
a2 = 0x41;
a3 = 0xFFFFFFFF;
unk3 = v1;
StartPoint = 0x26;
StartPoint2 = 0x16A
char_nr = 0x200
t3 = 0x1c0

// Sub_1E6410(a0, a1, a2 , a3 , t0, t1 , t2 , t3);

//  Sub_1E6410(a0, a1, a2 , a3 , StartPoint , StartPoint2 , char_nr , t3);

Sub_1E6410(s1, s0, 0x41 , 0xFFFFFFFF , 0x26  , 0x16A , 0x200 , 0x1C0);

The question is: what do you want to do?
If you want to do something simple, like changing the number of max characters before newline you can easily do that with changing the value of the $t2 register. Takes like 2 seconds in PS2Dis.
I am not sure what the StartingPoint, and StartingPoint2 are how are they used.

To the PS2 you can add:
 -Berserk: Millennium Falcon Hen Seima Senki no Sho
 -Hunter X Hunter

Great thread!

I'm really lost on this project unfortunately. I haven't any idea how MIDI or whatever format this uses works at all.

But I also am enjoying listening to Leevers remade music. I'll keep poking at it but I don't frankly expect much to happen.
You are giving up so easily. This thread is already 3 pages on and many people jumped on it as soon as you made the thread. Never give up so easily, I am sure that we will crack this down. Now, I have not played this game at all, I don't like it but I do enjoy seeing some work for the PS2.
It seems that the audio is indeed in SOUND.DAT and those 27 files are compressed ADCPM but they have some mixed interlave or something, a technique used in some games. So get this:
And go to Streams -> Sony ADCPM Extractor ,  drag and drop one of those .dat extracted files and you will get plenty more in a new folder. The newly extracted files by VGMToolbox play quite well in MFAudio and the interlave is correctly recognized. So if we can find a way to reassemble back to the original .dat files all those different tracks/interlaves (sorry, I suck at audio stuff) we are almost done.
Edit: whey I say easily ,, I didn't meant to make it sound so tragic lol, I should learn to write better.

Nevermind the CUE tools, they were written for other games. .DAT (DATA) , .BIN(BINARY), BF, PAK, VIG and a ton of more formats arent's standard ones. All they have in common is the extension. The structure is different.
I wrote an unpacker for this type of .DAT files. It works on all the .DAT files for this game. The music  is indeed in the SOUND.DAT. There are 27 files and they are compressed ADCPM files , a PS2 specific format but we ahave a tool for that MFAudio , which allows us to convert them to WAW or RAW audio. So yeah, mystery solved.
Extract the files, convert them to waw , make notes of the details (frequency, channel , interlave, and whatever they are called, I know nothing of audio files, to make it simple: make sure the waw you will reconvert to ADCPM would have the same characteristics.), Rebuild the .DAT using the QuickBms reimport.bat (or if that does not work ,we can write a packer, the structure is simple) and then rebuild  the PS2 iso(use PS2 CDGen 3.0 since the file size is small.)
The bms script for extracting:


ROM Hacking Discussion / Re: Konami Arcade ROMs
« on: March 08, 2016, 12:47:22 pm »
There are two different Japanese versions of Akumajou Dracula supported by MAME, "version N" and "version P". Have you compared the data in the PS2 ELF against both versions?
I wasn't aware of this. I download both P and N version and can confirm that the emulator rom is in fact the "version P". Both k8 and k12 file dumps match 100% with those extracted from the ELF. The version was taken from the first link in after googling "Akumajou Dracula version p" (don't want to post links.), , And the MD5 of the zip archive is:
This became quite interesting. The only thing left are those audio files. Any ideas about those?

ROM Hacking Discussion / Re: Konami Arcade ROMs
« on: March 08, 2016, 12:13:50 pm »
When you run MAME (I mean regular MAME on a PC), you tell it what game to load and MAME itself knows what files to look for, how to load and combine them, and what hardware to emulate (that's the answer to your question "Is each game differently treated by MAME?") The ROM files themselves don't have any headers or other information that says what game they're for or how to load or emulate them. They're just raw data dumps. So there isn't anything you can do to the ROM data embedded in the ELF to make the PS2 emulator magically recognize it as Gyruss (or whatever game) and run it, even in the unlikely event that the MAME code to emulate that game is still there.
Well explained, you have well convienced me  :thumbsup:  Now, for the last question: Is there any interest in the original embedded rom and if yes where to submit it?
After do some reading on the roms and the tools used(just taking a quick look) I see that there can be different revisions of the rom , corrupted rom dumps(due to dust etc on the hardware) or different version. Forgive me if I get the terms wrong.
The dump I download has two dump files. The first is a complete match and the second is equal in size but the contens are different. This makes me believe that either the rom in the emulator is a different revision, different version , or the correct dump. The reason I say the correct dumb is because Konami oficially gave rights to this HAMSTER company to emulate and I highly doubt that they used tools to make dumps but Konami supplied the rom, so it must be a correct dump. Other than that there is also a SOUND folder which I suppose that contains music and effects. The files in there are in .ADP format(not sure if familiar to you). Although it is possible they are in another format and the extension means nothing and the sounds were optimized and played differently from the emulator. I can play them with some tools but I have to  tweak around to find the right frequenzy.

ROM Hacking Discussion / Re: Konami Arcade ROMs
« on: March 08, 2016, 11:22:28 am »
Sorry, what you're trying to do definitely isn't going to work. You're not going to be able to run arbitrary arcade games on the PS2 by replacing the ROMs in that emulated collection. Yes, different arcade games run on totally different hardware, even games from the same manufacturer. MAME is a multiple emulator like Mednafen. Mednafen can run both TurboGrafx and PSX games, but that doesn't mean you can run TurboGrafx games on a PSX, see what I'm saying? The developers of that PS2 collection may have started with MAME, but they almost certainly stripped out all the code except the parts needed to run the specific games in the collection.
Worth a try I suppose. I already "knew" it won't work the moment I saw the roms and they strange way it was dumped. I am little familiar with MAME and therefore all this questions. Clearly it won't work. Whats the chance that they haven't stripped all the code? I agree they have optimized and used it , but let's suppose they didn't. What would you suggest to search/look for?
Thanks again for the help. It's ok, I got the point that it won't work , now I am going to play around and see if I can find something interesting.

ROM Hacking Discussion / Re: Konami Arcade ROMs
« on: March 08, 2016, 10:05:06 am »
@DackR thanks for the info.

ROM Hacking Discussion / Konami Arcade ROMs
« on: March 07, 2016, 05:05:22 pm »
I am trying to do something and I need some answers regarding the Konami arcade system or systems in general. I tried googling for didn't get far. Basically I have some ROM dumps and none of them is in a standard format.

Newcomer's Board / Re: unchained blades exxiv , scripts
« on: September 14, 2015, 09:57:49 am »
OK Taking a break from the frustration that is entako no seito. So back to this one. When you open the iso you can access the data folder from the usrdir folder which has all the game main data. The file data_message_text is were the item and skills files go. So I an going to attempt to import the translated file back into it to see if it takes. You can also find the menu, world map and much more to work on here. So here my question: the map and other files are .tpk. what is this file type and how do you open? Madeditor or another program? Thank you! I'm getting somewhere with this game so I think I'm just going to focus on this one and gain some experience,  then retry entako no seito again. Maybe. . . .

September 10, 2015, 05:06:36 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
So I tried to import the  Translated .kdb.txt files back into the data file it came from. Each file I imported said it was smaller then the original.  So I imported anyway. Aaaaand the emulator crashed when I launched the game. Is there a way to repack the files containing the text back into a .dpk file? Maybe that would work?

September 11, 2015, 11:04:29 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Update: I repacked all the translated files into a new .Dat file and tried to import with cd mage and it asked to pad missing space with 1s and 0s so I let it. When it was all back together I tried to launch the game in emulator and it crashed again. Any suggestions?

September 13, 2015, 06:40:18 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
OK got it! I had to use umdgen to Import data files back in and it worked!!!!!!! Now I can edit and finalize a partial translation!!

September 14, 2015, 01:40:27 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Scratch that another failed attempt so that's it for me this stuff is just over my head, but I wanted to thank everyone who took time to he.p me so Thank you guys and good luck!!!!!!!!
I see that you have found out that UMDGen is the right tool here. You say tpk files and then dpk files, is the last one a typo and you really meant tpk files?
Why did your last attempt failed? What did ACTUALLY happen? Give as much details as possible.
The tpk files might be compressed/encrypted , however, you should work on the eboot.bin and translate a very small test, or change just 1-1 letters to see what happens.

Newcomer's Board / Re: Entaku no Seito: The Eternal Legend for psp scripts
« on: September 14, 2015, 09:53:35 am »
OK so I did some translating of the eboot with madedit and everything was going fine until I tried to Import it back into the iso with cdmage. When it tried I got an error message that said the file was larger then the original.  So I did it anyways and it took, but the emulator either freezes or crashes when I try to , launch the game. What did I do wrong?
Use UMDGen.

Newcomer's Board / Re: unchained blades exxiv , scripts
« on: August 30, 2015, 03:32:22 pm »
Sorry guys I didn't mean to start an argument.  The scripts I've translated are for psp version.  I've translated all of the item/skills etc. I didn't extract myself so I don't know what files they came out of. Someone ripped for me.
Can you tell us anything more? Or better say tell us everything. In what format is the script? Are they plain text files with all the the text line by line or or other formats? If you prefer , attach here the original script. Seeing that you have have managed to extract the item and skill strings then you must edit the BOOT.BIN file because it's there where the strings are. Other than that it is possible that they won't get displayed if the font does not support ASCI characters and you will have some issues on the length due to the text pointers.

First, do you have an actual PSP or are you using an emulator to run the game?

Newcomer's Board / Re: unchained blades exxiv , scripts
« on: August 27, 2015, 09:09:58 pm »
Thanks. Sorry for bothering everyone didn't mean to cause any problems. I knew this stuff was way over my head and should just have left it alone. Again I apologize for bothering everyone with my questions about this and entaku no seito. I'll leave these kinds of thing to the big boys to do.
Another PSP game? You came to the wrong place. Please share more info, how did you get(extract) the script?
Add as much info as you can. Also, check your thread about Entaku No Seito in a bit, going to give you hand there. And remember, rule 1 in romhacking: Never listen the big boys, always listen the middle ones.

News Submissions / Re: Utilities: Rainbow: texture format converter
« on: July 13, 2014, 10:13:24 pm »
Let me know if it works. I would like to collect bug reports and suggestions for the releases of the tool. I managed to correctly modify some TIM2 images for the PSP game Kingdom Hearts : Birth by Sleep.
Thamks for this really mate. How about making this a more wide one, regarding the PS2?  I can find some formats for you, in some popular gma,e and you can make this toll, one in all, to become the icon of image editing. I am no sure of the font format, I might send you ti , just in case ,if you want to take a look. Also ig you need PS2 specific detials and help, GS palettes info and evrything let me know, I have thousand of docs, maybe you can add MC icon feature in it(I know that other software do this, but the programming is not a hassle honestly, the format is tandart , and the datas are at static offset. Thank You again for this, will let you know after a few hours.

News Submissions / Re: Utilities: Rainbow: texture format converter
« on: July 13, 2014, 10:06:14 pm »
Great work , matey great work. I am going to give this a try with a PS2 game font, if it works, you are my here. It was time someone wrote a tool for TIM2 images, I know they are many available but sometmes TIM2 are not really that standart, especiallly in PS2 games.

Newcomer's Board / Re: ps2dis help
« on: June 29, 2014, 05:25:27 am »
That is incorrect. As stated in my earlier post it can load and save ELF files for PSP and PS2.

Anyway, the order of sections in an ELF file is not fixed. It is not simple to perfectly recreate the same file. As long as the data contained in it is not corrupted the file will work despite having a very different order.
The official documentation does not state support for PS2. Maybe it does work but that does not make it 100% correct.

Newcomer's Board / Re: ps2dis help
« on: June 28, 2014, 03:56:34 pm »
export = save as an ELF.
File-> Save As Binary.
There is no need to say "export" rather than saving modified ELF.

Pages: [1] 2