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:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Very simple frame skipping code!
#11
(08-07-2011, 07:58 PM)gid15 Wrote: Yes, PRIM, BEZIER and SPLINE can be skipped, but TRXKICK should not: it is used by some games to copy parts of the display list.
Also, bounding boxes can probably be skipped as well: skip BBOX and always take the jump in BJUMP.

Oh right, I forgot about this !
Reply
#12
(08-07-2011, 07:58 PM)gid15 Wrote:
(08-05-2011, 05:30 PM)Orphis Wrote: I think the heavy functions in the OpenGL pipeline are the PRIM, BEZIER, SPLINE and the frame buffer transfer command (XKICK if I remember correctly). The other ones aren't very time consuming.
Yes, PRIM, BEZIER and SPLINE can be skipped, but TRXKICK should not: it is used by some games to copy parts of the display list.
Also, bounding boxes can probably be skipped as well: skip BBOX and always take the jump in BJUMP.

overgamer Wrote:Also I don't know if it is possible to use a profiler to check where exactly is the heavy rendering part, it would help a lot.
Statistics (e.g. duration of each VideoEngine command) can be activated by setting jpcsp.util.DurationStatistics.collectStatistics to true. Statistics are then displayed in the log file when Jpcsp exits.

In your draft implementation, you were actually not skipping any frame rendering: the GE list was still enqueued in the VideoEngine, the list processing was just delayed (probably to the next VSYNC). This would probably only cause the application to run slower, but not skip any frame.
The approach proposed by Orphis is much more promising.

Thanks gid15 for theses precisions! I'm still looking at the code at the moment, and I'll start to disable these commands one after the other to see if it dosen't break anything. As I said, It's the very first time I deal with an emulator's source code, and I didn't knew how the rendering process was achieved. I am slowly starting to see how it seems to work now. I'll post if I ever get some results, but I'm highly motivated! Also if there is anything else that is special about the rendering part, feel free to tell me =')

Edit: okay, when PRIM, BEZIER, SPLINE, and BBOX are all ommited (and always jumping on BJUMP) we do get some great improvments on fps (depending on how many frames we skip), but it's very messy in term of display. The display is not stable. What I mean is that it turns black with some randoms colors very quickly and flickers much more. It also break fluid videos (eg opening of 3th birthday) with some heavy flickering because of that. Do you know what can possibly turn the screen black like that and not keeping the previous frame displayed?
Reply
#13
Pretty funny fact, when these methods are ommited 100% of the time, the games goes always real time (which I guess is 60 fps?), meaning the whole decoding process is perfect already, so we just need to pimp the speed of these heavy methods, and we'll be able to speed-up gameplay!

Time to get some work on SPLINE and BEZIER algorithms to see if there is anything we can speed up. The first thing I'll look at is to check is all constructors can be created out of some loops. =')

Edit: also the frame skipping code works better now, I simply don't swap the buffers during the skipped frames, and there is much much less noise. Then I just need to mess with the GUI to add it to the options and you could test it to see how it really affect speed-up, but it's actually usable! =)

Edit2: what I have been messing with lately. =0


Attached Files Thumbnail(s)
   
Reply
#14
Bezier and spline aren't easy functions at all. And actually, the spline isn't complete at all. Good luck with that...
But you should check first if the games are really using it, it shouldn't be that often.
Reply
#15
(08-15-2011, 11:00 PM)Orphis Wrote: Bezier and spline aren't easy functions at all. And actually, the spline isn't complete at all. Good luck with that...
But you should check first if the games are really using it, it shouldn't be that often.

I doubt it wouldn't be easy, but I'm sure there is something we can do. I'll check using the profiler to see if it is worth or not to try messing with these functions first. As you said, better optimize a heavy tasks, and not a light weight ones. I'll need to dig the code, and find some theory about Bezier curves calculation and Spline approx. (if they are what I think they are, it's about maths), but It will be a good challenge. =)
Reply
#16
but how use frame skipping code in jpcsp
Reply
#17
kasimo, it hasn't been implemented for now. so just wait.
Mobo:Gigabyte (GA-78LMT-USB3) CPU:AMD FX-6300 RAM:G-Skill 8GB Dual-Channel DDR3 PC12800 VGA:Sapphire R7 265 2GB OS:Windows 7 Ultimate 64-bit SP1
Reply
#18
ahh These ideas only
I am disappointed because I do not find something that works well, such as Tekken 6, Tekken Dark and above this is very slow and I've broken the speed of the processor and the simulator gives the same result
Reply
#19
overgamer, if you want me to explain bezier and splines PSP implementation to you, send me a PM with your MSN address or meet me on IRC, EFNet.
Reply
#20
(08-07-2011, 07:58 PM)gid15 Wrote:
(08-05-2011, 05:30 PM)Orphis Wrote: I think the heavy functions in the OpenGL pipeline are the PRIM, BEZIER, SPLINE and the frame buffer transfer command (XKICK if I remember correctly). The other ones aren't very time consuming.
Yes, PRIM, BEZIER and SPLINE can be skipped, but TRXKICK should not: it is used by some games to copy parts of the display list.
Also, bounding boxes can probably be skipped as well: skip BBOX and always take the jump in BJUMP.

overgamer Wrote:Also I don't know if it is possible to use a profiler to check where exactly is the heavy rendering part, it would help a lot.
Statistics (e.g. duration of each VideoEngine command) can be activated by setting jpcsp.util.DurationStatistics.collectStatistics to true. Statistics are then displayed in the log file when Jpcsp exits.

In your draft implementation, you were actually not skipping any frame rendering: the GE list was still enqueued in the VideoEngine, the list processing was just delayed (probably to the next VSYNC). This would probably only cause the application to run slower, but not skip any frame.
The approach proposed by Orphis is much more promising.
I am kinda of update Jpcsp to the newest possible recently, hopefully to see it with significant improved performance, but it is desparated to see the newer version never come up with frame skip option, or the developers just totally ignore it? But when I read this thread, I am so happy that I find a hope to play my long await game at last at a better fps.
I renamed the sceDisplay.java.bak to sceDisplay.java and repack the jpcsp.jar, and put the "private int frameSkippedCount = 30" , put the "if (frameSkippedCount >= 30) { // 6: number of frames to skip" , still the Megaman X maverick hunter is running slow, is it a ways to frameskip for the game? I have a slow computer btw.
Reply


Forum Jump:


Users browsing this thread: 11 Guest(s)