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 - Aali

Pages: 1 ... 41 42 43 44 45 [46] 47 48
1126
I believe you can achieve pretty much any effect you want by tweaking the viewport and projection matrix :-)

Simply stretching everything over the full screen area is possible, but it should also be possible to add black borders to preserve aspect ratio

Menus are not really any different from the other graphics, infact, they're drawn by the same routine that does the world map

No more screenshots for now, reorganizing the code to more closely mirror the d3d driver instead of the (broken) opengl driver, but I think I know how to get field backgrounds and menus working properly now. Battle is a completely different beast, have to decipher the relatively complex 3d object (PCs, NPCs, field entities, high-res models on the world map etc) routine to make that work.

1127
Nevermind, the info was there all along, I was just looking in the wrong place, you don't know which palette to use until its time to render the texture :-)

I've also noticed that FF7 seems to work well even if you resize the viewport, which means you can use the hi-res patch at any resolution :-) (Higher resolutions wont improve quality, of course, but this makes it possible to run hi-res on widescreen 1280x800 displays etc)

1128
Now I've hit a bit of a snag, as you can see in the screenshots, some textures look garbled or have wrong colors, this is because I don't know what to do with .tex files that have multiple palettes, how are you supposed to know which palette to use? (Fonts are 4bpp and have a 16*16 palette, for example)

1129
Triple-posting :-P

Turns out I was just being an idiot, hadn't set the texture coordinates outside battles (and forgot to do a BGR to RGB conversion), I had it right all along;

Yes, I really like Mt. Nibel


Holy sh*t, you can actually read the text!


Even field is getting there :-)


No battle screenshots this time, it seems to be quite broken at the moment

1130
Double-posting again, with some new even more impressive results :-)

Managed to get more than just the haircut this time :-P


Outside rocket town (water is orange, haven't really got the palettes all figured out it seems)


Inside rocket town (field really needs correct textures to make any sense, but you can sort-of see the rocket :wink:)

1131
FF7 is based on DX5, which means no hardware T&L, what the driver recieves is only transformed through the camera matrix and the "per-entity" matrix, the driver knows nothing about animation so that must be done somewhere else.

Seems to me this would make it quite difficult to inject 3d models this way, since not only do you have to identify the model, you have to figure out how its animated and apply this to the new model.

However, I *think* the driver can get access to all the information from the .p file the model came from, which would make the identification part a breeze but then you still have to figure out the animation state.

Textures are much easier, you have access to both the .tex header and the raw image data since it is up to the graphics driver to convert it to a suitable format.

1132
Archive / Re: Giving enemys limit breaks
« on: 2009-03-26 17:34:38 »
I can confirm that they are stored in groups, I don't know exactly what those groups are though, but it may very well be impossible to get it to play the Cosmo Memory animation for enemy attacks.

1133
Possible, but it would be easier to just write a converter directly.

After all, the graphics driver interface is completely undocumented, reverse engineering the loader would be easier.

1134
This was really easier than I thought :-o

The very same scene outside Mt. Nibel:


Exp/AP screen after battle:


In battle (Hey, I know that haircut :-P):


Now you may have noticed that everything seems to be upside-down... still working on that :lol:

1135
Hadn't even thought of that, but yes, assuming you can detect which texture it is trying to load (the filename is not passed to the graphics driver AFAIK) you could just load something else instead :-)

Another thing that would be seriously badass is "injecting" pixel shaders to enhance the special effects

But I should probably get atleast some of the transforms working first, so you can actually see whats going on :-P

I did get vertex colouring working though (only reason it wasn't working before was because of a stupid typo), and you can actually see the enemies go red and fade out in battle :-)

1136
If you ever wondered what FF7 with no background, no colors, no transforms and no textures looks like, it looks like this :-P

Wo rld map, outside Mt. Nibel/Rocket Town


In battle (fixed the crash, too, so you can actually finish the battle)


Field, inside Mt. Nibel this time


I know it looks like random crap, but I for one was happy to see *something* come out of it :-)

Next step: load textures, get menus working...

1137
Archive / Re: Reverse Engineering
« on: 2009-03-25 13:37:21 »
And this thread is SEVEN YEARS OLD, that has to be some kind of record :-o

1138
Well load_texture here just means that the graphics driver should prepare an image for use as a texture, the actual image is of course already loaded from disk.
The .tex format is basically a 1:1 image of what FF7 stores internally and is more like a specification of what kind of texture you want, FF7 then chooses the most compatible texture format supported by the driver and converts the image if necessary.
Oh and there is a .tim loader in the PC version as well, but it just converts the image to .tex format

Now that I have filled in all of the call table with stubs that do (almost) nothing, I can actually get all the way to the world map without crashing. Battles crash instantly though, probably because I'm not doing something I'm supposed to be doing :-)

1139
Here's a little teaser; APP.LOG after a run with my dummy driver that does nothing but print the name of the function called:

Code: [Select]
INITIALIZE DD/D3D START
LOCK UNLOCK TEST
dll_gfx: lock
dll_gfx: init
dll_gfx: setviewport
dll_gfx: setbg
dll_gfx: clear_all
dll_gfx: flip
dll_gfx: clear_all
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: setmatrix
dll_gfx: setmatrix
dll_gfx: setmatrix
MATRIX INITIALIZE
INITIALIZE DD/D3D END
initializing sound...
creating dsound primary buffer
reading audio file
loading static sounds
sound initialized
INITIALIZING MIDI...
selecting device 0:SB X-Fi Synth B [D000], mid=1, pid=102,
midi data type: GENERAL MIDI
using midi data file: C:\Games\Final Fantasy VII\Data\midi\midi.lgp
MULTIMEDIA ERROR: At least one parameter is invalid. in FILE C:\lib\src\sound\midi1.cpp LINE 356
midiOutGetVolume returned: ffffffff
Volume control unsupported
MIDI INITIALIZED
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
set music volume: 127
set music volume: 127
MIDI set master volume: 100
Entering MAIN
Exiting MAIN
START OF CREDITS!!!
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: load_texture
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: blendmode
dll_gfx: setmatrix
dll_gfx: blendmode
dll_gfx: setbg
dll_gfx: clear

After that it crashes because I haven't filled in the rest of the call table :-)

1140
That would be a *huge* list, but yes, I could compile everything I know right now into a C header file or some other suitable format if you want

There are still a lot of unknowns, I have names for half of the functions and there are only a few I truly understand what they do

In total, there's 60 functions, 40-50 or so that are actually different and not just stubs/duplicates in the other drivers

One thing that has me completely stumped is how the heap data structure used in FF7 works, apparently it's used to store the polygons/3d objects you have to draw and the graphics driver has to parse that

1141
From Halkun: Only Aali Can post in this thread. Other posts will be deleted.


http://backup.ninjaloot.se/share/ff7_opengl-0.1a.zip

Installation
Extract the archive into your ff7 folder (where ff7.exe is), run one of the .reg files (if you used the Nvidia TNT mode before, use the "tntfix" one)
FF7 will now use the new driver. (To revert the changes made by the .reg file, run FF7Config)

Known problems
Z-coordinates are way off for high-res 3D models, for this release I've adjusted them to appear in front of everything, this leads to many glitches but atleast you can see where you're going.
Movies are not shown (and the skipping routine is a total hack which may break some things)
Some things are missing, some things just look wrong.
The snowboard minigame seems to hang at the intro screen every time.
DirectInput breaks if the window loses focus (so don't use alt-tab)
The camera is a bit "off" in battle sometimes.


If you find any other issues, please post screenshots, relevant information from APP.LOG and if possible, a savegame.
If you get a crash, make sure to note down the module and offset from the error report.

1142
Troubleshooting / Re: FF7 D3D bugged on 8800 GT
« on: 2009-03-22 11:21:08 »
The battleswirl should be fast, I can barely see it on my setup.

I have the "glitchy polygons" problem as described by bloodshot and the yellow textures problem with a 8600GTS card and 181.22 drivers, for now I just play software mode without hi-res patch.

FF7Music has never crashed on me though, perhaps you have a bad plugin.

Oh and next time ff7 crashes on you, write down the offset and module from the error report screen, this will (hopefully) make it possible to determine whats going on.

1143
Q-Gears / Re: current source state? (Akari?)
« on: 2008-10-18 11:20:26 »
And once again the SVN is full of Squeenix IP...
Developing a new engine for their game is a grey area, but if you distribute their copyrighted material they have every right to shut you down.

And no, just because it's in a different format does not make it legal.

1144
Troubleshooting / Re: FF7 randomly crashing after battle
« on: 2008-08-25 06:48:00 »
Getting that error report would be very helpful, the random midi crash always happens at a specific offset in winmm.dll

1145
Troubleshooting / Re: FF7 randomly crashing after battle
« on: 2008-08-23 21:31:32 »
Might be the random midi crash, drop me a mail if you want to test the experimental YAMP patch.

1146
Archive / Re: char.lgp
« on: 2008-07-27 22:50:52 »
The NPC patch itself contains no copyrighted material from the original game, a patched char.lgp does.

1147
Archive / Re: char.lgp
« on: 2008-07-25 16:14:36 »
Did you set your locale settings to US English while using LGP tools? That should fix any errors you may have with missing files. (You might want to tell us _why_ its not working)

I doubt you'll have any luck getting someone to mail their char.lgp to you, not only is it illegal, but most email providers don't allow big attachments.

1148
First FF7 is written in C++.

FFVII was written in C.

PC version is in C++, are you refering to the PSX version?

1149
Archive / Re: Concerning FPS
« on: 2008-06-14 10:10:43 »
The "right" way to do it would be of course to update variables as fast as possible relative to how much time the last frame used up. (so everything is time-based instead of frame-based)

But that would of course mean you have to change just about every calculation the engine does, and i dont think anyone is up for that.  :-P

1150
Troubleshooting / Re: Final Fantasy VII Crash
« on: 2008-06-09 23:56:15 »
Check the error report for mentions of winmm.dll.

There is a known problem with how FF7 handles MIDI transitions, it doesn't happen too often and i have no idea what triggers it (seems to be random).

If it is indeed winmm.dll that's crashing your FF7, you might want to try my experimental patch for it.

Pages: 1 ... 41 42 43 44 45 [46] 47 48