Posts: 4
Threads: 0
Joined: Dec 2011
Reputation:
0
(01-01-2012, 11:14 AM)kytoxid Wrote: Aha. I got it. A New Year's present?
The vertices here are at z = 100000 instead of z = 0 for some reason. This leads me to believe that there's some upper-limit z value, past which z is reset to 0. (similar to how z is set to 0 for negative z)
Changing VertexInfo.java:542 to:
Code: if ((z < 0) || (z == 100000)) {
made the game run perfectly (pretty much) at 60 FPS.
Here's a picture as proof. good job , by the way I use onboard radeon4200 w/ 11.7 driver
Posts: 893
Threads: 15
Joined: Nov 2009
Reputation:
14
(01-01-2012, 11:14 AM)kytoxid Wrote: Aha. I got it. A New Year's present?
The vertices here are at z = 100000 instead of z = 0 for some reason. This leads me to believe that there's some upper-limit z value, past which z is reset to 0. (similar to how z is set to 0 for negative z)
Changing VertexInfo.java:542 to:
Code: if ((z < 0) || (z == 100000)) {
made the game run perfectly (pretty much) at 60 FPS.
Here's a picture as proof.
Ah ha! Indeed there is an upper limit for the z axis, but we never figured it out because, so far, no game was doing this.
Great finding kytoxid! Thanks!
Posts: 12
Threads: 2
Joined: Dec 2011
Reputation:
0
01-01-2012, 08:49 PM
(This post was last modified: 01-01-2012, 09:15 PM by zaeraal2.)
That's strange, how did you managed to get the texts or menus? Because I only see the backgrounds.
In my attachment is the same scene as yours.
(Though this is good for making screenshots of the game, but not for the gameplay )
Using JPCSP ver. 2437 and your edit
if ((z < 0) || (z == 100000)) {
Posts: 22
Threads: 1
Joined: Dec 2011
Reputation:
0
01-01-2012, 11:05 PM
(This post was last modified: 01-01-2012, 11:17 PM by kytoxid.)
(01-01-2012, 08:49 PM)zaeraal2 Wrote: That's strange, how did you managed to get the texts or menus? Because I only see the backgrounds.
In my attachment is the same scene as yours.
(Though this is good for making screenshots of the game, but not for the gameplay )
Using JPCSP ver. 2437 and your edit
if ((z < 0) || (z == 100000)) {
Oops, sorry. Forgot about something. Optimized VertexInfo reading kinda throws a wrench into the whole thing, so I just commented it out from VideoEngine.java and forced it to use the non-optimized reading instead. You could probably implement a check for that somewhere though, hm. Easiest way would probably be to add a "Force non-optimised vertex reading" checkbox in the settings, but that's pretty ehh.
Posts: 12
Threads: 2
Joined: Dec 2011
Reputation:
0
01-01-2012, 11:34 PM
(This post was last modified: 01-01-2012, 11:56 PM by zaeraal2.)
(01-01-2012, 11:05 PM)kytoxid Wrote: Oops, sorry. Forgot about something. Optimized VertexInfo reading kinda throws a wrench into the whole thing, so I just commented it out from VideoEngine.java and forced it to use the non-optimized reading instead. You could probably implement a check for that somewhere though, hm. Easiest way would probably be to add a "Force non-optimised vertex reading" checkbox in the settings, but that's pretty ehh.
Woah awesome, it is fully working now. Menus, texts, gallery...
Thanks.
PS: I noticed one crash - WHEN YOU ENABLE VAO and then you go to gallery - characters, then you choose a character, go to 3D model (triangle), then when you try press the S button (cross), it crashes.
Posts: 22
Threads: 1
Joined: Dec 2011
Reputation:
0
01-02-2012, 12:10 AM
(This post was last modified: 01-02-2012, 12:11 AM by kytoxid.)
(01-01-2012, 11:34 PM)zaeraal2 Wrote: (01-01-2012, 11:05 PM)kytoxid Wrote: Oops, sorry. Forgot about something. Optimized VertexInfo reading kinda throws a wrench into the whole thing, so I just commented it out from VideoEngine.java and forced it to use the non-optimized reading instead. You could probably implement a check for that somewhere though, hm. Easiest way would probably be to add a "Force non-optimised vertex reading" checkbox in the settings, but that's pretty ehh.
Woah awesome, it is fully working now. Menus, texts, gallery...
Thanks.
PS: I noticed one crash - WHEN YOU ENABLE VAO and then you go to gallery - characters, then you choose a character, go to 3D model (triangle), then when you try press the S button (cross), it crashes.
Confirmed, Java completely APPCRASHes, nothing useful in the logs.
Code: Problem signature:
Problem Event Name: APPCRASH
Application Name: java.exe
Application Version: 6.0.300.12
Application Timestamp: 4ebb9ffe
Fault Module Name: StackHash_2264
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Code: c0000005
Exception Offset: 000000000868fecb
OS Version: 6.1.7601.2.1.0.768.3
Locale ID: 4105
Additional Information 1: 2264
Additional Information 2: 2264db07e74365624c50317d7b856ae9
Additional Information 3: 875f
Additional Information 4: 875fa2ef9d2bdca96466e8af55d1ae6e
Windows 7 x64, nVidia 210M.
Posts: 893
Threads: 15
Joined: Nov 2009
Reputation:
14
01-02-2012, 05:35 PM
(This post was last modified: 01-02-2012, 05:36 PM by Hykem.)
I've reverse engineered the real Z axis limit for the vertex data and apparently this is a widely used limit in several PSP functions.
Also, this was probably the reason why so many recent games weren't able to display graphics. Apparently, a particular japanese engine makes a small mistake by instead of setting the nearz and farz parameters to 10000 and 50000 (which are the most common values used by devs), sets the first value to 100000 (out of range).
I still haven't changed the optimized reading because, like kytoxid stated, forcing it may not be the best solution, but I'm currently checking why this isn't producing the proper results.
Posts: 22
Threads: 1
Joined: Dec 2011
Reputation:
0
I think the optimized reading is simply moving all the vertex data directly from memory into a buffer and passing that to the RE, bypassing actually reading the information into VertexInfo to speed up the process. Problem is, by never reading the actual position, we can't really implement a check on the z-value. This might be a quirk in the PSP's rendering that OpenGL doesn't have.
Posts: 166
Threads: 11
Joined: Feb 2011
Reputation:
1
This game can most likely be moved to playable now.
Along with To Aru Majutsu no Index and Ore no Imouto Maker EX.
CPU: Intel C2D E8500 @4.2 GHZ GPU: MSI Radeon 6870 Twin Frozr II 1024MB (920/1050)
RAM: 2x2GB Corsair Dominator DDR2-1066 5-5-5-15
Posts: 893
Threads: 15
Joined: Nov 2009
Reputation:
14
(01-03-2012, 08:07 AM)kytoxid Wrote: I think the optimized reading is simply moving all the vertex data directly from memory into a buffer and passing that to the RE, bypassing actually reading the information into VertexInfo to speed up the process. Problem is, by never reading the actual position, we can't really implement a check on the z-value. This might be a quirk in the PSP's rendering that OpenGL doesn't have.
As of r2439 there's now the option to disable the optimized VertexInfo reading. Apparently, it's not only the Z value checking that can cause issues. The problem may be more complex and it seems to reside in the whole SDK these latest game developers have been using.
As a workaround, disabling the optimized reading is helping some games displaying graphics properly.
|