X-Scale?
So I got one of the nifty-cool Toshiba e740s. Yeah, I know all about the love-hate problems with it. I was just a starry-eyed dreamer, hoping for the faster handheld.
For most stuff, this was a lot faster than the IPaq 3650 I'd been working on. However, the project I'd been building in PocketFrog is actually a lot slower on the X-Scale processor (from 30 fps to 7 fps).
IBM is apparently ignoring the problem, saying that programmers have to make their own optimizations to make X-Scale work. Microsoft is apparently ignoring the problem, because they don't like IBM or anyone who buys from them.
What I'm wondering is, does anyone know how to optimize for the X-Scale? Or are there any plans for it in PocketFrog, GAPI, etc. ?
PocketFrog is written in C++. As such, it will compile on any conforming compiler. Unfortunately, there is no XSCALE compiler available for the PocketPC. Until then, we are stuck with the ARM compiler.
The performance difference that you see is not a compiler problem. There is a memory read bandwidth issue with this (and perhaps all) new XScale-based device. I've done extensive tests on the e740 and with some type of memory reads it is 3x slower than the same test running on a StrongARM-based iPaq.
There are some things that you could do in your app's code to get it to run faster on an XScale but I'm not at liberty to discuss them right now. In the meantime, if you're a developer I'd suggest you start profiling your code running on an XScale device and on a StrongARM and look for places where it's slower on the XScale.
Some guy posted an e-mail of mine describing the results from some of my tests (without asking me first, I might add) on sprinklerhead.com. You might want to read that post for more info.
I spent 10 mins looking through relevant sprinklerhead posts but could not find the post.
Looks like the £500 stays in the bank then until the next gen of new devices come out as there's no point in buying a current xscale dev machine just to fight for FPS.
Don;t understand why any bench-marking is hush hush as they are production devices & anyone can run benchmarks on them

If the OS / Compiler / Hardware mix is wrong then an optimised xscale compiler is not going to cure the problem.
Ask the webmaster at sprinklerhead.com for help if you can't find it. I just checked and it's still there.
The actual benchmark numbers aren't posted on his site - only my explanation of what they mean.
I don't think there's a problem with showing benchmarks. I never said there was. I'm just not going to go into what the *reason* for the performance problem is right now.
I can tell you that from what I've seen there's no compiler that is going to help with this problem.
Digby, I was one of the guy waiting for your memory benchmark results. I am wondering why you are being so secretive about them?
In any case, did you have the time to test GDI performances? I was going to write some code to test that on my Jornada 720 (which supposedly has hardware acceleration). I wouln't be surprised if it was faster in the native screen's orientation. But for "rotation blit"... I would expect that direct access is faster.
I found the post from the news section on sprinklerhead.com
Certainly seems that no-one designs these devices as a whole. They just grab some availbale chips & see what they can come up with. In this case you have a machine which needs lots of work to get anywhere & if it's an XScale issue then they will all be the same. Boo Hoo
FYI:
http://www.sprinklerhead.com/cgi-bin/ikonboard.cgi?s=3d1feb6e63fcffff;act=ST;f=2;t=92
Great sleuthing by Digby! I bought the Casio E-200 instead, and spent the $250+ I saved on a wireless network card - XScale will have to wait until next year ( sigh ).
Ken
Just FYI, my game ran at 30-32 fps on a IPaq 36xx; but on the Toshiba e740, I was seeing 3-5 fps. Well, the biggest culprit was my FrameCounter.

I was just doing the basic GDI GetDC, DrawText, ReleaseDC stuff with PocketFrog surfaces, but that was sucking up a huge amount of the framerate.
Digby says that the GDI should work at acceptable speeds, so I think the problem was interaction between PocketFrog surfaces, and the GDI itself. (anyone, please correct me if I'm wrong). Anyway, after taking out the FrameCounter (now it just dumps framedata to a file at the end of the game), the game runs at about 14-16 fps.
Blitting does take up some of the remaining speed (if I don't blit, I can get 25fps), and I'm working on changing my local copy of the blit function to try to wrench some more frames out of it. And that's where I am now.
Digby has been extremely helpful. Thanks!
If anybody else has had similar experiences, or has tips on how to improve e740 performance, gimmie a shout. I'm hoping to use this as my standard programming platform, since I really do think x-scale chips will start to dominate the industry soon.
Using GDI during the main loop of your game is pretty much a bad idea. Here is what you should do for your frame counter:
Render the nuemric characters to a surface using GDI (ie: create a surface and write "0123456789" to it).
During the main loop, display the frame counter by blittinh the appropriate characters (ie: display->Blit( numsurface, Rect(...) ))
A GetDC/ReleadeDC pair on a surface is usually even slower then a Lock/Unlock pair. Don't do it when you need FPS.
Kzinti is correct. Minimize calls to GDI as much as possible and don't use the text drawing functions each frame. I'd go a step further and recommend that you not update an on-screen frame counter every frame. Just throw up the average every 16 frames (1/2 sec) or so.
>>The performance difference that you see is not a compiler problem. There is a memory read bandwidth issue with this (and perhaps all) new XScale-based device. I've done extensive tests on the e740 and with some type of memory reads it is 3x slower than the same test running on a StrongARM-based iPaq.<<
I don't believe 3% memory difference is the issue at all, not with such drastic drops.
Here's an interesting tidbit to consider:
My game code ran like utter GARBAGE on Toshiba's e740 and e335. Slower than my ipaqs 3630 and 3765, as well as my Casio EM500. It DOES appear to be some bandwidth issue because the 300mhz e335 performs the same as the 400mhz e740.
To see just how bad it gets, I bought a new (lovely) iPaq 1900. It's a 200mhz XScale device. 16-bit color.
It runs my code faster then any other Pocket PC I've tried.
Again, to compare the X-Scale devices with 100mhz memory:
e740 @ 400mhz w/ 16-bit color, painfully slow.
1900 @ 200Mhz w/ 16-bit color, flies.
It's weird, because the e740 BLAZES with bitblit's that are just being pushed to the screen, yet with an actual "pageflip" it's back to sluggish. That in itself would point to memory (block copies) being the guilty party (ATI's hardware boosts the e740's blitting).
But given the small difference in actual memory speed and the above contrast in the two above XScale devices, there's gotta be more to it. Like optimized code in the OS.
One way or the other, the handling of the XScale CPU is nothing short of poor, in terms of Intel/MS/developer relations as far as I'm concerned. It's a shame the general public isn't educated enough to know not to buy these new devices with great specs, because I don't feel this is a year in which most of the XSCale devices should even be selling. Not as things are at the moment.
As it stands, a lot of new users are going to have disappointing performance in apps that people like us wish to make.
It's a shame, because some excellent PDA's are coming out with the touted CPU itself being a shortcoming as it relates to the OS in some regards.
Though this thread started in July, I thought I'd share my experience so far...
My Dell Axim, which uses the 300MHz XScale, runs my Pod game at near 30FPS consistently, and I think it does some pretty extensive calculating too.
One example is my distance function, which is called <U>a lot</U>:
int distance(int x1, int y1, int x2, int y2)
{
return ((int) sqrt(pow(x2-x1,2)+pow(y2-y1,2)));
}
BrandG, you might want to try the game out and see if it performs the same/worse/better than the Toshiba.
Personally, I'm quite happy with my Dell, but I can't help wondering if there's a way to make it perform even better, or if there's a flaw in the technology that's keeping it below its potential.
The specs for my Axim are:
300MHz XScale, 32MB SDRAM, 32MB StrataFlash ROM, Pocket PC 2002 OS
The Pod Demo can be downloaded <A HREF="http://www.john-till.net/personal/pod.asp">here</A>.
-John
I'm telling you...
Something CAN be done for the speed, as you suggest.
I clocked my 200mhz iPaq 1910 to 300mhz, and the thing absolutely FLIES unlike an Pocket PC I've seen....and I've seen a lot of them.
160+ fps in the Blit demo, my Pocket Circus game runs substantially faster thay any other Pocket PC can run it.
I cannot seem to find that benchmark article. Is there an archive anywhere?
I'm trying to figure out why my pocketfrog app sometimes produce errors on x-scale based ipaqs.
Presto wrote:
Though this thread started in July, I thought I'd share my experience so far...
My Dell Axim, which uses the 300MHz XScale, runs my Pod game at near 30FPS consistently, and I think it does some pretty extensive calculating too.
One example is my distance function, which is called <U>a lot</U>:
int distance(int x1, int y1, int x2, int y2)
{
return ((int) sqrt(pow(x2-x1,2)+pow(y2-y1,2)));
}
BrandG, you might want to try the game out and see if it performs the same/worse/better than the Toshiba.
Personally, I'm quite happy with my Dell, but I can't help wondering if there's a way to make it perform even better, or if there's a flaw in the technology that's keeping it below its potential.
The specs for my Axim are:
300MHz XScale, 32MB SDRAM, 32MB StrataFlash ROM, Pocket PC 2002 OS
The Pod Demo can be downloaded <A HREF="http://www.john-till.net/personal/pod.asp">here</A>.
-John
If it were me writing that distance function, I'd drop the sqrt and compare against the square of the testing distance...just a thought.
Great idea! This will shurely save a lot of time. I will try to remember this to one of my projects that's been put in the freezer for the time beeing.
But if he is interested in the distance as a real meassure (and not a sorting function, comparing two or more distances to see whichever is the longest) he still needs the real distance.
I'm guessing (having played the Pod game) that he uses the distance to decide when a CPU controlled pod should attack the user (how close the user is allowed to get). And then it works just fine, squaring the test distance (like Rinzai said).
There are other ways of calculating a distance though. The square distance (or Manhattan distance) is simply MAX(abs(x1-x2),abs(y1-y2)) and that is also much faster than a square root. It works fine for most square based games. But once again, it depends on what to use the distance for.
I recently tried DevilDarts on my Dad's new 400mhz Axim and it ran like a 1 legged dog. I did not code with performance in much in mind cuz it ran fine on my Jornada 568 and I was a bit lazy about optimization but after seeing that my stomach sank...
I'm looking to do some performance enhancements (my animation is really very basic) that will hopefully run better but have to wait to see them on the Axim...
Cool - I capped the game to 30fps and adjusted my animation so it all looks good here... I'm waiting for my Dad to mail me back and tell me how great everything looks but am pretty confident that this will make the game run consistently on all devices (I had a cap of about 50fps in the released game so on my jornada it was getting about 40-45 but on the axim it was only getting about 32)
On a side note (I might post this as a separate topic) does anyone know how pocketgear and handango handle updates? Can registered users simply download the latest version at any time after paying for it? Will they notify the people that a new version is out or do I have to do that?
thanks all!
I believe this to be true, if anyone knows otherwise of course correct me...
I don't believe either of those sites will handle updates for you, not in any direction fashion anyway. Purchasers can go back and download their purchases I think as many times as they want, and since when you update your product you upload a new copy of it, this should mean that people can go download a new version whenever you update it. But as for notification, that's all on you as far as I know.
I personally handle all those details myself and just let Handango and PocketGear act as my point-of-sale handlers.
Incidentally, I've had a number of problems with PocketGear in terms of getting paid. They tend to screw up sending checks a lot (well, two or three times for me anyway). Handango has yet to mess up, for me anyway. I might be the exception, but I'm not as confident in PocketGear as I am in Handango. Take that for whatever it's worth.
I think as of recently pocketgear will not send a check if you made less than $50
Yes, they just did that this month, and THAT has caused MORE problems (I replied to their eMail saying I didn't want that, they said OK, then proceded to not send my check anyway... I contacted them, they said they'd send the check but it's been over a week and I haven't gotten it yet).
Hi Frank,
Last check [Dec 2002 sales] was sent to you on Jan 27, 2003. All previous checks were cashed.
"Incidentally, I've had a number of problems with PocketGear in terms of getting paid. " - I am not sure what the problem is. Can you contact me directly:
slawek@pocketgear.com or
call 313-259-3016 M-F - 9am - 5pm EST
I can be also reached via MSN messanger
spruchnik@hotmail.com
Regards,
Slawek Pruchnik
Member, PocketGear.com LLC
slawek@pocketgear.com
I probably should have been more careful in my wording, it sounded like I was coming down on PocketGear and that was not my intent.
I have had a couple of problems with payments as I stated, but otherwise I have had no reason to complain. None of the problems have been anything major and all were resolved with no problem.
As evidenced by the fact that a member of the PG staff was kind enough to post here and take an interest in my current situation, their service and responsiveness is quite good.
I do stand by the statement that I feel a bit more comfortable with Handango, but that should not be taken as a negative towards PocketGear. I think Joe DiMaggio was a better ball player than Ty Cobb, but that doesn't diminish how good Cobb was!
Fzammetti is correct that Handango are better at what they do than PocketGear. I gave up using PocketGear mainly because the no of sales was so low however I did have one problem which was wierd. I created a panel advert which was supposed to appear but never did. PG never got in touch about this & of course were not paid but it does show that their admin can let them down at times.
I prefer ShareIt! out of all the online sites as I can build an automatic registration system to my requirements which plugs in to their system. Also they will pay directly into a bank account saving time every month.
"PG never got in touch about this & of course were not paid but it does show that their admin can let them down at times. "
Conan - did you contact PocketGear about this situation? What company are you with?
"I can build an automatic registration system to my requirements which plugs in to their system. Also they will pay directly into a bank account saving time every month."
We support RPN key generation (example Sony's Everquest) as well as "posting" the order info to a URL so you can easily generate the codes. For more info on posting to url see
http://pocketprojects.pocketgear.com/ub ... 8;t=000007
We also do wire transfers. The fee for wire transfer is $30 regardless of the amount.
Conan - can you send me an email
slawek@pocketgear.com?
Regards,
Slawek