This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
To Aru Kagaku no Railgun [JAP] - ULJS00354
#11
(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 jobWink, by the way I use onboard radeon4200 w/ 11.7 driver

Reply
#12
(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! Big Grin
Reply
#13
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 Smile )

   

Using JPCSP ver. 2437 and your edit
if ((z < 0) || (z == 100000)) {
Reply
#14
(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 Smile )



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.
Reply
#15
(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.

Reply
#16
(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.
Reply
#17
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). Tongue
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.
Reply
#18
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.
Reply
#19
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
Reply
#20
(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.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)