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.


Topics - Alhexx

Pages: 1 [2] 3
26
Okay, I've got 2 problems and I didn't want to make two different topics out of it...

1. Debuggers
Can anyone recommend me an useful freeware (or shareware)(or non-shareware) win32 assembler-based debugger? I'm workin' with OllyDbg 1.08b right now, but it hangs on FF7... :(

2. Menus
Okay, I've got a problem in Ultima. I want to make a Popup-menu for my renderer view class, which has got a list of the groups that can be rendered. It should look like this:
Code: [Select]
+------------+---------+
| Groups   > | Group 0 |
+------------+---------+
             | Group 1 |
             +---------+
             | Group x |
             +---------+


I know how to build up a menu dynamically in runtime, however, there's a problem with the group entries.
I don't know how many groups the user will use, and creating dozens of IDs for the Group menus would be too much.

So:
Is it possible to create a "menu array"? So that all those Group-Entries would have the same ID, let's say ID_VIEW_GROUP, and I simply add a kind of Index to them??
I hope you understand my problem...

 - Alhexx

27
Hum, no, no new Ultima Release yet. But I'll release the "Ultima 0.40 Public Alpha #1" within the next few days.
I've been workin' on the .p format for some hours today, and I found out some interesting things...
The Vertex, Polygon and Edge Pools are divided into several "Sub-Pools". How they're divided is stored in the FiftySix-Pool...
This also means that I'm not very far from generating a new .p file, which can be accepted by FF7 (or at leats I hope so)

I haven't updated my .p File Description yet, however, I'll try to do that until next week.

You'll maybe get a useful beta of Ultima 0.40 within this year, too...

I'll keep you up-to-date.

 - Alhexx

28
Since I'm porting Ultima to C++, I'll also try to improve the Renderer Code.

My first question goes out to mirex: Which values have you used for the glPerspective function in your Biturn app? I just need the last 2 values.
Thanx.

I hope we can keep this topic alive for further renderer improvements in our apps. (I also hope that Fice'll take a look at all the question's I'll have :D )

 - Alhexx

29
No, you don't need to clean your glasses. It is true, the Ultima Source Code has been released. I can be freely downloaded from my homepage.

Why releasing the source? Well, I've decided to continue Ultima under Visual C++, so I won't continue with my VB work here. Maybe someone else wants to do this.

Okay, now: Have fun with it!

http://www.alhexx.com

 - Alhexx

30
Scripting and Reverse Engineering / C++ Struct Size Bug??
« on: 2002-08-26 18:34:58 »
Well, I'm currently trying to write an editor for Dino Crisis 2 Memory Card Savegames. However, I have one problem, and I have no idea how to solve it.

Here's the important code:

Code: [Select]

typedef unsigned char byte;
typedef unsigned short word;
typedef unsigned int dword;

typedef struct
{ // SIZE: 10 Bytes
word Unknown1;
byte PrimWeapon;
byte SecnWeapon;
dword Unknown2;
word Unknown3;
} t_dc2_player;


Okay, everything's fine 'till now. As you can see (and you can count yourself) t_dc2_player is exactly 10 Bytes big. However, if I use it in another struct, let's take this for example:
Code: [Select]

typedef struct
{
int someInt;
t_dc2_player Dylan;
t_dc2_player Regina;
int anotherInt;
} someStruct;


Now I have this problem: someInt and Dylan are read out right, but ... the others aren't. The reason seems to be than t_dc2_player is not 10 but 12 bytes big in c++ (at least that's what the sizeof() fucntio says)
So, for Dylan 12 Bytes are read out from a file (or another buffer), but only 10 bytes are stored in the struct. The 2 bytes directly after Dylan (or let's say: the first 2 bytes of Regina) simply disappear!! They're not here!!


Has anybody got an idea how to solve this???

 - Alhexx

31
Okay, here's my problem:
I wanted to move some of Ultima's dialogs into a VC++ DLL, b'cause of better data type check and etc. However, I wanted to call the dialog via DoModal() and *BANG* - it crashed... :(
I've been debugging the dll and I've found out that it has got to do with the dialogs parent window. Well, if you call a Dialog via DoModal() in a C++ app, then it has it parent window - the mainframe.
However, if you call it from a DLL, I will have to specify the parent window manually, but how??

Okay, here's the code I used:
I've got a Dialog and its Class CDiaVert. The window will be created by a global function called DiaAddVertex by Ultima:

Code: [Select]
// Add New Vertex Dialog Function
int APIENTRY DiaAddVertex(int *iNumVertex, ff7_vertex *pVertex, ff7_color *pColor)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CDiaVert VertDia;
VertDia.SetData( iNumVertex, pVertex, pColor);
if(VertDia.DoModal() != IDOK)
{
return -1;
}
else
{
VertDia.GetData(iNumVertex, pVertex, pColor);
return 0;
}
}


Okay, passing Ultima's main window handle to the DLL should be no problem, but how do I tell the DoModal()-Function to use this handle??

 - Alhexx

32
First of all, I've got to say, that this post wouldn't be made w/o ShinRa Inc.'s help ...

Okay, I think we'Ve been able to hack the Texture Info from the .p files.

Let me start like this:
There are 2 different Vertex/Polygon(/and of course, Color) pools in a FF7 Battle Model(/b]

Here are the count of them:
First the Vertex Pool:
Code: [Select]

Vertex1Count = Additional - Value3 // These are the verts for the model
Vertex2Count = Value3 // These are the verts for the texture


Now the Poly Pool:
Code: [Select]

if(Value3 > 0)
{
  Polygon1Count = NumPolys - Value3 + 6
  Polygon2Count = Value3 - 6
}
else
{
  Polygon1Count = NumPolys
}


But I'm not sure 'bout that '6' in the NumPolys Calc. I think there is another Value in the Header that tells us, how many Polys we don't need.

Oh, and the Counts of the colors for the Pools is calculated the same way as its Owner Pool:
VColor1Count = Vertex1Count
VColor2Count = Vertex2Count

PColor1Count = Polygon1Count
PColor2Count = Polygon2Count

Oh, and the color for the second pool (the texture pool) should be always white (255,255,255,255)


Okay, the first Vertex Pool tells you the coords of the vertex for the normal, vertex-colored Model. IOW, it's exactly that what we have decoded until now.
Now, the second Vertex Pool is independent fro the first one, every vertex has a white color.

More interesting are the Polys:
The First Polygon pool sets the normal model.
The second Pool creates the Polygons needed for the Textures. And the Indices of these Polys are directing to the second Vertex Pool... do you see what I mean?

Oh, and the Texture coords:
Vertex 1 in Vertex Pool2 uses Texture Coord 1,
Vertex 2 in Vertex Pool2 uses Texture Coord 2,
Vertex 16 in Vertex Pool2 uses Texture Coord 16
and so on...


I know this is a very, erm, blah-blah readme, but I think this could be very useful for the Remake Engine, huh?
I'll most probably won't be able to implement all these Functions into Ultima 0.31 ... but I'll try what I can do.
Oh BTW: Ultima 0.31 is going to be released tomorrow!

Nice hacking!

 - Alhexx

33
I'm trying to show the current memory/CPU usage in a C++ App like the Windows Task Manager in WinNT systems do. However, I can't find any useful API calls to read out those values.

Does anyone know where to get them?

 - Alhexx

34
I just got Visual Studio .NET yesterday and what do I have to tell you? I'm fascinated. VB now got kinda more powerful. Now it's got useful classes which brings it closer to the OOP system...
However, I didn't have much time to try around yet, but I'll see if I can try around the next days... oh, BTW: today's the football match: Germany - Brasil ... so I don't think I'll have that much time today...

Any opions as far as Visual Studio .NET is concerned? (I know we had a topic like this before, but this was before it was released...)

 - Alhexx

35
Well, I've written a VC++ DLL for Ultima to swap bytes (especially for the LWO exporter). Swapping integers was no problem, I simply used the << and >> operators. But they don't work with floats...

However, Alhexx went to write a bit of assembler code :D :
Code: [Select]

// Swaps Bytes in 32-Bit IEEE Float
float APIENTRY SwapFloat(float *Value)
{
float fretVal = float(0);
float* pretVal = &fretVal;
// Uses VC++ Inline Assembler
_asm
{ // Push Registers to Stack (save them)
push eax
push ebx
push ecx
push edx
// Write Address of Values to ECX / EDX Register
mov ecx, Value
mov edx, pretVal
// Read 8-Bit Values from the Float and write them to AX / BX Registers
mov al, byte ptr [ecx]
mov ah, byte ptr [ecx + 1]
mov bl, byte ptr [ecx + 2]
mov bh, byte ptr [ecx + 3]
// Write them to the memory of the return Value
mov byte ptr [edx]    , bh
mov byte ptr [edx + 1], bl
mov byte ptr [edx + 2], ah
mov byte ptr [edx + 3], al
// Pop Registers from Stack
pop edx
pop ecx
pop ebx
pop eax
}
return fretVal;
}


Any suggestions or better ideas?

 - Alhexx

36
Scripting and Reverse Engineering / Fice: TexTool Bug...
« on: 2002-04-14 09:16:00 »
 Screenshot

Do you recognize it? Well, all your FF7 tex tools have that bug.
FF7 textures may use more that 256 colors, like 'dfx.tex'. Then the program crashes, as seen on the screenshot.

Solution: You should check if the texture uses more than 256 colors, if it does, you'll have to convert the texture to a 24Bit bitmap...

BTW: How do you like my new background pic? It was scanned from a polish MAXIM ... :rolleyes:

 - Alhexx
[edited] 169 2002-04-14 10:17

37
I've finally started workin' on a Milkshape Plugin for importing FF7 .p file models.
The first public release is out, so you can visit my site and download it.

http://www.alhexx.com

(Hm ... I'll have to add that battle pose data now, too...)

 - Alhexx

38
I'm workin' with a FILE type and I've used functions like fgetc, fgetw and so on to read out integers.
But how the heck can I read out a IEEE float from a binary file stream under C++ ? :-?

BTW: I'm programmin' with Win32 API, no MFC ...

 - Alhexx

39
Scripting and Reverse Engineering / Upload problems...
« on: 2002-03-23 13:15:00 »
I've got a problem when trying to upload files onto servers from my home comp. I have tried several FTP clients and several hosts, and everytime the connection speed goes to 0...
The same happens when I  try to upload a file onto Fice's Remake Server...
I've also tried passive mode, but nothing seems to work...

 - Alhexx

40
Scripting and Reverse Engineering / Ultima 0.30 issues
« on: 2002-03-12 13:49:00 »
Has anyone downloaded Ultima 0.30? Is it workin'? With which version of JSGReg32 are you workin'? 1.30 or 1.32?

Please anwer, I'll need your help...

 - Alhexx

41
Scripting and Reverse Engineering / To Fice & SaiNt
« on: 2002-03-02 12:16:00 »
Okay, I need a Source Code translation for Melissa, my Parasite Eve ripper. Could you please do me a favor and translate those two types into C++ and Pascal?

Code: [Select]

'Melissa Index File Header
Public Type MelHeader   'Offset Len     Description
  ID As String * 8      ' 0      8      = "MELISSA1"
  FLen As Long          ' 8     12      Length of File
  NumEntries As Long    '12     16      Count of Entries
End Type

'Melissa Index File Entry
Public Type MelEntry
  ID As String * 4      ' 0      4      Type / Extension (e.g. "TIM ")
  Offset As Long        ' 4      8      Offset of File in IMG
  Length As Long        ' 8     12      Length of File
  Dummy As String * 4   '12     16      = "MLSA"
End Type


 - Alhexx

42
Scripting and Reverse Engineering / FF9 *.IMG Archives
« on: 2002-02-27 18:41:00 »
Well, the subject says all. I'm quite sure, anyone of you has decoded this format or at least knows someone who has. Is there any description / source code out there?

I could need this info for my Parasite Eve Ripper ...

Thanx !

 - Alhexx

43
General Discussion / Something funny this time...
« on: 2001-12-23 09:35:00 »
As you can read in the Subject, it's not that stupid this time.
Just take a look at this and tell me what you think of it :)
XiaoXiao

 - Alhexx

44
Okay, I think I know what's written in the **da files from Battle.lgp:
I think they are simple .a files, but someone who knows the .a format properly (halkun, fice) could take a look at it.

I also think the **aa files are a kind of RSD file, **ab files sth like HRC files.

BTW: I can't see any other topics... is that my fault?

 - Alhexx

45
Scripting and Reverse Engineering / .p Format News
« on: 2001-12-16 11:47:00 »
Okay, good news for all .p hackers: I've continued workin' on that damn format. However, I've found some interesting things, but what's almost more important:
I have a suspicion what the huge 'corrupt' block in the Battle.lgp is:

I suppose that these files are the battle locations. Why? Well:

1. You can load the files in Ultima (well, you not, but me - I've disabled that 'Crash Test' ). But there's one thing: the models are HUGE - too big for Ultima. Normal Field models have Coords between -2 to +2. Battle models usuall have Coords from -200 to +200 . Those Battle Locations have -20000 to  +20000 ... See the problem. Even if you convert the files to RAW or LWO format, they're too huge. But I've implemented a multiplikator of 0.001 - so the model is shrinked to 1/1000 of it's original size. Then you often can recognize a kind of 'Plattform'. I'll post a screenshot later.

2. As for usual Battle models, too, there are textures stored in the corrupt block. Example: pmag
This is a usual FF7 texture and when you convert it, you'll get this result:


Now I'll go offline and keep on workin' on that ... :)

 - Alhexx

46
General Discussion / Something stupid
« on: 2001-12-12 15:27:00 »
Well, I see a hand full of topics including the word 'stupid'.
So I simply decided to post something stupid in here, too.




 - Alhexx

47
General Discussion / Qhimm or SaiNt: Board Bug Report ...
« on: 2001-12-11 16:10:00 »
Okay, it isn't that bad, but you've got 2 smilies with the same 'keystokes'.

These ones:
 

They both have
Code: [Select]
:cry:

I wanted to post the crying smilie with tears - and what happened?
I got the wrong one... :weep:

 - Alhexx

48
General Discussion / Recognized something?
« on: 2001-11-30 16:38:00 »
Has anybody who has visited a topic, in which a new-registered user has posted?

Well, take a look at this:
Tech-Related Topic

See the first post? Recognize something? Well, it's not in the post itself, it's got something to do with the user profile ...

 - Alhexx

49
...that I've found here.

Okay, I'm currently (also) workin' on an ONI ripper, basing my work on a C Source. And I've found this one there:

Code: [Select]
/****** TXMP Format Info ******************************************************
 *
 * 0: AAAARRRRGGGGBBBB
 * 1: ARRRRRGGGGGBBBBB
 * 2: ARRRRRGGGGGBBBBB
 * 8: AAAAAAAARRRRRRRRGGGGGGGGBBBBBBBB
 * 9: Compressed 4x4 block method
 * RRRRRGGGGGGBBBBB RRRRRGGGGGGBBBBB XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 * This method stores the texture as several 4x4 blocks. Each block starts
 * with two colors. Then follows 32 bits of pixel information. The pixel
 * block is laid out like this (two bits per pixel):
 *
 * 03 02 01 00
 * 07 06 05 04
 * 11 10 09 08
 * 15 14 13 12
 *
 * The first and second colors of the palette used to decode the block are
 * the first and second colors read for the block. The third and fourth
 * colors are the two colors in-between the first and second.
 *
 *****************************************************************************/


I understand type 0, 1, 2 and 8, but 9 ?`I have no idea how to decode that. If someone's interested to take a look at the Source,here it is.

Please help me ... if you can ... I'm so depressed ...

 - Alhexx

50
General Discussion / Got Win XP now...
« on: 2001-11-21 13:53:00 »
Okay, I finally got Win XP Pro now. But that's not all: I'm gonna do a complete system cleanup, means formatting, change partitions, change file system to NTFS and install Win XP.

What I wanted to say is that I probably won't be online for some days. So, no need to worry (or at least I hope so...) :grin:

 - Alhexx

Pages: 1 [2] 3