PDA

View Full Version : StrmnNrmn Blog update.



shadowprophet
June 27th, 2006, 03:26
http://img472.imageshack.us/img472/3847/retro9dl.jpg
StrmnNrmn (http://strmnnrmn.blogspot.com/2006/06/deciding-what-to-optimise.html) Has made an update to his blog with interesting news! This time he talks speed, Here is what he had to say.

Whenever I start to answer questions on the comment pages I always end up going into too much detail for a quick response and end up deciding to put up a new post instead. I hope this isn't too annoying :)

In response to Plans for R6 (http://www.blogger.com/comment.g?blogID=13094505&postID=115101409781972448) xiringu and ukcuf16 had a couple of interesting suggestions for performance improvements.

First up, from xiringu:

instead of working with a 300x200 screen, work with only half height 150x200 and then display an empty line every other line to get the final 300x200. That's an interesting idea - it's a trick that's been used by demo coders for years to get a few extra fps. I'm not sure this is going to provide all that much of a speedup to Daedalus though :( The reason for this is that currently rendering only contributes a small amount to the overall cost of each frame, so even if rendering time was totally eliminated, the framerate wouldn't change much. As an example, let's take something like Zelda which currently runs at around 4 fps. At 4fps it means each frame takes 1000/4 = 250 milliseconds to render each frame, which is broken down something like this:

CPU emulation: 200 ms
Display list parsing: 40 ms
Rendering: 10 ms
Total: 200 + 40 + 10 = 250 ms (i.e. 1000/250 = 4fps)

Assuming that we could totally eliminate the rendering time, this would now look like:

CPU emulation: 200 ms
Display list parsing: 40 ms
Rendering: 0 ms (no cost)
Total: 200 + 40 = 240 ms (i.e. 1000/240 = 4.17fps)

So the very best we could hope for in this case would be a .17fps improvement in the framerate :(

ukcuf16 wrote:

Just wanted to ask if there is ever going to be frame skip in later versions :) What ukcuf16 is suggesting is that the emulator renders one frame, then skips the next. Alternating frames like this should halve the cost of rendering, at the cost of making the framerate a little less smooth.

Again, this is an interesting idea, but I don't really see this having much impact on the framerate as things stand at the moment. Working out the potential speedup is a little more complicated, as we have to take the average time over two frames. The numbers look something like this:

Frame1 CPU emulation: 200 ms
Frame1 Display list parsing: 40 ms
Frame1 Rendering: 10 ms
Frame2 CPU emulation: 200 ms
Frame2 Display list parsing: 0 ms (skipped)
Frame2 Rendering: 0 ms (skipped)
Total: 200 + 40 + 10 + 200 = 450 ms
Average: 450 / 2 = 225 ms (i.e. 1000/225 = 4.44fps)

So even implementing a frame skip mechanism would only give a tiny 0.5fps speedup.

To take this example to its ultimate conclusion, let's assume that I could somehow eliminate the entire cost of display list parsing and rendering:

CPU emulation: 200 ms
Display list parsing: 0 ms (no cost)
Rendering: 0 ms (no cost)
Total: 200 ms (i.e. 1000/200 = 5fps)

Even if I could somehow (magically) reduce the cost of rendering to 0 milliseconds, we'd still only see a 1fps speedup. However, if I can halve the cost of CPU emulation (which is much more likely given the speedups already seen with the new dynarec engine) this is what the calculations look like:

CPU emulation: 100 ms (now twice as fast)
Display list parsing: 40 ms
Rendering: 10 ms
Total: 100 + 40 + 10 = 150 ms (i.e. 1000/150 = 6.66fps)

At the moment I feel that there are more gains to come from optimising the CPU emulation, which is why I've been concentrating on this area recently. As the cost of CPU emulation falls relative to rendering then the ideas suggested by xiringu and ukcug16 will start to become more attractive.

-StrmnNrmn

Post Feedback Via Comments Below

mavsman4457
June 27th, 2006, 03:32
Always great to hear from Strmnnrmn.

**1_Man_Matrix**
June 27th, 2006, 03:36
Awesome work!
You definently know your stuff and are a great mind and asset to the community.
Keep up the good work and thanks for the update and for explaining things in detail, while still keeping it relatively simple. :D

BALL_SAC
June 27th, 2006, 04:09
At least we heard from him, and its good to hear that R6 is on the way.

stotheamuel
June 27th, 2006, 04:16
everyone is saying good news? Am i misreading it.. its saying a .17-.5 fps speed increase

acn010
June 27th, 2006, 04:17
yay!!
speed is the key and the principal of everything (some things dont follow -_-'' )
ill wait for the upcoming emu

Gizmo356
June 27th, 2006, 04:25
yay

felonyr301
June 27th, 2006, 04:50
very interesting very interesting indeed cant wait for the next update keep up the good work and ohh yes he used zelda as an example..best game ever.. lol big zelda fan cant wait till this moves at a good speed.

Misleading
June 27th, 2006, 04:55
I originally posted this in the comments under strmnNormns blog :)


Though legend of Zelda is not nearly as fast (fps wise) as a game such as Mario 64, which for me runs at an average of 10 fps in the castle. So if the fps breaks down the same way as in legend of Zelda then it would be something like
100 ms to render each frame.
Cpu emulation = 80 ms
Display list parsing = 16 ms
Rendering= 4 ms
80 +16 +4 = 1000/100 = 10 fps
Though I doubt that the CPU, display list parsing and rendering affect on fps are the same in legend of Zelda and Mario so I am most likely wrong

So if you were to implement frame skip it would come out to something like this
Frame 1 CPU emulation = 80 ms
Frame 1 display list parsing= 16 ms
Frame 1 rendering = 4 ms
Frame 2 CPU emulation =80 ms
Frame 2 display list parsing = 0 ms (skipped
Frame 2 rendering = 0 ms (skipped
Total 80 + 80 +16+4 = 180 ms
Average 180 ms /2 = 90 ms (i.e. 1000/90 ms 11.111 fps

1.11 is still not a lot (same percentage as loz) . But lets say you half the cost of CPU emulation to 40 ms (thanks to a compete dynarec engine) and implemented a frame skip. Lets have it skip 2 this time. So there for it would go frame. Skip. Skip. Frame. Skip. Skip
F = frame
F1 CPU emulation =40 ms half as fast
F1 display list parsing = 16
F1 rendering = 4
F2 CPU emulation = 40 ms
F2 display list parsing = 0 skipped
F2 rendering = 0 skipped
F3 CPU emulation = 40 ms
F3 display list parsing= 0 skipped
F3 rendering = 0 skipped
Total= 40+40+40+16+4= 180 ms
180/3= 60 ms 1000/60 = 16.666 fps

My point :), you are right in not implementing frame skip yet but I think in the near future Like after you finish your dynarec engine you should implement frame skip for a notable speed boost.
This post is pretty redundant because you stated this in a nutshell in you last paragraph but 16 fps Mario sounds so sweet. :)
Even if it is choppy.
so therefore .5 fps increese sounds bad but if the dynarec engine is finshed and frameskip is implemeted there could be a big boost in fps

Misleading
June 27th, 2006, 04:55
posted twice :D :cool: :eek: :o :rolleyes: ;) :p :mad: :) :( :confused:

Broonale
June 27th, 2006, 05:28
I am eager to play with the next release.

I am not daunted by the small gains possible by these suggestions.

When you have your breakthrough idea hit you from nowhere the gain is speed will be quite a bit, I'm sure!

gunntims0103
June 27th, 2006, 05:55
this is great news keep us posted hope everything goes well

Gizmo356
June 27th, 2006, 06:02
yes as up to date as possible

your finnaly back gunns

satty
June 27th, 2006, 18:18
It's my understanding (from wiki http://en.wikipedia.org/wiki/PlayStation_Portable#Technical_specifications ) that the cpu is dual core. Can the second core be used in homebrew? Is it already? And if it is not used currently in emu's, how hard would it be to code for it? Iv'e been following the psp homebrew scene for a few months but never read anything about the use of the second core in any homebrew program.

PSmonkey
June 27th, 2006, 20:03
It's my understanding (from wiki http://en.wikipedia.org/wiki/PlayStation_Portable#Technical_specifications ) that the cpu is dual core. Can the second core be used in homebrew? Is it already? And if it is not used currently in emu's, how hard would it be to code for it? Iv'e been following the psp homebrew scene for a few months but never read anything about the use of the second core in any homebrew program.

The second core is the ME or Multimedia Engine chip. It's almost exactly alike to the main core minus a few features.

You can code stuff to run on the ME but at the same time it was not designed that way (it was ment to decode audio & video). Also if you do use the ME you must run your app in kernal mode which wich will result in the loss of 2.0+ suport.

At the current time it's not worth it.

In the future it probably will be worth using for doing audio HLE on for 1.5/1.0 users.

jman420
June 27th, 2006, 20:55
and yes, Snes9xTYL.04 uses ME engine co-processing, but like PSmonkey said, you have to have a 1.5 F/W PSP it run it

Video_freak
June 27th, 2006, 21:26
ah...good old 1.5
with the new mod chip(s) coming out, more people will have access to 1.5 and coders wont need to worry about 2.00+ users as much

tsurumaru
June 28th, 2006, 01:16
Hey guys heres Strmnnrmns response to my idea of taking us through the development plan in the longer term;

tsurumaru: That's a great idea. I was thinking about posting with a general 'roadmap' of features I want to work on and the order I want to tackle them in. I don't want accidentally lead people to believe the emulator is going to be perfect in a few weeks just because there's been some rapid progress early on.

ukcuf16
June 28th, 2006, 03:16
hehehe yaayyy im in the post lol

he spelled my name wrong though :( lolz

devilmob
June 28th, 2006, 04:38
if a new eloader is created within a few days using the new 2.5/2.6 exploit and if it could launch all the apps that the 1.5 can launch, StrmnNrmn and all developers could use this advantage to implement kernal mode, thus incrementing the fps!!!. If anyone could do the math of how much fps there is going to be in Daedalus using the ME i would apreciated.

anyways, StrmnNrmn, thanx for the good news on the upcoming update, you and the exploit news have made my day!!!:D

ukcuf16
June 28th, 2006, 23:12
PsDonkey (who MIGHT/MAYBE be part of Strmnnrmn's team) has left this comment in strmnnrmn's blog:

For those of you who want the updated changes to the source, here are the links to the 1.0 and 1.5 binaries. I already sent the source to norman so anyone who wants to take a look at the source feel free to either email norman or myself for the updated source code and one of us will send you the source.
Basically this new R5 edition has the new eboot icons and sound from before and also the new menu backgrounds from before as well. The newer code that was implemented is the addition of menu music while you are browsing through the options and rom list. As soon as you choose a rom to load, the music stops and clears the memory for the use of loading the rom into the memory. You can also create your own custom mp3 music for the menu and putting it inside your Daedalus folder naming your mp3 "menu.mp3" It doesn't really matter how long your music is because once it finishes, the music will repeat itself until you choose a rom to play then the music will be freed from the memory usage so that the emualtor will still have all the necessary memory that it needs. Also, once again, this new R5 update has the rom folder the same as the folder that Monkey64 uses. You need to place all your rom files in the root of the memory stick called "n64" just like the way Monkey64 does. So there is no more "Rom" folder in Daedalus. I am working on a few more additions to Daedalus for when R6 comes out. Once again to make things clear, All 100% credit goes to StrmnNrmn for this awesome work of his. Anyone else who has some new ideas for StrmnNrmn's future releases, just drop him an email with the updated source and i am sure he will incorporate it into the new release. Here are the binary files:

Link for R5 Changes for 1.00

http://rapidshare.de/files/24398732/Daedalus_100_R5_New.rar.html

Link for R5 Changes for 1.50

http://rapidshare.de/files/24398995/Daedalus_150_R5_New.rar.html

Harshboy
June 28th, 2006, 23:51
Yes, if this kernal mode does become usable on 2.5/2.6 we will all be able to enjoy the abilities of the ME. I believe using it will boost the progress of this emulator a lot!

tsurumaru
June 29th, 2006, 00:17
PsDonkey (who is now part of Strmnnrmn's team) has left this comment in strmnnrmn's blog:


Well he's not part of the "team" yet as you call it. He is making changes to Strmnnrmns source code and at least he is doing something positive by submitting them but we haven't heard from strmnnrmn yet as to what he thinks, and to date he hasn't made any contribution to the actual emulation, just some peripheral functions like the logo, music player and directory changes (hardly major for someone who claims to have a fully working full speed N64 emulator).

Anyhow I reserve judgement for now, hopefully it wont turn into another of his fiascos and he can atone for his many wrongs.

ukcuf16
June 29th, 2006, 01:17
yeah i didnt think he was .. I thought i read that sumwhere though , any ways i edited my last post.

Gizmo356
June 29th, 2006, 01:28
i dont trust donkey his rep is very low in my book

http://www.photohome.com/pictures/mixed/donkey-1.jpg